@orbcharts/plugins-basic 3.0.0-alpha.55 → 3.0.0-alpha.57

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. package/LICENSE +200 -200
  2. package/dist/orbcharts-plugins-basic.es.js +7072 -7073
  3. package/dist/orbcharts-plugins-basic.umd.js +10 -10
  4. package/dist/src/base/BaseLineAreas.d.ts +1 -0
  5. package/dist/src/base/BaseLines.d.ts +3 -1
  6. package/dist/src/grid/gridObservables.d.ts +19 -2
  7. package/dist/src/grid/types.d.ts +1 -0
  8. package/dist/vite.config.d.mts +2 -0
  9. package/package.json +43 -42
  10. package/src/base/BaseBarStack.ts +778 -778
  11. package/src/base/BaseBars.ts +764 -764
  12. package/src/base/BaseBarsTriangle.ts +672 -672
  13. package/src/base/BaseDots.ts +513 -513
  14. package/src/base/BaseGroupAxis.ts +558 -558
  15. package/src/base/BaseLegend.ts +641 -641
  16. package/src/base/BaseLineAreas.ts +628 -625
  17. package/src/base/BaseLines.ts +704 -699
  18. package/src/base/BaseValueAxis.ts +478 -478
  19. package/src/base/types.ts +2 -2
  20. package/src/grid/defaults.ts +128 -127
  21. package/src/grid/gridObservables.ts +539 -248
  22. package/src/grid/index.ts +15 -15
  23. package/src/grid/plugins/BarStack.ts +43 -43
  24. package/src/grid/plugins/Bars.ts +44 -44
  25. package/src/grid/plugins/BarsPN.ts +41 -41
  26. package/src/grid/plugins/BarsTriangle.ts +42 -42
  27. package/src/grid/plugins/Dots.ts +37 -37
  28. package/src/grid/plugins/GridLegend.ts +59 -59
  29. package/src/grid/plugins/GroupAux.ts +976 -922
  30. package/src/grid/plugins/GroupAxis.ts +35 -35
  31. package/src/grid/plugins/LineAreas.ts +40 -39
  32. package/src/grid/plugins/Lines.ts +40 -38
  33. package/src/grid/plugins/ScalingArea.ts +173 -173
  34. package/src/grid/plugins/ValueAxis.ts +36 -36
  35. package/src/grid/plugins/ValueStackAxis.ts +38 -38
  36. package/src/grid/types.ts +123 -122
  37. package/src/index.ts +9 -9
  38. package/src/multiGrid/defaults.ts +158 -158
  39. package/src/multiGrid/index.ts +13 -13
  40. package/src/multiGrid/multiGridObservables.ts +49 -49
  41. package/src/multiGrid/plugins/MultiBarStack.ts +78 -78
  42. package/src/multiGrid/plugins/MultiBars.ts +77 -77
  43. package/src/multiGrid/plugins/MultiBarsTriangle.ts +77 -77
  44. package/src/multiGrid/plugins/MultiDots.ts +65 -65
  45. package/src/multiGrid/plugins/MultiGridLegend.ts +89 -89
  46. package/src/multiGrid/plugins/MultiGroupAxis.ts +69 -69
  47. package/src/multiGrid/plugins/MultiLineAreas.ts +77 -67
  48. package/src/multiGrid/plugins/MultiLines.ts +77 -66
  49. package/src/multiGrid/plugins/MultiValueAxis.ts +69 -69
  50. package/src/multiGrid/plugins/MultiValueStackAxis.ts +69 -69
  51. package/src/multiGrid/plugins/OverlappingValueAxes.ts +167 -166
  52. package/src/multiGrid/plugins/OverlappingValueStackAxes.ts +168 -167
  53. package/src/multiGrid/types.ts +72 -72
  54. package/src/noneData/defaults.ts +102 -102
  55. package/src/noneData/index.ts +3 -3
  56. package/src/noneData/plugins/Container.ts +10 -10
  57. package/src/noneData/plugins/Tooltip.ts +310 -310
  58. package/src/noneData/types.ts +26 -26
  59. package/src/series/defaults.ts +144 -144
  60. package/src/series/index.ts +9 -9
  61. package/src/series/plugins/Bubbles.ts +545 -545
  62. package/src/series/plugins/Pie.ts +576 -576
  63. package/src/series/plugins/PieEventTexts.ts +262 -262
  64. package/src/series/plugins/PieLabels.ts +304 -304
  65. package/src/series/plugins/Rose.ts +472 -472
  66. package/src/series/plugins/RoseLabels.ts +362 -362
  67. package/src/series/plugins/SeriesLegend.ts +59 -59
  68. package/src/series/seriesObservables.ts +145 -145
  69. package/src/series/seriesUtils.ts +51 -51
  70. package/src/series/types.ts +83 -83
  71. package/src/tree/defaults.ts +23 -23
  72. package/src/tree/index.ts +3 -3
  73. package/src/tree/plugins/TreeLegend.ts +59 -59
  74. package/src/tree/plugins/TreeMap.ts +305 -305
  75. package/src/tree/types.ts +23 -23
  76. package/src/utils/commonUtils.ts +21 -21
  77. package/src/utils/d3Graphics.ts +124 -124
  78. package/src/utils/d3Utils.ts +73 -73
  79. package/src/utils/observables.ts +14 -14
  80. package/src/utils/orbchartsUtils.ts +100 -100
  81. package/{tsconfig.json → tsconfig.base.json} +13 -13
  82. package/tsconfig.json.bak.vite-plugin-tsconfig +8 -0
  83. package/tsconfig.prod.json +2 -13
  84. package/vite.config.mjs +41 -0
  85. package/dist/vite.config.d.ts +0 -2
  86. package/tsconfig.dev.json +0 -17
  87. package/vite.config.js +0 -50
@@ -1,18 +1,18 @@
1
- (function(Z,ur){typeof exports=="object"&&typeof module<"u"?ur(exports):typeof define=="function"&&define.amd?define(["exports"],ur):(Z=typeof globalThis<"u"?globalThis:Z||self,ur(Z["orbcharts-plugins-basic"]={}))})(this,function(Z){"use strict";const ur={lineCurve:"curveLinear",lineWidth:2},ap={lineCurve:"curveLinear",linearGradientOpacity:[1,0]},sp={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1},Fu={showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>t,labelPadding:24};Fu.labelTextFormat.toString=()=>"text => text";const Fo={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},xx={...Fo},up={barWidth:0,barGroupPadding:10,barRadius:!1},lp={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},Gu={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",ticks:"all",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"};Gu.tickFormat.toString=()=>"text => text";const zu={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:null,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},cp={...zu},fp={},hp={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"};var Ou=function(t,e){return Ou=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])},Ou(t,e)};function Mn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ou(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function _x(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(c){try{l(r.next(c))}catch(f){a(f)}}function u(c){try{l(r.throw(c))}catch(f){a(f)}}function l(c){c.done?o(c.value):i(c.value).then(s,u)}l((r=r.apply(t,e||[])).next())})}function pp(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(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[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 cr(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(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 fr(t){return this instanceof fr?(this.v=t,this):new fr(t)}function wx(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,f)}}function s(p,d){r[p]&&(i[p]=function(g){return new Promise(function(m,b){o.push([p,g,m,b])>1||u(p,g)})},d&&(i[p]=d(i[p])))}function u(p,d){try{l(r[p](d))}catch(g){h(o[0][3],g)}}function l(p){p.value instanceof fr?Promise.resolve(p.value.v).then(c,f):h(o[0][2],p)}function c(p){u("next",p)}function f(p){u("throw",p)}function h(p,d){p(d),o.shift(),o.length&&u(o[0][0],o[0][1])}}function $x(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(l){o({value:l,done:s})},a)}}typeof SuppressedError=="function"&&SuppressedError;function yt(t){return typeof t=="function"}function Uu(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 Bu=Uu(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},op={lineCurve:"curveLinear",linearGradientOpacity:[1,0]},ap={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1},Nu={showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>t,labelPadding:24,labelRotate:0};Nu.labelTextFormat.toString=()=>"text => text";const Go={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},g2={...Go},sp={barWidth:0,barGroupPadding:10,barRadius:!1},up={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},Fu={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",ticks:"all",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"};Fu.tickFormat.toString=()=>"text => text";const Gu={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:null,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},lp={...Gu},cp={},fp={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"};var zu=function(t,e){return zu=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])},zu(t,e)};function Mn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");zu(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function m2(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(c){try{l(r.next(c))}catch(f){a(f)}}function u(c){try{l(r.throw(c))}catch(f){a(f)}}function l(c){c.done?o(c.value):i(c.value).then(s,u)}l((r=r.apply(t,e||[])).next())})}function hp(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(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[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 cr(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(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 fr(t){return this instanceof fr?(this.v=t,this):new fr(t)}function y2(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,f)}}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{l(r[p](d))}catch(g){h(o[0][3],g)}}function l(p){p.value instanceof fr?Promise.resolve(p.value.v).then(c,f):h(o[0][2],p)}function c(p){u("next",p)}function f(p){u("throw",p)}function h(p,d){p(d),o.shift(),o.length&&u(o[0][0],o[0][1])}}function b2(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(l){o({value:l,done:s})},a)}}typeof SuppressedError=="function"&&SuppressedError;function yt(t){return typeof t=="function"}function Ou(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 Uu=Ou(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 Yu(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=lr(a),u=s.next();!u.done;u=s.next()){var l=u.value;l.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 c=this.initialTeardown;if(yt(c))try{c()}catch(g){o=g instanceof Bu?g.errors:[g]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=lr(f),p=h.next();!p.done;p=h.next()){var d=p.value;try{mp(d)}catch(g){o=o??[],g instanceof Bu?o=si(si([],cr(o)),cr(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new Bu(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)mp(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)&&Yu(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Yu(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),dp=Go.EMPTY;function gp(t){return t instanceof Go||t&&"closed"in t&&yt(t.remove)&&yt(t.add)&&yt(t.unsubscribe)}function mp(t){yt(t)?t():t.unsubscribe()}var yp={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},bp={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],cr(n)))},clearTimeout:function(t){var e=bp.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function vp(t){bp.setTimeout(function(){throw t})}function Hu(){}function zo(t){t()}var Wu=function(t){Mn(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,gp(n)&&n.add(r)):r.destination=Dx,r}return e.create=function(n,r,i){return new ui(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Go),Sx=Function.prototype.bind;function Vu(t,e){return Sx.call(t,e)}var Ax=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){Oo(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Oo(r)}else Oo(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Oo(n)}},t}(),ui=function(t){Mn(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&&yp.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Vu(n.next,s),error:n.error&&Vu(n.error,s),complete:n.complete&&Vu(n.complete,s)}):a=n}return o.destination=new Ax(a),o}return e}(Wu);function Oo(t){vp(t)}function Mx(t){throw t}var Dx={closed:!0,next:Hu,error:Mx,complete:Hu},ju=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function hr(t){return t}function Px(t){return t.length===0?hr:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var pt=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=Lx(e)?e:new ui(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=xp(n),new n(function(i,o){var a=new ui({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[ju]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Px(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=xp(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 xp(t){var e;return(e=t??yp.Promise)!==null&&e!==void 0?e:Promise}function Tx(t){return t&&yt(t.next)&&yt(t.error)&&yt(t.complete)}function Lx(t){return t&&t instanceof Wu||Tx(t)&&gp(t)}function Cx(t){return yt(t==null?void 0:t.lift)}function fe(t){return function(e){if(Cx(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 Ex(t,e,n,r,i)}var Ex=function(t){Mn(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(l){try{r(l)}catch(c){n.error(c)}}:t.prototype._next,u._error=o?function(l){try{o(l)}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(l){n.error(l)}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}(Wu),Rx=Uu(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),et=function(t){Mn(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 _p(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new Rx},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=lr(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(l){i={error:l}}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?dp:(this.currentObservers=null,s.push(n),new Go(function(){r.currentObservers=null,Yu(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 pt;return n.source=this,n},e.create=function(n,r){return new _p(n,r)},e}(pt),_p=function(t){Mn(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:dp},e}(et),kx=function(t){Mn(e,t);function e(n){var r=t.call(this)||this;return r._value=n,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},e.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,o=n._value;if(r)throw i;return this._throwIfClosed(),o},e.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},e}(et),wp={now:function(){return(wp.delegate||Date).now()},delegate:void 0},Ix=function(t){Mn(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=wp);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(),l=0,c=1;c<o.length&&o[c]<=u;c+=2)l=c;l&&o.splice(0,l+1)}},e}(et),$p=new pt(function(t){return t.complete()});function Nx(t){return t&&yt(t.schedule)}function qu(t){return t[t.length-1]}function Fx(t){return yt(qu(t))?t.pop():void 0}function Xu(t){return Nx(qu(t))?t.pop():void 0}function Gx(t,e){return typeof qu(t)=="number"?t.pop():e}var Zu=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Sp(t){return yt(t==null?void 0:t.then)}function Ap(t){return yt(t[ju])}function Mp(t){return Symbol.asyncIterator&&yt(t==null?void 0:t[Symbol.asyncIterator])}function Dp(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 zx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Pp=zx();function Tp(t){return yt(t==null?void 0:t[Pp])}function Lp(t){return wx(this,arguments,function(){var n,r,i,o;return pp(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,fr(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,fr(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,fr(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 Cp(t){return yt(t==null?void 0:t.getReader)}function he(t){if(t instanceof pt)return t;if(t!=null){if(Ap(t))return Ox(t);if(Zu(t))return Ux(t);if(Sp(t))return Bx(t);if(Mp(t))return Ep(t);if(Tp(t))return Yx(t);if(Cp(t))return Hx(t)}throw Dp(t)}function Ox(t){return new pt(function(e){var n=t[ju]();if(yt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Ux(t){return new pt(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Bx(t){return new pt(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,vp)})}function Yx(t){return new pt(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 Ep(t){return new pt(function(e){Wx(t,e).catch(function(n){return e.error(n)})})}function Hx(t){return Ep(Lp(t))}function Wx(t,e){var n,r,i,o;return _x(this,void 0,void 0,function(){var a,s;return pp(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=$x(t),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function ln(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 Rp(t,e){return e===void 0&&(e=0),fe(function(n,r){n.subscribe(ae(r,function(i){return ln(r,t,function(){return r.next(i)},e)},function(){return ln(r,t,function(){return r.complete()},e)},function(i){return ln(r,t,function(){return r.error(i)},e)}))})}function kp(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(kp(e),Rp(e))}function jx(t,e){return he(t).pipe(kp(e),Rp(e))}function qx(t,e){return new pt(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function Xx(t,e){return new pt(function(n){var r;return ln(n,e,function(){r=t[Pp](),ln(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 Ip(t,e){if(!t)throw new Error("Iterable cannot be null");return new pt(function(n){ln(n,e,function(){var r=t[Symbol.asyncIterator]();ln(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function Zx(t,e){return Ip(Lp(t),e)}function Kx(t,e){if(t!=null){if(Ap(t))return Vx(t,e);if(Zu(t))return qx(t,e);if(Sp(t))return jx(t,e);if(Mp(t))return Ip(t,e);if(Tp(t))return Xx(t,e);if(Cp(t))return Zx(t,e)}throw Dp(t)}function Uo(t,e){return e?Kx(t,e):he(t)}function Bo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Xu(t);return Uo(t,n)}var Np=Uu(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function O(t,e){return fe(function(n,r){var i=0;n.subscribe(ae(r,function(o){r.next(t.call(e,o,i++))}))})}var Qx=Array.isArray;function Jx(t,e){return Qx(e)?t.apply(void 0,si([],cr(e))):t(e)}function Fp(t){return O(function(e){return Jx(t,e)})}var t_=Array.isArray,e_=Object.getPrototypeOf,n_=Object.prototype,r_=Object.keys;function i_(t){if(t.length===1){var e=t[0];if(t_(e))return{args:e,keys:null};if(o_(e)){var n=r_(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function o_(t){return t&&typeof t=="object"&&e_(t)===n_}function a_(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=Xu(t),r=Fx(t),i=i_(t),o=i.args,a=i.keys;if(o.length===0)return Uo([],n);var s=new pt(s_(o,n,a?function(u){return a_(a,u)}:hr));return r?s.pipe(Fp(r)):s}function s_(t,e,n){return n===void 0&&(n=hr),function(r){Gp(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,u=function(c){Gp(e,function(){var f=Uo(t[c],e),h=!1;f.subscribe(ae(r,function(p){o[c]=p,h||(h=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},l=0;l<i;l++)u(l)},r)}}function Gp(t,e,n){t?ln(n,t,e):e()}function u_(t,e,n,r,i,o,a,s){var u=[],l=0,c=0,f=!1,h=function(){f&&!u.length&&!l&&e.complete()},p=function(g){return l<r?d(g):u.push(g)},d=function(g){l++;var m=!1;he(n(g,c++)).subscribe(ae(e,function(b){e.next(b)},function(){m=!0},void 0,function(){if(m)try{l--;for(var b=function(){var x=u.shift();a||d(x)};u.length&&l<r;)b();h()}catch(x){e.error(x)}}))};return t.subscribe(ae(e,p,function(){f=!0,h()})),function(){}}function Ku(t,e,n){return n===void 0&&(n=1/0),yt(e)?Ku(function(r,i){return O(function(o,a){return e(r,o,i,a)})(he(t(r,i)))},n):(typeof e=="number"&&(n=e),fe(function(r,i){return u_(r,i,t,n)}))}function l_(t){return t===void 0&&(t=1/0),Ku(hr,t)}function c_(t){return new pt(function(e){he(t()).subscribe(e)})}var f_=["addListener","removeListener"],h_=["addEventListener","removeEventListener"],p_=["on","off"];function Qu(t,e,n,r){if(yt(n)&&(r=n,n=void 0),r)return Qu(t,e,n).pipe(Fp(r));var i=cr(m_(t)?h_.map(function(s){return function(u){return t[s](e,u,n)}}):d_(t)?f_.map(zp(t,e)):g_(t)?p_.map(zp(t,e)):[],2),o=i[0],a=i[1];if(!o&&Zu(t))return Ku(function(s){return Qu(s,e,n)})(he(t));if(!o)throw new TypeError("Invalid event target");return new pt(function(s){var u=function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return s.next(1<l.length?l:l[0])};return o(u),function(){return a(u)}})}function zp(t,e){return function(n){return function(r){return t[n](e,r)}}}function d_(t){return yt(t.addListener)&&yt(t.removeListener)}function g_(t){return yt(t.on)&&yt(t.off)}function m_(t){return yt(t.addEventListener)&&yt(t.removeEventListener)}function y_(t,e,n){return c_(function(){return t()?e:n})}function Ju(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Xu(t),r=Gx(t,1/0),i=t;return i.length?i.length===1?he(i[0]):l_(r)(Uo(i,n)):$p}function li(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 b_(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 v_(t){return t<=0?function(){return $p}:fe(function(e,n){var r=0;e.subscribe(ae(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function rt(t,e){return e===void 0&&(e=hr),t=t??x_,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 x_(t,e){return t===e}function __(t){return t===void 0&&(t=w_),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 w_(){return new Np}function $_(t,e){var n=arguments.length>=2;return function(r){return r.pipe(hr,v_(1),n?b_(e):__(function(){return new Np}))}}function S_(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new et}: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(l){var c,f,h,p=0,d=!1,g=!1,m=function(){f==null||f.unsubscribe(),f=void 0},b=function(){m(),c=h=void 0,d=g=!1},x=function(){var v=c;b(),v==null||v.unsubscribe()};return fe(function(v,y){p++,!g&&!d&&m();var w=h=h??n();y.add(function(){p--,p===0&&!g&&!d&&(f=tl(x,u))}),w.subscribe(y),!c&&p>0&&(c=new ui({next:function(D){return w.next(D)},error:function(D){g=!0,m(),f=tl(b,i,D),w.error(D)},complete:function(){d=!0,m(),f=tl(b,a),w.complete()}}),he(v).subscribe(c))})(l)}}function tl(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 ui({next:function(){i.unsubscribe(),t()}});return he(e.apply(void 0,si([],cr(n)))).subscribe(i)}}function Pt(t,e,n){var r,i=!1;return r=t,S_({connector:function(){return new Ix(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 l=0,c=o++;he(t(u,c)).subscribe(i=ae(r,function(f){return r.next(e?e(u,f,c,l++):f)},function(){i=null,s()}))},function(){a=!0,s()}))})}function I(t){return fe(function(e,n){he(t).subscribe(ae(n,function(){return n.complete()},Hu)),!n.closed&&e.subscribe(n)})}const pr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function Yo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function A_(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Op(t){let e,n,r;t.length!==2?(e=Yo,n=(s,u)=>Yo(t(s),u),r=(s,u)=>t(s)-u):(e=t===Yo||t===A_?t:M_,n=t,r=t);function i(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const f=l+c>>>1;n(s[f],u)<0?l=f+1:c=f}while(l<c)}return l}function o(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const f=l+c>>>1;n(s[f],u)<=0?l=f+1:c=f}while(l<c)}return l}function a(s,u,l=0,c=s.length){const f=i(s,u,l,c-1);return f>l&&r(s[f-1],u)>-r(s[f],u)?f-1:f}return{left:i,center:a,right:o}}function M_(){return 0}function D_(t){return t===null?NaN:+t}const P_=Op(Yo),Up=P_.right;Op(D_).center;class Bp extends Map{constructor(e,n=C_){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(Yp(this,e))}has(e){return super.has(Yp(this,e))}set(e,n){return super.set(T_(this,e),n)}delete(e){return super.delete(L_(this,e))}}function Yp({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function T_({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function L_({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function C_(t){return t!==null&&typeof t=="object"?t.valueOf():t}const E_=Math.sqrt(50),R_=Math.sqrt(10),k_=Math.sqrt(2);function Ho(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>=E_?10:o>=R_?5:o>=k_?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(t*l),u=Math.round(e*l),s/l<t&&++s,u/l>e&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(t/l),u=Math.round(e/l),s*l<t&&++s,u*l>e&&--u),u<s&&.5<=n&&n<2?Ho(t,e,n*2):[s,u,l]}function I_(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?Ho(e,t,n):Ho(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let l=0;l<s;++l)u[l]=(o-l)/-a;else for(let l=0;l<s;++l)u[l]=(o-l)*a;else if(a<0)for(let l=0;l<s;++l)u[l]=(i+l)/-a;else for(let l=0;l<s;++l)u[l]=(i+l)*a;return u}function el(t,e,n){return e=+e,t=+t,n=+n,Ho(t,e,n)[2]}function N_(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?el(e,t,n):el(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function F_(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 G_={value:()=>{}};function Hp(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Wo(n)}function Wo(t){this._=t}function z_(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Wo.prototype=Hp.prototype={constructor:Wo,on:function(t,e){var n=this._,r=z_(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=O_(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]=Wp(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Wp(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Wo(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function O_(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Wp(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=G_,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var nl="http://www.w3.org/1999/xhtml";const Vp={svg:"http://www.w3.org/2000/svg",xhtml:nl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Vo(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Vp.hasOwnProperty(e)?{space:Vp[e],local:t}:t}function U_(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===nl&&e.documentElement.namespaceURI===nl?e.createElement(t):e.createElementNS(n,t)}}function B_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function jp(t){var e=Vo(t);return(e.local?B_:U_)(e)}function Y_(){}function rl(t){return t==null?Y_:function(){return this.querySelector(t)}}function H_(t){typeof t!="function"&&(t=rl(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,l,c=0;c<a;++c)(u=o[c])&&(l=t.call(u,u.__data__,c,o))&&("__data__"in u&&(l.__data__=u.__data__),s[c]=l);return new _e(r,this._parents)}function W_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function V_(){return[]}function qp(t){return t==null?V_:function(){return this.querySelectorAll(t)}}function j_(t){return function(){return W_(t.apply(this,arguments))}}function q_(t){typeof t=="function"?t=j_(t):t=qp(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,l=0;l<s;++l)(u=a[l])&&(r.push(t.call(u,u.__data__,l,a)),i.push(u));return new _e(r,i)}function Xp(t){return function(){return this.matches(t)}}function Zp(t){return function(e){return e.matches(t)}}var X_=Array.prototype.find;function Z_(t){return function(){return X_.call(this.children,t)}}function K_(){return this.firstElementChild}function Q_(t){return this.select(t==null?K_:Z_(typeof t=="function"?t:Zp(t)))}var J_=Array.prototype.filter;function tw(){return Array.from(this.children)}function ew(t){return function(){return J_.call(this.children,t)}}function nw(t){return this.selectAll(t==null?tw:ew(typeof t=="function"?t:Zp(t)))}function rw(t){typeof t!="function"&&(t=Xp(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,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new _e(r,this._parents)}function Kp(t){return new Array(t.length)}function iw(){return new _e(this._enter||this._groups.map(Kp),this._parents)}function jo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}jo.prototype={constructor:jo,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 ow(t){return function(){return t}}function aw(t,e,n,r,i,o){for(var a=0,s,u=e.length,l=o.length;a<l;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new jo(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function sw(t,e,n,r,i,o,a){var s,u,l=new Map,c=e.length,f=o.length,h=new Array(c),p;for(s=0;s<c;++s)(u=e[s])&&(h[s]=p=a.call(u,u.__data__,s,e)+"",l.has(p)?i[s]=u:l.set(p,u));for(s=0;s<f;++s)p=a.call(t,o[s],s,o)+"",(u=l.get(p))?(r[s]=u,u.__data__=o[s],l.delete(p)):n[s]=new jo(t,o[s]);for(s=0;s<c;++s)(u=e[s])&&l.get(h[s])===u&&(i[s]=u)}function uw(t){return t.__data__}function lw(t,e){if(!arguments.length)return Array.from(this,uw);var n=e?sw:aw,r=this._parents,i=this._groups;typeof t!="function"&&(t=ow(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],f=i[l],h=f.length,p=cw(t.call(c,c&&c.__data__,l,r)),d=p.length,g=s[l]=new Array(d),m=a[l]=new Array(d),b=u[l]=new Array(h);n(c,f,g,m,b,p,e);for(var x=0,v=0,y,w;x<d;++x)if(y=g[x]){for(x>=v&&(v=x+1);!(w=m[v])&&++v<d;);y._next=w||null}}return a=new _e(a,r),a._enter=s,a._exit=u,a}function cw(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function fw(){return new _e(this._exit||this._groups.map(Kp),this._parents)}function hw(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 l=n[u],c=r[u],f=l.length,h=s[u]=new Array(f),p,d=0;d<f;++d)(p=l[d]||c[d])&&(h[d]=p);for(;u<i;++u)s[u]=n[u];return new _e(s,this._parents)}function dw(){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 gw(t){t||(t=mw);function e(f,h){return f&&h?t(f.__data__,h.__data__):!f-!h}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),l,c=0;c<s;++c)(l=a[c])&&(u[c]=l);u.sort(e)}return new _e(i,this._parents).order()}function mw(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function yw(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function bw(){return Array.from(this)}function vw(){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 xw(){let t=0;for(const e of this)++t;return t}function _w(){return!this.node()}function ww(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 $w(t){return function(){this.removeAttribute(t)}}function Sw(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Aw(t,e){return function(){this.setAttribute(t,e)}}function Mw(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Dw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Pw(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 Tw(t,e){var n=Vo(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?Sw:$w:typeof e=="function"?n.local?Pw:Dw:n.local?Mw:Aw)(n,e))}function Qp(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Lw(t){return function(){this.style.removeProperty(t)}}function Cw(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ew(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Rw(t,e,n){return arguments.length>1?this.each((e==null?Lw:typeof e=="function"?Ew:Cw)(t,e,n??"")):dr(this.node(),t)}function dr(t,e){return t.style.getPropertyValue(e)||Qp(t).getComputedStyle(t,null).getPropertyValue(e)}function kw(t){return function(){delete this[t]}}function Iw(t,e){return function(){this[t]=e}}function Nw(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Fw(t,e){return arguments.length>1?this.each((e==null?kw:typeof e=="function"?Nw:Iw)(t,e)):this.node()[t]}function Jp(t){return t.trim().split(/^|\s+/)}function il(t){return t.classList||new td(t)}function td(t){this._node=t,this._names=Jp(t.getAttribute("class")||"")}td.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 ed(t,e){for(var n=il(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function nd(t,e){for(var n=il(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Gw(t){return function(){ed(this,t)}}function zw(t){return function(){nd(this,t)}}function Ow(t,e){return function(){(e.apply(this,arguments)?ed:nd)(this,t)}}function Uw(t,e){var n=Jp(t+"");if(arguments.length<2){for(var r=il(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Ow:e?Gw:zw)(n,e))}function Bw(){this.textContent=""}function Yw(t){return function(){this.textContent=t}}function Hw(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Ww(t){return arguments.length?this.each(t==null?Bw:(typeof t=="function"?Hw:Yw)(t)):this.node().textContent}function Vw(){this.innerHTML=""}function jw(t){return function(){this.innerHTML=t}}function qw(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Xw(t){return arguments.length?this.each(t==null?Vw:(typeof t=="function"?qw:jw)(t)):this.node().innerHTML}function Zw(){this.nextSibling&&this.parentNode.appendChild(this)}function Kw(){return this.each(Zw)}function Qw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Jw(){return this.each(Qw)}function t$(t){var e=typeof t=="function"?t:jp(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function e$(){return null}function n$(t,e){var n=typeof t=="function"?t:jp(t),r=e==null?e$:typeof e=="function"?e:rl(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function r$(){var t=this.parentNode;t&&t.removeChild(this)}function i$(){return this.each(r$)}function o$(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function a$(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function s$(t){return this.select(t?a$:o$)}function u$(t){return arguments.length?this.property("__data__",t):this.node().__data__}function l$(t){return function(e){t.call(this,e,this.__data__)}}function c$(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 f$(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 h$(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=c$(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,l=s.length,c;u<l;++u)for(i=0,c=s[u];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=e?h$:f$,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function rd(t,e,n){var r=Qp(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 d$(t,e){return function(){return rd(this,t,e)}}function g$(t,e){return function(){return rd(this,t,e.apply(this,arguments))}}function m$(t,e){return this.each((typeof e=="function"?g$:d$)(t,e))}function*y$(){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 b$=[null];function _e(t,e){this._groups=t,this._parents=e}function ci(){return new _e([[document.documentElement]],b$)}function v$(){return this}_e.prototype=ci.prototype={constructor:_e,select:H_,selectAll:q_,selectChild:Q_,selectChildren:nw,filter:rw,data:lw,enter:iw,exit:fw,join:hw,merge:pw,selection:v$,order:dw,sort:gw,call:yw,nodes:bw,node:vw,size:xw,empty:_w,each:ww,attr:Tw,style:Rw,property:Fw,classed:Uw,text:Ww,html:Xw,raise:Kw,lower:Jw,append:t$,insert:n$,remove:i$,clone:s$,datum:u$,on:p$,dispatch:m$,[Symbol.iterator]:y$};function ol(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function id(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function fi(){}var hi=.7,qo=1/hi,gr="\\s*([+-]?\\d+)\\s*",pi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ee="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",x$=/^#([0-9a-f]{3,8})$/,_$=new RegExp(`^rgb\\(${gr},${gr},${gr}\\)$`),w$=new RegExp(`^rgb\\(${Ee},${Ee},${Ee}\\)$`),$$=new RegExp(`^rgba\\(${gr},${gr},${gr},${pi}\\)$`),S$=new RegExp(`^rgba\\(${Ee},${Ee},${Ee},${pi}\\)$`),A$=new RegExp(`^hsl\\(${pi},${Ee},${Ee}\\)$`),M$=new RegExp(`^hsla\\(${pi},${Ee},${Ee},${pi}\\)$`),od={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};ol(fi,Dn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ad,formatHex:ad,formatHex8:D$,formatHsl:P$,formatRgb:sd,toString:sd});function ad(){return this.rgb().formatHex()}function D$(){return this.rgb().formatHex8()}function P$(){return hd(this).formatHsl()}function sd(){return this.rgb().formatRgb()}function Dn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=x$.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?ud(e):n===3?new ne(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=_$.exec(t))?new ne(e[1],e[2],e[3],1):(e=w$.exec(t))?new ne(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=$$.exec(t))?Xo(e[1],e[2],e[3],e[4]):(e=S$.exec(t))?Xo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=A$.exec(t))?fd(e[1],e[2]/100,e[3]/100,1):(e=M$.exec(t))?fd(e[1],e[2]/100,e[3]/100,e[4]):od.hasOwnProperty(t)?ud(od[t]):t==="transparent"?new ne(NaN,NaN,NaN,0):null}function ud(t){return new ne(t>>16&255,t>>8&255,t&255,1)}function Xo(t,e,n,r){return r<=0&&(t=e=n=NaN),new ne(t,e,n,r)}function T$(t){return t instanceof fi||(t=Dn(t)),t?(t=t.rgb(),new ne(t.r,t.g,t.b,t.opacity)):new ne}function al(t,e,n,r){return arguments.length===1?T$(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}ol(ne,al,id(fi,{brighter(t){return t=t==null?qo:Math.pow(qo,t),new ne(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?hi:Math.pow(hi,t),new ne(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ne(Pn(this.r),Pn(this.g),Pn(this.b),Zo(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:ld,formatHex:ld,formatHex8:L$,formatRgb:cd,toString:cd}));function ld(){return`#${Tn(this.r)}${Tn(this.g)}${Tn(this.b)}`}function L$(){return`#${Tn(this.r)}${Tn(this.g)}${Tn(this.b)}${Tn((isNaN(this.opacity)?1:this.opacity)*255)}`}function cd(){const t=Zo(this.opacity);return`${t===1?"rgb(":"rgba("}${Pn(this.r)}, ${Pn(this.g)}, ${Pn(this.b)}${t===1?")":`, ${t})`}`}function Zo(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 Tn(t){return t=Pn(t),(t<16?"0":"")+t.toString(16)}function fd(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new we(t,e,n,r)}function hd(t){if(t instanceof we)return new we(t.h,t.s,t.l,t.opacity);if(t instanceof fi||(t=Dn(t)),!t)return new we;if(t instanceof we)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 we(a,s,u,t.opacity)}function C$(t,e,n,r){return arguments.length===1?hd(t):new we(t,e,n,r??1)}function we(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}ol(we,C$,id(fi,{brighter(t){return t=t==null?qo:Math.pow(qo,t),new we(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?hi:Math.pow(hi,t),new we(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(sl(t>=240?t-240:t+120,i,r),sl(t,i,r),sl(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new we(pd(this.h),Ko(this.s),Ko(this.l),Zo(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=Zo(this.opacity);return`${t===1?"hsl(":"hsla("}${pd(this.h)}, ${Ko(this.s)*100}%, ${Ko(this.l)*100}%${t===1?")":`, ${t})`}`}}));function pd(t){return t=(t||0)%360,t<0?t+360:t}function Ko(t){return Math.max(0,Math.min(1,t||0))}function sl(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 ul=t=>()=>t;function E$(t,e){return function(n){return t+n*e}}function R$(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 k$(t){return(t=+t)==1?dd:function(e,n){return n-e?R$(e,n,t):ul(isNaN(e)?n:e)}}function dd(t,e){var n=e-t;return n?E$(t,n):ul(isNaN(t)?e:t)}const Qo=function t(e){var n=k$(e);function r(i,o){var a=n((i=al(i)).r,(o=al(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=dd(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return r.gamma=t,r}(1);function I$(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 N$(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function F$(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]=fl(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 G$(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 z$(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]=fl(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var ll=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,cl=new RegExp(ll.source,"g");function O$(t){return function(){return t}}function U$(t){return function(e){return t(e)+""}}function gd(t,e){var n=ll.lastIndex=cl.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=ll.exec(t))&&(i=cl.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=cl.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?U$(u[0].x):O$(e):(e=u.length,function(l){for(var c=0,f;c<e;++c)s[(f=u[c]).i]=f.x(l);return s.join("")})}function fl(t,e){var n=typeof e,r;return e==null||n==="boolean"?ul(e):(n==="number"?$e:n==="string"?(r=Dn(e))?(e=r,Qo):gd:e instanceof Dn?Qo:e instanceof Date?G$:N$(e)?I$:Array.isArray(e)?F$:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?z$:$e)(t,e)}function B$(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var md=180/Math.PI,yd={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function bd(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)*md,skewX:Math.atan(u)*md,scaleX:a,scaleY:s}}var Jo;function Y$(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?yd:bd(e.a,e.b,e.c,e.d,e.e,e.f)}function H$(t){return t==null||(Jo||(Jo=document.createElementNS("http://www.w3.org/2000/svg","g")),Jo.setAttribute("transform",t),!(t=Jo.transform.baseVal.consolidate()))?yd:(t=t.matrix,bd(t.a,t.b,t.c,t.d,t.e,t.f))}function vd(t,e,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,c,f,h,p,d){if(l!==f||c!==h){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:$e(l,f)},{i:g-2,x:$e(c,h)})}else(f||h)&&p.push("translate("+f+e+h+n)}function a(l,c,f,h){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:$e(l,c)})):c&&f.push(i(f)+"rotate("+c+r)}function s(l,c,f,h){l!==c?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:$e(l,c)}):c&&f.push(i(f)+"skewX("+c+r)}function u(l,c,f,h,p,d){if(l!==f||c!==h){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:$e(l,f)},{i:g-2,x:$e(c,h)})}else(f!==1||h!==1)&&p.push(i(p)+"scale("+f+","+h+")")}return function(l,c){var f=[],h=[];return l=t(l),c=t(c),o(l.translateX,l.translateY,c.translateX,c.translateY,f,h),a(l.rotate,c.rotate,f,h),s(l.skewX,c.skewX,f,h),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,f,h),l=c=null,function(p){for(var d=-1,g=h.length,m;++d<g;)f[(m=h[d]).i]=m.x(p);return f.join("")}}}var W$=vd(Y$,"px, ","px)","deg)"),V$=vd(H$,", ",")",")"),mr=0,di=0,gi=0,xd=1e3,ta,mi,ea=0,Ln=0,na=0,yi=typeof performance=="object"&&performance.now?performance:Date,_d=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function hl(){return Ln||(_d(j$),Ln=yi.now()+na)}function j$(){Ln=0}function ra(){this._call=this._time=this._next=null}ra.prototype=wd.prototype={constructor:ra,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?hl():+n)+(e==null?0:+e),!this._next&&mi!==this&&(mi?mi._next=this:ta=this,mi=this),this._call=t,this._time=n,pl()},stop:function(){this._call&&(this._call=null,this._time=1/0,pl())}};function wd(t,e,n){var r=new ra;return r.restart(t,e,n),r}function q$(){hl(),++mr;for(var t=ta,e;t;)(e=Ln-t._time)>=0&&t._call.call(void 0,e),t=t._next;--mr}function $d(){Ln=(ea=yi.now())+na,mr=di=0;try{q$()}finally{mr=0,Z$(),Ln=0}}function X$(){var t=yi.now(),e=t-ea;e>xd&&(na-=e,ea=t)}function Z$(){for(var t,e=ta,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:ta=n);mi=t,pl(r)}function pl(t){if(!mr){di&&(di=clearTimeout(di));var e=t-Ln;e>24?(t<1/0&&(di=setTimeout($d,t-yi.now()-na)),gi&&(gi=clearInterval(gi))):(gi||(ea=yi.now(),gi=setInterval(X$,xd)),mr=1,_d($d))}}function Sd(t,e,n){var r=new ra;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var K$=Hp("start","end","cancel","interrupt"),Q$=[],Ad=0,Md=1,dl=2,ia=3,Dd=4,gl=5,oa=6;function aa(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;J$(t,n,{name:e,index:r,group:i,on:K$,tween:Q$,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Ad})}function ml(t,e){var n=Se(t,e);if(n.state>Ad)throw new Error("too late; already scheduled");return n}function Re(t,e){var n=Se(t,e);if(n.state>ia)throw new Error("too late; already running");return n}function Se(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function J$(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=wd(o,0,n.time);function o(l){n.state=Md,n.timer.restart(a,n.delay,n.time),n.delay<=l&&a(l-n.delay)}function a(l){var c,f,h,p;if(n.state!==Md)return u();for(c in r)if(p=r[c],p.name===n.name){if(p.state===ia)return Sd(a);p.state===Dd?(p.state=oa,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[c]):+c<e&&(p.state=oa,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[c])}if(Sd(function(){n.state===ia&&(n.state=Dd,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=dl,n.on.call("start",t,t.__data__,n.index,n.group),n.state===dl){for(n.state=ia,i=new Array(h=n.tween.length),c=0,f=-1;c<h;++c)(p=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++f]=p);i.length=f+1}}function s(l){for(var c=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(u),n.state=gl,1),f=-1,h=i.length;++f<h;)i[f].call(t,c);n.state===gl&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=oa,n.timer.stop(),delete r[e];for(var l in r)return;delete t.__transition}}function tS(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>dl&&r.state<gl,r.state=oa,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function eS(t){return this.each(function(){tS(this,t)})}function nS(t,e){var n,r;return function(){var i=Re(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 rS(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Re(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function iS(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Se(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?nS:rS)(n,t,e))}function yl(t,e,n){var r=t._id;return t.each(function(){var i=Re(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Se(i,r).value[e]}}function Pd(t,e){var n;return(typeof e=="number"?$e:e instanceof Dn?Qo:(n=Dn(e))?(e=n,Qo):gd)(t,e)}function oS(t){return function(){this.removeAttribute(t)}}function aS(t){return function(){this.removeAttributeNS(t.space,t.local)}}function sS(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 uS(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 cS(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 fS(t,e){var n=Vo(t),r=n==="transform"?V$:Pd;return this.attrTween(t,typeof e=="function"?(n.local?cS:lS)(n,r,yl(this,"attr."+t,e)):e==null?(n.local?aS:oS)(n):(n.local?uS:sS)(n,r,e))}function hS(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 dS(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 gS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&hS(t,o)),n}return i._value=e,i}function mS(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=Vo(t);return this.tween(n,(r.local?dS:gS)(r,e))}function yS(t,e){return function(){ml(this,t).delay=+e.apply(this,arguments)}}function bS(t,e){return e=+e,function(){ml(this,t).delay=e}}function vS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?yS:bS)(e,t)):Se(this.node(),e).delay}function xS(t,e){return function(){Re(this,t).duration=+e.apply(this,arguments)}}function _S(t,e){return e=+e,function(){Re(this,t).duration=e}}function wS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?xS:_S)(e,t)):Se(this.node(),e).duration}function $S(t,e){if(typeof e!="function")throw new Error;return function(){Re(this,t).ease=e}}function SS(t){var e=this._id;return arguments.length?this.each($S(e,t)):Se(this.node(),e).ease}function AS(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Re(this,t).ease=n}}function MS(t){if(typeof t!="function")throw new Error;return this.each(AS(this._id,t))}function DS(t){typeof t!="function"&&(t=Xp(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,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new Ve(r,this._parents,this._name,this._id)}function PS(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],l=n[s],c=u.length,f=a[s]=new Array(c),h,p=0;p<c;++p)(h=u[p]||l[p])&&(f[p]=h);for(;s<r;++s)a[s]=e[s];return new Ve(a,this._parents,this._name,this._id)}function TS(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 LS(t,e,n){var r,i,o=TS(e)?ml:Re;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function CS(t,e){var n=this._id;return arguments.length<2?Se(this.node(),n).on.on(t):this.each(LS(n,t,e))}function ES(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function RS(){return this.on("end.remove",ES(this._id))}function kS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=rl(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,l=o[a]=new Array(u),c,f,h=0;h<u;++h)(c=s[h])&&(f=t.call(c,c.__data__,h,s))&&("__data__"in c&&(f.__data__=c.__data__),l[h]=f,aa(l[h],e,n,h,l,Se(c,n)));return new Ve(o,this._parents,e,n)}function IS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=qp(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],l=u.length,c,f=0;f<l;++f)if(c=u[f]){for(var h=t.call(c,c.__data__,f,u),p,d=Se(c,n),g=0,m=h.length;g<m;++g)(p=h[g])&&aa(p,e,n,g,h,d);o.push(h),a.push(c)}return new Ve(o,a,e,n)}var NS=ci.prototype.constructor;function FS(){return new NS(this._groups,this._parents)}function GS(t,e){var n,r,i;return function(){var o=dr(this,t),a=(this.style.removeProperty(t),dr(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function Td(t){return function(){this.style.removeProperty(t)}}function zS(t,e,n){var r,i=n+"",o;return function(){var a=dr(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function OS(t,e,n){var r,i,o;return function(){var a=dr(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),dr(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function US(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Re(this,t),l=u.on,c=u.value[o]==null?s||(s=Td(e)):void 0;(l!==n||i!==c)&&(r=(n=l).copy()).on(a,i=c),u.on=r}}function BS(t,e,n){var r=(t+="")=="transform"?W$:Pd;return e==null?this.styleTween(t,GS(t,r)).on("end.style."+t,Td(t)):typeof e=="function"?this.styleTween(t,OS(t,r,yl(this,"style."+t,e))).each(US(this._id,t)):this.styleTween(t,zS(t,r,e),n).on("end.style."+t,null)}function YS(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function HS(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&YS(t,a,n)),r}return o._value=e,o}function WS(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,HS(t,e,n??""))}function VS(t){return function(){this.textContent=t}}function jS(t){return function(){var e=t(this);this.textContent=e??""}}function qS(t){return this.tween("text",typeof t=="function"?jS(yl(this,"text",t)):VS(t==null?"":t+""))}function XS(t){return function(e){this.textContent=t.call(this,e)}}function ZS(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&XS(i)),e}return r._value=t,r}function KS(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,ZS(t))}function QS(){for(var t=this._name,e=this._id,n=Ld(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,l=0;l<s;++l)if(u=a[l]){var c=Se(u,e);aa(u,t,n,l,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ve(r,this._parents,t,n)}function JS(){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 l=Re(this,r),c=l.on;c!==t&&(e=(t=c).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),l.on=e}),i===0&&o()})}var tA=0;function Ve(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ld(){return++tA}var je=ci.prototype;Ve.prototype={constructor:Ve,select:kS,selectAll:IS,selectChild:je.selectChild,selectChildren:je.selectChildren,filter:DS,merge:PS,selection:FS,transition:QS,call:je.call,nodes:je.nodes,node:je.node,size:je.size,empty:je.empty,each:je.each,on:CS,attr:fS,attrTween:mS,style:BS,styleTween:WS,text:qS,textTween:KS,remove:RS,tween:iS,delay:vS,duration:wS,ease:SS,easeVarying:MS,end:JS,[Symbol.iterator]:je[Symbol.iterator]};function eA(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var nA={time:null,delay:0,duration:250,ease:eA};function rA(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 iA(t){var e,n;t instanceof Ve?(e=t._id,t=t._name):(e=Ld(),(n=nA).time=hl(),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,l=0;l<s;++l)(u=a[l])&&aa(u,t,e,l,a,n||rA(u,e));return new Ve(r,this._parents,t,e)}ci.prototype.interrupt=eS,ci.prototype.transition=iA;function oA(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function sa(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=sa(Math.abs(t)),t?t[1]:NaN}function aA(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 sA(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var uA=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ua(t){if(!(e=uA.exec(t)))throw new Error("invalid format: "+t);var e;return new bl({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]})}ua.prototype=bl.prototype;function bl(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+""}bl.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 lA(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 Cd;function cA(t,e){var n=sa(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Cd=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")+sa(t,Math.max(0,e+o-1))[0]}function Ed(t,e){var n=sa(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 Rd={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:oA,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)=>Ed(t*100,e),r:Ed,s:cA,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function kd(t){return t}var Id=Array.prototype.map,Nd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function fA(t){var e=t.grouping===void 0||t.thousands===void 0?kd:aA(Id.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?kd:sA(Id.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 l(f){f=ua(f);var h=f.fill,p=f.align,d=f.sign,g=f.symbol,m=f.zero,b=f.width,x=f.comma,v=f.precision,y=f.trim,w=f.type;w==="n"?(x=!0,w="g"):Rd[w]||(v===void 0&&(v=12),y=!0,w="g"),(m||h==="0"&&p==="=")&&(m=!0,h="0",p="=");var D=g==="$"?n:g==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",P=g==="$"?r:/[%p]/.test(w)?a:"",S=Rd[w],_=/[defgprs%]/.test(w);v=v===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function T($){var N=D,R=P,A,L,M;if(w==="c")R=S($)+R,$="";else{$=+$;var z=$<0||1/$<0;if($=isNaN($)?u:S(Math.abs($),v),y&&($=lA($)),z&&+$==0&&d!=="+"&&(z=!1),N=(z?d==="("?d:s:d==="-"||d==="("?"":d)+N,R=(w==="s"?Nd[8+Cd/3]:"")+R+(z&&d==="("?")":""),_){for(A=-1,L=$.length;++A<L;)if(M=$.charCodeAt(A),48>M||M>57){R=(M===46?i+$.slice(A+1):$.slice(A))+R,$=$.slice(0,A);break}}}x&&!m&&($=e($,1/0));var U=N.length+$.length+R.length,C=U<b?new Array(b-U+1).join(h):"";switch(x&&m&&($=e(C+$,C.length?b-R.length:1/0),C=""),p){case"<":$=N+$+R+C;break;case"=":$=N+C+$+R;break;case"^":$=C.slice(0,U=C.length>>1)+N+$+R+C.slice(U);break;default:$=C+N+$+R;break}return o($)}return T.toString=function(){return f+""},T}function c(f,h){var p=l((f=ua(f),f.type="f",f)),d=Math.max(-8,Math.min(8,Math.floor(yr(h)/3)))*3,g=Math.pow(10,-d),m=Nd[8+d/3];return function(b){return p(g*b)+m}}return{format:l,formatPrefix:c}}var la,Fd,Gd;hA({thousands:",",grouping:[3],currency:["$",""]});function hA(t){return la=fA(t),Fd=la.format,Gd=la.formatPrefix,la}function pA(t){return Math.max(0,-yr(Math.abs(t)))}function dA(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(yr(e)/3)))*3-yr(Math.abs(t)))}function gA(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,yr(e)-yr(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 zd=Symbol("implicit");function Od(){var t=new Bp,e=[],n=[],r=zd;function i(o){let a=t.get(o);if(a===void 0){if(r!==zd)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 Bp;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 Od(e,n).unknown(r)},ca.apply(i,arguments),i}function Ud(){var t=Od().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,l=0,c=.5;delete t.unknown;function f(){var h=e().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,h-u+l*2),s&&(o=Math.floor(o)),d+=(g-d-o*(h-u))*c,a=o*(1-u),s&&(d=Math.round(d),a=Math.round(a));var m=F_(h).map(function(b){return d+o*b});return n(p?m.reverse():m)}return t.domain=function(h){return arguments.length?(e(h),f()):e()},t.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,f()):[r,i]},t.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,s=!0,f()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(h){return arguments.length?(s=!!h,f()):s},t.padding=function(h){return arguments.length?(u=Math.min(1,l=+h),f()):u},t.paddingInner=function(h){return arguments.length?(u=Math.min(1,h),f()):u},t.paddingOuter=function(h){return arguments.length?(l=+h,f()):l},t.align=function(h){return arguments.length?(c=Math.max(0,Math.min(1,h)),f()):c},t.copy=function(){return Ud(e(),[r,i]).round(s).paddingInner(u).paddingOuter(l).align(c)},ca.apply(f(),arguments)}function Bd(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Bd(e())},t}function mA(){return Bd(Ud.apply(null,arguments).paddingInner(1))}function yA(t){return function(){return t}}function bA(t){return+t}var Yd=[0,1];function br(t){return t}function vl(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:yA(isNaN(e)?NaN:.5)}function vA(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function xA(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=vl(i,r),o=n(a,o)):(r=vl(r,i),o=n(o,a)),function(s){return o(r(s))}}function _A(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]=vl(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=Up(t,s,1,r)-1;return o[u](i[u](s))}}function wA(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function $A(){var t=Yd,e=Yd,n=fl,r,i,o,a=br,s,u,l;function c(){var h=Math.min(t.length,e.length);return a!==br&&(a=vA(t[0],t[h-1])),s=h>2?_A:xA,u=l=null,f}function f(h){return h==null||isNaN(h=+h)?o:(u||(u=s(t.map(r),e,n)))(r(a(h)))}return f.invert=function(h){return a(i((l||(l=s(e,t.map(r),$e)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,bA),c()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),c()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=B$,c()},f.clamp=function(h){return arguments.length?(a=h?!0:br,c()):a!==br},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,p){return r=h,i=p,c()}}function SA(){return $A()(br,br)}function AA(t,e,n,r){var i=N_(t,e,n),o;switch(r=ua(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=dA(i,a))&&(r.precision=o),Gd(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=gA(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=pA(i))&&(r.precision=o-(r.type==="%")*2);break}}return Fd(r)}function Hd(t){var e=t.domain;return t.ticks=function(n){var r=e();return I_(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return AA(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,l,c=10;for(s<a&&(l=a,a=s,s=l,l=i,i=o,o=l);c-- >0;){if(l=el(a,s,n),l===u)return r[i]=a,r[o]=s,e(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;u=l}return t},t}function Wd(){var t=SA();return t.copy=function(){return wA(t,Wd())},ca.apply(t,arguments),Hd(t)}function Vd(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[Up(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 l=i.indexOf(u);return l<0?[NaN,NaN]:l<1?[t,r[0]]:l>=n?[r[n-1],e]:[r[l-1],r[l]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Vd().domain([t,e]).range(i).unknown(o)},ca.apply(Hd(a),arguments)}function bi(t,e,n){this.k=t,this.x=e,this.y=n}bi.prototype={constructor:bi,scale:function(t){return t===1?this:new bi(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new bi(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+")"}},bi.prototype;function fa(t){return Object.prototype.toString.call(t)==="[object Object]"}function xl(t,e){if(fa(t)===!1||fa(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;fa(r[a])&&fa(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}var _l=function(t,e){return _l=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])},_l(t,e)};function ke(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");_l(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function MA(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(c){try{l(r.next(c))}catch(f){a(f)}}function u(c){try{l(r.throw(c))}catch(f){a(f)}}function l(c){c.done?o(c.value):i(c.value).then(s,u)}l((r=r.apply(t,[])).next())})}function jd(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(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function vr(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 vi(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 xi(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 xr(t){return this instanceof xr?(this.v=t,this):new xr(t)}function DA(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,f)}}function s(p,d){r[p]&&(i[p]=function(g){return new Promise(function(m,b){o.push([p,g,m,b])>1||u(p,g)})},d&&(i[p]=d(i[p])))}function u(p,d){try{l(r[p](d))}catch(g){h(o[0][3],g)}}function l(p){p.value instanceof xr?Promise.resolve(p.value.v).then(c,f):h(o[0][2],p)}function c(p){u("next",p)}function f(p){u("throw",p)}function h(p,d){p(d),o.shift(),o.length&&u(o[0][0],o[0][1])}}function PA(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 vr=="function"?vr(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(l){o({value:l,done:s})},a)}}function Ft(t){return typeof t=="function"}function wl(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 $l=wl(function(t){return function(e){t(this),this.message=e?e.length+` errors occurred during unsubscription:
3
+ `):"",this.name="UnsubscriptionError",this.errors=n}});function Bu(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var zo=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 l=u.value;l.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 c=this.initialTeardown;if(yt(c))try{c()}catch(g){o=g instanceof Uu?g.errors:[g]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=lr(f),p=h.next();!p.done;p=h.next()){var d=p.value;try{gp(d)}catch(g){o=o??[],g instanceof Uu?o=si(si([],cr(o)),cr(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new Uu(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)gp(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)&&Bu(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Bu(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),pp=zo.EMPTY;function dp(t){return t instanceof zo||t&&"closed"in t&&yt(t.remove)&&yt(t.add)&&yt(t.unsubscribe)}function gp(t){yt(t)?t():t.unsubscribe()}var mp={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},yp={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],cr(n)))},clearTimeout:function(t){var e=yp.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function bp(t){yp.setTimeout(function(){throw t})}function Yu(){}function Oo(t){t()}var Hu=function(t){Mn(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,dp(n)&&n.add(r)):r.destination=w2,r}return e.create=function(n,r,i){return new ui(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}(zo),v2=Function.prototype.bind;function Wu(t,e){return v2.call(t,e)}var x2=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){Uo(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Uo(r)}else Uo(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Uo(n)}},t}(),ui=function(t){Mn(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&&mp.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Wu(n.next,s),error:n.error&&Wu(n.error,s),complete:n.complete&&Wu(n.complete,s)}):a=n}return o.destination=new x2(a),o}return e}(Hu);function Uo(t){bp(t)}function _2(t){throw t}var w2={closed:!0,next:Yu,error:_2,complete:Yu},Vu=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function hr(t){return t}function $2(t){return t.length===0?hr:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var dt=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=A2(e)?e:new ui(e,n,r);return Oo(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=vp(n),new n(function(i,o){var a=new ui({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[Vu]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return $2(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=vp(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 vp(t){var e;return(e=t??mp.Promise)!==null&&e!==void 0?e:Promise}function S2(t){return t&&yt(t.next)&&yt(t.error)&&yt(t.complete)}function A2(t){return t&&t instanceof Hu||S2(t)&&dp(t)}function M2(t){return yt(t==null?void 0:t.lift)}function fe(t){return function(e){if(M2(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 D2(t,e,n,r,i)}var D2=function(t){Mn(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(l){try{r(l)}catch(c){n.error(c)}}:t.prototype._next,u._error=o?function(l){try{o(l)}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(l){n.error(l)}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}(Hu),P2=Ou(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),nt=function(t){Mn(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 xp(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new P2},e.prototype.next=function(n){var r=this;Oo(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(l){i={error:l}}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;Oo(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;Oo(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?pp:(this.currentObservers=null,s.push(n),new zo(function(){r.currentObservers=null,Bu(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 dt;return n.source=this,n},e.create=function(n,r){return new xp(n,r)},e}(dt),xp=function(t){Mn(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:pp},e}(nt),T2=function(t){Mn(e,t);function e(n){var r=t.call(this)||this;return r._value=n,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},e.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,o=n._value;if(r)throw i;return this._throwIfClosed(),o},e.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},e}(nt),_p={now:function(){return(_p.delegate||Date).now()},delegate:void 0},L2=function(t){Mn(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=_p);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(),l=0,c=1;c<o.length&&o[c]<=u;c+=2)l=c;l&&o.splice(0,l+1)}},e}(nt),wp=new dt(function(t){return t.complete()});function C2(t){return t&&yt(t.schedule)}function ju(t){return t[t.length-1]}function E2(t){return yt(ju(t))?t.pop():void 0}function qu(t){return C2(ju(t))?t.pop():void 0}function R2(t,e){return typeof ju(t)=="number"?t.pop():e}var Xu=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function $p(t){return yt(t==null?void 0:t.then)}function Sp(t){return yt(t[Vu])}function Ap(t){return Symbol.asyncIterator&&yt(t==null?void 0:t[Symbol.asyncIterator])}function Mp(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 k2(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Dp=k2();function Pp(t){return yt(t==null?void 0:t[Dp])}function Tp(t){return y2(this,arguments,function(){var n,r,i,o;return hp(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,fr(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,fr(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,fr(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 Lp(t){return yt(t==null?void 0:t.getReader)}function he(t){if(t instanceof dt)return t;if(t!=null){if(Sp(t))return I2(t);if(Xu(t))return N2(t);if($p(t))return F2(t);if(Ap(t))return Cp(t);if(Pp(t))return G2(t);if(Lp(t))return z2(t)}throw Mp(t)}function I2(t){return new dt(function(e){var n=t[Vu]();if(yt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function N2(t){return new dt(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function F2(t){return new dt(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,bp)})}function G2(t){return new dt(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 Cp(t){return new dt(function(e){O2(t,e).catch(function(n){return e.error(n)})})}function z2(t){return Cp(Tp(t))}function O2(t,e){var n,r,i,o;return m2(this,void 0,void 0,function(){var a,s;return hp(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=b2(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 ln(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 Ep(t,e){return e===void 0&&(e=0),fe(function(n,r){n.subscribe(ae(r,function(i){return ln(r,t,function(){return r.next(i)},e)},function(){return ln(r,t,function(){return r.complete()},e)},function(i){return ln(r,t,function(){return r.error(i)},e)}))})}function Rp(t,e){return e===void 0&&(e=0),fe(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function U2(t,e){return he(t).pipe(Rp(e),Ep(e))}function B2(t,e){return he(t).pipe(Rp(e),Ep(e))}function Y2(t,e){return new dt(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function H2(t,e){return new dt(function(n){var r;return ln(n,e,function(){r=t[Dp](),ln(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 kp(t,e){if(!t)throw new Error("Iterable cannot be null");return new dt(function(n){ln(n,e,function(){var r=t[Symbol.asyncIterator]();ln(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function W2(t,e){return kp(Tp(t),e)}function V2(t,e){if(t!=null){if(Sp(t))return U2(t,e);if(Xu(t))return Y2(t,e);if($p(t))return B2(t,e);if(Ap(t))return kp(t,e);if(Pp(t))return H2(t,e);if(Lp(t))return W2(t,e)}throw Mp(t)}function Bo(t,e){return e?V2(t,e):he(t)}function Yo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=qu(t);return Bo(t,n)}var Ip=Ou(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function G(t,e){return fe(function(n,r){var i=0;n.subscribe(ae(r,function(o){r.next(t.call(e,o,i++))}))})}var j2=Array.isArray;function q2(t,e){return j2(e)?t.apply(void 0,si([],cr(e))):t(e)}function Np(t){return G(function(e){return q2(t,e)})}var X2=Array.isArray,Z2=Object.getPrototypeOf,K2=Object.prototype,Q2=Object.keys;function J2(t){if(t.length===1){var e=t[0];if(X2(e))return{args:e,keys:null};if(t_(e)){var n=Q2(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function t_(t){return t&&typeof t=="object"&&Z2(t)===K2}function e_(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function Y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=qu(t),r=E2(t),i=J2(t),o=i.args,a=i.keys;if(o.length===0)return Bo([],n);var s=new dt(n_(o,n,a?function(u){return e_(a,u)}:hr));return r?s.pipe(Np(r)):s}function n_(t,e,n){return n===void 0&&(n=hr),function(r){Fp(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,u=function(c){Fp(e,function(){var f=Bo(t[c],e),h=!1;f.subscribe(ae(r,function(p){o[c]=p,h||(h=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},l=0;l<i;l++)u(l)},r)}}function Fp(t,e,n){t?ln(n,t,e):e()}function r_(t,e,n,r,i,o,a,s){var u=[],l=0,c=0,f=!1,h=function(){f&&!u.length&&!l&&e.complete()},p=function(g){return l<r?d(g):u.push(g)},d=function(g){l++;var m=!1;he(n(g,c++)).subscribe(ae(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{l--;for(var y=function(){var v=u.shift();a||d(v)};u.length&&l<r;)y();h()}catch(v){e.error(v)}}))};return t.subscribe(ae(e,p,function(){f=!0,h()})),function(){}}function Zu(t,e,n){return n===void 0&&(n=1/0),yt(e)?Zu(function(r,i){return G(function(o,a){return e(r,o,i,a)})(he(t(r,i)))},n):(typeof e=="number"&&(n=e),fe(function(r,i){return r_(r,i,t,n)}))}function i_(t){return t===void 0&&(t=1/0),Zu(hr,t)}function o_(t){return new dt(function(e){he(t()).subscribe(e)})}var a_=["addListener","removeListener"],s_=["addEventListener","removeEventListener"],u_=["on","off"];function Ku(t,e,n,r){if(yt(n)&&(r=n,n=void 0),r)return Ku(t,e,n).pipe(Np(r));var i=cr(f_(t)?s_.map(function(s){return function(u){return t[s](e,u,n)}}):l_(t)?a_.map(Gp(t,e)):c_(t)?u_.map(Gp(t,e)):[],2),o=i[0],a=i[1];if(!o&&Xu(t))return Zu(function(s){return Ku(s,e,n)})(he(t));if(!o)throw new TypeError("Invalid event target");return new dt(function(s){var u=function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return s.next(1<l.length?l:l[0])};return o(u),function(){return a(u)}})}function Gp(t,e){return function(n){return function(r){return t[n](e,r)}}}function l_(t){return yt(t.addListener)&&yt(t.removeListener)}function c_(t){return yt(t.on)&&yt(t.off)}function f_(t){return yt(t.addEventListener)&&yt(t.removeEventListener)}function h_(t,e,n){return o_(function(){return t()?e:n})}function Qu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=qu(t),r=R2(t,1/0),i=t;return i.length?i.length===1?he(i[0]):i_(r)(Bo(i,n)):wp}function li(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 p_(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 d_(t){return t<=0?function(){return wp}:fe(function(e,n){var r=0;e.subscribe(ae(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function tt(t,e){return e===void 0&&(e=hr),t=t??g_,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 g_(t,e){return t===e}function m_(t){return t===void 0&&(t=y_),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 y_(){return new Ip}function b_(t,e){var n=arguments.length>=2;return function(r){return r.pipe(hr,d_(1),n?p_(e):m_(function(){return new Ip}))}}function v_(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(l){var c,f,h,p=0,d=!1,g=!1,m=function(){f==null||f.unsubscribe(),f=void 0},y=function(){m(),c=h=void 0,d=g=!1},v=function(){var x=c;y(),x==null||x.unsubscribe()};return fe(function(x,b){p++,!g&&!d&&m();var _=h=h??n();b.add(function(){p--,p===0&&!g&&!d&&(f=Ju(v,u))}),_.subscribe(b),!c&&p>0&&(c=new ui({next:function(M){return _.next(M)},error:function(M){g=!0,m(),f=Ju(y,i,M),_.error(M)},complete:function(){d=!0,m(),f=Ju(y,a),_.complete()}}),he(x).subscribe(c))})(l)}}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 ui({next:function(){i.unsubscribe(),t()}});return he(e.apply(void 0,si([],cr(n)))).subscribe(i)}}function St(t,e,n){var r,i=!1;return r=t,v_({connector:function(){return new L2(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function H(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 l=0,c=o++;he(t(u,c)).subscribe(i=ae(r,function(f){return r.next(e?e(u,f,c,l++):f)},function(){i=null,s()}))},function(){a=!0,s()}))})}function I(t){return fe(function(e,n){he(t).subscribe(ae(n,function(){return n.complete()},Yu)),!n.closed&&e.subscribe(n)})}const pr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function Ho(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function x_(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function zp(t){let e,n,r;t.length!==2?(e=Ho,n=(s,u)=>Ho(t(s),u),r=(s,u)=>t(s)-u):(e=t===Ho||t===x_?t:__,n=t,r=t);function i(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const f=l+c>>>1;n(s[f],u)<0?l=f+1:c=f}while(l<c)}return l}function o(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const f=l+c>>>1;n(s[f],u)<=0?l=f+1:c=f}while(l<c)}return l}function a(s,u,l=0,c=s.length){const f=i(s,u,l,c-1);return f>l&&r(s[f-1],u)>-r(s[f],u)?f-1:f}return{left:i,center:a,right:o}}function __(){return 0}function w_(t){return t===null?NaN:+t}const $_=zp(Ho),Op=$_.right;zp(w_).center;const S_=Math.sqrt(50),A_=Math.sqrt(10),M_=Math.sqrt(2);function Wo(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>=S_?10:o>=A_?5:o>=M_?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(t*l),u=Math.round(e*l),s/l<t&&++s,u/l>e&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(t/l),u=Math.round(e/l),s*l<t&&++s,u*l>e&&--u),u<s&&.5<=n&&n<2?Wo(t,e,n*2):[s,u,l]}function D_(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?Wo(e,t,n):Wo(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let l=0;l<s;++l)u[l]=(o-l)/-a;else for(let l=0;l<s;++l)u[l]=(o-l)*a;else if(a<0)for(let l=0;l<s;++l)u[l]=(i+l)/-a;else for(let l=0;l<s;++l)u[l]=(i+l)*a;return u}function tl(t,e,n){return e=+e,t=+t,n=+n,Wo(t,e,n)[2]}function P_(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?tl(e,t,n):tl(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}var T_={value:()=>{}};function Up(){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 Vo(n)}function Vo(t){this._=t}function L_(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}})}Vo.prototype=Up.prototype={constructor:Vo,on:function(t,e){var n=this._,r=L_(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=C_(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]=Bp(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Bp(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 Vo(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 C_(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Bp(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=T_,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var el="http://www.w3.org/1999/xhtml";const Yp={svg:"http://www.w3.org/2000/svg",xhtml:el,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function jo(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Yp.hasOwnProperty(e)?{space:Yp[e],local:t}:t}function E_(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===el&&e.documentElement.namespaceURI===el?e.createElement(t):e.createElementNS(n,t)}}function R_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Hp(t){var e=jo(t);return(e.local?R_:E_)(e)}function k_(){}function nl(t){return t==null?k_:function(){return this.querySelector(t)}}function I_(t){typeof t!="function"&&(t=nl(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,l,c=0;c<a;++c)(u=o[c])&&(l=t.call(u,u.__data__,c,o))&&("__data__"in u&&(l.__data__=u.__data__),s[c]=l);return new _e(r,this._parents)}function N_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function F_(){return[]}function Wp(t){return t==null?F_:function(){return this.querySelectorAll(t)}}function G_(t){return function(){return N_(t.apply(this,arguments))}}function z_(t){typeof t=="function"?t=G_(t):t=Wp(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,l=0;l<s;++l)(u=a[l])&&(r.push(t.call(u,u.__data__,l,a)),i.push(u));return new _e(r,i)}function Vp(t){return function(){return this.matches(t)}}function jp(t){return function(e){return e.matches(t)}}var O_=Array.prototype.find;function U_(t){return function(){return O_.call(this.children,t)}}function B_(){return this.firstElementChild}function Y_(t){return this.select(t==null?B_:U_(typeof t=="function"?t:jp(t)))}var H_=Array.prototype.filter;function W_(){return Array.from(this.children)}function V_(t){return function(){return H_.call(this.children,t)}}function j_(t){return this.selectAll(t==null?W_:V_(typeof t=="function"?t:jp(t)))}function q_(t){typeof t!="function"&&(t=Vp(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,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new _e(r,this._parents)}function qp(t){return new Array(t.length)}function X_(){return new _e(this._enter||this._groups.map(qp),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 Z_(t){return function(){return t}}function K_(t,e,n,r,i,o){for(var a=0,s,u=e.length,l=o.length;a<l;++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 Q_(t,e,n,r,i,o,a){var s,u,l=new Map,c=e.length,f=o.length,h=new Array(c),p;for(s=0;s<c;++s)(u=e[s])&&(h[s]=p=a.call(u,u.__data__,s,e)+"",l.has(p)?i[s]=u:l.set(p,u));for(s=0;s<f;++s)p=a.call(t,o[s],s,o)+"",(u=l.get(p))?(r[s]=u,u.__data__=o[s],l.delete(p)):n[s]=new qo(t,o[s]);for(s=0;s<c;++s)(u=e[s])&&l.get(h[s])===u&&(i[s]=u)}function J_(t){return t.__data__}function tw(t,e){if(!arguments.length)return Array.from(this,J_);var n=e?Q_:K_,r=this._parents,i=this._groups;typeof t!="function"&&(t=Z_(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],f=i[l],h=f.length,p=ew(t.call(c,c&&c.__data__,l,r)),d=p.length,g=s[l]=new Array(d),m=a[l]=new Array(d),y=u[l]=new Array(h);n(c,f,g,m,y,p,e);for(var v=0,x=0,b,_;v<d;++v)if(b=g[v]){for(v>=x&&(x=v+1);!(_=m[x])&&++x<d;);b._next=_||null}}return a=new _e(a,r),a._enter=s,a._exit=u,a}function ew(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function nw(){return new _e(this._exit||this._groups.map(qp),this._parents)}function rw(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 iw(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 l=n[u],c=r[u],f=l.length,h=s[u]=new Array(f),p,d=0;d<f;++d)(p=l[d]||c[d])&&(h[d]=p);for(;u<i;++u)s[u]=n[u];return new _e(s,this._parents)}function ow(){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 aw(t){t||(t=sw);function e(f,h){return f&&h?t(f.__data__,h.__data__):!f-!h}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),l,c=0;c<s;++c)(l=a[c])&&(u[c]=l);u.sort(e)}return new _e(i,this._parents).order()}function sw(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function uw(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function lw(){return Array.from(this)}function cw(){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 fw(){let t=0;for(const e of this)++t;return t}function hw(){return!this.node()}function pw(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 dw(t){return function(){this.removeAttribute(t)}}function gw(t){return function(){this.removeAttributeNS(t.space,t.local)}}function mw(t,e){return function(){this.setAttribute(t,e)}}function yw(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function bw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function vw(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 xw(t,e){var n=jo(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?gw:dw:typeof e=="function"?n.local?vw:bw:n.local?yw:mw)(n,e))}function Xp(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function _w(t){return function(){this.style.removeProperty(t)}}function ww(t,e,n){return function(){this.style.setProperty(t,e,n)}}function $w(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Sw(t,e,n){return arguments.length>1?this.each((e==null?_w:typeof e=="function"?$w:ww)(t,e,n??"")):dr(this.node(),t)}function dr(t,e){return t.style.getPropertyValue(e)||Xp(t).getComputedStyle(t,null).getPropertyValue(e)}function Aw(t){return function(){delete this[t]}}function Mw(t,e){return function(){this[t]=e}}function Dw(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Pw(t,e){return arguments.length>1?this.each((e==null?Aw:typeof e=="function"?Dw:Mw)(t,e)):this.node()[t]}function Zp(t){return t.trim().split(/^|\s+/)}function rl(t){return t.classList||new Kp(t)}function Kp(t){this._node=t,this._names=Zp(t.getAttribute("class")||"")}Kp.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=rl(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Jp(t,e){for(var n=rl(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Tw(t){return function(){Qp(this,t)}}function Lw(t){return function(){Jp(this,t)}}function Cw(t,e){return function(){(e.apply(this,arguments)?Qp:Jp)(this,t)}}function Ew(t,e){var n=Zp(t+"");if(arguments.length<2){for(var r=rl(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Cw:e?Tw:Lw)(n,e))}function Rw(){this.textContent=""}function kw(t){return function(){this.textContent=t}}function Iw(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Nw(t){return arguments.length?this.each(t==null?Rw:(typeof t=="function"?Iw:kw)(t)):this.node().textContent}function Fw(){this.innerHTML=""}function Gw(t){return function(){this.innerHTML=t}}function zw(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Ow(t){return arguments.length?this.each(t==null?Fw:(typeof t=="function"?zw:Gw)(t)):this.node().innerHTML}function Uw(){this.nextSibling&&this.parentNode.appendChild(this)}function Bw(){return this.each(Uw)}function Yw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Hw(){return this.each(Yw)}function Ww(t){var e=typeof t=="function"?t:Hp(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Vw(){return null}function jw(t,e){var n=typeof t=="function"?t:Hp(t),r=e==null?Vw:typeof e=="function"?e:nl(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function qw(){var t=this.parentNode;t&&t.removeChild(this)}function Xw(){return this.each(qw)}function Zw(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Kw(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Qw(t){return this.select(t?Kw:Zw)}function Jw(t){return arguments.length?this.property("__data__",t):this.node().__data__}function t$(t){return function(e){t.call(this,e,this.__data__)}}function e$(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 n$(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 r$(t,e,n){return function(){var r=this.__on,i,o=t$(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 i$(t,e,n){var r=e$(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,l=s.length,c;u<l;++u)for(i=0,c=s[u];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=e?r$:n$,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function td(t,e,n){var r=Xp(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 o$(t,e){return function(){return td(this,t,e)}}function a$(t,e){return function(){return td(this,t,e.apply(this,arguments))}}function s$(t,e){return this.each((typeof e=="function"?a$:o$)(t,e))}function*u$(){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 l$=[null];function _e(t,e){this._groups=t,this._parents=e}function ci(){return new _e([[document.documentElement]],l$)}function c$(){return this}_e.prototype=ci.prototype={constructor:_e,select:I_,selectAll:z_,selectChild:Y_,selectChildren:j_,filter:q_,data:tw,enter:X_,exit:nw,join:rw,merge:iw,selection:c$,order:ow,sort:aw,call:uw,nodes:lw,node:cw,size:fw,empty:hw,each:pw,attr:xw,style:Sw,property:Pw,classed:Ew,text:Nw,html:Ow,raise:Bw,lower:Hw,append:Ww,insert:jw,remove:Xw,clone:Qw,datum:Jw,on:i$,dispatch:s$,[Symbol.iterator]:u$};function il(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ed(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function fi(){}var hi=.7,Xo=1/hi,gr="\\s*([+-]?\\d+)\\s*",pi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ee="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",f$=/^#([0-9a-f]{3,8})$/,h$=new RegExp(`^rgb\\(${gr},${gr},${gr}\\)$`),p$=new RegExp(`^rgb\\(${Ee},${Ee},${Ee}\\)$`),d$=new RegExp(`^rgba\\(${gr},${gr},${gr},${pi}\\)$`),g$=new RegExp(`^rgba\\(${Ee},${Ee},${Ee},${pi}\\)$`),m$=new RegExp(`^hsl\\(${pi},${Ee},${Ee}\\)$`),y$=new RegExp(`^hsla\\(${pi},${Ee},${Ee},${pi}\\)$`),nd={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};il(fi,Dn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:rd,formatHex:rd,formatHex8:b$,formatHsl:v$,formatRgb:id,toString:id});function rd(){return this.rgb().formatHex()}function b$(){return this.rgb().formatHex8()}function v$(){return ld(this).formatHsl()}function id(){return this.rgb().formatRgb()}function Dn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=f$.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?od(e):n===3?new ne(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Zo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Zo(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=h$.exec(t))?new ne(e[1],e[2],e[3],1):(e=p$.exec(t))?new ne(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=d$.exec(t))?Zo(e[1],e[2],e[3],e[4]):(e=g$.exec(t))?Zo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=m$.exec(t))?ud(e[1],e[2]/100,e[3]/100,1):(e=y$.exec(t))?ud(e[1],e[2]/100,e[3]/100,e[4]):nd.hasOwnProperty(t)?od(nd[t]):t==="transparent"?new ne(NaN,NaN,NaN,0):null}function od(t){return new ne(t>>16&255,t>>8&255,t&255,1)}function Zo(t,e,n,r){return r<=0&&(t=e=n=NaN),new ne(t,e,n,r)}function x$(t){return t instanceof fi||(t=Dn(t)),t?(t=t.rgb(),new ne(t.r,t.g,t.b,t.opacity)):new ne}function ol(t,e,n,r){return arguments.length===1?x$(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}il(ne,ol,ed(fi,{brighter(t){return t=t==null?Xo:Math.pow(Xo,t),new ne(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?hi:Math.pow(hi,t),new ne(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ne(Pn(this.r),Pn(this.g),Pn(this.b),Ko(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:ad,formatHex:ad,formatHex8:_$,formatRgb:sd,toString:sd}));function ad(){return`#${Tn(this.r)}${Tn(this.g)}${Tn(this.b)}`}function _$(){return`#${Tn(this.r)}${Tn(this.g)}${Tn(this.b)}${Tn((isNaN(this.opacity)?1:this.opacity)*255)}`}function sd(){const t=Ko(this.opacity);return`${t===1?"rgb(":"rgba("}${Pn(this.r)}, ${Pn(this.g)}, ${Pn(this.b)}${t===1?")":`, ${t})`}`}function Ko(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 Tn(t){return t=Pn(t),(t<16?"0":"")+t.toString(16)}function ud(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new we(t,e,n,r)}function ld(t){if(t instanceof we)return new we(t.h,t.s,t.l,t.opacity);if(t instanceof fi||(t=Dn(t)),!t)return new we;if(t instanceof we)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 we(a,s,u,t.opacity)}function w$(t,e,n,r){return arguments.length===1?ld(t):new we(t,e,n,r??1)}function we(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}il(we,w$,ed(fi,{brighter(t){return t=t==null?Xo:Math.pow(Xo,t),new we(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?hi:Math.pow(hi,t),new we(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(al(t>=240?t-240:t+120,i,r),al(t,i,r),al(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new we(cd(this.h),Qo(this.s),Qo(this.l),Ko(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=Ko(this.opacity);return`${t===1?"hsl(":"hsla("}${cd(this.h)}, ${Qo(this.s)*100}%, ${Qo(this.l)*100}%${t===1?")":`, ${t})`}`}}));function cd(t){return t=(t||0)%360,t<0?t+360:t}function Qo(t){return Math.max(0,Math.min(1,t||0))}function al(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 sl=t=>()=>t;function $$(t,e){return function(n){return t+n*e}}function S$(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 A$(t){return(t=+t)==1?fd:function(e,n){return n-e?S$(e,n,t):sl(isNaN(e)?n:e)}}function fd(t,e){var n=e-t;return n?$$(t,n):sl(isNaN(t)?e:t)}const Jo=function t(e){var n=A$(e);function r(i,o){var a=n((i=ol(i)).r,(o=ol(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=fd(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return r.gamma=t,r}(1);function M$(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 D$(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function P$(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]=cl(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 T$(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 L$(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]=cl(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var ul=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ll=new RegExp(ul.source,"g");function C$(t){return function(){return t}}function E$(t){return function(e){return t(e)+""}}function hd(t,e){var n=ul.lastIndex=ll.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=ul.exec(t))&&(i=ll.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=ll.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?E$(u[0].x):C$(e):(e=u.length,function(l){for(var c=0,f;c<e;++c)s[(f=u[c]).i]=f.x(l);return s.join("")})}function cl(t,e){var n=typeof e,r;return e==null||n==="boolean"?sl(e):(n==="number"?$e:n==="string"?(r=Dn(e))?(e=r,Jo):hd:e instanceof Dn?Jo:e instanceof Date?T$:D$(e)?M$:Array.isArray(e)?P$:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?L$:$e)(t,e)}function R$(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var pd=180/Math.PI,dd={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function gd(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)*pd,skewX:Math.atan(u)*pd,scaleX:a,scaleY:s}}var ta;function k$(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?dd:gd(e.a,e.b,e.c,e.d,e.e,e.f)}function I$(t){return t==null||(ta||(ta=document.createElementNS("http://www.w3.org/2000/svg","g")),ta.setAttribute("transform",t),!(t=ta.transform.baseVal.consolidate()))?dd:(t=t.matrix,gd(t.a,t.b,t.c,t.d,t.e,t.f))}function md(t,e,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,c,f,h,p,d){if(l!==f||c!==h){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:$e(l,f)},{i:g-2,x:$e(c,h)})}else(f||h)&&p.push("translate("+f+e+h+n)}function a(l,c,f,h){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:$e(l,c)})):c&&f.push(i(f)+"rotate("+c+r)}function s(l,c,f,h){l!==c?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:$e(l,c)}):c&&f.push(i(f)+"skewX("+c+r)}function u(l,c,f,h,p,d){if(l!==f||c!==h){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:$e(l,f)},{i:g-2,x:$e(c,h)})}else(f!==1||h!==1)&&p.push(i(p)+"scale("+f+","+h+")")}return function(l,c){var f=[],h=[];return l=t(l),c=t(c),o(l.translateX,l.translateY,c.translateX,c.translateY,f,h),a(l.rotate,c.rotate,f,h),s(l.skewX,c.skewX,f,h),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,f,h),l=c=null,function(p){for(var d=-1,g=h.length,m;++d<g;)f[(m=h[d]).i]=m.x(p);return f.join("")}}}var N$=md(k$,"px, ","px)","deg)"),F$=md(I$,", ",")",")"),mr=0,di=0,gi=0,yd=1e3,ea,mi,na=0,Ln=0,ra=0,yi=typeof performance=="object"&&performance.now?performance:Date,bd=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function fl(){return Ln||(bd(G$),Ln=yi.now()+ra)}function G$(){Ln=0}function ia(){this._call=this._time=this._next=null}ia.prototype=vd.prototype={constructor:ia,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?fl():+n)+(e==null?0:+e),!this._next&&mi!==this&&(mi?mi._next=this:ea=this,mi=this),this._call=t,this._time=n,hl()},stop:function(){this._call&&(this._call=null,this._time=1/0,hl())}};function vd(t,e,n){var r=new ia;return r.restart(t,e,n),r}function z$(){fl(),++mr;for(var t=ea,e;t;)(e=Ln-t._time)>=0&&t._call.call(void 0,e),t=t._next;--mr}function xd(){Ln=(na=yi.now())+ra,mr=di=0;try{z$()}finally{mr=0,U$(),Ln=0}}function O$(){var t=yi.now(),e=t-na;e>yd&&(ra-=e,na=t)}function U$(){for(var t,e=ea,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:ea=n);mi=t,hl(r)}function hl(t){if(!mr){di&&(di=clearTimeout(di));var e=t-Ln;e>24?(t<1/0&&(di=setTimeout(xd,t-yi.now()-ra)),gi&&(gi=clearInterval(gi))):(gi||(na=yi.now(),gi=setInterval(O$,yd)),mr=1,bd(xd))}}function _d(t,e,n){var r=new ia;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var B$=Up("start","end","cancel","interrupt"),Y$=[],wd=0,$d=1,pl=2,oa=3,Sd=4,dl=5,aa=6;function sa(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;H$(t,n,{name:e,index:r,group:i,on:B$,tween:Y$,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:wd})}function gl(t,e){var n=Se(t,e);if(n.state>wd)throw new Error("too late; already scheduled");return n}function Re(t,e){var n=Se(t,e);if(n.state>oa)throw new Error("too late; already running");return n}function Se(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function H$(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=vd(o,0,n.time);function o(l){n.state=$d,n.timer.restart(a,n.delay,n.time),n.delay<=l&&a(l-n.delay)}function a(l){var c,f,h,p;if(n.state!==$d)return u();for(c in r)if(p=r[c],p.name===n.name){if(p.state===oa)return _d(a);p.state===Sd?(p.state=aa,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[c]):+c<e&&(p.state=aa,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[c])}if(_d(function(){n.state===oa&&(n.state=Sd,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=pl,n.on.call("start",t,t.__data__,n.index,n.group),n.state===pl){for(n.state=oa,i=new Array(h=n.tween.length),c=0,f=-1;c<h;++c)(p=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++f]=p);i.length=f+1}}function s(l){for(var c=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(u),n.state=dl,1),f=-1,h=i.length;++f<h;)i[f].call(t,c);n.state===dl&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=aa,n.timer.stop(),delete r[e];for(var l in r)return;delete t.__transition}}function W$(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>pl&&r.state<dl,r.state=aa,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function V$(t){return this.each(function(){W$(this,t)})}function j$(t,e){var n,r;return function(){var i=Re(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 q$(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Re(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function X$(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Se(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?j$:q$)(n,t,e))}function ml(t,e,n){var r=t._id;return t.each(function(){var i=Re(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Se(i,r).value[e]}}function Ad(t,e){var n;return(typeof e=="number"?$e:e instanceof Dn?Jo:(n=Dn(e))?(e=n,Jo):hd)(t,e)}function Z$(t){return function(){this.removeAttribute(t)}}function K$(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Q$(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 J$(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 tS(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 eS(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 nS(t,e){var n=jo(t),r=n==="transform"?F$:Ad;return this.attrTween(t,typeof e=="function"?(n.local?eS:tS)(n,r,ml(this,"attr."+t,e)):e==null?(n.local?K$:Z$)(n):(n.local?J$:Q$)(n,r,e))}function rS(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function iS(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function oS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&iS(t,o)),n}return i._value=e,i}function aS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&rS(t,o)),n}return i._value=e,i}function sS(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=jo(t);return this.tween(n,(r.local?oS:aS)(r,e))}function uS(t,e){return function(){gl(this,t).delay=+e.apply(this,arguments)}}function lS(t,e){return e=+e,function(){gl(this,t).delay=e}}function cS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?uS:lS)(e,t)):Se(this.node(),e).delay}function fS(t,e){return function(){Re(this,t).duration=+e.apply(this,arguments)}}function hS(t,e){return e=+e,function(){Re(this,t).duration=e}}function pS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?fS:hS)(e,t)):Se(this.node(),e).duration}function dS(t,e){if(typeof e!="function")throw new Error;return function(){Re(this,t).ease=e}}function gS(t){var e=this._id;return arguments.length?this.each(dS(e,t)):Se(this.node(),e).ease}function mS(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Re(this,t).ease=n}}function yS(t){if(typeof t!="function")throw new Error;return this.each(mS(this._id,t))}function bS(t){typeof t!="function"&&(t=Vp(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,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new Ve(r,this._parents,this._name,this._id)}function vS(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],l=n[s],c=u.length,f=a[s]=new Array(c),h,p=0;p<c;++p)(h=u[p]||l[p])&&(f[p]=h);for(;s<r;++s)a[s]=e[s];return new Ve(a,this._parents,this._name,this._id)}function xS(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 _S(t,e,n){var r,i,o=xS(e)?gl:Re;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function wS(t,e){var n=this._id;return arguments.length<2?Se(this.node(),n).on.on(t):this.each(_S(n,t,e))}function $S(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function SS(){return this.on("end.remove",$S(this._id))}function AS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=nl(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,l=o[a]=new Array(u),c,f,h=0;h<u;++h)(c=s[h])&&(f=t.call(c,c.__data__,h,s))&&("__data__"in c&&(f.__data__=c.__data__),l[h]=f,sa(l[h],e,n,h,l,Se(c,n)));return new Ve(o,this._parents,e,n)}function MS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Wp(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],l=u.length,c,f=0;f<l;++f)if(c=u[f]){for(var h=t.call(c,c.__data__,f,u),p,d=Se(c,n),g=0,m=h.length;g<m;++g)(p=h[g])&&sa(p,e,n,g,h,d);o.push(h),a.push(c)}return new Ve(o,a,e,n)}var DS=ci.prototype.constructor;function PS(){return new DS(this._groups,this._parents)}function TS(t,e){var n,r,i;return function(){var o=dr(this,t),a=(this.style.removeProperty(t),dr(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function Md(t){return function(){this.style.removeProperty(t)}}function LS(t,e,n){var r,i=n+"",o;return function(){var a=dr(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function CS(t,e,n){var r,i,o;return function(){var a=dr(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),dr(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function ES(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Re(this,t),l=u.on,c=u.value[o]==null?s||(s=Md(e)):void 0;(l!==n||i!==c)&&(r=(n=l).copy()).on(a,i=c),u.on=r}}function RS(t,e,n){var r=(t+="")=="transform"?N$:Ad;return e==null?this.styleTween(t,TS(t,r)).on("end.style."+t,Md(t)):typeof e=="function"?this.styleTween(t,CS(t,r,ml(this,"style."+t,e))).each(ES(this._id,t)):this.styleTween(t,LS(t,r,e),n).on("end.style."+t,null)}function kS(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function IS(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&kS(t,a,n)),r}return o._value=e,o}function NS(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,IS(t,e,n??""))}function FS(t){return function(){this.textContent=t}}function GS(t){return function(){var e=t(this);this.textContent=e??""}}function zS(t){return this.tween("text",typeof t=="function"?GS(ml(this,"text",t)):FS(t==null?"":t+""))}function OS(t){return function(e){this.textContent=t.call(this,e)}}function US(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&OS(i)),e}return r._value=t,r}function BS(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,US(t))}function YS(){for(var t=this._name,e=this._id,n=Dd(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,l=0;l<s;++l)if(u=a[l]){var c=Se(u,e);sa(u,t,n,l,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ve(r,this._parents,t,n)}function HS(){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 l=Re(this,r),c=l.on;c!==t&&(e=(t=c).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),l.on=e}),i===0&&o()})}var WS=0;function Ve(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Dd(){return++WS}var je=ci.prototype;Ve.prototype={constructor:Ve,select:AS,selectAll:MS,selectChild:je.selectChild,selectChildren:je.selectChildren,filter:bS,merge:vS,selection:PS,transition:YS,call:je.call,nodes:je.nodes,node:je.node,size:je.size,empty:je.empty,each:je.each,on:wS,attr:nS,attrTween:sS,style:RS,styleTween:NS,text:zS,textTween:BS,remove:SS,tween:X$,delay:cS,duration:pS,ease:gS,easeVarying:yS,end:HS,[Symbol.iterator]:je[Symbol.iterator]};function VS(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var jS={time:null,delay:0,duration:250,ease:VS};function qS(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 XS(t){var e,n;t instanceof Ve?(e=t._id,t=t._name):(e=Dd(),(n=jS).time=fl(),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,l=0;l<s;++l)(u=a[l])&&sa(u,t,e,l,a,n||qS(u,e));return new Ve(r,this._parents,t,e)}ci.prototype.interrupt=V$,ci.prototype.transition=XS;function ZS(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ua(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=ua(Math.abs(t)),t?t[1]:NaN}function KS(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 QS(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var JS=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function la(t){if(!(e=JS.exec(t)))throw new Error("invalid format: "+t);var e;return new yl({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]})}la.prototype=yl.prototype;function yl(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+""}yl.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 tA(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 Pd;function eA(t,e){var n=ua(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Pd=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")+ua(t,Math.max(0,e+o-1))[0]}function Td(t,e){var n=ua(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 Ld={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:ZS,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)=>Td(t*100,e),r:Td,s:eA,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Cd(t){return t}var Ed=Array.prototype.map,Rd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function nA(t){var e=t.grouping===void 0||t.thousands===void 0?Cd:KS(Ed.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?Cd:QS(Ed.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 l(f){f=la(f);var h=f.fill,p=f.align,d=f.sign,g=f.symbol,m=f.zero,y=f.width,v=f.comma,x=f.precision,b=f.trim,_=f.type;_==="n"?(v=!0,_="g"):Ld[_]||(x===void 0&&(x=12),b=!0,_="g"),(m||h==="0"&&p==="=")&&(m=!0,h="0",p="=");var M=g==="$"?n:g==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",D=g==="$"?r:/[%p]/.test(_)?a:"",$=Ld[_],w=/[defgprs%]/.test(_);x=x===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function P(S){var N=M,R=D,A,C,T;if(_==="c")R=$(S)+R,S="";else{S=+S;var O=S<0||1/S<0;if(S=isNaN(S)?u:$(Math.abs(S),x),b&&(S=tA(S)),O&&+S==0&&d!=="+"&&(O=!1),N=(O?d==="("?d:s:d==="-"||d==="("?"":d)+N,R=(_==="s"?Rd[8+Pd/3]:"")+R+(O&&d==="("?")":""),w){for(A=-1,C=S.length;++A<C;)if(T=S.charCodeAt(A),48>T||T>57){R=(T===46?i+S.slice(A+1):S.slice(A))+R,S=S.slice(0,A);break}}}v&&!m&&(S=e(S,1/0));var z=N.length+S.length+R.length,k=z<y?new Array(y-z+1).join(h):"";switch(v&&m&&(S=e(k+S,k.length?y-R.length:1/0),k=""),p){case"<":S=N+S+R+k;break;case"=":S=N+k+S+R;break;case"^":S=k.slice(0,z=k.length>>1)+N+S+R+k.slice(z);break;default:S=k+N+S+R;break}return o(S)}return P.toString=function(){return f+""},P}function c(f,h){var p=l((f=la(f),f.type="f",f)),d=Math.max(-8,Math.min(8,Math.floor(yr(h)/3)))*3,g=Math.pow(10,-d),m=Rd[8+d/3];return function(y){return p(g*y)+m}}return{format:l,formatPrefix:c}}var ca,kd,Id;rA({thousands:",",grouping:[3],currency:["$",""]});function rA(t){return ca=nA(t),kd=ca.format,Id=ca.formatPrefix,ca}function iA(t){return Math.max(0,-yr(Math.abs(t)))}function oA(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(yr(e)/3)))*3-yr(Math.abs(t)))}function aA(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,yr(e)-yr(t))+1}function Nd(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function sA(t){return function(){return t}}function uA(t){return+t}var Fd=[0,1];function br(t){return t}function bl(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:sA(isNaN(e)?NaN:.5)}function lA(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function cA(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=bl(i,r),o=n(a,o)):(r=bl(r,i),o=n(o,a)),function(s){return o(r(s))}}function fA(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]=bl(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=Op(t,s,1,r)-1;return o[u](i[u](s))}}function hA(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function pA(){var t=Fd,e=Fd,n=cl,r,i,o,a=br,s,u,l;function c(){var h=Math.min(t.length,e.length);return a!==br&&(a=lA(t[0],t[h-1])),s=h>2?fA:cA,u=l=null,f}function f(h){return h==null||isNaN(h=+h)?o:(u||(u=s(t.map(r),e,n)))(r(a(h)))}return f.invert=function(h){return a(i((l||(l=s(e,t.map(r),$e)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,uA),c()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),c()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=R$,c()},f.clamp=function(h){return arguments.length?(a=h?!0:br,c()):a!==br},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,p){return r=h,i=p,c()}}function dA(){return pA()(br,br)}function gA(t,e,n,r){var i=P_(t,e,n),o;switch(r=la(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=oA(i,a))&&(r.precision=o),Id(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=aA(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=iA(i))&&(r.precision=o-(r.type==="%")*2);break}}return kd(r)}function Gd(t){var e=t.domain;return t.ticks=function(n){var r=e();return D_(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return gA(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,l,c=10;for(s<a&&(l=a,a=s,s=l,l=i,i=o,o=l);c-- >0;){if(l=tl(a,s,n),l===u)return r[i]=a,r[o]=s,e(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;u=l}return t},t}function zd(){var t=dA();return t.copy=function(){return hA(t,zd())},Nd.apply(t,arguments),Gd(t)}function Od(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[Op(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 l=i.indexOf(u);return l<0?[NaN,NaN]:l<1?[t,r[0]]:l>=n?[r[n-1],e]:[r[l-1],r[l]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Od().domain([t,e]).range(i).unknown(o)},Nd.apply(Gd(a),arguments)}function bi(t,e,n){this.k=t,this.x=e,this.y=n}bi.prototype={constructor:bi,scale:function(t){return t===1?this:new bi(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new bi(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+")"}},bi.prototype;function fa(t){return Object.prototype.toString.call(t)==="[object Object]"}function vl(t,e){if(fa(t)===!1||fa(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;fa(r[a])&&fa(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}var xl=function(t,e){return xl=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])},xl(t,e)};function ke(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");xl(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function mA(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(c){try{l(r.next(c))}catch(f){a(f)}}function u(c){try{l(r.throw(c))}catch(f){a(f)}}function l(c){c.done?o(c.value):i(c.value).then(s,u)}l((r=r.apply(t,[])).next())})}function Ud(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(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function vr(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 vi(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 xi(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 xr(t){return this instanceof xr?(this.v=t,this):new xr(t)}function yA(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,f)}}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{l(r[p](d))}catch(g){h(o[0][3],g)}}function l(p){p.value instanceof xr?Promise.resolve(p.value.v).then(c,f):h(o[0][2],p)}function c(p){u("next",p)}function f(p){u("throw",p)}function h(p,d){p(d),o.shift(),o.length&&u(o[0][0],o[0][1])}}function bA(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 vr=="function"?vr(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(l){o({value:l,done:s})},a)}}function Ft(t){return typeof t=="function"}function _l(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 wl=_l(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 ha(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=vr(a),u=s.next();!u.done;u=s.next()){var l=u.value;l.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 c=this.initialTeardown;if(Ft(c))try{c()}catch(g){o=g instanceof $l?g.errors:[g]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=vr(f),p=h.next();!p.done;p=h.next()){var d=p.value;try{Zd(d)}catch(g){o=o??[],g instanceof $l?o=xi(xi([],vi(o)),vi(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new $l(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Zd(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)&&ha(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&ha(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),qd=_i.EMPTY;function Xd(t){return t instanceof _i||t&&"closed"in t&&Ft(t.remove)&&Ft(t.add)&&Ft(t.unsubscribe)}function Zd(t){Ft(t)?t():t.unsubscribe()}var Kd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},TA={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,xi([t,e],vi(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Qd(t){TA.setTimeout(function(){throw t})}function Sl(){}function pa(t){t()}var Al=function(t){ke(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Xd(n)&&n.add(r)):r.destination=RA,r}return e.create=function(n,r,i){return new wi(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),LA=Function.prototype.bind;function Ml(t,e){return LA.call(t,e)}var CA=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}(),wi=function(t){ke(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(Ft(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&Kd.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Ml(n.next,s),error:n.error&&Ml(n.error,s),complete:n.complete&&Ml(n.complete,s)}):a=n}return o.destination=new CA(a),o}return e}(Al);function da(t){Qd(t)}function EA(t){throw t}var RA={closed:!0,next:Sl,error:EA,complete:Sl},Dl=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Jd(t){return t}function kA(t){return t.length===0?Jd:t.length===1?t[0]:function(e){return t.reduce(function(n,r){return r(n)},e)}}var cn=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=NA(e)?e:new wi(e,n,r);return pa(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=tg(n),new n(function(i,o){var a=new wi({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[Dl]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return kA(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=tg(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 tg(t){var e;return(e=t??Kd.Promise)!==null&&e!==void 0?e:Promise}function IA(t){return t&&Ft(t.next)&&Ft(t.error)&&Ft(t.complete)}function NA(t){return t&&t instanceof Al||IA(t)&&Xd(t)}function FA(t){return Ft(t==null?void 0:t.lift)}function $i(t){return function(e){if(FA(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 Si(t,e,n,r,i){return new GA(t,e,n,r,i)}var GA=function(t){ke(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(l){try{r(l)}catch(c){n.error(c)}}:t.prototype._next,u._error=o?function(l){try{o(l)}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(l){n.error(l)}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}(Al),zA=wl(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ai=function(t){ke(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 eg(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new zA},e.prototype.next=function(n){var r=this;pa(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=vr(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(l){i={error:l}}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;pa(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;pa(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?qd:(this.currentObservers=null,s.push(n),new _i(function(){r.currentObservers=null,ha(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 cn;return n.source=this,n},e.create=function(n,r){return new eg(n,r)},e}(cn),eg=function(t){ke(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:qd},e}(Ai),ng=function(t){ke(e,t);function e(n){var r=t.call(this)||this;return r._value=n,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},e.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,o=n._value;if(r)throw i;return this._throwIfClosed(),o},e.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},e}(Ai),Pl={now:function(){return(Pl.delegate||Date).now()},delegate:void 0},OA=function(t){ke(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=Pl);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(),l=0,c=1;c<o.length&&o[c]<=u;c+=2)l=c;l&&o.splice(0,l+1)}},e}(Ai),UA=function(t){ke(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(_i),rg={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,xi([t,e],vi(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},BA=function(t){ke(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),rg.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&&rg.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,ha(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(UA),ig=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=Pl.now,t}(),YA=function(t){ke(e,t);function e(n,r){r===void 0&&(r=ig.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}(ig);new YA(BA);var HA=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function WA(t){return Ft(t==null?void 0:t.then)}function VA(t){return Ft(t[Dl])}function jA(t){return Symbol.asyncIterator&&Ft(t==null?void 0:t[Symbol.asyncIterator])}function qA(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 XA(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ZA=XA();function KA(t){return Ft(t==null?void 0:t[ZA])}function QA(t){return DA(this,arguments,function(){var e,n,r,i;return jd(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,xr(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,xr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,xr(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 JA(t){return Ft(t==null?void 0:t.getReader)}function ga(t){if(t instanceof cn)return t;if(t!=null){if(VA(t))return t3(t);if(HA(t))return e3(t);if(WA(t))return n3(t);if(jA(t))return og(t);if(KA(t))return r3(t);if(JA(t))return i3(t)}throw qA(t)}function t3(t){return new cn(function(e){var n=t[Dl]();if(Ft(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function e3(t){return new cn(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function n3(t){return new cn(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Qd)})}function r3(t){return new cn(function(e){var n,r;try{for(var i=vr(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 og(t){return new cn(function(e){o3(t,e).catch(function(n){return e.error(n)})})}function i3(t){return og(QA(t))}function o3(t,e){var n,r,i,o;return MA(this,void 0,void 0,function(){var a,s;return jd(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=PA(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]}})})}wl(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function Tl(t,e){return $i(function(n,r){var i=0;n.subscribe(Si(r,function(o){r.next(t.call(e,o,i++))}))})}function a3(t,e){return e===void 0&&(e=Jd),t=t??s3,$i(function(n,r){var i,o=!0;n.subscribe(Si(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function s3(t,e){return t===e}function u3(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(l){var c,f,h,p=0,d=!1,g=!1,m=function(){f==null||f.unsubscribe(),f=void 0},b=function(){m(),c=h=void 0,d=g=!1},x=function(){var v=c;b(),v==null||v.unsubscribe()};return $i(function(v,y){p++,!g&&!d&&m();var w=h=h??n();y.add(function(){p--,p===0&&!g&&!d&&(f=Ll(x,u))}),w.subscribe(y),!c&&p>0&&(c=new wi({next:function(D){return w.next(D)},error:function(D){g=!0,m(),f=Ll(b,i,D),w.error(D)},complete:function(){d=!0,m(),f=Ll(b,a),w.complete()}}),ga(v).subscribe(c))})(l)}}function Ll(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 wi({next:function(){i.unsubscribe(),t()}});return ga(e.apply(void 0,xi([],vi(n)))).subscribe(i)}}function l3(t,e,n){var r,i=!1;return r=t,u3({connector:function(){return new OA(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function c3(t,e){return $i(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(Si(r,function(u){i==null||i.unsubscribe();var l=0,c=o++;ga(t(u,c)).subscribe(i=Si(r,function(f){return r.next(e?e(u,f,c,l++):f)},function(){i=null,s()}))},function(){a=!0,s()}))})}function f3(t){return $i(function(e,n){ga(t).subscribe(Si(n,function(){return n.complete()},Sl)),!n.closed&&e.subscribe(n)})}const h3=t=>t.pipe(Tl(e=>e.styles.textSize),a3(),Tl(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=pr.scaleDomain,scaleRange:i=pr.scaleRange})=>{const o=r[0]??pr.scaleDomain[0],a=r[1]??pr.scaleDomain[1],s=i[0]??pr.scaleRange[0],u=i[1]??pr.scaleRange[1],l=o==="auto"?e:o,c=a==="auto"?t:a,f=t-(t-l)/(1-s),h=c/u;return Wd().domain([f,h]).range([0,n])},p3=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return mA().domain(t).range(r).padding(n)},d3=({axisLabels:t,axisWidth:e,padding:n=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),Vd().domain([-0,e+0]).range(i)};function g3({name:t,defaultParams:e,initFn:n}){const r=new Ai,i=new WeakMap;let o=()=>{},a;const s=new ng(e),u=new ng({}),l=s.pipe(c3(c=>u.pipe(f3(r),Tl(f=>xl(f,c)))),l3(1));return{params$:u,name:t,defaultParams:e,init(){a&&(o=n(a)??(()=>{}),i.set(a.selection,a))},destroy(){o(),a&&(a.selection.remove(),a=void 0),r.next(void 0)},setPresetParams:c=>{s.next(xl(c,e))},setContext:c=>{a=c,a.observer.fullParams$=l}}}const Mi=()=>function(t,e){return function(n){return class{constructor(){const r=g3({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}}}},Cn=Mi(),se=Mi(),pe=Mi(),sg=Mi(),ug=Mi();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 ma(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:m3,n=t,r=t);function i(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const f=l+c>>>1;n(s[f],u)<0?l=f+1:c=f}while(l<c)}return l}function o(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const f=l+c>>>1;n(s[f],u)<=0?l=f+1:c=f}while(l<c)}return l}function a(s,u,l=0,c=s.length){const f=i(s,u,l,c-1);return f>l&&r(s[f-1],u)>-r(s[f],u)?f-1:f}return{left:i,center:a,right:o}}function m3(){return 0}function ya(t){return t===null?NaN:+t}function*y3(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 cg=ma(_t),fg=cg.right,b3=cg.left,v3=ma(ya).center,En=fg;function x3(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=Cl(e),i=t.slice();return r(t,i,0,n,1),r(i,t,0,n,1),r(t,i,0,n,1),t}const hg=pg(Cl),_3=pg(w3);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),l=i.slice();return s&&u?(_r(s,l,i,o,a),_r(s,i,l,o,a),_r(s,l,i,o,a),wr(u,i,l,o,a),wr(u,l,i,o,a),wr(u,i,l,o,a)):s?(_r(s,i,l,o,a),_r(s,l,i,o,a),_r(s,i,l,o,a)):u&&(wr(u,i,l,o,a),wr(u,l,i,o,a),wr(u,i,l,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 wr(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function w3(t){const e=Cl(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 Cl(t){const e=Math.floor(t);if(e===t)return $3(t);const n=t-e,r=2*t+1;return(i,o,a,s,u)=>{if(!((s-=u)>=a))return;let l=e*o[a];const c=u*e,f=c+u;for(let h=a,p=a+c;h<p;h+=u)l+=o[Math.min(s,h)];for(let h=a,p=s;h<=p;h+=u)l+=o[Math.min(s,h+c)],i[h]=(l+n*(o[Math.max(a,h-f)]+o[Math.min(s,h+f)]))/r,l-=o[Math.max(a,h-c)]}}function $3(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 l=i,c=i+u;l<c;l+=a)s+=r[Math.min(o,l)];for(let l=i,c=o;l<=c;l+=a)s+=r[Math.min(o,l+u)],n[l]=s/e,s-=r[Math.max(i,l-u)]}}function ba(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 S3(t){return t.length|0}function A3(t){return!(t>0)}function M3(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function D3(t){return e=>t(...e)}function P3(...t){const e=typeof t[t.length-1]=="function"&&D3(t.pop());t=t.map(M3);const n=t.map(S3),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(A3))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 T3(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 dg(t,e){let n=0,r,i=0,o=0;if(e===void 0)for(let a of t)a!=null&&(a=+a)>=a&&(r=a-i,i+=r/++n,o+=r*(a-i));else{let a=-1;for(let s of t)(s=e(s,++a,t))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,o+=r*(s-i))}if(n>1)return o/(n-1)}function gg(t,e){const n=dg(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 Tt{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 L3(t,e){const n=new Tt;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 C3(t,e){const n=new Tt;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}class Pi extends Map{constructor(e,n=bg){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(El(this,e))}has(e){return super.has(El(this,e))}set(e,n){return super.set(mg(this,e),n)}delete(e){return super.delete(yg(this,e))}}class Rn extends Set{constructor(e,n=bg){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const r of e)this.add(r)}has(e){return super.has(El(this,e))}add(e){return super.add(mg(this,e))}delete(e){return super.delete(yg(this,e))}}function El({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function mg({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function yg({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function bg(t){return t!==null&&typeof t=="object"?t.valueOf():t}function $r(t){return t}function vg(t,...e){return Sr(t,$r,$r,e)}function xg(t,...e){return Sr(t,Array.from,$r,e)}function _g(t,e){for(let n=1,r=e.length;n<r;++n)t=t.flatMap(i=>i.pop().map(([o,a])=>[...i,o,a]));return t}function E3(t,...e){return _g(xg(t,...e),e)}function R3(t,e,...n){return _g($g(t,e,...n),n)}function wg(t,e,...n){return Sr(t,$r,e,n)}function $g(t,e,...n){return Sr(t,Array.from,e,n)}function k3(t,...e){return Sr(t,$r,Sg,e)}function I3(t,...e){return Sr(t,Array.from,Sg,e)}function Sg(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function Sr(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new Pi,u=r[a++];let l=-1;for(const c of o){const f=u(c,++l,o),h=s.get(f);h?h.push(c):s.set(f,[c])}for(const[c,f]of s)s.set(c,i(f,a));return e(s)}(t,0)}function Ag(t,e){return Array.from(e,n=>t[n])}function Rl(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=Ar(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>Ar(n[i],n[o]))),Ag(t,r)}return t.sort(kl(n))}function kl(t=_t){if(t===_t)return Ar;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 Ar(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function N3(t,e,n){return(e.length!==2?Rl(wg(t,e,n),([r,i],[o,a])=>_t(i,a)||_t(r,o)):Rl(vg(t,n),([r,i],[o,a])=>e(i,a)||_t(r,o))).map(([r])=>r)}var F3=Array.prototype,G3=F3.slice;function Il(t){return()=>t}const z3=Math.sqrt(50),O3=Math.sqrt(10),U3=Math.sqrt(2);function va(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>=z3?10:o>=O3?5:o>=U3?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(t*l),u=Math.round(e*l),s/l<t&&++s,u/l>e&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(t/l),u=Math.round(e/l),s*l<t&&++s,u*l>e&&--u),u<s&&.5<=n&&n<2?va(t,e,n*2):[s,u,l]}function kn(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?va(e,t,n):va(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let l=0;l<s;++l)u[l]=(o-l)/-a;else for(let l=0;l<s;++l)u[l]=(o-l)*a;else if(a<0)for(let l=0;l<s;++l)u[l]=(i+l)/-a;else for(let l=0;l<s;++l)u[l]=(i+l)*a;return u}function In(t,e,n){return e=+e,t=+t,n=+n,va(t,e,n)[2]}function xa(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 Nl(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 Fl(t){return Math.max(1,Math.ceil(Math.log(ba(t))/Math.LN2)+1)}function Mg(){var t=$r,e=Di,n=Fl;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,s,u,l=new Array(a);for(o=0;o<a;++o)l[o]=t(i[o],o,i);var c=e(l),f=c[0],h=c[1],p=n(l,f,h);if(!Array.isArray(p)){const v=h,y=+p;if(e===Di&&([f,h]=Nl(f,h,y)),p=kn(f,h,y),p[0]<=f&&(u=In(f,h,y)),p[p.length-1]>=h)if(v>=h&&e===Di){const w=In(f,h,y);isFinite(w)&&(w>0?h=(Math.floor(h/w)+1)*w:w<0&&(h=(Math.ceil(h*-w)+1)/-w))}else p.pop()}for(var d=p.length,g=0,m=d;p[g]<=f;)++g;for(;p[m-1]>h;)--m;(g||m<d)&&(p=p.slice(g,m),d=m-g);var b=new Array(d+1),x;for(o=0;o<=d;++o)x=b[o]=[],x.x0=o>0?p[o-1]:f,x.x1=o<d?p[o]:h;if(isFinite(u)){if(u>0)for(o=0;o<a;++o)(s=l[o])!=null&&f<=s&&s<=h&&b[Math.min(d,Math.floor((s-f)/u))].push(i[o]);else if(u<0){for(o=0;o<a;++o)if((s=l[o])!=null&&f<=s&&s<=h){const v=Math.floor((f-s)*u);b[Math.min(d,v+(p[v]<=s))].push(i[o])}}}else for(o=0;o<a;++o)(s=l[o])!=null&&f<=s&&s<=h&&b[En(p,s,0,d)].push(i[o]);return b}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:Il(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:Il([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Il(Array.isArray(i)?G3.call(i):i),r):n},r}function Ti(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 Gl(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){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 zl(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 wa(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?Ar:kl(i);r>n;){if(r-n>600){const u=r-n+1,l=e-n+1,c=Math.log(u),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(u-f)/u)*(l-u/2<0?-1:1),p=Math.max(n,Math.floor(e-l*f/u+h)),d=Math.min(r,Math.floor(e+(u-l)*f/u+h));wa(t,e,p,d,i)}const o=t[e];let a=n,s=r;for(Li(t,n,e),i(t[r],o)>0&&Li(t,n,r);a<s;){for(Li(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?Li(t,n,s):(++s,Li(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Li(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Dg(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 Ci(t,e,n){if(t=Float64Array.from(y3(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return _a(t);if(e>=1)return Ti(t);var r,i=(r-1)*e,o=Math.floor(i),a=Ti(wa(t,o).subarray(0,o+1)),s=_a(t.subarray(o+1));return a+(s-a)*(i-o)}}function Pg(t,e,n=ya){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 Tg(t,e,n=ya){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,u)=>ya(n(t[u],u,t))),e<=0)return zl(r);if(e>=1)return Gl(r);var r,i=Uint32Array.from(t,(s,u)=>u),o=r.length-1,a=Math.floor(o*e);return wa(i,a,0,o,(s,u)=>Ar(r[s],r[u])),a=Dg(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function B3(t,e,n){const r=ba(t),i=Ci(t,.75)-Ci(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function Y3(t,e,n){const r=ba(t),i=gg(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function H3(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 W3(t,e){return Ci(t,.5,e)}function V3(t,e){return Tg(t,.5,e)}function*j3(t){for(const e of t)yield*e}function Ol(t){return Array.from(j3(t))}function q3(t,e){const n=new Pi;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 X3(t,e=Z3){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function Z3(t,e){return[t,e]}function fn(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function K3(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)=>Ar(n[s],n[u]):kl(i)),t.forEach((s,u)=>{const l=i(s,o===void 0?s:o);l>=0?((o===void 0||l>0)&&(o=s,a=u),r[s]=a):r[s]=NaN}),r}function Q3(t,e=_t){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?_t(a,i)<0:_t(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)<0:e(i,i)===0)&&(n=i,r=!0);return n}function Lg(t,e=_t){if(e.length===1)return zl(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 J3(t,e=_t){if(e.length===1)return Gl(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)>0)&&(n=o,r=i);return r}function t5(t,e){const n=Lg(t,e);return n<0?void 0:n}const e5=Cg(Math.random);function Cg(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 Eg(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 Rg(t){if(!(o=t.length))return[];for(var e=-1,n=_a(t,n5),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 n5(t){return t.length}function r5(){return Rg(arguments)}function i5(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 o5(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(e(r,++n,t))return!0;return!1}function a5(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 s5(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 u5(t,e,n){if(typeof e!="function")throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if({done:i,value:n}=r.next(),i)return;++a}for(;{done:i,value:o}=r.next(),!i;)n=e(n,o,++a,t);return n}function l5(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function c5(t,...e){t=new Rn(t);for(const n of e)for(const r of n)t.delete(r);return t}function f5(t,e){const n=e[Symbol.iterator](),r=new Rn;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 h5(t,...e){t=new Rn(t),e=e.map(p5);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function p5(t){return t instanceof Rn?t:new Rn(t)}function kg(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=Ig(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const u=Ig(a);if(r.add(u),Object.is(o,u))break}}return!0}function Ig(t){return t!==null&&typeof t=="object"?t.valueOf():t}function d5(t,e){return kg(e,t)}function g5(...t){const e=new Rn;for(const n of t)for(const r of n)e.add(r);return e}function m5(t){return t}var $a=1,Sa=2,Ul=3,Ei=4,Ng=1e-6;function y5(t){return"translate("+t+",0)"}function b5(t){return"translate(0,"+t+")"}function v5(t){return e=>+t(e)}function x5(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function _5(){return!this.__axis}function Aa(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,l=t===$a||t===Ei?-1:1,c=t===Ei||t===Sa?"x":"y",f=t===$a||t===Ul?y5:b5;function h(p){var d=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):m5),m=Math.max(o,0)+s,b=e.range(),x=+b[0]+u,v=+b[b.length-1]+u,y=(e.bandwidth?x5:v5)(e.copy(),u),w=p.selection?p.selection():p,D=w.selectAll(".domain").data([null]),P=w.selectAll(".tick").data(d,e).order(),S=P.exit(),_=P.enter().append("g").attr("class","tick"),T=P.select("line"),$=P.select("text");D=D.merge(D.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),P=P.merge(_),T=T.merge(_.append("line").attr("stroke","currentColor").attr(c+"2",l*o)),$=$.merge(_.append("text").attr("fill","currentColor").attr(c,l*m).attr("dy",t===$a?"0em":t===Ul?"0.71em":"0.32em")),p!==w&&(D=D.transition(p),P=P.transition(p),T=T.transition(p),$=$.transition(p),S=S.transition(p).attr("opacity",Ng).attr("transform",function(N){return isFinite(N=y(N))?f(N+u):this.getAttribute("transform")}),_.attr("opacity",Ng).attr("transform",function(N){var R=this.parentNode.__axis;return f((R&&isFinite(R=R(N))?R:y(N))+u)})),S.remove(),D.attr("d",t===Ei||t===Sa?a?"M"+l*a+","+x+"H"+u+"V"+v+"H"+l*a:"M"+u+","+x+"V"+v:a?"M"+x+","+l*a+"V"+u+"H"+v+"V"+l*a:"M"+x+","+u+"H"+v),P.attr("opacity",1).attr("transform",function(N){return f(y(N)+u)}),T.attr(c+"2",l*o),$.attr(c,l*m).text(g),w.filter(_5).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Sa?"start":t===Ei?"end":"middle"),w.each(function(){this.__axis=y})}return h.scale=function(p){return arguments.length?(e=p,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),h):n.slice()},h.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),h):r&&r.slice()},h.tickFormat=function(p){return arguments.length?(i=p,h):i},h.tickSize=function(p){return arguments.length?(o=a=+p,h):o},h.tickSizeInner=function(p){return arguments.length?(o=+p,h):o},h.tickSizeOuter=function(p){return arguments.length?(a=+p,h):a},h.tickPadding=function(p){return arguments.length?(s=+p,h):s},h.offset=function(p){return arguments.length?(u=+p,h):u},h}function Fg(t){return Aa($a,t)}function w5(t){return Aa(Sa,t)}function $5(t){return Aa(Ul,t)}function Gg(t){return Aa(Ei,t)}var S5={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 Ma(n)}function Ma(t){this._=t}function A5(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}})}Ma.prototype=Nn.prototype={constructor:Ma,on:function(t,e){var n=this._,r=A5(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=M5(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 Ma(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 M5(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]=S5,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Bl="http://www.w3.org/1999/xhtml";const Yl={svg:"http://www.w3.org/2000/svg",xhtml:Bl,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)),Yl.hasOwnProperty(e)?{space:Yl[e],local:t}:t}function D5(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Bl&&e.documentElement.namespaceURI===Bl?e.createElement(t):e.createElementNS(n,t)}}function P5(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Da(t){var e=Ri(t);return(e.local?P5:D5)(e)}function T5(){}function Pa(t){return t==null?T5:function(){return this.querySelector(t)}}function L5(t){typeof t!="function"&&(t=Pa(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,l,c=0;c<a;++c)(u=o[c])&&(l=t.call(u,u.__data__,c,o))&&("__data__"in u&&(l.__data__=u.__data__),s[c]=l);return new Ht(r,this._parents)}function Og(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function C5(){return[]}function Hl(t){return t==null?C5:function(){return this.querySelectorAll(t)}}function E5(t){return function(){return Og(t.apply(this,arguments))}}function R5(t){typeof t=="function"?t=E5(t):t=Hl(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,l=0;l<s;++l)(u=a[l])&&(r.push(t.call(u,u.__data__,l,a)),i.push(u));return new Ht(r,i)}function Wl(t){return function(){return this.matches(t)}}function Ug(t){return function(e){return e.matches(t)}}var k5=Array.prototype.find;function I5(t){return function(){return k5.call(this.children,t)}}function N5(){return this.firstElementChild}function F5(t){return this.select(t==null?N5:I5(typeof t=="function"?t:Ug(t)))}var G5=Array.prototype.filter;function z5(){return Array.from(this.children)}function O5(t){return function(){return G5.call(this.children,t)}}function U5(t){return this.selectAll(t==null?z5:O5(typeof t=="function"?t:Ug(t)))}function B5(t){typeof t!="function"&&(t=Wl(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,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new Ht(r,this._parents)}function Bg(t){return new Array(t.length)}function Y5(){return new Ht(this._enter||this._groups.map(Bg),this._parents)}function Ta(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ta.prototype={constructor:Ta,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function H5(t){return function(){return t}}function W5(t,e,n,r,i,o){for(var a=0,s,u=e.length,l=o.length;a<l;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Ta(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function V5(t,e,n,r,i,o,a){var s,u,l=new Map,c=e.length,f=o.length,h=new Array(c),p;for(s=0;s<c;++s)(u=e[s])&&(h[s]=p=a.call(u,u.__data__,s,e)+"",l.has(p)?i[s]=u:l.set(p,u));for(s=0;s<f;++s)p=a.call(t,o[s],s,o)+"",(u=l.get(p))?(r[s]=u,u.__data__=o[s],l.delete(p)):n[s]=new Ta(t,o[s]);for(s=0;s<c;++s)(u=e[s])&&l.get(h[s])===u&&(i[s]=u)}function j5(t){return t.__data__}function q5(t,e){if(!arguments.length)return Array.from(this,j5);var n=e?V5:W5,r=this._parents,i=this._groups;typeof t!="function"&&(t=H5(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],f=i[l],h=f.length,p=X5(t.call(c,c&&c.__data__,l,r)),d=p.length,g=s[l]=new Array(d),m=a[l]=new Array(d),b=u[l]=new Array(h);n(c,f,g,m,b,p,e);for(var x=0,v=0,y,w;x<d;++x)if(y=g[x]){for(x>=v&&(v=x+1);!(w=m[v])&&++v<d;);y._next=w||null}}return a=new Ht(a,r),a._enter=s,a._exit=u,a}function X5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Z5(){return new Ht(this._exit||this._groups.map(Bg),this._parents)}function K5(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 Q5(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 l=n[u],c=r[u],f=l.length,h=s[u]=new Array(f),p,d=0;d<f;++d)(p=l[d]||c[d])&&(h[d]=p);for(;u<i;++u)s[u]=n[u];return new Ht(s,this._parents)}function J5(){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 t6(t){t||(t=e6);function e(f,h){return f&&h?t(f.__data__,h.__data__):!f-!h}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),l,c=0;c<s;++c)(l=a[c])&&(u[c]=l);u.sort(e)}return new Ht(i,this._parents).order()}function e6(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function n6(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function r6(){return Array.from(this)}function i6(){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 o6(){let t=0;for(const e of this)++t;return t}function a6(){return!this.node()}function s6(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 u6(t){return function(){this.removeAttribute(t)}}function l6(t){return function(){this.removeAttributeNS(t.space,t.local)}}function c6(t,e){return function(){this.setAttribute(t,e)}}function f6(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function h6(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function p6(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function d6(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?l6:u6:typeof e=="function"?n.local?p6:h6:n.local?f6:c6)(n,e))}function Vl(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function g6(t){return function(){this.style.removeProperty(t)}}function m6(t,e,n){return function(){this.style.setProperty(t,e,n)}}function y6(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function b6(t,e,n){return arguments.length>1?this.each((e==null?g6:typeof e=="function"?y6:m6)(t,e,n??"")):Fn(this.node(),t)}function Fn(t,e){return t.style.getPropertyValue(e)||Vl(t).getComputedStyle(t,null).getPropertyValue(e)}function v6(t){return function(){delete this[t]}}function x6(t,e){return function(){this[t]=e}}function _6(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function w6(t,e){return arguments.length>1?this.each((e==null?v6:typeof e=="function"?_6:x6)(t,e)):this.node()[t]}function Yg(t){return t.trim().split(/^|\s+/)}function jl(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=jl(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Vg(t,e){for(var n=jl(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function $6(t){return function(){Wg(this,t)}}function S6(t){return function(){Vg(this,t)}}function A6(t,e){return function(){(e.apply(this,arguments)?Wg:Vg)(this,t)}}function M6(t,e){var n=Yg(t+"");if(arguments.length<2){for(var r=jl(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?A6:e?$6:S6)(n,e))}function D6(){this.textContent=""}function P6(t){return function(){this.textContent=t}}function T6(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function L6(t){return arguments.length?this.each(t==null?D6:(typeof t=="function"?T6:P6)(t)):this.node().textContent}function C6(){this.innerHTML=""}function E6(t){return function(){this.innerHTML=t}}function R6(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function k6(t){return arguments.length?this.each(t==null?C6:(typeof t=="function"?R6:E6)(t)):this.node().innerHTML}function I6(){this.nextSibling&&this.parentNode.appendChild(this)}function N6(){return this.each(I6)}function F6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function G6(){return this.each(F6)}function z6(t){var e=typeof t=="function"?t:Da(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function O6(){return null}function U6(t,e){var n=typeof t=="function"?t:Da(t),r=e==null?O6:typeof e=="function"?e:Pa(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function B6(){var t=this.parentNode;t&&t.removeChild(this)}function Y6(){return this.each(B6)}function H6(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function W6(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function V6(t){return this.select(t?W6:H6)}function j6(t){return arguments.length?this.property("__data__",t):this.node().__data__}function q6(t){return function(e){t.call(this,e,this.__data__)}}function X6(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 Z6(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 K6(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 Q6(t,e,n){var r=X6(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,l=s.length,c;u<l;++u)for(i=0,c=s[u];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=e?K6:Z6,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function jg(t,e,n){var r=Vl(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 J6(t,e){return function(){return jg(this,t,e)}}function t8(t,e){return function(){return jg(this,t,e.apply(this,arguments))}}function e8(t,e){return this.each((typeof e=="function"?t8:J6)(t,e))}function*n8(){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 ql=[null];function Ht(t,e){this._groups=t,this._parents=e}function Gn(){return new Ht([[document.documentElement]],ql)}function r8(){return this}Ht.prototype=Gn.prototype={constructor:Ht,select:L5,selectAll:R5,selectChild:F5,selectChildren:U5,filter:B5,data:q5,enter:Y5,exit:Z5,join:K5,merge:Q5,selection:r8,order:J5,sort:t6,call:n6,nodes:r6,node:i6,size:o6,empty:a6,each:s6,attr:d6,style:b6,property:w6,classed:M6,text:L6,html:k6,raise:N6,lower:G6,append:z6,insert:U6,remove:Y6,clone:V6,datum:j6,on:Q6,dispatch:e8,[Symbol.iterator]:n8};function X(t){return typeof t=="string"?new Ht([[document.querySelector(t)]],[document.documentElement]):new Ht([[t]],ql)}function i8(t){return X(Da(t).call(document.documentElement))}var o8=0;function qg(){return new Xl}function Xl(){this._="@"+(++o8).toString(36)}Xl.prototype=qg.prototype={constructor:Xl,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 Xg(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ue(t,e){if(t=Xg(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 a8(t,e){return t.target&&(t=Xg(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>ue(n,e))}function s8(t){return typeof t=="string"?new Ht([document.querySelectorAll(t)],[document.documentElement]):new Ht([Og(t)],ql)}const u8={passive:!1},ki={capture:!0,passive:!1};function Zl(t){t.stopImmediatePropagation()}function Mr(t){t.preventDefault(),t.stopImmediatePropagation()}function La(t){var e=t.document.documentElement,n=X(t).on("dragstart.drag",Mr,ki);"onselectstart"in e?n.on("selectstart.drag",Mr,ki):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Ca(t,e){var n=t.document.documentElement,r=X(t).on("dragstart.drag",null);e&&(r.on("click.drag",Mr,ki),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 Kl(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:u,dy:l,dispatch:c}){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:l,enumerable:!0,configurable:!0},_:{value:c}})}Kl.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function l8(t){return!t.ctrlKey&&!t.button}function c8(){return this.parentNode}function f8(t,e){return e??{x:t.x,y:t.y}}function h8(){return navigator.maxTouchPoints||"ontouchstart"in this}function Zg(){var t=l8,e=c8,n=f8,r=h8,i={},o=Nn("start","drag","end"),a=0,s,u,l,c,f=0;function h(y){y.on("mousedown.drag",p).filter(r).on("touchstart.drag",m).on("touchmove.drag",b,u8).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(y,w){if(!(c||!t.call(this,y,w))){var D=v(this,e.call(this,y,w),y,w,"mouse");D&&(X(y.view).on("mousemove.drag",d,ki).on("mouseup.drag",g,ki),La(y.view),Zl(y),l=!1,s=y.clientX,u=y.clientY,D("start",y))}}function d(y){if(Mr(y),!l){var w=y.clientX-s,D=y.clientY-u;l=w*w+D*D>f}i.mouse("drag",y)}function g(y){X(y.view).on("mousemove.drag mouseup.drag",null),Ca(y.view,l),Mr(y),i.mouse("end",y)}function m(y,w){if(t.call(this,y,w)){var D=y.changedTouches,P=e.call(this,y,w),S=D.length,_,T;for(_=0;_<S;++_)(T=v(this,P,y,w,D[_].identifier,D[_]))&&(Zl(y),T("start",y,D[_]))}}function b(y){var w=y.changedTouches,D=w.length,P,S;for(P=0;P<D;++P)(S=i[w[P].identifier])&&(Mr(y),S("drag",y,w[P]))}function x(y){var w=y.changedTouches,D=w.length,P,S;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),P=0;P<D;++P)(S=i[w[P].identifier])&&(Zl(y),S("end",y,w[P]))}function v(y,w,D,P,S,_){var T=o.copy(),$=ue(_||D,w),N,R,A;if((A=n.call(y,new Kl("beforestart",{sourceEvent:D,target:h,identifier:S,active:a,x:$[0],y:$[1],dx:0,dy:0,dispatch:T}),P))!=null)return N=A.x-$[0]||0,R=A.y-$[1]||0,function L(M,z,U){var C=$,k;switch(M){case"start":i[S]=L,k=a++;break;case"end":delete i[S],--a;case"drag":$=ue(U||z,w),k=a;break}T.call(M,y,new Kl(M,{sourceEvent:z,subject:A,target:h,identifier:S,active:k,x:$[0]+N,y:$[1]+R,dx:$[0]-C[0],dy:$[1]-C[1],dispatch:T}),P)}}return h.filter=function(y){return arguments.length?(t=typeof y=="function"?y:Ea(!!y),h):t},h.container=function(y){return arguments.length?(e=typeof y=="function"?y:Ea(y),h):e},h.subject=function(y){return arguments.length?(n=typeof y=="function"?y:Ea(y),h):n},h.touchable=function(y){return arguments.length?(r=typeof y=="function"?y:Ea(!!y),h):r},h.on=function(){var y=o.on.apply(o,arguments);return y===o?h:y},h.clickDistance=function(y){return arguments.length?(f=(y=+y)*y,h):Math.sqrt(f)},h}function Dr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ii(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function hn(){}var zn=.7,Pr=1/zn,Tr="\\s*([+-]?\\d+)\\s*",Ni="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",p8=/^#([0-9a-f]{3,8})$/,d8=new RegExp(`^rgb\\(${Tr},${Tr},${Tr}\\)$`),g8=new RegExp(`^rgb\\(${Ie},${Ie},${Ie}\\)$`),m8=new RegExp(`^rgba\\(${Tr},${Tr},${Tr},${Ni}\\)$`),y8=new RegExp(`^rgba\\(${Ie},${Ie},${Ie},${Ni}\\)$`),b8=new RegExp(`^hsl\\(${Ni},${Ie},${Ie}\\)$`),v8=new RegExp(`^hsla\\(${Ni},${Ie},${Ie},${Ni}\\)$`),Kg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Dr(hn,pn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Qg,formatHex:Qg,formatHex8:x8,formatHsl:_8,formatRgb:Jg,toString:Jg});function Qg(){return this.rgb().formatHex()}function x8(){return this.rgb().formatHex8()}function _8(){return i0(this).formatHsl()}function Jg(){return this.rgb().formatRgb()}function pn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=p8.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?t0(e):n===3?new Et(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Ra(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Ra(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=d8.exec(t))?new Et(e[1],e[2],e[3],1):(e=g8.exec(t))?new Et(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=m8.exec(t))?Ra(e[1],e[2],e[3],e[4]):(e=y8.exec(t))?Ra(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=b8.exec(t))?r0(e[1],e[2]/100,e[3]/100,1):(e=v8.exec(t))?r0(e[1],e[2]/100,e[3]/100,e[4]):Kg.hasOwnProperty(t)?t0(Kg[t]):t==="transparent"?new Et(NaN,NaN,NaN,0):null}function t0(t){return new Et(t>>16&255,t>>8&255,t&255,1)}function Ra(t,e,n,r){return r<=0&&(t=e=n=NaN),new Et(t,e,n,r)}function Ql(t){return t instanceof hn||(t=pn(t)),t?(t=t.rgb(),new Et(t.r,t.g,t.b,t.opacity)):new Et}function Lr(t,e,n,r){return arguments.length===1?Ql(t):new Et(t,e,n,r??1)}function Et(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Dr(Et,Lr,Ii(hn,{brighter(t){return t=t==null?Pr:Math.pow(Pr,t),new Et(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,t),new Et(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Et(On(this.r),On(this.g),On(this.b),ka(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:e0,formatHex:e0,formatHex8:w8,formatRgb:n0,toString:n0}));function e0(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}`}function w8(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}${Un((isNaN(this.opacity)?1:this.opacity)*255)}`}function n0(){const t=ka(this.opacity);return`${t===1?"rgb(":"rgba("}${On(this.r)}, ${On(this.g)}, ${On(this.b)}${t===1?")":`, ${t})`}`}function ka(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function On(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Un(t){return t=On(t),(t<16?"0":"")+t.toString(16)}function r0(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ae(t,e,n,r)}function i0(t){if(t instanceof Ae)return new Ae(t.h,t.s,t.l,t.opacity);if(t instanceof hn||(t=pn(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 Ia(t,e,n,r){return arguments.length===1?i0(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}Dr(Ae,Ia,Ii(hn,{brighter(t){return t=t==null?Pr:Math.pow(Pr,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 Et(Jl(t>=240?t-240:t+120,i,r),Jl(t,i,r),Jl(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ae(o0(this.h),Na(this.s),Na(this.l),ka(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=ka(this.opacity);return`${t===1?"hsl(":"hsla("}${o0(this.h)}, ${Na(this.s)*100}%, ${Na(this.l)*100}%${t===1?")":`, ${t})`}`}}));function o0(t){return t=(t||0)%360,t<0?t+360:t}function Na(t){return Math.max(0,Math.min(1,t||0))}function Jl(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,Fa=18,u0=.96422,l0=1,c0=.82521,f0=4/29,Cr=6/29,h0=3*Cr*Cr,$8=Cr*Cr*Cr;function p0(t){if(t instanceof Me)return new Me(t.l,t.a,t.b,t.opacity);if(t instanceof Ne)return g0(t);t instanceof Et||(t=Ql(t));var e=rc(t.r),n=rc(t.g),r=rc(t.b),i=tc((.2225045*e+.7168786*n+.0606169*r)/l0),o,a;return e===n&&n===r?o=a=i:(o=tc((.4360747*e+.3850649*n+.1430804*r)/u0),a=tc((.0139322*e+.0971045*n+.7141733*r)/c0)),new Me(116*i-16,500*(o-i),200*(i-a),t.opacity)}function S8(t,e){return new Me(t,0,0,e??1)}function Ga(t,e,n,r){return arguments.length===1?p0(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}Dr(Me,Ga,Ii(hn,{brighter(t){return new Me(this.l+Fa*(t??1),this.a,this.b,this.opacity)},darker(t){return new Me(this.l-Fa*(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*ec(e),t=l0*ec(t),n=c0*ec(n),new Et(nc(3.1338561*e-1.6168667*t-.4906146*n),nc(-.9787684*e+1.9161415*t+.033454*n),nc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function tc(t){return t>$8?Math.pow(t,1/3):t/h0+f0}function ec(t){return t>Cr?t*t*t:h0*(t-f0)}function nc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function rc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function d0(t){if(t instanceof Ne)return new Ne(t.h,t.c,t.l,t.opacity);if(t instanceof Me||(t=p0(t)),t.a===0&&t.b===0)return new Ne(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*s0;return new Ne(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function A8(t,e,n,r){return arguments.length===1?d0(t):new Ne(n,e,t,r??1)}function za(t,e,n,r){return arguments.length===1?d0(t):new Ne(t,e,n,r??1)}function Ne(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 Me(t.l,0,0,t.opacity);var e=t.h*a0;return new Me(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Dr(Ne,za,Ii(hn,{brighter(t){return new Ne(this.h,this.c,this.l+Fa*(t??1),this.opacity)},darker(t){return new Ne(this.h,this.c,this.l-Fa*(t??1),this.opacity)},rgb(){return g0(this).rgb()}}));var m0=-.14861,ic=1.78277,oc=-.29227,Oa=-.90649,Fi=1.97294,y0=Fi*Oa,b0=Fi*ic,v0=ic*oc-Oa*m0;function M8(t){if(t instanceof Bn)return new Bn(t.h,t.s,t.l,t.opacity);t instanceof Et||(t=Ql(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=(Fi*(n-i)-oc*o)/Oa,s=Math.sqrt(a*a+o*o)/(Fi*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 De(t,e,n,r){return arguments.length===1?M8(t):new Bn(t,e,n,r??1)}function Bn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Dr(Bn,De,Ii(hn,{brighter(t){return t=t==null?Pr:Math.pow(Pr,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 Et(255*(e+n*(m0*r+ic*i)),255*(e+n*(oc*r+Oa*i)),255*(e+n*(Fi*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 Ua=t=>()=>t;function $0(t,e){return function(n){return t+n*e}}function D8(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 Ba(t,e){var n=e-t;return n?$0(t,n>180||n<-180?n-360*Math.round(n/360):n):Ua(isNaN(t)?e:t)}function P8(t){return(t=+t)==1?Rt:function(e,n){return n-e?D8(e,n,t):Ua(isNaN(e)?n:e)}}function Rt(t,e){var n=e-t;return n?$0(t,n):Ua(isNaN(t)?e:t)}const Gi=function t(e){var n=P8(e);function r(i,o){var a=n((i=Lr(i)).r,(o=Lr(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=Rt(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=u(c),i.opacity=l(c),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=Lr(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),T8=S0(w0);function ac(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 L8(t,e){return(M0(e)?ac:D0)(t,e)}function D0(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]=qe(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 de(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function T0(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]=qe(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var sc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,uc=new RegExp(sc.source,"g");function C8(t){return function(){return t}}function E8(t){return function(e){return t(e)+""}}function lc(t,e){var n=sc.lastIndex=uc.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=sc.exec(t))&&(i=uc.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:de(r,i)})),n=uc.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?E8(u[0].x):C8(e):(e=u.length,function(l){for(var c=0,f;c<e;++c)s[(f=u[c]).i]=f.x(l);return s.join("")})}function qe(t,e){var n=typeof e,r;return e==null||n==="boolean"?Ua(e):(n==="number"?de:n==="string"?(r=pn(e))?(e=r,Gi):lc:e instanceof pn?Gi:e instanceof Date?P0:M0(e)?ac:Array.isArray(e)?D0:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?T0:de)(t,e)}function R8(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function k8(t,e){var n=Ba(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Ya(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var L0=180/Math.PI,cc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function C0(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 Ha;function I8(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?cc:C0(e.a,e.b,e.c,e.d,e.e,e.f)}function N8(t){return t==null||(Ha||(Ha=document.createElementNS("http://www.w3.org/2000/svg","g")),Ha.setAttribute("transform",t),!(t=Ha.transform.baseVal.consolidate()))?cc:(t=t.matrix,C0(t.a,t.b,t.c,t.d,t.e,t.f))}function E0(t,e,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,c,f,h,p,d){if(l!==f||c!==h){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:de(l,f)},{i:g-2,x:de(c,h)})}else(f||h)&&p.push("translate("+f+e+h+n)}function a(l,c,f,h){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:de(l,c)})):c&&f.push(i(f)+"rotate("+c+r)}function s(l,c,f,h){l!==c?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:de(l,c)}):c&&f.push(i(f)+"skewX("+c+r)}function u(l,c,f,h,p,d){if(l!==f||c!==h){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:de(l,f)},{i:g-2,x:de(c,h)})}else(f!==1||h!==1)&&p.push(i(p)+"scale("+f+","+h+")")}return function(l,c){var f=[],h=[];return l=t(l),c=t(c),o(l.translateX,l.translateY,c.translateX,c.translateY,f,h),a(l.rotate,c.rotate,f,h),s(l.skewX,c.skewX,f,h),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,f,h),l=c=null,function(p){for(var d=-1,g=h.length,m;++d<g;)f[(m=h[d]).i]=m.x(p);return f.join("")}}}var R0=E0(I8,"px, ","px)","deg)"),k0=E0(N8,", ",")",")"),F8=1e-12;function I0(t){return((t=Math.exp(t))+1/t)/2}function G8(t){return((t=Math.exp(t))-1/t)/2}function z8(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],l=o[2],c=a[0],f=a[1],h=a[2],p=c-s,d=f-u,g=p*p+d*d,m,b;if(g<F8)b=Math.log(h/l)/e,m=function(P){return[s+P*p,u+P*d,l*Math.exp(e*P*b)]};else{var x=Math.sqrt(g),v=(h*h-l*l+r*g)/(2*l*n*x),y=(h*h-l*l-r*g)/(2*h*n*x),w=Math.log(Math.sqrt(v*v+1)-v),D=Math.log(Math.sqrt(y*y+1)-y);b=(D-w)/e,m=function(P){var S=P*b,_=I0(w),T=l/(n*x)*(_*z8(e*S+w)-G8(w));return[s+T*p,u+T*d,l*_/I0(e*S+w)]}}return m.duration=b*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=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 O8=F0(Ba);var U8=F0(Rt);function B8(t,e){var n=Rt((t=Ga(t)).l,(e=Ga(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 G0(t){return function(e,n){var r=t((e=za(e)).h,(n=za(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 Y8=G0(Ba);var H8=G0(Rt);function z0(t){return function e(n){n=+n;function r(i,o){var a=t((i=De(i)).h,(o=De(o)).h),s=Rt(i.s,o.s),u=Rt(i.l,o.l),l=Rt(i.opacity,o.opacity);return function(c){return i.h=a(c),i.s=s(c),i.l=u(Math.pow(c,n)),i.opacity=l(c),i+""}}return r.gamma=e,r}(1)}const W8=z0(Ba);var Wa=z0(Rt);function O0(t,e){e===void 0&&(e=t,t=qe);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 V8(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Er=0,zi=0,Oi=0,U0=1e3,Va,Ui,ja=0,Yn=0,qa=0,Bi=typeof performance=="object"&&performance.now?performance:Date,B0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Yi(){return Yn||(B0(j8),Yn=Bi.now()+qa)}function j8(){Yn=0}function Hi(){this._call=this._time=this._next=null}Hi.prototype=Xa.prototype={constructor:Hi,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Yi():+n)+(e==null?0:+e),!this._next&&Ui!==this&&(Ui?Ui._next=this:Va=this,Ui=this),this._call=t,this._time=n,fc()},stop:function(){this._call&&(this._call=null,this._time=1/0,fc())}};function Xa(t,e,n){var r=new Hi;return r.restart(t,e,n),r}function Y0(){Yi(),++Er;for(var t=Va,e;t;)(e=Yn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Er}function H0(){Yn=(ja=Bi.now())+qa,Er=zi=0;try{Y0()}finally{Er=0,X8(),Yn=0}}function q8(){var t=Bi.now(),e=t-ja;e>U0&&(qa-=e,ja=t)}function X8(){for(var t,e=Va,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:Va=n);Ui=t,fc(r)}function fc(t){if(!Er){zi&&(zi=clearTimeout(zi));var e=t-Yn;e>24?(t<1/0&&(zi=setTimeout(H0,t-Bi.now()-qa)),Oi&&(Oi=clearInterval(Oi))):(Oi||(ja=Bi.now(),Oi=setInterval(q8,U0)),Er=1,B0(H0))}}function hc(t,e,n){var r=new Hi;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function Z8(t,e,n){var r=new Hi,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?Yi():+s,r._restart(function u(l){l+=i,r._restart(u,i+=a,s),o(l)},a,s)},r.restart(t,e,n),r)}var K8=Nn("start","end","cancel","interrupt"),Q8=[],W0=0,pc=1,dc=2,Za=3,V0=4,gc=5,Ka=6;function Qa(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;J8(t,n,{name:e,index:r,group:i,on:K8,tween:Q8,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:W0})}function mc(t,e){var n=Pe(t,e);if(n.state>W0)throw new Error("too late; already scheduled");return n}function Fe(t,e){var n=Pe(t,e);if(n.state>Za)throw new Error("too late; already running");return n}function Pe(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function J8(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Xa(o,0,n.time);function o(l){n.state=pc,n.timer.restart(a,n.delay,n.time),n.delay<=l&&a(l-n.delay)}function a(l){var c,f,h,p;if(n.state!==pc)return u();for(c in r)if(p=r[c],p.name===n.name){if(p.state===Za)return hc(a);p.state===V0?(p.state=Ka,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[c]):+c<e&&(p.state=Ka,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[c])}if(hc(function(){n.state===Za&&(n.state=V0,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=dc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===dc){for(n.state=Za,i=new Array(h=n.tween.length),c=0,f=-1;c<h;++c)(p=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++f]=p);i.length=f+1}}function s(l){for(var c=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(u),n.state=gc,1),f=-1,h=i.length;++f<h;)i[f].call(t,c);n.state===gc&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=Ka,n.timer.stop(),delete r[e];for(var l 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>dc&&r.state<gc,r.state=Ka,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function tM(t){return this.each(function(){Hn(this,t)})}function eM(t,e){var n,r;return function(){var i=Fe(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 nM(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Fe(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function rM(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Pe(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?eM:nM)(n,t,e))}function yc(t,e,n){var r=t._id;return t.each(function(){var i=Fe(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Pe(i,r).value[e]}}function j0(t,e){var n;return(typeof e=="number"?de:e instanceof pn?Gi:(n=pn(e))?(e=n,Gi):lc)(t,e)}function iM(t){return function(){this.removeAttribute(t)}}function oM(t){return function(){this.removeAttributeNS(t.space,t.local)}}function aM(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 sM(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 uM(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 lM(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 cM(t,e){var n=Ri(t),r=n==="transform"?k0:j0;return this.attrTween(t,typeof e=="function"?(n.local?lM:uM)(n,r,yc(this,"attr."+t,e)):e==null?(n.local?oM:iM)(n):(n.local?sM:aM)(n,r,e))}function fM(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function hM(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function pM(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&hM(t,o)),n}return i._value=e,i}function dM(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&fM(t,o)),n}return i._value=e,i}function gM(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?pM:dM)(r,e))}function mM(t,e){return function(){mc(this,t).delay=+e.apply(this,arguments)}}function yM(t,e){return e=+e,function(){mc(this,t).delay=e}}function bM(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?mM:yM)(e,t)):Pe(this.node(),e).delay}function vM(t,e){return function(){Fe(this,t).duration=+e.apply(this,arguments)}}function xM(t,e){return e=+e,function(){Fe(this,t).duration=e}}function _M(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?vM:xM)(e,t)):Pe(this.node(),e).duration}function wM(t,e){if(typeof e!="function")throw new Error;return function(){Fe(this,t).ease=e}}function $M(t){var e=this._id;return arguments.length?this.each(wM(e,t)):Pe(this.node(),e).ease}function SM(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Fe(this,t).ease=n}}function AM(t){if(typeof t!="function")throw new Error;return this.each(SM(this._id,t))}function MM(t){typeof t!="function"&&(t=Wl(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,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new Ge(r,this._parents,this._name,this._id)}function DM(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],l=n[s],c=u.length,f=a[s]=new Array(c),h,p=0;p<c;++p)(h=u[p]||l[p])&&(f[p]=h);for(;s<r;++s)a[s]=e[s];return new Ge(a,this._parents,this._name,this._id)}function PM(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 TM(t,e,n){var r,i,o=PM(e)?mc:Fe;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function LM(t,e){var n=this._id;return arguments.length<2?Pe(this.node(),n).on.on(t):this.each(TM(n,t,e))}function CM(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function EM(){return this.on("end.remove",CM(this._id))}function RM(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Pa(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,l=o[a]=new Array(u),c,f,h=0;h<u;++h)(c=s[h])&&(f=t.call(c,c.__data__,h,s))&&("__data__"in c&&(f.__data__=c.__data__),l[h]=f,Qa(l[h],e,n,h,l,Pe(c,n)));return new Ge(o,this._parents,e,n)}function kM(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Hl(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],l=u.length,c,f=0;f<l;++f)if(c=u[f]){for(var h=t.call(c,c.__data__,f,u),p,d=Pe(c,n),g=0,m=h.length;g<m;++g)(p=h[g])&&Qa(p,e,n,g,h,d);o.push(h),a.push(c)}return new Ge(o,a,e,n)}var IM=Gn.prototype.constructor;function NM(){return new IM(this._groups,this._parents)}function FM(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 GM(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 zM(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 OM(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Fe(this,t),l=u.on,c=u.value[o]==null?s||(s=q0(e)):void 0;(l!==n||i!==c)&&(r=(n=l).copy()).on(a,i=c),u.on=r}}function UM(t,e,n){var r=(t+="")=="transform"?R0:j0;return e==null?this.styleTween(t,FM(t,r)).on("end.style."+t,q0(t)):typeof e=="function"?this.styleTween(t,zM(t,r,yc(this,"style."+t,e))).each(OM(this._id,t)):this.styleTween(t,GM(t,r,e),n).on("end.style."+t,null)}function BM(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function YM(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&BM(t,a,n)),r}return o._value=e,o}function HM(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,YM(t,e,n??""))}function WM(t){return function(){this.textContent=t}}function VM(t){return function(){var e=t(this);this.textContent=e??""}}function jM(t){return this.tween("text",typeof t=="function"?VM(yc(this,"text",t)):WM(t==null?"":t+""))}function qM(t){return function(e){this.textContent=t.call(this,e)}}function XM(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&qM(i)),e}return r._value=t,r}function ZM(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,XM(t))}function KM(){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,l=0;l<s;++l)if(u=a[l]){var c=Pe(u,e);Qa(u,t,n,l,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ge(r,this._parents,t,n)}function QM(){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 l=Fe(this,r),c=l.on;c!==t&&(e=(t=c).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),l.on=e}),i===0&&o()})}var JM=0;function Ge(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function X0(t){return Gn().transition(t)}function Z0(){return++JM}var Xe=Gn.prototype;Ge.prototype=X0.prototype={constructor:Ge,select:RM,selectAll:kM,selectChild:Xe.selectChild,selectChildren:Xe.selectChildren,filter:MM,merge:DM,selection:NM,transition:KM,call:Xe.call,nodes:Xe.nodes,node:Xe.node,size:Xe.size,empty:Xe.empty,each:Xe.each,on:LM,attr:cM,attrTween:gM,style:UM,styleTween:HM,text:jM,textTween:ZM,remove:EM,tween:rM,delay:bM,duration:_M,ease:$M,easeVarying:AM,end:QM,[Symbol.iterator]:Xe[Symbol.iterator]};const t4=t=>+t;function e4(t){return t*t}function n4(t){return t*(2-t)}function K0(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function r4(t){return t*t*t}function i4(t){return--t*t*t+1}function Wi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var bc=3,o4=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(bc),a4=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(bc),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}(bc),J0=Math.PI,tm=J0/2;function s4(t){return+t==1?1:1-Math.cos(t*tm)}function u4(t){return Math.sin(t*tm)}function em(t){return(1-Math.cos(J0*t))/2}function dn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function l4(t){return dn(1-+t)}function c4(t){return 1-dn(t)}function nm(t){return((t*=2)<=1?dn(1-t):2-dn(t-1))/2}function f4(t){return 1-Math.sqrt(1-t*t)}function h4(t){return Math.sqrt(1- --t*t)}function rm(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var vc=4/11,p4=6/11,d4=8/11,g4=3/4,m4=9/11,y4=10/11,b4=15/16,v4=21/22,x4=63/64,Ja=1/vc/vc;function _4(t){return 1-Vi(1-t)}function Vi(t){return(t=+t)<vc?Ja*t*t:t<d4?Ja*(t-=p4)*t+g4:t<y4?Ja*(t-=m4)*t+b4:Ja*(t-=v4)*t+x4}function w4(t){return((t*=2)<=1?1-Vi(1-t):Vi(t-1)+1)/2}var xc=1.70158,$4=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(xc),S4=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(xc),im=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}(xc),Rr=2*Math.PI,_c=1,wc=.3,A4=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Rr);function i(o){return e*dn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*Rr)},i.period=function(o){return t(e,o)},i}(_c,wc),ji=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Rr);function i(o){return 1-e*dn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*Rr)},i.period=function(o){return t(e,o)},i}(_c,wc),M4=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Rr);function i(o){return((o=o*2-1)<0?e*dn(-o)*Math.sin((r-o)/n):2-e*dn(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return t(o,n*Rr)},i.period=function(o){return t(e,o)},i}(_c,wc),D4={time:null,delay:0,duration:250,ease:Wi};function P4(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 T4(t){var e,n;t instanceof Ge?(e=t._id,t=t._name):(e=Z0(),(n=D4).time=Yi(),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,l=0;l<s;++l)(u=a[l])&&Qa(u,t,e,l,a,n||P4(u,e));return new Ge(r,this._parents,t,e)}Gn.prototype.interrupt=tM,Gn.prototype.transition=T4;var L4=[null];function C4(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>pc&&r.name===e)return new Ge([[t]],L4,e,+i)}return null}const $c=t=>()=>t;function E4(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 R4(t){t.stopImmediatePropagation()}function Sc(t){t.preventDefault(),t.stopImmediatePropagation()}var om={name:"drag"},Ac={name:"space"},kr={name:"handle"},Ir={name:"center"};const{abs:am,max:Gt,min:zt}=Math;function sm(t){return[+t[0],+t[1]]}function Mc(t){return[sm(t[0]),sm(t[1])]}var ts={name:"x",handles:["w","e"].map(qi),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(qi),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]]}},k4={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(qi),input:function(t){return t==null?null:Mc(t)},output:function(t){return t}},Ze={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"},um={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},lm={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},I4={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},N4={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function qi(t){return{type:t}}function F4(t){return!t.ctrlKey&&!t.button}function G4(){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 z4(){return navigator.maxTouchPoints||"ontouchstart"in this}function Dc(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function O4(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function U4(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function B4(){return Pc(ts)}function Y4(){return Pc(es)}function H4(){return Pc(k4)}function Pc(t){var e=G4,n=F4,r=z4,i=!0,o=Nn("start","brush","end"),a=6,s;function u(m){var b=m.property("__brush",g).selectAll(".overlay").data([qi("overlay")]);b.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ze.overlay).merge(b).each(function(){var v=Dc(this).extent;X(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([qi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Ze.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 Ze[v.type]}),m.each(l).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).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,b,x){m.tween?m.on("start.brush",function(v){c(this,arguments).beforestart().start(v)}).on("interrupt.brush end.brush",function(v){c(this,arguments).end(v)}).tween("brush",function(){var v=this,y=v.__brush,w=c(v,arguments),D=y.selection,P=t.input(typeof b=="function"?b.apply(this,arguments):b,y.extent),S=qe(D,P);function _(T){y.selection=T===1&&P===null?null:S(T),l.call(v),w.brush()}return D!==null&&P!==null?_:_(1)}):m.each(function(){var v=this,y=arguments,w=v.__brush,D=t.input(typeof b=="function"?b.apply(v,y):b,w.extent),P=c(v,y).beforestart();Hn(v),w.selection=D===null?null:D,l.call(v),P.start(x).brush(x).end(x)})},u.clear=function(m,b){u.move(m,null,b)};function l(){var m=X(this),b=Dc(this).selection;b?(m.selectAll(".selection").style("display",null).attr("x",b[0][0]).attr("y",b[0][1]).attr("width",b[1][0]-b[0][0]).attr("height",b[1][1]-b[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(x){return x.type[x.type.length-1]==="e"?b[1][0]-a/2:b[0][0]-a/2}).attr("y",function(x){return x.type[0]==="s"?b[1][1]-a/2:b[0][1]-a/2}).attr("width",function(x){return x.type==="n"||x.type==="s"?b[1][0]-b[0][0]+a:a}).attr("height",function(x){return x.type==="e"||x.type==="w"?b[1][1]-b[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(m,b,x){var v=m.__brush.emitter;return v&&(!x||!v.clean)?v:new f(m,b,x)}function f(m,b,x){this.that=m,this.args=b,this.state=m.__brush,this.active=0,this.clean=x}f.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,b){return this.starting?(this.starting=!1,this.emit("start",m,b)):this.emit("brush",m),this},brush:function(m,b){return this.emit("brush",m,b),this},end:function(m,b){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,b)),this},emit:function(m,b,x){var v=X(this.that).datum();o.call(m,this.that,new E4(m,{sourceEvent:b,target:u,selection:t.output(this.state.selection),mode:x,dispatch:o}),v)}};function h(m){if(s&&!m.touches||!n.apply(this,arguments))return;var b=this,x=m.target.__data__.type,v=(i&&m.metaKey?x="overlay":x)==="selection"?om:i&&m.altKey?Ir:kr,y=t===es?null:I4[x],w=t===ts?null:N4[x],D=Dc(b),P=D.extent,S=D.selection,_=P[0][0],T,$,N=P[0][1],R,A,L=P[1][0],M,z,U=P[1][1],C,k,E=0,G=0,j,Q=y&&w&&i&&m.shiftKey,F,q,V=Array.from(m.touches||[m],st=>{const Mt=st.identifier;return st=ue(st,b),st.point0=st.slice(),st.identifier=Mt,st});Hn(b);var K=c(b,arguments,!0).beforestart();if(x==="overlay"){S&&(j=!0);const st=[V[0],V[1]||V[0]];D.selection=S=[[T=t===es?_:zt(st[0][0],st[1][0]),R=t===ts?N:zt(st[0][1],st[1][1])],[M=t===es?L:Gt(st[0][0],st[1][0]),C=t===ts?U:Gt(st[0][1],st[1][1])]],V.length>1&&mt(m)}else T=S[0][0],R=S[0][1],M=S[1][0],C=S[1][1];$=T,A=R,z=M,k=C;var W=X(b).attr("pointer-events","none"),nt=W.selectAll(".overlay").attr("cursor",Ze[x]);if(m.touches)K.moved=H,K.ended=ht;else{var ut=X(m.view).on("mousemove.brush",H,!0).on("mouseup.brush",ht,!0);i&&ut.on("keydown.brush",Yt,!0).on("keyup.brush",ee,!0),La(m.view)}l.call(b),K.start(m,v.name);function H(st){for(const Mt of st.changedTouches||[st])for(const No of V)No.identifier===Mt.identifier&&(No.cur=ue(Mt,b));if(Q&&!F&&!q&&V.length===1){const Mt=V[0];am(Mt.cur[0]-Mt[0])>am(Mt.cur[1]-Mt[1])?q=!0:F=!0}for(const Mt of V)Mt.cur&&(Mt[0]=Mt.cur[0],Mt[1]=Mt.cur[1]);j=!0,Sc(st),mt(st)}function mt(st){const Mt=V[0],No=Mt.point0;var An;switch(E=Mt[0]-No[0],G=Mt[1]-No[1],v){case Ac:case om:{y&&(E=Gt(_-T,zt(L-M,E)),$=T+E,z=M+E),w&&(G=Gt(N-R,zt(U-C,G)),A=R+G,k=C+G);break}case kr:{V[1]?(y&&($=Gt(_,zt(L,V[0][0])),z=Gt(_,zt(L,V[1][0])),y=1),w&&(A=Gt(N,zt(U,V[0][1])),k=Gt(N,zt(U,V[1][1])),w=1)):(y<0?(E=Gt(_-T,zt(L-T,E)),$=T+E,z=M):y>0&&(E=Gt(_-M,zt(L-M,E)),$=T,z=M+E),w<0?(G=Gt(N-R,zt(U-R,G)),A=R+G,k=C):w>0&&(G=Gt(N-C,zt(U-C,G)),A=R,k=C+G));break}case Ir:{y&&($=Gt(_,zt(L,T-E*y)),z=Gt(_,zt(L,M+E*y))),w&&(A=Gt(N,zt(U,R-G*w)),k=Gt(N,zt(U,C+G*w)));break}}z<$&&(y*=-1,An=T,T=M,M=An,An=$,$=z,z=An,x in um&&nt.attr("cursor",Ze[x=um[x]])),k<A&&(w*=-1,An=R,R=C,C=An,An=A,A=k,k=An,x in lm&&nt.attr("cursor",Ze[x=lm[x]])),D.selection&&(S=D.selection),F&&($=S[0][0],z=S[1][0]),q&&(A=S[0][1],k=S[1][1]),(S[0][0]!==$||S[0][1]!==A||S[1][0]!==z||S[1][1]!==k)&&(D.selection=[[$,A],[z,k]],l.call(b),K.brush(st,v.name))}function ht(st){if(R4(st),st.touches){if(st.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Ca(st.view,j),ut.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);W.attr("pointer-events","all"),nt.attr("cursor",Ze.overlay),D.selection&&(S=D.selection),O4(S)&&(D.selection=null,l.call(b)),K.end(st,v.name)}function Yt(st){switch(st.keyCode){case 16:{Q=y&&w;break}case 18:{v===kr&&(y&&(M=z-E*y,T=$+E*y),w&&(C=k-G*w,R=A+G*w),v=Ir,mt(st));break}case 32:{(v===kr||v===Ir)&&(y<0?M=z-E:y>0&&(T=$-E),w<0?C=k-G:w>0&&(R=A-G),v=Ac,nt.attr("cursor",Ze.selection),mt(st));break}default:return}Sc(st)}function ee(st){switch(st.keyCode){case 16:{Q&&(F=q=Q=!1,mt(st));break}case 18:{v===Ir&&(y<0?M=z:y>0&&(T=$),w<0?C=k:w>0&&(R=A),v=kr,mt(st));break}case 32:{v===Ac&&(st.altKey?(y&&(M=z-E*y,T=$+E*y),w&&(C=k-G*w,R=A+G*w),v=Ir):(y<0?M=z:y>0&&(T=$),w<0?C=k:w>0&&(R=A),v=kr),nt.attr("cursor",Ze[x]),mt(st));break}default:return}Sc(st)}}function p(m){c(this,arguments).moved(m)}function d(m){c(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=Mc(e.apply(this,arguments)),m.dim=t,m}return u.extent=function(m){return arguments.length?(e=typeof m=="function"?m:$c(Mc(m)),u):e},u.filter=function(m){return arguments.length?(n=typeof m=="function"?m:$c(!!m),u):n},u.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:$c(!!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 cm=Math.abs,Nr=Math.cos,Fr=Math.sin,fm=Math.PI,ns=fm/2,hm=fm*2,pm=Math.max,Tc=1e-12;function Lc(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function W4(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function V4(){return Cc(!1,!1)}function j4(){return Cc(!1,!0)}function q4(){return Cc(!0,!1)}function Cc(t,e){var n=0,r=null,i=null,o=null;function a(s){var u=s.length,l=new Array(u),c=Lc(0,u),f=new Array(u*u),h=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 b=0;b<u;++b)m+=s[g*u+b]+t*s[b*u+g];p+=l[g]=m}p=pm(0,hm-n*u)/p,d=p?n:hm/u;{let g=0;r&&c.sort((m,b)=>r(l[m],l[b]));for(const m of c){const b=g;if(t){const x=Lc(~u+1,u).filter(v=>v<0?s[~v*u+m]:s[m*u+v]);i&&x.sort((v,y)=>i(v<0?-s[~v*u+m]:s[m*u+v],y<0?-s[~y*u+m]:s[m*u+y]));for(const v of x)if(v<0){const y=f[~v*u+m]||(f[~v*u+m]={source:null,target:null});y.target={index:m,startAngle:g,endAngle:g+=s[~v*u+m]*p,value:s[~v*u+m]}}else{const y=f[m*u+v]||(f[m*u+v]={source:null,target:null});y.source={index:m,startAngle:g,endAngle:g+=s[m*u+v]*p,value:s[m*u+v]}}h[m]={index:m,startAngle:b,endAngle:g,value:l[m]}}else{const x=Lc(0,u).filter(v=>s[m*u+v]||s[v*u+m]);i&&x.sort((v,y)=>i(s[m*u+v],s[m*u+y]));for(const v of x){let y;if(m<v?(y=f[m*u+v]||(f[m*u+v]={source:null,target:null}),y.source={index:m,startAngle:g,endAngle:g+=s[m*u+v]*p,value:s[m*u+v]}):(y=f[v*u+m]||(f[v*u+m]={source:null,target:null}),y.target={index:m,startAngle:g,endAngle:g+=s[m*u+v]*p,value:s[m*u+v]},m===v&&(y.source=y.target)),y.source&&y.target&&y.source.value<y.target.value){const w=y.source;y.source=y.target,y.target=w}}h[m]={index:m,startAngle:b,endAngle:g,value:l[m]}}g+=d}}return f=Object.values(f),f.groups=h,o?f.sort(o):f}return a.padAngle=function(s){return arguments.length?(n=pm(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=W4(s))._=s,a):o&&o._},a}const Ec=Math.PI,Rc=2*Ec,Wn=1e-6,X4=Rc-Wn;function dm(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function Z4(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return dm;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 Xi=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?dm:Z4(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,l=i-n,c=a-e,f=s-n,h=c*c+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(h>Wn)if(!(Math.abs(f*u-l*c)>Wn)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,d=i-s,g=u*u+l*l,m=p*p+d*d,b=Math.sqrt(g),x=Math.sqrt(h),v=o*Math.tan((Ec-Math.acos((g+h-m)/(2*b*x)))/2),y=v/x,w=v/b;Math.abs(y-1)>Wn&&this._append`L${e+y*c},${n+y*f}`,this._append`A${o},${o},0,0,${+(f*p>c*d)},${this._x1=e+w*u},${this._y1=n+w*l}`}}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),l=e+s,c=n+u,f=1^a,h=a?i-o:o-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Wn||Math.abs(this._y1-c)>Wn)&&this._append`L${l},${c}`,r&&(h<0&&(h=h%Rc+Rc),h>X4?this._append`A${r},${r},0,1,${f},${e-s},${n-u}A${r},${r},0,1,${f},${this._x1=l},${this._y1=c}`:h>Wn&&this._append`A${r},${r},0,${+(h>=Ec)},${f},${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 kc(){return new Xi}kc.prototype=Xi.prototype;function K4(t=3){return new Xi(+t)}var Q4=Array.prototype.slice;function Vn(t){return function(){return t}}function J4(t){return t.source}function tD(t){return t.target}function gm(t){return t.radius}function eD(t){return t.startAngle}function nD(t){return t.endAngle}function rD(){return 0}function iD(){return 10}function mm(t){var e=J4,n=tD,r=gm,i=gm,o=eD,a=nD,s=rD,u=null;function l(){var c,f=e.apply(this,arguments),h=n.apply(this,arguments),p=s.apply(this,arguments)/2,d=Q4.call(arguments),g=+r.apply(this,(d[0]=f,d)),m=o.apply(this,d)-ns,b=a.apply(this,d)-ns,x=+i.apply(this,(d[0]=h,d)),v=o.apply(this,d)-ns,y=a.apply(this,d)-ns;if(u||(u=c=kc()),p>Tc&&(cm(b-m)>p*2+Tc?b>m?(m+=p,b-=p):(m-=p,b+=p):m=b=(m+b)/2,cm(y-v)>p*2+Tc?y>v?(v+=p,y-=p):(v-=p,y+=p):v=y=(v+y)/2),u.moveTo(g*Nr(m),g*Fr(m)),u.arc(0,0,g,m,b),m!==v||b!==y)if(t){var w=+t.apply(this,arguments),D=x-w,P=(v+y)/2;u.quadraticCurveTo(0,0,D*Nr(v),D*Fr(v)),u.lineTo(x*Nr(P),x*Fr(P)),u.lineTo(D*Nr(y),D*Fr(y))}else u.quadraticCurveTo(0,0,x*Nr(v),x*Fr(v)),u.arc(0,0,x,v,y);if(u.quadraticCurveTo(0,0,g*Nr(m),g*Fr(m)),u.closePath(),c)return u=null,c+""||null}return t&&(l.headRadius=function(c){return arguments.length?(t=typeof c=="function"?c:Vn(+c),l):t}),l.radius=function(c){return arguments.length?(r=i=typeof c=="function"?c:Vn(+c),l):r},l.sourceRadius=function(c){return arguments.length?(r=typeof c=="function"?c:Vn(+c),l):r},l.targetRadius=function(c){return arguments.length?(i=typeof c=="function"?c:Vn(+c),l):i},l.startAngle=function(c){return arguments.length?(o=typeof c=="function"?c:Vn(+c),l):o},l.endAngle=function(c){return arguments.length?(a=typeof c=="function"?c:Vn(+c),l):a},l.padAngle=function(c){return arguments.length?(s=typeof c=="function"?c:Vn(+c),l):s},l.source=function(c){return arguments.length?(e=c,l):e},l.target=function(c){return arguments.length?(n=c,l):n},l.context=function(c){return arguments.length?(u=c??null,l):u},l}function oD(){return mm()}function aD(){return mm(iD)}var sD=Array.prototype,ym=sD.slice;function uD(t,e){return t-e}function lD(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}const gn=t=>()=>t;function cD(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=fD(t,e[n]))return i;return 0}function fD(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],l=u[0],c=u[1],f=t[s],h=f[0],p=f[1];if(hD(u,f,e))return 0;c>r!=p>r&&n<(h-l)*(r-c)/(p-c)+l&&(i=-i)}return i}function hD(t,e,n){var r;return pD(t,e,n)&&dD(t[r=+(t[0]===e[0])],n[r],e[r])}function pD(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function dD(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function gD(){}var Ke=[[],[[[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 Ic(){var t=1,e=1,n=Fl,r=u;function i(l){var c=n(l);if(Array.isArray(c))c=c.slice().sort(uD);else{const f=Di(l,mD);for(c=kn(...Nl(f[0],f[1],c),c);c[c.length-1]>=f[1];)c.pop();for(;c[1]<f[0];)c.shift()}return c.map(f=>o(l,f))}function o(l,c){const f=c==null?NaN:+c;if(isNaN(f))throw new Error(`invalid value: ${c}`);var h=[],p=[];return a(l,f,function(d){r(d,l,f),lD(d)>0?h.push([d]):p.push(d)}),p.forEach(function(d){for(var g=0,m=h.length,b;g<m;++g)if(cD((b=h[g])[0],d)!==-1){b.push(d);return}}),{type:"MultiPolygon",value:c,coordinates:h}}function a(l,c,f){var h=new Array,p=new Array,d,g,m,b,x,v;for(d=g=-1,b=jn(l[0],c),Ke[b<<1].forEach(y);++d<t-1;)m=b,b=jn(l[d+1],c),Ke[m|b<<1].forEach(y);for(Ke[b<<0].forEach(y);++g<e-1;){for(d=-1,b=jn(l[g*t+t],c),x=jn(l[g*t],c),Ke[b<<1|x<<2].forEach(y);++d<t-1;)m=b,b=jn(l[g*t+t+d+1],c),v=x,x=jn(l[g*t+d+1],c),Ke[m|b<<1|x<<2|v<<3].forEach(y);Ke[b|x<<3].forEach(y)}for(d=-1,x=l[g*t]>=c,Ke[x<<2].forEach(y);++d<t-1;)v=x,x=jn(l[g*t+d+1],c),Ke[x<<2|v<<3].forEach(y);Ke[x<<3].forEach(y);function y(w){var D=[w[0][0]+d,w[0][1]+g],P=[w[1][0]+d,w[1][1]+g],S=s(D),_=s(P),T,$;(T=p[S])?($=h[_])?(delete p[T.end],delete h[$.start],T===$?(T.ring.push(P),f(T.ring)):h[T.start]=p[$.end]={start:T.start,end:$.end,ring:T.ring.concat($.ring)}):(delete p[T.end],T.ring.push(P),p[T.end=_]=T):(T=h[_])?($=p[S])?(delete h[T.start],delete p[$.end],T===$?(T.ring.push(P),f(T.ring)):h[$.start]=p[T.end]={start:$.start,end:T.end,ring:$.ring.concat(T.ring)}):(delete h[T.start],T.ring.unshift(D),h[T.start=S]=T):h[S]=p[_]={start:S,end:_,ring:[D,P]}}}function s(l){return l[0]*2+l[1]*(t+1)*4}function u(l,c,f){l.forEach(function(h){var p=h[0],d=h[1],g=p|0,m=d|0,b=Nc(c[m*t+g]);p>0&&p<t&&g===p&&(h[0]=bm(p,Nc(c[m*t+g-1]),b,f)),d>0&&d<e&&m===d&&(h[1]=bm(d,Nc(c[(m-1)*t+g]),b,f))})}return i.contour=o,i.size=function(l){if(!arguments.length)return[t,e];var c=Math.floor(l[0]),f=Math.floor(l[1]);if(!(c>=0&&f>=0))throw new Error("invalid size");return t=c,e=f,i},i.thresholds=function(l){return arguments.length?(n=typeof l=="function"?l:Array.isArray(l)?gn(ym.call(l)):gn(l),i):n},i.smooth=function(l){return arguments.length?(r=l?u:gD,i):r===u},i}function mD(t){return isFinite(t)?t:NaN}function jn(t,e){return t==null?!1:+t>=e}function Nc(t){return t==null||isNaN(t=+t)?-1/0:t}function bm(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 yD(t){return t[0]}function bD(t){return t[1]}function vD(){return 1}function xD(){var t=yD,e=bD,n=vD,r=960,i=500,o=20,a=2,s=o*3,u=r+s*2>>a,l=i+s*2>>a,c=gn(20);function f(x){var v=new Float32Array(u*l),y=Math.pow(2,-a),w=-1;for(const R of x){var D=(t(R,++w,x)+s)*y,P=(e(R,w,x)+s)*y,S=+n(R,w,x);if(S&&D>=0&&D<u&&P>=0&&P<l){var _=Math.floor(D),T=Math.floor(P),$=D-_-.5,N=P-T-.5;v[_+T*u]+=(1-$)*(1-N)*S,v[_+1+T*u]+=$*(1-N)*S,v[_+1+(T+1)*u]+=$*N*S,v[_+(T+1)*u]+=(1-$)*N*S}}return hg({data:v,width:u,height:l},o*y),v}function h(x){var v=f(x),y=c(v),w=Math.pow(2,2*a);return Array.isArray(y)||(y=kn(Number.MIN_VALUE,Ti(v)/w,y)),Ic().size([u,l]).thresholds(y.map(D=>D*w))(v).map((D,P)=>(D.value=+y[P],p(D)))}h.contours=function(x){var v=f(x),y=Ic().size([u,l]),w=Math.pow(2,2*a),D=P=>{P=+P;var S=p(y.contour(v,P*w));return S.value=P,S};return Object.defineProperty(D,"max",{get:()=>Ti(v)/w}),D};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 b(){return s=o*3,u=r+s*2>>a,l=i+s*2>>a,h}return h.x=function(x){return arguments.length?(t=typeof x=="function"?x:gn(+x),h):t},h.y=function(x){return arguments.length?(e=typeof x=="function"?x:gn(+x),h):e},h.weight=function(x){return arguments.length?(n=typeof x=="function"?x:gn(+x),h):n},h.size=function(x){if(!arguments.length)return[r,i];var v=+x[0],y=+x[1];if(!(v>=0&&y>=0))throw new Error("invalid size");return r=v,i=y,b()},h.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),b()},h.thresholds=function(x){return arguments.length?(c=typeof x=="function"?x:Array.isArray(x)?gn(ym.call(x)):gn(x),h):c},h.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,b()},h}const Qe=11102230246251565e-32,Ot=134217729,_D=(3+8*Qe)*Qe;function Fc(t,e,n,r,i){let o,a,s,u,l=e[0],c=r[0],f=0,h=0;c>l==c>-l?(o=l,l=e[++f]):(o=c,c=r[++h]);let p=0;if(f<t&&h<n)for(c>l==c>-l?(a=l+o,s=o-(a-l),l=e[++f]):(a=c+o,s=o-(a-c),c=r[++h]),o=a,s!==0&&(i[p++]=s);f<t&&h<n;)c>l==c>-l?(a=o+l,u=a-o,s=o-(a-u)+(l-u),l=e[++f]):(a=o+c,u=a-o,s=o-(a-u)+(c-u),c=r[++h]),o=a,s!==0&&(i[p++]=s);for(;f<t;)a=o+l,u=a-o,s=o-(a-u)+(l-u),l=e[++f],o=a,s!==0&&(i[p++]=s);for(;h<n;)a=o+c,u=a-o,s=o-(a-u)+(c-u),c=r[++h],o=a,s!==0&&(i[p++]=s);return(o!==0||p===0)&&(i[p++]=o),p}function wD(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 $D=(3+16*Qe)*Qe,SD=(2+12*Qe)*Qe,AD=(9+64*Qe)*Qe*Qe,Gr=Zi(4),vm=Zi(8),xm=Zi(12),_m=Zi(16),Wt=Zi(4);function MD(t,e,n,r,i,o,a){let s,u,l,c,f,h,p,d,g,m,b,x,v,y,w,D,P,S;const _=t-i,T=n-i,$=e-o,N=r-o;y=_*N,h=Ot*_,p=h-(h-_),d=_-p,h=Ot*N,g=h-(h-N),m=N-g,w=d*m-(y-p*g-d*g-p*m),D=$*T,h=Ot*$,p=h-(h-$),d=$-p,h=Ot*T,g=h-(h-T),m=T-g,P=d*m-(D-p*g-d*g-p*m),b=w-P,f=w-b,Gr[0]=w-(b+f)+(f-P),x=y+b,f=x-y,v=y-(x-f)+(b-f),b=v-D,f=v-b,Gr[1]=v-(b+f)+(f-D),S=x+b,f=S-x,Gr[2]=x-(S-f)+(b-f),Gr[3]=S;let R=wD(4,Gr),A=SD*a;if(R>=A||-R>=A||(f=t-_,s=t-(_+f)+(f-i),f=n-T,l=n-(T+f)+(f-i),f=e-$,u=e-($+f)+(f-o),f=r-N,c=r-(N+f)+(f-o),s===0&&u===0&&l===0&&c===0)||(A=AD*a+_D*Math.abs(R),R+=_*c+N*s-($*l+T*u),R>=A||-R>=A))return R;y=s*N,h=Ot*s,p=h-(h-s),d=s-p,h=Ot*N,g=h-(h-N),m=N-g,w=d*m-(y-p*g-d*g-p*m),D=u*T,h=Ot*u,p=h-(h-u),d=u-p,h=Ot*T,g=h-(h-T),m=T-g,P=d*m-(D-p*g-d*g-p*m),b=w-P,f=w-b,Wt[0]=w-(b+f)+(f-P),x=y+b,f=x-y,v=y-(x-f)+(b-f),b=v-D,f=v-b,Wt[1]=v-(b+f)+(f-D),S=x+b,f=S-x,Wt[2]=x-(S-f)+(b-f),Wt[3]=S;const L=Fc(4,Gr,4,Wt,vm);y=_*c,h=Ot*_,p=h-(h-_),d=_-p,h=Ot*c,g=h-(h-c),m=c-g,w=d*m-(y-p*g-d*g-p*m),D=$*l,h=Ot*$,p=h-(h-$),d=$-p,h=Ot*l,g=h-(h-l),m=l-g,P=d*m-(D-p*g-d*g-p*m),b=w-P,f=w-b,Wt[0]=w-(b+f)+(f-P),x=y+b,f=x-y,v=y-(x-f)+(b-f),b=v-D,f=v-b,Wt[1]=v-(b+f)+(f-D),S=x+b,f=S-x,Wt[2]=x-(S-f)+(b-f),Wt[3]=S;const M=Fc(L,vm,4,Wt,xm);y=s*c,h=Ot*s,p=h-(h-s),d=s-p,h=Ot*c,g=h-(h-c),m=c-g,w=d*m-(y-p*g-d*g-p*m),D=u*l,h=Ot*u,p=h-(h-u),d=u-p,h=Ot*l,g=h-(h-l),m=l-g,P=d*m-(D-p*g-d*g-p*m),b=w-P,f=w-b,Wt[0]=w-(b+f)+(f-P),x=y+b,f=x-y,v=y-(x-f)+(b-f),b=v-D,f=v-b,Wt[1]=v-(b+f)+(f-D),S=x+b,f=S-x,Wt[2]=x-(S-f)+(b-f),Wt[3]=S;const z=Fc(M,xm,4,Wt,_m);return _m[z-1]}function rs(t,e,n,r,i,o){const a=(e-o)*(n-i),s=(t-i)*(r-o),u=a-s,l=Math.abs(a+s);return Math.abs(u)>=$D*l?u:-MD(t,e,n,r,i,o,l)}const wm=Math.pow(2,-52),is=new Uint32Array(512);class os{static from(e,n=CD,r=ED){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,l=-1/0,c=-1/0;for(let _=0;_<a;_++){const T=e[2*_],$=e[2*_+1];T<s&&(s=T),$<u&&(u=$),T>l&&(l=T),$>c&&(c=$),this._ids[_]=_}const f=(s+l)/2,h=(u+c)/2;let p,d,g;for(let _=0,T=1/0;_<a;_++){const $=Gc(f,h,e[2*_],e[2*_+1]);$<T&&(p=_,T=$)}const m=e[2*p],b=e[2*p+1];for(let _=0,T=1/0;_<a;_++){if(_===p)continue;const $=Gc(m,b,e[2*_],e[2*_+1]);$<T&&$>0&&(d=_,T=$)}let x=e[2*d],v=e[2*d+1],y=1/0;for(let _=0;_<a;_++){if(_===p||_===d)continue;const T=TD(m,b,x,v,e[2*_],e[2*_+1]);T<y&&(g=_,y=T)}let w=e[2*g],D=e[2*g+1];if(y===1/0){for(let $=0;$<a;$++)this._dists[$]=e[2*$]-e[0]||e[2*$+1]-e[1];zr(this._ids,this._dists,0,a-1);const _=new Uint32Array(a);let T=0;for(let $=0,N=-1/0;$<a;$++){const R=this._ids[$],A=this._dists[R];A>N&&(_[T++]=R,N=A)}this.hull=_.subarray(0,T),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(rs(m,b,x,v,w,D)<0){const _=d,T=x,$=v;d=g,x=w,v=D,g=_,w=T,D=$}const P=LD(m,b,x,v,w,D);this._cx=P.x,this._cy=P.y;for(let _=0;_<a;_++)this._dists[_]=Gc(e[2*_],e[2*_+1],P.x,P.y);zr(this._ids,this._dists,0,a-1),this._hullStart=p;let S=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,b)]=p,o[this._hashKey(x,v)]=d,o[this._hashKey(w,D)]=g,this.trianglesLen=0,this._addTriangle(p,d,g,-1,-1,-1);for(let _=0,T,$;_<this._ids.length;_++){const N=this._ids[_],R=e[2*N],A=e[2*N+1];if(_>0&&Math.abs(R-T)<=wm&&Math.abs(A-$)<=wm||(T=R,$=A,N===p||N===d||N===g))continue;let L=0;for(let k=0,E=this._hashKey(R,A);k<this._hashSize&&(L=o[(E+k)%this._hashSize],!(L!==-1&&L!==r[L]));k++);L=n[L];let M=L,z;for(;z=r[M],rs(R,A,e[2*M],e[2*M+1],e[2*z],e[2*z+1])>=0;)if(M=z,M===L){M=-1;break}if(M===-1)continue;let U=this._addTriangle(M,N,r[M],-1,-1,i[M]);i[N]=this._legalize(U+2),i[M]=U,S++;let C=r[M];for(;z=r[C],rs(R,A,e[2*C],e[2*C+1],e[2*z],e[2*z+1])<0;)U=this._addTriangle(C,N,z,i[N],-1,i[C]),i[N]=this._legalize(U+2),r[C]=C,S--,C=z;if(M===L)for(;z=n[M],rs(R,A,e[2*z],e[2*z+1],e[2*M],e[2*M+1])<0;)U=this._addTriangle(z,N,M,-1,i[M],i[z]),this._legalize(U+2),i[z]=U,r[M]=M,S--,M=z;this._hullStart=n[N]=M,r[M]=n[C]=N,r[N]=C,o[this._hashKey(R,A)]=N,o[this._hashKey(e[2*M],e[2*M+1])]=M}this.hull=new Uint32Array(S);for(let _=0,T=this._hullStart;_<S;_++)this.hull[_]=T,T=r[T];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,n){return Math.floor(DD(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 l=s-s%3,c=u+(e+1)%3,f=l+(s+2)%3,h=n[a],p=n[e],d=n[c],g=n[f];if(PD(i[2*h],i[2*h+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]=h;const b=r[f];if(b===-1){let v=this._hullStart;do{if(this._hullTri[v]===f){this._hullTri[v]=e;break}v=this._hullPrev[v]}while(v!==this._hullStart)}this._link(e,b),this._link(s,r[a]),this._link(a,f);const x=l+(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 DD(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Gc(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function PD(t,e,n,r,i,o,a,s){const u=t-a,l=e-s,c=n-a,f=r-s,h=i-a,p=o-s,d=u*u+l*l,g=c*c+f*f,m=h*h+p*p;return u*(f*m-g*p)-l*(c*m-g*h)+d*(c*p-f*h)<0}function TD(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,l=o-e,c=a*a+s*s,f=u*u+l*l,h=.5/(a*l-s*u),p=(l*c-s*f)*h,d=(a*f-u*c)*h;return p*p+d*d}function LD(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,l=o-e,c=a*a+s*s,f=u*u+l*l,h=.5/(a*l-s*u),p=t+(l*c-s*f)*h,d=e+(a*f-u*c)*h;return{x:p,y:d}}function zr(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?(zr(t,e,o,r),zr(t,e,n,a-1)):(zr(t,e,n,a-1),zr(t,e,o,r))}}function Ki(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function CD(t){return t[0]}function ED(t){return t[1]}const $m=1e-6;class qn{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)>$m||Math.abs(this._y1-o)>$m)&&(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 zc{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 Sm{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,b=r.length,x,v;g<b;g+=3,m+=2){const y=r[g]*2,w=r[g+1]*2,D=r[g+2]*2,P=e[y],S=e[y+1],_=e[w],T=e[w+1],$=e[D],N=e[D+1],R=_-P,A=T-S,L=$-P,M=N-S,z=(R*M-A*L)*2;if(Math.abs(z)<1e-9){if(o===void 0){o=a=0;for(const C of n)o+=e[C*2],a+=e[C*2+1];o/=n.length,a/=n.length}const U=1e9*Math.sign((o-P)*M-(a-S)*L);x=(P+$)/2-U*M,v=(S+N)/2+U*L}else{const U=1/z,C=R*R+A*A,k=L*L+M*M;x=P+(M*C-A*k)*U,v=S+(R*k-L*C)*U}s[m]=x,s[m+1]=v}let u=n[n.length-1],l,c=u*4,f,h=e[2*u],p,d=e[2*u+1];i.fill(0);for(let g=0;g<n.length;++g)u=n[g],l=c,f=h,p=d,c=u*4,h=e[2*u],d=e[2*u+1],i[l+2]=i[c]=p-d,i[l+3]=i[c+1]=h-f}render(e){const n=e==null?e=new qn:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let c=0,f=r.length;c<f;++c){const h=r[c];if(h<c)continue;const p=Math.floor(c/3)*2,d=Math.floor(h/3)*2,g=a[p],m=a[p+1],b=a[d],x=a[d+1];this._renderSegment(g,m,b,x,e)}let u,l=o[o.length-1];for(let c=0;c<o.length;++c){u=l,l=o[c];const f=Math.floor(i[l]/3)*2,h=a[f],p=a[f+1],d=u*4,g=this._project(h,p,s[d+2],s[d+3]);g&&this._renderSegment(h,p,g[0],g[1],e)}return n&&n.value()}renderBounds(e){const n=e==null?e=new qn: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 qn: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 zc;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 l=Math.floor(u/3);if(s.push(n[l*2],n[l*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],l,c=this._regioncode(s,u),f,h=0;for(let p=0;p<r;p+=2)if(o=s,a=u,s=n[p],u=n[p+1],l=c,c=this._regioncode(s,u),l===0&&c===0)f=h,h=0,i?i.push(s,u):i=[s,u];else{let d,g,m,b,x;if(l===0){if((d=this._clipSegment(o,a,s,u,l,c))===null)continue;[g,m,b,x]=d}else{if((d=this._clipSegment(s,u,o,a,c,l))===null)continue;[b,x,g,m]=d,f=h,h=this._edgecode(g,m),f&&h&&this._edge(e,f,h,i,i.length),i?i.push(g,m):i=[g,m]}f=h,h=this._edgecode(b,x),f&&h&&this._edge(e,f,h,i,i.length),i?i.push(b,x):i=[b,x]}if(i)f=h,h=this._edgecode(i[0],i[1]),f&&h&&this._edge(e,f,h,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,l,c=o||a;c&8?(u=e+(r-e)*(this.ymax-n)/(i-n),l=this.ymax):c&4?(u=e+(r-e)*(this.ymin-n)/(i-n),l=this.ymin):c&2?(l=n+(i-n)*(this.xmax-e)/(r-e),u=this.xmax):(l=n+(i-n)*(this.xmin-e)/(r-e),u=this.xmin),o?(e=u,n=l,o=this._regioncode(e,n)):(r=u,i=l,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 l=0,c=s.length,f,h=this._edgecode(s[c-2],s[c-1]);l<c;l+=2)f=h,h=this._edgecode(s[l],s[l+1]),f&&h&&(l=this._edge(e,f,h,s,l),c=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 RD=2*Math.PI,Or=Math.pow;function kD(t){return t[0]}function ID(t){return t[1]}function ND(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 FD(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class Oc{static from(e,n=kD,r=ID,i){return new Oc("length"in e?GD(e,n,r,i):Float64Array.from(zD(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&&ND(e)){this.collinear=Int32Array.from({length:n.length/2},(h,p)=>p).sort((h,p)=>n[2*h]-n[2*p]||n[2*h+1]-n[2*p+1]);const u=this.collinear[0],l=this.collinear[this.collinear.length-1],c=[n[2*u],n[2*u+1],n[2*l],n[2*l+1]],f=1e-8*Math.hypot(c[3]-c[1],c[2]-c[0]);for(let h=0,p=n.length/2;h<p;++h){const d=FD(n[2*h],n[2*h+1],f);n[2*h]=d[0],n[2*h+1]=d[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,l=r.length;u<l;++u){const c=o[u%3===2?u-2:u+1];(r[u]===-1||a[c]===-1)&&(a[c]=u)}for(let u=0,l=i.length;u<l;++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 Sm(this,e)}*neighbors(e){const{inedges:n,hull:r,_hullIndex:i,halfedges:o,triangles:a,collinear:s}=this;if(s){const f=s.indexOf(e);f>0&&(yield s[f-1]),f<s.length-1&&(yield s[f+1]);return}const u=n[e];if(u===-1)return;let l=u,c=-1;do{if(yield c=a[l],l=l%3===2?l-2:l+1,a[l]!==e)return;if(l=o[l],l===-1){const f=r[(i[e]+1)%r.length];f!==c&&(yield f);return}}while(l!==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:l}=this;if(i[e]===-1||!l.length)return(e+1)%(l.length>>1);let c=e,f=Or(n-l[e*2],2)+Or(r-l[e*2+1],2);const h=i[e];let p=h;do{let d=u[p];const g=Or(n-l[d*2],2)+Or(r-l[d*2+1],2);if(g<f&&(f=g,c=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&&Or(n-l[p*2],2)+Or(r-l[p*2+1],2)<f)return p;break}}while(p!==h);return c}render(e){const n=e==null?e=new qn: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 l=o[a]*2,c=o[u]*2;e.moveTo(r[l],r[l+1]),e.lineTo(r[c],r[c+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 qn: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,RD)}return r&&r.value()}renderHull(e){const n=e==null?e=new qn: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 zc;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new qn: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 zc;return this.renderTriangle(e,n),n.value()}}function GD(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*zD(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 Am={},Uc={},Bc=34,Qi=10,Yc=13;function Mm(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function OD(t,e){var n=Mm(t);return function(r,i){return e(n(r),i,t)}}function Dm(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 UD(t){return t<0?"-"+re(-t,6):t>9999?"+"+re(t,6):re(t,4)}function BD(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":UD(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 as(t){var e=new RegExp('["'+t+`
6
- \r]`),n=t.charCodeAt(0);function r(f,h){var p,d,g=i(f,function(m,b){if(p)return p(m,b-1);d=m,p=h?OD(m,h):Mm(m)});return g.columns=d||[],g}function i(f,h){var p=[],d=f.length,g=0,m=0,b,x=d<=0,v=!1;f.charCodeAt(d-1)===Qi&&--d,f.charCodeAt(d-1)===Yc&&--d;function y(){if(x)return Uc;if(v)return v=!1,Am;var D,P=g,S;if(f.charCodeAt(P)===Bc){for(;g++<d&&f.charCodeAt(g)!==Bc||f.charCodeAt(++g)===Bc;);return(D=g)>=d?x=!0:(S=f.charCodeAt(g++))===Qi?v=!0:S===Yc&&(v=!0,f.charCodeAt(g)===Qi&&++g),f.slice(P+1,D-1).replace(/""/g,'"')}for(;g<d;){if((S=f.charCodeAt(D=g++))===Qi)v=!0;else if(S===Yc)v=!0,f.charCodeAt(g)===Qi&&++g;else if(S!==n)continue;return f.slice(P,D)}return x=!0,f.slice(P,d)}for(;(b=y())!==Uc;){for(var w=[];b!==Am&&b!==Uc;)w.push(b),b=y();h&&(w=h(w,m++))==null||p.push(w)}return p}function o(f,h){return f.map(function(p){return h.map(function(d){return c(p[d])}).join(t)})}function a(f,h){return h==null&&(h=Dm(f)),[h.map(c).join(t)].concat(o(f,h)).join(`
7
- `)}function s(f,h){return h==null&&(h=Dm(f)),o(f,h).join(`
5
+ `):"",this.name="UnsubscriptionError",this.errors=e}});function ha(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=vr(a),u=s.next();!u.done;u=s.next()){var l=u.value;l.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 c=this.initialTeardown;if(Ft(c))try{c()}catch(g){o=g instanceof wl?g.errors:[g]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=vr(f),p=h.next();!p.done;p=h.next()){var d=p.value;try{Hd(d)}catch(g){o=o??[],g instanceof wl?o=xi(xi([],vi(o)),vi(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new wl(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Hd(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)&&ha(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&ha(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Bd=_i.EMPTY;function Yd(t){return t instanceof _i||t&&"closed"in t&&Ft(t.remove)&&Ft(t.add)&&Ft(t.unsubscribe)}function Hd(t){Ft(t)?t():t.unsubscribe()}var Wd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},vA={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,xi([t,e],vi(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Vd(t){vA.setTimeout(function(){throw t})}function $l(){}function pa(t){t()}var Sl=function(t){ke(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Yd(n)&&n.add(r)):r.destination=$A,r}return e.create=function(n,r,i){return new wi(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),xA=Function.prototype.bind;function Al(t,e){return xA.call(t,e)}var _A=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}(),wi=function(t){ke(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(Ft(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&Wd.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Al(n.next,s),error:n.error&&Al(n.error,s),complete:n.complete&&Al(n.complete,s)}):a=n}return o.destination=new _A(a),o}return e}(Sl);function da(t){Vd(t)}function wA(t){throw t}var $A={closed:!0,next:$l,error:wA,complete:$l},Ml=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function jd(t){return t}function SA(t){return t.length===0?jd:t.length===1?t[0]:function(e){return t.reduce(function(n,r){return r(n)},e)}}var cn=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=MA(e)?e:new wi(e,n,r);return pa(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=qd(n),new n(function(i,o){var a=new wi({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[Ml]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return SA(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=qd(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 qd(t){var e;return(e=t??Wd.Promise)!==null&&e!==void 0?e:Promise}function AA(t){return t&&Ft(t.next)&&Ft(t.error)&&Ft(t.complete)}function MA(t){return t&&t instanceof Sl||AA(t)&&Yd(t)}function DA(t){return Ft(t==null?void 0:t.lift)}function $i(t){return function(e){if(DA(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 Si(t,e,n,r,i){return new PA(t,e,n,r,i)}var PA=function(t){ke(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(l){try{r(l)}catch(c){n.error(c)}}:t.prototype._next,u._error=o?function(l){try{o(l)}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(l){n.error(l)}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}(Sl),TA=_l(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ai=function(t){ke(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 Xd(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new TA},e.prototype.next=function(n){var r=this;pa(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=vr(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(l){i={error:l}}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;pa(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;pa(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?Bd:(this.currentObservers=null,s.push(n),new _i(function(){r.currentObservers=null,ha(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 cn;return n.source=this,n},e.create=function(n,r){return new Xd(n,r)},e}(cn),Xd=function(t){ke(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:Bd},e}(Ai),Zd=function(t){ke(e,t);function e(n){var r=t.call(this)||this;return r._value=n,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},e.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,o=n._value;if(r)throw i;return this._throwIfClosed(),o},e.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},e}(Ai),Dl={now:function(){return(Dl.delegate||Date).now()},delegate:void 0},LA=function(t){ke(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=Dl);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(),l=0,c=1;c<o.length&&o[c]<=u;c+=2)l=c;l&&o.splice(0,l+1)}},e}(Ai),CA=function(t){ke(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(_i),Kd={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,xi([t,e],vi(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},EA=function(t){ke(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),Kd.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&&Kd.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,ha(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(CA),Qd=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=Dl.now,t}(),RA=function(t){ke(e,t);function e(n,r){r===void 0&&(r=Qd.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}(Qd);new RA(EA);var kA=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function IA(t){return Ft(t==null?void 0:t.then)}function NA(t){return Ft(t[Ml])}function FA(t){return Symbol.asyncIterator&&Ft(t==null?void 0:t[Symbol.asyncIterator])}function GA(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 zA(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var OA=zA();function UA(t){return Ft(t==null?void 0:t[OA])}function BA(t){return yA(this,arguments,function(){var e,n,r,i;return Ud(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,xr(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,xr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,xr(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 YA(t){return Ft(t==null?void 0:t.getReader)}function ga(t){if(t instanceof cn)return t;if(t!=null){if(NA(t))return HA(t);if(kA(t))return WA(t);if(IA(t))return VA(t);if(FA(t))return Jd(t);if(UA(t))return jA(t);if(YA(t))return qA(t)}throw GA(t)}function HA(t){return new cn(function(e){var n=t[Ml]();if(Ft(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function WA(t){return new cn(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function VA(t){return new cn(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Vd)})}function jA(t){return new cn(function(e){var n,r;try{for(var i=vr(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 Jd(t){return new cn(function(e){XA(t,e).catch(function(n){return e.error(n)})})}function qA(t){return Jd(BA(t))}function XA(t,e){var n,r,i,o;return mA(this,void 0,void 0,function(){var a,s;return Ud(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=bA(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]}})})}_l(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function Pl(t,e){return $i(function(n,r){var i=0;n.subscribe(Si(r,function(o){r.next(t.call(e,o,i++))}))})}function ZA(t,e){return e===void 0&&(e=jd),t=t??KA,$i(function(n,r){var i,o=!0;n.subscribe(Si(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function KA(t,e){return t===e}function QA(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(l){var c,f,h,p=0,d=!1,g=!1,m=function(){f==null||f.unsubscribe(),f=void 0},y=function(){m(),c=h=void 0,d=g=!1},v=function(){var x=c;y(),x==null||x.unsubscribe()};return $i(function(x,b){p++,!g&&!d&&m();var _=h=h??n();b.add(function(){p--,p===0&&!g&&!d&&(f=Tl(v,u))}),_.subscribe(b),!c&&p>0&&(c=new wi({next:function(M){return _.next(M)},error:function(M){g=!0,m(),f=Tl(y,i,M),_.error(M)},complete:function(){d=!0,m(),f=Tl(y,a),_.complete()}}),ga(x).subscribe(c))})(l)}}function Tl(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 wi({next:function(){i.unsubscribe(),t()}});return ga(e.apply(void 0,xi([],vi(n)))).subscribe(i)}}function JA(t,e,n){var r,i=!1;return r=t,QA({connector:function(){return new LA(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function t3(t,e){return $i(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(Si(r,function(u){i==null||i.unsubscribe();var l=0,c=o++;ga(t(u,c)).subscribe(i=Si(r,function(f){return r.next(e?e(u,f,c,l++):f)},function(){i=null,s()}))},function(){a=!0,s()}))})}function e3(t){return $i(function(e,n){ga(t).subscribe(Si(n,function(){return n.complete()},$l)),!n.closed&&e.subscribe(n)})}const n3=t=>t.pipe(Pl(e=>e.styles.textSize),ZA(),Pl(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})),tg=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=pr.scaleDomain,scaleRange:i=pr.scaleRange})=>{const o=r[0]??pr.scaleDomain[0],a=r[1]??pr.scaleDomain[1],s=i[0]??pr.scaleRange[0],u=i[1]??pr.scaleRange[1],l=o==="auto"?e:o,c=a==="auto"?t:a,f=t-(t-l)/(1-s),h=c/u;return zd().domain([f,h]).range([0,n])},eg=({axisLabels:t,axisWidth:e,padding:n=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),Od().domain([-0,e+0]).range(i)};function r3({name:t,defaultParams:e,initFn:n}){const r=new Ai,i=new WeakMap;let o=()=>{},a;const s=new Zd(e),u=new Zd({}),l=s.pipe(t3(c=>u.pipe(e3(r),Pl(f=>vl(f,c)))),JA(1));return{params$:u,name:t,defaultParams:e,init(){a&&(o=n(a)??(()=>{}),i.set(a.selection,a))},destroy(){o(),a&&(a.selection.remove(),a=void 0),r.next(void 0)},setPresetParams:c=>{s.next(vl(c,e))},setContext:c=>{a=c,a.observer.fullParams$=l}}}const Mi=()=>function(t,e){return function(n){return class{constructor(){const r=r3({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}}}},Cn=Mi(),se=Mi(),pe=Mi(),ng=Mi(),rg=Mi();function _t(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ig(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ma(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===ig?t:i3,n=t,r=t);function i(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const f=l+c>>>1;n(s[f],u)<0?l=f+1:c=f}while(l<c)}return l}function o(s,u,l=0,c=s.length){if(l<c){if(e(u,u)!==0)return c;do{const f=l+c>>>1;n(s[f],u)<=0?l=f+1:c=f}while(l<c)}return l}function a(s,u,l=0,c=s.length){const f=i(s,u,l,c-1);return f>l&&r(s[f-1],u)>-r(s[f],u)?f-1:f}return{left:i,center:a,right:o}}function i3(){return 0}function ya(t){return t===null?NaN:+t}function*o3(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 og=ma(_t),ag=og.right,a3=og.left,s3=ma(ya).center,En=ag;function u3(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=Ll(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 sg=ug(Ll),l3=ug(c3);function ug(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),l=i.slice();return s&&u?(_r(s,l,i,o,a),_r(s,i,l,o,a),_r(s,l,i,o,a),wr(u,i,l,o,a),wr(u,l,i,o,a),wr(u,i,l,o,a)):s?(_r(s,i,l,o,a),_r(s,l,i,o,a),_r(s,i,l,o,a)):u&&(wr(u,i,l,o,a),wr(u,l,i,o,a),wr(u,i,l,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 wr(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function c3(t){const e=Ll(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 Ll(t){const e=Math.floor(t);if(e===t)return f3(t);const n=t-e,r=2*t+1;return(i,o,a,s,u)=>{if(!((s-=u)>=a))return;let l=e*o[a];const c=u*e,f=c+u;for(let h=a,p=a+c;h<p;h+=u)l+=o[Math.min(s,h)];for(let h=a,p=s;h<=p;h+=u)l+=o[Math.min(s,h+c)],i[h]=(l+n*(o[Math.max(a,h-f)]+o[Math.min(s,h+f)]))/r,l-=o[Math.max(a,h-c)]}}function f3(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 l=i,c=i+u;l<c;l+=a)s+=r[Math.min(o,l)];for(let l=i,c=o;l<=c;l+=a)s+=r[Math.min(o,l+u)],n[l]=s/e,s-=r[Math.max(i,l-u)]}}function ba(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 h3(t){return t.length|0}function p3(t){return!(t>0)}function d3(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function g3(t){return e=>t(...e)}function m3(...t){const e=typeof t[t.length-1]=="function"&&g3(t.pop());t=t.map(d3);const n=t.map(h3),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(p3))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 y3(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 lg(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 cg(t,e){const n=lg(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 Tt{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 b3(t,e){const n=new Tt;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 v3(t,e){const n=new Tt;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}class Pi extends Map{constructor(e,n=pg){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(Cl(this,e))}has(e){return super.has(Cl(this,e))}set(e,n){return super.set(fg(this,e),n)}delete(e){return super.delete(hg(this,e))}}class Rn extends Set{constructor(e,n=pg){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(Cl(this,e))}add(e){return super.add(fg(this,e))}delete(e){return super.delete(hg(this,e))}}function Cl({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function fg({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function hg({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function pg(t){return t!==null&&typeof t=="object"?t.valueOf():t}function $r(t){return t}function dg(t,...e){return Sr(t,$r,$r,e)}function gg(t,...e){return Sr(t,Array.from,$r,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 x3(t,...e){return mg(gg(t,...e),e)}function _3(t,e,...n){return mg(bg(t,e,...n),n)}function yg(t,e,...n){return Sr(t,$r,e,n)}function bg(t,e,...n){return Sr(t,Array.from,e,n)}function w3(t,...e){return Sr(t,$r,vg,e)}function $3(t,...e){return Sr(t,Array.from,vg,e)}function vg(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function Sr(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new Pi,u=r[a++];let l=-1;for(const c of o){const f=u(c,++l,o),h=s.get(f);h?h.push(c):s.set(f,[c])}for(const[c,f]of s)s.set(c,i(f,a));return e(s)}(t,0)}function xg(t,e){return Array.from(e,n=>t[n])}function El(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=Ar(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>Ar(n[i],n[o]))),xg(t,r)}return t.sort(Rl(n))}function Rl(t=_t){if(t===_t)return Ar;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 Ar(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function S3(t,e,n){return(e.length!==2?El(yg(t,e,n),([r,i],[o,a])=>_t(i,a)||_t(r,o)):El(dg(t,n),([r,i],[o,a])=>e(i,a)||_t(r,o))).map(([r])=>r)}var A3=Array.prototype,M3=A3.slice;function kl(t){return()=>t}const D3=Math.sqrt(50),P3=Math.sqrt(10),T3=Math.sqrt(2);function va(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>=D3?10:o>=P3?5:o>=T3?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(t*l),u=Math.round(e*l),s/l<t&&++s,u/l>e&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(t/l),u=Math.round(e/l),s*l<t&&++s,u*l>e&&--u),u<s&&.5<=n&&n<2?va(t,e,n*2):[s,u,l]}function kn(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?va(e,t,n):va(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let l=0;l<s;++l)u[l]=(o-l)/-a;else for(let l=0;l<s;++l)u[l]=(o-l)*a;else if(a<0)for(let l=0;l<s;++l)u[l]=(i+l)/-a;else for(let l=0;l<s;++l)u[l]=(i+l)*a;return u}function In(t,e,n){return e=+e,t=+t,n=+n,va(t,e,n)[2]}function xa(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 Il(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 Nl(t){return Math.max(1,Math.ceil(Math.log(ba(t))/Math.LN2)+1)}function _g(){var t=$r,e=Di,n=Nl;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,s,u,l=new Array(a);for(o=0;o<a;++o)l[o]=t(i[o],o,i);var c=e(l),f=c[0],h=c[1],p=n(l,f,h);if(!Array.isArray(p)){const x=h,b=+p;if(e===Di&&([f,h]=Il(f,h,b)),p=kn(f,h,b),p[0]<=f&&(u=In(f,h,b)),p[p.length-1]>=h)if(x>=h&&e===Di){const _=In(f,h,b);isFinite(_)&&(_>0?h=(Math.floor(h/_)+1)*_:_<0&&(h=(Math.ceil(h*-_)+1)/-_))}else p.pop()}for(var d=p.length,g=0,m=d;p[g]<=f;)++g;for(;p[m-1]>h;)--m;(g||m<d)&&(p=p.slice(g,m),d=m-g);var y=new Array(d+1),v;for(o=0;o<=d;++o)v=y[o]=[],v.x0=o>0?p[o-1]:f,v.x1=o<d?p[o]:h;if(isFinite(u)){if(u>0)for(o=0;o<a;++o)(s=l[o])!=null&&f<=s&&s<=h&&y[Math.min(d,Math.floor((s-f)/u))].push(i[o]);else if(u<0){for(o=0;o<a;++o)if((s=l[o])!=null&&f<=s&&s<=h){const x=Math.floor((f-s)*u);y[Math.min(d,x+(p[x]<=s))].push(i[o])}}}else for(o=0;o<a;++o)(s=l[o])!=null&&f<=s&&s<=h&&y[En(p,s,0,d)].push(i[o]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:kl(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:kl([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:kl(Array.isArray(i)?M3.call(i):i),r):n},r}function Ti(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 Fl(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){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 Gl(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 wa(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?Ar:Rl(i);r>n;){if(r-n>600){const u=r-n+1,l=e-n+1,c=Math.log(u),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(u-f)/u)*(l-u/2<0?-1:1),p=Math.max(n,Math.floor(e-l*f/u+h)),d=Math.min(r,Math.floor(e+(u-l)*f/u+h));wa(t,e,p,d,i)}const o=t[e];let a=n,s=r;for(Li(t,n,e),i(t[r],o)>0&&Li(t,n,r);a<s;){for(Li(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?Li(t,n,s):(++s,Li(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Li(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function wg(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 Ci(t,e,n){if(t=Float64Array.from(o3(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return _a(t);if(e>=1)return Ti(t);var r,i=(r-1)*e,o=Math.floor(i),a=Ti(wa(t,o).subarray(0,o+1)),s=_a(t.subarray(o+1));return a+(s-a)*(i-o)}}function $g(t,e,n=ya){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 Sg(t,e,n=ya){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,u)=>ya(n(t[u],u,t))),e<=0)return Gl(r);if(e>=1)return Fl(r);var r,i=Uint32Array.from(t,(s,u)=>u),o=r.length-1,a=Math.floor(o*e);return wa(i,a,0,o,(s,u)=>Ar(r[s],r[u])),a=wg(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function L3(t,e,n){const r=ba(t),i=Ci(t,.75)-Ci(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function C3(t,e,n){const r=ba(t),i=cg(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function E3(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 R3(t,e){return Ci(t,.5,e)}function k3(t,e){return Sg(t,.5,e)}function*I3(t){for(const e of t)yield*e}function zl(t){return Array.from(I3(t))}function N3(t,e){const n=new Pi;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 F3(t,e=G3){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function G3(t,e){return[t,e]}function fn(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function z3(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)=>Ar(n[s],n[u]):Rl(i)),t.forEach((s,u)=>{const l=i(s,o===void 0?s:o);l>=0?((o===void 0||l>0)&&(o=s,a=u),r[s]=a):r[s]=NaN}),r}function O3(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 Ag(t,e=_t){if(e.length===1)return Gl(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 U3(t,e=_t){if(e.length===1)return Fl(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 B3(t,e){const n=Ag(t,e);return n<0?void 0:n}const Y3=Mg(Math.random);function Mg(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 Dg(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 Pg(t){if(!(o=t.length))return[];for(var e=-1,n=_a(t,H3),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 H3(t){return t.length}function W3(){return Pg(arguments)}function V3(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 j3(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 q3(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 X3(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 Z3(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 K3(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function Q3(t,...e){t=new Rn(t);for(const n of e)for(const r of n)t.delete(r);return t}function J3(t,e){const n=e[Symbol.iterator](),r=new Rn;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 t5(t,...e){t=new Rn(t),e=e.map(e5);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function e5(t){return t instanceof Rn?t:new Rn(t)}function Tg(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=Lg(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const u=Lg(a);if(r.add(u),Object.is(o,u))break}}return!0}function Lg(t){return t!==null&&typeof t=="object"?t.valueOf():t}function n5(t,e){return Tg(e,t)}function r5(...t){const e=new Rn;for(const n of t)for(const r of n)e.add(r);return e}function i5(t){return t}var $a=1,Sa=2,Ol=3,Ei=4,Cg=1e-6;function o5(t){return"translate("+t+",0)"}function a5(t){return"translate(0,"+t+")"}function s5(t){return e=>+t(e)}function u5(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function l5(){return!this.__axis}function Aa(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,l=t===$a||t===Ei?-1:1,c=t===Ei||t===Sa?"x":"y",f=t===$a||t===Ol?o5:a5;function h(p){var d=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):i5),m=Math.max(o,0)+s,y=e.range(),v=+y[0]+u,x=+y[y.length-1]+u,b=(e.bandwidth?u5:s5)(e.copy(),u),_=p.selection?p.selection():p,M=_.selectAll(".domain").data([null]),D=_.selectAll(".tick").data(d,e).order(),$=D.exit(),w=D.enter().append("g").attr("class","tick"),P=D.select("line"),S=D.select("text");M=M.merge(M.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),D=D.merge(w),P=P.merge(w.append("line").attr("stroke","currentColor").attr(c+"2",l*o)),S=S.merge(w.append("text").attr("fill","currentColor").attr(c,l*m).attr("dy",t===$a?"0em":t===Ol?"0.71em":"0.32em")),p!==_&&(M=M.transition(p),D=D.transition(p),P=P.transition(p),S=S.transition(p),$=$.transition(p).attr("opacity",Cg).attr("transform",function(N){return isFinite(N=b(N))?f(N+u):this.getAttribute("transform")}),w.attr("opacity",Cg).attr("transform",function(N){var R=this.parentNode.__axis;return f((R&&isFinite(R=R(N))?R:b(N))+u)})),$.remove(),M.attr("d",t===Ei||t===Sa?a?"M"+l*a+","+v+"H"+u+"V"+x+"H"+l*a:"M"+u+","+v+"V"+x:a?"M"+v+","+l*a+"V"+u+"H"+x+"V"+l*a:"M"+v+","+u+"H"+x),D.attr("opacity",1).attr("transform",function(N){return f(b(N)+u)}),P.attr(c+"2",l*o),S.attr(c,l*m).text(g),_.filter(l5).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Sa?"start":t===Ei?"end":"middle"),_.each(function(){this.__axis=b})}return h.scale=function(p){return arguments.length?(e=p,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),h):n.slice()},h.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),h):r&&r.slice()},h.tickFormat=function(p){return arguments.length?(i=p,h):i},h.tickSize=function(p){return arguments.length?(o=a=+p,h):o},h.tickSizeInner=function(p){return arguments.length?(o=+p,h):o},h.tickSizeOuter=function(p){return arguments.length?(a=+p,h):a},h.tickPadding=function(p){return arguments.length?(s=+p,h):s},h.offset=function(p){return arguments.length?(u=+p,h):u},h}function Eg(t){return Aa($a,t)}function c5(t){return Aa(Sa,t)}function f5(t){return Aa(Ol,t)}function Rg(t){return Aa(Ei,t)}var h5={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 Ma(n)}function Ma(t){this._=t}function p5(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}})}Ma.prototype=Nn.prototype={constructor:Ma,on:function(t,e){var n=this._,r=p5(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=d5(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]=kg(n[i],t.name,e);else if(e==null)for(i in n)n[i]=kg(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 Ma(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 d5(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function kg(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=h5,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Ul="http://www.w3.org/1999/xhtml";const Bl={svg:"http://www.w3.org/2000/svg",xhtml:Ul,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)),Bl.hasOwnProperty(e)?{space:Bl[e],local:t}:t}function g5(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ul&&e.documentElement.namespaceURI===Ul?e.createElement(t):e.createElementNS(n,t)}}function m5(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Da(t){var e=Ri(t);return(e.local?m5:g5)(e)}function y5(){}function Pa(t){return t==null?y5:function(){return this.querySelector(t)}}function b5(t){typeof t!="function"&&(t=Pa(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,l,c=0;c<a;++c)(u=o[c])&&(l=t.call(u,u.__data__,c,o))&&("__data__"in u&&(l.__data__=u.__data__),s[c]=l);return new Ht(r,this._parents)}function Ig(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function v5(){return[]}function Yl(t){return t==null?v5:function(){return this.querySelectorAll(t)}}function x5(t){return function(){return Ig(t.apply(this,arguments))}}function _5(t){typeof t=="function"?t=x5(t):t=Yl(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,l=0;l<s;++l)(u=a[l])&&(r.push(t.call(u,u.__data__,l,a)),i.push(u));return new Ht(r,i)}function Hl(t){return function(){return this.matches(t)}}function Ng(t){return function(e){return e.matches(t)}}var w5=Array.prototype.find;function $5(t){return function(){return w5.call(this.children,t)}}function S5(){return this.firstElementChild}function A5(t){return this.select(t==null?S5:$5(typeof t=="function"?t:Ng(t)))}var M5=Array.prototype.filter;function D5(){return Array.from(this.children)}function P5(t){return function(){return M5.call(this.children,t)}}function T5(t){return this.selectAll(t==null?D5:P5(typeof t=="function"?t:Ng(t)))}function L5(t){typeof t!="function"&&(t=Hl(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,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new Ht(r,this._parents)}function Fg(t){return new Array(t.length)}function C5(){return new Ht(this._enter||this._groups.map(Fg),this._parents)}function Ta(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ta.prototype={constructor:Ta,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function E5(t){return function(){return t}}function R5(t,e,n,r,i,o){for(var a=0,s,u=e.length,l=o.length;a<l;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Ta(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function k5(t,e,n,r,i,o,a){var s,u,l=new Map,c=e.length,f=o.length,h=new Array(c),p;for(s=0;s<c;++s)(u=e[s])&&(h[s]=p=a.call(u,u.__data__,s,e)+"",l.has(p)?i[s]=u:l.set(p,u));for(s=0;s<f;++s)p=a.call(t,o[s],s,o)+"",(u=l.get(p))?(r[s]=u,u.__data__=o[s],l.delete(p)):n[s]=new Ta(t,o[s]);for(s=0;s<c;++s)(u=e[s])&&l.get(h[s])===u&&(i[s]=u)}function I5(t){return t.__data__}function N5(t,e){if(!arguments.length)return Array.from(this,I5);var n=e?k5:R5,r=this._parents,i=this._groups;typeof t!="function"&&(t=E5(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],f=i[l],h=f.length,p=F5(t.call(c,c&&c.__data__,l,r)),d=p.length,g=s[l]=new Array(d),m=a[l]=new Array(d),y=u[l]=new Array(h);n(c,f,g,m,y,p,e);for(var v=0,x=0,b,_;v<d;++v)if(b=g[v]){for(v>=x&&(x=v+1);!(_=m[x])&&++x<d;);b._next=_||null}}return a=new Ht(a,r),a._enter=s,a._exit=u,a}function F5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function G5(){return new Ht(this._exit||this._groups.map(Fg),this._parents)}function z5(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 O5(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 l=n[u],c=r[u],f=l.length,h=s[u]=new Array(f),p,d=0;d<f;++d)(p=l[d]||c[d])&&(h[d]=p);for(;u<i;++u)s[u]=n[u];return new Ht(s,this._parents)}function U5(){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 B5(t){t||(t=Y5);function e(f,h){return f&&h?t(f.__data__,h.__data__):!f-!h}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),l,c=0;c<s;++c)(l=a[c])&&(u[c]=l);u.sort(e)}return new Ht(i,this._parents).order()}function Y5(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function H5(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function W5(){return Array.from(this)}function V5(){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 j5(){let t=0;for(const e of this)++t;return t}function q5(){return!this.node()}function X5(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 Z5(t){return function(){this.removeAttribute(t)}}function K5(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Q5(t,e){return function(){this.setAttribute(t,e)}}function J5(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function t6(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function e6(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 n6(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?K5:Z5:typeof e=="function"?n.local?e6:t6:n.local?J5:Q5)(n,e))}function Wl(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function r6(t){return function(){this.style.removeProperty(t)}}function i6(t,e,n){return function(){this.style.setProperty(t,e,n)}}function o6(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function a6(t,e,n){return arguments.length>1?this.each((e==null?r6:typeof e=="function"?o6:i6)(t,e,n??"")):Fn(this.node(),t)}function Fn(t,e){return t.style.getPropertyValue(e)||Wl(t).getComputedStyle(t,null).getPropertyValue(e)}function s6(t){return function(){delete this[t]}}function u6(t,e){return function(){this[t]=e}}function l6(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function c6(t,e){return arguments.length>1?this.each((e==null?s6:typeof e=="function"?l6:u6)(t,e)):this.node()[t]}function Gg(t){return t.trim().split(/^|\s+/)}function Vl(t){return t.classList||new zg(t)}function zg(t){this._node=t,this._names=Gg(t.getAttribute("class")||"")}zg.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 Og(t,e){for(var n=Vl(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Ug(t,e){for(var n=Vl(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function f6(t){return function(){Og(this,t)}}function h6(t){return function(){Ug(this,t)}}function p6(t,e){return function(){(e.apply(this,arguments)?Og:Ug)(this,t)}}function d6(t,e){var n=Gg(t+"");if(arguments.length<2){for(var r=Vl(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?p6:e?f6:h6)(n,e))}function g6(){this.textContent=""}function m6(t){return function(){this.textContent=t}}function y6(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function b6(t){return arguments.length?this.each(t==null?g6:(typeof t=="function"?y6:m6)(t)):this.node().textContent}function v6(){this.innerHTML=""}function x6(t){return function(){this.innerHTML=t}}function _6(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function w6(t){return arguments.length?this.each(t==null?v6:(typeof t=="function"?_6:x6)(t)):this.node().innerHTML}function $6(){this.nextSibling&&this.parentNode.appendChild(this)}function S6(){return this.each($6)}function A6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function M6(){return this.each(A6)}function D6(t){var e=typeof t=="function"?t:Da(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function P6(){return null}function T6(t,e){var n=typeof t=="function"?t:Da(t),r=e==null?P6:typeof e=="function"?e:Pa(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function L6(){var t=this.parentNode;t&&t.removeChild(this)}function C6(){return this.each(L6)}function E6(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function R6(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function k6(t){return this.select(t?R6:E6)}function I6(t){return arguments.length?this.property("__data__",t):this.node().__data__}function N6(t){return function(e){t.call(this,e,this.__data__)}}function F6(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 G6(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 z6(t,e,n){return function(){var r=this.__on,i,o=N6(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 O6(t,e,n){var r=F6(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,l=s.length,c;u<l;++u)for(i=0,c=s[u];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=e?z6:G6,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Bg(t,e,n){var r=Wl(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 U6(t,e){return function(){return Bg(this,t,e)}}function B6(t,e){return function(){return Bg(this,t,e.apply(this,arguments))}}function Y6(t,e){return this.each((typeof e=="function"?B6:U6)(t,e))}function*H6(){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 jl=[null];function Ht(t,e){this._groups=t,this._parents=e}function Gn(){return new Ht([[document.documentElement]],jl)}function W6(){return this}Ht.prototype=Gn.prototype={constructor:Ht,select:b5,selectAll:_5,selectChild:A5,selectChildren:T5,filter:L5,data:N5,enter:C5,exit:G5,join:z5,merge:O5,selection:W6,order:U5,sort:B5,call:H5,nodes:W5,node:V5,size:j5,empty:q5,each:X5,attr:n6,style:a6,property:c6,classed:d6,text:b6,html:w6,raise:S6,lower:M6,append:D6,insert:T6,remove:C6,clone:k6,datum:I6,on:O6,dispatch:Y6,[Symbol.iterator]:H6};function Z(t){return typeof t=="string"?new Ht([[document.querySelector(t)]],[document.documentElement]):new Ht([[t]],jl)}function V6(t){return Z(Da(t).call(document.documentElement))}var j6=0;function Yg(){return new ql}function ql(){this._="@"+(++j6).toString(36)}ql.prototype=Yg.prototype={constructor:ql,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 Hg(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ue(t,e){if(t=Hg(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 q6(t,e){return t.target&&(t=Hg(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>ue(n,e))}function X6(t){return typeof t=="string"?new Ht([document.querySelectorAll(t)],[document.documentElement]):new Ht([Ig(t)],jl)}const Z6={passive:!1},ki={capture:!0,passive:!1};function Xl(t){t.stopImmediatePropagation()}function Mr(t){t.preventDefault(),t.stopImmediatePropagation()}function La(t){var e=t.document.documentElement,n=Z(t).on("dragstart.drag",Mr,ki);"onselectstart"in e?n.on("selectstart.drag",Mr,ki):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Ca(t,e){var n=t.document.documentElement,r=Z(t).on("dragstart.drag",null);e&&(r.on("click.drag",Mr,ki),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 Zl(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:u,dy:l,dispatch:c}){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:l,enumerable:!0,configurable:!0},_:{value:c}})}Zl.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function K6(t){return!t.ctrlKey&&!t.button}function Q6(){return this.parentNode}function J6(t,e){return e??{x:t.x,y:t.y}}function t8(){return navigator.maxTouchPoints||"ontouchstart"in this}function Wg(){var t=K6,e=Q6,n=J6,r=t8,i={},o=Nn("start","drag","end"),a=0,s,u,l,c,f=0;function h(b){b.on("mousedown.drag",p).filter(r).on("touchstart.drag",m).on("touchmove.drag",y,Z6).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(b,_){if(!(c||!t.call(this,b,_))){var M=x(this,e.call(this,b,_),b,_,"mouse");M&&(Z(b.view).on("mousemove.drag",d,ki).on("mouseup.drag",g,ki),La(b.view),Xl(b),l=!1,s=b.clientX,u=b.clientY,M("start",b))}}function d(b){if(Mr(b),!l){var _=b.clientX-s,M=b.clientY-u;l=_*_+M*M>f}i.mouse("drag",b)}function g(b){Z(b.view).on("mousemove.drag mouseup.drag",null),Ca(b.view,l),Mr(b),i.mouse("end",b)}function m(b,_){if(t.call(this,b,_)){var M=b.changedTouches,D=e.call(this,b,_),$=M.length,w,P;for(w=0;w<$;++w)(P=x(this,D,b,_,M[w].identifier,M[w]))&&(Xl(b),P("start",b,M[w]))}}function y(b){var _=b.changedTouches,M=_.length,D,$;for(D=0;D<M;++D)($=i[_[D].identifier])&&(Mr(b),$("drag",b,_[D]))}function v(b){var _=b.changedTouches,M=_.length,D,$;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),D=0;D<M;++D)($=i[_[D].identifier])&&(Xl(b),$("end",b,_[D]))}function x(b,_,M,D,$,w){var P=o.copy(),S=ue(w||M,_),N,R,A;if((A=n.call(b,new Zl("beforestart",{sourceEvent:M,target:h,identifier:$,active:a,x:S[0],y:S[1],dx:0,dy:0,dispatch:P}),D))!=null)return N=A.x-S[0]||0,R=A.y-S[1]||0,function C(T,O,z){var k=S,E;switch(T){case"start":i[$]=C,E=a++;break;case"end":delete i[$],--a;case"drag":S=ue(z||O,_),E=a;break}P.call(T,b,new Zl(T,{sourceEvent:O,subject:A,target:h,identifier:$,active:E,x:S[0]+N,y:S[1]+R,dx:S[0]-k[0],dy:S[1]-k[1],dispatch:P}),D)}}return h.filter=function(b){return arguments.length?(t=typeof b=="function"?b:Ea(!!b),h):t},h.container=function(b){return arguments.length?(e=typeof b=="function"?b:Ea(b),h):e},h.subject=function(b){return arguments.length?(n=typeof b=="function"?b:Ea(b),h):n},h.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:Ea(!!b),h):r},h.on=function(){var b=o.on.apply(o,arguments);return b===o?h:b},h.clickDistance=function(b){return arguments.length?(f=(b=+b)*b,h):Math.sqrt(f)},h}function Dr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ii(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function hn(){}var zn=.7,Pr=1/zn,Tr="\\s*([+-]?\\d+)\\s*",Ni="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",e8=/^#([0-9a-f]{3,8})$/,n8=new RegExp(`^rgb\\(${Tr},${Tr},${Tr}\\)$`),r8=new RegExp(`^rgb\\(${Ie},${Ie},${Ie}\\)$`),i8=new RegExp(`^rgba\\(${Tr},${Tr},${Tr},${Ni}\\)$`),o8=new RegExp(`^rgba\\(${Ie},${Ie},${Ie},${Ni}\\)$`),a8=new RegExp(`^hsl\\(${Ni},${Ie},${Ie}\\)$`),s8=new RegExp(`^hsla\\(${Ni},${Ie},${Ie},${Ni}\\)$`),Vg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Dr(hn,pn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:jg,formatHex:jg,formatHex8:u8,formatHsl:l8,formatRgb:qg,toString:qg});function jg(){return this.rgb().formatHex()}function u8(){return this.rgb().formatHex8()}function l8(){return Jg(this).formatHsl()}function qg(){return this.rgb().formatRgb()}function pn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=e8.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Xg(e):n===3?new Et(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Ra(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Ra(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=n8.exec(t))?new Et(e[1],e[2],e[3],1):(e=r8.exec(t))?new Et(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=i8.exec(t))?Ra(e[1],e[2],e[3],e[4]):(e=o8.exec(t))?Ra(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=a8.exec(t))?Qg(e[1],e[2]/100,e[3]/100,1):(e=s8.exec(t))?Qg(e[1],e[2]/100,e[3]/100,e[4]):Vg.hasOwnProperty(t)?Xg(Vg[t]):t==="transparent"?new Et(NaN,NaN,NaN,0):null}function Xg(t){return new Et(t>>16&255,t>>8&255,t&255,1)}function Ra(t,e,n,r){return r<=0&&(t=e=n=NaN),new Et(t,e,n,r)}function Kl(t){return t instanceof hn||(t=pn(t)),t?(t=t.rgb(),new Et(t.r,t.g,t.b,t.opacity)):new Et}function Lr(t,e,n,r){return arguments.length===1?Kl(t):new Et(t,e,n,r??1)}function Et(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Dr(Et,Lr,Ii(hn,{brighter(t){return t=t==null?Pr:Math.pow(Pr,t),new Et(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,t),new Et(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Et(On(this.r),On(this.g),On(this.b),ka(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Zg,formatHex:Zg,formatHex8:c8,formatRgb:Kg,toString:Kg}));function Zg(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}`}function c8(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}${Un((isNaN(this.opacity)?1:this.opacity)*255)}`}function Kg(){const t=ka(this.opacity);return`${t===1?"rgb(":"rgba("}${On(this.r)}, ${On(this.g)}, ${On(this.b)}${t===1?")":`, ${t})`}`}function ka(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function On(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Un(t){return t=On(t),(t<16?"0":"")+t.toString(16)}function Qg(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 Jg(t){if(t instanceof Ae)return new Ae(t.h,t.s,t.l,t.opacity);if(t instanceof hn||(t=pn(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 Ia(t,e,n,r){return arguments.length===1?Jg(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}Dr(Ae,Ia,Ii(hn,{brighter(t){return t=t==null?Pr:Math.pow(Pr,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 Et(Ql(t>=240?t-240:t+120,i,r),Ql(t,i,r),Ql(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ae(t0(this.h),Na(this.s),Na(this.l),ka(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=ka(this.opacity);return`${t===1?"hsl(":"hsla("}${t0(this.h)}, ${Na(this.s)*100}%, ${Na(this.l)*100}%${t===1?")":`, ${t})`}`}}));function t0(t){return t=(t||0)%360,t<0?t+360:t}function Na(t){return Math.max(0,Math.min(1,t||0))}function Ql(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 e0=Math.PI/180,n0=180/Math.PI,Fa=18,r0=.96422,i0=1,o0=.82521,a0=4/29,Cr=6/29,s0=3*Cr*Cr,f8=Cr*Cr*Cr;function u0(t){if(t instanceof Me)return new Me(t.l,t.a,t.b,t.opacity);if(t instanceof Ne)return c0(t);t instanceof Et||(t=Kl(t));var e=nc(t.r),n=nc(t.g),r=nc(t.b),i=Jl((.2225045*e+.7168786*n+.0606169*r)/i0),o,a;return e===n&&n===r?o=a=i:(o=Jl((.4360747*e+.3850649*n+.1430804*r)/r0),a=Jl((.0139322*e+.0971045*n+.7141733*r)/o0)),new Me(116*i-16,500*(o-i),200*(i-a),t.opacity)}function h8(t,e){return new Me(t,0,0,e??1)}function Ga(t,e,n,r){return arguments.length===1?u0(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}Dr(Me,Ga,Ii(hn,{brighter(t){return new Me(this.l+Fa*(t??1),this.a,this.b,this.opacity)},darker(t){return new Me(this.l-Fa*(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=r0*tc(e),t=i0*tc(t),n=o0*tc(n),new Et(ec(3.1338561*e-1.6168667*t-.4906146*n),ec(-.9787684*e+1.9161415*t+.033454*n),ec(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Jl(t){return t>f8?Math.pow(t,1/3):t/s0+a0}function tc(t){return t>Cr?t*t*t:s0*(t-a0)}function ec(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function nc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function l0(t){if(t instanceof Ne)return new Ne(t.h,t.c,t.l,t.opacity);if(t instanceof Me||(t=u0(t)),t.a===0&&t.b===0)return new Ne(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*n0;return new Ne(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function p8(t,e,n,r){return arguments.length===1?l0(t):new Ne(n,e,t,r??1)}function za(t,e,n,r){return arguments.length===1?l0(t):new Ne(t,e,n,r??1)}function Ne(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function c0(t){if(isNaN(t.h))return new Me(t.l,0,0,t.opacity);var e=t.h*e0;return new Me(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Dr(Ne,za,Ii(hn,{brighter(t){return new Ne(this.h,this.c,this.l+Fa*(t??1),this.opacity)},darker(t){return new Ne(this.h,this.c,this.l-Fa*(t??1),this.opacity)},rgb(){return c0(this).rgb()}}));var f0=-.14861,rc=1.78277,ic=-.29227,Oa=-.90649,Fi=1.97294,h0=Fi*Oa,p0=Fi*rc,d0=rc*ic-Oa*f0;function d8(t){if(t instanceof Bn)return new Bn(t.h,t.s,t.l,t.opacity);t instanceof Et||(t=Kl(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(d0*r+h0*e-p0*n)/(d0+h0-p0),o=r-i,a=(Fi*(n-i)-ic*o)/Oa,s=Math.sqrt(a*a+o*o)/(Fi*i*(1-i)),u=s?Math.atan2(a,o)*n0-120:NaN;return new Bn(u<0?u+360:u,s,i,t.opacity)}function De(t,e,n,r){return arguments.length===1?d8(t):new Bn(t,e,n,r??1)}function Bn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Dr(Bn,De,Ii(hn,{brighter(t){return t=t==null?Pr:Math.pow(Pr,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)*e0,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Et(255*(e+n*(f0*r+rc*i)),255*(e+n*(ic*r+Oa*i)),255*(e+n*(Fi*r)),this.opacity)}}));function g0(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 m0(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 g0((n-r/e)*e,a,i,o,s)}}function y0(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 g0((n-r/e)*e,i,o,a,s)}}const Ua=t=>()=>t;function b0(t,e){return function(n){return t+n*e}}function g8(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 Ba(t,e){var n=e-t;return n?b0(t,n>180||n<-180?n-360*Math.round(n/360):n):Ua(isNaN(t)?e:t)}function m8(t){return(t=+t)==1?Rt:function(e,n){return n-e?g8(e,n,t):Ua(isNaN(e)?n:e)}}function Rt(t,e){var n=e-t;return n?b0(t,n):Ua(isNaN(t)?e:t)}const Gi=function t(e){var n=m8(e);function r(i,o){var a=n((i=Lr(i)).r,(o=Lr(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=Rt(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return r.gamma=t,r}(1);function v0(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=Lr(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 x0=v0(m0),y8=v0(y0);function oc(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 _0(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function b8(t,e){return(_0(e)?oc:w0)(t,e)}function w0(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]=qe(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 $0(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function de(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function S0(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]=qe(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var ac=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sc=new RegExp(ac.source,"g");function v8(t){return function(){return t}}function x8(t){return function(e){return t(e)+""}}function uc(t,e){var n=ac.lastIndex=sc.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=ac.exec(t))&&(i=sc.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:de(r,i)})),n=sc.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?x8(u[0].x):v8(e):(e=u.length,function(l){for(var c=0,f;c<e;++c)s[(f=u[c]).i]=f.x(l);return s.join("")})}function qe(t,e){var n=typeof e,r;return e==null||n==="boolean"?Ua(e):(n==="number"?de:n==="string"?(r=pn(e))?(e=r,Gi):uc:e instanceof pn?Gi:e instanceof Date?$0:_0(e)?oc:Array.isArray(e)?w0:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?S0:de)(t,e)}function _8(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function w8(t,e){var n=Ba(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Ya(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var A0=180/Math.PI,lc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function M0(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)*A0,skewX:Math.atan(u)*A0,scaleX:a,scaleY:s}}var Ha;function $8(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?lc:M0(e.a,e.b,e.c,e.d,e.e,e.f)}function S8(t){return t==null||(Ha||(Ha=document.createElementNS("http://www.w3.org/2000/svg","g")),Ha.setAttribute("transform",t),!(t=Ha.transform.baseVal.consolidate()))?lc:(t=t.matrix,M0(t.a,t.b,t.c,t.d,t.e,t.f))}function D0(t,e,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,c,f,h,p,d){if(l!==f||c!==h){var g=p.push("translate(",null,e,null,n);d.push({i:g-4,x:de(l,f)},{i:g-2,x:de(c,h)})}else(f||h)&&p.push("translate("+f+e+h+n)}function a(l,c,f,h){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:de(l,c)})):c&&f.push(i(f)+"rotate("+c+r)}function s(l,c,f,h){l!==c?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:de(l,c)}):c&&f.push(i(f)+"skewX("+c+r)}function u(l,c,f,h,p,d){if(l!==f||c!==h){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:de(l,f)},{i:g-2,x:de(c,h)})}else(f!==1||h!==1)&&p.push(i(p)+"scale("+f+","+h+")")}return function(l,c){var f=[],h=[];return l=t(l),c=t(c),o(l.translateX,l.translateY,c.translateX,c.translateY,f,h),a(l.rotate,c.rotate,f,h),s(l.skewX,c.skewX,f,h),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,f,h),l=c=null,function(p){for(var d=-1,g=h.length,m;++d<g;)f[(m=h[d]).i]=m.x(p);return f.join("")}}}var P0=D0($8,"px, ","px)","deg)"),T0=D0(S8,", ",")",")"),A8=1e-12;function L0(t){return((t=Math.exp(t))+1/t)/2}function M8(t){return((t=Math.exp(t))-1/t)/2}function D8(t){return((t=Math.exp(2*t))-1)/(t+1)}const C0=function t(e,n,r){function i(o,a){var s=o[0],u=o[1],l=o[2],c=a[0],f=a[1],h=a[2],p=c-s,d=f-u,g=p*p+d*d,m,y;if(g<A8)y=Math.log(h/l)/e,m=function(D){return[s+D*p,u+D*d,l*Math.exp(e*D*y)]};else{var v=Math.sqrt(g),x=(h*h-l*l+r*g)/(2*l*n*v),b=(h*h-l*l-r*g)/(2*h*n*v),_=Math.log(Math.sqrt(x*x+1)-x),M=Math.log(Math.sqrt(b*b+1)-b);y=(M-_)/e,m=function(D){var $=D*y,w=L0(_),P=l/(n*v)*(w*D8(e*$+_)-M8(_));return[s+P*p,u+P*d,l*w/L0(e*$+_)]}}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 E0(t){return function(e,n){var r=t((e=Ia(e)).h,(n=Ia(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 P8=E0(Ba);var T8=E0(Rt);function L8(t,e){var n=Rt((t=Ga(t)).l,(e=Ga(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 R0(t){return function(e,n){var r=t((e=za(e)).h,(n=za(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 C8=R0(Ba);var E8=R0(Rt);function k0(t){return function e(n){n=+n;function r(i,o){var a=t((i=De(i)).h,(o=De(o)).h),s=Rt(i.s,o.s),u=Rt(i.l,o.l),l=Rt(i.opacity,o.opacity);return function(c){return i.h=a(c),i.s=s(c),i.l=u(Math.pow(c,n)),i.opacity=l(c),i+""}}return r.gamma=e,r}(1)}const R8=k0(Ba);var Wa=k0(Rt);function I0(t,e){e===void 0&&(e=t,t=qe);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 Er=0,zi=0,Oi=0,N0=1e3,Va,Ui,ja=0,Yn=0,qa=0,Bi=typeof performance=="object"&&performance.now?performance:Date,F0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Yi(){return Yn||(F0(I8),Yn=Bi.now()+qa)}function I8(){Yn=0}function Hi(){this._call=this._time=this._next=null}Hi.prototype=Xa.prototype={constructor:Hi,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Yi():+n)+(e==null?0:+e),!this._next&&Ui!==this&&(Ui?Ui._next=this:Va=this,Ui=this),this._call=t,this._time=n,cc()},stop:function(){this._call&&(this._call=null,this._time=1/0,cc())}};function Xa(t,e,n){var r=new Hi;return r.restart(t,e,n),r}function G0(){Yi(),++Er;for(var t=Va,e;t;)(e=Yn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Er}function z0(){Yn=(ja=Bi.now())+qa,Er=zi=0;try{G0()}finally{Er=0,F8(),Yn=0}}function N8(){var t=Bi.now(),e=t-ja;e>N0&&(qa-=e,ja=t)}function F8(){for(var t,e=Va,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:Va=n);Ui=t,cc(r)}function cc(t){if(!Er){zi&&(zi=clearTimeout(zi));var e=t-Yn;e>24?(t<1/0&&(zi=setTimeout(z0,t-Bi.now()-qa)),Oi&&(Oi=clearInterval(Oi))):(Oi||(ja=Bi.now(),Oi=setInterval(N8,N0)),Er=1,F0(z0))}}function fc(t,e,n){var r=new Hi;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function G8(t,e,n){var r=new Hi,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?Yi():+s,r._restart(function u(l){l+=i,r._restart(u,i+=a,s),o(l)},a,s)},r.restart(t,e,n),r)}var z8=Nn("start","end","cancel","interrupt"),O8=[],O0=0,hc=1,pc=2,Za=3,U0=4,dc=5,Ka=6;function Qa(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;U8(t,n,{name:e,index:r,group:i,on:z8,tween:O8,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:O0})}function gc(t,e){var n=Pe(t,e);if(n.state>O0)throw new Error("too late; already scheduled");return n}function Fe(t,e){var n=Pe(t,e);if(n.state>Za)throw new Error("too late; already running");return n}function Pe(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function U8(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Xa(o,0,n.time);function o(l){n.state=hc,n.timer.restart(a,n.delay,n.time),n.delay<=l&&a(l-n.delay)}function a(l){var c,f,h,p;if(n.state!==hc)return u();for(c in r)if(p=r[c],p.name===n.name){if(p.state===Za)return fc(a);p.state===U0?(p.state=Ka,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[c]):+c<e&&(p.state=Ka,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[c])}if(fc(function(){n.state===Za&&(n.state=U0,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=pc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===pc){for(n.state=Za,i=new Array(h=n.tween.length),c=0,f=-1;c<h;++c)(p=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++f]=p);i.length=f+1}}function s(l){for(var c=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(u),n.state=dc,1),f=-1,h=i.length;++f<h;)i[f].call(t,c);n.state===dc&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=Ka,n.timer.stop(),delete r[e];for(var l 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>pc&&r.state<dc,r.state=Ka,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function B8(t){return this.each(function(){Hn(this,t)})}function Y8(t,e){var n,r;return function(){var i=Fe(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 H8(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Fe(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function W8(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Pe(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?Y8:H8)(n,t,e))}function mc(t,e,n){var r=t._id;return t.each(function(){var i=Fe(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Pe(i,r).value[e]}}function B0(t,e){var n;return(typeof e=="number"?de:e instanceof pn?Gi:(n=pn(e))?(e=n,Gi):uc)(t,e)}function V8(t){return function(){this.removeAttribute(t)}}function j8(t){return function(){this.removeAttributeNS(t.space,t.local)}}function q8(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 X8(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 Z8(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 K8(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 Q8(t,e){var n=Ri(t),r=n==="transform"?T0:B0;return this.attrTween(t,typeof e=="function"?(n.local?K8:Z8)(n,r,mc(this,"attr."+t,e)):e==null?(n.local?j8:V8)(n):(n.local?X8:q8)(n,r,e))}function J8(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function tM(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function eM(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&tM(t,o)),n}return i._value=e,i}function nM(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&J8(t,o)),n}return i._value=e,i}function rM(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?eM:nM)(r,e))}function iM(t,e){return function(){gc(this,t).delay=+e.apply(this,arguments)}}function oM(t,e){return e=+e,function(){gc(this,t).delay=e}}function aM(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?iM:oM)(e,t)):Pe(this.node(),e).delay}function sM(t,e){return function(){Fe(this,t).duration=+e.apply(this,arguments)}}function uM(t,e){return e=+e,function(){Fe(this,t).duration=e}}function lM(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?sM:uM)(e,t)):Pe(this.node(),e).duration}function cM(t,e){if(typeof e!="function")throw new Error;return function(){Fe(this,t).ease=e}}function fM(t){var e=this._id;return arguments.length?this.each(cM(e,t)):Pe(this.node(),e).ease}function hM(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Fe(this,t).ease=n}}function pM(t){if(typeof t!="function")throw new Error;return this.each(hM(this._id,t))}function dM(t){typeof t!="function"&&(t=Hl(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,l=0;l<a;++l)(u=o[l])&&t.call(u,u.__data__,l,o)&&s.push(u);return new Ge(r,this._parents,this._name,this._id)}function gM(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],l=n[s],c=u.length,f=a[s]=new Array(c),h,p=0;p<c;++p)(h=u[p]||l[p])&&(f[p]=h);for(;s<r;++s)a[s]=e[s];return new Ge(a,this._parents,this._name,this._id)}function mM(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 yM(t,e,n){var r,i,o=mM(e)?gc:Fe;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function bM(t,e){var n=this._id;return arguments.length<2?Pe(this.node(),n).on.on(t):this.each(yM(n,t,e))}function vM(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function xM(){return this.on("end.remove",vM(this._id))}function _M(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Pa(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,l=o[a]=new Array(u),c,f,h=0;h<u;++h)(c=s[h])&&(f=t.call(c,c.__data__,h,s))&&("__data__"in c&&(f.__data__=c.__data__),l[h]=f,Qa(l[h],e,n,h,l,Pe(c,n)));return new Ge(o,this._parents,e,n)}function wM(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Yl(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],l=u.length,c,f=0;f<l;++f)if(c=u[f]){for(var h=t.call(c,c.__data__,f,u),p,d=Pe(c,n),g=0,m=h.length;g<m;++g)(p=h[g])&&Qa(p,e,n,g,h,d);o.push(h),a.push(c)}return new Ge(o,a,e,n)}var $M=Gn.prototype.constructor;function SM(){return new $M(this._groups,this._parents)}function AM(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 Y0(t){return function(){this.style.removeProperty(t)}}function MM(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 DM(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 PM(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Fe(this,t),l=u.on,c=u.value[o]==null?s||(s=Y0(e)):void 0;(l!==n||i!==c)&&(r=(n=l).copy()).on(a,i=c),u.on=r}}function TM(t,e,n){var r=(t+="")=="transform"?P0:B0;return e==null?this.styleTween(t,AM(t,r)).on("end.style."+t,Y0(t)):typeof e=="function"?this.styleTween(t,DM(t,r,mc(this,"style."+t,e))).each(PM(this._id,t)):this.styleTween(t,MM(t,r,e),n).on("end.style."+t,null)}function LM(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function CM(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&LM(t,a,n)),r}return o._value=e,o}function EM(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,CM(t,e,n??""))}function RM(t){return function(){this.textContent=t}}function kM(t){return function(){var e=t(this);this.textContent=e??""}}function IM(t){return this.tween("text",typeof t=="function"?kM(mc(this,"text",t)):RM(t==null?"":t+""))}function NM(t){return function(e){this.textContent=t.call(this,e)}}function FM(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&NM(i)),e}return r._value=t,r}function GM(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,FM(t))}function zM(){for(var t=this._name,e=this._id,n=W0(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,l=0;l<s;++l)if(u=a[l]){var c=Pe(u,e);Qa(u,t,n,l,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ge(r,this._parents,t,n)}function OM(){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 l=Fe(this,r),c=l.on;c!==t&&(e=(t=c).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),l.on=e}),i===0&&o()})}var UM=0;function Ge(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function H0(t){return Gn().transition(t)}function W0(){return++UM}var Xe=Gn.prototype;Ge.prototype=H0.prototype={constructor:Ge,select:_M,selectAll:wM,selectChild:Xe.selectChild,selectChildren:Xe.selectChildren,filter:dM,merge:gM,selection:SM,transition:zM,call:Xe.call,nodes:Xe.nodes,node:Xe.node,size:Xe.size,empty:Xe.empty,each:Xe.each,on:bM,attr:Q8,attrTween:rM,style:TM,styleTween:EM,text:IM,textTween:GM,remove:xM,tween:W8,delay:aM,duration:lM,ease:fM,easeVarying:pM,end:OM,[Symbol.iterator]:Xe[Symbol.iterator]};const BM=t=>+t;function YM(t){return t*t}function HM(t){return t*(2-t)}function V0(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function WM(t){return t*t*t}function VM(t){return--t*t*t+1}function Wi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var yc=3,jM=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(yc),qM=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(yc),j0=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}(yc),q0=Math.PI,X0=q0/2;function XM(t){return+t==1?1:1-Math.cos(t*X0)}function ZM(t){return Math.sin(t*X0)}function Z0(t){return(1-Math.cos(q0*t))/2}function dn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function KM(t){return dn(1-+t)}function QM(t){return 1-dn(t)}function K0(t){return((t*=2)<=1?dn(1-t):2-dn(t-1))/2}function JM(t){return 1-Math.sqrt(1-t*t)}function t4(t){return Math.sqrt(1- --t*t)}function Q0(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var bc=4/11,e4=6/11,n4=8/11,r4=3/4,i4=9/11,o4=10/11,a4=15/16,s4=21/22,u4=63/64,Ja=1/bc/bc;function l4(t){return 1-Vi(1-t)}function Vi(t){return(t=+t)<bc?Ja*t*t:t<n4?Ja*(t-=e4)*t+r4:t<o4?Ja*(t-=i4)*t+a4:Ja*(t-=s4)*t+u4}function c4(t){return((t*=2)<=1?1-Vi(1-t):Vi(t-1)+1)/2}var vc=1.70158,f4=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(vc),h4=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(vc),J0=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}(vc),Rr=2*Math.PI,xc=1,_c=.3,p4=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Rr);function i(o){return e*dn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*Rr)},i.period=function(o){return t(e,o)},i}(xc,_c),ji=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Rr);function i(o){return 1-e*dn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*Rr)},i.period=function(o){return t(e,o)},i}(xc,_c),d4=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Rr);function i(o){return((o=o*2-1)<0?e*dn(-o)*Math.sin((r-o)/n):2-e*dn(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return t(o,n*Rr)},i.period=function(o){return t(e,o)},i}(xc,_c),g4={time:null,delay:0,duration:250,ease:Wi};function m4(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 y4(t){var e,n;t instanceof Ge?(e=t._id,t=t._name):(e=W0(),(n=g4).time=Yi(),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,l=0;l<s;++l)(u=a[l])&&Qa(u,t,e,l,a,n||m4(u,e));return new Ge(r,this._parents,t,e)}Gn.prototype.interrupt=B8,Gn.prototype.transition=y4;var b4=[null];function v4(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>hc&&r.name===e)return new Ge([[t]],b4,e,+i)}return null}const wc=t=>()=>t;function x4(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 _4(t){t.stopImmediatePropagation()}function $c(t){t.preventDefault(),t.stopImmediatePropagation()}var tm={name:"drag"},Sc={name:"space"},kr={name:"handle"},Ir={name:"center"};const{abs:em,max:Gt,min:zt}=Math;function nm(t){return[+t[0],+t[1]]}function Ac(t){return[nm(t[0]),nm(t[1])]}var ts={name:"x",handles:["w","e"].map(qi),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(qi),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]]}},w4={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(qi),input:function(t){return t==null?null:Ac(t)},output:function(t){return t}},Ze={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"},rm={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},im={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},$4={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},S4={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function qi(t){return{type:t}}function A4(t){return!t.ctrlKey&&!t.button}function M4(){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 D4(){return navigator.maxTouchPoints||"ontouchstart"in this}function Mc(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function P4(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function T4(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function L4(){return Dc(ts)}function C4(){return Dc(es)}function E4(){return Dc(w4)}function Dc(t){var e=M4,n=A4,r=D4,i=!0,o=Nn("start","brush","end"),a=6,s;function u(m){var y=m.property("__brush",g).selectAll(".overlay").data([qi("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ze.overlay).merge(y).each(function(){var x=Mc(this).extent;Z(this).attr("x",x[0][0]).attr("y",x[0][1]).attr("width",x[1][0]-x[0][0]).attr("height",x[1][1]-x[0][1])}),m.selectAll(".selection").data([qi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Ze.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var v=m.selectAll(".handle").data(t.handles,function(x){return x.type});v.exit().remove(),v.enter().append("rect").attr("class",function(x){return"handle handle--"+x.type}).attr("cursor",function(x){return Ze[x.type]}),m.each(l).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).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,v){m.tween?m.on("start.brush",function(x){c(this,arguments).beforestart().start(x)}).on("interrupt.brush end.brush",function(x){c(this,arguments).end(x)}).tween("brush",function(){var x=this,b=x.__brush,_=c(x,arguments),M=b.selection,D=t.input(typeof y=="function"?y.apply(this,arguments):y,b.extent),$=qe(M,D);function w(P){b.selection=P===1&&D===null?null:$(P),l.call(x),_.brush()}return M!==null&&D!==null?w:w(1)}):m.each(function(){var x=this,b=arguments,_=x.__brush,M=t.input(typeof y=="function"?y.apply(x,b):y,_.extent),D=c(x,b).beforestart();Hn(x),_.selection=M===null?null:M,l.call(x),D.start(v).brush(v).end(v)})},u.clear=function(m,y){u.move(m,null,y)};function l(){var m=Z(this),y=Mc(this).selection;y?(m.selectAll(".selection").style("display",null).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(v){return v.type[v.type.length-1]==="e"?y[1][0]-a/2:y[0][0]-a/2}).attr("y",function(v){return v.type[0]==="s"?y[1][1]-a/2:y[0][1]-a/2}).attr("width",function(v){return v.type==="n"||v.type==="s"?y[1][0]-y[0][0]+a:a}).attr("height",function(v){return v.type==="e"||v.type==="w"?y[1][1]-y[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(m,y,v){var x=m.__brush.emitter;return x&&(!v||!x.clean)?x:new f(m,y,v)}function f(m,y,v){this.that=m,this.args=y,this.state=m.__brush,this.active=0,this.clean=v}f.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,y){return this.starting?(this.starting=!1,this.emit("start",m,y)):this.emit("brush",m),this},brush:function(m,y){return this.emit("brush",m,y),this},end:function(m,y){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,y)),this},emit:function(m,y,v){var x=Z(this.that).datum();o.call(m,this.that,new x4(m,{sourceEvent:y,target:u,selection:t.output(this.state.selection),mode:v,dispatch:o}),x)}};function h(m){if(s&&!m.touches||!n.apply(this,arguments))return;var y=this,v=m.target.__data__.type,x=(i&&m.metaKey?v="overlay":v)==="selection"?tm:i&&m.altKey?Ir:kr,b=t===es?null:$4[v],_=t===ts?null:S4[v],M=Mc(y),D=M.extent,$=M.selection,w=D[0][0],P,S,N=D[0][1],R,A,C=D[1][0],T,O,z=D[1][1],k,E,L=0,F=0,j,Q=b&&_&&i&&m.shiftKey,U,X,B=Array.from(m.touches||[m],st=>{const Dt=st.identifier;return st=ue(st,y),st.point0=st.slice(),st.identifier=Dt,st});Hn(y);var q=c(y,arguments,!0).beforestart();if(v==="overlay"){$&&(j=!0);const st=[B[0],B[1]||B[0]];M.selection=$=[[P=t===es?w:zt(st[0][0],st[1][0]),R=t===ts?N:zt(st[0][1],st[1][1])],[T=t===es?C:Gt(st[0][0],st[1][0]),k=t===ts?z:Gt(st[0][1],st[1][1])]],B.length>1&&mt(m)}else P=$[0][0],R=$[0][1],T=$[1][0],k=$[1][1];S=P,A=R,O=T,E=k;var V=Z(y).attr("pointer-events","none"),rt=V.selectAll(".overlay").attr("cursor",Ze[v]);if(m.touches)q.moved=W,q.ended=ht;else{var ut=Z(m.view).on("mousemove.brush",W,!0).on("mouseup.brush",ht,!0);i&&ut.on("keydown.brush",Yt,!0).on("keyup.brush",ee,!0),La(m.view)}l.call(y),q.start(m,x.name);function W(st){for(const Dt of st.changedTouches||[st])for(const Fo of B)Fo.identifier===Dt.identifier&&(Fo.cur=ue(Dt,y));if(Q&&!U&&!X&&B.length===1){const Dt=B[0];em(Dt.cur[0]-Dt[0])>em(Dt.cur[1]-Dt[1])?X=!0:U=!0}for(const Dt of B)Dt.cur&&(Dt[0]=Dt.cur[0],Dt[1]=Dt.cur[1]);j=!0,$c(st),mt(st)}function mt(st){const Dt=B[0],Fo=Dt.point0;var An;switch(L=Dt[0]-Fo[0],F=Dt[1]-Fo[1],x){case Sc:case tm:{b&&(L=Gt(w-P,zt(C-T,L)),S=P+L,O=T+L),_&&(F=Gt(N-R,zt(z-k,F)),A=R+F,E=k+F);break}case kr:{B[1]?(b&&(S=Gt(w,zt(C,B[0][0])),O=Gt(w,zt(C,B[1][0])),b=1),_&&(A=Gt(N,zt(z,B[0][1])),E=Gt(N,zt(z,B[1][1])),_=1)):(b<0?(L=Gt(w-P,zt(C-P,L)),S=P+L,O=T):b>0&&(L=Gt(w-T,zt(C-T,L)),S=P,O=T+L),_<0?(F=Gt(N-R,zt(z-R,F)),A=R+F,E=k):_>0&&(F=Gt(N-k,zt(z-k,F)),A=R,E=k+F));break}case Ir:{b&&(S=Gt(w,zt(C,P-L*b)),O=Gt(w,zt(C,T+L*b))),_&&(A=Gt(N,zt(z,R-F*_)),E=Gt(N,zt(z,k+F*_)));break}}O<S&&(b*=-1,An=P,P=T,T=An,An=S,S=O,O=An,v in rm&&rt.attr("cursor",Ze[v=rm[v]])),E<A&&(_*=-1,An=R,R=k,k=An,An=A,A=E,E=An,v in im&&rt.attr("cursor",Ze[v=im[v]])),M.selection&&($=M.selection),U&&(S=$[0][0],O=$[1][0]),X&&(A=$[0][1],E=$[1][1]),($[0][0]!==S||$[0][1]!==A||$[1][0]!==O||$[1][1]!==E)&&(M.selection=[[S,A],[O,E]],l.call(y),q.brush(st,x.name))}function ht(st){if(_4(st),st.touches){if(st.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Ca(st.view,j),ut.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);V.attr("pointer-events","all"),rt.attr("cursor",Ze.overlay),M.selection&&($=M.selection),P4($)&&(M.selection=null,l.call(y)),q.end(st,x.name)}function Yt(st){switch(st.keyCode){case 16:{Q=b&&_;break}case 18:{x===kr&&(b&&(T=O-L*b,P=S+L*b),_&&(k=E-F*_,R=A+F*_),x=Ir,mt(st));break}case 32:{(x===kr||x===Ir)&&(b<0?T=O-L:b>0&&(P=S-L),_<0?k=E-F:_>0&&(R=A-F),x=Sc,rt.attr("cursor",Ze.selection),mt(st));break}default:return}$c(st)}function ee(st){switch(st.keyCode){case 16:{Q&&(U=X=Q=!1,mt(st));break}case 18:{x===Ir&&(b<0?T=O:b>0&&(P=S),_<0?k=E:_>0&&(R=A),x=kr,mt(st));break}case 32:{x===Sc&&(st.altKey?(b&&(T=O-L*b,P=S+L*b),_&&(k=E-F*_,R=A+F*_),x=Ir):(b<0?T=O:b>0&&(P=S),_<0?k=E:_>0&&(R=A),x=kr),rt.attr("cursor",Ze[v]),mt(st));break}default:return}$c(st)}}function p(m){c(this,arguments).moved(m)}function d(m){c(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=Ac(e.apply(this,arguments)),m.dim=t,m}return u.extent=function(m){return arguments.length?(e=typeof m=="function"?m:wc(Ac(m)),u):e},u.filter=function(m){return arguments.length?(n=typeof m=="function"?m:wc(!!m),u):n},u.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:wc(!!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 om=Math.abs,Nr=Math.cos,Fr=Math.sin,am=Math.PI,ns=am/2,sm=am*2,um=Math.max,Pc=1e-12;function Tc(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function R4(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function k4(){return Lc(!1,!1)}function I4(){return Lc(!1,!0)}function N4(){return Lc(!0,!1)}function Lc(t,e){var n=0,r=null,i=null,o=null;function a(s){var u=s.length,l=new Array(u),c=Tc(0,u),f=new Array(u*u),h=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+=l[g]=m}p=um(0,sm-n*u)/p,d=p?n:sm/u;{let g=0;r&&c.sort((m,y)=>r(l[m],l[y]));for(const m of c){const y=g;if(t){const v=Tc(~u+1,u).filter(x=>x<0?s[~x*u+m]:s[m*u+x]);i&&v.sort((x,b)=>i(x<0?-s[~x*u+m]:s[m*u+x],b<0?-s[~b*u+m]:s[m*u+b]));for(const x of v)if(x<0){const b=f[~x*u+m]||(f[~x*u+m]={source:null,target:null});b.target={index:m,startAngle:g,endAngle:g+=s[~x*u+m]*p,value:s[~x*u+m]}}else{const b=f[m*u+x]||(f[m*u+x]={source:null,target:null});b.source={index:m,startAngle:g,endAngle:g+=s[m*u+x]*p,value:s[m*u+x]}}h[m]={index:m,startAngle:y,endAngle:g,value:l[m]}}else{const v=Tc(0,u).filter(x=>s[m*u+x]||s[x*u+m]);i&&v.sort((x,b)=>i(s[m*u+x],s[m*u+b]));for(const x of v){let b;if(m<x?(b=f[m*u+x]||(f[m*u+x]={source:null,target:null}),b.source={index:m,startAngle:g,endAngle:g+=s[m*u+x]*p,value:s[m*u+x]}):(b=f[x*u+m]||(f[x*u+m]={source:null,target:null}),b.target={index:m,startAngle:g,endAngle:g+=s[m*u+x]*p,value:s[m*u+x]},m===x&&(b.source=b.target)),b.source&&b.target&&b.source.value<b.target.value){const _=b.source;b.source=b.target,b.target=_}}h[m]={index:m,startAngle:y,endAngle:g,value:l[m]}}g+=d}}return f=Object.values(f),f.groups=h,o?f.sort(o):f}return a.padAngle=function(s){return arguments.length?(n=um(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=R4(s))._=s,a):o&&o._},a}const Cc=Math.PI,Ec=2*Cc,Wn=1e-6,F4=Ec-Wn;function lm(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function G4(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return lm;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 Xi=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?lm:G4(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,l=i-n,c=a-e,f=s-n,h=c*c+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(h>Wn)if(!(Math.abs(f*u-l*c)>Wn)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,d=i-s,g=u*u+l*l,m=p*p+d*d,y=Math.sqrt(g),v=Math.sqrt(h),x=o*Math.tan((Cc-Math.acos((g+h-m)/(2*y*v)))/2),b=x/v,_=x/y;Math.abs(b-1)>Wn&&this._append`L${e+b*c},${n+b*f}`,this._append`A${o},${o},0,0,${+(f*p>c*d)},${this._x1=e+_*u},${this._y1=n+_*l}`}}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),l=e+s,c=n+u,f=1^a,h=a?i-o:o-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Wn||Math.abs(this._y1-c)>Wn)&&this._append`L${l},${c}`,r&&(h<0&&(h=h%Ec+Ec),h>F4?this._append`A${r},${r},0,1,${f},${e-s},${n-u}A${r},${r},0,1,${f},${this._x1=l},${this._y1=c}`:h>Wn&&this._append`A${r},${r},0,${+(h>=Cc)},${f},${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 Rc(){return new Xi}Rc.prototype=Xi.prototype;function z4(t=3){return new Xi(+t)}var O4=Array.prototype.slice;function Vn(t){return function(){return t}}function U4(t){return t.source}function B4(t){return t.target}function cm(t){return t.radius}function Y4(t){return t.startAngle}function H4(t){return t.endAngle}function W4(){return 0}function V4(){return 10}function fm(t){var e=U4,n=B4,r=cm,i=cm,o=Y4,a=H4,s=W4,u=null;function l(){var c,f=e.apply(this,arguments),h=n.apply(this,arguments),p=s.apply(this,arguments)/2,d=O4.call(arguments),g=+r.apply(this,(d[0]=f,d)),m=o.apply(this,d)-ns,y=a.apply(this,d)-ns,v=+i.apply(this,(d[0]=h,d)),x=o.apply(this,d)-ns,b=a.apply(this,d)-ns;if(u||(u=c=Rc()),p>Pc&&(om(y-m)>p*2+Pc?y>m?(m+=p,y-=p):(m-=p,y+=p):m=y=(m+y)/2,om(b-x)>p*2+Pc?b>x?(x+=p,b-=p):(x-=p,b+=p):x=b=(x+b)/2),u.moveTo(g*Nr(m),g*Fr(m)),u.arc(0,0,g,m,y),m!==x||y!==b)if(t){var _=+t.apply(this,arguments),M=v-_,D=(x+b)/2;u.quadraticCurveTo(0,0,M*Nr(x),M*Fr(x)),u.lineTo(v*Nr(D),v*Fr(D)),u.lineTo(M*Nr(b),M*Fr(b))}else u.quadraticCurveTo(0,0,v*Nr(x),v*Fr(x)),u.arc(0,0,v,x,b);if(u.quadraticCurveTo(0,0,g*Nr(m),g*Fr(m)),u.closePath(),c)return u=null,c+""||null}return t&&(l.headRadius=function(c){return arguments.length?(t=typeof c=="function"?c:Vn(+c),l):t}),l.radius=function(c){return arguments.length?(r=i=typeof c=="function"?c:Vn(+c),l):r},l.sourceRadius=function(c){return arguments.length?(r=typeof c=="function"?c:Vn(+c),l):r},l.targetRadius=function(c){return arguments.length?(i=typeof c=="function"?c:Vn(+c),l):i},l.startAngle=function(c){return arguments.length?(o=typeof c=="function"?c:Vn(+c),l):o},l.endAngle=function(c){return arguments.length?(a=typeof c=="function"?c:Vn(+c),l):a},l.padAngle=function(c){return arguments.length?(s=typeof c=="function"?c:Vn(+c),l):s},l.source=function(c){return arguments.length?(e=c,l):e},l.target=function(c){return arguments.length?(n=c,l):n},l.context=function(c){return arguments.length?(u=c??null,l):u},l}function j4(){return fm()}function q4(){return fm(V4)}var X4=Array.prototype,hm=X4.slice;function Z4(t,e){return t-e}function K4(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}const gn=t=>()=>t;function Q4(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=J4(t,e[n]))return i;return 0}function J4(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],l=u[0],c=u[1],f=t[s],h=f[0],p=f[1];if(tD(u,f,e))return 0;c>r!=p>r&&n<(h-l)*(r-c)/(p-c)+l&&(i=-i)}return i}function tD(t,e,n){var r;return eD(t,e,n)&&nD(t[r=+(t[0]===e[0])],n[r],e[r])}function eD(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function nD(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function rD(){}var Ke=[[],[[[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 kc(){var t=1,e=1,n=Nl,r=u;function i(l){var c=n(l);if(Array.isArray(c))c=c.slice().sort(Z4);else{const f=Di(l,iD);for(c=kn(...Il(f[0],f[1],c),c);c[c.length-1]>=f[1];)c.pop();for(;c[1]<f[0];)c.shift()}return c.map(f=>o(l,f))}function o(l,c){const f=c==null?NaN:+c;if(isNaN(f))throw new Error(`invalid value: ${c}`);var h=[],p=[];return a(l,f,function(d){r(d,l,f),K4(d)>0?h.push([d]):p.push(d)}),p.forEach(function(d){for(var g=0,m=h.length,y;g<m;++g)if(Q4((y=h[g])[0],d)!==-1){y.push(d);return}}),{type:"MultiPolygon",value:c,coordinates:h}}function a(l,c,f){var h=new Array,p=new Array,d,g,m,y,v,x;for(d=g=-1,y=jn(l[0],c),Ke[y<<1].forEach(b);++d<t-1;)m=y,y=jn(l[d+1],c),Ke[m|y<<1].forEach(b);for(Ke[y<<0].forEach(b);++g<e-1;){for(d=-1,y=jn(l[g*t+t],c),v=jn(l[g*t],c),Ke[y<<1|v<<2].forEach(b);++d<t-1;)m=y,y=jn(l[g*t+t+d+1],c),x=v,v=jn(l[g*t+d+1],c),Ke[m|y<<1|v<<2|x<<3].forEach(b);Ke[y|v<<3].forEach(b)}for(d=-1,v=l[g*t]>=c,Ke[v<<2].forEach(b);++d<t-1;)x=v,v=jn(l[g*t+d+1],c),Ke[v<<2|x<<3].forEach(b);Ke[v<<3].forEach(b);function b(_){var M=[_[0][0]+d,_[0][1]+g],D=[_[1][0]+d,_[1][1]+g],$=s(M),w=s(D),P,S;(P=p[$])?(S=h[w])?(delete p[P.end],delete h[S.start],P===S?(P.ring.push(D),f(P.ring)):h[P.start]=p[S.end]={start:P.start,end:S.end,ring:P.ring.concat(S.ring)}):(delete p[P.end],P.ring.push(D),p[P.end=w]=P):(P=h[w])?(S=p[$])?(delete h[P.start],delete p[S.end],P===S?(P.ring.push(D),f(P.ring)):h[S.start]=p[P.end]={start:S.start,end:P.end,ring:S.ring.concat(P.ring)}):(delete h[P.start],P.ring.unshift(M),h[P.start=$]=P):h[$]=p[w]={start:$,end:w,ring:[M,D]}}}function s(l){return l[0]*2+l[1]*(t+1)*4}function u(l,c,f){l.forEach(function(h){var p=h[0],d=h[1],g=p|0,m=d|0,y=Ic(c[m*t+g]);p>0&&p<t&&g===p&&(h[0]=pm(p,Ic(c[m*t+g-1]),y,f)),d>0&&d<e&&m===d&&(h[1]=pm(d,Ic(c[(m-1)*t+g]),y,f))})}return i.contour=o,i.size=function(l){if(!arguments.length)return[t,e];var c=Math.floor(l[0]),f=Math.floor(l[1]);if(!(c>=0&&f>=0))throw new Error("invalid size");return t=c,e=f,i},i.thresholds=function(l){return arguments.length?(n=typeof l=="function"?l:Array.isArray(l)?gn(hm.call(l)):gn(l),i):n},i.smooth=function(l){return arguments.length?(r=l?u:rD,i):r===u},i}function iD(t){return isFinite(t)?t:NaN}function jn(t,e){return t==null?!1:+t>=e}function Ic(t){return t==null||isNaN(t=+t)?-1/0:t}function pm(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 oD(t){return t[0]}function aD(t){return t[1]}function sD(){return 1}function uD(){var t=oD,e=aD,n=sD,r=960,i=500,o=20,a=2,s=o*3,u=r+s*2>>a,l=i+s*2>>a,c=gn(20);function f(v){var x=new Float32Array(u*l),b=Math.pow(2,-a),_=-1;for(const R of v){var M=(t(R,++_,v)+s)*b,D=(e(R,_,v)+s)*b,$=+n(R,_,v);if($&&M>=0&&M<u&&D>=0&&D<l){var w=Math.floor(M),P=Math.floor(D),S=M-w-.5,N=D-P-.5;x[w+P*u]+=(1-S)*(1-N)*$,x[w+1+P*u]+=S*(1-N)*$,x[w+1+(P+1)*u]+=S*N*$,x[w+(P+1)*u]+=(1-S)*N*$}}return sg({data:x,width:u,height:l},o*b),x}function h(v){var x=f(v),b=c(x),_=Math.pow(2,2*a);return Array.isArray(b)||(b=kn(Number.MIN_VALUE,Ti(x)/_,b)),kc().size([u,l]).thresholds(b.map(M=>M*_))(x).map((M,D)=>(M.value=+b[D],p(M)))}h.contours=function(v){var x=f(v),b=kc().size([u,l]),_=Math.pow(2,2*a),M=D=>{D=+D;var $=p(b.contour(x,D*_));return $.value=D,$};return Object.defineProperty(M,"max",{get:()=>Ti(x)/_}),M};function p(v){return v.coordinates.forEach(d),v}function d(v){v.forEach(g)}function g(v){v.forEach(m)}function m(v){v[0]=v[0]*Math.pow(2,a)-s,v[1]=v[1]*Math.pow(2,a)-s}function y(){return s=o*3,u=r+s*2>>a,l=i+s*2>>a,h}return h.x=function(v){return arguments.length?(t=typeof v=="function"?v:gn(+v),h):t},h.y=function(v){return arguments.length?(e=typeof v=="function"?v:gn(+v),h):e},h.weight=function(v){return arguments.length?(n=typeof v=="function"?v:gn(+v),h):n},h.size=function(v){if(!arguments.length)return[r,i];var x=+v[0],b=+v[1];if(!(x>=0&&b>=0))throw new Error("invalid size");return r=x,i=b,y()},h.cellSize=function(v){if(!arguments.length)return 1<<a;if(!((v=+v)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(v)/Math.LN2),y()},h.thresholds=function(v){return arguments.length?(c=typeof v=="function"?v:Array.isArray(v)?gn(hm.call(v)):gn(v),h):c},h.bandwidth=function(v){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((v=+v)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*v*v+1)-1)/2,y()},h}const Qe=11102230246251565e-32,Ot=134217729,lD=(3+8*Qe)*Qe;function Nc(t,e,n,r,i){let o,a,s,u,l=e[0],c=r[0],f=0,h=0;c>l==c>-l?(o=l,l=e[++f]):(o=c,c=r[++h]);let p=0;if(f<t&&h<n)for(c>l==c>-l?(a=l+o,s=o-(a-l),l=e[++f]):(a=c+o,s=o-(a-c),c=r[++h]),o=a,s!==0&&(i[p++]=s);f<t&&h<n;)c>l==c>-l?(a=o+l,u=a-o,s=o-(a-u)+(l-u),l=e[++f]):(a=o+c,u=a-o,s=o-(a-u)+(c-u),c=r[++h]),o=a,s!==0&&(i[p++]=s);for(;f<t;)a=o+l,u=a-o,s=o-(a-u)+(l-u),l=e[++f],o=a,s!==0&&(i[p++]=s);for(;h<n;)a=o+c,u=a-o,s=o-(a-u)+(c-u),c=r[++h],o=a,s!==0&&(i[p++]=s);return(o!==0||p===0)&&(i[p++]=o),p}function cD(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 fD=(3+16*Qe)*Qe,hD=(2+12*Qe)*Qe,pD=(9+64*Qe)*Qe*Qe,Gr=Zi(4),dm=Zi(8),gm=Zi(12),mm=Zi(16),Wt=Zi(4);function dD(t,e,n,r,i,o,a){let s,u,l,c,f,h,p,d,g,m,y,v,x,b,_,M,D,$;const w=t-i,P=n-i,S=e-o,N=r-o;b=w*N,h=Ot*w,p=h-(h-w),d=w-p,h=Ot*N,g=h-(h-N),m=N-g,_=d*m-(b-p*g-d*g-p*m),M=S*P,h=Ot*S,p=h-(h-S),d=S-p,h=Ot*P,g=h-(h-P),m=P-g,D=d*m-(M-p*g-d*g-p*m),y=_-D,f=_-y,Gr[0]=_-(y+f)+(f-D),v=b+y,f=v-b,x=b-(v-f)+(y-f),y=x-M,f=x-y,Gr[1]=x-(y+f)+(f-M),$=v+y,f=$-v,Gr[2]=v-($-f)+(y-f),Gr[3]=$;let R=cD(4,Gr),A=hD*a;if(R>=A||-R>=A||(f=t-w,s=t-(w+f)+(f-i),f=n-P,l=n-(P+f)+(f-i),f=e-S,u=e-(S+f)+(f-o),f=r-N,c=r-(N+f)+(f-o),s===0&&u===0&&l===0&&c===0)||(A=pD*a+lD*Math.abs(R),R+=w*c+N*s-(S*l+P*u),R>=A||-R>=A))return R;b=s*N,h=Ot*s,p=h-(h-s),d=s-p,h=Ot*N,g=h-(h-N),m=N-g,_=d*m-(b-p*g-d*g-p*m),M=u*P,h=Ot*u,p=h-(h-u),d=u-p,h=Ot*P,g=h-(h-P),m=P-g,D=d*m-(M-p*g-d*g-p*m),y=_-D,f=_-y,Wt[0]=_-(y+f)+(f-D),v=b+y,f=v-b,x=b-(v-f)+(y-f),y=x-M,f=x-y,Wt[1]=x-(y+f)+(f-M),$=v+y,f=$-v,Wt[2]=v-($-f)+(y-f),Wt[3]=$;const C=Nc(4,Gr,4,Wt,dm);b=w*c,h=Ot*w,p=h-(h-w),d=w-p,h=Ot*c,g=h-(h-c),m=c-g,_=d*m-(b-p*g-d*g-p*m),M=S*l,h=Ot*S,p=h-(h-S),d=S-p,h=Ot*l,g=h-(h-l),m=l-g,D=d*m-(M-p*g-d*g-p*m),y=_-D,f=_-y,Wt[0]=_-(y+f)+(f-D),v=b+y,f=v-b,x=b-(v-f)+(y-f),y=x-M,f=x-y,Wt[1]=x-(y+f)+(f-M),$=v+y,f=$-v,Wt[2]=v-($-f)+(y-f),Wt[3]=$;const T=Nc(C,dm,4,Wt,gm);b=s*c,h=Ot*s,p=h-(h-s),d=s-p,h=Ot*c,g=h-(h-c),m=c-g,_=d*m-(b-p*g-d*g-p*m),M=u*l,h=Ot*u,p=h-(h-u),d=u-p,h=Ot*l,g=h-(h-l),m=l-g,D=d*m-(M-p*g-d*g-p*m),y=_-D,f=_-y,Wt[0]=_-(y+f)+(f-D),v=b+y,f=v-b,x=b-(v-f)+(y-f),y=x-M,f=x-y,Wt[1]=x-(y+f)+(f-M),$=v+y,f=$-v,Wt[2]=v-($-f)+(y-f),Wt[3]=$;const O=Nc(T,gm,4,Wt,mm);return mm[O-1]}function rs(t,e,n,r,i,o){const a=(e-o)*(n-i),s=(t-i)*(r-o),u=a-s,l=Math.abs(a+s);return Math.abs(u)>=fD*l?u:-dD(t,e,n,r,i,o,l)}const ym=Math.pow(2,-52),is=new Uint32Array(512);class os{static from(e,n=vD,r=xD){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,l=-1/0,c=-1/0;for(let w=0;w<a;w++){const P=e[2*w],S=e[2*w+1];P<s&&(s=P),S<u&&(u=S),P>l&&(l=P),S>c&&(c=S),this._ids[w]=w}const f=(s+l)/2,h=(u+c)/2;let p,d,g;for(let w=0,P=1/0;w<a;w++){const S=Fc(f,h,e[2*w],e[2*w+1]);S<P&&(p=w,P=S)}const m=e[2*p],y=e[2*p+1];for(let w=0,P=1/0;w<a;w++){if(w===p)continue;const S=Fc(m,y,e[2*w],e[2*w+1]);S<P&&S>0&&(d=w,P=S)}let v=e[2*d],x=e[2*d+1],b=1/0;for(let w=0;w<a;w++){if(w===p||w===d)continue;const P=yD(m,y,v,x,e[2*w],e[2*w+1]);P<b&&(g=w,b=P)}let _=e[2*g],M=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];zr(this._ids,this._dists,0,a-1);const w=new Uint32Array(a);let P=0;for(let S=0,N=-1/0;S<a;S++){const R=this._ids[S],A=this._dists[R];A>N&&(w[P++]=R,N=A)}this.hull=w.subarray(0,P),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(rs(m,y,v,x,_,M)<0){const w=d,P=v,S=x;d=g,v=_,x=M,g=w,_=P,M=S}const D=bD(m,y,v,x,_,M);this._cx=D.x,this._cy=D.y;for(let w=0;w<a;w++)this._dists[w]=Fc(e[2*w],e[2*w+1],D.x,D.y);zr(this._ids,this._dists,0,a-1),this._hullStart=p;let $=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(v,x)]=d,o[this._hashKey(_,M)]=g,this.trianglesLen=0,this._addTriangle(p,d,g,-1,-1,-1);for(let w=0,P,S;w<this._ids.length;w++){const N=this._ids[w],R=e[2*N],A=e[2*N+1];if(w>0&&Math.abs(R-P)<=ym&&Math.abs(A-S)<=ym||(P=R,S=A,N===p||N===d||N===g))continue;let C=0;for(let E=0,L=this._hashKey(R,A);E<this._hashSize&&(C=o[(L+E)%this._hashSize],!(C!==-1&&C!==r[C]));E++);C=n[C];let T=C,O;for(;O=r[T],rs(R,A,e[2*T],e[2*T+1],e[2*O],e[2*O+1])>=0;)if(T=O,T===C){T=-1;break}if(T===-1)continue;let z=this._addTriangle(T,N,r[T],-1,-1,i[T]);i[N]=this._legalize(z+2),i[T]=z,$++;let k=r[T];for(;O=r[k],rs(R,A,e[2*k],e[2*k+1],e[2*O],e[2*O+1])<0;)z=this._addTriangle(k,N,O,i[N],-1,i[k]),i[N]=this._legalize(z+2),r[k]=k,$--,k=O;if(T===C)for(;O=n[T],rs(R,A,e[2*O],e[2*O+1],e[2*T],e[2*T+1])<0;)z=this._addTriangle(O,N,T,-1,i[T],i[O]),this._legalize(z+2),i[O]=z,r[T]=T,$--,T=O;this._hullStart=n[N]=T,r[T]=n[k]=N,r[N]=k,o[this._hashKey(R,A)]=N,o[this._hashKey(e[2*T],e[2*T+1])]=T}this.hull=new Uint32Array($);for(let w=0,P=this._hullStart;w<$;w++)this.hull[w]=P,P=r[P];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,n){return Math.floor(gD(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 l=s-s%3,c=u+(e+1)%3,f=l+(s+2)%3,h=n[a],p=n[e],d=n[c],g=n[f];if(mD(i[2*h],i[2*h+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]=h;const y=r[f];if(y===-1){let x=this._hullStart;do{if(this._hullTri[x]===f){this._hullTri[x]=e;break}x=this._hullPrev[x]}while(x!==this._hullStart)}this._link(e,y),this._link(s,r[a]),this._link(a,f);const v=l+(s+1)%3;o<is.length&&(is[o++]=v)}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 gD(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Fc(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function mD(t,e,n,r,i,o,a,s){const u=t-a,l=e-s,c=n-a,f=r-s,h=i-a,p=o-s,d=u*u+l*l,g=c*c+f*f,m=h*h+p*p;return u*(f*m-g*p)-l*(c*m-g*h)+d*(c*p-f*h)<0}function yD(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,l=o-e,c=a*a+s*s,f=u*u+l*l,h=.5/(a*l-s*u),p=(l*c-s*f)*h,d=(a*f-u*c)*h;return p*p+d*d}function bD(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,l=o-e,c=a*a+s*s,f=u*u+l*l,h=.5/(a*l-s*u),p=t+(l*c-s*f)*h,d=e+(a*f-u*c)*h;return{x:p,y:d}}function zr(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?(zr(t,e,o,r),zr(t,e,n,a-1)):(zr(t,e,n,a-1),zr(t,e,o,r))}}function Ki(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function vD(t){return t[0]}function xD(t){return t[1]}const bm=1e-6;class qn{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)>bm||Math.abs(this._y1-o)>bm)&&(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 Gc{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 vm{constructor(e,[n,r,i,o]=[0,0,960,500]){if(!((i=+i)>=(n=+n))||!((o=+o)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(e.points.length*2),this.vectors=new Float64Array(e.points.length*2),this.xmax=i,this.xmin=n,this.ymax=o,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:n,triangles:r},vectors:i}=this;let o,a;const s=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let g=0,m=0,y=r.length,v,x;g<y;g+=3,m+=2){const b=r[g]*2,_=r[g+1]*2,M=r[g+2]*2,D=e[b],$=e[b+1],w=e[_],P=e[_+1],S=e[M],N=e[M+1],R=w-D,A=P-$,C=S-D,T=N-$,O=(R*T-A*C)*2;if(Math.abs(O)<1e-9){if(o===void 0){o=a=0;for(const k of n)o+=e[k*2],a+=e[k*2+1];o/=n.length,a/=n.length}const z=1e9*Math.sign((o-D)*T-(a-$)*C);v=(D+S)/2-z*T,x=($+N)/2+z*C}else{const z=1/O,k=R*R+A*A,E=C*C+T*T;v=D+(T*k-A*E)*z,x=$+(R*E-C*k)*z}s[m]=v,s[m+1]=x}let u=n[n.length-1],l,c=u*4,f,h=e[2*u],p,d=e[2*u+1];i.fill(0);for(let g=0;g<n.length;++g)u=n[g],l=c,f=h,p=d,c=u*4,h=e[2*u],d=e[2*u+1],i[l+2]=i[c]=p-d,i[l+3]=i[c+1]=h-f}render(e){const n=e==null?e=new qn:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let c=0,f=r.length;c<f;++c){const h=r[c];if(h<c)continue;const p=Math.floor(c/3)*2,d=Math.floor(h/3)*2,g=a[p],m=a[p+1],y=a[d],v=a[d+1];this._renderSegment(g,m,y,v,e)}let u,l=o[o.length-1];for(let c=0;c<o.length;++c){u=l,l=o[c];const f=Math.floor(i[l]/3)*2,h=a[f],p=a[f+1],d=u*4,g=this._project(h,p,s[d+2],s[d+3]);g&&this._renderSegment(h,p,g[0],g[1],e)}return n&&n.value()}renderBounds(e){const n=e==null?e=new qn: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 qn: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 Gc;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 l=Math.floor(u/3);if(s.push(n[l*2],n[l*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],l,c=this._regioncode(s,u),f,h=0;for(let p=0;p<r;p+=2)if(o=s,a=u,s=n[p],u=n[p+1],l=c,c=this._regioncode(s,u),l===0&&c===0)f=h,h=0,i?i.push(s,u):i=[s,u];else{let d,g,m,y,v;if(l===0){if((d=this._clipSegment(o,a,s,u,l,c))===null)continue;[g,m,y,v]=d}else{if((d=this._clipSegment(s,u,o,a,c,l))===null)continue;[y,v,g,m]=d,f=h,h=this._edgecode(g,m),f&&h&&this._edge(e,f,h,i,i.length),i?i.push(g,m):i=[g,m]}f=h,h=this._edgecode(y,v),f&&h&&this._edge(e,f,h,i,i.length),i?i.push(y,v):i=[y,v]}if(i)f=h,h=this._edgecode(i[0],i[1]),f&&h&&this._edge(e,f,h,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,l,c=o||a;c&8?(u=e+(r-e)*(this.ymax-n)/(i-n),l=this.ymax):c&4?(u=e+(r-e)*(this.ymin-n)/(i-n),l=this.ymin):c&2?(l=n+(i-n)*(this.xmax-e)/(r-e),u=this.xmax):(l=n+(i-n)*(this.xmin-e)/(r-e),u=this.xmin),o?(e=u,n=l,o=this._regioncode(e,n)):(r=u,i=l,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 l=0,c=s.length,f,h=this._edgecode(s[c-2],s[c-1]);l<c;l+=2)f=h,h=this._edgecode(s[l],s[l+1]),f&&h&&(l=this._edge(e,f,h,s,l),c=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 _D=2*Math.PI,Or=Math.pow;function wD(t){return t[0]}function $D(t){return t[1]}function SD(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 AD(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class zc{static from(e,n=wD,r=$D,i){return new zc("length"in e?MD(e,n,r,i):Float64Array.from(DD(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&&SD(e)){this.collinear=Int32Array.from({length:n.length/2},(h,p)=>p).sort((h,p)=>n[2*h]-n[2*p]||n[2*h+1]-n[2*p+1]);const u=this.collinear[0],l=this.collinear[this.collinear.length-1],c=[n[2*u],n[2*u+1],n[2*l],n[2*l+1]],f=1e-8*Math.hypot(c[3]-c[1],c[2]-c[0]);for(let h=0,p=n.length/2;h<p;++h){const d=AD(n[2*h],n[2*h+1],f);n[2*h]=d[0],n[2*h+1]=d[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,l=r.length;u<l;++u){const c=o[u%3===2?u-2:u+1];(r[u]===-1||a[c]===-1)&&(a[c]=u)}for(let u=0,l=i.length;u<l;++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 vm(this,e)}*neighbors(e){const{inedges:n,hull:r,_hullIndex:i,halfedges:o,triangles:a,collinear:s}=this;if(s){const f=s.indexOf(e);f>0&&(yield s[f-1]),f<s.length-1&&(yield s[f+1]);return}const u=n[e];if(u===-1)return;let l=u,c=-1;do{if(yield c=a[l],l=l%3===2?l-2:l+1,a[l]!==e)return;if(l=o[l],l===-1){const f=r[(i[e]+1)%r.length];f!==c&&(yield f);return}}while(l!==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:l}=this;if(i[e]===-1||!l.length)return(e+1)%(l.length>>1);let c=e,f=Or(n-l[e*2],2)+Or(r-l[e*2+1],2);const h=i[e];let p=h;do{let d=u[p];const g=Or(n-l[d*2],2)+Or(r-l[d*2+1],2);if(g<f&&(f=g,c=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&&Or(n-l[p*2],2)+Or(r-l[p*2+1],2)<f)return p;break}}while(p!==h);return c}render(e){const n=e==null?e=new qn: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 l=o[a]*2,c=o[u]*2;e.moveTo(r[l],r[l+1]),e.lineTo(r[c],r[c+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 qn: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,_D)}return r&&r.value()}renderHull(e){const n=e==null?e=new qn: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 Gc;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new qn: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 Gc;return this.renderTriangle(e,n),n.value()}}function MD(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*DD(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 xm={},Oc={},Uc=34,Qi=10,Bc=13;function _m(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function PD(t,e){var n=_m(t);return function(r,i){return e(n(r),i,t)}}function wm(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 TD(t){return t<0?"-"+re(-t,6):t>9999?"+"+re(t,6):re(t,4)}function LD(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":TD(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 as(t){var e=new RegExp('["'+t+`
6
+ \r]`),n=t.charCodeAt(0);function r(f,h){var p,d,g=i(f,function(m,y){if(p)return p(m,y-1);d=m,p=h?PD(m,h):_m(m)});return g.columns=d||[],g}function i(f,h){var p=[],d=f.length,g=0,m=0,y,v=d<=0,x=!1;f.charCodeAt(d-1)===Qi&&--d,f.charCodeAt(d-1)===Bc&&--d;function b(){if(v)return Oc;if(x)return x=!1,xm;var M,D=g,$;if(f.charCodeAt(D)===Uc){for(;g++<d&&f.charCodeAt(g)!==Uc||f.charCodeAt(++g)===Uc;);return(M=g)>=d?v=!0:($=f.charCodeAt(g++))===Qi?x=!0:$===Bc&&(x=!0,f.charCodeAt(g)===Qi&&++g),f.slice(D+1,M-1).replace(/""/g,'"')}for(;g<d;){if(($=f.charCodeAt(M=g++))===Qi)x=!0;else if($===Bc)x=!0,f.charCodeAt(g)===Qi&&++g;else if($!==n)continue;return f.slice(D,M)}return v=!0,f.slice(D,d)}for(;(y=b())!==Oc;){for(var _=[];y!==xm&&y!==Oc;)_.push(y),y=b();h&&(_=h(_,m++))==null||p.push(_)}return p}function o(f,h){return f.map(function(p){return h.map(function(d){return c(p[d])}).join(t)})}function a(f,h){return h==null&&(h=wm(f)),[h.map(c).join(t)].concat(o(f,h)).join(`
7
+ `)}function s(f,h){return h==null&&(h=wm(f)),o(f,h).join(`
8
8
  `)}function u(f){return f.map(l).join(`
9
- `)}function l(f){return f.map(c).join(t)}function c(f){return f==null?"":f instanceof Date?BD(f):e.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:u,formatRow:l,formatValue:c}}var Xn=as(","),Pm=Xn.parse,YD=Xn.parseRows,HD=Xn.format,WD=Xn.formatBody,VD=Xn.formatRows,jD=Xn.formatRow,qD=Xn.formatValue,Zn=as(" "),Tm=Zn.parse,XD=Zn.parseRows,ZD=Zn.format,KD=Zn.formatBody,QD=Zn.formatRows,JD=Zn.formatRow,tP=Zn.formatValue;function eP(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})?)?$/))nP&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const nP=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function rP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function iP(t,e){return fetch(t,e).then(rP)}function oP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function aP(t,e){return fetch(t,e).then(oP)}function sP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function ss(t,e){return fetch(t,e).then(sP)}function Lm(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 uP(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 lP=Lm(Pm),cP=Lm(Tm);function fP(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 hP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function pP(t,e){return fetch(t,e).then(hP)}function Hc(t){return(e,n)=>ss(e,n).then(r=>new DOMParser().parseFromString(r,t))}const dP=Hc("application/xml");var gP=Hc("text/html"),mP=Hc("image/svg+xml");function yP(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,a=n.length,s,u=0,l=0;for(o=0;o<a;++o)s=n[o],u+=s.x,l+=s.y;for(u=(u/a-t)*r,l=(l/a-e)*r,o=0;o<a;++o)s=n[o],s.x-=u,s.y-=l}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 bP(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return Cm(this.cover(e,n),e,n,t)}function Cm(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,l=t._x1,c=t._y1,f,h,p,d,g,m,b,x;if(!o)return t._root=a,t;for(;o.length;)if((g=e>=(f=(s+l)/2))?s=f:l=f,(m=n>=(h=(u+c)/2))?u=h:c=h,i=o,!(o=o[b=m<<1|g]))return i[b]=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[b]=a:t._root=a,t;do i=i?i[b]=new Array(4):t._root=new Array(4),(g=e>=(f=(s+l)/2))?s=f:l=f,(m=n>=(h=(u+c)/2))?u=h:c=h;while((b=m<<1|g)===(x=(d>=h)<<1|p>=f));return i[x]=o,i[b]=a,t}function vP(t){var e,n,r=t.length,i,o,a=new Array(r),s=new Array(r),u=1/0,l=1/0,c=-1/0,f=-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>c&&(c=i),o<l&&(l=o),o>f&&(f=o));if(u>c||l>f)return this;for(this.cover(u,l).cover(c,f),n=0;n<r;++n)Cm(this,a[n],s[n],t[n]);return this}function xP(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,l;n>t||t>=i||r>e||e>=o;)switch(l=(e<r)<<1|t<n,u=new Array(4),u[l]=s,s=u,a*=2,l){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 _P(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function wP(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 Vt(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function $P(t,e,n){var r,i=this._x0,o=this._y0,a,s,u,l,c=this._x1,f=this._y1,h=[],p=this._root,d,g;for(p&&h.push(new Vt(p,i,o,c,f)),n==null?n=1/0:(i=t-n,o=e-n,c=t+n,f=e+n,n*=n);d=h.pop();)if(!(!(p=d.node)||(a=d.x0)>c||(s=d.y0)>f||(u=d.x1)<i||(l=d.y1)<o))if(p.length){var m=(a+u)/2,b=(s+l)/2;h.push(new Vt(p[3],m,b,u,l),new Vt(p[2],a,b,m,l),new Vt(p[1],m,s,u,b),new Vt(p[0],a,s,m,b)),(g=(e>=b)<<1|t>=m)&&(d=h[h.length-1],h[h.length-1]=h[h.length-1-g],h[h.length-1-g]=d)}else{var x=t-+this._x.call(null,p.data),v=e-+this._y.call(null,p.data),y=x*x+v*v;if(y<n){var w=Math.sqrt(n=y);i=t-w,o=e-w,c=t+w,f=e+w,r=p.data}}return r}function SP(t){if(isNaN(c=+this._x.call(null,t))||isNaN(f=+this._y.call(null,t)))return this;var e,n=this._root,r,i,o,a=this._x0,s=this._y0,u=this._x1,l=this._y1,c,f,h,p,d,g,m,b;if(!n)return this;if(n.length)for(;;){if((d=c>=(h=(a+u)/2))?a=h:u=h,(g=f>=(p=(s+l)/2))?s=p:l=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,b=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[b]=n:this._root=n),this):(this._root=o,this)}function AP(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function MP(){return this._root}function DP(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function PP(t){var e=[],n,r=this._root,i,o,a,s,u;for(r&&e.push(new Vt(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 l=(o+s)/2,c=(a+u)/2;(i=r[3])&&e.push(new Vt(i,l,c,s,u)),(i=r[2])&&e.push(new Vt(i,o,c,l,u)),(i=r[1])&&e.push(new Vt(i,l,a,s,c)),(i=r[0])&&e.push(new Vt(i,o,a,l,c))}return this}function TP(t){var e=[],n=[],r;for(this._root&&e.push(new Vt(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,l=r.y1,c=(a+u)/2,f=(s+l)/2;(o=i[0])&&e.push(new Vt(o,a,s,c,f)),(o=i[1])&&e.push(new Vt(o,c,s,u,f)),(o=i[2])&&e.push(new Vt(o,a,f,c,l)),(o=i[3])&&e.push(new Vt(o,c,f,u,l))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function LP(t){return t[0]}function CP(t){return arguments.length?(this._x=t,this):this._x}function EP(t){return t[1]}function RP(t){return arguments.length?(this._y=t,this):this._y}function us(t,e,n){var r=new Wc(e??LP,n??EP,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Wc(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 Em(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var jt=us.prototype=Wc.prototype;jt.copy=function(){var t=new Wc(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=Em(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]=Em(r));return t},jt.add=bP,jt.addAll=vP,jt.cover=xP,jt.data=_P,jt.extent=wP,jt.find=$P,jt.remove=SP,jt.removeAll=AP,jt.root=MP,jt.size=DP,jt.visit=PP,jt.visitAfter=TP,jt.x=CP,jt.y=RP;function Lt(t){return function(){return t}}function mn(t){return(t()-.5)*1e-6}function kP(t){return t.x+t.vx}function IP(t){return t.y+t.vy}function Rm(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Lt(t==null?1:+t));function a(){for(var l,c=e.length,f,h,p,d,g,m,b=0;b<o;++b)for(f=us(e,kP,IP).visitAfter(s),l=0;l<c;++l)h=e[l],g=n[h.index],m=g*g,p=h.x+h.vx,d=h.y+h.vy,f.visit(x);function x(v,y,w,D,P){var S=v.data,_=v.r,T=g+_;if(S){if(S.index>h.index){var $=p-S.x-S.vx,N=d-S.y-S.vy,R=$*$+N*N;R<T*T&&($===0&&($=mn(r),R+=$*$),N===0&&(N=mn(r),R+=N*N),R=(T-(R=Math.sqrt(R)))/R*i,h.vx+=($*=R)*(T=(_*=_)/(m+_)),h.vy+=(N*=R)*T,S.vx-=$*(T=1-T),S.vy-=N*T)}return}return y>p+T||D<p-T||w>d+T||P<d-T}}function s(l){if(l.data)return l.r=n[l.data.index];for(var c=l.r=0;c<4;++c)l[c]&&l[c].r>l.r&&(l.r=l[c].r)}function u(){if(e){var l,c=e.length,f;for(n=new Array(c),l=0;l<c;++l)f=e[l],n[f.index]=+t(f,l,e)}}return a.initialize=function(l,c){e=l,r=c,u()},a.iterations=function(l){return arguments.length?(o=+l,a):o},a.strength=function(l){return arguments.length?(i=+l,a):i},a.radius=function(l){return arguments.length?(t=typeof l=="function"?l:Lt(+l),u(),a):t},a}function NP(t){return t.index}function km(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function FP(t){var e=NP,n=f,r,i=Lt(30),o,a,s,u,l,c=1;t==null&&(t=[]);function f(m){return 1/Math.min(s[m.source.index],s[m.target.index])}function h(m){for(var b=0,x=t.length;b<c;++b)for(var v=0,y,w,D,P,S,_,T;v<x;++v)y=t[v],w=y.source,D=y.target,P=D.x+D.vx-w.x-w.vx||mn(l),S=D.y+D.vy-w.y-w.vy||mn(l),_=Math.sqrt(P*P+S*S),_=(_-o[v])/_*m*r[v],P*=_,S*=_,D.vx-=P*(T=u[v]),D.vy-=S*T,w.vx+=P*(T=1-T),w.vy+=S*T}function p(){if(a){var m,b=a.length,x=t.length,v=new Map(a.map((w,D)=>[e(w,D,a),w])),y;for(m=0,s=new Array(b);m<x;++m)y=t[m],y.index=m,typeof y.source!="object"&&(y.source=km(v,y.source)),typeof y.target!="object"&&(y.target=km(v,y.target)),s[y.source.index]=(s[y.source.index]||0)+1,s[y.target.index]=(s[y.target.index]||0)+1;for(m=0,u=new Array(x);m<x;++m)y=t[m],u[m]=s[y.source.index]/(s[y.source.index]+s[y.target.index]);r=new Array(x),d(),o=new Array(x),g()}}function d(){if(a)for(var m=0,b=t.length;m<b;++m)r[m]=+n(t[m],m,t)}function g(){if(a)for(var m=0,b=t.length;m<b;++m)o[m]=+i(t[m],m,t)}return h.initialize=function(m,b){a=m,l=b,p()},h.links=function(m){return arguments.length?(t=m,p(),h):t},h.id=function(m){return arguments.length?(e=m,h):e},h.iterations=function(m){return arguments.length?(c=+m,h):c},h.strength=function(m){return arguments.length?(n=typeof m=="function"?m:Lt(+m),d(),h):n},h.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Lt(+m),g(),h):i},h}const GP=1664525,zP=1013904223,Im=4294967296;function OP(){let t=1;return()=>(t=(GP*t+zP)%Im)/Im}function UP(t){return t.x}function BP(t){return t.y}var YP=10,HP=Math.PI*(3-Math.sqrt(5));function Nm(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,u=Xa(f),l=Nn("tick","end"),c=OP();t==null&&(t=[]);function f(){h(),l.call("tick",e),n<r&&(u.stop(),l.call("end",e))}function h(g){var m,b=t.length,x;g===void 0&&(g=1);for(var v=0;v<g;++v)for(n+=(o-n)*i,s.forEach(function(y){y(n)}),m=0;m<b;++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,b;g<m;++g){if(b=t[g],b.index=g,b.fx!=null&&(b.x=b.fx),b.fy!=null&&(b.y=b.fy),isNaN(b.x)||isNaN(b.y)){var x=YP*Math.sqrt(.5+g),v=g*HP;b.x=x*Math.cos(v),b.y=x*Math.sin(v)}(isNaN(b.vx)||isNaN(b.vy))&&(b.vx=b.vy=0)}}function d(g){return g.initialize&&g.initialize(t,c),g}return p(),e={tick:h,restart:function(){return u.restart(f),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?(c=g,s.forEach(d),e):c},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,b){var x=0,v=t.length,y,w,D,P,S;for(b==null?b=1/0:b*=b,x=0;x<v;++x)P=t[x],y=g-P.x,w=m-P.y,D=y*y+w*w,D<b&&(S=P,b=D);return S},on:function(g,m){return arguments.length>1?(l.on(g,m),e):l.on(g)}}}function Fm(){var t,e,n,r,i=Lt(-30),o,a=1,s=1/0,u=.81;function l(p){var d,g=t.length,m=us(t,UP,BP).visitAfter(f);for(r=p,d=0;d<g;++d)e=t[d],m.visit(h)}function c(){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 f(p){var d=0,g,m,b=0,x,v,y;if(p.length){for(x=v=y=0;y<4;++y)(g=p[y])&&(m=Math.abs(g.value))&&(d+=g.value,b+=m,x+=m*g.x,v+=m*g.y);p.x=x/b,p.y=v/b}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 h(p,d,g,m){if(!p.value)return!0;var b=p.x-e.x,x=p.y-e.y,v=m-d,y=b*b+x*x;if(v*v/u<y)return y<s&&(b===0&&(b=mn(n),y+=b*b),x===0&&(x=mn(n),y+=x*x),y<a&&(y=Math.sqrt(a*y)),e.vx+=b*p.value*r/y,e.vy+=x*p.value*r/y),!0;if(p.length||y>=s)return;(p.data!==e||p.next)&&(b===0&&(b=mn(n),y+=b*b),x===0&&(x=mn(n),y+=x*x),y<a&&(y=Math.sqrt(a*y)));do p.data!==e&&(v=o[p.data.index]*r/y,e.vx+=b*v,e.vy+=x*v);while(p=p.next)}return l.initialize=function(p,d){t=p,n=d,c()},l.strength=function(p){return arguments.length?(i=typeof p=="function"?p:Lt(+p),c(),l):i},l.distanceMin=function(p){return arguments.length?(a=p*p,l):Math.sqrt(a)},l.distanceMax=function(p){return arguments.length?(s=p*p,l):Math.sqrt(s)},l.theta=function(p){return arguments.length?(u=p*p,l):Math.sqrt(u)},l}function WP(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(l){for(var c=0,f=r.length;c<f;++c){var h=r[c],p=h.x-e||1e-6,d=h.y-n||1e-6,g=Math.sqrt(p*p+d*d),m=(a[c]-g)*o[c]*l/g;h.vx+=p*m,h.vy+=d*m}}function u(){if(r){var l,c=r.length;for(o=new Array(c),a=new Array(c),l=0;l<c;++l)a[l]=+t(r[l],l,r),o[l]=isNaN(a[l])?0:+i(r[l],l,r)}}return s.initialize=function(l){r=l,u()},s.strength=function(l){return arguments.length?(i=typeof l=="function"?l:Lt(+l),u(),s):i},s.radius=function(l){return arguments.length?(t=typeof l=="function"?l:Lt(+l),u(),s):t},s.x=function(l){return arguments.length?(e=+l,s):e},s.y=function(l){return arguments.length?(n=+l,s):n},s}function Gm(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(t==null?0:+t));function o(s){for(var u=0,l=n.length,c;u<l;++u)c=n[u],c.vx+=(i[u]-c.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 zm(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(t==null?0:+t));function o(s){for(var u=0,l=n.length,c;u<l;++u)c=n[u],c.vy+=(i[u]-c.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 VP(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ls(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 Ur(t){return t=ls(Math.abs(t)),t?t[1]:NaN}function jP(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 qP(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var XP=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Br(t){if(!(e=XP.exec(t)))throw new Error("invalid format: "+t);var e;return new cs({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Br.prototype=cs.prototype;function cs(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}cs.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function ZP(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 Om;function KP(t,e){var n=ls(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Om=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")+ls(t,Math.max(0,e+o-1))[0]}function Um(t,e){var n=ls(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 Bm={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:VP,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)=>Um(t*100,e),r:Um,s:KP,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ym(t){return t}var Hm=Array.prototype.map,Wm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Vm(t){var e=t.grouping===void 0||t.thousands===void 0?Ym:jP(Hm.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?Ym:qP(Hm.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 l(f){f=Br(f);var h=f.fill,p=f.align,d=f.sign,g=f.symbol,m=f.zero,b=f.width,x=f.comma,v=f.precision,y=f.trim,w=f.type;w==="n"?(x=!0,w="g"):Bm[w]||(v===void 0&&(v=12),y=!0,w="g"),(m||h==="0"&&p==="=")&&(m=!0,h="0",p="=");var D=g==="$"?n:g==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",P=g==="$"?r:/[%p]/.test(w)?a:"",S=Bm[w],_=/[defgprs%]/.test(w);v=v===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function T($){var N=D,R=P,A,L,M;if(w==="c")R=S($)+R,$="";else{$=+$;var z=$<0||1/$<0;if($=isNaN($)?u:S(Math.abs($),v),y&&($=ZP($)),z&&+$==0&&d!=="+"&&(z=!1),N=(z?d==="("?d:s:d==="-"||d==="("?"":d)+N,R=(w==="s"?Wm[8+Om/3]:"")+R+(z&&d==="("?")":""),_){for(A=-1,L=$.length;++A<L;)if(M=$.charCodeAt(A),48>M||M>57){R=(M===46?i+$.slice(A+1):$.slice(A))+R,$=$.slice(0,A);break}}}x&&!m&&($=e($,1/0));var U=N.length+$.length+R.length,C=U<b?new Array(b-U+1).join(h):"";switch(x&&m&&($=e(C+$,C.length?b-R.length:1/0),C=""),p){case"<":$=N+$+R+C;break;case"=":$=N+C+$+R;break;case"^":$=C.slice(0,U=C.length>>1)+N+$+R+C.slice(U);break;default:$=C+N+$+R;break}return o($)}return T.toString=function(){return f+""},T}function c(f,h){var p=l((f=Br(f),f.type="f",f)),d=Math.max(-8,Math.min(8,Math.floor(Ur(h)/3)))*3,g=Math.pow(10,-d),m=Wm[8+d/3];return function(b){return p(g*b)+m}}return{format:l,formatPrefix:c}}var fs,Ji,Vc;jm({thousands:",",grouping:[3],currency:["$",""]});function jm(t){return fs=Vm(t),Ji=fs.format,Vc=fs.formatPrefix,fs}function qm(t){return Math.max(0,-Ur(Math.abs(t)))}function Xm(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ur(e)/3)))*3-Ur(Math.abs(t)))}function Zm(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ur(e)-Ur(t))+1}var it=1e-6,to=1e-12,ft=Math.PI,St=ft/2,hs=ft/4,qt=ft*2,bt=180/ft,ot=ft/180,dt=Math.abs,Yr=Math.atan,Xt=Math.atan2,tt=Math.cos,ps=Math.ceil,Km=Math.exp,jc=Math.hypot,ds=Math.log,qc=Math.pow,J=Math.sin,ge=Math.sign||function(t){return t>0?1:t<0?-1:0},kt=Math.sqrt,Xc=Math.tan;function Qm(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 Jm(t){return(t=J(t/2))*t}function wt(){}function gs(t,e){t&&e1.hasOwnProperty(t.type)&&e1[t.type](t,e)}var t1={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)}},e1={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){Zc(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Zc(n[r],e,0)},Polygon:function(t,e){n1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)n1(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)gs(n[r],e)}};function Zc(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 n1(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Zc(t[n],e,1);e.polygonEnd()}function Te(t,e){t&&t1.hasOwnProperty(t.type)?t1[t.type](t,e):gs(t,e)}var ms=new Tt,ys=new Tt,r1,i1,Kc,Qc,Jc,ze={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){ms=new Tt,ze.lineStart=QP,ze.lineEnd=JP},polygonEnd:function(){var t=+ms;ys.add(t<0?qt+t:t),this.lineStart=this.lineEnd=this.point=wt},sphere:function(){ys.add(qt)}};function QP(){ze.point=t7}function JP(){o1(r1,i1)}function t7(t,e){ze.point=o1,r1=t,i1=e,t*=ot,e*=ot,Kc=t,Qc=tt(e=e/2+hs),Jc=J(e)}function o1(t,e){t*=ot,e*=ot,e=e/2+hs;var n=t-Kc,r=n>=0?1:-1,i=r*n,o=tt(e),a=J(e),s=Jc*a,u=Qc*o+s*tt(i),l=s*r*J(i);ms.add(Xt(l,u)),Kc=t,Qc=o,Jc=a}function e7(t){return ys=new Tt,Te(t,ze),ys*2}function bs(t){return[Xt(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 vs(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Hr(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 tf(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=kt(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,le,Qn,a1,s1,Wr,eo,yn,Je,tn={point:ef,lineStart:l1,lineEnd:c1,polygonStart:function(){tn.point=f1,tn.lineStart=n7,tn.lineEnd=r7,eo=new Tt,ze.polygonStart()},polygonEnd:function(){ze.polygonEnd(),tn.point=ef,tn.lineStart=l1,tn.lineEnd=c1,ms<0?($t=-(At=180),ie=-(le=90)):eo>it?le=90:eo<-it&&(ie=-90),Je[0]=$t,Je[1]=At},sphere:function(){$t=-(At=180),ie=-(le=90)}};function ef(t,e){yn.push(Je=[$t=t,At=t]),e<ie&&(ie=e),e>le&&(le=e)}function u1(t,e){var n=Kn([t*ot,e*ot]);if(Wr){var r=Hr(Wr,n),i=[r[1],-r[0],0],o=Hr(i,r);_s(o),o=bs(o);var a=t-Qn,s=a>0?1:-1,u=o[0]*bt*s,l,c=dt(a)>180;c^(s*Qn<u&&u<s*t)?(l=o[1]*bt,l>le&&(le=l)):(u=(u+360)%360-180,c^(s*Qn<u&&u<s*t)?(l=-o[1]*bt,l<ie&&(ie=l)):(e<ie&&(ie=e),e>le&&(le=e))),c?t<Qn?ce($t,t)>ce($t,At)&&(At=t):ce(t,At)>ce($t,At)&&($t=t):At>=$t?(t<$t&&($t=t),t>At&&(At=t)):t>Qn?ce($t,t)>ce($t,At)&&(At=t):ce(t,At)>ce($t,At)&&($t=t)}else yn.push(Je=[$t=t,At=t]);e<ie&&(ie=e),e>le&&(le=e),Wr=n,Qn=t}function l1(){tn.point=u1}function c1(){Je[0]=$t,Je[1]=At,tn.point=ef,Wr=null}function f1(t,e){if(Wr){var n=t-Qn;eo.add(dt(n)>180?n+(n>0?360:-360):n)}else a1=t,s1=e;ze.point(t,e),u1(t,e)}function n7(){ze.lineStart()}function r7(){f1(a1,s1),ze.lineEnd(),dt(eo)>it&&($t=-(At=180)),Je[0]=$t,Je[1]=At,Wr=null}function ce(t,e){return(e-=t)<0?e+360:e}function i7(t,e){return t[0]-e[0]}function h1(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function o7(t){var e,n,r,i,o,a,s;if(le=At=-($t=ie=1/0),yn=[],Te(t,tn),n=yn.length){for(yn.sort(i7),e=1,r=yn[0],o=[r];e<n;++e)i=yn[e],h1(r,i[0])||h1(r,i[1])?(ce(r[0],i[1])>ce(r[0],r[1])&&(r[1]=i[1]),ce(i[0],r[1])>ce(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,e=0,r=o[n];e<=n;r=i,++e)i=o[e],(s=ce(r[1],i[0]))>a&&(a=s,$t=i[0],At=r[1])}return yn=Je=null,$t===1/0||ie===1/0?[[NaN,NaN],[NaN,NaN]]:[[$t,ie],[At,le]]}var no,ws,$s,Ss,As,Ms,Ds,Ps,nf,rf,of,p1,d1,Kt,Qt,Jt,Le={sphere:wt,point:af,lineStart:g1,lineEnd:m1,polygonStart:function(){Le.lineStart=u7,Le.lineEnd=l7},polygonEnd:function(){Le.lineStart=g1,Le.lineEnd=m1}};function af(t,e){t*=ot,e*=ot;var n=tt(e);ro(n*tt(t),n*J(t),J(e))}function ro(t,e,n){++no,$s+=(t-$s)/no,Ss+=(e-Ss)/no,As+=(n-As)/no}function g1(){Le.point=a7}function a7(t,e){t*=ot,e*=ot;var n=tt(e);Kt=n*tt(t),Qt=n*J(t),Jt=J(e),Le.point=s7,ro(Kt,Qt,Jt)}function s7(t,e){t*=ot,e*=ot;var n=tt(e),r=n*tt(t),i=n*J(t),o=J(e),a=Xt(kt((a=Qt*o-Jt*i)*a+(a=Jt*r-Kt*o)*a+(a=Kt*i-Qt*r)*a),Kt*r+Qt*i+Jt*o);ws+=a,Ms+=a*(Kt+(Kt=r)),Ds+=a*(Qt+(Qt=i)),Ps+=a*(Jt+(Jt=o)),ro(Kt,Qt,Jt)}function m1(){Le.point=af}function u7(){Le.point=c7}function l7(){y1(p1,d1),Le.point=af}function c7(t,e){p1=t,d1=e,t*=ot,e*=ot,Le.point=y1;var n=tt(e);Kt=n*tt(t),Qt=n*J(t),Jt=J(e),ro(Kt,Qt,Jt)}function y1(t,e){t*=ot,e*=ot;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,l=jc(a,s,u),c=Zt(l),f=l&&-c/l;nf.add(f*a),rf.add(f*s),of.add(f*u),ws+=c,Ms+=c*(Kt+(Kt=r)),Ds+=c*(Qt+(Qt=i)),Ps+=c*(Jt+(Jt=o)),ro(Kt,Qt,Jt)}function f7(t){no=ws=$s=Ss=As=Ms=Ds=Ps=0,nf=new Tt,rf=new Tt,of=new Tt,Te(t,Le);var e=+nf,n=+rf,r=+of,i=jc(e,n,r);return i<to&&(e=Ms,n=Ds,r=Ps,ws<it&&(e=$s,n=Ss,r=As),i=jc(e,n,r),i<to)?[NaN,NaN]:[Xt(n,e)*bt,Zt(r/i)*bt]}function Vr(t){return function(){return t}}function sf(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 uf(t,e){return dt(t)>ft&&(t-=Math.round(t/qt)*qt),[t,e]}uf.invert=uf;function lf(t,e,n){return(t%=qt)?e||n?sf(v1(t),x1(e,n)):v1(t):e||n?x1(e,n):uf}function b1(t){return function(e,n){return e+=t,dt(e)>ft&&(e-=Math.round(e/qt)*qt),[e,n]}}function v1(t){var e=b1(t);return e.invert=b1(-t),e}function x1(t,e){var n=tt(t),r=J(t),i=tt(e),o=J(e);function a(s,u){var l=tt(u),c=tt(s)*l,f=J(s)*l,h=J(u),p=h*n+c*r;return[Xt(f*i-p*o,c*n-h*r),Zt(p*i+f*o)]}return a.invert=function(s,u){var l=tt(u),c=tt(s)*l,f=J(s)*l,h=J(u),p=h*i-f*o;return[Xt(f*i+h*o,c*n+p*r),Zt(p*n-c*r)]},a}function _1(t){t=lf(t[0]*ot,t[1]*ot,t.length>2?t[2]*ot:0);function e(n){return n=t(n[0]*ot,n[1]*ot),n[0]*=bt,n[1]*=bt,n}return e.invert=function(n){return n=t.invert(n[0]*ot,n[1]*ot),n[0]*=bt,n[1]*=bt,n},e}function w1(t,e,n,r,i,o){if(n){var a=tt(e),s=J(e),u=r*n;i==null?(i=e+r*qt,o=e-u/2):(i=$1(a,i),o=$1(a,o),(r>0?i<o:i>o)&&(i+=r*qt));for(var l,c=i;r>0?c>o:c<o;c-=u)l=bs([a,-s*tt(c),-s*J(c)]),t.point(l[0],l[1])}}function $1(t,e){e=Kn(e),e[0]-=t,_s(e);var n=Qm(-e[1]);return((-e[2]<0?-n:n)+qt-it)%qt}function h7(){var t=Vr([0,0]),e=Vr(90),n=Vr(2),r,i,o={point:a};function a(u,l){r.push(u=i(u,l)),u[0]*=bt,u[1]*=bt}function s(){var u=t.apply(this,arguments),l=e.apply(this,arguments)*ot,c=n.apply(this,arguments)*ot;return r=[],i=lf(-u[0]*ot,-u[1]*ot,0).invert,w1(o,l,c,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 S1(){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 Ts(t,e){return dt(t[0]-e[0])<it&&dt(t[1]-e[1])<it}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 A1(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],b=d[g],x;if(Ts(m,b)){if(!m[2]&&!b[2]){for(i.lineStart(),s=0;s<g;++s)i.point((m=d[s])[0],m[1]);i.lineEnd();return}b[0]+=2*it}o.push(x=new Ls(m,d,null,!0)),a.push(x.o=new Ls(m,null,x,!1)),o.push(x=new Ls(b,d,null,!1)),a.push(x.o=new Ls(b,null,x,!0))}}),!!o.length){for(a.sort(e),M1(o),M1(a),s=0,u=a.length;s<u;++s)a[s].e=n=!n;for(var l=o[0],c,f;;){for(var h=l,p=!0;h.v;)if((h=h.n)===l)return;c=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(s=0,u=c.length;s<u;++s)i.point((f=c[s])[0],f[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(c=h.p.z,s=c.length-1;s>=0;--s)i.point((f=c[s])[0],f[1]);else r(h.x,h.p.x,-1,i);h=h.p}h=h.o,c=h.z,p=!p}while(!h.v);i.lineEnd()}}}function M1(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 cf(t){return dt(t[0])<=ft?t[0]:ge(t[0])*((dt(t[0])+ft)%qt-ft)}function D1(t,e){var n=cf(e),r=e[1],i=J(r),o=[J(n),-tt(n),0],a=0,s=0,u=new Tt;i===1?r=St+it:i===-1&&(r=-St-it);for(var l=0,c=t.length;l<c;++l)if(h=(f=t[l]).length)for(var f,h,p=f[h-1],d=cf(p),g=p[1]/2+hs,m=J(g),b=tt(g),x=0;x<h;++x,d=y,m=D,b=P,p=v){var v=f[x],y=cf(v),w=v[1]/2+hs,D=J(w),P=tt(w),S=y-d,_=S>=0?1:-1,T=_*S,$=T>ft,N=m*D;if(u.add(Xt(N*_*J(T),b*P+N*tt(T))),a+=$?S+_*qt:S,$^d>=n^y>=n){var R=Hr(Kn(p),Kn(v));_s(R);var A=Hr(o,R);_s(A);var L=($^S>=0?-1:1)*Zt(A[2]);(r>L||r===L&&(R[0]||R[1]))&&(s+=$^S>=0?1:-1)}}return(a<-it||a<it&&u<-to)^s&1}function P1(t,e,n,r){return function(i){var o=e(i),a=S1(),s=e(a),u=!1,l,c,f,h={point:p,lineStart:g,lineEnd:m,polygonStart:function(){h.point=b,h.lineStart=x,h.lineEnd=v,c=[],l=[]},polygonEnd:function(){h.point=p,h.lineStart=g,h.lineEnd=m,c=Ol(c);var y=D1(l,r);c.length?(u||(i.polygonStart(),u=!0),A1(c,d7,y,n,i)):y&&(u||(i.polygonStart(),u=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),u&&(i.polygonEnd(),u=!1),c=l=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(y,w){t(y,w)&&i.point(y,w)}function d(y,w){o.point(y,w)}function g(){h.point=d,o.lineStart()}function m(){h.point=p,o.lineEnd()}function b(y,w){f.push([y,w]),s.point(y,w)}function x(){s.lineStart(),f=[]}function v(){b(f[0][0],f[0][1]),s.lineEnd();var y=s.clean(),w=a.result(),D,P=w.length,S,_,T;if(f.pop(),l.push(f),f=null,!!P){if(y&1){if(_=w[0],(S=_.length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),D=0;D<S;++D)i.point((T=_[D])[0],T[1]);i.lineEnd()}return}P>1&&y&2&&w.push(w.pop().concat(w.shift())),c.push(w.filter(p7))}}return h}}function p7(t){return t.length>1}function d7(t,e){return((t=t.x)[0]<0?t[1]-St-it:St-t[1])-((e=e.x)[0]<0?e[1]-St-it:St-e[1])}const ff=P1(function(){return!0},g7,y7,[-ft,-St]);function g7(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)<it?(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)<it&&(e-=r*it),dt(o-s)<it&&(o-=s*it),n=m7(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 m7(t,e,n,r){var i,o,a=J(t-n);return dt(a)>it?Yr((J(e)*(o=tt(r))*J(n)-J(r)*(i=tt(e))*J(t))/(i*o*a)):(e+r)/2}function y7(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])>it){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 T1(t){var e=tt(t),n=2*ot,r=e>0,i=dt(e)>it;function o(c,f,h,p){w1(p,t,n,h,c,f)}function a(c,f){return tt(c)*tt(f)>e}function s(c){var f,h,p,d,g;return{lineStart:function(){d=p=!1,g=1},point:function(m,b){var x=[m,b],v,y=a(m,b),w=r?y?0:l(m,b):y?l(m+(m<0?ft:-ft),b):0;if(!f&&(d=p=y)&&c.lineStart(),y!==p&&(v=u(f,x),(!v||Ts(f,v)||Ts(x,v))&&(x[2]=1)),y!==p)g=0,y?(c.lineStart(),v=u(x,f),c.point(v[0],v[1])):(v=u(f,x),c.point(v[0],v[1],2),c.lineEnd()),f=v;else if(i&&f&&r^y){var D;!(w&h)&&(D=u(x,f,!0))&&(g=0,r?(c.lineStart(),c.point(D[0][0],D[0][1]),c.point(D[1][0],D[1][1]),c.lineEnd()):(c.point(D[1][0],D[1][1]),c.lineEnd(),c.lineStart(),c.point(D[0][0],D[0][1],3)))}y&&(!f||!Ts(f,x))&&c.point(x[0],x[1]),f=x,p=y,h=w},lineEnd:function(){p&&c.lineEnd(),f=null},clean:function(){return g|(d&&p)<<1}}}function u(c,f,h){var p=Kn(c),d=Kn(f),g=[1,0,0],m=Hr(p,d),b=vs(m,m),x=m[0],v=b-x*x;if(!v)return!h&&c;var y=e*b/v,w=-e*x/v,D=Hr(g,m),P=xs(g,y),S=xs(m,w);tf(P,S);var _=D,T=vs(P,_),$=vs(_,_),N=T*T-$*(vs(P,P)-1);if(!(N<0)){var R=kt(N),A=xs(_,(-T-R)/$);if(tf(A,P),A=bs(A),!h)return A;var L=c[0],M=f[0],z=c[1],U=f[1],C;M<L&&(C=L,L=M,M=C);var k=M-L,E=dt(k-ft)<it,G=E||k<it;if(!E&&U<z&&(C=z,z=U,U=C),G?E?z+U>0^A[1]<(dt(A[0]-L)<it?z:U):z<=A[1]&&A[1]<=U:k>ft^(L<=A[0]&&A[0]<=M)){var j=xs(_,(-T+R)/$);return tf(j,P),[A,bs(j)]}}}function l(c,f){var h=r?t:ft-t,p=0;return c<-h?p|=1:c>h&&(p|=2),f<-h?p|=4:f>h&&(p|=8),p}return P1(a,s,o,r?[0,-t]:[-ft,t-ft])}function b7(t,e,n,r,i,o){var a=t[0],s=t[1],u=e[0],l=e[1],c=0,f=1,h=u-a,p=l-s,d;if(d=n-a,!(!h&&d>0)){if(d/=h,h<0){if(d<c)return;d<f&&(f=d)}else if(h>0){if(d>f)return;d>c&&(c=d)}if(d=i-a,!(!h&&d<0)){if(d/=h,h<0){if(d>f)return;d>c&&(c=d)}else if(h>0){if(d<c)return;d<f&&(f=d)}if(d=r-s,!(!p&&d>0)){if(d/=p,p<0){if(d<c)return;d<f&&(f=d)}else if(p>0){if(d>f)return;d>c&&(c=d)}if(d=o-s,!(!p&&d<0)){if(d/=p,p<0){if(d>f)return;d>c&&(c=d)}else if(p>0){if(d<c)return;d<f&&(f=d)}return c>0&&(t[0]=a+c*h,t[1]=s+c*p),f<1&&(e[0]=a+f*h,e[1]=s+f*p),!0}}}}}var io=1e9,Cs=-io;function Es(t,e,n,r){function i(l,c){return t<=l&&l<=n&&e<=c&&c<=r}function o(l,c,f,h){var p=0,d=0;if(l==null||(p=a(l,f))!==(d=a(c,f))||u(l,c)<0^f>0)do h.point(p===0||p===3?t:n,p>1?r:e);while((p=(p+f+4)%4)!==d);else h.point(c[0],c[1])}function a(l,c){return dt(l[0]-t)<it?c>0?0:3:dt(l[0]-n)<it?c>0?2:1:dt(l[1]-e)<it?c>0?1:0:c>0?3:2}function s(l,c){return u(l.x,c.x)}function u(l,c){var f=a(l,1),h=a(c,1);return f!==h?f-h:f===0?c[1]-l[1]:f===1?l[0]-c[0]:f===2?l[1]-c[1]:c[0]-l[0]}return function(l){var c=l,f=S1(),h,p,d,g,m,b,x,v,y,w,D,P={point:S,lineStart:N,lineEnd:R,polygonStart:T,polygonEnd:$};function S(L,M){i(L,M)&&c.point(L,M)}function _(){for(var L=0,M=0,z=p.length;M<z;++M)for(var U=p[M],C=1,k=U.length,E=U[0],G,j,Q=E[0],F=E[1];C<k;++C)G=Q,j=F,E=U[C],Q=E[0],F=E[1],j<=r?F>r&&(Q-G)*(r-j)>(F-j)*(t-G)&&++L:F<=r&&(Q-G)*(r-j)<(F-j)*(t-G)&&--L;return L}function T(){c=f,h=[],p=[],D=!0}function $(){var L=_(),M=D&&L,z=(h=Ol(h)).length;(M||z)&&(l.polygonStart(),M&&(l.lineStart(),o(null,null,1,l),l.lineEnd()),z&&A1(h,s,L,o,l),l.polygonEnd()),c=l,h=p=d=null}function N(){P.point=A,p&&p.push(d=[]),w=!0,y=!1,x=v=NaN}function R(){h&&(A(g,m),b&&y&&f.rejoin(),h.push(f.result())),P.point=S,y&&c.lineEnd()}function A(L,M){var z=i(L,M);if(p&&d.push([L,M]),w)g=L,m=M,b=z,w=!1,z&&(c.lineStart(),c.point(L,M));else if(z&&y)c.point(L,M);else{var U=[x=Math.max(Cs,Math.min(io,x)),v=Math.max(Cs,Math.min(io,v))],C=[L=Math.max(Cs,Math.min(io,L)),M=Math.max(Cs,Math.min(io,M))];b7(U,C,t,e,n,r)?(y||(c.lineStart(),c.point(U[0],U[1])),c.point(C[0],C[1]),z||c.lineEnd(),D=!1):z&&(c.lineStart(),c.point(L,M),D=!1)}x=L,v=M,y=z}return P}}function v7(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Es(t,e,n,r)(o=s)},extent:function(s){return arguments.length?(t=+s[0][0],e=+s[0][1],n=+s[1][0],r=+s[1][1],i=o=null,a):[[t,e],[n,r]]}}}var hf,pf,Rs,ks,jr={sphere:wt,point:wt,lineStart:x7,lineEnd:wt,polygonStart:wt,polygonEnd:wt};function x7(){jr.point=w7,jr.lineEnd=_7}function _7(){jr.point=jr.lineEnd=wt}function w7(t,e){t*=ot,e*=ot,pf=t,Rs=J(e),ks=tt(e),jr.point=$7}function $7(t,e){t*=ot,e*=ot;var n=J(e),r=tt(e),i=dt(t-pf),o=tt(i),a=J(i),s=r*a,u=ks*n-Rs*r*o,l=Rs*n+ks*r*o;hf.add(Xt(kt(s*s+u*u),l)),pf=t,Rs=n,ks=r}function L1(t){return hf=new Tt,Te(t,jr),+hf}var df=[null,null],S7={type:"LineString",coordinates:df};function Is(t,e){return df[0]=t,df[1]=e,L1(S7)}var C1={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}},E1={Sphere:function(){return!0},Point:function(t,e){return R1(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(R1(n[r],e))return!0;return!1},LineString:function(t,e){return k1(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(k1(n[r],e))return!0;return!1},Polygon:function(t,e){return I1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(I1(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&&E1.hasOwnProperty(t.type)?E1[t.type](t,e):!1}function R1(t,e){return Is(t,e)===0}function k1(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=Is(t[o],e),r===0||o>0&&(i=Is(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<to*i))return!0;n=r}return!1}function I1(t,e){return!!D1(t.map(A7),N1(e))}function A7(t){return t=t.map(N1),t.pop(),t}function N1(t){return[t[0]*ot,t[1]*ot]}function M7(t,e){return(t&&C1.hasOwnProperty(t.type)?C1[t.type]:Ns)(t,e)}function F1(t,e,n){var r=fn(t,e-it,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function G1(t,e,n){var r=fn(t,e-it,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function z1(){var t,e,n,r,i,o,a,s,u=10,l=u,c=90,f=360,h,p,d,g,m=2.5;function b(){return{type:"MultiLineString",coordinates:x()}}function x(){return fn(ps(r/c)*c,n,c).map(d).concat(fn(ps(s/f)*f,a,f).map(g)).concat(fn(ps(e/u)*u,t,u).filter(function(v){return dt(v%c)>it}).map(h)).concat(fn(ps(o/l)*l,i,l).filter(function(v){return dt(v%f)>it}).map(p))}return b.lines=function(){return x().map(function(v){return{type:"LineString",coordinates:v}})},b.outline=function(){return{type:"Polygon",coordinates:[d(r).concat(g(a).slice(1),d(n).reverse().slice(1),g(s).reverse().slice(1))]}},b.extent=function(v){return arguments.length?b.extentMajor(v).extentMinor(v):b.extentMinor()},b.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),b.precision(m)):[[r,s],[n,a]]},b.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),b.precision(m)):[[e,o],[t,i]]},b.step=function(v){return arguments.length?b.stepMajor(v).stepMinor(v):b.stepMinor()},b.stepMajor=function(v){return arguments.length?(c=+v[0],f=+v[1],b):[c,f]},b.stepMinor=function(v){return arguments.length?(u=+v[0],l=+v[1],b):[u,l]},b.precision=function(v){return arguments.length?(m=+v,h=F1(o,i,90),p=G1(e,t,m),d=F1(s,a,90),g=G1(r,n,m),b):m},b.extentMajor([[-180,-90+it],[180,90-it]]).extentMinor([[-180,-80-it],[180,80+it]])}function D7(){return z1()()}function P7(t,e){var n=t[0]*ot,r=t[1]*ot,i=e[0]*ot,o=e[1]*ot,a=tt(r),s=J(r),u=tt(o),l=J(o),c=a*tt(n),f=a*J(n),h=u*tt(i),p=u*J(i),d=2*Zt(kt(Jm(o-r)+a*u*Jm(i-n))),g=J(d),m=d?function(b){var x=J(b*=d)/g,v=J(d-b)/g,y=v*c+x*h,w=v*f+x*p,D=v*s+x*l;return[Xt(w,y)*bt,Xt(D,kt(y*y+w*w))*bt]}:function(){return[n*bt,r*bt]};return m.distance=d,m}const oo=t=>t;var gf=new Tt,mf=new Tt,O1,U1,yf,bf,en={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){en.lineStart=T7,en.lineEnd=C7},polygonEnd:function(){en.lineStart=en.lineEnd=en.point=wt,gf.add(dt(mf)),mf=new Tt},result:function(){var t=gf/2;return gf=new Tt,t}};function T7(){en.point=L7}function L7(t,e){en.point=B1,O1=yf=t,U1=bf=e}function B1(t,e){mf.add(bf*t-yf*e),yf=t,bf=e}function C7(){B1(O1,U1)}var qr=1/0,Fs=qr,ao=-qr,Gs=ao,zs={point:E7,lineStart:wt,lineEnd:wt,polygonStart:wt,polygonEnd:wt,result:function(){var t=[[qr,Fs],[ao,Gs]];return ao=Gs=-(Fs=qr=1/0),t}};function E7(t,e){t<qr&&(qr=t),t>ao&&(ao=t),e<Fs&&(Fs=e),e>Gs&&(Gs=e)}var vf=0,xf=0,so=0,Os=0,Us=0,Xr=0,_f=0,wf=0,uo=0,Y1,H1,Oe,Ue,me={point:Jn,lineStart:W1,lineEnd:V1,polygonStart:function(){me.lineStart=I7,me.lineEnd=N7},polygonEnd:function(){me.point=Jn,me.lineStart=W1,me.lineEnd=V1},result:function(){var t=uo?[_f/uo,wf/uo]:Xr?[Os/Xr,Us/Xr]:so?[vf/so,xf/so]:[NaN,NaN];return vf=xf=so=Os=Us=Xr=_f=wf=uo=0,t}};function Jn(t,e){vf+=t,xf+=e,++so}function W1(){me.point=R7}function R7(t,e){me.point=k7,Jn(Oe=t,Ue=e)}function k7(t,e){var n=t-Oe,r=e-Ue,i=kt(n*n+r*r);Os+=i*(Oe+t)/2,Us+=i*(Ue+e)/2,Xr+=i,Jn(Oe=t,Ue=e)}function V1(){me.point=Jn}function I7(){me.point=F7}function N7(){j1(Y1,H1)}function F7(t,e){me.point=j1,Jn(Y1=Oe=t,H1=Ue=e)}function j1(t,e){var n=t-Oe,r=e-Ue,i=kt(n*n+r*r);Os+=i*(Oe+t)/2,Us+=i*(Ue+e)/2,Xr+=i,i=Ue*t-Oe*e,_f+=i*(Oe+t),wf+=i*(Ue+e),uo+=i*3,Jn(Oe=t,Ue=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,qt);break}}},result:wt};var $f=new Tt,Sf,X1,Z1,lo,co,fo={point:wt,lineStart:function(){fo.point=G7},lineEnd:function(){Sf&&K1(X1,Z1),fo.point=wt},polygonStart:function(){Sf=!0},polygonEnd:function(){Sf=null},result:function(){var t=+$f;return $f=new Tt,t}};function G7(t,e){fo.point=K1,X1=lo=t,Z1=co=e}function K1(t,e){lo-=t,co-=e,$f.add(kt(lo*lo+co*co)),lo=t,co=e}let Q1,Bs,J1,ty;class ey{constructor(e){this._append=e==null?ny:z7(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!==J1||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`,J1=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 z7(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return ny;if(e!==Q1){const n=10**e;Q1=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 O7(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(en)),en.result()},a.measure=function(s){return Te(s,i(fo)),fo.result()},a.bounds=function(s){return Te(s,i(zs)),zs.result()},a.centroid=function(s){return Te(s,i(me)),me.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 ey(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 ey(n)),a},a.projection(t).digits(n).context(e)}function U7(t){return{stream:ho(t)}}function ho(t){return function(e){var n=new Af;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Af(){}Af.prototype={constructor:Af,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Mf(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),Te(n,t.stream(zs)),e(zs.result()),r!=null&&t.clipExtent(r),t}function Ys(t,e,n){return Mf(t,function(r){var i=e[1][0]-e[0][0],o=e[1][1]-e[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),s=+e[0][0]+(i-a*(r[1][0]+r[0][0]))/2,u=+e[0][1]+(o-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([s,u])},n)}function Df(t,e,n){return Ys(t,[[0,0],e],n)}function Pf(t,e,n){return Mf(t,function(r){var i=+e,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,s=-o*r[0][1];t.scale(150*o).translate([a,s])},n)}function Tf(t,e,n){return Mf(t,function(r){var i=+e,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],s=(i-o*(r[1][1]+r[0][1]))/2;t.scale(150*o).translate([a,s])},n)}var ry=16,B7=tt(30*ot);function iy(t,e){return+e?H7(t,e):Y7(t)}function Y7(t){return ho({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function H7(t,e){function n(r,i,o,a,s,u,l,c,f,h,p,d,g,m){var b=l-r,x=c-i,v=b*b+x*x;if(v>4*e&&g--){var y=a+h,w=s+p,D=u+d,P=kt(y*y+w*w+D*D),S=Zt(D/=P),_=dt(dt(D)-1)<it||dt(o-f)<it?(o+f)/2:Xt(w,y),T=t(_,S),$=T[0],N=T[1],R=$-r,A=N-i,L=x*R-b*A;(L*L/v>e||dt((b*R+x*A)/v-.5)>.3||a*h+s*p+u*d<B7)&&(n(r,i,o,a,s,u,$,N,_,y/=P,w/=P,D,g,m),m.point($,N),n($,N,_,y,w,D,l,c,f,h,p,d,g,m))}}return function(r){var i,o,a,s,u,l,c,f,h,p,d,g,m={point:b,lineStart:x,lineEnd:y,polygonStart:function(){r.polygonStart(),m.lineStart=w},polygonEnd:function(){r.polygonEnd(),m.lineStart=x}};function b(S,_){S=t(S,_),r.point(S[0],S[1])}function x(){f=NaN,m.point=v,r.lineStart()}function v(S,_){var T=Kn([S,_]),$=t(S,_);n(f,h,c,p,d,g,f=$[0],h=$[1],c=S,p=T[0],d=T[1],g=T[2],ry,r),r.point(f,h)}function y(){m.point=b,r.lineEnd()}function w(){x(),m.point=D,m.lineEnd=P}function D(S,_){v(i=S,_),o=f,a=h,s=p,u=d,l=g,m.point=v}function P(){n(f,h,c,p,d,g,o,a,i,s,u,l,ry,r),m.lineEnd=y,y()}return m}}var W7=ho({point:function(t,e){this.stream.point(t*ot,e*ot)}});function V7(t){return ho({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function j7(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 j7(t,e,n,r,i);var a=tt(o),s=J(o),u=a*t,l=s*t,c=a/t,f=s/t,h=(s*n-a*e)/t,p=(s*e+a*n)/t;function d(g,m){return g*=r,m*=i,[u*g-l*m+e,n-l*g-u*m]}return d.invert=function(g,m){return[r*(c*g-f*m+h),i*(p-f*g-c*m)]},d}function Be(t){return Lf(function(){return t})()}function Lf(t){var e,n=150,r=480,i=250,o=0,a=0,s=0,u=0,l=0,c,f=0,h=1,p=1,d=null,g=ff,m=null,b,x,v,y=oo,w=.5,D,P,S,_,T;function $(L){return S(L[0]*ot,L[1]*ot)}function N(L){return L=S.invert(L[0],L[1]),L&&[L[0]*bt,L[1]*bt]}$.stream=function(L){return _&&T===L?_:_=W7(V7(c)(g(D(y(T=L)))))},$.preclip=function(L){return arguments.length?(g=L,d=void 0,A()):g},$.postclip=function(L){return arguments.length?(y=L,m=b=x=v=null,A()):y},$.clipAngle=function(L){return arguments.length?(g=+L?T1(d=L*ot):(d=null,ff),A()):d*bt},$.clipExtent=function(L){return arguments.length?(y=L==null?(m=b=x=v=null,oo):Es(m=+L[0][0],b=+L[0][1],x=+L[1][0],v=+L[1][1]),A()):m==null?null:[[m,b],[x,v]]},$.scale=function(L){return arguments.length?(n=+L,R()):n},$.translate=function(L){return arguments.length?(r=+L[0],i=+L[1],R()):[r,i]},$.center=function(L){return arguments.length?(o=L[0]%360*ot,a=L[1]%360*ot,R()):[o*bt,a*bt]},$.rotate=function(L){return arguments.length?(s=L[0]%360*ot,u=L[1]%360*ot,l=L.length>2?L[2]%360*ot:0,R()):[s*bt,u*bt,l*bt]},$.angle=function(L){return arguments.length?(f=L%360*ot,R()):f*bt},$.reflectX=function(L){return arguments.length?(h=L?-1:1,R()):h<0},$.reflectY=function(L){return arguments.length?(p=L?-1:1,R()):p<0},$.precision=function(L){return arguments.length?(D=iy(P,w=L*L),A()):kt(w)},$.fitExtent=function(L,M){return Ys($,L,M)},$.fitSize=function(L,M){return Df($,L,M)},$.fitWidth=function(L,M){return Pf($,L,M)},$.fitHeight=function(L,M){return Tf($,L,M)};function R(){var L=oy(n,0,0,h,p,f).apply(null,e(o,a)),M=oy(n,r-L[0],i-L[1],h,p,f);return c=lf(s,u,l),P=sf(e,M),S=sf(c,P),D=iy(P,w),A()}function A(){return _=T=null,$}return function(){return e=t.apply(this,arguments),$.invert=e.invert&&N,R()}}function Cf(t){var e=0,n=ft/3,r=Lf(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*ot,n=o[1]*ot):[e*bt,n*bt]},i}function q7(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 ay(t,e){var n=J(t),r=(n+J(e))/2;if(dt(r)<it)return q7(t);var i=1+n*(2*r-n),o=kt(i)/r;function a(s,u){var l=kt(i-2*r*J(u))/r;return[l*J(s*=r),o-l*tt(s)]}return a.invert=function(s,u){var l=o-u,c=Xt(s,dt(l))*ge(l);return l*r<0&&(c-=ft*ge(s)*ge(l)),[c/r,Zt((i-(s*s+l*l)*r*r)/(2*r))]},a}function Hs(){return Cf(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 X7(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 Z7(){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,l={point:function(h,p){u=[h,p]}};function c(h){var p=h[0],d=h[1];return u=null,r.point(p,d),u||(o.point(p,d),u)||(s.point(p,d),u)}c.invert=function(h){var p=n.scale(),d=n.translate(),g=(h[0]-d[0])/p,m=(h[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(h)},c.stream=function(h){return t&&e===h?t:t=X7([n.stream(e=h),i.stream(h),a.stream(h)])},c.precision=function(h){return arguments.length?(n.precision(h),i.precision(h),a.precision(h),f()):n.precision()},c.scale=function(h){return arguments.length?(n.scale(h),i.scale(h*.35),a.scale(h),c.translate(n.translate())):n.scale()},c.translate=function(h){if(!arguments.length)return n.translate();var p=n.scale(),d=+h[0],g=+h[1];return r=n.translate(h).clipExtent([[d-.455*p,g-.238*p],[d+.455*p,g+.238*p]]).stream(l),o=i.translate([d-.307*p,g+.201*p]).clipExtent([[d-.425*p+it,g+.12*p+it],[d-.214*p-it,g+.234*p-it]]).stream(l),s=a.translate([d-.205*p,g+.212*p]).clipExtent([[d-.214*p+it,g+.166*p+it],[d-.115*p-it,g+.234*p-it]]).stream(l),f()},c.fitExtent=function(h,p){return Ys(c,h,p)},c.fitSize=function(h,p){return Df(c,h,p)},c.fitWidth=function(h,p){return Pf(c,h,p)},c.fitHeight=function(h,p){return Tf(c,h,p)};function f(){return t=e=null,c}return c.scale(1070)}function uy(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=kt(e*e+n*n),i=t(r),o=J(i),a=tt(i);return[Xt(e*o,r*a),Zt(r&&n*o/r)]}}var Ef=uy(function(t){return kt(2/(1+t))});Ef.invert=po(function(t){return 2*Zt(t/2)});function K7(){return Be(Ef).scale(124.75).clipAngle(180-.001)}var Rf=uy(function(t){return(t=Qm(t))&&t/J(t)});Rf.invert=po(function(t){return t});function Q7(){return Be(Rf).scale(79.4188).clipAngle(180-.001)}function go(t,e){return[t,ds(Xc((St+e)/2))]}go.invert=function(t,e){return[t,2*Yr(Km(e))-St]};function J7(){return ly(go).scale(961/qt)}function ly(t){var e=Be(t),n=e.center,r=e.scale,i=e.translate,o=e.clipExtent,a=null,s,u,l;e.scale=function(f){return arguments.length?(r(f),c()):r()},e.translate=function(f){return arguments.length?(i(f),c()):i()},e.center=function(f){return arguments.length?(n(f),c()):n()},e.clipExtent=function(f){return arguments.length?(f==null?a=s=u=l=null:(a=+f[0][0],s=+f[0][1],u=+f[1][0],l=+f[1][1]),c()):a==null?null:[[a,s],[u,l]]};function c(){var f=ft*r(),h=e(_1(e.rotate()).invert([0,0]));return o(a==null?[[h[0]-f,h[1]-f],[h[0]+f,h[1]+f]]:t===go?[[Math.max(h[0]-f,a),s],[Math.min(h[0]+f,u),l]]:[[a,Math.max(h[1]-f,s)],[u,Math.min(h[1]+f,l)]])}return c()}function Ws(t){return Xc((St+t)/2)}function cy(t,e){var n=tt(t),r=t===e?J(t):ds(n/tt(e))/ds(Ws(e)/Ws(t)),i=n*qc(Ws(t),r)/r;if(!r)return go;function o(a,s){i>0?s<-St+it&&(s=-St+it):s>St-it&&(s=St-it);var u=i/qc(Ws(s),r);return[u*J(r*a),i-u*tt(r*a)]}return o.invert=function(a,s){var u=i-s,l=ge(r)*kt(a*a+u*u),c=Xt(a,dt(u))*ge(u);return u*r<0&&(c-=ft*ge(a)*ge(u)),[c/r,2*Yr(qc(i/l,1/r))-St]},o}function tT(){return Cf(cy).scale(109.5).parallels([30,30])}function mo(t,e){return[t,e]}mo.invert=mo;function eT(){return Be(mo).scale(152.63)}function fy(t,e){var n=tt(t),r=t===e?J(t):(n-tt(e))/(e-t),i=n/r+t;if(dt(r)<it)return mo;function o(a,s){var u=i-s,l=r*a;return[u*J(l),i-u*tt(l)]}return o.invert=function(a,s){var u=i-s,l=Xt(a,dt(u))*ge(u);return u*r<0&&(l-=ft*ge(a)*ge(u)),[l/r,i-ge(r)*kt(a*a+u*u)]},o}function nT(){return Cf(fy).scale(131.154).center([0,13.9389])}var yo=1.340264,bo=-.081106,vo=893e-6,xo=.003796,Vs=kt(3)/2,rT=12;function kf(t,e){var n=Zt(Vs*J(e)),r=n*n,i=r*r*r;return[t*tt(n)/(Vs*(yo+3*bo*r+i*(7*vo+9*xo*r))),n*(yo+bo*r+i*(vo+xo*r))]}kf.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,u;o<rT&&(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[Vs*t*(yo+3*bo*r+i*(7*vo+9*xo*r))/tt(n),Zt(J(n)/Vs)]};function iT(){return Be(kf).scale(177.158)}function If(t,e){var n=tt(e),r=tt(t)*n;return[n*J(t)/r,J(e)/r]}If.invert=po(Yr);function oT(){return Be(If).scale(144.049).clipAngle(60)}function aT(){var t=1,e=0,n=0,r=1,i=1,o=0,a,s,u=null,l,c,f,h=1,p=1,d=ho({point:function(y,w){var D=v([y,w]);this.stream.point(D[0],D[1])}}),g=oo,m,b;function x(){return h=t*r,p=t*i,m=b=null,v}function v(y){var w=y[0]*h,D=y[1]*p;if(o){var P=D*a-w*s;w=w*a+D*s,D=P}return[w+e,D+n]}return v.invert=function(y){var w=y[0]-e,D=y[1]-n;if(o){var P=D*a+w*s;w=w*a-D*s,D=P}return[w/h,D/p]},v.stream=function(y){return m&&b===y?m:m=d(g(b=y))},v.postclip=function(y){return arguments.length?(g=y,u=l=c=f=null,x()):g},v.clipExtent=function(y){return arguments.length?(g=y==null?(u=l=c=f=null,oo):Es(u=+y[0][0],l=+y[0][1],c=+y[1][0],f=+y[1][1]),x()):u==null?null:[[u,l],[c,f]]},v.scale=function(y){return arguments.length?(t=+y,x()):t},v.translate=function(y){return arguments.length?(e=+y[0],n=+y[1],x()):[e,n]},v.angle=function(y){return arguments.length?(o=y%360*ot,s=J(o),a=tt(o),x()):o*bt},v.reflectX=function(y){return arguments.length?(r=y?-1:1,x()):r<0},v.reflectY=function(y){return arguments.length?(i=y?-1:1,x()):i<0},v.fitExtent=function(y,w){return Ys(v,y,w)},v.fitSize=function(y,w){return Df(v,y,w)},v.fitWidth=function(y,w){return Pf(v,y,w)},v.fitHeight=function(y,w){return Tf(v,y,w)},v}function Nf(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)))]}Nf.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)>it&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function sT(){return Be(Nf).scale(175.295)}function Ff(t,e){return[tt(e)*J(t),J(e)]}Ff.invert=po(Zt);function uT(){return Be(Ff).scale(249.5).clipAngle(90+it)}function Gf(t,e){var n=tt(e),r=1+tt(t)*n;return[n*J(t)/r,J(e)/r]}Gf.invert=po(function(t){return 2*Yr(t)});function lT(){return Be(Gf).scale(250).clipAngle(142)}function zf(t,e){return[ds(Xc((St+e)/2)),-t]}zf.invert=function(t,e){return[-e,2*Yr(Km(t))-St]};function cT(){var t=ly(zf),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 fT(t,e){return t.parent===e.parent?1:2}function hT(t){return t.reduce(pT,0)/t.length}function pT(t,e){return t+e.x}function dT(t){return 1+t.reduce(gT,0)}function gT(t,e){return Math.max(t,e.y)}function mT(t){for(var e;e=t.children;)t=e[0];return t}function yT(t){for(var e;e=t.children;)t=e[e.length-1];return t}function bT(){var t=fT,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(h){var p=h.children;p?(h.x=hT(p),h.y=dT(p)):(h.x=a?s+=t(h,a):0,h.y=0,a=h)});var u=mT(o),l=yT(o),c=u.x-t(u,l)/2,f=l.x+t(l,u)/2;return o.eachAfter(r?function(h){h.x=(h.x-o.x)*e,h.y=(o.y-h.y)*n}:function(h){h.x=(h.x-c)/(f-c)*e,h.y=(1-(o.y?h.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 vT(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 xT(){return this.eachAfter(vT)}function _T(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function wT(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 $T(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 ST(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function AT(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 MT(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function DT(t){for(var e=this,n=PT(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 PT(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 TT(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function LT(){return Array.from(this)}function CT(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function ET(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*RT(){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=NT)):e===void 0&&(e=IT);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 kT(){return js(this).eachBefore(FT)}function IT(t){return t.children}function NT(t){return Array.isArray(t)?t[1]:null}function FT(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:xT,each:_T,eachAfter:$T,eachBefore:wT,find:ST,sum:AT,sort:MT,path:DT,ancestors:TT,descendants:LT,leaves:CT,links:ET,copy:kT,[Symbol.iterator]:RT};function qs(t){return t==null?null:py(t)}function py(t){if(typeof t!="function")throw new Error;return t}function er(){return 0}function Zr(t){return function(){return t}}const GT=1664525,zT=1013904223,dy=4294967296;function Of(){let t=1;return()=>(t=(GT*t+zT)%dy)/dy}function OT(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function UT(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 BT(t){return gy(t,Of())}function gy(t,e){for(var n=0,r=(t=UT(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&my(a,o)?++n:(a=HT(i=YT(i,o)),n=0);return a}function YT(t,e){var n,r;if(Uf(e,t))return[e];for(n=0;n<t.length;++n)if(Xs(e,t[n])&&Uf(_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(Xs(_o(t[n],t[r]),e)&&Xs(_o(t[n],e),t[r])&&Xs(_o(t[r],e),t[n])&&Uf(yy(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Xs(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 Uf(t,e){for(var n=0;n<e.length;++n)if(!my(t,e[n]))return!1;return!0}function HT(t){switch(t.length){case 1:return WT(t[0]);case 2:return _o(t[0],t[1]);case 3:return yy(t[0],t[1],t[2])}}function WT(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,l=a-r,c=s-i,f=Math.sqrt(u*u+l*l);return{x:(n+o+u/f*c)/2,y:(r+a+l/f*c)/2,r:(f+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,l=n.x,c=n.y,f=n.r,h=r-a,p=r-l,d=i-s,g=i-c,m=u-o,b=f-o,x=r*r+i*i-o*o,v=x-a*a-s*s+u*u,y=x-l*l-c*c+f*f,w=p*d-h*g,D=(d*y-g*v)/(w*2)-r,P=(g*m-d*b)/w,S=(p*v-h*y)/(w*2)-i,_=(h*b-p*m)/w,T=P*P+_*_-1,$=2*(o+D*P+S*_),N=D*D+S*S-o*o,R=-(Math.abs(T)>1e-6?($+Math.sqrt($*$-4*T*N))/(2*T):N/$);return{x:r+D+P*R,y:i+S+_*R,r:R}}function by(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,s,u,l=r*r+a*a;l?(o=e.r+n.r,o*=o,u=t.r+n.r,u*=u,o>u?(i=(l+u-o)/(2*l),s=Math.sqrt(Math.max(0,u/l-i*i)),n.x=t.x-i*r-s*a,n.y=t.y-i*a+s*r):(i=(l+o-u)/(2*l),s=Math.sqrt(Math.max(0,o/l-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=OT(t)).length))return 0;var n,r,i,o,a,s,u,l,c,f,h;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),l=r.next,c=n.previous,f=r._.r,h=n._.r;do if(f<=h){if(vy(l._,i._)){r=l,n.next=r,r.previous=n,--u;continue t}f+=l._.r,l=l.next}else{if(vy(c._,i._)){n=c,n.next=r,r.previous=n,--u;continue t}h+=c._.r,c=c.previous}while(l!==c.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 VT(t){return _y(t,Of()),t}function jT(t){return Math.sqrt(t.value)}function qT(){var t=null,e=1,n=1,r=er;function i(o){const a=Of();return o.x=e/2,o.y=n/2,t?o.eachBefore(wy(t)).eachAfter(Bf(r,.5,a)).eachBefore($y(1)):o.eachBefore(wy(jT)).eachAfter(Bf(er,1,a)).eachAfter(Bf(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=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:Zr(+o),i):r},i}function wy(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Bf(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 wo(t,e,n,r,i){for(var o=t.children,a,s=-1,u=o.length,l=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*l}function XT(){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&&wo(u,u.x0,a*(u.depth+1)/s,u.x1,a*(u.depth+2)/s);var l=u.x0,c=u.y0,f=u.x1-n,h=u.y1-n;f<l&&(l=f=(l+f)/2),h<c&&(c=h=(c+h)/2),u.x0=l,u.y0=c,u.x1=f,u.y1=h}}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 ZT={depth:-1},Ay={},Yf={};function KT(t){return t.id}function QT(t){return t.parentId}function JT(){var t=KT,e=QT,n;function r(i){var o=Array.from(i),a=t,s=e,u,l,c,f,h,p,d,g,m=new Map;if(n!=null){const b=o.map((y,w)=>t9(n(y,w,i))),x=b.map(My),v=new Set(b).add("");for(const y of x)v.has(y)||(v.add(y),b.push(y),x.push(My(y)),o.push(Yf));a=(y,w)=>b[w],s=(y,w)=>x[w]}for(c=0,u=o.length;c<u;++c)l=o[c],p=o[c]=new tr(l),(d=a(l,c,i))!=null&&(d+="")&&(g=p.id=d,m.set(g,m.has(g)?Ay:p)),(d=s(l,c,i))!=null&&(d+="")&&(p.parent=d);for(c=0;c<u;++c)if(p=o[c],d=p.parent){if(h=m.get(d),!h)throw new Error("missing: "+d);if(h===Ay)throw new Error("ambiguous: "+d);h.children?h.children.push(p):h.children=[p],p.parent=h}else{if(f)throw new Error("multiple roots");f=p}if(!f)throw new Error("no root");if(n!=null){for(;f.data===Yf&&f.children.length===1;)f=f.children[0],--u;for(let b=o.length-1;b>=0&&(p=o[b],p.data===Yf);--b)p.data=null}if(f.parent=ZT,f.eachBefore(function(b){b.depth=b.parent.depth+1,--u}).eachBefore(hy),f.parent=null,u>0)throw new Error("cycle");return f}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 t9(t){t=`${t}`;let e=t.length;return Hf(t,e-1)&&!Hf(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&&!Hf(t,e););return t.slice(0,e)}function Hf(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function e9(t,e){return t.parent===e.parent?1:2}function Wf(t){var e=t.children;return e?e[0]:t.t}function Vf(t){var e=t.children;return e?e[e.length-1]:t.t}function n9(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 r9(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 i9(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 o9(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 a9(){var t=e9,e=1,n=1,r=null;function i(l){var c=o9(l);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)l.eachBefore(u);else{var f=l,h=l,p=l;l.eachBefore(function(x){x.x<f.x&&(f=x),x.x>h.x&&(h=x),x.depth>p.depth&&(p=x)});var d=f===h?1:t(f,h)/2,g=d-f.x,m=e/(h.x+d+g),b=n/(p.depth||1);l.eachBefore(function(x){x.x=(x.x+g)*m,x.y=x.depth*b})}return l}function o(l){var c=l.children,f=l.parent.children,h=l.i?f[l.i-1]:null;if(c){r9(l);var p=(c[0].z+c[c.length-1].z)/2;h?(l.z=h.z+t(l._,h._),l.m=l.z-p):l.z=p}else h&&(l.z=h.z+t(l._,h._));l.parent.A=s(l,h,l.parent.A||f[0])}function a(l){l._.x=l.z+l.parent.m,l.m+=l.parent.m}function s(l,c,f){if(c){for(var h=l,p=l,d=c,g=h.parent.children[0],m=h.m,b=p.m,x=d.m,v=g.m,y;d=Vf(d),h=Wf(h),d&&h;)g=Wf(g),p=Vf(p),p.a=l,y=d.z+x-h.z-m+t(d._,h._),y>0&&(n9(i9(d,l,f),l,y),m+=y,b+=y),x+=d.m,m+=h.m,v+=g.m,b+=p.m;d&&!Vf(p)&&(p.t=d,p.m+=x-b),h&&!Wf(g)&&(g.t=h,g.m+=m-v,f=l)}return f}function u(l){l.x*=e,l.y=l.depth*n}return i.separation=function(l){return arguments.length?(t=l,i):t},i.size=function(l){return arguments.length?(r=!1,e=+l[0],n=+l[1],i):r?null:[e,n]},i.nodeSize=function(l){return arguments.length?(r=!0,e=+l[0],n=+l[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,l=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*l}var Dy=(1+Math.sqrt(5))/2;function Py(t,e,n,r,i,o){for(var a=[],s=e.children,u,l,c=0,f=0,h=s.length,p,d,g=e.value,m,b,x,v,y,w,D;c<h;){p=i-n,d=o-r;do m=s[f++].value;while(!m&&f<h);for(b=x=m,w=Math.max(d/p,p/d)/(g*t),D=m*m*w,y=Math.max(x/D,D/b);f<h;++f){if(m+=l=s[f].value,l<b&&(b=l),l>x&&(x=l),D=m*m*w,v=Math.max(x/D,D/b),v>y){m-=l;break}y=v}a.push(u={value:m,dice:p<d,children:s.slice(c,f)}),u.dice?wo(u,n,r,i,g?r+=d*m/g:o):Qs(u,n,r,g?n+=p*m/g:i,o),g-=m,c=f}return a}const jf=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}(Dy);function Ty(){var t=jf,e=!1,n=1,r=1,i=[0],o=er,a=er,s=er,u=er,l=er;function c(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(f),i=[0],e&&h.eachBefore(Sy),h}function f(h){var p=i[h.depth],d=h.x0+p,g=h.y0+p,m=h.x1-p,b=h.y1-p;m<d&&(d=m=(d+m)/2),b<g&&(g=b=(g+b)/2),h.x0=d,h.y0=g,h.x1=m,h.y1=b,h.children&&(p=i[h.depth+1]=o(h)/2,d+=l(h)-p,g+=a(h)-p,m-=s(h)-p,b-=u(h)-p,m<d&&(d=m=(d+m)/2),b<g&&(g=b=(g+b)/2),t(h,d,g,m,b))}return c.round=function(h){return arguments.length?(e=!!h,c):e},c.size=function(h){return arguments.length?(n=+h[0],r=+h[1],c):[n,r]},c.tile=function(h){return arguments.length?(t=py(h),c):t},c.padding=function(h){return arguments.length?c.paddingInner(h).paddingOuter(h):c.paddingInner()},c.paddingInner=function(h){return arguments.length?(o=typeof h=="function"?h:Zr(+h),c):o},c.paddingOuter=function(h){return arguments.length?c.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):c.paddingTop()},c.paddingTop=function(h){return arguments.length?(a=typeof h=="function"?h:Zr(+h),c):a},c.paddingRight=function(h){return arguments.length?(s=typeof h=="function"?h:Zr(+h),c):s},c.paddingBottom=function(h){return arguments.length?(u=typeof h=="function"?h:Zr(+h),c):u},c.paddingLeft=function(h){return arguments.length?(l=typeof h=="function"?h:Zr(+h),c):l},c}function s9(t,e,n,r,i){var o=t.children,a,s=o.length,u,l=new Array(s+1);for(l[0]=u=a=0;a<s;++a)l[a+1]=u+=o[a].value;c(0,s,t.value,e,n,r,i);function c(f,h,p,d,g,m,b){if(f>=h-1){var x=o[f];x.x0=d,x.y0=g,x.x1=m,x.y1=b;return}for(var v=l[f],y=p/2+v,w=f+1,D=h-1;w<D;){var P=w+D>>>1;l[P]<y?w=P+1:D=P}y-l[w-1]<l[w]-y&&f+1<w&&--w;var S=l[w]-v,_=p-S;if(m-d>b-g){var T=p?(d*_+m*S)/p:m;c(f,w,S,d,g,T,b),c(w,h,_,T,g,m,b)}else{var $=p?(g*_+b*S)/p:b;c(f,w,S,d,g,m,$),c(w,h,_,d,$,m,b)}}}function u9(t,e,n,r,i){(t.depth&1?Qs:wo)(t,e,n,r,i)}const l9=function t(e){function n(r,i,o,a,s){if((u=r._squarify)&&u.ratio===e)for(var u,l,c,f,h=-1,p,d=u.length,g=r.value;++h<d;){for(l=u[h],c=l.children,f=l.value=0,p=c.length;f<p;++f)l.value+=c[f].value;l.dice?wo(l,i,o,a,g?o+=(s-o)*l.value/g:s):Qs(l,i,o,g?i+=(a-i)*l.value/g:a,s),g-=l.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}(Dy);function c9(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 f9(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 h9(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function p9(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&&h9(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function d9(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(p9),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],l=[];for(e=o.length-1;e>=0;--e)l.push(t[r[o[e]][2]]);for(e=+s;e<a.length-u;++e)l.push(t[r[a[e]][2]]);return l}function g9(t,e){for(var n=t.length,r=t[n-1],i=e[0],o=e[1],a=r[0],s=r[1],u,l,c=!1,f=0;f<n;++f)r=t[f],u=r[0],l=r[1],l>o!=s>o&&i<(a-u)*(o-l)/(s-l)+u&&(c=!c),a=u,s=l;return c}function m9(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,y9=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),b9=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),qf=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),v9=function t(e){var n=qf.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(Nt),Cy=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),x9=function t(e){var n=Cy.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),_9=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(Nt),w9=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),$9=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+r)}}return n.source=t,n}(Nt),Ey=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return r===0?()=>1/0:r===1?()=>1:(r=Math.log1p(-r),function(){return 1+Math.floor(Math.log1p(-e())/r)})}return n.source=t,n}(Nt),Xf=function t(e){var n=qf.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 l=n(),c=1+s*l;while(c<=0);c*=c*c;var f=1-e()}while(f>=1-.0331*l*l*l*l&&Math.log(f)>=.5*l*l+a*(1-c+Math.log(c)));return a*c*u()*o}}return r.source=t,r}(Nt),Ry=function t(e){var n=Xf.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),ky=function t(e){var n=Ey.source(e),r=Ry.source(e);function i(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var s=0,u=o,l=a;u*l>16&&u*(1-l)>16;){var c=Math.floor((u+1)*l),f=r(c,u-c+1)();f<=l?(s+=c,u-=c,l=(l-f)/(1-f)):(u=c-1,l/=f)}for(var h=l<.5,p=h?l:1-l,d=n(p),g=d(),m=0;g<=u;++m)g+=d();return s+(h?m:u-m)}}return i.source=t,i}(Nt),S9=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),A9=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),M9=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),D9=function t(e){var n=Xf.source(e),r=ky.source(e);function i(o){return function(){for(var a=0,s=o;s>16;){var u=Math.floor(.875*s),l=n(u)();if(l>s)return a+r(u-1,s/l)();a+=u,s-=l}for(var c=-Math.log1p(-e()),f=0;c<=s;++f)c-=Math.log1p(-e());return a+f}}return i.source=t,i}(Nt),P9=1664525,T9=1013904223,Iy=1/4294967296;function L9(t=Math.random()){let e=(0<=t&&t<1?t/Iy:Math.abs(t))|0;return()=>(e=P9*e+T9|0,Iy*(e>>>0))}function ye(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function nn(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 Zf=Symbol("implicit");function Kf(){var t=new Pi,e=[],n=[],r=Zf;function i(o){let a=t.get(o);if(a===void 0){if(r!==Zf)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 Pi;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 Kf(e,n).unknown(r)},ye.apply(i,arguments),i}function Qf(){var t=Kf().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,l=0,c=.5;delete t.unknown;function f(){var h=e().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,h-u+l*2),s&&(o=Math.floor(o)),d+=(g-d-o*(h-u))*c,a=o*(1-u),s&&(d=Math.round(d),a=Math.round(a));var m=fn(h).map(function(b){return d+o*b});return n(p?m.reverse():m)}return t.domain=function(h){return arguments.length?(e(h),f()):e()},t.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,f()):[r,i]},t.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,s=!0,f()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(h){return arguments.length?(s=!!h,f()):s},t.padding=function(h){return arguments.length?(u=Math.min(1,l=+h),f()):u},t.paddingInner=function(h){return arguments.length?(u=Math.min(1,h),f()):u},t.paddingOuter=function(h){return arguments.length?(l=+h,f()):l},t.align=function(h){return arguments.length?(c=Math.max(0,Math.min(1,h)),f()):c},t.copy=function(){return Qf(e(),[r,i]).round(s).paddingInner(u).paddingOuter(l).align(c)},ye.apply(f(),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 Jf(){return Ny(Qf.apply(null,arguments).paddingInner(1))}function C9(t){return function(){return t}}function Js(t){return+t}var Fy=[0,1];function te(t){return t}function th(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:C9(isNaN(e)?NaN:.5)}function E9(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function R9(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=th(i,r),o=n(a,o)):(r=th(r,i),o=n(o,a)),function(s){return o(r(s))}}function k9(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]=th(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 tu(){var t=Fy,e=Fy,n=qe,r,i,o,a=te,s,u,l;function c(){var h=Math.min(t.length,e.length);return a!==te&&(a=E9(t[0],t[h-1])),s=h>2?k9:R9,u=l=null,f}function f(h){return h==null||isNaN(h=+h)?o:(u||(u=s(t.map(r),e,n)))(r(a(h)))}return f.invert=function(h){return a(i((l||(l=s(e,t.map(r),de)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,Js),c()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),c()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=Ya,c()},f.clamp=function(h){return arguments.length?(a=h?!0:te,c()):a!==te},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,p){return r=h,i=p,c()}}function eh(){return tu()(te,te)}function Gy(t,e,n,r){var i=xa(t,e,n),o;switch(r=Br(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=Xm(i,a))&&(r.precision=o),Vc(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Zm(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 bn(t){var e=t.domain;return t.ticks=function(n){var r=e();return kn(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,l,c=10;for(s<a&&(l=a,a=s,s=l,l=i,i=o,o=l);c-- >0;){if(l=In(a,s,n),l===u)return r[i]=a,r[o]=s,e(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;u=l}return t},t}function eu(){var t=eh();return t.copy=function(){return $o(t,eu())},ye.apply(t,arguments),bn(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],bn(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 I9(t){return-Math.log(-t)}function N9(t){return-Math.exp(-t)}function F9(t){return isFinite(t)?+("1e"+t):t<0?0:t}function G9(t){return t===10?F9:t===Math.E?Math.exp:e=>Math.pow(t,e)}function z9(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 nh(t){const e=t(Uy,By),n=e.domain;let r=10,i,o;function a(){return i=z9(r),o=G9(r),n()[0]<0?(i=Yy(i),o=Yy(o),t(I9,N9)):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 l=u[0],c=u[u.length-1];const f=c<l;f&&([l,c]=[c,l]);let h=i(l),p=i(c),d,g;const m=s==null?10:+s;let b=[];if(!(r%1)&&p-h<m){if(h=Math.floor(h),p=Math.ceil(p),l>0){for(;h<=p;++h)for(d=1;d<r;++d)if(g=h<0?d/o(-h):d*o(h),!(g<l)){if(g>c)break;b.push(g)}}else for(;h<=p;++h)for(d=r-1;d>=1;--d)if(g=h>0?d/o(-h):d*o(h),!(g<l)){if(g>c)break;b.push(g)}b.length*2<m&&(b=kn(l,c,m))}else b=kn(h,p,Math.min(p-h,m)).map(o);return f?b.reverse():b},e.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Br(u)).precision==null&&(u.trim=!0),u=Ji(u)),s===1/0)return u;const l=Math.max(1,r*s/e.ticks().length);return c=>{let f=c/o(Math.round(i(c)));return f*r<r-.5&&(f*=r),f<=l?u(c):""}},e.nice=()=>n(Oy(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function Hy(){const t=nh(tu()).domain([1,10]);return t.copy=()=>$o(t,Hy()).base(t.base()),ye.apply(t,arguments),t}function Wy(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Vy(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function rh(t){var e=1,n=t(Wy(e),Vy(e));return n.constant=function(r){return arguments.length?t(Wy(e=+r),Vy(e)):e},bn(n)}function jy(){var t=rh(tu());return t.copy=function(){return $o(t,jy()).constant(t.constant())},ye.apply(t,arguments)}function qy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function O9(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function U9(t){return t<0?-t*t:t*t}function ih(t){var e=t(te,te),n=1;function r(){return n===1?t(te,te):n===.5?t(O9,U9):t(qy(n),qy(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},bn(e)}function Kr(){var t=ih(tu());return t.copy=function(){return $o(t,Kr()).exponent(t.exponent())},ye.apply(t,arguments),t}function B9(){return Kr.apply(null,arguments).exponent(.5)}function Xy(t){return Math.sign(t)*t*t}function Y9(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function Zy(){var t=eh(),e=[0,1],n=!1,r;function i(o){var a=Y9(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(Xy(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(Xy)),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)},ye.apply(i,arguments),bn(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]=Pg(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 Ky().domain(t).range(e).unknown(r)},ye.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[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 l=i.indexOf(u);return l<0?[NaN,NaN]:l<1?[t,r[0]]:l>=n?[r[n-1],e]:[r[l-1],r[l]]},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)},ye.apply(bn(a),arguments)}function Jy(){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 Jy().domain(t).range(e).unknown(n)},ye.apply(i,arguments)}const oh=new Date,ah=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 l;do u.push(l=new Date(+o)),e(o,s),t(o);while(l<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)=>(oh.setTime(+o),ah.setTime(+a),t(oh),t(ah),Math.floor(n(oh,ah))),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 Qr=Dt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Qr.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):Qr);const tb=Qr.range,rn=1e3,be=rn*60,on=be*60,an=on*24,sh=an*7,eb=an*30,uh=an*365,sn=Dt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getUTCSeconds()),nb=sn.range,nu=Dt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*rn)},(t,e)=>{t.setTime(+t+e*be)},(t,e)=>(e-t)/be,t=>t.getMinutes()),H9=nu.range,ru=Dt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*be)},(t,e)=>(e-t)/be,t=>t.getUTCMinutes()),W9=ru.range,iu=Dt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*rn-t.getMinutes()*be)},(t,e)=>{t.setTime(+t+e*on)},(t,e)=>(e-t)/on,t=>t.getHours()),V9=iu.range,ou=Dt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*on)},(t,e)=>(e-t)/on,t=>t.getUTCHours()),j9=ou.range,Jr=Dt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*be)/an,t=>t.getDate()-1),q9=Jr.range,So=Dt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/an,t=>t.getUTCDate()-1),X9=So.range,lh=Dt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/an,t=>Math.floor(t/an)),Z9=lh.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())*be)/sh)}const ti=nr(0),Ao=nr(1),rb=nr(2),ib=nr(3),rr=nr(4),ob=nr(5),ab=nr(6),sb=ti.range,K9=Ao.range,Q9=rb.range,J9=ib.range,tL=rr.range,eL=ob.range,nL=ab.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)/sh)}const ei=ir(0),Mo=ir(1),ub=ir(2),lb=ir(3),or=ir(4),cb=ir(5),fb=ir(6),hb=ei.range,rL=Mo.range,iL=ub.range,oL=lb.range,aL=or.range,sL=cb.range,uL=fb.range,au=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()),lL=au.range,su=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()),cL=su.range,Ye=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());Ye.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 fL=Ye.range,He=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());He.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 hL=He.range;function pb(t,e,n,r,i,o){const a=[[sn,1,rn],[sn,5,5*rn],[sn,15,15*rn],[sn,30,30*rn],[o,1,be],[o,5,5*be],[o,15,15*be],[o,30,30*be],[i,1,on],[i,3,3*on],[i,6,6*on],[i,12,12*on],[r,1,an],[r,2,2*an],[n,1,sh],[e,1,eb],[e,3,3*eb],[t,1,uh]];function s(l,c,f){const h=c<l;h&&([l,c]=[c,l]);const p=f&&typeof f.range=="function"?f:u(l,c,f),d=p?p.range(l,+c+1):[];return h?d.reverse():d}function u(l,c,f){const h=Math.abs(c-l)/f,p=ma(([,,m])=>m).right(a,h);if(p===a.length)return t.every(xa(l/uh,c/uh,f));if(p===0)return Qr.every(Math.max(xa(l,c,f),1));const[d,g]=a[h/a[p-1][2]<a[p][2]/h?p-1:p];return d.every(g)}return[s,u]}const[db,gb]=pb(He,su,ei,lh,ou,ru),[mb,yb]=pb(Ye,au,ti,Jr,iu,nu);function ch(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 fh(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,l=Po(i),c=To(i),f=Po(o),h=To(o),p=Po(a),d=To(a),g=Po(s),m=To(s),b=Po(u),x=To(u),v={a:z,A:U,b:C,B:k,c:null,d:Sb,e:Sb,f:IL,g:WL,G:jL,H:EL,I:RL,j:kL,L:Ab,m:NL,M:FL,p:E,q:G,Q:Cb,s:Eb,S:GL,u:zL,U:OL,V:UL,w:BL,W:YL,x:null,X:null,y:HL,Y:VL,Z:qL,"%":Lb},y={a:j,A:Q,b:F,B:q,c:null,d:Db,e:Db,f:QL,g:uC,G:cC,H:XL,I:ZL,j:KL,L:Pb,m:JL,M:tC,p:V,q:K,Q:Cb,s:Eb,S:eC,u:nC,U:rC,V:iC,w:oC,W:aC,x:null,X:null,y:sC,Y:lC,Z:fC,"%":Lb},w={a:T,A:$,b:N,B:R,c:A,d:wb,e:wb,f:PL,g:_b,G:xb,H:$b,I:$b,j:SL,L:DL,m:$L,M:AL,p:_,q:wL,Q:LL,s:CL,S:ML,u:yL,U:bL,V:vL,w:mL,W:xL,x:L,X:M,y:_b,Y:xb,Z:_L,"%":TL};v.x=D(n,v),v.X=D(r,v),v.c=D(e,v),y.x=D(n,y),y.X=D(r,y),y.c=D(e,y);function D(W,nt){return function(ut){var H=[],mt=-1,ht=0,Yt=W.length,ee,st,Mt;for(ut instanceof Date||(ut=new Date(+ut));++mt<Yt;)W.charCodeAt(mt)===37&&(H.push(W.slice(ht,mt)),(st=vb[ee=W.charAt(++mt)])!=null?ee=W.charAt(++mt):st=ee==="e"?" ":"0",(Mt=nt[ee])&&(ee=Mt(ut,st)),H.push(ee),ht=mt+1);return H.push(W.slice(ht,mt)),H.join("")}}function P(W,nt){return function(ut){var H=Do(1900,void 0,1),mt=S(H,W,ut+="",0),ht,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(nt&&!("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?(ht=fh(Do(H.y,0,1)),Yt=ht.getUTCDay(),ht=Yt>4||Yt===0?Mo.ceil(ht):Mo(ht),ht=So.offset(ht,(H.V-1)*7),H.y=ht.getUTCFullYear(),H.m=ht.getUTCMonth(),H.d=ht.getUTCDate()+(H.w+6)%7):(ht=ch(Do(H.y,0,1)),Yt=ht.getDay(),ht=Yt>4||Yt===0?Ao.ceil(ht):Ao(ht),ht=Jr.offset(ht,(H.V-1)*7),H.y=ht.getFullYear(),H.m=ht.getMonth(),H.d=ht.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?fh(Do(H.y,0,1)).getUTCDay():ch(Do(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,fh(H)):ch(H)}}function S(W,nt,ut,H){for(var mt=0,ht=nt.length,Yt=ut.length,ee,st;mt<ht;){if(H>=Yt)return-1;if(ee=nt.charCodeAt(mt++),ee===37){if(ee=nt.charAt(mt++),st=w[ee in vb?nt.charAt(mt++):ee],!st||(H=st(W,ut,H))<0)return-1}else if(ee!=ut.charCodeAt(H++))return-1}return H}function _(W,nt,ut){var H=l.exec(nt.slice(ut));return H?(W.p=c.get(H[0].toLowerCase()),ut+H[0].length):-1}function T(W,nt,ut){var H=p.exec(nt.slice(ut));return H?(W.w=d.get(H[0].toLowerCase()),ut+H[0].length):-1}function $(W,nt,ut){var H=f.exec(nt.slice(ut));return H?(W.w=h.get(H[0].toLowerCase()),ut+H[0].length):-1}function N(W,nt,ut){var H=b.exec(nt.slice(ut));return H?(W.m=x.get(H[0].toLowerCase()),ut+H[0].length):-1}function R(W,nt,ut){var H=g.exec(nt.slice(ut));return H?(W.m=m.get(H[0].toLowerCase()),ut+H[0].length):-1}function A(W,nt,ut){return S(W,e,nt,ut)}function L(W,nt,ut){return S(W,n,nt,ut)}function M(W,nt,ut){return S(W,r,nt,ut)}function z(W){return a[W.getDay()]}function U(W){return o[W.getDay()]}function C(W){return u[W.getMonth()]}function k(W){return s[W.getMonth()]}function E(W){return i[+(W.getHours()>=12)]}function G(W){return 1+~~(W.getMonth()/3)}function j(W){return a[W.getUTCDay()]}function Q(W){return o[W.getUTCDay()]}function F(W){return u[W.getUTCMonth()]}function q(W){return s[W.getUTCMonth()]}function V(W){return i[+(W.getUTCHours()>=12)]}function K(W){return 1+~~(W.getUTCMonth()/3)}return{format:function(W){var nt=D(W+="",v);return nt.toString=function(){return W},nt},parse:function(W){var nt=P(W+="",!1);return nt.toString=function(){return W},nt},utcFormat:function(W){var nt=D(W+="",y);return nt.toString=function(){return W},nt},utcParse:function(W){var nt=P(W+="",!0);return nt.toString=function(){return W},nt}}}var vb={"-":"",_:" ",0:"0"},It=/^\s*\d+/,pL=/^%/,dL=/[\\^$*+?|[\]().{}]/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 gL(t){return t.replace(dL,"\\$&")}function Po(t){return new RegExp("^(?:"+t.map(gL).join("|")+")","i")}function To(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function mL(t,e,n){var r=It.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function yL(t,e,n){var r=It.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function bL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function vL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function xL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function xb(t,e,n){var r=It.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function _b(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function _L(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 wL(t,e,n){var r=It.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function $L(t,e,n){var r=It.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=It.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function SL(t,e,n){var r=It.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=It.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function AL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function ML(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function DL(t,e,n){var r=It.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function PL(t,e,n){var r=It.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function TL(t,e,n){var r=pL.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function LL(t,e,n){var r=It.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function CL(t,e,n){var r=It.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Sb(t,e){return gt(t.getDate(),e,2)}function EL(t,e){return gt(t.getHours(),e,2)}function RL(t,e){return gt(t.getHours()%12||12,e,2)}function kL(t,e){return gt(1+Jr.count(Ye(t),t),e,3)}function Ab(t,e){return gt(t.getMilliseconds(),e,3)}function IL(t,e){return Ab(t,e)+"000"}function NL(t,e){return gt(t.getMonth()+1,e,2)}function FL(t,e){return gt(t.getMinutes(),e,2)}function GL(t,e){return gt(t.getSeconds(),e,2)}function zL(t){var e=t.getDay();return e===0?7:e}function OL(t,e){return gt(ti.count(Ye(t)-1,t),e,2)}function Mb(t){var e=t.getDay();return e>=4||e===0?rr(t):rr.ceil(t)}function UL(t,e){return t=Mb(t),gt(rr.count(Ye(t),t)+(Ye(t).getDay()===4),e,2)}function BL(t){return t.getDay()}function YL(t,e){return gt(Ao.count(Ye(t)-1,t),e,2)}function HL(t,e){return gt(t.getFullYear()%100,e,2)}function WL(t,e){return t=Mb(t),gt(t.getFullYear()%100,e,2)}function VL(t,e){return gt(t.getFullYear()%1e4,e,4)}function jL(t,e){var n=t.getDay();return t=n>=4||n===0?rr(t):rr.ceil(t),gt(t.getFullYear()%1e4,e,4)}function qL(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+gt(e/60|0,"0",2)+gt(e%60,"0",2)}function Db(t,e){return gt(t.getUTCDate(),e,2)}function XL(t,e){return gt(t.getUTCHours(),e,2)}function ZL(t,e){return gt(t.getUTCHours()%12||12,e,2)}function KL(t,e){return gt(1+So.count(He(t),t),e,3)}function Pb(t,e){return gt(t.getUTCMilliseconds(),e,3)}function QL(t,e){return Pb(t,e)+"000"}function JL(t,e){return gt(t.getUTCMonth()+1,e,2)}function tC(t,e){return gt(t.getUTCMinutes(),e,2)}function eC(t,e){return gt(t.getUTCSeconds(),e,2)}function nC(t){var e=t.getUTCDay();return e===0?7:e}function rC(t,e){return gt(ei.count(He(t)-1,t),e,2)}function Tb(t){var e=t.getUTCDay();return e>=4||e===0?or(t):or.ceil(t)}function iC(t,e){return t=Tb(t),gt(or.count(He(t),t)+(He(t).getUTCDay()===4),e,2)}function oC(t){return t.getUTCDay()}function aC(t,e){return gt(Mo.count(He(t)-1,t),e,2)}function sC(t,e){return gt(t.getUTCFullYear()%100,e,2)}function uC(t,e){return t=Tb(t),gt(t.getUTCFullYear()%100,e,2)}function lC(t,e){return gt(t.getUTCFullYear()%1e4,e,4)}function cC(t,e){var n=t.getUTCDay();return t=n>=4||n===0?or(t):or.ceil(t),gt(t.getUTCFullYear()%1e4,e,4)}function fC(){return"+0000"}function Lb(){return"%"}function Cb(t){return+t}function Eb(t){return Math.floor(+t/1e3)}var ni,hh,Rb,uu,ph;kb({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 kb(t){return ni=bb(t),hh=ni.format,Rb=ni.parse,uu=ni.utcFormat,ph=ni.utcParse,ni}var Ib="%Y-%m-%dT%H:%M:%S.%LZ";function hC(t){return t.toISOString()}var pC=Date.prototype.toISOString?hC:uu(Ib);const dC=pC;function gC(t){var e=new Date(t);return isNaN(e)?null:e}var mC=+new Date("2000-01-01T00:00:00.000Z")?gC:ph(Ib);const yC=mC;function bC(t){return new Date(t)}function vC(t){return t instanceof Date?+t:+new Date(+t)}function dh(t,e,n,r,i,o,a,s,u,l){var c=eh(),f=c.invert,h=c.domain,p=l(".%L"),d=l(":%S"),g=l("%I:%M"),m=l("%I %p"),b=l("%a %d"),x=l("%b %d"),v=l("%B"),y=l("%Y");function w(D){return(u(D)<D?p:s(D)<D?d:a(D)<D?g:o(D)<D?m:r(D)<D?i(D)<D?b:x:n(D)<D?v:y)(D)}return c.invert=function(D){return new Date(f(D))},c.domain=function(D){return arguments.length?h(Array.from(D,vC)):h().map(bC)},c.ticks=function(D){var P=h();return t(P[0],P[P.length-1],D??10)},c.tickFormat=function(D,P){return P==null?w:l(P)},c.nice=function(D){var P=h();return(!D||typeof D.range!="function")&&(D=e(P[0],P[P.length-1],D??10)),D?h(Oy(P,D)):c},c.copy=function(){return $o(c,dh(t,e,n,r,i,o,a,s,u,l))},c}function xC(){return ye.apply(dh(mb,yb,Ye,au,ti,Jr,iu,nu,sn,hh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function _C(){return ye.apply(dh(db,gb,He,su,ei,So,ou,ru,sn,uu).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function lu(){var t=0,e=1,n,r,i,o,a=te,s=!1,u;function l(f){return f==null||isNaN(f=+f)?u:a(i===0?.5:(f=(o(f)-n)*i,s?Math.max(0,Math.min(1,f)):f))}l.domain=function(f){return arguments.length?([t,e]=f,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),l):[t,e]},l.clamp=function(f){return arguments.length?(s=!!f,l):s},l.interpolator=function(f){return arguments.length?(a=f,l):a};function c(f){return function(h){var p,d;return arguments.length?([p,d]=h,a=f(p,d),l):[a(0),a(1)]}}return l.range=c(qe),l.rangeRound=c(Ya),l.unknown=function(f){return arguments.length?(u=f,l):u},function(f){return o=f,n=f(t),r=f(e),i=n===r?0:1/(r-n),l}}function vn(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Nb(){var t=bn(lu()(te));return t.copy=function(){return vn(t,Nb())},nn.apply(t,arguments)}function Fb(){var t=nh(lu()).domain([1,10]);return t.copy=function(){return vn(t,Fb()).base(t.base())},nn.apply(t,arguments)}function Gb(){var t=rh(lu());return t.copy=function(){return vn(t,Gb()).constant(t.constant())},nn.apply(t,arguments)}function gh(){var t=ih(lu());return t.copy=function(){return vn(t,gh()).exponent(t.exponent())},nn.apply(t,arguments)}function wC(){return gh.apply(null,arguments).exponent(.5)}function zb(){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)=>Ci(t,o/r))},n.copy=function(){return zb(e).domain(t)},nn.apply(n,arguments)}function cu(){var t=0,e=.5,n=1,r=1,i,o,a,s,u,l=te,c,f=!1,h;function p(g){return isNaN(g=+g)?h:(g=.5+((g=+c(g))-o)*(r*g<r*o?s:u),l(f?Math.max(0,Math.min(1,g)):g))}p.domain=function(g){return arguments.length?([t,e,n]=g,i=c(t=+t),o=c(e=+e),a=c(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?(f=!!g,p):f},p.interpolator=function(g){return arguments.length?(l=g,p):l};function d(g){return function(m){var b,x,v;return arguments.length?([b,x,v]=m,l=O0(g,[b,x,v]),p):[l(0),l(.5),l(1)]}}return p.range=d(qe),p.rangeRound=d(Ya),p.unknown=function(g){return arguments.length?(h=g,p):h},function(g){return c=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 Ob(){var t=bn(cu()(te));return t.copy=function(){return vn(t,Ob())},nn.apply(t,arguments)}function Ub(){var t=nh(cu()).domain([.1,1,10]);return t.copy=function(){return vn(t,Ub()).base(t.base())},nn.apply(t,arguments)}function Bb(){var t=rh(cu());return t.copy=function(){return vn(t,Bb()).constant(t.constant())},nn.apply(t,arguments)}function mh(){var t=ih(cu());return t.copy=function(){return vn(t,mh()).exponent(t.exponent())},nn.apply(t,arguments)}function $C(){return mh.apply(null,arguments).exponent(.5)}function ct(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 SC=ct("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),AC=ct("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),MC=ct("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),DC=ct("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),PC=ct("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),TC=ct("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),LC=ct("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),CC=ct("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),EC=ct("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),RC=ct("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),kC=ct("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),vt=t=>A0(t[t.length-1]);var Yb=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ct);const IC=vt(Yb);var Hb=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ct);const NC=vt(Hb);var Wb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ct);const FC=vt(Wb);var Vb=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ct);const GC=vt(Vb);var jb=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ct);const zC=vt(jb);var qb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ct);const OC=vt(qb);var Xb=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ct);const UC=vt(Xb);var Zb=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ct);const BC=vt(Zb);var Kb=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ct);const YC=vt(Kb);var Qb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ct);const HC=vt(Qb);var Jb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ct);const WC=vt(Jb);var tv=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ct);const VC=vt(tv);var ev=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ct);const jC=vt(ev);var nv=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ct);const qC=vt(nv);var rv=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ct);const XC=vt(rv);var iv=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ct);const ZC=vt(iv);var ov=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ct);const KC=vt(ov);var av=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ct);const QC=vt(av);var sv=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ct);const JC=vt(sv);var uv=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ct);const tE=vt(uv);var lv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ct);const eE=vt(lv);var cv=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ct);const nE=vt(cv);var fv=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ct);const rE=vt(fv);var hv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ct);const iE=vt(hv);var pv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ct);const oE=vt(pv);var dv=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ct);const aE=vt(dv);var gv=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ct);const sE=vt(gv);function uE(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 lE=Wa(De(300,.5,0),De(-240,.5,1));var cE=Wa(De(-100,.75,.35),De(80,1.5,.8)),fE=Wa(De(260,.75,.35),De(80,1.5,.8)),fu=De();function hE(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=Lr(),pE=Math.PI/3,dE=Math.PI*2/3;function gE(t){var e;return t=(.5-t)*Math.PI,hu.r=255*(e=Math.sin(t))*e,hu.g=255*(e=Math.sin(t+pE))*e,hu.b=255*(e=Math.sin(t+dE))*e,hu+""}function mE(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 pu(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const yE=pu(ct("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var bE=pu(ct("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),vE=pu(ct("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),xE=pu(ct("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function lt(t){return function(){return t}}const mv=Math.abs,Ut=Math.atan2,un=Math.cos,_E=Math.max,ri=Math.min,oe=Math.sin,xt=Math.sqrt,Bt=1e-12,xn=Math.PI,du=xn/2,_n=2*xn;function wE(t){return t>1?0:t<-1?xn:Math.acos(t)}function yv(t){return t>=1?du:t<=-1?-du: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 Xi(e)}function $E(t){return t.innerRadius}function SE(t){return t.outerRadius}function AE(t){return t.startAngle}function ME(t){return t.endAngle}function DE(t){return t&&t.padAngle}function PE(t,e,n,r,i,o,a,s){var u=n-t,l=r-e,c=a-i,f=s-o,h=f*u-c*l;if(!(h*h<Bt))return h=(c*(e-o)-f*(t-i))/h,[t+h*u,e+h*l]}function gu(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/xt(s*s+u*u),c=l*u,f=-l*s,h=t+c,p=e+f,d=n+c,g=r+f,m=(h+d)/2,b=(p+g)/2,x=d-h,v=g-p,y=x*x+v*v,w=i-o,D=h*g-d*p,P=(v<0?-1:1)*xt(_E(0,w*w*y-D*D)),S=(D*v-x*P)/y,_=(-D*x-v*P)/y,T=(D*v+x*P)/y,$=(-D*x+v*P)/y,N=S-m,R=_-b,A=T-m,L=$-b;return N*N+R*R>A*A+L*L&&(S=T,_=$),{cx:S,cy:_,x01:-c,y01:-f,x11:S*(i/w-1),y11:_*(i/w-1)}}function mu(){var t=$E,e=SE,n=lt(0),r=null,i=AE,o=ME,a=DE,s=null,u=Lo(l);function l(){var c,f,h=+t.apply(this,arguments),p=+e.apply(this,arguments),d=i.apply(this,arguments)-du,g=o.apply(this,arguments)-du,m=mv(g-d),b=g>d;if(s||(s=c=u()),p<h&&(f=p,p=h,h=f),!(p>Bt))s.moveTo(0,0);else if(m>_n-Bt)s.moveTo(p*un(d),p*oe(d)),s.arc(0,0,p,d,g,!b),h>Bt&&(s.moveTo(h*un(g),h*oe(g)),s.arc(0,0,h,g,d,b));else{var x=d,v=g,y=d,w=g,D=m,P=m,S=a.apply(this,arguments)/2,_=S>Bt&&(r?+r.apply(this,arguments):xt(h*h+p*p)),T=ri(mv(p-h)/2,+n.apply(this,arguments)),$=T,N=T,R,A;if(_>Bt){var L=yv(_/h*oe(S)),M=yv(_/p*oe(S));(D-=L*2)>Bt?(L*=b?1:-1,y+=L,w-=L):(D=0,y=w=(d+g)/2),(P-=M*2)>Bt?(M*=b?1:-1,x+=M,v-=M):(P=0,x=v=(d+g)/2)}var z=p*un(x),U=p*oe(x),C=h*un(w),k=h*oe(w);if(T>Bt){var E=p*un(v),G=p*oe(v),j=h*un(y),Q=h*oe(y),F;if(m<xn)if(F=PE(z,U,j,Q,E,G,C,k)){var q=z-F[0],V=U-F[1],K=E-F[0],W=G-F[1],nt=1/oe(wE((q*K+V*W)/(xt(q*q+V*V)*xt(K*K+W*W)))/2),ut=xt(F[0]*F[0]+F[1]*F[1]);$=ri(T,(h-ut)/(nt-1)),N=ri(T,(p-ut)/(nt+1))}else $=N=0}P>Bt?N>Bt?(R=gu(j,Q,z,U,p,N,b),A=gu(E,G,C,k,p,N,b),s.moveTo(R.cx+R.x01,R.cy+R.y01),N<T?s.arc(R.cx,R.cy,N,Ut(R.y01,R.x01),Ut(A.y01,A.x01),!b):(s.arc(R.cx,R.cy,N,Ut(R.y01,R.x01),Ut(R.y11,R.x11),!b),s.arc(0,0,p,Ut(R.cy+R.y11,R.cx+R.x11),Ut(A.cy+A.y11,A.cx+A.x11),!b),s.arc(A.cx,A.cy,N,Ut(A.y11,A.x11),Ut(A.y01,A.x01),!b))):(s.moveTo(z,U),s.arc(0,0,p,x,v,!b)):s.moveTo(z,U),!(h>Bt)||!(D>Bt)?s.lineTo(C,k):$>Bt?(R=gu(C,k,E,G,h,-$,b),A=gu(z,U,j,Q,h,-$,b),s.lineTo(R.cx+R.x01,R.cy+R.y01),$<T?s.arc(R.cx,R.cy,$,Ut(R.y01,R.x01),Ut(A.y01,A.x01),!b):(s.arc(R.cx,R.cy,$,Ut(R.y01,R.x01),Ut(R.y11,R.x11),!b),s.arc(0,0,h,Ut(R.cy+R.y11,R.cx+R.x11),Ut(A.cy+A.y11,A.cx+A.x11),b),s.arc(A.cx,A.cy,$,Ut(A.y11,A.x11),Ut(A.y01,A.x01),!b))):s.arc(0,0,h,w,y,b)}if(s.closePath(),c)return s=null,c+""||null}return l.centroid=function(){var c=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,f=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-xn/2;return[un(f)*c,oe(f)*c]},l.innerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:lt(+c),l):t},l.outerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:lt(+c),l):e},l.cornerRadius=function(c){return arguments.length?(n=typeof c=="function"?c:lt(+c),l):n},l.padRadius=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:lt(+c),l):r},l.startAngle=function(c){return arguments.length?(i=typeof c=="function"?c:lt(+c),l):i},l.endAngle=function(c){return arguments.length?(o=typeof c=="function"?c:lt(+c),l):o},l.padAngle=function(c){return arguments.length?(a=typeof c=="function"?c:lt(+c),l):a},l.context=function(c){return arguments.length?(s=c??null,l):s},l}var TE=Array.prototype.slice;function yu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function bv(t){this._context=t}bv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function bu(t){return new bv(t)}function yh(t){return t[0]}function bh(t){return t[1]}function vu(t,e){var n=lt(!0),r=null,i=bu,o=null,a=Lo(s);t=typeof t=="function"?t:t===void 0?yh:lt(t),e=typeof e=="function"?e:e===void 0?bh:lt(e);function s(u){var l,c=(u=yu(u)).length,f,h=!1,p;for(r==null&&(o=i(p=a())),l=0;l<=c;++l)!(l<c&&n(f=u[l],l,u))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(f,l,u),+e(f,l,u));if(p)return o=null,p+""||null}return s.x=function(u){return arguments.length?(t=typeof u=="function"?u:lt(+u),s):t},s.y=function(u){return arguments.length?(e=typeof u=="function"?u:lt(+u),s):e},s.defined=function(u){return arguments.length?(n=typeof u=="function"?u:lt(!!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 vh(t,e,n){var r=null,i=lt(!0),o=null,a=bu,s=null,u=Lo(l);t=typeof t=="function"?t:t===void 0?yh:lt(+t),e=typeof e=="function"?e:lt(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?bh:lt(+n);function l(f){var h,p,d,g=(f=yu(f)).length,m,b=!1,x,v=new Array(g),y=new Array(g);for(o==null&&(s=a(x=u())),h=0;h<=g;++h){if(!(h<g&&i(m=f[h],h,f))===b)if(b=!b)p=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=h-1;d>=p;--d)s.point(v[d],y[d]);s.lineEnd(),s.areaEnd()}b&&(v[h]=+t(m,h,f),y[h]=+e(m,h,f),s.point(r?+r(m,h,f):v[h],n?+n(m,h,f):y[h]))}if(x)return s=null,x+""||null}function c(){return vu().defined(i).curve(a).context(o)}return l.x=function(f){return arguments.length?(t=typeof f=="function"?f:lt(+f),r=null,l):t},l.x0=function(f){return arguments.length?(t=typeof f=="function"?f:lt(+f),l):t},l.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:lt(+f),l):r},l.y=function(f){return arguments.length?(e=typeof f=="function"?f:lt(+f),n=null,l):e},l.y0=function(f){return arguments.length?(e=typeof f=="function"?f:lt(+f),l):e},l.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:lt(+f),l):n},l.lineX0=l.lineY0=function(){return c().x(t).y(e)},l.lineY1=function(){return c().x(t).y(n)},l.lineX1=function(){return c().x(r).y(e)},l.defined=function(f){return arguments.length?(i=typeof f=="function"?f:lt(!!f),l):i},l.curve=function(f){return arguments.length?(a=f,o!=null&&(s=a(o)),l):a},l.context=function(f){return arguments.length?(f==null?o=s=null:s=a(o=f),l):o},l}function LE(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function CE(t){return t}function vv(){var t=CE,e=LE,n=null,r=lt(0),i=lt(_n),o=lt(0);function a(s){var u,l=(s=yu(s)).length,c,f,h=0,p=new Array(l),d=new Array(l),g=+r.apply(this,arguments),m=Math.min(_n,Math.max(-_n,i.apply(this,arguments)-g)),b,x=Math.min(Math.abs(m)/l,o.apply(this,arguments)),v=x*(m<0?-1:1),y;for(u=0;u<l;++u)(y=d[p[u]=u]=+t(s[u],u,s))>0&&(h+=y);for(e!=null?p.sort(function(w,D){return e(d[w],d[D])}):n!=null&&p.sort(function(w,D){return n(s[w],s[D])}),u=0,f=h?(m-l*v)/h:0;u<l;++u,g=b)c=p[u],y=d[c],b=g+(y>0?y*f:0)+v,d[c]={data:s[c],index:u,value:y,startAngle:g,endAngle:b,padAngle:x};return d}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:lt(+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:lt(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:lt(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:lt(+s),a):o},a}var xv=xh(bu);function _v(t){this._curve=t}_v.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};function xh(t){function e(n){return new _v(t(n))}return e._curve=t,e}function Co(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(n){return arguments.length?e(xh(n)):e()._curve},t}function wv(){return Co(vu().curve(xv))}function $v(){var t=vh().curve(xv),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Co(n())},delete t.lineX0,t.lineEndAngle=function(){return Co(r())},delete t.lineX1,t.lineInnerRadius=function(){return Co(i())},delete t.lineY0,t.lineOuterRadius=function(){return Co(o())},delete t.lineY1,t.curve=function(a){return arguments.length?e(xh(a)):e()._curve},t}function Eo(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class Sv{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}class EE{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 Av(t){return new Sv(t,!0)}function Mv(t){return new Sv(t,!1)}function RE(t){return new EE(t)}function kE(t){return t.source}function IE(t){return t.target}function xu(t){let e=kE,n=IE,r=yh,i=bh,o=null,a=null,s=Lo(u);function u(){let l;const c=TE.call(arguments),f=e.apply(this,c),h=n.apply(this,c);if(o==null&&(a=t(l=s())),a.lineStart(),c[0]=f,a.point(+r.apply(this,c),+i.apply(this,c)),c[0]=h,a.point(+r.apply(this,c),+i.apply(this,c)),a.lineEnd(),l)return a=null,l+""||null}return u.source=function(l){return arguments.length?(e=l,u):e},u.target=function(l){return arguments.length?(n=l,u):n},u.x=function(l){return arguments.length?(r=typeof l=="function"?l:lt(+l),u):r},u.y=function(l){return arguments.length?(i=typeof l=="function"?l:lt(+l),u):i},u.context=function(l){return arguments.length?(l==null?o=a=null:a=t(o=l),u):o},u}function NE(){return xu(Av)}function FE(){return xu(Mv)}function GE(){const t=xu(RE);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const zE=xt(3),Dv={draw(t,e){const n=xt(e+ri(e/28,.75))*.59436,r=n/2,i=r*zE;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},_u={draw(t,e){const n=xt(e/xn);t.moveTo(n,0),t.arc(0,0,n,0,_n)}},Pv={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()}},Tv=xt(1/3),OE=Tv*2,Lv={draw(t,e){const n=xt(e/OE),r=n*Tv;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},Cv={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()}},Ev={draw(t,e){const n=xt(e-ri(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},Rv={draw(t,e){const n=xt(e),r=-n/2;t.rect(r,r,n,n)}},kv={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()}},UE=.8908130915292852,Iv=oe(xn/10)/oe(7*xn/10),BE=oe(_n/10)*Iv,YE=-un(_n/10)*Iv,Nv={draw(t,e){const n=xt(e*UE),r=BE*n,i=YE*n;t.moveTo(0,-n),t.lineTo(r,i);for(let o=1;o<5;++o){const a=_n*o/5,s=un(a),u=oe(a);t.lineTo(u*n,-s*n),t.lineTo(s*r-u*i,u*r+s*i)}t.closePath()}},_h=xt(3),Fv={draw(t,e){const n=-xt(e/(_h*3));t.moveTo(0,n*2),t.lineTo(-_h*n,-n),t.lineTo(_h*n,-n),t.closePath()}},HE=xt(3),Gv={draw(t,e){const n=xt(e)*.6824,r=n/2,i=n*HE/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},ve=-.5,xe=xt(3)/2,wh=1/xt(12),WE=(wh/2+1)*3,zv={draw(t,e){const n=xt(e/WE),r=n/2,i=n*wh,o=r,a=n*wh+n,s=-o,u=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,u),t.lineTo(ve*r-xe*i,xe*r+ve*i),t.lineTo(ve*o-xe*a,xe*o+ve*a),t.lineTo(ve*s-xe*u,xe*s+ve*u),t.lineTo(ve*r+xe*i,ve*i-xe*r),t.lineTo(ve*o+xe*a,ve*a-xe*o),t.lineTo(ve*s+xe*u,ve*u-xe*s),t.closePath()}},$h={draw(t,e){const n=xt(e-ri(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},Ov=[_u,Pv,Lv,Rv,Nv,Fv,zv],VE=[_u,Ev,$h,Gv,Dv,kv,Cv];function jE(t,e){let n=null,r=Lo(i);t=typeof t=="function"?t:lt(t||_u),e=typeof e=="function"?e:lt(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:lt(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:lt(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function wn(){}function wu(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function $u(t){this._context=t}$u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:wu(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:wu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function qE(t){return new $u(t)}function Uv(t){this._context=t}Uv.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:wu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function XE(t){return new Uv(t)}function Bv(t){this._context=t}Bv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:wu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function ZE(t){return new Bv(t)}function Yv(t,e){this._basis=new $u(t),this._beta=e}Yv.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r=t[0],i=e[0],o=t[n]-r,a=e[n]-i,s=-1,u;++s<=n;)u=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(r+u*o),this._beta*e[s]+(1-this._beta)*(i+u*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const KE=function t(e){function n(r){return e===1?new $u(r):new Yv(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function Su(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 Sh(t,e){this._context=t,this._k=(1-e)/6}Sh.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:Su(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:Su(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 QE=function t(e){function n(r){return new Sh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function Ah(t,e){this._context=t,this._k=(1-e)/6}Ah.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Su(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 JE=function t(e){function n(r){return new Ah(r,e)}return n.tension=function(r){return t(+r)},n}(0);function Mh(t,e){this._context=t,this._k=(1-e)/6}Mh.prototype={areaStart: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:Su(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 tR=function t(e){function n(r){return new Mh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function Dh(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 l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*l+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*l+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Hv(t,e){this._context=t,this._alpha=e}Hv.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:Dh(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 eR=function t(e){function n(r){return e?new Hv(r,e):new Sh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Wv(t,e){this._context=t,this._alpha=e}Wv.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Dh(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 nR=function t(e){function n(r){return e?new Wv(r,e):new Ah(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);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(){(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:Dh(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 rR=function t(e){function n(r){return e?new Vv(r,e):new Mh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function jv(t){this._context=t}jv.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function iR(t){return new jv(t)}function qv(t){return t<0?-1:1}function Xv(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(qv(o)+qv(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Zv(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Ph(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 Au(t){this._context=t}Au.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:Ph(this,this._t0,Zv(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Ph(this,Zv(this,n=Xv(this,t,e)),n);break;default:Ph(this,this._t0,n=Xv(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Kv(t){this._context=new Qv(t)}(Kv.prototype=Object.create(Au.prototype)).point=function(t,e){Au.prototype.point.call(this,e,t)};function Qv(t){this._context=t}Qv.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};function oR(t){return new Au(t)}function aR(t){return new Kv(t)}function Jv(t){this._context=t}Jv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=t2(t),i=t2(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function t2(t){var e,n=t.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/o[e-1],o[e]-=r,a[e]-=r*a[e-1];for(i[n-1]=a[n-1]/o[n-1],e=n-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function sR(t){return new Jv(t)}function Mu(t,e){this._context=t,this._t=e}Mu.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 uR(t){return new Mu(t,.5)}function lR(t){return new Mu(t,0)}function cR(t){return new Mu(t,1)}function ii(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 oi(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function fR(t,e){return t[e]}function hR(t){const e=[];return e.key=t,e}function pR(){var t=lt([]),e=oi,n=ii,r=fR;function i(o){var a=Array.from(t.apply(this,arguments),hR),s,u=a.length,l=-1,c;for(const f of o)for(s=0,++l;s<u;++s)(a[s][l]=[0,+r(f,a[s].key,l,o)]).data=f;for(s=0,c=yu(e(a));s<u;++s)a[c[s]].index=s;return n(a,c),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:lt(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:lt(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?oi:typeof o=="function"?o:lt(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??ii,i):n},i}function dR(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}ii(t,e)}}function gR(t,e){if((u=t.length)>0)for(var n,r=0,i,o,a,s,u,l=t[e[0]].length;r<l;++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 mR(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}ii(t,e)}}function yR(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,l=0;s<a;++s){for(var c=t[e[s]],f=c[r][1]||0,h=c[r-1][1]||0,p=(f-h)/2,d=0;d<s;++d){var g=t[e[d]],m=g[r][1]||0,b=g[r-1][1]||0;p+=m-b}u+=f,l+=p*f}i[r-1][1]+=i[r-1][0]=n,u&&(n-=l/u)}i[r-1][1]+=i[r-1][0]=n,ii(t,e)}}function e2(t){var e=t.map(bR);return oi(t).sort(function(n,r){return e[n]-e[r]})}function bR(t){for(var e=-1,n=0,r=t.length,i,o=-1/0;++e<r;)(i=+t[e][1])>o&&(o=i,n=e);return n}function n2(t){var e=t.map(r2);return oi(t).sort(function(n,r){return e[n]-e[r]})}function r2(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function vR(t){return n2(t).reverse()}function xR(t){var e=t.length,n,r,i=t.map(r2),o=e2(t),a=0,s=0,u=[],l=[];for(n=0;n<e;++n)r=o[n],a<s?(a+=i[r],u.push(r)):(s+=i[r],l.push(r));return l.reverse().concat(u)}function _R(t){return oi(t).reverse()}const Du=t=>()=>t;function wR(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 We(t,e,n){this.k=t,this.x=e,this.y=n}We.prototype={constructor:We,scale:function(t){return t===1?this:new We(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new We(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 Pu=new We(1,0,0);i2.prototype=We.prototype;function i2(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Pu;return t.__zoom}function Th(t){t.stopImmediatePropagation()}function Ro(t){t.preventDefault(),t.stopImmediatePropagation()}function $R(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function SR(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function o2(){return this.__zoom||Pu}function AR(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function MR(){return navigator.maxTouchPoints||"ontouchstart"in this}function DR(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function a2(){var t=$R,e=SR,n=DR,r=AR,i=MR,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=N0,l=Nn("start","zoom","end"),c,f,h,p=500,d=150,g=0,m=10;function b(A){A.property("__zoom",o2).on("wheel.zoom",S,{passive:!1}).on("mousedown.zoom",_).on("dblclick.zoom",T).filter(i).on("touchstart.zoom",$).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",R).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(A,L,M,z){var U=A.selection?A.selection():A;U.property("__zoom",o2),A!==U?w(A,L,M,z):U.interrupt().each(function(){D(this,arguments).event(z).start().zoom(null,typeof L=="function"?L.apply(this,arguments):L).end()})},b.scaleBy=function(A,L,M,z){b.scaleTo(A,function(){var U=this.__zoom.k,C=typeof L=="function"?L.apply(this,arguments):L;return U*C},M,z)},b.scaleTo=function(A,L,M,z){b.transform(A,function(){var U=e.apply(this,arguments),C=this.__zoom,k=M==null?y(U):typeof M=="function"?M.apply(this,arguments):M,E=C.invert(k),G=typeof L=="function"?L.apply(this,arguments):L;return n(v(x(C,G),k,E),U,a)},M,z)},b.translateBy=function(A,L,M,z){b.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,z)},b.translateTo=function(A,L,M,z,U){b.transform(A,function(){var C=e.apply(this,arguments),k=this.__zoom,E=z==null?y(C):typeof z=="function"?z.apply(this,arguments):z;return n(Pu.translate(E[0],E[1]).scale(k.k).translate(typeof L=="function"?-L.apply(this,arguments):-L,typeof M=="function"?-M.apply(this,arguments):-M),C,a)},z,U)};function x(A,L){return L=Math.max(o[0],Math.min(o[1],L)),L===A.k?A:new We(L,A.x,A.y)}function v(A,L,M){var z=L[0]-M[0]*A.k,U=L[1]-M[1]*A.k;return z===A.x&&U===A.y?A:new We(A.k,z,U)}function y(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function w(A,L,M,z){A.on("start.zoom",function(){D(this,arguments).event(z).start()}).on("interrupt.zoom end.zoom",function(){D(this,arguments).event(z).end()}).tween("zoom",function(){var U=this,C=arguments,k=D(U,C).event(z),E=e.apply(U,C),G=M==null?y(E):typeof M=="function"?M.apply(U,C):M,j=Math.max(E[1][0]-E[0][0],E[1][1]-E[0][1]),Q=U.__zoom,F=typeof L=="function"?L.apply(U,C):L,q=u(Q.invert(G).concat(j/Q.k),F.invert(G).concat(j/F.k));return function(V){if(V===1)V=F;else{var K=q(V),W=j/K[2];V=new We(W,G[0]-K[0]*W,G[1]-K[1]*W)}k.zoom(null,V)}})}function D(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=X(this.that).datum();l.call(A,this.that,new wR(A,{sourceEvent:this.sourceEvent,target:b,type:A,transform:this.that.__zoom,dispatch:l}),L)}};function S(A,...L){if(!t.apply(this,arguments))return;var M=D(this,L).event(A),z=this.__zoom,U=Math.max(o[0],Math.min(o[1],z.k*Math.pow(2,r.apply(this,arguments)))),C=ue(A);if(M.wheel)(M.mouse[0][0]!==C[0]||M.mouse[0][1]!==C[1])&&(M.mouse[1]=z.invert(M.mouse[0]=C)),clearTimeout(M.wheel);else{if(z.k===U)return;M.mouse=[C,z.invert(C)],Hn(this),M.start()}Ro(A),M.wheel=setTimeout(k,d),M.zoom("mouse",n(v(x(z,U),M.mouse[0],M.mouse[1]),M.extent,a));function k(){M.wheel=null,M.end()}}function _(A,...L){if(h||!t.apply(this,arguments))return;var M=A.currentTarget,z=D(this,L,!0).event(A),U=X(A.view).on("mousemove.zoom",G,!0).on("mouseup.zoom",j,!0),C=ue(A,M),k=A.clientX,E=A.clientY;La(A.view),Th(A),z.mouse=[C,this.__zoom.invert(C)],Hn(this),z.start();function G(Q){if(Ro(Q),!z.moved){var F=Q.clientX-k,q=Q.clientY-E;z.moved=F*F+q*q>g}z.event(Q).zoom("mouse",n(v(z.that.__zoom,z.mouse[0]=ue(Q,M),z.mouse[1]),z.extent,a))}function j(Q){U.on("mousemove.zoom mouseup.zoom",null),Ca(Q.view,z.moved),Ro(Q),z.event(Q).end()}}function T(A,...L){if(t.apply(this,arguments)){var M=this.__zoom,z=ue(A.changedTouches?A.changedTouches[0]:A,this),U=M.invert(z),C=M.k*(A.shiftKey?.5:2),k=n(v(x(M,C),z,U),e.apply(this,L),a);Ro(A),s>0?X(this).transition().duration(s).call(w,k,z,A):X(this).call(b.transform,k,z,A)}}function $(A,...L){if(t.apply(this,arguments)){var M=A.touches,z=M.length,U=D(this,L,A.changedTouches.length===z).event(A),C,k,E,G;for(Th(A),k=0;k<z;++k)E=M[k],G=ue(E,this),G=[G,this.__zoom.invert(G),E.identifier],U.touch0?!U.touch1&&U.touch0[2]!==G[2]&&(U.touch1=G,U.taps=0):(U.touch0=G,C=!0,U.taps=1+!!c);c&&(c=clearTimeout(c)),C&&(U.taps<2&&(f=G[0],c=setTimeout(function(){c=null},p)),Hn(this),U.start())}}function N(A,...L){if(this.__zooming){var M=D(this,L).event(A),z=A.changedTouches,U=z.length,C,k,E,G;for(Ro(A),C=0;C<U;++C)k=z[C],E=ue(k,this),M.touch0&&M.touch0[2]===k.identifier?M.touch0[0]=E:M.touch1&&M.touch1[2]===k.identifier&&(M.touch1[0]=E);if(k=M.that.__zoom,M.touch1){var j=M.touch0[0],Q=M.touch0[1],F=M.touch1[0],q=M.touch1[1],V=(V=F[0]-j[0])*V+(V=F[1]-j[1])*V,K=(K=q[0]-Q[0])*K+(K=q[1]-Q[1])*K;k=x(k,Math.sqrt(V/K)),E=[(j[0]+F[0])/2,(j[1]+F[1])/2],G=[(Q[0]+q[0])/2,(Q[1]+q[1])/2]}else if(M.touch0)E=M.touch0[0],G=M.touch0[1];else return;M.zoom("touch",n(v(k,E,G),M.extent,a))}}function R(A,...L){if(this.__zooming){var M=D(this,L).event(A),z=A.changedTouches,U=z.length,C,k;for(Th(A),h&&clearTimeout(h),h=setTimeout(function(){h=null},p),C=0;C<U;++C)k=z[C],M.touch0&&M.touch0[2]===k.identifier?delete M.touch0:M.touch1&&M.touch1[2]===k.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&&(k=ue(k,this),Math.hypot(f[0]-k[0],f[1]-k[1])<m)){var E=X(this).on("dblclick.zoom");E&&E.apply(this,arguments)}}}return b.wheelDelta=function(A){return arguments.length?(r=typeof A=="function"?A:Du(+A),b):r},b.filter=function(A){return arguments.length?(t=typeof A=="function"?A:Du(!!A),b):t},b.touchable=function(A){return arguments.length?(i=typeof A=="function"?A:Du(!!A),b):i},b.extent=function(A){return arguments.length?(e=typeof A=="function"?A:Du([[+A[0][0],+A[0][1]],[+A[1][0],+A[1][1]]]),b):e},b.scaleExtent=function(A){return arguments.length?(o[0]=+A[0],o[1]=+A[1],b):[o[0],o[1]]},b.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],b):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},b.constrain=function(A){return arguments.length?(n=A,b):n},b.duration=function(A){return arguments.length?(s=+A,b):s},b.interpolate=function(A){return arguments.length?(u=A,b):u},b.on=function(){var A=l.on.apply(l,arguments);return A===l?b:A},b.clickDistance=function(A){return arguments.length?(g=(A=+A)*A,b):Math.sqrt(g)},b.tapDistance=function(A){return arguments.length?(m=+A,b):m},b}const Lh=Object.freeze(Object.defineProperty({__proto__:null,Adder:Tt,Delaunay:Oc,FormatSpecifier:cs,InternMap:Pi,InternSet:Rn,Node:tr,Path:Xi,Voronoi:Sm,ZoomTransform:We,active:C4,arc:mu,area:vh,areaRadial:$v,ascending:_t,autoType:eP,axisBottom:$5,axisLeft:Gg,axisRight:w5,axisTop:Fg,bin:Mg,bisect:En,bisectCenter:v3,bisectLeft:b3,bisectRight:fg,bisector:ma,blob:iP,blur:x3,blur2:hg,blurImage:_3,brush:H4,brushSelection:U4,brushX:B4,brushY:Y4,buffer:aP,chord:V4,chordDirected:q4,chordTranspose:j4,cluster:bT,color:pn,contourDensity:xD,contours:Ic,count:ba,create:i8,creator:Da,cross:P3,csv:lP,csvFormat:HD,csvFormatBody:WD,csvFormatRow:jD,csvFormatRows:VD,csvFormatValue:qD,csvParse:Pm,csvParseRows:YD,cubehelix:De,cumsum:T3,curveBasis:qE,curveBasisClosed:XE,curveBasisOpen:ZE,curveBumpX:Av,curveBumpY:Mv,curveBundle:KE,curveCardinal:QE,curveCardinalClosed:JE,curveCardinalOpen:tR,curveCatmullRom:eR,curveCatmullRomClosed:nR,curveCatmullRomOpen:rR,curveLinear:bu,curveLinearClosed:iR,curveMonotoneX:oR,curveMonotoneY:aR,curveNatural:sR,curveStep:uR,curveStepAfter:cR,curveStepBefore:lR,descending:lg,deviation:gg,difference:c5,disjoint:f5,dispatch:Nn,drag:Zg,dragDisable:La,dragEnable:Ca,dsv:uP,dsvFormat:as,easeBack:im,easeBackIn:$4,easeBackInOut:im,easeBackOut:S4,easeBounce:Vi,easeBounceIn:_4,easeBounceInOut:w4,easeBounceOut:Vi,easeCircle:rm,easeCircleIn:f4,easeCircleInOut:rm,easeCircleOut:h4,easeCubic:Wi,easeCubicIn:r4,easeCubicInOut:Wi,easeCubicOut:i4,easeElastic:ji,easeElasticIn:A4,easeElasticInOut:M4,easeElasticOut:ji,easeExp:nm,easeExpIn:l4,easeExpInOut:nm,easeExpOut:c4,easeLinear:t4,easePoly:Q0,easePolyIn:o4,easePolyInOut:Q0,easePolyOut:a4,easeQuad:K0,easeQuadIn:e4,easeQuadInOut:K0,easeQuadOut:n4,easeSin:em,easeSinIn:s4,easeSinInOut:em,easeSinOut:u4,every:i5,extent:Di,fcumsum:C3,filter:a5,flatGroup:E3,flatRollup:R3,forceCenter:yP,forceCollide:Rm,forceLink:FP,forceManyBody:Fm,forceRadial:WP,forceSimulation:Nm,forceX:Gm,forceY:zm,get format(){return Ji},formatDefaultLocale:jm,formatLocale:Vm,get formatPrefix(){return Vc},formatSpecifier:Br,fsum:L3,geoAlbers:sy,geoAlbersUsa:Z7,geoArea:e7,geoAzimuthalEqualArea:K7,geoAzimuthalEqualAreaRaw:Ef,geoAzimuthalEquidistant:Q7,geoAzimuthalEquidistantRaw:Rf,geoBounds:o7,geoCentroid:f7,geoCircle:h7,geoClipAntimeridian:ff,geoClipCircle:T1,geoClipExtent:v7,geoClipRectangle:Es,geoConicConformal:tT,geoConicConformalRaw:cy,geoConicEqualArea:Hs,geoConicEqualAreaRaw:ay,geoConicEquidistant:nT,geoConicEquidistantRaw:fy,geoContains:M7,geoDistance:Is,geoEqualEarth:iT,geoEqualEarthRaw:kf,geoEquirectangular:eT,geoEquirectangularRaw:mo,geoGnomonic:oT,geoGnomonicRaw:If,geoGraticule:z1,geoGraticule10:D7,geoIdentity:aT,geoInterpolate:P7,geoLength:L1,geoMercator:J7,geoMercatorRaw:go,geoNaturalEarth1:sT,geoNaturalEarth1Raw:Nf,geoOrthographic:uT,geoOrthographicRaw:Ff,geoPath:O7,geoProjection:Be,geoProjectionMutator:Lf,geoRotation:_1,geoStereographic:lT,geoStereographicRaw:Gf,geoStream:Te,geoTransform:U7,geoTransverseMercator:cT,geoTransverseMercatorRaw:zf,gray:S8,greatest:Dg,greatestIndex:J3,group:vg,groupSort:N3,groups:xg,hcl:za,hierarchy:js,histogram:Mg,hsl:Ia,html:gP,image:fP,index:k3,indexes:I3,interpolate:qe,interpolateArray:L8,interpolateBasis:_0,interpolateBasisClosed:w0,interpolateBlues:nE,interpolateBrBG:IC,interpolateBuGn:HC,interpolateBuPu:WC,interpolateCividis:uE,interpolateCool:fE,interpolateCubehelix:W8,interpolateCubehelixDefault:lE,interpolateCubehelixLong:Wa,interpolateDate:P0,interpolateDiscrete:R8,interpolateGnBu:VC,interpolateGreens:rE,interpolateGreys:iE,interpolateHcl:Y8,interpolateHclLong:H8,interpolateHsl:O8,interpolateHslLong:U8,interpolateHue:k8,interpolateInferno:vE,interpolateLab:B8,interpolateMagma:bE,interpolateNumber:de,interpolateNumberArray:ac,interpolateObject:T0,interpolateOrRd:jC,interpolateOranges:sE,interpolatePRGn:NC,interpolatePiYG:FC,interpolatePlasma:xE,interpolatePuBu:XC,interpolatePuBuGn:qC,interpolatePuOr:GC,interpolatePuRd:ZC,interpolatePurples:oE,interpolateRainbow:hE,interpolateRdBu:zC,interpolateRdGy:OC,interpolateRdPu:KC,interpolateRdYlBu:UC,interpolateRdYlGn:BC,interpolateReds:aE,interpolateRgb:Gi,interpolateRgbBasis:A0,interpolateRgbBasisClosed:T8,interpolateRound:Ya,interpolateSinebow:gE,interpolateSpectral:YC,interpolateString:lc,interpolateTransformCss:R0,interpolateTransformSvg:k0,interpolateTurbo:mE,interpolateViridis:yE,interpolateWarm:cE,interpolateYlGn:JC,interpolateYlGnBu:QC,interpolateYlOrBr:tE,interpolateYlOrRd:eE,interpolateZoom:N0,interrupt:Hn,intersection:h5,interval:Z8,isoFormat:dC,isoParse:yC,json:pP,lab:Ga,lch:A8,least:Q3,leastIndex:Lg,line:vu,lineRadial:wv,link:xu,linkHorizontal:NE,linkRadial:GE,linkVertical:FE,local:qg,map:s5,matcher:Wl,max:Ti,maxIndex:Gl,mean:H3,median:W3,medianIndex:V3,merge:Ol,min:_a,minIndex:zl,mode:q3,namespace:Ri,namespaces:Yl,nice:Nl,now:Yi,pack:qT,packEnclose:BT,packSiblings:VT,pairs:X3,partition:XT,path:kc,pathRound:K4,permute:Ag,pie:vv,piecewise:O0,pointRadial:Eo,pointer:ue,pointers:a8,polygonArea:c9,polygonCentroid:f9,polygonContains:g9,polygonHull:d9,polygonLength:m9,precisionFixed:qm,precisionPrefix:Xm,precisionRound:Zm,quadtree:us,quantile:Ci,quantileIndex:Tg,quantileSorted:Pg,quantize:V8,quickselect:wa,radialArea:$v,radialLine:wv,randomBates:x9,randomBernoulli:$9,randomBeta:Ry,randomBinomial:ky,randomCauchy:A9,randomExponential:_9,randomGamma:Xf,randomGeometric:Ey,randomInt:b9,randomIrwinHall:Cy,randomLcg:L9,randomLogNormal:v9,randomLogistic:M9,randomNormal:qf,randomPareto:w9,randomPoisson:D9,randomUniform:y9,randomWeibull:S9,range:fn,rank:K3,reduce:u5,reverse:l5,rgb:Lr,ribbon:oD,ribbonArrow:aD,rollup:wg,rollups:$g,scaleBand:Qf,scaleDiverging:Ob,scaleDivergingLog:Ub,scaleDivergingPow:mh,scaleDivergingSqrt:$C,scaleDivergingSymlog:Bb,scaleIdentity:zy,scaleImplicit:Zf,scaleLinear:eu,scaleLog:Hy,scaleOrdinal:Kf,scalePoint:Jf,scalePow:Kr,scaleQuantile:Ky,scaleQuantize:Qy,scaleRadial:Zy,scaleSequential:Nb,scaleSequentialLog:Fb,scaleSequentialPow:gh,scaleSequentialQuantile:zb,scaleSequentialSqrt:wC,scaleSequentialSymlog:Gb,scaleSqrt:B9,scaleSymlog:jy,scaleThreshold:Jy,scaleTime:xC,scaleUtc:_C,scan:t5,schemeAccent:AC,schemeBlues:cv,schemeBrBG:Yb,schemeBuGn:Qb,schemeBuPu:Jb,schemeCategory10:SC,schemeDark2:MC,schemeGnBu:tv,schemeGreens:fv,schemeGreys:hv,schemeObservable10:DC,schemeOrRd:ev,schemeOranges:gv,schemePRGn:Hb,schemePaired:PC,schemePastel1:TC,schemePastel2:LC,schemePiYG:Wb,schemePuBu:rv,schemePuBuGn:nv,schemePuOr:Vb,schemePuRd:iv,schemePurples:pv,schemeRdBu:jb,schemeRdGy:qb,schemeRdPu:ov,schemeRdYlBu:Xb,schemeRdYlGn:Zb,schemeReds:dv,schemeSet1:CC,schemeSet2:EC,schemeSet3:RC,schemeSpectral:Kb,schemeTableau10:kC,schemeYlGn:sv,schemeYlGnBu:av,schemeYlOrBr:uv,schemeYlOrRd:lv,select:X,selectAll:s8,selection:Gn,selector:Pa,selectorAll:Hl,shuffle:e5,shuffler:Cg,some:o5,sort:Rl,stack:pR,stackOffsetDiverging:gR,stackOffsetExpand:dR,stackOffsetNone:ii,stackOffsetSilhouette:mR,stackOffsetWiggle:yR,stackOrderAppearance:e2,stackOrderAscending:n2,stackOrderDescending:vR,stackOrderInsideOut:xR,stackOrderNone:oi,stackOrderReverse:_R,stratify:JT,style:Fn,subset:d5,sum:Eg,superset:kg,svg:mP,symbol:jE,symbolAsterisk:Dv,symbolCircle:_u,symbolCross:Pv,symbolDiamond:Lv,symbolDiamond2:Cv,symbolPlus:Ev,symbolSquare:Rv,symbolSquare2:kv,symbolStar:Nv,symbolTimes:$h,symbolTriangle:Fv,symbolTriangle2:Gv,symbolWye:zv,symbolX:$h,symbols:Ov,symbolsFill:Ov,symbolsStroke:VE,text:ss,thresholdFreedmanDiaconis:B3,thresholdScott:Y3,thresholdSturges:Fl,tickFormat:Gy,tickIncrement:In,tickStep:xa,ticks:kn,timeDay:Jr,timeDays:q9,get timeFormat(){return hh},timeFormatDefaultLocale:kb,timeFormatLocale:bb,timeFriday:ob,timeFridays:eL,timeHour:iu,timeHours:V9,timeInterval:Dt,timeMillisecond:Qr,timeMilliseconds:tb,timeMinute:nu,timeMinutes:H9,timeMonday:Ao,timeMondays:K9,timeMonth:au,timeMonths:lL,get timeParse(){return Rb},timeSaturday:ab,timeSaturdays:nL,timeSecond:sn,timeSeconds:nb,timeSunday:ti,timeSundays:sb,timeThursday:rr,timeThursdays:tL,timeTickInterval:yb,timeTicks:mb,timeTuesday:rb,timeTuesdays:Q9,timeWednesday:ib,timeWednesdays:J9,timeWeek:ti,timeWeeks:sb,timeYear:Ye,timeYears:fL,timeout:hc,timer:Xa,timerFlush:Y0,transition:X0,transpose:Rg,tree:a9,treemap:Ty,treemapBinary:s9,treemapDice:wo,treemapResquarify:l9,treemapSlice:Qs,treemapSliceDice:u9,treemapSquarify:jf,tsv:cP,tsvFormat:ZD,tsvFormatBody:KD,tsvFormatRow:JD,tsvFormatRows:QD,tsvFormatValue:tP,tsvParse:Tm,tsvParseRows:XD,union:g5,unixDay:lh,unixDays:Z9,utcDay:So,utcDays:X9,get utcFormat(){return uu},utcFriday:cb,utcFridays:sL,utcHour:ou,utcHours:j9,utcMillisecond:Qr,utcMilliseconds:tb,utcMinute:ru,utcMinutes:W9,utcMonday:Mo,utcMondays:rL,utcMonth:su,utcMonths:cL,get utcParse(){return ph},utcSaturday:fb,utcSaturdays:uL,utcSecond:sn,utcSeconds:nb,utcSunday:ei,utcSundays:hb,utcThursday:or,utcThursdays:aL,utcTickInterval:gb,utcTicks:db,utcTuesday:ub,utcTuesdays:iL,utcWednesday:lb,utcWednesdays:oL,utcWeek:ei,utcWeeks:hb,utcYear:He,utcYears:hL,variance:dg,window:Vl,xml:dP,zip:r5,zoom:a2,zoomIdentity:Pu,zoomTransform:i2},Symbol.toStringTag,{value:"Module"}));function s2(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function PR(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 ko(t){return t.substring(0,4)!=="ease"?Wi:Lh[t]??Wi}function Tu({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=eu().domain([0,1]).range([0,t/2]),a=o(n);return mu().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const Ch=(t,e)=>e instanceof Function?e(t):Ji(e)(t);function u2(t,e=10){var i;const n=document.createElement("canvas").getContext("2d");return(((i=n==null?void 0:n.measureText(t))==null?void 0:i.width)??0)*e/10}function TR(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 LR(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return TR(e)}function Ct(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 Lu({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 at(t,e,n){const r=n?`--${n}`:"";return`orbcharts-${t}__${e}${r}`}function $n(t,e){const r=Math.random().toString(36).substr(2,5);return at(t,e,r)}const ar=({selection:t,pluginName:e,clipPathID:n,seriesLabels$:r,gridContainerPosition$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=at(e,"series"),u=at(e,"axes"),l=at(e,"graphic"),c=r.pipe(O((d,g)=>t.selectAll(`g.${s}`).data(d,m=>m).join(m=>m.append("g").classed(s,!0).each((b,x,v)=>{X(v[x]).selectAll(`g.${u}`).data([x]).join(y=>y.append("g").classed(u,!0).attr("clip-path",`url(#${n})`).each((w,D,P)=>{X(P[D]).selectAll("defs").data([D]).join("defs"),X(P[D]).selectAll("g").data([D]).join("g").classed(l,!0)}),y=>y,y=>y.remove())}),m=>m,m=>m.remove())),Pt(1));B({seriesSelection:c,gridContainerPosition:i}).pipe(Y(async d=>d)).subscribe(d=>{d.seriesSelection.transition().attr("transform",(g,m)=>{const b=d.gridContainerPosition[m]??d.gridContainerPosition[0],x=b.translate,v=b.scale;return`translate(${x[0]}, ${x[1]}) scale(${v[0]}, ${v[1]})`})});const f=B({seriesSelection:c,gridAxesTransform:o}).pipe(Y(async d=>d),O(d=>d.seriesSelection.select(`g.${u}`).style("transform",d.gridAxesTransform.value)),Pt(1)),h=f.pipe(O(d=>d.select("defs")),Pt(1)),p=B({axesSelection:f,gridGraphicTransform:a}).pipe(Y(async d=>d),O(d=>{const g=d.axesSelection.select(`g.${l}`);return g.transition().duration(50).style("transform",d.gridGraphicTransform.value),g}),Pt(1));return{seriesSelection$:c,axesSelection$:f,defsSelection$:h,graphicGSelection$:p}},Eh=({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r})=>{const i=new et,o=new pt(a=>{B({dataFormatter:t,computedData:n}).pipe(I(i),Y(async s=>s)).subscribe(s=>{const l=s.computedData[0]?s.computedData[0].length-1:0,c=s.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-s.dataFormatter.grid.groupAxis.scalePadding:s.dataFormatter.grid.groupAxis.scaleDomain[0]-s.dataFormatter.grid.groupAxis.scalePadding,f=s.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?l+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>=c&&g<=f);a.next(p)})});return new pt(a=>{B({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:o}).pipe(I(i),Y(async s=>s)).subscribe(s=>{const u=s.dataFormatter.grid.valueAxis.position==="right"||s.dataFormatter.grid.valueAxis.position==="bottom",l=d3({axisLabels:s.scaleRangeGroupLabels,axisWidth:s.axisSize.width,reverse:u}),c=h=>s.dataFormatter.grid.groupAxis.position==="bottom"||s.dataFormatter.grid.groupAxis.position==="top"?h.offsetX-s.fullChartParams.padding.left:h.offsetY-s.fullChartParams.padding.top,f=h=>{const p=c(h),d=l(p);return{groupIndex:d,groupLabel:s.scaleRangeGroupLabels[d]??""}};return a.next(f),function(){i.next(void 0)}})})};function CR(t="curveLinear"){return vu().x(e=>e.axisX).y(e=>e.axisY).curve(Lh[t])}function ER(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 RR({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 kR({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?X(o[i]).style("opacity",1):X(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function IR({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)=>{X(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(ko(r)).tween("tween",(l,c,f)=>h=>{const p=l.width*h;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 l2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullDataFormatter$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,event$:b})=>{const x=new et,v=$n(t,"clipPath-box"),y=at(t,"path"),{seriesSelection$:w,axesSelection$:D,defsSelection$:P,graphicGSelection$:S}=ar({selection:e,pluginName:t,clipPathID:v,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:p}),_=new pt(M=>{const z=l.pipe(I(x)).subscribe(U=>{if(!U)return;const C=CR(U.lineCurve);M.next(C)});return()=>{z.unsubscribe()}}),T=f.pipe(O(M=>M.transitionDuration),rt()),$=f.pipe(O(M=>M.transitionEase),rt());B({defsSelection:P,seriesLabels:a,axisSize:d,transitionDuration:T,transitionEase:$}).pipe(I(x),Y(async M=>M)).subscribe(M=>{const U=[{id:v,width:M.axisSize.width,height:M.axisSize.height}].concat(M.seriesLabels.map(C=>({id:`orbcharts__clipPath_${C}`,width:M.axisSize.width,height:M.axisSize.height})));IR({defsSelection:M.defsSelection,clipPathData:U,transitionDuration:M.transitionDuration,transitionEase:M.transitionEase})});const N=n.pipe(O(M=>{const z=new Map;return M.flat().forEach(U=>z.set(U.id,U)),z})),R=Eh({fullDataFormatter$:c,gridAxesSize$:d,computedData$:n,fullChartParams$:f}),A=f.pipe(I(x),O(M=>M.highlightTarget),rt()),L=B({graphicGSelection:S,visibleComputedLayoutData:o,linePath:_,params:l}).pipe(I(x),Y(async M=>M),O(M=>{let z=[];return M.graphicGSelection.each((U,C,k)=>{const E=ER(M.visibleComputedLayoutData[C]??[]);z[C]=RR({selection:X(k[C]),pathClassName:y,linePath:M.linePath,segmentData:E,params:M.params})}),z}));return B({pathSelectionArr:L,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:A,gridGroupPositionFn:R}).pipe(I(x),Y(async M=>M)).subscribe(M=>{M.pathSelectionArr.forEach(z=>{z.on("mouseover",(U,C)=>{U.stopPropagation();const k=C[0]?C[0].seriesLabel:"",{groupIndex:E,groupLabel:G}=M.gridGroupPositionFn(U),F=M.GroupDataMap.get(G).find(q=>q.seriesLabel===k)??C[0];b.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:F,gridIndex:F.gridIndex,series:M.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:M.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:U,data:M.computedData})}).on("mousemove",(U,C)=>{U.stopPropagation();const k=C[0]?C[0].seriesLabel:"",{groupIndex:E,groupLabel:G}=M.gridGroupPositionFn(U),F=M.GroupDataMap.get(G).find(q=>q.seriesLabel===k)??C[0];b.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:F,gridIndex:F.gridIndex,series:M.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:M.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:U,data:M.computedData})}).on("mouseout",(U,C)=>{U.stopPropagation();const k=C[0]?C[0].seriesLabel:"",{groupIndex:E,groupLabel:G}=M.gridGroupPositionFn(U),F=M.GroupDataMap.get(G).find(q=>q.seriesLabel===k)??C[0];b.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:F,gridIndex:F.gridIndex,series:M.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:M.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:U,data:M.computedData})}).on("click",(U,C)=>{U.stopPropagation();const k=C[0]?C[0].seriesLabel:"",{groupIndex:E,groupLabel:G}=M.gridGroupPositionFn(U),F=M.GroupDataMap.get(G).find(q=>q.seriesLabel===k)??C[0];b.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:F,gridIndex:F.gridIndex,series:M.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:M.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:U,data:M.computedData})})})}),f.pipe(I(x),li(M=>M.highlightTarget==="series"),Y(M=>B({graphicGSelection:S,gridHighlight:g,DataMap:N,fullChartParams:f}).pipe(I(x),Y(async z=>z)))).subscribe(M=>{const z=M.gridHighlight[0]?M.gridHighlight[0].seriesLabel:null;kR({selection:M.graphicGSelection,seriesLabel:z,fullChartParams:M.fullChartParams})}),()=>{x.next(void 0)}},c2="Lines",NR=se(c2,ur)(({selection:t,name:e,observer:n,subject:r})=>{const i=new et,o=l2(c2,{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 FR(t="curveLinear",e){return vh().x(n=>n.axisX).y0(n=>e).y1(n=>n.axisY).curve(Lh[t])}function GR(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 zR({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 OR({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?X(o[i]).style("opacity",1):X(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function UR({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 l(f){return f.map(c).join(t)}function c(f){return f==null?"":f instanceof Date?LD(f):e.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:u,formatRow:l,formatValue:c}}var Xn=as(","),$m=Xn.parse,CD=Xn.parseRows,ED=Xn.format,RD=Xn.formatBody,kD=Xn.formatRows,ID=Xn.formatRow,ND=Xn.formatValue,Zn=as(" "),Sm=Zn.parse,FD=Zn.parseRows,GD=Zn.format,zD=Zn.formatBody,OD=Zn.formatRows,UD=Zn.formatRow,BD=Zn.formatValue;function YD(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})?)?$/))HD&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const HD=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function WD(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function VD(t,e){return fetch(t,e).then(WD)}function jD(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function qD(t,e){return fetch(t,e).then(jD)}function XD(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function ss(t,e){return fetch(t,e).then(XD)}function Am(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 ZD(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 KD=Am($m),QD=Am(Sm);function JD(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 tP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function eP(t,e){return fetch(t,e).then(tP)}function Yc(t){return(e,n)=>ss(e,n).then(r=>new DOMParser().parseFromString(r,t))}const nP=Yc("application/xml");var rP=Yc("text/html"),iP=Yc("image/svg+xml");function oP(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,a=n.length,s,u=0,l=0;for(o=0;o<a;++o)s=n[o],u+=s.x,l+=s.y;for(u=(u/a-t)*r,l=(l/a-e)*r,o=0;o<a;++o)s=n[o],s.x-=u,s.y-=l}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 aP(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return Mm(this.cover(e,n),e,n,t)}function Mm(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,l=t._x1,c=t._y1,f,h,p,d,g,m,y,v;if(!o)return t._root=a,t;for(;o.length;)if((g=e>=(f=(s+l)/2))?s=f:l=f,(m=n>=(h=(u+c)/2))?u=h:c=h,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>=(f=(s+l)/2))?s=f:l=f,(m=n>=(h=(u+c)/2))?u=h:c=h;while((y=m<<1|g)===(v=(d>=h)<<1|p>=f));return i[v]=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,l=1/0,c=-1/0,f=-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>c&&(c=i),o<l&&(l=o),o>f&&(f=o));if(u>c||l>f)return this;for(this.cover(u,l).cover(c,f),n=0;n<r;++n)Mm(this,a[n],s[n],t[n]);return this}function uP(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,l;n>t||t>=i||r>e||e>=o;)switch(l=(e<r)<<1|t<n,u=new Array(4),u[l]=s,s=u,a*=2,l){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 lP(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function cP(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 Vt(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function fP(t,e,n){var r,i=this._x0,o=this._y0,a,s,u,l,c=this._x1,f=this._y1,h=[],p=this._root,d,g;for(p&&h.push(new Vt(p,i,o,c,f)),n==null?n=1/0:(i=t-n,o=e-n,c=t+n,f=e+n,n*=n);d=h.pop();)if(!(!(p=d.node)||(a=d.x0)>c||(s=d.y0)>f||(u=d.x1)<i||(l=d.y1)<o))if(p.length){var m=(a+u)/2,y=(s+l)/2;h.push(new Vt(p[3],m,y,u,l),new Vt(p[2],a,y,m,l),new Vt(p[1],m,s,u,y),new Vt(p[0],a,s,m,y)),(g=(e>=y)<<1|t>=m)&&(d=h[h.length-1],h[h.length-1]=h[h.length-1-g],h[h.length-1-g]=d)}else{var v=t-+this._x.call(null,p.data),x=e-+this._y.call(null,p.data),b=v*v+x*x;if(b<n){var _=Math.sqrt(n=b);i=t-_,o=e-_,c=t+_,f=e+_,r=p.data}}return r}function hP(t){if(isNaN(c=+this._x.call(null,t))||isNaN(f=+this._y.call(null,t)))return this;var e,n=this._root,r,i,o,a=this._x0,s=this._y0,u=this._x1,l=this._y1,c,f,h,p,d,g,m,y;if(!n)return this;if(n.length)for(;;){if((d=c>=(h=(a+u)/2))?a=h:u=h,(g=f>=(p=(s+l)/2))?s=p:l=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 pP(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function dP(){return this._root}function gP(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function mP(t){var e=[],n,r=this._root,i,o,a,s,u;for(r&&e.push(new Vt(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 l=(o+s)/2,c=(a+u)/2;(i=r[3])&&e.push(new Vt(i,l,c,s,u)),(i=r[2])&&e.push(new Vt(i,o,c,l,u)),(i=r[1])&&e.push(new Vt(i,l,a,s,c)),(i=r[0])&&e.push(new Vt(i,o,a,l,c))}return this}function yP(t){var e=[],n=[],r;for(this._root&&e.push(new Vt(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,l=r.y1,c=(a+u)/2,f=(s+l)/2;(o=i[0])&&e.push(new Vt(o,a,s,c,f)),(o=i[1])&&e.push(new Vt(o,c,s,u,f)),(o=i[2])&&e.push(new Vt(o,a,f,c,l)),(o=i[3])&&e.push(new Vt(o,c,f,u,l))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function bP(t){return t[0]}function vP(t){return arguments.length?(this._x=t,this):this._x}function xP(t){return t[1]}function _P(t){return arguments.length?(this._y=t,this):this._y}function us(t,e,n){var r=new Hc(e??bP,n??xP,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Hc(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 Dm(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var jt=us.prototype=Hc.prototype;jt.copy=function(){var t=new Hc(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=Dm(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]=Dm(r));return t},jt.add=aP,jt.addAll=sP,jt.cover=uP,jt.data=lP,jt.extent=cP,jt.find=fP,jt.remove=hP,jt.removeAll=pP,jt.root=dP,jt.size=gP,jt.visit=mP,jt.visitAfter=yP,jt.x=vP,jt.y=_P;function Lt(t){return function(){return t}}function mn(t){return(t()-.5)*1e-6}function wP(t){return t.x+t.vx}function $P(t){return t.y+t.vy}function Pm(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Lt(t==null?1:+t));function a(){for(var l,c=e.length,f,h,p,d,g,m,y=0;y<o;++y)for(f=us(e,wP,$P).visitAfter(s),l=0;l<c;++l)h=e[l],g=n[h.index],m=g*g,p=h.x+h.vx,d=h.y+h.vy,f.visit(v);function v(x,b,_,M,D){var $=x.data,w=x.r,P=g+w;if($){if($.index>h.index){var S=p-$.x-$.vx,N=d-$.y-$.vy,R=S*S+N*N;R<P*P&&(S===0&&(S=mn(r),R+=S*S),N===0&&(N=mn(r),R+=N*N),R=(P-(R=Math.sqrt(R)))/R*i,h.vx+=(S*=R)*(P=(w*=w)/(m+w)),h.vy+=(N*=R)*P,$.vx-=S*(P=1-P),$.vy-=N*P)}return}return b>p+P||M<p-P||_>d+P||D<d-P}}function s(l){if(l.data)return l.r=n[l.data.index];for(var c=l.r=0;c<4;++c)l[c]&&l[c].r>l.r&&(l.r=l[c].r)}function u(){if(e){var l,c=e.length,f;for(n=new Array(c),l=0;l<c;++l)f=e[l],n[f.index]=+t(f,l,e)}}return a.initialize=function(l,c){e=l,r=c,u()},a.iterations=function(l){return arguments.length?(o=+l,a):o},a.strength=function(l){return arguments.length?(i=+l,a):i},a.radius=function(l){return arguments.length?(t=typeof l=="function"?l:Lt(+l),u(),a):t},a}function SP(t){return t.index}function Tm(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function AP(t){var e=SP,n=f,r,i=Lt(30),o,a,s,u,l,c=1;t==null&&(t=[]);function f(m){return 1/Math.min(s[m.source.index],s[m.target.index])}function h(m){for(var y=0,v=t.length;y<c;++y)for(var x=0,b,_,M,D,$,w,P;x<v;++x)b=t[x],_=b.source,M=b.target,D=M.x+M.vx-_.x-_.vx||mn(l),$=M.y+M.vy-_.y-_.vy||mn(l),w=Math.sqrt(D*D+$*$),w=(w-o[x])/w*m*r[x],D*=w,$*=w,M.vx-=D*(P=u[x]),M.vy-=$*P,_.vx+=D*(P=1-P),_.vy+=$*P}function p(){if(a){var m,y=a.length,v=t.length,x=new Map(a.map((_,M)=>[e(_,M,a),_])),b;for(m=0,s=new Array(y);m<v;++m)b=t[m],b.index=m,typeof b.source!="object"&&(b.source=Tm(x,b.source)),typeof b.target!="object"&&(b.target=Tm(x,b.target)),s[b.source.index]=(s[b.source.index]||0)+1,s[b.target.index]=(s[b.target.index]||0)+1;for(m=0,u=new Array(v);m<v;++m)b=t[m],u[m]=s[b.source.index]/(s[b.source.index]+s[b.target.index]);r=new Array(v),d(),o=new Array(v),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 h.initialize=function(m,y){a=m,l=y,p()},h.links=function(m){return arguments.length?(t=m,p(),h):t},h.id=function(m){return arguments.length?(e=m,h):e},h.iterations=function(m){return arguments.length?(c=+m,h):c},h.strength=function(m){return arguments.length?(n=typeof m=="function"?m:Lt(+m),d(),h):n},h.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Lt(+m),g(),h):i},h}const MP=1664525,DP=1013904223,Lm=4294967296;function PP(){let t=1;return()=>(t=(MP*t+DP)%Lm)/Lm}function TP(t){return t.x}function LP(t){return t.y}var CP=10,EP=Math.PI*(3-Math.sqrt(5));function Cm(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,u=Xa(f),l=Nn("tick","end"),c=PP();t==null&&(t=[]);function f(){h(),l.call("tick",e),n<r&&(u.stop(),l.call("end",e))}function h(g){var m,y=t.length,v;g===void 0&&(g=1);for(var x=0;x<g;++x)for(n+=(o-n)*i,s.forEach(function(b){b(n)}),m=0;m<y;++m)v=t[m],v.fx==null?v.x+=v.vx*=a:(v.x=v.fx,v.vx=0),v.fy==null?v.y+=v.vy*=a:(v.y=v.fy,v.vy=0);return e}function 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 v=CP*Math.sqrt(.5+g),x=g*EP;y.x=v*Math.cos(x),y.y=v*Math.sin(x)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function d(g){return g.initialize&&g.initialize(t,c),g}return p(),e={tick:h,restart:function(){return u.restart(f),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?(c=g,s.forEach(d),e):c},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 v=0,x=t.length,b,_,M,D,$;for(y==null?y=1/0:y*=y,v=0;v<x;++v)D=t[v],b=g-D.x,_=m-D.y,M=b*b+_*_,M<y&&($=D,y=M);return $},on:function(g,m){return arguments.length>1?(l.on(g,m),e):l.on(g)}}}function Em(){var t,e,n,r,i=Lt(-30),o,a=1,s=1/0,u=.81;function l(p){var d,g=t.length,m=us(t,TP,LP).visitAfter(f);for(r=p,d=0;d<g;++d)e=t[d],m.visit(h)}function c(){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 f(p){var d=0,g,m,y=0,v,x,b;if(p.length){for(v=x=b=0;b<4;++b)(g=p[b])&&(m=Math.abs(g.value))&&(d+=g.value,y+=m,v+=m*g.x,x+=m*g.y);p.x=v/y,p.y=x/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 h(p,d,g,m){if(!p.value)return!0;var y=p.x-e.x,v=p.y-e.y,x=m-d,b=y*y+v*v;if(x*x/u<b)return b<s&&(y===0&&(y=mn(n),b+=y*y),v===0&&(v=mn(n),b+=v*v),b<a&&(b=Math.sqrt(a*b)),e.vx+=y*p.value*r/b,e.vy+=v*p.value*r/b),!0;if(p.length||b>=s)return;(p.data!==e||p.next)&&(y===0&&(y=mn(n),b+=y*y),v===0&&(v=mn(n),b+=v*v),b<a&&(b=Math.sqrt(a*b)));do p.data!==e&&(x=o[p.data.index]*r/b,e.vx+=y*x,e.vy+=v*x);while(p=p.next)}return l.initialize=function(p,d){t=p,n=d,c()},l.strength=function(p){return arguments.length?(i=typeof p=="function"?p:Lt(+p),c(),l):i},l.distanceMin=function(p){return arguments.length?(a=p*p,l):Math.sqrt(a)},l.distanceMax=function(p){return arguments.length?(s=p*p,l):Math.sqrt(s)},l.theta=function(p){return arguments.length?(u=p*p,l):Math.sqrt(u)},l}function RP(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(l){for(var c=0,f=r.length;c<f;++c){var h=r[c],p=h.x-e||1e-6,d=h.y-n||1e-6,g=Math.sqrt(p*p+d*d),m=(a[c]-g)*o[c]*l/g;h.vx+=p*m,h.vy+=d*m}}function u(){if(r){var l,c=r.length;for(o=new Array(c),a=new Array(c),l=0;l<c;++l)a[l]=+t(r[l],l,r),o[l]=isNaN(a[l])?0:+i(r[l],l,r)}}return s.initialize=function(l){r=l,u()},s.strength=function(l){return arguments.length?(i=typeof l=="function"?l:Lt(+l),u(),s):i},s.radius=function(l){return arguments.length?(t=typeof l=="function"?l:Lt(+l),u(),s):t},s.x=function(l){return arguments.length?(e=+l,s):e},s.y=function(l){return arguments.length?(n=+l,s):n},s}function Rm(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(t==null?0:+t));function o(s){for(var u=0,l=n.length,c;u<l;++u)c=n[u],c.vx+=(i[u]-c.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 km(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(t==null?0:+t));function o(s){for(var u=0,l=n.length,c;u<l;++u)c=n[u],c.vy+=(i[u]-c.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 kP(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ls(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 Ur(t){return t=ls(Math.abs(t)),t?t[1]:NaN}function IP(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 NP(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var FP=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Br(t){if(!(e=FP.exec(t)))throw new Error("invalid format: "+t);var e;return new cs({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Br.prototype=cs.prototype;function cs(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}cs.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function GP(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 Im;function zP(t,e){var n=ls(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Im=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")+ls(t,Math.max(0,e+o-1))[0]}function Nm(t,e){var n=ls(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 Fm={"%":(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)=>Nm(t*100,e),r:Nm,s:zP,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Gm(t){return t}var zm=Array.prototype.map,Om=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Um(t){var e=t.grouping===void 0||t.thousands===void 0?Gm:IP(zm.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?Gm:NP(zm.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 l(f){f=Br(f);var h=f.fill,p=f.align,d=f.sign,g=f.symbol,m=f.zero,y=f.width,v=f.comma,x=f.precision,b=f.trim,_=f.type;_==="n"?(v=!0,_="g"):Fm[_]||(x===void 0&&(x=12),b=!0,_="g"),(m||h==="0"&&p==="=")&&(m=!0,h="0",p="=");var M=g==="$"?n:g==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",D=g==="$"?r:/[%p]/.test(_)?a:"",$=Fm[_],w=/[defgprs%]/.test(_);x=x===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function P(S){var N=M,R=D,A,C,T;if(_==="c")R=$(S)+R,S="";else{S=+S;var O=S<0||1/S<0;if(S=isNaN(S)?u:$(Math.abs(S),x),b&&(S=GP(S)),O&&+S==0&&d!=="+"&&(O=!1),N=(O?d==="("?d:s:d==="-"||d==="("?"":d)+N,R=(_==="s"?Om[8+Im/3]:"")+R+(O&&d==="("?")":""),w){for(A=-1,C=S.length;++A<C;)if(T=S.charCodeAt(A),48>T||T>57){R=(T===46?i+S.slice(A+1):S.slice(A))+R,S=S.slice(0,A);break}}}v&&!m&&(S=e(S,1/0));var z=N.length+S.length+R.length,k=z<y?new Array(y-z+1).join(h):"";switch(v&&m&&(S=e(k+S,k.length?y-R.length:1/0),k=""),p){case"<":S=N+S+R+k;break;case"=":S=N+k+S+R;break;case"^":S=k.slice(0,z=k.length>>1)+N+S+R+k.slice(z);break;default:S=k+N+S+R;break}return o(S)}return P.toString=function(){return f+""},P}function c(f,h){var p=l((f=Br(f),f.type="f",f)),d=Math.max(-8,Math.min(8,Math.floor(Ur(h)/3)))*3,g=Math.pow(10,-d),m=Om[8+d/3];return function(y){return p(g*y)+m}}return{format:l,formatPrefix:c}}var fs,Ji,Wc;Bm({thousands:",",grouping:[3],currency:["$",""]});function Bm(t){return fs=Um(t),Ji=fs.format,Wc=fs.formatPrefix,fs}function Ym(t){return Math.max(0,-Ur(Math.abs(t)))}function Hm(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ur(e)/3)))*3-Ur(Math.abs(t)))}function Wm(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ur(e)-Ur(t))+1}var it=1e-6,to=1e-12,ft=Math.PI,At=ft/2,hs=ft/4,qt=ft*2,bt=180/ft,ot=ft/180,pt=Math.abs,Yr=Math.atan,Xt=Math.atan2,et=Math.cos,ps=Math.ceil,Vm=Math.exp,Vc=Math.hypot,ds=Math.log,jc=Math.pow,J=Math.sin,ge=Math.sign||function(t){return t>0?1:t<0?-1:0},kt=Math.sqrt,qc=Math.tan;function jm(t){return t>1?0:t<-1?ft:Math.acos(t)}function Zt(t){return t>1?At:t<-1?-At:Math.asin(t)}function qm(t){return(t=J(t/2))*t}function wt(){}function gs(t,e){t&&Zm.hasOwnProperty(t.type)&&Zm[t.type](t,e)}var Xm={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)}},Zm={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){Xc(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Xc(n[r],e,0)},Polygon:function(t,e){Km(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Km(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)gs(n[r],e)}};function Xc(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 Km(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Xc(t[n],e,1);e.polygonEnd()}function Te(t,e){t&&Xm.hasOwnProperty(t.type)?Xm[t.type](t,e):gs(t,e)}var ms=new Tt,ys=new Tt,Qm,Jm,Zc,Kc,Qc,ze={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){ms=new Tt,ze.lineStart=OP,ze.lineEnd=UP},polygonEnd:function(){var t=+ms;ys.add(t<0?qt+t:t),this.lineStart=this.lineEnd=this.point=wt},sphere:function(){ys.add(qt)}};function OP(){ze.point=BP}function UP(){t1(Qm,Jm)}function BP(t,e){ze.point=t1,Qm=t,Jm=e,t*=ot,e*=ot,Zc=t,Kc=et(e=e/2+hs),Qc=J(e)}function t1(t,e){t*=ot,e*=ot,e=e/2+hs;var n=t-Zc,r=n>=0?1:-1,i=r*n,o=et(e),a=J(e),s=Qc*a,u=Kc*o+s*et(i),l=s*r*J(i);ms.add(Xt(l,u)),Zc=t,Kc=o,Qc=a}function YP(t){return ys=new Tt,Te(t,ze),ys*2}function bs(t){return[Xt(t[1],t[0]),Zt(t[2])]}function Kn(t){var e=t[0],n=t[1],r=et(n);return[r*et(e),r*J(e),J(n)]}function vs(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Hr(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 Jc(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=kt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var $t,ie,Mt,le,Qn,e1,n1,Wr,eo,yn,Je,tn={point:tf,lineStart:i1,lineEnd:o1,polygonStart:function(){tn.point=a1,tn.lineStart=HP,tn.lineEnd=WP,eo=new Tt,ze.polygonStart()},polygonEnd:function(){ze.polygonEnd(),tn.point=tf,tn.lineStart=i1,tn.lineEnd=o1,ms<0?($t=-(Mt=180),ie=-(le=90)):eo>it?le=90:eo<-it&&(ie=-90),Je[0]=$t,Je[1]=Mt},sphere:function(){$t=-(Mt=180),ie=-(le=90)}};function tf(t,e){yn.push(Je=[$t=t,Mt=t]),e<ie&&(ie=e),e>le&&(le=e)}function r1(t,e){var n=Kn([t*ot,e*ot]);if(Wr){var r=Hr(Wr,n),i=[r[1],-r[0],0],o=Hr(i,r);_s(o),o=bs(o);var a=t-Qn,s=a>0?1:-1,u=o[0]*bt*s,l,c=pt(a)>180;c^(s*Qn<u&&u<s*t)?(l=o[1]*bt,l>le&&(le=l)):(u=(u+360)%360-180,c^(s*Qn<u&&u<s*t)?(l=-o[1]*bt,l<ie&&(ie=l)):(e<ie&&(ie=e),e>le&&(le=e))),c?t<Qn?ce($t,t)>ce($t,Mt)&&(Mt=t):ce(t,Mt)>ce($t,Mt)&&($t=t):Mt>=$t?(t<$t&&($t=t),t>Mt&&(Mt=t)):t>Qn?ce($t,t)>ce($t,Mt)&&(Mt=t):ce(t,Mt)>ce($t,Mt)&&($t=t)}else yn.push(Je=[$t=t,Mt=t]);e<ie&&(ie=e),e>le&&(le=e),Wr=n,Qn=t}function i1(){tn.point=r1}function o1(){Je[0]=$t,Je[1]=Mt,tn.point=tf,Wr=null}function a1(t,e){if(Wr){var n=t-Qn;eo.add(pt(n)>180?n+(n>0?360:-360):n)}else e1=t,n1=e;ze.point(t,e),r1(t,e)}function HP(){ze.lineStart()}function WP(){a1(e1,n1),ze.lineEnd(),pt(eo)>it&&($t=-(Mt=180)),Je[0]=$t,Je[1]=Mt,Wr=null}function ce(t,e){return(e-=t)<0?e+360:e}function VP(t,e){return t[0]-e[0]}function s1(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function jP(t){var e,n,r,i,o,a,s;if(le=Mt=-($t=ie=1/0),yn=[],Te(t,tn),n=yn.length){for(yn.sort(VP),e=1,r=yn[0],o=[r];e<n;++e)i=yn[e],s1(r,i[0])||s1(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],Mt=r[1])}return yn=Je=null,$t===1/0||ie===1/0?[[NaN,NaN],[NaN,NaN]]:[[$t,ie],[Mt,le]]}var no,ws,$s,Ss,As,Ms,Ds,Ps,ef,nf,rf,u1,l1,Kt,Qt,Jt,Le={sphere:wt,point:of,lineStart:c1,lineEnd:f1,polygonStart:function(){Le.lineStart=ZP,Le.lineEnd=KP},polygonEnd:function(){Le.lineStart=c1,Le.lineEnd=f1}};function of(t,e){t*=ot,e*=ot;var n=et(e);ro(n*et(t),n*J(t),J(e))}function ro(t,e,n){++no,$s+=(t-$s)/no,Ss+=(e-Ss)/no,As+=(n-As)/no}function c1(){Le.point=qP}function qP(t,e){t*=ot,e*=ot;var n=et(e);Kt=n*et(t),Qt=n*J(t),Jt=J(e),Le.point=XP,ro(Kt,Qt,Jt)}function XP(t,e){t*=ot,e*=ot;var n=et(e),r=n*et(t),i=n*J(t),o=J(e),a=Xt(kt((a=Qt*o-Jt*i)*a+(a=Jt*r-Kt*o)*a+(a=Kt*i-Qt*r)*a),Kt*r+Qt*i+Jt*o);ws+=a,Ms+=a*(Kt+(Kt=r)),Ds+=a*(Qt+(Qt=i)),Ps+=a*(Jt+(Jt=o)),ro(Kt,Qt,Jt)}function f1(){Le.point=of}function ZP(){Le.point=QP}function KP(){h1(u1,l1),Le.point=of}function QP(t,e){u1=t,l1=e,t*=ot,e*=ot,Le.point=h1;var n=et(e);Kt=n*et(t),Qt=n*J(t),Jt=J(e),ro(Kt,Qt,Jt)}function h1(t,e){t*=ot,e*=ot;var n=et(e),r=n*et(t),i=n*J(t),o=J(e),a=Qt*o-Jt*i,s=Jt*r-Kt*o,u=Kt*i-Qt*r,l=Vc(a,s,u),c=Zt(l),f=l&&-c/l;ef.add(f*a),nf.add(f*s),rf.add(f*u),ws+=c,Ms+=c*(Kt+(Kt=r)),Ds+=c*(Qt+(Qt=i)),Ps+=c*(Jt+(Jt=o)),ro(Kt,Qt,Jt)}function JP(t){no=ws=$s=Ss=As=Ms=Ds=Ps=0,ef=new Tt,nf=new Tt,rf=new Tt,Te(t,Le);var e=+ef,n=+nf,r=+rf,i=Vc(e,n,r);return i<to&&(e=Ms,n=Ds,r=Ps,ws<it&&(e=$s,n=Ss,r=As),i=Vc(e,n,r),i<to)?[NaN,NaN]:[Xt(n,e)*bt,Zt(r/i)*bt]}function Vr(t){return function(){return t}}function af(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 sf(t,e){return pt(t)>ft&&(t-=Math.round(t/qt)*qt),[t,e]}sf.invert=sf;function uf(t,e,n){return(t%=qt)?e||n?af(d1(t),g1(e,n)):d1(t):e||n?g1(e,n):sf}function p1(t){return function(e,n){return e+=t,pt(e)>ft&&(e-=Math.round(e/qt)*qt),[e,n]}}function d1(t){var e=p1(t);return e.invert=p1(-t),e}function g1(t,e){var n=et(t),r=J(t),i=et(e),o=J(e);function a(s,u){var l=et(u),c=et(s)*l,f=J(s)*l,h=J(u),p=h*n+c*r;return[Xt(f*i-p*o,c*n-h*r),Zt(p*i+f*o)]}return a.invert=function(s,u){var l=et(u),c=et(s)*l,f=J(s)*l,h=J(u),p=h*i-f*o;return[Xt(f*i+h*o,c*n+p*r),Zt(p*n-c*r)]},a}function m1(t){t=uf(t[0]*ot,t[1]*ot,t.length>2?t[2]*ot:0);function e(n){return n=t(n[0]*ot,n[1]*ot),n[0]*=bt,n[1]*=bt,n}return e.invert=function(n){return n=t.invert(n[0]*ot,n[1]*ot),n[0]*=bt,n[1]*=bt,n},e}function y1(t,e,n,r,i,o){if(n){var a=et(e),s=J(e),u=r*n;i==null?(i=e+r*qt,o=e-u/2):(i=b1(a,i),o=b1(a,o),(r>0?i<o:i>o)&&(i+=r*qt));for(var l,c=i;r>0?c>o:c<o;c-=u)l=bs([a,-s*et(c),-s*J(c)]),t.point(l[0],l[1])}}function b1(t,e){e=Kn(e),e[0]-=t,_s(e);var n=jm(-e[1]);return((-e[2]<0?-n:n)+qt-it)%qt}function t7(){var t=Vr([0,0]),e=Vr(90),n=Vr(2),r,i,o={point:a};function a(u,l){r.push(u=i(u,l)),u[0]*=bt,u[1]*=bt}function s(){var u=t.apply(this,arguments),l=e.apply(this,arguments)*ot,c=n.apply(this,arguments)*ot;return r=[],i=uf(-u[0]*ot,-u[1]*ot,0).invert,y1(o,l,c,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 v1(){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 Ts(t,e){return pt(t[0]-e[0])<it&&pt(t[1]-e[1])<it}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 x1(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],v;if(Ts(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*it}o.push(v=new Ls(m,d,null,!0)),a.push(v.o=new Ls(m,null,v,!1)),o.push(v=new Ls(y,d,null,!1)),a.push(v.o=new Ls(y,null,v,!0))}}),!!o.length){for(a.sort(e),_1(o),_1(a),s=0,u=a.length;s<u;++s)a[s].e=n=!n;for(var l=o[0],c,f;;){for(var h=l,p=!0;h.v;)if((h=h.n)===l)return;c=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(s=0,u=c.length;s<u;++s)i.point((f=c[s])[0],f[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(c=h.p.z,s=c.length-1;s>=0;--s)i.point((f=c[s])[0],f[1]);else r(h.x,h.p.x,-1,i);h=h.p}h=h.o,c=h.z,p=!p}while(!h.v);i.lineEnd()}}}function _1(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 lf(t){return pt(t[0])<=ft?t[0]:ge(t[0])*((pt(t[0])+ft)%qt-ft)}function w1(t,e){var n=lf(e),r=e[1],i=J(r),o=[J(n),-et(n),0],a=0,s=0,u=new Tt;i===1?r=At+it:i===-1&&(r=-At-it);for(var l=0,c=t.length;l<c;++l)if(h=(f=t[l]).length)for(var f,h,p=f[h-1],d=lf(p),g=p[1]/2+hs,m=J(g),y=et(g),v=0;v<h;++v,d=b,m=M,y=D,p=x){var x=f[v],b=lf(x),_=x[1]/2+hs,M=J(_),D=et(_),$=b-d,w=$>=0?1:-1,P=w*$,S=P>ft,N=m*M;if(u.add(Xt(N*w*J(P),y*D+N*et(P))),a+=S?$+w*qt:$,S^d>=n^b>=n){var R=Hr(Kn(p),Kn(x));_s(R);var A=Hr(o,R);_s(A);var C=(S^$>=0?-1:1)*Zt(A[2]);(r>C||r===C&&(R[0]||R[1]))&&(s+=S^$>=0?1:-1)}}return(a<-it||a<it&&u<-to)^s&1}function $1(t,e,n,r){return function(i){var o=e(i),a=v1(),s=e(a),u=!1,l,c,f,h={point:p,lineStart:g,lineEnd:m,polygonStart:function(){h.point=y,h.lineStart=v,h.lineEnd=x,c=[],l=[]},polygonEnd:function(){h.point=p,h.lineStart=g,h.lineEnd=m,c=zl(c);var b=w1(l,r);c.length?(u||(i.polygonStart(),u=!0),x1(c,n7,b,n,i)):b&&(u||(i.polygonStart(),u=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),u&&(i.polygonEnd(),u=!1),c=l=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(){h.point=d,o.lineStart()}function m(){h.point=p,o.lineEnd()}function y(b,_){f.push([b,_]),s.point(b,_)}function v(){s.lineStart(),f=[]}function x(){y(f[0][0],f[0][1]),s.lineEnd();var b=s.clean(),_=a.result(),M,D=_.length,$,w,P;if(f.pop(),l.push(f),f=null,!!D){if(b&1){if(w=_[0],($=w.length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),M=0;M<$;++M)i.point((P=w[M])[0],P[1]);i.lineEnd()}return}D>1&&b&2&&_.push(_.pop().concat(_.shift())),c.push(_.filter(e7))}}return h}}function e7(t){return t.length>1}function n7(t,e){return((t=t.x)[0]<0?t[1]-At-it:At-t[1])-((e=e.x)[0]<0?e[1]-At-it:At-e[1])}const cf=$1(function(){return!0},r7,o7,[-ft,-At]);function r7(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=pt(o-e);pt(u-ft)<it?(t.point(e,n=(n+a)/2>0?At:-At),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(o,n),i=0):r!==s&&u>=ft&&(pt(e-r)<it&&(e-=r*it),pt(o-s)<it&&(o-=s*it),n=i7(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 i7(t,e,n,r){var i,o,a=J(t-n);return pt(a)>it?Yr((J(e)*(o=et(r))*J(n)-J(r)*(i=et(e))*J(t))/(i*o*a)):(e+r)/2}function o7(t,e,n,r){var i;if(t==null)i=n*At,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(pt(t[0]-e[0])>it){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 S1(t){var e=et(t),n=2*ot,r=e>0,i=pt(e)>it;function o(c,f,h,p){y1(p,t,n,h,c,f)}function a(c,f){return et(c)*et(f)>e}function s(c){var f,h,p,d,g;return{lineStart:function(){d=p=!1,g=1},point:function(m,y){var v=[m,y],x,b=a(m,y),_=r?b?0:l(m,y):b?l(m+(m<0?ft:-ft),y):0;if(!f&&(d=p=b)&&c.lineStart(),b!==p&&(x=u(f,v),(!x||Ts(f,x)||Ts(v,x))&&(v[2]=1)),b!==p)g=0,b?(c.lineStart(),x=u(v,f),c.point(x[0],x[1])):(x=u(f,v),c.point(x[0],x[1],2),c.lineEnd()),f=x;else if(i&&f&&r^b){var M;!(_&h)&&(M=u(v,f,!0))&&(g=0,r?(c.lineStart(),c.point(M[0][0],M[0][1]),c.point(M[1][0],M[1][1]),c.lineEnd()):(c.point(M[1][0],M[1][1]),c.lineEnd(),c.lineStart(),c.point(M[0][0],M[0][1],3)))}b&&(!f||!Ts(f,v))&&c.point(v[0],v[1]),f=v,p=b,h=_},lineEnd:function(){p&&c.lineEnd(),f=null},clean:function(){return g|(d&&p)<<1}}}function u(c,f,h){var p=Kn(c),d=Kn(f),g=[1,0,0],m=Hr(p,d),y=vs(m,m),v=m[0],x=y-v*v;if(!x)return!h&&c;var b=e*y/x,_=-e*v/x,M=Hr(g,m),D=xs(g,b),$=xs(m,_);Jc(D,$);var w=M,P=vs(D,w),S=vs(w,w),N=P*P-S*(vs(D,D)-1);if(!(N<0)){var R=kt(N),A=xs(w,(-P-R)/S);if(Jc(A,D),A=bs(A),!h)return A;var C=c[0],T=f[0],O=c[1],z=f[1],k;T<C&&(k=C,C=T,T=k);var E=T-C,L=pt(E-ft)<it,F=L||E<it;if(!L&&z<O&&(k=O,O=z,z=k),F?L?O+z>0^A[1]<(pt(A[0]-C)<it?O:z):O<=A[1]&&A[1]<=z:E>ft^(C<=A[0]&&A[0]<=T)){var j=xs(w,(-P+R)/S);return Jc(j,D),[A,bs(j)]}}}function l(c,f){var h=r?t:ft-t,p=0;return c<-h?p|=1:c>h&&(p|=2),f<-h?p|=4:f>h&&(p|=8),p}return $1(a,s,o,r?[0,-t]:[-ft,t-ft])}function a7(t,e,n,r,i,o){var a=t[0],s=t[1],u=e[0],l=e[1],c=0,f=1,h=u-a,p=l-s,d;if(d=n-a,!(!h&&d>0)){if(d/=h,h<0){if(d<c)return;d<f&&(f=d)}else if(h>0){if(d>f)return;d>c&&(c=d)}if(d=i-a,!(!h&&d<0)){if(d/=h,h<0){if(d>f)return;d>c&&(c=d)}else if(h>0){if(d<c)return;d<f&&(f=d)}if(d=r-s,!(!p&&d>0)){if(d/=p,p<0){if(d<c)return;d<f&&(f=d)}else if(p>0){if(d>f)return;d>c&&(c=d)}if(d=o-s,!(!p&&d<0)){if(d/=p,p<0){if(d>f)return;d>c&&(c=d)}else if(p>0){if(d<c)return;d<f&&(f=d)}return c>0&&(t[0]=a+c*h,t[1]=s+c*p),f<1&&(e[0]=a+f*h,e[1]=s+f*p),!0}}}}}var io=1e9,Cs=-io;function Es(t,e,n,r){function i(l,c){return t<=l&&l<=n&&e<=c&&c<=r}function o(l,c,f,h){var p=0,d=0;if(l==null||(p=a(l,f))!==(d=a(c,f))||u(l,c)<0^f>0)do h.point(p===0||p===3?t:n,p>1?r:e);while((p=(p+f+4)%4)!==d);else h.point(c[0],c[1])}function a(l,c){return pt(l[0]-t)<it?c>0?0:3:pt(l[0]-n)<it?c>0?2:1:pt(l[1]-e)<it?c>0?1:0:c>0?3:2}function s(l,c){return u(l.x,c.x)}function u(l,c){var f=a(l,1),h=a(c,1);return f!==h?f-h:f===0?c[1]-l[1]:f===1?l[0]-c[0]:f===2?l[1]-c[1]:c[0]-l[0]}return function(l){var c=l,f=v1(),h,p,d,g,m,y,v,x,b,_,M,D={point:$,lineStart:N,lineEnd:R,polygonStart:P,polygonEnd:S};function $(C,T){i(C,T)&&c.point(C,T)}function w(){for(var C=0,T=0,O=p.length;T<O;++T)for(var z=p[T],k=1,E=z.length,L=z[0],F,j,Q=L[0],U=L[1];k<E;++k)F=Q,j=U,L=z[k],Q=L[0],U=L[1],j<=r?U>r&&(Q-F)*(r-j)>(U-j)*(t-F)&&++C:U<=r&&(Q-F)*(r-j)<(U-j)*(t-F)&&--C;return C}function P(){c=f,h=[],p=[],M=!0}function S(){var C=w(),T=M&&C,O=(h=zl(h)).length;(T||O)&&(l.polygonStart(),T&&(l.lineStart(),o(null,null,1,l),l.lineEnd()),O&&x1(h,s,C,o,l),l.polygonEnd()),c=l,h=p=d=null}function N(){D.point=A,p&&p.push(d=[]),_=!0,b=!1,v=x=NaN}function R(){h&&(A(g,m),y&&b&&f.rejoin(),h.push(f.result())),D.point=$,b&&c.lineEnd()}function A(C,T){var O=i(C,T);if(p&&d.push([C,T]),_)g=C,m=T,y=O,_=!1,O&&(c.lineStart(),c.point(C,T));else if(O&&b)c.point(C,T);else{var z=[v=Math.max(Cs,Math.min(io,v)),x=Math.max(Cs,Math.min(io,x))],k=[C=Math.max(Cs,Math.min(io,C)),T=Math.max(Cs,Math.min(io,T))];a7(z,k,t,e,n,r)?(b||(c.lineStart(),c.point(z[0],z[1])),c.point(k[0],k[1]),O||c.lineEnd(),M=!1):O&&(c.lineStart(),c.point(C,T),M=!1)}v=C,x=T,b=O}return D}}function s7(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Es(t,e,n,r)(o=s)},extent:function(s){return arguments.length?(t=+s[0][0],e=+s[0][1],n=+s[1][0],r=+s[1][1],i=o=null,a):[[t,e],[n,r]]}}}var ff,hf,Rs,ks,jr={sphere:wt,point:wt,lineStart:u7,lineEnd:wt,polygonStart:wt,polygonEnd:wt};function u7(){jr.point=c7,jr.lineEnd=l7}function l7(){jr.point=jr.lineEnd=wt}function c7(t,e){t*=ot,e*=ot,hf=t,Rs=J(e),ks=et(e),jr.point=f7}function f7(t,e){t*=ot,e*=ot;var n=J(e),r=et(e),i=pt(t-hf),o=et(i),a=J(i),s=r*a,u=ks*n-Rs*r*o,l=Rs*n+ks*r*o;ff.add(Xt(kt(s*s+u*u),l)),hf=t,Rs=n,ks=r}function A1(t){return ff=new Tt,Te(t,jr),+ff}var pf=[null,null],h7={type:"LineString",coordinates:pf};function Is(t,e){return pf[0]=t,pf[1]=e,A1(h7)}var M1={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}},D1={Sphere:function(){return!0},Point:function(t,e){return P1(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(P1(n[r],e))return!0;return!1},LineString:function(t,e){return T1(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(T1(n[r],e))return!0;return!1},Polygon:function(t,e){return L1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(L1(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&&D1.hasOwnProperty(t.type)?D1[t.type](t,e):!1}function P1(t,e){return Is(t,e)===0}function T1(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=Is(t[o],e),r===0||o>0&&(i=Is(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<to*i))return!0;n=r}return!1}function L1(t,e){return!!w1(t.map(p7),C1(e))}function p7(t){return t=t.map(C1),t.pop(),t}function C1(t){return[t[0]*ot,t[1]*ot]}function d7(t,e){return(t&&M1.hasOwnProperty(t.type)?M1[t.type]:Ns)(t,e)}function E1(t,e,n){var r=fn(t,e-it,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function R1(t,e,n){var r=fn(t,e-it,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function k1(){var t,e,n,r,i,o,a,s,u=10,l=u,c=90,f=360,h,p,d,g,m=2.5;function y(){return{type:"MultiLineString",coordinates:v()}}function v(){return fn(ps(r/c)*c,n,c).map(d).concat(fn(ps(s/f)*f,a,f).map(g)).concat(fn(ps(e/u)*u,t,u).filter(function(x){return pt(x%c)>it}).map(h)).concat(fn(ps(o/l)*l,i,l).filter(function(x){return pt(x%f)>it}).map(p))}return y.lines=function(){return v().map(function(x){return{type:"LineString",coordinates:x}})},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(x){return arguments.length?y.extentMajor(x).extentMinor(x):y.extentMinor()},y.extentMajor=function(x){return arguments.length?(r=+x[0][0],n=+x[1][0],s=+x[0][1],a=+x[1][1],r>n&&(x=r,r=n,n=x),s>a&&(x=s,s=a,a=x),y.precision(m)):[[r,s],[n,a]]},y.extentMinor=function(x){return arguments.length?(e=+x[0][0],t=+x[1][0],o=+x[0][1],i=+x[1][1],e>t&&(x=e,e=t,t=x),o>i&&(x=o,o=i,i=x),y.precision(m)):[[e,o],[t,i]]},y.step=function(x){return arguments.length?y.stepMajor(x).stepMinor(x):y.stepMinor()},y.stepMajor=function(x){return arguments.length?(c=+x[0],f=+x[1],y):[c,f]},y.stepMinor=function(x){return arguments.length?(u=+x[0],l=+x[1],y):[u,l]},y.precision=function(x){return arguments.length?(m=+x,h=E1(o,i,90),p=R1(e,t,m),d=E1(s,a,90),g=R1(r,n,m),y):m},y.extentMajor([[-180,-90+it],[180,90-it]]).extentMinor([[-180,-80-it],[180,80+it]])}function g7(){return k1()()}function m7(t,e){var n=t[0]*ot,r=t[1]*ot,i=e[0]*ot,o=e[1]*ot,a=et(r),s=J(r),u=et(o),l=J(o),c=a*et(n),f=a*J(n),h=u*et(i),p=u*J(i),d=2*Zt(kt(qm(o-r)+a*u*qm(i-n))),g=J(d),m=d?function(y){var v=J(y*=d)/g,x=J(d-y)/g,b=x*c+v*h,_=x*f+v*p,M=x*s+v*l;return[Xt(_,b)*bt,Xt(M,kt(b*b+_*_))*bt]}:function(){return[n*bt,r*bt]};return m.distance=d,m}const oo=t=>t;var df=new Tt,gf=new Tt,I1,N1,mf,yf,en={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){en.lineStart=y7,en.lineEnd=v7},polygonEnd:function(){en.lineStart=en.lineEnd=en.point=wt,df.add(pt(gf)),gf=new Tt},result:function(){var t=df/2;return df=new Tt,t}};function y7(){en.point=b7}function b7(t,e){en.point=F1,I1=mf=t,N1=yf=e}function F1(t,e){gf.add(yf*t-mf*e),mf=t,yf=e}function v7(){F1(I1,N1)}var qr=1/0,Fs=qr,ao=-qr,Gs=ao,zs={point:x7,lineStart:wt,lineEnd:wt,polygonStart:wt,polygonEnd:wt,result:function(){var t=[[qr,Fs],[ao,Gs]];return ao=Gs=-(Fs=qr=1/0),t}};function x7(t,e){t<qr&&(qr=t),t>ao&&(ao=t),e<Fs&&(Fs=e),e>Gs&&(Gs=e)}var bf=0,vf=0,so=0,Os=0,Us=0,Xr=0,xf=0,_f=0,uo=0,G1,z1,Oe,Ue,me={point:Jn,lineStart:O1,lineEnd:U1,polygonStart:function(){me.lineStart=$7,me.lineEnd=S7},polygonEnd:function(){me.point=Jn,me.lineStart=O1,me.lineEnd=U1},result:function(){var t=uo?[xf/uo,_f/uo]:Xr?[Os/Xr,Us/Xr]:so?[bf/so,vf/so]:[NaN,NaN];return bf=vf=so=Os=Us=Xr=xf=_f=uo=0,t}};function Jn(t,e){bf+=t,vf+=e,++so}function O1(){me.point=_7}function _7(t,e){me.point=w7,Jn(Oe=t,Ue=e)}function w7(t,e){var n=t-Oe,r=e-Ue,i=kt(n*n+r*r);Os+=i*(Oe+t)/2,Us+=i*(Ue+e)/2,Xr+=i,Jn(Oe=t,Ue=e)}function U1(){me.point=Jn}function $7(){me.point=A7}function S7(){B1(G1,z1)}function A7(t,e){me.point=B1,Jn(G1=Oe=t,z1=Ue=e)}function B1(t,e){var n=t-Oe,r=e-Ue,i=kt(n*n+r*r);Os+=i*(Oe+t)/2,Us+=i*(Ue+e)/2,Xr+=i,i=Ue*t-Oe*e,xf+=i*(Oe+t),_f+=i*(Ue+e),uo+=i*3,Jn(Oe=t,Ue=e)}function Y1(t){this._context=t}Y1.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,qt);break}}},result:wt};var wf=new Tt,$f,H1,W1,lo,co,fo={point:wt,lineStart:function(){fo.point=M7},lineEnd:function(){$f&&V1(H1,W1),fo.point=wt},polygonStart:function(){$f=!0},polygonEnd:function(){$f=null},result:function(){var t=+wf;return wf=new Tt,t}};function M7(t,e){fo.point=V1,H1=lo=t,W1=co=e}function V1(t,e){lo-=t,co-=e,wf.add(kt(lo*lo+co*co)),lo=t,co=e}let j1,Bs,q1,X1;class Z1{constructor(e){this._append=e==null?K1:D7(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!==q1||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`,q1=r,Bs=this._append,X1=this._,this._=i}this._+=X1;break}}}result(){const e=this._;return this._="",e.length?e:null}}function K1(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function D7(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return K1;if(e!==j1){const n=10**e;j1=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 P7(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(en)),en.result()},a.measure=function(s){return Te(s,i(fo)),fo.result()},a.bounds=function(s){return Te(s,i(zs)),zs.result()},a.centroid=function(s){return Te(s,i(me)),me.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 Z1(n)):new Y1(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 Z1(n)),a},a.projection(t).digits(n).context(e)}function T7(t){return{stream:ho(t)}}function ho(t){return function(e){var n=new Sf;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Sf(){}Sf.prototype={constructor:Sf,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 Af(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(zs)),e(zs.result()),r!=null&&t.clipExtent(r),t}function Ys(t,e,n){return Af(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 Mf(t,e,n){return Ys(t,[[0,0],e],n)}function Df(t,e,n){return Af(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 Pf(t,e,n){return Af(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 Q1=16,L7=et(30*ot);function J1(t,e){return+e?E7(t,e):C7(t)}function C7(t){return ho({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function E7(t,e){function n(r,i,o,a,s,u,l,c,f,h,p,d,g,m){var y=l-r,v=c-i,x=y*y+v*v;if(x>4*e&&g--){var b=a+h,_=s+p,M=u+d,D=kt(b*b+_*_+M*M),$=Zt(M/=D),w=pt(pt(M)-1)<it||pt(o-f)<it?(o+f)/2:Xt(_,b),P=t(w,$),S=P[0],N=P[1],R=S-r,A=N-i,C=v*R-y*A;(C*C/x>e||pt((y*R+v*A)/x-.5)>.3||a*h+s*p+u*d<L7)&&(n(r,i,o,a,s,u,S,N,w,b/=D,_/=D,M,g,m),m.point(S,N),n(S,N,w,b,_,M,l,c,f,h,p,d,g,m))}}return function(r){var i,o,a,s,u,l,c,f,h,p,d,g,m={point:y,lineStart:v,lineEnd:b,polygonStart:function(){r.polygonStart(),m.lineStart=_},polygonEnd:function(){r.polygonEnd(),m.lineStart=v}};function y($,w){$=t($,w),r.point($[0],$[1])}function v(){f=NaN,m.point=x,r.lineStart()}function x($,w){var P=Kn([$,w]),S=t($,w);n(f,h,c,p,d,g,f=S[0],h=S[1],c=$,p=P[0],d=P[1],g=P[2],Q1,r),r.point(f,h)}function b(){m.point=y,r.lineEnd()}function _(){v(),m.point=M,m.lineEnd=D}function M($,w){x(i=$,w),o=f,a=h,s=p,u=d,l=g,m.point=x}function D(){n(f,h,c,p,d,g,o,a,i,s,u,l,Q1,r),m.lineEnd=b,b()}return m}}var R7=ho({point:function(t,e){this.stream.point(t*ot,e*ot)}});function k7(t){return ho({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function I7(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 ty(t,e,n,r,i,o){if(!o)return I7(t,e,n,r,i);var a=et(o),s=J(o),u=a*t,l=s*t,c=a/t,f=s/t,h=(s*n-a*e)/t,p=(s*e+a*n)/t;function d(g,m){return g*=r,m*=i,[u*g-l*m+e,n-l*g-u*m]}return d.invert=function(g,m){return[r*(c*g-f*m+h),i*(p-f*g-c*m)]},d}function Be(t){return Tf(function(){return t})()}function Tf(t){var e,n=150,r=480,i=250,o=0,a=0,s=0,u=0,l=0,c,f=0,h=1,p=1,d=null,g=cf,m=null,y,v,x,b=oo,_=.5,M,D,$,w,P;function S(C){return $(C[0]*ot,C[1]*ot)}function N(C){return C=$.invert(C[0],C[1]),C&&[C[0]*bt,C[1]*bt]}S.stream=function(C){return w&&P===C?w:w=R7(k7(c)(g(M(b(P=C)))))},S.preclip=function(C){return arguments.length?(g=C,d=void 0,A()):g},S.postclip=function(C){return arguments.length?(b=C,m=y=v=x=null,A()):b},S.clipAngle=function(C){return arguments.length?(g=+C?S1(d=C*ot):(d=null,cf),A()):d*bt},S.clipExtent=function(C){return arguments.length?(b=C==null?(m=y=v=x=null,oo):Es(m=+C[0][0],y=+C[0][1],v=+C[1][0],x=+C[1][1]),A()):m==null?null:[[m,y],[v,x]]},S.scale=function(C){return arguments.length?(n=+C,R()):n},S.translate=function(C){return arguments.length?(r=+C[0],i=+C[1],R()):[r,i]},S.center=function(C){return arguments.length?(o=C[0]%360*ot,a=C[1]%360*ot,R()):[o*bt,a*bt]},S.rotate=function(C){return arguments.length?(s=C[0]%360*ot,u=C[1]%360*ot,l=C.length>2?C[2]%360*ot:0,R()):[s*bt,u*bt,l*bt]},S.angle=function(C){return arguments.length?(f=C%360*ot,R()):f*bt},S.reflectX=function(C){return arguments.length?(h=C?-1:1,R()):h<0},S.reflectY=function(C){return arguments.length?(p=C?-1:1,R()):p<0},S.precision=function(C){return arguments.length?(M=J1(D,_=C*C),A()):kt(_)},S.fitExtent=function(C,T){return Ys(S,C,T)},S.fitSize=function(C,T){return Mf(S,C,T)},S.fitWidth=function(C,T){return Df(S,C,T)},S.fitHeight=function(C,T){return Pf(S,C,T)};function R(){var C=ty(n,0,0,h,p,f).apply(null,e(o,a)),T=ty(n,r-C[0],i-C[1],h,p,f);return c=uf(s,u,l),D=af(e,T),$=af(c,D),M=J1(D,_),A()}function A(){return w=P=null,S}return function(){return e=t.apply(this,arguments),S.invert=e.invert&&N,R()}}function Lf(t){var e=0,n=ft/3,r=Tf(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*ot,n=o[1]*ot):[e*bt,n*bt]},i}function N7(t){var e=et(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 ey(t,e){var n=J(t),r=(n+J(e))/2;if(pt(r)<it)return N7(t);var i=1+n*(2*r-n),o=kt(i)/r;function a(s,u){var l=kt(i-2*r*J(u))/r;return[l*J(s*=r),o-l*et(s)]}return a.invert=function(s,u){var l=o-u,c=Xt(s,pt(l))*ge(l);return l*r<0&&(c-=ft*ge(s)*ge(l)),[c/r,Zt((i-(s*s+l*l)*r*r)/(2*r))]},a}function Hs(){return Lf(ey).scale(155.424).center([0,33.6442])}function ny(){return Hs().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function F7(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 G7(){var t,e,n=ny(),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,l={point:function(h,p){u=[h,p]}};function c(h){var p=h[0],d=h[1];return u=null,r.point(p,d),u||(o.point(p,d),u)||(s.point(p,d),u)}c.invert=function(h){var p=n.scale(),d=n.translate(),g=(h[0]-d[0])/p,m=(h[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(h)},c.stream=function(h){return t&&e===h?t:t=F7([n.stream(e=h),i.stream(h),a.stream(h)])},c.precision=function(h){return arguments.length?(n.precision(h),i.precision(h),a.precision(h),f()):n.precision()},c.scale=function(h){return arguments.length?(n.scale(h),i.scale(h*.35),a.scale(h),c.translate(n.translate())):n.scale()},c.translate=function(h){if(!arguments.length)return n.translate();var p=n.scale(),d=+h[0],g=+h[1];return r=n.translate(h).clipExtent([[d-.455*p,g-.238*p],[d+.455*p,g+.238*p]]).stream(l),o=i.translate([d-.307*p,g+.201*p]).clipExtent([[d-.425*p+it,g+.12*p+it],[d-.214*p-it,g+.234*p-it]]).stream(l),s=a.translate([d-.205*p,g+.212*p]).clipExtent([[d-.214*p+it,g+.166*p+it],[d-.115*p-it,g+.234*p-it]]).stream(l),f()},c.fitExtent=function(h,p){return Ys(c,h,p)},c.fitSize=function(h,p){return Mf(c,h,p)},c.fitWidth=function(h,p){return Df(c,h,p)},c.fitHeight=function(h,p){return Pf(c,h,p)};function f(){return t=e=null,c}return c.scale(1070)}function ry(t){return function(e,n){var r=et(e),i=et(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=kt(e*e+n*n),i=t(r),o=J(i),a=et(i);return[Xt(e*o,r*a),Zt(r&&n*o/r)]}}var Cf=ry(function(t){return kt(2/(1+t))});Cf.invert=po(function(t){return 2*Zt(t/2)});function z7(){return Be(Cf).scale(124.75).clipAngle(180-.001)}var Ef=ry(function(t){return(t=jm(t))&&t/J(t)});Ef.invert=po(function(t){return t});function O7(){return Be(Ef).scale(79.4188).clipAngle(180-.001)}function go(t,e){return[t,ds(qc((At+e)/2))]}go.invert=function(t,e){return[t,2*Yr(Vm(e))-At]};function U7(){return iy(go).scale(961/qt)}function iy(t){var e=Be(t),n=e.center,r=e.scale,i=e.translate,o=e.clipExtent,a=null,s,u,l;e.scale=function(f){return arguments.length?(r(f),c()):r()},e.translate=function(f){return arguments.length?(i(f),c()):i()},e.center=function(f){return arguments.length?(n(f),c()):n()},e.clipExtent=function(f){return arguments.length?(f==null?a=s=u=l=null:(a=+f[0][0],s=+f[0][1],u=+f[1][0],l=+f[1][1]),c()):a==null?null:[[a,s],[u,l]]};function c(){var f=ft*r(),h=e(m1(e.rotate()).invert([0,0]));return o(a==null?[[h[0]-f,h[1]-f],[h[0]+f,h[1]+f]]:t===go?[[Math.max(h[0]-f,a),s],[Math.min(h[0]+f,u),l]]:[[a,Math.max(h[1]-f,s)],[u,Math.min(h[1]+f,l)]])}return c()}function Ws(t){return qc((At+t)/2)}function oy(t,e){var n=et(t),r=t===e?J(t):ds(n/et(e))/ds(Ws(e)/Ws(t)),i=n*jc(Ws(t),r)/r;if(!r)return go;function o(a,s){i>0?s<-At+it&&(s=-At+it):s>At-it&&(s=At-it);var u=i/jc(Ws(s),r);return[u*J(r*a),i-u*et(r*a)]}return o.invert=function(a,s){var u=i-s,l=ge(r)*kt(a*a+u*u),c=Xt(a,pt(u))*ge(u);return u*r<0&&(c-=ft*ge(a)*ge(u)),[c/r,2*Yr(jc(i/l,1/r))-At]},o}function B7(){return Lf(oy).scale(109.5).parallels([30,30])}function mo(t,e){return[t,e]}mo.invert=mo;function Y7(){return Be(mo).scale(152.63)}function ay(t,e){var n=et(t),r=t===e?J(t):(n-et(e))/(e-t),i=n/r+t;if(pt(r)<it)return mo;function o(a,s){var u=i-s,l=r*a;return[u*J(l),i-u*et(l)]}return o.invert=function(a,s){var u=i-s,l=Xt(a,pt(u))*ge(u);return u*r<0&&(l-=ft*ge(a)*ge(u)),[l/r,i-ge(r)*kt(a*a+u*u)]},o}function H7(){return Lf(ay).scale(131.154).center([0,13.9389])}var yo=1.340264,bo=-.081106,vo=893e-6,xo=.003796,Vs=kt(3)/2,W7=12;function Rf(t,e){var n=Zt(Vs*J(e)),r=n*n,i=r*r*r;return[t*et(n)/(Vs*(yo+3*bo*r+i*(7*vo+9*xo*r))),n*(yo+bo*r+i*(vo+xo*r))]}Rf.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,u;o<W7&&(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,!(pt(a)<to));++o);return[Vs*t*(yo+3*bo*r+i*(7*vo+9*xo*r))/et(n),Zt(J(n)/Vs)]};function V7(){return Be(Rf).scale(177.158)}function kf(t,e){var n=et(e),r=et(t)*n;return[n*J(t)/r,J(e)/r]}kf.invert=po(Yr);function j7(){return Be(kf).scale(144.049).clipAngle(60)}function q7(){var t=1,e=0,n=0,r=1,i=1,o=0,a,s,u=null,l,c,f,h=1,p=1,d=ho({point:function(b,_){var M=x([b,_]);this.stream.point(M[0],M[1])}}),g=oo,m,y;function v(){return h=t*r,p=t*i,m=y=null,x}function x(b){var _=b[0]*h,M=b[1]*p;if(o){var D=M*a-_*s;_=_*a+M*s,M=D}return[_+e,M+n]}return x.invert=function(b){var _=b[0]-e,M=b[1]-n;if(o){var D=M*a+_*s;_=_*a-M*s,M=D}return[_/h,M/p]},x.stream=function(b){return m&&y===b?m:m=d(g(y=b))},x.postclip=function(b){return arguments.length?(g=b,u=l=c=f=null,v()):g},x.clipExtent=function(b){return arguments.length?(g=b==null?(u=l=c=f=null,oo):Es(u=+b[0][0],l=+b[0][1],c=+b[1][0],f=+b[1][1]),v()):u==null?null:[[u,l],[c,f]]},x.scale=function(b){return arguments.length?(t=+b,v()):t},x.translate=function(b){return arguments.length?(e=+b[0],n=+b[1],v()):[e,n]},x.angle=function(b){return arguments.length?(o=b%360*ot,s=J(o),a=et(o),v()):o*bt},x.reflectX=function(b){return arguments.length?(r=b?-1:1,v()):r<0},x.reflectY=function(b){return arguments.length?(i=b?-1:1,v()):i<0},x.fitExtent=function(b,_){return Ys(x,b,_)},x.fitSize=function(b,_){return Mf(x,b,_)},x.fitWidth=function(b,_){return Df(x,b,_)},x.fitHeight=function(b,_){return Pf(x,b,_)},x}function If(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)))]}If.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(pt(i)>it&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function X7(){return Be(If).scale(175.295)}function Nf(t,e){return[et(e)*J(t),J(e)]}Nf.invert=po(Zt);function Z7(){return Be(Nf).scale(249.5).clipAngle(90+it)}function Ff(t,e){var n=et(e),r=1+et(t)*n;return[n*J(t)/r,J(e)/r]}Ff.invert=po(function(t){return 2*Yr(t)});function K7(){return Be(Ff).scale(250).clipAngle(142)}function Gf(t,e){return[ds(qc((At+e)/2)),-t]}Gf.invert=function(t,e){return[-e,2*Yr(Vm(t))-At]};function Q7(){var t=iy(Gf),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 J7(t,e){return t.parent===e.parent?1:2}function tT(t){return t.reduce(eT,0)/t.length}function eT(t,e){return t+e.x}function nT(t){return 1+t.reduce(rT,0)}function rT(t,e){return Math.max(t,e.y)}function iT(t){for(var e;e=t.children;)t=e[0];return t}function oT(t){for(var e;e=t.children;)t=e[e.length-1];return t}function aT(){var t=J7,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(h){var p=h.children;p?(h.x=tT(p),h.y=nT(p)):(h.x=a?s+=t(h,a):0,h.y=0,a=h)});var u=iT(o),l=oT(o),c=u.x-t(u,l)/2,f=l.x+t(l,u)/2;return o.eachAfter(r?function(h){h.x=(h.x-o.x)*e,h.y=(o.y-h.y)*n}:function(h){h.x=(h.x-c)/(f-c)*e,h.y=(1-(o.y?h.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 sT(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 uT(){return this.eachAfter(sT)}function lT(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function cT(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 fT(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 hT(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function pT(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 dT(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function gT(t){for(var e=this,n=mT(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 mT(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 yT(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function bT(){return Array.from(this)}function vT(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function xT(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*_T(){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=ST)):e===void 0&&(e=$T);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(sy)}function wT(){return js(this).eachBefore(AT)}function $T(t){return t.children}function ST(t){return Array.isArray(t)?t[1]:null}function AT(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function sy(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:uT,each:lT,eachAfter:fT,eachBefore:cT,find:hT,sum:pT,sort:dT,path:gT,ancestors:yT,descendants:bT,leaves:vT,links:xT,copy:wT,[Symbol.iterator]:_T};function qs(t){return t==null?null:uy(t)}function uy(t){if(typeof t!="function")throw new Error;return t}function er(){return 0}function Zr(t){return function(){return t}}const MT=1664525,DT=1013904223,ly=4294967296;function zf(){let t=1;return()=>(t=(MT*t+DT)%ly)/ly}function PT(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function TT(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 LT(t){return cy(t,zf())}function cy(t,e){for(var n=0,r=(t=TT(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&fy(a,o)?++n:(a=ET(i=CT(i,o)),n=0);return a}function CT(t,e){var n,r;if(Of(e,t))return[e];for(n=0;n<t.length;++n)if(Xs(e,t[n])&&Of(_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(Xs(_o(t[n],t[r]),e)&&Xs(_o(t[n],e),t[r])&&Xs(_o(t[r],e),t[n])&&Of(hy(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Xs(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 fy(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 Of(t,e){for(var n=0;n<e.length;++n)if(!fy(t,e[n]))return!1;return!0}function ET(t){switch(t.length){case 1:return RT(t[0]);case 2:return _o(t[0],t[1]);case 3:return hy(t[0],t[1],t[2])}}function RT(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,l=a-r,c=s-i,f=Math.sqrt(u*u+l*l);return{x:(n+o+u/f*c)/2,y:(r+a+l/f*c)/2,r:(f+i+s)/2}}function hy(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,l=n.x,c=n.y,f=n.r,h=r-a,p=r-l,d=i-s,g=i-c,m=u-o,y=f-o,v=r*r+i*i-o*o,x=v-a*a-s*s+u*u,b=v-l*l-c*c+f*f,_=p*d-h*g,M=(d*b-g*x)/(_*2)-r,D=(g*m-d*y)/_,$=(p*x-h*b)/(_*2)-i,w=(h*y-p*m)/_,P=D*D+w*w-1,S=2*(o+M*D+$*w),N=M*M+$*$-o*o,R=-(Math.abs(P)>1e-6?(S+Math.sqrt(S*S-4*P*N))/(2*P):N/S);return{x:r+M+D*R,y:i+$+w*R,r:R}}function py(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,s,u,l=r*r+a*a;l?(o=e.r+n.r,o*=o,u=t.r+n.r,u*=u,o>u?(i=(l+u-o)/(2*l),s=Math.sqrt(Math.max(0,u/l-i*i)),n.x=t.x-i*r-s*a,n.y=t.y-i*a+s*r):(i=(l+o-u)/(2*l),s=Math.sqrt(Math.max(0,o/l-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 dy(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 gy(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 my(t,e){if(!(o=(t=PT(t)).length))return 0;var n,r,i,o,a,s,u,l,c,f,h;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;py(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){py(n._,r._,i=t[u]),i=new Zs(i),l=r.next,c=n.previous,f=r._.r,h=n._.r;do if(f<=h){if(dy(l._,i._)){r=l,n.next=r,r.previous=n,--u;continue t}f+=l._.r,l=l.next}else{if(dy(c._,i._)){n=c,n.next=r,r.previous=n,--u;continue t}h+=c._.r,c=c.previous}while(l!==c.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=gy(n);(i=i.next)!==r;)(s=gy(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=cy(n,e),u=0;u<o;++u)n=t[u],n.x-=i.x,n.y-=i.y;return i.r}function kT(t){return my(t,zf()),t}function IT(t){return Math.sqrt(t.value)}function NT(){var t=null,e=1,n=1,r=er;function i(o){const a=zf();return o.x=e/2,o.y=n/2,t?o.eachBefore(yy(t)).eachAfter(Uf(r,.5,a)).eachBefore(by(1)):o.eachBefore(yy(IT)).eachAfter(Uf(er,1,a)).eachAfter(Uf(r,o.r/Math.min(e,n),a)).eachBefore(by(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:Zr(+o),i):r},i}function yy(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Uf(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=my(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=u+s}}}function by(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 vy(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,l=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*l}function FT(){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(vy),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 l=u.x0,c=u.y0,f=u.x1-n,h=u.y1-n;f<l&&(l=f=(l+f)/2),h<c&&(c=h=(c+h)/2),u.x0=l,u.y0=c,u.x1=f,u.y1=h}}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 GT={depth:-1},xy={},Bf={};function zT(t){return t.id}function OT(t){return t.parentId}function UT(){var t=zT,e=OT,n;function r(i){var o=Array.from(i),a=t,s=e,u,l,c,f,h,p,d,g,m=new Map;if(n!=null){const y=o.map((b,_)=>BT(n(b,_,i))),v=y.map(_y),x=new Set(y).add("");for(const b of v)x.has(b)||(x.add(b),y.push(b),v.push(_y(b)),o.push(Bf));a=(b,_)=>y[_],s=(b,_)=>v[_]}for(c=0,u=o.length;c<u;++c)l=o[c],p=o[c]=new tr(l),(d=a(l,c,i))!=null&&(d+="")&&(g=p.id=d,m.set(g,m.has(g)?xy:p)),(d=s(l,c,i))!=null&&(d+="")&&(p.parent=d);for(c=0;c<u;++c)if(p=o[c],d=p.parent){if(h=m.get(d),!h)throw new Error("missing: "+d);if(h===xy)throw new Error("ambiguous: "+d);h.children?h.children.push(p):h.children=[p],p.parent=h}else{if(f)throw new Error("multiple roots");f=p}if(!f)throw new Error("no root");if(n!=null){for(;f.data===Bf&&f.children.length===1;)f=f.children[0],--u;for(let y=o.length-1;y>=0&&(p=o[y],p.data===Bf);--y)p.data=null}if(f.parent=GT,f.eachBefore(function(y){y.depth=y.parent.depth+1,--u}).eachBefore(sy),f.parent=null,u>0)throw new Error("cycle");return f}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 BT(t){t=`${t}`;let e=t.length;return Yf(t,e-1)&&!Yf(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function _y(t){let e=t.length;if(e<2)return"";for(;--e>1&&!Yf(t,e););return t.slice(0,e)}function Yf(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function YT(t,e){return t.parent===e.parent?1:2}function Hf(t){var e=t.children;return e?e[0]:t.t}function Wf(t){var e=t.children;return e?e[e.length-1]:t.t}function HT(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 WT(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 VT(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 jT(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 qT(){var t=YT,e=1,n=1,r=null;function i(l){var c=jT(l);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)l.eachBefore(u);else{var f=l,h=l,p=l;l.eachBefore(function(v){v.x<f.x&&(f=v),v.x>h.x&&(h=v),v.depth>p.depth&&(p=v)});var d=f===h?1:t(f,h)/2,g=d-f.x,m=e/(h.x+d+g),y=n/(p.depth||1);l.eachBefore(function(v){v.x=(v.x+g)*m,v.y=v.depth*y})}return l}function o(l){var c=l.children,f=l.parent.children,h=l.i?f[l.i-1]:null;if(c){WT(l);var p=(c[0].z+c[c.length-1].z)/2;h?(l.z=h.z+t(l._,h._),l.m=l.z-p):l.z=p}else h&&(l.z=h.z+t(l._,h._));l.parent.A=s(l,h,l.parent.A||f[0])}function a(l){l._.x=l.z+l.parent.m,l.m+=l.parent.m}function s(l,c,f){if(c){for(var h=l,p=l,d=c,g=h.parent.children[0],m=h.m,y=p.m,v=d.m,x=g.m,b;d=Wf(d),h=Hf(h),d&&h;)g=Hf(g),p=Wf(p),p.a=l,b=d.z+v-h.z-m+t(d._,h._),b>0&&(HT(VT(d,l,f),l,b),m+=b,y+=b),v+=d.m,m+=h.m,x+=g.m,y+=p.m;d&&!Wf(p)&&(p.t=d,p.m+=v-y),h&&!Hf(g)&&(g.t=h,g.m+=m-x,f=l)}return f}function u(l){l.x*=e,l.y=l.depth*n}return i.separation=function(l){return arguments.length?(t=l,i):t},i.size=function(l){return arguments.length?(r=!1,e=+l[0],n=+l[1],i):r?null:[e,n]},i.nodeSize=function(l){return arguments.length?(r=!0,e=+l[0],n=+l[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,l=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*l}var wy=(1+Math.sqrt(5))/2;function $y(t,e,n,r,i,o){for(var a=[],s=e.children,u,l,c=0,f=0,h=s.length,p,d,g=e.value,m,y,v,x,b,_,M;c<h;){p=i-n,d=o-r;do m=s[f++].value;while(!m&&f<h);for(y=v=m,_=Math.max(d/p,p/d)/(g*t),M=m*m*_,b=Math.max(v/M,M/y);f<h;++f){if(m+=l=s[f].value,l<y&&(y=l),l>v&&(v=l),M=m*m*_,x=Math.max(v/M,M/y),x>b){m-=l;break}b=x}a.push(u={value:m,dice:p<d,children:s.slice(c,f)}),u.dice?wo(u,n,r,i,g?r+=d*m/g:o):Qs(u,n,r,g?n+=p*m/g:i,o),g-=m,c=f}return a}const Vf=function t(e){function n(r,i,o,a,s){$y(e,r,i,o,a,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(wy);function Sy(){var t=Vf,e=!1,n=1,r=1,i=[0],o=er,a=er,s=er,u=er,l=er;function c(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(f),i=[0],e&&h.eachBefore(vy),h}function f(h){var p=i[h.depth],d=h.x0+p,g=h.y0+p,m=h.x1-p,y=h.y1-p;m<d&&(d=m=(d+m)/2),y<g&&(g=y=(g+y)/2),h.x0=d,h.y0=g,h.x1=m,h.y1=y,h.children&&(p=i[h.depth+1]=o(h)/2,d+=l(h)-p,g+=a(h)-p,m-=s(h)-p,y-=u(h)-p,m<d&&(d=m=(d+m)/2),y<g&&(g=y=(g+y)/2),t(h,d,g,m,y))}return c.round=function(h){return arguments.length?(e=!!h,c):e},c.size=function(h){return arguments.length?(n=+h[0],r=+h[1],c):[n,r]},c.tile=function(h){return arguments.length?(t=uy(h),c):t},c.padding=function(h){return arguments.length?c.paddingInner(h).paddingOuter(h):c.paddingInner()},c.paddingInner=function(h){return arguments.length?(o=typeof h=="function"?h:Zr(+h),c):o},c.paddingOuter=function(h){return arguments.length?c.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):c.paddingTop()},c.paddingTop=function(h){return arguments.length?(a=typeof h=="function"?h:Zr(+h),c):a},c.paddingRight=function(h){return arguments.length?(s=typeof h=="function"?h:Zr(+h),c):s},c.paddingBottom=function(h){return arguments.length?(u=typeof h=="function"?h:Zr(+h),c):u},c.paddingLeft=function(h){return arguments.length?(l=typeof h=="function"?h:Zr(+h),c):l},c}function XT(t,e,n,r,i){var o=t.children,a,s=o.length,u,l=new Array(s+1);for(l[0]=u=a=0;a<s;++a)l[a+1]=u+=o[a].value;c(0,s,t.value,e,n,r,i);function c(f,h,p,d,g,m,y){if(f>=h-1){var v=o[f];v.x0=d,v.y0=g,v.x1=m,v.y1=y;return}for(var x=l[f],b=p/2+x,_=f+1,M=h-1;_<M;){var D=_+M>>>1;l[D]<b?_=D+1:M=D}b-l[_-1]<l[_]-b&&f+1<_&&--_;var $=l[_]-x,w=p-$;if(m-d>y-g){var P=p?(d*w+m*$)/p:m;c(f,_,$,d,g,P,y),c(_,h,w,P,g,m,y)}else{var S=p?(g*w+y*$)/p:y;c(f,_,$,d,g,m,S),c(_,h,w,d,S,m,y)}}}function ZT(t,e,n,r,i){(t.depth&1?Qs:wo)(t,e,n,r,i)}const KT=function t(e){function n(r,i,o,a,s){if((u=r._squarify)&&u.ratio===e)for(var u,l,c,f,h=-1,p,d=u.length,g=r.value;++h<d;){for(l=u[h],c=l.children,f=l.value=0,p=c.length;f<p;++f)l.value+=c[f].value;l.dice?wo(l,i,o,a,g?o+=(s-o)*l.value/g:s):Qs(l,i,o,g?i+=(a-i)*l.value/g:a,s),g-=l.value}else r._squarify=u=$y(e,r,i,o,a,s),u.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(wy);function QT(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 JT(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 t9(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function e9(t,e){return t[0]-e[0]||t[1]-e[1]}function Ay(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&t9(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function n9(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(e9),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=Ay(r),a=Ay(i),s=a[0]===o[0],u=a[a.length-1]===o[o.length-1],l=[];for(e=o.length-1;e>=0;--e)l.push(t[r[o[e]][2]]);for(e=+s;e<a.length-u;++e)l.push(t[r[a[e]][2]]);return l}function r9(t,e){for(var n=t.length,r=t[n-1],i=e[0],o=e[1],a=r[0],s=r[1],u,l,c=!1,f=0;f<n;++f)r=t[f],u=r[0],l=r[1],l>o!=s>o&&i<(a-u)*(o-l)/(s-l)+u&&(c=!c),a=u,s=l;return c}function i9(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,o9=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),a9=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),jf=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),s9=function t(e){var n=jf.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(Nt),My=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),u9=function t(e){var n=My.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),l9=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(Nt),c9=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),f9=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),Dy=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),qf=function t(e){var n=jf.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 l=n(),c=1+s*l;while(c<=0);c*=c*c;var f=1-e()}while(f>=1-.0331*l*l*l*l&&Math.log(f)>=.5*l*l+a*(1-c+Math.log(c)));return a*c*u()*o}}return r.source=t,r}(Nt),Py=function t(e){var n=qf.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),Ty=function t(e){var n=Dy.source(e),r=Py.source(e);function i(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var s=0,u=o,l=a;u*l>16&&u*(1-l)>16;){var c=Math.floor((u+1)*l),f=r(c,u-c+1)();f<=l?(s+=c,u-=c,l=(l-f)/(1-f)):(u=c-1,l/=f)}for(var h=l<.5,p=h?l:1-l,d=n(p),g=d(),m=0;g<=u;++m)g+=d();return s+(h?m:u-m)}}return i.source=t,i}(Nt),h9=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),p9=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),d9=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),g9=function t(e){var n=qf.source(e),r=Ty.source(e);function i(o){return function(){for(var a=0,s=o;s>16;){var u=Math.floor(.875*s),l=n(u)();if(l>s)return a+r(u-1,s/l)();a+=u,s-=l}for(var c=-Math.log1p(-e()),f=0;c<=s;++f)c-=Math.log1p(-e());return a+f}}return i.source=t,i}(Nt),m9=1664525,y9=1013904223,Ly=1/4294967296;function b9(t=Math.random()){let e=(0<=t&&t<1?t/Ly:Math.abs(t))|0;return()=>(e=m9*e+y9|0,Ly*(e>>>0))}function ye(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function nn(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 Xf=Symbol("implicit");function Zf(){var t=new Pi,e=[],n=[],r=Xf;function i(o){let a=t.get(o);if(a===void 0){if(r!==Xf)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 Pi;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 Zf(e,n).unknown(r)},ye.apply(i,arguments),i}function Kf(){var t=Zf().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,l=0,c=.5;delete t.unknown;function f(){var h=e().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,h-u+l*2),s&&(o=Math.floor(o)),d+=(g-d-o*(h-u))*c,a=o*(1-u),s&&(d=Math.round(d),a=Math.round(a));var m=fn(h).map(function(y){return d+o*y});return n(p?m.reverse():m)}return t.domain=function(h){return arguments.length?(e(h),f()):e()},t.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,f()):[r,i]},t.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,s=!0,f()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(h){return arguments.length?(s=!!h,f()):s},t.padding=function(h){return arguments.length?(u=Math.min(1,l=+h),f()):u},t.paddingInner=function(h){return arguments.length?(u=Math.min(1,h),f()):u},t.paddingOuter=function(h){return arguments.length?(l=+h,f()):l},t.align=function(h){return arguments.length?(c=Math.max(0,Math.min(1,h)),f()):c},t.copy=function(){return Kf(e(),[r,i]).round(s).paddingInner(u).paddingOuter(l).align(c)},ye.apply(f(),arguments)}function Cy(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Cy(e())},t}function Qf(){return Cy(Kf.apply(null,arguments).paddingInner(1))}function v9(t){return function(){return t}}function Js(t){return+t}var Ey=[0,1];function te(t){return t}function Jf(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:v9(isNaN(e)?NaN:.5)}function x9(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function _9(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 w9(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 tu(){var t=Ey,e=Ey,n=qe,r,i,o,a=te,s,u,l;function c(){var h=Math.min(t.length,e.length);return a!==te&&(a=x9(t[0],t[h-1])),s=h>2?w9:_9,u=l=null,f}function f(h){return h==null||isNaN(h=+h)?o:(u||(u=s(t.map(r),e,n)))(r(a(h)))}return f.invert=function(h){return a(i((l||(l=s(e,t.map(r),de)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,Js),c()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),c()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=Ya,c()},f.clamp=function(h){return arguments.length?(a=h?!0:te,c()):a!==te},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,p){return r=h,i=p,c()}}function th(){return tu()(te,te)}function Ry(t,e,n,r){var i=xa(t,e,n),o;switch(r=Br(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=Hm(i,a))&&(r.precision=o),Wc(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Wm(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Ym(i))&&(r.precision=o-(r.type==="%")*2);break}}return Ji(r)}function bn(t){var e=t.domain;return t.ticks=function(n){var r=e();return kn(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return Ry(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,l,c=10;for(s<a&&(l=a,a=s,s=l,l=i,i=o,o=l);c-- >0;){if(l=In(a,s,n),l===u)return r[i]=a,r[o]=s,e(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;u=l}return t},t}function So(){var t=th();return t.copy=function(){return $o(t,So())},ye.apply(t,arguments),bn(t)}function ky(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 ky(t).unknown(e)},t=arguments.length?Array.from(t,Js):[0,1],bn(n)}function Iy(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 Ny(t){return Math.log(t)}function Fy(t){return Math.exp(t)}function $9(t){return-Math.log(-t)}function S9(t){return-Math.exp(-t)}function A9(t){return isFinite(t)?+("1e"+t):t<0?0:t}function M9(t){return t===10?A9:t===Math.E?Math.exp:e=>Math.pow(t,e)}function D9(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 Gy(t){return(e,n)=>-t(-e,n)}function eh(t){const e=t(Ny,Fy),n=e.domain;let r=10,i,o;function a(){return i=D9(r),o=M9(r),n()[0]<0?(i=Gy(i),o=Gy(o),t($9,S9)):t(Ny,Fy),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 l=u[0],c=u[u.length-1];const f=c<l;f&&([l,c]=[c,l]);let h=i(l),p=i(c),d,g;const m=s==null?10:+s;let y=[];if(!(r%1)&&p-h<m){if(h=Math.floor(h),p=Math.ceil(p),l>0){for(;h<=p;++h)for(d=1;d<r;++d)if(g=h<0?d/o(-h):d*o(h),!(g<l)){if(g>c)break;y.push(g)}}else for(;h<=p;++h)for(d=r-1;d>=1;--d)if(g=h>0?d/o(-h):d*o(h),!(g<l)){if(g>c)break;y.push(g)}y.length*2<m&&(y=kn(l,c,m))}else y=kn(h,p,Math.min(p-h,m)).map(o);return f?y.reverse():y},e.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Br(u)).precision==null&&(u.trim=!0),u=Ji(u)),s===1/0)return u;const l=Math.max(1,r*s/e.ticks().length);return c=>{let f=c/o(Math.round(i(c)));return f*r<r-.5&&(f*=r),f<=l?u(c):""}},e.nice=()=>n(Iy(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function zy(){const t=eh(tu()).domain([1,10]);return t.copy=()=>$o(t,zy()).base(t.base()),ye.apply(t,arguments),t}function Oy(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Uy(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function nh(t){var e=1,n=t(Oy(e),Uy(e));return n.constant=function(r){return arguments.length?t(Oy(e=+r),Uy(e)):e},bn(n)}function By(){var t=nh(tu());return t.copy=function(){return $o(t,By()).constant(t.constant())},ye.apply(t,arguments)}function Yy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function P9(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function T9(t){return t<0?-t*t:t*t}function rh(t){var e=t(te,te),n=1;function r(){return n===1?t(te,te):n===.5?t(P9,T9):t(Yy(n),Yy(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},bn(e)}function Kr(){var t=rh(tu());return t.copy=function(){return $o(t,Kr()).exponent(t.exponent())},ye.apply(t,arguments),t}function L9(){return Kr.apply(null,arguments).exponent(.5)}function Hy(t){return Math.sign(t)*t*t}function C9(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function Wy(){var t=th(),e=[0,1],n=!1,r;function i(o){var a=C9(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(Hy(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(Hy)),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 Wy(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},ye.apply(i,arguments),bn(i)}function Vy(){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]=$g(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 Vy().domain(t).range(e).unknown(r)},ye.apply(o,arguments)}function jy(){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 l=i.indexOf(u);return l<0?[NaN,NaN]:l<1?[t,r[0]]:l>=n?[r[n-1],e]:[r[l-1],r[l]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return jy().domain([t,e]).range(i).unknown(o)},ye.apply(bn(a),arguments)}function qy(){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 qy().domain(t).range(e).unknown(n)},ye.apply(i,arguments)}const ih=new Date,oh=new Date;function Pt(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 l;do u.push(l=new Date(+o)),e(o,s),t(o);while(l<o&&o<a);return u},i.filter=o=>Pt(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)=>(ih.setTime(+o),oh.setTime(+a),t(ih),t(oh),Math.floor(n(ih,oh))),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 Qr=Pt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Qr.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Pt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Qr);const Xy=Qr.range,rn=1e3,be=rn*60,on=be*60,an=on*24,ah=an*7,Zy=an*30,sh=an*365,sn=Pt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getUTCSeconds()),Ky=sn.range,eu=Pt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*rn)},(t,e)=>{t.setTime(+t+e*be)},(t,e)=>(e-t)/be,t=>t.getMinutes()),E9=eu.range,nu=Pt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*be)},(t,e)=>(e-t)/be,t=>t.getUTCMinutes()),R9=nu.range,ru=Pt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*rn-t.getMinutes()*be)},(t,e)=>{t.setTime(+t+e*on)},(t,e)=>(e-t)/on,t=>t.getHours()),k9=ru.range,iu=Pt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*on)},(t,e)=>(e-t)/on,t=>t.getUTCHours()),I9=iu.range,Jr=Pt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*be)/an,t=>t.getDate()-1),N9=Jr.range,Ao=Pt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/an,t=>t.getUTCDate()-1),F9=Ao.range,uh=Pt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/an,t=>Math.floor(t/an)),G9=uh.range;function nr(t){return Pt(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())*be)/ah)}const ti=nr(0),Mo=nr(1),Qy=nr(2),Jy=nr(3),rr=nr(4),tb=nr(5),eb=nr(6),nb=ti.range,z9=Mo.range,O9=Qy.range,U9=Jy.range,B9=rr.range,Y9=tb.range,H9=eb.range;function ir(t){return Pt(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)/ah)}const ei=ir(0),Do=ir(1),rb=ir(2),ib=ir(3),or=ir(4),ob=ir(5),ab=ir(6),sb=ei.range,W9=Do.range,V9=rb.range,j9=ib.range,q9=or.range,X9=ob.range,Z9=ab.range,ou=Pt(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()),K9=ou.range,au=Pt(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()),Q9=au.range,Ye=Pt(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());Ye.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Pt(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 J9=Ye.range,He=Pt(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());He.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Pt(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 tL=He.range;function ub(t,e,n,r,i,o){const a=[[sn,1,rn],[sn,5,5*rn],[sn,15,15*rn],[sn,30,30*rn],[o,1,be],[o,5,5*be],[o,15,15*be],[o,30,30*be],[i,1,on],[i,3,3*on],[i,6,6*on],[i,12,12*on],[r,1,an],[r,2,2*an],[n,1,ah],[e,1,Zy],[e,3,3*Zy],[t,1,sh]];function s(l,c,f){const h=c<l;h&&([l,c]=[c,l]);const p=f&&typeof f.range=="function"?f:u(l,c,f),d=p?p.range(l,+c+1):[];return h?d.reverse():d}function u(l,c,f){const h=Math.abs(c-l)/f,p=ma(([,,m])=>m).right(a,h);if(p===a.length)return t.every(xa(l/sh,c/sh,f));if(p===0)return Qr.every(Math.max(xa(l,c,f),1));const[d,g]=a[h/a[p-1][2]<a[p][2]/h?p-1:p];return d.every(g)}return[s,u]}const[lb,cb]=ub(He,au,ei,uh,iu,nu),[fb,hb]=ub(Ye,ou,ti,Jr,ru,eu);function lh(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 ch(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 pb(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,l=To(i),c=Lo(i),f=To(o),h=Lo(o),p=To(a),d=Lo(a),g=To(s),m=Lo(s),y=To(u),v=Lo(u),x={a:O,A:z,b:k,B:E,c:null,d:vb,e:vb,f:$L,g:RL,G:IL,H:xL,I:_L,j:wL,L:xb,m:SL,M:AL,p:L,q:F,Q:Mb,s:Db,S:ML,u:DL,U:PL,V:TL,w:LL,W:CL,x:null,X:null,y:EL,Y:kL,Z:NL,"%":Ab},b={a:j,A:Q,b:U,B:X,c:null,d:wb,e:wb,f:OL,g:ZL,G:QL,H:FL,I:GL,j:zL,L:$b,m:UL,M:BL,p:B,q,Q:Mb,s:Db,S:YL,u:HL,U:WL,V:VL,w:jL,W:qL,x:null,X:null,y:XL,Y:KL,Z:JL,"%":Ab},_={a:P,A:S,b:N,B:R,c:A,d:yb,e:yb,f:mL,g:mb,G:gb,H:bb,I:bb,j:hL,L:gL,m:fL,M:pL,p:w,q:cL,Q:bL,s:vL,S:dL,u:oL,U:aL,V:sL,w:iL,W:uL,x:C,X:T,y:mb,Y:gb,Z:lL,"%":yL};x.x=M(n,x),x.X=M(r,x),x.c=M(e,x),b.x=M(n,b),b.X=M(r,b),b.c=M(e,b);function M(V,rt){return function(ut){var W=[],mt=-1,ht=0,Yt=V.length,ee,st,Dt;for(ut instanceof Date||(ut=new Date(+ut));++mt<Yt;)V.charCodeAt(mt)===37&&(W.push(V.slice(ht,mt)),(st=db[ee=V.charAt(++mt)])!=null?ee=V.charAt(++mt):st=ee==="e"?" ":"0",(Dt=rt[ee])&&(ee=Dt(ut,st)),W.push(ee),ht=mt+1);return W.push(V.slice(ht,mt)),W.join("")}}function D(V,rt){return function(ut){var W=Po(1900,void 0,1),mt=$(W,V,ut+="",0),ht,Yt;if(mt!=ut.length)return null;if("Q"in W)return new Date(W.Q);if("s"in W)return new Date(W.s*1e3+("L"in W?W.L:0));if(rt&&!("Z"in W)&&(W.Z=0),"p"in W&&(W.H=W.H%12+W.p*12),W.m===void 0&&(W.m="q"in W?W.q:0),"V"in W){if(W.V<1||W.V>53)return null;"w"in W||(W.w=1),"Z"in W?(ht=ch(Po(W.y,0,1)),Yt=ht.getUTCDay(),ht=Yt>4||Yt===0?Do.ceil(ht):Do(ht),ht=Ao.offset(ht,(W.V-1)*7),W.y=ht.getUTCFullYear(),W.m=ht.getUTCMonth(),W.d=ht.getUTCDate()+(W.w+6)%7):(ht=lh(Po(W.y,0,1)),Yt=ht.getDay(),ht=Yt>4||Yt===0?Mo.ceil(ht):Mo(ht),ht=Jr.offset(ht,(W.V-1)*7),W.y=ht.getFullYear(),W.m=ht.getMonth(),W.d=ht.getDate()+(W.w+6)%7)}else("W"in W||"U"in W)&&("w"in W||(W.w="u"in W?W.u%7:"W"in W?1:0),Yt="Z"in W?ch(Po(W.y,0,1)).getUTCDay():lh(Po(W.y,0,1)).getDay(),W.m=0,W.d="W"in W?(W.w+6)%7+W.W*7-(Yt+5)%7:W.w+W.U*7-(Yt+6)%7);return"Z"in W?(W.H+=W.Z/100|0,W.M+=W.Z%100,ch(W)):lh(W)}}function $(V,rt,ut,W){for(var mt=0,ht=rt.length,Yt=ut.length,ee,st;mt<ht;){if(W>=Yt)return-1;if(ee=rt.charCodeAt(mt++),ee===37){if(ee=rt.charAt(mt++),st=_[ee in db?rt.charAt(mt++):ee],!st||(W=st(V,ut,W))<0)return-1}else if(ee!=ut.charCodeAt(W++))return-1}return W}function w(V,rt,ut){var W=l.exec(rt.slice(ut));return W?(V.p=c.get(W[0].toLowerCase()),ut+W[0].length):-1}function P(V,rt,ut){var W=p.exec(rt.slice(ut));return W?(V.w=d.get(W[0].toLowerCase()),ut+W[0].length):-1}function S(V,rt,ut){var W=f.exec(rt.slice(ut));return W?(V.w=h.get(W[0].toLowerCase()),ut+W[0].length):-1}function N(V,rt,ut){var W=y.exec(rt.slice(ut));return W?(V.m=v.get(W[0].toLowerCase()),ut+W[0].length):-1}function R(V,rt,ut){var W=g.exec(rt.slice(ut));return W?(V.m=m.get(W[0].toLowerCase()),ut+W[0].length):-1}function A(V,rt,ut){return $(V,e,rt,ut)}function C(V,rt,ut){return $(V,n,rt,ut)}function T(V,rt,ut){return $(V,r,rt,ut)}function O(V){return a[V.getDay()]}function z(V){return o[V.getDay()]}function k(V){return u[V.getMonth()]}function E(V){return s[V.getMonth()]}function L(V){return i[+(V.getHours()>=12)]}function F(V){return 1+~~(V.getMonth()/3)}function j(V){return a[V.getUTCDay()]}function Q(V){return o[V.getUTCDay()]}function U(V){return u[V.getUTCMonth()]}function X(V){return s[V.getUTCMonth()]}function B(V){return i[+(V.getUTCHours()>=12)]}function q(V){return 1+~~(V.getUTCMonth()/3)}return{format:function(V){var rt=M(V+="",x);return rt.toString=function(){return V},rt},parse:function(V){var rt=D(V+="",!1);return rt.toString=function(){return V},rt},utcFormat:function(V){var rt=M(V+="",b);return rt.toString=function(){return V},rt},utcParse:function(V){var rt=D(V+="",!0);return rt.toString=function(){return V},rt}}}var db={"-":"",_:" ",0:"0"},It=/^\s*\d+/,eL=/^%/,nL=/[\\^$*+?|[\]().{}]/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 rL(t){return t.replace(nL,"\\$&")}function To(t){return new RegExp("^(?:"+t.map(rL).join("|")+")","i")}function Lo(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function iL(t,e,n){var r=It.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function oL(t,e,n){var r=It.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function aL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function sL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function uL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function gb(t,e,n){var r=It.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function mb(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function lL(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 cL(t,e,n){var r=It.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function fL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function yb(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function hL(t,e,n){var r=It.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function bb(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function pL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function dL(t,e,n){var r=It.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function gL(t,e,n){var r=It.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function mL(t,e,n){var r=It.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function yL(t,e,n){var r=eL.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function bL(t,e,n){var r=It.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function vL(t,e,n){var r=It.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function vb(t,e){return gt(t.getDate(),e,2)}function xL(t,e){return gt(t.getHours(),e,2)}function _L(t,e){return gt(t.getHours()%12||12,e,2)}function wL(t,e){return gt(1+Jr.count(Ye(t),t),e,3)}function xb(t,e){return gt(t.getMilliseconds(),e,3)}function $L(t,e){return xb(t,e)+"000"}function SL(t,e){return gt(t.getMonth()+1,e,2)}function AL(t,e){return gt(t.getMinutes(),e,2)}function ML(t,e){return gt(t.getSeconds(),e,2)}function DL(t){var e=t.getDay();return e===0?7:e}function PL(t,e){return gt(ti.count(Ye(t)-1,t),e,2)}function _b(t){var e=t.getDay();return e>=4||e===0?rr(t):rr.ceil(t)}function TL(t,e){return t=_b(t),gt(rr.count(Ye(t),t)+(Ye(t).getDay()===4),e,2)}function LL(t){return t.getDay()}function CL(t,e){return gt(Mo.count(Ye(t)-1,t),e,2)}function EL(t,e){return gt(t.getFullYear()%100,e,2)}function RL(t,e){return t=_b(t),gt(t.getFullYear()%100,e,2)}function kL(t,e){return gt(t.getFullYear()%1e4,e,4)}function IL(t,e){var n=t.getDay();return t=n>=4||n===0?rr(t):rr.ceil(t),gt(t.getFullYear()%1e4,e,4)}function NL(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+gt(e/60|0,"0",2)+gt(e%60,"0",2)}function wb(t,e){return gt(t.getUTCDate(),e,2)}function FL(t,e){return gt(t.getUTCHours(),e,2)}function GL(t,e){return gt(t.getUTCHours()%12||12,e,2)}function zL(t,e){return gt(1+Ao.count(He(t),t),e,3)}function $b(t,e){return gt(t.getUTCMilliseconds(),e,3)}function OL(t,e){return $b(t,e)+"000"}function UL(t,e){return gt(t.getUTCMonth()+1,e,2)}function BL(t,e){return gt(t.getUTCMinutes(),e,2)}function YL(t,e){return gt(t.getUTCSeconds(),e,2)}function HL(t){var e=t.getUTCDay();return e===0?7:e}function WL(t,e){return gt(ei.count(He(t)-1,t),e,2)}function Sb(t){var e=t.getUTCDay();return e>=4||e===0?or(t):or.ceil(t)}function VL(t,e){return t=Sb(t),gt(or.count(He(t),t)+(He(t).getUTCDay()===4),e,2)}function jL(t){return t.getUTCDay()}function qL(t,e){return gt(Do.count(He(t)-1,t),e,2)}function XL(t,e){return gt(t.getUTCFullYear()%100,e,2)}function ZL(t,e){return t=Sb(t),gt(t.getUTCFullYear()%100,e,2)}function KL(t,e){return gt(t.getUTCFullYear()%1e4,e,4)}function QL(t,e){var n=t.getUTCDay();return t=n>=4||n===0?or(t):or.ceil(t),gt(t.getUTCFullYear()%1e4,e,4)}function JL(){return"+0000"}function Ab(){return"%"}function Mb(t){return+t}function Db(t){return Math.floor(+t/1e3)}var ni,fh,Pb,su,hh;Tb({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 Tb(t){return ni=pb(t),fh=ni.format,Pb=ni.parse,su=ni.utcFormat,hh=ni.utcParse,ni}var Lb="%Y-%m-%dT%H:%M:%S.%LZ";function tC(t){return t.toISOString()}var eC=Date.prototype.toISOString?tC:su(Lb);const nC=eC;function rC(t){var e=new Date(t);return isNaN(e)?null:e}var iC=+new Date("2000-01-01T00:00:00.000Z")?rC:hh(Lb);const oC=iC;function aC(t){return new Date(t)}function sC(t){return t instanceof Date?+t:+new Date(+t)}function ph(t,e,n,r,i,o,a,s,u,l){var c=th(),f=c.invert,h=c.domain,p=l(".%L"),d=l(":%S"),g=l("%I:%M"),m=l("%I %p"),y=l("%a %d"),v=l("%b %d"),x=l("%B"),b=l("%Y");function _(M){return(u(M)<M?p:s(M)<M?d:a(M)<M?g:o(M)<M?m:r(M)<M?i(M)<M?y:v:n(M)<M?x:b)(M)}return c.invert=function(M){return new Date(f(M))},c.domain=function(M){return arguments.length?h(Array.from(M,sC)):h().map(aC)},c.ticks=function(M){var D=h();return t(D[0],D[D.length-1],M??10)},c.tickFormat=function(M,D){return D==null?_:l(D)},c.nice=function(M){var D=h();return(!M||typeof M.range!="function")&&(M=e(D[0],D[D.length-1],M??10)),M?h(Iy(D,M)):c},c.copy=function(){return $o(c,ph(t,e,n,r,i,o,a,s,u,l))},c}function uC(){return ye.apply(ph(fb,hb,Ye,ou,ti,Jr,ru,eu,sn,fh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function lC(){return ye.apply(ph(lb,cb,He,au,ei,Ao,iu,nu,sn,su).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function uu(){var t=0,e=1,n,r,i,o,a=te,s=!1,u;function l(f){return f==null||isNaN(f=+f)?u:a(i===0?.5:(f=(o(f)-n)*i,s?Math.max(0,Math.min(1,f)):f))}l.domain=function(f){return arguments.length?([t,e]=f,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),l):[t,e]},l.clamp=function(f){return arguments.length?(s=!!f,l):s},l.interpolator=function(f){return arguments.length?(a=f,l):a};function c(f){return function(h){var p,d;return arguments.length?([p,d]=h,a=f(p,d),l):[a(0),a(1)]}}return l.range=c(qe),l.rangeRound=c(Ya),l.unknown=function(f){return arguments.length?(u=f,l):u},function(f){return o=f,n=f(t),r=f(e),i=n===r?0:1/(r-n),l}}function vn(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Cb(){var t=bn(uu()(te));return t.copy=function(){return vn(t,Cb())},nn.apply(t,arguments)}function Eb(){var t=eh(uu()).domain([1,10]);return t.copy=function(){return vn(t,Eb()).base(t.base())},nn.apply(t,arguments)}function Rb(){var t=nh(uu());return t.copy=function(){return vn(t,Rb()).constant(t.constant())},nn.apply(t,arguments)}function dh(){var t=rh(uu());return t.copy=function(){return vn(t,dh()).exponent(t.exponent())},nn.apply(t,arguments)}function cC(){return dh.apply(null,arguments).exponent(.5)}function kb(){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)=>Ci(t,o/r))},n.copy=function(){return kb(e).domain(t)},nn.apply(n,arguments)}function lu(){var t=0,e=.5,n=1,r=1,i,o,a,s,u,l=te,c,f=!1,h;function p(g){return isNaN(g=+g)?h:(g=.5+((g=+c(g))-o)*(r*g<r*o?s:u),l(f?Math.max(0,Math.min(1,g)):g))}p.domain=function(g){return arguments.length?([t,e,n]=g,i=c(t=+t),o=c(e=+e),a=c(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?(f=!!g,p):f},p.interpolator=function(g){return arguments.length?(l=g,p):l};function d(g){return function(m){var y,v,x;return arguments.length?([y,v,x]=m,l=I0(g,[y,v,x]),p):[l(0),l(.5),l(1)]}}return p.range=d(qe),p.rangeRound=d(Ya),p.unknown=function(g){return arguments.length?(h=g,p):h},function(g){return c=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 Ib(){var t=bn(lu()(te));return t.copy=function(){return vn(t,Ib())},nn.apply(t,arguments)}function Nb(){var t=eh(lu()).domain([.1,1,10]);return t.copy=function(){return vn(t,Nb()).base(t.base())},nn.apply(t,arguments)}function Fb(){var t=nh(lu());return t.copy=function(){return vn(t,Fb()).constant(t.constant())},nn.apply(t,arguments)}function gh(){var t=rh(lu());return t.copy=function(){return vn(t,gh()).exponent(t.exponent())},nn.apply(t,arguments)}function fC(){return gh.apply(null,arguments).exponent(.5)}function ct(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 hC=ct("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),pC=ct("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),dC=ct("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),gC=ct("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),mC=ct("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),yC=ct("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),bC=ct("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),vC=ct("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),xC=ct("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),_C=ct("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),wC=ct("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),vt=t=>x0(t[t.length-1]);var Gb=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ct);const $C=vt(Gb);var zb=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ct);const SC=vt(zb);var Ob=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ct);const AC=vt(Ob);var Ub=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ct);const MC=vt(Ub);var Bb=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ct);const DC=vt(Bb);var Yb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ct);const PC=vt(Yb);var Hb=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ct);const TC=vt(Hb);var Wb=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ct);const LC=vt(Wb);var Vb=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ct);const CC=vt(Vb);var jb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ct);const EC=vt(jb);var qb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ct);const RC=vt(qb);var Xb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ct);const kC=vt(Xb);var Zb=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ct);const IC=vt(Zb);var Kb=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ct);const NC=vt(Kb);var Qb=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ct);const FC=vt(Qb);var Jb=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ct);const GC=vt(Jb);var tv=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ct);const zC=vt(tv);var ev=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ct);const OC=vt(ev);var nv=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ct);const UC=vt(nv);var rv=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ct);const BC=vt(rv);var iv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ct);const YC=vt(iv);var ov=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ct);const HC=vt(ov);var av=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ct);const WC=vt(av);var sv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ct);const VC=vt(sv);var uv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ct);const jC=vt(uv);var lv=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ct);const qC=vt(lv);var cv=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ct);const XC=vt(cv);function ZC(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 KC=Wa(De(300,.5,0),De(-240,.5,1));var QC=Wa(De(-100,.75,.35),De(80,1.5,.8)),JC=Wa(De(260,.75,.35),De(80,1.5,.8)),cu=De();function tE(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 fu=Lr(),eE=Math.PI/3,nE=Math.PI*2/3;function rE(t){var e;return t=(.5-t)*Math.PI,fu.r=255*(e=Math.sin(t))*e,fu.g=255*(e=Math.sin(t+eE))*e,fu.b=255*(e=Math.sin(t+nE))*e,fu+""}function iE(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function hu(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const oE=hu(ct("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var aE=hu(ct("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),sE=hu(ct("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),uE=hu(ct("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function lt(t){return function(){return t}}const fv=Math.abs,Ut=Math.atan2,un=Math.cos,lE=Math.max,ri=Math.min,oe=Math.sin,xt=Math.sqrt,Bt=1e-12,xn=Math.PI,pu=xn/2,_n=2*xn;function cE(t){return t>1?0:t<-1?xn:Math.acos(t)}function hv(t){return t>=1?pu:t<=-1?-pu:Math.asin(t)}function Co(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 Xi(e)}function fE(t){return t.innerRadius}function hE(t){return t.outerRadius}function pE(t){return t.startAngle}function dE(t){return t.endAngle}function gE(t){return t&&t.padAngle}function mE(t,e,n,r,i,o,a,s){var u=n-t,l=r-e,c=a-i,f=s-o,h=f*u-c*l;if(!(h*h<Bt))return h=(c*(e-o)-f*(t-i))/h,[t+h*u,e+h*l]}function du(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/xt(s*s+u*u),c=l*u,f=-l*s,h=t+c,p=e+f,d=n+c,g=r+f,m=(h+d)/2,y=(p+g)/2,v=d-h,x=g-p,b=v*v+x*x,_=i-o,M=h*g-d*p,D=(x<0?-1:1)*xt(lE(0,_*_*b-M*M)),$=(M*x-v*D)/b,w=(-M*v-x*D)/b,P=(M*x+v*D)/b,S=(-M*v+x*D)/b,N=$-m,R=w-y,A=P-m,C=S-y;return N*N+R*R>A*A+C*C&&($=P,w=S),{cx:$,cy:w,x01:-c,y01:-f,x11:$*(i/_-1),y11:w*(i/_-1)}}function gu(){var t=fE,e=hE,n=lt(0),r=null,i=pE,o=dE,a=gE,s=null,u=Co(l);function l(){var c,f,h=+t.apply(this,arguments),p=+e.apply(this,arguments),d=i.apply(this,arguments)-pu,g=o.apply(this,arguments)-pu,m=fv(g-d),y=g>d;if(s||(s=c=u()),p<h&&(f=p,p=h,h=f),!(p>Bt))s.moveTo(0,0);else if(m>_n-Bt)s.moveTo(p*un(d),p*oe(d)),s.arc(0,0,p,d,g,!y),h>Bt&&(s.moveTo(h*un(g),h*oe(g)),s.arc(0,0,h,g,d,y));else{var v=d,x=g,b=d,_=g,M=m,D=m,$=a.apply(this,arguments)/2,w=$>Bt&&(r?+r.apply(this,arguments):xt(h*h+p*p)),P=ri(fv(p-h)/2,+n.apply(this,arguments)),S=P,N=P,R,A;if(w>Bt){var C=hv(w/h*oe($)),T=hv(w/p*oe($));(M-=C*2)>Bt?(C*=y?1:-1,b+=C,_-=C):(M=0,b=_=(d+g)/2),(D-=T*2)>Bt?(T*=y?1:-1,v+=T,x-=T):(D=0,v=x=(d+g)/2)}var O=p*un(v),z=p*oe(v),k=h*un(_),E=h*oe(_);if(P>Bt){var L=p*un(x),F=p*oe(x),j=h*un(b),Q=h*oe(b),U;if(m<xn)if(U=mE(O,z,j,Q,L,F,k,E)){var X=O-U[0],B=z-U[1],q=L-U[0],V=F-U[1],rt=1/oe(cE((X*q+B*V)/(xt(X*X+B*B)*xt(q*q+V*V)))/2),ut=xt(U[0]*U[0]+U[1]*U[1]);S=ri(P,(h-ut)/(rt-1)),N=ri(P,(p-ut)/(rt+1))}else S=N=0}D>Bt?N>Bt?(R=du(j,Q,O,z,p,N,y),A=du(L,F,k,E,p,N,y),s.moveTo(R.cx+R.x01,R.cy+R.y01),N<P?s.arc(R.cx,R.cy,N,Ut(R.y01,R.x01),Ut(A.y01,A.x01),!y):(s.arc(R.cx,R.cy,N,Ut(R.y01,R.x01),Ut(R.y11,R.x11),!y),s.arc(0,0,p,Ut(R.cy+R.y11,R.cx+R.x11),Ut(A.cy+A.y11,A.cx+A.x11),!y),s.arc(A.cx,A.cy,N,Ut(A.y11,A.x11),Ut(A.y01,A.x01),!y))):(s.moveTo(O,z),s.arc(0,0,p,v,x,!y)):s.moveTo(O,z),!(h>Bt)||!(M>Bt)?s.lineTo(k,E):S>Bt?(R=du(k,E,L,F,h,-S,y),A=du(O,z,j,Q,h,-S,y),s.lineTo(R.cx+R.x01,R.cy+R.y01),S<P?s.arc(R.cx,R.cy,S,Ut(R.y01,R.x01),Ut(A.y01,A.x01),!y):(s.arc(R.cx,R.cy,S,Ut(R.y01,R.x01),Ut(R.y11,R.x11),!y),s.arc(0,0,h,Ut(R.cy+R.y11,R.cx+R.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,h,_,b,y)}if(s.closePath(),c)return s=null,c+""||null}return l.centroid=function(){var c=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,f=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-xn/2;return[un(f)*c,oe(f)*c]},l.innerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:lt(+c),l):t},l.outerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:lt(+c),l):e},l.cornerRadius=function(c){return arguments.length?(n=typeof c=="function"?c:lt(+c),l):n},l.padRadius=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:lt(+c),l):r},l.startAngle=function(c){return arguments.length?(i=typeof c=="function"?c:lt(+c),l):i},l.endAngle=function(c){return arguments.length?(o=typeof c=="function"?c:lt(+c),l):o},l.padAngle=function(c){return arguments.length?(a=typeof c=="function"?c:lt(+c),l):a},l.context=function(c){return arguments.length?(s=c??null,l):s},l}var yE=Array.prototype.slice;function mu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function pv(t){this._context=t}pv.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 pv(t)}function mh(t){return t[0]}function yh(t){return t[1]}function bu(t,e){var n=lt(!0),r=null,i=yu,o=null,a=Co(s);t=typeof t=="function"?t:t===void 0?mh:lt(t),e=typeof e=="function"?e:e===void 0?yh:lt(e);function s(u){var l,c=(u=mu(u)).length,f,h=!1,p;for(r==null&&(o=i(p=a())),l=0;l<=c;++l)!(l<c&&n(f=u[l],l,u))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(f,l,u),+e(f,l,u));if(p)return o=null,p+""||null}return s.x=function(u){return arguments.length?(t=typeof u=="function"?u:lt(+u),s):t},s.y=function(u){return arguments.length?(e=typeof u=="function"?u:lt(+u),s):e},s.defined=function(u){return arguments.length?(n=typeof u=="function"?u:lt(!!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 bh(t,e,n){var r=null,i=lt(!0),o=null,a=yu,s=null,u=Co(l);t=typeof t=="function"?t:t===void 0?mh:lt(+t),e=typeof e=="function"?e:lt(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?yh:lt(+n);function l(f){var h,p,d,g=(f=mu(f)).length,m,y=!1,v,x=new Array(g),b=new Array(g);for(o==null&&(s=a(v=u())),h=0;h<=g;++h){if(!(h<g&&i(m=f[h],h,f))===y)if(y=!y)p=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=h-1;d>=p;--d)s.point(x[d],b[d]);s.lineEnd(),s.areaEnd()}y&&(x[h]=+t(m,h,f),b[h]=+e(m,h,f),s.point(r?+r(m,h,f):x[h],n?+n(m,h,f):b[h]))}if(v)return s=null,v+""||null}function c(){return bu().defined(i).curve(a).context(o)}return l.x=function(f){return arguments.length?(t=typeof f=="function"?f:lt(+f),r=null,l):t},l.x0=function(f){return arguments.length?(t=typeof f=="function"?f:lt(+f),l):t},l.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:lt(+f),l):r},l.y=function(f){return arguments.length?(e=typeof f=="function"?f:lt(+f),n=null,l):e},l.y0=function(f){return arguments.length?(e=typeof f=="function"?f:lt(+f),l):e},l.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:lt(+f),l):n},l.lineX0=l.lineY0=function(){return c().x(t).y(e)},l.lineY1=function(){return c().x(t).y(n)},l.lineX1=function(){return c().x(r).y(e)},l.defined=function(f){return arguments.length?(i=typeof f=="function"?f:lt(!!f),l):i},l.curve=function(f){return arguments.length?(a=f,o!=null&&(s=a(o)),l):a},l.context=function(f){return arguments.length?(f==null?o=s=null:s=a(o=f),l):o},l}function bE(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function vE(t){return t}function dv(){var t=vE,e=bE,n=null,r=lt(0),i=lt(_n),o=lt(0);function a(s){var u,l=(s=mu(s)).length,c,f,h=0,p=new Array(l),d=new Array(l),g=+r.apply(this,arguments),m=Math.min(_n,Math.max(-_n,i.apply(this,arguments)-g)),y,v=Math.min(Math.abs(m)/l,o.apply(this,arguments)),x=v*(m<0?-1:1),b;for(u=0;u<l;++u)(b=d[p[u]=u]=+t(s[u],u,s))>0&&(h+=b);for(e!=null?p.sort(function(_,M){return e(d[_],d[M])}):n!=null&&p.sort(function(_,M){return n(s[_],s[M])}),u=0,f=h?(m-l*x)/h:0;u<l;++u,g=y)c=p[u],b=d[c],y=g+(b>0?b*f:0)+x,d[c]={data:s[c],index:u,value:b,startAngle:g,endAngle:y,padAngle:v};return d}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:lt(+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:lt(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:lt(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:lt(+s),a):o},a}var gv=vh(yu);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 vh(t){function e(n){return new mv(t(n))}return e._curve=t,e}function Eo(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(vh(n)):e()._curve},t}function yv(){return Eo(bu().curve(gv))}function bv(){var t=bh().curve(gv),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 Eo(n())},delete t.lineX0,t.lineEndAngle=function(){return Eo(r())},delete t.lineX1,t.lineInnerRadius=function(){return Eo(i())},delete t.lineY0,t.lineOuterRadius=function(){return Eo(o())},delete t.lineY1,t.curve=function(a){return arguments.length?e(vh(a)):e()._curve},t}function Ro(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class vv{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 xE{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=Ro(this._x0,this._y0),i=Ro(this._x0,this._y0=(this._y0+n)/2),o=Ro(e,this._y0),a=Ro(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function xv(t){return new vv(t,!0)}function _v(t){return new vv(t,!1)}function _E(t){return new xE(t)}function wE(t){return t.source}function $E(t){return t.target}function vu(t){let e=wE,n=$E,r=mh,i=yh,o=null,a=null,s=Co(u);function u(){let l;const c=yE.call(arguments),f=e.apply(this,c),h=n.apply(this,c);if(o==null&&(a=t(l=s())),a.lineStart(),c[0]=f,a.point(+r.apply(this,c),+i.apply(this,c)),c[0]=h,a.point(+r.apply(this,c),+i.apply(this,c)),a.lineEnd(),l)return a=null,l+""||null}return u.source=function(l){return arguments.length?(e=l,u):e},u.target=function(l){return arguments.length?(n=l,u):n},u.x=function(l){return arguments.length?(r=typeof l=="function"?l:lt(+l),u):r},u.y=function(l){return arguments.length?(i=typeof l=="function"?l:lt(+l),u):i},u.context=function(l){return arguments.length?(l==null?o=a=null:a=t(o=l),u):o},u}function SE(){return vu(xv)}function AE(){return vu(_v)}function ME(){const t=vu(_E);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const DE=xt(3),wv={draw(t,e){const n=xt(e+ri(e/28,.75))*.59436,r=n/2,i=r*DE;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=xt(e/xn);t.moveTo(n,0),t.arc(0,0,n,0,_n)}},$v={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()}},Sv=xt(1/3),PE=Sv*2,Av={draw(t,e){const n=xt(e/PE),r=n*Sv;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},Mv={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()}},Dv={draw(t,e){const n=xt(e-ri(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},Pv={draw(t,e){const n=xt(e),r=-n/2;t.rect(r,r,n,n)}},Tv={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()}},TE=.8908130915292852,Lv=oe(xn/10)/oe(7*xn/10),LE=oe(_n/10)*Lv,CE=-un(_n/10)*Lv,Cv={draw(t,e){const n=xt(e*TE),r=LE*n,i=CE*n;t.moveTo(0,-n),t.lineTo(r,i);for(let o=1;o<5;++o){const a=_n*o/5,s=un(a),u=oe(a);t.lineTo(u*n,-s*n),t.lineTo(s*r-u*i,u*r+s*i)}t.closePath()}},xh=xt(3),Ev={draw(t,e){const n=-xt(e/(xh*3));t.moveTo(0,n*2),t.lineTo(-xh*n,-n),t.lineTo(xh*n,-n),t.closePath()}},EE=xt(3),Rv={draw(t,e){const n=xt(e)*.6824,r=n/2,i=n*EE/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},ve=-.5,xe=xt(3)/2,_h=1/xt(12),RE=(_h/2+1)*3,kv={draw(t,e){const n=xt(e/RE),r=n/2,i=n*_h,o=r,a=n*_h+n,s=-o,u=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,u),t.lineTo(ve*r-xe*i,xe*r+ve*i),t.lineTo(ve*o-xe*a,xe*o+ve*a),t.lineTo(ve*s-xe*u,xe*s+ve*u),t.lineTo(ve*r+xe*i,ve*i-xe*r),t.lineTo(ve*o+xe*a,ve*a-xe*o),t.lineTo(ve*s+xe*u,ve*u-xe*s),t.closePath()}},wh={draw(t,e){const n=xt(e-ri(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},Iv=[xu,$v,Av,Pv,Cv,Ev,kv],kE=[xu,Dv,wh,Rv,wv,Tv,Mv];function IE(t,e){let n=null,r=Co(i);t=typeof t=="function"?t:lt(t||xu),e=typeof e=="function"?e:lt(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:lt(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:lt(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function wn(){}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 NE(t){return new wu(t)}function Nv(t){this._context=t}Nv.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:_u(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function FE(t){return new Nv(t)}function Fv(t){this._context=t}Fv.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 GE(t){return new Fv(t)}function Gv(t,e){this._basis=new wu(t),this._beta=e}Gv.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 zE=function t(e){function n(r){return e===1?new wu(r):new Gv(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 $h(t,e){this._context=t,this._k=(1-e)/6}$h.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 OE=function t(e){function n(r){return new $h(r,e)}return n.tension=function(r){return t(+r)},n}(0);function Sh(t,e){this._context=t,this._k=(1-e)/6}Sh.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:$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 UE=function t(e){function n(r){return new Sh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function Ah(t,e){this._context=t,this._k=(1-e)/6}Ah.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 BE=function t(e){function n(r){return new Ah(r,e)}return n.tension=function(r){return t(+r)},n}(0);function Mh(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 l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*l+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*l+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function zv(t,e){this._context=t,this._alpha=e}zv.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:Mh(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 YE=function t(e){function n(r){return e?new zv(r,e):new $h(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Ov(t,e){this._context=t,this._alpha=e}Ov.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Mh(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 HE=function t(e){function n(r){return e?new Ov(r,e):new Sh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Uv(t,e){this._context=t,this._alpha=e}Uv.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:Mh(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 WE=function t(e){function n(r){return e?new Uv(r,e):new Ah(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Bv(t){this._context=t}Bv.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function VE(t){return new Bv(t)}function Yv(t){return t<0?-1:1}function Hv(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(Yv(o)+Yv(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Wv(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Dh(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:Dh(this,this._t0,Wv(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,Dh(this,Wv(this,n=Hv(this,t,e)),n);break;default:Dh(this,this._t0,n=Hv(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Vv(t){this._context=new jv(t)}(Vv.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 jE(t){return new Su(t)}function qE(t){return new Vv(t)}function qv(t){this._context=t}qv.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=Xv(t),i=Xv(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 Xv(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 XE(t){return new qv(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 ZE(t){return new Au(t,.5)}function KE(t){return new Au(t,0)}function QE(t){return new Au(t,1)}function ii(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 oi(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function JE(t,e){return t[e]}function tR(t){const e=[];return e.key=t,e}function eR(){var t=lt([]),e=oi,n=ii,r=JE;function i(o){var a=Array.from(t.apply(this,arguments),tR),s,u=a.length,l=-1,c;for(const f of o)for(s=0,++l;s<u;++s)(a[s][l]=[0,+r(f,a[s].key,l,o)]).data=f;for(s=0,c=mu(e(a));s<u;++s)a[c[s]].index=s;return n(a,c),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:lt(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:lt(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?oi:typeof o=="function"?o:lt(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??ii,i):n},i}function nR(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}ii(t,e)}}function rR(t,e){if((u=t.length)>0)for(var n,r=0,i,o,a,s,u,l=t[e[0]].length;r<l;++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 iR(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}ii(t,e)}}function oR(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,l=0;s<a;++s){for(var c=t[e[s]],f=c[r][1]||0,h=c[r-1][1]||0,p=(f-h)/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+=f,l+=p*f}i[r-1][1]+=i[r-1][0]=n,u&&(n-=l/u)}i[r-1][1]+=i[r-1][0]=n,ii(t,e)}}function Zv(t){var e=t.map(aR);return oi(t).sort(function(n,r){return e[n]-e[r]})}function aR(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 Kv(t){var e=t.map(Qv);return oi(t).sort(function(n,r){return e[n]-e[r]})}function Qv(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function sR(t){return Kv(t).reverse()}function uR(t){var e=t.length,n,r,i=t.map(Qv),o=Zv(t),a=0,s=0,u=[],l=[];for(n=0;n<e;++n)r=o[n],a<s?(a+=i[r],u.push(r)):(s+=i[r],l.push(r));return l.reverse().concat(u)}function lR(t){return oi(t).reverse()}const Mu=t=>()=>t;function cR(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 We(t,e,n){this.k=t,this.x=e,this.y=n}We.prototype={constructor:We,scale:function(t){return t===1?this:new We(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new We(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 Du=new We(1,0,0);Jv.prototype=We.prototype;function Jv(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Du;return t.__zoom}function Ph(t){t.stopImmediatePropagation()}function ko(t){t.preventDefault(),t.stopImmediatePropagation()}function fR(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function hR(){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 tx(){return this.__zoom||Du}function pR(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function dR(){return navigator.maxTouchPoints||"ontouchstart"in this}function gR(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 ex(){var t=fR,e=hR,n=gR,r=pR,i=dR,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=C0,l=Nn("start","zoom","end"),c,f,h,p=500,d=150,g=0,m=10;function y(A){A.property("__zoom",tx).on("wheel.zoom",$,{passive:!1}).on("mousedown.zoom",w).on("dblclick.zoom",P).filter(i).on("touchstart.zoom",S).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",R).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(A,C,T,O){var z=A.selection?A.selection():A;z.property("__zoom",tx),A!==z?_(A,C,T,O):z.interrupt().each(function(){M(this,arguments).event(O).start().zoom(null,typeof C=="function"?C.apply(this,arguments):C).end()})},y.scaleBy=function(A,C,T,O){y.scaleTo(A,function(){var z=this.__zoom.k,k=typeof C=="function"?C.apply(this,arguments):C;return z*k},T,O)},y.scaleTo=function(A,C,T,O){y.transform(A,function(){var z=e.apply(this,arguments),k=this.__zoom,E=T==null?b(z):typeof T=="function"?T.apply(this,arguments):T,L=k.invert(E),F=typeof C=="function"?C.apply(this,arguments):C;return n(x(v(k,F),E,L),z,a)},T,O)},y.translateBy=function(A,C,T,O){y.transform(A,function(){return n(this.__zoom.translate(typeof C=="function"?C.apply(this,arguments):C,typeof T=="function"?T.apply(this,arguments):T),e.apply(this,arguments),a)},null,O)},y.translateTo=function(A,C,T,O,z){y.transform(A,function(){var k=e.apply(this,arguments),E=this.__zoom,L=O==null?b(k):typeof O=="function"?O.apply(this,arguments):O;return n(Du.translate(L[0],L[1]).scale(E.k).translate(typeof C=="function"?-C.apply(this,arguments):-C,typeof T=="function"?-T.apply(this,arguments):-T),k,a)},O,z)};function v(A,C){return C=Math.max(o[0],Math.min(o[1],C)),C===A.k?A:new We(C,A.x,A.y)}function x(A,C,T){var O=C[0]-T[0]*A.k,z=C[1]-T[1]*A.k;return O===A.x&&z===A.y?A:new We(A.k,O,z)}function b(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function _(A,C,T,O){A.on("start.zoom",function(){M(this,arguments).event(O).start()}).on("interrupt.zoom end.zoom",function(){M(this,arguments).event(O).end()}).tween("zoom",function(){var z=this,k=arguments,E=M(z,k).event(O),L=e.apply(z,k),F=T==null?b(L):typeof T=="function"?T.apply(z,k):T,j=Math.max(L[1][0]-L[0][0],L[1][1]-L[0][1]),Q=z.__zoom,U=typeof C=="function"?C.apply(z,k):C,X=u(Q.invert(F).concat(j/Q.k),U.invert(F).concat(j/U.k));return function(B){if(B===1)B=U;else{var q=X(B),V=j/q[2];B=new We(V,F[0]-q[0]*V,F[1]-q[1]*V)}E.zoom(null,B)}})}function M(A,C,T){return!T&&A.__zooming||new D(A,C)}function D(A,C){this.that=A,this.args=C,this.active=0,this.sourceEvent=null,this.extent=e.apply(A,C),this.taps=0}D.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,C){return this.mouse&&A!=="mouse"&&(this.mouse[1]=C.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=C.invert(this.touch0[0])),this.touch1&&A!=="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(A){var C=Z(this.that).datum();l.call(A,this.that,new cR(A,{sourceEvent:this.sourceEvent,target:y,type:A,transform:this.that.__zoom,dispatch:l}),C)}};function $(A,...C){if(!t.apply(this,arguments))return;var T=M(this,C).event(A),O=this.__zoom,z=Math.max(o[0],Math.min(o[1],O.k*Math.pow(2,r.apply(this,arguments)))),k=ue(A);if(T.wheel)(T.mouse[0][0]!==k[0]||T.mouse[0][1]!==k[1])&&(T.mouse[1]=O.invert(T.mouse[0]=k)),clearTimeout(T.wheel);else{if(O.k===z)return;T.mouse=[k,O.invert(k)],Hn(this),T.start()}ko(A),T.wheel=setTimeout(E,d),T.zoom("mouse",n(x(v(O,z),T.mouse[0],T.mouse[1]),T.extent,a));function E(){T.wheel=null,T.end()}}function w(A,...C){if(h||!t.apply(this,arguments))return;var T=A.currentTarget,O=M(this,C,!0).event(A),z=Z(A.view).on("mousemove.zoom",F,!0).on("mouseup.zoom",j,!0),k=ue(A,T),E=A.clientX,L=A.clientY;La(A.view),Ph(A),O.mouse=[k,this.__zoom.invert(k)],Hn(this),O.start();function F(Q){if(ko(Q),!O.moved){var U=Q.clientX-E,X=Q.clientY-L;O.moved=U*U+X*X>g}O.event(Q).zoom("mouse",n(x(O.that.__zoom,O.mouse[0]=ue(Q,T),O.mouse[1]),O.extent,a))}function j(Q){z.on("mousemove.zoom mouseup.zoom",null),Ca(Q.view,O.moved),ko(Q),O.event(Q).end()}}function P(A,...C){if(t.apply(this,arguments)){var T=this.__zoom,O=ue(A.changedTouches?A.changedTouches[0]:A,this),z=T.invert(O),k=T.k*(A.shiftKey?.5:2),E=n(x(v(T,k),O,z),e.apply(this,C),a);ko(A),s>0?Z(this).transition().duration(s).call(_,E,O,A):Z(this).call(y.transform,E,O,A)}}function S(A,...C){if(t.apply(this,arguments)){var T=A.touches,O=T.length,z=M(this,C,A.changedTouches.length===O).event(A),k,E,L,F;for(Ph(A),E=0;E<O;++E)L=T[E],F=ue(L,this),F=[F,this.__zoom.invert(F),L.identifier],z.touch0?!z.touch1&&z.touch0[2]!==F[2]&&(z.touch1=F,z.taps=0):(z.touch0=F,k=!0,z.taps=1+!!c);c&&(c=clearTimeout(c)),k&&(z.taps<2&&(f=F[0],c=setTimeout(function(){c=null},p)),Hn(this),z.start())}}function N(A,...C){if(this.__zooming){var T=M(this,C).event(A),O=A.changedTouches,z=O.length,k,E,L,F;for(ko(A),k=0;k<z;++k)E=O[k],L=ue(E,this),T.touch0&&T.touch0[2]===E.identifier?T.touch0[0]=L:T.touch1&&T.touch1[2]===E.identifier&&(T.touch1[0]=L);if(E=T.that.__zoom,T.touch1){var j=T.touch0[0],Q=T.touch0[1],U=T.touch1[0],X=T.touch1[1],B=(B=U[0]-j[0])*B+(B=U[1]-j[1])*B,q=(q=X[0]-Q[0])*q+(q=X[1]-Q[1])*q;E=v(E,Math.sqrt(B/q)),L=[(j[0]+U[0])/2,(j[1]+U[1])/2],F=[(Q[0]+X[0])/2,(Q[1]+X[1])/2]}else if(T.touch0)L=T.touch0[0],F=T.touch0[1];else return;T.zoom("touch",n(x(E,L,F),T.extent,a))}}function R(A,...C){if(this.__zooming){var T=M(this,C).event(A),O=A.changedTouches,z=O.length,k,E;for(Ph(A),h&&clearTimeout(h),h=setTimeout(function(){h=null},p),k=0;k<z;++k)E=O[k],T.touch0&&T.touch0[2]===E.identifier?delete T.touch0:T.touch1&&T.touch1[2]===E.identifier&&delete T.touch1;if(T.touch1&&!T.touch0&&(T.touch0=T.touch1,delete T.touch1),T.touch0)T.touch0[1]=this.__zoom.invert(T.touch0[0]);else if(T.end(),T.taps===2&&(E=ue(E,this),Math.hypot(f[0]-E[0],f[1]-E[1])<m)){var L=Z(this).on("dblclick.zoom");L&&L.apply(this,arguments)}}}return y.wheelDelta=function(A){return arguments.length?(r=typeof A=="function"?A:Mu(+A),y):r},y.filter=function(A){return arguments.length?(t=typeof A=="function"?A:Mu(!!A),y):t},y.touchable=function(A){return arguments.length?(i=typeof A=="function"?A:Mu(!!A),y):i},y.extent=function(A){return arguments.length?(e=typeof A=="function"?A:Mu([[+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=l.on.apply(l,arguments);return A===l?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 Th=Object.freeze(Object.defineProperty({__proto__:null,Adder:Tt,Delaunay:zc,FormatSpecifier:cs,InternMap:Pi,InternSet:Rn,Node:tr,Path:Xi,Voronoi:vm,ZoomTransform:We,active:v4,arc:gu,area:bh,areaRadial:bv,ascending:_t,autoType:YD,axisBottom:f5,axisLeft:Rg,axisRight:c5,axisTop:Eg,bin:_g,bisect:En,bisectCenter:s3,bisectLeft:a3,bisectRight:ag,bisector:ma,blob:VD,blur:u3,blur2:sg,blurImage:l3,brush:E4,brushSelection:T4,brushX:L4,brushY:C4,buffer:qD,chord:k4,chordDirected:N4,chordTranspose:I4,cluster:aT,color:pn,contourDensity:uD,contours:kc,count:ba,create:V6,creator:Da,cross:m3,csv:KD,csvFormat:ED,csvFormatBody:RD,csvFormatRow:ID,csvFormatRows:kD,csvFormatValue:ND,csvParse:$m,csvParseRows:CD,cubehelix:De,cumsum:y3,curveBasis:NE,curveBasisClosed:FE,curveBasisOpen:GE,curveBumpX:xv,curveBumpY:_v,curveBundle:zE,curveCardinal:OE,curveCardinalClosed:UE,curveCardinalOpen:BE,curveCatmullRom:YE,curveCatmullRomClosed:HE,curveCatmullRomOpen:WE,curveLinear:yu,curveLinearClosed:VE,curveMonotoneX:jE,curveMonotoneY:qE,curveNatural:XE,curveStep:ZE,curveStepAfter:QE,curveStepBefore:KE,descending:ig,deviation:cg,difference:Q3,disjoint:J3,dispatch:Nn,drag:Wg,dragDisable:La,dragEnable:Ca,dsv:ZD,dsvFormat:as,easeBack:J0,easeBackIn:f4,easeBackInOut:J0,easeBackOut:h4,easeBounce:Vi,easeBounceIn:l4,easeBounceInOut:c4,easeBounceOut:Vi,easeCircle:Q0,easeCircleIn:JM,easeCircleInOut:Q0,easeCircleOut:t4,easeCubic:Wi,easeCubicIn:WM,easeCubicInOut:Wi,easeCubicOut:VM,easeElastic:ji,easeElasticIn:p4,easeElasticInOut:d4,easeElasticOut:ji,easeExp:K0,easeExpIn:KM,easeExpInOut:K0,easeExpOut:QM,easeLinear:BM,easePoly:j0,easePolyIn:jM,easePolyInOut:j0,easePolyOut:qM,easeQuad:V0,easeQuadIn:YM,easeQuadInOut:V0,easeQuadOut:HM,easeSin:Z0,easeSinIn:XM,easeSinInOut:Z0,easeSinOut:ZM,every:V3,extent:Di,fcumsum:v3,filter:q3,flatGroup:x3,flatRollup:_3,forceCenter:oP,forceCollide:Pm,forceLink:AP,forceManyBody:Em,forceRadial:RP,forceSimulation:Cm,forceX:Rm,forceY:km,get format(){return Ji},formatDefaultLocale:Bm,formatLocale:Um,get formatPrefix(){return Wc},formatSpecifier:Br,fsum:b3,geoAlbers:ny,geoAlbersUsa:G7,geoArea:YP,geoAzimuthalEqualArea:z7,geoAzimuthalEqualAreaRaw:Cf,geoAzimuthalEquidistant:O7,geoAzimuthalEquidistantRaw:Ef,geoBounds:jP,geoCentroid:JP,geoCircle:t7,geoClipAntimeridian:cf,geoClipCircle:S1,geoClipExtent:s7,geoClipRectangle:Es,geoConicConformal:B7,geoConicConformalRaw:oy,geoConicEqualArea:Hs,geoConicEqualAreaRaw:ey,geoConicEquidistant:H7,geoConicEquidistantRaw:ay,geoContains:d7,geoDistance:Is,geoEqualEarth:V7,geoEqualEarthRaw:Rf,geoEquirectangular:Y7,geoEquirectangularRaw:mo,geoGnomonic:j7,geoGnomonicRaw:kf,geoGraticule:k1,geoGraticule10:g7,geoIdentity:q7,geoInterpolate:m7,geoLength:A1,geoMercator:U7,geoMercatorRaw:go,geoNaturalEarth1:X7,geoNaturalEarth1Raw:If,geoOrthographic:Z7,geoOrthographicRaw:Nf,geoPath:P7,geoProjection:Be,geoProjectionMutator:Tf,geoRotation:m1,geoStereographic:K7,geoStereographicRaw:Ff,geoStream:Te,geoTransform:T7,geoTransverseMercator:Q7,geoTransverseMercatorRaw:Gf,gray:h8,greatest:wg,greatestIndex:U3,group:dg,groupSort:S3,groups:gg,hcl:za,hierarchy:js,histogram:_g,hsl:Ia,html:rP,image:JD,index:w3,indexes:$3,interpolate:qe,interpolateArray:b8,interpolateBasis:m0,interpolateBasisClosed:y0,interpolateBlues:HC,interpolateBrBG:$C,interpolateBuGn:EC,interpolateBuPu:RC,interpolateCividis:ZC,interpolateCool:JC,interpolateCubehelix:R8,interpolateCubehelixDefault:KC,interpolateCubehelixLong:Wa,interpolateDate:$0,interpolateDiscrete:_8,interpolateGnBu:kC,interpolateGreens:WC,interpolateGreys:VC,interpolateHcl:C8,interpolateHclLong:E8,interpolateHsl:P8,interpolateHslLong:T8,interpolateHue:w8,interpolateInferno:sE,interpolateLab:L8,interpolateMagma:aE,interpolateNumber:de,interpolateNumberArray:oc,interpolateObject:S0,interpolateOrRd:IC,interpolateOranges:XC,interpolatePRGn:SC,interpolatePiYG:AC,interpolatePlasma:uE,interpolatePuBu:FC,interpolatePuBuGn:NC,interpolatePuOr:MC,interpolatePuRd:GC,interpolatePurples:jC,interpolateRainbow:tE,interpolateRdBu:DC,interpolateRdGy:PC,interpolateRdPu:zC,interpolateRdYlBu:TC,interpolateRdYlGn:LC,interpolateReds:qC,interpolateRgb:Gi,interpolateRgbBasis:x0,interpolateRgbBasisClosed:y8,interpolateRound:Ya,interpolateSinebow:rE,interpolateSpectral:CC,interpolateString:uc,interpolateTransformCss:P0,interpolateTransformSvg:T0,interpolateTurbo:iE,interpolateViridis:oE,interpolateWarm:QC,interpolateYlGn:UC,interpolateYlGnBu:OC,interpolateYlOrBr:BC,interpolateYlOrRd:YC,interpolateZoom:C0,interrupt:Hn,intersection:t5,interval:G8,isoFormat:nC,isoParse:oC,json:eP,lab:Ga,lch:p8,least:O3,leastIndex:Ag,line:bu,lineRadial:yv,link:vu,linkHorizontal:SE,linkRadial:ME,linkVertical:AE,local:Yg,map:X3,matcher:Hl,max:Ti,maxIndex:Fl,mean:E3,median:R3,medianIndex:k3,merge:zl,min:_a,minIndex:Gl,mode:N3,namespace:Ri,namespaces:Bl,nice:Il,now:Yi,pack:NT,packEnclose:LT,packSiblings:kT,pairs:F3,partition:FT,path:Rc,pathRound:z4,permute:xg,pie:dv,piecewise:I0,pointRadial:Ro,pointer:ue,pointers:q6,polygonArea:QT,polygonCentroid:JT,polygonContains:r9,polygonHull:n9,polygonLength:i9,precisionFixed:Ym,precisionPrefix:Hm,precisionRound:Wm,quadtree:us,quantile:Ci,quantileIndex:Sg,quantileSorted:$g,quantize:k8,quickselect:wa,radialArea:bv,radialLine:yv,randomBates:u9,randomBernoulli:f9,randomBeta:Py,randomBinomial:Ty,randomCauchy:p9,randomExponential:l9,randomGamma:qf,randomGeometric:Dy,randomInt:a9,randomIrwinHall:My,randomLcg:b9,randomLogNormal:s9,randomLogistic:d9,randomNormal:jf,randomPareto:c9,randomPoisson:g9,randomUniform:o9,randomWeibull:h9,range:fn,rank:z3,reduce:Z3,reverse:K3,rgb:Lr,ribbon:j4,ribbonArrow:q4,rollup:yg,rollups:bg,scaleBand:Kf,scaleDiverging:Ib,scaleDivergingLog:Nb,scaleDivergingPow:gh,scaleDivergingSqrt:fC,scaleDivergingSymlog:Fb,scaleIdentity:ky,scaleImplicit:Xf,scaleLinear:So,scaleLog:zy,scaleOrdinal:Zf,scalePoint:Qf,scalePow:Kr,scaleQuantile:Vy,scaleQuantize:jy,scaleRadial:Wy,scaleSequential:Cb,scaleSequentialLog:Eb,scaleSequentialPow:dh,scaleSequentialQuantile:kb,scaleSequentialSqrt:cC,scaleSequentialSymlog:Rb,scaleSqrt:L9,scaleSymlog:By,scaleThreshold:qy,scaleTime:uC,scaleUtc:lC,scan:B3,schemeAccent:pC,schemeBlues:ov,schemeBrBG:Gb,schemeBuGn:jb,schemeBuPu:qb,schemeCategory10:hC,schemeDark2:dC,schemeGnBu:Xb,schemeGreens:av,schemeGreys:sv,schemeObservable10:gC,schemeOrRd:Zb,schemeOranges:cv,schemePRGn:zb,schemePaired:mC,schemePastel1:yC,schemePastel2:bC,schemePiYG:Ob,schemePuBu:Qb,schemePuBuGn:Kb,schemePuOr:Ub,schemePuRd:Jb,schemePurples:uv,schemeRdBu:Bb,schemeRdGy:Yb,schemeRdPu:tv,schemeRdYlBu:Hb,schemeRdYlGn:Wb,schemeReds:lv,schemeSet1:vC,schemeSet2:xC,schemeSet3:_C,schemeSpectral:Vb,schemeTableau10:wC,schemeYlGn:nv,schemeYlGnBu:ev,schemeYlOrBr:rv,schemeYlOrRd:iv,select:Z,selectAll:X6,selection:Gn,selector:Pa,selectorAll:Yl,shuffle:Y3,shuffler:Mg,some:j3,sort:El,stack:eR,stackOffsetDiverging:rR,stackOffsetExpand:nR,stackOffsetNone:ii,stackOffsetSilhouette:iR,stackOffsetWiggle:oR,stackOrderAppearance:Zv,stackOrderAscending:Kv,stackOrderDescending:sR,stackOrderInsideOut:uR,stackOrderNone:oi,stackOrderReverse:lR,stratify:UT,style:Fn,subset:n5,sum:Dg,superset:Tg,svg:iP,symbol:IE,symbolAsterisk:wv,symbolCircle:xu,symbolCross:$v,symbolDiamond:Av,symbolDiamond2:Mv,symbolPlus:Dv,symbolSquare:Pv,symbolSquare2:Tv,symbolStar:Cv,symbolTimes:wh,symbolTriangle:Ev,symbolTriangle2:Rv,symbolWye:kv,symbolX:wh,symbols:Iv,symbolsFill:Iv,symbolsStroke:kE,text:ss,thresholdFreedmanDiaconis:L3,thresholdScott:C3,thresholdSturges:Nl,tickFormat:Ry,tickIncrement:In,tickStep:xa,ticks:kn,timeDay:Jr,timeDays:N9,get timeFormat(){return fh},timeFormatDefaultLocale:Tb,timeFormatLocale:pb,timeFriday:tb,timeFridays:Y9,timeHour:ru,timeHours:k9,timeInterval:Pt,timeMillisecond:Qr,timeMilliseconds:Xy,timeMinute:eu,timeMinutes:E9,timeMonday:Mo,timeMondays:z9,timeMonth:ou,timeMonths:K9,get timeParse(){return Pb},timeSaturday:eb,timeSaturdays:H9,timeSecond:sn,timeSeconds:Ky,timeSunday:ti,timeSundays:nb,timeThursday:rr,timeThursdays:B9,timeTickInterval:hb,timeTicks:fb,timeTuesday:Qy,timeTuesdays:O9,timeWednesday:Jy,timeWednesdays:U9,timeWeek:ti,timeWeeks:nb,timeYear:Ye,timeYears:J9,timeout:fc,timer:Xa,timerFlush:G0,transition:H0,transpose:Pg,tree:qT,treemap:Sy,treemapBinary:XT,treemapDice:wo,treemapResquarify:KT,treemapSlice:Qs,treemapSliceDice:ZT,treemapSquarify:Vf,tsv:QD,tsvFormat:GD,tsvFormatBody:zD,tsvFormatRow:UD,tsvFormatRows:OD,tsvFormatValue:BD,tsvParse:Sm,tsvParseRows:FD,union:r5,unixDay:uh,unixDays:G9,utcDay:Ao,utcDays:F9,get utcFormat(){return su},utcFriday:ob,utcFridays:X9,utcHour:iu,utcHours:I9,utcMillisecond:Qr,utcMilliseconds:Xy,utcMinute:nu,utcMinutes:R9,utcMonday:Do,utcMondays:W9,utcMonth:au,utcMonths:Q9,get utcParse(){return hh},utcSaturday:ab,utcSaturdays:Z9,utcSecond:sn,utcSeconds:Ky,utcSunday:ei,utcSundays:sb,utcThursday:or,utcThursdays:q9,utcTickInterval:cb,utcTicks:lb,utcTuesday:rb,utcTuesdays:V9,utcWednesday:ib,utcWednesdays:j9,utcWeek:ei,utcWeeks:sb,utcYear:He,utcYears:tL,variance:lg,window:Wl,xml:nP,zip:W3,zoom:ex,zoomIdentity:Du,zoomTransform:Jv},Symbol.toStringTag,{value:"Module"}));function nx(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function mR(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 Io(t){return t.substring(0,4)!=="ease"?Wi:Th[t]??Wi}function Pu({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=So().domain([0,1]).range([0,t/2]),a=o(n);return gu().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const Lh=(t,e)=>e instanceof Function?e(t):Ji(e)(t);function rx(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 yR(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 bR(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return yR(e)}function Ct(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 Tu({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 at(t,e,n){const r=n?`--${n}`:"";return`orbcharts-${t}__${e}${r}`}function $n(t,e){const r=Math.random().toString(36).substr(2,5);return at(t,e,r)}function Ch(t,e){let n=new dt(()=>{});return t.each(function(){const r=Ku(this,e);n=Qu(n,r)}),n}const ar=({selection:t,pluginName:e,clipPathID:n,seriesLabels$:r,gridContainerPosition$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=at(e,"series"),u=at(e,"axes"),l=at(e,"graphic"),c=r.pipe(G((d,g)=>t.selectAll(`g.${s}`).data(d,m=>m).join(m=>m.append("g").classed(s,!0).each((y,v,x)=>{Z(x[v]).selectAll(`g.${u}`).data([v]).join(b=>b.append("g").classed(u,!0).attr("clip-path",`url(#${n})`).each((_,M,D)=>{Z(D[M]).selectAll("defs").data([M]).join("defs"),Z(D[M]).selectAll("g").data([M]).join("g").classed(l,!0)}),b=>b,b=>b.remove())}),m=>m,m=>m.remove())),St(1));Y({seriesSelection:c,gridContainerPosition:i}).pipe(H(async d=>d)).subscribe(d=>{d.seriesSelection.transition().attr("transform",(g,m)=>{const y=d.gridContainerPosition[m]??d.gridContainerPosition[0],v=y.translate,x=y.scale;return`translate(${v[0]}, ${v[1]}) scale(${x[0]}, ${x[1]})`})});const f=Y({seriesSelection:c,gridAxesTransform:o}).pipe(H(async d=>d),G(d=>d.seriesSelection.select(`g.${u}`).style("transform",d.gridAxesTransform.value)),St(1)),h=f.pipe(G(d=>d.select("defs")),St(1)),p=Y({axesSelection:f,gridGraphicTransform:a}).pipe(H(async d=>d),G(d=>{const g=d.axesSelection.select(`g.${l}`);return g.transition().duration(50).style("transform",d.gridGraphicTransform.value),g}),St(1));return{seriesSelection$:c,axesSelection$:f,defsSelection$:h,graphicGSelection$:p}},ix=({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r,gridContainerPosition$:i,layout$:o})=>{const a=new nt,s=Y({fullDataFormatter:t,gridAxesSize:e,computedData:n}).pipe(H(async h=>h),G(h=>{const d=h.computedData[0]?h.computedData[0].length-1:0,g=h.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-h.fullDataFormatter.grid.groupAxis.scalePadding:h.fullDataFormatter.grid.groupAxis.scaleDomain[0]-h.fullDataFormatter.grid.groupAxis.scalePadding,m=h.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?d+h.fullDataFormatter.grid.groupAxis.scalePadding:h.fullDataFormatter.grid.groupAxis.scaleDomain[1]+h.fullDataFormatter.grid.groupAxis.scalePadding;return[g,m]}),St(1)),u=Y({fullDataFormatter:t,computedData:n}).pipe(H(async h=>h),G(h=>h.fullDataFormatter.grid.seriesDirection==="row"?(h.computedData[0]??[]).map(p=>p.groupLabel):h.computedData.map(p=>p[0].groupLabel))),l=Y({groupScaleDomain:s,groupLabels:u}).pipe(H(async h=>h),G(h=>h.groupLabels.filter((p,d)=>d>=h.groupScaleDomain[0]&&d<=h.groupScaleDomain[1]))),c=i.pipe(G(h=>h.reduce((d,g)=>g.columnIndex>d?g.columnIndex:d,0)+1),tt()),f=i.pipe(G(h=>h.reduce((d,g)=>g.rowIndex>d?g.rowIndex:d,0)+1),tt());return new dt(h=>{Y({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:l,groupScaleDomain:s,columnAmount:c,rowAmount:f,layout:o}).pipe(I(a),H(async p=>p)).subscribe(p=>{const d=p.dataFormatter.grid.valueAxis.position==="right"||p.dataFormatter.grid.valueAxis.position==="bottom",g=eg({axisLabels:p.scaleRangeGroupLabels,axisWidth:p.axisSize.width,reverse:d}),m=v=>p.dataFormatter.grid.groupAxis.position==="bottom"||p.dataFormatter.grid.groupAxis.position==="top"?v.offsetX-p.fullChartParams.padding.left:v.offsetY-p.fullChartParams.padding.top,y=v=>{const x={offsetX:v.offsetX*p.columnAmount%p.layout.rootWidth,offsetY:v.offsetY*p.rowAmount%p.layout.rootHeight},b=m(x),_=g(b),M=Math.ceil(p.groupScaleDomain[0]),D=_+M;return{groupIndex:D,groupLabel:p.scaleRangeGroupLabels[D]??""}};return h.next(y),function(){a.next(void 0)}})})},vR=({rootSelection:t,fullDataFormatter$:e,gridAxesSize$:n,computedData$:r,fullChartParams$:i,gridContainerPosition$:o,layout$:a})=>{const s=Ch(t,"mousemove"),u=Y({fullDataFormatter:e,gridAxesSize:n,computedData:r}).pipe(H(async v=>v),G(v=>{const b=v.computedData[0]?v.computedData[0].length-1:0,_=v.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-v.fullDataFormatter.grid.groupAxis.scalePadding:v.fullDataFormatter.grid.groupAxis.scaleDomain[0]-v.fullDataFormatter.grid.groupAxis.scalePadding,M=v.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?b+v.fullDataFormatter.grid.groupAxis.scalePadding:v.fullDataFormatter.grid.groupAxis.scaleDomain[1]+v.fullDataFormatter.grid.groupAxis.scalePadding;return[_,M]}),St(1)),l=Y({fullDataFormatter:e,computedData:r}).pipe(H(async v=>v),G(v=>v.fullDataFormatter.grid.seriesDirection==="row"?(v.computedData[0]??[]).map(x=>x.groupLabel):v.computedData.map(x=>x[0].groupLabel))),c=Y({groupScaleDomain:u,groupLabels:l}).pipe(H(async v=>v),G(v=>v.groupLabels.filter((x,b)=>b>=v.groupScaleDomain[0]&&b<=v.groupScaleDomain[1]))),f=e.pipe(G(v=>v.grid.valueAxis.position==="right"||v.grid.valueAxis.position==="bottom")),h=Y({reverse:f,gridAxesSize:n,scaleRangeGroupLabels:c}).pipe(H(async v=>v),G(v=>eg({axisLabels:v.scaleRangeGroupLabels,axisWidth:v.gridAxesSize.width,reverse:v.reverse}))),p=o.pipe(G(v=>v.reduce((b,_)=>_.columnIndex>b?_.columnIndex:b,0)+1),tt()),d=o.pipe(G(v=>v.reduce((b,_)=>_.rowIndex>b?_.rowIndex:b,0)+1),tt()),g=Y({fullDataFormatter:e,fullChartParams:i,rootMousemove:s,columnAmount:p,rowAmount:d,layout:a}).pipe(H(async v=>v),G(v=>{const x={offsetX:v.rootMousemove.offsetX*v.columnAmount%v.layout.rootWidth,offsetY:v.rootMousemove.offsetY*v.rowAmount%v.layout.rootHeight};return v.fullDataFormatter.grid.groupAxis.position==="bottom"||v.fullDataFormatter.grid.groupAxis.position==="top"?x.offsetX-v.fullChartParams.padding.left:x.offsetY-v.fullChartParams.padding.top})),m=Y({xIndexScale:h,axisValue:g,groupScaleDomain:u}).pipe(H(async v=>v),G(v=>{const x=v.xIndexScale(v.axisValue),b=Math.ceil(v.groupScaleDomain[0]);return x+b})),y=Y({groupIndex:m,groupLabels:l}).pipe(H(async v=>v),G(v=>v.groupLabels[v.groupIndex]??""));return Y({groupIndex:m,groupLabel:y}).pipe(H(async v=>v),G(v=>({groupIndex:v.groupIndex,groupLabel:v.groupLabel})))};function xR(t="curveLinear"){return bu().x(e=>e.axisX).y(e=>e.axisY).curve(Th[t])}function _R(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 wR({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 $R({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 SR({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(Io(r)).tween("tween",(l,c,f)=>h=>{const p=l.width*h;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 ox=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullDataFormatter$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,allContainerPosition$:y,layout$:v,event$:x})=>{const b=new nt,_=$n(t,"clipPath-box"),M=at(t,"path"),{seriesSelection$:D,axesSelection$:$,defsSelection$:w,graphicGSelection$:P}=ar({selection:e,pluginName:t,clipPathID:_,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:p}),S=new dt(z=>{const k=l.pipe(I(b)).subscribe(E=>{if(!E)return;const L=xR(E.lineCurve);z.next(L)});return()=>{k.unsubscribe()}}),N=f.pipe(G(z=>z.transitionDuration),tt()),R=f.pipe(G(z=>z.transitionEase),tt());Y({defsSelection:w,seriesLabels:a,axisSize:d,transitionDuration:N,transitionEase:R}).pipe(I(b),H(async z=>z)).subscribe(z=>{const E=[{id:_,width:z.axisSize.width,height:z.axisSize.height}].concat(z.seriesLabels.map(L=>({id:`orbcharts__clipPath_${L}`,width:z.axisSize.width,height:z.axisSize.height})));SR({defsSelection:z.defsSelection,clipPathData:E,transitionDuration:z.transitionDuration,transitionEase:z.transitionEase})});const A=n.pipe(G(z=>{const k=new Map;return z.flat().forEach(E=>k.set(E.id,E)),k})),C=ix({fullDataFormatter$:c,gridAxesSize$:d,computedData$:n,fullChartParams$:f,gridContainerPosition$:y,layout$:v}),T=f.pipe(I(b),G(z=>z.highlightTarget),tt()),O=Y({graphicGSelection:P,visibleComputedLayoutData:o,linePath:S,params:l}).pipe(I(b),H(async z=>z),G(z=>{let k=[];return z.graphicGSelection.each((E,L,F)=>{const j=_R(z.visibleComputedLayoutData[L]??[]);k[L]=wR({selection:Z(F[L]),pathClassName:M,linePath:z.linePath,segmentData:j,params:z.params})}),k}));return Y({pathSelectionArr:O,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:T,gridGroupPositionFn:C}).pipe(I(b),H(async z=>z)).subscribe(z=>{z.pathSelectionArr.forEach(k=>{k.on("mouseover",(E,L)=>{E.stopPropagation();const F=L[0]?L[0].seriesLabel:"",{groupIndex:j,groupLabel:Q}=z.gridGroupPositionFn(E),B=z.GroupDataMap.get(Q).find(q=>q.seriesLabel===F)??L[0];x.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:z.highlightTarget,datum:B,gridIndex:B.gridIndex,series:z.SeriesDataMap.get(B.seriesLabel),seriesIndex:B.seriesIndex,seriesLabel:B.seriesLabel,groups:z.GroupDataMap.get(B.groupLabel),groupIndex:B.groupIndex,groupLabel:B.groupLabel,event:E,data:z.computedData})}).on("mousemove",(E,L)=>{E.stopPropagation();const F=L[0]?L[0].seriesLabel:"",{groupIndex:j,groupLabel:Q}=z.gridGroupPositionFn(E),B=z.GroupDataMap.get(Q).find(q=>q.seriesLabel===F)??L[0];x.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:z.highlightTarget,datum:B,gridIndex:B.gridIndex,series:z.SeriesDataMap.get(B.seriesLabel),seriesIndex:B.seriesIndex,seriesLabel:B.seriesLabel,groups:z.GroupDataMap.get(B.groupLabel),groupIndex:B.groupIndex,groupLabel:B.groupLabel,event:E,data:z.computedData})}).on("mouseout",(E,L)=>{E.stopPropagation();const F=L[0]?L[0].seriesLabel:"",{groupIndex:j,groupLabel:Q}=z.gridGroupPositionFn(E),B=z.GroupDataMap.get(Q).find(q=>q.seriesLabel===F)??L[0];x.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:z.highlightTarget,datum:B,gridIndex:B.gridIndex,series:z.SeriesDataMap.get(B.seriesLabel),seriesIndex:B.seriesIndex,seriesLabel:B.seriesLabel,groups:z.GroupDataMap.get(B.groupLabel),groupIndex:B.groupIndex,groupLabel:B.groupLabel,event:E,data:z.computedData})}).on("click",(E,L)=>{E.stopPropagation();const F=L[0]?L[0].seriesLabel:"",{groupIndex:j,groupLabel:Q}=z.gridGroupPositionFn(E),B=z.GroupDataMap.get(Q).find(q=>q.seriesLabel===F)??L[0];x.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:z.highlightTarget,datum:B,gridIndex:B.gridIndex,series:z.SeriesDataMap.get(B.seriesLabel),seriesIndex:B.seriesIndex,seriesLabel:B.seriesLabel,groups:z.GroupDataMap.get(B.groupLabel),groupIndex:B.groupIndex,groupLabel:B.groupLabel,event:E,data:z.computedData})})})}),f.pipe(I(b),li(z=>z.highlightTarget==="series"),H(z=>Y({graphicGSelection:P,gridHighlight:g,DataMap:A,fullChartParams:f}).pipe(I(b),H(async k=>k)))).subscribe(z=>{const k=z.gridHighlight[0]?z.gridHighlight[0].seriesLabel:null;$R({selection:z.graphicGSelection,seriesLabel:k,fullChartParams:z.fullChartParams})}),()=>{b.next(void 0)}},ax="Lines",AR=se(ax,ur)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new nt,a=ox(ax,{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$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,allContainerPosition$:r.gridContainerPosition$,layout$:r.layout$,event$:i.event$});return()=>{o.next(void 0),a()}});function MR(t="curveLinear",e){return bh().x(n=>n.axisX).y0(n=>e).y1(n=>n.axisY).curve(Th[t])}function DR(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 PR({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 TR({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 LR({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 BR({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)=>{X(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(ko(r)).tween("tween",(l,c,f)=>h=>{const p=l.width*h;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 f2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullDataFormatter$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,layout$:b,event$:x})=>{const v=new et,y=$n(t,"clipPath-box"),w=at(t,"path"),{seriesSelection$:D,axesSelection$:P,defsSelection$:S,graphicGSelection$:_}=ar({selection:e,pluginName:t,clipPathID:y,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:p}),T=p.pipe(I(v),O(C=>-C.translate[1]/C.scale[1])),$=new pt(C=>{const k=B({fullParams:l,valueAxisStart:T}).pipe(I(v)).subscribe(E=>{const G=FR(E.fullParams.lineCurve,E.valueAxisStart);C.next(G)});return()=>{k.unsubscribe()}}),N=f.pipe(O(C=>C.transitionDuration),rt()),R=f.pipe(O(C=>C.transitionEase),rt());B({defsSelection:S,seriesLabels:a,axisSize:d,transitionDuration:N,transitionEase:R}).pipe(I(v),Y(async C=>C)).subscribe(C=>{const E=[{id:y,width:C.axisSize.width,height:C.axisSize.height}].concat(C.seriesLabels.map(G=>({id:`orbcharts__clipPath_${G}`,width:C.axisSize.width,height:C.axisSize.height})));BR({defsSelection:C.defsSelection,clipPathData:E,transitionDuration:C.transitionDuration,transitionEase:C.transitionEase})});const A=n.pipe(O(C=>{const k=new Map;return C.flat().forEach(E=>k.set(E.id,E)),k})),L=Eh({fullDataFormatter$:c,gridAxesSize$:d,computedData$:n,fullChartParams$:f}),M=f.pipe(I(v),O(C=>C.highlightTarget),rt()),z=a.pipe(I(v),O(C=>C.map((k,E)=>$n(t,`lineargradient-${k}`)))),U=B({graphicGSelection:_,defsSelection:S,visibleComputedLayoutData:o,linearGradientIds:z,areaPath:$,params:l}).pipe(I(v),Y(async C=>C),O(C=>{let k=[];return C.graphicGSelection.each((E,G,j)=>{const Q=GR(C.visibleComputedLayoutData[G]??[]);k[G]=zR({selection:X(j[G]),pathClassName:w,areaPath:C.areaPath,segmentData:Q,linearGradientIds:C.linearGradientIds,params:C.params}),UR({defsSelection:C.defsSelection,computedData:C.visibleComputedLayoutData,linearGradientIds:C.linearGradientIds,params:C.params})}),k}));return B({pathSelectionArr:U,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:M,gridGroupPositionFn:L}).pipe(I(v),Y(async C=>C)).subscribe(C=>{C.pathSelectionArr.forEach(k=>{k.on("mouseover",(E,G)=>{const j=G[0]?G[0].seriesLabel:"",{groupIndex:Q,groupLabel:F}=C.gridGroupPositionFn(E),K=C.GroupDataMap.get(F).find(W=>W.seriesLabel===j)??G[0];x.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:C.highlightTarget,datum:K,gridIndex:K.gridIndex,series:C.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,groups:C.GroupDataMap.get(K.groupLabel),groupIndex:K.groupIndex,groupLabel:K.groupLabel,event:E,data:C.computedData})}).on("mousemove",(E,G)=>{const j=G[0]?G[0].seriesLabel:"",{groupIndex:Q,groupLabel:F}=C.gridGroupPositionFn(E),K=C.GroupDataMap.get(F).find(W=>W.seriesLabel===j)??G[0];x.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:C.highlightTarget,datum:K,gridIndex:K.gridIndex,series:C.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,groups:C.GroupDataMap.get(K.groupLabel),groupIndex:K.groupIndex,groupLabel:K.groupLabel,event:E,data:C.computedData})}).on("mouseout",(E,G)=>{const j=G[0]?G[0].seriesLabel:"",{groupIndex:Q,groupLabel:F}=C.gridGroupPositionFn(E),K=C.GroupDataMap.get(F).find(W=>W.seriesLabel===j)??G[0];x.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:C.highlightTarget,datum:K,gridIndex:K.gridIndex,series:C.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,groups:C.GroupDataMap.get(K.groupLabel),groupIndex:K.groupIndex,groupLabel:K.groupLabel,event:E,data:C.computedData})}).on("click",(E,G)=>{const j=G[0]?G[0].seriesLabel:"",{groupIndex:Q,groupLabel:F}=C.gridGroupPositionFn(E),K=C.GroupDataMap.get(F).find(W=>W.seriesLabel===j)??G[0];x.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:C.highlightTarget,datum:K,gridIndex:K.gridIndex,series:C.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,groups:C.GroupDataMap.get(K.groupLabel),groupIndex:K.groupIndex,groupLabel:K.groupLabel,event:E,data:C.computedData})})})}),f.pipe(I(v),li(C=>C.highlightTarget==="series"),Y(C=>B({graphicGSelection:_,gridHighlight:g,DataMap:A,fullChartParams:f}).pipe(I(v),Y(async k=>k)))).subscribe(C=>{const k=C.gridHighlight[0]?C.gridHighlight[0].seriesLabel:null;OR({selection:C.graphicGSelection,seriesLabel:k,fullChartParams:C.fullChartParams})}),()=>{v.next(void 0)}},h2="LineAreas",YR=se(h2,ap)(({selection:t,name:e,observer:n,subject:r})=>{const i=new et,o=f2(h2,{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()}}),p2=.3;function d2({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 HR(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Jf().domain(e).range([-i/2+r,i/2-r])}function WR(t,e){return t<=1?0:e/(t-1)*p2}function VR(t,e){return t<=1?e:e*(1-p2)}function jR({graphicGSelection:t,rectClassName:e,visibleComputedLayoutData:n,zeroYArr:r,groupLabels:i,barScale:o,params:a,chartParams:s,barWidth:u,transformedBarRadius:l,delayGroup:c,transitionItem:f,isSeriesSeprate:h}){const p=u/2;return t.each((g,m,b)=>{X(b[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=>h?0:o(x.seriesLabel)).attr("width",u).attr("rx",l[m][0]??1).attr("ry",l[m][1]??1).transition().duration(f).ease(ko(s.transitionEase)).delay((x,v)=>x.groupIndex*c).attr("height",x=>Math.abs(x.axisYFromZero))}),t.selectAll(`rect.${e}`)}function qR({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)=>{X(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 XR({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?X(o[i]).style("opacity",1):X(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const Rh=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullChartParams$:c,gridAxesTransform$:f,gridGraphicTransform$:h,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,isSeriesSeprate$:b,event$:x})=>{const v=new et,y=$n(t,"clipPath-box"),w=at(t,"rect"),{seriesSelection$:D,axesSelection$:P,defsSelection$:S,graphicGSelection$:_}=ar({selection:e,pluginName:t,clipPathID:y,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:h}),T=o.pipe(I(v),O(k=>k.map(E=>E[0]?E[0].axisY-E[0].axisYFromZero:0)),rt()),$=B({computedData:n,visibleComputedData:i,params:l,gridAxesSize:d,isSeriesSeprate:b}).pipe(I(v),Y(async k=>k),O(k=>k.params.barWidth?k.params.barWidth:k.isSeriesSeprate?d2({axisWidth:k.gridAxesSize.width,groupAmount:k.computedData[0]?k.computedData[0].length:0,barAmountOfGroup:1,barPadding:k.params.barPadding,barGroupPadding:k.params.barGroupPadding}):d2({axisWidth:k.gridAxesSize.width,groupAmount:k.computedData[0]?k.computedData[0].length:0,barAmountOfGroup:k.visibleComputedData.length,barPadding:k.params.barPadding,barGroupPadding:k.params.barGroupPadding})),rt()),N=B({computedData:n,barWidth:$,params:l,gridGraphicReverseScale:p}).pipe(I(v),Y(async k=>k),O(k=>{const E=k.barWidth/2,G=k.params.barRadius===!0?E:k.params.barRadius===!1?0:typeof k.params.barRadius=="number"?k.params.barRadius:0;return k.computedData.map((j,Q)=>{const F=k.gridGraphicReverseScale[Q]??k.gridGraphicReverseScale[0];let q=G*F[0],V=G*F[1];if(q>E){const K=E/q;q=q*K,V=V*K}return[q,V]})})),R=i.pipe(I(v),O(k=>{const E=new Set;return k.forEach(G=>{G.forEach(j=>{E.add(j.groupLabel)})}),Array.from(E)})),A=B({seriesLabels:a,barWidth:$,params:l}).pipe(I(v),Y(async k=>k),O(k=>HR(k.barWidth,k.seriesLabels,k.params))),L=c.pipe(I(v),O(k=>k.transitionDuration),rt()),M=new pt(k=>{B({groupLabels:R,transitionDuration:L}).pipe(Y(async E=>E)).subscribe(E=>{const G=WR(E.groupLabels.length,E.transitionDuration);k.next(G)})}).pipe(I(v),rt()),z=new pt(k=>{B({groupLabels:R,transitionDuration:L}).pipe(Y(async E=>E)).subscribe(E=>{const G=VR(E.groupLabels.length,E.transitionDuration);k.next(G)})}).pipe(I(v),rt());B({defsSelection:S,gridAxesSize:d}).pipe(I(v),Y(async k=>k)).subscribe(k=>{const E=[{id:y,width:k.gridAxesSize.width,height:k.gridAxesSize.height}];qR({defsSelection:k.defsSelection,clipPathData:E})});const U=c.pipe(I(v),O(k=>k.highlightTarget),rt()),C=B({graphicGSelection:_,visibleComputedLayoutData:o,zeroYArr:T,groupLabels:R,barScale:A,params:l,chartParams:c,highlightTarget:U,barWidth:$,transformedBarRadius:N,delayGroup:M,transitionItem:z,isSeriesSeprate:b}).pipe(I(v),Y(async k=>k),O(k=>jR({graphicGSelection:k.graphicGSelection,rectClassName:w,visibleComputedLayoutData:k.visibleComputedLayoutData,zeroYArr:k.zeroYArr,groupLabels:k.groupLabels,barScale:k.barScale,params:k.params,chartParams:k.chartParams,barWidth:k.barWidth,transformedBarRadius:k.transformedBarRadius,delayGroup:k.delayGroup,transitionItem:k.transitionItem,isSeriesSeprate:k.isSeriesSeprate})));return B({barSelection:C,computedData:n,highlightTarget:U,SeriesDataMap:s,GroupDataMap:u}).pipe(I(v),Y(async k=>k)).subscribe(k=>{k.barSelection.on("mouseover",(E,G)=>{E.stopPropagation(),x.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:k.highlightTarget,datum:G,gridIndex:G.gridIndex,series:k.SeriesDataMap.get(G.seriesLabel),seriesIndex:G.seriesIndex,seriesLabel:G.seriesLabel,groups:k.GroupDataMap.get(G.groupLabel),groupIndex:G.groupIndex,groupLabel:G.groupLabel,event:E,data:k.computedData})}).on("mousemove",(E,G)=>{E.stopPropagation(),x.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:k.highlightTarget,datum:G,gridIndex:G.gridIndex,series:k.SeriesDataMap.get(G.seriesLabel),seriesIndex:G.seriesIndex,seriesLabel:G.seriesLabel,groups:k.GroupDataMap.get(G.groupLabel),groupIndex:G.groupIndex,groupLabel:G.groupLabel,event:E,data:k.computedData})}).on("mouseout",(E,G)=>{E.stopPropagation(),x.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:k.highlightTarget,datum:G,gridIndex:G.gridIndex,series:k.SeriesDataMap.get(G.seriesLabel),seriesIndex:G.seriesIndex,seriesLabel:G.seriesLabel,groups:k.GroupDataMap.get(G.groupLabel),groupIndex:G.groupIndex,groupLabel:G.groupLabel,event:E,data:k.computedData})}).on("click",(E,G)=>{E.stopPropagation(),x.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:k.highlightTarget,datum:G,gridIndex:G.gridIndex,series:k.SeriesDataMap.get(G.seriesLabel),seriesIndex:G.seriesIndex,seriesLabel:G.seriesLabel,groups:k.GroupDataMap.get(G.groupLabel),groupIndex:G.groupIndex,groupLabel:G.groupLabel,event:E,data:k.computedData})})}),B({barSelection:C,highlight:g.pipe(O(k=>k.map(E=>E.id))),fullChartParams:c}).pipe(I(v),Y(async k=>k)).subscribe(k=>{XR({selection:k.barSelection,ids:k.highlight,fullChartParams:k.fullChartParams})}),()=>{v.next(void 0)}},g2="Bars",ZR=se(g2,Fo)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=Rh(g2,{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$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),m2="BarsPN",KR=se(m2,Fo)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=Rh(m2,{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$:Bo(!0),event$:n.event$});return()=>{i.next(void 0),o()}}),y2=.3;function QR({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function JR(t,e){return t<=1?0:e/(t-1)*y2}function tk(t,e){return t<=1?e:e*(1-y2)}function ek({graphicGSelection:t,rectClassName:e,barData:n,zeroY:r,groupLabels:i,params:o,chartParams:a,barWidth:s,transformedBarRadius:u,delayGroup:l,transitionItem:c,isSeriesSeprate:f}){const h=s/2;return t.each((d,g,m)=>{X(m[g]).selectAll(`rect.${e}`).data(n[g]??[],b=>b.id).join(b=>b.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",x=>0),b=>b,b=>b.remove()).attr("transform",(b,x)=>`translate(${(b?b.axisX:0)-h}, 0)`).attr("fill",b=>b.color).attr("y",b=>r).attr("x",b=>0).attr("width",s).attr("rx",u[g][0]??1).attr("ry",u[g][1]??1).transition().duration(c).ease(ko(a.transitionEase)).delay((b,x)=>b.groupIndex*l).attr("y",b=>b._barStartY).attr("height",b=>Math.abs(b._barHeight))}),t.selectAll(`rect.${e}`)}function nk({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)=>{X(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 rk({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)?X(o[i]).style("opacity",1):X(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const b2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullDataFormatter$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridGraphicReverseScale$:d,gridAxesSize$:g,gridHighlight$:m,gridContainerPosition$:b,isSeriesSeprate$:x,event$:v})=>{const y=new et,w=$n(t,"clipPath-box"),D=at(t,"rect"),{seriesSelection$:P,axesSelection$:S,defsSelection$:_,graphicGSelection$:T}=ar({selection:e,pluginName:t,clipPathID:w,seriesLabels$:a,gridContainerPosition$:b,gridAxesTransform$:h,gridGraphicTransform$:p}),$=o.pipe(I(y),O(F=>F[0]&&F[0][0]?F[0][0].axisY-F[0][0].axisYFromZero:0),rt()),N=B({computedData:n,params:l,axisSize:g,isSeriesSeprate:x}).pipe(I(y),Y(async F=>F),O(F=>F.params.barWidth?F.params.barWidth:QR({axisWidth:F.axisSize.width,groupAmount:F.computedData[0]?F.computedData[0].length:0,barGroupPadding:F.params.barGroupPadding})),rt()),R=B({computedData:n,barWidth:N,params:l,gridGraphicReverseScale:d}).pipe(I(y),Y(async F=>F),O(F=>{const q=F.barWidth/2,V=F.params.barRadius===!0?q:F.params.barRadius===!1?0:typeof F.params.barRadius=="number"?F.params.barRadius:0;return F.computedData.map((K,W)=>{const nt=F.gridGraphicReverseScale[W]??F.gridGraphicReverseScale[0],ut=V*nt[0],H=V*nt[1];return[ut,H]})})),A=i.pipe(I(y),O(F=>{const q=new Set;return F.forEach(V=>{V.forEach(K=>{q.add(K.groupLabel)})}),Array.from(q)}),Pt(1)),L=f.pipe(I(y),O(F=>F.transitionDuration),rt()),M=new pt(F=>{B({groupLabels:A,transitionDuration:L}).pipe(Y(async q=>q)).subscribe(q=>{const V=JR(q.groupLabels.length,q.transitionDuration);F.next(V)})}).pipe(I(y),rt()),z=new pt(F=>{B({groupLabels:A,transitionDuration:L}).pipe(Y(async q=>q)).subscribe(q=>{const V=tk(q.groupLabels.length,q.transitionDuration);F.next(V)})}).pipe(I(y),rt()),U=B({computedData:n,dataFormatter:c}).pipe(I(y),Y(async F=>F),O(F=>{const V=F.computedData[0]?F.computedData[0].length-1:0,K=F.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0:F.dataFormatter.grid.groupAxis.scaleDomain[0],W=F.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?V:F.dataFormatter.grid.groupAxis.scaleDomain[1];return[K,W]})),C=B({visibleComputedLayoutData:o,groupScaleDomain:U}).pipe(I(y),Y(async F=>F),O(F=>{const q=F.groupScaleDomain[0],V=F.groupScaleDomain[1],W=F.visibleComputedLayoutData.map(mt=>mt.filter((ht,Yt)=>ht.groupIndex>=q&&ht.groupIndex<=V)).flat();if(W.length<=1)return 1;const nt=W.reduce((mt,ht)=>ht.value>mt.value?ht:mt,W[0]),ut=nt.groupIndex,H=W.filter(mt=>mt.groupIndex===ut).reduce((mt,ht)=>mt+ht.value,0);return nt.value/H})),k=B({computedLayoutData:r,yRatio:C,zeroY:$}).pipe(I(y),O(F=>{let q=F.computedLayoutData[0]?F.computedLayoutData[0].map(()=>F.zeroY):[];return F.computedLayoutData.map((V,K)=>V.map((W,nt)=>{const ut=q[nt];let H=0;return W.visible&&(H=W.axisYFromZero*F.yRatio,q[nt]=q[nt]+H),{...W,_barStartY:ut,_barHeight:H}}))})),E=B({computedLayoutData:r,zeroY:$}).pipe(I(y),O(F=>F.computedLayoutData.map((q,V)=>q.map((K,W)=>({...K,_barStartY:F.zeroY,_barHeight:K.axisYFromZero}))))),G=x.pipe(Y(F=>y_(()=>F,E,k)));B({defsSelection:_,gridAxesSize:g}).pipe(I(y),Y(async F=>F)).subscribe(F=>{const q=[{id:w,width:F.gridAxesSize.width,height:F.gridAxesSize.height}];nk({defsSelection:F.defsSelection,clipPathData:q})});const j=f.pipe(I(y),O(F=>F.highlightTarget),rt()),Q=B({graphicGSelection:T,graphicData:G,zeroY:$,groupLabels:A,params:l,chartParams:f,highlightTarget:j,barWidth:N,transformedBarRadius:R,delayGroup:M,transitionItem:z,isSeriesSeprate:x}).pipe(I(y),Y(async F=>F),O(F=>ek({graphicGSelection:F.graphicGSelection,rectClassName:D,barData:F.graphicData,zeroY:F.zeroY,groupLabels:F.groupLabels,params:F.params,chartParams:F.chartParams,barWidth:F.barWidth,transformedBarRadius:F.transformedBarRadius,delayGroup:F.delayGroup,transitionItem:F.transitionItem,isSeriesSeprate:F.isSeriesSeprate})));return B({barSelection:Q,computedData:n,highlightTarget:j,SeriesDataMap:s,GroupDataMap:u}).subscribe(F=>{F.barSelection.on("mouseover",(q,V)=>{q.stopPropagation(),v.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:F.highlightTarget,datum:V,gridIndex:V.gridIndex,series:F.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:F.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:q,data:F.computedData})}).on("mousemove",(q,V)=>{q.stopPropagation(),v.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:F.highlightTarget,datum:V,gridIndex:V.gridIndex,series:F.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:F.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:q,data:F.computedData})}).on("mouseout",(q,V)=>{q.stopPropagation(),v.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:F.highlightTarget,datum:V,gridIndex:V.gridIndex,series:F.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:F.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:q,data:F.computedData})}).on("click",(q,V)=>{q.stopPropagation(),v.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:F.highlightTarget,datum:V,gridIndex:V.gridIndex,series:F.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:F.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:q,data:F.computedData})})}),B({barSelection:Q,highlight:m.pipe(O(F=>F.map(q=>q.id))),fullChartParams:f}).pipe(I(y),Y(async F=>F)).subscribe(F=>{rk({selection:F.barSelection,ids:F.highlight,fullChartParams:F.fullChartParams})}),()=>{y.next(void 0)}},v2="BarStack",ik=se(v2,up)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=b2(v2,{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$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),x2=.3;function _2({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 ok(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Jf().domain(e).range([-i/2+r,i/2-r])}function ak(t,e){return t<=1?0:e/(t-1)*x2}function sk(t,e){return t<=1?e:e*(1-x2)}function uk({graphicGSelection:t,pathGClassName:e,pathClassName:n,visibleComputedLayoutData:r,linearGradientIds:i,zeroYArr:o,groupLabels:a,barScale:s,params:u,chartParams:l,barWidth:c,delayGroup:f,transitionItem:h,isSeriesSeprate:p}){const d=c/2;return t.each((m,b,x)=>{X(x[b]).selectAll(`g.${e}`).data(r[b]??[]).join(y=>{const w=y.append("g").classed(e,!0).attr("cursor","pointer");return w.append("path").classed(n,!0).style("vector-effect","non-scaling-stroke").attr("d",D=>{const P=-d,S=o[b],_=o[b];return`M${P},${S} L${P+c/2},${_} ${P+c},${S}`}),w},y=>y,y=>y.remove()).attr("transform",y=>`translate(${p?0:s(y.seriesLabel)}, 0)`).select(`path.${n}`).attr("height",y=>Math.abs(y.axisYFromZero)).attr("y",y=>y.axisY<o[b]?y.axisY:o[b]).attr("x",y=>p?0:s(y.seriesLabel)).style("fill",y=>`url(#${i[y.seriesIndex]})`).attr("stroke",y=>y.color).attr("transform",y=>`translate(${y?y.axisX:0}, 0)`).transition().duration(h).ease(ko(l.transitionEase)).delay((y,w)=>y.groupIndex*f).attr("d",y=>{const w=-d,D=o[b],P=y.axisY;return`M${w},${D} L${w+c/2},${P} ${w+c},${D}`})}),t.selectAll(`path.${n}`)}function lk({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 CR({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(Io(r)).tween("tween",(l,c,f)=>h=>{const p=l.width*h;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 sx=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullDataFormatter$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,layout$:y,event$:v})=>{const x=new nt,b=$n(t,"clipPath-box"),_=at(t,"path"),{seriesSelection$:M,axesSelection$:D,defsSelection$:$,graphicGSelection$:w}=ar({selection:e,pluginName:t,clipPathID:b,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:p}),P=p.pipe(I(x),G(k=>-k.translate[1]/k.scale[1])),S=new dt(k=>{const E=Y({fullParams:l,valueAxisStart:P}).pipe(I(x)).subscribe(L=>{const F=MR(L.fullParams.lineCurve,L.valueAxisStart);k.next(F)});return()=>{E.unsubscribe()}}),N=f.pipe(G(k=>k.transitionDuration),tt()),R=f.pipe(G(k=>k.transitionEase),tt());Y({defsSelection:$,seriesLabels:a,axisSize:d,transitionDuration:N,transitionEase:R}).pipe(I(x),H(async k=>k)).subscribe(k=>{const L=[{id:b,width:k.axisSize.width,height:k.axisSize.height}].concat(k.seriesLabels.map(F=>({id:`orbcharts__clipPath_${F}`,width:k.axisSize.width,height:k.axisSize.height})));CR({defsSelection:k.defsSelection,clipPathData:L,transitionDuration:k.transitionDuration,transitionEase:k.transitionEase})});const A=n.pipe(G(k=>{const E=new Map;return k.flat().forEach(L=>E.set(L.id,L)),E})),C=ix({fullDataFormatter$:c,gridAxesSize$:d,computedData$:n,fullChartParams$:f,gridContainerPosition$:m,layout$:y}),T=f.pipe(I(x),G(k=>k.highlightTarget),tt()),O=a.pipe(I(x),G(k=>k.map((E,L)=>$n(t,`lineargradient-${E}`)))),z=Y({graphicGSelection:w,defsSelection:$,visibleComputedLayoutData:o,linearGradientIds:O,areaPath:S,params:l}).pipe(I(x),H(async k=>k),G(k=>{let E=[];return k.graphicGSelection.each((L,F,j)=>{const Q=DR(k.visibleComputedLayoutData[F]??[]);E[F]=PR({selection:Z(j[F]),pathClassName:_,areaPath:k.areaPath,segmentData:Q,linearGradientIds:k.linearGradientIds,params:k.params}),LR({defsSelection:k.defsSelection,computedData:k.visibleComputedLayoutData,linearGradientIds:k.linearGradientIds,params:k.params})}),E}));return Y({pathSelectionArr:z,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:T,gridGroupPositionFn:C}).pipe(I(x),H(async k=>k)).subscribe(k=>{k.pathSelectionArr.forEach(E=>{E.on("mouseover",(L,F)=>{const j=F[0]?F[0].seriesLabel:"",{groupIndex:Q,groupLabel:U}=k.gridGroupPositionFn(L),q=k.GroupDataMap.get(U).find(V=>V.seriesLabel===j)??F[0];v.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:k.highlightTarget,datum:q,gridIndex:q.gridIndex,series:k.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:k.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:L,data:k.computedData})}).on("mousemove",(L,F)=>{const j=F[0]?F[0].seriesLabel:"",{groupIndex:Q,groupLabel:U}=k.gridGroupPositionFn(L),q=k.GroupDataMap.get(U).find(V=>V.seriesLabel===j)??F[0];v.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:k.highlightTarget,datum:q,gridIndex:q.gridIndex,series:k.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:k.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:L,data:k.computedData})}).on("mouseout",(L,F)=>{const j=F[0]?F[0].seriesLabel:"",{groupIndex:Q,groupLabel:U}=k.gridGroupPositionFn(L),q=k.GroupDataMap.get(U).find(V=>V.seriesLabel===j)??F[0];v.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:k.highlightTarget,datum:q,gridIndex:q.gridIndex,series:k.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:k.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:L,data:k.computedData})}).on("click",(L,F)=>{const j=F[0]?F[0].seriesLabel:"",{groupIndex:Q,groupLabel:U}=k.gridGroupPositionFn(L),q=k.GroupDataMap.get(U).find(V=>V.seriesLabel===j)??F[0];v.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:k.highlightTarget,datum:q,gridIndex:q.gridIndex,series:k.SeriesDataMap.get(q.seriesLabel),seriesIndex:q.seriesIndex,seriesLabel:q.seriesLabel,groups:k.GroupDataMap.get(q.groupLabel),groupIndex:q.groupIndex,groupLabel:q.groupLabel,event:L,data:k.computedData})})})}),f.pipe(I(x),li(k=>k.highlightTarget==="series"),H(k=>Y({graphicGSelection:w,gridHighlight:g,DataMap:A,fullChartParams:f}).pipe(I(x),H(async E=>E)))).subscribe(k=>{const E=k.gridHighlight[0]?k.gridHighlight[0].seriesLabel:null;TR({selection:k.graphicGSelection,seriesLabel:E,fullChartParams:k.fullChartParams})}),()=>{x.next(void 0)}},ux="LineAreas",ER=se(ux,op)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=sx(ux,{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$,allContainerPosition$:n.gridContainerPosition$,layout$:n.layout$,event$:r.event$});return()=>{i.next(void 0),o()}}),lx=.3;function cx({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 RR(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 kR(t,e){return t<=1?0:e/(t-1)*lx}function IR(t,e){return t<=1?e:e*(1-lx)}function NR({graphicGSelection:t,rectClassName:e,visibleComputedLayoutData:n,zeroYArr:r,groupLabels:i,barScale:o,params:a,chartParams:s,barWidth:u,transformedBarRadius:l,delayGroup:c,transitionItem:f,isSeriesSeprate:h}){const p=u/2;return t.each((g,m,y)=>{Z(y[m]).selectAll(`rect.${e}`).data(n[m]??[],v=>v.id).join(v=>v.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",x=>0),v=>v,v=>v.remove()).attr("transform",(v,x)=>`translate(${(v?v.axisX:0)-p}, 0)`).attr("fill",v=>v.color).attr("y",v=>v.axisY<r[m]?v.axisY:r[m]).attr("x",v=>h?0:o(v.seriesLabel)).attr("width",u).attr("rx",l[m][0]??1).attr("ry",l[m][1]??1).transition().duration(f).ease(Io(s.transitionEase)).delay((v,x)=>v.groupIndex*c).attr("height",v=>Math.abs(v.axisYFromZero))}),t.selectAll(`rect.${e}`)}function FR({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 GR({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 Eh=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullChartParams$:c,gridAxesTransform$:f,gridGraphicTransform$:h,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,isSeriesSeprate$:y,event$:v})=>{const x=new nt,b=$n(t,"clipPath-box"),_=at(t,"rect"),{seriesSelection$:M,axesSelection$:D,defsSelection$:$,graphicGSelection$:w}=ar({selection:e,pluginName:t,clipPathID:b,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:h}),P=o.pipe(I(x),G(E=>E.map(L=>L[0]?L[0].axisY-L[0].axisYFromZero:0)),tt()),S=Y({computedData:n,visibleComputedData:i,params:l,gridAxesSize:d,isSeriesSeprate:y}).pipe(I(x),H(async E=>E),G(E=>E.params.barWidth?E.params.barWidth:E.isSeriesSeprate?cx({axisWidth:E.gridAxesSize.width,groupAmount:E.computedData[0]?E.computedData[0].length:0,barAmountOfGroup:1,barPadding:E.params.barPadding,barGroupPadding:E.params.barGroupPadding}):cx({axisWidth:E.gridAxesSize.width,groupAmount:E.computedData[0]?E.computedData[0].length:0,barAmountOfGroup:E.visibleComputedData.length,barPadding:E.params.barPadding,barGroupPadding:E.params.barGroupPadding})),tt()),N=Y({computedData:n,barWidth:S,params:l,gridGraphicReverseScale:p}).pipe(I(x),H(async E=>E),G(E=>{const L=E.barWidth/2,F=E.params.barRadius===!0?L:E.params.barRadius===!1?0:typeof E.params.barRadius=="number"?E.params.barRadius:0;return E.computedData.map((j,Q)=>{const U=E.gridGraphicReverseScale[Q]??E.gridGraphicReverseScale[0];let X=F*U[0],B=F*U[1];if(X>L){const q=L/X;X=X*q,B=B*q}return[X,B]})})),R=i.pipe(I(x),G(E=>{const L=new Set;return E.forEach(F=>{F.forEach(j=>{L.add(j.groupLabel)})}),Array.from(L)})),A=Y({seriesLabels:a,barWidth:S,params:l}).pipe(I(x),H(async E=>E),G(E=>RR(E.barWidth,E.seriesLabels,E.params))),C=c.pipe(I(x),G(E=>E.transitionDuration),tt()),T=new dt(E=>{Y({groupLabels:R,transitionDuration:C}).pipe(H(async L=>L)).subscribe(L=>{const F=kR(L.groupLabels.length,L.transitionDuration);E.next(F)})}).pipe(I(x),tt()),O=new dt(E=>{Y({groupLabels:R,transitionDuration:C}).pipe(H(async L=>L)).subscribe(L=>{const F=IR(L.groupLabels.length,L.transitionDuration);E.next(F)})}).pipe(I(x),tt());Y({defsSelection:$,gridAxesSize:d}).pipe(I(x),H(async E=>E)).subscribe(E=>{const L=[{id:b,width:E.gridAxesSize.width,height:E.gridAxesSize.height}];FR({defsSelection:E.defsSelection,clipPathData:L})});const z=c.pipe(I(x),G(E=>E.highlightTarget),tt()),k=Y({graphicGSelection:w,visibleComputedLayoutData:o,zeroYArr:P,groupLabels:R,barScale:A,params:l,chartParams:c,highlightTarget:z,barWidth:S,transformedBarRadius:N,delayGroup:T,transitionItem:O,isSeriesSeprate:y}).pipe(I(x),H(async E=>E),G(E=>NR({graphicGSelection:E.graphicGSelection,rectClassName:_,visibleComputedLayoutData:E.visibleComputedLayoutData,zeroYArr:E.zeroYArr,groupLabels:E.groupLabels,barScale:E.barScale,params:E.params,chartParams:E.chartParams,barWidth:E.barWidth,transformedBarRadius:E.transformedBarRadius,delayGroup:E.delayGroup,transitionItem:E.transitionItem,isSeriesSeprate:E.isSeriesSeprate})));return Y({barSelection:k,computedData:n,highlightTarget:z,SeriesDataMap:s,GroupDataMap:u}).pipe(I(x),H(async E=>E)).subscribe(E=>{E.barSelection.on("mouseover",(L,F)=>{L.stopPropagation(),v.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:E.highlightTarget,datum:F,gridIndex:F.gridIndex,series:E.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:E.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:L,data:E.computedData})}).on("mousemove",(L,F)=>{L.stopPropagation(),v.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:E.highlightTarget,datum:F,gridIndex:F.gridIndex,series:E.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:E.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:L,data:E.computedData})}).on("mouseout",(L,F)=>{L.stopPropagation(),v.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:E.highlightTarget,datum:F,gridIndex:F.gridIndex,series:E.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:E.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:L,data:E.computedData})}).on("click",(L,F)=>{L.stopPropagation(),v.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:E.highlightTarget,datum:F,gridIndex:F.gridIndex,series:E.SeriesDataMap.get(F.seriesLabel),seriesIndex:F.seriesIndex,seriesLabel:F.seriesLabel,groups:E.GroupDataMap.get(F.groupLabel),groupIndex:F.groupIndex,groupLabel:F.groupLabel,event:L,data:E.computedData})})}),Y({barSelection:k,highlight:g.pipe(G(E=>E.map(L=>L.id))),fullChartParams:c}).pipe(I(x),H(async E=>E)).subscribe(E=>{GR({selection:E.barSelection,ids:E.highlight,fullChartParams:E.fullChartParams})}),()=>{x.next(void 0)}},fx="Bars",zR=se(fx,Go)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=Eh(fx,{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$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),hx="BarsPN",OR=se(hx,Go)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=Eh(hx,{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$:Yo(!0),event$:n.event$});return()=>{i.next(void 0),o()}}),px=.3;function UR({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function BR(t,e){return t<=1?0:e/(t-1)*px}function YR(t,e){return t<=1?e:e*(1-px)}function HR({graphicGSelection:t,rectClassName:e,barData:n,zeroY:r,groupLabels:i,params:o,chartParams:a,barWidth:s,transformedBarRadius:u,delayGroup:l,transitionItem:c,isSeriesSeprate:f}){const h=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",v=>0),y=>y,y=>y.remove()).attr("transform",(y,v)=>`translate(${(y?y.axisX:0)-h}, 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(c).ease(Io(a.transitionEase)).delay((y,v)=>y.groupIndex*l).attr("y",y=>y._barStartY).attr("height",y=>Math.abs(y._barHeight))}),t.selectAll(`rect.${e}`)}function WR({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 VR({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 dx=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullDataFormatter$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridGraphicReverseScale$:d,gridAxesSize$:g,gridHighlight$:m,gridContainerPosition$:y,isSeriesSeprate$:v,event$:x})=>{const b=new nt,_=$n(t,"clipPath-box"),M=at(t,"rect"),{seriesSelection$:D,axesSelection$:$,defsSelection$:w,graphicGSelection$:P}=ar({selection:e,pluginName:t,clipPathID:_,seriesLabels$:a,gridContainerPosition$:y,gridAxesTransform$:h,gridGraphicTransform$:p}),S=o.pipe(I(b),G(U=>U[0]&&U[0][0]?U[0][0].axisY-U[0][0].axisYFromZero:0),tt()),N=Y({computedData:n,params:l,axisSize:g,isSeriesSeprate:v}).pipe(I(b),H(async U=>U),G(U=>U.params.barWidth?U.params.barWidth:UR({axisWidth:U.axisSize.width,groupAmount:U.computedData[0]?U.computedData[0].length:0,barGroupPadding:U.params.barGroupPadding})),tt()),R=Y({computedData:n,barWidth:N,params:l,gridGraphicReverseScale:d}).pipe(I(b),H(async U=>U),G(U=>{const X=U.barWidth/2,B=U.params.barRadius===!0?X:U.params.barRadius===!1?0:typeof U.params.barRadius=="number"?U.params.barRadius:0;return U.computedData.map((q,V)=>{const rt=U.gridGraphicReverseScale[V]??U.gridGraphicReverseScale[0],ut=B*rt[0],W=B*rt[1];return[ut,W]})})),A=i.pipe(I(b),G(U=>{const X=new Set;return U.forEach(B=>{B.forEach(q=>{X.add(q.groupLabel)})}),Array.from(X)}),St(1)),C=f.pipe(I(b),G(U=>U.transitionDuration),tt()),T=new dt(U=>{Y({groupLabels:A,transitionDuration:C}).pipe(H(async X=>X)).subscribe(X=>{const B=BR(X.groupLabels.length,X.transitionDuration);U.next(B)})}).pipe(I(b),tt()),O=new dt(U=>{Y({groupLabels:A,transitionDuration:C}).pipe(H(async X=>X)).subscribe(X=>{const B=YR(X.groupLabels.length,X.transitionDuration);U.next(B)})}).pipe(I(b),tt()),z=Y({computedData:n,dataFormatter:c}).pipe(I(b),H(async U=>U),G(U=>{const B=U.computedData[0]?U.computedData[0].length-1:0,q=U.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0:U.dataFormatter.grid.groupAxis.scaleDomain[0],V=U.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?B:U.dataFormatter.grid.groupAxis.scaleDomain[1];return[q,V]})),k=Y({visibleComputedLayoutData:o,groupScaleDomain:z}).pipe(I(b),H(async U=>U),G(U=>{const X=U.groupScaleDomain[0],B=U.groupScaleDomain[1],V=U.visibleComputedLayoutData.map(mt=>mt.filter((ht,Yt)=>ht.groupIndex>=X&&ht.groupIndex<=B)).flat();if(V.length<=1)return 1;const rt=V.reduce((mt,ht)=>ht.value>mt.value?ht:mt,V[0]),ut=rt.groupIndex,W=V.filter(mt=>mt.groupIndex===ut).reduce((mt,ht)=>mt+ht.value,0);return rt.value/W})),E=Y({computedLayoutData:r,yRatio:k,zeroY:S}).pipe(I(b),G(U=>{let X=U.computedLayoutData[0]?U.computedLayoutData[0].map(()=>U.zeroY):[];return U.computedLayoutData.map((B,q)=>B.map((V,rt)=>{const ut=X[rt];let W=0;return V.visible&&(W=V.axisYFromZero*U.yRatio,X[rt]=X[rt]+W),{...V,_barStartY:ut,_barHeight:W}}))})),L=Y({computedLayoutData:r,zeroY:S}).pipe(I(b),G(U=>U.computedLayoutData.map((X,B)=>X.map((q,V)=>({...q,_barStartY:U.zeroY,_barHeight:q.axisYFromZero}))))),F=v.pipe(H(U=>h_(()=>U,L,E)));Y({defsSelection:w,gridAxesSize:g}).pipe(I(b),H(async U=>U)).subscribe(U=>{const X=[{id:_,width:U.gridAxesSize.width,height:U.gridAxesSize.height}];WR({defsSelection:U.defsSelection,clipPathData:X})});const j=f.pipe(I(b),G(U=>U.highlightTarget),tt()),Q=Y({graphicGSelection:P,graphicData:F,zeroY:S,groupLabels:A,params:l,chartParams:f,highlightTarget:j,barWidth:N,transformedBarRadius:R,delayGroup:T,transitionItem:O,isSeriesSeprate:v}).pipe(I(b),H(async U=>U),G(U=>HR({graphicGSelection:U.graphicGSelection,rectClassName:M,barData:U.graphicData,zeroY:U.zeroY,groupLabels:U.groupLabels,params:U.params,chartParams:U.chartParams,barWidth:U.barWidth,transformedBarRadius:U.transformedBarRadius,delayGroup:U.delayGroup,transitionItem:U.transitionItem,isSeriesSeprate:U.isSeriesSeprate})));return Y({barSelection:Q,computedData:n,highlightTarget:j,SeriesDataMap:s,GroupDataMap:u}).subscribe(U=>{U.barSelection.on("mouseover",(X,B)=>{X.stopPropagation(),x.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:U.highlightTarget,datum:B,gridIndex:B.gridIndex,series:U.SeriesDataMap.get(B.seriesLabel),seriesIndex:B.seriesIndex,seriesLabel:B.seriesLabel,groups:U.GroupDataMap.get(B.groupLabel),groupIndex:B.groupIndex,groupLabel:B.groupLabel,event:X,data:U.computedData})}).on("mousemove",(X,B)=>{X.stopPropagation(),x.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:U.highlightTarget,datum:B,gridIndex:B.gridIndex,series:U.SeriesDataMap.get(B.seriesLabel),seriesIndex:B.seriesIndex,seriesLabel:B.seriesLabel,groups:U.GroupDataMap.get(B.groupLabel),groupIndex:B.groupIndex,groupLabel:B.groupLabel,event:X,data:U.computedData})}).on("mouseout",(X,B)=>{X.stopPropagation(),x.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:U.highlightTarget,datum:B,gridIndex:B.gridIndex,series:U.SeriesDataMap.get(B.seriesLabel),seriesIndex:B.seriesIndex,seriesLabel:B.seriesLabel,groups:U.GroupDataMap.get(B.groupLabel),groupIndex:B.groupIndex,groupLabel:B.groupLabel,event:X,data:U.computedData})}).on("click",(X,B)=>{X.stopPropagation(),x.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:U.highlightTarget,datum:B,gridIndex:B.gridIndex,series:U.SeriesDataMap.get(B.seriesLabel),seriesIndex:B.seriesIndex,seriesLabel:B.seriesLabel,groups:U.GroupDataMap.get(B.groupLabel),groupIndex:B.groupIndex,groupLabel:B.groupLabel,event:X,data:U.computedData})})}),Y({barSelection:Q,highlight:m.pipe(G(U=>U.map(X=>X.id))),fullChartParams:f}).pipe(I(b),H(async U=>U)).subscribe(U=>{VR({selection:U.barSelection,ids:U.highlight,fullChartParams:U.fullChartParams})}),()=>{b.next(void 0)}},gx="BarStack",jR=se(gx,sp)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=dx(gx,{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$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),mx=.3;function yx({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 qR(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 XR(t,e){return t<=1?0:e/(t-1)*mx}function ZR(t,e){return t<=1?e:e*(1-mx)}function KR({graphicGSelection:t,pathGClassName:e,pathClassName:n,visibleComputedLayoutData:r,linearGradientIds:i,zeroYArr:o,groupLabels:a,barScale:s,params:u,chartParams:l,barWidth:c,delayGroup:f,transitionItem:h,isSeriesSeprate:p}){const d=c/2;return t.each((m,y,v)=>{Z(v[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",M=>{const D=-d,$=o[y],w=o[y];return`M${D},${$} L${D+c/2},${w} ${D+c},${$}`}),_},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(h).ease(Io(l.transitionEase)).delay((b,_)=>b.groupIndex*f).attr("d",b=>{const _=-d,M=o[y],D=b.axisY;return`M${_},${M} L${_+c/2},${D} ${_+c},${M}`})}),t.selectAll(`path.${n}`)}function QR({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 ck({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)=>{X(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 fk({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)?X(a[o]).style("opacity",1):X(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const w2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,fullDataFormatter$:a,seriesLabels$:s,SeriesDataMap$:u,GroupDataMap$:l,fullParams$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,isSeriesSeprate$:b,event$:x})=>{const v=new et,y=$n(t,"clipPath-box"),w=at(t,"pathG"),D=at(t,"path"),{seriesSelection$:P,axesSelection$:S,defsSelection$:_,graphicGSelection$:T}=ar({selection:e,pluginName:t,clipPathID:y,seriesLabels$:s,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:p});p.pipe(I(v),O(E=>-E.translate[1]/E.scale[1]));const $=o.pipe(O(E=>E.map(G=>G[0]?G[0].axisY-G[0].axisYFromZero:0)),rt()),N=B({computedData:n,visibleComputedData:i,params:c,gridAxesSize:d,isSeriesSeprate:b}).pipe(I(v),Y(async E=>E),O(E=>E.params.barWidth?E.params.barWidth:E.isSeriesSeprate?_2({axisWidth:E.gridAxesSize.width,groupAmount:E.computedData[0]?E.computedData[0].length:0,barAmountOfGroup:1,barPadding:E.params.barPadding,barGroupPadding:E.params.barGroupPadding}):_2({axisWidth:E.gridAxesSize.width,groupAmount:E.computedData[0]?E.computedData[0].length:0,barAmountOfGroup:E.visibleComputedData.length,barPadding:E.params.barPadding,barGroupPadding:E.params.barGroupPadding}))),R=i.pipe(I(v),O(E=>{const G=new Set;return E.forEach(j=>{j.forEach(Q=>{G.add(Q.groupLabel)})}),Array.from(G)})),A=new pt(E=>{B({seriesLabels:s,barWidth:N,params:c}).pipe(I(v),Y(async G=>G)).subscribe(G=>{const j=ok(G.barWidth,G.seriesLabels,G.params);E.next(j)})}),L=f.pipe(I(v),O(E=>E.transitionDuration),rt()),M=new pt(E=>{B({groupLabels:R,transitionDuration:L}).pipe(Y(async G=>G)).subscribe(G=>{const j=ak(G.groupLabels.length,G.transitionDuration);E.next(j)})}).pipe(I(v),rt()),z=new pt(E=>{B({groupLabels:R,transitionDuration:L}).pipe(Y(async G=>G)).subscribe(G=>{const j=sk(G.groupLabels.length,G.transitionDuration);E.next(j)})}).pipe(I(v),rt());B({defsSelection:_,gridAxesSize:d}).pipe(I(v),Y(async E=>E)).subscribe(E=>{const G=[{id:y,width:E.gridAxesSize.width,height:E.gridAxesSize.height}];ck({defsSelection:E.defsSelection,clipPathData:G})});const U=f.pipe(I(v),O(E=>E.highlightTarget),rt()),C=s.pipe(I(v),O(E=>E.map((G,j)=>$n(t,`lineargradient-${G}`)))),k=B({graphicGSelection:T,defsSelection:_,computedData:n,visibleComputedLayoutData:o,linearGradientIds:C,zeroYArr:$,groupLabels:R,barScale:A,params:c,chartParams:f,barWidth:N,delayGroup:M,transitionItem:z,isSeriesSeprate:b}).pipe(I(v),Y(async E=>E),O(E=>(lk({defsSelection:E.defsSelection,computedData:E.computedData,linearGradientIds:E.linearGradientIds,params:E.params}),uk({graphicGSelection:E.graphicGSelection,pathGClassName:w,pathClassName:D,visibleComputedLayoutData:E.visibleComputedLayoutData,linearGradientIds:E.linearGradientIds,zeroYArr:E.zeroYArr,groupLabels:E.groupLabels,barScale:E.barScale,params:E.params,chartParams:E.chartParams,barWidth:E.barWidth,delayGroup:E.delayGroup,transitionItem:E.transitionItem,isSeriesSeprate:E.isSeriesSeprate}))));return B({barSelection:k,computedData:n,highlightTarget:U,SeriesDataMap:u,GroupDataMap:l}).subscribe(E=>{E.barSelection.on("mouseover",(G,j)=>{G.stopPropagation(),x.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:E.highlightTarget,datum:j,gridIndex:j.gridIndex,series:E.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:E.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:G,data:E.computedData})}).on("mousemove",(G,j)=>{G.stopPropagation(),x.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:E.highlightTarget,datum:j,gridIndex:j.gridIndex,series:E.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:E.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:G,data:E.computedData})}).on("mouseout",(G,j)=>{G.stopPropagation(),x.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:E.highlightTarget,datum:j,gridIndex:j.gridIndex,series:E.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:E.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:G,data:E.computedData})}).on("click",(G,j)=>{G.stopPropagation(),x.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:E.highlightTarget,datum:j,gridIndex:j.gridIndex,series:E.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:E.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:G,data:E.computedData})})}),B({barSelection:k,highlight:g.pipe(O(E=>E.map(G=>G.id))),fullChartParams:f}).pipe(I(v),Y(async E=>E)).subscribe(E=>{fk({selection:E.barSelection,ids:E.highlight,fullChartParams:E.fullChartParams})}),()=>{v.next(void 0)}},$2="BarsTriangle",hk=se($2,lp)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=w2($2,{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$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}});function pk({graphicGSelection:t,circleGClassName:e,circleClassName:n,visibleComputedLayoutData:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=c=>{const f=c.size();return o.transitionDuration/f};let u=0;return t.each((c,f,h)=>{X(h[f]).selectAll("g").data(r[f],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)=>{X(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((b,x)=>d*u).attr("opacity",1),m=>m.transition().duration(50).attr("opacity",1),m=>m.remove()).attr("r",i.radius).attr("fill",(m,b)=>Lu({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,b)=>Lu({datum:m,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[f][0]??1}, ${a[f][1]??1})`)})}),t.selectAll(`circle.${n}`)}function dk({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)?X(a[o]).style("opacity",1).transition("highlight").duration(200):X(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function gk({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)=>{X(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 S2=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullChartParams$:c,gridAxesTransform$:f,gridGraphicTransform$:h,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,event$:b})=>{const x=new et,v=$n(t,"clipPath-box"),y=at(t,"circleG"),w=at(t,"circle"),{seriesSelection$:D,axesSelection$:P,defsSelection$:S,graphicGSelection$:_}=ar({selection:e,pluginName:t,clipPathID:v,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:h}),T=B({computedData:n,gridGraphicReverseScale:p}).pipe(I(x),Y(async A=>A),O(A=>A.computedData.map((L,M)=>A.gridGraphicReverseScale[M])));B({defsSelection:S,gridAxesSize:d}).pipe(I(x),Y(async A=>A)).subscribe(A=>{const L=[{id:v,width:A.gridAxesSize.width,height:A.gridAxesSize.height}];gk({defsSelection:A.defsSelection,clipPathData:L})});const $=c.pipe(I(x),O(A=>A.highlightTarget),rt()),N=B({graphicGSelection:_,visibleComputedLayoutData:o,graphicReverseScale:T,fullChartParams:c,fullParams:l}).pipe(I(x),Y(async A=>A),O(A=>pk({graphicGSelection:A.graphicGSelection,circleGClassName:y,circleClassName:w,visibleComputedLayoutData:A.visibleComputedLayoutData,fullParams:A.fullParams,fullChartParams:A.fullChartParams,graphicReverseScale:A.graphicReverseScale})));B({graphicSelection:N,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:$}).pipe(I(x),Y(async A=>A)).subscribe(A=>{A.graphicSelection.on("mouseover",(L,M)=>{L.stopPropagation(),b.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(),b.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(),b.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(),b.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 R=l.pipe(I(x),O(A=>A.onlyShowHighlighted),rt());return B({graphicSelection:N,highlight:g.pipe(O(A=>A.map(L=>L.id))),onlyShowHighlighted:R,fullChartParams:c}).pipe(I(x),Y(async A=>A)).subscribe(A=>{dk({selection:A.graphicSelection,ids:A.highlight,onlyShowHighlighted:A.onlyShowHighlighted,fullChartParams:A.fullChartParams})}),()=>{x.next(void 0)}},A2="Dots",mk=se(A2,sp)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=S2(A2,{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()}}),yk={listRectWidth:14,listRectHeight:14,listRectRadius:0};function M2(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 Cu=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o,textSizePx$:a})=>{const s=at(t,"root-position"),u=at(t,"legend-card"),l=at(t,"legend-list"),c=at(t,"legend-item"),f=new et,h=B({seriesLabels:n,fullChartParams:o}).pipe(I(f),Y(async _=>_),O(_=>{const T=new Map;let $=0;return _.seriesLabels.forEach((N,R)=>{if(!T.has(N)){const A=M2($,_.fullChartParams);T.set(N,A),$++}}),T})),p=n.pipe(I(f),O(_=>{const T=new Set;let $=[];return _.forEach(N=>{T.has(N)?$.push(!1):$.push(!0),T.add(N)}),$})),d=r.pipe(I(f),O(_=>_.position==="bottom"||_.position==="top"?"row":"column")),g=B({fullParams:r,layout:i}).pipe(I(f),Y(async _=>_),O(_=>{const T=_.fullParams.padding*2+_.fullParams.gap*2;return _.fullParams.position==="bottom"||_.fullParams.position==="top"?_.layout.rootWidth-T:_.layout.rootHeight-T})),b=B({layout:i,fullParams:r}).pipe(I(f),Y(async _=>_),O(_=>{let T=0,$=0;return _.fullParams.position==="bottom"?($=_.layout.rootHeight,_.fullParams.justify==="start"?T=0:_.fullParams.justify==="center"?T=_.layout.rootWidth/2:_.fullParams.justify==="end"&&(T=_.layout.rootWidth)):_.fullParams.position==="right"?(T=_.layout.rootWidth,_.fullParams.justify==="start"?$=0:_.fullParams.justify==="center"?$=_.layout.rootHeight/2:_.fullParams.justify==="end"&&($=_.layout.rootHeight)):_.fullParams.position==="top"?($=0,_.fullParams.justify==="start"?T=0:_.fullParams.justify==="center"?T=_.layout.rootWidth/2:_.fullParams.justify==="end"&&(T=_.layout.rootWidth)):_.fullParams.position==="left"&&(T=0,_.fullParams.justify==="start"?$=0:_.fullParams.justify==="center"?$=_.layout.rootHeight/2:_.fullParams.justify==="end"&&($=_.layout.rootHeight)),{x:T,y:$}})).pipe(I(f),O(_=>e.selectAll(`g.${s}`).data([_]).join(T=>T.append("g").classed(s,!0).attr("transform",$=>`translate(${$.x}, ${$.y})`),T=>T.transition().attr("transform",$=>`translate(${$.x}, ${$.y})`),T=>T.remove()))),x=r.pipe(I(f),O(_=>_.seriesList[0]?_.seriesList[0]:yk)),v=B({visibleList:p,fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:d,lineMaxSize:g,defaultListStyle:x,SeriesLabelColorMap:h,textSizePx:a}).pipe(I(f),Y(async _=>_),O(_=>_.seriesLabels.reduce((T,$,N)=>{if(!_.visibleList[N])return T;const R=u2($,_.textSizePx),A=_.textSizePx*1.5+R,L=_.SeriesLabelColorMap.get($),M=T[0]&&T[0][0]?T[T.length-1][T[T.length-1].length-1]:null,{translateX:z,translateY:U,lineIndex:C,itemIndex:k}=((G,j,Q)=>{let F=0,q=0,V=0,K=0;if(G.lineDirection==="column"){let W=Q?Q.translateY+G.textSizePx+G.fullParams.gap:0;if(W+G.textSizePx>G.lineMaxSize){V=Q.lineIndex+1,K=0,q=0;const nt=j[j.length-1].reduce((ut,H)=>H.itemWidth>ut?H.itemWidth:ut,0);F=Q.translateX+nt+G.fullParams.gap}else V=Q?Q.lineIndex:0,K=Q?Q.itemIndex+1:0,q=W,F=Q?Q.translateX:0}else{let W=Q?Q.translateX+Q.itemWidth+G.fullParams.gap:0;W+A>G.lineMaxSize?(V=Q.lineIndex+1,K=0,F=0):(V=Q?Q.lineIndex:0,K=Q?Q.itemIndex+1:0,F=W),q=(G.textSizePx+G.fullParams.gap)*V}return{translateX:F,translateY:q,lineIndex:V,itemIndex:K}})(_,T,M);T[C]||(T[C]=[]);const E=_.fullParams.seriesList[k]?_.fullParams.seriesList[k]:_.defaultListStyle;return T[C].push({id:$,seriesLabel:$,seriesIndex:N,lineIndex:C,itemIndex:k,text:$,itemWidth:A,translateX:z,translateY:U,color:L,listRectWidth:E.listRectWidth,listRectHeight:E.listRectHeight,listRectRadius:E.listRectRadius}),T},[])),Pt(1)),y=B({fullParams:r,fullChartParams:o,lineDirection:d,lengendItems:v,textSizePx:a}).pipe(I(f),Y(async _=>_),O(_=>{const{width:T,height:$}=((N,R)=>{let A=0,L=0;if(!R.length||!R[0].length)return{width:A,height:L};const M=R[0][R[0].length-1];return N.lineDirection==="column"?(A=R.reduce((z,U)=>{const C=U.reduce((k,E)=>E.itemWidth>k?E.itemWidth:k,0);return z+C},0),A+=N.fullParams.gap*(R.length-1),L=M.translateY+N.textSizePx):(A=M.translateX+M.itemWidth,L=N.textSizePx*R.length+N.fullParams.gap*(R.length-1)),{width:A,height:L}})(_,_.lengendItems);return{direction:_.lineDirection,width:T,height:$,translateX:_.fullParams.gap,translateY:_.fullParams.gap}}),Pt(1)),w=B({fullParams:r,lengendList:y}).pipe(I(f),Y(async _=>_),O(_=>{const T=_.lengendList.width+_.fullParams.gap*2,$=_.lengendList.height+_.fullParams.gap*2;let N=0,R=0;return _.fullParams.position==="left"?_.fullParams.justify==="start"?(N=_.fullParams.padding,R=_.fullParams.padding):_.fullParams.justify==="center"?(N=_.fullParams.padding,R=-$/2):_.fullParams.justify==="end"&&(N=_.fullParams.padding,R=-$-_.fullParams.padding):_.fullParams.position==="right"?_.fullParams.justify==="start"?(N=-T-_.fullParams.padding,R=_.fullParams.padding):_.fullParams.justify==="center"?(N=-T-_.fullParams.padding,R=-$/2):_.fullParams.justify==="end"&&(N=-T-_.fullParams.padding,R=-$-_.fullParams.padding):_.fullParams.position==="top"?_.fullParams.justify==="start"?(N=_.fullParams.padding,R=_.fullParams.padding):_.fullParams.justify==="center"?(N=-T/2,R=_.fullParams.padding):_.fullParams.justify==="end"&&(N=-T-_.fullParams.padding,R=_.fullParams.padding):_.fullParams.justify==="start"?(N=_.fullParams.padding,R=-$-_.fullParams.padding):_.fullParams.justify==="center"?(N=-T/2,R=-$-_.fullParams.padding):_.fullParams.justify==="end"&&(N=-T-_.fullParams.padding,R=-$-_.fullParams.padding),{width:T,height:$,translateX:N,translateY:R}})),D=B({rootPositionSelection:b,fullParams:r,fullChartParams:o,legendCard:w}).pipe(I(f),Y(async _=>_),O(_=>_.rootPositionSelection.selectAll("g").data([_.legendCard]).join(T=>T.append("g").classed(u,!0).attr("transform",$=>`translate(${$.translateX}, ${$.translateY})`),T=>T.transition().attr("transform",$=>`translate(${$.translateX}, ${$.translateY})`),T=>T.remove()).each((T,$,N)=>{X(N[$]).selectAll("rect").data([T]).join("rect").attr("width",R=>R.width).attr("height",R=>R.height).attr("fill",Ct(_.fullParams.backgroundFill,_.fullChartParams)).attr("stroke",Ct(_.fullParams.backgroundStroke,_.fullChartParams))}))),P=B({lengendCardSelection:D,fullParams:r,lengendList:y}).pipe(I(f),Y(async _=>_),O(_=>_.lengendCardSelection.selectAll("g").data([_.lengendList]).join(T=>T.append("g").classed(l,!0).attr("transform",$=>`translate(${$.translateX}, ${$.translateY})`),T=>T.transition().attr("transform",$=>`translate(${$.translateX}, ${$.translateY})`),T=>T.remove())));return B({lengendListSelection:P,fullParams:r,fullChartParams:o,lengendItems:v,textSizePx:a}).pipe(I(f),Y(async _=>_),O(_=>{const T=_.lengendItems[0]?_.lengendItems.flat():[];return _.lengendListSelection.selectAll(`g.${c}`).data(T).join($=>$.append("g").classed(c,!0).attr("cursor","default"),$=>$,$=>$.remove()).attr("transform",($,N)=>`translate(${$.translateX}, ${$.translateY})`).each(($,N,R)=>{const A=_.textSizePx/2,L=-$.listRectWidth/2,M=-$.listRectHeight/2;X(R[N]).selectAll("rect").data([$]).join("rect").attr("x",A).attr("y",A).attr("width",z=>z.listRectWidth).attr("height",z=>z.listRectHeight).attr("transform",z=>`translate(${L}, ${M})`).attr("fill",z=>z.color).attr("rx",z=>z.listRectRadius),X(R[N]).selectAll("text").data([$]).join(z=>z.append("text").attr("dominant-baseline","hanging"),z=>z,z=>z.remove()).attr("x",_.textSizePx*1.5).attr("font-size",_.fullChartParams.styles.textSize).attr("fill",z=>_.fullParams.textColorType==="series"?M2(z.seriesIndex,_.fullChartParams):Ct(_.fullParams.textColorType,_.fullChartParams)).text(z=>z.text)})})).subscribe(),()=>{f.next(void 0)}},D2="GridLegend",bk=se(D2,hp)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new et,o=n.SeriesDataMap$.pipe(I(i),O(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(I(i),O(u=>{const l=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:l}})),s=Cu(D2,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),kh=6;function vk({selection:t,xAxisClassName:e,groupingLabelClassName:n,params:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,chartParams:u,groupScale:l,groupScaleDomain:c,groupLabels:f,textTransform:h}){const p=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((b,x,v)=>{X(v[x]).selectAll("text").data([b]).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",Ct(r.labelColorType,u)).style("transform",h).text(y=>s.grid.groupAxis.label)}).attr("transform",b=>`translate(${a.width+b.tickPadding+r.labelOffset[0]}, ${-b.tickPadding-kh-r.labelOffset[1]})`);const d=Math.floor(c[1])-Math.ceil(c[0])+1,g=Fg(l).scale(l).ticks(r.ticks==="all"||r.ticks>d?d:r.ticks).tickSize(r.tickFullLine==!0?-a.height:kh).tickSizeOuter(0).tickFormat(b=>{const x=f[b]??"";return Ch(x,r.tickFormat)}).tickPadding(r.tickPadding),m=p.transition().duration(100).call(g);return m.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Ct(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),m.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Ct(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),p.selectAll("text").attr("font-size",u.styles.textSize).style("color",Ct(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`0 -${r.tickPadding+kh}`).style("transform",h),p}const P2=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainerPosition$:l,isSeriesSeprate$:c})=>{const f=new et,h=at(t,"container"),p=at(t,"xAxisG"),d=at(t,"xAxis"),g=at(t,"groupingLabel"),m=B({computedData:n.pipe(rt((S,_)=>S.length===_.length)),isSeriesSeprate:c}).pipe(I(f),Y(async S=>S),O(S=>S.isSeriesSeprate?S.computedData:[S.computedData[0]]),O((S,_)=>e.selectAll(`g.${h}`).data(S,T=>T[0]?T[0].seriesIndex:_).join("g").classed(h,!0))),b=m.pipe(I(f),O((S,_)=>S.selectAll(`g.${p}`).data([p]).join("g").classed(p,!0)));B({containerSelection:m,gridContainerPosition:l}).pipe(I(f),Y(async S=>S)).subscribe(S=>{S.containerSelection.attr("transform",(_,T)=>{const $=S.gridContainerPosition[T]??S.gridContainerPosition[0],N=$.translate,R=$.scale;return`translate(${N[0]}, ${N[1]}) scale(${R[0]}, ${R[1]})`})}),B({axisSelection:b,gridAxesTransform:a}).pipe(I(f),Y(async S=>S)).subscribe(S=>{S.axisSelection.style("transform",S.gridAxesTransform.value)});const x=B({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainerPosition:l}).pipe(I(f),Y(async S=>S),O(S=>{const _=`translate(${S.gridAxesReverseTransform.translate[0]}px, ${S.gridAxesReverseTransform.translate[1]}px)`,T=`rotate(${S.gridAxesReverseTransform.rotate}deg) rotateX(${S.gridAxesReverseTransform.rotateX}deg) rotateY(${S.gridAxesReverseTransform.rotateY}deg)`,$=`scale(${1/S.gridContainerPosition[0].scale[0]}, ${1/S.gridContainerPosition[0].scale[1]})`,R=`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`${_} ${T} ${$} ${R}`}),rt()),v=B({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(I(f),Y(async S=>S),O(S=>{const T=S.computedData[0]?S.computedData[0].length-1:0,$=S.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-S.fullDataFormatter.grid.groupAxis.scalePadding:S.fullDataFormatter.grid.groupAxis.scaleDomain[0]-S.fullDataFormatter.grid.groupAxis.scalePadding,N=S.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?T+S.fullDataFormatter.grid.groupAxis.scalePadding:S.fullDataFormatter.grid.groupAxis.scaleDomain[1]+S.fullDataFormatter.grid.groupAxis.scalePadding;return[$,N]}),Pt(1)),y=B({groupScaleDomain:v,gridAxesSize:u}).pipe(I(f),Y(async S=>S),O(S=>eu().domain(S.groupScaleDomain).range([0,S.gridAxesSize.width]))),w=n.pipe(O(S=>(S[0]??[]).map(_=>_.groupLabel))),D=B({fullDataFormatter:i,fullParams:r}).pipe(I(f),Y(async S=>S),O(S=>{let _="middle",T="hanging";return S.fullDataFormatter.grid.groupAxis.position==="bottom"?(_=S.fullParams.tickTextRotate?"end":"middle",T="hanging"):S.fullDataFormatter.grid.groupAxis.position==="top"?(_=S.fullParams.tickTextRotate?"end":"middle",T="auto"):S.fullDataFormatter.grid.groupAxis.position==="left"?(_="end",T="middle"):S.fullDataFormatter.grid.groupAxis.position==="right"&&(_="start",T="middle"),{textAnchor:_,dominantBaseline:T}})),P=i.pipe(I(f),O(S=>{let _="start",T="hanging";return S.grid.groupAxis.position==="bottom"?T="hanging":S.grid.groupAxis.position==="top"?T="auto":S.grid.groupAxis.position==="left"?_="end":S.grid.groupAxis.position==="right"&&(_="start"),S.grid.valueAxis.position==="left"?_="start":S.grid.valueAxis.position==="right"?_="end":S.grid.valueAxis.position==="bottom"?T="auto":S.grid.valueAxis.position==="top"&&(T="hanging"),{textAnchor:_,dominantBaseline:T}}));return B({axisSelection:b,params:r,tickTextAlign:D,axisLabelAlign:P,gridAxesSize:u,fullDataFormatter:i,chartParams:o,groupScale:y,groupScaleDomain:v,groupLabels:w,textTransform:x}).pipe(I(f),Y(async S=>S)).subscribe(S=>{vk({selection:S.axisSelection,xAxisClassName:d,groupingLabelClassName:g,params:S.params,tickTextAlign:S.tickTextAlign,axisLabelAlign:S.axisLabelAlign,gridAxesSize:S.gridAxesSize,fullDataFormatter:S.fullDataFormatter,chartParams:S.chartParams,groupScale:S.groupScale,groupScaleDomain:S.groupScaleDomain,groupLabels:S.groupLabels,textTransform:S.textTransform})}),()=>{f.next(void 0)}},T2="GroupAxis",xk=se(T2,Gu)(({selection:t,name:e,observer:n,subject:r})=>{const i=new et,o=P2(T2,{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$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}}),L2=6;function _k({selection:t,yAxisClassName:e,textClassName:n,fullParams:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,fullChartParams:u,valueScale:l,textTransform:c,minAndMax:f}){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((b,x,v)=>{X(v[x]).selectAll("text").data([b]).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",Ct(r.labelColorType,u)).style("transform",c).text(y=>s.grid.valueAxis.label)}).attr("transform",b=>`translate(${-b.tickPadding+r.labelOffset[0]}, ${a.height+b.tickPadding+r.labelOffset[1]})`);const p=f[1]-f[0],d=Gg(l).scale(l).ticks(p>r.ticks?r.ticks:f[0]===0&&f[1]===0?1:Math.ceil(p)).tickFormat(b=>Ch(b,r.tickFormat)).tickSize(r.tickFullLine==!0?-a.width:L2).tickPadding(r.tickPadding),g=h.transition().duration(100).call(d);return g.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Ct(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),g.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Ct(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),h.selectAll("text").attr("font-size",u.styles.textSize).style("color",Ct(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`-${r.tickPadding+L2} 0`).style("transform",c),h}const ai=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainerPosition$:l,isSeriesSeprate$:c})=>{const f=new et,h=at(t,"container"),p=at(t,"yAxisG"),d=at(t,"yAxis"),g=at(t,"text"),m=B({computedData:n.pipe(rt((P,S)=>P.length===S.length)),isSeriesSeprate:c}).pipe(I(f),Y(async P=>P),O(P=>P.isSeriesSeprate?P.computedData:[P.computedData[0]]),O((P,S)=>e.selectAll(`g.${h}`).data(P,_=>_[0]?_[0].seriesIndex:S).join("g").classed(h,!0))),b=m.pipe(I(f),O((P,S)=>P.selectAll(`g.${p}`).data([p]).join("g").classed(p,!0)));B({containerSelection:m,gridContainerPosition:l}).pipe(I(f),Y(async P=>P)).subscribe(P=>{P.containerSelection.attr("transform",(S,_)=>{const T=P.gridContainerPosition[_]??P.gridContainerPosition[0],$=T.translate,N=T.scale;return`translate(${$[0]}, ${$[1]}) scale(${N[0]}, ${N[1]})`})}),B({axisSelection:b,gridAxesTransform:a}).pipe(I(f),Y(async P=>P)).subscribe(P=>{P.axisSelection.style("transform",P.gridAxesTransform.value)});const x=B({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainerPosition:l}).pipe(I(f),Y(async P=>P),O(P=>{const S=`translate(${P.gridAxesReverseTransform.translate[0]}px, ${P.gridAxesReverseTransform.translate[1]}px)`,_=`rotate(${P.gridAxesReverseTransform.rotate}deg) rotateX(${P.gridAxesReverseTransform.rotateX}deg) rotateY(${P.gridAxesReverseTransform.rotateY}deg)`,T=`scale(${1/P.gridContainerPosition[0].scale[0]}, ${1/P.gridContainerPosition[0].scale[1]})`,N=`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`${S} ${_} ${T} ${N}`}),rt()),v=new pt(P=>{B({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(I(f),Y(async S=>S)).subscribe(S=>{const T=S.computedData[0]?S.computedData[0].length-1:0,$=S.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-S.fullDataFormatter.grid.groupAxis.scalePadding:S.fullDataFormatter.grid.groupAxis.scaleDomain[0]-S.fullDataFormatter.grid.groupAxis.scalePadding,N=S.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?T+S.fullDataFormatter.grid.groupAxis.scalePadding:S.fullDataFormatter.grid.groupAxis.scaleDomain[1]+S.fullDataFormatter.grid.groupAxis.scalePadding,R=S.computedData.map((L,M)=>L.filter((z,U)=>U>=$&&U<=N)),A=LR(R.flat());P.next(A)})}),y=new pt(P=>{B({fullDataFormatter:i,gridAxesSize:u,minAndMax:v}).pipe(I(f),Y(async S=>S)).subscribe(S=>{const _=ag({maxValue:S.minAndMax[1],minValue:S.minAndMax[0],axisWidth:S.gridAxesSize.height,scaleDomain:S.fullDataFormatter.grid.valueAxis.scaleDomain,scaleRange:S.fullDataFormatter.grid.valueAxis.scaleRange});P.next(_)})}),w=i.pipe(I(f),O(P=>{let S="start",_="hanging";return P.grid.valueAxis.position==="left"?(S="end",_="middle"):P.grid.valueAxis.position==="right"?(S="start",_="middle"):P.grid.valueAxis.position==="bottom"?(S="middle",_="hanging"):P.grid.valueAxis.position==="top"&&(S="middle",_="auto"),{textAnchor:S,dominantBaseline:_}})),D=i.pipe(I(f),O(P=>{let S="start",_="hanging";return P.grid.groupAxis.position==="bottom"?_="auto":P.grid.groupAxis.position==="top"?_="hanging":P.grid.groupAxis.position==="left"?S="start":P.grid.groupAxis.position==="right"&&(S="end"),P.grid.valueAxis.position==="left"?S="end":P.grid.valueAxis.position==="right"?S="start":P.grid.valueAxis.position==="bottom"?_="hanging":P.grid.valueAxis.position==="top"&&(_="auto"),{textAnchor:S,dominantBaseline:_}}));return B({axisSelection:b,fullParams:r,tickTextAlign:w,axisLabelAlign:D,computedData:n,gridAxesSize:u,fullDataFormatter:i,fullChartParams:o,valueScale:y,textTransform:x,minAndMax:v}).pipe(I(f),Y(async P=>P)).subscribe(P=>{_k({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})}),()=>{f.next(void 0)}},C2="ValueAxis",wk=se(C2,zu)(({selection:t,name:e,observer:n,subject:r})=>{const i=new et,o=ai(C2,{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$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}}),E2="ValueStackAxis",$k=se(E2,cp)(({selection:t,name:e,observer:n,subject:r})=>{const i=new et,o=ai(E2,{selection:t,computedData$:n.computedStackedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}}),R2="ScalingArea",Sk=at(R2,"rect"),Ak=se(R2,fp)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new et,a=e.insert("rect","g").classed(Sk,!0).attr("opacity",0);let s={k:1,x:0,y:0};r.layout$.pipe(I(o)).subscribe(l=>{a.attr("width",l.width).attr("height",l.height).attr("x",l.left).attr("y",l.top)});const u=r.computedData$.pipe(O(l=>l[0]?l[0].length-1:0),rt());return B({initGroupAxis:r.fullDataFormatter$.pipe(O(l=>l.grid.groupAxis),$_()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:u,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(I(o),Y(async l=>l)).subscribe(l=>{const f=l.groupMaxIndex,h=l.initGroupAxis.scaleDomain[0]==="auto"?0-l.initGroupAxis.scalePadding:l.initGroupAxis.scaleDomain[0]-l.initGroupAxis.scalePadding,p=l.initGroupAxis.scaleDomain[1]==="auto"?f+l.initGroupAxis.scalePadding:l.initGroupAxis.scaleDomain[1]+l.initGroupAxis.scalePadding,g=ag({maxValue:l.groupMaxIndex,minValue:0,axisWidth:l.axisSize.width,scaleDomain:[h,p],scaleRange:[0,1]}).copy(),m=a2().on("zoom",function(x){const v=x.transform,y=P=>{const S=Math.round(P);return Math.min(f,Math.max(0,S))},w=l.fullDataFormatter.grid.groupAxis.position==="bottom"||l.fullDataFormatter.grid.groupAxis.position==="top"?v.rescaleX(g).domain().map(y):v.rescaleY(g).domain().map(y);w[0]<=0&&w[1]>=f?v.k<s.k&&(v.k=s.k,v.x=s.x,v.y=s.y):w[1]-w[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 D={...l.fullDataFormatter,grid:{...l.fullDataFormatter.grid,groupAxis:{...l.fullDataFormatter.grid.groupAxis,scaleDomain:w}}};i.dataFormatter$.next(D)});e.call(m)}),()=>{o.next(void 0),a.remove()}});function k2(t,e){let n=new pt(()=>{});return t.each(function(){const r=Qu(this,e);n=Ju(n,r)}),n}const Eu="GroupAux",Ih=at(Eu,"label-box");function Mk({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function Dk({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=at(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),s=a.enter().append("line").classed(o,!0).style("stroke",l=>Ct(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",l=>l.x1).attr("y1",l=>l.y1).attr("x2",l=>l.x2).attr("y2",l=>l.y2),a.transition().duration(50).attr("x1",l=>l.x1).attr("y1",l=>l.y1).attr("x2",l=>l.x2).attr("y2",l=>l.y2),u}function Pk(t){t.selectAll("line").data([]).exit().remove()}function Tk({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:Ch(t,n.labelTextFormat)}]:[]}function Lk({selection:t,labelData:e,fullParams:n,fullDataFormatter:r,fullChartParams:i,labelTransform:o,textSizePx:a}){const s=a+4,u=t.selectAll(`g.${Ih}`).data(e),l=u.enter().append("g").classed(Ih,!0).style("cursor","pointer"),c=l.merge(u);return l.attr("transform",(f,h)=>`translate(${f.x}, ${f.y})`),u.transition().duration(50).attr("transform",(f,h)=>`translate(${f.x}, ${f.y})`),u.exit().remove(),c.each((f,h,p)=>{const d=u2(f.text,a)+12;let g=-d/2,m=-2;r.grid.groupAxis.position==="bottom"?(g=-d/2,m=2):r.grid.groupAxis.position==="left"?(g=-d+2,m=-s/2):r.grid.groupAxis.position==="right"?(g=-2,m=-s/2):r.grid.groupAxis.position==="top"&&(g=-d/2,m=-s+2);const b=X(p[h]).selectAll("rect").data([f]),x=b.enter().append("rect").attr("height",`${s}px`).attr("fill",w=>Ct(n.labelColorType,i)).attr("x",g).attr("y",m).attr("rx",5).attr("ry",5).style("cursor","pointer");b.merge(x).attr("width",w=>`${d}px`).style("transform",o),b.exit().remove();const v=X(p[h]).selectAll("text").data([f]),y=v.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");v.merge(y).text(w=>w.text).style("transform",o).attr("fill",w=>Ct(n.labelTextColorType,i)).attr("font-size",i.styles.textSize).attr("x",g+6).attr("y",m),v.exit().remove()}),c}function Ck(t){t.selectAll(`g.${Ih}`).data([]).exit().remove()}const Ek=se(Eu,Fu)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new et;let a=!1;const s=e.insert("rect","g").classed(at(Eu,"rect"),!0).attr("opacity",0),{seriesSelection$:u,axesSelection$:l,defsSelection$:c,graphicGSelection$:f}=ar({selection:t,pluginName:Eu,clipPathID:"test",seriesLabels$:i.seriesLabels$,gridContainerPosition$:i.gridContainerPosition$,gridAxesTransform$:i.gridAxesTransform$,gridGraphicTransform$:i.gridGraphicTransform$});i.layout$.pipe(I(o)).subscribe(y=>{s.attr("width",y.rootWidth).attr("height",y.rootHeight)});const h=new pt(y=>{B({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(I(o),Y(async w=>w)).subscribe(w=>{const P=w.computedData[0]?w.computedData[0].length-1:0,S=w.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-w.fullDataFormatter.grid.groupAxis.scalePadding:w.fullDataFormatter.grid.groupAxis.scaleDomain[0]-w.fullDataFormatter.grid.groupAxis.scalePadding,_=w.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?P+w.fullDataFormatter.grid.groupAxis.scalePadding:w.fullDataFormatter.grid.groupAxis.scaleDomain[1]+w.fullDataFormatter.grid.groupAxis.scalePadding,T=w.computedData[0]?w.computedData[0].length:0;let $=w.fullDataFormatter.grid.seriesDirection==="row"?(w.computedData[0]??[]).map(L=>L.groupLabel):w.computedData.map(L=>L[0].groupLabel);const N=new Array(T).fill(0).map((L,M)=>$[M]!=null?$[M]:String(M)).filter((L,M)=>M>=S&&M<=_),R=w.fullDataFormatter.grid.groupAxis.scalePadding,A=p3({axisLabels:N,axisWidth:w.gridAxesSize.width,padding:R});y.next(A)})}),p=Eh({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),d=i.fullChartParams$.pipe(I(o),O(y=>y.highlightTarget),rt()),g=k2(e,"mousemove").pipe(I(o)),m=B({fullParams:i.fullParams$,fullDataFormatter:i.fullDataFormatter$,gridAxesReverseTransform:i.gridAxesReverseTransform$,gridContainerPosition:i.gridContainerPosition$}).pipe(I(o),Y(async y=>y),O(y=>{const w=`translate(${y.gridAxesReverseTransform.translate[0]}px, ${y.gridAxesReverseTransform.translate[1]}px)`,D=`rotate(${y.gridAxesReverseTransform.rotate}deg) rotateX(${y.gridAxesReverseTransform.rotateX}deg) rotateY(${y.gridAxesReverseTransform.rotateY}deg)`,P=`scale(${1/y.gridContainerPosition[0].scale[0]}, ${1/y.gridContainerPosition[0].scale[1]})`,_=`rotate(${y.fullDataFormatter.grid.groupAxis.position==="left"&&y.fullDataFormatter.grid.valueAxis.position==="top"||y.fullDataFormatter.grid.groupAxis.position==="right"&&y.fullDataFormatter.grid.valueAxis.position==="bottom"?180:0}deg)`;return`${w} ${D} ${P} ${_}`}),rt()),b=i.gridContainerPosition$.pipe(I(o),O(y=>y.reduce((D,P)=>P.columnIndex>D?P.columnIndex:D,0)+1),rt()),x=i.gridContainerPosition$.pipe(I(o),O(y=>y.reduce((D,P)=>P.rowIndex>D?P.rowIndex:D,0)+1),rt());B({axesSelection:l,columnAmount:b,rowAmount:x,layout:i.layout$,rootMousemove:g,gridGroupPositionFn:p,computedData:i.computedData$,groupScale:h,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullDataFormatter:i.fullDataFormatter$,fullChartParams:i.fullChartParams$,highlightTarget:d,labelTransform:m,GroupDataMap:i.GroupDataMap$,textSizePx:i.textSizePx$}).subscribe(y=>{const w={offsetX:y.rootMousemove.offsetX*y.columnAmount%y.layout.rootWidth,offsetY:y.rootMousemove.offsetY*y.rowAmount%y.layout.rootHeight},{groupIndex:D,groupLabel:P}=y.gridGroupPositionFn(w),S=y.groupScale(P)??0,_=Mk({groupLabel:P,axisX:S,axisHeight:y.gridAxesSize.height,fullParams:y.fullParams});Dk({selection:y.axesSelection,pluginName:n,lineData:_,fullParams:y.fullParams,fullChartParams:y.fullChartParams});const T=Tk({groupLabel:P,axisX:S,fullParams:y.fullParams});Lk({selection:y.axesSelection,labelData:T,fullParams:y.fullParams,fullDataFormatter:y.fullDataFormatter,fullChartParams:y.fullChartParams,labelTransform:y.labelTransform,textSizePx:y.textSizePx}).on("mouseover",(N,R)=>{N.stopPropagation(),a=!0,r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:y.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:y.GroupDataMap.get(P)??[],groupIndex:D,groupLabel:P,event:N,data:y.computedData})}).on("mousemove",(N,R)=>{N.stopPropagation(),r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:y.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:y.GroupDataMap.get(P)??[],groupIndex:D,groupLabel:P,event:N,data:y.computedData})}).on("mouseout",(N,R)=>{N.stopPropagation(),a=!1,r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:y.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:y.GroupDataMap.get(P)??[],groupIndex:D,groupLabel:P,event:N,data:y.computedData})}).on("click",(N,R)=>{N.stopPropagation(),r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:y.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:y.GroupDataMap.get(P)??[],groupIndex:D,groupLabel:P,event:N,data:y.computedData})})});const v=k2(s,"mouseout").pipe(I(o));return B({rootRectMouseout:v,axesSelection:l}).pipe(I(o),Y(async y=>y)).subscribe(y=>{setTimeout(()=>{a!=!0&&(Pk(y.axesSelection),Ck(y.axesSelection))})}),()=>{o.next(void 0),s.remove()}}),I2={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"},Nh={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",ticks:"all",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]};Nh.tickFormat.toString=()=>"text => text";const Ru={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]},Rk={...Ru},N2={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1,gridIndexes:[0]},F2={barWidth:0,barGroupPadding:10,barRadius:!1,gridIndexes:[0]},G2={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0],gridIndexes:[0]},z2={lineCurve:"curveLinear",lineWidth:2,gridIndexes:[1]},O2={lineCurve:"curveLinear",linearGradientOpacity:[1,0],gridIndexes:[1]},U2={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1,gridIndexes:[1]},Fh={firstAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},secondAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},gridIndexes:[0,1]},B2={...Fh},Y2="MultiGridLegend",kk=pe(Y2,I2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new et,o=n.multiGridEachDetail$.pipe(I(i),O(l=>l.map((f,h)=>f.SeriesDataMap$.pipe(O(p=>Array.from(p.keys()))))),Y(l=>B(l)),O(l=>l.flat())),a=B({fullParams:n.fullParams$,computedData:n.computedData$}).pipe(I(i),Y(async l=>l),O(l=>l.computedData.map((c,f)=>{const h=xl(l.fullParams.gridList[f]??{},{listRectWidth:l.fullParams.listRectWidth,listRectHeight:l.fullParams.listRectHeight,listRectRadius:l.fullParams.listRectRadius});return c.map(p=>h)}).flat())),s=B({fullParams:n.fullParams$,seriesList:a}).pipe(I(i),Y(async l=>l),O(l=>({...l.fullParams,seriesList:l.seriesList}))),u=Cu(Y2,{rootSelection:e,seriesLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),u()}}),Ce=t=>{const e=t.fullParams$.pipe(O(n=>n.gridIndexes),rt(),Pt(1));return B({multiGridEachDetail:t.multiGridEachDetail$,gridIndexes:e}).pipe(O(n=>n.gridIndexes==="all"?n.multiGridEachDetail:n.gridIndexes.map(r=>n.multiGridEachDetail[r]??n.multiGridEachDetail[0])))},Gh="MultiBars",H2=at(Gh,"grid"),Ik=pe(Gh,N2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${H2}`).data(s).join("g").attr("class",H2).each((u,l,c)=>{const f=X(c[l]),h=u.dataFormatter$.pipe(I(i),O(p=>p.grid.separateSeries),rt(),Pt(1));o[l]=Rh(Gh,{selection:f,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$:h,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),zh="MultiBarStack",W2=at(zh,"grid"),Nk=pe(zh,F2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${W2}`).data(s).join("g").attr("class",W2).each((u,l,c)=>{const f=X(c[l]),h=u.dataFormatter$.pipe(I(i),O(p=>p.grid.separateSeries),rt(),Pt(1));o[l]=b2(zh,{selection:f,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$:h,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Oh="MultiBarsTriangle",V2=at(Oh,"grid"),Fk=pe(Oh,G2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${V2}`).data(s).join("g").attr("class",V2).each((u,l,c)=>{const f=X(c[l]),h=u.dataFormatter$.pipe(I(i),O(p=>p.grid.separateSeries),rt(),Pt(1));o[l]=w2(Oh,{selection:f,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$:h,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Uh="MultiLines",j2=at(Uh,"grid"),Gk=pe(Uh,z2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${j2}`).data(s).join("g").attr("class",j2).each((u,l,c)=>{const f=X(c[l]);o[l]=l2(Uh,{selection:f,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())}}),Bh="MultiLineAreas",q2=at(Bh,"grid"),zk=pe(Bh,O2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${q2}`).data(s).join("g").attr("class",q2).each((u,l,c)=>{const f=X(c[l]);o[l]=f2(Bh,{selection:f,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())}}),Yh="MultiDots",X2=at(Yh,"grid"),Ok=pe(Yh,U2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${X2}`).data(s).join("g").attr("class",X2).each((u,l,c)=>{const f=X(c[l]);o[l]=S2(Yh,{selection:f,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())}}),Hh="MultiGroupAxis",Z2=at(Hh,"grid"),Uk=pe(Hh,Nh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Z2}`).data(s).join("g").attr("class",Z2).each((u,l,c)=>{const f=X(c[l]),h=u.dataFormatter$.pipe(I(i),O(p=>p.grid.separateSeries),rt(),Pt(1));o[l]=P2(Hh,{selection:f,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$:h})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Wh="MultiValueAxis",K2=at(Wh,"grid"),Bk=pe(Wh,Ru)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${K2}`).data(s).join("g").attr("class",K2).each((u,l,c)=>{const f=X(c[l]),h=u.dataFormatter$.pipe(I(i),O(p=>p.grid.separateSeries),rt(),Pt(1));o[l]=ai(Wh,{selection:f,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$:h})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Vh="MultiValueStackAxis",Q2=at(Vh,"grid"),Yk=pe(Vh,Ru)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Q2}`).data(s).join("g").attr("class",Q2).each((u,l,c)=>{const f=X(c[l]),h=u.dataFormatter$.pipe(I(i),O(p=>p.grid.separateSeries),rt(),Pt(1));o[l]=ai(Vh,{selection:f,computedData$:u.computedStackedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:h})})}),()=>{i.next(void 0),o.forEach(s=>s())}});function Hk(t){let e=Math.floor(Math.sqrt(t)),n=Math.ceil(t/e);for(;e*n<t;)n++;return{rowAmount:e,columnAmount:n}}function J2(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:o}=e.rowAmount*e.columnAmount>=n?e:Hk(n);return new Array(n).fill(null).map((a,s)=>{const u=s%o,l=Math.floor(s/o),c=(t.width-r*(o-1))/o,f=(t.height-r*(i-1))/i,h=u*c+u*r,p=l*f+l*r,d=[h,p],g=[c/t.width,f/t.height];return{slotIndex:s,rowIndex:l,columnIndex:u,translate:d,scale:g}})}const tx=({fullDataFormatter$:t,layout$:e})=>{const n=new et;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,l=0,c=0,f=0,h=0;return i.position==="bottom"?o.position==="left"?(f=180,l=s):o.position==="right"?(f=180,h=180,u=a,l=s):(f=180,l=s):i.position==="top"?o.position==="left"||(o.position==="right"?(h=180,u=a):(f=180,l=s)):i.position==="left"?o.position==="bottom"?(c=-90,l=s):o.position==="top"?(c=-90,h=180):(f=180,l=s):i.position==="right"?o.position==="bottom"?(c=-90,f=180,l=s,u=a):o.position==="top"?(c=-90,f=180,h=180,u=a):(f=180,l=s):(f=180,l=s),{translate:[u,l],scale:[1,1],rotate:c,rotateX:f,rotateY:h,value:`translate(${u}px, ${l}px) rotate(${c}deg) rotateX(${f}deg) rotateY(${h}deg)`}}return new pt(i=>(B({fullDataFormatter:t,layout:e}).pipe(I(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)}))},ex=({gridAxesTransform$:t})=>t.pipe(O(e=>{const n=[0,0],r=[1/e.scale[0],1/e.scale[1]],i=e.rotate*-1,o=e.rotateX*-1,a=e.rotateY*-1;return{translate:n,scale:r,rotate:i,rotateX:o,rotateY:a,value:`translate(${n[0]}px, ${n[1]}px) rotate(${i}deg) rotateX(${o}deg) rotateY(${a}deg)`}})),nx=({computedData$:t,fullDataFormatter$:e,layout$:n})=>B({computedData:t,fullDataFormatter:e,layout:n}).pipe(Y(async i=>i),O(i=>{if(i.fullDataFormatter.grid.separateSeries)return J2(i.layout,i.fullDataFormatter.container,i.computedData.length);{const o=J2(i.layout,i.fullDataFormatter.container,1);return i.computedData.map((a,s)=>o[0])}})),jh="OverlappingValueAxes",rx=at(jh,"grid"),Wk=pe(jh,Fh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[],a=r.fullParams$.pipe(I(i),O(c=>c.gridIndexes[0])),s=r.fullParams$.pipe(I(i),O(c=>c.gridIndexes[1])),u=B({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(I(i),Y(async c=>c),O(c=>{c.fullDataFormatter.gridList[c.secondGridIndex]||(c.fullDataFormatter.gridList[c.secondGridIndex]=Object.assign({},c.fullDataFormatter.gridList[c.firstGridIndex]));let f="";return c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position==="left"?f="right":c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position==="bottom"?f="top":c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position==="top"?f="bottom":c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position==="right"&&(f="left"),{type:"grid",visibleFilter:c.fullDataFormatter.visibleFilter,grid:{...c.fullDataFormatter.gridList[c.secondGridIndex],valueAxis:{...c.fullDataFormatter.gridList[c.secondGridIndex].valueAxis,position:f}},container:{...c.fullDataFormatter.container}}}));return Bo(r).pipe(I(i),O(c=>({...c,fullParams$:c.fullParams$.pipe(O(f=>(f.gridIndexes.length>2&&(f.gridIndexes.length=2),f)))})),Y(c=>Ce(c)),O(c=>c.map((f,h)=>{if(h===0)return f;const p=tx({fullDataFormatter$:u,layout$:r.layout$}),d=ex({gridAxesTransform$:p}),g=nx({computedData$:f.computedData$,fullDataFormatter$:u,layout$:r.layout$});return{...f,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:g}}))).pipe(I(i)).subscribe(c=>{o.forEach(f=>f()),t.selectAll(`g.${rx}`).data(c).join("g").attr("class",rx).each((f,h,p)=>{if(h>1)return;const d=X(p[h]);o[h]=ai(jh,{selection:d,computedData$:f.computedData$,fullParams$:r.fullParams$.pipe(O(g=>h===0?g.firstAxis:g.secondAxis)),fullDataFormatter$:f.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:f.gridAxesTransform$,gridAxesReverseTransform$:f.gridAxesReverseTransform$,gridAxesSize$:f.gridAxesSize$,gridContainerPosition$:f.gridContainerPosition$,isSeriesSeprate$:f.isSeriesSeprate$})})}),()=>{i.next(void 0),o.forEach(c=>c())}}),qh="OverlappingValueStackAxes",ix=at(qh,"grid"),Vk=pe(qh,B2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=[],a=r.fullParams$.pipe(I(i),O(c=>c.gridIndexes[0])),s=r.fullParams$.pipe(I(i),O(c=>c.gridIndexes[1])),u=B({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(I(i),Y(async c=>c),O(c=>{c.fullDataFormatter.gridList[c.secondGridIndex]||(c.fullDataFormatter.gridList[c.secondGridIndex]=Object.assign({},c.fullDataFormatter.gridList[c.firstGridIndex]));let f="";return c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position==="left"?f="right":c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position==="bottom"?f="top":c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position==="top"?f="bottom":c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position==="right"&&(f="left"),{type:"grid",visibleFilter:c.fullDataFormatter.visibleFilter,grid:{...c.fullDataFormatter.gridList[c.secondGridIndex],valueAxis:{...c.fullDataFormatter.gridList[c.secondGridIndex].valueAxis,position:f}},container:{...c.fullDataFormatter.container}}}));return Bo(r).pipe(I(i),O(c=>({...c,fullParams$:c.fullParams$.pipe(O(f=>(f.gridIndexes.length>2&&(f.gridIndexes.length=2),f)))})),Y(c=>Ce(c)),O(c=>c.map((f,h)=>{if(h===0)return f;const p=tx({fullDataFormatter$:u,layout$:r.layout$}),d=ex({gridAxesTransform$:p}),g=nx({computedData$:f.computedData$,fullDataFormatter$:u,layout$:r.layout$});return{...f,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:g}}))).pipe(I(i)).subscribe(c=>{o.forEach(f=>f()),t.selectAll(`g.${ix}`).data(c).join("g").attr("class",ix).each((f,h,p)=>{if(h>1)return;const d=X(p[h]);o[h]=ai(qh,{selection:d,computedData$:h===0?f.computedStackedData$:f.computedData$,fullParams$:r.fullParams$.pipe(O(g=>h===0?g.firstAxis:g.secondAxis)),fullDataFormatter$:f.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:f.gridAxesTransform$,gridAxesReverseTransform$:f.gridAxesReverseTransform$,gridAxesSize$:f.gridAxesSize$,gridContainerPosition$:f.gridContainerPosition$,isSeriesSeprate$:f.isSeriesSeprate$})})}),()=>{i.next(void 0),o.forEach(c=>c())}}),ox={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},Xh={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};Xh.textRenderFn.toString=()=>`(eventData) => {
15
+ `})}function JR({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 tk({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 bx=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,fullDataFormatter$:a,seriesLabels$:s,SeriesDataMap$:u,GroupDataMap$:l,fullParams$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,isSeriesSeprate$:y,event$:v})=>{const x=new nt,b=$n(t,"clipPath-box"),_=at(t,"pathG"),M=at(t,"path"),{seriesSelection$:D,axesSelection$:$,defsSelection$:w,graphicGSelection$:P}=ar({selection:e,pluginName:t,clipPathID:b,seriesLabels$:s,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:p});p.pipe(I(x),G(L=>-L.translate[1]/L.scale[1]));const S=o.pipe(G(L=>L.map(F=>F[0]?F[0].axisY-F[0].axisYFromZero:0)),tt()),N=Y({computedData:n,visibleComputedData:i,params:c,gridAxesSize:d,isSeriesSeprate:y}).pipe(I(x),H(async L=>L),G(L=>L.params.barWidth?L.params.barWidth:L.isSeriesSeprate?yx({axisWidth:L.gridAxesSize.width,groupAmount:L.computedData[0]?L.computedData[0].length:0,barAmountOfGroup:1,barPadding:L.params.barPadding,barGroupPadding:L.params.barGroupPadding}):yx({axisWidth:L.gridAxesSize.width,groupAmount:L.computedData[0]?L.computedData[0].length:0,barAmountOfGroup:L.visibleComputedData.length,barPadding:L.params.barPadding,barGroupPadding:L.params.barGroupPadding}))),R=i.pipe(I(x),G(L=>{const F=new Set;return L.forEach(j=>{j.forEach(Q=>{F.add(Q.groupLabel)})}),Array.from(F)})),A=new dt(L=>{Y({seriesLabels:s,barWidth:N,params:c}).pipe(I(x),H(async F=>F)).subscribe(F=>{const j=qR(F.barWidth,F.seriesLabels,F.params);L.next(j)})}),C=f.pipe(I(x),G(L=>L.transitionDuration),tt()),T=new dt(L=>{Y({groupLabels:R,transitionDuration:C}).pipe(H(async F=>F)).subscribe(F=>{const j=XR(F.groupLabels.length,F.transitionDuration);L.next(j)})}).pipe(I(x),tt()),O=new dt(L=>{Y({groupLabels:R,transitionDuration:C}).pipe(H(async F=>F)).subscribe(F=>{const j=ZR(F.groupLabels.length,F.transitionDuration);L.next(j)})}).pipe(I(x),tt());Y({defsSelection:w,gridAxesSize:d}).pipe(I(x),H(async L=>L)).subscribe(L=>{const F=[{id:b,width:L.gridAxesSize.width,height:L.gridAxesSize.height}];JR({defsSelection:L.defsSelection,clipPathData:F})});const z=f.pipe(I(x),G(L=>L.highlightTarget),tt()),k=s.pipe(I(x),G(L=>L.map((F,j)=>$n(t,`lineargradient-${F}`)))),E=Y({graphicGSelection:P,defsSelection:w,computedData:n,visibleComputedLayoutData:o,linearGradientIds:k,zeroYArr:S,groupLabels:R,barScale:A,params:c,chartParams:f,barWidth:N,delayGroup:T,transitionItem:O,isSeriesSeprate:y}).pipe(I(x),H(async L=>L),G(L=>(QR({defsSelection:L.defsSelection,computedData:L.computedData,linearGradientIds:L.linearGradientIds,params:L.params}),KR({graphicGSelection:L.graphicGSelection,pathGClassName:_,pathClassName:M,visibleComputedLayoutData:L.visibleComputedLayoutData,linearGradientIds:L.linearGradientIds,zeroYArr:L.zeroYArr,groupLabels:L.groupLabels,barScale:L.barScale,params:L.params,chartParams:L.chartParams,barWidth:L.barWidth,delayGroup:L.delayGroup,transitionItem:L.transitionItem,isSeriesSeprate:L.isSeriesSeprate}))));return Y({barSelection:E,computedData:n,highlightTarget:z,SeriesDataMap:u,GroupDataMap:l}).subscribe(L=>{L.barSelection.on("mouseover",(F,j)=>{F.stopPropagation(),v.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:L.highlightTarget,datum:j,gridIndex:j.gridIndex,series:L.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:L.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:F,data:L.computedData})}).on("mousemove",(F,j)=>{F.stopPropagation(),v.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:L.highlightTarget,datum:j,gridIndex:j.gridIndex,series:L.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:L.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:F,data:L.computedData})}).on("mouseout",(F,j)=>{F.stopPropagation(),v.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:L.highlightTarget,datum:j,gridIndex:j.gridIndex,series:L.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:L.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:F,data:L.computedData})}).on("click",(F,j)=>{F.stopPropagation(),v.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:L.highlightTarget,datum:j,gridIndex:j.gridIndex,series:L.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:L.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:F,data:L.computedData})})}),Y({barSelection:E,highlight:g.pipe(G(L=>L.map(F=>F.id))),fullChartParams:f}).pipe(I(x),H(async L=>L)).subscribe(L=>{tk({selection:L.barSelection,ids:L.highlight,fullChartParams:L.fullChartParams})}),()=>{x.next(void 0)}},vx="BarsTriangle",ek=se(vx,up)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=bx(vx,{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$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}});function nk({graphicGSelection:t,circleGClassName:e,circleClassName:n,visibleComputedLayoutData:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=c=>{const f=c.size();return o.transitionDuration/f};let u=0;return t.each((c,f,h)=>{Z(h[f]).selectAll("g").data(r[f],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,v)=>d*u).attr("opacity",1),m=>m.transition().duration(50).attr("opacity",1),m=>m.remove()).attr("r",i.radius).attr("fill",(m,y)=>Tu({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,y)=>Tu({datum:m,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[f][0]??1}, ${a[f][1]??1})`)})}),t.selectAll(`circle.${n}`)}function rk({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 ik({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 xx=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:u,fullParams$:l,fullChartParams$:c,gridAxesTransform$:f,gridGraphicTransform$:h,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,event$:y})=>{const v=new nt,x=$n(t,"clipPath-box"),b=at(t,"circleG"),_=at(t,"circle"),{seriesSelection$:M,axesSelection$:D,defsSelection$:$,graphicGSelection$:w}=ar({selection:e,pluginName:t,clipPathID:x,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:h}),P=Y({computedData:n,gridGraphicReverseScale:p}).pipe(I(v),H(async A=>A),G(A=>A.computedData.map((C,T)=>A.gridGraphicReverseScale[T])));Y({defsSelection:$,gridAxesSize:d}).pipe(I(v),H(async A=>A)).subscribe(A=>{const C=[{id:x,width:A.gridAxesSize.width,height:A.gridAxesSize.height}];ik({defsSelection:A.defsSelection,clipPathData:C})});const S=c.pipe(I(v),G(A=>A.highlightTarget),tt()),N=Y({graphicGSelection:w,visibleComputedLayoutData:o,graphicReverseScale:P,fullChartParams:c,fullParams:l}).pipe(I(v),H(async A=>A),G(A=>nk({graphicGSelection:A.graphicGSelection,circleGClassName:b,circleClassName:_,visibleComputedLayoutData:A.visibleComputedLayoutData,fullParams:A.fullParams,fullChartParams:A.fullChartParams,graphicReverseScale:A.graphicReverseScale})));Y({graphicSelection:N,computedData:n,SeriesDataMap:s,GroupDataMap:u,highlightTarget:S}).pipe(I(v),H(async A=>A)).subscribe(A=>{A.graphicSelection.on("mouseover",(C,T)=>{C.stopPropagation(),y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:A.highlightTarget,datum:T,gridIndex:T.gridIndex,series:A.SeriesDataMap.get(T.seriesLabel),seriesIndex:T.seriesIndex,seriesLabel:T.seriesLabel,groups:A.GroupDataMap.get(T.groupLabel),groupIndex:T.groupIndex,groupLabel:T.groupLabel,event:C,data:A.computedData})}).on("mousemove",(C,T)=>{C.stopPropagation(),y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:A.highlightTarget,data:A.computedData,datum:T,gridIndex:T.gridIndex,series:A.SeriesDataMap.get(T.seriesLabel),seriesIndex:T.seriesIndex,seriesLabel:T.seriesLabel,groups:A.GroupDataMap.get(T.groupLabel),groupIndex:T.groupIndex,groupLabel:T.groupLabel,event:C})}).on("mouseout",(C,T)=>{C.stopPropagation(),y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:A.highlightTarget,datum:T,gridIndex:T.gridIndex,series:A.SeriesDataMap.get(T.seriesLabel),seriesIndex:T.seriesIndex,seriesLabel:T.seriesLabel,groups:A.GroupDataMap.get(T.groupLabel),groupIndex:T.groupIndex,groupLabel:T.groupLabel,event:C,data:A.computedData})}).on("click",(C,T)=>{C.stopPropagation(),y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:A.highlightTarget,datum:T,gridIndex:T.gridIndex,series:A.SeriesDataMap.get(T.seriesLabel),seriesIndex:T.seriesIndex,seriesLabel:T.seriesLabel,groups:A.GroupDataMap.get(T.groupLabel),groupIndex:T.groupIndex,groupLabel:T.groupLabel,event:C,data:A.computedData})})});const R=l.pipe(I(v),G(A=>A.onlyShowHighlighted),tt());return Y({graphicSelection:N,highlight:g.pipe(G(A=>A.map(C=>C.id))),onlyShowHighlighted:R,fullChartParams:c}).pipe(I(v),H(async A=>A)).subscribe(A=>{rk({selection:A.graphicSelection,ids:A.highlight,onlyShowHighlighted:A.onlyShowHighlighted,fullChartParams:A.fullChartParams})}),()=>{v.next(void 0)}},_x="Dots",ok=se(_x,ap)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=xx(_x,{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()}}),ak={listRectWidth:14,listRectHeight:14,listRectRadius:0};function wx(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 Lu=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o,textSizePx$:a})=>{const s=at(t,"root-position"),u=at(t,"legend-card"),l=at(t,"legend-list"),c=at(t,"legend-item"),f=new nt,h=Y({seriesLabels:n,fullChartParams:o}).pipe(I(f),H(async w=>w),G(w=>{const P=new Map;let S=0;return w.seriesLabels.forEach((N,R)=>{if(!P.has(N)){const A=wx(S,w.fullChartParams);P.set(N,A),S++}}),P})),p=n.pipe(I(f),G(w=>{const P=new Set;let S=[];return w.forEach(N=>{P.has(N)?S.push(!1):S.push(!0),P.add(N)}),S})),d=r.pipe(I(f),G(w=>w.position==="bottom"||w.position==="top"?"row":"column")),g=Y({fullParams:r,layout:i}).pipe(I(f),H(async w=>w),G(w=>{const P=w.fullParams.padding*2+w.fullParams.gap*2;return w.fullParams.position==="bottom"||w.fullParams.position==="top"?w.layout.rootWidth-P:w.layout.rootHeight-P})),y=Y({layout:i,fullParams:r}).pipe(I(f),H(async w=>w),G(w=>{let P=0,S=0;return w.fullParams.position==="bottom"?(S=w.layout.rootHeight,w.fullParams.justify==="start"?P=0:w.fullParams.justify==="center"?P=w.layout.rootWidth/2:w.fullParams.justify==="end"&&(P=w.layout.rootWidth)):w.fullParams.position==="right"?(P=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"?P=0:w.fullParams.justify==="center"?P=w.layout.rootWidth/2:w.fullParams.justify==="end"&&(P=w.layout.rootWidth)):w.fullParams.position==="left"&&(P=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:P,y:S}})).pipe(I(f),G(w=>e.selectAll(`g.${s}`).data([w]).join(P=>P.append("g").classed(s,!0).attr("transform",S=>`translate(${S.x}, ${S.y})`),P=>P.transition().attr("transform",S=>`translate(${S.x}, ${S.y})`),P=>P.remove()))),v=r.pipe(I(f),G(w=>w.seriesList[0]?w.seriesList[0]:ak)),x=Y({visibleList:p,fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:d,lineMaxSize:g,defaultListStyle:v,SeriesLabelColorMap:h,textSizePx:a}).pipe(I(f),H(async w=>w),G(w=>w.seriesLabels.reduce((P,S,N)=>{if(!w.visibleList[N])return P;const R=rx(S,w.textSizePx),A=w.textSizePx*1.5+R,C=w.SeriesLabelColorMap.get(S),T=P[0]&&P[0][0]?P[P.length-1][P[P.length-1].length-1]:null,{translateX:O,translateY:z,lineIndex:k,itemIndex:E}=((F,j,Q)=>{let U=0,X=0,B=0,q=0;if(F.lineDirection==="column"){let V=Q?Q.translateY+F.textSizePx+F.fullParams.gap:0;if(V+F.textSizePx>F.lineMaxSize){B=Q.lineIndex+1,q=0,X=0;const rt=j[j.length-1].reduce((ut,W)=>W.itemWidth>ut?W.itemWidth:ut,0);U=Q.translateX+rt+F.fullParams.gap}else B=Q?Q.lineIndex:0,q=Q?Q.itemIndex+1:0,X=V,U=Q?Q.translateX:0}else{let V=Q?Q.translateX+Q.itemWidth+F.fullParams.gap:0;V+A>F.lineMaxSize?(B=Q.lineIndex+1,q=0,U=0):(B=Q?Q.lineIndex:0,q=Q?Q.itemIndex+1:0,U=V),X=(F.textSizePx+F.fullParams.gap)*B}return{translateX:U,translateY:X,lineIndex:B,itemIndex:q}})(w,P,T);P[k]||(P[k]=[]);const L=w.fullParams.seriesList[E]?w.fullParams.seriesList[E]:w.defaultListStyle;return P[k].push({id:S,seriesLabel:S,seriesIndex:N,lineIndex:k,itemIndex:E,text:S,itemWidth:A,translateX:O,translateY:z,color:C,listRectWidth:L.listRectWidth,listRectHeight:L.listRectHeight,listRectRadius:L.listRectRadius}),P},[])),St(1)),b=Y({fullParams:r,fullChartParams:o,lineDirection:d,lengendItems:x,textSizePx:a}).pipe(I(f),H(async w=>w),G(w=>{const{width:P,height:S}=((N,R)=>{let A=0,C=0;if(!R.length||!R[0].length)return{width:A,height:C};const T=R[0][R[0].length-1];return N.lineDirection==="column"?(A=R.reduce((O,z)=>{const k=z.reduce((E,L)=>L.itemWidth>E?L.itemWidth:E,0);return O+k},0),A+=N.fullParams.gap*(R.length-1),C=T.translateY+N.textSizePx):(A=T.translateX+T.itemWidth,C=N.textSizePx*R.length+N.fullParams.gap*(R.length-1)),{width:A,height:C}})(w,w.lengendItems);return{direction:w.lineDirection,width:P,height:S,translateX:w.fullParams.gap,translateY:w.fullParams.gap}}),St(1)),_=Y({fullParams:r,lengendList:b}).pipe(I(f),H(async w=>w),G(w=>{const P=w.lengendList.width+w.fullParams.gap*2,S=w.lengendList.height+w.fullParams.gap*2;let N=0,R=0;return w.fullParams.position==="left"?w.fullParams.justify==="start"?(N=w.fullParams.padding,R=w.fullParams.padding):w.fullParams.justify==="center"?(N=w.fullParams.padding,R=-S/2):w.fullParams.justify==="end"&&(N=w.fullParams.padding,R=-S-w.fullParams.padding):w.fullParams.position==="right"?w.fullParams.justify==="start"?(N=-P-w.fullParams.padding,R=w.fullParams.padding):w.fullParams.justify==="center"?(N=-P-w.fullParams.padding,R=-S/2):w.fullParams.justify==="end"&&(N=-P-w.fullParams.padding,R=-S-w.fullParams.padding):w.fullParams.position==="top"?w.fullParams.justify==="start"?(N=w.fullParams.padding,R=w.fullParams.padding):w.fullParams.justify==="center"?(N=-P/2,R=w.fullParams.padding):w.fullParams.justify==="end"&&(N=-P-w.fullParams.padding,R=w.fullParams.padding):w.fullParams.justify==="start"?(N=w.fullParams.padding,R=-S-w.fullParams.padding):w.fullParams.justify==="center"?(N=-P/2,R=-S-w.fullParams.padding):w.fullParams.justify==="end"&&(N=-P-w.fullParams.padding,R=-S-w.fullParams.padding),{width:P,height:S,translateX:N,translateY:R}})),M=Y({rootPositionSelection:y,fullParams:r,fullChartParams:o,legendCard:_}).pipe(I(f),H(async w=>w),G(w=>w.rootPositionSelection.selectAll("g").data([w.legendCard]).join(P=>P.append("g").classed(u,!0).attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),P=>P.transition().attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),P=>P.remove()).each((P,S,N)=>{Z(N[S]).selectAll("rect").data([P]).join("rect").attr("width",R=>R.width).attr("height",R=>R.height).attr("fill",Ct(w.fullParams.backgroundFill,w.fullChartParams)).attr("stroke",Ct(w.fullParams.backgroundStroke,w.fullChartParams))}))),D=Y({lengendCardSelection:M,fullParams:r,lengendList:b}).pipe(I(f),H(async w=>w),G(w=>w.lengendCardSelection.selectAll("g").data([w.lengendList]).join(P=>P.append("g").classed(l,!0).attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),P=>P.transition().attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),P=>P.remove())));return Y({lengendListSelection:D,fullParams:r,fullChartParams:o,lengendItems:x,textSizePx:a}).pipe(I(f),H(async w=>w),G(w=>{const P=w.lengendItems[0]?w.lengendItems.flat():[];return w.lengendListSelection.selectAll(`g.${c}`).data(P).join(S=>S.append("g").classed(c,!0).attr("cursor","default"),S=>S,S=>S.remove()).attr("transform",(S,N)=>`translate(${S.translateX}, ${S.translateY})`).each((S,N,R)=>{const A=w.textSizePx/2,C=-S.listRectWidth/2,T=-S.listRectHeight/2;Z(R[N]).selectAll("rect").data([S]).join("rect").attr("x",A).attr("y",A).attr("width",O=>O.listRectWidth).attr("height",O=>O.listRectHeight).attr("transform",O=>`translate(${C}, ${T})`).attr("fill",O=>O.color).attr("rx",O=>O.listRectRadius),Z(R[N]).selectAll("text").data([S]).join(O=>O.append("text").attr("dominant-baseline","hanging"),O=>O,O=>O.remove()).attr("x",w.textSizePx*1.5).attr("font-size",w.fullChartParams.styles.textSize).attr("fill",O=>w.fullParams.textColorType==="series"?wx(O.seriesIndex,w.fullChartParams):Ct(w.fullParams.textColorType,w.fullChartParams)).text(O=>O.text)})})).subscribe(),()=>{f.next(void 0)}},$x="GridLegend",sk=se($x,fp)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new nt,o=n.SeriesDataMap$.pipe(I(i),G(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(I(i),G(u=>{const l=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:l}})),s=Lu($x,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),Rh=6;function uk({selection:t,xAxisClassName:e,groupingLabelClassName:n,params:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,chartParams:u,groupScale:l,groupScaleDomain:c,groupLabels:f,textTransform:h}){const p=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((y,v,x)=>{Z(x[v]).selectAll("text").data([y]).join(b=>b.append("text").style("font-weight","bold"),b=>b,b=>b.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).attr("font-size",u.styles.textSize).style("fill",Ct(r.labelColorType,u)).text(b=>s.grid.groupAxis.label)}).attr("transform",y=>`translate(${a.width+y.tickPadding+r.labelOffset[0]}, ${-y.tickPadding-Rh-r.labelOffset[1]})`);const d=Math.floor(c[1])-Math.ceil(c[0])+1,g=Eg(l).scale(l).ticks(r.ticks==="all"||r.ticks>d?d:r.ticks).tickSize(r.tickFullLine==!0?-a.height:Rh).tickSizeOuter(0).tickFormat(y=>{const v=f[y]??"";return Lh(v,r.tickFormat)}).tickPadding(r.tickPadding),m=p.transition().duration(100).call(g);return m.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Ct(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),m.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Ct(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),p.selectAll("text").attr("font-size",u.styles.textSize).style("color",Ct(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`0 -${r.tickPadding+Rh}`).style("transform",h),p}const Sx=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainerPosition$:l,isSeriesSeprate$:c})=>{const f=new nt,h=at(t,"container"),p=at(t,"xAxisG"),d=at(t,"xAxis"),g=at(t,"groupingLabel"),m=Y({computedData:n.pipe(tt(($,w)=>$.length===w.length)),isSeriesSeprate:c}).pipe(I(f),H(async $=>$),G($=>$.isSeriesSeprate?$.computedData:[$.computedData[0]]),G(($,w)=>e.selectAll(`g.${h}`).data($,P=>P[0]?P[0].seriesIndex:w).join("g").classed(h,!0))),y=m.pipe(I(f),G(($,w)=>$.selectAll(`g.${p}`).data([p]).join("g").classed(p,!0)));Y({containerSelection:m,gridContainerPosition:l}).pipe(I(f),H(async $=>$)).subscribe($=>{$.containerSelection.attr("transform",(w,P)=>{const S=$.gridContainerPosition[P]??$.gridContainerPosition[0],N=S.translate,R=S.scale;return`translate(${N[0]}, ${N[1]}) scale(${R[0]}, ${R[1]})`})}),Y({axisSelection:y,gridAxesTransform:a}).pipe(I(f),H(async $=>$)).subscribe($=>{$.axisSelection.style("transform",$.gridAxesTransform.value)});const v=Y({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainerPosition:l}).pipe(I(f),H(async $=>$),G($=>{const w=`translate(${$.gridAxesReverseTransform.translate[0]}px, ${$.gridAxesReverseTransform.translate[1]}px)`,P=`rotate(${$.gridAxesReverseTransform.rotate}deg) rotateX(${$.gridAxesReverseTransform.rotateX}deg) rotateY(${$.gridAxesReverseTransform.rotateY}deg)`,S=`scale(${1/$.gridContainerPosition[0].scale[0]}, ${1/$.gridContainerPosition[0].scale[1]})`,R=`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`${w} ${P} ${S} ${R}`}),tt()),x=Y({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(I(f),H(async $=>$),G($=>{const P=$.computedData[0]?$.computedData[0].length-1:0,S=$.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-$.fullDataFormatter.grid.groupAxis.scalePadding:$.fullDataFormatter.grid.groupAxis.scaleDomain[0]-$.fullDataFormatter.grid.groupAxis.scalePadding,N=$.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?P+$.fullDataFormatter.grid.groupAxis.scalePadding:$.fullDataFormatter.grid.groupAxis.scaleDomain[1]+$.fullDataFormatter.grid.groupAxis.scalePadding;return[S,N]}),St(1)),b=Y({groupScaleDomain:x,gridAxesSize:u}).pipe(I(f),H(async $=>$),G($=>So().domain($.groupScaleDomain).range([0,$.gridAxesSize.width]))),_=n.pipe(G($=>($[0]??[]).map(w=>w.groupLabel))),M=Y({fullDataFormatter:i,fullParams:r}).pipe(I(f),H(async $=>$),G($=>{let w="middle",P="hanging";return $.fullDataFormatter.grid.groupAxis.position==="bottom"?(w=$.fullParams.tickTextRotate?"end":"middle",P="hanging"):$.fullDataFormatter.grid.groupAxis.position==="top"?(w=$.fullParams.tickTextRotate?"end":"middle",P="auto"):$.fullDataFormatter.grid.groupAxis.position==="left"?(w="end",P="middle"):$.fullDataFormatter.grid.groupAxis.position==="right"&&(w="start",P="middle"),{textAnchor:w,dominantBaseline:P}})),D=i.pipe(I(f),G($=>{let w="start",P="hanging";return $.grid.groupAxis.position==="bottom"?P="hanging":$.grid.groupAxis.position==="top"?P="auto":$.grid.groupAxis.position==="left"?w="end":$.grid.groupAxis.position==="right"&&(w="start"),$.grid.valueAxis.position==="left"?w="start":$.grid.valueAxis.position==="right"?w="end":$.grid.valueAxis.position==="bottom"?P="auto":$.grid.valueAxis.position==="top"&&(P="hanging"),{textAnchor:w,dominantBaseline:P}}));return Y({axisSelection:y,params:r,tickTextAlign:M,axisLabelAlign:D,gridAxesSize:u,fullDataFormatter:i,chartParams:o,groupScale:b,groupScaleDomain:x,groupLabels:_,textTransform:v}).pipe(I(f),H(async $=>$)).subscribe($=>{uk({selection:$.axisSelection,xAxisClassName:d,groupingLabelClassName:g,params:$.params,tickTextAlign:$.tickTextAlign,axisLabelAlign:$.axisLabelAlign,gridAxesSize:$.gridAxesSize,fullDataFormatter:$.fullDataFormatter,chartParams:$.chartParams,groupScale:$.groupScale,groupScaleDomain:$.groupScaleDomain,groupLabels:$.groupLabels,textTransform:$.textTransform})}),()=>{f.next(void 0)}},Ax="GroupAxis",lk=se(Ax,Fu)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=Sx(Ax,{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$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}}),Mx=6;function ck({selection:t,yAxisClassName:e,textClassName:n,fullParams:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,fullChartParams:u,valueScale:l,textTransform:c,minAndMax:f}){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((y,v,x)=>{Z(x[v]).selectAll("text").data([y]).join(b=>b.append("text").style("font-weight","bold"),b=>b,b=>b.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).attr("font-size",u.styles.textSize).style("fill",Ct(r.labelColorType,u)).text(b=>s.grid.valueAxis.label)}).attr("transform",y=>`translate(${-y.tickPadding+r.labelOffset[0]}, ${a.height+y.tickPadding+r.labelOffset[1]})`);const p=f[1]-f[0],d=Rg(l).scale(l).ticks(p>r.ticks?r.ticks:f[0]===0&&f[1]===0?1:Math.ceil(p)).tickFormat(y=>Lh(y,r.tickFormat)).tickSize(r.tickFullLine==!0?-a.width:Mx).tickPadding(r.tickPadding),g=h.transition().duration(100).call(d);return g.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Ct(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),g.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Ct(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),h.selectAll("text").attr("font-size",u.styles.textSize).style("color",Ct(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`-${r.tickPadding+Mx} 0`).style("transform",c),h}const ai=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainerPosition$:l,isSeriesSeprate$:c})=>{const f=new nt,h=at(t,"container"),p=at(t,"yAxisG"),d=at(t,"yAxis"),g=at(t,"text"),m=Y({computedData:n.pipe(tt((D,$)=>D.length===$.length)),isSeriesSeprate:c}).pipe(I(f),H(async D=>D),G(D=>D.isSeriesSeprate?D.computedData:[D.computedData[0]]),G((D,$)=>e.selectAll(`g.${h}`).data(D,w=>w[0]?w[0].seriesIndex:$).join("g").classed(h,!0))),y=m.pipe(I(f),G((D,$)=>D.selectAll(`g.${p}`).data([p]).join("g").classed(p,!0)));Y({containerSelection:m,gridContainerPosition:l}).pipe(I(f),H(async D=>D)).subscribe(D=>{D.containerSelection.attr("transform",($,w)=>{const P=D.gridContainerPosition[w]??D.gridContainerPosition[0],S=P.translate,N=P.scale;return`translate(${S[0]}, ${S[1]}) scale(${N[0]}, ${N[1]})`})}),Y({axisSelection:y,gridAxesTransform:a}).pipe(I(f),H(async D=>D)).subscribe(D=>{D.axisSelection.style("transform",D.gridAxesTransform.value)});const v=Y({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainerPosition:l}).pipe(I(f),H(async D=>D),G(D=>{const $=`translate(${D.gridAxesReverseTransform.translate[0]}px, ${D.gridAxesReverseTransform.translate[1]}px)`,w=`rotate(${D.gridAxesReverseTransform.rotate}deg) rotateX(${D.gridAxesReverseTransform.rotateX}deg) rotateY(${D.gridAxesReverseTransform.rotateY}deg)`,P=`scale(${1/D.gridContainerPosition[0].scale[0]}, ${1/D.gridContainerPosition[0].scale[1]})`,N=`rotate(${D.fullDataFormatter.grid.groupAxis.position==="left"&&D.fullDataFormatter.grid.valueAxis.position==="top"||D.fullDataFormatter.grid.groupAxis.position==="right"&&D.fullDataFormatter.grid.valueAxis.position==="bottom"?D.fullParams.tickTextRotate+180:D.fullParams.tickTextRotate}deg)`;return`${$} ${w} ${P} ${N}`}),tt()),x=new dt(D=>{Y({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(I(f),H(async $=>$)).subscribe($=>{const P=$.computedData[0]?$.computedData[0].length-1:0,S=$.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-$.fullDataFormatter.grid.groupAxis.scalePadding:$.fullDataFormatter.grid.groupAxis.scaleDomain[0]-$.fullDataFormatter.grid.groupAxis.scalePadding,N=$.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?P+$.fullDataFormatter.grid.groupAxis.scalePadding:$.fullDataFormatter.grid.groupAxis.scaleDomain[1]+$.fullDataFormatter.grid.groupAxis.scalePadding,R=$.computedData.map((C,T)=>C.filter((O,z)=>z>=S&&z<=N)),A=bR(R.flat());D.next(A)})}),b=new dt(D=>{Y({fullDataFormatter:i,gridAxesSize:u,minAndMax:x}).pipe(I(f),H(async $=>$)).subscribe($=>{const w=tg({maxValue:$.minAndMax[1],minValue:$.minAndMax[0],axisWidth:$.gridAxesSize.height,scaleDomain:$.fullDataFormatter.grid.valueAxis.scaleDomain,scaleRange:$.fullDataFormatter.grid.valueAxis.scaleRange});D.next(w)})}),_=i.pipe(I(f),G(D=>{let $="start",w="hanging";return D.grid.valueAxis.position==="left"?($="end",w="middle"):D.grid.valueAxis.position==="right"?($="start",w="middle"):D.grid.valueAxis.position==="bottom"?($="middle",w="hanging"):D.grid.valueAxis.position==="top"&&($="middle",w="auto"),{textAnchor:$,dominantBaseline:w}})),M=i.pipe(I(f),G(D=>{let $="start",w="hanging";return D.grid.groupAxis.position==="bottom"?w="auto":D.grid.groupAxis.position==="top"?w="hanging":D.grid.groupAxis.position==="left"?$="start":D.grid.groupAxis.position==="right"&&($="end"),D.grid.valueAxis.position==="left"?$="end":D.grid.valueAxis.position==="right"?$="start":D.grid.valueAxis.position==="bottom"?w="hanging":D.grid.valueAxis.position==="top"&&(w="auto"),{textAnchor:$,dominantBaseline:w}}));return Y({axisSelection:y,fullParams:r,tickTextAlign:_,axisLabelAlign:M,computedData:n,gridAxesSize:u,fullDataFormatter:i,fullChartParams:o,valueScale:b,textTransform:v,minAndMax:x}).pipe(I(f),H(async D=>D)).subscribe(D=>{ck({selection:D.axisSelection,yAxisClassName:d,textClassName:g,fullParams:D.fullParams,tickTextAlign:D.tickTextAlign,axisLabelAlign:D.axisLabelAlign,gridAxesSize:D.gridAxesSize,fullDataFormatter:D.fullDataFormatter,fullChartParams:D.fullChartParams,valueScale:D.valueScale,textTransform:D.textTransform,minAndMax:D.minAndMax})}),()=>{f.next(void 0)}},Dx="ValueAxis",fk=se(Dx,Gu)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=ai(Dx,{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$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}}),Px="ValueStackAxis",hk=se(Px,lp)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=ai(Px,{selection:t,computedData$:n.computedStackedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}}),Tx="ScalingArea",pk=at(Tx,"rect"),dk=se(Tx,cp)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new nt,a=e.insert("rect","g").classed(pk,!0).attr("opacity",0);let s={k:1,x:0,y:0};r.layout$.pipe(I(o)).subscribe(l=>{a.attr("width",l.width).attr("height",l.height).attr("x",l.left).attr("y",l.top)});const u=r.computedData$.pipe(G(l=>l[0]?l[0].length-1:0),tt());return Y({initGroupAxis:r.fullDataFormatter$.pipe(G(l=>l.grid.groupAxis),b_()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:u,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(I(o),H(async l=>l)).subscribe(l=>{const f=l.groupMaxIndex,h=l.initGroupAxis.scaleDomain[0]==="auto"?0-l.initGroupAxis.scalePadding:l.initGroupAxis.scaleDomain[0]-l.initGroupAxis.scalePadding,p=l.initGroupAxis.scaleDomain[1]==="auto"?f+l.initGroupAxis.scalePadding:l.initGroupAxis.scaleDomain[1]+l.initGroupAxis.scalePadding,g=tg({maxValue:l.groupMaxIndex,minValue:0,axisWidth:l.axisSize.width,scaleDomain:[h,p],scaleRange:[0,1]}).copy(),m=ex().on("zoom",function(v){const x=v.transform,b=D=>{const $=Math.round(D);return Math.min(f,Math.max(0,$))},_=l.fullDataFormatter.grid.groupAxis.position==="bottom"||l.fullDataFormatter.grid.groupAxis.position==="top"?x.rescaleX(g).domain().map(b):x.rescaleY(g).domain().map(b);_[0]<=0&&_[1]>=f?x.k<s.k&&(x.k=s.k,x.x=s.x,x.y=s.y):_[1]-_[0]<=1&&x.k>s.k&&(x.k=s.k,x.x=s.x,x.y=s.y),s.k=x.k,s.x=x.x,s.y=x.y;const M={...l.fullDataFormatter,grid:{...l.fullDataFormatter.grid,groupAxis:{...l.fullDataFormatter.grid.groupAxis,scaleDomain:_}}};i.dataFormatter$.next(M)});e.call(m)}),()=>{o.next(void 0),a.remove()}}),Cu="GroupAux",kh=at(Cu,"label-box");function gk({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function mk({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=at(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),s=a.enter().append("line").classed(o,!0).style("stroke",l=>Ct(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",l=>l.x1).attr("y1",l=>l.y1).attr("x2",l=>l.x2).attr("y2",l=>l.y2),a.transition().duration(50).attr("x1",l=>l.x1).attr("y1",l=>l.y1).attr("x2",l=>l.x2).attr("y2",l=>l.y2),u}function yk(t){t.selectAll("line").data([]).exit().remove()}function bk({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:Lh(t,n.labelTextFormat)}]:[]}function vk({selection:t,labelData:e,fullParams:n,fullDataFormatter:r,fullChartParams:i,labelTransform:o,textSizePx:a}){const s=a+4,u=t.selectAll(`g.${kh}`).data(e),l=u.enter().append("g").classed(kh,!0).style("cursor","pointer"),c=l.merge(u);return l.attr("transform",(f,h)=>`translate(${f.x}, ${f.y})`),u.transition().duration(50).attr("transform",(f,h)=>`translate(${f.x}, ${f.y})`),u.exit().remove(),c.each((f,h,p)=>{const d=rx(f.text,a)+12;let g=-d/2,m=-2;r.grid.groupAxis.position==="bottom"?(g=n.labelRotate?-d:-d/2,m=2):r.grid.groupAxis.position==="left"?(g=-d+2,m=-s/2):r.grid.groupAxis.position==="right"?(g=-2,m=-s/2):r.grid.groupAxis.position==="top"&&(g=n.labelRotate?-d:-d/2,m=-s+2);const y=Z(p[h]).selectAll("rect").data([f]),v=y.enter().append("rect").attr("height",`${s}px`).attr("fill",_=>Ct(n.labelColorType,i)).attr("x",g).attr("y",m).attr("rx",5).attr("ry",5).style("cursor","pointer");y.merge(v).attr("width",_=>`${d}px`).style("transform",o),y.exit().remove();const x=Z(p[h]).selectAll("text").data([f]),b=x.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");x.merge(b).text(_=>_.text).style("transform",o).attr("fill",_=>Ct(n.labelTextColorType,i)).attr("font-size",i.styles.textSize).attr("x",g+6).attr("y",m),x.exit().remove()}),c}function xk(t){t.selectAll(`g.${kh}`).data([]).exit().remove()}const _k=se(Cu,Nu)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new nt;let a=!1;const s=e.insert("rect","g").classed(at(Cu,"rect"),!0).attr("opacity",0),{seriesSelection$:u,axesSelection$:l,defsSelection$:c,graphicGSelection$:f}=ar({selection:t,pluginName:Cu,clipPathID:"test",seriesLabels$:i.seriesLabels$,gridContainerPosition$:i.gridContainerPosition$,gridAxesTransform$:i.gridAxesTransform$,gridGraphicTransform$:i.gridGraphicTransform$});i.layout$.pipe(I(o)).subscribe(_=>{s.attr("width",_.rootWidth).attr("height",_.rootHeight)});const h=Y({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(I(o),H(async _=>_),G(_=>{const D=_.computedData[0]?_.computedData[0].length-1:0,$=_.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-_.fullDataFormatter.grid.groupAxis.scalePadding:_.fullDataFormatter.grid.groupAxis.scaleDomain[0]-_.fullDataFormatter.grid.groupAxis.scalePadding,w=_.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?D+_.fullDataFormatter.grid.groupAxis.scalePadding:_.fullDataFormatter.grid.groupAxis.scaleDomain[1]+_.fullDataFormatter.grid.groupAxis.scalePadding;return[$,w]}),St(1)),p=Y({groupScaleDomain:h,gridAxesSize:i.gridAxesSize$}).pipe(I(o),H(async _=>_),G(_=>So().domain(_.groupScaleDomain).range([0,_.gridAxesSize.width]))),d=i.fullChartParams$.pipe(I(o),G(_=>_.highlightTarget),tt()),g=Ch(e,"mousemove").pipe(I(o)),m=Y({fullParams:i.fullParams$,fullDataFormatter:i.fullDataFormatter$,gridAxesReverseTransform:i.gridAxesReverseTransform$,gridContainerPosition:i.gridContainerPosition$}).pipe(I(o),H(async _=>_),G(_=>{const M=`translate(${_.gridAxesReverseTransform.translate[0]}px, ${_.gridAxesReverseTransform.translate[1]}px)`,D=`rotate(${_.gridAxesReverseTransform.rotate}deg) rotateX(${_.gridAxesReverseTransform.rotateX}deg) rotateY(${_.gridAxesReverseTransform.rotateY}deg)`,$=`scale(${1/_.gridContainerPosition[0].scale[0]}, ${1/_.gridContainerPosition[0].scale[1]})`,P=`rotate(${_.fullDataFormatter.grid.groupAxis.position==="left"&&_.fullDataFormatter.grid.valueAxis.position==="top"||_.fullDataFormatter.grid.groupAxis.position==="right"&&_.fullDataFormatter.grid.valueAxis.position==="bottom"?_.fullParams.labelRotate+180:_.fullParams.labelRotate}deg)`;return`${M} ${D} ${$} ${P}`}),tt()),y=i.gridContainerPosition$.pipe(I(o),G(_=>_.reduce((D,$)=>$.columnIndex>D?$.columnIndex:D,0)+1),tt()),v=i.gridContainerPosition$.pipe(I(o),G(_=>_.reduce((D,$)=>$.rowIndex>D?$.rowIndex:D,0)+1),tt()),x=vR({rootSelection:e,fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$,gridContainerPosition$:i.gridContainerPosition$,layout$:i.layout$}).pipe(I(o));Y({axesSelection:l,columnAmount:y,rowAmount:v,layout:i.layout$,rootMousemove:g,gridGroupPosition:x,computedData:i.computedData$,groupScale:p,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullDataFormatter:i.fullDataFormatter$,fullChartParams:i.fullChartParams$,highlightTarget:d,labelTransform:m,GroupDataMap:i.GroupDataMap$,textSizePx:i.textSizePx$}).subscribe(_=>{const{groupIndex:M,groupLabel:D}=_.gridGroupPosition,$=_.groupScale(M)??0,w=gk({groupLabel:D,axisX:$,axisHeight:_.gridAxesSize.height,fullParams:_.fullParams});mk({selection:_.axesSelection,pluginName:n,lineData:w,fullParams:_.fullParams,fullChartParams:_.fullChartParams});const P=bk({groupLabel:D,axisX:$,fullParams:_.fullParams});vk({selection:_.axesSelection,labelData:P,fullParams:_.fullParams,fullDataFormatter:_.fullDataFormatter,fullChartParams:_.fullChartParams,labelTransform:_.labelTransform,textSizePx:_.textSizePx}).on("mouseover",(N,R)=>{N.stopPropagation(),a=!0,r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:_.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:_.GroupDataMap.get(D)??[],groupIndex:M,groupLabel:D,event:N,data:_.computedData})}).on("mousemove",(N,R)=>{N.stopPropagation(),r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:_.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:_.GroupDataMap.get(D)??[],groupIndex:M,groupLabel:D,event:N,data:_.computedData})}).on("click",(N,R)=>{N.stopPropagation(),r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:_.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:_.GroupDataMap.get(D)??[],groupIndex:M,groupLabel:D,event:N,data:_.computedData})})});const b=Ch(s,"mouseout").pipe(I(o));return Y({rootRectMouseout:b,axesSelection:l}).pipe(I(o),H(async _=>_)).subscribe(_=>{setTimeout(()=>{a!=!0&&(yk(_.axesSelection),xk(_.axesSelection))})}),()=>{o.next(void 0),s.remove()}}),Lx={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"},Ih={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",ticks:"all",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]};Ih.tickFormat.toString=()=>"text => text";const 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",gridIndexes:[0]},wk={...Eu},Cx={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1,gridIndexes:[0]},Ex={barWidth:0,barGroupPadding:10,barRadius:!1,gridIndexes:[0]},Rx={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0],gridIndexes:[0]},kx={lineCurve:"curveLinear",lineWidth:2,gridIndexes:[1]},Ix={lineCurve:"curveLinear",linearGradientOpacity:[1,0],gridIndexes:[1]},Nx={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1,gridIndexes:[1]},Nh={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]},Fx={...Nh},Gx="MultiGridLegend",$k=pe(Gx,Lx)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new nt,o=n.multiGridEachDetail$.pipe(I(i),G(l=>l.map((f,h)=>f.SeriesDataMap$.pipe(G(p=>Array.from(p.keys()))))),H(l=>Y(l)),G(l=>l.flat())),a=Y({fullParams:n.fullParams$,computedData:n.computedData$}).pipe(I(i),H(async l=>l),G(l=>l.computedData.map((c,f)=>{const h=vl(l.fullParams.gridList[f]??{},{listRectWidth:l.fullParams.listRectWidth,listRectHeight:l.fullParams.listRectHeight,listRectRadius:l.fullParams.listRectRadius});return c.map(p=>h)}).flat())),s=Y({fullParams:n.fullParams$,seriesList:a}).pipe(I(i),H(async l=>l),G(l=>({...l.fullParams,seriesList:l.seriesList}))),u=Lu(Gx,{rootSelection:e,seriesLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),u()}}),Ce=t=>{const e=t.fullParams$.pipe(G(n=>n.gridIndexes),tt(),St(1));return Y({multiGridEachDetail:t.multiGridEachDetail$,gridIndexes:e}).pipe(G(n=>n.gridIndexes==="all"?n.multiGridEachDetail:n.gridIndexes.map(r=>n.multiGridEachDetail[r]??n.multiGridEachDetail[0])))},Fh="MultiBars",zx=at(Fh,"grid"),Sk=pe(Fh,Cx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${zx}`).data(s).join("g").attr("class",zx).each((u,l,c)=>{const f=Z(c[l]),h=u.dataFormatter$.pipe(I(i),G(p=>p.grid.separateSeries),tt(),St(1));o[l]=Eh(Fh,{selection:f,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$:h,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Gh="MultiBarStack",Ox=at(Gh,"grid"),Ak=pe(Gh,Ex)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Ox}`).data(s).join("g").attr("class",Ox).each((u,l,c)=>{const f=Z(c[l]),h=u.dataFormatter$.pipe(I(i),G(p=>p.grid.separateSeries),tt(),St(1));o[l]=dx(Gh,{selection:f,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$:h,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),zh="MultiBarsTriangle",Ux=at(zh,"grid"),Mk=pe(zh,Rx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Ux}`).data(s).join("g").attr("class",Ux).each((u,l,c)=>{const f=Z(c[l]),h=u.dataFormatter$.pipe(I(i),G(p=>p.grid.separateSeries),tt(),St(1));o[l]=bx(zh,{selection:f,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$:h,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Oh="MultiLines",Bx=at(Oh,"grid"),Dk=pe(Oh,kx)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new nt,a=[],s=i.multiGridContainerPosition$.pipe(I(o),G(l=>l.flat()));return Ce(i).pipe(I(o)).subscribe(l=>{a.forEach(c=>c()),t.selectAll(`g.${Bx}`).data(l).join("g").attr("class",Bx).each((c,f,h)=>{const p=Z(h[f]);a[f]=ox(Oh,{selection:p,computedData$:c.computedData$,computedLayoutData$:c.computedLayoutData$,visibleComputedData$:c.visibleComputedData$,visibleComputedLayoutData$:c.visibleComputedLayoutData$,seriesLabels$:c.seriesLabels$,SeriesDataMap$:c.SeriesDataMap$,GroupDataMap$:c.GroupDataMap$,fullDataFormatter$:c.dataFormatter$,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,gridAxesTransform$:c.gridAxesTransform$,gridGraphicTransform$:c.gridGraphicTransform$,gridAxesSize$:c.gridAxesSize$,gridHighlight$:c.gridHighlight$,gridContainerPosition$:c.gridContainerPosition$,allContainerPosition$:s,layout$:i.layout$,event$:r.event$})})}),()=>{o.next(void 0),a.forEach(l=>l())}}),Uh="MultiLineAreas",Yx=at(Uh,"grid"),Pk=pe(Uh,Ix)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[],a=r.multiGridContainerPosition$.pipe(I(i),G(u=>u.flat()));return Ce(r).pipe(I(i)).subscribe(u=>{o.forEach(l=>l()),t.selectAll(`g.${Yx}`).data(u).join("g").attr("class",Yx).each((l,c,f)=>{const h=Z(f[c]);o[c]=sx(Uh,{selection:h,computedData$:l.computedData$,computedLayoutData$:l.computedLayoutData$,visibleComputedData$:l.visibleComputedData$,visibleComputedLayoutData$:l.visibleComputedLayoutData$,seriesLabels$:l.seriesLabels$,SeriesDataMap$:l.SeriesDataMap$,GroupDataMap$:l.GroupDataMap$,fullDataFormatter$:l.dataFormatter$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridGraphicTransform$:l.gridGraphicTransform$,gridAxesSize$:l.gridAxesSize$,gridHighlight$:l.gridHighlight$,gridContainerPosition$:l.gridContainerPosition$,allContainerPosition$:a,layout$:r.layout$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(u=>u())}}),Bh="MultiDots",Hx=at(Bh,"grid"),Tk=pe(Bh,Nx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Hx}`).data(s).join("g").attr("class",Hx).each((u,l,c)=>{const f=Z(c[l]);o[l]=xx(Bh,{selection:f,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())}}),Yh="MultiGroupAxis",Wx=at(Yh,"grid"),Lk=pe(Yh,Ih)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Wx}`).data(s).join("g").attr("class",Wx).each((u,l,c)=>{const f=Z(c[l]),h=u.dataFormatter$.pipe(I(i),G(p=>p.grid.separateSeries),tt(),St(1));o[l]=Sx(Yh,{selection:f,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$:h})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Hh="MultiValueAxis",Vx=at(Hh,"grid"),Ck=pe(Hh,Eu)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Vx}`).data(s).join("g").attr("class",Vx).each((u,l,c)=>{const f=Z(c[l]),h=u.dataFormatter$.pipe(I(i),G(p=>p.grid.separateSeries),tt(),St(1));o[l]=ai(Hh,{selection:f,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$:h})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Wh="MultiValueStackAxis",jx=at(Wh,"grid"),Ek=pe(Wh,Eu)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return Ce(r).pipe(I(i)).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${jx}`).data(s).join("g").attr("class",jx).each((u,l,c)=>{const f=Z(c[l]),h=u.dataFormatter$.pipe(I(i),G(p=>p.grid.separateSeries),tt(),St(1));o[l]=ai(Wh,{selection:f,computedData$:u.computedStackedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainerPosition$:u.gridContainerPosition$,isSeriesSeprate$:h})})}),()=>{i.next(void 0),o.forEach(s=>s())}});function Rk(t){let e=Math.floor(Math.sqrt(t)),n=Math.ceil(t/e);for(;e*n<t;)n++;return{rowAmount:e,columnAmount:n}}function qx(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:o}=e.rowAmount*e.columnAmount>=n?e:Rk(n);return new Array(n).fill(null).map((a,s)=>{const u=s%o,l=Math.floor(s/o),c=(t.width-r*(o-1))/o,f=(t.height-r*(i-1))/i,h=u*c+u*r,p=l*f+l*r,d=[h,p],g=[c/t.width,f/t.height];return{slotIndex:s,rowIndex:l,columnIndex:u,translate:d,scale:g}})}const Xx=({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,l=0,c=0,f=0,h=0;return i.position==="bottom"?o.position==="left"?(f=180,l=s):o.position==="right"?(f=180,h=180,u=a,l=s):(f=180,l=s):i.position==="top"?o.position==="left"||(o.position==="right"?(h=180,u=a):(f=180,l=s)):i.position==="left"?o.position==="bottom"?(c=-90,l=s):o.position==="top"?(c=-90,h=180):(f=180,l=s):i.position==="right"?o.position==="bottom"?(c=-90,f=180,l=s,u=a):o.position==="top"?(c=-90,f=180,h=180,u=a):(f=180,l=s):(f=180,l=s),{translate:[u,l],scale:[1,1],rotate:c,rotateX:f,rotateY:h,value:`translate(${u}px, ${l}px) rotate(${c}deg) rotateX(${f}deg) rotateY(${h}deg)`}}return new dt(i=>(Y({fullDataFormatter:t,layout:e}).pipe(I(n),H(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)}))},Zx=({gridAxesTransform$:t})=>t.pipe(G(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)`}})),Kx=({computedData$:t,fullDataFormatter$:e,layout$:n})=>Y({computedData:t,fullDataFormatter:e,layout:n}).pipe(H(async i=>i),G(i=>{if(i.fullDataFormatter.grid.separateSeries)return qx(i.layout,i.fullDataFormatter.container,i.computedData.length);{const o=qx(i.layout,i.fullDataFormatter.container,1);return i.computedData.map((a,s)=>o[0])}})),Vh="OverlappingValueAxes",Qx=at(Vh,"grid"),kk=pe(Vh,Nh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[],a=r.fullParams$.pipe(I(i),G(c=>c.gridIndexes[0])),s=r.fullParams$.pipe(I(i),G(c=>c.gridIndexes[1])),u=Y({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(I(i),H(async c=>c),G(c=>{c.fullDataFormatter.gridList[c.secondGridIndex]||(c.fullDataFormatter.gridList[c.secondGridIndex]=Object.assign({},c.fullDataFormatter.gridList[c.firstGridIndex]));const f=c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position;let h=f;return f==="left"?h="right":f==="bottom"?h="top":f==="top"?h="bottom":f==="right"&&(h="left"),{type:"grid",visibleFilter:c.fullDataFormatter.visibleFilter,grid:{...c.fullDataFormatter.gridList[c.secondGridIndex],valueAxis:{...c.fullDataFormatter.gridList[c.secondGridIndex].valueAxis,position:h}},container:{...c.fullDataFormatter.container}}}));return Yo(r).pipe(I(i),G(c=>({...c,fullParams$:c.fullParams$.pipe(G(f=>(f.gridIndexes.length>2&&(f.gridIndexes.length=2),f)))})),H(c=>Ce(c)),G(c=>c.map((f,h)=>{if(h===0)return f;const p=Xx({fullDataFormatter$:u,layout$:r.layout$}),d=Zx({gridAxesTransform$:p}),g=Kx({computedData$:f.computedData$,fullDataFormatter$:u,layout$:r.layout$});return{...f,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:g}}))).pipe(I(i)).subscribe(c=>{o.forEach(f=>f()),t.selectAll(`g.${Qx}`).data(c).join("g").attr("class",Qx).each((f,h,p)=>{if(h>1)return;const d=Z(p[h]);o[h]=ai(Vh,{selection:d,computedData$:f.computedData$,fullParams$:r.fullParams$.pipe(G(g=>h===0?g.firstAxis:g.secondAxis)),fullDataFormatter$:f.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:f.gridAxesTransform$,gridAxesReverseTransform$:f.gridAxesReverseTransform$,gridAxesSize$:f.gridAxesSize$,gridContainerPosition$:f.gridContainerPosition$,isSeriesSeprate$:f.isSeriesSeprate$})})}),()=>{i.next(void 0),o.forEach(c=>c())}}),jh="OverlappingValueStackAxes",Jx=at(jh,"grid"),Ik=pe(jh,Fx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[],a=r.fullParams$.pipe(I(i),G(c=>c.gridIndexes[0])),s=r.fullParams$.pipe(I(i),G(c=>c.gridIndexes[1])),u=Y({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(I(i),H(async c=>c),G(c=>{c.fullDataFormatter.gridList[c.secondGridIndex]||(c.fullDataFormatter.gridList[c.secondGridIndex]=Object.assign({},c.fullDataFormatter.gridList[c.firstGridIndex]));const f=c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position;let h=f;return f==="left"?h="right":f==="bottom"?h="top":f==="top"?h="bottom":f==="right"&&(h="left"),{type:"grid",visibleFilter:c.fullDataFormatter.visibleFilter,grid:{...c.fullDataFormatter.gridList[c.secondGridIndex],valueAxis:{...c.fullDataFormatter.gridList[c.secondGridIndex].valueAxis,position:h}},container:{...c.fullDataFormatter.container}}}));return Yo(r).pipe(I(i),G(c=>({...c,fullParams$:c.fullParams$.pipe(G(f=>(f.gridIndexes.length>2&&(f.gridIndexes.length=2),f)))})),H(c=>Ce(c)),G(c=>c.map((f,h)=>{if(h===0)return f;const p=Xx({fullDataFormatter$:u,layout$:r.layout$}),d=Zx({gridAxesTransform$:p}),g=Kx({computedData$:f.computedData$,fullDataFormatter$:u,layout$:r.layout$});return{...f,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:g}}))).pipe(I(i)).subscribe(c=>{o.forEach(f=>f()),t.selectAll(`g.${Jx}`).data(c).join("g").attr("class",Jx).each((f,h,p)=>{if(h>1)return;const d=Z(p[h]);o[h]=ai(jh,{selection:d,computedData$:h===0?f.computedStackedData$:f.computedData$,fullParams$:r.fullParams$.pipe(G(g=>h===0?g.firstAxis:g.secondAxis)),fullDataFormatter$:f.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:f.gridAxesTransform$,gridAxesReverseTransform$:f.gridAxesReverseTransform$,gridAxesSize$:f.gridAxesSize$,gridContainerPosition$:f.gridContainerPosition$,isSeriesSeprate$:f.isSeriesSeprate$})})}),()=>{i.next(void 0),o.forEach(c=>c())}}),t2={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},qh={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};qh.textRenderFn.toString=()=>`(eventData) => {
16
16
  if (eventData.highlightTarget === 'datum' && eventData.datum) {
17
17
  return [\`\${eventData.datum.label}: \${eventData.datum.value}\`]
18
18
  } else if (eventData.highlightTarget === 'series') {
@@ -50,7 +50,7 @@
50
50
  return [label, value]
51
51
  }
52
52
  return []
53
- }`;const jk=sg("Container",ox)(({selection:t})=>function(){}),Zh="Tooltip",ax=at(Zh,"g"),qk=at(Zh,"box");function Xk(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 Zk({rootSelection:t,pluginName:e,rootWidth:n,rootHeight:r,svgString:i,tooltipStyle:o,event:a}){t.interrupt("fadeout");const s=5,u=i?[i]:[],l=i?[o]:[],f=t.selectAll(`g.${ax}`).data(u).join(y=>y.append("g").classed(ax,!0).attr("pointer-events","none"),y=>y,y=>y.style("opacity",0).remove()).attr("transform",()=>`translate(${a.offsetX}, ${a.offsetY})`).selectAll(`g.${qk}`).data(l).join(y=>y.append("g").classed(at(e,"box"),!0)),h=f.selectAll("rect").data(l).join(y=>y.append("rect").attr("rx",s).attr("ry",s)).attr("fill",y=>y.backgroundColor).attr("stroke",y=>y.strokeColor).attr("opacity",y=>y.backgroundOpacity),p=f.selectAll("g").data(u).join(y=>y.append("g").classed(at(e,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));u.length&&PR(p,u[0]);const d=p!=null&&p.node()?s2(p):{width:0,height:0};h.attr("width",d.width+o.padding*2).attr("height",d.height+o.padding*2);const g=f!=null&&f.node()?s2(f):{width:0,height:0},m=n-g.width,b=r-g.height,x=a.offsetX+o.offset[0]>m?m-a.offsetX:o.offset[0],v=a.offsetY+o.offset[1]>b?b-a.offsetY:o.offset[1];f.attr("transform",y=>`translate(${x}, ${v})`),f.attr("transform",y=>`translate(${x}, ${v})`)}const Kk=sg(Zh,Xh)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new et,s=o.event$.pipe(I(a),li(g=>g.eventName==="mouseover"||g.eventName==="mousemove")),u=o.event$.pipe(I(a),li(g=>g.eventName==="mouseout")),l=h3(i.fullChartParams$),c=B({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$,textSizePx:l}).pipe(I(a),Y(async g=>g),O(g=>({backgroundColor:Ct(g.fullParams.backgroundColorType,g.fullChartParams),backgroundOpacity:g.fullParams.backgroundOpacity,strokeColor:Ct(g.fullParams.strokeColorType,g.fullChartParams),offset:g.fullParams.offset,padding:g.fullParams.padding,textSize:g.fullChartParams.styles.textSize,textSizePx:g.textSizePx,textColor:Ct(g.fullParams.textColorType,g.fullChartParams)}))),f=B({fullParams:i.fullParams$,tooltipStyle:c}).pipe(I(a),Y(async g=>g),O(g=>g.fullParams.svgRenderFn?g.fullParams.svgRenderFn:m=>{const b=g.fullParams.textRenderFn(m);return Xk(b,g.tooltipStyle)})),h=B({event:s,contentRenderFn:f}).pipe(I(a),Y(async g=>g),O(g=>g.contentRenderFn(g.event))),p=u.pipe(I(a),O(g=>"")),d=Ju(s,u).pipe(I(a),O(g=>g.event));return B({svgString:Ju(h,p),event:d,layout:i.layout$,tooltipStyle:c}).pipe(I(a),Y(async g=>g)).subscribe(g=>{Zk({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)}}),sx={force:{strength:.08,velocityDecay:.3,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},arcScaleType:"area"},ux={outerRadius:.95,innerRadius:0,outerRadiusWhileHighlight:1,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},Kh={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"}]};Kh.eventFn.toString=()=>`(eventData: EventSeries, eventName: EventName, t: number) => {
53
+ }`;const Nk=ng("Container",t2)(({selection:t})=>function(){}),Xh="Tooltip",e2=at(Xh,"g"),Fk=at(Xh,"box");function Gk(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 zk({rootSelection:t,pluginName:e,rootWidth:n,rootHeight:r,svgString:i,tooltipStyle:o,event:a}){t.interrupt("fadeout");const s=5,u=i?[i]:[],l=i?[o]:[],f=t.selectAll(`g.${e2}`).data(u).join(b=>b.append("g").classed(e2,!0).attr("pointer-events","none"),b=>b,b=>b.style("opacity",0).remove()).attr("transform",()=>`translate(${a.offsetX}, ${a.offsetY})`).selectAll(`g.${Fk}`).data(l).join(b=>b.append("g").classed(at(e,"box"),!0)),h=f.selectAll("rect").data(l).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=f.selectAll("g").data(u).join(b=>b.append("g").classed(at(e,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));u.length&&mR(p,u[0]);const d=p!=null&&p.node()?nx(p):{width:0,height:0};h.attr("width",d.width+o.padding*2).attr("height",d.height+o.padding*2);const g=f!=null&&f.node()?nx(f):{width:0,height:0},m=n-g.width,y=r-g.height,v=a.offsetX+o.offset[0]>m?m-a.offsetX:o.offset[0],x=a.offsetY+o.offset[1]>y?y-a.offsetY:o.offset[1];f.attr("transform",b=>`translate(${v}, ${x})`),f.attr("transform",b=>`translate(${v}, ${x})`)}const Ok=ng(Xh,qh)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new nt,s=o.event$.pipe(I(a),li(g=>g.eventName==="mouseover"||g.eventName==="mousemove")),u=o.event$.pipe(I(a),li(g=>g.eventName==="mouseout")),l=n3(i.fullChartParams$),c=Y({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$,textSizePx:l}).pipe(I(a),H(async g=>g),G(g=>({backgroundColor:Ct(g.fullParams.backgroundColorType,g.fullChartParams),backgroundOpacity:g.fullParams.backgroundOpacity,strokeColor:Ct(g.fullParams.strokeColorType,g.fullChartParams),offset:g.fullParams.offset,padding:g.fullParams.padding,textSize:g.fullChartParams.styles.textSize,textSizePx:g.textSizePx,textColor:Ct(g.fullParams.textColorType,g.fullChartParams)}))),f=Y({fullParams:i.fullParams$,tooltipStyle:c}).pipe(I(a),H(async g=>g),G(g=>g.fullParams.svgRenderFn?g.fullParams.svgRenderFn:m=>{const y=g.fullParams.textRenderFn(m);return Gk(y,g.tooltipStyle)})),h=Y({event:s,contentRenderFn:f}).pipe(I(a),H(async g=>g),G(g=>g.contentRenderFn(g.event))),p=u.pipe(I(a),G(g=>"")),d=Qu(s,u).pipe(I(a),G(g=>g.event));return Y({svgString:Qu(h,p),event:d,layout:i.layout$,tooltipStyle:c}).pipe(I(a),H(async g=>g)).subscribe(g=>{zk({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)}}),n2={force:{strength:.08,velocityDecay:.3,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},arcScaleType:"area"},r2={outerRadius:.95,innerRadius:0,outerRadiusWhileHighlight:1,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},Zh={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"}]};Zh.eventFn.toString=()=>`(eventData: EventSeries, eventName: EventName, t: number) => {
54
54
  if (eventName === 'mouseover' || eventName === 'mousemove') {
55
55
  return [String(eventData.datum!.value)]
56
56
  }
@@ -65,4 +65,4 @@
65
65
  )
66
66
  )
67
67
  ]
68
- }`;const Qh={outerRadius:.95,outerRadiusWhileHighlight:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"primary",labelFn:t=>String(t.label)};Qh.labelFn.toString=()=>"d => String(d.label)";const lx={outerRadius:.95,cornerRadius:0,arcScaleType:"area",mouseoverAngleIncrease:.05},Jh={outerRadius:.95,labelCentroid:2.5,labelFn:t=>String(t.label),labelColorType:"primary",arcScaleType:"area"};Jh.labelFn.toString=()=>"d => String(d.label)";const cx={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"};function Qk(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 l(p){const d=u(p.trim());return Math.sqrt(d*r)}function c(p,d){let g={width:0,text:""},m=1/0;const b=[];let x=" ";i&&(x="");for(let v=0,y=p.length;v<y;++v){const w=(g.text?g.text+x:"")+p[v],D=u(w);(m+D)/2<d?(g.width=m=D,g.text=w):(m=u(p[v]),g={width:m,text:p[v]},b.push(g))}return b}function f(p){let d=0;for(let g=0,m=p.length;g<m;++g){const b=(Math.abs(g-m/2+.5)+.5)*r,x=p[g].width/2;d=Math.max(d,Math.sqrt(x**2+b**2))}return d}function h(p,d){o>0&&(d=s(d,o));const g=a(d),m=l(d),b=c(g,m),x=f(b);let v=p.select("text");v.size()||(v=p.append("text")),v.attr("transform",`translate(0,0) scale(${n/x})`);const y=v.selectAll("tspan").data(b),w=y.enter().append("tspan").attr("x",0).merge(y).attr("y",(D,P)=>(P-b.length/2+.8)*r).text(D=>D.text);return y.exit().remove(),y.merge(w)}return h(t,e)}let Sn;function Jk(t,e){return Nm().velocityDecay(e.force.velocityDecay).force("collision",Rm().radius(n=>n.r+e.force.collisionSpacing)).force("charge",Fm().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function tI({visibleComputedLayoutData:t,LastBubbleDataMap:e,graphicWidth:n,graphicHeight:r,SeriesContainerPositionMap:i,scaleType:o}){const a=Math.min(n,r)/2,s=t.flat(),u=s.reduce((h,p)=>h+p.value,0),l=Kr().domain([0,u]).range([0,a]).exponent(o==="area"?.5:1),c=o==="area"?1:(()=>{const h=a*a*Math.PI;return Math.sqrt(h/Eg(s,p=>Math.PI*Math.pow(l(p.value),2)))})(),f=.9;return s.map(h=>{const p=h,d=e.get(p.id);if(d)p.x=d.x,p.y=d.y;else{const m=i.get(p.seriesLabel);p.x=Math.random()*m.width,p.y=Math.random()*m.height}const g=l(p.value??0)*c*f;return p.r=g,p._originR=g,p})}function eI({selection: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 l=X(u[s]);let c=!0;a[o].length<=n.bubbleText.lineLengthMin&&(c=!1),l.call(Qk,{text:a[o],radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:c})}),i}function nI(){return Zg().on("start",(t,e)=>{t.active||Sn.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||Sn.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function rI({fullParams:t,SeriesContainerPositionMap:e}){Sn.force("x",Gm().strength(t.force.strength).x(n=>e.get(n.seriesLabel).centerX)).force("y",zm().strength(t.force.strength).y(n=>e.get(n.seriesLabel).centerY)),Sn.alpha(1).restart()}function iI({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=X(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(ji).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const oI=Cn("Bubbles",sx)(({selection:t,name:e,observer:n,subject:r})=>{const i=new et;let o=new Map;const a=n.fullDataFormatter$.pipe(O(f=>f.sumSeries),rt()),s=n.fullParams$.pipe(I(i),O(f=>f.arcScaleType),rt()),u=B({layout:n.layout$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,visibleComputedLayoutData:n.visibleComputedLayoutData$,scaleType:s}).pipe(I(i),Y(async f=>f),O(f=>tI({visibleComputedLayoutData:f.visibleComputedLayoutData,LastBubbleDataMap:o,graphicWidth:f.layout.width,graphicHeight:f.layout.height,SeriesContainerPositionMap:f.SeriesContainerPositionMap,scaleType:f.scaleType})),Pt(1));u.subscribe(f=>{o=new Map(f.map(h=>[h.id,h]))});const l=n.fullChartParams$.pipe(I(i),O(f=>f.highlightTarget),rt()),c=B({bubblesData:u,fullParams:n.fullParams$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,sumSeries:a}).pipe(I(i),Y(async f=>f),O(f=>{Sn&&Sn.stop();const h=eI({selection:t,bubblesData:f.bubblesData,fullParams:f.fullParams,sumSeries:f.sumSeries});return Sn=Jk(h,f.fullParams),Sn.nodes(f.bubblesData),rI({fullParams:f.fullParams,SeriesContainerPositionMap:f.SeriesContainerPositionMap}),h}));return B({bubblesSelection:c,computedData:n.computedData$,SeriesDataMap:n.SeriesDataMap$,highlightTarget:l}).pipe(I(i),Y(async f=>f)).subscribe(f=>{f.bubblesSelection.on("mouseover",(h,p)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:f.highlightTarget,datum:p,series:f.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:h,data:f.computedData})}).on("mousemove",(h,p)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:f.highlightTarget,datum:p,series:f.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:h,data:f.computedData})}).on("mouseout",(h,p)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:f.highlightTarget,datum:p,series:f.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:h,data:f.computedData})}).on("click",(h,p)=>{r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:f.highlightTarget,datum:p,series:f.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:h,data:f.computedData})}).call(nI())}),B({bubblesSelection:c,bubblesData:u,highlight:n.seriesHighlight$.pipe(O(f=>f.map(h=>h.id))),fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,sumSeries:a,SeriesContainerPositionMap:n.SeriesContainerPositionMap$}).pipe(I(i),Y(async f=>f)).subscribe(f=>{iI({bubblesSelection:f.bubblesSelection,highlightIds:f.highlight,fullChartParams:f.fullChartParams})}),()=>{i.next(void 0)}});function fx({data:t,startAngle:e,endAngle:n}){return vv().startAngle(e).endAngle(n).value(o=>o.value).sort((o,a)=>o.seq-a.seq)(t).map((o,a)=>{let s=o;return s.id=o.data.id,s})}function aI({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r}){const i=at(e,"series");return B({seriesLabels:r,separateSeries:n}).pipe(Y(async o=>o),O((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 Io=({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r,seriesContainerPosition$:i})=>{const o=aI({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r});return B({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(Y(async a=>a),rt((a,s)=>a.seriesContainerPosition.length===s.seriesContainerPosition.length)).subscribe(a=>{a.seriesCenterSelection.attr("transform",(s,u)=>{const l=a.seriesContainerPosition[u]??a.seriesContainerPosition[0];return`translate(${l.centerX}, ${l.centerY})`})}),B({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(Y(async a=>a)).subscribe(a=>{a.seriesCenterSelection.transition().attr("transform",(s,u)=>{const l=a.seriesContainerPosition[u]??a.seriesContainerPosition[0];return`translate(${l.centerX}, ${l.centerY})`})}),{seriesCenterSelection$:o}},tp="Pie";function sI({enter:t,exit:e,data:n,lastTweenData:r,fullParams:i}){return!t.size()&&!e.size()?o=>{const a=n.map((s,u)=>{const l=r[u]??{startAngle:0,endAngle:0,value:0};return{...s,startAngle:s.startAngle*o+l.startAngle*(1-o),endAngle:s.endAngle*o+l.endAngle*(1-o),value:s.value*o+l.value*(1-o)}});return ep(a,i.startAngle,i.endAngle,1)}:o=>ep(n,i.startAngle,i.endAngle,o)}function ep(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 hx({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 uI({pathSelection:t,ids:e,fullChartParams:n,arc:r,arcHighlight: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=X(s[a]);e.includes(o.data.id)?u.style("opacity",1).transition("highlight").ease(ji).duration(500).attr("d",l=>i(l)):u.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",l=>r(l))})}function lI(t,e){const n=new et,r=at(t,"path");let i=[],o=[];const a=e.seriesContainerPosition$.pipe(I(n),O(h=>h.width<h.height?h.width:h.height),rt()),s=new pt(h=>{B({containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,fullParams:e.fullParams$}).pipe(I(n),Y(async p=>p)).subscribe(p=>{const d=fx({data:p.containerVisibleComputedLayoutData,startAngle:p.fullParams.startAngle,endAngle:p.fullParams.endAngle});h.next(d)})}),u=new pt(h=>{B({shorterSideWith:a,fullParams:e.fullParams$}).pipe(I(n),Y(async p=>p)).subscribe(p=>{const d=Tu({axisWidth:p.shorterSideWith,innerRadius:p.fullParams.innerRadius,outerRadius:p.fullParams.outerRadius,padAngle:p.fullParams.padAngle,cornerRadius:p.fullParams.cornerRadius});h.next(d)})}),l=new pt(h=>{B({shorterSideWith:a,fullParams:e.fullParams$}).pipe(I(n),Y(async p=>p)).subscribe(p=>{const d=Tu({axisWidth:p.shorterSideWith,innerRadius:p.fullParams.innerRadius,outerRadius:p.fullParams.outerRadiusWhileHighlight,padAngle:p.fullParams.padAngle,cornerRadius:p.fullParams.cornerRadius});h.next(d)})}),c=e.fullChartParams$.pipe(I(n),O(h=>h.highlightTarget),rt()),f=new pt(h=>{B({pieData:s,arc:u,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:c}).pipe(I(n),Y(async p=>p)).subscribe(p=>{e.containerSelection.interrupt("graphicMove");const d=e.containerSelection.selectAll("path").data(p.pieData,x=>x.id),g=d.enter(),m=d.exit(),b=sI({enter:g,exit:m,data:p.pieData,lastTweenData:i,fullParams:p.fullParams});e.containerSelection.transition("graphicMove").duration(p.fullChartParams.transitionDuration).tween("move",(x,v)=>y=>{o=b(y),hx({selection:e.containerSelection,data:o,arc:p.arc,pathClassName:r})}).on("end",(x,v)=>{o=ep(p.pieData,p.fullParams.startAngle,p.fullParams.endAngle,1);const y=hx({selection:e.containerSelection,data:o,arc:p.arc,pathClassName:r});h.next(y),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})})})}).pipe(Pt(1));return B({pathSelection:f,SeriesDataMap:e.SeriesDataMap$,computedData:e.computedData$,highlightTarget:c}).pipe(I(n),Y(async h=>h)).subscribe(h=>{h.pathSelection.on("mouseover",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mouseover",pluginName:t,highlightTarget:h.highlightTarget,datum:d.data,series:h.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:h.computedData})}).on("mousemove",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mousemove",pluginName:t,highlightTarget:h.highlightTarget,datum:d.data,series:h.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:h.computedData})}).on("mouseout",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mouseout",pluginName:t,highlightTarget:h.highlightTarget,datum:d.data,series:h.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:h.computedData})}).on("click",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"click",pluginName:t,highlightTarget:h.highlightTarget,datum:d.data,series:h.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:h.computedData})})}),B({pathSelection:f,highlight:e.seriesHighlight$.pipe(O(h=>h.map(p=>p.id))),fullChartParams:e.fullChartParams$,arc:u,arcHighlight:l}).pipe(I(n),Y(async h=>h)).subscribe(h=>{uI({pathSelection:h.pathSelection,ids:h.highlight,fullChartParams:h.fullChartParams,arc:h.arc,arcHighlight:h.arcHighlight})}),()=>{n.next(void 0)}}const cI=Cn(tp,ux)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,{seriesCenterSelection$:o}=Io({selection:t,pluginName:tp,separateSeries$:r.separateSeries$,seriesLabels$:r.seriesLabels$,seriesContainerPosition$:r.seriesContainerPosition$}),a=[];return o.pipe(I(i)).subscribe(s=>{a.forEach(u=>u()),s.each((u,l,c)=>{const f=X(c[l]),h=r.visibleComputedLayoutData$.pipe(I(i),O(d=>d[l]??d[0])),p=r.seriesContainerPosition$.pipe(I(i),O(d=>d[l]??d[0]));a[l]=lI(tp,{containerSelection:f,computedData$:r.computedData$,containerVisibleComputedLayoutData$:h,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())}}),ku="PieEventTexts",px=at(ku,"text");function np(t,e){const n=t.selectAll(`text.${px}`).data(e),r=n.enter().append("text").classed(px,!0),i=n.merge(r);return i.each((o,a,s)=>{const u=X(s[a]).text(o.text);Object.keys(o.attr).forEach(l=>{u.attr(l,o.attr[l])}),Object.keys(o.style).forEach(l=>{u.style(l,o.style[l])})}),n.exit().remove(),i}function rp({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 fI(t,e){const n=new et;let r;const i=e.fullChartParams$.pipe(I(n),O(o=>o.highlightTarget),rt());return B({computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:i}).pipe(I(n),Y(async o=>o)).subscribe(o=>{e.containerSelection.transition("move").duration(o.fullChartParams.transitionDuration).tween("move",(a,s)=>u=>{const l=rp({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});np(e.containerSelection,l)}).on("end",(a,s)=>{const u=rp({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});np(e.containerSelection,u),r&&r.unsubscribe(),r=e.event$.subscribe(l=>{const c=rp({eventData:l,eventName:l.eventName,t:1,eventFn:o.fullParams.eventFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});np(e.containerSelection,c)})})}),()=>{n.next(void 0)}}const hI=Cn(ku,Kh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new et,{seriesCenterSelection$:o}=Io({selection:t,pluginName:ku,separateSeries$:n.separateSeries$,seriesLabels$:n.seriesLabels$,seriesContainerPosition$:n.seriesContainerPosition$}),a=[];return o.pipe(I(i)).subscribe(s=>{a.forEach(u=>u()),s.each((u,l,c)=>{const f=X(c[l]),h=n.computedLayoutData$.pipe(I(i),O(d=>d[l]??d[0])),p=n.seriesContainerPosition$.pipe(I(i),O(d=>d[l]??d[0]));a[l]=fI(ku,{containerSelection:f,computedData$:n.computedData$,containerComputedLayoutData$:h,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())}}),Iu="PieLabels",pI=at(Iu,"text");function dI(t,e,n,r){return t.map((i,o)=>{const[a,s]=e.centroid(i),[u,l]=n.centroid(i);return{pieDatum:i,arcIndex:o,arcLabel:i.data.label,x:a*r,y:s*r,mouseoverX:u*r,mouseoverY:l*r}}).filter(i=>i.pieDatum.data.visible)}function gI(t,e,n,r){let i=t.selectAll("text").data(e,u=>u.pieDatum.id),o=i.enter().append("text").classed(pI,!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,l)=>Lu({datum:u.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",u=>"translate("+u.x+","+u.y+")"),a.remove(),s}function mI({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=X(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 yI(t,e){const n=new et;let r=new et,i=[];const o=e.seriesContainerPosition$.pipe(I(n),O(a=>a.width<a.height?a.width:a.height),rt());return B({shorterSideWith:o,containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(I(n),Y(async a=>a)).subscribe(a=>{const s=Tu({axisWidth:a.shorterSideWith,innerRadius:0,outerRadius:a.fullParams.outerRadius,padAngle:0,cornerRadius:0}),u=Tu({axisWidth:a.shorterSideWith,innerRadius:0,outerRadius:a.fullParams.outerRadiusWhileHighlight,padAngle:0,cornerRadius:0}),l=fx({data:a.containerVisibleComputedLayoutData,startAngle:a.fullParams.startAngle,endAngle:a.fullParams.endAngle});i=dI(l,s,u,a.fullParams.labelCentroid);const c=gI(e.containerSelection,i,a.fullParams,a.fullChartParams);r.next(c)}),B({labelSelection:r,highlight:e.seriesHighlight$.pipe(O(a=>a.map(s=>s.id))),fullChartParams:e.fullChartParams$}).pipe(I(n),Y(async a=>a)).subscribe(a=>{mI({labelSelection:a.labelSelection,ids:a.highlight,fullChartParams:a.fullChartParams})}),()=>{n.next(void 0)}}const bI=Cn(Iu,Qh)(({selection:t,observer:e,subject:n})=>{const r=new et,{seriesCenterSelection$:i}=Io({selection:t,pluginName:Iu,separateSeries$:e.separateSeries$,seriesLabels$:e.seriesLabels$,seriesContainerPosition$:e.seriesContainerPosition$}),o=[];return i.pipe(I(r)).subscribe(a=>{o.forEach(s=>s()),a.each((s,u,l)=>{const c=X(l[u]),f=e.visibleComputedLayoutData$.pipe(I(r),O(p=>p[u]??p[0])),h=e.seriesContainerPosition$.pipe(I(r),O(p=>p[u]??p[0]));o[u]=yI(Iu,{containerSelection:c,containerVisibleComputedLayoutData$:f,fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,seriesHighlight$:e.seriesHighlight$,seriesContainerPosition$:h,event$:n.event$})})}),()=>{r.next(void 0)}}),ip="Rose",vI=Math.PI*2,dx=0;function xI({cornerRadius:t,outerRadius:e,axisWidth:n,maxValue:r,arcScaleType:i}){const o=n/2*e,a=i==="area"?.5:1,s=Kr().domain([0,r]).range([0,o]).exponent(a);return u=>{const l=s(u.prevValue),c=s(u.value),f=qe(l,c);return h=>{const p=f(h);return mu().innerRadius(0).outerRadius(p).padAngle(dx).padRadius(p).cornerRadius(t)(u)}}}function _I({pathSelection:t,ids:e,fullParams:n,fullChartParams:r,tweenArc:i}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1).attr("d",o=>i(o)(1));return}t.each((o,a,s)=>{const u=X(s[a]);e.includes(o.data.id)?u.style("opacity",1).transition("highlight").ease(ji).duration(500).attr("d",l=>i({...l,startAngle:l.startAngle-n.mouseoverAngleIncrease,endAngle:l.endAngle+n.mouseoverAngleIncrease})(1)):u.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").attr("d",l=>i(l)(1))})}function wI(t,e){const n=new et,r=at(t,"path");let i=[];const o=e.seriesContainerPosition$.pipe(I(n),O(p=>p.width<p.height?p.width:p.height),rt()),a=B({containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,fullParams:e.fullParams$}).pipe(I(n),Y(async p=>p),O(p=>{const d=vI/p.containerVisibleComputedLayoutData.length;return p.containerVisibleComputedLayoutData.map((g,m)=>({id:g.id,data:g,index:m,value:g.value,startAngle:d*m,endAngle:d*(m+1),padAngle:dx,prevValue:i[m]&&i[m].id===g.id?i[m].value:0}))})),s=e.fullChartParams$.pipe(I(n),O(p=>p.highlightTarget),rt()),u=e.visibleComputedLayoutData$.pipe(O(p=>Math.max(...p.flat().map(d=>d.value))),rt()),l=B({fullParams:e.fullParams$,axisWidth:o,maxValue:u}).pipe(I(n),Y(async p=>p),O(p=>xI({cornerRadius:p.fullParams.cornerRadius,outerRadius:p.fullParams.outerRadius,axisWidth:p.axisWidth,maxValue:p.maxValue,arcScaleType:p.fullParams.arcScaleType}))),c=e.fullChartParams$.pipe(I(n),O(p=>p.transitionDuration),rt()),f=new kx(!1),h=new pt(p=>{B({pieData:a,tweenArc:l,transitionDuration:c}).pipe(I(n),Y(async d=>d)).subscribe(d=>{const g=d.pieData.map((b,x)=>(b.prevValue=i[x]&&i[x].id===b.id?i[x].value:0,b));f.next(!0);const m=e.containerSelection.selectAll("path").data(g,b=>b.id).join("path").classed(r,!0).style("cursor","pointer").attr("fill",(b,x)=>b.data.color);m.interrupt("graphicMove"),m.transition("graphicMove").duration(d.transitionDuration).attrTween("d",d.tweenArc).on("end",()=>{p.next(m),f.next(!1)}),i=Object.assign([],g)})}).pipe(Pt(1));return B({pathSelection:h,SeriesDataMap:e.SeriesDataMap$,computedData:e.computedData$,highlightTarget:s}).pipe(I(n),Y(async p=>p)).subscribe(p=>{p.pathSelection.on("mouseover",(d,g)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"mouseover",pluginName:t,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})}).on("mousemove",(d,g)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"mousemove",pluginName:t,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})}).on("mouseout",(d,g)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"mouseout",pluginName:t,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})}).on("click",(d,g)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"click",pluginName:t,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})})}),B({pathSelection:h,highlight:e.seriesHighlight$.pipe(O(p=>p.map(d=>d.id))),fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,tweenArc:l,isTransitionMoving:f}).pipe(I(n),Y(async p=>p),li(p=>!p.isTransitionMoving)).subscribe(p=>{_I({pathSelection:p.pathSelection,ids:p.highlight,fullParams:p.fullParams,fullChartParams:p.fullChartParams,tweenArc:p.tweenArc})}),()=>{n.next(void 0)}}const $I=Cn(ip,lx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,{seriesCenterSelection$:o}=Io({selection:t,pluginName:ip,separateSeries$:r.separateSeries$,seriesLabels$:r.seriesLabels$,seriesContainerPosition$:r.seriesContainerPosition$}),a=[];return o.pipe(I(i)).subscribe(s=>{a.forEach(u=>u()),s.each((u,l,c)=>{const f=X(c[l]),h=r.visibleComputedLayoutData$.pipe(I(i),O(d=>JSON.parse(JSON.stringify(d[l]??d[0])))),p=r.seriesContainerPosition$.pipe(I(i),O(d=>JSON.parse(JSON.stringify(d[l]??d[0]))));a[l]=wI(ip,{containerSelection:f,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,containerVisibleComputedLayoutData$:h,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())}}),Nu="RoseLabels",SI=at(Nu,"text");function AI({pieData:t,centroid:e,arcScaleType:n,maxValue:r,axisWidth:i,outerRadius:o}){const a=i/2*o,s=n==="area"?.5:1,u=Kr().domain([0,r]).range([0,a]).exponent(s);return t.map((l,c)=>{const f=u(l.value),h=mu().innerRadius(0).outerRadius(f).padAngle(0).padRadius(f).cornerRadius(0),[p,d]=h.centroid(l),[g,m]=[p,d];return{pieDatum:l,arcIndex:c,arcLabel:l.data.label,x:p*e,y:d*e,mouseoverX:g*e,mouseoverY:m*e}}).filter(l=>l.pieDatum.data.visible)}function MI(t,e,n,r){let i=t.selectAll("text").data(e,u=>u.pieDatum.id),o=i.enter().append("text").classed(SI,!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,l)=>Lu({datum:u.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",u=>"translate("+u.x+","+u.y+")"),a.remove(),s}function DI({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=X(o[i]);e.includes(r.pieDatum.data.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 PI(t,e){const n=new et;let r=new et,i=[];const o=e.seriesContainerPosition$.pipe(I(n),O(s=>s.width<s.height?s.width:s.height),rt()),a=e.visibleComputedLayoutData$.pipe(O(s=>Math.max(...s.flat().map(u=>u.value))),rt());return B({shorterSideWith:o,containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,maxValue:a,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(I(n),Y(async s=>s)).subscribe(s=>{const u=Math.PI*2/s.containerVisibleComputedLayoutData.length,l=s.containerVisibleComputedLayoutData.map((f,h)=>({id:f.id,data:f,index:h,value:f.value,startAngle:u*h,endAngle:u*(h+1),padAngle:0}));i=AI({pieData:l,centroid:s.fullParams.labelCentroid,arcScaleType:s.fullParams.arcScaleType,maxValue:s.maxValue,axisWidth:s.shorterSideWith,outerRadius:s.fullParams.outerRadius});const c=MI(e.containerSelection,i,s.fullParams,s.fullChartParams);r.next(c)}),B({labelSelection:r,highlight:e.seriesHighlight$.pipe(O(s=>s.map(u=>u.id))),fullChartParams:e.fullChartParams$}).pipe(I(n),Y(async s=>s)).subscribe(s=>{DI({labelSelection:s.labelSelection,ids:s.highlight,fullChartParams:s.fullChartParams})}),()=>{n.next(void 0)}}const TI=Cn(Nu,Jh)(({selection:t,observer:e,subject:n})=>{const r=new et,{seriesCenterSelection$:i}=Io({selection:t,pluginName:Nu,separateSeries$:e.separateSeries$,seriesLabels$:e.seriesLabels$,seriesContainerPosition$:e.seriesContainerPosition$}),o=[];return i.pipe(I(r)).subscribe(a=>{o.forEach(s=>s()),a.each((s,u,l)=>{const c=X(l[u]),f=e.visibleComputedLayoutData$.pipe(I(r),O(p=>JSON.parse(JSON.stringify(p[u]??p[0])))),h=e.seriesContainerPosition$.pipe(I(r),O(p=>JSON.parse(JSON.stringify(p[u]??p[0]))));o[u]=PI(Nu,{containerSelection:c,visibleComputedLayoutData$:e.visibleComputedLayoutData$,containerVisibleComputedLayoutData$:f,fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,seriesHighlight$:e.seriesHighlight$,seriesContainerPosition$:h,event$:n.event$})})}),()=>{r.next(void 0)}}),gx="SeriesLegend",LI=Cn(gx,cx)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new et,o=n.SeriesDataMap$.pipe(I(i),O(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(I(i),O(u=>{const l=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:l}})),s=Cu(gx,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),op={paddingInner:2,paddingOuter:2,labelColorType:"primary",squarifyRatio:1.618034,sort:(t,e)=>e.value-t.value};op.sort.toString=()=>"(a, b) => b.value - a.value";const mx={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},yx="TreeLegend",CI=ug(yx,mx)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new et,o=n.CategoryDataMap$.pipe(I(i),O(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(I(i),O(u=>{const l=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:l}})),s=Cu(yx,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),sr="TreeMap",bx=at(sr,"tree"),vx=at(sr,"tile");function EI({selection:t,treeData:e,fullParams:n,fullChartParams:r,textSizePx:i}){const o=i/2,a=i,s=t.selectAll(`g.${bx}`).data(e,u=>u.data.id).join("g").attr("class",bx);return s.attr("transform",u=>!u.x0||!u.y0?null:`translate(${u.x0},${u.y0})`).each((u,l,c)=>{const f=X(c[l]);f.selectAll(`rect.${vx}`).data([u],h=>h.data.id).join("rect").attr("id",h=>h.data.id).attr("class",vx).attr("cursor","pointer").attr("width",h=>h.x1-h.x0).attr("height",h=>h.y1-h.y0).attr("fill",h=>h.data.color).attr("data-name",h=>h.data.label).attr("data-category",h=>h.data.categoryLabel).attr("data-value",h=>h.data.value),f.selectAll("g").data([u]).join("g").each((h,p,d)=>{X(d[p]).selectAll("text").data([h]).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 b=X(this),x=m.data.label.split(/\s+/).reverse();let v,y=[];const w=b.attr("x");let D=b.attr("y"),P=0,S=b.text(null).append("tspan").attr("cursor","pointer").attr("fill",Ct(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",w).attr("y",D);for(;v=x.pop();)y.push(v),S.text(y.join(" ")),S.node().getComputedTextLength()>m.x1-m.x0-o&&(y.pop(),S.text(y.join(" ")),y=[v],P+=a,S=b.append("tspan").attr("cursor","pointer").attr("fill",Ct(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",w).attr("y",D).attr("dy",P+"px").text(v))})})}),s}function RI({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)?X(o[i]).style("opacity",1):X(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const kI=ug(sr,op)(({selection:t,name:e,subject:n,observer:r})=>{const i=new et,o=B({layout:r.layout$,visibleComputedData:r.visibleComputedData$,fullParams:r.fullParams$,fullDataFormatter:r.fullDataFormatter$,fullChartParams:r.fullChartParams$}).pipe(I(i),Y(async u=>u),O(u=>{const l=Ty().size([u.layout.width,u.layout.height]).paddingInner(u.fullParams.paddingInner).paddingOuter(u.fullParams.paddingOuter).round(!0).tile(jf.ratio(u.fullParams.squarifyRatio)),c=js(u.visibleComputedData).sum(h=>h.value).sort(u.fullParams.sort);return l(c),c.leaves()})),a=B({selection:Bo(t),treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,textSizePx:r.textSizePx$}).pipe(I(i),Y(async u=>u),O(u=>EI({selection:t,treeData:u.treeData,fullParams:u.fullParams,fullChartParams:u.fullChartParams,textSizePx:u.textSizePx}))),s=r.fullChartParams$.pipe(I(i),O(u=>u.highlightTarget),rt());return B({cellSelection:a,computedData:r.computedData$,treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,highlightTarget:s,CategoryDataMap:r.CategoryDataMap$}).pipe(I(i),Y(async u=>u)).subscribe(u=>{u.cellSelection.on("mouseover",(l,c)=>{l.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseover",pluginName:sr,highlightTarget:u.highlightTarget,datum:c.data,category:u.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:l,data:u.computedData})}).on("mousemove",(l,c)=>{l.stopPropagation(),n.event$.next({type:"tree",eventName:"mousemove",pluginName:sr,highlightTarget:u.highlightTarget,datum:c.data,category:u.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:l,data:u.computedData})}).on("mouseout",(l,c)=>{l.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseout",pluginName:sr,highlightTarget:u.highlightTarget,datum:c.data,category:u.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:l,data:u.computedData})}).on("click",(l,c)=>{l.stopPropagation(),n.event$.next({type:"tree",eventName:"click",pluginName:sr,highlightTarget:u.highlightTarget,datum:c.data,category:u.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:l,data:u.computedData})})}),B({cellSelection:a,highlight:r.treeHighlight$.pipe(O(u=>u.map(l=>l.id))),fullChartParams:r.fullChartParams$}).pipe(I(i),Y(async u=>u)).subscribe(u=>{RI({selection:u.cellSelection,ids:u.highlight,fullChartParams:u.fullChartParams})}),()=>{i.next(void 0)}});Z.BarStack=ik,Z.Bars=ZR,Z.BarsPN=KR,Z.BarsTriangle=hk,Z.Bubbles=oI,Z.CONTAINER_PLUGIN_PARAMS=ox,Z.Container=jk,Z.DEFAULT_BARS_DIVERGING_PARAMS=xx,Z.DEFAULT_BARS_PARAMS=Fo,Z.DEFAULT_BARS_TRIANGLE_PARAMS=lp,Z.DEFAULT_BAR_STACK_PARAMS=up,Z.DEFAULT_BUBBLES_PARAMS=sx,Z.DEFAULT_DOTS_PARAMS=sp,Z.DEFAULT_GRID_LEGEND_PARAMS=hp,Z.DEFAULT_GROUP_AREA_PARAMS=Fu,Z.DEFAULT_GROUP_AXIS_PARAMS=Gu,Z.DEFAULT_LINES_PARAMS=ur,Z.DEFAULT_LINE_AREAS_PARAMS=ap,Z.DEFAULT_MULTI_BARS_PARAMS=N2,Z.DEFAULT_MULTI_BARS_TRIANGLE_PARAMS=G2,Z.DEFAULT_MULTI_BAR_STACK_PARAMS=F2,Z.DEFAULT_MULTI_DOTS_PARAMS=U2,Z.DEFAULT_MULTI_GRID_LEGEND_PARAMS=I2,Z.DEFAULT_MULTI_GROUP_AXIS_PARAMS=Nh,Z.DEFAULT_MULTI_LINES_PARAMS=z2,Z.DEFAULT_MULTI_LINE_AREAS_PARAMS=O2,Z.DEFAULT_MULTI_VALUE_AXIS_PARAMS=Ru,Z.DEFAULT_MULTI_VALUE_STACK_AXIS_PARAMS=Rk,Z.DEFAULT_OVERLAPPING_VALUE_AXES_PARAMS=Fh,Z.DEFAULT_OVERLAPPING_VALUE_STACK_AXES_PARAMS=B2,Z.DEFAULT_PIE_EVENT_TEXTS_PARAMS=Kh,Z.DEFAULT_PIE_LABELS_PARAMS=Qh,Z.DEFAULT_PIE_PARAMS=ux,Z.DEFAULT_ROSE_LABELS_PARAMS=Jh,Z.DEFAULT_ROSE_PARAMS=lx,Z.DEFAULT_SCALING_AREA_PARAMS=fp,Z.DEFAULT_SERIES_LEGEND_PARAMS=cx,Z.DEFAULT_TREE_LEGEND_PARAMS=mx,Z.DEFAULT_TREE_MAP_PARAMS=op,Z.DEFAULT_VALUE_AXIS_PARAMS=zu,Z.DEFAULT_VALUE_STACK_AXIS_PARAMS=cp,Z.Dots=mk,Z.GridLegend=bk,Z.GroupAux=Ek,Z.GroupAxis=xk,Z.LineAreas=YR,Z.Lines=NR,Z.MultiBarStack=Nk,Z.MultiBars=Ik,Z.MultiBarsTriangle=Fk,Z.MultiDots=Ok,Z.MultiGridLegend=kk,Z.MultiGroupAxis=Uk,Z.MultiLineAreas=zk,Z.MultiLines=Gk,Z.MultiValueAxis=Bk,Z.MultiValueStackAxis=Yk,Z.OverlappingValueAxes=Wk,Z.OverlappingValueStackAxes=Vk,Z.Pie=cI,Z.PieEventTexts=hI,Z.PieLabels=bI,Z.Rose=$I,Z.RoseLabels=TI,Z.ScalingArea=Ak,Z.SeriesLegend=LI,Z.TOOLTIP_PARAMS=Xh,Z.Tooltip=Kk,Z.TreeLegend=CI,Z.TreeMap=kI,Z.ValueAxis=wk,Z.ValueStackAxis=$k,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});
68
+ }`;const Kh={outerRadius:.95,outerRadiusWhileHighlight:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"primary",labelFn:t=>String(t.label)};Kh.labelFn.toString=()=>"d => String(d.label)";const i2={outerRadius:.95,cornerRadius:0,arcScaleType:"area",mouseoverAngleIncrease:.05},Qh={outerRadius:.95,labelCentroid:2.5,labelFn:t=>String(t.label),labelColorType:"primary",arcScaleType:"area"};Qh.labelFn.toString=()=>"d => String(d.label)";const o2={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"};function Uk(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 l(p){const d=u(p.trim());return Math.sqrt(d*r)}function c(p,d){let g={width:0,text:""},m=1/0;const y=[];let v=" ";i&&(v="");for(let x=0,b=p.length;x<b;++x){const _=(g.text?g.text+v:"")+p[x],M=u(_);(m+M)/2<d?(g.width=m=M,g.text=_):(m=u(p[x]),g={width:m,text:p[x]},y.push(g))}return y}function f(p){let d=0;for(let g=0,m=p.length;g<m;++g){const y=(Math.abs(g-m/2+.5)+.5)*r,v=p[g].width/2;d=Math.max(d,Math.sqrt(v**2+y**2))}return d}function h(p,d){o>0&&(d=s(d,o));const g=a(d),m=l(d),y=c(g,m),v=f(y);let x=p.select("text");x.size()||(x=p.append("text")),x.attr("transform",`translate(0,0) scale(${n/v})`);const b=x.selectAll("tspan").data(y),_=b.enter().append("tspan").attr("x",0).merge(b).attr("y",(M,D)=>(D-y.length/2+.8)*r).text(M=>M.text);return b.exit().remove(),b.merge(_)}return h(t,e)}let Sn;function Bk(t,e){return Cm().velocityDecay(e.force.velocityDecay).force("collision",Pm().radius(n=>n.r+e.force.collisionSpacing)).force("charge",Em().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function Yk({visibleComputedLayoutData:t,LastBubbleDataMap:e,graphicWidth:n,graphicHeight:r,SeriesContainerPositionMap:i,scaleType:o}){const a=Math.min(n,r)/2,s=t.flat(),u=s.reduce((h,p)=>h+p.value,0),l=Kr().domain([0,u]).range([0,a]).exponent(o==="area"?.5:1),c=o==="area"?1:(()=>{const h=a*a*Math.PI;return Math.sqrt(h/Dg(s,p=>Math.PI*Math.pow(l(p.value),2)))})(),f=.9;return s.map(h=>{const p=h,d=e.get(p.id);if(d)p.x=d.x,p.y=d.y;else{const m=i.get(p.seriesLabel);p.x=Math.random()*m.width,p.y=Math.random()*m.height}const g=l(p.value??0)*c*f;return p.r=g,p._originR=g,p})}function Hk({selection: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 l=Z(u[s]);let c=!0;a[o].length<=n.bubbleText.lineLengthMin&&(c=!1),l.call(Uk,{text:a[o],radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:c})}),i}function Wk(){return Wg().on("start",(t,e)=>{t.active||Sn.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||Sn.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function Vk({fullParams:t,SeriesContainerPositionMap:e}){Sn.force("x",Rm().strength(t.force.strength).x(n=>e.get(n.seriesLabel).centerX)).force("y",km().strength(t.force.strength).y(n=>e.get(n.seriesLabel).centerY)),Sn.alpha(1).restart()}function jk({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(ji).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const qk=Cn("Bubbles",n2)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt;let o=new Map;const a=n.fullDataFormatter$.pipe(G(f=>f.sumSeries),tt()),s=n.fullParams$.pipe(I(i),G(f=>f.arcScaleType),tt()),u=Y({layout:n.layout$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,visibleComputedLayoutData:n.visibleComputedLayoutData$,scaleType:s}).pipe(I(i),H(async f=>f),G(f=>Yk({visibleComputedLayoutData:f.visibleComputedLayoutData,LastBubbleDataMap:o,graphicWidth:f.layout.width,graphicHeight:f.layout.height,SeriesContainerPositionMap:f.SeriesContainerPositionMap,scaleType:f.scaleType})),St(1));u.subscribe(f=>{o=new Map(f.map(h=>[h.id,h]))});const l=n.fullChartParams$.pipe(I(i),G(f=>f.highlightTarget),tt()),c=Y({bubblesData:u,fullParams:n.fullParams$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,sumSeries:a}).pipe(I(i),H(async f=>f),G(f=>{Sn&&Sn.stop();const h=Hk({selection:t,bubblesData:f.bubblesData,fullParams:f.fullParams,sumSeries:f.sumSeries});return Sn=Bk(h,f.fullParams),Sn.nodes(f.bubblesData),Vk({fullParams:f.fullParams,SeriesContainerPositionMap:f.SeriesContainerPositionMap}),h}));return Y({bubblesSelection:c,computedData:n.computedData$,SeriesDataMap:n.SeriesDataMap$,highlightTarget:l}).pipe(I(i),H(async f=>f)).subscribe(f=>{f.bubblesSelection.on("mouseover",(h,p)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:f.highlightTarget,datum:p,series:f.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:h,data:f.computedData})}).on("mousemove",(h,p)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:f.highlightTarget,datum:p,series:f.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:h,data:f.computedData})}).on("mouseout",(h,p)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:f.highlightTarget,datum:p,series:f.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:h,data:f.computedData})}).on("click",(h,p)=>{r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:f.highlightTarget,datum:p,series:f.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:h,data:f.computedData})}).call(Wk())}),Y({bubblesSelection:c,bubblesData:u,highlight:n.seriesHighlight$.pipe(G(f=>f.map(h=>h.id))),fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,sumSeries:a,SeriesContainerPositionMap:n.SeriesContainerPositionMap$}).pipe(I(i),H(async f=>f)).subscribe(f=>{jk({bubblesSelection:f.bubblesSelection,highlightIds:f.highlight,fullChartParams:f.fullChartParams})}),()=>{i.next(void 0)}});function a2({data:t,startAngle:e,endAngle:n}){return dv().startAngle(e).endAngle(n).value(o=>o.value).sort((o,a)=>o.seq-a.seq)(t).map((o,a)=>{let s=o;return s.id=o.data.id,s})}function Xk({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r}){const i=at(e,"series");return Y({seriesLabels:r,separateSeries:n}).pipe(H(async o=>o),G((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())}),St(1))}const No=({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r,seriesContainerPosition$:i})=>{const o=Xk({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r});return Y({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(H(async a=>a),tt((a,s)=>a.seriesContainerPosition.length===s.seriesContainerPosition.length)).subscribe(a=>{a.seriesCenterSelection.attr("transform",(s,u)=>{const l=a.seriesContainerPosition[u]??a.seriesContainerPosition[0];return`translate(${l.centerX}, ${l.centerY})`})}),Y({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(H(async a=>a)).subscribe(a=>{a.seriesCenterSelection.transition().attr("transform",(s,u)=>{const l=a.seriesContainerPosition[u]??a.seriesContainerPosition[0];return`translate(${l.centerX}, ${l.centerY})`})}),{seriesCenterSelection$:o}},Jh="Pie";function Zk({enter:t,exit:e,data:n,lastTweenData:r,fullParams:i}){return!t.size()&&!e.size()?o=>{const a=n.map((s,u)=>{const l=r[u]??{startAngle:0,endAngle:0,value:0};return{...s,startAngle:s.startAngle*o+l.startAngle*(1-o),endAngle:s.endAngle*o+l.endAngle*(1-o),value:s.value*o+l.value*(1-o)}});return tp(a,i.startAngle,i.endAngle,1)}:o=>tp(n,i.startAngle,i.endAngle,o)}function tp(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 s2({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 Kk({pathSelection:t,ids:e,fullChartParams:n,arc:r,arcHighlight: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(ji).duration(500).attr("d",l=>i(l)):u.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",l=>r(l))})}function Qk(t,e){const n=new nt,r=at(t,"path");let i=[],o=[];const a=e.seriesContainerPosition$.pipe(I(n),G(h=>h.width<h.height?h.width:h.height),tt()),s=new dt(h=>{Y({containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,fullParams:e.fullParams$}).pipe(I(n),H(async p=>p)).subscribe(p=>{const d=a2({data:p.containerVisibleComputedLayoutData,startAngle:p.fullParams.startAngle,endAngle:p.fullParams.endAngle});h.next(d)})}),u=new dt(h=>{Y({shorterSideWith:a,fullParams:e.fullParams$}).pipe(I(n),H(async p=>p)).subscribe(p=>{const d=Pu({axisWidth:p.shorterSideWith,innerRadius:p.fullParams.innerRadius,outerRadius:p.fullParams.outerRadius,padAngle:p.fullParams.padAngle,cornerRadius:p.fullParams.cornerRadius});h.next(d)})}),l=new dt(h=>{Y({shorterSideWith:a,fullParams:e.fullParams$}).pipe(I(n),H(async p=>p)).subscribe(p=>{const d=Pu({axisWidth:p.shorterSideWith,innerRadius:p.fullParams.innerRadius,outerRadius:p.fullParams.outerRadiusWhileHighlight,padAngle:p.fullParams.padAngle,cornerRadius:p.fullParams.cornerRadius});h.next(d)})}),c=e.fullChartParams$.pipe(I(n),G(h=>h.highlightTarget),tt()),f=new dt(h=>{Y({pieData:s,arc:u,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:c}).pipe(I(n),H(async p=>p)).subscribe(p=>{e.containerSelection.interrupt("graphicMove");const d=e.containerSelection.selectAll("path").data(p.pieData,v=>v.id),g=d.enter(),m=d.exit(),y=Zk({enter:g,exit:m,data:p.pieData,lastTweenData:i,fullParams:p.fullParams});e.containerSelection.transition("graphicMove").duration(p.fullChartParams.transitionDuration).tween("move",(v,x)=>b=>{o=y(b),s2({selection:e.containerSelection,data:o,arc:p.arc,pathClassName:r})}).on("end",(v,x)=>{o=tp(p.pieData,p.fullParams.startAngle,p.fullParams.endAngle,1);const b=s2({selection:e.containerSelection,data:o,arc:p.arc,pathClassName:r});h.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})})})}).pipe(St(1));return Y({pathSelection:f,SeriesDataMap:e.SeriesDataMap$,computedData:e.computedData$,highlightTarget:c}).pipe(I(n),H(async h=>h)).subscribe(h=>{h.pathSelection.on("mouseover",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mouseover",pluginName:t,highlightTarget:h.highlightTarget,datum:d.data,series:h.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:h.computedData})}).on("mousemove",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mousemove",pluginName:t,highlightTarget:h.highlightTarget,datum:d.data,series:h.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:h.computedData})}).on("mouseout",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mouseout",pluginName:t,highlightTarget:h.highlightTarget,datum:d.data,series:h.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:h.computedData})}).on("click",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"click",pluginName:t,highlightTarget:h.highlightTarget,datum:d.data,series:h.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:h.computedData})})}),Y({pathSelection:f,highlight:e.seriesHighlight$.pipe(G(h=>h.map(p=>p.id))),fullChartParams:e.fullChartParams$,arc:u,arcHighlight:l}).pipe(I(n),H(async h=>h)).subscribe(h=>{Kk({pathSelection:h.pathSelection,ids:h.highlight,fullChartParams:h.fullChartParams,arc:h.arc,arcHighlight:h.arcHighlight})}),()=>{n.next(void 0)}}const Jk=Cn(Jh,r2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,{seriesCenterSelection$:o}=No({selection:t,pluginName:Jh,separateSeries$:r.separateSeries$,seriesLabels$:r.seriesLabels$,seriesContainerPosition$:r.seriesContainerPosition$}),a=[];return o.pipe(I(i)).subscribe(s=>{a.forEach(u=>u()),s.each((u,l,c)=>{const f=Z(c[l]),h=r.visibleComputedLayoutData$.pipe(I(i),G(d=>d[l]??d[0])),p=r.seriesContainerPosition$.pipe(I(i),G(d=>d[l]??d[0]));a[l]=Qk(Jh,{containerSelection:f,computedData$:r.computedData$,containerVisibleComputedLayoutData$:h,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())}}),Ru="PieEventTexts",u2=at(Ru,"text");function ep(t,e){const n=t.selectAll(`text.${u2}`).data(e),r=n.enter().append("text").classed(u2,!0),i=n.merge(r);return i.each((o,a,s)=>{const u=Z(s[a]).text(o.text);Object.keys(o.attr).forEach(l=>{u.attr(l,o.attr[l])}),Object.keys(o.style).forEach(l=>{u.style(l,o.style[l])})}),n.exit().remove(),i}function np({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 tI(t,e){const n=new nt;let r;const i=e.fullChartParams$.pipe(I(n),G(o=>o.highlightTarget),tt());return Y({computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:i}).pipe(I(n),H(async o=>o)).subscribe(o=>{e.containerSelection.transition("move").duration(o.fullChartParams.transitionDuration).tween("move",(a,s)=>u=>{const l=np({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});ep(e.containerSelection,l)}).on("end",(a,s)=>{const u=np({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});ep(e.containerSelection,u),r&&r.unsubscribe(),r=e.event$.subscribe(l=>{const c=np({eventData:l,eventName:l.eventName,t:1,eventFn:o.fullParams.eventFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});ep(e.containerSelection,c)})})}),()=>{n.next(void 0)}}const eI=Cn(Ru,Zh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,{seriesCenterSelection$:o}=No({selection:t,pluginName:Ru,separateSeries$:n.separateSeries$,seriesLabels$:n.seriesLabels$,seriesContainerPosition$:n.seriesContainerPosition$}),a=[];return o.pipe(I(i)).subscribe(s=>{a.forEach(u=>u()),s.each((u,l,c)=>{const f=Z(c[l]),h=n.computedLayoutData$.pipe(I(i),G(d=>d[l]??d[0])),p=n.seriesContainerPosition$.pipe(I(i),G(d=>d[l]??d[0]));a[l]=tI(Ru,{containerSelection:f,computedData$:n.computedData$,containerComputedLayoutData$:h,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())}}),ku="PieLabels",nI=at(ku,"text");function rI(t,e,n,r){return t.map((i,o)=>{const[a,s]=e.centroid(i),[u,l]=n.centroid(i);return{pieDatum:i,arcIndex:o,arcLabel:i.data.label,x:a*r,y:s*r,mouseoverX:u*r,mouseoverY:l*r}}).filter(i=>i.pieDatum.data.visible)}function iI(t,e,n,r){let i=t.selectAll("text").data(e,u=>u.pieDatum.id),o=i.enter().append("text").classed(nI,!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,l)=>Tu({datum:u.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",u=>"translate("+u.x+","+u.y+")"),a.remove(),s}function oI({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 aI(t,e){const n=new nt;let r=new nt,i=[];const o=e.seriesContainerPosition$.pipe(I(n),G(a=>a.width<a.height?a.width:a.height),tt());return Y({shorterSideWith:o,containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(I(n),H(async a=>a)).subscribe(a=>{const s=Pu({axisWidth:a.shorterSideWith,innerRadius:0,outerRadius:a.fullParams.outerRadius,padAngle:0,cornerRadius:0}),u=Pu({axisWidth:a.shorterSideWith,innerRadius:0,outerRadius:a.fullParams.outerRadiusWhileHighlight,padAngle:0,cornerRadius:0}),l=a2({data:a.containerVisibleComputedLayoutData,startAngle:a.fullParams.startAngle,endAngle:a.fullParams.endAngle});i=rI(l,s,u,a.fullParams.labelCentroid);const c=iI(e.containerSelection,i,a.fullParams,a.fullChartParams);r.next(c)}),Y({labelSelection:r,highlight:e.seriesHighlight$.pipe(G(a=>a.map(s=>s.id))),fullChartParams:e.fullChartParams$}).pipe(I(n),H(async a=>a)).subscribe(a=>{oI({labelSelection:a.labelSelection,ids:a.highlight,fullChartParams:a.fullChartParams})}),()=>{n.next(void 0)}}const sI=Cn(ku,Kh)(({selection:t,observer:e,subject:n})=>{const r=new nt,{seriesCenterSelection$:i}=No({selection:t,pluginName:ku,separateSeries$:e.separateSeries$,seriesLabels$:e.seriesLabels$,seriesContainerPosition$:e.seriesContainerPosition$}),o=[];return i.pipe(I(r)).subscribe(a=>{o.forEach(s=>s()),a.each((s,u,l)=>{const c=Z(l[u]),f=e.visibleComputedLayoutData$.pipe(I(r),G(p=>p[u]??p[0])),h=e.seriesContainerPosition$.pipe(I(r),G(p=>p[u]??p[0]));o[u]=aI(ku,{containerSelection:c,containerVisibleComputedLayoutData$:f,fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,seriesHighlight$:e.seriesHighlight$,seriesContainerPosition$:h,event$:n.event$})})}),()=>{r.next(void 0)}}),rp="Rose",uI=Math.PI*2,l2=0;function lI({cornerRadius:t,outerRadius:e,axisWidth:n,maxValue:r,arcScaleType:i}){const o=n/2*e,a=i==="area"?.5:1,s=Kr().domain([0,r]).range([0,o]).exponent(a);return u=>{const l=s(u.prevValue),c=s(u.value),f=qe(l,c);return h=>{const p=f(h);return gu().innerRadius(0).outerRadius(p).padAngle(l2).padRadius(p).cornerRadius(t)(u)}}}function cI({pathSelection:t,ids:e,fullParams:n,fullChartParams:r,tweenArc:i}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1).attr("d",o=>i(o)(1));return}t.each((o,a,s)=>{const u=Z(s[a]);e.includes(o.data.id)?u.style("opacity",1).transition("highlight").ease(ji).duration(500).attr("d",l=>i({...l,startAngle:l.startAngle-n.mouseoverAngleIncrease,endAngle:l.endAngle+n.mouseoverAngleIncrease})(1)):u.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").attr("d",l=>i(l)(1))})}function fI(t,e){const n=new nt,r=at(t,"path");let i=[];const o=e.seriesContainerPosition$.pipe(I(n),G(p=>p.width<p.height?p.width:p.height),tt()),a=Y({containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,fullParams:e.fullParams$}).pipe(I(n),H(async p=>p),G(p=>{const d=uI/p.containerVisibleComputedLayoutData.length;return p.containerVisibleComputedLayoutData.map((g,m)=>({id:g.id,data:g,index:m,value:g.value,startAngle:d*m,endAngle:d*(m+1),padAngle:l2,prevValue:i[m]&&i[m].id===g.id?i[m].value:0}))})),s=e.fullChartParams$.pipe(I(n),G(p=>p.highlightTarget),tt()),u=e.visibleComputedLayoutData$.pipe(G(p=>Math.max(...p.flat().map(d=>d.value))),tt()),l=Y({fullParams:e.fullParams$,axisWidth:o,maxValue:u}).pipe(I(n),H(async p=>p),G(p=>lI({cornerRadius:p.fullParams.cornerRadius,outerRadius:p.fullParams.outerRadius,axisWidth:p.axisWidth,maxValue:p.maxValue,arcScaleType:p.fullParams.arcScaleType}))),c=e.fullChartParams$.pipe(I(n),G(p=>p.transitionDuration),tt()),f=new T2(!1),h=new dt(p=>{Y({pieData:a,tweenArc:l,transitionDuration:c}).pipe(I(n),H(async d=>d)).subscribe(d=>{const g=d.pieData.map((y,v)=>(y.prevValue=i[v]&&i[v].id===y.id?i[v].value:0,y));f.next(!0);const m=e.containerSelection.selectAll("path").data(g,y=>y.id).join("path").classed(r,!0).style("cursor","pointer").attr("fill",(y,v)=>y.data.color);m.interrupt("graphicMove"),m.transition("graphicMove").duration(d.transitionDuration).attrTween("d",d.tweenArc).on("end",()=>{p.next(m),f.next(!1)}),i=Object.assign([],g)})}).pipe(St(1));return Y({pathSelection:h,SeriesDataMap:e.SeriesDataMap$,computedData:e.computedData$,highlightTarget:s}).pipe(I(n),H(async p=>p)).subscribe(p=>{p.pathSelection.on("mouseover",(d,g)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"mouseover",pluginName:t,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})}).on("mousemove",(d,g)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"mousemove",pluginName:t,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})}).on("mouseout",(d,g)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"mouseout",pluginName:t,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})}).on("click",(d,g)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"click",pluginName:t,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})})}),Y({pathSelection:h,highlight:e.seriesHighlight$.pipe(G(p=>p.map(d=>d.id))),fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,tweenArc:l,isTransitionMoving:f}).pipe(I(n),H(async p=>p),li(p=>!p.isTransitionMoving)).subscribe(p=>{cI({pathSelection:p.pathSelection,ids:p.highlight,fullParams:p.fullParams,fullChartParams:p.fullChartParams,tweenArc:p.tweenArc})}),()=>{n.next(void 0)}}const hI=Cn(rp,i2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,{seriesCenterSelection$:o}=No({selection:t,pluginName:rp,separateSeries$:r.separateSeries$,seriesLabels$:r.seriesLabels$,seriesContainerPosition$:r.seriesContainerPosition$}),a=[];return o.pipe(I(i)).subscribe(s=>{a.forEach(u=>u()),s.each((u,l,c)=>{const f=Z(c[l]),h=r.visibleComputedLayoutData$.pipe(I(i),G(d=>JSON.parse(JSON.stringify(d[l]??d[0])))),p=r.seriesContainerPosition$.pipe(I(i),G(d=>JSON.parse(JSON.stringify(d[l]??d[0]))));a[l]=fI(rp,{containerSelection:f,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,containerVisibleComputedLayoutData$:h,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())}}),Iu="RoseLabels",pI=at(Iu,"text");function dI({pieData:t,centroid:e,arcScaleType:n,maxValue:r,axisWidth:i,outerRadius:o}){const a=i/2*o,s=n==="area"?.5:1,u=Kr().domain([0,r]).range([0,a]).exponent(s);return t.map((l,c)=>{const f=u(l.value),h=gu().innerRadius(0).outerRadius(f).padAngle(0).padRadius(f).cornerRadius(0),[p,d]=h.centroid(l),[g,m]=[p,d];return{pieDatum:l,arcIndex:c,arcLabel:l.data.label,x:p*e,y:d*e,mouseoverX:g*e,mouseoverY:m*e}}).filter(l=>l.pieDatum.data.visible)}function gI(t,e,n,r){let i=t.selectAll("text").data(e,u=>u.pieDatum.id),o=i.enter().append("text").classed(pI,!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,l)=>Tu({datum:u.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",u=>"translate("+u.x+","+u.y+")"),a.remove(),s}function mI({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.data.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 yI(t,e){const n=new nt;let r=new nt,i=[];const o=e.seriesContainerPosition$.pipe(I(n),G(s=>s.width<s.height?s.width:s.height),tt()),a=e.visibleComputedLayoutData$.pipe(G(s=>Math.max(...s.flat().map(u=>u.value))),tt());return Y({shorterSideWith:o,containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,maxValue:a,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(I(n),H(async s=>s)).subscribe(s=>{const u=Math.PI*2/s.containerVisibleComputedLayoutData.length,l=s.containerVisibleComputedLayoutData.map((f,h)=>({id:f.id,data:f,index:h,value:f.value,startAngle:u*h,endAngle:u*(h+1),padAngle:0}));i=dI({pieData:l,centroid:s.fullParams.labelCentroid,arcScaleType:s.fullParams.arcScaleType,maxValue:s.maxValue,axisWidth:s.shorterSideWith,outerRadius:s.fullParams.outerRadius});const c=gI(e.containerSelection,i,s.fullParams,s.fullChartParams);r.next(c)}),Y({labelSelection:r,highlight:e.seriesHighlight$.pipe(G(s=>s.map(u=>u.id))),fullChartParams:e.fullChartParams$}).pipe(I(n),H(async s=>s)).subscribe(s=>{mI({labelSelection:s.labelSelection,ids:s.highlight,fullChartParams:s.fullChartParams})}),()=>{n.next(void 0)}}const bI=Cn(Iu,Qh)(({selection:t,observer:e,subject:n})=>{const r=new nt,{seriesCenterSelection$:i}=No({selection:t,pluginName:Iu,separateSeries$:e.separateSeries$,seriesLabels$:e.seriesLabels$,seriesContainerPosition$:e.seriesContainerPosition$}),o=[];return i.pipe(I(r)).subscribe(a=>{o.forEach(s=>s()),a.each((s,u,l)=>{const c=Z(l[u]),f=e.visibleComputedLayoutData$.pipe(I(r),G(p=>JSON.parse(JSON.stringify(p[u]??p[0])))),h=e.seriesContainerPosition$.pipe(I(r),G(p=>JSON.parse(JSON.stringify(p[u]??p[0]))));o[u]=yI(Iu,{containerSelection:c,visibleComputedLayoutData$:e.visibleComputedLayoutData$,containerVisibleComputedLayoutData$:f,fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,seriesHighlight$:e.seriesHighlight$,seriesContainerPosition$:h,event$:n.event$})})}),()=>{r.next(void 0)}}),c2="SeriesLegend",vI=Cn(c2,o2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new nt,o=n.SeriesDataMap$.pipe(I(i),G(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(I(i),G(u=>{const l=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:l}})),s=Lu(c2,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),ip={paddingInner:2,paddingOuter:2,labelColorType:"primary",squarifyRatio:1.618034,sort:(t,e)=>e.value-t.value};ip.sort.toString=()=>"(a, b) => b.value - a.value";const f2={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},h2="TreeLegend",xI=rg(h2,f2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new nt,o=n.CategoryDataMap$.pipe(I(i),G(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(I(i),G(u=>{const l=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:l}})),s=Lu(h2,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),sr="TreeMap",p2=at(sr,"tree"),d2=at(sr,"tile");function _I({selection:t,treeData:e,fullParams:n,fullChartParams:r,textSizePx:i}){const o=i/2,a=i,s=t.selectAll(`g.${p2}`).data(e,u=>u.data.id).join("g").attr("class",p2);return s.attr("transform",u=>!u.x0||!u.y0?null:`translate(${u.x0},${u.y0})`).each((u,l,c)=>{const f=Z(c[l]);f.selectAll(`rect.${d2}`).data([u],h=>h.data.id).join("rect").attr("id",h=>h.data.id).attr("class",d2).attr("cursor","pointer").attr("width",h=>h.x1-h.x0).attr("height",h=>h.y1-h.y0).attr("fill",h=>h.data.color).attr("data-name",h=>h.data.label).attr("data-category",h=>h.data.categoryLabel).attr("data-value",h=>h.data.value),f.selectAll("g").data([u]).join("g").each((h,p,d)=>{Z(d[p]).selectAll("text").data([h]).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),v=m.data.label.split(/\s+/).reverse();let x,b=[];const _=y.attr("x");let M=y.attr("y"),D=0,$=y.text(null).append("tspan").attr("cursor","pointer").attr("fill",Ct(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",_).attr("y",M);for(;x=v.pop();)b.push(x),$.text(b.join(" ")),$.node().getComputedTextLength()>m.x1-m.x0-o&&(b.pop(),$.text(b.join(" ")),b=[x],D+=a,$=y.append("tspan").attr("cursor","pointer").attr("fill",Ct(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",_).attr("y",M).attr("dy",D+"px").text(x))})})}),s}function wI({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 $I=rg(sr,ip)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=Y({layout:r.layout$,visibleComputedData:r.visibleComputedData$,fullParams:r.fullParams$,fullDataFormatter:r.fullDataFormatter$,fullChartParams:r.fullChartParams$}).pipe(I(i),H(async u=>u),G(u=>{const l=Sy().size([u.layout.width,u.layout.height]).paddingInner(u.fullParams.paddingInner).paddingOuter(u.fullParams.paddingOuter).round(!0).tile(Vf.ratio(u.fullParams.squarifyRatio)),c=js(u.visibleComputedData).sum(h=>h.value).sort(u.fullParams.sort);return l(c),c.leaves()})),a=Y({selection:Yo(t),treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,textSizePx:r.textSizePx$}).pipe(I(i),H(async u=>u),G(u=>_I({selection:t,treeData:u.treeData,fullParams:u.fullParams,fullChartParams:u.fullChartParams,textSizePx:u.textSizePx}))),s=r.fullChartParams$.pipe(I(i),G(u=>u.highlightTarget),tt());return Y({cellSelection:a,computedData:r.computedData$,treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,highlightTarget:s,CategoryDataMap:r.CategoryDataMap$}).pipe(I(i),H(async u=>u)).subscribe(u=>{u.cellSelection.on("mouseover",(l,c)=>{l.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseover",pluginName:sr,highlightTarget:u.highlightTarget,datum:c.data,category:u.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:l,data:u.computedData})}).on("mousemove",(l,c)=>{l.stopPropagation(),n.event$.next({type:"tree",eventName:"mousemove",pluginName:sr,highlightTarget:u.highlightTarget,datum:c.data,category:u.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:l,data:u.computedData})}).on("mouseout",(l,c)=>{l.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseout",pluginName:sr,highlightTarget:u.highlightTarget,datum:c.data,category:u.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:l,data:u.computedData})}).on("click",(l,c)=>{l.stopPropagation(),n.event$.next({type:"tree",eventName:"click",pluginName:sr,highlightTarget:u.highlightTarget,datum:c.data,category:u.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:l,data:u.computedData})})}),Y({cellSelection:a,highlight:r.treeHighlight$.pipe(G(u=>u.map(l=>l.id))),fullChartParams:r.fullChartParams$}).pipe(I(i),H(async u=>u)).subscribe(u=>{wI({selection:u.cellSelection,ids:u.highlight,fullChartParams:u.fullChartParams})}),()=>{i.next(void 0)}});K.BarStack=jR,K.Bars=zR,K.BarsPN=OR,K.BarsTriangle=ek,K.Bubbles=qk,K.CONTAINER_PLUGIN_PARAMS=t2,K.Container=Nk,K.DEFAULT_BARS_DIVERGING_PARAMS=g2,K.DEFAULT_BARS_PARAMS=Go,K.DEFAULT_BARS_TRIANGLE_PARAMS=up,K.DEFAULT_BAR_STACK_PARAMS=sp,K.DEFAULT_BUBBLES_PARAMS=n2,K.DEFAULT_DOTS_PARAMS=ap,K.DEFAULT_GRID_LEGEND_PARAMS=fp,K.DEFAULT_GROUP_AREA_PARAMS=Nu,K.DEFAULT_GROUP_AXIS_PARAMS=Fu,K.DEFAULT_LINES_PARAMS=ur,K.DEFAULT_LINE_AREAS_PARAMS=op,K.DEFAULT_MULTI_BARS_PARAMS=Cx,K.DEFAULT_MULTI_BARS_TRIANGLE_PARAMS=Rx,K.DEFAULT_MULTI_BAR_STACK_PARAMS=Ex,K.DEFAULT_MULTI_DOTS_PARAMS=Nx,K.DEFAULT_MULTI_GRID_LEGEND_PARAMS=Lx,K.DEFAULT_MULTI_GROUP_AXIS_PARAMS=Ih,K.DEFAULT_MULTI_LINES_PARAMS=kx,K.DEFAULT_MULTI_LINE_AREAS_PARAMS=Ix,K.DEFAULT_MULTI_VALUE_AXIS_PARAMS=Eu,K.DEFAULT_MULTI_VALUE_STACK_AXIS_PARAMS=wk,K.DEFAULT_OVERLAPPING_VALUE_AXES_PARAMS=Nh,K.DEFAULT_OVERLAPPING_VALUE_STACK_AXES_PARAMS=Fx,K.DEFAULT_PIE_EVENT_TEXTS_PARAMS=Zh,K.DEFAULT_PIE_LABELS_PARAMS=Kh,K.DEFAULT_PIE_PARAMS=r2,K.DEFAULT_ROSE_LABELS_PARAMS=Qh,K.DEFAULT_ROSE_PARAMS=i2,K.DEFAULT_SCALING_AREA_PARAMS=cp,K.DEFAULT_SERIES_LEGEND_PARAMS=o2,K.DEFAULT_TREE_LEGEND_PARAMS=f2,K.DEFAULT_TREE_MAP_PARAMS=ip,K.DEFAULT_VALUE_AXIS_PARAMS=Gu,K.DEFAULT_VALUE_STACK_AXIS_PARAMS=lp,K.Dots=ok,K.GridLegend=sk,K.GroupAux=_k,K.GroupAxis=lk,K.LineAreas=ER,K.Lines=AR,K.MultiBarStack=Ak,K.MultiBars=Sk,K.MultiBarsTriangle=Mk,K.MultiDots=Tk,K.MultiGridLegend=$k,K.MultiGroupAxis=Lk,K.MultiLineAreas=Pk,K.MultiLines=Dk,K.MultiValueAxis=Ck,K.MultiValueStackAxis=Ek,K.OverlappingValueAxes=kk,K.OverlappingValueStackAxes=Ik,K.Pie=Jk,K.PieEventTexts=eI,K.PieLabels=sI,K.Rose=hI,K.RoseLabels=bI,K.ScalingArea=dk,K.SeriesLegend=vI,K.TOOLTIP_PARAMS=qh,K.Tooltip=Ok,K.TreeLegend=xI,K.TreeMap=$I,K.ValueAxis=fk,K.ValueStackAxis=hk,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})});