@orbcharts/plugins-basic 3.0.0-alpha.37 → 3.0.0-alpha.38

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. package/dist/orbcharts-plugins-basic/src/index.d.ts +5 -0
  2. package/dist/orbcharts-plugins-basic/src/tree/defaults.d.ts +4 -0
  3. package/dist/orbcharts-plugins-basic/src/tree/index.d.ts +4 -0
  4. package/dist/orbcharts-plugins-basic/src/tree/plugins/TreeLegend.d.ts +1 -0
  5. package/dist/orbcharts-plugins-basic/src/tree/plugins/TreeMap.d.ts +3 -0
  6. package/dist/orbcharts-plugins-basic/src/tree/types.d.ts +21 -0
  7. package/dist/orbcharts-plugins-basic.es.js +5769 -5579
  8. package/dist/orbcharts-plugins-basic.umd.js +7 -7
  9. package/dist/src/index.d.ts +1 -4
  10. package/package.json +2 -2
  11. package/src/index.ts +2 -1
  12. package/src/tree/defaults.ts +21 -0
  13. package/src/tree/index.ts +4 -0
  14. package/src/tree/plugins/TreeLegend.ts +58 -0
  15. package/src/tree/plugins/TreeMap.ts +298 -0
  16. package/src/tree/types.ts +23 -0
  17. package/dist/src/tree/index.d.ts +0 -0
  18. package/dist/src/tree/plugins/TreeMap.d.ts +0 -0
  19. /package/dist/{src → orbcharts-plugins-basic/src}/base/BaseBarStack.d.ts +0 -0
  20. /package/dist/{src → orbcharts-plugins-basic/src}/base/BaseBars.d.ts +0 -0
  21. /package/dist/{src → orbcharts-plugins-basic/src}/base/BaseBarsTriangle.d.ts +0 -0
  22. /package/dist/{src → orbcharts-plugins-basic/src}/base/BaseDots.d.ts +0 -0
  23. /package/dist/{src → orbcharts-plugins-basic/src}/base/BaseGroupArea.d.ts +0 -0
  24. /package/dist/{src → orbcharts-plugins-basic/src}/base/BaseGroupAxis.d.ts +0 -0
  25. /package/dist/{src → orbcharts-plugins-basic/src}/base/BaseLegend.d.ts +0 -0
  26. /package/dist/{src → orbcharts-plugins-basic/src}/base/BaseLines.d.ts +0 -0
  27. /package/dist/{src → orbcharts-plugins-basic/src}/base/BaseValueAxis.d.ts +0 -0
  28. /package/dist/{src → orbcharts-plugins-basic/src}/base/types.d.ts +0 -0
  29. /package/dist/{src → orbcharts-plugins-basic/src}/grid/defaults.d.ts +0 -0
  30. /package/dist/{src → orbcharts-plugins-basic/src}/grid/gridObservables.d.ts +0 -0
  31. /package/dist/{src → orbcharts-plugins-basic/src}/grid/index.d.ts +0 -0
  32. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/BarStack.d.ts +0 -0
  33. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/Bars.d.ts +0 -0
  34. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/BarsDiverging.d.ts +0 -0
  35. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/BarsTriangle.d.ts +0 -0
  36. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/Dots.d.ts +0 -0
  37. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/GridLegend.d.ts +0 -0
  38. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/GroupAux.d.ts +0 -0
  39. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/GroupAxis.d.ts +0 -0
  40. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/Lines.d.ts +0 -0
  41. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/Ranking.d.ts +0 -0
  42. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/RankingAxis.d.ts +0 -0
  43. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/ScalingArea.d.ts +0 -0
  44. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/ValueAxis.d.ts +0 -0
  45. /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/ValueStackAxis.d.ts +0 -0
  46. /package/dist/{src → orbcharts-plugins-basic/src}/grid/types.d.ts +0 -0
  47. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/defaults.d.ts +0 -0
  48. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/index.d.ts +0 -0
  49. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/multiGridObservables.d.ts +0 -0
  50. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiBarStack.d.ts +0 -0
  51. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiBars.d.ts +0 -0
  52. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiBarsTriangle.d.ts +0 -0
  53. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiDots.d.ts +0 -0
  54. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiGridLegend.d.ts +0 -0
  55. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiGroupAxis.d.ts +0 -0
  56. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiLines.d.ts +0 -0
  57. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiValueAxis.d.ts +0 -0
  58. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/OverlappingValueAxes.d.ts +0 -0
  59. /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/types.d.ts +0 -0
  60. /package/dist/{src → orbcharts-plugins-basic/src}/multiValue/index.d.ts +0 -0
  61. /package/dist/{src → orbcharts-plugins-basic/src}/multiValue/plugins/Scatter.d.ts +0 -0
  62. /package/dist/{src → orbcharts-plugins-basic/src}/multiValue/plugins/ScatterAxes.d.ts +0 -0
  63. /package/dist/{src → orbcharts-plugins-basic/src}/noneData/defaults.d.ts +0 -0
  64. /package/dist/{src → orbcharts-plugins-basic/src}/noneData/index.d.ts +0 -0
  65. /package/dist/{src → orbcharts-plugins-basic/src}/noneData/plugins/Container.d.ts +0 -0
  66. /package/dist/{src → orbcharts-plugins-basic/src}/noneData/plugins/Tooltip.d.ts +0 -0
  67. /package/dist/{src → orbcharts-plugins-basic/src}/noneData/types.d.ts +0 -0
  68. /package/dist/{src → orbcharts-plugins-basic/src}/relationship/index.d.ts +0 -0
  69. /package/dist/{src → orbcharts-plugins-basic/src}/relationship/plugins/Relationship.d.ts +0 -0
  70. /package/dist/{src → orbcharts-plugins-basic/src}/series/defaults.d.ts +0 -0
  71. /package/dist/{src → orbcharts-plugins-basic/src}/series/index.d.ts +0 -0
  72. /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/Bubbles.d.ts +0 -0
  73. /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/Pie.d.ts +0 -0
  74. /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/PieEventTexts.d.ts +0 -0
  75. /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/PieLabels.d.ts +0 -0
  76. /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/SeriesLegend.d.ts +0 -0
  77. /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/Waffle.d.ts +0 -0
  78. /package/dist/{src → orbcharts-plugins-basic/src}/series/seriesUtils.d.ts +0 -0
  79. /package/dist/{src → orbcharts-plugins-basic/src}/series/types.d.ts +0 -0
  80. /package/dist/{src → orbcharts-plugins-basic/src}/utils/commonUtils.d.ts +0 -0
  81. /package/dist/{src → orbcharts-plugins-basic/src}/utils/d3Graphics.d.ts +0 -0
  82. /package/dist/{src → orbcharts-plugins-basic/src}/utils/d3Utils.d.ts +0 -0
  83. /package/dist/{src → orbcharts-plugins-basic/src}/utils/observables.d.ts +0 -0
  84. /package/dist/{src → orbcharts-plugins-basic/src}/utils/orbchartsUtils.d.ts +0 -0
  85. /package/dist/{vite.config.d.ts → orbcharts-plugins-basic/vite.config.d.ts} +0 -0
