@carbon/charts-react 1.22.9 → 1.22.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,24 +1,24 @@
1
- (function(H,ft){typeof exports=="object"&&typeof module<"u"?ft(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],ft):(H=typeof globalThis<"u"?globalThis:H||self,ft(H.ChartsReact={},H.jsxRuntime,H.React))})(this,function(H,ft,zn){"use strict";var SU=Object.defineProperty;var wU=(H,ft,zn)=>ft in H?SU(H,ft,{enumerable:!0,configurable:!0,writable:!0,value:zn}):H[ft]=zn;var Pu=(H,ft,zn)=>wU(H,typeof ft!="symbol"?ft+"":ft,zn);var To=(e=>(e.RENDER_FINISHED="render-finished",e.RESIZE="chart-resize",e.MOUSEOVER="chart-mouseover",e.MOUSEOUT="chart-mouseout",e))(To||{}),So=(e=>(e.SHOW="show-modal",e.HIDE="hide-modal",e))(So||{}),wo=(e=>(e.UPDATE="model-update",e))(wo||{}),Bu=(e=>(e.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",e.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",e.BUTTON_CLICK="toolbar-button-click",e.SHOW_TOOLTIP="toolbar-show-tooltip",e.HIDE_TOOLTIP="toolbar-hide-tooltip",e))(Bu||{}),$o=(e=>(e.UPDATE="zoom-bar-update",e.SELECTION_START="zoom-bar-selection-start",e.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",e.SELECTION_END="zoom-bar-selection-end",e))($o||{}),Mo=(e=>(e.CHANGE="zoom-domain-change",e))(Mo||{}),Co=(e=>(e.CANVAS_ZOOM_IN="canvas-zoom-in",e.CANVAS_ZOOM_OUT="canvas-zoom-out",e))(Co||{}),Ao=(e=>(e.LABEL_MOUSEOVER="axis-label-mouseover",e.LABEL_MOUSEMOVE="axis-label-mousemove",e.LABEL_CLICK="axis-label-click",e.LABEL_MOUSEOUT="axis-label-mouseout",e.LABEL_FOCUS="axis-label-focus",e.LABEL_BLUR="axis-label-blur",e.RENDER_COMPLETE="axis-render-complete",e))(Ao||{}),Lo=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(Lo||{}),ko=(e=>(e.WORD_MOUSEOVER="wordcloud-word-mouseover",e.WORD_MOUSEMOVE="wordcloud-word-mousemove",e.WORD_CLICK="wordcloud-word-click",e.WORD_MOUSEOUT="wordcloud-word-mouseout",e))(ko||{}),Do=(e=>(e.SLICE_MOUSEOVER="pie-slice-mouseover",e.SLICE_MOUSEMOVE="pie-slice-mousemove",e.SLICE_CLICK="pie-slice-click",e.SLICE_MOUSEOUT="pie-slice-mouseout",e))(Do||{}),Ro=(e=>(e.ARC_MOUSEOVER="gauge-arc-mouseover",e.ARC_MOUSEMOVE="gauge-arc-mousemove",e.ARC_CLICK="gauge-arc-click",e.ARC_MOUSEOUT="gauge-arc-mouseout",e))(Ro||{}),Io=(e=>(e.BAR_MOUSEOVER="bar-mouseover",e.BAR_MOUSEMOVE="bar-mousemove",e.BAR_CLICK="bar-click",e.BAR_MOUSEOUT="bar-mouseout",e))(Io||{}),No=(e=>(e.BOX_MOUSEOVER="box-mouseover",e.BOX_MOUSEMOVE="box-mousemove",e.BOX_CLICK="box-click",e.BOX_MOUSEOUT="box-mouseout",e.OUTLIER_MOUSEOVER="outlier-mouseover",e.OUTLIER_MOUSEMOVE="outlier-mousemove",e.OUTLIER_CLICK="outlier-click",e.OUTLIER_MOUSEOUT="outlier-mouseout",e))(No||{}),Po=(e=>(e.SCATTER_MOUSEOVER="scatter-mouseover",e.SCATTER_MOUSEMOVE="scatter-mousemove",e.SCATTER_CLICK="scatter-click",e.SCATTER_MOUSEOUT="scatter-mouseout",e))(Po||{}),Uo=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(Uo||{}),Bo=(e=>(e.X_AXIS_MOUSEOVER="radar-x-axis-mouseover",e.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",e.X_AXIS_CLICK="radar-x-axis-click",e.X_AXIS_MOUSEOUT="radar-x-axis-mouseout",e))(Bo||{}),Ho=(e=>(e.NODE_MOUSEOVER="tree-node-mouseover",e.NODE_CLICK="tree-node-click",e.NODE_MOUSEOUT="tree-node-mouseout",e))(Ho||{}),Vo=(e=>(e.LEAF_MOUSEOVER="leaf-mouseover",e.LEAF_MOUSEMOVE="leaf-mousemove",e.LEAF_CLICK="leaf-click",e.LEAF_MOUSEOUT="leaf-mouseout",e))(Vo||{}),Er=(e=>(e.SHOW="show-tooltip",e.MOVE="move-tooltip",e.HIDE="hide-tooltip",e))(Er||{}),Go=(e=>(e.SHOW="show-threshold",e.HIDE="hide-threshold",e))(Go||{}),Hu=(e=>(e.ITEM_HOVER="legend-item-onhover",e.ITEM_CLICK="legend-item-onclick",e.ITEM_MOUSEOUT="legend-item-onmouseout",e.ITEMS_UPDATE="legend-items-update",e))(Hu||{}),Vu=(e=>(e.CIRCLE_MOUSEOVER="circle-leaf-mouseover",e.CIRCLE_CLICK="circle-leaf-click",e.CIRCLE_MOUSEOUT="circle-leaf-mouseout",e.CIRCLE_MOUSEMOVE="circle-leaf-mousemove",e))(Vu||{}),Gu=(e=>(e.NODE_MOUSEOVER="alluvial-node-mouseover",e.NODE_CLICK="alluvial-node-click",e.NODE_MOUSEOUT="alluvial-node-mouseout",e.NODE_MOUSEMOVE="alluvial-node-mousemove",e.LINE_MOUSEOVER="alluvial-line-mouseover",e.LINE_CLICK="alluvial-line-click",e.LINE_MOUSEOUT="alluvial-line-mouseout",e.LINE_MOUSEMOVE="alluvial-line-mousemove",e))(Gu||{}),Fu=(e=>(e.METER_MOUSEOVER="meter-mouseover",e.METER_CLICK="meter-click",e.METER_MOUSEOUT="meter-mouseout",e.METER_MOUSEMOVE="meter-mousemove",e))(Fu||{}),zu=(e=>(e.HEATMAP_MOUSEOVER="heatmap-mouseover",e.HEATMAP_CLICK="heatmap-click",e.HEATMAP_MOUSEOUT="heatmap-mouseout",e.HEATMAP_MOUSEMOVE="hetmap-mousemove",e))(zu||{}),Or=(e=>(e.CHOROPLETH_MOUSEOVER="choropleth-mouseover",e.CHOROPLETH_CLICK="choropleth-click",e.CHOROPLETH_MOUSEOUT="choropleth-mouseout",e.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",e))(Or||{});const a0=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:Gu,Area:Lo,Axis:Ao,Bar:Io,Boxplot:No,CanvasZoom:Co,Chart:To,Choropleth:Or,CirclePack:Vu,Gauge:Ro,Heatmap:zu,Legend:Hu,Line:Uo,Meter:Fu,Modal:So,Model:wo,Pie:Do,Radar:Bo,Scatter:Po,Threshold:Go,Toolbar:Bu,Tooltip:Er,Tree:Ho,Treemap:Vo,WordCloud:ko,ZoomBar:$o,ZoomDomain:Mo},Symbol.toStringTag,{value:"Module"})),T=a0;var Q=(e=>(e.HTML="html",e.SVG="svg",e))(Q||{}),Fo=(e=>(e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10",e))(Fo||{}),et=(e=>(e.BACKGROUND="background",e.FILL="fill",e.STROKE="stroke",e.TOOLTIP="tooltip",e))(et||{}),G=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))(G||{}),Ne=(e=>(e.GRAPH_VIEW="graph_view",e.SLIDER_VIEW="slider_view",e))(Ne||{}),Se=(e=>(e.END_LINE="end_line",e.MID_LINE="mid_line",e.FRONT_LINE="front_line",e.NONE="none",e))(Se||{}),Ht=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(Ht||{}),X=(e=>(e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio",e))(X||{}),Tr=(e=>(e.RIGHT="right",e.LEFT="left",e.TOP="top",e.BOTTOM="bottom",e))(Tr||{}),Vt=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(Vt||{}),Sr=(e=>(e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e))(Sr||{}),$s=(e=>(e.TREE="tree",e.DENDROGRAM="dendrogram",e))($s||{}),wt=(e=>(e.ROW="row",e.COLUMN="column",e.ROW_REVERSE="row-reverse",e.COLUMN_REVERSE="column-reverse",e))(wt||{}),at=(e=>(e.FIXED="fixed",e.PREFERRED="preferred",e.STRETCH="stretch",e))(at||{}),jn=(e=>(e.CENTER="center",e))(jn||{}),di=(e=>(e.LEFT="left",e.RIGHT="right",e))(di||{}),Gt=(e=>(e.GRID="grid",e.VERT_OR_HORIZ="vertOrHoriz",e.PIE="pie",e.DONUT="donut",e))(Gt||{}),Ze=(e=>(e.START="start",e.MIDDLE="middle",e.END="end",e))(Ze||{}),Xe=(e=>(e.BASELINE="baseline",e.MIDDLE="middle",e.HANGING="hanging",e))(Xe||{}),Wn=(e=>(e.SEMI="semi",e.FULL="full",e))(Wn||{}),Ms=(e=>(e.UP="up",e.DOWN="down",e))(Ms||{}),pi=(e=>(e.SUCCESS="success",e.WARNING="warning",e.DANGER="danger",e))(pi||{}),fi=(e=>(e.ALWAYS="always",e.AUTO="auto",e.NEVER="never",e))(fi||{}),ge=(e=>(e.SCATTER="scatter",e.LINE="line",e.SIMPLE_BAR="simple-bar",e.STACKED_BAR="stacked-bar",e.GROUPED_BAR="grouped-bar",e.AREA="area",e.STACKED_AREA="stacked-area",e))(ge||{}),xt=(e=>(e.EXPORT_CSV="Export as CSV",e.EXPORT_PNG="Export as PNG",e.EXPORT_JPG="Export as JPG",e.ZOOM_IN="Zoom in",e.ZOOM_OUT="Zoom out",e.RESET_ZOOM="Reset zoom",e.MAKE_FULLSCREEN="Make fullscreen",e.EXIT_FULLSCREEN="Exit fullscreen",e.SHOW_AS_DATATABLE="Show as data-table",e.CUSTOM="Custom",e))(xt||{}),Cs=(e=>(e.LEFT="left",e.RIGHT="right",e))(Cs||{}),Ft=(e=>(e.CHECKBOX="checkbox",e.RADIUS="radius",e.AREA="area",e.SIZE="size",e.LINE="line",e.QUARTILE="quartile",e.ZOOM="zoom",e))(Ft||{}),mi=(e=>(e.LINEAR="linear",e.QUANTIZE="quantize",e))(mi||{}),wr=(e=>(e.ON="on",e.AUTO="auto",e.OFF="off",e))(wr||{}),gi=(e=>(e.DEFAULT="default",e.HOVERABLE="hoverable",e))(gi||{}),Ke=(e=>(e.geoEqualEarth="geoEqualEarth",e.geoAlbers="geoAlbers",e.geoConicEqualArea="geoConicEqualArea",e.geoConicEquidistant="geoConicEquidistant",e.geoEquirectangular="geoEquirectangular",e.geoMercator="geoMercator",e.geoNaturalEarth1="geoNaturalEarth1",e))(Ke||{}),ju=(e=>(e["15seconds"]="15seconds",e.minute="minute",e["30minutes"]="30minutes",e.hourly="hourly",e.daily="daily",e.weekly="weekly",e.monthly="monthly",e.quarterly="quarterly",e.yearly="yearly",e))(ju||{});function zo(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function vi(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{const a=e.defaultWidth,o=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[o]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}function yi(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const a=s[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?l0(o,d=>d.test(a)):o0(o,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function o0(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function l0(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function c0(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const o=t.slice(i.length);return{value:a,rest:o}}}const Wu=6048e5,u0=864e5,qu=6e4,Yu=36e5,Zu=Symbol.for("constructDateFrom");function we(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Zu in e?e[Zu](t):e instanceof Date?new e.constructor(t):new Date(t)}function qn(e,...t){const n=we.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}let h0={};function As(){return h0}function Nt(e,t){return we(t||e,e)}function xi(e,t){var n,r,i,s;const a=As(),o=(t==null?void 0:t.weekStartsOn)??((r=(n=t==null?void 0:t.locale)==null?void 0:n.options)==null?void 0:r.weekStartsOn)??a.weekStartsOn??((s=(i=a.locale)==null?void 0:i.options)==null?void 0:s.weekStartsOn)??0,l=Nt(e,t==null?void 0:t.in),c=l.getDay(),u=(c<o?7:0)+c-o;return l.setDate(l.getDate()-u),l.setHours(0,0,0,0),l}const d0={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},p0=(e,t,n)=>{let r;const i=d0[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},f0={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},m0=(e,t,n,r)=>f0[e],g0={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},v0={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},y0={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},x0={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},b0={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},_0={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},E0=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},O0={ordinalNumber:E0,era:vi({values:g0,defaultWidth:"wide"}),quarter:vi({values:v0,defaultWidth:"wide",argumentCallback:e=>e-1}),month:vi({values:y0,defaultWidth:"wide"}),day:vi({values:x0,defaultWidth:"wide"}),dayPeriod:vi({values:b0,defaultWidth:"wide",formattingValues:_0,defaultFormattingWidth:"wide"})},T0=/^(\d+)(th|st|nd|rd)?/i,S0=/\d+/i,w0={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},$0={any:[/^b/i,/^(a|c)/i]},M0={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},C0={any:[/1/i,/2/i,/3/i,/4/i]},A0={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},L0={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},k0={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},D0={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},R0={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},I0={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},N0={ordinalNumber:c0({matchPattern:T0,parsePattern:S0,valueCallback:e=>parseInt(e,10)}),era:yi({matchPatterns:w0,defaultMatchWidth:"wide",parsePatterns:$0,defaultParseWidth:"any"}),quarter:yi({matchPatterns:M0,defaultMatchWidth:"wide",parsePatterns:C0,defaultParseWidth:"any",valueCallback:e=>e+1}),month:yi({matchPatterns:A0,defaultMatchWidth:"wide",parsePatterns:L0,defaultParseWidth:"any"}),day:yi({matchPatterns:k0,defaultMatchWidth:"wide",parsePatterns:D0,defaultParseWidth:"any"}),dayPeriod:yi({matchPatterns:R0,defaultMatchWidth:"any",parsePatterns:I0,defaultParseWidth:"any"})},P0={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},U0={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},B0={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},H0={date:zo({formats:P0,defaultWidth:"full"}),time:zo({formats:U0,defaultWidth:"full"}),dateTime:zo({formats:B0,defaultWidth:"full"})},Xu={code:"en-US",formatDistance:p0,formatLong:H0,formatRelative:m0,localize:O0,match:N0,options:{weekStartsOn:0,firstWeekContainsDate:1}};var Ku=typeof global=="object"&&global&&global.Object===Object&&global,V0=typeof self=="object"&&self&&self.Object===Object&&self,Pe=Ku||V0||Function("return this")(),$e=Pe.Symbol,Qu=Object.prototype,G0=Qu.hasOwnProperty,F0=Qu.toString,bi=$e?$e.toStringTag:void 0;function z0(e){var t=G0.call(e,bi),n=e[bi];try{e[bi]=void 0;var r=!0}catch{}var i=F0.call(e);return r&&(t?e[bi]=n:delete e[bi]),i}var j0=Object.prototype,W0=j0.toString;function q0(e){return W0.call(e)}var Y0="[object Null]",Z0="[object Undefined]",Ju=$e?$e.toStringTag:void 0;function Yn(e){return e==null?e===void 0?Z0:Y0:Ju&&Ju in Object(e)?z0(e):q0(e)}function Qe(e){return e!=null&&typeof e=="object"}var X0="[object Symbol]";function Ls(e){return typeof e=="symbol"||Qe(e)&&Yn(e)==X0}function jo(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Xt=Array.isArray,K0=1/0,th=$e?$e.prototype:void 0,eh=th?th.toString:void 0;function nh(e){if(typeof e=="string")return e;if(Xt(e))return jo(e,nh)+"";if(Ls(e))return eh?eh.call(e):"";var t=e+"";return t=="0"&&1/e==-K0?"-0":t}function Me(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Wo(e){return e}var Q0="[object AsyncFunction]",J0="[object Function]",t1="[object GeneratorFunction]",e1="[object Proxy]";function qo(e){if(!Me(e))return!1;var t=Yn(e);return t==J0||t==t1||t==Q0||t==e1}var Yo=Pe["__core-js_shared__"],rh=function(){var e=/[^.]+$/.exec(Yo&&Yo.keys&&Yo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function n1(e){return!!rh&&rh in e}var r1=Function.prototype,i1=r1.toString;function Zn(e){if(e!=null){try{return i1.call(e)}catch{}try{return e+""}catch{}}return""}var s1=/[\\^$.*+?()[\]{}|]/g,a1=/^\[object .+?Constructor\]$/,o1=Function.prototype,l1=Object.prototype,c1=o1.toString,u1=l1.hasOwnProperty,h1=RegExp("^"+c1.call(u1).replace(s1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d1(e){if(!Me(e)||n1(e))return!1;var t=qo(e)?h1:a1;return t.test(Zn(e))}function p1(e,t){return e==null?void 0:e[t]}function Xn(e,t){var n=p1(e,t);return d1(n)?n:void 0}var Zo=Xn(Pe,"WeakMap"),ih=Object.create,f1=function(){function e(){}return function(t){if(!Me(t))return{};if(ih)return ih(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function m1(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function g1(){}function sh(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var v1=800,y1=16,x1=Date.now;function b1(e){var t=0,n=0;return function(){var r=x1(),i=y1-(r-n);if(n=r,i>0){if(++t>=v1)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function _1(e){return function(){return e}}var ks=function(){try{var e=Xn(Object,"defineProperty");return e({},"",{}),e}catch{}}(),E1=ks?function(e,t){return ks(e,"toString",{configurable:!0,enumerable:!1,value:_1(t),writable:!0})}:Wo,ah=b1(E1);function O1(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function T1(e,t,n,r){for(var i=e.length,s=n+-1;++s<i;)if(t(e[s],s,e))return s;return-1}function S1(e){return e!==e}function w1(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function $1(e,t,n){return t===t?w1(e,t,n):T1(e,S1,n)}function M1(e,t){var n=e==null?0:e.length;return!!n&&$1(e,t,0)>-1}var C1=9007199254740991,A1=/^(?:0|[1-9]\d*)$/;function Xo(e,t){var n=typeof e;return t=t??C1,!!t&&(n=="number"||n!="symbol"&&A1.test(e))&&e>-1&&e%1==0&&e<t}function Ds(e,t,n){t=="__proto__"&&ks?ks(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function _i(e,t){return e===t||e!==e&&t!==t}var L1=Object.prototype,k1=L1.hasOwnProperty;function oh(e,t,n){var r=e[t];(!(k1.call(e,t)&&_i(r,n))||n===void 0&&!(t in e))&&Ds(e,t,n)}function $r(e,t,n,r){var i=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var o=t[s],l=void 0;l===void 0&&(l=e[o]),i?Ds(n,o,l):oh(n,o,l)}return n}var lh=Math.max;function ch(e,t,n){return t=lh(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=lh(r.length-t,0),a=Array(s);++i<s;)a[i]=r[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=r[i];return o[t]=n(a),m1(e,this,o)}}function Ko(e,t){return ah(ch(e,t,Wo),e+"")}var D1=9007199254740991;function Qo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=D1}function Kn(e){return e!=null&&Qo(e.length)&&!qo(e)}function R1(e,t,n){if(!Me(n))return!1;var r=typeof t;return(r=="number"?Kn(n)&&Xo(t,n.length):r=="string"&&t in n)?_i(n[t],e):!1}function I1(e){return Ko(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,a&&R1(n[0],n[1],a)&&(s=i<3?void 0:s,i=1),t=Object(t);++r<i;){var o=n[r];o&&e(t,o,r,s)}return t})}var N1=Object.prototype;function Rs(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||N1;return e===n}function P1(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var U1="[object Arguments]";function uh(e){return Qe(e)&&Yn(e)==U1}var hh=Object.prototype,B1=hh.hasOwnProperty,H1=hh.propertyIsEnumerable,Mr=uh(function(){return arguments}())?uh:function(e){return Qe(e)&&B1.call(e,"callee")&&!H1.call(e,"callee")};function V1(){return!1}var dh=typeof H=="object"&&H&&!H.nodeType&&H,ph=dh&&typeof module=="object"&&module&&!module.nodeType&&module,G1=ph&&ph.exports===dh,fh=G1?Pe.Buffer:void 0,F1=fh?fh.isBuffer:void 0,Cr=F1||V1,z1="[object Arguments]",j1="[object Array]",W1="[object Boolean]",q1="[object Date]",Y1="[object Error]",Z1="[object Function]",X1="[object Map]",K1="[object Number]",Q1="[object Object]",J1="[object RegExp]",ty="[object Set]",ey="[object String]",ny="[object WeakMap]",ry="[object ArrayBuffer]",iy="[object DataView]",sy="[object Float32Array]",ay="[object Float64Array]",oy="[object Int8Array]",ly="[object Int16Array]",cy="[object Int32Array]",uy="[object Uint8Array]",hy="[object Uint8ClampedArray]",dy="[object Uint16Array]",py="[object Uint32Array]",kt={};kt[sy]=kt[ay]=kt[oy]=kt[ly]=kt[cy]=kt[uy]=kt[hy]=kt[dy]=kt[py]=!0,kt[z1]=kt[j1]=kt[ry]=kt[W1]=kt[iy]=kt[q1]=kt[Y1]=kt[Z1]=kt[X1]=kt[K1]=kt[Q1]=kt[J1]=kt[ty]=kt[ey]=kt[ny]=!1;function fy(e){return Qe(e)&&Qo(e.length)&&!!kt[Yn(e)]}function Jo(e){return function(t){return e(t)}}var mh=typeof H=="object"&&H&&!H.nodeType&&H,Ei=mh&&typeof module=="object"&&module&&!module.nodeType&&module,my=Ei&&Ei.exports===mh,tl=my&&Ku.process,Ar=function(){try{var e=Ei&&Ei.require&&Ei.require("util").types;return e||tl&&tl.binding&&tl.binding("util")}catch{}}(),gh=Ar&&Ar.isTypedArray,Is=gh?Jo(gh):fy,gy=Object.prototype,vy=gy.hasOwnProperty;function vh(e,t){var n=Xt(e),r=!n&&Mr(e),i=!n&&!r&&Cr(e),s=!n&&!r&&!i&&Is(e),a=n||r||i||s,o=a?P1(e.length,String):[],l=o.length;for(var c in e)(t||vy.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Xo(c,l)))&&o.push(c);return o}function yh(e,t){return function(n){return e(t(n))}}var yy=yh(Object.keys,Object),xy=Object.prototype,by=xy.hasOwnProperty;function xh(e){if(!Rs(e))return yy(e);var t=[];for(var n in Object(e))by.call(e,n)&&n!="constructor"&&t.push(n);return t}function Oi(e){return Kn(e)?vh(e):xh(e)}function _y(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Ey=Object.prototype,Oy=Ey.hasOwnProperty;function Ty(e){if(!Me(e))return _y(e);var t=Rs(e),n=[];for(var r in e)r=="constructor"&&(t||!Oy.call(e,r))||n.push(r);return n}function Ti(e){return Kn(e)?vh(e,!0):Ty(e)}var Sy=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wy=/^\w*$/;function el(e,t){if(Xt(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Ls(e)?!0:wy.test(e)||!Sy.test(e)||t!=null&&e in Object(t)}var Si=Xn(Object,"create");function $y(){this.__data__=Si?Si(null):{},this.size=0}function My(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Cy="__lodash_hash_undefined__",Ay=Object.prototype,Ly=Ay.hasOwnProperty;function ky(e){var t=this.__data__;if(Si){var n=t[e];return n===Cy?void 0:n}return Ly.call(t,e)?t[e]:void 0}var Dy=Object.prototype,Ry=Dy.hasOwnProperty;function Iy(e){var t=this.__data__;return Si?t[e]!==void 0:Ry.call(t,e)}var Ny="__lodash_hash_undefined__";function Py(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Si&&t===void 0?Ny:t,this}function Qn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Qn.prototype.clear=$y,Qn.prototype.delete=My,Qn.prototype.get=ky,Qn.prototype.has=Iy,Qn.prototype.set=Py;function Uy(){this.__data__=[],this.size=0}function Ns(e,t){for(var n=e.length;n--;)if(_i(e[n][0],t))return n;return-1}var By=Array.prototype,Hy=By.splice;function Vy(e){var t=this.__data__,n=Ns(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Hy.call(t,n,1),--this.size,!0}function Gy(e){var t=this.__data__,n=Ns(t,e);return n<0?void 0:t[n][1]}function Fy(e){return Ns(this.__data__,e)>-1}function zy(e,t){var n=this.__data__,r=Ns(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function un(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}un.prototype.clear=Uy,un.prototype.delete=Vy,un.prototype.get=Gy,un.prototype.has=Fy,un.prototype.set=zy;var wi=Xn(Pe,"Map");function jy(){this.size=0,this.__data__={hash:new Qn,map:new(wi||un),string:new Qn}}function Wy(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ps(e,t){var n=e.__data__;return Wy(t)?n[typeof t=="string"?"string":"hash"]:n.map}function qy(e){var t=Ps(this,e).delete(e);return this.size-=t?1:0,t}function Yy(e){return Ps(this,e).get(e)}function Zy(e){return Ps(this,e).has(e)}function Xy(e,t){var n=Ps(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function hn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}hn.prototype.clear=jy,hn.prototype.delete=qy,hn.prototype.get=Yy,hn.prototype.has=Zy,hn.prototype.set=Xy;var Ky="Expected a function";function nl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Ky);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var a=e.apply(this,r);return n.cache=s.set(i,a)||s,a};return n.cache=new(nl.Cache||hn),n}nl.Cache=hn;var Qy=500;function Jy(e){var t=nl(e,function(r){return n.size===Qy&&n.clear(),r}),n=t.cache;return t}var tx=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ex=/\\(\\)?/g,nx=Jy(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(tx,function(n,r,i,s){t.push(i?s.replace(ex,"$1"):r||n)}),t});function $i(e){return e==null?"":nh(e)}function Us(e,t){return Xt(e)?e:el(e,t)?[e]:nx($i(e))}var rx=1/0;function Mi(e){if(typeof e=="string"||Ls(e))return e;var t=e+"";return t=="0"&&1/e==-rx?"-0":t}function rl(e,t){t=Us(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Mi(t[n++])];return n&&n==r?e:void 0}function gt(e,t,n){var r=e==null?void 0:rl(e,t);return r===void 0?n:r}function il(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var bh=$e?$e.isConcatSpreadable:void 0;function ix(e){return Xt(e)||Mr(e)||!!(bh&&e&&e[bh])}function Bs(e,t,n,r,i){var s=-1,a=e.length;for(n||(n=ix),i||(i=[]);++s<a;){var o=e[s];t>0&&n(o)?t>1?Bs(o,t-1,n,r,i):il(i,o):r||(i[i.length]=o)}return i}var sl=yh(Object.getPrototypeOf,Object),sx="[object Object]",ax=Function.prototype,ox=Object.prototype,_h=ax.toString,lx=ox.hasOwnProperty,cx=_h.call(Object);function Eh(e){if(!Qe(e)||Yn(e)!=sx)return!1;var t=sl(e);if(t===null)return!0;var n=lx.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&_h.call(n)==cx}function ux(){this.__data__=new un,this.size=0}function hx(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function dx(e){return this.__data__.get(e)}function px(e){return this.__data__.has(e)}var fx=200;function mx(e,t){var n=this.__data__;if(n instanceof un){var r=n.__data__;if(!wi||r.length<fx-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new hn(r)}return n.set(e,t),this.size=n.size,this}function Ue(e){var t=this.__data__=new un(e);this.size=t.size}Ue.prototype.clear=ux,Ue.prototype.delete=hx,Ue.prototype.get=dx,Ue.prototype.has=px,Ue.prototype.set=mx;function gx(e,t){return e&&$r(t,Oi(t),e)}function vx(e,t){return e&&$r(t,Ti(t),e)}var Oh=typeof H=="object"&&H&&!H.nodeType&&H,Th=Oh&&typeof module=="object"&&module&&!module.nodeType&&module,yx=Th&&Th.exports===Oh,Sh=yx?Pe.Buffer:void 0,wh=Sh?Sh.allocUnsafe:void 0;function $h(e,t){if(t)return e.slice();var n=e.length,r=wh?wh(n):new e.constructor(n);return e.copy(r),r}function xx(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var a=e[n];t(a,n,e)&&(s[i++]=a)}return s}function Mh(){return[]}var bx=Object.prototype,_x=bx.propertyIsEnumerable,Ch=Object.getOwnPropertySymbols,al=Ch?function(e){return e==null?[]:(e=Object(e),xx(Ch(e),function(t){return _x.call(e,t)}))}:Mh;function Ex(e,t){return $r(e,al(e),t)}var Ox=Object.getOwnPropertySymbols,Ah=Ox?function(e){for(var t=[];e;)il(t,al(e)),e=sl(e);return t}:Mh;function Tx(e,t){return $r(e,Ah(e),t)}function Lh(e,t,n){var r=t(e);return Xt(e)?r:il(r,n(e))}function ol(e){return Lh(e,Oi,al)}function kh(e){return Lh(e,Ti,Ah)}var ll=Xn(Pe,"DataView"),cl=Xn(Pe,"Promise"),Lr=Xn(Pe,"Set"),Dh="[object Map]",Sx="[object Object]",Rh="[object Promise]",Ih="[object Set]",Nh="[object WeakMap]",Ph="[object DataView]",wx=Zn(ll),$x=Zn(wi),Mx=Zn(cl),Cx=Zn(Lr),Ax=Zn(Zo),Ce=Yn;(ll&&Ce(new ll(new ArrayBuffer(1)))!=Ph||wi&&Ce(new wi)!=Dh||cl&&Ce(cl.resolve())!=Rh||Lr&&Ce(new Lr)!=Ih||Zo&&Ce(new Zo)!=Nh)&&(Ce=function(e){var t=Yn(e),n=t==Sx?e.constructor:void 0,r=n?Zn(n):"";if(r)switch(r){case wx:return Ph;case $x:return Dh;case Mx:return Rh;case Cx:return Ih;case Ax:return Nh}return t});var Lx=Object.prototype,kx=Lx.hasOwnProperty;function Dx(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&kx.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Hs=Pe.Uint8Array;function ul(e){var t=new e.constructor(e.byteLength);return new Hs(t).set(new Hs(e)),t}function Rx(e,t){var n=t?ul(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Ix=/\w*$/;function Nx(e){var t=new e.constructor(e.source,Ix.exec(e));return t.lastIndex=e.lastIndex,t}var Uh=$e?$e.prototype:void 0,Bh=Uh?Uh.valueOf:void 0;function Px(e){return Bh?Object(Bh.call(e)):{}}function Hh(e,t){var n=t?ul(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Ux="[object Boolean]",Bx="[object Date]",Hx="[object Map]",Vx="[object Number]",Gx="[object RegExp]",Fx="[object Set]",zx="[object String]",jx="[object Symbol]",Wx="[object ArrayBuffer]",qx="[object DataView]",Yx="[object Float32Array]",Zx="[object Float64Array]",Xx="[object Int8Array]",Kx="[object Int16Array]",Qx="[object Int32Array]",Jx="[object Uint8Array]",tb="[object Uint8ClampedArray]",eb="[object Uint16Array]",nb="[object Uint32Array]";function rb(e,t,n){var r=e.constructor;switch(t){case Wx:return ul(e);case Ux:case Bx:return new r(+e);case qx:return Rx(e,n);case Yx:case Zx:case Xx:case Kx:case Qx:case Jx:case tb:case eb:case nb:return Hh(e,n);case Hx:return new r;case Vx:case zx:return new r(e);case Gx:return Nx(e);case Fx:return new r;case jx:return Px(e)}}function Vh(e){return typeof e.constructor=="function"&&!Rs(e)?f1(sl(e)):{}}var ib="[object Map]";function sb(e){return Qe(e)&&Ce(e)==ib}var Gh=Ar&&Ar.isMap,ab=Gh?Jo(Gh):sb,ob="[object Set]";function lb(e){return Qe(e)&&Ce(e)==ob}var Fh=Ar&&Ar.isSet,cb=Fh?Jo(Fh):lb,ub=1,hb=2,db=4,zh="[object Arguments]",pb="[object Array]",fb="[object Boolean]",mb="[object Date]",gb="[object Error]",jh="[object Function]",vb="[object GeneratorFunction]",yb="[object Map]",xb="[object Number]",Wh="[object Object]",bb="[object RegExp]",_b="[object Set]",Eb="[object String]",Ob="[object Symbol]",Tb="[object WeakMap]",Sb="[object ArrayBuffer]",wb="[object DataView]",$b="[object Float32Array]",Mb="[object Float64Array]",Cb="[object Int8Array]",Ab="[object Int16Array]",Lb="[object Int32Array]",kb="[object Uint8Array]",Db="[object Uint8ClampedArray]",Rb="[object Uint16Array]",Ib="[object Uint32Array]",Ct={};Ct[zh]=Ct[pb]=Ct[Sb]=Ct[wb]=Ct[fb]=Ct[mb]=Ct[$b]=Ct[Mb]=Ct[Cb]=Ct[Ab]=Ct[Lb]=Ct[yb]=Ct[xb]=Ct[Wh]=Ct[bb]=Ct[_b]=Ct[Eb]=Ct[Ob]=Ct[kb]=Ct[Db]=Ct[Rb]=Ct[Ib]=!0,Ct[gb]=Ct[jh]=Ct[Tb]=!1;function Ci(e,t,n,r,i,s){var a,o=t&ub,l=t&hb,c=t&db;if(n&&(a=i?n(e,r,i,s):n(e)),a!==void 0)return a;if(!Me(e))return e;var u=Xt(e);if(u){if(a=Dx(e),!o)return sh(e,a)}else{var d=Ce(e),h=d==jh||d==vb;if(Cr(e))return $h(e,o);if(d==Wh||d==zh||h&&!i){if(a=l||h?{}:Vh(e),!o)return l?Tx(e,vx(a,e)):Ex(e,gx(a,e))}else{if(!Ct[d])return i?e:{};a=rb(e,d,o)}}s||(s=new Ue);var p=s.get(e);if(p)return p;s.set(e,a),cb(e)?e.forEach(function(m){a.add(Ci(m,t,n,m,e,s))}):ab(e)&&e.forEach(function(m,y){a.set(y,Ci(m,t,n,y,e,s))});var f=c?l?kh:ol:l?Ti:Oi,g=u?void 0:f(e);return O1(g||e,function(m,y){g&&(y=m,m=e[y]),oh(a,y,Ci(m,t,n,y,e,s))}),a}var Nb=1,Pb=4;function dn(e){return Ci(e,Nb|Pb)}var Ub="__lodash_hash_undefined__";function Bb(e){return this.__data__.set(e,Ub),this}function Hb(e){return this.__data__.has(e)}function Ai(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new hn;++t<n;)this.add(e[t])}Ai.prototype.add=Ai.prototype.push=Bb,Ai.prototype.has=Hb;function qh(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Yh(e,t){return e.has(t)}var Vb=1,Gb=2;function Zh(e,t,n,r,i,s){var a=n&Vb,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=n&Gb?new Ai:void 0;for(s.set(e,t),s.set(t,e);++d<o;){var f=e[d],g=t[d];if(r)var m=a?r(g,f,d,t,e,s):r(f,g,d,e,t,s);if(m!==void 0){if(m)continue;h=!1;break}if(p){if(!qh(t,function(y,v){if(!Yh(p,v)&&(f===y||i(f,y,n,r,s)))return p.push(v)})){h=!1;break}}else if(!(f===g||i(f,g,n,r,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function Fb(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function hl(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var zb=1,jb=2,Wb="[object Boolean]",qb="[object Date]",Yb="[object Error]",Zb="[object Map]",Xb="[object Number]",Kb="[object RegExp]",Qb="[object Set]",Jb="[object String]",t_="[object Symbol]",e_="[object ArrayBuffer]",n_="[object DataView]",Xh=$e?$e.prototype:void 0,dl=Xh?Xh.valueOf:void 0;function r_(e,t,n,r,i,s,a){switch(n){case n_:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case e_:return!(e.byteLength!=t.byteLength||!s(new Hs(e),new Hs(t)));case Wb:case qb:case Xb:return _i(+e,+t);case Yb:return e.name==t.name&&e.message==t.message;case Kb:case Jb:return e==t+"";case Zb:var o=Fb;case Qb:var l=r&zb;if(o||(o=hl),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=jb,a.set(e,t);var u=Zh(o(e),o(t),r,i,s,a);return a.delete(e),u;case t_:if(dl)return dl.call(e)==dl.call(t)}return!1}var i_=1,s_=Object.prototype,a_=s_.hasOwnProperty;function o_(e,t,n,r,i,s){var a=n&i_,o=ol(e),l=o.length,c=ol(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var h=o[d];if(!(a?h in t:a_.call(t,h)))return!1}var p=s.get(e),f=s.get(t);if(p&&f)return p==t&&f==e;var g=!0;s.set(e,t),s.set(t,e);for(var m=a;++d<l;){h=o[d];var y=e[h],v=t[h];if(r)var b=a?r(v,y,h,t,e,s):r(y,v,h,e,t,s);if(!(b===void 0?y===v||i(y,v,n,r,s):b)){g=!1;break}m||(m=h=="constructor")}if(g&&!m){var O=e.constructor,E=t.constructor;O!=E&&"constructor"in e&&"constructor"in t&&!(typeof O=="function"&&O instanceof O&&typeof E=="function"&&E instanceof E)&&(g=!1)}return s.delete(e),s.delete(t),g}var l_=1,Kh="[object Arguments]",Qh="[object Array]",Vs="[object Object]",c_=Object.prototype,Jh=c_.hasOwnProperty;function u_(e,t,n,r,i,s){var a=Xt(e),o=Xt(t),l=a?Qh:Ce(e),c=o?Qh:Ce(t);l=l==Kh?Vs:l,c=c==Kh?Vs:c;var u=l==Vs,d=c==Vs,h=l==c;if(h&&Cr(e)){if(!Cr(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new Ue),a||Is(e)?Zh(e,t,n,r,i,s):r_(e,t,l,n,r,i,s);if(!(n&l_)){var p=u&&Jh.call(e,"__wrapped__"),f=d&&Jh.call(t,"__wrapped__");if(p||f){var g=p?e.value():e,m=f?t.value():t;return s||(s=new Ue),i(g,m,n,r,s)}}return h?(s||(s=new Ue),o_(e,t,n,r,i,s)):!1}function Gs(e,t,n,r,i){return e===t?!0:e==null||t==null||!Qe(e)&&!Qe(t)?e!==e&&t!==t:u_(e,t,n,r,Gs,i)}var h_=1,d_=2;function p_(e,t,n,r){var i=n.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var a=n[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<s;){a=n[i];var o=a[0],l=e[o],c=a[1];if(a[2]){if(l===void 0&&!(o in e))return!1}else{var u=new Ue,d;if(!(d===void 0?Gs(c,l,h_|d_,r,u):d))return!1}}return!0}function td(e){return e===e&&!Me(e)}function f_(e){for(var t=Oi(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,td(i)]}return t}function ed(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function m_(e){var t=f_(e);return t.length==1&&t[0][2]?ed(t[0][0],t[0][1]):function(n){return n===e||p_(n,e,t)}}function g_(e,t){return e!=null&&t in Object(e)}function v_(e,t,n){t=Us(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var a=Mi(t[r]);if(!(s=e!=null&&n(e,a)))break;e=e[a]}return s||++r!=i?s:(i=e==null?0:e.length,!!i&&Qo(i)&&Xo(a,i)&&(Xt(e)||Mr(e)))}function y_(e,t){return e!=null&&v_(e,t,g_)}var x_=1,b_=2;function __(e,t){return el(e)&&td(t)?ed(Mi(e),t):function(n){var r=gt(n,e);return r===void 0&&r===t?y_(n,e):Gs(t,r,x_|b_)}}function E_(e){return function(t){return t==null?void 0:t[e]}}function O_(e){return function(t){return rl(t,e)}}function T_(e){return el(e)?E_(Mi(e)):O_(e)}function Fs(e){return typeof e=="function"?e:e==null?Wo:typeof e=="object"?Xt(e)?__(e[0],e[1]):m_(e):T_(e)}function S_(e){return function(t,n,r){for(var i=-1,s=Object(t),a=r(t),o=a.length;o--;){var l=a[++i];if(n(s[l],l,s)===!1)break}return t}}var nd=S_();function pl(e,t,n){(n!==void 0&&!_i(e[t],n)||n===void 0&&!(t in e))&&Ds(e,t,n)}function fl(e){return Qe(e)&&Kn(e)}function ml(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function w_(e){return $r(e,Ti(e))}function $_(e,t,n,r,i,s,a){var o=ml(e,n),l=ml(t,n),c=a.get(l);if(c){pl(e,n,c);return}var u=s?s(o,l,n+"",e,t,a):void 0,d=u===void 0;if(d){var h=Xt(l),p=!h&&Cr(l),f=!h&&!p&&Is(l);u=l,h||p||f?Xt(o)?u=o:fl(o)?u=sh(o):p?(d=!1,u=$h(l,!0)):f?(d=!1,u=Hh(l,!0)):u=[]:Eh(l)||Mr(l)?(u=o,Mr(o)?u=w_(o):(!Me(o)||qo(o))&&(u=Vh(l))):d=!1}d&&(a.set(l,u),i(u,l,r,s,a),a.delete(l)),pl(e,n,u)}function rd(e,t,n,r,i){e!==t&&nd(t,function(s,a){if(i||(i=new Ue),Me(s))$_(e,t,a,n,rd,r,i);else{var o=r?r(ml(e,a),s,a+"",e,t,i):void 0;o===void 0&&(o=s),pl(e,a,o)}},Ti)}function id(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var M_="[object Map]",C_="[object Set]",A_=Object.prototype,L_=A_.hasOwnProperty;function Be(e){if(e==null)return!0;if(Kn(e)&&(Xt(e)||typeof e=="string"||typeof e.splice=="function"||Cr(e)||Is(e)||Mr(e)))return!e.length;var t=Ce(e);if(t==M_||t==C_)return!e.size;if(Rs(e))return!xh(e).length;for(var n in e)if(L_.call(e,n))return!1;return!0}var st=I1(function(e,t,n){rd(e,t,n)}),k_=1/0,D_=Lr&&1/hl(new Lr([,-0]))[1]==k_?function(e){return new Lr(e)}:g1,R_=200;function sd(e,t,n){var r=-1,i=M1,s=e.length,a=!0,o=[],l=o;if(s>=R_){var c=t?null:D_(e);if(c)return hl(c);a=!1,i=Yh,l=new Ai}else l=t?[]:o;t:for(;++r<s;){var u=e[r],d=t?t(u):u;if(u=u!==0?u:0,a&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue t;t&&l.push(d),o.push(u)}else i(l,d,n)||(l!==o&&l.push(d),o.push(u))}return o}var I_=Ko(function(e){var t=id(e);return fl(t)&&(t=void 0),sd(Bs(e,1,fl,!0),Fs(t))});function Li(e){return e&&e.length?sd(e):[]}function Jn(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function N_(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function gl(e){let t,n,r;e.length!==2?(t=Jn,n=(o,l)=>Jn(e(o),l),r=(o,l)=>e(o)-l):(t=e===Jn||e===N_?e:P_,n=e,r=e);function i(o,l,c=0,u=o.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(o[d],l)<0?c=d+1:u=d}while(c<u)}return c}function s(o,l,c=0,u=o.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(o[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(o,l,c=0,u=o.length){const d=i(o,l,c,u-1);return d>c&&r(o[d-1],l)>-r(o[d],l)?d-1:d}return{left:i,center:a,right:s}}function P_(){return 0}function U_(e){return e===null?NaN:+e}function*B_(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const H_=gl(Jn),vl=H_.right;gl(U_).center;function He(e,t){let n,r;if(t===void 0)for(const i of e)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let s of e)(s=t(s,++i,e))!=null&&(n===void 0?s>=s&&(n=r=s):(n>s&&(n=s),r<s&&(r=s)))}return[n,r]}let ad=class extends Map{constructor(t,n=F_){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(od(this,t))}has(t){return super.has(od(this,t))}set(t,n){return super.set(V_(this,t),n)}delete(t){return super.delete(G_(this,t))}};function od({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function V_({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function G_({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function F_(e){return e!==null&&typeof e=="object"?e.valueOf():e}const z_=Math.sqrt(50),j_=Math.sqrt(10),W_=Math.sqrt(2);function zs(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),a=s>=z_?10:s>=j_?5:s>=W_?2:1;let o,l,c;return i<0?(c=Math.pow(10,-i)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=n&&n<2?zs(e,t,n*2):[o,l,c]}function js(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,s,a]=r?zs(t,e,n):zs(e,t,n);if(!(s>=i))return[];const o=s-i+1,l=new Array(o);if(r)if(a<0)for(let c=0;c<o;++c)l[c]=(s-c)/-a;else for(let c=0;c<o;++c)l[c]=(s-c)*a;else if(a<0)for(let c=0;c<o;++c)l[c]=(i+c)/-a;else for(let c=0;c<o;++c)l[c]=(i+c)*a;return l}function kr(e,t,n){return t=+t,e=+e,n=+n,zs(e,t,n)[2]}function yl(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?kr(t,e,n):kr(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function tr(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Dn(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}var q_={value:()=>{}};function xl(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ws(n)}function Ws(e){this._=e}function Y_(e,t){return e.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&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ws.prototype=xl.prototype={constructor:Ws,on:function(e,t){var n=this._,r=Y_(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=Z_(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(i=(e=r[s]).type)n[i]=ld(n[i],e.name,t);else if(t==null)for(i in n)n[i]=ld(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ws(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)}};function Z_(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function ld(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=q_,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var bl="http://www.w3.org/1999/xhtml";const cd={svg:"http://www.w3.org/2000/svg",xhtml:bl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function qs(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),cd.hasOwnProperty(t)?{space:cd[t],local:e}:e}function X_(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===bl&&t.documentElement.namespaceURI===bl?t.createElement(e):t.createElementNS(n,e)}}function K_(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ud(e){var t=qs(e);return(t.local?K_:X_)(t)}function Q_(){}function _l(e){return e==null?Q_:function(){return this.querySelector(e)}}function J_(e){typeof e!="function"&&(e=_l(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,o=r[i]=new Array(a),l,c,u=0;u<a;++u)(l=s[u])&&(c=e.call(l,l.__data__,u,s))&&("__data__"in l&&(c.__data__=l.__data__),o[u]=c);return new ve(r,this._parents)}function tE(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function eE(){return[]}function hd(e){return e==null?eE:function(){return this.querySelectorAll(e)}}function nE(e){return function(){return tE(e.apply(this,arguments))}}function rE(e){typeof e=="function"?e=nE(e):e=hd(e);for(var t=this._groups,n=t.length,r=[],i=[],s=0;s<n;++s)for(var a=t[s],o=a.length,l,c=0;c<o;++c)(l=a[c])&&(r.push(e.call(l,l.__data__,c,a)),i.push(l));return new ve(r,i)}function dd(e){return function(){return this.matches(e)}}function pd(e){return function(t){return t.matches(e)}}var iE=Array.prototype.find;function sE(e){return function(){return iE.call(this.children,e)}}function aE(){return this.firstElementChild}function oE(e){return this.select(e==null?aE:sE(typeof e=="function"?e:pd(e)))}var lE=Array.prototype.filter;function cE(){return Array.from(this.children)}function uE(e){return function(){return lE.call(this.children,e)}}function hE(e){return this.selectAll(e==null?cE:uE(typeof e=="function"?e:pd(e)))}function dE(e){typeof e!="function"&&(e=dd(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,o=r[i]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&o.push(l);return new ve(r,this._parents)}function fd(e){return new Array(e.length)}function pE(){return new ve(this._enter||this._groups.map(fd),this._parents)}function Ys(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ys.prototype={constructor:Ys,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function fE(e){return function(){return e}}function mE(e,t,n,r,i,s){for(var a=0,o,l=t.length,c=s.length;a<c;++a)(o=t[a])?(o.__data__=s[a],r[a]=o):n[a]=new Ys(e,s[a]);for(;a<l;++a)(o=t[a])&&(i[a]=o)}function gE(e,t,n,r,i,s,a){var o,l,c=new Map,u=t.length,d=s.length,h=new Array(u),p;for(o=0;o<u;++o)(l=t[o])&&(h[o]=p=a.call(l,l.__data__,o,t)+"",c.has(p)?i[o]=l:c.set(p,l));for(o=0;o<d;++o)p=a.call(e,s[o],o,s)+"",(l=c.get(p))?(r[o]=l,l.__data__=s[o],c.delete(p)):n[o]=new Ys(e,s[o]);for(o=0;o<u;++o)(l=t[o])&&c.get(h[o])===l&&(i[o]=l)}function vE(e){return e.__data__}function yE(e,t){if(!arguments.length)return Array.from(this,vE);var n=t?gE:mE,r=this._parents,i=this._groups;typeof e!="function"&&(e=fE(e));for(var s=i.length,a=new Array(s),o=new Array(s),l=new Array(s),c=0;c<s;++c){var u=r[c],d=i[c],h=d.length,p=xE(e.call(u,u&&u.__data__,c,r)),f=p.length,g=o[c]=new Array(f),m=a[c]=new Array(f),y=l[c]=new Array(h);n(u,d,g,m,y,p,t);for(var v=0,b=0,O,E;v<f;++v)if(O=g[v]){for(v>=b&&(b=v+1);!(E=m[b])&&++b<f;);O._next=E||null}}return a=new ve(a,r),a._enter=o,a._exit=l,a}function xE(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function bE(){return new ve(this._exit||this._groups.map(fd),this._parents)}function _E(e,t,n){var r=this.enter(),i=this,s=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?s.remove():n(s),r&&i?r.merge(i).order():i}function EE(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,s=r.length,a=Math.min(i,s),o=new Array(i),l=0;l<a;++l)for(var c=n[l],u=r[l],d=c.length,h=o[l]=new Array(d),p,f=0;f<d;++f)(p=c[f]||u[f])&&(h[f]=p);for(;l<i;++l)o[l]=n[l];return new ve(o,this._parents)}function OE(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,s=r[i],a;--i>=0;)(a=r[i])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function TE(e){e||(e=SE);function t(d,h){return d&&h?e(d.__data__,h.__data__):!d-!h}for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var a=n[s],o=a.length,l=i[s]=new Array(o),c,u=0;u<o;++u)(c=a[u])&&(l[u]=c);l.sort(t)}return new ve(i,this._parents).order()}function SE(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function wE(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function $E(){return Array.from(this)}function ME(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length;i<s;++i){var a=r[i];if(a)return a}return null}function CE(){let e=0;for(const t of this)++e;return e}function AE(){return!this.node()}function LE(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],s=0,a=i.length,o;s<a;++s)(o=i[s])&&e.call(o,o.__data__,s,i);return this}function kE(e){return function(){this.removeAttribute(e)}}function DE(e){return function(){this.removeAttributeNS(e.space,e.local)}}function RE(e,t){return function(){this.setAttribute(e,t)}}function IE(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function NE(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function PE(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function UE(e,t){var n=qs(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?DE:kE:typeof t=="function"?n.local?PE:NE:n.local?IE:RE)(n,t))}function md(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function BE(e){return function(){this.style.removeProperty(e)}}function HE(e,t,n){return function(){this.style.setProperty(e,t,n)}}function VE(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function GE(e,t,n){return arguments.length>1?this.each((t==null?BE:typeof t=="function"?VE:HE)(e,t,n??"")):Dr(this.node(),e)}function Dr(e,t){return e.style.getPropertyValue(t)||md(e).getComputedStyle(e,null).getPropertyValue(t)}function FE(e){return function(){delete this[e]}}function zE(e,t){return function(){this[e]=t}}function jE(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function WE(e,t){return arguments.length>1?this.each((t==null?FE:typeof t=="function"?jE:zE)(e,t)):this.node()[e]}function gd(e){return e.trim().split(/^|\s+/)}function El(e){return e.classList||new vd(e)}function vd(e){this._node=e,this._names=gd(e.getAttribute("class")||"")}vd.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function yd(e,t){for(var n=El(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function xd(e,t){for(var n=El(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function qE(e){return function(){yd(this,e)}}function YE(e){return function(){xd(this,e)}}function ZE(e,t){return function(){(t.apply(this,arguments)?yd:xd)(this,e)}}function XE(e,t){var n=gd(e+"");if(arguments.length<2){for(var r=El(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?ZE:t?qE:YE)(n,t))}function KE(){this.textContent=""}function QE(e){return function(){this.textContent=e}}function JE(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function tO(e){return arguments.length?this.each(e==null?KE:(typeof e=="function"?JE:QE)(e)):this.node().textContent}function eO(){this.innerHTML=""}function nO(e){return function(){this.innerHTML=e}}function rO(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function iO(e){return arguments.length?this.each(e==null?eO:(typeof e=="function"?rO:nO)(e)):this.node().innerHTML}function sO(){this.nextSibling&&this.parentNode.appendChild(this)}function aO(){return this.each(sO)}function oO(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function lO(){return this.each(oO)}function cO(e){var t=typeof e=="function"?e:ud(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function uO(){return null}function hO(e,t){var n=typeof e=="function"?e:ud(e),r=t==null?uO:typeof t=="function"?t:_l(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function dO(){var e=this.parentNode;e&&e.removeChild(this)}function pO(){return this.each(dO)}function fO(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function mO(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function gO(e){return this.select(e?mO:fO)}function vO(e){return arguments.length?this.property("__data__",e):this.node().__data__}function yO(e){return function(t){e.call(this,t,this.__data__)}}function xO(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function bO(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,s;n<i;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++r]=s;++r?t.length=r:delete this.__on}}}function _O(e,t,n){return function(){var r=this.__on,i,s=yO(t);if(r){for(var a=0,o=r.length;a<o;++a)if((i=r[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),i.value=t;return}}this.addEventListener(e.type,s,n),i={type:e.type,name:e.name,value:t,listener:s,options:n},r?r.push(i):this.__on=[i]}}function EO(e,t,n){var r=xO(e+""),i,s=r.length,a;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,c=o.length,u;l<c;++l)for(i=0,u=o[l];i<s;++i)if((a=r[i]).type===u.type&&a.name===u.name)return u.value}return}for(o=t?_O:bO,i=0;i<s;++i)this.each(o(r[i],t,n));return this}function bd(e,t,n){var r=md(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function OO(e,t){return function(){return bd(this,e,t)}}function TO(e,t){return function(){return bd(this,e,t.apply(this,arguments))}}function SO(e,t){return this.each((typeof t=="function"?TO:OO)(e,t))}function*wO(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length,a;i<s;++i)(a=r[i])&&(yield a)}var _d=[null];function ve(e,t){this._groups=e,this._parents=t}function ki(){return new ve([[document.documentElement]],_d)}function $O(){return this}ve.prototype=ki.prototype={constructor:ve,select:J_,selectAll:rE,selectChild:oE,selectChildren:hE,filter:dE,data:yE,enter:pE,exit:bE,join:_E,merge:EE,selection:$O,order:OE,sort:TE,call:wE,nodes:$E,node:ME,size:CE,empty:AE,each:LE,attr:UE,style:GE,property:WE,classed:XE,text:tO,html:iO,raise:aO,lower:lO,append:cO,insert:hO,remove:pO,clone:gO,datum:vO,on:EO,dispatch:SO,[Symbol.iterator]:wO};function MO(e){let t;for(;t=e.sourceEvent;)e=t;return e}function er(e,t){if(e=MO(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}function Ol(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ed(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Di(){}var Ri=.7,Zs=1/Ri,Rr="\\s*([+-]?\\d+)\\s*",Ii="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Je="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",CO=/^#([0-9a-f]{3,8})$/,AO=new RegExp(`^rgb\\(${Rr},${Rr},${Rr}\\)$`),LO=new RegExp(`^rgb\\(${Je},${Je},${Je}\\)$`),kO=new RegExp(`^rgba\\(${Rr},${Rr},${Rr},${Ii}\\)$`),DO=new RegExp(`^rgba\\(${Je},${Je},${Je},${Ii}\\)$`),RO=new RegExp(`^hsl\\(${Ii},${Je},${Je}\\)$`),IO=new RegExp(`^hsla\\(${Ii},${Je},${Je},${Ii}\\)$`),Od={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ol(Di,pn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Td,formatHex:Td,formatHex8:NO,formatHsl:PO,formatRgb:Sd,toString:Sd});function Td(){return this.rgb().formatHex()}function NO(){return this.rgb().formatHex8()}function PO(){return Ad(this).formatHsl()}function Sd(){return this.rgb().formatRgb()}function pn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=CO.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?wd(t):n===3?new ue(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Xs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Xs(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=AO.exec(e))?new ue(t[1],t[2],t[3],1):(t=LO.exec(e))?new ue(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=kO.exec(e))?Xs(t[1],t[2],t[3],t[4]):(t=DO.exec(e))?Xs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=RO.exec(e))?Cd(t[1],t[2]/100,t[3]/100,1):(t=IO.exec(e))?Cd(t[1],t[2]/100,t[3]/100,t[4]):Od.hasOwnProperty(e)?wd(Od[e]):e==="transparent"?new ue(NaN,NaN,NaN,0):null}function wd(e){return new ue(e>>16&255,e>>8&255,e&255,1)}function Xs(e,t,n,r){return r<=0&&(e=t=n=NaN),new ue(e,t,n,r)}function UO(e){return e instanceof Di||(e=pn(e)),e?(e=e.rgb(),new ue(e.r,e.g,e.b,e.opacity)):new ue}function Tl(e,t,n,r){return arguments.length===1?UO(e):new ue(e,t,n,r??1)}function ue(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Ol(ue,Tl,Ed(Di,{brighter(e){return e=e==null?Zs:Math.pow(Zs,e),new ue(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ri:Math.pow(Ri,e),new ue(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ue(nr(this.r),nr(this.g),nr(this.b),Ks(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:$d,formatHex:$d,formatHex8:BO,formatRgb:Md,toString:Md}));function $d(){return`#${rr(this.r)}${rr(this.g)}${rr(this.b)}`}function BO(){return`#${rr(this.r)}${rr(this.g)}${rr(this.b)}${rr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Md(){const e=Ks(this.opacity);return`${e===1?"rgb(":"rgba("}${nr(this.r)}, ${nr(this.g)}, ${nr(this.b)}${e===1?")":`, ${e})`}`}function Ks(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function nr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function rr(e){return e=nr(e),(e<16?"0":"")+e.toString(16)}function Cd(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ve(e,t,n,r)}function Ad(e){if(e instanceof Ve)return new Ve(e.h,e.s,e.l,e.opacity);if(e instanceof Di||(e=pn(e)),!e)return new Ve;if(e instanceof Ve)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),a=NaN,o=s-i,l=(s+i)/2;return o?(t===s?a=(n-r)/o+(n<r)*6:n===s?a=(r-t)/o+2:a=(t-n)/o+4,o/=l<.5?s+i:2-s-i,a*=60):o=l>0&&l<1?0:a,new Ve(a,o,l,e.opacity)}function Ld(e,t,n,r){return arguments.length===1?Ad(e):new Ve(e,t,n,r??1)}function Ve(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ol(Ve,Ld,Ed(Di,{brighter(e){return e=e==null?Zs:Math.pow(Zs,e),new Ve(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ri:Math.pow(Ri,e),new Ve(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new ue(Sl(e>=240?e-240:e+120,i,r),Sl(e,i,r),Sl(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ve(kd(this.h),Qs(this.s),Qs(this.l),Ks(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 e=Ks(this.opacity);return`${e===1?"hsl(":"hsla("}${kd(this.h)}, ${Qs(this.s)*100}%, ${Qs(this.l)*100}%${e===1?")":`, ${e})`}`}}));function kd(e){return e=(e||0)%360,e<0?e+360:e}function Qs(e){return Math.max(0,Math.min(1,e||0))}function Sl(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const wl=e=>()=>e;function HO(e,t){return function(n){return e+n*t}}function VO(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function GO(e){return(e=+e)==1?Dd:function(t,n){return n-t?VO(t,n,e):wl(isNaN(t)?n:t)}}function Dd(e,t){var n=t-e;return n?HO(e,n):wl(isNaN(e)?t:e)}const Js=function e(t){var n=GO(t);function r(i,s){var a=n((i=Tl(i)).r,(s=Tl(s)).r),o=n(i.g,s.g),l=n(i.b,s.b),c=Dd(i.opacity,s.opacity);return function(u){return i.r=a(u),i.g=o(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=e,r}(1);function FO(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(s){for(i=0;i<n;++i)r[i]=e[i]*(1-s)+t[i]*s;return r}}function zO(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function jO(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),s=new Array(n),a;for(a=0;a<r;++a)i[a]=Ni(e[a],t[a]);for(;a<n;++a)s[a]=t[a];return function(o){for(a=0;a<r;++a)s[a]=i[a](o);return s}}function WO(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function ye(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function qO(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Ni(e[i],t[i]):r[i]=t[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var $l=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ml=new RegExp($l.source,"g");function YO(e){return function(){return e}}function ZO(e){return function(t){return e(t)+""}}function Rd(e,t){var n=$l.lastIndex=Ml.lastIndex=0,r,i,s,a=-1,o=[],l=[];for(e=e+"",t=t+"";(r=$l.exec(e))&&(i=Ml.exec(t));)(s=i.index)>n&&(s=t.slice(n,s),o[a]?o[a]+=s:o[++a]=s),(r=r[0])===(i=i[0])?o[a]?o[a]+=i:o[++a]=i:(o[++a]=null,l.push({i:a,x:ye(r,i)})),n=Ml.lastIndex;return n<t.length&&(s=t.slice(n),o[a]?o[a]+=s:o[++a]=s),o.length<2?l[0]?ZO(l[0].x):YO(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)o[(d=l[u]).i]=d.x(c);return o.join("")})}function Ni(e,t){var n=typeof t,r;return t==null||n==="boolean"?wl(t):(n==="number"?ye:n==="string"?(r=pn(t))?(t=r,Js):Rd:t instanceof pn?Js:t instanceof Date?WO:zO(t)?FO:Array.isArray(t)?jO:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?qO:ye)(e,t)}function Id(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Nd=180/Math.PI,Pd={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ud(e,t,n,r,i,s){var a,o,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(o=Math.sqrt(n*n+r*r))&&(n/=o,r/=o,l/=o),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:s,rotate:Math.atan2(t,e)*Nd,skewX:Math.atan(l)*Nd,scaleX:a,scaleY:o}}var ta;function XO(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Pd:Ud(t.a,t.b,t.c,t.d,t.e,t.f)}function KO(e){return e==null||(ta||(ta=document.createElementNS("http://www.w3.org/2000/svg","g")),ta.setAttribute("transform",e),!(e=ta.transform.baseVal.consolidate()))?Pd:(e=e.matrix,Ud(e.a,e.b,e.c,e.d,e.e,e.f))}function Bd(e,t,n,r){function i(c){return c.length?c.pop()+" ":""}function s(c,u,d,h,p,f){if(c!==d||u!==h){var g=p.push("translate(",null,t,null,n);f.push({i:g-4,x:ye(c,d)},{i:g-2,x:ye(u,h)})}else(d||h)&&p.push("translate("+d+t+h+n)}function a(c,u,d,h){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),h.push({i:d.push(i(d)+"rotate(",null,r)-2,x:ye(c,u)})):u&&d.push(i(d)+"rotate("+u+r)}function o(c,u,d,h){c!==u?h.push({i:d.push(i(d)+"skewX(",null,r)-2,x:ye(c,u)}):u&&d.push(i(d)+"skewX("+u+r)}function l(c,u,d,h,p,f){if(c!==d||u!==h){var g=p.push(i(p)+"scale(",null,",",null,")");f.push({i:g-4,x:ye(c,d)},{i:g-2,x:ye(u,h)})}else(d!==1||h!==1)&&p.push(i(p)+"scale("+d+","+h+")")}return function(c,u){var d=[],h=[];return c=e(c),u=e(u),s(c.translateX,c.translateY,u.translateX,u.translateY,d,h),a(c.rotate,u.rotate,d,h),o(c.skewX,u.skewX,d,h),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,h),c=u=null,function(p){for(var f=-1,g=h.length,m;++f<g;)d[(m=h[f]).i]=m.x(p);return d.join("")}}}var QO=Bd(XO,"px, ","px)","deg)"),JO=Bd(KO,", ",")",")"),Ir=0,Pi=0,Ui=0,Hd=1e3,ea,Bi,na=0,ir=0,ra=0,Hi=typeof performance=="object"&&performance.now?performance:Date,Vd=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Cl(){return ir||(Vd(tT),ir=Hi.now()+ra)}function tT(){ir=0}function ia(){this._call=this._time=this._next=null}ia.prototype=Gd.prototype={constructor:ia,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Cl():+n)+(t==null?0:+t),!this._next&&Bi!==this&&(Bi?Bi._next=this:ea=this,Bi=this),this._call=e,this._time=n,Al()},stop:function(){this._call&&(this._call=null,this._time=1/0,Al())}};function Gd(e,t,n){var r=new ia;return r.restart(e,t,n),r}function eT(){Cl(),++Ir;for(var e=ea,t;e;)(t=ir-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ir}function Fd(){ir=(na=Hi.now())+ra,Ir=Pi=0;try{eT()}finally{Ir=0,rT(),ir=0}}function nT(){var e=Hi.now(),t=e-na;t>Hd&&(ra-=t,na=e)}function rT(){for(var e,t=ea,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ea=n);Bi=e,Al(r)}function Al(e){if(!Ir){Pi&&(Pi=clearTimeout(Pi));var t=e-ir;t>24?(e<1/0&&(Pi=setTimeout(Fd,e-Hi.now()-ra)),Ui&&(Ui=clearInterval(Ui))):(Ui||(na=Hi.now(),Ui=setInterval(nT,Hd)),Ir=1,Vd(Fd))}}function zd(e,t,n){var r=new ia;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var iT=xl("start","end","cancel","interrupt"),sT=[],jd=0,Wd=1,Ll=2,sa=3,qd=4,kl=5,aa=6;function oa(e,t,n,r,i,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;aT(e,n,{name:t,index:r,group:i,on:iT,tween:sT,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:jd})}function Dl(e,t){var n=Ge(e,t);if(n.state>jd)throw new Error("too late; already scheduled");return n}function tn(e,t){var n=Ge(e,t);if(n.state>sa)throw new Error("too late; already running");return n}function Ge(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function aT(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Gd(s,0,n.time);function s(c){n.state=Wd,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var u,d,h,p;if(n.state!==Wd)return l();for(u in r)if(p=r[u],p.name===n.name){if(p.state===sa)return zd(a);p.state===qd?(p.state=aa,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete r[u]):+u<t&&(p.state=aa,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete r[u])}if(zd(function(){n.state===sa&&(n.state=qd,n.timer.restart(o,n.delay,n.time),o(c))}),n.state=Ll,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Ll){for(n.state=sa,i=new Array(h=n.tween.length),u=0,d=-1;u<h;++u)(p=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=p);i.length=d+1}}function o(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=kl,1),d=-1,h=i.length;++d<h;)i[d].call(e,u);n.state===kl&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=aa,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function Rl(e,t){var n=e.__transition,r,i,s=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){s=!1;continue}i=r.state>Ll&&r.state<kl,r.state=aa,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}s&&delete e.__transition}}function oT(e){return this.each(function(){Rl(this,e)})}function lT(e,t){var n,r;return function(){var i=tn(this,e),s=i.tween;if(s!==n){r=n=s;for(var a=0,o=r.length;a<o;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function cT(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=tn(this,e),a=s.tween;if(a!==r){i=(r=a).slice();for(var o={name:t,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=o;break}l===c&&i.push(o)}s.tween=i}}function uT(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Ge(this.node(),n).tween,i=0,s=r.length,a;i<s;++i)if((a=r[i]).name===e)return a.value;return null}return this.each((t==null?lT:cT)(n,e,t))}function Il(e,t,n){var r=e._id;return e.each(function(){var i=tn(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Ge(i,r).value[t]}}function Yd(e,t){var n;return(typeof t=="number"?ye:t instanceof pn?Js:(n=pn(t))?(t=n,Js):Rd)(e,t)}function hT(e){return function(){this.removeAttribute(e)}}function dT(e){return function(){this.removeAttributeNS(e.space,e.local)}}function pT(e,t,n){var r,i=n+"",s;return function(){var a=this.getAttribute(e);return a===i?null:a===r?s:s=t(r=a,n)}}function fT(e,t,n){var r,i=n+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?s:s=t(r=a,n)}}function mT(e,t,n){var r,i,s;return function(){var a,o=n(this),l;return o==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=o+"",a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o)))}}function gT(e,t,n){var r,i,s;return function(){var a,o=n(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=o+"",a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o)))}}function vT(e,t){var n=qs(e),r=n==="transform"?JO:Yd;return this.attrTween(e,typeof t=="function"?(n.local?gT:mT)(n,r,Il(this,"attr."+e,t)):t==null?(n.local?dT:hT)(n):(n.local?fT:pT)(n,r,t))}function yT(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function xT(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function bT(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&xT(e,s)),n}return i._value=t,i}function _T(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&yT(e,s)),n}return i._value=t,i}function ET(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=qs(e);return this.tween(n,(r.local?bT:_T)(r,t))}function OT(e,t){return function(){Dl(this,e).delay=+t.apply(this,arguments)}}function TT(e,t){return t=+t,function(){Dl(this,e).delay=t}}function ST(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?OT:TT)(t,e)):Ge(this.node(),t).delay}function wT(e,t){return function(){tn(this,e).duration=+t.apply(this,arguments)}}function $T(e,t){return t=+t,function(){tn(this,e).duration=t}}function MT(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?wT:$T)(t,e)):Ge(this.node(),t).duration}function CT(e,t){if(typeof t!="function")throw new Error;return function(){tn(this,e).ease=t}}function AT(e){var t=this._id;return arguments.length?this.each(CT(t,e)):Ge(this.node(),t).ease}function LT(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;tn(this,e).ease=n}}function kT(e){if(typeof e!="function")throw new Error;return this.each(LT(this._id,e))}function DT(e){typeof e!="function"&&(e=dd(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,o=r[i]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&o.push(l);return new fn(r,this._parents,this._name,this._id)}function RT(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,s=Math.min(r,i),a=new Array(r),o=0;o<s;++o)for(var l=t[o],c=n[o],u=l.length,d=a[o]=new Array(u),h,p=0;p<u;++p)(h=l[p]||c[p])&&(d[p]=h);for(;o<r;++o)a[o]=t[o];return new fn(a,this._parents,this._name,this._id)}function IT(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function NT(e,t,n){var r,i,s=IT(t)?Dl:tn;return function(){var a=s(this,e),o=a.on;o!==r&&(i=(r=o).copy()).on(t,n),a.on=i}}function PT(e,t){var n=this._id;return arguments.length<2?Ge(this.node(),n).on.on(e):this.each(NT(n,e,t))}function UT(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function BT(){return this.on("end.remove",UT(this._id))}function HT(e){var t=this._name,n=this._id;typeof e!="function"&&(e=_l(e));for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a)for(var o=r[a],l=o.length,c=s[a]=new Array(l),u,d,h=0;h<l;++h)(u=o[h])&&(d=e.call(u,u.__data__,h,o))&&("__data__"in u&&(d.__data__=u.__data__),c[h]=d,oa(c[h],t,n,h,c,Ge(u,n)));return new fn(s,this._parents,t,n)}function VT(e){var t=this._name,n=this._id;typeof e!="function"&&(e=hd(e));for(var r=this._groups,i=r.length,s=[],a=[],o=0;o<i;++o)for(var l=r[o],c=l.length,u,d=0;d<c;++d)if(u=l[d]){for(var h=e.call(u,u.__data__,d,l),p,f=Ge(u,n),g=0,m=h.length;g<m;++g)(p=h[g])&&oa(p,t,n,g,h,f);s.push(h),a.push(u)}return new fn(s,a,t,n)}var GT=ki.prototype.constructor;function FT(){return new GT(this._groups,this._parents)}function zT(e,t){var n,r,i;return function(){var s=Dr(this,e),a=(this.style.removeProperty(e),Dr(this,e));return s===a?null:s===n&&a===r?i:i=t(n=s,r=a)}}function Zd(e){return function(){this.style.removeProperty(e)}}function jT(e,t,n){var r,i=n+"",s;return function(){var a=Dr(this,e);return a===i?null:a===r?s:s=t(r=a,n)}}function WT(e,t,n){var r,i,s;return function(){var a=Dr(this,e),o=n(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),Dr(this,e))),a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o))}}function qT(e,t){var n,r,i,s="style."+t,a="end."+s,o;return function(){var l=tn(this,e),c=l.on,u=l.value[s]==null?o||(o=Zd(t)):void 0;(c!==n||i!==u)&&(r=(n=c).copy()).on(a,i=u),l.on=r}}function YT(e,t,n){var r=(e+="")=="transform"?QO:Yd;return t==null?this.styleTween(e,zT(e,r)).on("end.style."+e,Zd(e)):typeof t=="function"?this.styleTween(e,WT(e,r,Il(this,"style."+e,t))).each(qT(this._id,e)):this.styleTween(e,jT(e,r,t),n).on("end.style."+e,null)}function ZT(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function XT(e,t,n){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&ZT(e,a,n)),r}return s._value=t,s}function KT(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,XT(e,t,n??""))}function QT(e){return function(){this.textContent=e}}function JT(e){return function(){var t=e(this);this.textContent=t??""}}function tS(e){return this.tween("text",typeof e=="function"?JT(Il(this,"text",e)):QT(e==null?"":e+""))}function eS(e){return function(t){this.textContent=e.call(this,t)}}function nS(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&eS(i)),t}return r._value=e,r}function rS(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,nS(e))}function iS(){for(var e=this._name,t=this._id,n=Xd(),r=this._groups,i=r.length,s=0;s<i;++s)for(var a=r[s],o=a.length,l,c=0;c<o;++c)if(l=a[c]){var u=Ge(l,t);oa(l,e,n,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new fn(r,this._parents,e,n)}function sS(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(s,a){var o={value:a},l={value:function(){--i===0&&s()}};n.each(function(){var c=tn(this,r),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),c.on=t}),i===0&&s()})}var aS=0;function fn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Xd(){return++aS}var mn=ki.prototype;fn.prototype={constructor:fn,select:HT,selectAll:VT,selectChild:mn.selectChild,selectChildren:mn.selectChildren,filter:DT,merge:RT,selection:FT,transition:iS,call:mn.call,nodes:mn.nodes,node:mn.node,size:mn.size,empty:mn.empty,each:mn.each,on:PT,attr:vT,attrTween:ET,style:YT,styleTween:KT,text:tS,textTween:rS,remove:BT,tween:uT,delay:ST,duration:MT,ease:AT,easeVarying:kT,end:sS,[Symbol.iterator]:mn[Symbol.iterator]};function Kd(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var oS={time:null,delay:0,duration:250,ease:Kd};function lS(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function cS(e){var t,n;e instanceof fn?(t=e._id,e=e._name):(t=Xd(),(n=oS).time=Cl(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,s=0;s<i;++s)for(var a=r[s],o=a.length,l,c=0;c<o;++c)(l=a[c])&&oa(l,e,t,c,a,n||lS(l,t));return new fn(r,this._parents,e,t)}ki.prototype.interrupt=oT,ki.prototype.transition=cS;function uS(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function la(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Nr(e){return e=la(Math.abs(e)),e?e[1]:NaN}function hS(e,t){return function(n,r){for(var i=n.length,s=[],a=0,o=e[0],l=0;i>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),s.push(n.substring(i-=o,i+o)),!((l+=o+1)>r));)o=e[a=(a+1)%e.length];return s.reverse().join(t)}}function dS(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var pS=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Vi(e){if(!(t=pS.exec(e)))throw new Error("invalid format: "+e);var t;return new Nl({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Vi.prototype=Nl.prototype;function Nl(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Nl.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 fS(e){t:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break t;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Qd;function mS(e,t){var n=la(e,t);if(!n)return e+"";var r=n[0],i=n[1],s=i-(Qd=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return s===a?r:s>a?r+new Array(s-a+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+la(e,Math.max(0,t+s-1))[0]}function Jd(e,t){var n=la(e,t);if(!n)return e+"";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 tp={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:uS,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Jd(e*100,t),r:Jd,s:mS,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function ep(e){return e}var np=Array.prototype.map,rp=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function gS(e){var t=e.grouping===void 0||e.thousands===void 0?ep:hS(np.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?ep:dS(np.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=Vi(d);var h=d.fill,p=d.align,f=d.sign,g=d.symbol,m=d.zero,y=d.width,v=d.comma,b=d.precision,O=d.trim,E=d.type;E==="n"?(v=!0,E="g"):tp[E]||(b===void 0&&(b=12),O=!0,E="g"),(m||h==="0"&&p==="=")&&(m=!0,h="0",p="=");var S=g==="$"?n:g==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",C=g==="$"?r:/[%p]/.test(E)?a:"",I=tp[E],L=/[defgprs%]/.test(E);b=b===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function k(w){var V=S,P=C,B,_,M;if(E==="c")P=I(w)+P,w="";else{w=+w;var A=w<0||1/w<0;if(w=isNaN(w)?l:I(Math.abs(w),b),O&&(w=fS(w)),A&&+w==0&&f!=="+"&&(A=!1),V=(A?f==="("?f:o:f==="-"||f==="("?"":f)+V,P=(E==="s"?rp[8+Qd/3]:"")+P+(A&&f==="("?")":""),L){for(B=-1,_=w.length;++B<_;)if(M=w.charCodeAt(B),48>M||M>57){P=(M===46?i+w.slice(B+1):w.slice(B))+P,w=w.slice(0,B);break}}}v&&!m&&(w=t(w,1/0));var N=V.length+w.length+P.length,U=N<y?new Array(y-N+1).join(h):"";switch(v&&m&&(w=t(U+w,U.length?y-P.length:1/0),U=""),p){case"<":w=V+w+P+U;break;case"=":w=V+U+w+P;break;case"^":w=U.slice(0,N=U.length>>1)+V+w+P+U.slice(N);break;default:w=U+V+w+P;break}return s(w)}return k.toString=function(){return d+""},k}function u(d,h){var p=c((d=Vi(d),d.type="f",d)),f=Math.max(-8,Math.min(8,Math.floor(Nr(h)/3)))*3,g=Math.pow(10,-f),m=rp[8+f/3];return function(y){return p(g*y)+m}}return{format:c,formatPrefix:u}}var ca,Pl,ip;vS({thousands:",",grouping:[3],currency:["$",""]});function vS(e){return ca=gS(e),Pl=ca.format,ip=ca.formatPrefix,ca}function yS(e){return Math.max(0,-Nr(Math.abs(e)))}function xS(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Nr(t)/3)))*3-Nr(Math.abs(e)))}function bS(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Nr(t)-Nr(e))+1}function Pr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const sp=Symbol("implicit");function ua(){var e=new ad,t=[],n=[],r=sp;function i(s){let a=e.get(s);if(a===void 0){if(r!==sp)return r;e.set(s,a=t.push(s)-1)}return n[a%n.length]}return i.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new ad;for(const a of s)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(s){return arguments.length?(n=Array.from(s),i):n.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.copy=function(){return ua(t,n).unknown(r)},Pr.apply(i,arguments),i}function _S(e){return function(){return e}}function ES(e){return+e}var ap=[0,1];function Ur(e){return e}function Ul(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:_S(isNaN(t)?NaN:.5)}function OS(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function TS(e,t,n){var r=e[0],i=e[1],s=t[0],a=t[1];return i<r?(r=Ul(i,r),s=n(a,s)):(r=Ul(r,i),s=n(s,a)),function(o){return s(r(o))}}function SS(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),s=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Ul(e[a],e[a+1]),s[a]=n(t[a],t[a+1]);return function(o){var l=vl(e,o,1,r)-1;return s[l](i[l](o))}}function Bl(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function op(){var e=ap,t=ap,n=Ni,r,i,s,a=Ur,o,l,c;function u(){var h=Math.min(e.length,t.length);return a!==Ur&&(a=OS(e[0],e[h-1])),o=h>2?SS:TS,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?s:(l||(l=o(e.map(r),t,n)))(r(a(h)))}return d.invert=function(h){return a(i((c||(c=o(t,e.map(r),ye)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,ES),u()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=Id,u()},d.clamp=function(h){return arguments.length?(a=h?!0:Ur,u()):a!==Ur},d.interpolate=function(h){return arguments.length?(n=h,u()):n},d.unknown=function(h){return arguments.length?(s=h,d):s},function(h,p){return r=h,i=p,u()}}function lp(){return op()(Ur,Ur)}function wS(e,t,n,r){var i=yl(e,t,n),s;switch(r=Vi(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(s=xS(i,a))&&(r.precision=s),ip(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=bS(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=yS(i))&&(r.precision=s-(r.type==="%")*2);break}}return Pl(r)}function cp(e){var t=e.domain;return e.ticks=function(n){var r=t();return js(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return wS(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,s=r.length-1,a=r[i],o=r[s],l,c,u=10;for(o<a&&(c=a,a=o,o=c,c=i,i=s,s=c);u-- >0;){if(c=kr(a,o,n),c===l)return r[i]=a,r[s]=o,t(r);if(c>0)a=Math.floor(a/c)*c,o=Math.ceil(o/c)*c;else if(c<0)a=Math.ceil(a*c)/c,o=Math.floor(o*c)/c;else break;l=c}return e},e}function Fe(){var e=lp();return e.copy=function(){return Bl(e,Fe())},Pr.apply(e,arguments),cp(e)}function Hl(){var e=0,t=1,n=1,r=[.5],i=[0,1],s;function a(l){return l!=null&&l<=l?i[vl(r,l,0,n)]:s}function o(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,o()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,o()):i.slice()},a.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(s=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Hl().domain([e,t]).range(i).unknown(s)},Pr.apply(cp(a),arguments)}function Gi(e,t,n){this.k=e,this.x=t,this.y=n}Gi.prototype={constructor:Gi,scale:function(e){return e===1?this:new Gi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Gi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Gi.prototype;const he="cds",gn={opacity:{unselected:.05,selected:.4}},Rn={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1,hover:{rectanglePadding:4}},Br={duration:1e3,ease:Kd,zoomLevel:3},Hr={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},depth:2},up={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},Ae={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},$S={defaultBins:10},It={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8,spaceAfter:4},checkbox:{radius:6.5},radius:{iconData:[{cx:7,cy:7,r:6.5},{cx:7,cy:10,r:3.5}],fill:null,stroke:"#8c8c8c"},line:{yPosition:6,width:24,strokeWidth:1.4,fill:null,stroke:"#999999"},area:{width:24,height:14,fill:"#6f6f6f",stroke:null},size:{iconData:[{width:23,height:12},{width:13,height:6}],fill:null,stroke:"#8D8D8D"},quartile:{iconData:[{x:0,y:0,width:24,height:13},{x:11,y:4,width:1,height:4}]},zoom:{iconData:[{x:0,y:0,width:12,height:12}],color:"#8D8D8D"},color:{barWidth:300,barHeight:8,axisYTranslation:10}},vn={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},Kt={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15},total:{paddingLeft:36,paddingRight:24},height:{default:8,proportional:16},dividerWidth:2},At={radiusOffset:-15,innerRadius:2,padAngle:.007,hoverArc:{outerRadiusOffset:3},xOffset:30,yOffset:20,yOffsetCallout:10,callout:{minSliceDegree:5,offsetX:15,offsetY:12,horizontalLineLength:8,textMargin:2}},sr={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},ze={nodeWidth:4,nodeHoveredWidth:8,minNodePadding:24,opacity:{unfocus:.3,default:.8,selected:1}},hp={minCellDividerDimension:16,chartPadding:.5},dp={default:{size:24}},pp={defaultOffset:4,horizontalOffset:10},fp={default:{duration:300},pie_slice_mouseover:{duration:100},pie_slice_mouseout:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},xe={height:{[Ne.GRAPH_VIEW]:32,[Ne.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},MS=[{type:Ft.RADIUS,name:"Radius"},{type:Ft.AREA,name:"Poor area"},{type:Ft.AREA,name:"Satisfactory area"},{type:Ft.AREA,name:"Great area"},{type:Ft.QUARTILE,name:"Quartiles"}],Vr={type:Se.END_LINE,threshold:16,numCharacter:14},CS={code:typeof navigator<"u"&&(navigator==null?void 0:navigator.language)||"en-US",number:(e,t=(navigator==null?void 0:navigator.language)||"en-US")=>e.toLocaleString(t),date:(e,t=(navigator==null?void 0:navigator.language)||"en-US",n={},r=null)=>r||e.toLocaleDateString(t,n),time:(e,t=(navigator==null?void 0:navigator.language)||"en-US",n={},r=null)=>r||e.toLocaleTimeString(t,n),optionsObject:{"15seconds":{primary:{"MMM d, pp":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"MMM d, h:mm:ss.SSS a":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},secondary:{pp:{hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"h:mm:ss.SSS a":{hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},type:"time"},minute:{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},"30minutes":{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},hourly:{primary:{"MMM d, hh a":{month:"short",day:"numeric",hour:"2-digit",hourCycle:"h12"}},secondary:{"hh a":{hour:"2-digit",hourCycle:"h12"}},type:"time"},daily:{primary:{"MMM d":{month:"short",day:"numeric"}},secondary:{d:{day:"numeric"}},type:"date"},weekly:{primary:{"eee, MMM d":{weekday:"short",month:"short",day:"numeric"}},secondary:{eee:{weekday:"short"}},type:"date"},monthly:{primary:{"MMM yyyy":{month:"short",year:"numeric"}},secondary:{MMM:{month:"short"}},type:"date"},quarterly:{primary:{},secondary:{},type:"date"},yearly:{primary:{yyyy:{year:"numeric"}},secondary:{yyyy:{year:"numeric"}},type:"date"}},translations:{group:"Group",total:"Total",meter:{title:""},tabularRep:{title:"Tabular representation",downloadAsCSV:"Download as CSV"},toolbar:{exportAsCSV:"Export to CSV",exportAsJPG:"Export to JPG",exportAsPNG:"Export to PNG",zoomIn:"Zoom in",zoomOut:"Zoom out",resetZoom:"Reset zoom",moreOptions:"More options",makeFullScreen:"Make fullscreen",exitFullScreen:"Exit fullscreen",showAsTable:"Show as table"}}},AS={enabled:!0,position:Tr.BOTTOM,clickable:!0,truncation:Vr,alignment:Vt.LEFT,order:null,additionalItems:[]},LS={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},kS={enabled:!0},mp={enabled:!0,showTotal:!0,truncation:Vr,groupLabel:"Group"},gp={top:{visible:!0,includeZero:!0,truncation:Vr},bottom:{visible:!0,includeZero:!0,truncation:Vr},left:{visible:!0,includeZero:!0,truncation:Vr},right:{visible:!0,includeZero:!0,truncation:Vr}},ha={addSpaceOnEdges:1,showDayName:!1,localeObject:Xu,timeIntervalFormats:{"15seconds":{primary:"MMM d, pp",secondary:"pp"},minute:{primary:"MMM d, p",secondary:"p"},"30minutes":{primary:"MMM d, p",secondary:"p"},hourly:{primary:"MMM d, hh a",secondary:"hh a"},daily:{primary:"MMM d",secondary:"d"},weekly:{primary:"eee, MMM d",secondary:"eee"},monthly:{primary:"MMM yyyy",secondary:"MMM"},quarterly:{primary:"QQQ ''yy",secondary:"QQQ"},yearly:{primary:"yyyy",secondary:"yyyy"}}};let vp=!1;try{vp=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}catch(e){console.warn("Fullscreen capabilities check failed: ",e.message)}const Jt={width:null,height:null,resizable:!0,theme:Fo.WHITE,tooltip:mp,legend:AS,locale:CS,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}},toolbar:{enabled:!0,numberOfIcons:3,controls:[{type:xt.SHOW_AS_DATATABLE},...vp?[{type:xt.MAKE_FULLSCREEN}]:[],{type:xt.EXPORT_CSV},{type:xt.EXPORT_PNG},{type:xt.EXPORT_JPG}]}},yp=st({},Jt,{thematic:{projection:Ke.geoNaturalEarth1}}),Fi=st({},Jt,{axes:gp,timeScale:ha,grid:LS,ruler:kS,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:Ne.GRAPH_VIEW}}}),ar=st({},Fi,{bars:{maxWidth:16,spacingFactor:.25},timeScale:st(ha,{addSpaceOnEdges:1})}),DS=st({},ar,{}),RS=st({},ar,{}),IS=st({},ar,{bars:st({},ar.bars,{dividerSize:1.5})}),NS=st({},ar,{}),Vl=st({},Fi,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),PS=Vl,xp=st({},Vl,{points:{radius:3,filled:!1,enabled:!0}}),bp=st({},xp,{timeScale:st(ha,{addSpaceOnEdges:0})}),US=bp,BS=st({},Fi,{bubble:{radiusMapsTo:"radius",radiusLabel:"Radius",radiusRange:e=>{const t=Math.min(e.width,e.height);return[t*3/400,t*25/400]},fillOpacity:.2,enabled:!0},points:{filled:!0},legend:{additionalItems:[{type:Ft.RADIUS,name:"Radius"}]}}),HS=st({},Fi,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:Ft.AREA,name:"Poor area"},{type:Ft.AREA,name:"Satisfactory area"},{type:Ft.AREA,name:"Great area"},{type:Ft.QUARTILE,name:"Quartiles"}]}}),VS=st({},ar,{bars:{dividerSize:1.5},timeScale:st(ha,{addSpaceOnEdges:0})}),GS=st({},Jt,{tooltip:st({},mp,{wordLabel:"Word",valueLabel:"Value"}),wordCloud:{fontSizeMapsTo:"value",fontSizeRange:e=>{const t=Math.min(e.width,e.height);return[t*20/400,t*75/400]},wordMapsTo:"word"}}),_p=st({},Jt,{pie:{labels:{formatter:null,enabled:!0},alignment:Vt.LEFT,sortFunction:null,valueMapsTo:"value"}}),FS=st({},Jt,{legend:{enabled:!1},gauge:{type:Wn.SEMI,arcWidth:16,deltaArrow:{size:e=>e/8,enabled:!0},showPercentageSymbol:!0,status:null,numberSpacing:10,deltaFontSize:e=>e/8,valueFontSize:e=>e/2.5,alignment:Vt.LEFT}}),zS=st({},_p,{donut:{center:{numberFontSize:e=>`${Math.min(e/100*24,24)}px`,titleFontSize:e=>`${Math.min(e/100*15,15)}px`,titleYPosition:e=>Math.min(e/80*20,20)},alignment:Vt.LEFT}}),Ep=st({},Jt,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),jS=st({},Ep,{legend:{enabled:!0}}),WS=st({},Jt,{radar:{axes:{angle:"key",value:"value"},alignment:Vt.LEFT},tooltip:{gridline:{enabled:!0}}}),qS=st({},ar,{comboChartTypes:[]}),YS=st({tree:{type:$s.TREE}},Jt,{}),ZS=st({},Jt,{data:st(Jt.data,{groupMapsTo:"name"})}),XS=st({},Jt,Hr,{data:st(Jt.data,{groupMapsTo:"name"})}),KS=st({},Jt,{alluvial:{data:st(Jt.data,{groupMapsTo:"source"}),nodeAlignment:Vt.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),QS=st({},Jt,{axes:gp,heatmap:{divider:{state:wr.AUTO},colorLegend:{type:"linear"}}}),JS=st({},yp,{choropleth:{colorLegend:{type:"linear"}}}),$t={alluvialChart:KS,areaChart:bp,axisChart:Fi,boxplotChart:NS,bubbleChart:BS,bulletChart:HS,chart:Jt,circlePackChart:XS,choroplethChart:JS,comboChart:qS,donutChart:zS,gaugeChart:FS,groupedBarChart:RS,heatmapChart:QS,histogramChart:VS,lineChart:xp,lollipopChart:PS,meterChart:Ep,pieChart:_p,proportionalMeterChart:jS,radarChart:WS,scatterChart:Vl,simpleBarChart:DS,stackedAreaChart:US,stackedBarChart:IS,thematicChart:yp,treeChart:YS,treemapChart:ZS,wordCloudChart:GS};function tw(e,t,n){let r=null;return function(...i){const s=this;s.mousePosition=er(i[0],n),clearTimeout(r),r=setTimeout(function(){e.apply(s,i)},t)}}function Rt(e,t){var n;const r=dn(e),i=Object.keys(t.axes||{});(n=t==null?void 0:t.toolbar)!=null&&n.controls&&delete r.toolbar.controls,i.length===0&&delete r.axes;for(const s in r.axes)if(i.includes(s)){const a=t.axes[s];if((a.primary||a.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://charts.carbondesignsystem.com/"),a.mapsTo==null){const l=a.scaleType;l==null?a.mapsTo="value":l===X.TIME?a.mapsTo="date":l===X.LABELS&&(a.mapsTo="key")}}else delete r.axes[s];return Fl(r,t),st(r,t)}function yn(e){if(!e)return;const t=/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/,n=e.getAttribute("transform").match(t);if(!n)return null;if(n[0]){const r=n[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:r[0],ty:r[1]}}return null}function zi(e){const t=/\(([^)]+)\)/.exec(e);if(t&&t.length>1){const n=t[1].split(",");if(n.length>1)return{x:parseFloat(n[0]),y:parseFloat(n[1])}}return{x:0,y:0}}function Gl(e,t,n="value",r=!1){const i=e/t.reduce((s,a)=>s+a[n],0)*100;return r?i:i%1!==0?parseFloat(i.toFixed(1)):i}function ji(e,t,n){if(n>e.length)return e;if(t===Se.MID_LINE)return e.substr(0,n/2)+"..."+e.substr(-n/2);if(t===Se.FRONT_LINE)return"..."+e.substr(-n);if(t===Se.END_LINE)return e.substr(0,n)+"..."}function Fl(e,t){const n=x(e,"legend","additionalItems"),r=x(t,"legend","additionalItems");if(n&&r){const i=r.map(o=>o.type),s=n.map(o=>o.type),a=MS.filter(o=>s.includes(o.type)&&!i.includes(o.type));e.legend.additionalItems=a,t.legend.additionalItems=I_(a,r,"name")}}const x=(e,...t)=>{let n=e;if(n){for(const r of t)if(n[r]!==null&&n[r]!==void 0)n=n[r];else return null;return n}return null},Op=(e,t)=>t===Ht.HORIZONTAL?{y0:e.x0,y1:e.x1,x0:e.y0,x1:e.y1}:e,ie=(e,t)=>{const{x0:n,x1:r,y0:i,y1:s}=Op(e,t);return`M${n},${i}L${n},${s}L${r},${s}L${r},${i}L${n},${i}`};function xn(e,t,n){return n===Ht.VERTICAL?[e,t]:[t,e]}function Tp(e){const t=Nt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Sp(e,t){const n=Nt(e,void 0);return n.setHours(0,0,0,0),n}function wp(e,t,n){const[r,i]=qn(void 0,e,t),s=Sp(r),a=Sp(i),o=+s-Tp(s),l=+a-Tp(a);return Math.round((o-l)/u0)}function ew(e,t){const n=Nt(e,void 0);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function nw(e,t){const n=Nt(e,void 0);return wp(n,ew(n))+1}function da(e,t){return xi(e,{...t,weekStartsOn:1})}function $p(e,t){const n=Nt(e,void 0),r=n.getFullYear(),i=we(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const s=da(i),a=we(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const o=da(a);return n.getTime()>=s.getTime()?r+1:n.getTime()>=o.getTime()?r:r-1}function rw(e,t){const n=$p(e),r=we(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),da(r)}function iw(e,t){const n=Nt(e,void 0),r=+da(n)-+rw(n);return Math.round(r/Wu)+1}function Mp(e,t){var n,r,i,s;const a=Nt(e,t==null?void 0:t.in),o=a.getFullYear(),l=As(),c=(t==null?void 0:t.firstWeekContainsDate)??((r=(n=t==null?void 0:t.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??l.firstWeekContainsDate??((s=(i=l.locale)==null?void 0:i.options)==null?void 0:s.firstWeekContainsDate)??1,u=we((t==null?void 0:t.in)||e,0);u.setFullYear(o+1,0,c),u.setHours(0,0,0,0);const d=xi(u,t),h=we((t==null?void 0:t.in)||e,0);h.setFullYear(o,0,c),h.setHours(0,0,0,0);const p=xi(h,t);return+a>=+d?o+1:+a>=+p?o:o-1}function sw(e,t){var n,r,i,s;const a=As(),o=(t==null?void 0:t.firstWeekContainsDate)??((r=(n=t==null?void 0:t.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??a.firstWeekContainsDate??((s=(i=a.locale)==null?void 0:i.options)==null?void 0:s.firstWeekContainsDate)??1,l=Mp(e,t),c=we((t==null?void 0:t.in)||e,0);return c.setFullYear(l,0,o),c.setHours(0,0,0,0),xi(c,t)}function aw(e,t){const n=Nt(e,t==null?void 0:t.in),r=+xi(n,t)-+sw(n,t);return Math.round(r/Wu)+1}function _t(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const In={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return _t(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):_t(n+1,2)},d(e,t){return _t(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return _t(e.getHours()%12||12,t.length)},H(e,t){return _t(e.getHours(),t.length)},m(e,t){return _t(e.getMinutes(),t.length)},s(e,t){return _t(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return _t(i,t.length)}},Gr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Cp={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return In.y(e,t)},Y:function(e,t,n,r){const i=Mp(e,r),s=i>0?i:1-i;if(t==="YY"){const a=s%100;return _t(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):_t(s,t.length)},R:function(e,t){const n=$p(e);return _t(n,t.length)},u:function(e,t){const n=e.getFullYear();return _t(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return _t(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return _t(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return In.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return _t(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=aw(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):_t(i,t.length)},I:function(e,t,n){const r=iw(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):_t(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):In.d(e,t)},D:function(e,t,n){const r=nw(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):_t(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return _t(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return _t(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return _t(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Gr.noon:r===0?i=Gr.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Gr.evening:r>=12?i=Gr.afternoon:r>=4?i=Gr.morning:i=Gr.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return In.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):In.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):_t(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):_t(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):In.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):In.s(e,t)},S:function(e,t){return In.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Lp(r);case"XXXX":case"XX":return or(r);case"XXXXX":case"XXX":default:return or(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Lp(r);case"xxxx":case"xx":return or(r);case"xxxxx":case"xxx":default:return or(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ap(r,":");case"OOOO":default:return"GMT"+or(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ap(r,":");case"zzzz":default:return"GMT"+or(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return _t(r,t.length)},T:function(e,t,n){return _t(+e,t.length)}};function Ap(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),s=r%60;return s===0?n+String(i):n+String(i)+t+_t(s,2)}function Lp(e,t){return e%60===0?(e>0?"-":"+")+_t(Math.abs(e)/60,2):or(e,t)}function or(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=_t(Math.trunc(r/60),2),s=_t(r%60,2);return n+i+t+s}const kp=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Dp=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},ow=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return kp(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",kp(r,t)).replace("{{time}}",Dp(i,t))},lw={p:Dp,P:ow},cw=/^D+$/,uw=/^Y+$/,hw=["D","DD","YY","YYYY"];function dw(e){return cw.test(e)}function pw(e){return uw.test(e)}function fw(e,t,n){const r=mw(e,t,n);if(console.warn(r),hw.includes(e))throw new RangeError(r)}function mw(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function gw(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function vw(e){return!(!gw(e)&&typeof e!="number"||isNaN(+Nt(e)))}const yw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,xw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,bw=/^'([^]*?)'?$/,_w=/''/g,Ew=/[a-zA-Z]/;function zl(e,t,n){var r,i,s,a,o,l,c,u;const d=As(),h=(n==null?void 0:n.locale)??d.locale??Xu,p=(n==null?void 0:n.firstWeekContainsDate)??((i=(r=n==null?void 0:n.locale)==null?void 0:r.options)==null?void 0:i.firstWeekContainsDate)??d.firstWeekContainsDate??((a=(s=d.locale)==null?void 0:s.options)==null?void 0:a.firstWeekContainsDate)??1,f=(n==null?void 0:n.weekStartsOn)??((l=(o=n==null?void 0:n.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)??d.weekStartsOn??((u=(c=d.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,g=Nt(e,n==null?void 0:n.in);if(!vw(g))throw new RangeError("Invalid time value");let m=t.match(xw).map(v=>{const b=v[0];if(b==="p"||b==="P"){const O=lw[b];return O(v,h.formatLong)}return v}).join("").match(yw).map(v=>{if(v==="''")return{isToken:!1,value:"'"};const b=v[0];if(b==="'")return{isToken:!1,value:Ow(v)};if(Cp[b])return{isToken:!0,value:v};if(b.match(Ew))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");return{isToken:!1,value:v}});h.localize.preprocessor&&(m=h.localize.preprocessor(g,m));const y={firstWeekContainsDate:p,weekStartsOn:f,locale:h};return m.map(v=>{if(!v.isToken)return v.value;const b=v.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&pw(b)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&dw(b))&&fw(b,t,String(e));const O=Cp[b[0]];return O(g,b,h.localize,y)}).join("")}function Ow(e){const t=e.match(bw);return t?t[1].replace(_w,"'"):e}const jl=[["15seconds",15*1e3],["minute",60*1e3],["30minutes",30*60*1e3],["hourly",60*60*1e3],["daily",24*60*60*1e3],["monthly",30*24*60*60*1e3],["quarterly",3*30*24*60*60*1e3],["yearly",12*30*24*60*60*1e3]];function Rp(e,t,n,r,i){const s=t===0,a=Number(zl(new Date(e),"c"))===2,o=Number(zl(new Date(e),"q"))===1,l=t!==0?n[t-1]:null;switch(r){case"15seconds":return s||fa(e)||Wi(e,l)||Nn(e);case"minute":return s||fa(e)||Wi(e,l)||Nn(e);case"30minutes":return s||fa(e)||Wi(e,l)||Nn(e);case"hourly":return s||fa(e)||Wi(e,l)||Nn(e);case"daily":return i?s||a||Nn(e):s||Wi(e,l)||Nn(e);case"weekly":return s||a||Nn(e);case"monthly":return s||Nn(e);case"quarterly":return s||o;case"yearly":return!1;default:throw new Error(`${r} is not a valid time interval.`)}}function Wl(e,t,n,r,i,s){const a=i.showDayName,o=r==="daily"&&a?"weekly":r,l=new Date(e),c=x(i,"timeIntervalFormats")[o],u=x(c,"primary"),d=x(c,"secondary"),h=Rp(e,t,n,r,a);let p=h?u:d;r==="15seconds"&&l.getMilliseconds()!==0&&(p=p.replace("pp","h:mm:ss.SSS a"));const f=i.localeObject,{code:g,optionsObject:m}=s,y=m[r].type,v=m[r][h?"primary":"secondary"][p];if(r==="quarterly"||!v){const b=zl(l,p,{locale:f}).split("").map(O=>{const E=Number(O);return O!==" "&&!Number.isNaN(E)?E.toLocaleString(g):O});return s[y](l,g,{},b.join(""))}else return s[y](l,g,v)}function pa(e){const t=new Date(e);return{M:t.getMonth()+1,d:t.getDate(),H:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}}function Tw(e){if(e)return e.slice(1).map((t,n)=>t-e[n])}function Sw(e){const t=jl.reduce((n,[,r],i)=>{const s=jl[n][1],a=Math.abs(s-e),o=Math.abs(r-e);return a<o?n:i},0);return jl[t][0]}function ql(e,t){if(ju[t])return t;if(e.length===1)return"15seconds";const n=Tw(e),r=Dn(n);return Sw(r)}function fa(e){const{s:t,m:n,H:r}=pa(e);return r===0&&n===0&&t===0}function Wi(e,t){const n=pa(e).M,r=pa(t).M;return n!==r}function Nn(e){const{M:t,d:n,s:r,m:i,H:s}=pa(e);return t===1&&n===1&&s===0&&i===0&&r===0}function Ip(e){return e===void 0?"":e.toISOString()}function Np(e){const t=He(e,r=>r.value),n=Fe().domain(t).nice().domain();if(n[0]>0)n[0]=0;else if(n[0]===0&&n[1]===0)return[0,1];return n[0]<0&&n[1]>0&&(Math.abs(n[0])>n[1]?n[1]=Math.abs(n[0]):n[0]=-n[1]),n}function Pp(e,t){const n=x(t,"gradient","colors"),r=!Be(n);let i=x(t,"pairing","option");const s=Np(e),a=s[0]<0&&s[1]>0?"diverge":"mono";(i<1&&i>4&&a==="mono"||i<1&&i>2&&a==="diverge")&&(i=1);const o=r?n:[];if(!r){const l=a==="diverge"?17:11;for(let c=1;c<l+1;c++)o.push(`fill-${a}-${i}-${c}`)}return Hl().domain(s).range(o)}var lt=(e=>(e.GRAPHICS_DOCUMENT="graphics-document",e.GRAPHICS_OBJECT="graphics-object",e.GRAPHICS_SYMBOL="graphics-symbol",e.GROUP="group",e.DOCUMENT="document",e.CHECKBOX="checkbox",e.BUTTON="button",e.MENU="menu",e.MENU_ITEM="menuitem",e.IMG="img",e))(lt||{});function ww(e,t){return e&&nd(e,t,Oi)}function $w(e,t){return function(n,r){if(n==null)return n;if(!Kn(n))return e(n,r);for(var i=n.length,s=-1,a=Object(n);++s<i&&r(a[s],s,a)!==!1;);return n}}var Yl=$w(ww);function ct(e){return function(){return e}}var Mw=Array.prototype.slice;function ma(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Cw(e,t,n,r){for(var i=-1,s=e==null?0:e.length;++i<s;){var a=e[i];t(r,a,n(a),e)}return r}function Aw(e,t,n,r){return Yl(e,function(i,s,a){t(r,i,n(i),a)}),r}function Lw(e,t){return function(n,r){var i=Xt(n)?Cw:Aw,s={};return i(n,e,Fs(r),s)}}function kw(e){for(var t=-1,n=e==null?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}var Dw=Object.prototype,Rw=Dw.hasOwnProperty,Iw=Lw(function(e,t,n){Rw.call(e,n)?e[n].push(t):Ds(e,n,[t])});function Nw(e,t){let n=0;for(let r of e)r!=null&&(r=+r)>=r&&++n;return n}function Pw(e){return e}function Uw(e=Jn){if(e===Jn)return Up;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function Up(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var Bw=Array.prototype,Hw=Bw.slice;function Zl(e){return()=>e}function Vw(e,t,n){let r;for(;;){const i=kr(e,t,n);if(i===r||i===0||!isFinite(i))return[e,t];i>0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}function Gw(e){return Math.max(1,Math.ceil(Math.log(Nw(e))/Math.LN2)+1)}function Fw(){var e=Pw,t=He,n=Gw;function r(i){Array.isArray(i)||(i=Array.from(i));var s,a=i.length,o,l,c=new Array(a);for(s=0;s<a;++s)c[s]=e(i[s],s,i);var u=t(c),d=u[0],h=u[1],p=n(c,d,h);if(!Array.isArray(p)){const b=h,O=+p;if(t===He&&([d,h]=Vw(d,h,O)),p=js(d,h,O),p[0]<=d&&(l=kr(d,h,O)),p[p.length-1]>=h)if(b>=h&&t===He){const E=kr(d,h,O);isFinite(E)&&(E>0?h=(Math.floor(h/E)+1)*E:E<0&&(h=(Math.ceil(h*-E)+1)/-E))}else p.pop()}for(var f=p.length,g=0,m=f;p[g]<=d;)++g;for(;p[m-1]>h;)--m;(g||m<f)&&(p=p.slice(g,m),f=m-g);var y=new Array(f+1),v;for(s=0;s<=f;++s)v=y[s]=[],v.x0=s>0?p[s-1]:d,v.x1=s<f?p[s]:h;if(isFinite(l)){if(l>0)for(s=0;s<a;++s)(o=c[s])!=null&&d<=o&&o<=h&&y[Math.min(f,Math.floor((o-d)/l))].push(i[s]);else if(l<0){for(s=0;s<a;++s)if((o=c[s])!=null&&d<=o&&o<=h){const b=Math.floor((d-o)*l);y[Math.min(f,b+(p[b]<=o))].push(i[s])}}}else for(s=0;s<a;++s)(o=c[s])!=null&&d<=o&&o<=h&&y[vl(p,o,0,f)].push(i[s]);return y}return r.value=function(i){return arguments.length?(e=typeof i=="function"?i:Zl(i),r):e},r.domain=function(i){return arguments.length?(t=typeof i=="function"?i:Zl([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Zl(Array.isArray(i)?Hw.call(i):i),r):n},r}function Bp(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?Up:Uw(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(t-c*d/l+h)),f=Math.min(r,Math.floor(t+(l-c)*d/l+h));Bp(e,t,p,f,i)}const s=e[t];let a=n,o=r;for(qi(e,n,t),i(e[r],s)>0&&qi(e,n,r);a<o;){for(qi(e,a,o),++a,--o;i(e[a],s)<0;)++a;for(;i(e[o],s)>0;)--o}i(e[n],s)===0?qi(e,n,o):(++o,qi(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function qi(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Xl(e,t,n){if(e=Float64Array.from(B_(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Dn(e);if(t>=1)return tr(e);var r,i=(r-1)*t,s=Math.floor(i),a=tr(Bp(e,s).subarray(0,s+1)),o=Dn(e.subarray(s+1));return a+(o-a)*(i-s)}}function Hp(e,t){if((a=e.length)>1)for(var n=1,r,i,s=e[t[0]],a,o=s.length;n<a;++n)for(i=s,s=e[t[n]],r=0;r<o;++r)s[r][1]+=s[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Vp(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function zw(e,t){return e[t]}function jw(e){const t=[];return t.key=e,t}function Kl(){var e=ct([]),t=Vp,n=Hp,r=zw;function i(s){var a=Array.from(e.apply(this,arguments),jw),o,l=a.length,c=-1,u;for(const d of s)for(o=0,++c;o<l;++o)(a[o][c]=[0,+r(d,a[o].key,c,s)]).data=d;for(o=0,u=ma(t(a));o<l;++o)a[u[o]].index=o;return n(a,u),a}return i.keys=function(s){return arguments.length?(e=typeof s=="function"?s:ct(Array.from(s)),i):e},i.value=function(s){return arguments.length?(r=typeof s=="function"?s:ct(+s),i):r},i.order=function(s){return arguments.length?(t=s==null?Vp:typeof s=="function"?s:ct(Array.from(s)),i):t},i.offset=function(s){return arguments.length?(n=s??Hp,i):n},i}function Ww(e,t){if((l=e.length)>0)for(var n,r=0,i,s,a,o,l,c=e[t[0]].length;r<c;++r)for(a=o=0,n=0;n<l;++n)(s=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=s):s<0?(i[1]=o,i[0]=o+=s):(i[0]=0,i[1]=s)}function qw(e){const t=e.trim();return["=","+","-","@"," ","\r"].includes(t.charAt(0))?` ${t}`:/[,\"\n]/.test(t)?`"${t}"`:t}class en{constructor(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}formatTable({headers:t,cells:n}){const r=this.getOptions(),{code:i,date:s,number:a}=x(r,"locale"),o=x(r,"tabularRepModal","tableHeadingFormatter"),l=x(r,"tabularRepModal","tableCellFormatter"),{cartesianScales:c}=this.services,u=c==null?void 0:c.getDomainAxisScaleType();let d;return u===X.TIME&&(d=h=>s(h,i,{month:"short",day:"numeric",year:"numeric"})),[typeof o=="function"?o(t):t,...typeof l=="function"?l(n):n.map(h=>{d&&(h[1]=d(h[1]));for(const p in h){const f=h[p];typeof f=="number"&&(h[p]=a(f,i))}return h})]}getAllDataFromDomain(t){if(!this.getData())return null;const n=this.getOptions();let r=this.getData();const i=this.getDataGroups(),{groupMapsTo:s}=x(n,"data"),a=x(n,"axes");return t&&(r=r.filter(o=>t.includes(o[s]))),a&&Object.keys(a).forEach(o=>{const l=a[o].mapsTo,c=a[o].scaleType;if((c===X.LINEAR||c===X.LOG)&&(r=r.map(u=>({...u,[l]:u[l]===null?u[l]:Number(u[l])}))),l&&a[o].domain)if(c===X.LABELS)r=r.filter(u=>a[o].domain.includes(u[l]));else{const[u,d]=a[o].domain;r=r.filter(h=>!(l in h)||h[l]>=u&&h[l]<=d)}}),r.filter(o=>i.find(l=>l.name===o[s]))}getDisplayData(t){if(!this.get("data"))return null;const{ACTIVE:n}=It.items.status,r=this.getDataGroups(t),{groupMapsTo:i}=this.getOptions().data;return this.getAllDataFromDomain(t).filter(s=>r.find(a=>a.name===s[i]&&a.status===n))}getData(){return this.get("data")}isDataEmpty(){return!this.getData().length}setData(t){const n=this.sanitize(dn(t)),r=this.generateDataGroups(n);return this.set({data:n,dataGroups:r}),n}getDataGroups(t){return x(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter(n=>t.includes(n.name)):this.get("dataGroups")}getActiveDataGroups(t){const{ACTIVE:n}=It.items.status;return this.getDataGroups(t).filter(r=>r.status===n)}getDataGroupNames(t){return this.getDataGroups(t).map(n=>n.name)}getActiveDataGroupNames(t){return this.getActiveDataGroups(t).map(n=>n.name)}aggregateBinDataByGroup(t){return Iw(t,"group")}getBinConfigurations(){const t=this.getDisplayData(),n=this.getOptions(),r=this.services.cartesianScales.getMainXAxisPosition(),i=this.services.cartesianScales.getDomainIdentifier(),s=n.axes[r],{groupMapsTo:a}=n.data,{bins:o=$S.defaultBins}=s,l=Array.isArray(o),c=Fw().value(p=>p[i]).thresholds(o)(t);if(l)c[c.length-1].x1=o[o.length-1];else{const p=c[0].x1-c[0].x0;c[c.length-1].x1=+c[c.length-1].x0+p}const u=l?[o[0],o[o.length-1]]:[c[0].x0,c[c.length-1].x1],d=Array.from(new Set(t.map(p=>p[a]))),h=[];return c.forEach(p=>{const f=`${p.x0}-${p.x1}`,g=this.aggregateBinDataByGroup(p);d.forEach(m=>{h.push({group:m,key:f,value:g[m]||0,bin:p.x0})})}),{bins:c,binsDomain:u}}getBinnedStackedData(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getActiveDataGroupNames(),{bins:i}=this.getBinConfigurations(),s=this.getDataValuesGroupedByKeys({bins:i});return Kl().keys(r)(s).map((a,o)=>Object.keys(a).filter(l=>!isNaN(l)).map(l=>{const c=a[l];return c[n]=r[o],c}))}getGroupedData(t){const n=this.getDisplayData(t),r={},{groupMapsTo:i}=this.getOptions().data;return n.map(s=>{const a=s[i];r[a]!==null&&r[a]!==void 0?r[a].push(s):r[a]=[s]}),Object.keys(r).map(s=>({name:s,data:r[s]}))}getStackKeys({bins:t=null,groups:n=null}={bins:null,groups:null}){const r=this.getOptions(),i=this.getDisplayData(n);let s;t?s=t.map(l=>`${l.x0}:${l.x1}`):s=Li(i.map(l=>{const c=this.services.cartesianScales.getDomainIdentifier(l);return l[c]instanceof Date?Ip(l[c]):l[c]&&typeof l[c].toString=="function"?l[c].toString():l[c]}));const a=this.services.cartesianScales.domainAxisPosition,o=r.axes[a].scaleType;return o===X.TIME?s.sort((l,c)=>{const u=new Date(l),d=new Date(c);return u-d}):(o===X.LOG||o===X.LINEAR)&&s.sort((l,c)=>l-c),s}getDataValuesGroupedByKeys({bins:t=null,groups:n=null}){const r=this.getOptions(),{groupMapsTo:i}=r.data,s=this.getDisplayData(n),a=this.getDataGroupNames(),o=this.getStackKeys({bins:t,groups:n});return t?o.map(l=>{const[c,u]=l.split(":"),d={x0:c,x1:u},h=t.find(p=>p.x0.toString()===c.toString());return a.forEach(p=>{d[p]=h.filter(f=>f[i]===p).length}),d}):o.map(l=>{const c={sharedStackKey:l};return a.forEach(u=>{const d=s.find(p=>{const f=this.services.cartesianScales.getDomainIdentifier(p);return p[i]===u&&Object.prototype.hasOwnProperty.call(p,f)&&(p[f]instanceof Date?Ip(p[f])===l:p[f].toString()===l)}),h=this.services.cartesianScales.getRangeIdentifier(c);c[u]=d?d[h]:null}),c})}getStackedData({percentage:t=!1,groups:n=null,divergent:r=!1}){const i=this.getOptions(),{groupMapsTo:s}=i.data,a=this.getActiveDataGroupNames(n),o=this.getDataValuesGroupedByKeys({groups:n});if(t){const l=kw(o.map(c=>[c.sharedStackKey,0]));o.forEach(c=>{a.forEach(u=>{l[c.sharedStackKey]+=c[u]})}),o.forEach(c=>{a.forEach(u=>{const d=l[c.sharedStackKey];l[c.sharedStackKey]?c[u]=c[u]/d*100:c[u]=0})})}return(r?Kl().offset(Ww):Kl()).keys(a)(o).map((l,c)=>Object.keys(l).filter(u=>!isNaN(u)).map(u=>{const d=l[u];return d[s]=a[c],d}))}getOptions(){return this.state.options}set(t,n){this.state=Object.assign({},this.state,t);const r=Object.assign({skipUpdate:!1,animate:!0},n);r.skipUpdate||this.update(r.animate)}get(t){return t?this.state[t]:this.state}setOptions(t){const n=this.getOptions();Fl(n,t),this.set({options:st(n,t)})}update(t=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(T.Model.UPDATE,{animate:t}))}toggleDataLabel(t){const{ACTIVE:n,DISABLED:r}=It.items.status,i=this.getDataGroups(),s=i.some(c=>c.status===r),a=i.filter(c=>c.status===n);if(s)if(a.length===1&&a[0].name===t)i.forEach((c,u)=>{i[u].status=n});else{const c=i.findIndex(u=>u.name===t);i[c].status=i[c].status===r?n:r}else i.forEach((c,u)=>{i[u].status=c.name===t?n:r});const o=i.filter(c=>c.status===n),l=this.getOptions();i.some(c=>c.status===r)?l.data.selectedGroups=o.map(c=>c.name):l.data.selectedGroups=[],this.services.events.dispatchEvent(T.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})}getIsFilled(t,n,r,i){const s=this.getOptions();return s.getIsFilled?s.getIsFilled(t,n,r,i):i}getFillColor(t,n,r){const i=this.getOptions(),s=x(this.colorScale,t);return i.getFillColor?i.getFillColor(t,n,r,s):s}getStrokeColor(t,n,r){const i=this.getOptions(),s=x(this.colorScale,t);return i.getStrokeColor?i.getStrokeColor(t,n,r,s):s}isUserProvidedColorScaleValid(){const t=x(this.getOptions(),"color","scale"),n=this.getDataGroups();return t==null||Object.keys(t).length==0?!1:n.some(r=>Object.keys(t).includes(r.name))}getColorClassName(t){const n=this.colorClassNames(t.dataGroupName);let r=t.originalClassName;return t.classNameTypes.forEach(i=>r=t.originalClassName?`${r} ${i}-${n}`:`${i}-${n}`),r||""}getStatus(){return null}getAllDataGroupsNames(){return this.allDataGroups}transformToTabularData(t){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://charts.carbondesignsystem.com/");const n=[],{datasets:r,labels:i}=t;return r.forEach(s=>{s.data.forEach((a,o)=>{let l;const c=x(s,"label");if(c===null){const d=x(i,o);d?l=d:l="Ungrouped"}else l=c;const u={group:l,key:i[o]};isNaN(a)?(u.value=a.value,u.date=a.date):u.value=a,n.push(u)})}),n}getTabularDataArray(){return[]}exportToCSV(){const t=this.getTabularDataArray().map(s=>s.map(a=>`"${(a==="&ndash;"?"–":a).split(/[,;'"`]/).map(o=>qw(o)).join("")}"`)).map(s=>s.join(",")).join(`
2
- `),n=this.getOptions();let r="myChart";const i=x(n,"fileDownload","fileName");typeof i=="function"?r=i("csv"):typeof i=="string"&&(r=i),this.services.files.downloadCSV(t,`${r}.csv`)}getTabularData(t){return Array.isArray(t)?t:this.transformToTabularData(t)}sanitize(t){return t=this.getTabularData(t),t}updateAllDataGroups(){this.allDataGroups?this.getDataGroupNames().forEach(t=>{this.allDataGroups.indexOf(t)===-1&&this.allDataGroups.push(t)}):this.allDataGroups=this.getDataGroupNames()}generateDataGroups(t){const{groupMapsTo:n}=this.getOptions().data,{ACTIVE:r,DISABLED:i}=It.items.status,s=this.getOptions(),a=Li(t.map(l=>l[n]));s.data.selectedGroups.length&&(s.data.selectedGroups.every(l=>a.includes(l))||(s.data.selectedGroups=[]));const o=l=>!s.data.selectedGroups.length||s.data.selectedGroups.includes(l)?r:i;return a.map(l=>({name:l,status:o(l)}))}setCustomColorScale(){if(!this.isUserProvidedColorScaleValid())return;const t=this.getOptions(),n=x(t,"color","scale");Object.keys(n).forEach(r=>{this.allDataGroups.includes(r)||console.warn(`"${r}" does not exist in data groups.`)}),this.allDataGroups.filter(r=>n[r]).forEach(r=>this.colorScale[r]=n[r])}setColorClassNames(){const t=x(this.getOptions(),"color","pairing");let n=x(t,"numberOfVariants");(!n||n<this.allDataGroups.length)&&(n=this.allDataGroups.length);let r=x(t,"option");const i=up.pairingOptions,s=n>5?14:n,a=`${s}-color`;r=r<=i[a]?r:1;const o=this.allDataGroups.map((l,c)=>`${s}-${r}-${c%14+1}`);this.colorClassNames=ua().range(o).domain(this.allDataGroups)}}class lr extends en{constructor(t){super(t),this.axisFlavor=gi.DEFAULT}assignRangeAndDomains(){const{cartesianScales:t}=this.services,n=this.getOptions(),r=t.isDualAxes(),i={primaryDomain:t.domainAxisPosition,primaryRange:t.rangeAxisPosition,secondaryDomain:null,secondaryRange:null};return r&&(i.secondaryDomain=t.secondaryDomainAxisPosition,i.secondaryRange=t.secondaryRangeAxisPosition),Object.keys(i).forEach(s=>{const a=i[s];t.scales[a]?i[s]={position:a,label:t.getScaleLabel(a),identifier:x(n,"axes",a,"mapsTo")}:i[s]=null}),i}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,{primaryDomain:i,primaryRange:s,secondaryDomain:a,secondaryRange:o}=this.assignRangeAndDomains(),{number:l,code:c}=x(this.getOptions(),"locale"),u=["Group",i.label,s.label,...a?[a.label]:[],...o?[o.label]:[]],d=t.map(h=>[h[r],h[i.identifier]===null?"&ndash;":h[i.identifier],h[s.identifier]===null||isNaN(h[s.identifier])?"&ndash;":l(h[s.identifier],c),...a?[h[a.identifier]===null?"&ndash;":h[a.identifier]]:[],...o?[h[o.identifier]===null||isNaN(h[o.identifier])?"&ndash;":h[o.identifier]]:[]]);return super.formatTable({headers:u,cells:d})}setData(t){let n;if(t&&(n=super.setData(t),x(this.getOptions(),"zoomBar",G.TOP,"enabled"))){const r=x(this.getOptions(),"zoomBar",G.TOP,"data");this.setZoomBarData(r)}return n}setZoomBarData(t){const n=t?this.sanitize(dn(t)):this.getDisplayData();let r=n;const{cartesianScales:i}=this.services;if(n&&i.domainAxisPosition&&i.rangeAxisPosition){const s=i.getDomainIdentifier(),a=i.getRangeIdentifier();let o=n.map(l=>l[s].getTime());o=Li(o).sort(),r=o.map(l=>{let c=0;const u={};return n.forEach(d=>{d[s].getTime()===l&&(c+=d[a])}),u[s]=new Date(l),u[a]=c,u})}this.set({zoomBarData:r})}getZoomBarData(){return this.get("zoomBarData")}sanitizeDateValues(t){const n=this.getOptions();if(!n.axes)return t;const r=[];return Object.keys(G).forEach(i=>{const s=G[i],a=n.axes[s];if(a&&a.scaleType===X.TIME){const o=a.mapsTo;(o!==null||o!==void 0)&&r.push(o)}}),r.length>0&&t.forEach(i=>{r.forEach(s=>{x(i,s,"getTime")===null&&(i[s]=new Date(i[s]))})}),t}sanitize(t){return t=super.sanitize(t),t=this.sanitizeDateValues(t),t}}let Yw=class extends lr{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),{number:n,code:r}=x(this.getOptions(),"locale");t.sort((a,o)=>a.source.localeCompare(o.source));const i=["Source","Target","Value"],s=[...t.map(a=>[a.source,a.target,a.value===null?"&ndash;":n(a.value,r)])];return super.formatTable({headers:i,cells:s})}};class Zw extends lr{constructor(t){super(t)}getBoxQuartiles(t){return{q_25:Xl(t,.25),q_50:Xl(t,.5),q_75:Xl(t,.75)}}getBoxplotData(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getGroupedData(),i=[];for(const{name:s,data:a}of r){const o=this.services.cartesianScales.getRangeIdentifier(),l=a.map(b=>b[o]).sort(Jn),c={[n]:s,counts:l,quartiles:this.getBoxQuartiles(l),outliers:null,whiskers:null},u=c.quartiles.q_25,d=c.quartiles.q_75,h=(d-u)*1.5,p=u-h,f=d+h,g=[],m=[];for(const b of l)b<p||b>f?g.push(b):m.push(b);c.outliers=g;const y=Dn(m),v=tr(m);c.whiskers={min:y||Dn([c.quartiles.q_25,c.quartiles.q_50,c.quartiles.q_75]),max:v||tr([c.quartiles.q_25,c.quartiles.q_50,c.quartiles.q_75])},i.push(c)}return i}getTabularDataArray(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getBoxplotData(),{number:i,code:s}=x(t,"locale"),a=["Group","Minimum","Q1","Median","Q3","Maximum","IQR","Outlier(s)"],o=[...r.map(l=>{let c=x(l,"outliers");return(c===null||c.length===0)&&(c=["&ndash;"]),[l[n],x(l,"whiskers","min")!==null?i(x(l,"whiskers","min"),s):"&ndash;",x(l,"quartiles","q_25")!==null?i(x(l,"quartiles","q_25"),s):"&ndash;",x(l,"quartiles","q_50")!==null?i(x(l,"quartiles","q_50"),s):"&ndash;",x(l,"quartiles","q_75")!==null?i(x(l,"quartiles","q_75"),s):"&ndash;",x(l,"whiskers","max")!==null?i(x(l,"whiskers","max"),s):"&ndash;",x(l,"quartiles","q_75")!==null&&x(l,"quartiles","q_25")!==null?(i(x(l,"quartiles","q_75")-x(l,"quartiles","q_25")),s):"&ndash;",c.map(u=>i(u,s)).join(",")]})];return super.formatTable({headers:a,cells:o})}setColorClassNames(){const t=x(this.getOptions(),"color","pairing");let n=x(t,"option");const r=up.pairingOptions;n=n<=r["1-color"]?n:1;const i=this.allDataGroups.map(()=>`1-${n}-1`);this.colorClassNames=ua().range(i).domain(this.allDataGroups)}}let Xw=class extends lr{constructor(t){super(t)}getMatchingRangeIndexForDatapoint(t){let n;for(let r=t.ranges.length-1;r>0;r--){const i=t.ranges[r];if(t.value>=i)return n=r,n}return 0}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.services.cartesianScales.getRangeIdentifier(),{number:s,code:a}=x(n,"locale"),o=x(n,"bullet","performanceAreaTitles"),l=["Title","Group","Value","Target","Percentage","Performance"],c=[...t.map(u=>[u.title,u[r],u.value===null?"&ndash;":s(u.value,a),x(u,"marker")===null?"&ndash;":s(u.marker,a),x(u,"marker")===null?"&ndash;":`${s(Math.floor(u[i]/u.marker*100),a)}%`,o[this.getMatchingRangeIndexForDatapoint(u)]])];return super.formatTable({headers:l,cells:c})}},Kw=class extends en{constructor(t){super(t),this._colorScale=void 0,this._matrix={}}getFillColor(t){return this._colorScale(t)}getCombinedData(){if(Be(this._matrix)){const t=this.getOptions(),n=this.getDisplayData();!Be(n)&&!Be(t.geoData.objects.countries)&&(t.geoData.objects.countries.geometries.forEach(r=>{this._matrix[r.properties.NAME]=r}),n.forEach(r=>{this._matrix[r.name]?this._matrix[r.name].value=r.value||null:console.warn(`Data point ${r} is missing geographical data.`)}))}return this._matrix}getTabularDataArray(){const t=this.getDisplayData(),{number:n,code:r}=x(this.getOptions(),"locale"),i=["Country ID","Country Name","Value"],s=[...t.map(a=>[a.id===null?"&ndash;":a.id,a.name,a.value===null?"&ndash;":n(a.value,r)])];return super.formatTable({headers:i,cells:s})}getColorClassName(t){return`${t.originalClassName} ${this._colorScale(t.value)}`}setColorClassNames(){const t=x(this.getOptions(),"color");this._colorScale=Pp(this.getDisplayData(),t)}},Qw=class extends en{constructor(t){super(t),this.parentNode=!1,this.set({depth:2},{skipUpdate:!0})}setData(t){super.setData(t),this.setDataGroups(),t.length===1&&(this.parentNode=!0),this.setZoom()}setOptions(t){const n=this.getOptions(),r=st({},t,this.getZoomOptions(t));Fl(n,r);const i=this.getHierarchyLevel(),s=x(n,"circlePack","depth");this.set({options:st(n,r),depth:s&&s<4?s:i})}getZoomOptions(t){if(!this.getDisplayData())return{};const n=this.getDisplayData(),r=t||this.getOptions(),i=n.length===1&&x(n,0,"children")?x(n,0,"children"):n;let s=this.getHierarchyLevel();return i.some(a=>{if(a.children&&a.children.some(o=>o.children))return s=3,!1}),x(r,"canvasZoom","enabled")===!0&&s>2?{legend:{additionalItems:[{type:Ft.ZOOM,name:"Click to zoom"}]}}:null}setZoom(t){this.setOptions(this.getZoomOptions(t))}updateHierarchyLevel(t){this.set({depth:t})}getHierarchyLevel(){return this.get("depth")}hasParentNode(){return this.parentNode}setDataGroups(){const t=this.getData(),n=this.getOptions(),{groupMapsTo:r}=n.data,i=t.map(s=>{const a=s[r];return this.setChildrenDataGroup(s,a)});this.set({data:i},{skipUpdate:!0})}setChildrenDataGroup(t,n){return t.children?{...t,dataGroupName:n,children:t.children.map(r=>this.setChildrenDataGroup(r,n))}:{...t,dataGroupName:n}}getTabularDataArray(){const t=this.getDisplayData(),{number:n,code:r}=x(this.getOptions(),"locale"),i=["Child","Parent","Value"],s=[];return t.forEach(a=>{let o=a.value?a.value:0;a.children&&(o+=this.getChildrenDatums(a.children,a.name,s,0)),s.push(["&ndash;",a.name,n(o,r)])}),super.formatTable({headers:i,cells:s})}getChildrenDatums(t,n,r=[],i=0){const s=n,{number:a,code:o}=x(this.getOptions(),"locale");return t.forEach(l=>{const c=l.name;let u=0;if(l.children)l.children.length>0&&(typeof l.value=="number"&&(i+=l.value),u+=this.getChildrenDatums(l.children,c,r,u),r.push([c,s,a(u,o)]),i+=u);else{let d=0;typeof l.value=="number"&&(d=l.value,i+=l.value),r.push([l.name,s,a(d,o)])}}),i}},Jw=class extends en{constructor(t){super(t)}getTabularData(t){const n=super.getTabularData(t);return t!==n&&n.forEach(r=>{r.key&&r.key!==r.group&&(r.group=r.key)}),n}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,{valueMapsTo:i}=n.pie,{number:s,code:a}=x(n,"locale"),o=["Group","Value"],l=[...t.map(c=>[c[r],c[i]===null?"&ndash;":s(c[i],a)])];return super.formatTable({headers:o,cells:l})}sanitize(t){return this.getTabularData(t).sort((n,r)=>r.value-n.value)}};class t$ extends en{constructor(t){super(t)}getDataGroups(){return super.getDataGroups().filter(t=>t.name!=="delta")}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,{number:i,code:s}=x(this.getOptions(),"locale"),a=["Group","Value"],o=[...t.map(l=>[l[r],l.value===null?"&ndash;":i(l.value,s)])];return super.formatTable({headers:a,cells:o})}}class e$ extends lr{constructor(t){super(t),this.axisFlavor=gi.HOVERABLE,this._colorScale=void 0,this._domains=[],this._ranges=[],this._matrix={};const n=x(this.getOptions(),"axes");if(x(n,"left","scaleType")&&x(n,"left","scaleType")!==X.LABELS||x(n,"right","scaleType")&&x(n,"right","scaleType")!==X.LABELS||x(n,"top","scaleType")&&x(n,"top","scaleType")!==X.LABELS||x(n,"bottom","scaleType")&&x(n,"bottom","scaleType")!==X.LABELS)throw Error("Heatmap only supports label scaletypes.")}getValueDomain(){const t=He(this.getDisplayData(),r=>r.value),n=Fe().domain(t).nice().domain();if(n[0]>0)n[0]=0;else if(n[0]===0&&n[1]===0)return[0,1];return n[0]<0&&n[1]>0&&(Math.abs(n[0])>n[1]?n[1]=Math.abs(n[0]):n[0]=-n[1]),n}getFillColor(t){return this._colorScale(t)}getUniqueDomain(){if(Be(this._domains)){const t=this.getDisplayData(),{cartesianScales:n}=this.services,r=n.getDomainIdentifier(),i=n.getMainXAxisPosition(),s=n.getCustomDomainValuesByposition(i);if(s)return s;this._domains=Array.from(new Set(t.map(a=>a[r])))}return this._domains}getUniqueRanges(){if(Be(this._ranges)){const t=this.getDisplayData(),{cartesianScales:n}=this.services,r=n.getRangeIdentifier(),i=n.getMainYAxisPosition(),s=n.getCustomDomainValuesByposition(i);if(s)return s;this._ranges=Array.from(new Set(t.map(a=>a[r])))}return this._ranges}getMatrix(){if(Be(this._matrix)){const t=this.getUniqueDomain(),n=this.getUniqueRanges(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),s={};n.forEach(a=>{s[a]={value:null,index:-1}}),t.forEach(a=>{this._matrix[a]=dn(s)}),this.getDisplayData().forEach((a,o)=>{this._matrix[a[r]][a[i]]={value:a.value,index:o}})}return this._matrix}setData(t){const n=this.sanitize(dn(t)),r=this.generateDataGroups(n);return this.set({data:n,dataGroups:r}),this._domains=[],this._ranges=[],this._matrix={},n}getMatrixAsArray(){Be(this._matrix)&&this.getMatrix();const t=this.getUniqueDomain(),n=this.getUniqueRanges(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),s=[];return t.forEach(a=>{n.forEach(o=>{const l={value:this._matrix[a][o].value,index:this._matrix[a][o].index};l[r]=a,l[i]=o,s.push(l)})}),s}getTabularDataArray(){const t=this.getDisplayData(),{primaryDomain:n,primaryRange:r}=this.assignRangeAndDomains(),{number:i,code:s}=x(this.getOptions(),"locale"),a=[n.label,r.label,"Value"],o=[...t.map(l=>[l[n.identifier]===null?"&ndash;":l[n.identifier],l[r.identifier]===null?"&ndash;":l[r.identifier],l.value===null?"&ndash;":i(l.value,s)])];return super.formatTable({headers:a,cells:o})}getColorClassName(t){return`${t.originalClassName} ${this._colorScale(t.value)}`}setColorClassNames(){const t=this.getOptions(),n=x(t,"color","gradient","colors"),r=!Be(n);let i=x(t,"color","pairing","option");const s=this.getValueDomain(),a=s[0]<0&&s[1]>0?"diverge":"mono";(i<1&&i>4&&a==="mono"||i<1&&i>2&&a==="diverge")&&(i=1);const o=r?n:[];if(!r){const c=a==="diverge"?17:11;for(let u=1;u<c+1;u++)o.push(`fill-${a}-${i}-${u}`)}this._colorScale=Hl().domain(s).range(o);const l=x(this.getOptions(),"color");this._colorScale=Pp(this.getDisplayData(),l)}}let n$=class extends lr{getTabularDataArray(){const t=this.getOptions(),{groupMapsTo:n}=t.data,{number:r,code:i}=x(this.getOptions(),"locale"),s=this.getBinnedStackedData(),a=[gt(t,"bins.rangeLabel")||"Range",...s.map(l=>gt(l,`0.${n}`))],o=[...gt(s,0).map((l,c)=>[`${r(Number(gt(l,"data.x0")),i)} – ${r(Number(gt(l,"data.x1")),i)}`,...s.map(u=>r(gt(u[c],`data.${gt(u[c],n)}`),i))])];return super.formatTable({headers:a,cells:o})}};class r$ extends en{constructor(t){super(t)}getMaximumDomain(t){return t.reduce((n,r)=>n+r.value,0)}getFillColor(t){const n=this.getOptions(),r=x(n,"color","scale"),i=this.getStatus();return r||!i?super.getFillColor(t):null}getStatus(){const t=this.getOptions(),n=x(this.getDisplayData()),r=(n==null?void 0:n.reduce((a,o)=>a+o.value,0))??0,i=x(t,"meter","proportional")?r:r>100?100:r,s=x(t,"meter","status","ranges");if(s){const a=s.filter(o=>o.range[0]<=i&&i<=o.range[1]);if(a.length>0)return a[0].status}return null}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.getStatus(),s=x(n,"meter","proportional"),{number:a,code:o}=x(this.getOptions(),"locale");let l=[],c=[],u;if(s===null){u=100;const d=t[0];l=["Group","Value",...i?["Status"]:[]],c=[[d[r],d.value===null?"&ndash;":a(d.value,o),...i?[i]:[]]]}else u=x(s,"total")||this.getMaximumDomain(t),l=["Group","Value","Percentage of total"],c=[...t.map(h=>{let p;h.value!==null&&h.value!==void 0?p=Number(h.value):p=0;const f=Number((h.value/u*100).toFixed(2));return[h[r],h.value===null?"&ndash;":a(p,o),a(f,o)+" %"]})];return super.formatTable({headers:l,cells:c})}}class i$ extends lr{constructor(t){super(t)}getTabularDataArray(){const t=this.getOptions(),n=this.getGroupedData(),{angle:r,value:i}=x(t,"radar","axes"),{number:s,code:a}=x(t,"locale"),o=x(n,"0","data").map(u=>u[r]),l=["Group",...o],c=[...n.map(u=>[u.name,...o.map((d,h)=>x(u,"data",h,i)!==null?s(x(u,"data",h,i),a):"&ndash;")])];return super.formatTable({headers:l,cells:c})}}let s$=class extends en{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=["Child","Parent"],r=[];return t.forEach(i=>{this.getChildrenDatums(i,r),r.push([i.name,"&ndash;"])}),super.formatTable({headers:n,cells:r})}getChildrenDatums(t,n=[]){t.children&&t.children.length>0&&t.children.forEach(r=>{this.getChildrenDatums(r,n),n.push([r.name,t.name])})}},a$=class extends en{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),{number:n,code:r}=x(this.getOptions(),"locale"),i=["Child","Group","Value"],s=[];return t.forEach(a=>{Array.isArray(a.children)?a.children.forEach(o=>{s.push([o.name,a.name,o.value===null?"&ndash;":n(o.value,r)])}):x(a.name)!==null&&x(a.value)&&s.push(["–",a.name,n(a.value,r)])}),super.formatTable({headers:i,cells:s})}};class o$ extends en{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{fontSizeMapsTo:r,wordMapsTo:i}=n.wordCloud,{groupMapsTo:s}=n.data,{code:a,number:o}=x(n,"locale"),l=[n.tooltip.wordLabel,"Group",n.tooltip.valueLabel],c=[...t.map(u=>[u[i],u[s],o(u[r],a)])];return super.formatTable({headers:l,cells:c})}}var l$=/\s/;function c$(e){for(var t=e.length;t--&&l$.test(e.charAt(t)););return t}var u$=/^\s+/;function h$(e){return e&&e.slice(0,c$(e)+1).replace(u$,"")}var Gp=NaN,d$=/^[-+]0x[0-9a-f]+$/i,p$=/^0b[01]+$/i,f$=/^0o[0-7]+$/i,m$=parseInt;function Fr(e){if(typeof e=="number")return e;if(Ls(e))return Gp;if(Me(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Me(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=h$(e);var n=p$.test(e);return n||f$.test(e)?m$(e.slice(2),n?2:8):d$.test(e)?Gp:+e}var Ql=function(){return Pe.Date.now()},g$="Expected a function",v$=Math.max,y$=Math.min;function ga(e,t,n){var r,i,s,a,o,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(g$);t=Fr(t)||0,Me(n)&&(u=!!n.leading,d="maxWait"in n,s=d?v$(Fr(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h);function p(S){var C=r,I=i;return r=i=void 0,c=S,a=e.apply(I,C),a}function f(S){return c=S,o=setTimeout(y,t),u?p(S):a}function g(S){var C=S-l,I=S-c,L=t-C;return d?y$(L,s-I):L}function m(S){var C=S-l,I=S-c;return l===void 0||C>=t||C<0||d&&I>=s}function y(){var S=Ql();if(m(S))return v(S);o=setTimeout(y,g(S))}function v(S){return o=void 0,h&&r?p(S):(r=i=void 0,a)}function b(){o!==void 0&&clearTimeout(o),c=0,r=l=i=o=void 0}function O(){return o===void 0?a:v(Ql())}function E(){var S=Ql(),C=m(S);if(r=arguments,i=this,l=S,C){if(o===void 0)return f(l);if(d)return clearTimeout(o),o=setTimeout(y,t),p(l)}return o===void 0&&(o=setTimeout(y,t)),a}return E.cancel=b,E.flush=O,E}function x$(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,s=new Array(i);++r<i;)s[r]=e+r*n;return s}function D(e){return typeof e=="string"?new ve([[document.querySelector(e)]],[document.documentElement]):new ve([[e]],_d)}function Yi(){var e=ua().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,s,a,o=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var h=t().length,p=i<r,f=p?i:r,g=p?r:i;s=(g-f)/Math.max(1,h-l+c*2),o&&(s=Math.floor(s)),f+=(g-f-s*(h-l))*u,a=s*(1-l),o&&(f=Math.round(f),a=Math.round(a));var m=x$(h).map(function(y){return f+s*y});return n(p?m.reverse():m)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,o=!0,d()},e.bandwidth=function(){return a},e.step=function(){return s},e.round=function(h){return arguments.length?(o=!!h,d()):o},e.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),d()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),d()):l},e.paddingOuter=function(h){return arguments.length?(c=+h,d()):c},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),d()):u},e.copy=function(){return Yi(t(),[r,i]).round(o).paddingInner(l).paddingOuter(c).align(u)},Pr.apply(d(),arguments)}function Fp(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],s=e[r],a;return s<i&&(a=n,n=r,r=a,a=i,i=s,s=a),e[n]=t.floor(i),e[r]=t.ceil(s),e}const Jl=new Date,tc=new Date;function jt(e,t,n,r){function i(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(e(s=new Date(+s)),s),i.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),i.round=s=>{const a=i(s),o=i.ceil(s);return s-a<o-s?a:o},i.offset=(s,a)=>(t(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,o)=>{const l=[];if(s=i.ceil(s),o=o==null?1:Math.floor(o),!(s<a)||!(o>0))return l;let c;do l.push(c=new Date(+s)),t(s,o),e(s);while(c<s&&s<a);return l},i.filter=s=>jt(a=>{if(a>=a)for(;e(a),!s(a);)a.setTime(a-1)},(a,o)=>{if(a>=a)if(o<0)for(;++o<=0;)for(;t(a,-1),!s(a););else for(;--o>=0;)for(;t(a,1),!s(a););}),n&&(i.count=(s,a)=>(Jl.setTime(+s),tc.setTime(+a),e(Jl),e(tc),Math.floor(n(Jl,tc))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const va=jt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);va.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?jt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):va),va.range;const bn=1e3,Le=bn*60,_n=Le*60,En=_n*24,ec=En*7,zp=En*30,nc=En*365,zr=jt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*bn)},(e,t)=>(t-e)/bn,e=>e.getUTCSeconds());zr.range;const rc=jt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*bn)},(e,t)=>{e.setTime(+e+t*Le)},(e,t)=>(t-e)/Le,e=>e.getMinutes());rc.range,jt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Le)},(e,t)=>(t-e)/Le,e=>e.getUTCMinutes()).range;const ic=jt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*bn-e.getMinutes()*Le)},(e,t)=>{e.setTime(+e+t*_n)},(e,t)=>(t-e)/_n,e=>e.getHours());ic.range,jt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*_n)},(e,t)=>(t-e)/_n,e=>e.getUTCHours()).range;const Zi=jt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Le)/En,e=>e.getDate()-1);Zi.range;const sc=jt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/En,e=>e.getUTCDate()-1);sc.range,jt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/En,e=>Math.floor(e/En)).range;function cr(e){return jt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Le)/ec)}const ya=cr(0),xa=cr(1),b$=cr(2),_$=cr(3),jr=cr(4),E$=cr(5),O$=cr(6);ya.range,xa.range,b$.range,_$.range,jr.range,E$.range,O$.range;function ur(e){return jt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/ec)}const jp=ur(0),ba=ur(1),T$=ur(2),S$=ur(3),Wr=ur(4),w$=ur(5),$$=ur(6);jp.range,ba.range,T$.range,S$.range,Wr.range,w$.range,$$.range;const ac=jt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());ac.range,jt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()).range;const On=jt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());On.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:jt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),On.range;const hr=jt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());hr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:jt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),hr.range;function M$(e,t,n,r,i,s){const a=[[zr,1,bn],[zr,5,5*bn],[zr,15,15*bn],[zr,30,30*bn],[s,1,Le],[s,5,5*Le],[s,15,15*Le],[s,30,30*Le],[i,1,_n],[i,3,3*_n],[i,6,6*_n],[i,12,12*_n],[r,1,En],[r,2,2*En],[n,1,ec],[t,1,zp],[t,3,3*zp],[e,1,nc]];function o(c,u,d){const h=u<c;h&&([c,u]=[u,c]);const p=d&&typeof d.range=="function"?d:l(c,u,d),f=p?p.range(c,+u+1):[];return h?f.reverse():f}function l(c,u,d){const h=Math.abs(u-c)/d,p=gl(([,,m])=>m).right(a,h);if(p===a.length)return e.every(yl(c/nc,u/nc,d));if(p===0)return va.every(Math.max(yl(c,u,d),1));const[f,g]=a[h/a[p-1][2]<a[p][2]/h?p-1:p];return f.every(g)}return[o,l]}const[C$,A$]=M$(On,ac,ya,Zi,ic,rc);function oc(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function lc(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Xi(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function L$(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,s=e.days,a=e.shortDays,o=e.months,l=e.shortMonths,c=Ki(i),u=Qi(i),d=Ki(s),h=Qi(s),p=Ki(a),f=Qi(a),g=Ki(o),m=Qi(o),y=Ki(l),v=Qi(l),b={a:A,A:N,b:U,B:W,c:null,d:Kp,e:Kp,f:tM,g:uM,G:dM,H:K$,I:Q$,j:J$,L:Qp,m:eM,M:nM,p:j,q:it,Q:sf,s:af,S:rM,u:iM,U:sM,V:aM,w:oM,W:lM,x:null,X:null,y:cM,Y:hM,Z:pM,"%":rf},O={a:nt,A:mt,b:rt,B:Y,c:null,d:tf,e:tf,f:vM,g:$M,G:CM,H:fM,I:mM,j:gM,L:ef,m:yM,M:xM,p:J,q:vt,Q:sf,s:af,S:bM,u:_M,U:EM,V:OM,w:TM,W:SM,x:null,X:null,y:wM,Y:MM,Z:AM,"%":rf},E={a:k,A:w,b:V,B:P,c:B,d:Zp,e:Zp,f:q$,g:Yp,G:qp,H:Xp,I:Xp,j:F$,L:W$,m:G$,M:z$,p:L,q:V$,Q:Z$,s:X$,S:j$,u:N$,U:P$,V:U$,w:I$,W:B$,x:_,X:M,y:Yp,Y:qp,Z:H$,"%":Y$};b.x=S(n,b),b.X=S(r,b),b.c=S(t,b),O.x=S(n,O),O.X=S(r,O),O.c=S(t,O);function S(z,K){return function(ot){var F=[],Lt=-1,pt=0,Wt=z.length,qt,tt,Mt;for(ot instanceof Date||(ot=new Date(+ot));++Lt<Wt;)z.charCodeAt(Lt)===37&&(F.push(z.slice(pt,Lt)),(tt=Wp[qt=z.charAt(++Lt)])!=null?qt=z.charAt(++Lt):tt=qt==="e"?" ":"0",(Mt=K[qt])&&(qt=Mt(ot,tt)),F.push(qt),pt=Lt+1);return F.push(z.slice(pt,Lt)),F.join("")}}function C(z,K){return function(ot){var F=Xi(1900,void 0,1),Lt=I(F,z,ot+="",0),pt,Wt;if(Lt!=ot.length)return null;if("Q"in F)return new Date(F.Q);if("s"in F)return new Date(F.s*1e3+("L"in F?F.L:0));if(K&&!("Z"in F)&&(F.Z=0),"p"in F&&(F.H=F.H%12+F.p*12),F.m===void 0&&(F.m="q"in F?F.q:0),"V"in F){if(F.V<1||F.V>53)return null;"w"in F||(F.w=1),"Z"in F?(pt=lc(Xi(F.y,0,1)),Wt=pt.getUTCDay(),pt=Wt>4||Wt===0?ba.ceil(pt):ba(pt),pt=sc.offset(pt,(F.V-1)*7),F.y=pt.getUTCFullYear(),F.m=pt.getUTCMonth(),F.d=pt.getUTCDate()+(F.w+6)%7):(pt=oc(Xi(F.y,0,1)),Wt=pt.getDay(),pt=Wt>4||Wt===0?xa.ceil(pt):xa(pt),pt=Zi.offset(pt,(F.V-1)*7),F.y=pt.getFullYear(),F.m=pt.getMonth(),F.d=pt.getDate()+(F.w+6)%7)}else("W"in F||"U"in F)&&("w"in F||(F.w="u"in F?F.u%7:"W"in F?1:0),Wt="Z"in F?lc(Xi(F.y,0,1)).getUTCDay():oc(Xi(F.y,0,1)).getDay(),F.m=0,F.d="W"in F?(F.w+6)%7+F.W*7-(Wt+5)%7:F.w+F.U*7-(Wt+6)%7);return"Z"in F?(F.H+=F.Z/100|0,F.M+=F.Z%100,lc(F)):oc(F)}}function I(z,K,ot,F){for(var Lt=0,pt=K.length,Wt=ot.length,qt,tt;Lt<pt;){if(F>=Wt)return-1;if(qt=K.charCodeAt(Lt++),qt===37){if(qt=K.charAt(Lt++),tt=E[qt in Wp?K.charAt(Lt++):qt],!tt||(F=tt(z,ot,F))<0)return-1}else if(qt!=ot.charCodeAt(F++))return-1}return F}function L(z,K,ot){var F=c.exec(K.slice(ot));return F?(z.p=u.get(F[0].toLowerCase()),ot+F[0].length):-1}function k(z,K,ot){var F=p.exec(K.slice(ot));return F?(z.w=f.get(F[0].toLowerCase()),ot+F[0].length):-1}function w(z,K,ot){var F=d.exec(K.slice(ot));return F?(z.w=h.get(F[0].toLowerCase()),ot+F[0].length):-1}function V(z,K,ot){var F=y.exec(K.slice(ot));return F?(z.m=v.get(F[0].toLowerCase()),ot+F[0].length):-1}function P(z,K,ot){var F=g.exec(K.slice(ot));return F?(z.m=m.get(F[0].toLowerCase()),ot+F[0].length):-1}function B(z,K,ot){return I(z,t,K,ot)}function _(z,K,ot){return I(z,n,K,ot)}function M(z,K,ot){return I(z,r,K,ot)}function A(z){return a[z.getDay()]}function N(z){return s[z.getDay()]}function U(z){return l[z.getMonth()]}function W(z){return o[z.getMonth()]}function j(z){return i[+(z.getHours()>=12)]}function it(z){return 1+~~(z.getMonth()/3)}function nt(z){return a[z.getUTCDay()]}function mt(z){return s[z.getUTCDay()]}function rt(z){return l[z.getUTCMonth()]}function Y(z){return o[z.getUTCMonth()]}function J(z){return i[+(z.getUTCHours()>=12)]}function vt(z){return 1+~~(z.getUTCMonth()/3)}return{format:function(z){var K=S(z+="",b);return K.toString=function(){return z},K},parse:function(z){var K=C(z+="",!1);return K.toString=function(){return z},K},utcFormat:function(z){var K=S(z+="",O);return K.toString=function(){return z},K},utcParse:function(z){var K=C(z+="",!0);return K.toString=function(){return z},K}}}var Wp={"-":"",_:" ",0:"0"},Yt=/^\s*\d+/,k$=/^%/,D$=/[\\^$*+?|[\]().{}]/g;function yt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(t)+i:i)}function R$(e){return e.replace(D$,"\\$&")}function Ki(e){return new RegExp("^(?:"+e.map(R$).join("|")+")","i")}function Qi(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function I$(e,t,n){var r=Yt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function N$(e,t,n){var r=Yt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function P$(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function U$(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function B$(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function qp(e,t,n){var r=Yt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Yp(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function H$(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function V$(e,t,n){var r=Yt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function G$(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Zp(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function F$(e,t,n){var r=Yt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Xp(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function z$(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function j$(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function W$(e,t,n){var r=Yt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function q$(e,t,n){var r=Yt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Y$(e,t,n){var r=k$.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Z$(e,t,n){var r=Yt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function X$(e,t,n){var r=Yt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Kp(e,t){return yt(e.getDate(),t,2)}function K$(e,t){return yt(e.getHours(),t,2)}function Q$(e,t){return yt(e.getHours()%12||12,t,2)}function J$(e,t){return yt(1+Zi.count(On(e),e),t,3)}function Qp(e,t){return yt(e.getMilliseconds(),t,3)}function tM(e,t){return Qp(e,t)+"000"}function eM(e,t){return yt(e.getMonth()+1,t,2)}function nM(e,t){return yt(e.getMinutes(),t,2)}function rM(e,t){return yt(e.getSeconds(),t,2)}function iM(e){var t=e.getDay();return t===0?7:t}function sM(e,t){return yt(ya.count(On(e)-1,e),t,2)}function Jp(e){var t=e.getDay();return t>=4||t===0?jr(e):jr.ceil(e)}function aM(e,t){return e=Jp(e),yt(jr.count(On(e),e)+(On(e).getDay()===4),t,2)}function oM(e){return e.getDay()}function lM(e,t){return yt(xa.count(On(e)-1,e),t,2)}function cM(e,t){return yt(e.getFullYear()%100,t,2)}function uM(e,t){return e=Jp(e),yt(e.getFullYear()%100,t,2)}function hM(e,t){return yt(e.getFullYear()%1e4,t,4)}function dM(e,t){var n=e.getDay();return e=n>=4||n===0?jr(e):jr.ceil(e),yt(e.getFullYear()%1e4,t,4)}function pM(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+yt(t/60|0,"0",2)+yt(t%60,"0",2)}function tf(e,t){return yt(e.getUTCDate(),t,2)}function fM(e,t){return yt(e.getUTCHours(),t,2)}function mM(e,t){return yt(e.getUTCHours()%12||12,t,2)}function gM(e,t){return yt(1+sc.count(hr(e),e),t,3)}function ef(e,t){return yt(e.getUTCMilliseconds(),t,3)}function vM(e,t){return ef(e,t)+"000"}function yM(e,t){return yt(e.getUTCMonth()+1,t,2)}function xM(e,t){return yt(e.getUTCMinutes(),t,2)}function bM(e,t){return yt(e.getUTCSeconds(),t,2)}function _M(e){var t=e.getUTCDay();return t===0?7:t}function EM(e,t){return yt(jp.count(hr(e)-1,e),t,2)}function nf(e){var t=e.getUTCDay();return t>=4||t===0?Wr(e):Wr.ceil(e)}function OM(e,t){return e=nf(e),yt(Wr.count(hr(e),e)+(hr(e).getUTCDay()===4),t,2)}function TM(e){return e.getUTCDay()}function SM(e,t){return yt(ba.count(hr(e)-1,e),t,2)}function wM(e,t){return yt(e.getUTCFullYear()%100,t,2)}function $M(e,t){return e=nf(e),yt(e.getUTCFullYear()%100,t,2)}function MM(e,t){return yt(e.getUTCFullYear()%1e4,t,4)}function CM(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Wr(e):Wr.ceil(e),yt(e.getUTCFullYear()%1e4,t,4)}function AM(){return"+0000"}function rf(){return"%"}function sf(e){return+e}function af(e){return Math.floor(+e/1e3)}var qr,of;LM({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 LM(e){return qr=L$(e),of=qr.format,qr.parse,qr.utcFormat,qr.utcParse,qr}function kM(e){return new Date(e)}function DM(e){return e instanceof Date?+e:+new Date(+e)}function lf(e,t,n,r,i,s,a,o,l,c){var u=lp(),d=u.invert,h=u.domain,p=c(".%L"),f=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),v=c("%b %d"),b=c("%B"),O=c("%Y");function E(S){return(l(S)<S?p:o(S)<S?f:a(S)<S?g:s(S)<S?m:r(S)<S?i(S)<S?y:v:n(S)<S?b:O)(S)}return u.invert=function(S){return new Date(d(S))},u.domain=function(S){return arguments.length?h(Array.from(S,DM)):h().map(kM)},u.ticks=function(S){var C=h();return e(C[0],C[C.length-1],S??10)},u.tickFormat=function(S,C){return C==null?E:c(C)},u.nice=function(S){var C=h();return(!S||typeof S.range!="function")&&(S=t(C[0],C[C.length-1],S??10)),S?h(Fp(C,S)):u},u.copy=function(){return Bl(u,lf(e,t,n,r,i,s,a,o,l,c))},u}function cf(){return Pr.apply(lf(C$,A$,On,ac,ya,Zi,ic,rc,zr,of).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}const uf=Math.abs,te=Math.atan2,dr=Math.cos,RM=Math.max,cc=Math.min,nn=Math.sin,Yr=Math.sqrt,ee=1e-12,Ji=Math.PI,_a=Ji/2,Ea=2*Ji;function IM(e){return e>1?0:e<-1?Ji:Math.acos(e)}function hf(e){return e>=1?_a:e<=-1?-_a:Math.asin(e)}function df(e){this._context=e}df.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Oa(e){return new df(e)}function Pn(){}function pf(e){this._context=e}pf.prototype={areaStart:Pn,areaEnd:Pn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function ff(e){return new pf(e)}function NM(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),r=n.createElement("base"),i=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(i),t&&(r.href=t),i.href=e,i.href}const PM=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Tn(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}function Ta(e,t){const n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function UM(e){const t=Ta(e,"border-left-width"),n=Ta(e,"border-right-width");return e.clientWidth+t+n}function BM(e){const t=Ta(e,"border-top-width"),n=Ta(e,"border-bottom-width");return e.clientHeight+t+n}function mf(e,t={}){const n=t.width||UM(e),r=t.height||BM(e);return{width:n,height:r}}function HM(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const be=16384;function VM(e){(e.width>be||e.height>be)&&(e.width>be&&e.height>be?e.width>e.height?(e.height*=be/e.width,e.width=be):(e.width*=be/e.height,e.height=be):e.width>be?(e.height*=be/e.width,e.width=be):(e.width*=be/e.height,e.height=be))}function Sa(e){return new Promise((t,n)=>{const r=new Image;r.decode=()=>t(r),r.onload=()=>t(r),r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e})}async function GM(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function FM(e,t,n){const r="http://www.w3.org/2000/svg",i=document.createElementNS(r,"svg"),s=document.createElementNS(r,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${n}`),i.setAttribute("viewBox",`0 0 ${t} ${n}`),s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("x","0"),s.setAttribute("y","0"),s.setAttribute("externalResourcesRequired","true"),i.appendChild(s),s.appendChild(e),GM(i)}const de=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||de(n,t)};function zM(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function jM(e){return Tn(e).map(t=>{const n=e.getPropertyValue(t),r=e.getPropertyPriority(t);return`${t}: ${n}${r?" !important":""};`}).join(" ")}function WM(e,t,n){const r=`.${e}:${t}`,i=n.cssText?zM(n):jM(n);return document.createTextNode(`${r}{${i}}`)}function gf(e,t,n){const r=window.getComputedStyle(e,n),i=r.getPropertyValue("content");if(i===""||i==="none")return;const s=PM();try{t.className=`${t.className} ${s}`}catch{return}const a=document.createElement("style");a.appendChild(WM(s,n,r)),t.appendChild(a)}function qM(e,t){gf(e,t,":before"),gf(e,t,":after")}const vf="application/font-woff",yf="image/jpeg",YM={woff:vf,woff2:vf,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:yf,jpeg:yf,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function ZM(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function uc(e){const t=ZM(e).toLowerCase();return YM[t]||""}function XM(e){return e.split(/,/)[1]}function hc(e){return e.search(/^(data:)/)!==-1}function KM(e,t){return`data:${t};base64,${e}`}async function xf(e,t,n){const r=await fetch(e,t);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);const i=await r.blob();return new Promise((s,a)=>{const o=new FileReader;o.onerror=a,o.onloadend=()=>{try{s(n({res:r,result:o.result}))}catch(l){a(l)}},o.readAsDataURL(i)})}const dc={};function QM(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}async function pc(e,t,n){const r=QM(e,t,n.includeQueryParams);if(dc[r]!=null)return dc[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{const s=await xf(e,n.fetchRequestInit,({res:a,result:o})=>(t||(t=a.headers.get("Content-Type")||""),XM(o)));i=KM(s,t)}catch(s){i=n.imagePlaceholder||"";let a=`Failed to fetch resource: ${e}`;s&&(a=typeof s=="string"?s:s.message),a&&console.warn(a)}return dc[r]=i,i}async function JM(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):Sa(t)}async function t2(e,t){if(e.currentSrc){const s=document.createElement("canvas"),a=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,a==null||a.drawImage(e,0,0,s.width,s.height);const o=s.toDataURL();return Sa(o)}const n=e.poster,r=uc(n),i=await pc(n,r,t);return Sa(i)}async function e2(e){var t;try{if(!((t=e==null?void 0:e.contentDocument)===null||t===void 0)&&t.body)return await wa(e.contentDocument.body,{},!0)}catch{}return e.cloneNode(!1)}async function n2(e,t){return de(e,HTMLCanvasElement)?JM(e):de(e,HTMLVideoElement)?t2(e,t):de(e,HTMLIFrameElement)?e2(e):e.cloneNode(!1)}const r2=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT";async function i2(e,t,n){var r,i;let s=[];return r2(e)&&e.assignedNodes?s=Tn(e.assignedNodes()):de(e,HTMLIFrameElement)&&!((r=e.contentDocument)===null||r===void 0)&&r.body?s=Tn(e.contentDocument.body.childNodes):s=Tn(((i=e.shadowRoot)!==null&&i!==void 0?i:e).childNodes),s.length===0||de(e,HTMLVideoElement)||await s.reduce((a,o)=>a.then(()=>wa(o,n)).then(l=>{l&&t.appendChild(l)}),Promise.resolve()),t}function s2(e,t){const n=t.style;if(!n)return;const r=window.getComputedStyle(e);r.cssText?(n.cssText=r.cssText,n.transformOrigin=r.transformOrigin):Tn(r).forEach(i=>{let s=r.getPropertyValue(i);i==="font-size"&&s.endsWith("px")&&(s=`${Math.floor(parseFloat(s.substring(0,s.length-2)))-.1}px`),de(e,HTMLIFrameElement)&&i==="display"&&s==="inline"&&(s="block"),i==="d"&&t.getAttribute("d")&&(s=`path(${t.getAttribute("d")})`),n.setProperty(i,s,r.getPropertyPriority(i))})}function a2(e,t){de(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),de(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function o2(e,t){if(de(e,HTMLSelectElement)){const n=t,r=Array.from(n.children).find(i=>e.value===i.getAttribute("value"));r&&r.setAttribute("selected","")}}function l2(e,t){return de(t,Element)&&(s2(e,t),qM(e,t),a2(e,t),o2(e,t)),t}async function c2(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const r={};for(let s=0;s<n.length;s++){const a=n[s].getAttribute("xlink:href");if(a){const o=e.querySelector(a),l=document.querySelector(a);!o&&l&&!r[a]&&(r[a]=await wa(l,t,!0))}}const i=Object.values(r);if(i.length){const s="http://www.w3.org/1999/xhtml",a=document.createElementNS(s,"svg");a.setAttribute("xmlns",s),a.style.position="absolute",a.style.width="0",a.style.height="0",a.style.overflow="hidden",a.style.display="none";const o=document.createElementNS(s,"defs");a.appendChild(o);for(let l=0;l<i.length;l++)o.appendChild(i[l]);e.appendChild(a)}return e}async function wa(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>n2(r,t)).then(r=>i2(e,r,t)).then(r=>l2(e,r)).then(r=>c2(r,t))}const bf=/url\((['"]?)([^'"]+?)\1\)/g,u2=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,h2=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function d2(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function p2(e){const t=[];return e.replace(bf,(n,r,i)=>(t.push(i),n)),t.filter(n=>!hc(n))}async function f2(e,t,n,r,i){try{const s=n?NM(t,n):t,a=uc(t);let o;return i||(o=await pc(s,a,r)),e.replace(d2(t),`$1${o}$3`)}catch{}return e}function m2(e,{preferredFontFormat:t}){return t?e.replace(h2,n=>{for(;;){const[r,,i]=u2.exec(n)||[];if(!i)return"";if(i===t)return`src: ${r};`}}):e}function _f(e){return e.search(bf)!==-1}async function Ef(e,t,n){if(!_f(e))return e;const r=m2(e,n);return p2(r).reduce((i,s)=>i.then(a=>f2(a,s,t,n)),Promise.resolve(r))}async function $a(e,t,n){var r;const i=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(i){const s=await Ef(i,null,n);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function g2(e,t){await $a("background",e,t)||await $a("background-image",e,t),await $a("mask",e,t)||await $a("mask-image",e,t)}async function v2(e,t){const n=de(e,HTMLImageElement);if(!(n&&!hc(e.src))&&!(de(e,SVGImageElement)&&!hc(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,i=await pc(r,uc(r),t);await new Promise((s,a)=>{e.onload=s,e.onerror=a;const o=e;o.decode&&(o.decode=s),o.loading==="lazy"&&(o.loading="eager"),n?(e.srcset="",e.src=i):e.href.baseVal=i})}async function y2(e,t){const n=Tn(e.childNodes).map(r=>Of(r,t));await Promise.all(n).then(()=>e)}async function Of(e,t){de(e,Element)&&(await g2(e,t),await v2(e,t),await y2(e,t))}function x2(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const r=t.style;return r!=null&&Object.keys(r).forEach(i=>{n[i]=r[i]}),e}const Tf={};async function Sf(e){let t=Tf[e];if(t!=null)return t;const n=await(await fetch(e)).text();return t={url:e,cssText:n},Tf[e]=t,t}async function wf(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,i=(n.match(/url\([^)]+\)/g)||[]).map(async s=>{let a=s.replace(r,"$1");return a.startsWith("https://")||(a=new URL(a,e.url).href),xf(a,t.fetchRequestInit,({result:o})=>(n=n.replace(s,`url(${o})`),[s,o]))});return Promise.all(i).then(()=>n)}function $f(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let r=e.replace(n,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const l=i.exec(r);if(l===null)break;t.push(l[0])}r=r.replace(i,"");const s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",o=new RegExp(a,"gi");for(;;){let l=s.exec(r);if(l===null){if(l=o.exec(r),l===null)break;s.lastIndex=o.lastIndex}else o.lastIndex=s.lastIndex;t.push(l[0])}return t}async function b2(e,t){const n=[],r=[];return e.forEach(i=>{if("cssRules"in i)try{Tn(i.cssRules||[]).forEach((s,a)=>{if(s.type===CSSRule.IMPORT_RULE){let o=a+1;const l=s.href,c=Sf(l).then(u=>wf(u,t)).then(u=>$f(u).forEach(d=>{try{i.insertRule(d,d.startsWith("@import")?o+=1:i.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:d,error:h})}})).catch(u=>{console.error("Error loading remote css",u.toString())});r.push(c)}})}catch(s){const a=e.find(o=>o.href==null)||document.styleSheets[0];i.href!=null&&r.push(Sf(i.href).then(o=>wf(o,t)).then(o=>$f(o).forEach(l=>{a.insertRule(l,i.cssRules.length)})).catch(o=>{console.error("Error loading remote stylesheet",o)})),console.error("Error inlining remote css file",s)}}),Promise.all(r).then(()=>(e.forEach(i=>{if("cssRules"in i)try{Tn(i.cssRules||[]).forEach(s=>{n.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${i.href}`,s)}}),n))}function _2(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>_f(t.style.getPropertyValue("src")))}async function E2(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=Tn(e.ownerDocument.styleSheets),r=await b2(n,t);return _2(r)}async function O2(e,t){const n=await E2(e,t);return(await Promise.all(n.map(r=>{const i=r.parentStyleSheet?r.parentStyleSheet.href:null;return Ef(r.cssText,i,t)}))).join(`
3
- `)}async function T2(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await O2(e,t);if(n){const r=document.createElement("style"),i=document.createTextNode(n);r.appendChild(i),e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}}async function S2(e,t={}){const{width:n,height:r}=mf(e,t),i=await wa(e,t,!0);return await T2(i,t),await Of(i,t),x2(i,t),await FM(i,n,r)}async function Mf(e,t={}){const{width:n,height:r}=mf(e,t),i=await S2(e,t),s=await Sa(i),a=document.createElement("canvas"),o=a.getContext("2d"),l=t.pixelRatio||HM(),c=t.canvasWidth||n,u=t.canvasHeight||r;return a.width=c*l,a.height=u*l,t.skipAutoScale||VM(a),a.style.width=`${c}`,a.style.height=`${u}`,t.backgroundColor&&(o.fillStyle=t.backgroundColor,o.fillRect(0,0,a.width,a.height)),o.drawImage(s,0,0,a.width,a.height),a}async function w2(e,t={}){return(await Mf(e,t)).toDataURL()}async function $2(e,t={}){return(await Mf(e,t)).toDataURL("image/jpeg",t.quality||1)}let Sn=class{constructor(t,n){this.model=t,this.services=n,this.init()}init(){}update(){}setModel(t){this.model=t}setServices(t){this.services=t}};const M2="DONT_STYLE_ME_css_styles_verifier";let R=class Uu extends Sn{constructor(t,n){super(t,n)}static getHTMLElementSize(t){return{width:t.clientWidth,height:t.clientHeight}}static getSVGElementSize(t,n={useAttrs:!1,useClientDimensions:!1,useBBox:!1,useBoundingRect:!1}){t.attr||(t=D(t));const r={width:0,height:0},i=h=>{h&&Object.keys(r).forEach(p=>{if(h[p]){const f=h[p],g=parseFloat(f);f&&g>r[p]&&(""+f).indexOf("%")===-1&&(r[p]=g)}})},s={width:t.attr("width"),height:t.attr("height")},a=t.node();let o,l,c,u;try{typeof a.getBBox=="function"&&(o=a.getBBox(),l={width:o.width,height:o.height})}catch(h){console.error(h)}try{typeof(a==null?void 0:a.getBoundingClientRect)=="function"&&(c=a.getBoundingClientRect(),u={width:c.width,height:c.height})}catch(h){console.error(h)}let d;if(a instanceof SVGSVGElement&&(d={width:a.clientWidth,height:a.clientHeight}),n){if(n.useAttrs&&(i(s),r.width>0&&r.height>0))return r;if(n.useClientDimensions&&(i(d),r.width>0&&r.height>0))return d;if(n.useBBox&&(i(l),r.width>0&&r.height>0))return l;if(n.useBoundingRect&&(i(u),r.width>0&&r.height>0))return u}try{const h={width:x(t.node(),"width","baseVal","value"),height:x(t.node(),"height","baseVal","value")};i(h)}catch{i(d),i(l),i(s)}return r}static appendOrSelect(t,n){const r=t.select(`${n}`);if(r.empty()){let i=n.split("#"),s,a;return i.length===2?(s=i[0],i=i[1].split("."),a=i[0]):(i=n.split("."),s=i[0]),t.append(s).attr("id",a).attr("class",i.slice(1).join(" "))}return r}init(){this.initializeID(),this.styleHolderElement(),this.addMainContainer(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()}getChartID(){return this.chartID}getElementOffset(t,n=!1){const r={left:0,top:0},i=t.getBoundingClientRect(),s=n?{left:0,top:0}:this.getHolder().getBoundingClientRect();try{r.left=i.left-s.left,r.top=i.top-s.top}catch(a){console.error(a)}return r}generateElementIDString(t){return`chart-${this.chartID}-${t}`}initializeID(){this.chartID=Math.floor((1+Math.random())*281474976710656).toString(16)}addMainContainer(){const t=this.model.getOptions(),n=x(t,"style","prefix"),r=D(this.getHolder()).append("div").classed(`${he}--${n}--chart-wrapper`,!0).attr("id",`chart-${this.getChartID()}`).style("height","100%").style("width","100%");r.append("g").attr("class",M2),this.mainContainer=r.node()}update(){this.styleHolderElement()}styleHolderElement(){const t=this.getHolder(),{width:n,height:r,theme:i}=this.model.getOptions();n!==this.width&&(t.style.width=n,this.width=n),r!==this.height&&(t.style.height=r,this.height=r),D(this.getHolder()).classed(`${he}--chart-holder`,!0).attr("data-carbon-theme",i)}getHolder(){return this.model.get("holder")}exportToJPG(){const t=this,n=this.model.getOptions(),r=this.getHolder(),i=D(r);i.classed("filled",!0),$2(this.getMainContainer(),{quality:1,filter:s=>!(s.classList&&s.classList.contains("cds--cc--toolbar"))}).then(function(s){var a;let o="myChart";const l=x(n,"fileDownload","fileName");typeof l=="function"?o=l("jpg"):typeof l=="string"&&(o=l),(a=t.services.files)==null||a.downloadImage(s,`${o}.jpg`),i.classed("filled",!1)})}exportToPNG(){const t=this,n=this.model.getOptions(),r=this.getHolder(),i=D(r);i.classed("filled",!0),w2(this.getMainContainer(),{quality:1,filter:s=>!(s.classList&&s.classList.contains("cds--cc--toolbar"))}).then(function(s){var a;let o="myChart";const l=x(n,"fileDownload","fileName");typeof l=="function"?o=l("png"):typeof l=="string"&&(o=l),(a=t.services.files)==null||a.downloadImage(s,`${o}.png`),i.classed("filled",!1)}).catch(function(s){console.error("oops, something went wrong!",s)})}isFullScreenMode(){return D(this.getHolder()).classed("fullscreen")}toggleFullscreen(){const t=this.getHolder();D(t).classed("fullscreen")&&(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()}handleFullscreenChange(){document.addEventListener("fullscreenchange",()=>{const t=D(this.getHolder()),n=t.classed("fullscreen");t.classed("fullscreen",!n)})}setSVGMaxHeight(){if(!this.model.getOptions().height){const{height:t}=Uu.getSVGElementSize(D(this.mainContainer),{useBBox:!0}),n=D(this.mainContainer).attr("class"),r=D(this.mainContainer).selectAll(`.${n} > svg`);let i=0;r.nodes().forEach(function(s){i+=Number(Uu.getSVGElementSize(D(s),{useBBox:!0}).height)}),i<=t?D(this.mainContainer).attr("height",i):D(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){const t=this.getHolder();t&&D(t).on("mouseover",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(T.Chart.MOUSEOVER)}).on("mouseout",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(T.Chart.MOUSEOUT)})}addResizeListener(){const t=this.getHolder();if(!t)return;let n=t.clientWidth,r=t.clientHeight;const i=ga(()=>{var s;t&&(Math.abs(n-t.clientWidth)>1||Math.abs(r-t.clientHeight)>1)&&(n=t.clientWidth,r=t.clientHeight,(s=this.services.events)==null||s.dispatchEvent(T.Chart.RESIZE))},12.5);new ResizeObserver(i).observe(t)}},fc=class r0 extends Sn{static appendOrUpdateLinearGradient(t){let n=t.svg.select(`defs linearGradient#${t.id}`);n.empty()&&(n=t.svg.append("defs").append("linearGradient").attr("id",t.id).attr("x1",t.x1).attr("x2",t.x2).attr("y1",t.y1).attr("y2",t.y2)),n.selectAll("stop").remove(),n.selectAll("stop").data(t.stops).enter().append("stop").attr("offset",r=>r.offset).style("stop-color",r=>r.color).style("stop-opacity",r=>r.opacity)}static getOffsetRatio(t){return(Math.abs(t[1])*100/Math.abs(t[0]-t[1])).toFixed(2)+"%"}static getStops(t,n){const r=t[0]<0&&t[1]>0;let i=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return r&&(i=[{offset:"0%",color:n,opacity:"0.6"},{offset:r0.getOffsetRatio(t),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),i}};function Cf(e){const t=C2(Af(e),360);return Un(t,[0,10])||Un(t,[350,0])?{textAnchor:Ze.START,dominantBaseline:Xe.MIDDLE}:Un(t,[10,80])?{textAnchor:Ze.START,dominantBaseline:Xe.HANGING}:Un(t,[80,100])?{textAnchor:Ze.MIDDLE,dominantBaseline:Xe.HANGING}:Un(t,[100,170])?{textAnchor:Ze.END,dominantBaseline:Xe.HANGING}:Un(t,[170,190])?{textAnchor:Ze.END,dominantBaseline:Xe.MIDDLE}:Un(t,[190,260])?{textAnchor:Ze.END,dominantBaseline:Xe.BASELINE}:Un(t,[260,280])?{textAnchor:Ze.MIDDLE,dominantBaseline:Xe.BASELINE}:{textAnchor:Ze.START,dominantBaseline:Xe.BASELINE}}function C2(e,t){return(e%t+t)%t}function Un(e,[t,n]){return e>=t&&e<=n}function Af(e){return e*(180/Math.PI)}function Pt(e,t,n={x:0,y:0}){const r=t*Math.cos(e)+n.x,i=t*Math.sin(e)+n.y;return{x:isNaN(r)?0:r,y:isNaN(i)?0:i}}function A2(e,t){return t*Math.sin(e-Math.PI/2)}function L2(e,t,n,r){for(var i=-1,s=e==null?0:e.length;++i<s;)n=t(n,e[i],i,e);return n}function k2(e){return function(t){return e==null?void 0:e[t]}}var D2={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},R2=k2(D2),I2=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,N2="\\u0300-\\u036f",P2="\\ufe20-\\ufe2f",U2="\\u20d0-\\u20ff",B2=N2+P2+U2,H2="["+B2+"]",V2=RegExp(H2,"g");function G2(e){return e=$i(e),e&&e.replace(I2,R2).replace(V2,"")}var F2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function z2(e){return e.match(F2)||[]}var j2=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function W2(e){return j2.test(e)}var Lf="\\ud800-\\udfff",q2="\\u0300-\\u036f",Y2="\\ufe20-\\ufe2f",Z2="\\u20d0-\\u20ff",X2=q2+Y2+Z2,kf="\\u2700-\\u27bf",Df="a-z\\xdf-\\xf6\\xf8-\\xff",K2="\\xac\\xb1\\xd7\\xf7",Q2="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",J2="\\u2000-\\u206f",tC=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Rf="A-Z\\xc0-\\xd6\\xd8-\\xde",eC="\\ufe0e\\ufe0f",If=K2+Q2+J2+tC,Nf="['’]",Pf="["+If+"]",nC="["+X2+"]",Uf="\\d+",rC="["+kf+"]",Bf="["+Df+"]",Hf="[^"+Lf+If+Uf+kf+Df+Rf+"]",iC="\\ud83c[\\udffb-\\udfff]",sC="(?:"+nC+"|"+iC+")",aC="[^"+Lf+"]",Vf="(?:\\ud83c[\\udde6-\\uddff]){2}",Gf="[\\ud800-\\udbff][\\udc00-\\udfff]",Zr="["+Rf+"]",oC="\\u200d",Ff="(?:"+Bf+"|"+Hf+")",lC="(?:"+Zr+"|"+Hf+")",zf="(?:"+Nf+"(?:d|ll|m|re|s|t|ve))?",jf="(?:"+Nf+"(?:D|LL|M|RE|S|T|VE))?",Wf=sC+"?",qf="["+eC+"]?",cC="(?:"+oC+"(?:"+[aC,Vf,Gf].join("|")+")"+qf+Wf+")*",uC="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",hC="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",dC=qf+Wf+cC,pC="(?:"+[rC,Vf,Gf].join("|")+")"+dC,fC=RegExp([Zr+"?"+Bf+"+"+zf+"(?="+[Pf,Zr,"$"].join("|")+")",lC+"+"+jf+"(?="+[Pf,Zr+Ff,"$"].join("|")+")",Zr+"?"+Ff+"+"+zf,Zr+"+"+jf,hC,uC,Uf,pC].join("|"),"g");function mC(e){return e.match(fC)||[]}function gC(e,t,n){return e=$i(e),t=t,t===void 0?W2(e)?mC(e):z2(e):e.match(t)||[]}var vC="['’]",yC=RegExp(vC,"g");function Yf(e){return function(t){return L2(gC(G2(t).replace(yC,"")),e,"")}}function xC(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function Zf(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=Fr(n),n=n===n?n:0),t!==void 0&&(t=Fr(t),t=t===t?t:0),xC(Fr(e),t,n)}var bC="Expected a function";function _C(e,t,n){if(typeof e!="function")throw new TypeError(bC);return setTimeout(function(){e.apply(void 0,n)},t)}var EC=Ko(function(e,t,n){return _C(e,Fr(t)||0,n)});function OC(e,t){var n=-1,r=Kn(e)?Array(e.length):[];return Yl(e,function(i,s,a){r[++n]=t(i,s,a)}),r}function TC(e,t){var n=Xt(e)?jo:OC;return n(e,Fs(t))}var SC=1/0;function wC(e,t){return Bs(TC(e,t),SC)}function Xf(e,t){return Gs(e,t)}var Xr=Yf(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()});function $C(e,t){var n;return Yl(e,function(r,i,s){return n=t(r,i,s),!n}),!!n}function MC(e,t,n){var r=Xt(e)?qh:$C;return r(e,Fs(t))}class pr{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const s=n[i],a=t+s,o=Math.abs(t)<Math.abs(s)?t-(a-s):s-(a-t);o&&(n[r++]=o),t=a}return n[r]=t,this._n=r+1,this}valueOf(){const t=this._partials;let n=this._n,r,i,s,a=0;if(n>0){for(a=t[--n];n>0&&(r=a,i=t[--n],a=r+i,s=i-(a-r),!s););n>0&&(s<0&&t[n-1]<0||s>0&&t[n-1]>0)&&(i=s*2,r=a+i,i==r-a&&(a=r))}return a}}function*CC(e){for(const t of e)yield*t}function Kf(e){return Array.from(CC(e))}function AC(e){return e}var Ma=1,Ca=2,mc=3,ts=4,Qf=1e-6;function LC(e){return"translate("+e+",0)"}function kC(e){return"translate(0,"+e+")"}function DC(e){return t=>+e(t)}function RC(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function IC(){return!this.__axis}function Aa(e,t){var n=[],r=null,i=null,s=6,a=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=e===Ma||e===ts?-1:1,u=e===ts||e===Ca?"x":"y",d=e===Ma||e===mc?LC:kC;function h(p){var f=r??(t.ticks?t.ticks.apply(t,n):t.domain()),g=i??(t.tickFormat?t.tickFormat.apply(t,n):AC),m=Math.max(s,0)+o,y=t.range(),v=+y[0]+l,b=+y[y.length-1]+l,O=(t.bandwidth?RC:DC)(t.copy(),l),E=p.selection?p.selection():p,S=E.selectAll(".domain").data([null]),C=E.selectAll(".tick").data(f,t).order(),I=C.exit(),L=C.enter().append("g").attr("class","tick"),k=C.select("line"),w=C.select("text");S=S.merge(S.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),C=C.merge(L),k=k.merge(L.append("line").attr("stroke","currentColor").attr(u+"2",c*s)),w=w.merge(L.append("text").attr("fill","currentColor").attr(u,c*m).attr("dy",e===Ma?"0em":e===mc?"0.71em":"0.32em")),p!==E&&(S=S.transition(p),C=C.transition(p),k=k.transition(p),w=w.transition(p),I=I.transition(p).attr("opacity",Qf).attr("transform",function(V){return isFinite(V=O(V))?d(V+l):this.getAttribute("transform")}),L.attr("opacity",Qf).attr("transform",function(V){var P=this.parentNode.__axis;return d((P&&isFinite(P=P(V))?P:O(V))+l)})),I.remove(),S.attr("d",e===ts||e===Ca?a?"M"+c*a+","+v+"H"+l+"V"+b+"H"+c*a:"M"+l+","+v+"V"+b:a?"M"+v+","+c*a+"V"+l+"H"+b+"V"+c*a:"M"+v+","+l+"H"+b),C.attr("opacity",1).attr("transform",function(V){return d(O(V)+l)}),k.attr(u+"2",c*s),w.attr(u,c*m).text(g),E.filter(IC).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Ca?"start":e===ts?"end":"middle"),E.each(function(){this.__axis=O})}return h.scale=function(p){return arguments.length?(t=p,h):t},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),h):n.slice()},h.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),h):r&&r.slice()},h.tickFormat=function(p){return arguments.length?(i=p,h):i},h.tickSize=function(p){return arguments.length?(s=a=+p,h):s},h.tickSizeInner=function(p){return arguments.length?(s=+p,h):s},h.tickSizeOuter=function(p){return arguments.length?(a=+p,h):a},h.tickPadding=function(p){return arguments.length?(o=+p,h):o},h.offset=function(p){return arguments.length?(l=+p,h):l},h}function NC(e){return Aa(Ma,e)}function PC(e){return Aa(Ca,e)}function gc(e){return Aa(mc,e)}function Jf(e){return Aa(ts,e)}const vc={capture:!0,passive:!1};function yc(e){e.preventDefault(),e.stopImmediatePropagation()}function UC(e){var t=e.document.documentElement,n=D(e).on("dragstart.drag",yc,vc);"onselectstart"in t?n.on("selectstart.drag",yc,vc):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function BC(e,t){var n=e.document.documentElement,r=D(e).on("dragstart.drag",null);t&&(r.on("click.drag",yc,vc),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function HC(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}const VC=e=>+e,xc=e=>()=>e;function GC(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,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:s}})}function FC(e){e.stopImmediatePropagation()}function bc(e){e.preventDefault(),e.stopImmediatePropagation()}var tm={name:"drag"},_c={name:"space"},Kr={name:"handle"},Qr={name:"center"};const{abs:em,max:ne,min:re}=Math;function nm(e){return[+e[0],+e[1]]}function rm(e){return[nm(e[0]),nm(e[1])]}var La={name:"x",handles:["w","e"].map(ka),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},Ec={name:"y",handles:["n","s"].map(ka),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},wn={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"},im={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},sm={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},zC={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},jC={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function ka(e){return{type:e}}function WC(e){return!e.ctrlKey&&!e.button}function qC(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function YC(){return navigator.maxTouchPoints||"ontouchstart"in this}function Oc(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function ZC(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function am(){return XC(La)}function XC(e){var t=qC,n=WC,r=YC,i=!0,s=xl("start","brush","end"),a=6,o;function l(m){var y=m.property("__brush",g).selectAll(".overlay").data([ka("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",wn.overlay).merge(y).each(function(){var b=Oc(this).extent;D(this).attr("x",b[0][0]).attr("y",b[0][1]).attr("width",b[1][0]-b[0][0]).attr("height",b[1][1]-b[0][1])}),m.selectAll(".selection").data([ka("selection")]).enter().append("rect").attr("class","selection").attr("cursor",wn.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var v=m.selectAll(".handle").data(e.handles,function(b){return b.type});v.exit().remove(),v.enter().append("rect").attr("class",function(b){return"handle handle--"+b.type}).attr("cursor",function(b){return wn[b.type]}),m.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",f).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(m,y,v){m.tween?m.on("start.brush",function(b){u(this,arguments).beforestart().start(b)}).on("interrupt.brush end.brush",function(b){u(this,arguments).end(b)}).tween("brush",function(){var b=this,O=b.__brush,E=u(b,arguments),S=O.selection,C=e.input(typeof y=="function"?y.apply(this,arguments):y,O.extent),I=Ni(S,C);function L(k){O.selection=k===1&&C===null?null:I(k),c.call(b),E.brush()}return S!==null&&C!==null?L:L(1)}):m.each(function(){var b=this,O=arguments,E=b.__brush,S=e.input(typeof y=="function"?y.apply(b,O):y,E.extent),C=u(b,O).beforestart();Rl(b),E.selection=S===null?null:S,c.call(b),C.start(v).brush(v).end(v)})},l.clear=function(m,y){l.move(m,null,y)};function c(){var m=D(this),y=Oc(this).selection;y?(m.selectAll(".selection").style("display",null).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(v){return v.type[v.type.length-1]==="e"?y[1][0]-a/2:y[0][0]-a/2}).attr("y",function(v){return v.type[0]==="s"?y[1][1]-a/2:y[0][1]-a/2}).attr("width",function(v){return v.type==="n"||v.type==="s"?y[1][0]-y[0][0]+a:a}).attr("height",function(v){return v.type==="e"||v.type==="w"?y[1][1]-y[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(m,y,v){var b=m.__brush.emitter;return b&&(!v||!b.clean)?b:new d(m,y,v)}function d(m,y,v){this.that=m,this.args=y,this.state=m.__brush,this.active=0,this.clean=v}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,y){return this.starting?(this.starting=!1,this.emit("start",m,y)):this.emit("brush",m),this},brush:function(m,y){return this.emit("brush",m,y),this},end:function(m,y){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,y)),this},emit:function(m,y,v){var b=D(this.that).datum();s.call(m,this.that,new GC(m,{sourceEvent:y,target:l,selection:e.output(this.state.selection),mode:v,dispatch:s}),b)}};function h(m){if(o&&!m.touches||!n.apply(this,arguments))return;var y=this,v=m.target.__data__.type,b=(i&&m.metaKey?v="overlay":v)==="selection"?tm:i&&m.altKey?Qr:Kr,O=e===Ec?null:zC[v],E=e===La?null:jC[v],S=Oc(y),C=S.extent,I=S.selection,L=C[0][0],k,w,V=C[0][1],P,B,_=C[1][0],M,A,N=C[1][1],U,W,j=0,it=0,nt,mt=O&&E&&i&&m.shiftKey,rt,Y,J=Array.from(m.touches||[m],tt=>{const Mt=tt.identifier;return tt=er(tt,y),tt.point0=tt.slice(),tt.identifier=Mt,tt});Rl(y);var vt=u(y,arguments,!0).beforestart();if(v==="overlay"){I&&(nt=!0);const tt=[J[0],J[1]||J[0]];S.selection=I=[[k=e===Ec?L:re(tt[0][0],tt[1][0]),P=e===La?V:re(tt[0][1],tt[1][1])],[M=e===Ec?_:ne(tt[0][0],tt[1][0]),U=e===La?N:ne(tt[0][1],tt[1][1])]],J.length>1&&Lt(m)}else k=I[0][0],P=I[0][1],M=I[1][0],U=I[1][1];w=k,B=P,A=M,W=U;var z=D(y).attr("pointer-events","none"),K=z.selectAll(".overlay").attr("cursor",wn[v]);if(m.touches)vt.moved=F,vt.ended=pt;else{var ot=D(m.view).on("mousemove.brush",F,!0).on("mouseup.brush",pt,!0);i&&ot.on("keydown.brush",Wt,!0).on("keyup.brush",qt,!0),UC(m.view)}c.call(y),vt.start(m,b.name);function F(tt){for(const Mt of tt.changedTouches||[tt])for(const ln of J)ln.identifier===Mt.identifier&&(ln.cur=er(Mt,y));if(mt&&!rt&&!Y&&J.length===1){const Mt=J[0];em(Mt.cur[0]-Mt[0])>em(Mt.cur[1]-Mt[1])?Y=!0:rt=!0}for(const Mt of J)Mt.cur&&(Mt[0]=Mt.cur[0],Mt[1]=Mt.cur[1]);nt=!0,bc(tt),Lt(tt)}function Lt(tt){const Mt=J[0],ln=Mt.point0;var Ye;switch(j=Mt[0]-ln[0],it=Mt[1]-ln[1],b){case _c:case tm:{O&&(j=ne(L-k,re(_-M,j)),w=k+j,A=M+j),E&&(it=ne(V-P,re(N-U,it)),B=P+it,W=U+it);break}case Kr:{J[1]?(O&&(w=ne(L,re(_,J[0][0])),A=ne(L,re(_,J[1][0])),O=1),E&&(B=ne(V,re(N,J[0][1])),W=ne(V,re(N,J[1][1])),E=1)):(O<0?(j=ne(L-k,re(_-k,j)),w=k+j,A=M):O>0&&(j=ne(L-M,re(_-M,j)),w=k,A=M+j),E<0?(it=ne(V-P,re(N-P,it)),B=P+it,W=U):E>0&&(it=ne(V-U,re(N-U,it)),B=P,W=U+it));break}case Qr:{O&&(w=ne(L,re(_,k-j*O)),A=ne(L,re(_,M+j*O))),E&&(B=ne(V,re(N,P-it*E)),W=ne(V,re(N,U+it*E)));break}}A<w&&(O*=-1,Ye=k,k=M,M=Ye,Ye=w,w=A,A=Ye,v in im&&K.attr("cursor",wn[v=im[v]])),W<B&&(E*=-1,Ye=P,P=U,U=Ye,Ye=B,B=W,W=Ye,v in sm&&K.attr("cursor",wn[v=sm[v]])),S.selection&&(I=S.selection),rt&&(w=I[0][0],A=I[1][0]),Y&&(B=I[0][1],W=I[1][1]),(I[0][0]!==w||I[0][1]!==B||I[1][0]!==A||I[1][1]!==W)&&(S.selection=[[w,B],[A,W]],c.call(y),vt.brush(tt,b.name))}function pt(tt){if(FC(tt),tt.touches){if(tt.touches.length)return;o&&clearTimeout(o),o=setTimeout(function(){o=null},500)}else BC(tt.view,nt),ot.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);z.attr("pointer-events","all"),K.attr("cursor",wn.overlay),S.selection&&(I=S.selection),ZC(I)&&(S.selection=null,c.call(y)),vt.end(tt,b.name)}function Wt(tt){switch(tt.keyCode){case 16:{mt=O&&E;break}case 18:{b===Kr&&(O&&(M=A-j*O,k=w+j*O),E&&(U=W-it*E,P=B+it*E),b=Qr,Lt(tt));break}case 32:{(b===Kr||b===Qr)&&(O<0?M=A-j:O>0&&(k=w-j),E<0?U=W-it:E>0&&(P=B-it),b=_c,K.attr("cursor",wn.selection),Lt(tt));break}default:return}bc(tt)}function qt(tt){switch(tt.keyCode){case 16:{mt&&(rt=Y=mt=!1,Lt(tt));break}case 18:{b===Qr&&(O<0?M=A:O>0&&(k=w),E<0?U=W:E>0&&(P=B),b=Kr,Lt(tt));break}case 32:{b===_c&&(tt.altKey?(O&&(M=A-j*O,k=w+j*O),E&&(U=W-it*E,P=B+it*E),b=Qr):(O<0?M=A:O>0&&(k=w),E<0?U=W:E>0&&(P=B),b=Kr),K.attr("cursor",wn[v]),Lt(tt));break}default:return}bc(tt)}}function p(m){u(this,arguments).moved(m)}function f(m){u(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=rm(t.apply(this,arguments)),m.dim=e,m}return l.extent=function(m){return arguments.length?(t=typeof m=="function"?m:xc(rm(m)),l):t},l.filter=function(m){return arguments.length?(n=typeof m=="function"?m:xc(!!m),l):n},l.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:xc(!!m),l):r},l.handleSize=function(m){return arguments.length?(a=+m,l):a},l.keyModifiers=function(m){return arguments.length?(i=!!m,l):i},l.on=function(){var m=s.on.apply(s,arguments);return m===s?l:m},l}const Tc=Math.PI,Sc=2*Tc,fr=1e-6,KC=Sc-fr;function om(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function QC(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return om;const n=10**t;return function(r){this._+=r[0];for(let i=1,s=r.length;i<s;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let wc=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?om:QC(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,s,a){this._append`C${+t},${+n},${+r},${+i},${this._x1=+s},${this._y1=+a}`}arcTo(t,n,r,i,s){if(t=+t,n=+n,r=+r,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,o=this._y1,l=r-t,c=i-n,u=a-t,d=o-n,h=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(h>fr)if(!(Math.abs(d*l-c*u)>fr)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-a,f=i-o,g=l*l+c*c,m=p*p+f*f,y=Math.sqrt(g),v=Math.sqrt(h),b=s*Math.tan((Tc-Math.acos((g+h-m)/(2*y*v)))/2),O=b/v,E=b/y;Math.abs(O-1)>fr&&this._append`L${t+O*u},${n+O*d}`,this._append`A${s},${s},0,0,${+(d*p>u*f)},${this._x1=t+E*l},${this._y1=n+E*c}`}}arc(t,n,r,i,s,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(i),l=r*Math.sin(i),c=t+o,u=n+l,d=1^a,h=a?i-s:s-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>fr||Math.abs(this._y1-u)>fr)&&this._append`L${c},${u}`,r&&(h<0&&(h=h%Sc+Sc),h>KC?this._append`A${r},${r},0,1,${d},${t-o},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=u}`:h>fr&&this._append`A${r},${r},0,${+(h>=Tc)},${d},${this._x1=t+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function lm(){return new wc}lm.prototype=wc.prototype;var Et=1e-6,cm=1e-12,ut=Math.PI,pe=ut/2,um=ut/4,_e=ut*2,se=180/ut,Ut=ut/180,Ot=Math.abs,hm=Math.atan,mr=Math.atan2,St=Math.cos,JC=Math.exp,tA=Math.log,bt=Math.sin,Bn=Math.sign||function(e){return e>0?1:e<0?-1:0},je=Math.sqrt,eA=Math.tan;function nA(e){return e>1?0:e<-1?ut:Math.acos(e)}function $n(e){return e>1?pe:e<-1?-pe:Math.asin(e)}function ke(){}function Da(e,t){e&&pm.hasOwnProperty(e.type)&&pm[e.type](e,t)}var dm={Feature:function(e,t){Da(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Da(n[r].geometry,t)}},pm={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){$c(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)$c(n[r],t,0)},Polygon:function(e,t){fm(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)fm(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Da(n[r],t)}};function $c(e,t,n){var r=-1,i=e.length-n,s;for(t.lineStart();++r<i;)s=e[r],t.point(s[0],s[1],s[2]);t.lineEnd()}function fm(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)$c(e[n],t,1);t.polygonEnd()}function Jr(e,t){e&&dm.hasOwnProperty(e.type)?dm[e.type](e,t):Da(e,t)}function Mc(e){return[mr(e[1],e[0]),$n(e[2])]}function ti(e){var t=e[0],n=e[1],r=St(n);return[r*St(t),r*bt(t),bt(n)]}function Ra(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Ia(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Cc(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Na(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Ac(e){var t=je(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function Lc(e,t){function n(r,i){return r=e(r,i),t(r[0],r[1])}return e.invert&&t.invert&&(n.invert=function(r,i){return r=t.invert(r,i),r&&e.invert(r[0],r[1])}),n}function kc(e,t){return Ot(e)>ut&&(e-=Math.round(e/_e)*_e),[e,t]}kc.invert=kc;function mm(e,t,n){return(e%=_e)?t||n?Lc(vm(e),ym(t,n)):vm(e):t||n?ym(t,n):kc}function gm(e){return function(t,n){return t+=e,Ot(t)>ut&&(t-=Math.round(t/_e)*_e),[t,n]}}function vm(e){var t=gm(e);return t.invert=gm(-e),t}function ym(e,t){var n=St(e),r=bt(e),i=St(t),s=bt(t);function a(o,l){var c=St(l),u=St(o)*c,d=bt(o)*c,h=bt(l),p=h*n+u*r;return[mr(d*i-p*s,u*n-h*r),$n(p*i+d*s)]}return a.invert=function(o,l){var c=St(l),u=St(o)*c,d=bt(o)*c,h=bt(l),p=h*i-d*s;return[mr(d*i+h*s,u*n+p*r),$n(p*n-u*r)]},a}function rA(e){e=mm(e[0]*Ut,e[1]*Ut,e.length>2?e[2]*Ut:0);function t(n){return n=e(n[0]*Ut,n[1]*Ut),n[0]*=se,n[1]*=se,n}return t.invert=function(n){return n=e.invert(n[0]*Ut,n[1]*Ut),n[0]*=se,n[1]*=se,n},t}function iA(e,t,n,r,i,s){if(n){var a=St(t),o=bt(t),l=r*n;i==null?(i=t+r*_e,s=t-l/2):(i=xm(a,i),s=xm(a,s),(r>0?i<s:i>s)&&(i+=r*_e));for(var c,u=i;r>0?u>s:u<s;u-=l)c=Mc([a,-o*St(u),-o*bt(u)]),e.point(c[0],c[1])}}function xm(e,t){t=ti(t),t[0]-=e,Ac(t);var n=nA(-t[1]);return((-t[2]<0?-n:n)+_e-Et)%_e}function bm(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:ke,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Pa(e,t){return Ot(e[0]-t[0])<Et&&Ot(e[1]-t[1])<Et}function Ua(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function _m(e,t,n,r,i){var s=[],a=[],o,l;if(e.forEach(function(f){if(!((g=f.length-1)<=0)){var g,m=f[0],y=f[g],v;if(Pa(m,y)){if(!m[2]&&!y[2]){for(i.lineStart(),o=0;o<g;++o)i.point((m=f[o])[0],m[1]);i.lineEnd();return}y[0]+=2*Et}s.push(v=new Ua(m,f,null,!0)),a.push(v.o=new Ua(m,null,v,!1)),s.push(v=new Ua(y,f,null,!1)),a.push(v.o=new Ua(y,null,v,!0))}}),!!s.length){for(a.sort(t),Em(s),Em(a),o=0,l=a.length;o<l;++o)a[o].e=n=!n;for(var c=s[0],u,d;;){for(var h=c,p=!0;h.v;)if((h=h.n)===c)return;u=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(o=0,l=u.length;o<l;++o)i.point((d=u[o])[0],d[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(u=h.p.z,o=u.length-1;o>=0;--o)i.point((d=u[o])[0],d[1]);else r(h.x,h.p.x,-1,i);h=h.p}h=h.o,u=h.z,p=!p}while(!h.v);i.lineEnd()}}}function Em(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}function Dc(e){return Ot(e[0])<=ut?e[0]:Bn(e[0])*((Ot(e[0])+ut)%_e-ut)}function sA(e,t){var n=Dc(t),r=t[1],i=bt(r),s=[bt(n),-St(n),0],a=0,o=0,l=new pr;i===1?r=pe+Et:i===-1&&(r=-pe-Et);for(var c=0,u=e.length;c<u;++c)if(h=(d=e[c]).length)for(var d,h,p=d[h-1],f=Dc(p),g=p[1]/2+um,m=bt(g),y=St(g),v=0;v<h;++v,f=O,m=S,y=C,p=b){var b=d[v],O=Dc(b),E=b[1]/2+um,S=bt(E),C=St(E),I=O-f,L=I>=0?1:-1,k=L*I,w=k>ut,V=m*S;if(l.add(mr(V*L*bt(k),y*C+V*St(k))),a+=w?I+L*_e:I,w^f>=n^O>=n){var P=Ia(ti(p),ti(b));Ac(P);var B=Ia(s,P);Ac(B);var _=(w^I>=0?-1:1)*$n(B[2]);(r>_||r===_&&(P[0]||P[1]))&&(o+=w^I>=0?1:-1)}}return(a<-Et||a<Et&&l<-cm)^o&1}function Om(e,t,n,r){return function(i){var s=t(i),a=bm(),o=t(a),l=!1,c,u,d,h={point:p,lineStart:g,lineEnd:m,polygonStart:function(){h.point=y,h.lineStart=v,h.lineEnd=b,u=[],c=[]},polygonEnd:function(){h.point=p,h.lineStart=g,h.lineEnd=m,u=Kf(u);var O=sA(c,r);u.length?(l||(i.polygonStart(),l=!0),_m(u,oA,O,n,i)):O&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),u=c=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(O,E){e(O,E)&&i.point(O,E)}function f(O,E){s.point(O,E)}function g(){h.point=f,s.lineStart()}function m(){h.point=p,s.lineEnd()}function y(O,E){d.push([O,E]),o.point(O,E)}function v(){o.lineStart(),d=[]}function b(){y(d[0][0],d[0][1]),o.lineEnd();var O=o.clean(),E=a.result(),S,C=E.length,I,L,k;if(d.pop(),c.push(d),d=null,!!C){if(O&1){if(L=E[0],(I=L.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),S=0;S<I;++S)i.point((k=L[S])[0],k[1]);i.lineEnd()}return}C>1&&O&2&&E.push(E.pop().concat(E.shift())),u.push(E.filter(aA))}}return h}}function aA(e){return e.length>1}function oA(e,t){return((e=e.x)[0]<0?e[1]-pe-Et:pe-e[1])-((t=t.x)[0]<0?t[1]-pe-Et:pe-t[1])}const Tm=Om(function(){return!0},lA,uA,[-ut,-pe]);function lA(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(s,a){var o=s>0?ut:-ut,l=Ot(s-t);Ot(l-ut)<Et?(e.point(t,n=(n+a)/2>0?pe:-pe),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(o,n),e.point(s,n),i=0):r!==o&&l>=ut&&(Ot(t-r)<Et&&(t-=r*Et),Ot(s-o)<Et&&(s-=o*Et),n=cA(t,n,s,a),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(o,n),i=0),e.point(t=s,n=a),r=o},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function cA(e,t,n,r){var i,s,a=bt(e-n);return Ot(a)>Et?hm((bt(t)*(s=St(r))*bt(n)-bt(r)*(i=St(t))*bt(e))/(i*s*a)):(t+r)/2}function uA(e,t,n,r){var i;if(e==null)i=n*pe,r.point(-ut,i),r.point(0,i),r.point(ut,i),r.point(ut,0),r.point(ut,-i),r.point(0,-i),r.point(-ut,-i),r.point(-ut,0),r.point(-ut,i);else if(Ot(e[0]-t[0])>Et){var s=e[0]<t[0]?ut:-ut;i=n*s/2,r.point(-s,i),r.point(0,i),r.point(s,i)}else r.point(t[0],t[1])}function hA(e){var t=St(e),n=2*Ut,r=t>0,i=Ot(t)>Et;function s(u,d,h,p){iA(p,e,n,h,u,d)}function a(u,d){return St(u)*St(d)>t}function o(u){var d,h,p,f,g;return{lineStart:function(){f=p=!1,g=1},point:function(m,y){var v=[m,y],b,O=a(m,y),E=r?O?0:c(m,y):O?c(m+(m<0?ut:-ut),y):0;if(!d&&(f=p=O)&&u.lineStart(),O!==p&&(b=l(d,v),(!b||Pa(d,b)||Pa(v,b))&&(v[2]=1)),O!==p)g=0,O?(u.lineStart(),b=l(v,d),u.point(b[0],b[1])):(b=l(d,v),u.point(b[0],b[1],2),u.lineEnd()),d=b;else if(i&&d&&r^O){var S;!(E&h)&&(S=l(v,d,!0))&&(g=0,r?(u.lineStart(),u.point(S[0][0],S[0][1]),u.point(S[1][0],S[1][1]),u.lineEnd()):(u.point(S[1][0],S[1][1]),u.lineEnd(),u.lineStart(),u.point(S[0][0],S[0][1],3)))}O&&(!d||!Pa(d,v))&&u.point(v[0],v[1]),d=v,p=O,h=E},lineEnd:function(){p&&u.lineEnd(),d=null},clean:function(){return g|(f&&p)<<1}}}function l(u,d,h){var p=ti(u),f=ti(d),g=[1,0,0],m=Ia(p,f),y=Ra(m,m),v=m[0],b=y-v*v;if(!b)return!h&&u;var O=t*y/b,E=-t*v/b,S=Ia(g,m),C=Na(g,O),I=Na(m,E);Cc(C,I);var L=S,k=Ra(C,L),w=Ra(L,L),V=k*k-w*(Ra(C,C)-1);if(!(V<0)){var P=je(V),B=Na(L,(-k-P)/w);if(Cc(B,C),B=Mc(B),!h)return B;var _=u[0],M=d[0],A=u[1],N=d[1],U;M<_&&(U=_,_=M,M=U);var W=M-_,j=Ot(W-ut)<Et,it=j||W<Et;if(!j&&N<A&&(U=A,A=N,N=U),it?j?A+N>0^B[1]<(Ot(B[0]-_)<Et?A:N):A<=B[1]&&B[1]<=N:W>ut^(_<=B[0]&&B[0]<=M)){var nt=Na(L,(-k+P)/w);return Cc(nt,C),[B,Mc(nt)]}}}function c(u,d){var h=r?e:ut-e,p=0;return u<-h?p|=1:u>h&&(p|=2),d<-h?p|=4:d>h&&(p|=8),p}return Om(a,o,s,r?[0,-e]:[-ut,e-ut])}function dA(e,t,n,r,i,s){var a=e[0],o=e[1],l=t[0],c=t[1],u=0,d=1,h=l-a,p=c-o,f;if(f=n-a,!(!h&&f>0)){if(f/=h,h<0){if(f<u)return;f<d&&(d=f)}else if(h>0){if(f>d)return;f>u&&(u=f)}if(f=i-a,!(!h&&f<0)){if(f/=h,h<0){if(f>d)return;f>u&&(u=f)}else if(h>0){if(f<u)return;f<d&&(d=f)}if(f=r-o,!(!p&&f>0)){if(f/=p,p<0){if(f<u)return;f<d&&(d=f)}else if(p>0){if(f>d)return;f>u&&(u=f)}if(f=s-o,!(!p&&f<0)){if(f/=p,p<0){if(f>d)return;f>u&&(u=f)}else if(p>0){if(f<u)return;f<d&&(d=f)}return u>0&&(e[0]=a+u*h,e[1]=o+u*p),d<1&&(t[0]=a+d*h,t[1]=o+d*p),!0}}}}}var es=1e9,Ba=-es;function pA(e,t,n,r){function i(c,u){return e<=c&&c<=n&&t<=u&&u<=r}function s(c,u,d,h){var p=0,f=0;if(c==null||(p=a(c,d))!==(f=a(u,d))||l(c,u)<0^d>0)do h.point(p===0||p===3?e:n,p>1?r:t);while((p=(p+d+4)%4)!==f);else h.point(u[0],u[1])}function a(c,u){return Ot(c[0]-e)<Et?u>0?0:3:Ot(c[0]-n)<Et?u>0?2:1:Ot(c[1]-t)<Et?u>0?1:0:u>0?3:2}function o(c,u){return l(c.x,u.x)}function l(c,u){var d=a(c,1),h=a(u,1);return d!==h?d-h:d===0?u[1]-c[1]:d===1?c[0]-u[0]:d===2?c[1]-u[1]:u[0]-c[0]}return function(c){var u=c,d=bm(),h,p,f,g,m,y,v,b,O,E,S,C={point:I,lineStart:V,lineEnd:P,polygonStart:k,polygonEnd:w};function I(_,M){i(_,M)&&u.point(_,M)}function L(){for(var _=0,M=0,A=p.length;M<A;++M)for(var N=p[M],U=1,W=N.length,j=N[0],it,nt,mt=j[0],rt=j[1];U<W;++U)it=mt,nt=rt,j=N[U],mt=j[0],rt=j[1],nt<=r?rt>r&&(mt-it)*(r-nt)>(rt-nt)*(e-it)&&++_:rt<=r&&(mt-it)*(r-nt)<(rt-nt)*(e-it)&&--_;return _}function k(){u=d,h=[],p=[],S=!0}function w(){var _=L(),M=S&&_,A=(h=Kf(h)).length;(M||A)&&(c.polygonStart(),M&&(c.lineStart(),s(null,null,1,c),c.lineEnd()),A&&_m(h,o,_,s,c),c.polygonEnd()),u=c,h=p=f=null}function V(){C.point=B,p&&p.push(f=[]),E=!0,O=!1,v=b=NaN}function P(){h&&(B(g,m),y&&O&&d.rejoin(),h.push(d.result())),C.point=I,O&&u.lineEnd()}function B(_,M){var A=i(_,M);if(p&&f.push([_,M]),E)g=_,m=M,y=A,E=!1,A&&(u.lineStart(),u.point(_,M));else if(A&&O)u.point(_,M);else{var N=[v=Math.max(Ba,Math.min(es,v)),b=Math.max(Ba,Math.min(es,b))],U=[_=Math.max(Ba,Math.min(es,_)),M=Math.max(Ba,Math.min(es,M))];dA(N,U,e,t,n,r)?(O||(u.lineStart(),u.point(N[0],N[1])),u.point(U[0],U[1]),A||u.lineEnd(),S=!1):A&&(u.lineStart(),u.point(_,M),S=!1)}v=_,b=M,O=A}return C}}const Rc=e=>e;var Ic=new pr,Nc=new pr,Sm,wm,Pc,Uc,Mn={point:ke,lineStart:ke,lineEnd:ke,polygonStart:function(){Mn.lineStart=fA,Mn.lineEnd=gA},polygonEnd:function(){Mn.lineStart=Mn.lineEnd=Mn.point=ke,Ic.add(Ot(Nc)),Nc=new pr},result:function(){var e=Ic/2;return Ic=new pr,e}};function fA(){Mn.point=mA}function mA(e,t){Mn.point=$m,Sm=Pc=e,wm=Uc=t}function $m(e,t){Nc.add(Uc*e-Pc*t),Pc=e,Uc=t}function gA(){$m(Sm,wm)}var ei=1/0,Ha=ei,ns=-ei,Va=ns,Ga={point:vA,lineStart:ke,lineEnd:ke,polygonStart:ke,polygonEnd:ke,result:function(){var e=[[ei,Ha],[ns,Va]];return ns=Va=-(Ha=ei=1/0),e}};function vA(e,t){e<ei&&(ei=e),e>ns&&(ns=e),t<Ha&&(Ha=t),t>Va&&(Va=t)}var Bc=0,Hc=0,rs=0,Fa=0,za=0,ni=0,Vc=0,Gc=0,is=0,Mm,Cm,rn,sn,De={point:gr,lineStart:Am,lineEnd:Lm,polygonStart:function(){De.lineStart=bA,De.lineEnd=_A},polygonEnd:function(){De.point=gr,De.lineStart=Am,De.lineEnd=Lm},result:function(){var e=is?[Vc/is,Gc/is]:ni?[Fa/ni,za/ni]:rs?[Bc/rs,Hc/rs]:[NaN,NaN];return Bc=Hc=rs=Fa=za=ni=Vc=Gc=is=0,e}};function gr(e,t){Bc+=e,Hc+=t,++rs}function Am(){De.point=yA}function yA(e,t){De.point=xA,gr(rn=e,sn=t)}function xA(e,t){var n=e-rn,r=t-sn,i=je(n*n+r*r);Fa+=i*(rn+e)/2,za+=i*(sn+t)/2,ni+=i,gr(rn=e,sn=t)}function Lm(){De.point=gr}function bA(){De.point=EA}function _A(){km(Mm,Cm)}function EA(e,t){De.point=km,gr(Mm=rn=e,Cm=sn=t)}function km(e,t){var n=e-rn,r=t-sn,i=je(n*n+r*r);Fa+=i*(rn+e)/2,za+=i*(sn+t)/2,ni+=i,i=sn*e-rn*t,Vc+=i*(rn+e),Gc+=i*(sn+t),is+=i*3,gr(rn=e,sn=t)}function Dm(e){this._context=e}Dm.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,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(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,_e);break}}},result:ke};var Fc=new pr,zc,Rm,Im,ss,as,os={point:ke,lineStart:function(){os.point=OA},lineEnd:function(){zc&&Nm(Rm,Im),os.point=ke},polygonStart:function(){zc=!0},polygonEnd:function(){zc=null},result:function(){var e=+Fc;return Fc=new pr,e}};function OA(e,t){os.point=Nm,Rm=ss=e,Im=as=t}function Nm(e,t){ss-=e,as-=t,Fc.add(je(ss*ss+as*as)),ss=e,as=t}let Pm,ja,Um,Bm;class Hm{constructor(t){this._append=t==null?Vm:TA(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,n){switch(this._point){case 0:{this._append`M${t},${n}`,this._point=1;break}case 1:{this._append`L${t},${n}`;break}default:{if(this._append`M${t},${n}`,this._radius!==Um||this._append!==ja){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`,Um=r,ja=this._append,Bm=this._,this._=i}this._+=Bm;break}}}result(){const t=this._;return this._="",t.length?t:null}}function Vm(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function TA(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return Vm;if(t!==Pm){const n=10**t;Pm=t,ja=function(r){let i=1;this._+=r[0];for(const s=r.length;i<s;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}return ja}function SA(e,t){let n=3,r=4.5,i,s;function a(o){return o&&(typeof r=="function"&&s.pointRadius(+r.apply(this,arguments)),Jr(o,i(s))),s.result()}return a.area=function(o){return Jr(o,i(Mn)),Mn.result()},a.measure=function(o){return Jr(o,i(os)),os.result()},a.bounds=function(o){return Jr(o,i(Ga)),Ga.result()},a.centroid=function(o){return Jr(o,i(De)),De.result()},a.projection=function(o){return arguments.length?(i=o==null?(e=null,Rc):(e=o).stream,a):e},a.context=function(o){return arguments.length?(s=o==null?(t=null,new Hm(n)):new Dm(t=o),typeof r!="function"&&s.pointRadius(r),a):t},a.pointRadius=function(o){return arguments.length?(r=typeof o=="function"?o:(s.pointRadius(+o),+o),a):r},a.digits=function(o){if(!arguments.length)return n;if(o==null)n=null;else{const l=Math.floor(o);if(!(l>=0))throw new RangeError(`invalid digits: ${o}`);n=l}return t===null&&(s=new Hm(n)),a},a.projection(e).digits(n).context(t)}function jc(e){return function(t){var n=new Wc;for(var r in e)n[r]=e[r];return n.stream=t,n}}function Wc(){}Wc.prototype={constructor:Wc,point:function(e,t){this.stream.point(e,t)},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 qc(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),Jr(n,e.stream(Ga)),t(Ga.result()),r!=null&&e.clipExtent(r),e}function Gm(e,t,n){return qc(e,function(r){var i=t[1][0]-t[0][0],s=t[1][1]-t[0][1],a=Math.min(i/(r[1][0]-r[0][0]),s/(r[1][1]-r[0][1])),o=+t[0][0]+(i-a*(r[1][0]+r[0][0]))/2,l=+t[0][1]+(s-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([o,l])},n)}function wA(e,t,n){return Gm(e,[[0,0],t],n)}function $A(e,t,n){return qc(e,function(r){var i=+t,s=i/(r[1][0]-r[0][0]),a=(i-s*(r[1][0]+r[0][0]))/2,o=-s*r[0][1];e.scale(150*s).translate([a,o])},n)}function MA(e,t,n){return qc(e,function(r){var i=+t,s=i/(r[1][1]-r[0][1]),a=-s*r[0][0],o=(i-s*(r[1][1]+r[0][1]))/2;e.scale(150*s).translate([a,o])},n)}var Fm=16,CA=St(30*Ut);function zm(e,t){return+t?LA(e,t):AA(e)}function AA(e){return jc({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function LA(e,t){function n(r,i,s,a,o,l,c,u,d,h,p,f,g,m){var y=c-r,v=u-i,b=y*y+v*v;if(b>4*t&&g--){var O=a+h,E=o+p,S=l+f,C=je(O*O+E*E+S*S),I=$n(S/=C),L=Ot(Ot(S)-1)<Et||Ot(s-d)<Et?(s+d)/2:mr(E,O),k=e(L,I),w=k[0],V=k[1],P=w-r,B=V-i,_=v*P-y*B;(_*_/b>t||Ot((y*P+v*B)/b-.5)>.3||a*h+o*p+l*f<CA)&&(n(r,i,s,a,o,l,w,V,L,O/=C,E/=C,S,g,m),m.point(w,V),n(w,V,L,O,E,S,c,u,d,h,p,f,g,m))}}return function(r){var i,s,a,o,l,c,u,d,h,p,f,g,m={point:y,lineStart:v,lineEnd:O,polygonStart:function(){r.polygonStart(),m.lineStart=E},polygonEnd:function(){r.polygonEnd(),m.lineStart=v}};function y(I,L){I=e(I,L),r.point(I[0],I[1])}function v(){d=NaN,m.point=b,r.lineStart()}function b(I,L){var k=ti([I,L]),w=e(I,L);n(d,h,u,p,f,g,d=w[0],h=w[1],u=I,p=k[0],f=k[1],g=k[2],Fm,r),r.point(d,h)}function O(){m.point=y,r.lineEnd()}function E(){v(),m.point=S,m.lineEnd=C}function S(I,L){b(i=I,L),s=d,a=h,o=p,l=f,c=g,m.point=b}function C(){n(d,h,u,p,f,g,s,a,i,o,l,c,Fm,r),m.lineEnd=O,O()}return m}}var kA=jc({point:function(e,t){this.stream.point(e*Ut,t*Ut)}});function DA(e){return jc({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function RA(e,t,n,r,i){function s(a,o){return a*=r,o*=i,[t+e*a,n-e*o]}return s.invert=function(a,o){return[(a-t)/e*r,(n-o)/e*i]},s}function jm(e,t,n,r,i,s){if(!s)return RA(e,t,n,r,i);var a=St(s),o=bt(s),l=a*e,c=o*e,u=a/e,d=o/e,h=(o*n-a*t)/e,p=(o*t+a*n)/e;function f(g,m){return g*=r,m*=i,[l*g-c*m+t,n-c*g-l*m]}return f.invert=function(g,m){return[r*(u*g-d*m+h),i*(p-d*g-u*m)]},f}function Wa(e){return Wm(function(){return e})()}function Wm(e){var t,n=150,r=480,i=250,s=0,a=0,o=0,l=0,c=0,u,d=0,h=1,p=1,f=null,g=Tm,m=null,y,v,b,O=Rc,E=.5,S,C,I,L,k;function w(_){return I(_[0]*Ut,_[1]*Ut)}function V(_){return _=I.invert(_[0],_[1]),_&&[_[0]*se,_[1]*se]}w.stream=function(_){return L&&k===_?L:L=kA(DA(u)(g(S(O(k=_)))))},w.preclip=function(_){return arguments.length?(g=_,f=void 0,B()):g},w.postclip=function(_){return arguments.length?(O=_,m=y=v=b=null,B()):O},w.clipAngle=function(_){return arguments.length?(g=+_?hA(f=_*Ut):(f=null,Tm),B()):f*se},w.clipExtent=function(_){return arguments.length?(O=_==null?(m=y=v=b=null,Rc):pA(m=+_[0][0],y=+_[0][1],v=+_[1][0],b=+_[1][1]),B()):m==null?null:[[m,y],[v,b]]},w.scale=function(_){return arguments.length?(n=+_,P()):n},w.translate=function(_){return arguments.length?(r=+_[0],i=+_[1],P()):[r,i]},w.center=function(_){return arguments.length?(s=_[0]%360*Ut,a=_[1]%360*Ut,P()):[s*se,a*se]},w.rotate=function(_){return arguments.length?(o=_[0]%360*Ut,l=_[1]%360*Ut,c=_.length>2?_[2]%360*Ut:0,P()):[o*se,l*se,c*se]},w.angle=function(_){return arguments.length?(d=_%360*Ut,P()):d*se},w.reflectX=function(_){return arguments.length?(h=_?-1:1,P()):h<0},w.reflectY=function(_){return arguments.length?(p=_?-1:1,P()):p<0},w.precision=function(_){return arguments.length?(S=zm(C,E=_*_),B()):je(E)},w.fitExtent=function(_,M){return Gm(w,_,M)},w.fitSize=function(_,M){return wA(w,_,M)},w.fitWidth=function(_,M){return $A(w,_,M)},w.fitHeight=function(_,M){return MA(w,_,M)};function P(){var _=jm(n,0,0,h,p,d).apply(null,t(s,a)),M=jm(n,r-_[0],i-_[1],h,p,d);return u=mm(o,l,c),C=Lc(t,M),I=Lc(u,C),S=zm(C,E),B()}function B(){return L=k=null,w}return function(){return t=e.apply(this,arguments),w.invert=t.invert&&V,P()}}function qm(e){var t=0,n=ut/3,r=Wm(e),i=r(t,n);return i.parallels=function(s){return arguments.length?r(t=s[0]*Ut,n=s[1]*Ut):[t*se,n*se]},i}function IA(e){var t=St(e);function n(r,i){return[r*t,bt(i)/t]}return n.invert=function(r,i){return[r/t,$n(i*t)]},n}function NA(e,t){var n=bt(e),r=(n+bt(t))/2;if(Ot(r)<Et)return IA(e);var i=1+n*(2*r-n),s=je(i)/r;function a(o,l){var c=je(i-2*r*bt(l))/r;return[c*bt(o*=r),s-c*St(o)]}return a.invert=function(o,l){var c=s-l,u=mr(o,Ot(c))*Bn(c);return c*r<0&&(u-=ut*Bn(o)*Bn(c)),[u/r,$n((i-(o*o+c*c)*r*r)/(2*r))]},a}function Ym(){return qm(NA).scale(155.424).center([0,33.6442])}function PA(){return Ym().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Yc(e,t){return[e,tA(eA((pe+t)/2))]}Yc.invert=function(e,t){return[e,2*hm(JC(t))-pe]};function UA(){return BA(Yc).scale(961/_e)}function BA(e){var t=Wa(e),n=t.center,r=t.scale,i=t.translate,s=t.clipExtent,a=null,o,l,c;t.scale=function(d){return arguments.length?(r(d),u()):r()},t.translate=function(d){return arguments.length?(i(d),u()):i()},t.center=function(d){return arguments.length?(n(d),u()):n()},t.clipExtent=function(d){return arguments.length?(d==null?a=o=l=c=null:(a=+d[0][0],o=+d[0][1],l=+d[1][0],c=+d[1][1]),u()):a==null?null:[[a,o],[l,c]]};function u(){var d=ut*r(),h=t(rA(t.rotate()).invert([0,0]));return s(a==null?[[h[0]-d,h[1]-d],[h[0]+d,h[1]+d]]:e===Yc?[[Math.max(h[0]-d,a),o],[Math.min(h[0]+d,l),c]]:[[a,Math.max(h[1]-d,o)],[l,Math.min(h[1]+d,c)]])}return u()}function qa(e,t){return[e,t]}qa.invert=qa;function HA(){return Wa(qa).scale(152.63)}function VA(e,t){var n=St(e),r=e===t?bt(e):(n-St(t))/(t-e),i=n/r+e;if(Ot(r)<Et)return qa;function s(a,o){var l=i-o,c=r*a;return[l*bt(c),i-l*St(c)]}return s.invert=function(a,o){var l=i-o,c=mr(a,Ot(l))*Bn(l);return l*r<0&&(c-=ut*Bn(a)*Bn(l)),[c/r,i-Bn(r)*je(a*a+l*l)]},s}function GA(){return qm(VA).scale(131.154).center([0,13.9389])}var ls=1.340264,cs=-.081106,us=893e-6,hs=.003796,Ya=je(3)/2,FA=12;function Zm(e,t){var n=$n(Ya*bt(t)),r=n*n,i=r*r*r;return[e*St(n)/(Ya*(ls+3*cs*r+i*(7*us+9*hs*r))),n*(ls+cs*r+i*(us+hs*r))]}Zm.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,s=0,a,o,l;s<FA&&(o=n*(ls+cs*r+i*(us+hs*r))-t,l=ls+3*cs*r+i*(7*us+9*hs*r),n-=a=o/l,r=n*n,i=r*r*r,!(Ot(a)<cm));++s);return[Ya*e*(ls+3*cs*r+i*(7*us+9*hs*r))/St(n),$n(bt(n)/Ya)]};function zA(){return Wa(Zm).scale(177.158)}function Xm(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),t*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}Xm.invert=function(e,t){var n=t,r=25,i;do{var s=n*n,a=s*s;n-=i=(n*(1.007226+s*(.015085+a*(-.044475+.028874*s-.005916*a)))-t)/(1.007226+s*(.015085*3+a*(-.044475*7+.028874*9*s-.005916*11*a)))}while(Ot(i)>Et&&--r>0);return[e/(.8707+(s=n*n)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),n]};function jA(){return Wa(Xm).scale(175.295)}function WA(e,t){return e.parent===t.parent?1:2}function qA(e){return e.reduce(YA,0)/e.length}function YA(e,t){return e+t.x}function ZA(e){return 1+e.reduce(XA,0)}function XA(e,t){return Math.max(e,t.y)}function KA(e){for(var t;t=e.children;)e=t[0];return e}function QA(e){for(var t;t=e.children;)e=t[t.length-1];return e}function JA(){var e=WA,t=1,n=1,r=!1;function i(s){var a,o=0;s.eachAfter(function(h){var p=h.children;p?(h.x=qA(p),h.y=ZA(p)):(h.x=a?o+=e(h,a):0,h.y=0,a=h)});var l=KA(s),c=QA(s),u=l.x-e(l,c)/2,d=c.x+e(c,l)/2;return s.eachAfter(r?function(h){h.x=(h.x-s.x)*t,h.y=(s.y-h.y)*n}:function(h){h.x=(h.x-u)/(d-u)*t,h.y=(1-(s.y?h.y/s.y:1))*n})}return i.separation=function(s){return arguments.length?(e=s,i):e},i.size=function(s){return arguments.length?(r=!1,t=+s[0],n=+s[1],i):r?null:[t,n]},i.nodeSize=function(s){return arguments.length?(r=!0,t=+s[0],n=+s[1],i):r?[t,n]:null},i}function tL(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function eL(){return this.eachAfter(tL)}function nL(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function rL(e,t){for(var n=this,r=[n],i,s,a=-1;n=r.pop();)if(e.call(t,n,++a,this),i=n.children)for(s=i.length-1;s>=0;--s)r.push(i[s]);return this}function iL(e,t){for(var n=this,r=[n],i=[],s,a,o,l=-1;n=r.pop();)if(i.push(n),s=n.children)for(a=0,o=s.length;a<o;++a)r.push(s[a]);for(;n=i.pop();)e.call(t,n,++l,this);return this}function sL(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function aL(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function oL(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function lL(e){for(var t=this,n=cL(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function cL(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function uL(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function hL(){return Array.from(this)}function dL(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function pL(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*fL(){var e=this,t,n=[e],r,i,s;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,s=r.length;i<s;++i)n.push(r[i]);while(n.length)}function ds(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=vL)):t===void 0&&(t=gL);for(var n=new ps(e),r,i=[n],s,a,o,l;r=i.pop();)if((a=t(r.data))&&(l=(a=Array.from(a)).length))for(r.children=a,o=l-1;o>=0;--o)i.push(s=a[o]=new ps(a[o])),s.parent=r,s.depth=r.depth+1;return n.eachBefore(xL)}function mL(){return ds(this).eachBefore(yL)}function gL(e){return e.children}function vL(e){return Array.isArray(e)?e[1]:null}function yL(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function xL(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function ps(e){this.data=e,this.depth=this.height=0,this.parent=null}ps.prototype=ds.prototype={constructor:ps,count:eL,each:nL,eachAfter:iL,eachBefore:rL,find:sL,sum:aL,sort:oL,path:lL,ancestors:uL,descendants:hL,leaves:dL,links:pL,copy:mL,[Symbol.iterator]:fL};function bL(e){return e==null?null:Km(e)}function Km(e){if(typeof e!="function")throw new Error;return e}function vr(){return 0}function ri(e){return function(){return e}}const _L=1664525,EL=1013904223,Qm=4294967296;function OL(){let e=1;return()=>(e=(_L*e+EL)%Qm)/Qm}function TL(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function SL(e,t){let n=e.length,r,i;for(;n;)i=t()*n--|0,r=e[n],e[n]=e[i],e[i]=r;return e}function wL(e,t){for(var n=0,r=(e=SL(Array.from(e),t)).length,i=[],s,a;n<r;)s=e[n],a&&Jm(a,s)?++n:(a=ML(i=$L(i,s)),n=0);return a}function $L(e,t){var n,r;if(Zc(t,e))return[t];for(n=0;n<e.length;++n)if(Za(t,e[n])&&Zc(fs(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(Za(fs(e[n],e[r]),t)&&Za(fs(e[n],t),e[r])&&Za(fs(e[r],t),e[n])&&Zc(tg(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function Za(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function Jm(e,t){var n=e.r-t.r+Math.max(e.r,t.r,1)*1e-9,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Zc(e,t){for(var n=0;n<t.length;++n)if(!Jm(e,t[n]))return!1;return!0}function ML(e){switch(e.length){case 1:return CL(e[0]);case 2:return fs(e[0],e[1]);case 3:return tg(e[0],e[1],e[2])}}function CL(e){return{x:e.x,y:e.y,r:e.r}}function fs(e,t){var n=e.x,r=e.y,i=e.r,s=t.x,a=t.y,o=t.r,l=s-n,c=a-r,u=o-i,d=Math.sqrt(l*l+c*c);return{x:(n+s+l/d*u)/2,y:(r+a+c/d*u)/2,r:(d+i+o)/2}}function tg(e,t,n){var r=e.x,i=e.y,s=e.r,a=t.x,o=t.y,l=t.r,c=n.x,u=n.y,d=n.r,h=r-a,p=r-c,f=i-o,g=i-u,m=l-s,y=d-s,v=r*r+i*i-s*s,b=v-a*a-o*o+l*l,O=v-c*c-u*u+d*d,E=p*f-h*g,S=(f*O-g*b)/(E*2)-r,C=(g*m-f*y)/E,I=(p*b-h*O)/(E*2)-i,L=(h*y-p*m)/E,k=C*C+L*L-1,w=2*(s+S*C+I*L),V=S*S+I*I-s*s,P=-(Math.abs(k)>1e-6?(w+Math.sqrt(w*w-4*k*V))/(2*k):V/w);return{x:r+S+C*P,y:i+I+L*P,r:P}}function eg(e,t,n){var r=e.x-t.x,i,s,a=e.y-t.y,o,l,c=r*r+a*a;c?(s=t.r+n.r,s*=s,l=e.r+n.r,l*=l,s>l?(i=(c+l-s)/(2*c),o=Math.sqrt(Math.max(0,l/c-i*i)),n.x=e.x-i*r-o*a,n.y=e.y-i*a+o*r):(i=(c+s-l)/(2*c),o=Math.sqrt(Math.max(0,s/c-i*i)),n.x=t.x+i*r-o*a,n.y=t.y+i*a+o*r)):(n.x=t.x+n.r,n.y=t.y)}function ng(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function rg(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,s=(t.y*n.r+n.y*t.r)/r;return i*i+s*s}function Xa(e){this._=e,this.next=null,this.previous=null}function AL(e,t){if(!(s=(e=TL(e)).length))return 0;var n,r,i,s,a,o,l,c,u,d,h;if(n=e[0],n.x=0,n.y=0,!(s>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(s>2))return n.r+r.r;eg(r,n,i=e[2]),n=new Xa(n),r=new Xa(r),i=new Xa(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(l=3;l<s;++l){eg(n._,r._,i=e[l]),i=new Xa(i),c=r.next,u=n.previous,d=r._.r,h=n._.r;do if(d<=h){if(ng(c._,i._)){r=c,n.next=r,r.previous=n,--l;continue t}d+=c._.r,c=c.next}else{if(ng(u._,i._)){n=u,n.next=r,r.previous=n,--l;continue t}h+=u._.r,u=u.previous}while(c!==u.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=rg(n);(i=i.next)!==r;)(o=rg(i))<a&&(n=i,a=o);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=wL(n,t),l=0;l<s;++l)n=e[l],n.x-=i.x,n.y-=i.y;return i.r}function LL(e){return Math.sqrt(e.value)}function kL(){var e=null,t=1,n=1,r=vr;function i(s){const a=OL();return s.x=t/2,s.y=n/2,e?s.eachBefore(ig(e)).eachAfter(Xc(r,.5,a)).eachBefore(sg(1)):s.eachBefore(ig(LL)).eachAfter(Xc(vr,1,a)).eachAfter(Xc(r,s.r/Math.min(t,n),a)).eachBefore(sg(Math.min(t,n)/(2*s.r))),s}return i.radius=function(s){return arguments.length?(e=bL(s),i):e},i.size=function(s){return arguments.length?(t=+s[0],n=+s[1],i):[t,n]},i.padding=function(s){return arguments.length?(r=typeof s=="function"?s:ri(+s),i):r},i}function ig(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Xc(e,t,n){return function(r){if(i=r.children){var i,s,a=i.length,o=e(r)*t||0,l;if(o)for(s=0;s<a;++s)i[s].r+=o;if(l=AL(i,n),o)for(s=0;s<a;++s)i[s].r-=o;r.r=l+o}}}function sg(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function DL(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function RL(e,t,n,r,i){for(var s=e.children,a,o=-1,l=s.length,c=e.value&&(r-t)/e.value;++o<l;)a=s[o],a.y0=n,a.y1=i,a.x0=t,a.x1=t+=a.value*c}function IL(e,t){return e.parent===t.parent?1:2}function Kc(e){var t=e.children;return t?t[0]:e.t}function Qc(e){var t=e.children;return t?t[t.length-1]:e.t}function NL(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function PL(e){for(var t=0,n=0,r=e.children,i=r.length,s;--i>=0;)s=r[i],s.z+=t,s.m+=t,t+=s.s+(n+=s.c)}function UL(e,t,n){return e.a.parent===t.parent?e.a:n}function Ka(e,t){this._=e,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=t}Ka.prototype=Object.create(ps.prototype);function BL(e){for(var t=new Ka(e,0),n,r=[t],i,s,a,o;n=r.pop();)if(s=n._.children)for(n.children=new Array(o=s.length),a=o-1;a>=0;--a)r.push(i=n.children[a]=new Ka(s[a],a)),i.parent=n;return(t.parent=new Ka(null,0)).children=[t],t}function HL(){var e=IL,t=1,n=1,r=null;function i(c){var u=BL(c);if(u.eachAfter(s),u.parent.m=-u.z,u.eachBefore(a),r)c.eachBefore(l);else{var d=c,h=c,p=c;c.eachBefore(function(v){v.x<d.x&&(d=v),v.x>h.x&&(h=v),v.depth>p.depth&&(p=v)});var f=d===h?1:e(d,h)/2,g=f-d.x,m=t/(h.x+f+g),y=n/(p.depth||1);c.eachBefore(function(v){v.x=(v.x+g)*m,v.y=v.depth*y})}return c}function s(c){var u=c.children,d=c.parent.children,h=c.i?d[c.i-1]:null;if(u){PL(c);var p=(u[0].z+u[u.length-1].z)/2;h?(c.z=h.z+e(c._,h._),c.m=c.z-p):c.z=p}else h&&(c.z=h.z+e(c._,h._));c.parent.A=o(c,h,c.parent.A||d[0])}function a(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function o(c,u,d){if(u){for(var h=c,p=c,f=u,g=h.parent.children[0],m=h.m,y=p.m,v=f.m,b=g.m,O;f=Qc(f),h=Kc(h),f&&h;)g=Kc(g),p=Qc(p),p.a=c,O=f.z+v-h.z-m+e(f._,h._),O>0&&(NL(UL(f,c,d),c,O),m+=O,y+=O),v+=f.m,m+=h.m,b+=g.m,y+=p.m;f&&!Qc(p)&&(p.t=f,p.m+=v-y),h&&!Kc(g)&&(g.t=h,g.m+=m-b,d=c)}return d}function l(c){c.x*=t,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(e=c,i):e},i.size=function(c){return arguments.length?(r=!1,t=+c[0],n=+c[1],i):r?null:[t,n]},i.nodeSize=function(c){return arguments.length?(r=!0,t=+c[0],n=+c[1],i):r?[t,n]:null},i}function VL(e,t,n,r,i){for(var s=e.children,a,o=-1,l=s.length,c=e.value&&(i-n)/e.value;++o<l;)a=s[o],a.x0=t,a.x1=r,a.y0=n,a.y1=n+=a.value*c}var GL=(1+Math.sqrt(5))/2;function FL(e,t,n,r,i,s){for(var a=[],o=t.children,l,c,u=0,d=0,h=o.length,p,f,g=t.value,m,y,v,b,O,E,S;u<h;){p=i-n,f=s-r;do m=o[d++].value;while(!m&&d<h);for(y=v=m,E=Math.max(f/p,p/f)/(g*e),S=m*m*E,O=Math.max(v/S,S/y);d<h;++d){if(m+=c=o[d].value,c<y&&(y=c),c>v&&(v=c),S=m*m*E,b=Math.max(v/S,S/y),b>O){m-=c;break}O=b}a.push(l={value:m,dice:p<f,children:o.slice(u,d)}),l.dice?RL(l,n,r,i,g?r+=f*m/g:s):VL(l,n,r,g?n+=p*m/g:i,s),g-=m,u=d}return a}const zL=function e(t){function n(r,i,s,a,o){FL(t,r,i,s,a,o)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(GL);function jL(){var e=zL,t=!1,n=1,r=1,i=[0],s=vr,a=vr,o=vr,l=vr,c=vr;function u(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(d),i=[0],t&&h.eachBefore(DL),h}function d(h){var p=i[h.depth],f=h.x0+p,g=h.y0+p,m=h.x1-p,y=h.y1-p;m<f&&(f=m=(f+m)/2),y<g&&(g=y=(g+y)/2),h.x0=f,h.y0=g,h.x1=m,h.y1=y,h.children&&(p=i[h.depth+1]=s(h)/2,f+=c(h)-p,g+=a(h)-p,m-=o(h)-p,y-=l(h)-p,m<f&&(f=m=(f+m)/2),y<g&&(g=y=(g+y)/2),e(h,f,g,m,y))}return u.round=function(h){return arguments.length?(t=!!h,u):t},u.size=function(h){return arguments.length?(n=+h[0],r=+h[1],u):[n,r]},u.tile=function(h){return arguments.length?(e=Km(h),u):e},u.padding=function(h){return arguments.length?u.paddingInner(h).paddingOuter(h):u.paddingInner()},u.paddingInner=function(h){return arguments.length?(s=typeof h=="function"?h:ri(+h),u):s},u.paddingOuter=function(h){return arguments.length?u.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):u.paddingTop()},u.paddingTop=function(h){return arguments.length?(a=typeof h=="function"?h:ri(+h),u):a},u.paddingRight=function(h){return arguments.length?(o=typeof h=="function"?h:ri(+h),u):o},u.paddingBottom=function(h){return arguments.length?(l=typeof h=="function"?h:ri(+h),u):l},u.paddingLeft=function(h){return arguments.length?(c=typeof h=="function"?h:ri(+h),u):c},u}function Qa(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new wc(t)}function WL(e){return e.innerRadius}function qL(e){return e.outerRadius}function YL(e){return e.startAngle}function ZL(e){return e.endAngle}function XL(e){return e&&e.padAngle}function KL(e,t,n,r,i,s,a,o){var l=n-e,c=r-t,u=a-i,d=o-s,h=d*l-u*c;if(!(h*h<ee))return h=(u*(t-s)-d*(e-i))/h,[e+h*l,t+h*c]}function Ja(e,t,n,r,i,s,a){var o=e-n,l=t-r,c=(a?s:-s)/Yr(o*o+l*l),u=c*l,d=-c*o,h=e+u,p=t+d,f=n+u,g=r+d,m=(h+f)/2,y=(p+g)/2,v=f-h,b=g-p,O=v*v+b*b,E=i-s,S=h*g-f*p,C=(b<0?-1:1)*Yr(RM(0,E*E*O-S*S)),I=(S*b-v*C)/O,L=(-S*v-b*C)/O,k=(S*b+v*C)/O,w=(-S*v+b*C)/O,V=I-m,P=L-y,B=k-m,_=w-y;return V*V+P*P>B*B+_*_&&(I=k,L=w),{cx:I,cy:L,x01:-u,y01:-d,x11:I*(i/E-1),y11:L*(i/E-1)}}function ms(){var e=WL,t=qL,n=ct(0),r=null,i=YL,s=ZL,a=XL,o=null,l=Qa(c);function c(){var u,d,h=+e.apply(this,arguments),p=+t.apply(this,arguments),f=i.apply(this,arguments)-_a,g=s.apply(this,arguments)-_a,m=uf(g-f),y=g>f;if(o||(o=u=l()),p<h&&(d=p,p=h,h=d),!(p>ee))o.moveTo(0,0);else if(m>Ea-ee)o.moveTo(p*dr(f),p*nn(f)),o.arc(0,0,p,f,g,!y),h>ee&&(o.moveTo(h*dr(g),h*nn(g)),o.arc(0,0,h,g,f,y));else{var v=f,b=g,O=f,E=g,S=m,C=m,I=a.apply(this,arguments)/2,L=I>ee&&(r?+r.apply(this,arguments):Yr(h*h+p*p)),k=cc(uf(p-h)/2,+n.apply(this,arguments)),w=k,V=k,P,B;if(L>ee){var _=hf(L/h*nn(I)),M=hf(L/p*nn(I));(S-=_*2)>ee?(_*=y?1:-1,O+=_,E-=_):(S=0,O=E=(f+g)/2),(C-=M*2)>ee?(M*=y?1:-1,v+=M,b-=M):(C=0,v=b=(f+g)/2)}var A=p*dr(v),N=p*nn(v),U=h*dr(E),W=h*nn(E);if(k>ee){var j=p*dr(b),it=p*nn(b),nt=h*dr(O),mt=h*nn(O),rt;if(m<Ji)if(rt=KL(A,N,nt,mt,j,it,U,W)){var Y=A-rt[0],J=N-rt[1],vt=j-rt[0],z=it-rt[1],K=1/nn(IM((Y*vt+J*z)/(Yr(Y*Y+J*J)*Yr(vt*vt+z*z)))/2),ot=Yr(rt[0]*rt[0]+rt[1]*rt[1]);w=cc(k,(h-ot)/(K-1)),V=cc(k,(p-ot)/(K+1))}else w=V=0}C>ee?V>ee?(P=Ja(nt,mt,A,N,p,V,y),B=Ja(j,it,U,W,p,V,y),o.moveTo(P.cx+P.x01,P.cy+P.y01),V<k?o.arc(P.cx,P.cy,V,te(P.y01,P.x01),te(B.y01,B.x01),!y):(o.arc(P.cx,P.cy,V,te(P.y01,P.x01),te(P.y11,P.x11),!y),o.arc(0,0,p,te(P.cy+P.y11,P.cx+P.x11),te(B.cy+B.y11,B.cx+B.x11),!y),o.arc(B.cx,B.cy,V,te(B.y11,B.x11),te(B.y01,B.x01),!y))):(o.moveTo(A,N),o.arc(0,0,p,v,b,!y)):o.moveTo(A,N),!(h>ee)||!(S>ee)?o.lineTo(U,W):w>ee?(P=Ja(U,W,j,it,h,-w,y),B=Ja(A,N,nt,mt,h,-w,y),o.lineTo(P.cx+P.x01,P.cy+P.y01),w<k?o.arc(P.cx,P.cy,w,te(P.y01,P.x01),te(B.y01,B.x01),!y):(o.arc(P.cx,P.cy,w,te(P.y01,P.x01),te(P.y11,P.x11),!y),o.arc(0,0,h,te(P.cy+P.y11,P.cx+P.x11),te(B.cy+B.y11,B.cx+B.x11),y),o.arc(B.cx,B.cy,w,te(B.y11,B.x11),te(B.y01,B.x01),!y))):o.arc(0,0,h,E,O,y)}if(o.closePath(),u)return o=null,u+""||null}return c.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +s.apply(this,arguments))/2-Ji/2;return[dr(d)*u,nn(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:ct(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:ct(+u),c):t},c.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:ct(+u),c):n},c.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:ct(+u),c):r},c.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:ct(+u),c):i},c.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:ct(+u),c):s},c.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:ct(+u),c):a},c.context=function(u){return arguments.length?(o=u??null,c):o},c}function Jc(e){return e[0]}function tu(e){return e[1]}function gs(e,t){var n=ct(!0),r=null,i=Oa,s=null,a=Qa(o);e=typeof e=="function"?e:e===void 0?Jc:ct(e),t=typeof t=="function"?t:t===void 0?tu:ct(t);function o(l){var c,u=(l=ma(l)).length,d,h=!1,p;for(r==null&&(s=i(p=a())),c=0;c<=u;++c)!(c<u&&n(d=l[c],c,l))===h&&((h=!h)?s.lineStart():s.lineEnd()),h&&s.point(+e(d,c,l),+t(d,c,l));if(p)return s=null,p+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:ct(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:ct(+l),o):t},o.defined=function(l){return arguments.length?(n=typeof l=="function"?l:ct(!!l),o):n},o.curve=function(l){return arguments.length?(i=l,r!=null&&(s=i(r)),o):i},o.context=function(l){return arguments.length?(l==null?r=s=null:s=i(r=l),o):r},o}function eu(e,t,n){var r=null,i=ct(!0),s=null,a=Oa,o=null,l=Qa(c);e=typeof e=="function"?e:e===void 0?Jc:ct(+e),t=typeof t=="function"?t:ct(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?tu:ct(+n);function c(d){var h,p,f,g=(d=ma(d)).length,m,y=!1,v,b=new Array(g),O=new Array(g);for(s==null&&(o=a(v=l())),h=0;h<=g;++h){if(!(h<g&&i(m=d[h],h,d))===y)if(y=!y)p=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),f=h-1;f>=p;--f)o.point(b[f],O[f]);o.lineEnd(),o.areaEnd()}y&&(b[h]=+e(m,h,d),O[h]=+t(m,h,d),o.point(r?+r(m,h,d):b[h],n?+n(m,h,d):O[h]))}if(v)return o=null,v+""||null}function u(){return gs().defined(i).curve(a).context(s)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:ct(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:ct(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:ct(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:ct(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:ct(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:ct(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(d){return arguments.length?(i=typeof d=="function"?d:ct(!!d),c):i},c.curve=function(d){return arguments.length?(a=d,s!=null&&(o=a(s)),c):a},c.context=function(d){return arguments.length?(d==null?s=o=null:o=a(s=d),c):s},c}function QL(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function JL(e){return e}function tk(){var e=JL,t=QL,n=null,r=ct(0),i=ct(Ea),s=ct(0);function a(o){var l,c=(o=ma(o)).length,u,d,h=0,p=new Array(c),f=new Array(c),g=+r.apply(this,arguments),m=Math.min(Ea,Math.max(-Ea,i.apply(this,arguments)-g)),y,v=Math.min(Math.abs(m)/c,s.apply(this,arguments)),b=v*(m<0?-1:1),O;for(l=0;l<c;++l)(O=f[p[l]=l]=+e(o[l],l,o))>0&&(h+=O);for(t!=null?p.sort(function(E,S){return t(f[E],f[S])}):n!=null&&p.sort(function(E,S){return n(o[E],o[S])}),l=0,d=h?(m-c*b)/h:0;l<c;++l,g=y)u=p[l],O=f[u],y=g+(O>0?O*d:0)+b,f[u]={data:o[u],index:l,value:O,startAngle:g,endAngle:y,padAngle:v};return f}return a.value=function(o){return arguments.length?(e=typeof o=="function"?o:ct(+o),a):e},a.sortValues=function(o){return arguments.length?(t=o,n=null,a):t},a.sort=function(o){return arguments.length?(n=o,t=null,a):n},a.startAngle=function(o){return arguments.length?(r=typeof o=="function"?o:ct(+o),a):r},a.endAngle=function(o){return arguments.length?(i=typeof o=="function"?o:ct(+o),a):i},a.padAngle=function(o){return arguments.length?(s=typeof o=="function"?o:ct(+o),a):s},a}var ek=og(Oa);function ag(e){this._curve=e}ag.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function og(e){function t(n){return new ag(e(n))}return t._curve=e,t}function nk(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(og(n)):t()._curve},e}function rk(){return nk(gs().curve(ek))}class ik{constructor(t,n){this._context=t,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(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function sk(e){return new ik(e,!0)}function ak(e){return e.source}function ok(e){return e.target}function lk(e){let t=ak,n=ok,r=Jc,i=tu,s=null,a=null,o=Qa(l);function l(){let c;const u=Mw.call(arguments),d=t.apply(this,u),h=n.apply(this,u);if(s==null&&(a=e(c=o())),a.lineStart(),u[0]=d,a.point(+r.apply(this,u),+i.apply(this,u)),u[0]=h,a.point(+r.apply(this,u),+i.apply(this,u)),a.lineEnd(),c)return a=null,c+""||null}return l.source=function(c){return arguments.length?(t=c,l):t},l.target=function(c){return arguments.length?(n=c,l):n},l.x=function(c){return arguments.length?(r=typeof c=="function"?c:ct(+c),l):r},l.y=function(c){return arguments.length?(i=typeof c=="function"?c:ct(+c),l):i},l.context=function(c){return arguments.length?(c==null?s=a=null:a=e(s=c),l):s},l}function ck(){return lk(sk)}let ht=class{constructor(t,n,r){if(this.type="",this.renderType=Q.HTML,this.id="",this.parent=void 0,this.configs={},this.model=t,this.services=n,r&&(this.configs=r,this.configs.id)){const i=x(this.model.getOptions(),"style","prefix");this.id=`${i}--${this.configs.id}`}this.parent||this.setParent(D(this.services.domUtils.getMainContainer()))}init(){}render(t=!0){console.error("Error: Component did not provide the required render function.")}destroy(){}setModel(t){this.model=t}setServices(t){this.services=t}setParent(t){var n;const r=this.parent;if(this.parent=t,!(r&&r.node()===t.node())&&this.type){const i=x(this.model.getOptions(),"style","prefix");(n=this.parent)==null||n.classed(`${he}--${i}--${this.type}`,!0),r&&r.classed(`${he}--${i}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(t={ariaLabel:null,isPresentational:!1,withinChartClip:!1}){if(this.type){const n=x(this.model.getOptions(),"style","prefix"),r=this.id?`#${this.id}`:"",i=R.appendOrSelect(this.parent,`${this.renderType===Q.SVG?"svg":"div"}${r}.${he}--${n}--${this.type}`);if(t.ariaLabel&&i.attr("aria-label",t.ariaLabel),t.isPresentational&&i.attr("role","presentation"),t.withinChartClip){const s=this.model.get("chartClipId");if(s){const a=D(`#${s}`).select("rect");a.size()!==0&&parseFloat(a.attr("height"))>0&&i.attr("clip-path",`url(#${s})`)}}return i.attr("width","100%").attr("height","100%")}return this.parent}getOptions(){return this.configs.options?st({},this.model.getOptions(),this.configs.options):this.model.getOptions()}};/*! @license DOMPurify 3.2.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.1/LICENSE */const{entries:lg,setPrototypeOf:cg,isFrozen:uk,getPrototypeOf:hk,getOwnPropertyDescriptor:dk}=Object;let{freeze:ae,seal:Re,create:ug}=Object,{apply:nu,construct:ru}=typeof Reflect<"u"&&Reflect;ae||(ae=function(e){return e}),Re||(Re=function(e){return e}),nu||(nu=function(e,t,n){return e.apply(t,n)}),ru||(ru=function(e,t){return new e(...t)});const to=Ee(Array.prototype.forEach),hg=Ee(Array.prototype.pop),vs=Ee(Array.prototype.push),eo=Ee(String.prototype.toLowerCase),iu=Ee(String.prototype.toString),dg=Ee(String.prototype.match),ys=Ee(String.prototype.replace),pk=Ee(String.prototype.indexOf),fk=Ee(String.prototype.trim),We=Ee(Object.prototype.hasOwnProperty),oe=Ee(RegExp.prototype.test),xs=mk(TypeError);function Ee(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return nu(e,t,r)}}function mk(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ru(e,n)}}function dt(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:eo;cg&&cg(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const s=n(i);s!==i&&(uk(t)||(t[r]=s),i=s)}e[i]=!0}return e}function gk(e){for(let t=0;t<e.length;t++)We(e,t)||(e[t]=null);return e}function yr(e){const t=ug(null);for(const[n,r]of lg(e))We(e,n)&&(Array.isArray(r)?t[n]=gk(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=yr(r):t[n]=r);return t}function bs(e,t){for(;e!==null;){const r=dk(e,t);if(r){if(r.get)return Ee(r.get);if(typeof r.value=="function")return Ee(r.value)}e=hk(e)}function n(){return null}return n}const pg=ae(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),su=ae(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),au=ae(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),vk=ae(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ou=ae(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),yk=ae(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),fg=ae(["#text"]),mg=ae(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),lu=ae(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),gg=ae(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),no=ae(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),xk=Re(/\{\{[\w\W]*|[\w\W]*\}\}/gm),bk=Re(/<%[\w\W]*|[\w\W]*%>/gm),_k=Re(/\${[\w\W]*}/gm),Ek=Re(/^data-[\-\w.\u00B7-\uFFFF]/),Ok=Re(/^aria-[\-\w]+$/),vg=Re(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Tk=Re(/^(?:\w+script|data):/i),Sk=Re(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),yg=Re(/^html$/i),wk=Re(/^[a-z][.\w]*(-[.\w]+)+$/i);var xg=Object.freeze({__proto__:null,ARIA_ATTR:Ok,ATTR_WHITESPACE:Sk,CUSTOM_ELEMENT:wk,DATA_ATTR:Ek,DOCTYPE_NAME:yg,ERB_EXPR:bk,IS_ALLOWED_URI:vg,IS_SCRIPT_OR_DATA:Tk,MUSTACHE_EXPR:xk,TMPLIT_EXPR:_k});const _s={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},$k=function(){return typeof window>"u"?null:window},Mk=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function bg(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$k();const t=$=>bg($);if(t.version="3.2.1",t.removed=[],!e||!e.document||e.document.nodeType!==_s.document)return t.isSupported=!1,t;let{document:n}=e;const r=n,i=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:o,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:h,trustedTypes:p}=e,f=l.prototype,g=bs(f,"cloneNode"),m=bs(f,"remove"),y=bs(f,"nextSibling"),v=bs(f,"childNodes"),b=bs(f,"parentNode");if(typeof a=="function"){const $=n.createElement("template");$.content&&$.content.ownerDocument&&(n=$.content.ownerDocument)}let O,E="";const{implementation:S,createNodeIterator:C,createDocumentFragment:I,getElementsByTagName:L}=n,{importNode:k}=r;let w={};t.isSupported=typeof lg=="function"&&typeof b=="function"&&S&&S.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:V,ERB_EXPR:P,TMPLIT_EXPR:B,DATA_ATTR:_,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:A,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:U}=xg;let{IS_ALLOWED_URI:W}=xg,j=null;const it=dt({},[...pg,...su,...au,...ou,...fg]);let nt=null;const mt=dt({},[...mg,...lu,...gg,...no]);let rt=Object.seal(ug(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Y=null,J=null,vt=!0,z=!0,K=!1,ot=!0,F=!1,Lt=!0,pt=!1,Wt=!1,qt=!1,tt=!1,Mt=!1,ln=!1,Ye=!0,Hv=!1;const gU="user-content-";let ku=!0,Ss=!1,li={},ci=null;const Vv=dt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Gv=null;const Fv=dt({},["audio","video","img","source","image","track"]);let Du=null;const zv=dt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),yo="http://www.w3.org/1998/Math/MathML",xo="http://www.w3.org/2000/svg",An="http://www.w3.org/1999/xhtml";let ui=An,Ru=!1,Iu=null;const vU=dt({},[yo,xo,An],iu);let bo=dt({},["mi","mo","mn","ms","mtext"]),_o=dt({},["annotation-xml"]);const yU=dt({},["title","style","font","a","script"]);let ws=null;const xU=["application/xhtml+xml","text/html"],bU="text/html";let Zt=null,hi=null;const _U=n.createElement("form"),jv=function($){return $ instanceof RegExp||$ instanceof Function},Nu=function(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(hi&&hi===$)){if((!$||typeof $!="object")&&($={}),$=yr($),ws=xU.indexOf($.PARSER_MEDIA_TYPE)===-1?bU:$.PARSER_MEDIA_TYPE,Zt=ws==="application/xhtml+xml"?iu:eo,j=We($,"ALLOWED_TAGS")?dt({},$.ALLOWED_TAGS,Zt):it,nt=We($,"ALLOWED_ATTR")?dt({},$.ALLOWED_ATTR,Zt):mt,Iu=We($,"ALLOWED_NAMESPACES")?dt({},$.ALLOWED_NAMESPACES,iu):vU,Du=We($,"ADD_URI_SAFE_ATTR")?dt(yr(zv),$.ADD_URI_SAFE_ATTR,Zt):zv,Gv=We($,"ADD_DATA_URI_TAGS")?dt(yr(Fv),$.ADD_DATA_URI_TAGS,Zt):Fv,ci=We($,"FORBID_CONTENTS")?dt({},$.FORBID_CONTENTS,Zt):Vv,Y=We($,"FORBID_TAGS")?dt({},$.FORBID_TAGS,Zt):{},J=We($,"FORBID_ATTR")?dt({},$.FORBID_ATTR,Zt):{},li=We($,"USE_PROFILES")?$.USE_PROFILES:!1,vt=$.ALLOW_ARIA_ATTR!==!1,z=$.ALLOW_DATA_ATTR!==!1,K=$.ALLOW_UNKNOWN_PROTOCOLS||!1,ot=$.ALLOW_SELF_CLOSE_IN_ATTR!==!1,F=$.SAFE_FOR_TEMPLATES||!1,Lt=$.SAFE_FOR_XML!==!1,pt=$.WHOLE_DOCUMENT||!1,tt=$.RETURN_DOM||!1,Mt=$.RETURN_DOM_FRAGMENT||!1,ln=$.RETURN_TRUSTED_TYPE||!1,qt=$.FORCE_BODY||!1,Ye=$.SANITIZE_DOM!==!1,Hv=$.SANITIZE_NAMED_PROPS||!1,ku=$.KEEP_CONTENT!==!1,Ss=$.IN_PLACE||!1,W=$.ALLOWED_URI_REGEXP||vg,ui=$.NAMESPACE||An,bo=$.MATHML_TEXT_INTEGRATION_POINTS||bo,_o=$.HTML_INTEGRATION_POINTS||_o,rt=$.CUSTOM_ELEMENT_HANDLING||{},$.CUSTOM_ELEMENT_HANDLING&&jv($.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(rt.tagNameCheck=$.CUSTOM_ELEMENT_HANDLING.tagNameCheck),$.CUSTOM_ELEMENT_HANDLING&&jv($.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(rt.attributeNameCheck=$.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),$.CUSTOM_ELEMENT_HANDLING&&typeof $.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(rt.allowCustomizedBuiltInElements=$.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),F&&(z=!1),Mt&&(tt=!0),li&&(j=dt({},fg),nt=[],li.html===!0&&(dt(j,pg),dt(nt,mg)),li.svg===!0&&(dt(j,su),dt(nt,lu),dt(nt,no)),li.svgFilters===!0&&(dt(j,au),dt(nt,lu),dt(nt,no)),li.mathMl===!0&&(dt(j,ou),dt(nt,gg),dt(nt,no))),$.ADD_TAGS&&(j===it&&(j=yr(j)),dt(j,$.ADD_TAGS,Zt)),$.ADD_ATTR&&(nt===mt&&(nt=yr(nt)),dt(nt,$.ADD_ATTR,Zt)),$.ADD_URI_SAFE_ATTR&&dt(Du,$.ADD_URI_SAFE_ATTR,Zt),$.FORBID_CONTENTS&&(ci===Vv&&(ci=yr(ci)),dt(ci,$.FORBID_CONTENTS,Zt)),ku&&(j["#text"]=!0),pt&&dt(j,["html","head","body"]),j.table&&(dt(j,["tbody"]),delete Y.tbody),$.TRUSTED_TYPES_POLICY){if(typeof $.TRUSTED_TYPES_POLICY.createHTML!="function")throw xs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof $.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw xs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');O=$.TRUSTED_TYPES_POLICY,E=O.createHTML("")}else O===void 0&&(O=Mk(p,i)),O!==null&&typeof E=="string"&&(E=O.createHTML(""));ae&&ae($),hi=$}},Wv=dt({},[...su,...au,...vk]),qv=dt({},[...ou,...yk]),EU=function($){let Z=b($);(!Z||!Z.tagName)&&(Z={namespaceURI:ui,tagName:"template"});const q=eo($.tagName),Tt=eo(Z.tagName);return Iu[$.namespaceURI]?$.namespaceURI===xo?Z.namespaceURI===An?q==="svg":Z.namespaceURI===yo?q==="svg"&&(Tt==="annotation-xml"||bo[Tt]):!!Wv[q]:$.namespaceURI===yo?Z.namespaceURI===An?q==="math":Z.namespaceURI===xo?q==="math"&&_o[Tt]:!!qv[q]:$.namespaceURI===An?Z.namespaceURI===xo&&!_o[Tt]||Z.namespaceURI===yo&&!bo[Tt]?!1:!qv[q]&&(yU[q]||!Wv[q]):!!(ws==="application/xhtml+xml"&&Iu[$.namespaceURI]):!1},_r=function($){vs(t.removed,{element:$});try{b($).removeChild($)}catch{m($)}},Eo=function($,Z){try{vs(t.removed,{attribute:Z.getAttributeNode($),from:Z})}catch{vs(t.removed,{attribute:null,from:Z})}if(Z.removeAttribute($),$==="is"&&!nt[$])if(tt||Mt)try{_r(Z)}catch{}else try{Z.setAttribute($,"")}catch{}},Yv=function($){let Z=null,q=null;if(qt)$="<remove></remove>"+$;else{const zt=dg($,/^[\r\n\t ]+/);q=zt&&zt[0]}ws==="application/xhtml+xml"&&ui===An&&($='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+$+"</body></html>");const Tt=O?O.createHTML($):$;if(ui===An)try{Z=new h().parseFromString(Tt,ws)}catch{}if(!Z||!Z.documentElement){Z=S.createDocument(ui,"template",null);try{Z.documentElement.innerHTML=Ru?E:Tt}catch{}}const Qt=Z.body||Z.documentElement;return $&&q&&Qt.insertBefore(n.createTextNode(q),Qt.childNodes[0]||null),ui===An?L.call(Z,pt?"html":"body")[0]:pt?Z.documentElement:Qt},Zv=function($){return C.call($.ownerDocument||$,$,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Xv=function($){return $ instanceof d&&(typeof $.nodeName!="string"||typeof $.textContent!="string"||typeof $.removeChild!="function"||!($.attributes instanceof u)||typeof $.removeAttribute!="function"||typeof $.setAttribute!="function"||typeof $.namespaceURI!="string"||typeof $.insertBefore!="function"||typeof $.hasChildNodes!="function")},Kv=function($){return typeof o=="function"&&$ instanceof o};function Ln($,Z,q){w[$]&&to(w[$],Tt=>{Tt.call(t,Z,q,hi)})}const Qv=function($){let Z=null;if(Ln("beforeSanitizeElements",$,null),Xv($))return _r($),!0;const q=Zt($.nodeName);if(Ln("uponSanitizeElement",$,{tagName:q,allowedTags:j}),$.hasChildNodes()&&!Kv($.firstElementChild)&&oe(/<[/\w]/g,$.innerHTML)&&oe(/<[/\w]/g,$.textContent)||$.nodeType===_s.progressingInstruction||Lt&&$.nodeType===_s.comment&&oe(/<[/\w]/g,$.data))return _r($),!0;if(!j[q]||Y[q]){if(!Y[q]&&t0(q)&&(rt.tagNameCheck instanceof RegExp&&oe(rt.tagNameCheck,q)||rt.tagNameCheck instanceof Function&&rt.tagNameCheck(q)))return!1;if(ku&&!ci[q]){const Tt=b($)||$.parentNode,Qt=v($)||$.childNodes;if(Qt&&Tt){const zt=Qt.length;for(let kn=zt-1;kn>=0;--kn){const Ie=g(Qt[kn],!0);Ie.__removalCount=($.__removalCount||0)+1,Tt.insertBefore(Ie,y($))}}}return _r($),!0}return $ instanceof l&&!EU($)||(q==="noscript"||q==="noembed"||q==="noframes")&&oe(/<\/no(script|embed|frames)/i,$.innerHTML)?(_r($),!0):(F&&$.nodeType===_s.text&&(Z=$.textContent,to([V,P,B],Tt=>{Z=ys(Z,Tt," ")}),$.textContent!==Z&&(vs(t.removed,{element:$.cloneNode()}),$.textContent=Z)),Ln("afterSanitizeElements",$,null),!1)},Jv=function($,Z,q){if(Ye&&(Z==="id"||Z==="name")&&(q in n||q in _U))return!1;if(!(z&&!J[Z]&&oe(_,Z))&&!(vt&&oe(M,Z))){if(!nt[Z]||J[Z]){if(!(t0($)&&(rt.tagNameCheck instanceof RegExp&&oe(rt.tagNameCheck,$)||rt.tagNameCheck instanceof Function&&rt.tagNameCheck($))&&(rt.attributeNameCheck instanceof RegExp&&oe(rt.attributeNameCheck,Z)||rt.attributeNameCheck instanceof Function&&rt.attributeNameCheck(Z))||Z==="is"&&rt.allowCustomizedBuiltInElements&&(rt.tagNameCheck instanceof RegExp&&oe(rt.tagNameCheck,q)||rt.tagNameCheck instanceof Function&&rt.tagNameCheck(q))))return!1}else if(!Du[Z]&&!oe(W,ys(q,N,""))&&!((Z==="src"||Z==="xlink:href"||Z==="href")&&$!=="script"&&pk(q,"data:")===0&&Gv[$])&&!(K&&!oe(A,ys(q,N,"")))&&q)return!1}return!0},t0=function($){return $!=="annotation-xml"&&dg($,U)},e0=function($){Ln("beforeSanitizeAttributes",$,null);const{attributes:Z}=$;if(!Z)return;const q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:nt,forceKeepAttr:void 0};let Tt=Z.length;for(;Tt--;){const Qt=Z[Tt],{name:zt,namespaceURI:kn,value:Ie}=Qt,cn=Zt(zt);let ce=zt==="value"?Ie:fk(Ie);if(q.attrName=cn,q.attrValue=ce,q.keepAttr=!0,q.forceKeepAttr=void 0,Ln("uponSanitizeAttribute",$,q),ce=q.attrValue,Hv&&(cn==="id"||cn==="name")&&(Eo(zt,$),ce=gU+ce),Lt&&oe(/((--!?|])>)|<\/(style|title)/i,ce)){Eo(zt,$);continue}if(q.forceKeepAttr||(Eo(zt,$),!q.keepAttr))continue;if(!ot&&oe(/\/>/i,ce)){Eo(zt,$);continue}F&&to([V,P,B],TU=>{ce=ys(ce,TU," ")});const n0=Zt($.nodeName);if(Jv(n0,cn,ce)){if(O&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!kn)switch(p.getAttributeType(n0,cn)){case"TrustedHTML":{ce=O.createHTML(ce);break}case"TrustedScriptURL":{ce=O.createScriptURL(ce);break}}try{kn?$.setAttributeNS(kn,zt,ce):$.setAttribute(zt,ce),Xv($)?_r($):hg(t.removed)}catch{}}}Ln("afterSanitizeAttributes",$,null)},OU=function $(Z){let q=null;const Tt=Zv(Z);for(Ln("beforeSanitizeShadowDOM",Z,null);q=Tt.nextNode();)Ln("uponSanitizeShadowNode",q,null),!Qv(q)&&(q.content instanceof s&&$(q.content),e0(q));Ln("afterSanitizeShadowDOM",Z,null)};return t.sanitize=function($){let Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=null,Tt=null,Qt=null,zt=null;if(Ru=!$,Ru&&($="<!-->"),typeof $!="string"&&!Kv($))if(typeof $.toString=="function"){if($=$.toString(),typeof $!="string")throw xs("dirty is not a string, aborting")}else throw xs("toString is not a function");if(!t.isSupported)return $;if(Wt||Nu(Z),t.removed=[],typeof $=="string"&&(Ss=!1),Ss){if($.nodeName){const cn=Zt($.nodeName);if(!j[cn]||Y[cn])throw xs("root node is forbidden and cannot be sanitized in-place")}}else if($ instanceof o)q=Yv("<!---->"),Tt=q.ownerDocument.importNode($,!0),Tt.nodeType===_s.element&&Tt.nodeName==="BODY"||Tt.nodeName==="HTML"?q=Tt:q.appendChild(Tt);else{if(!tt&&!F&&!pt&&$.indexOf("<")===-1)return O&&ln?O.createHTML($):$;if(q=Yv($),!q)return tt?null:ln?E:""}q&&qt&&_r(q.firstChild);const kn=Zv(Ss?$:q);for(;Qt=kn.nextNode();)Qv(Qt)||(Qt.content instanceof s&&OU(Qt.content),e0(Qt));if(Ss)return $;if(tt){if(Mt)for(zt=I.call(q.ownerDocument);q.firstChild;)zt.appendChild(q.firstChild);else zt=q;return(nt.shadowroot||nt.shadowrootmode)&&(zt=k.call(r,zt,!0)),zt}let Ie=pt?q.outerHTML:q.innerHTML;return pt&&j["!doctype"]&&q.ownerDocument&&q.ownerDocument.doctype&&q.ownerDocument.doctype.name&&oe(yg,q.ownerDocument.doctype.name)&&(Ie="<!DOCTYPE "+q.ownerDocument.doctype.name+`>
4
- `+Ie),F&&to([V,P,B],cn=>{Ie=ys(Ie,cn," ")}),O&&ln?O.createHTML(Ie):Ie},t.setConfig=function(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Nu($),Wt=!0},t.clearConfig=function(){hi=null,Wt=!1},t.isValidAttribute=function($,Z,q){hi||Nu({});const Tt=Zt($),Qt=Zt(Z);return Jv(Tt,Qt,q)},t.addHook=function($,Z){typeof Z=="function"&&(w[$]=w[$]||[],vs(w[$],Z))},t.removeHook=function($){if(w[$])return hg(w[$])},t.removeHooks=function($){w[$]&&(w[$]=[])},t.removeAllHooks=function(){w={}},t}var cu=bg();const ro=e=>cu.sanitize(e,{USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),Ck=e=>cu.sanitize(e,{NAMESPACE:"http://www.w3.org/2000/svg",USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),an=e=>cu.sanitize(e,{ALLOWED_TAGS:[]}),_g=class i0 extends ht{constructor(){super(...arguments),this.type="toolbar",this.renderType=Q.HTML}init(){const t=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(T.Toolbar.SHOW_OVERFLOW_MENU,()=>{this.renderOverflowMenu(),document.body.addEventListener("click",t)}),this.services.events.addEventListener(T.Toolbar.HIDE_OVERFLOW_MENU,()=>{document.body.removeEventListener("click",t)})}render(t=!0){const n=this.getComponentContainer({ariaLabel:"toolbar"}).attr("role","group");if(x(this.getOptions(),"data","loading"))n.html(""),this.overflowMenu=null;else{this.overflowMenu||(this.overflowMenu=n.append("div").attr("class","cds--overflow-menu-options cds--overflow-menu--flip cds--overflow-menu-options cds--overflow-menu--flip").attr("tabindex",-1).html("<ul role='menu'></ul>"));const{buttonList:r,overflowMenuItemList:i}=this.getControlConfigs();i&&r.push(this.getOverflowButtonConfig());const s=n.selectAll("div.toolbar-control").data(r,l=>l.id);s.exit().remove();const a=s.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu"),o=this;a.merge(s).classed("disabled",l=>l.shouldBeDisabled()).attr("role","button").attr("aria-disabled",l=>l.shouldBeDisabled()).attr("aria-label",l=>l.title).html(l=>`
1
+ (function(X,Le){typeof exports=="object"&&typeof module<"u"?Le(exports):typeof define=="function"&&define.amd?define(["exports"],Le):(X=typeof globalThis<"u"?globalThis:X||self,Le(X.ChartsReact={}))})(this,function(X){"use strict";var hH=Object.defineProperty;var dH=(X,Le,yr)=>Le in X?hH(X,Le,{enumerable:!0,configurable:!0,writable:!0,value:yr}):X[Le]=yr;var Yh=(X,Le,yr)=>dH(X,typeof Le!="symbol"?Le+"":Le,yr);var Le=(e=>(e.RENDER_FINISHED="render-finished",e.RESIZE="chart-resize",e.MOUSEOVER="chart-mouseover",e.MOUSEOUT="chart-mouseout",e))(Le||{}),yr=(e=>(e.SHOW="show-modal",e.HIDE="hide-modal",e))(yr||{}),Rl=(e=>(e.UPDATE="model-update",e))(Rl||{}),Xh=(e=>(e.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",e.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",e.BUTTON_CLICK="toolbar-button-click",e.SHOW_TOOLTIP="toolbar-show-tooltip",e.HIDE_TOOLTIP="toolbar-hide-tooltip",e))(Xh||{}),kl=(e=>(e.UPDATE="zoom-bar-update",e.SELECTION_START="zoom-bar-selection-start",e.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",e.SELECTION_END="zoom-bar-selection-end",e))(kl||{}),Ll=(e=>(e.CHANGE="zoom-domain-change",e))(Ll||{}),Dl=(e=>(e.CANVAS_ZOOM_IN="canvas-zoom-in",e.CANVAS_ZOOM_OUT="canvas-zoom-out",e))(Dl||{}),Il=(e=>(e.LABEL_MOUSEOVER="axis-label-mouseover",e.LABEL_MOUSEMOVE="axis-label-mousemove",e.LABEL_CLICK="axis-label-click",e.LABEL_MOUSEOUT="axis-label-mouseout",e.LABEL_FOCUS="axis-label-focus",e.LABEL_BLUR="axis-label-blur",e.RENDER_COMPLETE="axis-render-complete",e))(Il||{}),Nl=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(Nl||{}),Pl=(e=>(e.WORD_MOUSEOVER="wordcloud-word-mouseover",e.WORD_MOUSEMOVE="wordcloud-word-mousemove",e.WORD_CLICK="wordcloud-word-click",e.WORD_MOUSEOUT="wordcloud-word-mouseout",e))(Pl||{}),Ul=(e=>(e.SLICE_MOUSEOVER="pie-slice-mouseover",e.SLICE_MOUSEMOVE="pie-slice-mousemove",e.SLICE_CLICK="pie-slice-click",e.SLICE_MOUSEOUT="pie-slice-mouseout",e))(Ul||{}),Bl=(e=>(e.ARC_MOUSEOVER="gauge-arc-mouseover",e.ARC_MOUSEMOVE="gauge-arc-mousemove",e.ARC_CLICK="gauge-arc-click",e.ARC_MOUSEOUT="gauge-arc-mouseout",e))(Bl||{}),Hl=(e=>(e.BAR_MOUSEOVER="bar-mouseover",e.BAR_MOUSEMOVE="bar-mousemove",e.BAR_CLICK="bar-click",e.BAR_MOUSEOUT="bar-mouseout",e))(Hl||{}),Vl=(e=>(e.BOX_MOUSEOVER="box-mouseover",e.BOX_MOUSEMOVE="box-mousemove",e.BOX_CLICK="box-click",e.BOX_MOUSEOUT="box-mouseout",e.OUTLIER_MOUSEOVER="outlier-mouseover",e.OUTLIER_MOUSEMOVE="outlier-mousemove",e.OUTLIER_CLICK="outlier-click",e.OUTLIER_MOUSEOUT="outlier-mouseout",e))(Vl||{}),Fl=(e=>(e.SCATTER_MOUSEOVER="scatter-mouseover",e.SCATTER_MOUSEMOVE="scatter-mousemove",e.SCATTER_CLICK="scatter-click",e.SCATTER_MOUSEOUT="scatter-mouseout",e))(Fl||{}),Gl=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(Gl||{}),zl=(e=>(e.X_AXIS_MOUSEOVER="radar-x-axis-mouseover",e.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",e.X_AXIS_CLICK="radar-x-axis-click",e.X_AXIS_MOUSEOUT="radar-x-axis-mouseout",e))(zl||{}),jl=(e=>(e.NODE_MOUSEOVER="tree-node-mouseover",e.NODE_CLICK="tree-node-click",e.NODE_MOUSEOUT="tree-node-mouseout",e))(jl||{}),Wl=(e=>(e.LEAF_MOUSEOVER="leaf-mouseover",e.LEAF_MOUSEMOVE="leaf-mousemove",e.LEAF_CLICK="leaf-click",e.LEAF_MOUSEOUT="leaf-mouseout",e))(Wl||{}),xi=(e=>(e.SHOW="show-tooltip",e.MOVE="move-tooltip",e.HIDE="hide-tooltip",e))(xi||{}),Yl=(e=>(e.SHOW="show-threshold",e.HIDE="hide-threshold",e))(Yl||{}),Zh=(e=>(e.ITEM_HOVER="legend-item-onhover",e.ITEM_CLICK="legend-item-onclick",e.ITEM_MOUSEOUT="legend-item-onmouseout",e.ITEMS_UPDATE="legend-items-update",e))(Zh||{}),Kh=(e=>(e.CIRCLE_MOUSEOVER="circle-leaf-mouseover",e.CIRCLE_CLICK="circle-leaf-click",e.CIRCLE_MOUSEOUT="circle-leaf-mouseout",e.CIRCLE_MOUSEMOVE="circle-leaf-mousemove",e))(Kh||{}),Qh=(e=>(e.NODE_MOUSEOVER="alluvial-node-mouseover",e.NODE_CLICK="alluvial-node-click",e.NODE_MOUSEOUT="alluvial-node-mouseout",e.NODE_MOUSEMOVE="alluvial-node-mousemove",e.LINE_MOUSEOVER="alluvial-line-mouseover",e.LINE_CLICK="alluvial-line-click",e.LINE_MOUSEOUT="alluvial-line-mouseout",e.LINE_MOUSEMOVE="alluvial-line-mousemove",e))(Qh||{}),Jh=(e=>(e.METER_MOUSEOVER="meter-mouseover",e.METER_CLICK="meter-click",e.METER_MOUSEOUT="meter-mouseout",e.METER_MOUSEMOVE="meter-mousemove",e))(Jh||{}),td=(e=>(e.HEATMAP_MOUSEOVER="heatmap-mouseover",e.HEATMAP_CLICK="heatmap-click",e.HEATMAP_MOUSEOUT="heatmap-mouseout",e.HEATMAP_MOUSEMOVE="hetmap-mousemove",e))(td||{}),Ei=(e=>(e.CHOROPLETH_MOUSEOVER="choropleth-mouseover",e.CHOROPLETH_CLICK="choropleth-click",e.CHOROPLETH_MOUSEOUT="choropleth-mouseout",e.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",e))(Ei||{});const Ay=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:Qh,Area:Nl,Axis:Il,Bar:Hl,Boxplot:Vl,CanvasZoom:Dl,Chart:Le,Choropleth:Ei,CirclePack:Kh,Gauge:Bl,Heatmap:td,Legend:Zh,Line:Gl,Meter:Jh,Modal:yr,Model:Rl,Pie:Ul,Radar:zl,Scatter:Fl,Threshold:Yl,Toolbar:Xh,Tooltip:xi,Tree:jl,Treemap:Wl,WordCloud:Pl,ZoomBar:kl,ZoomDomain:Ll},Symbol.toStringTag,{value:"Module"})),w=Ay;var ft=(e=>(e.HTML="html",e.SVG="svg",e))(ft||{}),ql=(e=>(e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10",e))(ql||{}),mt=(e=>(e.BACKGROUND="background",e.FILL="fill",e.STROKE="stroke",e.TOOLTIP="tooltip",e))(mt||{}),Z=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))(Z||{}),vn=(e=>(e.GRAPH_VIEW="graph_view",e.SLIDER_VIEW="slider_view",e))(vn||{}),an=(e=>(e.END_LINE="end_line",e.MID_LINE="mid_line",e.FRONT_LINE="front_line",e.NONE="none",e))(an||{}),fe=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(fe||{}),pt=(e=>(e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio",e))(pt||{}),Ti=(e=>(e.RIGHT="right",e.LEFT="left",e.TOP="top",e.BOTTOM="bottom",e))(Ti||{}),me=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(me||{}),Oi=(e=>(e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e))(Oi||{}),Rs=(e=>(e.TREE="tree",e.DENDROGRAM="dendrogram",e))(Rs||{}),qt=(e=>(e.ROW="row",e.COLUMN="column",e.ROW_REVERSE="row-reverse",e.COLUMN_REVERSE="column-reverse",e))(qt||{}),xt=(e=>(e.FIXED="fixed",e.PREFERRED="preferred",e.STRETCH="stretch",e))(xt||{}),Br=(e=>(e.CENTER="center",e))(Br||{}),pa=(e=>(e.LEFT="left",e.RIGHT="right",e))(pa||{}),ge=(e=>(e.GRID="grid",e.VERT_OR_HORIZ="vertOrHoriz",e.PIE="pie",e.DONUT="donut",e))(ge||{}),Ln=(e=>(e.START="start",e.MIDDLE="middle",e.END="end",e))(Ln||{}),Dn=(e=>(e.BASELINE="baseline",e.MIDDLE="middle",e.HANGING="hanging",e))(Dn||{}),Hr=(e=>(e.SEMI="semi",e.FULL="full",e))(Hr||{}),ks=(e=>(e.UP="up",e.DOWN="down",e))(ks||{}),fa=(e=>(e.SUCCESS="success",e.WARNING="warning",e.DANGER="danger",e))(fa||{}),ma=(e=>(e.ALWAYS="always",e.AUTO="auto",e.NEVER="never",e))(ma||{}),We=(e=>(e.SCATTER="scatter",e.LINE="line",e.SIMPLE_BAR="simple-bar",e.STACKED_BAR="stacked-bar",e.GROUPED_BAR="grouped-bar",e.AREA="area",e.STACKED_AREA="stacked-area",e))(We||{}),Bt=(e=>(e.EXPORT_CSV="Export as CSV",e.EXPORT_PNG="Export as PNG",e.EXPORT_JPG="Export as JPG",e.ZOOM_IN="Zoom in",e.ZOOM_OUT="Zoom out",e.RESET_ZOOM="Reset zoom",e.MAKE_FULLSCREEN="Make fullscreen",e.EXIT_FULLSCREEN="Exit fullscreen",e.SHOW_AS_DATATABLE="Show as data-table",e.CUSTOM="Custom",e))(Bt||{}),Ls=(e=>(e.LEFT="left",e.RIGHT="right",e))(Ls||{}),ve=(e=>(e.CHECKBOX="checkbox",e.RADIUS="radius",e.AREA="area",e.SIZE="size",e.LINE="line",e.QUARTILE="quartile",e.ZOOM="zoom",e))(ve||{}),ga=(e=>(e.LINEAR="linear",e.QUANTIZE="quantize",e))(ga||{}),Si=(e=>(e.ON="on",e.AUTO="auto",e.OFF="off",e))(Si||{}),va=(e=>(e.DEFAULT="default",e.HOVERABLE="hoverable",e))(va||{}),In=(e=>(e.geoEqualEarth="geoEqualEarth",e.geoAlbers="geoAlbers",e.geoConicEqualArea="geoConicEqualArea",e.geoConicEquidistant="geoConicEquidistant",e.geoEquirectangular="geoEquirectangular",e.geoMercator="geoMercator",e.geoNaturalEarth1="geoNaturalEarth1",e))(In||{}),ed=(e=>(e["15seconds"]="15seconds",e.minute="minute",e["30minutes"]="30minutes",e.hourly="hourly",e.daily="daily",e.weekly="weekly",e.monthly="monthly",e.quarterly="quarterly",e.yearly="yearly",e))(ed||{});function Xl(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function ya(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):s;i=e.formattingValues[o]||e.formattingValues[s]}else{const s=e.defaultWidth,o=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[o]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}function ba(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const s=a[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?ky(o,d=>d.test(s)):Ry(o,d=>d.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(s.length);return{value:c,rest:u}}}function Ry(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function ky(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Ly(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const o=t.slice(i.length);return{value:s,rest:o}}}const nd=6048e5,Dy=864e5,rd=6e4,id=36e5,ad=Symbol.for("constructDateFrom");function sn(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ad in e?e[ad](t):e instanceof Date?new e.constructor(t):new Date(t)}function Vr(e,...t){const n=sn.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}let Iy={};function Ds(){return Iy}function le(e,t){return sn(t||e,e)}function _a(e,t){var n,r,i,a;const s=Ds(),o=(t==null?void 0:t.weekStartsOn)??((r=(n=t==null?void 0:t.locale)==null?void 0:n.options)==null?void 0:r.weekStartsOn)??s.weekStartsOn??((a=(i=s.locale)==null?void 0:i.options)==null?void 0:a.weekStartsOn)??0,l=le(e,t==null?void 0:t.in),c=l.getDay(),u=(c<o?7:0)+c-o;return l.setDate(l.getDate()-u),l.setHours(0,0,0,0),l}const Ny={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Py=(e,t,n)=>{let r;const i=Ny[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},Uy={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},By=(e,t,n,r)=>Uy[e],Hy={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Vy={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Fy={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Gy={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},zy={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},jy={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Wy=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Yy={ordinalNumber:Wy,era:ya({values:Hy,defaultWidth:"wide"}),quarter:ya({values:Vy,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ya({values:Fy,defaultWidth:"wide"}),day:ya({values:Gy,defaultWidth:"wide"}),dayPeriod:ya({values:zy,defaultWidth:"wide",formattingValues:jy,defaultFormattingWidth:"wide"})},qy=/^(\d+)(th|st|nd|rd)?/i,Xy=/\d+/i,Zy={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ky={any:[/^b/i,/^(a|c)/i]},Qy={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Jy={any:[/1/i,/2/i,/3/i,/4/i]},t1={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},e1={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},n1={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},r1={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},i1={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},a1={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},s1={ordinalNumber:Ly({matchPattern:qy,parsePattern:Xy,valueCallback:e=>parseInt(e,10)}),era:ba({matchPatterns:Zy,defaultMatchWidth:"wide",parsePatterns:Ky,defaultParseWidth:"any"}),quarter:ba({matchPatterns:Qy,defaultMatchWidth:"wide",parsePatterns:Jy,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ba({matchPatterns:t1,defaultMatchWidth:"wide",parsePatterns:e1,defaultParseWidth:"any"}),day:ba({matchPatterns:n1,defaultMatchWidth:"wide",parsePatterns:r1,defaultParseWidth:"any"}),dayPeriod:ba({matchPatterns:i1,defaultMatchWidth:"any",parsePatterns:a1,defaultParseWidth:"any"})},o1={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},l1={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},c1={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},u1={date:Xl({formats:o1,defaultWidth:"full"}),time:Xl({formats:l1,defaultWidth:"full"}),dateTime:Xl({formats:c1,defaultWidth:"full"})},sd={code:"en-US",formatDistance:Py,formatLong:u1,formatRelative:By,localize:Yy,match:s1,options:{weekStartsOn:0,firstWeekContainsDate:1}};var od=typeof global=="object"&&global&&global.Object===Object&&global,h1=typeof self=="object"&&self&&self.Object===Object&&self,yn=od||h1||Function("return this")(),on=yn.Symbol,ld=Object.prototype,d1=ld.hasOwnProperty,p1=ld.toString,xa=on?on.toStringTag:void 0;function f1(e){var t=d1.call(e,xa),n=e[xa];try{e[xa]=void 0;var r=!0}catch{}var i=p1.call(e);return r&&(t?e[xa]=n:delete e[xa]),i}var m1=Object.prototype,g1=m1.toString;function v1(e){return g1.call(e)}var y1="[object Null]",b1="[object Undefined]",cd=on?on.toStringTag:void 0;function Fr(e){return e==null?e===void 0?b1:y1:cd&&cd in Object(e)?f1(e):v1(e)}function Nn(e){return e!=null&&typeof e=="object"}var _1="[object Symbol]";function Is(e){return typeof e=="symbol"||Nn(e)&&Fr(e)==_1}function Zl(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Oe=Array.isArray,x1=1/0,ud=on?on.prototype:void 0,hd=ud?ud.toString:void 0;function dd(e){if(typeof e=="string")return e;if(Oe(e))return Zl(e,dd)+"";if(Is(e))return hd?hd.call(e):"";var t=e+"";return t=="0"&&1/e==-x1?"-0":t}function ln(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Kl(e){return e}var E1="[object AsyncFunction]",T1="[object Function]",O1="[object GeneratorFunction]",S1="[object Proxy]";function Ql(e){if(!ln(e))return!1;var t=Fr(e);return t==T1||t==O1||t==E1||t==S1}var Jl=yn["__core-js_shared__"],pd=function(){var e=/[^.]+$/.exec(Jl&&Jl.keys&&Jl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function w1(e){return!!pd&&pd in e}var $1=Function.prototype,C1=$1.toString;function Gr(e){if(e!=null){try{return C1.call(e)}catch{}try{return e+""}catch{}}return""}var M1=/[\\^$.*+?()[\]{}|]/g,A1=/^\[object .+?Constructor\]$/,R1=Function.prototype,k1=Object.prototype,L1=R1.toString,D1=k1.hasOwnProperty,I1=RegExp("^"+L1.call(D1).replace(M1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function N1(e){if(!ln(e)||w1(e))return!1;var t=Ql(e)?I1:A1;return t.test(Gr(e))}function P1(e,t){return e==null?void 0:e[t]}function zr(e,t){var n=P1(e,t);return N1(n)?n:void 0}var tc=zr(yn,"WeakMap"),fd=Object.create,U1=function(){function e(){}return function(t){if(!ln(t))return{};if(fd)return fd(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function B1(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function H1(){}function md(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var V1=800,F1=16,G1=Date.now;function z1(e){var t=0,n=0;return function(){var r=G1(),i=F1-(r-n);if(n=r,i>0){if(++t>=V1)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function j1(e){return function(){return e}}var Ns=function(){try{var e=zr(Object,"defineProperty");return e({},"",{}),e}catch{}}(),W1=Ns?function(e,t){return Ns(e,"toString",{configurable:!0,enumerable:!1,value:j1(t),writable:!0})}:Kl,gd=z1(W1);function Y1(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function q1(e,t,n,r){for(var i=e.length,a=n+-1;++a<i;)if(t(e[a],a,e))return a;return-1}function X1(e){return e!==e}function Z1(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function K1(e,t,n){return t===t?Z1(e,t,n):q1(e,X1,n)}function Q1(e,t){var n=e==null?0:e.length;return!!n&&K1(e,t,0)>-1}var J1=9007199254740991,tb=/^(?:0|[1-9]\d*)$/;function ec(e,t){var n=typeof e;return t=t??J1,!!t&&(n=="number"||n!="symbol"&&tb.test(e))&&e>-1&&e%1==0&&e<t}function Ps(e,t,n){t=="__proto__"&&Ns?Ns(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Ea(e,t){return e===t||e!==e&&t!==t}var eb=Object.prototype,nb=eb.hasOwnProperty;function vd(e,t,n){var r=e[t];(!(nb.call(e,t)&&Ea(r,n))||n===void 0&&!(t in e))&&Ps(e,t,n)}function wi(e,t,n,r){var i=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var o=t[a],l=void 0;l===void 0&&(l=e[o]),i?Ps(n,o,l):vd(n,o,l)}return n}var yd=Math.max;function bd(e,t,n){return t=yd(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=yd(r.length-t,0),s=Array(a);++i<a;)s[i]=r[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=r[i];return o[t]=n(s),B1(e,this,o)}}function nc(e,t){return gd(bd(e,t,Kl),e+"")}var rb=9007199254740991;function rc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=rb}function jr(e){return e!=null&&rc(e.length)&&!Ql(e)}function ib(e,t,n){if(!ln(n))return!1;var r=typeof t;return(r=="number"?jr(n)&&ec(t,n.length):r=="string"&&t in n)?Ea(n[t],e):!1}function ab(e){return nc(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,s&&ib(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var o=n[r];o&&e(t,o,r,a)}return t})}var sb=Object.prototype;function Us(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||sb;return e===n}function ob(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var lb="[object Arguments]";function _d(e){return Nn(e)&&Fr(e)==lb}var xd=Object.prototype,cb=xd.hasOwnProperty,ub=xd.propertyIsEnumerable,$i=_d(function(){return arguments}())?_d:function(e){return Nn(e)&&cb.call(e,"callee")&&!ub.call(e,"callee")};function hb(){return!1}var Ed=typeof X=="object"&&X&&!X.nodeType&&X,Td=Ed&&typeof module=="object"&&module&&!module.nodeType&&module,db=Td&&Td.exports===Ed,Od=db?yn.Buffer:void 0,pb=Od?Od.isBuffer:void 0,Ci=pb||hb,fb="[object Arguments]",mb="[object Array]",gb="[object Boolean]",vb="[object Date]",yb="[object Error]",bb="[object Function]",_b="[object Map]",xb="[object Number]",Eb="[object Object]",Tb="[object RegExp]",Ob="[object Set]",Sb="[object String]",wb="[object WeakMap]",$b="[object ArrayBuffer]",Cb="[object DataView]",Mb="[object Float32Array]",Ab="[object Float64Array]",Rb="[object Int8Array]",kb="[object Int16Array]",Lb="[object Int32Array]",Db="[object Uint8Array]",Ib="[object Uint8ClampedArray]",Nb="[object Uint16Array]",Pb="[object Uint32Array]",te={};te[Mb]=te[Ab]=te[Rb]=te[kb]=te[Lb]=te[Db]=te[Ib]=te[Nb]=te[Pb]=!0,te[fb]=te[mb]=te[$b]=te[gb]=te[Cb]=te[vb]=te[yb]=te[bb]=te[_b]=te[xb]=te[Eb]=te[Tb]=te[Ob]=te[Sb]=te[wb]=!1;function Ub(e){return Nn(e)&&rc(e.length)&&!!te[Fr(e)]}function ic(e){return function(t){return e(t)}}var Sd=typeof X=="object"&&X&&!X.nodeType&&X,Ta=Sd&&typeof module=="object"&&module&&!module.nodeType&&module,Bb=Ta&&Ta.exports===Sd,ac=Bb&&od.process,Mi=function(){try{var e=Ta&&Ta.require&&Ta.require("util").types;return e||ac&&ac.binding&&ac.binding("util")}catch{}}(),wd=Mi&&Mi.isTypedArray,Bs=wd?ic(wd):Ub,Hb=Object.prototype,Vb=Hb.hasOwnProperty;function $d(e,t){var n=Oe(e),r=!n&&$i(e),i=!n&&!r&&Ci(e),a=!n&&!r&&!i&&Bs(e),s=n||r||i||a,o=s?ob(e.length,String):[],l=o.length;for(var c in e)(t||Vb.call(e,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||ec(c,l)))&&o.push(c);return o}function Cd(e,t){return function(n){return e(t(n))}}var Fb=Cd(Object.keys,Object),Gb=Object.prototype,zb=Gb.hasOwnProperty;function Md(e){if(!Us(e))return Fb(e);var t=[];for(var n in Object(e))zb.call(e,n)&&n!="constructor"&&t.push(n);return t}function Oa(e){return jr(e)?$d(e):Md(e)}function jb(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Wb=Object.prototype,Yb=Wb.hasOwnProperty;function qb(e){if(!ln(e))return jb(e);var t=Us(e),n=[];for(var r in e)r=="constructor"&&(t||!Yb.call(e,r))||n.push(r);return n}function Sa(e){return jr(e)?$d(e,!0):qb(e)}var Xb=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zb=/^\w*$/;function sc(e,t){if(Oe(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Is(e)?!0:Zb.test(e)||!Xb.test(e)||t!=null&&e in Object(t)}var wa=zr(Object,"create");function Kb(){this.__data__=wa?wa(null):{},this.size=0}function Qb(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Jb="__lodash_hash_undefined__",t_=Object.prototype,e_=t_.hasOwnProperty;function n_(e){var t=this.__data__;if(wa){var n=t[e];return n===Jb?void 0:n}return e_.call(t,e)?t[e]:void 0}var r_=Object.prototype,i_=r_.hasOwnProperty;function a_(e){var t=this.__data__;return wa?t[e]!==void 0:i_.call(t,e)}var s_="__lodash_hash_undefined__";function o_(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=wa&&t===void 0?s_:t,this}function Wr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Wr.prototype.clear=Kb,Wr.prototype.delete=Qb,Wr.prototype.get=n_,Wr.prototype.has=a_,Wr.prototype.set=o_;function l_(){this.__data__=[],this.size=0}function Hs(e,t){for(var n=e.length;n--;)if(Ea(e[n][0],t))return n;return-1}var c_=Array.prototype,u_=c_.splice;function h_(e){var t=this.__data__,n=Hs(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():u_.call(t,n,1),--this.size,!0}function d_(e){var t=this.__data__,n=Hs(t,e);return n<0?void 0:t[n][1]}function p_(e){return Hs(this.__data__,e)>-1}function f_(e,t){var n=this.__data__,r=Hs(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Zn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Zn.prototype.clear=l_,Zn.prototype.delete=h_,Zn.prototype.get=d_,Zn.prototype.has=p_,Zn.prototype.set=f_;var $a=zr(yn,"Map");function m_(){this.size=0,this.__data__={hash:new Wr,map:new($a||Zn),string:new Wr}}function g_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Vs(e,t){var n=e.__data__;return g_(t)?n[typeof t=="string"?"string":"hash"]:n.map}function v_(e){var t=Vs(this,e).delete(e);return this.size-=t?1:0,t}function y_(e){return Vs(this,e).get(e)}function b_(e){return Vs(this,e).has(e)}function __(e,t){var n=Vs(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Kn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Kn.prototype.clear=m_,Kn.prototype.delete=v_,Kn.prototype.get=y_,Kn.prototype.has=b_,Kn.prototype.set=__;var x_="Expected a function";function oc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(x_);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var s=e.apply(this,r);return n.cache=a.set(i,s)||a,s};return n.cache=new(oc.Cache||Kn),n}oc.Cache=Kn;var E_=500;function T_(e){var t=oc(e,function(r){return n.size===E_&&n.clear(),r}),n=t.cache;return t}var O_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,S_=/\\(\\)?/g,w_=T_(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(O_,function(n,r,i,a){t.push(i?a.replace(S_,"$1"):r||n)}),t});function Ca(e){return e==null?"":dd(e)}function Fs(e,t){return Oe(e)?e:sc(e,t)?[e]:w_(Ca(e))}var $_=1/0;function Ma(e){if(typeof e=="string"||Is(e))return e;var t=e+"";return t=="0"&&1/e==-$_?"-0":t}function lc(e,t){t=Fs(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Ma(t[n++])];return n&&n==r?e:void 0}function kt(e,t,n){var r=e==null?void 0:lc(e,t);return r===void 0?n:r}function cc(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Ad=on?on.isConcatSpreadable:void 0;function C_(e){return Oe(e)||$i(e)||!!(Ad&&e&&e[Ad])}function Gs(e,t,n,r,i){var a=-1,s=e.length;for(n||(n=C_),i||(i=[]);++a<s;){var o=e[a];t>0&&n(o)?t>1?Gs(o,t-1,n,r,i):cc(i,o):r||(i[i.length]=o)}return i}var uc=Cd(Object.getPrototypeOf,Object),M_="[object Object]",A_=Function.prototype,R_=Object.prototype,Rd=A_.toString,k_=R_.hasOwnProperty,L_=Rd.call(Object);function kd(e){if(!Nn(e)||Fr(e)!=M_)return!1;var t=uc(e);if(t===null)return!0;var n=k_.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Rd.call(n)==L_}function D_(){this.__data__=new Zn,this.size=0}function I_(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function N_(e){return this.__data__.get(e)}function P_(e){return this.__data__.has(e)}var U_=200;function B_(e,t){var n=this.__data__;if(n instanceof Zn){var r=n.__data__;if(!$a||r.length<U_-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Kn(r)}return n.set(e,t),this.size=n.size,this}function bn(e){var t=this.__data__=new Zn(e);this.size=t.size}bn.prototype.clear=D_,bn.prototype.delete=I_,bn.prototype.get=N_,bn.prototype.has=P_,bn.prototype.set=B_;function H_(e,t){return e&&wi(t,Oa(t),e)}function V_(e,t){return e&&wi(t,Sa(t),e)}var Ld=typeof X=="object"&&X&&!X.nodeType&&X,Dd=Ld&&typeof module=="object"&&module&&!module.nodeType&&module,F_=Dd&&Dd.exports===Ld,Id=F_?yn.Buffer:void 0,Nd=Id?Id.allocUnsafe:void 0;function Pd(e,t){if(t)return e.slice();var n=e.length,r=Nd?Nd(n):new e.constructor(n);return e.copy(r),r}function G_(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var s=e[n];t(s,n,e)&&(a[i++]=s)}return a}function Ud(){return[]}var z_=Object.prototype,j_=z_.propertyIsEnumerable,Bd=Object.getOwnPropertySymbols,hc=Bd?function(e){return e==null?[]:(e=Object(e),G_(Bd(e),function(t){return j_.call(e,t)}))}:Ud;function W_(e,t){return wi(e,hc(e),t)}var Y_=Object.getOwnPropertySymbols,Hd=Y_?function(e){for(var t=[];e;)cc(t,hc(e)),e=uc(e);return t}:Ud;function q_(e,t){return wi(e,Hd(e),t)}function Vd(e,t,n){var r=t(e);return Oe(e)?r:cc(r,n(e))}function dc(e){return Vd(e,Oa,hc)}function Fd(e){return Vd(e,Sa,Hd)}var pc=zr(yn,"DataView"),fc=zr(yn,"Promise"),Ai=zr(yn,"Set"),Gd="[object Map]",X_="[object Object]",zd="[object Promise]",jd="[object Set]",Wd="[object WeakMap]",Yd="[object DataView]",Z_=Gr(pc),K_=Gr($a),Q_=Gr(fc),J_=Gr(Ai),tx=Gr(tc),cn=Fr;(pc&&cn(new pc(new ArrayBuffer(1)))!=Yd||$a&&cn(new $a)!=Gd||fc&&cn(fc.resolve())!=zd||Ai&&cn(new Ai)!=jd||tc&&cn(new tc)!=Wd)&&(cn=function(e){var t=Fr(e),n=t==X_?e.constructor:void 0,r=n?Gr(n):"";if(r)switch(r){case Z_:return Yd;case K_:return Gd;case Q_:return zd;case J_:return jd;case tx:return Wd}return t});var ex=Object.prototype,nx=ex.hasOwnProperty;function rx(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&nx.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var zs=yn.Uint8Array;function mc(e){var t=new e.constructor(e.byteLength);return new zs(t).set(new zs(e)),t}function ix(e,t){var n=t?mc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var ax=/\w*$/;function sx(e){var t=new e.constructor(e.source,ax.exec(e));return t.lastIndex=e.lastIndex,t}var qd=on?on.prototype:void 0,Xd=qd?qd.valueOf:void 0;function ox(e){return Xd?Object(Xd.call(e)):{}}function Zd(e,t){var n=t?mc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var lx="[object Boolean]",cx="[object Date]",ux="[object Map]",hx="[object Number]",dx="[object RegExp]",px="[object Set]",fx="[object String]",mx="[object Symbol]",gx="[object ArrayBuffer]",vx="[object DataView]",yx="[object Float32Array]",bx="[object Float64Array]",_x="[object Int8Array]",xx="[object Int16Array]",Ex="[object Int32Array]",Tx="[object Uint8Array]",Ox="[object Uint8ClampedArray]",Sx="[object Uint16Array]",wx="[object Uint32Array]";function $x(e,t,n){var r=e.constructor;switch(t){case gx:return mc(e);case lx:case cx:return new r(+e);case vx:return ix(e,n);case yx:case bx:case _x:case xx:case Ex:case Tx:case Ox:case Sx:case wx:return Zd(e,n);case ux:return new r;case hx:case fx:return new r(e);case dx:return sx(e);case px:return new r;case mx:return ox(e)}}function Kd(e){return typeof e.constructor=="function"&&!Us(e)?U1(uc(e)):{}}var Cx="[object Map]";function Mx(e){return Nn(e)&&cn(e)==Cx}var Qd=Mi&&Mi.isMap,Ax=Qd?ic(Qd):Mx,Rx="[object Set]";function kx(e){return Nn(e)&&cn(e)==Rx}var Jd=Mi&&Mi.isSet,Lx=Jd?ic(Jd):kx,Dx=1,Ix=2,Nx=4,tp="[object Arguments]",Px="[object Array]",Ux="[object Boolean]",Bx="[object Date]",Hx="[object Error]",ep="[object Function]",Vx="[object GeneratorFunction]",Fx="[object Map]",Gx="[object Number]",np="[object Object]",zx="[object RegExp]",jx="[object Set]",Wx="[object String]",Yx="[object Symbol]",qx="[object WeakMap]",Xx="[object ArrayBuffer]",Zx="[object DataView]",Kx="[object Float32Array]",Qx="[object Float64Array]",Jx="[object Int8Array]",tE="[object Int16Array]",eE="[object Int32Array]",nE="[object Uint8Array]",rE="[object Uint8ClampedArray]",iE="[object Uint16Array]",aE="[object Uint32Array]",Kt={};Kt[tp]=Kt[Px]=Kt[Xx]=Kt[Zx]=Kt[Ux]=Kt[Bx]=Kt[Kx]=Kt[Qx]=Kt[Jx]=Kt[tE]=Kt[eE]=Kt[Fx]=Kt[Gx]=Kt[np]=Kt[zx]=Kt[jx]=Kt[Wx]=Kt[Yx]=Kt[nE]=Kt[rE]=Kt[iE]=Kt[aE]=!0,Kt[Hx]=Kt[ep]=Kt[qx]=!1;function Aa(e,t,n,r,i,a){var s,o=t&Dx,l=t&Ix,c=t&Nx;if(n&&(s=i?n(e,r,i,a):n(e)),s!==void 0)return s;if(!ln(e))return e;var u=Oe(e);if(u){if(s=rx(e),!o)return md(e,s)}else{var d=cn(e),h=d==ep||d==Vx;if(Ci(e))return Pd(e,o);if(d==np||d==tp||h&&!i){if(s=l||h?{}:Kd(e),!o)return l?q_(e,V_(s,e)):W_(e,H_(s,e))}else{if(!Kt[d])return i?e:{};s=$x(e,d,o)}}a||(a=new bn);var p=a.get(e);if(p)return p;a.set(e,s),Lx(e)?e.forEach(function(m){s.add(Aa(m,t,n,m,e,a))}):Ax(e)&&e.forEach(function(m,y){s.set(y,Aa(m,t,n,y,e,a))});var f=c?l?Fd:dc:l?Sa:Oa,v=u?void 0:f(e);return Y1(v||e,function(m,y){v&&(y=m,m=e[y]),vd(s,y,Aa(m,t,n,y,e,a))}),s}var sE=1,oE=4;function Qn(e){return Aa(e,sE|oE)}var lE="__lodash_hash_undefined__";function cE(e){return this.__data__.set(e,lE),this}function uE(e){return this.__data__.has(e)}function Ra(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Kn;++t<n;)this.add(e[t])}Ra.prototype.add=Ra.prototype.push=cE,Ra.prototype.has=uE;function rp(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function ip(e,t){return e.has(t)}var hE=1,dE=2;function ap(e,t,n,r,i,a){var s=n&hE,o=e.length,l=t.length;if(o!=l&&!(s&&l>o))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=n&dE?new Ra:void 0;for(a.set(e,t),a.set(t,e);++d<o;){var f=e[d],v=t[d];if(r)var m=s?r(v,f,d,t,e,a):r(f,v,d,e,t,a);if(m!==void 0){if(m)continue;h=!1;break}if(p){if(!rp(t,function(y,g){if(!ip(p,g)&&(f===y||i(f,y,n,r,a)))return p.push(g)})){h=!1;break}}else if(!(f===v||i(f,v,n,r,a))){h=!1;break}}return a.delete(e),a.delete(t),h}function pE(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function gc(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var fE=1,mE=2,gE="[object Boolean]",vE="[object Date]",yE="[object Error]",bE="[object Map]",_E="[object Number]",xE="[object RegExp]",EE="[object Set]",TE="[object String]",OE="[object Symbol]",SE="[object ArrayBuffer]",wE="[object DataView]",sp=on?on.prototype:void 0,vc=sp?sp.valueOf:void 0;function $E(e,t,n,r,i,a,s){switch(n){case wE:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case SE:return!(e.byteLength!=t.byteLength||!a(new zs(e),new zs(t)));case gE:case vE:case _E:return Ea(+e,+t);case yE:return e.name==t.name&&e.message==t.message;case xE:case TE:return e==t+"";case bE:var o=pE;case EE:var l=r&fE;if(o||(o=gc),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;r|=mE,s.set(e,t);var u=ap(o(e),o(t),r,i,a,s);return s.delete(e),u;case OE:if(vc)return vc.call(e)==vc.call(t)}return!1}var CE=1,ME=Object.prototype,AE=ME.hasOwnProperty;function RE(e,t,n,r,i,a){var s=n&CE,o=dc(e),l=o.length,c=dc(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var h=o[d];if(!(s?h in t:AE.call(t,h)))return!1}var p=a.get(e),f=a.get(t);if(p&&f)return p==t&&f==e;var v=!0;a.set(e,t),a.set(t,e);for(var m=s;++d<l;){h=o[d];var y=e[h],g=t[h];if(r)var x=s?r(g,y,h,t,e,a):r(y,g,h,e,t,a);if(!(x===void 0?y===g||i(y,g,n,r,a):x)){v=!1;break}m||(m=h=="constructor")}if(v&&!m){var O=e.constructor,T=t.constructor;O!=T&&"constructor"in e&&"constructor"in t&&!(typeof O=="function"&&O instanceof O&&typeof T=="function"&&T instanceof T)&&(v=!1)}return a.delete(e),a.delete(t),v}var kE=1,op="[object Arguments]",lp="[object Array]",js="[object Object]",LE=Object.prototype,cp=LE.hasOwnProperty;function DE(e,t,n,r,i,a){var s=Oe(e),o=Oe(t),l=s?lp:cn(e),c=o?lp:cn(t);l=l==op?js:l,c=c==op?js:c;var u=l==js,d=c==js,h=l==c;if(h&&Ci(e)){if(!Ci(t))return!1;s=!0,u=!1}if(h&&!u)return a||(a=new bn),s||Bs(e)?ap(e,t,n,r,i,a):$E(e,t,l,n,r,i,a);if(!(n&kE)){var p=u&&cp.call(e,"__wrapped__"),f=d&&cp.call(t,"__wrapped__");if(p||f){var v=p?e.value():e,m=f?t.value():t;return a||(a=new bn),i(v,m,n,r,a)}}return h?(a||(a=new bn),RE(e,t,n,r,i,a)):!1}function Ws(e,t,n,r,i){return e===t?!0:e==null||t==null||!Nn(e)&&!Nn(t)?e!==e&&t!==t:DE(e,t,n,r,Ws,i)}var IE=1,NE=2;function PE(e,t,n,r){var i=n.length,a=i;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var o=s[0],l=e[o],c=s[1];if(s[2]){if(l===void 0&&!(o in e))return!1}else{var u=new bn,d;if(!(d===void 0?Ws(c,l,IE|NE,r,u):d))return!1}}return!0}function up(e){return e===e&&!ln(e)}function UE(e){for(var t=Oa(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,up(i)]}return t}function hp(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function BE(e){var t=UE(e);return t.length==1&&t[0][2]?hp(t[0][0],t[0][1]):function(n){return n===e||PE(n,e,t)}}function HE(e,t){return e!=null&&t in Object(e)}function VE(e,t,n){t=Fs(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var s=Ma(t[r]);if(!(a=e!=null&&n(e,s)))break;e=e[s]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&rc(i)&&ec(s,i)&&(Oe(e)||$i(e)))}function FE(e,t){return e!=null&&VE(e,t,HE)}var GE=1,zE=2;function jE(e,t){return sc(e)&&up(t)?hp(Ma(e),t):function(n){var r=kt(n,e);return r===void 0&&r===t?FE(n,e):Ws(t,r,GE|zE)}}function WE(e){return function(t){return t==null?void 0:t[e]}}function YE(e){return function(t){return lc(t,e)}}function qE(e){return sc(e)?WE(Ma(e)):YE(e)}function Ys(e){return typeof e=="function"?e:e==null?Kl:typeof e=="object"?Oe(e)?jE(e[0],e[1]):BE(e):qE(e)}function XE(e){return function(t,n,r){for(var i=-1,a=Object(t),s=r(t),o=s.length;o--;){var l=s[++i];if(n(a[l],l,a)===!1)break}return t}}var dp=XE();function yc(e,t,n){(n!==void 0&&!Ea(e[t],n)||n===void 0&&!(t in e))&&Ps(e,t,n)}function bc(e){return Nn(e)&&jr(e)}function _c(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function ZE(e){return wi(e,Sa(e))}function KE(e,t,n,r,i,a,s){var o=_c(e,n),l=_c(t,n),c=s.get(l);if(c){yc(e,n,c);return}var u=a?a(o,l,n+"",e,t,s):void 0,d=u===void 0;if(d){var h=Oe(l),p=!h&&Ci(l),f=!h&&!p&&Bs(l);u=l,h||p||f?Oe(o)?u=o:bc(o)?u=md(o):p?(d=!1,u=Pd(l,!0)):f?(d=!1,u=Zd(l,!0)):u=[]:kd(l)||$i(l)?(u=o,$i(o)?u=ZE(o):(!ln(o)||Ql(o))&&(u=Kd(l))):d=!1}d&&(s.set(l,u),i(u,l,r,a,s),s.delete(l)),yc(e,n,u)}function pp(e,t,n,r,i){e!==t&&dp(t,function(a,s){if(i||(i=new bn),ln(a))KE(e,t,s,n,pp,r,i);else{var o=r?r(_c(e,s),a,s+"",e,t,i):void 0;o===void 0&&(o=a),yc(e,s,o)}},Sa)}function fp(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var QE="[object Map]",JE="[object Set]",tT=Object.prototype,eT=tT.hasOwnProperty;function _n(e){if(e==null)return!0;if(jr(e)&&(Oe(e)||typeof e=="string"||typeof e.splice=="function"||Ci(e)||Bs(e)||$i(e)))return!e.length;var t=cn(e);if(t==QE||t==JE)return!e.size;if(Us(e))return!Md(e).length;for(var n in e)if(eT.call(e,n))return!1;return!0}var yt=ab(function(e,t,n){pp(e,t,n)}),nT=1/0,rT=Ai&&1/gc(new Ai([,-0]))[1]==nT?function(e){return new Ai(e)}:H1,iT=200;function mp(e,t,n){var r=-1,i=Q1,a=e.length,s=!0,o=[],l=o;if(a>=iT){var c=t?null:rT(e);if(c)return gc(c);s=!1,i=ip,l=new Ra}else l=t?[]:o;t:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=u!==0?u:0,s&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue t;t&&l.push(d),o.push(u)}else i(l,d,n)||(l!==o&&l.push(d),o.push(u))}return o}var aT=nc(function(e){var t=fp(e);return bc(t)&&(t=void 0),mp(Gs(e,1,bc,!0),Ys(t))});function ka(e){return e&&e.length?mp(e):[]}function Yr(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function sT(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function xc(e){let t,n,r;e.length!==2?(t=Yr,n=(o,l)=>Yr(e(o),l),r=(o,l)=>e(o)-l):(t=e===Yr||e===sT?e:oT,n=e,r=e);function i(o,l,c=0,u=o.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(o[d],l)<0?c=d+1:u=d}while(c<u)}return c}function a(o,l,c=0,u=o.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(o[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function s(o,l,c=0,u=o.length){const d=i(o,l,c,u-1);return d>c&&r(o[d-1],l)>-r(o[d],l)?d-1:d}return{left:i,center:s,right:a}}function oT(){return 0}function lT(e){return e===null?NaN:+e}function*cT(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const uT=xc(Yr),Ec=uT.right;xc(lT).center;function xn(e,t){let n,r;if(t===void 0)for(const i of e)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(n===void 0?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)))}return[n,r]}let gp=class extends Map{constructor(t,n=pT){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(vp(this,t))}has(t){return super.has(vp(this,t))}set(t,n){return super.set(hT(this,t),n)}delete(t){return super.delete(dT(this,t))}};function vp({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function hT({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function dT({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function pT(e){return e!==null&&typeof e=="object"?e.valueOf():e}const fT=Math.sqrt(50),mT=Math.sqrt(10),gT=Math.sqrt(2);function qs(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),s=a>=fT?10:a>=mT?5:a>=gT?2:1;let o,l,c;return i<0?(c=Math.pow(10,-i)/s,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*s,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=n&&n<2?qs(e,t,n*2):[o,l,c]}function Xs(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,s]=r?qs(t,e,n):qs(e,t,n);if(!(a>=i))return[];const o=a-i+1,l=new Array(o);if(r)if(s<0)for(let c=0;c<o;++c)l[c]=(a-c)/-s;else for(let c=0;c<o;++c)l[c]=(a-c)*s;else if(s<0)for(let c=0;c<o;++c)l[c]=(i+c)/-s;else for(let c=0;c<o;++c)l[c]=(i+c)*s;return l}function Ri(e,t,n){return t=+t,e=+e,n=+n,qs(e,t,n)[2]}function Tc(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Ri(t,e,n):Ri(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function qr(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function br(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}var vT={value:()=>{}};function Oc(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Zs(n)}function Zs(e){this._=e}function yT(e,t){return e.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&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Zs.prototype=Oc.prototype={constructor:Zs,on:function(e,t){var n=this._,r=yT(e+"",n),i,a=-1,s=r.length;if(arguments.length<2){for(;++a<s;)if((i=(e=r[a]).type)&&(i=bT(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<s;)if(i=(e=r[a]).type)n[i]=yp(n[i],e.name,t);else if(t==null)for(i in n)n[i]=yp(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Zs(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function bT(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function yp(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=vT,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Sc="http://www.w3.org/1999/xhtml";const bp={svg:"http://www.w3.org/2000/svg",xhtml:Sc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ks(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),bp.hasOwnProperty(t)?{space:bp[t],local:e}:e}function _T(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Sc&&t.documentElement.namespaceURI===Sc?t.createElement(e):t.createElementNS(n,e)}}function xT(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function _p(e){var t=Ks(e);return(t.local?xT:_T)(t)}function ET(){}function wc(e){return e==null?ET:function(){return this.querySelector(e)}}function TT(e){typeof e!="function"&&(e=wc(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],s=a.length,o=r[i]=new Array(s),l,c,u=0;u<s;++u)(l=a[u])&&(c=e.call(l,l.__data__,u,a))&&("__data__"in l&&(c.__data__=l.__data__),o[u]=c);return new Ye(r,this._parents)}function OT(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ST(){return[]}function xp(e){return e==null?ST:function(){return this.querySelectorAll(e)}}function wT(e){return function(){return OT(e.apply(this,arguments))}}function $T(e){typeof e=="function"?e=wT(e):e=xp(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var s=t[a],o=s.length,l,c=0;c<o;++c)(l=s[c])&&(r.push(e.call(l,l.__data__,c,s)),i.push(l));return new Ye(r,i)}function Ep(e){return function(){return this.matches(e)}}function Tp(e){return function(t){return t.matches(e)}}var CT=Array.prototype.find;function MT(e){return function(){return CT.call(this.children,e)}}function AT(){return this.firstElementChild}function RT(e){return this.select(e==null?AT:MT(typeof e=="function"?e:Tp(e)))}var kT=Array.prototype.filter;function LT(){return Array.from(this.children)}function DT(e){return function(){return kT.call(this.children,e)}}function IT(e){return this.selectAll(e==null?LT:DT(typeof e=="function"?e:Tp(e)))}function NT(e){typeof e!="function"&&(e=Ep(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],s=a.length,o=r[i]=[],l,c=0;c<s;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&o.push(l);return new Ye(r,this._parents)}function Op(e){return new Array(e.length)}function PT(){return new Ye(this._enter||this._groups.map(Op),this._parents)}function Qs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Qs.prototype={constructor:Qs,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function UT(e){return function(){return e}}function BT(e,t,n,r,i,a){for(var s=0,o,l=t.length,c=a.length;s<c;++s)(o=t[s])?(o.__data__=a[s],r[s]=o):n[s]=new Qs(e,a[s]);for(;s<l;++s)(o=t[s])&&(i[s]=o)}function HT(e,t,n,r,i,a,s){var o,l,c=new Map,u=t.length,d=a.length,h=new Array(u),p;for(o=0;o<u;++o)(l=t[o])&&(h[o]=p=s.call(l,l.__data__,o,t)+"",c.has(p)?i[o]=l:c.set(p,l));for(o=0;o<d;++o)p=s.call(e,a[o],o,a)+"",(l=c.get(p))?(r[o]=l,l.__data__=a[o],c.delete(p)):n[o]=new Qs(e,a[o]);for(o=0;o<u;++o)(l=t[o])&&c.get(h[o])===l&&(i[o]=l)}function VT(e){return e.__data__}function FT(e,t){if(!arguments.length)return Array.from(this,VT);var n=t?HT:BT,r=this._parents,i=this._groups;typeof e!="function"&&(e=UT(e));for(var a=i.length,s=new Array(a),o=new Array(a),l=new Array(a),c=0;c<a;++c){var u=r[c],d=i[c],h=d.length,p=GT(e.call(u,u&&u.__data__,c,r)),f=p.length,v=o[c]=new Array(f),m=s[c]=new Array(f),y=l[c]=new Array(h);n(u,d,v,m,y,p,t);for(var g=0,x=0,O,T;g<f;++g)if(O=v[g]){for(g>=x&&(x=g+1);!(T=m[x])&&++x<f;);O._next=T||null}}return s=new Ye(s,r),s._enter=o,s._exit=l,s}function GT(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function zT(){return new Ye(this._exit||this._groups.map(Op),this._parents)}function jT(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function WT(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,s=Math.min(i,a),o=new Array(i),l=0;l<s;++l)for(var c=n[l],u=r[l],d=c.length,h=o[l]=new Array(d),p,f=0;f<d;++f)(p=c[f]||u[f])&&(h[f]=p);for(;l<i;++l)o[l]=n[l];return new Ye(o,this._parents)}function YT(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],s;--i>=0;)(s=r[i])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function qT(e){e||(e=XT);function t(d,h){return d&&h?e(d.__data__,h.__data__):!d-!h}for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var s=n[a],o=s.length,l=i[a]=new Array(o),c,u=0;u<o;++u)(c=s[u])&&(l[u]=c);l.sort(t)}return new Ye(i,this._parents).order()}function XT(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ZT(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function KT(){return Array.from(this)}function QT(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var s=r[i];if(s)return s}return null}function JT(){let e=0;for(const t of this)++e;return e}function tO(){return!this.node()}function eO(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,s=i.length,o;a<s;++a)(o=i[a])&&e.call(o,o.__data__,a,i);return this}function nO(e){return function(){this.removeAttribute(e)}}function rO(e){return function(){this.removeAttributeNS(e.space,e.local)}}function iO(e,t){return function(){this.setAttribute(e,t)}}function aO(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function sO(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function oO(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function lO(e,t){var n=Ks(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?rO:nO:typeof t=="function"?n.local?oO:sO:n.local?aO:iO)(n,t))}function Sp(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function cO(e){return function(){this.style.removeProperty(e)}}function uO(e,t,n){return function(){this.style.setProperty(e,t,n)}}function hO(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function dO(e,t,n){return arguments.length>1?this.each((t==null?cO:typeof t=="function"?hO:uO)(e,t,n??"")):ki(this.node(),e)}function ki(e,t){return e.style.getPropertyValue(t)||Sp(e).getComputedStyle(e,null).getPropertyValue(t)}function pO(e){return function(){delete this[e]}}function fO(e,t){return function(){this[e]=t}}function mO(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function gO(e,t){return arguments.length>1?this.each((t==null?pO:typeof t=="function"?mO:fO)(e,t)):this.node()[e]}function wp(e){return e.trim().split(/^|\s+/)}function $c(e){return e.classList||new $p(e)}function $p(e){this._node=e,this._names=wp(e.getAttribute("class")||"")}$p.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Cp(e,t){for(var n=$c(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Mp(e,t){for(var n=$c(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function vO(e){return function(){Cp(this,e)}}function yO(e){return function(){Mp(this,e)}}function bO(e,t){return function(){(t.apply(this,arguments)?Cp:Mp)(this,e)}}function _O(e,t){var n=wp(e+"");if(arguments.length<2){for(var r=$c(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?bO:t?vO:yO)(n,t))}function xO(){this.textContent=""}function EO(e){return function(){this.textContent=e}}function TO(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function OO(e){return arguments.length?this.each(e==null?xO:(typeof e=="function"?TO:EO)(e)):this.node().textContent}function SO(){this.innerHTML=""}function wO(e){return function(){this.innerHTML=e}}function $O(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function CO(e){return arguments.length?this.each(e==null?SO:(typeof e=="function"?$O:wO)(e)):this.node().innerHTML}function MO(){this.nextSibling&&this.parentNode.appendChild(this)}function AO(){return this.each(MO)}function RO(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function kO(){return this.each(RO)}function LO(e){var t=typeof e=="function"?e:_p(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function DO(){return null}function IO(e,t){var n=typeof e=="function"?e:_p(e),r=t==null?DO:typeof t=="function"?t:wc(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function NO(){var e=this.parentNode;e&&e.removeChild(this)}function PO(){return this.each(NO)}function UO(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function BO(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function HO(e){return this.select(e?BO:UO)}function VO(e){return arguments.length?this.property("__data__",e):this.node().__data__}function FO(e){return function(t){e.call(this,t,this.__data__)}}function GO(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function zO(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function jO(e,t,n){return function(){var r=this.__on,i,a=FO(t);if(r){for(var s=0,o=r.length;s<o;++s)if((i=r[s]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function WO(e,t,n){var r=GO(e+""),i,a=r.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,c=o.length,u;l<c;++l)for(i=0,u=o[l];i<a;++i)if((s=r[i]).type===u.type&&s.name===u.name)return u.value}return}for(o=t?jO:zO,i=0;i<a;++i)this.each(o(r[i],t,n));return this}function Ap(e,t,n){var r=Sp(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function YO(e,t){return function(){return Ap(this,e,t)}}function qO(e,t){return function(){return Ap(this,e,t.apply(this,arguments))}}function XO(e,t){return this.each((typeof t=="function"?qO:YO)(e,t))}function*ZO(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,s;i<a;++i)(s=r[i])&&(yield s)}var Rp=[null];function Ye(e,t){this._groups=e,this._parents=t}function La(){return new Ye([[document.documentElement]],Rp)}function KO(){return this}Ye.prototype=La.prototype={constructor:Ye,select:TT,selectAll:$T,selectChild:RT,selectChildren:IT,filter:NT,data:FT,enter:PT,exit:zT,join:jT,merge:WT,selection:KO,order:YT,sort:qT,call:ZT,nodes:KT,node:QT,size:JT,empty:tO,each:eO,attr:lO,style:dO,property:gO,classed:_O,text:OO,html:CO,raise:AO,lower:kO,append:LO,insert:IO,remove:PO,clone:HO,datum:VO,on:WO,dispatch:XO,[Symbol.iterator]:ZO};function QO(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Xr(e,t){if(e=QO(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}function Cc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function kp(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Da(){}var Ia=.7,Js=1/Ia,Li="\\s*([+-]?\\d+)\\s*",Na="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",JO=/^#([0-9a-f]{3,8})$/,tS=new RegExp(`^rgb\\(${Li},${Li},${Li}\\)$`),eS=new RegExp(`^rgb\\(${Pn},${Pn},${Pn}\\)$`),nS=new RegExp(`^rgba\\(${Li},${Li},${Li},${Na}\\)$`),rS=new RegExp(`^rgba\\(${Pn},${Pn},${Pn},${Na}\\)$`),iS=new RegExp(`^hsl\\(${Na},${Pn},${Pn}\\)$`),aS=new RegExp(`^hsla\\(${Na},${Pn},${Pn},${Na}\\)$`),Lp={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};Cc(Da,Jn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Dp,formatHex:Dp,formatHex8:sS,formatHsl:oS,formatRgb:Ip,toString:Ip});function Dp(){return this.rgb().formatHex()}function sS(){return this.rgb().formatHex8()}function oS(){return Hp(this).formatHsl()}function Ip(){return this.rgb().formatRgb()}function Jn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=JO.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Np(t):n===3?new He(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?to(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?to(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=tS.exec(e))?new He(t[1],t[2],t[3],1):(t=eS.exec(e))?new He(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=nS.exec(e))?to(t[1],t[2],t[3],t[4]):(t=rS.exec(e))?to(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=iS.exec(e))?Bp(t[1],t[2]/100,t[3]/100,1):(t=aS.exec(e))?Bp(t[1],t[2]/100,t[3]/100,t[4]):Lp.hasOwnProperty(e)?Np(Lp[e]):e==="transparent"?new He(NaN,NaN,NaN,0):null}function Np(e){return new He(e>>16&255,e>>8&255,e&255,1)}function to(e,t,n,r){return r<=0&&(e=t=n=NaN),new He(e,t,n,r)}function lS(e){return e instanceof Da||(e=Jn(e)),e?(e=e.rgb(),new He(e.r,e.g,e.b,e.opacity)):new He}function Mc(e,t,n,r){return arguments.length===1?lS(e):new He(e,t,n,r??1)}function He(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Cc(He,Mc,kp(Da,{brighter(e){return e=e==null?Js:Math.pow(Js,e),new He(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ia:Math.pow(Ia,e),new He(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new He(Zr(this.r),Zr(this.g),Zr(this.b),eo(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:Pp,formatHex:Pp,formatHex8:cS,formatRgb:Up,toString:Up}));function Pp(){return`#${Kr(this.r)}${Kr(this.g)}${Kr(this.b)}`}function cS(){return`#${Kr(this.r)}${Kr(this.g)}${Kr(this.b)}${Kr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Up(){const e=eo(this.opacity);return`${e===1?"rgb(":"rgba("}${Zr(this.r)}, ${Zr(this.g)}, ${Zr(this.b)}${e===1?")":`, ${e})`}`}function eo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Zr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Kr(e){return e=Zr(e),(e<16?"0":"")+e.toString(16)}function Bp(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new En(e,t,n,r)}function Hp(e){if(e instanceof En)return new En(e.h,e.s,e.l,e.opacity);if(e instanceof Da||(e=Jn(e)),!e)return new En;if(e instanceof En)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),s=NaN,o=a-i,l=(a+i)/2;return o?(t===a?s=(n-r)/o+(n<r)*6:n===a?s=(r-t)/o+2:s=(t-n)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new En(s,o,l,e.opacity)}function Vp(e,t,n,r){return arguments.length===1?Hp(e):new En(e,t,n,r??1)}function En(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Cc(En,Vp,kp(Da,{brighter(e){return e=e==null?Js:Math.pow(Js,e),new En(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ia:Math.pow(Ia,e),new En(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new He(Ac(e>=240?e-240:e+120,i,r),Ac(e,i,r),Ac(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new En(Fp(this.h),no(this.s),no(this.l),eo(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 e=eo(this.opacity);return`${e===1?"hsl(":"hsla("}${Fp(this.h)}, ${no(this.s)*100}%, ${no(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Fp(e){return e=(e||0)%360,e<0?e+360:e}function no(e){return Math.max(0,Math.min(1,e||0))}function Ac(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Rc=e=>()=>e;function uS(e,t){return function(n){return e+n*t}}function hS(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function dS(e){return(e=+e)==1?Gp:function(t,n){return n-t?hS(t,n,e):Rc(isNaN(t)?n:t)}}function Gp(e,t){var n=t-e;return n?uS(e,n):Rc(isNaN(e)?t:e)}const ro=function e(t){var n=dS(t);function r(i,a){var s=n((i=Mc(i)).r,(a=Mc(a)).r),o=n(i.g,a.g),l=n(i.b,a.b),c=Gp(i.opacity,a.opacity);return function(u){return i.r=s(u),i.g=o(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=e,r}(1);function pS(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function fS(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function mS(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),s;for(s=0;s<r;++s)i[s]=Pa(e[s],t[s]);for(;s<n;++s)a[s]=t[s];return function(o){for(s=0;s<r;++s)a[s]=i[s](o);return a}}function gS(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function qe(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function vS(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Pa(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var kc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Lc=new RegExp(kc.source,"g");function yS(e){return function(){return e}}function bS(e){return function(t){return e(t)+""}}function zp(e,t){var n=kc.lastIndex=Lc.lastIndex=0,r,i,a,s=-1,o=[],l=[];for(e=e+"",t=t+"";(r=kc.exec(e))&&(i=Lc.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),o[s]?o[s]+=a:o[++s]=a),(r=r[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,l.push({i:s,x:qe(r,i)})),n=Lc.lastIndex;return n<t.length&&(a=t.slice(n),o[s]?o[s]+=a:o[++s]=a),o.length<2?l[0]?bS(l[0].x):yS(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)o[(d=l[u]).i]=d.x(c);return o.join("")})}function Pa(e,t){var n=typeof t,r;return t==null||n==="boolean"?Rc(t):(n==="number"?qe:n==="string"?(r=Jn(t))?(t=r,ro):zp:t instanceof Jn?ro:t instanceof Date?gS:fS(t)?pS:Array.isArray(t)?mS:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?vS:qe)(e,t)}function jp(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Wp=180/Math.PI,Yp={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function qp(e,t,n,r,i,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(o=Math.sqrt(n*n+r*r))&&(n/=o,r/=o,l/=o),e*r<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Wp,skewX:Math.atan(l)*Wp,scaleX:s,scaleY:o}}var io;function _S(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Yp:qp(t.a,t.b,t.c,t.d,t.e,t.f)}function xS(e){return e==null||(io||(io=document.createElementNS("http://www.w3.org/2000/svg","g")),io.setAttribute("transform",e),!(e=io.transform.baseVal.consolidate()))?Yp:(e=e.matrix,qp(e.a,e.b,e.c,e.d,e.e,e.f))}function Xp(e,t,n,r){function i(c){return c.length?c.pop()+" ":""}function a(c,u,d,h,p,f){if(c!==d||u!==h){var v=p.push("translate(",null,t,null,n);f.push({i:v-4,x:qe(c,d)},{i:v-2,x:qe(u,h)})}else(d||h)&&p.push("translate("+d+t+h+n)}function s(c,u,d,h){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),h.push({i:d.push(i(d)+"rotate(",null,r)-2,x:qe(c,u)})):u&&d.push(i(d)+"rotate("+u+r)}function o(c,u,d,h){c!==u?h.push({i:d.push(i(d)+"skewX(",null,r)-2,x:qe(c,u)}):u&&d.push(i(d)+"skewX("+u+r)}function l(c,u,d,h,p,f){if(c!==d||u!==h){var v=p.push(i(p)+"scale(",null,",",null,")");f.push({i:v-4,x:qe(c,d)},{i:v-2,x:qe(u,h)})}else(d!==1||h!==1)&&p.push(i(p)+"scale("+d+","+h+")")}return function(c,u){var d=[],h=[];return c=e(c),u=e(u),a(c.translateX,c.translateY,u.translateX,u.translateY,d,h),s(c.rotate,u.rotate,d,h),o(c.skewX,u.skewX,d,h),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,h),c=u=null,function(p){for(var f=-1,v=h.length,m;++f<v;)d[(m=h[f]).i]=m.x(p);return d.join("")}}}var ES=Xp(_S,"px, ","px)","deg)"),TS=Xp(xS,", ",")",")"),Di=0,Ua=0,Ba=0,Zp=1e3,ao,Ha,so=0,Qr=0,oo=0,Va=typeof performance=="object"&&performance.now?performance:Date,Kp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Dc(){return Qr||(Kp(OS),Qr=Va.now()+oo)}function OS(){Qr=0}function lo(){this._call=this._time=this._next=null}lo.prototype=Qp.prototype={constructor:lo,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Dc():+n)+(t==null?0:+t),!this._next&&Ha!==this&&(Ha?Ha._next=this:ao=this,Ha=this),this._call=e,this._time=n,Ic()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ic())}};function Qp(e,t,n){var r=new lo;return r.restart(e,t,n),r}function SS(){Dc(),++Di;for(var e=ao,t;e;)(t=Qr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Di}function Jp(){Qr=(so=Va.now())+oo,Di=Ua=0;try{SS()}finally{Di=0,$S(),Qr=0}}function wS(){var e=Va.now(),t=e-so;t>Zp&&(oo-=t,so=e)}function $S(){for(var e,t=ao,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ao=n);Ha=e,Ic(r)}function Ic(e){if(!Di){Ua&&(Ua=clearTimeout(Ua));var t=e-Qr;t>24?(e<1/0&&(Ua=setTimeout(Jp,e-Va.now()-oo)),Ba&&(Ba=clearInterval(Ba))):(Ba||(so=Va.now(),Ba=setInterval(wS,Zp)),Di=1,Kp(Jp))}}function tf(e,t,n){var r=new lo;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var CS=Oc("start","end","cancel","interrupt"),MS=[],ef=0,nf=1,Nc=2,co=3,rf=4,Pc=5,uo=6;function ho(e,t,n,r,i,a){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;AS(e,n,{name:t,index:r,group:i,on:CS,tween:MS,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:ef})}function Uc(e,t){var n=Tn(e,t);if(n.state>ef)throw new Error("too late; already scheduled");return n}function Un(e,t){var n=Tn(e,t);if(n.state>co)throw new Error("too late; already running");return n}function Tn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function AS(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Qp(a,0,n.time);function a(c){n.state=nf,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var u,d,h,p;if(n.state!==nf)return l();for(u in r)if(p=r[u],p.name===n.name){if(p.state===co)return tf(s);p.state===rf?(p.state=uo,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete r[u]):+u<t&&(p.state=uo,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete r[u])}if(tf(function(){n.state===co&&(n.state=rf,n.timer.restart(o,n.delay,n.time),o(c))}),n.state=Nc,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Nc){for(n.state=co,i=new Array(h=n.tween.length),u=0,d=-1;u<h;++u)(p=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=p);i.length=d+1}}function o(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=Pc,1),d=-1,h=i.length;++d<h;)i[d].call(e,u);n.state===Pc&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=uo,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function Bc(e,t){var n=e.__transition,r,i,a=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){a=!1;continue}i=r.state>Nc&&r.state<Pc,r.state=uo,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}a&&delete e.__transition}}function RS(e){return this.each(function(){Bc(this,e)})}function kS(e,t){var n,r;return function(){var i=Un(this,e),a=i.tween;if(a!==n){r=n=a;for(var s=0,o=r.length;s<o;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function LS(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var a=Un(this,e),s=a.tween;if(s!==r){i=(r=s).slice();for(var o={name:t,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=o;break}l===c&&i.push(o)}a.tween=i}}function DS(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Tn(this.node(),n).tween,i=0,a=r.length,s;i<a;++i)if((s=r[i]).name===e)return s.value;return null}return this.each((t==null?kS:LS)(n,e,t))}function Hc(e,t,n){var r=e._id;return e.each(function(){var i=Un(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Tn(i,r).value[t]}}function af(e,t){var n;return(typeof t=="number"?qe:t instanceof Jn?ro:(n=Jn(t))?(t=n,ro):zp)(e,t)}function IS(e){return function(){this.removeAttribute(e)}}function NS(e){return function(){this.removeAttributeNS(e.space,e.local)}}function PS(e,t,n){var r,i=n+"",a;return function(){var s=this.getAttribute(e);return s===i?null:s===r?a:a=t(r=s,n)}}function US(e,t,n){var r,i=n+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===r?a:a=t(r=s,n)}}function BS(e,t,n){var r,i,a;return function(){var s,o=n(this),l;return o==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=o+"",s===l?null:s===r&&l===i?a:(i=l,a=t(r=s,o)))}}function HS(e,t,n){var r,i,a;return function(){var s,o=n(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=o+"",s===l?null:s===r&&l===i?a:(i=l,a=t(r=s,o)))}}function VS(e,t){var n=Ks(e),r=n==="transform"?TS:af;return this.attrTween(e,typeof t=="function"?(n.local?HS:BS)(n,r,Hc(this,"attr."+e,t)):t==null?(n.local?NS:IS)(n):(n.local?US:PS)(n,r,t))}function FS(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function GS(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function zS(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&GS(e,a)),n}return i._value=t,i}function jS(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&FS(e,a)),n}return i._value=t,i}function WS(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Ks(e);return this.tween(n,(r.local?zS:jS)(r,t))}function YS(e,t){return function(){Uc(this,e).delay=+t.apply(this,arguments)}}function qS(e,t){return t=+t,function(){Uc(this,e).delay=t}}function XS(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?YS:qS)(t,e)):Tn(this.node(),t).delay}function ZS(e,t){return function(){Un(this,e).duration=+t.apply(this,arguments)}}function KS(e,t){return t=+t,function(){Un(this,e).duration=t}}function QS(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ZS:KS)(t,e)):Tn(this.node(),t).duration}function JS(e,t){if(typeof t!="function")throw new Error;return function(){Un(this,e).ease=t}}function tw(e){var t=this._id;return arguments.length?this.each(JS(t,e)):Tn(this.node(),t).ease}function ew(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Un(this,e).ease=n}}function nw(e){if(typeof e!="function")throw new Error;return this.each(ew(this._id,e))}function rw(e){typeof e!="function"&&(e=Ep(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],s=a.length,o=r[i]=[],l,c=0;c<s;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&o.push(l);return new tr(r,this._parents,this._name,this._id)}function iw(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),s=new Array(r),o=0;o<a;++o)for(var l=t[o],c=n[o],u=l.length,d=s[o]=new Array(u),h,p=0;p<u;++p)(h=l[p]||c[p])&&(d[p]=h);for(;o<r;++o)s[o]=t[o];return new tr(s,this._parents,this._name,this._id)}function aw(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function sw(e,t,n){var r,i,a=aw(t)?Uc:Un;return function(){var s=a(this,e),o=s.on;o!==r&&(i=(r=o).copy()).on(t,n),s.on=i}}function ow(e,t){var n=this._id;return arguments.length<2?Tn(this.node(),n).on.on(e):this.each(sw(n,e,t))}function lw(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function cw(){return this.on("end.remove",lw(this._id))}function uw(e){var t=this._name,n=this._id;typeof e!="function"&&(e=wc(e));for(var r=this._groups,i=r.length,a=new Array(i),s=0;s<i;++s)for(var o=r[s],l=o.length,c=a[s]=new Array(l),u,d,h=0;h<l;++h)(u=o[h])&&(d=e.call(u,u.__data__,h,o))&&("__data__"in u&&(d.__data__=u.__data__),c[h]=d,ho(c[h],t,n,h,c,Tn(u,n)));return new tr(a,this._parents,t,n)}function hw(e){var t=this._name,n=this._id;typeof e!="function"&&(e=xp(e));for(var r=this._groups,i=r.length,a=[],s=[],o=0;o<i;++o)for(var l=r[o],c=l.length,u,d=0;d<c;++d)if(u=l[d]){for(var h=e.call(u,u.__data__,d,l),p,f=Tn(u,n),v=0,m=h.length;v<m;++v)(p=h[v])&&ho(p,t,n,v,h,f);a.push(h),s.push(u)}return new tr(a,s,t,n)}var dw=La.prototype.constructor;function pw(){return new dw(this._groups,this._parents)}function fw(e,t){var n,r,i;return function(){var a=ki(this,e),s=(this.style.removeProperty(e),ki(this,e));return a===s?null:a===n&&s===r?i:i=t(n=a,r=s)}}function sf(e){return function(){this.style.removeProperty(e)}}function mw(e,t,n){var r,i=n+"",a;return function(){var s=ki(this,e);return s===i?null:s===r?a:a=t(r=s,n)}}function gw(e,t,n){var r,i,a;return function(){var s=ki(this,e),o=n(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),ki(this,e))),s===l?null:s===r&&l===i?a:(i=l,a=t(r=s,o))}}function vw(e,t){var n,r,i,a="style."+t,s="end."+a,o;return function(){var l=Un(this,e),c=l.on,u=l.value[a]==null?o||(o=sf(t)):void 0;(c!==n||i!==u)&&(r=(n=c).copy()).on(s,i=u),l.on=r}}function yw(e,t,n){var r=(e+="")=="transform"?ES:af;return t==null?this.styleTween(e,fw(e,r)).on("end.style."+e,sf(e)):typeof t=="function"?this.styleTween(e,gw(e,r,Hc(this,"style."+e,t))).each(vw(this._id,e)):this.styleTween(e,mw(e,r,t),n).on("end.style."+e,null)}function bw(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function _w(e,t,n){var r,i;function a(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&bw(e,s,n)),r}return a._value=t,a}function xw(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,_w(e,t,n??""))}function Ew(e){return function(){this.textContent=e}}function Tw(e){return function(){var t=e(this);this.textContent=t??""}}function Ow(e){return this.tween("text",typeof e=="function"?Tw(Hc(this,"text",e)):Ew(e==null?"":e+""))}function Sw(e){return function(t){this.textContent=e.call(this,t)}}function ww(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&Sw(i)),t}return r._value=e,r}function $w(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,ww(e))}function Cw(){for(var e=this._name,t=this._id,n=of(),r=this._groups,i=r.length,a=0;a<i;++a)for(var s=r[a],o=s.length,l,c=0;c<o;++c)if(l=s[c]){var u=Tn(l,t);ho(l,e,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new tr(r,this._parents,e,n)}function Mw(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,s){var o={value:s},l={value:function(){--i===0&&a()}};n.each(function(){var c=Un(this,r),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),c.on=t}),i===0&&a()})}var Aw=0;function tr(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function of(){return++Aw}var er=La.prototype;tr.prototype={constructor:tr,select:uw,selectAll:hw,selectChild:er.selectChild,selectChildren:er.selectChildren,filter:rw,merge:iw,selection:pw,transition:Cw,call:er.call,nodes:er.nodes,node:er.node,size:er.size,empty:er.empty,each:er.each,on:ow,attr:VS,attrTween:WS,style:yw,styleTween:xw,text:Ow,textTween:$w,remove:cw,tween:DS,delay:XS,duration:QS,ease:tw,easeVarying:nw,end:Mw,[Symbol.iterator]:er[Symbol.iterator]};function lf(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Rw={time:null,delay:0,duration:250,ease:lf};function kw(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Lw(e){var t,n;e instanceof tr?(t=e._id,e=e._name):(t=of(),(n=Rw).time=Dc(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var s=r[a],o=s.length,l,c=0;c<o;++c)(l=s[c])&&ho(l,e,t,c,s,n||kw(l,t));return new tr(r,this._parents,e,t)}La.prototype.interrupt=RS,La.prototype.transition=Lw;function Dw(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function po(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Ii(e){return e=po(Math.abs(e)),e?e[1]:NaN}function Iw(e,t){return function(n,r){for(var i=n.length,a=[],s=0,o=e[0],l=0;i>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),a.push(n.substring(i-=o,i+o)),!((l+=o+1)>r));)o=e[s=(s+1)%e.length];return a.reverse().join(t)}}function Nw(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Pw=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Fa(e){if(!(t=Pw.exec(e)))throw new Error("invalid format: "+e);var t;return new Vc({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Fa.prototype=Vc.prototype;function Vc(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Vc.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 Uw(e){t:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break t;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var cf;function Bw(e,t){var n=po(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(cf=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return a===s?r:a>s?r+new Array(a-s+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+po(e,Math.max(0,t+a-1))[0]}function uf(e,t){var n=po(e,t);if(!n)return e+"";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 hf={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Dw,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>uf(e*100,t),r:uf,s:Bw,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function df(e){return e}var pf=Array.prototype.map,ff=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Hw(e){var t=e.grouping===void 0||e.thousands===void 0?df:Iw(pf.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?df:Nw(pf.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=Fa(d);var h=d.fill,p=d.align,f=d.sign,v=d.symbol,m=d.zero,y=d.width,g=d.comma,x=d.precision,O=d.trim,T=d.type;T==="n"?(g=!0,T="g"):hf[T]||(x===void 0&&(x=12),O=!0,T="g"),(m||h==="0"&&p==="=")&&(m=!0,h="0",p="=");var S=v==="$"?n:v==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():"",D=v==="$"?r:/[%p]/.test(T)?s:"",P=hf[T],I=/[defgprs%]/.test(T);x=x===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function N(M){var q=S,H=D,G,E,L;if(T==="c")H=P(M)+H,M="";else{M=+M;var $=M<0||1/M<0;if(M=isNaN(M)?l:P(Math.abs(M),x),O&&(M=Uw(M)),$&&+M==0&&f!=="+"&&($=!1),q=($?f==="("?f:o:f==="-"||f==="("?"":f)+q,H=(T==="s"?ff[8+cf/3]:"")+H+($&&f==="("?")":""),I){for(G=-1,E=M.length;++G<E;)if(L=M.charCodeAt(G),48>L||L>57){H=(L===46?i+M.slice(G+1):M.slice(G))+H,M=M.slice(0,G);break}}}g&&!m&&(M=t(M,1/0));var V=q.length+M.length+H.length,F=V<y?new Array(y-V+1).join(h):"";switch(g&&m&&(M=t(F+M,F.length?y-H.length:1/0),F=""),p){case"<":M=q+M+H+F;break;case"=":M=q+F+M+H;break;case"^":M=F.slice(0,V=F.length>>1)+q+M+H+F.slice(V);break;default:M=F+q+M+H;break}return a(M)}return N.toString=function(){return d+""},N}function u(d,h){var p=c((d=Fa(d),d.type="f",d)),f=Math.max(-8,Math.min(8,Math.floor(Ii(h)/3)))*3,v=Math.pow(10,-f),m=ff[8+f/3];return function(y){return p(v*y)+m}}return{format:c,formatPrefix:u}}var fo,Fc,mf;Vw({thousands:",",grouping:[3],currency:["$",""]});function Vw(e){return fo=Hw(e),Fc=fo.format,mf=fo.formatPrefix,fo}function Fw(e){return Math.max(0,-Ii(Math.abs(e)))}function Gw(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ii(t)/3)))*3-Ii(Math.abs(e)))}function zw(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ii(t)-Ii(e))+1}function Ni(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const gf=Symbol("implicit");function mo(){var e=new gp,t=[],n=[],r=gf;function i(a){let s=e.get(a);if(s===void 0){if(r!==gf)return r;e.set(a,s=t.push(a)-1)}return n[s%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new gp;for(const s of a)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return mo(t,n).unknown(r)},Ni.apply(i,arguments),i}function jw(e){return function(){return e}}function Ww(e){return+e}var vf=[0,1];function Pi(e){return e}function Gc(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:jw(isNaN(t)?NaN:.5)}function Yw(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function qw(e,t,n){var r=e[0],i=e[1],a=t[0],s=t[1];return i<r?(r=Gc(i,r),a=n(s,a)):(r=Gc(r,i),a=n(a,s)),function(o){return a(r(o))}}function Xw(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)i[s]=Gc(e[s],e[s+1]),a[s]=n(t[s],t[s+1]);return function(o){var l=Ec(e,o,1,r)-1;return a[l](i[l](o))}}function zc(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function yf(){var e=vf,t=vf,n=Pa,r,i,a,s=Pi,o,l,c;function u(){var h=Math.min(e.length,t.length);return s!==Pi&&(s=Yw(e[0],e[h-1])),o=h>2?Xw:qw,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?a:(l||(l=o(e.map(r),t,n)))(r(s(h)))}return d.invert=function(h){return s(i((c||(c=o(t,e.map(r),qe)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,Ww),u()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=jp,u()},d.clamp=function(h){return arguments.length?(s=h?!0:Pi,u()):s!==Pi},d.interpolate=function(h){return arguments.length?(n=h,u()):n},d.unknown=function(h){return arguments.length?(a=h,d):a},function(h,p){return r=h,i=p,u()}}function bf(){return yf()(Pi,Pi)}function Zw(e,t,n,r){var i=Tc(e,t,n),a;switch(r=Fa(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=Gw(i,s))&&(r.precision=a),mf(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=zw(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=Fw(i))&&(r.precision=a-(r.type==="%")*2);break}}return Fc(r)}function _f(e){var t=e.domain;return e.ticks=function(n){var r=t();return Xs(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Zw(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,s=r[i],o=r[a],l,c,u=10;for(o<s&&(c=s,s=o,o=c,c=i,i=a,a=c);u-- >0;){if(c=Ri(s,o,n),c===l)return r[i]=s,r[a]=o,t(r);if(c>0)s=Math.floor(s/c)*c,o=Math.ceil(o/c)*c;else if(c<0)s=Math.ceil(s*c)/c,o=Math.floor(o*c)/c;else break;l=c}return e},e}function On(){var e=bf();return e.copy=function(){return zc(e,On())},Ni.apply(e,arguments),_f(e)}function jc(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function s(l){return l!=null&&l<=l?i[Ec(r,l,0,n)]:a}function o(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return s}return s.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,o()):[e,t]},s.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,o()):i.slice()},s.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},s.unknown=function(l){return arguments.length&&(a=l),s},s.thresholds=function(){return r.slice()},s.copy=function(){return jc().domain([e,t]).range(i).unknown(a)},Ni.apply(_f(s),arguments)}function Ga(e,t,n){this.k=e,this.x=t,this.y=n}Ga.prototype={constructor:Ga,scale:function(e){return e===1?this:new Ga(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ga(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Ga.prototype;const Ve="cds",nr={opacity:{unselected:.05,selected:.4}},_r={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1,hover:{rectanglePadding:4}},Ui={duration:1e3,ease:lf,zoomLevel:3},Bi={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},depth:2},xf={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},un={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},Kw={defaultBins:10},se={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8,spaceAfter:4},checkbox:{radius:6.5},radius:{iconData:[{cx:7,cy:7,r:6.5},{cx:7,cy:10,r:3.5}],fill:null,stroke:"#8c8c8c"},line:{yPosition:6,width:24,strokeWidth:1.4,fill:null,stroke:"#999999"},area:{width:24,height:14,fill:"#6f6f6f",stroke:null},size:{iconData:[{width:23,height:12},{width:13,height:6}],fill:null,stroke:"#8D8D8D"},quartile:{iconData:[{x:0,y:0,width:24,height:13},{x:11,y:4,width:1,height:4}]},zoom:{iconData:[{x:0,y:0,width:12,height:12}],color:"#8D8D8D"},color:{barWidth:300,barHeight:8,axisYTranslation:10}},rr={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},Se={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15},total:{paddingLeft:36,paddingRight:24},height:{default:8,proportional:16},dividerWidth:2},Qt={radiusOffset:-15,innerRadius:2,padAngle:.007,hoverArc:{outerRadiusOffset:3},xOffset:30,yOffset:20,yOffsetCallout:10,callout:{minSliceDegree:5,offsetX:15,offsetY:12,horizontalLineLength:8,textMargin:2}},Jr={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},Sn={nodeWidth:4,nodeHoveredWidth:8,minNodePadding:24,opacity:{unfocus:.3,default:.8,selected:1}},Ef={minCellDividerDimension:16,chartPadding:.5},Tf={default:{size:24}},Of={defaultOffset:4,horizontalOffset:10},Sf={default:{duration:300},pie_slice_mouseover:{duration:100},pie_slice_mouseout:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},Xe={height:{[vn.GRAPH_VIEW]:32,[vn.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},Qw=[{type:ve.RADIUS,name:"Radius"},{type:ve.AREA,name:"Poor area"},{type:ve.AREA,name:"Satisfactory area"},{type:ve.AREA,name:"Great area"},{type:ve.QUARTILE,name:"Quartiles"}],Hi={type:an.END_LINE,threshold:16,numCharacter:14},Jw={code:typeof navigator<"u"&&(navigator==null?void 0:navigator.language)||"en-US",number:(e,t=(navigator==null?void 0:navigator.language)||"en-US")=>e.toLocaleString(t),date:(e,t=(navigator==null?void 0:navigator.language)||"en-US",n={},r=null)=>r||e.toLocaleDateString(t,n),time:(e,t=(navigator==null?void 0:navigator.language)||"en-US",n={},r=null)=>r||e.toLocaleTimeString(t,n),optionsObject:{"15seconds":{primary:{"MMM d, pp":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"MMM d, h:mm:ss.SSS a":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},secondary:{pp:{hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"h:mm:ss.SSS a":{hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},type:"time"},minute:{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},"30minutes":{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},hourly:{primary:{"MMM d, hh a":{month:"short",day:"numeric",hour:"2-digit",hourCycle:"h12"}},secondary:{"hh a":{hour:"2-digit",hourCycle:"h12"}},type:"time"},daily:{primary:{"MMM d":{month:"short",day:"numeric"}},secondary:{d:{day:"numeric"}},type:"date"},weekly:{primary:{"eee, MMM d":{weekday:"short",month:"short",day:"numeric"}},secondary:{eee:{weekday:"short"}},type:"date"},monthly:{primary:{"MMM yyyy":{month:"short",year:"numeric"}},secondary:{MMM:{month:"short"}},type:"date"},quarterly:{primary:{},secondary:{},type:"date"},yearly:{primary:{yyyy:{year:"numeric"}},secondary:{yyyy:{year:"numeric"}},type:"date"}},translations:{group:"Group",total:"Total",meter:{title:""},tabularRep:{title:"Tabular representation",downloadAsCSV:"Download as CSV"},toolbar:{exportAsCSV:"Export to CSV",exportAsJPG:"Export to JPG",exportAsPNG:"Export to PNG",zoomIn:"Zoom in",zoomOut:"Zoom out",resetZoom:"Reset zoom",moreOptions:"More options",makeFullScreen:"Make fullscreen",exitFullScreen:"Exit fullscreen",showAsTable:"Show as table"}}},t$={enabled:!0,position:Ti.BOTTOM,clickable:!0,truncation:Hi,alignment:me.LEFT,order:null,additionalItems:[]},e$={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},n$={enabled:!0},wf={enabled:!0,showTotal:!0,truncation:Hi,groupLabel:"Group"},$f={top:{visible:!0,includeZero:!0,truncation:Hi},bottom:{visible:!0,includeZero:!0,truncation:Hi},left:{visible:!0,includeZero:!0,truncation:Hi},right:{visible:!0,includeZero:!0,truncation:Hi}},go={addSpaceOnEdges:1,showDayName:!1,localeObject:sd,timeIntervalFormats:{"15seconds":{primary:"MMM d, pp",secondary:"pp"},minute:{primary:"MMM d, p",secondary:"p"},"30minutes":{primary:"MMM d, p",secondary:"p"},hourly:{primary:"MMM d, hh a",secondary:"hh a"},daily:{primary:"MMM d",secondary:"d"},weekly:{primary:"eee, MMM d",secondary:"eee"},monthly:{primary:"MMM yyyy",secondary:"MMM"},quarterly:{primary:"QQQ ''yy",secondary:"QQQ"},yearly:{primary:"yyyy",secondary:"yyyy"}}};let Cf=!1;try{Cf=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}catch(e){console.warn("Fullscreen capabilities check failed: ",e.message)}const $e={width:null,height:null,resizable:!0,theme:ql.WHITE,tooltip:wf,legend:t$,locale:Jw,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}},toolbar:{enabled:!0,numberOfIcons:3,controls:[{type:Bt.SHOW_AS_DATATABLE},...Cf?[{type:Bt.MAKE_FULLSCREEN}]:[],{type:Bt.EXPORT_CSV},{type:Bt.EXPORT_PNG},{type:Bt.EXPORT_JPG}]}},Mf=yt({},$e,{thematic:{projection:In.geoNaturalEarth1}}),za=yt({},$e,{axes:$f,timeScale:go,grid:e$,ruler:n$,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:vn.GRAPH_VIEW}}}),ti=yt({},za,{bars:{maxWidth:16,spacingFactor:.25},timeScale:yt(go,{addSpaceOnEdges:1})}),r$=yt({},ti,{}),i$=yt({},ti,{}),a$=yt({},ti,{bars:yt({},ti.bars,{dividerSize:1.5})}),s$=yt({},ti,{}),Wc=yt({},za,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),o$=Wc,Af=yt({},Wc,{points:{radius:3,filled:!1,enabled:!0}}),Rf=yt({},Af,{timeScale:yt(go,{addSpaceOnEdges:0})}),l$=Rf,c$=yt({},za,{bubble:{radiusMapsTo:"radius",radiusLabel:"Radius",radiusRange:e=>{const t=Math.min(e.width,e.height);return[t*3/400,t*25/400]},fillOpacity:.2,enabled:!0},points:{filled:!0},legend:{additionalItems:[{type:ve.RADIUS,name:"Radius"}]}}),u$=yt({},za,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:ve.AREA,name:"Poor area"},{type:ve.AREA,name:"Satisfactory area"},{type:ve.AREA,name:"Great area"},{type:ve.QUARTILE,name:"Quartiles"}]}}),h$=yt({},ti,{bars:{dividerSize:1.5},timeScale:yt(go,{addSpaceOnEdges:0})}),d$=yt({},$e,{tooltip:yt({},wf,{wordLabel:"Word",valueLabel:"Value"}),wordCloud:{fontSizeMapsTo:"value",fontSizeRange:e=>{const t=Math.min(e.width,e.height);return[t*20/400,t*75/400]},wordMapsTo:"word"}}),kf=yt({},$e,{pie:{labels:{formatter:null,enabled:!0},alignment:me.LEFT,sortFunction:null,valueMapsTo:"value"}}),p$=yt({},$e,{legend:{enabled:!1},gauge:{type:Hr.SEMI,arcWidth:16,deltaArrow:{size:e=>e/8,enabled:!0},showPercentageSymbol:!0,status:null,numberSpacing:10,deltaFontSize:e=>e/8,valueFontSize:e=>e/2.5,alignment:me.LEFT}}),f$=yt({},kf,{donut:{center:{numberFontSize:e=>`${Math.min(e/100*24,24)}px`,titleFontSize:e=>`${Math.min(e/100*15,15)}px`,titleYPosition:e=>Math.min(e/80*20,20)},alignment:me.LEFT}}),Lf=yt({},$e,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),m$=yt({},Lf,{legend:{enabled:!0}}),g$=yt({},$e,{radar:{axes:{angle:"key",value:"value"},alignment:me.LEFT},tooltip:{gridline:{enabled:!0}}}),v$=yt({},ti,{comboChartTypes:[]}),y$=yt({tree:{type:Rs.TREE}},$e,{}),b$=yt({},$e,{data:yt($e.data,{groupMapsTo:"name"})}),_$=yt({},$e,Bi,{data:yt($e.data,{groupMapsTo:"name"})}),x$=yt({},$e,{alluvial:{data:yt($e.data,{groupMapsTo:"source"}),nodeAlignment:me.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),E$=yt({},$e,{axes:$f,heatmap:{divider:{state:Si.AUTO},colorLegend:{type:"linear"}}}),T$=yt({},Mf,{choropleth:{colorLegend:{type:"linear"}}}),Xt={alluvialChart:x$,areaChart:Rf,axisChart:za,boxplotChart:s$,bubbleChart:c$,bulletChart:u$,chart:$e,circlePackChart:_$,choroplethChart:T$,comboChart:v$,donutChart:f$,gaugeChart:p$,groupedBarChart:i$,heatmapChart:E$,histogramChart:h$,lineChart:Af,lollipopChart:o$,meterChart:Lf,pieChart:kf,proportionalMeterChart:m$,radarChart:g$,scatterChart:Wc,simpleBarChart:r$,stackedAreaChart:l$,stackedBarChart:a$,thematicChart:Mf,treeChart:y$,treemapChart:b$,wordCloudChart:d$};function O$(e,t,n){let r=null;return function(...i){const a=this;a.mousePosition=Xr(i[0],n),clearTimeout(r),r=setTimeout(function(){e.apply(a,i)},t)}}function ne(e,t){var n;const r=Qn(e),i=Object.keys(t.axes||{});(n=t==null?void 0:t.toolbar)!=null&&n.controls&&delete r.toolbar.controls,i.length===0&&delete r.axes;for(const a in r.axes)if(i.includes(a)){const s=t.axes[a];if((s.primary||s.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://charts.carbondesignsystem.com/"),s.mapsTo==null){const l=s.scaleType;l==null?s.mapsTo="value":l===pt.TIME?s.mapsTo="date":l===pt.LABELS&&(s.mapsTo="key")}}else delete r.axes[a];return qc(r,t),yt(r,t)}function ir(e){if(!e)return;const t=/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/,n=e.getAttribute("transform").match(t);if(!n)return null;if(n[0]){const r=n[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:r[0],ty:r[1]}}return null}function ja(e){const t=/\(([^)]+)\)/.exec(e);if(t&&t.length>1){const n=t[1].split(",");if(n.length>1)return{x:parseFloat(n[0]),y:parseFloat(n[1])}}return{x:0,y:0}}function Yc(e,t,n="value",r=!1){const i=e/t.reduce((a,s)=>a+s[n],0)*100;return r?i:i%1!==0?parseFloat(i.toFixed(1)):i}function Wa(e,t,n){if(n>e.length)return e;if(t===an.MID_LINE)return e.substr(0,n/2)+"..."+e.substr(-n/2);if(t===an.FRONT_LINE)return"..."+e.substr(-n);if(t===an.END_LINE)return e.substr(0,n)+"..."}function qc(e,t){const n=_(e,"legend","additionalItems"),r=_(t,"legend","additionalItems");if(n&&r){const i=r.map(o=>o.type),a=n.map(o=>o.type),s=Qw.filter(o=>a.includes(o.type)&&!i.includes(o.type));e.legend.additionalItems=s,t.legend.additionalItems=aT(s,r,"name")}}const _=(e,...t)=>{let n=e;if(n){for(const r of t)if(n[r]!==null&&n[r]!==void 0)n=n[r];else return null;return n}return null},Df=(e,t)=>t===fe.HORIZONTAL?{y0:e.x0,y1:e.x1,x0:e.y0,x1:e.y1}:e,De=(e,t)=>{const{x0:n,x1:r,y0:i,y1:a}=Df(e,t);return`M${n},${i}L${n},${a}L${r},${a}L${r},${i}L${n},${i}`};function ar(e,t,n){return n===fe.VERTICAL?[e,t]:[t,e]}function If(e){const t=le(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Nf(e,t){const n=le(e,void 0);return n.setHours(0,0,0,0),n}function Pf(e,t,n){const[r,i]=Vr(void 0,e,t),a=Nf(r),s=Nf(i),o=+a-If(a),l=+s-If(s);return Math.round((o-l)/Dy)}function S$(e,t){const n=le(e,void 0);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function w$(e,t){const n=le(e,void 0);return Pf(n,S$(n))+1}function vo(e,t){return _a(e,{...t,weekStartsOn:1})}function Uf(e,t){const n=le(e,void 0),r=n.getFullYear(),i=sn(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const a=vo(i),s=sn(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const o=vo(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=o.getTime()?r:r-1}function $$(e,t){const n=Uf(e),r=sn(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),vo(r)}function C$(e,t){const n=le(e,void 0),r=+vo(n)-+$$(n);return Math.round(r/nd)+1}function Bf(e,t){var n,r,i,a;const s=le(e,t==null?void 0:t.in),o=s.getFullYear(),l=Ds(),c=(t==null?void 0:t.firstWeekContainsDate)??((r=(n=t==null?void 0:t.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??l.firstWeekContainsDate??((a=(i=l.locale)==null?void 0:i.options)==null?void 0:a.firstWeekContainsDate)??1,u=sn((t==null?void 0:t.in)||e,0);u.setFullYear(o+1,0,c),u.setHours(0,0,0,0);const d=_a(u,t),h=sn((t==null?void 0:t.in)||e,0);h.setFullYear(o,0,c),h.setHours(0,0,0,0);const p=_a(h,t);return+s>=+d?o+1:+s>=+p?o:o-1}function M$(e,t){var n,r,i,a;const s=Ds(),o=(t==null?void 0:t.firstWeekContainsDate)??((r=(n=t==null?void 0:t.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??s.firstWeekContainsDate??((a=(i=s.locale)==null?void 0:i.options)==null?void 0:a.firstWeekContainsDate)??1,l=Bf(e,t),c=sn((t==null?void 0:t.in)||e,0);return c.setFullYear(l,0,o),c.setHours(0,0,0,0),_a(c,t)}function A$(e,t){const n=le(e,t==null?void 0:t.in),r=+_a(n,t)-+M$(n,t);return Math.round(r/nd)+1}function Vt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const xr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Vt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Vt(n+1,2)},d(e,t){return Vt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Vt(e.getHours()%12||12,t.length)},H(e,t){return Vt(e.getHours(),t.length)},m(e,t){return Vt(e.getMinutes(),t.length)},s(e,t){return Vt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Vt(i,t.length)}},Vi={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Hf={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return xr.y(e,t)},Y:function(e,t,n,r){const i=Bf(e,r),a=i>0?i:1-i;if(t==="YY"){const s=a%100;return Vt(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):Vt(a,t.length)},R:function(e,t){const n=Uf(e);return Vt(n,t.length)},u:function(e,t){const n=e.getFullYear();return Vt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Vt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Vt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return xr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Vt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=A$(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Vt(i,t.length)},I:function(e,t,n){const r=C$(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Vt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):xr.d(e,t)},D:function(e,t,n){const r=w$(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Vt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Vt(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Vt(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Vt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Vi.noon:r===0?i=Vi.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Vi.evening:r>=12?i=Vi.afternoon:r>=4?i=Vi.morning:i=Vi.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return xr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):xr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Vt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Vt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):xr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):xr.s(e,t)},S:function(e,t){return xr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Ff(r);case"XXXX":case"XX":return ei(r);case"XXXXX":case"XXX":default:return ei(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ff(r);case"xxxx":case"xx":return ei(r);case"xxxxx":case"xxx":default:return ei(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Vf(r,":");case"OOOO":default:return"GMT"+ei(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Vf(r,":");case"zzzz":default:return"GMT"+ei(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Vt(r,t.length)},T:function(e,t,n){return Vt(+e,t.length)}};function Vf(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+Vt(a,2)}function Ff(e,t){return e%60===0?(e>0?"-":"+")+Vt(Math.abs(e)/60,2):ei(e,t)}function ei(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Vt(Math.trunc(r/60),2),a=Vt(r%60,2);return n+i+t+a}const Gf=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},zf=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},R$=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Gf(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Gf(r,t)).replace("{{time}}",zf(i,t))},k$={p:zf,P:R$},L$=/^D+$/,D$=/^Y+$/,I$=["D","DD","YY","YYYY"];function N$(e){return L$.test(e)}function P$(e){return D$.test(e)}function U$(e,t,n){const r=B$(e,t,n);if(console.warn(r),I$.includes(e))throw new RangeError(r)}function B$(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function H$(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function V$(e){return!(!H$(e)&&typeof e!="number"||isNaN(+le(e)))}const F$=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,G$=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,z$=/^'([^]*?)'?$/,j$=/''/g,W$=/[a-zA-Z]/;function Xc(e,t,n){var r,i,a,s,o,l,c,u;const d=Ds(),h=(n==null?void 0:n.locale)??d.locale??sd,p=(n==null?void 0:n.firstWeekContainsDate)??((i=(r=n==null?void 0:n.locale)==null?void 0:r.options)==null?void 0:i.firstWeekContainsDate)??d.firstWeekContainsDate??((s=(a=d.locale)==null?void 0:a.options)==null?void 0:s.firstWeekContainsDate)??1,f=(n==null?void 0:n.weekStartsOn)??((l=(o=n==null?void 0:n.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)??d.weekStartsOn??((u=(c=d.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,v=le(e,n==null?void 0:n.in);if(!V$(v))throw new RangeError("Invalid time value");let m=t.match(G$).map(g=>{const x=g[0];if(x==="p"||x==="P"){const O=k$[x];return O(g,h.formatLong)}return g}).join("").match(F$).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const x=g[0];if(x==="'")return{isToken:!1,value:Y$(g)};if(Hf[x])return{isToken:!0,value:g};if(x.match(W$))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:g}});h.localize.preprocessor&&(m=h.localize.preprocessor(v,m));const y={firstWeekContainsDate:p,weekStartsOn:f,locale:h};return m.map(g=>{if(!g.isToken)return g.value;const x=g.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&P$(x)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&N$(x))&&U$(x,t,String(e));const O=Hf[x[0]];return O(v,x,h.localize,y)}).join("")}function Y$(e){const t=e.match(z$);return t?t[1].replace(j$,"'"):e}const Zc=[["15seconds",15*1e3],["minute",60*1e3],["30minutes",30*60*1e3],["hourly",60*60*1e3],["daily",24*60*60*1e3],["monthly",30*24*60*60*1e3],["quarterly",3*30*24*60*60*1e3],["yearly",12*30*24*60*60*1e3]];function jf(e,t,n,r,i){const a=t===0,s=Number(Xc(new Date(e),"c"))===2,o=Number(Xc(new Date(e),"q"))===1,l=t!==0?n[t-1]:null;switch(r){case"15seconds":return a||bo(e)||Ya(e,l)||Er(e);case"minute":return a||bo(e)||Ya(e,l)||Er(e);case"30minutes":return a||bo(e)||Ya(e,l)||Er(e);case"hourly":return a||bo(e)||Ya(e,l)||Er(e);case"daily":return i?a||s||Er(e):a||Ya(e,l)||Er(e);case"weekly":return a||s||Er(e);case"monthly":return a||Er(e);case"quarterly":return a||o;case"yearly":return!1;default:throw new Error(`${r} is not a valid time interval.`)}}function Kc(e,t,n,r,i,a){const s=i.showDayName,o=r==="daily"&&s?"weekly":r,l=new Date(e),c=_(i,"timeIntervalFormats")[o],u=_(c,"primary"),d=_(c,"secondary"),h=jf(e,t,n,r,s);let p=h?u:d;r==="15seconds"&&l.getMilliseconds()!==0&&(p=p.replace("pp","h:mm:ss.SSS a"));const f=i.localeObject,{code:v,optionsObject:m}=a,y=m[r].type,g=m[r][h?"primary":"secondary"][p];if(r==="quarterly"||!g){const x=Xc(l,p,{locale:f}).split("").map(O=>{const T=Number(O);return O!==" "&&!Number.isNaN(T)?T.toLocaleString(v):O});return a[y](l,v,{},x.join(""))}else return a[y](l,v,g)}function yo(e){const t=new Date(e);return{M:t.getMonth()+1,d:t.getDate(),H:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}}function q$(e){if(e)return e.slice(1).map((t,n)=>t-e[n])}function X$(e){const t=Zc.reduce((n,[,r],i)=>{const a=Zc[n][1],s=Math.abs(a-e),o=Math.abs(r-e);return s<o?n:i},0);return Zc[t][0]}function Qc(e,t){if(ed[t])return t;if(e.length===1)return"15seconds";const n=q$(e),r=br(n);return X$(r)}function bo(e){const{s:t,m:n,H:r}=yo(e);return r===0&&n===0&&t===0}function Ya(e,t){const n=yo(e).M,r=yo(t).M;return n!==r}function Er(e){const{M:t,d:n,s:r,m:i,H:a}=yo(e);return t===1&&n===1&&a===0&&i===0&&r===0}function Wf(e){return e===void 0?"":e.toISOString()}function Yf(e){const t=xn(e,r=>r.value),n=On().domain(t).nice().domain();if(n[0]>0)n[0]=0;else if(n[0]===0&&n[1]===0)return[0,1];return n[0]<0&&n[1]>0&&(Math.abs(n[0])>n[1]?n[1]=Math.abs(n[0]):n[0]=-n[1]),n}function qf(e,t){const n=_(t,"gradient","colors"),r=!_n(n);let i=_(t,"pairing","option");const a=Yf(e),s=a[0]<0&&a[1]>0?"diverge":"mono";(i<1&&i>4&&s==="mono"||i<1&&i>2&&s==="diverge")&&(i=1);const o=r?n:[];if(!r){const l=s==="diverge"?17:11;for(let c=1;c<l+1;c++)o.push(`fill-${s}-${i}-${c}`)}return jc().domain(a).range(o)}var Tt=(e=>(e.GRAPHICS_DOCUMENT="graphics-document",e.GRAPHICS_OBJECT="graphics-object",e.GRAPHICS_SYMBOL="graphics-symbol",e.GROUP="group",e.DOCUMENT="document",e.CHECKBOX="checkbox",e.BUTTON="button",e.MENU="menu",e.MENU_ITEM="menuitem",e.IMG="img",e))(Tt||{});function Z$(e,t){return e&&dp(e,t,Oa)}function K$(e,t){return function(n,r){if(n==null)return n;if(!jr(n))return e(n,r);for(var i=n.length,a=-1,s=Object(n);++a<i&&r(s[a],a,s)!==!1;);return n}}var Jc=K$(Z$);function St(e){return function(){return e}}var Q$=Array.prototype.slice;function _o(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function J$(e,t,n,r){for(var i=-1,a=e==null?0:e.length;++i<a;){var s=e[i];t(r,s,n(s),e)}return r}function tC(e,t,n,r){return Jc(e,function(i,a,s){t(r,i,n(i),s)}),r}function eC(e,t){return function(n,r){var i=Oe(n)?J$:tC,a={};return i(n,e,Ys(r),a)}}function nC(e){for(var t=-1,n=e==null?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}var rC=Object.prototype,iC=rC.hasOwnProperty,aC=eC(function(e,t,n){iC.call(e,n)?e[n].push(t):Ps(e,n,[t])});function sC(e,t){let n=0;for(let r of e)r!=null&&(r=+r)>=r&&++n;return n}function oC(e){return e}function lC(e=Yr){if(e===Yr)return Xf;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function Xf(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var cC=Array.prototype,uC=cC.slice;function tu(e){return()=>e}function hC(e,t,n){let r;for(;;){const i=Ri(e,t,n);if(i===r||i===0||!isFinite(i))return[e,t];i>0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}function dC(e){return Math.max(1,Math.ceil(Math.log(sC(e))/Math.LN2)+1)}function pC(){var e=oC,t=xn,n=dC;function r(i){Array.isArray(i)||(i=Array.from(i));var a,s=i.length,o,l,c=new Array(s);for(a=0;a<s;++a)c[a]=e(i[a],a,i);var u=t(c),d=u[0],h=u[1],p=n(c,d,h);if(!Array.isArray(p)){const x=h,O=+p;if(t===xn&&([d,h]=hC(d,h,O)),p=Xs(d,h,O),p[0]<=d&&(l=Ri(d,h,O)),p[p.length-1]>=h)if(x>=h&&t===xn){const T=Ri(d,h,O);isFinite(T)&&(T>0?h=(Math.floor(h/T)+1)*T:T<0&&(h=(Math.ceil(h*-T)+1)/-T))}else p.pop()}for(var f=p.length,v=0,m=f;p[v]<=d;)++v;for(;p[m-1]>h;)--m;(v||m<f)&&(p=p.slice(v,m),f=m-v);var y=new Array(f+1),g;for(a=0;a<=f;++a)g=y[a]=[],g.x0=a>0?p[a-1]:d,g.x1=a<f?p[a]:h;if(isFinite(l)){if(l>0)for(a=0;a<s;++a)(o=c[a])!=null&&d<=o&&o<=h&&y[Math.min(f,Math.floor((o-d)/l))].push(i[a]);else if(l<0){for(a=0;a<s;++a)if((o=c[a])!=null&&d<=o&&o<=h){const x=Math.floor((d-o)*l);y[Math.min(f,x+(p[x]<=o))].push(i[a])}}}else for(a=0;a<s;++a)(o=c[a])!=null&&d<=o&&o<=h&&y[Ec(p,o,0,f)].push(i[a]);return y}return r.value=function(i){return arguments.length?(e=typeof i=="function"?i:tu(i),r):e},r.domain=function(i){return arguments.length?(t=typeof i=="function"?i:tu([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:tu(Array.isArray(i)?uC.call(i):i),r):n},r}function Zf(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?Xf:lC(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(t-c*d/l+h)),f=Math.min(r,Math.floor(t+(l-c)*d/l+h));Zf(e,t,p,f,i)}const a=e[t];let s=n,o=r;for(qa(e,n,t),i(e[r],a)>0&&qa(e,n,r);s<o;){for(qa(e,s,o),++s,--o;i(e[s],a)<0;)++s;for(;i(e[o],a)>0;)--o}i(e[n],a)===0?qa(e,n,o):(++o,qa(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function qa(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function eu(e,t,n){if(e=Float64Array.from(cT(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return br(e);if(t>=1)return qr(e);var r,i=(r-1)*t,a=Math.floor(i),s=qr(Zf(e,a).subarray(0,a+1)),o=br(e.subarray(a+1));return s+(o-s)*(i-a)}}function Kf(e,t){if((s=e.length)>1)for(var n=1,r,i,a=e[t[0]],s,o=a.length;n<s;++n)for(i=a,a=e[t[n]],r=0;r<o;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Qf(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function fC(e,t){return e[t]}function mC(e){const t=[];return t.key=e,t}function nu(){var e=St([]),t=Qf,n=Kf,r=fC;function i(a){var s=Array.from(e.apply(this,arguments),mC),o,l=s.length,c=-1,u;for(const d of a)for(o=0,++c;o<l;++o)(s[o][c]=[0,+r(d,s[o].key,c,a)]).data=d;for(o=0,u=_o(t(s));o<l;++o)s[u[o]].index=o;return n(s,u),s}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:St(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:St(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?Qf:typeof a=="function"?a:St(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??Kf,i):n},i}function gC(e,t){if((l=e.length)>0)for(var n,r=0,i,a,s,o,l,c=e[t[0]].length;r<c;++r)for(s=o=0,n=0;n<l;++n)(a=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=s,i[1]=s+=a):a<0?(i[1]=o,i[0]=o+=a):(i[0]=0,i[1]=a)}function vC(e){const t=e.trim();return["=","+","-","@"," ","\r"].includes(t.charAt(0))?` ${t}`:/[,\"\n]/.test(t)?`"${t}"`:t}class Bn{constructor(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}formatTable({headers:t,cells:n}){const r=this.getOptions(),{code:i,date:a,number:s}=_(r,"locale"),o=_(r,"tabularRepModal","tableHeadingFormatter"),l=_(r,"tabularRepModal","tableCellFormatter"),{cartesianScales:c}=this.services,u=c==null?void 0:c.getDomainAxisScaleType();let d;return u===pt.TIME&&(d=h=>a(h,i,{month:"short",day:"numeric",year:"numeric"})),[typeof o=="function"?o(t):t,...typeof l=="function"?l(n):n.map(h=>{d&&(h[1]=d(h[1]));for(const p in h){const f=h[p];typeof f=="number"&&(h[p]=s(f,i))}return h})]}getAllDataFromDomain(t){if(!this.getData())return null;const n=this.getOptions();let r=this.getData();const i=this.getDataGroups(),{groupMapsTo:a}=_(n,"data"),s=_(n,"axes");return t&&(r=r.filter(o=>t.includes(o[a]))),s&&Object.keys(s).forEach(o=>{const l=s[o].mapsTo,c=s[o].scaleType;if((c===pt.LINEAR||c===pt.LOG)&&(r=r.map(u=>({...u,[l]:u[l]===null?u[l]:Number(u[l])}))),l&&s[o].domain)if(c===pt.LABELS)r=r.filter(u=>s[o].domain.includes(u[l]));else{const[u,d]=s[o].domain;r=r.filter(h=>!(l in h)||h[l]>=u&&h[l]<=d)}}),r.filter(o=>i.find(l=>l.name===o[a]))}getDisplayData(t){if(!this.get("data"))return null;const{ACTIVE:n}=se.items.status,r=this.getDataGroups(t),{groupMapsTo:i}=this.getOptions().data;return this.getAllDataFromDomain(t).filter(a=>r.find(s=>s.name===a[i]&&s.status===n))}getData(){return this.get("data")}isDataEmpty(){return!this.getData().length}setData(t){const n=this.sanitize(Qn(t)),r=this.generateDataGroups(n);return this.set({data:n,dataGroups:r}),n}getDataGroups(t){return _(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter(n=>t.includes(n.name)):this.get("dataGroups")}getActiveDataGroups(t){const{ACTIVE:n}=se.items.status;return this.getDataGroups(t).filter(r=>r.status===n)}getDataGroupNames(t){return this.getDataGroups(t).map(n=>n.name)}getActiveDataGroupNames(t){return this.getActiveDataGroups(t).map(n=>n.name)}aggregateBinDataByGroup(t){return aC(t,"group")}getBinConfigurations(){const t=this.getDisplayData(),n=this.getOptions(),r=this.services.cartesianScales.getMainXAxisPosition(),i=this.services.cartesianScales.getDomainIdentifier(),a=n.axes[r],{groupMapsTo:s}=n.data,{bins:o=Kw.defaultBins}=a,l=Array.isArray(o),c=pC().value(p=>p[i]).thresholds(o)(t);if(l)c[c.length-1].x1=o[o.length-1];else{const p=c[0].x1-c[0].x0;c[c.length-1].x1=+c[c.length-1].x0+p}const u=l?[o[0],o[o.length-1]]:[c[0].x0,c[c.length-1].x1],d=Array.from(new Set(t.map(p=>p[s]))),h=[];return c.forEach(p=>{const f=`${p.x0}-${p.x1}`,v=this.aggregateBinDataByGroup(p);d.forEach(m=>{h.push({group:m,key:f,value:v[m]||0,bin:p.x0})})}),{bins:c,binsDomain:u}}getBinnedStackedData(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getActiveDataGroupNames(),{bins:i}=this.getBinConfigurations(),a=this.getDataValuesGroupedByKeys({bins:i});return nu().keys(r)(a).map((s,o)=>Object.keys(s).filter(l=>!isNaN(l)).map(l=>{const c=s[l];return c[n]=r[o],c}))}getGroupedData(t){const n=this.getDisplayData(t),r={},{groupMapsTo:i}=this.getOptions().data;return n.map(a=>{const s=a[i];r[s]!==null&&r[s]!==void 0?r[s].push(a):r[s]=[a]}),Object.keys(r).map(a=>({name:a,data:r[a]}))}getStackKeys({bins:t=null,groups:n=null}={bins:null,groups:null}){const r=this.getOptions(),i=this.getDisplayData(n);let a;t?a=t.map(l=>`${l.x0}:${l.x1}`):a=ka(i.map(l=>{const c=this.services.cartesianScales.getDomainIdentifier(l);return l[c]instanceof Date?Wf(l[c]):l[c]&&typeof l[c].toString=="function"?l[c].toString():l[c]}));const s=this.services.cartesianScales.domainAxisPosition,o=r.axes[s].scaleType;return o===pt.TIME?a.sort((l,c)=>{const u=new Date(l),d=new Date(c);return u-d}):(o===pt.LOG||o===pt.LINEAR)&&a.sort((l,c)=>l-c),a}getDataValuesGroupedByKeys({bins:t=null,groups:n=null}){const r=this.getOptions(),{groupMapsTo:i}=r.data,a=this.getDisplayData(n),s=this.getDataGroupNames(),o=this.getStackKeys({bins:t,groups:n});return t?o.map(l=>{const[c,u]=l.split(":"),d={x0:c,x1:u},h=t.find(p=>p.x0.toString()===c.toString());return s.forEach(p=>{d[p]=h.filter(f=>f[i]===p).length}),d}):o.map(l=>{const c={sharedStackKey:l};return s.forEach(u=>{const d=a.find(p=>{const f=this.services.cartesianScales.getDomainIdentifier(p);return p[i]===u&&Object.prototype.hasOwnProperty.call(p,f)&&(p[f]instanceof Date?Wf(p[f])===l:p[f].toString()===l)}),h=this.services.cartesianScales.getRangeIdentifier(c);c[u]=d?d[h]:null}),c})}getStackedData({percentage:t=!1,groups:n=null,divergent:r=!1}){const i=this.getOptions(),{groupMapsTo:a}=i.data,s=this.getActiveDataGroupNames(n),o=this.getDataValuesGroupedByKeys({groups:n});if(t){const l=nC(o.map(c=>[c.sharedStackKey,0]));o.forEach(c=>{s.forEach(u=>{l[c.sharedStackKey]+=c[u]})}),o.forEach(c=>{s.forEach(u=>{const d=l[c.sharedStackKey];l[c.sharedStackKey]?c[u]=c[u]/d*100:c[u]=0})})}return(r?nu().offset(gC):nu()).keys(s)(o).map((l,c)=>Object.keys(l).filter(u=>!isNaN(u)).map(u=>{const d=l[u];return d[a]=s[c],d}))}getOptions(){return this.state.options}set(t,n){this.state=Object.assign({},this.state,t);const r=Object.assign({skipUpdate:!1,animate:!0},n);r.skipUpdate||this.update(r.animate)}get(t){return t?this.state[t]:this.state}setOptions(t){const n=this.getOptions();qc(n,t),this.set({options:yt(n,t)})}update(t=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(w.Model.UPDATE,{animate:t}))}toggleDataLabel(t){const{ACTIVE:n,DISABLED:r}=se.items.status,i=this.getDataGroups(),a=i.some(c=>c.status===r),s=i.filter(c=>c.status===n);if(a)if(s.length===1&&s[0].name===t)i.forEach((c,u)=>{i[u].status=n});else{const c=i.findIndex(u=>u.name===t);i[c].status=i[c].status===r?n:r}else i.forEach((c,u)=>{i[u].status=c.name===t?n:r});const o=i.filter(c=>c.status===n),l=this.getOptions();i.some(c=>c.status===r)?l.data.selectedGroups=o.map(c=>c.name):l.data.selectedGroups=[],this.services.events.dispatchEvent(w.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})}getIsFilled(t,n,r,i){const a=this.getOptions();return a.getIsFilled?a.getIsFilled(t,n,r,i):i}getFillColor(t,n,r){const i=this.getOptions(),a=_(this.colorScale,t);return i.getFillColor?i.getFillColor(t,n,r,a):a}getStrokeColor(t,n,r){const i=this.getOptions(),a=_(this.colorScale,t);return i.getStrokeColor?i.getStrokeColor(t,n,r,a):a}isUserProvidedColorScaleValid(){const t=_(this.getOptions(),"color","scale"),n=this.getDataGroups();return t==null||Object.keys(t).length==0?!1:n.some(r=>Object.keys(t).includes(r.name))}getColorClassName(t){const n=this.colorClassNames(t.dataGroupName);let r=t.originalClassName;return t.classNameTypes.forEach(i=>r=t.originalClassName?`${r} ${i}-${n}`:`${i}-${n}`),r||""}getStatus(){return null}getAllDataGroupsNames(){return this.allDataGroups}transformToTabularData(t){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://charts.carbondesignsystem.com/");const n=[],{datasets:r,labels:i}=t;return r.forEach(a=>{a.data.forEach((s,o)=>{let l;const c=_(a,"label");if(c===null){const d=_(i,o);d?l=d:l="Ungrouped"}else l=c;const u={group:l,key:i[o]};isNaN(s)?(u.value=s.value,u.date=s.date):u.value=s,n.push(u)})}),n}getTabularDataArray(){return[]}exportToCSV(){const t=this.getTabularDataArray().map(a=>a.map(s=>`"${(s==="&ndash;"?"–":s).split(/[,;'"`]/).map(o=>vC(o)).join("")}"`)).map(a=>a.join(",")).join(`
2
+ `),n=this.getOptions();let r="myChart";const i=_(n,"fileDownload","fileName");typeof i=="function"?r=i("csv"):typeof i=="string"&&(r=i),this.services.files.downloadCSV(t,`${r}.csv`)}getTabularData(t){return Array.isArray(t)?t:this.transformToTabularData(t)}sanitize(t){return t=this.getTabularData(t),t}updateAllDataGroups(){this.allDataGroups?this.getDataGroupNames().forEach(t=>{this.allDataGroups.indexOf(t)===-1&&this.allDataGroups.push(t)}):this.allDataGroups=this.getDataGroupNames()}generateDataGroups(t){const{groupMapsTo:n}=this.getOptions().data,{ACTIVE:r,DISABLED:i}=se.items.status,a=this.getOptions(),s=ka(t.map(l=>l[n]));a.data.selectedGroups.length&&(a.data.selectedGroups.every(l=>s.includes(l))||(a.data.selectedGroups=[]));const o=l=>!a.data.selectedGroups.length||a.data.selectedGroups.includes(l)?r:i;return s.map(l=>({name:l,status:o(l)}))}setCustomColorScale(){if(!this.isUserProvidedColorScaleValid())return;const t=this.getOptions(),n=_(t,"color","scale");Object.keys(n).forEach(r=>{this.allDataGroups.includes(r)||console.warn(`"${r}" does not exist in data groups.`)}),this.allDataGroups.filter(r=>n[r]).forEach(r=>this.colorScale[r]=n[r])}setColorClassNames(){const t=_(this.getOptions(),"color","pairing");let n=_(t,"numberOfVariants");(!n||n<this.allDataGroups.length)&&(n=this.allDataGroups.length);let r=_(t,"option");const i=xf.pairingOptions,a=n>5?14:n,s=`${a}-color`;r=r<=i[s]?r:1;const o=this.allDataGroups.map((l,c)=>`${a}-${r}-${c%14+1}`);this.colorClassNames=mo().range(o).domain(this.allDataGroups)}}class ni extends Bn{constructor(t){super(t),this.axisFlavor=va.DEFAULT}assignRangeAndDomains(){const{cartesianScales:t}=this.services,n=this.getOptions(),r=t.isDualAxes(),i={primaryDomain:t.domainAxisPosition,primaryRange:t.rangeAxisPosition,secondaryDomain:null,secondaryRange:null};return r&&(i.secondaryDomain=t.secondaryDomainAxisPosition,i.secondaryRange=t.secondaryRangeAxisPosition),Object.keys(i).forEach(a=>{const s=i[a];t.scales[s]?i[a]={position:s,label:t.getScaleLabel(s),identifier:_(n,"axes",s,"mapsTo")}:i[a]=null}),i}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,{primaryDomain:i,primaryRange:a,secondaryDomain:s,secondaryRange:o}=this.assignRangeAndDomains(),{number:l,code:c}=_(this.getOptions(),"locale"),u=["Group",i.label,a.label,...s?[s.label]:[],...o?[o.label]:[]],d=t.map(h=>[h[r],h[i.identifier]===null?"&ndash;":h[i.identifier],h[a.identifier]===null||isNaN(h[a.identifier])?"&ndash;":l(h[a.identifier],c),...s?[h[s.identifier]===null?"&ndash;":h[s.identifier]]:[],...o?[h[o.identifier]===null||isNaN(h[o.identifier])?"&ndash;":h[o.identifier]]:[]]);return super.formatTable({headers:u,cells:d})}setData(t){let n;if(t&&(n=super.setData(t),_(this.getOptions(),"zoomBar",Z.TOP,"enabled"))){const r=_(this.getOptions(),"zoomBar",Z.TOP,"data");this.setZoomBarData(r)}return n}setZoomBarData(t){const n=t?this.sanitize(Qn(t)):this.getDisplayData();let r=n;const{cartesianScales:i}=this.services;if(n&&i.domainAxisPosition&&i.rangeAxisPosition){const a=i.getDomainIdentifier(),s=i.getRangeIdentifier();let o=n.map(l=>l[a].getTime());o=ka(o).sort(),r=o.map(l=>{let c=0;const u={};return n.forEach(d=>{d[a].getTime()===l&&(c+=d[s])}),u[a]=new Date(l),u[s]=c,u})}this.set({zoomBarData:r})}getZoomBarData(){return this.get("zoomBarData")}sanitizeDateValues(t){const n=this.getOptions();if(!n.axes)return t;const r=[];return Object.keys(Z).forEach(i=>{const a=Z[i],s=n.axes[a];if(s&&s.scaleType===pt.TIME){const o=s.mapsTo;(o!==null||o!==void 0)&&r.push(o)}}),r.length>0&&t.forEach(i=>{r.forEach(a=>{_(i,a,"getTime")===null&&(i[a]=new Date(i[a]))})}),t}sanitize(t){return t=super.sanitize(t),t=this.sanitizeDateValues(t),t}}let yC=class extends ni{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),{number:n,code:r}=_(this.getOptions(),"locale");t.sort((s,o)=>s.source.localeCompare(o.source));const i=["Source","Target","Value"],a=[...t.map(s=>[s.source,s.target,s.value===null?"&ndash;":n(s.value,r)])];return super.formatTable({headers:i,cells:a})}};class bC extends ni{constructor(t){super(t)}getBoxQuartiles(t){return{q_25:eu(t,.25),q_50:eu(t,.5),q_75:eu(t,.75)}}getBoxplotData(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getGroupedData(),i=[];for(const{name:a,data:s}of r){const o=this.services.cartesianScales.getRangeIdentifier(),l=s.map(x=>x[o]).sort(Yr),c={[n]:a,counts:l,quartiles:this.getBoxQuartiles(l),outliers:null,whiskers:null},u=c.quartiles.q_25,d=c.quartiles.q_75,h=(d-u)*1.5,p=u-h,f=d+h,v=[],m=[];for(const x of l)x<p||x>f?v.push(x):m.push(x);c.outliers=v;const y=br(m),g=qr(m);c.whiskers={min:y||br([c.quartiles.q_25,c.quartiles.q_50,c.quartiles.q_75]),max:g||qr([c.quartiles.q_25,c.quartiles.q_50,c.quartiles.q_75])},i.push(c)}return i}getTabularDataArray(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getBoxplotData(),{number:i,code:a}=_(t,"locale"),s=["Group","Minimum","Q1","Median","Q3","Maximum","IQR","Outlier(s)"],o=[...r.map(l=>{let c=_(l,"outliers");return(c===null||c.length===0)&&(c=["&ndash;"]),[l[n],_(l,"whiskers","min")!==null?i(_(l,"whiskers","min"),a):"&ndash;",_(l,"quartiles","q_25")!==null?i(_(l,"quartiles","q_25"),a):"&ndash;",_(l,"quartiles","q_50")!==null?i(_(l,"quartiles","q_50"),a):"&ndash;",_(l,"quartiles","q_75")!==null?i(_(l,"quartiles","q_75"),a):"&ndash;",_(l,"whiskers","max")!==null?i(_(l,"whiskers","max"),a):"&ndash;",_(l,"quartiles","q_75")!==null&&_(l,"quartiles","q_25")!==null?(i(_(l,"quartiles","q_75")-_(l,"quartiles","q_25")),a):"&ndash;",c.map(u=>i(u,a)).join(",")]})];return super.formatTable({headers:s,cells:o})}setColorClassNames(){const t=_(this.getOptions(),"color","pairing");let n=_(t,"option");const r=xf.pairingOptions;n=n<=r["1-color"]?n:1;const i=this.allDataGroups.map(()=>`1-${n}-1`);this.colorClassNames=mo().range(i).domain(this.allDataGroups)}}let _C=class extends ni{constructor(t){super(t)}getMatchingRangeIndexForDatapoint(t){let n;for(let r=t.ranges.length-1;r>0;r--){const i=t.ranges[r];if(t.value>=i)return n=r,n}return 0}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.services.cartesianScales.getRangeIdentifier(),{number:a,code:s}=_(n,"locale"),o=_(n,"bullet","performanceAreaTitles"),l=["Title","Group","Value","Target","Percentage","Performance"],c=[...t.map(u=>[u.title,u[r],u.value===null?"&ndash;":a(u.value,s),_(u,"marker")===null?"&ndash;":a(u.marker,s),_(u,"marker")===null?"&ndash;":`${a(Math.floor(u[i]/u.marker*100),s)}%`,o[this.getMatchingRangeIndexForDatapoint(u)]])];return super.formatTable({headers:l,cells:c})}},xC=class extends Bn{constructor(t){super(t),this._colorScale=void 0,this._matrix={}}getFillColor(t){return this._colorScale(t)}getCombinedData(){if(_n(this._matrix)){const t=this.getOptions(),n=this.getDisplayData();!_n(n)&&!_n(t.geoData.objects.countries)&&(t.geoData.objects.countries.geometries.forEach(r=>{this._matrix[r.properties.NAME]=r}),n.forEach(r=>{this._matrix[r.name]?this._matrix[r.name].value=r.value||null:console.warn(`Data point ${r} is missing geographical data.`)}))}return this._matrix}getTabularDataArray(){const t=this.getDisplayData(),{number:n,code:r}=_(this.getOptions(),"locale"),i=["Country ID","Country Name","Value"],a=[...t.map(s=>[s.id===null?"&ndash;":s.id,s.name,s.value===null?"&ndash;":n(s.value,r)])];return super.formatTable({headers:i,cells:a})}getColorClassName(t){return`${t.originalClassName} ${this._colorScale(t.value)}`}setColorClassNames(){const t=_(this.getOptions(),"color");this._colorScale=qf(this.getDisplayData(),t)}},EC=class extends Bn{constructor(t){super(t),this.parentNode=!1,this.set({depth:2},{skipUpdate:!0})}setData(t){super.setData(t),this.setDataGroups(),t.length===1&&(this.parentNode=!0),this.setZoom()}setOptions(t){const n=this.getOptions(),r=yt({},t,this.getZoomOptions(t));qc(n,r);const i=this.getHierarchyLevel(),a=_(n,"circlePack","depth");this.set({options:yt(n,r),depth:a&&a<4?a:i})}getZoomOptions(t){if(!this.getDisplayData())return{};const n=this.getDisplayData(),r=t||this.getOptions(),i=n.length===1&&_(n,0,"children")?_(n,0,"children"):n;let a=this.getHierarchyLevel();return i.some(s=>{if(s.children&&s.children.some(o=>o.children))return a=3,!1}),_(r,"canvasZoom","enabled")===!0&&a>2?{legend:{additionalItems:[{type:ve.ZOOM,name:"Click to zoom"}]}}:null}setZoom(t){this.setOptions(this.getZoomOptions(t))}updateHierarchyLevel(t){this.set({depth:t})}getHierarchyLevel(){return this.get("depth")}hasParentNode(){return this.parentNode}setDataGroups(){const t=this.getData(),n=this.getOptions(),{groupMapsTo:r}=n.data,i=t.map(a=>{const s=a[r];return this.setChildrenDataGroup(a,s)});this.set({data:i},{skipUpdate:!0})}setChildrenDataGroup(t,n){return t.children?{...t,dataGroupName:n,children:t.children.map(r=>this.setChildrenDataGroup(r,n))}:{...t,dataGroupName:n}}getTabularDataArray(){const t=this.getDisplayData(),{number:n,code:r}=_(this.getOptions(),"locale"),i=["Child","Parent","Value"],a=[];return t.forEach(s=>{let o=s.value?s.value:0;s.children&&(o+=this.getChildrenDatums(s.children,s.name,a,0)),a.push(["&ndash;",s.name,n(o,r)])}),super.formatTable({headers:i,cells:a})}getChildrenDatums(t,n,r=[],i=0){const a=n,{number:s,code:o}=_(this.getOptions(),"locale");return t.forEach(l=>{const c=l.name;let u=0;if(l.children)l.children.length>0&&(typeof l.value=="number"&&(i+=l.value),u+=this.getChildrenDatums(l.children,c,r,u),r.push([c,a,s(u,o)]),i+=u);else{let d=0;typeof l.value=="number"&&(d=l.value,i+=l.value),r.push([l.name,a,s(d,o)])}}),i}},TC=class extends Bn{constructor(t){super(t)}getTabularData(t){const n=super.getTabularData(t);return t!==n&&n.forEach(r=>{r.key&&r.key!==r.group&&(r.group=r.key)}),n}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,{valueMapsTo:i}=n.pie,{number:a,code:s}=_(n,"locale"),o=["Group","Value"],l=[...t.map(c=>[c[r],c[i]===null?"&ndash;":a(c[i],s)])];return super.formatTable({headers:o,cells:l})}sanitize(t){return this.getTabularData(t).sort((n,r)=>r.value-n.value)}};class OC extends Bn{constructor(t){super(t)}getDataGroups(){return super.getDataGroups().filter(t=>t.name!=="delta")}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,{number:i,code:a}=_(this.getOptions(),"locale"),s=["Group","Value"],o=[...t.map(l=>[l[r],l.value===null?"&ndash;":i(l.value,a)])];return super.formatTable({headers:s,cells:o})}}class SC extends ni{constructor(t){super(t),this.axisFlavor=va.HOVERABLE,this._colorScale=void 0,this._domains=[],this._ranges=[],this._matrix={};const n=_(this.getOptions(),"axes");if(_(n,"left","scaleType")&&_(n,"left","scaleType")!==pt.LABELS||_(n,"right","scaleType")&&_(n,"right","scaleType")!==pt.LABELS||_(n,"top","scaleType")&&_(n,"top","scaleType")!==pt.LABELS||_(n,"bottom","scaleType")&&_(n,"bottom","scaleType")!==pt.LABELS)throw Error("Heatmap only supports label scaletypes.")}getValueDomain(){const t=xn(this.getDisplayData(),r=>r.value),n=On().domain(t).nice().domain();if(n[0]>0)n[0]=0;else if(n[0]===0&&n[1]===0)return[0,1];return n[0]<0&&n[1]>0&&(Math.abs(n[0])>n[1]?n[1]=Math.abs(n[0]):n[0]=-n[1]),n}getFillColor(t){return this._colorScale(t)}getUniqueDomain(){if(_n(this._domains)){const t=this.getDisplayData(),{cartesianScales:n}=this.services,r=n.getDomainIdentifier(),i=n.getMainXAxisPosition(),a=n.getCustomDomainValuesByposition(i);if(a)return a;this._domains=Array.from(new Set(t.map(s=>s[r])))}return this._domains}getUniqueRanges(){if(_n(this._ranges)){const t=this.getDisplayData(),{cartesianScales:n}=this.services,r=n.getRangeIdentifier(),i=n.getMainYAxisPosition(),a=n.getCustomDomainValuesByposition(i);if(a)return a;this._ranges=Array.from(new Set(t.map(s=>s[r])))}return this._ranges}getMatrix(){if(_n(this._matrix)){const t=this.getUniqueDomain(),n=this.getUniqueRanges(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),a={};n.forEach(s=>{a[s]={value:null,index:-1}}),t.forEach(s=>{this._matrix[s]=Qn(a)}),this.getDisplayData().forEach((s,o)=>{this._matrix[s[r]][s[i]]={value:s.value,index:o}})}return this._matrix}setData(t){const n=this.sanitize(Qn(t)),r=this.generateDataGroups(n);return this.set({data:n,dataGroups:r}),this._domains=[],this._ranges=[],this._matrix={},n}getMatrixAsArray(){_n(this._matrix)&&this.getMatrix();const t=this.getUniqueDomain(),n=this.getUniqueRanges(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),a=[];return t.forEach(s=>{n.forEach(o=>{const l={value:this._matrix[s][o].value,index:this._matrix[s][o].index};l[r]=s,l[i]=o,a.push(l)})}),a}getTabularDataArray(){const t=this.getDisplayData(),{primaryDomain:n,primaryRange:r}=this.assignRangeAndDomains(),{number:i,code:a}=_(this.getOptions(),"locale"),s=[n.label,r.label,"Value"],o=[...t.map(l=>[l[n.identifier]===null?"&ndash;":l[n.identifier],l[r.identifier]===null?"&ndash;":l[r.identifier],l.value===null?"&ndash;":i(l.value,a)])];return super.formatTable({headers:s,cells:o})}getColorClassName(t){return`${t.originalClassName} ${this._colorScale(t.value)}`}setColorClassNames(){const t=this.getOptions(),n=_(t,"color","gradient","colors"),r=!_n(n);let i=_(t,"color","pairing","option");const a=this.getValueDomain(),s=a[0]<0&&a[1]>0?"diverge":"mono";(i<1&&i>4&&s==="mono"||i<1&&i>2&&s==="diverge")&&(i=1);const o=r?n:[];if(!r){const c=s==="diverge"?17:11;for(let u=1;u<c+1;u++)o.push(`fill-${s}-${i}-${u}`)}this._colorScale=jc().domain(a).range(o);const l=_(this.getOptions(),"color");this._colorScale=qf(this.getDisplayData(),l)}}let wC=class extends ni{getTabularDataArray(){const t=this.getOptions(),{groupMapsTo:n}=t.data,{number:r,code:i}=_(this.getOptions(),"locale"),a=this.getBinnedStackedData(),s=[kt(t,"bins.rangeLabel")||"Range",...a.map(l=>kt(l,`0.${n}`))],o=[...kt(a,0).map((l,c)=>[`${r(Number(kt(l,"data.x0")),i)} – ${r(Number(kt(l,"data.x1")),i)}`,...a.map(u=>r(kt(u[c],`data.${kt(u[c],n)}`),i))])];return super.formatTable({headers:s,cells:o})}};class $C extends Bn{constructor(t){super(t)}getMaximumDomain(t){return t.reduce((n,r)=>n+r.value,0)}getFillColor(t){const n=this.getOptions(),r=_(n,"color","scale"),i=this.getStatus();return r||!i?super.getFillColor(t):null}getStatus(){const t=this.getOptions(),n=_(this.getDisplayData()),r=(n==null?void 0:n.reduce((s,o)=>s+o.value,0))??0,i=_(t,"meter","proportional")?r:r>100?100:r,a=_(t,"meter","status","ranges");if(a){const s=a.filter(o=>o.range[0]<=i&&i<=o.range[1]);if(s.length>0)return s[0].status}return null}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.getStatus(),a=_(n,"meter","proportional"),{number:s,code:o}=_(this.getOptions(),"locale");let l=[],c=[],u;if(a===null){u=100;const d=t[0];l=["Group","Value",...i?["Status"]:[]],c=[[d[r],d.value===null?"&ndash;":s(d.value,o),...i?[i]:[]]]}else u=_(a,"total")||this.getMaximumDomain(t),l=["Group","Value","Percentage of total"],c=[...t.map(h=>{let p;h.value!==null&&h.value!==void 0?p=Number(h.value):p=0;const f=Number((h.value/u*100).toFixed(2));return[h[r],h.value===null?"&ndash;":s(p,o),s(f,o)+" %"]})];return super.formatTable({headers:l,cells:c})}}class CC extends ni{constructor(t){super(t)}getTabularDataArray(){const t=this.getOptions(),n=this.getGroupedData(),{angle:r,value:i}=_(t,"radar","axes"),{number:a,code:s}=_(t,"locale"),o=_(n,"0","data").map(u=>u[r]),l=["Group",...o],c=[...n.map(u=>[u.name,...o.map((d,h)=>_(u,"data",h,i)!==null?a(_(u,"data",h,i),s):"&ndash;")])];return super.formatTable({headers:l,cells:c})}}let MC=class extends Bn{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=["Child","Parent"],r=[];return t.forEach(i=>{this.getChildrenDatums(i,r),r.push([i.name,"&ndash;"])}),super.formatTable({headers:n,cells:r})}getChildrenDatums(t,n=[]){t.children&&t.children.length>0&&t.children.forEach(r=>{this.getChildrenDatums(r,n),n.push([r.name,t.name])})}},AC=class extends Bn{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),{number:n,code:r}=_(this.getOptions(),"locale"),i=["Child","Group","Value"],a=[];return t.forEach(s=>{Array.isArray(s.children)?s.children.forEach(o=>{a.push([o.name,s.name,o.value===null?"&ndash;":n(o.value,r)])}):_(s.name)!==null&&_(s.value)&&a.push(["–",s.name,n(s.value,r)])}),super.formatTable({headers:i,cells:a})}};class RC extends Bn{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{fontSizeMapsTo:r,wordMapsTo:i}=n.wordCloud,{groupMapsTo:a}=n.data,{code:s,number:o}=_(n,"locale"),l=[n.tooltip.wordLabel,"Group",n.tooltip.valueLabel],c=[...t.map(u=>[u[i],u[a],o(u[r],s)])];return super.formatTable({headers:l,cells:c})}}var kC=/\s/;function LC(e){for(var t=e.length;t--&&kC.test(e.charAt(t)););return t}var DC=/^\s+/;function IC(e){return e&&e.slice(0,LC(e)+1).replace(DC,"")}var Jf=NaN,NC=/^[-+]0x[0-9a-f]+$/i,PC=/^0b[01]+$/i,UC=/^0o[0-7]+$/i,BC=parseInt;function Fi(e){if(typeof e=="number")return e;if(Is(e))return Jf;if(ln(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ln(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=IC(e);var n=PC.test(e);return n||UC.test(e)?BC(e.slice(2),n?2:8):NC.test(e)?Jf:+e}var ru=function(){return yn.Date.now()},HC="Expected a function",VC=Math.max,FC=Math.min;function xo(e,t,n){var r,i,a,s,o,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(HC);t=Fi(t)||0,ln(n)&&(u=!!n.leading,d="maxWait"in n,a=d?VC(Fi(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h);function p(S){var D=r,P=i;return r=i=void 0,c=S,s=e.apply(P,D),s}function f(S){return c=S,o=setTimeout(y,t),u?p(S):s}function v(S){var D=S-l,P=S-c,I=t-D;return d?FC(I,a-P):I}function m(S){var D=S-l,P=S-c;return l===void 0||D>=t||D<0||d&&P>=a}function y(){var S=ru();if(m(S))return g(S);o=setTimeout(y,v(S))}function g(S){return o=void 0,h&&r?p(S):(r=i=void 0,s)}function x(){o!==void 0&&clearTimeout(o),c=0,r=l=i=o=void 0}function O(){return o===void 0?s:g(ru())}function T(){var S=ru(),D=m(S);if(r=arguments,i=this,l=S,D){if(o===void 0)return f(l);if(d)return clearTimeout(o),o=setTimeout(y,t),p(l)}return o===void 0&&(o=setTimeout(y,t)),s}return T.cancel=x,T.flush=O,T}function GC(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function U(e){return typeof e=="string"?new Ye([[document.querySelector(e)]],[document.documentElement]):new Ye([[e]],Rp)}function Xa(){var e=mo().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,s,o=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var h=t().length,p=i<r,f=p?i:r,v=p?r:i;a=(v-f)/Math.max(1,h-l+c*2),o&&(a=Math.floor(a)),f+=(v-f-a*(h-l))*u,s=a*(1-l),o&&(f=Math.round(f),s=Math.round(s));var m=GC(h).map(function(y){return f+a*y});return n(p?m.reverse():m)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,o=!0,d()},e.bandwidth=function(){return s},e.step=function(){return a},e.round=function(h){return arguments.length?(o=!!h,d()):o},e.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),d()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),d()):l},e.paddingOuter=function(h){return arguments.length?(c=+h,d()):c},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),d()):u},e.copy=function(){return Xa(t(),[r,i]).round(o).paddingInner(l).paddingOuter(c).align(u)},Ni.apply(d(),arguments)}function tm(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],s;return a<i&&(s=n,n=r,r=s,s=i,i=a,a=s),e[n]=t.floor(i),e[r]=t.ceil(a),e}const iu=new Date,au=new Date;function be(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const s=i(a),o=i.ceil(a);return a-s<o-a?s:o},i.offset=(a,s)=>(t(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,o)=>{const l=[];if(a=i.ceil(a),o=o==null?1:Math.floor(o),!(a<s)||!(o>0))return l;let c;do l.push(c=new Date(+a)),t(a,o),e(a);while(c<a&&a<s);return l},i.filter=a=>be(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!a(s););else for(;--o>=0;)for(;t(s,1),!a(s););}),n&&(i.count=(a,s)=>(iu.setTime(+a),au.setTime(+s),e(iu),e(au),Math.floor(n(iu,au))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?s=>r(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const Eo=be(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Eo.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?be(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Eo),Eo.range;const sr=1e3,hn=sr*60,or=hn*60,lr=or*24,su=lr*7,em=lr*30,ou=lr*365,Gi=be(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*sr)},(e,t)=>(t-e)/sr,e=>e.getUTCSeconds());Gi.range;const lu=be(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*sr)},(e,t)=>{e.setTime(+e+t*hn)},(e,t)=>(t-e)/hn,e=>e.getMinutes());lu.range,be(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*hn)},(e,t)=>(t-e)/hn,e=>e.getUTCMinutes()).range;const cu=be(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*sr-e.getMinutes()*hn)},(e,t)=>{e.setTime(+e+t*or)},(e,t)=>(t-e)/or,e=>e.getHours());cu.range,be(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*or)},(e,t)=>(t-e)/or,e=>e.getUTCHours()).range;const Za=be(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*hn)/lr,e=>e.getDate()-1);Za.range;const uu=be(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lr,e=>e.getUTCDate()-1);uu.range,be(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lr,e=>Math.floor(e/lr)).range;function ri(e){return be(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*hn)/su)}const To=ri(0),Oo=ri(1),zC=ri(2),jC=ri(3),zi=ri(4),WC=ri(5),YC=ri(6);To.range,Oo.range,zC.range,jC.range,zi.range,WC.range,YC.range;function ii(e){return be(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/su)}const nm=ii(0),So=ii(1),qC=ii(2),XC=ii(3),ji=ii(4),ZC=ii(5),KC=ii(6);nm.range,So.range,qC.range,XC.range,ji.range,ZC.range,KC.range;const hu=be(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());hu.range,be(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()).range;const cr=be(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());cr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:be(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),cr.range;const ai=be(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ai.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:be(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),ai.range;function QC(e,t,n,r,i,a){const s=[[Gi,1,sr],[Gi,5,5*sr],[Gi,15,15*sr],[Gi,30,30*sr],[a,1,hn],[a,5,5*hn],[a,15,15*hn],[a,30,30*hn],[i,1,or],[i,3,3*or],[i,6,6*or],[i,12,12*or],[r,1,lr],[r,2,2*lr],[n,1,su],[t,1,em],[t,3,3*em],[e,1,ou]];function o(c,u,d){const h=u<c;h&&([c,u]=[u,c]);const p=d&&typeof d.range=="function"?d:l(c,u,d),f=p?p.range(c,+u+1):[];return h?f.reverse():f}function l(c,u,d){const h=Math.abs(u-c)/d,p=xc(([,,m])=>m).right(s,h);if(p===s.length)return e.every(Tc(c/ou,u/ou,d));if(p===0)return Eo.every(Math.max(Tc(c,u,d),1));const[f,v]=s[h/s[p-1][2]<s[p][2]/h?p-1:p];return f.every(v)}return[o,l]}const[JC,tM]=QC(cr,hu,To,Za,cu,lu);function du(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function pu(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ka(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function eM(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,c=Qa(i),u=Ja(i),d=Qa(a),h=Ja(a),p=Qa(s),f=Ja(s),v=Qa(o),m=Ja(o),y=Qa(l),g=Ja(l),x={a:$,A:V,b:F,B:rt,c:null,d:lm,e:lm,f:OM,g:DM,G:NM,H:xM,I:EM,j:TM,L:cm,m:SM,M:wM,p:A,q:j,Q:mm,s:gm,S:$M,u:CM,U:MM,V:AM,w:RM,W:kM,x:null,X:null,y:LM,Y:IM,Z:PM,"%":fm},O={a:et,A:ct,b:it,B:J,c:null,d:hm,e:hm,f:VM,g:KM,G:JM,H:UM,I:BM,j:HM,L:dm,m:FM,M:GM,p:at,q:ht,Q:mm,s:gm,S:zM,u:jM,U:WM,V:YM,w:qM,W:XM,x:null,X:null,y:ZM,Y:QM,Z:t2,"%":fm},T={a:N,A:M,b:q,B:H,c:G,d:sm,e:sm,f:vM,g:am,G:im,H:om,I:om,j:pM,L:gM,m:dM,M:fM,p:I,q:hM,Q:bM,s:_M,S:mM,u:sM,U:oM,V:lM,w:aM,W:cM,x:E,X:L,y:am,Y:im,Z:uM,"%":yM};x.x=S(n,x),x.X=S(r,x),x.c=S(t,x),O.x=S(n,O),O.X=S(r,O),O.c=S(t,O);function S(Y,lt){return function(_t){var K=[],Dt=-1,Ot=0,Jt=Y.length,Yt,ut,Nt;for(_t instanceof Date||(_t=new Date(+_t));++Dt<Jt;)Y.charCodeAt(Dt)===37&&(K.push(Y.slice(Ot,Dt)),(ut=rm[Yt=Y.charAt(++Dt)])!=null?Yt=Y.charAt(++Dt):ut=Yt==="e"?" ":"0",(Nt=lt[Yt])&&(Yt=Nt(_t,ut)),K.push(Yt),Ot=Dt+1);return K.push(Y.slice(Ot,Dt)),K.join("")}}function D(Y,lt){return function(_t){var K=Ka(1900,void 0,1),Dt=P(K,Y,_t+="",0),Ot,Jt;if(Dt!=_t.length)return null;if("Q"in K)return new Date(K.Q);if("s"in K)return new Date(K.s*1e3+("L"in K?K.L:0));if(lt&&!("Z"in K)&&(K.Z=0),"p"in K&&(K.H=K.H%12+K.p*12),K.m===void 0&&(K.m="q"in K?K.q:0),"V"in K){if(K.V<1||K.V>53)return null;"w"in K||(K.w=1),"Z"in K?(Ot=pu(Ka(K.y,0,1)),Jt=Ot.getUTCDay(),Ot=Jt>4||Jt===0?So.ceil(Ot):So(Ot),Ot=uu.offset(Ot,(K.V-1)*7),K.y=Ot.getUTCFullYear(),K.m=Ot.getUTCMonth(),K.d=Ot.getUTCDate()+(K.w+6)%7):(Ot=du(Ka(K.y,0,1)),Jt=Ot.getDay(),Ot=Jt>4||Jt===0?Oo.ceil(Ot):Oo(Ot),Ot=Za.offset(Ot,(K.V-1)*7),K.y=Ot.getFullYear(),K.m=Ot.getMonth(),K.d=Ot.getDate()+(K.w+6)%7)}else("W"in K||"U"in K)&&("w"in K||(K.w="u"in K?K.u%7:"W"in K?1:0),Jt="Z"in K?pu(Ka(K.y,0,1)).getUTCDay():du(Ka(K.y,0,1)).getDay(),K.m=0,K.d="W"in K?(K.w+6)%7+K.W*7-(Jt+5)%7:K.w+K.U*7-(Jt+6)%7);return"Z"in K?(K.H+=K.Z/100|0,K.M+=K.Z%100,pu(K)):du(K)}}function P(Y,lt,_t,K){for(var Dt=0,Ot=lt.length,Jt=_t.length,Yt,ut;Dt<Ot;){if(K>=Jt)return-1;if(Yt=lt.charCodeAt(Dt++),Yt===37){if(Yt=lt.charAt(Dt++),ut=T[Yt in rm?lt.charAt(Dt++):Yt],!ut||(K=ut(Y,_t,K))<0)return-1}else if(Yt!=_t.charCodeAt(K++))return-1}return K}function I(Y,lt,_t){var K=c.exec(lt.slice(_t));return K?(Y.p=u.get(K[0].toLowerCase()),_t+K[0].length):-1}function N(Y,lt,_t){var K=p.exec(lt.slice(_t));return K?(Y.w=f.get(K[0].toLowerCase()),_t+K[0].length):-1}function M(Y,lt,_t){var K=d.exec(lt.slice(_t));return K?(Y.w=h.get(K[0].toLowerCase()),_t+K[0].length):-1}function q(Y,lt,_t){var K=y.exec(lt.slice(_t));return K?(Y.m=g.get(K[0].toLowerCase()),_t+K[0].length):-1}function H(Y,lt,_t){var K=v.exec(lt.slice(_t));return K?(Y.m=m.get(K[0].toLowerCase()),_t+K[0].length):-1}function G(Y,lt,_t){return P(Y,t,lt,_t)}function E(Y,lt,_t){return P(Y,n,lt,_t)}function L(Y,lt,_t){return P(Y,r,lt,_t)}function $(Y){return s[Y.getDay()]}function V(Y){return a[Y.getDay()]}function F(Y){return l[Y.getMonth()]}function rt(Y){return o[Y.getMonth()]}function A(Y){return i[+(Y.getHours()>=12)]}function j(Y){return 1+~~(Y.getMonth()/3)}function et(Y){return s[Y.getUTCDay()]}function ct(Y){return a[Y.getUTCDay()]}function it(Y){return l[Y.getUTCMonth()]}function J(Y){return o[Y.getUTCMonth()]}function at(Y){return i[+(Y.getUTCHours()>=12)]}function ht(Y){return 1+~~(Y.getUTCMonth()/3)}return{format:function(Y){var lt=S(Y+="",x);return lt.toString=function(){return Y},lt},parse:function(Y){var lt=D(Y+="",!1);return lt.toString=function(){return Y},lt},utcFormat:function(Y){var lt=S(Y+="",O);return lt.toString=function(){return Y},lt},utcParse:function(Y){var lt=D(Y+="",!0);return lt.toString=function(){return Y},lt}}}var rm={"-":"",_:" ",0:"0"},Ee=/^\s*\d+/,nM=/^%/,rM=/[\\^$*+?|[\]().{}]/g;function It(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function iM(e){return e.replace(rM,"\\$&")}function Qa(e){return new RegExp("^(?:"+e.map(iM).join("|")+")","i")}function Ja(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function aM(e,t,n){var r=Ee.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function sM(e,t,n){var r=Ee.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function oM(e,t,n){var r=Ee.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function lM(e,t,n){var r=Ee.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function cM(e,t,n){var r=Ee.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function im(e,t,n){var r=Ee.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function am(e,t,n){var r=Ee.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function uM(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function hM(e,t,n){var r=Ee.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function dM(e,t,n){var r=Ee.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function sm(e,t,n){var r=Ee.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function pM(e,t,n){var r=Ee.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function om(e,t,n){var r=Ee.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function fM(e,t,n){var r=Ee.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function mM(e,t,n){var r=Ee.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function gM(e,t,n){var r=Ee.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function vM(e,t,n){var r=Ee.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function yM(e,t,n){var r=nM.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function bM(e,t,n){var r=Ee.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function _M(e,t,n){var r=Ee.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function lm(e,t){return It(e.getDate(),t,2)}function xM(e,t){return It(e.getHours(),t,2)}function EM(e,t){return It(e.getHours()%12||12,t,2)}function TM(e,t){return It(1+Za.count(cr(e),e),t,3)}function cm(e,t){return It(e.getMilliseconds(),t,3)}function OM(e,t){return cm(e,t)+"000"}function SM(e,t){return It(e.getMonth()+1,t,2)}function wM(e,t){return It(e.getMinutes(),t,2)}function $M(e,t){return It(e.getSeconds(),t,2)}function CM(e){var t=e.getDay();return t===0?7:t}function MM(e,t){return It(To.count(cr(e)-1,e),t,2)}function um(e){var t=e.getDay();return t>=4||t===0?zi(e):zi.ceil(e)}function AM(e,t){return e=um(e),It(zi.count(cr(e),e)+(cr(e).getDay()===4),t,2)}function RM(e){return e.getDay()}function kM(e,t){return It(Oo.count(cr(e)-1,e),t,2)}function LM(e,t){return It(e.getFullYear()%100,t,2)}function DM(e,t){return e=um(e),It(e.getFullYear()%100,t,2)}function IM(e,t){return It(e.getFullYear()%1e4,t,4)}function NM(e,t){var n=e.getDay();return e=n>=4||n===0?zi(e):zi.ceil(e),It(e.getFullYear()%1e4,t,4)}function PM(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+It(t/60|0,"0",2)+It(t%60,"0",2)}function hm(e,t){return It(e.getUTCDate(),t,2)}function UM(e,t){return It(e.getUTCHours(),t,2)}function BM(e,t){return It(e.getUTCHours()%12||12,t,2)}function HM(e,t){return It(1+uu.count(ai(e),e),t,3)}function dm(e,t){return It(e.getUTCMilliseconds(),t,3)}function VM(e,t){return dm(e,t)+"000"}function FM(e,t){return It(e.getUTCMonth()+1,t,2)}function GM(e,t){return It(e.getUTCMinutes(),t,2)}function zM(e,t){return It(e.getUTCSeconds(),t,2)}function jM(e){var t=e.getUTCDay();return t===0?7:t}function WM(e,t){return It(nm.count(ai(e)-1,e),t,2)}function pm(e){var t=e.getUTCDay();return t>=4||t===0?ji(e):ji.ceil(e)}function YM(e,t){return e=pm(e),It(ji.count(ai(e),e)+(ai(e).getUTCDay()===4),t,2)}function qM(e){return e.getUTCDay()}function XM(e,t){return It(So.count(ai(e)-1,e),t,2)}function ZM(e,t){return It(e.getUTCFullYear()%100,t,2)}function KM(e,t){return e=pm(e),It(e.getUTCFullYear()%100,t,2)}function QM(e,t){return It(e.getUTCFullYear()%1e4,t,4)}function JM(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ji(e):ji.ceil(e),It(e.getUTCFullYear()%1e4,t,4)}function t2(){return"+0000"}function fm(){return"%"}function mm(e){return+e}function gm(e){return Math.floor(+e/1e3)}var Wi,vm;e2({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 e2(e){return Wi=eM(e),vm=Wi.format,Wi.parse,Wi.utcFormat,Wi.utcParse,Wi}function n2(e){return new Date(e)}function r2(e){return e instanceof Date?+e:+new Date(+e)}function ym(e,t,n,r,i,a,s,o,l,c){var u=bf(),d=u.invert,h=u.domain,p=c(".%L"),f=c(":%S"),v=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),g=c("%b %d"),x=c("%B"),O=c("%Y");function T(S){return(l(S)<S?p:o(S)<S?f:s(S)<S?v:a(S)<S?m:r(S)<S?i(S)<S?y:g:n(S)<S?x:O)(S)}return u.invert=function(S){return new Date(d(S))},u.domain=function(S){return arguments.length?h(Array.from(S,r2)):h().map(n2)},u.ticks=function(S){var D=h();return e(D[0],D[D.length-1],S??10)},u.tickFormat=function(S,D){return D==null?T:c(D)},u.nice=function(S){var D=h();return(!S||typeof S.range!="function")&&(S=t(D[0],D[D.length-1],S??10)),S?h(tm(D,S)):u},u.copy=function(){return zc(u,ym(e,t,n,r,i,a,s,o,l,c))},u}function bm(){return Ni.apply(ym(JC,tM,cr,hu,To,Za,cu,lu,Gi,vm).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}const _m=Math.abs,Ce=Math.atan2,si=Math.cos,i2=Math.max,fu=Math.min,Hn=Math.sin,Yi=Math.sqrt,Me=1e-12,ts=Math.PI,wo=ts/2,$o=2*ts;function a2(e){return e>1?0:e<-1?ts:Math.acos(e)}function xm(e){return e>=1?wo:e<=-1?-wo:Math.asin(e)}function Em(e){this._context=e}Em.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Co(e){return new Em(e)}function Tr(){}function Tm(e){this._context=e}Tm.prototype={areaStart:Tr,areaEnd:Tr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Om(e){return new Tm(e)}function s2(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),r=n.createElement("base"),i=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(i),t&&(r.href=t),i.href=e,i.href}const o2=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function ur(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}function Mo(e,t){const n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function l2(e){const t=Mo(e,"border-left-width"),n=Mo(e,"border-right-width");return e.clientWidth+t+n}function c2(e){const t=Mo(e,"border-top-width"),n=Mo(e,"border-bottom-width");return e.clientHeight+t+n}function Sm(e,t={}){const n=t.width||l2(e),r=t.height||c2(e);return{width:n,height:r}}function u2(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const Ze=16384;function h2(e){(e.width>Ze||e.height>Ze)&&(e.width>Ze&&e.height>Ze?e.width>e.height?(e.height*=Ze/e.width,e.width=Ze):(e.width*=Ze/e.height,e.height=Ze):e.width>Ze?(e.height*=Ze/e.width,e.width=Ze):(e.width*=Ze/e.height,e.height=Ze))}function Ao(e){return new Promise((t,n)=>{const r=new Image;r.decode=()=>t(r),r.onload=()=>t(r),r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e})}async function d2(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function p2(e,t,n){const r="http://www.w3.org/2000/svg",i=document.createElementNS(r,"svg"),a=document.createElementNS(r,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${n}`),i.setAttribute("viewBox",`0 0 ${t} ${n}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),i.appendChild(a),a.appendChild(e),d2(i)}const Fe=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||Fe(n,t)};function f2(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function m2(e){return ur(e).map(t=>{const n=e.getPropertyValue(t),r=e.getPropertyPriority(t);return`${t}: ${n}${r?" !important":""};`}).join(" ")}function g2(e,t,n){const r=`.${e}:${t}`,i=n.cssText?f2(n):m2(n);return document.createTextNode(`${r}{${i}}`)}function wm(e,t,n){const r=window.getComputedStyle(e,n),i=r.getPropertyValue("content");if(i===""||i==="none")return;const a=o2();try{t.className=`${t.className} ${a}`}catch{return}const s=document.createElement("style");s.appendChild(g2(a,n,r)),t.appendChild(s)}function v2(e,t){wm(e,t,":before"),wm(e,t,":after")}const $m="application/font-woff",Cm="image/jpeg",y2={woff:$m,woff2:$m,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Cm,jpeg:Cm,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function b2(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function mu(e){const t=b2(e).toLowerCase();return y2[t]||""}function _2(e){return e.split(/,/)[1]}function gu(e){return e.search(/^(data:)/)!==-1}function x2(e,t){return`data:${t};base64,${e}`}async function Mm(e,t,n){const r=await fetch(e,t);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);const i=await r.blob();return new Promise((a,s)=>{const o=new FileReader;o.onerror=s,o.onloadend=()=>{try{a(n({res:r,result:o.result}))}catch(l){s(l)}},o.readAsDataURL(i)})}const vu={};function E2(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}async function yu(e,t,n){const r=E2(e,t,n.includeQueryParams);if(vu[r]!=null)return vu[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{const a=await Mm(e,n.fetchRequestInit,({res:s,result:o})=>(t||(t=s.headers.get("Content-Type")||""),_2(o)));i=x2(a,t)}catch(a){i=n.imagePlaceholder||"";let s=`Failed to fetch resource: ${e}`;a&&(s=typeof a=="string"?a:a.message),s&&console.warn(s)}return vu[r]=i,i}async function T2(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):Ao(t)}async function O2(e,t){if(e.currentSrc){const a=document.createElement("canvas"),s=a.getContext("2d");a.width=e.clientWidth,a.height=e.clientHeight,s==null||s.drawImage(e,0,0,a.width,a.height);const o=a.toDataURL();return Ao(o)}const n=e.poster,r=mu(n),i=await yu(n,r,t);return Ao(i)}async function S2(e){var t;try{if(!((t=e==null?void 0:e.contentDocument)===null||t===void 0)&&t.body)return await Ro(e.contentDocument.body,{},!0)}catch{}return e.cloneNode(!1)}async function w2(e,t){return Fe(e,HTMLCanvasElement)?T2(e):Fe(e,HTMLVideoElement)?O2(e,t):Fe(e,HTMLIFrameElement)?S2(e):e.cloneNode(!1)}const $2=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT";async function C2(e,t,n){var r,i;let a=[];return $2(e)&&e.assignedNodes?a=ur(e.assignedNodes()):Fe(e,HTMLIFrameElement)&&!((r=e.contentDocument)===null||r===void 0)&&r.body?a=ur(e.contentDocument.body.childNodes):a=ur(((i=e.shadowRoot)!==null&&i!==void 0?i:e).childNodes),a.length===0||Fe(e,HTMLVideoElement)||await a.reduce((s,o)=>s.then(()=>Ro(o,n)).then(l=>{l&&t.appendChild(l)}),Promise.resolve()),t}function M2(e,t){const n=t.style;if(!n)return;const r=window.getComputedStyle(e);r.cssText?(n.cssText=r.cssText,n.transformOrigin=r.transformOrigin):ur(r).forEach(i=>{let a=r.getPropertyValue(i);i==="font-size"&&a.endsWith("px")&&(a=`${Math.floor(parseFloat(a.substring(0,a.length-2)))-.1}px`),Fe(e,HTMLIFrameElement)&&i==="display"&&a==="inline"&&(a="block"),i==="d"&&t.getAttribute("d")&&(a=`path(${t.getAttribute("d")})`),n.setProperty(i,a,r.getPropertyPriority(i))})}function A2(e,t){Fe(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),Fe(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function R2(e,t){if(Fe(e,HTMLSelectElement)){const n=t,r=Array.from(n.children).find(i=>e.value===i.getAttribute("value"));r&&r.setAttribute("selected","")}}function k2(e,t){return Fe(t,Element)&&(M2(e,t),v2(e,t),A2(e,t),R2(e,t)),t}async function L2(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const r={};for(let a=0;a<n.length;a++){const s=n[a].getAttribute("xlink:href");if(s){const o=e.querySelector(s),l=document.querySelector(s);!o&&l&&!r[s]&&(r[s]=await Ro(l,t,!0))}}const i=Object.values(r);if(i.length){const a="http://www.w3.org/1999/xhtml",s=document.createElementNS(a,"svg");s.setAttribute("xmlns",a),s.style.position="absolute",s.style.width="0",s.style.height="0",s.style.overflow="hidden",s.style.display="none";const o=document.createElementNS(a,"defs");s.appendChild(o);for(let l=0;l<i.length;l++)o.appendChild(i[l]);e.appendChild(s)}return e}async function Ro(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>w2(r,t)).then(r=>C2(e,r,t)).then(r=>k2(e,r)).then(r=>L2(r,t))}const Am=/url\((['"]?)([^'"]+?)\1\)/g,D2=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,I2=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function N2(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function P2(e){const t=[];return e.replace(Am,(n,r,i)=>(t.push(i),n)),t.filter(n=>!gu(n))}async function U2(e,t,n,r,i){try{const a=n?s2(t,n):t,s=mu(t);let o;return i||(o=await yu(a,s,r)),e.replace(N2(t),`$1${o}$3`)}catch{}return e}function B2(e,{preferredFontFormat:t}){return t?e.replace(I2,n=>{for(;;){const[r,,i]=D2.exec(n)||[];if(!i)return"";if(i===t)return`src: ${r};`}}):e}function Rm(e){return e.search(Am)!==-1}async function km(e,t,n){if(!Rm(e))return e;const r=B2(e,n);return P2(r).reduce((i,a)=>i.then(s=>U2(s,a,t,n)),Promise.resolve(r))}async function ko(e,t,n){var r;const i=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(i){const a=await km(i,null,n);return t.style.setProperty(e,a,t.style.getPropertyPriority(e)),!0}return!1}async function H2(e,t){await ko("background",e,t)||await ko("background-image",e,t),await ko("mask",e,t)||await ko("mask-image",e,t)}async function V2(e,t){const n=Fe(e,HTMLImageElement);if(!(n&&!gu(e.src))&&!(Fe(e,SVGImageElement)&&!gu(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,i=await yu(r,mu(r),t);await new Promise((a,s)=>{e.onload=a,e.onerror=s;const o=e;o.decode&&(o.decode=a),o.loading==="lazy"&&(o.loading="eager"),n?(e.srcset="",e.src=i):e.href.baseVal=i})}async function F2(e,t){const n=ur(e.childNodes).map(r=>Lm(r,t));await Promise.all(n).then(()=>e)}async function Lm(e,t){Fe(e,Element)&&(await H2(e,t),await V2(e,t),await F2(e,t))}function G2(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const r=t.style;return r!=null&&Object.keys(r).forEach(i=>{n[i]=r[i]}),e}const Dm={};async function Im(e){let t=Dm[e];if(t!=null)return t;const n=await(await fetch(e)).text();return t={url:e,cssText:n},Dm[e]=t,t}async function Nm(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,i=(n.match(/url\([^)]+\)/g)||[]).map(async a=>{let s=a.replace(r,"$1");return s.startsWith("https://")||(s=new URL(s,e.url).href),Mm(s,t.fetchRequestInit,({result:o})=>(n=n.replace(a,`url(${o})`),[a,o]))});return Promise.all(i).then(()=>n)}function Pm(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let r=e.replace(n,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const l=i.exec(r);if(l===null)break;t.push(l[0])}r=r.replace(i,"");const a=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,s="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",o=new RegExp(s,"gi");for(;;){let l=a.exec(r);if(l===null){if(l=o.exec(r),l===null)break;a.lastIndex=o.lastIndex}else o.lastIndex=a.lastIndex;t.push(l[0])}return t}async function z2(e,t){const n=[],r=[];return e.forEach(i=>{if("cssRules"in i)try{ur(i.cssRules||[]).forEach((a,s)=>{if(a.type===CSSRule.IMPORT_RULE){let o=s+1;const l=a.href,c=Im(l).then(u=>Nm(u,t)).then(u=>Pm(u).forEach(d=>{try{i.insertRule(d,d.startsWith("@import")?o+=1:i.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:d,error:h})}})).catch(u=>{console.error("Error loading remote css",u.toString())});r.push(c)}})}catch(a){const s=e.find(o=>o.href==null)||document.styleSheets[0];i.href!=null&&r.push(Im(i.href).then(o=>Nm(o,t)).then(o=>Pm(o).forEach(l=>{s.insertRule(l,i.cssRules.length)})).catch(o=>{console.error("Error loading remote stylesheet",o)})),console.error("Error inlining remote css file",a)}}),Promise.all(r).then(()=>(e.forEach(i=>{if("cssRules"in i)try{ur(i.cssRules||[]).forEach(a=>{n.push(a)})}catch(a){console.error(`Error while reading CSS rules from ${i.href}`,a)}}),n))}function j2(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Rm(t.style.getPropertyValue("src")))}async function W2(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=ur(e.ownerDocument.styleSheets),r=await z2(n,t);return j2(r)}async function Y2(e,t){const n=await W2(e,t);return(await Promise.all(n.map(r=>{const i=r.parentStyleSheet?r.parentStyleSheet.href:null;return km(r.cssText,i,t)}))).join(`
3
+ `)}async function q2(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Y2(e,t);if(n){const r=document.createElement("style"),i=document.createTextNode(n);r.appendChild(i),e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}}async function X2(e,t={}){const{width:n,height:r}=Sm(e,t),i=await Ro(e,t,!0);return await q2(i,t),await Lm(i,t),G2(i,t),await p2(i,n,r)}async function Um(e,t={}){const{width:n,height:r}=Sm(e,t),i=await X2(e,t),a=await Ao(i),s=document.createElement("canvas"),o=s.getContext("2d"),l=t.pixelRatio||u2(),c=t.canvasWidth||n,u=t.canvasHeight||r;return s.width=c*l,s.height=u*l,t.skipAutoScale||h2(s),s.style.width=`${c}`,s.style.height=`${u}`,t.backgroundColor&&(o.fillStyle=t.backgroundColor,o.fillRect(0,0,s.width,s.height)),o.drawImage(a,0,0,s.width,s.height),s}async function Z2(e,t={}){return(await Um(e,t)).toDataURL()}async function K2(e,t={}){return(await Um(e,t)).toDataURL("image/jpeg",t.quality||1)}let hr=class{constructor(t,n){this.model=t,this.services=n,this.init()}init(){}update(){}setModel(t){this.model=t}setServices(t){this.services=t}};const Q2="DONT_STYLE_ME_css_styles_verifier";let B=class qh extends hr{constructor(t,n){super(t,n)}static getHTMLElementSize(t){return{width:t.clientWidth,height:t.clientHeight}}static getSVGElementSize(t,n={useAttrs:!1,useClientDimensions:!1,useBBox:!1,useBoundingRect:!1}){t.attr||(t=U(t));const r={width:0,height:0},i=h=>{h&&Object.keys(r).forEach(p=>{if(h[p]){const f=h[p],v=parseFloat(f);f&&v>r[p]&&(""+f).indexOf("%")===-1&&(r[p]=v)}})},a={width:t.attr("width"),height:t.attr("height")},s=t.node();let o,l,c,u;try{typeof s.getBBox=="function"&&(o=s.getBBox(),l={width:o.width,height:o.height})}catch(h){console.error(h)}try{typeof(s==null?void 0:s.getBoundingClientRect)=="function"&&(c=s.getBoundingClientRect(),u={width:c.width,height:c.height})}catch(h){console.error(h)}let d;if(s instanceof SVGSVGElement&&(d={width:s.clientWidth,height:s.clientHeight}),n){if(n.useAttrs&&(i(a),r.width>0&&r.height>0))return r;if(n.useClientDimensions&&(i(d),r.width>0&&r.height>0))return d;if(n.useBBox&&(i(l),r.width>0&&r.height>0))return l;if(n.useBoundingRect&&(i(u),r.width>0&&r.height>0))return u}try{const h={width:_(t.node(),"width","baseVal","value"),height:_(t.node(),"height","baseVal","value")};i(h)}catch{i(d),i(l),i(a)}return r}static appendOrSelect(t,n){const r=t.select(`${n}`);if(r.empty()){let i=n.split("#"),a,s;return i.length===2?(a=i[0],i=i[1].split("."),s=i[0]):(i=n.split("."),a=i[0]),t.append(a).attr("id",s).attr("class",i.slice(1).join(" "))}return r}init(){this.initializeID(),this.styleHolderElement(),this.addMainContainer(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()}getChartID(){return this.chartID}getElementOffset(t,n=!1){const r={left:0,top:0},i=t.getBoundingClientRect(),a=n?{left:0,top:0}:this.getHolder().getBoundingClientRect();try{r.left=i.left-a.left,r.top=i.top-a.top}catch(s){console.error(s)}return r}generateElementIDString(t){return`chart-${this.chartID}-${t}`}initializeID(){this.chartID=Math.floor((1+Math.random())*281474976710656).toString(16)}addMainContainer(){const t=this.model.getOptions(),n=_(t,"style","prefix"),r=U(this.getHolder()).append("div").classed(`${Ve}--${n}--chart-wrapper`,!0).attr("id",`chart-${this.getChartID()}`).style("height","100%").style("width","100%");r.append("g").attr("class",Q2),this.mainContainer=r.node()}update(){this.styleHolderElement()}styleHolderElement(){const t=this.getHolder(),{width:n,height:r,theme:i}=this.model.getOptions();n!==this.width&&(t.style.width=n,this.width=n),r!==this.height&&(t.style.height=r,this.height=r),U(this.getHolder()).classed(`${Ve}--chart-holder`,!0).attr("data-carbon-theme",i)}getHolder(){return this.model.get("holder")}exportToJPG(){const t=this,n=this.model.getOptions(),r=this.getHolder(),i=U(r);i.classed("filled",!0),K2(this.getMainContainer(),{quality:1,filter:a=>!(a.classList&&a.classList.contains("cds--cc--toolbar"))}).then(function(a){var s;let o="myChart";const l=_(n,"fileDownload","fileName");typeof l=="function"?o=l("jpg"):typeof l=="string"&&(o=l),(s=t.services.files)==null||s.downloadImage(a,`${o}.jpg`),i.classed("filled",!1)})}exportToPNG(){const t=this,n=this.model.getOptions(),r=this.getHolder(),i=U(r);i.classed("filled",!0),Z2(this.getMainContainer(),{quality:1,filter:a=>!(a.classList&&a.classList.contains("cds--cc--toolbar"))}).then(function(a){var s;let o="myChart";const l=_(n,"fileDownload","fileName");typeof l=="function"?o=l("png"):typeof l=="string"&&(o=l),(s=t.services.files)==null||s.downloadImage(a,`${o}.png`),i.classed("filled",!1)}).catch(function(a){console.error("oops, something went wrong!",a)})}isFullScreenMode(){return U(this.getHolder()).classed("fullscreen")}toggleFullscreen(){const t=this.getHolder();U(t).classed("fullscreen")&&(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()}handleFullscreenChange(){document.addEventListener("fullscreenchange",()=>{const t=U(this.getHolder()),n=t.classed("fullscreen");t.classed("fullscreen",!n)})}setSVGMaxHeight(){if(!this.model.getOptions().height){const{height:t}=qh.getSVGElementSize(U(this.mainContainer),{useBBox:!0}),n=U(this.mainContainer).attr("class"),r=U(this.mainContainer).selectAll(`.${n} > svg`);let i=0;r.nodes().forEach(function(a){i+=Number(qh.getSVGElementSize(U(a),{useBBox:!0}).height)}),i<=t?U(this.mainContainer).attr("height",i):U(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){const t=this.getHolder();t&&U(t).on("mouseover",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(w.Chart.MOUSEOVER)}).on("mouseout",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(w.Chart.MOUSEOUT)})}addResizeListener(){const t=this.getHolder();if(!t)return;let n=t.clientWidth,r=t.clientHeight;const i=xo(()=>{var a;t&&(Math.abs(n-t.clientWidth)>1||Math.abs(r-t.clientHeight)>1)&&(n=t.clientWidth,r=t.clientHeight,(a=this.services.events)==null||a.dispatchEvent(w.Chart.RESIZE))},12.5);new ResizeObserver(i).observe(t)}},bu=class $y extends hr{static appendOrUpdateLinearGradient(t){let n=t.svg.select(`defs linearGradient#${t.id}`);n.empty()&&(n=t.svg.append("defs").append("linearGradient").attr("id",t.id).attr("x1",t.x1).attr("x2",t.x2).attr("y1",t.y1).attr("y2",t.y2)),n.selectAll("stop").remove(),n.selectAll("stop").data(t.stops).enter().append("stop").attr("offset",r=>r.offset).style("stop-color",r=>r.color).style("stop-opacity",r=>r.opacity)}static getOffsetRatio(t){return(Math.abs(t[1])*100/Math.abs(t[0]-t[1])).toFixed(2)+"%"}static getStops(t,n){const r=t[0]<0&&t[1]>0;let i=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return r&&(i=[{offset:"0%",color:n,opacity:"0.6"},{offset:$y.getOffsetRatio(t),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),i}};function Bm(e){const t=J2(Hm(e),360);return Or(t,[0,10])||Or(t,[350,0])?{textAnchor:Ln.START,dominantBaseline:Dn.MIDDLE}:Or(t,[10,80])?{textAnchor:Ln.START,dominantBaseline:Dn.HANGING}:Or(t,[80,100])?{textAnchor:Ln.MIDDLE,dominantBaseline:Dn.HANGING}:Or(t,[100,170])?{textAnchor:Ln.END,dominantBaseline:Dn.HANGING}:Or(t,[170,190])?{textAnchor:Ln.END,dominantBaseline:Dn.MIDDLE}:Or(t,[190,260])?{textAnchor:Ln.END,dominantBaseline:Dn.BASELINE}:Or(t,[260,280])?{textAnchor:Ln.MIDDLE,dominantBaseline:Dn.BASELINE}:{textAnchor:Ln.START,dominantBaseline:Dn.BASELINE}}function J2(e,t){return(e%t+t)%t}function Or(e,[t,n]){return e>=t&&e<=n}function Hm(e){return e*(180/Math.PI)}function ce(e,t,n={x:0,y:0}){const r=t*Math.cos(e)+n.x,i=t*Math.sin(e)+n.y;return{x:isNaN(r)?0:r,y:isNaN(i)?0:i}}function tA(e,t){return t*Math.sin(e-Math.PI/2)}function eA(e,t,n,r){for(var i=-1,a=e==null?0:e.length;++i<a;)n=t(n,e[i],i,e);return n}function nA(e){return function(t){return e==null?void 0:e[t]}}var rA={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},iA=nA(rA),aA=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,sA="\\u0300-\\u036f",oA="\\ufe20-\\ufe2f",lA="\\u20d0-\\u20ff",cA=sA+oA+lA,uA="["+cA+"]",hA=RegExp(uA,"g");function dA(e){return e=Ca(e),e&&e.replace(aA,iA).replace(hA,"")}var pA=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function fA(e){return e.match(pA)||[]}var mA=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function gA(e){return mA.test(e)}var Vm="\\ud800-\\udfff",vA="\\u0300-\\u036f",yA="\\ufe20-\\ufe2f",bA="\\u20d0-\\u20ff",_A=vA+yA+bA,Fm="\\u2700-\\u27bf",Gm="a-z\\xdf-\\xf6\\xf8-\\xff",xA="\\xac\\xb1\\xd7\\xf7",EA="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",TA="\\u2000-\\u206f",OA=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",zm="A-Z\\xc0-\\xd6\\xd8-\\xde",SA="\\ufe0e\\ufe0f",jm=xA+EA+TA+OA,Wm="['’]",Ym="["+jm+"]",wA="["+_A+"]",qm="\\d+",$A="["+Fm+"]",Xm="["+Gm+"]",Zm="[^"+Vm+jm+qm+Fm+Gm+zm+"]",CA="\\ud83c[\\udffb-\\udfff]",MA="(?:"+wA+"|"+CA+")",AA="[^"+Vm+"]",Km="(?:\\ud83c[\\udde6-\\uddff]){2}",Qm="[\\ud800-\\udbff][\\udc00-\\udfff]",qi="["+zm+"]",RA="\\u200d",Jm="(?:"+Xm+"|"+Zm+")",kA="(?:"+qi+"|"+Zm+")",tg="(?:"+Wm+"(?:d|ll|m|re|s|t|ve))?",eg="(?:"+Wm+"(?:D|LL|M|RE|S|T|VE))?",ng=MA+"?",rg="["+SA+"]?",LA="(?:"+RA+"(?:"+[AA,Km,Qm].join("|")+")"+rg+ng+")*",DA="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",IA="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",NA=rg+ng+LA,PA="(?:"+[$A,Km,Qm].join("|")+")"+NA,UA=RegExp([qi+"?"+Xm+"+"+tg+"(?="+[Ym,qi,"$"].join("|")+")",kA+"+"+eg+"(?="+[Ym,qi+Jm,"$"].join("|")+")",qi+"?"+Jm+"+"+tg,qi+"+"+eg,IA,DA,qm,PA].join("|"),"g");function BA(e){return e.match(UA)||[]}function HA(e,t,n){return e=Ca(e),t=t,t===void 0?gA(e)?BA(e):fA(e):e.match(t)||[]}var VA="['’]",FA=RegExp(VA,"g");function ig(e){return function(t){return eA(HA(dA(t).replace(FA,"")),e,"")}}function GA(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function ag(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=Fi(n),n=n===n?n:0),t!==void 0&&(t=Fi(t),t=t===t?t:0),GA(Fi(e),t,n)}var zA="Expected a function";function jA(e,t,n){if(typeof e!="function")throw new TypeError(zA);return setTimeout(function(){e.apply(void 0,n)},t)}var WA=nc(function(e,t,n){return jA(e,Fi(t)||0,n)});function YA(e,t){var n=-1,r=jr(e)?Array(e.length):[];return Jc(e,function(i,a,s){r[++n]=t(i,a,s)}),r}function qA(e,t){var n=Oe(e)?Zl:YA;return n(e,Ys(t))}var XA=1/0;function ZA(e,t){return Gs(qA(e,t),XA)}function sg(e,t){return Ws(e,t)}var Xi=ig(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()});function KA(e,t){var n;return Jc(e,function(r,i,a){return n=t(r,i,a),!n}),!!n}function QA(e,t,n){var r=Oe(e)?rp:KA;return r(e,Ys(t))}class oi{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const a=n[i],s=t+a,o=Math.abs(t)<Math.abs(a)?t-(s-a):a-(s-t);o&&(n[r++]=o),t=s}return n[r]=t,this._n=r+1,this}valueOf(){const t=this._partials;let n=this._n,r,i,a,s=0;if(n>0){for(s=t[--n];n>0&&(r=s,i=t[--n],s=r+i,a=i-(s-r),!a););n>0&&(a<0&&t[n-1]<0||a>0&&t[n-1]>0)&&(i=a*2,r=s+i,i==r-s&&(s=r))}return s}}function*JA(e){for(const t of e)yield*t}function og(e){return Array.from(JA(e))}function tR(e){return e}var Lo=1,Do=2,_u=3,es=4,lg=1e-6;function eR(e){return"translate("+e+",0)"}function nR(e){return"translate(0,"+e+")"}function rR(e){return t=>+e(t)}function iR(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function aR(){return!this.__axis}function Io(e,t){var n=[],r=null,i=null,a=6,s=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=e===Lo||e===es?-1:1,u=e===es||e===Do?"x":"y",d=e===Lo||e===_u?eR:nR;function h(p){var f=r??(t.ticks?t.ticks.apply(t,n):t.domain()),v=i??(t.tickFormat?t.tickFormat.apply(t,n):tR),m=Math.max(a,0)+o,y=t.range(),g=+y[0]+l,x=+y[y.length-1]+l,O=(t.bandwidth?iR:rR)(t.copy(),l),T=p.selection?p.selection():p,S=T.selectAll(".domain").data([null]),D=T.selectAll(".tick").data(f,t).order(),P=D.exit(),I=D.enter().append("g").attr("class","tick"),N=D.select("line"),M=D.select("text");S=S.merge(S.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),D=D.merge(I),N=N.merge(I.append("line").attr("stroke","currentColor").attr(u+"2",c*a)),M=M.merge(I.append("text").attr("fill","currentColor").attr(u,c*m).attr("dy",e===Lo?"0em":e===_u?"0.71em":"0.32em")),p!==T&&(S=S.transition(p),D=D.transition(p),N=N.transition(p),M=M.transition(p),P=P.transition(p).attr("opacity",lg).attr("transform",function(q){return isFinite(q=O(q))?d(q+l):this.getAttribute("transform")}),I.attr("opacity",lg).attr("transform",function(q){var H=this.parentNode.__axis;return d((H&&isFinite(H=H(q))?H:O(q))+l)})),P.remove(),S.attr("d",e===es||e===Do?s?"M"+c*s+","+g+"H"+l+"V"+x+"H"+c*s:"M"+l+","+g+"V"+x:s?"M"+g+","+c*s+"V"+l+"H"+x+"V"+c*s:"M"+g+","+l+"H"+x),D.attr("opacity",1).attr("transform",function(q){return d(O(q)+l)}),N.attr(u+"2",c*a),M.attr(u,c*m).text(v),T.filter(aR).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Do?"start":e===es?"end":"middle"),T.each(function(){this.__axis=O})}return h.scale=function(p){return arguments.length?(t=p,h):t},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),h):n.slice()},h.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),h):r&&r.slice()},h.tickFormat=function(p){return arguments.length?(i=p,h):i},h.tickSize=function(p){return arguments.length?(a=s=+p,h):a},h.tickSizeInner=function(p){return arguments.length?(a=+p,h):a},h.tickSizeOuter=function(p){return arguments.length?(s=+p,h):s},h.tickPadding=function(p){return arguments.length?(o=+p,h):o},h.offset=function(p){return arguments.length?(l=+p,h):l},h}function sR(e){return Io(Lo,e)}function oR(e){return Io(Do,e)}function xu(e){return Io(_u,e)}function cg(e){return Io(es,e)}const Eu={capture:!0,passive:!1};function Tu(e){e.preventDefault(),e.stopImmediatePropagation()}function lR(e){var t=e.document.documentElement,n=U(e).on("dragstart.drag",Tu,Eu);"onselectstart"in t?n.on("selectstart.drag",Tu,Eu):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function cR(e,t){var n=e.document.documentElement,r=U(e).on("dragstart.drag",null);t&&(r.on("click.drag",Tu,Eu),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function uR(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}const hR=e=>+e,Ou=e=>()=>e;function dR(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,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:a}})}function pR(e){e.stopImmediatePropagation()}function Su(e){e.preventDefault(),e.stopImmediatePropagation()}var ug={name:"drag"},wu={name:"space"},Zi={name:"handle"},Ki={name:"center"};const{abs:hg,max:Ae,min:Re}=Math;function dg(e){return[+e[0],+e[1]]}function pg(e){return[dg(e[0]),dg(e[1])]}var No={name:"x",handles:["w","e"].map(Po),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},$u={name:"y",handles:["n","s"].map(Po),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},dr={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"},fg={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},mg={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},fR={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},mR={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Po(e){return{type:e}}function gR(e){return!e.ctrlKey&&!e.button}function vR(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function yR(){return navigator.maxTouchPoints||"ontouchstart"in this}function Cu(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function bR(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function gg(){return _R(No)}function _R(e){var t=vR,n=gR,r=yR,i=!0,a=Oc("start","brush","end"),s=6,o;function l(m){var y=m.property("__brush",v).selectAll(".overlay").data([Po("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",dr.overlay).merge(y).each(function(){var x=Cu(this).extent;U(this).attr("x",x[0][0]).attr("y",x[0][1]).attr("width",x[1][0]-x[0][0]).attr("height",x[1][1]-x[0][1])}),m.selectAll(".selection").data([Po("selection")]).enter().append("rect").attr("class","selection").attr("cursor",dr.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var g=m.selectAll(".handle").data(e.handles,function(x){return x.type});g.exit().remove(),g.enter().append("rect").attr("class",function(x){return"handle handle--"+x.type}).attr("cursor",function(x){return dr[x.type]}),m.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",f).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(m,y,g){m.tween?m.on("start.brush",function(x){u(this,arguments).beforestart().start(x)}).on("interrupt.brush end.brush",function(x){u(this,arguments).end(x)}).tween("brush",function(){var x=this,O=x.__brush,T=u(x,arguments),S=O.selection,D=e.input(typeof y=="function"?y.apply(this,arguments):y,O.extent),P=Pa(S,D);function I(N){O.selection=N===1&&D===null?null:P(N),c.call(x),T.brush()}return S!==null&&D!==null?I:I(1)}):m.each(function(){var x=this,O=arguments,T=x.__brush,S=e.input(typeof y=="function"?y.apply(x,O):y,T.extent),D=u(x,O).beforestart();Bc(x),T.selection=S===null?null:S,c.call(x),D.start(g).brush(g).end(g)})},l.clear=function(m,y){l.move(m,null,y)};function c(){var m=U(this),y=Cu(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(g){return g.type[g.type.length-1]==="e"?y[1][0]-s/2:y[0][0]-s/2}).attr("y",function(g){return g.type[0]==="s"?y[1][1]-s/2:y[0][1]-s/2}).attr("width",function(g){return g.type==="n"||g.type==="s"?y[1][0]-y[0][0]+s:s}).attr("height",function(g){return g.type==="e"||g.type==="w"?y[1][1]-y[0][1]+s:s})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(m,y,g){var x=m.__brush.emitter;return x&&(!g||!x.clean)?x:new d(m,y,g)}function d(m,y,g){this.that=m,this.args=y,this.state=m.__brush,this.active=0,this.clean=g}d.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,g){var x=U(this.that).datum();a.call(m,this.that,new dR(m,{sourceEvent:y,target:l,selection:e.output(this.state.selection),mode:g,dispatch:a}),x)}};function h(m){if(o&&!m.touches||!n.apply(this,arguments))return;var y=this,g=m.target.__data__.type,x=(i&&m.metaKey?g="overlay":g)==="selection"?ug:i&&m.altKey?Ki:Zi,O=e===$u?null:fR[g],T=e===No?null:mR[g],S=Cu(y),D=S.extent,P=S.selection,I=D[0][0],N,M,q=D[0][1],H,G,E=D[1][0],L,$,V=D[1][1],F,rt,A=0,j=0,et,ct=O&&T&&i&&m.shiftKey,it,J,at=Array.from(m.touches||[m],ut=>{const Nt=ut.identifier;return ut=Xr(ut,y),ut.point0=ut.slice(),ut.identifier=Nt,ut});Bc(y);var ht=u(y,arguments,!0).beforestart();if(g==="overlay"){P&&(et=!0);const ut=[at[0],at[1]||at[0]];S.selection=P=[[N=e===$u?I:Re(ut[0][0],ut[1][0]),H=e===No?q:Re(ut[0][1],ut[1][1])],[L=e===$u?E:Ae(ut[0][0],ut[1][0]),F=e===No?V:Ae(ut[0][1],ut[1][1])]],at.length>1&&Dt(m)}else N=P[0][0],H=P[0][1],L=P[1][0],F=P[1][1];M=N,G=H,$=L,rt=F;var Y=U(y).attr("pointer-events","none"),lt=Y.selectAll(".overlay").attr("cursor",dr[g]);if(m.touches)ht.moved=K,ht.ended=Ot;else{var _t=U(m.view).on("mousemove.brush",K,!0).on("mouseup.brush",Ot,!0);i&&_t.on("keydown.brush",Jt,!0).on("keyup.brush",Yt,!0),lR(m.view)}c.call(y),ht.start(m,x.name);function K(ut){for(const Nt of ut.changedTouches||[ut])for(const Te of at)Te.identifier===Nt.identifier&&(Te.cur=Xr(Nt,y));if(ct&&!it&&!J&&at.length===1){const Nt=at[0];hg(Nt.cur[0]-Nt[0])>hg(Nt.cur[1]-Nt[1])?J=!0:it=!0}for(const Nt of at)Nt.cur&&(Nt[0]=Nt.cur[0],Nt[1]=Nt.cur[1]);et=!0,Su(ut),Dt(ut)}function Dt(ut){const Nt=at[0],Te=Nt.point0;var he;switch(A=Nt[0]-Te[0],j=Nt[1]-Te[1],x){case wu:case ug:{O&&(A=Ae(I-N,Re(E-L,A)),M=N+A,$=L+A),T&&(j=Ae(q-H,Re(V-F,j)),G=H+j,rt=F+j);break}case Zi:{at[1]?(O&&(M=Ae(I,Re(E,at[0][0])),$=Ae(I,Re(E,at[1][0])),O=1),T&&(G=Ae(q,Re(V,at[0][1])),rt=Ae(q,Re(V,at[1][1])),T=1)):(O<0?(A=Ae(I-N,Re(E-N,A)),M=N+A,$=L):O>0&&(A=Ae(I-L,Re(E-L,A)),M=N,$=L+A),T<0?(j=Ae(q-H,Re(V-H,j)),G=H+j,rt=F):T>0&&(j=Ae(q-F,Re(V-F,j)),G=H,rt=F+j));break}case Ki:{O&&(M=Ae(I,Re(E,N-A*O)),$=Ae(I,Re(E,L+A*O))),T&&(G=Ae(q,Re(V,H-j*T)),rt=Ae(q,Re(V,F+j*T)));break}}$<M&&(O*=-1,he=N,N=L,L=he,he=M,M=$,$=he,g in fg&&lt.attr("cursor",dr[g=fg[g]])),rt<G&&(T*=-1,he=H,H=F,F=he,he=G,G=rt,rt=he,g in mg&&lt.attr("cursor",dr[g=mg[g]])),S.selection&&(P=S.selection),it&&(M=P[0][0],$=P[1][0]),J&&(G=P[0][1],rt=P[1][1]),(P[0][0]!==M||P[0][1]!==G||P[1][0]!==$||P[1][1]!==rt)&&(S.selection=[[M,G],[$,rt]],c.call(y),ht.brush(ut,x.name))}function Ot(ut){if(pR(ut),ut.touches){if(ut.touches.length)return;o&&clearTimeout(o),o=setTimeout(function(){o=null},500)}else cR(ut.view,et),_t.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);Y.attr("pointer-events","all"),lt.attr("cursor",dr.overlay),S.selection&&(P=S.selection),bR(P)&&(S.selection=null,c.call(y)),ht.end(ut,x.name)}function Jt(ut){switch(ut.keyCode){case 16:{ct=O&&T;break}case 18:{x===Zi&&(O&&(L=$-A*O,N=M+A*O),T&&(F=rt-j*T,H=G+j*T),x=Ki,Dt(ut));break}case 32:{(x===Zi||x===Ki)&&(O<0?L=$-A:O>0&&(N=M-A),T<0?F=rt-j:T>0&&(H=G-j),x=wu,lt.attr("cursor",dr.selection),Dt(ut));break}default:return}Su(ut)}function Yt(ut){switch(ut.keyCode){case 16:{ct&&(it=J=ct=!1,Dt(ut));break}case 18:{x===Ki&&(O<0?L=$:O>0&&(N=M),T<0?F=rt:T>0&&(H=G),x=Zi,Dt(ut));break}case 32:{x===wu&&(ut.altKey?(O&&(L=$-A*O,N=M+A*O),T&&(F=rt-j*T,H=G+j*T),x=Ki):(O<0?L=$:O>0&&(N=M),T<0?F=rt:T>0&&(H=G),x=Zi),lt.attr("cursor",dr[g]),Dt(ut));break}default:return}Su(ut)}}function p(m){u(this,arguments).moved(m)}function f(m){u(this,arguments).ended(m)}function v(){var m=this.__brush||{selection:null};return m.extent=pg(t.apply(this,arguments)),m.dim=e,m}return l.extent=function(m){return arguments.length?(t=typeof m=="function"?m:Ou(pg(m)),l):t},l.filter=function(m){return arguments.length?(n=typeof m=="function"?m:Ou(!!m),l):n},l.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:Ou(!!m),l):r},l.handleSize=function(m){return arguments.length?(s=+m,l):s},l.keyModifiers=function(m){return arguments.length?(i=!!m,l):i},l.on=function(){var m=a.on.apply(a,arguments);return m===a?l:m},l}const Mu=Math.PI,Au=2*Mu,li=1e-6,xR=Au-li;function vg(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function ER(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return vg;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let Ru=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?vg:ER(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,s){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,o=this._y1,l=r-t,c=i-n,u=s-t,d=o-n,h=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(h>li)if(!(Math.abs(d*l-c*u)>li)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-s,f=i-o,v=l*l+c*c,m=p*p+f*f,y=Math.sqrt(v),g=Math.sqrt(h),x=a*Math.tan((Mu-Math.acos((v+h-m)/(2*y*g)))/2),O=x/g,T=x/y;Math.abs(O-1)>li&&this._append`L${t+O*u},${n+O*d}`,this._append`A${a},${a},0,0,${+(d*p>u*f)},${this._x1=t+T*l},${this._y1=n+T*c}`}}arc(t,n,r,i,a,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(i),l=r*Math.sin(i),c=t+o,u=n+l,d=1^s,h=s?i-a:a-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>li||Math.abs(this._y1-u)>li)&&this._append`L${c},${u}`,r&&(h<0&&(h=h%Au+Au),h>xR?this._append`A${r},${r},0,1,${d},${t-o},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=u}`:h>li&&this._append`A${r},${r},0,${+(h>=Mu)},${d},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function yg(){return new Ru}yg.prototype=Ru.prototype;var Ft=1e-6,bg=1e-12,Ct=Math.PI,Ge=Ct/2,_g=Ct/4,Ke=Ct*2,Ie=180/Ct,ue=Ct/180,Gt=Math.abs,xg=Math.atan,ci=Math.atan2,Wt=Math.cos,TR=Math.exp,OR=Math.log,Ht=Math.sin,Sr=Math.sign||function(e){return e>0?1:e<0?-1:0},wn=Math.sqrt,SR=Math.tan;function wR(e){return e>1?0:e<-1?Ct:Math.acos(e)}function pr(e){return e>1?Ge:e<-1?-Ge:Math.asin(e)}function dn(){}function Uo(e,t){e&&Tg.hasOwnProperty(e.type)&&Tg[e.type](e,t)}var Eg={Feature:function(e,t){Uo(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Uo(n[r].geometry,t)}},Tg={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){ku(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)ku(n[r],t,0)},Polygon:function(e,t){Og(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Og(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Uo(n[r],t)}};function ku(e,t,n){var r=-1,i=e.length-n,a;for(t.lineStart();++r<i;)a=e[r],t.point(a[0],a[1],a[2]);t.lineEnd()}function Og(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)ku(e[n],t,1);t.polygonEnd()}function Qi(e,t){e&&Eg.hasOwnProperty(e.type)?Eg[e.type](e,t):Uo(e,t)}function Lu(e){return[ci(e[1],e[0]),pr(e[2])]}function Ji(e){var t=e[0],n=e[1],r=Wt(n);return[r*Wt(t),r*Ht(t),Ht(n)]}function Bo(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Ho(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Du(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Vo(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Iu(e){var t=wn(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function Nu(e,t){function n(r,i){return r=e(r,i),t(r[0],r[1])}return e.invert&&t.invert&&(n.invert=function(r,i){return r=t.invert(r,i),r&&e.invert(r[0],r[1])}),n}function Pu(e,t){return Gt(e)>Ct&&(e-=Math.round(e/Ke)*Ke),[e,t]}Pu.invert=Pu;function Sg(e,t,n){return(e%=Ke)?t||n?Nu($g(e),Cg(t,n)):$g(e):t||n?Cg(t,n):Pu}function wg(e){return function(t,n){return t+=e,Gt(t)>Ct&&(t-=Math.round(t/Ke)*Ke),[t,n]}}function $g(e){var t=wg(e);return t.invert=wg(-e),t}function Cg(e,t){var n=Wt(e),r=Ht(e),i=Wt(t),a=Ht(t);function s(o,l){var c=Wt(l),u=Wt(o)*c,d=Ht(o)*c,h=Ht(l),p=h*n+u*r;return[ci(d*i-p*a,u*n-h*r),pr(p*i+d*a)]}return s.invert=function(o,l){var c=Wt(l),u=Wt(o)*c,d=Ht(o)*c,h=Ht(l),p=h*i-d*a;return[ci(d*i+h*a,u*n+p*r),pr(p*n-u*r)]},s}function $R(e){e=Sg(e[0]*ue,e[1]*ue,e.length>2?e[2]*ue:0);function t(n){return n=e(n[0]*ue,n[1]*ue),n[0]*=Ie,n[1]*=Ie,n}return t.invert=function(n){return n=e.invert(n[0]*ue,n[1]*ue),n[0]*=Ie,n[1]*=Ie,n},t}function CR(e,t,n,r,i,a){if(n){var s=Wt(t),o=Ht(t),l=r*n;i==null?(i=t+r*Ke,a=t-l/2):(i=Mg(s,i),a=Mg(s,a),(r>0?i<a:i>a)&&(i+=r*Ke));for(var c,u=i;r>0?u>a:u<a;u-=l)c=Lu([s,-o*Wt(u),-o*Ht(u)]),e.point(c[0],c[1])}}function Mg(e,t){t=Ji(t),t[0]-=e,Iu(t);var n=wR(-t[1]);return((-t[2]<0?-n:n)+Ke-Ft)%Ke}function Ag(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:dn,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Fo(e,t){return Gt(e[0]-t[0])<Ft&&Gt(e[1]-t[1])<Ft}function Go(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Rg(e,t,n,r,i){var a=[],s=[],o,l;if(e.forEach(function(f){if(!((v=f.length-1)<=0)){var v,m=f[0],y=f[v],g;if(Fo(m,y)){if(!m[2]&&!y[2]){for(i.lineStart(),o=0;o<v;++o)i.point((m=f[o])[0],m[1]);i.lineEnd();return}y[0]+=2*Ft}a.push(g=new Go(m,f,null,!0)),s.push(g.o=new Go(m,null,g,!1)),a.push(g=new Go(y,f,null,!1)),s.push(g.o=new Go(y,null,g,!0))}}),!!a.length){for(s.sort(t),kg(a),kg(s),o=0,l=s.length;o<l;++o)s[o].e=n=!n;for(var c=a[0],u,d;;){for(var h=c,p=!0;h.v;)if((h=h.n)===c)return;u=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(o=0,l=u.length;o<l;++o)i.point((d=u[o])[0],d[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(u=h.p.z,o=u.length-1;o>=0;--o)i.point((d=u[o])[0],d[1]);else r(h.x,h.p.x,-1,i);h=h.p}h=h.o,u=h.z,p=!p}while(!h.v);i.lineEnd()}}}function kg(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}function Uu(e){return Gt(e[0])<=Ct?e[0]:Sr(e[0])*((Gt(e[0])+Ct)%Ke-Ct)}function MR(e,t){var n=Uu(t),r=t[1],i=Ht(r),a=[Ht(n),-Wt(n),0],s=0,o=0,l=new oi;i===1?r=Ge+Ft:i===-1&&(r=-Ge-Ft);for(var c=0,u=e.length;c<u;++c)if(h=(d=e[c]).length)for(var d,h,p=d[h-1],f=Uu(p),v=p[1]/2+_g,m=Ht(v),y=Wt(v),g=0;g<h;++g,f=O,m=S,y=D,p=x){var x=d[g],O=Uu(x),T=x[1]/2+_g,S=Ht(T),D=Wt(T),P=O-f,I=P>=0?1:-1,N=I*P,M=N>Ct,q=m*S;if(l.add(ci(q*I*Ht(N),y*D+q*Wt(N))),s+=M?P+I*Ke:P,M^f>=n^O>=n){var H=Ho(Ji(p),Ji(x));Iu(H);var G=Ho(a,H);Iu(G);var E=(M^P>=0?-1:1)*pr(G[2]);(r>E||r===E&&(H[0]||H[1]))&&(o+=M^P>=0?1:-1)}}return(s<-Ft||s<Ft&&l<-bg)^o&1}function Lg(e,t,n,r){return function(i){var a=t(i),s=Ag(),o=t(s),l=!1,c,u,d,h={point:p,lineStart:v,lineEnd:m,polygonStart:function(){h.point=y,h.lineStart=g,h.lineEnd=x,u=[],c=[]},polygonEnd:function(){h.point=p,h.lineStart=v,h.lineEnd=m,u=og(u);var O=MR(c,r);u.length?(l||(i.polygonStart(),l=!0),Rg(u,RR,O,n,i)):O&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),u=c=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(O,T){e(O,T)&&i.point(O,T)}function f(O,T){a.point(O,T)}function v(){h.point=f,a.lineStart()}function m(){h.point=p,a.lineEnd()}function y(O,T){d.push([O,T]),o.point(O,T)}function g(){o.lineStart(),d=[]}function x(){y(d[0][0],d[0][1]),o.lineEnd();var O=o.clean(),T=s.result(),S,D=T.length,P,I,N;if(d.pop(),c.push(d),d=null,!!D){if(O&1){if(I=T[0],(P=I.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),S=0;S<P;++S)i.point((N=I[S])[0],N[1]);i.lineEnd()}return}D>1&&O&2&&T.push(T.pop().concat(T.shift())),u.push(T.filter(AR))}}return h}}function AR(e){return e.length>1}function RR(e,t){return((e=e.x)[0]<0?e[1]-Ge-Ft:Ge-e[1])-((t=t.x)[0]<0?t[1]-Ge-Ft:Ge-t[1])}const Dg=Lg(function(){return!0},kR,DR,[-Ct,-Ge]);function kR(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(a,s){var o=a>0?Ct:-Ct,l=Gt(a-t);Gt(l-Ct)<Ft?(e.point(t,n=(n+s)/2>0?Ge:-Ge),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(o,n),e.point(a,n),i=0):r!==o&&l>=Ct&&(Gt(t-r)<Ft&&(t-=r*Ft),Gt(a-o)<Ft&&(a-=o*Ft),n=LR(t,n,a,s),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(o,n),i=0),e.point(t=a,n=s),r=o},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function LR(e,t,n,r){var i,a,s=Ht(e-n);return Gt(s)>Ft?xg((Ht(t)*(a=Wt(r))*Ht(n)-Ht(r)*(i=Wt(t))*Ht(e))/(i*a*s)):(t+r)/2}function DR(e,t,n,r){var i;if(e==null)i=n*Ge,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(Gt(e[0]-t[0])>Ft){var a=e[0]<t[0]?Ct:-Ct;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(t[0],t[1])}function IR(e){var t=Wt(e),n=2*ue,r=t>0,i=Gt(t)>Ft;function a(u,d,h,p){CR(p,e,n,h,u,d)}function s(u,d){return Wt(u)*Wt(d)>t}function o(u){var d,h,p,f,v;return{lineStart:function(){f=p=!1,v=1},point:function(m,y){var g=[m,y],x,O=s(m,y),T=r?O?0:c(m,y):O?c(m+(m<0?Ct:-Ct),y):0;if(!d&&(f=p=O)&&u.lineStart(),O!==p&&(x=l(d,g),(!x||Fo(d,x)||Fo(g,x))&&(g[2]=1)),O!==p)v=0,O?(u.lineStart(),x=l(g,d),u.point(x[0],x[1])):(x=l(d,g),u.point(x[0],x[1],2),u.lineEnd()),d=x;else if(i&&d&&r^O){var S;!(T&h)&&(S=l(g,d,!0))&&(v=0,r?(u.lineStart(),u.point(S[0][0],S[0][1]),u.point(S[1][0],S[1][1]),u.lineEnd()):(u.point(S[1][0],S[1][1]),u.lineEnd(),u.lineStart(),u.point(S[0][0],S[0][1],3)))}O&&(!d||!Fo(d,g))&&u.point(g[0],g[1]),d=g,p=O,h=T},lineEnd:function(){p&&u.lineEnd(),d=null},clean:function(){return v|(f&&p)<<1}}}function l(u,d,h){var p=Ji(u),f=Ji(d),v=[1,0,0],m=Ho(p,f),y=Bo(m,m),g=m[0],x=y-g*g;if(!x)return!h&&u;var O=t*y/x,T=-t*g/x,S=Ho(v,m),D=Vo(v,O),P=Vo(m,T);Du(D,P);var I=S,N=Bo(D,I),M=Bo(I,I),q=N*N-M*(Bo(D,D)-1);if(!(q<0)){var H=wn(q),G=Vo(I,(-N-H)/M);if(Du(G,D),G=Lu(G),!h)return G;var E=u[0],L=d[0],$=u[1],V=d[1],F;L<E&&(F=E,E=L,L=F);var rt=L-E,A=Gt(rt-Ct)<Ft,j=A||rt<Ft;if(!A&&V<$&&(F=$,$=V,V=F),j?A?$+V>0^G[1]<(Gt(G[0]-E)<Ft?$:V):$<=G[1]&&G[1]<=V:rt>Ct^(E<=G[0]&&G[0]<=L)){var et=Vo(I,(-N+H)/M);return Du(et,D),[G,Lu(et)]}}}function c(u,d){var h=r?e:Ct-e,p=0;return u<-h?p|=1:u>h&&(p|=2),d<-h?p|=4:d>h&&(p|=8),p}return Lg(s,o,a,r?[0,-e]:[-Ct,e-Ct])}function NR(e,t,n,r,i,a){var s=e[0],o=e[1],l=t[0],c=t[1],u=0,d=1,h=l-s,p=c-o,f;if(f=n-s,!(!h&&f>0)){if(f/=h,h<0){if(f<u)return;f<d&&(d=f)}else if(h>0){if(f>d)return;f>u&&(u=f)}if(f=i-s,!(!h&&f<0)){if(f/=h,h<0){if(f>d)return;f>u&&(u=f)}else if(h>0){if(f<u)return;f<d&&(d=f)}if(f=r-o,!(!p&&f>0)){if(f/=p,p<0){if(f<u)return;f<d&&(d=f)}else if(p>0){if(f>d)return;f>u&&(u=f)}if(f=a-o,!(!p&&f<0)){if(f/=p,p<0){if(f>d)return;f>u&&(u=f)}else if(p>0){if(f<u)return;f<d&&(d=f)}return u>0&&(e[0]=s+u*h,e[1]=o+u*p),d<1&&(t[0]=s+d*h,t[1]=o+d*p),!0}}}}}var ns=1e9,zo=-ns;function PR(e,t,n,r){function i(c,u){return e<=c&&c<=n&&t<=u&&u<=r}function a(c,u,d,h){var p=0,f=0;if(c==null||(p=s(c,d))!==(f=s(u,d))||l(c,u)<0^d>0)do h.point(p===0||p===3?e:n,p>1?r:t);while((p=(p+d+4)%4)!==f);else h.point(u[0],u[1])}function s(c,u){return Gt(c[0]-e)<Ft?u>0?0:3:Gt(c[0]-n)<Ft?u>0?2:1:Gt(c[1]-t)<Ft?u>0?1:0:u>0?3:2}function o(c,u){return l(c.x,u.x)}function l(c,u){var d=s(c,1),h=s(u,1);return d!==h?d-h:d===0?u[1]-c[1]:d===1?c[0]-u[0]:d===2?c[1]-u[1]:u[0]-c[0]}return function(c){var u=c,d=Ag(),h,p,f,v,m,y,g,x,O,T,S,D={point:P,lineStart:q,lineEnd:H,polygonStart:N,polygonEnd:M};function P(E,L){i(E,L)&&u.point(E,L)}function I(){for(var E=0,L=0,$=p.length;L<$;++L)for(var V=p[L],F=1,rt=V.length,A=V[0],j,et,ct=A[0],it=A[1];F<rt;++F)j=ct,et=it,A=V[F],ct=A[0],it=A[1],et<=r?it>r&&(ct-j)*(r-et)>(it-et)*(e-j)&&++E:it<=r&&(ct-j)*(r-et)<(it-et)*(e-j)&&--E;return E}function N(){u=d,h=[],p=[],S=!0}function M(){var E=I(),L=S&&E,$=(h=og(h)).length;(L||$)&&(c.polygonStart(),L&&(c.lineStart(),a(null,null,1,c),c.lineEnd()),$&&Rg(h,o,E,a,c),c.polygonEnd()),u=c,h=p=f=null}function q(){D.point=G,p&&p.push(f=[]),T=!0,O=!1,g=x=NaN}function H(){h&&(G(v,m),y&&O&&d.rejoin(),h.push(d.result())),D.point=P,O&&u.lineEnd()}function G(E,L){var $=i(E,L);if(p&&f.push([E,L]),T)v=E,m=L,y=$,T=!1,$&&(u.lineStart(),u.point(E,L));else if($&&O)u.point(E,L);else{var V=[g=Math.max(zo,Math.min(ns,g)),x=Math.max(zo,Math.min(ns,x))],F=[E=Math.max(zo,Math.min(ns,E)),L=Math.max(zo,Math.min(ns,L))];NR(V,F,e,t,n,r)?(O||(u.lineStart(),u.point(V[0],V[1])),u.point(F[0],F[1]),$||u.lineEnd(),S=!1):$&&(u.lineStart(),u.point(E,L),S=!1)}g=E,x=L,O=$}return D}}const Bu=e=>e;var Hu=new oi,Vu=new oi,Ig,Ng,Fu,Gu,fr={point:dn,lineStart:dn,lineEnd:dn,polygonStart:function(){fr.lineStart=UR,fr.lineEnd=HR},polygonEnd:function(){fr.lineStart=fr.lineEnd=fr.point=dn,Hu.add(Gt(Vu)),Vu=new oi},result:function(){var e=Hu/2;return Hu=new oi,e}};function UR(){fr.point=BR}function BR(e,t){fr.point=Pg,Ig=Fu=e,Ng=Gu=t}function Pg(e,t){Vu.add(Gu*e-Fu*t),Fu=e,Gu=t}function HR(){Pg(Ig,Ng)}var ta=1/0,jo=ta,rs=-ta,Wo=rs,Yo={point:VR,lineStart:dn,lineEnd:dn,polygonStart:dn,polygonEnd:dn,result:function(){var e=[[ta,jo],[rs,Wo]];return rs=Wo=-(jo=ta=1/0),e}};function VR(e,t){e<ta&&(ta=e),e>rs&&(rs=e),t<jo&&(jo=t),t>Wo&&(Wo=t)}var zu=0,ju=0,is=0,qo=0,Xo=0,ea=0,Wu=0,Yu=0,as=0,Ug,Bg,Vn,Fn,pn={point:ui,lineStart:Hg,lineEnd:Vg,polygonStart:function(){pn.lineStart=zR,pn.lineEnd=jR},polygonEnd:function(){pn.point=ui,pn.lineStart=Hg,pn.lineEnd=Vg},result:function(){var e=as?[Wu/as,Yu/as]:ea?[qo/ea,Xo/ea]:is?[zu/is,ju/is]:[NaN,NaN];return zu=ju=is=qo=Xo=ea=Wu=Yu=as=0,e}};function ui(e,t){zu+=e,ju+=t,++is}function Hg(){pn.point=FR}function FR(e,t){pn.point=GR,ui(Vn=e,Fn=t)}function GR(e,t){var n=e-Vn,r=t-Fn,i=wn(n*n+r*r);qo+=i*(Vn+e)/2,Xo+=i*(Fn+t)/2,ea+=i,ui(Vn=e,Fn=t)}function Vg(){pn.point=ui}function zR(){pn.point=WR}function jR(){Fg(Ug,Bg)}function WR(e,t){pn.point=Fg,ui(Ug=Vn=e,Bg=Fn=t)}function Fg(e,t){var n=e-Vn,r=t-Fn,i=wn(n*n+r*r);qo+=i*(Vn+e)/2,Xo+=i*(Fn+t)/2,ea+=i,i=Fn*e-Vn*t,Wu+=i*(Vn+e),Yu+=i*(Fn+t),as+=i*3,ui(Vn=e,Fn=t)}function Gg(e){this._context=e}Gg.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,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(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,Ke);break}}},result:dn};var qu=new oi,Xu,zg,jg,ss,os,ls={point:dn,lineStart:function(){ls.point=YR},lineEnd:function(){Xu&&Wg(zg,jg),ls.point=dn},polygonStart:function(){Xu=!0},polygonEnd:function(){Xu=null},result:function(){var e=+qu;return qu=new oi,e}};function YR(e,t){ls.point=Wg,zg=ss=e,jg=os=t}function Wg(e,t){ss-=e,os-=t,qu.add(wn(ss*ss+os*os)),ss=e,os=t}let Yg,Zo,qg,Xg;class Zg{constructor(t){this._append=t==null?Kg:qR(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,n){switch(this._point){case 0:{this._append`M${t},${n}`,this._point=1;break}case 1:{this._append`L${t},${n}`;break}default:{if(this._append`M${t},${n}`,this._radius!==qg||this._append!==Zo){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`,qg=r,Zo=this._append,Xg=this._,this._=i}this._+=Xg;break}}}result(){const t=this._;return this._="",t.length?t:null}}function Kg(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function qR(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return Kg;if(t!==Yg){const n=10**t;Yg=t,Zo=function(r){let i=1;this._+=r[0];for(const a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}return Zo}function XR(e,t){let n=3,r=4.5,i,a;function s(o){return o&&(typeof r=="function"&&a.pointRadius(+r.apply(this,arguments)),Qi(o,i(a))),a.result()}return s.area=function(o){return Qi(o,i(fr)),fr.result()},s.measure=function(o){return Qi(o,i(ls)),ls.result()},s.bounds=function(o){return Qi(o,i(Yo)),Yo.result()},s.centroid=function(o){return Qi(o,i(pn)),pn.result()},s.projection=function(o){return arguments.length?(i=o==null?(e=null,Bu):(e=o).stream,s):e},s.context=function(o){return arguments.length?(a=o==null?(t=null,new Zg(n)):new Gg(t=o),typeof r!="function"&&a.pointRadius(r),s):t},s.pointRadius=function(o){return arguments.length?(r=typeof o=="function"?o:(a.pointRadius(+o),+o),s):r},s.digits=function(o){if(!arguments.length)return n;if(o==null)n=null;else{const l=Math.floor(o);if(!(l>=0))throw new RangeError(`invalid digits: ${o}`);n=l}return t===null&&(a=new Zg(n)),s},s.projection(e).digits(n).context(t)}function Zu(e){return function(t){var n=new Ku;for(var r in e)n[r]=e[r];return n.stream=t,n}}function Ku(){}Ku.prototype={constructor:Ku,point:function(e,t){this.stream.point(e,t)},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 Qu(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),Qi(n,e.stream(Yo)),t(Yo.result()),r!=null&&e.clipExtent(r),e}function Qg(e,t,n){return Qu(e,function(r){var i=t[1][0]-t[0][0],a=t[1][1]-t[0][1],s=Math.min(i/(r[1][0]-r[0][0]),a/(r[1][1]-r[0][1])),o=+t[0][0]+(i-s*(r[1][0]+r[0][0]))/2,l=+t[0][1]+(a-s*(r[1][1]+r[0][1]))/2;e.scale(150*s).translate([o,l])},n)}function ZR(e,t,n){return Qg(e,[[0,0],t],n)}function KR(e,t,n){return Qu(e,function(r){var i=+t,a=i/(r[1][0]-r[0][0]),s=(i-a*(r[1][0]+r[0][0]))/2,o=-a*r[0][1];e.scale(150*a).translate([s,o])},n)}function QR(e,t,n){return Qu(e,function(r){var i=+t,a=i/(r[1][1]-r[0][1]),s=-a*r[0][0],o=(i-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([s,o])},n)}var Jg=16,JR=Wt(30*ue);function tv(e,t){return+t?ek(e,t):tk(e)}function tk(e){return Zu({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function ek(e,t){function n(r,i,a,s,o,l,c,u,d,h,p,f,v,m){var y=c-r,g=u-i,x=y*y+g*g;if(x>4*t&&v--){var O=s+h,T=o+p,S=l+f,D=wn(O*O+T*T+S*S),P=pr(S/=D),I=Gt(Gt(S)-1)<Ft||Gt(a-d)<Ft?(a+d)/2:ci(T,O),N=e(I,P),M=N[0],q=N[1],H=M-r,G=q-i,E=g*H-y*G;(E*E/x>t||Gt((y*H+g*G)/x-.5)>.3||s*h+o*p+l*f<JR)&&(n(r,i,a,s,o,l,M,q,I,O/=D,T/=D,S,v,m),m.point(M,q),n(M,q,I,O,T,S,c,u,d,h,p,f,v,m))}}return function(r){var i,a,s,o,l,c,u,d,h,p,f,v,m={point:y,lineStart:g,lineEnd:O,polygonStart:function(){r.polygonStart(),m.lineStart=T},polygonEnd:function(){r.polygonEnd(),m.lineStart=g}};function y(P,I){P=e(P,I),r.point(P[0],P[1])}function g(){d=NaN,m.point=x,r.lineStart()}function x(P,I){var N=Ji([P,I]),M=e(P,I);n(d,h,u,p,f,v,d=M[0],h=M[1],u=P,p=N[0],f=N[1],v=N[2],Jg,r),r.point(d,h)}function O(){m.point=y,r.lineEnd()}function T(){g(),m.point=S,m.lineEnd=D}function S(P,I){x(i=P,I),a=d,s=h,o=p,l=f,c=v,m.point=x}function D(){n(d,h,u,p,f,v,a,s,i,o,l,c,Jg,r),m.lineEnd=O,O()}return m}}var nk=Zu({point:function(e,t){this.stream.point(e*ue,t*ue)}});function rk(e){return Zu({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function ik(e,t,n,r,i){function a(s,o){return s*=r,o*=i,[t+e*s,n-e*o]}return a.invert=function(s,o){return[(s-t)/e*r,(n-o)/e*i]},a}function ev(e,t,n,r,i,a){if(!a)return ik(e,t,n,r,i);var s=Wt(a),o=Ht(a),l=s*e,c=o*e,u=s/e,d=o/e,h=(o*n-s*t)/e,p=(o*t+s*n)/e;function f(v,m){return v*=r,m*=i,[l*v-c*m+t,n-c*v-l*m]}return f.invert=function(v,m){return[r*(u*v-d*m+h),i*(p-d*v-u*m)]},f}function Ko(e){return nv(function(){return e})()}function nv(e){var t,n=150,r=480,i=250,a=0,s=0,o=0,l=0,c=0,u,d=0,h=1,p=1,f=null,v=Dg,m=null,y,g,x,O=Bu,T=.5,S,D,P,I,N;function M(E){return P(E[0]*ue,E[1]*ue)}function q(E){return E=P.invert(E[0],E[1]),E&&[E[0]*Ie,E[1]*Ie]}M.stream=function(E){return I&&N===E?I:I=nk(rk(u)(v(S(O(N=E)))))},M.preclip=function(E){return arguments.length?(v=E,f=void 0,G()):v},M.postclip=function(E){return arguments.length?(O=E,m=y=g=x=null,G()):O},M.clipAngle=function(E){return arguments.length?(v=+E?IR(f=E*ue):(f=null,Dg),G()):f*Ie},M.clipExtent=function(E){return arguments.length?(O=E==null?(m=y=g=x=null,Bu):PR(m=+E[0][0],y=+E[0][1],g=+E[1][0],x=+E[1][1]),G()):m==null?null:[[m,y],[g,x]]},M.scale=function(E){return arguments.length?(n=+E,H()):n},M.translate=function(E){return arguments.length?(r=+E[0],i=+E[1],H()):[r,i]},M.center=function(E){return arguments.length?(a=E[0]%360*ue,s=E[1]%360*ue,H()):[a*Ie,s*Ie]},M.rotate=function(E){return arguments.length?(o=E[0]%360*ue,l=E[1]%360*ue,c=E.length>2?E[2]%360*ue:0,H()):[o*Ie,l*Ie,c*Ie]},M.angle=function(E){return arguments.length?(d=E%360*ue,H()):d*Ie},M.reflectX=function(E){return arguments.length?(h=E?-1:1,H()):h<0},M.reflectY=function(E){return arguments.length?(p=E?-1:1,H()):p<0},M.precision=function(E){return arguments.length?(S=tv(D,T=E*E),G()):wn(T)},M.fitExtent=function(E,L){return Qg(M,E,L)},M.fitSize=function(E,L){return ZR(M,E,L)},M.fitWidth=function(E,L){return KR(M,E,L)},M.fitHeight=function(E,L){return QR(M,E,L)};function H(){var E=ev(n,0,0,h,p,d).apply(null,t(a,s)),L=ev(n,r-E[0],i-E[1],h,p,d);return u=Sg(o,l,c),D=Nu(t,L),P=Nu(u,D),S=tv(D,T),G()}function G(){return I=N=null,M}return function(){return t=e.apply(this,arguments),M.invert=t.invert&&q,H()}}function rv(e){var t=0,n=Ct/3,r=nv(e),i=r(t,n);return i.parallels=function(a){return arguments.length?r(t=a[0]*ue,n=a[1]*ue):[t*Ie,n*Ie]},i}function ak(e){var t=Wt(e);function n(r,i){return[r*t,Ht(i)/t]}return n.invert=function(r,i){return[r/t,pr(i*t)]},n}function sk(e,t){var n=Ht(e),r=(n+Ht(t))/2;if(Gt(r)<Ft)return ak(e);var i=1+n*(2*r-n),a=wn(i)/r;function s(o,l){var c=wn(i-2*r*Ht(l))/r;return[c*Ht(o*=r),a-c*Wt(o)]}return s.invert=function(o,l){var c=a-l,u=ci(o,Gt(c))*Sr(c);return c*r<0&&(u-=Ct*Sr(o)*Sr(c)),[u/r,pr((i-(o*o+c*c)*r*r)/(2*r))]},s}function iv(){return rv(sk).scale(155.424).center([0,33.6442])}function ok(){return iv().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Ju(e,t){return[e,OR(SR((Ge+t)/2))]}Ju.invert=function(e,t){return[e,2*xg(TR(t))-Ge]};function lk(){return ck(Ju).scale(961/Ke)}function ck(e){var t=Ko(e),n=t.center,r=t.scale,i=t.translate,a=t.clipExtent,s=null,o,l,c;t.scale=function(d){return arguments.length?(r(d),u()):r()},t.translate=function(d){return arguments.length?(i(d),u()):i()},t.center=function(d){return arguments.length?(n(d),u()):n()},t.clipExtent=function(d){return arguments.length?(d==null?s=o=l=c=null:(s=+d[0][0],o=+d[0][1],l=+d[1][0],c=+d[1][1]),u()):s==null?null:[[s,o],[l,c]]};function u(){var d=Ct*r(),h=t($R(t.rotate()).invert([0,0]));return a(s==null?[[h[0]-d,h[1]-d],[h[0]+d,h[1]+d]]:e===Ju?[[Math.max(h[0]-d,s),o],[Math.min(h[0]+d,l),c]]:[[s,Math.max(h[1]-d,o)],[l,Math.min(h[1]+d,c)]])}return u()}function Qo(e,t){return[e,t]}Qo.invert=Qo;function uk(){return Ko(Qo).scale(152.63)}function hk(e,t){var n=Wt(e),r=e===t?Ht(e):(n-Wt(t))/(t-e),i=n/r+e;if(Gt(r)<Ft)return Qo;function a(s,o){var l=i-o,c=r*s;return[l*Ht(c),i-l*Wt(c)]}return a.invert=function(s,o){var l=i-o,c=ci(s,Gt(l))*Sr(l);return l*r<0&&(c-=Ct*Sr(s)*Sr(l)),[c/r,i-Sr(r)*wn(s*s+l*l)]},a}function dk(){return rv(hk).scale(131.154).center([0,13.9389])}var cs=1.340264,us=-.081106,hs=893e-6,ds=.003796,Jo=wn(3)/2,pk=12;function av(e,t){var n=pr(Jo*Ht(t)),r=n*n,i=r*r*r;return[e*Wt(n)/(Jo*(cs+3*us*r+i*(7*hs+9*ds*r))),n*(cs+us*r+i*(hs+ds*r))]}av.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,a=0,s,o,l;a<pk&&(o=n*(cs+us*r+i*(hs+ds*r))-t,l=cs+3*us*r+i*(7*hs+9*ds*r),n-=s=o/l,r=n*n,i=r*r*r,!(Gt(s)<bg));++a);return[Jo*e*(cs+3*us*r+i*(7*hs+9*ds*r))/Wt(n),pr(Ht(n)/Jo)]};function fk(){return Ko(av).scale(177.158)}function sv(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),t*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}sv.invert=function(e,t){var n=t,r=25,i;do{var a=n*n,s=a*a;n-=i=(n*(1.007226+a*(.015085+s*(-.044475+.028874*a-.005916*s)))-t)/(1.007226+a*(.015085*3+s*(-.044475*7+.028874*9*a-.005916*11*s)))}while(Gt(i)>Ft&&--r>0);return[e/(.8707+(a=n*n)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),n]};function mk(){return Ko(sv).scale(175.295)}function gk(e,t){return e.parent===t.parent?1:2}function vk(e){return e.reduce(yk,0)/e.length}function yk(e,t){return e+t.x}function bk(e){return 1+e.reduce(_k,0)}function _k(e,t){return Math.max(e,t.y)}function xk(e){for(var t;t=e.children;)e=t[0];return e}function Ek(e){for(var t;t=e.children;)e=t[t.length-1];return e}function Tk(){var e=gk,t=1,n=1,r=!1;function i(a){var s,o=0;a.eachAfter(function(h){var p=h.children;p?(h.x=vk(p),h.y=bk(p)):(h.x=s?o+=e(h,s):0,h.y=0,s=h)});var l=xk(a),c=Ek(a),u=l.x-e(l,c)/2,d=c.x+e(c,l)/2;return a.eachAfter(r?function(h){h.x=(h.x-a.x)*t,h.y=(a.y-h.y)*n}:function(h){h.x=(h.x-u)/(d-u)*t,h.y=(1-(a.y?h.y/a.y:1))*n})}return i.separation=function(a){return arguments.length?(e=a,i):e},i.size=function(a){return arguments.length?(r=!1,t=+a[0],n=+a[1],i):r?null:[t,n]},i.nodeSize=function(a){return arguments.length?(r=!0,t=+a[0],n=+a[1],i):r?[t,n]:null},i}function Ok(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function Sk(){return this.eachAfter(Ok)}function wk(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function $k(e,t){for(var n=this,r=[n],i,a,s=-1;n=r.pop();)if(e.call(t,n,++s,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function Ck(e,t){for(var n=this,r=[n],i=[],a,s,o,l=-1;n=r.pop();)if(i.push(n),a=n.children)for(s=0,o=a.length;s<o;++s)r.push(a[s]);for(;n=i.pop();)e.call(t,n,++l,this);return this}function Mk(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function Ak(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function Rk(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function kk(e){for(var t=this,n=Lk(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function Lk(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function Dk(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function Ik(){return Array.from(this)}function Nk(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function Pk(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*Uk(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function ps(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=Vk)):t===void 0&&(t=Hk);for(var n=new fs(e),r,i=[n],a,s,o,l;r=i.pop();)if((s=t(r.data))&&(l=(s=Array.from(s)).length))for(r.children=s,o=l-1;o>=0;--o)i.push(a=s[o]=new fs(s[o])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(Gk)}function Bk(){return ps(this).eachBefore(Fk)}function Hk(e){return e.children}function Vk(e){return Array.isArray(e)?e[1]:null}function Fk(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Gk(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function fs(e){this.data=e,this.depth=this.height=0,this.parent=null}fs.prototype=ps.prototype={constructor:fs,count:Sk,each:wk,eachAfter:Ck,eachBefore:$k,find:Mk,sum:Ak,sort:Rk,path:kk,ancestors:Dk,descendants:Ik,leaves:Nk,links:Pk,copy:Bk,[Symbol.iterator]:Uk};function zk(e){return e==null?null:ov(e)}function ov(e){if(typeof e!="function")throw new Error;return e}function hi(){return 0}function na(e){return function(){return e}}const jk=1664525,Wk=1013904223,lv=4294967296;function Yk(){let e=1;return()=>(e=(jk*e+Wk)%lv)/lv}function qk(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Xk(e,t){let n=e.length,r,i;for(;n;)i=t()*n--|0,r=e[n],e[n]=e[i],e[i]=r;return e}function Zk(e,t){for(var n=0,r=(e=Xk(Array.from(e),t)).length,i=[],a,s;n<r;)a=e[n],s&&cv(s,a)?++n:(s=Qk(i=Kk(i,a)),n=0);return s}function Kk(e,t){var n,r;if(th(t,e))return[t];for(n=0;n<e.length;++n)if(tl(t,e[n])&&th(ms(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(tl(ms(e[n],e[r]),t)&&tl(ms(e[n],t),e[r])&&tl(ms(e[r],t),e[n])&&th(uv(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function tl(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function cv(e,t){var n=e.r-t.r+Math.max(e.r,t.r,1)*1e-9,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function th(e,t){for(var n=0;n<t.length;++n)if(!cv(e,t[n]))return!1;return!0}function Qk(e){switch(e.length){case 1:return Jk(e[0]);case 2:return ms(e[0],e[1]);case 3:return uv(e[0],e[1],e[2])}}function Jk(e){return{x:e.x,y:e.y,r:e.r}}function ms(e,t){var n=e.x,r=e.y,i=e.r,a=t.x,s=t.y,o=t.r,l=a-n,c=s-r,u=o-i,d=Math.sqrt(l*l+c*c);return{x:(n+a+l/d*u)/2,y:(r+s+c/d*u)/2,r:(d+i+o)/2}}function uv(e,t,n){var r=e.x,i=e.y,a=e.r,s=t.x,o=t.y,l=t.r,c=n.x,u=n.y,d=n.r,h=r-s,p=r-c,f=i-o,v=i-u,m=l-a,y=d-a,g=r*r+i*i-a*a,x=g-s*s-o*o+l*l,O=g-c*c-u*u+d*d,T=p*f-h*v,S=(f*O-v*x)/(T*2)-r,D=(v*m-f*y)/T,P=(p*x-h*O)/(T*2)-i,I=(h*y-p*m)/T,N=D*D+I*I-1,M=2*(a+S*D+P*I),q=S*S+P*P-a*a,H=-(Math.abs(N)>1e-6?(M+Math.sqrt(M*M-4*N*q))/(2*N):q/M);return{x:r+S+D*H,y:i+P+I*H,r:H}}function hv(e,t,n){var r=e.x-t.x,i,a,s=e.y-t.y,o,l,c=r*r+s*s;c?(a=t.r+n.r,a*=a,l=e.r+n.r,l*=l,a>l?(i=(c+l-a)/(2*c),o=Math.sqrt(Math.max(0,l/c-i*i)),n.x=e.x-i*r-o*s,n.y=e.y-i*s+o*r):(i=(c+a-l)/(2*c),o=Math.sqrt(Math.max(0,a/c-i*i)),n.x=t.x+i*r-o*s,n.y=t.y+i*s+o*r)):(n.x=t.x+n.r,n.y=t.y)}function dv(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function pv(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,a=(t.y*n.r+n.y*t.r)/r;return i*i+a*a}function el(e){this._=e,this.next=null,this.previous=null}function tL(e,t){if(!(a=(e=qk(e)).length))return 0;var n,r,i,a,s,o,l,c,u,d,h;if(n=e[0],n.x=0,n.y=0,!(a>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(a>2))return n.r+r.r;hv(r,n,i=e[2]),n=new el(n),r=new el(r),i=new el(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(l=3;l<a;++l){hv(n._,r._,i=e[l]),i=new el(i),c=r.next,u=n.previous,d=r._.r,h=n._.r;do if(d<=h){if(dv(c._,i._)){r=c,n.next=r,r.previous=n,--l;continue t}d+=c._.r,c=c.next}else{if(dv(u._,i._)){n=u,n.next=r,r.previous=n,--l;continue t}h+=u._.r,u=u.previous}while(c!==u.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,s=pv(n);(i=i.next)!==r;)(o=pv(i))<s&&(n=i,s=o);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=Zk(n,t),l=0;l<a;++l)n=e[l],n.x-=i.x,n.y-=i.y;return i.r}function eL(e){return Math.sqrt(e.value)}function nL(){var e=null,t=1,n=1,r=hi;function i(a){const s=Yk();return a.x=t/2,a.y=n/2,e?a.eachBefore(fv(e)).eachAfter(eh(r,.5,s)).eachBefore(mv(1)):a.eachBefore(fv(eL)).eachAfter(eh(hi,1,s)).eachAfter(eh(r,a.r/Math.min(t,n),s)).eachBefore(mv(Math.min(t,n)/(2*a.r))),a}return i.radius=function(a){return arguments.length?(e=zk(a),i):e},i.size=function(a){return arguments.length?(t=+a[0],n=+a[1],i):[t,n]},i.padding=function(a){return arguments.length?(r=typeof a=="function"?a:na(+a),i):r},i}function fv(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function eh(e,t,n){return function(r){if(i=r.children){var i,a,s=i.length,o=e(r)*t||0,l;if(o)for(a=0;a<s;++a)i[a].r+=o;if(l=tL(i,n),o)for(a=0;a<s;++a)i[a].r-=o;r.r=l+o}}}function mv(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function rL(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function iL(e,t,n,r,i){for(var a=e.children,s,o=-1,l=a.length,c=e.value&&(r-t)/e.value;++o<l;)s=a[o],s.y0=n,s.y1=i,s.x0=t,s.x1=t+=s.value*c}function aL(e,t){return e.parent===t.parent?1:2}function nh(e){var t=e.children;return t?t[0]:e.t}function rh(e){var t=e.children;return t?t[t.length-1]:e.t}function sL(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function oL(e){for(var t=0,n=0,r=e.children,i=r.length,a;--i>=0;)a=r[i],a.z+=t,a.m+=t,t+=a.s+(n+=a.c)}function lL(e,t,n){return e.a.parent===t.parent?e.a:n}function nl(e,t){this._=e,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=t}nl.prototype=Object.create(fs.prototype);function cL(e){for(var t=new nl(e,0),n,r=[t],i,a,s,o;n=r.pop();)if(a=n._.children)for(n.children=new Array(o=a.length),s=o-1;s>=0;--s)r.push(i=n.children[s]=new nl(a[s],s)),i.parent=n;return(t.parent=new nl(null,0)).children=[t],t}function uL(){var e=aL,t=1,n=1,r=null;function i(c){var u=cL(c);if(u.eachAfter(a),u.parent.m=-u.z,u.eachBefore(s),r)c.eachBefore(l);else{var d=c,h=c,p=c;c.eachBefore(function(g){g.x<d.x&&(d=g),g.x>h.x&&(h=g),g.depth>p.depth&&(p=g)});var f=d===h?1:e(d,h)/2,v=f-d.x,m=t/(h.x+f+v),y=n/(p.depth||1);c.eachBefore(function(g){g.x=(g.x+v)*m,g.y=g.depth*y})}return c}function a(c){var u=c.children,d=c.parent.children,h=c.i?d[c.i-1]:null;if(u){oL(c);var p=(u[0].z+u[u.length-1].z)/2;h?(c.z=h.z+e(c._,h._),c.m=c.z-p):c.z=p}else h&&(c.z=h.z+e(c._,h._));c.parent.A=o(c,h,c.parent.A||d[0])}function s(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function o(c,u,d){if(u){for(var h=c,p=c,f=u,v=h.parent.children[0],m=h.m,y=p.m,g=f.m,x=v.m,O;f=rh(f),h=nh(h),f&&h;)v=nh(v),p=rh(p),p.a=c,O=f.z+g-h.z-m+e(f._,h._),O>0&&(sL(lL(f,c,d),c,O),m+=O,y+=O),g+=f.m,m+=h.m,x+=v.m,y+=p.m;f&&!rh(p)&&(p.t=f,p.m+=g-y),h&&!nh(v)&&(v.t=h,v.m+=m-x,d=c)}return d}function l(c){c.x*=t,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(e=c,i):e},i.size=function(c){return arguments.length?(r=!1,t=+c[0],n=+c[1],i):r?null:[t,n]},i.nodeSize=function(c){return arguments.length?(r=!0,t=+c[0],n=+c[1],i):r?[t,n]:null},i}function hL(e,t,n,r,i){for(var a=e.children,s,o=-1,l=a.length,c=e.value&&(i-n)/e.value;++o<l;)s=a[o],s.x0=t,s.x1=r,s.y0=n,s.y1=n+=s.value*c}var dL=(1+Math.sqrt(5))/2;function pL(e,t,n,r,i,a){for(var s=[],o=t.children,l,c,u=0,d=0,h=o.length,p,f,v=t.value,m,y,g,x,O,T,S;u<h;){p=i-n,f=a-r;do m=o[d++].value;while(!m&&d<h);for(y=g=m,T=Math.max(f/p,p/f)/(v*e),S=m*m*T,O=Math.max(g/S,S/y);d<h;++d){if(m+=c=o[d].value,c<y&&(y=c),c>g&&(g=c),S=m*m*T,x=Math.max(g/S,S/y),x>O){m-=c;break}O=x}s.push(l={value:m,dice:p<f,children:o.slice(u,d)}),l.dice?iL(l,n,r,i,v?r+=f*m/v:a):hL(l,n,r,v?n+=p*m/v:i,a),v-=m,u=d}return s}const fL=function e(t){function n(r,i,a,s,o){pL(t,r,i,a,s,o)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(dL);function mL(){var e=fL,t=!1,n=1,r=1,i=[0],a=hi,s=hi,o=hi,l=hi,c=hi;function u(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(d),i=[0],t&&h.eachBefore(rL),h}function d(h){var p=i[h.depth],f=h.x0+p,v=h.y0+p,m=h.x1-p,y=h.y1-p;m<f&&(f=m=(f+m)/2),y<v&&(v=y=(v+y)/2),h.x0=f,h.y0=v,h.x1=m,h.y1=y,h.children&&(p=i[h.depth+1]=a(h)/2,f+=c(h)-p,v+=s(h)-p,m-=o(h)-p,y-=l(h)-p,m<f&&(f=m=(f+m)/2),y<v&&(v=y=(v+y)/2),e(h,f,v,m,y))}return u.round=function(h){return arguments.length?(t=!!h,u):t},u.size=function(h){return arguments.length?(n=+h[0],r=+h[1],u):[n,r]},u.tile=function(h){return arguments.length?(e=ov(h),u):e},u.padding=function(h){return arguments.length?u.paddingInner(h).paddingOuter(h):u.paddingInner()},u.paddingInner=function(h){return arguments.length?(a=typeof h=="function"?h:na(+h),u):a},u.paddingOuter=function(h){return arguments.length?u.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):u.paddingTop()},u.paddingTop=function(h){return arguments.length?(s=typeof h=="function"?h:na(+h),u):s},u.paddingRight=function(h){return arguments.length?(o=typeof h=="function"?h:na(+h),u):o},u.paddingBottom=function(h){return arguments.length?(l=typeof h=="function"?h:na(+h),u):l},u.paddingLeft=function(h){return arguments.length?(c=typeof h=="function"?h:na(+h),u):c},u}function rl(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Ru(t)}function gL(e){return e.innerRadius}function vL(e){return e.outerRadius}function yL(e){return e.startAngle}function bL(e){return e.endAngle}function _L(e){return e&&e.padAngle}function xL(e,t,n,r,i,a,s,o){var l=n-e,c=r-t,u=s-i,d=o-a,h=d*l-u*c;if(!(h*h<Me))return h=(u*(t-a)-d*(e-i))/h,[e+h*l,t+h*c]}function il(e,t,n,r,i,a,s){var o=e-n,l=t-r,c=(s?a:-a)/Yi(o*o+l*l),u=c*l,d=-c*o,h=e+u,p=t+d,f=n+u,v=r+d,m=(h+f)/2,y=(p+v)/2,g=f-h,x=v-p,O=g*g+x*x,T=i-a,S=h*v-f*p,D=(x<0?-1:1)*Yi(i2(0,T*T*O-S*S)),P=(S*x-g*D)/O,I=(-S*g-x*D)/O,N=(S*x+g*D)/O,M=(-S*g+x*D)/O,q=P-m,H=I-y,G=N-m,E=M-y;return q*q+H*H>G*G+E*E&&(P=N,I=M),{cx:P,cy:I,x01:-u,y01:-d,x11:P*(i/T-1),y11:I*(i/T-1)}}function gs(){var e=gL,t=vL,n=St(0),r=null,i=yL,a=bL,s=_L,o=null,l=rl(c);function c(){var u,d,h=+e.apply(this,arguments),p=+t.apply(this,arguments),f=i.apply(this,arguments)-wo,v=a.apply(this,arguments)-wo,m=_m(v-f),y=v>f;if(o||(o=u=l()),p<h&&(d=p,p=h,h=d),!(p>Me))o.moveTo(0,0);else if(m>$o-Me)o.moveTo(p*si(f),p*Hn(f)),o.arc(0,0,p,f,v,!y),h>Me&&(o.moveTo(h*si(v),h*Hn(v)),o.arc(0,0,h,v,f,y));else{var g=f,x=v,O=f,T=v,S=m,D=m,P=s.apply(this,arguments)/2,I=P>Me&&(r?+r.apply(this,arguments):Yi(h*h+p*p)),N=fu(_m(p-h)/2,+n.apply(this,arguments)),M=N,q=N,H,G;if(I>Me){var E=xm(I/h*Hn(P)),L=xm(I/p*Hn(P));(S-=E*2)>Me?(E*=y?1:-1,O+=E,T-=E):(S=0,O=T=(f+v)/2),(D-=L*2)>Me?(L*=y?1:-1,g+=L,x-=L):(D=0,g=x=(f+v)/2)}var $=p*si(g),V=p*Hn(g),F=h*si(T),rt=h*Hn(T);if(N>Me){var A=p*si(x),j=p*Hn(x),et=h*si(O),ct=h*Hn(O),it;if(m<ts)if(it=xL($,V,et,ct,A,j,F,rt)){var J=$-it[0],at=V-it[1],ht=A-it[0],Y=j-it[1],lt=1/Hn(a2((J*ht+at*Y)/(Yi(J*J+at*at)*Yi(ht*ht+Y*Y)))/2),_t=Yi(it[0]*it[0]+it[1]*it[1]);M=fu(N,(h-_t)/(lt-1)),q=fu(N,(p-_t)/(lt+1))}else M=q=0}D>Me?q>Me?(H=il(et,ct,$,V,p,q,y),G=il(A,j,F,rt,p,q,y),o.moveTo(H.cx+H.x01,H.cy+H.y01),q<N?o.arc(H.cx,H.cy,q,Ce(H.y01,H.x01),Ce(G.y01,G.x01),!y):(o.arc(H.cx,H.cy,q,Ce(H.y01,H.x01),Ce(H.y11,H.x11),!y),o.arc(0,0,p,Ce(H.cy+H.y11,H.cx+H.x11),Ce(G.cy+G.y11,G.cx+G.x11),!y),o.arc(G.cx,G.cy,q,Ce(G.y11,G.x11),Ce(G.y01,G.x01),!y))):(o.moveTo($,V),o.arc(0,0,p,g,x,!y)):o.moveTo($,V),!(h>Me)||!(S>Me)?o.lineTo(F,rt):M>Me?(H=il(F,rt,A,j,h,-M,y),G=il($,V,et,ct,h,-M,y),o.lineTo(H.cx+H.x01,H.cy+H.y01),M<N?o.arc(H.cx,H.cy,M,Ce(H.y01,H.x01),Ce(G.y01,G.x01),!y):(o.arc(H.cx,H.cy,M,Ce(H.y01,H.x01),Ce(H.y11,H.x11),!y),o.arc(0,0,h,Ce(H.cy+H.y11,H.cx+H.x11),Ce(G.cy+G.y11,G.cx+G.x11),y),o.arc(G.cx,G.cy,M,Ce(G.y11,G.x11),Ce(G.y01,G.x01),!y))):o.arc(0,0,h,T,O,y)}if(o.closePath(),u)return o=null,u+""||null}return c.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-ts/2;return[si(d)*u,Hn(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:St(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:St(+u),c):t},c.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:St(+u),c):n},c.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:St(+u),c):r},c.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:St(+u),c):i},c.endAngle=function(u){return arguments.length?(a=typeof u=="function"?u:St(+u),c):a},c.padAngle=function(u){return arguments.length?(s=typeof u=="function"?u:St(+u),c):s},c.context=function(u){return arguments.length?(o=u??null,c):o},c}function ih(e){return e[0]}function ah(e){return e[1]}function vs(e,t){var n=St(!0),r=null,i=Co,a=null,s=rl(o);e=typeof e=="function"?e:e===void 0?ih:St(e),t=typeof t=="function"?t:t===void 0?ah:St(t);function o(l){var c,u=(l=_o(l)).length,d,h=!1,p;for(r==null&&(a=i(p=s())),c=0;c<=u;++c)!(c<u&&n(d=l[c],c,l))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+e(d,c,l),+t(d,c,l));if(p)return a=null,p+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:St(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:St(+l),o):t},o.defined=function(l){return arguments.length?(n=typeof l=="function"?l:St(!!l),o):n},o.curve=function(l){return arguments.length?(i=l,r!=null&&(a=i(r)),o):i},o.context=function(l){return arguments.length?(l==null?r=a=null:a=i(r=l),o):r},o}function sh(e,t,n){var r=null,i=St(!0),a=null,s=Co,o=null,l=rl(c);e=typeof e=="function"?e:e===void 0?ih:St(+e),t=typeof t=="function"?t:St(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?ah:St(+n);function c(d){var h,p,f,v=(d=_o(d)).length,m,y=!1,g,x=new Array(v),O=new Array(v);for(a==null&&(o=s(g=l())),h=0;h<=v;++h){if(!(h<v&&i(m=d[h],h,d))===y)if(y=!y)p=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),f=h-1;f>=p;--f)o.point(x[f],O[f]);o.lineEnd(),o.areaEnd()}y&&(x[h]=+e(m,h,d),O[h]=+t(m,h,d),o.point(r?+r(m,h,d):x[h],n?+n(m,h,d):O[h]))}if(g)return o=null,g+""||null}function u(){return vs().defined(i).curve(s).context(a)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:St(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:St(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:St(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:St(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:St(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:St(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(d){return arguments.length?(i=typeof d=="function"?d:St(!!d),c):i},c.curve=function(d){return arguments.length?(s=d,a!=null&&(o=s(a)),c):s},c.context=function(d){return arguments.length?(d==null?a=o=null:o=s(a=d),c):a},c}function EL(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function TL(e){return e}function OL(){var e=TL,t=EL,n=null,r=St(0),i=St($o),a=St(0);function s(o){var l,c=(o=_o(o)).length,u,d,h=0,p=new Array(c),f=new Array(c),v=+r.apply(this,arguments),m=Math.min($o,Math.max(-$o,i.apply(this,arguments)-v)),y,g=Math.min(Math.abs(m)/c,a.apply(this,arguments)),x=g*(m<0?-1:1),O;for(l=0;l<c;++l)(O=f[p[l]=l]=+e(o[l],l,o))>0&&(h+=O);for(t!=null?p.sort(function(T,S){return t(f[T],f[S])}):n!=null&&p.sort(function(T,S){return n(o[T],o[S])}),l=0,d=h?(m-c*x)/h:0;l<c;++l,v=y)u=p[l],O=f[u],y=v+(O>0?O*d:0)+x,f[u]={data:o[u],index:l,value:O,startAngle:v,endAngle:y,padAngle:g};return f}return s.value=function(o){return arguments.length?(e=typeof o=="function"?o:St(+o),s):e},s.sortValues=function(o){return arguments.length?(t=o,n=null,s):t},s.sort=function(o){return arguments.length?(n=o,t=null,s):n},s.startAngle=function(o){return arguments.length?(r=typeof o=="function"?o:St(+o),s):r},s.endAngle=function(o){return arguments.length?(i=typeof o=="function"?o:St(+o),s):i},s.padAngle=function(o){return arguments.length?(a=typeof o=="function"?o:St(+o),s):a},s}var SL=vv(Co);function gv(e){this._curve=e}gv.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function vv(e){function t(n){return new gv(e(n))}return t._curve=e,t}function wL(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(vv(n)):t()._curve},e}function $L(){return wL(vs().curve(SL))}class CL{constructor(t,n){this._context=t,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(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function ML(e){return new CL(e,!0)}function AL(e){return e.source}function RL(e){return e.target}function kL(e){let t=AL,n=RL,r=ih,i=ah,a=null,s=null,o=rl(l);function l(){let c;const u=Q$.call(arguments),d=t.apply(this,u),h=n.apply(this,u);if(a==null&&(s=e(c=o())),s.lineStart(),u[0]=d,s.point(+r.apply(this,u),+i.apply(this,u)),u[0]=h,s.point(+r.apply(this,u),+i.apply(this,u)),s.lineEnd(),c)return s=null,c+""||null}return l.source=function(c){return arguments.length?(t=c,l):t},l.target=function(c){return arguments.length?(n=c,l):n},l.x=function(c){return arguments.length?(r=typeof c=="function"?c:St(+c),l):r},l.y=function(c){return arguments.length?(i=typeof c=="function"?c:St(+c),l):i},l.context=function(c){return arguments.length?(c==null?a=s=null:s=e(a=c),l):a},l}function LL(){return kL(ML)}let Mt=class{constructor(t,n,r){if(this.type="",this.renderType=ft.HTML,this.id="",this.parent=void 0,this.configs={},this.model=t,this.services=n,r&&(this.configs=r,this.configs.id)){const i=_(this.model.getOptions(),"style","prefix");this.id=`${i}--${this.configs.id}`}this.parent||this.setParent(U(this.services.domUtils.getMainContainer()))}init(){}render(t=!0){console.error("Error: Component did not provide the required render function.")}destroy(){}setModel(t){this.model=t}setServices(t){this.services=t}setParent(t){var n;const r=this.parent;if(this.parent=t,!(r&&r.node()===t.node())&&this.type){const i=_(this.model.getOptions(),"style","prefix");(n=this.parent)==null||n.classed(`${Ve}--${i}--${this.type}`,!0),r&&r.classed(`${Ve}--${i}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(t={ariaLabel:null,isPresentational:!1,withinChartClip:!1}){if(this.type){const n=_(this.model.getOptions(),"style","prefix"),r=this.id?`#${this.id}`:"",i=B.appendOrSelect(this.parent,`${this.renderType===ft.SVG?"svg":"div"}${r}.${Ve}--${n}--${this.type}`);if(t.ariaLabel&&i.attr("aria-label",t.ariaLabel),t.isPresentational&&i.attr("role","presentation"),t.withinChartClip){const a=this.model.get("chartClipId");if(a){const s=U(`#${a}`).select("rect");s.size()!==0&&parseFloat(s.attr("height"))>0&&i.attr("clip-path",`url(#${a})`)}}return i.attr("width","100%").attr("height","100%")}return this.parent}getOptions(){return this.configs.options?yt({},this.model.getOptions(),this.configs.options):this.model.getOptions()}};/*! @license DOMPurify 3.2.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.1/LICENSE */const{entries:yv,setPrototypeOf:bv,isFrozen:DL,getPrototypeOf:IL,getOwnPropertyDescriptor:NL}=Object;let{freeze:Ne,seal:fn,create:_v}=Object,{apply:oh,construct:lh}=typeof Reflect<"u"&&Reflect;Ne||(Ne=function(e){return e}),fn||(fn=function(e){return e}),oh||(oh=function(e,t,n){return e.apply(t,n)}),lh||(lh=function(e,t){return new e(...t)});const al=Qe(Array.prototype.forEach),xv=Qe(Array.prototype.pop),ys=Qe(Array.prototype.push),sl=Qe(String.prototype.toLowerCase),ch=Qe(String.prototype.toString),Ev=Qe(String.prototype.match),bs=Qe(String.prototype.replace),PL=Qe(String.prototype.indexOf),UL=Qe(String.prototype.trim),$n=Qe(Object.prototype.hasOwnProperty),Pe=Qe(RegExp.prototype.test),_s=BL(TypeError);function Qe(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return oh(e,t,r)}}function BL(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return lh(e,n)}}function At(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:sl;bv&&bv(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const a=n(i);a!==i&&(DL(t)||(t[r]=a),i=a)}e[i]=!0}return e}function HL(e){for(let t=0;t<e.length;t++)$n(e,t)||(e[t]=null);return e}function di(e){const t=_v(null);for(const[n,r]of yv(e))$n(e,n)&&(Array.isArray(r)?t[n]=HL(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=di(r):t[n]=r);return t}function xs(e,t){for(;e!==null;){const r=NL(e,t);if(r){if(r.get)return Qe(r.get);if(typeof r.value=="function")return Qe(r.value)}e=IL(e)}function n(){return null}return n}const Tv=Ne(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),uh=Ne(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),hh=Ne(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),VL=Ne(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),dh=Ne(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),FL=Ne(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ov=Ne(["#text"]),Sv=Ne(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),ph=Ne(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),wv=Ne(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ol=Ne(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),GL=fn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),zL=fn(/<%[\w\W]*|[\w\W]*%>/gm),jL=fn(/\${[\w\W]*}/gm),WL=fn(/^data-[\-\w.\u00B7-\uFFFF]/),YL=fn(/^aria-[\-\w]+$/),$v=fn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),qL=fn(/^(?:\w+script|data):/i),XL=fn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Cv=fn(/^html$/i),ZL=fn(/^[a-z][.\w]*(-[.\w]+)+$/i);var Mv=Object.freeze({__proto__:null,ARIA_ATTR:YL,ATTR_WHITESPACE:XL,CUSTOM_ELEMENT:ZL,DATA_ATTR:WL,DOCTYPE_NAME:Cv,ERB_EXPR:zL,IS_ALLOWED_URI:$v,IS_SCRIPT_OR_DATA:qL,MUSTACHE_EXPR:GL,TMPLIT_EXPR:jL});const Es={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},KL=function(){return typeof window>"u"?null:window},QL=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function Av(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:KL();const t=C=>Av(C);if(t.version="3.2.1",t.removed=[],!e||!e.document||e.document.nodeType!==Es.document)return t.isSupported=!1,t;let{document:n}=e;const r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:o,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:h,trustedTypes:p}=e,f=l.prototype,v=xs(f,"cloneNode"),m=xs(f,"remove"),y=xs(f,"nextSibling"),g=xs(f,"childNodes"),x=xs(f,"parentNode");if(typeof s=="function"){const C=n.createElement("template");C.content&&C.content.ownerDocument&&(n=C.content.ownerDocument)}let O,T="";const{implementation:S,createNodeIterator:D,createDocumentFragment:P,getElementsByTagName:I}=n,{importNode:N}=r;let M={};t.isSupported=typeof yv=="function"&&typeof x=="function"&&S&&S.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:q,ERB_EXPR:H,TMPLIT_EXPR:G,DATA_ATTR:E,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:$,ATTR_WHITESPACE:V,CUSTOM_ELEMENT:F}=Mv;let{IS_ALLOWED_URI:rt}=Mv,A=null;const j=At({},[...Tv,...uh,...hh,...dh,...Ov]);let et=null;const ct=At({},[...Sv,...ph,...wv,...ol]);let it=Object.seal(_v(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),J=null,at=null,ht=!0,Y=!0,lt=!1,_t=!0,K=!1,Dt=!0,Ot=!1,Jt=!1,Yt=!1,ut=!1,Nt=!1,Te=!1,he=!0,jn=!1;const Ar="user-content-";let Rr=!0,Wn=!1,en={},mn=null;const Mn=At({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let oa=null;const mi=At({},["audio","video","img","source","image","track"]);let kr=null;const Yn=At({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Lr="http://www.w3.org/1998/Math/MathML",Dr="http://www.w3.org/2000/svg",nn="http://www.w3.org/1999/xhtml";let Be=nn,Ir=!1,gi=null;const Ms=At({},[Lr,Dr,nn],ch);let An=At({},["mi","mo","mn","ms","mtext"]),gr=At({},["annotation-xml"]);const Rn=At({},["title","style","font","a","script"]);let rn=null;const qn=["application/xhtml+xml","text/html"],vr="text/html";let de=null,kn=null;const As=n.createElement("form"),vi=function(C){return C instanceof RegExp||C instanceof Function},Nr=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(kn&&kn===C)){if((!C||typeof C!="object")&&(C={}),C=di(C),rn=qn.indexOf(C.PARSER_MEDIA_TYPE)===-1?vr:C.PARSER_MEDIA_TYPE,de=rn==="application/xhtml+xml"?ch:sl,A=$n(C,"ALLOWED_TAGS")?At({},C.ALLOWED_TAGS,de):j,et=$n(C,"ALLOWED_ATTR")?At({},C.ALLOWED_ATTR,de):ct,gi=$n(C,"ALLOWED_NAMESPACES")?At({},C.ALLOWED_NAMESPACES,ch):Ms,kr=$n(C,"ADD_URI_SAFE_ATTR")?At(di(Yn),C.ADD_URI_SAFE_ATTR,de):Yn,oa=$n(C,"ADD_DATA_URI_TAGS")?At(di(mi),C.ADD_DATA_URI_TAGS,de):mi,mn=$n(C,"FORBID_CONTENTS")?At({},C.FORBID_CONTENTS,de):Mn,J=$n(C,"FORBID_TAGS")?At({},C.FORBID_TAGS,de):{},at=$n(C,"FORBID_ATTR")?At({},C.FORBID_ATTR,de):{},en=$n(C,"USE_PROFILES")?C.USE_PROFILES:!1,ht=C.ALLOW_ARIA_ATTR!==!1,Y=C.ALLOW_DATA_ATTR!==!1,lt=C.ALLOW_UNKNOWN_PROTOCOLS||!1,_t=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,K=C.SAFE_FOR_TEMPLATES||!1,Dt=C.SAFE_FOR_XML!==!1,Ot=C.WHOLE_DOCUMENT||!1,ut=C.RETURN_DOM||!1,Nt=C.RETURN_DOM_FRAGMENT||!1,Te=C.RETURN_TRUSTED_TYPE||!1,Yt=C.FORCE_BODY||!1,he=C.SANITIZE_DOM!==!1,jn=C.SANITIZE_NAMED_PROPS||!1,Rr=C.KEEP_CONTENT!==!1,Wn=C.IN_PLACE||!1,rt=C.ALLOWED_URI_REGEXP||$v,Be=C.NAMESPACE||nn,An=C.MATHML_TEXT_INTEGRATION_POINTS||An,gr=C.HTML_INTEGRATION_POINTS||gr,it=C.CUSTOM_ELEMENT_HANDLING||{},C.CUSTOM_ELEMENT_HANDLING&&vi(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(it.tagNameCheck=C.CUSTOM_ELEMENT_HANDLING.tagNameCheck),C.CUSTOM_ELEMENT_HANDLING&&vi(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(it.attributeNameCheck=C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),C.CUSTOM_ELEMENT_HANDLING&&typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(it.allowCustomizedBuiltInElements=C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),K&&(Y=!1),Nt&&(ut=!0),en&&(A=At({},Ov),et=[],en.html===!0&&(At(A,Tv),At(et,Sv)),en.svg===!0&&(At(A,uh),At(et,ph),At(et,ol)),en.svgFilters===!0&&(At(A,hh),At(et,ph),At(et,ol)),en.mathMl===!0&&(At(A,dh),At(et,wv),At(et,ol))),C.ADD_TAGS&&(A===j&&(A=di(A)),At(A,C.ADD_TAGS,de)),C.ADD_ATTR&&(et===ct&&(et=di(et)),At(et,C.ADD_ATTR,de)),C.ADD_URI_SAFE_ATTR&&At(kr,C.ADD_URI_SAFE_ATTR,de),C.FORBID_CONTENTS&&(mn===Mn&&(mn=di(mn)),At(mn,C.FORBID_CONTENTS,de)),Rr&&(A["#text"]=!0),Ot&&At(A,["html","head","body"]),A.table&&(At(A,["tbody"]),delete J.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw _s('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw _s('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');O=C.TRUSTED_TYPES_POLICY,T=O.createHTML("")}else O===void 0&&(O=QL(p,i)),O!==null&&typeof T=="string"&&(T=O.createHTML(""));Ne&&Ne(C),kn=C}},Xn=At({},[...uh,...hh,...VL]),Pr=At({},[...dh,...FL]),yi=function(C){let ot=x(C);(!ot||!ot.tagName)&&(ot={namespaceURI:Be,tagName:"template"});const tt=sl(C.tagName),gt=sl(ot.tagName);return gi[C.namespaceURI]?C.namespaceURI===Dr?ot.namespaceURI===nn?tt==="svg":ot.namespaceURI===Lr?tt==="svg"&&(gt==="annotation-xml"||An[gt]):!!Xn[tt]:C.namespaceURI===Lr?ot.namespaceURI===nn?tt==="math":ot.namespaceURI===Dr?tt==="math"&&gr[gt]:!!Pr[tt]:C.namespaceURI===nn?ot.namespaceURI===Dr&&!gr[gt]||ot.namespaceURI===Lr&&!An[gt]?!1:!Pr[tt]&&(Rn[tt]||!Xn[tt]):!!(rn==="application/xhtml+xml"&&gi[C.namespaceURI]):!1},gn=function(C){ys(t.removed,{element:C});try{x(C).removeChild(C)}catch{m(C)}},Ur=function(C,ot){try{ys(t.removed,{attribute:ot.getAttributeNode(C),from:ot})}catch{ys(t.removed,{attribute:null,from:ot})}if(ot.removeAttribute(C),C==="is"&&!et[C])if(ut||Nt)try{gn(ot)}catch{}else try{ot.setAttribute(C,"")}catch{}},la=function(C){let ot=null,tt=null;if(Yt)C="<remove></remove>"+C;else{const zt=Ev(C,/^[\r\n\t ]+/);tt=zt&&zt[0]}rn==="application/xhtml+xml"&&Be===nn&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");const gt=O?O.createHTML(C):C;if(Be===nn)try{ot=new h().parseFromString(gt,rn)}catch{}if(!ot||!ot.documentElement){ot=S.createDocument(Be,"template",null);try{ot.documentElement.innerHTML=Ir?T:gt}catch{}}const Ut=ot.body||ot.documentElement;return C&&tt&&Ut.insertBefore(n.createTextNode(tt),Ut.childNodes[0]||null),Be===nn?I.call(ot,Ot?"html":"body")[0]:Ot?ot.documentElement:Ut},ca=function(C){return D.call(C.ownerDocument||C,C,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},bi=function(C){return C instanceof d&&(typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||!(C.attributes instanceof u)||typeof C.removeAttribute!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function")},k=function(C){return typeof o=="function"&&C instanceof o};function Q(C,ot,tt){M[C]&&al(M[C],gt=>{gt.call(t,ot,tt,kn)})}const nt=function(C){let ot=null;if(Q("beforeSanitizeElements",C,null),bi(C))return gn(C),!0;const tt=de(C.nodeName);if(Q("uponSanitizeElement",C,{tagName:tt,allowedTags:A}),C.hasChildNodes()&&!k(C.firstElementChild)&&Pe(/<[/\w]/g,C.innerHTML)&&Pe(/<[/\w]/g,C.textContent)||C.nodeType===Es.progressingInstruction||Dt&&C.nodeType===Es.comment&&Pe(/<[/\w]/g,C.data))return gn(C),!0;if(!A[tt]||J[tt]){if(!J[tt]&&Rt(tt)&&(it.tagNameCheck instanceof RegExp&&Pe(it.tagNameCheck,tt)||it.tagNameCheck instanceof Function&&it.tagNameCheck(tt)))return!1;if(Rr&&!mn[tt]){const gt=x(C)||C.parentNode,Ut=g(C)||C.childNodes;if(Ut&&gt){const zt=Ut.length;for(let _e=zt-1;_e>=0;--_e){const jt=v(Ut[_e],!0);jt.__removalCount=(C.__removalCount||0)+1,gt.insertBefore(jt,y(C))}}}return gn(C),!0}return C instanceof l&&!yi(C)||(tt==="noscript"||tt==="noembed"||tt==="noframes")&&Pe(/<\/no(script|embed|frames)/i,C.innerHTML)?(gn(C),!0):(K&&C.nodeType===Es.text&&(ot=C.textContent,al([q,H,G],gt=>{ot=bs(ot,gt," ")}),C.textContent!==ot&&(ys(t.removed,{element:C.cloneNode()}),C.textContent=ot)),Q("afterSanitizeElements",C,null),!1)},vt=function(C,ot,tt){if(he&&(ot==="id"||ot==="name")&&(tt in n||tt in As))return!1;if(!(Y&&!at[ot]&&Pe(E,ot))&&!(ht&&Pe(L,ot))){if(!et[ot]||at[ot]){if(!(Rt(C)&&(it.tagNameCheck instanceof RegExp&&Pe(it.tagNameCheck,C)||it.tagNameCheck instanceof Function&&it.tagNameCheck(C))&&(it.attributeNameCheck instanceof RegExp&&Pe(it.attributeNameCheck,ot)||it.attributeNameCheck instanceof Function&&it.attributeNameCheck(ot))||ot==="is"&&it.allowCustomizedBuiltInElements&&(it.tagNameCheck instanceof RegExp&&Pe(it.tagNameCheck,tt)||it.tagNameCheck instanceof Function&&it.tagNameCheck(tt))))return!1}else if(!kr[ot]&&!Pe(rt,bs(tt,V,""))&&!((ot==="src"||ot==="xlink:href"||ot==="href")&&C!=="script"&&PL(tt,"data:")===0&&oa[C])&&!(lt&&!Pe($,bs(tt,V,"")))&&tt)return!1}return!0},Rt=function(C){return C!=="annotation-xml"&&Ev(C,F)},Pt=function(C){Q("beforeSanitizeAttributes",C,null);const{attributes:ot}=C;if(!ot)return;const tt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:et,forceKeepAttr:void 0};let gt=ot.length;for(;gt--;){const Ut=ot[gt],{name:zt,namespaceURI:_e,value:jt}=Ut,ke=de(zt);let xe=zt==="value"?jt:UL(jt);if(tt.attrName=ke,tt.attrValue=xe,tt.keepAttr=!0,tt.forceKeepAttr=void 0,Q("uponSanitizeAttribute",C,tt),xe=tt.attrValue,jn&&(ke==="id"||ke==="name")&&(Ur(zt,C),xe=Ar+xe),Dt&&Pe(/((--!?|])>)|<\/(style|title)/i,xe)){Ur(zt,C);continue}if(tt.forceKeepAttr||(Ur(zt,C),!tt.keepAttr))continue;if(!_t&&Pe(/\/>/i,xe)){Ur(zt,C);continue}K&&al([q,H,G],_i=>{xe=bs(xe,_i," ")});const ua=de(C.nodeName);if(vt(ua,ke,xe)){if(O&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!_e)switch(p.getAttributeType(ua,ke)){case"TrustedHTML":{xe=O.createHTML(xe);break}case"TrustedScriptURL":{xe=O.createScriptURL(xe);break}}try{_e?C.setAttributeNS(_e,zt,xe):C.setAttribute(zt,xe),bi(C)?gn(C):xv(t.removed)}catch{}}}Q("afterSanitizeAttributes",C,null)},$t=function C(ot){let tt=null;const gt=ca(ot);for(Q("beforeSanitizeShadowDOM",ot,null);tt=gt.nextNode();)Q("uponSanitizeShadowNode",tt,null),!nt(tt)&&(tt.content instanceof a&&C(tt.content),Pt(tt));Q("afterSanitizeShadowDOM",ot,null)};return t.sanitize=function(C){let ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},tt=null,gt=null,Ut=null,zt=null;if(Ir=!C,Ir&&(C="<!-->"),typeof C!="string"&&!k(C))if(typeof C.toString=="function"){if(C=C.toString(),typeof C!="string")throw _s("dirty is not a string, aborting")}else throw _s("toString is not a function");if(!t.isSupported)return C;if(Jt||Nr(ot),t.removed=[],typeof C=="string"&&(Wn=!1),Wn){if(C.nodeName){const ke=de(C.nodeName);if(!A[ke]||J[ke])throw _s("root node is forbidden and cannot be sanitized in-place")}}else if(C instanceof o)tt=la("<!---->"),gt=tt.ownerDocument.importNode(C,!0),gt.nodeType===Es.element&&gt.nodeName==="BODY"||gt.nodeName==="HTML"?tt=gt:tt.appendChild(gt);else{if(!ut&&!K&&!Ot&&C.indexOf("<")===-1)return O&&Te?O.createHTML(C):C;if(tt=la(C),!tt)return ut?null:Te?T:""}tt&&Yt&&gn(tt.firstChild);const _e=ca(Wn?C:tt);for(;Ut=_e.nextNode();)nt(Ut)||(Ut.content instanceof a&&$t(Ut.content),Pt(Ut));if(Wn)return C;if(ut){if(Nt)for(zt=P.call(tt.ownerDocument);tt.firstChild;)zt.appendChild(tt.firstChild);else zt=tt;return(et.shadowroot||et.shadowrootmode)&&(zt=N.call(r,zt,!0)),zt}let jt=Ot?tt.outerHTML:tt.innerHTML;return Ot&&A["!doctype"]&&tt.ownerDocument&&tt.ownerDocument.doctype&&tt.ownerDocument.doctype.name&&Pe(Cv,tt.ownerDocument.doctype.name)&&(jt="<!DOCTYPE "+tt.ownerDocument.doctype.name+`>
4
+ `+jt),K&&al([q,H,G],ke=>{jt=bs(jt,ke," ")}),O&&Te?O.createHTML(jt):jt},t.setConfig=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Nr(C),Jt=!0},t.clearConfig=function(){kn=null,Jt=!1},t.isValidAttribute=function(C,ot,tt){kn||Nr({});const gt=de(C),Ut=de(ot);return vt(gt,Ut,tt)},t.addHook=function(C,ot){typeof ot=="function"&&(M[C]=M[C]||[],ys(M[C],ot))},t.removeHook=function(C){if(M[C])return xv(M[C])},t.removeHooks=function(C){M[C]&&(M[C]=[])},t.removeAllHooks=function(){M={}},t}var fh=Av();const ll=e=>fh.sanitize(e,{USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),JL=e=>fh.sanitize(e,{NAMESPACE:"http://www.w3.org/2000/svg",USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),Gn=e=>fh.sanitize(e,{ALLOWED_TAGS:[]}),Rv=class Cy extends Mt{constructor(){super(...arguments),this.type="toolbar",this.renderType=ft.HTML}init(){const t=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(w.Toolbar.SHOW_OVERFLOW_MENU,()=>{this.renderOverflowMenu(),document.body.addEventListener("click",t)}),this.services.events.addEventListener(w.Toolbar.HIDE_OVERFLOW_MENU,()=>{document.body.removeEventListener("click",t)})}render(t=!0){const n=this.getComponentContainer({ariaLabel:"toolbar"}).attr("role","group");if(_(this.getOptions(),"data","loading"))n.html(""),this.overflowMenu=null;else{this.overflowMenu||(this.overflowMenu=n.append("div").attr("class","cds--overflow-menu-options cds--overflow-menu--flip cds--overflow-menu-options cds--overflow-menu--flip").attr("tabindex",-1).html("<ul role='menu'></ul>"));const{buttonList:r,overflowMenuItemList:i}=this.getControlConfigs();i&&r.push(this.getOverflowButtonConfig());const a=n.selectAll("div.toolbar-control").data(r,l=>l.id);a.exit().remove();const s=a.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu"),o=this;s.merge(a).classed("disabled",l=>l.shouldBeDisabled()).attr("role","button").attr("aria-disabled",l=>l.shouldBeDisabled()).attr("aria-label",l=>l.title).html(l=>`
5
5
  <button
6
6
  class="cds--overflow-menu__trigger cds--overflow-menu__trigger"
7
- aria-haspopup="true" aria-expanded="false" id="${this.services.domUtils.generateElementIDString(`control-${an(l.id)}`)}" aria-label="${an(l.title)}">
7
+ aria-haspopup="true" aria-expanded="false" id="${this.services.domUtils.generateElementIDString(`control-${Gn(l.id)}`)}" aria-label="${Gn(l.title)}">
8
8
  <svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" class="cds--overflow-menu__icon cds--overflow-menu__icon" viewBox="0 0 32 32" aria-hidden="true">
9
- ${Ck(l.iconSVG.content)}
9
+ ${JL(l.iconSVG.content)}
10
10
  </svg>
11
- </button>`).each(function(l,c){D(this).select("svg").style("pointer-events","none").style("will-change","transform").style("width",l.iconSVG.width!==void 0?l.iconSVG.width:"20px").style("height",l.iconSVG.height!==void 0?l.iconSVG.height:"20px"),D(this).select("button").on("mouseover focus",function(u){const d=D(this);d.classed("hovered",!0),o.services.events.dispatchEvent(T.Toolbar.SHOW_TOOLTIP,{event:u,hoveredElement:d,content:l.title,noWrap:!0,placements:["top","bottom"]})}).on("mouseout blur",function(){o.services.events.dispatchEvent(T.Toolbar.HIDE_TOOLTIP)}).on("click",u=>{l.shouldBeDisabled()||o.triggerFunctionAndEvent(l,u,this)}).on("keydown",u=>{u.key&&u.key==="Enter"||u.key===" "?(u.preventDefault(),o.triggerFunctionAndEvent(l,u,this)):u.key&&u.key==="ArrowLeft"?o.focusOnPreviousEnabledToolbarItem(c):u.key&&u.key==="ArrowRight"&&o.focusOnNextEnabledToolbarItem(c)})}),this.overflowButton=this.getComponentContainer().select(`button.cds--overflow-menu__trigger#${this.services.domUtils.generateElementIDString("control-toolbar-overflow-menu")}`)}}renderOverflowMenu(){const{overflowMenuItemList:t}=this.getControlConfigs(),n=this.overflowMenu.select("ul").selectAll("li.cds--overflow-menu-options__option").data(t,i=>x(i,"id"));n.exit().remove();const r=n.enter().append("li").attr("id",i=>this.services.domUtils.generateElementIDString(`control-${i.id}`)).attr("class","cds--overflow-menu-options__option cds--overflow-menu-options__option").attr("role","menuitem").attr("tabindex",1);r.append("button").attr("class","cds--overflow-menu-options__btn cds--overflow-menu-options__btn"),r.merge(n).classed("cds--overflow-menu-options__option--disabled",i=>i.shouldBeDisabled()).classed("cds--overflow-menu-options__option--disabled",i=>i.shouldBeDisabled()).attr("aria-disabled",i=>i.shouldBeDisabled()).selectAll("button").text(i=>i.title)}isOverflowMenuOpen(){return this.overflowMenu.classed("is-open")}updateOverflowMenu(t){this.overflowMenu&&(this.overflowMenu.classed("is-open",t),this.overflowButton&&(this.overflowButton.attr("aria-expanded",t),D(this.overflowButton.node().parentNode).classed("cds--overflow-menu--open",t).classed("cds--overflow-menu--open",t)),t?this.services.events.dispatchEvent(T.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(T.Toolbar.HIDE_OVERFLOW_MENU))}focusOnPreviousEnabledToolbarItem(t){const n=this.getToolbarButtonItems();let r=n.length;for(let i=t-1;i>=0;i--)if(!n[i].shouldBeDisabled()){r=i;break}if(r<n.length){const i=D(`button#${this.services.domUtils.generateElementIDString(`control-${n[r].id}`)}`).node();"focus"in i&&i.focus()}}focusOnNextEnabledToolbarItem(t){const n=this.getToolbarButtonItems();let r=-1;for(let i=t+1;i<n.length;i++)if(!n[i].shouldBeDisabled()){r=i;break}if(r>-1){const i=D(`button#${this.services.domUtils.generateElementIDString(`control-${n[r].id}`)}`).node();"focus"in i&&i.focus()}}focusOnPreviousEnabledMenuItem(t){const n=this.getOverflowMenuItems();let r=n.length;for(let i=t-1;i>=0;i--)if(!n[i].shouldBeDisabled()){r=i;break}if(r<n.length){const i=D(`#${this.services.domUtils.generateElementIDString(`control-${n[r].id}`)} button`).node();"focus"in i&&i.focus()}}focusOnNextEnabledMenuItem(t){const n=this.getOverflowMenuItems();let r=-1;for(let i=t+1;i<n.length;i++)if(!n[i].shouldBeDisabled()){r=i;break}if(r>-1){const i=D(`#${this.services.domUtils.generateElementIDString(`control-${n[r].id}`)} button`).node();"focus"in i&&i.focus()}}toggleOverflowMenu(t){if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);const n=this;this.getOverflowMenuItems().forEach((r,i)=>{const s=D(`#${this.services.domUtils.generateElementIDString(`control-${r.id}`)}`);s!==null&&(s.on("click",()=>{n.triggerFunctionAndEvent(r,t,s.node()),n.updateOverflowMenu(!1)}),s.on("keydown",a=>{a&&a.key==="Enter"?n.triggerFunctionAndEvent(r,t,s.node()):a&&a.key==="ArrowUp"?n.focusOnPreviousEnabledMenuItem(i):a&&a.key==="ArrowDown"?n.focusOnNextEnabledMenuItem(i):a&&a.key==="Escape"&&n.updateOverflowMenu(!1),a.preventDefault()}))}),n.focusOnNextEnabledMenuItem(-1)}t&&t.stopImmediatePropagation()}triggerFunctionAndEvent(t,n,r){typeof t.shouldBeDisabled=="function"&&t.shouldBeDisabled()||(typeof t.clickFunction=="function"&&t.clickFunction(n),this.services.events.dispatchEvent(T.Toolbar.BUTTON_CLICK,{control:t,event:n,element:r}))}getControlConfigs(){const t=x(this.getOptions(),"toolbar","numberOfIcons")-1,n=x(this.getOptions(),"toolbar","controls"),r=[],i=[],s=[];return n.forEach(a=>{let o=null;if(a.type===xt.CUSTOM)x(a,"id")===null&&(a.id=`toolbar-button-${i0.buttonID++}`),x(a,"shouldBeDisabled")===null&&(a.shouldBeDisabled=()=>!1),o=a;else{const l=this.services.domUtils.isFullScreenMode();a.type===xt.MAKE_FULLSCREEN&&l?a.type=xt.EXIT_FULLSCREEN:a.type===xt.EXIT_FULLSCREEN&&!l&&(a.type=xt.MAKE_FULLSCREEN),o=this.getControlConfigByType(a.type)}o&&(o.text=a.text?a.text:a.type,o.id.indexOf("toolbar-export")!==-1?r.push(o):i.length<t?x(o,"iconSVG","content")===null?s.push(o):i.push(o):s.push(o))}),s.push(...r),s.length?{buttonList:i,overflowMenuItemList:s}:{buttonList:i}}getToolbarButtonItems(){const{buttonList:t,overflowMenuItemList:n}=this.getControlConfigs();return n&&t.push(this.getOverflowButtonConfig()),t||[]}getOverflowMenuItems(){const{overflowMenuItemList:t}=this.getControlConfigs();return t||[]}getOverflowButtonConfig(){const{moreOptions:t}=x(this.model.getOptions(),"locale","translations","toolbar");return{id:"toolbar-overflow-menu",title:t,shouldBeDisabled:()=>!1,iconSVG:{content:`<circle cx="16" cy="8" r="2"></circle>
11
+ </button>`).each(function(l,c){U(this).select("svg").style("pointer-events","none").style("will-change","transform").style("width",l.iconSVG.width!==void 0?l.iconSVG.width:"20px").style("height",l.iconSVG.height!==void 0?l.iconSVG.height:"20px"),U(this).select("button").on("mouseover focus",function(u){const d=U(this);d.classed("hovered",!0),o.services.events.dispatchEvent(w.Toolbar.SHOW_TOOLTIP,{event:u,hoveredElement:d,content:l.title,noWrap:!0,placements:["top","bottom"]})}).on("mouseout blur",function(){o.services.events.dispatchEvent(w.Toolbar.HIDE_TOOLTIP)}).on("click",u=>{l.shouldBeDisabled()||o.triggerFunctionAndEvent(l,u,this)}).on("keydown",u=>{u.key&&u.key==="Enter"||u.key===" "?(u.preventDefault(),o.triggerFunctionAndEvent(l,u,this)):u.key&&u.key==="ArrowLeft"?o.focusOnPreviousEnabledToolbarItem(c):u.key&&u.key==="ArrowRight"&&o.focusOnNextEnabledToolbarItem(c)})}),this.overflowButton=this.getComponentContainer().select(`button.cds--overflow-menu__trigger#${this.services.domUtils.generateElementIDString("control-toolbar-overflow-menu")}`)}}renderOverflowMenu(){const{overflowMenuItemList:t}=this.getControlConfigs(),n=this.overflowMenu.select("ul").selectAll("li.cds--overflow-menu-options__option").data(t,i=>_(i,"id"));n.exit().remove();const r=n.enter().append("li").attr("id",i=>this.services.domUtils.generateElementIDString(`control-${i.id}`)).attr("class","cds--overflow-menu-options__option cds--overflow-menu-options__option").attr("role","menuitem").attr("tabindex",1);r.append("button").attr("class","cds--overflow-menu-options__btn cds--overflow-menu-options__btn"),r.merge(n).classed("cds--overflow-menu-options__option--disabled",i=>i.shouldBeDisabled()).classed("cds--overflow-menu-options__option--disabled",i=>i.shouldBeDisabled()).attr("aria-disabled",i=>i.shouldBeDisabled()).selectAll("button").text(i=>i.title)}isOverflowMenuOpen(){return this.overflowMenu.classed("is-open")}updateOverflowMenu(t){this.overflowMenu&&(this.overflowMenu.classed("is-open",t),this.overflowButton&&(this.overflowButton.attr("aria-expanded",t),U(this.overflowButton.node().parentNode).classed("cds--overflow-menu--open",t).classed("cds--overflow-menu--open",t)),t?this.services.events.dispatchEvent(w.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(w.Toolbar.HIDE_OVERFLOW_MENU))}focusOnPreviousEnabledToolbarItem(t){const n=this.getToolbarButtonItems();let r=n.length;for(let i=t-1;i>=0;i--)if(!n[i].shouldBeDisabled()){r=i;break}if(r<n.length){const i=U(`button#${this.services.domUtils.generateElementIDString(`control-${n[r].id}`)}`).node();"focus"in i&&i.focus()}}focusOnNextEnabledToolbarItem(t){const n=this.getToolbarButtonItems();let r=-1;for(let i=t+1;i<n.length;i++)if(!n[i].shouldBeDisabled()){r=i;break}if(r>-1){const i=U(`button#${this.services.domUtils.generateElementIDString(`control-${n[r].id}`)}`).node();"focus"in i&&i.focus()}}focusOnPreviousEnabledMenuItem(t){const n=this.getOverflowMenuItems();let r=n.length;for(let i=t-1;i>=0;i--)if(!n[i].shouldBeDisabled()){r=i;break}if(r<n.length){const i=U(`#${this.services.domUtils.generateElementIDString(`control-${n[r].id}`)} button`).node();"focus"in i&&i.focus()}}focusOnNextEnabledMenuItem(t){const n=this.getOverflowMenuItems();let r=-1;for(let i=t+1;i<n.length;i++)if(!n[i].shouldBeDisabled()){r=i;break}if(r>-1){const i=U(`#${this.services.domUtils.generateElementIDString(`control-${n[r].id}`)} button`).node();"focus"in i&&i.focus()}}toggleOverflowMenu(t){if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);const n=this;this.getOverflowMenuItems().forEach((r,i)=>{const a=U(`#${this.services.domUtils.generateElementIDString(`control-${r.id}`)}`);a!==null&&(a.on("click",()=>{n.triggerFunctionAndEvent(r,t,a.node()),n.updateOverflowMenu(!1)}),a.on("keydown",s=>{s&&s.key==="Enter"?n.triggerFunctionAndEvent(r,t,a.node()):s&&s.key==="ArrowUp"?n.focusOnPreviousEnabledMenuItem(i):s&&s.key==="ArrowDown"?n.focusOnNextEnabledMenuItem(i):s&&s.key==="Escape"&&n.updateOverflowMenu(!1),s.preventDefault()}))}),n.focusOnNextEnabledMenuItem(-1)}t&&t.stopImmediatePropagation()}triggerFunctionAndEvent(t,n,r){typeof t.shouldBeDisabled=="function"&&t.shouldBeDisabled()||(typeof t.clickFunction=="function"&&t.clickFunction(n),this.services.events.dispatchEvent(w.Toolbar.BUTTON_CLICK,{control:t,event:n,element:r}))}getControlConfigs(){const t=_(this.getOptions(),"toolbar","numberOfIcons")-1,n=_(this.getOptions(),"toolbar","controls"),r=[],i=[],a=[];return n.forEach(s=>{let o=null;if(s.type===Bt.CUSTOM)_(s,"id")===null&&(s.id=`toolbar-button-${Cy.buttonID++}`),_(s,"shouldBeDisabled")===null&&(s.shouldBeDisabled=()=>!1),o=s;else{const l=this.services.domUtils.isFullScreenMode();s.type===Bt.MAKE_FULLSCREEN&&l?s.type=Bt.EXIT_FULLSCREEN:s.type===Bt.EXIT_FULLSCREEN&&!l&&(s.type=Bt.MAKE_FULLSCREEN),o=this.getControlConfigByType(s.type)}o&&(o.text=s.text?s.text:s.type,o.id.indexOf("toolbar-export")!==-1?r.push(o):i.length<t?_(o,"iconSVG","content")===null?a.push(o):i.push(o):a.push(o))}),a.push(...r),a.length?{buttonList:i,overflowMenuItemList:a}:{buttonList:i}}getToolbarButtonItems(){const{buttonList:t,overflowMenuItemList:n}=this.getControlConfigs();return n&&t.push(this.getOverflowButtonConfig()),t||[]}getOverflowMenuItems(){const{overflowMenuItemList:t}=this.getControlConfigs();return t||[]}getOverflowButtonConfig(){const{moreOptions:t}=_(this.model.getOptions(),"locale","translations","toolbar");return{id:"toolbar-overflow-menu",title:t,shouldBeDisabled:()=>!1,iconSVG:{content:`<circle cx="16" cy="8" r="2"></circle>
12
12
  <circle cx="16" cy="16" r="2"></circle>
13
- <circle cx="16" cy="24" r="2"></circle>`},clickFunction:n=>this.toggleOverflowMenu(n)}}getControlConfigByType(t){const n=this.services.zoom&&this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState(),r=this.model.getDisplayData(),i=this.model.getOptions(),{exportAsCSV:s,exportAsJPG:a,exportAsPNG:o,zoomIn:l,zoomOut:c,resetZoom:u,makeFullScreen:d,exitFullScreen:h,showAsTable:p}=x(i,"locale","translations","toolbar");let f;switch(t){case xt.ZOOM_IN:n&&(f={id:"toolbar-zoomIn",title:l,shouldBeDisabled:()=>this.services.zoom.isMinZoomDomain(),iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.zoom.zoomIn()});break;case xt.ZOOM_OUT:n&&(f={id:"toolbar-zoomOut",title:c,shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.zoom.zoomOut()});break;case xt.RESET_ZOOM:n&&(f={id:"toolbar-resetZoom",title:u,shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.zoom.resetZoomDomain()});break;case xt.MAKE_FULLSCREEN:f={id:"toolbar-makefullscreen",iconSVG:{content:this.getControlIconByType(t),width:"15px",height:"15px"},title:d,shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case xt.EXIT_FULLSCREEN:f={id:"toolbar-exitfullscreen",iconSVG:{content:this.getControlIconByType(t),width:"15px",height:"15px"},title:h,shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case xt.SHOW_AS_DATATABLE:f={id:"toolbar-showasdatatable",iconSVG:{content:this.getControlIconByType(t)},title:p,shouldBeDisabled:()=>r.length===0,clickFunction:()=>this.services.events.dispatchEvent(T.Modal.SHOW)};break;case xt.EXPORT_CSV:f={id:"toolbar-export-CSV",title:s,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.model.exportToCSV()};break;case xt.EXPORT_PNG:f={id:"toolbar-export-PNG",title:o,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.domUtils.exportToPNG()};break;case xt.EXPORT_JPG:f={id:"toolbar-export-JPG",title:a,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.domUtils.exportToJPG()};break;default:throw Error("Not supported toolbar control type: "+t)}return f}getControlIconByType(t){switch(t){case xt.ZOOM_IN:return`<polygon points="19 13 15 13 15 9 13 9 13 13 9 13 9 15 13 15 13 19 15 19 15 15 19 15 19 13"/>
14
- <path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>`;case xt.ZOOM_OUT:return`<rect x="9" y="13" width="10" height="2"/>
15
- <path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>`;case xt.RESET_ZOOM:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case xt.MAKE_FULLSCREEN:return'<polygon points="21 2 21 4 26.59 4 17 13.58 18.41 15 28 5.41 28 11 30 11 30 2 21 2"/><polygon points="15 18.42 13.59 17 4 26.59 4 21 2 21 2 30 11 30 11 28 5.41 28 15 18.42"/>';case xt.EXIT_FULLSCREEN:return'<polygon points="4 18 4 20 10.586 20 2 28.582 3.414 30 12 21.414 12 28 14 28 14 18 4 18"/><polygon points="30 3.416 28.592 2 20 10.586 20 4 18 4 18 14 28 14 28 12 21.414 12 30 3.416"/>';case xt.SHOW_AS_DATATABLE:return'<rect x="4" y="6" width="18" height="2"/><rect x="4" y="12" width="18" height="2"/><rect x="4" y="18" width="18" height="2"/><rect x="4" y="24" width="18" height="2"/><rect x="26" y="6" width="2" height="2"/><rect x="26" y="12" width="2" height="2"/><rect x="26" y="18" width="2" height="2"/><rect x="26" y="24" width="2" height="2"/>';case xt.EXPORT_CSV:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case xt.EXPORT_JPG:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case xt.EXPORT_PNG:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';default:throw Error("Not supported toolbar control type: "+t)}}};_g.buttonID=0;let io=_g;const Eg=class s0 extends ht{constructor(t,n,r,i){super(t,n,i),this.type="layout",this.configs=i,this.children=r,this._instanceID=s0.instanceID++,this.init()}init(){this.children.forEach(t=>{t.components.forEach(n=>{n.init()})})}getPreferedAndFixedSizeSum(){const t=this.parent;let n=0;return t.selectAll(`div.layout-child-${this._instanceID}`).filter(r=>{const i=x(r,"growth");return i===at.PREFERRED||i===at.FIXED}).each(function(r){n+=r.size}),n}getNumOfStretchChildren(){return this.parent.selectAll(`div.layout-child-${this._instanceID}`).filter(t=>x(t,"growth")===at.STRETCH).size()}render(t=!0){const n=this.model.getOptions(),r=this.parent,{width:i,height:s}=R.getHTMLElementSize(r.node()),a=this.configs.direction===wt.ROW||this.configs.direction===wt.ROW_REVERSE,o=x(this.model.getOptions(),"style","prefix"),l=r.classed(`${he}--${o}--layout-row`,this.configs.direction===wt.ROW).classed(`${he}--${o}--layout-row-reverse`,this.configs.direction===wt.ROW_REVERSE).classed(`${he}--${o}--layout-column`,this.configs.direction===wt.COLUMN).classed(`${he}--${o}--layout-column-reverse`,this.configs.direction===wt.COLUMN_REVERSE).classed(`${he}--${o}--layout-alignitems-center`,this.configs.alignItems===jn.CENTER).selectAll(`div.layout-child-${this._instanceID}`).data(this.children,u=>u.id);l.enter().append("div").merge(r.selectAll(`div.layout-child-${this._instanceID}`)).attr("class",u=>`layout-child layout-child-${this._instanceID} ${u.id}`).each(function(u){u.components.forEach(d=>{var h;const p=D(this),f=x(u,"renderType")===Q.SVG;d.setParent(f?R.appendOrSelect(p,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):p),f&&!p.select("svg.layout-svg-wrapper").attr("aria-label")&&p.select("svg.layout-svg-wrapper").attr("aria-label",((h=n==null?void 0:n.accessibility)==null?void 0:h.svgAriaLabel)||(n==null?void 0:n.title));const g=x(u,"growth");(g===at.PREFERRED||g===at.FIXED)&&d.render(t)})}),r.selectAll(`div.layout-child-${this._instanceID}`).style("height",null).style("width",null).each(function(u){const d=x(u,"growth"),h=x(u,"renderType")===Q.SVG?R.getSVGElementSize(D(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):R.getHTMLElementSize(this);if(d===at.PREFERRED){const p=a?h.width:h.height,f=a?i:s;u.size=p/f*100}}),l.exit().remove(),this.children.filter(u=>x(u,"growth")===at.STRETCH).forEach(u=>{u.size=(100-+this.getPreferedAndFixedSizeSum())/+this.getNumOfStretchChildren()});const c=r.selectAll(`div.layout-child-${this._instanceID}`).data(this.children,u=>u.id);a?c.style("width",u=>`${u.size/100*i}px`).style("height","100%"):c.style("height",u=>`${u.size/100*s}px`).style("width","100%"),c.each(function(u){u.components.forEach(d=>{x(u,"growth")===at.STRETCH&&d.render(t)})})}setModel(t){super.setModel(t),this.children.forEach(n=>{n.components.forEach(r=>r.setModel(t))})}setServices(t){super.setServices(t),this.children.forEach(n=>{n.components.forEach(r=>r.setServices(t))})}destroy(){this.children.forEach(t=>{t.components.forEach(n=>n.destroy())})}};Eg.instanceID=Math.floor(Math.random()*99999999999);let Oe=Eg;class Cn extends ht{constructor(){super(...arguments),this.type="spacer"}render(t=!1){this.getComponentContainer({isPresentational:!0}).style("width",`${this.configs.size||dp.default.size}px`).style("height",`${this.configs.size||dp.default.size}px`).attr("opacity",0)}}class so extends ht{constructor(t,n,r){super(t,n,r),this.type="modal",this.isEventListenerAdded=!1,this.handleShowModal=()=>{const i=this.services.domUtils.getChartID();this.modal.attr("data-modal",!0).attr("class","cds--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby",`${i}__modal-title`).attr("aria-describedby",`${i}__modal-description`).attr("tabindex",-1).style("opacity",1).style("visibility","visible"),this.modal.html(this.getModalHTML()),this.modal.select("div.cds--modal-footer button.cds--btn").on("click",()=>this.model.exportToCSV()),this.modal.on("click",this.handleHideModal),this.modal.select(".cds--modal-container").on("click",s=>{s.stopPropagation()}),this.modal.select(".cds--modal-close").on("click",this.handleHideModal),typeof window<"u"&&window.addEventListener("keydown",this.handleEscapeKey)},this.handleEscapeKey=i=>{i.key==="Escape"&&this.handleHideModal()},this.handleHideModal=()=>{this.modal.attr("role",null).attr("aria-modal",null).attr("aria-labelledby",null).attr("aria-describedby",null).attr("tabindex",null).style("opacity",0).style("visibility","hidden"),this.modal.on("click",null),this.modal.select(".cds--modal-container").on("click",null),this.modal.select(".cds--modal-close").on("click",null),typeof window<"u"&&window.removeEventListener("keydown",this.handleEscapeKey)},this.init()}addEventListeners(){this.services.events.addEventListener(T.Modal.SHOW,this.handleShowModal)}removeEventListeners(){this.services.events.removeEventListener(T.Modal.SHOW,this.handleShowModal)}getModalHTML(){const t=this.services.domUtils.getChartID(),n=this.model.getOptions(),{title:r,downloadAsCSV:i}=x(n,"locale","translations","tabularRep"),s=x(n,"style","prefix"),a=this.model.getTabularDataArray();return`
13
+ <circle cx="16" cy="24" r="2"></circle>`},clickFunction:n=>this.toggleOverflowMenu(n)}}getControlConfigByType(t){const n=this.services.zoom&&this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState(),r=this.model.getDisplayData(),i=this.model.getOptions(),{exportAsCSV:a,exportAsJPG:s,exportAsPNG:o,zoomIn:l,zoomOut:c,resetZoom:u,makeFullScreen:d,exitFullScreen:h,showAsTable:p}=_(i,"locale","translations","toolbar");let f;switch(t){case Bt.ZOOM_IN:n&&(f={id:"toolbar-zoomIn",title:l,shouldBeDisabled:()=>this.services.zoom.isMinZoomDomain(),iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.zoom.zoomIn()});break;case Bt.ZOOM_OUT:n&&(f={id:"toolbar-zoomOut",title:c,shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.zoom.zoomOut()});break;case Bt.RESET_ZOOM:n&&(f={id:"toolbar-resetZoom",title:u,shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.zoom.resetZoomDomain()});break;case Bt.MAKE_FULLSCREEN:f={id:"toolbar-makefullscreen",iconSVG:{content:this.getControlIconByType(t),width:"15px",height:"15px"},title:d,shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case Bt.EXIT_FULLSCREEN:f={id:"toolbar-exitfullscreen",iconSVG:{content:this.getControlIconByType(t),width:"15px",height:"15px"},title:h,shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case Bt.SHOW_AS_DATATABLE:f={id:"toolbar-showasdatatable",iconSVG:{content:this.getControlIconByType(t)},title:p,shouldBeDisabled:()=>r.length===0,clickFunction:()=>this.services.events.dispatchEvent(w.Modal.SHOW)};break;case Bt.EXPORT_CSV:f={id:"toolbar-export-CSV",title:a,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.model.exportToCSV()};break;case Bt.EXPORT_PNG:f={id:"toolbar-export-PNG",title:o,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.domUtils.exportToPNG()};break;case Bt.EXPORT_JPG:f={id:"toolbar-export-JPG",title:s,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.domUtils.exportToJPG()};break;default:throw Error("Not supported toolbar control type: "+t)}return f}getControlIconByType(t){switch(t){case Bt.ZOOM_IN:return`<polygon points="19 13 15 13 15 9 13 9 13 13 9 13 9 15 13 15 13 19 15 19 15 15 19 15 19 13"/>
14
+ <path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>`;case Bt.ZOOM_OUT:return`<rect x="9" y="13" width="10" height="2"/>
15
+ <path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>`;case Bt.RESET_ZOOM:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case Bt.MAKE_FULLSCREEN:return'<polygon points="21 2 21 4 26.59 4 17 13.58 18.41 15 28 5.41 28 11 30 11 30 2 21 2"/><polygon points="15 18.42 13.59 17 4 26.59 4 21 2 21 2 30 11 30 11 28 5.41 28 15 18.42"/>';case Bt.EXIT_FULLSCREEN:return'<polygon points="4 18 4 20 10.586 20 2 28.582 3.414 30 12 21.414 12 28 14 28 14 18 4 18"/><polygon points="30 3.416 28.592 2 20 10.586 20 4 18 4 18 14 28 14 28 12 21.414 12 30 3.416"/>';case Bt.SHOW_AS_DATATABLE:return'<rect x="4" y="6" width="18" height="2"/><rect x="4" y="12" width="18" height="2"/><rect x="4" y="18" width="18" height="2"/><rect x="4" y="24" width="18" height="2"/><rect x="26" y="6" width="2" height="2"/><rect x="26" y="12" width="2" height="2"/><rect x="26" y="18" width="2" height="2"/><rect x="26" y="24" width="2" height="2"/>';case Bt.EXPORT_CSV:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case Bt.EXPORT_JPG:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case Bt.EXPORT_PNG:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';default:throw Error("Not supported toolbar control type: "+t)}}};Rv.buttonID=0;let cl=Rv;const kv=class My extends Mt{constructor(t,n,r,i){super(t,n,i),this.type="layout",this.configs=i,this.children=r,this._instanceID=My.instanceID++,this.init()}init(){this.children.forEach(t=>{t.components.forEach(n=>{n.init()})})}getPreferedAndFixedSizeSum(){const t=this.parent;let n=0;return t.selectAll(`div.layout-child-${this._instanceID}`).filter(r=>{const i=_(r,"growth");return i===xt.PREFERRED||i===xt.FIXED}).each(function(r){n+=r.size}),n}getNumOfStretchChildren(){return this.parent.selectAll(`div.layout-child-${this._instanceID}`).filter(t=>_(t,"growth")===xt.STRETCH).size()}render(t=!0){const n=this.model.getOptions(),r=this.parent,{width:i,height:a}=B.getHTMLElementSize(r.node()),s=this.configs.direction===qt.ROW||this.configs.direction===qt.ROW_REVERSE,o=_(this.model.getOptions(),"style","prefix"),l=r.classed(`${Ve}--${o}--layout-row`,this.configs.direction===qt.ROW).classed(`${Ve}--${o}--layout-row-reverse`,this.configs.direction===qt.ROW_REVERSE).classed(`${Ve}--${o}--layout-column`,this.configs.direction===qt.COLUMN).classed(`${Ve}--${o}--layout-column-reverse`,this.configs.direction===qt.COLUMN_REVERSE).classed(`${Ve}--${o}--layout-alignitems-center`,this.configs.alignItems===Br.CENTER).selectAll(`div.layout-child-${this._instanceID}`).data(this.children,u=>u.id);l.enter().append("div").merge(r.selectAll(`div.layout-child-${this._instanceID}`)).attr("class",u=>`layout-child layout-child-${this._instanceID} ${u.id}`).each(function(u){u.components.forEach(d=>{var h;const p=U(this),f=_(u,"renderType")===ft.SVG;d.setParent(f?B.appendOrSelect(p,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):p),f&&!p.select("svg.layout-svg-wrapper").attr("aria-label")&&p.select("svg.layout-svg-wrapper").attr("aria-label",((h=n==null?void 0:n.accessibility)==null?void 0:h.svgAriaLabel)||(n==null?void 0:n.title));const v=_(u,"growth");(v===xt.PREFERRED||v===xt.FIXED)&&d.render(t)})}),r.selectAll(`div.layout-child-${this._instanceID}`).style("height",null).style("width",null).each(function(u){const d=_(u,"growth"),h=_(u,"renderType")===ft.SVG?B.getSVGElementSize(U(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):B.getHTMLElementSize(this);if(d===xt.PREFERRED){const p=s?h.width:h.height,f=s?i:a;u.size=p/f*100}}),l.exit().remove(),this.children.filter(u=>_(u,"growth")===xt.STRETCH).forEach(u=>{u.size=(100-+this.getPreferedAndFixedSizeSum())/+this.getNumOfStretchChildren()});const c=r.selectAll(`div.layout-child-${this._instanceID}`).data(this.children,u=>u.id);s?c.style("width",u=>`${u.size/100*i}px`).style("height","100%"):c.style("height",u=>`${u.size/100*a}px`).style("width","100%"),c.each(function(u){u.components.forEach(d=>{_(u,"growth")===xt.STRETCH&&d.render(t)})})}setModel(t){super.setModel(t),this.children.forEach(n=>{n.components.forEach(r=>r.setModel(t))})}setServices(t){super.setServices(t),this.children.forEach(n=>{n.components.forEach(r=>r.setServices(t))})}destroy(){this.children.forEach(t=>{t.components.forEach(n=>n.destroy())})}};kv.instanceID=Math.floor(Math.random()*99999999999);let Je=kv;class mr extends Mt{constructor(){super(...arguments),this.type="spacer"}render(t=!1){this.getComponentContainer({isPresentational:!0}).style("width",`${this.configs.size||Tf.default.size}px`).style("height",`${this.configs.size||Tf.default.size}px`).attr("opacity",0)}}class ul extends Mt{constructor(t,n,r){super(t,n,r),this.type="modal",this.isEventListenerAdded=!1,this.handleShowModal=()=>{const i=this.services.domUtils.getChartID();this.modal.attr("data-modal",!0).attr("class","cds--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby",`${i}__modal-title`).attr("aria-describedby",`${i}__modal-description`).attr("tabindex",-1).style("opacity",1).style("visibility","visible"),this.modal.html(this.getModalHTML()),this.modal.select("div.cds--modal-footer button.cds--btn").on("click",()=>this.model.exportToCSV()),this.modal.on("click",this.handleHideModal),this.modal.select(".cds--modal-container").on("click",a=>{a.stopPropagation()}),this.modal.select(".cds--modal-close").on("click",this.handleHideModal),typeof window<"u"&&window.addEventListener("keydown",this.handleEscapeKey)},this.handleEscapeKey=i=>{i.key==="Escape"&&this.handleHideModal()},this.handleHideModal=()=>{this.modal.attr("role",null).attr("aria-modal",null).attr("aria-labelledby",null).attr("aria-describedby",null).attr("tabindex",null).style("opacity",0).style("visibility","hidden"),this.modal.on("click",null),this.modal.select(".cds--modal-container").on("click",null),this.modal.select(".cds--modal-close").on("click",null),typeof window<"u"&&window.removeEventListener("keydown",this.handleEscapeKey)},this.init()}addEventListeners(){this.services.events.addEventListener(w.Modal.SHOW,this.handleShowModal)}removeEventListeners(){this.services.events.removeEventListener(w.Modal.SHOW,this.handleShowModal)}getModalHTML(){const t=this.services.domUtils.getChartID(),n=this.model.getOptions(),{title:r,downloadAsCSV:i}=_(n,"locale","translations","tabularRep"),a=_(n,"style","prefix"),s=this.model.getTabularDataArray();return`
16
16
  <div class="cds--modal-container">
17
17
  <div class="cds--modal-header">
18
18
 
19
19
  <p class="cds--modal-header__label cds--type-delta" id="modal-title">${r}</p>
20
20
 
21
- <p class="cds--modal-header__heading cds--type-beta" id="${t}__modal-description">${an(n.title)}</p>
21
+ <p class="cds--modal-header__heading cds--type-beta" id="${t}__modal-description">${Gn(n.title)}</p>
22
22
 
23
23
  <button class="cds--modal-close" type="button" data-modal-close aria-label="close modal" data-modal-primary-focus>
24
24
  <svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-label="Close" width="20" height="20" viewBox="0 0 32 32" role="img" class="cds--modal-close__icon">
@@ -31,25 +31,25 @@
31
31
  <table class="cds--data-table cds--data-table--no-border">
32
32
  <thead>
33
33
  <tr>
34
- ${gt(a,0).map(o=>`<th scope="col">
35
- <div class="cds--table-header-label">${an(o)}</div>
34
+ ${kt(s,0).map(o=>`<th scope="col">
35
+ <div class="cds--table-header-label">${Gn(o)}</div>
36
36
  </th>`).join("")}
37
37
  </tr>
38
38
  </thead>
39
39
 
40
- <tbody>${a.slice(1).map(o=>`
40
+ <tbody>${s.slice(1).map(o=>`
41
41
  <tr>
42
- ${o.map(l=>`<td>${an(l)}</td>`).join("")}
42
+ ${o.map(l=>`<td>${Gn(l)}</td>`).join("")}
43
43
  </tr>`).join("")}
44
44
  </tbody>
45
45
  </table>
46
46
  </div>
47
47
 
48
48
  <div class="cds--modal-footer">
49
- <div class="${he}--${s}-modal-footer-spacer"></div>
49
+ <div class="${Ve}--${a}-modal-footer-spacer"></div>
50
50
  <button class="cds--btn cds--btn--primary" type="button" data-modal-primary-focus>${i}</button>
51
51
  </div>
52
- </div>`}render(t=!1){const n=this.model.getOptions();if(!this.isEventListenerAdded){const r=D(this.services.domUtils.getHolder()),i=x(n,"style","prefix");this.modal=R.appendOrSelect(r,`div.${he}--${i}--modal`),this.addEventListeners(),this.isEventListenerAdded=!0}}destroy(){this.removeEventListeners(),this.isEventListenerAdded=!1}}class Es extends ht{constructor(){super(...arguments),this.type="title",this.renderType=Q.HTML}render(t=!1){const n=this.getComponentContainer(),r=x(this.getOptions(),"title"),i=n.selectAll("p.title").data([r]);if(i.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(i).html(s=>an(s)),i.node()&&i.node().offsetWidth<i.node().scrollWidth){const s=this;i.on("mouseover",function(a){s.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:i,content:i.text()})}).on("mousemove",function(a){s.services.events.dispatchEvent(T.Tooltip.MOVE,{event:a})}).on("mouseout",function(){s.services.events.dispatchEvent(T.Tooltip.HIDE)})}i.exit().remove()}truncateTitle(t,n){if(n<=0)return;const r=t.text();if(t.node().getComputedTextLength()>n){t.append("tspan").text("...");const i=R.appendOrSelect(t,"tspan").node().getComputedTextLength(),s=t.text(),a=this.getSubstringIndex(t.node(),0,s.length-1,n-i);t.html(s.substring(0,a-1)).append("tspan").text("...");const o=this;t.on("mouseover",function(l){o.services.events.dispatchEvent(T.Tooltip.SHOW,{event:l,hoveredElement:t,content:r})}).on("mousemove",function(l){o.services.events.dispatchEvent(T.Tooltip.MOVE,{event:l})}).on("mouseout",function(){o.services.events.dispatchEvent(T.Tooltip.HIDE)})}}getMaxTitleWidth(){return R.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width}getSubstringIndex(t,n,r,i){const s=Math.floor((r+n)/2);return t.getSubStringLength(0,s)>i?this.getSubstringIndex(t,n,s,i):t.getSubStringLength(0,s)<i?t.getSubStringLength(0,s+1)>i?s:this.getSubstringIndex(t,s,r,i):s}}class uu extends ht{constructor(){super(...arguments),this.type="legend",this.renderType=Q.HTML}render(t=!1){const n=this.getOptions(),r=x(n,"legend"),i=x(r,"alignment"),s=x(n,"legend","orientation");let a=this.model.getDataGroups();const{DISABLED:o}=It.items.status,l=a.some(v=>v.status===o),c=x(r,"order"),u=this.getComponentContainer().classed("center-aligned",i===Vt.CENTER).classed("right-aligned",i===Vt.RIGHT).classed(s,!0).classed("has-deactivated-items",l).attr("role",lt.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");c&&(a=this.sortDataGroups(a,c));const d=u.selectAll("div.legend-item").data(a,v=>v.name),h=d.enter().append("div").attr("class","legend-item");h.merge(u.selectAll("div.legend-item")).classed("active",function(v){return v.status===It.items.status.ACTIVE});const p=x(this.getOptions(),"legend","clickable");u.classed("clickable",p&&a.length>1);const f=It.checkbox.radius,g=h.append("div").classed("checkbox",!0),m=g.merge(d.select("div.checkbox")).attr("role",lt.CHECKBOX).attr("tabindex",p?0:-1).attr("aria-labelledby",(v,b)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${b}-title`)).attr("aria-checked",({status:v})=>v===It.items.status.ACTIVE).attr("width",f*2).attr("height",f*2).attr("class",v=>this.model.getColorClassName({classNameTypes:[et.BACKGROUND],dataGroupName:v.name,originalClassName:"checkbox"})).style("background",v=>v.status===It.items.status.ACTIVE?this.model.getFillColor(v.name)||this.model.getStrokeColor(v.name):null).classed("active",function(v){return v.status===It.items.status.ACTIVE});g.append("svg").attr("focusable",!1).attr("preserveAspectRatio","xMidYMid meet").attr("xmlns","http://www.w3.org/2000/svg").attr("width","11").attr("height","11").attr("viewBox","0 0 31 28").attr("aria-hidden",!0).style("will-change","transform").append("path").attr("d","M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"),h.append("p").merge(d.select("p"));const y=x(n,"legend","additionalItems");if(y&&a.length){const v=this,b=u.selectAll("div.additional-item").data(y);b.exit().remove();const O=b.enter().append("div").merge(b).classed("legend-item",!0).classed("additional",!0).attr("aria-labelledby",(C,I)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${m.size()+I}-title`));O.selectAll("*").remove();let E,S=1;O.append("svg").classed("icon",!0).each(function(C){const I=D(this);!E||E!=C.type?(E=C.type,S=1):S++,v.addAdditionalItem(I,C,S)}),O.append("p").merge(O.select("p")),this.truncateLegendText()}d.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),p&&h.size()>1&&this.addEventListeners()}sortDataGroups(t,n){if(t.sort((r,i)=>n.indexOf(r.name)-n.indexOf(i.name)),n.length<t.length){const r=t.length-n.length;return t.slice(r).concat(t.slice(0,r))}return t}addAdditionalItem(t,n,r){const{width:i,height:s}=It.area;if(n.type===Ft.RADIUS?t.style("width",`${s}px`).style("height",`${s}px`):t.style("width",`${i}px`).style("height",`${s}px`),n.type===Ft.RADIUS){const{iconData:a,fill:o,stroke:l}=It.radius;t.attr("fill","none").selectAll("circle").data(a).enter().append("circle").classed("radius",!0).attr("role",lt.IMG).attr("aria-label","radius").attr("cx",c=>c.cx).attr("cy",c=>c.cy).attr("r",c=>c.r).style("fill",n.fill?n.fill:o).style("stroke",n.stroke?n.stroke:l)}else if(n.type===Ft.LINE){const a=It.line;t.select("line.line").empty()&&t.append("line").classed(`line-${r}`,!0).attr("role",lt.IMG).attr("aria-label","line").attr("x1",0).attr("y1",a.yPosition).attr("x2",i).attr("y2",a.yPosition).style("stroke",n.stroke?n.stroke:a.stroke).style("stroke-width",a.strokeWidth)}else if(n.type===Ft.AREA)t.select("rect.area").empty()&&t.append("rect").classed(`area-${r}`,!0).attr("role",lt.IMG).attr("aria-label","area").attr("width",i).attr("height",s).style("fill",r>3&&!n.fill?It.area.fill:n.fill).style("stroke",n.stroke);else if(n.type===Ft.SIZE){const{iconData:a,fill:o,stroke:l}=It.size;t.attr("fill","none").attr("role",lt.IMG).attr("aria-label","size").selectAll("rect").data(a).enter().append("rect").classed("size",!0).attr("width",c=>c.width).attr("height",c=>c.height).attr("y",()=>0).style("fill",n.fill?n.fill:o).style("stroke",n.stroke?n.stroke:l).style("stroke-width",1)}else if(n.type===Ft.QUARTILE){const{iconData:a}=It.quartile;t.selectAll("rect").attr("role",lt.IMG).attr("aria-label","quartile").data(a).enter().append("rect").attr("class",(o,l)=>`quartile-${l===0?"wrapper":"line"}`).attr("x",o=>o.x).attr("y",o=>o.y).attr("width",o=>o.width).attr("height",o=>o.height)}else if(n.type===Ft.ZOOM){const{iconData:a,color:o}=x(It,"zoom"),l=t.attr("role",lt.IMG).attr("aria-label","zoom").selectAll("g.icon").data(a).enter();l.append("g").attr("x",c=>c.x).attr("y",c=>c.y).attr("width",c=>c.width).attr("height",c=>c.height).append("polygon").attr("points","7.7 4.82 5.78 4.82 5.78 2.89 4.82 2.89 4.82 4.82 2.89 4.82 2.89 5.78 4.82 5.78 4.82 7.7 5.78 7.7 5.78 5.78 7.7 5.78 7.7 4.82").attr("fill",()=>n.color?n.color:o),l.append("path").attr("d","M9.36,8.67A5.22,5.22,0,0,0,10.59,5.3,5.3,5.3,0,1,0,5.3,10.59,5.22,5.22,0,0,0,8.67,9.36L12.32,13l.68-.68Zm-4.06,1A4.34,4.34,0,1,1,9.63,5.3,4.33,4.33,0,0,1,5.3,9.63Z").attr("fill",()=>n.color?n.color:o)}}truncateLegendText(){const t=this.getComponentContainer(),n=x(this.getOptions(),"legend","truncation"),r=x(n,"type"),i=x(n,"threshold"),s=x(n,"numCharacter"),a=t.selectAll("div.legend-item p");a.attr("id",function(){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")}),r!==Se.NONE?a.html(function(o){const l=an(o.name);return l.length>i&&l.length!==s?ji(l,r,s):l}):a.html(o=>an(o.name))}addEventListeners(){const t=this,n=this.getComponentContainer(),r=this.getOptions(),i=x(r,"legend"),s=x(i,"truncation");n.selectAll("div.legend-item").on("mouseover",function(a){t.services.events.dispatchEvent(T.Legend.ITEM_HOVER,{hoveredElement:D(this)});const o=D(this);o.select("div.checkbox").classed("hovered",!0);const l=o.datum();l.name.length>s.threshold&&s.numCharacter<l.name.length&&s.type!==Se.NONE&&t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:o,content:l.name})}).on("mousemove",function(a){D(this).datum().name.length>s.threshold&&s.type!==Se.NONE&&t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:a})}).on("click",function(){t.services.events.dispatchEvent(T.Legend.ITEM_CLICK,{clickedElement:D(this)});const a=D(this).datum();t.model.toggleDataLabel(a.name)}).on("mouseout",function(){const a=D(this);a.select("div.checkbox").classed("hovered",!1),a.datum().name.length>s.threshold&&s.type!==Se.NONE&&t.services.events.dispatchEvent(T.Tooltip.HIDE),t.services.events.dispatchEvent(T.Legend.ITEM_MOUSEOUT,{hoveredElement:a})}),n.selectAll("div.legend-item div.checkbox").on("keyup",function(a){a.key&&a.key==="Tab"&&t.services.events.dispatchEvent(T.Legend.ITEM_HOVER,{hoveredElement:D(this)})}),n.selectAll("div.legend-item div.checkbox").on("keydown",function(a,o){a.key&&a.key===" "?(a.preventDefault(),t.model.toggleDataLabel(o.name)):a.key&&a.key==="Tab"&&t.services.events.dispatchEvent(T.Legend.ITEM_MOUSEOUT,{hoveredElement:D(this)})}),n.selectAll("g.additional-item").on("mouseover",function(a){const o=D(this),l=o.datum();l.name.length>s.threshold&&t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:o,content:l.name})})}}class Og extends ht{constructor(t,n,r){super(t,n,r),this.type="chart-clip",this.renderType=Q.SVG,this.chartClipId="chart-clip-id-"+Math.floor(Math.random()*99999999999),this.init()}init(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})}render(t=!0){this.createClipPath()}createClipPath(){const t=this.parent,{cartesianScales:n}=this.services;if(!n)throw new Error("Service cartesianScales was undefined");const r=n.getMainXScale(),i=n.getMainYScale(),[s,a]=r.range(),[o,l]=i.range();if(!t)throw new Error("svg is undefined");this.chartClipPath=R.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const c=R.appendOrSelect(this.chartClipPath,`rect.${this.type}`);a-s>0&&c.attr("x",s).attr("y",l).attr("width",a-s).attr("height",o-l),this.chartClipPath.merge(c).lower()}}class Ak extends Og{constructor(){super(...arguments),this.type="canvas-chart-clip",this.chartClipId="canvas-chart-clip-id-"+Math.floor(Math.random()*99999999999)}createClipPath(){const t=this.parent,{width:n,height:r}=R.getSVGElementSize(this.parent,{useAttrs:!0});this.chartClipPath=R.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const i=R.appendOrSelect(this.chartClipPath,`rect.${this.type}`);i.attr("x",0).attr("y",0).attr("width",n).attr("height",r),this.chartClipPath.merge(i).lower()}}var ii,Bt;(function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"})(Bt||(Bt={}));var Tg=(ii={},ii[Bt.LEFT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left-t.offsetWidth)}},ii[Bt.RIGHT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left+n.width)}},ii[Bt.TOP]=function(e,t,n){return{top:Math.round(e.top-t.offsetHeight),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},ii[Bt.BOTTOM]=function(e,t,n){return{top:Math.round(e.top+n.height),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},ii),Sg=typeof window<"u"?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},ao=function(){function e(t){t===void 0&&(t={}),this.positions=Tg,this.positions=Object.assign({},Tg,t)}return e.prototype.getRelativeOffset=function(t){for(var n={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&getComputedStyle(t.offsetParent).position==="static";)n.left+=t.offsetLeft,n.top+=t.offsetTop,t=t.offsetParent;return n},e.prototype.getAbsoluteOffset=function(t){for(var n=t,r={top:0,left:0};n.offsetParent;){var i=getComputedStyle(n.offsetParent);i.position==="static"&&i.marginLeft&&i.marginTop&&(parseInt(i.marginTop,10)&&(r.top+=parseInt(i.marginTop,10)),parseInt(i.marginLeft,10)&&(r.left+=parseInt(i.marginLeft,10))),n=n.offsetParent}var s=t.getBoundingClientRect(),a=document.body.getBoundingClientRect();return{top:s.top-a.top+r.top,left:s.left-a.left+r.left}},e.prototype.findRelative=function(t,n,r){var i=this.getRelativeOffset(t),s=t.getBoundingClientRect();return this.calculatePosition(i,s,n,r)},e.prototype.findAbsolute=function(t,n,r){var i=this.getAbsoluteOffset(t),s=t.getBoundingClientRect();return this.calculatePosition(i,s,n,r)},e.prototype.findPosition=function(t,n,r,i){i===void 0&&(i=this.getAbsoluteOffset.bind(this));var s=i(t),a=t.getBoundingClientRect();return this.calculatePosition(s,a,n,r)},e.prototype.findPositionAt=function(t,n,r){return this.calculatePosition(t,{top:0,left:0,height:0,width:0},n,r)},e.prototype.getPlacementBox=function(t,n){var r=t.offsetHeight+n.top,i=t.offsetWidth+n.left;return{top:n.top,bottom:r,left:n.left,right:i}},e.prototype.addOffset=function(t,n,r){return n===void 0&&(n=0),r===void 0&&(r=0),Object.assign({},t,{top:t.top+n,left:t.left+r})},e.prototype.setElement=function(t,n){t.style.top=n.top+"px",t.style.left=n.left+"px"},e.prototype.findBestPlacement=function(t,n,r,i,s){var a=this;i===void 0&&(i=this.defaultContainerFunction.bind(this)),s===void 0&&(s=this.findPosition.bind(this));var o=r.map(function(l){var c=s(t,n,l),u=a.getPlacementBox(n,c),d=0,h=0,p=i();u.top<p.top?d=p.top-u.top:u.bottom>p.height&&(d=u.bottom-p.height),u.left<p.left?h=p.left-u.left:u.right>p.width&&(h=u.right-p.width),d&&!h?h=1:h&&!d&&(d=1);var f=n.offsetHeight*n.offsetWidth,g=d*h,m=f-g,y=m/f;return{placement:l,weight:y}});return o.sort(function(l,c){return c.weight-l.weight}),o[0].placement},e.prototype.findBestPlacementAt=function(t,n,r,i){var s=this;i===void 0&&(i=this.defaultContainerFunction.bind(this));var a=function(o,l,c){return s.findPositionAt(t,l,c)};return this.findBestPlacement(null,n,r,i,a)},e.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:Sg.innerHeight,width:Sg.innerWidth}},e.prototype.calculatePosition=function(t,n,r,i){return this.positions[i]?this.positions[i](t,r,n):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},e}();new ao;class hu extends ht{constructor(t,n,r){super(t,n,r),this.type="tooltip",this.renderType=Q.HTML,this.isEventListenerAdded=!1,this.lastTriggeredEventType="",this.positionService=new ao,this.handleShowTooltip=i=>{const s=i.detail.data||i.detail.items,a=D(i.detail.event.target).datum();let o;const l=this.formatItems(this.getItems(i));i.detail.content?o=`<div class="title-tooltip"><p>${ro(i.detail.content)}</p></div>`:o=ro(this.getTooltipHTML(l));const c=R.appendOrSelect(this.tooltip,"div.content-box");if(x(this.getOptions(),"tooltip","customHTML"))if(i.detail.content){const u=`<div class="title-tooltip"><p>${ro(i.detail.content)}</p></div>`;c.html(u)}else c.html(`<div class="title-tooltip"><p>${ro(this.model.getOptions().tooltip.customHTML(s,o,a))}</p></div>`);else c.html(o);c.selectAll(".datapoint-tooltip").each(function(u,d){const h=l[d];l[d]&&l[d].color&&D(this).select(".tooltip-color").attr("class","tooltip-color").style("background-color",h.color)}),this.positionTooltip(i),this.tooltip.classed("hidden",!1).attr("aria-hidden",!1),this.lastTriggeredEventType=i.type},this.handleHideTooltip=()=>{this.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},this.init()}addTooltipEventListener(){this.services.events.addEventListener(T.Tooltip.MOVE,t=>{this.lastTriggeredEventType!==T.Toolbar.SHOW_TOOLTIP&&this.tooltip.classed("hidden")===!1&&this.positionTooltip(t)}),this.services.events.addEventListener(T.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(T.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(T.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.addEventListener(T.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.addEventListener(T.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}removeTooltipEventListener(){this.services.events.removeEventListener(T.Tooltip.MOVE,null),this.services.events.removeEventListener(T.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(T.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(T.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.removeEventListener(T.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.removeEventListener(T.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}getItems(t){return t.detail.items?t.detail.items:[]}formatItems(t){const n=this.getOptions(),r=x(n,"tooltip","truncation","type"),i=x(n,"tooltip","truncation","threshold"),s=x(n,"tooltip","truncation","numCharacter");return r!==Se.NONE?t.map(a=>{const o=a.labelIcon?12:0;return a.value=a.value?this.valueFormatter(a.value,a.label):a.value,a.label&&a.label.length+o>i&&(a.label=ji(a.label,r,s)),a.value&&a.value.length>i&&(a.value=ji(a.value,r,s)),a}):t.map(a=>(a.value=a.value?this.valueFormatter(a.value,a.label):a.value,a))}getTooltipHTML(t){return'<ul class="multi-tooltip">'+t.map(n=>`<li>
52
+ </div>`}render(t=!1){const n=this.model.getOptions();if(!this.isEventListenerAdded){const r=U(this.services.domUtils.getHolder()),i=_(n,"style","prefix");this.modal=B.appendOrSelect(r,`div.${Ve}--${i}--modal`),this.addEventListeners(),this.isEventListenerAdded=!0}}destroy(){this.removeEventListeners(),this.isEventListenerAdded=!1}}class Ts extends Mt{constructor(){super(...arguments),this.type="title",this.renderType=ft.HTML}render(t=!1){const n=this.getComponentContainer(),r=_(this.getOptions(),"title"),i=n.selectAll("p.title").data([r]);if(i.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(i).html(a=>Gn(a)),i.node()&&i.node().offsetWidth<i.node().scrollWidth){const a=this;i.on("mouseover",function(s){a.services.events.dispatchEvent(w.Tooltip.SHOW,{event:s,hoveredElement:i,content:i.text()})}).on("mousemove",function(s){a.services.events.dispatchEvent(w.Tooltip.MOVE,{event:s})}).on("mouseout",function(){a.services.events.dispatchEvent(w.Tooltip.HIDE)})}i.exit().remove()}truncateTitle(t,n){if(n<=0)return;const r=t.text();if(t.node().getComputedTextLength()>n){t.append("tspan").text("...");const i=B.appendOrSelect(t,"tspan").node().getComputedTextLength(),a=t.text(),s=this.getSubstringIndex(t.node(),0,a.length-1,n-i);t.html(a.substring(0,s-1)).append("tspan").text("...");const o=this;t.on("mouseover",function(l){o.services.events.dispatchEvent(w.Tooltip.SHOW,{event:l,hoveredElement:t,content:r})}).on("mousemove",function(l){o.services.events.dispatchEvent(w.Tooltip.MOVE,{event:l})}).on("mouseout",function(){o.services.events.dispatchEvent(w.Tooltip.HIDE)})}}getMaxTitleWidth(){return B.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width}getSubstringIndex(t,n,r,i){const a=Math.floor((r+n)/2);return t.getSubStringLength(0,a)>i?this.getSubstringIndex(t,n,a,i):t.getSubStringLength(0,a)<i?t.getSubStringLength(0,a+1)>i?a:this.getSubstringIndex(t,a,r,i):a}}class mh extends Mt{constructor(){super(...arguments),this.type="legend",this.renderType=ft.HTML}render(t=!1){const n=this.getOptions(),r=_(n,"legend"),i=_(r,"alignment"),a=_(n,"legend","orientation");let s=this.model.getDataGroups();const{DISABLED:o}=se.items.status,l=s.some(g=>g.status===o),c=_(r,"order"),u=this.getComponentContainer().classed("center-aligned",i===me.CENTER).classed("right-aligned",i===me.RIGHT).classed(a,!0).classed("has-deactivated-items",l).attr("role",Tt.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");c&&(s=this.sortDataGroups(s,c));const d=u.selectAll("div.legend-item").data(s,g=>g.name),h=d.enter().append("div").attr("class","legend-item");h.merge(u.selectAll("div.legend-item")).classed("active",function(g){return g.status===se.items.status.ACTIVE});const p=_(this.getOptions(),"legend","clickable");u.classed("clickable",p&&s.length>1);const f=se.checkbox.radius,v=h.append("div").classed("checkbox",!0),m=v.merge(d.select("div.checkbox")).attr("role",Tt.CHECKBOX).attr("tabindex",p?0:-1).attr("aria-labelledby",(g,x)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${x}-title`)).attr("aria-checked",({status:g})=>g===se.items.status.ACTIVE).attr("width",f*2).attr("height",f*2).attr("class",g=>this.model.getColorClassName({classNameTypes:[mt.BACKGROUND],dataGroupName:g.name,originalClassName:"checkbox"})).style("background",g=>g.status===se.items.status.ACTIVE?this.model.getFillColor(g.name)||this.model.getStrokeColor(g.name):null).classed("active",function(g){return g.status===se.items.status.ACTIVE});v.append("svg").attr("focusable",!1).attr("preserveAspectRatio","xMidYMid meet").attr("xmlns","http://www.w3.org/2000/svg").attr("width","11").attr("height","11").attr("viewBox","0 0 31 28").attr("aria-hidden",!0).style("will-change","transform").append("path").attr("d","M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"),h.append("p").merge(d.select("p"));const y=_(n,"legend","additionalItems");if(y&&s.length){const g=this,x=u.selectAll("div.additional-item").data(y);x.exit().remove();const O=x.enter().append("div").merge(x).classed("legend-item",!0).classed("additional",!0).attr("aria-labelledby",(D,P)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${m.size()+P}-title`));O.selectAll("*").remove();let T,S=1;O.append("svg").classed("icon",!0).each(function(D){const P=U(this);!T||T!=D.type?(T=D.type,S=1):S++,g.addAdditionalItem(P,D,S)}),O.append("p").merge(O.select("p")),this.truncateLegendText()}d.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),p&&h.size()>1&&this.addEventListeners()}sortDataGroups(t,n){if(t.sort((r,i)=>n.indexOf(r.name)-n.indexOf(i.name)),n.length<t.length){const r=t.length-n.length;return t.slice(r).concat(t.slice(0,r))}return t}addAdditionalItem(t,n,r){const{width:i,height:a}=se.area;if(n.type===ve.RADIUS?t.style("width",`${a}px`).style("height",`${a}px`):t.style("width",`${i}px`).style("height",`${a}px`),n.type===ve.RADIUS){const{iconData:s,fill:o,stroke:l}=se.radius;t.attr("fill","none").selectAll("circle").data(s).enter().append("circle").classed("radius",!0).attr("role",Tt.IMG).attr("aria-label","radius").attr("cx",c=>c.cx).attr("cy",c=>c.cy).attr("r",c=>c.r).style("fill",n.fill?n.fill:o).style("stroke",n.stroke?n.stroke:l)}else if(n.type===ve.LINE){const s=se.line;t.select("line.line").empty()&&t.append("line").classed(`line-${r}`,!0).attr("role",Tt.IMG).attr("aria-label","line").attr("x1",0).attr("y1",s.yPosition).attr("x2",i).attr("y2",s.yPosition).style("stroke",n.stroke?n.stroke:s.stroke).style("stroke-width",s.strokeWidth)}else if(n.type===ve.AREA)t.select("rect.area").empty()&&t.append("rect").classed(`area-${r}`,!0).attr("role",Tt.IMG).attr("aria-label","area").attr("width",i).attr("height",a).style("fill",r>3&&!n.fill?se.area.fill:n.fill).style("stroke",n.stroke);else if(n.type===ve.SIZE){const{iconData:s,fill:o,stroke:l}=se.size;t.attr("fill","none").attr("role",Tt.IMG).attr("aria-label","size").selectAll("rect").data(s).enter().append("rect").classed("size",!0).attr("width",c=>c.width).attr("height",c=>c.height).attr("y",()=>0).style("fill",n.fill?n.fill:o).style("stroke",n.stroke?n.stroke:l).style("stroke-width",1)}else if(n.type===ve.QUARTILE){const{iconData:s}=se.quartile;t.selectAll("rect").attr("role",Tt.IMG).attr("aria-label","quartile").data(s).enter().append("rect").attr("class",(o,l)=>`quartile-${l===0?"wrapper":"line"}`).attr("x",o=>o.x).attr("y",o=>o.y).attr("width",o=>o.width).attr("height",o=>o.height)}else if(n.type===ve.ZOOM){const{iconData:s,color:o}=_(se,"zoom"),l=t.attr("role",Tt.IMG).attr("aria-label","zoom").selectAll("g.icon").data(s).enter();l.append("g").attr("x",c=>c.x).attr("y",c=>c.y).attr("width",c=>c.width).attr("height",c=>c.height).append("polygon").attr("points","7.7 4.82 5.78 4.82 5.78 2.89 4.82 2.89 4.82 4.82 2.89 4.82 2.89 5.78 4.82 5.78 4.82 7.7 5.78 7.7 5.78 5.78 7.7 5.78 7.7 4.82").attr("fill",()=>n.color?n.color:o),l.append("path").attr("d","M9.36,8.67A5.22,5.22,0,0,0,10.59,5.3,5.3,5.3,0,1,0,5.3,10.59,5.22,5.22,0,0,0,8.67,9.36L12.32,13l.68-.68Zm-4.06,1A4.34,4.34,0,1,1,9.63,5.3,4.33,4.33,0,0,1,5.3,9.63Z").attr("fill",()=>n.color?n.color:o)}}truncateLegendText(){const t=this.getComponentContainer(),n=_(this.getOptions(),"legend","truncation"),r=_(n,"type"),i=_(n,"threshold"),a=_(n,"numCharacter"),s=t.selectAll("div.legend-item p");s.attr("id",function(){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")}),r!==an.NONE?s.html(function(o){const l=Gn(o.name);return l.length>i&&l.length!==a?Wa(l,r,a):l}):s.html(o=>Gn(o.name))}addEventListeners(){const t=this,n=this.getComponentContainer(),r=this.getOptions(),i=_(r,"legend"),a=_(i,"truncation");n.selectAll("div.legend-item").on("mouseover",function(s){t.services.events.dispatchEvent(w.Legend.ITEM_HOVER,{hoveredElement:U(this)});const o=U(this);o.select("div.checkbox").classed("hovered",!0);const l=o.datum();l.name.length>a.threshold&&a.numCharacter<l.name.length&&a.type!==an.NONE&&t.services.events.dispatchEvent(w.Tooltip.SHOW,{event:s,hoveredElement:o,content:l.name})}).on("mousemove",function(s){U(this).datum().name.length>a.threshold&&a.type!==an.NONE&&t.services.events.dispatchEvent(w.Tooltip.MOVE,{event:s})}).on("click",function(){t.services.events.dispatchEvent(w.Legend.ITEM_CLICK,{clickedElement:U(this)});const s=U(this).datum();t.model.toggleDataLabel(s.name)}).on("mouseout",function(){const s=U(this);s.select("div.checkbox").classed("hovered",!1),s.datum().name.length>a.threshold&&a.type!==an.NONE&&t.services.events.dispatchEvent(w.Tooltip.HIDE),t.services.events.dispatchEvent(w.Legend.ITEM_MOUSEOUT,{hoveredElement:s})}),n.selectAll("div.legend-item div.checkbox").on("keyup",function(s){s.key&&s.key==="Tab"&&t.services.events.dispatchEvent(w.Legend.ITEM_HOVER,{hoveredElement:U(this)})}),n.selectAll("div.legend-item div.checkbox").on("keydown",function(s,o){s.key&&s.key===" "?(s.preventDefault(),t.model.toggleDataLabel(o.name)):s.key&&s.key==="Tab"&&t.services.events.dispatchEvent(w.Legend.ITEM_MOUSEOUT,{hoveredElement:U(this)})}),n.selectAll("g.additional-item").on("mouseover",function(s){const o=U(this),l=o.datum();l.name.length>a.threshold&&t.services.events.dispatchEvent(w.Tooltip.SHOW,{event:s,hoveredElement:o,content:l.name})})}}class Lv extends Mt{constructor(t,n,r){super(t,n,r),this.type="chart-clip",this.renderType=ft.SVG,this.chartClipId="chart-clip-id-"+Math.floor(Math.random()*99999999999),this.init()}init(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})}render(t=!0){this.createClipPath()}createClipPath(){const t=this.parent,{cartesianScales:n}=this.services;if(!n)throw new Error("Service cartesianScales was undefined");const r=n.getMainXScale(),i=n.getMainYScale(),[a,s]=r.range(),[o,l]=i.range();if(!t)throw new Error("svg is undefined");this.chartClipPath=B.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const c=B.appendOrSelect(this.chartClipPath,`rect.${this.type}`);s-a>0&&c.attr("x",a).attr("y",l).attr("width",s-a).attr("height",o-l),this.chartClipPath.merge(c).lower()}}class tD extends Lv{constructor(){super(...arguments),this.type="canvas-chart-clip",this.chartClipId="canvas-chart-clip-id-"+Math.floor(Math.random()*99999999999)}createClipPath(){const t=this.parent,{width:n,height:r}=B.getSVGElementSize(this.parent,{useAttrs:!0});this.chartClipPath=B.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const i=B.appendOrSelect(this.chartClipPath,`rect.${this.type}`);i.attr("x",0).attr("y",0).attr("width",n).attr("height",r),this.chartClipPath.merge(i).lower()}}var ra,pe;(function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"})(pe||(pe={}));var Dv=(ra={},ra[pe.LEFT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left-t.offsetWidth)}},ra[pe.RIGHT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left+n.width)}},ra[pe.TOP]=function(e,t,n){return{top:Math.round(e.top-t.offsetHeight),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},ra[pe.BOTTOM]=function(e,t,n){return{top:Math.round(e.top+n.height),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},ra),Iv=typeof window<"u"?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},hl=function(){function e(t){t===void 0&&(t={}),this.positions=Dv,this.positions=Object.assign({},Dv,t)}return e.prototype.getRelativeOffset=function(t){for(var n={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&getComputedStyle(t.offsetParent).position==="static";)n.left+=t.offsetLeft,n.top+=t.offsetTop,t=t.offsetParent;return n},e.prototype.getAbsoluteOffset=function(t){for(var n=t,r={top:0,left:0};n.offsetParent;){var i=getComputedStyle(n.offsetParent);i.position==="static"&&i.marginLeft&&i.marginTop&&(parseInt(i.marginTop,10)&&(r.top+=parseInt(i.marginTop,10)),parseInt(i.marginLeft,10)&&(r.left+=parseInt(i.marginLeft,10))),n=n.offsetParent}var a=t.getBoundingClientRect(),s=document.body.getBoundingClientRect();return{top:a.top-s.top+r.top,left:a.left-s.left+r.left}},e.prototype.findRelative=function(t,n,r){var i=this.getRelativeOffset(t),a=t.getBoundingClientRect();return this.calculatePosition(i,a,n,r)},e.prototype.findAbsolute=function(t,n,r){var i=this.getAbsoluteOffset(t),a=t.getBoundingClientRect();return this.calculatePosition(i,a,n,r)},e.prototype.findPosition=function(t,n,r,i){i===void 0&&(i=this.getAbsoluteOffset.bind(this));var a=i(t),s=t.getBoundingClientRect();return this.calculatePosition(a,s,n,r)},e.prototype.findPositionAt=function(t,n,r){return this.calculatePosition(t,{top:0,left:0,height:0,width:0},n,r)},e.prototype.getPlacementBox=function(t,n){var r=t.offsetHeight+n.top,i=t.offsetWidth+n.left;return{top:n.top,bottom:r,left:n.left,right:i}},e.prototype.addOffset=function(t,n,r){return n===void 0&&(n=0),r===void 0&&(r=0),Object.assign({},t,{top:t.top+n,left:t.left+r})},e.prototype.setElement=function(t,n){t.style.top=n.top+"px",t.style.left=n.left+"px"},e.prototype.findBestPlacement=function(t,n,r,i,a){var s=this;i===void 0&&(i=this.defaultContainerFunction.bind(this)),a===void 0&&(a=this.findPosition.bind(this));var o=r.map(function(l){var c=a(t,n,l),u=s.getPlacementBox(n,c),d=0,h=0,p=i();u.top<p.top?d=p.top-u.top:u.bottom>p.height&&(d=u.bottom-p.height),u.left<p.left?h=p.left-u.left:u.right>p.width&&(h=u.right-p.width),d&&!h?h=1:h&&!d&&(d=1);var f=n.offsetHeight*n.offsetWidth,v=d*h,m=f-v,y=m/f;return{placement:l,weight:y}});return o.sort(function(l,c){return c.weight-l.weight}),o[0].placement},e.prototype.findBestPlacementAt=function(t,n,r,i){var a=this;i===void 0&&(i=this.defaultContainerFunction.bind(this));var s=function(o,l,c){return a.findPositionAt(t,l,c)};return this.findBestPlacement(null,n,r,i,s)},e.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:Iv.innerHeight,width:Iv.innerWidth}},e.prototype.calculatePosition=function(t,n,r,i){return this.positions[i]?this.positions[i](t,r,n):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},e}();new hl;class gh extends Mt{constructor(t,n,r){super(t,n,r),this.type="tooltip",this.renderType=ft.HTML,this.isEventListenerAdded=!1,this.lastTriggeredEventType="",this.positionService=new hl,this.handleShowTooltip=i=>{const a=i.detail.data||i.detail.items,s=U(i.detail.event.target).datum();let o;const l=this.formatItems(this.getItems(i));i.detail.content?o=`<div class="title-tooltip"><p>${ll(i.detail.content)}</p></div>`:o=ll(this.getTooltipHTML(l));const c=B.appendOrSelect(this.tooltip,"div.content-box");if(_(this.getOptions(),"tooltip","customHTML"))if(i.detail.content){const u=`<div class="title-tooltip"><p>${ll(i.detail.content)}</p></div>`;c.html(u)}else c.html(`<div class="title-tooltip"><p>${ll(this.model.getOptions().tooltip.customHTML(a,o,s))}</p></div>`);else c.html(o);c.selectAll(".datapoint-tooltip").each(function(u,d){const h=l[d];l[d]&&l[d].color&&U(this).select(".tooltip-color").attr("class","tooltip-color").style("background-color",h.color)}),this.positionTooltip(i),this.tooltip.classed("hidden",!1).attr("aria-hidden",!1),this.lastTriggeredEventType=i.type},this.handleHideTooltip=()=>{this.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},this.init()}addTooltipEventListener(){this.services.events.addEventListener(w.Tooltip.MOVE,t=>{this.lastTriggeredEventType!==w.Toolbar.SHOW_TOOLTIP&&this.tooltip.classed("hidden")===!1&&this.positionTooltip(t)}),this.services.events.addEventListener(w.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(w.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(w.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.addEventListener(w.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.addEventListener(w.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}removeTooltipEventListener(){this.services.events.removeEventListener(w.Tooltip.MOVE,null),this.services.events.removeEventListener(w.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(w.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(w.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.removeEventListener(w.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.removeEventListener(w.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}getItems(t){return t.detail.items?t.detail.items:[]}formatItems(t){const n=this.getOptions(),r=_(n,"tooltip","truncation","type"),i=_(n,"tooltip","truncation","threshold"),a=_(n,"tooltip","truncation","numCharacter");return r!==an.NONE?t.map(s=>{const o=s.labelIcon?12:0;return s.value=s.value?this.valueFormatter(s.value,s.label):s.value,s.label&&s.label.length+o>i&&(s.label=Wa(s.label,r,a)),s.value&&s.value.length>i&&(s.value=Wa(s.value,r,a)),s}):t.map(s=>(s.value=s.value?this.valueFormatter(s.value,s.label):s.value,s))}getTooltipHTML(t){return'<ul class="multi-tooltip">'+t.map(n=>`<li>
53
53
  <div class="datapoint-tooltip${n.bold?" bold":""}">
54
54
  ${n.class||n.color?`<div class="tooltip-color ${n.class}"></div>`:""}
55
55
  <div class="label">
@@ -58,21 +58,88 @@
58
58
  </div>
59
59
  ${n.value===void 0||n.value===null?"":`<p class="value"/>${n.value}</p>`}
60
60
  </div>
61
- </li>`).join("")+"</ul>"}isDate(t){return t instanceof Date}valueFormatter(t,n){const r=this.getOptions(),i=x(r,"tooltip","valueFormatter"),{code:s,number:a,date:o}=x(r,"locale");if(i)return i(t,n);if(this.isDate(t))return o(t,s,{month:"short",day:"numeric",year:"numeric"});try{if(typeof t=="string"&&/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(t)){const l=new Date(t);return o(l,s,{month:"short",day:"numeric",year:"numeric"})}}catch{}return a(t,s)}render(t=!1){const n=this.getOptions(),r=x(n,"tooltip","enabled");if(r){const i=D(this.services.domUtils.getHolder()),s=x(n,"style","prefix");this.tooltip=R.appendOrSelect(i,`div.${he}--${s}--tooltip`),this.tooltip.style("max-width",null).attr("role","tooltip"),this.isEventListenerAdded||(this.addTooltipEventListener(),this.isEventListenerAdded=!0),this.tooltip.classed("hidden",!0)}else!r&&this.isEventListenerAdded&&(this.removeTooltipEventListener(),this.isEventListenerAdded=!1)}addOffsetByPlacement(t,n,r){const i=Object.assign({},t);return n==Bt.LEFT?i.left-=r:n==Bt.RIGHT?i.left+=r:n==Bt.TOP?i.top-=r:n==Bt.BOTTOM&&(i.top+=r),i}positionTooltip(t){const n=this.services.domUtils.getHolder(),r=n.offsetWidth,i=n.offsetHeight,s=this.tooltip.node(),a=this.getOptions(),o=x(a,"zoomBar","top","enabled"),l=!!x(t,"detail","noWrap"),c=Array.isArray(x(t,"detail","placements")),u=c?x(t,"detail","placements"):[Bt.RIGHT,Bt.LEFT,Bt.TOP,Bt.BOTTOM];let d,{horizontalOffset:h}=pp;const{defaultOffset:p}=pp;if(this.tooltip.select("div.title-tooltip").classed("title-tooltip-nowrap",l),c){const m=x(t,"detail","event","target"),y=this.services.domUtils.getElementOffset(m,!0);d=this.positionService.findBestPlacementAt(y,s,u,()=>({top:0,left:0,width:r,height:i}));let v=this.positionService.findPosition(m,s,d,()=>this.services.domUtils.getElementOffset(m));v=this.addOffsetByPlacement(v,d,p),this.positionService.setElement(s,v);return}let f=x(t,"detail","mousePosition");if(!f)f=er(x(t,"detail","event"),n);else{const m=x(a,"zoomBar","top","type"),y=xe.height[m];o&&(f[1]+=y+xe.spacerHeight)}f[0]/r>.9?d=Bt.LEFT:f[0]/r<.1?d=Bt.RIGHT:d=this.positionService.findBestPlacementAt({left:f[0],top:f[1]},s,u,()=>({top:void 0,left:void 0,width:r,height:i})),d===Bt.LEFT&&(h*=-1);const g=this.positionService.findPositionAt({left:f[0]+h,top:f[1]},s,d);this.positionService.setElement(s,g)}}const wg=class Oo extends ht{constructor(){super(...arguments),this.type="grid-brush",this.renderType=Q.SVG,this.selectionSelector="rect.selection",this.frontSelectionSelector="rect.frontSelection"}render(t=!0){const n=this.parent,r=this.getComponentContainer({isPresentational:!0});if(!n)throw new Error("SVG was not defined");const i=R.appendOrSelect(n,"svg.chart-grid-backdrop"),s=R.appendOrSelect(i,`g.${this.type}`),a=R.appendOrSelect(s,this.selectionSelector),{width:o,height:l}=R.getSVGElementSize(i,{useAttrs:!0}),{cartesianScales:c}=this.services,u=c.getMainXScaleType(),d=c.getMainXScale(),[h]=d.range();r.attr("transform",`translate(${h},0)`);const p=R.appendOrSelect(r,this.frontSelectionSelector);if(d&&u===X.TIME){let f=this.model.get("zoomDomain");f===void 0&&(f=this.services.zoom.getDefaultZoomBarDomain(),f&&this.model.set({zoomDomain:f},{animate:!1}));const g=E=>{const S=E[1]-E[0];let C="0,"+S.toString();const I=Math.floor(l/Oo.DASH_LENGTH),L=I*Oo.DASH_LENGTH;for(let k=0;k<I;k++)C+=","+Oo.DASH_LENGTH;C+=","+(l-L),I%2===1&&(C+=",0"),C+=","+S.toString(),C+=","+l.toString(),p.attr("stroke-dasharray",C)},m=E=>{const S=E.selection;S===null||S[0]===S[1]||(p.attr("x",parseFloat(a.attr("x"))+parseFloat(i.attr("x"))).attr("y",a.attr("y")).attr("width",a.attr("width")).attr("height",a.attr("height")).style("cursor","pointer").style("display",null),g(S))},y=(E,S)=>{const C=cf().range([0,o]).domain(f);let I=[C.invert(E),C.invert(S)];I[0].valueOf()===I[1].valueOf()&&(I=this.services.zoom.getDefaultZoomBarDomain()),(f[0].valueOf()!==I[0].valueOf()||f[1].valueOf()!==I[1].valueOf())&&this.services.zoom.handleDomainChange(I)};let v;const b=E=>{const S=E.selection;S!==null&&(y(S[0],S[1]),s.call(v.move,null),p.style("display","none"))};l!=0&&o!=0&&(v=am().extent([[0,0],[o-1,l]]).on("start brush end",m).on("end.brushed",b),s.call(v));const O=this.services.zoom.getZoomRatio();i.on("click",function(E){if(E.shiftKey){const S=this.services.domUtils.getHolder(),C=er(s.node(),S)[0];let I=C-o*O/2;I<0&&(I=0);let L=C+o*O/2;L>o&&(L=o),y(I,L)}})}}};wg.DASH_LENGTH=4;let Lk=wg;class kk extends ht{constructor(){super(...arguments),this.type="zoom-bar",this.renderType=Q.SVG,this.MIN_SELECTION_DIFF=9e-10,this.brushSelector="g.zoom-bar-brush",this.clipId="zoomBarClip-"+Math.floor(Math.random()*99999999999),this.brush=am(),this.highlightStrokeWidth=1}init(){this.services.events.addEventListener(T.ZoomBar.UPDATE,this.render.bind(this));const t=x(this.getOptions(),"zoomBar",G.TOP,"data");this.model.setZoomBarData(t)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"zoom bar"}),r=this.services.zoom.isZoomBarLoading(G.TOP),i=this.services.zoom.isZoomBarLocked(G.TOP),s=x(this.getOptions(),"zoomBar",G.TOP,"type"),a=x(this.getOptions(),"axes",G.BOTTOM,"highlights"),o=xe.height[s],{width:l}=R.getSVGElementSize(this.parent,{useAttrs:!0});if(l===0)return;let c=0;const u=this.model.get("axesMargins");u&&u.left&&(c=u.left);const d=R.appendOrSelect(n,"svg.zoom-container").attr("width","100%").attr("height",o).attr("opacity",1);if(R.appendOrSelect(n,"rect.zoom-spacer").attr("x",0).attr("y",o).attr("width","100%").attr("height",xe.spacerHeight).attr("opacity",1).attr("fill","none"),s===Ne.GRAPH_VIEW?R.appendOrSelect(d,"rect.zoom-bg").attr("x",c).attr("y",0).attr("width",l-c).attr("height","100%").classed("zoom-bg-skeleton",r).style("stroke",r?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null):s===Ne.SLIDER_VIEW&&R.appendOrSelect(d,"rect.zoom-slider-bg").attr("x",c).attr("y",o/2-1).attr("width",l-c).attr("height",2).classed("zoom-slider-bg-skeleton",r).style("stroke",r?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null),r){this.renderSkeleton(d,c,l);return}const{cartesianScales:h}=this.services,p=h.getMainXScale(),f=h.getMainYScale(),g=h.getMainXScaleType();if(p&&g===X.TIME){let m=this.services.zoom.getZoomBarData();if(Be(m)||m.length===1)return;this.xScale=p.copy(),this.yScale=f.copy();const y=this.services.zoom.getDefaultZoomBarDomain(m);m=this.compensateDataForDefaultDomain(m,y);const v=this.model.get("initialZoomDomain"),b=x(this.getOptions(),"zoomBar",G.TOP,"initialZoomDomain");b&&b[0]&&b[1]&&(b[0]=new Date(b[0]),b[1]=new Date(b[1])),b&&!(v&&v[0].valueOf()===b[0].valueOf()&&v[1].valueOf()===b[1].valueOf())?this.model.set({initialZoomDomain:st([],b),zoomDomain:b?st([],b):y},{skipUpdate:!0}):b===null&&v!==null&&this.model.set({initialZoomDomain:null,zoomDomain:st([],y)},{skipUpdate:!0}),this.xScale.range([c,l]).domain(y),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,o-6]).domain(He(m,S=>S.value));const O=this.model.get("zoomDomain");if(s===Ne.GRAPH_VIEW&&(this.renderZoomBarArea(d,"path.zoom-graph-area-unselected",m,null),this.updateClipPath(n,this.clipId,0,0,0,0),this.renderZoomBarArea(d,"path.zoom-graph-area",m,this.clipId),this.renderZoomBarBaseline(d,c,l),a)){const S=a.highlightStartMapsTo,C=a.highlightEndMapsTo,I=a.color,L=a.labelMapsTo;a.data.forEach((k,w)=>{R.appendOrSelect(d,`rect.highlight-${w}`).attr("height",o-2*this.highlightStrokeWidth).attr("y",this.highlightStrokeWidth).attr("x",this.xScale(k[S])).attr("width",this.xScale(k[C])-this.xScale(k[S])).style("fill",I&&I.scale[k[L]]?I.scale[k[L]]:null).style("fill-opacity",.1).style("stroke",I&&I.scale[k[L]]?I.scale[k[L]]:null).style("stroke-dasharray","2, 2").attr("stroke-width","1px")})}this.addBrushEventListener(O,c,l);const E=R.appendOrSelect(n,this.brushSelector).call(this.brush);if(O!==void 0)if(O[0].valueOf()===O[1].valueOf())E.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getComponentContainer(),this.xScale.range());else{const S=O.map(C=>this.xScale(C));S[1]-S[0]<this.MIN_SELECTION_DIFF||(E.call(this.brush.move,S),this.updateBrushHandle(this.getComponentContainer(),S))}i&&(this.brush.filter(()=>!1),E.selectAll("rect").attr("cursor","auto"))}}addBrushEventListener(t,n,r){const i=o=>{const l=o.selection;l===null?this.handleBrushedEvent(o,t,this.xScale,this.xScale.range()):l[0]===l[1]||this.handleBrushedEvent(o,t,this.xScale,l)},s=x(this.getOptions(),"zoomBar",G.TOP,"type"),a=xe.height[s];this.brush.extent([[n,0],[r,a]]).on("start brush end",null).on("start brush end",i)}handleBrushedEvent(t,n,r,i){const s=[r.invert(i[0]),r.invert(i[1])];if(this.updateBrushHandle(this.getComponentContainer(),i),t.sourceEvent!=null&&(t.sourceEvent.type==="mousemove"||t.sourceEvent.type==="mouseup"||t.sourceEvent.type==="mousedown"||t.sourceEvent.type==="touchstart"||t.sourceEvent.type==="touchmove"||t.sourceEvent.type==="touchend")){(n===void 0||n[0]!==s[0]||n[1]!==s[1])&&this.services.zoom.handleDomainChange(s,{dispatchEvent:!1});let a;t.type==="start"?a=T.ZoomBar.SELECTION_START:t.type==="brush"?a=T.ZoomBar.SELECTION_IN_PROGRESS:t.type==="end"&&(a=T.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(T.ZoomDomain.CHANGE,{newDomain:s})),this.services.events.dispatchEvent(a,{selection:i,newDomain:s})}}updateBrushHandle(t,n){const r=this,i=xe.handleWidth,s=x(this.getOptions(),"zoomBar",G.TOP,"type"),a=xe.height[s],o=-i/2,l=xe.handleBarWidth,c=s===Ne.GRAPH_VIEW?xe.handleBarHeight:6,u=-l/2,d=(a-c)/2;t.select(this.brushSelector).selectAll("rect.handle").data([{type:"w"},{type:"e"}]).attr("x",function(p){if(p.type==="w")return Math.max(n[0]+o,r.maxSelectionRange[0]);if(p.type==="e")return Math.min(n[1]+o,r.maxSelectionRange[1]-i)}).attr("y",0).attr("width",i).attr("height",a).attr("cursor","ew-resize").style("display",null);const h=t.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]);h.enter().append("rect").attr("class",function(p){return"handle-bar handle-bar--"+p.type}),h.attr("x",function(p){if(p.type==="w")return Math.max(n[0]+u,r.maxSelectionRange[0]-o+u);if(p.type==="e")return Math.min(n[1]+u,r.maxSelectionRange[1]+o+u)}).attr("y",d).attr("width",l).attr("height",c).attr("cursor","ew-resize"),s===Ne.SLIDER_VIEW&&this.updateSliderSelectedArea(n),this.updateClipPath(t,this.clipId,n[0],0,n[1]-n[0],a)}updateSliderSelectedArea(t){const n=x(this.getOptions(),"zoomBar",G.TOP,"type"),r=xe.height[n],i=this.getComponentContainer().select("svg.zoom-container");R.appendOrSelect(i,"rect.zoom-slider-selected-area").attr("x",t[0]).attr("y",r/2-1).attr("width",t[1]-t[0]).attr("height",2)}renderZoomBarArea(t,n,r,i){const{cartesianScales:s}=this.services,a=s.getMainXAxisPosition(),o=s.getMainYAxisPosition(),l=s.getMainXScaleType(),c=s.getMainYScaleType(),u=(y,v,b)=>O=>s.getValueFromScale(y,v,b,O),d=u(this.xScale,l,a),h=u(this.yScale,c,o),p=x(this.getOptions(),"zoomBar",G.TOP,"type"),f=xe.height[p],g=eu().x(y=>d(y)).y0(f).y1(y=>f-h(y)),m=R.appendOrSelect(t,n).datum(r).attr("d",g);i&&m.attr("clip-path",`url(#${i})`)}updateClipPath(t,n,r,i,s,a){const o=R.appendOrSelect(t,"clipPath").attr("id",n);R.appendOrSelect(o,"rect").attr("x",r).attr("y",i).attr("width",s).attr("height",a)}compensateDataForDefaultDomain(t,n){if(!t||t.length<2)return;const r=dn(t),i=this.services.cartesianScales.getDomainIdentifier(),s=this.services.cartesianScales.getRangeIdentifier();if(Number(n[0])<Number(r[0][i])){const a={};a[i]=n[0],a[s]=0,r.unshift(a)}if(Number(n[1])>Number(r[r.length-1][i])){const a={};a[i]=n[1],a[s]=0,r.push(a)}return r}renderZoomBarBaseline(t,n,r,i=!1){const s=x(this.model.getOptions(),"zoomBar",G.TOP,"type"),a=xe.height[s],o=gs()([[n,a],[r,a]]);R.appendOrSelect(t,"path.zoom-bg-baseline").attr("d",o).classed("zoom-bg-baseline-skeleton",i).style("stroke",i?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}renderSkeleton(t,n,r){this.renderZoomBarArea(t,"path.zoom-graph-area-unselected",[],null),this.renderZoomBarArea(t,"path.zoom-graph-area",[],this.clipId),this.brush.on("start brush end",null),R.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),x(this.getOptions(),"zoomBar",G.TOP,"type")===Ne.GRAPH_VIEW&&this.renderZoomBarBaseline(t,n,r,!0)}destroy(){this.brush.on("start brush end",null),this.services.events.removeEventListener(T.ZoomBar.UPDATE,this.render.bind(this))}}class Dk extends ht{constructor(t,n){super(t,n),this.type="threshold",this.renderType=Q.SVG,this.positionService=new ao}render(t=!1){const n=x(this.getOptions(),"axes"),r=[];Object.keys(n).forEach(c=>{if(Object.values(G).includes(c)){const u=n[c];u.thresholds&&u.thresholds.length>0&&r.push({axisPosition:c,thresholds:u.thresholds,correspondingDatasets:u==null?void 0:u.correspondingDatasets,mapsTo:u==null?void 0:u.mapsTo})}});const i=this.getComponentContainer({ariaLabel:"threshold lines",withinChartClip:!0}).selectAll("g.axis-thresholds").data(r,c=>c.axisPosition);i.exit().attr("opacity",0).remove();const s=i.enter().append("g").merge(i);s.attr("class",c=>`axis-thresholds ${c.axisPosition}`);const a=s.selectAll("g.threshold-group").data(c=>c.thresholds.map(u=>(u.axisPosition=c.axisPosition,u.datum=this.constructDatumObj(c,u),u)));a.exit().attr("opacity",0).remove();const o=a.enter().append("g");o.append("line").attr("class","threshold-line"),o.append("rect").attr("class","threshold-hoverable-area"),o.merge(a).attr("class","threshold-group");const l=this;s.each(function({axisPosition:c}){const u=l.services.cartesianScales.getScaleByPosition(c),d=l.services.cartesianScales.getScaleTypeByPosition(c);let h=null,p=null;c===G.LEFT||c===G.RIGHT?(p=u,h=l.services.cartesianScales.getMainXScale()):(h=u,p=l.services.cartesianScales.getMainYScale());const f=d===X.LABELS,[g,m]=h.range(),[y,v]=p.range(),{cartesianScales:b}=l.services,O=b.getOrientation(),E=k=>b.getDomainValue(k),S=k=>b.getRangeValue(k),[C,I]=xn(E,S,O),L=D(this);c===G.TOP||c===G.BOTTOM?(L.selectAll("line.threshold-line").transition().call(k=>l.services.transitions.setupTransition({transition:k,name:"threshold-line-update",animate:t})).attr("y1",v).attr("y2",y).attr("x1",({datum:k})=>C(k)+(f?u.step()/2:0)).attr("x2",({datum:k})=>C(k)+(f?u.step()/2:0)).style("stroke",({fillColor:k})=>k),L.selectAll("rect.threshold-hoverable-area").attr("x",0).attr("y",({datum:k})=>-C(k)).attr("width",Math.abs(y-v)).classed("rotate",!0)):(L.selectAll("line.threshold-line").transition().call(k=>l.services.transitions.setupTransition({transition:k,name:"threshold-line-update",animate:t})).attr("x1",g).attr("x2",m).attr("y1",({datum:k})=>I(k)+(f?u.step()/2:0)).attr("y2",({datum:k})=>I(k)+(f?u.step()/2:0)).style("stroke",({fillColor:k})=>k),L.selectAll("rect.threshold-hoverable-area").attr("x",g).attr("y",({datum:k})=>I(k)).attr("width",Math.abs(m-g)).classed("rotate",!1))}),this.services.events.addEventListener(T.Threshold.SHOW,c=>{this.setThresholdLabelPosition(c.detail),this.label.classed("hidden",!1)}),this.services.events.addEventListener(T.Threshold.HIDE,()=>{this.label.classed("hidden",!0)}),this.appendThresholdLabel(),this.addEventListeners()}getFormattedValue(t){const{value:n,axisPosition:r}=t,i=this.getOptions(),s=this.services.cartesianScales.getScaleTypeByPosition(r),{code:a,number:o}=x(i,"locale");if(s===X.TIME){const l=[G.LEFT,G.RIGHT].includes(r),c=this.services.cartesianScales.getMainXScale(),u=this.services.cartesianScales.getMainYScale(),d=l?u:c,h=x(i,"timeScale"),p=ql(d.ticks(),x(h,"timeInterval"));return Wl(n,0,d.ticks(),p,h,i.locale)}return o(n,a)}appendThresholdLabel(){const t=D(this.services.domUtils.getHolder()),n=x(this.getOptions(),"style","prefix");this.label=R.appendOrSelect(t,`div.${he}--${n}--threshold--label`).classed("hidden",!0)}setThresholdLabelPosition({event:t,datum:n}){const r=this.services.domUtils.getHolder(),i=er(t,r),s=n.valueFormatter?n.valueFormatter(n.value):this.getFormattedValue(n);this.label.html(an(`${n.label||"Threshold"}: ${s}`)).style("background-color",n.fillColor);const a=this.label.node(),o=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},a,[Bt.RIGHT,Bt.LEFT,Bt.TOP,Bt.BOTTOM],()=>({top:void 0,left:void 0,width:r.offsetWidth,height:r.offsetHeight})),l=this.positionService.findPositionAt({left:i[0],top:i[1]},a,o);this.positionService.setElement(a,l)}constructDatumObj(t,n){const r={};return t.correspondingDatasets&&(r.group=x(t,"correspondingDatasets",0)),r[t.mapsTo]=n.value,r}addEventListeners(){const t=this;this.getComponentContainer({withinChartClip:!0}).selectAll("rect.threshold-hoverable-area").on("mouseover mousemove",function(n){D(this.parentNode).select("line.threshold-line").classed("active",!0),t.services.events.dispatchEvent(T.Threshold.SHOW,{event:n,hoveredElement:D(this),datum:D(this).datum()})}).on("mouseout",function(n){D(this.parentNode).select("line.threshold-line").classed("active",!1),t.services.events.dispatchEvent(T.Threshold.HIDE,{event:n,hoveredElement:D(this),datum:D(this).datum()})})}}class Rk extends ht{constructor(t,n){super(t,n),this.type="highlight",this.renderType=Q.SVG,this.positionService=new ao,this.highlightStrokeWidth=1}render(t=!1){const n=x(this.getOptions(),"axes"),r=[];Object.keys(n).forEach(c=>{if(Object.values(G).includes(c)){const u=n[c];u.highlights&&u.highlights.data.length>0&&r.push({axisPosition:c,highlightStartMapsTo:u.highlights.highlightStartMapsTo,highlightEndMapsTo:u.highlights.highlightEndMapsTo,labelMapsTo:u.highlights.labelMapsTo,highlight:u.highlights.data,color:u.highlights.color})}});const i=this.getComponentContainer({ariaLabel:"highlight areas",withinChartClip:!0}).selectAll("g.axis-highlight").data(r,c=>c.axisPosition);i.exit().attr("opacity",0).remove();const s=i.enter().append("g").merge(i);s.attr("class",c=>`axis-highlight ${c.axisPosition}`);const a=s.selectAll("g.highlight-group").data(c=>c.highlight.map(u=>(u.axisPosition=c.axisPosition,u.highlightStartMapsTo=c.highlightStartMapsTo,u.labelMapsTo=c.labelMapsTo,u.color=c.color,u.highlightEndMapsTo=c.highlightEndMapsTo,u)));a.exit().attr("opacity",0).remove();const o=a.enter().append("g");o.append("rect").attr("class","highlight-bar"),o.append("line").attr("class","highlight-line"),o.merge(a).attr("class","highlight-group");const l=this;s.each(function({axisPosition:c}){const u=l.services.cartesianScales.getMainXScale(),d=l.services.cartesianScales.getMainYScale(),[h,p]=u.range(),[f,g]=d.range(),{cartesianScales:m}=l.services,y=m.getOrientation(),v=C=>m.getDomainValue(C),b=C=>m.getRangeValue(C),[O,E]=xn(v,b,y),S=D(this);c===G.TOP||c===G.BOTTOM?S.selectAll("rect.highlight-bar").transition().call(C=>l.services.transitions.setupTransition({transition:C,name:"highlight-bar-update",animate:t})).attr("y",Math.max(g+l.highlightStrokeWidth,0)).attr("height",Math.max(f-2*l.highlightStrokeWidth,0)).attr("x",({highlightStartMapsTo:C,...I})=>O(I[C])).attr("width",({highlightStartMapsTo:C,highlightEndMapsTo:I,...L})=>Math.max(O(L[I])-O(L[C]),0)).style("stroke",({color:C,labelMapsTo:I,...L})=>C&&C.scale[L[I]]?C.scale[L[I]]:null).style("stroke-dasharray","2, 2").attr("stroke-width",l.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",({color:C,labelMapsTo:I,...L})=>C&&C.scale[L[I]]?C.scale[L[I]]:null):S.selectAll("rect.highlight-bar").transition().call(C=>l.services.transitions.setupTransition({transition:C,name:"highlight-bar-update",animate:t})).attr("x",h).attr("width",Math.max(p-h,0)).attr("y",({highlightEndMapsTo:C,...I})=>E(I[C])).attr("height",({highlightStartMapsTo:C,highlightEndMapsTo:I,...L})=>Math.max(E(L[C])-E(L[I]),0)).style("stroke",({color:C,labelMapsTo:I,...L})=>C&&C.scale[L[I]]?C.scale[L[I]]:null).style("stroke-dasharray","2, 2").attr("stroke-width",l.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",({color:C,labelMapsTo:I,...L})=>C&&C.scale[L[I]]?C.scale[L[I]]:null)})}}class $g extends hu{getItems(t){if(t.detail.items)return t.detail.items;const{data:n}=t.detail;if(!n||!n.length||!n[0])return[];const r=this.getOptions(),{cartesianScales:i}=this.services,s=i.getDomainIdentifier(),a=i.isDualAxes(),{groupMapsTo:o}=r.data,l=i.getDomainLabel();let c=i.getRangeLabel();const u=n[0][s];let d;if(n.length===1){const h=n[0],p=i.getRangeIdentifier(h);if(a){const g=i.getRangeAxisPosition({datum:h,groups:[h[o]]});c=i.getScaleLabel(g)}const f=h[p];d=[{label:l,value:u},...Array.isArray(f)&&f.length===2?[{label:"Start",value:f[0]},{label:"End",value:f[1]}]:[{label:c,value:h[p]}]],t.detail.additionalItems&&t.detail.additionalItems.forEach(g=>d.push({label:g.label,value:g.value})),d.push({label:gt(r,"locale.translations.group")||gt(r,"tooltip.groupLabel"),value:h[o],color:this.model.getFillColor(h[o]),class:this.model.getColorClassName({classNameTypes:[et.TOOLTIP],dataGroupName:h[o]})})}else if(n.length>1&&(d=[{label:l,value:u}],d=d.concat(n.map(h=>{const p=h[i.getRangeIdentifier(h)];return{label:h[o],value:Array.isArray(p)&&p.length===2?`${p[0]} - ${p[1]}`:p,color:this.model.getFillColor(h[o]),class:this.model.getColorClassName({classNameTypes:[et.TOOLTIP],dataGroupName:h[o]})}}).sort((h,p)=>p.value-h.value)),!a&&x(r,"tooltip","showTotal")===!0)){const h=i.getRangeIdentifier();d.push({label:gt(r,"locale.translations.total")||gt(r,"tooltip.totalLabel")||"Total",value:n.reduce((p,f)=>p+f[h],0),bold:!0})}return d}}function Mg(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Ik(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function du(e,t){let n=0;if(t===void 0)for(let r of e)(r=+r)&&(n+=r);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function Nk(e){return e.depth}function Pk(e,t){return t-1-e.height}function Cg(e,t){return e.sourceLinks.length?e.depth:t-1}function oo(e){return function(){return e}}function Ag(e,t){return lo(e.source,t.source)||e.index-t.index}function Lg(e,t){return lo(e.target,t.target)||e.index-t.index}function lo(e,t){return e.y0-t.y0}function pu(e){return e.value}function Uk(e){return e.index}function Bk(e){return e.nodes}function Hk(e){return e.links}function kg(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function Dg({nodes:e}){for(const t of e){let n=t.y0,r=n;for(const i of t.sourceLinks)i.y0=n+i.width/2,n+=i.width;for(const i of t.targetLinks)i.y1=r+i.width/2,r+=i.width}}function Vk(){let e=0,t=0,n=1,r=1,i=24,s=8,a,o=Uk,l=Cg,c,u,d=Bk,h=Hk,p=6;function f(){const _={nodes:d.apply(null,arguments),links:h.apply(null,arguments)};return g(_),m(_),y(_),v(_),E(_),Dg(_),_}f.update=function(_){return Dg(_),_},f.nodeId=function(_){return arguments.length?(o=typeof _=="function"?_:oo(_),f):o},f.nodeAlign=function(_){return arguments.length?(l=typeof _=="function"?_:oo(_),f):l},f.nodeSort=function(_){return arguments.length?(c=_,f):c},f.nodeWidth=function(_){return arguments.length?(i=+_,f):i},f.nodePadding=function(_){return arguments.length?(s=a=+_,f):s},f.nodes=function(_){return arguments.length?(d=typeof _=="function"?_:oo(_),f):d},f.links=function(_){return arguments.length?(h=typeof _=="function"?_:oo(_),f):h},f.linkSort=function(_){return arguments.length?(u=_,f):u},f.size=function(_){return arguments.length?(e=t=0,n=+_[0],r=+_[1],f):[n-e,r-t]},f.extent=function(_){return arguments.length?(e=+_[0][0],n=+_[1][0],t=+_[0][1],r=+_[1][1],f):[[e,t],[n,r]]},f.iterations=function(_){return arguments.length?(p=+_,f):p};function g({nodes:_,links:M}){for(const[N,U]of _.entries())U.index=N,U.sourceLinks=[],U.targetLinks=[];const A=new Map(_.map((N,U)=>[o(N,U,_),N]));for(const[N,U]of M.entries()){U.index=N;let{source:W,target:j}=U;typeof W!="object"&&(W=U.source=kg(A,W)),typeof j!="object"&&(j=U.target=kg(A,j)),W.sourceLinks.push(U),j.targetLinks.push(U)}if(u!=null)for(const{sourceLinks:N,targetLinks:U}of _)N.sort(u),U.sort(u)}function m({nodes:_}){for(const M of _)M.value=M.fixedValue===void 0?Math.max(du(M.sourceLinks,pu),du(M.targetLinks,pu)):M.fixedValue}function y({nodes:_}){const M=_.length;let A=new Set(_),N=new Set,U=0;for(;A.size;){for(const W of A){W.depth=U;for(const{target:j}of W.sourceLinks)N.add(j)}if(++U>M)throw new Error("circular link");A=N,N=new Set}}function v({nodes:_}){const M=_.length;let A=new Set(_),N=new Set,U=0;for(;A.size;){for(const W of A){W.height=U;for(const{source:j}of W.targetLinks)N.add(j)}if(++U>M)throw new Error("circular link");A=N,N=new Set}}function b({nodes:_}){const M=Mg(_,U=>U.depth)+1,A=(n-e-i)/(M-1),N=new Array(M);for(const U of _){const W=Math.max(0,Math.min(M-1,Math.floor(l.call(null,U,M))));U.layer=W,U.x0=e+W*A,U.x1=U.x0+i,N[W]?N[W].push(U):N[W]=[U]}if(c)for(const U of N)U.sort(c);return N}function O(_){const M=Ik(_,A=>(r-t-(A.length-1)*a)/du(A,pu));for(const A of _){let N=t;for(const U of A){U.y0=N,U.y1=N+U.value*M,N=U.y1+a;for(const W of U.sourceLinks)W.width=W.value*M}N=(r-N+a)/(A.length+1);for(let U=0;U<A.length;++U){const W=A[U];W.y0+=N*(U+1),W.y1+=N*(U+1)}V(A)}}function E(_){const M=b(_);a=Math.min(s,(r-t)/(Mg(M,A=>A.length)-1)),O(M);for(let A=0;A<p;++A){const N=Math.pow(.99,A),U=Math.max(1-N,(A+1)/p);C(M,N,U),S(M,N,U)}}function S(_,M,A){for(let N=1,U=_.length;N<U;++N){const W=_[N];for(const j of W){let it=0,nt=0;for(const{source:rt,value:Y}of j.targetLinks){let J=Y*(j.layer-rt.layer);it+=P(rt,j)*J,nt+=J}if(!(nt>0))continue;let mt=(it/nt-j.y0)*M;j.y0+=mt,j.y1+=mt,w(j)}c===void 0&&W.sort(lo),I(W,A)}}function C(_,M,A){for(let N=_.length,U=N-2;U>=0;--U){const W=_[U];for(const j of W){let it=0,nt=0;for(const{target:rt,value:Y}of j.sourceLinks){let J=Y*(rt.layer-j.layer);it+=B(j,rt)*J,nt+=J}if(!(nt>0))continue;let mt=(it/nt-j.y0)*M;j.y0+=mt,j.y1+=mt,w(j)}c===void 0&&W.sort(lo),I(W,A)}}function I(_,M){const A=_.length>>1,N=_[A];k(_,N.y0-a,A-1,M),L(_,N.y1+a,A+1,M),k(_,r,_.length-1,M),L(_,t,0,M)}function L(_,M,A,N){for(;A<_.length;++A){const U=_[A],W=(M-U.y0)*N;W>1e-6&&(U.y0+=W,U.y1+=W),M=U.y1+a}}function k(_,M,A,N){for(;A>=0;--A){const U=_[A],W=(U.y1-M)*N;W>1e-6&&(U.y0-=W,U.y1-=W),M=U.y0-a}}function w({sourceLinks:_,targetLinks:M}){if(u===void 0){for(const{source:{sourceLinks:A}}of M)A.sort(Lg);for(const{target:{targetLinks:A}}of _)A.sort(Ag)}}function V(_){if(u===void 0)for(const{sourceLinks:M,targetLinks:A}of _)M.sort(Lg),A.sort(Ag)}function P(_,M){let A=_.y0-(_.sourceLinks.length-1)*a/2;for(const{target:N,width:U}of _.sourceLinks){if(N===M)break;A+=U+a}for(const{source:N,width:U}of M.targetLinks){if(N===_)break;A-=U}return A}function B(_,M){let A=M.y0-(M.targetLinks.length-1)*a/2;for(const{source:N,width:U}of M.targetLinks){if(N===_)break;A+=U+a}for(const{target:N,width:U}of _.sourceLinks){if(N===M)break;A-=U}return A}return f}var fu=Math.PI,mu=2*fu,xr=1e-6,Gk=mu-xr;function gu(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Rg(){return new gu}gu.prototype=Rg.prototype={constructor:gu,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,s){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+s)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var s=this._x1,a=this._y1,o=n-e,l=r-t,c=s-e,u=a-t,d=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>xr)if(!(Math.abs(u*o-l*c)>xr)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var h=n-s,p=r-a,f=o*o+l*l,g=h*h+p*p,m=Math.sqrt(f),y=Math.sqrt(d),v=i*Math.tan((fu-Math.acos((f+d-g)/(2*m*y)))/2),b=v/y,O=v/m;Math.abs(b-1)>xr&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*h>c*p)+","+(this._x1=e+O*o)+","+(this._y1=t+O*l)}},arc:function(e,t,n,r,i,s){e=+e,t=+t,n=+n,s=!!s;var a=n*Math.cos(r),o=n*Math.sin(r),l=e+a,c=t+o,u=1^s,d=s?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+l+","+c:(Math.abs(this._x1-l)>xr||Math.abs(this._y1-c)>xr)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%mu+mu),d>Gk?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-o)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>xr&&(this._+="A"+n+","+n+",0,"+ +(d>=fu)+","+u+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function Ig(e){return function(){return e}}function Fk(e){return e[0]}function zk(e){return e[1]}var jk=Array.prototype.slice;function Wk(e){return e.source}function qk(e){return e.target}function Yk(e){var t=Wk,n=qk,r=Fk,i=zk,s=null;function a(){var o,l=jk.call(arguments),c=t.apply(this,l),u=n.apply(this,l);if(s||(s=o=Rg()),e(s,+r.apply(this,(l[0]=c,l)),+i.apply(this,l),+r.apply(this,(l[0]=u,l)),+i.apply(this,l)),o)return s=null,o+""||null}return a.source=function(o){return arguments.length?(t=o,a):t},a.target=function(o){return arguments.length?(n=o,a):n},a.x=function(o){return arguments.length?(r=typeof o=="function"?o:Ig(+o),a):r},a.y=function(o){return arguments.length?(i=typeof o=="function"?o:Ig(+o),a):i},a.context=function(o){return arguments.length?(s=o??null,a):s},a}function Zk(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function Xk(){return Yk(Zk)}function Kk(e){return[e.source.x1,e.y0]}function Qk(e){return[e.target.x0,e.y1]}function Jk(){return Xk().source(Kk).target(Qk)}class tD extends ht{constructor(){super(...arguments),this.type="alluvial",this.renderType=Q.SVG,this.gradient_id="gradient-id-"+Math.floor(Math.random()*99999999999)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"alluvial graphs",withinChartClip:!0});n.html("");const{width:r,height:i}=R.getSVGElementSize(n,{useAttrs:!0});if(r<1||i<1)return;const s=this.model.getOptions(),a=this.model.getDisplayData(),o=x(this.getOptions(),"color","gradient","enabled");let l=ze.minNodePadding;s.alluvial.nodePadding>ze.minNodePadding&&(l=s.alluvial.nodePadding);const c=x(s,"alluvial","nodeAlignment");let u=Cg;c===Vt.LEFT?u=Nk:c===Vt.RIGHT&&(u=Pk);const d=Vk().nodeId(v=>v.name).nodeWidth(ze.nodeWidth).nodePadding(l).nodeAlign(u).extent([[2,30],[r-2,i]]);this.graph=d({nodes:s.alluvial.nodes.map(v=>Object.assign({},v)),links:a.map(v=>Object.assign({},v))}),this.graph.nodes=this.graph.nodes.filter(v=>v.value!==0);const h={};this.graph.nodes.forEach(v=>{const b=v.x0;v.category&&(h[b]=v==null?void 0:v.category)}),n.append("g").classed("header-arrows",!0).selectAll("g").data(Object.keys(h)).join("g").attr("transform",v=>`translate(${v}, 0)`).append("text").attr("id",(v,b)=>this.services.domUtils.generateElementIDString(`alluvial-category-${b}`)).style("font-size","14px").text(v=>h[v]?h[v]:"").attr("y",20).attr("x",(v,b)=>{const O=this.services.domUtils.generateElementIDString(`alluvial-category-${b}`),{width:E}=R.getSVGElementSize(D(`text#${O}`),{useBBox:!0});let S=0;return v+S>=E&&(S=-E+4),S});const p=n.append("g").attr("fill","none").selectAll("g").data(this.graph.links);if(p.exit().remove(),o){const v=x(this.getOptions(),"color","scale");v&&p.enter().append("linearGradient").attr("id",b=>`${this.gradient_id}-link-${b.index}`).attr("gradientUnits","userSpaceOnUse").call(b=>b.append("stop").attr("offset","0%").attr("stop-color",O=>v[O.source.name])).call(b=>b.append("stop").attr("offset","100%").attr("stop-color",O=>v[O.target.name])),p.exit().remove()}p.enter().append("path").classed("link",!0).attr("d",Jk()).attr("id",v=>this.services.domUtils.generateElementIDString(`alluvial-line-${v.index}`)).attr("class",v=>s.alluvial.monochrome?this.model.getColorClassName({classNameTypes:[et.STROKE],dataGroupName:0,originalClassName:"link"}):this.model.getColorClassName({classNameTypes:[et.STROKE],dataGroupName:v.source.index,originalClassName:"link"})).style("stroke",v=>o?`url(#${this.gradient_id}-link-${v.index})`:this.model.getFillColor(v.source.name,null,{...v,source:v.source.name,target:v.target.name})).attr("stroke-width",v=>Math.max(1,v.width)).style("stroke-opacity",ze.opacity.default).attr("aria-label",v=>`${v.source.name} → ${v.target.name} (${v.value}${s.alluvial.units?" "+s.alluvial.units:""})`);const f=n.append("g").selectAll("g").data(this.graph.nodes).enter().append("g").attr("id",v=>this.services.domUtils.generateElementIDString(`alluvial-node-${v.index}`)).classed("node-group",!0).attr("transform",v=>`translate(${v.x0}, ${v.y0})`);f.append("rect").classed("node",!0).attr("height",v=>v.y1-v.y0).attr("width",v=>v.x1-v.x0).attr("fill","black");const g=f.append("g").attr("id",v=>this.services.domUtils.generateElementIDString(`alluvial-node-title-${v.index}`)),{code:m,number:y}=x(s,"locale");g.append("text").attr("id",v=>this.services.domUtils.generateElementIDString(`alluvial-node-text-${v.index}`)).attr("class","node-text").style("font-size","12px").attr("text-anchor","start").attr("fill","white").attr("x",4).attr("dy",13).text(v=>`${v.name} (${y(v.value,m)})`).attr("aria-label",v=>`${v.name} (${v.value})`),g.append("rect").classed("node-text-bg",!0).attr("width",(v,b)=>{const O=this.services.domUtils.generateElementIDString(`alluvial-node-text-${b}`),{width:E}=R.getSVGElementSize(D(`text#${O}`),{useBBox:!0});return E+8}).attr("height",18).attr("stroke-width",2).lower(),g.attr("transform",(v,b)=>{const O=this.services.domUtils.generateElementIDString(`alluvial-node-text-${b}`),{width:E}=R.getSVGElementSize(D(`text#${O}`),{useBBox:!0}),S=(v.y1-v.y0)/2-9;let C=v.x1-v.x0;return v.x1>=E?C=C-(E+16):C+=4,`translate(${C}, ${S})`}),this.addLineEventListener(),this.addNodeEventListener()}addLineEventListener(){const t=this.getOptions(),n=this,{number:r,code:i}=x(this.getOptions(),"locale"),s=ga((a,o="mouseover")=>{const l=n.parent.selectAll("path.link").transition().call(c=>n.services.transitions.setupTransition({transition:c,name:"alluvial-links-mouse-highlight"}));o==="mouseout"?(D(a).lower(),l.style("stroke-opacity",ze.opacity.default)):l.style("stroke-opacity",function(){return a===this?(D(this).raise(),ze.opacity.selected):ze.opacity.unfocus})},33);this.parent.selectAll("path.link").on("mouseover",function(a,o){const l=D(this);s(this,"mouseover"),l.classed("link-hovered",!0);const c=getComputedStyle(this).getPropertyValue("stroke");n.services.events.dispatchEvent(T.Alluvial.LINE_MOUSEOVER,{event:a,element:l,datum:o}),n.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:l,items:[{label:o.target.name,value:(r(o.value,i)?`${r(o.value,i)}`:"-")+(t.alluvial.units?` ${t.alluvial.units}`:""),color:c,labelIcon:n.getRightArrowIcon()}]})}).on("mousemove",function(a,o){n.services.events.dispatchEvent(T.Alluvial.LINE_MOUSEMOVE,{event:a,element:D(this),datum:o}),n.services.events.dispatchEvent(T.Tooltip.MOVE,{event:a})}).on("click",function(a,o){n.services.events.dispatchEvent(T.Alluvial.LINE_CLICK,{event:a,element:D(this),datum:o})}).on("mouseout",function(a,o){const l=D(this);s(this,"mouseout"),l.classed("link-hovered",!1),n.services.events.dispatchEvent(T.Alluvial.LINE_MOUSEOUT,{event:a,element:l,datum:o}),n.services.events.dispatchEvent(T.Tooltip.HIDE,{event:a,hoveredElement:l})})}addNodeEventListener(){const t=this,n=ga((r=[],i="mouseover")=>{if(i==="mouseout"||r.length===0){t.parent.selectAll("path.link").classed("link-hovered",!1).data(this.graph.links,s=>s.index).order().style("stroke-opacity",ze.opacity.default);return}t.parent.selectAll("path.link").transition().call(s=>this.services.transitions.setupTransition({transition:s,name:"alluvial-link-mouse-highlight"})).style("stroke-opacity",function(s){return r.some(a=>a===s.index)?(D(this).classed("link-hovered",!0).raise(),ze.opacity.selected):ze.opacity.unfocus})},66);t.parent.selectAll(".node-group").on("mouseover",function(r,i){const s=D(this),a=[];if(t.traverse({link:"sourceLinks",node:"target"},i,a),t.traverse({link:"targetLinks",node:"source"},i,a),a.length){const o=zi(s.attr("transform"));if(s.attr("transform",`translate(${o.x-2}, ${o.y})`),s.classed("node-hovered",!0).selectAll("rect.node").attr("width",8),i.x0-2===0){const c=t.services.domUtils.generateElementIDString(`alluvial-node-title-${i.index}`),u=t.parent.select(`g#${c}`),d=zi(u.attr("transform"));u.attr("transform",`translate(${d.x+4},${d.y})`)}const l=t.services.domUtils.generateElementIDString(`alluvial-node-text-${i.index}`);t.parent.select(`text#${l}`).style("font-weight","bold"),n(a,"mouseover"),t.services.events.dispatchEvent(T.Alluvial.NODE_MOUSEOVER,{event:r,element:s,datum:i})}}).on("mousemove",function(r,i){t.services.events.dispatchEvent(T.Alluvial.NODE_MOUSEMOVE,{event:r,element:D(this),datum:i}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:r})}).on("click",function(r,i){t.services.events.dispatchEvent(T.Alluvial.NODE_CLICK,{event:r,element:D(this),datum:i})}).on("mouseout",function(r,i){const s=D(this),a=zi(s.attr("transform"));if(s.classed("node-hovered",!1).attr("transform",`translate(${a.x+2}, ${a.y})`).select("rect.node").attr("width",ze.nodeWidth),i.x0-2===0){const l=t.services.domUtils.generateElementIDString(`alluvial-node-title-${i.index}`),c=t.parent.select(`g#${l}`),u=zi(c.attr("transform"));c.attr("transform",`translate(${u.x-4},${u.y})`)}const o=t.services.domUtils.generateElementIDString(`alluvial-node-text-${i.index}`);t.parent.select(`text#${o}`).style("font-weight","normal"),n([],"mouseout"),t.services.events.dispatchEvent(T.Alluvial.NODE_MOUSEOUT,{event:r,element:s,datum:i}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:s})})}traverse(t,n,r=[]){n[t.link].map(i=>(r.push(i.index),i[t.node])).forEach(i=>this.traverse(t,i,r))}getRightArrowIcon(){return`
61
+ </li>`).join("")+"</ul>"}isDate(t){return t instanceof Date}valueFormatter(t,n){const r=this.getOptions(),i=_(r,"tooltip","valueFormatter"),{code:a,number:s,date:o}=_(r,"locale");if(i)return i(t,n);if(this.isDate(t))return o(t,a,{month:"short",day:"numeric",year:"numeric"});try{if(typeof t=="string"&&/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(t)){const l=new Date(t);return o(l,a,{month:"short",day:"numeric",year:"numeric"})}}catch{}return s(t,a)}render(t=!1){const n=this.getOptions(),r=_(n,"tooltip","enabled");if(r){const i=U(this.services.domUtils.getHolder()),a=_(n,"style","prefix");this.tooltip=B.appendOrSelect(i,`div.${Ve}--${a}--tooltip`),this.tooltip.style("max-width",null).attr("role","tooltip"),this.isEventListenerAdded||(this.addTooltipEventListener(),this.isEventListenerAdded=!0),this.tooltip.classed("hidden",!0)}else!r&&this.isEventListenerAdded&&(this.removeTooltipEventListener(),this.isEventListenerAdded=!1)}addOffsetByPlacement(t,n,r){const i=Object.assign({},t);return n==pe.LEFT?i.left-=r:n==pe.RIGHT?i.left+=r:n==pe.TOP?i.top-=r:n==pe.BOTTOM&&(i.top+=r),i}positionTooltip(t){const n=this.services.domUtils.getHolder(),r=n.offsetWidth,i=n.offsetHeight,a=this.tooltip.node(),s=this.getOptions(),o=_(s,"zoomBar","top","enabled"),l=!!_(t,"detail","noWrap"),c=Array.isArray(_(t,"detail","placements")),u=c?_(t,"detail","placements"):[pe.RIGHT,pe.LEFT,pe.TOP,pe.BOTTOM];let d,{horizontalOffset:h}=Of;const{defaultOffset:p}=Of;if(this.tooltip.select("div.title-tooltip").classed("title-tooltip-nowrap",l),c){const m=_(t,"detail","event","target"),y=this.services.domUtils.getElementOffset(m,!0);d=this.positionService.findBestPlacementAt(y,a,u,()=>({top:0,left:0,width:r,height:i}));let g=this.positionService.findPosition(m,a,d,()=>this.services.domUtils.getElementOffset(m));g=this.addOffsetByPlacement(g,d,p),this.positionService.setElement(a,g);return}let f=_(t,"detail","mousePosition");if(!f)f=Xr(_(t,"detail","event"),n);else{const m=_(s,"zoomBar","top","type"),y=Xe.height[m];o&&(f[1]+=y+Xe.spacerHeight)}f[0]/r>.9?d=pe.LEFT:f[0]/r<.1?d=pe.RIGHT:d=this.positionService.findBestPlacementAt({left:f[0],top:f[1]},a,u,()=>({top:void 0,left:void 0,width:r,height:i})),d===pe.LEFT&&(h*=-1);const v=this.positionService.findPositionAt({left:f[0]+h,top:f[1]},a,d);this.positionService.setElement(a,v)}}const Nv=class Al extends Mt{constructor(){super(...arguments),this.type="grid-brush",this.renderType=ft.SVG,this.selectionSelector="rect.selection",this.frontSelectionSelector="rect.frontSelection"}render(t=!0){const n=this.parent,r=this.getComponentContainer({isPresentational:!0});if(!n)throw new Error("SVG was not defined");const i=B.appendOrSelect(n,"svg.chart-grid-backdrop"),a=B.appendOrSelect(i,`g.${this.type}`),s=B.appendOrSelect(a,this.selectionSelector),{width:o,height:l}=B.getSVGElementSize(i,{useAttrs:!0}),{cartesianScales:c}=this.services,u=c.getMainXScaleType(),d=c.getMainXScale(),[h]=d.range();r.attr("transform",`translate(${h},0)`);const p=B.appendOrSelect(r,this.frontSelectionSelector);if(d&&u===pt.TIME){let f=this.model.get("zoomDomain");f===void 0&&(f=this.services.zoom.getDefaultZoomBarDomain(),f&&this.model.set({zoomDomain:f},{animate:!1}));const v=T=>{const S=T[1]-T[0];let D="0,"+S.toString();const P=Math.floor(l/Al.DASH_LENGTH),I=P*Al.DASH_LENGTH;for(let N=0;N<P;N++)D+=","+Al.DASH_LENGTH;D+=","+(l-I),P%2===1&&(D+=",0"),D+=","+S.toString(),D+=","+l.toString(),p.attr("stroke-dasharray",D)},m=T=>{const S=T.selection;S===null||S[0]===S[1]||(p.attr("x",parseFloat(s.attr("x"))+parseFloat(i.attr("x"))).attr("y",s.attr("y")).attr("width",s.attr("width")).attr("height",s.attr("height")).style("cursor","pointer").style("display",null),v(S))},y=(T,S)=>{const D=bm().range([0,o]).domain(f);let P=[D.invert(T),D.invert(S)];P[0].valueOf()===P[1].valueOf()&&(P=this.services.zoom.getDefaultZoomBarDomain()),(f[0].valueOf()!==P[0].valueOf()||f[1].valueOf()!==P[1].valueOf())&&this.services.zoom.handleDomainChange(P)};let g;const x=T=>{const S=T.selection;S!==null&&(y(S[0],S[1]),a.call(g.move,null),p.style("display","none"))};l!=0&&o!=0&&(g=gg().extent([[0,0],[o-1,l]]).on("start brush end",m).on("end.brushed",x),a.call(g));const O=this.services.zoom.getZoomRatio();i.on("click",function(T){if(T.shiftKey){const S=this.services.domUtils.getHolder(),D=Xr(a.node(),S)[0];let P=D-o*O/2;P<0&&(P=0);let I=D+o*O/2;I>o&&(I=o),y(P,I)}})}}};Nv.DASH_LENGTH=4;let eD=Nv;class nD extends Mt{constructor(){super(...arguments),this.type="zoom-bar",this.renderType=ft.SVG,this.MIN_SELECTION_DIFF=9e-10,this.brushSelector="g.zoom-bar-brush",this.clipId="zoomBarClip-"+Math.floor(Math.random()*99999999999),this.brush=gg(),this.highlightStrokeWidth=1}init(){this.services.events.addEventListener(w.ZoomBar.UPDATE,this.render.bind(this));const t=_(this.getOptions(),"zoomBar",Z.TOP,"data");this.model.setZoomBarData(t)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"zoom bar"}),r=this.services.zoom.isZoomBarLoading(Z.TOP),i=this.services.zoom.isZoomBarLocked(Z.TOP),a=_(this.getOptions(),"zoomBar",Z.TOP,"type"),s=_(this.getOptions(),"axes",Z.BOTTOM,"highlights"),o=Xe.height[a],{width:l}=B.getSVGElementSize(this.parent,{useAttrs:!0});if(l===0)return;let c=0;const u=this.model.get("axesMargins");u&&u.left&&(c=u.left);const d=B.appendOrSelect(n,"svg.zoom-container").attr("width","100%").attr("height",o).attr("opacity",1);if(B.appendOrSelect(n,"rect.zoom-spacer").attr("x",0).attr("y",o).attr("width","100%").attr("height",Xe.spacerHeight).attr("opacity",1).attr("fill","none"),a===vn.GRAPH_VIEW?B.appendOrSelect(d,"rect.zoom-bg").attr("x",c).attr("y",0).attr("width",l-c).attr("height","100%").classed("zoom-bg-skeleton",r).style("stroke",r?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null):a===vn.SLIDER_VIEW&&B.appendOrSelect(d,"rect.zoom-slider-bg").attr("x",c).attr("y",o/2-1).attr("width",l-c).attr("height",2).classed("zoom-slider-bg-skeleton",r).style("stroke",r?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null),r){this.renderSkeleton(d,c,l);return}const{cartesianScales:h}=this.services,p=h.getMainXScale(),f=h.getMainYScale(),v=h.getMainXScaleType();if(p&&v===pt.TIME){let m=this.services.zoom.getZoomBarData();if(_n(m)||m.length===1)return;this.xScale=p.copy(),this.yScale=f.copy();const y=this.services.zoom.getDefaultZoomBarDomain(m);m=this.compensateDataForDefaultDomain(m,y);const g=this.model.get("initialZoomDomain"),x=_(this.getOptions(),"zoomBar",Z.TOP,"initialZoomDomain");x&&x[0]&&x[1]&&(x[0]=new Date(x[0]),x[1]=new Date(x[1])),x&&!(g&&g[0].valueOf()===x[0].valueOf()&&g[1].valueOf()===x[1].valueOf())?this.model.set({initialZoomDomain:yt([],x),zoomDomain:x?yt([],x):y},{skipUpdate:!0}):x===null&&g!==null&&this.model.set({initialZoomDomain:null,zoomDomain:yt([],y)},{skipUpdate:!0}),this.xScale.range([c,l]).domain(y),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,o-6]).domain(xn(m,S=>S.value));const O=this.model.get("zoomDomain");if(a===vn.GRAPH_VIEW&&(this.renderZoomBarArea(d,"path.zoom-graph-area-unselected",m,null),this.updateClipPath(n,this.clipId,0,0,0,0),this.renderZoomBarArea(d,"path.zoom-graph-area",m,this.clipId),this.renderZoomBarBaseline(d,c,l),s)){const S=s.highlightStartMapsTo,D=s.highlightEndMapsTo,P=s.color,I=s.labelMapsTo;s.data.forEach((N,M)=>{B.appendOrSelect(d,`rect.highlight-${M}`).attr("height",o-2*this.highlightStrokeWidth).attr("y",this.highlightStrokeWidth).attr("x",this.xScale(N[S])).attr("width",this.xScale(N[D])-this.xScale(N[S])).style("fill",P&&P.scale[N[I]]?P.scale[N[I]]:null).style("fill-opacity",.1).style("stroke",P&&P.scale[N[I]]?P.scale[N[I]]:null).style("stroke-dasharray","2, 2").attr("stroke-width","1px")})}this.addBrushEventListener(O,c,l);const T=B.appendOrSelect(n,this.brushSelector).call(this.brush);if(O!==void 0)if(O[0].valueOf()===O[1].valueOf())T.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getComponentContainer(),this.xScale.range());else{const S=O.map(D=>this.xScale(D));S[1]-S[0]<this.MIN_SELECTION_DIFF||(T.call(this.brush.move,S),this.updateBrushHandle(this.getComponentContainer(),S))}i&&(this.brush.filter(()=>!1),T.selectAll("rect").attr("cursor","auto"))}}addBrushEventListener(t,n,r){const i=o=>{const l=o.selection;l===null?this.handleBrushedEvent(o,t,this.xScale,this.xScale.range()):l[0]===l[1]||this.handleBrushedEvent(o,t,this.xScale,l)},a=_(this.getOptions(),"zoomBar",Z.TOP,"type"),s=Xe.height[a];this.brush.extent([[n,0],[r,s]]).on("start brush end",null).on("start brush end",i)}handleBrushedEvent(t,n,r,i){const a=[r.invert(i[0]),r.invert(i[1])];if(this.updateBrushHandle(this.getComponentContainer(),i),t.sourceEvent!=null&&(t.sourceEvent.type==="mousemove"||t.sourceEvent.type==="mouseup"||t.sourceEvent.type==="mousedown"||t.sourceEvent.type==="touchstart"||t.sourceEvent.type==="touchmove"||t.sourceEvent.type==="touchend")){(n===void 0||n[0]!==a[0]||n[1]!==a[1])&&this.services.zoom.handleDomainChange(a,{dispatchEvent:!1});let s;t.type==="start"?s=w.ZoomBar.SELECTION_START:t.type==="brush"?s=w.ZoomBar.SELECTION_IN_PROGRESS:t.type==="end"&&(s=w.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(w.ZoomDomain.CHANGE,{newDomain:a})),this.services.events.dispatchEvent(s,{selection:i,newDomain:a})}}updateBrushHandle(t,n){const r=this,i=Xe.handleWidth,a=_(this.getOptions(),"zoomBar",Z.TOP,"type"),s=Xe.height[a],o=-i/2,l=Xe.handleBarWidth,c=a===vn.GRAPH_VIEW?Xe.handleBarHeight:6,u=-l/2,d=(s-c)/2;t.select(this.brushSelector).selectAll("rect.handle").data([{type:"w"},{type:"e"}]).attr("x",function(p){if(p.type==="w")return Math.max(n[0]+o,r.maxSelectionRange[0]);if(p.type==="e")return Math.min(n[1]+o,r.maxSelectionRange[1]-i)}).attr("y",0).attr("width",i).attr("height",s).attr("cursor","ew-resize").style("display",null);const h=t.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]);h.enter().append("rect").attr("class",function(p){return"handle-bar handle-bar--"+p.type}),h.attr("x",function(p){if(p.type==="w")return Math.max(n[0]+u,r.maxSelectionRange[0]-o+u);if(p.type==="e")return Math.min(n[1]+u,r.maxSelectionRange[1]+o+u)}).attr("y",d).attr("width",l).attr("height",c).attr("cursor","ew-resize"),a===vn.SLIDER_VIEW&&this.updateSliderSelectedArea(n),this.updateClipPath(t,this.clipId,n[0],0,n[1]-n[0],s)}updateSliderSelectedArea(t){const n=_(this.getOptions(),"zoomBar",Z.TOP,"type"),r=Xe.height[n],i=this.getComponentContainer().select("svg.zoom-container");B.appendOrSelect(i,"rect.zoom-slider-selected-area").attr("x",t[0]).attr("y",r/2-1).attr("width",t[1]-t[0]).attr("height",2)}renderZoomBarArea(t,n,r,i){const{cartesianScales:a}=this.services,s=a.getMainXAxisPosition(),o=a.getMainYAxisPosition(),l=a.getMainXScaleType(),c=a.getMainYScaleType(),u=(y,g,x)=>O=>a.getValueFromScale(y,g,x,O),d=u(this.xScale,l,s),h=u(this.yScale,c,o),p=_(this.getOptions(),"zoomBar",Z.TOP,"type"),f=Xe.height[p],v=sh().x(y=>d(y)).y0(f).y1(y=>f-h(y)),m=B.appendOrSelect(t,n).datum(r).attr("d",v);i&&m.attr("clip-path",`url(#${i})`)}updateClipPath(t,n,r,i,a,s){const o=B.appendOrSelect(t,"clipPath").attr("id",n);B.appendOrSelect(o,"rect").attr("x",r).attr("y",i).attr("width",a).attr("height",s)}compensateDataForDefaultDomain(t,n){if(!t||t.length<2)return;const r=Qn(t),i=this.services.cartesianScales.getDomainIdentifier(),a=this.services.cartesianScales.getRangeIdentifier();if(Number(n[0])<Number(r[0][i])){const s={};s[i]=n[0],s[a]=0,r.unshift(s)}if(Number(n[1])>Number(r[r.length-1][i])){const s={};s[i]=n[1],s[a]=0,r.push(s)}return r}renderZoomBarBaseline(t,n,r,i=!1){const a=_(this.model.getOptions(),"zoomBar",Z.TOP,"type"),s=Xe.height[a],o=vs()([[n,s],[r,s]]);B.appendOrSelect(t,"path.zoom-bg-baseline").attr("d",o).classed("zoom-bg-baseline-skeleton",i).style("stroke",i?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}renderSkeleton(t,n,r){this.renderZoomBarArea(t,"path.zoom-graph-area-unselected",[],null),this.renderZoomBarArea(t,"path.zoom-graph-area",[],this.clipId),this.brush.on("start brush end",null),B.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),_(this.getOptions(),"zoomBar",Z.TOP,"type")===vn.GRAPH_VIEW&&this.renderZoomBarBaseline(t,n,r,!0)}destroy(){this.brush.on("start brush end",null),this.services.events.removeEventListener(w.ZoomBar.UPDATE,this.render.bind(this))}}class rD extends Mt{constructor(t,n){super(t,n),this.type="threshold",this.renderType=ft.SVG,this.positionService=new hl}render(t=!1){const n=_(this.getOptions(),"axes"),r=[];Object.keys(n).forEach(c=>{if(Object.values(Z).includes(c)){const u=n[c];u.thresholds&&u.thresholds.length>0&&r.push({axisPosition:c,thresholds:u.thresholds,correspondingDatasets:u==null?void 0:u.correspondingDatasets,mapsTo:u==null?void 0:u.mapsTo})}});const i=this.getComponentContainer({ariaLabel:"threshold lines",withinChartClip:!0}).selectAll("g.axis-thresholds").data(r,c=>c.axisPosition);i.exit().attr("opacity",0).remove();const a=i.enter().append("g").merge(i);a.attr("class",c=>`axis-thresholds ${c.axisPosition}`);const s=a.selectAll("g.threshold-group").data(c=>c.thresholds.map(u=>(u.axisPosition=c.axisPosition,u.datum=this.constructDatumObj(c,u),u)));s.exit().attr("opacity",0).remove();const o=s.enter().append("g");o.append("line").attr("class","threshold-line"),o.append("rect").attr("class","threshold-hoverable-area"),o.merge(s).attr("class","threshold-group");const l=this;a.each(function({axisPosition:c}){const u=l.services.cartesianScales.getScaleByPosition(c),d=l.services.cartesianScales.getScaleTypeByPosition(c);let h=null,p=null;c===Z.LEFT||c===Z.RIGHT?(p=u,h=l.services.cartesianScales.getMainXScale()):(h=u,p=l.services.cartesianScales.getMainYScale());const f=d===pt.LABELS,[v,m]=h.range(),[y,g]=p.range(),{cartesianScales:x}=l.services,O=x.getOrientation(),T=N=>x.getDomainValue(N),S=N=>x.getRangeValue(N),[D,P]=ar(T,S,O),I=U(this);c===Z.TOP||c===Z.BOTTOM?(I.selectAll("line.threshold-line").transition().call(N=>l.services.transitions.setupTransition({transition:N,name:"threshold-line-update",animate:t})).attr("y1",g).attr("y2",y).attr("x1",({datum:N})=>D(N)+(f?u.step()/2:0)).attr("x2",({datum:N})=>D(N)+(f?u.step()/2:0)).style("stroke",({fillColor:N})=>N),I.selectAll("rect.threshold-hoverable-area").attr("x",0).attr("y",({datum:N})=>-D(N)).attr("width",Math.abs(y-g)).classed("rotate",!0)):(I.selectAll("line.threshold-line").transition().call(N=>l.services.transitions.setupTransition({transition:N,name:"threshold-line-update",animate:t})).attr("x1",v).attr("x2",m).attr("y1",({datum:N})=>P(N)+(f?u.step()/2:0)).attr("y2",({datum:N})=>P(N)+(f?u.step()/2:0)).style("stroke",({fillColor:N})=>N),I.selectAll("rect.threshold-hoverable-area").attr("x",v).attr("y",({datum:N})=>P(N)).attr("width",Math.abs(m-v)).classed("rotate",!1))}),this.services.events.addEventListener(w.Threshold.SHOW,c=>{this.setThresholdLabelPosition(c.detail),this.label.classed("hidden",!1)}),this.services.events.addEventListener(w.Threshold.HIDE,()=>{this.label.classed("hidden",!0)}),this.appendThresholdLabel(),this.addEventListeners()}getFormattedValue(t){const{value:n,axisPosition:r}=t,i=this.getOptions(),a=this.services.cartesianScales.getScaleTypeByPosition(r),{code:s,number:o}=_(i,"locale");if(a===pt.TIME){const l=[Z.LEFT,Z.RIGHT].includes(r),c=this.services.cartesianScales.getMainXScale(),u=this.services.cartesianScales.getMainYScale(),d=l?u:c,h=_(i,"timeScale"),p=Qc(d.ticks(),_(h,"timeInterval"));return Kc(n,0,d.ticks(),p,h,i.locale)}return o(n,s)}appendThresholdLabel(){const t=U(this.services.domUtils.getHolder()),n=_(this.getOptions(),"style","prefix");this.label=B.appendOrSelect(t,`div.${Ve}--${n}--threshold--label`).classed("hidden",!0)}setThresholdLabelPosition({event:t,datum:n}){const r=this.services.domUtils.getHolder(),i=Xr(t,r),a=n.valueFormatter?n.valueFormatter(n.value):this.getFormattedValue(n);this.label.html(Gn(`${n.label||"Threshold"}: ${a}`)).style("background-color",n.fillColor);const s=this.label.node(),o=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},s,[pe.RIGHT,pe.LEFT,pe.TOP,pe.BOTTOM],()=>({top:void 0,left:void 0,width:r.offsetWidth,height:r.offsetHeight})),l=this.positionService.findPositionAt({left:i[0],top:i[1]},s,o);this.positionService.setElement(s,l)}constructDatumObj(t,n){const r={};return t.correspondingDatasets&&(r.group=_(t,"correspondingDatasets",0)),r[t.mapsTo]=n.value,r}addEventListeners(){const t=this;this.getComponentContainer({withinChartClip:!0}).selectAll("rect.threshold-hoverable-area").on("mouseover mousemove",function(n){U(this.parentNode).select("line.threshold-line").classed("active",!0),t.services.events.dispatchEvent(w.Threshold.SHOW,{event:n,hoveredElement:U(this),datum:U(this).datum()})}).on("mouseout",function(n){U(this.parentNode).select("line.threshold-line").classed("active",!1),t.services.events.dispatchEvent(w.Threshold.HIDE,{event:n,hoveredElement:U(this),datum:U(this).datum()})})}}class iD extends Mt{constructor(t,n){super(t,n),this.type="highlight",this.renderType=ft.SVG,this.positionService=new hl,this.highlightStrokeWidth=1}render(t=!1){const n=_(this.getOptions(),"axes"),r=[];Object.keys(n).forEach(c=>{if(Object.values(Z).includes(c)){const u=n[c];u.highlights&&u.highlights.data.length>0&&r.push({axisPosition:c,highlightStartMapsTo:u.highlights.highlightStartMapsTo,highlightEndMapsTo:u.highlights.highlightEndMapsTo,labelMapsTo:u.highlights.labelMapsTo,highlight:u.highlights.data,color:u.highlights.color})}});const i=this.getComponentContainer({ariaLabel:"highlight areas",withinChartClip:!0}).selectAll("g.axis-highlight").data(r,c=>c.axisPosition);i.exit().attr("opacity",0).remove();const a=i.enter().append("g").merge(i);a.attr("class",c=>`axis-highlight ${c.axisPosition}`);const s=a.selectAll("g.highlight-group").data(c=>c.highlight.map(u=>(u.axisPosition=c.axisPosition,u.highlightStartMapsTo=c.highlightStartMapsTo,u.labelMapsTo=c.labelMapsTo,u.color=c.color,u.highlightEndMapsTo=c.highlightEndMapsTo,u)));s.exit().attr("opacity",0).remove();const o=s.enter().append("g");o.append("rect").attr("class","highlight-bar"),o.append("line").attr("class","highlight-line"),o.merge(s).attr("class","highlight-group");const l=this;a.each(function({axisPosition:c}){const u=l.services.cartesianScales.getMainXScale(),d=l.services.cartesianScales.getMainYScale(),[h,p]=u.range(),[f,v]=d.range(),{cartesianScales:m}=l.services,y=m.getOrientation(),g=D=>m.getDomainValue(D),x=D=>m.getRangeValue(D),[O,T]=ar(g,x,y),S=U(this);c===Z.TOP||c===Z.BOTTOM?S.selectAll("rect.highlight-bar").transition().call(D=>l.services.transitions.setupTransition({transition:D,name:"highlight-bar-update",animate:t})).attr("y",Math.max(v+l.highlightStrokeWidth,0)).attr("height",Math.max(f-2*l.highlightStrokeWidth,0)).attr("x",({highlightStartMapsTo:D,...P})=>O(P[D])).attr("width",({highlightStartMapsTo:D,highlightEndMapsTo:P,...I})=>Math.max(O(I[P])-O(I[D]),0)).style("stroke",({color:D,labelMapsTo:P,...I})=>D&&D.scale[I[P]]?D.scale[I[P]]:null).style("stroke-dasharray","2, 2").attr("stroke-width",l.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",({color:D,labelMapsTo:P,...I})=>D&&D.scale[I[P]]?D.scale[I[P]]:null):S.selectAll("rect.highlight-bar").transition().call(D=>l.services.transitions.setupTransition({transition:D,name:"highlight-bar-update",animate:t})).attr("x",h).attr("width",Math.max(p-h,0)).attr("y",({highlightEndMapsTo:D,...P})=>T(P[D])).attr("height",({highlightStartMapsTo:D,highlightEndMapsTo:P,...I})=>Math.max(T(I[D])-T(I[P]),0)).style("stroke",({color:D,labelMapsTo:P,...I})=>D&&D.scale[I[P]]?D.scale[I[P]]:null).style("stroke-dasharray","2, 2").attr("stroke-width",l.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",({color:D,labelMapsTo:P,...I})=>D&&D.scale[I[P]]?D.scale[I[P]]:null)})}}class Pv extends gh{getItems(t){if(t.detail.items)return t.detail.items;const{data:n}=t.detail;if(!n||!n.length||!n[0])return[];const r=this.getOptions(),{cartesianScales:i}=this.services,a=i.getDomainIdentifier(),s=i.isDualAxes(),{groupMapsTo:o}=r.data,l=i.getDomainLabel();let c=i.getRangeLabel();const u=n[0][a];let d;if(n.length===1){const h=n[0],p=i.getRangeIdentifier(h);if(s){const v=i.getRangeAxisPosition({datum:h,groups:[h[o]]});c=i.getScaleLabel(v)}const f=h[p];d=[{label:l,value:u},...Array.isArray(f)&&f.length===2?[{label:"Start",value:f[0]},{label:"End",value:f[1]}]:[{label:c,value:h[p]}]],t.detail.additionalItems&&t.detail.additionalItems.forEach(v=>d.push({label:v.label,value:v.value})),d.push({label:kt(r,"locale.translations.group")||kt(r,"tooltip.groupLabel"),value:h[o],color:this.model.getFillColor(h[o]),class:this.model.getColorClassName({classNameTypes:[mt.TOOLTIP],dataGroupName:h[o]})})}else if(n.length>1&&(d=[{label:l,value:u}],d=d.concat(n.map(h=>{const p=h[i.getRangeIdentifier(h)];return{label:h[o],value:Array.isArray(p)&&p.length===2?`${p[0]} - ${p[1]}`:p,color:this.model.getFillColor(h[o]),class:this.model.getColorClassName({classNameTypes:[mt.TOOLTIP],dataGroupName:h[o]})}}).sort((h,p)=>p.value-h.value)),!s&&_(r,"tooltip","showTotal")===!0)){const h=i.getRangeIdentifier();d.push({label:kt(r,"locale.translations.total")||kt(r,"tooltip.totalLabel")||"Total",value:n.reduce((p,f)=>p+f[h],0),bold:!0})}return d}}function Uv(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function aD(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function vh(e,t){let n=0;if(t===void 0)for(let r of e)(r=+r)&&(n+=r);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function sD(e){return e.depth}function oD(e,t){return t-1-e.height}function Bv(e,t){return e.sourceLinks.length?e.depth:t-1}function dl(e){return function(){return e}}function Hv(e,t){return pl(e.source,t.source)||e.index-t.index}function Vv(e,t){return pl(e.target,t.target)||e.index-t.index}function pl(e,t){return e.y0-t.y0}function yh(e){return e.value}function lD(e){return e.index}function cD(e){return e.nodes}function uD(e){return e.links}function Fv(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function Gv({nodes:e}){for(const t of e){let n=t.y0,r=n;for(const i of t.sourceLinks)i.y0=n+i.width/2,n+=i.width;for(const i of t.targetLinks)i.y1=r+i.width/2,r+=i.width}}function hD(){let e=0,t=0,n=1,r=1,i=24,a=8,s,o=lD,l=Bv,c,u,d=cD,h=uD,p=6;function f(){const E={nodes:d.apply(null,arguments),links:h.apply(null,arguments)};return v(E),m(E),y(E),g(E),T(E),Gv(E),E}f.update=function(E){return Gv(E),E},f.nodeId=function(E){return arguments.length?(o=typeof E=="function"?E:dl(E),f):o},f.nodeAlign=function(E){return arguments.length?(l=typeof E=="function"?E:dl(E),f):l},f.nodeSort=function(E){return arguments.length?(c=E,f):c},f.nodeWidth=function(E){return arguments.length?(i=+E,f):i},f.nodePadding=function(E){return arguments.length?(a=s=+E,f):a},f.nodes=function(E){return arguments.length?(d=typeof E=="function"?E:dl(E),f):d},f.links=function(E){return arguments.length?(h=typeof E=="function"?E:dl(E),f):h},f.linkSort=function(E){return arguments.length?(u=E,f):u},f.size=function(E){return arguments.length?(e=t=0,n=+E[0],r=+E[1],f):[n-e,r-t]},f.extent=function(E){return arguments.length?(e=+E[0][0],n=+E[1][0],t=+E[0][1],r=+E[1][1],f):[[e,t],[n,r]]},f.iterations=function(E){return arguments.length?(p=+E,f):p};function v({nodes:E,links:L}){for(const[V,F]of E.entries())F.index=V,F.sourceLinks=[],F.targetLinks=[];const $=new Map(E.map((V,F)=>[o(V,F,E),V]));for(const[V,F]of L.entries()){F.index=V;let{source:rt,target:A}=F;typeof rt!="object"&&(rt=F.source=Fv($,rt)),typeof A!="object"&&(A=F.target=Fv($,A)),rt.sourceLinks.push(F),A.targetLinks.push(F)}if(u!=null)for(const{sourceLinks:V,targetLinks:F}of E)V.sort(u),F.sort(u)}function m({nodes:E}){for(const L of E)L.value=L.fixedValue===void 0?Math.max(vh(L.sourceLinks,yh),vh(L.targetLinks,yh)):L.fixedValue}function y({nodes:E}){const L=E.length;let $=new Set(E),V=new Set,F=0;for(;$.size;){for(const rt of $){rt.depth=F;for(const{target:A}of rt.sourceLinks)V.add(A)}if(++F>L)throw new Error("circular link");$=V,V=new Set}}function g({nodes:E}){const L=E.length;let $=new Set(E),V=new Set,F=0;for(;$.size;){for(const rt of $){rt.height=F;for(const{source:A}of rt.targetLinks)V.add(A)}if(++F>L)throw new Error("circular link");$=V,V=new Set}}function x({nodes:E}){const L=Uv(E,F=>F.depth)+1,$=(n-e-i)/(L-1),V=new Array(L);for(const F of E){const rt=Math.max(0,Math.min(L-1,Math.floor(l.call(null,F,L))));F.layer=rt,F.x0=e+rt*$,F.x1=F.x0+i,V[rt]?V[rt].push(F):V[rt]=[F]}if(c)for(const F of V)F.sort(c);return V}function O(E){const L=aD(E,$=>(r-t-($.length-1)*s)/vh($,yh));for(const $ of E){let V=t;for(const F of $){F.y0=V,F.y1=V+F.value*L,V=F.y1+s;for(const rt of F.sourceLinks)rt.width=rt.value*L}V=(r-V+s)/($.length+1);for(let F=0;F<$.length;++F){const rt=$[F];rt.y0+=V*(F+1),rt.y1+=V*(F+1)}q($)}}function T(E){const L=x(E);s=Math.min(a,(r-t)/(Uv(L,$=>$.length)-1)),O(L);for(let $=0;$<p;++$){const V=Math.pow(.99,$),F=Math.max(1-V,($+1)/p);D(L,V,F),S(L,V,F)}}function S(E,L,$){for(let V=1,F=E.length;V<F;++V){const rt=E[V];for(const A of rt){let j=0,et=0;for(const{source:it,value:J}of A.targetLinks){let at=J*(A.layer-it.layer);j+=H(it,A)*at,et+=at}if(!(et>0))continue;let ct=(j/et-A.y0)*L;A.y0+=ct,A.y1+=ct,M(A)}c===void 0&&rt.sort(pl),P(rt,$)}}function D(E,L,$){for(let V=E.length,F=V-2;F>=0;--F){const rt=E[F];for(const A of rt){let j=0,et=0;for(const{target:it,value:J}of A.sourceLinks){let at=J*(it.layer-A.layer);j+=G(A,it)*at,et+=at}if(!(et>0))continue;let ct=(j/et-A.y0)*L;A.y0+=ct,A.y1+=ct,M(A)}c===void 0&&rt.sort(pl),P(rt,$)}}function P(E,L){const $=E.length>>1,V=E[$];N(E,V.y0-s,$-1,L),I(E,V.y1+s,$+1,L),N(E,r,E.length-1,L),I(E,t,0,L)}function I(E,L,$,V){for(;$<E.length;++$){const F=E[$],rt=(L-F.y0)*V;rt>1e-6&&(F.y0+=rt,F.y1+=rt),L=F.y1+s}}function N(E,L,$,V){for(;$>=0;--$){const F=E[$],rt=(F.y1-L)*V;rt>1e-6&&(F.y0-=rt,F.y1-=rt),L=F.y0-s}}function M({sourceLinks:E,targetLinks:L}){if(u===void 0){for(const{source:{sourceLinks:$}}of L)$.sort(Vv);for(const{target:{targetLinks:$}}of E)$.sort(Hv)}}function q(E){if(u===void 0)for(const{sourceLinks:L,targetLinks:$}of E)L.sort(Vv),$.sort(Hv)}function H(E,L){let $=E.y0-(E.sourceLinks.length-1)*s/2;for(const{target:V,width:F}of E.sourceLinks){if(V===L)break;$+=F+s}for(const{source:V,width:F}of L.targetLinks){if(V===E)break;$-=F}return $}function G(E,L){let $=L.y0-(L.targetLinks.length-1)*s/2;for(const{source:V,width:F}of L.targetLinks){if(V===E)break;$+=F+s}for(const{target:V,width:F}of E.sourceLinks){if(V===L)break;$-=F}return $}return f}var bh=Math.PI,_h=2*bh,pi=1e-6,dD=_h-pi;function xh(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function zv(){return new xh}xh.prototype=zv.prototype={constructor:xh,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,a){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var a=this._x1,s=this._y1,o=n-e,l=r-t,c=a-e,u=s-t,d=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>pi)if(!(Math.abs(u*o-l*c)>pi)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var h=n-a,p=r-s,f=o*o+l*l,v=h*h+p*p,m=Math.sqrt(f),y=Math.sqrt(d),g=i*Math.tan((bh-Math.acos((f+d-v)/(2*m*y)))/2),x=g/y,O=g/m;Math.abs(x-1)>pi&&(this._+="L"+(e+x*c)+","+(t+x*u)),this._+="A"+i+","+i+",0,0,"+ +(u*h>c*p)+","+(this._x1=e+O*o)+","+(this._y1=t+O*l)}},arc:function(e,t,n,r,i,a){e=+e,t=+t,n=+n,a=!!a;var s=n*Math.cos(r),o=n*Math.sin(r),l=e+s,c=t+o,u=1^a,d=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+l+","+c:(Math.abs(this._x1-l)>pi||Math.abs(this._y1-c)>pi)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%_h+_h),d>dD?this._+="A"+n+","+n+",0,1,"+u+","+(e-s)+","+(t-o)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>pi&&(this._+="A"+n+","+n+",0,"+ +(d>=bh)+","+u+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function jv(e){return function(){return e}}function pD(e){return e[0]}function fD(e){return e[1]}var mD=Array.prototype.slice;function gD(e){return e.source}function vD(e){return e.target}function yD(e){var t=gD,n=vD,r=pD,i=fD,a=null;function s(){var o,l=mD.call(arguments),c=t.apply(this,l),u=n.apply(this,l);if(a||(a=o=zv()),e(a,+r.apply(this,(l[0]=c,l)),+i.apply(this,l),+r.apply(this,(l[0]=u,l)),+i.apply(this,l)),o)return a=null,o+""||null}return s.source=function(o){return arguments.length?(t=o,s):t},s.target=function(o){return arguments.length?(n=o,s):n},s.x=function(o){return arguments.length?(r=typeof o=="function"?o:jv(+o),s):r},s.y=function(o){return arguments.length?(i=typeof o=="function"?o:jv(+o),s):i},s.context=function(o){return arguments.length?(a=o??null,s):a},s}function bD(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function _D(){return yD(bD)}function xD(e){return[e.source.x1,e.y0]}function ED(e){return[e.target.x0,e.y1]}function TD(){return _D().source(xD).target(ED)}class OD extends Mt{constructor(){super(...arguments),this.type="alluvial",this.renderType=ft.SVG,this.gradient_id="gradient-id-"+Math.floor(Math.random()*99999999999)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"alluvial graphs",withinChartClip:!0});n.html("");const{width:r,height:i}=B.getSVGElementSize(n,{useAttrs:!0});if(r<1||i<1)return;const a=this.model.getOptions(),s=this.model.getDisplayData(),o=_(this.getOptions(),"color","gradient","enabled");let l=Sn.minNodePadding;a.alluvial.nodePadding>Sn.minNodePadding&&(l=a.alluvial.nodePadding);const c=_(a,"alluvial","nodeAlignment");let u=Bv;c===me.LEFT?u=sD:c===me.RIGHT&&(u=oD);const d=hD().nodeId(g=>g.name).nodeWidth(Sn.nodeWidth).nodePadding(l).nodeAlign(u).extent([[2,30],[r-2,i]]);this.graph=d({nodes:a.alluvial.nodes.map(g=>Object.assign({},g)),links:s.map(g=>Object.assign({},g))}),this.graph.nodes=this.graph.nodes.filter(g=>g.value!==0);const h={};this.graph.nodes.forEach(g=>{const x=g.x0;g.category&&(h[x]=g==null?void 0:g.category)}),n.append("g").classed("header-arrows",!0).selectAll("g").data(Object.keys(h)).join("g").attr("transform",g=>`translate(${g}, 0)`).append("text").attr("id",(g,x)=>this.services.domUtils.generateElementIDString(`alluvial-category-${x}`)).style("font-size","14px").text(g=>h[g]?h[g]:"").attr("y",20).attr("x",(g,x)=>{const O=this.services.domUtils.generateElementIDString(`alluvial-category-${x}`),{width:T}=B.getSVGElementSize(U(`text#${O}`),{useBBox:!0});let S=0;return g+S>=T&&(S=-T+4),S});const p=n.append("g").attr("fill","none").selectAll("g").data(this.graph.links);if(p.exit().remove(),o){const g=_(this.getOptions(),"color","scale");g&&p.enter().append("linearGradient").attr("id",x=>`${this.gradient_id}-link-${x.index}`).attr("gradientUnits","userSpaceOnUse").call(x=>x.append("stop").attr("offset","0%").attr("stop-color",O=>g[O.source.name])).call(x=>x.append("stop").attr("offset","100%").attr("stop-color",O=>g[O.target.name])),p.exit().remove()}p.enter().append("path").classed("link",!0).attr("d",TD()).attr("id",g=>this.services.domUtils.generateElementIDString(`alluvial-line-${g.index}`)).attr("class",g=>a.alluvial.monochrome?this.model.getColorClassName({classNameTypes:[mt.STROKE],dataGroupName:0,originalClassName:"link"}):this.model.getColorClassName({classNameTypes:[mt.STROKE],dataGroupName:g.source.index,originalClassName:"link"})).style("stroke",g=>o?`url(#${this.gradient_id}-link-${g.index})`:this.model.getFillColor(g.source.name,null,{...g,source:g.source.name,target:g.target.name})).attr("stroke-width",g=>Math.max(1,g.width)).style("stroke-opacity",Sn.opacity.default).attr("aria-label",g=>`${g.source.name} → ${g.target.name} (${g.value}${a.alluvial.units?" "+a.alluvial.units:""})`);const f=n.append("g").selectAll("g").data(this.graph.nodes).enter().append("g").attr("id",g=>this.services.domUtils.generateElementIDString(`alluvial-node-${g.index}`)).classed("node-group",!0).attr("transform",g=>`translate(${g.x0}, ${g.y0})`);f.append("rect").classed("node",!0).attr("height",g=>g.y1-g.y0).attr("width",g=>g.x1-g.x0).attr("fill","black");const v=f.append("g").attr("id",g=>this.services.domUtils.generateElementIDString(`alluvial-node-title-${g.index}`)),{code:m,number:y}=_(a,"locale");v.append("text").attr("id",g=>this.services.domUtils.generateElementIDString(`alluvial-node-text-${g.index}`)).attr("class","node-text").style("font-size","12px").attr("text-anchor","start").attr("fill","white").attr("x",4).attr("dy",13).text(g=>`${g.name} (${y(g.value,m)})`).attr("aria-label",g=>`${g.name} (${g.value})`),v.append("rect").classed("node-text-bg",!0).attr("width",(g,x)=>{const O=this.services.domUtils.generateElementIDString(`alluvial-node-text-${x}`),{width:T}=B.getSVGElementSize(U(`text#${O}`),{useBBox:!0});return T+8}).attr("height",18).attr("stroke-width",2).lower(),v.attr("transform",(g,x)=>{const O=this.services.domUtils.generateElementIDString(`alluvial-node-text-${x}`),{width:T}=B.getSVGElementSize(U(`text#${O}`),{useBBox:!0}),S=(g.y1-g.y0)/2-9;let D=g.x1-g.x0;return g.x1>=T?D=D-(T+16):D+=4,`translate(${D}, ${S})`}),this.addLineEventListener(),this.addNodeEventListener()}addLineEventListener(){const t=this.getOptions(),n=this,{number:r,code:i}=_(this.getOptions(),"locale"),a=xo((s,o="mouseover")=>{const l=n.parent.selectAll("path.link").transition().call(c=>n.services.transitions.setupTransition({transition:c,name:"alluvial-links-mouse-highlight"}));o==="mouseout"?(U(s).lower(),l.style("stroke-opacity",Sn.opacity.default)):l.style("stroke-opacity",function(){return s===this?(U(this).raise(),Sn.opacity.selected):Sn.opacity.unfocus})},33);this.parent.selectAll("path.link").on("mouseover",function(s,o){const l=U(this);a(this,"mouseover"),l.classed("link-hovered",!0);const c=getComputedStyle(this).getPropertyValue("stroke");n.services.events.dispatchEvent(w.Alluvial.LINE_MOUSEOVER,{event:s,element:l,datum:o}),n.services.events.dispatchEvent(w.Tooltip.SHOW,{event:s,hoveredElement:l,items:[{label:o.target.name,value:(r(o.value,i)?`${r(o.value,i)}`:"-")+(t.alluvial.units?` ${t.alluvial.units}`:""),color:c,labelIcon:n.getRightArrowIcon()}]})}).on("mousemove",function(s,o){n.services.events.dispatchEvent(w.Alluvial.LINE_MOUSEMOVE,{event:s,element:U(this),datum:o}),n.services.events.dispatchEvent(w.Tooltip.MOVE,{event:s})}).on("click",function(s,o){n.services.events.dispatchEvent(w.Alluvial.LINE_CLICK,{event:s,element:U(this),datum:o})}).on("mouseout",function(s,o){const l=U(this);a(this,"mouseout"),l.classed("link-hovered",!1),n.services.events.dispatchEvent(w.Alluvial.LINE_MOUSEOUT,{event:s,element:l,datum:o}),n.services.events.dispatchEvent(w.Tooltip.HIDE,{event:s,hoveredElement:l})})}addNodeEventListener(){const t=this,n=xo((r=[],i="mouseover")=>{if(i==="mouseout"||r.length===0){t.parent.selectAll("path.link").classed("link-hovered",!1).data(this.graph.links,a=>a.index).order().style("stroke-opacity",Sn.opacity.default);return}t.parent.selectAll("path.link").transition().call(a=>this.services.transitions.setupTransition({transition:a,name:"alluvial-link-mouse-highlight"})).style("stroke-opacity",function(a){return r.some(s=>s===a.index)?(U(this).classed("link-hovered",!0).raise(),Sn.opacity.selected):Sn.opacity.unfocus})},66);t.parent.selectAll(".node-group").on("mouseover",function(r,i){const a=U(this),s=[];if(t.traverse({link:"sourceLinks",node:"target"},i,s),t.traverse({link:"targetLinks",node:"source"},i,s),s.length){const o=ja(a.attr("transform"));if(a.attr("transform",`translate(${o.x-2}, ${o.y})`),a.classed("node-hovered",!0).selectAll("rect.node").attr("width",8),i.x0-2===0){const c=t.services.domUtils.generateElementIDString(`alluvial-node-title-${i.index}`),u=t.parent.select(`g#${c}`),d=ja(u.attr("transform"));u.attr("transform",`translate(${d.x+4},${d.y})`)}const l=t.services.domUtils.generateElementIDString(`alluvial-node-text-${i.index}`);t.parent.select(`text#${l}`).style("font-weight","bold"),n(s,"mouseover"),t.services.events.dispatchEvent(w.Alluvial.NODE_MOUSEOVER,{event:r,element:a,datum:i})}}).on("mousemove",function(r,i){t.services.events.dispatchEvent(w.Alluvial.NODE_MOUSEMOVE,{event:r,element:U(this),datum:i}),t.services.events.dispatchEvent(w.Tooltip.MOVE,{event:r})}).on("click",function(r,i){t.services.events.dispatchEvent(w.Alluvial.NODE_CLICK,{event:r,element:U(this),datum:i})}).on("mouseout",function(r,i){const a=U(this),s=ja(a.attr("transform"));if(a.classed("node-hovered",!1).attr("transform",`translate(${s.x+2}, ${s.y})`).select("rect.node").attr("width",Sn.nodeWidth),i.x0-2===0){const l=t.services.domUtils.generateElementIDString(`alluvial-node-title-${i.index}`),c=t.parent.select(`g#${l}`),u=ja(c.attr("transform"));c.attr("transform",`translate(${u.x-4},${u.y})`)}const o=t.services.domUtils.generateElementIDString(`alluvial-node-text-${i.index}`);t.parent.select(`text#${o}`).style("font-weight","normal"),n([],"mouseout"),t.services.events.dispatchEvent(w.Alluvial.NODE_MOUSEOUT,{event:r,element:a,datum:i}),t.services.events.dispatchEvent(w.Tooltip.HIDE,{hoveredElement:a})})}traverse(t,n,r=[]){n[t.link].map(i=>(r.push(i.index),i[t.node])).forEach(i=>this.traverse(t,i,r))}getRightArrowIcon(){return`
62
62
  <svg xmlns="http://www.w3.org/2000/svg" class="arrow-right" width="32" height="32" viewBox="0 0 32 32">
63
63
  <polygon points="18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6"/>
64
64
  <rect width="32" height="32"/>
65
- </svg>`}destroy(){this.parent.selectAll("path.line,.node-group").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null)}}class Te extends ht{constructor(){super(...arguments),this.type="grid",this.renderType=Q.SVG}render(t=!0){const n=x(this.getOptions(),"grid","x","enabled"),r=x(this.getOptions(),"grid","y","enabled");this.drawBackdrop(n,r),!(!n&&!r)&&(n&&(R.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(t)),r&&(R.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(t)))}drawXGrid(t){const n=this.parent,r=this.backdrop.attr("height"),i=this.services.cartesianScales.getMainXScale(),s=gc(i).tickSizeInner(-r).tickSizeOuter(0);if(x(this.getOptions(),"grid","x","alignWithAxisTicks")){const o=this.services.cartesianScales.getDomainAxisPosition(),l=x(this.getOptions(),"axes",o,"ticks","values");l&&s.tickValues(l)}else{const o=x(this.getOptions(),"grid","x","numberOfTicks");s.ticks(o)}const a=n.select(".x.grid").attr("transform",`translate(${-this.backdrop.attr("x")}, ${r})`);t?a.transition().call(o=>this.services.transitions.setupTransition({transition:o,name:"grid-update",animate:t})).call(s):a.call(s),this.cleanGrid(a)}drawYGrid(t){const n=this.parent,r=this.backdrop.attr("width"),i=this.services.cartesianScales.getMainYScale(),s=Jf(i).tickSizeInner(-r).tickSizeOuter(0);if(x(this.getOptions(),"grid","y","alignWithAxisTicks")){const o=this.services.cartesianScales.getRangeAxisPosition(),l=x(this.getOptions(),"axes",o,"ticks","values");l&&s.tickValues(l)}else{const o=x(this.getOptions(),"grid","y","numberOfTicks");s.ticks(o)}const a=n.select(".y.grid").attr("transform",`translate(0, ${-this.backdrop.attr("y")})`);t?a.transition().call(o=>this.services.transitions.setupTransition({transition:o,name:"grid-update",animate:t})).call(s):a.call(s),this.cleanGrid(a)}getGridlineThreshold(t){const n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((u,d)=>Number(yn(u).tx)-Number(yn(d).tx));let i=-1;if(!r.length)return;r.forEach(u=>{t[0]>=+yn(u).tx&&i++});const s=i+1<r.length?i+1:r.length,a=r[i],o=r[s];let l;if(!a)l=+yn(o).tx;else if(o)l=+yn(o).tx-+yn(a).tx;else{const u=n.select("rect.chart-grid-backdrop").node();l=R.getSVGElementSize(u).width-+yn(a).tx}const{threshold:c}=this.getOptions().tooltip.gridline;return l*c}getActiveGridline(t){const n=x(this.getOptions,"tooltip","gridline","threshold"),r=n||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter(function(){const i=yn(this),s={min:Number(i.tx)-r,max:Number(i.tx)+r};return s.min<=t[0]&&t[0]<=s.max})}drawBackdrop(t,n){const r=this.parent,i=this.services.cartesianScales.getMainXScale(),s=this.services.cartesianScales.getMainYScale(),[a,o]=i.range(),[l,c]=s.range();this.backdrop=R.appendOrSelect(r,"svg.chart-grid-backdrop").attr("role","presentation");const u=R.appendOrSelect(this.backdrop,t||n?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(u).attr("x",a).attr("y",c).attr("width",Math.abs(o-a)).attr("height",Math.abs(l-c)).lower(),u.attr("width","100%").attr("height","100%")}cleanGrid(t){t.selectAll("text").remove(),t.select(".domain").remove()}}class Ng extends ht{constructor(){super(...arguments),this.type="area",this.renderType=Q.SVG,this.gradient_id="gradient-id-"+Math.floor(Math.random()*99999999999),this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("path.area").transition("legend-hover-area").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-area"})).attr("opacity",r=>r.name!==n.datum().name?gn.opacity.unselected:gn.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.area").transition("legend-mouseout-area").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-area"})).attr("opacity",gn.opacity.selected)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"area graphs",withinChartClip:!0}),r=this.getOptions();let i=[0,0];const{cartesianScales:s}=this.services,a=s.getOrientation(),o=eu().curve(this.services.curves.getD3Curve()).defined(E=>{const S=s.getRangeIdentifier();return E[S]!=null}),l=this.model.getGroupedData(this.configs.groups),c=x(r,"bounds"),u=c&&l&&l.length===1;!u&&c&&console.warn(`Bounds can only be shown when having 1 single datagroup, you've supplied ${l.length}`);let d=0;const h=(E,S)=>{x(r,"axes",E,"includeZero")===!1&&S[0]>0&&S[1]>0&&(d=S[0])},p=E=>u?s.getBoundedScaledValues(E)[0]:s.getRangeValue(d),f=E=>u?s.getBoundedScaledValues(E)[1]:s.getRangeValue(E);a===Ht.VERTICAL?(i=s.getMainYScale().domain(),h(s.getMainYAxisPosition(),i),o.x(E=>s.getDomainValue(E)).y0(E=>p(E)).y1(E=>f(E))):(i=s.getMainXScale().domain(),h(s.getMainXAxisPosition(),i),o.x0(E=>p(E)).x1(E=>f(E)).y(E=>s.getDomainValue(E)));const g=x(r,"color","gradient","enabled"),m=l&&l.length===1&&g;l.length>1&&g&&console.error("Gradients can only be enabled when having 1 single dataset");const y=n.selectAll("path.area").data(l,E=>E.name),v=D(this.services.domUtils.getMainContainer());if(y.exit().attr("opacity",0).remove(),!l.length)return;if(m){const E=v.select(`path.${this.model.getColorClassName({classNameTypes:[et.STROKE],dataGroupName:l[0].name})}`).node();let S;if(E)S=getComputedStyle(E,null).getPropertyValue("stroke");else{const C=x(this.model.getOptions(),"color","scale");if(C!==null){const I=Object.keys(C);S=C[I[0]]}}fc.appendOrUpdateLinearGradient({svg:this.parent,id:this.services.domUtils.generateElementIDString(`${l[0].name.replace(" ","")}_${this.gradient_id}`),x1:"0%",x2:"0%",y1:"0%",y2:"100%",stops:fc.getStops(i,S)})}else this.parent.selectAll("defs linearGradient").empty()||this.parent.selectAll("defs linearGradient").each(function(){this.parentNode.remove()});const b=this,O=y.enter().append("path");m?O.merge(y).style("fill",E=>`url(#${this.services.domUtils.generateElementIDString(`${E.name.replace(" ","")}_${this.gradient_id}`)})`).attr("class","area").attr("class",E=>this.model.getColorClassName({classNameTypes:[et.FILL],dataGroupName:E.name,originalClassName:"area"})).attr("d",E=>{const{data:S}=E;return o(S)}):(O.attr("opacity",0).merge(y).attr("class","area").attr("class",E=>this.model.getColorClassName({classNameTypes:[et.FILL,et.STROKE],dataGroupName:E.name,originalClassName:"area"})).style("fill",E=>b.model.getFillColor(E.name,null,E.data)).transition().call(E=>this.services.transitions.setupTransition({transition:E,name:"area-update-enter",animate:t})).attr("opacity",u?1:gn.opacity.selected).attr("d",E=>{const{data:S}=E;return o(S)}),u&&O.attr("fill-opacity",gn.opacity.selected).style("stroke",E=>b.model.getStrokeColor(E.name,null,E.data)).style("stroke-dasharray","2, 2").attr("stroke-width",.7+"px"))}destroy(){const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class si extends ht{constructor(){super(...arguments),this.type="line",this.renderType=Q.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("path.line").transition("legend-hover-line").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-line"})).attr("opacity",r=>r.name!==n.datum().name?vn.opacity.unselected:vn.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.line").transition("legend-mouseout-line").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-line"})).attr("opacity",vn.opacity.selected)}}init(){const{events:t}=this.services;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"lines",withinChartClip:!0}),{cartesianScales:r,curves:i}=this.services,s=p=>r.getDomainValue(p),a=p=>r.getRangeValue(p),[o,l]=xn(s,a,r.getOrientation()),c=this.getOptions(),u=gs().x(o).y(l).curve(i.getD3Curve()).defined(p=>{const f=r.getRangeIdentifier(p);return p[f]!=null});let d=[];if(this.configs.stacked){const p=Object.keys(c.axes).some(g=>c.axes[g].percentage),{groupMapsTo:f}=c.data;d=this.model.getStackedData({groups:this.configs.groups,percentage:p}).map(g=>{const m=this.services.cartesianScales.getDomainIdentifier(g),y=this.services.cartesianScales.getRangeIdentifier(g);return{name:x(g,0,f),data:g.map(v=>({[m]:v.data.sharedStackKey,[f]:v[f],[y]:v[1]})),hidden:!MC(g,v=>v[0]!==v[1])}})}else d=this.model.getGroupedData(this.configs.groups);const h=n.selectAll("path.line").data(d,p=>p.name);h.exit().attr("opacity",0).remove(),h.enter().append("path").classed("line",!0).attr("opacity",0).merge(h).data(d,p=>p.name).attr("class",p=>this.model.getColorClassName({classNameTypes:[et.STROKE],dataGroupName:p.name,originalClassName:"line"})).style("stroke",p=>this.model.getStrokeColor(p.name,null,p.data)).attr("role",lt.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",p=>{const{data:f}=p;return f.map(g=>{const m=this.services.cartesianScales.getRangeIdentifier(g);return g[m]}).join(",")}).transition().call(p=>this.services.transitions.setupTransition({transition:p,name:"line-update-enter",animate:t})).attr("opacity",p=>p.hidden?0:1).attr("d",p=>{const{data:f}=p;return u(f)})}destroy(){const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}const Pg=5;function eD(e,t){return e>t-Pg&&e<t+Pg}class Hn extends ht{constructor(){super(...arguments),this.type="ruler",this.renderType=Q.SVG,this.isXGridEnabled=x(this.getOptions(),"grid","x","enabled"),this.isYGridEnabled=x(this.getOptions(),"grid","y","enabled"),this.isEventListenerAdded=!1}render(t=!1){const n=x(this.getOptions(),"ruler","enabled");this.drawBackdrop(),n&&!this.isEventListenerAdded?this.addBackdropEventListeners():!n&&this.isEventListenerAdded&&this.removeBackdropEventListeners()}removeBackdropEventListeners(){this.isEventListenerAdded=!1,this.backdrop.on("mousemove mouseover mouseout",null)}formatTooltipData(t){return t}showRuler(t,[n,r]){const i=this.parent,s=this.services.cartesianScales.getOrientation(),a=this.model.getDisplayData(),o=this.services.cartesianScales.getRangeScale(),[l,c]=o.range(),u=s===Ht.HORIZONTAL?r:n,d=R.appendOrSelect(i,"g.ruler").attr("aria-label","ruler"),h=R.appendOrSelect(d,"line.ruler-line"),p=i.selectAll("[role=graphics-symbol]"),f=a.map(m=>({domainValue:this.services.cartesianScales.getDomainValue(m),originalData:m})).filter(m=>eD(m.domainValue,u));if(this.pointsWithinLine&&f.length===this.pointsWithinLine.length&&f.map(m=>m.domainValue).join()===this.pointsWithinLine.map(m=>m.domainValue).join())return this.pointsWithinLine=f,this.services.events.dispatchEvent(T.Tooltip.MOVE,{mousePosition:[n,r]});this.pointsWithinLine=f;const g=this.pointsWithinLine.reduce((m,y)=>{if(m.length===0)return m.push(y),m;const v=m[0].domainValue,b=Math.abs(u-y.domainValue),O=Math.abs(u-v);return b>O||(b<O?m=[y]:m.push(y)),m},[]);if(g.length>0){const m=g.map(O=>O.originalData).filter(O=>{const E=this.services.cartesianScales.getRangeIdentifier(O);return O[E]!=null}),y=g.map(O=>O.domainValue),v=p.filter(O=>{const E=this.services.cartesianScales.getDomainValue(O);return y.includes(E)});this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!Xf(this.elementsToHighlight,v)&&this.hideRuler(),v.dispatch("mouseover"),this.elementsToHighlight=v,this.services.events.dispatchEvent(T.Tooltip.SHOW,{event:t,mousePosition:[n,r],hoveredElement:h,data:this.formatTooltipData(m)}),d.attr("opacity",1);const b=g[0];s==="horizontal"?h.attr("x1",c).attr("x2",l).attr("y1",b.domainValue).attr("y2",b.domainValue):h.attr("y1",c).attr("y2",l).attr("x1",b.domainValue).attr("x2",b.domainValue)}else this.hideRuler()}hideRuler(){const t=this.parent,n=R.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(T.Tooltip.HIDE),n.attr("opacity",0)}addBackdropEventListeners(){this.isEventListenerAdded=!0;const t=this,n=this.services.domUtils.getHolder(),r=this.model.getDisplayData();let i=function(s){const a=er(s,t.parent.node());t.showRuler(s,a)};if(r.length>100){const s=r.length%50*12.5;i=tw(function(a){const{mousePosition:o}=this;t.showRuler(a,o)},s,n)}this.backdrop.on("mousemove mouseover",i).on("mouseout",this.hideRuler.bind(this))}drawBackdrop(){const t=this.parent;this.backdrop=R.appendOrSelect(t,"svg.chart-grid-backdrop")}}let on=class extends ht{constructor(){super(...arguments),this.type="scatter",this.renderType=Q.SVG,this.handleChartHolderOnHover=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("chart-holder-hover-scatter").call(t=>{var n;return(n=this.services.transitions)==null?void 0:n.setupTransition({transition:t,name:"chart-holder-hover-scatter"})}).attr("opacity",1)},this.handleChartHolderOnMouseOut=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("chart-holder-mouseout-scatter").call(t=>{var n;return(n=this.services.transitions)==null?void 0:n.setupTransition({transition:t,name:"chart-holder-mouseout-scatter"})}).attr("opacity",0)},this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("legend-hover-scatter").call(i=>{var s;return(s=this.services.transitions)==null?void 0:s.setupTransition({transition:i,name:"legend-hover-scatter"})}).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("legend-mouseout-scatter").call(t=>{var n;return(n=this.services.transitions)==null?void 0:n.setupTransition({transition:t,name:"legend-mouseout-scatter"})}).attr("opacity",1)}}init(){const{events:t}=this.services;if(!t)throw new Error("Services events are undefined.");t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut);const{fadeInOnChartHolderMouseover:n}=this.configs;n&&(t.addEventListener(T.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(T.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))}filterBasedOnZoomDomain(t){const{cartesianScales:n}=this.services;if(!n)throw new Error("Services cartesianScales are undefined.");const r=n.getDomainIdentifier(t),i=this.model.get("zoomDomain");return i!==void 0?t.filter(s=>s[r].getTime()>=i[0].getTime()&&s[r].getTime()<=i[1].getTime()):t}getScatterData(){const t=this.getOptions(),{stacked:n}=this.configs;let r;if(n){const i=Object.keys(t.axes).some(s=>t.axes[s].percentage);r=this.model.getStackedData({groups:this.configs.groups,percentage:i})}else{const{cartesianScales:i}=this.services;if(!i)throw new Error("Services cartesianScales are undefined.");r=this.model.getDisplayData(this.configs.groups).filter(s=>{const a=i.getRangeIdentifier(s);return s[a]!==void 0&&s[a]!==null})}return this.filterBasedOnZoomDomain(r)}render(t){if(!(x(this.getOptions(),"points","enabled")||x(this.getOptions(),"bubble","enabled")))return;const n=this.getComponentContainer({ariaLabel:"scatter points",withinChartClip:!0}),r=this.getOptions(),{groupMapsTo:i}=r.data,{cartesianScales:s}=this.services;if(!s)throw new Error("Services cartesianScales are undefined.");const a=s.getDomainIdentifier(),o=n.selectAll("circle.dot").data(this.getScatterData(),c=>`${c[i]}-${c[a]}`);o.exit().attr("opacity",0).remove();const l=o.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(o);this.styleCircles(l,t),this.addEventListeners()}isDatapointThresholdAnomaly(t){const{handleThresholds:n}=this.configs;if(!n)return!1;const{cartesianScales:r}=this.services;if(!r)throw new Error("Cartesian scales service is undefined");const i=r.getOrientation(),[s,a]=xn(r.getHighestDomainThreshold(),r.getHighestRangeThreshold(),i),[o,l]=xn(d=>r.getDomainValue(d),d=>r.getRangeValue(d),i),c=o(t),u=l(t);return a&&s?u<=a.scaleValue&&c>=s.scaleValue:a?u<=a.scaleValue:s?c>=s.scaleValue:!1}styleCircles(t,n){const r=this.getOptions(),{filled:i,fillOpacity:s}=r.points,{cartesianScales:a}=this.services;if(!a)throw new Error("Cartesian scales service is undefined");const{groupMapsTo:o}=r.data,l=p=>a.getDomainValue(p),c=p=>a.getRangeValue(p),[u,d]=xn(l,c,a.getOrientation()),{fadeInOnChartHolderMouseover:h}=this.configs;t.raise().classed("dot",!0).attr("class",p=>{const f=a.getDomainIdentifier(p),g=this.model.getIsFilled(p[o],p[f],p,i)?[et.FILL,et.STROKE]:[et.STROKE];return this.model.getColorClassName({classNameTypes:g,dataGroupName:p[o],originalClassName:"dot"})||""}).classed("threshold-anomaly",p=>this.isDatapointThresholdAnomaly(p)).classed("filled",p=>{const f=a.getDomainIdentifier(p);return this.model.getIsFilled(p[o],p[f],p,i)}).classed("unfilled",p=>{const f=a.getDomainIdentifier(p);return!this.model.getIsFilled(p[o],p[f],p,i)}).transition().call(p=>{var f;return(f=this.services.transitions)==null?void 0:f.setupTransition({transition:p,name:"scatter-update-enter",animate:n})}).attr("cx",u).attr("cy",d).attr("r",r.points.radius).style("fill",p=>{const f=a.getDomainIdentifier(p);if(this.model.getIsFilled(p[o],p[f],p,i))return this.model.getFillColor(p[o],p[f],p)}).style("stroke",p=>{const f=a.getDomainIdentifier(p);return this.model.getStrokeColor(p[o],p[f],p)}).attr("fill-opacity",i?s:1).attr("opacity",h?0:1).attr("role",lt.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",p=>{const f=a.getRangeIdentifier(p);return p[f]}),this.addEventListeners()}getTooltipAdditionalItems(t){return null}addEventListeners(){const t=this,{groupMapsTo:n}=t.getOptions().data;if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle").on("mouseover",function(r,i){var s,a;const o=D(this);o.classed("hovered",!0).attr("class",l=>t.model.getColorClassName({classNameTypes:[et.FILL],dataGroupName:l[n],originalClassName:o.attr("class")})).style("fill",l=>{var c;const u=(c=t.services.cartesianScales)==null?void 0:c.getDomainIdentifier(l);return t.model.getFillColor(l[n],l[u],l)}).classed("unfilled",!1),(s=t.services.events)==null||s.dispatchEvent(T.Tooltip.SHOW,{event:r,hoveredElement:o,data:[i],additionalItems:t.getTooltipAdditionalItems(i)}),(a=t.services.events)==null||a.dispatchEvent(T.Scatter.SCATTER_MOUSEOVER,{event:r,element:o,datum:i})}).on("mousemove",function(r,i){var s,a;const o=D(this);(s=t.services.events)==null||s.dispatchEvent(T.Scatter.SCATTER_MOUSEMOVE,{event:r,element:o,datum:i}),(a=t.services.events)==null||a.dispatchEvent(T.Tooltip.MOVE,{event:r})}).on("click",function(r,i){var s;(s=t.services.events)==null||s.dispatchEvent(T.Scatter.SCATTER_CLICK,{event:r,element:D(this),datum:i})}).on("mouseout",function(r,i){var s,a,o;const l=D(this);if(l.classed("hovered",!1),!t.configs.filled){const{filled:c}=t.getOptions().points,u=(s=t.services.cartesianScales)==null?void 0:s.getDomainIdentifier(i),d=t.model.getIsFilled(i[n],i[u],i,c);l.classed("unfilled",!d).style("fill",h=>d||c?t.model.getFillColor(h[n],h[u],h):null)}(a=t.services.events)==null||a.dispatchEvent(T.Scatter.SCATTER_MOUSEOUT,{event:r,element:l,datum:i}),(o=t.services.events)==null||o.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:l})})}destroy(){var t;(t=this.parent)==null||t.selectAll("circle").on("mousemove",null).on("mouseout",null);const{events:n}=this.services;if(!n)throw new Error("Services events undefined");n.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),n.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),n.removeEventListener(T.Chart.MOUSEOVER,this.handleChartHolderOnHover),n.removeEventListener(T.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)}};class Ug extends ht{constructor(t,n,r){super(t,n,r),this.type="axes",this.renderType=Q.SVG,this.truncation={[G.LEFT]:!1,[G.RIGHT]:!1,[G.TOP]:!1,[G.BOTTOM]:!1},r&&(this.configs=r),this.margins=this.configs.margins}render(t=!0){const{position:n}=this.configs,r=this.getOptions(),i=x(r,"axes",n,"visible"),s=this.getComponentContainer({ariaLabel:"axes"}),{width:a,height:o}=R.getSVGElementSize(s,{useAttrs:!0}),l=R.appendOrSelect(s,`g.axis.${n}`);let c,u;if(n===G.BOTTOM||n===G.TOP?(c=this.configs.axes[G.LEFT]?this.margins.left:0,u=this.configs.axes[G.RIGHT]?a-this.margins.right:a):(c=o-this.margins.bottom,u=this.margins.top),!this.services.cartesianScales)throw new Error("Services cartesianScales undefined");const d=this.services.cartesianScales.getScaleByPosition(n);this.scaleType===X.LABELS||this.scaleType===X.LABELS_RATIO?d.rangeRound([c,u]):d.range([c,u]);let h;switch(n){case G.LEFT:h=Jf;break;case G.BOTTOM:h=gc;break;case G.RIGHT:h=PC;break;case G.TOP:h=NC;break}l.attr("aria-label",`${n} axis`);const p=!l.select("g.ticks").empty();let f=R.appendOrSelect(l,"g.ticks");p||(f.attr("role",`${lt.GRAPHICS_OBJECT} ${lt.GROUP}`),f.attr("aria-label",`${n} ticks`));const g=R.appendOrSelect(l,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label",`invisible ${n} ticks`),m=x(r,"axes",n),y=this.scaleType===X.TIME||m.scaleType===X.TIME,v=n===G.LEFT||n===G.RIGHT,b=this.model.get("zoomDomain");if(b&&y&&!v&&d.domain(b),!i){f.attr("aria-hidden",!0);return}const O=x(m,"scaleType"),E=x(r,"data","loading"),S=x(m,"ticks","number"),C=x(m,"ticks","values"),I=x(m,"truncation","type"),L=x(m,"truncation","threshold"),k=x(m,"truncation","numCharacter"),w=S!==null,V=x(r,"timeScale"),P=R.appendOrSelect(g,"g.tick"),B=R.appendOrSelect(P,"text").text("0"),_=R.getSVGElementSize(B.node(),{useBBox:!0}).height;P.remove();const M=this.scaleType||m.scaleType||X.LINEAR,A=h(d).tickSizeOuter(0);if(d.ticks){let Y;if(w?Y=S:(Y=Rn.ticks.number,v&&(Y=this.getNumberOfFittingTicks(o,_,Rn.ticks.verticalSpaceRatio))),d.ticks().length===1&&d.ticks()[0]===0&&(Y=0),A.ticks(Y),y)if(!d.ticks(Y).length)A.tickValues([]);else{const J=x(r,"timeScale","addSpaceOnEdges"),vt=x(r,"axes",n,"domain"),z=d.copy();J&&!vt&&z.nice(Y);const K=z.ticks(Y);J&&K.length>2&&!vt&&(K.splice(K.length-1,1),K.splice(0,1)),A.tickValues(K)}}let N;const U=x(m,"ticks","formatter"),{code:W,number:j}=x(r,"locale");if(y){const Y=ql(A.tickValues(),x(r,"timeScale","timeInterval"));U===null?N=(J,vt)=>Wl(J,vt,A.tickValues(),Y,V,r.locale):N=(J,vt)=>{const z=Wl(J,vt,A.tickValues(),Y,V,r.locale);return U(J,vt,z)}}else U===null?M===X.LINEAR&&(N=Y=>j(Y,W)):N=U;A.tickFormat(N);const[it,nt]=this.services.cartesianScales.getScaleByPosition(n).domain();let mt;if(C){if(y)C.forEach((Y,J)=>{Y.getTime===void 0&&(C[J]=new Date(Y))}),mt=C.filter(Y=>{const J=Y.getTime();return J>=new Date(it).getTime()&&J<=new Date(nt).getTime()});else if(O===X.LABELS){const Y=this.services.cartesianScales.getScaleByPosition(n).domain();mt=C.filter(J=>Y.includes(J))}else mt=C.filter(Y=>Y>=it&&Y<=nt);A.tickValues(mt)}switch(n){case G.LEFT:f.attr("transform",`translate(${this.margins.left}, 0)`);break;case G.BOTTOM:f.attr("transform",`translate(0, ${o-this.margins.bottom})`);break;case G.RIGHT:f.attr("transform",`translate(${a-this.margins.right}, 0)`);break;case G.TOP:f.attr("transform",`translate(0, ${this.margins.top})`);break}const rt=this.model.isDataEmpty();if(m.title){const Y=R.appendOrSelect(l,"text.axis-title").html(rt||E?"":an(m.title)),J=x(m,"titleOrientation");let vt;switch(n){case G.LEFT:J===Cs.RIGHT?Y.attr("transform","rotate(90)").attr("y",0).attr("x",d.range()[0]/2).attr("dy","-0.5em").style("text-anchor","middle"):Y.attr("transform","rotate(-90)").attr("y",0).attr("x",-(d.range()[0]/2)).attr("dy","0.75em").style("text-anchor","middle");break;case G.BOTTOM:Y.attr("transform",`translate(${this.margins.left/2+d.range()[1]/2}, ${o+4})`).style("text-anchor","middle");break;case G.RIGHT:J===Cs.LEFT?Y.attr("transform","rotate(-90)").attr("y",a).attr("x",-(d.range()[0]/2)).style("text-anchor","middle"):Y.attr("transform","rotate(90)").attr("y",-a).attr("x",d.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case G.TOP:vt=R.getSVGElementSize(Y,{useBBox:!0}).height,Y.attr("transform",`translate(${this.margins.left/2+d.range()[1]/2}, ${vt/2})`).style("text-anchor","middle");break}}if(y){const Y=ql(A.tickValues(),x(r,"timeScale","timeInterval")),J=V.showDayName,vt=f;t&&(f=f.transition().call(z=>this.services.transitions.setupTransition({transition:z,name:"axis-update",animate:t}))),f=f.call(A),vt.selectAll(".tick").data(A.tickValues(),d).order().select("text").attr("class",(z,K)=>Rp(z,K,A.tickValues(),Y,J)?"tick-label--primary":"tick-label")}else!t||!p?f=f.call(A):f=f.transition().call(Y=>this.services.transitions.setupTransition({transition:Y,name:"axis-update",animate:t})).call(A);if(g.call(A),n===G.BOTTOM||n===G.TOP){let Y=!1;const J=x(m,"ticks","rotation");if(J===fi.ALWAYS)Y=!0;else if(J===fi.NEVER)Y=!1;else if(!J||J===fi.AUTO)if(d.step)Y=g.selectAll("g.tick text").nodes().some(vt=>R.getSVGElementSize(vt,{useBBox:!0}).width>=d.step());else{Y=!1;const vt=g.append("text").text("A"),z=R.getSVGElementSize(vt.node(),{useBBox:!0}).width;let K;g.selectAll("g.tick").each(function(){const ot=D(this),F=parseFloat(x(yn(this),"tx"));F!==null&&K+ot.text().length*z*.8>=F&&(Y=!0),K=F}),vt.remove()}Y?(w||(A.ticks(this.getNumberOfFittingTicks(a,_,Rn.ticks.horizontalSpaceRatio)),g.call(A),f.call(A)),l.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").attr("text-anchor",n===G.TOP?"start":"end")):l.selectAll("g.ticks g.tick text").attr("transform",null).attr("text-anchor",null)}if(E?l.attr("opacity",0):l.attr("opacity",1),f.selectAll("g.tick").attr("aria-label",Y=>Y),g.selectAll("g.tick").attr("aria-label",Y=>Y),I!==Se.NONE&&O===X.LABELS&&!C){const Y=this.services.cartesianScales.getScaleDomain(n);if(Y.length>0){const J=s.select(`g.axis.${n} g.ticks g.tick`).html();l.selectAll("g.ticks g.tick").html(J);const vt=this;l.selectAll("g.tick text").data(Y).text(function(z){return z.length>L?(vt.truncation[n]=!0,ji(z,I,k)):z}),this.getInvisibleAxisRef().selectAll("g.tick text").data(Y).text(function(z){return z.length>L?ji(z,I,k):z}),l.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),l.selectAll("g.tick text").data(Y)}}this.addEventListeners()}addEventListeners(){const t=this.getComponentContainer(),{position:n}=this.configs,r=R.appendOrSelect(t,`g.axis.${n}`),i=this.getOptions(),s=x(i,"axes",n),a=x(s,"scaleType"),o=x(s,"truncation","threshold"),l=this;r.selectAll("g.tick text").on("mouseover",function(c,u){l.services.events.dispatchEvent(T.Axis.LABEL_MOUSEOVER,{event:c,element:D(this),datum:u}),a===X.LABELS&&u.length>o&&l.services.events.dispatchEvent(T.Tooltip.SHOW,{event:c,hoveredElement:D(this),content:u})}).on("mousemove",function(c,u){l.services.events.dispatchEvent(T.Axis.LABEL_MOUSEMOVE,{event:c,element:D(this),datum:u}),a===X.LABELS&&u.length>o&&l.services.events.dispatchEvent(T.Tooltip.MOVE,{event:c})}).on("click",function(c,u){l.services.events.dispatchEvent(T.Axis.LABEL_CLICK,{event:c,element:D(this),datum:u})}).on("mouseout",function(c,u){l.services.events.dispatchEvent(T.Axis.LABEL_MOUSEOUT,{event:c,element:D(this),datum:u}),a===X.LABELS&&l.services.events.dispatchEvent(T.Tooltip.HIDE)})}getInvisibleAxisRef(){const{position:t}=this.configs;return this.getComponentContainer().select(`g.axis.${t} g.ticks.invisible`)}getTitleRef(){const{position:t}=this.configs;return this.getComponentContainer().select(`g.axis.${t} text.axis-title`)}getNumberOfFittingTicks(t,n,r){const i=Math.floor(t/(n*r));return Zf(i,2,Rn.ticks.number)}destroy(){const t=this.getComponentContainer(),{position:n}=this.configs;R.appendOrSelect(t,`g.axis.${n}`).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)}}class nD extends Ug{constructor(t,n,r){super(t,n,r)}render(t=!0){super.render(t),super.destroy();const n=this.configs.position,r=this.getComponentContainer({ariaLabel:"axes"}),i=R.appendOrSelect(r,`g.axis.${n}`),s=this;i.selectAll("g.tick").each(function(a,o){const l=D(this);l.classed("tick-hover",!0).attr("tabindex",o===0?0:-1);const c=l.select("text"),{width:u,height:d}=R.getSVGElementSize(c,{useBBox:!0}),h=R.appendOrSelect(l,"rect.axis-holder");let p=0,f=0;switch(n){case G.LEFT:p=-u+Number(c.attr("x")),f=-(d/2);break;case G.RIGHT:p=Math.abs(Number(c.attr("x"))),f=-(d/2);break;case G.TOP:p=-(u/2),f=-d+Number(c.attr("y"))/2,s.truncation[n]&&(p=0,h.attr("transform","rotate(-45)"));break;case G.BOTTOM:p=-(u/2),f=d/2-2,s.truncation[n]&&(p=-u,h.attr("transform","rotate(-45)"));break}h.attr("x",p-Rn.hover.rectanglePadding).attr("y",f).attr("width",u+Rn.hover.rectanglePadding*2).attr("height",d).lower()}),this.addEventListeners()}addEventListeners(){const t=this.getComponentContainer(),{position:n}=this.configs,r=R.appendOrSelect(t,`g.axis.${n}`),i=this.getOptions(),s=x(i,"axes",n),a=x(s,"scaleType"),o=x(s,"truncation","threshold"),l=this;r.selectAll("g.tick.tick-hover").on("mouseover",function(c){const u=D(this).select("text"),d=u.datum();l.services.events.dispatchEvent(T.Axis.LABEL_MOUSEOVER,{event:c,element:u,datum:d}),a===X.LABELS&&d.length>o&&l.services.events.dispatchEvent(T.Tooltip.SHOW,{event:c,element:u,datum:d})}).on("mousemove",function(c){const u=D(this).select("text"),d=u.datum();l.services.events.dispatchEvent(T.Axis.LABEL_MOUSEMOVE,{event:c,element:u,datum:d}),l.services.events.dispatchEvent(T.Tooltip.MOVE,{event:c})}).on("click",function(c){l.services.events.dispatchEvent(T.Axis.LABEL_CLICK,{event:c,element:D(this).select("text"),datum:D(this).select("text").datum()})}).on("mouseout",function(c){l.services.events.dispatchEvent(T.Axis.LABEL_MOUSEOUT,{event:c,element:D(this).select("text"),datum:D(this).select("text").datum()}),a===X.LABELS&&l.services.events.dispatchEvent(T.Tooltip.HIDE)}).on("focus",function(c){const u={clientX:0,clientY:0};if(c.target){c.target.focus();const d=c.target.getBoundingClientRect();u.clientX=d.x,u.clientY=d.y}l.services.events.dispatchEvent(T.Axis.LABEL_FOCUS,{event:{...c,...u},element:D(this),datum:D(this).select("text").datum()})}).on("blur",function(c){l.services.events.dispatchEvent(T.Axis.LABEL_BLUR,{event:c,element:D(this),datum:D(this).select("text").datum()})}).on("keydown",function(c){c.key&&c.key==="Escape"&&(l.services.events.dispatchEvent(T.Tooltip.HIDE),l.services.events.dispatchEvent(T.Axis.LABEL_BLUR,{event:c,element:D(this),datum:D(this).select("text").datum()})),n===G.LEFT||n===G.RIGHT?c.key&&c.key==="ArrowUp"?l.goNext(this,c):c.key&&c.key==="ArrowDown"&&l.goPrevious(this,c):c.key&&c.key==="ArrowLeft"?l.goPrevious(this,c):c.key&&c.key==="ArrowRight"&&l.goNext(this,c)})}goNext(t,n){t.nextElementSibling&&t.nextElementSibling.tagName!=="path"&&t.nextElementSibling.dispatchEvent(new Event("focus")),n.preventDefault()}goPrevious(t,n){t.previousElementSibling&&t.previousElementSibling.tagName!=="path"&&t.previousElementSibling.dispatchEvent(new Event("focus")),n.preventDefault()}destroy(){const t=this.getComponentContainer(),{position:n}=this.configs;R.appendOrSelect(t,`g.axis.${n}`).selectAll("g.tick.tick-hover").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("focus",null).on("blur",null)}}class fe extends ht{constructor(){super(...arguments),this.type="2D-axes",this.renderType=Q.SVG,this.children={},this.thresholds=[],this.margins={top:0,right:0,bottom:0,left:0}}render(t=!1){const n={},r=Object.keys(G),i=x(this.getOptions(),"axes");r.forEach(a=>{i[G[a]]&&(n[G[a]]=!0)}),this.configs.axes=n,r.forEach(a=>{const o=G[a];if(this.configs.axes[o]&&!this.children[o]){const l={position:o,axes:this.configs.axes,margins:this.margins},c=this.model.axisFlavor===gi.DEFAULT?new Ug(this.model,this.services,l):new nD(this.model,this.services,l);c.setModel(this.model),c.setServices(this.services),c.setParent(this.parent),this.children[o]=c}}),Object.keys(this.children).forEach(a=>{this.children[a].render(t)});const s={};Object.keys(this.children).forEach(a=>{const o=this.children[a],l=o.configs.position,c=o.getInvisibleAxisRef(),{width:u,height:d}=R.getSVGElementSize(c,{useBBox:!0});let h;switch(o.getTitleRef().empty()?h=0:(h=R.getSVGElementSize(o.getTitleRef(),{useBBox:!0}).height,(l===G.LEFT||l===G.RIGHT)&&(h+=5)),l){case G.TOP:s.top=d+h;break;case G.BOTTOM:s.bottom=d+h;break;case G.LEFT:s.left=u+h;break;case G.RIGHT:s.right=u+h;break}}),this.services.events.dispatchEvent(T.Axis.RENDER_COMPLETE),Object.keys(s).some(a=>this.margins[a]!==s[a])&&(this.margins=Object.assign(this.margins,s),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(T.ZoomBar.UPDATE),Object.keys(this.children).forEach(a=>{const o=this.children[a];o.margins=this.margins}),this.render(!0))}}class le extends ht{constructor(){super(...arguments),this.type="skeleton"}render(t=!0){const n=x(this.getOptions(),"data","loading");n?this.renderSkeleton(n):this.removeSkeleton()}renderSkeleton(t){if(this.configs.skeleton===Gt.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===Gt.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===Gt.PIE)this.renderPieSkeleton(t);else if(this.configs.skeleton===Gt.DONUT)this.renderDonutSkeleton(t);else throw new Error(`"${this.configs.skeleton}" is not a valid Skeleton type.`)}renderGridSkeleton(t){this.setScales(),this.drawBackdrop(t),this.drawXGrid(t),this.drawYGrid(t),t&&this.setShimmerEffect("shimmer-lines")}renderVertOrHorizSkeleton(t){const n=this.services.cartesianScales.getOrientation();this.setScales(),this.drawBackdrop(t),n===Ht.VERTICAL&&this.drawYGrid(t),n===Ht.HORIZONTAL&&this.drawXGrid(t),this.setShimmerEffect("shimmer-lines")}renderPieSkeleton(t){const n=this.computeOuterRadius();this.drawRing(n,0,t),t&&this.setShimmerEffect("shimmer-areas")}renderDonutSkeleton(t){const n=this.computeOuterRadius(),r=this.computeInnerRadius();this.drawRing(n,r,t),t&&this.setShimmerEffect("shimmer-areas")}setScales(){const t=this.services.cartesianScales.getMainXScale().range(),n=this.services.cartesianScales.getMainYScale().range();this.xScale=Fe().domain([0,1]).range(t),this.yScale=Fe().domain([0,1]).range(n)}drawBackdrop(t){const n=this.parent,{width:r,height:i}=R.getSVGElementSize(n,{useAttrs:!0});this.backdrop=R.appendOrSelect(n,"svg.chart-skeleton.DAII").attr("width",r).attr("height",i);const s=R.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");s.attr("width","100%").attr("height","100%");const[a]=this.xScale.range(),[,o]=this.yScale.range();this.backdrop.merge(s).attr("x",a).attr("y",o),s.classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawXGrid(t){const n=+this.backdrop.attr("width"),r=x(this.getOptions(),"grid","x","numberOfTicks"),i=this.xScale.ticks(r).map(o=>o*n),s=R.appendOrSelect(this.backdrop,"g.x.skeleton"),a=s.selectAll("line").data(i);a.enter().append("line").merge(a).attr("x1",o=>o).attr("x2",o=>o).attr("y1",0).attr("y2","100%"),s.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawYGrid(t){const n=+this.backdrop.attr("height"),r=this.backdrop.attr("width"),i=x(this.getOptions(),"grid","y","numberOfTicks"),s=this.xScale.ticks(i).map(l=>l*n),a=R.appendOrSelect(this.backdrop,"g.y.skeleton"),o=a.selectAll("line").data(s);o.enter().append("line").merge(o).attr("x1",0).attr("x2",r).attr("y1",l=>l).attr("y2",l=>l),a.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawRing(t,n,r=!0){const i=this.parent,{width:s,height:a}=R.getSVGElementSize(i,{useAttrs:!0}),o=R.appendOrSelect(i,"svg.chart-skeleton").attr("width",s).attr("height",a),l=n===0?"pie":"donut",c=x(this.getOptions(),l,"alignment");R.appendOrSelect(o,"rect.chart-skeleton-area-container").attr("width",s).attr("height",a).attr("fill","none");const u=ms().innerRadius(n).outerRadius(t).startAngle(0).endAngle(Math.PI*2),d=t+Math.abs(At.radiusOffset),h=t+(Math.min(s,a)-t*2)/2,p=R.appendOrSelect(o,"path").attr("class","skeleton-area-shape").attr("transform",`translate(${d}, ${h})`).attr("d",u).classed("shimmer-effect-areas",r).classed("empty-state-areas",!r).style("fill",r?`url(#${this.services.domUtils.generateElementIDString("shimmer-areas")})`:null);let f=t+At.xOffset;c===Vt.CENTER?f=s/2:c===Vt.RIGHT&&(f=s-t-At.xOffset);const g=t+At.yOffset;p.attr("transform",`translate(${f}, ${g})`)}computeOuterRadius(){const{width:t,height:n}=R.getSVGElementSize(this.parent,{useAttrs:!0});return Math.min(t,n)/2+At.radiusOffset}computeInnerRadius(){return this.computeOuterRadius()*(3/4)}setShimmerEffect(t){const n="stop-bg-shimmer",r="stop-shimmer",i=this.parent.select(".chart-skeleton"),{width:s}=R.getSVGElementSize(this.parent,{useAttrs:!0}),a=0,o=s,l=R.appendOrSelect(i,"defs").lower(),c=R.appendOrSelect(l,"linearGradient").attr("id",this.services.domUtils.generateElementIDString(t)).attr("class",t).attr("x1",a-3*.2*s).attr("x2",o).attr("y1",0).attr("y2",0).attr("gradientUnits","userSpaceOnUse").attr("gradientTransform","translate(0, 0)"),u=`
66
- <stop class="${n}" offset="${a}"></stop>
67
- <stop class="${r}" offset="${a+.2}"></stop>
68
- <stop class="${n}" offset="${a+2*.2}"></stop>
69
- `;c.html(u),d();function d(){c.attr("gradientTransform",`translate(${a-3*.2*s}, 0)`).transition().duration(2e3).delay(1e3).ease(VC).attr("gradientTransform",`translate(${o+3*.2*s}, 0)`).on("end",d)}}removeSkeleton(){this.parent.select(".chart-skeleton").remove()}}class rD extends ht{constructor(){super(...arguments),this.type="boxplot",this.renderType=Q.SVG}render(t){const n=this.getComponentContainer({ariaLabel:"box plots",withinChartClip:!0}),r=this.getOptions(),{groupMapsTo:i}=r.data,s=this.model.getDataGroupNames(),a=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),[l,c]=a.range(),[u,d]=o.range(),h=c-l,p=u-d;if(h===0)return;const{cartesianScales:f}=this.services,g=f.getOrientation(),m=g===Ht.VERTICAL,[y,v]=xn(w=>this.services.cartesianScales.getDomainValue(w),w=>this.services.cartesianScales.getRangeValue(w),g),b=Math.floor((m?h:p)/s.length),O=Math.min(b/2,16),E=this.model.getBoxplotData(),S=n.selectAll(".box-group").data(E);S.exit().remove();const C=S.enter().append("g").attr("class","box-group"),I=S.merge(C);C.append("path").merge(S.select("path.vertical-line.start")).attr("class",()=>this.model.getColorClassName({classNameTypes:[et.STROKE],originalClassName:"vertical-line start"})).attr("stroke-width",Ae.strokeWidth.default).attr("fill","none").transition().call(w=>this.services.transitions.setupTransition({transition:w,name:"boxplot-update-verticalstartline",animate:t})).attr("d",w=>{const V=f.getDomainValue(w[i]),P=V,B=f.getRangeValue(w.whiskers.min),_=f.getRangeValue(w.quartiles.q_25);return ie({x0:V,x1:P,y0:B,y1:_},g)}),C.append("path").merge(S.select("path.vertical-line.end")).attr("class",()=>this.model.getColorClassName({classNameTypes:[et.STROKE],originalClassName:"vertical-line end"})).attr("stroke-width",Ae.strokeWidth.default).attr("fill","none").transition().call(w=>this.services.transitions.setupTransition({transition:w,name:"boxplot-update-verticalendline",animate:t})).attr("d",w=>{const V=f.getDomainValue(w[i]),P=V,B=f.getRangeValue(w.whiskers.max),_=f.getRangeValue(w.quartiles.q_75);return ie({x0:V,x1:P,y0:B,y1:_},g)}),C.append("path").merge(S.select("path.box")).attr("class",()=>this.model.getColorClassName({classNameTypes:[et.FILL,et.STROKE],originalClassName:"box"})).attr("fill-opacity",Ae.box.opacity.default).attr("stroke-width",Ae.strokeWidth.default).attr("role",lt.GRAPHICS_SYMBOL).attr("aria-roledescription","box").attr("aria-label",w=>w[i]).transition().call(w=>this.services.transitions.setupTransition({transition:w,name:"boxplot-update-quartiles",animate:t})).attr("d",w=>{const V=f.getDomainValue(w[i])-O/2,P=V+O,B=f.getRangeValue(Math[m?"max":"min"](w.quartiles.q_75,w.quartiles.q_25)),_=B+Math.abs(f.getRangeValue(w.quartiles.q_75)-f.getRangeValue(w.quartiles.q_25));return ie({x0:V,x1:P,y0:B,y1:_},g)}),C.append("path").merge(S.select("path.highlight-area")).attr("class","highlight-area").attr("opacity",0).attr("d",w=>{const V=f.getDomainValue(w[i])-O/2,P=V+O,B=f.getRangeValue(w.whiskers.min),_=f.getRangeValue(w.whiskers.max);return ie({x0:V,x1:P,y0:B,y1:_},g)}),C.append("path").merge(S.select("path.whisker.start")).attr("class",()=>this.model.getColorClassName({classNameTypes:[et.STROKE],originalClassName:"whisker start"})).attr("stroke-width",Ae.strokeWidth.thicker).attr("fill","none").transition().call(w=>this.services.transitions.setupTransition({transition:w,name:"boxplot-update-startingwhisker",animate:t})).attr("d",w=>{const V=f.getDomainValue(w[i])-O/4,P=V+O/2,B=f.getRangeValue(w.whiskers.min),_=f.getRangeValue(w.whiskers.min);return ie({x0:V,x1:P,y0:B,y1:_},g)}),C.append("path").merge(S.select("path.median")).attr("fill","none").attr("class",()=>this.model.getColorClassName({classNameTypes:[et.STROKE],originalClassName:"median"})).attr("stroke-width",2).transition().call(w=>this.services.transitions.setupTransition({transition:w,name:"boxplot-update-median",animate:t})).attr("d",w=>{const V=f.getDomainValue(w[i])-O/2,P=V+O,B=f.getRangeValue(w.quartiles.q_50);return ie({x0:V,x1:P,y0:B,y1:B},g)}),C.append("path").merge(S.select("path.whisker.end")).attr("class",()=>this.model.getColorClassName({classNameTypes:[et.STROKE],originalClassName:"whisker end"})).attr("stroke-width",Ae.strokeWidth.thicker).attr("fill","none").transition().call(w=>this.services.transitions.setupTransition({transition:w,name:"boxplot-update-endingwhisker",animate:t})).attr("d",w=>{const V=f.getDomainValue(w[i])-O/4,P=V+O/2,B=f.getRangeValue(w.whiskers.max),_=f.getRangeValue(w.whiskers.max);return ie({x0:V,x1:P,y0:B,y1:_},g)});const L=I.selectAll("circle.outlier").data(w=>w.outliers.map(V=>({min:w.whiskers.min,max:w.whiskers.max,[i]:w[i],value:V})));L.exit().remove();const k=L.enter().append("circle");L.merge(k).attr("r",Ae.circle.radius).attr("class",()=>this.model.getColorClassName({classNameTypes:[et.FILL,et.STROKE],originalClassName:"outlier"})).attr("fill-opacity",Ae.circle.opacity.default).attr("cx",y).transition().call(w=>this.services.transitions.setupTransition({transition:w,name:"boxplot-update-circles",animate:t})).attr("cy",v),this.addBoxEventListeners(),this.addCircleEventListeners()}addBoxEventListeners(){const t=this,n=this.getOptions(),{groupMapsTo:r}=n.data;this.parent.selectAll("path.highlight-area").on("mouseover",function(i,s){const a=D(this);D(this.parentNode).select("path.box").classed("hovered",!0).attr("fill-opacity",Ae.box.opacity.hovered),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:i,hoveredElement:a,items:[{label:x(n,"locale","translations","group")||x(n,"tooltip","groupLabel")||"Group",value:s[r],class:t.model.getColorClassName({classNameTypes:[et.TOOLTIP]})},{label:"Minimum",value:s.whiskers.min},{label:"Q1",value:s.quartiles.q_25},{label:"Median",value:s.quartiles.q_50},{label:"Q3",value:s.quartiles.q_75},{label:"Maximum",value:s.whiskers.max},{label:"IQR",value:s.quartiles.q_75-s.quartiles.q_25}]}),t.services.events.dispatchEvent(T.Boxplot.BOX_MOUSEOVER,{event:i,element:a,datum:s})}).on("mousemove",function(i,s){const a=D(this);t.services.events.dispatchEvent(T.Boxplot.BOX_MOUSEMOVE,{event:i,element:a,datum:s}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:i})}).on("click",function(i,s){t.services.events.dispatchEvent(T.Boxplot.BOX_CLICK,{event:i,element:D(this),datum:s})}).on("mouseout",function(i,s){const a=D(this);D(this.parentNode).select("path.box").classed("hovered",!1).attr("fill-opacity",Ae.box.opacity.default),t.services.events.dispatchEvent(T.Boxplot.BOX_MOUSEOUT,{event:i,element:a,datum:s}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:a})})}addCircleEventListeners(){const t=this,n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.services.cartesianScales.getRangeIdentifier();this.parent.selectAll("circle").on("mouseover",function(s,a){const o=D(this);o.classed("hovered",!0).attr("fill-opacity",Ae.circle.opacity.hovered).classed("unfilled",!1),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:s,hoveredElement:o,items:[{label:x(n,"locale","translations","group")||x(n,"tooltip","groupLabel")||"Group",value:a[r],class:t.model.getColorClassName({classNameTypes:[et.TOOLTIP]})},{label:"Outlier",value:a[i]}]}),t.services.events.dispatchEvent(T.Boxplot.OUTLIER_MOUSEOVER,{event:s,element:o,datum:a})}).on("mousemove",function(s,a){const o=D(this);t.services.events.dispatchEvent(T.Boxplot.OUTLIER_MOUSEMOVE,{event:s,element:o,datum:a}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:s})}).on("click",function(s,a){t.services.events.dispatchEvent(T.Boxplot.OUTLIER_CLICK,{event:s,element:D(this),datum:a})}).on("mouseout",function(s,a){const o=D(this);o.classed("hovered",!1).attr("fill-opacity",Ae.circle.opacity.default),t.services.events.dispatchEvent(T.Boxplot.OUTLIER_MOUSEOUT,{event:s,element:o,datum:a}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:o})})}}class ai extends ht{constructor(){super(...arguments),this.type="zero-line",this.renderType=Q.SVG}render(t){const n=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),r=this.services.cartesianScales.getScaleByPosition(n),[i,s]=r.domain(),a=i>0&&s<0||i<0&&s>0,o=this.getComponentContainer({isPresentational:!0});if(!a){o.selectAll("line.domain").remove();return}const[l,c]=this.services.cartesianScales.getDomainScale().range();let u=+r(0)+.5;u||(u=r.range()[0]);const d=Op({x0:l,x1:c,y0:u,y1:u},this.services.cartesianScales.getOrientation());R.appendOrSelect(o,"line.domain").transition().call(h=>this.services.transitions.setupTransition({transition:h,name:"zero-line-update",animate:t})).attr("y1",d.y0).attr("y2",d.y1).attr("x1",d.x0).attr("x2",d.x1)}}class iD extends on{constructor(){super(...arguments),this.type="bubble",this.renderType=Q.SVG}getRadiusScale(t){const n=this.getOptions(),{radiusMapsTo:r}=n.bubble,i=t.data(),s=i.map(c=>c[r]).filter(c=>c),a=R.getHTMLElementSize(this.services.domUtils.getMainContainer()),o=s.length>0,l=o?He(s):[1,1];return Fe().domain(l).range(o?n.bubble.radiusRange(a,i):[4,4])}styleCircles(t,n){const r=this.getOptions(),{radiusMapsTo:i}=r.bubble,s=this.getRadiusScale(t),{groupMapsTo:a}=r.data,{cartesianScales:o}=this.services,l=h=>o.getDomainValue(h),c=h=>o.getRangeValue(h),[u,d]=xn(l,c,o.getOrientation());t.raise().classed("dot",!0).attr("role",lt.GRAPHICS_SYMBOL).attr("aria-label",h=>{const p=o.getRangeIdentifier(h);return h[p]}).transition().call(h=>this.services.transitions.setupTransition({transition:h,name:"bubble-update-enter",animate:n})).attr("cx",u).attr("cy",d).attr("r",h=>s(h[i]||1)).attr("class",h=>this.model.getColorClassName({classNameTypes:[et.FILL,et.STROKE],dataGroupName:h[a],originalClassName:"dot"})).style("fill",h=>{const p=this.services.cartesianScales.getDomainIdentifier(h);return this.model.getFillColor(h[a],h[p],h)}).style("stroke",h=>{const p=this.services.cartesianScales.getDomainIdentifier(h);return this.model.getStrokeColor(h[a],h[p],h)}).attr("fill-opacity",r.bubble.fillOpacity).attr("opacity",1)}getTooltipAdditionalItems(t){const n=x(this.getOptions(),"bubble");return[{label:x(n,"radiusLabel"),value:t[x(n,"radiusMapsTo")]}]}}class sD extends ht{constructor(){super(...arguments),this.type="bullet",this.renderType=Q.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-simple-bar"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-simple-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.getComponentContainer({ariaLabel:"bullet graphs",withinChartClip:!0}),s=this.model.getDisplayData(this.configs.groups),a=this.services.cartesianScales.getRangeScale(),o=this.services.cartesianScales.getRangeIdentifier(),[l,c]=a.range(),[,u]=a.domain(),d=()=>{const g=[];s.forEach(y=>{y.ranges?y.ranges.forEach((v,b)=>{v!=null&&v<u&&g.push({datum:y,value:v,order:b+1})}):g.push({datum:y,order:1})});const m=R.appendOrSelect(i,"g.range-boxes").selectAll("path.range-box").data(g,y=>`${y[r]}-${y.order}`);m.exit().attr("opacity",0).remove(),m.enter().append("path").attr("opacity",0).merge(m).attr("class",y=>`range-box order-${y.order}`).transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"bullet-range-box-update-enter",animate:t})).attr("d",y=>{let v,b,O,E;return y.order===1?(v=this.services.cartesianScales.getDomainValue(y.datum)-16/2,b=v+16,O=c-2,E=l+1):(v=this.services.cartesianScales.getDomainValue(y.datum)-16/2,b=v+16,O=this.services.cartesianScales.getRangeValue(y.value),E=c),ie({x0:v,x1:b,y0:O,y1:E},this.services.cartesianScales.getOrientation())}).attr("opacity",1)},h=()=>{const g=R.appendOrSelect(i,"g.bars").selectAll("path.bar").data(s,m=>m[r]);g.exit().attr("opacity",0).remove(),g.enter().append("path").attr("opacity",0).merge(g).classed("bar",!0).transition().call(m=>this.services.transitions.setupTransition({transition:m,name:"bullet-bar-update-enter",animate:t})).attr("class",m=>this.model.getColorClassName({classNameTypes:[et.FILL],dataGroupName:m[r],originalClassName:"bar"})).style("fill",m=>{const y=this.services.cartesianScales.getDomainIdentifier(m);return this.model.getFillColor(m[r],m[y],m)}).attr("d",m=>{const y=this.services.cartesianScales.getDomainValue(m)-4,v=y+8,b=this.services.cartesianScales.getRangeValue(0)+1,O=this.services.cartesianScales.getRangeValue(m);return ie({x0:y,x1:v,y0:b,y1:O},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",lt.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",m=>m.value)},p=()=>{const g=R.appendOrSelect(i,"g.markers").selectAll("path.marker").data(s.filter(m=>x(m,"marker")!==null),m=>m[r]);g.exit().attr("opacity",0).remove(),g.enter().append("path").attr("opacity",0).merge(g).classed("marker",!0).transition().call(m=>this.services.transitions.setupTransition({transition:m,name:"bullet-marker-update-enter",animate:t})).attr("d",m=>{const y=this.services.cartesianScales.getDomainValue(m)-12,v=y+24,b=this.services.cartesianScales.getRangeValue(m.marker);return ie({x0:y,x1:v,y0:b,y1:b},this.services.cartesianScales.getOrientation())}).attr("opacity",1)},f=()=>{let g=[];s.filter(y=>x(y,"marker")!==null).forEach(y=>{const v=y.marker,b=y[o];g=g.concat([{datum:y,value:v*.25,barValue:b},{datum:y,value:v*.5,barValue:b},{datum:y,value:v*.75,barValue:b}])});const m=R.appendOrSelect(i,"g.quartiles").selectAll("path.quartile").data(g,y=>y[r]);m.exit().attr("opacity",0).remove(),m.enter().append("path").attr("opacity",0).merge(m).attr("class",y=>`quartile ${y.value<=y.barValue?"over-bar":""}`).transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"bullet-quartile-update-enter",animate:t})).attr("d",({datum:y,value:v})=>{let b=4;y.ranges&&y.ranges.indexOf(v)!==-1&&(b=8);const O=this.services.cartesianScales.getDomainValue(y)-b/2,E=O+b,S=this.services.cartesianScales.getRangeValue(v);return ie({x0:O,x1:E,y0:S,y1:S},this.services.cartesianScales.getOrientation())}).attr("opacity",1)};d(),h(),p(),f(),this.addEventListeners()}addEventListeners(){const t=this,n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.services.cartesianScales.getRangeIdentifier(),{code:s,number:a}=x(n,"locale");this.parent.selectAll("path.bar").on("mouseover",function(o,l){const c=D(this);c.classed("hovered",!0),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOVER,{event:o,element:c,datum:l});const u=x(n,"bullet","performanceAreaTitles"),d=t.model.getMatchingRangeIndexForDatapoint(l);t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:o,hoveredElement:c,items:[{label:x(n,"locale","translations","group")||x(n,"tooltip","groupLabel")||"Group",value:l[r],class:t.model.getColorClassName({classNameTypes:[et.TOOLTIP],dataGroupName:l[r]})},{label:"Value",value:l[i]},{label:"Target",value:l.marker},{label:"Percentage",value:`${a(Math.floor(l[i]/l.marker*100),s)}%`},{label:"Performance",value:u[d]}]})}).on("mousemove",function(o,l){t.services.events.dispatchEvent(T.Bar.BAR_MOUSEMOVE,{event:o,element:D(this),datum:l}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:o})}).on("click",function(o,l){t.services.events.dispatchEvent(T.Bar.BAR_CLICK,{event:o,element:D(this),datum:l})}).on("mouseout",function(o,l){const c=D(this);c.classed("hovered",!1),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOUT,{event:o,element:c,datum:l}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:c})})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}function aD(e){return e}function oD(e){if(e==null)return aD;var t,n,r=e.scale[0],i=e.scale[1],s=e.translate[0],a=e.translate[1];return function(o,l){l||(t=n=0);var c=2,u=o.length,d=new Array(u);for(d[0]=(t+=o[0])*r+s,d[1]=(n+=o[1])*i+a;c<u;)d[c]=o[c],++c;return d}}function lD(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}function cD(e,t){return typeof t=="string"&&(t=e.objects[t]),t.type==="GeometryCollection"?{type:"FeatureCollection",features:t.geometries.map(function(n){return Bg(e,n)})}:Bg(e,t)}function Bg(e,t){var n=t.id,r=t.bbox,i=t.properties==null?{}:t.properties,s=vu(e,t);return n==null&&r==null?{type:"Feature",properties:i,geometry:s}:r==null?{type:"Feature",id:n,properties:i,geometry:s}:{type:"Feature",id:n,bbox:r,properties:i,geometry:s}}function vu(e,t){var n=oD(e.transform),r=e.arcs;function i(u,d){d.length&&d.pop();for(var h=r[u<0?~u:u],p=0,f=h.length;p<f;++p)d.push(n(h[p],p));u<0&&lD(d,f)}function s(u){return n(u)}function a(u){for(var d=[],h=0,p=u.length;h<p;++h)i(u[h],d);return d.length<2&&d.push(d[0]),d}function o(u){for(var d=a(u);d.length<4;)d.push(d[0]);return d}function l(u){return u.map(o)}function c(u){var d=u.type,h;switch(d){case"GeometryCollection":return{type:d,geometries:u.geometries.map(c)};case"Point":h=s(u.coordinates);break;case"MultiPoint":h=u.coordinates.map(s);break;case"LineString":h=a(u.arcs);break;case"MultiLineString":h=u.arcs.map(a);break;case"Polygon":h=l(u.arcs);break;case"MultiPolygon":h=u.arcs.map(l);break;default:return null}return{type:d,coordinates:h}}return c(t)}function uD(e,t){var n={},r={},i={},s=[],a=-1;t.forEach(function(c,u){var d=e.arcs[c<0?~c:c],h;d.length<3&&!d[1][0]&&!d[1][1]&&(h=t[++a],t[a]=c,t[u]=h)}),t.forEach(function(c){var u=o(c),d=u[0],h=u[1],p,f;if(p=i[d])if(delete i[p.end],p.push(c),p.end=h,f=r[h]){delete r[f.start];var g=f===p?p:p.concat(f);r[g.start=p.start]=i[g.end=f.end]=g}else r[p.start]=i[p.end]=p;else if(p=r[h])if(delete r[p.start],p.unshift(c),p.start=d,f=i[d]){delete i[f.end];var m=f===p?p:f.concat(p);r[m.start=f.start]=i[m.end=p.end]=m}else r[p.start]=i[p.end]=p;else p=[c],r[p.start=d]=i[p.end=h]=p});function o(c){var u=e.arcs[c<0?~c:c],d=u[0],h;return e.transform?(h=[0,0],u.forEach(function(p){h[0]+=p[0],h[1]+=p[1]})):h=u[u.length-1],c<0?[h,d]:[d,h]}function l(c,u){for(var d in c){var h=c[d];delete u[h.start],delete h.start,delete h.end,h.forEach(function(p){n[p<0?~p:p]=1}),s.push(h)}}return l(i,r),l(r,i),t.forEach(function(c){n[c<0?~c:c]||s.push([c])}),s}function hD(e){for(var t=-1,n=e.length,r,i=e[n-1],s=0;++t<n;)r=i,i=e[t],s+=r[0]*i[1]-r[1]*i[0];return Math.abs(s)}function dD(e){return vu(e,pD.apply(this,arguments))}function pD(e,t){var n={},r=[],i=[];t.forEach(s);function s(l){switch(l.type){case"GeometryCollection":l.geometries.forEach(s);break;case"Polygon":a(l.arcs);break;case"MultiPolygon":l.arcs.forEach(a);break}}function a(l){l.forEach(function(c){c.forEach(function(u){(n[u=u<0?~u:u]||(n[u]=[])).push(l)})}),r.push(l)}function o(l){return hD(vu(e,{type:"Polygon",arcs:[l]}).coordinates[0])}return r.forEach(function(l){if(!l._){var c=[],u=[l];for(l._=1,i.push(c);l=u.pop();)c.push(l),l.forEach(function(d){d.forEach(function(h){n[h<0?~h:h].forEach(function(p){p._||(p._=1,u.push(p))})})})}}),r.forEach(function(l){delete l._}),{type:"MultiPolygon",arcs:i.map(function(l){var c=[],u;if(l.forEach(function(g){g.forEach(function(m){m.forEach(function(y){n[y<0?~y:y].length<2&&c.push(y)})})}),c=uD(e,c),(u=c.length)>1)for(var d=1,h=o(c[0]),p,f;d<u;++d)(p=o(c[d]))>h&&(f=c[0],c[0]=c[d],c[d]=f,h=p);return c}).filter(function(l){return l.length>0})}}class fD extends Hn{constructor(){super(...arguments),this.type="ruler-binned",this.renderType=Q.SVG}showRuler(t,[n,r]){const i=this.parent,s=this.model.getOptions(),{cartesianScales:a}=this.services,o=a.getOrientation(),l=a.getRangeScale(),[c,u]=l.range(),d=a.getDomainScale(),h=d.invert(o===Ht.VERTICAL?n:r),p=R.appendOrSelect(i,"g.ruler").attr("aria-label","ruler"),f=R.appendOrSelect(p,"line.ruler-line"),g=i.selectAll("[role=graphics-symbol]").filter(m=>{if(parseFloat(gt(m,"data.x0"))<=h&&parseFloat(gt(m,"data.x1"))>=h)return!0});if(g.size()>0){this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!Xf(this.elementsToHighlight,g)&&this.hideRuler(),g.dispatch("mouseover"),this.elementsToHighlight=g;const m=D(g.nodes()[0]).datum(),y=parseFloat(gt(m,"data.x0")),v=parseFloat(gt(m,"data.x1")),b=this.model.getActiveDataGroupNames(),O=b.reverse().map(E=>({label:E,value:gt(m,`data.${E}`),class:this.model.getColorClassName({classNameTypes:[et.TOOLTIP],dataGroupName:E})})).filter(E=>E.value!==0);if(O.length>0){this.services.events.dispatchEvent(T.Tooltip.SHOW,{event:t,mousePosition:[n,r],hoveredElement:f,items:[{label:gt(s,"bins.rangeLabel")||"Range",value:`${y} – ${v}`},...O,...x(s,"tooltip","showTotal")===!0?[{label:gt(s,"locale.translations.total")||gt(s,"tooltip.totalLabel")||"Total",value:b.reduce((S,C)=>S+parseFloat(gt(m,`data.${C}`)),0)}]:[]]}),p.attr("opacity",1);const E=d((y+v)/2);o==="horizontal"?f.attr("x1",u).attr("x2",c).attr("y1",E).attr("y2",E):f.attr("y1",u).attr("y2",c).attr("x1",E).attr("x2",E)}else this.hideRuler()}else this.hideRuler()}}class co extends Hn{formatTooltipData(t){return t.reverse()}}const mD=(e,t)=>{const n=e.x,r=e.y,i=t.x,s=t.y,a=lm();return a.moveTo(n,r),a.lineTo(i,s),a.toString()},gD={d:"M7 0v8L0 4z",height:8,width:7.5,id:"arrowLeft"},vD={d:"M0 0v8l7-4z",height:8,width:7.5,id:"arrowRight"},yD={d:"M5.32 9.513a4.75 4.75 0 100-9.5 4.75 4.75 0 000 9.5z",height:10,width:10,id:"circle"},xD={d:"M5.03517654-1e-7l4.99999996 5-4.99999996 5-5-5L2.4517844 2.58339204z",height:10,width:10,id:"diamond"},bD={d:"M0 .44974747h8v8H0v-3.6830331z",height:9,width:8,id:"square"},_D={d:"M0 0h1.5v8H0z",height:8,width:2,id:"tee"};class Hg extends uu{constructor(t,n,r){super(t,n,r),this.type="color-legend",this.renderType=Q.SVG,this.gradient_id=`gradient-id-${Math.floor(Math.random()*99999999999)}`,this.handleAxisCompleteEvent=()=>{const i=this.getComponentContainer(),{width:s}=R.getSVGElementSize(i,{useAttrs:!0}),a=x(this.getOptions(),"data","loading");if(s>It.color.barWidth&&!a){const o=x(this.getOptions(),"heatmap","colorLegend","title"),{cartesianScales:l}=this.services,c=l.getMainXScale().range();if(c[0]>1&&(i.select("g.legend").attr("transform",`translate(${c[0]}, 0)`),o)){const{width:u}=R.getSVGElementSize(i.select("g.legend-title").select("text"),{useBBox:!0}),d=c[0]-u-9;d>1?i.select("g.legend-title").attr("transform",`translate(${d}, 0)`):(i.select("g.legend").attr("transform",`translate(${c[0]}, 16)`),i.select("g.legend-title").attr("transform",`translate(${c[0]}, 0)`))}}else i.select("g.legend-title").attr("transform","translate(0, 0)")},this.chartType=r.chartType}init(){this.chartType==="heatmap"&&this.services.events.addEventListener(T.Axis.RENDER_COMPLETE,this.handleAxisCompleteEvent)}render(t=!1){const n=this.getOptions(),r=this.getComponentContainer({ariaLabel:"legend"}),{width:i}=R.getSVGElementSize(r,{useAttrs:!0}),s=x(n,"color","gradient","colors"),a=x(n,this.chartType,"colorLegend","type");let o=x(n,"color","pairing","option");const l=x(n,"heatmap","colorLegend","title");if(x(this.getOptions(),"data","loading")){r.html("");return}const c=!Be(s),u=Np(this.model.getDisplayData()),d=!(i<=It.color.barWidth),h=d?It.color.barWidth:i,p=R.appendOrSelect(r,"g.legend"),f=R.appendOrSelect(p,"g.legend-axis");if(l){const L=R.appendOrSelect(r,"g.legend-title");R.appendOrSelect(L,"text").text(l).attr("dy","0.7em"),p.attr("transform","translate(0, 16)")}const g=u[0]<0&&u[1]>0?"diverge":"mono";(o<1&&o>4&&g==="mono"||o<1&&o>2&&g==="diverge")&&(o=1);let m=[];const y=g==="diverge"?17:11;if(c)m=s;else for(let L=1;L<y+1;L++)m.push(a===mi.LINEAR?`stop-color-${g}-${o}-${L}`:`fill-${g}-${o}-${L}`);const v=ye(u[0],u[1]),b=HC(v,3),O=Fe().domain(u).range([0,h]),E=gc(O).tickSize(0).tickValues(b),{code:S,number:C}=x(n,"locale");E.tickFormat(L=>C(L,S));let I;switch(a){case mi.LINEAR:this.drawLinear(m,p,h);break;case mi.QUANTIZE:I=this.drawQuantize(m,g,c,p,h),O.range([I,h]);break;default:throw Error("Entered color legend type is not supported.")}f.attr("transform",`translate(0,${It.color.axisYTranslation})`).call(E),f.select(".domain").remove(),f.select("g.tick:last-of-type text").style("text-anchor",d?"middle":"end"),f.select("g.tick:first-of-type text").style("text-anchor",d&&this.chartType!=="choropleth"?"middle":"start")}drawLinear(t,n,r){const i=100/(t.length-1);R.appendOrSelect(n,"linearGradient").attr("id",`${this.gradient_id}-legend`).selectAll("stop").data(t).enter().append("stop").attr("offset",(s,a)=>`${a*i}%`).attr("class",(s,a)=>t[a]).attr("stop-color",s=>s),R.appendOrSelect(n,"rect").attr("width",r).attr("height",It.color.barHeight).style("fill",`url(#${this.gradient_id}-legend)`)}drawQuantize(t,n,r,i,s){!r&&n==="diverge"&&t.splice(t.length/2,1);const a=Yi().domain(t).range([0,s]);return R.appendOrSelect(i,"g.quantized-rect").selectAll("rect").data(a.domain()).join("rect").attr("x",o=>a(o)).attr("y",0).attr("width",Math.max(0,a.bandwidth()-1)).attr("height",It.color.barHeight).attr("class",o=>o).attr("fill",o=>o),(!r&&n)==="mono"?a.bandwidth()-1:0}destroy(){this.chartType==="heatmap"&&this.services.events.removeEventListener(T.Axis.RENDER_COMPLETE,this.handleAxisCompleteEvent)}}class ED extends Es{constructor(){super(...arguments),this.type="meter-title",this.renderType=Q.SVG}render(t=!1){const n=x(this.model.getDisplayData(),0),r=this.getOptions(),i=this.getComponentContainer({ariaLabel:"meter title"}),{groupMapsTo:s}=r.data,a=r.locale.translations.meter.title;if(x(r,"meter","proportional"))this.displayTotal(),this.displayBreakdownTitle();else{const c=i.selectAll("text.meter-title").data(a?[a]:[n[s]]);c.enter().append("text").classed("meter-title",!0).merge(c).attr("x",0).attr("y","1em").text(u=>u),c.exit().remove(),this.appendPercentage()}this.displayStatus();const o=this.getMaxTitleWidth(),l=R.appendOrSelect(i,"text.meter-title");o>0&&l.node().getComputedTextLength()>o&&this.truncateTitle(l,o)}displayBreakdownTitle(){const t=this.getComponentContainer(),n=this.getOptions(),r=this.model.getMaximumDomain(this.model.getDisplayData()),i=x(n,"meter","proportional","total"),s=x(n,"meter","proportional","unit")?x(n,"meter","proportional","unit"):"";let a;if(r===i)a=null;else{const u=i!==null?i-r:r,d=x(n,"meter","proportional","breakdownFormatter"),{code:h,number:p}=x(n,"locale");a=d!==null?d({datasetsTotal:r,total:i}):`${p(r,h)} ${s} used (${p(u,h)} ${s} available)`}const o=t.selectAll("text.proportional-meter-title").data([a]);o.enter().append("text").classed("proportional-meter-title",!0).merge(o).attr("x",0).attr("y","1em").text(u=>u),o.exit().remove();const l=this.getMaxTitleWidth(),c=R.appendOrSelect(t,"text.proportional-meter-title");l>0&&c.node().getComputedTextLength()>l&&this.truncateTitle(c,l)}displayTotal(){const t=this.getComponentContainer(),n=this.getOptions(),r=x(n,"meter","proportional","total"),i=r?x(n,"meter","proportional","total"):this.model.getMaximumDomain(this.model.getDisplayData()),s=x(n,"meter","proportional","unit")?x(n,"meter","proportional","unit"):"",a=x(n,"meter","proportional","totalFormatter"),{code:o,number:l}=x(n,"locale"),c=a!==null?a(i):`${l(r,o)} ${s} total`,u=R.getHTMLElementSize(this.parent.node()).width,d=t.selectAll("text.proportional-meter-total").data([c]);d.enter().append("text").classed("proportional-meter-total",!0).merge(d).attr("x",this.model.getStatus()&&typeof u!="string"?u-Kt.total.paddingRight:u).attr("y","1em").attr("text-anchor","end").text(h=>h),d.exit().remove()}displayStatus(){const t=this,n=this.getComponentContainer(),r=R.getHTMLElementSize(this.parent.node()).width||0,i=this.model.getStatus(),s=Kt.status.indicatorSize/2,a=R.appendOrSelect(n,"g.status-indicator").attr("class",i!==null?`status-indicator status--${i}`:"").attr("transform",`translate(${r-s}, 0)`),o=i?[i]:[],l=a.selectAll("circle.status").data(o);l.enter().append("circle").merge(l).attr("class","status").attr("r",s).attr("cx",0).attr("cy",8);const c=a.selectAll("path.innerFill").data(o);c.enter().append("path").merge(c).attr("d",t.getStatusIconPathString(i)).attr("transform",`translate(-${s}, 0)`).attr("class","innerFill"),c.exit().remove(),l.exit().remove()}appendPercentage(){const t=x(this.model.getDisplayData(),0,"value"),{code:n,number:r}=x(this.getOptions(),"locale"),i=this.getComponentContainer(),s=R.appendOrSelect(i,"text.meter-title"),a=x(this.getOptions(),"meter","statusBar","percentageIndicator","enabled")===!0?[t]:[],o=i.selectAll("text.percent-value").data(a),l=Kt.statusBar.paddingRight;o.enter().append("text").classed("percent-value",!0).merge(o).text(c=>`${c!=null?r(c,n):0}%`).attr("x",+s.attr("x")+s.node().getComputedTextLength()+l).attr("y",s.attr("y")),o.exit().remove()}truncateTitle(t,n){super.truncateTitle(t,n);const r=R.appendOrSelect(this.parent,"tspan"),i=Kt.statusBar.paddingRight,s=Math.ceil(r.node().getComputedTextLength());R.appendOrSelect(this.parent,"text.percent-value").attr("x",+t.attr("x")+t.node().getComputedTextLength()+s+i)}getMaxTitleWidth(){const t=x(this.getOptions(),"meter","proportional"),n=R.getHTMLElementSize(this.parent.node()).width;if(t!==null){const r=R.appendOrSelect(this.parent,"text.proportional-meter-total").node(),i=R.getSVGElementSize(r,{useBBox:!0}).width;return n-i-Kt.total.paddingLeft}else{const r=R.appendOrSelect(this.parent,"text.percent-value"),i=Kt.statusBar.paddingRight,s=r.node().getComputedTextLength(),a=R.appendOrSelect(this.parent,"g.status-indicator").node(),o=R.getSVGElementSize(a,{useBBox:!0}).width+Kt.status.paddingLeft;return n-s-i-o}}getStatusIconPathString(t){switch(t){case pi.SUCCESS:return"M6.875 11.3125 3.75 8.1875 4.74375 7.25 6.875 9.34375 11.50625 4.75 12.5 5.7375 Z";case pi.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case pi.WARNING:return"M7.9375,11.125 C7.41973305,11.125 7,11.544733 7,12.0625 C7,12.580267 7.41973305,13 7.9375,13 C8.45526695,13 8.875,12.580267 8.875,12.0625 C8.875,11.544733 8.45526695,11.125 7.9375,11.125 M7.3125, 3 8.5625, 3 8.5625, 9.875 7.3125, 9.875, 7.3125, 3 Z"}}}class yu extends ht{getBarWidth(){const t=this.getOptions();if(t.bars.width)return t.bars.width;const n=this.model.getDisplayData().length,r=this.services.cartesianScales.getMainXScale(),i=R.getSVGElementSize(this.parent,{useAttrs:!0}).width;if(!r.step){const s=x(t,"bars","spacingFactor");return Math.min(t.bars.maxWidth,i*s/n)}return Math.min(t.bars.maxWidth,r.step()/2)}isOutsideZoomedDomain(t,n){if(this.model.getDisplayData().length<=1)return!1;const r=this.model.get("zoomDomain");if(r!==void 0){const i=this.services.cartesianScales.getDomainScale();return t<i(r[0])||n>i(r[1])}return!1}}class OD extends ht{constructor(){super(...arguments),this.type="circle-pack",this.renderType=Q.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("circle.node").transition("legend-hover-circlepack").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-circlepack"})).attr("opacity",r=>r.data.dataGroupName===n.datum().name?1:Hr.circles.fillOpacity)},this.handleLegendMouseOut=()=>{this.parent.selectAll("circle.node").transition("legend-mouseout-circlepack").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-circlepack"})).attr("opacity",1)}}render(t=!0){const n=this.getComponentContainer({ariaLabel:"circle packs",withinChartClip:!0}),{width:r,height:i}=R.getSVGElementSize(this.parent,{useAttrs:!0});if(r<1||i<1)return;let s=this.model.getDisplayData();const a=this.model.hasParentNode(),o=this.model.getHierarchyLevel(),l=this.getOptions(),c=x(l,"canvasZoom","enabled");a&&x(s,0,"children")&&(s=x(s,0,"children"));const u=ds({children:s}).sum(f=>f.value).sort((f,g)=>g.value-f.value),d=kL().size([r,i]).padding(f=>f.depth>=1?Hr.padding.children+3:Hr.padding.mainGroup+3)(u).descendants().splice(1).filter(f=>f.depth<=o),h=n.selectAll("circle.node").data(d);h.exit().attr("width",0).attr("height",0).remove();const p=h.enter().append("circle").classed("node",!0);p.merge(h).attr("class",f=>{const g=c&&o===3?this.getZoomClass(f):"";return this.model.getColorClassName({classNameTypes:[et.FILL,et.STROKE],dataGroupName:f.data.dataGroupName,originalClassName:f.children?`node ${g}`:`node node-leaf ${g}`})}).style("fill",f=>this.model.getFillColor(f.data.dataGroupName,null,f.data)).style("stroke",f=>this.model.getFillColor(f.data.dataGroupName,null,f.data)).attr("cx",f=>f.x).attr("cy",f=>f.y).transition("circlepack-leaf-update-enter").call(f=>this.services.transitions.setupTransition({transition:f,name:"circlepack-leaf-update-enter"})).attr("r",f=>f.r).attr("opacity",1).attr("fill-opacity",Hr.circles.fillOpacity),c===!0&&this.focal&&(this.services.canvasZoom.zoomIn(this.focal,p,Br),this.setBackgroundListeners()),a||this.addLegendListeners(),this.addEventListeners()}unhighlightChildren(t){const n=t.map(r=>r.data);this.parent.selectAll("circle.node").filter(r=>n.some(i=>i===r.data)&&r.depth>1).style("stroke",r=>this.model.getFillColor(r.data.dataGroupName,null,r.data))}highlightChildren(t){const n=t.map(r=>r.data);this.parent.selectAll("circle.node").filter(r=>n.some(i=>i===r.data)&&r.depth>1).style("stroke",Hr.circles.hover.stroke)}getZoomClass(t){return this.model.getHierarchyLevel()===3&&this.focal&&(t.data===this.focal.data||this.focal.children.some(n=>n.data===t.data))?"focal":"non-focal"}addLegendListeners(){const{events:t}=this.services;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}removeBackgroundListeners(){D(this.services.domUtils.getMainContainer()).on("click",()=>null)}setBackgroundListeners(){const t=D(this.services.domUtils.getMainContainer()),n=this,r=this.parent.selectAll("circle.node");t.on("click",()=>{n.focal=null,n.model.updateHierarchyLevel(2),t.classed("zoomed-in",!1),n.services.canvasZoom.zoomOut(r,Br)})}getZoomIcon(){return`
65
+ </svg>`}destroy(){this.parent.selectAll("path.line,.node-group").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null)}}class tn extends Mt{constructor(){super(...arguments),this.type="grid",this.renderType=ft.SVG}render(t=!0){const n=_(this.getOptions(),"grid","x","enabled"),r=_(this.getOptions(),"grid","y","enabled");this.drawBackdrop(n,r),!(!n&&!r)&&(n&&(B.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(t)),r&&(B.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(t)))}drawXGrid(t){const n=this.parent,r=this.backdrop.attr("height"),i=this.services.cartesianScales.getMainXScale(),a=xu(i).tickSizeInner(-r).tickSizeOuter(0);if(_(this.getOptions(),"grid","x","alignWithAxisTicks")){const o=this.services.cartesianScales.getDomainAxisPosition(),l=_(this.getOptions(),"axes",o,"ticks","values");l&&a.tickValues(l)}else{const o=_(this.getOptions(),"grid","x","numberOfTicks");a.ticks(o)}const s=n.select(".x.grid").attr("transform",`translate(${-this.backdrop.attr("x")}, ${r})`);t?s.transition().call(o=>this.services.transitions.setupTransition({transition:o,name:"grid-update",animate:t})).call(a):s.call(a),this.cleanGrid(s)}drawYGrid(t){const n=this.parent,r=this.backdrop.attr("width"),i=this.services.cartesianScales.getMainYScale(),a=cg(i).tickSizeInner(-r).tickSizeOuter(0);if(_(this.getOptions(),"grid","y","alignWithAxisTicks")){const o=this.services.cartesianScales.getRangeAxisPosition(),l=_(this.getOptions(),"axes",o,"ticks","values");l&&a.tickValues(l)}else{const o=_(this.getOptions(),"grid","y","numberOfTicks");a.ticks(o)}const s=n.select(".y.grid").attr("transform",`translate(0, ${-this.backdrop.attr("y")})`);t?s.transition().call(o=>this.services.transitions.setupTransition({transition:o,name:"grid-update",animate:t})).call(a):s.call(a),this.cleanGrid(s)}getGridlineThreshold(t){const n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((u,d)=>Number(ir(u).tx)-Number(ir(d).tx));let i=-1;if(!r.length)return;r.forEach(u=>{t[0]>=+ir(u).tx&&i++});const a=i+1<r.length?i+1:r.length,s=r[i],o=r[a];let l;if(!s)l=+ir(o).tx;else if(o)l=+ir(o).tx-+ir(s).tx;else{const u=n.select("rect.chart-grid-backdrop").node();l=B.getSVGElementSize(u).width-+ir(s).tx}const{threshold:c}=this.getOptions().tooltip.gridline;return l*c}getActiveGridline(t){const n=_(this.getOptions,"tooltip","gridline","threshold"),r=n||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter(function(){const i=ir(this),a={min:Number(i.tx)-r,max:Number(i.tx)+r};return a.min<=t[0]&&t[0]<=a.max})}drawBackdrop(t,n){const r=this.parent,i=this.services.cartesianScales.getMainXScale(),a=this.services.cartesianScales.getMainYScale(),[s,o]=i.range(),[l,c]=a.range();this.backdrop=B.appendOrSelect(r,"svg.chart-grid-backdrop").attr("role","presentation");const u=B.appendOrSelect(this.backdrop,t||n?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(u).attr("x",s).attr("y",c).attr("width",Math.abs(o-s)).attr("height",Math.abs(l-c)).lower(),u.attr("width","100%").attr("height","100%")}cleanGrid(t){t.selectAll("text").remove(),t.select(".domain").remove()}}class Wv extends Mt{constructor(){super(...arguments),this.type="area",this.renderType=ft.SVG,this.gradient_id="gradient-id-"+Math.floor(Math.random()*99999999999),this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("path.area").transition("legend-hover-area").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-area"})).attr("opacity",r=>r.name!==n.datum().name?nr.opacity.unselected:nr.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.area").transition("legend-mouseout-area").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-area"})).attr("opacity",nr.opacity.selected)}}init(){const t=this.services.events;t.addEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"area graphs",withinChartClip:!0}),r=this.getOptions();let i=[0,0];const{cartesianScales:a}=this.services,s=a.getOrientation(),o=sh().curve(this.services.curves.getD3Curve()).defined(T=>{const S=a.getRangeIdentifier();return T[S]!=null}),l=this.model.getGroupedData(this.configs.groups),c=_(r,"bounds"),u=c&&l&&l.length===1;!u&&c&&console.warn(`Bounds can only be shown when having 1 single datagroup, you've supplied ${l.length}`);let d=0;const h=(T,S)=>{_(r,"axes",T,"includeZero")===!1&&S[0]>0&&S[1]>0&&(d=S[0])},p=T=>u?a.getBoundedScaledValues(T)[0]:a.getRangeValue(d),f=T=>u?a.getBoundedScaledValues(T)[1]:a.getRangeValue(T);s===fe.VERTICAL?(i=a.getMainYScale().domain(),h(a.getMainYAxisPosition(),i),o.x(T=>a.getDomainValue(T)).y0(T=>p(T)).y1(T=>f(T))):(i=a.getMainXScale().domain(),h(a.getMainXAxisPosition(),i),o.x0(T=>p(T)).x1(T=>f(T)).y(T=>a.getDomainValue(T)));const v=_(r,"color","gradient","enabled"),m=l&&l.length===1&&v;l.length>1&&v&&console.error("Gradients can only be enabled when having 1 single dataset");const y=n.selectAll("path.area").data(l,T=>T.name),g=U(this.services.domUtils.getMainContainer());if(y.exit().attr("opacity",0).remove(),!l.length)return;if(m){const T=g.select(`path.${this.model.getColorClassName({classNameTypes:[mt.STROKE],dataGroupName:l[0].name})}`).node();let S;if(T)S=getComputedStyle(T,null).getPropertyValue("stroke");else{const D=_(this.model.getOptions(),"color","scale");if(D!==null){const P=Object.keys(D);S=D[P[0]]}}bu.appendOrUpdateLinearGradient({svg:this.parent,id:this.services.domUtils.generateElementIDString(`${l[0].name.replace(" ","")}_${this.gradient_id}`),x1:"0%",x2:"0%",y1:"0%",y2:"100%",stops:bu.getStops(i,S)})}else this.parent.selectAll("defs linearGradient").empty()||this.parent.selectAll("defs linearGradient").each(function(){this.parentNode.remove()});const x=this,O=y.enter().append("path");m?O.merge(y).style("fill",T=>`url(#${this.services.domUtils.generateElementIDString(`${T.name.replace(" ","")}_${this.gradient_id}`)})`).attr("class","area").attr("class",T=>this.model.getColorClassName({classNameTypes:[mt.FILL],dataGroupName:T.name,originalClassName:"area"})).attr("d",T=>{const{data:S}=T;return o(S)}):(O.attr("opacity",0).merge(y).attr("class","area").attr("class",T=>this.model.getColorClassName({classNameTypes:[mt.FILL,mt.STROKE],dataGroupName:T.name,originalClassName:"area"})).style("fill",T=>x.model.getFillColor(T.name,null,T.data)).transition().call(T=>this.services.transitions.setupTransition({transition:T,name:"area-update-enter",animate:t})).attr("opacity",u?1:nr.opacity.selected).attr("d",T=>{const{data:S}=T;return o(S)}),u&&O.attr("fill-opacity",nr.opacity.selected).style("stroke",T=>x.model.getStrokeColor(T.name,null,T.data)).style("stroke-dasharray","2, 2").attr("stroke-width",.7+"px"))}destroy(){const t=this.services.events;t.removeEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class ia extends Mt{constructor(){super(...arguments),this.type="line",this.renderType=ft.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("path.line").transition("legend-hover-line").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-line"})).attr("opacity",r=>r.name!==n.datum().name?rr.opacity.unselected:rr.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.line").transition("legend-mouseout-line").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-line"})).attr("opacity",rr.opacity.selected)}}init(){const{events:t}=this.services;t.addEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"lines",withinChartClip:!0}),{cartesianScales:r,curves:i}=this.services,a=p=>r.getDomainValue(p),s=p=>r.getRangeValue(p),[o,l]=ar(a,s,r.getOrientation()),c=this.getOptions(),u=vs().x(o).y(l).curve(i.getD3Curve()).defined(p=>{const f=r.getRangeIdentifier(p);return p[f]!=null});let d=[];if(this.configs.stacked){const p=Object.keys(c.axes).some(v=>c.axes[v].percentage),{groupMapsTo:f}=c.data;d=this.model.getStackedData({groups:this.configs.groups,percentage:p}).map(v=>{const m=this.services.cartesianScales.getDomainIdentifier(v),y=this.services.cartesianScales.getRangeIdentifier(v);return{name:_(v,0,f),data:v.map(g=>({[m]:g.data.sharedStackKey,[f]:g[f],[y]:g[1]})),hidden:!QA(v,g=>g[0]!==g[1])}})}else d=this.model.getGroupedData(this.configs.groups);const h=n.selectAll("path.line").data(d,p=>p.name);h.exit().attr("opacity",0).remove(),h.enter().append("path").classed("line",!0).attr("opacity",0).merge(h).data(d,p=>p.name).attr("class",p=>this.model.getColorClassName({classNameTypes:[mt.STROKE],dataGroupName:p.name,originalClassName:"line"})).style("stroke",p=>this.model.getStrokeColor(p.name,null,p.data)).attr("role",Tt.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",p=>{const{data:f}=p;return f.map(v=>{const m=this.services.cartesianScales.getRangeIdentifier(v);return v[m]}).join(",")}).transition().call(p=>this.services.transitions.setupTransition({transition:p,name:"line-update-enter",animate:t})).attr("opacity",p=>p.hidden?0:1).attr("d",p=>{const{data:f}=p;return u(f)})}destroy(){const t=this.services.events;t.removeEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}const Yv=5;function SD(e,t){return e>t-Yv&&e<t+Yv}class wr extends Mt{constructor(){super(...arguments),this.type="ruler",this.renderType=ft.SVG,this.isXGridEnabled=_(this.getOptions(),"grid","x","enabled"),this.isYGridEnabled=_(this.getOptions(),"grid","y","enabled"),this.isEventListenerAdded=!1}render(t=!1){const n=_(this.getOptions(),"ruler","enabled");this.drawBackdrop(),n&&!this.isEventListenerAdded?this.addBackdropEventListeners():!n&&this.isEventListenerAdded&&this.removeBackdropEventListeners()}removeBackdropEventListeners(){this.isEventListenerAdded=!1,this.backdrop.on("mousemove mouseover mouseout",null)}formatTooltipData(t){return t}showRuler(t,[n,r]){const i=this.parent,a=this.services.cartesianScales.getOrientation(),s=this.model.getDisplayData(),o=this.services.cartesianScales.getRangeScale(),[l,c]=o.range(),u=a===fe.HORIZONTAL?r:n,d=B.appendOrSelect(i,"g.ruler").attr("aria-label","ruler"),h=B.appendOrSelect(d,"line.ruler-line"),p=i.selectAll("[role=graphics-symbol]"),f=s.map(m=>({domainValue:this.services.cartesianScales.getDomainValue(m),originalData:m})).filter(m=>SD(m.domainValue,u));if(this.pointsWithinLine&&f.length===this.pointsWithinLine.length&&f.map(m=>m.domainValue).join()===this.pointsWithinLine.map(m=>m.domainValue).join())return this.pointsWithinLine=f,this.services.events.dispatchEvent(w.Tooltip.MOVE,{mousePosition:[n,r]});this.pointsWithinLine=f;const v=this.pointsWithinLine.reduce((m,y)=>{if(m.length===0)return m.push(y),m;const g=m[0].domainValue,x=Math.abs(u-y.domainValue),O=Math.abs(u-g);return x>O||(x<O?m=[y]:m.push(y)),m},[]);if(v.length>0){const m=v.map(O=>O.originalData).filter(O=>{const T=this.services.cartesianScales.getRangeIdentifier(O);return O[T]!=null}),y=v.map(O=>O.domainValue),g=p.filter(O=>{const T=this.services.cartesianScales.getDomainValue(O);return y.includes(T)});this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!sg(this.elementsToHighlight,g)&&this.hideRuler(),g.dispatch("mouseover"),this.elementsToHighlight=g,this.services.events.dispatchEvent(w.Tooltip.SHOW,{event:t,mousePosition:[n,r],hoveredElement:h,data:this.formatTooltipData(m)}),d.attr("opacity",1);const x=v[0];a==="horizontal"?h.attr("x1",c).attr("x2",l).attr("y1",x.domainValue).attr("y2",x.domainValue):h.attr("y1",c).attr("y2",l).attr("x1",x.domainValue).attr("x2",x.domainValue)}else this.hideRuler()}hideRuler(){const t=this.parent,n=B.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(w.Tooltip.HIDE),n.attr("opacity",0)}addBackdropEventListeners(){this.isEventListenerAdded=!0;const t=this,n=this.services.domUtils.getHolder(),r=this.model.getDisplayData();let i=function(a){const s=Xr(a,t.parent.node());t.showRuler(a,s)};if(r.length>100){const a=r.length%50*12.5;i=O$(function(s){const{mousePosition:o}=this;t.showRuler(s,o)},a,n)}this.backdrop.on("mousemove mouseover",i).on("mouseout",this.hideRuler.bind(this))}drawBackdrop(){const t=this.parent;this.backdrop=B.appendOrSelect(t,"svg.chart-grid-backdrop")}}let zn=class extends Mt{constructor(){super(...arguments),this.type="scatter",this.renderType=ft.SVG,this.handleChartHolderOnHover=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("chart-holder-hover-scatter").call(t=>{var n;return(n=this.services.transitions)==null?void 0:n.setupTransition({transition:t,name:"chart-holder-hover-scatter"})}).attr("opacity",1)},this.handleChartHolderOnMouseOut=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("chart-holder-mouseout-scatter").call(t=>{var n;return(n=this.services.transitions)==null?void 0:n.setupTransition({transition:t,name:"chart-holder-mouseout-scatter"})}).attr("opacity",0)},this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("legend-hover-scatter").call(i=>{var a;return(a=this.services.transitions)==null?void 0:a.setupTransition({transition:i,name:"legend-hover-scatter"})}).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("legend-mouseout-scatter").call(t=>{var n;return(n=this.services.transitions)==null?void 0:n.setupTransition({transition:t,name:"legend-mouseout-scatter"})}).attr("opacity",1)}}init(){const{events:t}=this.services;if(!t)throw new Error("Services events are undefined.");t.addEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut);const{fadeInOnChartHolderMouseover:n}=this.configs;n&&(t.addEventListener(w.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(w.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))}filterBasedOnZoomDomain(t){const{cartesianScales:n}=this.services;if(!n)throw new Error("Services cartesianScales are undefined.");const r=n.getDomainIdentifier(t),i=this.model.get("zoomDomain");return i!==void 0?t.filter(a=>a[r].getTime()>=i[0].getTime()&&a[r].getTime()<=i[1].getTime()):t}getScatterData(){const t=this.getOptions(),{stacked:n}=this.configs;let r;if(n){const i=Object.keys(t.axes).some(a=>t.axes[a].percentage);r=this.model.getStackedData({groups:this.configs.groups,percentage:i})}else{const{cartesianScales:i}=this.services;if(!i)throw new Error("Services cartesianScales are undefined.");r=this.model.getDisplayData(this.configs.groups).filter(a=>{const s=i.getRangeIdentifier(a);return a[s]!==void 0&&a[s]!==null})}return this.filterBasedOnZoomDomain(r)}render(t){if(!(_(this.getOptions(),"points","enabled")||_(this.getOptions(),"bubble","enabled")))return;const n=this.getComponentContainer({ariaLabel:"scatter points",withinChartClip:!0}),r=this.getOptions(),{groupMapsTo:i}=r.data,{cartesianScales:a}=this.services;if(!a)throw new Error("Services cartesianScales are undefined.");const s=a.getDomainIdentifier(),o=n.selectAll("circle.dot").data(this.getScatterData(),c=>`${c[i]}-${c[s]}`);o.exit().attr("opacity",0).remove();const l=o.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(o);this.styleCircles(l,t),this.addEventListeners()}isDatapointThresholdAnomaly(t){const{handleThresholds:n}=this.configs;if(!n)return!1;const{cartesianScales:r}=this.services;if(!r)throw new Error("Cartesian scales service is undefined");const i=r.getOrientation(),[a,s]=ar(r.getHighestDomainThreshold(),r.getHighestRangeThreshold(),i),[o,l]=ar(d=>r.getDomainValue(d),d=>r.getRangeValue(d),i),c=o(t),u=l(t);return s&&a?u<=s.scaleValue&&c>=a.scaleValue:s?u<=s.scaleValue:a?c>=a.scaleValue:!1}styleCircles(t,n){const r=this.getOptions(),{filled:i,fillOpacity:a}=r.points,{cartesianScales:s}=this.services;if(!s)throw new Error("Cartesian scales service is undefined");const{groupMapsTo:o}=r.data,l=p=>s.getDomainValue(p),c=p=>s.getRangeValue(p),[u,d]=ar(l,c,s.getOrientation()),{fadeInOnChartHolderMouseover:h}=this.configs;t.raise().classed("dot",!0).attr("class",p=>{const f=s.getDomainIdentifier(p),v=this.model.getIsFilled(p[o],p[f],p,i)?[mt.FILL,mt.STROKE]:[mt.STROKE];return this.model.getColorClassName({classNameTypes:v,dataGroupName:p[o],originalClassName:"dot"})||""}).classed("threshold-anomaly",p=>this.isDatapointThresholdAnomaly(p)).classed("filled",p=>{const f=s.getDomainIdentifier(p);return this.model.getIsFilled(p[o],p[f],p,i)}).classed("unfilled",p=>{const f=s.getDomainIdentifier(p);return!this.model.getIsFilled(p[o],p[f],p,i)}).transition().call(p=>{var f;return(f=this.services.transitions)==null?void 0:f.setupTransition({transition:p,name:"scatter-update-enter",animate:n})}).attr("cx",u).attr("cy",d).attr("r",r.points.radius).style("fill",p=>{const f=s.getDomainIdentifier(p);if(this.model.getIsFilled(p[o],p[f],p,i))return this.model.getFillColor(p[o],p[f],p)}).style("stroke",p=>{const f=s.getDomainIdentifier(p);return this.model.getStrokeColor(p[o],p[f],p)}).attr("fill-opacity",i?a:1).attr("opacity",h?0:1).attr("role",Tt.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",p=>{const f=s.getRangeIdentifier(p);return p[f]}),this.addEventListeners()}getTooltipAdditionalItems(t){return null}addEventListeners(){const t=this,{groupMapsTo:n}=t.getOptions().data;if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle").on("mouseover",function(r,i){var a,s;const o=U(this);o.classed("hovered",!0).attr("class",l=>t.model.getColorClassName({classNameTypes:[mt.FILL],dataGroupName:l[n],originalClassName:o.attr("class")})).style("fill",l=>{var c;const u=(c=t.services.cartesianScales)==null?void 0:c.getDomainIdentifier(l);return t.model.getFillColor(l[n],l[u],l)}).classed("unfilled",!1),(a=t.services.events)==null||a.dispatchEvent(w.Tooltip.SHOW,{event:r,hoveredElement:o,data:[i],additionalItems:t.getTooltipAdditionalItems(i)}),(s=t.services.events)==null||s.dispatchEvent(w.Scatter.SCATTER_MOUSEOVER,{event:r,element:o,datum:i})}).on("mousemove",function(r,i){var a,s;const o=U(this);(a=t.services.events)==null||a.dispatchEvent(w.Scatter.SCATTER_MOUSEMOVE,{event:r,element:o,datum:i}),(s=t.services.events)==null||s.dispatchEvent(w.Tooltip.MOVE,{event:r})}).on("click",function(r,i){var a;(a=t.services.events)==null||a.dispatchEvent(w.Scatter.SCATTER_CLICK,{event:r,element:U(this),datum:i})}).on("mouseout",function(r,i){var a,s,o;const l=U(this);if(l.classed("hovered",!1),!t.configs.filled){const{filled:c}=t.getOptions().points,u=(a=t.services.cartesianScales)==null?void 0:a.getDomainIdentifier(i),d=t.model.getIsFilled(i[n],i[u],i,c);l.classed("unfilled",!d).style("fill",h=>d||c?t.model.getFillColor(h[n],h[u],h):null)}(s=t.services.events)==null||s.dispatchEvent(w.Scatter.SCATTER_MOUSEOUT,{event:r,element:l,datum:i}),(o=t.services.events)==null||o.dispatchEvent(w.Tooltip.HIDE,{hoveredElement:l})})}destroy(){var t;(t=this.parent)==null||t.selectAll("circle").on("mousemove",null).on("mouseout",null);const{events:n}=this.services;if(!n)throw new Error("Services events undefined");n.removeEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),n.removeEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),n.removeEventListener(w.Chart.MOUSEOVER,this.handleChartHolderOnHover),n.removeEventListener(w.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)}};class qv extends Mt{constructor(t,n,r){super(t,n,r),this.type="axes",this.renderType=ft.SVG,this.truncation={[Z.LEFT]:!1,[Z.RIGHT]:!1,[Z.TOP]:!1,[Z.BOTTOM]:!1},r&&(this.configs=r),this.margins=this.configs.margins}render(t=!0){const{position:n}=this.configs,r=this.getOptions(),i=_(r,"axes",n,"visible"),a=this.getComponentContainer({ariaLabel:"axes"}),{width:s,height:o}=B.getSVGElementSize(a,{useAttrs:!0}),l=B.appendOrSelect(a,`g.axis.${n}`);let c,u;if(n===Z.BOTTOM||n===Z.TOP?(c=this.configs.axes[Z.LEFT]?this.margins.left:0,u=this.configs.axes[Z.RIGHT]?s-this.margins.right:s):(c=o-this.margins.bottom,u=this.margins.top),!this.services.cartesianScales)throw new Error("Services cartesianScales undefined");const d=this.services.cartesianScales.getScaleByPosition(n);this.scaleType===pt.LABELS||this.scaleType===pt.LABELS_RATIO?d.rangeRound([c,u]):d.range([c,u]);let h;switch(n){case Z.LEFT:h=cg;break;case Z.BOTTOM:h=xu;break;case Z.RIGHT:h=oR;break;case Z.TOP:h=sR;break}l.attr("aria-label",`${n} axis`);const p=!l.select("g.ticks").empty();let f=B.appendOrSelect(l,"g.ticks");p||(f.attr("role",`${Tt.GRAPHICS_OBJECT} ${Tt.GROUP}`),f.attr("aria-label",`${n} ticks`));const v=B.appendOrSelect(l,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label",`invisible ${n} ticks`),m=_(r,"axes",n),y=this.scaleType===pt.TIME||m.scaleType===pt.TIME,g=n===Z.LEFT||n===Z.RIGHT,x=this.model.get("zoomDomain");if(x&&y&&!g&&d.domain(x),!i){f.attr("aria-hidden",!0);return}const O=_(m,"scaleType"),T=_(r,"data","loading"),S=_(m,"ticks","number"),D=_(m,"ticks","values"),P=_(m,"truncation","type"),I=_(m,"truncation","threshold"),N=_(m,"truncation","numCharacter"),M=S!==null,q=_(r,"timeScale"),H=B.appendOrSelect(v,"g.tick"),G=B.appendOrSelect(H,"text").text("0"),E=B.getSVGElementSize(G.node(),{useBBox:!0}).height;H.remove();const L=this.scaleType||m.scaleType||pt.LINEAR,$=h(d).tickSizeOuter(0);if(d.ticks){let J;if(M?J=S:(J=_r.ticks.number,g&&(J=this.getNumberOfFittingTicks(o,E,_r.ticks.verticalSpaceRatio))),d.ticks().length===1&&d.ticks()[0]===0&&(J=0),$.ticks(J),y)if(!d.ticks(J).length)$.tickValues([]);else{const at=_(r,"timeScale","addSpaceOnEdges"),ht=_(r,"axes",n,"domain"),Y=d.copy();at&&!ht&&Y.nice(J);const lt=Y.ticks(J);at&&lt.length>2&&!ht&&(lt.splice(lt.length-1,1),lt.splice(0,1)),$.tickValues(lt)}}let V;const F=_(m,"ticks","formatter"),{code:rt,number:A}=_(r,"locale");if(y){const J=Qc($.tickValues(),_(r,"timeScale","timeInterval"));F===null?V=(at,ht)=>Kc(at,ht,$.tickValues(),J,q,r.locale):V=(at,ht)=>{const Y=Kc(at,ht,$.tickValues(),J,q,r.locale);return F(at,ht,Y)}}else F===null?L===pt.LINEAR&&(V=J=>A(J,rt)):V=F;$.tickFormat(V);const[j,et]=this.services.cartesianScales.getScaleByPosition(n).domain();let ct;if(D){if(y)D.forEach((J,at)=>{J.getTime===void 0&&(D[at]=new Date(J))}),ct=D.filter(J=>{const at=J.getTime();return at>=new Date(j).getTime()&&at<=new Date(et).getTime()});else if(O===pt.LABELS){const J=this.services.cartesianScales.getScaleByPosition(n).domain();ct=D.filter(at=>J.includes(at))}else ct=D.filter(J=>J>=j&&J<=et);$.tickValues(ct)}switch(n){case Z.LEFT:f.attr("transform",`translate(${this.margins.left}, 0)`);break;case Z.BOTTOM:f.attr("transform",`translate(0, ${o-this.margins.bottom})`);break;case Z.RIGHT:f.attr("transform",`translate(${s-this.margins.right}, 0)`);break;case Z.TOP:f.attr("transform",`translate(0, ${this.margins.top})`);break}const it=this.model.isDataEmpty();if(m.title){const J=B.appendOrSelect(l,"text.axis-title").html(it||T?"":Gn(m.title)),at=_(m,"titleOrientation");let ht;switch(n){case Z.LEFT:at===Ls.RIGHT?J.attr("transform","rotate(90)").attr("y",0).attr("x",d.range()[0]/2).attr("dy","-0.5em").style("text-anchor","middle"):J.attr("transform","rotate(-90)").attr("y",0).attr("x",-(d.range()[0]/2)).attr("dy","0.75em").style("text-anchor","middle");break;case Z.BOTTOM:J.attr("transform",`translate(${this.margins.left/2+d.range()[1]/2}, ${o+4})`).style("text-anchor","middle");break;case Z.RIGHT:at===Ls.LEFT?J.attr("transform","rotate(-90)").attr("y",s).attr("x",-(d.range()[0]/2)).style("text-anchor","middle"):J.attr("transform","rotate(90)").attr("y",-s).attr("x",d.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case Z.TOP:ht=B.getSVGElementSize(J,{useBBox:!0}).height,J.attr("transform",`translate(${this.margins.left/2+d.range()[1]/2}, ${ht/2})`).style("text-anchor","middle");break}}if(y){const J=Qc($.tickValues(),_(r,"timeScale","timeInterval")),at=q.showDayName,ht=f;t&&(f=f.transition().call(Y=>this.services.transitions.setupTransition({transition:Y,name:"axis-update",animate:t}))),f=f.call($),ht.selectAll(".tick").data($.tickValues(),d).order().select("text").attr("class",(Y,lt)=>jf(Y,lt,$.tickValues(),J,at)?"tick-label--primary":"tick-label")}else!t||!p?f=f.call($):f=f.transition().call(J=>this.services.transitions.setupTransition({transition:J,name:"axis-update",animate:t})).call($);if(v.call($),n===Z.BOTTOM||n===Z.TOP){let J=!1;const at=_(m,"ticks","rotation");if(at===ma.ALWAYS)J=!0;else if(at===ma.NEVER)J=!1;else if(!at||at===ma.AUTO)if(d.step)J=v.selectAll("g.tick text").nodes().some(ht=>B.getSVGElementSize(ht,{useBBox:!0}).width>=d.step());else{J=!1;const ht=v.append("text").text("A"),Y=B.getSVGElementSize(ht.node(),{useBBox:!0}).width;let lt;v.selectAll("g.tick").each(function(){const _t=U(this),K=parseFloat(_(ir(this),"tx"));K!==null&&lt+_t.text().length*Y*.8>=K&&(J=!0),lt=K}),ht.remove()}J?(M||($.ticks(this.getNumberOfFittingTicks(s,E,_r.ticks.horizontalSpaceRatio)),v.call($),f.call($)),l.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").attr("text-anchor",n===Z.TOP?"start":"end")):l.selectAll("g.ticks g.tick text").attr("transform",null).attr("text-anchor",null)}if(T?l.attr("opacity",0):l.attr("opacity",1),f.selectAll("g.tick").attr("aria-label",J=>J),v.selectAll("g.tick").attr("aria-label",J=>J),P!==an.NONE&&O===pt.LABELS&&!D){const J=this.services.cartesianScales.getScaleDomain(n);if(J.length>0){const at=a.select(`g.axis.${n} g.ticks g.tick`).html();l.selectAll("g.ticks g.tick").html(at);const ht=this;l.selectAll("g.tick text").data(J).text(function(Y){return Y.length>I?(ht.truncation[n]=!0,Wa(Y,P,N)):Y}),this.getInvisibleAxisRef().selectAll("g.tick text").data(J).text(function(Y){return Y.length>I?Wa(Y,P,N):Y}),l.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),l.selectAll("g.tick text").data(J)}}this.addEventListeners()}addEventListeners(){const t=this.getComponentContainer(),{position:n}=this.configs,r=B.appendOrSelect(t,`g.axis.${n}`),i=this.getOptions(),a=_(i,"axes",n),s=_(a,"scaleType"),o=_(a,"truncation","threshold"),l=this;r.selectAll("g.tick text").on("mouseover",function(c,u){l.services.events.dispatchEvent(w.Axis.LABEL_MOUSEOVER,{event:c,element:U(this),datum:u}),s===pt.LABELS&&u.length>o&&l.services.events.dispatchEvent(w.Tooltip.SHOW,{event:c,hoveredElement:U(this),content:u})}).on("mousemove",function(c,u){l.services.events.dispatchEvent(w.Axis.LABEL_MOUSEMOVE,{event:c,element:U(this),datum:u}),s===pt.LABELS&&u.length>o&&l.services.events.dispatchEvent(w.Tooltip.MOVE,{event:c})}).on("click",function(c,u){l.services.events.dispatchEvent(w.Axis.LABEL_CLICK,{event:c,element:U(this),datum:u})}).on("mouseout",function(c,u){l.services.events.dispatchEvent(w.Axis.LABEL_MOUSEOUT,{event:c,element:U(this),datum:u}),s===pt.LABELS&&l.services.events.dispatchEvent(w.Tooltip.HIDE)})}getInvisibleAxisRef(){const{position:t}=this.configs;return this.getComponentContainer().select(`g.axis.${t} g.ticks.invisible`)}getTitleRef(){const{position:t}=this.configs;return this.getComponentContainer().select(`g.axis.${t} text.axis-title`)}getNumberOfFittingTicks(t,n,r){const i=Math.floor(t/(n*r));return ag(i,2,_r.ticks.number)}destroy(){const t=this.getComponentContainer(),{position:n}=this.configs;B.appendOrSelect(t,`g.axis.${n}`).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)}}class wD extends qv{constructor(t,n,r){super(t,n,r)}render(t=!0){super.render(t),super.destroy();const n=this.configs.position,r=this.getComponentContainer({ariaLabel:"axes"}),i=B.appendOrSelect(r,`g.axis.${n}`),a=this;i.selectAll("g.tick").each(function(s,o){const l=U(this);l.classed("tick-hover",!0).attr("tabindex",o===0?0:-1);const c=l.select("text"),{width:u,height:d}=B.getSVGElementSize(c,{useBBox:!0}),h=B.appendOrSelect(l,"rect.axis-holder");let p=0,f=0;switch(n){case Z.LEFT:p=-u+Number(c.attr("x")),f=-(d/2);break;case Z.RIGHT:p=Math.abs(Number(c.attr("x"))),f=-(d/2);break;case Z.TOP:p=-(u/2),f=-d+Number(c.attr("y"))/2,a.truncation[n]&&(p=0,h.attr("transform","rotate(-45)"));break;case Z.BOTTOM:p=-(u/2),f=d/2-2,a.truncation[n]&&(p=-u,h.attr("transform","rotate(-45)"));break}h.attr("x",p-_r.hover.rectanglePadding).attr("y",f).attr("width",u+_r.hover.rectanglePadding*2).attr("height",d).lower()}),this.addEventListeners()}addEventListeners(){const t=this.getComponentContainer(),{position:n}=this.configs,r=B.appendOrSelect(t,`g.axis.${n}`),i=this.getOptions(),a=_(i,"axes",n),s=_(a,"scaleType"),o=_(a,"truncation","threshold"),l=this;r.selectAll("g.tick.tick-hover").on("mouseover",function(c){const u=U(this).select("text"),d=u.datum();l.services.events.dispatchEvent(w.Axis.LABEL_MOUSEOVER,{event:c,element:u,datum:d}),s===pt.LABELS&&d.length>o&&l.services.events.dispatchEvent(w.Tooltip.SHOW,{event:c,element:u,datum:d})}).on("mousemove",function(c){const u=U(this).select("text"),d=u.datum();l.services.events.dispatchEvent(w.Axis.LABEL_MOUSEMOVE,{event:c,element:u,datum:d}),l.services.events.dispatchEvent(w.Tooltip.MOVE,{event:c})}).on("click",function(c){l.services.events.dispatchEvent(w.Axis.LABEL_CLICK,{event:c,element:U(this).select("text"),datum:U(this).select("text").datum()})}).on("mouseout",function(c){l.services.events.dispatchEvent(w.Axis.LABEL_MOUSEOUT,{event:c,element:U(this).select("text"),datum:U(this).select("text").datum()}),s===pt.LABELS&&l.services.events.dispatchEvent(w.Tooltip.HIDE)}).on("focus",function(c){const u={clientX:0,clientY:0};if(c.target){c.target.focus();const d=c.target.getBoundingClientRect();u.clientX=d.x,u.clientY=d.y}l.services.events.dispatchEvent(w.Axis.LABEL_FOCUS,{event:{...c,...u},element:U(this),datum:U(this).select("text").datum()})}).on("blur",function(c){l.services.events.dispatchEvent(w.Axis.LABEL_BLUR,{event:c,element:U(this),datum:U(this).select("text").datum()})}).on("keydown",function(c){c.key&&c.key==="Escape"&&(l.services.events.dispatchEvent(w.Tooltip.HIDE),l.services.events.dispatchEvent(w.Axis.LABEL_BLUR,{event:c,element:U(this),datum:U(this).select("text").datum()})),n===Z.LEFT||n===Z.RIGHT?c.key&&c.key==="ArrowUp"?l.goNext(this,c):c.key&&c.key==="ArrowDown"&&l.goPrevious(this,c):c.key&&c.key==="ArrowLeft"?l.goPrevious(this,c):c.key&&c.key==="ArrowRight"&&l.goNext(this,c)})}goNext(t,n){t.nextElementSibling&&t.nextElementSibling.tagName!=="path"&&t.nextElementSibling.dispatchEvent(new Event("focus")),n.preventDefault()}goPrevious(t,n){t.previousElementSibling&&t.previousElementSibling.tagName!=="path"&&t.previousElementSibling.dispatchEvent(new Event("focus")),n.preventDefault()}destroy(){const t=this.getComponentContainer(),{position:n}=this.configs;B.appendOrSelect(t,`g.axis.${n}`).selectAll("g.tick.tick-hover").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("focus",null).on("blur",null)}}class ze extends Mt{constructor(){super(...arguments),this.type="2D-axes",this.renderType=ft.SVG,this.children={},this.thresholds=[],this.margins={top:0,right:0,bottom:0,left:0}}render(t=!1){const n={},r=Object.keys(Z),i=_(this.getOptions(),"axes");r.forEach(s=>{i[Z[s]]&&(n[Z[s]]=!0)}),this.configs.axes=n,r.forEach(s=>{const o=Z[s];if(this.configs.axes[o]&&!this.children[o]){const l={position:o,axes:this.configs.axes,margins:this.margins},c=this.model.axisFlavor===va.DEFAULT?new qv(this.model,this.services,l):new wD(this.model,this.services,l);c.setModel(this.model),c.setServices(this.services),c.setParent(this.parent),this.children[o]=c}}),Object.keys(this.children).forEach(s=>{this.children[s].render(t)});const a={};Object.keys(this.children).forEach(s=>{const o=this.children[s],l=o.configs.position,c=o.getInvisibleAxisRef(),{width:u,height:d}=B.getSVGElementSize(c,{useBBox:!0});let h;switch(o.getTitleRef().empty()?h=0:(h=B.getSVGElementSize(o.getTitleRef(),{useBBox:!0}).height,(l===Z.LEFT||l===Z.RIGHT)&&(h+=5)),l){case Z.TOP:a.top=d+h;break;case Z.BOTTOM:a.bottom=d+h;break;case Z.LEFT:a.left=u+h;break;case Z.RIGHT:a.right=u+h;break}}),this.services.events.dispatchEvent(w.Axis.RENDER_COMPLETE),Object.keys(a).some(s=>this.margins[s]!==a[s])&&(this.margins=Object.assign(this.margins,a),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(w.ZoomBar.UPDATE),Object.keys(this.children).forEach(s=>{const o=this.children[s];o.margins=this.margins}),this.render(!0))}}class Ue extends Mt{constructor(){super(...arguments),this.type="skeleton"}render(t=!0){const n=_(this.getOptions(),"data","loading");n?this.renderSkeleton(n):this.removeSkeleton()}renderSkeleton(t){if(this.configs.skeleton===ge.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===ge.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===ge.PIE)this.renderPieSkeleton(t);else if(this.configs.skeleton===ge.DONUT)this.renderDonutSkeleton(t);else throw new Error(`"${this.configs.skeleton}" is not a valid Skeleton type.`)}renderGridSkeleton(t){this.setScales(),this.drawBackdrop(t),this.drawXGrid(t),this.drawYGrid(t),t&&this.setShimmerEffect("shimmer-lines")}renderVertOrHorizSkeleton(t){const n=this.services.cartesianScales.getOrientation();this.setScales(),this.drawBackdrop(t),n===fe.VERTICAL&&this.drawYGrid(t),n===fe.HORIZONTAL&&this.drawXGrid(t),this.setShimmerEffect("shimmer-lines")}renderPieSkeleton(t){const n=this.computeOuterRadius();this.drawRing(n,0,t),t&&this.setShimmerEffect("shimmer-areas")}renderDonutSkeleton(t){const n=this.computeOuterRadius(),r=this.computeInnerRadius();this.drawRing(n,r,t),t&&this.setShimmerEffect("shimmer-areas")}setScales(){const t=this.services.cartesianScales.getMainXScale().range(),n=this.services.cartesianScales.getMainYScale().range();this.xScale=On().domain([0,1]).range(t),this.yScale=On().domain([0,1]).range(n)}drawBackdrop(t){const n=this.parent,{width:r,height:i}=B.getSVGElementSize(n,{useAttrs:!0});this.backdrop=B.appendOrSelect(n,"svg.chart-skeleton.DAII").attr("width",r).attr("height",i);const a=B.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");a.attr("width","100%").attr("height","100%");const[s]=this.xScale.range(),[,o]=this.yScale.range();this.backdrop.merge(a).attr("x",s).attr("y",o),a.classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawXGrid(t){const n=+this.backdrop.attr("width"),r=_(this.getOptions(),"grid","x","numberOfTicks"),i=this.xScale.ticks(r).map(o=>o*n),a=B.appendOrSelect(this.backdrop,"g.x.skeleton"),s=a.selectAll("line").data(i);s.enter().append("line").merge(s).attr("x1",o=>o).attr("x2",o=>o).attr("y1",0).attr("y2","100%"),a.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawYGrid(t){const n=+this.backdrop.attr("height"),r=this.backdrop.attr("width"),i=_(this.getOptions(),"grid","y","numberOfTicks"),a=this.xScale.ticks(i).map(l=>l*n),s=B.appendOrSelect(this.backdrop,"g.y.skeleton"),o=s.selectAll("line").data(a);o.enter().append("line").merge(o).attr("x1",0).attr("x2",r).attr("y1",l=>l).attr("y2",l=>l),s.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawRing(t,n,r=!0){const i=this.parent,{width:a,height:s}=B.getSVGElementSize(i,{useAttrs:!0}),o=B.appendOrSelect(i,"svg.chart-skeleton").attr("width",a).attr("height",s),l=n===0?"pie":"donut",c=_(this.getOptions(),l,"alignment");B.appendOrSelect(o,"rect.chart-skeleton-area-container").attr("width",a).attr("height",s).attr("fill","none");const u=gs().innerRadius(n).outerRadius(t).startAngle(0).endAngle(Math.PI*2),d=t+Math.abs(Qt.radiusOffset),h=t+(Math.min(a,s)-t*2)/2,p=B.appendOrSelect(o,"path").attr("class","skeleton-area-shape").attr("transform",`translate(${d}, ${h})`).attr("d",u).classed("shimmer-effect-areas",r).classed("empty-state-areas",!r).style("fill",r?`url(#${this.services.domUtils.generateElementIDString("shimmer-areas")})`:null);let f=t+Qt.xOffset;c===me.CENTER?f=a/2:c===me.RIGHT&&(f=a-t-Qt.xOffset);const v=t+Qt.yOffset;p.attr("transform",`translate(${f}, ${v})`)}computeOuterRadius(){const{width:t,height:n}=B.getSVGElementSize(this.parent,{useAttrs:!0});return Math.min(t,n)/2+Qt.radiusOffset}computeInnerRadius(){return this.computeOuterRadius()*(3/4)}setShimmerEffect(t){const n="stop-bg-shimmer",r="stop-shimmer",i=this.parent.select(".chart-skeleton"),{width:a}=B.getSVGElementSize(this.parent,{useAttrs:!0}),s=0,o=a,l=B.appendOrSelect(i,"defs").lower(),c=B.appendOrSelect(l,"linearGradient").attr("id",this.services.domUtils.generateElementIDString(t)).attr("class",t).attr("x1",s-3*.2*a).attr("x2",o).attr("y1",0).attr("y2",0).attr("gradientUnits","userSpaceOnUse").attr("gradientTransform","translate(0, 0)"),u=`
66
+ <stop class="${n}" offset="${s}"></stop>
67
+ <stop class="${r}" offset="${s+.2}"></stop>
68
+ <stop class="${n}" offset="${s+2*.2}"></stop>
69
+ `;c.html(u),d();function d(){c.attr("gradientTransform",`translate(${s-3*.2*a}, 0)`).transition().duration(2e3).delay(1e3).ease(hR).attr("gradientTransform",`translate(${o+3*.2*a}, 0)`).on("end",d)}}removeSkeleton(){this.parent.select(".chart-skeleton").remove()}}class $D extends Mt{constructor(){super(...arguments),this.type="boxplot",this.renderType=ft.SVG}render(t){const n=this.getComponentContainer({ariaLabel:"box plots",withinChartClip:!0}),r=this.getOptions(),{groupMapsTo:i}=r.data,a=this.model.getDataGroupNames(),s=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),[l,c]=s.range(),[u,d]=o.range(),h=c-l,p=u-d;if(h===0)return;const{cartesianScales:f}=this.services,v=f.getOrientation(),m=v===fe.VERTICAL,[y,g]=ar(M=>this.services.cartesianScales.getDomainValue(M),M=>this.services.cartesianScales.getRangeValue(M),v),x=Math.floor((m?h:p)/a.length),O=Math.min(x/2,16),T=this.model.getBoxplotData(),S=n.selectAll(".box-group").data(T);S.exit().remove();const D=S.enter().append("g").attr("class","box-group"),P=S.merge(D);D.append("path").merge(S.select("path.vertical-line.start")).attr("class",()=>this.model.getColorClassName({classNameTypes:[mt.STROKE],originalClassName:"vertical-line start"})).attr("stroke-width",un.strokeWidth.default).attr("fill","none").transition().call(M=>this.services.transitions.setupTransition({transition:M,name:"boxplot-update-verticalstartline",animate:t})).attr("d",M=>{const q=f.getDomainValue(M[i]),H=q,G=f.getRangeValue(M.whiskers.min),E=f.getRangeValue(M.quartiles.q_25);return De({x0:q,x1:H,y0:G,y1:E},v)}),D.append("path").merge(S.select("path.vertical-line.end")).attr("class",()=>this.model.getColorClassName({classNameTypes:[mt.STROKE],originalClassName:"vertical-line end"})).attr("stroke-width",un.strokeWidth.default).attr("fill","none").transition().call(M=>this.services.transitions.setupTransition({transition:M,name:"boxplot-update-verticalendline",animate:t})).attr("d",M=>{const q=f.getDomainValue(M[i]),H=q,G=f.getRangeValue(M.whiskers.max),E=f.getRangeValue(M.quartiles.q_75);return De({x0:q,x1:H,y0:G,y1:E},v)}),D.append("path").merge(S.select("path.box")).attr("class",()=>this.model.getColorClassName({classNameTypes:[mt.FILL,mt.STROKE],originalClassName:"box"})).attr("fill-opacity",un.box.opacity.default).attr("stroke-width",un.strokeWidth.default).attr("role",Tt.GRAPHICS_SYMBOL).attr("aria-roledescription","box").attr("aria-label",M=>M[i]).transition().call(M=>this.services.transitions.setupTransition({transition:M,name:"boxplot-update-quartiles",animate:t})).attr("d",M=>{const q=f.getDomainValue(M[i])-O/2,H=q+O,G=f.getRangeValue(Math[m?"max":"min"](M.quartiles.q_75,M.quartiles.q_25)),E=G+Math.abs(f.getRangeValue(M.quartiles.q_75)-f.getRangeValue(M.quartiles.q_25));return De({x0:q,x1:H,y0:G,y1:E},v)}),D.append("path").merge(S.select("path.highlight-area")).attr("class","highlight-area").attr("opacity",0).attr("d",M=>{const q=f.getDomainValue(M[i])-O/2,H=q+O,G=f.getRangeValue(M.whiskers.min),E=f.getRangeValue(M.whiskers.max);return De({x0:q,x1:H,y0:G,y1:E},v)}),D.append("path").merge(S.select("path.whisker.start")).attr("class",()=>this.model.getColorClassName({classNameTypes:[mt.STROKE],originalClassName:"whisker start"})).attr("stroke-width",un.strokeWidth.thicker).attr("fill","none").transition().call(M=>this.services.transitions.setupTransition({transition:M,name:"boxplot-update-startingwhisker",animate:t})).attr("d",M=>{const q=f.getDomainValue(M[i])-O/4,H=q+O/2,G=f.getRangeValue(M.whiskers.min),E=f.getRangeValue(M.whiskers.min);return De({x0:q,x1:H,y0:G,y1:E},v)}),D.append("path").merge(S.select("path.median")).attr("fill","none").attr("class",()=>this.model.getColorClassName({classNameTypes:[mt.STROKE],originalClassName:"median"})).attr("stroke-width",2).transition().call(M=>this.services.transitions.setupTransition({transition:M,name:"boxplot-update-median",animate:t})).attr("d",M=>{const q=f.getDomainValue(M[i])-O/2,H=q+O,G=f.getRangeValue(M.quartiles.q_50);return De({x0:q,x1:H,y0:G,y1:G},v)}),D.append("path").merge(S.select("path.whisker.end")).attr("class",()=>this.model.getColorClassName({classNameTypes:[mt.STROKE],originalClassName:"whisker end"})).attr("stroke-width",un.strokeWidth.thicker).attr("fill","none").transition().call(M=>this.services.transitions.setupTransition({transition:M,name:"boxplot-update-endingwhisker",animate:t})).attr("d",M=>{const q=f.getDomainValue(M[i])-O/4,H=q+O/2,G=f.getRangeValue(M.whiskers.max),E=f.getRangeValue(M.whiskers.max);return De({x0:q,x1:H,y0:G,y1:E},v)});const I=P.selectAll("circle.outlier").data(M=>M.outliers.map(q=>({min:M.whiskers.min,max:M.whiskers.max,[i]:M[i],value:q})));I.exit().remove();const N=I.enter().append("circle");I.merge(N).attr("r",un.circle.radius).attr("class",()=>this.model.getColorClassName({classNameTypes:[mt.FILL,mt.STROKE],originalClassName:"outlier"})).attr("fill-opacity",un.circle.opacity.default).attr("cx",y).transition().call(M=>this.services.transitions.setupTransition({transition:M,name:"boxplot-update-circles",animate:t})).attr("cy",g),this.addBoxEventListeners(),this.addCircleEventListeners()}addBoxEventListeners(){const t=this,n=this.getOptions(),{groupMapsTo:r}=n.data;this.parent.selectAll("path.highlight-area").on("mouseover",function(i,a){const s=U(this);U(this.parentNode).select("path.box").classed("hovered",!0).attr("fill-opacity",un.box.opacity.hovered),t.services.events.dispatchEvent(w.Tooltip.SHOW,{event:i,hoveredElement:s,items:[{label:_(n,"locale","translations","group")||_(n,"tooltip","groupLabel")||"Group",value:a[r],class:t.model.getColorClassName({classNameTypes:[mt.TOOLTIP]})},{label:"Minimum",value:a.whiskers.min},{label:"Q1",value:a.quartiles.q_25},{label:"Median",value:a.quartiles.q_50},{label:"Q3",value:a.quartiles.q_75},{label:"Maximum",value:a.whiskers.max},{label:"IQR",value:a.quartiles.q_75-a.quartiles.q_25}]}),t.services.events.dispatchEvent(w.Boxplot.BOX_MOUSEOVER,{event:i,element:s,datum:a})}).on("mousemove",function(i,a){const s=U(this);t.services.events.dispatchEvent(w.Boxplot.BOX_MOUSEMOVE,{event:i,element:s,datum:a}),t.services.events.dispatchEvent(w.Tooltip.MOVE,{event:i})}).on("click",function(i,a){t.services.events.dispatchEvent(w.Boxplot.BOX_CLICK,{event:i,element:U(this),datum:a})}).on("mouseout",function(i,a){const s=U(this);U(this.parentNode).select("path.box").classed("hovered",!1).attr("fill-opacity",un.box.opacity.default),t.services.events.dispatchEvent(w.Boxplot.BOX_MOUSEOUT,{event:i,element:s,datum:a}),t.services.events.dispatchEvent(w.Tooltip.HIDE,{hoveredElement:s})})}addCircleEventListeners(){const t=this,n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.services.cartesianScales.getRangeIdentifier();this.parent.selectAll("circle").on("mouseover",function(a,s){const o=U(this);o.classed("hovered",!0).attr("fill-opacity",un.circle.opacity.hovered).classed("unfilled",!1),t.services.events.dispatchEvent(w.Tooltip.SHOW,{event:a,hoveredElement:o,items:[{label:_(n,"locale","translations","group")||_(n,"tooltip","groupLabel")||"Group",value:s[r],class:t.model.getColorClassName({classNameTypes:[mt.TOOLTIP]})},{label:"Outlier",value:s[i]}]}),t.services.events.dispatchEvent(w.Boxplot.OUTLIER_MOUSEOVER,{event:a,element:o,datum:s})}).on("mousemove",function(a,s){const o=U(this);t.services.events.dispatchEvent(w.Boxplot.OUTLIER_MOUSEMOVE,{event:a,element:o,datum:s}),t.services.events.dispatchEvent(w.Tooltip.MOVE,{event:a})}).on("click",function(a,s){t.services.events.dispatchEvent(w.Boxplot.OUTLIER_CLICK,{event:a,element:U(this),datum:s})}).on("mouseout",function(a,s){const o=U(this);o.classed("hovered",!1).attr("fill-opacity",un.circle.opacity.default),t.services.events.dispatchEvent(w.Boxplot.OUTLIER_MOUSEOUT,{event:a,element:o,datum:s}),t.services.events.dispatchEvent(w.Tooltip.HIDE,{hoveredElement:o})})}}class aa extends Mt{constructor(){super(...arguments),this.type="zero-line",this.renderType=ft.SVG}render(t){const n=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),r=this.services.cartesianScales.getScaleByPosition(n),[i,a]=r.domain(),s=i>0&&a<0||i<0&&a>0,o=this.getComponentContainer({isPresentational:!0});if(!s){o.selectAll("line.domain").remove();return}const[l,c]=this.services.cartesianScales.getDomainScale().range();let u=+r(0)+.5;u||(u=r.range()[0]);const d=Df({x0:l,x1:c,y0:u,y1:u},this.services.cartesianScales.getOrientation());B.appendOrSelect(o,"line.domain").transition().call(h=>this.services.transitions.setupTransition({transition:h,name:"zero-line-update",animate:t})).attr("y1",d.y0).attr("y2",d.y1).attr("x1",d.x0).attr("x2",d.x1)}}class CD extends zn{constructor(){super(...arguments),this.type="bubble",this.renderType=ft.SVG}getRadiusScale(t){const n=this.getOptions(),{radiusMapsTo:r}=n.bubble,i=t.data(),a=i.map(c=>c[r]).filter(c=>c),s=B.getHTMLElementSize(this.services.domUtils.getMainContainer()),o=a.length>0,l=o?xn(a):[1,1];return On().domain(l).range(o?n.bubble.radiusRange(s,i):[4,4])}styleCircles(t,n){const r=this.getOptions(),{radiusMapsTo:i}=r.bubble,a=this.getRadiusScale(t),{groupMapsTo:s}=r.data,{cartesianScales:o}=this.services,l=h=>o.getDomainValue(h),c=h=>o.getRangeValue(h),[u,d]=ar(l,c,o.getOrientation());t.raise().classed("dot",!0).attr("role",Tt.GRAPHICS_SYMBOL).attr("aria-label",h=>{const p=o.getRangeIdentifier(h);return h[p]}).transition().call(h=>this.services.transitions.setupTransition({transition:h,name:"bubble-update-enter",animate:n})).attr("cx",u).attr("cy",d).attr("r",h=>a(h[i]||1)).attr("class",h=>this.model.getColorClassName({classNameTypes:[mt.FILL,mt.STROKE],dataGroupName:h[s],originalClassName:"dot"})).style("fill",h=>{const p=this.services.cartesianScales.getDomainIdentifier(h);return this.model.getFillColor(h[s],h[p],h)}).style("stroke",h=>{const p=this.services.cartesianScales.getDomainIdentifier(h);return this.model.getStrokeColor(h[s],h[p],h)}).attr("fill-opacity",r.bubble.fillOpacity).attr("opacity",1)}getTooltipAdditionalItems(t){const n=_(this.getOptions(),"bubble");return[{label:_(n,"radiusLabel"),value:t[_(n,"radiusMapsTo")]}]}}class MD extends Mt{constructor(){super(...arguments),this.type="bullet",this.renderType=ft.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-simple-bar"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-simple-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.getComponentContainer({ariaLabel:"bullet graphs",withinChartClip:!0}),a=this.model.getDisplayData(this.configs.groups),s=this.services.cartesianScales.getRangeScale(),o=this.services.cartesianScales.getRangeIdentifier(),[l,c]=s.range(),[,u]=s.domain(),d=()=>{const v=[];a.forEach(y=>{y.ranges?y.ranges.forEach((g,x)=>{g!=null&&g<u&&v.push({datum:y,value:g,order:x+1})}):v.push({datum:y,order:1})});const m=B.appendOrSelect(i,"g.range-boxes").selectAll("path.range-box").data(v,y=>`${y[r]}-${y.order}`);m.exit().attr("opacity",0).remove(),m.enter().append("path").attr("opacity",0).merge(m).attr("class",y=>`range-box order-${y.order}`).transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"bullet-range-box-update-enter",animate:t})).attr("d",y=>{let g,x,O,T;return y.order===1?(g=this.services.cartesianScales.getDomainValue(y.datum)-16/2,x=g+16,O=c-2,T=l+1):(g=this.services.cartesianScales.getDomainValue(y.datum)-16/2,x=g+16,O=this.services.cartesianScales.getRangeValue(y.value),T=c),De({x0:g,x1:x,y0:O,y1:T},this.services.cartesianScales.getOrientation())}).attr("opacity",1)},h=()=>{const v=B.appendOrSelect(i,"g.bars").selectAll("path.bar").data(a,m=>m[r]);v.exit().attr("opacity",0).remove(),v.enter().append("path").attr("opacity",0).merge(v).classed("bar",!0).transition().call(m=>this.services.transitions.setupTransition({transition:m,name:"bullet-bar-update-enter",animate:t})).attr("class",m=>this.model.getColorClassName({classNameTypes:[mt.FILL],dataGroupName:m[r],originalClassName:"bar"})).style("fill",m=>{const y=this.services.cartesianScales.getDomainIdentifier(m);return this.model.getFillColor(m[r],m[y],m)}).attr("d",m=>{const y=this.services.cartesianScales.getDomainValue(m)-4,g=y+8,x=this.services.cartesianScales.getRangeValue(0)+1,O=this.services.cartesianScales.getRangeValue(m);return De({x0:y,x1:g,y0:x,y1:O},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",Tt.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",m=>m.value)},p=()=>{const v=B.appendOrSelect(i,"g.markers").selectAll("path.marker").data(a.filter(m=>_(m,"marker")!==null),m=>m[r]);v.exit().attr("opacity",0).remove(),v.enter().append("path").attr("opacity",0).merge(v).classed("marker",!0).transition().call(m=>this.services.transitions.setupTransition({transition:m,name:"bullet-marker-update-enter",animate:t})).attr("d",m=>{const y=this.services.cartesianScales.getDomainValue(m)-12,g=y+24,x=this.services.cartesianScales.getRangeValue(m.marker);return De({x0:y,x1:g,y0:x,y1:x},this.services.cartesianScales.getOrientation())}).attr("opacity",1)},f=()=>{let v=[];a.filter(y=>_(y,"marker")!==null).forEach(y=>{const g=y.marker,x=y[o];v=v.concat([{datum:y,value:g*.25,barValue:x},{datum:y,value:g*.5,barValue:x},{datum:y,value:g*.75,barValue:x}])});const m=B.appendOrSelect(i,"g.quartiles").selectAll("path.quartile").data(v,y=>y[r]);m.exit().attr("opacity",0).remove(),m.enter().append("path").attr("opacity",0).merge(m).attr("class",y=>`quartile ${y.value<=y.barValue?"over-bar":""}`).transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"bullet-quartile-update-enter",animate:t})).attr("d",({datum:y,value:g})=>{let x=4;y.ranges&&y.ranges.indexOf(g)!==-1&&(x=8);const O=this.services.cartesianScales.getDomainValue(y)-x/2,T=O+x,S=this.services.cartesianScales.getRangeValue(g);return De({x0:O,x1:T,y0:S,y1:S},this.services.cartesianScales.getOrientation())}).attr("opacity",1)};d(),h(),p(),f(),this.addEventListeners()}addEventListeners(){const t=this,n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.services.cartesianScales.getRangeIdentifier(),{code:a,number:s}=_(n,"locale");this.parent.selectAll("path.bar").on("mouseover",function(o,l){const c=U(this);c.classed("hovered",!0),t.services.events.dispatchEvent(w.Bar.BAR_MOUSEOVER,{event:o,element:c,datum:l});const u=_(n,"bullet","performanceAreaTitles"),d=t.model.getMatchingRangeIndexForDatapoint(l);t.services.events.dispatchEvent(w.Tooltip.SHOW,{event:o,hoveredElement:c,items:[{label:_(n,"locale","translations","group")||_(n,"tooltip","groupLabel")||"Group",value:l[r],class:t.model.getColorClassName({classNameTypes:[mt.TOOLTIP],dataGroupName:l[r]})},{label:"Value",value:l[i]},{label:"Target",value:l.marker},{label:"Percentage",value:`${s(Math.floor(l[i]/l.marker*100),a)}%`},{label:"Performance",value:u[d]}]})}).on("mousemove",function(o,l){t.services.events.dispatchEvent(w.Bar.BAR_MOUSEMOVE,{event:o,element:U(this),datum:l}),t.services.events.dispatchEvent(w.Tooltip.MOVE,{event:o})}).on("click",function(o,l){t.services.events.dispatchEvent(w.Bar.BAR_CLICK,{event:o,element:U(this),datum:l})}).on("mouseout",function(o,l){const c=U(this);c.classed("hovered",!1),t.services.events.dispatchEvent(w.Bar.BAR_MOUSEOUT,{event:o,element:c,datum:l}),t.services.events.dispatchEvent(w.Tooltip.HIDE,{hoveredElement:c})})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}function AD(e){return e}function RD(e){if(e==null)return AD;var t,n,r=e.scale[0],i=e.scale[1],a=e.translate[0],s=e.translate[1];return function(o,l){l||(t=n=0);var c=2,u=o.length,d=new Array(u);for(d[0]=(t+=o[0])*r+a,d[1]=(n+=o[1])*i+s;c<u;)d[c]=o[c],++c;return d}}function kD(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}function LD(e,t){return typeof t=="string"&&(t=e.objects[t]),t.type==="GeometryCollection"?{type:"FeatureCollection",features:t.geometries.map(function(n){return Xv(e,n)})}:Xv(e,t)}function Xv(e,t){var n=t.id,r=t.bbox,i=t.properties==null?{}:t.properties,a=Eh(e,t);return n==null&&r==null?{type:"Feature",properties:i,geometry:a}:r==null?{type:"Feature",id:n,properties:i,geometry:a}:{type:"Feature",id:n,bbox:r,properties:i,geometry:a}}function Eh(e,t){var n=RD(e.transform),r=e.arcs;function i(u,d){d.length&&d.pop();for(var h=r[u<0?~u:u],p=0,f=h.length;p<f;++p)d.push(n(h[p],p));u<0&&kD(d,f)}function a(u){return n(u)}function s(u){for(var d=[],h=0,p=u.length;h<p;++h)i(u[h],d);return d.length<2&&d.push(d[0]),d}function o(u){for(var d=s(u);d.length<4;)d.push(d[0]);return d}function l(u){return u.map(o)}function c(u){var d=u.type,h;switch(d){case"GeometryCollection":return{type:d,geometries:u.geometries.map(c)};case"Point":h=a(u.coordinates);break;case"MultiPoint":h=u.coordinates.map(a);break;case"LineString":h=s(u.arcs);break;case"MultiLineString":h=u.arcs.map(s);break;case"Polygon":h=l(u.arcs);break;case"MultiPolygon":h=u.arcs.map(l);break;default:return null}return{type:d,coordinates:h}}return c(t)}function DD(e,t){var n={},r={},i={},a=[],s=-1;t.forEach(function(c,u){var d=e.arcs[c<0?~c:c],h;d.length<3&&!d[1][0]&&!d[1][1]&&(h=t[++s],t[s]=c,t[u]=h)}),t.forEach(function(c){var u=o(c),d=u[0],h=u[1],p,f;if(p=i[d])if(delete i[p.end],p.push(c),p.end=h,f=r[h]){delete r[f.start];var v=f===p?p:p.concat(f);r[v.start=p.start]=i[v.end=f.end]=v}else r[p.start]=i[p.end]=p;else if(p=r[h])if(delete r[p.start],p.unshift(c),p.start=d,f=i[d]){delete i[f.end];var m=f===p?p:f.concat(p);r[m.start=f.start]=i[m.end=p.end]=m}else r[p.start]=i[p.end]=p;else p=[c],r[p.start=d]=i[p.end=h]=p});function o(c){var u=e.arcs[c<0?~c:c],d=u[0],h;return e.transform?(h=[0,0],u.forEach(function(p){h[0]+=p[0],h[1]+=p[1]})):h=u[u.length-1],c<0?[h,d]:[d,h]}function l(c,u){for(var d in c){var h=c[d];delete u[h.start],delete h.start,delete h.end,h.forEach(function(p){n[p<0?~p:p]=1}),a.push(h)}}return l(i,r),l(r,i),t.forEach(function(c){n[c<0?~c:c]||a.push([c])}),a}function ID(e){for(var t=-1,n=e.length,r,i=e[n-1],a=0;++t<n;)r=i,i=e[t],a+=r[0]*i[1]-r[1]*i[0];return Math.abs(a)}function ND(e){return Eh(e,PD.apply(this,arguments))}function PD(e,t){var n={},r=[],i=[];t.forEach(a);function a(l){switch(l.type){case"GeometryCollection":l.geometries.forEach(a);break;case"Polygon":s(l.arcs);break;case"MultiPolygon":l.arcs.forEach(s);break}}function s(l){l.forEach(function(c){c.forEach(function(u){(n[u=u<0?~u:u]||(n[u]=[])).push(l)})}),r.push(l)}function o(l){return ID(Eh(e,{type:"Polygon",arcs:[l]}).coordinates[0])}return r.forEach(function(l){if(!l._){var c=[],u=[l];for(l._=1,i.push(c);l=u.pop();)c.push(l),l.forEach(function(d){d.forEach(function(h){n[h<0?~h:h].forEach(function(p){p._||(p._=1,u.push(p))})})})}}),r.forEach(function(l){delete l._}),{type:"MultiPolygon",arcs:i.map(function(l){var c=[],u;if(l.forEach(function(v){v.forEach(function(m){m.forEach(function(y){n[y<0?~y:y].length<2&&c.push(y)})})}),c=DD(e,c),(u=c.length)>1)for(var d=1,h=o(c[0]),p,f;d<u;++d)(p=o(c[d]))>h&&(f=c[0],c[0]=c[d],c[d]=f,h=p);return c}).filter(function(l){return l.length>0})}}class UD extends wr{constructor(){super(...arguments),this.type="ruler-binned",this.renderType=ft.SVG}showRuler(t,[n,r]){const i=this.parent,a=this.model.getOptions(),{cartesianScales:s}=this.services,o=s.getOrientation(),l=s.getRangeScale(),[c,u]=l.range(),d=s.getDomainScale(),h=d.invert(o===fe.VERTICAL?n:r),p=B.appendOrSelect(i,"g.ruler").attr("aria-label","ruler"),f=B.appendOrSelect(p,"line.ruler-line"),v=i.selectAll("[role=graphics-symbol]").filter(m=>{if(parseFloat(kt(m,"data.x0"))<=h&&parseFloat(kt(m,"data.x1"))>=h)return!0});if(v.size()>0){this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!sg(this.elementsToHighlight,v)&&this.hideRuler(),v.dispatch("mouseover"),this.elementsToHighlight=v;const m=U(v.nodes()[0]).datum(),y=parseFloat(kt(m,"data.x0")),g=parseFloat(kt(m,"data.x1")),x=this.model.getActiveDataGroupNames(),O=x.reverse().map(T=>({label:T,value:kt(m,`data.${T}`),class:this.model.getColorClassName({classNameTypes:[mt.TOOLTIP],dataGroupName:T})})).filter(T=>T.value!==0);if(O.length>0){this.services.events.dispatchEvent(w.Tooltip.SHOW,{event:t,mousePosition:[n,r],hoveredElement:f,items:[{label:kt(a,"bins.rangeLabel")||"Range",value:`${y} – ${g}`},...O,..._(a,"tooltip","showTotal")===!0?[{label:kt(a,"locale.translations.total")||kt(a,"tooltip.totalLabel")||"Total",value:x.reduce((S,D)=>S+parseFloat(kt(m,`data.${D}`)),0)}]:[]]}),p.attr("opacity",1);const T=d((y+g)/2);o==="horizontal"?f.attr("x1",u).attr("x2",c).attr("y1",T).attr("y2",T):f.attr("y1",u).attr("y2",c).attr("x1",T).attr("x2",T)}else this.hideRuler()}else this.hideRuler()}}class fl extends wr{formatTooltipData(t){return t.reverse()}}const BD=(e,t)=>{const n=e.x,r=e.y,i=t.x,a=t.y,s=yg();return s.moveTo(n,r),s.lineTo(i,a),s.toString()},HD={d:"M7 0v8L0 4z",height:8,width:7.5,id:"arrowLeft"},VD={d:"M0 0v8l7-4z",height:8,width:7.5,id:"arrowRight"},FD={d:"M5.32 9.513a4.75 4.75 0 100-9.5 4.75 4.75 0 000 9.5z",height:10,width:10,id:"circle"},GD={d:"M5.03517654-1e-7l4.99999996 5-4.99999996 5-5-5L2.4517844 2.58339204z",height:10,width:10,id:"diamond"},zD={d:"M0 .44974747h8v8H0v-3.6830331z",height:9,width:8,id:"square"},jD={d:"M0 0h1.5v8H0z",height:8,width:2,id:"tee"};class Zv extends mh{constructor(t,n,r){super(t,n,r),this.type="color-legend",this.renderType=ft.SVG,this.gradient_id=`gradient-id-${Math.floor(Math.random()*99999999999)}`,this.handleAxisCompleteEvent=()=>{const i=this.getComponentContainer(),{width:a}=B.getSVGElementSize(i,{useAttrs:!0}),s=_(this.getOptions(),"data","loading");if(a>se.color.barWidth&&!s){const o=_(this.getOptions(),"heatmap","colorLegend","title"),{cartesianScales:l}=this.services,c=l.getMainXScale().range();if(c[0]>1&&(i.select("g.legend").attr("transform",`translate(${c[0]}, 0)`),o)){const{width:u}=B.getSVGElementSize(i.select("g.legend-title").select("text"),{useBBox:!0}),d=c[0]-u-9;d>1?i.select("g.legend-title").attr("transform",`translate(${d}, 0)`):(i.select("g.legend").attr("transform",`translate(${c[0]}, 16)`),i.select("g.legend-title").attr("transform",`translate(${c[0]}, 0)`))}}else i.select("g.legend-title").attr("transform","translate(0, 0)")},this.chartType=r.chartType}init(){this.chartType==="heatmap"&&this.services.events.addEventListener(w.Axis.RENDER_COMPLETE,this.handleAxisCompleteEvent)}render(t=!1){const n=this.getOptions(),r=this.getComponentContainer({ariaLabel:"legend"}),{width:i}=B.getSVGElementSize(r,{useAttrs:!0}),a=_(n,"color","gradient","colors"),s=_(n,this.chartType,"colorLegend","type");let o=_(n,"color","pairing","option");const l=_(n,"heatmap","colorLegend","title");if(_(this.getOptions(),"data","loading")){r.html("");return}const c=!_n(a),u=Yf(this.model.getDisplayData()),d=!(i<=se.color.barWidth),h=d?se.color.barWidth:i,p=B.appendOrSelect(r,"g.legend"),f=B.appendOrSelect(p,"g.legend-axis");if(l){const I=B.appendOrSelect(r,"g.legend-title");B.appendOrSelect(I,"text").text(l).attr("dy","0.7em"),p.attr("transform","translate(0, 16)")}const v=u[0]<0&&u[1]>0?"diverge":"mono";(o<1&&o>4&&v==="mono"||o<1&&o>2&&v==="diverge")&&(o=1);let m=[];const y=v==="diverge"?17:11;if(c)m=a;else for(let I=1;I<y+1;I++)m.push(s===ga.LINEAR?`stop-color-${v}-${o}-${I}`:`fill-${v}-${o}-${I}`);const g=qe(u[0],u[1]),x=uR(g,3),O=On().domain(u).range([0,h]),T=xu(O).tickSize(0).tickValues(x),{code:S,number:D}=_(n,"locale");T.tickFormat(I=>D(I,S));let P;switch(s){case ga.LINEAR:this.drawLinear(m,p,h);break;case ga.QUANTIZE:P=this.drawQuantize(m,v,c,p,h),O.range([P,h]);break;default:throw Error("Entered color legend type is not supported.")}f.attr("transform",`translate(0,${se.color.axisYTranslation})`).call(T),f.select(".domain").remove(),f.select("g.tick:last-of-type text").style("text-anchor",d?"middle":"end"),f.select("g.tick:first-of-type text").style("text-anchor",d&&this.chartType!=="choropleth"?"middle":"start")}drawLinear(t,n,r){const i=100/(t.length-1);B.appendOrSelect(n,"linearGradient").attr("id",`${this.gradient_id}-legend`).selectAll("stop").data(t).enter().append("stop").attr("offset",(a,s)=>`${s*i}%`).attr("class",(a,s)=>t[s]).attr("stop-color",a=>a),B.appendOrSelect(n,"rect").attr("width",r).attr("height",se.color.barHeight).style("fill",`url(#${this.gradient_id}-legend)`)}drawQuantize(t,n,r,i,a){!r&&n==="diverge"&&t.splice(t.length/2,1);const s=Xa().domain(t).range([0,a]);return B.appendOrSelect(i,"g.quantized-rect").selectAll("rect").data(s.domain()).join("rect").attr("x",o=>s(o)).attr("y",0).attr("width",Math.max(0,s.bandwidth()-1)).attr("height",se.color.barHeight).attr("class",o=>o).attr("fill",o=>o),(!r&&n)==="mono"?s.bandwidth()-1:0}destroy(){this.chartType==="heatmap"&&this.services.events.removeEventListener(w.Axis.RENDER_COMPLETE,this.handleAxisCompleteEvent)}}class WD extends Ts{constructor(){super(...arguments),this.type="meter-title",this.renderType=ft.SVG}render(t=!1){const n=_(this.model.getDisplayData(),0),r=this.getOptions(),i=this.getComponentContainer({ariaLabel:"meter title"}),{groupMapsTo:a}=r.data,s=r.locale.translations.meter.title;if(_(r,"meter","proportional"))this.displayTotal(),this.displayBreakdownTitle();else{const c=i.selectAll("text.meter-title").data(s?[s]:[n[a]]);c.enter().append("text").classed("meter-title",!0).merge(c).attr("x",0).attr("y","1em").text(u=>u),c.exit().remove(),this.appendPercentage()}this.displayStatus();const o=this.getMaxTitleWidth(),l=B.appendOrSelect(i,"text.meter-title");o>0&&l.node().getComputedTextLength()>o&&this.truncateTitle(l,o)}displayBreakdownTitle(){const t=this.getComponentContainer(),n=this.getOptions(),r=this.model.getMaximumDomain(this.model.getDisplayData()),i=_(n,"meter","proportional","total"),a=_(n,"meter","proportional","unit")?_(n,"meter","proportional","unit"):"";let s;if(r===i)s=null;else{const u=i!==null?i-r:r,d=_(n,"meter","proportional","breakdownFormatter"),{code:h,number:p}=_(n,"locale");s=d!==null?d({datasetsTotal:r,total:i}):`${p(r,h)} ${a} used (${p(u,h)} ${a} available)`}const o=t.selectAll("text.proportional-meter-title").data([s]);o.enter().append("text").classed("proportional-meter-title",!0).merge(o).attr("x",0).attr("y","1em").text(u=>u),o.exit().remove();const l=this.getMaxTitleWidth(),c=B.appendOrSelect(t,"text.proportional-meter-title");l>0&&c.node().getComputedTextLength()>l&&this.truncateTitle(c,l)}displayTotal(){const t=this.getComponentContainer(),n=this.getOptions(),r=_(n,"meter","proportional","total"),i=r?_(n,"meter","proportional","total"):this.model.getMaximumDomain(this.model.getDisplayData()),a=_(n,"meter","proportional","unit")?_(n,"meter","proportional","unit"):"",s=_(n,"meter","proportional","totalFormatter"),{code:o,number:l}=_(n,"locale"),c=s!==null?s(i):`${l(r,o)} ${a} total`,u=B.getHTMLElementSize(this.parent.node()).width,d=t.selectAll("text.proportional-meter-total").data([c]);d.enter().append("text").classed("proportional-meter-total",!0).merge(d).attr("x",this.model.getStatus()&&typeof u!="string"?u-Se.total.paddingRight:u).attr("y","1em").attr("text-anchor","end").text(h=>h),d.exit().remove()}displayStatus(){const t=this,n=this.getComponentContainer(),r=B.getHTMLElementSize(this.parent.node()).width||0,i=this.model.getStatus(),a=Se.status.indicatorSize/2,s=B.appendOrSelect(n,"g.status-indicator").attr("class",i!==null?`status-indicator status--${i}`:"").attr("transform",`translate(${r-a}, 0)`),o=i?[i]:[],l=s.selectAll("circle.status").data(o);l.enter().append("circle").merge(l).attr("class","status").attr("r",a).attr("cx",0).attr("cy",8);const c=s.selectAll("path.innerFill").data(o);c.enter().append("path").merge(c).attr("d",t.getStatusIconPathString(i)).attr("transform",`translate(-${a}, 0)`).attr("class","innerFill"),c.exit().remove(),l.exit().remove()}appendPercentage(){const t=_(this.model.getDisplayData(),0,"value"),{code:n,number:r}=_(this.getOptions(),"locale"),i=this.getComponentContainer(),a=B.appendOrSelect(i,"text.meter-title"),s=_(this.getOptions(),"meter","statusBar","percentageIndicator","enabled")===!0?[t]:[],o=i.selectAll("text.percent-value").data(s),l=Se.statusBar.paddingRight;o.enter().append("text").classed("percent-value",!0).merge(o).text(c=>`${c!=null?r(c,n):0}%`).attr("x",+a.attr("x")+a.node().getComputedTextLength()+l).attr("y",a.attr("y")),o.exit().remove()}truncateTitle(t,n){super.truncateTitle(t,n);const r=B.appendOrSelect(this.parent,"tspan"),i=Se.statusBar.paddingRight,a=Math.ceil(r.node().getComputedTextLength());B.appendOrSelect(this.parent,"text.percent-value").attr("x",+t.attr("x")+t.node().getComputedTextLength()+a+i)}getMaxTitleWidth(){const t=_(this.getOptions(),"meter","proportional"),n=B.getHTMLElementSize(this.parent.node()).width;if(t!==null){const r=B.appendOrSelect(this.parent,"text.proportional-meter-total").node(),i=B.getSVGElementSize(r,{useBBox:!0}).width;return n-i-Se.total.paddingLeft}else{const r=B.appendOrSelect(this.parent,"text.percent-value"),i=Se.statusBar.paddingRight,a=r.node().getComputedTextLength(),s=B.appendOrSelect(this.parent,"g.status-indicator").node(),o=B.getSVGElementSize(s,{useBBox:!0}).width+Se.status.paddingLeft;return n-a-i-o}}getStatusIconPathString(t){switch(t){case fa.SUCCESS:return"M6.875 11.3125 3.75 8.1875 4.74375 7.25 6.875 9.34375 11.50625 4.75 12.5 5.7375 Z";case fa.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case fa.WARNING:return"M7.9375,11.125 C7.41973305,11.125 7,11.544733 7,12.0625 C7,12.580267 7.41973305,13 7.9375,13 C8.45526695,13 8.875,12.580267 8.875,12.0625 C8.875,11.544733 8.45526695,11.125 7.9375,11.125 M7.3125, 3 8.5625, 3 8.5625, 9.875 7.3125, 9.875, 7.3125, 3 Z"}}}class Th extends Mt{getBarWidth(){const t=this.getOptions();if(t.bars.width)return t.bars.width;const n=this.model.getDisplayData().length,r=this.services.cartesianScales.getMainXScale(),i=B.getSVGElementSize(this.parent,{useAttrs:!0}).width;if(!r.step){const a=_(t,"bars","spacingFactor");return Math.min(t.bars.maxWidth,i*a/n)}return Math.min(t.bars.maxWidth,r.step()/2)}isOutsideZoomedDomain(t,n){if(this.model.getDisplayData().length<=1)return!1;const r=this.model.get("zoomDomain");if(r!==void 0){const i=this.services.cartesianScales.getDomainScale();return t<i(r[0])||n>i(r[1])}return!1}}class YD extends Mt{constructor(){super(...arguments),this.type="circle-pack",this.renderType=ft.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("circle.node").transition("legend-hover-circlepack").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-circlepack"})).attr("opacity",r=>r.data.dataGroupName===n.datum().name?1:Bi.circles.fillOpacity)},this.handleLegendMouseOut=()=>{this.parent.selectAll("circle.node").transition("legend-mouseout-circlepack").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-circlepack"})).attr("opacity",1)}}render(t=!0){const n=this.getComponentContainer({ariaLabel:"circle packs",withinChartClip:!0}),{width:r,height:i}=B.getSVGElementSize(this.parent,{useAttrs:!0});if(r<1||i<1)return;let a=this.model.getDisplayData();const s=this.model.hasParentNode(),o=this.model.getHierarchyLevel(),l=this.getOptions(),c=_(l,"canvasZoom","enabled");s&&_(a,0,"children")&&(a=_(a,0,"children"));const u=ps({children:a}).sum(f=>f.value).sort((f,v)=>v.value-f.value),d=nL().size([r,i]).padding(f=>f.depth>=1?Bi.padding.children+3:Bi.padding.mainGroup+3)(u).descendants().splice(1).filter(f=>f.depth<=o),h=n.selectAll("circle.node").data(d);h.exit().attr("width",0).attr("height",0).remove();const p=h.enter().append("circle").classed("node",!0);p.merge(h).attr("class",f=>{const v=c&&o===3?this.getZoomClass(f):"";return this.model.getColorClassName({classNameTypes:[mt.FILL,mt.STROKE],dataGroupName:f.data.dataGroupName,originalClassName:f.children?`node ${v}`:`node node-leaf ${v}`})}).style("fill",f=>this.model.getFillColor(f.data.dataGroupName,null,f.data)).style("stroke",f=>this.model.getFillColor(f.data.dataGroupName,null,f.data)).attr("cx",f=>f.x).attr("cy",f=>f.y).transition("circlepack-leaf-update-enter").call(f=>this.services.transitions.setupTransition({transition:f,name:"circlepack-leaf-update-enter"})).attr("r",f=>f.r).attr("opacity",1).attr("fill-opacity",Bi.circles.fillOpacity),c===!0&&this.focal&&(this.services.canvasZoom.zoomIn(this.focal,p,Ui),this.setBackgroundListeners()),s||this.addLegendListeners(),this.addEventListeners()}unhighlightChildren(t){const n=t.map(r=>r.data);this.parent.selectAll("circle.node").filter(r=>n.some(i=>i===r.data)&&r.depth>1).style("stroke",r=>this.model.getFillColor(r.data.dataGroupName,null,r.data))}highlightChildren(t){const n=t.map(r=>r.data);this.parent.selectAll("circle.node").filter(r=>n.some(i=>i===r.data)&&r.depth>1).style("stroke",Bi.circles.hover.stroke)}getZoomClass(t){return this.model.getHierarchyLevel()===3&&this.focal&&(t.data===this.focal.data||this.focal.children.some(n=>n.data===t.data))?"focal":"non-focal"}addLegendListeners(){const{events:t}=this.services;t.addEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}removeBackgroundListeners(){U(this.services.domUtils.getMainContainer()).on("click",()=>null)}setBackgroundListeners(){const t=U(this.services.domUtils.getMainContainer()),n=this,r=this.parent.selectAll("circle.node");t.on("click",()=>{n.focal=null,n.model.updateHierarchyLevel(2),t.classed("zoomed-in",!1),n.services.canvasZoom.zoomOut(r,Ui)})}getZoomIcon(){return`
70
70
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10">
71
71
  <polygon points="5.93 3.71 4.45 3.71 4.45 2.23 3.71 2.23 3.71 3.71 2.23 3.71 2.23 4.45 3.71 4.45 3.71 5.93 4.45 5.93 4.45 4.45 5.93 4.45 5.93 3.71"/>
72
72
  <path d="M7.2,6.67a4,4,0,0,0,1-2.59A4.08,4.08,0,1,0,4.07,8.15h0a4,4,0,0,0,2.59-1L9.48,10,10,9.48Zm-3.12.77A3.34,3.34,0,1,1,7.41,4.08,3.34,3.34,0,0,1,4.08,7.44Z"/>
73
- </svg>`}addEventListeners(){const t=this;this.parent.selectAll("circle.node").on("mouseover",function(n,r){const i=D(this);i.classed("hovered",!0);const s=t.model.getHierarchyLevel(),a=s>2&&!i.classed("focal"),o=x(t.model.getOptions(),"canvasZoom","enabled");let l=!1;if(!a){let c=[],u=[],d=null;if(r.children){r.depth>1&&o&&(l=!0,i.classed("clickable",!0)),c=r.children.map(f=>{if(f!==null)return typeof f.data.value=="number"?{label:f.data.name,value:f.data.value}:{label:f.data.name,labelIcon:o&&s<=2?t.getZoomIcon():null,value:f.value}});const p=t.model.getOptions();u=[{label:gt(p,"locale.translations.total")||gt(p,"tooltip.totalLabel")||"Total",value:r.value,bold:!0}],t.highlightChildren(r.children)}else d=r.value;const h=getComputedStyle(this,null).getPropertyValue("fill");t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,items:[{color:h,label:r.data.name,labelIcon:l&&o&&s<=2?t.getZoomIcon():null,value:d},...c,...u]})}t.services.events.dispatchEvent(T.CirclePack.CIRCLE_MOUSEOVER,{event:n,element:i,datum:r})}).on("mousemove",function(n,r){const i=D(this);t.services.events.dispatchEvent(T.CirclePack.CIRCLE_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("mouseout",function(n,r){const i=D(this);i.classed("hovered",!1),r.children&&t.unhighlightChildren(r.children),t.services.events.dispatchEvent(T.CirclePack.CIRCLE_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})}).on("click",function(n,r){const i=D(this),s=i.classed("non-focal"),a=x(t.model.getOptions(),"canvasZoom","enabled");if(a&&t.model.getHierarchyLevel()>2){const o=t.parent.selectAll("circle.node");D(t.services.domUtils.getMainContainer()).classed("zoomed-in",!1),t.focal=null,t.model.updateHierarchyLevel(2),t.services.canvasZoom.zoomOut(o,Br)}else if(r.depth===2&&r.children&&!s&&a){const o=t.parent.selectAll("circle.node");D(t.services.domUtils.getMainContainer()).classed("zoomed-in",!0),t.focal=r,t.model.updateHierarchyLevel(3),t.services.canvasZoom.zoomIn(r,o,Br),n.stopPropagation()}t.services.events.dispatchEvent(T.CirclePack.CIRCLE_CLICK,{event:n,element:i,datum:r})})}destroy(){this.parent.selectAll("circle.node").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.removeBackgroundListeners()}}function TD(e,t){const n=Ni(this._current,e);return r=>(this._current=n(r),t(this._current))}class Vg extends ht{constructor(){super(...arguments),this.type="pie",this.renderType=Q.SVG,this.isRendering=!1,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("path.slice").transition("legend-hover-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-bar"})).attr("opacity",i=>i.data[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.slice").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getInnerRadius(){return At.innerRadius}render(t=!0){const n=this,r=this.getComponentContainer({ariaLabel:"pie graph"}),i=this.getOptions(),{groupMapsTo:s}=i.data,{valueMapsTo:a}=i.pie;this.isRendering=!0;const o=this.model.getDisplayData().filter(L=>L[a]>0),l=this.computeRadius();this.arc=ms().innerRadius(this.getInnerRadius()).outerRadius(l),this.hoverArc=ms().innerRadius(this.getInnerRadius()).outerRadius(l+At.hoverArc.outerRadiusOffset);const c=tk().value(L=>L[a]).sort(x(i,"pie","sortFunction")).padAngle(At.padAngle)(o),u=R.appendOrSelect(r,"g.slices").attr("role",lt.GROUP).attr("data-name","slices").selectAll("path.slice").data(c,L=>L.data[s]);u.exit().attr("opacity",0).remove(),u.enter().append("path").classed("slice",!0).attr("opacity",0).merge(u).attr("class",L=>this.model.getColorClassName({classNameTypes:[et.FILL],dataGroupName:L.data[s],originalClassName:"slice"})).style("fill",L=>n.model.getFillColor(L.data[s],null,L.data)).attr("d",this.arc).transition().call(L=>this.services.transitions.setupTransition({transition:L,name:"pie_slice_enter_update",animate:t})).attr("opacity",1).attr("role",lt.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",L=>`${L[a]}, ${Gl(L.data[a],o,a)+"%"}`).attrTween("d",function(L){return TD.bind(this)(L,n.arc)}).on("end",()=>{n.isRendering=!1});const{code:d,number:h}=x(i,"locale"),p=i.pie.labels.enabled,f=p?c.filter(L=>L.data[a]>0):[],g=R.appendOrSelect(r,"g.labels").attr("role",lt.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(f,L=>L.data[s]);g.exit().attr("opacity",0).remove();const m=g.enter().append("text").classed("pie-label",!0),y=[];m.merge(g).style("text-anchor","middle").text(L=>i.pie.labels.formatter?i.pie.labels.formatter({...L,percentageValue:Gl(L.data[a],o,a,!0)}):h(Gl(L.data[a],o,a),d)+"%").datum(function(L){const k=l+7,w=(L.endAngle-L.startAngle)/2+L.startAngle,V=w/Math.PI*180,P=this.getComputedTextLength();return L.textOffsetX=P/2,L.textOffsetY=V>90&&V<270?10:0,L.xPosition=(L.textOffsetX+k)*Math.sin(w),L.yPosition=(L.textOffsetY+k)*-Math.cos(w),L}).attr("transform",function(L,k){const w=f.length,V=(L.endAngle-L.startAngle)*(180/Math.PI);if(k>=w-2&&V<At.callout.minSliceDegree){let P,B;return L.index===w-1?(P=L.xPosition+At.callout.offsetX+At.callout.textMargin+L.textOffsetX,B=L.yPosition-At.callout.offsetY,L.direction=di.RIGHT,y.push(L)):(P=L.xPosition-At.callout.offsetX-L.textOffsetX-At.callout.textMargin,B=L.yPosition-At.callout.offsetY,L.direction=di.LEFT,y.push(L)),`translate(${P}, ${B})`}return`translate(${L.xPosition}, ${L.yPosition})`}),this.renderCallouts(y);const v=x(i,"donut")?"donut":"pie",b=x(i,v,"alignment"),{width:O}=R.getSVGElementSize(this.getParent(),{useAttrs:!0}),E=p?At.xOffset:0,S=p?At.yOffset:0;let C=l+E;b===Vt.CENTER?C=O/2:b===Vt.RIGHT&&(C=O-l-At.xOffset);let I=l+S;y.length>0&&(I+=At.yOffsetCallout),r.attr("x",C+7).attr("y",I),this.addEventListeners()}renderCallouts(t){const n=R.appendOrSelect(this.getComponentContainer(),"g.callouts").attr("role",lt.GROUP).attr("data-name","callouts"),r=n.selectAll("g.callout").data(t);r.exit().remove();const i=r.enter().append("g").classed("callout",!0).attr("role",lt.GROUP).attr("aria-roledescription","label callout");i.merge(r).datum(function(s){const{xPosition:a,yPosition:o,direction:l}=s;return l===di.RIGHT?(s.startPos={x:a,y:o+s.textOffsetY},s.endPos={x:a+At.callout.offsetX,y:o-At.callout.offsetY+s.textOffsetY},s.intersectPointX=s.endPos.x-At.callout.horizontalLineLength):(s.startPos={x:a,y:o+s.textOffsetY},s.endPos={x:a-At.callout.offsetX,y:o-At.callout.offsetY+s.textOffsetY},s.intersectPointX=s.endPos.x+At.callout.horizontalLineLength),s}),i.append("line").classed("vertical-line",!0).merge(n.selectAll("line.vertical-line")).datum(function(){return D(this.parentNode).datum()}).style("stroke-width","1px").attr("x1",s=>s.startPos.x).attr("y1",s=>s.startPos.y).attr("x2",s=>s.intersectPointX).attr("y2",s=>s.endPos.y),i.append("line").classed("horizontal-line",!0).merge(n.selectAll("line.horizontal-line")).datum(function(){return D(this.parentNode).datum()}).style("stroke-width","1px").attr("x1",s=>s.intersectPointX).attr("y1",s=>s.endPos.y).attr("x2",s=>s.endPos.x).attr("y2",s=>s.endPos.y)}addEventListeners(){const t=this;this.parent.selectAll("path.slice").on("mouseover",function(n,r){const i=D(this);t.isRendering||i.classed("hovered",!0).transition("pie_slice_mouseover").call(o=>t.services.transitions.setupTransition({transition:o,name:"pie_slice_mouseover"})).attr("d",t.hoverArc),t.services.events.dispatchEvent(T.Pie.SLICE_MOUSEOVER,{event:n,element:D(this),datum:r});const{groupMapsTo:s}=t.getOptions().data,{valueMapsTo:a}=t.getOptions().pie;t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,items:[{label:r.data[s],value:r.data[a]}]})}).on("mousemove",function(n,r){const i=D(this);t.services.events.dispatchEvent(T.Pie.SLICE_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Pie.SLICE_CLICK,{event:n,element:D(this),datum:r})}).on("mouseout",function(n,r){const i=D(this);EC(()=>{t.isRendering||i.classed("hovered",!1).transition("pie_slice_mouseout").call(s=>t.services.transitions.setupTransition({transition:s,name:"pie_slice_mouseout"})).attr("d",t.arc)},100),t.services.events.dispatchEvent(T.Pie.SLICE_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})})}computeRadius(){const{width:t,height:n}=R.getSVGElementSize(this.parent,{useAttrs:!0}),r=this.getOptions(),i=Math.min(t,n)/2;return r.pie.labels.enabled?i+At.radiusOffset:i}}class SD extends Vg{constructor(){super(...arguments),this.type="donut",this.renderType=Q.SVG}render(t=!0){super.render(t);const n=this;if(this.model.isDataEmpty()){this.getComponentContainer({ariaLabel:"donut graph"}).select("g.center").remove();return}const r=R.appendOrSelect(this.getComponentContainer({ariaLabel:"donut graph"}),"g.center"),i=this.getOptions(),s=this.computeRadius(),a=x(i,"donut","center","label");R.appendOrSelect(r,"text.donut-figure").attr("text-anchor","middle").style("dominant-baseline",()=>a===null||a===""?"central":"initial").style("font-size",()=>i.donut.center.numberFontSize(s)).transition().call(o=>this.services.transitions.setupTransition({transition:o,name:"donut-figure-enter-update",animate:t})).tween("text",function(){return n.centerNumberTween(D(this))}),a!==null&&a!==""&&R.appendOrSelect(r,"text.donut-title").attr("text-anchor","middle").style("font-size",()=>i.donut.center.titleFontSize(s)).attr("y",i.donut.center.titleYPosition(s)).text(a)}getInnerRadius(){return this.computeRadius()*(3/4)}centerNumberTween(t){const n=this.getOptions();let r=x(n,"donut","center","number");r===null&&(r=this.model.getDisplayData().reduce((o,l)=>o+l[n.pie.valueMapsTo],0));const i=parseInt(t.text().replace(/[, ]+/g,""),10)||0;let s;i%1===0&&r%1===0?s=Id:s=ye;const a=s(i,r);return o=>{const{numberFormatter:l}=n.donut.center;if(l)t.text(l(a(o)));else{const{code:c,number:u}=x(n,"locale");t.text(u(Math.floor(a(o)),c))}}}}const Gg="4,10 8,6 12,10",Fg="12,6 8,10 4,6";class wD extends ht{constructor(){super(...arguments),this.type="gauge",this.renderType=Q.SVG}getValue(){var t;return((t=this.model.getData().find(n=>n.group==="value"))==null?void 0:t.value)??null}getValueRatio(){return Zf(this.getValue(),0,100)/100}getDelta(){var t;return((t=this.model.getData().find(n=>n.group==="delta"))==null?void 0:t.value)??null}getArcRatio(){const t=this.getOptions();return x(t,"gauge","type")===Wn.FULL?1:.5}getArcSize(){return this.getArcRatio()*Math.PI*2}getStartAngle(){const t=this.getArcSize();return t===2*Math.PI?0:-t/2}getArrow(t){const n=this.getOptions();switch(x(n,"gauge","deltaArrow","direction")){case Ms.UP:return Gg;case Ms.DOWN:return Fg;default:return t>0?Gg:Fg}}render(t=!0){const n=this.getComponentContainer({ariaLabel:"gauge graph"}).attr("width","100%").attr("height","100%"),r=this.getOptions(),i=this.getValue(),s=this.getValueRatio(),a=this.getArcSize(),o=this.getStartAngle(),l=s*a,c=o+l,u=o+a,d=this.computeRadius(),h=this.getInnerRadius();this.backgroundArc=ms().innerRadius(h).outerRadius(d).startAngle(c).endAngle(u),this.arc=ms().innerRadius(h).outerRadius(d).startAngle(o).endAngle(c),R.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc);const p=n.selectAll("path.arc-foreground").data([i]);p.enter().append("path").merge(p).attr("class",this.model.getColorClassName({classNameTypes:[et.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).style("fill",()=>x(this.getOptions(),"color","scale","value")).attr("d",this.arc).attr("role",lt.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",y=>y),this.drawValueNumber(),this.drawDelta(),p.exit().remove();const f=x(r,"gauge","alignment"),{width:g}=R.getSVGElementSize(this.getParent(),{useAttrs:!0});let m=d;f===Vt.CENTER?m=g/2:f===Vt.RIGHT&&(m=g-d),n.attr("x",m).attr("y",d),this.addEventListeners()}drawValueNumber(){const t=this.getComponentContainer(),n=this.getOptions(),r=x(n,"gauge","type"),i=this.getValue(),s=this.getDelta(),a=this.computeRadius(),o=x(n,"gauge","valueFontSize"),l=x(n,"gauge","deltaFontSize"),c=x(n,"gauge","numberSpacing"),u=x(n,"gauge","showPercentageSymbol");let d=0;r===Wn.FULL&&!s?d=l(a):r===Wn.SEMI&&s&&(d=-(l(a)+c));const h=R.appendOrSelect(t,"g.gauge-numbers").attr("transform",`translate(0, ${d})`),p=o(a),f=R.appendOrSelect(h,"g.gauge-value-number"),{code:g,number:m}=x(n,"locale"),y=x(n,"gauge","numberFormatter"),v=f.selectAll("text.gauge-value-number").data([i]);v.enter().append("text").attr("class","gauge-value-number").merge(v).style("font-size",`${p}px`).attr("text-anchor","middle").text(L=>{let k;return L!=null?k=Number(L.toFixed(2))%1!==0?L.toFixed(2):L.toFixed():k=0,y?y(k):m(Number(k),g)});const{width:b}=R.getSVGElementSize(R.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}),O=p/2,E=u?"%":"",S=R.appendOrSelect(f,"text.gauge-value-symbol").style("font-size",`${O}px`).attr("x",b/2).text(E),{width:C,height:I}=R.getSVGElementSize(S,{useBBox:!0});S.attr("y",`-${I/2}px`),f.attr("transform",`translate(-${C/2}, 0)`)}drawDelta(){const t=this,n=this.getComponentContainer(),r=this.getOptions(),i=this.getDelta(),{code:s,number:a}=x(r,"locale");if(i){const o=this.computeRadius(),l=i?x(r,"gauge","deltaFontSize"):()=>0,c=i?x(r,"gauge","numberFormatter"):()=>null,u=x(r,"gauge","deltaArrow","size"),d=x(r,"gauge","numberSpacing"),h=x(r,"gauge","showPercentageSymbol"),p=R.appendOrSelect(n,"g.gauge-numbers"),f=R.appendOrSelect(p,"g.gauge-delta").attr("transform",`translate(0, ${l(o)+d})`),g=R.appendOrSelect(f,"text.gauge-delta-number"),m=h?"%":"";g.data(i===null?[]:[i]),g.enter().append("text").classed("gauge-delta-number",!0).merge(g).attr("text-anchor","middle").style("font-size",`${l(o)}px`).text(O=>{let E;return O!=null?E=Number(O.toFixed(2))%1!==0?O.toFixed(2):O.toFixed():E=0,c?`${c(E)}${m}`:`${a(Number(E),s)}${m}`});const{width:y}=R.getSVGElementSize(R.appendOrSelect(n,".gauge-delta-number"),{useBBox:!0}),v=x(r,"gauge","deltaArrow","enabled"),b=f.selectAll("svg.gauge-delta-arrow").data(i!==null&&v?[i]:[]);b.enter().append("svg").merge(b).attr("class","gauge-delta-arrow").attr("x",-u(o)-y/2).attr("y",-u(o)/2-l(o)*.35).attr("width",u(o)).attr("height",u(o)).attr("viewBox","0 0 16 16").each(function(){const O=D(this);R.appendOrSelect(O,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");const E=x(r,"gauge","status");R.appendOrSelect(O,"polygon.gauge-delta-arrow").attr("class",E!==null?`gauge-delta-arrow status--${E}`:"").attr("points",t.getArrow(i))}),b.exit().remove(),g.exit().remove()}else{const o=n.select("g.gauge-delta");o.empty()||o.remove()}}getInnerRadius(){const t=this.computeRadius(),n=x(this.getOptions(),"gauge","arcWidth");return t-n}addEventListeners(){const t=this;this.parent.selectAll("path.arc-foreground").on("mouseover",function(n,r){t.services.events.dispatchEvent(T.Gauge.ARC_MOUSEOVER,{event:n,element:D(this),datum:r})}).on("mousemove",function(n,r){const i=D(this);t.services.events.dispatchEvent(T.Gauge.ARC_MOUSEMOVE,{event:n,element:i,datum:r})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Gauge.ARC_CLICK,{event:n,element:D(this),datum:r})}).on("mouseout",function(n,r){const i=D(this);t.services.events.dispatchEvent(T.Gauge.ARC_MOUSEOUT,{event:n,element:i,datum:r})})}computeRadius(){const t=this.getOptions(),n=x(t,"gauge","type"),{width:r,height:i}=R.getSVGElementSize(this.parent,{useAttrs:!0});return n===Wn.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)}}class zg extends yu{constructor(){super(...arguments),this.type="grouped-bar",this.renderType=Q.SVG,this.padding=5,this.defaultStepFactor=70,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-bar"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.model.getDisplayData(this.configs.groups),r=this.getOptions(),{groupMapsTo:i}=r.data;this.setGroupScale();const s=this.getComponentContainer({ariaLabel:"grouped bar graphs",withinChartClip:!0}),a=Li(n.map(u=>{const d=this.services.cartesianScales.getDomainIdentifier(u);return u[d]&&typeof u[d].toString=="function"?u[d].toString():u[d]})),o=s.selectAll("g.bars").data(a,u=>u);o.exit().attr("opacity",0).remove();const l=o.enter().append("g").classed("bars",!0).attr("role",lt.GROUP).attr("data-name","bars").merge(o);l.transition().call(u=>this.services.transitions.setupTransition({transition:u,name:"bar-group-update-enter",animate:t})).attr("transform",u=>{const d=this.services.cartesianScales.getDomainValue(u)-this.getGroupWidth()/2;return this.services.cartesianScales.getOrientation()===Ht.VERTICAL?`translate(${d}, 0)`:`translate(0, ${d})`});const c=l.selectAll("path.bar").data(u=>this.getDataCorrespondingToLabel(u),u=>u[i]);c.exit().attr("opacity",0).remove(),c.enter().append("path").attr("opacity",0).merge(c).classed("bar",!0).transition().call(u=>this.services.transitions.setupTransition({transition:u,name:"bar-update-enter",animate:t})).attr("class",u=>this.model.getColorClassName({classNameTypes:[et.FILL],dataGroupName:u[i],originalClassName:"bar"})).style("fill",u=>{const d=this.services.cartesianScales.getDomainIdentifier(u);return this.model.getFillColor(u[i],u[d],u)}).attr("d",u=>{const d=this.groupScale(u[i]),h=this.getBarWidth(),p=d,f=d+h,g=this.services.cartesianScales.getRangeAxisPosition({datum:u}),m=this.services.cartesianScales.getDomainLowerBound(g),y=this.services.cartesianScales.getValueThroughAxisPosition(g,m),v=this.services.cartesianScales.getRangeValue(u),b=this.services.cartesianScales.getDomainValue(u)-h/2,O=b+h;if(!this.isOutsideZoomedDomain(b,O))return ie({x0:p,x1:f,y0:y,y1:v},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",lt.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",u=>u.value),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("path.bar").on("mouseover",function(n,r){const i=D(this);i.classed("hovered",!0),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOVER,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,data:[r]})}).on("mousemove",function(n,r){const i=D(this);t.services.events.dispatchEvent(T.Bar.BAR_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Bar.BAR_CLICK,{event:n,element:D(this),datum:r})}).on("mouseout",function(n,r){const i=D(this);i.classed("hovered",!1),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getDataCorrespondingToLabel(t){return this.model.getDisplayData(this.configs.groups).filter(n=>{const r=this.services.cartesianScales.getDomainIdentifier(n);return n[r].toString()===t})}getGroupWidth(){const t=this.model.getGroupedData(this.configs.groups),n=this.getTotalGroupPadding();return this.getBarWidth()*t.length+n}getDomainScaleStep(){const t=this.services.cartesianScales.getDomainScale(),n=this.model.getGroupedData(this.configs.groups);let r=this.defaultStepFactor;if(typeof t.step=="function")r=t.step();else if(n.length>0){const i=n.find(s=>{var a;return((a=s.data)==null?void 0:a.length)>1});if(i){const s=this.services.cartesianScales.getDomainIdentifier(i.data[0]);r=Math.abs(t(i.data[1][s])-t(i.data[0][s]))}}return r}getTotalGroupPadding(){const t=this.model.getGroupedData(this.configs.groups);return t.length===1?0:Math.min(5,5*(this.getDomainScaleStep()/this.defaultStepFactor))*(t.length-1)}getBarWidth(){const t=this.getOptions(),n=x(t,"bars","width"),r=x(t,"bars","maxWidth");if(n!==null&&(r===null||n<=r))return n;const i=this.model.getGroupedData(this.configs.groups).length,s=this.getTotalGroupPadding();return Math.min(r,(this.getDomainScaleStep()-s)/i)}setGroupScale(){const t=this.model.getActiveDataGroupNames(this.configs.groups);this.groupScale=Yi().domain(t).rangeRound([0,this.getGroupWidth()])}}class $D extends ht{constructor(){super(...arguments),this.type="heatmap",this.renderType=Q.SVG,this.matrix={},this.xBandwidth=0,this.yBandwidth=0,this.translationUnits={x:0,y:0},this.handleAxisOnHover=t=>{const{detail:n}=t,{datum:r}=n,i=this.model.getUniqueRanges(),s=this.model.getUniqueDomain(),a=this.services.cartesianScales.getDomainLabel(),o=this.services.cartesianScales.getRangeLabel(),l=this.services.cartesianScales.getMainXScale(),c=this.services.cartesianScales.getMainYScale();let u="",d=null,h=null,p=null;this.matrix[r]!==void 0?(u=a,i.forEach(f=>{if(typeof this.matrix[r][f].value=="number"){const g=this.matrix[r][f].value;if(d===null){d=g,h=g,p=g;return}d+=g,h=g<h?g:h,p=g>p?g:p}})):(u=o,s.forEach(f=>{if(typeof this.matrix[f][r].value=="number"){const g=this.matrix[f][r].value;if(d===null){d=g,h=g,p=g;return}d+=g,h=g<h?g:h,p=g>p?g:p}})),l(r)!==void 0?this.parent.select("g.multi-cell.column-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${l(r)}, ${Dn(c.range())})`):c(r)!==void 0&&this.parent.select("g.multi-cell.row-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${Dn(l.range())},${c(r)})`),this.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n.event,hoveredElement:D(t.detail.element),items:[{label:u,value:r,bold:!0},{label:"Min",value:h!==null?h:"-"},{label:"Max",value:p!==null?p:"-"},{label:"Average",value:d!==null?d/s.length:"-"}]})},this.handleAxisMouseOut=t=>{this.parent.selectAll("g.multi-cell").classed("highlighter-hidden",!0),this.services.events.dispatchEvent(T.Tooltip.HIDE,{event:t})}}init(){const t=this.services.events;t.addEventListener(T.Axis.LABEL_MOUSEOVER,this.handleAxisOnHover),t.addEventListener(T.Axis.LABEL_MOUSEOUT,this.handleAxisMouseOut),t.addEventListener(T.Axis.LABEL_FOCUS,this.handleAxisOnHover),t.addEventListener(T.Axis.LABEL_BLUR,this.handleAxisMouseOut)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"heatmap",withinChartClip:!0});n.lower();const{cartesianScales:r}=this.services;if(this.matrix=this.model.getMatrix(),n.html(""),x(this.getOptions(),"data","loading"))return;const i=r.getMainXScale(),s=r.getMainYScale(),a=r.getDomainIdentifier(),o=r.getRangeIdentifier(),l=this.model.getUniqueDomain(),c=this.model.getUniqueRanges(),u=this.model.getMatrixAsArray(),d=i.range(),h=s.range();this.xBandwidth=Math.abs((d[1]-d[0])/l.length),this.yBandwidth=Math.abs((h[1]-h[0])/c.length);const p=this.services.domUtils.generateElementIDString("heatmap-pattern-stripes");n.append("defs").append("pattern").attr("id",p).attr("width",3).attr("height",3).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("rect").classed("pattern-fill",!0).attr("width",.5).attr("height",8);const f=n.selectAll().data(u).enter().append("g").attr("class",g=>`heat-${g.index}`).classed("cell",!0).attr("transform",g=>`translate(${i(g[a])}, ${s(g[o])})`).append("rect").attr("class",g=>this.model.getColorClassName({value:g.value,originalClassName:`heat-${g.index}`})).classed("heat",!0).classed("null-state",g=>g.index===-1||g.value===null).attr("width",this.xBandwidth).attr("height",this.yBandwidth).style("fill",g=>{const m=this.services.cartesianScales.getDomainIdentifier(g);return g.index===-1||g.value===null?`url(#${p})`:this.model.getFillColor(Number(g.value),g[m],g)}).attr("aria-label",g=>g.value);this.createOuterBox("g.cell-highlight",this.xBandwidth,this.yBandwidth),this.createOuterBox("g.multi-cell.column-highlight",this.xBandwidth,Math.abs(h[1]-h[0])),this.createOuterBox("g.multi-cell.row-highlight",Math.abs(d[1]-d[0]),this.yBandwidth),this.determineDividerStatus()&&(f.style("stroke-width","1px"),this.parent.select("g.cell-highlight").classed("cell-2",!0)),this.addEventListener()}createOuterBox(t,n,r){const i=R.appendOrSelect(this.parent,t).classed("shadows",!0).classed("highlighter-hidden",!0);R.appendOrSelect(i,"line.top").attr("x1",-1).attr("x2",n+1),R.appendOrSelect(i,"line.left").attr("x1",0).attr("y1",-1).attr("x2",0).attr("y2",r+1),R.appendOrSelect(i,"line.down").attr("x1",-1).attr("x2",n+1).attr("y1",r).attr("y2",r),R.appendOrSelect(i,"line.right").attr("x1",n).attr("x2",n).attr("y1",-1).attr("y2",r+1)}determineDividerStatus(){const t=x(this.getOptions(),"heatmap","divider","state");return t!==wr.OFF&&(t===wr.AUTO&&hp.minCellDividerDimension<=this.xBandwidth&&hp.minCellDividerDimension<=this.yBandwidth||t===wr.ON)}addEventListener(){const t=this,{cartesianScales:n}=this.services,r=this.getOptions(),i=gt(r,"locale.translations.total")||gt(r,"tooltip.totalLabel")||"Total",s=n.getDomainIdentifier(),a=n.getRangeIdentifier(),o=n.getDomainLabel(),l=n.getRangeLabel();this.parent.selectAll("g.cell").on("mouseover",function(c,u){const d=D(this),h=d.select("rect.heat");if(!h.classed("null-state")){const p=zi(d.attr("transform"));t.parent.select("g.cell-highlight").attr("transform",`translate(${p.x+t.translationUnits.x}, ${p.y+t.translationUnits.y})`).classed("highlighter-hidden",!1),t.services.events.dispatchEvent(T.Heatmap.HEATMAP_MOUSEOVER,{event:c,element:h,datum:u}),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:c,items:[{label:o,value:u[s]},{label:l,value:u[a]},{label:i,value:u.value,color:h.style("fill")}]})}}).on("mousemove",function(c,u){t.services.events.dispatchEvent(T.Heatmap.HEATMAP_MOUSEMOVE,{event:c,element:D(this),datum:u}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:c})}).on("click",function(c,u){t.services.events.dispatchEvent(T.Heatmap.HEATMAP_CLICK,{event:c,element:D(this),datum:u})}).on("mouseout",function(c,u){const d=D(this).select("rect.heat"),h=d.classed("null-state");t.parent.select("g.cell-highlight").classed("highlighter-hidden",!0),h||(t.services.events.dispatchEvent(T.Heatmap.HEATMAP_MOUSEOUT,{event:c,element:d,datum:u}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{event:c,hoveredElement:d}))})}destroy(){this.parent.selectAll("rect.heat").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleAxisOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleAxisMouseOut)}}class MD extends ht{constructor(){super(...arguments),this.type="histogram",this.renderType=Q.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(s=>this.services.transitions.setupTransition({transition:s,name:"legend-hover-bar"})).attr("opacity",s=>s[i]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer({ariaLabel:"histogram bars"}),r=this.model.getOptions(),{groupIdentifier:i}=r,{groupMapsTo:s}=r.data,a=this.model.getBinnedStackedData(),o=this.services.cartesianScales.getMainXScale(),l=n.selectAll("g.bars").data(a,u=>gt(u,`0.${s}`));l.exit().attr("opacity",0).remove(),l.enter().append("g").classed("bars",!0).attr("role",lt.GROUP);const c=n.selectAll("g.bars").selectAll("path.bar").data(u=>u);c.exit().remove(),c.enter().append("path").merge(c).classed("bar",!0).attr(i,(u,d)=>d).transition().call(u=>this.services.transitions.setupTransition({transition:u,name:"histogram-bar-update-enter",animate:t})).attr("class",u=>this.model.getColorClassName({classNameTypes:[et.FILL],dataGroupName:u[s],originalClassName:"bar"})).style("fill",u=>this.model.getFillColor(u[s],null,u)).attr("d",u=>{const d=gt(u,"data");if(!d)return;const h=o(d.x1)-o(d.x0)-1,p=this.services.cartesianScales.getDomainValue(d.x0),f=p+h,g=this.services.cartesianScales.getRangeValue(u[0]);let m=this.services.cartesianScales.getRangeValue(u[1]);return Math.abs(m-g)>0&&Math.abs(m-g)>r.bars.dividerSize&&(this.services.cartesianScales.getOrientation()===Ht.VERTICAL?m+=1:m-=1),ie({x0:p,x1:f,y0:g,y1:m},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",lt.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",u=>x(u,"data",u[s])),this.addEventListeners()}addEventListeners(){const t=this.model.getOptions(),{groupMapsTo:n}=t.data,{code:r,number:i}=x(t,"locale"),s=this;this.parent.selectAll("path.bar").on("mouseover",function(a,o){const l=D(this);l.classed("hovered",!0);const c=i(parseFloat(gt(o,"data.x0")),r),u=i(parseFloat(gt(o,"data.x1")),r),d=s.services.cartesianScales.getRangeAxisPosition(),h=s.services.cartesianScales.getScaleLabel(d);s.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:l,items:[{label:gt(t,"bins.rangeLabel")||"Range",value:`${c} – ${u}`},{label:t.tooltip.groupLabel||"Group",value:o[n],class:s.model.getColorClassName({classNameTypes:[et.TOOLTIP],dataGroupName:o[n]})},{label:h,value:gt(o,`data.${o[n]}`)}]})}).on("mousemove",function(a){s.services.events.dispatchEvent(T.Tooltip.MOVE,{event:a})}).on("mouseout",function(){D(this).classed("hovered",!1),s.services.events.dispatchEvent(T.Tooltip.HIDE)})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class CD extends on{constructor(){super(...arguments),this.type="lollipop",this.renderType=Q.SVG,this.handleScatterOnHover=t=>{const n=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("line.line").attr("stroke-width",s=>s[i]!==n.datum[i]?vn.weight.unselected:vn.weight.selected)},this.handleScatterOnMouseOut=()=>{this.parent.selectAll("line.line").attr("stroke-width",vn.weight.unselected)},this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("line.line").transition("legend-hover-line").call(s=>this.services.transitions.setupTransition({transition:s,name:"legend-hover-line"})).attr("opacity",s=>s[i]!==n.datum().name?vn.opacity.unselected:vn.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("line.line").transition("legend-mouseout-line").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-line"})).attr("opacity",vn.opacity.selected)}}init(){const{events:t}=this.services;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer({ariaLabel:"lines",withinChartClip:!0}),r=this.model.getOptions(),{groupMapsTo:i}=r.data,{cartesianScales:s}=this.services,a=s.getMainXScale(),o=s.getMainYScale(),l=s.getDomainIdentifier(),c=m=>s.getDomainValue(m),u=m=>s.getRangeValue(m),d=s.getOrientation(),[h,p]=xn(c,u,d),f=n.selectAll("line.line").data(this.getScatterData(),m=>`${m[i]}-${m[l]}`);f.exit().attr("opacity",0).remove();const g=f.enter().append("line").attr("opacity",0).merge(f).classed("line",!0).attr("class",m=>this.model.getColorClassName({classNameTypes:[et.STROKE],dataGroupName:m[i],originalClassName:"line"})).transition().call(m=>this.services.transitions.setupTransition({transition:m,name:"lollipop-line-update-enter",animate:t})).style("stroke",m=>this.model.getFillColor(m[i],m[l],m)).attr("opacity",1);d===Ht.HORIZONTAL?g.attr("y1",p).attr("y2",p).attr("x1",a.range()[0]).attr("x2",m=>h(m)-r.points.radius):g.attr("x1",h).attr("x2",h).attr("y1",o.range()[0]).attr("y2",m=>p(m)+r.points.radius),this.addScatterPointEventListeners()}addScatterPointEventListeners(){this.services.events.addEventListener(T.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),this.services.events.addEventListener(T.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)}destroy(){const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(T.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),t.removeEventListener(T.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)}}class AD extends ht{constructor(){super(...arguments),this.type="meter",this.renderType=Q.SVG}getStackedBounds(t,n){let r=0;return t.map((i,s)=>s!==0?(r+=n(i.value),{...i,width:Math.abs(n(i.value)-Kt.dividerWidth),x:r-n(i.value)}):(r=n(i.value),{...i,width:Math.abs(n(i.value)-Kt.dividerWidth),x:0}))}render(t=!0){const n=this,r=this.getComponentContainer({ariaLabel:"meter lines"}),i=this.getOptions(),s=x(i,"meter","proportional"),a=this.model.getDisplayData(),o=this.model.getStatus(),{width:l}=R.getSVGElementSize(r,{useAttrs:!0}),{groupMapsTo:c}=i.data;let u;x(i,"meter","proportional")===null?u=100:u=x(i,"meter","proportional","total")||this.model.getMaximumDomain(this.model.getDisplayData());const d=Fe().domain([0,u]).range([0,l]),h=this.getStackedBounds(a,d),p=x(i,"meter","height");R.appendOrSelect(r,"rect.container").attr("x",0).attr("y",0).attr("width",l).attr("height",p||(s?Kt.height.proportional:Kt.height.default)),R.appendOrSelect(r,"line.rangeIndicator").attr("x1",l).attr("x2",l).attr("y1",0).attr("y2",p||(s?Kt.height.proportional:Kt.height.default));const f=r.selectAll("rect.value").data(h),g=o!=null&&!n.model.isUserProvidedColorScaleValid()&&!s?`value status--${o}`:"value";f.enter().append("rect").classed("value",!0).merge(f).attr("x",b=>b.x).attr("y",0).attr("height",()=>p||(s?Kt.height.proportional:Kt.height.default)).attr("class",b=>this.model.getColorClassName({classNameTypes:[et.FILL],dataGroupName:b[c],originalClassName:g})).transition().call(b=>this.services.transitions.setupTransition({transition:b,name:"meter-bar-update",animate:t})).attr("width",b=>b.value>u?d(u):Math.max(b.width,2)).style("fill",b=>n.model.getFillColor(b[c],null,b)).attr("role",lt.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",b=>b.value),f.exit().remove();const m=x(i,"meter","peak");let y=m;m!==null&&(m>u?y=u:m<0&&(y=0));const v=r.selectAll("line.peak").data(y==null?[]:[y]);v.enter().append("line").classed("peak",!0).merge(v).attr("y1",0).attr("y2",()=>p||(s?Kt.height.proportional:Kt.height.default)).transition().call(b=>this.services.transitions.setupTransition({transition:b,name:"peak-line-update",animate:t})).attr("x1",b=>d(b)).attr("x2",b=>d(b)).attr("role",lt.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",b=>b),v.exit().remove(),this.services.domUtils.setSVGMaxHeight(),this.addEventListeners()}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this,i=x(t,"meter","proportional");this.parent.selectAll("rect.value").on("mouseover",function(s,a){const o=D(this);r.services.events.dispatchEvent(T.Meter.METER_MOUSEOVER,{event:s,element:o,datum:a}),i&&(o.classed("hovered",!0),r.services.events.dispatchEvent(T.Tooltip.SHOW,{event:s,hoveredElement:o,items:[{label:a[n],value:a.value}]}))}).on("mousemove",function(s,a){const o=D(this);r.services.events.dispatchEvent(T.Meter.METER_MOUSEMOVE,{event:s,element:o,datum:a}),i&&r.services.events.dispatchEvent(T.Tooltip.MOVE,{event:s})}).on("click",function(s,a){r.services.events.dispatchEvent(T.Meter.METER_CLICK,{event:s,element:D(this),datum:a})}).on("mouseout",function(s,a){const o=D(this);r.services.events.dispatchEvent(T.Meter.METER_MOUSEOUT,{event:s,element:o,datum:a}),i&&(o.classed("hovered",!1),r.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:o}))})}destroy(){this.parent.selectAll("rect.value").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null)}}class LD extends ht{constructor(){super(...arguments),this.type="radar",this.renderType=Q.SVG,this.getLabelDimensions=t=>{const n=R.appendOrSelect(this.getComponentContainer(),"g.tmp-tick"),r=R.appendOrSelect(n,"text").text(t),{width:i,height:s}=R.getSVGElementSize(r.node(),{useBBox:!0});return n.remove(),{width:i,height:s}},this.normalizeFlatData=t=>{const n=this.getOptions(),{angle:r,value:i}=x(n,"radar","axes"),s=x(n,"data","groupMapsTo"),a=wC(this.uniqueKeys.map(o=>this.uniqueGroups.map(l=>({[r]:o,[s]:l,[i]:null}))));return st(a,t)},this.normalizeGroupedData=t=>{const n=this.getOptions(),{angle:r,value:i}=x(n,"radar","axes"),s=x(n,"data","groupMapsTo");return t.map(({name:a,data:o})=>{const l=this.uniqueKeys.map(c=>({[s]:a,[r]:c,[i]:null}));return{name:a,data:st(l,o)}})},this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("g.blobs path").transition("legend-hover-blob").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-blob"})).style("fill-opacity",r=>r.name!==n.datum().name?sr.opacity.unselected:sr.opacity.selected).style("stroke-opacity",r=>r.name!==n.datum().name?sr.opacity.unselected:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("g.blobs path").transition("legend-mouseout-blob").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-blob"})).style("fill-opacity",sr.opacity.selected).style("stroke-opacity",1)}}init(){const{events:t}=this.services;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"radar graph"}),{width:r,height:i}=R.getSVGElementSize(n,{useAttrs:!0}),s=this.model.getData(),a=this.model.getGroupedData(),o=this.getOptions(),l=x(o,"data","groupMapsTo"),c=x(o,"radar","axes","value"),{angle:u,value:d}=x(o,"radar","axes"),{xLabelPadding:h,yLabelPadding:p,yTicksNumber:f,minRange:g,xAxisRectHeight:m}=sr;this.uniqueKeys=Array.from(new Set(s.map(_=>_[u]))),this.uniqueGroups=Array.from(new Set(s.map(_=>_[l]))),this.fullDataNormalized=this.normalizeFlatData(s),this.groupedDataNormalized=this.normalizeGroupedData(a);const y=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+p),v=(Math.min(r,i)-y)/2;if(v<=0)return;const b=Yi().domain(this.fullDataNormalized.map(_=>_[u])).range([0,2*Math.PI].map(_=>_-Math.PI/2)),O=Dn(this.fullDataNormalized.map(_=>_[d])),E=Fe().domain([O>=0?0:O,tr(this.fullDataNormalized.map(_=>_[d]))]).range([g,v]).nice(f),S=E.ticks(f),C=(_,M,A)=>this.model.getFillColor(_,M,A),I=rk().angle(_=>b(_[u])+Math.PI/2).radius(_=>E(_[d])).curve(ff),L=this.uniqueKeys.map(_=>{const M=this.getLabelDimensions(_).width,A=A2(b(_),v);return M+A}),k={x:tr(L)+h,y:i/2},w=R.appendOrSelect(n,"g.y-axes").attr("role",lt.GROUP).selectAll("path").data(S,_=>_),V=_=>this.uniqueKeys.map(M=>({[u]:M,[d]:_}));w.join(_=>_.append("path").attr("opacity",0).attr("transform",`translate(${k.x}, ${k.y})`).attr("fill","none").call(M=>M.transition().call(A=>this.services.transitions.setupTransition({transition:A,name:"radar_y_axes_enter",animate:t})).attr("opacity",1).attr("d",A=>I(V(A)))),_=>_.call(M=>M.transition().call(A=>this.services.transitions.setupTransition({transition:A,name:"radar_y_axes_update",animate:t})).attr("opacity",1).attr("transform",`translate(${k.x}, ${k.y})`).attr("d",A=>I(V(A)))),_=>_.call(M=>M.transition().call(A=>this.services.transitions.setupTransition({transition:A,name:"radar_y_axes_exit",animate:t})).attr("d",A=>I(V(A))).attr("opacity",0).remove())),R.appendOrSelect(n,"g.x-axes").attr("role",lt.GROUP).selectAll("line").data(this.uniqueKeys,_=>_).join(_=>_.append("line").attr("opacity",0).attr("class",M=>`x-axis-${Xr(M)}`).attr("stroke-dasharray","0").attr("x1",M=>Pt(b(M),0,k).x).attr("y1",M=>Pt(b(M),0,k).y).attr("x2",M=>Pt(b(M),0,k).x).attr("y2",M=>Pt(b(M),0,k).y).call(M=>M.transition().call(A=>this.services.transitions.setupTransition({transition:A,name:"radar_x_axes_enter",animate:t})).attr("opacity",1).attr("x1",A=>Pt(b(A),E.range()[0],k).x).attr("y1",A=>Pt(b(A),E.range()[0],k).y).attr("x2",A=>Pt(b(A),E.range()[1],k).x).attr("y2",A=>Pt(b(A),E.range()[1],k).y)),_=>_.call(M=>M.transition().call(A=>this.services.transitions.setupTransition({transition:A,name:"radar_x_axes_update",animate:t})).attr("opacity",1).attr("x1",A=>Pt(b(A),E.range()[0],k).x).attr("y1",A=>Pt(b(A),E.range()[0],k).y).attr("x2",A=>Pt(b(A),E.range()[1],k).x).attr("y2",A=>Pt(b(A),E.range()[1],k).y)),_=>_.call(M=>M.transition().call(A=>this.services.transitions.setupTransition({transition:A,name:"radar_x_axes_exit",animate:t})).attr("opacity",0).remove())),R.appendOrSelect(n,"g.x-labels").attr("role",lt.GROUP).selectAll("text").data(this.uniqueKeys).join(_=>_.append("text").text(M=>M).attr("opacity",0).attr("x",M=>Pt(b(M),E.range()[1]+h,k).x).attr("y",M=>Pt(b(M),E.range()[1]+h,k).y).style("text-anchor",M=>Cf(b(M)).textAnchor).style("dominant-baseline",M=>Cf(b(M)).dominantBaseline).call(M=>M.transition().call(A=>this.services.transitions.setupTransition({transition:A,name:"radar_x_labels_enter",animate:t})).attr("opacity",1)),_=>_.call(M=>M.transition().call(A=>this.services.transitions.setupTransition({transition:A,name:"radar_x_labels_update",animate:t})).attr("opacity",1).attr("x",A=>Pt(b(A),E.range()[1]+h,k).x).attr("y",A=>Pt(b(A),E.range()[1]+h,k).y).end().finally(()=>{const A=x(o,"radar","alignment"),N=this.getAlignmentXOffset(A,n,this.getParent());n.attr("x",N)})),_=>_.call(M=>M.transition().call(A=>this.services.transitions.setupTransition({transition:A,name:"radar_x_labels_exit",animate:t})).attr("opacity",0).remove())),R.appendOrSelect(n,"g.blobs").attr("role",lt.GROUP).selectAll("path").data(this.groupedDataNormalized,_=>_.name).join(_=>_.append("path").attr("class",M=>this.model.getColorClassName({classNameTypes:[et.FILL,et.STROKE],dataGroupName:M.name,originalClassName:"blob"})).attr("role",lt.GRAPHICS_SYMBOL).attr("aria-label",M=>M.name).attr("opacity",0).attr("transform",t?()=>`translate(${k.x}, ${k.y}) scale(${1+Math.random()*.35})`:`translate(${k.x}, ${k.y})`).style("fill",M=>C(M.name,null,M.data)).style("fill-opacity",sr.opacity.selected).style("stroke",M=>C(M.name,null,M.data)).call(M=>{const A=M.transition().call(N=>this.services.transitions.setupTransition({transition:N,name:"radar_blobs_enter",animate:t}));t&&A.delay(()=>Math.random()*30).attr("transform",`translate(${k.x}, ${k.y})`),A.attr("opacity",1).attr("d",N=>I(N.data))}),_=>(_.attr("class",M=>this.model.getColorClassName({classNameTypes:[et.FILL,et.STROKE],dataGroupName:M.name,originalClassName:"blob"})).style("fill",M=>C(M.name,null,M.data)).style("stroke",M=>C(M.name,null,M.data)),_.call(M=>M.transition().call(A=>this.services.transitions.setupTransition({transition:A,name:"radar_blobs_update",animate:t})).attr("opacity",1).attr("transform",`translate(${k.x}, ${k.y})`).attr("d",A=>I(A.data))),_),_=>_.call(M=>{const A=M.transition().call(N=>this.services.transitions.setupTransition({transition:N,name:"radar_blobs_exit",animate:t}));t&&A.delay(()=>Math.random()*30).attr("transform",()=>`translate(${k.x}, ${k.y}) scale(${1+Math.random()*.35})`),A.attr("opacity",0).remove()})),R.appendOrSelect(n,"g.dots").attr("role",lt.GROUP).selectAll("circle").data(this.fullDataNormalized.filter(_=>x(_,d)!==null)).join(_=>_.append("circle").attr("role",lt.GRAPHICS_SYMBOL).attr("aria-label",M=>M[c]),_=>_,_=>_.remove()).attr("class",_=>this.model.getColorClassName({classNameTypes:[et.FILL],dataGroupName:_[l],originalClassName:Xr(_[u])})).attr("cx",_=>Pt(b(_[u]),E(_[d]),k).x).attr("cy",_=>Pt(b(_[u]),E(_[d]),k).y).attr("r",0).attr("opacity",0).style("fill",_=>C(_[l])),R.appendOrSelect(n,"g.x-axes-rect").attr("role",lt.GROUP).selectAll("rect").data(this.uniqueKeys).join(_=>_.append("rect"),_=>_,_=>_.remove()).attr("x",k.x).attr("y",k.y-m/2).attr("width",E.range()[1]).attr("height",m).style("fill","red").style("fill-opacity",0).attr("transform",_=>`rotate(${Af(b(_))}, ${k.x}, ${k.y})`);const{code:P,number:B}=x(o,"locale");R.appendOrSelect(n,"g.y-labels").attr("role",lt.GROUP).selectAll("text").data(He(S)).join(_=>_.append("text").attr("opacity",0).text(M=>B(M,P)).attr("x",M=>Pt(-Math.PI/2,E(M),k).x+p).attr("y",M=>Pt(-Math.PI/2,E(M),k).y).style("text-anchor","start").style("dominant-baseline","middle").call(M=>M.transition().call(A=>this.services.transitions.setupTransition({transition:A,name:"radar_y_labels_enter",animate:t})).attr("opacity",1)),_=>_.call(M=>M.transition().call(A=>this.services.transitions.setupTransition({transition:A,name:"radar_y_labels_update",animate:t})).text(A=>A).attr("opacity",1).attr("x",A=>Pt(-Math.PI/2,E(A),k).x+p).attr("y",A=>Pt(-Math.PI/2,E(A),k).y)),_=>_.call(M=>M.transition().call(A=>this.services.transitions.setupTransition({transition:A,name:"radar_y_labels_exit",animate:t})).attr("opacity",0).remove())),this.addEventListeners()}getAlignmentXOffset(t,n,r){const i=R.getSVGElementSize(n,{useBBox:!0}),{width:s}=R.getSVGElementSize(r,{useAttrs:!0});let a=0;return t===Vt.CENTER?a=Math.floor((s-i.width)/2):t===Vt.RIGHT&&(a=s-i.width),a}destroy(){this.parent.selectAll(".x-axes-rect > rect").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}addEventListeners(){const t=this,{axes:{angle:n}}=x(this.getOptions(),"radar");this.parent.selectAll(".x-axes-rect > rect").on("mouseover",function(r,i){const s=D(this);t.services.events.dispatchEvent(T.Radar.X_AXIS_MOUSEOVER,{event:r,element:s,datum:i});const a=t.parent.select(`.x-axes .x-axis-${Xr(i)}`),o=t.parent.selectAll(`.dots circle.${Xr(i)}`),l=t.model.getActiveDataGroupNames(),c=t.getOptions(),{groupMapsTo:u}=c.data,d=x(c,"radar","axes","value");a.classed("hovered",!0).attr("stroke-dasharray","4 4"),o.classed("hovered",!0).attr("opacity",p=>l.indexOf(p[u])!==-1?1:0).attr("r",sr.dotsRadius);const h=t.fullDataNormalized.filter(p=>p[n]===i&&l.indexOf(p[u])!==-1);t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:r,hoveredElement:s,items:h.filter(p=>typeof p[d]=="number").map(p=>({label:p[u],value:p[d],color:t.model.getFillColor(p[u],null,p),class:t.model.getColorClassName({classNameTypes:[et.TOOLTIP],dataGroupName:p[u]})}))})}).on("mousemove",function(r,i){const s=D(this);t.services.events.dispatchEvent(T.Radar.X_AXIS_MOUSEMOVE,{event:r,element:s,datum:i}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:r})}).on("click",function(r,i){t.services.events.dispatchEvent(T.Radar.X_AXIS_CLICK,{event:r,element:D(this),datum:i})}).on("mouseout",function(r,i){const s=D(this),a=t.parent.select(`.x-axes .x-axis-${Xr(i)}`),o=t.parent.selectAll(`.dots circle.${Xr(i)}`);a.classed("hovered",!1).attr("stroke-dasharray","0"),o.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(T.Radar.X_AXIS_MOUSEOUT,{event:r,element:s,datum:i}),t.services.events.dispatchEvent(T.Tooltip.HIDE)})}}class jg extends yu{constructor(){super(...arguments),this.type="simple-bar",this.renderType=Q.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-simple-bar"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-simple-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.getComponentContainer({ariaLabel:"bar graphs",withinChartClip:!0}),s=this.model.getDisplayData(this.configs.groups),a=this.services.cartesianScales.getOrientation(),o=i.selectAll("path.bar").data(s,l=>l[r]);o.exit().attr("opacity",0).remove(),o.enter().append("path").attr("opacity",0).merge(o).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition().call(l=>this.services.transitions.setupTransition({transition:l,name:"bar-update-enter",animate:t})).attr("class",l=>this.model.getColorClassName({classNameTypes:[et.FILL],dataGroupName:l[r],originalClassName:"bar"})).style("fill",l=>{const c=this.services.cartesianScales.getDomainIdentifier(l);return this.model.getFillColor(l[r],l[c],l)}).attr("d",l=>{const c=this.services.cartesianScales.getRangeIdentifier(),u=this.getBarWidth(),d=l[c],h=this.services.cartesianScales.getDomainValue(l)-u/2,p=h+u;let f,g;if(Array.isArray(d)&&d.length===2)f=this.services.cartesianScales.getRangeValue(d[0]),g=this.services.cartesianScales.getRangeValue(d[1]);else{const y=this.services.cartesianScales.getRangeScale().domain()[0];f=this.services.cartesianScales.getRangeValue(Math.max(0,y)),g=this.services.cartesianScales.getRangeValue(l)}const m=Math.abs(g-f);if(m!==0&&m<2&&(d>0&&a===Ht.VERTICAL||d<0&&a===Ht.HORIZONTAL?g=f-2:g=f+2),!this.isOutsideZoomedDomain(h,p))return ie({x0:h,x1:p,y0:f,y1:g},a)}).attr("opacity",1).attr("role",lt.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",l=>l.value),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("path.bar").on("mouseover",function(n,r){const i=D(this);i.classed("hovered",!0),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOVER,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,data:[r]})}).on("mousemove",function(n,r){t.services.events.dispatchEvent(T.Bar.BAR_MOUSEMOVE,{event:n,element:D(this),datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Bar.BAR_CLICK,{event:n,element:D(this),datum:r})}).on("mouseout",function(n,r){const i=D(this);i.classed("hovered",!1),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class kD extends le{constructor(){super(...arguments),this.type="skeleton-lines"}render(t=!0){const n=x(this.getOptions(),"data","loading"),r=!x(this.getOptions(),"grid","x","enabled")&&!x(this.getOptions(),"grid","y","enabled")&&!x(this.getOptions(),"axes","bottom","visible")&&!x(this.getOptions(),"axes","left","visible");n&&!r?super.renderGridSkeleton(n):n&&r?this.renderSparklineSkeleton(n):this.removeSkeleton()}renderSparklineSkeleton(t){this.setScales(),this.drawBackdrop(t),this.drawSparkline(t),this.updateBackdropStyle(),t&&this.setShimmerEffect("shimmer-lines")}drawSparkline(t){const n=this.backdrop.attr("width"),r=[100],i=R.appendOrSelect(this.backdrop,"g.y.skeleton"),s=i.selectAll("line").data(r);s.enter().append("line").merge(s).attr("x1",0).attr("x2",n).attr("y1",a=>a).attr("y2",a=>a),i.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}updateBackdropStyle(){const t=this.parent;this.backdrop=R.appendOrSelect(t,"svg.chart-skeleton.DAII"),R.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)}}class Wg extends ht{constructor(){super(...arguments),this.type="area-stacked",this.renderType=Q.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("path.area").transition("legend-hover-area").call(s=>this.services.transitions.setupTransition({transition:s,name:"legend-hover-area"})).attr("opacity",s=>x(s,0,i)!==n.datum().name?gn.opacity.unselected:gn.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.area").transition("legend-mouseout-area").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-area"})).attr("opacity",gn.opacity.selected)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"stacked area graphs",withinChartClip:!0}),r=this,i=this.getOptions(),{groupMapsTo:s}=i.data,a=Object.keys(i.axes).some(p=>i.axes[p].percentage),o=this.model.getStackedData({percentage:a,groups:this.configs.groups}),l=x(o,0,0),c=this.services.cartesianScales.getDomainAxisPosition({datum:l}),u=this.services.cartesianScales.getRangeAxisPosition({datum:l}),d=this.services.cartesianScales.getScaleByPosition(u),h=n.selectAll("path.area").data(o,p=>x(p,0,s));this.areaGenerator=eu().x(p=>this.services.cartesianScales.getValueThroughAxisPosition(c,p.data.sharedStackKey)).y0(p=>d(p[0])).y1(p=>d(p[1])).curve(this.services.curves.getD3Curve()),h.exit().attr("opacity",0).remove(),h.enter().append("path").attr("opacity",0).merge(h).data(o,p=>x(p,0,s)).attr("class","area").attr("class",p=>this.model.getColorClassName({classNameTypes:[et.FILL],dataGroupName:x(p,0,s),originalClassName:"area"})).style("fill",p=>r.model.getFillColor(x(p,0,s),null,p)).attr("role",lt.GRAPHICS_SYMBOL).attr("aria-roledescription","area").attr("aria-label",p=>x(p,0,s)).transition().call(p=>this.services.transitions.setupTransition({transition:p,name:"area-update-enter",animate:t})).attr("opacity",gn.opacity.selected).attr("d",this.areaGenerator)}}class qg extends yu{constructor(){super(...arguments),this.type="stacked-bar",this.renderType=Q.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.model.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-bar"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer({ariaLabel:"stacked bar graphs",withinChartClip:!0}),r=this.getOptions(),{groupMapsTo:i}=r.data,s=this.model.getStackedData({groups:this.configs.groups,divergent:!0}),a=this.model.getActiveDataGroupNames(),o=n.selectAll("g.bars").data(s,c=>x(c,0,i));o.exit().attr("opacity",0).remove(),o.enter().append("g").classed("bars",!0).attr("role",lt.GROUP).attr("data-name","bars");const l=n.selectAll("g.bars").selectAll("path.bar").data(c=>c,c=>c.data.sharedStackKey);l.exit().remove(),l.enter().append("path").merge(l).classed("bar",!0).transition().call(c=>this.services.transitions.setupTransition({transition:c,name:"bar-update-enter",animate:t})).attr("class",c=>this.model.getColorClassName({classNameTypes:[et.FILL],dataGroupName:c[i],originalClassName:"bar"})).style("fill",c=>this.model.getFillColor(c[i],c.data.sharedStackKey,c.data)).attr("d",c=>{const u=c.data.sharedStackKey,d=this.getBarWidth(),h=this.services.cartesianScales.getDomainValue(u)-d/2,p=h+d,f=this.services.cartesianScales.getRangeValue(c[0]);let g=this.services.cartesianScales.getRangeValue(c[1]);if(!this.isOutsideZoomedDomain(h,p)){if(Math.abs(g-f)>0&&Math.abs(g-f)>r.bars.dividerSize){const m=c[0]<0&&c[1]<=0;m&&a.length>1?this.services.cartesianScales.getOrientation()===Ht.VERTICAL?g+=c[1]===0?2:1:g-=1:m||(this.services.cartesianScales.getOrientation()===Ht.VERTICAL?g+=1:g-=1)}return ie({x0:h,x1:p,y0:f,y1:g},this.services.cartesianScales.getOrientation())}}).attr("opacity",1).attr("role",lt.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",c=>c[1]-c[0]),this.addEventListeners()}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this;this.parent.selectAll("path.bar").on("mouseover",function(i,s){const a=D(this);a.classed("hovered",!0),r.services.events.dispatchEvent(T.Bar.BAR_MOUSEOVER,{event:i,element:a,datum:s});let o=r.model.getDisplayData(r.configs.groups).find(l=>{const c=r.services.cartesianScales.getDomainIdentifier(l),u=r.services.cartesianScales.getRangeIdentifier(l);return l[u]===s.data[s[n]]&&l[c].toString()===s.data.sharedStackKey&&l[n]===s[n]});if(o===void 0){const l=r.services.cartesianScales.getDomainIdentifier(),c=r.services.cartesianScales.getRangeIdentifier();o={[l]:s.data.sharedStackKey,[c]:s.data[s[n]],[n]:s[n]}}r.services.events.dispatchEvent(T.Tooltip.SHOW,{event:i,hoveredElement:a,data:[o]})}).on("mousemove",function(i,s){const a=D(this);r.services.events.dispatchEvent(T.Bar.BAR_MOUSEMOVE,{event:i,element:a,datum:s}),r.services.events.dispatchEvent(T.Tooltip.MOVE,{event:i})}).on("click",function(i,s){r.services.events.dispatchEvent(T.Bar.BAR_CLICK,{event:i,element:D(this),datum:s})}).on("mouseout",function(i,s){const a=D(this);a.classed("hovered",!1),r.services.events.dispatchEvent(T.Bar.BAR_MOUSEOUT,{event:i,element:a,datum:s}),r.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:a})})}getBarWidth(){const t=this.getOptions();if(x(t,"bars","width"))return t.bars.width;const n=this.services.cartesianScales.getMainXScale(),r=R.getSVGElementSize(this.parent,{useAttrs:!0}).width,i=this.model.getStackKeys().length,s=x(t,"bars","spacingFactor");return n.step?Math.min(t.bars.maxWidth,n.step()/2):Math.min(t.bars.maxWidth,r*s/i)}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class Yg extends on{constructor(){super(...arguments),this.type="scatter-stacked",this.renderType=Q.SVG}render(t){if(!x(this.getOptions(),"points","enabled"))return;const n=this.getComponentContainer({ariaLabel:"scatter points",withinChartClip:!0}),r=this.getOptions(),{groupMapsTo:i}=r.data,s=Object.keys(r.axes).some(u=>r.axes[u].percentage),a=this.model.getStackedData({groups:this.configs.groups,percentage:s}),o=n.selectAll("g.dots").data(a,u=>x(u,0,i));o.exit().attr("opacity",0).remove();const l=o.enter().append("g").classed("dots",!0).attr("role",lt.GROUP).merge(o).selectAll("circle.dot").data(u=>u);l.exit().attr("opacity",0).remove();const c=l.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(l).datum(u=>{const d=u[i],h=this.services.cartesianScales.getDomainIdentifier(u),p=this.services.cartesianScales.getRangeIdentifier(u);return{[i]:d,[h]:u.data.sharedStackKey,[p]:u[1]}});this.styleCircles(c,t),this.addEventListeners()}getTooltipData(t,n){const r=this.getOptions(),{groupMapsTo:i}=r.data,s=Object.keys(r.axes).some(l=>r.axes[l].percentage),a=this.model.getStackedData({groups:this.configs.groups,percentage:s}),o=[];return a.forEach((l,c)=>{l.forEach((u,d)=>{const h=u[i],p=u.data.sharedStackKey;let f=u.data[h];const g=u[1],m=this.services.cartesianScales.getDomainIdentifier(u),y=this.services.cartesianScales.getRangeIdentifier(u);f!=null&&t===this.services.cartesianScales.getDomainValue(p)&&n===this.services.cartesianScales.getRangeValue(g)&&(s&&(f=this.model.getStackedData({groups:this.configs.groups})[c][d].data[h]),f!==null&&o.push({[i]:h,[m]:p,[y]:f}))})}),this.model.getDisplayData(this.configs.groups).filter(l=>{const c=this.services.cartesianScales.getDomainIdentifier(l),u=this.services.cartesianScales.getRangeIdentifier(l);return o.find(d=>d[i]==l[i]&&d[c]==l[c]&&d[u]==l[u])!==void 0})}}const oi=6;class DD extends ht{constructor(){super(...arguments),this.type="tree",this.renderType=Q.SVG}getLongestLabel(t){let n="";return t.forEach(r=>{const i=r.children?this.getLongestLabel(r.children):"";(i.length>n.length||r.name.length>n.length)&&(n=i.length>r.name.length?i:r.name)}),n}getMockLabelWidth(t,n){const r=t.append("text").attr("dy","0.31em").attr("x",0).attr("text-anchor","end").text(n),{width:i}=R.getSVGElementSize(r.node(),{useBBox:!0});return r.remove(),i}render(t=!0){const n=this.getComponentContainer({ariaLabel:"tree diagram"});n.html("");const{width:r,height:i}=R.getSVGElementSize(this.parent,{useAttrs:!0});if(r<1||i<1)return;const s=this.model.getOptions(),a=this.model.getDisplayData(),o=x(s,"tree","rootTitle")||"Tree",l=this.getMockLabelWidth(n,o),c=this.getLongestLabel(a),u=this.getMockLabelWidth(n,c),d={top:0,right:0,bottom:0,left:l>0?l+oi:30-oi},h=ds({name:o,children:a}),p=10,f=r/6,g=S=>{const C=h.descendants().reverse(),I=h.links();let L=h,k=h;h.eachBefore(N=>{N.x<L.x&&(L=N),N.x>k.x&&(k=N)});const w=k.x-L.x,V=n.transition().call(N=>this.services.transitions.setupTransition({transition:N,name:"tree-update-viewbox",animate:!0})).attr("viewBox",[-d.left,L.x,r,w].join(" ")),P=E.selectAll("g").data(C,N=>N.id),B=this,_=P.enter().append("g").attr("transform",()=>`translate(${S.y0},${S.x0})`).attr("class",N=>N.depth!==0&&N.children&&N.children.length>0?"clickable":null).on("mouseover",function(N,U){B.services.events.dispatchEvent(T.Tree.NODE_MOUSEOVER,{event:N,element:D(this),datum:U})}).on("click",function(N,U){U.depth!==0&&(U.children=U.children?null:U._children,g(U)),B.services.events.dispatchEvent(T.Tree.NODE_CLICK,{event:N,element:D(this),datum:U})}).on("mouseout",function(N,U){B.services.events.dispatchEvent(T.Tree.NODE_MOUSEOUT,{event:N,element:D(this),datum:U})});_.append("circle").attr("r",2.5).attr("class",N=>N._children?"parent":"child").attr("stroke-width",10),_.append("text").attr("dy","0.31em").attr("x",N=>N._children?-oi:oi).attr("text-anchor",N=>N._children?"end":"start").text(N=>N.data.name).clone(!0).attr("class","text-stroke").lower(),P.merge(_).transition(V).attr("transform",N=>`translate(${N.y},${N.x})`).attr("fill-opacity",1).attr("stroke-opacity",1),P.exit().transition(V).remove().attr("transform",()=>`translate(${S.y},${S.x})`).attr("fill-opacity",0).attr("stroke-opacity",0);const M=O.selectAll("path").data(I,N=>N.target.id),A=M.enter().append("path").attr("d",()=>{const N={x:S.x0,y:S.y0};return b({source:N,target:N})});M.merge(A).transition(V).attr("d",b),M.exit().transition(V).remove().attr("d",()=>{const N={x:S.x,y:S.y};return b({source:N,target:N})}),h.eachBefore(N=>{N.x0=N.x,N.y0=N.y})},m=h.descendants(),y=m[m.length-1].depth,v=x(s,"tree","type")===$s.DENDROGRAM?JA().size([i,r-u-y*oi-l]):HL().nodeSize([p,f]).size([i,r-u-y*oi-l]),b=ck().x(S=>S.y).y(S=>S.x);h.x0=f/2,h.y0=0,h.descendants().forEach((S,C)=>{S.id=C,S._children=S.children}),v(h),n.attr("viewBox",[-d.left,-d.top,r,p]).style("user-select","none");const O=n.append("g").attr("class","links"),E=n.append("g").attr("class","nodes");g(h)}}var RD="#000000",ID="#ffffff",ND="#fcf4d6",PD="#fddc69",UD="#f1c21b",BD="#d2a106",HD="#b28600",VD="#8e6a00",GD="#684e00",FD="#483700",zD="#302400",jD="#1c1500",WD={10:ND,20:PD,30:UD,40:BD,50:HD,60:VD,70:GD,80:FD,90:zD,100:jD},qD="#fff2e8",YD="#ffd9be",ZD="#ffb784",XD="#ff832b",KD="#eb6200",QD="#ba4e00",JD="#8a3800",tR="#5e2900",eR="#3e1a00",nR="#231000",rR={10:qD,20:YD,30:ZD,40:XD,50:KD,60:QD,70:JD,80:tR,90:eR,100:nR},iR="#fff1f1",sR="#ffd7d9",aR="#ffb3b8",oR="#ff8389",lR="#fa4d56",cR="#da1e28",uR="#a2191f",hR="#750e13",dR="#520408",pR="#2d0709",fR={10:iR,20:sR,30:aR,40:oR,50:lR,60:cR,70:uR,80:hR,90:dR,100:pR},mR="#fff0f7",gR="#ffd6e8",vR="#ffafd2",yR="#ff7eb6",xR="#ee5396",bR="#d02670",_R="#9f1853",ER="#740937",OR="#510224",TR="#2a0a18",SR={10:mR,20:gR,30:vR,40:yR,50:xR,60:bR,70:_R,80:ER,90:OR,100:TR},wR="#f6f2ff",$R="#e8daff",MR="#d4bbff",CR="#be95ff",AR="#a56eff",LR="#8a3ffc",kR="#6929c4",DR="#491d8b",RR="#31135e",IR="#1c0f30",NR={10:wR,20:$R,30:MR,40:CR,50:AR,60:LR,70:kR,80:DR,90:RR,100:IR},PR="#edf5ff",UR="#d0e2ff",BR="#a6c8ff",HR="#78a9ff",VR="#4589ff",GR="#0f62fe",FR="#0043ce",zR="#002d9c",jR="#001d6c",WR="#001141",qR={10:PR,20:UR,30:BR,40:HR,50:VR,60:GR,70:FR,80:zR,90:jR,100:WR},YR="#e5f6ff",ZR="#bae6ff",XR="#82cfff",KR="#33b1ff",QR="#1192e8",JR="#0072c3",tI="#00539a",eI="#003a6d",nI="#012749",rI="#061727",iI={10:YR,20:ZR,30:XR,40:KR,50:QR,60:JR,70:tI,80:eI,90:nI,100:rI},sI="#d9fbfb",aI="#9ef0f0",oI="#3ddbd9",lI="#08bdba",cI="#009d9a",uI="#007d79",hI="#005d5d",dI="#004144",pI="#022b30",fI="#081a1c",mI={10:sI,20:aI,30:oI,40:lI,50:cI,60:uI,70:hI,80:dI,90:pI,100:fI},gI="#defbe6",vI="#a7f0ba",yI="#6fdc8c",xI="#42be65",bI="#24a148",_I="#198038",EI="#0e6027",OI="#044317",TI="#022d0d",SI="#071908",wI={10:gI,20:vI,30:yI,40:xI,50:bI,60:_I,70:EI,80:OI,90:TI,100:SI},$I="#f2f4f8",MI="#dde1e6",CI="#c1c7cd",AI="#a2a9b0",LI="#878d96",kI="#697077",DI="#4d5358",RI="#343a3f",II="#21272a",NI="#121619",PI={10:$I,20:MI,30:CI,40:AI,50:LI,60:kI,70:DI,80:RI,90:II,100:NI},UI="#f4f4f4",BI="#e0e0e0",HI="#c6c6c6",VI="#a8a8a8",GI="#8d8d8d",FI="#6f6f6f",zI="#525252",jI="#393939",WI="#262626",qI="#161616",YI={10:UI,20:BI,30:HI,40:VI,50:GI,60:FI,70:zI,80:jI,90:WI,100:qI},ZI="#f7f3f2",XI="#e5e0df",KI="#cac5c4",QI="#ada8a8",JI="#8f8b8b",tN="#726e6e",eN="#565151",nN="#3c3838",rN="#272525",iN="#171414",sN={10:ZI,20:XI,30:KI,40:QI,50:JI,60:tN,70:eN,80:nN,90:rN,100:iN},Zg={black:{100:RD},blue:qR,coolGray:PI,cyan:iI,gray:YI,green:wI,magenta:SR,orange:rR,purple:NR,red:fR,teal:mI,warmGray:sN,white:{0:ID},yellow:WD};const aN=e=>{if(!e)return null;for(const t of Object.keys(Zg)){const n=Zg[t];for(const r of Object.keys(n))if(n[+r]===e)return r}return null},Xg=function(e){const t=D(this.parentNode).select("rect.leaf"),n=e.backgroundColor??getComputedStyle(t.node(),null).getPropertyValue("fill"),r=pn(n);let i;if(r&&(i=aN(r?r.hex():null)),i==null){const s=Ld(r).l;i=Math.abs(s*100-100)}return i>50?"white":"black"};let oN=0;class lN extends ht{constructor(){super(...arguments),this.type="treemap",this.renderType=Q.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("g[data-name='leaf']").transition("legend-hover-treemap").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-treemap"})).attr("opacity",r=>r.parent.data.name===n.datum().name?1:.3)},this.handleLegendMouseOut=()=>{this.parent.selectAll("g[data-name='leaf']").transition("legend-mouseout-treemap").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-treemap"})).attr("opacity",1)}}init(){const{events:t}=this.services;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"treemap"});this.model.getData();const r=this.model.getDisplayData(),i=this.model.getOptions(),s=x(window,"location"),{width:a,height:o}=R.getSVGElementSize(n,{useAttrs:!0}),l=ds({name:i.title||"Treemap",children:r}).sum(p=>p.value).sort((p,f)=>f.value-p.value),c=jL().size([a,o]).paddingInner(1).paddingOuter(0).round(!0)(l),u=n.selectAll("g[data-name='leaf']").data(c.leaves(),p=>p.data.name);u.exit().attr("opacity",0).remove();const d=u.enter().append("g").attr("data-name","leaf").attr("data-uid",()=>oN++).merge(u);d.attr("data-name","leaf").transition().call(p=>this.services.transitions.setupTransition({transition:p,name:"treemap-group-update",animate:t})).attr("transform",p=>`translate(${p.x0},${p.y0})`);const h=d.selectAll("rect.leaf").data(p=>[p]);h.exit().attr("width",0).attr("height",0).remove(),h.enter().append("rect").classed("leaf",!0).merge(h).attr("width",0).attr("height",0).attr("id",function(){const p=D(this.parentNode).attr("data-uid");return`${i.style.prefix}-leaf-${p}`}).attr("class",p=>{for(;p.depth>1;)p=p.parent;return this.model.getColorClassName({classNameTypes:[et.FILL],dataGroupName:p.data.name,originalClassName:"leaf"})}).transition().call(p=>this.services.transitions.setupTransition({transition:p,name:"treemap-leaf-update-enter",animate:t})).attr("width",p=>p.x1-p.x0).attr("height",p=>p.y1-p.y0).style("fill",p=>{for(;p.depth>1;)p=p.parent;return this.model.getFillColor(p.data.name,null,p.data)}),d.selectAll("clipPath").data(p=>p.data.showLabel!==!0?[]:[1],p=>p).join(p=>p.append("clipPath").attr("id",function(){const f=D(this.parentNode).attr("data-uid");return`${i.style.prefix}-clip-${f}`}).append("use").attr("xlink:href",function(){const f=D(this.parentNode.parentNode).attr("data-uid"),g=`${i.style.prefix}-leaf-${f}`;return new URL(`#${g}`,s)+""}),p=>null,p=>p.remove()),d.selectAll("text").data(p=>{if(p.data.showLabel!==!0)return[];let f=p;for(;f.depth>1;)f=f.parent;return[{text:p.data.name,backgroundColor:this.model.getFillColor(f.data.name)}]},p=>p).join(p=>{const f=p.append("text").text(g=>g.text).style("fill",Xg).attr("x",7).attr("y",18);return s&&f.attr("clip-path",function(){const g=D(this.parentNode).attr("data-uid"),m=`${i.style.prefix}-clip-${g}`;return`url(${new URL(`#${m}`,s)+""})`}),f},p=>p.text(f=>f.text).style("fill",Xg),p=>p.remove()),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("rect.leaf").on("mouseover",function(n,r){const i=D(this);let s=getComputedStyle(this,null).getPropertyValue("fill"),a=r;for(;a.depth>1;)a=a.parent;i.transition("graph_element_mouseover_fill_update").call(o=>t.services.transitions.setupTransition({transition:o,name:"graph_element_mouseover_fill_update"})).style("fill",o=>{const l=t.model.getFillColor(o.parent.data.name,null,o.data);return l&&(s=l),pn(s).darker(.7).toString()}),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,items:[{color:s,label:a.data.name,bold:!0},{label:r.data.name,value:r.data.value}]}),t.services.events.dispatchEvent(T.Treemap.LEAF_MOUSEOVER,{event:n,element:i,datum:r})}).on("mousemove",function(n,r){const i=D(this);t.services.events.dispatchEvent(T.Treemap.LEAF_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Treemap.LEAF_CLICK,{event:n,element:D(this),datum:r})}).on("mouseout",function(n,r){const i=D(this);i.classed("hovered",!1);let s=r;for(;s.depth>1;)s=s.parent;i.transition().call(a=>t.services.transitions.setupTransition({transition:a,name:"graph_element_mouseout_fill_update"})).style("fill",a=>t.model.getFillColor(a.parent.data.name,null,a.data)),t.services.events.dispatchEvent(T.Treemap.LEAF_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})})}}function cN(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function uN(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var hN={value:function(){}};function Kg(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new uo(n)}function uo(e){this._=e}function dN(e,t){return e.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&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}uo.prototype=Kg.prototype={constructor:uo,on:function(e,t){var n=this._,r=dN(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=pN(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(i=(e=r[s]).type)n[i]=Qg(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Qg(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new uo(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)}};function pN(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Qg(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=hN,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}const fN=Object.freeze(Object.defineProperty({__proto__:null,dispatch:Kg},Symbol.toStringTag,{value:"Module"})),mN=uN(fN),gN=mN.dispatch,xu=Math.PI/180,vN={archimedean:tv,rectangular:MN},Os=64,ho=2048;var yN=function(){var e=[256,256],t=xN,n=bN,r=_N,i=Jg,s=Jg,a=EN,o=ON,l=tv,c=[],u=1/0,d=gN("word","end"),h=null,p=Math.random,f={},g=AN;f.canvas=function(v){return arguments.length?(g=Vn(v),f):g},f.start=function(){var v=m(g()),b=CN((e[0]>>5)*e[1]),O=null,E=c.length,S=-1,C=[],I=c.map(function(k,w){return k.text=t.call(this,k,w),k.font=n.call(this,k,w),k.style=i.call(this,k,w),k.weight=s.call(this,k,w),k.rotate=a.call(this,k,w),k.size=~~r.call(this,k,w),k.padding=o.call(this,k,w),k}).sort(function(k,w){return w.size-k.size});return h&&clearInterval(h),h=setInterval(L,0),L(),f;function L(){for(var k=Date.now();Date.now()-k<u&&++S<E&&h;){var w=I[S];w.x=e[0]*(p()+.5)>>1,w.y=e[1]*(p()+.5)>>1,TN(v,w,I,S),w.hasText&&y(b,w,O)&&(C.push(w),d.call("word",f,w),O?wN(O,w):O=[{x:w.x+w.x0,y:w.y+w.y0},{x:w.x+w.x1,y:w.y+w.y1}],w.x-=e[0]>>1,w.y-=e[1]>>1)}S>=E&&(f.stop(),d.call("end",f,C,O))}},f.stop=function(){h&&(clearInterval(h),h=null);for(const v of c)delete v.sprite;return f};function m(v){const b=v.getContext("2d",{willReadFrequently:!0});v.width=v.height=1;const O=Math.sqrt(b.getImageData(0,0,1,1).data.length>>2);return v.width=(Os<<5)/O,v.height=ho/O,b.fillStyle=b.strokeStyle="red",{context:b,ratio:O}}function y(v,b,O){e[0],e[1];for(var E=b.x,S=b.y,C=Math.sqrt(e[0]*e[0]+e[1]*e[1]),I=l(e),L=p()<.5?1:-1,k=-L,w,V,P;(w=I(k+=L))&&(V=~~w[0],P=~~w[1],!(Math.min(Math.abs(V),Math.abs(P))>=C));)if(b.x=E+V,b.y=S+P,!(b.x+b.x0<0||b.y+b.y0<0||b.x+b.x1>e[0]||b.y+b.y1>e[1])&&(!O||$N(b,O))&&!SN(b,v,e[0])){for(var B=b.sprite,_=b.width>>5,M=e[0]>>5,A=b.x-(_<<4),N=A&127,U=32-N,W=b.y1-b.y0,j=(b.y+b.y0)*M+(A>>5),it,nt=0;nt<W;nt++){it=0;for(var mt=0;mt<=_;mt++)v[j+mt]|=it<<U|(mt<_?(it=B[nt*_+mt])>>>N:0);j+=M}return!0}return!1}return f.timeInterval=function(v){return arguments.length?(u=v??1/0,f):u},f.words=function(v){return arguments.length?(c=v,f):c},f.size=function(v){return arguments.length?(e=[+v[0],+v[1]],f):e},f.font=function(v){return arguments.length?(n=Vn(v),f):n},f.fontStyle=function(v){return arguments.length?(i=Vn(v),f):i},f.fontWeight=function(v){return arguments.length?(s=Vn(v),f):s},f.rotate=function(v){return arguments.length?(a=Vn(v),f):a},f.text=function(v){return arguments.length?(t=Vn(v),f):t},f.spiral=function(v){return arguments.length?(l=vN[v]||v,f):l},f.fontSize=function(v){return arguments.length?(r=Vn(v),f):r},f.padding=function(v){return arguments.length?(o=Vn(v),f):o},f.random=function(v){return arguments.length?(p=v,f):p},f.on=function(){var v=d.on.apply(d,arguments);return v===d?f:v},f};function xN(e){return e.text}function bN(){return"serif"}function Jg(){return"normal"}function _N(e){return Math.sqrt(e.value)}function EN(){return(~~(random()*6)-3)*30}function ON(){return 1}function TN(e,t,n,r){if(!t.sprite){var i=e.context,s=e.ratio;i.clearRect(0,0,(Os<<5)/s,ho/s);var a=0,o=0,l=0,c=n.length;for(--r;++r<c;){t=n[r],i.save(),i.font=t.style+" "+t.weight+" "+~~((t.size+1)/s)+"px "+t.font;const w=i.measureText(t.text),V=-Math.floor(w.width/2);let P=(w.width+1)*s,B=t.size<<1;if(t.rotate){var u=Math.sin(t.rotate*xu),d=Math.cos(t.rotate*xu),h=P*d,p=P*u,f=B*d,g=B*u;P=Math.max(Math.abs(h+g),Math.abs(h-g))+31>>5<<5,B=~~Math.max(Math.abs(p+f),Math.abs(p-f))}else P=P+31>>5<<5;if(B>l&&(l=B),a+P>=Os<<5&&(a=0,o+=l,l=0),o+B>=ho)break;i.translate((a+(P>>1))/s,(o+(B>>1))/s),t.rotate&&i.rotate(t.rotate*xu),i.fillText(t.text,V,0),t.padding&&(i.lineWidth=2*t.padding,i.strokeText(t.text,V,0)),i.restore(),t.width=P,t.height=B,t.xoff=a,t.yoff=o,t.x1=P>>1,t.y1=B>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,a+=P}for(var m=i.getImageData(0,0,(Os<<5)/s,ho/s).data,y=[];--r>=0;)if(t=n[r],!!t.hasText){for(var v=t.width,b=v>>5,O=t.y1-t.y0,E=0;E<O*b;E++)y[E]=0;if(a=t.xoff,a==null)return;o=t.yoff;for(var S=0,C=-1,I=0;I<O;I++){for(var E=0;E<v;E++){var L=b*I+(E>>5),k=m[(o+I)*(Os<<5)+(a+E)<<2]?1<<31-E%32:0;y[L]|=k,S|=k}S?C=I:(t.y0++,O--,I--,o++)}t.y1=t.y0+C,t.sprite=y.slice(0,(t.y1-t.y0)*b)}}}function SN(e,t,n){n>>=5;for(var r=e.sprite,i=e.width>>5,s=e.x-(i<<4),a=s&127,o=32-a,l=e.y1-e.y0,c=(e.y+e.y0)*n+(s>>5),u,d=0;d<l;d++){u=0;for(var h=0;h<=i;h++)if((u<<o|(h<i?(u=r[d*i+h])>>>a:0))&t[c+h])return!0;c+=n}return!1}function wN(e,t){var n=e[0],r=e[1];t.x+t.x0<n.x&&(n.x=t.x+t.x0),t.y+t.y0<n.y&&(n.y=t.y+t.y0),t.x+t.x1>r.x&&(r.x=t.x+t.x1),t.y+t.y1>r.y&&(r.y=t.y+t.y1)}function $N(e,t){return e.x+e.x1>t[0].x&&e.x+e.x0<t[1].x&&e.y+e.y1>t[0].y&&e.y+e.y0<t[1].y}function tv(e){var t=e[0]/e[1];return function(n){return[t*(n*=.1)*Math.cos(n),n*Math.sin(n)]}}function MN(e){var t=4,n=t*e[0]/e[1],r=0,i=0;return function(s){var a=s<0?-1:1;switch(Math.sqrt(1+4*a*s)-a&3){case 0:r+=n;break;case 1:i+=t;break;case 2:r-=n;break;default:i-=t;break}return[r,i]}}function CN(e){for(var t=[],n=-1;++n<e;)t[n]=0;return t}function AN(){return document.createElement("canvas")}function Vn(e){return typeof e=="function"?e:function(){return e}}const LN=cN(yN);class kN extends ht{constructor(){super(...arguments),this.type="wordcloud",this.renderType=Q.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("text.word").transition("legend-hover-wordcloud").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-wordcloud"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("text.word").transition("legend-mouseout-wordcloud").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-wordcloud"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this,r=this.getComponentContainer({ariaLabel:"word cloud"}).attr("width","100%").attr("height","100%"),i=this.model.getDisplayData(),s=this.getFontSizeScale(i),a=this.getOptions(),{fontSizeMapsTo:o,wordMapsTo:l}=a.wordCloud,{groupMapsTo:c}=a.data,{width:u,height:d}=R.getSVGElementSize(r,{useAttrs:!0});if(u===0||d===0)return;const h=LN().size([u,d]).words(i.map(function(f){const g=f[o];if(typeof f[o]!="number")throw Error("Badly formatted WordCloud data. `value` should only be an integer or float");return{[c]:f[c],text:f[l],size:g,value:g}})).padding(5).rotate(0).fontSize(f=>s(f.size)).on("end",p);h.start();function p(f){const g=R.appendOrSelect(r,"g.words");g.attr("transform",`translate(${h.size()[0]/2}, ${h.size()[1]/2})`);const m=g.selectAll("text").data(f,y=>`${y[c]}-${y.text}`);m.exit().attr("opacity",0).remove(),m.enter().append("text").attr("opacity",0).merge(m).style("font-size",y=>`${y.size}px`).text(function(y){return y.text}).attr("class",y=>n.model.getColorClassName({classNameTypes:[et.FILL],dataGroupName:y[c],originalClassName:`word ${y.size>32?"light":""}`})).style("fill",y=>n.model.getFillColor(y[c],y.text,y)).attr("text-anchor","middle").transition().call(y=>n.services.transitions.setupTransition({transition:y,name:"wordcloud-text-update-enter",animate:t})).attr("transform",y=>`translate(${y.x}, ${y.y})`).attr("opacity",1)}this.addEventListeners()}getFontSizeScale(t){const n=this.getOptions(),{fontSizeMapsTo:r}=n.wordCloud,i=t.map(l=>l[r]).filter(l=>l),s=R.getHTMLElementSize(this.services.domUtils.getMainContainer()),a=i.length>0,o=a?He(i):[1,1];return Fe().domain(o).range(a?n.wordCloud.fontSizeRange(s,t):[4,4])}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this,i=ga(s=>{const a=r.parent.selectAll("text.word").transition("wordcloud-word-mouse-highlight").call(o=>r.services.transitions.setupTransition({transition:o,name:"wordcloud-word-mouse-highlight"}));s===null?a.attr("opacity",1):a.attr("opacity",function(){return s===this?1:.3})},6);this.parent.selectAll("text.word").on("mouseover",function(s,a){const o=this;i(o),r.services.events.dispatchEvent(T.WordCloud.WORD_MOUSEOVER,{event:s,element:D(this),datum:a}),r.services.events.dispatchEvent(T.Tooltip.SHOW,{event:s,hoveredElement:o,items:[{label:t.tooltip.wordLabel,value:a.text},{label:t.tooltip.valueLabel,value:a.value},{label:gt(t,"locale.translations.group")||gt(t,"tooltip.groupLabel")||"Group",value:a[n],class:r.model.getColorClassName({classNameTypes:[et.TOOLTIP],dataGroupName:a[n]})}]})}).on("mousemove",function(s,a){const o=D(this);r.services.events.dispatchEvent(T.WordCloud.WORD_MOUSEMOVE,{element:o,datum:a}),r.services.events.dispatchEvent(T.Tooltip.MOVE,{event:s})}).on("click",function(s,a){r.services.events.dispatchEvent(T.WordCloud.WORD_CLICK,{event:s,element:D(this),datum:a})}).on("mouseout",function(s,a){const o=D(this);i(null),r.services.events.dispatchEvent(T.WordCloud.WORD_MOUSEOUT,{event:s,element:o,datum:a}),r.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:o})})}}class DN extends ht{constructor(){super(...arguments),this.type="geo",this.renderType=Q.SVG}render(){const t=this.getComponentContainer({withinChartClip:!0}),{width:n,height:r}=R.getSVGElementSize(t,{useAttrs:!0});if(n<1||r<1)return;const i=this.getProjection(),s=x(this.getOptions(),"geoData"),a=this.model.getCombinedData(),o={},l={};Object.keys(a).forEach(m=>{typeof a[m].value=="number"?o[m]=a[m]:l[m]=a[m]});const c=dD(s,Object.values(l)),u=cD(s,{type:"GeometryCollection",geometries:Object.values(o)}),d=i.fitSize([n,r],u),h=SA().projection(d);R.appendOrSelect(t,"g.geo").selectAll("path").data(u.features).join("path").attr("d",h);const p=this.services.domUtils.generateElementIDString("geo-pattern-stripes"),f=R.appendOrSelect(t,"defs");R.appendOrSelect(f,"pattern").attr("id",p).attr("width",5).attr("height",10).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("path").classed("pattern-fill",!0).attr("d",gs()([[0,0],[0,10]]));const g=R.appendOrSelect(t,"g.missing-data");R.appendOrSelect(g,"path").datum(c).attr("d",h).style("fill",`url(#${p})`)}getProjection(){let t=null;switch(x(this.getOptions(),"thematic","projection")){case Ke.geoEqualEarth:t=zA();break;case Ke.geoAlbers:t=PA();break;case Ke.geoConicEqualArea:t=Ym();break;case Ke.geoConicEquidistant:t=GA();break;case Ke.geoEquirectangular:t=HA();break;case Ke.geoMercator:t=UA();break;case Ke.geoNaturalEarth1:t=jA();break;default:throw new Error("Projection is not supported.")}return t}}class RN extends DN{constructor(){super(...arguments),this.type="choropleth"}render(t=!0){super.render();const n=this.model.getCombinedData();this.getComponentContainer({ariaLabel:"map",withinChartClip:!0}).select("g.geo").selectAll("path").classed("border",!0).attr("class",r=>this.model.getColorClassName({value:n[r.properties.NAME].value,originalClassName:"border"})),this.addCountryAreaEventListener()}addCountryAreaEventListener(){const t=this,n=this.model.getCombinedData();this.parent.selectAll("path.border").on("mouseover",function(r,i){const s=D(this);t.services.events.dispatchEvent(Or.CHOROPLETH_MOUSEOVER,{event:r,element:s,datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(Er.SHOW,{event:r,hoveredElement:s,items:[{label:i.properties.NAME,value:n[i.properties.NAME].value}]})}).on("mousemove",function(r,i){t.services.events.dispatchEvent(Or.CHOROPLETH_MOUSEMOVE,{event:r,element:D(this),datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(Er.MOVE,{event:r})}).on("click",function(r,i){t.services.events.dispatchEvent(Or.CHOROPLETH_CLICK,{event:r,element:D(this),datum:n[i.properties.NAME]})}).on("mouseout",function(r,i){const s=D(this);t.services.events.dispatchEvent(Or.CHOROPLETH_MOUSEOUT,{event:r,element:s,datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(Er.HIDE,{event:r,hoveredElement:s})})}}function bu(e){var t=e==null?0:e.length;return t?Bs(e,1):[]}function IN(e){return ah(ch(e,void 0,bu),e+"")}function ev(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r<i;)s[r]=e[r+t];return s}function NN(e,t){return t.length<2?e:rl(e,ev(t,0,-1))}function PN(e,t){return t=Us(t,e),e=NN(e,t),e==null||delete e[Mi(id(t))]}function UN(e){return Eh(e)?void 0:e}var BN=1,HN=2,VN=4,GN=IN(function(e,t){var n={};if(e==null)return n;var r=!1;t=jo(t,function(s){return s=Us(s,e),r||(r=s.length>1),s}),$r(e,kh(e),n),r&&(n=Ci(n,BN|HN|VN,UN));for(var i=t.length;i--;)PN(n,t[i]);return n});function nv(e){return Math.log(e)}function rv(e){return Math.exp(e)}function FN(e){return-Math.log(-e)}function zN(e){return-Math.exp(-e)}function jN(e){return isFinite(e)?+("1e"+e):e<0?0:e}function WN(e){return e===10?jN:e===Math.E?Math.exp:t=>Math.pow(e,t)}function qN(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function iv(e){return(t,n)=>-e(-t,n)}function YN(e){const t=e(nv,rv),n=t.domain;let r=10,i,s;function a(){return i=qN(r),s=WN(r),n()[0]<0?(i=iv(i),s=iv(s),e(FN,zN)):e(nv,rv),t}return t.base=function(o){return arguments.length?(r=+o,a()):r},t.domain=function(o){return arguments.length?(n(o),a()):n()},t.ticks=o=>{const l=n();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let h=i(c),p=i(u),f,g;const m=o==null?10:+o;let y=[];if(!(r%1)&&p-h<m){if(h=Math.floor(h),p=Math.ceil(p),c>0){for(;h<=p;++h)for(f=1;f<r;++f)if(g=h<0?f/s(-h):f*s(h),!(g<c)){if(g>u)break;y.push(g)}}else for(;h<=p;++h)for(f=r-1;f>=1;--f)if(g=h>0?f/s(-h):f*s(h),!(g<c)){if(g>u)break;y.push(g)}y.length*2<m&&(y=js(c,u,m))}else y=js(h,p,Math.min(p-h,m)).map(s);return d?y.reverse():y},t.tickFormat=(o,l)=>{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Vi(l)).precision==null&&(l.trim=!0),l=Pl(l)),o===1/0)return l;const c=Math.max(1,r*o/t.ticks().length);return u=>{let d=u/s(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=c?l(u):""}},t.nice=()=>n(Fp(n(),{floor:o=>s(Math.floor(i(o))),ceil:o=>s(Math.ceil(i(o)))})),t}function sv(){const e=YN(op()).domain([1,10]);return e.copy=()=>Bl(e,sv()).base(e.base()),Pr.apply(e,arguments),e}function po(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function fo(e){this._context=e}fo.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:po(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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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:po(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ZN(e){return new fo(e)}function av(e){this._context=e}av.prototype={areaStart:Pn,areaEnd:Pn,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:po(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function XN(e){return new av(e)}function ov(e){this._context=e}ov.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(e,t){switch(e=+e,t=+t,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+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:po(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function KN(e){return new ov(e)}function lv(e,t){this._basis=new fo(e),this._beta=t}lv.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],s=e[n]-r,a=t[n]-i,o=-1,l;++o<=n;)l=o/n,this._basis.point(this._beta*e[o]+(1-this._beta)*(r+l*s),this._beta*t[o]+(1-this._beta)*(i+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const QN=function e(t){function n(r){return t===1?new fo(r):new lv(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function mo(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function _u(e,t){this._context=e,this._k=(1-t)/6}_u.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:mo(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:mo(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const JN=function e(t){function n(r){return new _u(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Eu(e,t){this._context=e,this._k=(1-t)/6}Eu.prototype={areaStart:Pn,areaEnd:Pn,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:mo(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const tP=function e(t){function n(r){return new Eu(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Ou(e,t){this._context=e,this._k=(1-t)/6}Ou.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(e,t){switch(e=+e,t=+t,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:mo(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const eP=function e(t){function n(r){return new Ou(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Tu(e,t,n){var r=e._x1,i=e._y1,s=e._x2,a=e._y2;if(e._l01_a>ee){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>ee){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,s,a,e._x2,e._y2)}function cv(e,t){this._context=e,this._alpha=t}cv.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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;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(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Tu(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const nP=function e(t){function n(r){return t?new cv(r,t):new _u(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function uv(e,t){this._context=e,this._alpha=t}uv.prototype={areaStart:Pn,areaEnd:Pn,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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;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=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Tu(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const rP=function e(t){function n(r){return t?new uv(r,t):new Eu(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function hv(e,t){this._context=e,this._alpha=t}hv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;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:Tu(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const iP=function e(t){function n(r){return t?new hv(r,t):new Ou(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function dv(e){return e<0?-1:1}function pv(e,t,n){var r=e._x1-e._x0,i=t-e._x1,s=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),o=(s*i+a*r)/(r+i);return(dv(s)+dv(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function fv(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Su(e,t,n){var r=e._x0,i=e._y0,s=e._x1,a=e._y1,o=(s-r)/3;e._context.bezierCurveTo(r+o,i+o*t,s-o,a-o*n,s,a)}function go(e){this._context=e}go.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:Su(this,this._t0,fv(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Su(this,fv(this,n=pv(this,e,t)),n);break;default:Su(this,this._t0,n=pv(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function mv(e){this._context=new gv(e)}(mv.prototype=Object.create(go.prototype)).point=function(e,t){go.prototype.point.call(this,t,e)};function gv(e){this._context=e}gv.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,s){this._context.bezierCurveTo(t,e,r,n,s,i)}};function sP(e){return new go(e)}function aP(e){return new mv(e)}function vv(e){this._context=e}vv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=yv(e),i=yv(t),s=0,a=1;a<n;++s,++a)this._context.bezierCurveTo(r[0][s],i[0][s],r[1][s],i[1][s],e[a],t[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function yv(e){var t,n=e.length-1,r,i=new Array(n),s=new Array(n),a=new Array(n);for(i[0]=0,s[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,s[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,s[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/s[t-1],s[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/s[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/s[t];for(s[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)s[t]=2*e[t+1]-i[t+1];return[i,s]}function oP(e){return new vv(e)}function vo(e,t){this._context=e,this._t=t}vo.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function lP(e){return new vo(e,.5)}function cP(e){return new vo(e,0)}function uP(e){return new vo(e,1)}class hP extends Sn{zoomIn(t,n,r){let i,s,a;const o=r||Br;t&&(i=t.x,s=t.y,a=2);const{width:l,height:c}=R.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0});n.transition().duration(o.duration).ease(o.ease).attr("transform",`translate(${l/2}, ${c/2}) scale(${a}) translate(${-i},${-s})`),this.services.events.dispatchEvent(T.CanvasZoom.CANVAS_ZOOM_IN,{element:D(t)})}zoomOut(t,n){const r=n||Br;t.transition().duration(r.duration).ease(r.ease).attr("transform",""),this.services.events.dispatchEvent(T.CanvasZoom.CANVAS_ZOOM_OUT)}}class dP extends Sn{init(){this.documentFragment=document.createDocumentFragment()}addEventListener(t,n){this.documentFragment.addEventListener(t,n)}removeEventListener(t,n){this.documentFragment.removeEventListener(t,n)}dispatchEvent(t,n){let r;n?r=new CustomEvent(t,{detail:n}):(r=document.createEvent("Event"),r.initEvent(t,!1,!0)),this.documentFragment.dispatchEvent(r)}}class pP extends Sn{constructor(t,n){super(t,n)}downloadCSV(t,n){const r=document.createElement("a"),i="text/csv;encoding:utf-8";if(navigator.msSaveBlob)navigator.msSaveBlob(new Blob([t],{type:i}),n);else if(URL&&"download"in r){const s=URL.createObjectURL(new Blob([t],{type:i}));r.href=s,r.setAttribute("download",n),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(s)}else location.href=`data:application/octet-stream,${encodeURIComponent(t)}`}downloadImage(t,n){const r=document.createElement("a");r.download=n,r.href=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}}class fP extends Sn{constructor(){super(...arguments),this.pendingTransitions={}}init(){var t;(t=this.services.events)==null||t.addEventListener(T.Model.UPDATE,()=>{this.pendingTransitions={}})}setupTransition({transition:t,name:n,animate:r}){return this.pendingTransitions[t._id]=t,t.on("end interrupt cancel",()=>{delete this.pendingTransitions[t._id]}),this.model.getOptions().animations===!1||r===!1?t.duration(0):t.duration(x(fp,n,"duration")||fp.default.duration)}getPendingTransitions(){return this.pendingTransitions}}function Ts(e,t){const n=+Nt(e)-+Nt(t);return n<0?-1:n>0?1:n}function mP(e,t,n){const[r,i]=qn(void 0,e,t);return r.getFullYear()-i.getFullYear()}function gP(e,t,n){const[r,i]=qn(void 0,e,t),s=Ts(r,i),a=Math.abs(mP(r,i));r.setFullYear(1584),i.setFullYear(1584);const o=Ts(r,i)===-s,l=s*(a-+o);return l===0?0:l}function wu(e,t,n){const r=Nt(e,void 0);if(isNaN(t))return we(e,NaN);if(!t)return r;const i=r.getDate(),s=we(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const a=s.getDate();return i>=a?s:(r.setFullYear(s.getFullYear(),s.getMonth(),i),r)}function xv(e,t,n){return wu(e,t*12)}function vP(e,t,n){return xv(e,-t)}function yP(e,t,n){const[r,i]=qn(void 0,e,t),s=r.getFullYear()-i.getFullYear(),a=r.getMonth()-i.getMonth();return s*12+a}function xP(e,t){const n=Nt(e,void 0);return n.setHours(23,59,59,999),n}function bP(e,t){const n=Nt(e,void 0),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function _P(e,t){const n=Nt(e,void 0);return+xP(n)==+bP(n)}function EP(e,t,n){const[r,i,s]=qn(void 0,e,e,t),a=Ts(i,s),o=Math.abs(yP(i,s));if(o<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-a*o);let l=Ts(i,s)===-a;_P(r)&&o===1&&Ts(r,s)===1&&(l=!1);const c=a*(o-+l);return c===0?0:c}function OP(e,t,n){return wu(e,-t)}function TP(e,t,n){const[r,i]=qn(void 0,e,t),s=bv(r,i),a=Math.abs(wp(r,i));r.setDate(r.getDate()-s*a);const o=+(bv(r,i)===-s),l=s*(a-o);return l===0?0:l}function bv(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function _v(e,t,n){const r=Nt(e,void 0);return isNaN(t)?we(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function SP(e,t,n){return _v(e,-t)}function $u(e){return t=>{const n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function wP(e,t,n){const[r,i]=qn(void 0,e,t),s=(+r-+i)/Yu;return $u(void 0)(s)}function Ev(e,t,n){return we(e,+Nt(e)+t)}function Ov(e,t,n){return Ev(e,t*Yu)}function $P(e,t,n){return Ov(e,-t)}function Tv(e,t){return+Nt(e)-+Nt(t)}function Sv(e,t,n){const r=Tv(e,t)/qu;return $u(void 0)(r)}function Mu(e,t,n){const r=Nt(e,void 0);return r.setTime(r.getTime()+t*qu),r}function wv(e,t,n){return Mu(e,-t)}function $v(e,t,n){const r=Tv(e,t)/1e3;return $u(void 0)(r)}function Cu(e,t,n){return Ev(e,t*1e3)}function Mv(e,t,n){return Cu(e,-t)}class MP extends Sn{constructor(){super(...arguments),this.scaleTypes={top:null,right:null,bottom:null,left:null},this.scales={top:null,right:null,bottom:null,left:null}}getDomainAxisPosition({datum:t=null}={}){if(this.dualAxes&&t){const n=this.model.getOptions(),{groupMapsTo:r}=n.data,i=x(n,"axes",this.secondaryDomainAxisPosition),s=t[r];if(i!=null&&i.correspondingDatasets&&i.correspondingDatasets.includes(s))return this.secondaryDomainAxisPosition}return this.domainAxisPosition}getRangeAxisPosition({datum:t=null,groups:n=null}={}){if(this.dualAxes){const r=this.model.getOptions(),{groupMapsTo:i}=r.data,s=x(r,"axes",this.secondaryRangeAxisPosition);let a;if(t!==null?a=t[i]:n&&n.length>0&&(a=n[0]),s!=null&&s.correspondingDatasets&&s.correspondingDatasets.includes(a))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition}getAxisOptions(t){return x(this.model.getOptions(),"axes",t)}getDomainAxisOptions(){const t=this.getDomainAxisPosition();return this.getAxisOptions(t)}getRangeAxisOptions(){const t=this.getRangeAxisPosition();return this.getAxisOptions(t)}getScaleLabel(t){return this.getAxisOptions(t).title||(t===G.BOTTOM||t===G.TOP?"x-value":"y-value")}getDomainLabel(){return this.getScaleLabel(this.getDomainAxisPosition())}getRangeLabel(){return this.getScaleLabel(this.getRangeAxisPosition())}update(){this.determineAxisDuality(),this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(G).map(t=>G[t]).forEach(t=>{this.scales[t]=this.createScale(t)})}findDomainAndRangeAxes(){const t=this.findVerticalAxesPositions(),n=this.findHorizontalAxesPositions(),r=this.findDomainAndRangeAxesPositions(t,n);this.domainAxisPosition=r.primaryDomainAxisPosition,this.rangeAxisPosition=r.primaryRangeAxisPosition,this.isDualAxes()&&(this.secondaryDomainAxisPosition=r.secondaryDomainAxisPosition,this.secondaryRangeAxisPosition=r.secondaryRangeAxisPosition)}determineOrientation(){(this.rangeAxisPosition===G.LEFT||this.rangeAxisPosition===G.RIGHT)&&(this.domainAxisPosition===G.BOTTOM||this.domainAxisPosition===G.TOP)?this.orientation=Ht.VERTICAL:this.orientation=Ht.HORIZONTAL}isDualAxes(){return this.dualAxes}determineAxisDuality(){var t,n,r,i;const s=this.model.getOptions(),a=x(s,"axes");((t=a[G.LEFT])!=null&&t.correspondingDatasets&&a[G.RIGHT]||(n=a[G.RIGHT])!=null&&n.correspondingDatasets&&a[G.LEFT]||(r=a[G.TOP])!=null&&r.correspondingDatasets&&a[G.BOTTOM]||(i=a[G.BOTTOM])!=null&&i.correspondingDatasets&&a[G.TOP])&&(this.dualAxes=!0)}getCustomDomainValuesByposition(t){const n=x(this.model.getOptions(),"axes",t,"domain");if(n&&!Array.isArray(n))throw new Error(`Domain in ${t} axis is not a valid array`);if(Array.isArray(n)&&(this.scaleTypes[t]===X.LINEAR||this.scaleTypes[t]===X.TIME)&&n.length!==2)throw new Error(`There can only be 2 elements in domain for scale type: ${this.scaleTypes[t]}`);return n}getOrientation(){return this.orientation}getScaleByPosition(t){return this.scales[t]}getScaleTypeByPosition(t){return this.scaleTypes[t]}getDomainAxisScaleType(){const t=this.getDomainAxisPosition();return this.getScaleTypeByPosition(t)}getRangeAxisScaleType(){const t=this.getRangeAxisPosition();return this.getScaleTypeByPosition(t)}getDomainScale(){return this.scales[this.domainAxisPosition]}getRangeScale(){return this.scales[this.rangeAxisPosition]}getMainXAxisPosition(){const t=[G.BOTTOM,G.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find(n=>t.indexOf(n)>-1)}getMainYAxisPosition(){const t=[G.LEFT,G.RIGHT];return[this.domainAxisPosition,this.rangeAxisPosition].find(n=>t.indexOf(n)>-1)}getMainXScale(){return this.scales[this.getMainXAxisPosition()]}getMainYScale(){return this.scales[this.getMainYAxisPosition()]}getValueFromScale(t,n,r,i){const s=this.model.getOptions(),a=x(s,"axes")[r],{mapsTo:o}=a,l=x(i,o)!==null?i[o]:i;let c;switch(n){case X.LABELS:c=t(l)+t.step()/2;break;case X.TIME:c=t(new Date(l));break;default:c=t(l)}return c}getBoundedScaledValues(t){const{bounds:n}=this.model.getOptions(),r=this.getRangeAxisPosition({datum:t}),i=this.scales[r],s=this.model.getOptions(),a=x(s,"axes")[r],{mapsTo:o}=a,l=t[o]!==void 0?t[o]:t;return[i(x(t,n.upperBoundMapsTo)!==null?t[n.upperBoundMapsTo]:l),i(x(t,n.lowerBoundMapsTo)!==null?t[n.lowerBoundMapsTo]:l)]}getValueThroughAxisPosition(t,n){const r=this.scaleTypes[t],i=this.scales[t];return this.getValueFromScale(i,r,t,n)}getDomainValue(t){const n=this.getDomainAxisPosition({datum:t});return this.getValueThroughAxisPosition(n,t)}getRangeValue(t){const n=this.getRangeAxisPosition({datum:t});return this.getValueThroughAxisPosition(n,t)}getMainXScaleType(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())}getMainYScaleType(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())}getDomainIdentifier(t){const n=this.model.getOptions();return x(n,"axes",this.getDomainAxisPosition({datum:t}),"mapsTo")}getRangeIdentifier(t){const n=this.model.getOptions();return x(n,"axes",this.getRangeAxisPosition({datum:t}),"mapsTo")}extendsDomain(t,n){const r=this.model.getOptions(),i=x(r,"axes",t);if(i.scaleType===X.TIME){const s=x(r,"timeScale","addSpaceOnEdges");return CP(n,s)}else return AP(n,Rn.paddingRatio,i.scaleType)}findVerticalAxesPositions(){const t=this.model.getOptions(),n=x(t,"axes"),r=this.isDualAxes();return x(n,G.LEFT)===null&&x(n,G.RIGHT)!==null||x(n,G.RIGHT,"main")===!0||r&&x(n,G.LEFT,"correspondingDatasets")?{primary:G.RIGHT,secondary:G.LEFT}:{primary:G.LEFT,secondary:G.RIGHT}}findHorizontalAxesPositions(){const t=this.model.getOptions(),n=x(t,"axes"),r=this.isDualAxes();return x(n,G.BOTTOM)===null&&x(n,G.TOP)!==null||x(n,G.TOP,"main")===!0||r&&x(n,G.BOTTOM,"correspondingDatasets")?{primary:G.TOP,secondary:G.BOTTOM}:{primary:G.BOTTOM,secondary:G.TOP}}findDomainAndRangeAxesPositions(t,n){const r=this.model.getOptions(),i=x(r,"axes",t.primary),s=x(r,"axes",n.primary),a=i.scaleType||X.LINEAR,o=s.scaleType||X.LINEAR,l={primaryDomainAxisPosition:null,secondaryDomainAxisPosition:null,primaryRangeAxisPosition:null,secondaryRangeAxisPosition:null};return l.primaryDomainAxisPosition=n.primary,l.primaryRangeAxisPosition=t.primary,l.secondaryDomainAxisPosition=n.secondary,l.secondaryRangeAxisPosition=t.secondary,(!(o===X.LABELS||o===X.TIME)&&a===X.LABELS||a===X.TIME)&&(l.primaryDomainAxisPosition=t.primary,l.primaryRangeAxisPosition=n.primary,l.secondaryDomainAxisPosition=t.secondary,l.secondaryRangeAxisPosition=n.secondary),l}getScaleDomain(t){const n=this.model.getOptions(),r=x(n,"axes",t),i=x(n,"bounds"),{includeZero:s}=r,a=x(r,"scaleType")||X.LINEAR;if(this.model.isDataEmpty())return[];if(r.binned){const{bins:y}=this.model.getBinConfigurations();return[0,tr(y,v=>v.length)]}else if(r.limitDomainToBins){const{bins:y}=this.model.getBinConfigurations(),v=this.model.getStackKeys({bins:y});return[v[0].split(":")[0],v[v.length-1].split(":")[1]]}const o=this.model.getDisplayData(),{extendLinearDomainBy:l,mapsTo:c,percentage:u,thresholds:d}=r,{reference:h,compareTo:p}=Rn.ratio;if(r.domain)return a===X.LABELS?r.domain:(a===X.TIME&&(r.domain=r.domain.map(y=>y.getTime===void 0?new Date(y):y)),this.extendsDomain(t,r.domain));if(u)return[0,100];if(r&&a===X.LABELS)return Li(o.map(y=>y[c]));let f,g;const m=this.model.getDataGroupNames();if(a===X.LABELS_RATIO)return o.map(y=>`${y[h]}/${y[p]}`);if(a===X.TIME)g=o.map(y=>+new Date(y[c]));else if(i&&n.axes)g=[],o.forEach(y=>{g.push(y[c]),y[i.upperBoundMapsTo]&&g.push(y[i.upperBoundMapsTo]),y[i.lowerBoundMapsTo]&&g.push(y[i.lowerBoundMapsTo])});else if(r.stacked===!0&&m&&t===this.getRangeAxisPosition()){const{groupMapsTo:y}=n.data,v=this.model.getDataValuesGroupedByKeys({groups:m}),b=o.filter(E=>!m.includes(E[y])),O=[];v.forEach(E=>{const{...S}=E;let C=0,I=0;Object.values(GN(S,"sharedStackKey")).forEach(L=>{isNaN(L)||(L<0?I+=L:C+=L)}),O.push([I,C])}),g=[...bu(O),...b.map(E=>E[c])]}else g=[],o.forEach(y=>{const v=y[c];Array.isArray(v)&&v.length===2?(g.push(v[0]),g.push(v[1])):(l&&g.push(Math.max(y[c],y[l])),g.push(v))});return a!==X.TIME&&a!==X.LOG&&s&&g.push(0),d&&d.length>0&&d.forEach(y=>{const v=x(y,"value");v!==null&&g.push(v)}),f=He(g),f=this.extendsDomain(t,f),f}createScale(t){const n=this.model.getOptions(),r=x(n,"axes",t);if(!r)return null;const i=x(r,"scaleType")||X.LINEAR;this.scaleTypes[t]=i;let s;return i===X.TIME?s=cf():i===X.LOG?s=sv().base(r.base||10):i===X.LABELS||i===X.LABELS_RATIO?s=Yi():s=Fe(),s.domain(this.getScaleDomain(t)),s}getDomainLowerBound(t){let n,r=0;return this.getOrientation()===Ht.VERTICAL?n=this.getMainYScale().domain():n=this.getMainXScale().domain(),x(this.model.getOptions(),"axes",t,"includeZero")===!1&&n[0]>0&&n[1]>0&&(r=n[0]),r}getHighestDomainThreshold(){const t=x(this.model.getOptions(),"axes"),n=this.getDomainAxisPosition(),{thresholds:r}=t[n];if(!Array.isArray(r)||Array.isArray(r)&&!r.length)return null;const i=this.getDomainScale(),s=r.sort((a,o)=>o.value-a.value)[0];return this.getScaleTypeByPosition(n)===X.TIME&&(typeof s.value=="string"||s.value.getTime===void 0)&&(s.value=new Date(s.value)),{threshold:s,scaleValue:i(s.value)}}getHighestRangeThreshold(){const t=x(this.model.getOptions(),"axes"),n=this.getRangeAxisPosition(),{thresholds:r}=t[n];if(!Array.isArray(r)||Array.isArray(r)&&!r.length)return null;const i=this.getRangeScale(),s=r.sort((a,o)=>o.value-a.value)[0];return{threshold:s,scaleValue:i(s.value)}}}function CP(e,t){const n=new Date(e[0]),r=new Date(e[1]);return gP(r,n)>1?[vP(n,t),xv(r,t)]:EP(r,n)>1?[OP(n,t),wu(r,t)]:TP(r,n)>1?[SP(n,t),_v(r,t)]:wP(r,n)>1?[$P(n,t),Ov(r,t)]:Sv(r,n)>30?[wv(n,t*30),Mu(r,t*30)]:Sv(r,n)>1?[wv(n,t),Mu(r,t)]:$v(r,n)>15?[Mv(n,t*15),Cu(r,t*15)]:$v(r,n)>1?[Mv(n,t),Cu(r,t)]:[n,r]}function AP([e,t],n,r){const i=(t-e)*n,s=t<=0&&t+i>0?0:t+i;let a=e>=0&&e-i<0?0:e-i;if(r===X.LOG&&a<=0){if(e<=0)throw Error("Data must have values greater than 0 if log scale type is used.");a=e}return[a,s]}class LP extends Sn{constructor(){super(...arguments),this.curveTypes={curveLinear:Oa,curveLinearClosed:ff,curveBasis:ZN,curveBasisClosed:XN,curveBasisOpen:KN,curveBundle:QN,curveCardinal:JN,curveCardinalClosed:tP,curveCardinalOpen:eP,curveCatmullRom:nP,curveCatmullRomClosed:rP,curveCatmullRomOpen:iP,curveMonotoneX:sP,curveMonotoneY:aP,curveNatural:oP,curveStep:lP,curveStepAfter:uP,curveStepBefore:cP}}getD3Curve(){let t="curveLinear";const n=this.model.getOptions().curve;if(n&&(typeof n=="string"?t=n:t=n.name),this.curveTypes[t]){let r=this.curveTypes[t];return n&&Object.keys(n).forEach(i=>{r[i]&&(r=r[i](n[i]))}),r}return console.warn(`The curve type '${t}' is invalid, using 'curveLinear' instead`),this.curveTypes.curveLinear}}class kP extends Sn{isZoomBarEnabled(){if(!this.services.cartesianScales||!x(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();const t=this.services.cartesianScales.getMainXAxisPosition(),n=x(this.model.getOptions(),"axes",t,"scaleType");return t===G.BOTTOM&&n===X.TIME}getZoomBarData(){const t=this.model.getZoomBarData();return t&&t.length>1?t:this.model.getDisplayData()}getDefaultZoomBarDomain(t){if(!this.services.zoom)throw new Error("Services zoom not defined");const n=t||this.services.zoom.getZoomBarData(),{cartesianScales:r}=this.services;if(!r)throw new Error("Services cartesianScales undefined");const i=r.getMainXAxisPosition(),s=r.getDomainIdentifier(),a=x(this.model.getOptions(),"axes",i,"domain");if(Array.isArray(a)&&a.length===2)return a;if(!i)throw new Error("Not defined: mainXAxisPosition");return r.extendsDomain(i,He(n,o=>o[s]))}handleDomainChange(t,n={dispatchEvent:!0}){var r;this.model.set({zoomDomain:t},{animate:!1}),n.dispatchEvent&&((r=this.services.events)==null||r.dispatchEvent(T.ZoomDomain.CHANGE,{newDomain:t}))}getZoomRatio(){return x(this.model.getOptions(),"zoomBar","zoomRatio")}filterDataForRangeAxis(t,n){var r;const i=this.model.get("zoomDomain"),s=Object.assign({stacked:!1},n),a=x(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&a&&i){const o=s.stacked?"sharedStackKey":(r=this.services.cartesianScales)==null?void 0:r.getDomainIdentifier(),l=t.filter(c=>new Date(c[o])>=i[0]&&new Date(c[o])<=i[1]);if(l.length>0)return l}return t}zoomIn(t=this.getZoomRatio()){var n;const r=this.model.get("zoomDomain"),i=xe.handleWidth,s=(n=this.services.cartesianScales)==null?void 0:n.getMainXScale().copy();s.domain(this.getDefaultZoomBarDomain());const a=s(r[0]),o=s(r[1]);if(o-a<i+1)return;const l=s.range(),c=o-a,u=Math.min((l[1]-l[0])/2*(t/2),c/2);let d=a+u,h=o-u;d>=h&&(d=a+c/2-i/2,h=o-c/2+i/2);const p=[s.invert(d),s.invert(h)];(r[0].valueOf()!==p[0].valueOf()||r[1].valueOf()!==p[1].valueOf())&&this.handleDomainChange(p)}zoomOut(t=this.getZoomRatio()){const n=this.model.get("zoomDomain");if(!this.services.cartesianScales)throw new Error("Services cartesianScales undefined");const r=this.services.cartesianScales.getMainXScale().copy();r.domain(this.getDefaultZoomBarDomain());const i=r(n[0]),s=r(n[1]),a=r.range(),o=(a[1]-a[0])/2*(t/2),l=Math.max(i-o,a[0]),c=Math.min(s+o,a[1]),u=[r.invert(l),r.invert(c)];(n[0].valueOf()!==u[0].valueOf()||n[1].valueOf()!==u[1].valueOf())&&this.handleDomainChange(u)}resetZoomDomain(){const t=this.model.get("zoomDomain"),n=this.getDefaultZoomBarDomain();(t[0].valueOf()!==n[0].valueOf()||t[1].valueOf()!==n[1].valueOf())&&this.handleDomainChange(n)}isMinZoomDomain(){const t=this.model.get("zoomDomain"),n=this.getDefaultZoomBarDomain();if(!t||!n)return!1;const r=t[1].valueOf()-t[0].valueOf(),i=n[1].valueOf()-n[0].valueOf(),s=x(this.model.getOptions(),"zoomBar","minZoomRatio");return r/i<s}isMaxZoomDomain(){const t=this.model.get("zoomDomain"),n=this.getDefaultZoomBarDomain();return!!(t&&n&&t[0].valueOf()===n[0].valueOf()&&t[1].valueOf()===n[1].valueOf())}isEmptyState(){return this.getZoomBarData().length===0}isZoomBarLoading(t){return x(this.model.getOptions(),"zoomBar",t,"loading")}isZoomBarLocked(t){return x(this.model.getOptions(),"zoomBar",t,"locked")}}function DP(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:ev(e,t,n)}var RP="\\ud800-\\udfff",IP="\\u0300-\\u036f",NP="\\ufe20-\\ufe2f",PP="\\u20d0-\\u20ff",UP=IP+NP+PP,BP="\\ufe0e\\ufe0f",HP="\\u200d",VP=RegExp("["+HP+RP+UP+BP+"]");function Cv(e){return VP.test(e)}function GP(e){return e.split("")}var Av="\\ud800-\\udfff",FP="\\u0300-\\u036f",zP="\\ufe20-\\ufe2f",jP="\\u20d0-\\u20ff",WP=FP+zP+jP,qP="\\ufe0e\\ufe0f",YP="["+Av+"]",Au="["+WP+"]",Lu="\\ud83c[\\udffb-\\udfff]",ZP="(?:"+Au+"|"+Lu+")",Lv="[^"+Av+"]",kv="(?:\\ud83c[\\udde6-\\uddff]){2}",Dv="[\\ud800-\\udbff][\\udc00-\\udfff]",XP="\\u200d",Rv=ZP+"?",Iv="["+qP+"]?",KP="(?:"+XP+"(?:"+[Lv,kv,Dv].join("|")+")"+Iv+Rv+")*",QP=Iv+Rv+KP,JP="(?:"+[Lv+Au+"?",Au,kv,Dv,YP].join("|")+")",t3=RegExp(Lu+"(?="+Lu+")|"+JP+QP,"g");function e3(e){return e.match(t3)||[]}function n3(e){return Cv(e)?e3(e):GP(e)}function r3(e){return function(t){t=$i(t);var n=Cv(t)?n3(t):void 0,r=n?n[0]:t.charAt(0),i=n?DP(n,1).join(""):t.slice(1);return r[e]()+i}}var i3=r3("toUpperCase");function s3(e){return i3($i(e).toLowerCase())}var a3=Yf(function(e,t,n){return t=t.toLowerCase(),e+(n?s3(t):t)});class qe{constructor(t,n){this.components=[],this.services={canvasZoom:hP,domUtils:R,events:dP,files:pP,gradientUtils:fc,transitions:fP},this.model=new en(this.services)}init(t,n){this.model.set({holder:t},{skipUpdate:!0}),Object.keys(this.services).forEach(r=>{const i=this.services[r];this.services[r]=new i(this.model,this.services)}),this.services.events.addEventListener(T.Model.UPDATE,r=>{const i=!!x(r,"detail","animate");this.update(i)}),this.model.setData(n.data),this.services.events.addEventListener(T.Chart.RESIZE,()=>{this.update(!1)}),this.components=this.getComponents(),this.update()}getComponents(){return console.error("getComponents() method is not implemented"),[]}update(t=!0){if(!this.components)return;Object.keys(this.services).forEach(i=>{this.services[i].update()}),this.components.forEach(i=>i.render(t));const n=this.services.transitions.getPendingTransitions(),r=Object.keys(n).map(i=>n[i].end().catch(s=>s));Promise.all(r).then(()=>this.services.events.dispatchEvent(T.Chart.RENDER_FINISHED))}destroy(){this.components.forEach(t=>t.destroy()),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},{skipUpdate:!0})}getChartComponents(t,n){const r=this.model.getOptions(),i=x(r,"toolbar","enabled"),s={id:"legend",components:[new uu(this.model,this.services)],growth:at.PREFERRED},a=x(r,"canvasZoom","enabled");a&&a===!0&&t.push(new Ak(this.model,this.services));const o=!!this.model.getOptions().title,l={id:"title",components:[new Es(this.model,this.services)],growth:at.STRETCH},c={id:"toolbar",components:[new io(this.model,this.services)],growth:at.PREFERRED},u={id:"header",components:[new Oe(this.model,this.services,[l,...i?[c]:[]],{direction:wt.ROW,alignItems:jn.CENTER})],growth:at.PREFERRED},d={id:"graph-frame",components:t,growth:at.STRETCH,renderType:x(n,"graphFrameRenderType")||Q.SVG},h=x(n,"excludeLegend")!==!0&&r.legend.enabled!==!1;let p=wt.COLUMN;if(h){const y=x(r,"legend","position");y==="left"?(p=wt.ROW,r.legend.orientation||(r.legend.orientation=Sr.VERTICAL)):y==="right"?(p=wt.ROW_REVERSE,r.legend.orientation||(r.legend.orientation=Sr.VERTICAL)):y==="bottom"&&(p=wt.COLUMN_REVERSE)}const f={id:"spacer",components:[new Cn(this.model,this.services)],growth:at.PREFERRED},g={id:"full-frame",components:[new Oe(this.model,this.services,[...h?[s]:[],...h?[f]:[],d],{direction:p})],growth:at.STRETCH},m=[];if(o||i){m.push(u);const y={id:"spacer",components:[new Cn(this.model,this.services,i?{size:15}:void 0)],growth:at.PREFERRED};m.push(y)}return m.push(g),[new hu(this.model,this.services),new so(this.model,this.services),new Oe(this.model,this.services,m,{direction:wt.COLUMN})]}}class me extends qe{constructor(t,n){super(t,n),this.services=Object.assign(this.services,{cartesianScales:MP,curves:LP,zoom:kP}),this.model=new lr(this.services)}getAxisChartComponents(t,n){const r=this.model.getOptions(),i=x(r,"zoomBar",G.TOP,"enabled"),s=x(r,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const a=this.services.cartesianScales.getMainXAxisPosition(),o=x(r,"axes",a,"scaleType"),l=i&&a===G.BOTTOM&&o===X.TIME,c=this.services.zoom.isZoomBarLocked(G.TOP),u=!!this.model.getOptions().title,d={id:"title",components:[new Es(this.model,this.services)],growth:at.STRETCH},h={id:"toolbar",components:[new io(this.model,this.services)],growth:at.PREFERRED},p={id:"header",components:[new Oe(this.model,this.services,[d,...s?[h]:[]],{direction:wt.ROW,alignItems:jn.CENTER})],growth:at.PREFERRED},f={id:"legend",components:[new uu(this.model,this.services)],growth:at.PREFERRED};l&&!c&&t.push(new Og(this.model,this.services),new Lk(this.model,this.services)),t.push(new Dk(this.model,this.services)),t.push(new Rk(this.model,this.services));const g={id:"graph-frame",components:t,growth:at.STRETCH,renderType:Q.SVG},m=x(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1;let y=wt.COLUMN;if(m){const S=x(this.model.getOptions(),"legend","position");S===Tr.LEFT?(y=wt.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=Sr.VERTICAL)):S===Tr.RIGHT?(y=wt.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=Sr.VERTICAL)):S===Tr.BOTTOM&&(y=wt.COLUMN_REVERSE)}const v={id:"spacer",components:[new Cn(this.model,this.services)],growth:at.PREFERRED},b={id:"full-frame",components:[new Oe(this.model,this.services,[...m?[f]:[],...m?[v]:[],g],{direction:y})],growth:at.STRETCH},O={id:"zoom-bar",components:[new kk(this.model,this.services)],growth:at.PREFERRED,renderType:Q.SVG},E=[];if(u||s){E.push(p);const S={id:"spacer",components:[new Cn(this.model,this.services,s?{size:15}:void 0)],growth:at.PREFERRED};E.push(S)}return l&&E.push(O),E.push(b),[new $g(this.model,this.services),new so(this.model,this.services),new Oe(this.model,this.services,E,{direction:wt.COLUMN})]}}class o3 extends qe{constructor(t,n){super(t,n),this.model=new Yw(this.services),this.model.setOptions(Rt($t.alluvialChart,n.options)),this.init(t,n)}getComponents(){const t=[new tD(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})}}class l3 extends me{constructor(t,n){super(t,n),this.model.setOptions(Rt(dn($t.areaChart),n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new Hn(this.model,this.services),new si(this.model,this.services),new Ng(this.model,this.services),new on(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0}),new le(this.model,this.services,{skeleton:Gt.GRID})];return this.getAxisChartComponents(t)}}class c3 extends me{constructor(t,n){super(t,n),this.model=new Zw(this.services),this.model.setOptions(Rt($t.boxplotChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new rD(this.model,this.services),new ai(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.VERT_OR_HORIZ})];return this.getAxisChartComponents(t,{legend:{enabled:!1}})}}class u3 extends me{constructor(t,n){super(t,n),this.model.setOptions(Rt($t.bubbleChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new Hn(this.model,this.services),new iD(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.GRID})];return this.getAxisChartComponents(t)}}class h3 extends me{constructor(t,n){super(t,n),this.model=new Xw(this.services),this.model.setOptions(Rt($t.bulletChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new sD(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.GRID})];return this.getAxisChartComponents(t)}}class d3 extends qe{constructor(t,n){super(t,n),this.model=new Kw(this.services),this.model.setOptions(Rt($t.choroplethChart,n.options)),this.init(t,n)}getChartComponents(t,n){const r=this.model.getOptions(),i=x(r,"toolbar","enabled"),s=!!this.model.getOptions().title,a={id:"title",components:[new Es(this.model,this.services)],growth:at.STRETCH},o={id:"toolbar",components:[new io(this.model,this.services)],growth:at.PREFERRED},l={id:"header",components:[new Oe(this.model,this.services,[a,...i?[o]:[]],{direction:wt.ROW,alignItems:jn.CENTER})],growth:at.PREFERRED},c={id:"legend",components:[new Hg(this.model,this.services,{chartType:"choropleth"})],growth:at.PREFERRED,renderType:Q.SVG},u={id:"graph-frame",components:t,growth:at.STRETCH,renderType:Q.SVG},d=x(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1&&this.model.getData().length>0,h=wt.COLUMN_REVERSE,p={id:"spacer",components:[new Cn(this.model,this.services,{size:15})],growth:at.PREFERRED},f={id:"full-frame",components:[new Oe(this.model,this.services,[...d?[c]:[],...d?[p]:[],u],{direction:h})],growth:at.STRETCH},g=[];if(s||i){g.push(l);const m={id:"spacer",components:[new Cn(this.model,this.services,i?{size:15}:void 0)],growth:at.PREFERRED};g.push(m)}return g.push(f),[new hu(this.model,this.services),new so(this.model,this.services),new Oe(this.model,this.services,g,{direction:wt.COLUMN})]}getComponents(){const t=[new RN(this.model,this.services)];return this.getChartComponents(t)}}class p3 extends qe{constructor(t,n){super(t,n),this.model=new Qw(this.services),this.model.setOptions(Rt($t.circlePackChart,n.options)),this.init(t,n)}getComponents(){const t=[new OD(this.model,this.services)];return this.getChartComponents(t)}}const Nv={[ge.LINE]:[si,on],[ge.SCATTER]:[on],[ge.AREA]:[Ng,si,on],[ge.STACKED_AREA]:[Wg,si,Yg,co],[ge.SIMPLE_BAR]:[jg],[ge.GROUPED_BAR]:[zg,ai],[ge.STACKED_BAR]:[qg,co]};class f3 extends me{constructor(t,n){super(t,n);const r=Rt($t.comboChart,n.options);n.options.comboChartTypes||(console.error("No comboChartTypes defined for the Combo Chart!"),r.comboChartTypes=[{type:ge.LINE,correspondingDatasets:[]}]),this.model.setOptions(r),this.init(t,n)}getGraphComponents(){const{comboChartTypes:t}=this.model.getOptions();let n=0;const r=t.map(i=>{const s=i.type;let a;if(typeof i.type=="string"){if(!Object.keys(Nv).includes(i.type))return console.error(`Invalid chart type "${i.type}" specified for combo chart. Please refer to the ComboChart tutorial for more guidance.`),null;let o=!1;const l=`${a3(i.type)}Chart`;return a=st({},$t[l],this.model.getOptions(),i.options),i.type===ge.STACKED_AREA&&(o=!0),Nv[i.type].map(c=>new c(this.model,this.services,{groups:i.correspondingDatasets,id:n++,options:a,stacked:o}))}else return a=st({},this.model.getOptions(),i.options),new s(this.model,this.services,{groups:i.correspondingDatasets,id:n++,options:a})}).filter(i=>i!==null);return bu(r)}getComponents(){const{comboChartTypes:t}=this.model.getOptions(),n=t.some(i=>i.type===ge.STACKED_BAR||i.type===ge.STACKED_AREA),r=[new fe(this.model,this.services),new Te(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.GRID}),...n?[]:[new Hn(this.model,this.services)],...this.getGraphComponents()];return this.getAxisChartComponents(r)}}class Pv extends qe{constructor(t,n,r=!1){super(t,n),this.model=new Jw(this.services),!r&&(this.model.setOptions(Rt($t.pieChart,n.options)),this.init(t,n))}getComponents(){const t=[new Vg(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.PIE})];return this.getChartComponents(t)}}class m3 extends Pv{constructor(t,n){super(t,n,!0),this.model.setOptions(Rt($t.donutChart,n.options)),this.init(t,n)}getComponents(){const t=[new SD(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.DONUT})];return this.getChartComponents(t)}}class g3 extends qe{constructor(t,n){super(t,n),this.model=new t$(this.services),this.model.setOptions(Rt($t.gaugeChart,n.options)),this.init(t,n)}getComponents(){const t=[new wD(this.model,this.services)];return this.getChartComponents(t)}}class v3 extends me{constructor(t,n){super(t,n),this.model.setOptions(Rt($t.groupedBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new zg(this.model,this.services),new ai(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}class y3 extends me{constructor(t,n){super(t,n),this.model=new e$(this.services),this.model.setOptions(Rt($t.heatmapChart,n.options)),this.init(t,n)}getAxisChartComponents(t,n){const r=this.model.getOptions(),i=x(r,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const s=!!this.model.getOptions().title,a={id:"title",components:[new Es(this.model,this.services)],growth:at.STRETCH},o={id:"toolbar",components:[new io(this.model,this.services)],growth:at.PREFERRED},l={id:"header",components:[new Oe(this.model,this.services,[a,...i?[o]:[]],{direction:wt.ROW,alignItems:jn.CENTER})],growth:at.PREFERRED},c={id:"legend",components:[new Hg(this.model,this.services,{chartType:"heatmap"})],growth:at.PREFERRED,renderType:Q.SVG},u={id:"graph-frame",components:t,growth:at.STRETCH,renderType:Q.SVG},d=x(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1&&this.model.getData().length>0,h=wt.COLUMN_REVERSE,p={id:"spacer",components:[new Cn(this.model,this.services,{size:15})],growth:at.PREFERRED},f={id:"full-frame",components:[new Oe(this.model,this.services,[...d?[c]:[],...d?[p]:[],u],{direction:h})],growth:at.STRETCH},g=[];if(s||i){g.push(l);const m={id:"spacer",components:[new Cn(this.model,this.services,i?{size:15}:void 0)],growth:at.PREFERRED};g.push(m)}return g.push(f),[new $g(this.model,this.services),new so(this.model,this.services),new Oe(this.model,this.services,g,{direction:wt.COLUMN})]}getComponents(){const t=[new fe(this.model,this.services),new $D(this.model,this.services)];return this.getAxisChartComponents(t)}}class x3 extends me{constructor(t,n){super(t,n),this.model=new n$(this.services),this.model.setOptions(Rt($t.histogramChart,n.options)),this.init(t,n),this.update()}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new fD(this.model,this.services),new MD(this.model,this.services)];return this.getAxisChartComponents(t)}}class b3 extends me{constructor(t,n){super(t,n),this.model.setOptions(Rt($t.lineChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new Hn(this.model,this.services),new si(this.model,this.services),new on(this.model,this.services,{handleThresholds:!0}),new kD(this.model,this.services),new ai(this.model,this.services)];return this.getAxisChartComponents(t)}}class _3 extends me{constructor(t,n){super(t,n),this.model.setOptions(Rt($t.lollipopChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new Hn(this.model,this.services),new CD(this.model,this.services),new on(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.GRID})];return this.getAxisChartComponents(t)}}class E3 extends qe{constructor(t,n){var r;super(t,n),this.model=new r$(this.services);const i=(r=n.options.meter)!=null&&r.proportional?st(dn($t.proportionalMeterChart),n.options):st(dn($t.meterChart),n.options);this.model.setOptions(i),this.init(t,n)}getComponents(){const t=[...x(this.model.getOptions(),"meter","showLabels")?[{id:"meter-title",components:[new ED(this.model,this.services)],growth:at.STRETCH,renderType:Q.SVG},{id:"spacer",components:[new Cn(this.model,this.services,{size:8})],growth:at.STRETCH}]:[],{id:"meter-graph",components:[new AD(this.model,this.services)],growth:at.STRETCH,renderType:Q.SVG}],n=[new Oe(this.model,this.services,t,{direction:wt.COLUMN})];return this.getChartComponents(n,{graphFrameRenderType:Q.HTML})}}class O3 extends qe{constructor(t,n){super(t,n),this.model=new i$(this.services),this.model.setOptions(Rt($t.radarChart,n.options)),this.init(t,n)}getComponents(){const t=[new LD(this.model,this.services)];return this.getChartComponents(t)}}class T3 extends me{constructor(t,n){super(t,n),this.model.setOptions(Rt($t.scatterChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new Hn(this.model,this.services),new on(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.GRID})];return this.getAxisChartComponents(t)}}class S3 extends qe{constructor(t,n){super(t,n),this.model=new s$(this.services),this.model.setOptions(Rt($t.treeChart,n.options)),this.init(t,n)}getComponents(){const t=[new DD(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})}}class w3 extends qe{constructor(t,n){super(t,n),this.model=new a$(this.services),this.model.setOptions(Rt($t.treemapChart,n.options)),this.init(t,n)}getComponents(){const t=[new lN(this.model,this.services)];return this.getChartComponents(t)}}class $3 extends me{constructor(t,n){super(t,n),this.model.setOptions(Rt($t.simpleBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new jg(this.model,this.services),new ai(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}class M3 extends me{constructor(t,n){super(t,n),this.model.setOptions(Rt($t.stackedAreaChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new co(this.model,this.services),new Wg(this.model,this.services),new si(this.model,this.services,{stacked:!0}),new Yg(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0}),new le(this.model,this.services,{skeleton:Gt.GRID})];return this.getAxisChartComponents(t)}}class C3 extends me{constructor(t,n){super(t,n),this.model.setOptions(Rt($t.stackedBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new fe(this.model,this.services),new Te(this.model,this.services),new co(this.model,this.services),new qg(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.VERT_OR_HORIZ}),new ai(this.model,this.services)];return this.getAxisChartComponents(t)}}class A3 extends qe{constructor(t,n){super(t,n),this.model=new o$(this.services),this.model.setOptions(Rt($t.wordCloudChart,n.options)),this.init(t,n)}getComponents(){const t=[new kN(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.PIE})];return this.getChartComponents(t)}}class Dt extends zn.PureComponent{constructor(){super(...arguments);Pu(this,"chart");Pu(this,"chartRef",zn.createRef())}createChart(n,r,i){throw new Error("Method not implemented.")}componentDidMount(){this.chartRef.current&&!this.chart&&(this.chart=this.createChart(this.chartRef.current,this.props.data,this.props.options))}componentDidUpdate(n){var r,i;this.props.data!==n.data&&((r=this.chart)==null||r.model.setData(this.props.data)),this.props.options!==n.options&&((i=this.chart)==null||i.model.setOptions(this.props.options))}render(){return ft.jsx("div",{ref:this.chartRef,className:"chart-holder"})}}class L3 extends Dt{createChart(t,n,r){return new o3(t,{data:n,options:r})}}class k3 extends Dt{createChart(t,n,r){return new l3(t,{data:n,options:r})}}class D3 extends Dt{createChart(t,n,r){return new c3(t,{data:n,options:r})}}class R3 extends Dt{createChart(t,n,r){return new u3(t,{data:n,options:r})}}class I3 extends Dt{createChart(t,n,r){return new h3(t,{data:n,options:r})}}class Uv extends Dt{createChart(t,n,r){return new d3(t,{data:n,options:r})}}class N3 extends Dt{createChart(t,n,r){return new p3(t,{data:n,options:r})}}class P3 extends Dt{createChart(t,n,r){return new f3(t,{data:n,options:r})}}class U3 extends Dt{createChart(t,n,r){return new m3(t,{data:n,options:r})}}class B3 extends Dt{createChart(t,n,r){return new g3(t,{data:n,options:r})}}class H3 extends Dt{createChart(t,n,r){return new v3(t,{data:n,options:r})}}class V3 extends Dt{createChart(t,n,r){return new y3(t,{data:n,options:r})}}class G3 extends Dt{createChart(t,n,r){return new x3(t,{data:n,options:r})}}class F3 extends Dt{createChart(t,n,r){return new b3(t,{data:n,options:r})}}class z3 extends Dt{createChart(t,n,r){return new _3(t,{data:n,options:r})}}class j3 extends Dt{createChart(t,n,r){return new E3(t,{data:n,options:r})}}class W3 extends Dt{createChart(t,n,r){return new Pv(t,{data:n,options:r})}}class q3 extends Dt{createChart(t,n,r){return new O3(t,{data:n,options:r})}}class Y3 extends Dt{createChart(t,n,r){return new T3(t,{data:n,options:r})}}class Z3 extends Dt{createChart(t,n,r){return new $3(t,{data:n,options:r})}}class X3 extends Dt{createChart(t,n,r){return new M3(t,{data:n,options:r})}}class K3 extends Dt{createChart(t,n,r){return new C3(t,{data:n,options:r})}}class Q3 extends Dt{createChart(t,n,r){return new S3(t,{data:n,options:r})}}class J3 extends Dt{createChart(t,n,r){return new w3(t,{data:n,options:r})}}class tU extends Dt{createChart(t,n,r){return new A3(t,{data:n,options:r})}}function eU(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bv={exports:{}};/*!
73
+ </svg>`}addEventListeners(){const t=this;this.parent.selectAll("circle.node").on("mouseover",function(n,r){const i=U(this);i.classed("hovered",!0);const a=t.model.getHierarchyLevel(),s=a>2&&!i.classed("focal"),o=_(t.model.getOptions(),"canvasZoom","enabled");let l=!1;if(!s){let c=[],u=[],d=null;if(r.children){r.depth>1&&o&&(l=!0,i.classed("clickable",!0)),c=r.children.map(f=>{if(f!==null)return typeof f.data.value=="number"?{label:f.data.name,value:f.data.value}:{label:f.data.name,labelIcon:o&&a<=2?t.getZoomIcon():null,value:f.value}});const p=t.model.getOptions();u=[{label:kt(p,"locale.translations.total")||kt(p,"tooltip.totalLabel")||"Total",value:r.value,bold:!0}],t.highlightChildren(r.children)}else d=r.value;const h=getComputedStyle(this,null).getPropertyValue("fill");t.services.events.dispatchEvent(w.Tooltip.SHOW,{event:n,hoveredElement:i,items:[{color:h,label:r.data.name,labelIcon:l&&o&&a<=2?t.getZoomIcon():null,value:d},...c,...u]})}t.services.events.dispatchEvent(w.CirclePack.CIRCLE_MOUSEOVER,{event:n,element:i,datum:r})}).on("mousemove",function(n,r){const i=U(this);t.services.events.dispatchEvent(w.CirclePack.CIRCLE_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(w.Tooltip.MOVE,{event:n})}).on("mouseout",function(n,r){const i=U(this);i.classed("hovered",!1),r.children&&t.unhighlightChildren(r.children),t.services.events.dispatchEvent(w.CirclePack.CIRCLE_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(w.Tooltip.HIDE,{hoveredElement:i})}).on("click",function(n,r){const i=U(this),a=i.classed("non-focal"),s=_(t.model.getOptions(),"canvasZoom","enabled");if(s&&t.model.getHierarchyLevel()>2){const o=t.parent.selectAll("circle.node");U(t.services.domUtils.getMainContainer()).classed("zoomed-in",!1),t.focal=null,t.model.updateHierarchyLevel(2),t.services.canvasZoom.zoomOut(o,Ui)}else if(r.depth===2&&r.children&&!a&&s){const o=t.parent.selectAll("circle.node");U(t.services.domUtils.getMainContainer()).classed("zoomed-in",!0),t.focal=r,t.model.updateHierarchyLevel(3),t.services.canvasZoom.zoomIn(r,o,Ui),n.stopPropagation()}t.services.events.dispatchEvent(w.CirclePack.CIRCLE_CLICK,{event:n,element:i,datum:r})})}destroy(){this.parent.selectAll("circle.node").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null);const t=this.services.events;t.removeEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.removeBackgroundListeners()}}function qD(e,t){const n=Pa(this._current,e);return r=>(this._current=n(r),t(this._current))}class Kv extends Mt{constructor(){super(...arguments),this.type="pie",this.renderType=ft.SVG,this.isRendering=!1,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("path.slice").transition("legend-hover-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-bar"})).attr("opacity",i=>i.data[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.slice").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getInnerRadius(){return Qt.innerRadius}render(t=!0){const n=this,r=this.getComponentContainer({ariaLabel:"pie graph"}),i=this.getOptions(),{groupMapsTo:a}=i.data,{valueMapsTo:s}=i.pie;this.isRendering=!0;const o=this.model.getDisplayData().filter(I=>I[s]>0),l=this.computeRadius();this.arc=gs().innerRadius(this.getInnerRadius()).outerRadius(l),this.hoverArc=gs().innerRadius(this.getInnerRadius()).outerRadius(l+Qt.hoverArc.outerRadiusOffset);const c=OL().value(I=>I[s]).sort(_(i,"pie","sortFunction")).padAngle(Qt.padAngle)(o),u=B.appendOrSelect(r,"g.slices").attr("role",Tt.GROUP).attr("data-name","slices").selectAll("path.slice").data(c,I=>I.data[a]);u.exit().attr("opacity",0).remove(),u.enter().append("path").classed("slice",!0).attr("opacity",0).merge(u).attr("class",I=>this.model.getColorClassName({classNameTypes:[mt.FILL],dataGroupName:I.data[a],originalClassName:"slice"})).style("fill",I=>n.model.getFillColor(I.data[a],null,I.data)).attr("d",this.arc).transition().call(I=>this.services.transitions.setupTransition({transition:I,name:"pie_slice_enter_update",animate:t})).attr("opacity",1).attr("role",Tt.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",I=>`${I[s]}, ${Yc(I.data[s],o,s)+"%"}`).attrTween("d",function(I){return qD.bind(this)(I,n.arc)}).on("end",()=>{n.isRendering=!1});const{code:d,number:h}=_(i,"locale"),p=i.pie.labels.enabled,f=p?c.filter(I=>I.data[s]>0):[],v=B.appendOrSelect(r,"g.labels").attr("role",Tt.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(f,I=>I.data[a]);v.exit().attr("opacity",0).remove();const m=v.enter().append("text").classed("pie-label",!0),y=[];m.merge(v).style("text-anchor","middle").text(I=>i.pie.labels.formatter?i.pie.labels.formatter({...I,percentageValue:Yc(I.data[s],o,s,!0)}):h(Yc(I.data[s],o,s),d)+"%").datum(function(I){const N=l+7,M=(I.endAngle-I.startAngle)/2+I.startAngle,q=M/Math.PI*180,H=this.getComputedTextLength();return I.textOffsetX=H/2,I.textOffsetY=q>90&&q<270?10:0,I.xPosition=(I.textOffsetX+N)*Math.sin(M),I.yPosition=(I.textOffsetY+N)*-Math.cos(M),I}).attr("transform",function(I,N){const M=f.length,q=(I.endAngle-I.startAngle)*(180/Math.PI);if(N>=M-2&&q<Qt.callout.minSliceDegree){let H,G;return I.index===M-1?(H=I.xPosition+Qt.callout.offsetX+Qt.callout.textMargin+I.textOffsetX,G=I.yPosition-Qt.callout.offsetY,I.direction=pa.RIGHT,y.push(I)):(H=I.xPosition-Qt.callout.offsetX-I.textOffsetX-Qt.callout.textMargin,G=I.yPosition-Qt.callout.offsetY,I.direction=pa.LEFT,y.push(I)),`translate(${H}, ${G})`}return`translate(${I.xPosition}, ${I.yPosition})`}),this.renderCallouts(y);const g=_(i,"donut")?"donut":"pie",x=_(i,g,"alignment"),{width:O}=B.getSVGElementSize(this.getParent(),{useAttrs:!0}),T=p?Qt.xOffset:0,S=p?Qt.yOffset:0;let D=l+T;x===me.CENTER?D=O/2:x===me.RIGHT&&(D=O-l-Qt.xOffset);let P=l+S;y.length>0&&(P+=Qt.yOffsetCallout),r.attr("x",D+7).attr("y",P),this.addEventListeners()}renderCallouts(t){const n=B.appendOrSelect(this.getComponentContainer(),"g.callouts").attr("role",Tt.GROUP).attr("data-name","callouts"),r=n.selectAll("g.callout").data(t);r.exit().remove();const i=r.enter().append("g").classed("callout",!0).attr("role",Tt.GROUP).attr("aria-roledescription","label callout");i.merge(r).datum(function(a){const{xPosition:s,yPosition:o,direction:l}=a;return l===pa.RIGHT?(a.startPos={x:s,y:o+a.textOffsetY},a.endPos={x:s+Qt.callout.offsetX,y:o-Qt.callout.offsetY+a.textOffsetY},a.intersectPointX=a.endPos.x-Qt.callout.horizontalLineLength):(a.startPos={x:s,y:o+a.textOffsetY},a.endPos={x:s-Qt.callout.offsetX,y:o-Qt.callout.offsetY+a.textOffsetY},a.intersectPointX=a.endPos.x+Qt.callout.horizontalLineLength),a}),i.append("line").classed("vertical-line",!0).merge(n.selectAll("line.vertical-line")).datum(function(){return U(this.parentNode).datum()}).style("stroke-width","1px").attr("x1",a=>a.startPos.x).attr("y1",a=>a.startPos.y).attr("x2",a=>a.intersectPointX).attr("y2",a=>a.endPos.y),i.append("line").classed("horizontal-line",!0).merge(n.selectAll("line.horizontal-line")).datum(function(){return U(this.parentNode).datum()}).style("stroke-width","1px").attr("x1",a=>a.intersectPointX).attr("y1",a=>a.endPos.y).attr("x2",a=>a.endPos.x).attr("y2",a=>a.endPos.y)}addEventListeners(){const t=this;this.parent.selectAll("path.slice").on("mouseover",function(n,r){const i=U(this);t.isRendering||i.classed("hovered",!0).transition("pie_slice_mouseover").call(o=>t.services.transitions.setupTransition({transition:o,name:"pie_slice_mouseover"})).attr("d",t.hoverArc),t.services.events.dispatchEvent(w.Pie.SLICE_MOUSEOVER,{event:n,element:U(this),datum:r});const{groupMapsTo:a}=t.getOptions().data,{valueMapsTo:s}=t.getOptions().pie;t.services.events.dispatchEvent(w.Tooltip.SHOW,{event:n,hoveredElement:i,items:[{label:r.data[a],value:r.data[s]}]})}).on("mousemove",function(n,r){const i=U(this);t.services.events.dispatchEvent(w.Pie.SLICE_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(w.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(w.Pie.SLICE_CLICK,{event:n,element:U(this),datum:r})}).on("mouseout",function(n,r){const i=U(this);WA(()=>{t.isRendering||i.classed("hovered",!1).transition("pie_slice_mouseout").call(a=>t.services.transitions.setupTransition({transition:a,name:"pie_slice_mouseout"})).attr("d",t.arc)},100),t.services.events.dispatchEvent(w.Pie.SLICE_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(w.Tooltip.HIDE,{hoveredElement:i})})}computeRadius(){const{width:t,height:n}=B.getSVGElementSize(this.parent,{useAttrs:!0}),r=this.getOptions(),i=Math.min(t,n)/2;return r.pie.labels.enabled?i+Qt.radiusOffset:i}}class XD extends Kv{constructor(){super(...arguments),this.type="donut",this.renderType=ft.SVG}render(t=!0){super.render(t);const n=this;if(this.model.isDataEmpty()){this.getComponentContainer({ariaLabel:"donut graph"}).select("g.center").remove();return}const r=B.appendOrSelect(this.getComponentContainer({ariaLabel:"donut graph"}),"g.center"),i=this.getOptions(),a=this.computeRadius(),s=_(i,"donut","center","label");B.appendOrSelect(r,"text.donut-figure").attr("text-anchor","middle").style("dominant-baseline",()=>s===null||s===""?"central":"initial").style("font-size",()=>i.donut.center.numberFontSize(a)).transition().call(o=>this.services.transitions.setupTransition({transition:o,name:"donut-figure-enter-update",animate:t})).tween("text",function(){return n.centerNumberTween(U(this))}),s!==null&&s!==""&&B.appendOrSelect(r,"text.donut-title").attr("text-anchor","middle").style("font-size",()=>i.donut.center.titleFontSize(a)).attr("y",i.donut.center.titleYPosition(a)).text(s)}getInnerRadius(){return this.computeRadius()*(3/4)}centerNumberTween(t){const n=this.getOptions();let r=_(n,"donut","center","number");r===null&&(r=this.model.getDisplayData().reduce((o,l)=>o+l[n.pie.valueMapsTo],0));const i=parseInt(t.text().replace(/[, ]+/g,""),10)||0;let a;i%1===0&&r%1===0?a=jp:a=qe;const s=a(i,r);return o=>{const{numberFormatter:l}=n.donut.center;if(l)t.text(l(s(o)));else{const{code:c,number:u}=_(n,"locale");t.text(u(Math.floor(s(o)),c))}}}}const Qv="4,10 8,6 12,10",Jv="12,6 8,10 4,6";class ZD extends Mt{constructor(){super(...arguments),this.type="gauge",this.renderType=ft.SVG}getValue(){var t;return((t=this.model.getData().find(n=>n.group==="value"))==null?void 0:t.value)??null}getValueRatio(){return ag(this.getValue(),0,100)/100}getDelta(){var t;return((t=this.model.getData().find(n=>n.group==="delta"))==null?void 0:t.value)??null}getArcRatio(){const t=this.getOptions();return _(t,"gauge","type")===Hr.FULL?1:.5}getArcSize(){return this.getArcRatio()*Math.PI*2}getStartAngle(){const t=this.getArcSize();return t===2*Math.PI?0:-t/2}getArrow(t){const n=this.getOptions();switch(_(n,"gauge","deltaArrow","direction")){case ks.UP:return Qv;case ks.DOWN:return Jv;default:return t>0?Qv:Jv}}render(t=!0){const n=this.getComponentContainer({ariaLabel:"gauge graph"}).attr("width","100%").attr("height","100%"),r=this.getOptions(),i=this.getValue(),a=this.getValueRatio(),s=this.getArcSize(),o=this.getStartAngle(),l=a*s,c=o+l,u=o+s,d=this.computeRadius(),h=this.getInnerRadius();this.backgroundArc=gs().innerRadius(h).outerRadius(d).startAngle(c).endAngle(u),this.arc=gs().innerRadius(h).outerRadius(d).startAngle(o).endAngle(c),B.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc);const p=n.selectAll("path.arc-foreground").data([i]);p.enter().append("path").merge(p).attr("class",this.model.getColorClassName({classNameTypes:[mt.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).style("fill",()=>_(this.getOptions(),"color","scale","value")).attr("d",this.arc).attr("role",Tt.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",y=>y),this.drawValueNumber(),this.drawDelta(),p.exit().remove();const f=_(r,"gauge","alignment"),{width:v}=B.getSVGElementSize(this.getParent(),{useAttrs:!0});let m=d;f===me.CENTER?m=v/2:f===me.RIGHT&&(m=v-d),n.attr("x",m).attr("y",d),this.addEventListeners()}drawValueNumber(){const t=this.getComponentContainer(),n=this.getOptions(),r=_(n,"gauge","type"),i=this.getValue(),a=this.getDelta(),s=this.computeRadius(),o=_(n,"gauge","valueFontSize"),l=_(n,"gauge","deltaFontSize"),c=_(n,"gauge","numberSpacing"),u=_(n,"gauge","showPercentageSymbol");let d=0;r===Hr.FULL&&!a?d=l(s):r===Hr.SEMI&&a&&(d=-(l(s)+c));const h=B.appendOrSelect(t,"g.gauge-numbers").attr("transform",`translate(0, ${d})`),p=o(s),f=B.appendOrSelect(h,"g.gauge-value-number"),{code:v,number:m}=_(n,"locale"),y=_(n,"gauge","numberFormatter"),g=f.selectAll("text.gauge-value-number").data([i]);g.enter().append("text").attr("class","gauge-value-number").merge(g).style("font-size",`${p}px`).attr("text-anchor","middle").text(I=>{let N;return I!=null?N=Number(I.toFixed(2))%1!==0?I.toFixed(2):I.toFixed():N=0,y?y(N):m(Number(N),v)});const{width:x}=B.getSVGElementSize(B.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}),O=p/2,T=u?"%":"",S=B.appendOrSelect(f,"text.gauge-value-symbol").style("font-size",`${O}px`).attr("x",x/2).text(T),{width:D,height:P}=B.getSVGElementSize(S,{useBBox:!0});S.attr("y",`-${P/2}px`),f.attr("transform",`translate(-${D/2}, 0)`)}drawDelta(){const t=this,n=this.getComponentContainer(),r=this.getOptions(),i=this.getDelta(),{code:a,number:s}=_(r,"locale");if(i){const o=this.computeRadius(),l=i?_(r,"gauge","deltaFontSize"):()=>0,c=i?_(r,"gauge","numberFormatter"):()=>null,u=_(r,"gauge","deltaArrow","size"),d=_(r,"gauge","numberSpacing"),h=_(r,"gauge","showPercentageSymbol"),p=B.appendOrSelect(n,"g.gauge-numbers"),f=B.appendOrSelect(p,"g.gauge-delta").attr("transform",`translate(0, ${l(o)+d})`),v=B.appendOrSelect(f,"text.gauge-delta-number"),m=h?"%":"";v.data(i===null?[]:[i]),v.enter().append("text").classed("gauge-delta-number",!0).merge(v).attr("text-anchor","middle").style("font-size",`${l(o)}px`).text(O=>{let T;return O!=null?T=Number(O.toFixed(2))%1!==0?O.toFixed(2):O.toFixed():T=0,c?`${c(T)}${m}`:`${s(Number(T),a)}${m}`});const{width:y}=B.getSVGElementSize(B.appendOrSelect(n,".gauge-delta-number"),{useBBox:!0}),g=_(r,"gauge","deltaArrow","enabled"),x=f.selectAll("svg.gauge-delta-arrow").data(i!==null&&g?[i]:[]);x.enter().append("svg").merge(x).attr("class","gauge-delta-arrow").attr("x",-u(o)-y/2).attr("y",-u(o)/2-l(o)*.35).attr("width",u(o)).attr("height",u(o)).attr("viewBox","0 0 16 16").each(function(){const O=U(this);B.appendOrSelect(O,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");const T=_(r,"gauge","status");B.appendOrSelect(O,"polygon.gauge-delta-arrow").attr("class",T!==null?`gauge-delta-arrow status--${T}`:"").attr("points",t.getArrow(i))}),x.exit().remove(),v.exit().remove()}else{const o=n.select("g.gauge-delta");o.empty()||o.remove()}}getInnerRadius(){const t=this.computeRadius(),n=_(this.getOptions(),"gauge","arcWidth");return t-n}addEventListeners(){const t=this;this.parent.selectAll("path.arc-foreground").on("mouseover",function(n,r){t.services.events.dispatchEvent(w.Gauge.ARC_MOUSEOVER,{event:n,element:U(this),datum:r})}).on("mousemove",function(n,r){const i=U(this);t.services.events.dispatchEvent(w.Gauge.ARC_MOUSEMOVE,{event:n,element:i,datum:r})}).on("click",function(n,r){t.services.events.dispatchEvent(w.Gauge.ARC_CLICK,{event:n,element:U(this),datum:r})}).on("mouseout",function(n,r){const i=U(this);t.services.events.dispatchEvent(w.Gauge.ARC_MOUSEOUT,{event:n,element:i,datum:r})})}computeRadius(){const t=this.getOptions(),n=_(t,"gauge","type"),{width:r,height:i}=B.getSVGElementSize(this.parent,{useAttrs:!0});return n===Hr.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)}}class t0 extends Th{constructor(){super(...arguments),this.type="grouped-bar",this.renderType=ft.SVG,this.padding=5,this.defaultStepFactor=70,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-bar"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.model.getDisplayData(this.configs.groups),r=this.getOptions(),{groupMapsTo:i}=r.data;this.setGroupScale();const a=this.getComponentContainer({ariaLabel:"grouped bar graphs",withinChartClip:!0}),s=ka(n.map(u=>{const d=this.services.cartesianScales.getDomainIdentifier(u);return u[d]&&typeof u[d].toString=="function"?u[d].toString():u[d]})),o=a.selectAll("g.bars").data(s,u=>u);o.exit().attr("opacity",0).remove();const l=o.enter().append("g").classed("bars",!0).attr("role",Tt.GROUP).attr("data-name","bars").merge(o);l.transition().call(u=>this.services.transitions.setupTransition({transition:u,name:"bar-group-update-enter",animate:t})).attr("transform",u=>{const d=this.services.cartesianScales.getDomainValue(u)-this.getGroupWidth()/2;return this.services.cartesianScales.getOrientation()===fe.VERTICAL?`translate(${d}, 0)`:`translate(0, ${d})`});const c=l.selectAll("path.bar").data(u=>this.getDataCorrespondingToLabel(u),u=>u[i]);c.exit().attr("opacity",0).remove(),c.enter().append("path").attr("opacity",0).merge(c).classed("bar",!0).transition().call(u=>this.services.transitions.setupTransition({transition:u,name:"bar-update-enter",animate:t})).attr("class",u=>this.model.getColorClassName({classNameTypes:[mt.FILL],dataGroupName:u[i],originalClassName:"bar"})).style("fill",u=>{const d=this.services.cartesianScales.getDomainIdentifier(u);return this.model.getFillColor(u[i],u[d],u)}).attr("d",u=>{const d=this.groupScale(u[i]),h=this.getBarWidth(),p=d,f=d+h,v=this.services.cartesianScales.getRangeAxisPosition({datum:u}),m=this.services.cartesianScales.getDomainLowerBound(v),y=this.services.cartesianScales.getValueThroughAxisPosition(v,m),g=this.services.cartesianScales.getRangeValue(u),x=this.services.cartesianScales.getDomainValue(u)-h/2,O=x+h;if(!this.isOutsideZoomedDomain(x,O))return De({x0:p,x1:f,y0:y,y1:g},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",Tt.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",u=>u.value),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("path.bar").on("mouseover",function(n,r){const i=U(this);i.classed("hovered",!0),t.services.events.dispatchEvent(w.Bar.BAR_MOUSEOVER,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(w.Tooltip.SHOW,{event:n,hoveredElement:i,data:[r]})}).on("mousemove",function(n,r){const i=U(this);t.services.events.dispatchEvent(w.Bar.BAR_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(w.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(w.Bar.BAR_CLICK,{event:n,element:U(this),datum:r})}).on("mouseout",function(n,r){const i=U(this);i.classed("hovered",!1),t.services.events.dispatchEvent(w.Bar.BAR_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(w.Tooltip.HIDE,{hoveredElement:i})})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getDataCorrespondingToLabel(t){return this.model.getDisplayData(this.configs.groups).filter(n=>{const r=this.services.cartesianScales.getDomainIdentifier(n);return n[r].toString()===t})}getGroupWidth(){const t=this.model.getGroupedData(this.configs.groups),n=this.getTotalGroupPadding();return this.getBarWidth()*t.length+n}getDomainScaleStep(){const t=this.services.cartesianScales.getDomainScale(),n=this.model.getGroupedData(this.configs.groups);let r=this.defaultStepFactor;if(typeof t.step=="function")r=t.step();else if(n.length>0){const i=n.find(a=>{var s;return((s=a.data)==null?void 0:s.length)>1});if(i){const a=this.services.cartesianScales.getDomainIdentifier(i.data[0]);r=Math.abs(t(i.data[1][a])-t(i.data[0][a]))}}return r}getTotalGroupPadding(){const t=this.model.getGroupedData(this.configs.groups);return t.length===1?0:Math.min(5,5*(this.getDomainScaleStep()/this.defaultStepFactor))*(t.length-1)}getBarWidth(){const t=this.getOptions(),n=_(t,"bars","width"),r=_(t,"bars","maxWidth");if(n!==null&&(r===null||n<=r))return n;const i=this.model.getGroupedData(this.configs.groups).length,a=this.getTotalGroupPadding();return Math.min(r,(this.getDomainScaleStep()-a)/i)}setGroupScale(){const t=this.model.getActiveDataGroupNames(this.configs.groups);this.groupScale=Xa().domain(t).rangeRound([0,this.getGroupWidth()])}}class KD extends Mt{constructor(){super(...arguments),this.type="heatmap",this.renderType=ft.SVG,this.matrix={},this.xBandwidth=0,this.yBandwidth=0,this.translationUnits={x:0,y:0},this.handleAxisOnHover=t=>{const{detail:n}=t,{datum:r}=n,i=this.model.getUniqueRanges(),a=this.model.getUniqueDomain(),s=this.services.cartesianScales.getDomainLabel(),o=this.services.cartesianScales.getRangeLabel(),l=this.services.cartesianScales.getMainXScale(),c=this.services.cartesianScales.getMainYScale();let u="",d=null,h=null,p=null;this.matrix[r]!==void 0?(u=s,i.forEach(f=>{if(typeof this.matrix[r][f].value=="number"){const v=this.matrix[r][f].value;if(d===null){d=v,h=v,p=v;return}d+=v,h=v<h?v:h,p=v>p?v:p}})):(u=o,a.forEach(f=>{if(typeof this.matrix[f][r].value=="number"){const v=this.matrix[f][r].value;if(d===null){d=v,h=v,p=v;return}d+=v,h=v<h?v:h,p=v>p?v:p}})),l(r)!==void 0?this.parent.select("g.multi-cell.column-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${l(r)}, ${br(c.range())})`):c(r)!==void 0&&this.parent.select("g.multi-cell.row-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${br(l.range())},${c(r)})`),this.services.events.dispatchEvent(w.Tooltip.SHOW,{event:n.event,hoveredElement:U(t.detail.element),items:[{label:u,value:r,bold:!0},{label:"Min",value:h!==null?h:"-"},{label:"Max",value:p!==null?p:"-"},{label:"Average",value:d!==null?d/a.length:"-"}]})},this.handleAxisMouseOut=t=>{this.parent.selectAll("g.multi-cell").classed("highlighter-hidden",!0),this.services.events.dispatchEvent(w.Tooltip.HIDE,{event:t})}}init(){const t=this.services.events;t.addEventListener(w.Axis.LABEL_MOUSEOVER,this.handleAxisOnHover),t.addEventListener(w.Axis.LABEL_MOUSEOUT,this.handleAxisMouseOut),t.addEventListener(w.Axis.LABEL_FOCUS,this.handleAxisOnHover),t.addEventListener(w.Axis.LABEL_BLUR,this.handleAxisMouseOut)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"heatmap",withinChartClip:!0});n.lower();const{cartesianScales:r}=this.services;if(this.matrix=this.model.getMatrix(),n.html(""),_(this.getOptions(),"data","loading"))return;const i=r.getMainXScale(),a=r.getMainYScale(),s=r.getDomainIdentifier(),o=r.getRangeIdentifier(),l=this.model.getUniqueDomain(),c=this.model.getUniqueRanges(),u=this.model.getMatrixAsArray(),d=i.range(),h=a.range();this.xBandwidth=Math.abs((d[1]-d[0])/l.length),this.yBandwidth=Math.abs((h[1]-h[0])/c.length);const p=this.services.domUtils.generateElementIDString("heatmap-pattern-stripes");n.append("defs").append("pattern").attr("id",p).attr("width",3).attr("height",3).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("rect").classed("pattern-fill",!0).attr("width",.5).attr("height",8);const f=n.selectAll().data(u).enter().append("g").attr("class",v=>`heat-${v.index}`).classed("cell",!0).attr("transform",v=>`translate(${i(v[s])}, ${a(v[o])})`).append("rect").attr("class",v=>this.model.getColorClassName({value:v.value,originalClassName:`heat-${v.index}`})).classed("heat",!0).classed("null-state",v=>v.index===-1||v.value===null).attr("width",this.xBandwidth).attr("height",this.yBandwidth).style("fill",v=>{const m=this.services.cartesianScales.getDomainIdentifier(v);return v.index===-1||v.value===null?`url(#${p})`:this.model.getFillColor(Number(v.value),v[m],v)}).attr("aria-label",v=>v.value);this.createOuterBox("g.cell-highlight",this.xBandwidth,this.yBandwidth),this.createOuterBox("g.multi-cell.column-highlight",this.xBandwidth,Math.abs(h[1]-h[0])),this.createOuterBox("g.multi-cell.row-highlight",Math.abs(d[1]-d[0]),this.yBandwidth),this.determineDividerStatus()&&(f.style("stroke-width","1px"),this.parent.select("g.cell-highlight").classed("cell-2",!0)),this.addEventListener()}createOuterBox(t,n,r){const i=B.appendOrSelect(this.parent,t).classed("shadows",!0).classed("highlighter-hidden",!0);B.appendOrSelect(i,"line.top").attr("x1",-1).attr("x2",n+1),B.appendOrSelect(i,"line.left").attr("x1",0).attr("y1",-1).attr("x2",0).attr("y2",r+1),B.appendOrSelect(i,"line.down").attr("x1",-1).attr("x2",n+1).attr("y1",r).attr("y2",r),B.appendOrSelect(i,"line.right").attr("x1",n).attr("x2",n).attr("y1",-1).attr("y2",r+1)}determineDividerStatus(){const t=_(this.getOptions(),"heatmap","divider","state");return t!==Si.OFF&&(t===Si.AUTO&&Ef.minCellDividerDimension<=this.xBandwidth&&Ef.minCellDividerDimension<=this.yBandwidth||t===Si.ON)}addEventListener(){const t=this,{cartesianScales:n}=this.services,r=this.getOptions(),i=kt(r,"locale.translations.total")||kt(r,"tooltip.totalLabel")||"Total",a=n.getDomainIdentifier(),s=n.getRangeIdentifier(),o=n.getDomainLabel(),l=n.getRangeLabel();this.parent.selectAll("g.cell").on("mouseover",function(c,u){const d=U(this),h=d.select("rect.heat");if(!h.classed("null-state")){const p=ja(d.attr("transform"));t.parent.select("g.cell-highlight").attr("transform",`translate(${p.x+t.translationUnits.x}, ${p.y+t.translationUnits.y})`).classed("highlighter-hidden",!1),t.services.events.dispatchEvent(w.Heatmap.HEATMAP_MOUSEOVER,{event:c,element:h,datum:u}),t.services.events.dispatchEvent(w.Tooltip.SHOW,{event:c,items:[{label:o,value:u[a]},{label:l,value:u[s]},{label:i,value:u.value,color:h.style("fill")}]})}}).on("mousemove",function(c,u){t.services.events.dispatchEvent(w.Heatmap.HEATMAP_MOUSEMOVE,{event:c,element:U(this),datum:u}),t.services.events.dispatchEvent(w.Tooltip.MOVE,{event:c})}).on("click",function(c,u){t.services.events.dispatchEvent(w.Heatmap.HEATMAP_CLICK,{event:c,element:U(this),datum:u})}).on("mouseout",function(c,u){const d=U(this).select("rect.heat"),h=d.classed("null-state");t.parent.select("g.cell-highlight").classed("highlighter-hidden",!0),h||(t.services.events.dispatchEvent(w.Heatmap.HEATMAP_MOUSEOUT,{event:c,element:d,datum:u}),t.services.events.dispatchEvent(w.Tooltip.HIDE,{event:c,hoveredElement:d}))})}destroy(){this.parent.selectAll("rect.heat").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(w.Legend.ITEM_HOVER,this.handleAxisOnHover),t.removeEventListener(w.Legend.ITEM_MOUSEOUT,this.handleAxisMouseOut)}}class QD extends Mt{constructor(){super(...arguments),this.type="histogram",this.renderType=ft.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(a=>this.services.transitions.setupTransition({transition:a,name:"legend-hover-bar"})).attr("opacity",a=>a[i]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer({ariaLabel:"histogram bars"}),r=this.model.getOptions(),{groupIdentifier:i}=r,{groupMapsTo:a}=r.data,s=this.model.getBinnedStackedData(),o=this.services.cartesianScales.getMainXScale(),l=n.selectAll("g.bars").data(s,u=>kt(u,`0.${a}`));l.exit().attr("opacity",0).remove(),l.enter().append("g").classed("bars",!0).attr("role",Tt.GROUP);const c=n.selectAll("g.bars").selectAll("path.bar").data(u=>u);c.exit().remove(),c.enter().append("path").merge(c).classed("bar",!0).attr(i,(u,d)=>d).transition().call(u=>this.services.transitions.setupTransition({transition:u,name:"histogram-bar-update-enter",animate:t})).attr("class",u=>this.model.getColorClassName({classNameTypes:[mt.FILL],dataGroupName:u[a],originalClassName:"bar"})).style("fill",u=>this.model.getFillColor(u[a],null,u)).attr("d",u=>{const d=kt(u,"data");if(!d)return;const h=o(d.x1)-o(d.x0)-1,p=this.services.cartesianScales.getDomainValue(d.x0),f=p+h,v=this.services.cartesianScales.getRangeValue(u[0]);let m=this.services.cartesianScales.getRangeValue(u[1]);return Math.abs(m-v)>0&&Math.abs(m-v)>r.bars.dividerSize&&(this.services.cartesianScales.getOrientation()===fe.VERTICAL?m+=1:m-=1),De({x0:p,x1:f,y0:v,y1:m},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",Tt.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",u=>_(u,"data",u[a])),this.addEventListeners()}addEventListeners(){const t=this.model.getOptions(),{groupMapsTo:n}=t.data,{code:r,number:i}=_(t,"locale"),a=this;this.parent.selectAll("path.bar").on("mouseover",function(s,o){const l=U(this);l.classed("hovered",!0);const c=i(parseFloat(kt(o,"data.x0")),r),u=i(parseFloat(kt(o,"data.x1")),r),d=a.services.cartesianScales.getRangeAxisPosition(),h=a.services.cartesianScales.getScaleLabel(d);a.services.events.dispatchEvent(w.Tooltip.SHOW,{event:s,hoveredElement:l,items:[{label:kt(t,"bins.rangeLabel")||"Range",value:`${c} – ${u}`},{label:t.tooltip.groupLabel||"Group",value:o[n],class:a.model.getColorClassName({classNameTypes:[mt.TOOLTIP],dataGroupName:o[n]})},{label:h,value:kt(o,`data.${o[n]}`)}]})}).on("mousemove",function(s){a.services.events.dispatchEvent(w.Tooltip.MOVE,{event:s})}).on("mouseout",function(){U(this).classed("hovered",!1),a.services.events.dispatchEvent(w.Tooltip.HIDE)})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class JD extends zn{constructor(){super(...arguments),this.type="lollipop",this.renderType=ft.SVG,this.handleScatterOnHover=t=>{const n=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("line.line").attr("stroke-width",a=>a[i]!==n.datum[i]?rr.weight.unselected:rr.weight.selected)},this.handleScatterOnMouseOut=()=>{this.parent.selectAll("line.line").attr("stroke-width",rr.weight.unselected)},this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("line.line").transition("legend-hover-line").call(a=>this.services.transitions.setupTransition({transition:a,name:"legend-hover-line"})).attr("opacity",a=>a[i]!==n.datum().name?rr.opacity.unselected:rr.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("line.line").transition("legend-mouseout-line").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-line"})).attr("opacity",rr.opacity.selected)}}init(){const{events:t}=this.services;t.addEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer({ariaLabel:"lines",withinChartClip:!0}),r=this.model.getOptions(),{groupMapsTo:i}=r.data,{cartesianScales:a}=this.services,s=a.getMainXScale(),o=a.getMainYScale(),l=a.getDomainIdentifier(),c=m=>a.getDomainValue(m),u=m=>a.getRangeValue(m),d=a.getOrientation(),[h,p]=ar(c,u,d),f=n.selectAll("line.line").data(this.getScatterData(),m=>`${m[i]}-${m[l]}`);f.exit().attr("opacity",0).remove();const v=f.enter().append("line").attr("opacity",0).merge(f).classed("line",!0).attr("class",m=>this.model.getColorClassName({classNameTypes:[mt.STROKE],dataGroupName:m[i],originalClassName:"line"})).transition().call(m=>this.services.transitions.setupTransition({transition:m,name:"lollipop-line-update-enter",animate:t})).style("stroke",m=>this.model.getFillColor(m[i],m[l],m)).attr("opacity",1);d===fe.HORIZONTAL?v.attr("y1",p).attr("y2",p).attr("x1",s.range()[0]).attr("x2",m=>h(m)-r.points.radius):v.attr("x1",h).attr("x2",h).attr("y1",o.range()[0]).attr("y2",m=>p(m)+r.points.radius),this.addScatterPointEventListeners()}addScatterPointEventListeners(){this.services.events.addEventListener(w.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),this.services.events.addEventListener(w.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)}destroy(){const t=this.services.events;t.removeEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(w.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),t.removeEventListener(w.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)}}class tI extends Mt{constructor(){super(...arguments),this.type="meter",this.renderType=ft.SVG}getStackedBounds(t,n){let r=0;return t.map((i,a)=>a!==0?(r+=n(i.value),{...i,width:Math.abs(n(i.value)-Se.dividerWidth),x:r-n(i.value)}):(r=n(i.value),{...i,width:Math.abs(n(i.value)-Se.dividerWidth),x:0}))}render(t=!0){const n=this,r=this.getComponentContainer({ariaLabel:"meter lines"}),i=this.getOptions(),a=_(i,"meter","proportional"),s=this.model.getDisplayData(),o=this.model.getStatus(),{width:l}=B.getSVGElementSize(r,{useAttrs:!0}),{groupMapsTo:c}=i.data;let u;_(i,"meter","proportional")===null?u=100:u=_(i,"meter","proportional","total")||this.model.getMaximumDomain(this.model.getDisplayData());const d=On().domain([0,u]).range([0,l]),h=this.getStackedBounds(s,d),p=_(i,"meter","height");B.appendOrSelect(r,"rect.container").attr("x",0).attr("y",0).attr("width",l).attr("height",p||(a?Se.height.proportional:Se.height.default)),B.appendOrSelect(r,"line.rangeIndicator").attr("x1",l).attr("x2",l).attr("y1",0).attr("y2",p||(a?Se.height.proportional:Se.height.default));const f=r.selectAll("rect.value").data(h),v=o!=null&&!n.model.isUserProvidedColorScaleValid()&&!a?`value status--${o}`:"value";f.enter().append("rect").classed("value",!0).merge(f).attr("x",x=>x.x).attr("y",0).attr("height",()=>p||(a?Se.height.proportional:Se.height.default)).attr("class",x=>this.model.getColorClassName({classNameTypes:[mt.FILL],dataGroupName:x[c],originalClassName:v})).transition().call(x=>this.services.transitions.setupTransition({transition:x,name:"meter-bar-update",animate:t})).attr("width",x=>x.value>u?d(u):Math.max(x.width,2)).style("fill",x=>n.model.getFillColor(x[c],null,x)).attr("role",Tt.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",x=>x.value),f.exit().remove();const m=_(i,"meter","peak");let y=m;m!==null&&(m>u?y=u:m<0&&(y=0));const g=r.selectAll("line.peak").data(y==null?[]:[y]);g.enter().append("line").classed("peak",!0).merge(g).attr("y1",0).attr("y2",()=>p||(a?Se.height.proportional:Se.height.default)).transition().call(x=>this.services.transitions.setupTransition({transition:x,name:"peak-line-update",animate:t})).attr("x1",x=>d(x)).attr("x2",x=>d(x)).attr("role",Tt.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",x=>x),g.exit().remove(),this.services.domUtils.setSVGMaxHeight(),this.addEventListeners()}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this,i=_(t,"meter","proportional");this.parent.selectAll("rect.value").on("mouseover",function(a,s){const o=U(this);r.services.events.dispatchEvent(w.Meter.METER_MOUSEOVER,{event:a,element:o,datum:s}),i&&(o.classed("hovered",!0),r.services.events.dispatchEvent(w.Tooltip.SHOW,{event:a,hoveredElement:o,items:[{label:s[n],value:s.value}]}))}).on("mousemove",function(a,s){const o=U(this);r.services.events.dispatchEvent(w.Meter.METER_MOUSEMOVE,{event:a,element:o,datum:s}),i&&r.services.events.dispatchEvent(w.Tooltip.MOVE,{event:a})}).on("click",function(a,s){r.services.events.dispatchEvent(w.Meter.METER_CLICK,{event:a,element:U(this),datum:s})}).on("mouseout",function(a,s){const o=U(this);r.services.events.dispatchEvent(w.Meter.METER_MOUSEOUT,{event:a,element:o,datum:s}),i&&(o.classed("hovered",!1),r.services.events.dispatchEvent(w.Tooltip.HIDE,{hoveredElement:o}))})}destroy(){this.parent.selectAll("rect.value").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null)}}class eI extends Mt{constructor(){super(...arguments),this.type="radar",this.renderType=ft.SVG,this.getLabelDimensions=t=>{const n=B.appendOrSelect(this.getComponentContainer(),"g.tmp-tick"),r=B.appendOrSelect(n,"text").text(t),{width:i,height:a}=B.getSVGElementSize(r.node(),{useBBox:!0});return n.remove(),{width:i,height:a}},this.normalizeFlatData=t=>{const n=this.getOptions(),{angle:r,value:i}=_(n,"radar","axes"),a=_(n,"data","groupMapsTo"),s=ZA(this.uniqueKeys.map(o=>this.uniqueGroups.map(l=>({[r]:o,[a]:l,[i]:null}))));return yt(s,t)},this.normalizeGroupedData=t=>{const n=this.getOptions(),{angle:r,value:i}=_(n,"radar","axes"),a=_(n,"data","groupMapsTo");return t.map(({name:s,data:o})=>{const l=this.uniqueKeys.map(c=>({[a]:s,[r]:c,[i]:null}));return{name:s,data:yt(l,o)}})},this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("g.blobs path").transition("legend-hover-blob").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-blob"})).style("fill-opacity",r=>r.name!==n.datum().name?Jr.opacity.unselected:Jr.opacity.selected).style("stroke-opacity",r=>r.name!==n.datum().name?Jr.opacity.unselected:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("g.blobs path").transition("legend-mouseout-blob").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-blob"})).style("fill-opacity",Jr.opacity.selected).style("stroke-opacity",1)}}init(){const{events:t}=this.services;t.addEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"radar graph"}),{width:r,height:i}=B.getSVGElementSize(n,{useAttrs:!0}),a=this.model.getData(),s=this.model.getGroupedData(),o=this.getOptions(),l=_(o,"data","groupMapsTo"),c=_(o,"radar","axes","value"),{angle:u,value:d}=_(o,"radar","axes"),{xLabelPadding:h,yLabelPadding:p,yTicksNumber:f,minRange:v,xAxisRectHeight:m}=Jr;this.uniqueKeys=Array.from(new Set(a.map(E=>E[u]))),this.uniqueGroups=Array.from(new Set(a.map(E=>E[l]))),this.fullDataNormalized=this.normalizeFlatData(a),this.groupedDataNormalized=this.normalizeGroupedData(s);const y=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+p),g=(Math.min(r,i)-y)/2;if(g<=0)return;const x=Xa().domain(this.fullDataNormalized.map(E=>E[u])).range([0,2*Math.PI].map(E=>E-Math.PI/2)),O=br(this.fullDataNormalized.map(E=>E[d])),T=On().domain([O>=0?0:O,qr(this.fullDataNormalized.map(E=>E[d]))]).range([v,g]).nice(f),S=T.ticks(f),D=(E,L,$)=>this.model.getFillColor(E,L,$),P=$L().angle(E=>x(E[u])+Math.PI/2).radius(E=>T(E[d])).curve(Om),I=this.uniqueKeys.map(E=>{const L=this.getLabelDimensions(E).width,$=tA(x(E),g);return L+$}),N={x:qr(I)+h,y:i/2},M=B.appendOrSelect(n,"g.y-axes").attr("role",Tt.GROUP).selectAll("path").data(S,E=>E),q=E=>this.uniqueKeys.map(L=>({[u]:L,[d]:E}));M.join(E=>E.append("path").attr("opacity",0).attr("transform",`translate(${N.x}, ${N.y})`).attr("fill","none").call(L=>L.transition().call($=>this.services.transitions.setupTransition({transition:$,name:"radar_y_axes_enter",animate:t})).attr("opacity",1).attr("d",$=>P(q($)))),E=>E.call(L=>L.transition().call($=>this.services.transitions.setupTransition({transition:$,name:"radar_y_axes_update",animate:t})).attr("opacity",1).attr("transform",`translate(${N.x}, ${N.y})`).attr("d",$=>P(q($)))),E=>E.call(L=>L.transition().call($=>this.services.transitions.setupTransition({transition:$,name:"radar_y_axes_exit",animate:t})).attr("d",$=>P(q($))).attr("opacity",0).remove())),B.appendOrSelect(n,"g.x-axes").attr("role",Tt.GROUP).selectAll("line").data(this.uniqueKeys,E=>E).join(E=>E.append("line").attr("opacity",0).attr("class",L=>`x-axis-${Xi(L)}`).attr("stroke-dasharray","0").attr("x1",L=>ce(x(L),0,N).x).attr("y1",L=>ce(x(L),0,N).y).attr("x2",L=>ce(x(L),0,N).x).attr("y2",L=>ce(x(L),0,N).y).call(L=>L.transition().call($=>this.services.transitions.setupTransition({transition:$,name:"radar_x_axes_enter",animate:t})).attr("opacity",1).attr("x1",$=>ce(x($),T.range()[0],N).x).attr("y1",$=>ce(x($),T.range()[0],N).y).attr("x2",$=>ce(x($),T.range()[1],N).x).attr("y2",$=>ce(x($),T.range()[1],N).y)),E=>E.call(L=>L.transition().call($=>this.services.transitions.setupTransition({transition:$,name:"radar_x_axes_update",animate:t})).attr("opacity",1).attr("x1",$=>ce(x($),T.range()[0],N).x).attr("y1",$=>ce(x($),T.range()[0],N).y).attr("x2",$=>ce(x($),T.range()[1],N).x).attr("y2",$=>ce(x($),T.range()[1],N).y)),E=>E.call(L=>L.transition().call($=>this.services.transitions.setupTransition({transition:$,name:"radar_x_axes_exit",animate:t})).attr("opacity",0).remove())),B.appendOrSelect(n,"g.x-labels").attr("role",Tt.GROUP).selectAll("text").data(this.uniqueKeys).join(E=>E.append("text").text(L=>L).attr("opacity",0).attr("x",L=>ce(x(L),T.range()[1]+h,N).x).attr("y",L=>ce(x(L),T.range()[1]+h,N).y).style("text-anchor",L=>Bm(x(L)).textAnchor).style("dominant-baseline",L=>Bm(x(L)).dominantBaseline).call(L=>L.transition().call($=>this.services.transitions.setupTransition({transition:$,name:"radar_x_labels_enter",animate:t})).attr("opacity",1)),E=>E.call(L=>L.transition().call($=>this.services.transitions.setupTransition({transition:$,name:"radar_x_labels_update",animate:t})).attr("opacity",1).attr("x",$=>ce(x($),T.range()[1]+h,N).x).attr("y",$=>ce(x($),T.range()[1]+h,N).y).end().finally(()=>{const $=_(o,"radar","alignment"),V=this.getAlignmentXOffset($,n,this.getParent());n.attr("x",V)})),E=>E.call(L=>L.transition().call($=>this.services.transitions.setupTransition({transition:$,name:"radar_x_labels_exit",animate:t})).attr("opacity",0).remove())),B.appendOrSelect(n,"g.blobs").attr("role",Tt.GROUP).selectAll("path").data(this.groupedDataNormalized,E=>E.name).join(E=>E.append("path").attr("class",L=>this.model.getColorClassName({classNameTypes:[mt.FILL,mt.STROKE],dataGroupName:L.name,originalClassName:"blob"})).attr("role",Tt.GRAPHICS_SYMBOL).attr("aria-label",L=>L.name).attr("opacity",0).attr("transform",t?()=>`translate(${N.x}, ${N.y}) scale(${1+Math.random()*.35})`:`translate(${N.x}, ${N.y})`).style("fill",L=>D(L.name,null,L.data)).style("fill-opacity",Jr.opacity.selected).style("stroke",L=>D(L.name,null,L.data)).call(L=>{const $=L.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_blobs_enter",animate:t}));t&&$.delay(()=>Math.random()*30).attr("transform",`translate(${N.x}, ${N.y})`),$.attr("opacity",1).attr("d",V=>P(V.data))}),E=>(E.attr("class",L=>this.model.getColorClassName({classNameTypes:[mt.FILL,mt.STROKE],dataGroupName:L.name,originalClassName:"blob"})).style("fill",L=>D(L.name,null,L.data)).style("stroke",L=>D(L.name,null,L.data)),E.call(L=>L.transition().call($=>this.services.transitions.setupTransition({transition:$,name:"radar_blobs_update",animate:t})).attr("opacity",1).attr("transform",`translate(${N.x}, ${N.y})`).attr("d",$=>P($.data))),E),E=>E.call(L=>{const $=L.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_blobs_exit",animate:t}));t&&$.delay(()=>Math.random()*30).attr("transform",()=>`translate(${N.x}, ${N.y}) scale(${1+Math.random()*.35})`),$.attr("opacity",0).remove()})),B.appendOrSelect(n,"g.dots").attr("role",Tt.GROUP).selectAll("circle").data(this.fullDataNormalized.filter(E=>_(E,d)!==null)).join(E=>E.append("circle").attr("role",Tt.GRAPHICS_SYMBOL).attr("aria-label",L=>L[c]),E=>E,E=>E.remove()).attr("class",E=>this.model.getColorClassName({classNameTypes:[mt.FILL],dataGroupName:E[l],originalClassName:Xi(E[u])})).attr("cx",E=>ce(x(E[u]),T(E[d]),N).x).attr("cy",E=>ce(x(E[u]),T(E[d]),N).y).attr("r",0).attr("opacity",0).style("fill",E=>D(E[l])),B.appendOrSelect(n,"g.x-axes-rect").attr("role",Tt.GROUP).selectAll("rect").data(this.uniqueKeys).join(E=>E.append("rect"),E=>E,E=>E.remove()).attr("x",N.x).attr("y",N.y-m/2).attr("width",T.range()[1]).attr("height",m).style("fill","red").style("fill-opacity",0).attr("transform",E=>`rotate(${Hm(x(E))}, ${N.x}, ${N.y})`);const{code:H,number:G}=_(o,"locale");B.appendOrSelect(n,"g.y-labels").attr("role",Tt.GROUP).selectAll("text").data(xn(S)).join(E=>E.append("text").attr("opacity",0).text(L=>G(L,H)).attr("x",L=>ce(-Math.PI/2,T(L),N).x+p).attr("y",L=>ce(-Math.PI/2,T(L),N).y).style("text-anchor","start").style("dominant-baseline","middle").call(L=>L.transition().call($=>this.services.transitions.setupTransition({transition:$,name:"radar_y_labels_enter",animate:t})).attr("opacity",1)),E=>E.call(L=>L.transition().call($=>this.services.transitions.setupTransition({transition:$,name:"radar_y_labels_update",animate:t})).text($=>$).attr("opacity",1).attr("x",$=>ce(-Math.PI/2,T($),N).x+p).attr("y",$=>ce(-Math.PI/2,T($),N).y)),E=>E.call(L=>L.transition().call($=>this.services.transitions.setupTransition({transition:$,name:"radar_y_labels_exit",animate:t})).attr("opacity",0).remove())),this.addEventListeners()}getAlignmentXOffset(t,n,r){const i=B.getSVGElementSize(n,{useBBox:!0}),{width:a}=B.getSVGElementSize(r,{useAttrs:!0});let s=0;return t===me.CENTER?s=Math.floor((a-i.width)/2):t===me.RIGHT&&(s=a-i.width),s}destroy(){this.parent.selectAll(".x-axes-rect > rect").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}addEventListeners(){const t=this,{axes:{angle:n}}=_(this.getOptions(),"radar");this.parent.selectAll(".x-axes-rect > rect").on("mouseover",function(r,i){const a=U(this);t.services.events.dispatchEvent(w.Radar.X_AXIS_MOUSEOVER,{event:r,element:a,datum:i});const s=t.parent.select(`.x-axes .x-axis-${Xi(i)}`),o=t.parent.selectAll(`.dots circle.${Xi(i)}`),l=t.model.getActiveDataGroupNames(),c=t.getOptions(),{groupMapsTo:u}=c.data,d=_(c,"radar","axes","value");s.classed("hovered",!0).attr("stroke-dasharray","4 4"),o.classed("hovered",!0).attr("opacity",p=>l.indexOf(p[u])!==-1?1:0).attr("r",Jr.dotsRadius);const h=t.fullDataNormalized.filter(p=>p[n]===i&&l.indexOf(p[u])!==-1);t.services.events.dispatchEvent(w.Tooltip.SHOW,{event:r,hoveredElement:a,items:h.filter(p=>typeof p[d]=="number").map(p=>({label:p[u],value:p[d],color:t.model.getFillColor(p[u],null,p),class:t.model.getColorClassName({classNameTypes:[mt.TOOLTIP],dataGroupName:p[u]})}))})}).on("mousemove",function(r,i){const a=U(this);t.services.events.dispatchEvent(w.Radar.X_AXIS_MOUSEMOVE,{event:r,element:a,datum:i}),t.services.events.dispatchEvent(w.Tooltip.MOVE,{event:r})}).on("click",function(r,i){t.services.events.dispatchEvent(w.Radar.X_AXIS_CLICK,{event:r,element:U(this),datum:i})}).on("mouseout",function(r,i){const a=U(this),s=t.parent.select(`.x-axes .x-axis-${Xi(i)}`),o=t.parent.selectAll(`.dots circle.${Xi(i)}`);s.classed("hovered",!1).attr("stroke-dasharray","0"),o.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(w.Radar.X_AXIS_MOUSEOUT,{event:r,element:a,datum:i}),t.services.events.dispatchEvent(w.Tooltip.HIDE)})}}class e0 extends Th{constructor(){super(...arguments),this.type="simple-bar",this.renderType=ft.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-simple-bar"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-simple-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.getComponentContainer({ariaLabel:"bar graphs",withinChartClip:!0}),a=this.model.getDisplayData(this.configs.groups),s=this.services.cartesianScales.getOrientation(),o=i.selectAll("path.bar").data(a,l=>l[r]);o.exit().attr("opacity",0).remove(),o.enter().append("path").attr("opacity",0).merge(o).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition().call(l=>this.services.transitions.setupTransition({transition:l,name:"bar-update-enter",animate:t})).attr("class",l=>this.model.getColorClassName({classNameTypes:[mt.FILL],dataGroupName:l[r],originalClassName:"bar"})).style("fill",l=>{const c=this.services.cartesianScales.getDomainIdentifier(l);return this.model.getFillColor(l[r],l[c],l)}).attr("d",l=>{const c=this.services.cartesianScales.getRangeIdentifier(),u=this.getBarWidth(),d=l[c],h=this.services.cartesianScales.getDomainValue(l)-u/2,p=h+u;let f,v;if(Array.isArray(d)&&d.length===2)f=this.services.cartesianScales.getRangeValue(d[0]),v=this.services.cartesianScales.getRangeValue(d[1]);else{const y=this.services.cartesianScales.getRangeScale().domain()[0];f=this.services.cartesianScales.getRangeValue(Math.max(0,y)),v=this.services.cartesianScales.getRangeValue(l)}const m=Math.abs(v-f);if(m!==0&&m<2&&(d>0&&s===fe.VERTICAL||d<0&&s===fe.HORIZONTAL?v=f-2:v=f+2),!this.isOutsideZoomedDomain(h,p))return De({x0:h,x1:p,y0:f,y1:v},s)}).attr("opacity",1).attr("role",Tt.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",l=>l.value),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("path.bar").on("mouseover",function(n,r){const i=U(this);i.classed("hovered",!0),t.services.events.dispatchEvent(w.Bar.BAR_MOUSEOVER,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(w.Tooltip.SHOW,{event:n,hoveredElement:i,data:[r]})}).on("mousemove",function(n,r){t.services.events.dispatchEvent(w.Bar.BAR_MOUSEMOVE,{event:n,element:U(this),datum:r}),t.services.events.dispatchEvent(w.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(w.Bar.BAR_CLICK,{event:n,element:U(this),datum:r})}).on("mouseout",function(n,r){const i=U(this);i.classed("hovered",!1),t.services.events.dispatchEvent(w.Bar.BAR_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(w.Tooltip.HIDE,{hoveredElement:i})})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class nI extends Ue{constructor(){super(...arguments),this.type="skeleton-lines"}render(t=!0){const n=_(this.getOptions(),"data","loading"),r=!_(this.getOptions(),"grid","x","enabled")&&!_(this.getOptions(),"grid","y","enabled")&&!_(this.getOptions(),"axes","bottom","visible")&&!_(this.getOptions(),"axes","left","visible");n&&!r?super.renderGridSkeleton(n):n&&r?this.renderSparklineSkeleton(n):this.removeSkeleton()}renderSparklineSkeleton(t){this.setScales(),this.drawBackdrop(t),this.drawSparkline(t),this.updateBackdropStyle(),t&&this.setShimmerEffect("shimmer-lines")}drawSparkline(t){const n=this.backdrop.attr("width"),r=[100],i=B.appendOrSelect(this.backdrop,"g.y.skeleton"),a=i.selectAll("line").data(r);a.enter().append("line").merge(a).attr("x1",0).attr("x2",n).attr("y1",s=>s).attr("y2",s=>s),i.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}updateBackdropStyle(){const t=this.parent;this.backdrop=B.appendOrSelect(t,"svg.chart-skeleton.DAII"),B.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)}}class n0 extends Mt{constructor(){super(...arguments),this.type="area-stacked",this.renderType=ft.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("path.area").transition("legend-hover-area").call(a=>this.services.transitions.setupTransition({transition:a,name:"legend-hover-area"})).attr("opacity",a=>_(a,0,i)!==n.datum().name?nr.opacity.unselected:nr.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.area").transition("legend-mouseout-area").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-area"})).attr("opacity",nr.opacity.selected)}}init(){const t=this.services.events;t.addEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"stacked area graphs",withinChartClip:!0}),r=this,i=this.getOptions(),{groupMapsTo:a}=i.data,s=Object.keys(i.axes).some(p=>i.axes[p].percentage),o=this.model.getStackedData({percentage:s,groups:this.configs.groups}),l=_(o,0,0),c=this.services.cartesianScales.getDomainAxisPosition({datum:l}),u=this.services.cartesianScales.getRangeAxisPosition({datum:l}),d=this.services.cartesianScales.getScaleByPosition(u),h=n.selectAll("path.area").data(o,p=>_(p,0,a));this.areaGenerator=sh().x(p=>this.services.cartesianScales.getValueThroughAxisPosition(c,p.data.sharedStackKey)).y0(p=>d(p[0])).y1(p=>d(p[1])).curve(this.services.curves.getD3Curve()),h.exit().attr("opacity",0).remove(),h.enter().append("path").attr("opacity",0).merge(h).data(o,p=>_(p,0,a)).attr("class","area").attr("class",p=>this.model.getColorClassName({classNameTypes:[mt.FILL],dataGroupName:_(p,0,a),originalClassName:"area"})).style("fill",p=>r.model.getFillColor(_(p,0,a),null,p)).attr("role",Tt.GRAPHICS_SYMBOL).attr("aria-roledescription","area").attr("aria-label",p=>_(p,0,a)).transition().call(p=>this.services.transitions.setupTransition({transition:p,name:"area-update-enter",animate:t})).attr("opacity",nr.opacity.selected).attr("d",this.areaGenerator)}}class r0 extends Th{constructor(){super(...arguments),this.type="stacked-bar",this.renderType=ft.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.model.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-bar"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer({ariaLabel:"stacked bar graphs",withinChartClip:!0}),r=this.getOptions(),{groupMapsTo:i}=r.data,a=this.model.getStackedData({groups:this.configs.groups,divergent:!0}),s=this.model.getActiveDataGroupNames(),o=n.selectAll("g.bars").data(a,c=>_(c,0,i));o.exit().attr("opacity",0).remove(),o.enter().append("g").classed("bars",!0).attr("role",Tt.GROUP).attr("data-name","bars");const l=n.selectAll("g.bars").selectAll("path.bar").data(c=>c,c=>c.data.sharedStackKey);l.exit().remove(),l.enter().append("path").merge(l).classed("bar",!0).transition().call(c=>this.services.transitions.setupTransition({transition:c,name:"bar-update-enter",animate:t})).attr("class",c=>this.model.getColorClassName({classNameTypes:[mt.FILL],dataGroupName:c[i],originalClassName:"bar"})).style("fill",c=>this.model.getFillColor(c[i],c.data.sharedStackKey,c.data)).attr("d",c=>{const u=c.data.sharedStackKey,d=this.getBarWidth(),h=this.services.cartesianScales.getDomainValue(u)-d/2,p=h+d,f=this.services.cartesianScales.getRangeValue(c[0]);let v=this.services.cartesianScales.getRangeValue(c[1]);if(!this.isOutsideZoomedDomain(h,p)){if(Math.abs(v-f)>0&&Math.abs(v-f)>r.bars.dividerSize){const m=c[0]<0&&c[1]<=0;m&&s.length>1?this.services.cartesianScales.getOrientation()===fe.VERTICAL?v+=c[1]===0?2:1:v-=1:m||(this.services.cartesianScales.getOrientation()===fe.VERTICAL?v+=1:v-=1)}return De({x0:h,x1:p,y0:f,y1:v},this.services.cartesianScales.getOrientation())}}).attr("opacity",1).attr("role",Tt.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",c=>c[1]-c[0]),this.addEventListeners()}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this;this.parent.selectAll("path.bar").on("mouseover",function(i,a){const s=U(this);s.classed("hovered",!0),r.services.events.dispatchEvent(w.Bar.BAR_MOUSEOVER,{event:i,element:s,datum:a});let o=r.model.getDisplayData(r.configs.groups).find(l=>{const c=r.services.cartesianScales.getDomainIdentifier(l),u=r.services.cartesianScales.getRangeIdentifier(l);return l[u]===a.data[a[n]]&&l[c].toString()===a.data.sharedStackKey&&l[n]===a[n]});if(o===void 0){const l=r.services.cartesianScales.getDomainIdentifier(),c=r.services.cartesianScales.getRangeIdentifier();o={[l]:a.data.sharedStackKey,[c]:a.data[a[n]],[n]:a[n]}}r.services.events.dispatchEvent(w.Tooltip.SHOW,{event:i,hoveredElement:s,data:[o]})}).on("mousemove",function(i,a){const s=U(this);r.services.events.dispatchEvent(w.Bar.BAR_MOUSEMOVE,{event:i,element:s,datum:a}),r.services.events.dispatchEvent(w.Tooltip.MOVE,{event:i})}).on("click",function(i,a){r.services.events.dispatchEvent(w.Bar.BAR_CLICK,{event:i,element:U(this),datum:a})}).on("mouseout",function(i,a){const s=U(this);s.classed("hovered",!1),r.services.events.dispatchEvent(w.Bar.BAR_MOUSEOUT,{event:i,element:s,datum:a}),r.services.events.dispatchEvent(w.Tooltip.HIDE,{hoveredElement:s})})}getBarWidth(){const t=this.getOptions();if(_(t,"bars","width"))return t.bars.width;const n=this.services.cartesianScales.getMainXScale(),r=B.getSVGElementSize(this.parent,{useAttrs:!0}).width,i=this.model.getStackKeys().length,a=_(t,"bars","spacingFactor");return n.step?Math.min(t.bars.maxWidth,n.step()/2):Math.min(t.bars.maxWidth,r*a/i)}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class i0 extends zn{constructor(){super(...arguments),this.type="scatter-stacked",this.renderType=ft.SVG}render(t){if(!_(this.getOptions(),"points","enabled"))return;const n=this.getComponentContainer({ariaLabel:"scatter points",withinChartClip:!0}),r=this.getOptions(),{groupMapsTo:i}=r.data,a=Object.keys(r.axes).some(u=>r.axes[u].percentage),s=this.model.getStackedData({groups:this.configs.groups,percentage:a}),o=n.selectAll("g.dots").data(s,u=>_(u,0,i));o.exit().attr("opacity",0).remove();const l=o.enter().append("g").classed("dots",!0).attr("role",Tt.GROUP).merge(o).selectAll("circle.dot").data(u=>u);l.exit().attr("opacity",0).remove();const c=l.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(l).datum(u=>{const d=u[i],h=this.services.cartesianScales.getDomainIdentifier(u),p=this.services.cartesianScales.getRangeIdentifier(u);return{[i]:d,[h]:u.data.sharedStackKey,[p]:u[1]}});this.styleCircles(c,t),this.addEventListeners()}getTooltipData(t,n){const r=this.getOptions(),{groupMapsTo:i}=r.data,a=Object.keys(r.axes).some(l=>r.axes[l].percentage),s=this.model.getStackedData({groups:this.configs.groups,percentage:a}),o=[];return s.forEach((l,c)=>{l.forEach((u,d)=>{const h=u[i],p=u.data.sharedStackKey;let f=u.data[h];const v=u[1],m=this.services.cartesianScales.getDomainIdentifier(u),y=this.services.cartesianScales.getRangeIdentifier(u);f!=null&&t===this.services.cartesianScales.getDomainValue(p)&&n===this.services.cartesianScales.getRangeValue(v)&&(a&&(f=this.model.getStackedData({groups:this.configs.groups})[c][d].data[h]),f!==null&&o.push({[i]:h,[m]:p,[y]:f}))})}),this.model.getDisplayData(this.configs.groups).filter(l=>{const c=this.services.cartesianScales.getDomainIdentifier(l),u=this.services.cartesianScales.getRangeIdentifier(l);return o.find(d=>d[i]==l[i]&&d[c]==l[c]&&d[u]==l[u])!==void 0})}}const sa=6;class rI extends Mt{constructor(){super(...arguments),this.type="tree",this.renderType=ft.SVG}getLongestLabel(t){let n="";return t.forEach(r=>{const i=r.children?this.getLongestLabel(r.children):"";(i.length>n.length||r.name.length>n.length)&&(n=i.length>r.name.length?i:r.name)}),n}getMockLabelWidth(t,n){const r=t.append("text").attr("dy","0.31em").attr("x",0).attr("text-anchor","end").text(n),{width:i}=B.getSVGElementSize(r.node(),{useBBox:!0});return r.remove(),i}render(t=!0){const n=this.getComponentContainer({ariaLabel:"tree diagram"});n.html("");const{width:r,height:i}=B.getSVGElementSize(this.parent,{useAttrs:!0});if(r<1||i<1)return;const a=this.model.getOptions(),s=this.model.getDisplayData(),o=_(a,"tree","rootTitle")||"Tree",l=this.getMockLabelWidth(n,o),c=this.getLongestLabel(s),u=this.getMockLabelWidth(n,c),d={top:0,right:0,bottom:0,left:l>0?l+sa:30-sa},h=ps({name:o,children:s}),p=10,f=r/6,v=S=>{const D=h.descendants().reverse(),P=h.links();let I=h,N=h;h.eachBefore(V=>{V.x<I.x&&(I=V),V.x>N.x&&(N=V)});const M=N.x-I.x,q=n.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"tree-update-viewbox",animate:!0})).attr("viewBox",[-d.left,I.x,r,M].join(" ")),H=T.selectAll("g").data(D,V=>V.id),G=this,E=H.enter().append("g").attr("transform",()=>`translate(${S.y0},${S.x0})`).attr("class",V=>V.depth!==0&&V.children&&V.children.length>0?"clickable":null).on("mouseover",function(V,F){G.services.events.dispatchEvent(w.Tree.NODE_MOUSEOVER,{event:V,element:U(this),datum:F})}).on("click",function(V,F){F.depth!==0&&(F.children=F.children?null:F._children,v(F)),G.services.events.dispatchEvent(w.Tree.NODE_CLICK,{event:V,element:U(this),datum:F})}).on("mouseout",function(V,F){G.services.events.dispatchEvent(w.Tree.NODE_MOUSEOUT,{event:V,element:U(this),datum:F})});E.append("circle").attr("r",2.5).attr("class",V=>V._children?"parent":"child").attr("stroke-width",10),E.append("text").attr("dy","0.31em").attr("x",V=>V._children?-sa:sa).attr("text-anchor",V=>V._children?"end":"start").text(V=>V.data.name).clone(!0).attr("class","text-stroke").lower(),H.merge(E).transition(q).attr("transform",V=>`translate(${V.y},${V.x})`).attr("fill-opacity",1).attr("stroke-opacity",1),H.exit().transition(q).remove().attr("transform",()=>`translate(${S.y},${S.x})`).attr("fill-opacity",0).attr("stroke-opacity",0);const L=O.selectAll("path").data(P,V=>V.target.id),$=L.enter().append("path").attr("d",()=>{const V={x:S.x0,y:S.y0};return x({source:V,target:V})});L.merge($).transition(q).attr("d",x),L.exit().transition(q).remove().attr("d",()=>{const V={x:S.x,y:S.y};return x({source:V,target:V})}),h.eachBefore(V=>{V.x0=V.x,V.y0=V.y})},m=h.descendants(),y=m[m.length-1].depth,g=_(a,"tree","type")===Rs.DENDROGRAM?Tk().size([i,r-u-y*sa-l]):uL().nodeSize([p,f]).size([i,r-u-y*sa-l]),x=LL().x(S=>S.y).y(S=>S.x);h.x0=f/2,h.y0=0,h.descendants().forEach((S,D)=>{S.id=D,S._children=S.children}),g(h),n.attr("viewBox",[-d.left,-d.top,r,p]).style("user-select","none");const O=n.append("g").attr("class","links"),T=n.append("g").attr("class","nodes");v(h)}}var iI="#000000",aI="#ffffff",sI="#fcf4d6",oI="#fddc69",lI="#f1c21b",cI="#d2a106",uI="#b28600",hI="#8e6a00",dI="#684e00",pI="#483700",fI="#302400",mI="#1c1500",gI={10:sI,20:oI,30:lI,40:cI,50:uI,60:hI,70:dI,80:pI,90:fI,100:mI},vI="#fff2e8",yI="#ffd9be",bI="#ffb784",_I="#ff832b",xI="#eb6200",EI="#ba4e00",TI="#8a3800",OI="#5e2900",SI="#3e1a00",wI="#231000",$I={10:vI,20:yI,30:bI,40:_I,50:xI,60:EI,70:TI,80:OI,90:SI,100:wI},CI="#fff1f1",MI="#ffd7d9",AI="#ffb3b8",RI="#ff8389",kI="#fa4d56",LI="#da1e28",DI="#a2191f",II="#750e13",NI="#520408",PI="#2d0709",UI={10:CI,20:MI,30:AI,40:RI,50:kI,60:LI,70:DI,80:II,90:NI,100:PI},BI="#fff0f7",HI="#ffd6e8",VI="#ffafd2",FI="#ff7eb6",GI="#ee5396",zI="#d02670",jI="#9f1853",WI="#740937",YI="#510224",qI="#2a0a18",XI={10:BI,20:HI,30:VI,40:FI,50:GI,60:zI,70:jI,80:WI,90:YI,100:qI},ZI="#f6f2ff",KI="#e8daff",QI="#d4bbff",JI="#be95ff",tN="#a56eff",eN="#8a3ffc",nN="#6929c4",rN="#491d8b",iN="#31135e",aN="#1c0f30",sN={10:ZI,20:KI,30:QI,40:JI,50:tN,60:eN,70:nN,80:rN,90:iN,100:aN},oN="#edf5ff",lN="#d0e2ff",cN="#a6c8ff",uN="#78a9ff",hN="#4589ff",dN="#0f62fe",pN="#0043ce",fN="#002d9c",mN="#001d6c",gN="#001141",vN={10:oN,20:lN,30:cN,40:uN,50:hN,60:dN,70:pN,80:fN,90:mN,100:gN},yN="#e5f6ff",bN="#bae6ff",_N="#82cfff",xN="#33b1ff",EN="#1192e8",TN="#0072c3",ON="#00539a",SN="#003a6d",wN="#012749",$N="#061727",CN={10:yN,20:bN,30:_N,40:xN,50:EN,60:TN,70:ON,80:SN,90:wN,100:$N},MN="#d9fbfb",AN="#9ef0f0",RN="#3ddbd9",kN="#08bdba",LN="#009d9a",DN="#007d79",IN="#005d5d",NN="#004144",PN="#022b30",UN="#081a1c",BN={10:MN,20:AN,30:RN,40:kN,50:LN,60:DN,70:IN,80:NN,90:PN,100:UN},HN="#defbe6",VN="#a7f0ba",FN="#6fdc8c",GN="#42be65",zN="#24a148",jN="#198038",WN="#0e6027",YN="#044317",qN="#022d0d",XN="#071908",ZN={10:HN,20:VN,30:FN,40:GN,50:zN,60:jN,70:WN,80:YN,90:qN,100:XN},KN="#f2f4f8",QN="#dde1e6",JN="#c1c7cd",tP="#a2a9b0",eP="#878d96",nP="#697077",rP="#4d5358",iP="#343a3f",aP="#21272a",sP="#121619",oP={10:KN,20:QN,30:JN,40:tP,50:eP,60:nP,70:rP,80:iP,90:aP,100:sP},lP="#f4f4f4",cP="#e0e0e0",uP="#c6c6c6",hP="#a8a8a8",dP="#8d8d8d",pP="#6f6f6f",fP="#525252",mP="#393939",gP="#262626",vP="#161616",yP={10:lP,20:cP,30:uP,40:hP,50:dP,60:pP,70:fP,80:mP,90:gP,100:vP},bP="#f7f3f2",_P="#e5e0df",xP="#cac5c4",EP="#ada8a8",TP="#8f8b8b",OP="#726e6e",SP="#565151",wP="#3c3838",$P="#272525",CP="#171414",MP={10:bP,20:_P,30:xP,40:EP,50:TP,60:OP,70:SP,80:wP,90:$P,100:CP},a0={black:{100:iI},blue:vN,coolGray:oP,cyan:CN,gray:yP,green:ZN,magenta:XI,orange:$I,purple:sN,red:UI,teal:BN,warmGray:MP,white:{0:aI},yellow:gI};const AP=e=>{if(!e)return null;for(const t of Object.keys(a0)){const n=a0[t];for(const r of Object.keys(n))if(n[+r]===e)return r}return null},s0=function(e){const t=U(this.parentNode).select("rect.leaf"),n=e.backgroundColor??getComputedStyle(t.node(),null).getPropertyValue("fill"),r=Jn(n);let i;if(r&&(i=AP(r?r.hex():null)),i==null){const a=Vp(r).l;i=Math.abs(a*100-100)}return i>50?"white":"black"};let RP=0;class kP extends Mt{constructor(){super(...arguments),this.type="treemap",this.renderType=ft.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("g[data-name='leaf']").transition("legend-hover-treemap").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-treemap"})).attr("opacity",r=>r.parent.data.name===n.datum().name?1:.3)},this.handleLegendMouseOut=()=>{this.parent.selectAll("g[data-name='leaf']").transition("legend-mouseout-treemap").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-treemap"})).attr("opacity",1)}}init(){const{events:t}=this.services;t.addEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"treemap"});this.model.getData();const r=this.model.getDisplayData(),i=this.model.getOptions(),a=_(window,"location"),{width:s,height:o}=B.getSVGElementSize(n,{useAttrs:!0}),l=ps({name:i.title||"Treemap",children:r}).sum(p=>p.value).sort((p,f)=>f.value-p.value),c=mL().size([s,o]).paddingInner(1).paddingOuter(0).round(!0)(l),u=n.selectAll("g[data-name='leaf']").data(c.leaves(),p=>p.data.name);u.exit().attr("opacity",0).remove();const d=u.enter().append("g").attr("data-name","leaf").attr("data-uid",()=>RP++).merge(u);d.attr("data-name","leaf").transition().call(p=>this.services.transitions.setupTransition({transition:p,name:"treemap-group-update",animate:t})).attr("transform",p=>`translate(${p.x0},${p.y0})`);const h=d.selectAll("rect.leaf").data(p=>[p]);h.exit().attr("width",0).attr("height",0).remove(),h.enter().append("rect").classed("leaf",!0).merge(h).attr("width",0).attr("height",0).attr("id",function(){const p=U(this.parentNode).attr("data-uid");return`${i.style.prefix}-leaf-${p}`}).attr("class",p=>{for(;p.depth>1;)p=p.parent;return this.model.getColorClassName({classNameTypes:[mt.FILL],dataGroupName:p.data.name,originalClassName:"leaf"})}).transition().call(p=>this.services.transitions.setupTransition({transition:p,name:"treemap-leaf-update-enter",animate:t})).attr("width",p=>p.x1-p.x0).attr("height",p=>p.y1-p.y0).style("fill",p=>{for(;p.depth>1;)p=p.parent;return this.model.getFillColor(p.data.name,null,p.data)}),d.selectAll("clipPath").data(p=>p.data.showLabel!==!0?[]:[1],p=>p).join(p=>p.append("clipPath").attr("id",function(){const f=U(this.parentNode).attr("data-uid");return`${i.style.prefix}-clip-${f}`}).append("use").attr("xlink:href",function(){const f=U(this.parentNode.parentNode).attr("data-uid"),v=`${i.style.prefix}-leaf-${f}`;return new URL(`#${v}`,a)+""}),p=>null,p=>p.remove()),d.selectAll("text").data(p=>{if(p.data.showLabel!==!0)return[];let f=p;for(;f.depth>1;)f=f.parent;return[{text:p.data.name,backgroundColor:this.model.getFillColor(f.data.name)}]},p=>p).join(p=>{const f=p.append("text").text(v=>v.text).style("fill",s0).attr("x",7).attr("y",18);return a&&f.attr("clip-path",function(){const v=U(this.parentNode).attr("data-uid"),m=`${i.style.prefix}-clip-${v}`;return`url(${new URL(`#${m}`,a)+""})`}),f},p=>p.text(f=>f.text).style("fill",s0),p=>p.remove()),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("rect.leaf").on("mouseover",function(n,r){const i=U(this);let a=getComputedStyle(this,null).getPropertyValue("fill"),s=r;for(;s.depth>1;)s=s.parent;i.transition("graph_element_mouseover_fill_update").call(o=>t.services.transitions.setupTransition({transition:o,name:"graph_element_mouseover_fill_update"})).style("fill",o=>{const l=t.model.getFillColor(o.parent.data.name,null,o.data);return l&&(a=l),Jn(a).darker(.7).toString()}),t.services.events.dispatchEvent(w.Tooltip.SHOW,{event:n,hoveredElement:i,items:[{color:a,label:s.data.name,bold:!0},{label:r.data.name,value:r.data.value}]}),t.services.events.dispatchEvent(w.Treemap.LEAF_MOUSEOVER,{event:n,element:i,datum:r})}).on("mousemove",function(n,r){const i=U(this);t.services.events.dispatchEvent(w.Treemap.LEAF_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(w.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(w.Treemap.LEAF_CLICK,{event:n,element:U(this),datum:r})}).on("mouseout",function(n,r){const i=U(this);i.classed("hovered",!1);let a=r;for(;a.depth>1;)a=a.parent;i.transition().call(s=>t.services.transitions.setupTransition({transition:s,name:"graph_element_mouseout_fill_update"})).style("fill",s=>t.model.getFillColor(s.parent.data.name,null,s.data)),t.services.events.dispatchEvent(w.Treemap.LEAF_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(w.Tooltip.HIDE,{hoveredElement:i})})}}function LP(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function DP(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var IP={value:function(){}};function o0(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new ml(n)}function ml(e){this._=e}function NP(e,t){return e.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&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}ml.prototype=o0.prototype={constructor:ml,on:function(e,t){var n=this._,r=NP(e+"",n),i,a=-1,s=r.length;if(arguments.length<2){for(;++a<s;)if((i=(e=r[a]).type)&&(i=PP(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<s;)if(i=(e=r[a]).type)n[i]=l0(n[i],e.name,t);else if(t==null)for(i in n)n[i]=l0(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ml(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function PP(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function l0(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=IP,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}const UP=Object.freeze(Object.defineProperty({__proto__:null,dispatch:o0},Symbol.toStringTag,{value:"Module"})),BP=DP(UP),HP=BP.dispatch,Oh=Math.PI/180,VP={archimedean:u0,rectangular:QP},Os=64,gl=2048;var FP=function(){var e=[256,256],t=GP,n=zP,r=jP,i=c0,a=c0,s=WP,o=YP,l=u0,c=[],u=1/0,d=HP("word","end"),h=null,p=Math.random,f={},v=t3;f.canvas=function(g){return arguments.length?(v=$r(g),f):v},f.start=function(){var g=m(v()),x=JP((e[0]>>5)*e[1]),O=null,T=c.length,S=-1,D=[],P=c.map(function(N,M){return N.text=t.call(this,N,M),N.font=n.call(this,N,M),N.style=i.call(this,N,M),N.weight=a.call(this,N,M),N.rotate=s.call(this,N,M),N.size=~~r.call(this,N,M),N.padding=o.call(this,N,M),N}).sort(function(N,M){return M.size-N.size});return h&&clearInterval(h),h=setInterval(I,0),I(),f;function I(){for(var N=Date.now();Date.now()-N<u&&++S<T&&h;){var M=P[S];M.x=e[0]*(p()+.5)>>1,M.y=e[1]*(p()+.5)>>1,qP(g,M,P,S),M.hasText&&y(x,M,O)&&(D.push(M),d.call("word",f,M),O?ZP(O,M):O=[{x:M.x+M.x0,y:M.y+M.y0},{x:M.x+M.x1,y:M.y+M.y1}],M.x-=e[0]>>1,M.y-=e[1]>>1)}S>=T&&(f.stop(),d.call("end",f,D,O))}},f.stop=function(){h&&(clearInterval(h),h=null);for(const g of c)delete g.sprite;return f};function m(g){const x=g.getContext("2d",{willReadFrequently:!0});g.width=g.height=1;const O=Math.sqrt(x.getImageData(0,0,1,1).data.length>>2);return g.width=(Os<<5)/O,g.height=gl/O,x.fillStyle=x.strokeStyle="red",{context:x,ratio:O}}function y(g,x,O){e[0],e[1];for(var T=x.x,S=x.y,D=Math.sqrt(e[0]*e[0]+e[1]*e[1]),P=l(e),I=p()<.5?1:-1,N=-I,M,q,H;(M=P(N+=I))&&(q=~~M[0],H=~~M[1],!(Math.min(Math.abs(q),Math.abs(H))>=D));)if(x.x=T+q,x.y=S+H,!(x.x+x.x0<0||x.y+x.y0<0||x.x+x.x1>e[0]||x.y+x.y1>e[1])&&(!O||KP(x,O))&&!XP(x,g,e[0])){for(var G=x.sprite,E=x.width>>5,L=e[0]>>5,$=x.x-(E<<4),V=$&127,F=32-V,rt=x.y1-x.y0,A=(x.y+x.y0)*L+($>>5),j,et=0;et<rt;et++){j=0;for(var ct=0;ct<=E;ct++)g[A+ct]|=j<<F|(ct<E?(j=G[et*E+ct])>>>V:0);A+=L}return!0}return!1}return f.timeInterval=function(g){return arguments.length?(u=g??1/0,f):u},f.words=function(g){return arguments.length?(c=g,f):c},f.size=function(g){return arguments.length?(e=[+g[0],+g[1]],f):e},f.font=function(g){return arguments.length?(n=$r(g),f):n},f.fontStyle=function(g){return arguments.length?(i=$r(g),f):i},f.fontWeight=function(g){return arguments.length?(a=$r(g),f):a},f.rotate=function(g){return arguments.length?(s=$r(g),f):s},f.text=function(g){return arguments.length?(t=$r(g),f):t},f.spiral=function(g){return arguments.length?(l=VP[g]||g,f):l},f.fontSize=function(g){return arguments.length?(r=$r(g),f):r},f.padding=function(g){return arguments.length?(o=$r(g),f):o},f.random=function(g){return arguments.length?(p=g,f):p},f.on=function(){var g=d.on.apply(d,arguments);return g===d?f:g},f};function GP(e){return e.text}function zP(){return"serif"}function c0(){return"normal"}function jP(e){return Math.sqrt(e.value)}function WP(){return(~~(random()*6)-3)*30}function YP(){return 1}function qP(e,t,n,r){if(!t.sprite){var i=e.context,a=e.ratio;i.clearRect(0,0,(Os<<5)/a,gl/a);var s=0,o=0,l=0,c=n.length;for(--r;++r<c;){t=n[r],i.save(),i.font=t.style+" "+t.weight+" "+~~((t.size+1)/a)+"px "+t.font;const M=i.measureText(t.text),q=-Math.floor(M.width/2);let H=(M.width+1)*a,G=t.size<<1;if(t.rotate){var u=Math.sin(t.rotate*Oh),d=Math.cos(t.rotate*Oh),h=H*d,p=H*u,f=G*d,v=G*u;H=Math.max(Math.abs(h+v),Math.abs(h-v))+31>>5<<5,G=~~Math.max(Math.abs(p+f),Math.abs(p-f))}else H=H+31>>5<<5;if(G>l&&(l=G),s+H>=Os<<5&&(s=0,o+=l,l=0),o+G>=gl)break;i.translate((s+(H>>1))/a,(o+(G>>1))/a),t.rotate&&i.rotate(t.rotate*Oh),i.fillText(t.text,q,0),t.padding&&(i.lineWidth=2*t.padding,i.strokeText(t.text,q,0)),i.restore(),t.width=H,t.height=G,t.xoff=s,t.yoff=o,t.x1=H>>1,t.y1=G>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,s+=H}for(var m=i.getImageData(0,0,(Os<<5)/a,gl/a).data,y=[];--r>=0;)if(t=n[r],!!t.hasText){for(var g=t.width,x=g>>5,O=t.y1-t.y0,T=0;T<O*x;T++)y[T]=0;if(s=t.xoff,s==null)return;o=t.yoff;for(var S=0,D=-1,P=0;P<O;P++){for(var T=0;T<g;T++){var I=x*P+(T>>5),N=m[(o+P)*(Os<<5)+(s+T)<<2]?1<<31-T%32:0;y[I]|=N,S|=N}S?D=P:(t.y0++,O--,P--,o++)}t.y1=t.y0+D,t.sprite=y.slice(0,(t.y1-t.y0)*x)}}}function XP(e,t,n){n>>=5;for(var r=e.sprite,i=e.width>>5,a=e.x-(i<<4),s=a&127,o=32-s,l=e.y1-e.y0,c=(e.y+e.y0)*n+(a>>5),u,d=0;d<l;d++){u=0;for(var h=0;h<=i;h++)if((u<<o|(h<i?(u=r[d*i+h])>>>s:0))&t[c+h])return!0;c+=n}return!1}function ZP(e,t){var n=e[0],r=e[1];t.x+t.x0<n.x&&(n.x=t.x+t.x0),t.y+t.y0<n.y&&(n.y=t.y+t.y0),t.x+t.x1>r.x&&(r.x=t.x+t.x1),t.y+t.y1>r.y&&(r.y=t.y+t.y1)}function KP(e,t){return e.x+e.x1>t[0].x&&e.x+e.x0<t[1].x&&e.y+e.y1>t[0].y&&e.y+e.y0<t[1].y}function u0(e){var t=e[0]/e[1];return function(n){return[t*(n*=.1)*Math.cos(n),n*Math.sin(n)]}}function QP(e){var t=4,n=t*e[0]/e[1],r=0,i=0;return function(a){var s=a<0?-1:1;switch(Math.sqrt(1+4*s*a)-s&3){case 0:r+=n;break;case 1:i+=t;break;case 2:r-=n;break;default:i-=t;break}return[r,i]}}function JP(e){for(var t=[],n=-1;++n<e;)t[n]=0;return t}function t3(){return document.createElement("canvas")}function $r(e){return typeof e=="function"?e:function(){return e}}const e3=LP(FP);class n3 extends Mt{constructor(){super(...arguments),this.type="wordcloud",this.renderType=ft.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("text.word").transition("legend-hover-wordcloud").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-wordcloud"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("text.word").transition("legend-mouseout-wordcloud").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-wordcloud"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(w.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(w.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this,r=this.getComponentContainer({ariaLabel:"word cloud"}).attr("width","100%").attr("height","100%"),i=this.model.getDisplayData(),a=this.getFontSizeScale(i),s=this.getOptions(),{fontSizeMapsTo:o,wordMapsTo:l}=s.wordCloud,{groupMapsTo:c}=s.data,{width:u,height:d}=B.getSVGElementSize(r,{useAttrs:!0});if(u===0||d===0)return;const h=e3().size([u,d]).words(i.map(function(f){const v=f[o];if(typeof f[o]!="number")throw Error("Badly formatted WordCloud data. `value` should only be an integer or float");return{[c]:f[c],text:f[l],size:v,value:v}})).padding(5).rotate(0).fontSize(f=>a(f.size)).on("end",p);h.start();function p(f){const v=B.appendOrSelect(r,"g.words");v.attr("transform",`translate(${h.size()[0]/2}, ${h.size()[1]/2})`);const m=v.selectAll("text").data(f,y=>`${y[c]}-${y.text}`);m.exit().attr("opacity",0).remove(),m.enter().append("text").attr("opacity",0).merge(m).style("font-size",y=>`${y.size}px`).text(function(y){return y.text}).attr("class",y=>n.model.getColorClassName({classNameTypes:[mt.FILL],dataGroupName:y[c],originalClassName:`word ${y.size>32?"light":""}`})).style("fill",y=>n.model.getFillColor(y[c],y.text,y)).attr("text-anchor","middle").transition().call(y=>n.services.transitions.setupTransition({transition:y,name:"wordcloud-text-update-enter",animate:t})).attr("transform",y=>`translate(${y.x}, ${y.y})`).attr("opacity",1)}this.addEventListeners()}getFontSizeScale(t){const n=this.getOptions(),{fontSizeMapsTo:r}=n.wordCloud,i=t.map(l=>l[r]).filter(l=>l),a=B.getHTMLElementSize(this.services.domUtils.getMainContainer()),s=i.length>0,o=s?xn(i):[1,1];return On().domain(o).range(s?n.wordCloud.fontSizeRange(a,t):[4,4])}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this,i=xo(a=>{const s=r.parent.selectAll("text.word").transition("wordcloud-word-mouse-highlight").call(o=>r.services.transitions.setupTransition({transition:o,name:"wordcloud-word-mouse-highlight"}));a===null?s.attr("opacity",1):s.attr("opacity",function(){return a===this?1:.3})},6);this.parent.selectAll("text.word").on("mouseover",function(a,s){const o=this;i(o),r.services.events.dispatchEvent(w.WordCloud.WORD_MOUSEOVER,{event:a,element:U(this),datum:s}),r.services.events.dispatchEvent(w.Tooltip.SHOW,{event:a,hoveredElement:o,items:[{label:t.tooltip.wordLabel,value:s.text},{label:t.tooltip.valueLabel,value:s.value},{label:kt(t,"locale.translations.group")||kt(t,"tooltip.groupLabel")||"Group",value:s[n],class:r.model.getColorClassName({classNameTypes:[mt.TOOLTIP],dataGroupName:s[n]})}]})}).on("mousemove",function(a,s){const o=U(this);r.services.events.dispatchEvent(w.WordCloud.WORD_MOUSEMOVE,{element:o,datum:s}),r.services.events.dispatchEvent(w.Tooltip.MOVE,{event:a})}).on("click",function(a,s){r.services.events.dispatchEvent(w.WordCloud.WORD_CLICK,{event:a,element:U(this),datum:s})}).on("mouseout",function(a,s){const o=U(this);i(null),r.services.events.dispatchEvent(w.WordCloud.WORD_MOUSEOUT,{event:a,element:o,datum:s}),r.services.events.dispatchEvent(w.Tooltip.HIDE,{hoveredElement:o})})}}class r3 extends Mt{constructor(){super(...arguments),this.type="geo",this.renderType=ft.SVG}render(){const t=this.getComponentContainer({withinChartClip:!0}),{width:n,height:r}=B.getSVGElementSize(t,{useAttrs:!0});if(n<1||r<1)return;const i=this.getProjection(),a=_(this.getOptions(),"geoData"),s=this.model.getCombinedData(),o={},l={};Object.keys(s).forEach(m=>{typeof s[m].value=="number"?o[m]=s[m]:l[m]=s[m]});const c=ND(a,Object.values(l)),u=LD(a,{type:"GeometryCollection",geometries:Object.values(o)}),d=i.fitSize([n,r],u),h=XR().projection(d);B.appendOrSelect(t,"g.geo").selectAll("path").data(u.features).join("path").attr("d",h);const p=this.services.domUtils.generateElementIDString("geo-pattern-stripes"),f=B.appendOrSelect(t,"defs");B.appendOrSelect(f,"pattern").attr("id",p).attr("width",5).attr("height",10).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("path").classed("pattern-fill",!0).attr("d",vs()([[0,0],[0,10]]));const v=B.appendOrSelect(t,"g.missing-data");B.appendOrSelect(v,"path").datum(c).attr("d",h).style("fill",`url(#${p})`)}getProjection(){let t=null;switch(_(this.getOptions(),"thematic","projection")){case In.geoEqualEarth:t=fk();break;case In.geoAlbers:t=ok();break;case In.geoConicEqualArea:t=iv();break;case In.geoConicEquidistant:t=dk();break;case In.geoEquirectangular:t=uk();break;case In.geoMercator:t=lk();break;case In.geoNaturalEarth1:t=mk();break;default:throw new Error("Projection is not supported.")}return t}}class i3 extends r3{constructor(){super(...arguments),this.type="choropleth"}render(t=!0){super.render();const n=this.model.getCombinedData();this.getComponentContainer({ariaLabel:"map",withinChartClip:!0}).select("g.geo").selectAll("path").classed("border",!0).attr("class",r=>this.model.getColorClassName({value:n[r.properties.NAME].value,originalClassName:"border"})),this.addCountryAreaEventListener()}addCountryAreaEventListener(){const t=this,n=this.model.getCombinedData();this.parent.selectAll("path.border").on("mouseover",function(r,i){const a=U(this);t.services.events.dispatchEvent(Ei.CHOROPLETH_MOUSEOVER,{event:r,element:a,datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(xi.SHOW,{event:r,hoveredElement:a,items:[{label:i.properties.NAME,value:n[i.properties.NAME].value}]})}).on("mousemove",function(r,i){t.services.events.dispatchEvent(Ei.CHOROPLETH_MOUSEMOVE,{event:r,element:U(this),datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(xi.MOVE,{event:r})}).on("click",function(r,i){t.services.events.dispatchEvent(Ei.CHOROPLETH_CLICK,{event:r,element:U(this),datum:n[i.properties.NAME]})}).on("mouseout",function(r,i){const a=U(this);t.services.events.dispatchEvent(Ei.CHOROPLETH_MOUSEOUT,{event:r,element:a,datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(xi.HIDE,{event:r,hoveredElement:a})})}}function Sh(e){var t=e==null?0:e.length;return t?Gs(e,1):[]}function a3(e){return gd(bd(e,void 0,Sh),e+"")}function h0(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function s3(e,t){return t.length<2?e:lc(e,h0(t,0,-1))}function o3(e,t){return t=Fs(t,e),e=s3(e,t),e==null||delete e[Ma(fp(t))]}function l3(e){return kd(e)?void 0:e}var c3=1,u3=2,h3=4,d3=a3(function(e,t){var n={};if(e==null)return n;var r=!1;t=Zl(t,function(a){return a=Fs(a,e),r||(r=a.length>1),a}),wi(e,Fd(e),n),r&&(n=Aa(n,c3|u3|h3,l3));for(var i=t.length;i--;)o3(n,t[i]);return n});function d0(e){return Math.log(e)}function p0(e){return Math.exp(e)}function p3(e){return-Math.log(-e)}function f3(e){return-Math.exp(-e)}function m3(e){return isFinite(e)?+("1e"+e):e<0?0:e}function g3(e){return e===10?m3:e===Math.E?Math.exp:t=>Math.pow(e,t)}function v3(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function f0(e){return(t,n)=>-e(-t,n)}function y3(e){const t=e(d0,p0),n=t.domain;let r=10,i,a;function s(){return i=v3(r),a=g3(r),n()[0]<0?(i=f0(i),a=f0(a),e(p3,f3)):e(d0,p0),t}return t.base=function(o){return arguments.length?(r=+o,s()):r},t.domain=function(o){return arguments.length?(n(o),s()):n()},t.ticks=o=>{const l=n();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let h=i(c),p=i(u),f,v;const m=o==null?10:+o;let y=[];if(!(r%1)&&p-h<m){if(h=Math.floor(h),p=Math.ceil(p),c>0){for(;h<=p;++h)for(f=1;f<r;++f)if(v=h<0?f/a(-h):f*a(h),!(v<c)){if(v>u)break;y.push(v)}}else for(;h<=p;++h)for(f=r-1;f>=1;--f)if(v=h>0?f/a(-h):f*a(h),!(v<c)){if(v>u)break;y.push(v)}y.length*2<m&&(y=Xs(c,u,m))}else y=Xs(h,p,Math.min(p-h,m)).map(a);return d?y.reverse():y},t.tickFormat=(o,l)=>{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Fa(l)).precision==null&&(l.trim=!0),l=Fc(l)),o===1/0)return l;const c=Math.max(1,r*o/t.ticks().length);return u=>{let d=u/a(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=c?l(u):""}},t.nice=()=>n(tm(n(),{floor:o=>a(Math.floor(i(o))),ceil:o=>a(Math.ceil(i(o)))})),t}function m0(){const e=y3(yf()).domain([1,10]);return e.copy=()=>zc(e,m0()).base(e.base()),Ni.apply(e,arguments),e}function vl(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function yl(e){this._context=e}yl.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:vl(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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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:vl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function b3(e){return new yl(e)}function g0(e){this._context=e}g0.prototype={areaStart:Tr,areaEnd:Tr,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:vl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _3(e){return new g0(e)}function v0(e){this._context=e}v0.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(e,t){switch(e=+e,t=+t,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+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:vl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function x3(e){return new v0(e)}function y0(e,t){this._basis=new yl(e),this._beta=t}y0.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,s=t[n]-i,o=-1,l;++o<=n;)l=o/n,this._basis.point(this._beta*e[o]+(1-this._beta)*(r+l*a),this._beta*t[o]+(1-this._beta)*(i+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const E3=function e(t){function n(r){return t===1?new yl(r):new y0(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function bl(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function wh(e,t){this._context=e,this._k=(1-t)/6}wh.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:bl(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:bl(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const T3=function e(t){function n(r){return new wh(r,t)}return n.tension=function(r){return e(+r)},n}(0);function $h(e,t){this._context=e,this._k=(1-t)/6}$h.prototype={areaStart:Tr,areaEnd:Tr,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:bl(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const O3=function e(t){function n(r){return new $h(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Ch(e,t){this._context=e,this._k=(1-t)/6}Ch.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(e,t){switch(e=+e,t=+t,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:bl(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const S3=function e(t){function n(r){return new Ch(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Mh(e,t,n){var r=e._x1,i=e._y1,a=e._x2,s=e._y2;if(e._l01_a>Me){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Me){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/u,s=(s*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,s,e._x2,e._y2)}function b0(e,t){this._context=e,this._alpha=t}b0.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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;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(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Mh(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const w3=function e(t){function n(r){return t?new b0(r,t):new wh(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function _0(e,t){this._context=e,this._alpha=t}_0.prototype={areaStart:Tr,areaEnd:Tr,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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;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=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Mh(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const $3=function e(t){function n(r){return t?new _0(r,t):new $h(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function x0(e,t){this._context=e,this._alpha=t}x0.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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Mh(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const C3=function e(t){function n(r){return t?new x0(r,t):new Ch(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function E0(e){return e<0?-1:1}function T0(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),s=(n-e._y1)/(i||r<0&&-0),o=(a*i+s*r)/(r+i);return(E0(a)+E0(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function O0(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Ah(e,t,n){var r=e._x0,i=e._y0,a=e._x1,s=e._y1,o=(a-r)/3;e._context.bezierCurveTo(r+o,i+o*t,a-o,s-o*n,a,s)}function _l(e){this._context=e}_l.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:Ah(this,this._t0,O0(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ah(this,O0(this,n=T0(this,e,t)),n);break;default:Ah(this,this._t0,n=T0(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function S0(e){this._context=new w0(e)}(S0.prototype=Object.create(_l.prototype)).point=function(e,t){_l.prototype.point.call(this,t,e)};function w0(e){this._context=e}w0.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function M3(e){return new _l(e)}function A3(e){return new S0(e)}function $0(e){this._context=e}$0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=C0(e),i=C0(t),a=0,s=1;s<n;++a,++s)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[s],t[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function C0(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),s=new Array(n);for(i[0]=0,a[0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,s[t]-=r*s[t-1];for(i[n-1]=s[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(s[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function R3(e){return new $0(e)}function xl(e,t){this._context=e,this._t=t}xl.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function k3(e){return new xl(e,.5)}function L3(e){return new xl(e,0)}function D3(e){return new xl(e,1)}class I3 extends hr{zoomIn(t,n,r){let i,a,s;const o=r||Ui;t&&(i=t.x,a=t.y,s=2);const{width:l,height:c}=B.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0});n.transition().duration(o.duration).ease(o.ease).attr("transform",`translate(${l/2}, ${c/2}) scale(${s}) translate(${-i},${-a})`),this.services.events.dispatchEvent(w.CanvasZoom.CANVAS_ZOOM_IN,{element:U(t)})}zoomOut(t,n){const r=n||Ui;t.transition().duration(r.duration).ease(r.ease).attr("transform",""),this.services.events.dispatchEvent(w.CanvasZoom.CANVAS_ZOOM_OUT)}}class N3 extends hr{init(){this.documentFragment=document.createDocumentFragment()}addEventListener(t,n){this.documentFragment.addEventListener(t,n)}removeEventListener(t,n){this.documentFragment.removeEventListener(t,n)}dispatchEvent(t,n){let r;n?r=new CustomEvent(t,{detail:n}):(r=document.createEvent("Event"),r.initEvent(t,!1,!0)),this.documentFragment.dispatchEvent(r)}}class P3 extends hr{constructor(t,n){super(t,n)}downloadCSV(t,n){const r=document.createElement("a"),i="text/csv;encoding:utf-8";if(navigator.msSaveBlob)navigator.msSaveBlob(new Blob([t],{type:i}),n);else if(URL&&"download"in r){const a=URL.createObjectURL(new Blob([t],{type:i}));r.href=a,r.setAttribute("download",n),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(a)}else location.href=`data:application/octet-stream,${encodeURIComponent(t)}`}downloadImage(t,n){const r=document.createElement("a");r.download=n,r.href=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}}class U3 extends hr{constructor(){super(...arguments),this.pendingTransitions={}}init(){var t;(t=this.services.events)==null||t.addEventListener(w.Model.UPDATE,()=>{this.pendingTransitions={}})}setupTransition({transition:t,name:n,animate:r}){return this.pendingTransitions[t._id]=t,t.on("end interrupt cancel",()=>{delete this.pendingTransitions[t._id]}),this.model.getOptions().animations===!1||r===!1?t.duration(0):t.duration(_(Sf,n,"duration")||Sf.default.duration)}getPendingTransitions(){return this.pendingTransitions}}function Ss(e,t){const n=+le(e)-+le(t);return n<0?-1:n>0?1:n}function B3(e,t,n){const[r,i]=Vr(void 0,e,t);return r.getFullYear()-i.getFullYear()}function H3(e,t,n){const[r,i]=Vr(void 0,e,t),a=Ss(r,i),s=Math.abs(B3(r,i));r.setFullYear(1584),i.setFullYear(1584);const o=Ss(r,i)===-a,l=a*(s-+o);return l===0?0:l}function Rh(e,t,n){const r=le(e,void 0);if(isNaN(t))return sn(e,NaN);if(!t)return r;const i=r.getDate(),a=sn(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const s=a.getDate();return i>=s?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function M0(e,t,n){return Rh(e,t*12)}function V3(e,t,n){return M0(e,-t)}function F3(e,t,n){const[r,i]=Vr(void 0,e,t),a=r.getFullYear()-i.getFullYear(),s=r.getMonth()-i.getMonth();return a*12+s}function G3(e,t){const n=le(e,void 0);return n.setHours(23,59,59,999),n}function z3(e,t){const n=le(e,void 0),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function j3(e,t){const n=le(e,void 0);return+G3(n)==+z3(n)}function W3(e,t,n){const[r,i,a]=Vr(void 0,e,e,t),s=Ss(i,a),o=Math.abs(F3(i,a));if(o<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-s*o);let l=Ss(i,a)===-s;j3(r)&&o===1&&Ss(r,a)===1&&(l=!1);const c=s*(o-+l);return c===0?0:c}function Y3(e,t,n){return Rh(e,-t)}function q3(e,t,n){const[r,i]=Vr(void 0,e,t),a=A0(r,i),s=Math.abs(Pf(r,i));r.setDate(r.getDate()-a*s);const o=+(A0(r,i)===-a),l=a*(s-o);return l===0?0:l}function A0(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function R0(e,t,n){const r=le(e,void 0);return isNaN(t)?sn(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function X3(e,t,n){return R0(e,-t)}function kh(e){return t=>{const n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function Z3(e,t,n){const[r,i]=Vr(void 0,e,t),a=(+r-+i)/id;return kh(void 0)(a)}function k0(e,t,n){return sn(e,+le(e)+t)}function L0(e,t,n){return k0(e,t*id)}function K3(e,t,n){return L0(e,-t)}function D0(e,t){return+le(e)-+le(t)}function I0(e,t,n){const r=D0(e,t)/rd;return kh(void 0)(r)}function Lh(e,t,n){const r=le(e,void 0);return r.setTime(r.getTime()+t*rd),r}function N0(e,t,n){return Lh(e,-t)}function P0(e,t,n){const r=D0(e,t)/1e3;return kh(void 0)(r)}function Dh(e,t,n){return k0(e,t*1e3)}function U0(e,t,n){return Dh(e,-t)}class Q3 extends hr{constructor(){super(...arguments),this.scaleTypes={top:null,right:null,bottom:null,left:null},this.scales={top:null,right:null,bottom:null,left:null}}getDomainAxisPosition({datum:t=null}={}){if(this.dualAxes&&t){const n=this.model.getOptions(),{groupMapsTo:r}=n.data,i=_(n,"axes",this.secondaryDomainAxisPosition),a=t[r];if(i!=null&&i.correspondingDatasets&&i.correspondingDatasets.includes(a))return this.secondaryDomainAxisPosition}return this.domainAxisPosition}getRangeAxisPosition({datum:t=null,groups:n=null}={}){if(this.dualAxes){const r=this.model.getOptions(),{groupMapsTo:i}=r.data,a=_(r,"axes",this.secondaryRangeAxisPosition);let s;if(t!==null?s=t[i]:n&&n.length>0&&(s=n[0]),a!=null&&a.correspondingDatasets&&a.correspondingDatasets.includes(s))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition}getAxisOptions(t){return _(this.model.getOptions(),"axes",t)}getDomainAxisOptions(){const t=this.getDomainAxisPosition();return this.getAxisOptions(t)}getRangeAxisOptions(){const t=this.getRangeAxisPosition();return this.getAxisOptions(t)}getScaleLabel(t){return this.getAxisOptions(t).title||(t===Z.BOTTOM||t===Z.TOP?"x-value":"y-value")}getDomainLabel(){return this.getScaleLabel(this.getDomainAxisPosition())}getRangeLabel(){return this.getScaleLabel(this.getRangeAxisPosition())}update(){this.determineAxisDuality(),this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(Z).map(t=>Z[t]).forEach(t=>{this.scales[t]=this.createScale(t)})}findDomainAndRangeAxes(){const t=this.findVerticalAxesPositions(),n=this.findHorizontalAxesPositions(),r=this.findDomainAndRangeAxesPositions(t,n);this.domainAxisPosition=r.primaryDomainAxisPosition,this.rangeAxisPosition=r.primaryRangeAxisPosition,this.isDualAxes()&&(this.secondaryDomainAxisPosition=r.secondaryDomainAxisPosition,this.secondaryRangeAxisPosition=r.secondaryRangeAxisPosition)}determineOrientation(){(this.rangeAxisPosition===Z.LEFT||this.rangeAxisPosition===Z.RIGHT)&&(this.domainAxisPosition===Z.BOTTOM||this.domainAxisPosition===Z.TOP)?this.orientation=fe.VERTICAL:this.orientation=fe.HORIZONTAL}isDualAxes(){return this.dualAxes}determineAxisDuality(){var t,n,r,i;const a=this.model.getOptions(),s=_(a,"axes");((t=s[Z.LEFT])!=null&&t.correspondingDatasets&&s[Z.RIGHT]||(n=s[Z.RIGHT])!=null&&n.correspondingDatasets&&s[Z.LEFT]||(r=s[Z.TOP])!=null&&r.correspondingDatasets&&s[Z.BOTTOM]||(i=s[Z.BOTTOM])!=null&&i.correspondingDatasets&&s[Z.TOP])&&(this.dualAxes=!0)}getCustomDomainValuesByposition(t){const n=_(this.model.getOptions(),"axes",t,"domain");if(n&&!Array.isArray(n))throw new Error(`Domain in ${t} axis is not a valid array`);if(Array.isArray(n)&&(this.scaleTypes[t]===pt.LINEAR||this.scaleTypes[t]===pt.TIME)&&n.length!==2)throw new Error(`There can only be 2 elements in domain for scale type: ${this.scaleTypes[t]}`);return n}getOrientation(){return this.orientation}getScaleByPosition(t){return this.scales[t]}getScaleTypeByPosition(t){return this.scaleTypes[t]}getDomainAxisScaleType(){const t=this.getDomainAxisPosition();return this.getScaleTypeByPosition(t)}getRangeAxisScaleType(){const t=this.getRangeAxisPosition();return this.getScaleTypeByPosition(t)}getDomainScale(){return this.scales[this.domainAxisPosition]}getRangeScale(){return this.scales[this.rangeAxisPosition]}getMainXAxisPosition(){const t=[Z.BOTTOM,Z.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find(n=>t.indexOf(n)>-1)}getMainYAxisPosition(){const t=[Z.LEFT,Z.RIGHT];return[this.domainAxisPosition,this.rangeAxisPosition].find(n=>t.indexOf(n)>-1)}getMainXScale(){return this.scales[this.getMainXAxisPosition()]}getMainYScale(){return this.scales[this.getMainYAxisPosition()]}getValueFromScale(t,n,r,i){const a=this.model.getOptions(),s=_(a,"axes")[r],{mapsTo:o}=s,l=_(i,o)!==null?i[o]:i;let c;switch(n){case pt.LABELS:c=t(l)+t.step()/2;break;case pt.TIME:c=t(new Date(l));break;default:c=t(l)}return c}getBoundedScaledValues(t){const{bounds:n}=this.model.getOptions(),r=this.getRangeAxisPosition({datum:t}),i=this.scales[r],a=this.model.getOptions(),s=_(a,"axes")[r],{mapsTo:o}=s,l=t[o]!==void 0?t[o]:t;return[i(_(t,n.upperBoundMapsTo)!==null?t[n.upperBoundMapsTo]:l),i(_(t,n.lowerBoundMapsTo)!==null?t[n.lowerBoundMapsTo]:l)]}getValueThroughAxisPosition(t,n){const r=this.scaleTypes[t],i=this.scales[t];return this.getValueFromScale(i,r,t,n)}getDomainValue(t){const n=this.getDomainAxisPosition({datum:t});return this.getValueThroughAxisPosition(n,t)}getRangeValue(t){const n=this.getRangeAxisPosition({datum:t});return this.getValueThroughAxisPosition(n,t)}getMainXScaleType(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())}getMainYScaleType(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())}getDomainIdentifier(t){const n=this.model.getOptions();return _(n,"axes",this.getDomainAxisPosition({datum:t}),"mapsTo")}getRangeIdentifier(t){const n=this.model.getOptions();return _(n,"axes",this.getRangeAxisPosition({datum:t}),"mapsTo")}extendsDomain(t,n){const r=this.model.getOptions(),i=_(r,"axes",t);if(i.scaleType===pt.TIME){const a=_(r,"timeScale","addSpaceOnEdges");return J3(n,a)}else return tU(n,_r.paddingRatio,i.scaleType)}findVerticalAxesPositions(){const t=this.model.getOptions(),n=_(t,"axes"),r=this.isDualAxes();return _(n,Z.LEFT)===null&&_(n,Z.RIGHT)!==null||_(n,Z.RIGHT,"main")===!0||r&&_(n,Z.LEFT,"correspondingDatasets")?{primary:Z.RIGHT,secondary:Z.LEFT}:{primary:Z.LEFT,secondary:Z.RIGHT}}findHorizontalAxesPositions(){const t=this.model.getOptions(),n=_(t,"axes"),r=this.isDualAxes();return _(n,Z.BOTTOM)===null&&_(n,Z.TOP)!==null||_(n,Z.TOP,"main")===!0||r&&_(n,Z.BOTTOM,"correspondingDatasets")?{primary:Z.TOP,secondary:Z.BOTTOM}:{primary:Z.BOTTOM,secondary:Z.TOP}}findDomainAndRangeAxesPositions(t,n){const r=this.model.getOptions(),i=_(r,"axes",t.primary),a=_(r,"axes",n.primary),s=i.scaleType||pt.LINEAR,o=a.scaleType||pt.LINEAR,l={primaryDomainAxisPosition:null,secondaryDomainAxisPosition:null,primaryRangeAxisPosition:null,secondaryRangeAxisPosition:null};return l.primaryDomainAxisPosition=n.primary,l.primaryRangeAxisPosition=t.primary,l.secondaryDomainAxisPosition=n.secondary,l.secondaryRangeAxisPosition=t.secondary,(!(o===pt.LABELS||o===pt.TIME)&&s===pt.LABELS||s===pt.TIME)&&(l.primaryDomainAxisPosition=t.primary,l.primaryRangeAxisPosition=n.primary,l.secondaryDomainAxisPosition=t.secondary,l.secondaryRangeAxisPosition=n.secondary),l}getScaleDomain(t){const n=this.model.getOptions(),r=_(n,"axes",t),i=_(n,"bounds"),{includeZero:a}=r,s=_(r,"scaleType")||pt.LINEAR;if(this.model.isDataEmpty())return[];if(r.binned){const{bins:y}=this.model.getBinConfigurations();return[0,qr(y,g=>g.length)]}else if(r.limitDomainToBins){const{bins:y}=this.model.getBinConfigurations(),g=this.model.getStackKeys({bins:y});return[g[0].split(":")[0],g[g.length-1].split(":")[1]]}const o=this.model.getDisplayData(),{extendLinearDomainBy:l,mapsTo:c,percentage:u,thresholds:d}=r,{reference:h,compareTo:p}=_r.ratio;if(r.domain)return s===pt.LABELS?r.domain:(s===pt.TIME&&(r.domain=r.domain.map(y=>y.getTime===void 0?new Date(y):y)),this.extendsDomain(t,r.domain));if(u)return[0,100];if(r&&s===pt.LABELS)return ka(o.map(y=>y[c]));let f,v;const m=this.model.getDataGroupNames();if(s===pt.LABELS_RATIO)return o.map(y=>`${y[h]}/${y[p]}`);if(s===pt.TIME)v=o.map(y=>+new Date(y[c]));else if(i&&n.axes)v=[],o.forEach(y=>{v.push(y[c]),y[i.upperBoundMapsTo]&&v.push(y[i.upperBoundMapsTo]),y[i.lowerBoundMapsTo]&&v.push(y[i.lowerBoundMapsTo])});else if(r.stacked===!0&&m&&t===this.getRangeAxisPosition()){const{groupMapsTo:y}=n.data,g=this.model.getDataValuesGroupedByKeys({groups:m}),x=o.filter(T=>!m.includes(T[y])),O=[];g.forEach(T=>{const{...S}=T;let D=0,P=0;Object.values(d3(S,"sharedStackKey")).forEach(I=>{isNaN(I)||(I<0?P+=I:D+=I)}),O.push([P,D])}),v=[...Sh(O),...x.map(T=>T[c])]}else v=[],o.forEach(y=>{const g=y[c];Array.isArray(g)&&g.length===2?(v.push(g[0]),v.push(g[1])):(l&&v.push(Math.max(y[c],y[l])),v.push(g))});return s!==pt.TIME&&s!==pt.LOG&&a&&v.push(0),d&&d.length>0&&d.forEach(y=>{const g=_(y,"value");g!==null&&v.push(g)}),f=xn(v),f=this.extendsDomain(t,f),f}createScale(t){const n=this.model.getOptions(),r=_(n,"axes",t);if(!r)return null;const i=_(r,"scaleType")||pt.LINEAR;this.scaleTypes[t]=i;let a;return i===pt.TIME?a=bm():i===pt.LOG?a=m0().base(r.base||10):i===pt.LABELS||i===pt.LABELS_RATIO?a=Xa():a=On(),a.domain(this.getScaleDomain(t)),a}getDomainLowerBound(t){let n,r=0;return this.getOrientation()===fe.VERTICAL?n=this.getMainYScale().domain():n=this.getMainXScale().domain(),_(this.model.getOptions(),"axes",t,"includeZero")===!1&&n[0]>0&&n[1]>0&&(r=n[0]),r}getHighestDomainThreshold(){const t=_(this.model.getOptions(),"axes"),n=this.getDomainAxisPosition(),{thresholds:r}=t[n];if(!Array.isArray(r)||Array.isArray(r)&&!r.length)return null;const i=this.getDomainScale(),a=r.sort((s,o)=>o.value-s.value)[0];return this.getScaleTypeByPosition(n)===pt.TIME&&(typeof a.value=="string"||a.value.getTime===void 0)&&(a.value=new Date(a.value)),{threshold:a,scaleValue:i(a.value)}}getHighestRangeThreshold(){const t=_(this.model.getOptions(),"axes"),n=this.getRangeAxisPosition(),{thresholds:r}=t[n];if(!Array.isArray(r)||Array.isArray(r)&&!r.length)return null;const i=this.getRangeScale(),a=r.sort((s,o)=>o.value-s.value)[0];return{threshold:a,scaleValue:i(a.value)}}}function J3(e,t){const n=new Date(e[0]),r=new Date(e[1]);return H3(r,n)>1?[V3(n,t),M0(r,t)]:W3(r,n)>1?[Y3(n,t),Rh(r,t)]:q3(r,n)>1?[X3(n,t),R0(r,t)]:Z3(r,n)>1?[K3(n,t),L0(r,t)]:I0(r,n)>30?[N0(n,t*30),Lh(r,t*30)]:I0(r,n)>1?[N0(n,t),Lh(r,t)]:P0(r,n)>15?[U0(n,t*15),Dh(r,t*15)]:P0(r,n)>1?[U0(n,t),Dh(r,t)]:[n,r]}function tU([e,t],n,r){const i=(t-e)*n,a=t<=0&&t+i>0?0:t+i;let s=e>=0&&e-i<0?0:e-i;if(r===pt.LOG&&s<=0){if(e<=0)throw Error("Data must have values greater than 0 if log scale type is used.");s=e}return[s,a]}class eU extends hr{constructor(){super(...arguments),this.curveTypes={curveLinear:Co,curveLinearClosed:Om,curveBasis:b3,curveBasisClosed:_3,curveBasisOpen:x3,curveBundle:E3,curveCardinal:T3,curveCardinalClosed:O3,curveCardinalOpen:S3,curveCatmullRom:w3,curveCatmullRomClosed:$3,curveCatmullRomOpen:C3,curveMonotoneX:M3,curveMonotoneY:A3,curveNatural:R3,curveStep:k3,curveStepAfter:D3,curveStepBefore:L3}}getD3Curve(){let t="curveLinear";const n=this.model.getOptions().curve;if(n&&(typeof n=="string"?t=n:t=n.name),this.curveTypes[t]){let r=this.curveTypes[t];return n&&Object.keys(n).forEach(i=>{r[i]&&(r=r[i](n[i]))}),r}return console.warn(`The curve type '${t}' is invalid, using 'curveLinear' instead`),this.curveTypes.curveLinear}}class nU extends hr{isZoomBarEnabled(){if(!this.services.cartesianScales||!_(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();const t=this.services.cartesianScales.getMainXAxisPosition(),n=_(this.model.getOptions(),"axes",t,"scaleType");return t===Z.BOTTOM&&n===pt.TIME}getZoomBarData(){const t=this.model.getZoomBarData();return t&&t.length>1?t:this.model.getDisplayData()}getDefaultZoomBarDomain(t){if(!this.services.zoom)throw new Error("Services zoom not defined");const n=t||this.services.zoom.getZoomBarData(),{cartesianScales:r}=this.services;if(!r)throw new Error("Services cartesianScales undefined");const i=r.getMainXAxisPosition(),a=r.getDomainIdentifier(),s=_(this.model.getOptions(),"axes",i,"domain");if(Array.isArray(s)&&s.length===2)return s;if(!i)throw new Error("Not defined: mainXAxisPosition");return r.extendsDomain(i,xn(n,o=>o[a]))}handleDomainChange(t,n={dispatchEvent:!0}){var r;this.model.set({zoomDomain:t},{animate:!1}),n.dispatchEvent&&((r=this.services.events)==null||r.dispatchEvent(w.ZoomDomain.CHANGE,{newDomain:t}))}getZoomRatio(){return _(this.model.getOptions(),"zoomBar","zoomRatio")}filterDataForRangeAxis(t,n){var r;const i=this.model.get("zoomDomain"),a=Object.assign({stacked:!1},n),s=_(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&s&&i){const o=a.stacked?"sharedStackKey":(r=this.services.cartesianScales)==null?void 0:r.getDomainIdentifier(),l=t.filter(c=>new Date(c[o])>=i[0]&&new Date(c[o])<=i[1]);if(l.length>0)return l}return t}zoomIn(t=this.getZoomRatio()){var n;const r=this.model.get("zoomDomain"),i=Xe.handleWidth,a=(n=this.services.cartesianScales)==null?void 0:n.getMainXScale().copy();a.domain(this.getDefaultZoomBarDomain());const s=a(r[0]),o=a(r[1]);if(o-s<i+1)return;const l=a.range(),c=o-s,u=Math.min((l[1]-l[0])/2*(t/2),c/2);let d=s+u,h=o-u;d>=h&&(d=s+c/2-i/2,h=o-c/2+i/2);const p=[a.invert(d),a.invert(h)];(r[0].valueOf()!==p[0].valueOf()||r[1].valueOf()!==p[1].valueOf())&&this.handleDomainChange(p)}zoomOut(t=this.getZoomRatio()){const n=this.model.get("zoomDomain");if(!this.services.cartesianScales)throw new Error("Services cartesianScales undefined");const r=this.services.cartesianScales.getMainXScale().copy();r.domain(this.getDefaultZoomBarDomain());const i=r(n[0]),a=r(n[1]),s=r.range(),o=(s[1]-s[0])/2*(t/2),l=Math.max(i-o,s[0]),c=Math.min(a+o,s[1]),u=[r.invert(l),r.invert(c)];(n[0].valueOf()!==u[0].valueOf()||n[1].valueOf()!==u[1].valueOf())&&this.handleDomainChange(u)}resetZoomDomain(){const t=this.model.get("zoomDomain"),n=this.getDefaultZoomBarDomain();(t[0].valueOf()!==n[0].valueOf()||t[1].valueOf()!==n[1].valueOf())&&this.handleDomainChange(n)}isMinZoomDomain(){const t=this.model.get("zoomDomain"),n=this.getDefaultZoomBarDomain();if(!t||!n)return!1;const r=t[1].valueOf()-t[0].valueOf(),i=n[1].valueOf()-n[0].valueOf(),a=_(this.model.getOptions(),"zoomBar","minZoomRatio");return r/i<a}isMaxZoomDomain(){const t=this.model.get("zoomDomain"),n=this.getDefaultZoomBarDomain();return!!(t&&n&&t[0].valueOf()===n[0].valueOf()&&t[1].valueOf()===n[1].valueOf())}isEmptyState(){return this.getZoomBarData().length===0}isZoomBarLoading(t){return _(this.model.getOptions(),"zoomBar",t,"loading")}isZoomBarLocked(t){return _(this.model.getOptions(),"zoomBar",t,"locked")}}function rU(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:h0(e,t,n)}var iU="\\ud800-\\udfff",aU="\\u0300-\\u036f",sU="\\ufe20-\\ufe2f",oU="\\u20d0-\\u20ff",lU=aU+sU+oU,cU="\\ufe0e\\ufe0f",uU="\\u200d",hU=RegExp("["+uU+iU+lU+cU+"]");function B0(e){return hU.test(e)}function dU(e){return e.split("")}var H0="\\ud800-\\udfff",pU="\\u0300-\\u036f",fU="\\ufe20-\\ufe2f",mU="\\u20d0-\\u20ff",gU=pU+fU+mU,vU="\\ufe0e\\ufe0f",yU="["+H0+"]",Ih="["+gU+"]",Nh="\\ud83c[\\udffb-\\udfff]",bU="(?:"+Ih+"|"+Nh+")",V0="[^"+H0+"]",F0="(?:\\ud83c[\\udde6-\\uddff]){2}",G0="[\\ud800-\\udbff][\\udc00-\\udfff]",_U="\\u200d",z0=bU+"?",j0="["+vU+"]?",xU="(?:"+_U+"(?:"+[V0,F0,G0].join("|")+")"+j0+z0+")*",EU=j0+z0+xU,TU="(?:"+[V0+Ih+"?",Ih,F0,G0,yU].join("|")+")",OU=RegExp(Nh+"(?="+Nh+")|"+TU+EU,"g");function SU(e){return e.match(OU)||[]}function wU(e){return B0(e)?SU(e):dU(e)}function $U(e){return function(t){t=Ca(t);var n=B0(t)?wU(t):void 0,r=n?n[0]:t.charAt(0),i=n?rU(n,1).join(""):t.slice(1);return r[e]()+i}}var CU=$U("toUpperCase");function MU(e){return CU(Ca(e).toLowerCase())}var AU=ig(function(e,t,n){return t=t.toLowerCase(),e+(n?MU(t):t)});class Cn{constructor(t,n){this.components=[],this.services={canvasZoom:I3,domUtils:B,events:N3,files:P3,gradientUtils:bu,transitions:U3},this.model=new Bn(this.services)}init(t,n){this.model.set({holder:t},{skipUpdate:!0}),Object.keys(this.services).forEach(r=>{const i=this.services[r];this.services[r]=new i(this.model,this.services)}),this.services.events.addEventListener(w.Model.UPDATE,r=>{const i=!!_(r,"detail","animate");this.update(i)}),this.model.setData(n.data),this.services.events.addEventListener(w.Chart.RESIZE,()=>{this.update(!1)}),this.components=this.getComponents(),this.update()}getComponents(){return console.error("getComponents() method is not implemented"),[]}update(t=!0){if(!this.components)return;Object.keys(this.services).forEach(i=>{this.services[i].update()}),this.components.forEach(i=>i.render(t));const n=this.services.transitions.getPendingTransitions(),r=Object.keys(n).map(i=>n[i].end().catch(a=>a));Promise.all(r).then(()=>this.services.events.dispatchEvent(w.Chart.RENDER_FINISHED))}destroy(){this.components.forEach(t=>t.destroy()),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},{skipUpdate:!0})}getChartComponents(t,n){const r=this.model.getOptions(),i=_(r,"toolbar","enabled"),a={id:"legend",components:[new mh(this.model,this.services)],growth:xt.PREFERRED},s=_(r,"canvasZoom","enabled");s&&s===!0&&t.push(new tD(this.model,this.services));const o=!!this.model.getOptions().title,l={id:"title",components:[new Ts(this.model,this.services)],growth:xt.STRETCH},c={id:"toolbar",components:[new cl(this.model,this.services)],growth:xt.PREFERRED},u={id:"header",components:[new Je(this.model,this.services,[l,...i?[c]:[]],{direction:qt.ROW,alignItems:Br.CENTER})],growth:xt.PREFERRED},d={id:"graph-frame",components:t,growth:xt.STRETCH,renderType:_(n,"graphFrameRenderType")||ft.SVG},h=_(n,"excludeLegend")!==!0&&r.legend.enabled!==!1;let p=qt.COLUMN;if(h){const y=_(r,"legend","position");y==="left"?(p=qt.ROW,r.legend.orientation||(r.legend.orientation=Oi.VERTICAL)):y==="right"?(p=qt.ROW_REVERSE,r.legend.orientation||(r.legend.orientation=Oi.VERTICAL)):y==="bottom"&&(p=qt.COLUMN_REVERSE)}const f={id:"spacer",components:[new mr(this.model,this.services)],growth:xt.PREFERRED},v={id:"full-frame",components:[new Je(this.model,this.services,[...h?[a]:[],...h?[f]:[],d],{direction:p})],growth:xt.STRETCH},m=[];if(o||i){m.push(u);const y={id:"spacer",components:[new mr(this.model,this.services,i?{size:15}:void 0)],growth:xt.PREFERRED};m.push(y)}return m.push(v),[new gh(this.model,this.services),new ul(this.model,this.services),new Je(this.model,this.services,m,{direction:qt.COLUMN})]}}class je extends Cn{constructor(t,n){super(t,n),this.services=Object.assign(this.services,{cartesianScales:Q3,curves:eU,zoom:nU}),this.model=new ni(this.services)}getAxisChartComponents(t,n){const r=this.model.getOptions(),i=_(r,"zoomBar",Z.TOP,"enabled"),a=_(r,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const s=this.services.cartesianScales.getMainXAxisPosition(),o=_(r,"axes",s,"scaleType"),l=i&&s===Z.BOTTOM&&o===pt.TIME,c=this.services.zoom.isZoomBarLocked(Z.TOP),u=!!this.model.getOptions().title,d={id:"title",components:[new Ts(this.model,this.services)],growth:xt.STRETCH},h={id:"toolbar",components:[new cl(this.model,this.services)],growth:xt.PREFERRED},p={id:"header",components:[new Je(this.model,this.services,[d,...a?[h]:[]],{direction:qt.ROW,alignItems:Br.CENTER})],growth:xt.PREFERRED},f={id:"legend",components:[new mh(this.model,this.services)],growth:xt.PREFERRED};l&&!c&&t.push(new Lv(this.model,this.services),new eD(this.model,this.services)),t.push(new rD(this.model,this.services)),t.push(new iD(this.model,this.services));const v={id:"graph-frame",components:t,growth:xt.STRETCH,renderType:ft.SVG},m=_(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1;let y=qt.COLUMN;if(m){const S=_(this.model.getOptions(),"legend","position");S===Ti.LEFT?(y=qt.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=Oi.VERTICAL)):S===Ti.RIGHT?(y=qt.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=Oi.VERTICAL)):S===Ti.BOTTOM&&(y=qt.COLUMN_REVERSE)}const g={id:"spacer",components:[new mr(this.model,this.services)],growth:xt.PREFERRED},x={id:"full-frame",components:[new Je(this.model,this.services,[...m?[f]:[],...m?[g]:[],v],{direction:y})],growth:xt.STRETCH},O={id:"zoom-bar",components:[new nD(this.model,this.services)],growth:xt.PREFERRED,renderType:ft.SVG},T=[];if(u||a){T.push(p);const S={id:"spacer",components:[new mr(this.model,this.services,a?{size:15}:void 0)],growth:xt.PREFERRED};T.push(S)}return l&&T.push(O),T.push(x),[new Pv(this.model,this.services),new ul(this.model,this.services),new Je(this.model,this.services,T,{direction:qt.COLUMN})]}}class RU extends Cn{constructor(t,n){super(t,n),this.model=new yC(this.services),this.model.setOptions(ne(Xt.alluvialChart,n.options)),this.init(t,n)}getComponents(){const t=[new OD(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})}}class kU extends je{constructor(t,n){super(t,n),this.model.setOptions(ne(Qn(Xt.areaChart),n.options)),this.init(t,n)}getComponents(){const t=[new ze(this.model,this.services),new tn(this.model,this.services),new wr(this.model,this.services),new ia(this.model,this.services),new Wv(this.model,this.services),new zn(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0}),new Ue(this.model,this.services,{skeleton:ge.GRID})];return this.getAxisChartComponents(t)}}class LU extends je{constructor(t,n){super(t,n),this.model=new bC(this.services),this.model.setOptions(ne(Xt.boxplotChart,n.options)),this.init(t,n)}getComponents(){const t=[new ze(this.model,this.services),new tn(this.model,this.services),new $D(this.model,this.services),new aa(this.model,this.services),new Ue(this.model,this.services,{skeleton:ge.VERT_OR_HORIZ})];return this.getAxisChartComponents(t,{legend:{enabled:!1}})}}class DU extends je{constructor(t,n){super(t,n),this.model.setOptions(ne(Xt.bubbleChart,n.options)),this.init(t,n)}getComponents(){const t=[new ze(this.model,this.services),new tn(this.model,this.services),new wr(this.model,this.services),new CD(this.model,this.services),new Ue(this.model,this.services,{skeleton:ge.GRID})];return this.getAxisChartComponents(t)}}class IU extends je{constructor(t,n){super(t,n),this.model=new _C(this.services),this.model.setOptions(ne(Xt.bulletChart,n.options)),this.init(t,n)}getComponents(){const t=[new ze(this.model,this.services),new tn(this.model,this.services),new MD(this.model,this.services),new Ue(this.model,this.services,{skeleton:ge.GRID})];return this.getAxisChartComponents(t)}}class NU extends Cn{constructor(t,n){super(t,n),this.model=new xC(this.services),this.model.setOptions(ne(Xt.choroplethChart,n.options)),this.init(t,n)}getChartComponents(t,n){const r=this.model.getOptions(),i=_(r,"toolbar","enabled"),a=!!this.model.getOptions().title,s={id:"title",components:[new Ts(this.model,this.services)],growth:xt.STRETCH},o={id:"toolbar",components:[new cl(this.model,this.services)],growth:xt.PREFERRED},l={id:"header",components:[new Je(this.model,this.services,[s,...i?[o]:[]],{direction:qt.ROW,alignItems:Br.CENTER})],growth:xt.PREFERRED},c={id:"legend",components:[new Zv(this.model,this.services,{chartType:"choropleth"})],growth:xt.PREFERRED,renderType:ft.SVG},u={id:"graph-frame",components:t,growth:xt.STRETCH,renderType:ft.SVG},d=_(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1&&this.model.getData().length>0,h=qt.COLUMN_REVERSE,p={id:"spacer",components:[new mr(this.model,this.services,{size:15})],growth:xt.PREFERRED},f={id:"full-frame",components:[new Je(this.model,this.services,[...d?[c]:[],...d?[p]:[],u],{direction:h})],growth:xt.STRETCH},v=[];if(a||i){v.push(l);const m={id:"spacer",components:[new mr(this.model,this.services,i?{size:15}:void 0)],growth:xt.PREFERRED};v.push(m)}return v.push(f),[new gh(this.model,this.services),new ul(this.model,this.services),new Je(this.model,this.services,v,{direction:qt.COLUMN})]}getComponents(){const t=[new i3(this.model,this.services)];return this.getChartComponents(t)}}class PU extends Cn{constructor(t,n){super(t,n),this.model=new EC(this.services),this.model.setOptions(ne(Xt.circlePackChart,n.options)),this.init(t,n)}getComponents(){const t=[new YD(this.model,this.services)];return this.getChartComponents(t)}}const W0={[We.LINE]:[ia,zn],[We.SCATTER]:[zn],[We.AREA]:[Wv,ia,zn],[We.STACKED_AREA]:[n0,ia,i0,fl],[We.SIMPLE_BAR]:[e0],[We.GROUPED_BAR]:[t0,aa],[We.STACKED_BAR]:[r0,fl]};class UU extends je{constructor(t,n){super(t,n);const r=ne(Xt.comboChart,n.options);n.options.comboChartTypes||(console.error("No comboChartTypes defined for the Combo Chart!"),r.comboChartTypes=[{type:We.LINE,correspondingDatasets:[]}]),this.model.setOptions(r),this.init(t,n)}getGraphComponents(){const{comboChartTypes:t}=this.model.getOptions();let n=0;const r=t.map(i=>{const a=i.type;let s;if(typeof i.type=="string"){if(!Object.keys(W0).includes(i.type))return console.error(`Invalid chart type "${i.type}" specified for combo chart. Please refer to the ComboChart tutorial for more guidance.`),null;let o=!1;const l=`${AU(i.type)}Chart`;return s=yt({},Xt[l],this.model.getOptions(),i.options),i.type===We.STACKED_AREA&&(o=!0),W0[i.type].map(c=>new c(this.model,this.services,{groups:i.correspondingDatasets,id:n++,options:s,stacked:o}))}else return s=yt({},this.model.getOptions(),i.options),new a(this.model,this.services,{groups:i.correspondingDatasets,id:n++,options:s})}).filter(i=>i!==null);return Sh(r)}getComponents(){const{comboChartTypes:t}=this.model.getOptions(),n=t.some(i=>i.type===We.STACKED_BAR||i.type===We.STACKED_AREA),r=[new ze(this.model,this.services),new tn(this.model,this.services),new Ue(this.model,this.services,{skeleton:ge.GRID}),...n?[]:[new wr(this.model,this.services)],...this.getGraphComponents()];return this.getAxisChartComponents(r)}}class Y0 extends Cn{constructor(t,n,r=!1){super(t,n),this.model=new TC(this.services),!r&&(this.model.setOptions(ne(Xt.pieChart,n.options)),this.init(t,n))}getComponents(){const t=[new Kv(this.model,this.services),new Ue(this.model,this.services,{skeleton:ge.PIE})];return this.getChartComponents(t)}}class BU extends Y0{constructor(t,n){super(t,n,!0),this.model.setOptions(ne(Xt.donutChart,n.options)),this.init(t,n)}getComponents(){const t=[new XD(this.model,this.services),new Ue(this.model,this.services,{skeleton:ge.DONUT})];return this.getChartComponents(t)}}class HU extends Cn{constructor(t,n){super(t,n),this.model=new OC(this.services),this.model.setOptions(ne(Xt.gaugeChart,n.options)),this.init(t,n)}getComponents(){const t=[new ZD(this.model,this.services)];return this.getChartComponents(t)}}class VU extends je{constructor(t,n){super(t,n),this.model.setOptions(ne(Xt.groupedBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new ze(this.model,this.services),new tn(this.model,this.services),new t0(this.model,this.services),new aa(this.model,this.services),new Ue(this.model,this.services,{skeleton:ge.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}class FU extends je{constructor(t,n){super(t,n),this.model=new SC(this.services),this.model.setOptions(ne(Xt.heatmapChart,n.options)),this.init(t,n)}getAxisChartComponents(t,n){const r=this.model.getOptions(),i=_(r,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const a=!!this.model.getOptions().title,s={id:"title",components:[new Ts(this.model,this.services)],growth:xt.STRETCH},o={id:"toolbar",components:[new cl(this.model,this.services)],growth:xt.PREFERRED},l={id:"header",components:[new Je(this.model,this.services,[s,...i?[o]:[]],{direction:qt.ROW,alignItems:Br.CENTER})],growth:xt.PREFERRED},c={id:"legend",components:[new Zv(this.model,this.services,{chartType:"heatmap"})],growth:xt.PREFERRED,renderType:ft.SVG},u={id:"graph-frame",components:t,growth:xt.STRETCH,renderType:ft.SVG},d=_(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1&&this.model.getData().length>0,h=qt.COLUMN_REVERSE,p={id:"spacer",components:[new mr(this.model,this.services,{size:15})],growth:xt.PREFERRED},f={id:"full-frame",components:[new Je(this.model,this.services,[...d?[c]:[],...d?[p]:[],u],{direction:h})],growth:xt.STRETCH},v=[];if(a||i){v.push(l);const m={id:"spacer",components:[new mr(this.model,this.services,i?{size:15}:void 0)],growth:xt.PREFERRED};v.push(m)}return v.push(f),[new Pv(this.model,this.services),new ul(this.model,this.services),new Je(this.model,this.services,v,{direction:qt.COLUMN})]}getComponents(){const t=[new ze(this.model,this.services),new KD(this.model,this.services)];return this.getAxisChartComponents(t)}}class GU extends je{constructor(t,n){super(t,n),this.model=new wC(this.services),this.model.setOptions(ne(Xt.histogramChart,n.options)),this.init(t,n),this.update()}getComponents(){const t=[new ze(this.model,this.services),new tn(this.model,this.services),new UD(this.model,this.services),new QD(this.model,this.services)];return this.getAxisChartComponents(t)}}class zU extends je{constructor(t,n){super(t,n),this.model.setOptions(ne(Xt.lineChart,n.options)),this.init(t,n)}getComponents(){const t=[new ze(this.model,this.services),new tn(this.model,this.services),new wr(this.model,this.services),new ia(this.model,this.services),new zn(this.model,this.services,{handleThresholds:!0}),new nI(this.model,this.services),new aa(this.model,this.services)];return this.getAxisChartComponents(t)}}class jU extends je{constructor(t,n){super(t,n),this.model.setOptions(ne(Xt.lollipopChart,n.options)),this.init(t,n)}getComponents(){const t=[new ze(this.model,this.services),new tn(this.model,this.services),new wr(this.model,this.services),new JD(this.model,this.services),new zn(this.model,this.services),new Ue(this.model,this.services,{skeleton:ge.GRID})];return this.getAxisChartComponents(t)}}class WU extends Cn{constructor(t,n){var r;super(t,n),this.model=new $C(this.services);const i=(r=n.options.meter)!=null&&r.proportional?yt(Qn(Xt.proportionalMeterChart),n.options):yt(Qn(Xt.meterChart),n.options);this.model.setOptions(i),this.init(t,n)}getComponents(){const t=[..._(this.model.getOptions(),"meter","showLabels")?[{id:"meter-title",components:[new WD(this.model,this.services)],growth:xt.STRETCH,renderType:ft.SVG},{id:"spacer",components:[new mr(this.model,this.services,{size:8})],growth:xt.STRETCH}]:[],{id:"meter-graph",components:[new tI(this.model,this.services)],growth:xt.STRETCH,renderType:ft.SVG}],n=[new Je(this.model,this.services,t,{direction:qt.COLUMN})];return this.getChartComponents(n,{graphFrameRenderType:ft.HTML})}}class YU extends Cn{constructor(t,n){super(t,n),this.model=new CC(this.services),this.model.setOptions(ne(Xt.radarChart,n.options)),this.init(t,n)}getComponents(){const t=[new eI(this.model,this.services)];return this.getChartComponents(t)}}class qU extends je{constructor(t,n){super(t,n),this.model.setOptions(ne(Xt.scatterChart,n.options)),this.init(t,n)}getComponents(){const t=[new ze(this.model,this.services),new tn(this.model,this.services),new wr(this.model,this.services),new zn(this.model,this.services),new Ue(this.model,this.services,{skeleton:ge.GRID})];return this.getAxisChartComponents(t)}}class XU extends Cn{constructor(t,n){super(t,n),this.model=new MC(this.services),this.model.setOptions(ne(Xt.treeChart,n.options)),this.init(t,n)}getComponents(){const t=[new rI(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})}}class ZU extends Cn{constructor(t,n){super(t,n),this.model=new AC(this.services),this.model.setOptions(ne(Xt.treemapChart,n.options)),this.init(t,n)}getComponents(){const t=[new kP(this.model,this.services)];return this.getChartComponents(t)}}class KU extends je{constructor(t,n){super(t,n),this.model.setOptions(ne(Xt.simpleBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new ze(this.model,this.services),new tn(this.model,this.services),new e0(this.model,this.services),new aa(this.model,this.services),new Ue(this.model,this.services,{skeleton:ge.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}class QU extends je{constructor(t,n){super(t,n),this.model.setOptions(ne(Xt.stackedAreaChart,n.options)),this.init(t,n)}getComponents(){const t=[new ze(this.model,this.services),new tn(this.model,this.services),new fl(this.model,this.services),new n0(this.model,this.services),new ia(this.model,this.services,{stacked:!0}),new i0(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0}),new Ue(this.model,this.services,{skeleton:ge.GRID})];return this.getAxisChartComponents(t)}}class JU extends je{constructor(t,n){super(t,n),this.model.setOptions(ne(Xt.stackedBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new ze(this.model,this.services),new tn(this.model,this.services),new fl(this.model,this.services),new r0(this.model,this.services),new Ue(this.model,this.services,{skeleton:ge.VERT_OR_HORIZ}),new aa(this.model,this.services)];return this.getAxisChartComponents(t)}}class tB extends Cn{constructor(t,n){super(t,n),this.model=new RC(this.services),this.model.setOptions(ne(Xt.wordCloudChart,n.options)),this.init(t,n)}getComponents(){const t=[new n3(this.model,this.services),new Ue(this.model,this.services,{skeleton:ge.PIE})];return this.getChartComponents(t)}}function q0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ph={exports:{}},ws={},El={exports:{}},wt={};/**
74
+ * @license React
75
+ * react.production.min.js
76
+ *
77
+ * Copyright (c) Facebook, Inc. and its affiliates.
78
+ *
79
+ * This source code is licensed under the MIT license found in the
80
+ * LICENSE file in the root directory of this source tree.
81
+ */var X0;function eB(){if(X0)return wt;X0=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),d=Symbol.iterator;function h(A){return A===null||typeof A!="object"?null:(A=d&&A[d]||A["@@iterator"],typeof A=="function"?A:null)}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,v={};function m(A,j,et){this.props=A,this.context=j,this.refs=v,this.updater=et||p}m.prototype.isReactComponent={},m.prototype.setState=function(A,j){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,j,"setState")},m.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function y(){}y.prototype=m.prototype;function g(A,j,et){this.props=A,this.context=j,this.refs=v,this.updater=et||p}var x=g.prototype=new y;x.constructor=g,f(x,m.prototype),x.isPureReactComponent=!0;var O=Array.isArray,T=Object.prototype.hasOwnProperty,S={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function P(A,j,et){var ct,it={},J=null,at=null;if(j!=null)for(ct in j.ref!==void 0&&(at=j.ref),j.key!==void 0&&(J=""+j.key),j)T.call(j,ct)&&!D.hasOwnProperty(ct)&&(it[ct]=j[ct]);var ht=arguments.length-2;if(ht===1)it.children=et;else if(1<ht){for(var Y=Array(ht),lt=0;lt<ht;lt++)Y[lt]=arguments[lt+2];it.children=Y}if(A&&A.defaultProps)for(ct in ht=A.defaultProps,ht)it[ct]===void 0&&(it[ct]=ht[ct]);return{$$typeof:e,type:A,key:J,ref:at,props:it,_owner:S.current}}function I(A,j){return{$$typeof:e,type:A.type,key:j,ref:A.ref,props:A.props,_owner:A._owner}}function N(A){return typeof A=="object"&&A!==null&&A.$$typeof===e}function M(A){var j={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(et){return j[et]})}var q=/\/+/g;function H(A,j){return typeof A=="object"&&A!==null&&A.key!=null?M(""+A.key):j.toString(36)}function G(A,j,et,ct,it){var J=typeof A;(J==="undefined"||J==="boolean")&&(A=null);var at=!1;if(A===null)at=!0;else switch(J){case"string":case"number":at=!0;break;case"object":switch(A.$$typeof){case e:case t:at=!0}}if(at)return at=A,it=it(at),A=ct===""?"."+H(at,0):ct,O(it)?(et="",A!=null&&(et=A.replace(q,"$&/")+"/"),G(it,j,et,"",function(lt){return lt})):it!=null&&(N(it)&&(it=I(it,et+(!it.key||at&&at.key===it.key?"":(""+it.key).replace(q,"$&/")+"/")+A)),j.push(it)),1;if(at=0,ct=ct===""?".":ct+":",O(A))for(var ht=0;ht<A.length;ht++){J=A[ht];var Y=ct+H(J,ht);at+=G(J,j,et,Y,it)}else if(Y=h(A),typeof Y=="function")for(A=Y.call(A),ht=0;!(J=A.next()).done;)J=J.value,Y=ct+H(J,ht++),at+=G(J,j,et,Y,it);else if(J==="object")throw j=String(A),Error("Objects are not valid as a React child (found: "+(j==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":j)+"). If you meant to render a collection of children, use an array instead.");return at}function E(A,j,et){if(A==null)return A;var ct=[],it=0;return G(A,ct,"","",function(J){return j.call(et,J,it++)}),ct}function L(A){if(A._status===-1){var j=A._result;j=j(),j.then(function(et){(A._status===0||A._status===-1)&&(A._status=1,A._result=et)},function(et){(A._status===0||A._status===-1)&&(A._status=2,A._result=et)}),A._status===-1&&(A._status=0,A._result=j)}if(A._status===1)return A._result.default;throw A._result}var $={current:null},V={transition:null},F={ReactCurrentDispatcher:$,ReactCurrentBatchConfig:V,ReactCurrentOwner:S};function rt(){throw Error("act(...) is not supported in production builds of React.")}return wt.Children={map:E,forEach:function(A,j,et){E(A,function(){j.apply(this,arguments)},et)},count:function(A){var j=0;return E(A,function(){j++}),j},toArray:function(A){return E(A,function(j){return j})||[]},only:function(A){if(!N(A))throw Error("React.Children.only expected to receive a single React element child.");return A}},wt.Component=m,wt.Fragment=n,wt.Profiler=i,wt.PureComponent=g,wt.StrictMode=r,wt.Suspense=l,wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=F,wt.act=rt,wt.cloneElement=function(A,j,et){if(A==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+A+".");var ct=f({},A.props),it=A.key,J=A.ref,at=A._owner;if(j!=null){if(j.ref!==void 0&&(J=j.ref,at=S.current),j.key!==void 0&&(it=""+j.key),A.type&&A.type.defaultProps)var ht=A.type.defaultProps;for(Y in j)T.call(j,Y)&&!D.hasOwnProperty(Y)&&(ct[Y]=j[Y]===void 0&&ht!==void 0?ht[Y]:j[Y])}var Y=arguments.length-2;if(Y===1)ct.children=et;else if(1<Y){ht=Array(Y);for(var lt=0;lt<Y;lt++)ht[lt]=arguments[lt+2];ct.children=ht}return{$$typeof:e,type:A.type,key:it,ref:J,props:ct,_owner:at}},wt.createContext=function(A){return A={$$typeof:s,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},A.Provider={$$typeof:a,_context:A},A.Consumer=A},wt.createElement=P,wt.createFactory=function(A){var j=P.bind(null,A);return j.type=A,j},wt.createRef=function(){return{current:null}},wt.forwardRef=function(A){return{$$typeof:o,render:A}},wt.isValidElement=N,wt.lazy=function(A){return{$$typeof:u,_payload:{_status:-1,_result:A},_init:L}},wt.memo=function(A,j){return{$$typeof:c,type:A,compare:j===void 0?null:j}},wt.startTransition=function(A){var j=V.transition;V.transition={};try{A()}finally{V.transition=j}},wt.unstable_act=rt,wt.useCallback=function(A,j){return $.current.useCallback(A,j)},wt.useContext=function(A){return $.current.useContext(A)},wt.useDebugValue=function(){},wt.useDeferredValue=function(A){return $.current.useDeferredValue(A)},wt.useEffect=function(A,j){return $.current.useEffect(A,j)},wt.useId=function(){return $.current.useId()},wt.useImperativeHandle=function(A,j,et){return $.current.useImperativeHandle(A,j,et)},wt.useInsertionEffect=function(A,j){return $.current.useInsertionEffect(A,j)},wt.useLayoutEffect=function(A,j){return $.current.useLayoutEffect(A,j)},wt.useMemo=function(A,j){return $.current.useMemo(A,j)},wt.useReducer=function(A,j,et){return $.current.useReducer(A,j,et)},wt.useRef=function(A){return $.current.useRef(A)},wt.useState=function(A){return $.current.useState(A)},wt.useSyncExternalStore=function(A,j,et){return $.current.useSyncExternalStore(A,j,et)},wt.useTransition=function(){return $.current.useTransition()},wt.version="18.3.1",wt}var $s={exports:{}};/**
82
+ * @license React
83
+ * react.development.js
84
+ *
85
+ * Copyright (c) Facebook, Inc. and its affiliates.
86
+ *
87
+ * This source code is licensed under the MIT license found in the
88
+ * LICENSE file in the root directory of this source tree.
89
+ */$s.exports;var Z0;function nB(){return Z0||(Z0=1,function(e,t){process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var n="18.3.1",r=Symbol.for("react.element"),i=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),m=Symbol.iterator,y="@@iterator";function g(b){if(b===null||typeof b!="object")return null;var R=m&&b[m]||b[y];return typeof R=="function"?R:null}var x={current:null},O={transition:null},T={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},S={current:null},D={},P=null;function I(b){P=b}D.setExtraStackFrame=function(b){P=b},D.getCurrentStack=null,D.getStackAddendum=function(){var b="";P&&(b+=P);var R=D.getCurrentStack;return R&&(b+=R()||""),b};var N=!1,M=!1,q=!1,H=!1,G=!1,E={ReactCurrentDispatcher:x,ReactCurrentBatchConfig:O,ReactCurrentOwner:S};E.ReactDebugCurrentFrame=D,E.ReactCurrentActQueue=T;function L(b){{for(var R=arguments.length,z=new Array(R>1?R-1:0),W=1;W<R;W++)z[W-1]=arguments[W];V("warn",b,z)}}function $(b){{for(var R=arguments.length,z=new Array(R>1?R-1:0),W=1;W<R;W++)z[W-1]=arguments[W];V("error",b,z)}}function V(b,R,z){{var W=E.ReactDebugCurrentFrame,st=W.getStackAddendum();st!==""&&(R+="%s",z=z.concat([st]));var bt=z.map(function(dt){return String(dt)});bt.unshift("Warning: "+R),Function.prototype.apply.call(console[b],console,bt)}}var F={};function rt(b,R){{var z=b.constructor,W=z&&(z.displayName||z.name)||"ReactClass",st=W+"."+R;if(F[st])return;$("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",R,W),F[st]=!0}}var A={isMounted:function(b){return!1},enqueueForceUpdate:function(b,R,z){rt(b,"forceUpdate")},enqueueReplaceState:function(b,R,z,W){rt(b,"replaceState")},enqueueSetState:function(b,R,z,W){rt(b,"setState")}},j=Object.assign,et={};Object.freeze(et);function ct(b,R,z){this.props=b,this.context=R,this.refs=et,this.updater=z||A}ct.prototype.isReactComponent={},ct.prototype.setState=function(b,R){if(typeof b!="object"&&typeof b!="function"&&b!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,b,R,"setState")},ct.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};{var it={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},J=function(b,R){Object.defineProperty(ct.prototype,b,{get:function(){L("%s(...) is deprecated in plain JavaScript React classes. %s",R[0],R[1])}})};for(var at in it)it.hasOwnProperty(at)&&J(at,it[at])}function ht(){}ht.prototype=ct.prototype;function Y(b,R,z){this.props=b,this.context=R,this.refs=et,this.updater=z||A}var lt=Y.prototype=new ht;lt.constructor=Y,j(lt,ct.prototype),lt.isPureReactComponent=!0;function _t(){var b={current:null};return Object.seal(b),b}var K=Array.isArray;function Dt(b){return K(b)}function Ot(b){{var R=typeof Symbol=="function"&&Symbol.toStringTag,z=R&&b[Symbol.toStringTag]||b.constructor.name||"Object";return z}}function Jt(b){try{return Yt(b),!1}catch{return!0}}function Yt(b){return""+b}function ut(b){if(Jt(b))return $("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ot(b)),Yt(b)}function Nt(b,R,z){var W=b.displayName;if(W)return W;var st=R.displayName||R.name||"";return st!==""?z+"("+st+")":z}function Te(b){return b.displayName||"Context"}function he(b){if(b==null)return null;if(typeof b.tag=="number"&&$("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof b=="function")return b.displayName||b.name||null;if(typeof b=="string")return b;switch(b){case a:return"Fragment";case i:return"Portal";case o:return"Profiler";case s:return"StrictMode";case d:return"Suspense";case h:return"SuspenseList"}if(typeof b=="object")switch(b.$$typeof){case c:var R=b;return Te(R)+".Consumer";case l:var z=b;return Te(z._context)+".Provider";case u:return Nt(b,b.render,"ForwardRef");case p:var W=b.displayName||null;return W!==null?W:he(b.type)||"Memo";case f:{var st=b,bt=st._payload,dt=st._init;try{return he(dt(bt))}catch{return null}}}return null}var jn=Object.prototype.hasOwnProperty,Ar={key:!0,ref:!0,__self:!0,__source:!0},Rr,Wn,en;en={};function mn(b){if(jn.call(b,"ref")){var R=Object.getOwnPropertyDescriptor(b,"ref").get;if(R&&R.isReactWarning)return!1}return b.ref!==void 0}function Mn(b){if(jn.call(b,"key")){var R=Object.getOwnPropertyDescriptor(b,"key").get;if(R&&R.isReactWarning)return!1}return b.key!==void 0}function oa(b,R){var z=function(){Rr||(Rr=!0,$("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",R))};z.isReactWarning=!0,Object.defineProperty(b,"key",{get:z,configurable:!0})}function mi(b,R){var z=function(){Wn||(Wn=!0,$("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",R))};z.isReactWarning=!0,Object.defineProperty(b,"ref",{get:z,configurable:!0})}function kr(b){if(typeof b.ref=="string"&&S.current&&b.__self&&S.current.stateNode!==b.__self){var R=he(S.current.type);en[R]||($('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',R,b.ref),en[R]=!0)}}var Yn=function(b,R,z,W,st,bt,dt){var Et={$$typeof:r,type:b,key:R,ref:z,props:dt,_owner:bt};return Et._store={},Object.defineProperty(Et._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Et,"_self",{configurable:!1,enumerable:!1,writable:!1,value:W}),Object.defineProperty(Et,"_source",{configurable:!1,enumerable:!1,writable:!1,value:st}),Object.freeze&&(Object.freeze(Et.props),Object.freeze(Et)),Et};function Lr(b,R,z){var W,st={},bt=null,dt=null,Et=null,Lt=null;if(R!=null){mn(R)&&(dt=R.ref,kr(R)),Mn(R)&&(ut(R.key),bt=""+R.key),Et=R.__self===void 0?null:R.__self,Lt=R.__source===void 0?null:R.__source;for(W in R)jn.call(R,W)&&!Ar.hasOwnProperty(W)&&(st[W]=R[W])}var Zt=arguments.length-2;if(Zt===1)st.children=z;else if(Zt>1){for(var ie=Array(Zt),ae=0;ae<Zt;ae++)ie[ae]=arguments[ae+2];Object.freeze&&Object.freeze(ie),st.children=ie}if(b&&b.defaultProps){var oe=b.defaultProps;for(W in oe)st[W]===void 0&&(st[W]=oe[W])}if(bt||dt){var ye=typeof b=="function"?b.displayName||b.name||"Unknown":b;bt&&oa(st,ye),dt&&mi(st,ye)}return Yn(b,bt,dt,Et,Lt,S.current,st)}function Dr(b,R){var z=Yn(b.type,R,b.ref,b._self,b._source,b._owner,b.props);return z}function nn(b,R,z){if(b==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+b+".");var W,st=j({},b.props),bt=b.key,dt=b.ref,Et=b._self,Lt=b._source,Zt=b._owner;if(R!=null){mn(R)&&(dt=R.ref,Zt=S.current),Mn(R)&&(ut(R.key),bt=""+R.key);var ie;b.type&&b.type.defaultProps&&(ie=b.type.defaultProps);for(W in R)jn.call(R,W)&&!Ar.hasOwnProperty(W)&&(R[W]===void 0&&ie!==void 0?st[W]=ie[W]:st[W]=R[W])}var ae=arguments.length-2;if(ae===1)st.children=z;else if(ae>1){for(var oe=Array(ae),ye=0;ye<ae;ye++)oe[ye]=arguments[ye+2];st.children=oe}return Yn(b.type,bt,dt,Et,Lt,Zt,st)}function Be(b){return typeof b=="object"&&b!==null&&b.$$typeof===r}var Ir=".",gi=":";function Ms(b){var R=/[=:]/g,z={"=":"=0",":":"=2"},W=b.replace(R,function(st){return z[st]});return"$"+W}var An=!1,gr=/\/+/g;function Rn(b){return b.replace(gr,"$&/")}function rn(b,R){return typeof b=="object"&&b!==null&&b.key!=null?(ut(b.key),Ms(""+b.key)):R.toString(36)}function qn(b,R,z,W,st){var bt=typeof b;(bt==="undefined"||bt==="boolean")&&(b=null);var dt=!1;if(b===null)dt=!0;else switch(bt){case"string":case"number":dt=!0;break;case"object":switch(b.$$typeof){case r:case i:dt=!0}}if(dt){var Et=b,Lt=st(Et),Zt=W===""?Ir+rn(Et,0):W;if(Dt(Lt)){var ie="";Zt!=null&&(ie=Rn(Zt)+"/"),qn(Lt,R,ie,"",function(uH){return uH})}else Lt!=null&&(Be(Lt)&&(Lt.key&&(!Et||Et.key!==Lt.key)&&ut(Lt.key),Lt=Dr(Lt,z+(Lt.key&&(!Et||Et.key!==Lt.key)?Rn(""+Lt.key)+"/":"")+Zt)),R.push(Lt));return 1}var ae,oe,ye=0,we=W===""?Ir:W+gi;if(Dt(b))for(var Ml=0;Ml<b.length;Ml++)ae=b[Ml],oe=we+rn(ae,Ml),ye+=qn(ae,R,z,oe,st);else{var Wh=g(b);if(typeof Wh=="function"){var Oy=b;Wh===Oy.entries&&(An||L("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),An=!0);for(var lH=Wh.call(Oy),Sy,cH=0;!(Sy=lH.next()).done;)ae=Sy.value,oe=we+rn(ae,cH++),ye+=qn(ae,R,z,oe,st)}else if(bt==="object"){var wy=String(b);throw new Error("Objects are not valid as a React child (found: "+(wy==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":wy)+"). If you meant to render a collection of children, use an array instead.")}}return ye}function vr(b,R,z){if(b==null)return b;var W=[],st=0;return qn(b,W,"","",function(bt){return R.call(z,bt,st++)}),W}function de(b){var R=0;return vr(b,function(){R++}),R}function kn(b,R,z){vr(b,function(){R.apply(this,arguments)},z)}function As(b){return vr(b,function(R){return R})||[]}function vi(b){if(!Be(b))throw new Error("React.Children.only expected to receive a single React element child.");return b}function Nr(b){var R={$$typeof:c,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};R.Provider={$$typeof:l,_context:R};var z=!1,W=!1,st=!1;{var bt={$$typeof:c,_context:R};Object.defineProperties(bt,{Provider:{get:function(){return W||(W=!0,$("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),R.Provider},set:function(dt){R.Provider=dt}},_currentValue:{get:function(){return R._currentValue},set:function(dt){R._currentValue=dt}},_currentValue2:{get:function(){return R._currentValue2},set:function(dt){R._currentValue2=dt}},_threadCount:{get:function(){return R._threadCount},set:function(dt){R._threadCount=dt}},Consumer:{get:function(){return z||(z=!0,$("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),R.Consumer}},displayName:{get:function(){return R.displayName},set:function(dt){st||(L("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",dt),st=!0)}}}),R.Consumer=bt}return R._currentRenderer=null,R._currentRenderer2=null,R}var Xn=-1,Pr=0,yi=1,gn=2;function Ur(b){if(b._status===Xn){var R=b._result,z=R();if(z.then(function(bt){if(b._status===Pr||b._status===Xn){var dt=b;dt._status=yi,dt._result=bt}},function(bt){if(b._status===Pr||b._status===Xn){var dt=b;dt._status=gn,dt._result=bt}}),b._status===Xn){var W=b;W._status=Pr,W._result=z}}if(b._status===yi){var st=b._result;return st===void 0&&$(`lazy: Expected the result of a dynamic import() call. Instead received: %s
90
+
91
+ Your code should look like:
92
+ const MyComponent = lazy(() => import('./MyComponent'))
93
+
94
+ Did you accidentally put curly braces around the import?`,st),"default"in st||$(`lazy: Expected the result of a dynamic import() call. Instead received: %s
95
+
96
+ Your code should look like:
97
+ const MyComponent = lazy(() => import('./MyComponent'))`,st),st.default}else throw b._result}function la(b){var R={_status:Xn,_result:b},z={$$typeof:f,_payload:R,_init:Ur};{var W,st;Object.defineProperties(z,{defaultProps:{configurable:!0,get:function(){return W},set:function(bt){$("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),W=bt,Object.defineProperty(z,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return st},set:function(bt){$("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),st=bt,Object.defineProperty(z,"propTypes",{enumerable:!0})}}})}return z}function ca(b){b!=null&&b.$$typeof===p?$("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof b!="function"?$("forwardRef requires a render function but was given %s.",b===null?"null":typeof b):b.length!==0&&b.length!==2&&$("forwardRef render functions accept exactly two parameters: props and ref. %s",b.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),b!=null&&(b.defaultProps!=null||b.propTypes!=null)&&$("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var R={$$typeof:u,render:b};{var z;Object.defineProperty(R,"displayName",{enumerable:!1,configurable:!0,get:function(){return z},set:function(W){z=W,!b.name&&!b.displayName&&(b.displayName=W)}})}return R}var bi;bi=Symbol.for("react.module.reference");function k(b){return!!(typeof b=="string"||typeof b=="function"||b===a||b===o||G||b===s||b===d||b===h||H||b===v||N||M||q||typeof b=="object"&&b!==null&&(b.$$typeof===f||b.$$typeof===p||b.$$typeof===l||b.$$typeof===c||b.$$typeof===u||b.$$typeof===bi||b.getModuleId!==void 0))}function Q(b,R){k(b)||$("memo: The first argument must be a component. Instead received: %s",b===null?"null":typeof b);var z={$$typeof:p,type:b,compare:R===void 0?null:R};{var W;Object.defineProperty(z,"displayName",{enumerable:!1,configurable:!0,get:function(){return W},set:function(st){W=st,!b.name&&!b.displayName&&(b.displayName=st)}})}return z}function nt(){var b=x.current;return b===null&&$(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
98
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
99
+ 2. You might be breaking the Rules of Hooks
100
+ 3. You might have more than one copy of React in the same app
101
+ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),b}function vt(b){var R=nt();if(b._context!==void 0){var z=b._context;z.Consumer===b?$("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):z.Provider===b&&$("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return R.useContext(b)}function Rt(b){var R=nt();return R.useState(b)}function Pt(b,R,z){var W=nt();return W.useReducer(b,R,z)}function $t(b){var R=nt();return R.useRef(b)}function C(b,R){var z=nt();return z.useEffect(b,R)}function ot(b,R){var z=nt();return z.useInsertionEffect(b,R)}function tt(b,R){var z=nt();return z.useLayoutEffect(b,R)}function gt(b,R){var z=nt();return z.useCallback(b,R)}function Ut(b,R){var z=nt();return z.useMemo(b,R)}function zt(b,R,z){var W=nt();return W.useImperativeHandle(b,R,z)}function _e(b,R){{var z=nt();return z.useDebugValue(b,R)}}function jt(){var b=nt();return b.useTransition()}function ke(b){var R=nt();return R.useDeferredValue(b)}function xe(){var b=nt();return b.useId()}function ua(b,R,z){var W=nt();return W.useSyncExternalStore(b,R,z)}var _i=0,ry,iy,ay,sy,oy,ly,cy;function uy(){}uy.__reactDisabledLog=!0;function zB(){{if(_i===0){ry=console.log,iy=console.info,ay=console.warn,sy=console.error,oy=console.group,ly=console.groupCollapsed,cy=console.groupEnd;var b={configurable:!0,enumerable:!0,value:uy,writable:!0};Object.defineProperties(console,{info:b,log:b,warn:b,error:b,group:b,groupCollapsed:b,groupEnd:b})}_i++}}function jB(){{if(_i--,_i===0){var b={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:j({},b,{value:ry}),info:j({},b,{value:iy}),warn:j({},b,{value:ay}),error:j({},b,{value:sy}),group:j({},b,{value:oy}),groupCollapsed:j({},b,{value:ly}),groupEnd:j({},b,{value:cy})})}_i<0&&$("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Bh=E.ReactCurrentDispatcher,Hh;function Tl(b,R,z){{if(Hh===void 0)try{throw Error()}catch(st){var W=st.stack.trim().match(/\n( *(at )?)/);Hh=W&&W[1]||""}return`
102
+ `+Hh+b}}var Vh=!1,Ol;{var WB=typeof WeakMap=="function"?WeakMap:Map;Ol=new WB}function hy(b,R){if(!b||Vh)return"";{var z=Ol.get(b);if(z!==void 0)return z}var W;Vh=!0;var st=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var bt;bt=Bh.current,Bh.current=null,zB();try{if(R){var dt=function(){throw Error()};if(Object.defineProperty(dt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(dt,[])}catch(we){W=we}Reflect.construct(b,[],dt)}else{try{dt.call()}catch(we){W=we}b.call(dt.prototype)}}else{try{throw Error()}catch(we){W=we}b()}}catch(we){if(we&&W&&typeof we.stack=="string"){for(var Et=we.stack.split(`
103
+ `),Lt=W.stack.split(`
104
+ `),Zt=Et.length-1,ie=Lt.length-1;Zt>=1&&ie>=0&&Et[Zt]!==Lt[ie];)ie--;for(;Zt>=1&&ie>=0;Zt--,ie--)if(Et[Zt]!==Lt[ie]){if(Zt!==1||ie!==1)do if(Zt--,ie--,ie<0||Et[Zt]!==Lt[ie]){var ae=`
105
+ `+Et[Zt].replace(" at new "," at ");return b.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",b.displayName)),typeof b=="function"&&Ol.set(b,ae),ae}while(Zt>=1&&ie>=0);break}}}finally{Vh=!1,Bh.current=bt,jB(),Error.prepareStackTrace=st}var oe=b?b.displayName||b.name:"",ye=oe?Tl(oe):"";return typeof b=="function"&&Ol.set(b,ye),ye}function YB(b,R,z){return hy(b,!1)}function qB(b){var R=b.prototype;return!!(R&&R.isReactComponent)}function Sl(b,R,z){if(b==null)return"";if(typeof b=="function")return hy(b,qB(b));if(typeof b=="string")return Tl(b);switch(b){case d:return Tl("Suspense");case h:return Tl("SuspenseList")}if(typeof b=="object")switch(b.$$typeof){case u:return YB(b.render);case p:return Sl(b.type,R,z);case f:{var W=b,st=W._payload,bt=W._init;try{return Sl(bt(st),R,z)}catch{}}}return""}var dy={},py=E.ReactDebugCurrentFrame;function wl(b){if(b){var R=b._owner,z=Sl(b.type,b._source,R?R.type:null);py.setExtraStackFrame(z)}else py.setExtraStackFrame(null)}function XB(b,R,z,W,st){{var bt=Function.call.bind(jn);for(var dt in b)if(bt(b,dt)){var Et=void 0;try{if(typeof b[dt]!="function"){var Lt=Error((W||"React class")+": "+z+" type `"+dt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof b[dt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Lt.name="Invariant Violation",Lt}Et=b[dt](R,dt,W,z,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Zt){Et=Zt}Et&&!(Et instanceof Error)&&(wl(st),$("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",W||"React class",z,dt,typeof Et),wl(null)),Et instanceof Error&&!(Et.message in dy)&&(dy[Et.message]=!0,wl(st),$("Failed %s type: %s",z,Et.message),wl(null))}}}function ha(b){if(b){var R=b._owner,z=Sl(b.type,b._source,R?R.type:null);I(z)}else I(null)}var Fh;Fh=!1;function fy(){if(S.current){var b=he(S.current.type);if(b)return`
106
+
107
+ Check the render method of \``+b+"`."}return""}function ZB(b){if(b!==void 0){var R=b.fileName.replace(/^.*[\\\/]/,""),z=b.lineNumber;return`
108
+
109
+ Check your code at `+R+":"+z+"."}return""}function KB(b){return b!=null?ZB(b.__source):""}var my={};function QB(b){var R=fy();if(!R){var z=typeof b=="string"?b:b.displayName||b.name;z&&(R=`
110
+
111
+ Check the top-level render call using <`+z+">.")}return R}function gy(b,R){if(!(!b._store||b._store.validated||b.key!=null)){b._store.validated=!0;var z=QB(R);if(!my[z]){my[z]=!0;var W="";b&&b._owner&&b._owner!==S.current&&(W=" It was passed a child from "+he(b._owner.type)+"."),ha(b),$('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',z,W),ha(null)}}}function vy(b,R){if(typeof b=="object"){if(Dt(b))for(var z=0;z<b.length;z++){var W=b[z];Be(W)&&gy(W,R)}else if(Be(b))b._store&&(b._store.validated=!0);else if(b){var st=g(b);if(typeof st=="function"&&st!==b.entries)for(var bt=st.call(b),dt;!(dt=bt.next()).done;)Be(dt.value)&&gy(dt.value,R)}}}function yy(b){{var R=b.type;if(R==null||typeof R=="string")return;var z;if(typeof R=="function")z=R.propTypes;else if(typeof R=="object"&&(R.$$typeof===u||R.$$typeof===p))z=R.propTypes;else return;if(z){var W=he(R);XB(z,b.props,"prop",W,b)}else if(R.PropTypes!==void 0&&!Fh){Fh=!0;var st=he(R);$("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",st||"Unknown")}typeof R.getDefaultProps=="function"&&!R.getDefaultProps.isReactClassApproved&&$("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function JB(b){{for(var R=Object.keys(b.props),z=0;z<R.length;z++){var W=R[z];if(W!=="children"&&W!=="key"){ha(b),$("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",W),ha(null);break}}b.ref!==null&&(ha(b),$("Invalid attribute `ref` supplied to `React.Fragment`."),ha(null))}}function by(b,R,z){var W=k(b);if(!W){var st="";(b===void 0||typeof b=="object"&&b!==null&&Object.keys(b).length===0)&&(st+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var bt=KB(R);bt?st+=bt:st+=fy();var dt;b===null?dt="null":Dt(b)?dt="array":b!==void 0&&b.$$typeof===r?(dt="<"+(he(b.type)||"Unknown")+" />",st=" Did you accidentally export a JSX literal instead of a component?"):dt=typeof b,$("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",dt,st)}var Et=Lr.apply(this,arguments);if(Et==null)return Et;if(W)for(var Lt=2;Lt<arguments.length;Lt++)vy(arguments[Lt],b);return b===a?JB(Et):yy(Et),Et}var _y=!1;function tH(b){var R=by.bind(null,b);return R.type=b,_y||(_y=!0,L("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(R,"type",{enumerable:!1,get:function(){return L("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:b}),b}}),R}function eH(b,R,z){for(var W=nn.apply(this,arguments),st=2;st<arguments.length;st++)vy(arguments[st],W.type);return yy(W),W}function nH(b,R){var z=O.transition;O.transition={};var W=O.transition;O.transition._updatedFibers=new Set;try{b()}finally{if(O.transition=z,z===null&&W._updatedFibers){var st=W._updatedFibers.size;st>10&&L("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),W._updatedFibers.clear()}}}var xy=!1,$l=null;function rH(b){if($l===null)try{var R=("require"+Math.random()).slice(0,7),z=e&&e[R];$l=z.call(e,"timers").setImmediate}catch{$l=function(st){xy===!1&&(xy=!0,typeof MessageChannel>"u"&&$("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var bt=new MessageChannel;bt.port1.onmessage=st,bt.port2.postMessage(void 0)}}return $l(b)}var da=0,Ey=!1;function Ty(b){{var R=da;da++,T.current===null&&(T.current=[]);var z=T.isBatchingLegacy,W;try{if(T.isBatchingLegacy=!0,W=b(),!z&&T.didScheduleLegacyUpdate){var st=T.current;st!==null&&(T.didScheduleLegacyUpdate=!1,jh(st))}}catch(oe){throw Cl(R),oe}finally{T.isBatchingLegacy=z}if(W!==null&&typeof W=="object"&&typeof W.then=="function"){var bt=W,dt=!1,Et={then:function(oe,ye){dt=!0,bt.then(function(we){Cl(R),da===0?Gh(we,oe,ye):oe(we)},function(we){Cl(R),ye(we)})}};return!Ey&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){dt||(Ey=!0,$("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),Et}else{var Lt=W;if(Cl(R),da===0){var Zt=T.current;Zt!==null&&(jh(Zt),T.current=null);var ie={then:function(oe,ye){T.current===null?(T.current=[],Gh(Lt,oe,ye)):oe(Lt)}};return ie}else{var ae={then:function(oe,ye){oe(Lt)}};return ae}}}}function Cl(b){b!==da-1&&$("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),da=b}function Gh(b,R,z){{var W=T.current;if(W!==null)try{jh(W),rH(function(){W.length===0?(T.current=null,R(b)):Gh(b,R,z)})}catch(st){z(st)}else R(b)}}var zh=!1;function jh(b){if(!zh){zh=!0;var R=0;try{for(;R<b.length;R++){var z=b[R];do z=z(!0);while(z!==null)}b.length=0}catch(W){throw b=b.slice(R+1),W}finally{zh=!1}}}var iH=by,aH=eH,sH=tH,oH={map:vr,forEach:kn,count:de,toArray:As,only:vi};t.Children=oH,t.Component=ct,t.Fragment=a,t.Profiler=o,t.PureComponent=Y,t.StrictMode=s,t.Suspense=d,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=E,t.act=Ty,t.cloneElement=aH,t.createContext=Nr,t.createElement=iH,t.createFactory=sH,t.createRef=_t,t.forwardRef=ca,t.isValidElement=Be,t.lazy=la,t.memo=Q,t.startTransition=nH,t.unstable_act=Ty,t.useCallback=gt,t.useContext=vt,t.useDebugValue=_e,t.useDeferredValue=ke,t.useEffect=C,t.useId=xe,t.useImperativeHandle=zt,t.useInsertionEffect=ot,t.useLayoutEffect=tt,t.useMemo=Ut,t.useReducer=Pt,t.useRef=$t,t.useState=Rt,t.useSyncExternalStore=ua,t.useTransition=jt,t.version=n,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}($s,$s.exports)),$s.exports}var K0;function Uh(){return K0||(K0=1,process.env.NODE_ENV==="production"?El.exports=eB():El.exports=nB()),El.exports}/**
112
+ * @license React
113
+ * react-jsx-runtime.production.min.js
114
+ *
115
+ * Copyright (c) Facebook, Inc. and its affiliates.
116
+ *
117
+ * This source code is licensed under the MIT license found in the
118
+ * LICENSE file in the root directory of this source tree.
119
+ */var Q0;function rB(){if(Q0)return ws;Q0=1;var e=Uh(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(o,l,c){var u,d={},h=null,p=null;c!==void 0&&(h=""+c),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(p=l.ref);for(u in l)r.call(l,u)&&!a.hasOwnProperty(u)&&(d[u]=l[u]);if(o&&o.defaultProps)for(u in l=o.defaultProps,l)d[u]===void 0&&(d[u]=l[u]);return{$$typeof:t,type:o,key:h,ref:p,props:d,_owner:i.current}}return ws.Fragment=n,ws.jsx=s,ws.jsxs=s,ws}var Cs={};/**
120
+ * @license React
121
+ * react-jsx-runtime.development.js
122
+ *
123
+ * Copyright (c) Facebook, Inc. and its affiliates.
124
+ *
125
+ * This source code is licensed under the MIT license found in the
126
+ * LICENSE file in the root directory of this source tree.
127
+ */var J0;function iB(){return J0||(J0=1,process.env.NODE_ENV!=="production"&&function(){var e=Uh(),t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),f=Symbol.iterator,v="@@iterator";function m(k){if(k===null||typeof k!="object")return null;var Q=f&&k[f]||k[v];return typeof Q=="function"?Q:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(k){{for(var Q=arguments.length,nt=new Array(Q>1?Q-1:0),vt=1;vt<Q;vt++)nt[vt-1]=arguments[vt];x("error",k,nt)}}function x(k,Q,nt){{var vt=y.ReactDebugCurrentFrame,Rt=vt.getStackAddendum();Rt!==""&&(Q+="%s",nt=nt.concat([Rt]));var Pt=nt.map(function($t){return String($t)});Pt.unshift("Warning: "+Q),Function.prototype.apply.call(console[k],console,Pt)}}var O=!1,T=!1,S=!1,D=!1,P=!1,I;I=Symbol.for("react.module.reference");function N(k){return!!(typeof k=="string"||typeof k=="function"||k===r||k===a||P||k===i||k===c||k===u||D||k===p||O||T||S||typeof k=="object"&&k!==null&&(k.$$typeof===h||k.$$typeof===d||k.$$typeof===s||k.$$typeof===o||k.$$typeof===l||k.$$typeof===I||k.getModuleId!==void 0))}function M(k,Q,nt){var vt=k.displayName;if(vt)return vt;var Rt=Q.displayName||Q.name||"";return Rt!==""?nt+"("+Rt+")":nt}function q(k){return k.displayName||"Context"}function H(k){if(k==null)return null;if(typeof k.tag=="number"&&g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof k=="function")return k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof k=="object")switch(k.$$typeof){case o:var Q=k;return q(Q)+".Consumer";case s:var nt=k;return q(nt._context)+".Provider";case l:return M(k,k.render,"ForwardRef");case d:var vt=k.displayName||null;return vt!==null?vt:H(k.type)||"Memo";case h:{var Rt=k,Pt=Rt._payload,$t=Rt._init;try{return H($t(Pt))}catch{return null}}}return null}var G=Object.assign,E=0,L,$,V,F,rt,A,j;function et(){}et.__reactDisabledLog=!0;function ct(){{if(E===0){L=console.log,$=console.info,V=console.warn,F=console.error,rt=console.group,A=console.groupCollapsed,j=console.groupEnd;var k={configurable:!0,enumerable:!0,value:et,writable:!0};Object.defineProperties(console,{info:k,log:k,warn:k,error:k,group:k,groupCollapsed:k,groupEnd:k})}E++}}function it(){{if(E--,E===0){var k={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:G({},k,{value:L}),info:G({},k,{value:$}),warn:G({},k,{value:V}),error:G({},k,{value:F}),group:G({},k,{value:rt}),groupCollapsed:G({},k,{value:A}),groupEnd:G({},k,{value:j})})}E<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var J=y.ReactCurrentDispatcher,at;function ht(k,Q,nt){{if(at===void 0)try{throw Error()}catch(Rt){var vt=Rt.stack.trim().match(/\n( *(at )?)/);at=vt&&vt[1]||""}return`
128
+ `+at+k}}var Y=!1,lt;{var _t=typeof WeakMap=="function"?WeakMap:Map;lt=new _t}function K(k,Q){if(!k||Y)return"";{var nt=lt.get(k);if(nt!==void 0)return nt}var vt;Y=!0;var Rt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Pt;Pt=J.current,J.current=null,ct();try{if(Q){var $t=function(){throw Error()};if(Object.defineProperty($t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($t,[])}catch(jt){vt=jt}Reflect.construct(k,[],$t)}else{try{$t.call()}catch(jt){vt=jt}k.call($t.prototype)}}else{try{throw Error()}catch(jt){vt=jt}k()}}catch(jt){if(jt&&vt&&typeof jt.stack=="string"){for(var C=jt.stack.split(`
129
+ `),ot=vt.stack.split(`
130
+ `),tt=C.length-1,gt=ot.length-1;tt>=1&&gt>=0&&C[tt]!==ot[gt];)gt--;for(;tt>=1&&gt>=0;tt--,gt--)if(C[tt]!==ot[gt]){if(tt!==1||gt!==1)do if(tt--,gt--,gt<0||C[tt]!==ot[gt]){var Ut=`
131
+ `+C[tt].replace(" at new "," at ");return k.displayName&&Ut.includes("<anonymous>")&&(Ut=Ut.replace("<anonymous>",k.displayName)),typeof k=="function"&&lt.set(k,Ut),Ut}while(tt>=1&&gt>=0);break}}}finally{Y=!1,J.current=Pt,it(),Error.prepareStackTrace=Rt}var zt=k?k.displayName||k.name:"",_e=zt?ht(zt):"";return typeof k=="function"&&lt.set(k,_e),_e}function Dt(k,Q,nt){return K(k,!1)}function Ot(k){var Q=k.prototype;return!!(Q&&Q.isReactComponent)}function Jt(k,Q,nt){if(k==null)return"";if(typeof k=="function")return K(k,Ot(k));if(typeof k=="string")return ht(k);switch(k){case c:return ht("Suspense");case u:return ht("SuspenseList")}if(typeof k=="object")switch(k.$$typeof){case l:return Dt(k.render);case d:return Jt(k.type,Q,nt);case h:{var vt=k,Rt=vt._payload,Pt=vt._init;try{return Jt(Pt(Rt),Q,nt)}catch{}}}return""}var Yt=Object.prototype.hasOwnProperty,ut={},Nt=y.ReactDebugCurrentFrame;function Te(k){if(k){var Q=k._owner,nt=Jt(k.type,k._source,Q?Q.type:null);Nt.setExtraStackFrame(nt)}else Nt.setExtraStackFrame(null)}function he(k,Q,nt,vt,Rt){{var Pt=Function.call.bind(Yt);for(var $t in k)if(Pt(k,$t)){var C=void 0;try{if(typeof k[$t]!="function"){var ot=Error((vt||"React class")+": "+nt+" type `"+$t+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof k[$t]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ot.name="Invariant Violation",ot}C=k[$t](Q,$t,vt,nt,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(tt){C=tt}C&&!(C instanceof Error)&&(Te(Rt),g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",vt||"React class",nt,$t,typeof C),Te(null)),C instanceof Error&&!(C.message in ut)&&(ut[C.message]=!0,Te(Rt),g("Failed %s type: %s",nt,C.message),Te(null))}}}var jn=Array.isArray;function Ar(k){return jn(k)}function Rr(k){{var Q=typeof Symbol=="function"&&Symbol.toStringTag,nt=Q&&k[Symbol.toStringTag]||k.constructor.name||"Object";return nt}}function Wn(k){try{return en(k),!1}catch{return!0}}function en(k){return""+k}function mn(k){if(Wn(k))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Rr(k)),en(k)}var Mn=y.ReactCurrentOwner,oa={key:!0,ref:!0,__self:!0,__source:!0},mi,kr,Yn;Yn={};function Lr(k){if(Yt.call(k,"ref")){var Q=Object.getOwnPropertyDescriptor(k,"ref").get;if(Q&&Q.isReactWarning)return!1}return k.ref!==void 0}function Dr(k){if(Yt.call(k,"key")){var Q=Object.getOwnPropertyDescriptor(k,"key").get;if(Q&&Q.isReactWarning)return!1}return k.key!==void 0}function nn(k,Q){if(typeof k.ref=="string"&&Mn.current&&Q&&Mn.current.stateNode!==Q){var nt=H(Mn.current.type);Yn[nt]||(g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',H(Mn.current.type),k.ref),Yn[nt]=!0)}}function Be(k,Q){{var nt=function(){mi||(mi=!0,g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Q))};nt.isReactWarning=!0,Object.defineProperty(k,"key",{get:nt,configurable:!0})}}function Ir(k,Q){{var nt=function(){kr||(kr=!0,g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Q))};nt.isReactWarning=!0,Object.defineProperty(k,"ref",{get:nt,configurable:!0})}}var gi=function(k,Q,nt,vt,Rt,Pt,$t){var C={$$typeof:t,type:k,key:Q,ref:nt,props:$t,_owner:Pt};return C._store={},Object.defineProperty(C._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(C,"_self",{configurable:!1,enumerable:!1,writable:!1,value:vt}),Object.defineProperty(C,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Rt}),Object.freeze&&(Object.freeze(C.props),Object.freeze(C)),C};function Ms(k,Q,nt,vt,Rt){{var Pt,$t={},C=null,ot=null;nt!==void 0&&(mn(nt),C=""+nt),Dr(Q)&&(mn(Q.key),C=""+Q.key),Lr(Q)&&(ot=Q.ref,nn(Q,Rt));for(Pt in Q)Yt.call(Q,Pt)&&!oa.hasOwnProperty(Pt)&&($t[Pt]=Q[Pt]);if(k&&k.defaultProps){var tt=k.defaultProps;for(Pt in tt)$t[Pt]===void 0&&($t[Pt]=tt[Pt])}if(C||ot){var gt=typeof k=="function"?k.displayName||k.name||"Unknown":k;C&&Be($t,gt),ot&&Ir($t,gt)}return gi(k,C,ot,Rt,vt,Mn.current,$t)}}var An=y.ReactCurrentOwner,gr=y.ReactDebugCurrentFrame;function Rn(k){if(k){var Q=k._owner,nt=Jt(k.type,k._source,Q?Q.type:null);gr.setExtraStackFrame(nt)}else gr.setExtraStackFrame(null)}var rn;rn=!1;function qn(k){return typeof k=="object"&&k!==null&&k.$$typeof===t}function vr(){{if(An.current){var k=H(An.current.type);if(k)return`
132
+
133
+ Check the render method of \``+k+"`."}return""}}function de(k){return""}var kn={};function As(k){{var Q=vr();if(!Q){var nt=typeof k=="string"?k:k.displayName||k.name;nt&&(Q=`
134
+
135
+ Check the top-level render call using <`+nt+">.")}return Q}}function vi(k,Q){{if(!k._store||k._store.validated||k.key!=null)return;k._store.validated=!0;var nt=As(Q);if(kn[nt])return;kn[nt]=!0;var vt="";k&&k._owner&&k._owner!==An.current&&(vt=" It was passed a child from "+H(k._owner.type)+"."),Rn(k),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',nt,vt),Rn(null)}}function Nr(k,Q){{if(typeof k!="object")return;if(Ar(k))for(var nt=0;nt<k.length;nt++){var vt=k[nt];qn(vt)&&vi(vt,Q)}else if(qn(k))k._store&&(k._store.validated=!0);else if(k){var Rt=m(k);if(typeof Rt=="function"&&Rt!==k.entries)for(var Pt=Rt.call(k),$t;!($t=Pt.next()).done;)qn($t.value)&&vi($t.value,Q)}}}function Xn(k){{var Q=k.type;if(Q==null||typeof Q=="string")return;var nt;if(typeof Q=="function")nt=Q.propTypes;else if(typeof Q=="object"&&(Q.$$typeof===l||Q.$$typeof===d))nt=Q.propTypes;else return;if(nt){var vt=H(Q);he(nt,k.props,"prop",vt,k)}else if(Q.PropTypes!==void 0&&!rn){rn=!0;var Rt=H(Q);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Rt||"Unknown")}typeof Q.getDefaultProps=="function"&&!Q.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Pr(k){{for(var Q=Object.keys(k.props),nt=0;nt<Q.length;nt++){var vt=Q[nt];if(vt!=="children"&&vt!=="key"){Rn(k),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",vt),Rn(null);break}}k.ref!==null&&(Rn(k),g("Invalid attribute `ref` supplied to `React.Fragment`."),Rn(null))}}var yi={};function gn(k,Q,nt,vt,Rt,Pt){{var $t=N(k);if(!$t){var C="";(k===void 0||typeof k=="object"&&k!==null&&Object.keys(k).length===0)&&(C+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ot=de();ot?C+=ot:C+=vr();var tt;k===null?tt="null":Ar(k)?tt="array":k!==void 0&&k.$$typeof===t?(tt="<"+(H(k.type)||"Unknown")+" />",C=" Did you accidentally export a JSX literal instead of a component?"):tt=typeof k,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",tt,C)}var gt=Ms(k,Q,nt,Rt,Pt);if(gt==null)return gt;if($t){var Ut=Q.children;if(Ut!==void 0)if(vt)if(Ar(Ut)){for(var zt=0;zt<Ut.length;zt++)Nr(Ut[zt],k);Object.freeze&&Object.freeze(Ut)}else g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Nr(Ut,k)}if(Yt.call(Q,"key")){var _e=H(k),jt=Object.keys(Q).filter(function(ua){return ua!=="key"}),ke=jt.length>0?"{key: someKey, "+jt.join(": ..., ")+": ...}":"{key: someKey}";if(!yi[_e+ke]){var xe=jt.length>0?"{"+jt.join(": ..., ")+": ...}":"{}";g(`A props object containing a "key" prop is being spread into JSX:
136
+ let props = %s;
137
+ <%s {...props} />
138
+ React keys must be passed directly to JSX without using spread:
139
+ let props = %s;
140
+ <%s key={someKey} {...props} />`,ke,_e,xe,_e),yi[_e+ke]=!0}}return k===r?Pr(gt):Xn(gt),gt}}function Ur(k,Q,nt){return gn(k,Q,nt,!0)}function la(k,Q,nt){return gn(k,Q,nt,!1)}var ca=la,bi=Ur;Cs.Fragment=r,Cs.jsx=ca,Cs.jsxs=bi}()),Cs}process.env.NODE_ENV==="production"?Ph.exports=rB():Ph.exports=iB();var re=Ph.exports,aB=Uh();const ty=q0(aB);class ee extends ty.PureComponent{constructor(){super(...arguments);Yh(this,"chart");Yh(this,"chartRef",ty.createRef())}createChart(n,r,i){throw new Error("Method not implemented.")}componentDidMount(){this.chartRef.current&&!this.chart&&(this.chart=this.createChart(this.chartRef.current,this.props.data,this.props.options))}componentDidUpdate(n){var r,i;this.props.data!==n.data&&((r=this.chart)==null||r.model.setData(this.props.data)),this.props.options!==n.options&&((i=this.chart)==null||i.model.setOptions(this.props.options))}render(){return re.jsx("div",{ref:this.chartRef,className:"chart-holder"})}}class sB extends ee{createChart(t,n,r){return new RU(t,{data:n,options:r})}}class oB extends ee{createChart(t,n,r){return new kU(t,{data:n,options:r})}}class lB extends ee{createChart(t,n,r){return new LU(t,{data:n,options:r})}}class cB extends ee{createChart(t,n,r){return new DU(t,{data:n,options:r})}}class uB extends ee{createChart(t,n,r){return new IU(t,{data:n,options:r})}}class ey extends ee{createChart(t,n,r){return new NU(t,{data:n,options:r})}}class hB extends ee{createChart(t,n,r){return new PU(t,{data:n,options:r})}}class dB extends ee{createChart(t,n,r){return new UU(t,{data:n,options:r})}}class pB extends ee{createChart(t,n,r){return new BU(t,{data:n,options:r})}}class fB extends ee{createChart(t,n,r){return new HU(t,{data:n,options:r})}}class mB extends ee{createChart(t,n,r){return new VU(t,{data:n,options:r})}}class gB extends ee{createChart(t,n,r){return new FU(t,{data:n,options:r})}}class vB extends ee{createChart(t,n,r){return new GU(t,{data:n,options:r})}}class yB extends ee{createChart(t,n,r){return new zU(t,{data:n,options:r})}}class bB extends ee{createChart(t,n,r){return new jU(t,{data:n,options:r})}}class _B extends ee{createChart(t,n,r){return new WU(t,{data:n,options:r})}}class xB extends ee{createChart(t,n,r){return new Y0(t,{data:n,options:r})}}class EB extends ee{createChart(t,n,r){return new YU(t,{data:n,options:r})}}class TB extends ee{createChart(t,n,r){return new qU(t,{data:n,options:r})}}class OB extends ee{createChart(t,n,r){return new KU(t,{data:n,options:r})}}class SB extends ee{createChart(t,n,r){return new QU(t,{data:n,options:r})}}class wB extends ee{createChart(t,n,r){return new JU(t,{data:n,options:r})}}class $B extends ee{createChart(t,n,r){return new XU(t,{data:n,options:r})}}class CB extends ee{createChart(t,n,r){return new ZU(t,{data:n,options:r})}}class MB extends ee{createChart(t,n,r){return new tB(t,{data:n,options:r})}}var ny={exports:{}};/*!
74
141
  Copyright (c) 2018 Jed Watson.
75
142
  Licensed under the MIT License (MIT), see
76
143
  http://jedwatson.github.io/classnames
77
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",a=0;a<arguments.length;a++){var o=arguments[a];o&&(s=i(s,r(o)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var a="";for(var o in s)t.call(s,o)&&s[o]&&(a=i(a,o));return a}function i(s,a){return a?s?s+" "+a:s+a:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Bv);var nU=Bv.exports;const Gn=eU(nU),Fn="cds",rU=({tag:e="div",className:t,children:n,color:r,href:i,position:s="static",stacked:a,...o})=>{const l=i?"a":o.onClick?"button":e,c=`${Fn}--cc--card-node`,u=Gn(c,{[`${c}--stacked`]:a,[`${c}--${l}`]:l,[t]:t});return ft.jsx(l,{className:u,style:{borderColor:r,position:s},tabIndex:0,...o,children:n})},iU=({children:e,farsideColumn:t=!1,...n})=>{const r=`${Fn}--cc--card-node`,i=Gn(`${r}__column`,{[`${r}__column--farside`]:t,...n.className?{[n.className]:!0}:{}});return ft.jsx("div",{className:i,...n,children:e})},sU=({children:e,...t})=>{const n=`${Fn}--cc--card-node`,r=Gn(`${n}__label`,{...t.className?{[t.className]:!0}:{}});return ft.jsx("label",{className:r,...t,children:e})},aU=({children:e,...t})=>{const n=`${Fn}--cc--card-node`,r=Gn(`${n}__subtitle`,{...t.className?{[t.className]:!0}:{}});return ft.jsx("div",{className:r,...t,children:e})},oU=({children:e,...t})=>{const n=`${Fn}--cc--card-node`,r=Gn(`${n}__title`,{...t.className?{[t.className]:!0}:{}});return ft.jsx("div",{className:r,...t,children:e})},lU=({color:e,markerEnd:t,markerStart:n,path:r,source:i,target:s,variant:a=null,...o})=>{const l=`${Fn}--cc--edge`,c=Gn(l,{[`${l}--${a}`]:a,...o.className?{[o.className]:!0}:{}});let u=r;if(!u&&i&&s&&(u=mD(i,s)),!u)throw Error("Missing parameters for Edge component: path or source and target.");return ft.jsxs("g",{className:c,...o,children:[ft.jsx("path",{d:u,className:`${l}__container`}),ft.jsx("path",{d:u,className:`${l}__outer`}),ft.jsx("path",{d:u,className:`${l}__inner`,markerEnd:`url(#${t})`,markerStart:`url(#${n})`,style:{stroke:e}})]})},br=({color:e,d:t,id:n,orient:r="auto",height:i,width:s,position:a="end",className:o,refX:l,refY:c,...u})=>{const d=`${Fn}--cc--marker`,h=Gn(d,o),p=a==="end"?(s||0)/2+.5:.5,f=(i||0)/2;return ft.jsx("marker",{className:h,markerHeight:i,markerWidth:s,orient:r,id:n,refX:l||p,refY:c||f,markerUnits:"userSpaceOnUse",...u,children:ft.jsx("path",{d:t,style:{fill:e}})})},cU=e=>ft.jsx(br,{d:gD.d,...e}),uU=e=>ft.jsx(br,{d:vD.d,...e}),hU=e=>ft.jsx(br,{d:yD.d,...e}),dU=e=>ft.jsx(br,{d:xD.d,...e}),pU=e=>ft.jsx(br,{d:bD.d,...e}),fU=e=>ft.jsx(br,{d:_D.d,...e}),mU=({shape:e="circle",tag:t="div",title:n="Title",className:r,subtitle:i,description:s,renderIcon:a,href:o,size:l=48,stacked:c,position:u="fixed",bodyPosition:d="absolute",...h})=>{const p=o?"a":h.onClick?"button":t,f=`${Fn}--cc--shape-node`,g=Gn(f,{[`${f}--stacked`]:c,[`${f}--${e}`]:e,[`${f}--${p}`]:p,[r]:r}),m=n?ft.jsx("div",{className:`${f}__title`,children:n}):null,y=i?ft.jsx("div",{className:`${f}__subtitle`,children:i}):null,v=s?ft.jsx("div",{className:`${f}__description`,children:s}):null;return ft.jsxs(p,{className:g,style:{height:l,width:l,position:u},tabIndex:0,...h,children:[ft.jsx("div",{className:`${f}__icon`,children:a}),ft.jsxs("div",{className:`${f}__body`,style:{position:d},children:[m,y,v]})]})};H.Alignments=Vt,H.AlluvialChart=L3,H.AreaChart=k3,H.AreaEvent=Lo,H.ArrowDirections=Ms,H.ArrowLeftMarker=cU,H.ArrowRightMarker=uU,H.AxisEvent=Ao,H.AxisFlavor=gi,H.AxisPositions=G,H.AxisTitleOrientations=Cs,H.BarEvent=Io,H.BoxplotChart=D3,H.BoxplotEvent=No,H.BubbleChart=R3,H.BulletChart=I3,H.CalloutDirections=di,H.CanvasZoomEvent=Co,H.CardNode=rU,H.CardNodeColumn=iU,H.CardNodeLabel=sU,H.CardNodeSubtitle=aU,H.CardNodeTitle=oU,H.CartesianOrientations=Ht,H.ChartEvent=To,H.ChartTheme=Fo,H.ChartTypes=ge,H.ChoroplethChart=Uv,H.CircleMarker=hU,H.CirclePackChart=N3,H.ColorClassNameTypes=et,H.ColorLegendType=mi,H.ComboChart=P3,H.DiamondMarker=dU,H.DividerStatus=wr,H.DominantBaseline=Xe,H.DonutChart=U3,H.Edge=lU,H.ExperimentalChoroplethChart=Uv,H.GaugeChart=B3,H.GaugeEvent=Ro,H.GaugeTypes=Wn,H.GroupedBarChart=H3,H.HeatmapChart=V3,H.HistogramChart=G3,H.LayoutAlignItems=jn,H.LayoutDirection=wt,H.LayoutGrowth=at,H.LegendItemType=Ft,H.LegendOrientations=Sr,H.LegendPositions=Tr,H.LineChart=F3,H.LineEvent=Uo,H.LollipopChart=z3,H.Marker=br,H.MeterChart=j3,H.ModalEvent=So,H.ModelEvent=wo,H.PieChart=W3,H.PieEvent=Do,H.Projection=Ke,H.RadarChart=q3,H.RadarEvent=Bo,H.RenderTypes=Q,H.ScaleTypes=X,H.ScatterChart=Y3,H.ScatterEvent=Po,H.ShapeNode=mU,H.SimpleBarChart=Z3,H.Skeletons=Gt,H.SquareMarker=pU,H.StackedAreaChart=X3,H.StackedBarChart=K3,H.Statuses=pi,H.TeeMarker=fU,H.TextAnchor=Ze,H.ThresholdEvent=Go,H.TickRotations=fi,H.ToolbarControlTypes=xt,H.TooltipEvent=Er,H.TreeChart=Q3,H.TreeEvent=Ho,H.TreeTypes=$s,H.TreemapChart=J3,H.TreemapEvent=Vo,H.TruncationTypes=Se,H.WordCloudChart=tU,H.WordCloudEvent=ko,H.ZoomBarTypes=Ne,H.ZoomDomainEvent=Mo,H.ZoombarEvent=$o,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"})});
144
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a="",s=0;s<arguments.length;s++){var o=arguments[s];o&&(a=i(a,r(o)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return n.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var s="";for(var o in a)t.call(a,o)&&a[o]&&(s=i(s,o));return s}function i(a,s){return s?a?a+" "+s:a+s:a}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ny);var AB=ny.exports;const Cr=q0(AB),Mr="cds",RB=({tag:e="div",className:t,children:n,color:r,href:i,position:a="static",stacked:s,...o})=>{const l=i?"a":o.onClick?"button":e,c=`${Mr}--cc--card-node`,u=Cr(c,{[`${c}--stacked`]:s,[`${c}--${l}`]:l,[t]:t});return re.jsx(l,{className:u,style:{borderColor:r,position:a},tabIndex:0,...o,children:n})},kB=({children:e,farsideColumn:t=!1,...n})=>{const r=`${Mr}--cc--card-node`,i=Cr(`${r}__column`,{[`${r}__column--farside`]:t,...n.className?{[n.className]:!0}:{}});return re.jsx("div",{className:i,...n,children:e})},LB=({children:e,...t})=>{const n=`${Mr}--cc--card-node`,r=Cr(`${n}__label`,{...t.className?{[t.className]:!0}:{}});return re.jsx("label",{className:r,...t,children:e})},DB=({children:e,...t})=>{const n=`${Mr}--cc--card-node`,r=Cr(`${n}__subtitle`,{...t.className?{[t.className]:!0}:{}});return re.jsx("div",{className:r,...t,children:e})},IB=({children:e,...t})=>{const n=`${Mr}--cc--card-node`,r=Cr(`${n}__title`,{...t.className?{[t.className]:!0}:{}});return re.jsx("div",{className:r,...t,children:e})},NB=({color:e,markerEnd:t,markerStart:n,path:r,source:i,target:a,variant:s=null,...o})=>{const l=`${Mr}--cc--edge`,c=Cr(l,{[`${l}--${s}`]:s,...o.className?{[o.className]:!0}:{}});let u=r;if(!u&&i&&a&&(u=BD(i,a)),!u)throw Error("Missing parameters for Edge component: path or source and target.");return re.jsxs("g",{className:c,...o,children:[re.jsx("path",{d:u,className:`${l}__container`}),re.jsx("path",{d:u,className:`${l}__outer`}),re.jsx("path",{d:u,className:`${l}__inner`,markerEnd:`url(#${t})`,markerStart:`url(#${n})`,style:{stroke:e}})]})},fi=({color:e,d:t,id:n,orient:r="auto",height:i,width:a,position:s="end",className:o,refX:l,refY:c,...u})=>{const d=`${Mr}--cc--marker`,h=Cr(d,o),p=s==="end"?(a||0)/2+.5:.5,f=(i||0)/2;return re.jsx("marker",{className:h,markerHeight:i,markerWidth:a,orient:r,id:n,refX:l||p,refY:c||f,markerUnits:"userSpaceOnUse",...u,children:re.jsx("path",{d:t,style:{fill:e}})})},PB=e=>re.jsx(fi,{d:HD.d,...e}),UB=e=>re.jsx(fi,{d:VD.d,...e}),BB=e=>re.jsx(fi,{d:FD.d,...e}),HB=e=>re.jsx(fi,{d:GD.d,...e}),VB=e=>re.jsx(fi,{d:zD.d,...e}),FB=e=>re.jsx(fi,{d:jD.d,...e}),GB=({shape:e="circle",tag:t="div",title:n="Title",className:r,subtitle:i,description:a,renderIcon:s,href:o,size:l=48,stacked:c,position:u="fixed",bodyPosition:d="absolute",...h})=>{const p=o?"a":h.onClick?"button":t,f=`${Mr}--cc--shape-node`,v=Cr(f,{[`${f}--stacked`]:c,[`${f}--${e}`]:e,[`${f}--${p}`]:p,[r]:r}),m=n?re.jsx("div",{className:`${f}__title`,children:n}):null,y=i?re.jsx("div",{className:`${f}__subtitle`,children:i}):null,g=a?re.jsx("div",{className:`${f}__description`,children:a}):null;return re.jsxs(p,{className:v,style:{height:l,width:l,position:u},tabIndex:0,...h,children:[re.jsx("div",{className:`${f}__icon`,children:s}),re.jsxs("div",{className:`${f}__body`,style:{position:d},children:[m,y,g]})]})};X.Alignments=me,X.AlluvialChart=sB,X.AreaChart=oB,X.AreaEvent=Nl,X.ArrowDirections=ks,X.ArrowLeftMarker=PB,X.ArrowRightMarker=UB,X.AxisEvent=Il,X.AxisFlavor=va,X.AxisPositions=Z,X.AxisTitleOrientations=Ls,X.BarEvent=Hl,X.BoxplotChart=lB,X.BoxplotEvent=Vl,X.BubbleChart=cB,X.BulletChart=uB,X.CalloutDirections=pa,X.CanvasZoomEvent=Dl,X.CardNode=RB,X.CardNodeColumn=kB,X.CardNodeLabel=LB,X.CardNodeSubtitle=DB,X.CardNodeTitle=IB,X.CartesianOrientations=fe,X.ChartEvent=Le,X.ChartTheme=ql,X.ChartTypes=We,X.ChoroplethChart=ey,X.CircleMarker=BB,X.CirclePackChart=hB,X.ColorClassNameTypes=mt,X.ColorLegendType=ga,X.ComboChart=dB,X.DiamondMarker=HB,X.DividerStatus=Si,X.DominantBaseline=Dn,X.DonutChart=pB,X.Edge=NB,X.ExperimentalChoroplethChart=ey,X.GaugeChart=fB,X.GaugeEvent=Bl,X.GaugeTypes=Hr,X.GroupedBarChart=mB,X.HeatmapChart=gB,X.HistogramChart=vB,X.LayoutAlignItems=Br,X.LayoutDirection=qt,X.LayoutGrowth=xt,X.LegendItemType=ve,X.LegendOrientations=Oi,X.LegendPositions=Ti,X.LineChart=yB,X.LineEvent=Gl,X.LollipopChart=bB,X.Marker=fi,X.MeterChart=_B,X.ModalEvent=yr,X.ModelEvent=Rl,X.PieChart=xB,X.PieEvent=Ul,X.Projection=In,X.RadarChart=EB,X.RadarEvent=zl,X.RenderTypes=ft,X.ScaleTypes=pt,X.ScatterChart=TB,X.ScatterEvent=Fl,X.ShapeNode=GB,X.SimpleBarChart=OB,X.Skeletons=ge,X.SquareMarker=VB,X.StackedAreaChart=SB,X.StackedBarChart=wB,X.Statuses=fa,X.TeeMarker=FB,X.TextAnchor=Ln,X.ThresholdEvent=Yl,X.TickRotations=ma,X.ToolbarControlTypes=Bt,X.TooltipEvent=xi,X.TreeChart=$B,X.TreeEvent=jl,X.TreeTypes=Rs,X.TreemapChart=CB,X.TreemapEvent=Wl,X.TruncationTypes=an,X.WordCloudChart=MB,X.WordCloudEvent=Pl,X.ZoomBarTypes=vn,X.ZoomDomainEvent=Ll,X.ZoombarEvent=kl,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})});
78
145
  //# sourceMappingURL=index.umd.cjs.map