@orbcharts/plugins-basic 3.0.0-alpha.39 → 3.0.0-alpha.40

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. package/dist/{src → orbcharts-plugins-basic/src}/base/BaseBarStack.d.ts +1 -1
  2. package/dist/{src → orbcharts-plugins-basic/src}/base/BaseBars.d.ts +1 -1
  3. package/dist/{src → orbcharts-plugins-basic/src}/base/BaseBarsTriangle.d.ts +1 -1
  4. package/dist/{src → orbcharts-plugins-basic/src}/base/BaseDots.d.ts +1 -1
  5. package/dist/{src → orbcharts-plugins-basic/src}/base/BaseLegend.d.ts +1 -0
  6. package/dist/orbcharts-plugins-basic/src/base/BaseLineAreas.d.ts +30 -0
  7. package/dist/{src → orbcharts-plugins-basic/src}/base/BaseLines.d.ts +1 -1
  8. package/dist/{src → orbcharts-plugins-basic/src}/grid/defaults.d.ts +2 -1
  9. package/dist/{src → orbcharts-plugins-basic/src}/grid/gridObservables.d.ts +2 -2
  10. package/dist/{src → orbcharts-plugins-basic/src}/grid/index.d.ts +1 -0
  11. package/dist/orbcharts-plugins-basic/src/grid/plugins/LineAreas.d.ts +1 -0
  12. package/dist/{src → orbcharts-plugins-basic/src}/grid/types.d.ts +5 -0
  13. package/dist/orbcharts-plugins-basic/src/index.d.ts +5 -0
  14. package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/types.d.ts +1 -0
  15. package/dist/{src → orbcharts-plugins-basic/src}/series/types.d.ts +1 -0
  16. package/dist/{src → orbcharts-plugins-basic/src}/tree/types.d.ts +1 -0
  17. package/dist/{src → orbcharts-plugins-basic/src}/utils/orbchartsUtils.d.ts +7 -2
  18. package/dist/orbcharts-plugins-basic.es.js +7449 -7078
  19. package/dist/orbcharts-plugins-basic.umd.js +12 -9
  20. package/dist/src/index.d.ts +1 -5
  21. package/package.json +2 -2
  22. package/src/base/BaseBarStack.ts +7 -3
  23. package/src/base/BaseBars.ts +7 -3
  24. package/src/base/BaseBarsTriangle.ts +52 -135
  25. package/src/base/BaseDots.ts +7 -3
  26. package/src/base/BaseLegend.ts +16 -1
  27. package/src/base/BaseLineAreas.ts +625 -0
  28. package/src/base/BaseLines.ts +12 -12
  29. package/src/base/BaseValueAxis.ts +0 -1
  30. package/src/grid/defaults.ts +7 -0
  31. package/src/grid/gridObservables.ts +5 -5
  32. package/src/grid/index.ts +1 -0
  33. package/src/grid/plugins/BarStack.ts +1 -1
  34. package/src/grid/plugins/Bars.ts +1 -1
  35. package/src/grid/plugins/BarsDiverging.ts +1 -1
  36. package/src/grid/plugins/BarsTriangle.ts +1 -1
  37. package/src/grid/plugins/Dots.ts +1 -1
  38. package/src/grid/plugins/GroupAux.ts +8 -0
  39. package/src/grid/plugins/LineAreas.ts +37 -0
  40. package/src/grid/plugins/Lines.ts +1 -1
  41. package/src/grid/plugins/ScalingArea.ts +11 -7
  42. package/src/grid/types.ts +6 -1
  43. package/src/multiGrid/defaults.ts +2 -1
  44. package/src/multiGrid/multiGridObservables.ts +6 -6
  45. package/src/multiGrid/plugins/MultiBarStack.ts +1 -1
  46. package/src/multiGrid/plugins/MultiBars.ts +1 -1
  47. package/src/multiGrid/plugins/MultiBarsTriangle.ts +1 -1
  48. package/src/multiGrid/plugins/MultiDots.ts +1 -1
  49. package/src/multiGrid/plugins/MultiLines.ts +1 -1
  50. package/src/multiGrid/types.ts +1 -0
  51. package/src/noneData/defaults.ts +21 -7
  52. package/src/series/defaults.ts +1 -0
  53. package/src/series/types.ts +1 -0
  54. package/src/tree/defaults.ts +1 -0
  55. package/src/tree/plugins/TreeMap.ts +6 -4
  56. package/src/tree/types.ts +1 -0
  57. package/src/utils/orbchartsUtils.ts +22 -8
  58. package/tsconfig.json +4 -1
  59. /package/dist/{src → orbcharts-plugins-basic/src}/base/BaseGroupArea.d.ts +0 -0
  60. /package/dist/{src → orbcharts-plugins-basic/src}/base/BaseGroupAxis.d.ts +0 -0
  61. /package/dist/{src → orbcharts-plugins-basic/src}/base/BaseValueAxis.d.ts +0 -0
  62. /package/dist/{src → orbcharts-plugins-basic/src}/base/types.d.ts +0 -0
  63. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/BarStack.d.ts +0 -0
  64. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/Bars.d.ts +0 -0
  65. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/BarsDiverging.d.ts +0 -0
  66. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/BarsTriangle.d.ts +0 -0
  67. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/Dots.d.ts +0 -0
  68. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/GridLegend.d.ts +0 -0
  69. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/GroupAux.d.ts +0 -0
  70. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/GroupAxis.d.ts +0 -0
  71. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/Lines.d.ts +0 -0
  72. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/Ranking.d.ts +0 -0
  73. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/RankingAxis.d.ts +0 -0
  74. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/ScalingArea.d.ts +0 -0
  75. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/ValueAxis.d.ts +0 -0
  76. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/ValueStackAxis.d.ts +0 -0
  77. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/defaults.d.ts +0 -0
  78. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/index.d.ts +0 -0
  79. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/multiGridObservables.d.ts +0 -0
  80. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiBarStack.d.ts +0 -0
  81. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiBars.d.ts +0 -0
  82. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiBarsTriangle.d.ts +0 -0
  83. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiDots.d.ts +0 -0
  84. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiGridLegend.d.ts +0 -0
  85. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiGroupAxis.d.ts +0 -0
  86. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiLines.d.ts +0 -0
  87. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiValueAxis.d.ts +0 -0
  88. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/OverlappingValueAxes.d.ts +0 -0
  89. /package/dist/{src → orbcharts-plugins-basic/src}/multiValue/index.d.ts +0 -0
  90. /package/dist/{src → orbcharts-plugins-basic/src}/multiValue/plugins/Scatter.d.ts +0 -0
  91. /package/dist/{src → orbcharts-plugins-basic/src}/multiValue/plugins/ScatterAxes.d.ts +0 -0
  92. /package/dist/{src → orbcharts-plugins-basic/src}/noneData/defaults.d.ts +0 -0
  93. /package/dist/{src → orbcharts-plugins-basic/src}/noneData/index.d.ts +0 -0
  94. /package/dist/{src → orbcharts-plugins-basic/src}/noneData/plugins/Container.d.ts +0 -0
  95. /package/dist/{src → orbcharts-plugins-basic/src}/noneData/plugins/Tooltip.d.ts +0 -0
  96. /package/dist/{src → orbcharts-plugins-basic/src}/noneData/types.d.ts +0 -0
  97. /package/dist/{src → orbcharts-plugins-basic/src}/relationship/index.d.ts +0 -0
  98. /package/dist/{src → orbcharts-plugins-basic/src}/relationship/plugins/Relationship.d.ts +0 -0
  99. /package/dist/{src → orbcharts-plugins-basic/src}/series/defaults.d.ts +0 -0
  100. /package/dist/{src → orbcharts-plugins-basic/src}/series/index.d.ts +0 -0
  101. /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/Bubbles.d.ts +0 -0
  102. /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/Pie.d.ts +0 -0
  103. /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/PieEventTexts.d.ts +0 -0
  104. /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/PieLabels.d.ts +0 -0
  105. /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/SeriesLegend.d.ts +0 -0
  106. /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/Waffle.d.ts +0 -0
  107. /package/dist/{src → orbcharts-plugins-basic/src}/series/seriesUtils.d.ts +0 -0
  108. /package/dist/{src → orbcharts-plugins-basic/src}/tree/defaults.d.ts +0 -0
  109. /package/dist/{src → orbcharts-plugins-basic/src}/tree/index.d.ts +0 -0
  110. /package/dist/{src → orbcharts-plugins-basic/src}/tree/plugins/TreeLegend.d.ts +0 -0
  111. /package/dist/{src → orbcharts-plugins-basic/src}/tree/plugins/TreeMap.d.ts +0 -0
  112. /package/dist/{src → orbcharts-plugins-basic/src}/utils/commonUtils.d.ts +0 -0
  113. /package/dist/{src → orbcharts-plugins-basic/src}/utils/d3Graphics.d.ts +0 -0
  114. /package/dist/{src → orbcharts-plugins-basic/src}/utils/d3Utils.d.ts +0 -0
  115. /package/dist/{src → orbcharts-plugins-basic/src}/utils/observables.d.ts +0 -0
  116. /package/dist/{vite.config.d.ts → orbcharts-plugins-basic/vite.config.d.ts} +0 -0
@@ -1,12 +1,15 @@
1
- (function(Z,ar){typeof exports=="object"&&typeof module<"u"?ar(exports):typeof define=="function"&&define.amd?define(["exports"],ar):(Z=typeof globalThis<"u"?globalThis:Z||self,ar(Z["orbcharts-plugins-basic"]={}))})(this,function(Z){"use strict";const ar={lineCurve:"curveLinear",lineWidth:2},Gh={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1},zh={showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>t,labelPadding:24},No={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},mx={...No},Oh={barWidth:0,barGroupPadding:10,barRadius:!1},Uh={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},Bh={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},Lu={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},Yh=Lu,Wh={},Hh={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0};var Eu=function(t,e){return Eu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Eu(t,e)};function sr(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Eu(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function yx(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(l){try{c(r.next(l))}catch(h){a(h)}}function u(l){try{c(r.throw(l))}catch(h){a(h)}}function c(l){l.done?o(l.value):i(l.value).then(s,u)}c((r=r.apply(t,e||[])).next())})}function qh(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function ur(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 lr(t){return this instanceof lr?(this.v=t,this):new lr(t)}function bx(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(d){return function(p){return Promise.resolve(p).then(d,h)}}function s(d,p){r[d]&&(i[d]=function(g){return new Promise(function(m,y){o.push([d,g,m,y])>1||u(d,g)})},p&&(i[d]=p(i[d])))}function u(d,p){try{c(r[d](p))}catch(g){f(o[0][3],g)}}function c(d){d.value instanceof lr?Promise.resolve(d.value.v).then(l,h):f(o[0][2],d)}function l(d){u("next",d)}function h(d){u("throw",d)}function f(d,p){d(p),o.shift(),o.length&&u(o[0][0],o[0][1])}}function vx(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 ur=="function"?ur(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,u){a=t[o](a),i(s,u,a.done,a.value)})}}function i(o,a,s,u){Promise.resolve(u).then(function(c){o({value:c,done:s})},a)}}typeof SuppressedError=="function"&&SuppressedError;function mt(t){return typeof t=="function"}function ku(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Cu=ku(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
1
+ (function(Z,cr){typeof exports=="object"&&typeof module<"u"?cr(exports):typeof define=="function"&&define.amd?define(["exports"],cr):(Z=typeof globalThis<"u"?globalThis:Z||self,cr(Z["orbcharts-plugins-basic"]={}))})(this,function(Z){"use strict";const cr={lineCurve:"curveLinear",lineWidth:2},Uh={lineCurve:"curveLinear",linearGradientOpacity:[1,0]},Bh={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1},Yh={showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>t,labelPadding:24},Fo={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},xx={...Fo},Wh={barWidth:0,barGroupPadding:10,barRadius:!1},Hh={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},qh={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},Lu={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},Xh=Lu,jh={},Vh={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"};var Eu=function(t,e){return Eu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Eu(t,e)};function lr(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Eu(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function _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(l){try{c(r.next(l))}catch(h){a(h)}}function u(l){try{c(r.throw(l))}catch(h){a(h)}}function c(l){l.done?o(l.value):i(l.value).then(s,u)}c((r=r.apply(t,e||[])).next())})}function Zh(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function fr(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function hr(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function ui(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function dr(t){return this instanceof dr?(this.v=t,this):new dr(t)}function 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={},s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(d){return function(p){return Promise.resolve(p).then(d,h)}}function s(d,p){r[d]&&(i[d]=function(g){return new Promise(function(m,y){o.push([d,g,m,y])>1||u(d,g)})},p&&(i[d]=p(i[d])))}function u(d,p){try{c(r[d](p))}catch(g){f(o[0][3],g)}}function c(d){d.value instanceof dr?Promise.resolve(d.value.v).then(l,h):f(o[0][2],d)}function l(d){u("next",d)}function h(d){u("throw",d)}function f(d,p){d(p),o.shift(),o.length&&u(o[0][0],o[0][1])}}function $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 fr=="function"?fr(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,u){a=t[o](a),i(s,u,a.done,a.value)})}}function i(o,a,s,u){Promise.resolve(u).then(function(c){o({value:c,done:s})},a)}}typeof SuppressedError=="function"&&SuppressedError;function mt(t){return typeof t=="function"}function ku(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Cu=ku(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
2
2
  `+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
3
- `):"",this.name="UnsubscriptionError",this.errors=n}});function Ru(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Fo=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=ur(a),u=s.next();!u.done;u=s.next()){var c=u.value;c.remove(this)}}catch(g){e={error:g}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(mt(l))try{l()}catch(g){o=g instanceof Cu?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=ur(h),d=f.next();!d.done;d=f.next()){var p=d.value;try{Vh(p)}catch(g){o=o??[],g instanceof Cu?o=si(si([],cr(o)),cr(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new Cu(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Vh(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&Ru(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Ru(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Xh=Fo.EMPTY;function jh(t){return t instanceof Fo||t&&"closed"in t&&mt(t.remove)&&mt(t.add)&&mt(t.unsubscribe)}function Vh(t){mt(t)?t():t.unsubscribe()}var Zh={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Kh={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=Kh.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Qh(t){Kh.setTimeout(function(){throw t})}function Iu(){}function Go(t){t()}var Nu=function(t){sr(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,jh(n)&&n.add(r)):r.destination=$x,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}(Fo),xx=Function.prototype.bind;function Fu(t,e){return xx.call(t,e)}var _x=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){zo(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){zo(r)}else zo(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){zo(n)}},t}(),ui=function(t){sr(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(mt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&Zh.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Fu(n.next,s),error:n.error&&Fu(n.error,s),complete:n.complete&&Fu(n.complete,s)}):a=n}return o.destination=new _x(a),o}return e}(Nu);function zo(t){Qh(t)}function wx(t){throw t}var $x={closed:!0,next:Iu,error:wx,complete:Iu},Gu=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function fr(t){return t}function Sx(t){return t.length===0?fr:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var lt=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=Mx(e)?e:new ui(e,n,r);return Go(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=Jh(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[Gu]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Sx(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Jh(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 Jh(t){var e;return(e=t??Zh.Promise)!==null&&e!==void 0?e:Promise}function Ax(t){return t&&mt(t.next)&&mt(t.error)&&mt(t.complete)}function Mx(t){return t&&t instanceof Nu||Ax(t)&&jh(t)}function Tx(t){return mt(t==null?void 0:t.lift)}function ce(t){return function(e){if(Tx(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function oe(t,e,n,r,i){return new Px(t,e,n,r,i)}var Px=function(t){sr(e,t);function e(n,r,i,o,a,s){var u=t.call(this,n)||this;return u.onFinalize=a,u.shouldUnsubscribe=s,u._next=r?function(c){try{r(c)}catch(l){n.error(l)}}:t.prototype._next,u._error=o?function(c){try{o(c)}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(Nu),Dx=ku(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),rt=function(t){sr(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 td(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new Dx},e.prototype.next=function(n){var r=this;Go(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=ur(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(c){i={error:c}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;Go(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;Go(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?Xh:(this.currentObservers=null,s.push(n),new Fo(function(){r.currentObservers=null,Ru(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new lt;return n.source=this,n},e.create=function(n,r){return new td(n,r)},e}(lt),td=function(t){sr(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:Xh},e}(rt),ed={now:function(){return(ed.delegate||Date).now()},delegate:void 0},Lx=function(t){sr(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=ed);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),u=0;u<s.length&&!n.closed;u+=o?1:2)n.next(s[u]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var u=i.now(),c=0,l=1;l<o.length&&o[l]<=u;l+=2)c=l;c&&o.splice(0,c+1)}},e}(rt),nd=new lt(function(t){return t.complete()});function Ex(t){return t&&mt(t.schedule)}function zu(t){return t[t.length-1]}function kx(t){return mt(zu(t))?t.pop():void 0}function Ou(t){return Ex(zu(t))?t.pop():void 0}function Cx(t,e){return typeof zu(t)=="number"?t.pop():e}var Uu=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function rd(t){return mt(t==null?void 0:t.then)}function id(t){return mt(t[Gu])}function od(t){return Symbol.asyncIterator&&mt(t==null?void 0:t[Symbol.asyncIterator])}function ad(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 Rx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var sd=Rx();function ud(t){return mt(t==null?void 0:t[sd])}function cd(t){return bx(this,arguments,function(){var n,r,i,o;return qh(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,lr(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,lr(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,lr(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 ld(t){return mt(t==null?void 0:t.getReader)}function le(t){if(t instanceof lt)return t;if(t!=null){if(id(t))return Ix(t);if(Uu(t))return Nx(t);if(rd(t))return Fx(t);if(od(t))return fd(t);if(ud(t))return Gx(t);if(ld(t))return zx(t)}throw ad(t)}function Ix(t){return new lt(function(e){var n=t[Gu]();if(mt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Nx(t){return new lt(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Fx(t){return new lt(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Qh)})}function Gx(t){return new lt(function(e){var n,r;try{for(var i=ur(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 fd(t){return new lt(function(e){Ox(t,e).catch(function(n){return e.error(n)})})}function zx(t){return fd(cd(t))}function Ox(t,e){var n,r,i,o;return yx(this,void 0,void 0,function(){var a,s;return qh(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=vx(t),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function un(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function hd(t,e){return e===void 0&&(e=0),ce(function(n,r){n.subscribe(oe(r,function(i){return un(r,t,function(){return r.next(i)},e)},function(){return un(r,t,function(){return r.complete()},e)},function(i){return un(r,t,function(){return r.error(i)},e)}))})}function dd(t,e){return e===void 0&&(e=0),ce(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Ux(t,e){return le(t).pipe(dd(e),hd(e))}function Bx(t,e){return le(t).pipe(dd(e),hd(e))}function Yx(t,e){return new lt(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function Wx(t,e){return new lt(function(n){var r;return un(n,e,function(){r=t[sd](),un(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return mt(r==null?void 0:r.return)&&r.return()}})}function pd(t,e){if(!t)throw new Error("Iterable cannot be null");return new lt(function(n){un(n,e,function(){var r=t[Symbol.asyncIterator]();un(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function Hx(t,e){return pd(cd(t),e)}function qx(t,e){if(t!=null){if(id(t))return Ux(t,e);if(Uu(t))return Yx(t,e);if(rd(t))return Bx(t,e);if(od(t))return pd(t,e);if(ud(t))return Wx(t,e);if(ld(t))return Hx(t,e)}throw ad(t)}function Oo(t,e){return e?qx(t,e):le(t)}function ci(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ou(t);return Oo(t,n)}var gd=ku(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function U(t,e){return ce(function(n,r){var i=0;n.subscribe(oe(r,function(o){r.next(t.call(e,o,i++))}))})}var Xx=Array.isArray;function jx(t,e){return Xx(e)?t.apply(void 0,si([],cr(e))):t(e)}function md(t){return U(function(e){return jx(t,e)})}var Vx=Array.isArray,Zx=Object.getPrototypeOf,Kx=Object.prototype,Qx=Object.keys;function Jx(t){if(t.length===1){var e=t[0];if(Vx(e))return{args:e,keys:null};if(t_(e)){var n=Qx(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"&&Zx(t)===Kx}function e_(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function W(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ou(t),r=kx(t),i=Jx(t),o=i.args,a=i.keys;if(o.length===0)return Oo([],n);var s=new lt(n_(o,n,a?function(u){return e_(a,u)}:fr));return r?s.pipe(md(r)):s}function n_(t,e,n){return n===void 0&&(n=fr),function(r){yd(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,u=function(l){yd(e,function(){var h=Oo(t[l],e),f=!1;h.subscribe(oe(r,function(d){o[l]=d,f||(f=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},c=0;c<i;c++)u(c)},r)}}function yd(t,e,n){t?un(n,t,e):e()}function r_(t,e,n,r,i,o,a,s){var u=[],c=0,l=0,h=!1,f=function(){h&&!u.length&&!c&&e.complete()},d=function(g){return c<r?p(g):u.push(g)},p=function(g){c++;var m=!1;le(n(g,l++)).subscribe(oe(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{c--;for(var y=function(){var x=u.shift();a||p(x)};u.length&&c<r;)y();f()}catch(x){e.error(x)}}))};return t.subscribe(oe(e,d,function(){h=!0,f()})),function(){}}function Bu(t,e,n){return n===void 0&&(n=1/0),mt(e)?Bu(function(r,i){return U(function(o,a){return e(r,o,i,a)})(le(t(r,i)))},n):(typeof e=="number"&&(n=e),ce(function(r,i){return r_(r,i,t,n)}))}function i_(t){return t===void 0&&(t=1/0),Bu(fr,t)}function o_(t){return new lt(function(e){le(t()).subscribe(e)})}var a_=["addListener","removeListener"],s_=["addEventListener","removeEventListener"],u_=["on","off"];function Yu(t,e,n,r){if(mt(n)&&(r=n,n=void 0),r)return Yu(t,e,n).pipe(md(r));var i=cr(f_(t)?s_.map(function(s){return function(u){return t[s](e,u,n)}}):c_(t)?a_.map(bd(t,e)):l_(t)?u_.map(bd(t,e)):[],2),o=i[0],a=i[1];if(!o&&Uu(t))return Bu(function(s){return Yu(s,e,n)})(le(t));if(!o)throw new TypeError("Invalid event target");return new lt(function(s){var u=function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];return s.next(1<c.length?c:c[0])};return o(u),function(){return a(u)}})}function bd(t,e){return function(n){return function(r){return t[n](e,r)}}}function c_(t){return mt(t.addListener)&&mt(t.removeListener)}function l_(t){return mt(t.on)&&mt(t.off)}function f_(t){return mt(t.addEventListener)&&mt(t.removeEventListener)}function vd(t,e,n){return o_(function(){return t()?e:n})}function Wu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ou(t),r=Cx(t,1/0),i=t;return i.length?i.length===1?le(i[0]):i_(r)(Oo(i,n)):nd}function Uo(t,e){return ce(function(n,r){var i=0;n.subscribe(oe(r,function(o){return t.call(e,o,i++)&&r.next(o)}))})}function h_(t){return ce(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){r||n.next(t),n.complete()}))})}function d_(t){return t<=0?function(){return nd}:ce(function(e,n){var r=0;e.subscribe(oe(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function ht(t,e){return e===void 0&&(e=fr),t=t??p_,ce(function(n,r){var i,o=!0;n.subscribe(oe(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function p_(t,e){return t===e}function g_(t){return t===void 0&&(t=m_),ce(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(t())}))})}function m_(){return new gd}function li(t,e){var n=arguments.length>=2;return function(r){return r.pipe(fr,d_(1),n?h_(e):g_(function(){return new gd}))}}function y_(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new rt}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,u=s===void 0?!0:s;return function(c){var l,h,f,d=0,p=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),l=f=void 0,p=g=!1},x=function(){var v=l;y(),v==null||v.unsubscribe()};return ce(function(v,b){d++,!g&&!p&&m();var $=f=f??n();b.add(function(){d--,d===0&&!g&&!p&&(h=Hu(x,u))}),$.subscribe(b),!l&&d>0&&(l=new ui({next:function(w){return $.next(w)},error:function(w){g=!0,m(),h=Hu(y,i,w),$.error(w)},complete:function(){p=!0,m(),h=Hu(y,a),$.complete()}}),le(v).subscribe(l))})(c)}}function Hu(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new ui({next:function(){i.unsubscribe(),t()}});return le(e.apply(void 0,si([],cr(n)))).subscribe(i)}}function Ye(t,e,n){var r,i=!1;return r=t,y_({connector:function(){return new Lx(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function B(t,e){return ce(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(oe(r,function(u){i==null||i.unsubscribe();var c=0,l=o++;le(t(u,l)).subscribe(i=oe(r,function(h){return r.next(e?e(u,h,l,c++):h)},function(){i=null,s()}))},function(){a=!0,s()}))})}function F(t){return ce(function(e,n){le(t).subscribe(oe(n,function(){return n.complete()},Iu)),!n.closed&&e.subscribe(n)})}const hr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function Bo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function b_(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function xd(t){let e,n,r;t.length!==2?(e=Bo,n=(s,u)=>Bo(t(s),u),r=(s,u)=>t(s)-u):(e=t===Bo||t===b_?t:v_,n=t,r=t);function i(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<0?c=h+1:l=h}while(c<l)}return c}function o(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<=0?c=h+1:l=h}while(c<l)}return c}function a(s,u,c=0,l=s.length){const h=i(s,u,c,l-1);return h>c&&r(s[h-1],u)>-r(s[h],u)?h-1:h}return{left:i,center:a,right:o}}function v_(){return 0}function x_(t){return t===null?NaN:+t}const __=xd(Bo),_d=__.right;xd(x_).center;class wd extends Map{constructor(e,n=S_){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($d(this,e))}has(e){return super.has($d(this,e))}set(e,n){return super.set(w_(this,e),n)}delete(e){return super.delete($_(this,e))}}function $d({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function w_({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function $_({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function S_(t){return t!==null&&typeof t=="object"?t.valueOf():t}const A_=Math.sqrt(50),M_=Math.sqrt(10),T_=Math.sqrt(2);function Yo(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=A_?10:o>=M_?5:o>=T_?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),u=Math.round(e*c),s/c<t&&++s,u/c>e&&--u,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),u=Math.round(e/c),s*c<t&&++s,u*c>e&&--u),u<s&&.5<=n&&n<2?Yo(t,e,n*2):[s,u,c]}function P_(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?Yo(e,t,n):Yo(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)u[c]=(o-c)/-a;else for(let c=0;c<s;++c)u[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)u[c]=(i+c)/-a;else for(let c=0;c<s;++c)u[c]=(i+c)*a;return u}function qu(t,e,n){return e=+e,t=+t,n=+n,Yo(t,e,n)[2]}function D_(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?qu(e,t,n):qu(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function L_(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 E_={value:()=>{}};function Sd(){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 k_(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=Sd.prototype={constructor:Wo,on:function(t,e){var n=this._,r=k_(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]=Ad(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Ad(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 C_(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Ad(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=E_,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Xu="http://www.w3.org/1999/xhtml";const Md={svg:"http://www.w3.org/2000/svg",xhtml:Xu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ho(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Md.hasOwnProperty(e)?{space:Md[e],local:t}:t}function R_(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Xu&&e.documentElement.namespaceURI===Xu?e.createElement(t):e.createElementNS(n,t)}}function I_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Td(t){var e=Ho(t);return(e.local?I_:R_)(e)}function N_(){}function ju(t){return t==null?N_:function(){return this.querySelector(t)}}function F_(t){typeof t!="function"&&(t=ju(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,c,l=0;l<a;++l)(u=o[l])&&(c=t.call(u,u.__data__,l,o))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new ve(r,this._parents)}function G_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function z_(){return[]}function Pd(t){return t==null?z_:function(){return this.querySelectorAll(t)}}function O_(t){return function(){return G_(t.apply(this,arguments))}}function U_(t){typeof t=="function"?t=O_(t):t=Pd(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),i.push(u));return new ve(r,i)}function Dd(t){return function(){return this.matches(t)}}function Ld(t){return function(e){return e.matches(t)}}var B_=Array.prototype.find;function Y_(t){return function(){return B_.call(this.children,t)}}function W_(){return this.firstElementChild}function H_(t){return this.select(t==null?W_:Y_(typeof t=="function"?t:Ld(t)))}var q_=Array.prototype.filter;function X_(){return Array.from(this.children)}function j_(t){return function(){return q_.call(this.children,t)}}function V_(t){return this.selectAll(t==null?X_:j_(typeof t=="function"?t:Ld(t)))}function Z_(t){typeof t!="function"&&(t=Dd(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new ve(r,this._parents)}function Ed(t){return new Array(t.length)}function K_(){return new ve(this._enter||this._groups.map(Ed),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 Q_(t){return function(){return t}}function J_(t,e,n,r,i,o){for(var a=0,s,u=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new qo(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function tw(t,e,n,r,i,o,a){var s,u,c=new Map,l=e.length,h=o.length,f=new Array(l),d;for(s=0;s<l;++s)(u=e[s])&&(f[s]=d=a.call(u,u.__data__,s,e)+"",c.has(d)?i[s]=u:c.set(d,u));for(s=0;s<h;++s)d=a.call(t,o[s],s,o)+"",(u=c.get(d))?(r[s]=u,u.__data__=o[s],c.delete(d)):n[s]=new qo(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function ew(t){return t.__data__}function nw(t,e){if(!arguments.length)return Array.from(this,ew);var n=e?tw:J_,r=this._parents,i=this._groups;typeof t!="function"&&(t=Q_(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,d=rw(t.call(l,l&&l.__data__,c,r)),p=d.length,g=s[c]=new Array(p),m=a[c]=new Array(p),y=u[c]=new Array(f);n(l,h,g,m,y,d,e);for(var x=0,v=0,b,$;x<p;++x)if(b=g[x]){for(x>=v&&(v=x+1);!($=m[v])&&++v<p;);b._next=$||null}}return a=new ve(a,r),a._enter=s,a._exit=u,a}function rw(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function iw(){return new ve(this._exit||this._groups.map(Ed),this._parents)}function ow(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 aw(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c=n[u],l=r[u],h=c.length,f=s[u]=new Array(h),d,p=0;p<h;++p)(d=c[p]||l[p])&&(f[p]=d);for(;u<i;++u)s[u]=n[u];return new ve(s,this._parents)}function sw(){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 uw(t){t||(t=cw);function e(h,f){return h&&f?t(h.__data__,f.__data__):!h-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),c,l=0;l<s;++l)(c=a[l])&&(u[l]=c);u.sort(e)}return new ve(i,this._parents).order()}function cw(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function lw(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function fw(){return Array.from(this)}function hw(){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 dw(){let t=0;for(const e of this)++t;return t}function pw(){return!this.node()}function gw(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 mw(t){return function(){this.removeAttribute(t)}}function yw(t){return function(){this.removeAttributeNS(t.space,t.local)}}function bw(t,e){return function(){this.setAttribute(t,e)}}function vw(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function xw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function _w(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 ww(t,e){var n=Ho(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?yw:mw:typeof e=="function"?n.local?_w:xw:n.local?vw:bw)(n,e))}function kd(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function $w(t){return function(){this.style.removeProperty(t)}}function Sw(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Aw(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Mw(t,e,n){return arguments.length>1?this.each((e==null?$w:typeof e=="function"?Aw:Sw)(t,e,n??"")):dr(this.node(),t)}function dr(t,e){return t.style.getPropertyValue(e)||kd(t).getComputedStyle(t,null).getPropertyValue(e)}function Tw(t){return function(){delete this[t]}}function Pw(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 Lw(t,e){return arguments.length>1?this.each((e==null?Tw:typeof e=="function"?Dw:Pw)(t,e)):this.node()[t]}function Cd(t){return t.trim().split(/^|\s+/)}function Vu(t){return t.classList||new Rd(t)}function Rd(t){this._node=t,this._names=Cd(t.getAttribute("class")||"")}Rd.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 Id(t,e){for(var n=Vu(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Nd(t,e){for(var n=Vu(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Ew(t){return function(){Id(this,t)}}function kw(t){return function(){Nd(this,t)}}function Cw(t,e){return function(){(e.apply(this,arguments)?Id:Nd)(this,t)}}function Rw(t,e){var n=Cd(t+"");if(arguments.length<2){for(var r=Vu(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Cw:e?Ew:kw)(n,e))}function Iw(){this.textContent=""}function Nw(t){return function(){this.textContent=t}}function Fw(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Gw(t){return arguments.length?this.each(t==null?Iw:(typeof t=="function"?Fw:Nw)(t)):this.node().textContent}function zw(){this.innerHTML=""}function Ow(t){return function(){this.innerHTML=t}}function Uw(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Bw(t){return arguments.length?this.each(t==null?zw:(typeof t=="function"?Uw:Ow)(t)):this.node().innerHTML}function Yw(){this.nextSibling&&this.parentNode.appendChild(this)}function Ww(){return this.each(Yw)}function Hw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function qw(){return this.each(Hw)}function Xw(t){var e=typeof t=="function"?t:Td(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function jw(){return null}function Vw(t,e){var n=typeof t=="function"?t:Td(t),r=e==null?jw:typeof e=="function"?e:ju(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Zw(){var t=this.parentNode;t&&t.removeChild(this)}function Kw(){return this.each(Zw)}function Qw(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Jw(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function t$(t){return this.select(t?Jw:Qw)}function e$(t){return arguments.length?this.property("__data__",t):this.node().__data__}function n$(t){return function(e){t.call(this,e,this.__data__)}}function r$(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 i$(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 o$(t,e,n){return function(){var r=this.__on,i,o=n$(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 a$(t,e,n){var r=r$(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,l;u<c;++u)for(i=0,l=s[u];i<o;++i)if((a=r[i]).type===l.type&&a.name===l.name)return l.value}return}for(s=e?o$:i$,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Fd(t,e,n){var r=kd(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 s$(t,e){return function(){return Fd(this,t,e)}}function u$(t,e){return function(){return Fd(this,t,e.apply(this,arguments))}}function c$(t,e){return this.each((typeof e=="function"?u$:s$)(t,e))}function*l$(){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 f$=[null];function ve(t,e){this._groups=t,this._parents=e}function fi(){return new ve([[document.documentElement]],f$)}function h$(){return this}ve.prototype=fi.prototype={constructor:ve,select:F_,selectAll:U_,selectChild:H_,selectChildren:V_,filter:Z_,data:nw,enter:K_,exit:iw,join:ow,merge:aw,selection:h$,order:sw,sort:uw,call:lw,nodes:fw,node:hw,size:dw,empty:pw,each:gw,attr:ww,style:Mw,property:Lw,classed:Rw,text:Gw,html:Bw,raise:Ww,lower:qw,append:Xw,insert:Vw,remove:Kw,clone:t$,datum:e$,on:a$,dispatch:c$,[Symbol.iterator]:l$};function Zu(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Gd(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function hi(){}var di=.7,Xo=1/di,pr="\\s*([+-]?\\d+)\\s*",pi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Le="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",d$=/^#([0-9a-f]{3,8})$/,p$=new RegExp(`^rgb\\(${pr},${pr},${pr}\\)$`),g$=new RegExp(`^rgb\\(${Le},${Le},${Le}\\)$`),m$=new RegExp(`^rgba\\(${pr},${pr},${pr},${pi}\\)$`),y$=new RegExp(`^rgba\\(${Le},${Le},${Le},${pi}\\)$`),b$=new RegExp(`^hsl\\(${pi},${Le},${Le}\\)$`),v$=new RegExp(`^hsla\\(${pi},${Le},${Le},${pi}\\)$`),zd={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Zu(hi,An,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Od,formatHex:Od,formatHex8:x$,formatHsl:_$,formatRgb:Ud,toString:Ud});function Od(){return this.rgb().formatHex()}function x$(){return this.rgb().formatHex8()}function _$(){return qd(this).formatHsl()}function Ud(){return this.rgb().formatRgb()}function An(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=d$.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Bd(e):n===3?new ee(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?jo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?jo(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=p$.exec(t))?new ee(e[1],e[2],e[3],1):(e=g$.exec(t))?new ee(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=m$.exec(t))?jo(e[1],e[2],e[3],e[4]):(e=y$.exec(t))?jo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=b$.exec(t))?Hd(e[1],e[2]/100,e[3]/100,1):(e=v$.exec(t))?Hd(e[1],e[2]/100,e[3]/100,e[4]):zd.hasOwnProperty(t)?Bd(zd[t]):t==="transparent"?new ee(NaN,NaN,NaN,0):null}function Bd(t){return new ee(t>>16&255,t>>8&255,t&255,1)}function jo(t,e,n,r){return r<=0&&(t=e=n=NaN),new ee(t,e,n,r)}function w$(t){return t instanceof hi||(t=An(t)),t?(t=t.rgb(),new ee(t.r,t.g,t.b,t.opacity)):new ee}function Ku(t,e,n,r){return arguments.length===1?w$(t):new ee(t,e,n,r??1)}function ee(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Zu(ee,Ku,Gd(hi,{brighter(t){return t=t==null?Xo:Math.pow(Xo,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?di:Math.pow(di,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ee(Mn(this.r),Mn(this.g),Mn(this.b),Vo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yd,formatHex:Yd,formatHex8:$$,formatRgb:Wd,toString:Wd}));function Yd(){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 Wd(){const t=Vo(this.opacity);return`${t===1?"rgb(":"rgba("}${Mn(this.r)}, ${Mn(this.g)}, ${Mn(this.b)}${t===1?")":`, ${t})`}`}function Vo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Mn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Tn(t){return t=Mn(t),(t<16?"0":"")+t.toString(16)}function Hd(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new xe(t,e,n,r)}function qd(t){if(t instanceof xe)return new xe(t.h,t.s,t.l,t.opacity);if(t instanceof hi||(t=An(t)),!t)return new xe;if(t instanceof xe)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new xe(a,s,u,t.opacity)}function S$(t,e,n,r){return arguments.length===1?qd(t):new xe(t,e,n,r??1)}function xe(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Zu(xe,S$,Gd(hi,{brighter(t){return t=t==null?Xo:Math.pow(Xo,t),new xe(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?di:Math.pow(di,t),new xe(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ee(Qu(t>=240?t-240:t+120,i,r),Qu(t,i,r),Qu(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new xe(Xd(this.h),Zo(this.s),Zo(this.l),Vo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Vo(this.opacity);return`${t===1?"hsl(":"hsla("}${Xd(this.h)}, ${Zo(this.s)*100}%, ${Zo(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Xd(t){return t=(t||0)%360,t<0?t+360:t}function Zo(t){return Math.max(0,Math.min(1,t||0))}function Qu(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Ju=t=>()=>t;function A$(t,e){return function(n){return t+n*e}}function M$(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 T$(t){return(t=+t)==1?jd:function(e,n){return n-e?M$(e,n,t):Ju(isNaN(e)?n:e)}}function jd(t,e){var n=e-t;return n?A$(t,n):Ju(isNaN(t)?e:t)}const Ko=function t(e){var n=T$(e);function r(i,o){var a=n((i=Ku(i)).r,(o=Ku(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=jd(i.opacity,o.opacity);return function(l){return i.r=a(l),i.g=s(l),i.b=u(l),i.opacity=c(l),i+""}}return r.gamma=t,r}(1);function P$(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 L$(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=nc(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function E$(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 k$(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=nc(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var tc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ec=new RegExp(tc.source,"g");function C$(t){return function(){return t}}function R$(t){return function(e){return t(e)+""}}function Vd(t,e){var n=tc.lastIndex=ec.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=tc.exec(t))&&(i=ec.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:_e(r,i)})),n=ec.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?R$(u[0].x):C$(e):(e=u.length,function(c){for(var l=0,h;l<e;++l)s[(h=u[l]).i]=h.x(c);return s.join("")})}function nc(t,e){var n=typeof e,r;return e==null||n==="boolean"?Ju(e):(n==="number"?_e:n==="string"?(r=An(e))?(e=r,Ko):Vd:e instanceof An?Ko:e instanceof Date?E$:D$(e)?P$:Array.isArray(e)?L$:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?k$:_e)(t,e)}function I$(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Zd=180/Math.PI,Kd={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Qd(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)*Zd,skewX:Math.atan(u)*Zd,scaleX:a,scaleY:s}}var Qo;function N$(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Kd:Qd(e.a,e.b,e.c,e.d,e.e,e.f)}function F$(t){return t==null||(Qo||(Qo=document.createElementNS("http://www.w3.org/2000/svg","g")),Qo.setAttribute("transform",t),!(t=Qo.transform.baseVal.consolidate()))?Kd:(t=t.matrix,Qd(t.a,t.b,t.c,t.d,t.e,t.f))}function Jd(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push("translate(",null,e,null,n);p.push({i:g-4,x:_e(c,h)},{i:g-2,x:_e(l,f)})}else(h||f)&&d.push("translate("+h+e+f+n)}function a(c,l,h,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:_e(c,l)})):l&&h.push(i(h)+"rotate("+l+r)}function s(c,l,h,f){c!==l?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:_e(c,l)}):l&&h.push(i(h)+"skewX("+l+r)}function u(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push(i(d)+"scale(",null,",",null,")");p.push({i:g-4,x:_e(c,h)},{i:g-2,x:_e(l,f)})}else(h!==1||f!==1)&&d.push(i(d)+"scale("+h+","+f+")")}return function(c,l){var h=[],f=[];return c=t(c),l=t(l),o(c.translateX,c.translateY,l.translateX,l.translateY,h,f),a(c.rotate,l.rotate,h,f),s(c.skewX,l.skewX,h,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,h,f),c=l=null,function(d){for(var p=-1,g=f.length,m;++p<g;)h[(m=f[p]).i]=m.x(d);return h.join("")}}}var G$=Jd(N$,"px, ","px)","deg)"),z$=Jd(F$,", ",")",")"),gr=0,gi=0,mi=0,t0=1e3,Jo,yi,ta=0,Pn=0,ea=0,bi=typeof performance=="object"&&performance.now?performance:Date,e0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function rc(){return Pn||(e0(O$),Pn=bi.now()+ea)}function O$(){Pn=0}function na(){this._call=this._time=this._next=null}na.prototype=n0.prototype={constructor:na,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?rc():+n)+(e==null?0:+e),!this._next&&yi!==this&&(yi?yi._next=this:Jo=this,yi=this),this._call=t,this._time=n,ic()},stop:function(){this._call&&(this._call=null,this._time=1/0,ic())}};function n0(t,e,n){var r=new na;return r.restart(t,e,n),r}function U$(){rc(),++gr;for(var t=Jo,e;t;)(e=Pn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--gr}function r0(){Pn=(ta=bi.now())+ea,gr=gi=0;try{U$()}finally{gr=0,Y$(),Pn=0}}function B$(){var t=bi.now(),e=t-ta;e>t0&&(ea-=e,ta=t)}function Y$(){for(var t,e=Jo,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Jo=n);yi=t,ic(r)}function ic(t){if(!gr){gi&&(gi=clearTimeout(gi));var e=t-Pn;e>24?(t<1/0&&(gi=setTimeout(r0,t-bi.now()-ea)),mi&&(mi=clearInterval(mi))):(mi||(ta=bi.now(),mi=setInterval(B$,t0)),gr=1,e0(r0))}}function i0(t,e,n){var r=new na;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var W$=Sd("start","end","cancel","interrupt"),H$=[],o0=0,a0=1,oc=2,ra=3,s0=4,ac=5,ia=6;function oa(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;q$(t,n,{name:e,index:r,group:i,on:W$,tween:H$,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:o0})}function sc(t,e){var n=we(t,e);if(n.state>o0)throw new Error("too late; already scheduled");return n}function Ee(t,e){var n=we(t,e);if(n.state>ra)throw new Error("too late; already running");return n}function we(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function q$(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=n0(o,0,n.time);function o(c){n.state=a0,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,h,f,d;if(n.state!==a0)return u();for(l in r)if(d=r[l],d.name===n.name){if(d.state===ra)return i0(a);d.state===s0?(d.state=ia,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=ia,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(i0(function(){n.state===ra&&(n.state=s0,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=oc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===oc){for(n.state=ra,i=new Array(f=n.tween.length),l=0,h=-1;l<f;++l)(d=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=d);i.length=h+1}}function s(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=ac,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===ac&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=ia,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function X$(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>oc&&r.state<ac,r.state=ia,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function j$(t){return this.each(function(){X$(this,t)})}function V$(t,e){var n,r;return function(){var i=Ee(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function Z$(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ee(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function K$(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=we(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?V$:Z$)(n,t,e))}function uc(t,e,n){var r=t._id;return t.each(function(){var i=Ee(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return we(i,r).value[e]}}function u0(t,e){var n;return(typeof e=="number"?_e:e instanceof An?Ko:(n=An(e))?(e=n,Ko):Vd)(t,e)}function Q$(t){return function(){this.removeAttribute(t)}}function J$(t){return function(){this.removeAttributeNS(t.space,t.local)}}function tS(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 eS(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 nS(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 rS(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 iS(t,e){var n=Ho(t),r=n==="transform"?z$:u0;return this.attrTween(t,typeof e=="function"?(n.local?rS:nS)(n,r,uc(this,"attr."+t,e)):e==null?(n.local?J$:Q$)(n):(n.local?eS:tS)(n,r,e))}function oS(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function aS(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function sS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&aS(t,o)),n}return i._value=e,i}function uS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&oS(t,o)),n}return i._value=e,i}function cS(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Ho(t);return this.tween(n,(r.local?sS:uS)(r,e))}function lS(t,e){return function(){sc(this,t).delay=+e.apply(this,arguments)}}function fS(t,e){return e=+e,function(){sc(this,t).delay=e}}function hS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?lS:fS)(e,t)):we(this.node(),e).delay}function dS(t,e){return function(){Ee(this,t).duration=+e.apply(this,arguments)}}function pS(t,e){return e=+e,function(){Ee(this,t).duration=e}}function gS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?dS:pS)(e,t)):we(this.node(),e).duration}function mS(t,e){if(typeof e!="function")throw new Error;return function(){Ee(this,t).ease=e}}function yS(t){var e=this._id;return arguments.length?this.each(mS(e,t)):we(this.node(),e).ease}function bS(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ee(this,t).ease=n}}function vS(t){if(typeof t!="function")throw new Error;return this.each(bS(this._id,t))}function xS(t){typeof t!="function"&&(t=Dd(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new We(r,this._parents,this._name,this._id)}function _S(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=e[s],c=n[s],l=u.length,h=a[s]=new Array(l),f,d=0;d<l;++d)(f=u[d]||c[d])&&(h[d]=f);for(;s<r;++s)a[s]=e[s];return new We(a,this._parents,this._name,this._id)}function wS(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=wS(e)?sc:Ee;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function SS(t,e){var n=this._id;return arguments.length<2?we(this.node(),n).on.on(t):this.each($S(n,t,e))}function AS(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function MS(){return this.on("end.remove",AS(this._id))}function TS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=ju(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,c=o[a]=new Array(u),l,h,f=0;f<u;++f)(l=s[f])&&(h=t.call(l,l.__data__,f,s))&&("__data__"in l&&(h.__data__=l.__data__),c[f]=h,oa(c[f],e,n,f,c,we(l,n)));return new We(o,this._parents,e,n)}function PS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Pd(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],c=u.length,l,h=0;h<c;++h)if(l=u[h]){for(var f=t.call(l,l.__data__,h,u),d,p=we(l,n),g=0,m=f.length;g<m;++g)(d=f[g])&&oa(d,e,n,g,f,p);o.push(f),a.push(l)}return new We(o,a,e,n)}var DS=fi.prototype.constructor;function LS(){return new DS(this._groups,this._parents)}function ES(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 c0(t){return function(){this.style.removeProperty(t)}}function kS(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 RS(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Ee(this,t),c=u.on,l=u.value[o]==null?s||(s=c0(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function IS(t,e,n){var r=(t+="")=="transform"?G$:u0;return e==null?this.styleTween(t,ES(t,r)).on("end.style."+t,c0(t)):typeof e=="function"?this.styleTween(t,CS(t,r,uc(this,"style."+t,e))).each(RS(this._id,t)):this.styleTween(t,kS(t,r,e),n).on("end.style."+t,null)}function NS(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function FS(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&NS(t,a,n)),r}return o._value=e,o}function GS(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,FS(t,e,n??""))}function zS(t){return function(){this.textContent=t}}function OS(t){return function(){var e=t(this);this.textContent=e??""}}function US(t){return this.tween("text",typeof t=="function"?OS(uc(this,"text",t)):zS(t==null?"":t+""))}function BS(t){return function(e){this.textContent=t.call(this,e)}}function YS(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&BS(i)),e}return r._value=t,r}function WS(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,YS(t))}function HS(){for(var t=this._name,e=this._id,n=l0(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var l=we(u,e);oa(u,t,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new We(r,this._parents,t,n)}function qS(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var c=Ee(this,r),l=c.on;l!==t&&(e=(t=l).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),c.on=e}),i===0&&o()})}var XS=0;function We(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function l0(){return++XS}var He=fi.prototype;We.prototype={constructor:We,select:TS,selectAll:PS,selectChild:He.selectChild,selectChildren:He.selectChildren,filter:xS,merge:_S,selection:LS,transition:HS,call:He.call,nodes:He.nodes,node:He.node,size:He.size,empty:He.empty,each:He.each,on:SS,attr:iS,attrTween:cS,style:IS,styleTween:GS,text:US,textTween:WS,remove:MS,tween:K$,delay:hS,duration:gS,ease:yS,easeVarying:vS,end:qS,[Symbol.iterator]:He[Symbol.iterator]};function jS(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var VS={time:null,delay:0,duration:250,ease:jS};function ZS(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 KS(t){var e,n;t instanceof We?(e=t._id,t=t._name):(e=l0(),(n=VS).time=rc(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&oa(u,t,e,c,a,n||ZS(u,e));return new We(r,this._parents,t,e)}fi.prototype.interrupt=j$,fi.prototype.transition=KS;function QS(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function aa(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function mr(t){return t=aa(Math.abs(t)),t?t[1]:NaN}function JS(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 t3(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var e3=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function sa(t){if(!(e=e3.exec(t)))throw new Error("invalid format: "+t);var e;return new cc({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}sa.prototype=cc.prototype;function cc(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}cc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function n3(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 f0;function r3(t,e){var n=aa(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(f0=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+aa(t,Math.max(0,e+o-1))[0]}function h0(t,e){var n=aa(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const d0={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:QS,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)=>h0(t*100,e),r:h0,s:r3,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function p0(t){return t}var g0=Array.prototype.map,m0=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function i3(t){var e=t.grouping===void 0||t.thousands===void 0?p0:JS(g0.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?p0:t3(g0.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(h){h=sa(h);var f=h.fill,d=h.align,p=h.sign,g=h.symbol,m=h.zero,y=h.width,x=h.comma,v=h.precision,b=h.trim,$=h.type;$==="n"?(x=!0,$="g"):d0[$]||(v===void 0&&(v=12),b=!0,$="g"),(m||f==="0"&&d==="=")&&(m=!0,f="0",d="=");var w=g==="$"?n:g==="#"&&/[boxX]/.test($)?"0"+$.toLowerCase():"",S=g==="$"?r:/[%p]/.test($)?a:"",_=d0[$],P=/[defgprs%]/.test($);v=v===void 0?6:/[gprs]/.test($)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function D(A){var I=w,M=S,T,E,L;if($==="c")M=_(A)+M,A="";else{A=+A;var N=A<0||1/A<0;if(A=isNaN(A)?u:_(Math.abs(A),v),b&&(A=n3(A)),N&&+A==0&&p!=="+"&&(N=!1),I=(N?p==="("?p:s:p==="-"||p==="("?"":p)+I,M=($==="s"?m0[8+f0/3]:"")+M+(N&&p==="("?")":""),P){for(T=-1,E=A.length;++T<E;)if(L=A.charCodeAt(T),48>L||L>57){M=(L===46?i+A.slice(T+1):A.slice(T))+M,A=A.slice(0,T);break}}}x&&!m&&(A=e(A,1/0));var O=I.length+A.length+M.length,k=O<y?new Array(y-O+1).join(f):"";switch(x&&m&&(A=e(k+A,k.length?y-M.length:1/0),k=""),d){case"<":A=I+A+M+k;break;case"=":A=I+k+A+M;break;case"^":A=k.slice(0,O=k.length>>1)+I+A+M+k.slice(O);break;default:A=k+I+A+M;break}return o(A)}return D.toString=function(){return h+""},D}function l(h,f){var d=c((h=sa(h),h.type="f",h)),p=Math.max(-8,Math.min(8,Math.floor(mr(f)/3)))*3,g=Math.pow(10,-p),m=m0[8+p/3];return function(y){return d(g*y)+m}}return{format:c,formatPrefix:l}}var ua,y0,b0;o3({thousands:",",grouping:[3],currency:["$",""]});function o3(t){return ua=i3(t),y0=ua.format,b0=ua.formatPrefix,ua}function a3(t){return Math.max(0,-mr(Math.abs(t)))}function s3(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(mr(e)/3)))*3-mr(Math.abs(t)))}function u3(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,mr(e)-mr(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 v0=Symbol("implicit");function x0(){var t=new wd,e=[],n=[],r=v0;function i(o){let a=t.get(o);if(a===void 0){if(r!==v0)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 wd;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 x0(e,n).unknown(r)},ca.apply(i,arguments),i}function _0(){var t=x0().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,c=0,l=.5;delete t.unknown;function h(){var f=e().length,d=i<r,p=d?i:r,g=d?r:i;o=(g-p)/Math.max(1,f-u+c*2),s&&(o=Math.floor(o)),p+=(g-p-o*(f-u))*l,a=o*(1-u),s&&(p=Math.round(p),a=Math.round(a));var m=L_(f).map(function(y){return p+o*y});return n(d?m.reverse():m)}return t.domain=function(f){return arguments.length?(e(f),h()):e()},t.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(f){return arguments.length?(s=!!f,h()):s},t.padding=function(f){return arguments.length?(u=Math.min(1,c=+f),h()):u},t.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),h()):u},t.paddingOuter=function(f){return arguments.length?(c=+f,h()):c},t.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),h()):l},t.copy=function(){return _0(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},ca.apply(h(),arguments)}function w0(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return w0(e())},t}function c3(){return w0(_0.apply(null,arguments).paddingInner(1))}function l3(t){return function(){return t}}function f3(t){return+t}var $0=[0,1];function yr(t){return t}function lc(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:l3(isNaN(e)?NaN:.5)}function h3(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function d3(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=lc(i,r),o=n(a,o)):(r=lc(r,i),o=n(o,a)),function(s){return o(r(s))}}function p3(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=lc(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=_d(t,s,1,r)-1;return o[u](i[u](s))}}function g3(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function m3(){var t=$0,e=$0,n=nc,r,i,o,a=yr,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==yr&&(a=h3(t[0],t[f-1])),s=f>2?p3:d3,u=c=null,h}function h(f){return f==null||isNaN(f=+f)?o:(u||(u=s(t.map(r),e,n)))(r(a(f)))}return h.invert=function(f){return a(i((c||(c=s(e,t.map(r),_e)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,f3),l()):t.slice()},h.range=function(f){return arguments.length?(e=Array.from(f),l()):e.slice()},h.rangeRound=function(f){return e=Array.from(f),n=I$,l()},h.clamp=function(f){return arguments.length?(a=f?!0:yr,l()):a!==yr},h.interpolate=function(f){return arguments.length?(n=f,l()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,d){return r=f,i=d,l()}}function y3(){return m3()(yr,yr)}function b3(t,e,n,r){var i=D_(t,e,n),o;switch(r=sa(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=s3(i,a))&&(r.precision=o),b0(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=u3(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=a3(i))&&(r.precision=o-(r.type==="%")*2);break}}return y0(r)}function S0(t){var e=t.domain;return t.ticks=function(n){var r=e();return P_(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return b3(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,c,l=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);l-- >0;){if(c=qu(a,s,n),c===u)return r[i]=a,r[o]=s,e(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;u=c}return t},t}function A0(){var t=y3();return t.copy=function(){return g3(t,A0())},ca.apply(t,arguments),S0(t)}function M0(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[_d(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*e-(u-n)*t)/(n+1);return a}return a.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var c=i.indexOf(u);return c<0?[NaN,NaN]:c<1?[t,r[0]]:c>=n?[r[n-1],e]:[r[c-1],r[c]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return M0().domain([t,e]).range(i).unknown(o)},ca.apply(S0(a),arguments)}function vi(t,e,n){this.k=t,this.x=e,this.y=n}vi.prototype={constructor:vi,scale:function(t){return t===1?this:new vi(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new vi(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+")"}},vi.prototype;function la(t){return Object.prototype.toString.call(t)==="[object Object]"}function fc(t,e){if(la(t)===!1||la(e)===!1)return Object.assign({},e);const n=(r,i)=>{const o=Object.assign({},i);for(let a of Object.keys(r)){if(!(a in i))continue;let s;la(r[a])&&la(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}var hc=function(t,e){return hc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},hc(t,e)};function qe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");hc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function v3(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(l){try{c(r.next(l))}catch(h){a(h)}}function u(l){try{c(r.throw(l))}catch(h){a(h)}}function c(l){l.done?o(l.value):i(l.value).then(s,u)}c((r=r.apply(t,[])).next())})}function T0(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function br(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 xi(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function _i(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function vr(t){return this instanceof vr?(this.v=t,this):new vr(t)}function x3(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(d){return function(p){return Promise.resolve(p).then(d,h)}}function s(d,p){r[d]&&(i[d]=function(g){return new Promise(function(m,y){o.push([d,g,m,y])>1||u(d,g)})},p&&(i[d]=p(i[d])))}function u(d,p){try{c(r[d](p))}catch(g){f(o[0][3],g)}}function c(d){d.value instanceof vr?Promise.resolve(d.value.v).then(l,h):f(o[0][2],d)}function l(d){u("next",d)}function h(d){u("throw",d)}function f(d,p){d(p),o.shift(),o.length&&u(o[0][0],o[0][1])}}function _3(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 br=="function"?br(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,u){a=t[o](a),i(s,u,a.done,a.value)})}}function i(o,a,s,u){Promise.resolve(u).then(function(c){o({value:c,done:s})},a)}}function Pt(t){return typeof t=="function"}function dc(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var pc=dc(function(t){return function(e){t(this),this.message=e?e.length+` errors occurred during unsubscription:
3
+ `):"",this.name="UnsubscriptionError",this.errors=n}});function Iu(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Go=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=fr(a),u=s.next();!u.done;u=s.next()){var c=u.value;c.remove(this)}}catch(g){e={error:g}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(mt(l))try{l()}catch(g){o=g instanceof Cu?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=fr(h),d=f.next();!d.done;d=f.next()){var p=d.value;try{Jh(p)}catch(g){o=o??[],g instanceof Cu?o=ui(ui([],hr(o)),hr(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new Cu(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Jh(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&Iu(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Iu(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Kh=Go.EMPTY;function Qh(t){return t instanceof Go||t&&"closed"in t&&mt(t.remove)&&mt(t.add)&&mt(t.unsubscribe)}function Jh(t){mt(t)?t():t.unsubscribe()}var td={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ed={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,ui([t,e],hr(n)))},clearTimeout:function(t){var e=ed.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function nd(t){ed.setTimeout(function(){throw t})}function Ru(){}function zo(t){t()}var Nu=function(t){lr(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Qh(n)&&n.add(r)):r.destination=Tx,r}return e.create=function(n,r,i){return new ci(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Go),Sx=Function.prototype.bind;function Fu(t,e){return Sx.call(t,e)}var Ax=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){Oo(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Oo(r)}else Oo(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Oo(n)}},t}(),ci=function(t){lr(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(mt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&td.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Fu(n.next,s),error:n.error&&Fu(n.error,s),complete:n.complete&&Fu(n.complete,s)}):a=n}return o.destination=new Ax(a),o}return e}(Nu);function Oo(t){nd(t)}function Mx(t){throw t}var Tx={closed:!0,next:Ru,error:Mx,complete:Ru},Gu=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function pr(t){return t}function Px(t){return t.length===0?pr:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var lt=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=Lx(e)?e:new ci(e,n,r);return zo(function(){var a=i,s=a.operator,u=a.source;o.add(s?s.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=rd(n),new n(function(i,o){var a=new ci({next:function(s){try{e(s)}catch(u){o(u),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[Gu]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Px(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=rd(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function rd(t){var e;return(e=t??td.Promise)!==null&&e!==void 0?e:Promise}function Dx(t){return t&&mt(t.next)&&mt(t.error)&&mt(t.complete)}function Lx(t){return t&&t instanceof Nu||Dx(t)&&Qh(t)}function Ex(t){return mt(t==null?void 0:t.lift)}function le(t){return function(e){if(Ex(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function oe(t,e,n,r,i){return new kx(t,e,n,r,i)}var kx=function(t){lr(e,t);function e(n,r,i,o,a,s){var u=t.call(this,n)||this;return u.onFinalize=a,u.shouldUnsubscribe=s,u._next=r?function(c){try{r(c)}catch(l){n.error(l)}}:t.prototype._next,u._error=o?function(c){try{o(c)}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(Nu),Cx=ku(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),rt=function(t){lr(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new id(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new Cx},e.prototype.next=function(n){var r=this;zo(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=fr(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(c){i={error:c}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;zo(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;zo(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?Kh:(this.currentObservers=null,s.push(n),new Go(function(){r.currentObservers=null,Iu(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new lt;return n.source=this,n},e.create=function(n,r){return new id(n,r)},e}(lt),id=function(t){lr(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:Kh},e}(rt),od={now:function(){return(od.delegate||Date).now()},delegate:void 0},Ix=function(t){lr(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=od);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),u=0;u<s.length&&!n.closed;u+=o?1:2)n.next(s[u]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var u=i.now(),c=0,l=1;l<o.length&&o[l]<=u;l+=2)c=l;c&&o.splice(0,c+1)}},e}(rt),ad=new lt(function(t){return t.complete()});function Rx(t){return t&&mt(t.schedule)}function zu(t){return t[t.length-1]}function Nx(t){return mt(zu(t))?t.pop():void 0}function Ou(t){return Rx(zu(t))?t.pop():void 0}function Fx(t,e){return typeof zu(t)=="number"?t.pop():e}var Uu=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function sd(t){return mt(t==null?void 0:t.then)}function ud(t){return mt(t[Gu])}function cd(t){return Symbol.asyncIterator&&mt(t==null?void 0:t[Symbol.asyncIterator])}function ld(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Gx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var fd=Gx();function hd(t){return mt(t==null?void 0:t[fd])}function dd(t){return wx(this,arguments,function(){var n,r,i,o;return Zh(this,function(a){switch(a.label){case 0:n=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,dr(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,dr(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,dr(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function pd(t){return mt(t==null?void 0:t.getReader)}function fe(t){if(t instanceof lt)return t;if(t!=null){if(ud(t))return zx(t);if(Uu(t))return Ox(t);if(sd(t))return Ux(t);if(cd(t))return gd(t);if(hd(t))return Bx(t);if(pd(t))return Yx(t)}throw ld(t)}function zx(t){return new lt(function(e){var n=t[Gu]();if(mt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Ox(t){return new lt(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Ux(t){return new lt(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,nd)})}function Bx(t){return new lt(function(e){var n,r;try{for(var i=fr(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function gd(t){return new lt(function(e){Wx(t,e).catch(function(n){return e.error(n)})})}function Yx(t){return gd(dd(t))}function Wx(t,e){var n,r,i,o;return _x(this,void 0,void 0,function(){var a,s;return Zh(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=$x(t),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function un(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function md(t,e){return e===void 0&&(e=0),le(function(n,r){n.subscribe(oe(r,function(i){return un(r,t,function(){return r.next(i)},e)},function(){return un(r,t,function(){return r.complete()},e)},function(i){return un(r,t,function(){return r.error(i)},e)}))})}function yd(t,e){return e===void 0&&(e=0),le(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Hx(t,e){return fe(t).pipe(yd(e),md(e))}function qx(t,e){return fe(t).pipe(yd(e),md(e))}function Xx(t,e){return new lt(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function jx(t,e){return new lt(function(n){var r;return un(n,e,function(){r=t[fd](),un(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return mt(r==null?void 0:r.return)&&r.return()}})}function bd(t,e){if(!t)throw new Error("Iterable cannot be null");return new lt(function(n){un(n,e,function(){var r=t[Symbol.asyncIterator]();un(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function Vx(t,e){return bd(dd(t),e)}function Zx(t,e){if(t!=null){if(ud(t))return Hx(t,e);if(Uu(t))return Xx(t,e);if(sd(t))return qx(t,e);if(cd(t))return bd(t,e);if(hd(t))return jx(t,e);if(pd(t))return Vx(t,e)}throw ld(t)}function Uo(t,e){return e?Zx(t,e):fe(t)}function li(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ou(t);return Uo(t,n)}var vd=ku(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function U(t,e){return le(function(n,r){var i=0;n.subscribe(oe(r,function(o){r.next(t.call(e,o,i++))}))})}var Kx=Array.isArray;function Qx(t,e){return Kx(e)?t.apply(void 0,ui([],hr(e))):t(e)}function xd(t){return U(function(e){return Qx(t,e)})}var Jx=Array.isArray,t_=Object.getPrototypeOf,e_=Object.prototype,n_=Object.keys;function r_(t){if(t.length===1){var e=t[0];if(Jx(e))return{args:e,keys:null};if(i_(e)){var n=n_(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function i_(t){return t&&typeof t=="object"&&t_(t)===e_}function o_(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function H(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ou(t),r=Nx(t),i=r_(t),o=i.args,a=i.keys;if(o.length===0)return Uo([],n);var s=new lt(a_(o,n,a?function(u){return o_(a,u)}:pr));return r?s.pipe(xd(r)):s}function a_(t,e,n){return n===void 0&&(n=pr),function(r){_d(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,u=function(l){_d(e,function(){var h=Uo(t[l],e),f=!1;h.subscribe(oe(r,function(d){o[l]=d,f||(f=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},c=0;c<i;c++)u(c)},r)}}function _d(t,e,n){t?un(n,t,e):e()}function s_(t,e,n,r,i,o,a,s){var u=[],c=0,l=0,h=!1,f=function(){h&&!u.length&&!c&&e.complete()},d=function(g){return c<r?p(g):u.push(g)},p=function(g){c++;var m=!1;fe(n(g,l++)).subscribe(oe(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{c--;for(var y=function(){var v=u.shift();a||p(v)};u.length&&c<r;)y();f()}catch(v){e.error(v)}}))};return t.subscribe(oe(e,d,function(){h=!0,f()})),function(){}}function Bu(t,e,n){return n===void 0&&(n=1/0),mt(e)?Bu(function(r,i){return U(function(o,a){return e(r,o,i,a)})(fe(t(r,i)))},n):(typeof e=="number"&&(n=e),le(function(r,i){return s_(r,i,t,n)}))}function u_(t){return t===void 0&&(t=1/0),Bu(pr,t)}function c_(t){return new lt(function(e){fe(t()).subscribe(e)})}var l_=["addListener","removeListener"],f_=["addEventListener","removeEventListener"],h_=["on","off"];function Yu(t,e,n,r){if(mt(n)&&(r=n,n=void 0),r)return Yu(t,e,n).pipe(xd(r));var i=hr(g_(t)?f_.map(function(s){return function(u){return t[s](e,u,n)}}):d_(t)?l_.map(wd(t,e)):p_(t)?h_.map(wd(t,e)):[],2),o=i[0],a=i[1];if(!o&&Uu(t))return Bu(function(s){return Yu(s,e,n)})(fe(t));if(!o)throw new TypeError("Invalid event target");return new lt(function(s){var u=function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];return s.next(1<c.length?c:c[0])};return o(u),function(){return a(u)}})}function wd(t,e){return function(n){return function(r){return t[n](e,r)}}}function d_(t){return mt(t.addListener)&&mt(t.removeListener)}function p_(t){return mt(t.on)&&mt(t.off)}function g_(t){return mt(t.addEventListener)&&mt(t.removeEventListener)}function $d(t,e,n){return c_(function(){return t()?e:n})}function Wu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ou(t),r=Fx(t,1/0),i=t;return i.length?i.length===1?fe(i[0]):u_(r)(Uo(i,n)):ad}function fi(t,e){return le(function(n,r){var i=0;n.subscribe(oe(r,function(o){return t.call(e,o,i++)&&r.next(o)}))})}function m_(t){return le(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){r||n.next(t),n.complete()}))})}function y_(t){return t<=0?function(){return ad}:le(function(e,n){var r=0;e.subscribe(oe(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function ft(t,e){return e===void 0&&(e=pr),t=t??b_,le(function(n,r){var i,o=!0;n.subscribe(oe(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function b_(t,e){return t===e}function v_(t){return t===void 0&&(t=x_),le(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(t())}))})}function x_(){return new vd}function hi(t,e){var n=arguments.length>=2;return function(r){return r.pipe(pr,y_(1),n?m_(e):v_(function(){return new vd}))}}function __(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new rt}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,u=s===void 0?!0:s;return function(c){var l,h,f,d=0,p=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),l=f=void 0,p=g=!1},v=function(){var x=l;y(),x==null||x.unsubscribe()};return le(function(x,b){d++,!g&&!p&&m();var w=f=f??n();b.add(function(){d--,d===0&&!g&&!p&&(h=Hu(v,u))}),w.subscribe(b),!l&&d>0&&(l=new ci({next:function($){return w.next($)},error:function($){g=!0,m(),h=Hu(y,i,$),w.error($)},complete:function(){p=!0,m(),h=Hu(y,a),w.complete()}}),fe(x).subscribe(l))})(c)}}function Hu(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new ci({next:function(){i.unsubscribe(),t()}});return fe(e.apply(void 0,ui([],hr(n)))).subscribe(i)}}function Ye(t,e,n){var r,i=!1;return r=t,__({connector:function(){return new Ix(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function B(t,e){return le(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(oe(r,function(u){i==null||i.unsubscribe();var c=0,l=o++;fe(t(u,l)).subscribe(i=oe(r,function(h){return r.next(e?e(u,h,l,c++):h)},function(){i=null,s()}))},function(){a=!0,s()}))})}function F(t){return le(function(e,n){fe(t).subscribe(oe(n,function(){return n.complete()},Ru)),!n.closed&&e.subscribe(n)})}const gr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function Bo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function w_(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Sd(t){let e,n,r;t.length!==2?(e=Bo,n=(s,u)=>Bo(t(s),u),r=(s,u)=>t(s)-u):(e=t===Bo||t===w_?t:$_,n=t,r=t);function i(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<0?c=h+1:l=h}while(c<l)}return c}function o(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<=0?c=h+1:l=h}while(c<l)}return c}function a(s,u,c=0,l=s.length){const h=i(s,u,c,l-1);return h>c&&r(s[h-1],u)>-r(s[h],u)?h-1:h}return{left:i,center:a,right:o}}function $_(){return 0}function S_(t){return t===null?NaN:+t}const A_=Sd(Bo),Ad=A_.right;Sd(S_).center;class Md extends Map{constructor(e,n=P_){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(Td(this,e))}has(e){return super.has(Td(this,e))}set(e,n){return super.set(M_(this,e),n)}delete(e){return super.delete(T_(this,e))}}function Td({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function M_({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function T_({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function P_(t){return t!==null&&typeof t=="object"?t.valueOf():t}const D_=Math.sqrt(50),L_=Math.sqrt(10),E_=Math.sqrt(2);function Yo(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=D_?10:o>=L_?5:o>=E_?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),u=Math.round(e*c),s/c<t&&++s,u/c>e&&--u,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),u=Math.round(e/c),s*c<t&&++s,u*c>e&&--u),u<s&&.5<=n&&n<2?Yo(t,e,n*2):[s,u,c]}function k_(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?Yo(e,t,n):Yo(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)u[c]=(o-c)/-a;else for(let c=0;c<s;++c)u[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)u[c]=(i+c)/-a;else for(let c=0;c<s;++c)u[c]=(i+c)*a;return u}function qu(t,e,n){return e=+e,t=+t,n=+n,Yo(t,e,n)[2]}function C_(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?qu(e,t,n):qu(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function I_(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}var R_={value:()=>{}};function Pd(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Wo(n)}function Wo(t){this._=t}function N_(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Wo.prototype=Pd.prototype={constructor:Wo,on:function(t,e){var n=this._,r=N_(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=F_(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=Dd(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Dd(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Wo(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function F_(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Dd(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=R_,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Xu="http://www.w3.org/1999/xhtml";const Ld={svg:"http://www.w3.org/2000/svg",xhtml:Xu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ho(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Ld.hasOwnProperty(e)?{space:Ld[e],local:t}:t}function G_(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Xu&&e.documentElement.namespaceURI===Xu?e.createElement(t):e.createElementNS(n,t)}}function z_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ed(t){var e=Ho(t);return(e.local?z_:G_)(e)}function O_(){}function ju(t){return t==null?O_:function(){return this.querySelector(t)}}function U_(t){typeof t!="function"&&(t=ju(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,c,l=0;l<a;++l)(u=o[l])&&(c=t.call(u,u.__data__,l,o))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new ve(r,this._parents)}function B_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Y_(){return[]}function kd(t){return t==null?Y_:function(){return this.querySelectorAll(t)}}function W_(t){return function(){return B_(t.apply(this,arguments))}}function H_(t){typeof t=="function"?t=W_(t):t=kd(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),i.push(u));return new ve(r,i)}function Cd(t){return function(){return this.matches(t)}}function Id(t){return function(e){return e.matches(t)}}var q_=Array.prototype.find;function X_(t){return function(){return q_.call(this.children,t)}}function j_(){return this.firstElementChild}function V_(t){return this.select(t==null?j_:X_(typeof t=="function"?t:Id(t)))}var Z_=Array.prototype.filter;function K_(){return Array.from(this.children)}function Q_(t){return function(){return Z_.call(this.children,t)}}function J_(t){return this.selectAll(t==null?K_:Q_(typeof t=="function"?t:Id(t)))}function tw(t){typeof t!="function"&&(t=Cd(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new ve(r,this._parents)}function Rd(t){return new Array(t.length)}function ew(){return new ve(this._enter||this._groups.map(Rd),this._parents)}function qo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}qo.prototype={constructor:qo,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function nw(t){return function(){return t}}function rw(t,e,n,r,i,o){for(var a=0,s,u=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new qo(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function iw(t,e,n,r,i,o,a){var s,u,c=new Map,l=e.length,h=o.length,f=new Array(l),d;for(s=0;s<l;++s)(u=e[s])&&(f[s]=d=a.call(u,u.__data__,s,e)+"",c.has(d)?i[s]=u:c.set(d,u));for(s=0;s<h;++s)d=a.call(t,o[s],s,o)+"",(u=c.get(d))?(r[s]=u,u.__data__=o[s],c.delete(d)):n[s]=new qo(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function ow(t){return t.__data__}function aw(t,e){if(!arguments.length)return Array.from(this,ow);var n=e?iw:rw,r=this._parents,i=this._groups;typeof t!="function"&&(t=nw(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,d=sw(t.call(l,l&&l.__data__,c,r)),p=d.length,g=s[c]=new Array(p),m=a[c]=new Array(p),y=u[c]=new Array(f);n(l,h,g,m,y,d,e);for(var v=0,x=0,b,w;v<p;++v)if(b=g[v]){for(v>=x&&(x=v+1);!(w=m[x])&&++x<p;);b._next=w||null}}return a=new ve(a,r),a._enter=s,a._exit=u,a}function sw(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function uw(){return new ve(this._exit||this._groups.map(Rd),this._parents)}function cw(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function lw(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c=n[u],l=r[u],h=c.length,f=s[u]=new Array(h),d,p=0;p<h;++p)(d=c[p]||l[p])&&(f[p]=d);for(;u<i;++u)s[u]=n[u];return new ve(s,this._parents)}function fw(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function hw(t){t||(t=dw);function e(h,f){return h&&f?t(h.__data__,f.__data__):!h-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),c,l=0;l<s;++l)(c=a[l])&&(u[l]=c);u.sort(e)}return new ve(i,this._parents).order()}function dw(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function pw(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function gw(){return Array.from(this)}function mw(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function yw(){let t=0;for(const e of this)++t;return t}function bw(){return!this.node()}function vw(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function xw(t){return function(){this.removeAttribute(t)}}function _w(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ww(t,e){return function(){this.setAttribute(t,e)}}function $w(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Sw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Aw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Mw(t,e){var n=Ho(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?_w:xw:typeof e=="function"?n.local?Aw:Sw:n.local?$w:ww)(n,e))}function Nd(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Tw(t){return function(){this.style.removeProperty(t)}}function Pw(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Dw(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Lw(t,e,n){return arguments.length>1?this.each((e==null?Tw:typeof e=="function"?Dw:Pw)(t,e,n??"")):mr(this.node(),t)}function mr(t,e){return t.style.getPropertyValue(e)||Nd(t).getComputedStyle(t,null).getPropertyValue(e)}function Ew(t){return function(){delete this[t]}}function kw(t,e){return function(){this[t]=e}}function Cw(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Iw(t,e){return arguments.length>1?this.each((e==null?Ew:typeof e=="function"?Cw:kw)(t,e)):this.node()[t]}function Fd(t){return t.trim().split(/^|\s+/)}function Vu(t){return t.classList||new Gd(t)}function Gd(t){this._node=t,this._names=Fd(t.getAttribute("class")||"")}Gd.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function zd(t,e){for(var n=Vu(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Od(t,e){for(var n=Vu(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Rw(t){return function(){zd(this,t)}}function Nw(t){return function(){Od(this,t)}}function Fw(t,e){return function(){(e.apply(this,arguments)?zd:Od)(this,t)}}function Gw(t,e){var n=Fd(t+"");if(arguments.length<2){for(var r=Vu(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Fw:e?Rw:Nw)(n,e))}function zw(){this.textContent=""}function Ow(t){return function(){this.textContent=t}}function Uw(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Bw(t){return arguments.length?this.each(t==null?zw:(typeof t=="function"?Uw:Ow)(t)):this.node().textContent}function Yw(){this.innerHTML=""}function Ww(t){return function(){this.innerHTML=t}}function Hw(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function qw(t){return arguments.length?this.each(t==null?Yw:(typeof t=="function"?Hw:Ww)(t)):this.node().innerHTML}function Xw(){this.nextSibling&&this.parentNode.appendChild(this)}function jw(){return this.each(Xw)}function Vw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Zw(){return this.each(Vw)}function Kw(t){var e=typeof t=="function"?t:Ed(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Qw(){return null}function Jw(t,e){var n=typeof t=="function"?t:Ed(t),r=e==null?Qw:typeof e=="function"?e:ju(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function t$(){var t=this.parentNode;t&&t.removeChild(this)}function e$(){return this.each(t$)}function n$(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function r$(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function i$(t){return this.select(t?r$:n$)}function o$(t){return arguments.length?this.property("__data__",t):this.node().__data__}function a$(t){return function(e){t.call(this,e,this.__data__)}}function s$(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function u$(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function c$(t,e,n){return function(){var r=this.__on,i,o=a$(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function l$(t,e,n){var r=s$(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,l;u<c;++u)for(i=0,l=s[u];i<o;++i)if((a=r[i]).type===l.type&&a.name===l.name)return l.value}return}for(s=e?c$:u$,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Ud(t,e,n){var r=Nd(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function f$(t,e){return function(){return Ud(this,t,e)}}function h$(t,e){return function(){return Ud(this,t,e.apply(this,arguments))}}function d$(t,e){return this.each((typeof e=="function"?h$:f$)(t,e))}function*p$(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var g$=[null];function ve(t,e){this._groups=t,this._parents=e}function di(){return new ve([[document.documentElement]],g$)}function m$(){return this}ve.prototype=di.prototype={constructor:ve,select:U_,selectAll:H_,selectChild:V_,selectChildren:J_,filter:tw,data:aw,enter:ew,exit:uw,join:cw,merge:lw,selection:m$,order:fw,sort:hw,call:pw,nodes:gw,node:mw,size:yw,empty:bw,each:vw,attr:Mw,style:Lw,property:Iw,classed:Gw,text:Bw,html:qw,raise:jw,lower:Zw,append:Kw,insert:Jw,remove:e$,clone:i$,datum:o$,on:l$,dispatch:d$,[Symbol.iterator]:p$};function Zu(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Bd(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function pi(){}var gi=.7,Xo=1/gi,yr="\\s*([+-]?\\d+)\\s*",mi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Le="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",y$=/^#([0-9a-f]{3,8})$/,b$=new RegExp(`^rgb\\(${yr},${yr},${yr}\\)$`),v$=new RegExp(`^rgb\\(${Le},${Le},${Le}\\)$`),x$=new RegExp(`^rgba\\(${yr},${yr},${yr},${mi}\\)$`),_$=new RegExp(`^rgba\\(${Le},${Le},${Le},${mi}\\)$`),w$=new RegExp(`^hsl\\(${mi},${Le},${Le}\\)$`),$$=new RegExp(`^hsla\\(${mi},${Le},${Le},${mi}\\)$`),Yd={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Zu(pi,Mn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Wd,formatHex:Wd,formatHex8:S$,formatHsl:A$,formatRgb:Hd,toString:Hd});function Wd(){return this.rgb().formatHex()}function S$(){return this.rgb().formatHex8()}function A$(){return Zd(this).formatHsl()}function Hd(){return this.rgb().formatRgb()}function Mn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=y$.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?qd(e):n===3?new ee(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?jo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?jo(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=b$.exec(t))?new ee(e[1],e[2],e[3],1):(e=v$.exec(t))?new ee(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=x$.exec(t))?jo(e[1],e[2],e[3],e[4]):(e=_$.exec(t))?jo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=w$.exec(t))?Vd(e[1],e[2]/100,e[3]/100,1):(e=$$.exec(t))?Vd(e[1],e[2]/100,e[3]/100,e[4]):Yd.hasOwnProperty(t)?qd(Yd[t]):t==="transparent"?new ee(NaN,NaN,NaN,0):null}function qd(t){return new ee(t>>16&255,t>>8&255,t&255,1)}function jo(t,e,n,r){return r<=0&&(t=e=n=NaN),new ee(t,e,n,r)}function M$(t){return t instanceof pi||(t=Mn(t)),t?(t=t.rgb(),new ee(t.r,t.g,t.b,t.opacity)):new ee}function Ku(t,e,n,r){return arguments.length===1?M$(t):new ee(t,e,n,r??1)}function ee(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Zu(ee,Ku,Bd(pi,{brighter(t){return t=t==null?Xo:Math.pow(Xo,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?gi:Math.pow(gi,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ee(Tn(this.r),Tn(this.g),Tn(this.b),Vo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Xd,formatHex:Xd,formatHex8:T$,formatRgb:jd,toString:jd}));function Xd(){return`#${Pn(this.r)}${Pn(this.g)}${Pn(this.b)}`}function T$(){return`#${Pn(this.r)}${Pn(this.g)}${Pn(this.b)}${Pn((isNaN(this.opacity)?1:this.opacity)*255)}`}function jd(){const t=Vo(this.opacity);return`${t===1?"rgb(":"rgba("}${Tn(this.r)}, ${Tn(this.g)}, ${Tn(this.b)}${t===1?")":`, ${t})`}`}function Vo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Tn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Pn(t){return t=Tn(t),(t<16?"0":"")+t.toString(16)}function Vd(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new xe(t,e,n,r)}function Zd(t){if(t instanceof xe)return new xe(t.h,t.s,t.l,t.opacity);if(t instanceof pi||(t=Mn(t)),!t)return new xe;if(t instanceof xe)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new xe(a,s,u,t.opacity)}function P$(t,e,n,r){return arguments.length===1?Zd(t):new xe(t,e,n,r??1)}function xe(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Zu(xe,P$,Bd(pi,{brighter(t){return t=t==null?Xo:Math.pow(Xo,t),new xe(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?gi:Math.pow(gi,t),new xe(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ee(Qu(t>=240?t-240:t+120,i,r),Qu(t,i,r),Qu(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new xe(Kd(this.h),Zo(this.s),Zo(this.l),Vo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Vo(this.opacity);return`${t===1?"hsl(":"hsla("}${Kd(this.h)}, ${Zo(this.s)*100}%, ${Zo(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Kd(t){return t=(t||0)%360,t<0?t+360:t}function Zo(t){return Math.max(0,Math.min(1,t||0))}function Qu(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Ju=t=>()=>t;function D$(t,e){return function(n){return t+n*e}}function L$(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function E$(t){return(t=+t)==1?Qd:function(e,n){return n-e?L$(e,n,t):Ju(isNaN(e)?n:e)}}function Qd(t,e){var n=e-t;return n?D$(t,n):Ju(isNaN(t)?e:t)}const Ko=function t(e){var n=E$(e);function r(i,o){var a=n((i=Ku(i)).r,(o=Ku(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=Qd(i.opacity,o.opacity);return function(l){return i.r=a(l),i.g=s(l),i.b=u(l),i.opacity=c(l),i+""}}return r.gamma=t,r}(1);function k$(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function C$(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function I$(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=nc(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function R$(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function _e(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function N$(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=nc(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var tc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ec=new RegExp(tc.source,"g");function F$(t){return function(){return t}}function G$(t){return function(e){return t(e)+""}}function Jd(t,e){var n=tc.lastIndex=ec.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=tc.exec(t))&&(i=ec.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:_e(r,i)})),n=ec.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?G$(u[0].x):F$(e):(e=u.length,function(c){for(var l=0,h;l<e;++l)s[(h=u[l]).i]=h.x(c);return s.join("")})}function nc(t,e){var n=typeof e,r;return e==null||n==="boolean"?Ju(e):(n==="number"?_e:n==="string"?(r=Mn(e))?(e=r,Ko):Jd:e instanceof Mn?Ko:e instanceof Date?R$:C$(e)?k$:Array.isArray(e)?I$:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?N$:_e)(t,e)}function z$(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var tp=180/Math.PI,ep={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function np(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*tp,skewX:Math.atan(u)*tp,scaleX:a,scaleY:s}}var Qo;function O$(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?ep:np(e.a,e.b,e.c,e.d,e.e,e.f)}function U$(t){return t==null||(Qo||(Qo=document.createElementNS("http://www.w3.org/2000/svg","g")),Qo.setAttribute("transform",t),!(t=Qo.transform.baseVal.consolidate()))?ep:(t=t.matrix,np(t.a,t.b,t.c,t.d,t.e,t.f))}function rp(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push("translate(",null,e,null,n);p.push({i:g-4,x:_e(c,h)},{i:g-2,x:_e(l,f)})}else(h||f)&&d.push("translate("+h+e+f+n)}function a(c,l,h,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:_e(c,l)})):l&&h.push(i(h)+"rotate("+l+r)}function s(c,l,h,f){c!==l?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:_e(c,l)}):l&&h.push(i(h)+"skewX("+l+r)}function u(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push(i(d)+"scale(",null,",",null,")");p.push({i:g-4,x:_e(c,h)},{i:g-2,x:_e(l,f)})}else(h!==1||f!==1)&&d.push(i(d)+"scale("+h+","+f+")")}return function(c,l){var h=[],f=[];return c=t(c),l=t(l),o(c.translateX,c.translateY,l.translateX,l.translateY,h,f),a(c.rotate,l.rotate,h,f),s(c.skewX,l.skewX,h,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,h,f),c=l=null,function(d){for(var p=-1,g=f.length,m;++p<g;)h[(m=f[p]).i]=m.x(d);return h.join("")}}}var B$=rp(O$,"px, ","px)","deg)"),Y$=rp(U$,", ",")",")"),br=0,yi=0,bi=0,ip=1e3,Jo,vi,ta=0,Dn=0,ea=0,xi=typeof performance=="object"&&performance.now?performance:Date,op=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function rc(){return Dn||(op(W$),Dn=xi.now()+ea)}function W$(){Dn=0}function na(){this._call=this._time=this._next=null}na.prototype=ap.prototype={constructor:na,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?rc():+n)+(e==null?0:+e),!this._next&&vi!==this&&(vi?vi._next=this:Jo=this,vi=this),this._call=t,this._time=n,ic()},stop:function(){this._call&&(this._call=null,this._time=1/0,ic())}};function ap(t,e,n){var r=new na;return r.restart(t,e,n),r}function H$(){rc(),++br;for(var t=Jo,e;t;)(e=Dn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--br}function sp(){Dn=(ta=xi.now())+ea,br=yi=0;try{H$()}finally{br=0,X$(),Dn=0}}function q$(){var t=xi.now(),e=t-ta;e>ip&&(ea-=e,ta=t)}function X$(){for(var t,e=Jo,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Jo=n);vi=t,ic(r)}function ic(t){if(!br){yi&&(yi=clearTimeout(yi));var e=t-Dn;e>24?(t<1/0&&(yi=setTimeout(sp,t-xi.now()-ea)),bi&&(bi=clearInterval(bi))):(bi||(ta=xi.now(),bi=setInterval(q$,ip)),br=1,op(sp))}}function up(t,e,n){var r=new na;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var j$=Pd("start","end","cancel","interrupt"),V$=[],cp=0,lp=1,oc=2,ra=3,fp=4,ac=5,ia=6;function oa(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;Z$(t,n,{name:e,index:r,group:i,on:j$,tween:V$,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:cp})}function sc(t,e){var n=we(t,e);if(n.state>cp)throw new Error("too late; already scheduled");return n}function Ee(t,e){var n=we(t,e);if(n.state>ra)throw new Error("too late; already running");return n}function we(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Z$(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=ap(o,0,n.time);function o(c){n.state=lp,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,h,f,d;if(n.state!==lp)return u();for(l in r)if(d=r[l],d.name===n.name){if(d.state===ra)return up(a);d.state===fp?(d.state=ia,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=ia,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(up(function(){n.state===ra&&(n.state=fp,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=oc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===oc){for(n.state=ra,i=new Array(f=n.tween.length),l=0,h=-1;l<f;++l)(d=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=d);i.length=h+1}}function s(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=ac,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===ac&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=ia,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function K$(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>oc&&r.state<ac,r.state=ia,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function Q$(t){return this.each(function(){K$(this,t)})}function J$(t,e){var n,r;return function(){var i=Ee(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function tS(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ee(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function eS(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=we(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?J$:tS)(n,t,e))}function uc(t,e,n){var r=t._id;return t.each(function(){var i=Ee(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return we(i,r).value[e]}}function hp(t,e){var n;return(typeof e=="number"?_e:e instanceof Mn?Ko:(n=Mn(e))?(e=n,Ko):Jd)(t,e)}function nS(t){return function(){this.removeAttribute(t)}}function rS(t){return function(){this.removeAttributeNS(t.space,t.local)}}function iS(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function oS(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function aS(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function sS(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function uS(t,e){var n=Ho(t),r=n==="transform"?Y$:hp;return this.attrTween(t,typeof e=="function"?(n.local?sS:aS)(n,r,uc(this,"attr."+t,e)):e==null?(n.local?rS:nS)(n):(n.local?oS:iS)(n,r,e))}function cS(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function lS(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function fS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&lS(t,o)),n}return i._value=e,i}function hS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&cS(t,o)),n}return i._value=e,i}function dS(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Ho(t);return this.tween(n,(r.local?fS:hS)(r,e))}function pS(t,e){return function(){sc(this,t).delay=+e.apply(this,arguments)}}function gS(t,e){return e=+e,function(){sc(this,t).delay=e}}function mS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?pS:gS)(e,t)):we(this.node(),e).delay}function yS(t,e){return function(){Ee(this,t).duration=+e.apply(this,arguments)}}function bS(t,e){return e=+e,function(){Ee(this,t).duration=e}}function vS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?yS:bS)(e,t)):we(this.node(),e).duration}function xS(t,e){if(typeof e!="function")throw new Error;return function(){Ee(this,t).ease=e}}function _S(t){var e=this._id;return arguments.length?this.each(xS(e,t)):we(this.node(),e).ease}function wS(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ee(this,t).ease=n}}function $S(t){if(typeof t!="function")throw new Error;return this.each(wS(this._id,t))}function SS(t){typeof t!="function"&&(t=Cd(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new We(r,this._parents,this._name,this._id)}function AS(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=e[s],c=n[s],l=u.length,h=a[s]=new Array(l),f,d=0;d<l;++d)(f=u[d]||c[d])&&(h[d]=f);for(;s<r;++s)a[s]=e[s];return new We(a,this._parents,this._name,this._id)}function MS(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function TS(t,e,n){var r,i,o=MS(e)?sc:Ee;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function PS(t,e){var n=this._id;return arguments.length<2?we(this.node(),n).on.on(t):this.each(TS(n,t,e))}function DS(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function LS(){return this.on("end.remove",DS(this._id))}function ES(t){var e=this._name,n=this._id;typeof t!="function"&&(t=ju(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,c=o[a]=new Array(u),l,h,f=0;f<u;++f)(l=s[f])&&(h=t.call(l,l.__data__,f,s))&&("__data__"in l&&(h.__data__=l.__data__),c[f]=h,oa(c[f],e,n,f,c,we(l,n)));return new We(o,this._parents,e,n)}function kS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=kd(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],c=u.length,l,h=0;h<c;++h)if(l=u[h]){for(var f=t.call(l,l.__data__,h,u),d,p=we(l,n),g=0,m=f.length;g<m;++g)(d=f[g])&&oa(d,e,n,g,f,p);o.push(f),a.push(l)}return new We(o,a,e,n)}var CS=di.prototype.constructor;function IS(){return new CS(this._groups,this._parents)}function RS(t,e){var n,r,i;return function(){var o=mr(this,t),a=(this.style.removeProperty(t),mr(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function dp(t){return function(){this.style.removeProperty(t)}}function NS(t,e,n){var r,i=n+"",o;return function(){var a=mr(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function FS(t,e,n){var r,i,o;return function(){var a=mr(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),mr(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function GS(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Ee(this,t),c=u.on,l=u.value[o]==null?s||(s=dp(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function zS(t,e,n){var r=(t+="")=="transform"?B$:hp;return e==null?this.styleTween(t,RS(t,r)).on("end.style."+t,dp(t)):typeof e=="function"?this.styleTween(t,FS(t,r,uc(this,"style."+t,e))).each(GS(this._id,t)):this.styleTween(t,NS(t,r,e),n).on("end.style."+t,null)}function OS(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function US(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&OS(t,a,n)),r}return o._value=e,o}function BS(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,US(t,e,n??""))}function YS(t){return function(){this.textContent=t}}function WS(t){return function(){var e=t(this);this.textContent=e??""}}function HS(t){return this.tween("text",typeof t=="function"?WS(uc(this,"text",t)):YS(t==null?"":t+""))}function qS(t){return function(e){this.textContent=t.call(this,e)}}function XS(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&qS(i)),e}return r._value=t,r}function jS(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,XS(t))}function VS(){for(var t=this._name,e=this._id,n=pp(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var l=we(u,e);oa(u,t,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new We(r,this._parents,t,n)}function ZS(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var c=Ee(this,r),l=c.on;l!==t&&(e=(t=l).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),c.on=e}),i===0&&o()})}var KS=0;function We(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function pp(){return++KS}var He=di.prototype;We.prototype={constructor:We,select:ES,selectAll:kS,selectChild:He.selectChild,selectChildren:He.selectChildren,filter:SS,merge:AS,selection:IS,transition:VS,call:He.call,nodes:He.nodes,node:He.node,size:He.size,empty:He.empty,each:He.each,on:PS,attr:uS,attrTween:dS,style:zS,styleTween:BS,text:HS,textTween:jS,remove:LS,tween:eS,delay:mS,duration:vS,ease:_S,easeVarying:$S,end:ZS,[Symbol.iterator]:He[Symbol.iterator]};function QS(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var JS={time:null,delay:0,duration:250,ease:QS};function t3(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function e3(t){var e,n;t instanceof We?(e=t._id,t=t._name):(e=pp(),(n=JS).time=rc(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&oa(u,t,e,c,a,n||t3(u,e));return new We(r,this._parents,t,e)}di.prototype.interrupt=Q$,di.prototype.transition=e3;function n3(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function aa(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function vr(t){return t=aa(Math.abs(t)),t?t[1]:NaN}function r3(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function i3(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var o3=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function sa(t){if(!(e=o3.exec(t)))throw new Error("invalid format: "+t);var e;return new cc({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}sa.prototype=cc.prototype;function cc(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}cc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function a3(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var gp;function s3(t,e){var n=aa(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(gp=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+aa(t,Math.max(0,e+o-1))[0]}function mp(t,e){var n=aa(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const yp={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:n3,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>mp(t*100,e),r:mp,s:s3,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function bp(t){return t}var vp=Array.prototype.map,xp=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function u3(t){var e=t.grouping===void 0||t.thousands===void 0?bp:r3(vp.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?bp:i3(vp.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(h){h=sa(h);var f=h.fill,d=h.align,p=h.sign,g=h.symbol,m=h.zero,y=h.width,v=h.comma,x=h.precision,b=h.trim,w=h.type;w==="n"?(v=!0,w="g"):yp[w]||(x===void 0&&(x=12),b=!0,w="g"),(m||f==="0"&&d==="=")&&(m=!0,f="0",d="=");var $=g==="$"?n:g==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",A=g==="$"?r:/[%p]/.test(w)?a:"",_=yp[w],L=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function E(T){var I=$,P=A,D,C,S;if(w==="c")P=_(T)+P,T="";else{T=+T;var R=T<0||1/T<0;if(T=isNaN(T)?u:_(Math.abs(T),x),b&&(T=a3(T)),R&&+T==0&&p!=="+"&&(R=!1),I=(R?p==="("?p:s:p==="-"||p==="("?"":p)+I,P=(w==="s"?xp[8+gp/3]:"")+P+(R&&p==="("?")":""),L){for(D=-1,C=T.length;++D<C;)if(S=T.charCodeAt(D),48>S||S>57){P=(S===46?i+T.slice(D+1):T.slice(D))+P,T=T.slice(0,D);break}}}v&&!m&&(T=e(T,1/0));var G=I.length+T.length+P.length,M=G<y?new Array(y-G+1).join(f):"";switch(v&&m&&(T=e(M+T,M.length?y-P.length:1/0),M=""),d){case"<":T=I+T+P+M;break;case"=":T=I+M+T+P;break;case"^":T=M.slice(0,G=M.length>>1)+I+T+P+M.slice(G);break;default:T=M+I+T+P;break}return o(T)}return E.toString=function(){return h+""},E}function l(h,f){var d=c((h=sa(h),h.type="f",h)),p=Math.max(-8,Math.min(8,Math.floor(vr(f)/3)))*3,g=Math.pow(10,-p),m=xp[8+p/3];return function(y){return d(g*y)+m}}return{format:c,formatPrefix:l}}var ua,_p,wp;c3({thousands:",",grouping:[3],currency:["$",""]});function c3(t){return ua=u3(t),_p=ua.format,wp=ua.formatPrefix,ua}function l3(t){return Math.max(0,-vr(Math.abs(t)))}function f3(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(vr(e)/3)))*3-vr(Math.abs(t)))}function h3(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,vr(e)-vr(t))+1}function ca(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const $p=Symbol("implicit");function Sp(){var t=new Md,e=[],n=[],r=$p;function i(o){let a=t.get(o);if(a===void 0){if(r!==$p)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Md;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Sp(e,n).unknown(r)},ca.apply(i,arguments),i}function Ap(){var t=Sp().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,c=0,l=.5;delete t.unknown;function h(){var f=e().length,d=i<r,p=d?i:r,g=d?r:i;o=(g-p)/Math.max(1,f-u+c*2),s&&(o=Math.floor(o)),p+=(g-p-o*(f-u))*l,a=o*(1-u),s&&(p=Math.round(p),a=Math.round(a));var m=I_(f).map(function(y){return p+o*y});return n(d?m.reverse():m)}return t.domain=function(f){return arguments.length?(e(f),h()):e()},t.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(f){return arguments.length?(s=!!f,h()):s},t.padding=function(f){return arguments.length?(u=Math.min(1,c=+f),h()):u},t.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),h()):u},t.paddingOuter=function(f){return arguments.length?(c=+f,h()):c},t.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),h()):l},t.copy=function(){return Ap(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},ca.apply(h(),arguments)}function Mp(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Mp(e())},t}function d3(){return Mp(Ap.apply(null,arguments).paddingInner(1))}function p3(t){return function(){return t}}function g3(t){return+t}var Tp=[0,1];function xr(t){return t}function lc(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:p3(isNaN(e)?NaN:.5)}function m3(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function y3(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=lc(i,r),o=n(a,o)):(r=lc(r,i),o=n(o,a)),function(s){return o(r(s))}}function b3(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=lc(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=Ad(t,s,1,r)-1;return o[u](i[u](s))}}function v3(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function x3(){var t=Tp,e=Tp,n=nc,r,i,o,a=xr,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==xr&&(a=m3(t[0],t[f-1])),s=f>2?b3:y3,u=c=null,h}function h(f){return f==null||isNaN(f=+f)?o:(u||(u=s(t.map(r),e,n)))(r(a(f)))}return h.invert=function(f){return a(i((c||(c=s(e,t.map(r),_e)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,g3),l()):t.slice()},h.range=function(f){return arguments.length?(e=Array.from(f),l()):e.slice()},h.rangeRound=function(f){return e=Array.from(f),n=z$,l()},h.clamp=function(f){return arguments.length?(a=f?!0:xr,l()):a!==xr},h.interpolate=function(f){return arguments.length?(n=f,l()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,d){return r=f,i=d,l()}}function _3(){return x3()(xr,xr)}function w3(t,e,n,r){var i=C_(t,e,n),o;switch(r=sa(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=f3(i,a))&&(r.precision=o),wp(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=h3(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=l3(i))&&(r.precision=o-(r.type==="%")*2);break}}return _p(r)}function Pp(t){var e=t.domain;return t.ticks=function(n){var r=e();return k_(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return w3(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,c,l=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);l-- >0;){if(c=qu(a,s,n),c===u)return r[i]=a,r[o]=s,e(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;u=c}return t},t}function Dp(){var t=_3();return t.copy=function(){return v3(t,Dp())},ca.apply(t,arguments),Pp(t)}function Lp(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[Ad(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*e-(u-n)*t)/(n+1);return a}return a.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var c=i.indexOf(u);return c<0?[NaN,NaN]:c<1?[t,r[0]]:c>=n?[r[n-1],e]:[r[c-1],r[c]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Lp().domain([t,e]).range(i).unknown(o)},ca.apply(Pp(a),arguments)}function _i(t,e,n){this.k=t,this.x=e,this.y=n}_i.prototype={constructor:_i,scale:function(t){return t===1?this:new _i(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new _i(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},_i.prototype;function la(t){return Object.prototype.toString.call(t)==="[object Object]"}function fc(t,e){if(la(t)===!1||la(e)===!1)return Object.assign({},e);const n=(r,i)=>{const o=Object.assign({},i);for(let a of Object.keys(r)){if(!(a in i))continue;let s;la(r[a])&&la(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}var hc=function(t,e){return hc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},hc(t,e)};function qe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");hc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function $3(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(l){try{c(r.next(l))}catch(h){a(h)}}function u(l){try{c(r.throw(l))}catch(h){a(h)}}function c(l){l.done?o(l.value):i(l.value).then(s,u)}c((r=r.apply(t,[])).next())})}function Ep(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function _r(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function wi(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function $i(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function wr(t){return this instanceof wr?(this.v=t,this):new wr(t)}function S3(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(d){return function(p){return Promise.resolve(p).then(d,h)}}function s(d,p){r[d]&&(i[d]=function(g){return new Promise(function(m,y){o.push([d,g,m,y])>1||u(d,g)})},p&&(i[d]=p(i[d])))}function u(d,p){try{c(r[d](p))}catch(g){f(o[0][3],g)}}function c(d){d.value instanceof wr?Promise.resolve(d.value.v).then(l,h):f(o[0][2],d)}function l(d){u("next",d)}function h(d){u("throw",d)}function f(d,p){d(p),o.shift(),o.length&&u(o[0][0],o[0][1])}}function A3(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof _r=="function"?_r(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,u){a=t[o](a),i(s,u,a.done,a.value)})}}function i(o,a,s,u){Promise.resolve(u).then(function(c){o({value:c,done:s})},a)}}function Pt(t){return typeof t=="function"}function dc(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var pc=dc(function(t){return function(e){t(this),this.message=e?e.length+` errors occurred during unsubscription:
4
4
  `+e.map(function(n,r){return r+1+") "+n.toString()}).join(`
5
- `):"",this.name="UnsubscriptionError",this.errors=e}});function fa(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var wi=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=br(a),u=s.next();!u.done;u=s.next()){var c=u.value;c.remove(this)}}catch(g){e={error:g}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(Pt(l))try{l()}catch(g){o=g instanceof pc?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=br(h),d=f.next();!d.done;d=f.next()){var p=d.value;try{L0(p)}catch(g){o=o??[],g instanceof pc?o=_i(_i([],xi(o)),xi(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new pc(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)L0(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&fa(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&fa(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),P0=wi.EMPTY;function D0(t){return t instanceof wi||t&&"closed"in t&&Pt(t.remove)&&Pt(t.add)&&Pt(t.unsubscribe)}function L0(t){Pt(t)?t():t.unsubscribe()}var E0={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},w3={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,_i([t,e],xi(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function k0(t){w3.setTimeout(function(){throw t})}function gc(){}function ha(t){t()}var mc=function(t){qe(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,D0(n)&&n.add(r)):r.destination=M3,r}return e.create=function(n,r,i){return new $i(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}(wi),$3=Function.prototype.bind;function yc(t,e){return $3.call(t,e)}var S3=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}(),$i=function(t){qe(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(Pt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&E0.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&yc(n.next,s),error:n.error&&yc(n.error,s),complete:n.complete&&yc(n.complete,s)}):a=n}return o.destination=new S3(a),o}return e}(mc);function da(t){k0(t)}function A3(t){throw t}var M3={closed:!0,next:gc,error:A3,complete:gc},bc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function C0(t){return t}function T3(t){return t.length===0?C0:t.length===1?t[0]:function(e){return t.reduce(function(n,r){return r(n)},e)}}var $e=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=D3(e)?e:new $i(e,n,r);return ha(function(){var a=i,s=a.operator,u=a.source;o.add(s?s.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=R0(n),new n(function(i,o){var a=new $i({next:function(s){try{e(s)}catch(u){o(u),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[bc]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return T3(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=R0(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 R0(t){var e;return(e=t??E0.Promise)!==null&&e!==void 0?e:Promise}function P3(t){return t&&Pt(t.next)&&Pt(t.error)&&Pt(t.complete)}function D3(t){return t&&t instanceof mc||P3(t)&&D0(t)}function L3(t){return Pt(t==null?void 0:t.lift)}function Dn(t){return function(e){if(L3(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 E3(t,e,n,r,i)}var E3=function(t){qe(e,t);function e(n,r,i,o,a,s){var u=t.call(this,n)||this;return u.onFinalize=a,u.shouldUnsubscribe=s,u._next=r?function(c){try{r(c)}catch(l){n.error(l)}}:t.prototype._next,u._error=o?function(c){try{o(c)}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(mc),k3=dc(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ai=function(t){qe(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new I0(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new k3},e.prototype.next=function(n){var r=this;ha(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=br(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(c){i={error:c}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;ha(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;ha(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?P0:(this.currentObservers=null,s.push(n),new wi(function(){r.currentObservers=null,fa(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new $e;return n.source=this,n},e.create=function(n,r){return new I0(n,r)},e}($e),I0=function(t){qe(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:P0},e}(Ai),vc={now:function(){return(vc.delegate||Date).now()},delegate:void 0},C3=function(t){qe(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=vc);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),u=0;u<s.length&&!n.closed;u+=o?1:2)n.next(s[u]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var u=i.now(),c=0,l=1;l<o.length&&o[l]<=u;l+=2)c=l;c&&o.splice(0,c+1)}},e}(Ai),R3=function(t){qe(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(wi),N0={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,_i([t,e],xi(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},I3=function(t){qe(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},e.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),N0.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&&N0.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,fa(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(R3),F0=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=vc.now,t}(),N3=function(t){qe(e,t);function e(n,r){r===void 0&&(r=F0.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}(F0);new N3(I3);function F3(t){return t&&Pt(t.schedule)}function G3(t){return t[t.length-1]}function G0(t){return F3(G3(t))?t.pop():void 0}var z0=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function O0(t){return Pt(t==null?void 0:t.then)}function U0(t){return Pt(t[bc])}function B0(t){return Symbol.asyncIterator&&Pt(t==null?void 0:t[Symbol.asyncIterator])}function Y0(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 z3(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var W0=z3();function H0(t){return Pt(t==null?void 0:t[W0])}function q0(t){return x3(this,arguments,function(){var e,n,r,i;return T0(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,vr(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,vr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,vr(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 X0(t){return Pt(t==null?void 0:t.getReader)}function cn(t){if(t instanceof $e)return t;if(t!=null){if(U0(t))return O3(t);if(z0(t))return U3(t);if(O0(t))return B3(t);if(B0(t))return j0(t);if(H0(t))return Y3(t);if(X0(t))return W3(t)}throw Y0(t)}function O3(t){return new $e(function(e){var n=t[bc]();if(Pt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function U3(t){return new $e(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function B3(t){return new $e(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,k0)})}function Y3(t){return new $e(function(e){var n,r;try{for(var i=br(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 j0(t){return new $e(function(e){H3(t,e).catch(function(n){return e.error(n)})})}function W3(t){return j0(q0(t))}function H3(t,e){var n,r,i,o;return v3(this,void 0,void 0,function(){var a,s;return T0(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=_3(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 V0(t,e){return e===void 0&&(e=0),Dn(function(n,r){n.subscribe(Si(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 Z0(t,e){return e===void 0&&(e=0),Dn(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function q3(t,e){return cn(t).pipe(Z0(e),V0(e))}function X3(t,e){return cn(t).pipe(Z0(e),V0(e))}function j3(t,e){return new $e(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function V3(t,e){return new $e(function(n){var r;return Ln(n,e,function(){r=t[W0](),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 Pt(r==null?void 0:r.return)&&r.return()}})}function K0(t,e){if(!t)throw new Error("Iterable cannot be null");return new $e(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 Z3(t,e){return K0(q0(t),e)}function K3(t,e){if(t!=null){if(U0(t))return q3(t,e);if(z0(t))return j3(t,e);if(O0(t))return X3(t,e);if(B0(t))return K0(t,e);if(H0(t))return V3(t,e);if(X0(t))return Z3(t,e)}throw Y0(t)}function Q3(t,e){return e?K3(t,e):cn(t)}dc(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function Q0(t,e){return Dn(function(n,r){var i=0;n.subscribe(Si(r,function(o){r.next(t.call(e,o,i++))}))})}function J3(t,e,n,r,i,o,a,s){var u=[],c=0,l=0,h=!1,f=function(){h&&!u.length&&!c&&e.complete()},d=function(g){return c<r?p(g):u.push(g)},p=function(g){c++;var m=!1;cn(n(g,l++)).subscribe(Si(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{c--;for(var y=function(){var x=u.shift();a||p(x)};u.length&&c<r;)y();f()}catch(x){e.error(x)}}))};return t.subscribe(Si(e,d,function(){h=!0,f()})),function(){}}function J0(t,e,n){return n===void 0&&(n=1/0),Pt(e)?J0(function(r,i){return Q0(function(o,a){return e(r,o,i,a)})(cn(t(r,i)))},n):(typeof e=="number"&&(n=e),Dn(function(r,i){return J3(r,i,t,n)}))}function t6(t){return J0(C0,t)}function e6(){return t6(1)}function tp(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return e6()(Q3(t,G0(t)))}function n6(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new Ai}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,u=s===void 0?!0:s;return function(c){var l,h,f,d=0,p=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),l=f=void 0,p=g=!1},x=function(){var v=l;y(),v==null||v.unsubscribe()};return Dn(function(v,b){d++,!g&&!p&&m();var $=f=f??n();b.add(function(){d--,d===0&&!g&&!p&&(h=xc(x,u))}),$.subscribe(b),!l&&d>0&&(l=new $i({next:function(w){return $.next(w)},error:function(w){g=!0,m(),h=xc(y,i,w),$.error(w)},complete:function(){p=!0,m(),h=xc(y,a),$.complete()}}),cn(v).subscribe(l))})(c)}}function xc(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new $i({next:function(){i.unsubscribe(),t()}});return cn(e.apply(void 0,_i([],xi(n)))).subscribe(i)}}function r6(t,e,n){var r,i=!1;return r=t,n6({connector:function(){return new C3(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function i6(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=G0(t);return Dn(function(r,i){(n?tp(t,r,n):tp(t,r)).subscribe(i)})}function o6(t){return Dn(function(e,n){cn(t).subscribe(Si(n,function(){return n.complete()},gc)),!n.closed&&e.subscribe(n)})}const ep=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=hr.scaleDomain,scaleRange:i=hr.scaleRange})=>{const o=r[0]??hr.scaleDomain[0],a=r[1]??hr.scaleDomain[1],s=i[0]??hr.scaleRange[0],u=i[1]??hr.scaleRange[1],c=o==="auto"?e:o,l=a==="auto"?t:a,h=t-(t-c)/(1-s),f=l/u;return A0().domain([h,f]).range([0,n])},np=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return c3().domain(t).range(r).padding(n)},a6=({axisLabels:t,axisWidth:e,padding:n=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),M0().domain([-0,e+0]).range(i)};function s6({name:t,defaultParams:e,initFn:n}){const r=new Ai,i=new Ai,o=new WeakMap;let a=()=>{},s,u=e;return{params$:i,name:t,defaultParams:e,init(){s&&(a=n(s)??(()=>{}),o.set(s.selection,s))},destroy(){a(),s&&(s.selection.remove(),s=void 0),r.next(void 0)},setPresetParams:c=>{u=fc(c,e)},setContext:c=>{s=c,s.observer.fullParams$=i.pipe(o6(r),i6({}),Q0(l=>fc(l,u)),r6(1))}}}const Mi=()=>function(t,e){return function(n){return class{constructor(){const r=s6({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}}}},Ti=Mi(),fe=Mi(),Xe=Mi(),rp=Mi(),ip=Mi();function _t(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function op(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function pa(t){let e,n,r;t.length!==2?(e=_t,n=(s,u)=>_t(t(s),u),r=(s,u)=>t(s)-u):(e=t===_t||t===op?t:u6,n=t,r=t);function i(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<0?c=h+1:l=h}while(c<l)}return c}function o(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<=0?c=h+1:l=h}while(c<l)}return c}function a(s,u,c=0,l=s.length){const h=i(s,u,c,l-1);return h>c&&r(s[h-1],u)>-r(s[h],u)?h-1:h}return{left:i,center:a,right:o}}function u6(){return 0}function ga(t){return t===null?NaN:+t}function*c6(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 ap=pa(_t),sp=ap.right,l6=ap.left,f6=pa(ga).center,En=sp;function h6(t,e){if(!((e=+e)>=0))throw new RangeError("invalid r");let n=t.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!e)return t;const r=_c(e),i=t.slice();return r(t,i,0,n,1),r(i,t,0,n,1),r(t,i,0,n,1),t}const up=cp(_c),d6=cp(p6);function cp(t){return function(e,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:a}=e;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((a=Math.floor(a!==void 0?a:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!a||!n&&!r)return e;const s=n&&t(n),u=r&&t(r),c=i.slice();return s&&u?(xr(s,c,i,o,a),xr(s,i,c,o,a),xr(s,c,i,o,a),_r(u,i,c,o,a),_r(u,c,i,o,a),_r(u,i,c,o,a)):s?(xr(s,i,c,o,a),xr(s,c,i,o,a),xr(s,i,c,o,a)):u&&(_r(u,i,c,o,a),_r(u,c,i,o,a),_r(u,i,c,o,a)),e}}function xr(t,e,n,r,i){for(let o=0,a=r*i;o<a;)t(e,n,o,o+=r,1)}function _r(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function p6(t){const e=_c(t);return(n,r,i,o,a)=>{i<<=2,o<<=2,a<<=2,e(n,r,i+0,o+0,a),e(n,r,i+1,o+1,a),e(n,r,i+2,o+2,a),e(n,r,i+3,o+3,a)}}function _c(t){const e=Math.floor(t);if(e===t)return g6(t);const n=t-e,r=2*t+1;return(i,o,a,s,u)=>{if(!((s-=u)>=a))return;let c=e*o[a];const l=u*e,h=l+u;for(let f=a,d=a+l;f<d;f+=u)c+=o[Math.min(s,f)];for(let f=a,d=s;f<=d;f+=u)c+=o[Math.min(s,f+l)],i[f]=(c+n*(o[Math.max(a,f-h)]+o[Math.min(s,f+h)]))/r,c-=o[Math.max(a,f-l)]}}function g6(t){const e=2*t+1;return(n,r,i,o,a)=>{if(!((o-=a)>=i))return;let s=t*r[i];const u=a*t;for(let c=i,l=i+u;c<l;c+=a)s+=r[Math.min(o,c)];for(let c=i,l=o;c<=l;c+=a)s+=r[Math.min(o,c+u)],n[c]=s/e,s-=r[Math.max(i,c-u)]}}function ma(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(i=+i)>=i&&++n}return n}function m6(t){return t.length|0}function y6(t){return!(t>0)}function b6(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function v6(t){return e=>t(...e)}function x6(...t){const e=typeof t[t.length-1]=="function"&&v6(t.pop());t=t.map(b6);const n=t.map(m6),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(y6))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 _6(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 lp(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 fp(t,e){const n=lp(t,e);return n&&Math.sqrt(n)}function Pi(t,e){let n,r;if(e===void 0)for(const i of t)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class Dt{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const o=n[i],a=e+o,s=Math.abs(e)<Math.abs(o)?e-(a-o):o-(a-e);s&&(n[r++]=s),e=a}return n[r]=e,this._n=r+1,this}valueOf(){const e=this._partials;let n=this._n,r,i,o,a=0;if(n>0){for(a=e[--n];n>0&&(r=a,i=e[--n],a=r+i,o=i-(a-r),!o););n>0&&(o<0&&e[n-1]<0||o>0&&e[n-1]>0)&&(i=o*2,r=a+i,i==r-a&&(a=r))}return a}}function w6(t,e){const n=new Dt;if(e===void 0)for(let r of t)(r=+r)&&n.add(r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&n.add(i)}return+n}function $6(t,e){const n=new Dt;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}class Di extends Map{constructor(e,n=pp){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(wc(this,e))}has(e){return super.has(wc(this,e))}set(e,n){return super.set(hp(this,e),n)}delete(e){return super.delete(dp(this,e))}}class kn extends Set{constructor(e,n=pp){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const r of e)this.add(r)}has(e){return super.has(wc(this,e))}add(e){return super.add(hp(this,e))}delete(e){return super.delete(dp(this,e))}}function wc({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function hp({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function dp({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function pp(t){return t!==null&&typeof t=="object"?t.valueOf():t}function wr(t){return t}function gp(t,...e){return $r(t,wr,wr,e)}function mp(t,...e){return $r(t,Array.from,wr,e)}function yp(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 S6(t,...e){return yp(mp(t,...e),e)}function A6(t,e,...n){return yp(vp(t,e,...n),n)}function bp(t,e,...n){return $r(t,wr,e,n)}function vp(t,e,...n){return $r(t,Array.from,e,n)}function M6(t,...e){return $r(t,wr,xp,e)}function T6(t,...e){return $r(t,Array.from,xp,e)}function xp(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function $r(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new Di,u=r[a++];let c=-1;for(const l of o){const h=u(l,++c,o),f=s.get(h);f?f.push(l):s.set(h,[l])}for(const[l,h]of s)s.set(l,i(h,a));return e(s)}(t,0)}function _p(t,e){return Array.from(e,n=>t[n])}function $c(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){const r=Uint32Array.from(t,(i,o)=>o);return e.length>1?(e=e.map(i=>t.map(i)),r.sort((i,o)=>{for(const a of e){const s=Sr(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>Sr(n[i],n[o]))),_p(t,r)}return t.sort(Sc(n))}function Sc(t=_t){if(t===_t)return Sr;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 Sr(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function P6(t,e,n){return(e.length!==2?$c(bp(t,e,n),([r,i],[o,a])=>_t(i,a)||_t(r,o)):$c(gp(t,n),([r,i],[o,a])=>e(i,a)||_t(r,o))).map(([r])=>r)}var D6=Array.prototype,L6=D6.slice;function Ac(t){return()=>t}const E6=Math.sqrt(50),k6=Math.sqrt(10),C6=Math.sqrt(2);function ya(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=E6?10:o>=k6?5:o>=C6?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),u=Math.round(e*c),s/c<t&&++s,u/c>e&&--u,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),u=Math.round(e/c),s*c<t&&++s,u*c>e&&--u),u<s&&.5<=n&&n<2?ya(t,e,n*2):[s,u,c]}function Cn(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?ya(e,t,n):ya(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)u[c]=(o-c)/-a;else for(let c=0;c<s;++c)u[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)u[c]=(i+c)/-a;else for(let c=0;c<s;++c)u[c]=(i+c)*a;return u}function Rn(t,e,n){return e=+e,t=+t,n=+n,ya(t,e,n)[2]}function ba(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Rn(e,t,n):Rn(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function Mc(t,e,n){let r;for(;;){const i=Rn(t,e,n);if(i===r||i===0||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function Tc(t){return Math.max(1,Math.ceil(Math.log(ma(t))/Math.LN2)+1)}function wp(){var t=wr,e=Pi,n=Tc;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,s,u,c=new Array(a);for(o=0;o<a;++o)c[o]=t(i[o],o,i);var l=e(c),h=l[0],f=l[1],d=n(c,h,f);if(!Array.isArray(d)){const v=f,b=+d;if(e===Pi&&([h,f]=Mc(h,f,b)),d=Cn(h,f,b),d[0]<=h&&(u=Rn(h,f,b)),d[d.length-1]>=f)if(v>=f&&e===Pi){const $=Rn(h,f,b);isFinite($)&&($>0?f=(Math.floor(f/$)+1)*$:$<0&&(f=(Math.ceil(f*-$)+1)/-$))}else d.pop()}for(var p=d.length,g=0,m=p;d[g]<=h;)++g;for(;d[m-1]>f;)--m;(g||m<p)&&(d=d.slice(g,m),p=m-g);var y=new Array(p+1),x;for(o=0;o<=p;++o)x=y[o]=[],x.x0=o>0?d[o-1]:h,x.x1=o<p?d[o]:f;if(isFinite(u)){if(u>0)for(o=0;o<a;++o)(s=c[o])!=null&&h<=s&&s<=f&&y[Math.min(p,Math.floor((s-h)/u))].push(i[o]);else if(u<0){for(o=0;o<a;++o)if((s=c[o])!=null&&h<=s&&s<=f){const v=Math.floor((h-s)*u);y[Math.min(p,v+(d[v]<=s))].push(i[o])}}}else for(o=0;o<a;++o)(s=c[o])!=null&&h<=s&&s<=f&&y[En(d,s,0,p)].push(i[o]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:Ac(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:Ac([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Ac(Array.isArray(i)?L6.call(i):i),r):n},r}function Li(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Pc(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);return r}function va(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Dc(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);return r}function xa(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?Sr:Sc(i);r>n;){if(r-n>600){const u=r-n+1,c=e-n+1,l=Math.log(u),h=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*h*(u-h)/u)*(c-u/2<0?-1:1),d=Math.max(n,Math.floor(e-c*h/u+f)),p=Math.min(r,Math.floor(e+(u-c)*h/u+f));xa(t,e,d,p,i)}const o=t[e];let a=n,s=r;for(Ei(t,n,e),i(t[r],o)>0&&Ei(t,n,r);a<s;){for(Ei(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?Ei(t,n,s):(++s,Ei(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Ei(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function $p(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 ki(t,e,n){if(t=Float64Array.from(c6(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return va(t);if(e>=1)return Li(t);var r,i=(r-1)*e,o=Math.floor(i),a=Li(xa(t,o).subarray(0,o+1)),s=va(t.subarray(o+1));return a+(s-a)*(i-o)}}function Sp(t,e,n=ga){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t),s=+n(t[o+1],o+1,t);return a+(s-a)*(i-o)}}function Ap(t,e,n=ga){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,u)=>ga(n(t[u],u,t))),e<=0)return Dc(r);if(e>=1)return Pc(r);var r,i=Uint32Array.from(t,(s,u)=>u),o=r.length-1,a=Math.floor(o*e);return xa(i,a,0,o,(s,u)=>Sr(r[s],r[u])),a=$p(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function R6(t,e,n){const r=ma(t),i=ki(t,.75)-ki(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function I6(t,e,n){const r=ma(t),i=fp(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function N6(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 F6(t,e){return ki(t,.5,e)}function G6(t,e){return Ap(t,.5,e)}function*z6(t){for(const e of t)yield*e}function Lc(t){return Array.from(z6(t))}function O6(t,e){const n=new Di;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 U6(t,e=B6){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function B6(t,e){return[t,e]}function ln(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function Y6(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)=>Sr(n[s],n[u]):Sc(i)),t.forEach((s,u)=>{const c=i(s,o===void 0?s:o);c>=0?((o===void 0||c>0)&&(o=s,a=u),r[s]=a):r[s]=NaN}),r}function W6(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 Mp(t,e=_t){if(e.length===1)return Dc(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)<0)&&(n=o,r=i);return r}function H6(t,e=_t){if(e.length===1)return Pc(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)>0)&&(n=o,r=i);return r}function q6(t,e){const n=Mp(t,e);return n<0?void 0:n}const X6=Tp(Math.random);function Tp(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 j6(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 Pp(t){if(!(o=t.length))return[];for(var e=-1,n=va(t,V6),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 V6(t){return t.length}function Z6(){return Pp(arguments)}function K6(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 Q6(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 J6(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 t5(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 e5(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 n5(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function r5(t,...e){t=new kn(t);for(const n of e)for(const r of n)t.delete(r);return t}function i5(t,e){const n=e[Symbol.iterator](),r=new kn;for(const i of t){if(r.has(i))return!1;let o,a;for(;({value:o,done:a}=n.next())&&!a;){if(Object.is(i,o))return!1;r.add(o)}}return!0}function o5(t,...e){t=new kn(t),e=e.map(a5);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function a5(t){return t instanceof kn?t:new kn(t)}function Dp(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=Lp(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const u=Lp(a);if(r.add(u),Object.is(o,u))break}}return!0}function Lp(t){return t!==null&&typeof t=="object"?t.valueOf():t}function s5(t,e){return Dp(e,t)}function u5(...t){const e=new kn;for(const n of t)for(const r of n)e.add(r);return e}function c5(t){return t}var _a=1,wa=2,Ec=3,Ci=4,Ep=1e-6;function l5(t){return"translate("+t+",0)"}function f5(t){return"translate(0,"+t+")"}function h5(t){return e=>+t(e)}function d5(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function p5(){return!this.__axis}function $a(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===_a||t===Ci?-1:1,l=t===Ci||t===wa?"x":"y",h=t===_a||t===Ec?l5:f5;function f(d){var p=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):c5),m=Math.max(o,0)+s,y=e.range(),x=+y[0]+u,v=+y[y.length-1]+u,b=(e.bandwidth?d5:h5)(e.copy(),u),$=d.selection?d.selection():d,w=$.selectAll(".domain").data([null]),S=$.selectAll(".tick").data(p,e).order(),_=S.exit(),P=S.enter().append("g").attr("class","tick"),D=S.select("line"),A=S.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),S=S.merge(P),D=D.merge(P.append("line").attr("stroke","currentColor").attr(l+"2",c*o)),A=A.merge(P.append("text").attr("fill","currentColor").attr(l,c*m).attr("dy",t===_a?"0em":t===Ec?"0.71em":"0.32em")),d!==$&&(w=w.transition(d),S=S.transition(d),D=D.transition(d),A=A.transition(d),_=_.transition(d).attr("opacity",Ep).attr("transform",function(I){return isFinite(I=b(I))?h(I+u):this.getAttribute("transform")}),P.attr("opacity",Ep).attr("transform",function(I){var M=this.parentNode.__axis;return h((M&&isFinite(M=M(I))?M:b(I))+u)})),_.remove(),w.attr("d",t===Ci||t===wa?a?"M"+c*a+","+x+"H"+u+"V"+v+"H"+c*a:"M"+u+","+x+"V"+v:a?"M"+x+","+c*a+"V"+u+"H"+v+"V"+c*a:"M"+x+","+u+"H"+v),S.attr("opacity",1).attr("transform",function(I){return h(b(I)+u)}),D.attr(l+"2",c*o),A.attr(l,c*m).text(g),$.filter(p5).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===wa?"start":t===Ci?"end":"middle"),$.each(function(){this.__axis=b})}return f.scale=function(d){return arguments.length?(e=d,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(d){return arguments.length?(n=d==null?[]:Array.from(d),f):n.slice()},f.tickValues=function(d){return arguments.length?(r=d==null?null:Array.from(d),f):r&&r.slice()},f.tickFormat=function(d){return arguments.length?(i=d,f):i},f.tickSize=function(d){return arguments.length?(o=a=+d,f):o},f.tickSizeInner=function(d){return arguments.length?(o=+d,f):o},f.tickSizeOuter=function(d){return arguments.length?(a=+d,f):a},f.tickPadding=function(d){return arguments.length?(s=+d,f):s},f.offset=function(d){return arguments.length?(u=+d,f):u},f}function kp(t){return $a(_a,t)}function g5(t){return $a(wa,t)}function m5(t){return $a(Ec,t)}function Cp(t){return $a(Ci,t)}var y5={value:()=>{}};function In(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Sa(n)}function Sa(t){this._=t}function b5(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Sa.prototype=In.prototype={constructor:Sa,on:function(t,e){var n=this._,r=b5(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=v5(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]=Rp(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Rp(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Sa(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function v5(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Rp(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=y5,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var kc="http://www.w3.org/1999/xhtml";const Cc={svg:"http://www.w3.org/2000/svg",xhtml:kc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ri(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Cc.hasOwnProperty(e)?{space:Cc[e],local:t}:t}function x5(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===kc&&e.documentElement.namespaceURI===kc?e.createElement(t):e.createElementNS(n,t)}}function _5(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Aa(t){var e=Ri(t);return(e.local?_5:x5)(e)}function w5(){}function Ma(t){return t==null?w5:function(){return this.querySelector(t)}}function $5(t){typeof t!="function"&&(t=Ma(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,c,l=0;l<a;++l)(u=o[l])&&(c=t.call(u,u.__data__,l,o))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new Yt(r,this._parents)}function Ip(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function S5(){return[]}function Rc(t){return t==null?S5:function(){return this.querySelectorAll(t)}}function A5(t){return function(){return Ip(t.apply(this,arguments))}}function M5(t){typeof t=="function"?t=A5(t):t=Rc(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),i.push(u));return new Yt(r,i)}function Ic(t){return function(){return this.matches(t)}}function Np(t){return function(e){return e.matches(t)}}var T5=Array.prototype.find;function P5(t){return function(){return T5.call(this.children,t)}}function D5(){return this.firstElementChild}function L5(t){return this.select(t==null?D5:P5(typeof t=="function"?t:Np(t)))}var E5=Array.prototype.filter;function k5(){return Array.from(this.children)}function C5(t){return function(){return E5.call(this.children,t)}}function R5(t){return this.selectAll(t==null?k5:C5(typeof t=="function"?t:Np(t)))}function I5(t){typeof t!="function"&&(t=Ic(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new Yt(r,this._parents)}function Fp(t){return new Array(t.length)}function N5(){return new Yt(this._enter||this._groups.map(Fp),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 F5(t){return function(){return t}}function G5(t,e,n,r,i,o){for(var a=0,s,u=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Ta(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function z5(t,e,n,r,i,o,a){var s,u,c=new Map,l=e.length,h=o.length,f=new Array(l),d;for(s=0;s<l;++s)(u=e[s])&&(f[s]=d=a.call(u,u.__data__,s,e)+"",c.has(d)?i[s]=u:c.set(d,u));for(s=0;s<h;++s)d=a.call(t,o[s],s,o)+"",(u=c.get(d))?(r[s]=u,u.__data__=o[s],c.delete(d)):n[s]=new Ta(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function O5(t){return t.__data__}function U5(t,e){if(!arguments.length)return Array.from(this,O5);var n=e?z5:G5,r=this._parents,i=this._groups;typeof t!="function"&&(t=F5(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,d=B5(t.call(l,l&&l.__data__,c,r)),p=d.length,g=s[c]=new Array(p),m=a[c]=new Array(p),y=u[c]=new Array(f);n(l,h,g,m,y,d,e);for(var x=0,v=0,b,$;x<p;++x)if(b=g[x]){for(x>=v&&(v=x+1);!($=m[v])&&++v<p;);b._next=$||null}}return a=new Yt(a,r),a._enter=s,a._exit=u,a}function B5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Y5(){return new Yt(this._exit||this._groups.map(Fp),this._parents)}function W5(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 H5(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c=n[u],l=r[u],h=c.length,f=s[u]=new Array(h),d,p=0;p<h;++p)(d=c[p]||l[p])&&(f[p]=d);for(;u<i;++u)s[u]=n[u];return new Yt(s,this._parents)}function q5(){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 X5(t){t||(t=j5);function e(h,f){return h&&f?t(h.__data__,f.__data__):!h-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),c,l=0;l<s;++l)(c=a[l])&&(u[l]=c);u.sort(e)}return new Yt(i,this._parents).order()}function j5(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function V5(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Z5(){return Array.from(this)}function K5(){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 Q5(){let t=0;for(const e of this)++t;return t}function J5(){return!this.node()}function tA(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 eA(t){return function(){this.removeAttribute(t)}}function nA(t){return function(){this.removeAttributeNS(t.space,t.local)}}function rA(t,e){return function(){this.setAttribute(t,e)}}function iA(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function oA(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function aA(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 sA(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?nA:eA:typeof e=="function"?n.local?aA:oA:n.local?iA:rA)(n,e))}function Nc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function uA(t){return function(){this.style.removeProperty(t)}}function cA(t,e,n){return function(){this.style.setProperty(t,e,n)}}function lA(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function fA(t,e,n){return arguments.length>1?this.each((e==null?uA:typeof e=="function"?lA:cA)(t,e,n??"")):Nn(this.node(),t)}function Nn(t,e){return t.style.getPropertyValue(e)||Nc(t).getComputedStyle(t,null).getPropertyValue(e)}function hA(t){return function(){delete this[t]}}function dA(t,e){return function(){this[t]=e}}function pA(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function gA(t,e){return arguments.length>1?this.each((e==null?hA:typeof e=="function"?pA:dA)(t,e)):this.node()[t]}function Gp(t){return t.trim().split(/^|\s+/)}function Fc(t){return t.classList||new zp(t)}function zp(t){this._node=t,this._names=Gp(t.getAttribute("class")||"")}zp.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 Op(t,e){for(var n=Fc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Up(t,e){for(var n=Fc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function mA(t){return function(){Op(this,t)}}function yA(t){return function(){Up(this,t)}}function bA(t,e){return function(){(e.apply(this,arguments)?Op:Up)(this,t)}}function vA(t,e){var n=Gp(t+"");if(arguments.length<2){for(var r=Fc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?bA:e?mA:yA)(n,e))}function xA(){this.textContent=""}function _A(t){return function(){this.textContent=t}}function wA(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function $A(t){return arguments.length?this.each(t==null?xA:(typeof t=="function"?wA:_A)(t)):this.node().textContent}function SA(){this.innerHTML=""}function AA(t){return function(){this.innerHTML=t}}function MA(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function TA(t){return arguments.length?this.each(t==null?SA:(typeof t=="function"?MA:AA)(t)):this.node().innerHTML}function PA(){this.nextSibling&&this.parentNode.appendChild(this)}function DA(){return this.each(PA)}function LA(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function EA(){return this.each(LA)}function kA(t){var e=typeof t=="function"?t:Aa(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function CA(){return null}function RA(t,e){var n=typeof t=="function"?t:Aa(t),r=e==null?CA:typeof e=="function"?e:Ma(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function IA(){var t=this.parentNode;t&&t.removeChild(this)}function NA(){return this.each(IA)}function FA(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function GA(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function zA(t){return this.select(t?GA:FA)}function OA(t){return arguments.length?this.property("__data__",t):this.node().__data__}function UA(t){return function(e){t.call(this,e,this.__data__)}}function BA(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 YA(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 WA(t,e,n){return function(){var r=this.__on,i,o=UA(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 HA(t,e,n){var r=BA(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,l;u<c;++u)for(i=0,l=s[u];i<o;++i)if((a=r[i]).type===l.type&&a.name===l.name)return l.value}return}for(s=e?WA:YA,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Bp(t,e,n){var r=Nc(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function qA(t,e){return function(){return Bp(this,t,e)}}function XA(t,e){return function(){return Bp(this,t,e.apply(this,arguments))}}function jA(t,e){return this.each((typeof e=="function"?XA:qA)(t,e))}function*VA(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var Gc=[null];function Yt(t,e){this._groups=t,this._parents=e}function Fn(){return new Yt([[document.documentElement]],Gc)}function ZA(){return this}Yt.prototype=Fn.prototype={constructor:Yt,select:$5,selectAll:M5,selectChild:L5,selectChildren:R5,filter:I5,data:U5,enter:N5,exit:Y5,join:W5,merge:H5,selection:ZA,order:q5,sort:X5,call:V5,nodes:Z5,node:K5,size:Q5,empty:J5,each:tA,attr:sA,style:fA,property:gA,classed:vA,text:$A,html:TA,raise:DA,lower:EA,append:kA,insert:RA,remove:NA,clone:zA,datum:OA,on:HA,dispatch:jA,[Symbol.iterator]:VA};function K(t){return typeof t=="string"?new Yt([[document.querySelector(t)]],[document.documentElement]):new Yt([[t]],Gc)}function KA(t){return K(Aa(t).call(document.documentElement))}var QA=0;function Yp(){return new zc}function zc(){this._="@"+(++QA).toString(36)}zc.prototype=Yp.prototype={constructor:zc,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function Wp(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ae(t,e){if(t=Wp(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 JA(t,e){return t.target&&(t=Wp(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>ae(n,e))}function t8(t){return typeof t=="string"?new Yt([document.querySelectorAll(t)],[document.documentElement]):new Yt([Ip(t)],Gc)}const e8={passive:!1},Ii={capture:!0,passive:!1};function Oc(t){t.stopImmediatePropagation()}function Ar(t){t.preventDefault(),t.stopImmediatePropagation()}function Pa(t){var e=t.document.documentElement,n=K(t).on("dragstart.drag",Ar,Ii);"onselectstart"in e?n.on("selectstart.drag",Ar,Ii):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Da(t,e){var n=t.document.documentElement,r=K(t).on("dragstart.drag",null);e&&(r.on("click.drag",Ar,Ii),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const La=t=>()=>t;function Uc(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:u,dy:c,dispatch:l}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:l}})}Uc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function n8(t){return!t.ctrlKey&&!t.button}function r8(){return this.parentNode}function i8(t,e){return e??{x:t.x,y:t.y}}function o8(){return navigator.maxTouchPoints||"ontouchstart"in this}function Hp(){var t=n8,e=r8,n=i8,r=o8,i={},o=In("start","drag","end"),a=0,s,u,c,l,h=0;function f(b){b.on("mousedown.drag",d).filter(r).on("touchstart.drag",m).on("touchmove.drag",y,e8).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(b,$){if(!(l||!t.call(this,b,$))){var w=v(this,e.call(this,b,$),b,$,"mouse");w&&(K(b.view).on("mousemove.drag",p,Ii).on("mouseup.drag",g,Ii),Pa(b.view),Oc(b),c=!1,s=b.clientX,u=b.clientY,w("start",b))}}function p(b){if(Ar(b),!c){var $=b.clientX-s,w=b.clientY-u;c=$*$+w*w>h}i.mouse("drag",b)}function g(b){K(b.view).on("mousemove.drag mouseup.drag",null),Da(b.view,c),Ar(b),i.mouse("end",b)}function m(b,$){if(t.call(this,b,$)){var w=b.changedTouches,S=e.call(this,b,$),_=w.length,P,D;for(P=0;P<_;++P)(D=v(this,S,b,$,w[P].identifier,w[P]))&&(Oc(b),D("start",b,w[P]))}}function y(b){var $=b.changedTouches,w=$.length,S,_;for(S=0;S<w;++S)(_=i[$[S].identifier])&&(Ar(b),_("drag",b,$[S]))}function x(b){var $=b.changedTouches,w=$.length,S,_;for(l&&clearTimeout(l),l=setTimeout(function(){l=null},500),S=0;S<w;++S)(_=i[$[S].identifier])&&(Oc(b),_("end",b,$[S]))}function v(b,$,w,S,_,P){var D=o.copy(),A=ae(P||w,$),I,M,T;if((T=n.call(b,new Uc("beforestart",{sourceEvent:w,target:f,identifier:_,active:a,x:A[0],y:A[1],dx:0,dy:0,dispatch:D}),S))!=null)return I=T.x-A[0]||0,M=T.y-A[1]||0,function E(L,N,O){var k=A,R;switch(L){case"start":i[_]=E,R=a++;break;case"end":delete i[_],--a;case"drag":A=ae(O||N,$),R=a;break}D.call(L,b,new Uc(L,{sourceEvent:N,subject:T,target:f,identifier:_,active:R,x:A[0]+I,y:A[1]+M,dx:A[0]-k[0],dy:A[1]-k[1],dispatch:D}),S)}}return f.filter=function(b){return arguments.length?(t=typeof b=="function"?b:La(!!b),f):t},f.container=function(b){return arguments.length?(e=typeof b=="function"?b:La(b),f):e},f.subject=function(b){return arguments.length?(n=typeof b=="function"?b:La(b),f):n},f.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:La(!!b),f):r},f.on=function(){var b=o.on.apply(o,arguments);return b===o?f:b},f.clickDistance=function(b){return arguments.length?(h=(b=+b)*b,f):Math.sqrt(h)},f}function Mr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ni(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function fn(){}var Gn=.7,Tr=1/Gn,Pr="\\s*([+-]?\\d+)\\s*",Fi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ke="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",a8=/^#([0-9a-f]{3,8})$/,s8=new RegExp(`^rgb\\(${Pr},${Pr},${Pr}\\)$`),u8=new RegExp(`^rgb\\(${ke},${ke},${ke}\\)$`),c8=new RegExp(`^rgba\\(${Pr},${Pr},${Pr},${Fi}\\)$`),l8=new RegExp(`^rgba\\(${ke},${ke},${ke},${Fi}\\)$`),f8=new RegExp(`^hsl\\(${Fi},${ke},${ke}\\)$`),h8=new RegExp(`^hsla\\(${Fi},${ke},${ke},${Fi}\\)$`),qp={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};Mr(fn,hn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Xp,formatHex:Xp,formatHex8:d8,formatHsl:p8,formatRgb:jp,toString:jp});function Xp(){return this.rgb().formatHex()}function d8(){return this.rgb().formatHex8()}function p8(){return Jp(this).formatHsl()}function jp(){return this.rgb().formatRgb()}function hn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=a8.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Vp(e):n===3?new Et(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Ea(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Ea(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=s8.exec(t))?new Et(e[1],e[2],e[3],1):(e=u8.exec(t))?new Et(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=c8.exec(t))?Ea(e[1],e[2],e[3],e[4]):(e=l8.exec(t))?Ea(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=f8.exec(t))?Qp(e[1],e[2]/100,e[3]/100,1):(e=h8.exec(t))?Qp(e[1],e[2]/100,e[3]/100,e[4]):qp.hasOwnProperty(t)?Vp(qp[t]):t==="transparent"?new Et(NaN,NaN,NaN,0):null}function Vp(t){return new Et(t>>16&255,t>>8&255,t&255,1)}function Ea(t,e,n,r){return r<=0&&(t=e=n=NaN),new Et(t,e,n,r)}function Bc(t){return t instanceof fn||(t=hn(t)),t?(t=t.rgb(),new Et(t.r,t.g,t.b,t.opacity)):new Et}function Dr(t,e,n,r){return arguments.length===1?Bc(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}Mr(Et,Dr,Ni(fn,{brighter(t){return t=t==null?Tr:Math.pow(Tr,t),new Et(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Gn:Math.pow(Gn,t),new Et(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Et(zn(this.r),zn(this.g),zn(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:Zp,formatHex:Zp,formatHex8:g8,formatRgb:Kp,toString:Kp}));function Zp(){return`#${On(this.r)}${On(this.g)}${On(this.b)}`}function g8(){return`#${On(this.r)}${On(this.g)}${On(this.b)}${On((isNaN(this.opacity)?1:this.opacity)*255)}`}function Kp(){const t=ka(this.opacity);return`${t===1?"rgb(":"rgba("}${zn(this.r)}, ${zn(this.g)}, ${zn(this.b)}${t===1?")":`, ${t})`}`}function ka(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function zn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function On(t){return t=zn(t),(t<16?"0":"")+t.toString(16)}function Qp(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Se(t,e,n,r)}function Jp(t){if(t instanceof Se)return new Se(t.h,t.s,t.l,t.opacity);if(t instanceof fn||(t=hn(t)),!t)return new Se;if(t instanceof Se)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Se(a,s,u,t.opacity)}function Ca(t,e,n,r){return arguments.length===1?Jp(t):new Se(t,e,n,r??1)}function Se(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Mr(Se,Ca,Ni(fn,{brighter(t){return t=t==null?Tr:Math.pow(Tr,t),new Se(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Gn:Math.pow(Gn,t),new Se(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Et(Yc(t>=240?t-240:t+120,i,r),Yc(t,i,r),Yc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Se(tg(this.h),Ra(this.s),Ra(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("}${tg(this.h)}, ${Ra(this.s)*100}%, ${Ra(this.l)*100}%${t===1?")":`, ${t})`}`}}));function tg(t){return t=(t||0)%360,t<0?t+360:t}function Ra(t){return Math.max(0,Math.min(1,t||0))}function Yc(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const eg=Math.PI/180,ng=180/Math.PI,Ia=18,rg=.96422,ig=1,og=.82521,ag=4/29,Lr=6/29,sg=3*Lr*Lr,m8=Lr*Lr*Lr;function ug(t){if(t instanceof Ae)return new Ae(t.l,t.a,t.b,t.opacity);if(t instanceof Ce)return lg(t);t instanceof Et||(t=Bc(t));var e=Xc(t.r),n=Xc(t.g),r=Xc(t.b),i=Wc((.2225045*e+.7168786*n+.0606169*r)/ig),o,a;return e===n&&n===r?o=a=i:(o=Wc((.4360747*e+.3850649*n+.1430804*r)/rg),a=Wc((.0139322*e+.0971045*n+.7141733*r)/og)),new Ae(116*i-16,500*(o-i),200*(i-a),t.opacity)}function y8(t,e){return new Ae(t,0,0,e??1)}function Na(t,e,n,r){return arguments.length===1?ug(t):new Ae(t,e,n,r??1)}function Ae(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Mr(Ae,Na,Ni(fn,{brighter(t){return new Ae(this.l+Ia*(t??1),this.a,this.b,this.opacity)},darker(t){return new Ae(this.l-Ia*(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=rg*Hc(e),t=ig*Hc(t),n=og*Hc(n),new Et(qc(3.1338561*e-1.6168667*t-.4906146*n),qc(-.9787684*e+1.9161415*t+.033454*n),qc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Wc(t){return t>m8?Math.pow(t,1/3):t/sg+ag}function Hc(t){return t>Lr?t*t*t:sg*(t-ag)}function qc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Xc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function cg(t){if(t instanceof Ce)return new Ce(t.h,t.c,t.l,t.opacity);if(t instanceof Ae||(t=ug(t)),t.a===0&&t.b===0)return new Ce(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*ng;return new Ce(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function b8(t,e,n,r){return arguments.length===1?cg(t):new Ce(n,e,t,r??1)}function Fa(t,e,n,r){return arguments.length===1?cg(t):new Ce(t,e,n,r??1)}function Ce(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function lg(t){if(isNaN(t.h))return new Ae(t.l,0,0,t.opacity);var e=t.h*eg;return new Ae(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Mr(Ce,Fa,Ni(fn,{brighter(t){return new Ce(this.h,this.c,this.l+Ia*(t??1),this.opacity)},darker(t){return new Ce(this.h,this.c,this.l-Ia*(t??1),this.opacity)},rgb(){return lg(this).rgb()}}));var fg=-.14861,jc=1.78277,Vc=-.29227,Ga=-.90649,Gi=1.97294,hg=Gi*Ga,dg=Gi*jc,pg=jc*Vc-Ga*fg;function v8(t){if(t instanceof Un)return new Un(t.h,t.s,t.l,t.opacity);t instanceof Et||(t=Bc(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(pg*r+hg*e-dg*n)/(pg+hg-dg),o=r-i,a=(Gi*(n-i)-Vc*o)/Ga,s=Math.sqrt(a*a+o*o)/(Gi*i*(1-i)),u=s?Math.atan2(a,o)*ng-120:NaN;return new Un(u<0?u+360:u,s,i,t.opacity)}function Me(t,e,n,r){return arguments.length===1?v8(t):new Un(t,e,n,r??1)}function Un(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Mr(Un,Me,Ni(fn,{brighter(t){return t=t==null?Tr:Math.pow(Tr,t),new Un(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Gn:Math.pow(Gn,t),new Un(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*eg,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*(fg*r+jc*i)),255*(e+n*(Vc*r+Ga*i)),255*(e+n*(Gi*r)),this.opacity)}}));function gg(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 mg(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 gg((n-r/e)*e,a,i,o,s)}}function yg(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 gg((n-r/e)*e,i,o,a,s)}}const za=t=>()=>t;function bg(t,e){return function(n){return t+n*e}}function x8(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Oa(t,e){var n=e-t;return n?bg(t,n>180||n<-180?n-360*Math.round(n/360):n):za(isNaN(t)?e:t)}function _8(t){return(t=+t)==1?kt:function(e,n){return n-e?x8(e,n,t):za(isNaN(e)?n:e)}}function kt(t,e){var n=e-t;return n?bg(t,n):za(isNaN(t)?e:t)}const zi=function t(e){var n=_8(e);function r(i,o){var a=n((i=Dr(i)).r,(o=Dr(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=kt(i.opacity,o.opacity);return function(l){return i.r=a(l),i.g=s(l),i.b=u(l),i.opacity=c(l),i+""}}return r.gamma=t,r}(1);function vg(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=Dr(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 xg=vg(mg),w8=vg(yg);function Zc(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function _g(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function $8(t,e){return(_g(e)?Zc:wg)(t,e)}function wg(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=dn(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function $g(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function he(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Sg(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=dn(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Kc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qc=new RegExp(Kc.source,"g");function S8(t){return function(){return t}}function A8(t){return function(e){return t(e)+""}}function Jc(t,e){var n=Kc.lastIndex=Qc.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=Kc.exec(t))&&(i=Qc.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:he(r,i)})),n=Qc.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?A8(u[0].x):S8(e):(e=u.length,function(c){for(var l=0,h;l<e;++l)s[(h=u[l]).i]=h.x(c);return s.join("")})}function dn(t,e){var n=typeof e,r;return e==null||n==="boolean"?za(e):(n==="number"?he:n==="string"?(r=hn(e))?(e=r,zi):Jc:e instanceof hn?zi:e instanceof Date?$g:_g(e)?Zc:Array.isArray(e)?wg:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Sg:he)(t,e)}function M8(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function T8(t,e){var n=Oa(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Ua(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Ag=180/Math.PI,tl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Mg(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)*Ag,skewX:Math.atan(u)*Ag,scaleX:a,scaleY:s}}var Ba;function P8(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?tl:Mg(e.a,e.b,e.c,e.d,e.e,e.f)}function D8(t){return t==null||(Ba||(Ba=document.createElementNS("http://www.w3.org/2000/svg","g")),Ba.setAttribute("transform",t),!(t=Ba.transform.baseVal.consolidate()))?tl:(t=t.matrix,Mg(t.a,t.b,t.c,t.d,t.e,t.f))}function Tg(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push("translate(",null,e,null,n);p.push({i:g-4,x:he(c,h)},{i:g-2,x:he(l,f)})}else(h||f)&&d.push("translate("+h+e+f+n)}function a(c,l,h,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:he(c,l)})):l&&h.push(i(h)+"rotate("+l+r)}function s(c,l,h,f){c!==l?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:he(c,l)}):l&&h.push(i(h)+"skewX("+l+r)}function u(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push(i(d)+"scale(",null,",",null,")");p.push({i:g-4,x:he(c,h)},{i:g-2,x:he(l,f)})}else(h!==1||f!==1)&&d.push(i(d)+"scale("+h+","+f+")")}return function(c,l){var h=[],f=[];return c=t(c),l=t(l),o(c.translateX,c.translateY,l.translateX,l.translateY,h,f),a(c.rotate,l.rotate,h,f),s(c.skewX,l.skewX,h,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,h,f),c=l=null,function(d){for(var p=-1,g=f.length,m;++p<g;)h[(m=f[p]).i]=m.x(d);return h.join("")}}}var Pg=Tg(P8,"px, ","px)","deg)"),Dg=Tg(D8,", ",")",")"),L8=1e-12;function Lg(t){return((t=Math.exp(t))+1/t)/2}function E8(t){return((t=Math.exp(t))-1/t)/2}function k8(t){return((t=Math.exp(2*t))-1)/(t+1)}const Eg=function t(e,n,r){function i(o,a){var s=o[0],u=o[1],c=o[2],l=a[0],h=a[1],f=a[2],d=l-s,p=h-u,g=d*d+p*p,m,y;if(g<L8)y=Math.log(f/c)/e,m=function(S){return[s+S*d,u+S*p,c*Math.exp(e*S*y)]};else{var x=Math.sqrt(g),v=(f*f-c*c+r*g)/(2*c*n*x),b=(f*f-c*c-r*g)/(2*f*n*x),$=Math.log(Math.sqrt(v*v+1)-v),w=Math.log(Math.sqrt(b*b+1)-b);y=(w-$)/e,m=function(S){var _=S*y,P=Lg($),D=c/(n*x)*(P*k8(e*_+$)-E8($));return[s+D*d,u+D*p,c*P/Lg(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 kg(t){return function(e,n){var r=t((e=Ca(e)).h,(n=Ca(n)).h),i=kt(e.s,n.s),o=kt(e.l,n.l),a=kt(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 C8=kg(Oa);var R8=kg(kt);function I8(t,e){var n=kt((t=Na(t)).l,(e=Na(e)).l),r=kt(t.a,e.a),i=kt(t.b,e.b),o=kt(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 Cg(t){return function(e,n){var r=t((e=Fa(e)).h,(n=Fa(n)).h),i=kt(e.c,n.c),o=kt(e.l,n.l),a=kt(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 N8=Cg(Oa);var F8=Cg(kt);function Rg(t){return function e(n){n=+n;function r(i,o){var a=t((i=Me(i)).h,(o=Me(o)).h),s=kt(i.s,o.s),u=kt(i.l,o.l),c=kt(i.opacity,o.opacity);return function(l){return i.h=a(l),i.s=s(l),i.l=u(Math.pow(l,n)),i.opacity=c(l),i+""}}return r.gamma=e,r}(1)}const G8=Rg(Oa);var Ya=Rg(kt);function Ig(t,e){e===void 0&&(e=t,t=dn);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function z8(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Er=0,Oi=0,Ui=0,Ng=1e3,Wa,Bi,Ha=0,Bn=0,qa=0,Yi=typeof performance=="object"&&performance.now?performance:Date,Fg=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Wi(){return Bn||(Fg(O8),Bn=Yi.now()+qa)}function O8(){Bn=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?Wi():+n)+(e==null?0:+e),!this._next&&Bi!==this&&(Bi?Bi._next=this:Wa=this,Bi=this),this._call=t,this._time=n,el()},stop:function(){this._call&&(this._call=null,this._time=1/0,el())}};function Xa(t,e,n){var r=new Hi;return r.restart(t,e,n),r}function Gg(){Wi(),++Er;for(var t=Wa,e;t;)(e=Bn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Er}function zg(){Bn=(Ha=Yi.now())+qa,Er=Oi=0;try{Gg()}finally{Er=0,B8(),Bn=0}}function U8(){var t=Yi.now(),e=t-Ha;e>Ng&&(qa-=e,Ha=t)}function B8(){for(var t,e=Wa,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Wa=n);Bi=t,el(r)}function el(t){if(!Er){Oi&&(Oi=clearTimeout(Oi));var e=t-Bn;e>24?(t<1/0&&(Oi=setTimeout(zg,t-Yi.now()-qa)),Ui&&(Ui=clearInterval(Ui))):(Ui||(Ha=Yi.now(),Ui=setInterval(U8,Ng)),Er=1,Fg(zg))}}function nl(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 Y8(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?Wi():+s,r._restart(function u(c){c+=i,r._restart(u,i+=a,s),o(c)},a,s)},r.restart(t,e,n),r)}var W8=In("start","end","cancel","interrupt"),H8=[],Og=0,rl=1,il=2,ja=3,Ug=4,ol=5,Va=6;function Za(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;q8(t,n,{name:e,index:r,group:i,on:W8,tween:H8,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Og})}function al(t,e){var n=Te(t,e);if(n.state>Og)throw new Error("too late; already scheduled");return n}function Re(t,e){var n=Te(t,e);if(n.state>ja)throw new Error("too late; already running");return n}function Te(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function q8(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Xa(o,0,n.time);function o(c){n.state=rl,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,h,f,d;if(n.state!==rl)return u();for(l in r)if(d=r[l],d.name===n.name){if(d.state===ja)return nl(a);d.state===Ug?(d.state=Va,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=Va,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(nl(function(){n.state===ja&&(n.state=Ug,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=il,n.on.call("start",t,t.__data__,n.index,n.group),n.state===il){for(n.state=ja,i=new Array(f=n.tween.length),l=0,h=-1;l<f;++l)(d=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=d);i.length=h+1}}function s(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=ol,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===ol&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=Va,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function Yn(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>il&&r.state<ol,r.state=Va,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function X8(t){return this.each(function(){Yn(this,t)})}function j8(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 V8(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,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function Z8(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Te(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?j8:V8)(n,t,e))}function sl(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 Te(i,r).value[e]}}function Bg(t,e){var n;return(typeof e=="number"?he:e instanceof hn?zi:(n=hn(e))?(e=n,zi):Jc)(t,e)}function K8(t){return function(){this.removeAttribute(t)}}function Q8(t){return function(){this.removeAttributeNS(t.space,t.local)}}function J8(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 t4(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 e4(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 n4(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 r4(t,e){var n=Ri(t),r=n==="transform"?Dg:Bg;return this.attrTween(t,typeof e=="function"?(n.local?n4:e4)(n,r,sl(this,"attr."+t,e)):e==null?(n.local?Q8:K8)(n):(n.local?t4:J8)(n,r,e))}function i4(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function o4(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function a4(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&o4(t,o)),n}return i._value=e,i}function s4(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&i4(t,o)),n}return i._value=e,i}function u4(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?a4:s4)(r,e))}function c4(t,e){return function(){al(this,t).delay=+e.apply(this,arguments)}}function l4(t,e){return e=+e,function(){al(this,t).delay=e}}function f4(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?c4:l4)(e,t)):Te(this.node(),e).delay}function h4(t,e){return function(){Re(this,t).duration=+e.apply(this,arguments)}}function d4(t,e){return e=+e,function(){Re(this,t).duration=e}}function p4(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?h4:d4)(e,t)):Te(this.node(),e).duration}function g4(t,e){if(typeof e!="function")throw new Error;return function(){Re(this,t).ease=e}}function m4(t){var e=this._id;return arguments.length?this.each(g4(e,t)):Te(this.node(),e).ease}function y4(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Re(this,t).ease=n}}function b4(t){if(typeof t!="function")throw new Error;return this.each(y4(this._id,t))}function v4(t){typeof t!="function"&&(t=Ic(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new Ie(r,this._parents,this._name,this._id)}function x4(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=e[s],c=n[s],l=u.length,h=a[s]=new Array(l),f,d=0;d<l;++d)(f=u[d]||c[d])&&(h[d]=f);for(;s<r;++s)a[s]=e[s];return new Ie(a,this._parents,this._name,this._id)}function _4(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 w4(t,e,n){var r,i,o=_4(e)?al:Re;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function $4(t,e){var n=this._id;return arguments.length<2?Te(this.node(),n).on.on(t):this.each(w4(n,t,e))}function S4(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function A4(){return this.on("end.remove",S4(this._id))}function M4(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ma(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,c=o[a]=new Array(u),l,h,f=0;f<u;++f)(l=s[f])&&(h=t.call(l,l.__data__,f,s))&&("__data__"in l&&(h.__data__=l.__data__),c[f]=h,Za(c[f],e,n,f,c,Te(l,n)));return new Ie(o,this._parents,e,n)}function T4(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Rc(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],c=u.length,l,h=0;h<c;++h)if(l=u[h]){for(var f=t.call(l,l.__data__,h,u),d,p=Te(l,n),g=0,m=f.length;g<m;++g)(d=f[g])&&Za(d,e,n,g,f,p);o.push(f),a.push(l)}return new Ie(o,a,e,n)}var P4=Fn.prototype.constructor;function D4(){return new P4(this._groups,this._parents)}function L4(t,e){var n,r,i;return function(){var o=Nn(this,t),a=(this.style.removeProperty(t),Nn(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function Yg(t){return function(){this.style.removeProperty(t)}}function E4(t,e,n){var r,i=n+"",o;return function(){var a=Nn(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function k4(t,e,n){var r,i,o;return function(){var a=Nn(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),Nn(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function C4(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Re(this,t),c=u.on,l=u.value[o]==null?s||(s=Yg(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function R4(t,e,n){var r=(t+="")=="transform"?Pg:Bg;return e==null?this.styleTween(t,L4(t,r)).on("end.style."+t,Yg(t)):typeof e=="function"?this.styleTween(t,k4(t,r,sl(this,"style."+t,e))).each(C4(this._id,t)):this.styleTween(t,E4(t,r,e),n).on("end.style."+t,null)}function I4(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function N4(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&I4(t,a,n)),r}return o._value=e,o}function F4(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,N4(t,e,n??""))}function G4(t){return function(){this.textContent=t}}function z4(t){return function(){var e=t(this);this.textContent=e??""}}function O4(t){return this.tween("text",typeof t=="function"?z4(sl(this,"text",t)):G4(t==null?"":t+""))}function U4(t){return function(e){this.textContent=t.call(this,e)}}function B4(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&U4(i)),e}return r._value=t,r}function Y4(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,B4(t))}function W4(){for(var t=this._name,e=this._id,n=Hg(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var l=Te(u,e);Za(u,t,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Ie(r,this._parents,t,n)}function H4(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var c=Re(this,r),l=c.on;l!==t&&(e=(t=l).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),c.on=e}),i===0&&o()})}var q4=0;function Ie(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Wg(t){return Fn().transition(t)}function Hg(){return++q4}var je=Fn.prototype;Ie.prototype=Wg.prototype={constructor:Ie,select:M4,selectAll:T4,selectChild:je.selectChild,selectChildren:je.selectChildren,filter:v4,merge:x4,selection:D4,transition:W4,call:je.call,nodes:je.nodes,node:je.node,size:je.size,empty:je.empty,each:je.each,on:$4,attr:r4,attrTween:u4,style:R4,styleTween:F4,text:O4,textTween:Y4,remove:A4,tween:Z8,delay:f4,duration:p4,ease:m4,easeVarying:b4,end:H4,[Symbol.iterator]:je[Symbol.iterator]};const X4=t=>+t;function j4(t){return t*t}function V4(t){return t*(2-t)}function qg(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function Z4(t){return t*t*t}function K4(t){return--t*t*t+1}function qi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var ul=3,Q4=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(ul),J4=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(ul),Xg=function t(e){e=+e;function n(r){return((r*=2)<=1?Math.pow(r,e):2-Math.pow(2-r,e))/2}return n.exponent=t,n}(ul),jg=Math.PI,Vg=jg/2;function tM(t){return+t==1?1:1-Math.cos(t*Vg)}function eM(t){return Math.sin(t*Vg)}function Zg(t){return(1-Math.cos(jg*t))/2}function pn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function nM(t){return pn(1-+t)}function rM(t){return 1-pn(t)}function Kg(t){return((t*=2)<=1?pn(1-t):2-pn(t-1))/2}function iM(t){return 1-Math.sqrt(1-t*t)}function oM(t){return Math.sqrt(1- --t*t)}function Qg(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var cl=4/11,aM=6/11,sM=8/11,uM=3/4,cM=9/11,lM=10/11,fM=15/16,hM=21/22,dM=63/64,Ka=1/cl/cl;function pM(t){return 1-Xi(1-t)}function Xi(t){return(t=+t)<cl?Ka*t*t:t<sM?Ka*(t-=aM)*t+uM:t<lM?Ka*(t-=cM)*t+fM:Ka*(t-=hM)*t+dM}function gM(t){return((t*=2)<=1?1-Xi(1-t):Xi(t-1)+1)/2}var ll=1.70158,mM=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(ll),yM=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(ll),Jg=function t(e){e=+e;function n(r){return((r*=2)<1?r*r*((e+1)*r-e):(r-=2)*r*((e+1)*r+e)+2)/2}return n.overshoot=t,n}(ll),kr=2*Math.PI,fl=1,hl=.3,bM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=kr);function i(o){return e*pn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*kr)},i.period=function(o){return t(e,o)},i}(fl,hl),Qa=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=kr);function i(o){return 1-e*pn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*kr)},i.period=function(o){return t(e,o)},i}(fl,hl),vM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=kr);function i(o){return((o=o*2-1)<0?e*pn(-o)*Math.sin((r-o)/n):2-e*pn(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return t(o,n*kr)},i.period=function(o){return t(e,o)},i}(fl,hl),xM={time:null,delay:0,duration:250,ease:qi};function _M(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 wM(t){var e,n;t instanceof Ie?(e=t._id,t=t._name):(e=Hg(),(n=xM).time=Wi(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&Za(u,t,e,c,a,n||_M(u,e));return new Ie(r,this._parents,t,e)}Fn.prototype.interrupt=X8,Fn.prototype.transition=wM;var $M=[null];function SM(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>rl&&r.name===e)return new Ie([[t]],$M,e,+i)}return null}const dl=t=>()=>t;function AM(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 MM(t){t.stopImmediatePropagation()}function pl(t){t.preventDefault(),t.stopImmediatePropagation()}var t1={name:"drag"},gl={name:"space"},Cr={name:"handle"},Rr={name:"center"};const{abs:e1,max:Gt,min:zt}=Math;function n1(t){return[+t[0],+t[1]]}function ml(t){return[n1(t[0]),n1(t[1])]}var Ja={name:"x",handles:["w","e"].map(ji),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},ts={name:"y",handles:["n","s"].map(ji),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]]}},TM={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(ji),input:function(t){return t==null?null:ml(t)},output:function(t){return t}},Ve={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},r1={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},i1={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},PM={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},DM={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function ji(t){return{type:t}}function LM(t){return!t.ctrlKey&&!t.button}function EM(){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 kM(){return navigator.maxTouchPoints||"ontouchstart"in this}function yl(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function CM(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function RM(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function IM(){return bl(Ja)}function NM(){return bl(ts)}function FM(){return bl(TM)}function bl(t){var e=EM,n=LM,r=kM,i=!0,o=In("start","brush","end"),a=6,s;function u(m){var y=m.property("__brush",g).selectAll(".overlay").data([ji("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ve.overlay).merge(y).each(function(){var v=yl(this).extent;K(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([ji("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Ve.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var x=m.selectAll(".handle").data(t.handles,function(v){return v.type});x.exit().remove(),x.enter().append("rect").attr("class",function(v){return"handle handle--"+v.type}).attr("cursor",function(v){return Ve[v.type]}),m.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(r).on("touchstart.brush",f).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}u.move=function(m,y,x){m.tween?m.on("start.brush",function(v){l(this,arguments).beforestart().start(v)}).on("interrupt.brush end.brush",function(v){l(this,arguments).end(v)}).tween("brush",function(){var v=this,b=v.__brush,$=l(v,arguments),w=b.selection,S=t.input(typeof y=="function"?y.apply(this,arguments):y,b.extent),_=dn(w,S);function P(D){b.selection=D===1&&S===null?null:_(D),c.call(v),$.brush()}return w!==null&&S!==null?P:P(1)}):m.each(function(){var v=this,b=arguments,$=v.__brush,w=t.input(typeof y=="function"?y.apply(v,b):y,$.extent),S=l(v,b).beforestart();Yn(v),$.selection=w===null?null:w,c.call(v),S.start(x).brush(x).end(x)})},u.clear=function(m,y){u.move(m,null,y)};function c(){var m=K(this),y=yl(this).selection;y?(m.selectAll(".selection").style("display",null).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(x){return x.type[x.type.length-1]==="e"?y[1][0]-a/2:y[0][0]-a/2}).attr("y",function(x){return x.type[0]==="s"?y[1][1]-a/2:y[0][1]-a/2}).attr("width",function(x){return x.type==="n"||x.type==="s"?y[1][0]-y[0][0]+a:a}).attr("height",function(x){return x.type==="e"||x.type==="w"?y[1][1]-y[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(m,y,x){var v=m.__brush.emitter;return v&&(!x||!v.clean)?v:new h(m,y,x)}function h(m,y,x){this.that=m,this.args=y,this.state=m.__brush,this.active=0,this.clean=x}h.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,y){return this.starting?(this.starting=!1,this.emit("start",m,y)):this.emit("brush",m),this},brush:function(m,y){return this.emit("brush",m,y),this},end:function(m,y){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,y)),this},emit:function(m,y,x){var v=K(this.that).datum();o.call(m,this.that,new AM(m,{sourceEvent:y,target:u,selection:t.output(this.state.selection),mode:x,dispatch:o}),v)}};function f(m){if(s&&!m.touches||!n.apply(this,arguments))return;var y=this,x=m.target.__data__.type,v=(i&&m.metaKey?x="overlay":x)==="selection"?t1:i&&m.altKey?Rr:Cr,b=t===ts?null:PM[x],$=t===Ja?null:DM[x],w=yl(y),S=w.extent,_=w.selection,P=S[0][0],D,A,I=S[0][1],M,T,E=S[1][0],L,N,O=S[1][1],k,R,G=0,C=0,z,X=b&&$&&i&&m.shiftKey,H,j,J=Array.from(m.touches||[m],it=>{const Mt=it.identifier;return it=ae(it,y),it.point0=it.slice(),it.identifier=Mt,it});Yn(y);var dt=l(y,arguments,!0).beforestart();if(x==="overlay"){_&&(z=!0);const it=[J[0],J[1]||J[0]];w.selection=_=[[D=t===ts?P:zt(it[0][0],it[1][0]),M=t===Ja?I:zt(it[0][1],it[1][1])],[L=t===ts?E:Gt(it[0][0],it[1][0]),k=t===Ja?O:Gt(it[0][1],it[1][1])]],J.length>1&&xt(m)}else D=_[0][0],M=_[0][1],L=_[1][0],k=_[1][1];A=D,T=M,N=L,R=k;var q=K(y).attr("pointer-events","none"),nt=q.selectAll(".overlay").attr("cursor",Ve[x]);if(m.touches)dt.moved=Y,dt.ended=gt;else{var st=K(m.view).on("mousemove.brush",Y,!0).on("mouseup.brush",gt,!0);i&&st.on("keydown.brush",Ft,!0).on("keyup.brush",te,!0),Pa(m.view)}c.call(y),dt.start(m,v.name);function Y(it){for(const Mt of it.changedTouches||[it])for(const Io of J)Io.identifier===Mt.identifier&&(Io.cur=ae(Mt,y));if(X&&!H&&!j&&J.length===1){const Mt=J[0];e1(Mt.cur[0]-Mt[0])>e1(Mt.cur[1]-Mt[1])?j=!0:H=!0}for(const Mt of J)Mt.cur&&(Mt[0]=Mt.cur[0],Mt[1]=Mt.cur[1]);z=!0,pl(it),xt(it)}function xt(it){const Mt=J[0],Io=Mt.point0;var Sn;switch(G=Mt[0]-Io[0],C=Mt[1]-Io[1],v){case gl:case t1:{b&&(G=Gt(P-D,zt(E-L,G)),A=D+G,N=L+G),$&&(C=Gt(I-M,zt(O-k,C)),T=M+C,R=k+C);break}case Cr:{J[1]?(b&&(A=Gt(P,zt(E,J[0][0])),N=Gt(P,zt(E,J[1][0])),b=1),$&&(T=Gt(I,zt(O,J[0][1])),R=Gt(I,zt(O,J[1][1])),$=1)):(b<0?(G=Gt(P-D,zt(E-D,G)),A=D+G,N=L):b>0&&(G=Gt(P-L,zt(E-L,G)),A=D,N=L+G),$<0?(C=Gt(I-M,zt(O-M,C)),T=M+C,R=k):$>0&&(C=Gt(I-k,zt(O-k,C)),T=M,R=k+C));break}case Rr:{b&&(A=Gt(P,zt(E,D-G*b)),N=Gt(P,zt(E,L+G*b))),$&&(T=Gt(I,zt(O,M-C*$)),R=Gt(I,zt(O,k+C*$)));break}}N<A&&(b*=-1,Sn=D,D=L,L=Sn,Sn=A,A=N,N=Sn,x in r1&&nt.attr("cursor",Ve[x=r1[x]])),R<T&&($*=-1,Sn=M,M=k,k=Sn,Sn=T,T=R,R=Sn,x in i1&&nt.attr("cursor",Ve[x=i1[x]])),w.selection&&(_=w.selection),H&&(A=_[0][0],N=_[1][0]),j&&(T=_[0][1],R=_[1][1]),(_[0][0]!==A||_[0][1]!==T||_[1][0]!==N||_[1][1]!==R)&&(w.selection=[[A,T],[N,R]],c.call(y),dt.brush(it,v.name))}function gt(it){if(MM(it),it.touches){if(it.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Da(it.view,z),st.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);q.attr("pointer-events","all"),nt.attr("cursor",Ve.overlay),w.selection&&(_=w.selection),CM(_)&&(w.selection=null,c.call(y)),dt.end(it,v.name)}function Ft(it){switch(it.keyCode){case 16:{X=b&&$;break}case 18:{v===Cr&&(b&&(L=N-G*b,D=A+G*b),$&&(k=R-C*$,M=T+C*$),v=Rr,xt(it));break}case 32:{(v===Cr||v===Rr)&&(b<0?L=N-G:b>0&&(D=A-G),$<0?k=R-C:$>0&&(M=T-C),v=gl,nt.attr("cursor",Ve.selection),xt(it));break}default:return}pl(it)}function te(it){switch(it.keyCode){case 16:{X&&(H=j=X=!1,xt(it));break}case 18:{v===Rr&&(b<0?L=N:b>0&&(D=A),$<0?k=R:$>0&&(M=T),v=Cr,xt(it));break}case 32:{v===gl&&(it.altKey?(b&&(L=N-G*b,D=A+G*b),$&&(k=R-C*$,M=T+C*$),v=Rr):(b<0?L=N:b>0&&(D=A),$<0?k=R:$>0&&(M=T),v=Cr),nt.attr("cursor",Ve[x]),xt(it));break}default:return}pl(it)}}function d(m){l(this,arguments).moved(m)}function p(m){l(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=ml(e.apply(this,arguments)),m.dim=t,m}return u.extent=function(m){return arguments.length?(e=typeof m=="function"?m:dl(ml(m)),u):e},u.filter=function(m){return arguments.length?(n=typeof m=="function"?m:dl(!!m),u):n},u.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:dl(!!m),u):r},u.handleSize=function(m){return arguments.length?(a=+m,u):a},u.keyModifiers=function(m){return arguments.length?(i=!!m,u):i},u.on=function(){var m=o.on.apply(o,arguments);return m===o?u:m},u}var o1=Math.abs,Ir=Math.cos,Nr=Math.sin,a1=Math.PI,es=a1/2,s1=a1*2,u1=Math.max,vl=1e-12;function xl(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function GM(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function zM(){return _l(!1,!1)}function OM(){return _l(!1,!0)}function UM(){return _l(!0,!1)}function _l(t,e){var n=0,r=null,i=null,o=null;function a(s){var u=s.length,c=new Array(u),l=xl(0,u),h=new Array(u*u),f=new Array(u),d=0,p;s=Float64Array.from({length:u*u},e?(g,m)=>s[m%u][m/u|0]:(g,m)=>s[m/u|0][m%u]);for(let g=0;g<u;++g){let m=0;for(let y=0;y<u;++y)m+=s[g*u+y]+t*s[y*u+g];d+=c[g]=m}d=u1(0,s1-n*u)/d,p=d?n:s1/u;{let g=0;r&&l.sort((m,y)=>r(c[m],c[y]));for(const m of l){const y=g;if(t){const x=xl(~u+1,u).filter(v=>v<0?s[~v*u+m]:s[m*u+v]);i&&x.sort((v,b)=>i(v<0?-s[~v*u+m]:s[m*u+v],b<0?-s[~b*u+m]:s[m*u+b]));for(const v of x)if(v<0){const b=h[~v*u+m]||(h[~v*u+m]={source:null,target:null});b.target={index:m,startAngle:g,endAngle:g+=s[~v*u+m]*d,value:s[~v*u+m]}}else{const b=h[m*u+v]||(h[m*u+v]={source:null,target:null});b.source={index:m,startAngle:g,endAngle:g+=s[m*u+v]*d,value:s[m*u+v]}}f[m]={index:m,startAngle:y,endAngle:g,value:c[m]}}else{const x=xl(0,u).filter(v=>s[m*u+v]||s[v*u+m]);i&&x.sort((v,b)=>i(s[m*u+v],s[m*u+b]));for(const v of x){let b;if(m<v?(b=h[m*u+v]||(h[m*u+v]={source:null,target:null}),b.source={index:m,startAngle:g,endAngle:g+=s[m*u+v]*d,value:s[m*u+v]}):(b=h[v*u+m]||(h[v*u+m]={source:null,target:null}),b.target={index:m,startAngle:g,endAngle:g+=s[m*u+v]*d,value:s[m*u+v]},m===v&&(b.source=b.target)),b.source&&b.target&&b.source.value<b.target.value){const $=b.source;b.source=b.target,b.target=$}}f[m]={index:m,startAngle:y,endAngle:g,value:c[m]}}g+=p}}return h=Object.values(h),h.groups=f,o?h.sort(o):h}return a.padAngle=function(s){return arguments.length?(n=u1(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=GM(s))._=s,a):o&&o._},a}const wl=Math.PI,$l=2*wl,Wn=1e-6,BM=$l-Wn;function c1(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function YM(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return c1;const n=10**e;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let Vi=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?c1:YM(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,a){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,u=r-e,c=i-n,l=a-e,h=s-n,f=l*l+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>Wn)if(!(Math.abs(h*u-c*l)>Wn)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let d=r-a,p=i-s,g=u*u+c*c,m=d*d+p*p,y=Math.sqrt(g),x=Math.sqrt(f),v=o*Math.tan((wl-Math.acos((g+f-m)/(2*y*x)))/2),b=v/x,$=v/y;Math.abs(b-1)>Wn&&this._append`L${e+b*l},${n+b*h}`,this._append`A${o},${o},0,0,${+(h*d>l*p)},${this._x1=e+$*u},${this._y1=n+$*c}`}}arc(e,n,r,i,o,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),u=r*Math.sin(i),c=e+s,l=n+u,h=1^a,f=a?i-o:o-i;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Wn||Math.abs(this._y1-l)>Wn)&&this._append`L${c},${l}`,r&&(f<0&&(f=f%$l+$l),f>BM?this._append`A${r},${r},0,1,${h},${e-s},${n-u}A${r},${r},0,1,${h},${this._x1=c},${this._y1=l}`:f>Wn&&this._append`A${r},${r},0,${+(f>=wl)},${h},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function Sl(){return new Vi}Sl.prototype=Vi.prototype;function WM(t=3){return new Vi(+t)}var HM=Array.prototype.slice;function Hn(t){return function(){return t}}function qM(t){return t.source}function XM(t){return t.target}function l1(t){return t.radius}function jM(t){return t.startAngle}function VM(t){return t.endAngle}function ZM(){return 0}function KM(){return 10}function f1(t){var e=qM,n=XM,r=l1,i=l1,o=jM,a=VM,s=ZM,u=null;function c(){var l,h=e.apply(this,arguments),f=n.apply(this,arguments),d=s.apply(this,arguments)/2,p=HM.call(arguments),g=+r.apply(this,(p[0]=h,p)),m=o.apply(this,p)-es,y=a.apply(this,p)-es,x=+i.apply(this,(p[0]=f,p)),v=o.apply(this,p)-es,b=a.apply(this,p)-es;if(u||(u=l=Sl()),d>vl&&(o1(y-m)>d*2+vl?y>m?(m+=d,y-=d):(m-=d,y+=d):m=y=(m+y)/2,o1(b-v)>d*2+vl?b>v?(v+=d,b-=d):(v-=d,b+=d):v=b=(v+b)/2),u.moveTo(g*Ir(m),g*Nr(m)),u.arc(0,0,g,m,y),m!==v||y!==b)if(t){var $=+t.apply(this,arguments),w=x-$,S=(v+b)/2;u.quadraticCurveTo(0,0,w*Ir(v),w*Nr(v)),u.lineTo(x*Ir(S),x*Nr(S)),u.lineTo(w*Ir(b),w*Nr(b))}else u.quadraticCurveTo(0,0,x*Ir(v),x*Nr(v)),u.arc(0,0,x,v,b);if(u.quadraticCurveTo(0,0,g*Ir(m),g*Nr(m)),u.closePath(),l)return u=null,l+""||null}return t&&(c.headRadius=function(l){return arguments.length?(t=typeof l=="function"?l:Hn(+l),c):t}),c.radius=function(l){return arguments.length?(r=i=typeof l=="function"?l:Hn(+l),c):r},c.sourceRadius=function(l){return arguments.length?(r=typeof l=="function"?l:Hn(+l),c):r},c.targetRadius=function(l){return arguments.length?(i=typeof l=="function"?l:Hn(+l),c):i},c.startAngle=function(l){return arguments.length?(o=typeof l=="function"?l:Hn(+l),c):o},c.endAngle=function(l){return arguments.length?(a=typeof l=="function"?l:Hn(+l),c):a},c.padAngle=function(l){return arguments.length?(s=typeof l=="function"?l:Hn(+l),c):s},c.source=function(l){return arguments.length?(e=l,c):e},c.target=function(l){return arguments.length?(n=l,c):n},c.context=function(l){return arguments.length?(u=l??null,c):u},c}function QM(){return f1()}function JM(){return f1(KM)}var t7=Array.prototype,h1=t7.slice;function e7(t,e){return t-e}function n7(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 r7(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=i7(t,e[n]))return i;return 0}function i7(t,e){for(var n=e[0],r=e[1],i=-1,o=0,a=t.length,s=a-1;o<a;s=o++){var u=t[o],c=u[0],l=u[1],h=t[s],f=h[0],d=h[1];if(o7(u,h,e))return 0;l>r!=d>r&&n<(f-c)*(r-l)/(d-l)+c&&(i=-i)}return i}function o7(t,e,n){var r;return a7(t,e,n)&&s7(t[r=+(t[0]===e[0])],n[r],e[r])}function a7(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function s7(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function u7(){}var Ze=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function Al(){var t=1,e=1,n=Tc,r=u;function i(c){var l=n(c);if(Array.isArray(l))l=l.slice().sort(e7);else{const h=Pi(c,c7);for(l=Cn(...Mc(h[0],h[1],l),l);l[l.length-1]>=h[1];)l.pop();for(;l[1]<h[0];)l.shift()}return l.map(h=>o(c,h))}function o(c,l){const h=l==null?NaN:+l;if(isNaN(h))throw new Error(`invalid value: ${l}`);var f=[],d=[];return a(c,h,function(p){r(p,c,h),n7(p)>0?f.push([p]):d.push(p)}),d.forEach(function(p){for(var g=0,m=f.length,y;g<m;++g)if(r7((y=f[g])[0],p)!==-1){y.push(p);return}}),{type:"MultiPolygon",value:l,coordinates:f}}function a(c,l,h){var f=new Array,d=new Array,p,g,m,y,x,v;for(p=g=-1,y=qn(c[0],l),Ze[y<<1].forEach(b);++p<t-1;)m=y,y=qn(c[p+1],l),Ze[m|y<<1].forEach(b);for(Ze[y<<0].forEach(b);++g<e-1;){for(p=-1,y=qn(c[g*t+t],l),x=qn(c[g*t],l),Ze[y<<1|x<<2].forEach(b);++p<t-1;)m=y,y=qn(c[g*t+t+p+1],l),v=x,x=qn(c[g*t+p+1],l),Ze[m|y<<1|x<<2|v<<3].forEach(b);Ze[y|x<<3].forEach(b)}for(p=-1,x=c[g*t]>=l,Ze[x<<2].forEach(b);++p<t-1;)v=x,x=qn(c[g*t+p+1],l),Ze[x<<2|v<<3].forEach(b);Ze[x<<3].forEach(b);function b($){var w=[$[0][0]+p,$[0][1]+g],S=[$[1][0]+p,$[1][1]+g],_=s(w),P=s(S),D,A;(D=d[_])?(A=f[P])?(delete d[D.end],delete f[A.start],D===A?(D.ring.push(S),h(D.ring)):f[D.start]=d[A.end]={start:D.start,end:A.end,ring:D.ring.concat(A.ring)}):(delete d[D.end],D.ring.push(S),d[D.end=P]=D):(D=f[P])?(A=d[_])?(delete f[D.start],delete d[A.end],D===A?(D.ring.push(S),h(D.ring)):f[A.start]=d[D.end]={start:A.start,end:D.end,ring:A.ring.concat(D.ring)}):(delete f[D.start],D.ring.unshift(w),f[D.start=_]=D):f[_]=d[P]={start:_,end:P,ring:[w,S]}}}function s(c){return c[0]*2+c[1]*(t+1)*4}function u(c,l,h){c.forEach(function(f){var d=f[0],p=f[1],g=d|0,m=p|0,y=Ml(l[m*t+g]);d>0&&d<t&&g===d&&(f[0]=d1(d,Ml(l[m*t+g-1]),y,h)),p>0&&p<e&&m===p&&(f[1]=d1(p,Ml(l[(m-1)*t+g]),y,h))})}return i.contour=o,i.size=function(c){if(!arguments.length)return[t,e];var l=Math.floor(c[0]),h=Math.floor(c[1]);if(!(l>=0&&h>=0))throw new Error("invalid size");return t=l,e=h,i},i.thresholds=function(c){return arguments.length?(n=typeof c=="function"?c:Array.isArray(c)?gn(h1.call(c)):gn(c),i):n},i.smooth=function(c){return arguments.length?(r=c?u:u7,i):r===u},i}function c7(t){return isFinite(t)?t:NaN}function qn(t,e){return t==null?!1:+t>=e}function Ml(t){return t==null||isNaN(t=+t)?-1/0:t}function d1(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 l7(t){return t[0]}function f7(t){return t[1]}function h7(){return 1}function d7(){var t=l7,e=f7,n=h7,r=960,i=500,o=20,a=2,s=o*3,u=r+s*2>>a,c=i+s*2>>a,l=gn(20);function h(x){var v=new Float32Array(u*c),b=Math.pow(2,-a),$=-1;for(const M of x){var w=(t(M,++$,x)+s)*b,S=(e(M,$,x)+s)*b,_=+n(M,$,x);if(_&&w>=0&&w<u&&S>=0&&S<c){var P=Math.floor(w),D=Math.floor(S),A=w-P-.5,I=S-D-.5;v[P+D*u]+=(1-A)*(1-I)*_,v[P+1+D*u]+=A*(1-I)*_,v[P+1+(D+1)*u]+=A*I*_,v[P+(D+1)*u]+=(1-A)*I*_}}return up({data:v,width:u,height:c},o*b),v}function f(x){var v=h(x),b=l(v),$=Math.pow(2,2*a);return Array.isArray(b)||(b=Cn(Number.MIN_VALUE,Li(v)/$,b)),Al().size([u,c]).thresholds(b.map(w=>w*$))(v).map((w,S)=>(w.value=+b[S],d(w)))}f.contours=function(x){var v=h(x),b=Al().size([u,c]),$=Math.pow(2,2*a),w=S=>{S=+S;var _=d(b.contour(v,S*$));return _.value=S,_};return Object.defineProperty(w,"max",{get:()=>Li(v)/$}),w};function d(x){return x.coordinates.forEach(p),x}function p(x){x.forEach(g)}function g(x){x.forEach(m)}function m(x){x[0]=x[0]*Math.pow(2,a)-s,x[1]=x[1]*Math.pow(2,a)-s}function y(){return s=o*3,u=r+s*2>>a,c=i+s*2>>a,f}return f.x=function(x){return arguments.length?(t=typeof x=="function"?x:gn(+x),f):t},f.y=function(x){return arguments.length?(e=typeof x=="function"?x:gn(+x),f):e},f.weight=function(x){return arguments.length?(n=typeof x=="function"?x:gn(+x),f):n},f.size=function(x){if(!arguments.length)return[r,i];var v=+x[0],b=+x[1];if(!(v>=0&&b>=0))throw new Error("invalid size");return r=v,i=b,y()},f.cellSize=function(x){if(!arguments.length)return 1<<a;if(!((x=+x)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(x)/Math.LN2),y()},f.thresholds=function(x){return arguments.length?(l=typeof x=="function"?x:Array.isArray(x)?gn(h1.call(x)):gn(x),f):l},f.bandwidth=function(x){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((x=+x)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*x*x+1)-1)/2,y()},f}const Ke=11102230246251565e-32,Ot=134217729,p7=(3+8*Ke)*Ke;function Tl(t,e,n,r,i){let o,a,s,u,c=e[0],l=r[0],h=0,f=0;l>c==l>-c?(o=c,c=e[++h]):(o=l,l=r[++f]);let d=0;if(h<t&&f<n)for(l>c==l>-c?(a=c+o,s=o-(a-c),c=e[++h]):(a=l+o,s=o-(a-l),l=r[++f]),o=a,s!==0&&(i[d++]=s);h<t&&f<n;)l>c==l>-c?(a=o+c,u=a-o,s=o-(a-u)+(c-u),c=e[++h]):(a=o+l,u=a-o,s=o-(a-u)+(l-u),l=r[++f]),o=a,s!==0&&(i[d++]=s);for(;h<t;)a=o+c,u=a-o,s=o-(a-u)+(c-u),c=e[++h],o=a,s!==0&&(i[d++]=s);for(;f<n;)a=o+l,u=a-o,s=o-(a-u)+(l-u),l=r[++f],o=a,s!==0&&(i[d++]=s);return(o!==0||d===0)&&(i[d++]=o),d}function g7(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 m7=(3+16*Ke)*Ke,y7=(2+12*Ke)*Ke,b7=(9+64*Ke)*Ke*Ke,Fr=Zi(4),p1=Zi(8),g1=Zi(12),m1=Zi(16),Wt=Zi(4);function v7(t,e,n,r,i,o,a){let s,u,c,l,h,f,d,p,g,m,y,x,v,b,$,w,S,_;const P=t-i,D=n-i,A=e-o,I=r-o;b=P*I,f=Ot*P,d=f-(f-P),p=P-d,f=Ot*I,g=f-(f-I),m=I-g,$=p*m-(b-d*g-p*g-d*m),w=A*D,f=Ot*A,d=f-(f-A),p=A-d,f=Ot*D,g=f-(f-D),m=D-g,S=p*m-(w-d*g-p*g-d*m),y=$-S,h=$-y,Fr[0]=$-(y+h)+(h-S),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-w,h=v-y,Fr[1]=v-(y+h)+(h-w),_=x+y,h=_-x,Fr[2]=x-(_-h)+(y-h),Fr[3]=_;let M=g7(4,Fr),T=y7*a;if(M>=T||-M>=T||(h=t-P,s=t-(P+h)+(h-i),h=n-D,c=n-(D+h)+(h-i),h=e-A,u=e-(A+h)+(h-o),h=r-I,l=r-(I+h)+(h-o),s===0&&u===0&&c===0&&l===0)||(T=b7*a+p7*Math.abs(M),M+=P*l+I*s-(A*c+D*u),M>=T||-M>=T))return M;b=s*I,f=Ot*s,d=f-(f-s),p=s-d,f=Ot*I,g=f-(f-I),m=I-g,$=p*m-(b-d*g-p*g-d*m),w=u*D,f=Ot*u,d=f-(f-u),p=u-d,f=Ot*D,g=f-(f-D),m=D-g,S=p*m-(w-d*g-p*g-d*m),y=$-S,h=$-y,Wt[0]=$-(y+h)+(h-S),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-w,h=v-y,Wt[1]=v-(y+h)+(h-w),_=x+y,h=_-x,Wt[2]=x-(_-h)+(y-h),Wt[3]=_;const E=Tl(4,Fr,4,Wt,p1);b=P*l,f=Ot*P,d=f-(f-P),p=P-d,f=Ot*l,g=f-(f-l),m=l-g,$=p*m-(b-d*g-p*g-d*m),w=A*c,f=Ot*A,d=f-(f-A),p=A-d,f=Ot*c,g=f-(f-c),m=c-g,S=p*m-(w-d*g-p*g-d*m),y=$-S,h=$-y,Wt[0]=$-(y+h)+(h-S),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-w,h=v-y,Wt[1]=v-(y+h)+(h-w),_=x+y,h=_-x,Wt[2]=x-(_-h)+(y-h),Wt[3]=_;const L=Tl(E,p1,4,Wt,g1);b=s*l,f=Ot*s,d=f-(f-s),p=s-d,f=Ot*l,g=f-(f-l),m=l-g,$=p*m-(b-d*g-p*g-d*m),w=u*c,f=Ot*u,d=f-(f-u),p=u-d,f=Ot*c,g=f-(f-c),m=c-g,S=p*m-(w-d*g-p*g-d*m),y=$-S,h=$-y,Wt[0]=$-(y+h)+(h-S),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-w,h=v-y,Wt[1]=v-(y+h)+(h-w),_=x+y,h=_-x,Wt[2]=x-(_-h)+(y-h),Wt[3]=_;const N=Tl(L,g1,4,Wt,m1);return m1[N-1]}function ns(t,e,n,r,i,o){const a=(e-o)*(n-i),s=(t-i)*(r-o),u=a-s,c=Math.abs(a+s);return Math.abs(u)>=m7*c?u:-v7(t,e,n,r,i,o,c)}const y1=Math.pow(2,-52),rs=new Uint32Array(512);class is{static from(e,n=S7,r=A7){const i=e.length,o=new Float64Array(i*2);for(let a=0;a<i;a++){const s=e[a];o[2*a]=n(s),o[2*a+1]=r(s)}return new is(o)}constructor(e){const n=e.length>>1;if(n>0&&typeof e[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=e;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:e,_hullPrev:n,_hullNext:r,_hullTri:i,_hullHash:o}=this,a=e.length>>1;let s=1/0,u=1/0,c=-1/0,l=-1/0;for(let P=0;P<a;P++){const D=e[2*P],A=e[2*P+1];D<s&&(s=D),A<u&&(u=A),D>c&&(c=D),A>l&&(l=A),this._ids[P]=P}const h=(s+c)/2,f=(u+l)/2;let d,p,g;for(let P=0,D=1/0;P<a;P++){const A=Pl(h,f,e[2*P],e[2*P+1]);A<D&&(d=P,D=A)}const m=e[2*d],y=e[2*d+1];for(let P=0,D=1/0;P<a;P++){if(P===d)continue;const A=Pl(m,y,e[2*P],e[2*P+1]);A<D&&A>0&&(p=P,D=A)}let x=e[2*p],v=e[2*p+1],b=1/0;for(let P=0;P<a;P++){if(P===d||P===p)continue;const D=w7(m,y,x,v,e[2*P],e[2*P+1]);D<b&&(g=P,b=D)}let $=e[2*g],w=e[2*g+1];if(b===1/0){for(let A=0;A<a;A++)this._dists[A]=e[2*A]-e[0]||e[2*A+1]-e[1];Gr(this._ids,this._dists,0,a-1);const P=new Uint32Array(a);let D=0;for(let A=0,I=-1/0;A<a;A++){const M=this._ids[A],T=this._dists[M];T>I&&(P[D++]=M,I=T)}this.hull=P.subarray(0,D),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(ns(m,y,x,v,$,w)<0){const P=p,D=x,A=v;p=g,x=$,v=w,g=P,$=D,w=A}const S=$7(m,y,x,v,$,w);this._cx=S.x,this._cy=S.y;for(let P=0;P<a;P++)this._dists[P]=Pl(e[2*P],e[2*P+1],S.x,S.y);Gr(this._ids,this._dists,0,a-1),this._hullStart=d;let _=3;r[d]=n[g]=p,r[p]=n[d]=g,r[g]=n[p]=d,i[d]=0,i[p]=1,i[g]=2,o.fill(-1),o[this._hashKey(m,y)]=d,o[this._hashKey(x,v)]=p,o[this._hashKey($,w)]=g,this.trianglesLen=0,this._addTriangle(d,p,g,-1,-1,-1);for(let P=0,D,A;P<this._ids.length;P++){const I=this._ids[P],M=e[2*I],T=e[2*I+1];if(P>0&&Math.abs(M-D)<=y1&&Math.abs(T-A)<=y1||(D=M,A=T,I===d||I===p||I===g))continue;let E=0;for(let R=0,G=this._hashKey(M,T);R<this._hashSize&&(E=o[(G+R)%this._hashSize],!(E!==-1&&E!==r[E]));R++);E=n[E];let L=E,N;for(;N=r[L],ns(M,T,e[2*L],e[2*L+1],e[2*N],e[2*N+1])>=0;)if(L=N,L===E){L=-1;break}if(L===-1)continue;let O=this._addTriangle(L,I,r[L],-1,-1,i[L]);i[I]=this._legalize(O+2),i[L]=O,_++;let k=r[L];for(;N=r[k],ns(M,T,e[2*k],e[2*k+1],e[2*N],e[2*N+1])<0;)O=this._addTriangle(k,I,N,i[I],-1,i[k]),i[I]=this._legalize(O+2),r[k]=k,_--,k=N;if(L===E)for(;N=n[L],ns(M,T,e[2*N],e[2*N+1],e[2*L],e[2*L+1])<0;)O=this._addTriangle(N,I,L,-1,i[L],i[N]),this._legalize(O+2),i[N]=O,r[L]=L,_--,L=N;this._hullStart=n[I]=L,r[L]=n[k]=I,r[I]=k,o[this._hashKey(M,T)]=I,o[this._hashKey(e[2*L],e[2*L+1])]=L}this.hull=new Uint32Array(_);for(let P=0,D=this._hullStart;P<_;P++)this.hull[P]=D,D=r[D];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,n){return Math.floor(x7(e-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:n,_halfedges:r,coords:i}=this;let o=0,a=0;for(;;){const s=r[e],u=e-e%3;if(a=u+(e+2)%3,s===-1){if(o===0)break;e=rs[--o];continue}const c=s-s%3,l=u+(e+1)%3,h=c+(s+2)%3,f=n[a],d=n[e],p=n[l],g=n[h];if(_7(i[2*f],i[2*f+1],i[2*d],i[2*d+1],i[2*p],i[2*p+1],i[2*g],i[2*g+1])){n[e]=g,n[s]=f;const y=r[h];if(y===-1){let v=this._hullStart;do{if(this._hullTri[v]===h){this._hullTri[v]=e;break}v=this._hullPrev[v]}while(v!==this._hullStart)}this._link(e,y),this._link(s,r[a]),this._link(a,h);const x=c+(s+1)%3;o<rs.length&&(rs[o++]=x)}else{if(o===0)break;e=rs[--o]}}return a}_link(e,n){this._halfedges[e]=n,n!==-1&&(this._halfedges[n]=e)}_addTriangle(e,n,r,i,o,a){const s=this.trianglesLen;return this._triangles[s]=e,this._triangles[s+1]=n,this._triangles[s+2]=r,this._link(s,i),this._link(s+1,o),this._link(s+2,a),this.trianglesLen+=3,s}}function x7(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Pl(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function _7(t,e,n,r,i,o,a,s){const u=t-a,c=e-s,l=n-a,h=r-s,f=i-a,d=o-s,p=u*u+c*c,g=l*l+h*h,m=f*f+d*d;return u*(h*m-g*d)-c*(l*m-g*f)+p*(l*d-h*f)<0}function w7(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,c=o-e,l=a*a+s*s,h=u*u+c*c,f=.5/(a*c-s*u),d=(c*l-s*h)*f,p=(a*h-u*l)*f;return d*d+p*p}function $7(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,c=o-e,l=a*a+s*s,h=u*u+c*c,f=.5/(a*c-s*u),d=t+(c*l-s*h)*f,p=e+(a*h-u*l)*f;return{x:d,y:p}}function Gr(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?(Gr(t,e,o,r),Gr(t,e,n,a-1)):(Gr(t,e,n,a-1),Gr(t,e,o,r))}}function Ki(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function S7(t){return t[0]}function A7(t){return t[1]}const b1=1e-6;class Xn{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,n){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,n){this._+=`L${this._x1=+e},${this._y1=+n}`}arc(e,n,r){e=+e,n=+n,r=+r;const i=e+r,o=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${o}`:(Math.abs(this._x1-i)>b1||Math.abs(this._y1-o)>b1)&&(this._+="L"+i+","+o),r&&(this._+=`A${r},${r},0,1,1,${e-r},${n}A${r},${r},0,1,1,${this._x1=i},${this._y1=o}`)}rect(e,n,r,i){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class Dl{constructor(){this._=[]}moveTo(e,n){this._.push([e,n])}closePath(){this._.push(this._[0].slice())}lineTo(e,n){this._.push([e,n])}value(){return this._.length?this._:null}}class v1{constructor(e,[n,r,i,o]=[0,0,960,500]){if(!((i=+i)>=(n=+n))||!((o=+o)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(e.points.length*2),this.vectors=new Float64Array(e.points.length*2),this.xmax=i,this.xmin=n,this.ymax=o,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:n,triangles:r},vectors:i}=this;let o,a;const s=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let g=0,m=0,y=r.length,x,v;g<y;g+=3,m+=2){const b=r[g]*2,$=r[g+1]*2,w=r[g+2]*2,S=e[b],_=e[b+1],P=e[$],D=e[$+1],A=e[w],I=e[w+1],M=P-S,T=D-_,E=A-S,L=I-_,N=(M*L-T*E)*2;if(Math.abs(N)<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 O=1e9*Math.sign((o-S)*L-(a-_)*E);x=(S+A)/2-O*L,v=(_+I)/2+O*E}else{const O=1/N,k=M*M+T*T,R=E*E+L*L;x=S+(L*k-T*R)*O,v=_+(M*R-E*k)*O}s[m]=x,s[m+1]=v}let u=n[n.length-1],c,l=u*4,h,f=e[2*u],d,p=e[2*u+1];i.fill(0);for(let g=0;g<n.length;++g)u=n[g],c=l,h=f,d=p,l=u*4,f=e[2*u],p=e[2*u+1],i[c+2]=i[l]=d-p,i[c+3]=i[l+1]=f-h}render(e){const n=e==null?e=new Xn:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let l=0,h=r.length;l<h;++l){const f=r[l];if(f<l)continue;const d=Math.floor(l/3)*2,p=Math.floor(f/3)*2,g=a[d],m=a[d+1],y=a[p],x=a[p+1];this._renderSegment(g,m,y,x,e)}let u,c=o[o.length-1];for(let l=0;l<o.length;++l){u=c,c=o[l];const h=Math.floor(i[c]/3)*2,f=a[h],d=a[h+1],p=u*4,g=this._project(f,d,s[p+2],s[p+3]);g&&this._renderSegment(f,d,g[0],g[1],e)}return n&&n.value()}renderBounds(e){const n=e==null?e=new Xn:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(e,n){const r=n==null?n=new Xn:void 0,i=this._clip(e);if(i===null||!i.length)return;n.moveTo(i[0],i[1]);let o=i.length;for(;i[0]===i[o-2]&&i[1]===i[o-1]&&o>1;)o-=2;for(let a=2;a<o;a+=2)(i[a]!==i[a-2]||i[a+1]!==i[a-1])&&n.lineTo(i[a],i[a+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let n=0,r=e.length/2;n<r;++n){const i=this.cellPolygon(n);i&&(i.index=n,yield i)}}cellPolygon(e){const n=new Dl;return this.renderCell(e,n),n.value()}_renderSegment(e,n,r,i,o){let a;const s=this._regioncode(e,n),u=this._regioncode(r,i);s===0&&u===0?(o.moveTo(e,n),o.lineTo(r,i)):(a=this._clipSegment(e,n,r,i,s,u))&&(o.moveTo(a[0],a[1]),o.lineTo(a[2],a[3]))}contains(e,n,r){return n=+n,n!==n||(r=+r,r!==r)?!1:this.delaunay._step(e,n,r)===e}*neighbors(e){const n=this._clip(e);if(n)for(const r of this.delaunay.neighbors(e)){const i=this._clip(r);if(i){t:for(let o=0,a=n.length;o<a;o+=2)for(let s=0,u=i.length;s<u;s+=2)if(n[o]===i[s]&&n[o+1]===i[s+1]&&n[(o+2)%a]===i[(s+u-2)%u]&&n[(o+3)%a]===i[(s+u-1)%u]){yield r;break t}}}}_cell(e){const{circumcenters:n,delaunay:{inedges:r,halfedges:i,triangles:o}}=this,a=r[e];if(a===-1)return null;const s=[];let u=a;do{const c=Math.floor(u/3);if(s.push(n[c*2],n[c*2+1]),u=u%3===2?u-2:u+1,o[u]!==e)break;u=i[u]}while(u!==a&&u!==-1);return s}_clip(e){if(e===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(e);if(n===null)return null;const{vectors:r}=this,i=e*4;return this._simplify(r[i]||r[i+1]?this._clipInfinite(e,n,r[i],r[i+1],r[i+2],r[i+3]):this._clipFinite(e,n))}_clipFinite(e,n){const r=n.length;let i=null,o,a,s=n[r-2],u=n[r-1],c,l=this._regioncode(s,u),h,f=0;for(let d=0;d<r;d+=2)if(o=s,a=u,s=n[d],u=n[d+1],c=l,l=this._regioncode(s,u),c===0&&l===0)h=f,f=0,i?i.push(s,u):i=[s,u];else{let p,g,m,y,x;if(c===0){if((p=this._clipSegment(o,a,s,u,c,l))===null)continue;[g,m,y,x]=p}else{if((p=this._clipSegment(s,u,o,a,l,c))===null)continue;[y,x,g,m]=p,h=f,f=this._edgecode(g,m),h&&f&&this._edge(e,h,f,i,i.length),i?i.push(g,m):i=[g,m]}h=f,f=this._edgecode(y,x),h&&f&&this._edge(e,h,f,i,i.length),i?i.push(y,x):i=[y,x]}if(i)h=f,f=this._edgecode(i[0],i[1]),h&&f&&this._edge(e,h,f,i,i.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return i}_clipSegment(e,n,r,i,o,a){const s=o<a;for(s&&([e,n,r,i,o,a]=[r,i,e,n,a,o]);;){if(o===0&&a===0)return s?[r,i,e,n]:[e,n,r,i];if(o&a)return null;let u,c,l=o||a;l&8?(u=e+(r-e)*(this.ymax-n)/(i-n),c=this.ymax):l&4?(u=e+(r-e)*(this.ymin-n)/(i-n),c=this.ymin):l&2?(c=n+(i-n)*(this.xmax-e)/(r-e),u=this.xmax):(c=n+(i-n)*(this.xmin-e)/(r-e),u=this.xmin),o?(e=u,n=c,o=this._regioncode(e,n)):(r=u,i=c,a=this._regioncode(r,i))}}_clipInfinite(e,n,r,i,o,a){let s=Array.from(n),u;if((u=this._project(s[0],s[1],r,i))&&s.unshift(u[0],u[1]),(u=this._project(s[s.length-2],s[s.length-1],o,a))&&s.push(u[0],u[1]),s=this._clipFinite(e,s))for(let c=0,l=s.length,h,f=this._edgecode(s[l-2],s[l-1]);c<l;c+=2)h=f,f=this._edgecode(s[c],s[c+1]),h&&f&&(c=this._edge(e,h,f,s,c),l=s.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(e,n,r,i,o){for(;n!==r;){let a,s;switch(n){case 5:n=4;continue;case 4:n=6,a=this.xmax,s=this.ymin;break;case 6:n=2;continue;case 2:n=10,a=this.xmax,s=this.ymax;break;case 10:n=8;continue;case 8:n=9,a=this.xmin,s=this.ymax;break;case 9:n=1;continue;case 1:n=5,a=this.xmin,s=this.ymin;break}(i[o]!==a||i[o+1]!==s)&&this.contains(e,a,s)&&(i.splice(o,0,a,s),o+=2)}return o}_project(e,n,r,i){let o=1/0,a,s,u;if(i<0){if(n<=this.ymin)return null;(a=(this.ymin-n)/i)<o&&(u=this.ymin,s=e+(o=a)*r)}else if(i>0){if(n>=this.ymax)return null;(a=(this.ymax-n)/i)<o&&(u=this.ymax,s=e+(o=a)*r)}if(r>0){if(e>=this.xmax)return null;(a=(this.xmax-e)/r)<o&&(s=this.xmax,u=n+(o=a)*i)}else if(r<0){if(e<=this.xmin)return null;(a=(this.xmin-e)/r)<o&&(s=this.xmin,u=n+(o=a)*i)}return[s,u]}_edgecode(e,n){return(e===this.xmin?1:e===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(e,n){return(e<this.xmin?1:e>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let n=0;n<e.length;n+=2){const r=(n+2)%e.length,i=(n+4)%e.length;(e[n]===e[r]&&e[r]===e[i]||e[n+1]===e[r+1]&&e[r+1]===e[i+1])&&(e.splice(r,2),n-=2)}e.length||(e=null)}return e}}const M7=2*Math.PI,zr=Math.pow;function T7(t){return t[0]}function P7(t){return t[1]}function D7(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 L7(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class Ll{static from(e,n=T7,r=P7,i){return new Ll("length"in e?E7(e,n,r,i):Float64Array.from(k7(e,n,r,i)))}constructor(e){this._delaunator=new is(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,n=this.points;if(e.hull&&e.hull.length>2&&D7(e)){this.collinear=Int32Array.from({length:n.length/2},(f,d)=>d).sort((f,d)=>n[2*f]-n[2*d]||n[2*f+1]-n[2*d+1]);const u=this.collinear[0],c=this.collinear[this.collinear.length-1],l=[n[2*u],n[2*u+1],n[2*c],n[2*c+1]],h=1e-8*Math.hypot(l[3]-l[1],l[2]-l[0]);for(let f=0,d=n.length/2;f<d;++f){const p=L7(n[2*f],n[2*f+1],h);n[2*f]=p[0],n[2*f+1]=p[1]}this._delaunator=new is(n)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),s=this._hullIndex.fill(-1);for(let u=0,c=r.length;u<c;++u){const l=o[u%3===2?u-2:u+1];(r[u]===-1||a[l]===-1)&&(a[l]=u)}for(let u=0,c=i.length;u<c;++u)s[i[u]]=u;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],a[i[0]]=1,i.length===2&&(a[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(e){return new v1(this,e)}*neighbors(e){const{inedges:n,hull:r,_hullIndex:i,halfedges:o,triangles:a,collinear:s}=this;if(s){const h=s.indexOf(e);h>0&&(yield s[h-1]),h<s.length-1&&(yield s[h+1]);return}const u=n[e];if(u===-1)return;let c=u,l=-1;do{if(yield l=a[c],c=c%3===2?c-2:c+1,a[c]!==e)return;if(c=o[c],c===-1){const h=r[(i[e]+1)%r.length];h!==l&&(yield h);return}}while(c!==u)}find(e,n,r=0){if(e=+e,e!==e||(n=+n,n!==n))return-1;const i=r;let o;for(;(o=this._step(r,e,n))>=0&&o!==r&&o!==i;)r=o;return o}_step(e,n,r){const{inedges:i,hull:o,_hullIndex:a,halfedges:s,triangles:u,points:c}=this;if(i[e]===-1||!c.length)return(e+1)%(c.length>>1);let l=e,h=zr(n-c[e*2],2)+zr(r-c[e*2+1],2);const f=i[e];let d=f;do{let p=u[d];const g=zr(n-c[p*2],2)+zr(r-c[p*2+1],2);if(g<h&&(h=g,l=p),d=d%3===2?d-2:d+1,u[d]!==e)break;if(d=s[d],d===-1){if(d=o[(a[e]+1)%o.length],d!==p&&zr(n-c[d*2],2)+zr(r-c[d*2+1],2)<h)return d;break}}while(d!==f);return l}render(e){const n=e==null?e=new Xn:void 0,{points:r,halfedges:i,triangles:o}=this;for(let a=0,s=i.length;a<s;++a){const u=i[a];if(u<a)continue;const c=o[a]*2,l=o[u]*2;e.moveTo(r[c],r[c+1]),e.lineTo(r[l],r[l+1])}return this.renderHull(e),n&&n.value()}renderPoints(e,n){n===void 0&&(!e||typeof e.moveTo!="function")&&(n=e,e=null),n=n==null?2:+n;const r=e==null?e=new Xn:void 0,{points:i}=this;for(let o=0,a=i.length;o<a;o+=2){const s=i[o],u=i[o+1];e.moveTo(s+n,u),e.arc(s,u,n,0,M7)}return r&&r.value()}renderHull(e){const n=e==null?e=new Xn:void 0,{hull:r,points:i}=this,o=r[0]*2,a=r.length;e.moveTo(i[o],i[o+1]);for(let s=1;s<a;++s){const u=2*r[s];e.lineTo(i[u],i[u+1])}return e.closePath(),n&&n.value()}hullPolygon(){const e=new Dl;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new Xn:void 0,{points:i,triangles:o}=this,a=o[e*=3]*2,s=o[e+1]*2,u=o[e+2]*2;return n.moveTo(i[a],i[a+1]),n.lineTo(i[s],i[s+1]),n.lineTo(i[u],i[u+1]),n.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:e}=this;for(let n=0,r=e.length/3;n<r;++n)yield this.trianglePolygon(n)}trianglePolygon(e){const n=new Dl;return this.renderTriangle(e,n),n.value()}}function E7(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*k7(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 x1={},El={},kl=34,Qi=10,Cl=13;function _1(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function C7(t,e){var n=_1(t);return function(r,i){return e(n(r),i,t)}}function w1(t){var e=Object.create(null),n=[];return t.forEach(function(r){for(var i in r)i in e||n.push(e[i]=i)}),n}function ne(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function R7(t){return t<0?"-"+ne(-t,6):t>9999?"+"+ne(t,6):ne(t,4)}function I7(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":R7(t.getUTCFullYear())+"-"+ne(t.getUTCMonth()+1,2)+"-"+ne(t.getUTCDate(),2)+(i?"T"+ne(e,2)+":"+ne(n,2)+":"+ne(r,2)+"."+ne(i,3)+"Z":r?"T"+ne(e,2)+":"+ne(n,2)+":"+ne(r,2)+"Z":n||e?"T"+ne(e,2)+":"+ne(n,2)+"Z":"")}function os(t){var e=new RegExp('["'+t+`
6
- \r]`),n=t.charCodeAt(0);function r(h,f){var d,p,g=i(h,function(m,y){if(d)return d(m,y-1);p=m,d=f?C7(m,f):_1(m)});return g.columns=p||[],g}function i(h,f){var d=[],p=h.length,g=0,m=0,y,x=p<=0,v=!1;h.charCodeAt(p-1)===Qi&&--p,h.charCodeAt(p-1)===Cl&&--p;function b(){if(x)return El;if(v)return v=!1,x1;var w,S=g,_;if(h.charCodeAt(S)===kl){for(;g++<p&&h.charCodeAt(g)!==kl||h.charCodeAt(++g)===kl;);return(w=g)>=p?x=!0:(_=h.charCodeAt(g++))===Qi?v=!0:_===Cl&&(v=!0,h.charCodeAt(g)===Qi&&++g),h.slice(S+1,w-1).replace(/""/g,'"')}for(;g<p;){if((_=h.charCodeAt(w=g++))===Qi)v=!0;else if(_===Cl)v=!0,h.charCodeAt(g)===Qi&&++g;else if(_!==n)continue;return h.slice(S,w)}return x=!0,h.slice(S,p)}for(;(y=b())!==El;){for(var $=[];y!==x1&&y!==El;)$.push(y),y=b();f&&($=f($,m++))==null||d.push($)}return d}function o(h,f){return h.map(function(d){return f.map(function(p){return l(d[p])}).join(t)})}function a(h,f){return f==null&&(f=w1(h)),[f.map(l).join(t)].concat(o(h,f)).join(`
7
- `)}function s(h,f){return f==null&&(f=w1(h)),o(h,f).join(`
5
+ `):"",this.name="UnsubscriptionError",this.errors=e}});function fa(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Si=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=_r(a),u=s.next();!u.done;u=s.next()){var c=u.value;c.remove(this)}}catch(g){e={error:g}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(Pt(l))try{l()}catch(g){o=g instanceof pc?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=_r(h),d=f.next();!d.done;d=f.next()){var p=d.value;try{Ip(p)}catch(g){o=o??[],g instanceof pc?o=$i($i([],wi(o)),wi(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new pc(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Ip(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&fa(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&fa(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),kp=Si.EMPTY;function Cp(t){return t instanceof Si||t&&"closed"in t&&Pt(t.remove)&&Pt(t.add)&&Pt(t.unsubscribe)}function Ip(t){Pt(t)?t():t.unsubscribe()}var Rp={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},M3={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,$i([t,e],wi(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Np(t){M3.setTimeout(function(){throw t})}function gc(){}function ha(t){t()}var mc=function(t){qe(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Cp(n)&&n.add(r)):r.destination=L3,r}return e.create=function(n,r,i){return new Ai(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Si),T3=Function.prototype.bind;function yc(t,e){return T3.call(t,e)}var P3=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){da(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){da(r)}else da(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){da(n)}},t}(),Ai=function(t){qe(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(Pt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&Rp.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&yc(n.next,s),error:n.error&&yc(n.error,s),complete:n.complete&&yc(n.complete,s)}):a=n}return o.destination=new P3(a),o}return e}(mc);function da(t){Np(t)}function D3(t){throw t}var L3={closed:!0,next:gc,error:D3,complete:gc},bc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Fp(t){return t}function E3(t){return t.length===0?Fp:t.length===1?t[0]:function(e){return t.reduce(function(n,r){return r(n)},e)}}var $e=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=C3(e)?e:new Ai(e,n,r);return ha(function(){var a=i,s=a.operator,u=a.source;o.add(s?s.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=Gp(n),new n(function(i,o){var a=new Ai({next:function(s){try{e(s)}catch(u){o(u),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[bc]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return E3(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Gp(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function Gp(t){var e;return(e=t??Rp.Promise)!==null&&e!==void 0?e:Promise}function k3(t){return t&&Pt(t.next)&&Pt(t.error)&&Pt(t.complete)}function C3(t){return t&&t instanceof mc||k3(t)&&Cp(t)}function I3(t){return Pt(t==null?void 0:t.lift)}function Ln(t){return function(e){if(I3(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Mi(t,e,n,r,i){return new R3(t,e,n,r,i)}var R3=function(t){qe(e,t);function e(n,r,i,o,a,s){var u=t.call(this,n)||this;return u.onFinalize=a,u.shouldUnsubscribe=s,u._next=r?function(c){try{r(c)}catch(l){n.error(l)}}:t.prototype._next,u._error=o?function(c){try{o(c)}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(mc),N3=dc(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ti=function(t){qe(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new zp(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new N3},e.prototype.next=function(n){var r=this;ha(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=_r(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(c){i={error:c}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;ha(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;ha(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?kp:(this.currentObservers=null,s.push(n),new Si(function(){r.currentObservers=null,fa(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new $e;return n.source=this,n},e.create=function(n,r){return new zp(n,r)},e}($e),zp=function(t){qe(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:kp},e}(Ti),vc={now:function(){return(vc.delegate||Date).now()},delegate:void 0},F3=function(t){qe(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=vc);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),u=0;u<s.length&&!n.closed;u+=o?1:2)n.next(s[u]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var u=i.now(),c=0,l=1;l<o.length&&o[l]<=u;l+=2)c=l;c&&o.splice(0,c+1)}},e}(Ti),G3=function(t){qe(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(Si),Op={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,$i([t,e],wi(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},z3=function(t){qe(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},e.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),Op.setInterval(n.flush.bind(n,this),i)},e.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&Op.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,fa(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(G3),Up=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=vc.now,t}(),O3=function(t){qe(e,t);function e(n,r){r===void 0&&(r=Up.now);var i=t.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},e}(Up);new O3(z3);function U3(t){return t&&Pt(t.schedule)}function B3(t){return t[t.length-1]}function Bp(t){return U3(B3(t))?t.pop():void 0}var Yp=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Wp(t){return Pt(t==null?void 0:t.then)}function Hp(t){return Pt(t[bc])}function qp(t){return Symbol.asyncIterator&&Pt(t==null?void 0:t[Symbol.asyncIterator])}function Xp(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Y3(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var jp=Y3();function Vp(t){return Pt(t==null?void 0:t[jp])}function Zp(t){return S3(this,arguments,function(){var e,n,r,i;return Ep(this,function(o){switch(o.label){case 0:e=t.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,wr(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,wr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,wr(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function Kp(t){return Pt(t==null?void 0:t.getReader)}function cn(t){if(t instanceof $e)return t;if(t!=null){if(Hp(t))return W3(t);if(Yp(t))return H3(t);if(Wp(t))return q3(t);if(qp(t))return Qp(t);if(Vp(t))return X3(t);if(Kp(t))return j3(t)}throw Xp(t)}function W3(t){return new $e(function(e){var n=t[bc]();if(Pt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function H3(t){return new $e(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function q3(t){return new $e(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Np)})}function X3(t){return new $e(function(e){var n,r;try{for(var i=_r(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function Qp(t){return new $e(function(e){V3(t,e).catch(function(n){return e.error(n)})})}function j3(t){return Qp(Zp(t))}function V3(t,e){var n,r,i,o;return $3(this,void 0,void 0,function(){var a,s;return Ep(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=A3(t),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function En(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function Jp(t,e){return e===void 0&&(e=0),Ln(function(n,r){n.subscribe(Mi(r,function(i){return En(r,t,function(){return r.next(i)},e)},function(){return En(r,t,function(){return r.complete()},e)},function(i){return En(r,t,function(){return r.error(i)},e)}))})}function tg(t,e){return e===void 0&&(e=0),Ln(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Z3(t,e){return cn(t).pipe(tg(e),Jp(e))}function K3(t,e){return cn(t).pipe(tg(e),Jp(e))}function Q3(t,e){return new $e(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function J3(t,e){return new $e(function(n){var r;return En(n,e,function(){r=t[jp](),En(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return Pt(r==null?void 0:r.return)&&r.return()}})}function eg(t,e){if(!t)throw new Error("Iterable cannot be null");return new $e(function(n){En(n,e,function(){var r=t[Symbol.asyncIterator]();En(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function tA(t,e){return eg(Zp(t),e)}function eA(t,e){if(t!=null){if(Hp(t))return Z3(t,e);if(Yp(t))return Q3(t,e);if(Wp(t))return K3(t,e);if(qp(t))return eg(t,e);if(Vp(t))return J3(t,e);if(Kp(t))return tA(t,e)}throw Xp(t)}function nA(t,e){return e?eA(t,e):cn(t)}dc(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function ng(t,e){return Ln(function(n,r){var i=0;n.subscribe(Mi(r,function(o){r.next(t.call(e,o,i++))}))})}function rA(t,e,n,r,i,o,a,s){var u=[],c=0,l=0,h=!1,f=function(){h&&!u.length&&!c&&e.complete()},d=function(g){return c<r?p(g):u.push(g)},p=function(g){c++;var m=!1;cn(n(g,l++)).subscribe(Mi(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{c--;for(var y=function(){var v=u.shift();a||p(v)};u.length&&c<r;)y();f()}catch(v){e.error(v)}}))};return t.subscribe(Mi(e,d,function(){h=!0,f()})),function(){}}function rg(t,e,n){return n===void 0&&(n=1/0),Pt(e)?rg(function(r,i){return ng(function(o,a){return e(r,o,i,a)})(cn(t(r,i)))},n):(typeof e=="number"&&(n=e),Ln(function(r,i){return rA(r,i,t,n)}))}function iA(t){return rg(Fp,t)}function oA(){return iA(1)}function ig(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return oA()(nA(t,Bp(t)))}function aA(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new Ti}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,u=s===void 0?!0:s;return function(c){var l,h,f,d=0,p=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),l=f=void 0,p=g=!1},v=function(){var x=l;y(),x==null||x.unsubscribe()};return Ln(function(x,b){d++,!g&&!p&&m();var w=f=f??n();b.add(function(){d--,d===0&&!g&&!p&&(h=xc(v,u))}),w.subscribe(b),!l&&d>0&&(l=new Ai({next:function($){return w.next($)},error:function($){g=!0,m(),h=xc(y,i,$),w.error($)},complete:function(){p=!0,m(),h=xc(y,a),w.complete()}}),cn(x).subscribe(l))})(c)}}function xc(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new Ai({next:function(){i.unsubscribe(),t()}});return cn(e.apply(void 0,$i([],wi(n)))).subscribe(i)}}function sA(t,e,n){var r,i=!1;return r=t,aA({connector:function(){return new F3(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function uA(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Bp(t);return Ln(function(r,i){(n?ig(t,r,n):ig(t,r)).subscribe(i)})}function cA(t){return Ln(function(e,n){cn(t).subscribe(Mi(n,function(){return n.complete()},gc)),!n.closed&&e.subscribe(n)})}const og=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=gr.scaleDomain,scaleRange:i=gr.scaleRange})=>{const o=r[0]??gr.scaleDomain[0],a=r[1]??gr.scaleDomain[1],s=i[0]??gr.scaleRange[0],u=i[1]??gr.scaleRange[1],c=o==="auto"?e:o,l=a==="auto"?t:a,h=t-(t-c)/(1-s),f=l/u;return Dp().domain([h,f]).range([0,n])},ag=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return d3().domain(t).range(r).padding(n)},lA=({axisLabels:t,axisWidth:e,padding:n=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),Lp().domain([-0,e+0]).range(i)};function fA({name:t,defaultParams:e,initFn:n}){const r=new Ti,i=new Ti,o=new WeakMap;let a=()=>{},s,u=e;return{params$:i,name:t,defaultParams:e,init(){s&&(a=n(s)??(()=>{}),o.set(s.selection,s))},destroy(){a(),s&&(s.selection.remove(),s=void 0),r.next(void 0)},setPresetParams:c=>{u=fc(c,e)},setContext:c=>{s=c,s.observer.fullParams$=i.pipe(cA(r),uA({}),ng(l=>fc(l,u)),sA(1))}}}const Pi=()=>function(t,e){return function(n){return class{constructor(){const r=fA({name:t,defaultParams:e,initFn:n});this.params$=r.params$,this.name=r.name,this.defaultParams=r.defaultParams,this.init=r.init,this.destroy=r.destroy,this.setPresetParams=r.setPresetParams,this.setContext=r.setContext}}}},Di=Pi(),ae=Pi(),Xe=Pi(),sg=Pi(),ug=Pi();function _t(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function cg(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function pa(t){let e,n,r;t.length!==2?(e=_t,n=(s,u)=>_t(t(s),u),r=(s,u)=>t(s)-u):(e=t===_t||t===cg?t:hA,n=t,r=t);function i(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<0?c=h+1:l=h}while(c<l)}return c}function o(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<=0?c=h+1:l=h}while(c<l)}return c}function a(s,u,c=0,l=s.length){const h=i(s,u,c,l-1);return h>c&&r(s[h-1],u)>-r(s[h],u)?h-1:h}return{left:i,center:a,right:o}}function hA(){return 0}function ga(t){return t===null?NaN:+t}function*dA(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const lg=pa(_t),fg=lg.right,pA=lg.left,gA=pa(ga).center,kn=fg;function mA(t,e){if(!((e=+e)>=0))throw new RangeError("invalid r");let n=t.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!e)return t;const r=_c(e),i=t.slice();return r(t,i,0,n,1),r(i,t,0,n,1),r(t,i,0,n,1),t}const hg=dg(_c),yA=dg(bA);function dg(t){return function(e,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:a}=e;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((a=Math.floor(a!==void 0?a:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!a||!n&&!r)return e;const s=n&&t(n),u=r&&t(r),c=i.slice();return s&&u?($r(s,c,i,o,a),$r(s,i,c,o,a),$r(s,c,i,o,a),Sr(u,i,c,o,a),Sr(u,c,i,o,a),Sr(u,i,c,o,a)):s?($r(s,i,c,o,a),$r(s,c,i,o,a),$r(s,i,c,o,a)):u&&(Sr(u,i,c,o,a),Sr(u,c,i,o,a),Sr(u,i,c,o,a)),e}}function $r(t,e,n,r,i){for(let o=0,a=r*i;o<a;)t(e,n,o,o+=r,1)}function Sr(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function bA(t){const e=_c(t);return(n,r,i,o,a)=>{i<<=2,o<<=2,a<<=2,e(n,r,i+0,o+0,a),e(n,r,i+1,o+1,a),e(n,r,i+2,o+2,a),e(n,r,i+3,o+3,a)}}function _c(t){const e=Math.floor(t);if(e===t)return vA(t);const n=t-e,r=2*t+1;return(i,o,a,s,u)=>{if(!((s-=u)>=a))return;let c=e*o[a];const l=u*e,h=l+u;for(let f=a,d=a+l;f<d;f+=u)c+=o[Math.min(s,f)];for(let f=a,d=s;f<=d;f+=u)c+=o[Math.min(s,f+l)],i[f]=(c+n*(o[Math.max(a,f-h)]+o[Math.min(s,f+h)]))/r,c-=o[Math.max(a,f-l)]}}function vA(t){const e=2*t+1;return(n,r,i,o,a)=>{if(!((o-=a)>=i))return;let s=t*r[i];const u=a*t;for(let c=i,l=i+u;c<l;c+=a)s+=r[Math.min(o,c)];for(let c=i,l=o;c<=l;c+=a)s+=r[Math.min(o,c+u)],n[c]=s/e,s-=r[Math.max(i,c-u)]}}function ma(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(i=+i)>=i&&++n}return n}function xA(t){return t.length|0}function _A(t){return!(t>0)}function wA(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function $A(t){return e=>t(...e)}function SA(...t){const e=typeof t[t.length-1]=="function"&&$A(t.pop());t=t.map(wA);const n=t.map(xA),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(_A))return o;for(;;){o.push(i.map((s,u)=>t[u][s]));let a=r;for(;++i[a]===n[a];){if(a===0)return e?o.map(e):o;i[a--]=0}}}function AA(t,e){var n=0,r=0;return Float64Array.from(t,e===void 0?i=>n+=+i||0:i=>n+=+e(i,r++,t)||0)}function pg(t,e){let n=0,r,i=0,o=0;if(e===void 0)for(let a of t)a!=null&&(a=+a)>=a&&(r=a-i,i+=r/++n,o+=r*(a-i));else{let a=-1;for(let s of t)(s=e(s,++a,t))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,o+=r*(s-i))}if(n>1)return o/(n-1)}function gg(t,e){const n=pg(t,e);return n&&Math.sqrt(n)}function Li(t,e){let n,r;if(e===void 0)for(const i of t)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class Dt{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const o=n[i],a=e+o,s=Math.abs(e)<Math.abs(o)?e-(a-o):o-(a-e);s&&(n[r++]=s),e=a}return n[r]=e,this._n=r+1,this}valueOf(){const e=this._partials;let n=this._n,r,i,o,a=0;if(n>0){for(a=e[--n];n>0&&(r=a,i=e[--n],a=r+i,o=i-(a-r),!o););n>0&&(o<0&&e[n-1]<0||o>0&&e[n-1]>0)&&(i=o*2,r=a+i,i==r-a&&(a=r))}return a}}function MA(t,e){const n=new Dt;if(e===void 0)for(let r of t)(r=+r)&&n.add(r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&n.add(i)}return+n}function TA(t,e){const n=new Dt;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}class Ei extends Map{constructor(e,n=bg){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(wc(this,e))}has(e){return super.has(wc(this,e))}set(e,n){return super.set(mg(this,e),n)}delete(e){return super.delete(yg(this,e))}}class Cn extends Set{constructor(e,n=bg){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const r of e)this.add(r)}has(e){return super.has(wc(this,e))}add(e){return super.add(mg(this,e))}delete(e){return super.delete(yg(this,e))}}function wc({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function mg({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function yg({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function bg(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Ar(t){return t}function vg(t,...e){return Mr(t,Ar,Ar,e)}function xg(t,...e){return Mr(t,Array.from,Ar,e)}function _g(t,e){for(let n=1,r=e.length;n<r;++n)t=t.flatMap(i=>i.pop().map(([o,a])=>[...i,o,a]));return t}function PA(t,...e){return _g(xg(t,...e),e)}function DA(t,e,...n){return _g($g(t,e,...n),n)}function wg(t,e,...n){return Mr(t,Ar,e,n)}function $g(t,e,...n){return Mr(t,Array.from,e,n)}function LA(t,...e){return Mr(t,Ar,Sg,e)}function EA(t,...e){return Mr(t,Array.from,Sg,e)}function Sg(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function Mr(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new Ei,u=r[a++];let c=-1;for(const l of o){const h=u(l,++c,o),f=s.get(h);f?f.push(l):s.set(h,[l])}for(const[l,h]of s)s.set(l,i(h,a));return e(s)}(t,0)}function Ag(t,e){return Array.from(e,n=>t[n])}function $c(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){const r=Uint32Array.from(t,(i,o)=>o);return e.length>1?(e=e.map(i=>t.map(i)),r.sort((i,o)=>{for(const a of e){const s=Tr(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>Tr(n[i],n[o]))),Ag(t,r)}return t.sort(Sc(n))}function Sc(t=_t){if(t===_t)return Tr;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function Tr(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function kA(t,e,n){return(e.length!==2?$c(wg(t,e,n),([r,i],[o,a])=>_t(i,a)||_t(r,o)):$c(vg(t,n),([r,i],[o,a])=>e(i,a)||_t(r,o))).map(([r])=>r)}var CA=Array.prototype,IA=CA.slice;function Ac(t){return()=>t}const RA=Math.sqrt(50),NA=Math.sqrt(10),FA=Math.sqrt(2);function ya(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=RA?10:o>=NA?5:o>=FA?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),u=Math.round(e*c),s/c<t&&++s,u/c>e&&--u,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),u=Math.round(e/c),s*c<t&&++s,u*c>e&&--u),u<s&&.5<=n&&n<2?ya(t,e,n*2):[s,u,c]}function In(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?ya(e,t,n):ya(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)u[c]=(o-c)/-a;else for(let c=0;c<s;++c)u[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)u[c]=(i+c)/-a;else for(let c=0;c<s;++c)u[c]=(i+c)*a;return u}function Rn(t,e,n){return e=+e,t=+t,n=+n,ya(t,e,n)[2]}function ba(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Rn(e,t,n):Rn(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function Mc(t,e,n){let r;for(;;){const i=Rn(t,e,n);if(i===r||i===0||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function Tc(t){return Math.max(1,Math.ceil(Math.log(ma(t))/Math.LN2)+1)}function Mg(){var t=Ar,e=Li,n=Tc;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,s,u,c=new Array(a);for(o=0;o<a;++o)c[o]=t(i[o],o,i);var l=e(c),h=l[0],f=l[1],d=n(c,h,f);if(!Array.isArray(d)){const x=f,b=+d;if(e===Li&&([h,f]=Mc(h,f,b)),d=In(h,f,b),d[0]<=h&&(u=Rn(h,f,b)),d[d.length-1]>=f)if(x>=f&&e===Li){const w=Rn(h,f,b);isFinite(w)&&(w>0?f=(Math.floor(f/w)+1)*w:w<0&&(f=(Math.ceil(f*-w)+1)/-w))}else d.pop()}for(var p=d.length,g=0,m=p;d[g]<=h;)++g;for(;d[m-1]>f;)--m;(g||m<p)&&(d=d.slice(g,m),p=m-g);var y=new Array(p+1),v;for(o=0;o<=p;++o)v=y[o]=[],v.x0=o>0?d[o-1]:h,v.x1=o<p?d[o]:f;if(isFinite(u)){if(u>0)for(o=0;o<a;++o)(s=c[o])!=null&&h<=s&&s<=f&&y[Math.min(p,Math.floor((s-h)/u))].push(i[o]);else if(u<0){for(o=0;o<a;++o)if((s=c[o])!=null&&h<=s&&s<=f){const x=Math.floor((h-s)*u);y[Math.min(p,x+(d[x]<=s))].push(i[o])}}}else for(o=0;o<a;++o)(s=c[o])!=null&&h<=s&&s<=f&&y[kn(d,s,0,p)].push(i[o]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:Ac(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:Ac([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Ac(Array.isArray(i)?IA.call(i):i),r):n},r}function ki(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Pc(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);return r}function va(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Dc(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);return r}function xa(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?Tr:Sc(i);r>n;){if(r-n>600){const u=r-n+1,c=e-n+1,l=Math.log(u),h=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*h*(u-h)/u)*(c-u/2<0?-1:1),d=Math.max(n,Math.floor(e-c*h/u+f)),p=Math.min(r,Math.floor(e+(u-c)*h/u+f));xa(t,e,d,p,i)}const o=t[e];let a=n,s=r;for(Ci(t,n,e),i(t[r],o)>0&&Ci(t,n,r);a<s;){for(Ci(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?Ci(t,n,s):(++s,Ci(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Ci(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Tg(t,e=_t){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?_t(a,i)>0:_t(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)>0:e(i,i)===0)&&(n=i,r=!0);return n}function Ii(t,e,n){if(t=Float64Array.from(dA(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return va(t);if(e>=1)return ki(t);var r,i=(r-1)*e,o=Math.floor(i),a=ki(xa(t,o).subarray(0,o+1)),s=va(t.subarray(o+1));return a+(s-a)*(i-o)}}function Pg(t,e,n=ga){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t),s=+n(t[o+1],o+1,t);return a+(s-a)*(i-o)}}function Dg(t,e,n=ga){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,u)=>ga(n(t[u],u,t))),e<=0)return Dc(r);if(e>=1)return Pc(r);var r,i=Uint32Array.from(t,(s,u)=>u),o=r.length-1,a=Math.floor(o*e);return xa(i,a,0,o,(s,u)=>Tr(r[s],r[u])),a=Tg(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function GA(t,e,n){const r=ma(t),i=Ii(t,.75)-Ii(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function zA(t,e,n){const r=ma(t),i=gg(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function OA(t,e){let n=0,r=0;if(e===void 0)for(let i of t)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function UA(t,e){return Ii(t,.5,e)}function BA(t,e){return Dg(t,.5,e)}function*YA(t){for(const e of t)yield*e}function Lc(t){return Array.from(YA(t))}function WA(t,e){const n=new Ei;if(e===void 0)for(let o of t)o!=null&&o>=o&&n.set(o,(n.get(o)||0)+1);else{let o=-1;for(let a of t)(a=e(a,++o,t))!=null&&a>=a&&n.set(a,(n.get(a)||0)+1)}let r,i=0;for(const[o,a]of n)a>i&&(i=a,r=o);return r}function HA(t,e=qA){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function qA(t,e){return[t,e]}function ln(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function XA(t,e=_t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");let n=Array.from(t);const r=new Float64Array(n.length);e.length!==2&&(n=n.map(e),e=_t);const i=(s,u)=>e(n[s],n[u]);let o,a;return t=Uint32Array.from(n,(s,u)=>u),t.sort(e===_t?(s,u)=>Tr(n[s],n[u]):Sc(i)),t.forEach((s,u)=>{const c=i(s,o===void 0?s:o);c>=0?((o===void 0||c>0)&&(o=s,a=u),r[s]=a):r[s]=NaN}),r}function jA(t,e=_t){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?_t(a,i)<0:_t(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)<0:e(i,i)===0)&&(n=i,r=!0);return n}function Lg(t,e=_t){if(e.length===1)return Dc(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)<0)&&(n=o,r=i);return r}function VA(t,e=_t){if(e.length===1)return Pc(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)>0)&&(n=o,r=i);return r}function ZA(t,e){const n=Lg(t,e);return n<0?void 0:n}const KA=Eg(Math.random);function Eg(t){return function(n,r=0,i=n.length){let o=i-(r=+r);for(;o;){const a=t()*o--|0,s=n[o+r];n[o+r]=n[a+r],n[a+r]=s}return n}}function QA(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function kg(t){if(!(o=t.length))return[];for(var e=-1,n=va(t,JA),r=new Array(n);++e<n;)for(var i=-1,o,a=r[e]=new Array(o);++i<o;)a[i]=t[i][e];return r}function JA(t){return t.length}function t5(){return kg(arguments)}function e5(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(!e(r,++n,t))return!1;return!0}function n5(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(e(r,++n,t))return!0;return!1}function r5(t,e){if(typeof e!="function")throw new TypeError("test is not a function");const n=[];let r=-1;for(const i of t)e(i,++r,t)&&n.push(i);return n}function i5(t,e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");if(typeof e!="function")throw new TypeError("mapper is not a function");return Array.from(t,(n,r)=>e(n,r,t))}function o5(t,e,n){if(typeof e!="function")throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if({done:i,value:n}=r.next(),i)return;++a}for(;{done:i,value:o}=r.next(),!i;)n=e(n,o,++a,t);return n}function a5(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function s5(t,...e){t=new Cn(t);for(const n of e)for(const r of n)t.delete(r);return t}function u5(t,e){const n=e[Symbol.iterator](),r=new Cn;for(const i of t){if(r.has(i))return!1;let o,a;for(;({value:o,done:a}=n.next())&&!a;){if(Object.is(i,o))return!1;r.add(o)}}return!0}function c5(t,...e){t=new Cn(t),e=e.map(l5);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function l5(t){return t instanceof Cn?t:new Cn(t)}function Cg(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=Ig(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const u=Ig(a);if(r.add(u),Object.is(o,u))break}}return!0}function Ig(t){return t!==null&&typeof t=="object"?t.valueOf():t}function f5(t,e){return Cg(e,t)}function h5(...t){const e=new Cn;for(const n of t)for(const r of n)e.add(r);return e}function d5(t){return t}var _a=1,wa=2,Ec=3,Ri=4,Rg=1e-6;function p5(t){return"translate("+t+",0)"}function g5(t){return"translate(0,"+t+")"}function m5(t){return e=>+t(e)}function y5(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function b5(){return!this.__axis}function $a(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===_a||t===Ri?-1:1,l=t===Ri||t===wa?"x":"y",h=t===_a||t===Ec?p5:g5;function f(d){var p=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):d5),m=Math.max(o,0)+s,y=e.range(),v=+y[0]+u,x=+y[y.length-1]+u,b=(e.bandwidth?y5:m5)(e.copy(),u),w=d.selection?d.selection():d,$=w.selectAll(".domain").data([null]),A=w.selectAll(".tick").data(p,e).order(),_=A.exit(),L=A.enter().append("g").attr("class","tick"),E=A.select("line"),T=A.select("text");$=$.merge($.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),A=A.merge(L),E=E.merge(L.append("line").attr("stroke","currentColor").attr(l+"2",c*o)),T=T.merge(L.append("text").attr("fill","currentColor").attr(l,c*m).attr("dy",t===_a?"0em":t===Ec?"0.71em":"0.32em")),d!==w&&($=$.transition(d),A=A.transition(d),E=E.transition(d),T=T.transition(d),_=_.transition(d).attr("opacity",Rg).attr("transform",function(I){return isFinite(I=b(I))?h(I+u):this.getAttribute("transform")}),L.attr("opacity",Rg).attr("transform",function(I){var P=this.parentNode.__axis;return h((P&&isFinite(P=P(I))?P:b(I))+u)})),_.remove(),$.attr("d",t===Ri||t===wa?a?"M"+c*a+","+v+"H"+u+"V"+x+"H"+c*a:"M"+u+","+v+"V"+x:a?"M"+v+","+c*a+"V"+u+"H"+x+"V"+c*a:"M"+v+","+u+"H"+x),A.attr("opacity",1).attr("transform",function(I){return h(b(I)+u)}),E.attr(l+"2",c*o),T.attr(l,c*m).text(g),w.filter(b5).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===wa?"start":t===Ri?"end":"middle"),w.each(function(){this.__axis=b})}return f.scale=function(d){return arguments.length?(e=d,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(d){return arguments.length?(n=d==null?[]:Array.from(d),f):n.slice()},f.tickValues=function(d){return arguments.length?(r=d==null?null:Array.from(d),f):r&&r.slice()},f.tickFormat=function(d){return arguments.length?(i=d,f):i},f.tickSize=function(d){return arguments.length?(o=a=+d,f):o},f.tickSizeInner=function(d){return arguments.length?(o=+d,f):o},f.tickSizeOuter=function(d){return arguments.length?(a=+d,f):a},f.tickPadding=function(d){return arguments.length?(s=+d,f):s},f.offset=function(d){return arguments.length?(u=+d,f):u},f}function Ng(t){return $a(_a,t)}function v5(t){return $a(wa,t)}function x5(t){return $a(Ec,t)}function Fg(t){return $a(Ri,t)}var _5={value:()=>{}};function Nn(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Sa(n)}function Sa(t){this._=t}function w5(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Sa.prototype=Nn.prototype={constructor:Sa,on:function(t,e){var n=this._,r=w5(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=$5(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=Gg(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Gg(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Sa(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function $5(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Gg(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=_5,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var kc="http://www.w3.org/1999/xhtml";const Cc={svg:"http://www.w3.org/2000/svg",xhtml:kc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ni(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Cc.hasOwnProperty(e)?{space:Cc[e],local:t}:t}function S5(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===kc&&e.documentElement.namespaceURI===kc?e.createElement(t):e.createElementNS(n,t)}}function A5(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Aa(t){var e=Ni(t);return(e.local?A5:S5)(e)}function M5(){}function Ma(t){return t==null?M5:function(){return this.querySelector(t)}}function T5(t){typeof t!="function"&&(t=Ma(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,c,l=0;l<a;++l)(u=o[l])&&(c=t.call(u,u.__data__,l,o))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new Yt(r,this._parents)}function zg(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function P5(){return[]}function Ic(t){return t==null?P5:function(){return this.querySelectorAll(t)}}function D5(t){return function(){return zg(t.apply(this,arguments))}}function L5(t){typeof t=="function"?t=D5(t):t=Ic(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),i.push(u));return new Yt(r,i)}function Rc(t){return function(){return this.matches(t)}}function Og(t){return function(e){return e.matches(t)}}var E5=Array.prototype.find;function k5(t){return function(){return E5.call(this.children,t)}}function C5(){return this.firstElementChild}function I5(t){return this.select(t==null?C5:k5(typeof t=="function"?t:Og(t)))}var R5=Array.prototype.filter;function N5(){return Array.from(this.children)}function F5(t){return function(){return R5.call(this.children,t)}}function G5(t){return this.selectAll(t==null?N5:F5(typeof t=="function"?t:Og(t)))}function z5(t){typeof t!="function"&&(t=Rc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new Yt(r,this._parents)}function Ug(t){return new Array(t.length)}function O5(){return new Yt(this._enter||this._groups.map(Ug),this._parents)}function Ta(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ta.prototype={constructor:Ta,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function U5(t){return function(){return t}}function B5(t,e,n,r,i,o){for(var a=0,s,u=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Ta(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function Y5(t,e,n,r,i,o,a){var s,u,c=new Map,l=e.length,h=o.length,f=new Array(l),d;for(s=0;s<l;++s)(u=e[s])&&(f[s]=d=a.call(u,u.__data__,s,e)+"",c.has(d)?i[s]=u:c.set(d,u));for(s=0;s<h;++s)d=a.call(t,o[s],s,o)+"",(u=c.get(d))?(r[s]=u,u.__data__=o[s],c.delete(d)):n[s]=new Ta(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function W5(t){return t.__data__}function H5(t,e){if(!arguments.length)return Array.from(this,W5);var n=e?Y5:B5,r=this._parents,i=this._groups;typeof t!="function"&&(t=U5(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,d=q5(t.call(l,l&&l.__data__,c,r)),p=d.length,g=s[c]=new Array(p),m=a[c]=new Array(p),y=u[c]=new Array(f);n(l,h,g,m,y,d,e);for(var v=0,x=0,b,w;v<p;++v)if(b=g[v]){for(v>=x&&(x=v+1);!(w=m[x])&&++x<p;);b._next=w||null}}return a=new Yt(a,r),a._enter=s,a._exit=u,a}function q5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function X5(){return new Yt(this._exit||this._groups.map(Ug),this._parents)}function j5(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function V5(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c=n[u],l=r[u],h=c.length,f=s[u]=new Array(h),d,p=0;p<h;++p)(d=c[p]||l[p])&&(f[p]=d);for(;u<i;++u)s[u]=n[u];return new Yt(s,this._parents)}function Z5(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function K5(t){t||(t=Q5);function e(h,f){return h&&f?t(h.__data__,f.__data__):!h-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),c,l=0;l<s;++l)(c=a[l])&&(u[l]=c);u.sort(e)}return new Yt(i,this._parents).order()}function Q5(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function J5(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function t6(){return Array.from(this)}function e6(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function n6(){let t=0;for(const e of this)++t;return t}function r6(){return!this.node()}function i6(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function o6(t){return function(){this.removeAttribute(t)}}function a6(t){return function(){this.removeAttributeNS(t.space,t.local)}}function s6(t,e){return function(){this.setAttribute(t,e)}}function u6(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function c6(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function l6(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function f6(t,e){var n=Ni(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?a6:o6:typeof e=="function"?n.local?l6:c6:n.local?u6:s6)(n,e))}function Nc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function h6(t){return function(){this.style.removeProperty(t)}}function d6(t,e,n){return function(){this.style.setProperty(t,e,n)}}function p6(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function g6(t,e,n){return arguments.length>1?this.each((e==null?h6:typeof e=="function"?p6:d6)(t,e,n??"")):Fn(this.node(),t)}function Fn(t,e){return t.style.getPropertyValue(e)||Nc(t).getComputedStyle(t,null).getPropertyValue(e)}function m6(t){return function(){delete this[t]}}function y6(t,e){return function(){this[t]=e}}function b6(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function v6(t,e){return arguments.length>1?this.each((e==null?m6:typeof e=="function"?b6:y6)(t,e)):this.node()[t]}function Bg(t){return t.trim().split(/^|\s+/)}function Fc(t){return t.classList||new Yg(t)}function Yg(t){this._node=t,this._names=Bg(t.getAttribute("class")||"")}Yg.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Wg(t,e){for(var n=Fc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Hg(t,e){for(var n=Fc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function x6(t){return function(){Wg(this,t)}}function _6(t){return function(){Hg(this,t)}}function w6(t,e){return function(){(e.apply(this,arguments)?Wg:Hg)(this,t)}}function $6(t,e){var n=Bg(t+"");if(arguments.length<2){for(var r=Fc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?w6:e?x6:_6)(n,e))}function S6(){this.textContent=""}function A6(t){return function(){this.textContent=t}}function M6(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function T6(t){return arguments.length?this.each(t==null?S6:(typeof t=="function"?M6:A6)(t)):this.node().textContent}function P6(){this.innerHTML=""}function D6(t){return function(){this.innerHTML=t}}function L6(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function E6(t){return arguments.length?this.each(t==null?P6:(typeof t=="function"?L6:D6)(t)):this.node().innerHTML}function k6(){this.nextSibling&&this.parentNode.appendChild(this)}function C6(){return this.each(k6)}function I6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function R6(){return this.each(I6)}function N6(t){var e=typeof t=="function"?t:Aa(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function F6(){return null}function G6(t,e){var n=typeof t=="function"?t:Aa(t),r=e==null?F6:typeof e=="function"?e:Ma(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function z6(){var t=this.parentNode;t&&t.removeChild(this)}function O6(){return this.each(z6)}function U6(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function B6(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Y6(t){return this.select(t?B6:U6)}function W6(t){return arguments.length?this.property("__data__",t):this.node().__data__}function H6(t){return function(e){t.call(this,e,this.__data__)}}function q6(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function X6(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function j6(t,e,n){return function(){var r=this.__on,i,o=H6(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function V6(t,e,n){var r=q6(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,l;u<c;++u)for(i=0,l=s[u];i<o;++i)if((a=r[i]).type===l.type&&a.name===l.name)return l.value}return}for(s=e?j6:X6,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function qg(t,e,n){var r=Nc(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Z6(t,e){return function(){return qg(this,t,e)}}function K6(t,e){return function(){return qg(this,t,e.apply(this,arguments))}}function Q6(t,e){return this.each((typeof e=="function"?K6:Z6)(t,e))}function*J6(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var Gc=[null];function Yt(t,e){this._groups=t,this._parents=e}function Gn(){return new Yt([[document.documentElement]],Gc)}function t8(){return this}Yt.prototype=Gn.prototype={constructor:Yt,select:T5,selectAll:L5,selectChild:I5,selectChildren:G5,filter:z5,data:H5,enter:O5,exit:X5,join:j5,merge:V5,selection:t8,order:Z5,sort:K5,call:J5,nodes:t6,node:e6,size:n6,empty:r6,each:i6,attr:f6,style:g6,property:v6,classed:$6,text:T6,html:E6,raise:C6,lower:R6,append:N6,insert:G6,remove:O6,clone:Y6,datum:W6,on:V6,dispatch:Q6,[Symbol.iterator]:J6};function V(t){return typeof t=="string"?new Yt([[document.querySelector(t)]],[document.documentElement]):new Yt([[t]],Gc)}function e8(t){return V(Aa(t).call(document.documentElement))}var n8=0;function Xg(){return new zc}function zc(){this._="@"+(++n8).toString(36)}zc.prototype=Xg.prototype={constructor:zc,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function jg(t){let e;for(;e=t.sourceEvent;)t=e;return t}function se(t,e){if(t=jg(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}function r8(t,e){return t.target&&(t=jg(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>se(n,e))}function i8(t){return typeof t=="string"?new Yt([document.querySelectorAll(t)],[document.documentElement]):new Yt([zg(t)],Gc)}const o8={passive:!1},Fi={capture:!0,passive:!1};function Oc(t){t.stopImmediatePropagation()}function Pr(t){t.preventDefault(),t.stopImmediatePropagation()}function Pa(t){var e=t.document.documentElement,n=V(t).on("dragstart.drag",Pr,Fi);"onselectstart"in e?n.on("selectstart.drag",Pr,Fi):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Da(t,e){var n=t.document.documentElement,r=V(t).on("dragstart.drag",null);e&&(r.on("click.drag",Pr,Fi),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const La=t=>()=>t;function Uc(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:u,dy:c,dispatch:l}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:l}})}Uc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function a8(t){return!t.ctrlKey&&!t.button}function s8(){return this.parentNode}function u8(t,e){return e??{x:t.x,y:t.y}}function c8(){return navigator.maxTouchPoints||"ontouchstart"in this}function Vg(){var t=a8,e=s8,n=u8,r=c8,i={},o=Nn("start","drag","end"),a=0,s,u,c,l,h=0;function f(b){b.on("mousedown.drag",d).filter(r).on("touchstart.drag",m).on("touchmove.drag",y,o8).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(b,w){if(!(l||!t.call(this,b,w))){var $=x(this,e.call(this,b,w),b,w,"mouse");$&&(V(b.view).on("mousemove.drag",p,Fi).on("mouseup.drag",g,Fi),Pa(b.view),Oc(b),c=!1,s=b.clientX,u=b.clientY,$("start",b))}}function p(b){if(Pr(b),!c){var w=b.clientX-s,$=b.clientY-u;c=w*w+$*$>h}i.mouse("drag",b)}function g(b){V(b.view).on("mousemove.drag mouseup.drag",null),Da(b.view,c),Pr(b),i.mouse("end",b)}function m(b,w){if(t.call(this,b,w)){var $=b.changedTouches,A=e.call(this,b,w),_=$.length,L,E;for(L=0;L<_;++L)(E=x(this,A,b,w,$[L].identifier,$[L]))&&(Oc(b),E("start",b,$[L]))}}function y(b){var w=b.changedTouches,$=w.length,A,_;for(A=0;A<$;++A)(_=i[w[A].identifier])&&(Pr(b),_("drag",b,w[A]))}function v(b){var w=b.changedTouches,$=w.length,A,_;for(l&&clearTimeout(l),l=setTimeout(function(){l=null},500),A=0;A<$;++A)(_=i[w[A].identifier])&&(Oc(b),_("end",b,w[A]))}function x(b,w,$,A,_,L){var E=o.copy(),T=se(L||$,w),I,P,D;if((D=n.call(b,new Uc("beforestart",{sourceEvent:$,target:f,identifier:_,active:a,x:T[0],y:T[1],dx:0,dy:0,dispatch:E}),A))!=null)return I=D.x-T[0]||0,P=D.y-T[1]||0,function C(S,R,G){var M=T,N;switch(S){case"start":i[_]=C,N=a++;break;case"end":delete i[_],--a;case"drag":T=se(G||R,w),N=a;break}E.call(S,b,new Uc(S,{sourceEvent:R,subject:D,target:f,identifier:_,active:N,x:T[0]+I,y:T[1]+P,dx:T[0]-M[0],dy:T[1]-M[1],dispatch:E}),A)}}return f.filter=function(b){return arguments.length?(t=typeof b=="function"?b:La(!!b),f):t},f.container=function(b){return arguments.length?(e=typeof b=="function"?b:La(b),f):e},f.subject=function(b){return arguments.length?(n=typeof b=="function"?b:La(b),f):n},f.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:La(!!b),f):r},f.on=function(){var b=o.on.apply(o,arguments);return b===o?f:b},f.clickDistance=function(b){return arguments.length?(h=(b=+b)*b,f):Math.sqrt(h)},f}function Dr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Gi(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function fn(){}var zn=.7,Lr=1/zn,Er="\\s*([+-]?\\d+)\\s*",zi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ke="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",l8=/^#([0-9a-f]{3,8})$/,f8=new RegExp(`^rgb\\(${Er},${Er},${Er}\\)$`),h8=new RegExp(`^rgb\\(${ke},${ke},${ke}\\)$`),d8=new RegExp(`^rgba\\(${Er},${Er},${Er},${zi}\\)$`),p8=new RegExp(`^rgba\\(${ke},${ke},${ke},${zi}\\)$`),g8=new RegExp(`^hsl\\(${zi},${ke},${ke}\\)$`),m8=new RegExp(`^hsla\\(${zi},${ke},${ke},${zi}\\)$`),Zg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Dr(fn,hn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Kg,formatHex:Kg,formatHex8:y8,formatHsl:b8,formatRgb:Qg,toString:Qg});function Kg(){return this.rgb().formatHex()}function y8(){return this.rgb().formatHex8()}function b8(){return r0(this).formatHsl()}function Qg(){return this.rgb().formatRgb()}function hn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=l8.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Jg(e):n===3?new kt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Ea(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Ea(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=f8.exec(t))?new kt(e[1],e[2],e[3],1):(e=h8.exec(t))?new kt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=d8.exec(t))?Ea(e[1],e[2],e[3],e[4]):(e=p8.exec(t))?Ea(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=g8.exec(t))?n0(e[1],e[2]/100,e[3]/100,1):(e=m8.exec(t))?n0(e[1],e[2]/100,e[3]/100,e[4]):Zg.hasOwnProperty(t)?Jg(Zg[t]):t==="transparent"?new kt(NaN,NaN,NaN,0):null}function Jg(t){return new kt(t>>16&255,t>>8&255,t&255,1)}function Ea(t,e,n,r){return r<=0&&(t=e=n=NaN),new kt(t,e,n,r)}function Bc(t){return t instanceof fn||(t=hn(t)),t?(t=t.rgb(),new kt(t.r,t.g,t.b,t.opacity)):new kt}function kr(t,e,n,r){return arguments.length===1?Bc(t):new kt(t,e,n,r??1)}function kt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Dr(kt,kr,Gi(fn,{brighter(t){return t=t==null?Lr:Math.pow(Lr,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new kt(On(this.r),On(this.g),On(this.b),ka(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:t0,formatHex:t0,formatHex8:v8,formatRgb:e0,toString:e0}));function t0(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}`}function v8(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}${Un((isNaN(this.opacity)?1:this.opacity)*255)}`}function e0(){const t=ka(this.opacity);return`${t===1?"rgb(":"rgba("}${On(this.r)}, ${On(this.g)}, ${On(this.b)}${t===1?")":`, ${t})`}`}function ka(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function On(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Un(t){return t=On(t),(t<16?"0":"")+t.toString(16)}function n0(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Se(t,e,n,r)}function r0(t){if(t instanceof Se)return new Se(t.h,t.s,t.l,t.opacity);if(t instanceof fn||(t=hn(t)),!t)return new Se;if(t instanceof Se)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Se(a,s,u,t.opacity)}function Ca(t,e,n,r){return arguments.length===1?r0(t):new Se(t,e,n,r??1)}function Se(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Dr(Se,Ca,Gi(fn,{brighter(t){return t=t==null?Lr:Math.pow(Lr,t),new Se(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,t),new Se(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new kt(Yc(t>=240?t-240:t+120,i,r),Yc(t,i,r),Yc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Se(i0(this.h),Ia(this.s),Ia(this.l),ka(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=ka(this.opacity);return`${t===1?"hsl(":"hsla("}${i0(this.h)}, ${Ia(this.s)*100}%, ${Ia(this.l)*100}%${t===1?")":`, ${t})`}`}}));function i0(t){return t=(t||0)%360,t<0?t+360:t}function Ia(t){return Math.max(0,Math.min(1,t||0))}function Yc(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const o0=Math.PI/180,a0=180/Math.PI,Ra=18,s0=.96422,u0=1,c0=.82521,l0=4/29,Cr=6/29,f0=3*Cr*Cr,x8=Cr*Cr*Cr;function h0(t){if(t instanceof Ae)return new Ae(t.l,t.a,t.b,t.opacity);if(t instanceof Ce)return p0(t);t instanceof kt||(t=Bc(t));var e=Xc(t.r),n=Xc(t.g),r=Xc(t.b),i=Wc((.2225045*e+.7168786*n+.0606169*r)/u0),o,a;return e===n&&n===r?o=a=i:(o=Wc((.4360747*e+.3850649*n+.1430804*r)/s0),a=Wc((.0139322*e+.0971045*n+.7141733*r)/c0)),new Ae(116*i-16,500*(o-i),200*(i-a),t.opacity)}function _8(t,e){return new Ae(t,0,0,e??1)}function Na(t,e,n,r){return arguments.length===1?h0(t):new Ae(t,e,n,r??1)}function Ae(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Dr(Ae,Na,Gi(fn,{brighter(t){return new Ae(this.l+Ra*(t??1),this.a,this.b,this.opacity)},darker(t){return new Ae(this.l-Ra*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=s0*Hc(e),t=u0*Hc(t),n=c0*Hc(n),new kt(qc(3.1338561*e-1.6168667*t-.4906146*n),qc(-.9787684*e+1.9161415*t+.033454*n),qc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Wc(t){return t>x8?Math.pow(t,1/3):t/f0+l0}function Hc(t){return t>Cr?t*t*t:f0*(t-l0)}function qc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Xc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function d0(t){if(t instanceof Ce)return new Ce(t.h,t.c,t.l,t.opacity);if(t instanceof Ae||(t=h0(t)),t.a===0&&t.b===0)return new Ce(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*a0;return new Ce(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function w8(t,e,n,r){return arguments.length===1?d0(t):new Ce(n,e,t,r??1)}function Fa(t,e,n,r){return arguments.length===1?d0(t):new Ce(t,e,n,r??1)}function Ce(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function p0(t){if(isNaN(t.h))return new Ae(t.l,0,0,t.opacity);var e=t.h*o0;return new Ae(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Dr(Ce,Fa,Gi(fn,{brighter(t){return new Ce(this.h,this.c,this.l+Ra*(t??1),this.opacity)},darker(t){return new Ce(this.h,this.c,this.l-Ra*(t??1),this.opacity)},rgb(){return p0(this).rgb()}}));var g0=-.14861,jc=1.78277,Vc=-.29227,Ga=-.90649,Oi=1.97294,m0=Oi*Ga,y0=Oi*jc,b0=jc*Vc-Ga*g0;function $8(t){if(t instanceof Bn)return new Bn(t.h,t.s,t.l,t.opacity);t instanceof kt||(t=Bc(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(b0*r+m0*e-y0*n)/(b0+m0-y0),o=r-i,a=(Oi*(n-i)-Vc*o)/Ga,s=Math.sqrt(a*a+o*o)/(Oi*i*(1-i)),u=s?Math.atan2(a,o)*a0-120:NaN;return new Bn(u<0?u+360:u,s,i,t.opacity)}function Me(t,e,n,r){return arguments.length===1?$8(t):new Bn(t,e,n,r??1)}function Bn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Dr(Bn,Me,Gi(fn,{brighter(t){return t=t==null?Lr:Math.pow(Lr,t),new Bn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,t),new Bn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*o0,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new kt(255*(e+n*(g0*r+jc*i)),255*(e+n*(Vc*r+Ga*i)),255*(e+n*(Oi*r)),this.opacity)}}));function v0(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}function x0(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return v0((n-r/e)*e,a,i,o,s)}}function _0(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return v0((n-r/e)*e,i,o,a,s)}}const za=t=>()=>t;function w0(t,e){return function(n){return t+n*e}}function S8(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Oa(t,e){var n=e-t;return n?w0(t,n>180||n<-180?n-360*Math.round(n/360):n):za(isNaN(t)?e:t)}function A8(t){return(t=+t)==1?Ct:function(e,n){return n-e?S8(e,n,t):za(isNaN(e)?n:e)}}function Ct(t,e){var n=e-t;return n?w0(t,n):za(isNaN(t)?e:t)}const Ui=function t(e){var n=A8(e);function r(i,o){var a=n((i=kr(i)).r,(o=kr(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=Ct(i.opacity,o.opacity);return function(l){return i.r=a(l),i.g=s(l),i.b=u(l),i.opacity=c(l),i+""}}return r.gamma=t,r}(1);function $0(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;a<n;++a)s=kr(e[a]),r[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return r=t(r),i=t(i),o=t(o),s.opacity=1,function(u){return s.r=r(u),s.g=i(u),s.b=o(u),s+""}}}var S0=$0(x0),M8=$0(_0);function Zc(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function A0(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function T8(t,e){return(A0(e)?Zc:M0)(t,e)}function M0(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=dn(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function T0(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function he(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function P0(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=dn(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Kc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qc=new RegExp(Kc.source,"g");function P8(t){return function(){return t}}function D8(t){return function(e){return t(e)+""}}function Jc(t,e){var n=Kc.lastIndex=Qc.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=Kc.exec(t))&&(i=Qc.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:he(r,i)})),n=Qc.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?D8(u[0].x):P8(e):(e=u.length,function(c){for(var l=0,h;l<e;++l)s[(h=u[l]).i]=h.x(c);return s.join("")})}function dn(t,e){var n=typeof e,r;return e==null||n==="boolean"?za(e):(n==="number"?he:n==="string"?(r=hn(e))?(e=r,Ui):Jc:e instanceof hn?Ui:e instanceof Date?T0:A0(e)?Zc:Array.isArray(e)?M0:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?P0:he)(t,e)}function L8(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function E8(t,e){var n=Oa(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Ua(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var D0=180/Math.PI,tl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function L0(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*D0,skewX:Math.atan(u)*D0,scaleX:a,scaleY:s}}var Ba;function k8(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?tl:L0(e.a,e.b,e.c,e.d,e.e,e.f)}function C8(t){return t==null||(Ba||(Ba=document.createElementNS("http://www.w3.org/2000/svg","g")),Ba.setAttribute("transform",t),!(t=Ba.transform.baseVal.consolidate()))?tl:(t=t.matrix,L0(t.a,t.b,t.c,t.d,t.e,t.f))}function E0(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push("translate(",null,e,null,n);p.push({i:g-4,x:he(c,h)},{i:g-2,x:he(l,f)})}else(h||f)&&d.push("translate("+h+e+f+n)}function a(c,l,h,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:he(c,l)})):l&&h.push(i(h)+"rotate("+l+r)}function s(c,l,h,f){c!==l?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:he(c,l)}):l&&h.push(i(h)+"skewX("+l+r)}function u(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push(i(d)+"scale(",null,",",null,")");p.push({i:g-4,x:he(c,h)},{i:g-2,x:he(l,f)})}else(h!==1||f!==1)&&d.push(i(d)+"scale("+h+","+f+")")}return function(c,l){var h=[],f=[];return c=t(c),l=t(l),o(c.translateX,c.translateY,l.translateX,l.translateY,h,f),a(c.rotate,l.rotate,h,f),s(c.skewX,l.skewX,h,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,h,f),c=l=null,function(d){for(var p=-1,g=f.length,m;++p<g;)h[(m=f[p]).i]=m.x(d);return h.join("")}}}var k0=E0(k8,"px, ","px)","deg)"),C0=E0(C8,", ",")",")"),I8=1e-12;function I0(t){return((t=Math.exp(t))+1/t)/2}function R8(t){return((t=Math.exp(t))-1/t)/2}function N8(t){return((t=Math.exp(2*t))-1)/(t+1)}const R0=function t(e,n,r){function i(o,a){var s=o[0],u=o[1],c=o[2],l=a[0],h=a[1],f=a[2],d=l-s,p=h-u,g=d*d+p*p,m,y;if(g<I8)y=Math.log(f/c)/e,m=function(A){return[s+A*d,u+A*p,c*Math.exp(e*A*y)]};else{var v=Math.sqrt(g),x=(f*f-c*c+r*g)/(2*c*n*v),b=(f*f-c*c-r*g)/(2*f*n*v),w=Math.log(Math.sqrt(x*x+1)-x),$=Math.log(Math.sqrt(b*b+1)-b);y=($-w)/e,m=function(A){var _=A*y,L=I0(w),E=c/(n*v)*(L*N8(e*_+w)-R8(w));return[s+E*d,u+E*p,c*L/I0(e*_+w)]}}return m.duration=y*1e3*e/Math.SQRT2,m}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,u=s*s;return t(a,s,u)},i}(Math.SQRT2,2,4);function N0(t){return function(e,n){var r=t((e=Ca(e)).h,(n=Ca(n)).h),i=Ct(e.s,n.s),o=Ct(e.l,n.l),a=Ct(e.opacity,n.opacity);return function(s){return e.h=r(s),e.s=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const F8=N0(Oa);var G8=N0(Ct);function z8(t,e){var n=Ct((t=Na(t)).l,(e=Na(e)).l),r=Ct(t.a,e.a),i=Ct(t.b,e.b),o=Ct(t.opacity,e.opacity);return function(a){return t.l=n(a),t.a=r(a),t.b=i(a),t.opacity=o(a),t+""}}function F0(t){return function(e,n){var r=t((e=Fa(e)).h,(n=Fa(n)).h),i=Ct(e.c,n.c),o=Ct(e.l,n.l),a=Ct(e.opacity,n.opacity);return function(s){return e.h=r(s),e.c=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const O8=F0(Oa);var U8=F0(Ct);function G0(t){return function e(n){n=+n;function r(i,o){var a=t((i=Me(i)).h,(o=Me(o)).h),s=Ct(i.s,o.s),u=Ct(i.l,o.l),c=Ct(i.opacity,o.opacity);return function(l){return i.h=a(l),i.s=s(l),i.l=u(Math.pow(l,n)),i.opacity=c(l),i+""}}return r.gamma=e,r}(1)}const B8=G0(Oa);var Ya=G0(Ct);function z0(t,e){e===void 0&&(e=t,t=dn);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function Y8(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Ir=0,Bi=0,Yi=0,O0=1e3,Wa,Wi,Ha=0,Yn=0,qa=0,Hi=typeof performance=="object"&&performance.now?performance:Date,U0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function qi(){return Yn||(U0(W8),Yn=Hi.now()+qa)}function W8(){Yn=0}function Xi(){this._call=this._time=this._next=null}Xi.prototype=Xa.prototype={constructor:Xi,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?qi():+n)+(e==null?0:+e),!this._next&&Wi!==this&&(Wi?Wi._next=this:Wa=this,Wi=this),this._call=t,this._time=n,el()},stop:function(){this._call&&(this._call=null,this._time=1/0,el())}};function Xa(t,e,n){var r=new Xi;return r.restart(t,e,n),r}function B0(){qi(),++Ir;for(var t=Wa,e;t;)(e=Yn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Ir}function Y0(){Yn=(Ha=Hi.now())+qa,Ir=Bi=0;try{B0()}finally{Ir=0,q8(),Yn=0}}function H8(){var t=Hi.now(),e=t-Ha;e>O0&&(qa-=e,Ha=t)}function q8(){for(var t,e=Wa,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Wa=n);Wi=t,el(r)}function el(t){if(!Ir){Bi&&(Bi=clearTimeout(Bi));var e=t-Yn;e>24?(t<1/0&&(Bi=setTimeout(Y0,t-Hi.now()-qa)),Yi&&(Yi=clearInterval(Yi))):(Yi||(Ha=Hi.now(),Yi=setInterval(H8,O0)),Ir=1,U0(Y0))}}function nl(t,e,n){var r=new Xi;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function X8(t,e,n){var r=new Xi,i=e;return e==null?(r.restart(t,e,n),r):(r._restart=r.restart,r.restart=function(o,a,s){a=+a,s=s==null?qi():+s,r._restart(function u(c){c+=i,r._restart(u,i+=a,s),o(c)},a,s)},r.restart(t,e,n),r)}var j8=Nn("start","end","cancel","interrupt"),V8=[],W0=0,rl=1,il=2,ja=3,H0=4,ol=5,Va=6;function Za(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;Z8(t,n,{name:e,index:r,group:i,on:j8,tween:V8,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:W0})}function al(t,e){var n=Te(t,e);if(n.state>W0)throw new Error("too late; already scheduled");return n}function Ie(t,e){var n=Te(t,e);if(n.state>ja)throw new Error("too late; already running");return n}function Te(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Z8(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Xa(o,0,n.time);function o(c){n.state=rl,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,h,f,d;if(n.state!==rl)return u();for(l in r)if(d=r[l],d.name===n.name){if(d.state===ja)return nl(a);d.state===H0?(d.state=Va,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=Va,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(nl(function(){n.state===ja&&(n.state=H0,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=il,n.on.call("start",t,t.__data__,n.index,n.group),n.state===il){for(n.state=ja,i=new Array(f=n.tween.length),l=0,h=-1;l<f;++l)(d=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=d);i.length=h+1}}function s(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=ol,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===ol&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=Va,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function Wn(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>il&&r.state<ol,r.state=Va,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function K8(t){return this.each(function(){Wn(this,t)})}function Q8(t,e){var n,r;return function(){var i=Ie(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function J8(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ie(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function t4(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Te(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?Q8:J8)(n,t,e))}function sl(t,e,n){var r=t._id;return t.each(function(){var i=Ie(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Te(i,r).value[e]}}function q0(t,e){var n;return(typeof e=="number"?he:e instanceof hn?Ui:(n=hn(e))?(e=n,Ui):Jc)(t,e)}function e4(t){return function(){this.removeAttribute(t)}}function n4(t){return function(){this.removeAttributeNS(t.space,t.local)}}function r4(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function i4(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function o4(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function a4(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function s4(t,e){var n=Ni(t),r=n==="transform"?C0:q0;return this.attrTween(t,typeof e=="function"?(n.local?a4:o4)(n,r,sl(this,"attr."+t,e)):e==null?(n.local?n4:e4)(n):(n.local?i4:r4)(n,r,e))}function u4(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function c4(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function l4(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&c4(t,o)),n}return i._value=e,i}function f4(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&u4(t,o)),n}return i._value=e,i}function h4(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Ni(t);return this.tween(n,(r.local?l4:f4)(r,e))}function d4(t,e){return function(){al(this,t).delay=+e.apply(this,arguments)}}function p4(t,e){return e=+e,function(){al(this,t).delay=e}}function g4(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?d4:p4)(e,t)):Te(this.node(),e).delay}function m4(t,e){return function(){Ie(this,t).duration=+e.apply(this,arguments)}}function y4(t,e){return e=+e,function(){Ie(this,t).duration=e}}function b4(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?m4:y4)(e,t)):Te(this.node(),e).duration}function v4(t,e){if(typeof e!="function")throw new Error;return function(){Ie(this,t).ease=e}}function x4(t){var e=this._id;return arguments.length?this.each(v4(e,t)):Te(this.node(),e).ease}function _4(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ie(this,t).ease=n}}function w4(t){if(typeof t!="function")throw new Error;return this.each(_4(this._id,t))}function $4(t){typeof t!="function"&&(t=Rc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new Re(r,this._parents,this._name,this._id)}function S4(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=e[s],c=n[s],l=u.length,h=a[s]=new Array(l),f,d=0;d<l;++d)(f=u[d]||c[d])&&(h[d]=f);for(;s<r;++s)a[s]=e[s];return new Re(a,this._parents,this._name,this._id)}function A4(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function M4(t,e,n){var r,i,o=A4(e)?al:Ie;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function T4(t,e){var n=this._id;return arguments.length<2?Te(this.node(),n).on.on(t):this.each(M4(n,t,e))}function P4(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function D4(){return this.on("end.remove",P4(this._id))}function L4(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ma(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,c=o[a]=new Array(u),l,h,f=0;f<u;++f)(l=s[f])&&(h=t.call(l,l.__data__,f,s))&&("__data__"in l&&(h.__data__=l.__data__),c[f]=h,Za(c[f],e,n,f,c,Te(l,n)));return new Re(o,this._parents,e,n)}function E4(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ic(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],c=u.length,l,h=0;h<c;++h)if(l=u[h]){for(var f=t.call(l,l.__data__,h,u),d,p=Te(l,n),g=0,m=f.length;g<m;++g)(d=f[g])&&Za(d,e,n,g,f,p);o.push(f),a.push(l)}return new Re(o,a,e,n)}var k4=Gn.prototype.constructor;function C4(){return new k4(this._groups,this._parents)}function I4(t,e){var n,r,i;return function(){var o=Fn(this,t),a=(this.style.removeProperty(t),Fn(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function X0(t){return function(){this.style.removeProperty(t)}}function R4(t,e,n){var r,i=n+"",o;return function(){var a=Fn(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function N4(t,e,n){var r,i,o;return function(){var a=Fn(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),Fn(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function F4(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Ie(this,t),c=u.on,l=u.value[o]==null?s||(s=X0(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function G4(t,e,n){var r=(t+="")=="transform"?k0:q0;return e==null?this.styleTween(t,I4(t,r)).on("end.style."+t,X0(t)):typeof e=="function"?this.styleTween(t,N4(t,r,sl(this,"style."+t,e))).each(F4(this._id,t)):this.styleTween(t,R4(t,r,e),n).on("end.style."+t,null)}function z4(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function O4(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&z4(t,a,n)),r}return o._value=e,o}function U4(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,O4(t,e,n??""))}function B4(t){return function(){this.textContent=t}}function Y4(t){return function(){var e=t(this);this.textContent=e??""}}function W4(t){return this.tween("text",typeof t=="function"?Y4(sl(this,"text",t)):B4(t==null?"":t+""))}function H4(t){return function(e){this.textContent=t.call(this,e)}}function q4(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&H4(i)),e}return r._value=t,r}function X4(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,q4(t))}function j4(){for(var t=this._name,e=this._id,n=V0(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var l=Te(u,e);Za(u,t,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Re(r,this._parents,t,n)}function V4(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var c=Ie(this,r),l=c.on;l!==t&&(e=(t=l).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),c.on=e}),i===0&&o()})}var Z4=0;function Re(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function j0(t){return Gn().transition(t)}function V0(){return++Z4}var je=Gn.prototype;Re.prototype=j0.prototype={constructor:Re,select:L4,selectAll:E4,selectChild:je.selectChild,selectChildren:je.selectChildren,filter:$4,merge:S4,selection:C4,transition:j4,call:je.call,nodes:je.nodes,node:je.node,size:je.size,empty:je.empty,each:je.each,on:T4,attr:s4,attrTween:h4,style:G4,styleTween:U4,text:W4,textTween:X4,remove:D4,tween:t4,delay:g4,duration:b4,ease:x4,easeVarying:w4,end:V4,[Symbol.iterator]:je[Symbol.iterator]};const K4=t=>+t;function Q4(t){return t*t}function J4(t){return t*(2-t)}function Z0(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function tM(t){return t*t*t}function eM(t){return--t*t*t+1}function ji(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var ul=3,nM=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(ul),rM=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(ul),K0=function t(e){e=+e;function n(r){return((r*=2)<=1?Math.pow(r,e):2-Math.pow(2-r,e))/2}return n.exponent=t,n}(ul),Q0=Math.PI,J0=Q0/2;function iM(t){return+t==1?1:1-Math.cos(t*J0)}function oM(t){return Math.sin(t*J0)}function t1(t){return(1-Math.cos(Q0*t))/2}function pn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function aM(t){return pn(1-+t)}function sM(t){return 1-pn(t)}function e1(t){return((t*=2)<=1?pn(1-t):2-pn(t-1))/2}function uM(t){return 1-Math.sqrt(1-t*t)}function cM(t){return Math.sqrt(1- --t*t)}function n1(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var cl=4/11,lM=6/11,fM=8/11,hM=3/4,dM=9/11,pM=10/11,gM=15/16,mM=21/22,yM=63/64,Ka=1/cl/cl;function bM(t){return 1-Vi(1-t)}function Vi(t){return(t=+t)<cl?Ka*t*t:t<fM?Ka*(t-=lM)*t+hM:t<pM?Ka*(t-=dM)*t+gM:Ka*(t-=mM)*t+yM}function vM(t){return((t*=2)<=1?1-Vi(1-t):Vi(t-1)+1)/2}var ll=1.70158,xM=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(ll),_M=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(ll),r1=function t(e){e=+e;function n(r){return((r*=2)<1?r*r*((e+1)*r-e):(r-=2)*r*((e+1)*r+e)+2)/2}return n.overshoot=t,n}(ll),Rr=2*Math.PI,fl=1,hl=.3,wM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Rr);function i(o){return e*pn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*Rr)},i.period=function(o){return t(e,o)},i}(fl,hl),Qa=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Rr);function i(o){return 1-e*pn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*Rr)},i.period=function(o){return t(e,o)},i}(fl,hl),$M=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Rr);function i(o){return((o=o*2-1)<0?e*pn(-o)*Math.sin((r-o)/n):2-e*pn(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return t(o,n*Rr)},i.period=function(o){return t(e,o)},i}(fl,hl),SM={time:null,delay:0,duration:250,ease:ji};function AM(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function MM(t){var e,n;t instanceof Re?(e=t._id,t=t._name):(e=V0(),(n=SM).time=qi(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&Za(u,t,e,c,a,n||AM(u,e));return new Re(r,this._parents,t,e)}Gn.prototype.interrupt=K8,Gn.prototype.transition=MM;var TM=[null];function PM(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>rl&&r.name===e)return new Re([[t]],TM,e,+i)}return null}const dl=t=>()=>t;function DM(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function LM(t){t.stopImmediatePropagation()}function pl(t){t.preventDefault(),t.stopImmediatePropagation()}var i1={name:"drag"},gl={name:"space"},Nr={name:"handle"},Fr={name:"center"};const{abs:o1,max:Gt,min:zt}=Math;function a1(t){return[+t[0],+t[1]]}function ml(t){return[a1(t[0]),a1(t[1])]}var Ja={name:"x",handles:["w","e"].map(Zi),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},ts={name:"y",handles:["n","s"].map(Zi),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},EM={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Zi),input:function(t){return t==null?null:ml(t)},output:function(t){return t}},Ve={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},s1={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},u1={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},kM={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},CM={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Zi(t){return{type:t}}function IM(t){return!t.ctrlKey&&!t.button}function RM(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function NM(){return navigator.maxTouchPoints||"ontouchstart"in this}function yl(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function FM(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function GM(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function zM(){return bl(Ja)}function OM(){return bl(ts)}function UM(){return bl(EM)}function bl(t){var e=RM,n=IM,r=NM,i=!0,o=Nn("start","brush","end"),a=6,s;function u(m){var y=m.property("__brush",g).selectAll(".overlay").data([Zi("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ve.overlay).merge(y).each(function(){var x=yl(this).extent;V(this).attr("x",x[0][0]).attr("y",x[0][1]).attr("width",x[1][0]-x[0][0]).attr("height",x[1][1]-x[0][1])}),m.selectAll(".selection").data([Zi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Ve.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var v=m.selectAll(".handle").data(t.handles,function(x){return x.type});v.exit().remove(),v.enter().append("rect").attr("class",function(x){return"handle handle--"+x.type}).attr("cursor",function(x){return Ve[x.type]}),m.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(r).on("touchstart.brush",f).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}u.move=function(m,y,v){m.tween?m.on("start.brush",function(x){l(this,arguments).beforestart().start(x)}).on("interrupt.brush end.brush",function(x){l(this,arguments).end(x)}).tween("brush",function(){var x=this,b=x.__brush,w=l(x,arguments),$=b.selection,A=t.input(typeof y=="function"?y.apply(this,arguments):y,b.extent),_=dn($,A);function L(E){b.selection=E===1&&A===null?null:_(E),c.call(x),w.brush()}return $!==null&&A!==null?L:L(1)}):m.each(function(){var x=this,b=arguments,w=x.__brush,$=t.input(typeof y=="function"?y.apply(x,b):y,w.extent),A=l(x,b).beforestart();Wn(x),w.selection=$===null?null:$,c.call(x),A.start(v).brush(v).end(v)})},u.clear=function(m,y){u.move(m,null,y)};function c(){var m=V(this),y=yl(this).selection;y?(m.selectAll(".selection").style("display",null).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(v){return v.type[v.type.length-1]==="e"?y[1][0]-a/2:y[0][0]-a/2}).attr("y",function(v){return v.type[0]==="s"?y[1][1]-a/2:y[0][1]-a/2}).attr("width",function(v){return v.type==="n"||v.type==="s"?y[1][0]-y[0][0]+a:a}).attr("height",function(v){return v.type==="e"||v.type==="w"?y[1][1]-y[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(m,y,v){var x=m.__brush.emitter;return x&&(!v||!x.clean)?x:new h(m,y,v)}function h(m,y,v){this.that=m,this.args=y,this.state=m.__brush,this.active=0,this.clean=v}h.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,y){return this.starting?(this.starting=!1,this.emit("start",m,y)):this.emit("brush",m),this},brush:function(m,y){return this.emit("brush",m,y),this},end:function(m,y){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,y)),this},emit:function(m,y,v){var x=V(this.that).datum();o.call(m,this.that,new DM(m,{sourceEvent:y,target:u,selection:t.output(this.state.selection),mode:v,dispatch:o}),x)}};function f(m){if(s&&!m.touches||!n.apply(this,arguments))return;var y=this,v=m.target.__data__.type,x=(i&&m.metaKey?v="overlay":v)==="selection"?i1:i&&m.altKey?Fr:Nr,b=t===ts?null:kM[v],w=t===Ja?null:CM[v],$=yl(y),A=$.extent,_=$.selection,L=A[0][0],E,T,I=A[0][1],P,D,C=A[1][0],S,R,G=A[1][1],M,N,z=0,k=0,Y,j=b&&w&&i&&m.shiftKey,W,X,Q=Array.from(m.touches||[m],it=>{const Mt=it.identifier;return it=se(it,y),it.point0=it.slice(),it.identifier=Mt,it});Wn(y);var ct=l(y,arguments,!0).beforestart();if(v==="overlay"){_&&(Y=!0);const it=[Q[0],Q[1]||Q[0]];$.selection=_=[[E=t===ts?L:zt(it[0][0],it[1][0]),P=t===Ja?I:zt(it[0][1],it[1][1])],[S=t===ts?C:Gt(it[0][0],it[1][0]),M=t===Ja?G:Gt(it[0][1],it[1][1])]],Q.length>1&&xt(m)}else E=_[0][0],P=_[0][1],S=_[1][0],M=_[1][1];T=E,D=P,R=S,N=M;var O=V(y).attr("pointer-events","none"),tt=O.selectAll(".overlay").attr("cursor",Ve[v]);if(m.touches)ct.moved=q,ct.ended=gt;else{var st=V(m.view).on("mousemove.brush",q,!0).on("mouseup.brush",gt,!0);i&&st.on("keydown.brush",Ft,!0).on("keyup.brush",te,!0),Pa(m.view)}c.call(y),ct.start(m,x.name);function q(it){for(const Mt of it.changedTouches||[it])for(const No of Q)No.identifier===Mt.identifier&&(No.cur=se(Mt,y));if(j&&!W&&!X&&Q.length===1){const Mt=Q[0];o1(Mt.cur[0]-Mt[0])>o1(Mt.cur[1]-Mt[1])?X=!0:W=!0}for(const Mt of Q)Mt.cur&&(Mt[0]=Mt.cur[0],Mt[1]=Mt.cur[1]);Y=!0,pl(it),xt(it)}function xt(it){const Mt=Q[0],No=Mt.point0;var An;switch(z=Mt[0]-No[0],k=Mt[1]-No[1],x){case gl:case i1:{b&&(z=Gt(L-E,zt(C-S,z)),T=E+z,R=S+z),w&&(k=Gt(I-P,zt(G-M,k)),D=P+k,N=M+k);break}case Nr:{Q[1]?(b&&(T=Gt(L,zt(C,Q[0][0])),R=Gt(L,zt(C,Q[1][0])),b=1),w&&(D=Gt(I,zt(G,Q[0][1])),N=Gt(I,zt(G,Q[1][1])),w=1)):(b<0?(z=Gt(L-E,zt(C-E,z)),T=E+z,R=S):b>0&&(z=Gt(L-S,zt(C-S,z)),T=E,R=S+z),w<0?(k=Gt(I-P,zt(G-P,k)),D=P+k,N=M):w>0&&(k=Gt(I-M,zt(G-M,k)),D=P,N=M+k));break}case Fr:{b&&(T=Gt(L,zt(C,E-z*b)),R=Gt(L,zt(C,S+z*b))),w&&(D=Gt(I,zt(G,P-k*w)),N=Gt(I,zt(G,M+k*w)));break}}R<T&&(b*=-1,An=E,E=S,S=An,An=T,T=R,R=An,v in s1&&tt.attr("cursor",Ve[v=s1[v]])),N<D&&(w*=-1,An=P,P=M,M=An,An=D,D=N,N=An,v in u1&&tt.attr("cursor",Ve[v=u1[v]])),$.selection&&(_=$.selection),W&&(T=_[0][0],R=_[1][0]),X&&(D=_[0][1],N=_[1][1]),(_[0][0]!==T||_[0][1]!==D||_[1][0]!==R||_[1][1]!==N)&&($.selection=[[T,D],[R,N]],c.call(y),ct.brush(it,x.name))}function gt(it){if(LM(it),it.touches){if(it.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Da(it.view,Y),st.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);O.attr("pointer-events","all"),tt.attr("cursor",Ve.overlay),$.selection&&(_=$.selection),FM(_)&&($.selection=null,c.call(y)),ct.end(it,x.name)}function Ft(it){switch(it.keyCode){case 16:{j=b&&w;break}case 18:{x===Nr&&(b&&(S=R-z*b,E=T+z*b),w&&(M=N-k*w,P=D+k*w),x=Fr,xt(it));break}case 32:{(x===Nr||x===Fr)&&(b<0?S=R-z:b>0&&(E=T-z),w<0?M=N-k:w>0&&(P=D-k),x=gl,tt.attr("cursor",Ve.selection),xt(it));break}default:return}pl(it)}function te(it){switch(it.keyCode){case 16:{j&&(W=X=j=!1,xt(it));break}case 18:{x===Fr&&(b<0?S=R:b>0&&(E=T),w<0?M=N:w>0&&(P=D),x=Nr,xt(it));break}case 32:{x===gl&&(it.altKey?(b&&(S=R-z*b,E=T+z*b),w&&(M=N-k*w,P=D+k*w),x=Fr):(b<0?S=R:b>0&&(E=T),w<0?M=N:w>0&&(P=D),x=Nr),tt.attr("cursor",Ve[v]),xt(it));break}default:return}pl(it)}}function d(m){l(this,arguments).moved(m)}function p(m){l(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=ml(e.apply(this,arguments)),m.dim=t,m}return u.extent=function(m){return arguments.length?(e=typeof m=="function"?m:dl(ml(m)),u):e},u.filter=function(m){return arguments.length?(n=typeof m=="function"?m:dl(!!m),u):n},u.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:dl(!!m),u):r},u.handleSize=function(m){return arguments.length?(a=+m,u):a},u.keyModifiers=function(m){return arguments.length?(i=!!m,u):i},u.on=function(){var m=o.on.apply(o,arguments);return m===o?u:m},u}var c1=Math.abs,Gr=Math.cos,zr=Math.sin,l1=Math.PI,es=l1/2,f1=l1*2,h1=Math.max,vl=1e-12;function xl(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function BM(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function YM(){return _l(!1,!1)}function WM(){return _l(!1,!0)}function HM(){return _l(!0,!1)}function _l(t,e){var n=0,r=null,i=null,o=null;function a(s){var u=s.length,c=new Array(u),l=xl(0,u),h=new Array(u*u),f=new Array(u),d=0,p;s=Float64Array.from({length:u*u},e?(g,m)=>s[m%u][m/u|0]:(g,m)=>s[m/u|0][m%u]);for(let g=0;g<u;++g){let m=0;for(let y=0;y<u;++y)m+=s[g*u+y]+t*s[y*u+g];d+=c[g]=m}d=h1(0,f1-n*u)/d,p=d?n:f1/u;{let g=0;r&&l.sort((m,y)=>r(c[m],c[y]));for(const m of l){const y=g;if(t){const v=xl(~u+1,u).filter(x=>x<0?s[~x*u+m]:s[m*u+x]);i&&v.sort((x,b)=>i(x<0?-s[~x*u+m]:s[m*u+x],b<0?-s[~b*u+m]:s[m*u+b]));for(const x of v)if(x<0){const b=h[~x*u+m]||(h[~x*u+m]={source:null,target:null});b.target={index:m,startAngle:g,endAngle:g+=s[~x*u+m]*d,value:s[~x*u+m]}}else{const b=h[m*u+x]||(h[m*u+x]={source:null,target:null});b.source={index:m,startAngle:g,endAngle:g+=s[m*u+x]*d,value:s[m*u+x]}}f[m]={index:m,startAngle:y,endAngle:g,value:c[m]}}else{const v=xl(0,u).filter(x=>s[m*u+x]||s[x*u+m]);i&&v.sort((x,b)=>i(s[m*u+x],s[m*u+b]));for(const x of v){let b;if(m<x?(b=h[m*u+x]||(h[m*u+x]={source:null,target:null}),b.source={index:m,startAngle:g,endAngle:g+=s[m*u+x]*d,value:s[m*u+x]}):(b=h[x*u+m]||(h[x*u+m]={source:null,target:null}),b.target={index:m,startAngle:g,endAngle:g+=s[m*u+x]*d,value:s[m*u+x]},m===x&&(b.source=b.target)),b.source&&b.target&&b.source.value<b.target.value){const w=b.source;b.source=b.target,b.target=w}}f[m]={index:m,startAngle:y,endAngle:g,value:c[m]}}g+=p}}return h=Object.values(h),h.groups=f,o?h.sort(o):h}return a.padAngle=function(s){return arguments.length?(n=h1(0,s),a):n},a.sortGroups=function(s){return arguments.length?(r=s,a):r},a.sortSubgroups=function(s){return arguments.length?(i=s,a):i},a.sortChords=function(s){return arguments.length?(s==null?o=null:(o=BM(s))._=s,a):o&&o._},a}const wl=Math.PI,$l=2*wl,Hn=1e-6,qM=$l-Hn;function d1(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function XM(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return d1;const n=10**e;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let Ki=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?d1:XM(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,a){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,u=r-e,c=i-n,l=a-e,h=s-n,f=l*l+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>Hn)if(!(Math.abs(h*u-c*l)>Hn)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let d=r-a,p=i-s,g=u*u+c*c,m=d*d+p*p,y=Math.sqrt(g),v=Math.sqrt(f),x=o*Math.tan((wl-Math.acos((g+f-m)/(2*y*v)))/2),b=x/v,w=x/y;Math.abs(b-1)>Hn&&this._append`L${e+b*l},${n+b*h}`,this._append`A${o},${o},0,0,${+(h*d>l*p)},${this._x1=e+w*u},${this._y1=n+w*c}`}}arc(e,n,r,i,o,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),u=r*Math.sin(i),c=e+s,l=n+u,h=1^a,f=a?i-o:o-i;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Hn||Math.abs(this._y1-l)>Hn)&&this._append`L${c},${l}`,r&&(f<0&&(f=f%$l+$l),f>qM?this._append`A${r},${r},0,1,${h},${e-s},${n-u}A${r},${r},0,1,${h},${this._x1=c},${this._y1=l}`:f>Hn&&this._append`A${r},${r},0,${+(f>=wl)},${h},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function Sl(){return new Ki}Sl.prototype=Ki.prototype;function jM(t=3){return new Ki(+t)}var VM=Array.prototype.slice;function qn(t){return function(){return t}}function ZM(t){return t.source}function KM(t){return t.target}function p1(t){return t.radius}function QM(t){return t.startAngle}function JM(t){return t.endAngle}function t7(){return 0}function e7(){return 10}function g1(t){var e=ZM,n=KM,r=p1,i=p1,o=QM,a=JM,s=t7,u=null;function c(){var l,h=e.apply(this,arguments),f=n.apply(this,arguments),d=s.apply(this,arguments)/2,p=VM.call(arguments),g=+r.apply(this,(p[0]=h,p)),m=o.apply(this,p)-es,y=a.apply(this,p)-es,v=+i.apply(this,(p[0]=f,p)),x=o.apply(this,p)-es,b=a.apply(this,p)-es;if(u||(u=l=Sl()),d>vl&&(c1(y-m)>d*2+vl?y>m?(m+=d,y-=d):(m-=d,y+=d):m=y=(m+y)/2,c1(b-x)>d*2+vl?b>x?(x+=d,b-=d):(x-=d,b+=d):x=b=(x+b)/2),u.moveTo(g*Gr(m),g*zr(m)),u.arc(0,0,g,m,y),m!==x||y!==b)if(t){var w=+t.apply(this,arguments),$=v-w,A=(x+b)/2;u.quadraticCurveTo(0,0,$*Gr(x),$*zr(x)),u.lineTo(v*Gr(A),v*zr(A)),u.lineTo($*Gr(b),$*zr(b))}else u.quadraticCurveTo(0,0,v*Gr(x),v*zr(x)),u.arc(0,0,v,x,b);if(u.quadraticCurveTo(0,0,g*Gr(m),g*zr(m)),u.closePath(),l)return u=null,l+""||null}return t&&(c.headRadius=function(l){return arguments.length?(t=typeof l=="function"?l:qn(+l),c):t}),c.radius=function(l){return arguments.length?(r=i=typeof l=="function"?l:qn(+l),c):r},c.sourceRadius=function(l){return arguments.length?(r=typeof l=="function"?l:qn(+l),c):r},c.targetRadius=function(l){return arguments.length?(i=typeof l=="function"?l:qn(+l),c):i},c.startAngle=function(l){return arguments.length?(o=typeof l=="function"?l:qn(+l),c):o},c.endAngle=function(l){return arguments.length?(a=typeof l=="function"?l:qn(+l),c):a},c.padAngle=function(l){return arguments.length?(s=typeof l=="function"?l:qn(+l),c):s},c.source=function(l){return arguments.length?(e=l,c):e},c.target=function(l){return arguments.length?(n=l,c):n},c.context=function(l){return arguments.length?(u=l??null,c):u},c}function n7(){return g1()}function r7(){return g1(e7)}var i7=Array.prototype,m1=i7.slice;function o7(t,e){return t-e}function a7(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}const gn=t=>()=>t;function s7(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=u7(t,e[n]))return i;return 0}function u7(t,e){for(var n=e[0],r=e[1],i=-1,o=0,a=t.length,s=a-1;o<a;s=o++){var u=t[o],c=u[0],l=u[1],h=t[s],f=h[0],d=h[1];if(c7(u,h,e))return 0;l>r!=d>r&&n<(f-c)*(r-l)/(d-l)+c&&(i=-i)}return i}function c7(t,e,n){var r;return l7(t,e,n)&&f7(t[r=+(t[0]===e[0])],n[r],e[r])}function l7(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function f7(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function h7(){}var Ze=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function Al(){var t=1,e=1,n=Tc,r=u;function i(c){var l=n(c);if(Array.isArray(l))l=l.slice().sort(o7);else{const h=Li(c,d7);for(l=In(...Mc(h[0],h[1],l),l);l[l.length-1]>=h[1];)l.pop();for(;l[1]<h[0];)l.shift()}return l.map(h=>o(c,h))}function o(c,l){const h=l==null?NaN:+l;if(isNaN(h))throw new Error(`invalid value: ${l}`);var f=[],d=[];return a(c,h,function(p){r(p,c,h),a7(p)>0?f.push([p]):d.push(p)}),d.forEach(function(p){for(var g=0,m=f.length,y;g<m;++g)if(s7((y=f[g])[0],p)!==-1){y.push(p);return}}),{type:"MultiPolygon",value:l,coordinates:f}}function a(c,l,h){var f=new Array,d=new Array,p,g,m,y,v,x;for(p=g=-1,y=Xn(c[0],l),Ze[y<<1].forEach(b);++p<t-1;)m=y,y=Xn(c[p+1],l),Ze[m|y<<1].forEach(b);for(Ze[y<<0].forEach(b);++g<e-1;){for(p=-1,y=Xn(c[g*t+t],l),v=Xn(c[g*t],l),Ze[y<<1|v<<2].forEach(b);++p<t-1;)m=y,y=Xn(c[g*t+t+p+1],l),x=v,v=Xn(c[g*t+p+1],l),Ze[m|y<<1|v<<2|x<<3].forEach(b);Ze[y|v<<3].forEach(b)}for(p=-1,v=c[g*t]>=l,Ze[v<<2].forEach(b);++p<t-1;)x=v,v=Xn(c[g*t+p+1],l),Ze[v<<2|x<<3].forEach(b);Ze[v<<3].forEach(b);function b(w){var $=[w[0][0]+p,w[0][1]+g],A=[w[1][0]+p,w[1][1]+g],_=s($),L=s(A),E,T;(E=d[_])?(T=f[L])?(delete d[E.end],delete f[T.start],E===T?(E.ring.push(A),h(E.ring)):f[E.start]=d[T.end]={start:E.start,end:T.end,ring:E.ring.concat(T.ring)}):(delete d[E.end],E.ring.push(A),d[E.end=L]=E):(E=f[L])?(T=d[_])?(delete f[E.start],delete d[T.end],E===T?(E.ring.push(A),h(E.ring)):f[T.start]=d[E.end]={start:T.start,end:E.end,ring:T.ring.concat(E.ring)}):(delete f[E.start],E.ring.unshift($),f[E.start=_]=E):f[_]=d[L]={start:_,end:L,ring:[$,A]}}}function s(c){return c[0]*2+c[1]*(t+1)*4}function u(c,l,h){c.forEach(function(f){var d=f[0],p=f[1],g=d|0,m=p|0,y=Ml(l[m*t+g]);d>0&&d<t&&g===d&&(f[0]=y1(d,Ml(l[m*t+g-1]),y,h)),p>0&&p<e&&m===p&&(f[1]=y1(p,Ml(l[(m-1)*t+g]),y,h))})}return i.contour=o,i.size=function(c){if(!arguments.length)return[t,e];var l=Math.floor(c[0]),h=Math.floor(c[1]);if(!(l>=0&&h>=0))throw new Error("invalid size");return t=l,e=h,i},i.thresholds=function(c){return arguments.length?(n=typeof c=="function"?c:Array.isArray(c)?gn(m1.call(c)):gn(c),i):n},i.smooth=function(c){return arguments.length?(r=c?u:h7,i):r===u},i}function d7(t){return isFinite(t)?t:NaN}function Xn(t,e){return t==null?!1:+t>=e}function Ml(t){return t==null||isNaN(t=+t)?-1/0:t}function y1(t,e,n,r){const i=r-e,o=n-e,a=isFinite(i)||isFinite(o)?i/o:Math.sign(i)/Math.sign(o);return isNaN(a)?t:t+a-.5}function p7(t){return t[0]}function g7(t){return t[1]}function m7(){return 1}function y7(){var t=p7,e=g7,n=m7,r=960,i=500,o=20,a=2,s=o*3,u=r+s*2>>a,c=i+s*2>>a,l=gn(20);function h(v){var x=new Float32Array(u*c),b=Math.pow(2,-a),w=-1;for(const P of v){var $=(t(P,++w,v)+s)*b,A=(e(P,w,v)+s)*b,_=+n(P,w,v);if(_&&$>=0&&$<u&&A>=0&&A<c){var L=Math.floor($),E=Math.floor(A),T=$-L-.5,I=A-E-.5;x[L+E*u]+=(1-T)*(1-I)*_,x[L+1+E*u]+=T*(1-I)*_,x[L+1+(E+1)*u]+=T*I*_,x[L+(E+1)*u]+=(1-T)*I*_}}return hg({data:x,width:u,height:c},o*b),x}function f(v){var x=h(v),b=l(x),w=Math.pow(2,2*a);return Array.isArray(b)||(b=In(Number.MIN_VALUE,ki(x)/w,b)),Al().size([u,c]).thresholds(b.map($=>$*w))(x).map(($,A)=>($.value=+b[A],d($)))}f.contours=function(v){var x=h(v),b=Al().size([u,c]),w=Math.pow(2,2*a),$=A=>{A=+A;var _=d(b.contour(x,A*w));return _.value=A,_};return Object.defineProperty($,"max",{get:()=>ki(x)/w}),$};function d(v){return v.coordinates.forEach(p),v}function p(v){v.forEach(g)}function g(v){v.forEach(m)}function m(v){v[0]=v[0]*Math.pow(2,a)-s,v[1]=v[1]*Math.pow(2,a)-s}function y(){return s=o*3,u=r+s*2>>a,c=i+s*2>>a,f}return f.x=function(v){return arguments.length?(t=typeof v=="function"?v:gn(+v),f):t},f.y=function(v){return arguments.length?(e=typeof v=="function"?v:gn(+v),f):e},f.weight=function(v){return arguments.length?(n=typeof v=="function"?v:gn(+v),f):n},f.size=function(v){if(!arguments.length)return[r,i];var x=+v[0],b=+v[1];if(!(x>=0&&b>=0))throw new Error("invalid size");return r=x,i=b,y()},f.cellSize=function(v){if(!arguments.length)return 1<<a;if(!((v=+v)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(v)/Math.LN2),y()},f.thresholds=function(v){return arguments.length?(l=typeof v=="function"?v:Array.isArray(v)?gn(m1.call(v)):gn(v),f):l},f.bandwidth=function(v){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((v=+v)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*v*v+1)-1)/2,y()},f}const Ke=11102230246251565e-32,Ot=134217729,b7=(3+8*Ke)*Ke;function Tl(t,e,n,r,i){let o,a,s,u,c=e[0],l=r[0],h=0,f=0;l>c==l>-c?(o=c,c=e[++h]):(o=l,l=r[++f]);let d=0;if(h<t&&f<n)for(l>c==l>-c?(a=c+o,s=o-(a-c),c=e[++h]):(a=l+o,s=o-(a-l),l=r[++f]),o=a,s!==0&&(i[d++]=s);h<t&&f<n;)l>c==l>-c?(a=o+c,u=a-o,s=o-(a-u)+(c-u),c=e[++h]):(a=o+l,u=a-o,s=o-(a-u)+(l-u),l=r[++f]),o=a,s!==0&&(i[d++]=s);for(;h<t;)a=o+c,u=a-o,s=o-(a-u)+(c-u),c=e[++h],o=a,s!==0&&(i[d++]=s);for(;f<n;)a=o+l,u=a-o,s=o-(a-u)+(l-u),l=r[++f],o=a,s!==0&&(i[d++]=s);return(o!==0||d===0)&&(i[d++]=o),d}function v7(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function Qi(t){return new Float64Array(t)}const x7=(3+16*Ke)*Ke,_7=(2+12*Ke)*Ke,w7=(9+64*Ke)*Ke*Ke,Or=Qi(4),b1=Qi(8),v1=Qi(12),x1=Qi(16),Wt=Qi(4);function $7(t,e,n,r,i,o,a){let s,u,c,l,h,f,d,p,g,m,y,v,x,b,w,$,A,_;const L=t-i,E=n-i,T=e-o,I=r-o;b=L*I,f=Ot*L,d=f-(f-L),p=L-d,f=Ot*I,g=f-(f-I),m=I-g,w=p*m-(b-d*g-p*g-d*m),$=T*E,f=Ot*T,d=f-(f-T),p=T-d,f=Ot*E,g=f-(f-E),m=E-g,A=p*m-($-d*g-p*g-d*m),y=w-A,h=w-y,Or[0]=w-(y+h)+(h-A),v=b+y,h=v-b,x=b-(v-h)+(y-h),y=x-$,h=x-y,Or[1]=x-(y+h)+(h-$),_=v+y,h=_-v,Or[2]=v-(_-h)+(y-h),Or[3]=_;let P=v7(4,Or),D=_7*a;if(P>=D||-P>=D||(h=t-L,s=t-(L+h)+(h-i),h=n-E,c=n-(E+h)+(h-i),h=e-T,u=e-(T+h)+(h-o),h=r-I,l=r-(I+h)+(h-o),s===0&&u===0&&c===0&&l===0)||(D=w7*a+b7*Math.abs(P),P+=L*l+I*s-(T*c+E*u),P>=D||-P>=D))return P;b=s*I,f=Ot*s,d=f-(f-s),p=s-d,f=Ot*I,g=f-(f-I),m=I-g,w=p*m-(b-d*g-p*g-d*m),$=u*E,f=Ot*u,d=f-(f-u),p=u-d,f=Ot*E,g=f-(f-E),m=E-g,A=p*m-($-d*g-p*g-d*m),y=w-A,h=w-y,Wt[0]=w-(y+h)+(h-A),v=b+y,h=v-b,x=b-(v-h)+(y-h),y=x-$,h=x-y,Wt[1]=x-(y+h)+(h-$),_=v+y,h=_-v,Wt[2]=v-(_-h)+(y-h),Wt[3]=_;const C=Tl(4,Or,4,Wt,b1);b=L*l,f=Ot*L,d=f-(f-L),p=L-d,f=Ot*l,g=f-(f-l),m=l-g,w=p*m-(b-d*g-p*g-d*m),$=T*c,f=Ot*T,d=f-(f-T),p=T-d,f=Ot*c,g=f-(f-c),m=c-g,A=p*m-($-d*g-p*g-d*m),y=w-A,h=w-y,Wt[0]=w-(y+h)+(h-A),v=b+y,h=v-b,x=b-(v-h)+(y-h),y=x-$,h=x-y,Wt[1]=x-(y+h)+(h-$),_=v+y,h=_-v,Wt[2]=v-(_-h)+(y-h),Wt[3]=_;const S=Tl(C,b1,4,Wt,v1);b=s*l,f=Ot*s,d=f-(f-s),p=s-d,f=Ot*l,g=f-(f-l),m=l-g,w=p*m-(b-d*g-p*g-d*m),$=u*c,f=Ot*u,d=f-(f-u),p=u-d,f=Ot*c,g=f-(f-c),m=c-g,A=p*m-($-d*g-p*g-d*m),y=w-A,h=w-y,Wt[0]=w-(y+h)+(h-A),v=b+y,h=v-b,x=b-(v-h)+(y-h),y=x-$,h=x-y,Wt[1]=x-(y+h)+(h-$),_=v+y,h=_-v,Wt[2]=v-(_-h)+(y-h),Wt[3]=_;const R=Tl(S,v1,4,Wt,x1);return x1[R-1]}function ns(t,e,n,r,i,o){const a=(e-o)*(n-i),s=(t-i)*(r-o),u=a-s,c=Math.abs(a+s);return Math.abs(u)>=x7*c?u:-$7(t,e,n,r,i,o,c)}const _1=Math.pow(2,-52),rs=new Uint32Array(512);class is{static from(e,n=P7,r=D7){const i=e.length,o=new Float64Array(i*2);for(let a=0;a<i;a++){const s=e[a];o[2*a]=n(s),o[2*a+1]=r(s)}return new is(o)}constructor(e){const n=e.length>>1;if(n>0&&typeof e[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=e;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:e,_hullPrev:n,_hullNext:r,_hullTri:i,_hullHash:o}=this,a=e.length>>1;let s=1/0,u=1/0,c=-1/0,l=-1/0;for(let L=0;L<a;L++){const E=e[2*L],T=e[2*L+1];E<s&&(s=E),T<u&&(u=T),E>c&&(c=E),T>l&&(l=T),this._ids[L]=L}const h=(s+c)/2,f=(u+l)/2;let d,p,g;for(let L=0,E=1/0;L<a;L++){const T=Pl(h,f,e[2*L],e[2*L+1]);T<E&&(d=L,E=T)}const m=e[2*d],y=e[2*d+1];for(let L=0,E=1/0;L<a;L++){if(L===d)continue;const T=Pl(m,y,e[2*L],e[2*L+1]);T<E&&T>0&&(p=L,E=T)}let v=e[2*p],x=e[2*p+1],b=1/0;for(let L=0;L<a;L++){if(L===d||L===p)continue;const E=M7(m,y,v,x,e[2*L],e[2*L+1]);E<b&&(g=L,b=E)}let w=e[2*g],$=e[2*g+1];if(b===1/0){for(let T=0;T<a;T++)this._dists[T]=e[2*T]-e[0]||e[2*T+1]-e[1];Ur(this._ids,this._dists,0,a-1);const L=new Uint32Array(a);let E=0;for(let T=0,I=-1/0;T<a;T++){const P=this._ids[T],D=this._dists[P];D>I&&(L[E++]=P,I=D)}this.hull=L.subarray(0,E),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(ns(m,y,v,x,w,$)<0){const L=p,E=v,T=x;p=g,v=w,x=$,g=L,w=E,$=T}const A=T7(m,y,v,x,w,$);this._cx=A.x,this._cy=A.y;for(let L=0;L<a;L++)this._dists[L]=Pl(e[2*L],e[2*L+1],A.x,A.y);Ur(this._ids,this._dists,0,a-1),this._hullStart=d;let _=3;r[d]=n[g]=p,r[p]=n[d]=g,r[g]=n[p]=d,i[d]=0,i[p]=1,i[g]=2,o.fill(-1),o[this._hashKey(m,y)]=d,o[this._hashKey(v,x)]=p,o[this._hashKey(w,$)]=g,this.trianglesLen=0,this._addTriangle(d,p,g,-1,-1,-1);for(let L=0,E,T;L<this._ids.length;L++){const I=this._ids[L],P=e[2*I],D=e[2*I+1];if(L>0&&Math.abs(P-E)<=_1&&Math.abs(D-T)<=_1||(E=P,T=D,I===d||I===p||I===g))continue;let C=0;for(let N=0,z=this._hashKey(P,D);N<this._hashSize&&(C=o[(z+N)%this._hashSize],!(C!==-1&&C!==r[C]));N++);C=n[C];let S=C,R;for(;R=r[S],ns(P,D,e[2*S],e[2*S+1],e[2*R],e[2*R+1])>=0;)if(S=R,S===C){S=-1;break}if(S===-1)continue;let G=this._addTriangle(S,I,r[S],-1,-1,i[S]);i[I]=this._legalize(G+2),i[S]=G,_++;let M=r[S];for(;R=r[M],ns(P,D,e[2*M],e[2*M+1],e[2*R],e[2*R+1])<0;)G=this._addTriangle(M,I,R,i[I],-1,i[M]),i[I]=this._legalize(G+2),r[M]=M,_--,M=R;if(S===C)for(;R=n[S],ns(P,D,e[2*R],e[2*R+1],e[2*S],e[2*S+1])<0;)G=this._addTriangle(R,I,S,-1,i[S],i[R]),this._legalize(G+2),i[R]=G,r[S]=S,_--,S=R;this._hullStart=n[I]=S,r[S]=n[M]=I,r[I]=M,o[this._hashKey(P,D)]=I,o[this._hashKey(e[2*S],e[2*S+1])]=S}this.hull=new Uint32Array(_);for(let L=0,E=this._hullStart;L<_;L++)this.hull[L]=E,E=r[E];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,n){return Math.floor(S7(e-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:n,_halfedges:r,coords:i}=this;let o=0,a=0;for(;;){const s=r[e],u=e-e%3;if(a=u+(e+2)%3,s===-1){if(o===0)break;e=rs[--o];continue}const c=s-s%3,l=u+(e+1)%3,h=c+(s+2)%3,f=n[a],d=n[e],p=n[l],g=n[h];if(A7(i[2*f],i[2*f+1],i[2*d],i[2*d+1],i[2*p],i[2*p+1],i[2*g],i[2*g+1])){n[e]=g,n[s]=f;const y=r[h];if(y===-1){let x=this._hullStart;do{if(this._hullTri[x]===h){this._hullTri[x]=e;break}x=this._hullPrev[x]}while(x!==this._hullStart)}this._link(e,y),this._link(s,r[a]),this._link(a,h);const v=c+(s+1)%3;o<rs.length&&(rs[o++]=v)}else{if(o===0)break;e=rs[--o]}}return a}_link(e,n){this._halfedges[e]=n,n!==-1&&(this._halfedges[n]=e)}_addTriangle(e,n,r,i,o,a){const s=this.trianglesLen;return this._triangles[s]=e,this._triangles[s+1]=n,this._triangles[s+2]=r,this._link(s,i),this._link(s+1,o),this._link(s+2,a),this.trianglesLen+=3,s}}function S7(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Pl(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function A7(t,e,n,r,i,o,a,s){const u=t-a,c=e-s,l=n-a,h=r-s,f=i-a,d=o-s,p=u*u+c*c,g=l*l+h*h,m=f*f+d*d;return u*(h*m-g*d)-c*(l*m-g*f)+p*(l*d-h*f)<0}function M7(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,c=o-e,l=a*a+s*s,h=u*u+c*c,f=.5/(a*c-s*u),d=(c*l-s*h)*f,p=(a*h-u*l)*f;return d*d+p*p}function T7(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,c=o-e,l=a*a+s*s,h=u*u+c*c,f=.5/(a*c-s*u),d=t+(c*l-s*h)*f,p=e+(a*h-u*l)*f;return{x:d,y:p}}function Ur(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const o=t[i],a=e[o];let s=i-1;for(;s>=n&&e[t[s]]>a;)t[s+1]=t[s--];t[s+1]=o}else{const i=n+r>>1;let o=n+1,a=r;Ji(t,i,o),e[t[n]]>e[t[r]]&&Ji(t,n,r),e[t[o]]>e[t[r]]&&Ji(t,o,r),e[t[n]]>e[t[o]]&&Ji(t,n,o);const s=t[o],u=e[s];for(;;){do o++;while(e[t[o]]<u);do a--;while(e[t[a]]>u);if(a<o)break;Ji(t,o,a)}t[n+1]=t[a],t[a]=s,r-o+1>=a-n?(Ur(t,e,o,r),Ur(t,e,n,a-1)):(Ur(t,e,n,a-1),Ur(t,e,o,r))}}function Ji(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function P7(t){return t[0]}function D7(t){return t[1]}const w1=1e-6;class jn{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,n){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,n){this._+=`L${this._x1=+e},${this._y1=+n}`}arc(e,n,r){e=+e,n=+n,r=+r;const i=e+r,o=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${o}`:(Math.abs(this._x1-i)>w1||Math.abs(this._y1-o)>w1)&&(this._+="L"+i+","+o),r&&(this._+=`A${r},${r},0,1,1,${e-r},${n}A${r},${r},0,1,1,${this._x1=i},${this._y1=o}`)}rect(e,n,r,i){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class Dl{constructor(){this._=[]}moveTo(e,n){this._.push([e,n])}closePath(){this._.push(this._[0].slice())}lineTo(e,n){this._.push([e,n])}value(){return this._.length?this._:null}}class $1{constructor(e,[n,r,i,o]=[0,0,960,500]){if(!((i=+i)>=(n=+n))||!((o=+o)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(e.points.length*2),this.vectors=new Float64Array(e.points.length*2),this.xmax=i,this.xmin=n,this.ymax=o,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:n,triangles:r},vectors:i}=this;let o,a;const s=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let g=0,m=0,y=r.length,v,x;g<y;g+=3,m+=2){const b=r[g]*2,w=r[g+1]*2,$=r[g+2]*2,A=e[b],_=e[b+1],L=e[w],E=e[w+1],T=e[$],I=e[$+1],P=L-A,D=E-_,C=T-A,S=I-_,R=(P*S-D*C)*2;if(Math.abs(R)<1e-9){if(o===void 0){o=a=0;for(const M of n)o+=e[M*2],a+=e[M*2+1];o/=n.length,a/=n.length}const G=1e9*Math.sign((o-A)*S-(a-_)*C);v=(A+T)/2-G*S,x=(_+I)/2+G*C}else{const G=1/R,M=P*P+D*D,N=C*C+S*S;v=A+(S*M-D*N)*G,x=_+(P*N-C*M)*G}s[m]=v,s[m+1]=x}let u=n[n.length-1],c,l=u*4,h,f=e[2*u],d,p=e[2*u+1];i.fill(0);for(let g=0;g<n.length;++g)u=n[g],c=l,h=f,d=p,l=u*4,f=e[2*u],p=e[2*u+1],i[c+2]=i[l]=d-p,i[c+3]=i[l+1]=f-h}render(e){const n=e==null?e=new jn:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let l=0,h=r.length;l<h;++l){const f=r[l];if(f<l)continue;const d=Math.floor(l/3)*2,p=Math.floor(f/3)*2,g=a[d],m=a[d+1],y=a[p],v=a[p+1];this._renderSegment(g,m,y,v,e)}let u,c=o[o.length-1];for(let l=0;l<o.length;++l){u=c,c=o[l];const h=Math.floor(i[c]/3)*2,f=a[h],d=a[h+1],p=u*4,g=this._project(f,d,s[p+2],s[p+3]);g&&this._renderSegment(f,d,g[0],g[1],e)}return n&&n.value()}renderBounds(e){const n=e==null?e=new jn:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(e,n){const r=n==null?n=new jn:void 0,i=this._clip(e);if(i===null||!i.length)return;n.moveTo(i[0],i[1]);let o=i.length;for(;i[0]===i[o-2]&&i[1]===i[o-1]&&o>1;)o-=2;for(let a=2;a<o;a+=2)(i[a]!==i[a-2]||i[a+1]!==i[a-1])&&n.lineTo(i[a],i[a+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let n=0,r=e.length/2;n<r;++n){const i=this.cellPolygon(n);i&&(i.index=n,yield i)}}cellPolygon(e){const n=new Dl;return this.renderCell(e,n),n.value()}_renderSegment(e,n,r,i,o){let a;const s=this._regioncode(e,n),u=this._regioncode(r,i);s===0&&u===0?(o.moveTo(e,n),o.lineTo(r,i)):(a=this._clipSegment(e,n,r,i,s,u))&&(o.moveTo(a[0],a[1]),o.lineTo(a[2],a[3]))}contains(e,n,r){return n=+n,n!==n||(r=+r,r!==r)?!1:this.delaunay._step(e,n,r)===e}*neighbors(e){const n=this._clip(e);if(n)for(const r of this.delaunay.neighbors(e)){const i=this._clip(r);if(i){t:for(let o=0,a=n.length;o<a;o+=2)for(let s=0,u=i.length;s<u;s+=2)if(n[o]===i[s]&&n[o+1]===i[s+1]&&n[(o+2)%a]===i[(s+u-2)%u]&&n[(o+3)%a]===i[(s+u-1)%u]){yield r;break t}}}}_cell(e){const{circumcenters:n,delaunay:{inedges:r,halfedges:i,triangles:o}}=this,a=r[e];if(a===-1)return null;const s=[];let u=a;do{const c=Math.floor(u/3);if(s.push(n[c*2],n[c*2+1]),u=u%3===2?u-2:u+1,o[u]!==e)break;u=i[u]}while(u!==a&&u!==-1);return s}_clip(e){if(e===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(e);if(n===null)return null;const{vectors:r}=this,i=e*4;return this._simplify(r[i]||r[i+1]?this._clipInfinite(e,n,r[i],r[i+1],r[i+2],r[i+3]):this._clipFinite(e,n))}_clipFinite(e,n){const r=n.length;let i=null,o,a,s=n[r-2],u=n[r-1],c,l=this._regioncode(s,u),h,f=0;for(let d=0;d<r;d+=2)if(o=s,a=u,s=n[d],u=n[d+1],c=l,l=this._regioncode(s,u),c===0&&l===0)h=f,f=0,i?i.push(s,u):i=[s,u];else{let p,g,m,y,v;if(c===0){if((p=this._clipSegment(o,a,s,u,c,l))===null)continue;[g,m,y,v]=p}else{if((p=this._clipSegment(s,u,o,a,l,c))===null)continue;[y,v,g,m]=p,h=f,f=this._edgecode(g,m),h&&f&&this._edge(e,h,f,i,i.length),i?i.push(g,m):i=[g,m]}h=f,f=this._edgecode(y,v),h&&f&&this._edge(e,h,f,i,i.length),i?i.push(y,v):i=[y,v]}if(i)h=f,f=this._edgecode(i[0],i[1]),h&&f&&this._edge(e,h,f,i,i.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return i}_clipSegment(e,n,r,i,o,a){const s=o<a;for(s&&([e,n,r,i,o,a]=[r,i,e,n,a,o]);;){if(o===0&&a===0)return s?[r,i,e,n]:[e,n,r,i];if(o&a)return null;let u,c,l=o||a;l&8?(u=e+(r-e)*(this.ymax-n)/(i-n),c=this.ymax):l&4?(u=e+(r-e)*(this.ymin-n)/(i-n),c=this.ymin):l&2?(c=n+(i-n)*(this.xmax-e)/(r-e),u=this.xmax):(c=n+(i-n)*(this.xmin-e)/(r-e),u=this.xmin),o?(e=u,n=c,o=this._regioncode(e,n)):(r=u,i=c,a=this._regioncode(r,i))}}_clipInfinite(e,n,r,i,o,a){let s=Array.from(n),u;if((u=this._project(s[0],s[1],r,i))&&s.unshift(u[0],u[1]),(u=this._project(s[s.length-2],s[s.length-1],o,a))&&s.push(u[0],u[1]),s=this._clipFinite(e,s))for(let c=0,l=s.length,h,f=this._edgecode(s[l-2],s[l-1]);c<l;c+=2)h=f,f=this._edgecode(s[c],s[c+1]),h&&f&&(c=this._edge(e,h,f,s,c),l=s.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(e,n,r,i,o){for(;n!==r;){let a,s;switch(n){case 5:n=4;continue;case 4:n=6,a=this.xmax,s=this.ymin;break;case 6:n=2;continue;case 2:n=10,a=this.xmax,s=this.ymax;break;case 10:n=8;continue;case 8:n=9,a=this.xmin,s=this.ymax;break;case 9:n=1;continue;case 1:n=5,a=this.xmin,s=this.ymin;break}(i[o]!==a||i[o+1]!==s)&&this.contains(e,a,s)&&(i.splice(o,0,a,s),o+=2)}return o}_project(e,n,r,i){let o=1/0,a,s,u;if(i<0){if(n<=this.ymin)return null;(a=(this.ymin-n)/i)<o&&(u=this.ymin,s=e+(o=a)*r)}else if(i>0){if(n>=this.ymax)return null;(a=(this.ymax-n)/i)<o&&(u=this.ymax,s=e+(o=a)*r)}if(r>0){if(e>=this.xmax)return null;(a=(this.xmax-e)/r)<o&&(s=this.xmax,u=n+(o=a)*i)}else if(r<0){if(e<=this.xmin)return null;(a=(this.xmin-e)/r)<o&&(s=this.xmin,u=n+(o=a)*i)}return[s,u]}_edgecode(e,n){return(e===this.xmin?1:e===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(e,n){return(e<this.xmin?1:e>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let n=0;n<e.length;n+=2){const r=(n+2)%e.length,i=(n+4)%e.length;(e[n]===e[r]&&e[r]===e[i]||e[n+1]===e[r+1]&&e[r+1]===e[i+1])&&(e.splice(r,2),n-=2)}e.length||(e=null)}return e}}const L7=2*Math.PI,Br=Math.pow;function E7(t){return t[0]}function k7(t){return t[1]}function C7(t){const{triangles:e,coords:n}=t;for(let r=0;r<e.length;r+=3){const i=2*e[r],o=2*e[r+1],a=2*e[r+2];if((n[a]-n[i])*(n[o+1]-n[i+1])-(n[o]-n[i])*(n[a+1]-n[i+1])>1e-10)return!1}return!0}function I7(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class Ll{static from(e,n=E7,r=k7,i){return new Ll("length"in e?R7(e,n,r,i):Float64Array.from(N7(e,n,r,i)))}constructor(e){this._delaunator=new is(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,n=this.points;if(e.hull&&e.hull.length>2&&C7(e)){this.collinear=Int32Array.from({length:n.length/2},(f,d)=>d).sort((f,d)=>n[2*f]-n[2*d]||n[2*f+1]-n[2*d+1]);const u=this.collinear[0],c=this.collinear[this.collinear.length-1],l=[n[2*u],n[2*u+1],n[2*c],n[2*c+1]],h=1e-8*Math.hypot(l[3]-l[1],l[2]-l[0]);for(let f=0,d=n.length/2;f<d;++f){const p=I7(n[2*f],n[2*f+1],h);n[2*f]=p[0],n[2*f+1]=p[1]}this._delaunator=new is(n)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),s=this._hullIndex.fill(-1);for(let u=0,c=r.length;u<c;++u){const l=o[u%3===2?u-2:u+1];(r[u]===-1||a[l]===-1)&&(a[l]=u)}for(let u=0,c=i.length;u<c;++u)s[i[u]]=u;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],a[i[0]]=1,i.length===2&&(a[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(e){return new $1(this,e)}*neighbors(e){const{inedges:n,hull:r,_hullIndex:i,halfedges:o,triangles:a,collinear:s}=this;if(s){const h=s.indexOf(e);h>0&&(yield s[h-1]),h<s.length-1&&(yield s[h+1]);return}const u=n[e];if(u===-1)return;let c=u,l=-1;do{if(yield l=a[c],c=c%3===2?c-2:c+1,a[c]!==e)return;if(c=o[c],c===-1){const h=r[(i[e]+1)%r.length];h!==l&&(yield h);return}}while(c!==u)}find(e,n,r=0){if(e=+e,e!==e||(n=+n,n!==n))return-1;const i=r;let o;for(;(o=this._step(r,e,n))>=0&&o!==r&&o!==i;)r=o;return o}_step(e,n,r){const{inedges:i,hull:o,_hullIndex:a,halfedges:s,triangles:u,points:c}=this;if(i[e]===-1||!c.length)return(e+1)%(c.length>>1);let l=e,h=Br(n-c[e*2],2)+Br(r-c[e*2+1],2);const f=i[e];let d=f;do{let p=u[d];const g=Br(n-c[p*2],2)+Br(r-c[p*2+1],2);if(g<h&&(h=g,l=p),d=d%3===2?d-2:d+1,u[d]!==e)break;if(d=s[d],d===-1){if(d=o[(a[e]+1)%o.length],d!==p&&Br(n-c[d*2],2)+Br(r-c[d*2+1],2)<h)return d;break}}while(d!==f);return l}render(e){const n=e==null?e=new jn:void 0,{points:r,halfedges:i,triangles:o}=this;for(let a=0,s=i.length;a<s;++a){const u=i[a];if(u<a)continue;const c=o[a]*2,l=o[u]*2;e.moveTo(r[c],r[c+1]),e.lineTo(r[l],r[l+1])}return this.renderHull(e),n&&n.value()}renderPoints(e,n){n===void 0&&(!e||typeof e.moveTo!="function")&&(n=e,e=null),n=n==null?2:+n;const r=e==null?e=new jn:void 0,{points:i}=this;for(let o=0,a=i.length;o<a;o+=2){const s=i[o],u=i[o+1];e.moveTo(s+n,u),e.arc(s,u,n,0,L7)}return r&&r.value()}renderHull(e){const n=e==null?e=new jn:void 0,{hull:r,points:i}=this,o=r[0]*2,a=r.length;e.moveTo(i[o],i[o+1]);for(let s=1;s<a;++s){const u=2*r[s];e.lineTo(i[u],i[u+1])}return e.closePath(),n&&n.value()}hullPolygon(){const e=new Dl;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new jn:void 0,{points:i,triangles:o}=this,a=o[e*=3]*2,s=o[e+1]*2,u=o[e+2]*2;return n.moveTo(i[a],i[a+1]),n.lineTo(i[s],i[s+1]),n.lineTo(i[u],i[u+1]),n.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:e}=this;for(let n=0,r=e.length/3;n<r;++n)yield this.trianglePolygon(n)}trianglePolygon(e){const n=new Dl;return this.renderTriangle(e,n),n.value()}}function R7(t,e,n,r){const i=t.length,o=new Float64Array(i*2);for(let a=0;a<i;++a){const s=t[a];o[a*2]=e.call(r,s,a,t),o[a*2+1]=n.call(r,s,a,t)}return o}function*N7(t,e,n,r){let i=0;for(const o of t)yield e.call(r,o,i,t),yield n.call(r,o,i,t),++i}var S1={},El={},kl=34,to=10,Cl=13;function A1(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function F7(t,e){var n=A1(t);return function(r,i){return e(n(r),i,t)}}function M1(t){var e=Object.create(null),n=[];return t.forEach(function(r){for(var i in r)i in e||n.push(e[i]=i)}),n}function ne(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function G7(t){return t<0?"-"+ne(-t,6):t>9999?"+"+ne(t,6):ne(t,4)}function z7(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":G7(t.getUTCFullYear())+"-"+ne(t.getUTCMonth()+1,2)+"-"+ne(t.getUTCDate(),2)+(i?"T"+ne(e,2)+":"+ne(n,2)+":"+ne(r,2)+"."+ne(i,3)+"Z":r?"T"+ne(e,2)+":"+ne(n,2)+":"+ne(r,2)+"Z":n||e?"T"+ne(e,2)+":"+ne(n,2)+"Z":"")}function os(t){var e=new RegExp('["'+t+`
6
+ \r]`),n=t.charCodeAt(0);function r(h,f){var d,p,g=i(h,function(m,y){if(d)return d(m,y-1);p=m,d=f?F7(m,f):A1(m)});return g.columns=p||[],g}function i(h,f){var d=[],p=h.length,g=0,m=0,y,v=p<=0,x=!1;h.charCodeAt(p-1)===to&&--p,h.charCodeAt(p-1)===Cl&&--p;function b(){if(v)return El;if(x)return x=!1,S1;var $,A=g,_;if(h.charCodeAt(A)===kl){for(;g++<p&&h.charCodeAt(g)!==kl||h.charCodeAt(++g)===kl;);return($=g)>=p?v=!0:(_=h.charCodeAt(g++))===to?x=!0:_===Cl&&(x=!0,h.charCodeAt(g)===to&&++g),h.slice(A+1,$-1).replace(/""/g,'"')}for(;g<p;){if((_=h.charCodeAt($=g++))===to)x=!0;else if(_===Cl)x=!0,h.charCodeAt(g)===to&&++g;else if(_!==n)continue;return h.slice(A,$)}return v=!0,h.slice(A,p)}for(;(y=b())!==El;){for(var w=[];y!==S1&&y!==El;)w.push(y),y=b();f&&(w=f(w,m++))==null||d.push(w)}return d}function o(h,f){return h.map(function(d){return f.map(function(p){return l(d[p])}).join(t)})}function a(h,f){return f==null&&(f=M1(h)),[f.map(l).join(t)].concat(o(h,f)).join(`
7
+ `)}function s(h,f){return f==null&&(f=M1(h)),o(h,f).join(`
8
8
  `)}function u(h){return h.map(c).join(`
9
- `)}function c(h){return h.map(l).join(t)}function l(h){return h==null?"":h instanceof Date?I7(h):e.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:u,formatRow:c,formatValue:l}}var jn=os(","),$1=jn.parse,N7=jn.parseRows,F7=jn.format,G7=jn.formatBody,z7=jn.formatRows,O7=jn.formatRow,U7=jn.formatValue,Vn=os(" "),S1=Vn.parse,B7=Vn.parseRows,Y7=Vn.format,W7=Vn.formatBody,H7=Vn.formatRows,q7=Vn.formatRow,X7=Vn.formatValue;function j7(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})?)?$/))V7&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const V7=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function Z7(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function K7(t,e){return fetch(t,e).then(Z7)}function Q7(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function J7(t,e){return fetch(t,e).then(Q7)}function t9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function as(t,e){return fetch(t,e).then(t9)}function A1(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),as(e,n).then(function(i){return t(i,r)})}}function e9(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=os(t);return as(e,n).then(function(o){return i.parse(o,r)})}var n9=A1($1),r9=A1(S1);function i9(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 o9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function a9(t,e){return fetch(t,e).then(o9)}function Rl(t){return(e,n)=>as(e,n).then(r=>new DOMParser().parseFromString(r,t))}const s9=Rl("application/xml");var u9=Rl("text/html"),c9=Rl("image/svg+xml");function l9(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,a=n.length,s,u=0,c=0;for(o=0;o<a;++o)s=n[o],u+=s.x,c+=s.y;for(u=(u/a-t)*r,c=(c/a-e)*r,o=0;o<a;++o)s=n[o],s.x-=u,s.y-=c}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(t=+o,i):t},i.y=function(o){return arguments.length?(e=+o,i):e},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function f9(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return M1(this.cover(e,n),e,n,t)}function M1(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o=t._root,a={data:r},s=t._x0,u=t._y0,c=t._x1,l=t._y1,h,f,d,p,g,m,y,x;if(!o)return t._root=a,t;for(;o.length;)if((g=e>=(h=(s+c)/2))?s=h:c=h,(m=n>=(f=(u+l)/2))?u=f:l=f,i=o,!(o=o[y=m<<1|g]))return i[y]=a,t;if(d=+t._x.call(null,o.data),p=+t._y.call(null,o.data),e===d&&n===p)return a.next=o,i?i[y]=a:t._root=a,t;do i=i?i[y]=new Array(4):t._root=new Array(4),(g=e>=(h=(s+c)/2))?s=h:c=h,(m=n>=(f=(u+l)/2))?u=f:l=f;while((y=m<<1|g)===(x=(p>=f)<<1|d>=h));return i[x]=o,i[y]=a,t}function h9(t){var e,n,r=t.length,i,o,a=new Array(r),s=new Array(r),u=1/0,c=1/0,l=-1/0,h=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=i,s[n]=o,i<u&&(u=i),i>l&&(l=i),o<c&&(c=o),o>h&&(h=o));if(u>l||c>h)return this;for(this.cover(u,c).cover(l,h),n=0;n<r;++n)M1(this,a[n],s[n],t[n]);return this}function d9(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a=i-n||1,s=this._root,u,c;n>t||t>=i||r>e||e>=o;)switch(c=(e<r)<<1|t<n,u=new Array(4),u[c]=s,s=u,a*=2,c){case 0:i=n+a,o=r+a;break;case 1:n=i-a,o=r+a;break;case 2:i=n+a,r=o-a;break;case 3:n=i-a,r=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function p9(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function g9(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Ht(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function m9(t,e,n){var r,i=this._x0,o=this._y0,a,s,u,c,l=this._x1,h=this._y1,f=[],d=this._root,p,g;for(d&&f.push(new Ht(d,i,o,l,h)),n==null?n=1/0:(i=t-n,o=e-n,l=t+n,h=e+n,n*=n);p=f.pop();)if(!(!(d=p.node)||(a=p.x0)>l||(s=p.y0)>h||(u=p.x1)<i||(c=p.y1)<o))if(d.length){var m=(a+u)/2,y=(s+c)/2;f.push(new Ht(d[3],m,y,u,c),new Ht(d[2],a,y,m,c),new Ht(d[1],m,s,u,y),new Ht(d[0],a,s,m,y)),(g=(e>=y)<<1|t>=m)&&(p=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=p)}else{var x=t-+this._x.call(null,d.data),v=e-+this._y.call(null,d.data),b=x*x+v*v;if(b<n){var $=Math.sqrt(n=b);i=t-$,o=e-$,l=t+$,h=e+$,r=d.data}}return r}function y9(t){if(isNaN(l=+this._x.call(null,t))||isNaN(h=+this._y.call(null,t)))return this;var e,n=this._root,r,i,o,a=this._x0,s=this._y0,u=this._x1,c=this._y1,l,h,f,d,p,g,m,y;if(!n)return this;if(n.length)for(;;){if((p=l>=(f=(a+u)/2))?a=f:u=f,(g=h>=(d=(s+c)/2))?s=d:c=d,e=n,!(n=n[m=g<<1|p]))return this;if(!n.length)break;(e[m+1&3]||e[m+2&3]||e[m+3&3])&&(r=e,y=m)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):e?(o?e[m]=o:delete e[m],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[y]=n:this._root=n),this):(this._root=o,this)}function b9(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function v9(){return this._root}function x9(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function _9(t){var e=[],n,r=this._root,i,o,a,s,u;for(r&&e.push(new Ht(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,o=n.x0,a=n.y0,s=n.x1,u=n.y1)&&r.length){var c=(o+s)/2,l=(a+u)/2;(i=r[3])&&e.push(new Ht(i,c,l,s,u)),(i=r[2])&&e.push(new Ht(i,o,l,c,u)),(i=r[1])&&e.push(new Ht(i,c,a,s,l)),(i=r[0])&&e.push(new Ht(i,o,a,c,l))}return this}function w9(t){var e=[],n=[],r;for(this._root&&e.push(new Ht(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var o,a=r.x0,s=r.y0,u=r.x1,c=r.y1,l=(a+u)/2,h=(s+c)/2;(o=i[0])&&e.push(new Ht(o,a,s,l,h)),(o=i[1])&&e.push(new Ht(o,l,s,u,h)),(o=i[2])&&e.push(new Ht(o,a,h,l,c)),(o=i[3])&&e.push(new Ht(o,l,h,u,c))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function $9(t){return t[0]}function S9(t){return arguments.length?(this._x=t,this):this._x}function A9(t){return t[1]}function M9(t){return arguments.length?(this._y=t,this):this._y}function ss(t,e,n){var r=new Il(e??$9,n??A9,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Il(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 T1(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var qt=ss.prototype=Il.prototype;qt.copy=function(){var t=new Il(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=T1(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]=T1(r));return t},qt.add=f9,qt.addAll=h9,qt.cover=d9,qt.data=p9,qt.extent=g9,qt.find=m9,qt.remove=y9,qt.removeAll=b9,qt.root=v9,qt.size=x9,qt.visit=_9,qt.visitAfter=w9,qt.x=S9,qt.y=M9;function Lt(t){return function(){return t}}function mn(t){return(t()-.5)*1e-6}function T9(t){return t.x+t.vx}function P9(t){return t.y+t.vy}function P1(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Lt(t==null?1:+t));function a(){for(var c,l=e.length,h,f,d,p,g,m,y=0;y<o;++y)for(h=ss(e,T9,P9).visitAfter(s),c=0;c<l;++c)f=e[c],g=n[f.index],m=g*g,d=f.x+f.vx,p=f.y+f.vy,h.visit(x);function x(v,b,$,w,S){var _=v.data,P=v.r,D=g+P;if(_){if(_.index>f.index){var A=d-_.x-_.vx,I=p-_.y-_.vy,M=A*A+I*I;M<D*D&&(A===0&&(A=mn(r),M+=A*A),I===0&&(I=mn(r),M+=I*I),M=(D-(M=Math.sqrt(M)))/M*i,f.vx+=(A*=M)*(D=(P*=P)/(m+P)),f.vy+=(I*=M)*D,_.vx-=A*(D=1-D),_.vy-=I*D)}return}return b>d+D||w<d-D||$>p+D||S<p-D}}function s(c){if(c.data)return c.r=n[c.data.index];for(var l=c.r=0;l<4;++l)c[l]&&c[l].r>c.r&&(c.r=c[l].r)}function u(){if(e){var c,l=e.length,h;for(n=new Array(l),c=0;c<l;++c)h=e[c],n[h.index]=+t(h,c,e)}}return a.initialize=function(c,l){e=c,r=l,u()},a.iterations=function(c){return arguments.length?(o=+c,a):o},a.strength=function(c){return arguments.length?(i=+c,a):i},a.radius=function(c){return arguments.length?(t=typeof c=="function"?c:Lt(+c),u(),a):t},a}function D9(t){return t.index}function D1(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function L9(t){var e=D9,n=h,r,i=Lt(30),o,a,s,u,c,l=1;t==null&&(t=[]);function h(m){return 1/Math.min(s[m.source.index],s[m.target.index])}function f(m){for(var y=0,x=t.length;y<l;++y)for(var v=0,b,$,w,S,_,P,D;v<x;++v)b=t[v],$=b.source,w=b.target,S=w.x+w.vx-$.x-$.vx||mn(c),_=w.y+w.vy-$.y-$.vy||mn(c),P=Math.sqrt(S*S+_*_),P=(P-o[v])/P*m*r[v],S*=P,_*=P,w.vx-=S*(D=u[v]),w.vy-=_*D,$.vx+=S*(D=1-D),$.vy+=_*D}function d(){if(a){var m,y=a.length,x=t.length,v=new Map(a.map(($,w)=>[e($,w,a),$])),b;for(m=0,s=new Array(y);m<x;++m)b=t[m],b.index=m,typeof b.source!="object"&&(b.source=D1(v,b.source)),typeof b.target!="object"&&(b.target=D1(v,b.target)),s[b.source.index]=(s[b.source.index]||0)+1,s[b.target.index]=(s[b.target.index]||0)+1;for(m=0,u=new Array(x);m<x;++m)b=t[m],u[m]=s[b.source.index]/(s[b.source.index]+s[b.target.index]);r=new Array(x),p(),o=new Array(x),g()}}function p(){if(a)for(var m=0,y=t.length;m<y;++m)r[m]=+n(t[m],m,t)}function g(){if(a)for(var m=0,y=t.length;m<y;++m)o[m]=+i(t[m],m,t)}return f.initialize=function(m,y){a=m,c=y,d()},f.links=function(m){return arguments.length?(t=m,d(),f):t},f.id=function(m){return arguments.length?(e=m,f):e},f.iterations=function(m){return arguments.length?(l=+m,f):l},f.strength=function(m){return arguments.length?(n=typeof m=="function"?m:Lt(+m),p(),f):n},f.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Lt(+m),g(),f):i},f}const E9=1664525,k9=1013904223,L1=4294967296;function C9(){let t=1;return()=>(t=(E9*t+k9)%L1)/L1}function R9(t){return t.x}function I9(t){return t.y}var N9=10,F9=Math.PI*(3-Math.sqrt(5));function E1(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,u=Xa(h),c=In("tick","end"),l=C9();t==null&&(t=[]);function h(){f(),c.call("tick",e),n<r&&(u.stop(),c.call("end",e))}function f(g){var m,y=t.length,x;g===void 0&&(g=1);for(var v=0;v<g;++v)for(n+=(o-n)*i,s.forEach(function(b){b(n)}),m=0;m<y;++m)x=t[m],x.fx==null?x.x+=x.vx*=a:(x.x=x.fx,x.vx=0),x.fy==null?x.y+=x.vy*=a:(x.y=x.fy,x.vy=0);return e}function d(){for(var g=0,m=t.length,y;g<m;++g){if(y=t[g],y.index=g,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var x=N9*Math.sqrt(.5+g),v=g*F9;y.x=x*Math.cos(v),y.y=x*Math.sin(v)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function p(g){return g.initialize&&g.initialize(t,l),g}return d(),e={tick:f,restart:function(){return u.restart(h),e},stop:function(){return u.stop(),e},nodes:function(g){return arguments.length?(t=g,d(),s.forEach(p),e):t},alpha:function(g){return arguments.length?(n=+g,e):n},alphaMin:function(g){return arguments.length?(r=+g,e):r},alphaDecay:function(g){return arguments.length?(i=+g,e):+i},alphaTarget:function(g){return arguments.length?(o=+g,e):o},velocityDecay:function(g){return arguments.length?(a=1-g,e):1-a},randomSource:function(g){return arguments.length?(l=g,s.forEach(p),e):l},force:function(g,m){return arguments.length>1?(m==null?s.delete(g):s.set(g,p(m)),e):s.get(g)},find:function(g,m,y){var x=0,v=t.length,b,$,w,S,_;for(y==null?y=1/0:y*=y,x=0;x<v;++x)S=t[x],b=g-S.x,$=m-S.y,w=b*b+$*$,w<y&&(_=S,y=w);return _},on:function(g,m){return arguments.length>1?(c.on(g,m),e):c.on(g)}}}function k1(){var t,e,n,r,i=Lt(-30),o,a=1,s=1/0,u=.81;function c(d){var p,g=t.length,m=ss(t,R9,I9).visitAfter(h);for(r=d,p=0;p<g;++p)e=t[p],m.visit(f)}function l(){if(t){var d,p=t.length,g;for(o=new Array(p),d=0;d<p;++d)g=t[d],o[g.index]=+i(g,d,t)}}function h(d){var p=0,g,m,y=0,x,v,b;if(d.length){for(x=v=b=0;b<4;++b)(g=d[b])&&(m=Math.abs(g.value))&&(p+=g.value,y+=m,x+=m*g.x,v+=m*g.y);d.x=x/y,d.y=v/y}else{g=d,g.x=g.data.x,g.y=g.data.y;do p+=o[g.data.index];while(g=g.next)}d.value=p}function f(d,p,g,m){if(!d.value)return!0;var y=d.x-e.x,x=d.y-e.y,v=m-p,b=y*y+x*x;if(v*v/u<b)return b<s&&(y===0&&(y=mn(n),b+=y*y),x===0&&(x=mn(n),b+=x*x),b<a&&(b=Math.sqrt(a*b)),e.vx+=y*d.value*r/b,e.vy+=x*d.value*r/b),!0;if(d.length||b>=s)return;(d.data!==e||d.next)&&(y===0&&(y=mn(n),b+=y*y),x===0&&(x=mn(n),b+=x*x),b<a&&(b=Math.sqrt(a*b)));do d.data!==e&&(v=o[d.data.index]*r/b,e.vx+=y*v,e.vy+=x*v);while(d=d.next)}return c.initialize=function(d,p){t=d,n=p,l()},c.strength=function(d){return arguments.length?(i=typeof d=="function"?d:Lt(+d),l(),c):i},c.distanceMin=function(d){return arguments.length?(a=d*d,c):Math.sqrt(a)},c.distanceMax=function(d){return arguments.length?(s=d*d,c):Math.sqrt(s)},c.theta=function(d){return arguments.length?(u=d*d,c):Math.sqrt(u)},c}function G9(t,e,n){var r,i=Lt(.1),o,a;typeof t!="function"&&(t=Lt(+t)),e==null&&(e=0),n==null&&(n=0);function s(c){for(var l=0,h=r.length;l<h;++l){var f=r[l],d=f.x-e||1e-6,p=f.y-n||1e-6,g=Math.sqrt(d*d+p*p),m=(a[l]-g)*o[l]*c/g;f.vx+=d*m,f.vy+=p*m}}function u(){if(r){var c,l=r.length;for(o=new Array(l),a=new Array(l),c=0;c<l;++c)a[c]=+t(r[c],c,r),o[c]=isNaN(a[c])?0:+i(r[c],c,r)}}return s.initialize=function(c){r=c,u()},s.strength=function(c){return arguments.length?(i=typeof c=="function"?c:Lt(+c),u(),s):i},s.radius=function(c){return arguments.length?(t=typeof c=="function"?c:Lt(+c),u(),s):t},s.x=function(c){return arguments.length?(e=+c,s):e},s.y=function(c){return arguments.length?(n=+c,s):n},s}function C1(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(t==null?0:+t));function o(s){for(var u=0,c=n.length,l;u<c;++u)l=n[u],l.vx+=(i[u]-l.x)*r[u]*s}function a(){if(n){var s,u=n.length;for(r=new Array(u),i=new Array(u),s=0;s<u;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Lt(+s),a(),o):e},o.x=function(s){return arguments.length?(t=typeof s=="function"?s:Lt(+s),a(),o):t},o}function R1(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(t==null?0:+t));function o(s){for(var u=0,c=n.length,l;u<c;++u)l=n[u],l.vy+=(i[u]-l.y)*r[u]*s}function a(){if(n){var s,u=n.length;for(r=new Array(u),i=new Array(u),s=0;s<u;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Lt(+s),a(),o):e},o.y=function(s){return arguments.length?(t=typeof s=="function"?s:Lt(+s),a(),o):t},o}function z9(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function us(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Or(t){return t=us(Math.abs(t)),t?t[1]:NaN}function O9(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 U9(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var B9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ur(t){if(!(e=B9.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]})}Ur.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 Y9(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 I1;function W9(t,e){var n=us(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(I1=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+us(t,Math.max(0,e+o-1))[0]}function N1(t,e){var n=us(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const F1={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:z9,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>N1(t*100,e),r:N1,s:W9,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function G1(t){return t}var z1=Array.prototype.map,O1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function U1(t){var e=t.grouping===void 0||t.thousands===void 0?G1:O9(z1.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?G1:U9(z1.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(h){h=Ur(h);var f=h.fill,d=h.align,p=h.sign,g=h.symbol,m=h.zero,y=h.width,x=h.comma,v=h.precision,b=h.trim,$=h.type;$==="n"?(x=!0,$="g"):F1[$]||(v===void 0&&(v=12),b=!0,$="g"),(m||f==="0"&&d==="=")&&(m=!0,f="0",d="=");var w=g==="$"?n:g==="#"&&/[boxX]/.test($)?"0"+$.toLowerCase():"",S=g==="$"?r:/[%p]/.test($)?a:"",_=F1[$],P=/[defgprs%]/.test($);v=v===void 0?6:/[gprs]/.test($)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function D(A){var I=w,M=S,T,E,L;if($==="c")M=_(A)+M,A="";else{A=+A;var N=A<0||1/A<0;if(A=isNaN(A)?u:_(Math.abs(A),v),b&&(A=Y9(A)),N&&+A==0&&p!=="+"&&(N=!1),I=(N?p==="("?p:s:p==="-"||p==="("?"":p)+I,M=($==="s"?O1[8+I1/3]:"")+M+(N&&p==="("?")":""),P){for(T=-1,E=A.length;++T<E;)if(L=A.charCodeAt(T),48>L||L>57){M=(L===46?i+A.slice(T+1):A.slice(T))+M,A=A.slice(0,T);break}}}x&&!m&&(A=e(A,1/0));var O=I.length+A.length+M.length,k=O<y?new Array(y-O+1).join(f):"";switch(x&&m&&(A=e(k+A,k.length?y-M.length:1/0),k=""),d){case"<":A=I+A+M+k;break;case"=":A=I+k+A+M;break;case"^":A=k.slice(0,O=k.length>>1)+I+A+M+k.slice(O);break;default:A=k+I+A+M;break}return o(A)}return D.toString=function(){return h+""},D}function l(h,f){var d=c((h=Ur(h),h.type="f",h)),p=Math.max(-8,Math.min(8,Math.floor(Or(f)/3)))*3,g=Math.pow(10,-p),m=O1[8+p/3];return function(y){return d(g*y)+m}}return{format:c,formatPrefix:l}}var ls,Ji,Nl;B1({thousands:",",grouping:[3],currency:["$",""]});function B1(t){return ls=U1(t),Ji=ls.format,Nl=ls.formatPrefix,ls}function Y1(t){return Math.max(0,-Or(Math.abs(t)))}function W1(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Or(e)/3)))*3-Or(Math.abs(t)))}function H1(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Or(e)-Or(t))+1}var tt=1e-6,to=1e-12,ct=Math.PI,St=ct/2,fs=ct/4,Xt=ct*2,yt=180/ct,et=ct/180,ft=Math.abs,Br=Math.atan,jt=Math.atan2,Q=Math.cos,hs=Math.ceil,q1=Math.exp,Fl=Math.hypot,ds=Math.log,Gl=Math.pow,V=Math.sin,de=Math.sign||function(t){return t>0?1:t<0?-1:0},Ct=Math.sqrt,zl=Math.tan;function X1(t){return t>1?0:t<-1?ct:Math.acos(t)}function Vt(t){return t>1?St:t<-1?-St:Math.asin(t)}function j1(t){return(t=V(t/2))*t}function wt(){}function ps(t,e){t&&Z1.hasOwnProperty(t.type)&&Z1[t.type](t,e)}var V1={Feature:function(t,e){ps(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)ps(n[r].geometry,e)}},Z1={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Ol(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Ol(n[r],e,0)},Polygon:function(t,e){K1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)K1(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)ps(n[r],e)}};function Ol(t,e,n){var r=-1,i=t.length-n,o;for(e.lineStart();++r<i;)o=t[r],e.point(o[0],o[1],o[2]);e.lineEnd()}function K1(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Ol(t[n],e,1);e.polygonEnd()}function Pe(t,e){t&&V1.hasOwnProperty(t.type)?V1[t.type](t,e):ps(t,e)}var gs=new Dt,ms=new Dt,Q1,J1,Ul,Bl,Yl,Ne={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){gs=new Dt,Ne.lineStart=H9,Ne.lineEnd=q9},polygonEnd:function(){var t=+gs;ms.add(t<0?Xt+t:t),this.lineStart=this.lineEnd=this.point=wt},sphere:function(){ms.add(Xt)}};function H9(){Ne.point=X9}function q9(){tm(Q1,J1)}function X9(t,e){Ne.point=tm,Q1=t,J1=e,t*=et,e*=et,Ul=t,Bl=Q(e=e/2+fs),Yl=V(e)}function tm(t,e){t*=et,e*=et,e=e/2+fs;var n=t-Ul,r=n>=0?1:-1,i=r*n,o=Q(e),a=V(e),s=Yl*a,u=Bl*o+s*Q(i),c=s*r*V(i);gs.add(jt(c,u)),Ul=t,Bl=o,Yl=a}function j9(t){return ms=new Dt,Pe(t,Ne),ms*2}function ys(t){return[jt(t[1],t[0]),Vt(t[2])]}function Zn(t){var e=t[0],n=t[1],r=Q(n);return[r*Q(e),r*V(e),V(n)]}function bs(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Yr(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Wl(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function vs(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function xs(t){var e=Ct(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var $t,re,At,se,Kn,em,nm,Wr,eo,yn,Qe,Je={point:Hl,lineStart:im,lineEnd:om,polygonStart:function(){Je.point=am,Je.lineStart=V9,Je.lineEnd=Z9,eo=new Dt,Ne.polygonStart()},polygonEnd:function(){Ne.polygonEnd(),Je.point=Hl,Je.lineStart=im,Je.lineEnd=om,gs<0?($t=-(At=180),re=-(se=90)):eo>tt?se=90:eo<-tt&&(re=-90),Qe[0]=$t,Qe[1]=At},sphere:function(){$t=-(At=180),re=-(se=90)}};function Hl(t,e){yn.push(Qe=[$t=t,At=t]),e<re&&(re=e),e>se&&(se=e)}function rm(t,e){var n=Zn([t*et,e*et]);if(Wr){var r=Yr(Wr,n),i=[r[1],-r[0],0],o=Yr(i,r);xs(o),o=ys(o);var a=t-Kn,s=a>0?1:-1,u=o[0]*yt*s,c,l=ft(a)>180;l^(s*Kn<u&&u<s*t)?(c=o[1]*yt,c>se&&(se=c)):(u=(u+360)%360-180,l^(s*Kn<u&&u<s*t)?(c=-o[1]*yt,c<re&&(re=c)):(e<re&&(re=e),e>se&&(se=e))),l?t<Kn?ue($t,t)>ue($t,At)&&(At=t):ue(t,At)>ue($t,At)&&($t=t):At>=$t?(t<$t&&($t=t),t>At&&(At=t)):t>Kn?ue($t,t)>ue($t,At)&&(At=t):ue(t,At)>ue($t,At)&&($t=t)}else yn.push(Qe=[$t=t,At=t]);e<re&&(re=e),e>se&&(se=e),Wr=n,Kn=t}function im(){Je.point=rm}function om(){Qe[0]=$t,Qe[1]=At,Je.point=Hl,Wr=null}function am(t,e){if(Wr){var n=t-Kn;eo.add(ft(n)>180?n+(n>0?360:-360):n)}else em=t,nm=e;Ne.point(t,e),rm(t,e)}function V9(){Ne.lineStart()}function Z9(){am(em,nm),Ne.lineEnd(),ft(eo)>tt&&($t=-(At=180)),Qe[0]=$t,Qe[1]=At,Wr=null}function ue(t,e){return(e-=t)<0?e+360:e}function K9(t,e){return t[0]-e[0]}function sm(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function Q9(t){var e,n,r,i,o,a,s;if(se=At=-($t=re=1/0),yn=[],Pe(t,Je),n=yn.length){for(yn.sort(K9),e=1,r=yn[0],o=[r];e<n;++e)i=yn[e],sm(r,i[0])||sm(r,i[1])?(ue(r[0],i[1])>ue(r[0],r[1])&&(r[1]=i[1]),ue(i[0],r[1])>ue(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=ue(r[1],i[0]))>a&&(a=s,$t=i[0],At=r[1])}return yn=Qe=null,$t===1/0||re===1/0?[[NaN,NaN],[NaN,NaN]]:[[$t,re],[At,se]]}var no,_s,ws,$s,Ss,As,Ms,Ts,ql,Xl,jl,um,cm,Zt,Kt,Qt,De={sphere:wt,point:Vl,lineStart:lm,lineEnd:fm,polygonStart:function(){De.lineStart=eT,De.lineEnd=nT},polygonEnd:function(){De.lineStart=lm,De.lineEnd=fm}};function Vl(t,e){t*=et,e*=et;var n=Q(e);ro(n*Q(t),n*V(t),V(e))}function ro(t,e,n){++no,ws+=(t-ws)/no,$s+=(e-$s)/no,Ss+=(n-Ss)/no}function lm(){De.point=J9}function J9(t,e){t*=et,e*=et;var n=Q(e);Zt=n*Q(t),Kt=n*V(t),Qt=V(e),De.point=tT,ro(Zt,Kt,Qt)}function tT(t,e){t*=et,e*=et;var n=Q(e),r=n*Q(t),i=n*V(t),o=V(e),a=jt(Ct((a=Kt*o-Qt*i)*a+(a=Qt*r-Zt*o)*a+(a=Zt*i-Kt*r)*a),Zt*r+Kt*i+Qt*o);_s+=a,As+=a*(Zt+(Zt=r)),Ms+=a*(Kt+(Kt=i)),Ts+=a*(Qt+(Qt=o)),ro(Zt,Kt,Qt)}function fm(){De.point=Vl}function eT(){De.point=rT}function nT(){hm(um,cm),De.point=Vl}function rT(t,e){um=t,cm=e,t*=et,e*=et,De.point=hm;var n=Q(e);Zt=n*Q(t),Kt=n*V(t),Qt=V(e),ro(Zt,Kt,Qt)}function hm(t,e){t*=et,e*=et;var n=Q(e),r=n*Q(t),i=n*V(t),o=V(e),a=Kt*o-Qt*i,s=Qt*r-Zt*o,u=Zt*i-Kt*r,c=Fl(a,s,u),l=Vt(c),h=c&&-l/c;ql.add(h*a),Xl.add(h*s),jl.add(h*u),_s+=l,As+=l*(Zt+(Zt=r)),Ms+=l*(Kt+(Kt=i)),Ts+=l*(Qt+(Qt=o)),ro(Zt,Kt,Qt)}function iT(t){no=_s=ws=$s=Ss=As=Ms=Ts=0,ql=new Dt,Xl=new Dt,jl=new Dt,Pe(t,De);var e=+ql,n=+Xl,r=+jl,i=Fl(e,n,r);return i<to&&(e=As,n=Ms,r=Ts,_s<tt&&(e=ws,n=$s,r=Ss),i=Fl(e,n,r),i<to)?[NaN,NaN]:[jt(n,e)*yt,Vt(r/i)*yt]}function Hr(t){return function(){return t}}function Zl(t,e){function n(r,i){return r=t(r,i),e(r[0],r[1])}return t.invert&&e.invert&&(n.invert=function(r,i){return r=e.invert(r,i),r&&t.invert(r[0],r[1])}),n}function Kl(t,e){return ft(t)>ct&&(t-=Math.round(t/Xt)*Xt),[t,e]}Kl.invert=Kl;function Ql(t,e,n){return(t%=Xt)?e||n?Zl(pm(t),gm(e,n)):pm(t):e||n?gm(e,n):Kl}function dm(t){return function(e,n){return e+=t,ft(e)>ct&&(e-=Math.round(e/Xt)*Xt),[e,n]}}function pm(t){var e=dm(t);return e.invert=dm(-t),e}function gm(t,e){var n=Q(t),r=V(t),i=Q(e),o=V(e);function a(s,u){var c=Q(u),l=Q(s)*c,h=V(s)*c,f=V(u),d=f*n+l*r;return[jt(h*i-d*o,l*n-f*r),Vt(d*i+h*o)]}return a.invert=function(s,u){var c=Q(u),l=Q(s)*c,h=V(s)*c,f=V(u),d=f*i-h*o;return[jt(h*i+f*o,l*n+d*r),Vt(d*n-l*r)]},a}function mm(t){t=Ql(t[0]*et,t[1]*et,t.length>2?t[2]*et:0);function e(n){return n=t(n[0]*et,n[1]*et),n[0]*=yt,n[1]*=yt,n}return e.invert=function(n){return n=t.invert(n[0]*et,n[1]*et),n[0]*=yt,n[1]*=yt,n},e}function ym(t,e,n,r,i,o){if(n){var a=Q(e),s=V(e),u=r*n;i==null?(i=e+r*Xt,o=e-u/2):(i=bm(a,i),o=bm(a,o),(r>0?i<o:i>o)&&(i+=r*Xt));for(var c,l=i;r>0?l>o:l<o;l-=u)c=ys([a,-s*Q(l),-s*V(l)]),t.point(c[0],c[1])}}function bm(t,e){e=Zn(e),e[0]-=t,xs(e);var n=X1(-e[1]);return((-e[2]<0?-n:n)+Xt-tt)%Xt}function oT(){var t=Hr([0,0]),e=Hr(90),n=Hr(2),r,i,o={point:a};function a(u,c){r.push(u=i(u,c)),u[0]*=yt,u[1]*=yt}function s(){var u=t.apply(this,arguments),c=e.apply(this,arguments)*et,l=n.apply(this,arguments)*et;return r=[],i=Ql(-u[0]*et,-u[1]*et,0).invert,ym(o,c,l,1),u={type:"Polygon",coordinates:[r]},r=i=null,u}return s.center=function(u){return arguments.length?(t=typeof u=="function"?u:Hr([+u[0],+u[1]]),s):t},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:Hr(+u),s):e},s.precision=function(u){return arguments.length?(n=typeof u=="function"?u:Hr(+u),s):n},s}function vm(){var t=[],e;return{point:function(n,r,i){e.push([n,r,i])},lineStart:function(){t.push(e=[])},lineEnd:wt,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Ps(t,e){return ft(t[0]-e[0])<tt&&ft(t[1]-e[1])<tt}function Ds(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function xm(t,e,n,r,i){var o=[],a=[],s,u;if(t.forEach(function(p){if(!((g=p.length-1)<=0)){var g,m=p[0],y=p[g],x;if(Ps(m,y)){if(!m[2]&&!y[2]){for(i.lineStart(),s=0;s<g;++s)i.point((m=p[s])[0],m[1]);i.lineEnd();return}y[0]+=2*tt}o.push(x=new Ds(m,p,null,!0)),a.push(x.o=new Ds(m,null,x,!1)),o.push(x=new Ds(y,p,null,!1)),a.push(x.o=new Ds(y,null,x,!0))}}),!!o.length){for(a.sort(e),_m(o),_m(a),s=0,u=a.length;s<u;++s)a[s].e=n=!n;for(var c=o[0],l,h;;){for(var f=c,d=!0;f.v;)if((f=f.n)===c)return;l=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(s=0,u=l.length;s<u;++s)i.point((h=l[s])[0],h[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(d)for(l=f.p.z,s=l.length-1;s>=0;--s)i.point((h=l[s])[0],h[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,l=f.z,d=!d}while(!f.v);i.lineEnd()}}}function _m(t){if(e=t.length){for(var e,n=0,r=t[0],i;++n<e;)r.n=i=t[n],i.p=r,r=i;r.n=i=t[0],i.p=r}}function Jl(t){return ft(t[0])<=ct?t[0]:de(t[0])*((ft(t[0])+ct)%Xt-ct)}function wm(t,e){var n=Jl(e),r=e[1],i=V(r),o=[V(n),-Q(n),0],a=0,s=0,u=new Dt;i===1?r=St+tt:i===-1&&(r=-St-tt);for(var c=0,l=t.length;c<l;++c)if(f=(h=t[c]).length)for(var h,f,d=h[f-1],p=Jl(d),g=d[1]/2+fs,m=V(g),y=Q(g),x=0;x<f;++x,p=b,m=w,y=S,d=v){var v=h[x],b=Jl(v),$=v[1]/2+fs,w=V($),S=Q($),_=b-p,P=_>=0?1:-1,D=P*_,A=D>ct,I=m*w;if(u.add(jt(I*P*V(D),y*S+I*Q(D))),a+=A?_+P*Xt:_,A^p>=n^b>=n){var M=Yr(Zn(d),Zn(v));xs(M);var T=Yr(o,M);xs(T);var E=(A^_>=0?-1:1)*Vt(T[2]);(r>E||r===E&&(M[0]||M[1]))&&(s+=A^_>=0?1:-1)}}return(a<-tt||a<tt&&u<-to)^s&1}function $m(t,e,n,r){return function(i){var o=e(i),a=vm(),s=e(a),u=!1,c,l,h,f={point:d,lineStart:g,lineEnd:m,polygonStart:function(){f.point=y,f.lineStart=x,f.lineEnd=v,l=[],c=[]},polygonEnd:function(){f.point=d,f.lineStart=g,f.lineEnd=m,l=Lc(l);var b=wm(c,r);l.length?(u||(i.polygonStart(),u=!0),xm(l,sT,b,n,i)):b&&(u||(i.polygonStart(),u=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),u&&(i.polygonEnd(),u=!1),l=c=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(b,$){t(b,$)&&i.point(b,$)}function p(b,$){o.point(b,$)}function g(){f.point=p,o.lineStart()}function m(){f.point=d,o.lineEnd()}function y(b,$){h.push([b,$]),s.point(b,$)}function x(){s.lineStart(),h=[]}function v(){y(h[0][0],h[0][1]),s.lineEnd();var b=s.clean(),$=a.result(),w,S=$.length,_,P,D;if(h.pop(),c.push(h),h=null,!!S){if(b&1){if(P=$[0],(_=P.length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),w=0;w<_;++w)i.point((D=P[w])[0],D[1]);i.lineEnd()}return}S>1&&b&2&&$.push($.pop().concat($.shift())),l.push($.filter(aT))}}return f}}function aT(t){return t.length>1}function sT(t,e){return((t=t.x)[0]<0?t[1]-St-tt:St-t[1])-((e=e.x)[0]<0?e[1]-St-tt:St-e[1])}const tf=$m(function(){return!0},uT,lT,[-ct,-St]);function uT(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(o,a){var s=o>0?ct:-ct,u=ft(o-e);ft(u-ct)<tt?(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>=ct&&(ft(e-r)<tt&&(e-=r*tt),ft(o-s)<tt&&(o-=s*tt),n=cT(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 cT(t,e,n,r){var i,o,a=V(t-n);return ft(a)>tt?Br((V(e)*(o=Q(r))*V(n)-V(r)*(i=Q(e))*V(t))/(i*o*a)):(e+r)/2}function lT(t,e,n,r){var i;if(t==null)i=n*St,r.point(-ct,i),r.point(0,i),r.point(ct,i),r.point(ct,0),r.point(ct,-i),r.point(0,-i),r.point(-ct,-i),r.point(-ct,0),r.point(-ct,i);else if(ft(t[0]-e[0])>tt){var o=t[0]<e[0]?ct:-ct;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function Sm(t){var e=Q(t),n=2*et,r=e>0,i=ft(e)>tt;function o(l,h,f,d){ym(d,t,n,f,l,h)}function a(l,h){return Q(l)*Q(h)>e}function s(l){var h,f,d,p,g;return{lineStart:function(){p=d=!1,g=1},point:function(m,y){var x=[m,y],v,b=a(m,y),$=r?b?0:c(m,y):b?c(m+(m<0?ct:-ct),y):0;if(!h&&(p=d=b)&&l.lineStart(),b!==d&&(v=u(h,x),(!v||Ps(h,v)||Ps(x,v))&&(x[2]=1)),b!==d)g=0,b?(l.lineStart(),v=u(x,h),l.point(v[0],v[1])):(v=u(h,x),l.point(v[0],v[1],2),l.lineEnd()),h=v;else if(i&&h&&r^b){var w;!($&f)&&(w=u(x,h,!0))&&(g=0,r?(l.lineStart(),l.point(w[0][0],w[0][1]),l.point(w[1][0],w[1][1]),l.lineEnd()):(l.point(w[1][0],w[1][1]),l.lineEnd(),l.lineStart(),l.point(w[0][0],w[0][1],3)))}b&&(!h||!Ps(h,x))&&l.point(x[0],x[1]),h=x,d=b,f=$},lineEnd:function(){d&&l.lineEnd(),h=null},clean:function(){return g|(p&&d)<<1}}}function u(l,h,f){var d=Zn(l),p=Zn(h),g=[1,0,0],m=Yr(d,p),y=bs(m,m),x=m[0],v=y-x*x;if(!v)return!f&&l;var b=e*y/v,$=-e*x/v,w=Yr(g,m),S=vs(g,b),_=vs(m,$);Wl(S,_);var P=w,D=bs(S,P),A=bs(P,P),I=D*D-A*(bs(S,S)-1);if(!(I<0)){var M=Ct(I),T=vs(P,(-D-M)/A);if(Wl(T,S),T=ys(T),!f)return T;var E=l[0],L=h[0],N=l[1],O=h[1],k;L<E&&(k=E,E=L,L=k);var R=L-E,G=ft(R-ct)<tt,C=G||R<tt;if(!G&&O<N&&(k=N,N=O,O=k),C?G?N+O>0^T[1]<(ft(T[0]-E)<tt?N:O):N<=T[1]&&T[1]<=O:R>ct^(E<=T[0]&&T[0]<=L)){var z=vs(P,(-D+M)/A);return Wl(z,S),[T,ys(z)]}}}function c(l,h){var f=r?t:ct-t,d=0;return l<-f?d|=1:l>f&&(d|=2),h<-f?d|=4:h>f&&(d|=8),d}return $m(a,s,o,r?[0,-t]:[-ct,t-ct])}function fT(t,e,n,r,i,o){var a=t[0],s=t[1],u=e[0],c=e[1],l=0,h=1,f=u-a,d=c-s,p;if(p=n-a,!(!f&&p>0)){if(p/=f,f<0){if(p<l)return;p<h&&(h=p)}else if(f>0){if(p>h)return;p>l&&(l=p)}if(p=i-a,!(!f&&p<0)){if(p/=f,f<0){if(p>h)return;p>l&&(l=p)}else if(f>0){if(p<l)return;p<h&&(h=p)}if(p=r-s,!(!d&&p>0)){if(p/=d,d<0){if(p<l)return;p<h&&(h=p)}else if(d>0){if(p>h)return;p>l&&(l=p)}if(p=o-s,!(!d&&p<0)){if(p/=d,d<0){if(p>h)return;p>l&&(l=p)}else if(d>0){if(p<l)return;p<h&&(h=p)}return l>0&&(t[0]=a+l*f,t[1]=s+l*d),h<1&&(e[0]=a+h*f,e[1]=s+h*d),!0}}}}}var io=1e9,Ls=-io;function Es(t,e,n,r){function i(c,l){return t<=c&&c<=n&&e<=l&&l<=r}function o(c,l,h,f){var d=0,p=0;if(c==null||(d=a(c,h))!==(p=a(l,h))||u(c,l)<0^h>0)do f.point(d===0||d===3?t:n,d>1?r:e);while((d=(d+h+4)%4)!==p);else f.point(l[0],l[1])}function a(c,l){return ft(c[0]-t)<tt?l>0?0:3:ft(c[0]-n)<tt?l>0?2:1:ft(c[1]-e)<tt?l>0?1:0:l>0?3:2}function s(c,l){return u(c.x,l.x)}function u(c,l){var h=a(c,1),f=a(l,1);return h!==f?h-f:h===0?l[1]-c[1]:h===1?c[0]-l[0]:h===2?c[1]-l[1]:l[0]-c[0]}return function(c){var l=c,h=vm(),f,d,p,g,m,y,x,v,b,$,w,S={point:_,lineStart:I,lineEnd:M,polygonStart:D,polygonEnd:A};function _(E,L){i(E,L)&&l.point(E,L)}function P(){for(var E=0,L=0,N=d.length;L<N;++L)for(var O=d[L],k=1,R=O.length,G=O[0],C,z,X=G[0],H=G[1];k<R;++k)C=X,z=H,G=O[k],X=G[0],H=G[1],z<=r?H>r&&(X-C)*(r-z)>(H-z)*(t-C)&&++E:H<=r&&(X-C)*(r-z)<(H-z)*(t-C)&&--E;return E}function D(){l=h,f=[],d=[],w=!0}function A(){var E=P(),L=w&&E,N=(f=Lc(f)).length;(L||N)&&(c.polygonStart(),L&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),N&&xm(f,s,E,o,c),c.polygonEnd()),l=c,f=d=p=null}function I(){S.point=T,d&&d.push(p=[]),$=!0,b=!1,x=v=NaN}function M(){f&&(T(g,m),y&&b&&h.rejoin(),f.push(h.result())),S.point=_,b&&l.lineEnd()}function T(E,L){var N=i(E,L);if(d&&p.push([E,L]),$)g=E,m=L,y=N,$=!1,N&&(l.lineStart(),l.point(E,L));else if(N&&b)l.point(E,L);else{var O=[x=Math.max(Ls,Math.min(io,x)),v=Math.max(Ls,Math.min(io,v))],k=[E=Math.max(Ls,Math.min(io,E)),L=Math.max(Ls,Math.min(io,L))];fT(O,k,t,e,n,r)?(b||(l.lineStart(),l.point(O[0],O[1])),l.point(k[0],k[1]),N||l.lineEnd(),w=!1):N&&(l.lineStart(),l.point(E,L),w=!1)}x=E,v=L,b=N}return S}}function hT(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Es(t,e,n,r)(o=s)},extent:function(s){return arguments.length?(t=+s[0][0],e=+s[0][1],n=+s[1][0],r=+s[1][1],i=o=null,a):[[t,e],[n,r]]}}}var ef,nf,ks,Cs,qr={sphere:wt,point:wt,lineStart:dT,lineEnd:wt,polygonStart:wt,polygonEnd:wt};function dT(){qr.point=gT,qr.lineEnd=pT}function pT(){qr.point=qr.lineEnd=wt}function gT(t,e){t*=et,e*=et,nf=t,ks=V(e),Cs=Q(e),qr.point=mT}function mT(t,e){t*=et,e*=et;var n=V(e),r=Q(e),i=ft(t-nf),o=Q(i),a=V(i),s=r*a,u=Cs*n-ks*r*o,c=ks*n+Cs*r*o;ef.add(jt(Ct(s*s+u*u),c)),nf=t,ks=n,Cs=r}function Am(t){return ef=new Dt,Pe(t,qr),+ef}var rf=[null,null],yT={type:"LineString",coordinates:rf};function Rs(t,e){return rf[0]=t,rf[1]=e,Am(yT)}var Mm={Feature:function(t,e){return Is(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Is(n[r].geometry,e))return!0;return!1}},Tm={Sphere:function(){return!0},Point:function(t,e){return Pm(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Pm(n[r],e))return!0;return!1},LineString:function(t,e){return Dm(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Dm(n[r],e))return!0;return!1},Polygon:function(t,e){return Lm(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Lm(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Is(n[r],e))return!0;return!1}};function Is(t,e){return t&&Tm.hasOwnProperty(t.type)?Tm[t.type](t,e):!1}function Pm(t,e){return Rs(t,e)===0}function Dm(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=Rs(t[o],e),r===0||o>0&&(i=Rs(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<to*i))return!0;n=r}return!1}function Lm(t,e){return!!wm(t.map(bT),Em(e))}function bT(t){return t=t.map(Em),t.pop(),t}function Em(t){return[t[0]*et,t[1]*et]}function vT(t,e){return(t&&Mm.hasOwnProperty(t.type)?Mm[t.type]:Is)(t,e)}function km(t,e,n){var r=ln(t,e-tt,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function Cm(t,e,n){var r=ln(t,e-tt,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function Rm(){var t,e,n,r,i,o,a,s,u=10,c=u,l=90,h=360,f,d,p,g,m=2.5;function y(){return{type:"MultiLineString",coordinates:x()}}function x(){return ln(hs(r/l)*l,n,l).map(p).concat(ln(hs(s/h)*h,a,h).map(g)).concat(ln(hs(e/u)*u,t,u).filter(function(v){return ft(v%l)>tt}).map(f)).concat(ln(hs(o/c)*c,i,c).filter(function(v){return ft(v%h)>tt}).map(d))}return y.lines=function(){return x().map(function(v){return{type:"LineString",coordinates:v}})},y.outline=function(){return{type:"Polygon",coordinates:[p(r).concat(g(a).slice(1),p(n).reverse().slice(1),g(s).reverse().slice(1))]}},y.extent=function(v){return arguments.length?y.extentMajor(v).extentMinor(v):y.extentMinor()},y.extentMajor=function(v){return arguments.length?(r=+v[0][0],n=+v[1][0],s=+v[0][1],a=+v[1][1],r>n&&(v=r,r=n,n=v),s>a&&(v=s,s=a,a=v),y.precision(m)):[[r,s],[n,a]]},y.extentMinor=function(v){return arguments.length?(e=+v[0][0],t=+v[1][0],o=+v[0][1],i=+v[1][1],e>t&&(v=e,e=t,t=v),o>i&&(v=o,o=i,i=v),y.precision(m)):[[e,o],[t,i]]},y.step=function(v){return arguments.length?y.stepMajor(v).stepMinor(v):y.stepMinor()},y.stepMajor=function(v){return arguments.length?(l=+v[0],h=+v[1],y):[l,h]},y.stepMinor=function(v){return arguments.length?(u=+v[0],c=+v[1],y):[u,c]},y.precision=function(v){return arguments.length?(m=+v,f=km(o,i,90),d=Cm(e,t,m),p=km(s,a,90),g=Cm(r,n,m),y):m},y.extentMajor([[-180,-90+tt],[180,90-tt]]).extentMinor([[-180,-80-tt],[180,80+tt]])}function xT(){return Rm()()}function _T(t,e){var n=t[0]*et,r=t[1]*et,i=e[0]*et,o=e[1]*et,a=Q(r),s=V(r),u=Q(o),c=V(o),l=a*Q(n),h=a*V(n),f=u*Q(i),d=u*V(i),p=2*Vt(Ct(j1(o-r)+a*u*j1(i-n))),g=V(p),m=p?function(y){var x=V(y*=p)/g,v=V(p-y)/g,b=v*l+x*f,$=v*h+x*d,w=v*s+x*c;return[jt($,b)*yt,jt(w,Ct(b*b+$*$))*yt]}:function(){return[n*yt,r*yt]};return m.distance=p,m}const oo=t=>t;var of=new Dt,af=new Dt,Im,Nm,sf,uf,tn={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){tn.lineStart=wT,tn.lineEnd=ST},polygonEnd:function(){tn.lineStart=tn.lineEnd=tn.point=wt,of.add(ft(af)),af=new Dt},result:function(){var t=of/2;return of=new Dt,t}};function wT(){tn.point=$T}function $T(t,e){tn.point=Fm,Im=sf=t,Nm=uf=e}function Fm(t,e){af.add(uf*t-sf*e),sf=t,uf=e}function ST(){Fm(Im,Nm)}var Xr=1/0,Ns=Xr,ao=-Xr,Fs=ao,Gs={point:AT,lineStart:wt,lineEnd:wt,polygonStart:wt,polygonEnd:wt,result:function(){var t=[[Xr,Ns],[ao,Fs]];return ao=Fs=-(Ns=Xr=1/0),t}};function AT(t,e){t<Xr&&(Xr=t),t>ao&&(ao=t),e<Ns&&(Ns=e),e>Fs&&(Fs=e)}var cf=0,lf=0,so=0,zs=0,Os=0,jr=0,ff=0,hf=0,uo=0,Gm,zm,Fe,Ge,pe={point:Qn,lineStart:Om,lineEnd:Um,polygonStart:function(){pe.lineStart=PT,pe.lineEnd=DT},polygonEnd:function(){pe.point=Qn,pe.lineStart=Om,pe.lineEnd=Um},result:function(){var t=uo?[ff/uo,hf/uo]:jr?[zs/jr,Os/jr]:so?[cf/so,lf/so]:[NaN,NaN];return cf=lf=so=zs=Os=jr=ff=hf=uo=0,t}};function Qn(t,e){cf+=t,lf+=e,++so}function Om(){pe.point=MT}function MT(t,e){pe.point=TT,Qn(Fe=t,Ge=e)}function TT(t,e){var n=t-Fe,r=e-Ge,i=Ct(n*n+r*r);zs+=i*(Fe+t)/2,Os+=i*(Ge+e)/2,jr+=i,Qn(Fe=t,Ge=e)}function Um(){pe.point=Qn}function PT(){pe.point=LT}function DT(){Bm(Gm,zm)}function LT(t,e){pe.point=Bm,Qn(Gm=Fe=t,zm=Ge=e)}function Bm(t,e){var n=t-Fe,r=e-Ge,i=Ct(n*n+r*r);zs+=i*(Fe+t)/2,Os+=i*(Ge+e)/2,jr+=i,i=Ge*t-Fe*e,ff+=i*(Fe+t),hf+=i*(Ge+e),uo+=i*3,Qn(Fe=t,Ge=e)}function Ym(t){this._context=t}Ym.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Xt);break}}},result:wt};var df=new Dt,pf,Wm,Hm,co,lo,fo={point:wt,lineStart:function(){fo.point=ET},lineEnd:function(){pf&&qm(Wm,Hm),fo.point=wt},polygonStart:function(){pf=!0},polygonEnd:function(){pf=null},result:function(){var t=+df;return df=new Dt,t}};function ET(t,e){fo.point=qm,Wm=co=t,Hm=lo=e}function qm(t,e){co-=t,lo-=e,df.add(Ct(co*co+lo*lo)),co=t,lo=e}let Xm,Us,jm,Vm;class Zm{constructor(e){this._append=e==null?Km:kT(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,n){switch(this._point){case 0:{this._append`M${e},${n}`,this._point=1;break}case 1:{this._append`L${e},${n}`;break}default:{if(this._append`M${e},${n}`,this._radius!==jm||this._append!==Us){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,jm=r,Us=this._append,Vm=this._,this._=i}this._+=Vm;break}}}result(){const e=this._;return this._="",e.length?e:null}}function Km(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function kT(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return Km;if(e!==Xm){const n=10**e;Xm=e,Us=function(i){let o=1;this._+=i[0];for(const a=i.length;o<a;++o)this._+=Math.round(arguments[o]*n)/n+i[o]}}return Us}function CT(t,e){let n=3,r=4.5,i,o;function a(s){return s&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),Pe(s,i(o))),o.result()}return a.area=function(s){return Pe(s,i(tn)),tn.result()},a.measure=function(s){return Pe(s,i(fo)),fo.result()},a.bounds=function(s){return Pe(s,i(Gs)),Gs.result()},a.centroid=function(s){return Pe(s,i(pe)),pe.result()},a.projection=function(s){return arguments.length?(i=s==null?(t=null,oo):(t=s).stream,a):t},a.context=function(s){return arguments.length?(o=s==null?(e=null,new Zm(n)):new Ym(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 Zm(n)),a},a.projection(t).digits(n).context(e)}function RT(t){return{stream:ho(t)}}function ho(t){return function(e){var n=new gf;for(var r in t)n[r]=t[r];return n.stream=e,n}}function gf(){}gf.prototype={constructor:gf,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function mf(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),Pe(n,t.stream(Gs)),e(Gs.result()),r!=null&&t.clipExtent(r),t}function Bs(t,e,n){return mf(t,function(r){var i=e[1][0]-e[0][0],o=e[1][1]-e[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),s=+e[0][0]+(i-a*(r[1][0]+r[0][0]))/2,u=+e[0][1]+(o-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([s,u])},n)}function yf(t,e,n){return Bs(t,[[0,0],e],n)}function bf(t,e,n){return mf(t,function(r){var i=+e,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,s=-o*r[0][1];t.scale(150*o).translate([a,s])},n)}function vf(t,e,n){return mf(t,function(r){var i=+e,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],s=(i-o*(r[1][1]+r[0][1]))/2;t.scale(150*o).translate([a,s])},n)}var Qm=16,IT=Q(30*et);function Jm(t,e){return+e?FT(t,e):NT(t)}function NT(t){return ho({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function FT(t,e){function n(r,i,o,a,s,u,c,l,h,f,d,p,g,m){var y=c-r,x=l-i,v=y*y+x*x;if(v>4*e&&g--){var b=a+f,$=s+d,w=u+p,S=Ct(b*b+$*$+w*w),_=Vt(w/=S),P=ft(ft(w)-1)<tt||ft(o-h)<tt?(o+h)/2:jt($,b),D=t(P,_),A=D[0],I=D[1],M=A-r,T=I-i,E=x*M-y*T;(E*E/v>e||ft((y*M+x*T)/v-.5)>.3||a*f+s*d+u*p<IT)&&(n(r,i,o,a,s,u,A,I,P,b/=S,$/=S,w,g,m),m.point(A,I),n(A,I,P,b,$,w,c,l,h,f,d,p,g,m))}}return function(r){var i,o,a,s,u,c,l,h,f,d,p,g,m={point:y,lineStart:x,lineEnd:b,polygonStart:function(){r.polygonStart(),m.lineStart=$},polygonEnd:function(){r.polygonEnd(),m.lineStart=x}};function y(_,P){_=t(_,P),r.point(_[0],_[1])}function x(){h=NaN,m.point=v,r.lineStart()}function v(_,P){var D=Zn([_,P]),A=t(_,P);n(h,f,l,d,p,g,h=A[0],f=A[1],l=_,d=D[0],p=D[1],g=D[2],Qm,r),r.point(h,f)}function b(){m.point=y,r.lineEnd()}function $(){x(),m.point=w,m.lineEnd=S}function w(_,P){v(i=_,P),o=h,a=f,s=d,u=p,c=g,m.point=v}function S(){n(h,f,l,d,p,g,o,a,i,s,u,c,Qm,r),m.lineEnd=b,b()}return m}}var GT=ho({point:function(t,e){this.stream.point(t*et,e*et)}});function zT(t){return ho({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function OT(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 OT(t,e,n,r,i);var a=Q(o),s=V(o),u=a*t,c=s*t,l=a/t,h=s/t,f=(s*n-a*e)/t,d=(s*e+a*n)/t;function p(g,m){return g*=r,m*=i,[u*g-c*m+e,n-c*g-u*m]}return p.invert=function(g,m){return[r*(l*g-h*m+f),i*(d-h*g-l*m)]},p}function ze(t){return xf(function(){return t})()}function xf(t){var e,n=150,r=480,i=250,o=0,a=0,s=0,u=0,c=0,l,h=0,f=1,d=1,p=null,g=tf,m=null,y,x,v,b=oo,$=.5,w,S,_,P,D;function A(E){return _(E[0]*et,E[1]*et)}function I(E){return E=_.invert(E[0],E[1]),E&&[E[0]*yt,E[1]*yt]}A.stream=function(E){return P&&D===E?P:P=GT(zT(l)(g(w(b(D=E)))))},A.preclip=function(E){return arguments.length?(g=E,p=void 0,T()):g},A.postclip=function(E){return arguments.length?(b=E,m=y=x=v=null,T()):b},A.clipAngle=function(E){return arguments.length?(g=+E?Sm(p=E*et):(p=null,tf),T()):p*yt},A.clipExtent=function(E){return arguments.length?(b=E==null?(m=y=x=v=null,oo):Es(m=+E[0][0],y=+E[0][1],x=+E[1][0],v=+E[1][1]),T()):m==null?null:[[m,y],[x,v]]},A.scale=function(E){return arguments.length?(n=+E,M()):n},A.translate=function(E){return arguments.length?(r=+E[0],i=+E[1],M()):[r,i]},A.center=function(E){return arguments.length?(o=E[0]%360*et,a=E[1]%360*et,M()):[o*yt,a*yt]},A.rotate=function(E){return arguments.length?(s=E[0]%360*et,u=E[1]%360*et,c=E.length>2?E[2]%360*et:0,M()):[s*yt,u*yt,c*yt]},A.angle=function(E){return arguments.length?(h=E%360*et,M()):h*yt},A.reflectX=function(E){return arguments.length?(f=E?-1:1,M()):f<0},A.reflectY=function(E){return arguments.length?(d=E?-1:1,M()):d<0},A.precision=function(E){return arguments.length?(w=Jm(S,$=E*E),T()):Ct($)},A.fitExtent=function(E,L){return Bs(A,E,L)},A.fitSize=function(E,L){return yf(A,E,L)},A.fitWidth=function(E,L){return bf(A,E,L)},A.fitHeight=function(E,L){return vf(A,E,L)};function M(){var E=ty(n,0,0,f,d,h).apply(null,e(o,a)),L=ty(n,r-E[0],i-E[1],f,d,h);return l=Ql(s,u,c),S=Zl(e,L),_=Zl(l,S),w=Jm(S,$),T()}function T(){return P=D=null,A}return function(){return e=t.apply(this,arguments),A.invert=e.invert&&I,M()}}function _f(t){var e=0,n=ct/3,r=xf(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*et,n=o[1]*et):[e*yt,n*yt]},i}function UT(t){var e=Q(t);function n(r,i){return[r*e,V(i)/e]}return n.invert=function(r,i){return[r/e,Vt(i*e)]},n}function ey(t,e){var n=V(t),r=(n+V(e))/2;if(ft(r)<tt)return UT(t);var i=1+n*(2*r-n),o=Ct(i)/r;function a(s,u){var c=Ct(i-2*r*V(u))/r;return[c*V(s*=r),o-c*Q(s)]}return a.invert=function(s,u){var c=o-u,l=jt(s,ft(c))*de(c);return c*r<0&&(l-=ct*de(s)*de(c)),[l/r,Vt((i-(s*s+c*c)*r*r)/(2*r))]},a}function Ys(){return _f(ey).scale(155.424).center([0,33.6442])}function ny(){return Ys().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function BT(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 YT(){var t,e,n=ny(),r,i=Ys().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Ys().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,u,c={point:function(f,d){u=[f,d]}};function l(f){var d=f[0],p=f[1];return u=null,r.point(d,p),u||(o.point(d,p),u)||(s.point(d,p),u)}l.invert=function(f){var d=n.scale(),p=n.translate(),g=(f[0]-p[0])/d,m=(f[1]-p[1])/d;return(m>=.12&&m<.234&&g>=-.425&&g<-.214?i:m>=.166&&m<.234&&g>=-.214&&g<-.115?a:n).invert(f)},l.stream=function(f){return t&&e===f?t:t=BT([n.stream(e=f),i.stream(f),a.stream(f)])},l.precision=function(f){return arguments.length?(n.precision(f),i.precision(f),a.precision(f),h()):n.precision()},l.scale=function(f){return arguments.length?(n.scale(f),i.scale(f*.35),a.scale(f),l.translate(n.translate())):n.scale()},l.translate=function(f){if(!arguments.length)return n.translate();var d=n.scale(),p=+f[0],g=+f[1];return r=n.translate(f).clipExtent([[p-.455*d,g-.238*d],[p+.455*d,g+.238*d]]).stream(c),o=i.translate([p-.307*d,g+.201*d]).clipExtent([[p-.425*d+tt,g+.12*d+tt],[p-.214*d-tt,g+.234*d-tt]]).stream(c),s=a.translate([p-.205*d,g+.212*d]).clipExtent([[p-.214*d+tt,g+.166*d+tt],[p-.115*d-tt,g+.234*d-tt]]).stream(c),h()},l.fitExtent=function(f,d){return Bs(l,f,d)},l.fitSize=function(f,d){return yf(l,f,d)},l.fitWidth=function(f,d){return bf(l,f,d)},l.fitHeight=function(f,d){return vf(l,f,d)};function h(){return t=e=null,l}return l.scale(1070)}function ry(t){return function(e,n){var r=Q(e),i=Q(n),o=t(r*i);return o===1/0?[2,0]:[o*i*V(e),o*V(n)]}}function po(t){return function(e,n){var r=Ct(e*e+n*n),i=t(r),o=V(i),a=Q(i);return[jt(e*o,r*a),Vt(r&&n*o/r)]}}var wf=ry(function(t){return Ct(2/(1+t))});wf.invert=po(function(t){return 2*Vt(t/2)});function WT(){return ze(wf).scale(124.75).clipAngle(180-.001)}var $f=ry(function(t){return(t=X1(t))&&t/V(t)});$f.invert=po(function(t){return t});function HT(){return ze($f).scale(79.4188).clipAngle(180-.001)}function go(t,e){return[t,ds(zl((St+e)/2))]}go.invert=function(t,e){return[t,2*Br(q1(e))-St]};function qT(){return iy(go).scale(961/Xt)}function iy(t){var e=ze(t),n=e.center,r=e.scale,i=e.translate,o=e.clipExtent,a=null,s,u,c;e.scale=function(h){return arguments.length?(r(h),l()):r()},e.translate=function(h){return arguments.length?(i(h),l()):i()},e.center=function(h){return arguments.length?(n(h),l()):n()},e.clipExtent=function(h){return arguments.length?(h==null?a=s=u=c=null:(a=+h[0][0],s=+h[0][1],u=+h[1][0],c=+h[1][1]),l()):a==null?null:[[a,s],[u,c]]};function l(){var h=ct*r(),f=e(mm(e.rotate()).invert([0,0]));return o(a==null?[[f[0]-h,f[1]-h],[f[0]+h,f[1]+h]]:t===go?[[Math.max(f[0]-h,a),s],[Math.min(f[0]+h,u),c]]:[[a,Math.max(f[1]-h,s)],[u,Math.min(f[1]+h,c)]])}return l()}function Ws(t){return zl((St+t)/2)}function oy(t,e){var n=Q(t),r=t===e?V(t):ds(n/Q(e))/ds(Ws(e)/Ws(t)),i=n*Gl(Ws(t),r)/r;if(!r)return go;function o(a,s){i>0?s<-St+tt&&(s=-St+tt):s>St-tt&&(s=St-tt);var u=i/Gl(Ws(s),r);return[u*V(r*a),i-u*Q(r*a)]}return o.invert=function(a,s){var u=i-s,c=de(r)*Ct(a*a+u*u),l=jt(a,ft(u))*de(u);return u*r<0&&(l-=ct*de(a)*de(u)),[l/r,2*Br(Gl(i/c,1/r))-St]},o}function XT(){return _f(oy).scale(109.5).parallels([30,30])}function mo(t,e){return[t,e]}mo.invert=mo;function jT(){return ze(mo).scale(152.63)}function ay(t,e){var n=Q(t),r=t===e?V(t):(n-Q(e))/(e-t),i=n/r+t;if(ft(r)<tt)return mo;function o(a,s){var u=i-s,c=r*a;return[u*V(c),i-u*Q(c)]}return o.invert=function(a,s){var u=i-s,c=jt(a,ft(u))*de(u);return u*r<0&&(c-=ct*de(a)*de(u)),[c/r,i-de(r)*Ct(a*a+u*u)]},o}function VT(){return _f(ay).scale(131.154).center([0,13.9389])}var yo=1.340264,bo=-.081106,vo=893e-6,xo=.003796,Hs=Ct(3)/2,ZT=12;function Sf(t,e){var n=Vt(Hs*V(e)),r=n*n,i=r*r*r;return[t*Q(n)/(Hs*(yo+3*bo*r+i*(7*vo+9*xo*r))),n*(yo+bo*r+i*(vo+xo*r))]}Sf.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,u;o<ZT&&(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,!(ft(a)<to));++o);return[Hs*t*(yo+3*bo*r+i*(7*vo+9*xo*r))/Q(n),Vt(V(n)/Hs)]};function KT(){return ze(Sf).scale(177.158)}function Af(t,e){var n=Q(e),r=Q(t)*n;return[n*V(t)/r,V(e)/r]}Af.invert=po(Br);function QT(){return ze(Af).scale(144.049).clipAngle(60)}function JT(){var t=1,e=0,n=0,r=1,i=1,o=0,a,s,u=null,c,l,h,f=1,d=1,p=ho({point:function(b,$){var w=v([b,$]);this.stream.point(w[0],w[1])}}),g=oo,m,y;function x(){return f=t*r,d=t*i,m=y=null,v}function v(b){var $=b[0]*f,w=b[1]*d;if(o){var S=w*a-$*s;$=$*a+w*s,w=S}return[$+e,w+n]}return v.invert=function(b){var $=b[0]-e,w=b[1]-n;if(o){var S=w*a+$*s;$=$*a-w*s,w=S}return[$/f,w/d]},v.stream=function(b){return m&&y===b?m:m=p(g(y=b))},v.postclip=function(b){return arguments.length?(g=b,u=c=l=h=null,x()):g},v.clipExtent=function(b){return arguments.length?(g=b==null?(u=c=l=h=null,oo):Es(u=+b[0][0],c=+b[0][1],l=+b[1][0],h=+b[1][1]),x()):u==null?null:[[u,c],[l,h]]},v.scale=function(b){return arguments.length?(t=+b,x()):t},v.translate=function(b){return arguments.length?(e=+b[0],n=+b[1],x()):[e,n]},v.angle=function(b){return arguments.length?(o=b%360*et,s=V(o),a=Q(o),x()):o*yt},v.reflectX=function(b){return arguments.length?(r=b?-1:1,x()):r<0},v.reflectY=function(b){return arguments.length?(i=b?-1:1,x()):i<0},v.fitExtent=function(b,$){return Bs(v,b,$)},v.fitSize=function(b,$){return yf(v,b,$)},v.fitWidth=function(b,$){return bf(v,b,$)},v.fitHeight=function(b,$){return vf(v,b,$)},v}function Mf(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}Mf.invert=function(t,e){var n=e,r=25,i;do{var o=n*n,a=o*o;n-=i=(n*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-e)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(ft(i)>tt&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function tP(){return ze(Mf).scale(175.295)}function Tf(t,e){return[Q(e)*V(t),V(e)]}Tf.invert=po(Vt);function eP(){return ze(Tf).scale(249.5).clipAngle(90+tt)}function Pf(t,e){var n=Q(e),r=1+Q(t)*n;return[n*V(t)/r,V(e)/r]}Pf.invert=po(function(t){return 2*Br(t)});function nP(){return ze(Pf).scale(250).clipAngle(142)}function Df(t,e){return[ds(zl((St+e)/2)),-t]}Df.invert=function(t,e){return[-e,2*Br(q1(t))-St]};function rP(){var t=iy(Df),e=t.center,n=t.rotate;return t.center=function(r){return arguments.length?e([-r[1],r[0]]):(r=e(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function iP(t,e){return t.parent===e.parent?1:2}function oP(t){return t.reduce(aP,0)/t.length}function aP(t,e){return t+e.x}function sP(t){return 1+t.reduce(uP,0)}function uP(t,e){return Math.max(t,e.y)}function cP(t){for(var e;e=t.children;)t=e[0];return t}function lP(t){for(var e;e=t.children;)t=e[e.length-1];return t}function fP(){var t=iP,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(f){var d=f.children;d?(f.x=oP(d),f.y=sP(d)):(f.x=a?s+=t(f,a):0,f.y=0,a=f)});var u=cP(o),c=lP(o),l=u.x-t(u,c)/2,h=c.x+t(c,u)/2;return o.eachAfter(r?function(f){f.x=(f.x-o.x)*e,f.y=(o.y-f.y)*n}:function(f){f.x=(f.x-l)/(h-l)*e,f.y=(1-(o.y?f.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(t=o,i):t},i.size=function(o){return arguments.length?(r=!1,e=+o[0],n=+o[1],i):r?null:[e,n]},i.nodeSize=function(o){return arguments.length?(r=!0,e=+o[0],n=+o[1],i):r?[e,n]:null},i}function hP(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 dP(){return this.eachAfter(hP)}function pP(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function gP(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 mP(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 yP(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function bP(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 vP(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function xP(t){for(var e=this,n=_P(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 _P(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 wP(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function $P(){return Array.from(this)}function SP(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function AP(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*MP(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function qs(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=DP)):e===void 0&&(e=PP);for(var n=new Jn(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 Jn(a[s])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(sy)}function TP(){return qs(this).eachBefore(LP)}function PP(t){return t.children}function DP(t){return Array.isArray(t)?t[1]:null}function LP(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 Jn(t){this.data=t,this.depth=this.height=0,this.parent=null}Jn.prototype=qs.prototype={constructor:Jn,count:dP,each:pP,eachAfter:mP,eachBefore:gP,find:yP,sum:bP,sort:vP,path:xP,ancestors:wP,descendants:$P,leaves:SP,links:AP,copy:TP,[Symbol.iterator]:MP};function Xs(t){return t==null?null:uy(t)}function uy(t){if(typeof t!="function")throw new Error;return t}function tr(){return 0}function Vr(t){return function(){return t}}const EP=1664525,kP=1013904223,cy=4294967296;function Lf(){let t=1;return()=>(t=(EP*t+kP)%cy)/cy}function CP(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function RP(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 IP(t){return ly(t,Lf())}function ly(t,e){for(var n=0,r=(t=RP(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&fy(a,o)?++n:(a=FP(i=NP(i,o)),n=0);return a}function NP(t,e){var n,r;if(Ef(e,t))return[e];for(n=0;n<t.length;++n)if(js(e,t[n])&&Ef(_o(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(js(_o(t[n],t[r]),e)&&js(_o(t[n],e),t[r])&&js(_o(t[r],e),t[n])&&Ef(hy(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function js(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function 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 Ef(t,e){for(var n=0;n<e.length;++n)if(!fy(t,e[n]))return!1;return!0}function FP(t){switch(t.length){case 1:return GP(t[0]);case 2:return _o(t[0],t[1]);case 3:return hy(t[0],t[1],t[2])}}function GP(t){return{x:t.x,y:t.y,r:t.r}}function _o(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,c=a-r,l=s-i,h=Math.sqrt(u*u+c*c);return{x:(n+o+u/h*l)/2,y:(r+a+c/h*l)/2,r:(h+i+s)/2}}function hy(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,c=n.x,l=n.y,h=n.r,f=r-a,d=r-c,p=i-s,g=i-l,m=u-o,y=h-o,x=r*r+i*i-o*o,v=x-a*a-s*s+u*u,b=x-c*c-l*l+h*h,$=d*p-f*g,w=(p*b-g*v)/($*2)-r,S=(g*m-p*y)/$,_=(d*v-f*b)/($*2)-i,P=(f*y-d*m)/$,D=S*S+P*P-1,A=2*(o+w*S+_*P),I=w*w+_*_-o*o,M=-(Math.abs(D)>1e-6?(A+Math.sqrt(A*A-4*D*I))/(2*D):I/A);return{x:r+w+S*M,y:i+_+P*M,r:M}}function dy(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,s,u,c=r*r+a*a;c?(o=e.r+n.r,o*=o,u=t.r+n.r,u*=u,o>u?(i=(c+u-o)/(2*c),s=Math.sqrt(Math.max(0,u/c-i*i)),n.x=t.x-i*r-s*a,n.y=t.y-i*a+s*r):(i=(c+o-u)/(2*c),s=Math.sqrt(Math.max(0,o/c-i*i)),n.x=e.x+i*r-s*a,n.y=e.y+i*a+s*r)):(n.x=e.x+n.r,n.y=e.y)}function py(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 Vs(t){this._=t,this.next=null,this.previous=null}function my(t,e){if(!(o=(t=CP(t)).length))return 0;var n,r,i,o,a,s,u,c,l,h,f;if(n=t[0],n.x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;dy(r,n,i=t[2]),n=new Vs(n),r=new Vs(r),i=new Vs(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(u=3;u<o;++u){dy(n._,r._,i=t[u]),i=new Vs(i),c=r.next,l=n.previous,h=r._.r,f=n._.r;do if(h<=f){if(py(c._,i._)){r=c,n.next=r,r.previous=n,--u;continue t}h+=c._.r,c=c.next}else{if(py(l._,i._)){n=l,n.next=r,r.previous=n,--u;continue t}f+=l._.r,l=l.previous}while(c!==l.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=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=ly(n,e),u=0;u<o;++u)n=t[u],n.x-=i.x,n.y-=i.y;return i.r}function zP(t){return my(t,Lf()),t}function OP(t){return Math.sqrt(t.value)}function UP(){var t=null,e=1,n=1,r=tr;function i(o){const a=Lf();return o.x=e/2,o.y=n/2,t?o.eachBefore(yy(t)).eachAfter(kf(r,.5,a)).eachBefore(by(1)):o.eachBefore(yy(OP)).eachAfter(kf(tr,1,a)).eachAfter(kf(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=Xs(o),i):t},i.size=function(o){return arguments.length?(e=+o[0],n=+o[1],i):[e,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:Vr(+o),i):r},i}function yy(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function kf(t,e,n){return function(r){if(i=r.children){var i,o,a=i.length,s=t(r)*e||0,u;if(s)for(o=0;o<a;++o)i[o].r+=s;if(u=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,c=t.value&&(r-e)/t.value;++s<u;)a=o[s],a.y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}function BP(){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 c=u.x0,l=u.y0,h=u.x1-n,f=u.y1-n;h<c&&(c=h=(c+h)/2),f<l&&(l=f=(l+f)/2),u.x0=c,u.y0=l,u.x1=h,u.y1=f}}return i.round=function(a){return arguments.length?(r=!!a,i):r},i.size=function(a){return arguments.length?(t=+a[0],e=+a[1],i):[t,e]},i.padding=function(a){return arguments.length?(n=+a,i):n},i}var YP={depth:-1},xy={},Cf={};function WP(t){return t.id}function HP(t){return t.parentId}function qP(){var t=WP,e=HP,n;function r(i){var o=Array.from(i),a=t,s=e,u,c,l,h,f,d,p,g,m=new Map;if(n!=null){const y=o.map((b,$)=>XP(n(b,$,i))),x=y.map(_y),v=new Set(y).add("");for(const b of x)v.has(b)||(v.add(b),y.push(b),x.push(_y(b)),o.push(Cf));a=(b,$)=>y[$],s=(b,$)=>x[$]}for(l=0,u=o.length;l<u;++l)c=o[l],d=o[l]=new Jn(c),(p=a(c,l,i))!=null&&(p+="")&&(g=d.id=p,m.set(g,m.has(g)?xy:d)),(p=s(c,l,i))!=null&&(p+="")&&(d.parent=p);for(l=0;l<u;++l)if(d=o[l],p=d.parent){if(f=m.get(p),!f)throw new Error("missing: "+p);if(f===xy)throw new Error("ambiguous: "+p);f.children?f.children.push(d):f.children=[d],d.parent=f}else{if(h)throw new Error("multiple roots");h=d}if(!h)throw new Error("no root");if(n!=null){for(;h.data===Cf&&h.children.length===1;)h=h.children[0],--u;for(let y=o.length-1;y>=0&&(d=o[y],d.data===Cf);--y)d.data=null}if(h.parent=YP,h.eachBefore(function(y){y.depth=y.parent.depth+1,--u}).eachBefore(sy),h.parent=null,u>0)throw new Error("cycle");return h}return r.id=function(i){return arguments.length?(t=Xs(i),r):t},r.parentId=function(i){return arguments.length?(e=Xs(i),r):e},r.path=function(i){return arguments.length?(n=Xs(i),r):n},r}function XP(t){t=`${t}`;let e=t.length;return Rf(t,e-1)&&!Rf(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&&!Rf(t,e););return t.slice(0,e)}function Rf(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function jP(t,e){return t.parent===e.parent?1:2}function If(t){var e=t.children;return e?e[0]:t.t}function Nf(t){var e=t.children;return e?e[e.length-1]:t.t}function VP(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 ZP(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 KP(t,e,n){return t.a.parent===e.parent?t.a:n}function Zs(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}Zs.prototype=Object.create(Jn.prototype);function QP(t){for(var e=new Zs(t,0),n,r=[e],i,o,a,s;n=r.pop();)if(o=n._.children)for(n.children=new Array(s=o.length),a=s-1;a>=0;--a)r.push(i=n.children[a]=new Zs(o[a],a)),i.parent=n;return(e.parent=new Zs(null,0)).children=[e],e}function JP(){var t=jP,e=1,n=1,r=null;function i(c){var l=QP(c);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(a),r)c.eachBefore(u);else{var h=c,f=c,d=c;c.eachBefore(function(x){x.x<h.x&&(h=x),x.x>f.x&&(f=x),x.depth>d.depth&&(d=x)});var p=h===f?1:t(h,f)/2,g=p-h.x,m=e/(f.x+p+g),y=n/(d.depth||1);c.eachBefore(function(x){x.x=(x.x+g)*m,x.y=x.depth*y})}return c}function o(c){var l=c.children,h=c.parent.children,f=c.i?h[c.i-1]:null;if(l){ZP(c);var d=(l[0].z+l[l.length-1].z)/2;f?(c.z=f.z+t(c._,f._),c.m=c.z-d):c.z=d}else f&&(c.z=f.z+t(c._,f._));c.parent.A=s(c,f,c.parent.A||h[0])}function a(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function s(c,l,h){if(l){for(var f=c,d=c,p=l,g=f.parent.children[0],m=f.m,y=d.m,x=p.m,v=g.m,b;p=Nf(p),f=If(f),p&&f;)g=If(g),d=Nf(d),d.a=c,b=p.z+x-f.z-m+t(p._,f._),b>0&&(VP(KP(p,c,h),c,b),m+=b,y+=b),x+=p.m,m+=f.m,v+=g.m,y+=d.m;p&&!Nf(d)&&(d.t=p,d.m+=x-y),f&&!If(g)&&(g.t=f,g.m+=m-v,h=c)}return h}function u(c){c.x*=e,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(t=c,i):t},i.size=function(c){return arguments.length?(r=!1,e=+c[0],n=+c[1],i):r?null:[e,n]},i.nodeSize=function(c){return arguments.length?(r=!0,e=+c[0],n=+c[1],i):r?[e,n]:null},i}function Ks(t,e,n,r,i){for(var o=t.children,a,s=-1,u=o.length,c=t.value&&(i-n)/t.value;++s<u;)a=o[s],a.x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}var wy=(1+Math.sqrt(5))/2;function $y(t,e,n,r,i,o){for(var a=[],s=e.children,u,c,l=0,h=0,f=s.length,d,p,g=e.value,m,y,x,v,b,$,w;l<f;){d=i-n,p=o-r;do m=s[h++].value;while(!m&&h<f);for(y=x=m,$=Math.max(p/d,d/p)/(g*t),w=m*m*$,b=Math.max(x/w,w/y);h<f;++h){if(m+=c=s[h].value,c<y&&(y=c),c>x&&(x=c),w=m*m*$,v=Math.max(x/w,w/y),v>b){m-=c;break}b=v}a.push(u={value:m,dice:d<p,children:s.slice(l,h)}),u.dice?wo(u,n,r,i,g?r+=p*m/g:o):Ks(u,n,r,g?n+=d*m/g:i,o),g-=m,l=h}return a}const Ff=function t(e){function n(r,i,o,a,s){$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=Ff,e=!1,n=1,r=1,i=[0],o=tr,a=tr,s=tr,u=tr,c=tr;function l(f){return f.x0=f.y0=0,f.x1=n,f.y1=r,f.eachBefore(h),i=[0],e&&f.eachBefore(vy),f}function h(f){var d=i[f.depth],p=f.x0+d,g=f.y0+d,m=f.x1-d,y=f.y1-d;m<p&&(p=m=(p+m)/2),y<g&&(g=y=(g+y)/2),f.x0=p,f.y0=g,f.x1=m,f.y1=y,f.children&&(d=i[f.depth+1]=o(f)/2,p+=c(f)-d,g+=a(f)-d,m-=s(f)-d,y-=u(f)-d,m<p&&(p=m=(p+m)/2),y<g&&(g=y=(g+y)/2),t(f,p,g,m,y))}return l.round=function(f){return arguments.length?(e=!!f,l):e},l.size=function(f){return arguments.length?(n=+f[0],r=+f[1],l):[n,r]},l.tile=function(f){return arguments.length?(t=uy(f),l):t},l.padding=function(f){return arguments.length?l.paddingInner(f).paddingOuter(f):l.paddingInner()},l.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:Vr(+f),l):o},l.paddingOuter=function(f){return arguments.length?l.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):l.paddingTop()},l.paddingTop=function(f){return arguments.length?(a=typeof f=="function"?f:Vr(+f),l):a},l.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:Vr(+f),l):s},l.paddingBottom=function(f){return arguments.length?(u=typeof f=="function"?f:Vr(+f),l):u},l.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:Vr(+f),l):c},l}function tD(t,e,n,r,i){var o=t.children,a,s=o.length,u,c=new Array(s+1);for(c[0]=u=a=0;a<s;++a)c[a+1]=u+=o[a].value;l(0,s,t.value,e,n,r,i);function l(h,f,d,p,g,m,y){if(h>=f-1){var x=o[h];x.x0=p,x.y0=g,x.x1=m,x.y1=y;return}for(var v=c[h],b=d/2+v,$=h+1,w=f-1;$<w;){var S=$+w>>>1;c[S]<b?$=S+1:w=S}b-c[$-1]<c[$]-b&&h+1<$&&--$;var _=c[$]-v,P=d-_;if(m-p>y-g){var D=d?(p*P+m*_)/d:m;l(h,$,_,p,g,D,y),l($,f,P,D,g,m,y)}else{var A=d?(g*P+y*_)/d:y;l(h,$,_,p,g,m,A),l($,f,P,p,A,m,y)}}}function eD(t,e,n,r,i){(t.depth&1?Ks:wo)(t,e,n,r,i)}const nD=function t(e){function n(r,i,o,a,s){if((u=r._squarify)&&u.ratio===e)for(var u,c,l,h,f=-1,d,p=u.length,g=r.value;++f<p;){for(c=u[f],l=c.children,h=c.value=0,d=l.length;h<d;++h)c.value+=l[h].value;c.dice?wo(c,i,o,a,g?o+=(s-o)*c.value/g:s):Ks(c,i,o,g?i+=(a-i)*c.value/g:a,s),g-=c.value}else r._squarify=u=$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 rD(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 iD(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 oD(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function aD(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&&oD(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function sD(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(aD),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],c=[];for(e=o.length-1;e>=0;--e)c.push(t[r[o[e]][2]]);for(e=+s;e<a.length-u;++e)c.push(t[r[a[e]][2]]);return c}function uD(t,e){for(var n=t.length,r=t[n-1],i=e[0],o=e[1],a=r[0],s=r[1],u,c,l=!1,h=0;h<n;++h)r=t[h],u=r[0],c=r[1],c>o!=s>o&&i<(a-u)*(o-c)/(s-c)+u&&(l=!l),a=u,s=c;return l}function cD(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,lD=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),fD=function t(e){function n(r,i){return arguments.length<2&&(i=r,r=0),r=Math.floor(r),i=Math.floor(i)-r,function(){return Math.floor(e()*i+r)}}return n.source=t,n}(Nt),Gf=function t(e){function n(r,i){var o,a;return r=r==null?0:+r,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=e()*2-1,s=e()*2-1,a=o*o+s*s;while(!a||a>1);return r+i*s*Math.sqrt(-2*Math.log(a)/a)}}return n.source=t,n}(Nt),hD=function t(e){var n=Gf.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(Nt),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),dD=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),pD=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(Nt),gD=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),mD=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),Ty=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return r===0?()=>1/0:r===1?()=>1:(r=Math.log1p(-r),function(){return 1+Math.floor(Math.log1p(-e())/r)})}return n.source=t,n}(Nt),zf=function t(e){var n=Gf.source(e)();function r(i,o){if((i=+i)<0)throw new RangeError("invalid k");if(i===0)return()=>0;if(o=o==null?1:+o,i===1)return()=>-Math.log1p(-e())*o;var a=(i<1?i+1:i)-1/3,s=1/(3*Math.sqrt(a)),u=i<1?()=>Math.pow(e(),1/i):()=>1;return function(){do{do var c=n(),l=1+s*c;while(l<=0);l*=l*l;var h=1-e()}while(h>=1-.0331*c*c*c*c&&Math.log(h)>=.5*c*c+a*(1-l+Math.log(l)));return a*l*u()*o}}return r.source=t,r}(Nt),Py=function t(e){var n=zf.source(e);function r(i,o){var a=n(i),s=n(o);return function(){var u=a();return u===0?0:u/(u+s())}}return r.source=t,r}(Nt),Dy=function t(e){var n=Ty.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,c=a;u*c>16&&u*(1-c)>16;){var l=Math.floor((u+1)*c),h=r(l,u-l+1)();h<=c?(s+=l,u-=l,c=(c-h)/(1-h)):(u=l-1,c/=h)}for(var f=c<.5,d=f?c:1-c,p=n(d),g=p(),m=0;g<=u;++m)g+=p();return s+(f?m:u-m)}}return i.source=t,i}(Nt),yD=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),bD=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),vD=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),xD=function t(e){var n=zf.source(e),r=Dy.source(e);function i(o){return function(){for(var a=0,s=o;s>16;){var u=Math.floor(.875*s),c=n(u)();if(c>s)return a+r(u-1,s/c)();a+=u,s-=c}for(var l=-Math.log1p(-e()),h=0;l<=s;++h)l-=Math.log1p(-e());return a+h}}return i.source=t,i}(Nt),_D=1664525,wD=1013904223,Ly=1/4294967296;function $D(t=Math.random()){let e=(0<=t&&t<1?t/Ly:Math.abs(t))|0;return()=>(e=_D*e+wD|0,Ly*(e>>>0))}function ge(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function en(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const Of=Symbol("implicit");function Uf(){var t=new Di,e=[],n=[],r=Of;function i(o){let a=t.get(o);if(a===void 0){if(r!==Of)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Di;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Uf(e,n).unknown(r)},ge.apply(i,arguments),i}function Bf(){var t=Uf().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,c=0,l=.5;delete t.unknown;function h(){var f=e().length,d=i<r,p=d?i:r,g=d?r:i;o=(g-p)/Math.max(1,f-u+c*2),s&&(o=Math.floor(o)),p+=(g-p-o*(f-u))*l,a=o*(1-u),s&&(p=Math.round(p),a=Math.round(a));var m=ln(f).map(function(y){return p+o*y});return n(d?m.reverse():m)}return t.domain=function(f){return arguments.length?(e(f),h()):e()},t.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(f){return arguments.length?(s=!!f,h()):s},t.padding=function(f){return arguments.length?(u=Math.min(1,c=+f),h()):u},t.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),h()):u},t.paddingOuter=function(f){return arguments.length?(c=+f,h()):c},t.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),h()):l},t.copy=function(){return Bf(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},ge.apply(h(),arguments)}function Ey(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Ey(e())},t}function Yf(){return Ey(Bf.apply(null,arguments).paddingInner(1))}function SD(t){return function(){return t}}function Qs(t){return+t}var ky=[0,1];function Jt(t){return t}function Wf(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:SD(isNaN(e)?NaN:.5)}function AD(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function MD(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Wf(i,r),o=n(a,o)):(r=Wf(r,i),o=n(o,a)),function(s){return o(r(s))}}function TD(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Wf(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=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 Js(){var t=ky,e=ky,n=dn,r,i,o,a=Jt,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==Jt&&(a=AD(t[0],t[f-1])),s=f>2?TD:MD,u=c=null,h}function h(f){return f==null||isNaN(f=+f)?o:(u||(u=s(t.map(r),e,n)))(r(a(f)))}return h.invert=function(f){return a(i((c||(c=s(e,t.map(r),he)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,Qs),l()):t.slice()},h.range=function(f){return arguments.length?(e=Array.from(f),l()):e.slice()},h.rangeRound=function(f){return e=Array.from(f),n=Ua,l()},h.clamp=function(f){return arguments.length?(a=f?!0:Jt,l()):a!==Jt},h.interpolate=function(f){return arguments.length?(n=f,l()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,d){return r=f,i=d,l()}}function Hf(){return Js()(Jt,Jt)}function Cy(t,e,n,r){var i=ba(t,e,n),o;switch(r=Ur(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=W1(i,a))&&(r.precision=o),Nl(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=H1(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Y1(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 Cn(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return Cy(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,c,l=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);l-- >0;){if(c=Rn(a,s,n),c===u)return r[i]=a,r[o]=s,e(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;u=c}return t},t}function qf(){var t=Hf();return t.copy=function(){return $o(t,qf())},ge.apply(t,arguments),bn(t)}function Ry(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,Qs),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return Ry(t).unknown(e)},t=arguments.length?Array.from(t,Qs):[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 PD(t){return-Math.log(-t)}function DD(t){return-Math.exp(-t)}function LD(t){return isFinite(t)?+("1e"+t):t<0?0:t}function ED(t){return t===10?LD:t===Math.E?Math.exp:e=>Math.pow(t,e)}function kD(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 Xf(t){const e=t(Ny,Fy),n=e.domain;let r=10,i,o;function a(){return i=kD(r),o=ED(r),n()[0]<0?(i=Gy(i),o=Gy(o),t(PD,DD)):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 c=u[0],l=u[u.length-1];const h=l<c;h&&([c,l]=[l,c]);let f=i(c),d=i(l),p,g;const m=s==null?10:+s;let y=[];if(!(r%1)&&d-f<m){if(f=Math.floor(f),d=Math.ceil(d),c>0){for(;f<=d;++f)for(p=1;p<r;++p)if(g=f<0?p/o(-f):p*o(f),!(g<c)){if(g>l)break;y.push(g)}}else for(;f<=d;++f)for(p=r-1;p>=1;--p)if(g=f>0?p/o(-f):p*o(f),!(g<c)){if(g>l)break;y.push(g)}y.length*2<m&&(y=Cn(c,l,m))}else y=Cn(f,d,Math.min(d-f,m)).map(o);return h?y.reverse():y},e.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Ur(u)).precision==null&&(u.trim=!0),u=Ji(u)),s===1/0)return u;const c=Math.max(1,r*s/e.ticks().length);return l=>{let h=l/o(Math.round(i(l)));return h*r<r-.5&&(h*=r),h<=c?u(l):""}},e.nice=()=>n(Iy(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function zy(){const t=Xf(Js()).domain([1,10]);return t.copy=()=>$o(t,zy()).base(t.base()),ge.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 jf(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=jf(Js());return t.copy=function(){return $o(t,By()).constant(t.constant())},ge.apply(t,arguments)}function Yy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function CD(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function RD(t){return t<0?-t*t:t*t}function Vf(t){var e=t(Jt,Jt),n=1;function r(){return n===1?t(Jt,Jt):n===.5?t(CD,RD):t(Yy(n),Yy(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},bn(e)}function tu(){var t=Vf(Js());return t.copy=function(){return $o(t,tu()).exponent(t.exponent())},ge.apply(t,arguments),t}function ID(){return tu.apply(null,arguments).exponent(.5)}function Wy(t){return Math.sign(t)*t*t}function ND(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function Hy(){var t=Hf(),e=[0,1],n=!1,r;function i(o){var a=ND(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(Wy(o))},i.domain=function(o){return arguments.length?(t.domain(o),i):t.domain()},i.range=function(o){return arguments.length?(t.range((e=Array.from(o,Qs)).map(Wy)),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 Hy(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},ge.apply(i,arguments),bn(i)}function qy(){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]=Sp(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 qy().domain(t).range(e).unknown(r)},ge.apply(o,arguments)}function Xy(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[En(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*e-(u-n)*t)/(n+1);return a}return a.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var c=i.indexOf(u);return c<0?[NaN,NaN]:c<1?[t,r[0]]:c>=n?[r[n-1],e]:[r[c-1],r[c]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Xy().domain([t,e]).range(i).unknown(o)},ge.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)},ge.apply(i,arguments)}const Zf=new Date,Kf=new Date;function Tt(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(e(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const u=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return u;let c;do u.push(c=new Date(+o)),e(o,s),t(o);while(c<o&&o<a);return u},i.filter=o=>Tt(a=>{if(a>=a)for(;t(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;e(a,-1),!o(a););else for(;--s>=0;)for(;e(a,1),!o(a););}),n&&(i.count=(o,a)=>(Zf.setTime(+o),Kf.setTime(+a),t(Zf),t(Kf),Math.floor(n(Zf,Kf))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Zr=Tt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Zr.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Tt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Zr);const Vy=Zr.range,nn=1e3,me=nn*60,rn=me*60,on=rn*24,Qf=on*7,Zy=on*30,Jf=on*365,an=Tt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*nn)},(t,e)=>(e-t)/nn,t=>t.getUTCSeconds()),Ky=an.range,eu=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*nn)},(t,e)=>{t.setTime(+t+e*me)},(t,e)=>(e-t)/me,t=>t.getMinutes()),FD=eu.range,nu=Tt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*me)},(t,e)=>(e-t)/me,t=>t.getUTCMinutes()),GD=nu.range,ru=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*nn-t.getMinutes()*me)},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getHours()),zD=ru.range,iu=Tt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getUTCHours()),OD=iu.range,Kr=Tt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*me)/on,t=>t.getDate()-1),UD=Kr.range,So=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/on,t=>t.getUTCDate()-1),BD=So.range,th=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/on,t=>Math.floor(t/on)),YD=th.range;function er(t){return Tt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*me)/Qf)}const Qr=er(0),Ao=er(1),Qy=er(2),Jy=er(3),nr=er(4),tb=er(5),eb=er(6),nb=Qr.range,WD=Ao.range,HD=Qy.range,qD=Jy.range,XD=nr.range,jD=tb.range,VD=eb.range;function rr(t){return Tt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Qf)}const Jr=rr(0),Mo=rr(1),rb=rr(2),ib=rr(3),ir=rr(4),ob=rr(5),ab=rr(6),sb=Jr.range,ZD=Mo.range,KD=rb.range,QD=ib.range,JD=ir.range,tL=ob.range,eL=ab.range,ou=Tt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),nL=ou.range,au=Tt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),rL=au.range,Oe=Tt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Oe.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});const iL=Oe.range,Ue=Tt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Ue.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});const oL=Ue.range;function ub(t,e,n,r,i,o){const a=[[an,1,nn],[an,5,5*nn],[an,15,15*nn],[an,30,30*nn],[o,1,me],[o,5,5*me],[o,15,15*me],[o,30,30*me],[i,1,rn],[i,3,3*rn],[i,6,6*rn],[i,12,12*rn],[r,1,on],[r,2,2*on],[n,1,Qf],[e,1,Zy],[e,3,3*Zy],[t,1,Jf]];function s(c,l,h){const f=l<c;f&&([c,l]=[l,c]);const d=h&&typeof h.range=="function"?h:u(c,l,h),p=d?d.range(c,+l+1):[];return f?p.reverse():p}function u(c,l,h){const f=Math.abs(l-c)/h,d=pa(([,,m])=>m).right(a,f);if(d===a.length)return t.every(ba(c/Jf,l/Jf,h));if(d===0)return Zr.every(Math.max(ba(c,l,h),1));const[p,g]=a[f/a[d-1][2]<a[d][2]/f?d-1:d];return p.every(g)}return[s,u]}const[cb,lb]=ub(Ue,au,Jr,th,iu,nu),[fb,hb]=ub(Oe,ou,Qr,Kr,ru,eu);function eh(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function nh(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function To(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function db(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,c=Po(i),l=Do(i),h=Po(o),f=Do(o),d=Po(a),p=Do(a),g=Po(s),m=Do(s),y=Po(u),x=Do(u),v={a:N,A:O,b:k,B:R,c:null,d:vb,e:vb,f:PL,g:GL,G:OL,H:AL,I:ML,j:TL,L:xb,m:DL,M:LL,p:G,q:C,Q:Mb,s:Tb,S:EL,u:kL,U:CL,V:RL,w:IL,W:NL,x:null,X:null,y:FL,Y:zL,Z:UL,"%":Ab},b={a:z,A:X,b:H,B:j,c:null,d:wb,e:wb,f:HL,g:eE,G:rE,H:BL,I:YL,j:WL,L:$b,m:qL,M:XL,p:J,q:dt,Q:Mb,s:Tb,S:jL,u:VL,U:ZL,V:KL,w:QL,W:JL,x:null,X:null,y:tE,Y:nE,Z:iE,"%":Ab},$={a:D,A,b:I,B:M,c:T,d:yb,e:yb,f:_L,g:mb,G:gb,H:bb,I:bb,j:yL,L:xL,m:mL,M:bL,p:P,q:gL,Q:$L,s:SL,S:vL,u:lL,U:fL,V:hL,w:cL,W:dL,x:E,X:L,y:mb,Y:gb,Z:pL,"%":wL};v.x=w(n,v),v.X=w(r,v),v.c=w(e,v),b.x=w(n,b),b.X=w(r,b),b.c=w(e,b);function w(q,nt){return function(st){var Y=[],xt=-1,gt=0,Ft=q.length,te,it,Mt;for(st instanceof Date||(st=new Date(+st));++xt<Ft;)q.charCodeAt(xt)===37&&(Y.push(q.slice(gt,xt)),(it=pb[te=q.charAt(++xt)])!=null?te=q.charAt(++xt):it=te==="e"?" ":"0",(Mt=nt[te])&&(te=Mt(st,it)),Y.push(te),gt=xt+1);return Y.push(q.slice(gt,xt)),Y.join("")}}function S(q,nt){return function(st){var Y=To(1900,void 0,1),xt=_(Y,q,st+="",0),gt,Ft;if(xt!=st.length)return null;if("Q"in Y)return new Date(Y.Q);if("s"in Y)return new Date(Y.s*1e3+("L"in Y?Y.L:0));if(nt&&!("Z"in Y)&&(Y.Z=0),"p"in Y&&(Y.H=Y.H%12+Y.p*12),Y.m===void 0&&(Y.m="q"in Y?Y.q:0),"V"in Y){if(Y.V<1||Y.V>53)return null;"w"in Y||(Y.w=1),"Z"in Y?(gt=nh(To(Y.y,0,1)),Ft=gt.getUTCDay(),gt=Ft>4||Ft===0?Mo.ceil(gt):Mo(gt),gt=So.offset(gt,(Y.V-1)*7),Y.y=gt.getUTCFullYear(),Y.m=gt.getUTCMonth(),Y.d=gt.getUTCDate()+(Y.w+6)%7):(gt=eh(To(Y.y,0,1)),Ft=gt.getDay(),gt=Ft>4||Ft===0?Ao.ceil(gt):Ao(gt),gt=Kr.offset(gt,(Y.V-1)*7),Y.y=gt.getFullYear(),Y.m=gt.getMonth(),Y.d=gt.getDate()+(Y.w+6)%7)}else("W"in Y||"U"in Y)&&("w"in Y||(Y.w="u"in Y?Y.u%7:"W"in Y?1:0),Ft="Z"in Y?nh(To(Y.y,0,1)).getUTCDay():eh(To(Y.y,0,1)).getDay(),Y.m=0,Y.d="W"in Y?(Y.w+6)%7+Y.W*7-(Ft+5)%7:Y.w+Y.U*7-(Ft+6)%7);return"Z"in Y?(Y.H+=Y.Z/100|0,Y.M+=Y.Z%100,nh(Y)):eh(Y)}}function _(q,nt,st,Y){for(var xt=0,gt=nt.length,Ft=st.length,te,it;xt<gt;){if(Y>=Ft)return-1;if(te=nt.charCodeAt(xt++),te===37){if(te=nt.charAt(xt++),it=$[te in pb?nt.charAt(xt++):te],!it||(Y=it(q,st,Y))<0)return-1}else if(te!=st.charCodeAt(Y++))return-1}return Y}function P(q,nt,st){var Y=c.exec(nt.slice(st));return Y?(q.p=l.get(Y[0].toLowerCase()),st+Y[0].length):-1}function D(q,nt,st){var Y=d.exec(nt.slice(st));return Y?(q.w=p.get(Y[0].toLowerCase()),st+Y[0].length):-1}function A(q,nt,st){var Y=h.exec(nt.slice(st));return Y?(q.w=f.get(Y[0].toLowerCase()),st+Y[0].length):-1}function I(q,nt,st){var Y=y.exec(nt.slice(st));return Y?(q.m=x.get(Y[0].toLowerCase()),st+Y[0].length):-1}function M(q,nt,st){var Y=g.exec(nt.slice(st));return Y?(q.m=m.get(Y[0].toLowerCase()),st+Y[0].length):-1}function T(q,nt,st){return _(q,e,nt,st)}function E(q,nt,st){return _(q,n,nt,st)}function L(q,nt,st){return _(q,r,nt,st)}function N(q){return a[q.getDay()]}function O(q){return o[q.getDay()]}function k(q){return u[q.getMonth()]}function R(q){return s[q.getMonth()]}function G(q){return i[+(q.getHours()>=12)]}function C(q){return 1+~~(q.getMonth()/3)}function z(q){return a[q.getUTCDay()]}function X(q){return o[q.getUTCDay()]}function H(q){return u[q.getUTCMonth()]}function j(q){return s[q.getUTCMonth()]}function J(q){return i[+(q.getUTCHours()>=12)]}function dt(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var nt=w(q+="",v);return nt.toString=function(){return q},nt},parse:function(q){var nt=S(q+="",!1);return nt.toString=function(){return q},nt},utcFormat:function(q){var nt=w(q+="",b);return nt.toString=function(){return q},nt},utcParse:function(q){var nt=S(q+="",!0);return nt.toString=function(){return q},nt}}}var pb={"-":"",_:" ",0:"0"},Rt=/^\s*\d+/,aL=/^%/,sL=/[\\^$*+?|[\]().{}]/g;function pt(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function uL(t){return t.replace(sL,"\\$&")}function Po(t){return new RegExp("^(?:"+t.map(uL).join("|")+")","i")}function Do(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function cL(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function lL(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function fL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function hL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function dL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function gb(t,e,n){var r=Rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function mb(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function pL(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 gL(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function mL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function yb(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function yL(t,e,n){var r=Rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function bb(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function bL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function vL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function xL(t,e,n){var r=Rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function _L(t,e,n){var r=Rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function wL(t,e,n){var r=aL.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function $L(t,e,n){var r=Rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function SL(t,e,n){var r=Rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function vb(t,e){return pt(t.getDate(),e,2)}function AL(t,e){return pt(t.getHours(),e,2)}function ML(t,e){return pt(t.getHours()%12||12,e,2)}function TL(t,e){return pt(1+Kr.count(Oe(t),t),e,3)}function xb(t,e){return pt(t.getMilliseconds(),e,3)}function PL(t,e){return xb(t,e)+"000"}function DL(t,e){return pt(t.getMonth()+1,e,2)}function LL(t,e){return pt(t.getMinutes(),e,2)}function EL(t,e){return pt(t.getSeconds(),e,2)}function kL(t){var e=t.getDay();return e===0?7:e}function CL(t,e){return pt(Qr.count(Oe(t)-1,t),e,2)}function _b(t){var e=t.getDay();return e>=4||e===0?nr(t):nr.ceil(t)}function RL(t,e){return t=_b(t),pt(nr.count(Oe(t),t)+(Oe(t).getDay()===4),e,2)}function IL(t){return t.getDay()}function NL(t,e){return pt(Ao.count(Oe(t)-1,t),e,2)}function FL(t,e){return pt(t.getFullYear()%100,e,2)}function GL(t,e){return t=_b(t),pt(t.getFullYear()%100,e,2)}function zL(t,e){return pt(t.getFullYear()%1e4,e,4)}function OL(t,e){var n=t.getDay();return t=n>=4||n===0?nr(t):nr.ceil(t),pt(t.getFullYear()%1e4,e,4)}function UL(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+pt(e/60|0,"0",2)+pt(e%60,"0",2)}function wb(t,e){return pt(t.getUTCDate(),e,2)}function BL(t,e){return pt(t.getUTCHours(),e,2)}function YL(t,e){return pt(t.getUTCHours()%12||12,e,2)}function WL(t,e){return pt(1+So.count(Ue(t),t),e,3)}function $b(t,e){return pt(t.getUTCMilliseconds(),e,3)}function HL(t,e){return $b(t,e)+"000"}function qL(t,e){return pt(t.getUTCMonth()+1,e,2)}function XL(t,e){return pt(t.getUTCMinutes(),e,2)}function jL(t,e){return pt(t.getUTCSeconds(),e,2)}function VL(t){var e=t.getUTCDay();return e===0?7:e}function ZL(t,e){return pt(Jr.count(Ue(t)-1,t),e,2)}function Sb(t){var e=t.getUTCDay();return e>=4||e===0?ir(t):ir.ceil(t)}function KL(t,e){return t=Sb(t),pt(ir.count(Ue(t),t)+(Ue(t).getUTCDay()===4),e,2)}function QL(t){return t.getUTCDay()}function JL(t,e){return pt(Mo.count(Ue(t)-1,t),e,2)}function tE(t,e){return pt(t.getUTCFullYear()%100,e,2)}function eE(t,e){return t=Sb(t),pt(t.getUTCFullYear()%100,e,2)}function nE(t,e){return pt(t.getUTCFullYear()%1e4,e,4)}function rE(t,e){var n=t.getUTCDay();return t=n>=4||n===0?ir(t):ir.ceil(t),pt(t.getUTCFullYear()%1e4,e,4)}function iE(){return"+0000"}function Ab(){return"%"}function Mb(t){return+t}function Tb(t){return Math.floor(+t/1e3)}var ti,rh,Pb,su,ih;Db({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 Db(t){return ti=db(t),rh=ti.format,Pb=ti.parse,su=ti.utcFormat,ih=ti.utcParse,ti}var Lb="%Y-%m-%dT%H:%M:%S.%LZ";function oE(t){return t.toISOString()}var aE=Date.prototype.toISOString?oE:su(Lb);const sE=aE;function uE(t){var e=new Date(t);return isNaN(e)?null:e}var cE=+new Date("2000-01-01T00:00:00.000Z")?uE:ih(Lb);const lE=cE;function fE(t){return new Date(t)}function hE(t){return t instanceof Date?+t:+new Date(+t)}function oh(t,e,n,r,i,o,a,s,u,c){var l=Hf(),h=l.invert,f=l.domain,d=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),x=c("%b %d"),v=c("%B"),b=c("%Y");function $(w){return(u(w)<w?d:s(w)<w?p:a(w)<w?g:o(w)<w?m:r(w)<w?i(w)<w?y:x:n(w)<w?v:b)(w)}return l.invert=function(w){return new Date(h(w))},l.domain=function(w){return arguments.length?f(Array.from(w,hE)):f().map(fE)},l.ticks=function(w){var S=f();return t(S[0],S[S.length-1],w??10)},l.tickFormat=function(w,S){return S==null?$:c(S)},l.nice=function(w){var S=f();return(!w||typeof w.range!="function")&&(w=e(S[0],S[S.length-1],w??10)),w?f(Iy(S,w)):l},l.copy=function(){return $o(l,oh(t,e,n,r,i,o,a,s,u,c))},l}function dE(){return ge.apply(oh(fb,hb,Oe,ou,Qr,Kr,ru,eu,an,rh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function pE(){return ge.apply(oh(cb,lb,Ue,au,Jr,So,iu,nu,an,su).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function uu(){var t=0,e=1,n,r,i,o,a=Jt,s=!1,u;function c(h){return h==null||isNaN(h=+h)?u:a(i===0?.5:(h=(o(h)-n)*i,s?Math.max(0,Math.min(1,h)):h))}c.domain=function(h){return arguments.length?([t,e]=h,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),c):[t,e]},c.clamp=function(h){return arguments.length?(s=!!h,c):s},c.interpolator=function(h){return arguments.length?(a=h,c):a};function l(h){return function(f){var d,p;return arguments.length?([d,p]=f,a=h(d,p),c):[a(0),a(1)]}}return c.range=l(dn),c.rangeRound=l(Ua),c.unknown=function(h){return arguments.length?(u=h,c):u},function(h){return o=h,n=h(t),r=h(e),i=n===r?0:1/(r-n),c}}function vn(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Eb(){var t=bn(uu()(Jt));return t.copy=function(){return vn(t,Eb())},en.apply(t,arguments)}function kb(){var t=Xf(uu()).domain([1,10]);return t.copy=function(){return vn(t,kb()).base(t.base())},en.apply(t,arguments)}function Cb(){var t=jf(uu());return t.copy=function(){return vn(t,Cb()).constant(t.constant())},en.apply(t,arguments)}function ah(){var t=Vf(uu());return t.copy=function(){return vn(t,ah()).exponent(t.exponent())},en.apply(t,arguments)}function gE(){return ah.apply(null,arguments).exponent(.5)}function Rb(){var t=[],e=Jt;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)=>ki(t,o/r))},n.copy=function(){return Rb(e).domain(t)},en.apply(n,arguments)}function cu(){var t=0,e=.5,n=1,r=1,i,o,a,s,u,c=Jt,l,h=!1,f;function d(g){return isNaN(g=+g)?f:(g=.5+((g=+l(g))-o)*(r*g<r*o?s:u),c(h?Math.max(0,Math.min(1,g)):g))}d.domain=function(g){return arguments.length?([t,e,n]=g,i=l(t=+t),o=l(e=+e),a=l(n=+n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,d):[t,e,n]},d.clamp=function(g){return arguments.length?(h=!!g,d):h},d.interpolator=function(g){return arguments.length?(c=g,d):c};function p(g){return function(m){var y,x,v;return arguments.length?([y,x,v]=m,c=Ig(g,[y,x,v]),d):[c(0),c(.5),c(1)]}}return d.range=p(dn),d.rangeRound=p(Ua),d.unknown=function(g){return arguments.length?(f=g,d):f},function(g){return l=g,i=g(t),o=g(e),a=g(n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,d}}function Ib(){var t=bn(cu()(Jt));return t.copy=function(){return vn(t,Ib())},en.apply(t,arguments)}function Nb(){var t=Xf(cu()).domain([.1,1,10]);return t.copy=function(){return vn(t,Nb()).base(t.base())},en.apply(t,arguments)}function Fb(){var t=jf(cu());return t.copy=function(){return vn(t,Fb()).constant(t.constant())},en.apply(t,arguments)}function sh(){var t=Vf(cu());return t.copy=function(){return vn(t,sh()).exponent(t.exponent())},en.apply(t,arguments)}function mE(){return sh.apply(null,arguments).exponent(.5)}function ut(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}const yE=ut("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),bE=ut("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),vE=ut("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),xE=ut("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),_E=ut("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),wE=ut("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),$E=ut("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),SE=ut("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),AE=ut("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),ME=ut("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),TE=ut("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),bt=t=>xg(t[t.length-1]);var Gb=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ut);const PE=bt(Gb);var zb=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ut);const DE=bt(zb);var Ob=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ut);const LE=bt(Ob);var Ub=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ut);const EE=bt(Ub);var Bb=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ut);const kE=bt(Bb);var Yb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ut);const CE=bt(Yb);var Wb=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ut);const RE=bt(Wb);var Hb=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ut);const IE=bt(Hb);var qb=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ut);const NE=bt(qb);var Xb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ut);const FE=bt(Xb);var jb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ut);const GE=bt(jb);var Vb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ut);const zE=bt(Vb);var Zb=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ut);const OE=bt(Zb);var Kb=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ut);const UE=bt(Kb);var Qb=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ut);const BE=bt(Qb);var Jb=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ut);const YE=bt(Jb);var tv=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ut);const WE=bt(tv);var ev=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ut);const HE=bt(ev);var nv=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ut);const qE=bt(nv);var rv=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ut);const XE=bt(rv);var iv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ut);const jE=bt(iv);var ov=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ut);const VE=bt(ov);var av=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ut);const ZE=bt(av);var sv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ut);const KE=bt(sv);var uv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ut);const QE=bt(uv);var cv=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ut);const JE=bt(cv);var lv=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ut);const tk=bt(lv);function ek(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 nk=Ya(Me(300,.5,0),Me(-240,.5,1));var rk=Ya(Me(-100,.75,.35),Me(80,1.5,.8)),ik=Ya(Me(260,.75,.35),Me(80,1.5,.8)),lu=Me();function ok(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return lu.h=360*t-100,lu.s=1.5-1.5*e,lu.l=.8-.9*e,lu+""}var fu=Dr(),ak=Math.PI/3,sk=Math.PI*2/3;function uk(t){var e;return t=(.5-t)*Math.PI,fu.r=255*(e=Math.sin(t))*e,fu.g=255*(e=Math.sin(t+ak))*e,fu.b=255*(e=Math.sin(t+sk))*e,fu+""}function ck(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 lk=hu(ut("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var fk=hu(ut("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),hk=hu(ut("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),dk=hu(ut("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function ot(t){return function(){return t}}const fv=Math.abs,Ut=Math.atan2,sn=Math.cos,pk=Math.max,ei=Math.min,ie=Math.sin,vt=Math.sqrt,Bt=1e-12,xn=Math.PI,du=xn/2,_n=2*xn;function gk(t){return t>1?0:t<-1?xn:Math.acos(t)}function hv(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 Vi(e)}function mk(t){return t.innerRadius}function yk(t){return t.outerRadius}function bk(t){return t.startAngle}function vk(t){return t.endAngle}function xk(t){return t&&t.padAngle}function _k(t,e,n,r,i,o,a,s){var u=n-t,c=r-e,l=a-i,h=s-o,f=h*u-l*c;if(!(f*f<Bt))return f=(l*(e-o)-h*(t-i))/f,[t+f*u,e+f*c]}function pu(t,e,n,r,i,o,a){var s=t-n,u=e-r,c=(a?o:-o)/vt(s*s+u*u),l=c*u,h=-c*s,f=t+l,d=e+h,p=n+l,g=r+h,m=(f+p)/2,y=(d+g)/2,x=p-f,v=g-d,b=x*x+v*v,$=i-o,w=f*g-p*d,S=(v<0?-1:1)*vt(pk(0,$*$*b-w*w)),_=(w*v-x*S)/b,P=(-w*x-v*S)/b,D=(w*v+x*S)/b,A=(-w*x+v*S)/b,I=_-m,M=P-y,T=D-m,E=A-y;return I*I+M*M>T*T+E*E&&(_=D,P=A),{cx:_,cy:P,x01:-l,y01:-h,x11:_*(i/$-1),y11:P*(i/$-1)}}function dv(){var t=mk,e=yk,n=ot(0),r=null,i=bk,o=vk,a=xk,s=null,u=Lo(c);function c(){var l,h,f=+t.apply(this,arguments),d=+e.apply(this,arguments),p=i.apply(this,arguments)-du,g=o.apply(this,arguments)-du,m=fv(g-p),y=g>p;if(s||(s=l=u()),d<f&&(h=d,d=f,f=h),!(d>Bt))s.moveTo(0,0);else if(m>_n-Bt)s.moveTo(d*sn(p),d*ie(p)),s.arc(0,0,d,p,g,!y),f>Bt&&(s.moveTo(f*sn(g),f*ie(g)),s.arc(0,0,f,g,p,y));else{var x=p,v=g,b=p,$=g,w=m,S=m,_=a.apply(this,arguments)/2,P=_>Bt&&(r?+r.apply(this,arguments):vt(f*f+d*d)),D=ei(fv(d-f)/2,+n.apply(this,arguments)),A=D,I=D,M,T;if(P>Bt){var E=hv(P/f*ie(_)),L=hv(P/d*ie(_));(w-=E*2)>Bt?(E*=y?1:-1,b+=E,$-=E):(w=0,b=$=(p+g)/2),(S-=L*2)>Bt?(L*=y?1:-1,x+=L,v-=L):(S=0,x=v=(p+g)/2)}var N=d*sn(x),O=d*ie(x),k=f*sn($),R=f*ie($);if(D>Bt){var G=d*sn(v),C=d*ie(v),z=f*sn(b),X=f*ie(b),H;if(m<xn)if(H=_k(N,O,z,X,G,C,k,R)){var j=N-H[0],J=O-H[1],dt=G-H[0],q=C-H[1],nt=1/ie(gk((j*dt+J*q)/(vt(j*j+J*J)*vt(dt*dt+q*q)))/2),st=vt(H[0]*H[0]+H[1]*H[1]);A=ei(D,(f-st)/(nt-1)),I=ei(D,(d-st)/(nt+1))}else A=I=0}S>Bt?I>Bt?(M=pu(z,X,N,O,d,I,y),T=pu(G,C,k,R,d,I,y),s.moveTo(M.cx+M.x01,M.cy+M.y01),I<D?s.arc(M.cx,M.cy,I,Ut(M.y01,M.x01),Ut(T.y01,T.x01),!y):(s.arc(M.cx,M.cy,I,Ut(M.y01,M.x01),Ut(M.y11,M.x11),!y),s.arc(0,0,d,Ut(M.cy+M.y11,M.cx+M.x11),Ut(T.cy+T.y11,T.cx+T.x11),!y),s.arc(T.cx,T.cy,I,Ut(T.y11,T.x11),Ut(T.y01,T.x01),!y))):(s.moveTo(N,O),s.arc(0,0,d,x,v,!y)):s.moveTo(N,O),!(f>Bt)||!(w>Bt)?s.lineTo(k,R):A>Bt?(M=pu(k,R,G,C,f,-A,y),T=pu(N,O,z,X,f,-A,y),s.lineTo(M.cx+M.x01,M.cy+M.y01),A<D?s.arc(M.cx,M.cy,A,Ut(M.y01,M.x01),Ut(T.y01,T.x01),!y):(s.arc(M.cx,M.cy,A,Ut(M.y01,M.x01),Ut(M.y11,M.x11),!y),s.arc(0,0,f,Ut(M.cy+M.y11,M.cx+M.x11),Ut(T.cy+T.y11,T.cx+T.x11),y),s.arc(T.cx,T.cy,A,Ut(T.y11,T.x11),Ut(T.y01,T.x01),!y))):s.arc(0,0,f,$,b,y)}if(s.closePath(),l)return s=null,l+""||null}return c.centroid=function(){var l=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,h=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-xn/2;return[sn(h)*l,ie(h)*l]},c.innerRadius=function(l){return arguments.length?(t=typeof l=="function"?l:ot(+l),c):t},c.outerRadius=function(l){return arguments.length?(e=typeof l=="function"?l:ot(+l),c):e},c.cornerRadius=function(l){return arguments.length?(n=typeof l=="function"?l:ot(+l),c):n},c.padRadius=function(l){return arguments.length?(r=l==null?null:typeof l=="function"?l:ot(+l),c):r},c.startAngle=function(l){return arguments.length?(i=typeof l=="function"?l:ot(+l),c):i},c.endAngle=function(l){return arguments.length?(o=typeof l=="function"?l:ot(+l),c):o},c.padAngle=function(l){return arguments.length?(a=typeof l=="function"?l:ot(+l),c):a},c.context=function(l){return arguments.length?(s=l??null,c):s},c}var wk=Array.prototype.slice;function gu(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 mu(t){return new pv(t)}function uh(t){return t[0]}function ch(t){return t[1]}function yu(t,e){var n=ot(!0),r=null,i=mu,o=null,a=Lo(s);t=typeof t=="function"?t:t===void 0?uh:ot(t),e=typeof e=="function"?e:e===void 0?ch:ot(e);function s(u){var c,l=(u=gu(u)).length,h,f=!1,d;for(r==null&&(o=i(d=a())),c=0;c<=l;++c)!(c<l&&n(h=u[c],c,u))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(h,c,u),+e(h,c,u));if(d)return o=null,d+""||null}return s.x=function(u){return arguments.length?(t=typeof u=="function"?u:ot(+u),s):t},s.y=function(u){return arguments.length?(e=typeof u=="function"?u:ot(+u),s):e},s.defined=function(u){return arguments.length?(n=typeof u=="function"?u:ot(!!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 gv(t,e,n){var r=null,i=ot(!0),o=null,a=mu,s=null,u=Lo(c);t=typeof t=="function"?t:t===void 0?uh:ot(+t),e=typeof e=="function"?e:ot(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?ch:ot(+n);function c(h){var f,d,p,g=(h=gu(h)).length,m,y=!1,x,v=new Array(g),b=new Array(g);for(o==null&&(s=a(x=u())),f=0;f<=g;++f){if(!(f<g&&i(m=h[f],f,h))===y)if(y=!y)d=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=f-1;p>=d;--p)s.point(v[p],b[p]);s.lineEnd(),s.areaEnd()}y&&(v[f]=+t(m,f,h),b[f]=+e(m,f,h),s.point(r?+r(m,f,h):v[f],n?+n(m,f,h):b[f]))}if(x)return s=null,x+""||null}function l(){return yu().defined(i).curve(a).context(o)}return c.x=function(h){return arguments.length?(t=typeof h=="function"?h:ot(+h),r=null,c):t},c.x0=function(h){return arguments.length?(t=typeof h=="function"?h:ot(+h),c):t},c.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:ot(+h),c):r},c.y=function(h){return arguments.length?(e=typeof h=="function"?h:ot(+h),n=null,c):e},c.y0=function(h){return arguments.length?(e=typeof h=="function"?h:ot(+h),c):e},c.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:ot(+h),c):n},c.lineX0=c.lineY0=function(){return l().x(t).y(e)},c.lineY1=function(){return l().x(t).y(n)},c.lineX1=function(){return l().x(r).y(e)},c.defined=function(h){return arguments.length?(i=typeof h=="function"?h:ot(!!h),c):i},c.curve=function(h){return arguments.length?(a=h,o!=null&&(s=a(o)),c):a},c.context=function(h){return arguments.length?(h==null?o=s=null:s=a(o=h),c):o},c}function $k(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Sk(t){return t}function mv(){var t=Sk,e=$k,n=null,r=ot(0),i=ot(_n),o=ot(0);function a(s){var u,c=(s=gu(s)).length,l,h,f=0,d=new Array(c),p=new Array(c),g=+r.apply(this,arguments),m=Math.min(_n,Math.max(-_n,i.apply(this,arguments)-g)),y,x=Math.min(Math.abs(m)/c,o.apply(this,arguments)),v=x*(m<0?-1:1),b;for(u=0;u<c;++u)(b=p[d[u]=u]=+t(s[u],u,s))>0&&(f+=b);for(e!=null?d.sort(function($,w){return e(p[$],p[w])}):n!=null&&d.sort(function($,w){return n(s[$],s[w])}),u=0,h=f?(m-c*v)/f:0;u<c;++u,g=y)l=d[u],b=p[l],y=g+(b>0?b*h:0)+v,p[l]={data:s[l],index:u,value:b,startAngle:g,endAngle:y,padAngle:x};return p}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:ot(+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:ot(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:ot(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:ot(+s),a):o},a}var yv=lh(mu);function bv(t){this._curve=t}bv.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 lh(t){function e(n){return new bv(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(lh(n)):e()._curve},t}function vv(){return Eo(yu().curve(yv))}function xv(){var t=gv().curve(yv),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(lh(a)):e()._curve},t}function ko(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class _v{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 Ak{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=ko(this._x0,this._y0),i=ko(this._x0,this._y0=(this._y0+n)/2),o=ko(e,this._y0),a=ko(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function wv(t){return new _v(t,!0)}function $v(t){return new _v(t,!1)}function Mk(t){return new Ak(t)}function Tk(t){return t.source}function Pk(t){return t.target}function bu(t){let e=Tk,n=Pk,r=uh,i=ch,o=null,a=null,s=Lo(u);function u(){let c;const l=wk.call(arguments),h=e.apply(this,l),f=n.apply(this,l);if(o==null&&(a=t(c=s())),a.lineStart(),l[0]=h,a.point(+r.apply(this,l),+i.apply(this,l)),l[0]=f,a.point(+r.apply(this,l),+i.apply(this,l)),a.lineEnd(),c)return a=null,c+""||null}return u.source=function(c){return arguments.length?(e=c,u):e},u.target=function(c){return arguments.length?(n=c,u):n},u.x=function(c){return arguments.length?(r=typeof c=="function"?c:ot(+c),u):r},u.y=function(c){return arguments.length?(i=typeof c=="function"?c:ot(+c),u):i},u.context=function(c){return arguments.length?(c==null?o=a=null:a=t(o=c),u):o},u}function Dk(){return bu(wv)}function Lk(){return bu($v)}function Ek(){const t=bu(Mk);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const kk=vt(3),Sv={draw(t,e){const n=vt(e+ei(e/28,.75))*.59436,r=n/2,i=r*kk;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},vu={draw(t,e){const n=vt(e/xn);t.moveTo(n,0),t.arc(0,0,n,0,_n)}},Av={draw(t,e){const n=vt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},Mv=vt(1/3),Ck=Mv*2,Tv={draw(t,e){const n=vt(e/Ck),r=n*Mv;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},Pv={draw(t,e){const n=vt(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},Dv={draw(t,e){const n=vt(e-ei(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},Lv={draw(t,e){const n=vt(e),r=-n/2;t.rect(r,r,n,n)}},Ev={draw(t,e){const n=vt(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},Rk=.8908130915292852,kv=ie(xn/10)/ie(7*xn/10),Ik=ie(_n/10)*kv,Nk=-sn(_n/10)*kv,Cv={draw(t,e){const n=vt(e*Rk),r=Ik*n,i=Nk*n;t.moveTo(0,-n),t.lineTo(r,i);for(let o=1;o<5;++o){const a=_n*o/5,s=sn(a),u=ie(a);t.lineTo(u*n,-s*n),t.lineTo(s*r-u*i,u*r+s*i)}t.closePath()}},fh=vt(3),Rv={draw(t,e){const n=-vt(e/(fh*3));t.moveTo(0,n*2),t.lineTo(-fh*n,-n),t.lineTo(fh*n,-n),t.closePath()}},Fk=vt(3),Iv={draw(t,e){const n=vt(e)*.6824,r=n/2,i=n*Fk/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},ye=-.5,be=vt(3)/2,hh=1/vt(12),Gk=(hh/2+1)*3,Nv={draw(t,e){const n=vt(e/Gk),r=n/2,i=n*hh,o=r,a=n*hh+n,s=-o,u=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,u),t.lineTo(ye*r-be*i,be*r+ye*i),t.lineTo(ye*o-be*a,be*o+ye*a),t.lineTo(ye*s-be*u,be*s+ye*u),t.lineTo(ye*r+be*i,ye*i-be*r),t.lineTo(ye*o+be*a,ye*a-be*o),t.lineTo(ye*s+be*u,ye*u-be*s),t.closePath()}},dh={draw(t,e){const n=vt(e-ei(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},Fv=[vu,Av,Tv,Lv,Cv,Rv,Nv],zk=[vu,Dv,dh,Iv,Sv,Ev,Pv];function Ok(t,e){let n=null,r=Lo(i);t=typeof t=="function"?t:ot(t||vu),e=typeof e=="function"?e:ot(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:ot(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:ot(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function wn(){}function xu(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function _u(t){this._context=t}_u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:xu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:xu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Uk(t){return new _u(t)}function Gv(t){this._context=t}Gv.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:xu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Bk(t){return new Gv(t)}function zv(t){this._context=t}zv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:xu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Yk(t){return new zv(t)}function Ov(t,e){this._basis=new _u(t),this._beta=e}Ov.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 Wk=function t(e){function n(r){return e===1?new _u(r):new Ov(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function wu(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function ph(t,e){this._context=t,this._k=(1-e)/6}ph.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:wu(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:wu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Hk=function t(e){function n(r){return new ph(r,e)}return n.tension=function(r){return t(+r)},n}(0);function gh(t,e){this._context=t,this._k=(1-e)/6}gh.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:wu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const qk=function t(e){function n(r){return new gh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function mh(t,e){this._context=t,this._k=(1-e)/6}mh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:wu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Xk=function t(e){function n(r){return new mh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function yh(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Bt){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>Bt){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/l,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function 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(){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:yh(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const jk=function t(e){function n(r){return e?new Uv(r,e):new ph(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Bv(t,e){this._context=t,this._alpha=e}Bv.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:yh(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 Vk=function t(e){function n(r){return e?new Bv(r,e):new gh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Yv(t,e){this._context=t,this._alpha=e}Yv.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:yh(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 Zk=function t(e){function n(r){return e?new Yv(r,e):new mh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Wv(t){this._context=t}Wv.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 Kk(t){return new Wv(t)}function Hv(t){return t<0?-1:1}function qv(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(Hv(o)+Hv(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Xv(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function bh(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function $u(t){this._context=t}$u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:bh(this,this._t0,Xv(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,bh(this,Xv(this,n=qv(this,t,e)),n);break;default:bh(this,this._t0,n=qv(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function jv(t){this._context=new Vv(t)}(jv.prototype=Object.create($u.prototype)).point=function(t,e){$u.prototype.point.call(this,e,t)};function Vv(t){this._context=t}Vv.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 Qk(t){return new $u(t)}function Jk(t){return new jv(t)}function Zv(t){this._context=t}Zv.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=Kv(t),i=Kv(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 Kv(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 tC(t){return new Zv(t)}function Su(t,e){this._context=t,this._t=e}Su.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function eC(t){return new Su(t,.5)}function nC(t){return new Su(t,0)}function rC(t){return new Su(t,1)}function ni(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 ri(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function iC(t,e){return t[e]}function oC(t){const e=[];return e.key=t,e}function aC(){var t=ot([]),e=ri,n=ni,r=iC;function i(o){var a=Array.from(t.apply(this,arguments),oC),s,u=a.length,c=-1,l;for(const h of o)for(s=0,++c;s<u;++s)(a[s][c]=[0,+r(h,a[s].key,c,o)]).data=h;for(s=0,l=gu(e(a));s<u;++s)a[l[s]].index=s;return n(a,l),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:ot(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:ot(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?ri:typeof o=="function"?o:ot(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??ni,i):n},i}function sC(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}ni(t,e)}}function uC(t,e){if((u=t.length)>0)for(var n,r=0,i,o,a,s,u,c=t[e[0]].length;r<c;++r)for(a=s=0,n=0;n<u;++n)(o=(i=t[e[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=s,i[0]=s+=o):(i[0]=0,i[1]=o)}function cC(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}ni(t,e)}}function lC(t,e){if(!(!((a=t.length)>0)||!((o=(i=t[e[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,u=0,c=0;s<a;++s){for(var l=t[e[s]],h=l[r][1]||0,f=l[r-1][1]||0,d=(h-f)/2,p=0;p<s;++p){var g=t[e[p]],m=g[r][1]||0,y=g[r-1][1]||0;d+=m-y}u+=h,c+=d*h}i[r-1][1]+=i[r-1][0]=n,u&&(n-=c/u)}i[r-1][1]+=i[r-1][0]=n,ni(t,e)}}function Qv(t){var e=t.map(fC);return ri(t).sort(function(n,r){return e[n]-e[r]})}function fC(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 Jv(t){var e=t.map(t2);return ri(t).sort(function(n,r){return e[n]-e[r]})}function t2(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function hC(t){return Jv(t).reverse()}function dC(t){var e=t.length,n,r,i=t.map(t2),o=Qv(t),a=0,s=0,u=[],c=[];for(n=0;n<e;++n)r=o[n],a<s?(a+=i[r],u.push(r)):(s+=i[r],c.push(r));return c.reverse().concat(u)}function pC(t){return ri(t).reverse()}const Au=t=>()=>t;function gC(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Be(t,e,n){this.k=t,this.x=e,this.y=n}Be.prototype={constructor:Be,scale:function(t){return t===1?this:new Be(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Be(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Mu=new Be(1,0,0);e2.prototype=Be.prototype;function e2(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Mu;return t.__zoom}function vh(t){t.stopImmediatePropagation()}function Co(t){t.preventDefault(),t.stopImmediatePropagation()}function mC(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function yC(){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 n2(){return this.__zoom||Mu}function bC(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function vC(){return navigator.maxTouchPoints||"ontouchstart"in this}function xC(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 r2(){var t=mC,e=yC,n=xC,r=bC,i=vC,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=Eg,c=In("start","zoom","end"),l,h,f,d=500,p=150,g=0,m=10;function y(T){T.property("__zoom",n2).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",D).filter(i).on("touchstart.zoom",A).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",M).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(T,E,L,N){var O=T.selection?T.selection():T;O.property("__zoom",n2),T!==O?$(T,E,L,N):O.interrupt().each(function(){w(this,arguments).event(N).start().zoom(null,typeof E=="function"?E.apply(this,arguments):E).end()})},y.scaleBy=function(T,E,L,N){y.scaleTo(T,function(){var O=this.__zoom.k,k=typeof E=="function"?E.apply(this,arguments):E;return O*k},L,N)},y.scaleTo=function(T,E,L,N){y.transform(T,function(){var O=e.apply(this,arguments),k=this.__zoom,R=L==null?b(O):typeof L=="function"?L.apply(this,arguments):L,G=k.invert(R),C=typeof E=="function"?E.apply(this,arguments):E;return n(v(x(k,C),R,G),O,a)},L,N)},y.translateBy=function(T,E,L,N){y.transform(T,function(){return n(this.__zoom.translate(typeof E=="function"?E.apply(this,arguments):E,typeof L=="function"?L.apply(this,arguments):L),e.apply(this,arguments),a)},null,N)},y.translateTo=function(T,E,L,N,O){y.transform(T,function(){var k=e.apply(this,arguments),R=this.__zoom,G=N==null?b(k):typeof N=="function"?N.apply(this,arguments):N;return n(Mu.translate(G[0],G[1]).scale(R.k).translate(typeof E=="function"?-E.apply(this,arguments):-E,typeof L=="function"?-L.apply(this,arguments):-L),k,a)},N,O)};function x(T,E){return E=Math.max(o[0],Math.min(o[1],E)),E===T.k?T:new Be(E,T.x,T.y)}function v(T,E,L){var N=E[0]-L[0]*T.k,O=E[1]-L[1]*T.k;return N===T.x&&O===T.y?T:new Be(T.k,N,O)}function b(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function $(T,E,L,N){T.on("start.zoom",function(){w(this,arguments).event(N).start()}).on("interrupt.zoom end.zoom",function(){w(this,arguments).event(N).end()}).tween("zoom",function(){var O=this,k=arguments,R=w(O,k).event(N),G=e.apply(O,k),C=L==null?b(G):typeof L=="function"?L.apply(O,k):L,z=Math.max(G[1][0]-G[0][0],G[1][1]-G[0][1]),X=O.__zoom,H=typeof E=="function"?E.apply(O,k):E,j=u(X.invert(C).concat(z/X.k),H.invert(C).concat(z/H.k));return function(J){if(J===1)J=H;else{var dt=j(J),q=z/dt[2];J=new Be(q,C[0]-dt[0]*q,C[1]-dt[1]*q)}R.zoom(null,J)}})}function w(T,E,L){return!L&&T.__zooming||new S(T,E)}function S(T,E){this.that=T,this.args=E,this.active=0,this.sourceEvent=null,this.extent=e.apply(T,E),this.taps=0}S.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,E){return this.mouse&&T!=="mouse"&&(this.mouse[1]=E.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=E.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=E.invert(this.touch1[0])),this.that.__zoom=E,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var E=K(this.that).datum();c.call(T,this.that,new gC(T,{sourceEvent:this.sourceEvent,target:y,type:T,transform:this.that.__zoom,dispatch:c}),E)}};function _(T,...E){if(!t.apply(this,arguments))return;var L=w(this,E).event(T),N=this.__zoom,O=Math.max(o[0],Math.min(o[1],N.k*Math.pow(2,r.apply(this,arguments)))),k=ae(T);if(L.wheel)(L.mouse[0][0]!==k[0]||L.mouse[0][1]!==k[1])&&(L.mouse[1]=N.invert(L.mouse[0]=k)),clearTimeout(L.wheel);else{if(N.k===O)return;L.mouse=[k,N.invert(k)],Yn(this),L.start()}Co(T),L.wheel=setTimeout(R,p),L.zoom("mouse",n(v(x(N,O),L.mouse[0],L.mouse[1]),L.extent,a));function R(){L.wheel=null,L.end()}}function P(T,...E){if(f||!t.apply(this,arguments))return;var L=T.currentTarget,N=w(this,E,!0).event(T),O=K(T.view).on("mousemove.zoom",C,!0).on("mouseup.zoom",z,!0),k=ae(T,L),R=T.clientX,G=T.clientY;Pa(T.view),vh(T),N.mouse=[k,this.__zoom.invert(k)],Yn(this),N.start();function C(X){if(Co(X),!N.moved){var H=X.clientX-R,j=X.clientY-G;N.moved=H*H+j*j>g}N.event(X).zoom("mouse",n(v(N.that.__zoom,N.mouse[0]=ae(X,L),N.mouse[1]),N.extent,a))}function z(X){O.on("mousemove.zoom mouseup.zoom",null),Da(X.view,N.moved),Co(X),N.event(X).end()}}function D(T,...E){if(t.apply(this,arguments)){var L=this.__zoom,N=ae(T.changedTouches?T.changedTouches[0]:T,this),O=L.invert(N),k=L.k*(T.shiftKey?.5:2),R=n(v(x(L,k),N,O),e.apply(this,E),a);Co(T),s>0?K(this).transition().duration(s).call($,R,N,T):K(this).call(y.transform,R,N,T)}}function A(T,...E){if(t.apply(this,arguments)){var L=T.touches,N=L.length,O=w(this,E,T.changedTouches.length===N).event(T),k,R,G,C;for(vh(T),R=0;R<N;++R)G=L[R],C=ae(G,this),C=[C,this.__zoom.invert(C),G.identifier],O.touch0?!O.touch1&&O.touch0[2]!==C[2]&&(O.touch1=C,O.taps=0):(O.touch0=C,k=!0,O.taps=1+!!l);l&&(l=clearTimeout(l)),k&&(O.taps<2&&(h=C[0],l=setTimeout(function(){l=null},d)),Yn(this),O.start())}}function I(T,...E){if(this.__zooming){var L=w(this,E).event(T),N=T.changedTouches,O=N.length,k,R,G,C;for(Co(T),k=0;k<O;++k)R=N[k],G=ae(R,this),L.touch0&&L.touch0[2]===R.identifier?L.touch0[0]=G:L.touch1&&L.touch1[2]===R.identifier&&(L.touch1[0]=G);if(R=L.that.__zoom,L.touch1){var z=L.touch0[0],X=L.touch0[1],H=L.touch1[0],j=L.touch1[1],J=(J=H[0]-z[0])*J+(J=H[1]-z[1])*J,dt=(dt=j[0]-X[0])*dt+(dt=j[1]-X[1])*dt;R=x(R,Math.sqrt(J/dt)),G=[(z[0]+H[0])/2,(z[1]+H[1])/2],C=[(X[0]+j[0])/2,(X[1]+j[1])/2]}else if(L.touch0)G=L.touch0[0],C=L.touch0[1];else return;L.zoom("touch",n(v(R,G,C),L.extent,a))}}function M(T,...E){if(this.__zooming){var L=w(this,E).event(T),N=T.changedTouches,O=N.length,k,R;for(vh(T),f&&clearTimeout(f),f=setTimeout(function(){f=null},d),k=0;k<O;++k)R=N[k],L.touch0&&L.touch0[2]===R.identifier?delete L.touch0:L.touch1&&L.touch1[2]===R.identifier&&delete L.touch1;if(L.touch1&&!L.touch0&&(L.touch0=L.touch1,delete L.touch1),L.touch0)L.touch0[1]=this.__zoom.invert(L.touch0[0]);else if(L.end(),L.taps===2&&(R=ae(R,this),Math.hypot(h[0]-R[0],h[1]-R[1])<m)){var G=K(this).on("dblclick.zoom");G&&G.apply(this,arguments)}}}return y.wheelDelta=function(T){return arguments.length?(r=typeof T=="function"?T:Au(+T),y):r},y.filter=function(T){return arguments.length?(t=typeof T=="function"?T:Au(!!T),y):t},y.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:Au(!!T),y):i},y.extent=function(T){return arguments.length?(e=typeof T=="function"?T:Au([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),y):e},y.scaleExtent=function(T){return arguments.length?(o[0]=+T[0],o[1]=+T[1],y):[o[0],o[1]]},y.translateExtent=function(T){return arguments.length?(a[0][0]=+T[0][0],a[1][0]=+T[1][0],a[0][1]=+T[0][1],a[1][1]=+T[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(T){return arguments.length?(n=T,y):n},y.duration=function(T){return arguments.length?(s=+T,y):s},y.interpolate=function(T){return arguments.length?(u=T,y):u},y.on=function(){var T=c.on.apply(c,arguments);return T===c?y:T},y.clickDistance=function(T){return arguments.length?(g=(T=+T)*T,y):Math.sqrt(g)},y.tapDistance=function(T){return arguments.length?(m=+T,y):m},y}const i2=Object.freeze(Object.defineProperty({__proto__:null,Adder:Dt,Delaunay:Ll,FormatSpecifier:cs,InternMap:Di,InternSet:kn,Node:Jn,Path:Vi,Voronoi:v1,ZoomTransform:Be,active:SM,arc:dv,area:gv,areaRadial:xv,ascending:_t,autoType:j7,axisBottom:m5,axisLeft:Cp,axisRight:g5,axisTop:kp,bin:wp,bisect:En,bisectCenter:f6,bisectLeft:l6,bisectRight:sp,bisector:pa,blob:K7,blur:h6,blur2:up,blurImage:d6,brush:FM,brushSelection:RM,brushX:IM,brushY:NM,buffer:J7,chord:zM,chordDirected:UM,chordTranspose:OM,cluster:fP,color:hn,contourDensity:d7,contours:Al,count:ma,create:KA,creator:Aa,cross:x6,csv:n9,csvFormat:F7,csvFormatBody:G7,csvFormatRow:O7,csvFormatRows:z7,csvFormatValue:U7,csvParse:$1,csvParseRows:N7,cubehelix:Me,cumsum:_6,curveBasis:Uk,curveBasisClosed:Bk,curveBasisOpen:Yk,curveBumpX:wv,curveBumpY:$v,curveBundle:Wk,curveCardinal:Hk,curveCardinalClosed:qk,curveCardinalOpen:Xk,curveCatmullRom:jk,curveCatmullRomClosed:Vk,curveCatmullRomOpen:Zk,curveLinear:mu,curveLinearClosed:Kk,curveMonotoneX:Qk,curveMonotoneY:Jk,curveNatural:tC,curveStep:eC,curveStepAfter:rC,curveStepBefore:nC,descending:op,deviation:fp,difference:r5,disjoint:i5,dispatch:In,drag:Hp,dragDisable:Pa,dragEnable:Da,dsv:e9,dsvFormat:os,easeBack:Jg,easeBackIn:mM,easeBackInOut:Jg,easeBackOut:yM,easeBounce:Xi,easeBounceIn:pM,easeBounceInOut:gM,easeBounceOut:Xi,easeCircle:Qg,easeCircleIn:iM,easeCircleInOut:Qg,easeCircleOut:oM,easeCubic:qi,easeCubicIn:Z4,easeCubicInOut:qi,easeCubicOut:K4,easeElastic:Qa,easeElasticIn:bM,easeElasticInOut:vM,easeElasticOut:Qa,easeExp:Kg,easeExpIn:nM,easeExpInOut:Kg,easeExpOut:rM,easeLinear:X4,easePoly:Xg,easePolyIn:Q4,easePolyInOut:Xg,easePolyOut:J4,easeQuad:qg,easeQuadIn:j4,easeQuadInOut:qg,easeQuadOut:V4,easeSin:Zg,easeSinIn:tM,easeSinInOut:Zg,easeSinOut:eM,every:K6,extent:Pi,fcumsum:$6,filter:J6,flatGroup:S6,flatRollup:A6,forceCenter:l9,forceCollide:P1,forceLink:L9,forceManyBody:k1,forceRadial:G9,forceSimulation:E1,forceX:C1,forceY:R1,get format(){return Ji},formatDefaultLocale:B1,formatLocale:U1,get formatPrefix(){return Nl},formatSpecifier:Ur,fsum:w6,geoAlbers:ny,geoAlbersUsa:YT,geoArea:j9,geoAzimuthalEqualArea:WT,geoAzimuthalEqualAreaRaw:wf,geoAzimuthalEquidistant:HT,geoAzimuthalEquidistantRaw:$f,geoBounds:Q9,geoCentroid:iT,geoCircle:oT,geoClipAntimeridian:tf,geoClipCircle:Sm,geoClipExtent:hT,geoClipRectangle:Es,geoConicConformal:XT,geoConicConformalRaw:oy,geoConicEqualArea:Ys,geoConicEqualAreaRaw:ey,geoConicEquidistant:VT,geoConicEquidistantRaw:ay,geoContains:vT,geoDistance:Rs,geoEqualEarth:KT,geoEqualEarthRaw:Sf,geoEquirectangular:jT,geoEquirectangularRaw:mo,geoGnomonic:QT,geoGnomonicRaw:Af,geoGraticule:Rm,geoGraticule10:xT,geoIdentity:JT,geoInterpolate:_T,geoLength:Am,geoMercator:qT,geoMercatorRaw:go,geoNaturalEarth1:tP,geoNaturalEarth1Raw:Mf,geoOrthographic:eP,geoOrthographicRaw:Tf,geoPath:CT,geoProjection:ze,geoProjectionMutator:xf,geoRotation:mm,geoStereographic:nP,geoStereographicRaw:Pf,geoStream:Pe,geoTransform:RT,geoTransverseMercator:rP,geoTransverseMercatorRaw:Df,gray:y8,greatest:$p,greatestIndex:H6,group:gp,groupSort:P6,groups:mp,hcl:Fa,hierarchy:qs,histogram:wp,hsl:Ca,html:u9,image:i9,index:M6,indexes:T6,interpolate:dn,interpolateArray:$8,interpolateBasis:mg,interpolateBasisClosed:yg,interpolateBlues:VE,interpolateBrBG:PE,interpolateBuGn:FE,interpolateBuPu:GE,interpolateCividis:ek,interpolateCool:ik,interpolateCubehelix:G8,interpolateCubehelixDefault:nk,interpolateCubehelixLong:Ya,interpolateDate:$g,interpolateDiscrete:M8,interpolateGnBu:zE,interpolateGreens:ZE,interpolateGreys:KE,interpolateHcl:N8,interpolateHclLong:F8,interpolateHsl:C8,interpolateHslLong:R8,interpolateHue:T8,interpolateInferno:hk,interpolateLab:I8,interpolateMagma:fk,interpolateNumber:he,interpolateNumberArray:Zc,interpolateObject:Sg,interpolateOrRd:OE,interpolateOranges:tk,interpolatePRGn:DE,interpolatePiYG:LE,interpolatePlasma:dk,interpolatePuBu:BE,interpolatePuBuGn:UE,interpolatePuOr:EE,interpolatePuRd:YE,interpolatePurples:QE,interpolateRainbow:ok,interpolateRdBu:kE,interpolateRdGy:CE,interpolateRdPu:WE,interpolateRdYlBu:RE,interpolateRdYlGn:IE,interpolateReds:JE,interpolateRgb:zi,interpolateRgbBasis:xg,interpolateRgbBasisClosed:w8,interpolateRound:Ua,interpolateSinebow:uk,interpolateSpectral:NE,interpolateString:Jc,interpolateTransformCss:Pg,interpolateTransformSvg:Dg,interpolateTurbo:ck,interpolateViridis:lk,interpolateWarm:rk,interpolateYlGn:qE,interpolateYlGnBu:HE,interpolateYlOrBr:XE,interpolateYlOrRd:jE,interpolateZoom:Eg,interrupt:Yn,intersection:o5,interval:Y8,isoFormat:sE,isoParse:lE,json:a9,lab:Na,lch:b8,least:W6,leastIndex:Mp,line:yu,lineRadial:vv,link:bu,linkHorizontal:Dk,linkRadial:Ek,linkVertical:Lk,local:Yp,map:t5,matcher:Ic,max:Li,maxIndex:Pc,mean:N6,median:F6,medianIndex:G6,merge:Lc,min:va,minIndex:Dc,mode:O6,namespace:Ri,namespaces:Cc,nice:Mc,now:Wi,pack:UP,packEnclose:IP,packSiblings:zP,pairs:U6,partition:BP,path:Sl,pathRound:WM,permute:_p,pie:mv,piecewise:Ig,pointRadial:ko,pointer:ae,pointers:JA,polygonArea:rD,polygonCentroid:iD,polygonContains:uD,polygonHull:sD,polygonLength:cD,precisionFixed:Y1,precisionPrefix:W1,precisionRound:H1,quadtree:ss,quantile:ki,quantileIndex:Ap,quantileSorted:Sp,quantize:z8,quickselect:xa,radialArea:xv,radialLine:vv,randomBates:dD,randomBernoulli:mD,randomBeta:Py,randomBinomial:Dy,randomCauchy:bD,randomExponential:pD,randomGamma:zf,randomGeometric:Ty,randomInt:fD,randomIrwinHall:My,randomLcg:$D,randomLogNormal:hD,randomLogistic:vD,randomNormal:Gf,randomPareto:gD,randomPoisson:xD,randomUniform:lD,randomWeibull:yD,range:ln,rank:Y6,reduce:e5,reverse:n5,rgb:Dr,ribbon:QM,ribbonArrow:JM,rollup:bp,rollups:vp,scaleBand:Bf,scaleDiverging:Ib,scaleDivergingLog:Nb,scaleDivergingPow:sh,scaleDivergingSqrt:mE,scaleDivergingSymlog:Fb,scaleIdentity:Ry,scaleImplicit:Of,scaleLinear:qf,scaleLog:zy,scaleOrdinal:Uf,scalePoint:Yf,scalePow:tu,scaleQuantile:qy,scaleQuantize:Xy,scaleRadial:Hy,scaleSequential:Eb,scaleSequentialLog:kb,scaleSequentialPow:ah,scaleSequentialQuantile:Rb,scaleSequentialSqrt:gE,scaleSequentialSymlog:Cb,scaleSqrt:ID,scaleSymlog:By,scaleThreshold:jy,scaleTime:dE,scaleUtc:pE,scan:q6,schemeAccent:bE,schemeBlues:ov,schemeBrBG:Gb,schemeBuGn:Xb,schemeBuPu:jb,schemeCategory10:yE,schemeDark2:vE,schemeGnBu:Vb,schemeGreens:av,schemeGreys:sv,schemeObservable10:xE,schemeOrRd:Zb,schemeOranges:lv,schemePRGn:zb,schemePaired:_E,schemePastel1:wE,schemePastel2:$E,schemePiYG:Ob,schemePuBu:Qb,schemePuBuGn:Kb,schemePuOr:Ub,schemePuRd:Jb,schemePurples:uv,schemeRdBu:Bb,schemeRdGy:Yb,schemeRdPu:tv,schemeRdYlBu:Wb,schemeRdYlGn:Hb,schemeReds:cv,schemeSet1:SE,schemeSet2:AE,schemeSet3:ME,schemeSpectral:qb,schemeTableau10:TE,schemeYlGn:nv,schemeYlGnBu:ev,schemeYlOrBr:rv,schemeYlOrRd:iv,select:K,selectAll:t8,selection:Fn,selector:Ma,selectorAll:Rc,shuffle:X6,shuffler:Tp,some:Q6,sort:$c,stack:aC,stackOffsetDiverging:uC,stackOffsetExpand:sC,stackOffsetNone:ni,stackOffsetSilhouette:cC,stackOffsetWiggle:lC,stackOrderAppearance:Qv,stackOrderAscending:Jv,stackOrderDescending:hC,stackOrderInsideOut:dC,stackOrderNone:ri,stackOrderReverse:pC,stratify:qP,style:Nn,subset:s5,sum:j6,superset:Dp,svg:c9,symbol:Ok,symbolAsterisk:Sv,symbolCircle:vu,symbolCross:Av,symbolDiamond:Tv,symbolDiamond2:Pv,symbolPlus:Dv,symbolSquare:Lv,symbolSquare2:Ev,symbolStar:Cv,symbolTimes:dh,symbolTriangle:Rv,symbolTriangle2:Iv,symbolWye:Nv,symbolX:dh,symbols:Fv,symbolsFill:Fv,symbolsStroke:zk,text:as,thresholdFreedmanDiaconis:R6,thresholdScott:I6,thresholdSturges:Tc,tickFormat:Cy,tickIncrement:Rn,tickStep:ba,ticks:Cn,timeDay:Kr,timeDays:UD,get timeFormat(){return rh},timeFormatDefaultLocale:Db,timeFormatLocale:db,timeFriday:tb,timeFridays:jD,timeHour:ru,timeHours:zD,timeInterval:Tt,timeMillisecond:Zr,timeMilliseconds:Vy,timeMinute:eu,timeMinutes:FD,timeMonday:Ao,timeMondays:WD,timeMonth:ou,timeMonths:nL,get timeParse(){return Pb},timeSaturday:eb,timeSaturdays:VD,timeSecond:an,timeSeconds:Ky,timeSunday:Qr,timeSundays:nb,timeThursday:nr,timeThursdays:XD,timeTickInterval:hb,timeTicks:fb,timeTuesday:Qy,timeTuesdays:HD,timeWednesday:Jy,timeWednesdays:qD,timeWeek:Qr,timeWeeks:nb,timeYear:Oe,timeYears:iL,timeout:nl,timer:Xa,timerFlush:Gg,transition:Wg,transpose:Pp,tree:JP,treemap:Sy,treemapBinary:tD,treemapDice:wo,treemapResquarify:nD,treemapSlice:Ks,treemapSliceDice:eD,treemapSquarify:Ff,tsv:r9,tsvFormat:Y7,tsvFormatBody:W7,tsvFormatRow:q7,tsvFormatRows:H7,tsvFormatValue:X7,tsvParse:S1,tsvParseRows:B7,union:u5,unixDay:th,unixDays:YD,utcDay:So,utcDays:BD,get utcFormat(){return su},utcFriday:ob,utcFridays:tL,utcHour:iu,utcHours:OD,utcMillisecond:Zr,utcMilliseconds:Vy,utcMinute:nu,utcMinutes:GD,utcMonday:Mo,utcMondays:ZD,utcMonth:au,utcMonths:rL,get utcParse(){return ih},utcSaturday:ab,utcSaturdays:eL,utcSecond:an,utcSeconds:Ky,utcSunday:Jr,utcSundays:sb,utcThursday:ir,utcThursdays:JD,utcTickInterval:lb,utcTicks:cb,utcTuesday:rb,utcTuesdays:KD,utcWednesday:ib,utcWednesdays:QD,utcWeek:Jr,utcWeeks:sb,utcYear:Ue,utcYears:oL,variance:lp,window:Nc,xml:s9,zip:Z6,zoom:r2,zoomIdentity:Mu,zoomTransform:e2},Symbol.toStringTag,{value:"Module"}));function o2(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function _C(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 ii(t){return t.substring(0,4)!=="ease"?qi:i2[t]??qi}function Tu({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=qf().domain([0,1]).range([0,t/2]),a=o(n);return dv().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const xh=(t,e)=>e instanceof Function?e(t):Ji(e)(t);function a2(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 wC(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 $C(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return wC(e)}function It(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 SC(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]}function _h({datum:t,colorType:e,fullChartParams:n}){return e==="series"?t.color?t.color:n.colors[n.colorScheme].series[0]:e=="none"?"none":n.colors[n.colorScheme][e]!=null?n.colors[n.colorScheme][e]:n.colors[n.colorScheme].primary}function at(t,e,n){const r=n?`--${n}`:"";return`orbcharts-${t}__${e}${r}`}function oi(t,e){const r=Math.random().toString(36).substr(2,5);return at(t,e,r)}const Ro=({selection:t,pluginName:e,clipPathID:n,existedSeriesLabels$:r,gridContainer$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=at(e,"series"),u=at(e,"axes"),c=at(e,"graphic"),l=r.pipe(U((p,g)=>t.selectAll(`g.${s}`).data(p,m=>m).join(m=>m.append("g").classed(s,!0).each((y,x,v)=>{K(v[x]).selectAll(`g.${u}`).data([x]).join(b=>b.append("g").classed(u,!0).attr("clip-path",`url(#${n})`).each(($,w,S)=>{K(S[w]).selectAll("defs").data([w]).join("defs"),K(S[w]).selectAll("g").data([w]).join("g").classed(c,!0)}),b=>b,b=>b.remove())}),m=>m,m=>m.remove())),B(p=>W({seriesSelection:ci(p),gridContainer:i})),U(p=>(p.seriesSelection.transition().attr("transform",(g,m)=>{const y=p.gridContainer[m]??p.gridContainer[0],x=y.translate,v=y.scale;return`translate(${x[0]}, ${x[1]}) scale(${v[0]}, ${v[1]})`}),p.seriesSelection)),Ye(1)),h=W({seriesSelection:l,gridAxesTransform:o}).pipe(B(async p=>p),U(p=>p.seriesSelection.select(`g.${u}`).style("transform",p.gridAxesTransform.value)),Ye(1)),f=h.pipe(U(p=>p.select("defs")),Ye(1)),d=W({axesSelection:h,gridGraphicTransform:a}).pipe(B(async p=>p),U(p=>{const g=p.axesSelection.select(`g.${c}`);return g.transition().duration(50).style("transform",p.gridGraphicTransform.value),g}),Ye(1));return{seriesSelection$:l,axesSelection$:h,defsSelection$:f,graphicGSelection$:d}},s2=({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r})=>{const i=new rt,o=new lt(a=>{W({dataFormatter:t,computedData:n}).pipe(F(i),B(async s=>s)).subscribe(s=>{const c=s.computedData[0]?s.computedData[0].length-1:0,l=s.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-s.dataFormatter.grid.groupAxis.scalePadding:s.dataFormatter.grid.groupAxis.scaleDomain[0]-s.dataFormatter.grid.groupAxis.scalePadding,h=s.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?c+s.dataFormatter.grid.groupAxis.scalePadding:s.dataFormatter.grid.groupAxis.scaleDomain[1]+s.dataFormatter.grid.groupAxis.scalePadding,d=(s.dataFormatter.grid.gridData.seriesDirection==="row"?(s.computedData[0]??[]).map(p=>p.groupLabel):s.computedData.map(p=>p[0].groupLabel)).filter((p,g)=>g>=l&&g<=h);a.next(d)})});return new lt(a=>{W({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:o}).pipe(F(i),B(async s=>s)).subscribe(s=>{const u=s.dataFormatter.grid.valueAxis.position==="right"||s.dataFormatter.grid.valueAxis.position==="bottom",c=a6({axisLabels:s.scaleRangeGroupLabels,axisWidth:s.axisSize.width,reverse:u}),l=f=>s.dataFormatter.grid.groupAxis.position==="bottom"||s.dataFormatter.grid.groupAxis.position==="top"?f.offsetX-s.fullChartParams.padding.left:f.offsetY-s.fullChartParams.padding.top,h=f=>{const d=l(f),p=c(d);return{groupIndex:p,groupLabel:s.scaleRangeGroupLabels[p]??""}};return a.next(h),function(){i.next(void 0)}})})};function AC(t="curveLinear"){return yu().x(e=>e.axisX).y(e=>e.axisY).curve(i2[t])}function MC(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 TC({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 PC({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?K(o[i]).style("opacity",1):K(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function DC({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)=>{K(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(ii(r)).tween("tween",(c,l,h)=>f=>{const d=c.width*f;u.attr("x",0).attr("y",0).attr("width",p=>d).attr("height",p=>p.height)}),u},s=>s.attr("x",0).attr("y",0).attr("width",u=>u.width).attr("height",u=>u.height),s=>s.remove())})}const u2=(t,{selection:e,computedData$:n,existedSeriesLabels$:r,SeriesDataMap$:i,GroupDataMap$:o,fullParams$:a,fullDataFormatter$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridAxesSize$:h,gridHighlight$:f,gridContainer$:d,event$:p})=>{const g=new rt,m=oi(t,"clipPath-box"),y=at(t,"path"),{seriesSelection$:x,axesSelection$:v,defsSelection$:b,graphicGSelection$:$}=Ro({selection:e,pluginName:t,clipPathID:m,existedSeriesLabels$:r,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l}),w=new lt(M=>{const T=a.pipe(F(g)).subscribe(E=>{if(!E)return;const L=AC(E.lineCurve);M.next(L)});return()=>{T.unsubscribe()}}),S=new lt(M=>{n.pipe(F(g),B(async T=>T)).subscribe(T=>{const E=T[0]&&T[0][0]?T.map(L=>L[0].seriesLabel):[];M.next(E)})}),_=u.pipe(U(M=>M.transitionDuration),ht()),P=u.pipe(U(M=>M.transitionEase),ht());W({defsSelection:b,seriesLabels:S,axisSize:h,transitionDuration:_,transitionEase:P}).pipe(F(g),B(async M=>M)).subscribe(M=>{const E=[{id:m,width:M.axisSize.width,height:M.axisSize.height}].concat(M.seriesLabels.map(L=>({id:`orbcharts__clipPath_${L}`,width:M.axisSize.width,height:M.axisSize.height})));DC({defsSelection:M.defsSelection,clipPathData:E,transitionDuration:M.transitionDuration,transitionEase:M.transitionEase})});const D=n.pipe(U(M=>{const T=new Map;return M.flat().forEach(E=>T.set(E.id,E)),T})),A=s2({fullDataFormatter$:s,gridAxesSize$:h,computedData$:n,fullChartParams$:u}),I=u.pipe(F(g),U(M=>M.highlightTarget),ht());return W({graphicGSelection:$,seriesLabels:S,computedData:n,SeriesDataMap:i,GroupDataMap:o,linePath:w,params:a,highlightTarget:I,gridGroupPositionFn:A}).pipe(F(g),B(async M=>M)).subscribe(M=>{M.graphicGSelection.each((T,E,L)=>{const N=MC(M.computedData[E]??[]);TC({selection:K(L[E]),pathClassName:y,linePath:M.linePath,segmentData:N,params:M.params}).on("mouseover",(k,R)=>{k.stopPropagation();const G=R[0]?R[0].seriesLabel:"",{groupIndex:C,groupLabel:z}=M.gridGroupPositionFn(k),j=M.GroupDataMap.get(z).find(J=>J.seriesLabel===G)??R[0];p.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:j,series:M.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:M.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:k,data:M.computedData})}).on("mousemove",(k,R)=>{k.stopPropagation();const G=R[0]?R[0].seriesLabel:"",{groupIndex:C,groupLabel:z}=M.gridGroupPositionFn(k),j=M.GroupDataMap.get(z).find(J=>J.seriesLabel===G)??R[0];p.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:j,series:M.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:M.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:k,data:M.computedData})}).on("mouseout",(k,R)=>{k.stopPropagation();const G=R[0]?R[0].seriesLabel:"",{groupIndex:C,groupLabel:z}=M.gridGroupPositionFn(k),j=M.GroupDataMap.get(z).find(J=>J.seriesLabel===G)??R[0];p.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:j,series:M.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:M.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:k,data:M.computedData})}).on("click",(k,R)=>{k.stopPropagation();const G=R[0]?R[0].seriesLabel:"",{groupIndex:C,groupLabel:z}=M.gridGroupPositionFn(k),j=M.GroupDataMap.get(z).find(J=>J.seriesLabel===G)??R[0];p.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:j,series:M.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,groups:M.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:k,data:M.computedData})})})}),u.pipe(F(g),Uo(M=>M.highlightTarget==="series"),B(M=>W({graphicGSelection:$,highlight:f,DataMap:D,fullChartParams:u}).pipe(F(g),B(async T=>T)))).subscribe(M=>{const T=M.DataMap.get(M.highlight[0]);PC({selection:M.graphicGSelection,seriesLabel:T&&T.seriesLabel?T.seriesLabel:null,fullChartParams:M.fullChartParams})}),()=>{g.next(void 0)}},c2="Lines",LC=fe(c2,ar)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=u2(c2,{selection:t,computedData$:n.computedData$,existedSeriesLabels$:n.existedSeriesLabels$,SeriesDataMap$:n.SeriesDataMap$,GroupDataMap$:n.GroupDataMap$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridGraphicTransform$:n.gridGraphicTransform$,gridAxesSize$:n.gridAxesSize$,gridHighlight$:n.gridHighlight$,gridContainer$:n.gridContainer$,event$:r.event$});return()=>{i.next(void 0),o()}}),l2=.3;function f2({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 EC(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Yf().domain(e).range([-i/2+r,i/2-r])}function kC(t,e){return t<=1?0:e/(t-1)*l2}function CC(t,e){return t<=1?e:e*(1-l2)}function RC({graphicGSelection:t,rectClassName:e,computedData:n,zeroYArr:r,groupLabels:i,barScale:o,params:a,chartParams:s,barWidth:u,transformedBarRadius:c,delayGroup:l,transitionItem:h,isSeriesPositionSeprate:f}){const d=u/2;return t.each((g,m,y)=>{K(y[m]).selectAll(`rect.${e}`).data(n[m]??[],x=>x.id).join(x=>x.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",v=>0),x=>x,x=>x.remove()).attr("transform",(x,v)=>`translate(${(x?x.axisX:0)-d}, 0)`).attr("fill",x=>x.color).attr("y",x=>x.axisY<r[m]?x.axisY:r[m]).attr("x",x=>f?0:o(x.seriesLabel)).attr("width",u).attr("rx",c[m][0]??1).attr("ry",c[m][1]??1).transition().duration(h).ease(ii(s.transitionEase)).delay((x,v)=>x.groupIndex*l).attr("height",x=>Math.abs(x.axisYFromZero))}),t.selectAll(`rect.${e}`)}function IC({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)=>{K(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 NC({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)?K(o[i]).style("opacity",1):K(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const wh=(t,{selection:e,computedData$:n,visibleComputedData$:r,existedSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridGraphicReverseScale$:h,gridAxesSize$:f,gridHighlight$:d,gridContainer$:p,isSeriesPositionSeprate$:g,event$:m})=>{const y=new rt,x=oi(t,"clipPath-box"),v=at(t,"rect"),{seriesSelection$:b,axesSelection$:$,defsSelection$:w,graphicGSelection$:S}=Ro({selection:e,pluginName:t,clipPathID:x,existedSeriesLabels$:i,gridContainer$:p,gridAxesTransform$:c,gridGraphicTransform$:l}),_=r.pipe(F(y),U(k=>k.map(R=>R[0]?R[0].axisY-R[0].axisYFromZero:0)),ht()),P=W({computedData:n,visibleComputedData:r,params:s,gridAxesSize:f,isSeriesPositionSeprate:g}).pipe(F(y),B(async k=>k),U(k=>k.params.barWidth?k.params.barWidth:k.isSeriesPositionSeprate?f2({axisWidth:k.gridAxesSize.width,groupAmount:k.computedData[0]?k.computedData[0].length:0,barAmountOfGroup:1,barPadding:k.params.barPadding,barGroupPadding:k.params.barGroupPadding}):f2({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})),ht()),D=W({computedData:n,barWidth:P,params:s,gridGraphicReverseScale:h}).pipe(F(y),B(async k=>k),U(k=>{const R=k.barWidth/2,G=k.params.barRadius===!0?R:k.params.barRadius===!1?0:typeof k.params.barRadius=="number"?k.params.barRadius:0;return k.computedData.map((C,z)=>{const X=k.gridGraphicReverseScale[z]??k.gridGraphicReverseScale[0];let H=G*X[0],j=G*X[1];if(H>R){const J=R/H;H=H*J,j=j*J}return[H,j]})})),A=r.pipe(F(y),U(k=>{const R=new Set;return k.forEach(G=>{G.forEach(C=>{R.add(C.seriesLabel)})}),Array.from(R)})),I=r.pipe(F(y),U(k=>{const R=new Set;return k.forEach(G=>{G.forEach(C=>{R.add(C.groupLabel)})}),Array.from(R)})),M=W({seriesLabels:A,barWidth:P,params:s}).pipe(F(y),B(async k=>k),U(k=>EC(k.barWidth,k.seriesLabels,k.params))),T=u.pipe(F(y),U(k=>k.transitionDuration),ht()),E=new lt(k=>{W({groupLabels:I,transitionDuration:T}).pipe(B(async R=>R)).subscribe(R=>{const G=kC(R.groupLabels.length,R.transitionDuration);k.next(G)})}).pipe(F(y),ht()),L=new lt(k=>{W({groupLabels:I,transitionDuration:T}).pipe(B(async R=>R)).subscribe(R=>{const G=CC(R.groupLabels.length,R.transitionDuration);k.next(G)})}).pipe(F(y),ht());W({defsSelection:w,gridAxesSize:f}).pipe(F(y),B(async k=>k)).subscribe(k=>{const R=[{id:x,width:k.gridAxesSize.width,height:k.gridAxesSize.height}];IC({defsSelection:k.defsSelection,clipPathData:R})});const N=u.pipe(F(y),U(k=>k.highlightTarget),ht()),O=new rt;return W({graphicGSelection:S,computedData:n,zeroYArr:_,groupLabels:I,barScale:M,params:s,chartParams:u,highlightTarget:N,barWidth:P,transformedBarRadius:D,delayGroup:E,transitionItem:L,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:g}).pipe(F(y),B(async k=>k)).subscribe(k=>{const R=RC({graphicGSelection:k.graphicGSelection,rectClassName:v,computedData:k.computedData,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,isSeriesPositionSeprate:k.isSeriesPositionSeprate});R.on("mouseover",(G,C)=>{G.stopPropagation(),m.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:k.highlightTarget,datum:C,series:k.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:k.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:G,data:k.computedData})}).on("mousemove",(G,C)=>{G.stopPropagation(),m.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:k.highlightTarget,datum:C,series:k.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:k.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:G,data:k.computedData})}).on("mouseout",(G,C)=>{G.stopPropagation(),m.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:k.highlightTarget,datum:C,series:k.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:k.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:G,data:k.computedData})}).on("click",(G,C)=>{G.stopPropagation(),m.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:k.highlightTarget,datum:C,series:k.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:k.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:G,data:k.computedData})}),O.next(R)}),W({barSelection:O,highlight:d,fullChartParams:u}).pipe(F(y),B(async k=>k)).subscribe(k=>{NC({selection:k.barSelection,ids:k.highlight,fullChartParams:k.fullChartParams})}),()=>{y.next(void 0)}},h2="Bars",FC=fe(h2,No)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=wh(h2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existedSeriesLabels$:r.existedSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:r.isSeriesPositionSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),d2="BarsDiverging",GC=fe(d2,No)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=wh(d2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existedSeriesLabels$:r.existedSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:ci(!0),event$:n.event$});return()=>{i.next(void 0),o()}}),p2=.3;function zC({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function OC(t,e){return t<=1?0:e/(t-1)*p2}function UC(t,e){return t<=1?e:e*(1-p2)}function BC({graphicGSelection:t,rectClassName:e,barData:n,zeroY:r,groupLabels:i,params:o,chartParams:a,barWidth:s,transformedBarRadius:u,delayGroup:c,transitionItem:l,isSeriesPositionSeprate:h}){const f=s/2;return t.each((p,g,m)=>{K(m[g]).selectAll(`rect.${e}`).data(n[g]??[],y=>y.id).join(y=>y.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",x=>0),y=>y,y=>y.remove()).attr("transform",(y,x)=>`translate(${(y?y.axisX:0)-f}, 0)`).attr("fill",y=>y.color).attr("y",y=>r).attr("x",y=>0).attr("width",s).attr("rx",u[g][0]??1).attr("ry",u[g][1]??1).transition().duration(l).ease(ii(a.transitionEase)).delay((y,x)=>y.groupIndex*c).attr("y",y=>y._barStartY).attr("height",y=>Math.abs(y._barHeight))}),t.selectAll(`rect.${e}`)}function YC({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)=>{K(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 WC({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)?K(o[i]).style("opacity",1):K(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const g2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existedSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullDataFormatter$:u,fullChartParams$:c,gridAxesTransform$:l,gridGraphicTransform$:h,gridGraphicReverseScale$:f,gridAxesSize$:d,gridHighlight$:p,gridContainer$:g,isSeriesPositionSeprate$:m,event$:y})=>{const x=new rt,v=oi(t,"clipPath-box"),b=at(t,"rect"),{seriesSelection$:$,axesSelection$:w,defsSelection$:S,graphicGSelection$:_}=Ro({selection:e,pluginName:t,clipPathID:v,existedSeriesLabels$:i,gridContainer$:g,gridAxesTransform$:l,gridGraphicTransform$:h}),P=r.pipe(F(x),U(C=>C[0]&&C[0][0]?C[0][0].axisY-C[0][0].axisYFromZero:0),ht()),D=W({computedData:n,params:s,axisSize:d,isSeriesPositionSeprate:m}).pipe(F(x),B(async C=>C),U(C=>C.params.barWidth?C.params.barWidth:zC({axisWidth:C.axisSize.width,groupAmount:C.computedData[0]?C.computedData[0].length:0,barGroupPadding:C.params.barGroupPadding})),ht()),A=W({computedData:n,barWidth:D,params:s,gridGraphicReverseScale:f}).pipe(F(x),B(async C=>C),U(C=>{const z=C.barWidth/2,X=C.params.barRadius===!0?z:C.params.barRadius===!1?0:typeof C.params.barRadius=="number"?C.params.barRadius:0;return C.computedData.map((H,j)=>{const J=C.gridGraphicReverseScale[j]??C.gridGraphicReverseScale[0],dt=X*J[0],q=X*J[1];return[dt,q]})})),I=r.pipe(F(x),U(C=>{const z=new Set;return C.forEach(X=>{X.forEach(H=>{z.add(H.groupLabel)})}),Array.from(z)})),M=c.pipe(F(x),U(C=>C.transitionDuration),ht()),T=new lt(C=>{W({groupLabels:I,transitionDuration:M}).pipe(B(async z=>z)).subscribe(z=>{const X=OC(z.groupLabels.length,z.transitionDuration);C.next(X)})}).pipe(F(x),ht()),E=new lt(C=>{W({groupLabels:I,transitionDuration:M}).pipe(B(async z=>z)).subscribe(z=>{const X=UC(z.groupLabels.length,z.transitionDuration);C.next(X)})}).pipe(F(x),ht()),L=W({computedData:n,dataFormatter:u}).pipe(F(x),B(async C=>C),U(C=>{const X=C.computedData[0]?C.computedData[0].length-1:0,H=C.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-C.dataFormatter.grid.groupAxis.scalePadding:C.dataFormatter.grid.groupAxis.scaleDomain[0]-C.dataFormatter.grid.groupAxis.scalePadding,j=C.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?X+C.dataFormatter.grid.groupAxis.scalePadding:C.dataFormatter.grid.groupAxis.scaleDomain[1]+C.dataFormatter.grid.groupAxis.scalePadding,J=C.computedData.map(dt=>dt.filter((q,nt)=>q.groupIndex>=H&&q.groupIndex<=j));if(J.length<=1)return 1;{const dt=J.flat().map(Y=>Y.axisYFromZero),q=Math.max(...dt),nt=C.computedData[0]?C.computedData[0].map((Y,xt)=>C.computedData.reduce((gt,Ft)=>gt+Ft[xt].axisYFromZero,0)):[],st=Math.max(...nt);return q/st}})),N=W({computedData:n,yRatio:L,zeroY:P}).pipe(F(x),U(C=>{let z=C.computedData[0]?C.computedData[0].map(()=>C.zeroY):[];return C.computedData.map((X,H)=>X.map((j,J)=>{const dt=z[J],q=j.axisYFromZero*C.yRatio;return z[J]=z[J]+q,{...j,_barStartY:dt,_barHeight:q}}))})),O=W({computedData:n,zeroY:P}).pipe(F(x),U(C=>C.computedData.map((z,X)=>z.map((H,j)=>({...H,_barStartY:C.zeroY,_barHeight:H.axisYFromZero}))))),k=m.pipe(B(C=>vd(()=>C,O,N)));W({defsSelection:S,gridAxesSize:d}).pipe(F(x),B(async C=>C)).subscribe(C=>{const z=[{id:v,width:C.gridAxesSize.width,height:C.gridAxesSize.height}];YC({defsSelection:C.defsSelection,clipPathData:z})});const R=c.pipe(F(x),U(C=>C.highlightTarget),ht()),G=new rt;return W({graphicGSelection:_,graphicData:k,zeroY:P,groupLabels:I,params:s,chartParams:c,highlightTarget:R,barWidth:D,transformedBarRadius:A,delayGroup:T,transitionItem:E,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:m}).pipe(F(x),B(async C=>C)).subscribe(C=>{const z=BC({graphicGSelection:C.graphicGSelection,rectClassName:b,barData:C.graphicData,zeroY:C.zeroY,groupLabels:C.groupLabels,params:C.params,chartParams:C.chartParams,barWidth:C.barWidth,transformedBarRadius:C.transformedBarRadius,delayGroup:C.delayGroup,transitionItem:C.transitionItem,isSeriesPositionSeprate:C.isSeriesPositionSeprate});z.on("mouseover",(X,H)=>{X.stopPropagation(),y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:C.highlightTarget,datum:H,series:C.SeriesDataMap.get(H.seriesLabel),seriesIndex:H.seriesIndex,seriesLabel:H.seriesLabel,groups:C.GroupDataMap.get(H.groupLabel),groupIndex:H.groupIndex,groupLabel:H.groupLabel,event:X,data:C.graphicData})}).on("mousemove",(X,H)=>{X.stopPropagation(),y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:C.highlightTarget,datum:H,series:C.SeriesDataMap.get(H.seriesLabel),seriesIndex:H.seriesIndex,seriesLabel:H.seriesLabel,groups:C.GroupDataMap.get(H.groupLabel),groupIndex:H.groupIndex,groupLabel:H.groupLabel,event:X,data:C.graphicData})}).on("mouseout",(X,H)=>{X.stopPropagation(),y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:C.highlightTarget,datum:H,series:C.SeriesDataMap.get(H.seriesLabel),seriesIndex:H.seriesIndex,seriesLabel:H.seriesLabel,groups:C.GroupDataMap.get(H.groupLabel),groupIndex:H.groupIndex,groupLabel:H.groupLabel,event:X,data:C.graphicData})}).on("click",(X,H)=>{X.stopPropagation(),y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:C.highlightTarget,datum:H,series:C.SeriesDataMap.get(H.seriesLabel),seriesIndex:H.seriesIndex,seriesLabel:H.seriesLabel,groups:C.GroupDataMap.get(H.groupLabel),groupIndex:H.groupIndex,groupLabel:H.groupLabel,event:X,data:C.graphicData})}),G.next(z)}),W({barSelection:G,highlight:p,fullChartParams:c}).pipe(F(x),B(async C=>C)).subscribe(C=>{WC({selection:C.barSelection,ids:C.highlight,fullChartParams:C.fullChartParams})}),()=>{x.next(void 0)}},m2="BarStack",HC=fe(m2,Oh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=g2(m2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existedSeriesLabels$:r.existedSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:r.fullDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:r.isSeriesPositionSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),y2=.3;function b2({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 qC(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Yf().domain(e).range([-i/2+r,i/2-r])}function XC(t,e){return t<=1?0:e/(t-1)*y2}function jC(t,e){return t<=1?e:e*(1-y2)}function VC({graphicGSelection:t,pathGClassName:e,pathClassName:n,barData:r,zeroYArr:i,groupLabels:o,barScale:a,params:s,chartParams:u,barWidth:c,delayGroup:l,transitionItem:h,isSeriesPositionSeprate:f}){const d=c/2;return t.each((g,m,y)=>{K(y[m]).selectAll(`g.${e}`).data(r[m]??[]).join(v=>{const b=v.append("g").classed(e,!0).attr("cursor","pointer");return b.append("path").classed(n,!0).style("vector-effect","non-scaling-stroke").attr("d",$=>{const w=-d,S=i[m],_=i[m];return`M${w},${S} L${w+c/2},${_} ${w+c},${S}`}),b},v=>v,v=>v.remove()).attr("transform",v=>`translate(${f?0:a(v.seriesLabel)}, 0)`).select(`path.${n}`).attr("height",v=>Math.abs(v.axisYFromZero)).attr("y",v=>v.axisY<i[m]?v.axisY:i[m]).attr("x",v=>f?0:a(v.seriesLabel)).style("fill",v=>`url(#${v.linearGradientId})`).attr("stroke",v=>v.color).attr("transform",v=>`translate(${v?v.axisX:0}, 0)`).transition().duration(h).ease(ii(u.transitionEase)).delay((v,b)=>v.groupIndex*l).attr("d",v=>{const b=-d,$=i[m],w=v.axisY;return`M${b},${$} L${b+c/2},${w} ${b+c},${$}`})}),t.selectAll(`path.${n}`)}function ZC({defsSelection:t,barData:e,params:n}){t.selectAll("linearGradient").data(e??[]).join(r=>r.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),r=>r,r=>r.remove()).attr("id",(r,i)=>r[0]?r[0].linearGradientId:"").html((r,i)=>{const o=r[0]?r[0].color:"";return`
10
- <stop offset="0%" stop-color="${o}" stop-opacity="${n.linearGradientOpacity[0]}"/>
11
- <stop offset="100%" stop-color="${o}" stop-opacity="${n.linearGradientOpacity[1]}"/>
12
- `})}function KC({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)=>{K(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 QC({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)?K(a[o]).style("opacity",1):K(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const v2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existedSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridAxesSize$:h,gridHighlight$:f,gridContainer$:d,isSeriesPositionSeprate$:p,event$:g})=>{const m=new rt,y=oi(t,"clipPath-box"),x=at(t,"pathG"),v=at(t,"path"),{seriesSelection$:b,axesSelection$:$,defsSelection$:w,graphicGSelection$:S}=Ro({selection:e,pluginName:t,clipPathID:y,existedSeriesLabels$:i,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l}),_=r.pipe(U(R=>R.map(G=>G[0]?G[0].axisY-G[0].axisYFromZero:0)),ht()),P=W({computedData:n,visibleComputedData:r,params:s,gridAxesSize:h,isSeriesPositionSeprate:p}).pipe(F(m),B(async R=>R),U(R=>R.params.barWidth?R.params.barWidth:R.isSeriesPositionSeprate?b2({axisWidth:R.gridAxesSize.width,groupAmount:R.computedData[0]?R.computedData[0].length:0,barAmountOfGroup:1,barPadding:R.params.barPadding,barGroupPadding:R.params.barGroupPadding}):b2({axisWidth:R.gridAxesSize.width,groupAmount:R.computedData[0]?R.computedData[0].length:0,barAmountOfGroup:R.visibleComputedData.length,barPadding:R.params.barPadding,barGroupPadding:R.params.barGroupPadding}))),D=r.pipe(F(m),U(R=>{const G=new Set;return R.forEach(C=>{C.forEach(z=>{G.add(z.seriesLabel)})}),Array.from(G)})),A=r.pipe(F(m),U(R=>{const G=new Set;return R.forEach(C=>{C.forEach(z=>{G.add(z.groupLabel)})}),Array.from(G)})),I=new lt(R=>{W({seriesLabels:D,barWidth:P,params:s}).pipe(F(m),B(async G=>G)).subscribe(G=>{const C=qC(G.barWidth,G.seriesLabels,G.params);R.next(C)})}),M=u.pipe(F(m),U(R=>R.transitionDuration),ht()),T=new lt(R=>{W({groupLabels:A,transitionDuration:M}).pipe(B(async G=>G)).subscribe(G=>{const C=XC(G.groupLabels.length,G.transitionDuration);R.next(C)})}).pipe(F(m),ht()),E=new lt(R=>{W({groupLabels:A,transitionDuration:M}).pipe(B(async G=>G)).subscribe(G=>{const C=jC(G.groupLabels.length,G.transitionDuration);R.next(C)})}).pipe(F(m),ht());W({defsSelection:w,gridAxesSize:h}).pipe(F(m),B(async R=>R)).subscribe(R=>{const G=[{id:y,width:R.gridAxesSize.width,height:R.gridAxesSize.height}];KC({defsSelection:R.defsSelection,clipPathData:G})});const L=u.pipe(F(m),U(R=>R.highlightTarget),ht()),N=new rt,O=D.pipe(F(m),U(R=>R.map((G,C)=>oi(t,`lineargradient-${G}`)))),k=W({linearGradientIds:O,computedData:n}).pipe(F(m),B(async R=>R),U(R=>R.computedData.map((G,C)=>G.map((z,X)=>({linearGradientId:R.linearGradientIds[C],...z})))));return W({graphicGSelection:S,defsSelection:w,computedData:n,barData:k,zeroYArr:_,groupLabels:A,barScale:I,params:s,chartParams:u,highlightTarget:L,barWidth:P,delayGroup:T,transitionItem:E,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:p}).pipe(F(m),B(async R=>R)).subscribe(R=>{const G=VC({graphicGSelection:R.graphicGSelection,pathGClassName:x,pathClassName:v,barData:R.barData,zeroYArr:R.zeroYArr,groupLabels:R.groupLabels,barScale:R.barScale,params:R.params,chartParams:R.chartParams,barWidth:R.barWidth,delayGroup:R.delayGroup,transitionItem:R.transitionItem,isSeriesPositionSeprate:R.isSeriesPositionSeprate});ZC({defsSelection:R.defsSelection,barData:R.barData,params:R.params}),G.on("mouseover",(C,z)=>{C.stopPropagation(),g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:R.highlightTarget,datum:z,series:R.SeriesDataMap.get(z.seriesLabel),seriesIndex:z.seriesIndex,seriesLabel:z.seriesLabel,groups:R.GroupDataMap.get(z.groupLabel),groupIndex:z.groupIndex,groupLabel:z.groupLabel,event:C,data:R.computedData})}).on("mousemove",(C,z)=>{C.stopPropagation(),g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:R.highlightTarget,datum:z,series:R.SeriesDataMap.get(z.seriesLabel),seriesIndex:z.seriesIndex,seriesLabel:z.seriesLabel,groups:R.GroupDataMap.get(z.groupLabel),groupIndex:z.groupIndex,groupLabel:z.groupLabel,event:C,data:R.computedData})}).on("mouseout",(C,z)=>{C.stopPropagation(),g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:R.highlightTarget,datum:z,series:R.SeriesDataMap.get(z.seriesLabel),seriesIndex:z.seriesIndex,seriesLabel:z.seriesLabel,groups:R.GroupDataMap.get(z.groupLabel),groupIndex:z.groupIndex,groupLabel:z.groupLabel,event:C,data:R.computedData})}).on("click",(C,z)=>{C.stopPropagation(),g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:R.highlightTarget,datum:z,series:R.SeriesDataMap.get(z.seriesLabel),seriesIndex:z.seriesIndex,seriesLabel:z.seriesLabel,groups:R.GroupDataMap.get(z.groupLabel),groupIndex:z.groupIndex,groupLabel:z.groupLabel,event:C,data:R.computedData})}),N.next(G)}),W({barSelection:N,highlight:f,fullChartParams:u}).pipe(F(m),B(async R=>R)).subscribe(R=>{QC({selection:R.barSelection,ids:R.highlight,fullChartParams:R.fullChartParams})}),()=>{m.next(void 0)}},x2="BarsTriangle",JC=fe(x2,Uh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=v2(x2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existedSeriesLabels$:r.existedSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:r.isSeriesPositionSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}});function tR({graphicGSelection:t,circleGClassName:e,circleClassName:n,data:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=l=>{const h=l.size();return o.transitionDuration/h};let u=0;return t.each((l,h,f)=>{K(f[h]).selectAll("g").data(r[h],d=>d.id).join(d=>(u=s(d),d.append("g").classed(e,!0)),d=>d,d=>d.remove()).attr("transform",d=>`translate(${d.axisX}, ${d.axisY})`).each((d,p,g)=>{K(g[p]).selectAll("circle").data([d]).join(m=>m.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(n,!0).attr("opacity",0).transition().delay((y,x)=>p*u).attr("opacity",1),m=>m.transition().duration(50).attr("opacity",1),m=>m.remove()).attr("r",i.radius).attr("fill",(m,y)=>_h({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,y)=>_h({datum:m,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[h][0]??1}, ${a[h][1]??1})`)})}),t.selectAll(`circle.${n}`)}function eR({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)?K(a[o]).style("opacity",1).transition("highlight").duration(200):K(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function nR({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)=>{K(i[r]).selectAll("rect").data([n]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const _2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existedSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridGraphicReverseScale$:h,gridAxesSize$:f,gridHighlight$:d,gridContainer$:p,event$:g})=>{const m=new rt,y=oi(t,"clipPath-box"),x=at(t,"circleG"),v=at(t,"circle"),b=new rt,{seriesSelection$:$,axesSelection$:w,defsSelection$:S,graphicGSelection$:_}=Ro({selection:e,pluginName:t,clipPathID:y,existedSeriesLabels$:i,gridContainer$:p,gridAxesTransform$:c,gridGraphicTransform$:l}),P=W({computedData:n,gridGraphicReverseScale:h}).pipe(F(m),B(async M=>M),U(M=>M.computedData.map((T,E)=>M.gridGraphicReverseScale[E])));W({defsSelection:S,gridAxesSize:f}).pipe(F(m),B(async M=>M)).subscribe(M=>{const T=[{id:y,width:M.gridAxesSize.width,height:M.gridAxesSize.height}];nR({defsSelection:M.defsSelection,clipPathData:T})});const D=u.pipe(F(m),U(M=>M.highlightTarget),ht());W({graphicGSelection:_,computedData:n,visibleComputedData:r,SeriesDataMap:o,GroupDataMap:a,graphicReverseScale:P,fullChartParams:u,fullParams:s,highlightTarget:D}).pipe(F(m),B(async M=>M)).subscribe(M=>{const T=tR({graphicGSelection:M.graphicGSelection,circleGClassName:x,circleClassName:v,data:M.visibleComputedData,fullParams:M.fullParams,fullChartParams:M.fullChartParams,graphicReverseScale:M.graphicReverseScale});T.on("mouseover",(E,L)=>{E.stopPropagation(),g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:L,series:M.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:M.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:E,data:M.computedData})}).on("mousemove",(E,L)=>{E.stopPropagation(),g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,data:M.computedData,datum:L,series:M.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:M.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:E})}).on("mouseout",(E,L)=>{E.stopPropagation(),g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:L,series:M.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:M.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:E,data:M.computedData})}).on("click",(E,L)=>{E.stopPropagation(),g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:L,series:M.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:M.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:E,data:M.computedData})}),b.next(T)});const A=d.subscribe(),I=s.pipe(F(m),U(M=>M.onlyShowHighlighted),ht());return u.pipe(F(m),B(M=>W({graphicSelection:b,highlight:d,onlyShowHighlighted:I,fullChartParams:u}).pipe(F(m),B(async T=>T)))).subscribe(M=>{eR({selection:M.graphicSelection,ids:M.highlight,onlyShowHighlighted:M.onlyShowHighlighted,fullChartParams:M.fullChartParams})}),()=>{m.next(void 0),A.unsubscribe()}},w2="Dots",rR=fe(w2,Gh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=_2(w2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existedSeriesLabels$:r.existedSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,event$:n.event$});return()=>{i.next(void 0),o()}}),iR={listRectWidth:14,listRectHeight:14,listRectRadius:0},Pu=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o})=>{const a=at(t,"root-position"),s=at(t,"legend-card"),u=at(t,"legend-list"),c=at(t,"legend-item"),l=new rt,h=W({seriesLabels:n,fullChartParams:o}).pipe(F(l),B(async _=>_),U(_=>{const P=new Map;let D=0;return _.seriesLabels.forEach((A,I)=>{if(!P.has(A)){const M=SC(D,_.fullChartParams);P.set(A,M),D++}}),P})),f=n.pipe(F(l),U(_=>{const P=new Set;let D=[];return _.forEach(A=>{P.has(A)?D.push(!1):D.push(!0),P.add(A)}),D})),d=r.pipe(F(l),U(_=>_.position==="bottom"||_.position==="top"?"row":"column")),p=W({fullParams:r,layout:i}).pipe(F(l),B(async _=>_),U(_=>{const P=_.fullParams.padding*2+_.fullParams.gap*2;return _.fullParams.position==="bottom"||_.fullParams.position==="top"?_.layout.rootWidth-P:_.layout.rootHeight-P})),m=W({layout:i,fullParams:r}).pipe(F(l),B(async _=>_),U(_=>{let P=0,D=0;return _.fullParams.position==="bottom"?(D=_.layout.rootHeight,_.fullParams.justify==="start"?P=0:_.fullParams.justify==="center"?P=_.layout.rootWidth/2:_.fullParams.justify==="end"&&(P=_.layout.rootWidth)):_.fullParams.position==="right"?(P=_.layout.rootWidth,_.fullParams.justify==="start"?D=0:_.fullParams.justify==="center"?D=_.layout.rootHeight/2:_.fullParams.justify==="end"&&(D=_.layout.rootHeight)):_.fullParams.position==="top"?(D=0,_.fullParams.justify==="start"?P=0:_.fullParams.justify==="center"?P=_.layout.rootWidth/2:_.fullParams.justify==="end"&&(P=_.layout.rootWidth)):_.fullParams.position==="left"&&(P=0,_.fullParams.justify==="start"?D=0:_.fullParams.justify==="center"?D=_.layout.rootHeight/2:_.fullParams.justify==="end"&&(D=_.layout.rootHeight)),{x:P,y:D}})).pipe(F(l),U(_=>e.selectAll(`g.${a}`).data([_]).join(P=>P.append("g").classed(a,!0).attr("transform",D=>`translate(${D.x}, ${D.y})`),P=>P.transition().attr("transform",D=>`translate(${D.x}, ${D.y})`),P=>P.remove()))),y=r.pipe(F(l),U(_=>_.seriesList[0]?_.seriesList[0]:iR)),x=W({visibleList:f,fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:d,lineMaxSize:p,defaultListStyle:y,SeriesLabelColorMap:h}).pipe(F(l),B(async _=>_),U(_=>_.seriesLabels.reduce((P,D,A)=>{if(!_.visibleList[A])return P;const I=a2(D,_.fullChartParams.styles.textSize),M=_.fullChartParams.styles.textSize*1.5+I,T=_.SeriesLabelColorMap.get(D),E=P[0]&&P[0][0]?P[P.length-1][P[P.length-1].length-1]:null,{translateX:L,translateY:N,lineIndex:O,itemIndex:k}=((G,C,z)=>{let X=0,H=0,j=0,J=0;if(G.lineDirection==="column"){let dt=z?z.translateY+G.fullChartParams.styles.textSize+G.fullParams.gap:0;if(dt+G.fullChartParams.styles.textSize>G.lineMaxSize){j=z.lineIndex+1,J=0,H=0;const q=C[C.length-1].reduce((nt,st)=>st.itemWidth>nt?st.itemWidth:nt,0);X=z.translateX+q+G.fullParams.gap}else j=z?z.lineIndex:0,J=z?z.itemIndex+1:0,H=dt,X=z?z.translateX:0}else{let dt=z?z.translateX+z.itemWidth+G.fullParams.gap:0;dt+M>G.lineMaxSize?(j=z.lineIndex+1,J=0,X=0):(j=z?z.lineIndex:0,J=z?z.itemIndex+1:0,X=dt),H=(G.fullChartParams.styles.textSize+G.fullParams.gap)*j}return{translateX:X,translateY:H,lineIndex:j,itemIndex:J}})(_,P,E);P[O]||(P[O]=[]);const R=_.fullParams.seriesList[k]?_.fullParams.seriesList[k]:_.defaultListStyle;return P[O].push({id:D,seriesLabel:D,seriesIndex:A,lineIndex:O,itemIndex:k,text:D,itemWidth:M,translateX:L,translateY:N,color:T,listRectWidth:R.listRectWidth,listRectHeight:R.listRectHeight,listRectRadius:R.listRectRadius}),P},[])),Ye(1)),v=W({fullParams:r,fullChartParams:o,lineDirection:d,lengendItems:x}).pipe(F(l),B(async _=>_),U(_=>{const{width:P,height:D}=((A,I)=>{let M=0,T=0;if(!I.length||!I[0].length)return{width:M,height:T};const E=I[0][I[0].length-1];return A.lineDirection==="column"?(M=I.reduce((L,N)=>{const O=N.reduce((k,R)=>R.itemWidth>k?R.itemWidth:k,0);return L+O},0),M+=A.fullParams.gap*(I.length-1),T=E.translateY+A.fullChartParams.styles.textSize):(M=E.translateX+E.itemWidth,T=A.fullChartParams.styles.textSize*I.length+A.fullParams.gap*(I.length-1)),{width:M,height:T}})(_,_.lengendItems);return{direction:_.lineDirection,width:P,height:D,translateX:_.fullParams.gap,translateY:_.fullParams.gap}}),Ye(1)),b=W({fullParams:r,lengendList:v}).pipe(F(l),B(async _=>_),U(_=>{const P=_.lengendList.width+_.fullParams.gap*2,D=_.lengendList.height+_.fullParams.gap*2;let A=0,I=0;return _.fullParams.position==="left"?_.fullParams.justify==="start"?(A=_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="center"?(A=_.fullParams.padding,I=-D/2):_.fullParams.justify==="end"&&(A=_.fullParams.padding,I=-D-_.fullParams.padding):_.fullParams.position==="right"?_.fullParams.justify==="start"?(A=-P-_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="center"?(A=-P-_.fullParams.padding,I=-D/2):_.fullParams.justify==="end"&&(A=-P-_.fullParams.padding,I=-D-_.fullParams.padding):_.fullParams.position==="top"?_.fullParams.justify==="start"?(A=_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="center"?(A=-P/2,I=_.fullParams.padding):_.fullParams.justify==="end"&&(A=-P-_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="start"?(A=_.fullParams.padding,I=-D-_.fullParams.padding):_.fullParams.justify==="center"?(A=-P/2,I=-D-_.fullParams.padding):_.fullParams.justify==="end"&&(A=-P-_.fullParams.padding,I=-D-_.fullParams.padding),{width:P,height:D,translateX:A,translateY:I}})),$=W({rootPositionSelection:m,fullParams:r,fullChartParams:o,legendCard:b}).pipe(F(l),B(async _=>_),U(_=>_.rootPositionSelection.selectAll("g").data([_.legendCard]).join(P=>P.append("g").classed(s,!0).attr("transform",D=>`translate(${D.translateX}, ${D.translateY})`),P=>P.transition().attr("transform",D=>`translate(${D.translateX}, ${D.translateY})`),P=>P.remove()).each((P,D,A)=>{K(A[D]).selectAll("rect").data([P]).join("rect").attr("width",I=>I.width).attr("height",I=>I.height).attr("fill",It(_.fullParams.backgroundFill,_.fullChartParams)).attr("stroke",It(_.fullParams.backgroundStroke,_.fullChartParams))}))),w=W({lengendCardSelection:$,fullParams:r,lengendList:v}).pipe(F(l),B(async _=>_),U(_=>_.lengendCardSelection.selectAll("g").data([_.lengendList]).join(P=>P.append("g").classed(u,!0).attr("transform",D=>`translate(${D.translateX}, ${D.translateY})`),P=>P.transition().attr("transform",D=>`translate(${D.translateX}, ${D.translateY})`),P=>P.remove())));return W({lengendListSelection:w,fullParams:r,fullChartParams:o,lengendItems:x}).pipe(F(l),B(async _=>_),U(_=>{const P=_.lengendItems[0]?_.lengendItems.flat():[];return _.lengendListSelection.selectAll(`g.${c}`).data(P).join(D=>D.append("g").classed(c,!0).attr("cursor","default"),D=>D,D=>D.remove()).attr("transform",(D,A)=>`translate(${D.translateX}, ${D.translateY})`).each((D,A,I)=>{const M=_.fullChartParams.styles.textSize/2,T=-D.listRectWidth/2,E=-D.listRectHeight/2;K(I[A]).selectAll("rect").data([D]).join("rect").attr("x",M).attr("y",M).attr("width",L=>L.listRectWidth).attr("height",L=>L.listRectHeight).attr("transform",L=>`translate(${T}, ${E})`).attr("fill",L=>L.color).attr("rx",L=>L.listRectRadius),K(I[A]).selectAll("text").data([D]).join(L=>L.append("text").attr("dominant-baseline","hanging"),L=>L,L=>L.remove()).attr("x",_.fullChartParams.styles.textSize*1.5).attr("font-size",_.fullChartParams.styles.textSize).text(L=>L.text)})})).subscribe(),()=>{l.next(void 0)}},$2="GridLegend",oR=fe($2,Hh)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new rt,o=n.SeriesDataMap$.pipe(F(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(F(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Pu($2,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}}),$h=6;function aR({selection:t,xAxisClassName:e,groupingLabelClassName:n,params:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,chartParams:u,groupScale:c,textTransform:l}){const h=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((p,g,m)=>{K(m[g]).selectAll("text").data([p]).join(y=>y.append("text").style("font-weight","bold"),y=>y,y=>y.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).style("font-size",`${u.styles.textSize}px`).style("fill",It(r.labelColorType,u)).style("transform",l).text(y=>s.grid.groupAxis.label)}).attr("transform",p=>`translate(${a.width+p.tickPadding+r.labelOffset[0]}, ${-p.tickPadding-$h-r.labelOffset[1]})`);const f=kp(c).scale(c).tickSize(r.tickFullLine==!0?-a.height:$h).tickSizeOuter(0).tickFormat(p=>xh(p,r.tickFormat)).tickPadding(r.tickPadding),d=h.transition().duration(100).call(f);return d.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?It(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),d.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?It(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),h.selectAll("text").style("font-family","sans-serif").style("font-size",`${u.styles.textSize}px`).style("color",It(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`0 -${r.tickPadding+$h}`).style("transform",l),h}const S2=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainer$:c,isSeriesPositionSeprate$:l})=>{const h=new rt,f=at(t,"container"),d=at(t,"xAxisG"),p=at(t,"xAxis"),g=at(t,"groupingLabel"),m=W({computedData:n.pipe(ht((w,S)=>w.length===S.length)),isSeriesPositionSeprate:l}).pipe(F(h),B(async w=>w),U(w=>w.isSeriesPositionSeprate?w.computedData:[w.computedData[0]]),U((w,S)=>e.selectAll(`g.${f}`).data(w,_=>_[0]?_[0].seriesIndex:S).join("g").classed(f,!0))),y=m.pipe(F(h),U((w,S)=>w.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));W({containerSelection:m,gridContainer:c}).pipe(F(h),B(async w=>w)).subscribe(w=>{w.containerSelection.attr("transform",(S,_)=>{const P=w.gridContainer[_]??w.gridContainer[0],D=P.translate,A=P.scale;return`translate(${D[0]}, ${D[1]}) scale(${A[0]}, ${A[1]})`})}),W({axisSelection:y,gridAxesTransform:a}).pipe(F(h),B(async w=>w)).subscribe(w=>{w.axisSelection.style("transform",w.gridAxesTransform.value)});const x=W({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainer:c}).pipe(F(h),B(async w=>w),U(w=>{const S=`translate(${w.gridAxesReverseTransform.translate[0]}px, ${w.gridAxesReverseTransform.translate[1]}px)`,_=`rotate(${w.gridAxesReverseTransform.rotate}deg) rotateX(${w.gridAxesReverseTransform.rotateX}deg) rotateY(${w.gridAxesReverseTransform.rotateY}deg)`,P=`scale(${1/w.gridContainer[0].scale[0]}, ${1/w.gridContainer[0].scale[1]})`,A=`rotate(${w.fullDataFormatter.grid.groupAxis.position==="left"&&w.fullDataFormatter.grid.valueAxis.position==="top"||w.fullDataFormatter.grid.groupAxis.position==="right"&&w.fullDataFormatter.grid.valueAxis.position==="bottom"?w.fullParams.tickTextRotate+180:w.fullParams.tickTextRotate}deg)`;return`${S} ${_} ${P} ${A}`}),ht()),v=new lt(w=>{W({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(F(h),B(async S=>S)).subscribe(S=>{const P=S.computedData[0]?S.computedData[0].length-1:0,D=S.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-S.fullDataFormatter.grid.groupAxis.scalePadding:S.fullDataFormatter.grid.groupAxis.scaleDomain[0]-S.fullDataFormatter.grid.groupAxis.scalePadding,A=S.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?P+S.fullDataFormatter.grid.groupAxis.scalePadding:S.fullDataFormatter.grid.groupAxis.scaleDomain[1]+S.fullDataFormatter.grid.groupAxis.scalePadding,I=S.computedData[0]?S.computedData[0].length:0;let M=(S.computedData[0]??[]).map(N=>N.groupLabel);const T=new Array(I).fill(0).map((N,O)=>M[O]!=null?M[O]:String(O)).filter((N,O)=>O>=D&&O<=A),E=S.fullDataFormatter.grid.groupAxis.scalePadding,L=np({axisLabels:T,axisWidth:S.gridAxesSize.width,padding:E});w.next(L)})}),b=W({fullDataFormatter:i,fullParams:r}).pipe(F(h),B(async w=>w),U(w=>{let S="middle",_="hanging";return w.fullDataFormatter.grid.groupAxis.position==="bottom"?(S=w.fullParams.tickTextRotate?"end":"middle",_="hanging"):w.fullDataFormatter.grid.groupAxis.position==="top"?(S=w.fullParams.tickTextRotate?"end":"middle",_="auto"):w.fullDataFormatter.grid.groupAxis.position==="left"?(S="end",_="middle"):w.fullDataFormatter.grid.groupAxis.position==="right"&&(S="start",_="middle"),{textAnchor:S,dominantBaseline:_}})),$=i.pipe(F(h),U(w=>{let S="start",_="hanging";return w.grid.groupAxis.position==="bottom"?_="hanging":w.grid.groupAxis.position==="top"?_="auto":w.grid.groupAxis.position==="left"?S="end":w.grid.groupAxis.position==="right"&&(S="start"),w.grid.valueAxis.position==="left"?S="start":w.grid.valueAxis.position==="right"?S="end":w.grid.valueAxis.position==="bottom"?_="auto":w.grid.valueAxis.position==="top"&&(_="hanging"),{textAnchor:S,dominantBaseline:_}}));return W({axisSelection:y,params:r,tickTextAlign:b,axisLabelAlign:$,gridAxesSize:u,fullDataFormatter:i,chartParams:o,groupScale:v,textTransform:x}).pipe(F(h),B(async w=>w)).subscribe(w=>{aR({selection:w.axisSelection,xAxisClassName:p,groupingLabelClassName:g,params:w.params,tickTextAlign:w.tickTextAlign,axisLabelAlign:w.axisLabelAlign,gridAxesSize:w.gridAxesSize,fullDataFormatter:w.fullDataFormatter,chartParams:w.chartParams,groupScale:w.groupScale,textTransform:w.textTransform})}),()=>{h.next(void 0)}},A2="GroupAxis",sR=fe(A2,Bh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=S2(A2,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainer$:n.gridContainer$,isSeriesPositionSeprate$:n.isSeriesPositionSeprate$});return()=>{i.next(void 0),o()}}),M2=6;function uR({selection:t,yAxisClassName:e,textClassName:n,fullParams:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,fullChartParams:u,valueScale:c,textTransform:l,minAndMax:h}){const f=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((y,x,v)=>{K(v[x]).selectAll("text").data([y]).join(b=>b.append("text").style("font-weight","bold"),b=>b,b=>b.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).style("font-size",`${u.styles.textSize}px`).style("fill",It(r.labelColorType,u)).style("transform",l).text(b=>s.grid.valueAxis.label)}).attr("transform",y=>`translate(${-y.tickPadding+r.labelOffset[0]}, ${a.height+y.tickPadding+r.labelOffset[1]})`);const d=h[1]-h[0],p=Cp(c).scale(c).ticks(d>r.ticks?r.ticks:h[0]===0&&h[1]===0?1:Math.ceil(d)).tickFormat(y=>xh(y,r.tickFormat)).tickSize(r.tickFullLine==!0?-a.width:M2).tickPadding(r.tickPadding),g=f.transition().duration(100).call(p);return g.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?It(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),g.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?It(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),f.selectAll("text").style("font-family","sans-serif").style("font-size",`${u.styles.textSize}px`).style("color",It(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`-${r.tickPadding+M2} 0`).style("transform",l),f}const Du=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainer$:c,isSeriesPositionSeprate$:l})=>{const h=new rt,f=at(t,"container"),d=at(t,"yAxisG"),p=at(t,"yAxis"),g=at(t,"text"),m=W({computedData:n.pipe(ht((S,_)=>S.length===_.length)),isSeriesPositionSeprate:l}).pipe(F(h),B(async S=>S),U(S=>S.isSeriesPositionSeprate?S.computedData:[S.computedData[0]]),U((S,_)=>e.selectAll(`g.${f}`).data(S,P=>P[0]?P[0].seriesIndex:_).join("g").classed(f,!0))),y=m.pipe(F(h),U((S,_)=>S.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));W({containerSelection:m,gridContainer:c}).pipe(F(h),B(async S=>S)).subscribe(S=>{S.containerSelection.attr("transform",(_,P)=>{const D=S.gridContainer[P]??S.gridContainer[0],A=D.translate,I=D.scale;return`translate(${A[0]}, ${A[1]}) scale(${I[0]}, ${I[1]})`})}),W({axisSelection:y,gridAxesTransform:a}).pipe(F(h),B(async S=>S)).subscribe(S=>{S.axisSelection.style("transform",S.gridAxesTransform.value)});const x=W({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainer:c}).pipe(F(h),B(async S=>S),U(S=>{const _=`translate(${S.gridAxesReverseTransform.translate[0]}px, ${S.gridAxesReverseTransform.translate[1]}px)`,P=`rotate(${S.gridAxesReverseTransform.rotate}deg) rotateX(${S.gridAxesReverseTransform.rotateX}deg) rotateY(${S.gridAxesReverseTransform.rotateY}deg)`,D=`scale(${1/S.gridContainer[0].scale[0]}, ${1/S.gridContainer[0].scale[1]})`,I=`rotate(${S.fullDataFormatter.grid.groupAxis.position==="left"&&S.fullDataFormatter.grid.valueAxis.position==="top"||S.fullDataFormatter.grid.groupAxis.position==="right"&&S.fullDataFormatter.grid.valueAxis.position==="bottom"?S.fullParams.tickTextRotate+180:S.fullParams.tickTextRotate}deg)`;return`${_} ${P} ${D} ${I}`}),ht()),v=new lt(S=>{W({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(F(h),B(async _=>_)).subscribe(_=>{const D=_.computedData[0]?_.computedData[0].length-1:0,A=_.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-_.fullDataFormatter.grid.groupAxis.scalePadding:_.fullDataFormatter.grid.groupAxis.scaleDomain[0]-_.fullDataFormatter.grid.groupAxis.scalePadding,I=_.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?D+_.fullDataFormatter.grid.groupAxis.scalePadding:_.fullDataFormatter.grid.groupAxis.scaleDomain[1]+_.fullDataFormatter.grid.groupAxis.scalePadding,M=_.computedData.map((E,L)=>E.filter((N,O)=>O>=A&&O<=I)),T=$C(M.flat());S.next(T)})}),b=new lt(S=>{W({fullDataFormatter:i,gridAxesSize:u,minAndMax:v}).pipe(F(h),B(async _=>_)).subscribe(_=>{console.log(_);const P=ep({maxValue:_.minAndMax[1],minValue:_.minAndMax[0],axisWidth:_.gridAxesSize.height,scaleDomain:_.fullDataFormatter.grid.valueAxis.scaleDomain,scaleRange:_.fullDataFormatter.grid.valueAxis.scaleRange});S.next(P)})}),$=i.pipe(F(h),U(S=>{let _="start",P="hanging";return S.grid.valueAxis.position==="left"?(_="end",P="middle"):S.grid.valueAxis.position==="right"?(_="start",P="middle"):S.grid.valueAxis.position==="bottom"?(_="middle",P="hanging"):S.grid.valueAxis.position==="top"&&(_="middle",P="auto"),{textAnchor:_,dominantBaseline:P}})),w=i.pipe(F(h),U(S=>{let _="start",P="hanging";return S.grid.groupAxis.position==="bottom"?P="auto":S.grid.groupAxis.position==="top"?P="hanging":S.grid.groupAxis.position==="left"?_="start":S.grid.groupAxis.position==="right"&&(_="end"),S.grid.valueAxis.position==="left"?_="end":S.grid.valueAxis.position==="right"?_="start":S.grid.valueAxis.position==="bottom"?P="hanging":S.grid.valueAxis.position==="top"&&(P="auto"),{textAnchor:_,dominantBaseline:P}}));return W({axisSelection:y,fullParams:r,tickTextAlign:$,axisLabelAlign:w,computedData:n,gridAxesSize:u,fullDataFormatter:i,fullChartParams:o,valueScale:b,textTransform:x,minAndMax:v}).pipe(F(h),B(async S=>S)).subscribe(S=>{uR({selection:S.axisSelection,yAxisClassName:p,textClassName:g,fullParams:S.fullParams,tickTextAlign:S.tickTextAlign,axisLabelAlign:S.axisLabelAlign,gridAxesSize:S.gridAxesSize,fullDataFormatter:S.fullDataFormatter,fullChartParams:S.fullChartParams,valueScale:S.valueScale,textTransform:S.textTransform,minAndMax:S.minAndMax})}),()=>{h.next(void 0)}},T2="ValueAxis",cR=fe(T2,Lu)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=Du(T2,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainer$:n.gridContainer$,isSeriesPositionSeprate$:n.isSeriesPositionSeprate$});return()=>{i.next(void 0),o()}}),P2="ValueStackAxis",lR=fe(P2,Yh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=n.computedData$.pipe(F(i),U(s=>{const u=new Array(s[0]?s[0].length:0).fill(null).map((l,h)=>s.reduce((f,d)=>{if(d&&d[h]){const p=d[h].value==null||d[h].visible==!1?0:d[h].value;return f+p}return f},0));return s.map((l,h)=>l.map((f,d)=>({...f,value:u[d]})))})),a=Du(P2,{selection:t,computedData$:n.isSeriesPositionSeprate$.pipe(B(s=>vd(()=>s,n.computedData$,o))),fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainer$:n.gridContainer$,isSeriesPositionSeprate$:n.isSeriesPositionSeprate$});return()=>{i.next(void 0),a()}}),D2="ScalingArea",fR=at(D2,"rect"),hR=fe(D2,Wh)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new rt,a=e.insert("rect","g").classed(fR,!0).attr("opacity",0);let s={k:1,x:0,y:0};r.layout$.pipe(F(o)).subscribe(c=>{a.attr("width",c.width).attr("height",c.height).attr("x",c.left).attr("y",c.top)});const u=r.computedData$.pipe(U(c=>c[0]?c[0].length-1:0),ht());return W({initGroupAxis:r.fullDataFormatter$.pipe(U(c=>c.grid.groupAxis),li()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:u,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(F(o),B(async c=>c)).subscribe(c=>{const h=c.groupMaxIndex,f=c.initGroupAxis.scaleDomain[0]==="auto"?0-c.initGroupAxis.scalePadding:c.initGroupAxis.scaleDomain[0]-c.initGroupAxis.scalePadding,d=c.initGroupAxis.scaleDomain[1]==="auto"?h+c.initGroupAxis.scalePadding:c.initGroupAxis.scaleDomain[1]+c.initGroupAxis.scalePadding,p=c.fullDataFormatter.grid.valueAxis.position==="left"||c.fullDataFormatter.grid.valueAxis.position==="top"?[0,1]:[1,0],m=ep({maxValue:c.groupMaxIndex,minValue:0,axisWidth:c.axisSize.width,scaleDomain:[f,d],scaleRange:p}).copy(),y=r2().on("zoom",function(v){const b=v.transform,$=S=>{const _=Math.round(S);return Math.min(h,Math.max(0,_))},w=c.fullDataFormatter.grid.groupAxis.position==="bottom"||c.fullDataFormatter.grid.groupAxis.position==="top"?b.rescaleX(m).domain().map($):b.rescaleY(m).domain().map($);w[0]<=0&&w[1]>=h?b.k<s.k&&(b.k=s.k,b.x=s.x,b.y=s.y):w[1]-w[0]<=1&&b.k>s.k&&(b.k=s.k,b.x=s.x,b.y=s.y),s.k=b.k,s.x=b.x,s.y=b.y,i.dataFormatter$.next({...c.fullDataFormatter,grid:{...c.fullDataFormatter.grid,groupAxis:{...c.fullDataFormatter.grid.groupAxis,scaleDomain:w}}})});e.call(y)}),()=>{o.next(void 0),a.remove()}});function dR(t,e){let n=new lt(()=>{});return t.each(function(){const r=Yu(this,e);n=Wu(n,r)}),n}const Sh="GroupAux",Ah=at(Sh,"label-box");function pR({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function gR({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",c=>It(r.lineColorType,i)).style("stroke-width",1).style("stroke-dasharray",r.lineDashArray??"none").style("pointer-events","none"),u=a.merge(s);return a.exit().remove(),s.attr("x1",c=>c.x1).attr("y1",c=>c.y1).attr("x2",c=>c.x2).attr("y2",c=>c.y2),a.transition().duration(50).attr("x1",c=>c.x1).attr("y1",c=>c.y1).attr("x2",c=>c.x2).attr("y2",c=>c.y2),u}function mR(t){t.selectAll("line").data([]).exit().remove()}function yR({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:xh(t,n.labelTextFormat)}]:[]}function bR({selection:t,labelData:e,fullParams:n,fullChartParams:r,gridAxesReverseTransformValue:i}){const o=r.styles.textSize+4,a=t.selectAll(`g.${Ah}`).data(e),s=a.enter().append("g").classed(Ah,!0).style("cursor","pointer"),u=s.merge(a);return s.attr("transform",(c,l)=>`translate(${c.x}, ${c.y})`),a.transition().duration(50).attr("transform",(c,l)=>`translate(${c.x}, ${c.y})`),a.exit().remove(),u.each((c,l,h)=>{const f=a2(c.text,r.styles.textSize)+12,d=-f/2,p=K(h[l]).selectAll("rect").data([c]),g=p.enter().append("rect").attr("height",`${o}px`).attr("fill",x=>It(n.labelColorType,r)).attr("x",d).attr("y",-2).attr("rx",5).attr("ry",5).style("cursor","pointer");p.merge(g).attr("width",x=>`${f}px`).style("transform",i),p.exit().remove();const m=K(h[l]).selectAll("text").data([c]),y=m.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");m.merge(y).text(x=>x.text).style("transform",i).attr("fill",x=>It(n.labelTextColorType,r)).attr("font-size",r.styles.textSize).attr("x",d+6),m.exit().remove()}),u}function vR(t){t.selectAll(`g.${Ah}`).data([]).exit().remove()}const xR=fe(Sh,zh)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new rt,a=e.insert("rect","g").classed(at(Sh,"rect"),!0).attr("opacity",0),s=t.append("g");i.layout$.pipe(F(o)).subscribe(f=>{a.attr("width",f.rootWidth).attr("height",f.rootHeight)}),i.gridAxesTransform$.pipe(F(o),U(f=>f.value),ht()).subscribe(f=>{s.style("transform",f)});const u=new lt(f=>{W({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(F(o),B(async d=>d)).subscribe(d=>{const g=d.computedData[0]?d.computedData[0].length-1:0,m=d.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-d.fullDataFormatter.grid.groupAxis.scalePadding:d.fullDataFormatter.grid.groupAxis.scaleDomain[0]-d.fullDataFormatter.grid.groupAxis.scalePadding,y=d.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?g+d.fullDataFormatter.grid.groupAxis.scalePadding:d.fullDataFormatter.grid.groupAxis.scaleDomain[1]+d.fullDataFormatter.grid.groupAxis.scalePadding,x=d.computedData[0]?d.computedData[0].length:0;let v=d.fullDataFormatter.grid.gridData.seriesDirection==="row"?(d.computedData[0]??[]).map(S=>S.groupLabel):d.computedData.map(S=>S[0].groupLabel);const b=new Array(x).fill(0).map((S,_)=>v[_]!=null?v[_]:String(_)).filter((S,_)=>_>=m&&_<=y),$=d.fullDataFormatter.grid.groupAxis.scalePadding,w=np({axisLabels:b,axisWidth:d.gridAxesSize.width,padding:$});f.next(w)})}),c=s2({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),l=i.fullChartParams$.pipe(F(o),U(f=>f.highlightTarget),ht());return W({computedData:i.computedData$,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:l,SeriesDataMap:i.SeriesDataMap$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:c,groupScale:u}).pipe(F(o),B(async f=>f)).subscribe(f=>{e.on("mouseover",(d,p)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})}).on("mousemove",(d,p)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})}).on("mouseout",(d,p)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})}).on("click",(d,p)=>{d.stopPropagation();const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})})}),W({event:r.event$.pipe(Uo(f=>f.eventName==="mouseover"||f.eventName==="mousemove")),computedData:i.computedData$,groupScale:u,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:l,gridAxesReverseTransform:i.gridAxesReverseTransform$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:c}).pipe(F(o),B(async f=>f)).subscribe(f=>{const d=f.groupScale(f.event.groupLabel)??0,p=pR({groupLabel:f.event.groupLabel,axisX:d,axisHeight:f.gridAxesSize.height,fullParams:f.fullParams});gR({selection:s,pluginName:n,lineData:p,fullParams:f.fullParams,fullChartParams:f.fullChartParams});const g=yR({groupLabel:f.event.groupLabel,axisX:d,fullParams:f.fullParams});bR({selection:s,labelData:g,fullParams:f.fullParams,fullChartParams:f.fullChartParams,gridAxesReverseTransformValue:f.gridAxesReverseTransform.value}).on("mouseover",(y,x)=>{const{groupIndex:v,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:v,groupLabel:b,event:y,data:f.computedData})}).on("mousemove",(y,x)=>{const{groupIndex:v,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:v,groupLabel:b,event:y,data:f.computedData})}).on("mouseout",(y,x)=>{const{groupIndex:v,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:v,groupLabel:b,event:y,data:f.computedData})}).on("click",(y,x)=>{const{groupIndex:v,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:v,groupLabel:b,event:y,data:f.computedData})})}),dR(a,"mouseout").pipe(F(o)).subscribe(f=>{console.log("rootMouseout"),mR(s),vR(s)}),()=>{o.next(void 0),a.remove()}}),L2={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}]},E2={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]},k2={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]},C2={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1,gridIndexes:[0]},R2={barWidth:0,barGroupPadding:10,barRadius:!1,gridIndexes:[0]},I2={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0],gridIndexes:[0]},N2={lineCurve:"curveLinear",lineWidth:2,gridIndexes:[1]},F2={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1,gridIndexes:[1]},G2={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]},z2="MultiGridLegend",_R=Xe(z2,L2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new rt,o=n.multiGridEachDetail$.pipe(F(i),U(c=>c.map((h,f)=>h.SeriesDataMap$.pipe(U(d=>Array.from(d.keys()))))),B(c=>W(c)),U(c=>c.flat())),a=W({fullParams:n.fullParams$,multiGrid:n.multiGridEachDetail$,computedData:n.computedData$}).pipe(F(i),B(async c=>c),U(c=>c.computedData.map((l,h)=>{const f=fc(c.fullParams.gridList[h]??{},{listRectWidth:c.fullParams.listRectWidth,listRectHeight:c.fullParams.listRectHeight,listRectRadius:c.fullParams.listRectRadius});return l.map(d=>f)}).flat())),s=W({fullParams:n.fullParams$,seriesList:a}).pipe(F(i),B(async c=>c),U(c=>({...c.fullParams,seriesList:c.seriesList}))),u=Pu(z2,{rootSelection:e,seriesLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),u()}}),$n=t=>{const e=t.fullParams$.pipe(U(r=>r.gridIndexes),ht(),Ye(1)),n=new rt;return e.pipe(U(r=>r.map(i=>{n.next(void 0);const o=ci(i).pipe(F(n),Ye(1)),a=W({computedData:t.computedData$,gridIndex:o}).pipe(F(n),U($=>$.computedData[$.gridIndex]??$.computedData[0])),s=W({fullDataFormatter:t.fullDataFormatter$,gridIndex:o}).pipe(F(n),U($=>{const w=$.fullDataFormatter.gridList[0];return{type:"grid",grid:{...$.fullDataFormatter.gridList[$.gridIndex]??w},container:{...$.fullDataFormatter.container}}})),u=W({multiGridEachDetail:t.multiGridEachDetail$,gridIndex:o}).pipe(F(n),B(async $=>$),U($=>$.multiGridEachDetail[$.gridIndex]??$.multiGridEachDetail[0]),Ye(1)),c=u.pipe(B($=>$.isSeriesPositionSeprate$)),l=u.pipe(B($=>$.gridContainer$)),h=u.pipe(B($=>$.gridAxesTransform$)),f=u.pipe(B($=>$.gridAxesReverseTransform$)),d=u.pipe(B($=>$.gridAxesSize$)),p=u.pipe(B($=>$.gridGraphicTransform$)),g=u.pipe(B($=>$.gridGraphicReverseScale$)),m=u.pipe(B($=>$.gridHighlight$)),y=u.pipe(B($=>$.existedSeriesLabels$)),x=u.pipe(B($=>$.SeriesDataMap$)),v=u.pipe(B($=>$.GroupDataMap$)),b=u.pipe(B($=>$.visibleComputedData$));return{gridComputedData$:a,gridDataFormatter$:s,gridAxesTransform$:h,gridGraphicTransform$:p,gridGraphicReverseScale$:g,gridAxesReverseTransform$:f,gridAxesSize$:d,gridHighlight$:m,existedSeriesLabels$:y,SeriesDataMap$:x,GroupDataMap$:v,visibleComputedData$:b,isSeriesPositionSeprate$:c,gridContainer$:l}})))},Mh="MultiBars",O2=at(Mh,"grid"),wR=Xe(Mh,C2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return $n(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${O2}`).data(s).join("g").attr("class",O2).each((u,c,l)=>{const h=K(l[c]);o[c]=wh(Mh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existedSeriesLabels$:u.existedSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Th="MultiBarStack",U2=at(Th,"grid"),$R=Xe(Th,R2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return $n(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${U2}`).data(s).join("g").attr("class",U2).each((u,c,l)=>{const h=K(l[c]);o[c]=g2(Th,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existedSeriesLabels$:u.existedSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:u.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Ph="MultiBarsTriangle",B2=at(Ph,"grid"),SR=Xe(Ph,I2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return $n(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${B2}`).data(s).join("g").attr("class",B2).each((u,c,l)=>{const h=K(l[c]);o[c]=v2(Ph,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existedSeriesLabels$:u.existedSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Dh="MultiLines",Y2=at(Dh,"grid"),AR=Xe(Dh,N2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return $n(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Y2}`).data(s).join("g").attr("class",Y2).each((u,c,l)=>{const h=K(l[c]);o[c]=u2(Dh,{selection:h,computedData$:u.gridComputedData$,existedSeriesLabels$:u.existedSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullDataFormatter$:u.gridDataFormatter$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Lh="MultiDots",W2=at(Lh,"grid"),MR=Xe(Lh,F2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return $n(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${W2}`).data(s).join("g").attr("class",W2).each((u,c,l)=>{const h=K(l[c]);o[c]=_2(Lh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existedSeriesLabels$:u.existedSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Eh="MultiGroupAxis",H2=at(Eh,"grid"),TR=Xe(Eh,E2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return $n(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${H2}`).data(s).join("g").attr("class",H2).each((u,c,l)=>{const h=K(l[c]);o[c]=S2(Eh,{selection:h,computedData$:u.gridComputedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),kh="MultiValueAxis",q2=at(kh,"grid"),PR=Xe(kh,k2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return $n(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${q2}`).data(s).join("g").attr("class",q2).each((u,c,l)=>{const h=K(l[c]);o[c]=Du(kh,{selection:h,computedData$:u.gridComputedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$})})}),()=>{i.next(void 0),o.forEach(s=>s())}});function X2(t,e,n,r){const{gap:i,rowAmount:o,columnAmount:a}=e,s=(t.width-i*(a-1))/a,u=(t.height-i*(o-1))/o,c=r*s+r*i,l=n*u+n*i,h=[c,l],f=[s/t.width,u/t.height];return{translate:h,scale:f}}const DR=({fullDataFormatter$:t,layout$:e})=>{const n=new rt;function r({xAxis:i,yAxis:o,width:a,height:s}){if(!i||!o)return{translate:[0,0],scale:[1,1],rotate:0,rotateX:0,rotateY:0,value:""};let u=0,c=0,l=0,h=0,f=0;return i.position==="bottom"?o.position==="left"?(h=180,c=s):o.position==="right"?(h=180,f=180,u=a,c=s):(h=180,c=s):i.position==="top"?o.position==="left"||(o.position==="right"?(f=180,u=a):(h=180,c=s)):i.position==="left"?o.position==="bottom"?(l=-90,c=s):o.position==="top"?(l=-90,f=180):(h=180,c=s):i.position==="right"&&(o.position==="bottom"?(l=-90,h=180,c=s,u=a):o.position==="top"?(l=-90,h=180,f=180,u=a):(h=180,c=s)),{translate:[u,c],scale:[1,1],rotate:l,rotateX:h,rotateY:f,value:`translate(${u}px, ${c}px) rotate(${l}deg) rotateX(${h}deg) rotateY(${f}deg)`}}return new lt(i=>(W({fullDataFormatter:t,layout:e}).pipe(F(n),B(async o=>o)).subscribe(o=>{const a=r({xAxis:o.fullDataFormatter.grid.groupAxis,yAxis:o.fullDataFormatter.grid.valueAxis,width:o.layout.width,height:o.layout.height});i.next(a)}),function(){n.next(void 0)}))},LR=({gridAxesTransform$:t})=>t.pipe(U(e=>{const n=[0,0],r=[1/e.scale[0],1/e.scale[1]],i=e.rotate*-1,o=e.rotateX*-1,a=e.rotateY*-1;return{translate:n,scale:r,rotate:i,rotateX:o,rotateY:a,value:`translate(${n[0]}px, ${n[1]}px) rotate(${i}deg) rotateX(${o}deg) rotateY(${a}deg)`}})),ER=({computedData$:t,fullDataFormatter$:e,fullChartParams$:n,layout$:r})=>W({computedData:t,fullDataFormatter:e,fullChartParams:n,layout:r}).pipe(B(async o=>o),U(o=>{const a=o.fullDataFormatter.grid;if(!!(a.seriesSlotIndexes&&a.seriesSlotIndexes.length===o.computedData.length))return o.computedData.map((u,c)=>{const l=a.seriesSlotIndexes[c]%o.fullDataFormatter.container.columnAmount,h=Math.floor(a.seriesSlotIndexes[c]/o.fullDataFormatter.container.columnAmount),{translate:f,scale:d}=X2(o.layout,o.fullDataFormatter.container,h,l);return{slotIndex:a.seriesSlotIndexes[c],rowIndex:h,columnIndex:l,translate:f,scale:d}});{const u=a.slotIndex%o.fullDataFormatter.container.columnAmount,c=Math.floor(a.slotIndex/o.fullDataFormatter.container.columnAmount);return o.computedData.map((l,h)=>{const{translate:f,scale:d}=X2(o.layout,o.fullDataFormatter.container,c,u);return{slotIndex:a.slotIndex,rowIndex:c,columnIndex:u,translate:f,scale:d}})}})),Ch="OverlappingValueAxes",j2=at(Ch,"grid"),kR=Xe(Ch,G2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[],a=r.fullParams$.pipe(F(i),U(l=>l.gridIndexes[0])),s=r.fullParams$.pipe(F(i),U(l=>l.gridIndexes[1])),u=W({firstGridIndex:a,secondGridIndex:s}).pipe(F(i),B(l=>r.fullDataFormatter$.pipe(F(i),U(h=>{h.gridList[l.secondGridIndex]||(h.gridList[l.secondGridIndex]=Object.assign({},h.gridList[l.firstGridIndex]));let f="";return h.gridList[l.firstGridIndex].valueAxis.position==="left"?f="right":h.gridList[l.firstGridIndex].valueAxis.position==="bottom"?f="top":h.gridList[l.firstGridIndex].valueAxis.position==="top"?f="bottom":h.gridList[l.firstGridIndex].valueAxis.position==="right"&&(f="left"),console.log("reversePosition",f),{type:"grid",grid:{...h.gridList[l.secondGridIndex],valueAxis:{...h.gridList[l.secondGridIndex].valueAxis,position:f}},container:{...h.container}}}))));return ci(r).pipe(F(i),U(l=>({...l,fullParams$:l.fullParams$.pipe(U(h=>(h.gridIndexes.length>2&&(h.gridIndexes.length=2),h)))})),B(l=>$n(l)),U(l=>l.map((h,f)=>{if(f===0)return h;const d=DR({fullDataFormatter$:u,layout$:r.layout$}),p=LR({gridAxesTransform$:d}),g=ER({computedData$:h.gridComputedData$,fullDataFormatter$:u,fullChartParams$:r.fullChartParams$,layout$:r.layout$});return{...h,gridAxesTransform$:d,gridAxesReverseTransform$:p,gridContainer$:g}}))).subscribe(l=>{o.forEach(h=>h()),t.selectAll(`g.${j2}`).data(l).join("g").attr("class",j2).each((h,f,d)=>{if(f>1)return;const p=K(d[f]);o[f]=Du(Ch,{selection:p,computedData$:h.gridComputedData$,fullParams$:r.fullParams$.pipe(U(g=>f===0?g.firstAxis:g.secondAxis)),fullDataFormatter$:h.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:h.gridAxesTransform$,gridAxesReverseTransform$:h.gridAxesReverseTransform$,gridAxesSize$:h.gridAxesSize$,gridContainer$:h.gridContainer$,isSeriesPositionSeprate$:h.isSeriesPositionSeprate$})})}),()=>{i.next(void 0),o.forEach(l=>l())}}),V2={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},Z2={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,textRenderFn:t=>{if(t.highlightTarget==="datum"&&t.datum)return[`${t.datum.label}: ${t.datum.value}`];if(t.highlightTarget==="series"){const e=t.seriesLabel,n=t.series.map(r=>r.value).join(",");return[e,n]}else if(t.highlightTarget==="group"){const e=t.groupLabel,n=t.groups.map(r=>r.value).join(",");return[e,n]}return[]},svgRenderFn:null},CR=rp("Container",V2)(({selection:t})=>function(){}),Rh="Tooltip",K2=at(Rh,"g"),RR=at(Rh,"box");function IR(t,e){const n=e.textSize*1.5;return t.filter(r=>r!="").map((r,i)=>{const o=i*n;return`<text font-size="${e.textSize}" fill="${e.textColor}" x="0" y="${o}" style="dominant-baseline:text-before-edge">${r}</text>`}).join()}function NR({rootSelection:t,pluginName:e,rootWidth:n,rootHeight:r,svgString:i,tooltipStyle:o,event:a}){t.interrupt("fadeout");const s=5,u=i?[i]:[],c=i?[o]:[],h=t.selectAll(`g.${K2}`).data(u).join(b=>b.append("g").classed(K2,!0).attr("pointer-events","none"),b=>b,b=>b.style("opacity",0).remove()).attr("transform",()=>`translate(${a.offsetX}, ${a.offsetY})`).selectAll(`g.${RR}`).data(c).join(b=>b.append("g").classed(at(e,"box"),!0)),f=h.selectAll("rect").data(c).join(b=>b.append("rect").attr("rx",s).attr("ry",s)).attr("fill",b=>b.backgroundColor).attr("stroke",b=>b.strokeColor).attr("opacity",b=>b.backgroundOpacity),d=h.selectAll("g").data(u).join(b=>b.append("g").classed(at(e,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));u.length&&_C(d,u[0]);const p=d!=null&&d.node()?o2(d):{width:0,height:0};f.attr("width",p.width+o.padding*2).attr("height",p.height+o.padding*2);const g=h!=null&&h.node()?o2(h):{width:0,height:0},m=n-g.width,y=r-g.height,x=a.offsetX+o.offset[0]>m?m-a.offsetX:o.offset[0],v=a.offsetY+o.offset[1]>y?y-a.offsetY:o.offset[1];h.attr("transform",b=>`translate(${x}, ${v})`),h.attr("transform",b=>`translate(${x}, ${v})`)}const FR=rp(Rh,Z2)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new rt,s=o.event$.pipe(F(a),Uo(p=>p.eventName==="mouseover"||p.eventName==="mousemove")),u=o.event$.pipe(F(a),Uo(p=>p.eventName==="mouseout")),c=W({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$}).pipe(F(a),B(async p=>p),U(p=>({backgroundColor:It(p.fullParams.backgroundColorType,p.fullChartParams),backgroundOpacity:p.fullParams.backgroundOpacity,strokeColor:It(p.fullParams.strokeColorType,p.fullChartParams),offset:p.fullParams.offset,padding:p.fullParams.padding,textSize:p.fullChartParams.styles.textSize,textColor:It(p.fullParams.textColorType,p.fullChartParams)}))),l=W({fullParams:i.fullParams$,tooltipStyle:c}).pipe(F(a),B(async p=>p),U(p=>p.fullParams.svgRenderFn?p.fullParams.svgRenderFn:g=>{const m=p.fullParams.textRenderFn(g);return IR(m,p.tooltipStyle)})),h=W({event:s,contentRenderFn:l}).pipe(F(a),B(async p=>p),U(p=>p.contentRenderFn(p.event))),f=u.pipe(F(a),U(p=>"")),d=Wu(s,u).pipe(F(a),U(p=>p.event));return W({svgString:Wu(h,f),event:d,layout:i.layout$,tooltipStyle:c}).pipe(F(a),B(async p=>p)).subscribe(p=>{NR({rootSelection:e,pluginName:n,rootWidth:p.layout.rootWidth,rootHeight:p.layout.rootHeight,svgString:p.svgString,tooltipStyle:p.tooltipStyle,event:p.event})}),function(){a.next(void 0)}}),Q2={force:{strength:.03,velocityDecay:.2,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},highlightRIncrease:0,bubbleScaleType:"area"},J2={outerRadius:.95,innerRadius:0,outerMouseoverRadius:1,enterDuration:800,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},tx={eventFn:(t,e,n)=>e==="mouseover"||e==="mousemove"?[String(t.datum.value)]:[String(Math.round(t.data.reduce((r,i)=>r+(i.value??0),0)*n))],textAttrs:[{transform:"translate(0, 0)"}],textStyles:[{"font-weight":"bold","text-anchor":"middle","pointer-events":"none","dominant-baseline":"middle","font-size":64,fill:"#000"}]},ex={outerRadius:.95,outerMouseoverRadius:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"series",labelFn:t=>String(t.value)},nx={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0};function GR(t,{text:e,radius:n,lineHeight:r,isBreakAll:i=!1,limit:o=0}){if(t==null||e==null){console.error("selection or text is not defined");return}n==null&&(n=t.node().getBBox().width/2);function a(d){let p;return i?p=d.split(""):p=d.split(/\s+/g),p[p.length-1]||p.pop(),p[0]||p.shift(),p}function s(d,p){return d&&p&&d.length>p&&(d=d.substring(0,p)+"..."),d}function u(d){var g;const p=document.createElement("canvas").getContext("2d");return((g=p==null?void 0:p.measureText(d))==null?void 0:g.width)??0}function c(d){const p=u(d.trim());return Math.sqrt(p*r)}function l(d,p){let g={width:0,text:""},m=1/0;const y=[];let x=" ";i&&(x="");for(let v=0,b=d.length;v<b;++v){const $=(g.text?g.text+x:"")+d[v],w=u($);(m+w)/2<p?(g.width=m=w,g.text=$):(m=u(d[v]),g={width:m,text:d[v]},y.push(g))}return y}function h(d){let p=0;for(let g=0,m=d.length;g<m;++g){const y=(Math.abs(g-m/2+.5)+.5)*r,x=d[g].width/2;p=Math.max(p,Math.sqrt(x**2+y**2))}return p}function f(d,p){o>0&&(p=s(p,o));const g=a(p),m=c(p),y=l(g,m),x=h(y);let v=d.select("text");v.size()||(v=d.append("text")),v.attr("transform",`translate(0,0) scale(${n/x})`);const b=v.selectAll("tspan").data(y),$=b.enter().append("tspan").attr("x",0).merge(b).attr("y",(w,S)=>(S-y.length/2+.8)*r).text(w=>w.text);return b.exit().remove(),b.merge($)}return f(t,e)}let or;function zR(t,e){return E1().velocityDecay(e.force.velocityDecay).force("collision",P1().radius(n=>n.r+e.force.collisionSpacing)).force("charge",k1().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function OR({data:t,bubbleGroupR:e,maxValue:n,avgValue:r}){const i=e/Math.sqrt(t.length),a=i*i*Math.PI/r,s=n*a;return Math.pow(s/Math.PI,.5)*.75}function UR({data:t,LastBubbleDataMap:e,graphicWidth:n,graphicHeight:r,scaleType:i}){const o=Math.min(n,r)/2,a=t.flat().filter(d=>d.value!=null&&d.visible!=!1),s=Math.max(...a.map(d=>d.value)),u=a.reduce((d,p)=>d+(p.value??0),0)/a.length,c=OR({data:a,bubbleGroupR:o,maxValue:s,avgValue:u}),l=i==="area"?.5:1,h=tu().domain([0,s]).range([0,c]).exponent(l);return a.map(d=>{const p=d,g=e.get(d.id);g?(p.x=g.x,p.y=g.y):(p.x=Math.random()*n,p.y=Math.random()*r);const m=h(p.value??0);return p.r=m,p._originR=m,p})}function rx({graphicSelection:t,bubblesData:e,fullParams:n}){let r=t.selectAll("g").data(e,a=>a.id),i=r.enter().append("g").attr("cursor","pointer");i.style("font-size",12).style("fill","#ffffff").attr("text-anchor","middle").attr("transform",a=>`translate(${a.x},${a.y})`),i.append("circle").attr("class","node").attr("cx",0).attr("cy",0).attr("fill",a=>a.color),i.append("text").style("opacity",.8).attr("pointer-events","none"),r.exit().remove();const o=r.merge(i);return o.select("circle").transition().duration(200).attr("r",a=>a.r).attr("fill",a=>a.color),o.each((a,s,u)=>{const c=K(u[s]);let l=!0;a.label.length<=n.bubbleText.lineLengthMin&&(l=!1),c.call(GR,{text:a.label,radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:l})}),o}function BR({data:t,highlightRIncrease:e,highlightIds:n}){if(e!=0){if(!n.length){t.forEach(r=>r.r=r._originR);return}t.forEach(r=>{n.includes(r.id)?r.r=r._originR+e:r.r=r._originR})}}function YR(){return Hp().on("start",(t,e)=>{t.active||or.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||or.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function ix({fullParams:t,graphicWidth:e,graphicHeight:n}){or.force("x",C1().strength(t.force.strength).x(0)).force("y",R1().strength(t.force.strength).y(0)),or.alpha(1).restart()}function WR({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=K(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(Qa).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const HR=Ti("Bubbles",Q2)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=t.append("g"),a=new rt;let s=new Map;n.layout$.pipe(li()).subscribe(h=>{t.attr("transform",`translate(${h.width/2}, ${h.height/2})`),n.layout$.pipe(F(i)).subscribe(f=>{t.transition().attr("transform",`translate(${f.width/2}, ${f.height/2})`)})});const u=n.fullParams$.pipe(F(i),U(h=>h.bubbleScaleType),ht()),c=new lt(h=>{W({layout:n.layout$,computedData:n.computedData$,scaleType:u}).pipe(F(i),B(async f=>f)).subscribe(f=>{const d=UR({data:f.computedData,LastBubbleDataMap:s,graphicWidth:f.layout.width,graphicHeight:f.layout.height,scaleType:f.scaleType});h.next(d)})});c.subscribe(h=>{s=new Map(h.map(f=>[f.id,f]))});const l=n.fullChartParams$.pipe(F(i),U(h=>h.highlightTarget),ht());return W({layout:n.layout$,computedData:n.computedData$,bubblesData:c,SeriesDataMap:n.SeriesDataMap$,fullParams:n.fullParams$,highlightTarget:l}).pipe(F(i),B(async h=>h)).subscribe(h=>{const f=rx({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams});or=zR(f,h.fullParams),f.on("mouseover",(d,p)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).on("mousemove",(d,p)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).on("mouseout",(d,p)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).on("click",(d,p)=>{r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).call(YR()),or.nodes(h.bubblesData),ix({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),a.next(f)}),W({bubblesSelection:a,bubblesData:c,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,layout:n.layout$}).pipe(F(i),B(async h=>h)).subscribe(h=>{WR({bubblesSelection:h.bubblesSelection,highlightIds:h.highlight,fullChartParams:h.fullChartParams}),h.fullParams.highlightRIncrease&&(BR({data:h.bubblesData,highlightRIncrease:h.fullParams.highlightRIncrease,highlightIds:h.highlight}),rx({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams})),ix({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),or.nodes(h.bubblesData)}),()=>{i.next(void 0)}});function ox({computedDataSeries:t,startAngle:e,endAngle:n}){return mv().startAngle(e).endAngle(n).value(o=>o.visible==!1?0:o.value).sort((o,a)=>o.sortedIndex-a.sortedIndex)(t).map((o,a)=>{let s=o;return s.id=o.data.id,s})}const ax="Pie",qR=at(ax,"path");function XR({enter:t,exit:e,data:n,lastData:r,fullParams:i}){return!t.size()&&!e.size()?o=>{const a=n.map((s,u)=>{const c=r[u]??{startAngle:0,endAngle:0,value:0};return{...s,startAngle:s.startAngle*o+c.startAngle*(1-o),endAngle:s.endAngle*o+c.endAngle*(1-o),value:s.value*o+c.value*(1-o)}});return Ih(a,i.startAngle,i.endAngle,1)}:o=>Ih(n,i.startAngle,i.endAngle,o)}function Ih(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 sx({selection:t,renderData:e,arc:n}){let r=t.selectAll("path").data(e,s=>s.id),i=r.enter().append("path").classed(qR,!0),o=r.exit();i.append("path");const a=r.merge(i);return a.style("cursor","pointer").attr("fill",(s,u)=>s.data.color).attr("d",(s,u)=>n(s)),o.remove(),a}function jR({pathSelection:t,ids:e,fullChartParams:n,arc:r,arcMouseover:i}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1).attr("d",o=>r(o));return}t.each((o,a,s)=>{const u=K(s[a]);e.includes(o.data.id)?u.style("opacity",1).transition("highlight").ease(Qa).duration(500).attr("d",c=>i(c)):u.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",c=>r(c))})}const VR=Ti(ax,J2)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=t.append("g"),a=new rt;let s=[],u=[];n.layout$.pipe(li()).subscribe(p=>{t.attr("transform",`translate(${p.width/2}, ${p.height/2})`),n.layout$.pipe(F(i)).subscribe(g=>{t.transition().attr("transform",`translate(${g.width/2}, ${g.height/2})`)})});const c=n.layout$.pipe(F(i),U(p=>p.width<p.height?p.width:p.height)),l=new lt(p=>{W({computedData:n.computedData$,fullParams:n.fullParams$}).pipe(F(i),B(async g=>g)).subscribe(g=>{const m=ox({computedDataSeries:g.computedData,startAngle:g.fullParams.startAngle,endAngle:g.fullParams.endAngle});p.next(m)})}),h=new lt(p=>{W({shorterSideWith:c,fullParams:n.fullParams$}).pipe(F(i),B(async g=>g)).subscribe(g=>{const m=Tu({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});p.next(m)})}),f=new lt(p=>{W({shorterSideWith:c,fullParams:n.fullParams$}).pipe(F(i),B(async g=>g)).subscribe(g=>{const m=Tu({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerMouseoverRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});p.next(m)})}),d=n.fullChartParams$.pipe(F(i),U(p=>p.highlightTarget),ht());return W({pieData:l,SeriesDataMap:n.SeriesDataMap$,arc:h,arcMouseover:f,computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:d}).pipe(F(i),B(async p=>p)).subscribe(p=>{o.interrupt("graphicMove");let g=t.selectAll("path").data(p.pieData,v=>v.data.id),m=g.enter(),y=g.exit();const x=XR({enter:m,exit:y,data:p.pieData,lastData:s,fullParams:p.fullParams});o.transition("graphicMove").duration(p.fullChartParams.transitionDuration).ease(ii(p.fullChartParams.transitionEase)).tween("move",(v,b)=>$=>{u=x($),sx({selection:o,renderData:u,arc:p.arc}),r.event$.next({type:"series",pluginName:e,eventName:"transitionMove",event:void 0,highlightTarget:p.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:p.computedData})}).on("end",(v,b)=>{u=Ih(p.pieData,p.fullParams.startAngle,p.fullParams.endAngle,1);const $=sx({selection:o,renderData:u,arc:p.arc});a.next($),s=Object.assign([],p.pieData),r.event$.next({type:"series",pluginName:e,eventName:"transitionEnd",event:void 0,highlightTarget:p.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:p.computedData}),$.on("mouseover",(w,S)=>{w.stopPropagation(),r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:p.highlightTarget,datum:S.data,series:p.SeriesDataMap.get(S.data.seriesLabel),seriesIndex:S.data.seriesIndex,seriesLabel:S.data.seriesLabel,event:w,data:p.computedData})}).on("mousemove",(w,S)=>{w.stopPropagation(),r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:p.highlightTarget,datum:S.data,series:p.SeriesDataMap.get(S.data.seriesLabel),seriesIndex:S.data.seriesIndex,seriesLabel:S.data.seriesLabel,event:w,data:p.computedData})}).on("mouseout",(w,S)=>{w.stopPropagation(),r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:p.highlightTarget,datum:S.data,series:p.SeriesDataMap.get(S.data.seriesLabel),seriesIndex:S.data.seriesIndex,seriesLabel:S.data.seriesLabel,event:w,data:p.computedData})}).on("click",(w,S)=>{w.stopPropagation(),r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:p.highlightTarget,datum:S.data,series:p.SeriesDataMap.get(S.data.seriesLabel),seriesIndex:S.data.seriesIndex,seriesLabel:S.data.seriesLabel,event:w,data:p.computedData})})})}),W({pathSelection:a,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,arc:h,arcMouseover:f}).pipe(F(i),B(async p=>p)).subscribe(p=>{jR({pathSelection:p.pathSelection,ids:p.highlight,fullChartParams:p.fullChartParams,arc:p.arc,arcMouseover:p.arcMouseover})}),()=>{i.next(void 0)}}),ux="PieEventTexts",cx=at(ux,"text");function Nh(t,e){const n=t.selectAll(`text.${cx}`).data(e),r=n.enter().append("text").classed(cx,!0),i=n.merge(r);return i.each((o,a,s)=>{const u=K(s[a]).text(o.text);Object.keys(o.attr).forEach(c=>{u.attr(c,o.attr[c])}),Object.keys(o.style).forEach(c=>{u.style(c,o.style[c])})}),n.exit().remove(),i}function Fh({eventData:t,eventName:e,t:n,eventFn:r,textAttrs:i,textStyles:o}){return r(t,e,n).map((s,u)=>({text:s,attr:i[u],style:o[u]}))}const ZR=Ti(ux,tx)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=t.append("g");let a;n.layout$.pipe(li()).subscribe(u=>{t.attr("transform",`translate(${u.width/2}, ${u.height/2})`),n.layout$.pipe(F(i)).subscribe(c=>{t.transition().attr("transform",`translate(${c.width/2}, ${c.height/2})`)})});const s=n.fullChartParams$.pipe(F(i),U(u=>u.highlightTarget),ht());return W({computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:s}).pipe(F(i),B(async u=>u)).subscribe(u=>{o.transition().duration(u.fullChartParams.transitionDuration).ease(ii(u.fullChartParams.transitionEase)).tween("move",(c,l)=>h=>{const f=Fh({eventData:{type:"series",pluginName:e,eventName:"transitionMove",event:c,highlightTarget:u.highlightTarget,data:u.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:h,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});Nh(o,f)}).on("end",(c,l)=>{const h=Fh({eventData:{type:"series",pluginName:e,eventName:"transitionEnd",event:c,highlightTarget:u.highlightTarget,data:u.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:1,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});Nh(o,h),a&&a.unsubscribe(),a=r.event$.subscribe(f=>{const d=Fh({eventData:f,eventName:f.eventName,t:1,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});Nh(o,d)})})}),()=>{i.next(void 0)}}),lx="PieLabels",KR=at(lx,"text");function QR(t,e,n,r){return t.map((i,o)=>{const[a,s]=e.centroid(i),[u,c]=n.centroid(i);return{pieDatum:i,arcIndex:o,arcLabel:i.data.label,x:a*r,y:s*r,mouseoverX:u*r,mouseoverY:c*r}}).filter(i=>i.pieDatum.data.visible)}function JR(t,e,n,r){let i=t.selectAll("text").data(e,u=>u.pieDatum.id),o=i.enter().append("text").classed(KR,!0),a=i.exit();o.append("text");const s=i.merge(o);return s.attr("font-weight","bold").attr("text-anchor","middle").style("dominant-baseline","middle").style("cursor",u=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").text(u=>n.labelFn(u.pieDatum.data)).attr("font-size",r.styles.textSize).attr("fill",(u,c)=>_h({datum:u.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",u=>"translate("+u.x+","+u.y+")"),a.remove(),s}function tI({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=K(o[i]);e.includes(r.pieDatum.id)?a.style("opacity",1).transition().duration(200).attr("transform",s=>"translate("+s.mouseoverX+","+s.mouseoverY+")"):a.style("opacity",n.styles.unhighlightedOpacity).transition().duration(200).attr("transform",s=>"translate("+s.x+","+s.y+")")})}const eI=Ti(lx,ex)(({selection:t,observer:e,subject:n})=>{const r=new rt,i=t.append("g");let o=new rt,a=[];return e.layout$.pipe(li()).subscribe(s=>{t.attr("transform",`translate(${s.width/2}, ${s.height/2})`),e.layout$.pipe(F(r)).subscribe(u=>{t.transition().attr("transform",`translate(${u.width/2}, ${u.height/2})`)})}),W({layout:e.layout$,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(F(r),B(async s=>s)).subscribe(s=>{const u=s.layout.width<s.layout.height?s.layout.width:s.layout.height,c=Tu({axisWidth:u,innerRadius:0,outerRadius:s.fullParams.outerRadius,padAngle:0,cornerRadius:0}),l=Tu({axisWidth:u,innerRadius:0,outerRadius:s.fullParams.outerMouseoverRadius,padAngle:0,cornerRadius:0}),h=ox({computedDataSeries:s.computedData,startAngle:s.fullParams.startAngle,endAngle:s.fullParams.endAngle});a=QR(h,c,l,s.fullParams.labelCentroid);const f=JR(i,a,s.fullParams,s.fullChartParams);o.next(f)}),W({labelSelection:o,highlight:e.seriesHighlight$,fullChartParams:e.fullChartParams$}).pipe(F(r),B(async s=>s)).subscribe(s=>{tI({labelSelection:s.labelSelection,ids:s.highlight,fullChartParams:s.fullChartParams})}),()=>{r.next(void 0)}}),fx="SeriesLegend",nI=Ti(fx,nx)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new rt,o=n.SeriesDataMap$.pipe(F(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(F(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Pu(fx,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}}),hx={paddingInner:2,paddingOuter:2,labelColorType:"primary",squarifyRatio:1.618034,sort:(t,e)=>e.value-t.value},dx={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0},px="TreeLegend",rI=ip(px,dx)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new rt,o=n.CategoryDataMap$.pipe(F(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(F(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Pu(px,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}}),ai="TreeMap",gx=at(ai,"tree");function iI({selection:t,treeData:e,fullParams:n,fullChartParams:r}){const i=r.styles.textSize/2,o=t.selectAll(`g.${gx}`).data(e,a=>a.data.id).join("g").attr("class",gx);return o.attr("transform",a=>!a.x0||!a.y0?null:`translate(${a.x0},${a.y0})`).each((a,s,u)=>{const c=K(u[s]);c.selectAll("rect").data([a],l=>l.data.id).join("rect").attr("id",l=>l.data.id).attr("class","tile").attr("width",l=>l.x1-l.x0).attr("height",l=>l.y1-l.y0).attr("fill",l=>l.data.color).attr("data-name",l=>l.data.label).attr("data-category",l=>l.data.categoryLabel).attr("data-value",l=>l.data.value),c.selectAll("g").data([a]).join("g").each((l,h,f)=>{K(f[h]).selectAll("text").data([l]).join("text").text(p=>p.data.label).attr("dominant-baseline","hanging").attr("x",i).attr("y",i).attr("font-size",r.styles.textSize).each(function(p){const g=K(this),m=p.data.label.split(/\s+/).reverse();let y,x=[];const v=r.styles.textSize,b=g.attr("x");let $=g.attr("y"),w=0,S=g.text(null).append("tspan").attr("cursor","default").attr("fill",It(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",b).attr("y",$);for(;y=m.pop();)x.push(y),S.text(x.join(" ")),S.node().getComputedTextLength()>p.x1-p.x0-i&&(x.pop(),S.text(x.join(" ")),x=[y],w+=v,S=g.append("tspan").attr("cursor","default").attr("fill",It(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",b).attr("y",$).attr("dy",w+"px").text(y))})})}),o}function oI({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)?K(o[i]).style("opacity",1):K(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const aI=ip(ai,hx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=W({layout:r.layout$,visibleComputedData:r.visibleComputedData$,fullParams:r.fullParams$,fullDataFormatter:r.fullDataFormatter$,fullChartParams:r.fullChartParams$}).pipe(F(i),B(async u=>u),U(u=>{const c=Sy().size([u.layout.width,u.layout.height]).paddingInner(u.fullParams.paddingInner).paddingOuter(u.fullParams.paddingOuter).round(!0).tile(Ff.ratio(u.fullParams.squarifyRatio)),l=qs(u.visibleComputedData).sum(f=>f.value).sort(u.fullParams.sort);return c(l),l.leaves()})),a=W({selection:ci(t),treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$}).pipe(F(i),B(async u=>u),U(u=>iI({selection:t,treeData:u.treeData,fullParams:u.fullParams,fullChartParams:u.fullChartParams}))),s=r.fullChartParams$.pipe(F(i),U(u=>u.highlightTarget),ht());return W({cellSelection:a,computedData:r.computedData$,treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,highlightTarget:s,CategoryDataMap:r.CategoryDataMap$}).pipe(F(i),B(async u=>u)).subscribe(u=>{u.cellSelection.on("mouseover",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseover",pluginName:ai,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("mousemove",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mousemove",pluginName:ai,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("mouseout",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseout",pluginName:ai,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("click",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"click",pluginName:ai,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})})}),W({cellSelection:a,highlight:r.treeHighlight$,fullChartParams:r.fullChartParams$}).pipe(F(i),B(async u=>u)).subscribe(u=>{oI({selection:u.cellSelection,ids:u.highlight,fullChartParams:u.fullChartParams})}),()=>{i.next(void 0)}});Z.BarStack=HC,Z.Bars=FC,Z.BarsDiverging=GC,Z.BarsTriangle=JC,Z.Bubbles=HR,Z.CONTAINER_PLUGIN_PARAMS=V2,Z.Container=CR,Z.DEFAULT_BARS_DIVERGING_PARAMS=mx,Z.DEFAULT_BARS_PARAMS=No,Z.DEFAULT_BARS_TRIANGLE_PARAMS=Uh,Z.DEFAULT_BAR_STACK_PARAMS=Oh,Z.DEFAULT_BUBBLES_PARAMS=Q2,Z.DEFAULT_DOTS_PARAMS=Gh,Z.DEFAULT_GRID_LEGEND_PARAMS=Hh,Z.DEFAULT_GROUP_AREA_PARAMS=zh,Z.DEFAULT_GROUP_AXIS_PARAMS=Bh,Z.DEFAULT_LINES_PARAMS=ar,Z.DEFAULT_MULTI_BARS_PARAMS=C2,Z.DEFAULT_MULTI_BARS_TRIANGLE_PARAMS=I2,Z.DEFAULT_MULTI_BAR_STACK_PARAMS=R2,Z.DEFAULT_MULTI_DOTS_PARAMS=F2,Z.DEFAULT_MULTI_GRID_LEGEND_PARAMS=L2,Z.DEFAULT_MULTI_GROUP_AXIS_PARAMS=E2,Z.DEFAULT_MULTI_LINES_PARAMS=N2,Z.DEFAULT_MULTI_VALUE_AXIS_PARAMS=k2,Z.DEFAULT_OVERLAPPING_VALUE_AXES_PARAMS=G2,Z.DEFAULT_PIE_EVENT_TEXTS_PARAMS=tx,Z.DEFAULT_PIE_LABELS_PARAMS=ex,Z.DEFAULT_PIE_PARAMS=J2,Z.DEFAULT_SCALING_AREA_PARAMS=Wh,Z.DEFAULT_SERIES_LEGEND_PARAMS=nx,Z.DEFAULT_TREE_LEGEND_PARAMS=dx,Z.DEFAULT_TREE_MAP_PARAMS=hx,Z.DEFAULT_VALUE_AXIS_PARAMS=Lu,Z.DEFAULT_VALUE_STACK_AXIS_PARAMS=Yh,Z.Dots=rR,Z.GridLegend=oR,Z.GroupAux=xR,Z.GroupAxis=sR,Z.Lines=LC,Z.MultiBarStack=$R,Z.MultiBars=wR,Z.MultiBarsTriangle=SR,Z.MultiDots=MR,Z.MultiGridLegend=_R,Z.MultiGroupAxis=TR,Z.MultiLines=AR,Z.MultiValueAxis=PR,Z.OverlappingValueAxes=kR,Z.Pie=VR,Z.PieEventTexts=ZR,Z.PieLabels=eI,Z.ScalingArea=hR,Z.SeriesLegend=nI,Z.TOOLTIP_PARAMS=Z2,Z.Tooltip=FR,Z.TreeLegend=rI,Z.TreeMap=aI,Z.ValueAxis=cR,Z.ValueStackAxis=lR,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});
9
+ `)}function c(h){return h.map(l).join(t)}function l(h){return h==null?"":h instanceof Date?z7(h):e.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:u,formatRow:c,formatValue:l}}var Vn=os(","),T1=Vn.parse,O7=Vn.parseRows,U7=Vn.format,B7=Vn.formatBody,Y7=Vn.formatRows,W7=Vn.formatRow,H7=Vn.formatValue,Zn=os(" "),P1=Zn.parse,q7=Zn.parseRows,X7=Zn.format,j7=Zn.formatBody,V7=Zn.formatRows,Z7=Zn.formatRow,K7=Zn.formatValue;function Q7(t){for(var e in t){var n=t[e].trim(),r,i;if(!n)n=null;else if(n==="true")n=!0;else if(n==="false")n=!1;else if(n==="NaN")n=NaN;else if(!isNaN(r=+n))n=r;else if(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))J7&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const J7=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function t9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function e9(t,e){return fetch(t,e).then(t9)}function n9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function r9(t,e){return fetch(t,e).then(n9)}function i9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function as(t,e){return fetch(t,e).then(i9)}function D1(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),as(e,n).then(function(i){return t(i,r)})}}function o9(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=os(t);return as(e,n).then(function(o){return i.parse(o,r)})}var a9=D1(T1),s9=D1(P1);function u9(t,e){return new Promise(function(n,r){var i=new Image;for(var o in e)i[o]=e[o];i.onerror=r,i.onload=function(){n(i)},i.src=t})}function c9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function l9(t,e){return fetch(t,e).then(c9)}function Il(t){return(e,n)=>as(e,n).then(r=>new DOMParser().parseFromString(r,t))}const f9=Il("application/xml");var h9=Il("text/html"),d9=Il("image/svg+xml");function p9(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,a=n.length,s,u=0,c=0;for(o=0;o<a;++o)s=n[o],u+=s.x,c+=s.y;for(u=(u/a-t)*r,c=(c/a-e)*r,o=0;o<a;++o)s=n[o],s.x-=u,s.y-=c}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(t=+o,i):t},i.y=function(o){return arguments.length?(e=+o,i):e},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function g9(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return L1(this.cover(e,n),e,n,t)}function L1(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o=t._root,a={data:r},s=t._x0,u=t._y0,c=t._x1,l=t._y1,h,f,d,p,g,m,y,v;if(!o)return t._root=a,t;for(;o.length;)if((g=e>=(h=(s+c)/2))?s=h:c=h,(m=n>=(f=(u+l)/2))?u=f:l=f,i=o,!(o=o[y=m<<1|g]))return i[y]=a,t;if(d=+t._x.call(null,o.data),p=+t._y.call(null,o.data),e===d&&n===p)return a.next=o,i?i[y]=a:t._root=a,t;do i=i?i[y]=new Array(4):t._root=new Array(4),(g=e>=(h=(s+c)/2))?s=h:c=h,(m=n>=(f=(u+l)/2))?u=f:l=f;while((y=m<<1|g)===(v=(p>=f)<<1|d>=h));return i[v]=o,i[y]=a,t}function m9(t){var e,n,r=t.length,i,o,a=new Array(r),s=new Array(r),u=1/0,c=1/0,l=-1/0,h=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=i,s[n]=o,i<u&&(u=i),i>l&&(l=i),o<c&&(c=o),o>h&&(h=o));if(u>l||c>h)return this;for(this.cover(u,c).cover(l,h),n=0;n<r;++n)L1(this,a[n],s[n],t[n]);return this}function y9(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a=i-n||1,s=this._root,u,c;n>t||t>=i||r>e||e>=o;)switch(c=(e<r)<<1|t<n,u=new Array(4),u[c]=s,s=u,a*=2,c){case 0:i=n+a,o=r+a;break;case 1:n=i-a,o=r+a;break;case 2:i=n+a,r=o-a;break;case 3:n=i-a,r=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function b9(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function v9(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Ht(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function x9(t,e,n){var r,i=this._x0,o=this._y0,a,s,u,c,l=this._x1,h=this._y1,f=[],d=this._root,p,g;for(d&&f.push(new Ht(d,i,o,l,h)),n==null?n=1/0:(i=t-n,o=e-n,l=t+n,h=e+n,n*=n);p=f.pop();)if(!(!(d=p.node)||(a=p.x0)>l||(s=p.y0)>h||(u=p.x1)<i||(c=p.y1)<o))if(d.length){var m=(a+u)/2,y=(s+c)/2;f.push(new Ht(d[3],m,y,u,c),new Ht(d[2],a,y,m,c),new Ht(d[1],m,s,u,y),new Ht(d[0],a,s,m,y)),(g=(e>=y)<<1|t>=m)&&(p=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=p)}else{var v=t-+this._x.call(null,d.data),x=e-+this._y.call(null,d.data),b=v*v+x*x;if(b<n){var w=Math.sqrt(n=b);i=t-w,o=e-w,l=t+w,h=e+w,r=d.data}}return r}function _9(t){if(isNaN(l=+this._x.call(null,t))||isNaN(h=+this._y.call(null,t)))return this;var e,n=this._root,r,i,o,a=this._x0,s=this._y0,u=this._x1,c=this._y1,l,h,f,d,p,g,m,y;if(!n)return this;if(n.length)for(;;){if((p=l>=(f=(a+u)/2))?a=f:u=f,(g=h>=(d=(s+c)/2))?s=d:c=d,e=n,!(n=n[m=g<<1|p]))return this;if(!n.length)break;(e[m+1&3]||e[m+2&3]||e[m+3&3])&&(r=e,y=m)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):e?(o?e[m]=o:delete e[m],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[y]=n:this._root=n),this):(this._root=o,this)}function w9(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function $9(){return this._root}function S9(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function A9(t){var e=[],n,r=this._root,i,o,a,s,u;for(r&&e.push(new Ht(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,o=n.x0,a=n.y0,s=n.x1,u=n.y1)&&r.length){var c=(o+s)/2,l=(a+u)/2;(i=r[3])&&e.push(new Ht(i,c,l,s,u)),(i=r[2])&&e.push(new Ht(i,o,l,c,u)),(i=r[1])&&e.push(new Ht(i,c,a,s,l)),(i=r[0])&&e.push(new Ht(i,o,a,c,l))}return this}function M9(t){var e=[],n=[],r;for(this._root&&e.push(new Ht(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var o,a=r.x0,s=r.y0,u=r.x1,c=r.y1,l=(a+u)/2,h=(s+c)/2;(o=i[0])&&e.push(new Ht(o,a,s,l,h)),(o=i[1])&&e.push(new Ht(o,l,s,u,h)),(o=i[2])&&e.push(new Ht(o,a,h,l,c)),(o=i[3])&&e.push(new Ht(o,l,h,u,c))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function T9(t){return t[0]}function P9(t){return arguments.length?(this._x=t,this):this._x}function D9(t){return t[1]}function L9(t){return arguments.length?(this._y=t,this):this._y}function ss(t,e,n){var r=new Rl(e??T9,n??D9,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Rl(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function E1(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var qt=ss.prototype=Rl.prototype;qt.copy=function(){var t=new Rl(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=E1(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=E1(r));return t},qt.add=g9,qt.addAll=m9,qt.cover=y9,qt.data=b9,qt.extent=v9,qt.find=x9,qt.remove=_9,qt.removeAll=w9,qt.root=$9,qt.size=S9,qt.visit=A9,qt.visitAfter=M9,qt.x=P9,qt.y=L9;function Lt(t){return function(){return t}}function mn(t){return(t()-.5)*1e-6}function E9(t){return t.x+t.vx}function k9(t){return t.y+t.vy}function k1(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Lt(t==null?1:+t));function a(){for(var c,l=e.length,h,f,d,p,g,m,y=0;y<o;++y)for(h=ss(e,E9,k9).visitAfter(s),c=0;c<l;++c)f=e[c],g=n[f.index],m=g*g,d=f.x+f.vx,p=f.y+f.vy,h.visit(v);function v(x,b,w,$,A){var _=x.data,L=x.r,E=g+L;if(_){if(_.index>f.index){var T=d-_.x-_.vx,I=p-_.y-_.vy,P=T*T+I*I;P<E*E&&(T===0&&(T=mn(r),P+=T*T),I===0&&(I=mn(r),P+=I*I),P=(E-(P=Math.sqrt(P)))/P*i,f.vx+=(T*=P)*(E=(L*=L)/(m+L)),f.vy+=(I*=P)*E,_.vx-=T*(E=1-E),_.vy-=I*E)}return}return b>d+E||$<d-E||w>p+E||A<p-E}}function s(c){if(c.data)return c.r=n[c.data.index];for(var l=c.r=0;l<4;++l)c[l]&&c[l].r>c.r&&(c.r=c[l].r)}function u(){if(e){var c,l=e.length,h;for(n=new Array(l),c=0;c<l;++c)h=e[c],n[h.index]=+t(h,c,e)}}return a.initialize=function(c,l){e=c,r=l,u()},a.iterations=function(c){return arguments.length?(o=+c,a):o},a.strength=function(c){return arguments.length?(i=+c,a):i},a.radius=function(c){return arguments.length?(t=typeof c=="function"?c:Lt(+c),u(),a):t},a}function C9(t){return t.index}function C1(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function I9(t){var e=C9,n=h,r,i=Lt(30),o,a,s,u,c,l=1;t==null&&(t=[]);function h(m){return 1/Math.min(s[m.source.index],s[m.target.index])}function f(m){for(var y=0,v=t.length;y<l;++y)for(var x=0,b,w,$,A,_,L,E;x<v;++x)b=t[x],w=b.source,$=b.target,A=$.x+$.vx-w.x-w.vx||mn(c),_=$.y+$.vy-w.y-w.vy||mn(c),L=Math.sqrt(A*A+_*_),L=(L-o[x])/L*m*r[x],A*=L,_*=L,$.vx-=A*(E=u[x]),$.vy-=_*E,w.vx+=A*(E=1-E),w.vy+=_*E}function d(){if(a){var m,y=a.length,v=t.length,x=new Map(a.map((w,$)=>[e(w,$,a),w])),b;for(m=0,s=new Array(y);m<v;++m)b=t[m],b.index=m,typeof b.source!="object"&&(b.source=C1(x,b.source)),typeof b.target!="object"&&(b.target=C1(x,b.target)),s[b.source.index]=(s[b.source.index]||0)+1,s[b.target.index]=(s[b.target.index]||0)+1;for(m=0,u=new Array(v);m<v;++m)b=t[m],u[m]=s[b.source.index]/(s[b.source.index]+s[b.target.index]);r=new Array(v),p(),o=new Array(v),g()}}function p(){if(a)for(var m=0,y=t.length;m<y;++m)r[m]=+n(t[m],m,t)}function g(){if(a)for(var m=0,y=t.length;m<y;++m)o[m]=+i(t[m],m,t)}return f.initialize=function(m,y){a=m,c=y,d()},f.links=function(m){return arguments.length?(t=m,d(),f):t},f.id=function(m){return arguments.length?(e=m,f):e},f.iterations=function(m){return arguments.length?(l=+m,f):l},f.strength=function(m){return arguments.length?(n=typeof m=="function"?m:Lt(+m),p(),f):n},f.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Lt(+m),g(),f):i},f}const R9=1664525,N9=1013904223,I1=4294967296;function F9(){let t=1;return()=>(t=(R9*t+N9)%I1)/I1}function G9(t){return t.x}function z9(t){return t.y}var O9=10,U9=Math.PI*(3-Math.sqrt(5));function R1(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,u=Xa(h),c=Nn("tick","end"),l=F9();t==null&&(t=[]);function h(){f(),c.call("tick",e),n<r&&(u.stop(),c.call("end",e))}function f(g){var m,y=t.length,v;g===void 0&&(g=1);for(var x=0;x<g;++x)for(n+=(o-n)*i,s.forEach(function(b){b(n)}),m=0;m<y;++m)v=t[m],v.fx==null?v.x+=v.vx*=a:(v.x=v.fx,v.vx=0),v.fy==null?v.y+=v.vy*=a:(v.y=v.fy,v.vy=0);return e}function d(){for(var g=0,m=t.length,y;g<m;++g){if(y=t[g],y.index=g,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var v=O9*Math.sqrt(.5+g),x=g*U9;y.x=v*Math.cos(x),y.y=v*Math.sin(x)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function p(g){return g.initialize&&g.initialize(t,l),g}return d(),e={tick:f,restart:function(){return u.restart(h),e},stop:function(){return u.stop(),e},nodes:function(g){return arguments.length?(t=g,d(),s.forEach(p),e):t},alpha:function(g){return arguments.length?(n=+g,e):n},alphaMin:function(g){return arguments.length?(r=+g,e):r},alphaDecay:function(g){return arguments.length?(i=+g,e):+i},alphaTarget:function(g){return arguments.length?(o=+g,e):o},velocityDecay:function(g){return arguments.length?(a=1-g,e):1-a},randomSource:function(g){return arguments.length?(l=g,s.forEach(p),e):l},force:function(g,m){return arguments.length>1?(m==null?s.delete(g):s.set(g,p(m)),e):s.get(g)},find:function(g,m,y){var v=0,x=t.length,b,w,$,A,_;for(y==null?y=1/0:y*=y,v=0;v<x;++v)A=t[v],b=g-A.x,w=m-A.y,$=b*b+w*w,$<y&&(_=A,y=$);return _},on:function(g,m){return arguments.length>1?(c.on(g,m),e):c.on(g)}}}function N1(){var t,e,n,r,i=Lt(-30),o,a=1,s=1/0,u=.81;function c(d){var p,g=t.length,m=ss(t,G9,z9).visitAfter(h);for(r=d,p=0;p<g;++p)e=t[p],m.visit(f)}function l(){if(t){var d,p=t.length,g;for(o=new Array(p),d=0;d<p;++d)g=t[d],o[g.index]=+i(g,d,t)}}function h(d){var p=0,g,m,y=0,v,x,b;if(d.length){for(v=x=b=0;b<4;++b)(g=d[b])&&(m=Math.abs(g.value))&&(p+=g.value,y+=m,v+=m*g.x,x+=m*g.y);d.x=v/y,d.y=x/y}else{g=d,g.x=g.data.x,g.y=g.data.y;do p+=o[g.data.index];while(g=g.next)}d.value=p}function f(d,p,g,m){if(!d.value)return!0;var y=d.x-e.x,v=d.y-e.y,x=m-p,b=y*y+v*v;if(x*x/u<b)return b<s&&(y===0&&(y=mn(n),b+=y*y),v===0&&(v=mn(n),b+=v*v),b<a&&(b=Math.sqrt(a*b)),e.vx+=y*d.value*r/b,e.vy+=v*d.value*r/b),!0;if(d.length||b>=s)return;(d.data!==e||d.next)&&(y===0&&(y=mn(n),b+=y*y),v===0&&(v=mn(n),b+=v*v),b<a&&(b=Math.sqrt(a*b)));do d.data!==e&&(x=o[d.data.index]*r/b,e.vx+=y*x,e.vy+=v*x);while(d=d.next)}return c.initialize=function(d,p){t=d,n=p,l()},c.strength=function(d){return arguments.length?(i=typeof d=="function"?d:Lt(+d),l(),c):i},c.distanceMin=function(d){return arguments.length?(a=d*d,c):Math.sqrt(a)},c.distanceMax=function(d){return arguments.length?(s=d*d,c):Math.sqrt(s)},c.theta=function(d){return arguments.length?(u=d*d,c):Math.sqrt(u)},c}function B9(t,e,n){var r,i=Lt(.1),o,a;typeof t!="function"&&(t=Lt(+t)),e==null&&(e=0),n==null&&(n=0);function s(c){for(var l=0,h=r.length;l<h;++l){var f=r[l],d=f.x-e||1e-6,p=f.y-n||1e-6,g=Math.sqrt(d*d+p*p),m=(a[l]-g)*o[l]*c/g;f.vx+=d*m,f.vy+=p*m}}function u(){if(r){var c,l=r.length;for(o=new Array(l),a=new Array(l),c=0;c<l;++c)a[c]=+t(r[c],c,r),o[c]=isNaN(a[c])?0:+i(r[c],c,r)}}return s.initialize=function(c){r=c,u()},s.strength=function(c){return arguments.length?(i=typeof c=="function"?c:Lt(+c),u(),s):i},s.radius=function(c){return arguments.length?(t=typeof c=="function"?c:Lt(+c),u(),s):t},s.x=function(c){return arguments.length?(e=+c,s):e},s.y=function(c){return arguments.length?(n=+c,s):n},s}function F1(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(t==null?0:+t));function o(s){for(var u=0,c=n.length,l;u<c;++u)l=n[u],l.vx+=(i[u]-l.x)*r[u]*s}function a(){if(n){var s,u=n.length;for(r=new Array(u),i=new Array(u),s=0;s<u;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Lt(+s),a(),o):e},o.x=function(s){return arguments.length?(t=typeof s=="function"?s:Lt(+s),a(),o):t},o}function G1(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(t==null?0:+t));function o(s){for(var u=0,c=n.length,l;u<c;++u)l=n[u],l.vy+=(i[u]-l.y)*r[u]*s}function a(){if(n){var s,u=n.length;for(r=new Array(u),i=new Array(u),s=0;s<u;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Lt(+s),a(),o):e},o.y=function(s){return arguments.length?(t=typeof s=="function"?s:Lt(+s),a(),o):t},o}function Y9(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function us(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Yr(t){return t=us(Math.abs(t)),t?t[1]:NaN}function W9(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function H9(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var q9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Wr(t){if(!(e=q9.exec(t)))throw new Error("invalid format: "+t);var e;return new cs({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Wr.prototype=cs.prototype;function cs(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}cs.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function X9(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var z1;function j9(t,e){var n=us(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(z1=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+us(t,Math.max(0,e+o-1))[0]}function O1(t,e){var n=us(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const U1={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Y9,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>O1(t*100,e),r:O1,s:j9,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function B1(t){return t}var Y1=Array.prototype.map,W1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function H1(t){var e=t.grouping===void 0||t.thousands===void 0?B1:W9(Y1.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?B1:H9(Y1.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(h){h=Wr(h);var f=h.fill,d=h.align,p=h.sign,g=h.symbol,m=h.zero,y=h.width,v=h.comma,x=h.precision,b=h.trim,w=h.type;w==="n"?(v=!0,w="g"):U1[w]||(x===void 0&&(x=12),b=!0,w="g"),(m||f==="0"&&d==="=")&&(m=!0,f="0",d="=");var $=g==="$"?n:g==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",A=g==="$"?r:/[%p]/.test(w)?a:"",_=U1[w],L=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function E(T){var I=$,P=A,D,C,S;if(w==="c")P=_(T)+P,T="";else{T=+T;var R=T<0||1/T<0;if(T=isNaN(T)?u:_(Math.abs(T),x),b&&(T=X9(T)),R&&+T==0&&p!=="+"&&(R=!1),I=(R?p==="("?p:s:p==="-"||p==="("?"":p)+I,P=(w==="s"?W1[8+z1/3]:"")+P+(R&&p==="("?")":""),L){for(D=-1,C=T.length;++D<C;)if(S=T.charCodeAt(D),48>S||S>57){P=(S===46?i+T.slice(D+1):T.slice(D))+P,T=T.slice(0,D);break}}}v&&!m&&(T=e(T,1/0));var G=I.length+T.length+P.length,M=G<y?new Array(y-G+1).join(f):"";switch(v&&m&&(T=e(M+T,M.length?y-P.length:1/0),M=""),d){case"<":T=I+T+P+M;break;case"=":T=I+M+T+P;break;case"^":T=M.slice(0,G=M.length>>1)+I+T+P+M.slice(G);break;default:T=M+I+T+P;break}return o(T)}return E.toString=function(){return h+""},E}function l(h,f){var d=c((h=Wr(h),h.type="f",h)),p=Math.max(-8,Math.min(8,Math.floor(Yr(f)/3)))*3,g=Math.pow(10,-p),m=W1[8+p/3];return function(y){return d(g*y)+m}}return{format:c,formatPrefix:l}}var ls,eo,Nl;q1({thousands:",",grouping:[3],currency:["$",""]});function q1(t){return ls=H1(t),eo=ls.format,Nl=ls.formatPrefix,ls}function X1(t){return Math.max(0,-Yr(Math.abs(t)))}function j1(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Yr(e)/3)))*3-Yr(Math.abs(t)))}function V1(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Yr(e)-Yr(t))+1}var et=1e-6,no=1e-12,ht=Math.PI,St=ht/2,fs=ht/4,Xt=ht*2,yt=180/ht,nt=ht/180,dt=Math.abs,Hr=Math.atan,jt=Math.atan2,J=Math.cos,hs=Math.ceil,Z1=Math.exp,Fl=Math.hypot,ds=Math.log,Gl=Math.pow,K=Math.sin,de=Math.sign||function(t){return t>0?1:t<0?-1:0},It=Math.sqrt,zl=Math.tan;function K1(t){return t>1?0:t<-1?ht:Math.acos(t)}function Vt(t){return t>1?St:t<-1?-St:Math.asin(t)}function Q1(t){return(t=K(t/2))*t}function wt(){}function ps(t,e){t&&tm.hasOwnProperty(t.type)&&tm[t.type](t,e)}var J1={Feature:function(t,e){ps(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)ps(n[r].geometry,e)}},tm={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Ol(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Ol(n[r],e,0)},Polygon:function(t,e){em(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)em(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)ps(n[r],e)}};function Ol(t,e,n){var r=-1,i=t.length-n,o;for(e.lineStart();++r<i;)o=t[r],e.point(o[0],o[1],o[2]);e.lineEnd()}function em(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Ol(t[n],e,1);e.polygonEnd()}function Pe(t,e){t&&J1.hasOwnProperty(t.type)?J1[t.type](t,e):ps(t,e)}var gs=new Dt,ms=new Dt,nm,rm,Ul,Bl,Yl,Ne={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){gs=new Dt,Ne.lineStart=V9,Ne.lineEnd=Z9},polygonEnd:function(){var t=+gs;ms.add(t<0?Xt+t:t),this.lineStart=this.lineEnd=this.point=wt},sphere:function(){ms.add(Xt)}};function V9(){Ne.point=K9}function Z9(){im(nm,rm)}function K9(t,e){Ne.point=im,nm=t,rm=e,t*=nt,e*=nt,Ul=t,Bl=J(e=e/2+fs),Yl=K(e)}function im(t,e){t*=nt,e*=nt,e=e/2+fs;var n=t-Ul,r=n>=0?1:-1,i=r*n,o=J(e),a=K(e),s=Yl*a,u=Bl*o+s*J(i),c=s*r*K(i);gs.add(jt(c,u)),Ul=t,Bl=o,Yl=a}function Q9(t){return ms=new Dt,Pe(t,Ne),ms*2}function ys(t){return[jt(t[1],t[0]),Vt(t[2])]}function Kn(t){var e=t[0],n=t[1],r=J(n);return[r*J(e),r*K(e),K(n)]}function bs(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function qr(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Wl(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function vs(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function xs(t){var e=It(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var $t,re,At,ue,Qn,om,am,Xr,ro,yn,Qe,Je={point:Hl,lineStart:um,lineEnd:cm,polygonStart:function(){Je.point=lm,Je.lineStart=J9,Je.lineEnd=tT,ro=new Dt,Ne.polygonStart()},polygonEnd:function(){Ne.polygonEnd(),Je.point=Hl,Je.lineStart=um,Je.lineEnd=cm,gs<0?($t=-(At=180),re=-(ue=90)):ro>et?ue=90:ro<-et&&(re=-90),Qe[0]=$t,Qe[1]=At},sphere:function(){$t=-(At=180),re=-(ue=90)}};function Hl(t,e){yn.push(Qe=[$t=t,At=t]),e<re&&(re=e),e>ue&&(ue=e)}function sm(t,e){var n=Kn([t*nt,e*nt]);if(Xr){var r=qr(Xr,n),i=[r[1],-r[0],0],o=qr(i,r);xs(o),o=ys(o);var a=t-Qn,s=a>0?1:-1,u=o[0]*yt*s,c,l=dt(a)>180;l^(s*Qn<u&&u<s*t)?(c=o[1]*yt,c>ue&&(ue=c)):(u=(u+360)%360-180,l^(s*Qn<u&&u<s*t)?(c=-o[1]*yt,c<re&&(re=c)):(e<re&&(re=e),e>ue&&(ue=e))),l?t<Qn?ce($t,t)>ce($t,At)&&(At=t):ce(t,At)>ce($t,At)&&($t=t):At>=$t?(t<$t&&($t=t),t>At&&(At=t)):t>Qn?ce($t,t)>ce($t,At)&&(At=t):ce(t,At)>ce($t,At)&&($t=t)}else yn.push(Qe=[$t=t,At=t]);e<re&&(re=e),e>ue&&(ue=e),Xr=n,Qn=t}function um(){Je.point=sm}function cm(){Qe[0]=$t,Qe[1]=At,Je.point=Hl,Xr=null}function lm(t,e){if(Xr){var n=t-Qn;ro.add(dt(n)>180?n+(n>0?360:-360):n)}else om=t,am=e;Ne.point(t,e),sm(t,e)}function J9(){Ne.lineStart()}function tT(){lm(om,am),Ne.lineEnd(),dt(ro)>et&&($t=-(At=180)),Qe[0]=$t,Qe[1]=At,Xr=null}function ce(t,e){return(e-=t)<0?e+360:e}function eT(t,e){return t[0]-e[0]}function fm(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function nT(t){var e,n,r,i,o,a,s;if(ue=At=-($t=re=1/0),yn=[],Pe(t,Je),n=yn.length){for(yn.sort(eT),e=1,r=yn[0],o=[r];e<n;++e)i=yn[e],fm(r,i[0])||fm(r,i[1])?(ce(r[0],i[1])>ce(r[0],r[1])&&(r[1]=i[1]),ce(i[0],r[1])>ce(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,e=0,r=o[n];e<=n;r=i,++e)i=o[e],(s=ce(r[1],i[0]))>a&&(a=s,$t=i[0],At=r[1])}return yn=Qe=null,$t===1/0||re===1/0?[[NaN,NaN],[NaN,NaN]]:[[$t,re],[At,ue]]}var io,_s,ws,$s,Ss,As,Ms,Ts,ql,Xl,jl,hm,dm,Zt,Kt,Qt,De={sphere:wt,point:Vl,lineStart:pm,lineEnd:gm,polygonStart:function(){De.lineStart=oT,De.lineEnd=aT},polygonEnd:function(){De.lineStart=pm,De.lineEnd=gm}};function Vl(t,e){t*=nt,e*=nt;var n=J(e);oo(n*J(t),n*K(t),K(e))}function oo(t,e,n){++io,ws+=(t-ws)/io,$s+=(e-$s)/io,Ss+=(n-Ss)/io}function pm(){De.point=rT}function rT(t,e){t*=nt,e*=nt;var n=J(e);Zt=n*J(t),Kt=n*K(t),Qt=K(e),De.point=iT,oo(Zt,Kt,Qt)}function iT(t,e){t*=nt,e*=nt;var n=J(e),r=n*J(t),i=n*K(t),o=K(e),a=jt(It((a=Kt*o-Qt*i)*a+(a=Qt*r-Zt*o)*a+(a=Zt*i-Kt*r)*a),Zt*r+Kt*i+Qt*o);_s+=a,As+=a*(Zt+(Zt=r)),Ms+=a*(Kt+(Kt=i)),Ts+=a*(Qt+(Qt=o)),oo(Zt,Kt,Qt)}function gm(){De.point=Vl}function oT(){De.point=sT}function aT(){mm(hm,dm),De.point=Vl}function sT(t,e){hm=t,dm=e,t*=nt,e*=nt,De.point=mm;var n=J(e);Zt=n*J(t),Kt=n*K(t),Qt=K(e),oo(Zt,Kt,Qt)}function mm(t,e){t*=nt,e*=nt;var n=J(e),r=n*J(t),i=n*K(t),o=K(e),a=Kt*o-Qt*i,s=Qt*r-Zt*o,u=Zt*i-Kt*r,c=Fl(a,s,u),l=Vt(c),h=c&&-l/c;ql.add(h*a),Xl.add(h*s),jl.add(h*u),_s+=l,As+=l*(Zt+(Zt=r)),Ms+=l*(Kt+(Kt=i)),Ts+=l*(Qt+(Qt=o)),oo(Zt,Kt,Qt)}function uT(t){io=_s=ws=$s=Ss=As=Ms=Ts=0,ql=new Dt,Xl=new Dt,jl=new Dt,Pe(t,De);var e=+ql,n=+Xl,r=+jl,i=Fl(e,n,r);return i<no&&(e=As,n=Ms,r=Ts,_s<et&&(e=ws,n=$s,r=Ss),i=Fl(e,n,r),i<no)?[NaN,NaN]:[jt(n,e)*yt,Vt(r/i)*yt]}function jr(t){return function(){return t}}function Zl(t,e){function n(r,i){return r=t(r,i),e(r[0],r[1])}return t.invert&&e.invert&&(n.invert=function(r,i){return r=e.invert(r,i),r&&t.invert(r[0],r[1])}),n}function Kl(t,e){return dt(t)>ht&&(t-=Math.round(t/Xt)*Xt),[t,e]}Kl.invert=Kl;function Ql(t,e,n){return(t%=Xt)?e||n?Zl(bm(t),vm(e,n)):bm(t):e||n?vm(e,n):Kl}function ym(t){return function(e,n){return e+=t,dt(e)>ht&&(e-=Math.round(e/Xt)*Xt),[e,n]}}function bm(t){var e=ym(t);return e.invert=ym(-t),e}function vm(t,e){var n=J(t),r=K(t),i=J(e),o=K(e);function a(s,u){var c=J(u),l=J(s)*c,h=K(s)*c,f=K(u),d=f*n+l*r;return[jt(h*i-d*o,l*n-f*r),Vt(d*i+h*o)]}return a.invert=function(s,u){var c=J(u),l=J(s)*c,h=K(s)*c,f=K(u),d=f*i-h*o;return[jt(h*i+f*o,l*n+d*r),Vt(d*n-l*r)]},a}function xm(t){t=Ql(t[0]*nt,t[1]*nt,t.length>2?t[2]*nt:0);function e(n){return n=t(n[0]*nt,n[1]*nt),n[0]*=yt,n[1]*=yt,n}return e.invert=function(n){return n=t.invert(n[0]*nt,n[1]*nt),n[0]*=yt,n[1]*=yt,n},e}function _m(t,e,n,r,i,o){if(n){var a=J(e),s=K(e),u=r*n;i==null?(i=e+r*Xt,o=e-u/2):(i=wm(a,i),o=wm(a,o),(r>0?i<o:i>o)&&(i+=r*Xt));for(var c,l=i;r>0?l>o:l<o;l-=u)c=ys([a,-s*J(l),-s*K(l)]),t.point(c[0],c[1])}}function wm(t,e){e=Kn(e),e[0]-=t,xs(e);var n=K1(-e[1]);return((-e[2]<0?-n:n)+Xt-et)%Xt}function cT(){var t=jr([0,0]),e=jr(90),n=jr(2),r,i,o={point:a};function a(u,c){r.push(u=i(u,c)),u[0]*=yt,u[1]*=yt}function s(){var u=t.apply(this,arguments),c=e.apply(this,arguments)*nt,l=n.apply(this,arguments)*nt;return r=[],i=Ql(-u[0]*nt,-u[1]*nt,0).invert,_m(o,c,l,1),u={type:"Polygon",coordinates:[r]},r=i=null,u}return s.center=function(u){return arguments.length?(t=typeof u=="function"?u:jr([+u[0],+u[1]]),s):t},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:jr(+u),s):e},s.precision=function(u){return arguments.length?(n=typeof u=="function"?u:jr(+u),s):n},s}function $m(){var t=[],e;return{point:function(n,r,i){e.push([n,r,i])},lineStart:function(){t.push(e=[])},lineEnd:wt,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Ps(t,e){return dt(t[0]-e[0])<et&&dt(t[1]-e[1])<et}function Ds(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Sm(t,e,n,r,i){var o=[],a=[],s,u;if(t.forEach(function(p){if(!((g=p.length-1)<=0)){var g,m=p[0],y=p[g],v;if(Ps(m,y)){if(!m[2]&&!y[2]){for(i.lineStart(),s=0;s<g;++s)i.point((m=p[s])[0],m[1]);i.lineEnd();return}y[0]+=2*et}o.push(v=new Ds(m,p,null,!0)),a.push(v.o=new Ds(m,null,v,!1)),o.push(v=new Ds(y,p,null,!1)),a.push(v.o=new Ds(y,null,v,!0))}}),!!o.length){for(a.sort(e),Am(o),Am(a),s=0,u=a.length;s<u;++s)a[s].e=n=!n;for(var c=o[0],l,h;;){for(var f=c,d=!0;f.v;)if((f=f.n)===c)return;l=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(s=0,u=l.length;s<u;++s)i.point((h=l[s])[0],h[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(d)for(l=f.p.z,s=l.length-1;s>=0;--s)i.point((h=l[s])[0],h[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,l=f.z,d=!d}while(!f.v);i.lineEnd()}}}function Am(t){if(e=t.length){for(var e,n=0,r=t[0],i;++n<e;)r.n=i=t[n],i.p=r,r=i;r.n=i=t[0],i.p=r}}function Jl(t){return dt(t[0])<=ht?t[0]:de(t[0])*((dt(t[0])+ht)%Xt-ht)}function Mm(t,e){var n=Jl(e),r=e[1],i=K(r),o=[K(n),-J(n),0],a=0,s=0,u=new Dt;i===1?r=St+et:i===-1&&(r=-St-et);for(var c=0,l=t.length;c<l;++c)if(f=(h=t[c]).length)for(var h,f,d=h[f-1],p=Jl(d),g=d[1]/2+fs,m=K(g),y=J(g),v=0;v<f;++v,p=b,m=$,y=A,d=x){var x=h[v],b=Jl(x),w=x[1]/2+fs,$=K(w),A=J(w),_=b-p,L=_>=0?1:-1,E=L*_,T=E>ht,I=m*$;if(u.add(jt(I*L*K(E),y*A+I*J(E))),a+=T?_+L*Xt:_,T^p>=n^b>=n){var P=qr(Kn(d),Kn(x));xs(P);var D=qr(o,P);xs(D);var C=(T^_>=0?-1:1)*Vt(D[2]);(r>C||r===C&&(P[0]||P[1]))&&(s+=T^_>=0?1:-1)}}return(a<-et||a<et&&u<-no)^s&1}function Tm(t,e,n,r){return function(i){var o=e(i),a=$m(),s=e(a),u=!1,c,l,h,f={point:d,lineStart:g,lineEnd:m,polygonStart:function(){f.point=y,f.lineStart=v,f.lineEnd=x,l=[],c=[]},polygonEnd:function(){f.point=d,f.lineStart=g,f.lineEnd=m,l=Lc(l);var b=Mm(c,r);l.length?(u||(i.polygonStart(),u=!0),Sm(l,fT,b,n,i)):b&&(u||(i.polygonStart(),u=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),u&&(i.polygonEnd(),u=!1),l=c=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(b,w){t(b,w)&&i.point(b,w)}function p(b,w){o.point(b,w)}function g(){f.point=p,o.lineStart()}function m(){f.point=d,o.lineEnd()}function y(b,w){h.push([b,w]),s.point(b,w)}function v(){s.lineStart(),h=[]}function x(){y(h[0][0],h[0][1]),s.lineEnd();var b=s.clean(),w=a.result(),$,A=w.length,_,L,E;if(h.pop(),c.push(h),h=null,!!A){if(b&1){if(L=w[0],(_=L.length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),$=0;$<_;++$)i.point((E=L[$])[0],E[1]);i.lineEnd()}return}A>1&&b&2&&w.push(w.pop().concat(w.shift())),l.push(w.filter(lT))}}return f}}function lT(t){return t.length>1}function fT(t,e){return((t=t.x)[0]<0?t[1]-St-et:St-t[1])-((e=e.x)[0]<0?e[1]-St-et:St-e[1])}const tf=Tm(function(){return!0},hT,pT,[-ht,-St]);function hT(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(o,a){var s=o>0?ht:-ht,u=dt(o-e);dt(u-ht)<et?(t.point(e,n=(n+a)/2>0?St:-St),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(o,n),i=0):r!==s&&u>=ht&&(dt(e-r)<et&&(e-=r*et),dt(o-s)<et&&(o-=s*et),n=dT(e,n,o,a),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),i=0),t.point(e=o,n=a),r=s},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-i}}}function dT(t,e,n,r){var i,o,a=K(t-n);return dt(a)>et?Hr((K(e)*(o=J(r))*K(n)-K(r)*(i=J(e))*K(t))/(i*o*a)):(e+r)/2}function pT(t,e,n,r){var i;if(t==null)i=n*St,r.point(-ht,i),r.point(0,i),r.point(ht,i),r.point(ht,0),r.point(ht,-i),r.point(0,-i),r.point(-ht,-i),r.point(-ht,0),r.point(-ht,i);else if(dt(t[0]-e[0])>et){var o=t[0]<e[0]?ht:-ht;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function Pm(t){var e=J(t),n=2*nt,r=e>0,i=dt(e)>et;function o(l,h,f,d){_m(d,t,n,f,l,h)}function a(l,h){return J(l)*J(h)>e}function s(l){var h,f,d,p,g;return{lineStart:function(){p=d=!1,g=1},point:function(m,y){var v=[m,y],x,b=a(m,y),w=r?b?0:c(m,y):b?c(m+(m<0?ht:-ht),y):0;if(!h&&(p=d=b)&&l.lineStart(),b!==d&&(x=u(h,v),(!x||Ps(h,x)||Ps(v,x))&&(v[2]=1)),b!==d)g=0,b?(l.lineStart(),x=u(v,h),l.point(x[0],x[1])):(x=u(h,v),l.point(x[0],x[1],2),l.lineEnd()),h=x;else if(i&&h&&r^b){var $;!(w&f)&&($=u(v,h,!0))&&(g=0,r?(l.lineStart(),l.point($[0][0],$[0][1]),l.point($[1][0],$[1][1]),l.lineEnd()):(l.point($[1][0],$[1][1]),l.lineEnd(),l.lineStart(),l.point($[0][0],$[0][1],3)))}b&&(!h||!Ps(h,v))&&l.point(v[0],v[1]),h=v,d=b,f=w},lineEnd:function(){d&&l.lineEnd(),h=null},clean:function(){return g|(p&&d)<<1}}}function u(l,h,f){var d=Kn(l),p=Kn(h),g=[1,0,0],m=qr(d,p),y=bs(m,m),v=m[0],x=y-v*v;if(!x)return!f&&l;var b=e*y/x,w=-e*v/x,$=qr(g,m),A=vs(g,b),_=vs(m,w);Wl(A,_);var L=$,E=bs(A,L),T=bs(L,L),I=E*E-T*(bs(A,A)-1);if(!(I<0)){var P=It(I),D=vs(L,(-E-P)/T);if(Wl(D,A),D=ys(D),!f)return D;var C=l[0],S=h[0],R=l[1],G=h[1],M;S<C&&(M=C,C=S,S=M);var N=S-C,z=dt(N-ht)<et,k=z||N<et;if(!z&&G<R&&(M=R,R=G,G=M),k?z?R+G>0^D[1]<(dt(D[0]-C)<et?R:G):R<=D[1]&&D[1]<=G:N>ht^(C<=D[0]&&D[0]<=S)){var Y=vs(L,(-E+P)/T);return Wl(Y,A),[D,ys(Y)]}}}function c(l,h){var f=r?t:ht-t,d=0;return l<-f?d|=1:l>f&&(d|=2),h<-f?d|=4:h>f&&(d|=8),d}return Tm(a,s,o,r?[0,-t]:[-ht,t-ht])}function gT(t,e,n,r,i,o){var a=t[0],s=t[1],u=e[0],c=e[1],l=0,h=1,f=u-a,d=c-s,p;if(p=n-a,!(!f&&p>0)){if(p/=f,f<0){if(p<l)return;p<h&&(h=p)}else if(f>0){if(p>h)return;p>l&&(l=p)}if(p=i-a,!(!f&&p<0)){if(p/=f,f<0){if(p>h)return;p>l&&(l=p)}else if(f>0){if(p<l)return;p<h&&(h=p)}if(p=r-s,!(!d&&p>0)){if(p/=d,d<0){if(p<l)return;p<h&&(h=p)}else if(d>0){if(p>h)return;p>l&&(l=p)}if(p=o-s,!(!d&&p<0)){if(p/=d,d<0){if(p>h)return;p>l&&(l=p)}else if(d>0){if(p<l)return;p<h&&(h=p)}return l>0&&(t[0]=a+l*f,t[1]=s+l*d),h<1&&(e[0]=a+h*f,e[1]=s+h*d),!0}}}}}var ao=1e9,Ls=-ao;function Es(t,e,n,r){function i(c,l){return t<=c&&c<=n&&e<=l&&l<=r}function o(c,l,h,f){var d=0,p=0;if(c==null||(d=a(c,h))!==(p=a(l,h))||u(c,l)<0^h>0)do f.point(d===0||d===3?t:n,d>1?r:e);while((d=(d+h+4)%4)!==p);else f.point(l[0],l[1])}function a(c,l){return dt(c[0]-t)<et?l>0?0:3:dt(c[0]-n)<et?l>0?2:1:dt(c[1]-e)<et?l>0?1:0:l>0?3:2}function s(c,l){return u(c.x,l.x)}function u(c,l){var h=a(c,1),f=a(l,1);return h!==f?h-f:h===0?l[1]-c[1]:h===1?c[0]-l[0]:h===2?c[1]-l[1]:l[0]-c[0]}return function(c){var l=c,h=$m(),f,d,p,g,m,y,v,x,b,w,$,A={point:_,lineStart:I,lineEnd:P,polygonStart:E,polygonEnd:T};function _(C,S){i(C,S)&&l.point(C,S)}function L(){for(var C=0,S=0,R=d.length;S<R;++S)for(var G=d[S],M=1,N=G.length,z=G[0],k,Y,j=z[0],W=z[1];M<N;++M)k=j,Y=W,z=G[M],j=z[0],W=z[1],Y<=r?W>r&&(j-k)*(r-Y)>(W-Y)*(t-k)&&++C:W<=r&&(j-k)*(r-Y)<(W-Y)*(t-k)&&--C;return C}function E(){l=h,f=[],d=[],$=!0}function T(){var C=L(),S=$&&C,R=(f=Lc(f)).length;(S||R)&&(c.polygonStart(),S&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),R&&Sm(f,s,C,o,c),c.polygonEnd()),l=c,f=d=p=null}function I(){A.point=D,d&&d.push(p=[]),w=!0,b=!1,v=x=NaN}function P(){f&&(D(g,m),y&&b&&h.rejoin(),f.push(h.result())),A.point=_,b&&l.lineEnd()}function D(C,S){var R=i(C,S);if(d&&p.push([C,S]),w)g=C,m=S,y=R,w=!1,R&&(l.lineStart(),l.point(C,S));else if(R&&b)l.point(C,S);else{var G=[v=Math.max(Ls,Math.min(ao,v)),x=Math.max(Ls,Math.min(ao,x))],M=[C=Math.max(Ls,Math.min(ao,C)),S=Math.max(Ls,Math.min(ao,S))];gT(G,M,t,e,n,r)?(b||(l.lineStart(),l.point(G[0],G[1])),l.point(M[0],M[1]),R||l.lineEnd(),$=!1):R&&(l.lineStart(),l.point(C,S),$=!1)}v=C,x=S,b=R}return A}}function mT(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Es(t,e,n,r)(o=s)},extent:function(s){return arguments.length?(t=+s[0][0],e=+s[0][1],n=+s[1][0],r=+s[1][1],i=o=null,a):[[t,e],[n,r]]}}}var ef,nf,ks,Cs,Vr={sphere:wt,point:wt,lineStart:yT,lineEnd:wt,polygonStart:wt,polygonEnd:wt};function yT(){Vr.point=vT,Vr.lineEnd=bT}function bT(){Vr.point=Vr.lineEnd=wt}function vT(t,e){t*=nt,e*=nt,nf=t,ks=K(e),Cs=J(e),Vr.point=xT}function xT(t,e){t*=nt,e*=nt;var n=K(e),r=J(e),i=dt(t-nf),o=J(i),a=K(i),s=r*a,u=Cs*n-ks*r*o,c=ks*n+Cs*r*o;ef.add(jt(It(s*s+u*u),c)),nf=t,ks=n,Cs=r}function Dm(t){return ef=new Dt,Pe(t,Vr),+ef}var rf=[null,null],_T={type:"LineString",coordinates:rf};function Is(t,e){return rf[0]=t,rf[1]=e,Dm(_T)}var Lm={Feature:function(t,e){return Rs(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Rs(n[r].geometry,e))return!0;return!1}},Em={Sphere:function(){return!0},Point:function(t,e){return km(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(km(n[r],e))return!0;return!1},LineString:function(t,e){return Cm(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Cm(n[r],e))return!0;return!1},Polygon:function(t,e){return Im(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Im(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Rs(n[r],e))return!0;return!1}};function Rs(t,e){return t&&Em.hasOwnProperty(t.type)?Em[t.type](t,e):!1}function km(t,e){return Is(t,e)===0}function Cm(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=Is(t[o],e),r===0||o>0&&(i=Is(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<no*i))return!0;n=r}return!1}function Im(t,e){return!!Mm(t.map(wT),Rm(e))}function wT(t){return t=t.map(Rm),t.pop(),t}function Rm(t){return[t[0]*nt,t[1]*nt]}function $T(t,e){return(t&&Lm.hasOwnProperty(t.type)?Lm[t.type]:Rs)(t,e)}function Nm(t,e,n){var r=ln(t,e-et,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function Fm(t,e,n){var r=ln(t,e-et,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function Gm(){var t,e,n,r,i,o,a,s,u=10,c=u,l=90,h=360,f,d,p,g,m=2.5;function y(){return{type:"MultiLineString",coordinates:v()}}function v(){return ln(hs(r/l)*l,n,l).map(p).concat(ln(hs(s/h)*h,a,h).map(g)).concat(ln(hs(e/u)*u,t,u).filter(function(x){return dt(x%l)>et}).map(f)).concat(ln(hs(o/c)*c,i,c).filter(function(x){return dt(x%h)>et}).map(d))}return y.lines=function(){return v().map(function(x){return{type:"LineString",coordinates:x}})},y.outline=function(){return{type:"Polygon",coordinates:[p(r).concat(g(a).slice(1),p(n).reverse().slice(1),g(s).reverse().slice(1))]}},y.extent=function(x){return arguments.length?y.extentMajor(x).extentMinor(x):y.extentMinor()},y.extentMajor=function(x){return arguments.length?(r=+x[0][0],n=+x[1][0],s=+x[0][1],a=+x[1][1],r>n&&(x=r,r=n,n=x),s>a&&(x=s,s=a,a=x),y.precision(m)):[[r,s],[n,a]]},y.extentMinor=function(x){return arguments.length?(e=+x[0][0],t=+x[1][0],o=+x[0][1],i=+x[1][1],e>t&&(x=e,e=t,t=x),o>i&&(x=o,o=i,i=x),y.precision(m)):[[e,o],[t,i]]},y.step=function(x){return arguments.length?y.stepMajor(x).stepMinor(x):y.stepMinor()},y.stepMajor=function(x){return arguments.length?(l=+x[0],h=+x[1],y):[l,h]},y.stepMinor=function(x){return arguments.length?(u=+x[0],c=+x[1],y):[u,c]},y.precision=function(x){return arguments.length?(m=+x,f=Nm(o,i,90),d=Fm(e,t,m),p=Nm(s,a,90),g=Fm(r,n,m),y):m},y.extentMajor([[-180,-90+et],[180,90-et]]).extentMinor([[-180,-80-et],[180,80+et]])}function ST(){return Gm()()}function AT(t,e){var n=t[0]*nt,r=t[1]*nt,i=e[0]*nt,o=e[1]*nt,a=J(r),s=K(r),u=J(o),c=K(o),l=a*J(n),h=a*K(n),f=u*J(i),d=u*K(i),p=2*Vt(It(Q1(o-r)+a*u*Q1(i-n))),g=K(p),m=p?function(y){var v=K(y*=p)/g,x=K(p-y)/g,b=x*l+v*f,w=x*h+v*d,$=x*s+v*c;return[jt(w,b)*yt,jt($,It(b*b+w*w))*yt]}:function(){return[n*yt,r*yt]};return m.distance=p,m}const so=t=>t;var of=new Dt,af=new Dt,zm,Om,sf,uf,tn={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){tn.lineStart=MT,tn.lineEnd=PT},polygonEnd:function(){tn.lineStart=tn.lineEnd=tn.point=wt,of.add(dt(af)),af=new Dt},result:function(){var t=of/2;return of=new Dt,t}};function MT(){tn.point=TT}function TT(t,e){tn.point=Um,zm=sf=t,Om=uf=e}function Um(t,e){af.add(uf*t-sf*e),sf=t,uf=e}function PT(){Um(zm,Om)}var Zr=1/0,Ns=Zr,uo=-Zr,Fs=uo,Gs={point:DT,lineStart:wt,lineEnd:wt,polygonStart:wt,polygonEnd:wt,result:function(){var t=[[Zr,Ns],[uo,Fs]];return uo=Fs=-(Ns=Zr=1/0),t}};function DT(t,e){t<Zr&&(Zr=t),t>uo&&(uo=t),e<Ns&&(Ns=e),e>Fs&&(Fs=e)}var cf=0,lf=0,co=0,zs=0,Os=0,Kr=0,ff=0,hf=0,lo=0,Bm,Ym,Fe,Ge,pe={point:Jn,lineStart:Wm,lineEnd:Hm,polygonStart:function(){pe.lineStart=kT,pe.lineEnd=CT},polygonEnd:function(){pe.point=Jn,pe.lineStart=Wm,pe.lineEnd=Hm},result:function(){var t=lo?[ff/lo,hf/lo]:Kr?[zs/Kr,Os/Kr]:co?[cf/co,lf/co]:[NaN,NaN];return cf=lf=co=zs=Os=Kr=ff=hf=lo=0,t}};function Jn(t,e){cf+=t,lf+=e,++co}function Wm(){pe.point=LT}function LT(t,e){pe.point=ET,Jn(Fe=t,Ge=e)}function ET(t,e){var n=t-Fe,r=e-Ge,i=It(n*n+r*r);zs+=i*(Fe+t)/2,Os+=i*(Ge+e)/2,Kr+=i,Jn(Fe=t,Ge=e)}function Hm(){pe.point=Jn}function kT(){pe.point=IT}function CT(){qm(Bm,Ym)}function IT(t,e){pe.point=qm,Jn(Bm=Fe=t,Ym=Ge=e)}function qm(t,e){var n=t-Fe,r=e-Ge,i=It(n*n+r*r);zs+=i*(Fe+t)/2,Os+=i*(Ge+e)/2,Kr+=i,i=Ge*t-Fe*e,ff+=i*(Fe+t),hf+=i*(Ge+e),lo+=i*3,Jn(Fe=t,Ge=e)}function Xm(t){this._context=t}Xm.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Xt);break}}},result:wt};var df=new Dt,pf,jm,Vm,fo,ho,po={point:wt,lineStart:function(){po.point=RT},lineEnd:function(){pf&&Zm(jm,Vm),po.point=wt},polygonStart:function(){pf=!0},polygonEnd:function(){pf=null},result:function(){var t=+df;return df=new Dt,t}};function RT(t,e){po.point=Zm,jm=fo=t,Vm=ho=e}function Zm(t,e){fo-=t,ho-=e,df.add(It(fo*fo+ho*ho)),fo=t,ho=e}let Km,Us,Qm,Jm;class ty{constructor(e){this._append=e==null?ey:NT(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,n){switch(this._point){case 0:{this._append`M${e},${n}`,this._point=1;break}case 1:{this._append`L${e},${n}`;break}default:{if(this._append`M${e},${n}`,this._radius!==Qm||this._append!==Us){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,Qm=r,Us=this._append,Jm=this._,this._=i}this._+=Jm;break}}}result(){const e=this._;return this._="",e.length?e:null}}function ey(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function NT(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return ey;if(e!==Km){const n=10**e;Km=e,Us=function(i){let o=1;this._+=i[0];for(const a=i.length;o<a;++o)this._+=Math.round(arguments[o]*n)/n+i[o]}}return Us}function FT(t,e){let n=3,r=4.5,i,o;function a(s){return s&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),Pe(s,i(o))),o.result()}return a.area=function(s){return Pe(s,i(tn)),tn.result()},a.measure=function(s){return Pe(s,i(po)),po.result()},a.bounds=function(s){return Pe(s,i(Gs)),Gs.result()},a.centroid=function(s){return Pe(s,i(pe)),pe.result()},a.projection=function(s){return arguments.length?(i=s==null?(t=null,so):(t=s).stream,a):t},a.context=function(s){return arguments.length?(o=s==null?(e=null,new ty(n)):new Xm(e=s),typeof r!="function"&&o.pointRadius(r),a):e},a.pointRadius=function(s){return arguments.length?(r=typeof s=="function"?s:(o.pointRadius(+s),+s),a):r},a.digits=function(s){if(!arguments.length)return n;if(s==null)n=null;else{const u=Math.floor(s);if(!(u>=0))throw new RangeError(`invalid digits: ${s}`);n=u}return e===null&&(o=new ty(n)),a},a.projection(t).digits(n).context(e)}function GT(t){return{stream:go(t)}}function go(t){return function(e){var n=new gf;for(var r in t)n[r]=t[r];return n.stream=e,n}}function gf(){}gf.prototype={constructor:gf,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function mf(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),Pe(n,t.stream(Gs)),e(Gs.result()),r!=null&&t.clipExtent(r),t}function Bs(t,e,n){return mf(t,function(r){var i=e[1][0]-e[0][0],o=e[1][1]-e[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),s=+e[0][0]+(i-a*(r[1][0]+r[0][0]))/2,u=+e[0][1]+(o-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([s,u])},n)}function yf(t,e,n){return Bs(t,[[0,0],e],n)}function bf(t,e,n){return mf(t,function(r){var i=+e,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,s=-o*r[0][1];t.scale(150*o).translate([a,s])},n)}function vf(t,e,n){return mf(t,function(r){var i=+e,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],s=(i-o*(r[1][1]+r[0][1]))/2;t.scale(150*o).translate([a,s])},n)}var ny=16,zT=J(30*nt);function ry(t,e){return+e?UT(t,e):OT(t)}function OT(t){return go({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function UT(t,e){function n(r,i,o,a,s,u,c,l,h,f,d,p,g,m){var y=c-r,v=l-i,x=y*y+v*v;if(x>4*e&&g--){var b=a+f,w=s+d,$=u+p,A=It(b*b+w*w+$*$),_=Vt($/=A),L=dt(dt($)-1)<et||dt(o-h)<et?(o+h)/2:jt(w,b),E=t(L,_),T=E[0],I=E[1],P=T-r,D=I-i,C=v*P-y*D;(C*C/x>e||dt((y*P+v*D)/x-.5)>.3||a*f+s*d+u*p<zT)&&(n(r,i,o,a,s,u,T,I,L,b/=A,w/=A,$,g,m),m.point(T,I),n(T,I,L,b,w,$,c,l,h,f,d,p,g,m))}}return function(r){var i,o,a,s,u,c,l,h,f,d,p,g,m={point:y,lineStart:v,lineEnd:b,polygonStart:function(){r.polygonStart(),m.lineStart=w},polygonEnd:function(){r.polygonEnd(),m.lineStart=v}};function y(_,L){_=t(_,L),r.point(_[0],_[1])}function v(){h=NaN,m.point=x,r.lineStart()}function x(_,L){var E=Kn([_,L]),T=t(_,L);n(h,f,l,d,p,g,h=T[0],f=T[1],l=_,d=E[0],p=E[1],g=E[2],ny,r),r.point(h,f)}function b(){m.point=y,r.lineEnd()}function w(){v(),m.point=$,m.lineEnd=A}function $(_,L){x(i=_,L),o=h,a=f,s=d,u=p,c=g,m.point=x}function A(){n(h,f,l,d,p,g,o,a,i,s,u,c,ny,r),m.lineEnd=b,b()}return m}}var BT=go({point:function(t,e){this.stream.point(t*nt,e*nt)}});function YT(t){return go({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function WT(t,e,n,r,i){function o(a,s){return a*=r,s*=i,[e+t*a,n-t*s]}return o.invert=function(a,s){return[(a-e)/t*r,(n-s)/t*i]},o}function iy(t,e,n,r,i,o){if(!o)return WT(t,e,n,r,i);var a=J(o),s=K(o),u=a*t,c=s*t,l=a/t,h=s/t,f=(s*n-a*e)/t,d=(s*e+a*n)/t;function p(g,m){return g*=r,m*=i,[u*g-c*m+e,n-c*g-u*m]}return p.invert=function(g,m){return[r*(l*g-h*m+f),i*(d-h*g-l*m)]},p}function ze(t){return xf(function(){return t})()}function xf(t){var e,n=150,r=480,i=250,o=0,a=0,s=0,u=0,c=0,l,h=0,f=1,d=1,p=null,g=tf,m=null,y,v,x,b=so,w=.5,$,A,_,L,E;function T(C){return _(C[0]*nt,C[1]*nt)}function I(C){return C=_.invert(C[0],C[1]),C&&[C[0]*yt,C[1]*yt]}T.stream=function(C){return L&&E===C?L:L=BT(YT(l)(g($(b(E=C)))))},T.preclip=function(C){return arguments.length?(g=C,p=void 0,D()):g},T.postclip=function(C){return arguments.length?(b=C,m=y=v=x=null,D()):b},T.clipAngle=function(C){return arguments.length?(g=+C?Pm(p=C*nt):(p=null,tf),D()):p*yt},T.clipExtent=function(C){return arguments.length?(b=C==null?(m=y=v=x=null,so):Es(m=+C[0][0],y=+C[0][1],v=+C[1][0],x=+C[1][1]),D()):m==null?null:[[m,y],[v,x]]},T.scale=function(C){return arguments.length?(n=+C,P()):n},T.translate=function(C){return arguments.length?(r=+C[0],i=+C[1],P()):[r,i]},T.center=function(C){return arguments.length?(o=C[0]%360*nt,a=C[1]%360*nt,P()):[o*yt,a*yt]},T.rotate=function(C){return arguments.length?(s=C[0]%360*nt,u=C[1]%360*nt,c=C.length>2?C[2]%360*nt:0,P()):[s*yt,u*yt,c*yt]},T.angle=function(C){return arguments.length?(h=C%360*nt,P()):h*yt},T.reflectX=function(C){return arguments.length?(f=C?-1:1,P()):f<0},T.reflectY=function(C){return arguments.length?(d=C?-1:1,P()):d<0},T.precision=function(C){return arguments.length?($=ry(A,w=C*C),D()):It(w)},T.fitExtent=function(C,S){return Bs(T,C,S)},T.fitSize=function(C,S){return yf(T,C,S)},T.fitWidth=function(C,S){return bf(T,C,S)},T.fitHeight=function(C,S){return vf(T,C,S)};function P(){var C=iy(n,0,0,f,d,h).apply(null,e(o,a)),S=iy(n,r-C[0],i-C[1],f,d,h);return l=Ql(s,u,c),A=Zl(e,S),_=Zl(l,A),$=ry(A,w),D()}function D(){return L=E=null,T}return function(){return e=t.apply(this,arguments),T.invert=e.invert&&I,P()}}function _f(t){var e=0,n=ht/3,r=xf(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*nt,n=o[1]*nt):[e*yt,n*yt]},i}function HT(t){var e=J(t);function n(r,i){return[r*e,K(i)/e]}return n.invert=function(r,i){return[r/e,Vt(i*e)]},n}function oy(t,e){var n=K(t),r=(n+K(e))/2;if(dt(r)<et)return HT(t);var i=1+n*(2*r-n),o=It(i)/r;function a(s,u){var c=It(i-2*r*K(u))/r;return[c*K(s*=r),o-c*J(s)]}return a.invert=function(s,u){var c=o-u,l=jt(s,dt(c))*de(c);return c*r<0&&(l-=ht*de(s)*de(c)),[l/r,Vt((i-(s*s+c*c)*r*r)/(2*r))]},a}function Ys(){return _f(oy).scale(155.424).center([0,33.6442])}function ay(){return Ys().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function qT(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i<e;)t[i].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}function XT(){var t,e,n=ay(),r,i=Ys().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Ys().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,u,c={point:function(f,d){u=[f,d]}};function l(f){var d=f[0],p=f[1];return u=null,r.point(d,p),u||(o.point(d,p),u)||(s.point(d,p),u)}l.invert=function(f){var d=n.scale(),p=n.translate(),g=(f[0]-p[0])/d,m=(f[1]-p[1])/d;return(m>=.12&&m<.234&&g>=-.425&&g<-.214?i:m>=.166&&m<.234&&g>=-.214&&g<-.115?a:n).invert(f)},l.stream=function(f){return t&&e===f?t:t=qT([n.stream(e=f),i.stream(f),a.stream(f)])},l.precision=function(f){return arguments.length?(n.precision(f),i.precision(f),a.precision(f),h()):n.precision()},l.scale=function(f){return arguments.length?(n.scale(f),i.scale(f*.35),a.scale(f),l.translate(n.translate())):n.scale()},l.translate=function(f){if(!arguments.length)return n.translate();var d=n.scale(),p=+f[0],g=+f[1];return r=n.translate(f).clipExtent([[p-.455*d,g-.238*d],[p+.455*d,g+.238*d]]).stream(c),o=i.translate([p-.307*d,g+.201*d]).clipExtent([[p-.425*d+et,g+.12*d+et],[p-.214*d-et,g+.234*d-et]]).stream(c),s=a.translate([p-.205*d,g+.212*d]).clipExtent([[p-.214*d+et,g+.166*d+et],[p-.115*d-et,g+.234*d-et]]).stream(c),h()},l.fitExtent=function(f,d){return Bs(l,f,d)},l.fitSize=function(f,d){return yf(l,f,d)},l.fitWidth=function(f,d){return bf(l,f,d)},l.fitHeight=function(f,d){return vf(l,f,d)};function h(){return t=e=null,l}return l.scale(1070)}function sy(t){return function(e,n){var r=J(e),i=J(n),o=t(r*i);return o===1/0?[2,0]:[o*i*K(e),o*K(n)]}}function mo(t){return function(e,n){var r=It(e*e+n*n),i=t(r),o=K(i),a=J(i);return[jt(e*o,r*a),Vt(r&&n*o/r)]}}var wf=sy(function(t){return It(2/(1+t))});wf.invert=mo(function(t){return 2*Vt(t/2)});function jT(){return ze(wf).scale(124.75).clipAngle(180-.001)}var $f=sy(function(t){return(t=K1(t))&&t/K(t)});$f.invert=mo(function(t){return t});function VT(){return ze($f).scale(79.4188).clipAngle(180-.001)}function yo(t,e){return[t,ds(zl((St+e)/2))]}yo.invert=function(t,e){return[t,2*Hr(Z1(e))-St]};function ZT(){return uy(yo).scale(961/Xt)}function uy(t){var e=ze(t),n=e.center,r=e.scale,i=e.translate,o=e.clipExtent,a=null,s,u,c;e.scale=function(h){return arguments.length?(r(h),l()):r()},e.translate=function(h){return arguments.length?(i(h),l()):i()},e.center=function(h){return arguments.length?(n(h),l()):n()},e.clipExtent=function(h){return arguments.length?(h==null?a=s=u=c=null:(a=+h[0][0],s=+h[0][1],u=+h[1][0],c=+h[1][1]),l()):a==null?null:[[a,s],[u,c]]};function l(){var h=ht*r(),f=e(xm(e.rotate()).invert([0,0]));return o(a==null?[[f[0]-h,f[1]-h],[f[0]+h,f[1]+h]]:t===yo?[[Math.max(f[0]-h,a),s],[Math.min(f[0]+h,u),c]]:[[a,Math.max(f[1]-h,s)],[u,Math.min(f[1]+h,c)]])}return l()}function Ws(t){return zl((St+t)/2)}function cy(t,e){var n=J(t),r=t===e?K(t):ds(n/J(e))/ds(Ws(e)/Ws(t)),i=n*Gl(Ws(t),r)/r;if(!r)return yo;function o(a,s){i>0?s<-St+et&&(s=-St+et):s>St-et&&(s=St-et);var u=i/Gl(Ws(s),r);return[u*K(r*a),i-u*J(r*a)]}return o.invert=function(a,s){var u=i-s,c=de(r)*It(a*a+u*u),l=jt(a,dt(u))*de(u);return u*r<0&&(l-=ht*de(a)*de(u)),[l/r,2*Hr(Gl(i/c,1/r))-St]},o}function KT(){return _f(cy).scale(109.5).parallels([30,30])}function bo(t,e){return[t,e]}bo.invert=bo;function QT(){return ze(bo).scale(152.63)}function ly(t,e){var n=J(t),r=t===e?K(t):(n-J(e))/(e-t),i=n/r+t;if(dt(r)<et)return bo;function o(a,s){var u=i-s,c=r*a;return[u*K(c),i-u*J(c)]}return o.invert=function(a,s){var u=i-s,c=jt(a,dt(u))*de(u);return u*r<0&&(c-=ht*de(a)*de(u)),[c/r,i-de(r)*It(a*a+u*u)]},o}function JT(){return _f(ly).scale(131.154).center([0,13.9389])}var vo=1.340264,xo=-.081106,_o=893e-6,wo=.003796,Hs=It(3)/2,tP=12;function Sf(t,e){var n=Vt(Hs*K(e)),r=n*n,i=r*r*r;return[t*J(n)/(Hs*(vo+3*xo*r+i*(7*_o+9*wo*r))),n*(vo+xo*r+i*(_o+wo*r))]}Sf.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,u;o<tP&&(s=n*(vo+xo*r+i*(_o+wo*r))-e,u=vo+3*xo*r+i*(7*_o+9*wo*r),n-=a=s/u,r=n*n,i=r*r*r,!(dt(a)<no));++o);return[Hs*t*(vo+3*xo*r+i*(7*_o+9*wo*r))/J(n),Vt(K(n)/Hs)]};function eP(){return ze(Sf).scale(177.158)}function Af(t,e){var n=J(e),r=J(t)*n;return[n*K(t)/r,K(e)/r]}Af.invert=mo(Hr);function nP(){return ze(Af).scale(144.049).clipAngle(60)}function rP(){var t=1,e=0,n=0,r=1,i=1,o=0,a,s,u=null,c,l,h,f=1,d=1,p=go({point:function(b,w){var $=x([b,w]);this.stream.point($[0],$[1])}}),g=so,m,y;function v(){return f=t*r,d=t*i,m=y=null,x}function x(b){var w=b[0]*f,$=b[1]*d;if(o){var A=$*a-w*s;w=w*a+$*s,$=A}return[w+e,$+n]}return x.invert=function(b){var w=b[0]-e,$=b[1]-n;if(o){var A=$*a+w*s;w=w*a-$*s,$=A}return[w/f,$/d]},x.stream=function(b){return m&&y===b?m:m=p(g(y=b))},x.postclip=function(b){return arguments.length?(g=b,u=c=l=h=null,v()):g},x.clipExtent=function(b){return arguments.length?(g=b==null?(u=c=l=h=null,so):Es(u=+b[0][0],c=+b[0][1],l=+b[1][0],h=+b[1][1]),v()):u==null?null:[[u,c],[l,h]]},x.scale=function(b){return arguments.length?(t=+b,v()):t},x.translate=function(b){return arguments.length?(e=+b[0],n=+b[1],v()):[e,n]},x.angle=function(b){return arguments.length?(o=b%360*nt,s=K(o),a=J(o),v()):o*yt},x.reflectX=function(b){return arguments.length?(r=b?-1:1,v()):r<0},x.reflectY=function(b){return arguments.length?(i=b?-1:1,v()):i<0},x.fitExtent=function(b,w){return Bs(x,b,w)},x.fitSize=function(b,w){return yf(x,b,w)},x.fitWidth=function(b,w){return bf(x,b,w)},x.fitHeight=function(b,w){return vf(x,b,w)},x}function Mf(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}Mf.invert=function(t,e){var n=e,r=25,i;do{var o=n*n,a=o*o;n-=i=(n*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-e)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(dt(i)>et&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function iP(){return ze(Mf).scale(175.295)}function Tf(t,e){return[J(e)*K(t),K(e)]}Tf.invert=mo(Vt);function oP(){return ze(Tf).scale(249.5).clipAngle(90+et)}function Pf(t,e){var n=J(e),r=1+J(t)*n;return[n*K(t)/r,K(e)/r]}Pf.invert=mo(function(t){return 2*Hr(t)});function aP(){return ze(Pf).scale(250).clipAngle(142)}function Df(t,e){return[ds(zl((St+e)/2)),-t]}Df.invert=function(t,e){return[-e,2*Hr(Z1(t))-St]};function sP(){var t=uy(Df),e=t.center,n=t.rotate;return t.center=function(r){return arguments.length?e([-r[1],r[0]]):(r=e(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function uP(t,e){return t.parent===e.parent?1:2}function cP(t){return t.reduce(lP,0)/t.length}function lP(t,e){return t+e.x}function fP(t){return 1+t.reduce(hP,0)}function hP(t,e){return Math.max(t,e.y)}function dP(t){for(var e;e=t.children;)t=e[0];return t}function pP(t){for(var e;e=t.children;)t=e[e.length-1];return t}function gP(){var t=uP,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(f){var d=f.children;d?(f.x=cP(d),f.y=fP(d)):(f.x=a?s+=t(f,a):0,f.y=0,a=f)});var u=dP(o),c=pP(o),l=u.x-t(u,c)/2,h=c.x+t(c,u)/2;return o.eachAfter(r?function(f){f.x=(f.x-o.x)*e,f.y=(o.y-f.y)*n}:function(f){f.x=(f.x-l)/(h-l)*e,f.y=(1-(o.y?f.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(t=o,i):t},i.size=function(o){return arguments.length?(r=!1,e=+o[0],n=+o[1],i):r?null:[e,n]},i.nodeSize=function(o){return arguments.length?(r=!0,e=+o[0],n=+o[1],i):r?[e,n]:null},i}function mP(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function yP(){return this.eachAfter(mP)}function bP(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function vP(t,e){for(var n=this,r=[n],i,o,a=-1;n=r.pop();)if(t.call(e,n,++a,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function xP(t,e){for(var n=this,r=[n],i=[],o,a,s,u=-1;n=r.pop();)if(i.push(n),o=n.children)for(a=0,s=o.length;a<s;++a)r.push(o[a]);for(;n=i.pop();)t.call(e,n,++u,this);return this}function _P(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function wP(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function $P(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function SP(t){for(var e=this,n=AP(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function AP(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function MP(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function TP(){return Array.from(this)}function PP(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function DP(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*LP(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function qs(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=CP)):e===void 0&&(e=kP);for(var n=new tr(t),r,i=[n],o,a,s,u;r=i.pop();)if((a=e(r.data))&&(u=(a=Array.from(a)).length))for(r.children=a,s=u-1;s>=0;--s)i.push(o=a[s]=new tr(a[s])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(fy)}function EP(){return qs(this).eachBefore(IP)}function kP(t){return t.children}function CP(t){return Array.isArray(t)?t[1]:null}function IP(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function fy(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function tr(t){this.data=t,this.depth=this.height=0,this.parent=null}tr.prototype=qs.prototype={constructor:tr,count:yP,each:bP,eachAfter:xP,eachBefore:vP,find:_P,sum:wP,sort:$P,path:SP,ancestors:MP,descendants:TP,leaves:PP,links:DP,copy:EP,[Symbol.iterator]:LP};function Xs(t){return t==null?null:hy(t)}function hy(t){if(typeof t!="function")throw new Error;return t}function er(){return 0}function Qr(t){return function(){return t}}const RP=1664525,NP=1013904223,dy=4294967296;function Lf(){let t=1;return()=>(t=(RP*t+NP)%dy)/dy}function FP(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function GP(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}function zP(t){return py(t,Lf())}function py(t,e){for(var n=0,r=(t=GP(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&gy(a,o)?++n:(a=UP(i=OP(i,o)),n=0);return a}function OP(t,e){var n,r;if(Ef(e,t))return[e];for(n=0;n<t.length;++n)if(js(e,t[n])&&Ef($o(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(js($o(t[n],t[r]),e)&&js($o(t[n],e),t[r])&&js($o(t[r],e),t[n])&&Ef(my(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function js(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function gy(t,e){var n=t.r-e.r+Math.max(t.r,e.r,1)*1e-9,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Ef(t,e){for(var n=0;n<e.length;++n)if(!gy(t,e[n]))return!1;return!0}function UP(t){switch(t.length){case 1:return BP(t[0]);case 2:return $o(t[0],t[1]);case 3:return my(t[0],t[1],t[2])}}function BP(t){return{x:t.x,y:t.y,r:t.r}}function $o(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,c=a-r,l=s-i,h=Math.sqrt(u*u+c*c);return{x:(n+o+u/h*l)/2,y:(r+a+c/h*l)/2,r:(h+i+s)/2}}function my(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,c=n.x,l=n.y,h=n.r,f=r-a,d=r-c,p=i-s,g=i-l,m=u-o,y=h-o,v=r*r+i*i-o*o,x=v-a*a-s*s+u*u,b=v-c*c-l*l+h*h,w=d*p-f*g,$=(p*b-g*x)/(w*2)-r,A=(g*m-p*y)/w,_=(d*x-f*b)/(w*2)-i,L=(f*y-d*m)/w,E=A*A+L*L-1,T=2*(o+$*A+_*L),I=$*$+_*_-o*o,P=-(Math.abs(E)>1e-6?(T+Math.sqrt(T*T-4*E*I))/(2*E):I/T);return{x:r+$+A*P,y:i+_+L*P,r:P}}function yy(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,s,u,c=r*r+a*a;c?(o=e.r+n.r,o*=o,u=t.r+n.r,u*=u,o>u?(i=(c+u-o)/(2*c),s=Math.sqrt(Math.max(0,u/c-i*i)),n.x=t.x-i*r-s*a,n.y=t.y-i*a+s*r):(i=(c+o-u)/(2*c),s=Math.sqrt(Math.max(0,o/c-i*i)),n.x=e.x+i*r-s*a,n.y=e.y+i*a+s*r)):(n.x=e.x+n.r,n.y=e.y)}function by(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function vy(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function Vs(t){this._=t,this.next=null,this.previous=null}function xy(t,e){if(!(o=(t=FP(t)).length))return 0;var n,r,i,o,a,s,u,c,l,h,f;if(n=t[0],n.x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;yy(r,n,i=t[2]),n=new Vs(n),r=new Vs(r),i=new Vs(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(u=3;u<o;++u){yy(n._,r._,i=t[u]),i=new Vs(i),c=r.next,l=n.previous,h=r._.r,f=n._.r;do if(h<=f){if(by(c._,i._)){r=c,n.next=r,r.previous=n,--u;continue t}h+=c._.r,c=c.next}else{if(by(l._,i._)){n=l,n.next=r,r.previous=n,--u;continue t}f+=l._.r,l=l.previous}while(c!==l.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=vy(n);(i=i.next)!==r;)(s=vy(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=py(n,e),u=0;u<o;++u)n=t[u],n.x-=i.x,n.y-=i.y;return i.r}function YP(t){return xy(t,Lf()),t}function WP(t){return Math.sqrt(t.value)}function HP(){var t=null,e=1,n=1,r=er;function i(o){const a=Lf();return o.x=e/2,o.y=n/2,t?o.eachBefore(_y(t)).eachAfter(kf(r,.5,a)).eachBefore(wy(1)):o.eachBefore(_y(WP)).eachAfter(kf(er,1,a)).eachAfter(kf(r,o.r/Math.min(e,n),a)).eachBefore(wy(Math.min(e,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=Xs(o),i):t},i.size=function(o){return arguments.length?(e=+o[0],n=+o[1],i):[e,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:Qr(+o),i):r},i}function _y(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function kf(t,e,n){return function(r){if(i=r.children){var i,o,a=i.length,s=t(r)*e||0,u;if(s)for(o=0;o<a;++o)i[o].r+=s;if(u=xy(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=u+s}}}function wy(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function $y(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function So(t,e,n,r,i){for(var o=t.children,a,s=-1,u=o.length,c=t.value&&(r-e)/t.value;++s<u;)a=o[s],a.y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}function qP(){var t=1,e=1,n=0,r=!1;function i(a){var s=a.height+1;return a.x0=a.y0=n,a.x1=t,a.y1=e/s,a.eachBefore(o(e,s)),r&&a.eachBefore($y),a}function o(a,s){return function(u){u.children&&So(u,u.x0,a*(u.depth+1)/s,u.x1,a*(u.depth+2)/s);var c=u.x0,l=u.y0,h=u.x1-n,f=u.y1-n;h<c&&(c=h=(c+h)/2),f<l&&(l=f=(l+f)/2),u.x0=c,u.y0=l,u.x1=h,u.y1=f}}return i.round=function(a){return arguments.length?(r=!!a,i):r},i.size=function(a){return arguments.length?(t=+a[0],e=+a[1],i):[t,e]},i.padding=function(a){return arguments.length?(n=+a,i):n},i}var XP={depth:-1},Sy={},Cf={};function jP(t){return t.id}function VP(t){return t.parentId}function ZP(){var t=jP,e=VP,n;function r(i){var o=Array.from(i),a=t,s=e,u,c,l,h,f,d,p,g,m=new Map;if(n!=null){const y=o.map((b,w)=>KP(n(b,w,i))),v=y.map(Ay),x=new Set(y).add("");for(const b of v)x.has(b)||(x.add(b),y.push(b),v.push(Ay(b)),o.push(Cf));a=(b,w)=>y[w],s=(b,w)=>v[w]}for(l=0,u=o.length;l<u;++l)c=o[l],d=o[l]=new tr(c),(p=a(c,l,i))!=null&&(p+="")&&(g=d.id=p,m.set(g,m.has(g)?Sy:d)),(p=s(c,l,i))!=null&&(p+="")&&(d.parent=p);for(l=0;l<u;++l)if(d=o[l],p=d.parent){if(f=m.get(p),!f)throw new Error("missing: "+p);if(f===Sy)throw new Error("ambiguous: "+p);f.children?f.children.push(d):f.children=[d],d.parent=f}else{if(h)throw new Error("multiple roots");h=d}if(!h)throw new Error("no root");if(n!=null){for(;h.data===Cf&&h.children.length===1;)h=h.children[0],--u;for(let y=o.length-1;y>=0&&(d=o[y],d.data===Cf);--y)d.data=null}if(h.parent=XP,h.eachBefore(function(y){y.depth=y.parent.depth+1,--u}).eachBefore(fy),h.parent=null,u>0)throw new Error("cycle");return h}return r.id=function(i){return arguments.length?(t=Xs(i),r):t},r.parentId=function(i){return arguments.length?(e=Xs(i),r):e},r.path=function(i){return arguments.length?(n=Xs(i),r):n},r}function KP(t){t=`${t}`;let e=t.length;return If(t,e-1)&&!If(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function Ay(t){let e=t.length;if(e<2)return"";for(;--e>1&&!If(t,e););return t.slice(0,e)}function If(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function QP(t,e){return t.parent===e.parent?1:2}function Rf(t){var e=t.children;return e?e[0]:t.t}function Nf(t){var e=t.children;return e?e[e.length-1]:t.t}function JP(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function tD(t){for(var e=0,n=0,r=t.children,i=r.length,o;--i>=0;)o=r[i],o.z+=e,o.m+=e,e+=o.s+(n+=o.c)}function eD(t,e,n){return t.a.parent===e.parent?t.a:n}function Zs(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}Zs.prototype=Object.create(tr.prototype);function nD(t){for(var e=new Zs(t,0),n,r=[e],i,o,a,s;n=r.pop();)if(o=n._.children)for(n.children=new Array(s=o.length),a=s-1;a>=0;--a)r.push(i=n.children[a]=new Zs(o[a],a)),i.parent=n;return(e.parent=new Zs(null,0)).children=[e],e}function rD(){var t=QP,e=1,n=1,r=null;function i(c){var l=nD(c);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(a),r)c.eachBefore(u);else{var h=c,f=c,d=c;c.eachBefore(function(v){v.x<h.x&&(h=v),v.x>f.x&&(f=v),v.depth>d.depth&&(d=v)});var p=h===f?1:t(h,f)/2,g=p-h.x,m=e/(f.x+p+g),y=n/(d.depth||1);c.eachBefore(function(v){v.x=(v.x+g)*m,v.y=v.depth*y})}return c}function o(c){var l=c.children,h=c.parent.children,f=c.i?h[c.i-1]:null;if(l){tD(c);var d=(l[0].z+l[l.length-1].z)/2;f?(c.z=f.z+t(c._,f._),c.m=c.z-d):c.z=d}else f&&(c.z=f.z+t(c._,f._));c.parent.A=s(c,f,c.parent.A||h[0])}function a(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function s(c,l,h){if(l){for(var f=c,d=c,p=l,g=f.parent.children[0],m=f.m,y=d.m,v=p.m,x=g.m,b;p=Nf(p),f=Rf(f),p&&f;)g=Rf(g),d=Nf(d),d.a=c,b=p.z+v-f.z-m+t(p._,f._),b>0&&(JP(eD(p,c,h),c,b),m+=b,y+=b),v+=p.m,m+=f.m,x+=g.m,y+=d.m;p&&!Nf(d)&&(d.t=p,d.m+=v-y),f&&!Rf(g)&&(g.t=f,g.m+=m-x,h=c)}return h}function u(c){c.x*=e,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(t=c,i):t},i.size=function(c){return arguments.length?(r=!1,e=+c[0],n=+c[1],i):r?null:[e,n]},i.nodeSize=function(c){return arguments.length?(r=!0,e=+c[0],n=+c[1],i):r?[e,n]:null},i}function Ks(t,e,n,r,i){for(var o=t.children,a,s=-1,u=o.length,c=t.value&&(i-n)/t.value;++s<u;)a=o[s],a.x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}var My=(1+Math.sqrt(5))/2;function Ty(t,e,n,r,i,o){for(var a=[],s=e.children,u,c,l=0,h=0,f=s.length,d,p,g=e.value,m,y,v,x,b,w,$;l<f;){d=i-n,p=o-r;do m=s[h++].value;while(!m&&h<f);for(y=v=m,w=Math.max(p/d,d/p)/(g*t),$=m*m*w,b=Math.max(v/$,$/y);h<f;++h){if(m+=c=s[h].value,c<y&&(y=c),c>v&&(v=c),$=m*m*w,x=Math.max(v/$,$/y),x>b){m-=c;break}b=x}a.push(u={value:m,dice:d<p,children:s.slice(l,h)}),u.dice?So(u,n,r,i,g?r+=p*m/g:o):Ks(u,n,r,g?n+=d*m/g:i,o),g-=m,l=h}return a}const Ff=function t(e){function n(r,i,o,a,s){Ty(e,r,i,o,a,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(My);function Py(){var t=Ff,e=!1,n=1,r=1,i=[0],o=er,a=er,s=er,u=er,c=er;function l(f){return f.x0=f.y0=0,f.x1=n,f.y1=r,f.eachBefore(h),i=[0],e&&f.eachBefore($y),f}function h(f){var d=i[f.depth],p=f.x0+d,g=f.y0+d,m=f.x1-d,y=f.y1-d;m<p&&(p=m=(p+m)/2),y<g&&(g=y=(g+y)/2),f.x0=p,f.y0=g,f.x1=m,f.y1=y,f.children&&(d=i[f.depth+1]=o(f)/2,p+=c(f)-d,g+=a(f)-d,m-=s(f)-d,y-=u(f)-d,m<p&&(p=m=(p+m)/2),y<g&&(g=y=(g+y)/2),t(f,p,g,m,y))}return l.round=function(f){return arguments.length?(e=!!f,l):e},l.size=function(f){return arguments.length?(n=+f[0],r=+f[1],l):[n,r]},l.tile=function(f){return arguments.length?(t=hy(f),l):t},l.padding=function(f){return arguments.length?l.paddingInner(f).paddingOuter(f):l.paddingInner()},l.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:Qr(+f),l):o},l.paddingOuter=function(f){return arguments.length?l.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):l.paddingTop()},l.paddingTop=function(f){return arguments.length?(a=typeof f=="function"?f:Qr(+f),l):a},l.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:Qr(+f),l):s},l.paddingBottom=function(f){return arguments.length?(u=typeof f=="function"?f:Qr(+f),l):u},l.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:Qr(+f),l):c},l}function iD(t,e,n,r,i){var o=t.children,a,s=o.length,u,c=new Array(s+1);for(c[0]=u=a=0;a<s;++a)c[a+1]=u+=o[a].value;l(0,s,t.value,e,n,r,i);function l(h,f,d,p,g,m,y){if(h>=f-1){var v=o[h];v.x0=p,v.y0=g,v.x1=m,v.y1=y;return}for(var x=c[h],b=d/2+x,w=h+1,$=f-1;w<$;){var A=w+$>>>1;c[A]<b?w=A+1:$=A}b-c[w-1]<c[w]-b&&h+1<w&&--w;var _=c[w]-x,L=d-_;if(m-p>y-g){var E=d?(p*L+m*_)/d:m;l(h,w,_,p,g,E,y),l(w,f,L,E,g,m,y)}else{var T=d?(g*L+y*_)/d:y;l(h,w,_,p,g,m,T),l(w,f,L,p,T,m,y)}}}function oD(t,e,n,r,i){(t.depth&1?Ks:So)(t,e,n,r,i)}const aD=function t(e){function n(r,i,o,a,s){if((u=r._squarify)&&u.ratio===e)for(var u,c,l,h,f=-1,d,p=u.length,g=r.value;++f<p;){for(c=u[f],l=c.children,h=c.value=0,d=l.length;h<d;++h)c.value+=l[h].value;c.dice?So(c,i,o,a,g?o+=(s-o)*c.value/g:s):Ks(c,i,o,g?i+=(a-i)*c.value/g:a,s),g-=c.value}else r._squarify=u=Ty(e,r,i,o,a,s),u.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(My);function sD(t){for(var e=-1,n=t.length,r,i=t[n-1],o=0;++e<n;)r=i,i=t[e],o+=r[1]*i[0]-r[0]*i[1];return o/2}function uD(t){for(var e=-1,n=t.length,r=0,i=0,o,a=t[n-1],s,u=0;++e<n;)o=a,a=t[e],u+=s=o[0]*a[1]-a[0]*o[1],r+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return u*=3,[r/u,i/u]}function cD(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function lD(t,e){return t[0]-e[0]||t[1]-e[1]}function Dy(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&cD(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function fD(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(lD),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=Dy(r),a=Dy(i),s=a[0]===o[0],u=a[a.length-1]===o[o.length-1],c=[];for(e=o.length-1;e>=0;--e)c.push(t[r[o[e]][2]]);for(e=+s;e<a.length-u;++e)c.push(t[r[a[e]][2]]);return c}function hD(t,e){for(var n=t.length,r=t[n-1],i=e[0],o=e[1],a=r[0],s=r[1],u,c,l=!1,h=0;h<n;++h)r=t[h],u=r[0],c=r[1],c>o!=s>o&&i<(a-u)*(o-c)/(s-c)+u&&(l=!l),a=u,s=c;return l}function dD(t){for(var e=-1,n=t.length,r=t[n-1],i,o,a=r[0],s=r[1],u=0;++e<n;)i=a,o=s,r=t[e],a=r[0],s=r[1],i-=a,o-=s,u+=Math.hypot(i,o);return u}const Nt=Math.random,pD=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,arguments.length===1?(i=r,r=0):i-=r,function(){return e()*i+r}}return n.source=t,n}(Nt),gD=function t(e){function n(r,i){return arguments.length<2&&(i=r,r=0),r=Math.floor(r),i=Math.floor(i)-r,function(){return Math.floor(e()*i+r)}}return n.source=t,n}(Nt),Gf=function t(e){function n(r,i){var o,a;return r=r==null?0:+r,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=e()*2-1,s=e()*2-1,a=o*o+s*s;while(!a||a>1);return r+i*s*Math.sqrt(-2*Math.log(a)/a)}}return n.source=t,n}(Nt),mD=function t(e){var n=Gf.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(Nt),Ly=function t(e){function n(r){return(r=+r)<=0?()=>0:function(){for(var i=0,o=r;o>1;--o)i+=e();return i+o*e()}}return n.source=t,n}(Nt),yD=function t(e){var n=Ly.source(e);function r(i){if((i=+i)==0)return e;var o=n(i);return function(){return o()/i}}return r.source=t,r}(Nt),bD=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(Nt),vD=function t(e){function n(r){if((r=+r)<0)throw new RangeError("invalid alpha");return r=1/-r,function(){return Math.pow(1-e(),r)}}return n.source=t,n}(Nt),xD=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+r)}}return n.source=t,n}(Nt),Ey=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return r===0?()=>1/0:r===1?()=>1:(r=Math.log1p(-r),function(){return 1+Math.floor(Math.log1p(-e())/r)})}return n.source=t,n}(Nt),zf=function t(e){var n=Gf.source(e)();function r(i,o){if((i=+i)<0)throw new RangeError("invalid k");if(i===0)return()=>0;if(o=o==null?1:+o,i===1)return()=>-Math.log1p(-e())*o;var a=(i<1?i+1:i)-1/3,s=1/(3*Math.sqrt(a)),u=i<1?()=>Math.pow(e(),1/i):()=>1;return function(){do{do var c=n(),l=1+s*c;while(l<=0);l*=l*l;var h=1-e()}while(h>=1-.0331*c*c*c*c&&Math.log(h)>=.5*c*c+a*(1-l+Math.log(l)));return a*l*u()*o}}return r.source=t,r}(Nt),ky=function t(e){var n=zf.source(e);function r(i,o){var a=n(i),s=n(o);return function(){var u=a();return u===0?0:u/(u+s())}}return r.source=t,r}(Nt),Cy=function t(e){var n=Ey.source(e),r=ky.source(e);function i(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var s=0,u=o,c=a;u*c>16&&u*(1-c)>16;){var l=Math.floor((u+1)*c),h=r(l,u-l+1)();h<=c?(s+=l,u-=l,c=(c-h)/(1-h)):(u=l-1,c/=h)}for(var f=c<.5,d=f?c:1-c,p=n(d),g=p(),m=0;g<=u;++m)g+=p();return s+(f?m:u-m)}}return i.source=t,i}(Nt),_D=function t(e){function n(r,i,o){var a;return(r=+r)==0?a=s=>-Math.log(s):(r=1/r,a=s=>Math.pow(s,r)),i=i==null?0:+i,o=o==null?1:+o,function(){return i+o*a(-Math.log1p(-e()))}}return n.source=t,n}(Nt),wD=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){return r+i*Math.tan(Math.PI*e())}}return n.source=t,n}(Nt),$D=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){var o=e();return r+i*Math.log(o/(1-o))}}return n.source=t,n}(Nt),SD=function t(e){var n=zf.source(e),r=Cy.source(e);function i(o){return function(){for(var a=0,s=o;s>16;){var u=Math.floor(.875*s),c=n(u)();if(c>s)return a+r(u-1,s/c)();a+=u,s-=c}for(var l=-Math.log1p(-e()),h=0;l<=s;++h)l-=Math.log1p(-e());return a+h}}return i.source=t,i}(Nt),AD=1664525,MD=1013904223,Iy=1/4294967296;function TD(t=Math.random()){let e=(0<=t&&t<1?t/Iy:Math.abs(t))|0;return()=>(e=AD*e+MD|0,Iy*(e>>>0))}function ge(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function en(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const Of=Symbol("implicit");function Uf(){var t=new Ei,e=[],n=[],r=Of;function i(o){let a=t.get(o);if(a===void 0){if(r!==Of)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Ei;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Uf(e,n).unknown(r)},ge.apply(i,arguments),i}function Bf(){var t=Uf().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,c=0,l=.5;delete t.unknown;function h(){var f=e().length,d=i<r,p=d?i:r,g=d?r:i;o=(g-p)/Math.max(1,f-u+c*2),s&&(o=Math.floor(o)),p+=(g-p-o*(f-u))*l,a=o*(1-u),s&&(p=Math.round(p),a=Math.round(a));var m=ln(f).map(function(y){return p+o*y});return n(d?m.reverse():m)}return t.domain=function(f){return arguments.length?(e(f),h()):e()},t.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(f){return arguments.length?(s=!!f,h()):s},t.padding=function(f){return arguments.length?(u=Math.min(1,c=+f),h()):u},t.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),h()):u},t.paddingOuter=function(f){return arguments.length?(c=+f,h()):c},t.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),h()):l},t.copy=function(){return Bf(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},ge.apply(h(),arguments)}function Ry(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Ry(e())},t}function Yf(){return Ry(Bf.apply(null,arguments).paddingInner(1))}function PD(t){return function(){return t}}function Qs(t){return+t}var Ny=[0,1];function Jt(t){return t}function Wf(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:PD(isNaN(e)?NaN:.5)}function DD(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function LD(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Wf(i,r),o=n(a,o)):(r=Wf(r,i),o=n(o,a)),function(s){return o(r(s))}}function ED(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Wf(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=kn(t,s,1,r)-1;return o[u](i[u](s))}}function Ao(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Js(){var t=Ny,e=Ny,n=dn,r,i,o,a=Jt,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==Jt&&(a=DD(t[0],t[f-1])),s=f>2?ED:LD,u=c=null,h}function h(f){return f==null||isNaN(f=+f)?o:(u||(u=s(t.map(r),e,n)))(r(a(f)))}return h.invert=function(f){return a(i((c||(c=s(e,t.map(r),he)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,Qs),l()):t.slice()},h.range=function(f){return arguments.length?(e=Array.from(f),l()):e.slice()},h.rangeRound=function(f){return e=Array.from(f),n=Ua,l()},h.clamp=function(f){return arguments.length?(a=f?!0:Jt,l()):a!==Jt},h.interpolate=function(f){return arguments.length?(n=f,l()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,d){return r=f,i=d,l()}}function Hf(){return Js()(Jt,Jt)}function Fy(t,e,n,r){var i=ba(t,e,n),o;switch(r=Wr(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=j1(i,a))&&(r.precision=o),Nl(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=V1(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=X1(i))&&(r.precision=o-(r.type==="%")*2);break}}return eo(r)}function bn(t){var e=t.domain;return t.ticks=function(n){var r=e();return In(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return Fy(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,c,l=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);l-- >0;){if(c=Rn(a,s,n),c===u)return r[i]=a,r[o]=s,e(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;u=c}return t},t}function qf(){var t=Hf();return t.copy=function(){return Ao(t,qf())},ge.apply(t,arguments),bn(t)}function Gy(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,Qs),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return Gy(t).unknown(e)},t=arguments.length?Array.from(t,Qs):[0,1],bn(n)}function zy(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),t[n]=e.floor(i),t[r]=e.ceil(o),t}function Oy(t){return Math.log(t)}function Uy(t){return Math.exp(t)}function kD(t){return-Math.log(-t)}function CD(t){return-Math.exp(-t)}function ID(t){return isFinite(t)?+("1e"+t):t<0?0:t}function RD(t){return t===10?ID:t===Math.E?Math.exp:e=>Math.pow(t,e)}function ND(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function By(t){return(e,n)=>-t(-e,n)}function Xf(t){const e=t(Oy,Uy),n=e.domain;let r=10,i,o;function a(){return i=ND(r),o=RD(r),n()[0]<0?(i=By(i),o=By(o),t(kD,CD)):t(Oy,Uy),e}return e.base=function(s){return arguments.length?(r=+s,a()):r},e.domain=function(s){return arguments.length?(n(s),a()):n()},e.ticks=s=>{const u=n();let c=u[0],l=u[u.length-1];const h=l<c;h&&([c,l]=[l,c]);let f=i(c),d=i(l),p,g;const m=s==null?10:+s;let y=[];if(!(r%1)&&d-f<m){if(f=Math.floor(f),d=Math.ceil(d),c>0){for(;f<=d;++f)for(p=1;p<r;++p)if(g=f<0?p/o(-f):p*o(f),!(g<c)){if(g>l)break;y.push(g)}}else for(;f<=d;++f)for(p=r-1;p>=1;--p)if(g=f>0?p/o(-f):p*o(f),!(g<c)){if(g>l)break;y.push(g)}y.length*2<m&&(y=In(c,l,m))}else y=In(f,d,Math.min(d-f,m)).map(o);return h?y.reverse():y},e.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Wr(u)).precision==null&&(u.trim=!0),u=eo(u)),s===1/0)return u;const c=Math.max(1,r*s/e.ticks().length);return l=>{let h=l/o(Math.round(i(l)));return h*r<r-.5&&(h*=r),h<=c?u(l):""}},e.nice=()=>n(zy(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function Yy(){const t=Xf(Js()).domain([1,10]);return t.copy=()=>Ao(t,Yy()).base(t.base()),ge.apply(t,arguments),t}function Wy(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Hy(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function jf(t){var e=1,n=t(Wy(e),Hy(e));return n.constant=function(r){return arguments.length?t(Wy(e=+r),Hy(e)):e},bn(n)}function qy(){var t=jf(Js());return t.copy=function(){return Ao(t,qy()).constant(t.constant())},ge.apply(t,arguments)}function Xy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function FD(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function GD(t){return t<0?-t*t:t*t}function Vf(t){var e=t(Jt,Jt),n=1;function r(){return n===1?t(Jt,Jt):n===.5?t(FD,GD):t(Xy(n),Xy(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},bn(e)}function tu(){var t=Vf(Js());return t.copy=function(){return Ao(t,tu()).exponent(t.exponent())},ge.apply(t,arguments),t}function zD(){return tu.apply(null,arguments).exponent(.5)}function jy(t){return Math.sign(t)*t*t}function OD(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function Vy(){var t=Hf(),e=[0,1],n=!1,r;function i(o){var a=OD(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(jy(o))},i.domain=function(o){return arguments.length?(t.domain(o),i):t.domain()},i.range=function(o){return arguments.length?(t.range((e=Array.from(o,Qs)).map(jy)),i):e.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(t.clamp(o),i):t.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Vy(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},ge.apply(i,arguments),bn(i)}function Zy(){var t=[],e=[],n=[],r;function i(){var a=0,s=Math.max(1,e.length);for(n=new Array(s-1);++a<s;)n[a-1]=Pg(t,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:e[kn(n,a)]}return o.invertExtent=function(a){var s=e.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:t[0],s<n.length?n[s]:t[t.length-1]]},o.domain=function(a){if(!arguments.length)return t.slice();t=[];for(let s of a)s!=null&&!isNaN(s=+s)&&t.push(s);return t.sort(_t),i()},o.range=function(a){return arguments.length?(e=Array.from(a),i()):e.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return Zy().domain(t).range(e).unknown(r)},ge.apply(o,arguments)}function Ky(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[kn(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*e-(u-n)*t)/(n+1);return a}return a.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var c=i.indexOf(u);return c<0?[NaN,NaN]:c<1?[t,r[0]]:c>=n?[r[n-1],e]:[r[c-1],r[c]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Ky().domain([t,e]).range(i).unknown(o)},ge.apply(bn(a),arguments)}function Qy(){var t=[.5],e=[0,1],n,r=1;function i(o){return o!=null&&o<=o?e[kn(t,o,0,r)]:n}return i.domain=function(o){return arguments.length?(t=Array.from(o),r=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(o){return arguments.length?(e=Array.from(o),r=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(o){var a=e.indexOf(o);return[t[a-1],t[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return Qy().domain(t).range(e).unknown(n)},ge.apply(i,arguments)}const Zf=new Date,Kf=new Date;function Tt(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(e(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const u=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return u;let c;do u.push(c=new Date(+o)),e(o,s),t(o);while(c<o&&o<a);return u},i.filter=o=>Tt(a=>{if(a>=a)for(;t(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;e(a,-1),!o(a););else for(;--s>=0;)for(;e(a,1),!o(a););}),n&&(i.count=(o,a)=>(Zf.setTime(+o),Kf.setTime(+a),t(Zf),t(Kf),Math.floor(n(Zf,Kf))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Jr=Tt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Jr.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Tt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Jr);const Jy=Jr.range,nn=1e3,me=nn*60,rn=me*60,on=rn*24,Qf=on*7,tb=on*30,Jf=on*365,an=Tt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*nn)},(t,e)=>(e-t)/nn,t=>t.getUTCSeconds()),eb=an.range,eu=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*nn)},(t,e)=>{t.setTime(+t+e*me)},(t,e)=>(e-t)/me,t=>t.getMinutes()),UD=eu.range,nu=Tt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*me)},(t,e)=>(e-t)/me,t=>t.getUTCMinutes()),BD=nu.range,ru=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*nn-t.getMinutes()*me)},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getHours()),YD=ru.range,iu=Tt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getUTCHours()),WD=iu.range,ti=Tt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*me)/on,t=>t.getDate()-1),HD=ti.range,Mo=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/on,t=>t.getUTCDate()-1),qD=Mo.range,th=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/on,t=>Math.floor(t/on)),XD=th.range;function nr(t){return Tt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*me)/Qf)}const ei=nr(0),To=nr(1),nb=nr(2),rb=nr(3),rr=nr(4),ib=nr(5),ob=nr(6),ab=ei.range,jD=To.range,VD=nb.range,ZD=rb.range,KD=rr.range,QD=ib.range,JD=ob.range;function ir(t){return Tt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Qf)}const ni=ir(0),Po=ir(1),sb=ir(2),ub=ir(3),or=ir(4),cb=ir(5),lb=ir(6),fb=ni.range,tL=Po.range,eL=sb.range,nL=ub.range,rL=or.range,iL=cb.range,oL=lb.range,ou=Tt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),aL=ou.range,au=Tt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),sL=au.range,Oe=Tt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Oe.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});const uL=Oe.range,Ue=Tt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Ue.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});const cL=Ue.range;function hb(t,e,n,r,i,o){const a=[[an,1,nn],[an,5,5*nn],[an,15,15*nn],[an,30,30*nn],[o,1,me],[o,5,5*me],[o,15,15*me],[o,30,30*me],[i,1,rn],[i,3,3*rn],[i,6,6*rn],[i,12,12*rn],[r,1,on],[r,2,2*on],[n,1,Qf],[e,1,tb],[e,3,3*tb],[t,1,Jf]];function s(c,l,h){const f=l<c;f&&([c,l]=[l,c]);const d=h&&typeof h.range=="function"?h:u(c,l,h),p=d?d.range(c,+l+1):[];return f?p.reverse():p}function u(c,l,h){const f=Math.abs(l-c)/h,d=pa(([,,m])=>m).right(a,f);if(d===a.length)return t.every(ba(c/Jf,l/Jf,h));if(d===0)return Jr.every(Math.max(ba(c,l,h),1));const[p,g]=a[f/a[d-1][2]<a[d][2]/f?d-1:d];return p.every(g)}return[s,u]}const[db,pb]=hb(Ue,au,ni,th,iu,nu),[gb,mb]=hb(Oe,ou,ei,ti,ru,eu);function eh(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function nh(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Do(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function yb(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,c=Lo(i),l=Eo(i),h=Lo(o),f=Eo(o),d=Lo(a),p=Eo(a),g=Lo(s),m=Eo(s),y=Lo(u),v=Eo(u),x={a:R,A:G,b:M,B:N,c:null,d:$b,e:$b,f:kL,g:BL,G:WL,H:DL,I:LL,j:EL,L:Sb,m:CL,M:IL,p:z,q:k,Q:Lb,s:Eb,S:RL,u:NL,U:FL,V:GL,w:zL,W:OL,x:null,X:null,y:UL,Y:YL,Z:HL,"%":Db},b={a:Y,A:j,b:W,B:X,c:null,d:Mb,e:Mb,f:VL,g:oE,G:sE,H:qL,I:XL,j:jL,L:Tb,m:ZL,M:KL,p:Q,q:ct,Q:Lb,s:Eb,S:QL,u:JL,U:tE,V:eE,w:nE,W:rE,x:null,X:null,y:iE,Y:aE,Z:uE,"%":Db},w={a:E,A:T,b:I,B:P,c:D,d:_b,e:_b,f:AL,g:xb,G:vb,H:wb,I:wb,j:_L,L:SL,m:xL,M:wL,p:L,q:vL,Q:TL,s:PL,S:$L,u:pL,U:gL,V:mL,w:dL,W:yL,x:C,X:S,y:xb,Y:vb,Z:bL,"%":ML};x.x=$(n,x),x.X=$(r,x),x.c=$(e,x),b.x=$(n,b),b.X=$(r,b),b.c=$(e,b);function $(O,tt){return function(st){var q=[],xt=-1,gt=0,Ft=O.length,te,it,Mt;for(st instanceof Date||(st=new Date(+st));++xt<Ft;)O.charCodeAt(xt)===37&&(q.push(O.slice(gt,xt)),(it=bb[te=O.charAt(++xt)])!=null?te=O.charAt(++xt):it=te==="e"?" ":"0",(Mt=tt[te])&&(te=Mt(st,it)),q.push(te),gt=xt+1);return q.push(O.slice(gt,xt)),q.join("")}}function A(O,tt){return function(st){var q=Do(1900,void 0,1),xt=_(q,O,st+="",0),gt,Ft;if(xt!=st.length)return null;if("Q"in q)return new Date(q.Q);if("s"in q)return new Date(q.s*1e3+("L"in q?q.L:0));if(tt&&!("Z"in q)&&(q.Z=0),"p"in q&&(q.H=q.H%12+q.p*12),q.m===void 0&&(q.m="q"in q?q.q:0),"V"in q){if(q.V<1||q.V>53)return null;"w"in q||(q.w=1),"Z"in q?(gt=nh(Do(q.y,0,1)),Ft=gt.getUTCDay(),gt=Ft>4||Ft===0?Po.ceil(gt):Po(gt),gt=Mo.offset(gt,(q.V-1)*7),q.y=gt.getUTCFullYear(),q.m=gt.getUTCMonth(),q.d=gt.getUTCDate()+(q.w+6)%7):(gt=eh(Do(q.y,0,1)),Ft=gt.getDay(),gt=Ft>4||Ft===0?To.ceil(gt):To(gt),gt=ti.offset(gt,(q.V-1)*7),q.y=gt.getFullYear(),q.m=gt.getMonth(),q.d=gt.getDate()+(q.w+6)%7)}else("W"in q||"U"in q)&&("w"in q||(q.w="u"in q?q.u%7:"W"in q?1:0),Ft="Z"in q?nh(Do(q.y,0,1)).getUTCDay():eh(Do(q.y,0,1)).getDay(),q.m=0,q.d="W"in q?(q.w+6)%7+q.W*7-(Ft+5)%7:q.w+q.U*7-(Ft+6)%7);return"Z"in q?(q.H+=q.Z/100|0,q.M+=q.Z%100,nh(q)):eh(q)}}function _(O,tt,st,q){for(var xt=0,gt=tt.length,Ft=st.length,te,it;xt<gt;){if(q>=Ft)return-1;if(te=tt.charCodeAt(xt++),te===37){if(te=tt.charAt(xt++),it=w[te in bb?tt.charAt(xt++):te],!it||(q=it(O,st,q))<0)return-1}else if(te!=st.charCodeAt(q++))return-1}return q}function L(O,tt,st){var q=c.exec(tt.slice(st));return q?(O.p=l.get(q[0].toLowerCase()),st+q[0].length):-1}function E(O,tt,st){var q=d.exec(tt.slice(st));return q?(O.w=p.get(q[0].toLowerCase()),st+q[0].length):-1}function T(O,tt,st){var q=h.exec(tt.slice(st));return q?(O.w=f.get(q[0].toLowerCase()),st+q[0].length):-1}function I(O,tt,st){var q=y.exec(tt.slice(st));return q?(O.m=v.get(q[0].toLowerCase()),st+q[0].length):-1}function P(O,tt,st){var q=g.exec(tt.slice(st));return q?(O.m=m.get(q[0].toLowerCase()),st+q[0].length):-1}function D(O,tt,st){return _(O,e,tt,st)}function C(O,tt,st){return _(O,n,tt,st)}function S(O,tt,st){return _(O,r,tt,st)}function R(O){return a[O.getDay()]}function G(O){return o[O.getDay()]}function M(O){return u[O.getMonth()]}function N(O){return s[O.getMonth()]}function z(O){return i[+(O.getHours()>=12)]}function k(O){return 1+~~(O.getMonth()/3)}function Y(O){return a[O.getUTCDay()]}function j(O){return o[O.getUTCDay()]}function W(O){return u[O.getUTCMonth()]}function X(O){return s[O.getUTCMonth()]}function Q(O){return i[+(O.getUTCHours()>=12)]}function ct(O){return 1+~~(O.getUTCMonth()/3)}return{format:function(O){var tt=$(O+="",x);return tt.toString=function(){return O},tt},parse:function(O){var tt=A(O+="",!1);return tt.toString=function(){return O},tt},utcFormat:function(O){var tt=$(O+="",b);return tt.toString=function(){return O},tt},utcParse:function(O){var tt=A(O+="",!0);return tt.toString=function(){return O},tt}}}var bb={"-":"",_:" ",0:"0"},Rt=/^\s*\d+/,lL=/^%/,fL=/[\\^$*+?|[\]().{}]/g;function pt(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function hL(t){return t.replace(fL,"\\$&")}function Lo(t){return new RegExp("^(?:"+t.map(hL).join("|")+")","i")}function Eo(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function dL(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function pL(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function gL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function mL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function yL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function vb(t,e,n){var r=Rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function xb(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function bL(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function vL(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function xL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function _b(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function _L(t,e,n){var r=Rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function wb(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function wL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function $L(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function SL(t,e,n){var r=Rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function AL(t,e,n){var r=Rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ML(t,e,n){var r=lL.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function TL(t,e,n){var r=Rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function PL(t,e,n){var r=Rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function $b(t,e){return pt(t.getDate(),e,2)}function DL(t,e){return pt(t.getHours(),e,2)}function LL(t,e){return pt(t.getHours()%12||12,e,2)}function EL(t,e){return pt(1+ti.count(Oe(t),t),e,3)}function Sb(t,e){return pt(t.getMilliseconds(),e,3)}function kL(t,e){return Sb(t,e)+"000"}function CL(t,e){return pt(t.getMonth()+1,e,2)}function IL(t,e){return pt(t.getMinutes(),e,2)}function RL(t,e){return pt(t.getSeconds(),e,2)}function NL(t){var e=t.getDay();return e===0?7:e}function FL(t,e){return pt(ei.count(Oe(t)-1,t),e,2)}function Ab(t){var e=t.getDay();return e>=4||e===0?rr(t):rr.ceil(t)}function GL(t,e){return t=Ab(t),pt(rr.count(Oe(t),t)+(Oe(t).getDay()===4),e,2)}function zL(t){return t.getDay()}function OL(t,e){return pt(To.count(Oe(t)-1,t),e,2)}function UL(t,e){return pt(t.getFullYear()%100,e,2)}function BL(t,e){return t=Ab(t),pt(t.getFullYear()%100,e,2)}function YL(t,e){return pt(t.getFullYear()%1e4,e,4)}function WL(t,e){var n=t.getDay();return t=n>=4||n===0?rr(t):rr.ceil(t),pt(t.getFullYear()%1e4,e,4)}function HL(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+pt(e/60|0,"0",2)+pt(e%60,"0",2)}function Mb(t,e){return pt(t.getUTCDate(),e,2)}function qL(t,e){return pt(t.getUTCHours(),e,2)}function XL(t,e){return pt(t.getUTCHours()%12||12,e,2)}function jL(t,e){return pt(1+Mo.count(Ue(t),t),e,3)}function Tb(t,e){return pt(t.getUTCMilliseconds(),e,3)}function VL(t,e){return Tb(t,e)+"000"}function ZL(t,e){return pt(t.getUTCMonth()+1,e,2)}function KL(t,e){return pt(t.getUTCMinutes(),e,2)}function QL(t,e){return pt(t.getUTCSeconds(),e,2)}function JL(t){var e=t.getUTCDay();return e===0?7:e}function tE(t,e){return pt(ni.count(Ue(t)-1,t),e,2)}function Pb(t){var e=t.getUTCDay();return e>=4||e===0?or(t):or.ceil(t)}function eE(t,e){return t=Pb(t),pt(or.count(Ue(t),t)+(Ue(t).getUTCDay()===4),e,2)}function nE(t){return t.getUTCDay()}function rE(t,e){return pt(Po.count(Ue(t)-1,t),e,2)}function iE(t,e){return pt(t.getUTCFullYear()%100,e,2)}function oE(t,e){return t=Pb(t),pt(t.getUTCFullYear()%100,e,2)}function aE(t,e){return pt(t.getUTCFullYear()%1e4,e,4)}function sE(t,e){var n=t.getUTCDay();return t=n>=4||n===0?or(t):or.ceil(t),pt(t.getUTCFullYear()%1e4,e,4)}function uE(){return"+0000"}function Db(){return"%"}function Lb(t){return+t}function Eb(t){return Math.floor(+t/1e3)}var ri,rh,kb,su,ih;Cb({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Cb(t){return ri=yb(t),rh=ri.format,kb=ri.parse,su=ri.utcFormat,ih=ri.utcParse,ri}var Ib="%Y-%m-%dT%H:%M:%S.%LZ";function cE(t){return t.toISOString()}var lE=Date.prototype.toISOString?cE:su(Ib);const fE=lE;function hE(t){var e=new Date(t);return isNaN(e)?null:e}var dE=+new Date("2000-01-01T00:00:00.000Z")?hE:ih(Ib);const pE=dE;function gE(t){return new Date(t)}function mE(t){return t instanceof Date?+t:+new Date(+t)}function oh(t,e,n,r,i,o,a,s,u,c){var l=Hf(),h=l.invert,f=l.domain,d=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),v=c("%b %d"),x=c("%B"),b=c("%Y");function w($){return(u($)<$?d:s($)<$?p:a($)<$?g:o($)<$?m:r($)<$?i($)<$?y:v:n($)<$?x:b)($)}return l.invert=function($){return new Date(h($))},l.domain=function($){return arguments.length?f(Array.from($,mE)):f().map(gE)},l.ticks=function($){var A=f();return t(A[0],A[A.length-1],$??10)},l.tickFormat=function($,A){return A==null?w:c(A)},l.nice=function($){var A=f();return(!$||typeof $.range!="function")&&($=e(A[0],A[A.length-1],$??10)),$?f(zy(A,$)):l},l.copy=function(){return Ao(l,oh(t,e,n,r,i,o,a,s,u,c))},l}function yE(){return ge.apply(oh(gb,mb,Oe,ou,ei,ti,ru,eu,an,rh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function bE(){return ge.apply(oh(db,pb,Ue,au,ni,Mo,iu,nu,an,su).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function uu(){var t=0,e=1,n,r,i,o,a=Jt,s=!1,u;function c(h){return h==null||isNaN(h=+h)?u:a(i===0?.5:(h=(o(h)-n)*i,s?Math.max(0,Math.min(1,h)):h))}c.domain=function(h){return arguments.length?([t,e]=h,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),c):[t,e]},c.clamp=function(h){return arguments.length?(s=!!h,c):s},c.interpolator=function(h){return arguments.length?(a=h,c):a};function l(h){return function(f){var d,p;return arguments.length?([d,p]=f,a=h(d,p),c):[a(0),a(1)]}}return c.range=l(dn),c.rangeRound=l(Ua),c.unknown=function(h){return arguments.length?(u=h,c):u},function(h){return o=h,n=h(t),r=h(e),i=n===r?0:1/(r-n),c}}function vn(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Rb(){var t=bn(uu()(Jt));return t.copy=function(){return vn(t,Rb())},en.apply(t,arguments)}function Nb(){var t=Xf(uu()).domain([1,10]);return t.copy=function(){return vn(t,Nb()).base(t.base())},en.apply(t,arguments)}function Fb(){var t=jf(uu());return t.copy=function(){return vn(t,Fb()).constant(t.constant())},en.apply(t,arguments)}function ah(){var t=Vf(uu());return t.copy=function(){return vn(t,ah()).exponent(t.exponent())},en.apply(t,arguments)}function vE(){return ah.apply(null,arguments).exponent(.5)}function Gb(){var t=[],e=Jt;function n(r){if(r!=null&&!isNaN(r=+r))return e((kn(t,r,1)-1)/(t.length-1))}return n.domain=function(r){if(!arguments.length)return t.slice();t=[];for(let i of r)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(_t),n},n.interpolator=function(r){return arguments.length?(e=r,n):e},n.range=function(){return t.map((r,i)=>e(i/(t.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>Ii(t,o/r))},n.copy=function(){return Gb(e).domain(t)},en.apply(n,arguments)}function cu(){var t=0,e=.5,n=1,r=1,i,o,a,s,u,c=Jt,l,h=!1,f;function d(g){return isNaN(g=+g)?f:(g=.5+((g=+l(g))-o)*(r*g<r*o?s:u),c(h?Math.max(0,Math.min(1,g)):g))}d.domain=function(g){return arguments.length?([t,e,n]=g,i=l(t=+t),o=l(e=+e),a=l(n=+n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,d):[t,e,n]},d.clamp=function(g){return arguments.length?(h=!!g,d):h},d.interpolator=function(g){return arguments.length?(c=g,d):c};function p(g){return function(m){var y,v,x;return arguments.length?([y,v,x]=m,c=z0(g,[y,v,x]),d):[c(0),c(.5),c(1)]}}return d.range=p(dn),d.rangeRound=p(Ua),d.unknown=function(g){return arguments.length?(f=g,d):f},function(g){return l=g,i=g(t),o=g(e),a=g(n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,d}}function zb(){var t=bn(cu()(Jt));return t.copy=function(){return vn(t,zb())},en.apply(t,arguments)}function Ob(){var t=Xf(cu()).domain([.1,1,10]);return t.copy=function(){return vn(t,Ob()).base(t.base())},en.apply(t,arguments)}function Ub(){var t=jf(cu());return t.copy=function(){return vn(t,Ub()).constant(t.constant())},en.apply(t,arguments)}function sh(){var t=Vf(cu());return t.copy=function(){return vn(t,sh()).exponent(t.exponent())},en.apply(t,arguments)}function xE(){return sh.apply(null,arguments).exponent(.5)}function ut(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}const _E=ut("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),wE=ut("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),$E=ut("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),SE=ut("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),AE=ut("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),ME=ut("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),TE=ut("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),PE=ut("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),DE=ut("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),LE=ut("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),EE=ut("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),bt=t=>S0(t[t.length-1]);var Bb=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ut);const kE=bt(Bb);var Yb=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ut);const CE=bt(Yb);var Wb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ut);const IE=bt(Wb);var Hb=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ut);const RE=bt(Hb);var qb=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ut);const NE=bt(qb);var Xb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ut);const FE=bt(Xb);var jb=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ut);const GE=bt(jb);var Vb=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ut);const zE=bt(Vb);var Zb=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ut);const OE=bt(Zb);var Kb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ut);const UE=bt(Kb);var Qb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ut);const BE=bt(Qb);var Jb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ut);const YE=bt(Jb);var tv=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ut);const WE=bt(tv);var ev=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ut);const HE=bt(ev);var nv=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ut);const qE=bt(nv);var rv=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ut);const XE=bt(rv);var iv=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ut);const jE=bt(iv);var ov=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ut);const VE=bt(ov);var av=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ut);const ZE=bt(av);var sv=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ut);const KE=bt(sv);var uv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ut);const QE=bt(uv);var cv=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ut);const JE=bt(cv);var lv=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ut);const tk=bt(lv);var fv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ut);const ek=bt(fv);var hv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ut);const nk=bt(hv);var dv=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ut);const rk=bt(dv);var pv=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ut);const ik=bt(pv);function ok(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const ak=Ya(Me(300,.5,0),Me(-240,.5,1));var sk=Ya(Me(-100,.75,.35),Me(80,1.5,.8)),uk=Ya(Me(260,.75,.35),Me(80,1.5,.8)),lu=Me();function ck(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return lu.h=360*t-100,lu.s=1.5-1.5*e,lu.l=.8-.9*e,lu+""}var fu=kr(),lk=Math.PI/3,fk=Math.PI*2/3;function hk(t){var e;return t=(.5-t)*Math.PI,fu.r=255*(e=Math.sin(t))*e,fu.g=255*(e=Math.sin(t+lk))*e,fu.b=255*(e=Math.sin(t+fk))*e,fu+""}function dk(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function hu(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const pk=hu(ut("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var gk=hu(ut("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),mk=hu(ut("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),yk=hu(ut("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function at(t){return function(){return t}}const gv=Math.abs,Ut=Math.atan2,sn=Math.cos,bk=Math.max,ii=Math.min,ie=Math.sin,vt=Math.sqrt,Bt=1e-12,xn=Math.PI,du=xn/2,_n=2*xn;function vk(t){return t>1?0:t<-1?xn:Math.acos(t)}function mv(t){return t>=1?du:t<=-1?-du:Math.asin(t)}function ko(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new Ki(e)}function xk(t){return t.innerRadius}function _k(t){return t.outerRadius}function wk(t){return t.startAngle}function $k(t){return t.endAngle}function Sk(t){return t&&t.padAngle}function Ak(t,e,n,r,i,o,a,s){var u=n-t,c=r-e,l=a-i,h=s-o,f=h*u-l*c;if(!(f*f<Bt))return f=(l*(e-o)-h*(t-i))/f,[t+f*u,e+f*c]}function pu(t,e,n,r,i,o,a){var s=t-n,u=e-r,c=(a?o:-o)/vt(s*s+u*u),l=c*u,h=-c*s,f=t+l,d=e+h,p=n+l,g=r+h,m=(f+p)/2,y=(d+g)/2,v=p-f,x=g-d,b=v*v+x*x,w=i-o,$=f*g-p*d,A=(x<0?-1:1)*vt(bk(0,w*w*b-$*$)),_=($*x-v*A)/b,L=(-$*v-x*A)/b,E=($*x+v*A)/b,T=(-$*v+x*A)/b,I=_-m,P=L-y,D=E-m,C=T-y;return I*I+P*P>D*D+C*C&&(_=E,L=T),{cx:_,cy:L,x01:-l,y01:-h,x11:_*(i/w-1),y11:L*(i/w-1)}}function yv(){var t=xk,e=_k,n=at(0),r=null,i=wk,o=$k,a=Sk,s=null,u=ko(c);function c(){var l,h,f=+t.apply(this,arguments),d=+e.apply(this,arguments),p=i.apply(this,arguments)-du,g=o.apply(this,arguments)-du,m=gv(g-p),y=g>p;if(s||(s=l=u()),d<f&&(h=d,d=f,f=h),!(d>Bt))s.moveTo(0,0);else if(m>_n-Bt)s.moveTo(d*sn(p),d*ie(p)),s.arc(0,0,d,p,g,!y),f>Bt&&(s.moveTo(f*sn(g),f*ie(g)),s.arc(0,0,f,g,p,y));else{var v=p,x=g,b=p,w=g,$=m,A=m,_=a.apply(this,arguments)/2,L=_>Bt&&(r?+r.apply(this,arguments):vt(f*f+d*d)),E=ii(gv(d-f)/2,+n.apply(this,arguments)),T=E,I=E,P,D;if(L>Bt){var C=mv(L/f*ie(_)),S=mv(L/d*ie(_));($-=C*2)>Bt?(C*=y?1:-1,b+=C,w-=C):($=0,b=w=(p+g)/2),(A-=S*2)>Bt?(S*=y?1:-1,v+=S,x-=S):(A=0,v=x=(p+g)/2)}var R=d*sn(v),G=d*ie(v),M=f*sn(w),N=f*ie(w);if(E>Bt){var z=d*sn(x),k=d*ie(x),Y=f*sn(b),j=f*ie(b),W;if(m<xn)if(W=Ak(R,G,Y,j,z,k,M,N)){var X=R-W[0],Q=G-W[1],ct=z-W[0],O=k-W[1],tt=1/ie(vk((X*ct+Q*O)/(vt(X*X+Q*Q)*vt(ct*ct+O*O)))/2),st=vt(W[0]*W[0]+W[1]*W[1]);T=ii(E,(f-st)/(tt-1)),I=ii(E,(d-st)/(tt+1))}else T=I=0}A>Bt?I>Bt?(P=pu(Y,j,R,G,d,I,y),D=pu(z,k,M,N,d,I,y),s.moveTo(P.cx+P.x01,P.cy+P.y01),I<E?s.arc(P.cx,P.cy,I,Ut(P.y01,P.x01),Ut(D.y01,D.x01),!y):(s.arc(P.cx,P.cy,I,Ut(P.y01,P.x01),Ut(P.y11,P.x11),!y),s.arc(0,0,d,Ut(P.cy+P.y11,P.cx+P.x11),Ut(D.cy+D.y11,D.cx+D.x11),!y),s.arc(D.cx,D.cy,I,Ut(D.y11,D.x11),Ut(D.y01,D.x01),!y))):(s.moveTo(R,G),s.arc(0,0,d,v,x,!y)):s.moveTo(R,G),!(f>Bt)||!($>Bt)?s.lineTo(M,N):T>Bt?(P=pu(M,N,z,k,f,-T,y),D=pu(R,G,Y,j,f,-T,y),s.lineTo(P.cx+P.x01,P.cy+P.y01),T<E?s.arc(P.cx,P.cy,T,Ut(P.y01,P.x01),Ut(D.y01,D.x01),!y):(s.arc(P.cx,P.cy,T,Ut(P.y01,P.x01),Ut(P.y11,P.x11),!y),s.arc(0,0,f,Ut(P.cy+P.y11,P.cx+P.x11),Ut(D.cy+D.y11,D.cx+D.x11),y),s.arc(D.cx,D.cy,T,Ut(D.y11,D.x11),Ut(D.y01,D.x01),!y))):s.arc(0,0,f,w,b,y)}if(s.closePath(),l)return s=null,l+""||null}return c.centroid=function(){var l=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,h=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-xn/2;return[sn(h)*l,ie(h)*l]},c.innerRadius=function(l){return arguments.length?(t=typeof l=="function"?l:at(+l),c):t},c.outerRadius=function(l){return arguments.length?(e=typeof l=="function"?l:at(+l),c):e},c.cornerRadius=function(l){return arguments.length?(n=typeof l=="function"?l:at(+l),c):n},c.padRadius=function(l){return arguments.length?(r=l==null?null:typeof l=="function"?l:at(+l),c):r},c.startAngle=function(l){return arguments.length?(i=typeof l=="function"?l:at(+l),c):i},c.endAngle=function(l){return arguments.length?(o=typeof l=="function"?l:at(+l),c):o},c.padAngle=function(l){return arguments.length?(a=typeof l=="function"?l:at(+l),c):a},c.context=function(l){return arguments.length?(s=l??null,c):s},c}var Mk=Array.prototype.slice;function gu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function bv(t){this._context=t}bv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function mu(t){return new bv(t)}function uh(t){return t[0]}function ch(t){return t[1]}function yu(t,e){var n=at(!0),r=null,i=mu,o=null,a=ko(s);t=typeof t=="function"?t:t===void 0?uh:at(t),e=typeof e=="function"?e:e===void 0?ch:at(e);function s(u){var c,l=(u=gu(u)).length,h,f=!1,d;for(r==null&&(o=i(d=a())),c=0;c<=l;++c)!(c<l&&n(h=u[c],c,u))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(h,c,u),+e(h,c,u));if(d)return o=null,d+""||null}return s.x=function(u){return arguments.length?(t=typeof u=="function"?u:at(+u),s):t},s.y=function(u){return arguments.length?(e=typeof u=="function"?u:at(+u),s):e},s.defined=function(u){return arguments.length?(n=typeof u=="function"?u:at(!!u),s):n},s.curve=function(u){return arguments.length?(i=u,r!=null&&(o=i(r)),s):i},s.context=function(u){return arguments.length?(u==null?r=o=null:o=i(r=u),s):r},s}function lh(t,e,n){var r=null,i=at(!0),o=null,a=mu,s=null,u=ko(c);t=typeof t=="function"?t:t===void 0?uh:at(+t),e=typeof e=="function"?e:at(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?ch:at(+n);function c(h){var f,d,p,g=(h=gu(h)).length,m,y=!1,v,x=new Array(g),b=new Array(g);for(o==null&&(s=a(v=u())),f=0;f<=g;++f){if(!(f<g&&i(m=h[f],f,h))===y)if(y=!y)d=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=f-1;p>=d;--p)s.point(x[p],b[p]);s.lineEnd(),s.areaEnd()}y&&(x[f]=+t(m,f,h),b[f]=+e(m,f,h),s.point(r?+r(m,f,h):x[f],n?+n(m,f,h):b[f]))}if(v)return s=null,v+""||null}function l(){return yu().defined(i).curve(a).context(o)}return c.x=function(h){return arguments.length?(t=typeof h=="function"?h:at(+h),r=null,c):t},c.x0=function(h){return arguments.length?(t=typeof h=="function"?h:at(+h),c):t},c.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:at(+h),c):r},c.y=function(h){return arguments.length?(e=typeof h=="function"?h:at(+h),n=null,c):e},c.y0=function(h){return arguments.length?(e=typeof h=="function"?h:at(+h),c):e},c.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:at(+h),c):n},c.lineX0=c.lineY0=function(){return l().x(t).y(e)},c.lineY1=function(){return l().x(t).y(n)},c.lineX1=function(){return l().x(r).y(e)},c.defined=function(h){return arguments.length?(i=typeof h=="function"?h:at(!!h),c):i},c.curve=function(h){return arguments.length?(a=h,o!=null&&(s=a(o)),c):a},c.context=function(h){return arguments.length?(h==null?o=s=null:s=a(o=h),c):o},c}function Tk(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Pk(t){return t}function vv(){var t=Pk,e=Tk,n=null,r=at(0),i=at(_n),o=at(0);function a(s){var u,c=(s=gu(s)).length,l,h,f=0,d=new Array(c),p=new Array(c),g=+r.apply(this,arguments),m=Math.min(_n,Math.max(-_n,i.apply(this,arguments)-g)),y,v=Math.min(Math.abs(m)/c,o.apply(this,arguments)),x=v*(m<0?-1:1),b;for(u=0;u<c;++u)(b=p[d[u]=u]=+t(s[u],u,s))>0&&(f+=b);for(e!=null?d.sort(function(w,$){return e(p[w],p[$])}):n!=null&&d.sort(function(w,$){return n(s[w],s[$])}),u=0,h=f?(m-c*x)/f:0;u<c;++u,g=y)l=d[u],b=p[l],y=g+(b>0?b*h:0)+x,p[l]={data:s[l],index:u,value:b,startAngle:g,endAngle:y,padAngle:v};return p}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:at(+s),a):t},a.sortValues=function(s){return arguments.length?(e=s,n=null,a):e},a.sort=function(s){return arguments.length?(n=s,e=null,a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:at(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:at(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:at(+s),a):o},a}var xv=fh(mu);function _v(t){this._curve=t}_v.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};function fh(t){function e(n){return new _v(t(n))}return e._curve=t,e}function Co(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(n){return arguments.length?e(fh(n)):e()._curve},t}function wv(){return Co(yu().curve(xv))}function $v(){var t=lh().curve(xv),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Co(n())},delete t.lineX0,t.lineEndAngle=function(){return Co(r())},delete t.lineX1,t.lineInnerRadius=function(){return Co(i())},delete t.lineY0,t.lineOuterRadius=function(){return Co(o())},delete t.lineY1,t.curve=function(a){return arguments.length?e(fh(a)):e()._curve},t}function Io(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class Sv{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}class Dk{constructor(e){this._context=e}lineStart(){this._point=0}lineEnd(){}point(e,n){if(e=+e,n=+n,this._point===0)this._point=1;else{const r=Io(this._x0,this._y0),i=Io(this._x0,this._y0=(this._y0+n)/2),o=Io(e,this._y0),a=Io(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function Av(t){return new Sv(t,!0)}function Mv(t){return new Sv(t,!1)}function Lk(t){return new Dk(t)}function Ek(t){return t.source}function kk(t){return t.target}function bu(t){let e=Ek,n=kk,r=uh,i=ch,o=null,a=null,s=ko(u);function u(){let c;const l=Mk.call(arguments),h=e.apply(this,l),f=n.apply(this,l);if(o==null&&(a=t(c=s())),a.lineStart(),l[0]=h,a.point(+r.apply(this,l),+i.apply(this,l)),l[0]=f,a.point(+r.apply(this,l),+i.apply(this,l)),a.lineEnd(),c)return a=null,c+""||null}return u.source=function(c){return arguments.length?(e=c,u):e},u.target=function(c){return arguments.length?(n=c,u):n},u.x=function(c){return arguments.length?(r=typeof c=="function"?c:at(+c),u):r},u.y=function(c){return arguments.length?(i=typeof c=="function"?c:at(+c),u):i},u.context=function(c){return arguments.length?(c==null?o=a=null:a=t(o=c),u):o},u}function Ck(){return bu(Av)}function Ik(){return bu(Mv)}function Rk(){const t=bu(Lk);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const Nk=vt(3),Tv={draw(t,e){const n=vt(e+ii(e/28,.75))*.59436,r=n/2,i=r*Nk;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},vu={draw(t,e){const n=vt(e/xn);t.moveTo(n,0),t.arc(0,0,n,0,_n)}},Pv={draw(t,e){const n=vt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},Dv=vt(1/3),Fk=Dv*2,Lv={draw(t,e){const n=vt(e/Fk),r=n*Dv;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},Ev={draw(t,e){const n=vt(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},kv={draw(t,e){const n=vt(e-ii(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},Cv={draw(t,e){const n=vt(e),r=-n/2;t.rect(r,r,n,n)}},Iv={draw(t,e){const n=vt(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},Gk=.8908130915292852,Rv=ie(xn/10)/ie(7*xn/10),zk=ie(_n/10)*Rv,Ok=-sn(_n/10)*Rv,Nv={draw(t,e){const n=vt(e*Gk),r=zk*n,i=Ok*n;t.moveTo(0,-n),t.lineTo(r,i);for(let o=1;o<5;++o){const a=_n*o/5,s=sn(a),u=ie(a);t.lineTo(u*n,-s*n),t.lineTo(s*r-u*i,u*r+s*i)}t.closePath()}},hh=vt(3),Fv={draw(t,e){const n=-vt(e/(hh*3));t.moveTo(0,n*2),t.lineTo(-hh*n,-n),t.lineTo(hh*n,-n),t.closePath()}},Uk=vt(3),Gv={draw(t,e){const n=vt(e)*.6824,r=n/2,i=n*Uk/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},ye=-.5,be=vt(3)/2,dh=1/vt(12),Bk=(dh/2+1)*3,zv={draw(t,e){const n=vt(e/Bk),r=n/2,i=n*dh,o=r,a=n*dh+n,s=-o,u=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,u),t.lineTo(ye*r-be*i,be*r+ye*i),t.lineTo(ye*o-be*a,be*o+ye*a),t.lineTo(ye*s-be*u,be*s+ye*u),t.lineTo(ye*r+be*i,ye*i-be*r),t.lineTo(ye*o+be*a,ye*a-be*o),t.lineTo(ye*s+be*u,ye*u-be*s),t.closePath()}},ph={draw(t,e){const n=vt(e-ii(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},Ov=[vu,Pv,Lv,Cv,Nv,Fv,zv],Yk=[vu,kv,ph,Gv,Tv,Iv,Ev];function Wk(t,e){let n=null,r=ko(i);t=typeof t=="function"?t:at(t||vu),e=typeof e=="function"?e:at(e===void 0?64:+e);function i(){let o;if(n||(n=o=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(t=typeof o=="function"?o:at(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:at(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function wn(){}function xu(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function _u(t){this._context=t}_u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:xu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:xu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Hk(t){return new _u(t)}function Uv(t){this._context=t}Uv.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:xu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function qk(t){return new Uv(t)}function Bv(t){this._context=t}Bv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:xu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Xk(t){return new Bv(t)}function Yv(t,e){this._basis=new _u(t),this._beta=e}Yv.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r=t[0],i=e[0],o=t[n]-r,a=e[n]-i,s=-1,u;++s<=n;)u=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(r+u*o),this._beta*e[s]+(1-this._beta)*(i+u*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const jk=function t(e){function n(r){return e===1?new _u(r):new Yv(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function wu(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function gh(t,e){this._context=t,this._k=(1-e)/6}gh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:wu(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:wu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Vk=function t(e){function n(r){return new gh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function mh(t,e){this._context=t,this._k=(1-e)/6}mh.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:wu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Zk=function t(e){function n(r){return new mh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function yh(t,e){this._context=t,this._k=(1-e)/6}yh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:wu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Kk=function t(e){function n(r){return new yh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function bh(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Bt){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>Bt){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/l,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Wv(t,e){this._context=t,this._alpha=e}Wv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:bh(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Qk=function t(e){function n(r){return e?new Wv(r,e):new gh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Hv(t,e){this._context=t,this._alpha=e}Hv.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:bh(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Jk=function t(e){function n(r){return e?new Hv(r,e):new mh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function qv(t,e){this._context=t,this._alpha=e}qv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:bh(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const tC=function t(e){function n(r){return e?new qv(r,e):new yh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Xv(t){this._context=t}Xv.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function eC(t){return new Xv(t)}function jv(t){return t<0?-1:1}function Vv(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(jv(o)+jv(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Zv(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function vh(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function $u(t){this._context=t}$u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:vh(this,this._t0,Zv(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,vh(this,Zv(this,n=Vv(this,t,e)),n);break;default:vh(this,this._t0,n=Vv(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Kv(t){this._context=new Qv(t)}(Kv.prototype=Object.create($u.prototype)).point=function(t,e){$u.prototype.point.call(this,e,t)};function Qv(t){this._context=t}Qv.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};function nC(t){return new $u(t)}function rC(t){return new Kv(t)}function Jv(t){this._context=t}Jv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=t2(t),i=t2(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function t2(t){var e,n=t.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/o[e-1],o[e]-=r,a[e]-=r*a[e-1];for(i[n-1]=a[n-1]/o[n-1],e=n-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function iC(t){return new Jv(t)}function Su(t,e){this._context=t,this._t=e}Su.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function oC(t){return new Su(t,.5)}function aC(t){return new Su(t,0)}function sC(t){return new Su(t,1)}function oi(t,e){if((a=t.length)>1)for(var n=1,r,i,o=t[e[0]],a,s=o.length;n<a;++n)for(i=o,o=t[e[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function ai(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function uC(t,e){return t[e]}function cC(t){const e=[];return e.key=t,e}function lC(){var t=at([]),e=ai,n=oi,r=uC;function i(o){var a=Array.from(t.apply(this,arguments),cC),s,u=a.length,c=-1,l;for(const h of o)for(s=0,++c;s<u;++s)(a[s][c]=[0,+r(h,a[s].key,c,o)]).data=h;for(s=0,l=gu(e(a));s<u;++s)a[l[s]].index=s;return n(a,l),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:at(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:at(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?ai:typeof o=="function"?o:at(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??oi,i):n},i}function fC(t,e){if((r=t.length)>0){for(var n,r,i=0,o=t[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=t[n][i][1]||0;if(a)for(n=0;n<r;++n)t[n][i][1]/=a}oi(t,e)}}function hC(t,e){if((u=t.length)>0)for(var n,r=0,i,o,a,s,u,c=t[e[0]].length;r<c;++r)for(a=s=0,n=0;n<u;++n)(o=(i=t[e[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=s,i[0]=s+=o):(i[0]=0,i[1]=o)}function dC(t,e){if((i=t.length)>0){for(var n=0,r=t[e[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=t[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}oi(t,e)}}function pC(t,e){if(!(!((a=t.length)>0)||!((o=(i=t[e[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,u=0,c=0;s<a;++s){for(var l=t[e[s]],h=l[r][1]||0,f=l[r-1][1]||0,d=(h-f)/2,p=0;p<s;++p){var g=t[e[p]],m=g[r][1]||0,y=g[r-1][1]||0;d+=m-y}u+=h,c+=d*h}i[r-1][1]+=i[r-1][0]=n,u&&(n-=c/u)}i[r-1][1]+=i[r-1][0]=n,oi(t,e)}}function e2(t){var e=t.map(gC);return ai(t).sort(function(n,r){return e[n]-e[r]})}function gC(t){for(var e=-1,n=0,r=t.length,i,o=-1/0;++e<r;)(i=+t[e][1])>o&&(o=i,n=e);return n}function n2(t){var e=t.map(r2);return ai(t).sort(function(n,r){return e[n]-e[r]})}function r2(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function mC(t){return n2(t).reverse()}function yC(t){var e=t.length,n,r,i=t.map(r2),o=e2(t),a=0,s=0,u=[],c=[];for(n=0;n<e;++n)r=o[n],a<s?(a+=i[r],u.push(r)):(s+=i[r],c.push(r));return c.reverse().concat(u)}function bC(t){return ai(t).reverse()}const Au=t=>()=>t;function vC(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Be(t,e,n){this.k=t,this.x=e,this.y=n}Be.prototype={constructor:Be,scale:function(t){return t===1?this:new Be(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Be(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Mu=new Be(1,0,0);i2.prototype=Be.prototype;function i2(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Mu;return t.__zoom}function xh(t){t.stopImmediatePropagation()}function Ro(t){t.preventDefault(),t.stopImmediatePropagation()}function xC(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function _C(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function o2(){return this.__zoom||Mu}function wC(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function $C(){return navigator.maxTouchPoints||"ontouchstart"in this}function SC(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function a2(){var t=xC,e=_C,n=SC,r=wC,i=$C,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=R0,c=Nn("start","zoom","end"),l,h,f,d=500,p=150,g=0,m=10;function y(D){D.property("__zoom",o2).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",L).on("dblclick.zoom",E).filter(i).on("touchstart.zoom",T).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",P).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(D,C,S,R){var G=D.selection?D.selection():D;G.property("__zoom",o2),D!==G?w(D,C,S,R):G.interrupt().each(function(){$(this,arguments).event(R).start().zoom(null,typeof C=="function"?C.apply(this,arguments):C).end()})},y.scaleBy=function(D,C,S,R){y.scaleTo(D,function(){var G=this.__zoom.k,M=typeof C=="function"?C.apply(this,arguments):C;return G*M},S,R)},y.scaleTo=function(D,C,S,R){y.transform(D,function(){var G=e.apply(this,arguments),M=this.__zoom,N=S==null?b(G):typeof S=="function"?S.apply(this,arguments):S,z=M.invert(N),k=typeof C=="function"?C.apply(this,arguments):C;return n(x(v(M,k),N,z),G,a)},S,R)},y.translateBy=function(D,C,S,R){y.transform(D,function(){return n(this.__zoom.translate(typeof C=="function"?C.apply(this,arguments):C,typeof S=="function"?S.apply(this,arguments):S),e.apply(this,arguments),a)},null,R)},y.translateTo=function(D,C,S,R,G){y.transform(D,function(){var M=e.apply(this,arguments),N=this.__zoom,z=R==null?b(M):typeof R=="function"?R.apply(this,arguments):R;return n(Mu.translate(z[0],z[1]).scale(N.k).translate(typeof C=="function"?-C.apply(this,arguments):-C,typeof S=="function"?-S.apply(this,arguments):-S),M,a)},R,G)};function v(D,C){return C=Math.max(o[0],Math.min(o[1],C)),C===D.k?D:new Be(C,D.x,D.y)}function x(D,C,S){var R=C[0]-S[0]*D.k,G=C[1]-S[1]*D.k;return R===D.x&&G===D.y?D:new Be(D.k,R,G)}function b(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function w(D,C,S,R){D.on("start.zoom",function(){$(this,arguments).event(R).start()}).on("interrupt.zoom end.zoom",function(){$(this,arguments).event(R).end()}).tween("zoom",function(){var G=this,M=arguments,N=$(G,M).event(R),z=e.apply(G,M),k=S==null?b(z):typeof S=="function"?S.apply(G,M):S,Y=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),j=G.__zoom,W=typeof C=="function"?C.apply(G,M):C,X=u(j.invert(k).concat(Y/j.k),W.invert(k).concat(Y/W.k));return function(Q){if(Q===1)Q=W;else{var ct=X(Q),O=Y/ct[2];Q=new Be(O,k[0]-ct[0]*O,k[1]-ct[1]*O)}N.zoom(null,Q)}})}function $(D,C,S){return!S&&D.__zooming||new A(D,C)}function A(D,C){this.that=D,this.args=C,this.active=0,this.sourceEvent=null,this.extent=e.apply(D,C),this.taps=0}A.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,C){return this.mouse&&D!=="mouse"&&(this.mouse[1]=C.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=C.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=C.invert(this.touch1[0])),this.that.__zoom=C,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var C=V(this.that).datum();c.call(D,this.that,new vC(D,{sourceEvent:this.sourceEvent,target:y,type:D,transform:this.that.__zoom,dispatch:c}),C)}};function _(D,...C){if(!t.apply(this,arguments))return;var S=$(this,C).event(D),R=this.__zoom,G=Math.max(o[0],Math.min(o[1],R.k*Math.pow(2,r.apply(this,arguments)))),M=se(D);if(S.wheel)(S.mouse[0][0]!==M[0]||S.mouse[0][1]!==M[1])&&(S.mouse[1]=R.invert(S.mouse[0]=M)),clearTimeout(S.wheel);else{if(R.k===G)return;S.mouse=[M,R.invert(M)],Wn(this),S.start()}Ro(D),S.wheel=setTimeout(N,p),S.zoom("mouse",n(x(v(R,G),S.mouse[0],S.mouse[1]),S.extent,a));function N(){S.wheel=null,S.end()}}function L(D,...C){if(f||!t.apply(this,arguments))return;var S=D.currentTarget,R=$(this,C,!0).event(D),G=V(D.view).on("mousemove.zoom",k,!0).on("mouseup.zoom",Y,!0),M=se(D,S),N=D.clientX,z=D.clientY;Pa(D.view),xh(D),R.mouse=[M,this.__zoom.invert(M)],Wn(this),R.start();function k(j){if(Ro(j),!R.moved){var W=j.clientX-N,X=j.clientY-z;R.moved=W*W+X*X>g}R.event(j).zoom("mouse",n(x(R.that.__zoom,R.mouse[0]=se(j,S),R.mouse[1]),R.extent,a))}function Y(j){G.on("mousemove.zoom mouseup.zoom",null),Da(j.view,R.moved),Ro(j),R.event(j).end()}}function E(D,...C){if(t.apply(this,arguments)){var S=this.__zoom,R=se(D.changedTouches?D.changedTouches[0]:D,this),G=S.invert(R),M=S.k*(D.shiftKey?.5:2),N=n(x(v(S,M),R,G),e.apply(this,C),a);Ro(D),s>0?V(this).transition().duration(s).call(w,N,R,D):V(this).call(y.transform,N,R,D)}}function T(D,...C){if(t.apply(this,arguments)){var S=D.touches,R=S.length,G=$(this,C,D.changedTouches.length===R).event(D),M,N,z,k;for(xh(D),N=0;N<R;++N)z=S[N],k=se(z,this),k=[k,this.__zoom.invert(k),z.identifier],G.touch0?!G.touch1&&G.touch0[2]!==k[2]&&(G.touch1=k,G.taps=0):(G.touch0=k,M=!0,G.taps=1+!!l);l&&(l=clearTimeout(l)),M&&(G.taps<2&&(h=k[0],l=setTimeout(function(){l=null},d)),Wn(this),G.start())}}function I(D,...C){if(this.__zooming){var S=$(this,C).event(D),R=D.changedTouches,G=R.length,M,N,z,k;for(Ro(D),M=0;M<G;++M)N=R[M],z=se(N,this),S.touch0&&S.touch0[2]===N.identifier?S.touch0[0]=z:S.touch1&&S.touch1[2]===N.identifier&&(S.touch1[0]=z);if(N=S.that.__zoom,S.touch1){var Y=S.touch0[0],j=S.touch0[1],W=S.touch1[0],X=S.touch1[1],Q=(Q=W[0]-Y[0])*Q+(Q=W[1]-Y[1])*Q,ct=(ct=X[0]-j[0])*ct+(ct=X[1]-j[1])*ct;N=v(N,Math.sqrt(Q/ct)),z=[(Y[0]+W[0])/2,(Y[1]+W[1])/2],k=[(j[0]+X[0])/2,(j[1]+X[1])/2]}else if(S.touch0)z=S.touch0[0],k=S.touch0[1];else return;S.zoom("touch",n(x(N,z,k),S.extent,a))}}function P(D,...C){if(this.__zooming){var S=$(this,C).event(D),R=D.changedTouches,G=R.length,M,N;for(xh(D),f&&clearTimeout(f),f=setTimeout(function(){f=null},d),M=0;M<G;++M)N=R[M],S.touch0&&S.touch0[2]===N.identifier?delete S.touch0:S.touch1&&S.touch1[2]===N.identifier&&delete S.touch1;if(S.touch1&&!S.touch0&&(S.touch0=S.touch1,delete S.touch1),S.touch0)S.touch0[1]=this.__zoom.invert(S.touch0[0]);else if(S.end(),S.taps===2&&(N=se(N,this),Math.hypot(h[0]-N[0],h[1]-N[1])<m)){var z=V(this).on("dblclick.zoom");z&&z.apply(this,arguments)}}}return y.wheelDelta=function(D){return arguments.length?(r=typeof D=="function"?D:Au(+D),y):r},y.filter=function(D){return arguments.length?(t=typeof D=="function"?D:Au(!!D),y):t},y.touchable=function(D){return arguments.length?(i=typeof D=="function"?D:Au(!!D),y):i},y.extent=function(D){return arguments.length?(e=typeof D=="function"?D:Au([[+D[0][0],+D[0][1]],[+D[1][0],+D[1][1]]]),y):e},y.scaleExtent=function(D){return arguments.length?(o[0]=+D[0],o[1]=+D[1],y):[o[0],o[1]]},y.translateExtent=function(D){return arguments.length?(a[0][0]=+D[0][0],a[1][0]=+D[1][0],a[0][1]=+D[0][1],a[1][1]=+D[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(D){return arguments.length?(n=D,y):n},y.duration=function(D){return arguments.length?(s=+D,y):s},y.interpolate=function(D){return arguments.length?(u=D,y):u},y.on=function(){var D=c.on.apply(c,arguments);return D===c?y:D},y.clickDistance=function(D){return arguments.length?(g=(D=+D)*D,y):Math.sqrt(g)},y.tapDistance=function(D){return arguments.length?(m=+D,y):m},y}const _h=Object.freeze(Object.defineProperty({__proto__:null,Adder:Dt,Delaunay:Ll,FormatSpecifier:cs,InternMap:Ei,InternSet:Cn,Node:tr,Path:Ki,Voronoi:$1,ZoomTransform:Be,active:PM,arc:yv,area:lh,areaRadial:$v,ascending:_t,autoType:Q7,axisBottom:x5,axisLeft:Fg,axisRight:v5,axisTop:Ng,bin:Mg,bisect:kn,bisectCenter:gA,bisectLeft:pA,bisectRight:fg,bisector:pa,blob:e9,blur:mA,blur2:hg,blurImage:yA,brush:UM,brushSelection:GM,brushX:zM,brushY:OM,buffer:r9,chord:YM,chordDirected:HM,chordTranspose:WM,cluster:gP,color:hn,contourDensity:y7,contours:Al,count:ma,create:e8,creator:Aa,cross:SA,csv:a9,csvFormat:U7,csvFormatBody:B7,csvFormatRow:W7,csvFormatRows:Y7,csvFormatValue:H7,csvParse:T1,csvParseRows:O7,cubehelix:Me,cumsum:AA,curveBasis:Hk,curveBasisClosed:qk,curveBasisOpen:Xk,curveBumpX:Av,curveBumpY:Mv,curveBundle:jk,curveCardinal:Vk,curveCardinalClosed:Zk,curveCardinalOpen:Kk,curveCatmullRom:Qk,curveCatmullRomClosed:Jk,curveCatmullRomOpen:tC,curveLinear:mu,curveLinearClosed:eC,curveMonotoneX:nC,curveMonotoneY:rC,curveNatural:iC,curveStep:oC,curveStepAfter:sC,curveStepBefore:aC,descending:cg,deviation:gg,difference:s5,disjoint:u5,dispatch:Nn,drag:Vg,dragDisable:Pa,dragEnable:Da,dsv:o9,dsvFormat:os,easeBack:r1,easeBackIn:xM,easeBackInOut:r1,easeBackOut:_M,easeBounce:Vi,easeBounceIn:bM,easeBounceInOut:vM,easeBounceOut:Vi,easeCircle:n1,easeCircleIn:uM,easeCircleInOut:n1,easeCircleOut:cM,easeCubic:ji,easeCubicIn:tM,easeCubicInOut:ji,easeCubicOut:eM,easeElastic:Qa,easeElasticIn:wM,easeElasticInOut:$M,easeElasticOut:Qa,easeExp:e1,easeExpIn:aM,easeExpInOut:e1,easeExpOut:sM,easeLinear:K4,easePoly:K0,easePolyIn:nM,easePolyInOut:K0,easePolyOut:rM,easeQuad:Z0,easeQuadIn:Q4,easeQuadInOut:Z0,easeQuadOut:J4,easeSin:t1,easeSinIn:iM,easeSinInOut:t1,easeSinOut:oM,every:e5,extent:Li,fcumsum:TA,filter:r5,flatGroup:PA,flatRollup:DA,forceCenter:p9,forceCollide:k1,forceLink:I9,forceManyBody:N1,forceRadial:B9,forceSimulation:R1,forceX:F1,forceY:G1,get format(){return eo},formatDefaultLocale:q1,formatLocale:H1,get formatPrefix(){return Nl},formatSpecifier:Wr,fsum:MA,geoAlbers:ay,geoAlbersUsa:XT,geoArea:Q9,geoAzimuthalEqualArea:jT,geoAzimuthalEqualAreaRaw:wf,geoAzimuthalEquidistant:VT,geoAzimuthalEquidistantRaw:$f,geoBounds:nT,geoCentroid:uT,geoCircle:cT,geoClipAntimeridian:tf,geoClipCircle:Pm,geoClipExtent:mT,geoClipRectangle:Es,geoConicConformal:KT,geoConicConformalRaw:cy,geoConicEqualArea:Ys,geoConicEqualAreaRaw:oy,geoConicEquidistant:JT,geoConicEquidistantRaw:ly,geoContains:$T,geoDistance:Is,geoEqualEarth:eP,geoEqualEarthRaw:Sf,geoEquirectangular:QT,geoEquirectangularRaw:bo,geoGnomonic:nP,geoGnomonicRaw:Af,geoGraticule:Gm,geoGraticule10:ST,geoIdentity:rP,geoInterpolate:AT,geoLength:Dm,geoMercator:ZT,geoMercatorRaw:yo,geoNaturalEarth1:iP,geoNaturalEarth1Raw:Mf,geoOrthographic:oP,geoOrthographicRaw:Tf,geoPath:FT,geoProjection:ze,geoProjectionMutator:xf,geoRotation:xm,geoStereographic:aP,geoStereographicRaw:Pf,geoStream:Pe,geoTransform:GT,geoTransverseMercator:sP,geoTransverseMercatorRaw:Df,gray:_8,greatest:Tg,greatestIndex:VA,group:vg,groupSort:kA,groups:xg,hcl:Fa,hierarchy:qs,histogram:Mg,hsl:Ca,html:h9,image:u9,index:LA,indexes:EA,interpolate:dn,interpolateArray:T8,interpolateBasis:x0,interpolateBasisClosed:_0,interpolateBlues:JE,interpolateBrBG:kE,interpolateBuGn:UE,interpolateBuPu:BE,interpolateCividis:ok,interpolateCool:uk,interpolateCubehelix:B8,interpolateCubehelixDefault:ak,interpolateCubehelixLong:Ya,interpolateDate:T0,interpolateDiscrete:L8,interpolateGnBu:YE,interpolateGreens:tk,interpolateGreys:ek,interpolateHcl:O8,interpolateHclLong:U8,interpolateHsl:F8,interpolateHslLong:G8,interpolateHue:E8,interpolateInferno:mk,interpolateLab:z8,interpolateMagma:gk,interpolateNumber:he,interpolateNumberArray:Zc,interpolateObject:P0,interpolateOrRd:WE,interpolateOranges:ik,interpolatePRGn:CE,interpolatePiYG:IE,interpolatePlasma:yk,interpolatePuBu:qE,interpolatePuBuGn:HE,interpolatePuOr:RE,interpolatePuRd:XE,interpolatePurples:nk,interpolateRainbow:ck,interpolateRdBu:NE,interpolateRdGy:FE,interpolateRdPu:jE,interpolateRdYlBu:GE,interpolateRdYlGn:zE,interpolateReds:rk,interpolateRgb:Ui,interpolateRgbBasis:S0,interpolateRgbBasisClosed:M8,interpolateRound:Ua,interpolateSinebow:hk,interpolateSpectral:OE,interpolateString:Jc,interpolateTransformCss:k0,interpolateTransformSvg:C0,interpolateTurbo:dk,interpolateViridis:pk,interpolateWarm:sk,interpolateYlGn:ZE,interpolateYlGnBu:VE,interpolateYlOrBr:KE,interpolateYlOrRd:QE,interpolateZoom:R0,interrupt:Wn,intersection:c5,interval:X8,isoFormat:fE,isoParse:pE,json:l9,lab:Na,lch:w8,least:jA,leastIndex:Lg,line:yu,lineRadial:wv,link:bu,linkHorizontal:Ck,linkRadial:Rk,linkVertical:Ik,local:Xg,map:i5,matcher:Rc,max:ki,maxIndex:Pc,mean:OA,median:UA,medianIndex:BA,merge:Lc,min:va,minIndex:Dc,mode:WA,namespace:Ni,namespaces:Cc,nice:Mc,now:qi,pack:HP,packEnclose:zP,packSiblings:YP,pairs:HA,partition:qP,path:Sl,pathRound:jM,permute:Ag,pie:vv,piecewise:z0,pointRadial:Io,pointer:se,pointers:r8,polygonArea:sD,polygonCentroid:uD,polygonContains:hD,polygonHull:fD,polygonLength:dD,precisionFixed:X1,precisionPrefix:j1,precisionRound:V1,quadtree:ss,quantile:Ii,quantileIndex:Dg,quantileSorted:Pg,quantize:Y8,quickselect:xa,radialArea:$v,radialLine:wv,randomBates:yD,randomBernoulli:xD,randomBeta:ky,randomBinomial:Cy,randomCauchy:wD,randomExponential:bD,randomGamma:zf,randomGeometric:Ey,randomInt:gD,randomIrwinHall:Ly,randomLcg:TD,randomLogNormal:mD,randomLogistic:$D,randomNormal:Gf,randomPareto:vD,randomPoisson:SD,randomUniform:pD,randomWeibull:_D,range:ln,rank:XA,reduce:o5,reverse:a5,rgb:kr,ribbon:n7,ribbonArrow:r7,rollup:wg,rollups:$g,scaleBand:Bf,scaleDiverging:zb,scaleDivergingLog:Ob,scaleDivergingPow:sh,scaleDivergingSqrt:xE,scaleDivergingSymlog:Ub,scaleIdentity:Gy,scaleImplicit:Of,scaleLinear:qf,scaleLog:Yy,scaleOrdinal:Uf,scalePoint:Yf,scalePow:tu,scaleQuantile:Zy,scaleQuantize:Ky,scaleRadial:Vy,scaleSequential:Rb,scaleSequentialLog:Nb,scaleSequentialPow:ah,scaleSequentialQuantile:Gb,scaleSequentialSqrt:vE,scaleSequentialSymlog:Fb,scaleSqrt:zD,scaleSymlog:qy,scaleThreshold:Qy,scaleTime:yE,scaleUtc:bE,scan:ZA,schemeAccent:wE,schemeBlues:cv,schemeBrBG:Bb,schemeBuGn:Kb,schemeBuPu:Qb,schemeCategory10:_E,schemeDark2:$E,schemeGnBu:Jb,schemeGreens:lv,schemeGreys:fv,schemeObservable10:SE,schemeOrRd:tv,schemeOranges:pv,schemePRGn:Yb,schemePaired:AE,schemePastel1:ME,schemePastel2:TE,schemePiYG:Wb,schemePuBu:nv,schemePuBuGn:ev,schemePuOr:Hb,schemePuRd:rv,schemePurples:hv,schemeRdBu:qb,schemeRdGy:Xb,schemeRdPu:iv,schemeRdYlBu:jb,schemeRdYlGn:Vb,schemeReds:dv,schemeSet1:PE,schemeSet2:DE,schemeSet3:LE,schemeSpectral:Zb,schemeTableau10:EE,schemeYlGn:av,schemeYlGnBu:ov,schemeYlOrBr:sv,schemeYlOrRd:uv,select:V,selectAll:i8,selection:Gn,selector:Ma,selectorAll:Ic,shuffle:KA,shuffler:Eg,some:n5,sort:$c,stack:lC,stackOffsetDiverging:hC,stackOffsetExpand:fC,stackOffsetNone:oi,stackOffsetSilhouette:dC,stackOffsetWiggle:pC,stackOrderAppearance:e2,stackOrderAscending:n2,stackOrderDescending:mC,stackOrderInsideOut:yC,stackOrderNone:ai,stackOrderReverse:bC,stratify:ZP,style:Fn,subset:f5,sum:QA,superset:Cg,svg:d9,symbol:Wk,symbolAsterisk:Tv,symbolCircle:vu,symbolCross:Pv,symbolDiamond:Lv,symbolDiamond2:Ev,symbolPlus:kv,symbolSquare:Cv,symbolSquare2:Iv,symbolStar:Nv,symbolTimes:ph,symbolTriangle:Fv,symbolTriangle2:Gv,symbolWye:zv,symbolX:ph,symbols:Ov,symbolsFill:Ov,symbolsStroke:Yk,text:as,thresholdFreedmanDiaconis:GA,thresholdScott:zA,thresholdSturges:Tc,tickFormat:Fy,tickIncrement:Rn,tickStep:ba,ticks:In,timeDay:ti,timeDays:HD,get timeFormat(){return rh},timeFormatDefaultLocale:Cb,timeFormatLocale:yb,timeFriday:ib,timeFridays:QD,timeHour:ru,timeHours:YD,timeInterval:Tt,timeMillisecond:Jr,timeMilliseconds:Jy,timeMinute:eu,timeMinutes:UD,timeMonday:To,timeMondays:jD,timeMonth:ou,timeMonths:aL,get timeParse(){return kb},timeSaturday:ob,timeSaturdays:JD,timeSecond:an,timeSeconds:eb,timeSunday:ei,timeSundays:ab,timeThursday:rr,timeThursdays:KD,timeTickInterval:mb,timeTicks:gb,timeTuesday:nb,timeTuesdays:VD,timeWednesday:rb,timeWednesdays:ZD,timeWeek:ei,timeWeeks:ab,timeYear:Oe,timeYears:uL,timeout:nl,timer:Xa,timerFlush:B0,transition:j0,transpose:kg,tree:rD,treemap:Py,treemapBinary:iD,treemapDice:So,treemapResquarify:aD,treemapSlice:Ks,treemapSliceDice:oD,treemapSquarify:Ff,tsv:s9,tsvFormat:X7,tsvFormatBody:j7,tsvFormatRow:Z7,tsvFormatRows:V7,tsvFormatValue:K7,tsvParse:P1,tsvParseRows:q7,union:h5,unixDay:th,unixDays:XD,utcDay:Mo,utcDays:qD,get utcFormat(){return su},utcFriday:cb,utcFridays:iL,utcHour:iu,utcHours:WD,utcMillisecond:Jr,utcMilliseconds:Jy,utcMinute:nu,utcMinutes:BD,utcMonday:Po,utcMondays:tL,utcMonth:au,utcMonths:sL,get utcParse(){return ih},utcSaturday:lb,utcSaturdays:oL,utcSecond:an,utcSeconds:eb,utcSunday:ni,utcSundays:fb,utcThursday:or,utcThursdays:rL,utcTickInterval:pb,utcTicks:db,utcTuesday:sb,utcTuesdays:eL,utcWednesday:ub,utcWednesdays:nL,utcWeek:ni,utcWeeks:fb,utcYear:Ue,utcYears:cL,variance:pg,window:Nc,xml:f9,zip:t5,zoom:a2,zoomIdentity:Mu,zoomTransform:i2},Symbol.toStringTag,{value:"Module"}));function s2(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function AC(t,e){function n(i){var s;const o=document.createElementNS("http://www.w3.org/1999/xhtml","div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+i+"</svg>";const a=document.createDocumentFragment();for(;a&&((s=o==null?void 0:o.firstChild)!=null&&s.firstChild);)a.appendChild(o.firstChild.firstChild);return a}const r=t.node();for(;r.hasChildNodes();)r.removeChild(r.firstChild);t.node().appendChild(n(e))}function ar(t){return t.substring(0,4)!=="ease"?ji:_h[t]??ji}function Tu({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=qf().domain([0,1]).range([0,t/2]),a=o(n);return yv().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const wh=(t,e)=>e instanceof Function?e(t):eo(e)(t);function u2(t,e=10){var i;const n=document.createElement("canvas").getContext("2d");return(((i=n==null?void 0:n.measureText(t))==null?void 0:i.width)??0)*e/10}function MC(t){const e=[0,0];return t.length?t.reduce((r,i)=>[i<r[0]?i:r[0],i>r[1]?i:r[1]],[t[0],t[0]]):e}function TC(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return MC(e)}function Et(t,e){const n=e.colors[e.colorScheme];return t==="series"?n.series[0]:t=="none"?"none":n[t]!=null?n[t]:n.primary}function $h({datum:t,colorType:e,fullChartParams:n}){return e==="series"?t.color?t.color:n.colors[n.colorScheme].series[0]:e=="none"?"none":n.colors[n.colorScheme][e]!=null?n.colors[n.colorScheme][e]:n.colors[n.colorScheme].primary}function ot(t,e,n){const r=n?`--${n}`:"";return`orbcharts-${t}__${e}${r}`}function $n(t,e){const r=Math.random().toString(36).substr(2,5);return ot(t,e,r)}const si=({selection:t,pluginName:e,clipPathID:n,existSeriesLabels$:r,gridContainer$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=ot(e,"series"),u=ot(e,"axes"),c=ot(e,"graphic"),l=r.pipe(U((p,g)=>t.selectAll(`g.${s}`).data(p,m=>m).join(m=>m.append("g").classed(s,!0).each((y,v,x)=>{V(x[v]).selectAll(`g.${u}`).data([v]).join(b=>b.append("g").classed(u,!0).attr("clip-path",`url(#${n})`).each((w,$,A)=>{V(A[$]).selectAll("defs").data([$]).join("defs"),V(A[$]).selectAll("g").data([$]).join("g").classed(c,!0)}),b=>b,b=>b.remove())}),m=>m,m=>m.remove())),B(p=>H({seriesSelection:li(p),gridContainer:i})),U(p=>(p.seriesSelection.transition().attr("transform",(g,m)=>{const y=p.gridContainer[m]??p.gridContainer[0],v=y.translate,x=y.scale;return`translate(${v[0]}, ${v[1]}) scale(${x[0]}, ${x[1]})`}),p.seriesSelection)),Ye(1)),h=H({seriesSelection:l,gridAxesTransform:o}).pipe(B(async p=>p),U(p=>p.seriesSelection.select(`g.${u}`).style("transform",p.gridAxesTransform.value)),Ye(1)),f=h.pipe(U(p=>p.select("defs")),Ye(1)),d=H({axesSelection:h,gridGraphicTransform:a}).pipe(B(async p=>p),U(p=>{const g=p.axesSelection.select(`g.${c}`);return g.transition().duration(50).style("transform",p.gridGraphicTransform.value),g}),Ye(1));return{seriesSelection$:l,axesSelection$:h,defsSelection$:f,graphicGSelection$:d}},Sh=({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r})=>{const i=new rt,o=new lt(a=>{H({dataFormatter:t,computedData:n}).pipe(F(i),B(async s=>s)).subscribe(s=>{const c=s.computedData[0]?s.computedData[0].length-1:0,l=s.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-s.dataFormatter.grid.groupAxis.scalePadding:s.dataFormatter.grid.groupAxis.scaleDomain[0]-s.dataFormatter.grid.groupAxis.scalePadding,h=s.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?c+s.dataFormatter.grid.groupAxis.scalePadding:s.dataFormatter.grid.groupAxis.scaleDomain[1]+s.dataFormatter.grid.groupAxis.scalePadding,d=(s.dataFormatter.grid.gridData.seriesDirection==="row"?(s.computedData[0]??[]).map(p=>p.groupLabel):s.computedData.map(p=>p[0].groupLabel)).filter((p,g)=>g>=l&&g<=h);a.next(d)})});return new lt(a=>{H({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:o}).pipe(F(i),B(async s=>s)).subscribe(s=>{const u=s.dataFormatter.grid.valueAxis.position==="right"||s.dataFormatter.grid.valueAxis.position==="bottom",c=lA({axisLabels:s.scaleRangeGroupLabels,axisWidth:s.axisSize.width,reverse:u}),l=f=>s.dataFormatter.grid.groupAxis.position==="bottom"||s.dataFormatter.grid.groupAxis.position==="top"?f.offsetX-s.fullChartParams.padding.left:f.offsetY-s.fullChartParams.padding.top,h=f=>{const d=l(f),p=c(d);return{groupIndex:p,groupLabel:s.scaleRangeGroupLabels[p]??""}};return a.next(h),function(){i.next(void 0)}})})};function PC(t="curveLinear"){return yu().x(e=>e.axisX).y(e=>e.axisY).curve(_h[t])}function DC(t){let e=[[]],n=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){e[n].length&&(n++,e[n]=[]);continue}e[n].push(t[r])}return e}function LC({selection:t,pathClassName:e,segmentData:n,linePath:r,params:i}){return t.selectAll("path").data(n,(a,s)=>a.length?`${a[0].id}_${a[a.length-1].id}`:s).join(a=>a.append("path").classed(e,!0).attr("fill","none").attr("pointer-events","visibleStroke").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),a=>a,a=>a.remove()).attr("stroke-width",i.lineWidth).attr("stroke",(a,s)=>a[0]&&a[0].color).attr("d",a=>r(a))}function EC({selection:t,seriesLabel:e,fullChartParams:n}){if(t.interrupt("highlight"),!e){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===e?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function kC({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{V(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(ar(r)).tween("tween",(c,l,h)=>f=>{const d=c.width*f;u.attr("x",0).attr("y",0).attr("width",p=>d).attr("height",p=>p.height)}),u},s=>s.attr("x",0).attr("y",0).attr("width",u=>u.width).attr("height",u=>u.height),s=>s.remove())})}const c2=(t,{selection:e,computedData$:n,existSeriesLabels$:r,SeriesDataMap$:i,GroupDataMap$:o,fullParams$:a,fullDataFormatter$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridAxesSize$:h,gridHighlight$:f,gridContainer$:d,event$:p})=>{const g=new rt,m=$n(t,"clipPath-box"),y=ot(t,"path"),{seriesSelection$:v,axesSelection$:x,defsSelection$:b,graphicGSelection$:w}=si({selection:e,pluginName:t,clipPathID:m,existSeriesLabels$:r,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l}),$=new lt(P=>{const D=a.pipe(F(g)).subscribe(C=>{if(!C)return;const S=PC(C.lineCurve);P.next(S)});return()=>{D.unsubscribe()}}),A=new lt(P=>{n.pipe(F(g),B(async D=>D)).subscribe(D=>{const C=D[0]&&D[0][0]?D.map(S=>S[0].seriesLabel):[];P.next(C)})}),_=u.pipe(U(P=>P.transitionDuration),ft()),L=u.pipe(U(P=>P.transitionEase),ft());H({defsSelection:b,seriesLabels:A,axisSize:h,transitionDuration:_,transitionEase:L}).pipe(F(g),B(async P=>P)).subscribe(P=>{const C=[{id:m,width:P.axisSize.width,height:P.axisSize.height}].concat(P.seriesLabels.map(S=>({id:`orbcharts__clipPath_${S}`,width:P.axisSize.width,height:P.axisSize.height})));kC({defsSelection:P.defsSelection,clipPathData:C,transitionDuration:P.transitionDuration,transitionEase:P.transitionEase})});const E=n.pipe(U(P=>{const D=new Map;return P.flat().forEach(C=>D.set(C.id,C)),D})),T=Sh({fullDataFormatter$:s,gridAxesSize$:h,computedData$:n,fullChartParams$:u}),I=u.pipe(F(g),U(P=>P.highlightTarget),ft());return H({graphicGSelection:w,seriesLabels:A,computedData:n,SeriesDataMap:i,GroupDataMap:o,linePath:$,params:a,highlightTarget:I,gridGroupPositionFn:T}).pipe(F(g),B(async P=>P)).subscribe(P=>{P.graphicGSelection.each((D,C,S)=>{const R=DC(P.computedData[C]??[]);LC({selection:V(S[C]),pathClassName:y,linePath:P.linePath,segmentData:R,params:P.params}).on("mouseover",(M,N)=>{M.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:k,groupLabel:Y}=P.gridGroupPositionFn(M),X=P.GroupDataMap.get(Y).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:P.highlightTarget,datum:X,gridIndex:X.gridIndex,series:P.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:P.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:M,data:P.computedData})}).on("mousemove",(M,N)=>{M.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:k,groupLabel:Y}=P.gridGroupPositionFn(M),X=P.GroupDataMap.get(Y).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:P.highlightTarget,datum:X,gridIndex:X.gridIndex,series:P.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:P.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:M,data:P.computedData})}).on("mouseout",(M,N)=>{M.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:k,groupLabel:Y}=P.gridGroupPositionFn(M),X=P.GroupDataMap.get(Y).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:P.highlightTarget,datum:X,gridIndex:X.gridIndex,series:P.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:P.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:M,data:P.computedData})}).on("click",(M,N)=>{M.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:k,groupLabel:Y}=P.gridGroupPositionFn(M),X=P.GroupDataMap.get(Y).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:P.highlightTarget,datum:X,gridIndex:X.gridIndex,series:P.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:P.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:M,data:P.computedData})})})}),u.pipe(F(g),fi(P=>P.highlightTarget==="series"),B(P=>H({graphicGSelection:w,highlight:f,DataMap:E,fullChartParams:u}).pipe(F(g),B(async D=>D)))).subscribe(P=>{const D=P.DataMap.get(P.highlight[0]);EC({selection:P.graphicGSelection,seriesLabel:D&&D.seriesLabel?D.seriesLabel:null,fullChartParams:P.fullChartParams})}),()=>{g.next(void 0)}},l2="Lines",CC=ae(l2,cr)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=c2(l2,{selection:t,computedData$:n.computedData$,existSeriesLabels$:n.existSeriesLabels$,SeriesDataMap$:n.SeriesDataMap$,GroupDataMap$:n.GroupDataMap$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridGraphicTransform$:n.gridGraphicTransform$,gridAxesSize$:n.gridAxesSize$,gridHighlight$:n.gridHighlight$,gridContainer$:n.gridContainer$,event$:r.event$});return()=>{i.next(void 0),o()}});function IC(t="curveLinear",e){return lh().x(n=>n.axisX).y0(n=>e).y1(n=>n.axisY).curve(_h[t])}function RC(t){let e=[[]],n=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){e[n].length&&(n++,e[n]=[]);continue}e[n].push(t[r])}return e}function NC({selection:t,pathClassName:e,segmentData:n,areaPath:r,linearGradientIds:i,params:o}){return t.selectAll("path").data(n,(s,u)=>s.length?`${s[0].id}_${s[s.length-1].id}`:u).join(s=>s.append("path").classed(e,!0).attr("fill","none").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),s=>s,s=>s.remove()).attr("fill",(s,u)=>s[0]?`url(#${i[s[0].seriesIndex]})`:"").attr("d",s=>r(s))}function FC({selection:t,seriesLabel:e,fullChartParams:n}){if(t.interrupt("highlight"),!e){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===e?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function GC({defsSelection:t,computedData:e,linearGradientIds:n,params:r}){t.selectAll("linearGradient").data(e??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
10
+ <stop offset="0%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[0]}"/>
11
+ <stop offset="100%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[1]}"/>
12
+ `})}function zC({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{V(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(ar(r)).tween("tween",(c,l,h)=>f=>{const d=c.width*f;u.attr("x",0).attr("y",0).attr("width",p=>d).attr("height",p=>p.height)}),u},s=>s.attr("x",0).attr("y",0).attr("width",u=>u.width).attr("height",u=>u.height),s=>s.remove())})}const OC=(t,{selection:e,computedData$:n,existSeriesLabels$:r,SeriesDataMap$:i,GroupDataMap$:o,fullParams$:a,fullDataFormatter$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridAxesSize$:h,gridHighlight$:f,gridContainer$:d,layout$:p,event$:g})=>{const m=new rt,y=$n(t,"clipPath-box"),v=ot(t,"path"),{seriesSelection$:x,axesSelection$:b,defsSelection$:w,graphicGSelection$:$}=si({selection:e,pluginName:t,clipPathID:y,existSeriesLabels$:r,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l}),A=l.pipe(F(m),U(S=>-S.translate[1]/S.scale[1])),_=new lt(S=>{const R=H({fullParams:a,valueAxisStart:A}).pipe(F(m)).subscribe(G=>{const M=IC(G.fullParams.lineCurve,G.valueAxisStart);S.next(M)});return()=>{R.unsubscribe()}}),L=new lt(S=>{n.pipe(F(m),B(async R=>R)).subscribe(R=>{const G=R[0]&&R[0][0]?R.map(M=>M[0].seriesLabel):[];S.next(G)})}),E=u.pipe(U(S=>S.transitionDuration),ft()),T=u.pipe(U(S=>S.transitionEase),ft());H({defsSelection:w,seriesLabels:L,axisSize:h,transitionDuration:E,transitionEase:T}).pipe(F(m),B(async S=>S)).subscribe(S=>{const G=[{id:y,width:S.axisSize.width,height:S.axisSize.height}].concat(S.seriesLabels.map(M=>({id:`orbcharts__clipPath_${M}`,width:S.axisSize.width,height:S.axisSize.height})));zC({defsSelection:S.defsSelection,clipPathData:G,transitionDuration:S.transitionDuration,transitionEase:S.transitionEase})});const I=n.pipe(U(S=>{const R=new Map;return S.flat().forEach(G=>R.set(G.id,G)),R})),P=Sh({fullDataFormatter$:s,gridAxesSize$:h,computedData$:n,fullChartParams$:u}),D=u.pipe(F(m),U(S=>S.highlightTarget),ft()),C=L.pipe(F(m),U(S=>S.map((R,G)=>$n(t,`lineargradient-${R}`))));return H({graphicGSelection:$,defsSelection:w,seriesLabels:L,computedData:n,linearGradientIds:C,SeriesDataMap:i,GroupDataMap:o,areaPath:_,params:a,highlightTarget:D,gridGroupPositionFn:P}).pipe(F(m),B(async S=>S)).subscribe(S=>{S.graphicGSelection.each((R,G,M)=>{const N=RC(S.computedData[G]??[]),z=NC({selection:V(M[G]),pathClassName:v,areaPath:S.areaPath,segmentData:N,linearGradientIds:S.linearGradientIds,params:S.params});GC({defsSelection:S.defsSelection,computedData:S.computedData,linearGradientIds:S.linearGradientIds,params:S.params}),z.on("mouseover",(k,Y)=>{k.stopPropagation();const j=Y[0]?Y[0].seriesLabel:"",{groupIndex:W,groupLabel:X}=S.gridGroupPositionFn(k),O=S.GroupDataMap.get(X).find(tt=>tt.seriesLabel===j)??Y[0];g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:S.highlightTarget,datum:O,gridIndex:O.gridIndex,series:S.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:S.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:k,data:S.computedData})}).on("mousemove",(k,Y)=>{k.stopPropagation();const j=Y[0]?Y[0].seriesLabel:"",{groupIndex:W,groupLabel:X}=S.gridGroupPositionFn(k),O=S.GroupDataMap.get(X).find(tt=>tt.seriesLabel===j)??Y[0];g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:S.highlightTarget,datum:O,gridIndex:O.gridIndex,series:S.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:S.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:k,data:S.computedData})}).on("mouseout",(k,Y)=>{k.stopPropagation();const j=Y[0]?Y[0].seriesLabel:"",{groupIndex:W,groupLabel:X}=S.gridGroupPositionFn(k),O=S.GroupDataMap.get(X).find(tt=>tt.seriesLabel===j)??Y[0];g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:S.highlightTarget,datum:O,gridIndex:O.gridIndex,series:S.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:S.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:k,data:S.computedData})}).on("click",(k,Y)=>{k.stopPropagation();const j=Y[0]?Y[0].seriesLabel:"",{groupIndex:W,groupLabel:X}=S.gridGroupPositionFn(k),O=S.GroupDataMap.get(X).find(tt=>tt.seriesLabel===j)??Y[0];g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:S.highlightTarget,datum:O,gridIndex:O.gridIndex,series:S.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:S.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:k,data:S.computedData})})})}),u.pipe(F(m),fi(S=>S.highlightTarget==="series"),B(S=>H({graphicGSelection:$,highlight:f,DataMap:I,fullChartParams:u}).pipe(F(m),B(async R=>R)))).subscribe(S=>{const R=S.DataMap.get(S.highlight[0]);FC({selection:S.graphicGSelection,seriesLabel:R&&R.seriesLabel?R.seriesLabel:null,fullChartParams:S.fullChartParams})}),()=>{m.next(void 0)}},f2="LineAreas",UC=ae(f2,Uh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=OC(f2,{selection:t,computedData$:n.computedData$,existSeriesLabels$:n.existSeriesLabels$,SeriesDataMap$:n.SeriesDataMap$,GroupDataMap$:n.GroupDataMap$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridGraphicTransform$:n.gridGraphicTransform$,gridAxesSize$:n.gridAxesSize$,gridHighlight$:n.gridHighlight$,gridContainer$:n.gridContainer$,layout$:n.layout$,event$:r.event$});return()=>{i.next(void 0),o()}}),h2=.3;function d2({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=(t/(e-1)-i)/n-r;return a>1?a:1}function BC(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Yf().domain(e).range([-i/2+r,i/2-r])}function YC(t,e){return t<=1?0:e/(t-1)*h2}function WC(t,e){return t<=1?e:e*(1-h2)}function HC({graphicGSelection:t,rectClassName:e,computedData:n,zeroYArr:r,groupLabels:i,barScale:o,params:a,chartParams:s,barWidth:u,transformedBarRadius:c,delayGroup:l,transitionItem:h,isSeriesPositionSeprate:f}){const d=u/2;return t.each((g,m,y)=>{V(y[m]).selectAll(`rect.${e}`).data(n[m]??[],v=>v.id).join(v=>v.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",x=>0),v=>v,v=>v.remove()).attr("transform",(v,x)=>`translate(${(v?v.axisX:0)-d}, 0)`).attr("fill",v=>v.color).attr("y",v=>v.axisY<r[m]?v.axisY:r[m]).attr("x",v=>f?0:o(v.seriesLabel)).attr("width",u).attr("rx",c[m][0]??1).attr("ry",c[m][1]??1).transition().duration(h).ease(ar(s.transitionEase)).delay((v,x)=>v.groupIndex*l).attr("height",v=>Math.abs(v.axisYFromZero))}),t.selectAll(`rect.${e}`)}function qC({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function XC({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const Ah=(t,{selection:e,computedData$:n,visibleComputedData$:r,existSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridGraphicReverseScale$:h,gridAxesSize$:f,gridHighlight$:d,gridContainer$:p,isSeriesPositionSeprate$:g,event$:m})=>{const y=new rt,v=$n(t,"clipPath-box"),x=ot(t,"rect"),{seriesSelection$:b,axesSelection$:w,defsSelection$:$,graphicGSelection$:A}=si({selection:e,pluginName:t,clipPathID:v,existSeriesLabels$:i,gridContainer$:p,gridAxesTransform$:c,gridGraphicTransform$:l}),_=r.pipe(F(y),U(M=>M.map(N=>N[0]?N[0].axisY-N[0].axisYFromZero:0)),ft()),L=H({computedData:n,visibleComputedData:r,params:s,gridAxesSize:f,isSeriesPositionSeprate:g}).pipe(F(y),B(async M=>M),U(M=>M.params.barWidth?M.params.barWidth:M.isSeriesPositionSeprate?d2({axisWidth:M.gridAxesSize.width,groupAmount:M.computedData[0]?M.computedData[0].length:0,barAmountOfGroup:1,barPadding:M.params.barPadding,barGroupPadding:M.params.barGroupPadding}):d2({axisWidth:M.gridAxesSize.width,groupAmount:M.computedData[0]?M.computedData[0].length:0,barAmountOfGroup:M.visibleComputedData.length,barPadding:M.params.barPadding,barGroupPadding:M.params.barGroupPadding})),ft()),E=H({computedData:n,barWidth:L,params:s,gridGraphicReverseScale:h}).pipe(F(y),B(async M=>M),U(M=>{const N=M.barWidth/2,z=M.params.barRadius===!0?N:M.params.barRadius===!1?0:typeof M.params.barRadius=="number"?M.params.barRadius:0;return M.computedData.map((k,Y)=>{const j=M.gridGraphicReverseScale[Y]??M.gridGraphicReverseScale[0];let W=z*j[0],X=z*j[1];if(W>N){const Q=N/W;W=W*Q,X=X*Q}return[W,X]})})),T=r.pipe(F(y),U(M=>{const N=new Set;return M.forEach(z=>{z.forEach(k=>{N.add(k.seriesLabel)})}),Array.from(N)})),I=r.pipe(F(y),U(M=>{const N=new Set;return M.forEach(z=>{z.forEach(k=>{N.add(k.groupLabel)})}),Array.from(N)})),P=H({seriesLabels:T,barWidth:L,params:s}).pipe(F(y),B(async M=>M),U(M=>BC(M.barWidth,M.seriesLabels,M.params))),D=u.pipe(F(y),U(M=>M.transitionDuration),ft()),C=new lt(M=>{H({groupLabels:I,transitionDuration:D}).pipe(B(async N=>N)).subscribe(N=>{const z=YC(N.groupLabels.length,N.transitionDuration);M.next(z)})}).pipe(F(y),ft()),S=new lt(M=>{H({groupLabels:I,transitionDuration:D}).pipe(B(async N=>N)).subscribe(N=>{const z=WC(N.groupLabels.length,N.transitionDuration);M.next(z)})}).pipe(F(y),ft());H({defsSelection:$,gridAxesSize:f}).pipe(F(y),B(async M=>M)).subscribe(M=>{const N=[{id:v,width:M.gridAxesSize.width,height:M.gridAxesSize.height}];qC({defsSelection:M.defsSelection,clipPathData:N})});const R=u.pipe(F(y),U(M=>M.highlightTarget),ft()),G=new rt;return H({graphicGSelection:A,computedData:n,zeroYArr:_,groupLabels:I,barScale:P,params:s,chartParams:u,highlightTarget:R,barWidth:L,transformedBarRadius:E,delayGroup:C,transitionItem:S,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:g}).pipe(F(y),B(async M=>M)).subscribe(M=>{const N=HC({graphicGSelection:M.graphicGSelection,rectClassName:x,computedData:M.computedData,zeroYArr:M.zeroYArr,groupLabels:M.groupLabels,barScale:M.barScale,params:M.params,chartParams:M.chartParams,barWidth:M.barWidth,transformedBarRadius:M.transformedBarRadius,delayGroup:M.delayGroup,transitionItem:M.transitionItem,isSeriesPositionSeprate:M.isSeriesPositionSeprate});N.on("mouseover",(z,k)=>{z.stopPropagation(),m.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}).on("mousemove",(z,k)=>{z.stopPropagation(),m.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}).on("mouseout",(z,k)=>{z.stopPropagation(),m.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}).on("click",(z,k)=>{z.stopPropagation(),m.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}),G.next(N)}),H({barSelection:G,highlight:d,fullChartParams:u}).pipe(F(y),B(async M=>M)).subscribe(M=>{XC({selection:M.barSelection,ids:M.highlight,fullChartParams:M.fullChartParams})}),()=>{y.next(void 0)}},p2="Bars",jC=ae(p2,Fo)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=Ah(p2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:r.isSeriesPositionSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),g2="BarsDiverging",VC=ae(g2,Fo)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=Ah(g2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:li(!0),event$:n.event$});return()=>{i.next(void 0),o()}}),m2=.3;function ZC({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function KC(t,e){return t<=1?0:e/(t-1)*m2}function QC(t,e){return t<=1?e:e*(1-m2)}function JC({graphicGSelection:t,rectClassName:e,barData:n,zeroY:r,groupLabels:i,params:o,chartParams:a,barWidth:s,transformedBarRadius:u,delayGroup:c,transitionItem:l,isSeriesPositionSeprate:h}){const f=s/2;return t.each((p,g,m)=>{V(m[g]).selectAll(`rect.${e}`).data(n[g]??[],y=>y.id).join(y=>y.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",v=>0),y=>y,y=>y.remove()).attr("transform",(y,v)=>`translate(${(y?y.axisX:0)-f}, 0)`).attr("fill",y=>y.color).attr("y",y=>r).attr("x",y=>0).attr("width",s).attr("rx",u[g][0]??1).attr("ry",u[g][1]??1).transition().duration(l).ease(ar(a.transitionEase)).delay((y,v)=>y.groupIndex*c).attr("y",y=>y._barStartY).attr("height",y=>Math.abs(y._barHeight))}),t.selectAll(`rect.${e}`)}function tI({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function eI({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const y2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullDataFormatter$:u,fullChartParams$:c,gridAxesTransform$:l,gridGraphicTransform$:h,gridGraphicReverseScale$:f,gridAxesSize$:d,gridHighlight$:p,gridContainer$:g,isSeriesPositionSeprate$:m,event$:y})=>{const v=new rt,x=$n(t,"clipPath-box"),b=ot(t,"rect"),{seriesSelection$:w,axesSelection$:$,defsSelection$:A,graphicGSelection$:_}=si({selection:e,pluginName:t,clipPathID:x,existSeriesLabels$:i,gridContainer$:g,gridAxesTransform$:l,gridGraphicTransform$:h}),L=r.pipe(F(v),U(k=>k[0]&&k[0][0]?k[0][0].axisY-k[0][0].axisYFromZero:0),ft()),E=H({computedData:n,params:s,axisSize:d,isSeriesPositionSeprate:m}).pipe(F(v),B(async k=>k),U(k=>k.params.barWidth?k.params.barWidth:ZC({axisWidth:k.axisSize.width,groupAmount:k.computedData[0]?k.computedData[0].length:0,barGroupPadding:k.params.barGroupPadding})),ft()),T=H({computedData:n,barWidth:E,params:s,gridGraphicReverseScale:f}).pipe(F(v),B(async k=>k),U(k=>{const Y=k.barWidth/2,j=k.params.barRadius===!0?Y:k.params.barRadius===!1?0:typeof k.params.barRadius=="number"?k.params.barRadius:0;return k.computedData.map((W,X)=>{const Q=k.gridGraphicReverseScale[X]??k.gridGraphicReverseScale[0],ct=j*Q[0],O=j*Q[1];return[ct,O]})})),I=r.pipe(F(v),U(k=>{const Y=new Set;return k.forEach(j=>{j.forEach(W=>{Y.add(W.groupLabel)})}),Array.from(Y)})),P=c.pipe(F(v),U(k=>k.transitionDuration),ft()),D=new lt(k=>{H({groupLabels:I,transitionDuration:P}).pipe(B(async Y=>Y)).subscribe(Y=>{const j=KC(Y.groupLabels.length,Y.transitionDuration);k.next(j)})}).pipe(F(v),ft()),C=new lt(k=>{H({groupLabels:I,transitionDuration:P}).pipe(B(async Y=>Y)).subscribe(Y=>{const j=QC(Y.groupLabels.length,Y.transitionDuration);k.next(j)})}).pipe(F(v),ft()),S=H({computedData:n,dataFormatter:u}).pipe(F(v),B(async k=>k),U(k=>{const j=k.computedData[0]?k.computedData[0].length-1:0,W=k.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-k.dataFormatter.grid.groupAxis.scalePadding:k.dataFormatter.grid.groupAxis.scaleDomain[0]-k.dataFormatter.grid.groupAxis.scalePadding,X=k.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?j+k.dataFormatter.grid.groupAxis.scalePadding:k.dataFormatter.grid.groupAxis.scaleDomain[1]+k.dataFormatter.grid.groupAxis.scalePadding,Q=k.computedData.map(ct=>ct.filter((O,tt)=>O.groupIndex>=W&&O.groupIndex<=X));if(Q.length<=1)return 1;{const ct=Q.flat().map(q=>q.axisYFromZero),O=Math.max(...ct),tt=k.computedData[0]?k.computedData[0].map((q,xt)=>k.computedData.reduce((gt,Ft)=>gt+Ft[xt].axisYFromZero,0)):[],st=Math.max(...tt);return O/st}})),R=H({computedData:n,yRatio:S,zeroY:L}).pipe(F(v),U(k=>{let Y=k.computedData[0]?k.computedData[0].map(()=>k.zeroY):[];return k.computedData.map((j,W)=>j.map((X,Q)=>{const ct=Y[Q],O=X.axisYFromZero*k.yRatio;return Y[Q]=Y[Q]+O,{...X,_barStartY:ct,_barHeight:O}}))})),G=H({computedData:n,zeroY:L}).pipe(F(v),U(k=>k.computedData.map((Y,j)=>Y.map((W,X)=>({...W,_barStartY:k.zeroY,_barHeight:W.axisYFromZero}))))),M=m.pipe(B(k=>$d(()=>k,G,R)));H({defsSelection:A,gridAxesSize:d}).pipe(F(v),B(async k=>k)).subscribe(k=>{const Y=[{id:x,width:k.gridAxesSize.width,height:k.gridAxesSize.height}];tI({defsSelection:k.defsSelection,clipPathData:Y})});const N=c.pipe(F(v),U(k=>k.highlightTarget),ft()),z=new rt;return H({graphicGSelection:_,graphicData:M,zeroY:L,groupLabels:I,params:s,chartParams:c,highlightTarget:N,barWidth:E,transformedBarRadius:T,delayGroup:D,transitionItem:C,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:m}).pipe(F(v),B(async k=>k)).subscribe(k=>{const Y=JC({graphicGSelection:k.graphicGSelection,rectClassName:b,barData:k.graphicData,zeroY:k.zeroY,groupLabels:k.groupLabels,params:k.params,chartParams:k.chartParams,barWidth:k.barWidth,transformedBarRadius:k.transformedBarRadius,delayGroup:k.delayGroup,transitionItem:k.transitionItem,isSeriesPositionSeprate:k.isSeriesPositionSeprate});Y.on("mouseover",(j,W)=>{j.stopPropagation(),y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:k.highlightTarget,datum:W,gridIndex:W.gridIndex,series:k.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:k.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:j,data:k.graphicData})}).on("mousemove",(j,W)=>{j.stopPropagation(),y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:k.highlightTarget,datum:W,gridIndex:W.gridIndex,series:k.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:k.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:j,data:k.graphicData})}).on("mouseout",(j,W)=>{j.stopPropagation(),y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:k.highlightTarget,datum:W,gridIndex:W.gridIndex,series:k.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:k.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:j,data:k.graphicData})}).on("click",(j,W)=>{j.stopPropagation(),y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:k.highlightTarget,datum:W,gridIndex:W.gridIndex,series:k.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:k.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:j,data:k.graphicData})}),z.next(Y)}),H({barSelection:z,highlight:p,fullChartParams:c}).pipe(F(v),B(async k=>k)).subscribe(k=>{eI({selection:k.barSelection,ids:k.highlight,fullChartParams:k.fullChartParams})}),()=>{v.next(void 0)}},b2="BarStack",nI=ae(b2,Wh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=y2(b2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:r.fullDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:r.isSeriesPositionSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),v2=.3;function x2({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=(t/(e-1)-i)/n-r;return a>1?a:1}function rI(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Yf().domain(e).range([-i/2+r,i/2-r])}function iI(t,e){return t<=1?0:e/(t-1)*v2}function oI(t,e){return t<=1?e:e*(1-v2)}function aI({graphicGSelection:t,pathGClassName:e,pathClassName:n,computedData:r,linearGradientIds:i,zeroYArr:o,groupLabels:a,barScale:s,params:u,chartParams:c,barWidth:l,delayGroup:h,transitionItem:f,isSeriesPositionSeprate:d}){const p=l/2;return t.each((m,y,v)=>{V(v[y]).selectAll(`g.${e}`).data(r[y]??[]).join(b=>{const w=b.append("g").classed(e,!0).attr("cursor","pointer");return w.append("path").classed(n,!0).style("vector-effect","non-scaling-stroke").attr("d",$=>{const A=-p,_=o[y],L=o[y];return`M${A},${_} L${A+l/2},${L} ${A+l},${_}`}),w},b=>b,b=>b.remove()).attr("transform",b=>`translate(${d?0:s(b.seriesLabel)}, 0)`).select(`path.${n}`).attr("height",b=>Math.abs(b.axisYFromZero)).attr("y",b=>b.axisY<o[y]?b.axisY:o[y]).attr("x",b=>d?0:s(b.seriesLabel)).style("fill",b=>`url(#${i[b.seriesIndex]})`).attr("stroke",b=>b.color).attr("transform",b=>`translate(${b?b.axisX:0}, 0)`).transition().duration(f).ease(ar(c.transitionEase)).delay((b,w)=>b.groupIndex*h).attr("d",b=>{const w=-p,$=o[y],A=b.axisY;return`M${w},${$} L${w+l/2},${A} ${w+l},${$}`})}),t.selectAll(`path.${n}`)}function sI({defsSelection:t,computedData:e,linearGradientIds:n,params:r}){t.selectAll("linearGradient").data(e??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
13
+ <stop offset="0%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[0]}"/>
14
+ <stop offset="100%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[1]}"/>
15
+ `})}function uI({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function cI({selection:t,ids:e,fullChartParams:n}){t.interrupt("highlight");const r=()=>{t.transition("highlight").duration(200).style("opacity",1)};if(!e.length){r();return}t.each((i,o,a)=>{e.includes(i.id)?V(a[o]).style("opacity",1):V(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const _2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridAxesSize$:h,gridHighlight$:f,gridContainer$:d,isSeriesPositionSeprate$:p,event$:g})=>{const m=new rt,y=$n(t,"clipPath-box"),v=ot(t,"pathG"),x=ot(t,"path"),{seriesSelection$:b,axesSelection$:w,defsSelection$:$,graphicGSelection$:A}=si({selection:e,pluginName:t,clipPathID:y,existSeriesLabels$:i,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l});l.pipe(F(m),U(M=>-M.translate[1]/M.scale[1]));const _=r.pipe(U(M=>M.map(N=>N[0]?N[0].axisY-N[0].axisYFromZero:0)),ft()),L=H({computedData:n,visibleComputedData:r,params:s,gridAxesSize:h,isSeriesPositionSeprate:p}).pipe(F(m),B(async M=>M),U(M=>M.params.barWidth?M.params.barWidth:M.isSeriesPositionSeprate?x2({axisWidth:M.gridAxesSize.width,groupAmount:M.computedData[0]?M.computedData[0].length:0,barAmountOfGroup:1,barPadding:M.params.barPadding,barGroupPadding:M.params.barGroupPadding}):x2({axisWidth:M.gridAxesSize.width,groupAmount:M.computedData[0]?M.computedData[0].length:0,barAmountOfGroup:M.visibleComputedData.length,barPadding:M.params.barPadding,barGroupPadding:M.params.barGroupPadding}))),E=r.pipe(F(m),U(M=>{const N=new Set;return M.forEach(z=>{z.forEach(k=>{N.add(k.seriesLabel)})}),Array.from(N)})),T=r.pipe(F(m),U(M=>{const N=new Set;return M.forEach(z=>{z.forEach(k=>{N.add(k.groupLabel)})}),Array.from(N)})),I=new lt(M=>{H({seriesLabels:E,barWidth:L,params:s}).pipe(F(m),B(async N=>N)).subscribe(N=>{const z=rI(N.barWidth,N.seriesLabels,N.params);M.next(z)})}),P=u.pipe(F(m),U(M=>M.transitionDuration),ft()),D=new lt(M=>{H({groupLabels:T,transitionDuration:P}).pipe(B(async N=>N)).subscribe(N=>{const z=iI(N.groupLabels.length,N.transitionDuration);M.next(z)})}).pipe(F(m),ft()),C=new lt(M=>{H({groupLabels:T,transitionDuration:P}).pipe(B(async N=>N)).subscribe(N=>{const z=oI(N.groupLabels.length,N.transitionDuration);M.next(z)})}).pipe(F(m),ft());H({defsSelection:$,gridAxesSize:h}).pipe(F(m),B(async M=>M)).subscribe(M=>{const N=[{id:y,width:M.gridAxesSize.width,height:M.gridAxesSize.height}];uI({defsSelection:M.defsSelection,clipPathData:N})});const S=u.pipe(F(m),U(M=>M.highlightTarget),ft()),R=new rt,G=E.pipe(F(m),U(M=>M.map((N,z)=>$n(t,`lineargradient-${N}`))));return H({graphicGSelection:A,defsSelection:$,computedData:n,linearGradientIds:G,zeroYArr:_,groupLabels:T,barScale:I,params:s,chartParams:u,highlightTarget:S,barWidth:L,delayGroup:D,transitionItem:C,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:p}).pipe(F(m),B(async M=>M)).subscribe(M=>{const N=aI({graphicGSelection:M.graphicGSelection,pathGClassName:v,pathClassName:x,computedData:M.computedData,linearGradientIds:M.linearGradientIds,zeroYArr:M.zeroYArr,groupLabels:M.groupLabels,barScale:M.barScale,params:M.params,chartParams:M.chartParams,barWidth:M.barWidth,delayGroup:M.delayGroup,transitionItem:M.transitionItem,isSeriesPositionSeprate:M.isSeriesPositionSeprate});sI({defsSelection:M.defsSelection,computedData:M.computedData,linearGradientIds:M.linearGradientIds,params:M.params}),N.on("mouseover",(z,k)=>{z.stopPropagation(),g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}).on("mousemove",(z,k)=>{z.stopPropagation(),g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}).on("mouseout",(z,k)=>{z.stopPropagation(),g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}).on("click",(z,k)=>{z.stopPropagation(),g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}),R.next(N)}),H({barSelection:R,highlight:f,fullChartParams:u}).pipe(F(m),B(async M=>M)).subscribe(M=>{cI({selection:M.barSelection,ids:M.highlight,fullChartParams:M.fullChartParams})}),()=>{m.next(void 0)}},w2="BarsTriangle",lI=ae(w2,Hh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=_2(w2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:r.isSeriesPositionSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}});function fI({graphicGSelection:t,circleGClassName:e,circleClassName:n,data:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=l=>{const h=l.size();return o.transitionDuration/h};let u=0;return t.each((l,h,f)=>{V(f[h]).selectAll("g").data(r[h],d=>d.id).join(d=>(u=s(d),d.append("g").classed(e,!0)),d=>d,d=>d.remove()).attr("transform",d=>`translate(${d.axisX}, ${d.axisY})`).each((d,p,g)=>{V(g[p]).selectAll("circle").data([d]).join(m=>m.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(n,!0).attr("opacity",0).transition().delay((y,v)=>p*u).attr("opacity",1),m=>m.transition().duration(50).attr("opacity",1),m=>m.remove()).attr("r",i.radius).attr("fill",(m,y)=>$h({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,y)=>$h({datum:m,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[h][0]??1}, ${a[h][1]??1})`)})}),t.selectAll(`circle.${n}`)}function hI({selection:t,ids:e,onlyShowHighlighted:n,fullChartParams:r}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",n===!0?0:1);return}t.each((i,o,a)=>{e.includes(i.id)?V(a[o]).style("opacity",1).transition("highlight").duration(200):V(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function dI({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const $2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridGraphicReverseScale$:h,gridAxesSize$:f,gridHighlight$:d,gridContainer$:p,event$:g})=>{const m=new rt,y=$n(t,"clipPath-box"),v=ot(t,"circleG"),x=ot(t,"circle"),b=new rt,{seriesSelection$:w,axesSelection$:$,defsSelection$:A,graphicGSelection$:_}=si({selection:e,pluginName:t,clipPathID:y,existSeriesLabels$:i,gridContainer$:p,gridAxesTransform$:c,gridGraphicTransform$:l}),L=H({computedData:n,gridGraphicReverseScale:h}).pipe(F(m),B(async P=>P),U(P=>P.computedData.map((D,C)=>P.gridGraphicReverseScale[C])));H({defsSelection:A,gridAxesSize:f}).pipe(F(m),B(async P=>P)).subscribe(P=>{const D=[{id:y,width:P.gridAxesSize.width,height:P.gridAxesSize.height}];dI({defsSelection:P.defsSelection,clipPathData:D})});const E=u.pipe(F(m),U(P=>P.highlightTarget),ft());H({graphicGSelection:_,computedData:n,visibleComputedData:r,SeriesDataMap:o,GroupDataMap:a,graphicReverseScale:L,fullChartParams:u,fullParams:s,highlightTarget:E}).pipe(F(m),B(async P=>P)).subscribe(P=>{const D=fI({graphicGSelection:P.graphicGSelection,circleGClassName:v,circleClassName:x,data:P.visibleComputedData,fullParams:P.fullParams,fullChartParams:P.fullChartParams,graphicReverseScale:P.graphicReverseScale});D.on("mouseover",(C,S)=>{C.stopPropagation(),g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:P.highlightTarget,datum:S,gridIndex:S.gridIndex,series:P.SeriesDataMap.get(S.seriesLabel),seriesIndex:S.seriesIndex,seriesLabel:S.seriesLabel,groups:P.GroupDataMap.get(S.groupLabel),groupIndex:S.groupIndex,groupLabel:S.groupLabel,event:C,data:P.computedData})}).on("mousemove",(C,S)=>{C.stopPropagation(),g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:P.highlightTarget,data:P.computedData,datum:S,gridIndex:S.gridIndex,series:P.SeriesDataMap.get(S.seriesLabel),seriesIndex:S.seriesIndex,seriesLabel:S.seriesLabel,groups:P.GroupDataMap.get(S.groupLabel),groupIndex:S.groupIndex,groupLabel:S.groupLabel,event:C})}).on("mouseout",(C,S)=>{C.stopPropagation(),g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:P.highlightTarget,datum:S,gridIndex:S.gridIndex,series:P.SeriesDataMap.get(S.seriesLabel),seriesIndex:S.seriesIndex,seriesLabel:S.seriesLabel,groups:P.GroupDataMap.get(S.groupLabel),groupIndex:S.groupIndex,groupLabel:S.groupLabel,event:C,data:P.computedData})}).on("click",(C,S)=>{C.stopPropagation(),g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:P.highlightTarget,datum:S,gridIndex:S.gridIndex,series:P.SeriesDataMap.get(S.seriesLabel),seriesIndex:S.seriesIndex,seriesLabel:S.seriesLabel,groups:P.GroupDataMap.get(S.groupLabel),groupIndex:S.groupIndex,groupLabel:S.groupLabel,event:C,data:P.computedData})}),b.next(D)});const T=d.subscribe(),I=s.pipe(F(m),U(P=>P.onlyShowHighlighted),ft());return u.pipe(F(m),B(P=>H({graphicSelection:b,highlight:d,onlyShowHighlighted:I,fullChartParams:u}).pipe(F(m),B(async D=>D)))).subscribe(P=>{hI({selection:P.graphicSelection,ids:P.highlight,onlyShowHighlighted:P.onlyShowHighlighted,fullChartParams:P.fullChartParams})}),()=>{m.next(void 0),T.unsubscribe()}},S2="Dots",pI=ae(S2,Bh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=$2(S2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,event$:n.event$});return()=>{i.next(void 0),o()}}),gI={listRectWidth:14,listRectHeight:14,listRectRadius:0};function A2(t,e){const n=t<e.colors[e.colorScheme].series.length?t:t%e.colors[e.colorScheme].series.length;return e.colors[e.colorScheme].series[n]}const Pu=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o})=>{const a=ot(t,"root-position"),s=ot(t,"legend-card"),u=ot(t,"legend-list"),c=ot(t,"legend-item"),l=new rt,h=H({seriesLabels:n,fullChartParams:o}).pipe(F(l),B(async _=>_),U(_=>{const L=new Map;let E=0;return _.seriesLabels.forEach((T,I)=>{if(!L.has(T)){const P=A2(E,_.fullChartParams);L.set(T,P),E++}}),L})),f=n.pipe(F(l),U(_=>{const L=new Set;let E=[];return _.forEach(T=>{L.has(T)?E.push(!1):E.push(!0),L.add(T)}),E})),d=r.pipe(F(l),U(_=>_.position==="bottom"||_.position==="top"?"row":"column")),p=H({fullParams:r,layout:i}).pipe(F(l),B(async _=>_),U(_=>{const L=_.fullParams.padding*2+_.fullParams.gap*2;return _.fullParams.position==="bottom"||_.fullParams.position==="top"?_.layout.rootWidth-L:_.layout.rootHeight-L})),m=H({layout:i,fullParams:r}).pipe(F(l),B(async _=>_),U(_=>{let L=0,E=0;return _.fullParams.position==="bottom"?(E=_.layout.rootHeight,_.fullParams.justify==="start"?L=0:_.fullParams.justify==="center"?L=_.layout.rootWidth/2:_.fullParams.justify==="end"&&(L=_.layout.rootWidth)):_.fullParams.position==="right"?(L=_.layout.rootWidth,_.fullParams.justify==="start"?E=0:_.fullParams.justify==="center"?E=_.layout.rootHeight/2:_.fullParams.justify==="end"&&(E=_.layout.rootHeight)):_.fullParams.position==="top"?(E=0,_.fullParams.justify==="start"?L=0:_.fullParams.justify==="center"?L=_.layout.rootWidth/2:_.fullParams.justify==="end"&&(L=_.layout.rootWidth)):_.fullParams.position==="left"&&(L=0,_.fullParams.justify==="start"?E=0:_.fullParams.justify==="center"?E=_.layout.rootHeight/2:_.fullParams.justify==="end"&&(E=_.layout.rootHeight)),{x:L,y:E}})).pipe(F(l),U(_=>e.selectAll(`g.${a}`).data([_]).join(L=>L.append("g").classed(a,!0).attr("transform",E=>`translate(${E.x}, ${E.y})`),L=>L.transition().attr("transform",E=>`translate(${E.x}, ${E.y})`),L=>L.remove()))),y=r.pipe(F(l),U(_=>_.seriesList[0]?_.seriesList[0]:gI)),v=H({visibleList:f,fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:d,lineMaxSize:p,defaultListStyle:y,SeriesLabelColorMap:h}).pipe(F(l),B(async _=>_),U(_=>_.seriesLabels.reduce((L,E,T)=>{if(!_.visibleList[T])return L;const I=u2(E,_.fullChartParams.styles.textSize),P=_.fullChartParams.styles.textSize*1.5+I,D=_.SeriesLabelColorMap.get(E),C=L[0]&&L[0][0]?L[L.length-1][L[L.length-1].length-1]:null,{translateX:S,translateY:R,lineIndex:G,itemIndex:M}=((z,k,Y)=>{let j=0,W=0,X=0,Q=0;if(z.lineDirection==="column"){let ct=Y?Y.translateY+z.fullChartParams.styles.textSize+z.fullParams.gap:0;if(ct+z.fullChartParams.styles.textSize>z.lineMaxSize){X=Y.lineIndex+1,Q=0,W=0;const O=k[k.length-1].reduce((tt,st)=>st.itemWidth>tt?st.itemWidth:tt,0);j=Y.translateX+O+z.fullParams.gap}else X=Y?Y.lineIndex:0,Q=Y?Y.itemIndex+1:0,W=ct,j=Y?Y.translateX:0}else{let ct=Y?Y.translateX+Y.itemWidth+z.fullParams.gap:0;ct+P>z.lineMaxSize?(X=Y.lineIndex+1,Q=0,j=0):(X=Y?Y.lineIndex:0,Q=Y?Y.itemIndex+1:0,j=ct),W=(z.fullChartParams.styles.textSize+z.fullParams.gap)*X}return{translateX:j,translateY:W,lineIndex:X,itemIndex:Q}})(_,L,C);L[G]||(L[G]=[]);const N=_.fullParams.seriesList[M]?_.fullParams.seriesList[M]:_.defaultListStyle;return L[G].push({id:E,seriesLabel:E,seriesIndex:T,lineIndex:G,itemIndex:M,text:E,itemWidth:P,translateX:S,translateY:R,color:D,listRectWidth:N.listRectWidth,listRectHeight:N.listRectHeight,listRectRadius:N.listRectRadius}),L},[])),Ye(1)),x=H({fullParams:r,fullChartParams:o,lineDirection:d,lengendItems:v}).pipe(F(l),B(async _=>_),U(_=>{const{width:L,height:E}=((T,I)=>{let P=0,D=0;if(!I.length||!I[0].length)return{width:P,height:D};const C=I[0][I[0].length-1];return T.lineDirection==="column"?(P=I.reduce((S,R)=>{const G=R.reduce((M,N)=>N.itemWidth>M?N.itemWidth:M,0);return S+G},0),P+=T.fullParams.gap*(I.length-1),D=C.translateY+T.fullChartParams.styles.textSize):(P=C.translateX+C.itemWidth,D=T.fullChartParams.styles.textSize*I.length+T.fullParams.gap*(I.length-1)),{width:P,height:D}})(_,_.lengendItems);return{direction:_.lineDirection,width:L,height:E,translateX:_.fullParams.gap,translateY:_.fullParams.gap}}),Ye(1)),b=H({fullParams:r,lengendList:x}).pipe(F(l),B(async _=>_),U(_=>{const L=_.lengendList.width+_.fullParams.gap*2,E=_.lengendList.height+_.fullParams.gap*2;let T=0,I=0;return _.fullParams.position==="left"?_.fullParams.justify==="start"?(T=_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="center"?(T=_.fullParams.padding,I=-E/2):_.fullParams.justify==="end"&&(T=_.fullParams.padding,I=-E-_.fullParams.padding):_.fullParams.position==="right"?_.fullParams.justify==="start"?(T=-L-_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="center"?(T=-L-_.fullParams.padding,I=-E/2):_.fullParams.justify==="end"&&(T=-L-_.fullParams.padding,I=-E-_.fullParams.padding):_.fullParams.position==="top"?_.fullParams.justify==="start"?(T=_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="center"?(T=-L/2,I=_.fullParams.padding):_.fullParams.justify==="end"&&(T=-L-_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="start"?(T=_.fullParams.padding,I=-E-_.fullParams.padding):_.fullParams.justify==="center"?(T=-L/2,I=-E-_.fullParams.padding):_.fullParams.justify==="end"&&(T=-L-_.fullParams.padding,I=-E-_.fullParams.padding),{width:L,height:E,translateX:T,translateY:I}})),w=H({rootPositionSelection:m,fullParams:r,fullChartParams:o,legendCard:b}).pipe(F(l),B(async _=>_),U(_=>_.rootPositionSelection.selectAll("g").data([_.legendCard]).join(L=>L.append("g").classed(s,!0).attr("transform",E=>`translate(${E.translateX}, ${E.translateY})`),L=>L.transition().attr("transform",E=>`translate(${E.translateX}, ${E.translateY})`),L=>L.remove()).each((L,E,T)=>{V(T[E]).selectAll("rect").data([L]).join("rect").attr("width",I=>I.width).attr("height",I=>I.height).attr("fill",Et(_.fullParams.backgroundFill,_.fullChartParams)).attr("stroke",Et(_.fullParams.backgroundStroke,_.fullChartParams))}))),$=H({lengendCardSelection:w,fullParams:r,lengendList:x}).pipe(F(l),B(async _=>_),U(_=>_.lengendCardSelection.selectAll("g").data([_.lengendList]).join(L=>L.append("g").classed(u,!0).attr("transform",E=>`translate(${E.translateX}, ${E.translateY})`),L=>L.transition().attr("transform",E=>`translate(${E.translateX}, ${E.translateY})`),L=>L.remove())));return H({lengendListSelection:$,fullParams:r,fullChartParams:o,lengendItems:v}).pipe(F(l),B(async _=>_),U(_=>{const L=_.lengendItems[0]?_.lengendItems.flat():[];return _.lengendListSelection.selectAll(`g.${c}`).data(L).join(E=>E.append("g").classed(c,!0).attr("cursor","default"),E=>E,E=>E.remove()).attr("transform",(E,T)=>`translate(${E.translateX}, ${E.translateY})`).each((E,T,I)=>{const P=_.fullChartParams.styles.textSize/2,D=-E.listRectWidth/2,C=-E.listRectHeight/2;V(I[T]).selectAll("rect").data([E]).join("rect").attr("x",P).attr("y",P).attr("width",S=>S.listRectWidth).attr("height",S=>S.listRectHeight).attr("transform",S=>`translate(${D}, ${C})`).attr("fill",S=>S.color).attr("rx",S=>S.listRectRadius),V(I[T]).selectAll("text").data([E]).join(S=>S.append("text").attr("dominant-baseline","hanging"),S=>S,S=>S.remove()).attr("x",_.fullChartParams.styles.textSize*1.5).attr("font-size",_.fullChartParams.styles.textSize).attr("fill",S=>_.fullParams.textColorType==="series"?A2(S.seriesIndex,_.fullChartParams):Et(_.fullParams.textColorType,_.fullChartParams)).text(S=>S.text)})})).subscribe(),()=>{l.next(void 0)}},M2="GridLegend",mI=ae(M2,Vh)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new rt,o=n.SeriesDataMap$.pipe(F(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(F(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Pu(M2,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}}),Mh=6;function yI({selection:t,xAxisClassName:e,groupingLabelClassName:n,params:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,chartParams:u,groupScale:c,textTransform:l}){const h=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((p,g,m)=>{V(m[g]).selectAll("text").data([p]).join(y=>y.append("text").style("font-weight","bold"),y=>y,y=>y.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).style("font-size",`${u.styles.textSize}px`).style("fill",Et(r.labelColorType,u)).style("transform",l).text(y=>s.grid.groupAxis.label)}).attr("transform",p=>`translate(${a.width+p.tickPadding+r.labelOffset[0]}, ${-p.tickPadding-Mh-r.labelOffset[1]})`);const f=Ng(c).scale(c).tickSize(r.tickFullLine==!0?-a.height:Mh).tickSizeOuter(0).tickFormat(p=>wh(p,r.tickFormat)).tickPadding(r.tickPadding),d=h.transition().duration(100).call(f);return d.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Et(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),d.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Et(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),h.selectAll("text").style("font-family","sans-serif").style("font-size",`${u.styles.textSize}px`).style("color",Et(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`0 -${r.tickPadding+Mh}`).style("transform",l),h}const T2=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainer$:c,isSeriesPositionSeprate$:l})=>{const h=new rt,f=ot(t,"container"),d=ot(t,"xAxisG"),p=ot(t,"xAxis"),g=ot(t,"groupingLabel"),m=H({computedData:n.pipe(ft(($,A)=>$.length===A.length)),isSeriesPositionSeprate:l}).pipe(F(h),B(async $=>$),U($=>$.isSeriesPositionSeprate?$.computedData:[$.computedData[0]]),U(($,A)=>e.selectAll(`g.${f}`).data($,_=>_[0]?_[0].seriesIndex:A).join("g").classed(f,!0))),y=m.pipe(F(h),U(($,A)=>$.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));H({containerSelection:m,gridContainer:c}).pipe(F(h),B(async $=>$)).subscribe($=>{$.containerSelection.attr("transform",(A,_)=>{const L=$.gridContainer[_]??$.gridContainer[0],E=L.translate,T=L.scale;return`translate(${E[0]}, ${E[1]}) scale(${T[0]}, ${T[1]})`})}),H({axisSelection:y,gridAxesTransform:a}).pipe(F(h),B(async $=>$)).subscribe($=>{$.axisSelection.style("transform",$.gridAxesTransform.value)});const v=H({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainer:c}).pipe(F(h),B(async $=>$),U($=>{const A=`translate(${$.gridAxesReverseTransform.translate[0]}px, ${$.gridAxesReverseTransform.translate[1]}px)`,_=`rotate(${$.gridAxesReverseTransform.rotate}deg) rotateX(${$.gridAxesReverseTransform.rotateX}deg) rotateY(${$.gridAxesReverseTransform.rotateY}deg)`,L=`scale(${1/$.gridContainer[0].scale[0]}, ${1/$.gridContainer[0].scale[1]})`,T=`rotate(${$.fullDataFormatter.grid.groupAxis.position==="left"&&$.fullDataFormatter.grid.valueAxis.position==="top"||$.fullDataFormatter.grid.groupAxis.position==="right"&&$.fullDataFormatter.grid.valueAxis.position==="bottom"?$.fullParams.tickTextRotate+180:$.fullParams.tickTextRotate}deg)`;return`${A} ${_} ${L} ${T}`}),ft()),x=new lt($=>{H({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(F(h),B(async A=>A)).subscribe(A=>{const L=A.computedData[0]?A.computedData[0].length-1:0,E=A.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-A.fullDataFormatter.grid.groupAxis.scalePadding:A.fullDataFormatter.grid.groupAxis.scaleDomain[0]-A.fullDataFormatter.grid.groupAxis.scalePadding,T=A.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?L+A.fullDataFormatter.grid.groupAxis.scalePadding:A.fullDataFormatter.grid.groupAxis.scaleDomain[1]+A.fullDataFormatter.grid.groupAxis.scalePadding,I=A.computedData[0]?A.computedData[0].length:0;let P=(A.computedData[0]??[]).map(R=>R.groupLabel);const D=new Array(I).fill(0).map((R,G)=>P[G]!=null?P[G]:String(G)).filter((R,G)=>G>=E&&G<=T),C=A.fullDataFormatter.grid.groupAxis.scalePadding,S=ag({axisLabels:D,axisWidth:A.gridAxesSize.width,padding:C});$.next(S)})}),b=H({fullDataFormatter:i,fullParams:r}).pipe(F(h),B(async $=>$),U($=>{let A="middle",_="hanging";return $.fullDataFormatter.grid.groupAxis.position==="bottom"?(A=$.fullParams.tickTextRotate?"end":"middle",_="hanging"):$.fullDataFormatter.grid.groupAxis.position==="top"?(A=$.fullParams.tickTextRotate?"end":"middle",_="auto"):$.fullDataFormatter.grid.groupAxis.position==="left"?(A="end",_="middle"):$.fullDataFormatter.grid.groupAxis.position==="right"&&(A="start",_="middle"),{textAnchor:A,dominantBaseline:_}})),w=i.pipe(F(h),U($=>{let A="start",_="hanging";return $.grid.groupAxis.position==="bottom"?_="hanging":$.grid.groupAxis.position==="top"?_="auto":$.grid.groupAxis.position==="left"?A="end":$.grid.groupAxis.position==="right"&&(A="start"),$.grid.valueAxis.position==="left"?A="start":$.grid.valueAxis.position==="right"?A="end":$.grid.valueAxis.position==="bottom"?_="auto":$.grid.valueAxis.position==="top"&&(_="hanging"),{textAnchor:A,dominantBaseline:_}}));return H({axisSelection:y,params:r,tickTextAlign:b,axisLabelAlign:w,gridAxesSize:u,fullDataFormatter:i,chartParams:o,groupScale:x,textTransform:v}).pipe(F(h),B(async $=>$)).subscribe($=>{yI({selection:$.axisSelection,xAxisClassName:p,groupingLabelClassName:g,params:$.params,tickTextAlign:$.tickTextAlign,axisLabelAlign:$.axisLabelAlign,gridAxesSize:$.gridAxesSize,fullDataFormatter:$.fullDataFormatter,chartParams:$.chartParams,groupScale:$.groupScale,textTransform:$.textTransform})}),()=>{h.next(void 0)}},P2="GroupAxis",bI=ae(P2,qh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=T2(P2,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainer$:n.gridContainer$,isSeriesPositionSeprate$:n.isSeriesPositionSeprate$});return()=>{i.next(void 0),o()}}),D2=6;function vI({selection:t,yAxisClassName:e,textClassName:n,fullParams:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,fullChartParams:u,valueScale:c,textTransform:l,minAndMax:h}){const f=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((y,v,x)=>{V(x[v]).selectAll("text").data([y]).join(b=>b.append("text").style("font-weight","bold"),b=>b,b=>b.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).style("font-size",`${u.styles.textSize}px`).style("fill",Et(r.labelColorType,u)).style("transform",l).text(b=>s.grid.valueAxis.label)}).attr("transform",y=>`translate(${-y.tickPadding+r.labelOffset[0]}, ${a.height+y.tickPadding+r.labelOffset[1]})`);const d=h[1]-h[0],p=Fg(c).scale(c).ticks(d>r.ticks?r.ticks:h[0]===0&&h[1]===0?1:Math.ceil(d)).tickFormat(y=>wh(y,r.tickFormat)).tickSize(r.tickFullLine==!0?-a.width:D2).tickPadding(r.tickPadding),g=f.transition().duration(100).call(p);return g.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Et(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),g.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Et(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),f.selectAll("text").style("font-family","sans-serif").style("font-size",`${u.styles.textSize}px`).style("color",Et(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`-${r.tickPadding+D2} 0`).style("transform",l),f}const Du=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainer$:c,isSeriesPositionSeprate$:l})=>{const h=new rt,f=ot(t,"container"),d=ot(t,"yAxisG"),p=ot(t,"yAxis"),g=ot(t,"text"),m=H({computedData:n.pipe(ft((A,_)=>A.length===_.length)),isSeriesPositionSeprate:l}).pipe(F(h),B(async A=>A),U(A=>A.isSeriesPositionSeprate?A.computedData:[A.computedData[0]]),U((A,_)=>e.selectAll(`g.${f}`).data(A,L=>L[0]?L[0].seriesIndex:_).join("g").classed(f,!0))),y=m.pipe(F(h),U((A,_)=>A.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));H({containerSelection:m,gridContainer:c}).pipe(F(h),B(async A=>A)).subscribe(A=>{A.containerSelection.attr("transform",(_,L)=>{const E=A.gridContainer[L]??A.gridContainer[0],T=E.translate,I=E.scale;return`translate(${T[0]}, ${T[1]}) scale(${I[0]}, ${I[1]})`})}),H({axisSelection:y,gridAxesTransform:a}).pipe(F(h),B(async A=>A)).subscribe(A=>{A.axisSelection.style("transform",A.gridAxesTransform.value)});const v=H({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainer:c}).pipe(F(h),B(async A=>A),U(A=>{const _=`translate(${A.gridAxesReverseTransform.translate[0]}px, ${A.gridAxesReverseTransform.translate[1]}px)`,L=`rotate(${A.gridAxesReverseTransform.rotate}deg) rotateX(${A.gridAxesReverseTransform.rotateX}deg) rotateY(${A.gridAxesReverseTransform.rotateY}deg)`,E=`scale(${1/A.gridContainer[0].scale[0]}, ${1/A.gridContainer[0].scale[1]})`,I=`rotate(${A.fullDataFormatter.grid.groupAxis.position==="left"&&A.fullDataFormatter.grid.valueAxis.position==="top"||A.fullDataFormatter.grid.groupAxis.position==="right"&&A.fullDataFormatter.grid.valueAxis.position==="bottom"?A.fullParams.tickTextRotate+180:A.fullParams.tickTextRotate}deg)`;return`${_} ${L} ${E} ${I}`}),ft()),x=new lt(A=>{H({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(F(h),B(async _=>_)).subscribe(_=>{const E=_.computedData[0]?_.computedData[0].length-1:0,T=_.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-_.fullDataFormatter.grid.groupAxis.scalePadding:_.fullDataFormatter.grid.groupAxis.scaleDomain[0]-_.fullDataFormatter.grid.groupAxis.scalePadding,I=_.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?E+_.fullDataFormatter.grid.groupAxis.scalePadding:_.fullDataFormatter.grid.groupAxis.scaleDomain[1]+_.fullDataFormatter.grid.groupAxis.scalePadding,P=_.computedData.map((C,S)=>C.filter((R,G)=>G>=T&&G<=I)),D=TC(P.flat());A.next(D)})}),b=new lt(A=>{H({fullDataFormatter:i,gridAxesSize:u,minAndMax:x}).pipe(F(h),B(async _=>_)).subscribe(_=>{const L=og({maxValue:_.minAndMax[1],minValue:_.minAndMax[0],axisWidth:_.gridAxesSize.height,scaleDomain:_.fullDataFormatter.grid.valueAxis.scaleDomain,scaleRange:_.fullDataFormatter.grid.valueAxis.scaleRange});A.next(L)})}),w=i.pipe(F(h),U(A=>{let _="start",L="hanging";return A.grid.valueAxis.position==="left"?(_="end",L="middle"):A.grid.valueAxis.position==="right"?(_="start",L="middle"):A.grid.valueAxis.position==="bottom"?(_="middle",L="hanging"):A.grid.valueAxis.position==="top"&&(_="middle",L="auto"),{textAnchor:_,dominantBaseline:L}})),$=i.pipe(F(h),U(A=>{let _="start",L="hanging";return A.grid.groupAxis.position==="bottom"?L="auto":A.grid.groupAxis.position==="top"?L="hanging":A.grid.groupAxis.position==="left"?_="start":A.grid.groupAxis.position==="right"&&(_="end"),A.grid.valueAxis.position==="left"?_="end":A.grid.valueAxis.position==="right"?_="start":A.grid.valueAxis.position==="bottom"?L="hanging":A.grid.valueAxis.position==="top"&&(L="auto"),{textAnchor:_,dominantBaseline:L}}));return H({axisSelection:y,fullParams:r,tickTextAlign:w,axisLabelAlign:$,computedData:n,gridAxesSize:u,fullDataFormatter:i,fullChartParams:o,valueScale:b,textTransform:v,minAndMax:x}).pipe(F(h),B(async A=>A)).subscribe(A=>{vI({selection:A.axisSelection,yAxisClassName:p,textClassName:g,fullParams:A.fullParams,tickTextAlign:A.tickTextAlign,axisLabelAlign:A.axisLabelAlign,gridAxesSize:A.gridAxesSize,fullDataFormatter:A.fullDataFormatter,fullChartParams:A.fullChartParams,valueScale:A.valueScale,textTransform:A.textTransform,minAndMax:A.minAndMax})}),()=>{h.next(void 0)}},L2="ValueAxis",xI=ae(L2,Lu)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=Du(L2,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainer$:n.gridContainer$,isSeriesPositionSeprate$:n.isSeriesPositionSeprate$});return()=>{i.next(void 0),o()}}),E2="ValueStackAxis",_I=ae(E2,Xh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=n.computedData$.pipe(F(i),U(s=>{const u=new Array(s[0]?s[0].length:0).fill(null).map((l,h)=>s.reduce((f,d)=>{if(d&&d[h]){const p=d[h].value==null||d[h].visible==!1?0:d[h].value;return f+p}return f},0));return s.map((l,h)=>l.map((f,d)=>({...f,value:u[d]})))})),a=Du(E2,{selection:t,computedData$:n.isSeriesPositionSeprate$.pipe(B(s=>$d(()=>s,n.computedData$,o))),fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainer$:n.gridContainer$,isSeriesPositionSeprate$:n.isSeriesPositionSeprate$});return()=>{i.next(void 0),a()}}),k2="ScalingArea",wI=ot(k2,"rect"),$I=ae(k2,jh)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new rt,a=e.insert("rect","g").classed(wI,!0).attr("opacity",0);let s={k:1,x:0,y:0};r.layout$.pipe(F(o)).subscribe(c=>{a.attr("width",c.width).attr("height",c.height).attr("x",c.left).attr("y",c.top)});const u=r.computedData$.pipe(U(c=>c[0]?c[0].length-1:0),ft());return H({initGroupAxis:r.fullDataFormatter$.pipe(U(c=>c.grid.groupAxis),hi()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:u,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(F(o),B(async c=>c)).subscribe(c=>{const h=c.groupMaxIndex,f=c.initGroupAxis.scaleDomain[0]==="auto"?0-c.initGroupAxis.scalePadding:c.initGroupAxis.scaleDomain[0]-c.initGroupAxis.scalePadding,d=c.initGroupAxis.scaleDomain[1]==="auto"?h+c.initGroupAxis.scalePadding:c.initGroupAxis.scaleDomain[1]+c.initGroupAxis.scalePadding,g=og({maxValue:c.groupMaxIndex,minValue:0,axisWidth:c.axisSize.width,scaleDomain:[f,d],scaleRange:[0,1]}).copy(),m=a2().on("zoom",function(v){const x=v.transform,b=A=>{const _=Math.round(A);return Math.min(h,Math.max(0,_))},w=c.fullDataFormatter.grid.groupAxis.position==="bottom"||c.fullDataFormatter.grid.groupAxis.position==="top"?x.rescaleX(g).domain().map(b):x.rescaleY(g).domain().map(b);w[0]<=0&&w[1]>=h?x.k<s.k&&(x.k=s.k,x.x=s.x,x.y=s.y):w[1]-w[0]<=1&&x.k>s.k&&(x.k=s.k,x.x=s.x,x.y=s.y),s.k=x.k,s.x=x.x,s.y=x.y;const $={...c.fullDataFormatter,grid:{...c.fullDataFormatter.grid,groupAxis:{...c.fullDataFormatter.grid.groupAxis,scaleDomain:w}}};i.dataFormatter$.next($)});e.call(m)}),()=>{o.next(void 0),a.remove()}});function SI(t,e){let n=new lt(()=>{});return t.each(function(){const r=Yu(this,e);n=Wu(n,r)}),n}const Th="GroupAux",Ph=ot(Th,"label-box");function AI({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function MI({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=ot(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),s=a.enter().append("line").classed(o,!0).style("stroke",c=>Et(r.lineColorType,i)).style("stroke-width",1).style("stroke-dasharray",r.lineDashArray??"none").style("pointer-events","none"),u=a.merge(s);return a.exit().remove(),s.attr("x1",c=>c.x1).attr("y1",c=>c.y1).attr("x2",c=>c.x2).attr("y2",c=>c.y2),a.transition().duration(50).attr("x1",c=>c.x1).attr("y1",c=>c.y1).attr("x2",c=>c.x2).attr("y2",c=>c.y2),u}function TI(t){t.selectAll("line").data([]).exit().remove()}function PI({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:wh(t,n.labelTextFormat)}]:[]}function DI({selection:t,labelData:e,fullParams:n,fullChartParams:r,gridAxesReverseTransformValue:i}){const o=r.styles.textSize+4,a=t.selectAll(`g.${Ph}`).data(e),s=a.enter().append("g").classed(Ph,!0).style("cursor","pointer"),u=s.merge(a);return s.attr("transform",(c,l)=>`translate(${c.x}, ${c.y})`),a.transition().duration(50).attr("transform",(c,l)=>`translate(${c.x}, ${c.y})`),a.exit().remove(),u.each((c,l,h)=>{const f=u2(c.text,r.styles.textSize)+12,d=-f/2,p=V(h[l]).selectAll("rect").data([c]),g=p.enter().append("rect").attr("height",`${o}px`).attr("fill",v=>Et(n.labelColorType,r)).attr("x",d).attr("y",-2).attr("rx",5).attr("ry",5).style("cursor","pointer");p.merge(g).attr("width",v=>`${f}px`).style("transform",i),p.exit().remove();const m=V(h[l]).selectAll("text").data([c]),y=m.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");m.merge(y).text(v=>v.text).style("transform",i).attr("fill",v=>Et(n.labelTextColorType,r)).attr("font-size",r.styles.textSize).attr("x",d+6),m.exit().remove()}),u}function LI(t){t.selectAll(`g.${Ph}`).data([]).exit().remove()}const EI=ae(Th,Yh)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new rt,a=e.insert("rect","g").classed(ot(Th,"rect"),!0).attr("opacity",0),s=t.append("g");i.layout$.pipe(F(o)).subscribe(f=>{a.attr("width",f.rootWidth).attr("height",f.rootHeight)}),i.gridAxesTransform$.pipe(F(o),U(f=>f.value),ft()).subscribe(f=>{s.style("transform",f)});const u=new lt(f=>{H({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(F(o),B(async d=>d)).subscribe(d=>{const g=d.computedData[0]?d.computedData[0].length-1:0,m=d.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-d.fullDataFormatter.grid.groupAxis.scalePadding:d.fullDataFormatter.grid.groupAxis.scaleDomain[0]-d.fullDataFormatter.grid.groupAxis.scalePadding,y=d.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?g+d.fullDataFormatter.grid.groupAxis.scalePadding:d.fullDataFormatter.grid.groupAxis.scaleDomain[1]+d.fullDataFormatter.grid.groupAxis.scalePadding,v=d.computedData[0]?d.computedData[0].length:0;let x=d.fullDataFormatter.grid.gridData.seriesDirection==="row"?(d.computedData[0]??[]).map(A=>A.groupLabel):d.computedData.map(A=>A[0].groupLabel);const b=new Array(v).fill(0).map((A,_)=>x[_]!=null?x[_]:String(_)).filter((A,_)=>_>=m&&_<=y),w=d.fullDataFormatter.grid.groupAxis.scalePadding,$=ag({axisLabels:b,axisWidth:d.gridAxesSize.width,padding:w});f.next($)})}),c=Sh({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),l=i.fullChartParams$.pipe(F(o),U(f=>f.highlightTarget),ft());return H({computedData:i.computedData$,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:l,SeriesDataMap:i.SeriesDataMap$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:c,groupScale:u}).pipe(F(o),B(async f=>f)).subscribe(f=>{e.on("mouseover",(d,p)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})}).on("mousemove",(d,p)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})}).on("mouseout",(d,p)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})}).on("click",(d,p)=>{d.stopPropagation();const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})})}),H({event:r.event$.pipe(fi(f=>f.eventName==="mouseover"||f.eventName==="mousemove")),computedData:i.computedData$,groupScale:u,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:l,gridAxesReverseTransform:i.gridAxesReverseTransform$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:c}).pipe(F(o),B(async f=>f)).subscribe(f=>{const d=f.groupScale(f.event.groupLabel)??0,p=AI({groupLabel:f.event.groupLabel,axisX:d,axisHeight:f.gridAxesSize.height,fullParams:f.fullParams});MI({selection:s,pluginName:n,lineData:p,fullParams:f.fullParams,fullChartParams:f.fullChartParams});const g=PI({groupLabel:f.event.groupLabel,axisX:d,fullParams:f.fullParams});DI({selection:s,labelData:g,fullParams:f.fullParams,fullChartParams:f.fullChartParams,gridAxesReverseTransformValue:f.gridAxesReverseTransform.value}).on("mouseover",(y,v)=>{const{groupIndex:x,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:x,groupLabel:b,event:y,data:f.computedData})}).on("mousemove",(y,v)=>{const{groupIndex:x,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:x,groupLabel:b,event:y,data:f.computedData})}).on("mouseout",(y,v)=>{const{groupIndex:x,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:x,groupLabel:b,event:y,data:f.computedData})}).on("click",(y,v)=>{const{groupIndex:x,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:x,groupLabel:b,event:y,data:f.computedData})})}),SI(a,"mouseout").pipe(F(o)).subscribe(f=>{console.log("rootMouseout"),TI(s),LI(s)}),()=>{o.next(void 0),a.remove()}}),C2={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,gridList:[{listRectWidth:14,listRectHeight:14,listRectRadius:0}],textColorType:"primary"},I2={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]},R2={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]},N2={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1,gridIndexes:[0]},F2={barWidth:0,barGroupPadding:10,barRadius:!1,gridIndexes:[0]},G2={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0],gridIndexes:[0]},z2={lineCurve:"curveLinear",lineWidth:2,gridIndexes:[1]},O2={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1,gridIndexes:[1]},U2={firstAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},secondAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},gridIndexes:[0,1]},B2="MultiGridLegend",kI=Xe(B2,C2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new rt,o=n.multiGridEachDetail$.pipe(F(i),U(c=>c.map((h,f)=>h.SeriesDataMap$.pipe(U(d=>Array.from(d.keys()))))),B(c=>H(c)),U(c=>c.flat())),a=H({fullParams:n.fullParams$,multiGrid:n.multiGridEachDetail$,computedData:n.computedData$}).pipe(F(i),B(async c=>c),U(c=>c.computedData.map((l,h)=>{const f=fc(c.fullParams.gridList[h]??{},{listRectWidth:c.fullParams.listRectWidth,listRectHeight:c.fullParams.listRectHeight,listRectRadius:c.fullParams.listRectRadius});return l.map(d=>f)}).flat())),s=H({fullParams:n.fullParams$,seriesList:a}).pipe(F(i),B(async c=>c),U(c=>({...c.fullParams,seriesList:c.seriesList}))),u=Pu(B2,{rootSelection:e,seriesLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),u()}}),Sn=t=>{const e=t.fullParams$.pipe(U(r=>r.gridIndexes),ft(),Ye(1)),n=new rt;return e.pipe(U(r=>r.map(i=>{n.next(void 0);const o=li(i).pipe(F(n),Ye(1)),a=H({computedData:t.computedData$,gridIndex:o}).pipe(F(n),U(w=>w.computedData[w.gridIndex]??w.computedData[0])),s=H({fullDataFormatter:t.fullDataFormatter$,gridIndex:o}).pipe(F(n),U(w=>{const $=w.fullDataFormatter.gridList[0];return{type:"grid",grid:{...w.fullDataFormatter.gridList[w.gridIndex]??$},container:{...w.fullDataFormatter.container}}})),u=H({multiGridEachDetail:t.multiGridEachDetail$,gridIndex:o}).pipe(F(n),B(async w=>w),U(w=>w.multiGridEachDetail[w.gridIndex]??w.multiGridEachDetail[0]),Ye(1)),c=u.pipe(B(w=>w.isSeriesPositionSeprate$)),l=u.pipe(B(w=>w.gridContainer$)),h=u.pipe(B(w=>w.gridAxesTransform$)),f=u.pipe(B(w=>w.gridAxesReverseTransform$)),d=u.pipe(B(w=>w.gridAxesSize$)),p=u.pipe(B(w=>w.gridGraphicTransform$)),g=u.pipe(B(w=>w.gridGraphicReverseScale$)),m=u.pipe(B(w=>w.gridHighlight$)),y=u.pipe(B(w=>w.existSeriesLabels$)),v=u.pipe(B(w=>w.SeriesDataMap$)),x=u.pipe(B(w=>w.GroupDataMap$)),b=u.pipe(B(w=>w.visibleComputedData$));return{gridComputedData$:a,gridDataFormatter$:s,gridAxesTransform$:h,gridGraphicTransform$:p,gridGraphicReverseScale$:g,gridAxesReverseTransform$:f,gridAxesSize$:d,gridHighlight$:m,existSeriesLabels$:y,SeriesDataMap$:v,GroupDataMap$:x,visibleComputedData$:b,isSeriesPositionSeprate$:c,gridContainer$:l}})))},Dh="MultiBars",Y2=ot(Dh,"grid"),CI=Xe(Dh,N2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return Sn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Y2}`).data(s).join("g").attr("class",Y2).each((u,c,l)=>{const h=V(l[c]);o[c]=Ah(Dh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existSeriesLabels$:u.existSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Lh="MultiBarStack",W2=ot(Lh,"grid"),II=Xe(Lh,F2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return Sn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${W2}`).data(s).join("g").attr("class",W2).each((u,c,l)=>{const h=V(l[c]);o[c]=y2(Lh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existSeriesLabels$:u.existSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:u.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Eh="MultiBarsTriangle",H2=ot(Eh,"grid"),RI=Xe(Eh,G2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return Sn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${H2}`).data(s).join("g").attr("class",H2).each((u,c,l)=>{const h=V(l[c]);o[c]=_2(Eh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existSeriesLabels$:u.existSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),kh="MultiLines",q2=ot(kh,"grid"),NI=Xe(kh,z2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return Sn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${q2}`).data(s).join("g").attr("class",q2).each((u,c,l)=>{const h=V(l[c]);o[c]=c2(kh,{selection:h,computedData$:u.gridComputedData$,existSeriesLabels$:u.existSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullDataFormatter$:u.gridDataFormatter$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Ch="MultiDots",X2=ot(Ch,"grid"),FI=Xe(Ch,O2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return Sn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${X2}`).data(s).join("g").attr("class",X2).each((u,c,l)=>{const h=V(l[c]);o[c]=$2(Ch,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existSeriesLabels$:u.existSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Ih="MultiGroupAxis",j2=ot(Ih,"grid"),GI=Xe(Ih,I2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return Sn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${j2}`).data(s).join("g").attr("class",j2).each((u,c,l)=>{const h=V(l[c]);o[c]=T2(Ih,{selection:h,computedData$:u.gridComputedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Rh="MultiValueAxis",V2=ot(Rh,"grid"),zI=Xe(Rh,R2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return Sn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${V2}`).data(s).join("g").attr("class",V2).each((u,c,l)=>{const h=V(l[c]);o[c]=Du(Rh,{selection:h,computedData$:u.gridComputedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$})})}),()=>{i.next(void 0),o.forEach(s=>s())}});function Z2(t,e,n,r){const{gap:i,rowAmount:o,columnAmount:a}=e,s=(t.width-i*(a-1))/a,u=(t.height-i*(o-1))/o,c=r*s+r*i,l=n*u+n*i,h=[c,l],f=[s/t.width,u/t.height];return{translate:h,scale:f}}const OI=({fullDataFormatter$:t,layout$:e})=>{const n=new rt;function r({xAxis:i,yAxis:o,width:a,height:s}){if(!i||!o)return{translate:[0,0],scale:[1,1],rotate:0,rotateX:0,rotateY:0,value:""};let u=0,c=0,l=0,h=0,f=0;return i.position==="bottom"?o.position==="left"?(h=180,c=s):o.position==="right"?(h=180,f=180,u=a,c=s):(h=180,c=s):i.position==="top"?o.position==="left"||(o.position==="right"?(f=180,u=a):(h=180,c=s)):i.position==="left"?o.position==="bottom"?(l=-90,c=s):o.position==="top"?(l=-90,f=180):(h=180,c=s):i.position==="right"&&(o.position==="bottom"?(l=-90,h=180,c=s,u=a):o.position==="top"?(l=-90,h=180,f=180,u=a):(h=180,c=s)),{translate:[u,c],scale:[1,1],rotate:l,rotateX:h,rotateY:f,value:`translate(${u}px, ${c}px) rotate(${l}deg) rotateX(${h}deg) rotateY(${f}deg)`}}return new lt(i=>(H({fullDataFormatter:t,layout:e}).pipe(F(n),B(async o=>o)).subscribe(o=>{const a=r({xAxis:o.fullDataFormatter.grid.groupAxis,yAxis:o.fullDataFormatter.grid.valueAxis,width:o.layout.width,height:o.layout.height});i.next(a)}),function(){n.next(void 0)}))},UI=({gridAxesTransform$:t})=>t.pipe(U(e=>{const n=[0,0],r=[1/e.scale[0],1/e.scale[1]],i=e.rotate*-1,o=e.rotateX*-1,a=e.rotateY*-1;return{translate:n,scale:r,rotate:i,rotateX:o,rotateY:a,value:`translate(${n[0]}px, ${n[1]}px) rotate(${i}deg) rotateX(${o}deg) rotateY(${a}deg)`}})),BI=({computedData$:t,fullDataFormatter$:e,fullChartParams$:n,layout$:r})=>H({computedData:t,fullDataFormatter:e,fullChartParams:n,layout:r}).pipe(B(async o=>o),U(o=>{const a=o.fullDataFormatter.grid;if(!!(a.seriesSlotIndexes&&a.seriesSlotIndexes.length===o.computedData.length))return o.computedData.map((u,c)=>{const l=a.seriesSlotIndexes[c]%o.fullDataFormatter.container.columnAmount,h=Math.floor(a.seriesSlotIndexes[c]/o.fullDataFormatter.container.columnAmount),{translate:f,scale:d}=Z2(o.layout,o.fullDataFormatter.container,h,l);return{slotIndex:a.seriesSlotIndexes[c],rowIndex:h,columnIndex:l,translate:f,scale:d}});{const u=a.slotIndex%o.fullDataFormatter.container.columnAmount,c=Math.floor(a.slotIndex/o.fullDataFormatter.container.columnAmount);return o.computedData.map((l,h)=>{const{translate:f,scale:d}=Z2(o.layout,o.fullDataFormatter.container,c,u);return{slotIndex:a.slotIndex,rowIndex:c,columnIndex:u,translate:f,scale:d}})}})),Nh="OverlappingValueAxes",K2=ot(Nh,"grid"),YI=Xe(Nh,U2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[],a=r.fullParams$.pipe(F(i),U(l=>l.gridIndexes[0])),s=r.fullParams$.pipe(F(i),U(l=>l.gridIndexes[1])),u=H({firstGridIndex:a,secondGridIndex:s}).pipe(F(i),B(l=>r.fullDataFormatter$.pipe(F(i),U(h=>{h.gridList[l.secondGridIndex]||(h.gridList[l.secondGridIndex]=Object.assign({},h.gridList[l.firstGridIndex]));let f="";return h.gridList[l.firstGridIndex].valueAxis.position==="left"?f="right":h.gridList[l.firstGridIndex].valueAxis.position==="bottom"?f="top":h.gridList[l.firstGridIndex].valueAxis.position==="top"?f="bottom":h.gridList[l.firstGridIndex].valueAxis.position==="right"&&(f="left"),console.log("reversePosition",f),{type:"grid",grid:{...h.gridList[l.secondGridIndex],valueAxis:{...h.gridList[l.secondGridIndex].valueAxis,position:f}},container:{...h.container}}}))));return li(r).pipe(F(i),U(l=>({...l,fullParams$:l.fullParams$.pipe(U(h=>(h.gridIndexes.length>2&&(h.gridIndexes.length=2),h)))})),B(l=>Sn(l)),U(l=>l.map((h,f)=>{if(f===0)return h;const d=OI({fullDataFormatter$:u,layout$:r.layout$}),p=UI({gridAxesTransform$:d}),g=BI({computedData$:h.gridComputedData$,fullDataFormatter$:u,fullChartParams$:r.fullChartParams$,layout$:r.layout$});return{...h,gridAxesTransform$:d,gridAxesReverseTransform$:p,gridContainer$:g}}))).subscribe(l=>{o.forEach(h=>h()),t.selectAll(`g.${K2}`).data(l).join("g").attr("class",K2).each((h,f,d)=>{if(f>1)return;const p=V(d[f]);o[f]=Du(Nh,{selection:p,computedData$:h.gridComputedData$,fullParams$:r.fullParams$.pipe(U(g=>f===0?g.firstAxis:g.secondAxis)),fullDataFormatter$:h.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:h.gridAxesTransform$,gridAxesReverseTransform$:h.gridAxesReverseTransform$,gridAxesSize$:h.gridAxesSize$,gridContainer$:h.gridContainer$,isSeriesPositionSeprate$:h.isSeriesPositionSeprate$})})}),()=>{i.next(void 0),o.forEach(l=>l())}}),Q2={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},J2={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,textRenderFn:t=>{if(t.highlightTarget==="datum"&&t.datum)return[`${t.datum.label}: ${t.datum.value}`];if(t.highlightTarget==="series"){const e=t.seriesLabel,n=t.series.map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="group"){const e=t.groupLabel,n=t.series.map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="category"){const e=t.categoryLabel,n=t.category.map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}return[]},svgRenderFn:null},WI=sg("Container",Q2)(({selection:t})=>function(){}),Fh="Tooltip",tx=ot(Fh,"g"),HI=ot(Fh,"box");function qI(t,e){const n=e.textSize*1.5;return t.filter(r=>r!="").map((r,i)=>{const o=i*n;return`<text font-size="${e.textSize}" fill="${e.textColor}" x="0" y="${o}" style="dominant-baseline:text-before-edge">${r}</text>`}).join()}function XI({rootSelection:t,pluginName:e,rootWidth:n,rootHeight:r,svgString:i,tooltipStyle:o,event:a}){t.interrupt("fadeout");const s=5,u=i?[i]:[],c=i?[o]:[],h=t.selectAll(`g.${tx}`).data(u).join(b=>b.append("g").classed(tx,!0).attr("pointer-events","none"),b=>b,b=>b.style("opacity",0).remove()).attr("transform",()=>`translate(${a.offsetX}, ${a.offsetY})`).selectAll(`g.${HI}`).data(c).join(b=>b.append("g").classed(ot(e,"box"),!0)),f=h.selectAll("rect").data(c).join(b=>b.append("rect").attr("rx",s).attr("ry",s)).attr("fill",b=>b.backgroundColor).attr("stroke",b=>b.strokeColor).attr("opacity",b=>b.backgroundOpacity),d=h.selectAll("g").data(u).join(b=>b.append("g").classed(ot(e,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));u.length&&AC(d,u[0]);const p=d!=null&&d.node()?s2(d):{width:0,height:0};f.attr("width",p.width+o.padding*2).attr("height",p.height+o.padding*2);const g=h!=null&&h.node()?s2(h):{width:0,height:0},m=n-g.width,y=r-g.height,v=a.offsetX+o.offset[0]>m?m-a.offsetX:o.offset[0],x=a.offsetY+o.offset[1]>y?y-a.offsetY:o.offset[1];h.attr("transform",b=>`translate(${v}, ${x})`),h.attr("transform",b=>`translate(${v}, ${x})`)}const jI=sg(Fh,J2)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new rt,s=o.event$.pipe(F(a),fi(p=>p.eventName==="mouseover"||p.eventName==="mousemove")),u=o.event$.pipe(F(a),fi(p=>p.eventName==="mouseout")),c=H({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$}).pipe(F(a),B(async p=>p),U(p=>({backgroundColor:Et(p.fullParams.backgroundColorType,p.fullChartParams),backgroundOpacity:p.fullParams.backgroundOpacity,strokeColor:Et(p.fullParams.strokeColorType,p.fullChartParams),offset:p.fullParams.offset,padding:p.fullParams.padding,textSize:p.fullChartParams.styles.textSize,textColor:Et(p.fullParams.textColorType,p.fullChartParams)}))),l=H({fullParams:i.fullParams$,tooltipStyle:c}).pipe(F(a),B(async p=>p),U(p=>p.fullParams.svgRenderFn?p.fullParams.svgRenderFn:g=>{const m=p.fullParams.textRenderFn(g);return qI(m,p.tooltipStyle)})),h=H({event:s,contentRenderFn:l}).pipe(F(a),B(async p=>p),U(p=>p.contentRenderFn(p.event))),f=u.pipe(F(a),U(p=>"")),d=Wu(s,u).pipe(F(a),U(p=>p.event));return H({svgString:Wu(h,f),event:d,layout:i.layout$,tooltipStyle:c}).pipe(F(a),B(async p=>p)).subscribe(p=>{XI({rootSelection:e,pluginName:n,rootWidth:p.layout.rootWidth,rootHeight:p.layout.rootHeight,svgString:p.svgString,tooltipStyle:p.tooltipStyle,event:p.event})}),function(){a.next(void 0)}}),ex={force:{strength:.03,velocityDecay:.2,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},highlightRIncrease:0,bubbleScaleType:"area"},nx={outerRadius:.95,innerRadius:0,outerMouseoverRadius:1,enterDuration:800,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},rx={eventFn:(t,e,n)=>e==="mouseover"||e==="mousemove"?[String(t.datum.value)]:[String(Math.round(t.data.reduce((r,i)=>r+(i.value??0),0)*n))],textAttrs:[{transform:"translate(0, 0)"}],textStyles:[{"font-weight":"bold","text-anchor":"middle","pointer-events":"none","dominant-baseline":"middle","font-size":64,fill:"#000"}]},ix={outerRadius:.95,outerMouseoverRadius:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"series",labelFn:t=>String(t.value)},ox={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"};function VI(t,{text:e,radius:n,lineHeight:r,isBreakAll:i=!1,limit:o=0}){if(t==null||e==null){console.error("selection or text is not defined");return}n==null&&(n=t.node().getBBox().width/2);function a(d){let p;return i?p=d.split(""):p=d.split(/\s+/g),p[p.length-1]||p.pop(),p[0]||p.shift(),p}function s(d,p){return d&&p&&d.length>p&&(d=d.substring(0,p)+"..."),d}function u(d){var g;const p=document.createElement("canvas").getContext("2d");return((g=p==null?void 0:p.measureText(d))==null?void 0:g.width)??0}function c(d){const p=u(d.trim());return Math.sqrt(p*r)}function l(d,p){let g={width:0,text:""},m=1/0;const y=[];let v=" ";i&&(v="");for(let x=0,b=d.length;x<b;++x){const w=(g.text?g.text+v:"")+d[x],$=u(w);(m+$)/2<p?(g.width=m=$,g.text=w):(m=u(d[x]),g={width:m,text:d[x]},y.push(g))}return y}function h(d){let p=0;for(let g=0,m=d.length;g<m;++g){const y=(Math.abs(g-m/2+.5)+.5)*r,v=d[g].width/2;p=Math.max(p,Math.sqrt(v**2+y**2))}return p}function f(d,p){o>0&&(p=s(p,o));const g=a(p),m=c(p),y=l(g,m),v=h(y);let x=d.select("text");x.size()||(x=d.append("text")),x.attr("transform",`translate(0,0) scale(${n/v})`);const b=x.selectAll("tspan").data(y),w=b.enter().append("tspan").attr("x",0).merge(b).attr("y",($,A)=>(A-y.length/2+.8)*r).text($=>$.text);return b.exit().remove(),b.merge(w)}return f(t,e)}let sr;function ZI(t,e){return R1().velocityDecay(e.force.velocityDecay).force("collision",k1().radius(n=>n.r+e.force.collisionSpacing)).force("charge",N1().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function KI({data:t,bubbleGroupR:e,maxValue:n,avgValue:r}){const i=e/Math.sqrt(t.length),a=i*i*Math.PI/r,s=n*a;return Math.pow(s/Math.PI,.5)*.75}function QI({data:t,LastBubbleDataMap:e,graphicWidth:n,graphicHeight:r,scaleType:i}){const o=Math.min(n,r)/2,a=t.flat().filter(d=>d.value!=null&&d.visible!=!1),s=Math.max(...a.map(d=>d.value)),u=a.reduce((d,p)=>d+(p.value??0),0)/a.length,c=KI({data:a,bubbleGroupR:o,maxValue:s,avgValue:u}),l=i==="area"?.5:1,h=tu().domain([0,s]).range([0,c]).exponent(l);return a.map(d=>{const p=d,g=e.get(d.id);g?(p.x=g.x,p.y=g.y):(p.x=Math.random()*n,p.y=Math.random()*r);const m=h(p.value??0);return p.r=m,p._originR=m,p})}function ax({graphicSelection:t,bubblesData:e,fullParams:n}){let r=t.selectAll("g").data(e,a=>a.id),i=r.enter().append("g").attr("cursor","pointer");i.style("font-size",12).style("fill","#ffffff").attr("text-anchor","middle").attr("transform",a=>`translate(${a.x},${a.y})`),i.append("circle").attr("class","node").attr("cx",0).attr("cy",0).attr("fill",a=>a.color),i.append("text").style("opacity",.8).attr("pointer-events","none"),r.exit().remove();const o=r.merge(i);return o.select("circle").transition().duration(200).attr("r",a=>a.r).attr("fill",a=>a.color),o.each((a,s,u)=>{const c=V(u[s]);let l=!0;a.label.length<=n.bubbleText.lineLengthMin&&(l=!1),c.call(VI,{text:a.label,radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:l})}),o}function JI({data:t,highlightRIncrease:e,highlightIds:n}){if(e!=0){if(!n.length){t.forEach(r=>r.r=r._originR);return}t.forEach(r=>{n.includes(r.id)?r.r=r._originR+e:r.r=r._originR})}}function tR(){return Vg().on("start",(t,e)=>{t.active||sr.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||sr.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function sx({fullParams:t,graphicWidth:e,graphicHeight:n}){sr.force("x",F1().strength(t.force.strength).x(0)).force("y",G1().strength(t.force.strength).y(0)),sr.alpha(1).restart()}function eR({bubblesSelection:t,highlightIds:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1);return}t.each((r,i,o)=>{const a=V(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(Qa).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const nR=Di("Bubbles",ex)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=t.append("g"),a=new rt;let s=new Map;n.layout$.pipe(hi()).subscribe(h=>{t.attr("transform",`translate(${h.width/2}, ${h.height/2})`),n.layout$.pipe(F(i)).subscribe(f=>{t.transition().attr("transform",`translate(${f.width/2}, ${f.height/2})`)})});const u=n.fullParams$.pipe(F(i),U(h=>h.bubbleScaleType),ft()),c=new lt(h=>{H({layout:n.layout$,computedData:n.computedData$,scaleType:u}).pipe(F(i),B(async f=>f)).subscribe(f=>{const d=QI({data:f.computedData,LastBubbleDataMap:s,graphicWidth:f.layout.width,graphicHeight:f.layout.height,scaleType:f.scaleType});h.next(d)})});c.subscribe(h=>{s=new Map(h.map(f=>[f.id,f]))});const l=n.fullChartParams$.pipe(F(i),U(h=>h.highlightTarget),ft());return H({layout:n.layout$,computedData:n.computedData$,bubblesData:c,SeriesDataMap:n.SeriesDataMap$,fullParams:n.fullParams$,highlightTarget:l}).pipe(F(i),B(async h=>h)).subscribe(h=>{const f=ax({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams});sr=ZI(f,h.fullParams),f.on("mouseover",(d,p)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).on("mousemove",(d,p)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).on("mouseout",(d,p)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).on("click",(d,p)=>{r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).call(tR()),sr.nodes(h.bubblesData),sx({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),a.next(f)}),H({bubblesSelection:a,bubblesData:c,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,layout:n.layout$}).pipe(F(i),B(async h=>h)).subscribe(h=>{eR({bubblesSelection:h.bubblesSelection,highlightIds:h.highlight,fullChartParams:h.fullChartParams}),h.fullParams.highlightRIncrease&&(JI({data:h.bubblesData,highlightRIncrease:h.fullParams.highlightRIncrease,highlightIds:h.highlight}),ax({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams})),sx({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),sr.nodes(h.bubblesData)}),()=>{i.next(void 0)}});function ux({computedDataSeries:t,startAngle:e,endAngle:n}){return vv().startAngle(e).endAngle(n).value(o=>o.visible==!1?0:o.value).sort((o,a)=>o.sortedIndex-a.sortedIndex)(t).map((o,a)=>{let s=o;return s.id=o.data.id,s})}const cx="Pie",rR=ot(cx,"path");function iR({enter:t,exit:e,data:n,lastData:r,fullParams:i}){return!t.size()&&!e.size()?o=>{const a=n.map((s,u)=>{const c=r[u]??{startAngle:0,endAngle:0,value:0};return{...s,startAngle:s.startAngle*o+c.startAngle*(1-o),endAngle:s.endAngle*o+c.endAngle*(1-o),value:s.value*o+c.value*(1-o)}});return Gh(a,i.startAngle,i.endAngle,1)}:o=>Gh(n,i.startAngle,i.endAngle,o)}function Gh(t,e,n,r){return t.map((i,o)=>{const a=e+(i.startAngle-e)*r,s=a+(i.endAngle-i.startAngle)*r;return{...i,startAngle:a,endAngle:s}})}function lx({selection:t,renderData:e,arc:n}){let r=t.selectAll("path").data(e,s=>s.id),i=r.enter().append("path").classed(rR,!0),o=r.exit();i.append("path");const a=r.merge(i);return a.style("cursor","pointer").attr("fill",(s,u)=>s.data.color).attr("d",(s,u)=>n(s)),o.remove(),a}function oR({pathSelection:t,ids:e,fullChartParams:n,arc:r,arcMouseover:i}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1).attr("d",o=>r(o));return}t.each((o,a,s)=>{const u=V(s[a]);e.includes(o.data.id)?u.style("opacity",1).transition("highlight").ease(Qa).duration(500).attr("d",c=>i(c)):u.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",c=>r(c))})}const aR=Di(cx,nx)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=t.append("g"),a=new rt;let s=[],u=[];n.layout$.pipe(hi()).subscribe(p=>{t.attr("transform",`translate(${p.width/2}, ${p.height/2})`),n.layout$.pipe(F(i)).subscribe(g=>{t.transition().attr("transform",`translate(${g.width/2}, ${g.height/2})`)})});const c=n.layout$.pipe(F(i),U(p=>p.width<p.height?p.width:p.height)),l=new lt(p=>{H({computedData:n.computedData$,fullParams:n.fullParams$}).pipe(F(i),B(async g=>g)).subscribe(g=>{const m=ux({computedDataSeries:g.computedData,startAngle:g.fullParams.startAngle,endAngle:g.fullParams.endAngle});p.next(m)})}),h=new lt(p=>{H({shorterSideWith:c,fullParams:n.fullParams$}).pipe(F(i),B(async g=>g)).subscribe(g=>{const m=Tu({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});p.next(m)})}),f=new lt(p=>{H({shorterSideWith:c,fullParams:n.fullParams$}).pipe(F(i),B(async g=>g)).subscribe(g=>{const m=Tu({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerMouseoverRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});p.next(m)})}),d=n.fullChartParams$.pipe(F(i),U(p=>p.highlightTarget),ft());return H({pieData:l,SeriesDataMap:n.SeriesDataMap$,arc:h,arcMouseover:f,computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:d}).pipe(F(i),B(async p=>p)).subscribe(p=>{o.interrupt("graphicMove");let g=t.selectAll("path").data(p.pieData,x=>x.data.id),m=g.enter(),y=g.exit();const v=iR({enter:m,exit:y,data:p.pieData,lastData:s,fullParams:p.fullParams});o.transition("graphicMove").duration(p.fullChartParams.transitionDuration).ease(ar(p.fullChartParams.transitionEase)).tween("move",(x,b)=>w=>{u=v(w),lx({selection:o,renderData:u,arc:p.arc}),r.event$.next({type:"series",pluginName:e,eventName:"transitionMove",event:void 0,highlightTarget:p.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:p.computedData})}).on("end",(x,b)=>{u=Gh(p.pieData,p.fullParams.startAngle,p.fullParams.endAngle,1);const w=lx({selection:o,renderData:u,arc:p.arc});a.next(w),s=Object.assign([],p.pieData),r.event$.next({type:"series",pluginName:e,eventName:"transitionEnd",event:void 0,highlightTarget:p.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:p.computedData}),w.on("mouseover",($,A)=>{$.stopPropagation(),r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:p.highlightTarget,datum:A.data,series:p.SeriesDataMap.get(A.data.seriesLabel),seriesIndex:A.data.seriesIndex,seriesLabel:A.data.seriesLabel,event:$,data:p.computedData})}).on("mousemove",($,A)=>{$.stopPropagation(),r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:p.highlightTarget,datum:A.data,series:p.SeriesDataMap.get(A.data.seriesLabel),seriesIndex:A.data.seriesIndex,seriesLabel:A.data.seriesLabel,event:$,data:p.computedData})}).on("mouseout",($,A)=>{$.stopPropagation(),r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:p.highlightTarget,datum:A.data,series:p.SeriesDataMap.get(A.data.seriesLabel),seriesIndex:A.data.seriesIndex,seriesLabel:A.data.seriesLabel,event:$,data:p.computedData})}).on("click",($,A)=>{$.stopPropagation(),r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:p.highlightTarget,datum:A.data,series:p.SeriesDataMap.get(A.data.seriesLabel),seriesIndex:A.data.seriesIndex,seriesLabel:A.data.seriesLabel,event:$,data:p.computedData})})})}),H({pathSelection:a,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,arc:h,arcMouseover:f}).pipe(F(i),B(async p=>p)).subscribe(p=>{oR({pathSelection:p.pathSelection,ids:p.highlight,fullChartParams:p.fullChartParams,arc:p.arc,arcMouseover:p.arcMouseover})}),()=>{i.next(void 0)}}),fx="PieEventTexts",hx=ot(fx,"text");function zh(t,e){const n=t.selectAll(`text.${hx}`).data(e),r=n.enter().append("text").classed(hx,!0),i=n.merge(r);return i.each((o,a,s)=>{const u=V(s[a]).text(o.text);Object.keys(o.attr).forEach(c=>{u.attr(c,o.attr[c])}),Object.keys(o.style).forEach(c=>{u.style(c,o.style[c])})}),n.exit().remove(),i}function Oh({eventData:t,eventName:e,t:n,eventFn:r,textAttrs:i,textStyles:o}){return r(t,e,n).map((s,u)=>({text:s,attr:i[u],style:o[u]}))}const sR=Di(fx,rx)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=t.append("g");let a;n.layout$.pipe(hi()).subscribe(u=>{t.attr("transform",`translate(${u.width/2}, ${u.height/2})`),n.layout$.pipe(F(i)).subscribe(c=>{t.transition().attr("transform",`translate(${c.width/2}, ${c.height/2})`)})});const s=n.fullChartParams$.pipe(F(i),U(u=>u.highlightTarget),ft());return H({computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:s}).pipe(F(i),B(async u=>u)).subscribe(u=>{o.transition().duration(u.fullChartParams.transitionDuration).ease(ar(u.fullChartParams.transitionEase)).tween("move",(c,l)=>h=>{const f=Oh({eventData:{type:"series",pluginName:e,eventName:"transitionMove",event:c,highlightTarget:u.highlightTarget,data:u.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:h,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});zh(o,f)}).on("end",(c,l)=>{const h=Oh({eventData:{type:"series",pluginName:e,eventName:"transitionEnd",event:c,highlightTarget:u.highlightTarget,data:u.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:1,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});zh(o,h),a&&a.unsubscribe(),a=r.event$.subscribe(f=>{const d=Oh({eventData:f,eventName:f.eventName,t:1,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});zh(o,d)})})}),()=>{i.next(void 0)}}),dx="PieLabels",uR=ot(dx,"text");function cR(t,e,n,r){return t.map((i,o)=>{const[a,s]=e.centroid(i),[u,c]=n.centroid(i);return{pieDatum:i,arcIndex:o,arcLabel:i.data.label,x:a*r,y:s*r,mouseoverX:u*r,mouseoverY:c*r}}).filter(i=>i.pieDatum.data.visible)}function lR(t,e,n,r){let i=t.selectAll("text").data(e,u=>u.pieDatum.id),o=i.enter().append("text").classed(uR,!0),a=i.exit();o.append("text");const s=i.merge(o);return s.attr("font-weight","bold").attr("text-anchor","middle").style("dominant-baseline","middle").style("cursor",u=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").text(u=>n.labelFn(u.pieDatum.data)).attr("font-size",r.styles.textSize).attr("fill",(u,c)=>$h({datum:u.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",u=>"translate("+u.x+","+u.y+")"),a.remove(),s}function fR({labelSelection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition().duration(200).attr("transform",r=>"translate("+r.x+","+r.y+")").style("opacity",1);return}t.each((r,i,o)=>{const a=V(o[i]);e.includes(r.pieDatum.id)?a.style("opacity",1).transition().duration(200).attr("transform",s=>"translate("+s.mouseoverX+","+s.mouseoverY+")"):a.style("opacity",n.styles.unhighlightedOpacity).transition().duration(200).attr("transform",s=>"translate("+s.x+","+s.y+")")})}const hR=Di(dx,ix)(({selection:t,observer:e,subject:n})=>{const r=new rt,i=t.append("g");let o=new rt,a=[];return e.layout$.pipe(hi()).subscribe(s=>{t.attr("transform",`translate(${s.width/2}, ${s.height/2})`),e.layout$.pipe(F(r)).subscribe(u=>{t.transition().attr("transform",`translate(${u.width/2}, ${u.height/2})`)})}),H({layout:e.layout$,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(F(r),B(async s=>s)).subscribe(s=>{const u=s.layout.width<s.layout.height?s.layout.width:s.layout.height,c=Tu({axisWidth:u,innerRadius:0,outerRadius:s.fullParams.outerRadius,padAngle:0,cornerRadius:0}),l=Tu({axisWidth:u,innerRadius:0,outerRadius:s.fullParams.outerMouseoverRadius,padAngle:0,cornerRadius:0}),h=ux({computedDataSeries:s.computedData,startAngle:s.fullParams.startAngle,endAngle:s.fullParams.endAngle});a=cR(h,c,l,s.fullParams.labelCentroid);const f=lR(i,a,s.fullParams,s.fullChartParams);o.next(f)}),H({labelSelection:o,highlight:e.seriesHighlight$,fullChartParams:e.fullChartParams$}).pipe(F(r),B(async s=>s)).subscribe(s=>{fR({labelSelection:s.labelSelection,ids:s.highlight,fullChartParams:s.fullChartParams})}),()=>{r.next(void 0)}}),px="SeriesLegend",dR=Di(px,ox)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new rt,o=n.SeriesDataMap$.pipe(F(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(F(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Pu(px,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}}),gx={paddingInner:2,paddingOuter:2,labelColorType:"primary",squarifyRatio:1.618034,sort:(t,e)=>e.value-t.value},mx={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},yx="TreeLegend",pR=ug(yx,mx)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new rt,o=n.CategoryDataMap$.pipe(F(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(F(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Pu(yx,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}}),ur="TreeMap",bx=ot(ur,"tree"),vx=ot(ur,"tile");function gR({selection:t,treeData:e,fullParams:n,fullChartParams:r}){const i=r.styles.textSize/2,o=t.selectAll(`g.${bx}`).data(e,a=>a.data.id).join("g").attr("class",bx);return o.attr("transform",a=>!a.x0||!a.y0?null:`translate(${a.x0},${a.y0})`).each((a,s,u)=>{const c=V(u[s]);c.selectAll(`rect.${vx}`).data([a],l=>l.data.id).join("rect").attr("id",l=>l.data.id).attr("class",vx).attr("cursor","pointer").attr("width",l=>l.x1-l.x0).attr("height",l=>l.y1-l.y0).attr("fill",l=>l.data.color).attr("data-name",l=>l.data.label).attr("data-category",l=>l.data.categoryLabel).attr("data-value",l=>l.data.value),c.selectAll("g").data([a]).join("g").each((l,h,f)=>{V(f[h]).selectAll("text").data([l]).join("text").text(p=>p.data.label).attr("dominant-baseline","hanging").attr("x",i).attr("y",i).attr("font-size",r.styles.textSize).each(function(p){const g=V(this),m=p.data.label.split(/\s+/).reverse();let y,v=[];const x=r.styles.textSize,b=g.attr("x");let w=g.attr("y"),$=0,A=g.text(null).append("tspan").attr("cursor","pointer").attr("fill",Et(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",b).attr("y",w);for(;y=m.pop();)v.push(y),A.text(v.join(" ")),A.node().getComputedTextLength()>p.x1-p.x0-i&&(v.pop(),A.text(v.join(" ")),v=[y],$+=x,A=g.append("tspan").attr("cursor","pointer").attr("fill",Et(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",b).attr("y",w).attr("dy",$+"px").text(y))})})}),o}function mR({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.data.id)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const yR=ug(ur,gx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=H({layout:r.layout$,visibleComputedData:r.visibleComputedData$,fullParams:r.fullParams$,fullDataFormatter:r.fullDataFormatter$,fullChartParams:r.fullChartParams$}).pipe(F(i),B(async u=>u),U(u=>{const c=Py().size([u.layout.width,u.layout.height]).paddingInner(u.fullParams.paddingInner).paddingOuter(u.fullParams.paddingOuter).round(!0).tile(Ff.ratio(u.fullParams.squarifyRatio)),l=qs(u.visibleComputedData).sum(f=>f.value).sort(u.fullParams.sort);return c(l),l.leaves()})),a=H({selection:li(t),treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$}).pipe(F(i),B(async u=>u),U(u=>gR({selection:t,treeData:u.treeData,fullParams:u.fullParams,fullChartParams:u.fullChartParams}))),s=r.fullChartParams$.pipe(F(i),U(u=>u.highlightTarget),ft());return H({cellSelection:a,computedData:r.computedData$,treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,highlightTarget:s,CategoryDataMap:r.CategoryDataMap$}).pipe(F(i),B(async u=>u)).subscribe(u=>{u.cellSelection.on("mouseover",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseover",pluginName:ur,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("mousemove",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mousemove",pluginName:ur,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("mouseout",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseout",pluginName:ur,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("click",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"click",pluginName:ur,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})})}),H({cellSelection:a,highlight:r.treeHighlight$,fullChartParams:r.fullChartParams$}).pipe(F(i),B(async u=>u)).subscribe(u=>{mR({selection:u.cellSelection,ids:u.highlight,fullChartParams:u.fullChartParams})}),()=>{i.next(void 0)}});Z.BarStack=nI,Z.Bars=jC,Z.BarsDiverging=VC,Z.BarsTriangle=lI,Z.Bubbles=nR,Z.CONTAINER_PLUGIN_PARAMS=Q2,Z.Container=WI,Z.DEFAULT_BARS_DIVERGING_PARAMS=xx,Z.DEFAULT_BARS_PARAMS=Fo,Z.DEFAULT_BARS_TRIANGLE_PARAMS=Hh,Z.DEFAULT_BAR_STACK_PARAMS=Wh,Z.DEFAULT_BUBBLES_PARAMS=ex,Z.DEFAULT_DOTS_PARAMS=Bh,Z.DEFAULT_GRID_LEGEND_PARAMS=Vh,Z.DEFAULT_GROUP_AREA_PARAMS=Yh,Z.DEFAULT_GROUP_AXIS_PARAMS=qh,Z.DEFAULT_LINES_PARAMS=cr,Z.DEFAULT_LINE_AREAS_PARAMS=Uh,Z.DEFAULT_MULTI_BARS_PARAMS=N2,Z.DEFAULT_MULTI_BARS_TRIANGLE_PARAMS=G2,Z.DEFAULT_MULTI_BAR_STACK_PARAMS=F2,Z.DEFAULT_MULTI_DOTS_PARAMS=O2,Z.DEFAULT_MULTI_GRID_LEGEND_PARAMS=C2,Z.DEFAULT_MULTI_GROUP_AXIS_PARAMS=I2,Z.DEFAULT_MULTI_LINES_PARAMS=z2,Z.DEFAULT_MULTI_VALUE_AXIS_PARAMS=R2,Z.DEFAULT_OVERLAPPING_VALUE_AXES_PARAMS=U2,Z.DEFAULT_PIE_EVENT_TEXTS_PARAMS=rx,Z.DEFAULT_PIE_LABELS_PARAMS=ix,Z.DEFAULT_PIE_PARAMS=nx,Z.DEFAULT_SCALING_AREA_PARAMS=jh,Z.DEFAULT_SERIES_LEGEND_PARAMS=ox,Z.DEFAULT_TREE_LEGEND_PARAMS=mx,Z.DEFAULT_TREE_MAP_PARAMS=gx,Z.DEFAULT_VALUE_AXIS_PARAMS=Lu,Z.DEFAULT_VALUE_STACK_AXIS_PARAMS=Xh,Z.Dots=pI,Z.GridLegend=mI,Z.GroupAux=EI,Z.GroupAxis=bI,Z.LineAreas=UC,Z.Lines=CC,Z.MultiBarStack=II,Z.MultiBars=CI,Z.MultiBarsTriangle=RI,Z.MultiDots=FI,Z.MultiGridLegend=kI,Z.MultiGroupAxis=GI,Z.MultiLines=NI,Z.MultiValueAxis=zI,Z.OverlappingValueAxes=YI,Z.Pie=aR,Z.PieEventTexts=sR,Z.PieLabels=hR,Z.ScalingArea=$I,Z.SeriesLegend=dR,Z.TOOLTIP_PARAMS=J2,Z.Tooltip=jI,Z.TreeLegend=pR,Z.TreeMap=yR,Z.ValueAxis=xI,Z.ValueStackAxis=_I,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});