@@ -1,12 +1,12 @@
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},Nh={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1},Fh={showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>t,labelPadding:24},Co={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},cx={...Co},Gh={barWidth:0,barGroupPadding:10,barRadius:!1},zh={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},Oh={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"},Tu={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"},Uh=Tu,Bh={},Yh={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0};var Pu=function(t,e){return Pu=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])},Pu(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");Pu(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function lx(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 Wh(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 ai(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 fx(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 hx(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 Du(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 Eu=Du(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
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:
2
2
  `+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
3
- `):"",this.name="UnsubscriptionError",this.errors=n}});function ku(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Ro=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 Eu?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{Xh(p)}catch(g){o=o??[],g instanceof Eu?o=ai(ai([],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 Eu(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Xh(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)&&ku(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&ku(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Hh=Ro.EMPTY;function qh(t){return t instanceof Ro||t&&"closed"in t&&mt(t.remove)&&mt(t.add)&&mt(t.unsubscribe)}function Xh(t){mt(t)?t():t.unsubscribe()}var Vh={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},jh={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,ai([t,e],cr(n)))},clearTimeout:function(t){var e=jh.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function Zh(t){jh.setTimeout(function(){throw t})}function Lu(){}function Io(t){t()}var Cu=function(t){sr(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=mx,r}return e.create=function(n,r,i){return new si(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Ro),dx=Function.prototype.bind;function Ru(t,e){return dx.call(t,e)}var px=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){No(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){No(r)}else No(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){No(n)}},t}(),si=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&&Vh.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Ru(n.next,s),error:n.error&&Ru(n.error,s),complete:n.complete&&Ru(n.complete,s)}):a=n}return o.destination=new px(a),o}return e}(Cu);function No(t){Zh(t)}function gx(t){throw t}var mx={closed:!0,next:Lu,error:gx,complete:Lu},Iu=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function fr(t){return t}function yx(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=vx(e)?e:new si(e,n,r);return Io(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=Kh(n),new n(function(i,o){var a=new si({next:function(s){try{e(s)}catch(u){o(u),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[Iu]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return yx(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Kh(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 Kh(t){var e;return(e=t??Vh.Promise)!==null&&e!==void 0?e:Promise}function bx(t){return t&&mt(t.next)&&mt(t.error)&&mt(t.complete)}function vx(t){return t&&t instanceof Cu||bx(t)&&qh(t)}function xx(t){return mt(t==null?void 0:t.lift)}function ce(t){return function(e){if(xx(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 _x(t,e,n,r,i)}var _x=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}(Cu),wx=Du(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),it=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 Qh(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new wx},e.prototype.next=function(n){var r=this;Io(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;Io(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;Io(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?Hh:(this.currentObservers=null,s.push(n),new Ro(function(){r.currentObservers=null,ku(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 Qh(n,r)},e}(lt),Qh=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:Hh},e}(it),Jh={now:function(){return(Jh.delegate||Date).now()},delegate:void 0},$x=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=Jh);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}(it),t0=new lt(function(t){return t.complete()});function Sx(t){return t&&mt(t.schedule)}function Nu(t){return t[t.length-1]}function Ax(t){return mt(Nu(t))?t.pop():void 0}function Fu(t){return Sx(Nu(t))?t.pop():void 0}function Mx(t,e){return typeof Nu(t)=="number"?t.pop():e}var Gu=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function e0(t){return mt(t==null?void 0:t.then)}function n0(t){return mt(t[Iu])}function r0(t){return Symbol.asyncIterator&&mt(t==null?void 0:t[Symbol.asyncIterator])}function i0(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 Tx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var o0=Tx();function a0(t){return mt(t==null?void 0:t[o0])}function s0(t){return fx(this,arguments,function(){var n,r,i,o;return Wh(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 u0(t){return mt(t==null?void 0:t.getReader)}function le(t){if(t instanceof lt)return t;if(t!=null){if(n0(t))return Px(t);if(Gu(t))return Dx(t);if(e0(t))return Ex(t);if(r0(t))return c0(t);if(a0(t))return kx(t);if(u0(t))return Lx(t)}throw i0(t)}function Px(t){return new lt(function(e){var n=t[Iu]();if(mt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Dx(t){return new lt(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Ex(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,Zh)})}function kx(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 c0(t){return new lt(function(e){Cx(t,e).catch(function(n){return e.error(n)})})}function Lx(t){return c0(s0(t))}function Cx(t,e){var n,r,i,o;return lx(this,void 0,void 0,function(){var a,s;return Wh(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=hx(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 l0(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 f0(t,e){return e===void 0&&(e=0),ce(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Rx(t,e){return le(t).pipe(f0(e),l0(e))}function Ix(t,e){return le(t).pipe(f0(e),l0(e))}function Nx(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 Fx(t,e){return new lt(function(n){var r;return un(n,e,function(){r=t[o0](),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 h0(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 Gx(t,e){return h0(s0(t),e)}function zx(t,e){if(t!=null){if(n0(t))return Rx(t,e);if(Gu(t))return Nx(t,e);if(e0(t))return Ix(t,e);if(r0(t))return h0(t,e);if(a0(t))return Fx(t,e);if(u0(t))return Gx(t,e)}throw i0(t)}function Fo(t,e){return e?zx(t,e):le(t)}function Go(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Fu(t);return Fo(t,n)}var d0=Du(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function B(t,e){return ce(function(n,r){var i=0;n.subscribe(oe(r,function(o){r.next(t.call(e,o,i++))}))})}var Ox=Array.isArray;function Ux(t,e){return Ox(e)?t.apply(void 0,ai([],cr(e))):t(e)}function p0(t){return B(function(e){return Ux(t,e)})}var Bx=Array.isArray,Yx=Object.getPrototypeOf,Wx=Object.prototype,Hx=Object.keys;function qx(t){if(t.length===1){var e=t[0];if(Bx(e))return{args:e,keys:null};if(Xx(e)){var n=Hx(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function Xx(t){return t&&typeof t=="object"&&Yx(t)===Wx}function Vx(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=Fu(t),r=Ax(t),i=qx(t),o=i.args,a=i.keys;if(o.length===0)return Fo([],n);var s=new lt(jx(o,n,a?function(u){return Vx(a,u)}:fr));return r?s.pipe(p0(r)):s}function jx(t,e,n){return n===void 0&&(n=fr),function(r){g0(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,u=function(l){g0(e,function(){var h=Fo(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 g0(t,e,n){t?un(n,t,e):e()}function Zx(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 zu(t,e,n){return n===void 0&&(n=1/0),mt(e)?zu(function(r,i){return B(function(o,a){return e(r,o,i,a)})(le(t(r,i)))},n):(typeof e=="number"&&(n=e),ce(function(r,i){return Zx(r,i,t,n)}))}function Kx(t){return t===void 0&&(t=1/0),zu(fr,t)}function Qx(t){return new lt(function(e){le(t()).subscribe(e)})}var Jx=["addListener","removeListener"],t_=["addEventListener","removeEventListener"],e_=["on","off"];function Ou(t,e,n,r){if(mt(n)&&(r=n,n=void 0),r)return Ou(t,e,n).pipe(p0(r));var i=cr(i_(t)?t_.map(function(s){return function(u){return t[s](e,u,n)}}):n_(t)?Jx.map(m0(t,e)):r_(t)?e_.map(m0(t,e)):[],2),o=i[0],a=i[1];if(!o&&Gu(t))return zu(function(s){return Ou(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 m0(t,e){return function(n){return function(r){return t[n](e,r)}}}function n_(t){return mt(t.addListener)&&mt(t.removeListener)}function r_(t){return mt(t.on)&&mt(t.off)}function i_(t){return mt(t.addEventListener)&&mt(t.removeEventListener)}function y0(t,e,n){return Qx(function(){return t()?e:n})}function Uu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Fu(t),r=Mx(t,1/0),i=t;return i.length?i.length===1?le(i[0]):Kx(r)(Fo(i,n)):t0}function zo(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 o_(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 a_(t){return t<=0?function(){return t0}:ce(function(e,n){var r=0;e.subscribe(oe(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function dt(t,e){return e===void 0&&(e=fr),t=t??s_,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 s_(t,e){return t===e}function u_(t){return t===void 0&&(t=c_),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 c_(){return new d0}function ui(t,e){var n=arguments.length>=2;return function(r){return r.pipe(fr,a_(1),n?o_(e):u_(function(){return new d0}))}}function l_(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new it}: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=Bu(x,u))}),$.subscribe(b),!l&&d>0&&(l=new si({next:function(w){return $.next(w)},error:function(w){g=!0,m(),h=Bu(y,i,w),$.error(w)},complete:function(){p=!0,m(),h=Bu(y,a),$.complete()}}),le(v).subscribe(l))})(c)}}function Bu(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new si({next:function(){i.unsubscribe(),t()}});return le(e.apply(void 0,ai([],cr(n)))).subscribe(i)}}function Ye(t,e,n){var r,i=!1;return r=t,l_({connector:function(){return new $x(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function U(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 G(t){return ce(function(e,n){le(t).subscribe(oe(n,function(){return n.complete()},Lu)),!n.closed&&e.subscribe(n)})}const hr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function Oo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function f_(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function b0(t){let e,n,r;t.length!==2?(e=Oo,n=(s,u)=>Oo(t(s),u),r=(s,u)=>t(s)-u):(e=t===Oo||t===f_?t:h_,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 h_(){return 0}function d_(t){return t===null?NaN:+t}const p_=b0(Oo),v0=p_.right;b0(d_).center;class x0 extends Map{constructor(e,n=y_){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(_0(this,e))}has(e){return super.has(_0(this,e))}set(e,n){return super.set(g_(this,e),n)}delete(e){return super.delete(m_(this,e))}}function _0({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function g_({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function m_({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function y_(t){return t!==null&&typeof t=="object"?t.valueOf():t}const b_=Math.sqrt(50),v_=Math.sqrt(10),x_=Math.sqrt(2);function Uo(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=b_?10:o>=v_?5:o>=x_?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),u=Math.round(e*c),s/c<t&&++s,u/c>e&&--u,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),u=Math.round(e/c),s*c<t&&++s,u*c>e&&--u),u<s&&.5<=n&&n<2?Uo(t,e,n*2):[s,u,c]}function __(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?Uo(e,t,n):Uo(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)u[c]=(o-c)/-a;else for(let c=0;c<s;++c)u[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)u[c]=(i+c)/-a;else for(let c=0;c<s;++c)u[c]=(i+c)*a;return u}function Yu(t,e,n){return e=+e,t=+t,n=+n,Uo(t,e,n)[2]}function w_(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Yu(e,t,n):Yu(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function $_(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 S_={value:()=>{}};function w0(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Bo(n)}function Bo(t){this._=t}function A_(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Bo.prototype=w0.prototype={constructor:Bo,on:function(t,e){var n=this._,r=A_(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=M_(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]=$0(n[i],t.name,e);else if(e==null)for(i in n)n[i]=$0(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Bo(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function M_(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function $0(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=S_,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Wu="http://www.w3.org/1999/xhtml";const S0={svg:"http://www.w3.org/2000/svg",xhtml:Wu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Yo(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),S0.hasOwnProperty(e)?{space:S0[e],local:t}:t}function T_(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Wu&&e.documentElement.namespaceURI===Wu?e.createElement(t):e.createElementNS(n,t)}}function P_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function A0(t){var e=Yo(t);return(e.local?P_:T_)(e)}function D_(){}function Hu(t){return t==null?D_:function(){return this.querySelector(t)}}function E_(t){typeof t!="function"&&(t=Hu(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 k_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function L_(){return[]}function M0(t){return t==null?L_:function(){return this.querySelectorAll(t)}}function C_(t){return function(){return k_(t.apply(this,arguments))}}function R_(t){typeof t=="function"?t=C_(t):t=M0(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 T0(t){return function(){return this.matches(t)}}function P0(t){return function(e){return e.matches(t)}}var I_=Array.prototype.find;function N_(t){return function(){return I_.call(this.children,t)}}function F_(){return this.firstElementChild}function G_(t){return this.select(t==null?F_:N_(typeof t=="function"?t:P0(t)))}var z_=Array.prototype.filter;function O_(){return Array.from(this.children)}function U_(t){return function(){return z_.call(this.children,t)}}function B_(t){return this.selectAll(t==null?O_:U_(typeof t=="function"?t:P0(t)))}function Y_(t){typeof t!="function"&&(t=T0(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 D0(t){return new Array(t.length)}function W_(){return new ve(this._enter||this._groups.map(D0),this._parents)}function Wo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Wo.prototype={constructor:Wo,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 H_(t){return function(){return t}}function q_(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 Wo(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function X_(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 Wo(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function V_(t){return t.__data__}function j_(t,e){if(!arguments.length)return Array.from(this,V_);var n=e?X_:q_,r=this._parents,i=this._groups;typeof t!="function"&&(t=H_(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=Z_(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 Z_(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function K_(){return new ve(this._exit||this._groups.map(D0),this._parents)}function Q_(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 J_(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 tw(){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 ew(t){t||(t=nw);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 nw(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function rw(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function iw(){return Array.from(this)}function ow(){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 aw(){let t=0;for(const e of this)++t;return t}function sw(){return!this.node()}function uw(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 cw(t){return function(){this.removeAttribute(t)}}function lw(t){return function(){this.removeAttributeNS(t.space,t.local)}}function fw(t,e){return function(){this.setAttribute(t,e)}}function hw(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function dw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function pw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function gw(t,e){var n=Yo(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?lw:cw:typeof e=="function"?n.local?pw:dw:n.local?hw:fw)(n,e))}function E0(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function mw(t){return function(){this.style.removeProperty(t)}}function yw(t,e,n){return function(){this.style.setProperty(t,e,n)}}function bw(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function vw(t,e,n){return arguments.length>1?this.each((e==null?mw:typeof e=="function"?bw:yw)(t,e,n??"")):dr(this.node(),t)}function dr(t,e){return t.style.getPropertyValue(e)||E0(t).getComputedStyle(t,null).getPropertyValue(e)}function xw(t){return function(){delete this[t]}}function _w(t,e){return function(){this[t]=e}}function ww(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function $w(t,e){return arguments.length>1?this.each((e==null?xw:typeof e=="function"?ww:_w)(t,e)):this.node()[t]}function k0(t){return t.trim().split(/^|\s+/)}function qu(t){return t.classList||new L0(t)}function L0(t){this._node=t,this._names=k0(t.getAttribute("class")||"")}L0.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 C0(t,e){for(var n=qu(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function R0(t,e){for(var n=qu(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Sw(t){return function(){C0(this,t)}}function Aw(t){return function(){R0(this,t)}}function Mw(t,e){return function(){(e.apply(this,arguments)?C0:R0)(this,t)}}function Tw(t,e){var n=k0(t+"");if(arguments.length<2){for(var r=qu(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Mw:e?Sw:Aw)(n,e))}function Pw(){this.textContent=""}function Dw(t){return function(){this.textContent=t}}function Ew(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function kw(t){return arguments.length?this.each(t==null?Pw:(typeof t=="function"?Ew:Dw)(t)):this.node().textContent}function Lw(){this.innerHTML=""}function Cw(t){return function(){this.innerHTML=t}}function Rw(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Iw(t){return arguments.length?this.each(t==null?Lw:(typeof t=="function"?Rw:Cw)(t)):this.node().innerHTML}function Nw(){this.nextSibling&&this.parentNode.appendChild(this)}function Fw(){return this.each(Nw)}function Gw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function zw(){return this.each(Gw)}function Ow(t){var e=typeof t=="function"?t:A0(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Uw(){return null}function Bw(t,e){var n=typeof t=="function"?t:A0(t),r=e==null?Uw:typeof e=="function"?e:Hu(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Yw(){var t=this.parentNode;t&&t.removeChild(this)}function Ww(){return this.each(Yw)}function Hw(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function qw(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Xw(t){return this.select(t?qw:Hw)}function Vw(t){return arguments.length?this.property("__data__",t):this.node().__data__}function jw(t){return function(e){t.call(this,e,this.__data__)}}function Zw(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 Kw(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 Qw(t,e,n){return function(){var r=this.__on,i,o=jw(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 Jw(t,e,n){var r=Zw(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?Qw:Kw,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function I0(t,e,n){var r=E0(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 t$(t,e){return function(){return I0(this,t,e)}}function e$(t,e){return function(){return I0(this,t,e.apply(this,arguments))}}function n$(t,e){return this.each((typeof e=="function"?e$:t$)(t,e))}function*r$(){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 i$=[null];function ve(t,e){this._groups=t,this._parents=e}function ci(){return new ve([[document.documentElement]],i$)}function o$(){return this}ve.prototype=ci.prototype={constructor:ve,select:E_,selectAll:R_,selectChild:G_,selectChildren:B_,filter:Y_,data:j_,enter:W_,exit:K_,join:Q_,merge:J_,selection:o$,order:tw,sort:ew,call:rw,nodes:iw,node:ow,size:aw,empty:sw,each:uw,attr:gw,style:vw,property:$w,classed:Tw,text:kw,html:Iw,raise:Fw,lower:zw,append:Ow,insert:Bw,remove:Ww,clone:Xw,datum:Vw,on:Jw,dispatch:n$,[Symbol.iterator]:r$};function Xu(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function N0(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function li(){}var fi=.7,Ho=1/fi,pr="\\s*([+-]?\\d+)\\s*",hi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ee="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",a$=/^#([0-9a-f]{3,8})$/,s$=new RegExp(`^rgb\\(${pr},${pr},${pr}\\)$`),u$=new RegExp(`^rgb\\(${Ee},${Ee},${Ee}\\)$`),c$=new RegExp(`^rgba\\(${pr},${pr},${pr},${hi}\\)$`),l$=new RegExp(`^rgba\\(${Ee},${Ee},${Ee},${hi}\\)$`),f$=new RegExp(`^hsl\\(${hi},${Ee},${Ee}\\)$`),h$=new RegExp(`^hsla\\(${hi},${Ee},${Ee},${hi}\\)$`),F0={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};Xu(li,An,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:G0,formatHex:G0,formatHex8:d$,formatHsl:p$,formatRgb:z0,toString:z0});function G0(){return this.rgb().formatHex()}function d$(){return this.rgb().formatHex8()}function p$(){return W0(this).formatHsl()}function z0(){return this.rgb().formatRgb()}function An(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=a$.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?O0(e):n===3?new ee(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?qo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?qo(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=s$.exec(t))?new ee(e[1],e[2],e[3],1):(e=u$.exec(t))?new ee(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=c$.exec(t))?qo(e[1],e[2],e[3],e[4]):(e=l$.exec(t))?qo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=f$.exec(t))?Y0(e[1],e[2]/100,e[3]/100,1):(e=h$.exec(t))?Y0(e[1],e[2]/100,e[3]/100,e[4]):F0.hasOwnProperty(t)?O0(F0[t]):t==="transparent"?new ee(NaN,NaN,NaN,0):null}function O0(t){return new ee(t>>16&255,t>>8&255,t&255,1)}function qo(t,e,n,r){return r<=0&&(t=e=n=NaN),new ee(t,e,n,r)}function g$(t){return t instanceof li||(t=An(t)),t?(t=t.rgb(),new ee(t.r,t.g,t.b,t.opacity)):new ee}function Vu(t,e,n,r){return arguments.length===1?g$(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}Xu(ee,Vu,N0(li,{brighter(t){return t=t==null?Ho:Math.pow(Ho,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?fi:Math.pow(fi,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),Xo(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:U0,formatHex:U0,formatHex8:m$,formatRgb:B0,toString:B0}));function U0(){return`#${Tn(this.r)}${Tn(this.g)}${Tn(this.b)}`}function m$(){return`#${Tn(this.r)}${Tn(this.g)}${Tn(this.b)}${Tn((isNaN(this.opacity)?1:this.opacity)*255)}`}function B0(){const t=Xo(this.opacity);return`${t===1?"rgb(":"rgba("}${Mn(this.r)}, ${Mn(this.g)}, ${Mn(this.b)}${t===1?")":`, ${t})`}`}function Xo(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 Y0(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 W0(t){if(t instanceof xe)return new xe(t.h,t.s,t.l,t.opacity);if(t instanceof li||(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 y$(t,e,n,r){return arguments.length===1?W0(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}Xu(xe,y$,N0(li,{brighter(t){return t=t==null?Ho:Math.pow(Ho,t),new xe(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?fi:Math.pow(fi,t),new xe(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ee(ju(t>=240?t-240:t+120,i,r),ju(t,i,r),ju(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new xe(H0(this.h),Vo(this.s),Vo(this.l),Xo(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=Xo(this.opacity);return`${t===1?"hsl(":"hsla("}${H0(this.h)}, ${Vo(this.s)*100}%, ${Vo(this.l)*100}%${t===1?")":`, ${t})`}`}}));function H0(t){return t=(t||0)%360,t<0?t+360:t}function Vo(t){return Math.max(0,Math.min(1,t||0))}function ju(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Zu=t=>()=>t;function b$(t,e){return function(n){return t+n*e}}function v$(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 x$(t){return(t=+t)==1?q0:function(e,n){return n-e?v$(e,n,t):Zu(isNaN(e)?n:e)}}function q0(t,e){var n=e-t;return n?b$(t,n):Zu(isNaN(t)?e:t)}const jo=function t(e){var n=x$(e);function r(i,o){var a=n((i=Vu(i)).r,(o=Vu(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=q0(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 _$(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 w$(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function $$(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]=Ju(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 S$(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 A$(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]=Ju(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Ku=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qu=new RegExp(Ku.source,"g");function M$(t){return function(){return t}}function T$(t){return function(e){return t(e)+""}}function X0(t,e){var n=Ku.lastIndex=Qu.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=Ku.exec(t))&&(i=Qu.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=Qu.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?T$(u[0].x):M$(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 Ju(t,e){var n=typeof e,r;return e==null||n==="boolean"?Zu(e):(n==="number"?_e:n==="string"?(r=An(e))?(e=r,jo):X0:e instanceof An?jo:e instanceof Date?S$:w$(e)?_$:Array.isArray(e)?$$:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?A$:_e)(t,e)}function P$(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var V0=180/Math.PI,j0={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Z0(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)*V0,skewX:Math.atan(u)*V0,scaleX:a,scaleY:s}}var Zo;function D$(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?j0:Z0(e.a,e.b,e.c,e.d,e.e,e.f)}function E$(t){return t==null||(Zo||(Zo=document.createElementNS("http://www.w3.org/2000/svg","g")),Zo.setAttribute("transform",t),!(t=Zo.transform.baseVal.consolidate()))?j0:(t=t.matrix,Z0(t.a,t.b,t.c,t.d,t.e,t.f))}function K0(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push("translate(",null,e,null,n);p.push({i:g-4,x:_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 k$=K0(D$,"px, ","px)","deg)"),L$=K0(E$,", ",")",")"),gr=0,di=0,pi=0,Q0=1e3,Ko,gi,Qo=0,Pn=0,Jo=0,mi=typeof performance=="object"&&performance.now?performance:Date,J0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function tc(){return Pn||(J0(C$),Pn=mi.now()+Jo)}function C$(){Pn=0}function ta(){this._call=this._time=this._next=null}ta.prototype=td.prototype={constructor:ta,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?tc():+n)+(e==null?0:+e),!this._next&&gi!==this&&(gi?gi._next=this:Ko=this,gi=this),this._call=t,this._time=n,ec()},stop:function(){this._call&&(this._call=null,this._time=1/0,ec())}};function td(t,e,n){var r=new ta;return r.restart(t,e,n),r}function R$(){tc(),++gr;for(var t=Ko,e;t;)(e=Pn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--gr}function ed(){Pn=(Qo=mi.now())+Jo,gr=di=0;try{R$()}finally{gr=0,N$(),Pn=0}}function I$(){var t=mi.now(),e=t-Qo;e>Q0&&(Jo-=e,Qo=t)}function N$(){for(var t,e=Ko,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Ko=n);gi=t,ec(r)}function ec(t){if(!gr){di&&(di=clearTimeout(di));var e=t-Pn;e>24?(t<1/0&&(di=setTimeout(ed,t-mi.now()-Jo)),pi&&(pi=clearInterval(pi))):(pi||(Qo=mi.now(),pi=setInterval(I$,Q0)),gr=1,J0(ed))}}function nd(t,e,n){var r=new ta;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var F$=w0("start","end","cancel","interrupt"),G$=[],rd=0,id=1,nc=2,ea=3,od=4,rc=5,na=6;function ra(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;z$(t,n,{name:e,index:r,group:i,on:F$,tween:G$,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:rd})}function ic(t,e){var n=we(t,e);if(n.state>rd)throw new Error("too late; already scheduled");return n}function ke(t,e){var n=we(t,e);if(n.state>ea)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=td(o,0,n.time);function o(c){n.state=id,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!==id)return u();for(l in r)if(d=r[l],d.name===n.name){if(d.state===ea)return nd(a);d.state===od?(d.state=na,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=na,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(nd(function(){n.state===ea&&(n.state=od,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=nc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===nc){for(n.state=ea,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=rc,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===rc&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=na,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function O$(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>nc&&r.state<rc,r.state=na,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function U$(t){return this.each(function(){O$(this,t)})}function B$(t,e){var n,r;return function(){var i=ke(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function Y$(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=ke(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function W$(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?B$:Y$)(n,t,e))}function oc(t,e,n){var r=t._id;return t.each(function(){var i=ke(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return we(i,r).value[e]}}function ad(t,e){var n;return(typeof e=="number"?_e:e instanceof An?jo:(n=An(e))?(e=n,jo):X0)(t,e)}function H$(t){return function(){this.removeAttribute(t)}}function q$(t){return function(){this.removeAttributeNS(t.space,t.local)}}function X$(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 V$(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 j$(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 Z$(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 K$(t,e){var n=Yo(t),r=n==="transform"?L$:ad;return this.attrTween(t,typeof e=="function"?(n.local?Z$:j$)(n,r,oc(this,"attr."+t,e)):e==null?(n.local?q$:H$)(n):(n.local?V$:X$)(n,r,e))}function Q$(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function J$(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function tS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&J$(t,o)),n}return i._value=e,i}function eS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Q$(t,o)),n}return i._value=e,i}function nS(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Yo(t);return this.tween(n,(r.local?tS:eS)(r,e))}function rS(t,e){return function(){ic(this,t).delay=+e.apply(this,arguments)}}function iS(t,e){return e=+e,function(){ic(this,t).delay=e}}function oS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?rS:iS)(e,t)):we(this.node(),e).delay}function aS(t,e){return function(){ke(this,t).duration=+e.apply(this,arguments)}}function sS(t,e){return e=+e,function(){ke(this,t).duration=e}}function uS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?aS:sS)(e,t)):we(this.node(),e).duration}function cS(t,e){if(typeof e!="function")throw new Error;return function(){ke(this,t).ease=e}}function lS(t){var e=this._id;return arguments.length?this.each(cS(e,t)):we(this.node(),e).ease}function fS(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;ke(this,t).ease=n}}function hS(t){if(typeof t!="function")throw new Error;return this.each(fS(this._id,t))}function dS(t){typeof t!="function"&&(t=T0(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 pS(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=e[s],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 gS(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 mS(t,e,n){var r,i,o=gS(e)?ic:ke;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function yS(t,e){var n=this._id;return arguments.length<2?we(this.node(),n).on.on(t):this.each(mS(n,t,e))}function bS(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function vS(){return this.on("end.remove",bS(this._id))}function xS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Hu(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,c=o[a]=new Array(u),l,h,f=0;f<u;++f)(l=s[f])&&(h=t.call(l,l.__data__,f,s))&&("__data__"in l&&(h.__data__=l.__data__),c[f]=h,ra(c[f],e,n,f,c,we(l,n)));return new We(o,this._parents,e,n)}function _S(t){var e=this._name,n=this._id;typeof t!="function"&&(t=M0(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])&&ra(d,e,n,g,f,p);o.push(f),a.push(l)}return new We(o,a,e,n)}var wS=ci.prototype.constructor;function $S(){return new wS(this._groups,this._parents)}function SS(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 sd(t){return function(){this.style.removeProperty(t)}}function AS(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 MS(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 TS(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=ke(this,t),c=u.on,l=u.value[o]==null?s||(s=sd(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function PS(t,e,n){var r=(t+="")=="transform"?k$:ad;return e==null?this.styleTween(t,SS(t,r)).on("end.style."+t,sd(t)):typeof e=="function"?this.styleTween(t,MS(t,r,oc(this,"style."+t,e))).each(TS(this._id,t)):this.styleTween(t,AS(t,r,e),n).on("end.style."+t,null)}function DS(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function ES(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&DS(t,a,n)),r}return o._value=e,o}function kS(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,ES(t,e,n??""))}function LS(t){return function(){this.textContent=t}}function CS(t){return function(){var e=t(this);this.textContent=e??""}}function RS(t){return this.tween("text",typeof t=="function"?CS(oc(this,"text",t)):LS(t==null?"":t+""))}function IS(t){return function(e){this.textContent=t.call(this,e)}}function NS(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&IS(i)),e}return r._value=t,r}function FS(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,NS(t))}function GS(){for(var t=this._name,e=this._id,n=ud(),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);ra(u,t,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new We(r,this._parents,t,n)}function 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=ke(this,r),l=c.on;l!==t&&(e=(t=l).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),c.on=e}),i===0&&o()})}var OS=0;function We(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function ud(){return++OS}var He=ci.prototype;We.prototype={constructor:We,select:xS,selectAll:_S,selectChild:He.selectChild,selectChildren:He.selectChildren,filter:dS,merge:pS,selection:$S,transition:GS,call:He.call,nodes:He.nodes,node:He.node,size:He.size,empty:He.empty,each:He.each,on:yS,attr:K$,attrTween:nS,style:PS,styleTween:kS,text:RS,textTween:FS,remove:vS,tween:W$,delay:oS,duration:uS,ease:lS,easeVarying:hS,end:zS,[Symbol.iterator]:He[Symbol.iterator]};function US(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var BS={time:null,delay:0,duration:250,ease:US};function YS(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 WS(t){var e,n;t instanceof We?(e=t._id,t=t._name):(e=ud(),(n=BS).time=tc(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&ra(u,t,e,c,a,n||YS(u,e));return new We(r,this._parents,t,e)}ci.prototype.interrupt=U$,ci.prototype.transition=WS;function HS(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ia(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function mr(t){return t=ia(Math.abs(t)),t?t[1]:NaN}function qS(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 XS(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var VS=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function oa(t){if(!(e=VS.exec(t)))throw new Error("invalid format: "+t);var e;return new ac({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}oa.prototype=ac.prototype;function ac(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+""}ac.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 jS(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var cd;function ZS(t,e){var n=ia(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(cd=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+ia(t,Math.max(0,e+o-1))[0]}function ld(t,e){var n=ia(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const fd={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:HS,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)=>ld(t*100,e),r:ld,s:ZS,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function hd(t){return t}var dd=Array.prototype.map,pd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function KS(t){var e=t.grouping===void 0||t.thousands===void 0?hd:qS(dd.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?hd:XS(dd.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(h){h=oa(h);var f=h.fill,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"):fd[$]||(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:"",_=fd[$],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,k,E;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=jS(A)),N&&+A==0&&p!=="+"&&(N=!1),I=(N?p==="("?p:s:p==="-"||p==="("?"":p)+I,M=($==="s"?pd[8+cd/3]:"")+M+(N&&p==="("?")":""),P){for(T=-1,k=A.length;++T<k;)if(E=A.charCodeAt(T),48>E||E>57){M=(E===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,L=O<y?new Array(y-O+1).join(f):"";switch(x&&m&&(A=e(L+A,L.length?y-M.length:1/0),L=""),d){case"<":A=I+A+M+L;break;case"=":A=I+L+A+M;break;case"^":A=L.slice(0,O=L.length>>1)+I+A+M+L.slice(O);break;default:A=L+I+A+M;break}return o(A)}return D.toString=function(){return h+""},D}function l(h,f){var d=c((h=oa(h),h.type="f",h)),p=Math.max(-8,Math.min(8,Math.floor(mr(f)/3)))*3,g=Math.pow(10,-p),m=pd[8+p/3];return function(y){return d(g*y)+m}}return{format:c,formatPrefix:l}}var aa,gd,md;QS({thousands:",",grouping:[3],currency:["$",""]});function QS(t){return aa=KS(t),gd=aa.format,md=aa.formatPrefix,aa}function JS(t){return Math.max(0,-mr(Math.abs(t)))}function t3(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(mr(e)/3)))*3-mr(Math.abs(t)))}function e3(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,mr(e)-mr(t))+1}function sa(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const yd=Symbol("implicit");function bd(){var t=new x0,e=[],n=[],r=yd;function i(o){let a=t.get(o);if(a===void 0){if(r!==yd)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 x0;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 bd(e,n).unknown(r)},sa.apply(i,arguments),i}function vd(){var t=bd().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=$_(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 vd(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},sa.apply(h(),arguments)}function xd(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return xd(e())},t}function n3(){return xd(vd.apply(null,arguments).paddingInner(1))}function r3(t){return function(){return t}}function i3(t){return+t}var _d=[0,1];function yr(t){return t}function sc(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:r3(isNaN(e)?NaN:.5)}function o3(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function a3(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=sc(i,r),o=n(a,o)):(r=sc(r,i),o=n(o,a)),function(s){return o(r(s))}}function s3(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]=sc(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=v0(t,s,1,r)-1;return o[u](i[u](s))}}function u3(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function c3(){var t=_d,e=_d,n=Ju,r,i,o,a=yr,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==yr&&(a=o3(t[0],t[f-1])),s=f>2?s3:a3,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,i3),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=P$,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 l3(){return c3()(yr,yr)}function f3(t,e,n,r){var i=w_(t,e,n),o;switch(r=oa(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=t3(i,a))&&(r.precision=o),md(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=e3(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=JS(i))&&(r.precision=o-(r.type==="%")*2);break}}return gd(r)}function wd(t){var e=t.domain;return t.ticks=function(n){var r=e();return __(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return f3(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=Yu(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 $d(){var t=l3();return t.copy=function(){return u3(t,$d())},sa.apply(t,arguments),wd(t)}function Sd(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[v0(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 Sd().domain([t,e]).range(i).unknown(o)},sa.apply(wd(a),arguments)}function yi(t,e,n){this.k=t,this.x=e,this.y=n}yi.prototype={constructor:yi,scale:function(t){return t===1?this:new yi(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new yi(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+")"}},yi.prototype;function ua(t){return Object.prototype.toString.call(t)==="[object Object]"}function uc(t,e){if(ua(t)===!1||ua(e)===!1)return Object.assign({},e);const n=(r,i)=>{const o=Object.assign({},i);for(let a of Object.keys(r)){if(!(a in i))continue;let s;ua(r[a])&&ua(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}var cc=function(t,e){return cc=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])},cc(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");cc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function h3(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 Ad(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 bi(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 vi(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 d3(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 p3(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 lc(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 fc=lc(function(t){return function(e){t(this),this.message=e?e.length+` errors occurred during unsubscription:
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:
4
4
  `+e.map(function(n,r){return r+1+") "+n.toString()}).join(`
5
- `):"",this.name="UnsubscriptionError",this.errors=e}});function ca(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var xi=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 fc?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{Pd(p)}catch(g){o=o??[],g instanceof fc?o=vi(vi([],bi(o)),bi(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 fc(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Pd(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&ca(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&ca(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Md=xi.EMPTY;function Td(t){return t instanceof xi||t&&"closed"in t&&Pt(t.remove)&&Pt(t.add)&&Pt(t.unsubscribe)}function Pd(t){Pt(t)?t():t.unsubscribe()}var Dd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},g3={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,vi([t,e],bi(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Ed(t){g3.setTimeout(function(){throw t})}function hc(){}function la(t){t()}var dc=function(t){qe(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Td(n)&&n.add(r)):r.destination=v3,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}(xi),m3=Function.prototype.bind;function pc(t,e){return m3.call(t,e)}var y3=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){fa(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){fa(r)}else fa(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){fa(n)}},t}(),_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&&Dd.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&pc(n.next,s),error:n.error&&pc(n.error,s),complete:n.complete&&pc(n.complete,s)}):a=n}return o.destination=new y3(a),o}return e}(dc);function fa(t){Ed(t)}function b3(t){throw t}var v3={closed:!0,next:hc,error:b3,complete:hc},gc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function kd(t){return t}function x3(t){return t.length===0?kd: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=w3(e)?e:new _i(e,n,r);return la(function(){var a=i,s=a.operator,u=a.source;o.add(s?s.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=Ld(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[gc]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return x3(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Ld(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 Ld(t){var e;return(e=t??Dd.Promise)!==null&&e!==void 0?e:Promise}function _3(t){return t&&Pt(t.next)&&Pt(t.error)&&Pt(t.complete)}function w3(t){return t&&t instanceof dc||_3(t)&&Td(t)}function $3(t){return Pt(t==null?void 0:t.lift)}function Dn(t){return function(e){if($3(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 wi(t,e,n,r,i){return new S3(t,e,n,r,i)}var S3=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}(dc),A3=lc(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),$i=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 Cd(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new A3},e.prototype.next=function(n){var r=this;la(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=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;la(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;la(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?Md:(this.currentObservers=null,s.push(n),new xi(function(){r.currentObservers=null,ca(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new $e;return n.source=this,n},e.create=function(n,r){return new Cd(n,r)},e}($e),Cd=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:Md},e}($i),mc={now:function(){return(mc.delegate||Date).now()},delegate:void 0},M3=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=mc);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}($i),T3=function(t){qe(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(xi),Rd={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,vi([t,e],bi(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},P3=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),Rd.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&&Rd.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,ca(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(T3),Id=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=mc.now,t}(),D3=function(t){qe(e,t);function e(n,r){r===void 0&&(r=Id.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}(Id);new D3(P3);function E3(t){return t&&Pt(t.schedule)}function k3(t){return t[t.length-1]}function Nd(t){return E3(k3(t))?t.pop():void 0}var Fd=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Gd(t){return Pt(t==null?void 0:t.then)}function zd(t){return Pt(t[gc])}function Od(t){return Symbol.asyncIterator&&Pt(t==null?void 0:t[Symbol.asyncIterator])}function Ud(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 L3(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Bd=L3();function Yd(t){return Pt(t==null?void 0:t[Bd])}function Wd(t){return d3(this,arguments,function(){var e,n,r,i;return Ad(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 Hd(t){return Pt(t==null?void 0:t.getReader)}function cn(t){if(t instanceof $e)return t;if(t!=null){if(zd(t))return C3(t);if(Fd(t))return R3(t);if(Gd(t))return I3(t);if(Od(t))return qd(t);if(Yd(t))return N3(t);if(Hd(t))return F3(t)}throw Ud(t)}function C3(t){return new $e(function(e){var n=t[gc]();if(Pt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function R3(t){return new $e(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function I3(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,Ed)})}function N3(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 qd(t){return new $e(function(e){G3(t,e).catch(function(n){return e.error(n)})})}function F3(t){return qd(Wd(t))}function G3(t,e){var n,r,i,o;return h3(this,void 0,void 0,function(){var a,s;return Ad(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=p3(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 Xd(t,e){return e===void 0&&(e=0),Dn(function(n,r){n.subscribe(wi(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 Vd(t,e){return e===void 0&&(e=0),Dn(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function z3(t,e){return cn(t).pipe(Vd(e),Xd(e))}function O3(t,e){return cn(t).pipe(Vd(e),Xd(e))}function U3(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 B3(t,e){return new $e(function(n){var r;return En(n,e,function(){r=t[Bd](),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 jd(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 Y3(t,e){return jd(Wd(t),e)}function W3(t,e){if(t!=null){if(zd(t))return z3(t,e);if(Fd(t))return U3(t,e);if(Gd(t))return O3(t,e);if(Od(t))return jd(t,e);if(Yd(t))return B3(t,e);if(Hd(t))return Y3(t,e)}throw Ud(t)}function H3(t,e){return e?W3(t,e):cn(t)}lc(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function Zd(t,e){return Dn(function(n,r){var i=0;n.subscribe(wi(r,function(o){r.next(t.call(e,o,i++))}))})}function q3(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(wi(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(wi(e,d,function(){h=!0,f()})),function(){}}function Kd(t,e,n){return n===void 0&&(n=1/0),Pt(e)?Kd(function(r,i){return Zd(function(o,a){return e(r,o,i,a)})(cn(t(r,i)))},n):(typeof e=="number"&&(n=e),Dn(function(r,i){return q3(r,i,t,n)}))}function X3(t){return Kd(kd,t)}function V3(){return X3(1)}function Qd(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return V3()(H3(t,Nd(t)))}function j3(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new $i}: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=yc(x,u))}),$.subscribe(b),!l&&d>0&&(l=new _i({next:function(w){return $.next(w)},error:function(w){g=!0,m(),h=yc(y,i,w),$.error(w)},complete:function(){p=!0,m(),h=yc(y,a),$.complete()}}),cn(v).subscribe(l))})(c)}}function yc(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,vi([],bi(n)))).subscribe(i)}}function Z3(t,e,n){var r,i=!1;return r=t,j3({connector:function(){return new M3(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function K3(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Nd(t);return Dn(function(r,i){(n?Qd(t,r,n):Qd(t,r)).subscribe(i)})}function Q3(t){return Dn(function(e,n){cn(t).subscribe(wi(n,function(){return n.complete()},hc)),!n.closed&&e.subscribe(n)})}const Jd=({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 $d().domain([h,f]).range([0,n])},tp=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return n3().domain(t).range(r).padding(n)},J3=({axisLabels:t,axisWidth:e,padding:n=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),Sd().domain([-0,e+0]).range(i)};function t6({name:t,defaultParams:e,initFn:n}){const r=new $i,i=new $i,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=uc(c,e)},setContext:c=>{s=c,s.observer.fullParams$=i.pipe(Q3(r),K3({}),Zd(l=>uc(l,u)),Z3(1))}}}const ha=()=>function(t,e){return function(n){return class{constructor(){const r=t6({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}}}},Si=ha(),fe=ha(),Xe=ha(),ep=ha();function _t(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function np(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function da(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===np?t:e6,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 e6(){return 0}function pa(t){return t===null?NaN:+t}function*n6(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 rp=da(_t),ip=rp.right,r6=rp.left,i6=da(pa).center,kn=ip;function o6(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=bc(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 op=ap(bc),a6=ap(s6);function ap(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 s6(t){const e=bc(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 bc(t){const e=Math.floor(t);if(e===t)return u6(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 u6(t){const e=2*t+1;return(n,r,i,o,a)=>{if(!((o-=a)>=i))return;let s=t*r[i];const u=a*t;for(let c=i,l=i+u;c<l;c+=a)s+=r[Math.min(o,c)];for(let c=i,l=o;c<=l;c+=a)s+=r[Math.min(o,c+u)],n[c]=s/e,s-=r[Math.max(i,c-u)]}}function ga(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(i=+i)>=i&&++n}return n}function c6(t){return t.length|0}function l6(t){return!(t>0)}function f6(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function h6(t){return e=>t(...e)}function d6(...t){const e=typeof t[t.length-1]=="function"&&h6(t.pop());t=t.map(f6);const n=t.map(c6),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(l6))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 p6(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 sp(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 up(t,e){const n=sp(t,e);return n&&Math.sqrt(n)}function Ai(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 g6(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 m6(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 Mi extends Map{constructor(e,n=fp){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(vc(this,e))}has(e){return super.has(vc(this,e))}set(e,n){return super.set(cp(this,e),n)}delete(e){return super.delete(lp(this,e))}}class Ln extends Set{constructor(e,n=fp){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(vc(this,e))}add(e){return super.add(cp(this,e))}delete(e){return super.delete(lp(this,e))}}function vc({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function cp({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function lp({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function fp(t){return t!==null&&typeof t=="object"?t.valueOf():t}function wr(t){return t}function hp(t,...e){return $r(t,wr,wr,e)}function dp(t,...e){return $r(t,Array.from,wr,e)}function pp(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 y6(t,...e){return pp(dp(t,...e),e)}function b6(t,e,...n){return pp(mp(t,e,...n),n)}function gp(t,e,...n){return $r(t,wr,e,n)}function mp(t,e,...n){return $r(t,Array.from,e,n)}function v6(t,...e){return $r(t,wr,yp,e)}function x6(t,...e){return $r(t,Array.from,yp,e)}function yp(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 Mi,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 bp(t,e){return Array.from(e,n=>t[n])}function xc(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]))),bp(t,r)}return t.sort(_c(n))}function _c(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 _6(t,e,n){return(e.length!==2?xc(gp(t,e,n),([r,i],[o,a])=>_t(i,a)||_t(r,o)):xc(hp(t,n),([r,i],[o,a])=>e(i,a)||_t(r,o))).map(([r])=>r)}var w6=Array.prototype,$6=w6.slice;function wc(t){return()=>t}const S6=Math.sqrt(50),A6=Math.sqrt(10),M6=Math.sqrt(2);function ma(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=S6?10:o>=A6?5:o>=M6?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),u=Math.round(e*c),s/c<t&&++s,u/c>e&&--u,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),u=Math.round(e/c),s*c<t&&++s,u*c>e&&--u),u<s&&.5<=n&&n<2?ma(t,e,n*2):[s,u,c]}function 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?ma(e,t,n):ma(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)u[c]=(o-c)/-a;else for(let c=0;c<s;++c)u[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)u[c]=(i+c)/-a;else for(let c=0;c<s;++c)u[c]=(i+c)*a;return u}function Rn(t,e,n){return e=+e,t=+t,n=+n,ma(t,e,n)[2]}function ya(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Rn(e,t,n):Rn(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function $c(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 Sc(t){return Math.max(1,Math.ceil(Math.log(ga(t))/Math.LN2)+1)}function vp(){var t=wr,e=Ai,n=Sc;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===Ai&&([h,f]=$c(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===Ai){const $=Rn(h,f,b);isFinite($)&&($>0?f=(Math.floor(f/$)+1)*$:$<0&&(f=(Math.ceil(f*-$)+1)/-$))}else d.pop()}for(var p=d.length,g=0,m=p;d[g]<=h;)++g;for(;d[m-1]>f;)--m;(g||m<p)&&(d=d.slice(g,m),p=m-g);var y=new Array(p+1),x;for(o=0;o<=p;++o)x=y[o]=[],x.x0=o>0?d[o-1]:h,x.x1=o<p?d[o]:f;if(isFinite(u)){if(u>0)for(o=0;o<a;++o)(s=c[o])!=null&&h<=s&&s<=f&&y[Math.min(p,Math.floor((s-h)/u))].push(i[o]);else if(u<0){for(o=0;o<a;++o)if((s=c[o])!=null&&h<=s&&s<=f){const v=Math.floor((h-s)*u);y[Math.min(p,v+(d[v]<=s))].push(i[o])}}}else for(o=0;o<a;++o)(s=c[o])!=null&&h<=s&&s<=f&&y[kn(d,s,0,p)].push(i[o]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:wc(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:wc([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:wc(Array.isArray(i)?$6.call(i):i),r):n},r}function Ti(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Ac(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);return r}function ba(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Mc(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);return r}function va(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?Sr:_c(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));va(t,e,d,p,i)}const o=t[e];let a=n,s=r;for(Pi(t,n,e),i(t[r],o)>0&&Pi(t,n,r);a<s;){for(Pi(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?Pi(t,n,s):(++s,Pi(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Pi(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function xp(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 Di(t,e,n){if(t=Float64Array.from(n6(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return ba(t);if(e>=1)return Ti(t);var r,i=(r-1)*e,o=Math.floor(i),a=Ti(va(t,o).subarray(0,o+1)),s=ba(t.subarray(o+1));return a+(s-a)*(i-o)}}function _p(t,e,n=pa){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 wp(t,e,n=pa){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,u)=>pa(n(t[u],u,t))),e<=0)return Mc(r);if(e>=1)return Ac(r);var r,i=Uint32Array.from(t,(s,u)=>u),o=r.length-1,a=Math.floor(o*e);return va(i,a,0,o,(s,u)=>Sr(r[s],r[u])),a=xp(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function T6(t,e,n){const r=ga(t),i=Di(t,.75)-Di(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function P6(t,e,n){const r=ga(t),i=up(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function D6(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 E6(t,e){return Di(t,.5,e)}function k6(t,e){return wp(t,.5,e)}function*L6(t){for(const e of t)yield*e}function Tc(t){return Array.from(L6(t))}function C6(t,e){const n=new Mi;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 R6(t,e=I6){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function I6(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 N6(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]):_c(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 F6(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 $p(t,e=_t){if(e.length===1)return Mc(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 G6(t,e=_t){if(e.length===1)return Ac(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 z6(t,e){const n=$p(t,e);return n<0?void 0:n}const O6=Sp(Math.random);function Sp(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 U6(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 Ap(t){if(!(o=t.length))return[];for(var e=-1,n=ba(t,B6),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 B6(t){return t.length}function Y6(){return Ap(arguments)}function W6(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 H6(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 q6(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 X6(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 V6(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 j6(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function Z6(t,...e){t=new Ln(t);for(const n of e)for(const r of n)t.delete(r);return t}function K6(t,e){const n=e[Symbol.iterator](),r=new Ln;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 Q6(t,...e){t=new Ln(t),e=e.map(J6);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function J6(t){return t instanceof Ln?t:new Ln(t)}function Mp(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=Tp(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const u=Tp(a);if(r.add(u),Object.is(o,u))break}}return!0}function Tp(t){return t!==null&&typeof t=="object"?t.valueOf():t}function t5(t,e){return Mp(e,t)}function e5(...t){const e=new Ln;for(const n of t)for(const r of n)e.add(r);return e}function n5(t){return t}var xa=1,_a=2,Pc=3,Ei=4,Pp=1e-6;function r5(t){return"translate("+t+",0)"}function i5(t){return"translate(0,"+t+")"}function o5(t){return e=>+t(e)}function a5(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function s5(){return!this.__axis}function wa(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===xa||t===Ei?-1:1,l=t===Ei||t===_a?"x":"y",h=t===xa||t===Pc?r5:i5;function f(d){var p=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):n5),m=Math.max(o,0)+s,y=e.range(),x=+y[0]+u,v=+y[y.length-1]+u,b=(e.bandwidth?a5:o5)(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===xa?"0em":t===Pc?"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",Pp).attr("transform",function(I){return isFinite(I=b(I))?h(I+u):this.getAttribute("transform")}),P.attr("opacity",Pp).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===Ei||t===_a?a?"M"+c*a+","+x+"H"+u+"V"+v+"H"+c*a:"M"+u+","+x+"V"+v:a?"M"+x+","+c*a+"V"+u+"H"+v+"V"+c*a:"M"+x+","+u+"H"+v),S.attr("opacity",1).attr("transform",function(I){return h(b(I)+u)}),D.attr(l+"2",c*o),A.attr(l,c*m).text(g),$.filter(s5).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===_a?"start":t===Ei?"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 Dp(t){return wa(xa,t)}function u5(t){return wa(_a,t)}function c5(t){return wa(Pc,t)}function Ep(t){return wa(Ei,t)}var l5={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 $a(n)}function $a(t){this._=t}function f5(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}$a.prototype=In.prototype={constructor:$a,on:function(t,e){var n=this._,r=f5(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=h5(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]=kp(n[i],t.name,e);else if(e==null)for(i in n)n[i]=kp(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new $a(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function h5(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function kp(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=l5,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Dc="http://www.w3.org/1999/xhtml";const Ec={svg:"http://www.w3.org/2000/svg",xhtml:Dc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ki(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Ec.hasOwnProperty(e)?{space:Ec[e],local:t}:t}function d5(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Dc&&e.documentElement.namespaceURI===Dc?e.createElement(t):e.createElementNS(n,t)}}function p5(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Sa(t){var e=ki(t);return(e.local?p5:d5)(e)}function g5(){}function Aa(t){return t==null?g5:function(){return this.querySelector(t)}}function m5(t){typeof t!="function"&&(t=Aa(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,c,l=0;l<a;++l)(u=o[l])&&(c=t.call(u,u.__data__,l,o))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new Yt(r,this._parents)}function Lp(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function y5(){return[]}function kc(t){return t==null?y5:function(){return this.querySelectorAll(t)}}function b5(t){return function(){return Lp(t.apply(this,arguments))}}function v5(t){typeof t=="function"?t=b5(t):t=kc(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 Lc(t){return function(){return this.matches(t)}}function Cp(t){return function(e){return e.matches(t)}}var x5=Array.prototype.find;function _5(t){return function(){return x5.call(this.children,t)}}function w5(){return this.firstElementChild}function $5(t){return this.select(t==null?w5:_5(typeof t=="function"?t:Cp(t)))}var S5=Array.prototype.filter;function A5(){return Array.from(this.children)}function M5(t){return function(){return S5.call(this.children,t)}}function T5(t){return this.selectAll(t==null?A5:M5(typeof t=="function"?t:Cp(t)))}function P5(t){typeof t!="function"&&(t=Lc(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 Rp(t){return new Array(t.length)}function D5(){return new Yt(this._enter||this._groups.map(Rp),this._parents)}function Ma(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ma.prototype={constructor:Ma,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function E5(t){return function(){return t}}function k5(t,e,n,r,i,o){for(var a=0,s,u=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Ma(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function L5(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 Ma(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function C5(t){return t.__data__}function R5(t,e){if(!arguments.length)return Array.from(this,C5);var n=e?L5:k5,r=this._parents,i=this._groups;typeof t!="function"&&(t=E5(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,d=I5(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 I5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function N5(){return new Yt(this._exit||this._groups.map(Rp),this._parents)}function F5(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 G5(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 O5(t){t||(t=U5);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 U5(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function B5(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Y5(){return Array.from(this)}function W5(){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 H5(){let t=0;for(const e of this)++t;return t}function q5(){return!this.node()}function X5(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function V5(t){return function(){this.removeAttribute(t)}}function j5(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Z5(t,e){return function(){this.setAttribute(t,e)}}function K5(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Q5(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function J5(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 tA(t,e){var n=ki(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?j5:V5:typeof e=="function"?n.local?J5:Q5:n.local?K5:Z5)(n,e))}function Cc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function eA(t){return function(){this.style.removeProperty(t)}}function nA(t,e,n){return function(){this.style.setProperty(t,e,n)}}function rA(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function iA(t,e,n){return arguments.length>1?this.each((e==null?eA:typeof e=="function"?rA:nA)(t,e,n??"")):Nn(this.node(),t)}function Nn(t,e){return t.style.getPropertyValue(e)||Cc(t).getComputedStyle(t,null).getPropertyValue(e)}function oA(t){return function(){delete this[t]}}function aA(t,e){return function(){this[t]=e}}function sA(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function uA(t,e){return arguments.length>1?this.each((e==null?oA:typeof e=="function"?sA:aA)(t,e)):this.node()[t]}function Ip(t){return t.trim().split(/^|\s+/)}function Rc(t){return t.classList||new Np(t)}function Np(t){this._node=t,this._names=Ip(t.getAttribute("class")||"")}Np.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 Fp(t,e){for(var n=Rc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Gp(t,e){for(var n=Rc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function cA(t){return function(){Fp(this,t)}}function lA(t){return function(){Gp(this,t)}}function fA(t,e){return function(){(e.apply(this,arguments)?Fp:Gp)(this,t)}}function hA(t,e){var n=Ip(t+"");if(arguments.length<2){for(var r=Rc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?fA:e?cA:lA)(n,e))}function dA(){this.textContent=""}function pA(t){return function(){this.textContent=t}}function gA(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function mA(t){return arguments.length?this.each(t==null?dA:(typeof t=="function"?gA:pA)(t)):this.node().textContent}function yA(){this.innerHTML=""}function bA(t){return function(){this.innerHTML=t}}function vA(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function xA(t){return arguments.length?this.each(t==null?yA:(typeof t=="function"?vA:bA)(t)):this.node().innerHTML}function _A(){this.nextSibling&&this.parentNode.appendChild(this)}function wA(){return this.each(_A)}function $A(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function SA(){return this.each($A)}function AA(t){var e=typeof t=="function"?t:Sa(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function MA(){return null}function TA(t,e){var n=typeof t=="function"?t:Sa(t),r=e==null?MA:typeof e=="function"?e:Aa(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function PA(){var t=this.parentNode;t&&t.removeChild(this)}function DA(){return this.each(PA)}function EA(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function kA(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function LA(t){return this.select(t?kA:EA)}function CA(t){return arguments.length?this.property("__data__",t):this.node().__data__}function RA(t){return function(e){t.call(this,e,this.__data__)}}function IA(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 NA(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 FA(t,e,n){return function(){var r=this.__on,i,o=RA(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 GA(t,e,n){var r=IA(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?FA:NA,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function zp(t,e,n){var r=Cc(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 zA(t,e){return function(){return zp(this,t,e)}}function OA(t,e){return function(){return zp(this,t,e.apply(this,arguments))}}function UA(t,e){return this.each((typeof e=="function"?OA:zA)(t,e))}function*BA(){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 Ic=[null];function Yt(t,e){this._groups=t,this._parents=e}function Fn(){return new Yt([[document.documentElement]],Ic)}function YA(){return this}Yt.prototype=Fn.prototype={constructor:Yt,select:m5,selectAll:v5,selectChild:$5,selectChildren:T5,filter:P5,data:R5,enter:D5,exit:N5,join:F5,merge:G5,selection:YA,order:z5,sort:O5,call:B5,nodes:Y5,node:W5,size:H5,empty:q5,each:X5,attr:tA,style:iA,property:uA,classed:hA,text:mA,html:xA,raise:wA,lower:SA,append:AA,insert:TA,remove:DA,clone:LA,datum:CA,on:GA,dispatch:UA,[Symbol.iterator]:BA};function K(t){return typeof t=="string"?new Yt([[document.querySelector(t)]],[document.documentElement]):new Yt([[t]],Ic)}function WA(t){return K(Sa(t).call(document.documentElement))}var HA=0;function Op(){return new Nc}function Nc(){this._="@"+(++HA).toString(36)}Nc.prototype=Op.prototype={constructor:Nc,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 Up(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ae(t,e){if(t=Up(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 qA(t,e){return t.target&&(t=Up(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>ae(n,e))}function XA(t){return typeof t=="string"?new Yt([document.querySelectorAll(t)],[document.documentElement]):new Yt([Lp(t)],Ic)}const VA={passive:!1},Li={capture:!0,passive:!1};function Fc(t){t.stopImmediatePropagation()}function Ar(t){t.preventDefault(),t.stopImmediatePropagation()}function Ta(t){var e=t.document.documentElement,n=K(t).on("dragstart.drag",Ar,Li);"onselectstart"in e?n.on("selectstart.drag",Ar,Li):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Pa(t,e){var n=t.document.documentElement,r=K(t).on("dragstart.drag",null);e&&(r.on("click.drag",Ar,Li),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 Da=t=>()=>t;function Gc(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}})}Gc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function jA(t){return!t.ctrlKey&&!t.button}function ZA(){return this.parentNode}function KA(t,e){return e??{x:t.x,y:t.y}}function QA(){return navigator.maxTouchPoints||"ontouchstart"in this}function Bp(){var t=jA,e=ZA,n=KA,r=QA,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,VA).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,Li).on("mouseup.drag",g,Li),Ta(b.view),Fc(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),Pa(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]))&&(Fc(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])&&(Fc(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 Gc("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 k(E,N,O){var L=A,R;switch(E){case"start":i[_]=k,R=a++;break;case"end":delete i[_],--a;case"drag":A=ae(O||N,$),R=a;break}D.call(E,b,new Gc(E,{sourceEvent:N,subject:T,target:f,identifier:_,active:R,x:A[0]+I,y:A[1]+M,dx:A[0]-L[0],dy:A[1]-L[1],dispatch:D}),S)}}return f.filter=function(b){return arguments.length?(t=typeof b=="function"?b:Da(!!b),f):t},f.container=function(b){return arguments.length?(e=typeof b=="function"?b:Da(b),f):e},f.subject=function(b){return arguments.length?(n=typeof b=="function"?b:Da(b),f):n},f.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:Da(!!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 Ci(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*",Ri="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Le="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",JA=/^#([0-9a-f]{3,8})$/,t8=new RegExp(`^rgb\\(${Pr},${Pr},${Pr}\\)$`),e8=new RegExp(`^rgb\\(${Le},${Le},${Le}\\)$`),n8=new RegExp(`^rgba\\(${Pr},${Pr},${Pr},${Ri}\\)$`),r8=new RegExp(`^rgba\\(${Le},${Le},${Le},${Ri}\\)$`),i8=new RegExp(`^hsl\\(${Ri},${Le},${Le}\\)$`),o8=new RegExp(`^hsla\\(${Ri},${Le},${Le},${Ri}\\)$`),Yp={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:Wp,formatHex:Wp,formatHex8:a8,formatHsl:s8,formatRgb:Hp,toString:Hp});function Wp(){return this.rgb().formatHex()}function a8(){return this.rgb().formatHex8()}function s8(){return Zp(this).formatHsl()}function Hp(){return this.rgb().formatRgb()}function hn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=JA.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?qp(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=t8.exec(t))?new kt(e[1],e[2],e[3],1):(e=e8.exec(t))?new kt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=n8.exec(t))?Ea(e[1],e[2],e[3],e[4]):(e=r8.exec(t))?Ea(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=i8.exec(t))?jp(e[1],e[2]/100,e[3]/100,1):(e=o8.exec(t))?jp(e[1],e[2]/100,e[3]/100,e[4]):Yp.hasOwnProperty(t)?qp(Yp[t]):t==="transparent"?new kt(NaN,NaN,NaN,0):null}function qp(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 zc(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 Dr(t,e,n,r){return arguments.length===1?zc(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}Mr(kt,Dr,Ci(fn,{brighter(t){return t=t==null?Tr:Math.pow(Tr,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Gn:Math.pow(Gn,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new kt(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:Xp,formatHex:Xp,formatHex8:u8,formatRgb:Vp,toString:Vp}));function Xp(){return`#${On(this.r)}${On(this.g)}${On(this.b)}`}function u8(){return`#${On(this.r)}${On(this.g)}${On(this.b)}${On((isNaN(this.opacity)?1:this.opacity)*255)}`}function Vp(){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 jp(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 Zp(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 La(t,e,n,r){return arguments.length===1?Zp(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,La,Ci(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 kt(Oc(t>=240?t-240:t+120,i,r),Oc(t,i,r),Oc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Se(Kp(this.h),Ca(this.s),Ca(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("}${Kp(this.h)}, ${Ca(this.s)*100}%, ${Ca(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Kp(t){return t=(t||0)%360,t<0?t+360:t}function Ca(t){return Math.max(0,Math.min(1,t||0))}function Oc(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 Qp=Math.PI/180,Jp=180/Math.PI,Ra=18,tg=.96422,eg=1,ng=.82521,rg=4/29,Er=6/29,ig=3*Er*Er,c8=Er*Er*Er;function og(t){if(t instanceof Ae)return new Ae(t.l,t.a,t.b,t.opacity);if(t instanceof Ce)return sg(t);t instanceof kt||(t=zc(t));var e=Wc(t.r),n=Wc(t.g),r=Wc(t.b),i=Uc((.2225045*e+.7168786*n+.0606169*r)/eg),o,a;return e===n&&n===r?o=a=i:(o=Uc((.4360747*e+.3850649*n+.1430804*r)/tg),a=Uc((.0139322*e+.0971045*n+.7141733*r)/ng)),new Ae(116*i-16,500*(o-i),200*(i-a),t.opacity)}function l8(t,e){return new Ae(t,0,0,e??1)}function Ia(t,e,n,r){return arguments.length===1?og(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,Ia,Ci(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=tg*Bc(e),t=eg*Bc(t),n=ng*Bc(n),new kt(Yc(3.1338561*e-1.6168667*t-.4906146*n),Yc(-.9787684*e+1.9161415*t+.033454*n),Yc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Uc(t){return t>c8?Math.pow(t,1/3):t/ig+rg}function Bc(t){return t>Er?t*t*t:ig*(t-rg)}function Yc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Wc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ag(t){if(t instanceof Ce)return new Ce(t.h,t.c,t.l,t.opacity);if(t instanceof Ae||(t=og(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)*Jp;return new Ce(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function f8(t,e,n,r){return arguments.length===1?ag(t):new Ce(n,e,t,r??1)}function Na(t,e,n,r){return arguments.length===1?ag(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 sg(t){if(isNaN(t.h))return new Ae(t.l,0,0,t.opacity);var e=t.h*Qp;return new Ae(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Mr(Ce,Na,Ci(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 sg(this).rgb()}}));var ug=-.14861,Hc=1.78277,qc=-.29227,Fa=-.90649,Ii=1.97294,cg=Ii*Fa,lg=Ii*Hc,fg=Hc*qc-Fa*ug;function h8(t){if(t instanceof Un)return new Un(t.h,t.s,t.l,t.opacity);t instanceof kt||(t=zc(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(fg*r+cg*e-lg*n)/(fg+cg-lg),o=r-i,a=(Ii*(n-i)-qc*o)/Fa,s=Math.sqrt(a*a+o*o)/(Ii*i*(1-i)),u=s?Math.atan2(a,o)*Jp-120:NaN;return new Un(u<0?u+360:u,s,i,t.opacity)}function Me(t,e,n,r){return arguments.length===1?h8(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,Ci(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)*Qp,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*(ug*r+Hc*i)),255*(e+n*(qc*r+Fa*i)),255*(e+n*(Ii*r)),this.opacity)}}));function hg(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 dg(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 hg((n-r/e)*e,a,i,o,s)}}function pg(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 hg((n-r/e)*e,i,o,a,s)}}const Ga=t=>()=>t;function gg(t,e){return function(n){return t+n*e}}function d8(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function za(t,e){var n=e-t;return n?gg(t,n>180||n<-180?n-360*Math.round(n/360):n):Ga(isNaN(t)?e:t)}function p8(t){return(t=+t)==1?Lt:function(e,n){return n-e?d8(e,n,t):Ga(isNaN(e)?n:e)}}function Lt(t,e){var n=e-t;return n?gg(t,n):Ga(isNaN(t)?e:t)}const Ni=function t(e){var n=p8(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=Lt(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 mg(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 yg=mg(dg),g8=mg(pg);function Xc(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 bg(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function m8(t,e){return(bg(e)?Xc:vg)(t,e)}function vg(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 xg(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 _g(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 Vc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,jc=new RegExp(Vc.source,"g");function y8(t){return function(){return t}}function b8(t){return function(e){return t(e)+""}}function Zc(t,e){var n=Vc.lastIndex=jc.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=Vc.exec(t))&&(i=jc.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=jc.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?b8(u[0].x):y8(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"?Ga(e):(n==="number"?he:n==="string"?(r=hn(e))?(e=r,Ni):Zc:e instanceof hn?Ni:e instanceof Date?xg:bg(e)?Xc:Array.isArray(e)?vg:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?_g:he)(t,e)}function v8(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function x8(t,e){var n=za(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Oa(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var wg=180/Math.PI,Kc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function $g(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)*wg,skewX:Math.atan(u)*wg,scaleX:a,scaleY:s}}var Ua;function _8(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Kc:$g(e.a,e.b,e.c,e.d,e.e,e.f)}function w8(t){return t==null||(Ua||(Ua=document.createElementNS("http://www.w3.org/2000/svg","g")),Ua.setAttribute("transform",t),!(t=Ua.transform.baseVal.consolidate()))?Kc:(t=t.matrix,$g(t.a,t.b,t.c,t.d,t.e,t.f))}function Sg(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 Ag=Sg(_8,"px, ","px)","deg)"),Mg=Sg(w8,", ",")",")"),$8=1e-12;function Tg(t){return((t=Math.exp(t))+1/t)/2}function S8(t){return((t=Math.exp(t))-1/t)/2}function A8(t){return((t=Math.exp(2*t))-1)/(t+1)}const Pg=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<$8)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=Tg($),D=c/(n*x)*(P*A8(e*_+$)-S8($));return[s+D*d,u+D*p,c*P/Tg(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 Dg(t){return function(e,n){var r=t((e=La(e)).h,(n=La(n)).h),i=Lt(e.s,n.s),o=Lt(e.l,n.l),a=Lt(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 M8=Dg(za);var T8=Dg(Lt);function P8(t,e){var n=Lt((t=Ia(t)).l,(e=Ia(e)).l),r=Lt(t.a,e.a),i=Lt(t.b,e.b),o=Lt(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 Eg(t){return function(e,n){var r=t((e=Na(e)).h,(n=Na(n)).h),i=Lt(e.c,n.c),o=Lt(e.l,n.l),a=Lt(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 D8=Eg(za);var E8=Eg(Lt);function kg(t){return function e(n){n=+n;function r(i,o){var a=t((i=Me(i)).h,(o=Me(o)).h),s=Lt(i.s,o.s),u=Lt(i.l,o.l),c=Lt(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 k8=kg(za);var Ba=kg(Lt);function Lg(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 L8(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var kr=0,Fi=0,Gi=0,Cg=1e3,Ya,zi,Wa=0,Bn=0,Ha=0,Oi=typeof performance=="object"&&performance.now?performance:Date,Rg=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ui(){return Bn||(Rg(C8),Bn=Oi.now()+Ha)}function C8(){Bn=0}function Bi(){this._call=this._time=this._next=null}Bi.prototype=qa.prototype={constructor:Bi,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Ui():+n)+(e==null?0:+e),!this._next&&zi!==this&&(zi?zi._next=this:Ya=this,zi=this),this._call=t,this._time=n,Qc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qc())}};function qa(t,e,n){var r=new Bi;return r.restart(t,e,n),r}function Ig(){Ui(),++kr;for(var t=Ya,e;t;)(e=Bn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--kr}function Ng(){Bn=(Wa=Oi.now())+Ha,kr=Fi=0;try{Ig()}finally{kr=0,I8(),Bn=0}}function R8(){var t=Oi.now(),e=t-Wa;e>Cg&&(Ha-=e,Wa=t)}function I8(){for(var t,e=Ya,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Ya=n);zi=t,Qc(r)}function Qc(t){if(!kr){Fi&&(Fi=clearTimeout(Fi));var e=t-Bn;e>24?(t<1/0&&(Fi=setTimeout(Ng,t-Oi.now()-Ha)),Gi&&(Gi=clearInterval(Gi))):(Gi||(Wa=Oi.now(),Gi=setInterval(R8,Cg)),kr=1,Rg(Ng))}}function Jc(t,e,n){var r=new Bi;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function N8(t,e,n){var r=new Bi,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?Ui():+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 F8=In("start","end","cancel","interrupt"),G8=[],Fg=0,tl=1,el=2,Xa=3,Gg=4,nl=5,Va=6;function ja(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:F8,tween:G8,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Fg})}function rl(t,e){var n=Te(t,e);if(n.state>Fg)throw new Error("too late; already scheduled");return n}function Re(t,e){var n=Te(t,e);if(n.state>Xa)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=qa(o,0,n.time);function o(c){n.state=tl,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!==tl)return u();for(l in r)if(d=r[l],d.name===n.name){if(d.state===Xa)return Jc(a);d.state===Gg?(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(Jc(function(){n.state===Xa&&(n.state=Gg,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=el,n.on.call("start",t,t.__data__,n.index,n.group),n.state===el){for(n.state=Xa,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=nl,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===nl&&(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>el&&r.state<nl,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 O8(t){return this.each(function(){Yn(this,t)})}function U8(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 B8(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 Y8(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?U8:B8)(n,t,e))}function il(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 zg(t,e){var n;return(typeof e=="number"?he:e instanceof hn?Ni:(n=hn(e))?(e=n,Ni):Zc)(t,e)}function W8(t){return function(){this.removeAttribute(t)}}function H8(t){return function(){this.removeAttributeNS(t.space,t.local)}}function q8(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function X8(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function V8(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 j8(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 Z8(t,e){var n=ki(t),r=n==="transform"?Mg:zg;return this.attrTween(t,typeof e=="function"?(n.local?j8:V8)(n,r,il(this,"attr."+t,e)):e==null?(n.local?H8:W8)(n):(n.local?X8:q8)(n,r,e))}function K8(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Q8(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function J8(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Q8(t,o)),n}return i._value=e,i}function t4(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&K8(t,o)),n}return i._value=e,i}function e4(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=ki(t);return this.tween(n,(r.local?J8:t4)(r,e))}function n4(t,e){return function(){rl(this,t).delay=+e.apply(this,arguments)}}function r4(t,e){return e=+e,function(){rl(this,t).delay=e}}function i4(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?n4:r4)(e,t)):Te(this.node(),e).delay}function o4(t,e){return function(){Re(this,t).duration=+e.apply(this,arguments)}}function a4(t,e){return e=+e,function(){Re(this,t).duration=e}}function s4(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?o4:a4)(e,t)):Te(this.node(),e).duration}function u4(t,e){if(typeof e!="function")throw new Error;return function(){Re(this,t).ease=e}}function c4(t){var e=this._id;return arguments.length?this.each(u4(e,t)):Te(this.node(),e).ease}function l4(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Re(this,t).ease=n}}function f4(t){if(typeof t!="function")throw new Error;return this.each(l4(this._id,t))}function h4(t){typeof t!="function"&&(t=Lc(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 d4(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 p4(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 g4(t,e,n){var r,i,o=p4(e)?rl:Re;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function m4(t,e){var n=this._id;return arguments.length<2?Te(this.node(),n).on.on(t):this.each(g4(n,t,e))}function y4(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function b4(){return this.on("end.remove",y4(this._id))}function v4(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Aa(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,c=o[a]=new Array(u),l,h,f=0;f<u;++f)(l=s[f])&&(h=t.call(l,l.__data__,f,s))&&("__data__"in l&&(h.__data__=l.__data__),c[f]=h,ja(c[f],e,n,f,c,Te(l,n)));return new Ie(o,this._parents,e,n)}function x4(t){var e=this._name,n=this._id;typeof t!="function"&&(t=kc(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])&&ja(d,e,n,g,f,p);o.push(f),a.push(l)}return new Ie(o,a,e,n)}var _4=Fn.prototype.constructor;function w4(){return new _4(this._groups,this._parents)}function $4(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 Og(t){return function(){this.style.removeProperty(t)}}function S4(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 A4(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 M4(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=Og(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function T4(t,e,n){var r=(t+="")=="transform"?Ag:zg;return e==null?this.styleTween(t,$4(t,r)).on("end.style."+t,Og(t)):typeof e=="function"?this.styleTween(t,A4(t,r,il(this,"style."+t,e))).each(M4(this._id,t)):this.styleTween(t,S4(t,r,e),n).on("end.style."+t,null)}function P4(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function D4(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&P4(t,a,n)),r}return o._value=e,o}function E4(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,D4(t,e,n??""))}function k4(t){return function(){this.textContent=t}}function L4(t){return function(){var e=t(this);this.textContent=e??""}}function C4(t){return this.tween("text",typeof t=="function"?L4(il(this,"text",t)):k4(t==null?"":t+""))}function R4(t){return function(e){this.textContent=t.call(this,e)}}function I4(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&R4(i)),e}return r._value=t,r}function N4(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,I4(t))}function F4(){for(var t=this._name,e=this._id,n=Bg(),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);ja(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 G4(){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 z4=0;function Ie(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ug(t){return Fn().transition(t)}function Bg(){return++z4}var Ve=Fn.prototype;Ie.prototype=Ug.prototype={constructor:Ie,select:v4,selectAll:x4,selectChild:Ve.selectChild,selectChildren:Ve.selectChildren,filter:h4,merge:d4,selection:w4,transition:F4,call:Ve.call,nodes:Ve.nodes,node:Ve.node,size:Ve.size,empty:Ve.empty,each:Ve.each,on:m4,attr:Z8,attrTween:e4,style:T4,styleTween:E4,text:C4,textTween:N4,remove:b4,tween:Y8,delay:i4,duration:s4,ease:c4,easeVarying:f4,end:G4,[Symbol.iterator]:Ve[Symbol.iterator]};const O4=t=>+t;function U4(t){return t*t}function B4(t){return t*(2-t)}function Yg(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function Y4(t){return t*t*t}function W4(t){return--t*t*t+1}function Yi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var ol=3,H4=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(ol),q4=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(ol),Wg=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}(ol),Hg=Math.PI,qg=Hg/2;function X4(t){return+t==1?1:1-Math.cos(t*qg)}function V4(t){return Math.sin(t*qg)}function Xg(t){return(1-Math.cos(Hg*t))/2}function pn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function j4(t){return pn(1-+t)}function Z4(t){return 1-pn(t)}function Vg(t){return((t*=2)<=1?pn(1-t):2-pn(t-1))/2}function K4(t){return 1-Math.sqrt(1-t*t)}function Q4(t){return Math.sqrt(1- --t*t)}function jg(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var al=4/11,J4=6/11,tM=8/11,eM=3/4,nM=9/11,rM=10/11,iM=15/16,oM=21/22,aM=63/64,Za=1/al/al;function sM(t){return 1-Wi(1-t)}function Wi(t){return(t=+t)<al?Za*t*t:t<tM?Za*(t-=J4)*t+eM:t<rM?Za*(t-=nM)*t+iM:Za*(t-=oM)*t+aM}function uM(t){return((t*=2)<=1?1-Wi(1-t):Wi(t-1)+1)/2}var sl=1.70158,cM=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(sl),lM=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(sl),Zg=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}(sl),Lr=2*Math.PI,ul=1,cl=.3,fM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Lr);function i(o){return e*pn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*Lr)},i.period=function(o){return t(e,o)},i}(ul,cl),Ka=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Lr);function i(o){return 1-e*pn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*Lr)},i.period=function(o){return t(e,o)},i}(ul,cl),hM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Lr);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*Lr)},i.period=function(o){return t(e,o)},i}(ul,cl),dM={time:null,delay:0,duration:250,ease:Yi};function pM(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 gM(t){var e,n;t instanceof Ie?(e=t._id,t=t._name):(e=Bg(),(n=dM).time=Ui(),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])&&ja(u,t,e,c,a,n||pM(u,e));return new Ie(r,this._parents,t,e)}Fn.prototype.interrupt=O8,Fn.prototype.transition=gM;var mM=[null];function yM(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>tl&&r.name===e)return new Ie([[t]],mM,e,+i)}return null}const ll=t=>()=>t;function bM(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 vM(t){t.stopImmediatePropagation()}function fl(t){t.preventDefault(),t.stopImmediatePropagation()}var Kg={name:"drag"},hl={name:"space"},Cr={name:"handle"},Rr={name:"center"};const{abs:Qg,max:Ft,min:Gt}=Math;function Jg(t){return[+t[0],+t[1]]}function dl(t){return[Jg(t[0]),Jg(t[1])]}var Qa={name:"x",handles:["w","e"].map(Hi),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Ja={name:"y",handles:["n","s"].map(Hi),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]]}},xM={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Hi),input:function(t){return t==null?null:dl(t)},output:function(t){return t}},je={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"},t1={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},e1={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},_M={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},wM={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Hi(t){return{type:t}}function $M(t){return!t.ctrlKey&&!t.button}function SM(){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 AM(){return navigator.maxTouchPoints||"ontouchstart"in this}function pl(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function MM(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function TM(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function PM(){return gl(Qa)}function DM(){return gl(Ja)}function EM(){return gl(xM)}function gl(t){var e=SM,n=$M,r=AM,i=!0,o=In("start","brush","end"),a=6,s;function u(m){var y=m.property("__brush",g).selectAll(".overlay").data([Hi("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",je.overlay).merge(y).each(function(){var v=pl(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([Hi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",je.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 je[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=pl(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 bM(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"?Kg:i&&m.altKey?Rr:Cr,b=t===Ja?null:_M[x],$=t===Qa?null:wM[x],w=pl(y),S=w.extent,_=w.selection,P=S[0][0],D,A,I=S[0][1],M,T,k=S[1][0],E,N,O=S[1][1],L,R,F=0,C=0,z,X=b&&$&&i&&m.shiftKey,W,V,J=Array.from(m.touches||[m],rt=>{const Mt=rt.identifier;return rt=ae(rt,y),rt.point0=rt.slice(),rt.identifier=Mt,rt});Yn(y);var ht=l(y,arguments,!0).beforestart();if(x==="overlay"){_&&(z=!0);const rt=[J[0],J[1]||J[0]];w.selection=_=[[D=t===Ja?P:Gt(rt[0][0],rt[1][0]),M=t===Qa?I:Gt(rt[0][1],rt[1][1])],[E=t===Ja?k:Ft(rt[0][0],rt[1][0]),L=t===Qa?O:Ft(rt[0][1],rt[1][1])]],J.length>1&&xt(m)}else D=_[0][0],M=_[0][1],E=_[1][0],L=_[1][1];A=D,T=M,N=E,R=L;var q=K(y).attr("pointer-events","none"),nt=q.selectAll(".overlay").attr("cursor",je[x]);if(m.touches)ht.moved=Y,ht.ended=gt;else{var at=K(m.view).on("mousemove.brush",Y,!0).on("mouseup.brush",gt,!0);i&&at.on("keydown.brush",Nt,!0).on("keyup.brush",te,!0),Ta(m.view)}c.call(y),ht.start(m,v.name);function Y(rt){for(const Mt of rt.changedTouches||[rt])for(const Lo of J)Lo.identifier===Mt.identifier&&(Lo.cur=ae(Mt,y));if(X&&!W&&!V&&J.length===1){const Mt=J[0];Qg(Mt.cur[0]-Mt[0])>Qg(Mt.cur[1]-Mt[1])?V=!0:W=!0}for(const Mt of J)Mt.cur&&(Mt[0]=Mt.cur[0],Mt[1]=Mt.cur[1]);z=!0,fl(rt),xt(rt)}function xt(rt){const Mt=J[0],Lo=Mt.point0;var Sn;switch(F=Mt[0]-Lo[0],C=Mt[1]-Lo[1],v){case hl:case Kg:{b&&(F=Ft(P-D,Gt(k-E,F)),A=D+F,N=E+F),$&&(C=Ft(I-M,Gt(O-L,C)),T=M+C,R=L+C);break}case Cr:{J[1]?(b&&(A=Ft(P,Gt(k,J[0][0])),N=Ft(P,Gt(k,J[1][0])),b=1),$&&(T=Ft(I,Gt(O,J[0][1])),R=Ft(I,Gt(O,J[1][1])),$=1)):(b<0?(F=Ft(P-D,Gt(k-D,F)),A=D+F,N=E):b>0&&(F=Ft(P-E,Gt(k-E,F)),A=D,N=E+F),$<0?(C=Ft(I-M,Gt(O-M,C)),T=M+C,R=L):$>0&&(C=Ft(I-L,Gt(O-L,C)),T=M,R=L+C));break}case Rr:{b&&(A=Ft(P,Gt(k,D-F*b)),N=Ft(P,Gt(k,E+F*b))),$&&(T=Ft(I,Gt(O,M-C*$)),R=Ft(I,Gt(O,L+C*$)));break}}N<A&&(b*=-1,Sn=D,D=E,E=Sn,Sn=A,A=N,N=Sn,x in t1&&nt.attr("cursor",je[x=t1[x]])),R<T&&($*=-1,Sn=M,M=L,L=Sn,Sn=T,T=R,R=Sn,x in e1&&nt.attr("cursor",je[x=e1[x]])),w.selection&&(_=w.selection),W&&(A=_[0][0],N=_[1][0]),V&&(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),ht.brush(rt,v.name))}function gt(rt){if(vM(rt),rt.touches){if(rt.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Pa(rt.view,z),at.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);q.attr("pointer-events","all"),nt.attr("cursor",je.overlay),w.selection&&(_=w.selection),MM(_)&&(w.selection=null,c.call(y)),ht.end(rt,v.name)}function Nt(rt){switch(rt.keyCode){case 16:{X=b&&$;break}case 18:{v===Cr&&(b&&(E=N-F*b,D=A+F*b),$&&(L=R-C*$,M=T+C*$),v=Rr,xt(rt));break}case 32:{(v===Cr||v===Rr)&&(b<0?E=N-F:b>0&&(D=A-F),$<0?L=R-C:$>0&&(M=T-C),v=hl,nt.attr("cursor",je.selection),xt(rt));break}default:return}fl(rt)}function te(rt){switch(rt.keyCode){case 16:{X&&(W=V=X=!1,xt(rt));break}case 18:{v===Rr&&(b<0?E=N:b>0&&(D=A),$<0?L=R:$>0&&(M=T),v=Cr,xt(rt));break}case 32:{v===hl&&(rt.altKey?(b&&(E=N-F*b,D=A+F*b),$&&(L=R-C*$,M=T+C*$),v=Rr):(b<0?E=N:b>0&&(D=A),$<0?L=R:$>0&&(M=T),v=Cr),nt.attr("cursor",je[x]),xt(rt));break}default:return}fl(rt)}}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=dl(e.apply(this,arguments)),m.dim=t,m}return u.extent=function(m){return arguments.length?(e=typeof m=="function"?m:ll(dl(m)),u):e},u.filter=function(m){return arguments.length?(n=typeof m=="function"?m:ll(!!m),u):n},u.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:ll(!!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 n1=Math.abs,Ir=Math.cos,Nr=Math.sin,r1=Math.PI,ts=r1/2,i1=r1*2,o1=Math.max,ml=1e-12;function yl(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function kM(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function LM(){return bl(!1,!1)}function CM(){return bl(!1,!0)}function RM(){return bl(!0,!1)}function bl(t,e){var n=0,r=null,i=null,o=null;function a(s){var u=s.length,c=new Array(u),l=yl(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=o1(0,i1-n*u)/d,p=d?n:i1/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=yl(~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=yl(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=o1(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=kM(s))._=s,a):o&&o._},a}const vl=Math.PI,xl=2*vl,Wn=1e-6,IM=xl-Wn;function a1(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function NM(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return a1;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 qi=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?a1:NM(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((vl-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%xl+xl),f>IM?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>=vl)},${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 _l(){return new qi}_l.prototype=qi.prototype;function FM(t=3){return new qi(+t)}var GM=Array.prototype.slice;function Hn(t){return function(){return t}}function zM(t){return t.source}function OM(t){return t.target}function s1(t){return t.radius}function UM(t){return t.startAngle}function BM(t){return t.endAngle}function YM(){return 0}function WM(){return 10}function u1(t){var e=zM,n=OM,r=s1,i=s1,o=UM,a=BM,s=YM,u=null;function c(){var l,h=e.apply(this,arguments),f=n.apply(this,arguments),d=s.apply(this,arguments)/2,p=GM.call(arguments),g=+r.apply(this,(p[0]=h,p)),m=o.apply(this,p)-ts,y=a.apply(this,p)-ts,x=+i.apply(this,(p[0]=f,p)),v=o.apply(this,p)-ts,b=a.apply(this,p)-ts;if(u||(u=l=_l()),d>ml&&(n1(y-m)>d*2+ml?y>m?(m+=d,y-=d):(m-=d,y+=d):m=y=(m+y)/2,n1(b-v)>d*2+ml?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 HM(){return u1()}function qM(){return u1(WM)}var XM=Array.prototype,c1=XM.slice;function VM(t,e){return t-e}function jM(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 ZM(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=KM(t,e[n]))return i;return 0}function KM(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(QM(u,h,e))return 0;l>r!=d>r&&n<(f-c)*(r-l)/(d-l)+c&&(i=-i)}return i}function QM(t,e,n){var r;return JM(t,e,n)&&t7(t[r=+(t[0]===e[0])],n[r],e[r])}function JM(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function t7(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function e7(){}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 wl(){var t=1,e=1,n=Sc,r=u;function i(c){var l=n(c);if(Array.isArray(l))l=l.slice().sort(VM);else{const h=Ai(c,n7);for(l=Cn(...$c(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),jM(p)>0?f.push([p]):d.push(p)}),d.forEach(function(p){for(var g=0,m=f.length,y;g<m;++g)if(ZM((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=$l(l[m*t+g]);d>0&&d<t&&g===d&&(f[0]=l1(d,$l(l[m*t+g-1]),y,h)),p>0&&p<e&&m===p&&(f[1]=l1(p,$l(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(c1.call(c)):gn(c),i):n},i.smooth=function(c){return arguments.length?(r=c?u:e7,i):r===u},i}function n7(t){return isFinite(t)?t:NaN}function qn(t,e){return t==null?!1:+t>=e}function $l(t){return t==null||isNaN(t=+t)?-1/0:t}function l1(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 r7(t){return t[0]}function i7(t){return t[1]}function o7(){return 1}function a7(){var t=r7,e=i7,n=o7,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 op({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,Ti(v)/$,b)),wl().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=wl().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:()=>Ti(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(c1.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,zt=134217729,s7=(3+8*Ke)*Ke;function Sl(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 u7(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function Xi(t){return new Float64Array(t)}const c7=(3+16*Ke)*Ke,l7=(2+12*Ke)*Ke,f7=(9+64*Ke)*Ke*Ke,Fr=Xi(4),f1=Xi(8),h1=Xi(12),d1=Xi(16),Wt=Xi(4);function h7(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=zt*P,d=f-(f-P),p=P-d,f=zt*I,g=f-(f-I),m=I-g,$=p*m-(b-d*g-p*g-d*m),w=A*D,f=zt*A,d=f-(f-A),p=A-d,f=zt*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=u7(4,Fr),T=l7*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=f7*a+s7*Math.abs(M),M+=P*l+I*s-(A*c+D*u),M>=T||-M>=T))return M;b=s*I,f=zt*s,d=f-(f-s),p=s-d,f=zt*I,g=f-(f-I),m=I-g,$=p*m-(b-d*g-p*g-d*m),w=u*D,f=zt*u,d=f-(f-u),p=u-d,f=zt*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 k=Sl(4,Fr,4,Wt,f1);b=P*l,f=zt*P,d=f-(f-P),p=P-d,f=zt*l,g=f-(f-l),m=l-g,$=p*m-(b-d*g-p*g-d*m),w=A*c,f=zt*A,d=f-(f-A),p=A-d,f=zt*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 E=Sl(k,f1,4,Wt,h1);b=s*l,f=zt*s,d=f-(f-s),p=s-d,f=zt*l,g=f-(f-l),m=l-g,$=p*m-(b-d*g-p*g-d*m),w=u*c,f=zt*u,d=f-(f-u),p=u-d,f=zt*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=Sl(E,h1,4,Wt,d1);return d1[N-1]}function es(t,e,n,r,i,o){const a=(e-o)*(n-i),s=(t-i)*(r-o),u=a-s,c=Math.abs(a+s);return Math.abs(u)>=c7*c?u:-h7(t,e,n,r,i,o,c)}const p1=Math.pow(2,-52),ns=new Uint32Array(512);class rs{static from(e,n=y7,r=b7){const i=e.length,o=new Float64Array(i*2);for(let a=0;a<i;a++){const s=e[a];o[2*a]=n(s),o[2*a+1]=r(s)}return new rs(o)}constructor(e){const n=e.length>>1;if(n>0&&typeof e[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=e;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:e,_hullPrev:n,_hullNext:r,_hullTri:i,_hullHash:o}=this,a=e.length>>1;let s=1/0,u=1/0,c=-1/0,l=-1/0;for(let 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=Al(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=Al(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=g7(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(es(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=m7(m,y,x,v,$,w);this._cx=S.x,this._cy=S.y;for(let P=0;P<a;P++)this._dists[P]=Al(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)<=p1&&Math.abs(T-A)<=p1||(D=M,A=T,I===d||I===p||I===g))continue;let k=0;for(let R=0,F=this._hashKey(M,T);R<this._hashSize&&(k=o[(F+R)%this._hashSize],!(k!==-1&&k!==r[k]));R++);k=n[k];let E=k,N;for(;N=r[E],es(M,T,e[2*E],e[2*E+1],e[2*N],e[2*N+1])>=0;)if(E=N,E===k){E=-1;break}if(E===-1)continue;let O=this._addTriangle(E,I,r[E],-1,-1,i[E]);i[I]=this._legalize(O+2),i[E]=O,_++;let L=r[E];for(;N=r[L],es(M,T,e[2*L],e[2*L+1],e[2*N],e[2*N+1])<0;)O=this._addTriangle(L,I,N,i[I],-1,i[L]),i[I]=this._legalize(O+2),r[L]=L,_--,L=N;if(E===k)for(;N=n[E],es(M,T,e[2*N],e[2*N+1],e[2*E],e[2*E+1])<0;)O=this._addTriangle(N,I,E,-1,i[E],i[N]),this._legalize(O+2),i[N]=O,r[E]=E,_--,E=N;this._hullStart=n[I]=E,r[E]=n[L]=I,r[I]=L,o[this._hashKey(M,T)]=I,o[this._hashKey(e[2*E],e[2*E+1])]=E}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(d7(e-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:n,_halfedges:r,coords:i}=this;let o=0,a=0;for(;;){const s=r[e],u=e-e%3;if(a=u+(e+2)%3,s===-1){if(o===0)break;e=ns[--o];continue}const c=s-s%3,l=u+(e+1)%3,h=c+(s+2)%3,f=n[a],d=n[e],p=n[l],g=n[h];if(p7(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<ns.length&&(ns[o++]=x)}else{if(o===0)break;e=ns[--o]}}return a}_link(e,n){this._halfedges[e]=n,n!==-1&&(this._halfedges[n]=e)}_addTriangle(e,n,r,i,o,a){const s=this.trianglesLen;return this._triangles[s]=e,this._triangles[s+1]=n,this._triangles[s+2]=r,this._link(s,i),this._link(s+1,o),this._link(s+2,a),this.trianglesLen+=3,s}}function d7(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Al(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function p7(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 g7(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 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=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;Vi(t,i,o),e[t[n]]>e[t[r]]&&Vi(t,n,r),e[t[o]]>e[t[r]]&&Vi(t,o,r),e[t[n]]>e[t[o]]&&Vi(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;Vi(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 Vi(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function y7(t){return t[0]}function b7(t){return t[1]}const g1=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)>g1||Math.abs(this._y1-o)>g1)&&(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 Ml{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 m1{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-_,k=A-S,E=I-_,N=(M*E-T*k)*2;if(Math.abs(N)<1e-9){if(o===void 0){o=a=0;for(const L of n)o+=e[L*2],a+=e[L*2+1];o/=n.length,a/=n.length}const O=1e9*Math.sign((o-S)*E-(a-_)*k);x=(S+A)/2-O*E,v=(_+I)/2+O*k}else{const O=1/N,L=M*M+T*T,R=k*k+E*E;x=S+(E*L-T*R)*O,v=_+(M*R-k*L)*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 Ml;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 v7=2*Math.PI,zr=Math.pow;function x7(t){return t[0]}function _7(t){return t[1]}function w7(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 $7(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class Tl{static from(e,n=x7,r=_7,i){return new Tl("length"in e?S7(e,n,r,i):Float64Array.from(A7(e,n,r,i)))}constructor(e){this._delaunator=new rs(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,n=this.points;if(e.hull&&e.hull.length>2&&w7(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=$7(n[2*f],n[2*f+1],h);n[2*f]=p[0],n[2*f+1]=p[1]}this._delaunator=new rs(n)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),s=this._hullIndex.fill(-1);for(let u=0,c=r.length;u<c;++u){const l=o[u%3===2?u-2:u+1];(r[u]===-1||a[l]===-1)&&(a[l]=u)}for(let u=0,c=i.length;u<c;++u)s[i[u]]=u;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],a[i[0]]=1,i.length===2&&(a[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(e){return new m1(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,v7)}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 Ml;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 Ml;return this.renderTriangle(e,n),n.value()}}function S7(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*A7(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 y1={},Pl={},Dl=34,ji=10,El=13;function b1(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function M7(t,e){var n=b1(t);return function(r,i){return e(n(r),i,t)}}function v1(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 T7(t){return t<0?"-"+ne(-t,6):t>9999?"+"+ne(t,6):ne(t,4)}function P7(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":T7(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 is(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?M7(m,f):b1(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)===ji&&--p,h.charCodeAt(p-1)===El&&--p;function b(){if(x)return Pl;if(v)return v=!1,y1;var w,S=g,_;if(h.charCodeAt(S)===Dl){for(;g++<p&&h.charCodeAt(g)!==Dl||h.charCodeAt(++g)===Dl;);return(w=g)>=p?x=!0:(_=h.charCodeAt(g++))===ji?v=!0:_===El&&(v=!0,h.charCodeAt(g)===ji&&++g),h.slice(S+1,w-1).replace(/""/g,'"')}for(;g<p;){if((_=h.charCodeAt(w=g++))===ji)v=!0;else if(_===El)v=!0,h.charCodeAt(g)===ji&&++g;else if(_!==n)continue;return h.slice(S,w)}return x=!0,h.slice(S,p)}for(;(y=b())!==Pl;){for(var $=[];y!==y1&&y!==Pl;)$.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=v1(h)),[f.map(l).join(t)].concat(o(h,f)).join(`
7
- `)}function s(h,f){return f==null&&(f=v1(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 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(`
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?P7(h):e.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:u,formatRow:c,formatValue:l}}var Vn=is(","),x1=Vn.parse,D7=Vn.parseRows,E7=Vn.format,k7=Vn.formatBody,L7=Vn.formatRows,C7=Vn.formatRow,R7=Vn.formatValue,jn=is(" "),_1=jn.parse,I7=jn.parseRows,N7=jn.format,F7=jn.formatBody,G7=jn.formatRows,z7=jn.formatRow,O7=jn.formatValue;function U7(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})?)?$/))B7&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const B7=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function Y7(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function W7(t,e){return fetch(t,e).then(Y7)}function H7(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function q7(t,e){return fetch(t,e).then(H7)}function X7(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function os(t,e){return fetch(t,e).then(X7)}function w1(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),os(e,n).then(function(i){return t(i,r)})}}function V7(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=is(t);return os(e,n).then(function(o){return i.parse(o,r)})}var j7=w1(x1),Z7=w1(_1);function K7(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 Q7(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function J7(t,e){return fetch(t,e).then(Q7)}function kl(t){return(e,n)=>os(e,n).then(r=>new DOMParser().parseFromString(r,t))}const t9=kl("application/xml");var e9=kl("text/html"),n9=kl("image/svg+xml");function r9(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 i9(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return $1(this.cover(e,n),e,n,t)}function $1(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 o9(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)$1(this,a[n],s[n],t[n]);return this}function a9(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 s9(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function u9(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 c9(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 l9(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 f9(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function h9(){return this._root}function d9(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function p9(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 g9(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 m9(t){return t[0]}function y9(t){return arguments.length?(this._x=t,this):this._x}function b9(t){return t[1]}function v9(t){return arguments.length?(this._y=t,this):this._y}function as(t,e,n){var r=new Ll(e??m9,n??b9,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Ll(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 S1(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var qt=as.prototype=Ll.prototype;qt.copy=function(){var t=new Ll(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=S1(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]=S1(r));return t},qt.add=i9,qt.addAll=o9,qt.cover=a9,qt.data=s9,qt.extent=u9,qt.find=c9,qt.remove=l9,qt.removeAll=f9,qt.root=h9,qt.size=d9,qt.visit=p9,qt.visitAfter=g9,qt.x=y9,qt.y=v9;function Et(t){return function(){return t}}function mn(t){return(t()-.5)*1e-6}function x9(t){return t.x+t.vx}function _9(t){return t.y+t.vy}function A1(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Et(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=as(e,x9,_9).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:Et(+c),u(),a):t},a}function w9(t){return t.index}function M1(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function $9(t){var e=w9,n=h,r,i=Et(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=M1(v,b.source)),typeof b.target!="object"&&(b.target=M1(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:Et(+m),p(),f):n},f.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Et(+m),g(),f):i},f}const S9=1664525,A9=1013904223,T1=4294967296;function M9(){let t=1;return()=>(t=(S9*t+A9)%T1)/T1}function T9(t){return t.x}function P9(t){return t.y}var D9=10,E9=Math.PI*(3-Math.sqrt(5));function P1(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,u=qa(h),c=In("tick","end"),l=M9();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=D9*Math.sqrt(.5+g),v=g*E9;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 D1(){var t,e,n,r,i=Et(-30),o,a=1,s=1/0,u=.81;function c(d){var p,g=t.length,m=as(t,T9,P9).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:Et(+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 k9(t,e,n){var r,i=Et(.1),o,a;typeof t!="function"&&(t=Et(+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:Et(+c),u(),s):i},s.radius=function(c){return arguments.length?(t=typeof c=="function"?c:Et(+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 E1(t){var e=Et(.1),n,r,i;typeof t!="function"&&(t=Et(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:Et(+s),a(),o):e},o.x=function(s){return arguments.length?(t=typeof s=="function"?s:Et(+s),a(),o):t},o}function k1(t){var e=Et(.1),n,r,i;typeof t!="function"&&(t=Et(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:Et(+s),a(),o):e},o.y=function(s){return arguments.length?(t=typeof s=="function"?s:Et(+s),a(),o):t},o}function L9(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ss(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Or(t){return t=ss(Math.abs(t)),t?t[1]:NaN}function C9(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 R9(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var I9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ur(t){if(!(e=I9.exec(t)))throw new Error("invalid format: "+t);var e;return new us({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Ur.prototype=us.prototype;function us(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}us.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function N9(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 L1;function F9(t,e){var n=ss(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(L1=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+ss(t,Math.max(0,e+o-1))[0]}function C1(t,e){var n=ss(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const R1={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:L9,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)=>C1(t*100,e),r:C1,s:F9,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function I1(t){return t}var N1=Array.prototype.map,F1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function G1(t){var e=t.grouping===void 0||t.thousands===void 0?I1:C9(N1.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?I1:R9(N1.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"):R1[$]||(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:"",_=R1[$],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,k,E;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=N9(A)),N&&+A==0&&p!=="+"&&(N=!1),I=(N?p==="("?p:s:p==="-"||p==="("?"":p)+I,M=($==="s"?F1[8+L1/3]:"")+M+(N&&p==="("?")":""),P){for(T=-1,k=A.length;++T<k;)if(E=A.charCodeAt(T),48>E||E>57){M=(E===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,L=O<y?new Array(y-O+1).join(f):"";switch(x&&m&&(A=e(L+A,L.length?y-M.length:1/0),L=""),d){case"<":A=I+A+M+L;break;case"=":A=I+L+A+M;break;case"^":A=L.slice(0,O=L.length>>1)+I+A+M+L.slice(O);break;default:A=L+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=F1[8+p/3];return function(y){return d(g*y)+m}}return{format:c,formatPrefix:l}}var cs,Zi,Cl;z1({thousands:",",grouping:[3],currency:["$",""]});function z1(t){return cs=G1(t),Zi=cs.format,Cl=cs.formatPrefix,cs}function O1(t){return Math.max(0,-Or(Math.abs(t)))}function U1(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Or(e)/3)))*3-Or(Math.abs(t)))}function B1(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Or(e)-Or(t))+1}var tt=1e-6,Ki=1e-12,ct=Math.PI,St=ct/2,ls=ct/4,Xt=ct*2,yt=180/ct,et=ct/180,ft=Math.abs,Br=Math.atan,Vt=Math.atan2,Q=Math.cos,fs=Math.ceil,Y1=Math.exp,Rl=Math.hypot,hs=Math.log,Il=Math.pow,j=Math.sin,de=Math.sign||function(t){return t>0?1:t<0?-1:0},Ct=Math.sqrt,Nl=Math.tan;function W1(t){return t>1?0:t<-1?ct:Math.acos(t)}function jt(t){return t>1?St:t<-1?-St:Math.asin(t)}function H1(t){return(t=j(t/2))*t}function wt(){}function ds(t,e){t&&X1.hasOwnProperty(t.type)&&X1[t.type](t,e)}var q1={Feature:function(t,e){ds(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)ds(n[r].geometry,e)}},X1={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){Fl(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Fl(n[r],e,0)},Polygon:function(t,e){V1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)V1(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)ds(n[r],e)}};function Fl(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 V1(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Fl(t[n],e,1);e.polygonEnd()}function Pe(t,e){t&&q1.hasOwnProperty(t.type)?q1[t.type](t,e):ds(t,e)}var ps=new Dt,gs=new Dt,j1,Z1,Gl,zl,Ol,Ne={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){ps=new Dt,Ne.lineStart=G9,Ne.lineEnd=z9},polygonEnd:function(){var t=+ps;gs.add(t<0?Xt+t:t),this.lineStart=this.lineEnd=this.point=wt},sphere:function(){gs.add(Xt)}};function G9(){Ne.point=O9}function z9(){K1(j1,Z1)}function O9(t,e){Ne.point=K1,j1=t,Z1=e,t*=et,e*=et,Gl=t,zl=Q(e=e/2+ls),Ol=j(e)}function K1(t,e){t*=et,e*=et,e=e/2+ls;var n=t-Gl,r=n>=0?1:-1,i=r*n,o=Q(e),a=j(e),s=Ol*a,u=zl*o+s*Q(i),c=s*r*j(i);ps.add(Vt(c,u)),Gl=t,zl=o,Ol=a}function U9(t){return gs=new Dt,Pe(t,Ne),gs*2}function ms(t){return[Vt(t[1],t[0]),jt(t[2])]}function Zn(t){var e=t[0],n=t[1],r=Q(n);return[r*Q(e),r*j(e),j(n)]}function ys(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 Ul(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function bs(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function vs(t){var e=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,Q1,J1,Wr,Qi,yn,Qe,Je={point:Bl,lineStart:em,lineEnd:nm,polygonStart:function(){Je.point=rm,Je.lineStart=B9,Je.lineEnd=Y9,Qi=new Dt,Ne.polygonStart()},polygonEnd:function(){Ne.polygonEnd(),Je.point=Bl,Je.lineStart=em,Je.lineEnd=nm,ps<0?($t=-(At=180),re=-(se=90)):Qi>tt?se=90:Qi<-tt&&(re=-90),Qe[0]=$t,Qe[1]=At},sphere:function(){$t=-(At=180),re=-(se=90)}};function Bl(t,e){yn.push(Qe=[$t=t,At=t]),e<re&&(re=e),e>se&&(se=e)}function tm(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);vs(o),o=ms(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 em(){Je.point=tm}function nm(){Qe[0]=$t,Qe[1]=At,Je.point=Bl,Wr=null}function rm(t,e){if(Wr){var n=t-Kn;Qi.add(ft(n)>180?n+(n>0?360:-360):n)}else Q1=t,J1=e;Ne.point(t,e),tm(t,e)}function B9(){Ne.lineStart()}function Y9(){rm(Q1,J1),Ne.lineEnd(),ft(Qi)>tt&&($t=-(At=180)),Qe[0]=$t,Qe[1]=At,Wr=null}function ue(t,e){return(e-=t)<0?e+360:e}function W9(t,e){return t[0]-e[0]}function im(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function H9(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(W9),e=1,r=yn[0],o=[r];e<n;++e)i=yn[e],im(r,i[0])||im(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 Ji,xs,_s,ws,$s,Ss,As,Ms,Yl,Wl,Hl,om,am,Zt,Kt,Qt,De={sphere:wt,point:ql,lineStart:sm,lineEnd:um,polygonStart:function(){De.lineStart=V9,De.lineEnd=j9},polygonEnd:function(){De.lineStart=sm,De.lineEnd=um}};function ql(t,e){t*=et,e*=et;var n=Q(e);to(n*Q(t),n*j(t),j(e))}function to(t,e,n){++Ji,_s+=(t-_s)/Ji,ws+=(e-ws)/Ji,$s+=(n-$s)/Ji}function sm(){De.point=q9}function q9(t,e){t*=et,e*=et;var n=Q(e);Zt=n*Q(t),Kt=n*j(t),Qt=j(e),De.point=X9,to(Zt,Kt,Qt)}function X9(t,e){t*=et,e*=et;var n=Q(e),r=n*Q(t),i=n*j(t),o=j(e),a=Vt(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);xs+=a,Ss+=a*(Zt+(Zt=r)),As+=a*(Kt+(Kt=i)),Ms+=a*(Qt+(Qt=o)),to(Zt,Kt,Qt)}function um(){De.point=ql}function V9(){De.point=Z9}function j9(){cm(om,am),De.point=ql}function Z9(t,e){om=t,am=e,t*=et,e*=et,De.point=cm;var n=Q(e);Zt=n*Q(t),Kt=n*j(t),Qt=j(e),to(Zt,Kt,Qt)}function cm(t,e){t*=et,e*=et;var n=Q(e),r=n*Q(t),i=n*j(t),o=j(e),a=Kt*o-Qt*i,s=Qt*r-Zt*o,u=Zt*i-Kt*r,c=Rl(a,s,u),l=jt(c),h=c&&-l/c;Yl.add(h*a),Wl.add(h*s),Hl.add(h*u),xs+=l,Ss+=l*(Zt+(Zt=r)),As+=l*(Kt+(Kt=i)),Ms+=l*(Qt+(Qt=o)),to(Zt,Kt,Qt)}function K9(t){Ji=xs=_s=ws=$s=Ss=As=Ms=0,Yl=new Dt,Wl=new Dt,Hl=new Dt,Pe(t,De);var e=+Yl,n=+Wl,r=+Hl,i=Rl(e,n,r);return i<Ki&&(e=Ss,n=As,r=Ms,xs<tt&&(e=_s,n=ws,r=$s),i=Rl(e,n,r),i<Ki)?[NaN,NaN]:[Vt(n,e)*yt,jt(r/i)*yt]}function Hr(t){return function(){return t}}function Xl(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 Vl(t,e){return ft(t)>ct&&(t-=Math.round(t/Xt)*Xt),[t,e]}Vl.invert=Vl;function jl(t,e,n){return(t%=Xt)?e||n?Xl(fm(t),hm(e,n)):fm(t):e||n?hm(e,n):Vl}function lm(t){return function(e,n){return e+=t,ft(e)>ct&&(e-=Math.round(e/Xt)*Xt),[e,n]}}function fm(t){var e=lm(t);return e.invert=lm(-t),e}function hm(t,e){var n=Q(t),r=j(t),i=Q(e),o=j(e);function a(s,u){var c=Q(u),l=Q(s)*c,h=j(s)*c,f=j(u),d=f*n+l*r;return[Vt(h*i-d*o,l*n-f*r),jt(d*i+h*o)]}return a.invert=function(s,u){var c=Q(u),l=Q(s)*c,h=j(s)*c,f=j(u),d=f*i-h*o;return[Vt(h*i+f*o,l*n+d*r),jt(d*n-l*r)]},a}function dm(t){t=jl(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 pm(t,e,n,r,i,o){if(n){var a=Q(e),s=j(e),u=r*n;i==null?(i=e+r*Xt,o=e-u/2):(i=gm(a,i),o=gm(a,o),(r>0?i<o:i>o)&&(i+=r*Xt));for(var c,l=i;r>0?l>o:l<o;l-=u)c=ms([a,-s*Q(l),-s*j(l)]),t.point(c[0],c[1])}}function gm(t,e){e=Zn(e),e[0]-=t,vs(e);var n=W1(-e[1]);return((-e[2]<0?-n:n)+Xt-tt)%Xt}function Q9(){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=jl(-u[0]*et,-u[1]*et,0).invert,pm(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 mm(){var t=[],e;return{point:function(n,r,i){e.push([n,r,i])},lineStart:function(){t.push(e=[])},lineEnd:wt,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Ts(t,e){return ft(t[0]-e[0])<tt&&ft(t[1]-e[1])<tt}function Ps(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 ym(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(Ts(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 Ps(m,p,null,!0)),a.push(x.o=new Ps(m,null,x,!1)),o.push(x=new Ps(y,p,null,!1)),a.push(x.o=new Ps(y,null,x,!0))}}),!!o.length){for(a.sort(e),bm(o),bm(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 bm(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 Zl(t){return ft(t[0])<=ct?t[0]:de(t[0])*((ft(t[0])+ct)%Xt-ct)}function vm(t,e){var n=Zl(e),r=e[1],i=j(r),o=[j(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=Zl(d),g=d[1]/2+ls,m=j(g),y=Q(g),x=0;x<f;++x,p=b,m=w,y=S,d=v){var v=h[x],b=Zl(v),$=v[1]/2+ls,w=j($),S=Q($),_=b-p,P=_>=0?1:-1,D=P*_,A=D>ct,I=m*w;if(u.add(Vt(I*P*j(D),y*S+I*Q(D))),a+=A?_+P*Xt:_,A^p>=n^b>=n){var M=Yr(Zn(d),Zn(v));vs(M);var T=Yr(o,M);vs(T);var k=(A^_>=0?-1:1)*jt(T[2]);(r>k||r===k&&(M[0]||M[1]))&&(s+=A^_>=0?1:-1)}}return(a<-tt||a<tt&&u<-Ki)^s&1}function xm(t,e,n,r){return function(i){var o=e(i),a=mm(),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=Tc(l);var b=vm(c,r);l.length?(u||(i.polygonStart(),u=!0),ym(l,tT,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(J9))}}return f}}function J9(t){return t.length>1}function tT(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 Kl=xm(function(){return!0},eT,rT,[-ct,-St]);function eT(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=nT(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 nT(t,e,n,r){var i,o,a=j(t-n);return ft(a)>tt?Br((j(e)*(o=Q(r))*j(n)-j(r)*(i=Q(e))*j(t))/(i*o*a)):(e+r)/2}function rT(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 _m(t){var e=Q(t),n=2*et,r=e>0,i=ft(e)>tt;function o(l,h,f,d){pm(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||Ts(h,v)||Ts(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||!Ts(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=ys(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=bs(g,b),_=bs(m,$);Ul(S,_);var P=w,D=ys(S,P),A=ys(P,P),I=D*D-A*(ys(S,S)-1);if(!(I<0)){var M=Ct(I),T=bs(P,(-D-M)/A);if(Ul(T,S),T=ms(T),!f)return T;var k=l[0],E=h[0],N=l[1],O=h[1],L;E<k&&(L=k,k=E,E=L);var R=E-k,F=ft(R-ct)<tt,C=F||R<tt;if(!F&&O<N&&(L=N,N=O,O=L),C?F?N+O>0^T[1]<(ft(T[0]-k)<tt?N:O):N<=T[1]&&T[1]<=O:R>ct^(k<=T[0]&&T[0]<=E)){var z=bs(P,(-D+M)/A);return Ul(z,S),[T,ms(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 xm(a,s,o,r?[0,-t]:[-ct,t-ct])}function iT(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 eo=1e9,Ds=-eo;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=mm(),f,d,p,g,m,y,x,v,b,$,w,S={point:_,lineStart:I,lineEnd:M,polygonStart:D,polygonEnd:A};function _(k,E){i(k,E)&&l.point(k,E)}function P(){for(var k=0,E=0,N=d.length;E<N;++E)for(var O=d[E],L=1,R=O.length,F=O[0],C,z,X=F[0],W=F[1];L<R;++L)C=X,z=W,F=O[L],X=F[0],W=F[1],z<=r?W>r&&(X-C)*(r-z)>(W-z)*(t-C)&&++k:W<=r&&(X-C)*(r-z)<(W-z)*(t-C)&&--k;return k}function D(){l=h,f=[],d=[],w=!0}function A(){var k=P(),E=w&&k,N=(f=Tc(f)).length;(E||N)&&(c.polygonStart(),E&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),N&&ym(f,s,k,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(k,E){var N=i(k,E);if(d&&p.push([k,E]),$)g=k,m=E,y=N,$=!1,N&&(l.lineStart(),l.point(k,E));else if(N&&b)l.point(k,E);else{var O=[x=Math.max(Ds,Math.min(eo,x)),v=Math.max(Ds,Math.min(eo,v))],L=[k=Math.max(Ds,Math.min(eo,k)),E=Math.max(Ds,Math.min(eo,E))];iT(O,L,t,e,n,r)?(b||(l.lineStart(),l.point(O[0],O[1])),l.point(L[0],L[1]),N||l.lineEnd(),w=!1):N&&(l.lineStart(),l.point(k,E),w=!1)}x=k,v=E,b=N}return S}}function oT(){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 Ql,Jl,ks,Ls,qr={sphere:wt,point:wt,lineStart:aT,lineEnd:wt,polygonStart:wt,polygonEnd:wt};function aT(){qr.point=uT,qr.lineEnd=sT}function sT(){qr.point=qr.lineEnd=wt}function uT(t,e){t*=et,e*=et,Jl=t,ks=j(e),Ls=Q(e),qr.point=cT}function cT(t,e){t*=et,e*=et;var n=j(e),r=Q(e),i=ft(t-Jl),o=Q(i),a=j(i),s=r*a,u=Ls*n-ks*r*o,c=ks*n+Ls*r*o;Ql.add(Vt(Ct(s*s+u*u),c)),Jl=t,ks=n,Ls=r}function wm(t){return Ql=new Dt,Pe(t,qr),+Ql}var tf=[null,null],lT={type:"LineString",coordinates:tf};function Cs(t,e){return tf[0]=t,tf[1]=e,wm(lT)}var $m={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}},Sm={Sphere:function(){return!0},Point:function(t,e){return Am(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Am(n[r],e))return!0;return!1},LineString:function(t,e){return Mm(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Mm(n[r],e))return!0;return!1},Polygon:function(t,e){return Tm(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Tm(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&&Sm.hasOwnProperty(t.type)?Sm[t.type](t,e):!1}function Am(t,e){return Cs(t,e)===0}function Mm(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=Cs(t[o],e),r===0||o>0&&(i=Cs(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<Ki*i))return!0;n=r}return!1}function Tm(t,e){return!!vm(t.map(fT),Pm(e))}function fT(t){return t=t.map(Pm),t.pop(),t}function Pm(t){return[t[0]*et,t[1]*et]}function hT(t,e){return(t&&$m.hasOwnProperty(t.type)?$m[t.type]:Rs)(t,e)}function Dm(t,e,n){var r=ln(t,e-tt,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function Em(t,e,n){var r=ln(t,e-tt,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function km(){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(fs(r/l)*l,n,l).map(p).concat(ln(fs(s/h)*h,a,h).map(g)).concat(ln(fs(e/u)*u,t,u).filter(function(v){return ft(v%l)>tt}).map(f)).concat(ln(fs(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=Dm(o,i,90),d=Em(e,t,m),p=Dm(s,a,90),g=Em(r,n,m),y):m},y.extentMajor([[-180,-90+tt],[180,90-tt]]).extentMinor([[-180,-80-tt],[180,80+tt]])}function dT(){return km()()}function pT(t,e){var n=t[0]*et,r=t[1]*et,i=e[0]*et,o=e[1]*et,a=Q(r),s=j(r),u=Q(o),c=j(o),l=a*Q(n),h=a*j(n),f=u*Q(i),d=u*j(i),p=2*jt(Ct(H1(o-r)+a*u*H1(i-n))),g=j(p),m=p?function(y){var x=j(y*=p)/g,v=j(p-y)/g,b=v*l+x*f,$=v*h+x*d,w=v*s+x*c;return[Vt($,b)*yt,Vt(w,Ct(b*b+$*$))*yt]}:function(){return[n*yt,r*yt]};return m.distance=p,m}const no=t=>t;var ef=new Dt,nf=new Dt,Lm,Cm,rf,of,tn={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){tn.lineStart=gT,tn.lineEnd=yT},polygonEnd:function(){tn.lineStart=tn.lineEnd=tn.point=wt,ef.add(ft(nf)),nf=new Dt},result:function(){var t=ef/2;return ef=new Dt,t}};function gT(){tn.point=mT}function mT(t,e){tn.point=Rm,Lm=rf=t,Cm=of=e}function Rm(t,e){nf.add(of*t-rf*e),rf=t,of=e}function yT(){Rm(Lm,Cm)}var Xr=1/0,Is=Xr,ro=-Xr,Ns=ro,Fs={point:bT,lineStart:wt,lineEnd:wt,polygonStart:wt,polygonEnd:wt,result:function(){var t=[[Xr,Is],[ro,Ns]];return ro=Ns=-(Is=Xr=1/0),t}};function bT(t,e){t<Xr&&(Xr=t),t>ro&&(ro=t),e<Is&&(Is=e),e>Ns&&(Ns=e)}var af=0,sf=0,io=0,Gs=0,zs=0,Vr=0,uf=0,cf=0,oo=0,Im,Nm,Fe,Ge,pe={point:Qn,lineStart:Fm,lineEnd:Gm,polygonStart:function(){pe.lineStart=_T,pe.lineEnd=wT},polygonEnd:function(){pe.point=Qn,pe.lineStart=Fm,pe.lineEnd=Gm},result:function(){var t=oo?[uf/oo,cf/oo]:Vr?[Gs/Vr,zs/Vr]:io?[af/io,sf/io]:[NaN,NaN];return af=sf=io=Gs=zs=Vr=uf=cf=oo=0,t}};function Qn(t,e){af+=t,sf+=e,++io}function Fm(){pe.point=vT}function vT(t,e){pe.point=xT,Qn(Fe=t,Ge=e)}function xT(t,e){var n=t-Fe,r=e-Ge,i=Ct(n*n+r*r);Gs+=i*(Fe+t)/2,zs+=i*(Ge+e)/2,Vr+=i,Qn(Fe=t,Ge=e)}function Gm(){pe.point=Qn}function _T(){pe.point=$T}function wT(){zm(Im,Nm)}function $T(t,e){pe.point=zm,Qn(Im=Fe=t,Nm=Ge=e)}function zm(t,e){var n=t-Fe,r=e-Ge,i=Ct(n*n+r*r);Gs+=i*(Fe+t)/2,zs+=i*(Ge+e)/2,Vr+=i,i=Ge*t-Fe*e,uf+=i*(Fe+t),cf+=i*(Ge+e),oo+=i*3,Qn(Fe=t,Ge=e)}function Om(t){this._context=t}Om.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 lf=new Dt,ff,Um,Bm,ao,so,uo={point:wt,lineStart:function(){uo.point=ST},lineEnd:function(){ff&&Ym(Um,Bm),uo.point=wt},polygonStart:function(){ff=!0},polygonEnd:function(){ff=null},result:function(){var t=+lf;return lf=new Dt,t}};function ST(t,e){uo.point=Ym,Um=ao=t,Bm=so=e}function Ym(t,e){ao-=t,so-=e,lf.add(Ct(ao*ao+so*so)),ao=t,so=e}let Wm,Os,Hm,qm;class Xm{constructor(e){this._append=e==null?Vm:AT(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!==Hm||this._append!==Os){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,Hm=r,Os=this._append,qm=this._,this._=i}this._+=qm;break}}}result(){const e=this._;return this._="",e.length?e:null}}function Vm(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function AT(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return Vm;if(e!==Wm){const n=10**e;Wm=e,Os=function(i){let o=1;this._+=i[0];for(const a=i.length;o<a;++o)this._+=Math.round(arguments[o]*n)/n+i[o]}}return Os}function MT(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(uo)),uo.result()},a.bounds=function(s){return Pe(s,i(Fs)),Fs.result()},a.centroid=function(s){return Pe(s,i(pe)),pe.result()},a.projection=function(s){return arguments.length?(i=s==null?(t=null,no):(t=s).stream,a):t},a.context=function(s){return arguments.length?(o=s==null?(e=null,new Xm(n)):new Om(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 Xm(n)),a},a.projection(t).digits(n).context(e)}function TT(t){return{stream:co(t)}}function co(t){return function(e){var n=new hf;for(var r in t)n[r]=t[r];return n.stream=e,n}}function hf(){}hf.prototype={constructor:hf,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 df(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(Fs)),e(Fs.result()),r!=null&&t.clipExtent(r),t}function Us(t,e,n){return df(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 pf(t,e,n){return Us(t,[[0,0],e],n)}function gf(t,e,n){return df(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 mf(t,e,n){return df(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 jm=16,PT=Q(30*et);function Zm(t,e){return+e?ET(t,e):DT(t)}function DT(t){return co({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function ET(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),_=jt(w/=S),P=ft(ft(w)-1)<tt||ft(o-h)<tt?(o+h)/2:Vt($,b),D=t(P,_),A=D[0],I=D[1],M=A-r,T=I-i,k=x*M-y*T;(k*k/v>e||ft((y*M+x*T)/v-.5)>.3||a*f+s*d+u*p<PT)&&(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],jm,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,jm,r),m.lineEnd=b,b()}return m}}var kT=co({point:function(t,e){this.stream.point(t*et,e*et)}});function LT(t){return co({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function CT(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 Km(t,e,n,r,i,o){if(!o)return CT(t,e,n,r,i);var a=Q(o),s=j(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 yf(function(){return t})()}function yf(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=Kl,m=null,y,x,v,b=no,$=.5,w,S,_,P,D;function A(k){return _(k[0]*et,k[1]*et)}function I(k){return k=_.invert(k[0],k[1]),k&&[k[0]*yt,k[1]*yt]}A.stream=function(k){return P&&D===k?P:P=kT(LT(l)(g(w(b(D=k)))))},A.preclip=function(k){return arguments.length?(g=k,p=void 0,T()):g},A.postclip=function(k){return arguments.length?(b=k,m=y=x=v=null,T()):b},A.clipAngle=function(k){return arguments.length?(g=+k?_m(p=k*et):(p=null,Kl),T()):p*yt},A.clipExtent=function(k){return arguments.length?(b=k==null?(m=y=x=v=null,no):Es(m=+k[0][0],y=+k[0][1],x=+k[1][0],v=+k[1][1]),T()):m==null?null:[[m,y],[x,v]]},A.scale=function(k){return arguments.length?(n=+k,M()):n},A.translate=function(k){return arguments.length?(r=+k[0],i=+k[1],M()):[r,i]},A.center=function(k){return arguments.length?(o=k[0]%360*et,a=k[1]%360*et,M()):[o*yt,a*yt]},A.rotate=function(k){return arguments.length?(s=k[0]%360*et,u=k[1]%360*et,c=k.length>2?k[2]%360*et:0,M()):[s*yt,u*yt,c*yt]},A.angle=function(k){return arguments.length?(h=k%360*et,M()):h*yt},A.reflectX=function(k){return arguments.length?(f=k?-1:1,M()):f<0},A.reflectY=function(k){return arguments.length?(d=k?-1:1,M()):d<0},A.precision=function(k){return arguments.length?(w=Zm(S,$=k*k),T()):Ct($)},A.fitExtent=function(k,E){return Us(A,k,E)},A.fitSize=function(k,E){return pf(A,k,E)},A.fitWidth=function(k,E){return gf(A,k,E)},A.fitHeight=function(k,E){return mf(A,k,E)};function M(){var k=Km(n,0,0,f,d,h).apply(null,e(o,a)),E=Km(n,r-k[0],i-k[1],f,d,h);return l=jl(s,u,c),S=Xl(e,E),_=Xl(l,S),w=Zm(S,$),T()}function T(){return P=D=null,A}return function(){return e=t.apply(this,arguments),A.invert=e.invert&&I,M()}}function bf(t){var e=0,n=ct/3,r=yf(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 RT(t){var e=Q(t);function n(r,i){return[r*e,j(i)/e]}return n.invert=function(r,i){return[r/e,jt(i*e)]},n}function Qm(t,e){var n=j(t),r=(n+j(e))/2;if(ft(r)<tt)return RT(t);var i=1+n*(2*r-n),o=Ct(i)/r;function a(s,u){var c=Ct(i-2*r*j(u))/r;return[c*j(s*=r),o-c*Q(s)]}return a.invert=function(s,u){var c=o-u,l=Vt(s,ft(c))*de(c);return c*r<0&&(l-=ct*de(s)*de(c)),[l/r,jt((i-(s*s+c*c)*r*r)/(2*r))]},a}function Bs(){return bf(Qm).scale(155.424).center([0,33.6442])}function Jm(){return Bs().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function IT(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 NT(){var t,e,n=Jm(),r,i=Bs().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Bs().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,u,c={point:function(f,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=IT([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 Us(l,f,d)},l.fitSize=function(f,d){return pf(l,f,d)},l.fitWidth=function(f,d){return gf(l,f,d)},l.fitHeight=function(f,d){return mf(l,f,d)};function h(){return t=e=null,l}return l.scale(1070)}function ty(t){return function(e,n){var r=Q(e),i=Q(n),o=t(r*i);return o===1/0?[2,0]:[o*i*j(e),o*j(n)]}}function lo(t){return function(e,n){var r=Ct(e*e+n*n),i=t(r),o=j(i),a=Q(i);return[Vt(e*o,r*a),jt(r&&n*o/r)]}}var vf=ty(function(t){return Ct(2/(1+t))});vf.invert=lo(function(t){return 2*jt(t/2)});function FT(){return ze(vf).scale(124.75).clipAngle(180-.001)}var xf=ty(function(t){return(t=W1(t))&&t/j(t)});xf.invert=lo(function(t){return t});function GT(){return ze(xf).scale(79.4188).clipAngle(180-.001)}function fo(t,e){return[t,hs(Nl((St+e)/2))]}fo.invert=function(t,e){return[t,2*Br(Y1(e))-St]};function zT(){return ey(fo).scale(961/Xt)}function ey(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(dm(e.rotate()).invert([0,0]));return o(a==null?[[f[0]-h,f[1]-h],[f[0]+h,f[1]+h]]:t===fo?[[Math.max(f[0]-h,a),s],[Math.min(f[0]+h,u),c]]:[[a,Math.max(f[1]-h,s)],[u,Math.min(f[1]+h,c)]])}return l()}function Ys(t){return Nl((St+t)/2)}function ny(t,e){var n=Q(t),r=t===e?j(t):hs(n/Q(e))/hs(Ys(e)/Ys(t)),i=n*Il(Ys(t),r)/r;if(!r)return fo;function o(a,s){i>0?s<-St+tt&&(s=-St+tt):s>St-tt&&(s=St-tt);var u=i/Il(Ys(s),r);return[u*j(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=Vt(a,ft(u))*de(u);return u*r<0&&(l-=ct*de(a)*de(u)),[l/r,2*Br(Il(i/c,1/r))-St]},o}function OT(){return bf(ny).scale(109.5).parallels([30,30])}function ho(t,e){return[t,e]}ho.invert=ho;function UT(){return ze(ho).scale(152.63)}function ry(t,e){var n=Q(t),r=t===e?j(t):(n-Q(e))/(e-t),i=n/r+t;if(ft(r)<tt)return ho;function o(a,s){var u=i-s,c=r*a;return[u*j(c),i-u*Q(c)]}return o.invert=function(a,s){var u=i-s,c=Vt(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 BT(){return bf(ry).scale(131.154).center([0,13.9389])}var po=1.340264,go=-.081106,mo=893e-6,yo=.003796,Ws=Ct(3)/2,YT=12;function _f(t,e){var n=jt(Ws*j(e)),r=n*n,i=r*r*r;return[t*Q(n)/(Ws*(po+3*go*r+i*(7*mo+9*yo*r))),n*(po+go*r+i*(mo+yo*r))]}_f.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,u;o<YT&&(s=n*(po+go*r+i*(mo+yo*r))-e,u=po+3*go*r+i*(7*mo+9*yo*r),n-=a=s/u,r=n*n,i=r*r*r,!(ft(a)<Ki));++o);return[Ws*t*(po+3*go*r+i*(7*mo+9*yo*r))/Q(n),jt(j(n)/Ws)]};function WT(){return ze(_f).scale(177.158)}function wf(t,e){var n=Q(e),r=Q(t)*n;return[n*j(t)/r,j(e)/r]}wf.invert=lo(Br);function HT(){return ze(wf).scale(144.049).clipAngle(60)}function qT(){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=co({point:function(b,$){var w=v([b,$]);this.stream.point(w[0],w[1])}}),g=no,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,no):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=j(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 Us(v,b,$)},v.fitSize=function(b,$){return pf(v,b,$)},v.fitWidth=function(b,$){return gf(v,b,$)},v.fitHeight=function(b,$){return mf(v,b,$)},v}function $f(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)))]}$f.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 XT(){return ze($f).scale(175.295)}function Sf(t,e){return[Q(e)*j(t),j(e)]}Sf.invert=lo(jt);function VT(){return ze(Sf).scale(249.5).clipAngle(90+tt)}function Af(t,e){var n=Q(e),r=1+Q(t)*n;return[n*j(t)/r,j(e)/r]}Af.invert=lo(function(t){return 2*Br(t)});function jT(){return ze(Af).scale(250).clipAngle(142)}function Mf(t,e){return[hs(Nl((St+e)/2)),-t]}Mf.invert=function(t,e){return[-e,2*Br(Y1(t))-St]};function ZT(){var t=ey(Mf),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 KT(t,e){return t.parent===e.parent?1:2}function QT(t){return t.reduce(JT,0)/t.length}function JT(t,e){return t+e.x}function tP(t){return 1+t.reduce(eP,0)}function eP(t,e){return Math.max(t,e.y)}function nP(t){for(var e;e=t.children;)t=e[0];return t}function rP(t){for(var e;e=t.children;)t=e[e.length-1];return t}function iP(){var t=KT,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(f){var d=f.children;d?(f.x=QT(d),f.y=tP(d)):(f.x=a?s+=t(f,a):0,f.y=0,a=f)});var u=nP(o),c=rP(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 oP(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 aP(){return this.eachAfter(oP)}function sP(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function uP(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 cP(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 lP(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function fP(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 hP(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function dP(t){for(var e=this,n=pP(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 pP(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 gP(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function mP(){return Array.from(this)}function yP(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function bP(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*vP(){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 Tf(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=wP)):e===void 0&&(e=_P);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(iy)}function xP(){return Tf(this).eachBefore($P)}function _P(t){return t.children}function wP(t){return Array.isArray(t)?t[1]:null}function $P(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function iy(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=Tf.prototype={constructor:Jn,count:aP,each:sP,eachAfter:cP,eachBefore:uP,find:lP,sum:fP,sort:hP,path:dP,ancestors:gP,descendants:mP,leaves:yP,links:bP,copy:xP,[Symbol.iterator]:vP};function Hs(t){return t==null?null:oy(t)}function oy(t){if(typeof t!="function")throw new Error;return t}function tr(){return 0}function jr(t){return function(){return t}}const SP=1664525,AP=1013904223,ay=4294967296;function Pf(){let t=1;return()=>(t=(SP*t+AP)%ay)/ay}function MP(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function TP(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 PP(t){return sy(t,Pf())}function sy(t,e){for(var n=0,r=(t=TP(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&uy(a,o)?++n:(a=EP(i=DP(i,o)),n=0);return a}function DP(t,e){var n,r;if(Df(e,t))return[e];for(n=0;n<t.length;++n)if(qs(e,t[n])&&Df(bo(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(qs(bo(t[n],t[r]),e)&&qs(bo(t[n],e),t[r])&&qs(bo(t[r],e),t[n])&&Df(cy(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function qs(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 uy(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 Df(t,e){for(var n=0;n<e.length;++n)if(!uy(t,e[n]))return!1;return!0}function EP(t){switch(t.length){case 1:return kP(t[0]);case 2:return bo(t[0],t[1]);case 3:return cy(t[0],t[1],t[2])}}function kP(t){return{x:t.x,y:t.y,r:t.r}}function bo(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 cy(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 ly(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 fy(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 hy(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function Xs(t){this._=t,this.next=null,this.previous=null}function dy(t,e){if(!(o=(t=MP(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;ly(r,n,i=t[2]),n=new Xs(n),r=new Xs(r),i=new Xs(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(u=3;u<o;++u){ly(n._,r._,i=t[u]),i=new Xs(i),c=r.next,l=n.previous,h=r._.r,f=n._.r;do if(h<=f){if(fy(c._,i._)){r=c,n.next=r,r.previous=n,--u;continue t}h+=c._.r,c=c.next}else{if(fy(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=hy(n);(i=i.next)!==r;)(s=hy(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=sy(n,e),u=0;u<o;++u)n=t[u],n.x-=i.x,n.y-=i.y;return i.r}function LP(t){return dy(t,Pf()),t}function CP(t){return Math.sqrt(t.value)}function RP(){var t=null,e=1,n=1,r=tr;function i(o){const a=Pf();return o.x=e/2,o.y=n/2,t?o.eachBefore(py(t)).eachAfter(Ef(r,.5,a)).eachBefore(gy(1)):o.eachBefore(py(CP)).eachAfter(Ef(tr,1,a)).eachAfter(Ef(r,o.r/Math.min(e,n),a)).eachBefore(gy(Math.min(e,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=Hs(o),i):t},i.size=function(o){return arguments.length?(e=+o[0],n=+o[1],i):[e,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:jr(+o),i):r},i}function py(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Ef(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=dy(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=u+s}}}function gy(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 my(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 vo(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 IP(){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(my),a}function o(a,s){return function(u){u.children&&vo(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 NP={depth:-1},yy={},kf={};function FP(t){return t.id}function GP(t){return t.parentId}function zP(){var t=FP,e=GP,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,$)=>OP(n(b,$,i))),x=y.map(by),v=new Set(y).add("");for(const b of x)v.has(b)||(v.add(b),y.push(b),x.push(by(b)),o.push(kf));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)?yy: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===yy)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===kf&&h.children.length===1;)h=h.children[0],--u;for(let y=o.length-1;y>=0&&(d=o[y],d.data===kf);--y)d.data=null}if(h.parent=NP,h.eachBefore(function(y){y.depth=y.parent.depth+1,--u}).eachBefore(iy),h.parent=null,u>0)throw new Error("cycle");return h}return r.id=function(i){return arguments.length?(t=Hs(i),r):t},r.parentId=function(i){return arguments.length?(e=Hs(i),r):e},r.path=function(i){return arguments.length?(n=Hs(i),r):n},r}function OP(t){t=`${t}`;let e=t.length;return Lf(t,e-1)&&!Lf(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function by(t){let e=t.length;if(e<2)return"";for(;--e>1&&!Lf(t,e););return t.slice(0,e)}function Lf(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function UP(t,e){return t.parent===e.parent?1:2}function Cf(t){var e=t.children;return e?e[0]:t.t}function Rf(t){var e=t.children;return e?e[e.length-1]:t.t}function BP(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 YP(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 WP(t,e,n){return t.a.parent===e.parent?t.a:n}function Vs(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}Vs.prototype=Object.create(Jn.prototype);function HP(t){for(var e=new Vs(t,0),n,r=[e],i,o,a,s;n=r.pop();)if(o=n._.children)for(n.children=new Array(s=o.length),a=s-1;a>=0;--a)r.push(i=n.children[a]=new Vs(o[a],a)),i.parent=n;return(e.parent=new Vs(null,0)).children=[e],e}function qP(){var t=UP,e=1,n=1,r=null;function i(c){var l=HP(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){YP(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=Rf(p),f=Cf(f),p&&f;)g=Cf(g),d=Rf(d),d.a=c,b=p.z+x-f.z-m+t(p._,f._),b>0&&(BP(WP(p,c,h),c,b),m+=b,y+=b),x+=p.m,m+=f.m,v+=g.m,y+=d.m;p&&!Rf(d)&&(d.t=p,d.m+=x-y),f&&!Cf(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 js(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 vy=(1+Math.sqrt(5))/2;function xy(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?vo(u,n,r,i,g?r+=p*m/g:o):js(u,n,r,g?n+=d*m/g:i,o),g-=m,l=h}return a}const _y=function t(e){function n(r,i,o,a,s){xy(e,r,i,o,a,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(vy);function XP(){var t=_y,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(my),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=oy(f),l):t},l.padding=function(f){return arguments.length?l.paddingInner(f).paddingOuter(f):l.paddingInner()},l.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:jr(+f),l):o},l.paddingOuter=function(f){return arguments.length?l.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):l.paddingTop()},l.paddingTop=function(f){return arguments.length?(a=typeof f=="function"?f:jr(+f),l):a},l.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:jr(+f),l):s},l.paddingBottom=function(f){return arguments.length?(u=typeof f=="function"?f:jr(+f),l):u},l.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:jr(+f),l):c},l}function VP(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 jP(t,e,n,r,i){(t.depth&1?js:vo)(t,e,n,r,i)}const ZP=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?vo(c,i,o,a,g?o+=(s-o)*c.value/g:s):js(c,i,o,g?i+=(a-i)*c.value/g:a,s),g-=c.value}else r._squarify=u=xy(e,r,i,o,a,s),u.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(vy);function KP(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 QP(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 JP(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function tD(t,e){return t[0]-e[0]||t[1]-e[1]}function wy(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&JP(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function eD(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(tD),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=wy(r),a=wy(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 nD(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 rD(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 It=Math.random,iD=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}(It),oD=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}(It),If=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}(It),aD=function t(e){var n=If.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(It),$y=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}(It),sD=function t(e){var n=$y.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}(It),uD=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(It),cD=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}(It),lD=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}(It),Sy=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}(It),Nf=function t(e){var n=If.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}(It),Ay=function t(e){var n=Nf.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}(It),My=function t(e){var n=Sy.source(e),r=Ay.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}(It),fD=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}(It),hD=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}(It),dD=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}(It),pD=function t(e){var n=Nf.source(e),r=My.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}(It),gD=1664525,mD=1013904223,Ty=1/4294967296;function yD(t=Math.random()){let e=(0<=t&&t<1?t/Ty:Math.abs(t))|0;return()=>(e=gD*e+mD|0,Ty*(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 Ff=Symbol("implicit");function Gf(){var t=new Mi,e=[],n=[],r=Ff;function i(o){let a=t.get(o);if(a===void 0){if(r!==Ff)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 Mi;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 Gf(e,n).unknown(r)},ge.apply(i,arguments),i}function zf(){var t=Gf().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 zf(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},ge.apply(h(),arguments)}function Py(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Py(e())},t}function Of(){return Py(zf.apply(null,arguments).paddingInner(1))}function bD(t){return function(){return t}}function Zs(t){return+t}var Dy=[0,1];function Jt(t){return t}function Uf(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:bD(isNaN(e)?NaN:.5)}function vD(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function xD(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Uf(i,r),o=n(a,o)):(r=Uf(r,i),o=n(o,a)),function(s){return o(r(s))}}function _D(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]=Uf(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 xo(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Ks(){var t=Dy,e=Dy,n=dn,r,i,o,a=Jt,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==Jt&&(a=vD(t[0],t[f-1])),s=f>2?_D:xD,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,Zs),l()):t.slice()},h.range=function(f){return arguments.length?(e=Array.from(f),l()):e.slice()},h.rangeRound=function(f){return e=Array.from(f),n=Oa,l()},h.clamp=function(f){return arguments.length?(a=f?!0: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 Bf(){return Ks()(Jt,Jt)}function Ey(t,e,n,r){var i=ya(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=U1(i,a))&&(r.precision=o),Cl(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=B1(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=O1(i))&&(r.precision=o-(r.type==="%")*2);break}}return Zi(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 Ey(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 Yf(){var t=Bf();return t.copy=function(){return xo(t,Yf())},ge.apply(t,arguments),bn(t)}function ky(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,Zs),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return ky(t).unknown(e)},t=arguments.length?Array.from(t,Zs):[0,1],bn(n)}function Ly(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 Cy(t){return Math.log(t)}function Ry(t){return Math.exp(t)}function wD(t){return-Math.log(-t)}function $D(t){return-Math.exp(-t)}function SD(t){return isFinite(t)?+("1e"+t):t<0?0:t}function AD(t){return t===10?SD:t===Math.E?Math.exp:e=>Math.pow(t,e)}function MD(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 Iy(t){return(e,n)=>-t(-e,n)}function Wf(t){const e=t(Cy,Ry),n=e.domain;let r=10,i,o;function a(){return i=MD(r),o=AD(r),n()[0]<0?(i=Iy(i),o=Iy(o),t(wD,$D)):t(Cy,Ry),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=Zi(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(Ly(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function Ny(){const t=Wf(Ks()).domain([1,10]);return t.copy=()=>xo(t,Ny()).base(t.base()),ge.apply(t,arguments),t}function Fy(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Gy(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Hf(t){var e=1,n=t(Fy(e),Gy(e));return n.constant=function(r){return arguments.length?t(Fy(e=+r),Gy(e)):e},bn(n)}function zy(){var t=Hf(Ks());return t.copy=function(){return xo(t,zy()).constant(t.constant())},ge.apply(t,arguments)}function Oy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function TD(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function PD(t){return t<0?-t*t:t*t}function qf(t){var e=t(Jt,Jt),n=1;function r(){return n===1?t(Jt,Jt):n===.5?t(TD,PD):t(Oy(n),Oy(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},bn(e)}function Qs(){var t=qf(Ks());return t.copy=function(){return xo(t,Qs()).exponent(t.exponent())},ge.apply(t,arguments),t}function DD(){return Qs.apply(null,arguments).exponent(.5)}function Uy(t){return Math.sign(t)*t*t}function ED(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function By(){var t=Bf(),e=[0,1],n=!1,r;function i(o){var a=ED(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(Uy(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,Zs)).map(Uy)),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 By(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},ge.apply(i,arguments),bn(i)}function Yy(){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]=_p(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 Yy().domain(t).range(e).unknown(r)},ge.apply(o,arguments)}function Wy(){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 Wy().domain([t,e]).range(i).unknown(o)},ge.apply(bn(a),arguments)}function Hy(){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 Hy().domain(t).range(e).unknown(n)},ge.apply(i,arguments)}const Xf=new Date,Vf=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)=>(Xf.setTime(+o),Vf.setTime(+a),t(Xf),t(Vf),Math.floor(n(Xf,Vf))),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 qy=Zr.range,nn=1e3,me=nn*60,rn=me*60,on=rn*24,jf=on*7,Xy=on*30,Zf=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()),Vy=an.range,Js=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()),kD=Js.range,tu=Tt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*me)},(t,e)=>(e-t)/me,t=>t.getUTCMinutes()),LD=tu.range,eu=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()),CD=eu.range,nu=Tt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getUTCHours()),RD=nu.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),ID=Kr.range,_o=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/on,t=>t.getUTCDate()-1),ND=_o.range,Kf=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)),FD=Kf.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)/jf)}const Qr=er(0),wo=er(1),jy=er(2),Zy=er(3),nr=er(4),Ky=er(5),Qy=er(6),Jy=Qr.range,GD=wo.range,zD=jy.range,OD=Zy.range,UD=nr.range,BD=Ky.range,YD=Qy.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)/jf)}const Jr=rr(0),$o=rr(1),tb=rr(2),eb=rr(3),ir=rr(4),nb=rr(5),rb=rr(6),ib=Jr.range,WD=$o.range,HD=tb.range,qD=eb.range,XD=ir.range,VD=nb.range,jD=rb.range,ru=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()),ZD=ru.range,iu=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()),KD=iu.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 QD=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 JD=Ue.range;function ob(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,jf],[e,1,Xy],[e,3,3*Xy],[t,1,Zf]];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=da(([,,m])=>m).right(a,f);if(d===a.length)return t.every(ya(c/Zf,l/Zf,h));if(d===0)return Zr.every(Math.max(ya(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[ab,sb]=ob(Ue,iu,Jr,Kf,nu,tu),[ub,cb]=ob(Oe,ru,Qr,Kr,eu,Js);function Qf(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 Jf(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 So(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function lb(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=Ao(i),l=Mo(i),h=Ao(o),f=Mo(o),d=Ao(a),p=Mo(a),g=Ao(s),m=Mo(s),y=Ao(u),x=Mo(u),v={a:N,A:O,b:L,B:R,c:null,d:mb,e:mb,f:wE,g:LE,G:RE,H:vE,I:xE,j:_E,L:yb,m:$E,M:SE,p:F,q:C,Q:$b,s:Sb,S:AE,u:ME,U:TE,V:PE,w:DE,W:EE,x:null,X:null,y:kE,Y:CE,Z:IE,"%":wb},b={a:z,A:X,b:W,B:V,c:null,d:vb,e:vb,f:zE,g:jE,G:KE,H:NE,I:FE,j:GE,L:xb,m:OE,M:UE,p:J,q:ht,Q:$b,s:Sb,S:BE,u:YE,U:WE,V:HE,w:qE,W:XE,x:null,X:null,y:VE,Y:ZE,Z:QE,"%":wb},$={a:D,A,b:I,B:M,c:T,d:pb,e:pb,f:gE,g:db,G:hb,H:gb,I:gb,j:fE,L:pE,m:lE,M:hE,p:P,q:cE,Q:yE,s:bE,S:dE,u:iE,U:oE,V:aE,w:rE,W:sE,x:k,X:E,y:db,Y:hb,Z:uE,"%":mE};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(at){var Y=[],xt=-1,gt=0,Nt=q.length,te,rt,Mt;for(at instanceof Date||(at=new Date(+at));++xt<Nt;)q.charCodeAt(xt)===37&&(Y.push(q.slice(gt,xt)),(rt=fb[te=q.charAt(++xt)])!=null?te=q.charAt(++xt):rt=te==="e"?" ":"0",(Mt=nt[te])&&(te=Mt(at,rt)),Y.push(te),gt=xt+1);return Y.push(q.slice(gt,xt)),Y.join("")}}function S(q,nt){return function(at){var Y=So(1900,void 0,1),xt=_(Y,q,at+="",0),gt,Nt;if(xt!=at.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=Jf(So(Y.y,0,1)),Nt=gt.getUTCDay(),gt=Nt>4||Nt===0?$o.ceil(gt):$o(gt),gt=_o.offset(gt,(Y.V-1)*7),Y.y=gt.getUTCFullYear(),Y.m=gt.getUTCMonth(),Y.d=gt.getUTCDate()+(Y.w+6)%7):(gt=Qf(So(Y.y,0,1)),Nt=gt.getDay(),gt=Nt>4||Nt===0?wo.ceil(gt):wo(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),Nt="Z"in Y?Jf(So(Y.y,0,1)).getUTCDay():Qf(So(Y.y,0,1)).getDay(),Y.m=0,Y.d="W"in Y?(Y.w+6)%7+Y.W*7-(Nt+5)%7:Y.w+Y.U*7-(Nt+6)%7);return"Z"in Y?(Y.H+=Y.Z/100|0,Y.M+=Y.Z%100,Jf(Y)):Qf(Y)}}function _(q,nt,at,Y){for(var xt=0,gt=nt.length,Nt=at.length,te,rt;xt<gt;){if(Y>=Nt)return-1;if(te=nt.charCodeAt(xt++),te===37){if(te=nt.charAt(xt++),rt=$[te in fb?nt.charAt(xt++):te],!rt||(Y=rt(q,at,Y))<0)return-1}else if(te!=at.charCodeAt(Y++))return-1}return Y}function P(q,nt,at){var Y=c.exec(nt.slice(at));return Y?(q.p=l.get(Y[0].toLowerCase()),at+Y[0].length):-1}function D(q,nt,at){var Y=d.exec(nt.slice(at));return Y?(q.w=p.get(Y[0].toLowerCase()),at+Y[0].length):-1}function A(q,nt,at){var Y=h.exec(nt.slice(at));return Y?(q.w=f.get(Y[0].toLowerCase()),at+Y[0].length):-1}function I(q,nt,at){var Y=y.exec(nt.slice(at));return Y?(q.m=x.get(Y[0].toLowerCase()),at+Y[0].length):-1}function M(q,nt,at){var Y=g.exec(nt.slice(at));return Y?(q.m=m.get(Y[0].toLowerCase()),at+Y[0].length):-1}function T(q,nt,at){return _(q,e,nt,at)}function k(q,nt,at){return _(q,n,nt,at)}function E(q,nt,at){return _(q,r,nt,at)}function N(q){return a[q.getDay()]}function O(q){return o[q.getDay()]}function L(q){return u[q.getMonth()]}function R(q){return s[q.getMonth()]}function F(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 W(q){return u[q.getUTCMonth()]}function V(q){return s[q.getUTCMonth()]}function J(q){return i[+(q.getUTCHours()>=12)]}function ht(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 fb={"-":"",_:" ",0:"0"},Rt=/^\s*\d+/,tE=/^%/,eE=/[\\^$*+?|[\]().{}]/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 nE(t){return t.replace(eE,"\\$&")}function Ao(t){return new RegExp("^(?:"+t.map(nE).join("|")+")","i")}function Mo(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function rE(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function iE(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function oE(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function aE(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function sE(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function hb(t,e,n){var r=Rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function db(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 uE(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 cE(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 lE(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 pb(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function fE(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 gb(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function hE(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function dE(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function pE(t,e,n){var r=Rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function gE(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 mE(t,e,n){var r=tE.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function yE(t,e,n){var r=Rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function bE(t,e,n){var r=Rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function mb(t,e){return pt(t.getDate(),e,2)}function vE(t,e){return pt(t.getHours(),e,2)}function xE(t,e){return pt(t.getHours()%12||12,e,2)}function _E(t,e){return pt(1+Kr.count(Oe(t),t),e,3)}function yb(t,e){return pt(t.getMilliseconds(),e,3)}function wE(t,e){return yb(t,e)+"000"}function $E(t,e){return pt(t.getMonth()+1,e,2)}function SE(t,e){return pt(t.getMinutes(),e,2)}function AE(t,e){return pt(t.getSeconds(),e,2)}function ME(t){var e=t.getDay();return e===0?7:e}function TE(t,e){return pt(Qr.count(Oe(t)-1,t),e,2)}function bb(t){var e=t.getDay();return e>=4||e===0?nr(t):nr.ceil(t)}function PE(t,e){return t=bb(t),pt(nr.count(Oe(t),t)+(Oe(t).getDay()===4),e,2)}function DE(t){return t.getDay()}function EE(t,e){return pt(wo.count(Oe(t)-1,t),e,2)}function kE(t,e){return pt(t.getFullYear()%100,e,2)}function LE(t,e){return t=bb(t),pt(t.getFullYear()%100,e,2)}function CE(t,e){return pt(t.getFullYear()%1e4,e,4)}function RE(t,e){var n=t.getDay();return t=n>=4||n===0?nr(t):nr.ceil(t),pt(t.getFullYear()%1e4,e,4)}function IE(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+pt(e/60|0,"0",2)+pt(e%60,"0",2)}function vb(t,e){return pt(t.getUTCDate(),e,2)}function NE(t,e){return pt(t.getUTCHours(),e,2)}function FE(t,e){return pt(t.getUTCHours()%12||12,e,2)}function GE(t,e){return pt(1+_o.count(Ue(t),t),e,3)}function xb(t,e){return pt(t.getUTCMilliseconds(),e,3)}function zE(t,e){return xb(t,e)+"000"}function OE(t,e){return pt(t.getUTCMonth()+1,e,2)}function UE(t,e){return pt(t.getUTCMinutes(),e,2)}function BE(t,e){return pt(t.getUTCSeconds(),e,2)}function YE(t){var e=t.getUTCDay();return e===0?7:e}function WE(t,e){return pt(Jr.count(Ue(t)-1,t),e,2)}function _b(t){var e=t.getUTCDay();return e>=4||e===0?ir(t):ir.ceil(t)}function HE(t,e){return t=_b(t),pt(ir.count(Ue(t),t)+(Ue(t).getUTCDay()===4),e,2)}function qE(t){return t.getUTCDay()}function XE(t,e){return pt($o.count(Ue(t)-1,t),e,2)}function VE(t,e){return pt(t.getUTCFullYear()%100,e,2)}function jE(t,e){return t=_b(t),pt(t.getUTCFullYear()%100,e,2)}function ZE(t,e){return pt(t.getUTCFullYear()%1e4,e,4)}function KE(t,e){var n=t.getUTCDay();return t=n>=4||n===0?ir(t):ir.ceil(t),pt(t.getUTCFullYear()%1e4,e,4)}function QE(){return"+0000"}function wb(){return"%"}function $b(t){return+t}function Sb(t){return Math.floor(+t/1e3)}var ti,th,Ab,ou,eh;Mb({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 Mb(t){return ti=lb(t),th=ti.format,Ab=ti.parse,ou=ti.utcFormat,eh=ti.utcParse,ti}var Tb="%Y-%m-%dT%H:%M:%S.%LZ";function JE(t){return t.toISOString()}var tk=Date.prototype.toISOString?JE:ou(Tb);const ek=tk;function nk(t){var e=new Date(t);return isNaN(e)?null:e}var rk=+new Date("2000-01-01T00:00:00.000Z")?nk:eh(Tb);const ik=rk;function ok(t){return new Date(t)}function ak(t){return t instanceof Date?+t:+new Date(+t)}function nh(t,e,n,r,i,o,a,s,u,c){var l=Bf(),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,ak)):f().map(ok)},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(Ly(S,w)):l},l.copy=function(){return xo(l,nh(t,e,n,r,i,o,a,s,u,c))},l}function sk(){return ge.apply(nh(ub,cb,Oe,ru,Qr,Kr,eu,Js,an,th).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function uk(){return ge.apply(nh(ab,sb,Ue,iu,Jr,_o,nu,tu,an,ou).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function au(){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(Oa),c.unknown=function(h){return arguments.length?(u=h,c):u},function(h){return o=h,n=h(t),r=h(e),i=n===r?0:1/(r-n),c}}function vn(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Pb(){var t=bn(au()(Jt));return t.copy=function(){return vn(t,Pb())},en.apply(t,arguments)}function Db(){var t=Wf(au()).domain([1,10]);return t.copy=function(){return vn(t,Db()).base(t.base())},en.apply(t,arguments)}function Eb(){var t=Hf(au());return t.copy=function(){return vn(t,Eb()).constant(t.constant())},en.apply(t,arguments)}function rh(){var t=qf(au());return t.copy=function(){return vn(t,rh()).exponent(t.exponent())},en.apply(t,arguments)}function ck(){return rh.apply(null,arguments).exponent(.5)}function kb(){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)=>Di(t,o/r))},n.copy=function(){return kb(e).domain(t)},en.apply(n,arguments)}function su(){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=Lg(g,[y,x,v]),d):[c(0),c(.5),c(1)]}}return d.range=p(dn),d.rangeRound=p(Oa),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 Lb(){var t=bn(su()(Jt));return t.copy=function(){return vn(t,Lb())},en.apply(t,arguments)}function Cb(){var t=Wf(su()).domain([.1,1,10]);return t.copy=function(){return vn(t,Cb()).base(t.base())},en.apply(t,arguments)}function Rb(){var t=Hf(su());return t.copy=function(){return vn(t,Rb()).constant(t.constant())},en.apply(t,arguments)}function ih(){var t=qf(su());return t.copy=function(){return vn(t,ih()).exponent(t.exponent())},en.apply(t,arguments)}function lk(){return ih.apply(null,arguments).exponent(.5)}function st(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 fk=st("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),hk=st("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),dk=st("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),pk=st("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),gk=st("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),mk=st("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),yk=st("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),bk=st("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),vk=st("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),xk=st("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),_k=st("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),bt=t=>yg(t[t.length-1]);var Ib=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(st);const wk=bt(Ib);var Nb=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(st);const $k=bt(Nb);var Fb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(st);const Sk=bt(Fb);var Gb=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(st);const Ak=bt(Gb);var zb=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(st);const Mk=bt(zb);var Ob=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(st);const Tk=bt(Ob);var Ub=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(st);const Pk=bt(Ub);var Bb=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(st);const Dk=bt(Bb);var Yb=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(st);const Ek=bt(Yb);var Wb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(st);const kk=bt(Wb);var Hb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(st);const Lk=bt(Hb);var qb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(st);const Ck=bt(qb);var Xb=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(st);const Rk=bt(Xb);var Vb=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(st);const Ik=bt(Vb);var jb=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(st);const Nk=bt(jb);var Zb=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(st);const Fk=bt(Zb);var Kb=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(st);const Gk=bt(Kb);var Qb=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(st);const zk=bt(Qb);var Jb=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(st);const Ok=bt(Jb);var tv=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(st);const Uk=bt(tv);var ev=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(st);const Bk=bt(ev);var nv=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(st);const Yk=bt(nv);var rv=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(st);const Wk=bt(rv);var iv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(st);const Hk=bt(iv);var ov=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(st);const qk=bt(ov);var av=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(st);const Xk=bt(av);var sv=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(st);const Vk=bt(sv);function jk(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 Zk=Ba(Me(300,.5,0),Me(-240,.5,1));var Kk=Ba(Me(-100,.75,.35),Me(80,1.5,.8)),Qk=Ba(Me(260,.75,.35),Me(80,1.5,.8)),uu=Me();function Jk(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return uu.h=360*t-100,uu.s=1.5-1.5*e,uu.l=.8-.9*e,uu+""}var cu=Dr(),tL=Math.PI/3,eL=Math.PI*2/3;function nL(t){var e;return t=(.5-t)*Math.PI,cu.r=255*(e=Math.sin(t))*e,cu.g=255*(e=Math.sin(t+tL))*e,cu.b=255*(e=Math.sin(t+eL))*e,cu+""}function rL(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 lu(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const iL=lu(st("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var oL=lu(st("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),aL=lu(st("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),sL=lu(st("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function ot(t){return function(){return t}}const uv=Math.abs,Ot=Math.atan2,sn=Math.cos,uL=Math.max,ei=Math.min,ie=Math.sin,vt=Math.sqrt,Ut=1e-12,xn=Math.PI,fu=xn/2,_n=2*xn;function cL(t){return t>1?0:t<-1?xn:Math.acos(t)}function cv(t){return t>=1?fu:t<=-1?-fu:Math.asin(t)}function To(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 qi(e)}function lL(t){return t.innerRadius}function fL(t){return t.outerRadius}function hL(t){return t.startAngle}function dL(t){return t.endAngle}function pL(t){return t&&t.padAngle}function gL(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<Ut))return f=(l*(e-o)-h*(t-i))/f,[t+f*u,e+f*c]}function hu(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(uL(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,k=A-y;return I*I+M*M>T*T+k*k&&(_=D,P=A),{cx:_,cy:P,x01:-l,y01:-h,x11:_*(i/$-1),y11:P*(i/$-1)}}function lv(){var t=lL,e=fL,n=ot(0),r=null,i=hL,o=dL,a=pL,s=null,u=To(c);function c(){var l,h,f=+t.apply(this,arguments),d=+e.apply(this,arguments),p=i.apply(this,arguments)-fu,g=o.apply(this,arguments)-fu,m=uv(g-p),y=g>p;if(s||(s=l=u()),d<f&&(h=d,d=f,f=h),!(d>Ut))s.moveTo(0,0);else if(m>_n-Ut)s.moveTo(d*sn(p),d*ie(p)),s.arc(0,0,d,p,g,!y),f>Ut&&(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=_>Ut&&(r?+r.apply(this,arguments):vt(f*f+d*d)),D=ei(uv(d-f)/2,+n.apply(this,arguments)),A=D,I=D,M,T;if(P>Ut){var k=cv(P/f*ie(_)),E=cv(P/d*ie(_));(w-=k*2)>Ut?(k*=y?1:-1,b+=k,$-=k):(w=0,b=$=(p+g)/2),(S-=E*2)>Ut?(E*=y?1:-1,x+=E,v-=E):(S=0,x=v=(p+g)/2)}var N=d*sn(x),O=d*ie(x),L=f*sn($),R=f*ie($);if(D>Ut){var F=d*sn(v),C=d*ie(v),z=f*sn(b),X=f*ie(b),W;if(m<xn)if(W=gL(N,O,z,X,F,C,L,R)){var V=N-W[0],J=O-W[1],ht=F-W[0],q=C-W[1],nt=1/ie(cL((V*ht+J*q)/(vt(V*V+J*J)*vt(ht*ht+q*q)))/2),at=vt(W[0]*W[0]+W[1]*W[1]);A=ei(D,(f-at)/(nt-1)),I=ei(D,(d-at)/(nt+1))}else A=I=0}S>Ut?I>Ut?(M=hu(z,X,N,O,d,I,y),T=hu(F,C,L,R,d,I,y),s.moveTo(M.cx+M.x01,M.cy+M.y01),I<D?s.arc(M.cx,M.cy,I,Ot(M.y01,M.x01),Ot(T.y01,T.x01),!y):(s.arc(M.cx,M.cy,I,Ot(M.y01,M.x01),Ot(M.y11,M.x11),!y),s.arc(0,0,d,Ot(M.cy+M.y11,M.cx+M.x11),Ot(T.cy+T.y11,T.cx+T.x11),!y),s.arc(T.cx,T.cy,I,Ot(T.y11,T.x11),Ot(T.y01,T.x01),!y))):(s.moveTo(N,O),s.arc(0,0,d,x,v,!y)):s.moveTo(N,O),!(f>Ut)||!(w>Ut)?s.lineTo(L,R):A>Ut?(M=hu(L,R,F,C,f,-A,y),T=hu(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,Ot(M.y01,M.x01),Ot(T.y01,T.x01),!y):(s.arc(M.cx,M.cy,A,Ot(M.y01,M.x01),Ot(M.y11,M.x11),!y),s.arc(0,0,f,Ot(M.cy+M.y11,M.cx+M.x11),Ot(T.cy+T.y11,T.cx+T.x11),y),s.arc(T.cx,T.cy,A,Ot(T.y11,T.x11),Ot(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 mL=Array.prototype.slice;function du(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function fv(t){this._context=t}fv.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 pu(t){return new fv(t)}function oh(t){return t[0]}function ah(t){return t[1]}function gu(t,e){var n=ot(!0),r=null,i=pu,o=null,a=To(s);t=typeof t=="function"?t:t===void 0?oh:ot(t),e=typeof e=="function"?e:e===void 0?ah:ot(e);function s(u){var c,l=(u=du(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 hv(t,e,n){var r=null,i=ot(!0),o=null,a=pu,s=null,u=To(c);t=typeof t=="function"?t:t===void 0?oh:ot(+t),e=typeof e=="function"?e:ot(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?ah:ot(+n);function c(h){var f,d,p,g=(h=du(h)).length,m,y=!1,x,v=new Array(g),b=new Array(g);for(o==null&&(s=a(x=u())),f=0;f<=g;++f){if(!(f<g&&i(m=h[f],f,h))===y)if(y=!y)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 gu().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 yL(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function bL(t){return t}function dv(){var t=bL,e=yL,n=null,r=ot(0),i=ot(_n),o=ot(0);function a(s){var u,c=(s=du(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 pv=sh(pu);function gv(t){this._curve=t}gv.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 sh(t){function e(n){return new gv(t(n))}return e._curve=t,e}function Po(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(sh(n)):e()._curve},t}function mv(){return Po(gu().curve(pv))}function yv(){var t=hv().curve(pv),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 Po(n())},delete t.lineX0,t.lineEndAngle=function(){return Po(r())},delete t.lineX1,t.lineInnerRadius=function(){return Po(i())},delete t.lineY0,t.lineOuterRadius=function(){return Po(o())},delete t.lineY1,t.curve=function(a){return arguments.length?e(sh(a)):e()._curve},t}function Do(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class bv{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 vL{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=Do(this._x0,this._y0),i=Do(this._x0,this._y0=(this._y0+n)/2),o=Do(e,this._y0),a=Do(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function vv(t){return new bv(t,!0)}function xv(t){return new bv(t,!1)}function xL(t){return new vL(t)}function _L(t){return t.source}function wL(t){return t.target}function mu(t){let e=_L,n=wL,r=oh,i=ah,o=null,a=null,s=To(u);function u(){let c;const l=mL.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 $L(){return mu(vv)}function SL(){return mu(xv)}function AL(){const t=mu(xL);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const ML=vt(3),_v={draw(t,e){const n=vt(e+ei(e/28,.75))*.59436,r=n/2,i=r*ML;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},yu={draw(t,e){const n=vt(e/xn);t.moveTo(n,0),t.arc(0,0,n,0,_n)}},wv={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()}},$v=vt(1/3),TL=$v*2,Sv={draw(t,e){const n=vt(e/TL),r=n*$v;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},Av={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()}},Mv={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)}},Tv={draw(t,e){const n=vt(e),r=-n/2;t.rect(r,r,n,n)}},Pv={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()}},PL=.8908130915292852,Dv=ie(xn/10)/ie(7*xn/10),DL=ie(_n/10)*Dv,EL=-sn(_n/10)*Dv,Ev={draw(t,e){const n=vt(e*PL),r=DL*n,i=EL*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()}},uh=vt(3),kv={draw(t,e){const n=-vt(e/(uh*3));t.moveTo(0,n*2),t.lineTo(-uh*n,-n),t.lineTo(uh*n,-n),t.closePath()}},kL=vt(3),Lv={draw(t,e){const n=vt(e)*.6824,r=n/2,i=n*kL/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},ye=-.5,be=vt(3)/2,ch=1/vt(12),LL=(ch/2+1)*3,Cv={draw(t,e){const n=vt(e/LL),r=n/2,i=n*ch,o=r,a=n*ch+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()}},lh={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)}},Rv=[yu,wv,Sv,Tv,Ev,kv,Cv],CL=[yu,Mv,lh,Lv,_v,Pv,Av];function RL(t,e){let n=null,r=To(i);t=typeof t=="function"?t:ot(t||yu),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 bu(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 vu(t){this._context=t}vu.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:bu(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:bu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function IL(t){return new vu(t)}function Iv(t){this._context=t}Iv.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:bu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function NL(t){return new Iv(t)}function Nv(t){this._context=t}Nv.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:bu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function FL(t){return new Nv(t)}function Fv(t,e){this._basis=new vu(t),this._beta=e}Fv.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 GL=function t(e){function n(r){return e===1?new vu(r):new Fv(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function xu(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 fh(t,e){this._context=t,this._k=(1-e)/6}fh.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:xu(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:xu(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 zL=function t(e){function n(r){return new fh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function hh(t,e){this._context=t,this._k=(1-e)/6}hh.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:xu(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 OL=function t(e){function n(r){return new hh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function dh(t,e){this._context=t,this._k=(1-e)/6}dh.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:xu(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 UL=function t(e){function n(r){return new dh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function ph(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Ut){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>Ut){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 Gv(t,e){this._context=t,this._alpha=e}Gv.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:ph(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 BL=function t(e){function n(r){return e?new Gv(r,e):new fh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function zv(t,e){this._context=t,this._alpha=e}zv.prototype={areaStart: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:ph(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 YL=function t(e){function n(r){return e?new zv(r,e):new hh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Ov(t,e){this._context=t,this._alpha=e}Ov.prototype={areaStart: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:ph(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 WL=function t(e){function n(r){return e?new Ov(r,e):new dh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Uv(t){this._context=t}Uv.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 HL(t){return new Uv(t)}function Bv(t){return t<0?-1:1}function Yv(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(Bv(o)+Bv(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Wv(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function gh(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:gh(this,this._t0,Wv(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,gh(this,Wv(this,n=Yv(this,t,e)),n);break;default:gh(this,this._t0,n=Yv(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Hv(t){this._context=new qv(t)}(Hv.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 qL(t){return new _u(t)}function XL(t){return new Hv(t)}function Xv(t){this._context=t}Xv.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=Vv(t),i=Vv(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 Vv(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 VL(t){return new Xv(t)}function wu(t,e){this._context=t,this._t=e}wu.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 jL(t){return new wu(t,.5)}function ZL(t){return new wu(t,0)}function KL(t){return new wu(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 QL(t,e){return t[e]}function JL(t){const e=[];return e.key=t,e}function tC(){var t=ot([]),e=ri,n=ni,r=QL;function i(o){var a=Array.from(t.apply(this,arguments),JL),s,u=a.length,c=-1,l;for(const h of o)for(s=0,++c;s<u;++s)(a[s][c]=[0,+r(h,a[s].key,c,o)]).data=h;for(s=0,l=du(e(a));s<u;++s)a[l[s]].index=s;return n(a,l),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o: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 eC(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 nC(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 rC(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 iC(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 jv(t){var e=t.map(oC);return ri(t).sort(function(n,r){return e[n]-e[r]})}function oC(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 Zv(t){var e=t.map(Kv);return ri(t).sort(function(n,r){return e[n]-e[r]})}function Kv(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function aC(t){return Zv(t).reverse()}function sC(t){var e=t.length,n,r,i=t.map(Kv),o=jv(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 uC(t){return ri(t).reverse()}const $u=t=>()=>t;function cC(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 Su=new Be(1,0,0);Qv.prototype=Be.prototype;function Qv(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Su;return t.__zoom}function mh(t){t.stopImmediatePropagation()}function Eo(t){t.preventDefault(),t.stopImmediatePropagation()}function lC(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function fC(){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 Jv(){return this.__zoom||Su}function hC(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function dC(){return navigator.maxTouchPoints||"ontouchstart"in this}function pC(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function t2(){var t=lC,e=fC,n=pC,r=hC,i=dC,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=Pg,c=In("start","zoom","end"),l,h,f,d=500,p=150,g=0,m=10;function y(T){T.property("__zoom",Jv).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,k,E,N){var O=T.selection?T.selection():T;O.property("__zoom",Jv),T!==O?$(T,k,E,N):O.interrupt().each(function(){w(this,arguments).event(N).start().zoom(null,typeof k=="function"?k.apply(this,arguments):k).end()})},y.scaleBy=function(T,k,E,N){y.scaleTo(T,function(){var O=this.__zoom.k,L=typeof k=="function"?k.apply(this,arguments):k;return O*L},E,N)},y.scaleTo=function(T,k,E,N){y.transform(T,function(){var O=e.apply(this,arguments),L=this.__zoom,R=E==null?b(O):typeof E=="function"?E.apply(this,arguments):E,F=L.invert(R),C=typeof k=="function"?k.apply(this,arguments):k;return n(v(x(L,C),R,F),O,a)},E,N)},y.translateBy=function(T,k,E,N){y.transform(T,function(){return n(this.__zoom.translate(typeof k=="function"?k.apply(this,arguments):k,typeof E=="function"?E.apply(this,arguments):E),e.apply(this,arguments),a)},null,N)},y.translateTo=function(T,k,E,N,O){y.transform(T,function(){var L=e.apply(this,arguments),R=this.__zoom,F=N==null?b(L):typeof N=="function"?N.apply(this,arguments):N;return n(Su.translate(F[0],F[1]).scale(R.k).translate(typeof k=="function"?-k.apply(this,arguments):-k,typeof E=="function"?-E.apply(this,arguments):-E),L,a)},N,O)};function x(T,k){return k=Math.max(o[0],Math.min(o[1],k)),k===T.k?T:new Be(k,T.x,T.y)}function v(T,k,E){var N=k[0]-E[0]*T.k,O=k[1]-E[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,k,E,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,L=arguments,R=w(O,L).event(N),F=e.apply(O,L),C=E==null?b(F):typeof E=="function"?E.apply(O,L):E,z=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),X=O.__zoom,W=typeof k=="function"?k.apply(O,L):k,V=u(X.invert(C).concat(z/X.k),W.invert(C).concat(z/W.k));return function(J){if(J===1)J=W;else{var ht=V(J),q=z/ht[2];J=new Be(q,C[0]-ht[0]*q,C[1]-ht[1]*q)}R.zoom(null,J)}})}function w(T,k,E){return!E&&T.__zooming||new S(T,k)}function S(T,k){this.that=T,this.args=k,this.active=0,this.sourceEvent=null,this.extent=e.apply(T,k),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,k){return this.mouse&&T!=="mouse"&&(this.mouse[1]=k.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=k.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=k.invert(this.touch1[0])),this.that.__zoom=k,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var k=K(this.that).datum();c.call(T,this.that,new cC(T,{sourceEvent:this.sourceEvent,target:y,type:T,transform:this.that.__zoom,dispatch:c}),k)}};function _(T,...k){if(!t.apply(this,arguments))return;var E=w(this,k).event(T),N=this.__zoom,O=Math.max(o[0],Math.min(o[1],N.k*Math.pow(2,r.apply(this,arguments)))),L=ae(T);if(E.wheel)(E.mouse[0][0]!==L[0]||E.mouse[0][1]!==L[1])&&(E.mouse[1]=N.invert(E.mouse[0]=L)),clearTimeout(E.wheel);else{if(N.k===O)return;E.mouse=[L,N.invert(L)],Yn(this),E.start()}Eo(T),E.wheel=setTimeout(R,p),E.zoom("mouse",n(v(x(N,O),E.mouse[0],E.mouse[1]),E.extent,a));function R(){E.wheel=null,E.end()}}function P(T,...k){if(f||!t.apply(this,arguments))return;var E=T.currentTarget,N=w(this,k,!0).event(T),O=K(T.view).on("mousemove.zoom",C,!0).on("mouseup.zoom",z,!0),L=ae(T,E),R=T.clientX,F=T.clientY;Ta(T.view),mh(T),N.mouse=[L,this.__zoom.invert(L)],Yn(this),N.start();function C(X){if(Eo(X),!N.moved){var W=X.clientX-R,V=X.clientY-F;N.moved=W*W+V*V>g}N.event(X).zoom("mouse",n(v(N.that.__zoom,N.mouse[0]=ae(X,E),N.mouse[1]),N.extent,a))}function z(X){O.on("mousemove.zoom mouseup.zoom",null),Pa(X.view,N.moved),Eo(X),N.event(X).end()}}function D(T,...k){if(t.apply(this,arguments)){var E=this.__zoom,N=ae(T.changedTouches?T.changedTouches[0]:T,this),O=E.invert(N),L=E.k*(T.shiftKey?.5:2),R=n(v(x(E,L),N,O),e.apply(this,k),a);Eo(T),s>0?K(this).transition().duration(s).call($,R,N,T):K(this).call(y.transform,R,N,T)}}function A(T,...k){if(t.apply(this,arguments)){var E=T.touches,N=E.length,O=w(this,k,T.changedTouches.length===N).event(T),L,R,F,C;for(mh(T),R=0;R<N;++R)F=E[R],C=ae(F,this),C=[C,this.__zoom.invert(C),F.identifier],O.touch0?!O.touch1&&O.touch0[2]!==C[2]&&(O.touch1=C,O.taps=0):(O.touch0=C,L=!0,O.taps=1+!!l);l&&(l=clearTimeout(l)),L&&(O.taps<2&&(h=C[0],l=setTimeout(function(){l=null},d)),Yn(this),O.start())}}function I(T,...k){if(this.__zooming){var E=w(this,k).event(T),N=T.changedTouches,O=N.length,L,R,F,C;for(Eo(T),L=0;L<O;++L)R=N[L],F=ae(R,this),E.touch0&&E.touch0[2]===R.identifier?E.touch0[0]=F:E.touch1&&E.touch1[2]===R.identifier&&(E.touch1[0]=F);if(R=E.that.__zoom,E.touch1){var z=E.touch0[0],X=E.touch0[1],W=E.touch1[0],V=E.touch1[1],J=(J=W[0]-z[0])*J+(J=W[1]-z[1])*J,ht=(ht=V[0]-X[0])*ht+(ht=V[1]-X[1])*ht;R=x(R,Math.sqrt(J/ht)),F=[(z[0]+W[0])/2,(z[1]+W[1])/2],C=[(X[0]+V[0])/2,(X[1]+V[1])/2]}else if(E.touch0)F=E.touch0[0],C=E.touch0[1];else return;E.zoom("touch",n(v(R,F,C),E.extent,a))}}function M(T,...k){if(this.__zooming){var E=w(this,k).event(T),N=T.changedTouches,O=N.length,L,R;for(mh(T),f&&clearTimeout(f),f=setTimeout(function(){f=null},d),L=0;L<O;++L)R=N[L],E.touch0&&E.touch0[2]===R.identifier?delete E.touch0:E.touch1&&E.touch1[2]===R.identifier&&delete E.touch1;if(E.touch1&&!E.touch0&&(E.touch0=E.touch1,delete E.touch1),E.touch0)E.touch0[1]=this.__zoom.invert(E.touch0[0]);else if(E.end(),E.taps===2&&(R=ae(R,this),Math.hypot(h[0]-R[0],h[1]-R[1])<m)){var F=K(this).on("dblclick.zoom");F&&F.apply(this,arguments)}}}return y.wheelDelta=function(T){return arguments.length?(r=typeof T=="function"?T:$u(+T),y):r},y.filter=function(T){return arguments.length?(t=typeof T=="function"?T:$u(!!T),y):t},y.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:$u(!!T),y):i},y.extent=function(T){return arguments.length?(e=typeof T=="function"?T:$u([[+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 e2=Object.freeze(Object.defineProperty({__proto__:null,Adder:Dt,Delaunay:Tl,FormatSpecifier:us,InternMap:Mi,InternSet:Ln,Node:Jn,Path:qi,Voronoi:m1,ZoomTransform:Be,active:yM,arc:lv,area:hv,areaRadial:yv,ascending:_t,autoType:U7,axisBottom:c5,axisLeft:Ep,axisRight:u5,axisTop:Dp,bin:vp,bisect:kn,bisectCenter:i6,bisectLeft:r6,bisectRight:ip,bisector:da,blob:W7,blur:o6,blur2:op,blurImage:a6,brush:EM,brushSelection:TM,brushX:PM,brushY:DM,buffer:q7,chord:LM,chordDirected:RM,chordTranspose:CM,cluster:iP,color:hn,contourDensity:a7,contours:wl,count:ga,create:WA,creator:Sa,cross:d6,csv:j7,csvFormat:E7,csvFormatBody:k7,csvFormatRow:C7,csvFormatRows:L7,csvFormatValue:R7,csvParse:x1,csvParseRows:D7,cubehelix:Me,cumsum:p6,curveBasis:IL,curveBasisClosed:NL,curveBasisOpen:FL,curveBumpX:vv,curveBumpY:xv,curveBundle:GL,curveCardinal:zL,curveCardinalClosed:OL,curveCardinalOpen:UL,curveCatmullRom:BL,curveCatmullRomClosed:YL,curveCatmullRomOpen:WL,curveLinear:pu,curveLinearClosed:HL,curveMonotoneX:qL,curveMonotoneY:XL,curveNatural:VL,curveStep:jL,curveStepAfter:KL,curveStepBefore:ZL,descending:np,deviation:up,difference:Z6,disjoint:K6,dispatch:In,drag:Bp,dragDisable:Ta,dragEnable:Pa,dsv:V7,dsvFormat:is,easeBack:Zg,easeBackIn:cM,easeBackInOut:Zg,easeBackOut:lM,easeBounce:Wi,easeBounceIn:sM,easeBounceInOut:uM,easeBounceOut:Wi,easeCircle:jg,easeCircleIn:K4,easeCircleInOut:jg,easeCircleOut:Q4,easeCubic:Yi,easeCubicIn:Y4,easeCubicInOut:Yi,easeCubicOut:W4,easeElastic:Ka,easeElasticIn:fM,easeElasticInOut:hM,easeElasticOut:Ka,easeExp:Vg,easeExpIn:j4,easeExpInOut:Vg,easeExpOut:Z4,easeLinear:O4,easePoly:Wg,easePolyIn:H4,easePolyInOut:Wg,easePolyOut:q4,easeQuad:Yg,easeQuadIn:U4,easeQuadInOut:Yg,easeQuadOut:B4,easeSin:Xg,easeSinIn:X4,easeSinInOut:Xg,easeSinOut:V4,every:W6,extent:Ai,fcumsum:m6,filter:q6,flatGroup:y6,flatRollup:b6,forceCenter:r9,forceCollide:A1,forceLink:$9,forceManyBody:D1,forceRadial:k9,forceSimulation:P1,forceX:E1,forceY:k1,get format(){return Zi},formatDefaultLocale:z1,formatLocale:G1,get formatPrefix(){return Cl},formatSpecifier:Ur,fsum:g6,geoAlbers:Jm,geoAlbersUsa:NT,geoArea:U9,geoAzimuthalEqualArea:FT,geoAzimuthalEqualAreaRaw:vf,geoAzimuthalEquidistant:GT,geoAzimuthalEquidistantRaw:xf,geoBounds:H9,geoCentroid:K9,geoCircle:Q9,geoClipAntimeridian:Kl,geoClipCircle:_m,geoClipExtent:oT,geoClipRectangle:Es,geoConicConformal:OT,geoConicConformalRaw:ny,geoConicEqualArea:Bs,geoConicEqualAreaRaw:Qm,geoConicEquidistant:BT,geoConicEquidistantRaw:ry,geoContains:hT,geoDistance:Cs,geoEqualEarth:WT,geoEqualEarthRaw:_f,geoEquirectangular:UT,geoEquirectangularRaw:ho,geoGnomonic:HT,geoGnomonicRaw:wf,geoGraticule:km,geoGraticule10:dT,geoIdentity:qT,geoInterpolate:pT,geoLength:wm,geoMercator:zT,geoMercatorRaw:fo,geoNaturalEarth1:XT,geoNaturalEarth1Raw:$f,geoOrthographic:VT,geoOrthographicRaw:Sf,geoPath:MT,geoProjection:ze,geoProjectionMutator:yf,geoRotation:dm,geoStereographic:jT,geoStereographicRaw:Af,geoStream:Pe,geoTransform:TT,geoTransverseMercator:ZT,geoTransverseMercatorRaw:Mf,gray:l8,greatest:xp,greatestIndex:G6,group:hp,groupSort:_6,groups:dp,hcl:Na,hierarchy:Tf,histogram:vp,hsl:La,html:e9,image:K7,index:v6,indexes:x6,interpolate:dn,interpolateArray:m8,interpolateBasis:dg,interpolateBasisClosed:pg,interpolateBlues:Yk,interpolateBrBG:wk,interpolateBuGn:kk,interpolateBuPu:Lk,interpolateCividis:jk,interpolateCool:Qk,interpolateCubehelix:k8,interpolateCubehelixDefault:Zk,interpolateCubehelixLong:Ba,interpolateDate:xg,interpolateDiscrete:v8,interpolateGnBu:Ck,interpolateGreens:Wk,interpolateGreys:Hk,interpolateHcl:D8,interpolateHclLong:E8,interpolateHsl:M8,interpolateHslLong:T8,interpolateHue:x8,interpolateInferno:aL,interpolateLab:P8,interpolateMagma:oL,interpolateNumber:he,interpolateNumberArray:Xc,interpolateObject:_g,interpolateOrRd:Rk,interpolateOranges:Vk,interpolatePRGn:$k,interpolatePiYG:Sk,interpolatePlasma:sL,interpolatePuBu:Nk,interpolatePuBuGn:Ik,interpolatePuOr:Ak,interpolatePuRd:Fk,interpolatePurples:qk,interpolateRainbow:Jk,interpolateRdBu:Mk,interpolateRdGy:Tk,interpolateRdPu:Gk,interpolateRdYlBu:Pk,interpolateRdYlGn:Dk,interpolateReds:Xk,interpolateRgb:Ni,interpolateRgbBasis:yg,interpolateRgbBasisClosed:g8,interpolateRound:Oa,interpolateSinebow:nL,interpolateSpectral:Ek,interpolateString:Zc,interpolateTransformCss:Ag,interpolateTransformSvg:Mg,interpolateTurbo:rL,interpolateViridis:iL,interpolateWarm:Kk,interpolateYlGn:Ok,interpolateYlGnBu:zk,interpolateYlOrBr:Uk,interpolateYlOrRd:Bk,interpolateZoom:Pg,interrupt:Yn,intersection:Q6,interval:N8,isoFormat:ek,isoParse:ik,json:J7,lab:Ia,lch:f8,least:F6,leastIndex:$p,line:gu,lineRadial:mv,link:mu,linkHorizontal:$L,linkRadial:AL,linkVertical:SL,local:Op,map:X6,matcher:Lc,max:Ti,maxIndex:Ac,mean:D6,median:E6,medianIndex:k6,merge:Tc,min:ba,minIndex:Mc,mode:C6,namespace:ki,namespaces:Ec,nice:$c,now:Ui,pack:RP,packEnclose:PP,packSiblings:LP,pairs:R6,partition:IP,path:_l,pathRound:FM,permute:bp,pie:dv,piecewise:Lg,pointRadial:Do,pointer:ae,pointers:qA,polygonArea:KP,polygonCentroid:QP,polygonContains:nD,polygonHull:eD,polygonLength:rD,precisionFixed:O1,precisionPrefix:U1,precisionRound:B1,quadtree:as,quantile:Di,quantileIndex:wp,quantileSorted:_p,quantize:L8,quickselect:va,radialArea:yv,radialLine:mv,randomBates:sD,randomBernoulli:lD,randomBeta:Ay,randomBinomial:My,randomCauchy:hD,randomExponential:uD,randomGamma:Nf,randomGeometric:Sy,randomInt:oD,randomIrwinHall:$y,randomLcg:yD,randomLogNormal:aD,randomLogistic:dD,randomNormal:If,randomPareto:cD,randomPoisson:pD,randomUniform:iD,randomWeibull:fD,range:ln,rank:N6,reduce:V6,reverse:j6,rgb:Dr,ribbon:HM,ribbonArrow:qM,rollup:gp,rollups:mp,scaleBand:zf,scaleDiverging:Lb,scaleDivergingLog:Cb,scaleDivergingPow:ih,scaleDivergingSqrt:lk,scaleDivergingSymlog:Rb,scaleIdentity:ky,scaleImplicit:Ff,scaleLinear:Yf,scaleLog:Ny,scaleOrdinal:Gf,scalePoint:Of,scalePow:Qs,scaleQuantile:Yy,scaleQuantize:Wy,scaleRadial:By,scaleSequential:Pb,scaleSequentialLog:Db,scaleSequentialPow:rh,scaleSequentialQuantile:kb,scaleSequentialSqrt:ck,scaleSequentialSymlog:Eb,scaleSqrt:DD,scaleSymlog:zy,scaleThreshold:Hy,scaleTime:sk,scaleUtc:uk,scan:z6,schemeAccent:hk,schemeBlues:nv,schemeBrBG:Ib,schemeBuGn:Wb,schemeBuPu:Hb,schemeCategory10:fk,schemeDark2:dk,schemeGnBu:qb,schemeGreens:rv,schemeGreys:iv,schemeObservable10:pk,schemeOrRd:Xb,schemeOranges:sv,schemePRGn:Nb,schemePaired:gk,schemePastel1:mk,schemePastel2:yk,schemePiYG:Fb,schemePuBu:jb,schemePuBuGn:Vb,schemePuOr:Gb,schemePuRd:Zb,schemePurples:ov,schemeRdBu:zb,schemeRdGy:Ob,schemeRdPu:Kb,schemeRdYlBu:Ub,schemeRdYlGn:Bb,schemeReds:av,schemeSet1:bk,schemeSet2:vk,schemeSet3:xk,schemeSpectral:Yb,schemeTableau10:_k,schemeYlGn:Jb,schemeYlGnBu:Qb,schemeYlOrBr:tv,schemeYlOrRd:ev,select:K,selectAll:XA,selection:Fn,selector:Aa,selectorAll:kc,shuffle:O6,shuffler:Sp,some:H6,sort:xc,stack:tC,stackOffsetDiverging:nC,stackOffsetExpand:eC,stackOffsetNone:ni,stackOffsetSilhouette:rC,stackOffsetWiggle:iC,stackOrderAppearance:jv,stackOrderAscending:Zv,stackOrderDescending:aC,stackOrderInsideOut:sC,stackOrderNone:ri,stackOrderReverse:uC,stratify:zP,style:Nn,subset:t5,sum:U6,superset:Mp,svg:n9,symbol:RL,symbolAsterisk:_v,symbolCircle:yu,symbolCross:wv,symbolDiamond:Sv,symbolDiamond2:Av,symbolPlus:Mv,symbolSquare:Tv,symbolSquare2:Pv,symbolStar:Ev,symbolTimes:lh,symbolTriangle:kv,symbolTriangle2:Lv,symbolWye:Cv,symbolX:lh,symbols:Rv,symbolsFill:Rv,symbolsStroke:CL,text:os,thresholdFreedmanDiaconis:T6,thresholdScott:P6,thresholdSturges:Sc,tickFormat:Ey,tickIncrement:Rn,tickStep:ya,ticks:Cn,timeDay:Kr,timeDays:ID,get timeFormat(){return th},timeFormatDefaultLocale:Mb,timeFormatLocale:lb,timeFriday:Ky,timeFridays:BD,timeHour:eu,timeHours:CD,timeInterval:Tt,timeMillisecond:Zr,timeMilliseconds:qy,timeMinute:Js,timeMinutes:kD,timeMonday:wo,timeMondays:GD,timeMonth:ru,timeMonths:ZD,get timeParse(){return Ab},timeSaturday:Qy,timeSaturdays:YD,timeSecond:an,timeSeconds:Vy,timeSunday:Qr,timeSundays:Jy,timeThursday:nr,timeThursdays:UD,timeTickInterval:cb,timeTicks:ub,timeTuesday:jy,timeTuesdays:zD,timeWednesday:Zy,timeWednesdays:OD,timeWeek:Qr,timeWeeks:Jy,timeYear:Oe,timeYears:QD,timeout:Jc,timer:qa,timerFlush:Ig,transition:Ug,transpose:Ap,tree:qP,treemap:XP,treemapBinary:VP,treemapDice:vo,treemapResquarify:ZP,treemapSlice:js,treemapSliceDice:jP,treemapSquarify:_y,tsv:Z7,tsvFormat:N7,tsvFormatBody:F7,tsvFormatRow:z7,tsvFormatRows:G7,tsvFormatValue:O7,tsvParse:_1,tsvParseRows:I7,union:e5,unixDay:Kf,unixDays:FD,utcDay:_o,utcDays:ND,get utcFormat(){return ou},utcFriday:nb,utcFridays:VD,utcHour:nu,utcHours:RD,utcMillisecond:Zr,utcMilliseconds:qy,utcMinute:tu,utcMinutes:LD,utcMonday:$o,utcMondays:WD,utcMonth:iu,utcMonths:KD,get utcParse(){return eh},utcSaturday:rb,utcSaturdays:jD,utcSecond:an,utcSeconds:Vy,utcSunday:Jr,utcSundays:ib,utcThursday:ir,utcThursdays:XD,utcTickInterval:sb,utcTicks:ab,utcTuesday:tb,utcTuesdays:HD,utcWednesday:eb,utcWednesdays:qD,utcWeek:Jr,utcWeeks:ib,utcYear:Ue,utcYears:JD,variance:sp,window:Cc,xml:t9,zip:Y6,zoom:t2,zoomIdentity:Su,zoomTransform:Qv},Symbol.toStringTag,{value:"Module"}));function n2(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function gC(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"?Yi:e2[t]??Yi}function Au({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=Yf().domain([0,1]).range([0,t/2]),a=o(n);return lv().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const yh=(t,e)=>e instanceof Function?e(t):Zi(e)(t);function r2(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 yC(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return mC(e)}function Bt(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 bC(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 bh({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 ut(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 ut(t,e,r)}const ko=({selection:t,pluginName:e,clipPathID:n,existedSeriesLabels$:r,gridContainer$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=ut(e,"series"),u=ut(e,"axes"),c=ut(e,"graphic"),l=r.pipe(B((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())),U(p=>H({seriesSelection:Go(p),gridContainer:i})),B(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=H({seriesSelection:l,gridAxesTransform:o}).pipe(U(async p=>p),B(p=>p.seriesSelection.select(`g.${u}`).style("transform",p.gridAxesTransform.value)),Ye(1)),f=h.pipe(B(p=>p.select("defs")),Ye(1)),d=H({axesSelection:h,gridGraphicTransform:a}).pipe(U(async p=>p),B(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}},i2=({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r})=>{const i=new it,o=new lt(a=>{H({dataFormatter:t,computedData:n}).pipe(G(i),U(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(G(i),U(async s=>s)).subscribe(s=>{const u=s.dataFormatter.grid.valueAxis.position==="right"||s.dataFormatter.grid.valueAxis.position==="bottom",c=J3({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 vC(t="curveLinear"){return gu().x(e=>e.axisX).y(e=>e.axisY).curve(e2[t])}function xC(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 _C({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 wC({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 $C({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 o2=(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 it,m=oi(t,"clipPath-box"),y=ut(t,"path"),{seriesSelection$:x,axesSelection$:v,defsSelection$:b,graphicGSelection$:$}=ko({selection:e,pluginName:t,clipPathID:m,existedSeriesLabels$:r,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l}),w=new lt(M=>{const T=a.pipe(G(g)).subscribe(k=>{if(!k)return;const E=vC(k.lineCurve);M.next(E)});return()=>{T.unsubscribe()}}),S=new lt(M=>{n.pipe(G(g),U(async T=>T)).subscribe(T=>{const k=T[0]&&T[0][0]?T.map(E=>E[0].seriesLabel):[];M.next(k)})}),_=u.pipe(B(M=>M.transitionDuration),dt()),P=u.pipe(B(M=>M.transitionEase),dt());H({defsSelection:b,seriesLabels:S,axisSize:h,transitionDuration:_,transitionEase:P}).pipe(G(g),U(async M=>M)).subscribe(M=>{const k=[{id:m,width:M.axisSize.width,height:M.axisSize.height}].concat(M.seriesLabels.map(E=>({id:`orbcharts__clipPath_${E}`,width:M.axisSize.width,height:M.axisSize.height})));$C({defsSelection:M.defsSelection,clipPathData:k,transitionDuration:M.transitionDuration,transitionEase:M.transitionEase})});const D=n.pipe(B(M=>{const T=new Map;return M.flat().forEach(k=>T.set(k.id,k)),T})),A=i2({fullDataFormatter$:s,gridAxesSize$:h,computedData$:n,fullChartParams$:u}),I=u.pipe(G(g),B(M=>M.highlightTarget),dt());return H({graphicGSelection:$,seriesLabels:S,computedData:n,SeriesDataMap:i,GroupDataMap:o,linePath:w,params:a,highlightTarget:I,gridGroupPositionFn:A}).pipe(G(g),U(async M=>M)).subscribe(M=>{M.graphicGSelection.each((T,k,E)=>{const N=xC(M.computedData[k]??[]);_C({selection:K(E[k]),pathClassName:y,linePath:M.linePath,segmentData:N,params:M.params}).on("mouseover",(L,R)=>{L.stopPropagation();const F=R[0]?R[0].seriesLabel:"",{groupIndex:C,groupLabel:z}=M.gridGroupPositionFn(L),V=M.GroupDataMap.get(z).find(J=>J.seriesLabel===F)??R[0];p.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:V,series:M.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:M.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:L,data:M.computedData})}).on("mousemove",(L,R)=>{L.stopPropagation();const F=R[0]?R[0].seriesLabel:"",{groupIndex:C,groupLabel:z}=M.gridGroupPositionFn(L),V=M.GroupDataMap.get(z).find(J=>J.seriesLabel===F)??R[0];p.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:V,series:M.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:M.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:L,data:M.computedData})}).on("mouseout",(L,R)=>{L.stopPropagation();const F=R[0]?R[0].seriesLabel:"",{groupIndex:C,groupLabel:z}=M.gridGroupPositionFn(L),V=M.GroupDataMap.get(z).find(J=>J.seriesLabel===F)??R[0];p.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:V,series:M.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:M.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:L,data:M.computedData})}).on("click",(L,R)=>{L.stopPropagation();const F=R[0]?R[0].seriesLabel:"",{groupIndex:C,groupLabel:z}=M.gridGroupPositionFn(L),V=M.GroupDataMap.get(z).find(J=>J.seriesLabel===F)??R[0];p.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:V,series:M.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:M.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:L,data:M.computedData})})})}),u.pipe(G(g),zo(M=>M.highlightTarget==="series"),U(M=>H({graphicGSelection:$,highlight:f,DataMap:D,fullChartParams:u}).pipe(G(g),U(async T=>T)))).subscribe(M=>{const T=M.DataMap.get(M.highlight[0]);wC({selection:M.graphicGSelection,seriesLabel:T&&T.seriesLabel?T.seriesLabel:null,fullChartParams:M.fullChartParams})}),()=>{g.next(void 0)}},a2="Lines",SC=fe(a2,ar)(({selection:t,name:e,observer:n,subject:r})=>{const i=new it,o=o2(a2,{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()}}),s2=.3;function u2({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 AC(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Of().domain(e).range([-i/2+r,i/2-r])}function MC(t,e){return t<=1?0:e/(t-1)*s2}function TC(t,e){return t<=1?e:e*(1-s2)}function PC({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 DC({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 EC({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 vh=(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 it,x=oi(t,"clipPath-box"),v=ut(t,"rect"),{seriesSelection$:b,axesSelection$:$,defsSelection$:w,graphicGSelection$:S}=ko({selection:e,pluginName:t,clipPathID:x,existedSeriesLabels$:i,gridContainer$:p,gridAxesTransform$:c,gridGraphicTransform$:l}),_=r.pipe(G(y),B(L=>L.map(R=>R[0]?R[0].axisY-R[0].axisYFromZero:0)),dt()),P=H({computedData:n,visibleComputedData:r,params:s,gridAxesSize:f,isSeriesPositionSeprate:g}).pipe(G(y),U(async L=>L),B(L=>L.params.barWidth?L.params.barWidth:L.isSeriesPositionSeprate?u2({axisWidth:L.gridAxesSize.width,groupAmount:L.computedData[0]?L.computedData[0].length:0,barAmountOfGroup:1,barPadding:L.params.barPadding,barGroupPadding:L.params.barGroupPadding}):u2({axisWidth:L.gridAxesSize.width,groupAmount:L.computedData[0]?L.computedData[0].length:0,barAmountOfGroup:L.visibleComputedData.length,barPadding:L.params.barPadding,barGroupPadding:L.params.barGroupPadding})),dt()),D=H({computedData:n,barWidth:P,params:s,gridGraphicReverseScale:h}).pipe(G(y),U(async L=>L),B(L=>{const R=L.barWidth/2,F=L.params.barRadius===!0?R:L.params.barRadius===!1?0:typeof L.params.barRadius=="number"?L.params.barRadius:0;return L.computedData.map((C,z)=>{const X=L.gridGraphicReverseScale[z]??L.gridGraphicReverseScale[0];let W=F*X[0],V=F*X[1];if(W>R){const J=R/W;W=W*J,V=V*J}return[W,V]})})),A=r.pipe(G(y),B(L=>{const R=new Set;return L.forEach(F=>{F.forEach(C=>{R.add(C.seriesLabel)})}),Array.from(R)})),I=r.pipe(G(y),B(L=>{const R=new Set;return L.forEach(F=>{F.forEach(C=>{R.add(C.groupLabel)})}),Array.from(R)})),M=H({seriesLabels:A,barWidth:P,params:s}).pipe(G(y),U(async L=>L),B(L=>AC(L.barWidth,L.seriesLabels,L.params))),T=u.pipe(G(y),B(L=>L.transitionDuration),dt()),k=new lt(L=>{H({groupLabels:I,transitionDuration:T}).pipe(U(async R=>R)).subscribe(R=>{const F=MC(R.groupLabels.length,R.transitionDuration);L.next(F)})}).pipe(G(y),dt()),E=new lt(L=>{H({groupLabels:I,transitionDuration:T}).pipe(U(async R=>R)).subscribe(R=>{const F=TC(R.groupLabels.length,R.transitionDuration);L.next(F)})}).pipe(G(y),dt());H({defsSelection:w,gridAxesSize:f}).pipe(G(y),U(async L=>L)).subscribe(L=>{const R=[{id:x,width:L.gridAxesSize.width,height:L.gridAxesSize.height}];DC({defsSelection:L.defsSelection,clipPathData:R})});const N=u.pipe(G(y),B(L=>L.highlightTarget),dt()),O=new it;return H({graphicGSelection:S,computedData:n,zeroYArr:_,groupLabels:I,barScale:M,params:s,chartParams:u,highlightTarget:N,barWidth:P,transformedBarRadius:D,delayGroup:k,transitionItem:E,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:g}).pipe(G(y),U(async L=>L)).subscribe(L=>{const R=PC({graphicGSelection:L.graphicGSelection,rectClassName:v,computedData:L.computedData,zeroYArr:L.zeroYArr,groupLabels:L.groupLabels,barScale:L.barScale,params:L.params,chartParams:L.chartParams,barWidth:L.barWidth,transformedBarRadius:L.transformedBarRadius,delayGroup:L.delayGroup,transitionItem:L.transitionItem,isSeriesPositionSeprate:L.isSeriesPositionSeprate});R.on("mouseover",(F,C)=>{F.stopPropagation(),m.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:L.highlightTarget,datum:C,series:L.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:L.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:F,data:L.computedData})}).on("mousemove",(F,C)=>{F.stopPropagation(),m.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:L.highlightTarget,datum:C,series:L.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:L.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:F,data:L.computedData})}).on("mouseout",(F,C)=>{F.stopPropagation(),m.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:L.highlightTarget,datum:C,series:L.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:L.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:F,data:L.computedData})}).on("click",(F,C)=>{F.stopPropagation(),m.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:L.highlightTarget,datum:C,series:L.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:L.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:F,data:L.computedData})}),O.next(R)}),H({barSelection:O,highlight:d,fullChartParams:u}).pipe(G(y),U(async L=>L)).subscribe(L=>{EC({selection:L.barSelection,ids:L.highlight,fullChartParams:L.fullChartParams})}),()=>{y.next(void 0)}},c2="Bars",kC=fe(c2,Co)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=vh(c2,{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()}}),l2="BarsDiverging",LC=fe(l2,Co)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=vh(l2,{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$:Go(!0),event$:n.event$});return()=>{i.next(void 0),o()}}),f2=.3;function CC({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function RC(t,e){return t<=1?0:e/(t-1)*f2}function IC(t,e){return t<=1?e:e*(1-f2)}function NC({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 FC({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 GC({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 h2=(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 it,v=oi(t,"clipPath-box"),b=ut(t,"rect"),{seriesSelection$:$,axesSelection$:w,defsSelection$:S,graphicGSelection$:_}=ko({selection:e,pluginName:t,clipPathID:v,existedSeriesLabels$:i,gridContainer$:g,gridAxesTransform$:l,gridGraphicTransform$:h}),P=r.pipe(G(x),B(C=>C[0]&&C[0][0]?C[0][0].axisY-C[0][0].axisYFromZero:0),dt()),D=H({computedData:n,params:s,axisSize:d,isSeriesPositionSeprate:m}).pipe(G(x),U(async C=>C),B(C=>C.params.barWidth?C.params.barWidth:CC({axisWidth:C.axisSize.width,groupAmount:C.computedData[0]?C.computedData[0].length:0,barGroupPadding:C.params.barGroupPadding})),dt()),A=H({computedData:n,barWidth:D,params:s,gridGraphicReverseScale:f}).pipe(G(x),U(async C=>C),B(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((W,V)=>{const J=C.gridGraphicReverseScale[V]??C.gridGraphicReverseScale[0],ht=X*J[0],q=X*J[1];return[ht,q]})})),I=r.pipe(G(x),B(C=>{const z=new Set;return C.forEach(X=>{X.forEach(W=>{z.add(W.groupLabel)})}),Array.from(z)})),M=c.pipe(G(x),B(C=>C.transitionDuration),dt()),T=new lt(C=>{H({groupLabels:I,transitionDuration:M}).pipe(U(async z=>z)).subscribe(z=>{const X=RC(z.groupLabels.length,z.transitionDuration);C.next(X)})}).pipe(G(x),dt()),k=new lt(C=>{H({groupLabels:I,transitionDuration:M}).pipe(U(async z=>z)).subscribe(z=>{const X=IC(z.groupLabels.length,z.transitionDuration);C.next(X)})}).pipe(G(x),dt()),E=H({computedData:n,dataFormatter:u}).pipe(G(x),U(async C=>C),B(C=>{const X=C.computedData[0]?C.computedData[0].length-1:0,W=C.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-C.dataFormatter.grid.groupAxis.scalePadding:C.dataFormatter.grid.groupAxis.scaleDomain[0]-C.dataFormatter.grid.groupAxis.scalePadding,V=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(ht=>ht.filter((q,nt)=>q.groupIndex>=W&&q.groupIndex<=V));if(J.length<=1)return 1;{const ht=J.flat().map(Y=>Y.axisYFromZero),q=Math.max(...ht),nt=C.computedData[0]?C.computedData[0].map((Y,xt)=>C.computedData.reduce((gt,Nt)=>gt+Nt[xt].axisYFromZero,0)):[],at=Math.max(...nt);return q/at}})),N=H({computedData:n,yRatio:E,zeroY:P}).pipe(G(x),B(C=>{let z=C.computedData[0]?C.computedData[0].map(()=>C.zeroY):[];return C.computedData.map((X,W)=>X.map((V,J)=>{const ht=z[J],q=V.axisYFromZero*C.yRatio;return z[J]=z[J]+q,{...V,_barStartY:ht,_barHeight:q}}))})),O=H({computedData:n,zeroY:P}).pipe(G(x),B(C=>C.computedData.map((z,X)=>z.map((W,V)=>({...W,_barStartY:C.zeroY,_barHeight:W.axisYFromZero}))))),L=m.pipe(U(C=>y0(()=>C,O,N)));H({defsSelection:S,gridAxesSize:d}).pipe(G(x),U(async C=>C)).subscribe(C=>{const z=[{id:v,width:C.gridAxesSize.width,height:C.gridAxesSize.height}];FC({defsSelection:C.defsSelection,clipPathData:z})});const R=c.pipe(G(x),B(C=>C.highlightTarget),dt()),F=new it;return H({graphicGSelection:_,graphicData:L,zeroY:P,groupLabels:I,params:s,chartParams:c,highlightTarget:R,barWidth:D,transformedBarRadius:A,delayGroup:T,transitionItem:k,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:m}).pipe(G(x),U(async C=>C)).subscribe(C=>{const z=NC({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,W)=>{X.stopPropagation(),y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:C.highlightTarget,datum:W,series:C.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:C.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:X,data:C.graphicData})}).on("mousemove",(X,W)=>{X.stopPropagation(),y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:C.highlightTarget,datum:W,series:C.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:C.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:X,data:C.graphicData})}).on("mouseout",(X,W)=>{X.stopPropagation(),y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:C.highlightTarget,datum:W,series:C.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:C.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:X,data:C.graphicData})}).on("click",(X,W)=>{X.stopPropagation(),y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:C.highlightTarget,datum:W,series:C.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:C.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:X,data:C.graphicData})}),F.next(z)}),H({barSelection:F,highlight:p,fullChartParams:c}).pipe(G(x),U(async C=>C)).subscribe(C=>{GC({selection:C.barSelection,ids:C.highlight,fullChartParams:C.fullChartParams})}),()=>{x.next(void 0)}},d2="BarStack",zC=fe(d2,Gh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=h2(d2,{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()}}),p2=.3;function g2({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=(t/(e-1)-i)/n-r;return a>1?a:1}function OC(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Of().domain(e).range([-i/2+r,i/2-r])}function UC(t,e){return t<=1?0:e/(t-1)*p2}function BC(t,e){return t<=1?e:e*(1-p2)}function YC({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 WC({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`
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
10
  <stop offset="0%" stop-color="${o}" stop-opacity="${n.linearGradientOpacity[0]}"/>
11
11
  <stop offset="100%" stop-color="${o}" stop-opacity="${n.linearGradientOpacity[1]}"/>
12
- `})}function HC({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 m2=(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 it,y=oi(t,"clipPath-box"),x=ut(t,"pathG"),v=ut(t,"path"),{seriesSelection$:b,axesSelection$:$,defsSelection$:w,graphicGSelection$:S}=ko({selection:e,pluginName:t,clipPathID:y,existedSeriesLabels$:i,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l}),_=r.pipe(B(R=>R.map(F=>F[0]?F[0].axisY-F[0].axisYFromZero:0)),dt()),P=H({computedData:n,visibleComputedData:r,params:s,gridAxesSize:h,isSeriesPositionSeprate:p}).pipe(G(m),U(async R=>R),B(R=>R.params.barWidth?R.params.barWidth:R.isSeriesPositionSeprate?g2({axisWidth:R.gridAxesSize.width,groupAmount:R.computedData[0]?R.computedData[0].length:0,barAmountOfGroup:1,barPadding:R.params.barPadding,barGroupPadding:R.params.barGroupPadding}):g2({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(G(m),B(R=>{const F=new Set;return R.forEach(C=>{C.forEach(z=>{F.add(z.seriesLabel)})}),Array.from(F)})),A=r.pipe(G(m),B(R=>{const F=new Set;return R.forEach(C=>{C.forEach(z=>{F.add(z.groupLabel)})}),Array.from(F)})),I=new lt(R=>{H({seriesLabels:D,barWidth:P,params:s}).pipe(G(m),U(async F=>F)).subscribe(F=>{const C=OC(F.barWidth,F.seriesLabels,F.params);R.next(C)})}),M=u.pipe(G(m),B(R=>R.transitionDuration),dt()),T=new lt(R=>{H({groupLabels:A,transitionDuration:M}).pipe(U(async F=>F)).subscribe(F=>{const C=UC(F.groupLabels.length,F.transitionDuration);R.next(C)})}).pipe(G(m),dt()),k=new lt(R=>{H({groupLabels:A,transitionDuration:M}).pipe(U(async F=>F)).subscribe(F=>{const C=BC(F.groupLabels.length,F.transitionDuration);R.next(C)})}).pipe(G(m),dt());H({defsSelection:w,gridAxesSize:h}).pipe(G(m),U(async R=>R)).subscribe(R=>{const F=[{id:y,width:R.gridAxesSize.width,height:R.gridAxesSize.height}];HC({defsSelection:R.defsSelection,clipPathData:F})});const E=u.pipe(G(m),B(R=>R.highlightTarget),dt()),N=new it,O=D.pipe(G(m),B(R=>R.map((F,C)=>oi(t,`lineargradient-${F}`)))),L=H({linearGradientIds:O,computedData:n}).pipe(G(m),U(async R=>R),B(R=>R.computedData.map((F,C)=>F.map((z,X)=>({linearGradientId:R.linearGradientIds[C],...z})))));return H({graphicGSelection:S,defsSelection:w,computedData:n,barData:L,zeroYArr:_,groupLabels:A,barScale:I,params:s,chartParams:u,highlightTarget:E,barWidth:P,delayGroup:T,transitionItem:k,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:p}).pipe(G(m),U(async R=>R)).subscribe(R=>{const F=YC({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});WC({defsSelection:R.defsSelection,barData:R.barData,params:R.params}),F.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(F)}),H({barSelection:N,highlight:f,fullChartParams:u}).pipe(G(m),U(async R=>R)).subscribe(R=>{qC({selection:R.barSelection,ids:R.highlight,fullChartParams:R.fullChartParams})}),()=>{m.next(void 0)}},y2="BarsTriangle",XC=fe(y2,zh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=m2(y2,{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 VC({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)=>bh({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,y)=>bh({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 jC({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 ZC({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 b2=(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 it,y=oi(t,"clipPath-box"),x=ut(t,"circleG"),v=ut(t,"circle"),b=new it,{seriesSelection$:$,axesSelection$:w,defsSelection$:S,graphicGSelection$:_}=ko({selection:e,pluginName:t,clipPathID:y,existedSeriesLabels$:i,gridContainer$:p,gridAxesTransform$:c,gridGraphicTransform$:l}),P=H({computedData:n,gridGraphicReverseScale:h}).pipe(G(m),U(async M=>M),B(M=>M.computedData.map((T,k)=>M.gridGraphicReverseScale[k])));H({defsSelection:S,gridAxesSize:f}).pipe(G(m),U(async M=>M)).subscribe(M=>{const T=[{id:y,width:M.gridAxesSize.width,height:M.gridAxesSize.height}];ZC({defsSelection:M.defsSelection,clipPathData:T})});const D=u.pipe(G(m),B(M=>M.highlightTarget),dt());H({graphicGSelection:_,computedData:n,visibleComputedData:r,SeriesDataMap:o,GroupDataMap:a,graphicReverseScale:P,fullChartParams:u,fullParams:s,highlightTarget:D}).pipe(G(m),U(async M=>M)).subscribe(M=>{const T=VC({graphicGSelection:M.graphicGSelection,circleGClassName:x,circleClassName:v,data:M.visibleComputedData,fullParams:M.fullParams,fullChartParams:M.fullChartParams,graphicReverseScale:M.graphicReverseScale});T.on("mouseover",(k,E)=>{k.stopPropagation(),g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:E,series:M.SeriesDataMap.get(E.seriesLabel),seriesIndex:E.seriesIndex,seriesLabel:E.seriesLabel,groups:M.GroupDataMap.get(E.groupLabel),groupIndex:E.groupIndex,groupLabel:E.groupLabel,event:k,data:M.computedData})}).on("mousemove",(k,E)=>{k.stopPropagation(),g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,data:M.computedData,datum:E,series:M.SeriesDataMap.get(E.seriesLabel),seriesIndex:E.seriesIndex,seriesLabel:E.seriesLabel,groups:M.GroupDataMap.get(E.groupLabel),groupIndex:E.groupIndex,groupLabel:E.groupLabel,event:k})}).on("mouseout",(k,E)=>{k.stopPropagation(),g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:E,series:M.SeriesDataMap.get(E.seriesLabel),seriesIndex:E.seriesIndex,seriesLabel:E.seriesLabel,groups:M.GroupDataMap.get(E.groupLabel),groupIndex:E.groupIndex,groupLabel:E.groupLabel,event:k,data:M.computedData})}).on("click",(k,E)=>{k.stopPropagation(),g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:E,series:M.SeriesDataMap.get(E.seriesLabel),seriesIndex:E.seriesIndex,seriesLabel:E.seriesLabel,groups:M.GroupDataMap.get(E.groupLabel),groupIndex:E.groupIndex,groupLabel:E.groupLabel,event:k,data:M.computedData})}),b.next(T)});const A=d.subscribe(),I=s.pipe(G(m),B(M=>M.onlyShowHighlighted),dt());return u.pipe(G(m),U(M=>H({graphicSelection:b,highlight:d,onlyShowHighlighted:I,fullChartParams:u}).pipe(G(m),U(async T=>T)))).subscribe(M=>{jC({selection:M.graphicSelection,ids:M.highlight,onlyShowHighlighted:M.onlyShowHighlighted,fullChartParams:M.fullChartParams})}),()=>{m.next(void 0),A.unsubscribe()}},v2="Dots",KC=fe(v2,Nh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=b2(v2,{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()}}),QC={listRectWidth:14,listRectHeight:14,listRectRadius:0},xh=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o})=>{const a=ut(t,"root-position"),s=ut(t,"legend-card"),u=ut(t,"legend-list"),c=ut(t,"legend-item"),l=new it,h=H({seriesLabels:n,fullChartParams:o}).pipe(G(l),U(async _=>_),B(_=>{const P=new Map;let D=0;return _.seriesLabels.forEach((A,I)=>{if(!P.has(A)){const M=bC(D,_.fullChartParams);P.set(A,M),D++}}),P})),f=n.pipe(G(l),B(_=>{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(G(l),B(_=>_.position==="bottom"||_.position==="top"?"row":"column")),p=H({fullParams:r,layout:i}).pipe(G(l),U(async _=>_),B(_=>{const P=_.fullParams.padding*2+_.fullParams.gap*2;return _.fullParams.position==="bottom"||_.fullParams.position==="top"?_.layout.rootWidth-P:_.layout.rootHeight-P})),m=H({layout:i,fullParams:r}).pipe(G(l),U(async _=>_),B(_=>{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(G(l),B(_=>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(G(l),B(_=>_.seriesList[0]?_.seriesList[0]:QC)),x=H({visibleList:f,fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:d,lineMaxSize:p,defaultListStyle:y,SeriesLabelColorMap:h}).pipe(G(l),U(async _=>_),B(_=>_.seriesLabels.reduce((P,D,A)=>{if(!_.visibleList[A])return P;const I=r2(D,_.fullChartParams.styles.textSize),M=_.fullChartParams.styles.textSize*1.5+I,T=_.SeriesLabelColorMap.get(D),k=P[0]&&P[0][0]?P[P.length-1][P[P.length-1].length-1]:null,{translateX:E,translateY:N,lineIndex:O,itemIndex:L}=((F,C,z)=>{let X=0,W=0,V=0,J=0;if(F.lineDirection==="column"){let ht=z?z.translateY+F.fullChartParams.styles.textSize+F.fullParams.gap:0;if(ht+F.fullChartParams.styles.textSize>F.lineMaxSize){V=z.lineIndex+1,J=0,W=0;const q=C[C.length-1].reduce((nt,at)=>at.itemWidth>nt?at.itemWidth:nt,0);X=z.translateX+q+F.fullParams.gap}else V=z?z.lineIndex:0,J=z?z.itemIndex+1:0,W=ht,X=z?z.translateX:0}else{let ht=z?z.translateX+z.itemWidth+F.fullParams.gap:0;ht+M>F.lineMaxSize?(V=z.lineIndex+1,J=0,X=0):(V=z?z.lineIndex:0,J=z?z.itemIndex+1:0,X=ht),W=(F.fullChartParams.styles.textSize+F.fullParams.gap)*V}return{translateX:X,translateY:W,lineIndex:V,itemIndex:J}})(_,P,k);P[O]||(P[O]=[]);const R=_.fullParams.seriesList[L]?_.fullParams.seriesList[L]:_.defaultListStyle;return P[O].push({id:D,seriesLabel:D,seriesIndex:A,lineIndex:O,itemIndex:L,text:D,itemWidth:M,translateX:E,translateY:N,color:T,listRectWidth:R.listRectWidth,listRectHeight:R.listRectHeight,listRectRadius:R.listRectRadius}),P},[])),Ye(1)),v=H({fullParams:r,fullChartParams:o,lineDirection:d,lengendItems:x}).pipe(G(l),U(async _=>_),B(_=>{const{width:P,height:D}=((A,I)=>{let M=0,T=0;if(!I.length||!I[0].length)return{width:M,height:T};const k=I[0][I[0].length-1];return A.lineDirection==="column"?(M=I.reduce((E,N)=>{const O=N.reduce((L,R)=>R.itemWidth>L?R.itemWidth:L,0);return E+O},0),M+=A.fullParams.gap*(I.length-1),T=k.translateY+A.fullChartParams.styles.textSize):(M=k.translateX+k.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=H({fullParams:r,lengendList:v}).pipe(G(l),U(async _=>_),B(_=>{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}})),$=H({rootPositionSelection:m,fullParams:r,fullChartParams:o,legendCard:b}).pipe(G(l),U(async _=>_),B(_=>_.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",Bt(_.fullParams.backgroundFill,_.fullChartParams)).attr("stroke",Bt(_.fullParams.backgroundStroke,_.fullChartParams))}))),w=H({lengendCardSelection:$,fullParams:r,lengendList:v}).pipe(G(l),U(async _=>_),B(_=>_.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 H({lengendListSelection:w,fullParams:r,fullChartParams:o,lengendItems:x}).pipe(G(l),U(async _=>_),B(_=>{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,k=-D.listRectHeight/2;K(I[A]).selectAll("rect").data([D]).join("rect").attr("x",M).attr("y",M).attr("width",E=>E.listRectWidth).attr("height",E=>E.listRectHeight).attr("transform",E=>`translate(${T}, ${k})`).attr("fill",E=>E.color).attr("rx",E=>E.listRectRadius),K(I[A]).selectAll("text").data([D]).join(E=>E.append("text").attr("dominant-baseline","hanging"),E=>E,E=>E.remove()).attr("x",_.fullChartParams.styles.textSize*1.5).attr("font-size",_.fullChartParams.styles.textSize).text(E=>E.text)})})).subscribe(),()=>{l.next(void 0)}},x2="GridLegend",JC=fe(x2,Yh)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new it,o=n.SeriesDataMap$.pipe(G(i),B(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(G(i),B(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=xh(x2,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}}),_h=6;function tR({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",Bt(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=Dp(c).scale(c).tickSize(r.tickFullLine==!0?-a.height:_h).tickSizeOuter(0).tickFormat(p=>yh(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?Bt(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),d.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Bt(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",Bt(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 _2=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainer$:c,isSeriesPositionSeprate$:l})=>{const h=new it,f=ut(t,"container"),d=ut(t,"xAxisG"),p=ut(t,"xAxis"),g=ut(t,"groupingLabel"),m=H({computedData:n.pipe(dt((w,S)=>w.length===S.length)),isSeriesPositionSeprate:l}).pipe(G(h),U(async w=>w),B(w=>w.isSeriesPositionSeprate?w.computedData:[w.computedData[0]]),B((w,S)=>e.selectAll(`g.${f}`).data(w,_=>_[0]?_[0].seriesIndex:S).join("g").classed(f,!0))),y=m.pipe(G(h),B((w,S)=>w.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));H({containerSelection:m,gridContainer:c}).pipe(G(h),U(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]})`})}),H({axisSelection:y,gridAxesTransform:a}).pipe(G(h),U(async w=>w)).subscribe(w=>{w.axisSelection.style("transform",w.gridAxesTransform.value)});const x=H({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainer:c}).pipe(G(h),U(async w=>w),B(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}`}),dt()),v=new lt(w=>{H({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(G(h),U(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),k=S.fullDataFormatter.grid.groupAxis.scalePadding,E=tp({axisLabels:T,axisWidth:S.gridAxesSize.width,padding:k});w.next(E)})}),b=H({fullDataFormatter:i,fullParams:r}).pipe(G(h),U(async w=>w),B(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(G(h),B(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 H({axisSelection:y,params:r,tickTextAlign:b,axisLabelAlign:$,gridAxesSize:u,fullDataFormatter:i,chartParams:o,groupScale:v,textTransform:x}).pipe(G(h),U(async w=>w)).subscribe(w=>{tR({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)}},w2="GroupAxis",eR=fe(w2,Oh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new it,o=_2(w2,{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()}}),$2=6;function nR({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",Bt(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=Ep(c).scale(c).ticks(d>r.ticks?r.ticks:h[0]===0&&h[1]===0?1:Math.ceil(d)).tickFormat(y=>yh(y,r.tickFormat)).tickSize(r.tickFullLine==!0?-a.width:$2).tickPadding(r.tickPadding),g=f.transition().duration(100).call(p);return g.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Bt(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),g.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Bt(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",Bt(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`-${r.tickPadding+$2} 0`).style("transform",l),f}const Mu=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainer$:c,isSeriesPositionSeprate$:l})=>{const h=new it,f=ut(t,"container"),d=ut(t,"yAxisG"),p=ut(t,"yAxis"),g=ut(t,"text"),m=H({computedData:n.pipe(dt((S,_)=>S.length===_.length)),isSeriesPositionSeprate:l}).pipe(G(h),U(async S=>S),B(S=>S.isSeriesPositionSeprate?S.computedData:[S.computedData[0]]),B((S,_)=>e.selectAll(`g.${f}`).data(S,P=>P[0]?P[0].seriesIndex:_).join("g").classed(f,!0))),y=m.pipe(G(h),B((S,_)=>S.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));H({containerSelection:m,gridContainer:c}).pipe(G(h),U(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]})`})}),H({axisSelection:y,gridAxesTransform:a}).pipe(G(h),U(async S=>S)).subscribe(S=>{S.axisSelection.style("transform",S.gridAxesTransform.value)});const x=H({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainer:c}).pipe(G(h),U(async S=>S),B(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}`}),dt()),v=new lt(S=>{H({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(G(h),U(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((k,E)=>k.filter((N,O)=>O>=A&&O<=I)),T=yC(M.flat());S.next(T)})}),b=new lt(S=>{H({fullDataFormatter:i,gridAxesSize:u,minAndMax:v}).pipe(G(h),U(async _=>_)).subscribe(_=>{console.log(_);const P=Jd({maxValue:_.minAndMax[1],minValue:_.minAndMax[0],axisWidth:_.gridAxesSize.height,scaleDomain:_.fullDataFormatter.grid.valueAxis.scaleDomain,scaleRange:_.fullDataFormatter.grid.valueAxis.scaleRange});S.next(P)})}),$=i.pipe(G(h),B(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(G(h),B(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 H({axisSelection:y,fullParams:r,tickTextAlign:$,axisLabelAlign:w,computedData:n,gridAxesSize:u,fullDataFormatter:i,fullChartParams:o,valueScale:b,textTransform:x,minAndMax:v}).pipe(G(h),U(async S=>S)).subscribe(S=>{nR({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)}},S2="ValueAxis",rR=fe(S2,Tu)(({selection:t,name:e,observer:n,subject:r})=>{const i=new it,o=Mu(S2,{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()}}),A2="ValueStackAxis",iR=fe(A2,Uh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new it,o=n.computedData$.pipe(G(i),B(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=Mu(A2,{selection:t,computedData$:n.isSeriesPositionSeprate$.pipe(U(s=>y0(()=>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()}}),M2="ScalingArea",oR=ut(M2,"rect"),aR=fe(M2,Bh)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new it,a=e.insert("rect","g").classed(oR,!0).attr("opacity",0);let s={k:1,x:0,y:0};r.layout$.pipe(G(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(B(c=>c[0]?c[0].length-1:0),dt());return H({initGroupAxis:r.fullDataFormatter$.pipe(B(c=>c.grid.groupAxis),ui()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:u,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(G(o),U(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=Jd({maxValue:c.groupMaxIndex,minValue:0,axisWidth:c.axisSize.width,scaleDomain:[f,d],scaleRange:p}).copy(),y=t2().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 sR(t,e){let n=new lt(()=>{});return t.each(function(){const r=Ou(this,e);n=Uu(n,r)}),n}const wh="GroupAux",$h=ut(wh,"label-box");function uR({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function cR({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=ut(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),s=a.enter().append("line").classed(o,!0).style("stroke",c=>Bt(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 lR(t){t.selectAll("line").data([]).exit().remove()}function fR({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:yh(t,n.labelTextFormat)}]:[]}function hR({selection:t,labelData:e,fullParams:n,fullChartParams:r,gridAxesReverseTransformValue:i}){const o=r.styles.textSize+4,a=t.selectAll(`g.${$h}`).data(e),s=a.enter().append("g").classed($h,!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=r2(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=>Bt(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=>Bt(n.labelTextColorType,r)).attr("font-size",r.styles.textSize).attr("x",d+6),m.exit().remove()}),u}function dR(t){t.selectAll(`g.${$h}`).data([]).exit().remove()}const pR=fe(wh,Fh)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new it,a=e.insert("rect","g").classed(ut(wh,"rect"),!0).attr("opacity",0),s=t.append("g");i.layout$.pipe(G(o)).subscribe(f=>{a.attr("width",f.rootWidth).attr("height",f.rootHeight)}),i.gridAxesTransform$.pipe(G(o),B(f=>f.value),dt()).subscribe(f=>{s.style("transform",f)});const u=new lt(f=>{H({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(G(o),U(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=tp({axisLabels:b,axisWidth:d.gridAxesSize.width,padding:$});f.next(w)})}),c=i2({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),l=i.fullChartParams$.pipe(G(o),B(f=>f.highlightTarget),dt());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(G(o),U(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})})}),H({event:r.event$.pipe(zo(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(G(o),U(async f=>f)).subscribe(f=>{const d=f.groupScale(f.event.groupLabel)??0,p=uR({groupLabel:f.event.groupLabel,axisX:d,axisHeight:f.gridAxesSize.height,fullParams:f.fullParams});cR({selection:s,pluginName:n,lineData:p,fullParams:f.fullParams,fullChartParams:f.fullChartParams});const g=fR({groupLabel:f.event.groupLabel,axisX:d,fullParams:f.fullParams});hR({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})})}),sR(a,"mouseout").pipe(G(o)).subscribe(f=>{console.log("rootMouseout"),lR(s),dR(s)}),()=>{o.next(void 0),a.remove()}}),T2={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}]},P2={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]},D2={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]},E2={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1,gridIndexes:[0]},k2={barWidth:0,barGroupPadding:10,barRadius:!1,gridIndexes:[0]},L2={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0],gridIndexes:[0]},C2={lineCurve:"curveLinear",lineWidth:2,gridIndexes:[1]},R2={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1,gridIndexes:[1]},I2={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]},N2="MultiGridLegend",gR=Xe(N2,T2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new it,o=n.multiGridEachDetail$.pipe(G(i),B(c=>c.map((h,f)=>h.SeriesDataMap$.pipe(B(d=>Array.from(d.keys()))))),U(c=>H(c)),B(c=>c.flat())),a=H({fullParams:n.fullParams$,multiGrid:n.multiGridEachDetail$,computedData:n.computedData$}).pipe(G(i),U(async c=>c),B(c=>c.computedData.map((l,h)=>{const f=uc(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(G(i),U(async c=>c),B(c=>({...c.fullParams,seriesList:c.seriesList}))),u=xh(N2,{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(B(r=>r.gridIndexes),dt(),Ye(1)),n=new it;return e.pipe(B(r=>r.map(i=>{n.next(void 0);const o=Go(i).pipe(G(n),Ye(1)),a=H({computedData:t.computedData$,gridIndex:o}).pipe(G(n),B($=>$.computedData[$.gridIndex]??$.computedData[0])),s=H({fullDataFormatter:t.fullDataFormatter$,gridIndex:o}).pipe(G(n),B($=>{const w=$.fullDataFormatter.gridList[0];return{type:"grid",grid:{...$.fullDataFormatter.gridList[$.gridIndex]??w},container:{...$.fullDataFormatter.container}}})),u=H({multiGridEachDetail:t.multiGridEachDetail$,gridIndex:o}).pipe(G(n),U(async $=>$),B($=>$.multiGridEachDetail[$.gridIndex]??$.multiGridEachDetail[0]),Ye(1)),c=u.pipe(U($=>$.isSeriesPositionSeprate$)),l=u.pipe(U($=>$.gridContainer$)),h=u.pipe(U($=>$.gridAxesTransform$)),f=u.pipe(U($=>$.gridAxesReverseTransform$)),d=u.pipe(U($=>$.gridAxesSize$)),p=u.pipe(U($=>$.gridGraphicTransform$)),g=u.pipe(U($=>$.gridGraphicReverseScale$)),m=u.pipe(U($=>$.gridHighlight$)),y=u.pipe(U($=>$.existedSeriesLabels$)),x=u.pipe(U($=>$.SeriesDataMap$)),v=u.pipe(U($=>$.GroupDataMap$)),b=u.pipe(U($=>$.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}})))},Sh="MultiBars",F2=ut(Sh,"grid"),mR=Xe(Sh,E2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=[];return $n(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${F2}`).data(s).join("g").attr("class",F2).each((u,c,l)=>{const h=K(l[c]);o[c]=vh(Sh,{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())}}),Ah="MultiBarStack",G2=ut(Ah,"grid"),yR=Xe(Ah,k2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=[];return $n(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${G2}`).data(s).join("g").attr("class",G2).each((u,c,l)=>{const h=K(l[c]);o[c]=h2(Ah,{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())}}),Mh="MultiBarsTriangle",z2=ut(Mh,"grid"),bR=Xe(Mh,L2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=[];return $n(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${z2}`).data(s).join("g").attr("class",z2).each((u,c,l)=>{const h=K(l[c]);o[c]=m2(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$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Th="MultiLines",O2=ut(Th,"grid"),vR=Xe(Th,C2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,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]=o2(Th,{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())}}),Ph="MultiDots",U2=ut(Ph,"grid"),xR=Xe(Ph,R2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,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]=b2(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$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Dh="MultiGroupAxis",B2=ut(Dh,"grid"),_R=Xe(Dh,P2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,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]=_2(Dh,{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())}}),Eh="MultiValueAxis",Y2=ut(Eh,"grid"),wR=Xe(Eh,D2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,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]=Mu(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())}});function W2(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 $R=({fullDataFormatter$:t,layout$:e})=>{const n=new it;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(G(n),U(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)}))},SR=({gridAxesTransform$:t})=>t.pipe(B(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)`}})),AR=({computedData$:t,fullDataFormatter$:e,fullChartParams$:n,layout$:r})=>H({computedData:t,fullDataFormatter:e,fullChartParams:n,layout:r}).pipe(U(async o=>o),B(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}=W2(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}=W2(o.layout,o.fullDataFormatter.container,c,u);return{slotIndex:a.slotIndex,rowIndex:c,columnIndex:u,translate:f,scale:d}})}})),kh="OverlappingValueAxes",H2=ut(kh,"grid"),MR=Xe(kh,I2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=[],a=r.fullParams$.pipe(G(i),B(l=>l.gridIndexes[0])),s=r.fullParams$.pipe(G(i),B(l=>l.gridIndexes[1])),u=H({firstGridIndex:a,secondGridIndex:s}).pipe(G(i),U(l=>r.fullDataFormatter$.pipe(G(i),B(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 Go(r).pipe(G(i),B(l=>({...l,fullParams$:l.fullParams$.pipe(B(h=>(h.gridIndexes.length>2&&(h.gridIndexes.length=2),h)))})),U(l=>$n(l)),B(l=>l.map((h,f)=>{if(f===0)return h;const d=$R({fullDataFormatter$:u,layout$:r.layout$}),p=SR({gridAxesTransform$:d}),g=AR({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.${H2}`).data(l).join("g").attr("class",H2).each((h,f,d)=>{if(f>1)return;const p=K(d[f]);o[f]=Mu(kh,{selection:p,computedData$:h.gridComputedData$,fullParams$:r.fullParams$.pipe(B(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:[]}},X2={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},TR=ep("Container",q2)(({selection:t})=>function(){}),Lh="Tooltip",V2=ut(Lh,"g"),PR=ut(Lh,"box");function DR(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 ER({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.${V2}`).data(u).join(b=>b.append("g").classed(V2,!0).attr("pointer-events","none"),b=>b,b=>b.style("opacity",0).remove()).attr("transform",()=>`translate(${a.offsetX}, ${a.offsetY})`).selectAll(`g.${PR}`).data(c).join(b=>b.append("g").classed(ut(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(ut(e,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));u.length&&gC(d,u[0]);const p=d!=null&&d.node()?n2(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()?n2(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 kR=ep(Lh,X2)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new it,s=o.event$.pipe(G(a),zo(p=>p.eventName==="mouseover"||p.eventName==="mousemove")),u=o.event$.pipe(G(a),zo(p=>p.eventName==="mouseout")),c=H({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$}).pipe(G(a),U(async p=>p),B(p=>({backgroundColor:Bt(p.fullParams.backgroundColorType,p.fullChartParams),backgroundOpacity:p.fullParams.backgroundOpacity,strokeColor:Bt(p.fullParams.strokeColorType,p.fullChartParams),offset:p.fullParams.offset,padding:p.fullParams.padding,textSize:p.fullChartParams.styles.textSize,textColor:Bt(p.fullParams.textColorType,p.fullChartParams)}))),l=H({fullParams:i.fullParams$,tooltipStyle:c}).pipe(G(a),U(async p=>p),B(p=>p.fullParams.svgRenderFn?p.fullParams.svgRenderFn:g=>{const m=p.fullParams.textRenderFn(g);return DR(m,p.tooltipStyle)})),h=H({event:s,contentRenderFn:l}).pipe(G(a),U(async p=>p),B(p=>p.contentRenderFn(p.event))),f=u.pipe(G(a),B(p=>"")),d=Uu(s,u).pipe(G(a),B(p=>p.event));return H({svgString:Uu(h,f),event:d,layout:i.layout$,tooltipStyle:c}).pipe(G(a),U(async p=>p)).subscribe(p=>{ER({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)}}),j2={force:{strength:.03,velocityDecay:.2,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},highlightRIncrease:0,bubbleScaleType:"area"},Z2={outerRadius:.95,innerRadius:0,outerMouseoverRadius:1,enterDuration:800,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},K2={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"}]},Q2={outerRadius:.95,outerMouseoverRadius:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"series",labelFn:t=>String(t.value)},J2={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0};function LR(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 CR(t,e){return P1().velocityDecay(e.force.velocityDecay).force("collision",A1().radius(n=>n.r+e.force.collisionSpacing)).force("charge",D1().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function RR({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 IR({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=RR({data:a,bubbleGroupR:o,maxValue:s,avgValue:u}),l=i==="area"?.5:1,h=Qs().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 tx({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(LR,{text:a.label,radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:l})}),o}function NR({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 FR(){return Bp().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 ex({fullParams:t,graphicWidth:e,graphicHeight:n}){or.force("x",E1().strength(t.force.strength).x(0)).force("y",k1().strength(t.force.strength).y(0)),or.alpha(1).restart()}function GR({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(Ka).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const zR=Si("Bubbles",j2)(({selection:t,name:e,observer:n,subject:r})=>{const i=new it,o=t.append("g"),a=new it;let s=new Map;n.layout$.pipe(ui()).subscribe(h=>{t.attr("transform",`translate(${h.width/2}, ${h.height/2})`),n.layout$.pipe(G(i)).subscribe(f=>{t.transition().attr("transform",`translate(${f.width/2}, ${f.height/2})`)})});const u=n.fullParams$.pipe(G(i),B(h=>h.bubbleScaleType),dt()),c=new lt(h=>{H({layout:n.layout$,computedData:n.computedData$,scaleType:u}).pipe(G(i),U(async f=>f)).subscribe(f=>{const d=IR({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(G(i),B(h=>h.highlightTarget),dt());return H({layout:n.layout$,computedData:n.computedData$,bubblesData:c,SeriesDataMap:n.SeriesDataMap$,fullParams:n.fullParams$,highlightTarget:l}).pipe(G(i),U(async h=>h)).subscribe(h=>{const f=tx({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams});or=CR(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(FR()),or.nodes(h.bubblesData),ex({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(G(i),U(async h=>h)).subscribe(h=>{GR({bubblesSelection:h.bubblesSelection,highlightIds:h.highlight,fullChartParams:h.fullChartParams}),h.fullParams.highlightRIncrease&&(NR({data:h.bubblesData,highlightRIncrease:h.fullParams.highlightRIncrease,highlightIds:h.highlight}),tx({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams})),ex({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),or.nodes(h.bubblesData)}),()=>{i.next(void 0)}});function nx({computedDataSeries:t,startAngle:e,endAngle:n}){return dv().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 rx="Pie",OR=ut(rx,"path");function UR({enter:t,exit:e,data:n,lastData:r,fullParams:i}){return!t.size()&&!e.size()?o=>{const a=n.map((s,u)=>{const c=r[u]??{startAngle:0,endAngle:0,value:0};return{...s,startAngle:s.startAngle*o+c.startAngle*(1-o),endAngle:s.endAngle*o+c.endAngle*(1-o),value:s.value*o+c.value*(1-o)}});return Ch(a,i.startAngle,i.endAngle,1)}:o=>Ch(n,i.startAngle,i.endAngle,o)}function Ch(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 ix({selection:t,renderData:e,arc:n}){let r=t.selectAll("path").data(e,s=>s.id),i=r.enter().append("path").classed(OR,!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 BR({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(Ka).duration(500).attr("d",c=>i(c)):u.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",c=>r(c))})}const YR=Si(rx,Z2)(({selection:t,name:e,observer:n,subject:r})=>{const i=new it,o=t.append("g"),a=new it;let s=[],u=[];n.layout$.pipe(ui()).subscribe(p=>{t.attr("transform",`translate(${p.width/2}, ${p.height/2})`),n.layout$.pipe(G(i)).subscribe(g=>{t.transition().attr("transform",`translate(${g.width/2}, ${g.height/2})`)})});const c=n.layout$.pipe(G(i),B(p=>p.width<p.height?p.width:p.height)),l=new lt(p=>{H({computedData:n.computedData$,fullParams:n.fullParams$}).pipe(G(i),U(async g=>g)).subscribe(g=>{const m=nx({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(G(i),U(async g=>g)).subscribe(g=>{const m=Au({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(G(i),U(async g=>g)).subscribe(g=>{const m=Au({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(G(i),B(p=>p.highlightTarget),dt());return H({pieData:l,SeriesDataMap:n.SeriesDataMap$,arc:h,arcMouseover:f,computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:d}).pipe(G(i),U(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=UR({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($),ix({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=Ch(p.pieData,p.fullParams.startAngle,p.fullParams.endAngle,1);const $=ix({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})})})}),H({pathSelection:a,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,arc:h,arcMouseover:f}).pipe(G(i),U(async p=>p)).subscribe(p=>{BR({pathSelection:p.pathSelection,ids:p.highlight,fullChartParams:p.fullChartParams,arc:p.arc,arcMouseover:p.arcMouseover})}),()=>{i.next(void 0)}}),ox="PieEventTexts",ax=ut(ox,"text");function Rh(t,e){const n=t.selectAll(`text.${ax}`).data(e),r=n.enter().append("text").classed(ax,!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 Ih({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 WR=Si(ox,K2)(({selection:t,name:e,observer:n,subject:r})=>{const i=new it,o=t.append("g");let a;n.layout$.pipe(ui()).subscribe(u=>{t.attr("transform",`translate(${u.width/2}, ${u.height/2})`),n.layout$.pipe(G(i)).subscribe(c=>{t.transition().attr("transform",`translate(${c.width/2}, ${c.height/2})`)})});const s=n.fullChartParams$.pipe(G(i),B(u=>u.highlightTarget),dt());return H({computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:s}).pipe(G(i),U(async u=>u)).subscribe(u=>{o.transition().duration(u.fullChartParams.transitionDuration).ease(ii(u.fullChartParams.transitionEase)).tween("move",(c,l)=>h=>{const f=Ih({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});Rh(o,f)}).on("end",(c,l)=>{const h=Ih({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});Rh(o,h),a&&a.unsubscribe(),a=r.event$.subscribe(f=>{const d=Ih({eventData:f,eventName:f.eventName,t:1,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});Rh(o,d)})})}),()=>{i.next(void 0)}}),sx="PieLabels",HR=ut(sx,"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 XR(t,e,n,r){let i=t.selectAll("text").data(e,u=>u.pieDatum.id),o=i.enter().append("text").classed(HR,!0),a=i.exit();o.append("text");const s=i.merge(o);return s.attr("font-weight","bold").attr("text-anchor","middle").style("dominant-baseline","middle").style("cursor",u=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").text(u=>n.labelFn(u.pieDatum.data)).attr("font-size",r.styles.textSize).attr("fill",(u,c)=>bh({datum:u.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",u=>"translate("+u.x+","+u.y+")"),a.remove(),s}function VR({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 jR=Si(sx,Q2)(({selection:t,observer:e,subject:n})=>{const r=new it,i=t.append("g");let o=new it,a=[];return e.layout$.pipe(ui()).subscribe(s=>{t.attr("transform",`translate(${s.width/2}, ${s.height/2})`),e.layout$.pipe(G(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(G(r),U(async s=>s)).subscribe(s=>{const u=s.layout.width<s.layout.height?s.layout.width:s.layout.height,c=Au({axisWidth:u,innerRadius:0,outerRadius:s.fullParams.outerRadius,padAngle:0,cornerRadius:0}),l=Au({axisWidth:u,innerRadius:0,outerRadius:s.fullParams.outerMouseoverRadius,padAngle:0,cornerRadius:0}),h=nx({computedDataSeries:s.computedData,startAngle:s.fullParams.startAngle,endAngle:s.fullParams.endAngle});a=qR(h,c,l,s.fullParams.labelCentroid);const f=XR(i,a,s.fullParams,s.fullChartParams);o.next(f)}),H({labelSelection:o,highlight:e.seriesHighlight$,fullChartParams:e.fullChartParams$}).pipe(G(r),U(async s=>s)).subscribe(s=>{VR({labelSelection:s.labelSelection,ids:s.highlight,fullChartParams:s.fullChartParams})}),()=>{r.next(void 0)}}),ux="SeriesLegend",ZR=Si(ux,J2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new it,o=n.SeriesDataMap$.pipe(G(i),B(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(G(i),B(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=xh(ux,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}});Z.BarStack=zC,Z.Bars=kC,Z.BarsDiverging=LC,Z.BarsTriangle=XC,Z.Bubbles=zR,Z.CONTAINER_PLUGIN_PARAMS=q2,Z.Container=TR,Z.DEFAULT_BARS_DIVERGING_PARAMS=cx,Z.DEFAULT_BARS_PARAMS=Co,Z.DEFAULT_BARS_TRIANGLE_PARAMS=zh,Z.DEFAULT_BAR_STACK_PARAMS=Gh,Z.DEFAULT_BUBBLES_PARAMS=j2,Z.DEFAULT_DOTS_PARAMS=Nh,Z.DEFAULT_GRID_LEGEND_PARAMS=Yh,Z.DEFAULT_GROUP_AREA_PARAMS=Fh,Z.DEFAULT_GROUP_AXIS_PARAMS=Oh,Z.DEFAULT_LINES_PARAMS=ar,Z.DEFAULT_MULTI_BARS_PARAMS=E2,Z.DEFAULT_MULTI_BARS_TRIANGLE_PARAMS=L2,Z.DEFAULT_MULTI_BAR_STACK_PARAMS=k2,Z.DEFAULT_MULTI_DOTS_PARAMS=R2,Z.DEFAULT_MULTI_GRID_LEGEND_PARAMS=T2,Z.DEFAULT_MULTI_GROUP_AXIS_PARAMS=P2,Z.DEFAULT_MULTI_LINES_PARAMS=C2,Z.DEFAULT_MULTI_VALUE_AXIS_PARAMS=D2,Z.DEFAULT_OVERLAPPING_VALUE_AXES_PARAMS=I2,Z.DEFAULT_PIE_EVENT_TEXTS_PARAMS=K2,Z.DEFAULT_PIE_LABELS_PARAMS=Q2,Z.DEFAULT_PIE_PARAMS=Z2,Z.DEFAULT_SCALING_AREA_PARAMS=Bh,Z.DEFAULT_SERIES_LEGEND_PARAMS=J2,Z.DEFAULT_VALUE_AXIS_PARAMS=Tu,Z.DEFAULT_VALUE_STACK_AXIS_PARAMS=Uh,Z.Dots=KC,Z.GridLegend=JC,Z.GroupAux=pR,Z.GroupAxis=eR,Z.Lines=SC,Z.MultiBarStack=yR,Z.MultiBars=mR,Z.MultiBarsTriangle=bR,Z.MultiDots=xR,Z.MultiGridLegend=gR,Z.MultiGroupAxis=_R,Z.MultiLines=vR,Z.MultiValueAxis=wR,Z.OverlappingValueAxes=MR,Z.Pie=YR,Z.PieEventTexts=WR,Z.PieLabels=jR,Z.ScalingArea=aR,Z.SeriesLegend=ZR,Z.TOOLTIP_PARAMS=X2,Z.Tooltip=kR,Z.ValueAxis=rR,Z.ValueStackAxis=iR,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});
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"})});