@kenyaemr/esm-lab-manifest-app 5.4.1-pre.2039 → 5.4.1-pre.2049
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.
- package/.turbo/turbo-build.log +58 -28
- package/dist/103.js +1 -1
- package/dist/103.js.map +1 -1
- package/dist/144.js +1 -1
- package/dist/144.js.map +1 -1
- package/dist/160.js +1 -1
- package/dist/160.js.map +1 -1
- package/dist/161.js +1 -0
- package/dist/161.js.map +1 -0
- package/dist/171.js +1 -1
- package/dist/171.js.map +1 -1
- package/dist/195.js +1 -1
- package/dist/195.js.map +1 -1
- package/dist/212.js +1 -0
- package/dist/212.js.map +1 -0
- package/dist/216.js +2 -0
- package/dist/{450.js.LICENSE.txt → 216.js.LICENSE.txt} +2 -2
- package/dist/216.js.map +1 -0
- package/dist/225.js +1 -1
- package/dist/225.js.map +1 -1
- package/dist/285.js +1 -0
- package/dist/285.js.map +1 -0
- package/dist/373.js +2 -0
- package/dist/373.js.map +1 -0
- package/dist/401.js +1 -1
- package/dist/401.js.map +1 -1
- package/dist/41.js +1 -1
- package/dist/41.js.map +1 -1
- package/dist/495.js +1 -1
- package/dist/495.js.map +1 -1
- package/dist/554.js +1 -0
- package/dist/554.js.map +1 -0
- package/dist/667.js +1 -1
- package/dist/768.js +1 -1
- package/dist/768.js.map +1 -1
- package/dist/772.js +2 -0
- package/dist/772.js.LICENSE.txt +7 -0
- package/dist/772.js.map +1 -0
- package/dist/831.js +1 -1
- package/dist/831.js.LICENSE.txt +2 -0
- package/dist/831.js.map +1 -1
- package/dist/846.js +2 -0
- package/dist/{675.js.LICENSE.txt → 846.js.LICENSE.txt} +29 -0
- package/dist/846.js.map +1 -0
- package/dist/855.js +1 -1
- package/dist/855.js.map +1 -1
- package/dist/876.js +1 -2
- package/dist/876.js.map +1 -1
- package/dist/913.js +1 -1
- package/dist/913.js.LICENSE.txt +3 -3
- package/dist/913.js.map +1 -1
- package/dist/926.js +2 -0
- package/dist/926.js.LICENSE.txt +5 -0
- package/dist/926.js.map +1 -0
- package/dist/931.js +1 -1
- package/dist/931.js.map +1 -1
- package/dist/978.js +1 -1
- package/dist/978.js.map +1 -1
- package/dist/kenyaemr-esm-lab-manifest-app.js +1 -1
- package/dist/kenyaemr-esm-lab-manifest-app.js.buildmanifest.json +149 -269
- package/dist/kenyaemr-esm-lab-manifest-app.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +0 -10
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +2 -2
- package/src/declarations.d.ts +13 -4
- package/dist/282.js +0 -1
- package/dist/282.js.map +0 -1
- package/dist/372.js +0 -1
- package/dist/372.js.map +0 -1
- package/dist/441.js +0 -1
- package/dist/441.js.map +0 -1
- package/dist/450.js +0 -2
- package/dist/450.js.map +0 -1
- package/dist/478.js +0 -1
- package/dist/478.js.map +0 -1
- package/dist/675.js +0 -2
- package/dist/675.js.map +0 -1
- package/dist/69.js +0 -2
- package/dist/69.js.map +0 -1
- package/dist/76.js +0 -1
- package/dist/76.js.map +0 -1
- package/dist/798.js +0 -1
- package/dist/798.js.map +0 -1
- package/dist/83.js +0 -2
- package/dist/83.js.LICENSE.txt +0 -15
- package/dist/83.js.map +0 -1
- package/dist/876.js.LICENSE.txt +0 -9
- package/dist/890.js +0 -2
- package/dist/890.js.LICENSE.txt +0 -17
- package/dist/890.js.map +0 -1
- package/dist/893.js +0 -2
- package/dist/893.js.LICENSE.txt +0 -20
- package/dist/893.js.map +0 -1
- /package/dist/{69.js.LICENSE.txt → 373.js.LICENSE.txt} +0 -0
package/dist/890.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 890.js.LICENSE.txt */
|
|
2
|
-
"use strict";(globalThis.webpackChunk_kenyaemr_esm_lab_manifest_app=globalThis.webpackChunk_kenyaemr_esm_lab_manifest_app||[]).push([[890],{1890:(t,e,n)=>{n.d(e,{UU:()=>Y_,Wh:()=>H});var r=n(380),i=Object.defineProperty,o=(t,e,n)=>((t,e,n)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n),s=(t=>(t.RENDER_FINISHED="render-finished",t.RESIZE="chart-resize",t.MOUSEOVER="chart-mouseover",t.MOUSEOUT="chart-mouseout",t))(s||{}),a=(t=>(t.SHOW="show-modal",t.HIDE="hide-modal",t))(a||{}),l=(t=>(t.UPDATE="model-update",t))(l||{}),c=(t=>(t.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",t.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",t.BUTTON_CLICK="toolbar-button-click",t.SHOW_TOOLTIP="toolbar-show-tooltip",t.HIDE_TOOLTIP="toolbar-hide-tooltip",t))(c||{}),u=(t=>(t.UPDATE="zoom-bar-update",t.SELECTION_START="zoom-bar-selection-start",t.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",t.SELECTION_END="zoom-bar-selection-end",t))(u||{}),h=(t=>(t.CHANGE="zoom-domain-change",t))(h||{}),d=(t=>(t.CANVAS_ZOOM_IN="canvas-zoom-in",t.CANVAS_ZOOM_OUT="canvas-zoom-out",t))(d||{}),f=(t=>(t.LABEL_MOUSEOVER="axis-label-mouseover",t.LABEL_MOUSEMOVE="axis-label-mousemove",t.LABEL_CLICK="axis-label-click",t.LABEL_MOUSEOUT="axis-label-mouseout",t.LABEL_FOCUS="axis-label-focus",t.LABEL_BLUR="axis-label-blur",t.RENDER_COMPLETE="axis-render-complete",t))(f||{}),p=(t=>(t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout",t))(p||{}),m=(t=>(t.WORD_MOUSEOVER="wordcloud-word-mouseover",t.WORD_MOUSEMOVE="wordcloud-word-mousemove",t.WORD_CLICK="wordcloud-word-click",t.WORD_MOUSEOUT="wordcloud-word-mouseout",t))(m||{}),g=(t=>(t.SLICE_MOUSEOVER="pie-slice-mouseover",t.SLICE_MOUSEMOVE="pie-slice-mousemove",t.SLICE_CLICK="pie-slice-click",t.SLICE_MOUSEOUT="pie-slice-mouseout",t))(g||{}),y=(t=>(t.ARC_MOUSEOVER="gauge-arc-mouseover",t.ARC_MOUSEMOVE="gauge-arc-mousemove",t.ARC_CLICK="gauge-arc-click",t.ARC_MOUSEOUT="gauge-arc-mouseout",t))(y||{}),v=(t=>(t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout",t))(v||{}),_=(t=>(t.BOX_MOUSEOVER="box-mouseover",t.BOX_MOUSEMOVE="box-mousemove",t.BOX_CLICK="box-click",t.BOX_MOUSEOUT="box-mouseout",t.OUTLIER_MOUSEOVER="outlier-mouseover",t.OUTLIER_MOUSEMOVE="outlier-mousemove",t.OUTLIER_CLICK="outlier-click",t.OUTLIER_MOUSEOUT="outlier-mouseout",t))(_||{}),b=(t=>(t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout",t))(b||{}),w=(t=>(t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout",t))(w||{}),E=(t=>(t.X_AXIS_MOUSEOVER="radar-x-axis-mouseover",t.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",t.X_AXIS_CLICK="radar-x-axis-click",t.X_AXIS_MOUSEOUT="radar-x-axis-mouseout",t))(E||{}),x=(t=>(t.NODE_MOUSEOVER="tree-node-mouseover",t.NODE_CLICK="tree-node-click",t.NODE_MOUSEOUT="tree-node-mouseout",t))(x||{}),T=(t=>(t.LEAF_MOUSEOVER="leaf-mouseover",t.LEAF_MOUSEMOVE="leaf-mousemove",t.LEAF_CLICK="leaf-click",t.LEAF_MOUSEOUT="leaf-mouseout",t))(T||{}),O=(t=>(t.SHOW="show-tooltip",t.MOVE="move-tooltip",t.HIDE="hide-tooltip",t))(O||{}),S=(t=>(t.SHOW="show-threshold",t.HIDE="hide-threshold",t))(S||{}),M=(t=>(t.ITEM_HOVER="legend-item-onhover",t.ITEM_CLICK="legend-item-onclick",t.ITEM_MOUSEOUT="legend-item-onmouseout",t.ITEMS_UPDATE="legend-items-update",t))(M||{}),A=(t=>(t.CIRCLE_MOUSEOVER="circle-leaf-mouseover",t.CIRCLE_CLICK="circle-leaf-click",t.CIRCLE_MOUSEOUT="circle-leaf-mouseout",t.CIRCLE_MOUSEMOVE="circle-leaf-mousemove",t))(A||{}),C=(t=>(t.NODE_MOUSEOVER="alluvial-node-mouseover",t.NODE_CLICK="alluvial-node-click",t.NODE_MOUSEOUT="alluvial-node-mouseout",t.NODE_MOUSEMOVE="alluvial-node-mousemove",t.LINE_MOUSEOVER="alluvial-line-mouseover",t.LINE_CLICK="alluvial-line-click",t.LINE_MOUSEOUT="alluvial-line-mouseout",t.LINE_MOUSEMOVE="alluvial-line-mousemove",t))(C||{}),D=(t=>(t.METER_MOUSEOVER="meter-mouseover",t.METER_CLICK="meter-click",t.METER_MOUSEOUT="meter-mouseout",t.METER_MOUSEMOVE="meter-mousemove",t))(D||{}),k=(t=>(t.HEATMAP_MOUSEOVER="heatmap-mouseover",t.HEATMAP_CLICK="heatmap-click",t.HEATMAP_MOUSEOUT="heatmap-mouseout",t.HEATMAP_MOUSEMOVE="hetmap-mousemove",t))(k||{}),L=(t=>(t.CHOROPLETH_MOUSEOVER="choropleth-mouseover",t.CHOROPLETH_CLICK="choropleth-click",t.CHOROPLETH_MOUSEOUT="choropleth-mouseout",t.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",t))(L||{});const R=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:C,Area:p,Axis:f,Bar:v,Boxplot:_,CanvasZoom:d,Chart:s,Choropleth:L,CirclePack:A,Gauge:y,Heatmap:k,Legend:M,Line:w,Meter:D,Modal:a,Model:l,Pie:g,Radar:E,Scatter:b,Threshold:S,Toolbar:c,Tooltip:O,Tree:x,Treemap:T,WordCloud:m,ZoomBar:u,ZoomDomain:h},Symbol.toStringTag,{value:"Module"}));var P=(t=>(t.HTML="html",t.SVG="svg",t))(P||{}),I=(t=>(t.WHITE="white",t.G100="g100",t.G90="g90",t.G10="g10",t))(I||{}),N=(t=>(t.BACKGROUND="background",t.FILL="fill",t.STROKE="stroke",t.TOOLTIP="tooltip",t))(N||{}),B=(t=>(t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom",t))(B||{}),U=(t=>(t.GRAPH_VIEW="graph_view",t.SLIDER_VIEW="slider_view",t))(U||{}),F=(t=>(t.END_LINE="end_line",t.MID_LINE="mid_line",t.FRONT_LINE="front_line",t.NONE="none",t))(F||{}),j=(t=>(t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t))(j||{}),H=(t=>(t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels",t.LABELS_RATIO="labels-ratio",t))(H||{}),$=(t=>(t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom",t))($||{}),z=(t=>(t.LEFT="left",t.CENTER="center",t.RIGHT="right",t))(z||{}),G=(t=>(t.HORIZONTAL="horizontal",t.VERTICAL="vertical",t))(G||{}),V=(t=>(t.TREE="tree",t.DENDROGRAM="dendrogram",t))(V||{}),W=(t=>(t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse",t))(W||{}),Y=(t=>(t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch",t))(Y||{}),Z=(t=>(t.CENTER="center",t))(Z||{}),q=(t=>(t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut",t))(q||{}),X=(t=>(t.SEMI="semi",t.FULL="full",t))(X||{}),K=(t=>(t.ALWAYS="always",t.AUTO="auto",t.NEVER="never",t))(K||{}),Q=(t=>(t.SCATTER="scatter",t.LINE="line",t.SIMPLE_BAR="simple-bar",t.STACKED_BAR="stacked-bar",t.GROUPED_BAR="grouped-bar",t.AREA="area",t.STACKED_AREA="stacked-area",t))(Q||{}),J=(t=>(t.EXPORT_CSV="Export as CSV",t.EXPORT_PNG="Export as PNG",t.EXPORT_JPG="Export as JPG",t.ZOOM_IN="Zoom in",t.ZOOM_OUT="Zoom out",t.RESET_ZOOM="Reset zoom",t.MAKE_FULLSCREEN="Make fullscreen",t.EXIT_FULLSCREEN="Exit fullscreen",t.SHOW_AS_DATATABLE="Show as data-table",t.CUSTOM="Custom",t))(J||{}),tt=(t=>(t.LEFT="left",t.RIGHT="right",t))(tt||{}),et=(t=>(t.CHECKBOX="checkbox",t.RADIUS="radius",t.AREA="area",t.SIZE="size",t.LINE="line",t.QUARTILE="quartile",t.ZOOM="zoom",t))(et||{}),nt=(t=>(t.ON="on",t.AUTO="auto",t.OFF="off",t))(nt||{}),rt=(t=>(t.DEFAULT="default",t.HOVERABLE="hoverable",t))(rt||{}),it=(t=>(t.geoEqualEarth="geoEqualEarth",t.geoAlbers="geoAlbers",t.geoConicEqualArea="geoConicEqualArea",t.geoConicEquidistant="geoConicEquidistant",t.geoEquirectangular="geoEquirectangular",t.geoMercator="geoMercator",t.geoNaturalEarth1="geoNaturalEarth1",t))(it||{}),ot=(t=>(t["15seconds"]="15seconds",t.minute="minute",t["30minutes"]="30minutes",t.hourly="hourly",t.daily="daily",t.weekly="weekly",t.monthly="monthly",t.quarterly="quarterly",t.yearly="yearly",t))(ot||{});function st(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}function at(t){return(e,n)=>{let r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,i=null!=n&&n.width?String(n.width):e;r=t.formattingValues[i]||t.formattingValues[e]}else{const e=t.defaultWidth,i=null!=n&&n.width?String(n.width):t.defaultWidth;r=t.values[i]||t.values[e]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function lt(t){return(e,n={})=>{const r=n.width,i=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],o=e.match(i);if(!o)return null;const s=o[0],a=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t){for(let e=0;e<t.length;e++)if(t[e].test(s))return e}(a):function(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&t[e].test(s))return e}(a);let c;return c=t.valueCallback?t.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:e.slice(s.length)}}}function ct(t){const e=Object.prototype.toString.call(t);return t instanceof Date||"object"==typeof t&&"[object Date]"===e?new t.constructor(+t):"number"==typeof t||"[object Number]"===e||"string"==typeof t||"[object String]"===e?new Date(t):new Date(NaN)}let ut={};function ht(){return ut}function dt(t,e){var n,r,i,o;const s=ht(),a=(null==e?void 0:e.weekStartsOn)??(null==(r=null==(n=null==e?void 0:e.locale)?void 0:n.options)?void 0:r.weekStartsOn)??s.weekStartsOn??(null==(o=null==(i=s.locale)?void 0:i.options)?void 0:o.weekStartsOn)??0,l=ct(t),c=l.getDay(),u=(c<a?7:0)+c-a;return l.setDate(l.getDate()-u),l.setHours(0,0,0,0),l}const ft={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"}},pt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},mt={ordinalNumber:(t,e)=>{const n=Number(t),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"},era:at({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:at({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:at({values:{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"]},defaultWidth:"wide"}),day:at({values:{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"]},defaultWidth:"wide"}),dayPeriod:at({values:{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"}},defaultWidth:"wide",formattingValues:{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"}},defaultFormattingWidth:"wide"})},gt={ordinalNumber:(vt={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const n=t.match(vt.matchPattern);if(!n)return null;const r=n[0],i=t.match(vt.parsePattern);if(!i)return null;let o=vt.valueCallback?vt.valueCallback(i[0]):i[0];return o=e.valueCallback?e.valueCallback(o):o,{value:o,rest:t.slice(r.length)}}),era:lt({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:lt({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:lt({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{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]},defaultParseWidth:"any"}),day:lt({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{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]},defaultParseWidth:"any"}),dayPeriod:lt({matchPatterns:{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},defaultMatchWidth:"any",parsePatterns:{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}},defaultParseWidth:"any"})},yt={code:"en-US",formatDistance:(t,e,n)=>{let r;const i=ft[t];return r="string"==typeof i?i:1===e?i.one:i.other.replace("{{count}}",e.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:{date:st({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:st({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:st({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:(t,e,n,r)=>pt[t],localize:mt,match:gt,options:{weekStartsOn:0,firstWeekContainsDate:1}};var vt,_t="object"==typeof global&&global&&global.Object===Object&&global,bt="object"==typeof self&&self&&self.Object===Object&&self,wt=_t||bt||Function("return this")(),Et=wt.Symbol,xt=Object.prototype,Tt=xt.hasOwnProperty,Ot=xt.toString,St=Et?Et.toStringTag:void 0,Mt=Object.prototype.toString,At=Et?Et.toStringTag:void 0;function Ct(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":At&&At in Object(t)?function(t){var e=Tt.call(t,St),n=t[St];try{t[St]=void 0;var r=!0}catch{}var i=Ot.call(t);return r&&(e?t[St]=n:delete t[St]),i}(t):function(t){return Mt.call(t)}(t)}function Dt(t){return null!=t&&"object"==typeof t}function kt(t){return"symbol"==typeof t||Dt(t)&&"[object Symbol]"==Ct(t)}function Lt(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var Rt=Array.isArray,Pt=1/0,It=Et?Et.prototype:void 0,Nt=It?It.toString:void 0;function Bt(t){if("string"==typeof t)return t;if(Rt(t))return Lt(t,Bt)+"";if(kt(t))return Nt?Nt.call(t):"";var e=t+"";return"0"==e&&1/t==-Pt?"-0":e}function Ut(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ft(t){return t}function jt(t){if(!Ut(t))return!1;var e=Ct(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var Ht=wt["__core-js_shared__"],$t=function(){var t=/[^.]+$/.exec(Ht&&Ht.keys&&Ht.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),zt=Function.prototype.toString;function Gt(t){if(null!=t){try{return zt.call(t)}catch{}try{return t+""}catch{}}return""}var Vt=/^\[object .+?Constructor\]$/,Wt=Function.prototype,Yt=Object.prototype,Zt=Wt.toString,qt=Yt.hasOwnProperty,Xt=RegExp("^"+Zt.call(qt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Kt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!Ut(t)||function(t){return!!$t&&$t in t}(t))&&(jt(t)?Xt:Vt).test(Gt(t))}(n)?n:void 0}var Qt=Kt(wt,"WeakMap"),Jt=Object.create,te=function(){function t(){}return function(e){if(!Ut(e))return{};if(Jt)return Jt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function ee(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var ne=Date.now;function re(t){return function(){return t}}var ie=function(){try{var t=Kt(Object,"defineProperty");return t({},"",{}),t}catch{}}(),oe=ie?function(t,e){return ie(t,"toString",{configurable:!0,enumerable:!1,value:re(e),writable:!0})}:Ft,se=function(t){var e=0,n=0;return function(){var r=ne(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(oe);function ae(t){return t!=t}function le(t,e){return!(null==t||!t.length)&&function(t,e){return e==e?function(t,e){for(var n=-1,r=t.length;++n<r;)if(t[n]===e)return n;return-1}(t,e):function(t,e){for(var n=t.length,r=-1;++r<n;)if(e(t[r],r,t))return r;return-1}(t,ae)}(t,e)>-1}var ce=/^(?:0|[1-9]\d*)$/;function ue(t,e){var n=typeof t;return!!(e=e??9007199254740991)&&("number"==n||"symbol"!=n&&ce.test(t))&&t>-1&&t%1==0&&t<e}function he(t,e,n){"__proto__"==e&&ie?ie(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function de(t,e){return t===e||t!=t&&e!=e}var fe=Object.prototype.hasOwnProperty;function pe(t,e,n){var r=t[e];(!fe.call(t,e)||!de(r,n)||void 0===n&&!(e in t))&&he(t,e,n)}function me(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=void 0;void 0===l&&(l=t[a]),i?he(n,a,l):pe(n,a,l)}return n}var ge=Math.max;function ye(t,e,n){return e=ge(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=ge(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(s),function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(t,this,a)}}function ve(t,e){return se(ye(t,e,Ft),t+"")}function _e(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function be(t){return null!=t&&_e(t.length)&&!jt(t)}var we=Object.prototype;function Ee(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||we)}function xe(t){return Dt(t)&&"[object Arguments]"==Ct(t)}var Te=Object.prototype,Oe=Te.hasOwnProperty,Se=Te.propertyIsEnumerable,Me=xe(function(){return arguments}())?xe:function(t){return Dt(t)&&Oe.call(t,"callee")&&!Se.call(t,"callee")},Ae="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ce=Ae&&"object"==typeof module&&module&&!module.nodeType&&module,De=Ce&&Ce.exports===Ae?wt.Buffer:void 0,ke=(De?De.isBuffer:void 0)||function(){return!1},Le={};function Re(t){return function(e){return t(e)}}Le["[object Float32Array]"]=Le["[object Float64Array]"]=Le["[object Int8Array]"]=Le["[object Int16Array]"]=Le["[object Int32Array]"]=Le["[object Uint8Array]"]=Le["[object Uint8ClampedArray]"]=Le["[object Uint16Array]"]=Le["[object Uint32Array]"]=!0,Le["[object Arguments]"]=Le["[object Array]"]=Le["[object ArrayBuffer]"]=Le["[object Boolean]"]=Le["[object DataView]"]=Le["[object Date]"]=Le["[object Error]"]=Le["[object Function]"]=Le["[object Map]"]=Le["[object Number]"]=Le["[object Object]"]=Le["[object RegExp]"]=Le["[object Set]"]=Le["[object String]"]=Le["[object WeakMap]"]=!1;var Pe="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ie=Pe&&"object"==typeof module&&module&&!module.nodeType&&module,Ne=Ie&&Ie.exports===Pe&&_t.process,Be=function(){try{return Ie&&Ie.require&&Ie.require("util").types||Ne&&Ne.binding&&Ne.binding("util")}catch{}}(),Ue=Be&&Be.isTypedArray,Fe=Ue?Re(Ue):function(t){return Dt(t)&&_e(t.length)&&!!Le[Ct(t)]},je=Object.prototype.hasOwnProperty;function He(t,e){var n=Rt(t),r=!n&&Me(t),i=!n&&!r&&ke(t),o=!n&&!r&&!i&&Fe(t),s=n||r||i||o,a=s?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],l=a.length;for(var c in t)(e||je.call(t,c))&&(!s||!("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ue(c,l)))&&a.push(c);return a}function $e(t,e){return function(n){return t(e(n))}}var ze=$e(Object.keys,Object),Ge=Object.prototype.hasOwnProperty;function Ve(t){if(!Ee(t))return ze(t);var e=[];for(var n in Object(t))Ge.call(t,n)&&"constructor"!=n&&e.push(n);return e}function We(t){return be(t)?He(t):Ve(t)}var Ye=Object.prototype.hasOwnProperty;function Ze(t){return be(t)?He(t,!0):function(t){if(!Ut(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Ee(t),n=[];for(var r in t)"constructor"==r&&(e||!Ye.call(t,r))||n.push(r);return n}(t)}var qe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xe=/^\w*$/;function Ke(t,e){if(Rt(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!kt(t))||Xe.test(t)||!qe.test(t)||null!=e&&t in Object(e)}var Qe=Kt(Object,"create"),Je=Object.prototype.hasOwnProperty,tn=Object.prototype.hasOwnProperty;function en(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function nn(t,e){for(var n=t.length;n--;)if(de(t[n][0],e))return n;return-1}en.prototype.clear=function(){this.__data__=Qe?Qe(null):{},this.size=0},en.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},en.prototype.get=function(t){var e=this.__data__;if(Qe){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Je.call(e,t)?e[t]:void 0},en.prototype.has=function(t){var e=this.__data__;return Qe?void 0!==e[t]:tn.call(e,t)},en.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Qe&&void 0===e?"__lodash_hash_undefined__":e,this};var rn=Array.prototype.splice;function on(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}on.prototype.clear=function(){this.__data__=[],this.size=0},on.prototype.delete=function(t){var e=this.__data__,n=nn(e,t);return!(n<0||(n==e.length-1?e.pop():rn.call(e,n,1),--this.size,0))},on.prototype.get=function(t){var e=this.__data__,n=nn(e,t);return n<0?void 0:e[n][1]},on.prototype.has=function(t){return nn(this.__data__,t)>-1},on.prototype.set=function(t,e){var n=this.__data__,r=nn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var sn=Kt(wt,"Map");function an(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function ln(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function cn(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(cn.Cache||ln),n}ln.prototype.clear=function(){this.size=0,this.__data__={hash:new en,map:new(sn||on),string:new en}},ln.prototype.delete=function(t){var e=an(this,t).delete(t);return this.size-=e?1:0,e},ln.prototype.get=function(t){return an(this,t).get(t)},ln.prototype.has=function(t){return an(this,t).has(t)},ln.prototype.set=function(t,e){var n=an(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},cn.Cache=ln;var un,hn,dn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fn=/\\(\\)?/g,pn=(un=cn((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(dn,(function(t,n,r,i){e.push(r?i.replace(fn,"$1"):n||t)})),e}),(function(t){return 500===hn.size&&hn.clear(),t})),hn=un.cache,un);function mn(t){return null==t?"":Bt(t)}function gn(t,e){return Rt(t)?t:Ke(t,e)?[t]:pn(mn(t))}var yn=1/0;function vn(t){if("string"==typeof t||kt(t))return t;var e=t+"";return"0"==e&&1/t==-yn?"-0":e}function _n(t,e){for(var n=0,r=(e=gn(e,t)).length;null!=t&&n<r;)t=t[vn(e[n++])];return n&&n==r?t:void 0}function bn(t,e,n){var r=null==t?void 0:_n(t,e);return void 0===r?n:r}function wn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var En=Et?Et.isConcatSpreadable:void 0;function xn(t){return Rt(t)||Me(t)||!!(En&&t&&t[En])}function Tn(t,e,n,r,i){var o=-1,s=t.length;for(n||(n=xn),i||(i=[]);++o<s;){var a=t[o];e>0&&n(a)?e>1?Tn(a,e-1,n,r,i):wn(i,a):r||(i[i.length]=a)}return i}var On=$e(Object.getPrototypeOf,Object),Sn=Function.prototype,Mn=Object.prototype,An=Sn.toString,Cn=Mn.hasOwnProperty,Dn=An.call(Object);function kn(t){if(!Dt(t)||"[object Object]"!=Ct(t))return!1;var e=On(t);if(null===e)return!0;var n=Cn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&An.call(n)==Dn}function Ln(t){var e=this.__data__=new on(t);this.size=e.size}Ln.prototype.clear=function(){this.__data__=new on,this.size=0},Ln.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Ln.prototype.get=function(t){return this.__data__.get(t)},Ln.prototype.has=function(t){return this.__data__.has(t)},Ln.prototype.set=function(t,e){var n=this.__data__;if(n instanceof on){var r=n.__data__;if(!sn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new ln(r)}return n.set(t,e),this.size=n.size,this};var Rn="object"==typeof exports&&exports&&!exports.nodeType&&exports,Pn=Rn&&"object"==typeof module&&module&&!module.nodeType&&module,In=Pn&&Pn.exports===Rn?wt.Buffer:void 0,Nn=In?In.allocUnsafe:void 0;function Bn(t,e){if(e)return t.slice();var n=t.length,r=Nn?Nn(n):new t.constructor(n);return t.copy(r),r}function Un(){return[]}var Fn=Object.prototype.propertyIsEnumerable,jn=Object.getOwnPropertySymbols,Hn=jn?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s)&&(o[i++]=s)}return o}(jn(t),(function(e){return Fn.call(t,e)})))}:Un,$n=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)wn(e,Hn(t)),t=On(t);return e}:Un;function zn(t,e,n){var r=e(t);return Rt(t)?r:wn(r,n(t))}function Gn(t){return zn(t,We,Hn)}function Vn(t){return zn(t,Ze,$n)}var Wn=Kt(wt,"DataView"),Yn=Kt(wt,"Promise"),Zn=Kt(wt,"Set"),qn="[object Map]",Xn="[object Promise]",Kn="[object Set]",Qn="[object WeakMap]",Jn="[object DataView]",tr=Gt(Wn),er=Gt(sn),nr=Gt(Yn),rr=Gt(Zn),ir=Gt(Qt),or=Ct;(Wn&&or(new Wn(new ArrayBuffer(1)))!=Jn||sn&&or(new sn)!=qn||Yn&&or(Yn.resolve())!=Xn||Zn&&or(new Zn)!=Kn||Qt&&or(new Qt)!=Qn)&&(or=function(t){var e=Ct(t),n="[object Object]"==e?t.constructor:void 0,r=n?Gt(n):"";if(r)switch(r){case tr:return Jn;case er:return qn;case nr:return Xn;case rr:return Kn;case ir:return Qn}return e});var sr=Object.prototype.hasOwnProperty,ar=wt.Uint8Array;function lr(t){var e=new t.constructor(t.byteLength);return new ar(e).set(new ar(t)),e}var cr=/\w*$/,ur=Et?Et.prototype:void 0,hr=ur?ur.valueOf:void 0;function dr(t,e){var n=e?lr(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function fr(t){return"function"!=typeof t.constructor||Ee(t)?{}:te(On(t))}var pr=Be&&Be.isMap,mr=pr?Re(pr):function(t){return Dt(t)&&"[object Map]"==or(t)},gr=Be&&Be.isSet,yr=gr?Re(gr):function(t){return Dt(t)&&"[object Set]"==or(t)},vr="[object Arguments]",_r="[object Function]",br="[object Object]",wr={};function Er(t,e,n,r,i,o){var s,a=1&e,l=2&e,c=4&e;if(n&&(s=i?n(t,r,i,o):n(t)),void 0!==s)return s;if(!Ut(t))return t;var u=Rt(t);if(u){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&sr.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!a)return ee(t,s)}else{var h=or(t),d=h==_r||"[object GeneratorFunction]"==h;if(ke(t))return Bn(t,a);if(h==br||h==vr||d&&!i){if(s=l||d?{}:fr(t),!a)return l?function(t,e){return me(t,$n(t),e)}(t,function(t,e){return t&&me(e,Ze(e),t)}(s,t)):function(t,e){return me(t,Hn(t),e)}(t,function(t,e){return t&&me(e,We(e),t)}(s,t))}else{if(!wr[h])return i?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case"[object ArrayBuffer]":return lr(t);case"[object Boolean]":case"[object Date]":return new r(+t);case"[object DataView]":return function(t,e){var n=e?lr(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return dr(t,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(t);case"[object RegExp]":return function(t){var e=new t.constructor(t.source,cr.exec(t));return e.lastIndex=t.lastIndex,e}(t);case"[object Symbol]":return function(t){return hr?Object(hr.call(t)):{}}(t)}}(t,h,a)}}o||(o=new Ln);var f=o.get(t);if(f)return f;o.set(t,s),yr(t)?t.forEach((function(r){s.add(Er(r,e,n,r,t,o))})):mr(t)&&t.forEach((function(r,i){s.set(i,Er(r,e,n,i,t,o))}));var p=u?void 0:(c?l?Vn:Gn:l?Ze:We)(t);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n););}(p||t,(function(r,i){p&&(r=t[i=r]),pe(s,i,Er(r,e,n,i,t,o))})),s}function xr(t){return Er(t,5)}function Tr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new ln;++e<n;)this.add(t[e])}function Or(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Sr(t,e){return t.has(e)}function Mr(t,e,n,r,i,o){var s=1&n,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(t),u=o.get(e);if(c&&u)return c==e&&u==t;var h=-1,d=!0,f=2&n?new Tr:void 0;for(o.set(t,e),o.set(e,t);++h<a;){var p=t[h],m=e[h];if(r)var g=s?r(m,p,h,e,t,o):r(p,m,h,t,e,o);if(void 0!==g){if(g)continue;d=!1;break}if(f){if(!Or(e,(function(t,e){if(!Sr(f,e)&&(p===t||i(p,t,n,r,o)))return f.push(e)}))){d=!1;break}}else if(p!==m&&!i(p,m,n,r,o)){d=!1;break}}return o.delete(t),o.delete(e),d}function Ar(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Cr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}wr[vr]=wr["[object Array]"]=wr["[object ArrayBuffer]"]=wr["[object DataView]"]=wr["[object Boolean]"]=wr["[object Date]"]=wr["[object Float32Array]"]=wr["[object Float64Array]"]=wr["[object Int8Array]"]=wr["[object Int16Array]"]=wr["[object Int32Array]"]=wr["[object Map]"]=wr["[object Number]"]=wr[br]=wr["[object RegExp]"]=wr["[object Set]"]=wr["[object String]"]=wr["[object Symbol]"]=wr["[object Uint8Array]"]=wr["[object Uint8ClampedArray]"]=wr["[object Uint16Array]"]=wr["[object Uint32Array]"]=!0,wr["[object Error]"]=wr[_r]=wr["[object WeakMap]"]=!1,Tr.prototype.add=Tr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Tr.prototype.has=function(t){return this.__data__.has(t)};var Dr=Et?Et.prototype:void 0,kr=Dr?Dr.valueOf:void 0,Lr=Object.prototype.hasOwnProperty,Rr="[object Arguments]",Pr="[object Array]",Ir="[object Object]",Nr=Object.prototype.hasOwnProperty;function Br(t,e,n,r,i){return t===e||(null==t||null==e||!Dt(t)&&!Dt(e)?t!=t&&e!=e:function(t,e,n,r,i,o){var s=Rt(t),a=Rt(e),l=s?Pr:or(t),c=a?Pr:or(e),u=(l=l==Rr?Ir:l)==Ir,h=(c=c==Rr?Ir:c)==Ir,d=l==c;if(d&&ke(t)){if(!ke(e))return!1;s=!0,u=!1}if(d&&!u)return o||(o=new Ln),s||Fe(t)?Mr(t,e,n,r,i,o):function(t,e,n,r,i,o,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new ar(t),new ar(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return de(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=Ar;case"[object Set]":var l=1&r;if(a||(a=Cr),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;r|=2,s.set(t,e);var u=Mr(a(t),a(e),r,i,o,s);return s.delete(t),u;case"[object Symbol]":if(kr)return kr.call(t)==kr.call(e)}return!1}(t,e,l,n,r,i,o);if(!(1&n)){var f=u&&Nr.call(t,"__wrapped__"),p=h&&Nr.call(e,"__wrapped__");if(f||p){var m=f?t.value():t,g=p?e.value():e;return o||(o=new Ln),i(m,g,n,r,o)}}return!!d&&(o||(o=new Ln),function(t,e,n,r,i,o){var s=1&n,a=Gn(t),l=a.length;if(l!=Gn(e).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in e:Lr.call(e,u)))return!1}var h=o.get(t),d=o.get(e);if(h&&d)return h==e&&d==t;var f=!0;o.set(t,e),o.set(e,t);for(var p=s;++c<l;){var m=t[u=a[c]],g=e[u];if(r)var y=s?r(g,m,u,e,t,o):r(m,g,u,t,e,o);if(!(void 0===y?m===g||i(m,g,n,r,o):y)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var v=t.constructor,_=e.constructor;v!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof v&&v instanceof v&&"function"==typeof _&&_ instanceof _)&&(f=!1)}return o.delete(t),o.delete(e),f}(t,e,n,r,i,o))}(t,e,n,r,Br,i))}function Ur(t){return t==t&&!Ut(t)}function Fr(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}function jr(t,e){return null!=t&&e in Object(t)}function Hr(t){return"function"==typeof t?t:null==t?Ft:"object"==typeof t?Rt(t)?function(t,e){return Ke(t)&&Ur(e)?Fr(vn(t),e):function(n){var r=bn(n,t);return void 0===r&&r===e?function(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=gn(e,t)).length,o=!1;++r<i;){var s=vn(e[r]);if(!(o=null!=t&&n(t,s)))break;t=t[s]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&_e(i)&&ue(s,i)&&(Rt(t)||Me(t))}(t,e,jr)}(n,t):Br(e,r,3)}}(t[0],t[1]):function(t){var e=function(t){for(var e=We(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Ur(i)]}return e}(t);return 1==e.length&&e[0][2]?Fr(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n){var r=n.length,i=r;if(null==t)return!i;for(t=Object(t);r--;){var o=n[r];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++r<i;){var s=(o=n[r])[0],a=t[s],l=o[1];if(o[2]){if(void 0===a&&!(s in t))return!1}else if(!Br(l,a,3,void 0,new Ln))return!1}return!0}(n,0,e)}}(t):function(t){return Ke(t)?function(t){return function(e){return null==e?void 0:e[t]}}(vn(t)):function(t){return function(e){return _n(e,t)}}(t)}(t)}var $r=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),s=o.length;s--;){var a=o[++r];if(!1===e(i[a],a,i))break}return t};function zr(t,e,n){(void 0!==n&&!de(t[e],n)||void 0===n&&!(e in t))&&he(t,e,n)}function Gr(t){return Dt(t)&&be(t)}function Vr(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function Wr(t,e,n,r,i){t!==e&&$r(e,(function(o,s){if(i||(i=new Ln),Ut(o))!function(t,e,n,r,i,o,s){var a=Vr(t,n),l=Vr(e,n),c=s.get(l);if(c)zr(t,n,c);else{var u=o?o(a,l,n+"",t,e,s):void 0,h=void 0===u;if(h){var d=Rt(l),f=!d&&ke(l),p=!d&&!f&&Fe(l);u=l,d||f||p?Rt(a)?u=a:Gr(a)?u=ee(a):f?(h=!1,u=Bn(l,!0)):p?(h=!1,u=dr(l,!0)):u=[]:kn(l)||Me(l)?(u=a,Me(a)?u=function(t){return me(t,Ze(t))}(a):(!Ut(a)||jt(a))&&(u=fr(l))):h=!1}h&&(s.set(l,u),i(u,l,r,o,s),s.delete(l)),zr(t,n,u)}}(t,e,s,n,Wr,r,i);else{var a=r?r(Vr(t,s),o,s+"",t,e,i):void 0;void 0===a&&(a=o),zr(t,s,a)}}),Ze)}function Yr(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var Zr=Object.prototype.hasOwnProperty;var qr=function(t){return ve((function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,s&&function(t,e,n){if(!Ut(n))return!1;var r=typeof e;return!!("number"==r?be(n)&&ue(e,n.length):"string"==r&&e in n)&&de(n[e],t)}(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var a=n[r];a&&t(e,a,r)}return e}))}((function(t,e,n){Wr(t,e,n)})),Xr=Zn&&1/Cr(new Zn([,-0]))[1]==1/0?function(t){return new Zn(t)}:function(){};function Kr(t,e,n){var r=-1,i=le,o=t.length,s=!0,a=[],l=a;if(o>=200){var c=e?null:Xr(t);if(c)return Cr(c);s=!1,i=Sr,l=new Tr}else l=e?[]:a;t:for(;++r<o;){var u=t[r],h=e?e(u):u;if(u=0!==u?u:0,s&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue t;e&&l.push(h),a.push(u)}else i(l,h,n)||(l!==a&&l.push(h),a.push(u))}return a}var Qr=ve((function(t){var e=Yr(t);return Gr(e)&&(e=void 0),Kr(Tn(t,1,Gr,!0),Hr(e))}));function Jr(t){return t&&t.length?Kr(t):[]}function ti(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ei(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ni(t){let e,n,r;function i(t,r,i=0,o=t.length){if(i<o){if(0!==e(r,r))return o;do{const e=i+o>>>1;n(t[e],r)<0?i=e+1:o=e}while(i<o)}return i}return 2!==t.length?(e=ti,n=(e,n)=>ti(t(e),n),r=(e,n)=>t(e)-n):(e=t===ti||t===ei?t:ri,n=t,r=t),{left:i,center:function(t,e,n=0,o=t.length){const s=i(t,e,n,o-1);return s>n&&r(t[s-1],e)>-r(t[s],e)?s-1:s},right:function(t,r,i=0,o=t.length){if(i<o){if(0!==e(r,r))return o;do{const e=i+o>>>1;n(t[e],r)<=0?i=e+1:o=e}while(i<o)}return i}}}function ri(){return 0}const ii=ni(ti).right;function oi(t,e){let n,r;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}ni((function(t){return null===t?NaN:+t})).center;let si=class extends Map{constructor(t,e=li){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(ai(this,t))}has(t){return super.has(ai(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}(this,t))}};function ai({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function li(t){return null!==t&&"object"==typeof t?t.valueOf():t}const ci=Math.sqrt(50),ui=Math.sqrt(10),hi=Math.sqrt(2);function di(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=ci?10:o>=ui?5:o>=hi?2:1;let a,l,c;return i<0?(c=Math.pow(10,-i)/s,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,i)*s,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?di(t,e,2*n):[a,l,c]}function fi(t,e,n){if(!((n=+n)>0))return[];if((t=+t)==(e=+e))return[t];const r=e<t,[i,o,s]=r?di(e,t,n):di(t,e,n);if(!(o>=i))return[];const a=o-i+1,l=new Array(a);if(r)if(s<0)for(let t=0;t<a;++t)l[t]=(o-t)/-s;else for(let t=0;t<a;++t)l[t]=(o-t)*s;else if(s<0)for(let t=0;t<a;++t)l[t]=(i+t)/-s;else for(let t=0;t<a;++t)l[t]=(i+t)*s;return l}function pi(t,e,n){return di(t=+t,e=+e,n=+n)[2]}function mi(t,e,n){n=+n;const r=(e=+e)<(t=+t),i=r?pi(e,t,n):pi(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function gi(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}var yi={value:()=>{}};function vi(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new _i(r)}function _i(t){this._=t}function bi(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function wi(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=yi,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}_i.prototype=vi.prototype={constructor:_i,on:function(t,e){var n,r=this._,i=function(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}(t+"",r),o=-1,s=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=i[o]).type)r[n]=wi(r[n],t.name,e);else if(null==e)for(n in r)r[n]=wi(r[n],t.name,null);return this}for(;++o<s;)if((n=(t=i[o]).type)&&(n=bi(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new _i(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var Ei="http://www.w3.org/1999/xhtml";const xi={svg:"http://www.w3.org/2000/svg",xhtml:Ei,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ti(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),xi.hasOwnProperty(e)?{space:xi[e],local:t}:t}function Oi(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ei&&e.documentElement.namespaceURI===Ei?e.createElement(t):e.createElementNS(n,t)}}function Si(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Mi(t){var e=Ti(t);return(e.local?Si:Oi)(e)}function Ai(){}function Ci(t){return null==t?Ai:function(){return this.querySelector(t)}}function Di(){return[]}function ki(t){return null==t?Di:function(){return this.querySelectorAll(t)}}function Li(t){return function(){return this.matches(t)}}function Ri(t){return function(e){return e.matches(t)}}var Pi=Array.prototype.find;function Ii(){return this.firstElementChild}var Ni=Array.prototype.filter;function Bi(){return Array.from(this.children)}function Ui(t){return new Array(t.length)}function Fi(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function ji(t,e,n,r,i,o){for(var s,a=0,l=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Fi(t,o[a]);for(;a<l;++a)(s=e[a])&&(i[a]=s)}function Hi(t,e,n,r,i,o,s){var a,l,c,u=new Map,h=e.length,d=o.length,f=new Array(h);for(a=0;a<h;++a)(l=e[a])&&(f[a]=c=s.call(l,l.__data__,a,e)+"",u.has(c)?i[a]=l:u.set(c,l));for(a=0;a<d;++a)c=s.call(t,o[a],a,o)+"",(l=u.get(c))?(r[a]=l,l.__data__=o[a],u.delete(c)):n[a]=new Fi(t,o[a]);for(a=0;a<h;++a)(l=e[a])&&u.get(f[a])===l&&(i[a]=l)}function $i(t){return t.__data__}function zi(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Gi(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Vi(t){return function(){this.removeAttribute(t)}}function Wi(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Yi(t,e){return function(){this.setAttribute(t,e)}}function Zi(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function qi(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Xi(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Ki(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Qi(t){return function(){this.style.removeProperty(t)}}function Ji(t,e,n){return function(){this.style.setProperty(t,e,n)}}function to(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function eo(t,e){return t.style.getPropertyValue(e)||Ki(t).getComputedStyle(t,null).getPropertyValue(e)}function no(t){return function(){delete this[t]}}function ro(t,e){return function(){this[t]=e}}function io(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function oo(t){return t.trim().split(/^|\s+/)}function so(t){return t.classList||new ao(t)}function ao(t){this._node=t,this._names=oo(t.getAttribute("class")||"")}function lo(t,e){for(var n=so(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function co(t,e){for(var n=so(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function uo(t){return function(){lo(this,t)}}function ho(t){return function(){co(this,t)}}function fo(t,e){return function(){(e.apply(this,arguments)?lo:co)(this,t)}}function po(){this.textContent=""}function mo(t){return function(){this.textContent=t}}function go(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function yo(){this.innerHTML=""}function vo(t){return function(){this.innerHTML=t}}function _o(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function bo(){this.nextSibling&&this.parentNode.appendChild(this)}function wo(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Eo(){return null}function xo(){var t=this.parentNode;t&&t.removeChild(this)}function To(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Oo(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function So(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Mo(t,e,n){return function(){var r,i=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var s=0,a=i.length;s<a;++s)if((r=i[s]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=e);this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function Ao(t,e,n){var r=Ki(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Co(t,e){return function(){return Ao(this,t,e)}}function Do(t,e){return function(){return Ao(this,t,e.apply(this,arguments))}}Fi.prototype={constructor:Fi,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},ao.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var ko=[null];function Lo(t,e){this._groups=t,this._parents=e}function Ro(){return new Lo([[document.documentElement]],ko)}function Po(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}function Io(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function No(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Bo(){}Lo.prototype=Ro.prototype={constructor:Lo,select:function(t){"function"!=typeof t&&(t=Ci(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,s,a=e[i],l=a.length,c=r[i]=new Array(l),u=0;u<l;++u)(o=a[u])&&(s=t.call(o,o.__data__,u,a))&&("__data__"in o&&(s.__data__=o.__data__),c[u]=s);return new Lo(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return function(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}(t.apply(this,arguments))}}(t):ki(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var s,a=e[o],l=a.length,c=0;c<l;++c)(s=a[c])&&(r.push(t.call(s,s.__data__,c,a)),i.push(s));return new Lo(r,i)},selectChild:function(t){return this.select(null==t?Ii:function(t){return function(){return Pi.call(this.children,t)}}("function"==typeof t?t:Ri(t)))},selectChildren:function(t){return this.selectAll(null==t?Bi:function(t){return function(){return Ni.call(this.children,t)}}("function"==typeof t?t:Ri(t)))},filter:function(t){"function"!=typeof t&&(t=Li(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,s=e[i],a=s.length,l=r[i]=[],c=0;c<a;++c)(o=s[c])&&t.call(o,o.__data__,c,s)&&l.push(o);return new Lo(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,$i);var n=e?Hi:ji,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,s=new Array(o),a=new Array(o),l=new Array(o),c=0;c<o;++c){var u=r[c],h=i[c],d=h.length,f=zi(t.call(u,u&&u.__data__,c,r)),p=f.length,m=a[c]=new Array(p),g=s[c]=new Array(p);n(u,h,m,g,l[c]=new Array(d),f,e);for(var y,v,_=0,b=0;_<p;++_)if(y=m[_]){for(_>=b&&(b=_+1);!(v=g[b])&&++b<p;);y._next=v||null}}return(s=new Lo(s,r))._enter=a,s._exit=l,s},enter:function(){return new Lo(this._enter||this._groups.map(Ui),this._parents)},exit:function(){return new Lo(this._exit||this._groups.map(Ui),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,s=Math.min(i,o),a=new Array(i),l=0;l<s;++l)for(var c,u=n[l],h=r[l],d=u.length,f=a[l]=new Array(d),p=0;p<d;++p)(c=u[p]||h[p])&&(f[p]=c);for(;l<i;++l)a[l]=n[l];return new Lo(a,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,s=i[o];--o>=0;)(r=i[o])&&(s&&4^r.compareDocumentPosition(s)&&s.parentNode.insertBefore(r,s),s=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Gi);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s,a=n[o],l=a.length,c=i[o]=new Array(l),u=0;u<l;++u)(s=a[u])&&(c[u]=s);c.sort(e)}return new Lo(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],s=0,a=o.length;s<a;++s)(i=o[s])&&t.call(i,i.__data__,s,o);return this},attr:function(t,e){var n=Ti(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?Wi:Vi:"function"==typeof e?n.local?Xi:qi:n.local?Zi:Yi)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Qi:"function"==typeof e?to:Ji)(t,e,n??"")):eo(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?no:"function"==typeof e?io:ro)(t,e)):this.node()[t]},classed:function(t,e){var n=oo(t+"");if(arguments.length<2){for(var r=so(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?fo:e?uo:ho)(n,e))},text:function(t){return arguments.length?this.each(null==t?po:("function"==typeof t?go:mo)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?yo:("function"==typeof t?_o:vo)(t)):this.node().innerHTML},raise:function(){return this.each(bo)},lower:function(){return this.each(wo)},append:function(t){var e="function"==typeof t?t:Mi(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Mi(t),r=null==e?Eo:"function"==typeof e?e:Ci(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(xo)},clone:function(t){return this.select(t?Oo:To)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),s=o.length;if(!(arguments.length<2)){for(a=e?Mo:So,r=0;r<s;++r)this.each(a(o[r],e,n));return this}var a=this.node().__on;if(a)for(var l,c=0,u=a.length;c<u;++c)for(r=0,l=a[c];r<s;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Do:Co)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],o=0,s=i.length;o<s;++o)(r=i[o])&&(yield r)}};var Uo=.7,Fo=1/Uo,jo="\\s*([+-]?\\d+)\\s*",Ho="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",$o="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zo=/^#([0-9a-f]{3,8})$/,Go=new RegExp(`^rgb\\(${jo},${jo},${jo}\\)$`),Vo=new RegExp(`^rgb\\(${$o},${$o},${$o}\\)$`),Wo=new RegExp(`^rgba\\(${jo},${jo},${jo},${Ho}\\)$`),Yo=new RegExp(`^rgba\\(${$o},${$o},${$o},${Ho}\\)$`),Zo=new RegExp(`^hsl\\(${Ho},${$o},${$o}\\)$`),qo=new RegExp(`^hsla\\(${Ho},${$o},${$o},${Ho}\\)$`),Xo={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};function Ko(){return this.rgb().formatHex()}function Qo(){return this.rgb().formatRgb()}function Jo(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=zo.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?ts(e):3===n?new rs(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?es(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?es(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Go.exec(t))?new rs(e[1],e[2],e[3],1):(e=Vo.exec(t))?new rs(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Wo.exec(t))?es(e[1],e[2],e[3],e[4]):(e=Yo.exec(t))?es(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Zo.exec(t))?cs(e[1],e[2]/100,e[3]/100,1):(e=qo.exec(t))?cs(e[1],e[2]/100,e[3]/100,e[4]):Xo.hasOwnProperty(t)?ts(Xo[t]):"transparent"===t?new rs(NaN,NaN,NaN,0):null}function ts(t){return new rs(t>>16&255,t>>8&255,255&t,1)}function es(t,e,n,r){return r<=0&&(t=e=n=NaN),new rs(t,e,n,r)}function ns(t,e,n,r){return 1===arguments.length?function(t){return t instanceof Bo||(t=Jo(t)),t?new rs((t=t.rgb()).r,t.g,t.b,t.opacity):new rs}(t):new rs(t,e,n,r??1)}function rs(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function is(){return`#${ls(this.r)}${ls(this.g)}${ls(this.b)}`}function os(){const t=ss(this.opacity);return`${1===t?"rgb(":"rgba("}${as(this.r)}, ${as(this.g)}, ${as(this.b)}${1===t?")":`, ${t})`}`}function ss(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function as(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ls(t){return((t=as(t))<16?"0":"")+t.toString(16)}function cs(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new hs(t,e,n,r)}function us(t){if(t instanceof hs)return new hs(t.h,t.s,t.l,t.opacity);if(t instanceof Bo||(t=Jo(t)),!t)return new hs;if(t instanceof hs)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,a=o-i,l=(o+i)/2;return a?(s=e===o?(n-r)/a+6*(n<r):n===o?(r-e)/a+2:(e-n)/a+4,a/=l<.5?o+i:2-o-i,s*=60):a=l>0&&l<1?0:s,new hs(s,a,l,t.opacity)}function hs(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function ds(t){return(t=(t||0)%360)<0?t+360:t}function fs(t){return Math.max(0,Math.min(1,t||0))}function ps(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Io(Bo,Jo,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Ko,formatHex:Ko,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return us(this).formatHsl()},formatRgb:Qo,toString:Qo}),Io(rs,ns,No(Bo,{brighter(t){return t=null==t?Fo:Math.pow(Fo,t),new rs(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Uo:Math.pow(Uo,t),new rs(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new rs(as(this.r),as(this.g),as(this.b),ss(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:is,formatHex:is,formatHex8:function(){return`#${ls(this.r)}${ls(this.g)}${ls(this.b)}${ls(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:os,toString:os})),Io(hs,(function(t,e,n,r){return 1===arguments.length?us(t):new hs(t,e,n,r??1)}),No(Bo,{brighter(t){return t=null==t?Fo:Math.pow(Fo,t),new hs(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Uo:Math.pow(Uo,t),new hs(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new rs(ps(t>=240?t-240:t+120,i,r),ps(t,i,r),ps(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new hs(ds(this.h),fs(this.s),fs(this.l),ss(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=ss(this.opacity);return`${1===t?"hsl(":"hsla("}${ds(this.h)}, ${100*fs(this.s)}%, ${100*fs(this.l)}%${1===t?")":`, ${t})`}`}}));const ms=t=>()=>t;function gs(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):ms(isNaN(t)?e:t)}const ys=function t(e){var n=function(t){return 1==(t=+t)?gs:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):ms(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=ns(t)).r,(e=ns(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),s=gs(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=s(e),t+""}}return r.gamma=t,r}(1);function vs(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}}function _s(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),s=new Array(r);for(n=0;n<i;++n)o[n]=Ss(t[n],e[n]);for(;n<r;++n)s[n]=e[n];return function(t){for(n=0;n<i;++n)s[n]=o[n](t);return s}}function bs(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ws(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Es(t,e){var n,r={},i={};for(n in(null===t||"object"!=typeof t)&&(t={}),(null===e||"object"!=typeof e)&&(e={}),e)n in t?r[n]=Ss(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var xs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ts=new RegExp(xs.source,"g");function Os(t,e){var n,r,i,o=xs.lastIndex=Ts.lastIndex=0,s=-1,a=[],l=[];for(t+="",e+="";(n=xs.exec(t))&&(r=Ts.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),a[s]?a[s]+=i:a[++s]=i),(n=n[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:ws(n,r)})),o=Ts.lastIndex;return o<e.length&&(i=e.slice(o),a[s]?a[s]+=i:a[++s]=i),a.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,r=0;r<e;++r)a[(n=l[r]).i]=n.x(t);return a.join("")})}function Ss(t,e){var n,r=typeof e;return null==e||"boolean"===r?ms(e):("number"===r?ws:"string"===r?(n=Jo(e))?(e=n,ys):Os:e instanceof Jo?ys:e instanceof Date?bs:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?vs:Array.isArray(e)?_s:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Es:ws)(t,e)}function Ms(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var As,Cs=180/Math.PI,Ds={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ks(t,e,n,r,i,o){var s,a,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,l/=a),t*r<e*n&&(t=-t,e=-e,l=-l,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Cs,skewX:Math.atan(l)*Cs,scaleX:s,scaleY:a}}function Ls(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,s){var a=[],l=[];return o=t(o),s=t(s),function(t,r,i,o,s,a){if(t!==i||r!==o){var l=s.push("translate(",null,e,null,n);a.push({i:l-4,x:ws(t,i)},{i:l-2,x:ws(r,o)})}else(i||o)&&s.push("translate("+i+e+o+n)}(o.translateX,o.translateY,s.translateX,s.translateY,a,l),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:ws(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,s.rotate,a,l),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:ws(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,s.skewX,a,l),function(t,e,n,r,o,s){if(t!==n||e!==r){var a=o.push(i(o)+"scale(",null,",",null,")");s.push({i:a-4,x:ws(t,n)},{i:a-2,x:ws(e,r)})}else(1!==n||1!==r)&&o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,a,l),o=s=null,function(t){for(var e,n=-1,r=l.length;++n<r;)a[(e=l[n]).i]=e.x(t);return a.join("")}}}var Rs,Ps,Is=Ls((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Ds:ks(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),Ns=Ls((function(t){return null!=t&&(As||(As=document.createElementNS("http://www.w3.org/2000/svg","g")),As.setAttribute("transform",t),t=As.transform.baseVal.consolidate())?ks((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Ds}),", ",")",")"),Bs=0,Us=0,Fs=0,js=0,Hs=0,$s=0,zs="object"==typeof performance&&performance.now?performance:Date,Gs="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Vs(){return Hs||(Gs(Ws),Hs=zs.now()+$s)}function Ws(){Hs=0}function Ys(){this._call=this._time=this._next=null}function Zs(t,e,n){var r=new Ys;return r.restart(t,e,n),r}function qs(){Hs=(js=zs.now())+$s,Bs=Us=0;try{!function(){Vs(),++Bs;for(var t,e=Rs;e;)(t=Hs-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Bs}()}finally{Bs=0,function(){for(var t,e,n=Rs,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Rs=e);Ps=t,Ks(r)}(),Hs=0}}function Xs(){var t=zs.now(),e=t-js;e>1e3&&($s-=e,js=t)}function Ks(t){Bs||(Us&&(Us=clearTimeout(Us)),t-Hs>24?(t<1/0&&(Us=setTimeout(qs,t-zs.now()-$s)),Fs&&(Fs=clearInterval(Fs))):(Fs||(js=zs.now(),Fs=setInterval(Xs,1e3)),Bs=1,Gs(qs)))}function Qs(t,e,n){var r=new Ys;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}Ys.prototype=Zs.prototype={constructor:Ys,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Vs():+n)+(null==e?0:+e),!this._next&&Ps!==this&&(Ps?Ps._next=this:Rs=this,Ps=this),this._call=t,this._time=n,Ks()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ks())}};var Js=vi("start","end","cancel","interrupt"),ta=[];function ea(t,e,n,r,i,o){var s=t.__transition;if(s){if(n in s)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(l){var c,u,h,d;if(1!==n.state)return a();for(c in i)if((d=i[c]).name===n.name){if(3===d.state)return Qs(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[c]):+c<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[c])}if(Qs((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(l))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),c=0,u=-1;c<h;++c)(d=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++u]=d);r.length=u+1}}function s(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(a),n.state=5,1),o=-1,s=r.length;++o<s;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),a())}function a(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Zs((function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Js,tween:ta,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function na(t,e){var n=ia(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function ra(t,e){var n=ia(t,e);if(n.state>3)throw new Error("too late; already running");return n}function ia(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function oa(t,e){var n,r,i,o=t.__transition,s=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):s=!1;s&&delete t.__transition}}function sa(t,e){var n,r;return function(){var i=ra(this,t),o=i.tween;if(o!==n)for(var s=0,a=(r=n=o).length;s<a;++s)if(r[s].name===e){(r=r.slice()).splice(s,1);break}i.tween=r}}function aa(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=ra(this,t),s=o.tween;if(s!==r){i=(r=s).slice();for(var a={name:e,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===e){i[l]=a;break}l===c&&i.push(a)}o.tween=i}}function la(t,e,n){var r=t._id;return t.each((function(){var t=ra(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return ia(t,r).value[e]}}function ca(t,e){var n;return("number"==typeof e?ws:e instanceof Jo?ys:(n=Jo(e))?(e=n,ys):Os)(t,e)}function ua(t){return function(){this.removeAttribute(t)}}function ha(t){return function(){this.removeAttributeNS(t.space,t.local)}}function da(t,e,n){var r,i,o=n+"";return function(){var s=this.getAttribute(t);return s===o?null:s===r?i:i=e(r=s,n)}}function fa(t,e,n){var r,i,o=n+"";return function(){var s=this.getAttributeNS(t.space,t.local);return s===o?null:s===r?i:i=e(r=s,n)}}function pa(t,e,n){var r,i,o;return function(){var s,a,l=n(this);return null==l?void this.removeAttribute(t):(s=this.getAttribute(t))===(a=l+"")?null:s===r&&a===i?o:(i=a,o=e(r=s,l))}}function ma(t,e,n){var r,i,o;return function(){var s,a,l=n(this);return null==l?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local))===(a=l+"")?null:s===r&&a===i?o:(i=a,o=e(r=s,l))}}function ga(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,i)),n}return i._value=e,i}function ya(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,i)),n}return i._value=e,i}function va(t,e){return function(){na(this,t).delay=+e.apply(this,arguments)}}function _a(t,e){return e=+e,function(){na(this,t).delay=e}}function ba(t,e){return function(){ra(this,t).duration=+e.apply(this,arguments)}}function wa(t,e){return e=+e,function(){ra(this,t).duration=e}}var Ea=Ro.prototype.constructor;function xa(t){return function(){this.style.removeProperty(t)}}var Ta=0;function Oa(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Sa(){return++Ta}var Ma=Ro.prototype;function Aa(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Oa.prototype={constructor:Oa,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Ci(t));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var a,l,c=r[s],u=c.length,h=o[s]=new Array(u),d=0;d<u;++d)(a=c[d])&&(l=t.call(a,a.__data__,d,c))&&("__data__"in a&&(l.__data__=a.__data__),h[d]=l,ea(h[d],e,n,d,h,ia(a,n)));return new Oa(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ki(t));for(var r=this._groups,i=r.length,o=[],s=[],a=0;a<i;++a)for(var l,c=r[a],u=c.length,h=0;h<u;++h)if(l=c[h]){for(var d,f=t.call(l,l.__data__,h,c),p=ia(l,n),m=0,g=f.length;m<g;++m)(d=f[m])&&ea(d,e,n,m,f,p);o.push(f),s.push(l)}return new Oa(o,s,e,n)},selectChild:Ma.selectChild,selectChildren:Ma.selectChildren,filter:function(t){"function"!=typeof t&&(t=Li(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,s=e[i],a=s.length,l=r[i]=[],c=0;c<a;++c)(o=s[c])&&t.call(o,o.__data__,c,s)&&l.push(o);return new Oa(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),s=new Array(r),a=0;a<o;++a)for(var l,c=e[a],u=n[a],h=c.length,d=s[a]=new Array(h),f=0;f<h;++f)(l=c[f]||u[f])&&(d[f]=l);for(;a<r;++a)s[a]=e[a];return new Oa(s,this._parents,this._name,this._id)},selection:function(){return new Ea(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Sa(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s,a=r[o],l=a.length,c=0;c<l;++c)if(s=a[c]){var u=ia(s,e);ea(s,t,n,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Oa(r,this._parents,t,n)},call:Ma.call,nodes:Ma.nodes,node:Ma.node,size:Ma.size,empty:Ma.empty,each:Ma.each,on:function(t,e){var n=this._id;return arguments.length<2?ia(this.node(),n).on.on(t):this.each(function(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?na:ra;return function(){var s=o(this,t),a=s.on;a!==r&&(i=(r=a).copy()).on(e,n),s.on=i}}(n,t,e))},attr:function(t,e){var n=Ti(t),r="transform"===n?Ns:ca;return this.attrTween(t,"function"==typeof e?(n.local?ma:pa)(n,r,la(this,"attr."+t,e)):null==e?(n.local?ha:ua)(n):(n.local?fa:da)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=Ti(t);return this.tween(n,(r.local?ga:ya)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Is:ca;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=eo(this,t),s=(this.style.removeProperty(t),eo(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}(t,r)).on("end.style."+t,xa(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var s=eo(this,t),a=n(this),l=a+"";return null==a&&(this.style.removeProperty(t),l=a=eo(this,t)),s===l?null:s===r&&l===i?o:(i=l,o=e(r=s,a))}}(t,r,la(this,"style."+t,e))).each(function(t,e){var n,r,i,o,s="style."+e,a="end."+s;return function(){var l=ra(this,t),c=l.on,u=null==l.value[s]?o||(o=xa(e)):void 0;(c!==n||i!==u)&&(r=(n=c).copy()).on(a,i=u),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var s=eo(this,t);return s===o?null:s===r?i:i=e(r=s,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,o,n)),r}return o._value=e,o}(t,e,n??""))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=e??""}}(la(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=ia(this.node(),n).tween,o=0,s=i.length;o<s;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?sa:aa)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?va:_a)(e,t)):ia(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ba:wa)(e,t)):ia(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){ra(this,t).ease=e}}(e,t)):ia(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;ra(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,s){var a={value:s},l={value:function(){0==--i&&o()}};n.each((function(){var n=ra(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),n.on=e})),0===i&&o()}))},[Symbol.iterator]:Ma[Symbol.iterator]};var Ca={time:null,delay:0,duration:250,ease:Aa};function Da(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function ka(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function La(t){return(t=ka(Math.abs(t)))?t[1]:NaN}Ro.prototype.interrupt=function(t){return this.each((function(){oa(this,t)}))},Ro.prototype.transition=function(t){var e,n;t instanceof Oa?(e=t._id,t=t._name):(e=Sa(),(n=Ca).time=Vs(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s,a=r[o],l=a.length,c=0;c<l;++c)(s=a[c])&&ea(s,t,e,c,a,n||Da(s,e));return new Oa(r,this._parents,t,e)};var Ra,Pa=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ia(t){if(!(e=Pa.exec(t)))throw new Error("invalid format: "+t);var e;return new Na({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Na(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Ba(t,e){var n=ka(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Ia.prototype=Na.prototype,Na.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Ua={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Ba(100*t,e),r:Ba,s:function(t,e){var n=ka(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Ra=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+ka(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Fa(t){return t}var ja,Ha,$a,za=Array.prototype.map,Ga=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Va(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}ja=function(t){var e=void 0===t.grouping||void 0===t.thousands?Fa:function(t,e){return function(n,r){for(var i=n.length,o=[],s=0,a=t[0],l=0;i>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),o.push(n.substring(i-=a,i+a)),!((l+=a+1)>r));)a=t[s=(s+1)%t.length];return o.reverse().join(e)}}(za.call(t.grouping,Number),t.thousands+""),n=void 0===t.currency?"":t.currency[0]+"",r=void 0===t.currency?"":t.currency[1]+"",i=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?Fa:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(za.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",a=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function c(t){var c=(t=Ia(t)).fill,u=t.align,h=t.sign,d=t.symbol,f=t.zero,p=t.width,m=t.comma,g=t.precision,y=t.trim,v=t.type;"n"===v?(m=!0,v="g"):Ua[v]||(void 0===g&&(g=12),y=!0,v="g"),(f||"0"===c&&"="===u)&&(f=!0,c="0",u="=");var _="$"===d?n:"#"===d&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",b="$"===d?r:/[%p]/.test(v)?s:"",w=Ua[v],E=/[defgprs%]/.test(v);function x(t){var n,r,s,d=_,x=b;if("c"===v)x=w(t)+x,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:w(Math.abs(t),g),y&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==h&&(T=!1),d=(T?"("===h?h:a:"-"===h||"("===h?"":h)+d,x=("s"===v?Ga[8+Ra/3]:"")+x+(T&&"("===h?")":""),E)for(n=-1,r=t.length;++n<r;)if(48>(s=t.charCodeAt(n))||s>57){x=(46===s?i+t.slice(n+1):t.slice(n))+x,t=t.slice(0,n);break}}m&&!f&&(t=e(t,1/0));var O=d.length+t.length+x.length,S=O<p?new Array(p-O+1).join(c):"";switch(m&&f&&(t=e(S+t,S.length?p-x.length:1/0),S=""),u){case"<":t=d+t+x+S;break;case"=":t=d+S+t+x;break;case"^":t=S.slice(0,O=S.length>>1)+d+t+x+S.slice(O);break;default:t=S+d+t+x}return o(t)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),x.toString=function(){return t+""},x}return{format:c,formatPrefix:function(t,e){var n=c(((t=Ia(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(La(e)/3))),i=Math.pow(10,-r),o=Ga[8+r/3];return function(t){return n(i*t)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),Ha=ja.format,$a=ja.formatPrefix;const Wa=Symbol("implicit");function Ya(){var t=new si,e=[],n=[],r=Wa;function i(i){let o=t.get(i);if(void 0===o){if(r!==Wa)return r;t.set(i,o=e.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new si;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Ya(e,n).unknown(r)},Va.apply(i,arguments),i}function Za(t){return+t}var qa=[0,1];function Xa(t){return t}function Ka(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Qa(t,e,n){var r=t[0],i=t[1],o=e[0],s=e[1];return i<r?(r=Ka(i,r),o=n(s,o)):(r=Ka(r,i),o=n(o,s)),function(t){return o(r(t))}}function Ja(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),s=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<r;)i[s]=Ka(t[s],t[s+1]),o[s]=n(e[s],e[s+1]);return function(e){var n=ii(t,e,1,r)-1;return o[n](i[n](e))}}function tl(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function el(){var t,e,n,r,i,o,s=qa,a=qa,l=Ss,c=Xa;function u(){var t=Math.min(s.length,a.length);return c!==Xa&&(c=function(t,e){var n;return t>e&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}(s[0],s[t-1])),r=t>2?Ja:Qa,i=o=null,h}function h(e){return null==e||isNaN(e=+e)?n:(i||(i=r(s.map(t),a,l)))(t(c(e)))}return h.invert=function(n){return c(e((o||(o=r(a,s.map(t),ws)))(n)))},h.domain=function(t){return arguments.length?(s=Array.from(t,Za),u()):s.slice()},h.range=function(t){return arguments.length?(a=Array.from(t),u()):a.slice()},h.rangeRound=function(t){return a=Array.from(t),l=Ms,u()},h.clamp=function(t){return arguments.length?(c=!!t||Xa,u()):c!==Xa},h.interpolate=function(t){return arguments.length?(l=t,u()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,u()}}function nl(){return el()(Xa,Xa)}function rl(t){var e=t.domain;return t.ticks=function(t){var n=e();return fi(n[0],n[n.length-1],t??10)},t.tickFormat=function(t,n){var r=e();return function(t,e,n,r){var i,o=mi(t,e,n);switch((r=Ia(r??",f")).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null==r.precision&&!isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(La(e)/3)))-La(Math.abs(t)))}(o,s))&&(r.precision=i),$a(r,s);case"":case"e":case"g":case"p":case"r":null==r.precision&&!isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,La(e)-La(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=i-("e"===r.type));break;case"f":case"%":null==r.precision&&!isNaN(i=function(t){return Math.max(0,-La(Math.abs(t)))}(o))&&(r.precision=i-2*("%"===r.type))}return Ha(r)}(r[0],r[r.length-1],t??10,n)},t.nice=function(n){null==n&&(n=10);var r,i,o=e(),s=0,a=o.length-1,l=o[s],c=o[a],u=10;for(c<l&&(i=l,l=c,c=i,i=s,s=a,a=i);u-- >0;){if((i=pi(l,c,n))===r)return o[s]=l,o[a]=c,e(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return t},t}function il(){var t=nl();return t.copy=function(){return tl(t,il())},Va.apply(t,arguments),rl(t)}function ol(t,e,n){this.k=t,this.x=e,this.y=n}ol.prototype={constructor:ol,scale:function(t){return 1===t?this:new ol(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new ol(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},ol.prototype;const sl="cds",al=7,ll=2.5,cl=3.5,ul={reference:"value",compareTo:"marker"},hl=4,dl={duration:1e3,ease:Aa,zoomLevel:3},fl={"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1},pl={defaultBins:10},ml={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}},gl=24,yl={defaultOffset:4,horizontalOffset:10},vl={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}},_l={height:{[U.GRAPH_VIEW]:32,[U.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},bl=[{type:et.RADIUS,name:"Radius"},{type:et.AREA,name:"Poor area"},{type:et.AREA,name:"Satisfactory area"},{type:et.AREA,name:"Great area"},{type:et.QUARTILE,name:"Quartiles"}],wl={type:F.END_LINE,threshold:16,numCharacter:14},El={code:typeof navigator<"u"&&(null==navigator?void 0:navigator.language)||"en-US",number:(t,e=(null==navigator?void 0:navigator.language)||"en-US")=>t.toLocaleString(e),date:(t,e=(null==navigator?void 0:navigator.language)||"en-US",n={},r=null)=>r||t.toLocaleDateString(e,n),time:(t,e=(null==navigator?void 0:navigator.language)||"en-US",n={},r=null)=>r||t.toLocaleTimeString(e,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"}}},xl={enabled:!0,position:$.BOTTOM,clickable:!0,truncation:wl,alignment:z.LEFT,order:null,additionalItems:[]},Tl={enabled:!0,showTotal:!0,truncation:wl,groupLabel:"Group"},Ol={top:{visible:!0,includeZero:!0,truncation:wl},bottom:{visible:!0,includeZero:!0,truncation:wl},left:{visible:!0,includeZero:!0,truncation:wl},right:{visible:!0,includeZero:!0,truncation:wl}},Sl={addSpaceOnEdges:1,showDayName:!1,localeObject:yt,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 Ml=!1;try{Ml=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}catch(vt){console.warn("Fullscreen capabilities check failed: ",vt.message)}const Al={width:null,height:null,resizable:!0,theme:I.WHITE,tooltip:Tl,legend:xl,locale:El,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:J.SHOW_AS_DATATABLE},...Ml?[{type:J.MAKE_FULLSCREEN}]:[],{type:J.EXPORT_CSV},{type:J.EXPORT_PNG},{type:J.EXPORT_JPG}]}},Cl=qr({},Al,{thematic:{projection:it.geoNaturalEarth1}}),Dl=qr({},Al,{axes:Ol,timeScale:Sl,grid:{x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},ruler:{enabled:!0},zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:U.GRAPH_VIEW}}}),kl=qr({},Dl,{bars:{maxWidth:16,spacingFactor:.25},timeScale:qr(Sl,{addSpaceOnEdges:1})}),Ll=qr({},kl,{}),Rl=qr({},kl,{}),Pl=qr({},kl,{bars:qr({},kl.bars,{dividerSize:1.5})}),Il=qr({},kl,{}),Nl=qr({},Dl,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),Bl=Nl,Ul=qr({},Nl,{points:{radius:3,filled:!1,enabled:!0}}),Fl=qr({},Ul,{timeScale:qr(Sl,{addSpaceOnEdges:0})}),jl=Fl,Hl=qr({},Dl,{bubble:{radiusMapsTo:"radius",radiusLabel:"Radius",radiusRange:t=>{const e=Math.min(t.width,t.height);return[3*e/400,25*e/400]},fillOpacity:.2,enabled:!0},points:{filled:!0},legend:{additionalItems:[{type:et.RADIUS,name:"Radius"}]}}),$l=qr({},Dl,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:et.AREA,name:"Poor area"},{type:et.AREA,name:"Satisfactory area"},{type:et.AREA,name:"Great area"},{type:et.QUARTILE,name:"Quartiles"}]}}),zl=qr({},kl,{bars:{dividerSize:1.5},timeScale:qr(Sl,{addSpaceOnEdges:0})}),Gl=qr({},Al,{tooltip:qr({},Tl,{wordLabel:"Word",valueLabel:"Value"}),wordCloud:{fontSizeMapsTo:"value",fontSizeRange:t=>{const e=Math.min(t.width,t.height);return[20*e/400,75*e/400]},wordMapsTo:"word"}}),Vl=qr({},Al,{pie:{labels:{formatter:null,enabled:!0},alignment:z.LEFT,sortFunction:null,valueMapsTo:"value"}}),Wl=qr({},Al,{legend:{enabled:!1},gauge:{type:X.SEMI,arcWidth:16,deltaArrow:{size:t=>t/8,enabled:!0},showPercentageSymbol:!0,status:null,numberSpacing:10,deltaFontSize:t=>t/8,valueFontSize:t=>t/2.5,alignment:z.LEFT}}),Yl=qr({},Vl,{donut:{center:{numberFontSize:t=>`${Math.min(t/100*24,24)}px`,titleFontSize:t=>`${Math.min(t/100*15,15)}px`,titleYPosition:t=>Math.min(t/80*20,20)},alignment:z.LEFT}}),Zl=qr({},Al,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),ql=qr({},Zl,{legend:{enabled:!0}}),Xl=qr({},Al,{radar:{axes:{angle:"key",value:"value"},alignment:z.LEFT},tooltip:{gridline:{enabled:!0}}}),Kl=qr({},kl,{comboChartTypes:[]}),Ql=qr({tree:{type:V.TREE}},Al,{}),Jl=qr({},Al,{data:qr(Al.data,{groupMapsTo:"name"})}),tc=qr({},Al,{circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},depth:2},{data:qr(Al.data,{groupMapsTo:"name"})}),ec=qr({},Al,{alluvial:{data:qr(Al.data,{groupMapsTo:"source"}),nodeAlignment:z.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),nc=qr({},Al,{axes:Ol,heatmap:{divider:{state:nt.AUTO},colorLegend:{type:"linear"}}}),rc={alluvialChart:ec,areaChart:Fl,axisChart:Dl,boxplotChart:Il,bubbleChart:Hl,bulletChart:$l,chart:Al,circlePackChart:tc,choroplethChart:qr({},Cl,{choropleth:{colorLegend:{type:"linear"}}}),comboChart:Kl,donutChart:Yl,gaugeChart:Wl,groupedBarChart:Rl,heatmapChart:nc,histogramChart:zl,lineChart:Ul,lollipopChart:Bl,meterChart:Zl,pieChart:Vl,proportionalMeterChart:ql,radarChart:Xl,scatterChart:Nl,simpleBarChart:Ll,stackedAreaChart:jl,stackedBarChart:Pl,thematicChart:Cl,treeChart:Ql,treemapChart:Jl,wordCloudChart:Gl};function ic(t){if(!t)return;const e=t.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(!e)return null;if(e[0]){const t=e[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:t[0],ty:t[1]}}return null}function oc(t,e,n){return n>t.length?t:e===F.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===F.FRONT_LINE?"..."+t.substr(-n):e===F.END_LINE?t.substr(0,n)+"...":void 0}function sc(t,e){const n=ac(t,"legend","additionalItems"),r=ac(e,"legend","additionalItems");if(n&&r){const i=r.map((t=>t.type)),o=n.map((t=>t.type)),s=bl.filter((t=>o.includes(t.type)&&!i.includes(t.type)));t.legend.additionalItems=s,e.legend.additionalItems=Qr(s,r,"name")}}const ac=(t,...e)=>{let n=t;if(n){for(const t of e){if(null===n[t]||void 0===n[t])return null;n=n[t]}return n}return null},lc=(t,e)=>e===j.HORIZONTAL?{y0:t.x0,y1:t.x1,x0:t.y0,x1:t.y1}:t,cc=(t,e)=>{const{x0:n,x1:r,y0:i,y1:o}=lc(t,e);return`M${n},${i}L${n},${o}L${r},${o}L${r},${i}L${n},${i}`};function uc(t,e,n){return n===j.VERTICAL?[t,e]:[e,t]}const hc=6048e5,dc=36e5;function fc(t){const e=ct(t);return e.setHours(0,0,0,0),e}function pc(t){const e=ct(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function mc(t,e){const n=fc(t),r=fc(e),i=+n-pc(n),o=+r-pc(r);return Math.round((i-o)/864e5)}function gc(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function yc(t){return dt(t,{weekStartsOn:1})}function vc(t){const e=ct(t),n=e.getFullYear(),r=gc(t,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const i=yc(r),o=gc(t,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const s=yc(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=s.getTime()?n:n-1}function _c(t,e){var n,r,i,o;const s=ct(t),a=s.getFullYear(),l=ht(),c=(null==e?void 0:e.firstWeekContainsDate)??(null==(r=null==(n=null==e?void 0:e.locale)?void 0:n.options)?void 0:r.firstWeekContainsDate)??l.firstWeekContainsDate??(null==(o=null==(i=l.locale)?void 0:i.options)?void 0:o.firstWeekContainsDate)??1,u=gc(t,0);u.setFullYear(a+1,0,c),u.setHours(0,0,0,0);const h=dt(u,e),d=gc(t,0);d.setFullYear(a,0,c),d.setHours(0,0,0,0);const f=dt(d,e);return s.getTime()>=h.getTime()?a+1:s.getTime()>=f.getTime()?a:a-1}function bc(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const wc={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return bc("yy"===e?r%100:r,e.length)},M(t,e){const n=t.getMonth();return"M"===e?String(n+1):bc(n+1,2)},d:(t,e)=>bc(t.getDate(),e.length),a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(t,e)=>bc(t.getHours()%12||12,e.length),H:(t,e)=>bc(t.getHours(),e.length),m:(t,e)=>bc(t.getMinutes(),e.length),s:(t,e)=>bc(t.getSeconds(),e.length),S(t,e){const n=e.length,r=t.getMilliseconds();return bc(Math.trunc(r*Math.pow(10,n-3)),e.length)}},Ec={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){const e=t.getFullYear(),r=e>0?e:1-e;return n.ordinalNumber(r,{unit:"year"})}return wc.y(t,e)},Y:function(t,e,n,r){const i=_c(t,r),o=i>0?i:1-i;return"YY"===e?bc(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):bc(o,e.length)},R:function(t,e){return bc(vc(t),e.length)},u:function(t,e){return bc(t.getFullYear(),e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return bc(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"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return bc(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"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return wc.M(t,e);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"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return bc(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"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const i=function(t,e){const n=ct(t),r=+dt(n,e)-+function(t,e){var n,r,i,o;const s=ht(),a=(null==e?void 0:e.firstWeekContainsDate)??(null==(r=null==(n=null==e?void 0:e.locale)?void 0:n.options)?void 0:r.firstWeekContainsDate)??s.firstWeekContainsDate??(null==(o=null==(i=s.locale)?void 0:i.options)?void 0:o.firstWeekContainsDate)??1,l=_c(t,e),c=gc(t,0);return c.setFullYear(l,0,a),c.setHours(0,0,0,0),dt(c,e)}(n,e);return Math.round(r/hc)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):bc(i,e.length)},I:function(t,e,n){const r=function(t){const e=ct(t),n=+yc(e)-+function(t){const e=vc(t),n=gc(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),yc(n)}(e);return Math.round(n/hc)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):bc(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getDate(),{unit:"date"}):wc.d(t,e)},D:function(t,e,n){const r=function(t){const e=ct(t);return mc(e,function(t){const e=ct(t),n=gc(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}(e))+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):bc(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){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"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const i=t.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return bc(o,2);case"eo":return n.ordinalNumber(o,{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"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const i=t.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return bc(o,e.length);case"co":return n.ordinalNumber(o,{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"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),i=0===r?7:r;switch(e){case"i":return String(i);case"ii":return bc(i,e.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"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const r=t.getHours()/12>=1?"pm":"am";switch(e){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"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let i;switch(i=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){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"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let i;switch(i=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),n.ordinalNumber(e,{unit:"hour"})}return wc.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getHours(),{unit:"hour"}):wc.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):bc(r,e.length)},k:function(t,e,n){let r=t.getHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):bc(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):wc.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getSeconds(),{unit:"second"}):wc.s(t,e)},S:function(t,e){return wc.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return Tc(r);case"XXXX":case"XX":return Oc(r);default:return Oc(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return Tc(r);case"xxxx":case"xx":return Oc(r);default:return Oc(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+xc(r,":");default:return"GMT"+Oc(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+xc(r,":");default:return"GMT"+Oc(r,":")}},t:function(t,e,n){return bc(Math.trunc(t.getTime()/1e3),e.length)},T:function(t,e,n){return bc(t.getTime(),e.length)}};function xc(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),i=Math.trunc(r/60),o=r%60;return 0===o?n+String(i):n+String(i)+e+bc(o,2)}function Tc(t,e){return t%60==0?(t>0?"-":"+")+bc(Math.abs(t)/60,2):Oc(t,e)}function Oc(t,e=""){const n=t>0?"-":"+",r=Math.abs(t);return n+bc(Math.trunc(r/60),2)+e+bc(r%60,2)}const Sc=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Mc=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Ac={p:Mc,P:(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Sc(t,e);let o;switch(r){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;default:o=e.dateTime({width:"full"})}return o.replace("{{date}}",Sc(r,e)).replace("{{time}}",Mc(i,e))}},Cc=/^D+$/,Dc=/^Y+$/,kc=["D","DD","YY","YYYY"];const Lc=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Rc=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Pc=/^'([^]*?)'?$/,Ic=/''/g,Nc=/[a-zA-Z]/;function Bc(t,e,n){var r,i,o,s,a,l,c,u;const h=ht(),d=(null==n?void 0:n.locale)??h.locale??yt,f=(null==n?void 0:n.firstWeekContainsDate)??(null==(i=null==(r=null==n?void 0:n.locale)?void 0:r.options)?void 0:i.firstWeekContainsDate)??h.firstWeekContainsDate??(null==(s=null==(o=h.locale)?void 0:o.options)?void 0:s.firstWeekContainsDate)??1,p=(null==n?void 0:n.weekStartsOn)??(null==(l=null==(a=null==n?void 0:n.locale)?void 0:a.options)?void 0:l.weekStartsOn)??h.weekStartsOn??(null==(u=null==(c=h.locale)?void 0:c.options)?void 0:u.weekStartsOn)??0,m=ct(t);if(!function(t){if(!function(t){return t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;const e=ct(t);return!isNaN(Number(e))}(m))throw new RangeError("Invalid time value");let g=e.match(Rc).map((t=>{const e=t[0];return"p"===e||"P"===e?(0,Ac[e])(t,d.formatLong):t})).join("").match(Lc).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:Uc(t)};if(Ec[e])return{isToken:!0,value:t};if(e.match(Nc))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));d.localize.preprocessor&&(g=d.localize.preprocessor(m,g));const y={firstWeekContainsDate:f,weekStartsOn:p,locale:d};return g.map((r=>{if(!r.isToken)return r.value;const i=r.value;return((null==n||!n.useAdditionalWeekYearTokens)&&function(t){return Dc.test(t)}(i)||(null==n||!n.useAdditionalDayOfYearTokens)&&function(t){return Cc.test(t)}(i))&&function(t,e,n){const r=function(t,e,n){const r="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(t,e,n);if(console.warn(r),kc.includes(t))throw new RangeError(r)}(i,e,String(t)),(0,Ec[i[0]])(m,i,d.localize,y)})).join("")}function Uc(t){const e=t.match(Pc);return e?e[1].replace(Ic,"'"):t}const Fc=[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]];function jc(t,e,n,r,i){const o=0===e,s=2===Number(Bc(new Date(t),"c")),a=1===Number(Bc(new Date(t),"q")),l=0!==e?n[e-1]:null;switch(r){case"15seconds":case"minute":case"30minutes":case"hourly":return o||function(t){const{s:e,m:n,H:r}=$c(t);return 0===r&&0===n&&0===e}(t)||Gc(t,l)||Vc(t);case"daily":return i?o||s||Vc(t):o||Gc(t,l)||Vc(t);case"weekly":return o||s||Vc(t);case"monthly":return o||Vc(t);case"quarterly":return o||a;case"yearly":return!1;default:throw new Error(`${r} is not a valid time interval.`)}}function Hc(t,e,n,r,i,o){const s=i.showDayName,a="daily"===r&&s?"weekly":r,l=new Date(t),c=ac(i,"timeIntervalFormats")[a],u=ac(c,"primary"),h=ac(c,"secondary"),d=jc(t,e,n,r,s);let f=d?u:h;"15seconds"===r&&0!==l.getMilliseconds()&&(f=f.replace("pp","h:mm:ss.SSS a"));const p=i.localeObject,{code:m,optionsObject:g}=o,y=g[r].type,v=g[r][d?"primary":"secondary"][f];if("quarterly"!==r&&v)return o[y](l,m,v);{const t=Bc(l,f,{locale:p}).split("").map((t=>{const e=Number(t);return" "===t||Number.isNaN(e)?t:e.toLocaleString(m)}));return o[y](l,m,{},t.join(""))}}function $c(t){const e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function zc(t,e){if(ot[e])return e;if(1===t.length)return"15seconds";const n=function(t){if(t)return t.slice(1).map(((e,n)=>e-t[n]))}(t);return function(t){const e=Fc.reduce(((e,[,n],r)=>{const i=Fc[e][1];return Math.abs(i-t)<Math.abs(n-t)?e:r}),0);return Fc[e][0]}(function(t){let e;for(const n of t)null!=n&&(e>n||void 0===e&&n>=n)&&(e=n);return e}(n))}function Gc(t,e){return $c(t).M!==$c(e).M}function Vc(t){const{M:e,d:n,s:r,m:i,H:o}=$c(t);return 1===e&&1===n&&0===o&&0===i&&0===r}function Wc(t){return void 0===t?"":t.toISOString()}var Yc=(t=>(t.GRAPHICS_DOCUMENT="graphics-document",t.GRAPHICS_OBJECT="graphics-object",t.GRAPHICS_SYMBOL="graphics-symbol",t.GROUP="group",t.DOCUMENT="document",t.CHECKBOX="checkbox",t.BUTTON="button",t.MENU="menu",t.MENU_ITEM="menuitem",t.IMG="img",t))(Yc||{}),Zc=function(t,e){if(null==t)return t;if(!be(t))return function(t,e){return t&&$r(t,e,We)}(t,e);for(var n=t.length,r=-1,i=Object(t);++r<n&&!1!==e(i[r],r,i););return t};function qc(t){return function(){return t}}function Xc(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Kc(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var s=t[i];e(r,s,n(s),t)}return r}function Qc(t,e,n,r){return Zc(t,(function(t,i,o){e(r,t,n(t),o)})),r}Array.prototype.slice;var Jc=Object.prototype.hasOwnProperty,tu=function(t){return function(e,n){return(Rt(e)?Kc:Qc)(e,t,Hr(n),{})}}((function(t,e,n){Jc.call(t,n)?t[n].push(e):he(t,n,[e])}));function eu(t){return t}var nu=Array.prototype.slice;function ru(t){return()=>t}function iu(t){return Math.max(1,Math.ceil(Math.log(function(t){let e=0;for(let n of t)null!=n&&(n=+n)>=n&&++e;return e}(t))/Math.LN2)+1)}function ou(t,e){if((i=t.length)>1)for(var n,r,i,o=1,s=t[e[0]],a=s.length;o<i;++o)for(r=s,s=t[e[o]],n=0;n<a;++n)s[n][1]+=s[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function su(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function au(t,e){return t[e]}function lu(t){const e=[];return e.key=t,e}function cu(){var t=qc([]),e=su,n=ou,r=au;function i(i){var o,s,a=Array.from(t.apply(this,arguments),lu),l=a.length,c=-1;for(const t of i)for(o=0,++c;o<l;++o)(a[o][c]=[0,+r(t,a[o].key,c,i)]).data=t;for(o=0,s=Xc(e(a));o<l;++o)a[s[o]].index=o;return n(a,s),a}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:qc(Array.from(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:qc(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?su:"function"==typeof t?t:qc(Array.from(t)),i):e},i.offset=function(t){return arguments.length?(n=t??ou,i):n},i}function uu(t,e){if((a=t.length)>0)for(var n,r,i,o,s,a,l=0,c=t[e[0]].length;l<c;++l)for(o=s=0,n=0;n<a;++n)(i=(r=t[e[n]][l])[1]-r[0])>0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=s,r[0]=s+=i):(r[0]=0,r[1]=i)}class hu{constructor(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}formatTable({headers:t,cells:e}){const n=this.getOptions(),{code:r,date:i,number:o}=ac(n,"locale"),s=ac(n,"tabularRepModal","tableHeadingFormatter"),a=ac(n,"tabularRepModal","tableCellFormatter"),{cartesianScales:l}=this.services;let c;return(null==l?void 0:l.getDomainAxisScaleType())===H.TIME&&(c=t=>i(t,r,{month:"short",day:"numeric",year:"numeric"})),["function"==typeof s?s(t):t,..."function"==typeof a?a(e):e.map((t=>{c&&(t[1]=c(t[1]));for(const e in t){const n=t[e];"number"==typeof n&&(t[e]=o(n,r))}return t}))]}getAllDataFromDomain(t){if(!this.getData())return null;const e=this.getOptions();let n=this.getData();const r=this.getDataGroups(),{groupMapsTo:i}=ac(e,"data"),o=ac(e,"axes");return t&&(n=n.filter((e=>t.includes(e[i])))),o&&Object.keys(o).forEach((t=>{const e=o[t].mapsTo,r=o[t].scaleType;if((r===H.LINEAR||r===H.LOG)&&(n=n.map((t=>({...t,[e]:null===t[e]?t[e]:Number(t[e])})))),e&&o[t].domain)if(r===H.LABELS)n=n.filter((n=>o[t].domain.includes(n[e])));else{const[r,i]=o[t].domain;n=n.filter((t=>!(e in t)||t[e]>=r&&t[e]<=i))}})),n.filter((t=>r.find((e=>e.name===t[i]))))}getDisplayData(t){if(!this.get("data"))return null;const{ACTIVE:e}=ml.items.status,n=this.getDataGroups(t),{groupMapsTo:r}=this.getOptions().data;return this.getAllDataFromDomain(t).filter((t=>n.find((n=>n.name===t[r]&&n.status===e))))}getData(){return this.get("data")}isDataEmpty(){return!this.getData().length}setData(t){const e=this.sanitize(xr(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e}getDataGroups(t){return ac(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter((e=>t.includes(e.name))):this.get("dataGroups")}getActiveDataGroups(t){const{ACTIVE:e}=ml.items.status;return this.getDataGroups(t).filter((t=>t.status===e))}getDataGroupNames(t){return this.getDataGroups(t).map((t=>t.name))}getActiveDataGroupNames(t){return this.getActiveDataGroups(t).map((t=>t.name))}aggregateBinDataByGroup(t){return tu(t,"group")}getBinConfigurations(){const t=this.getDisplayData(),e=this.getOptions(),n=this.services.cartesianScales.getMainXAxisPosition(),r=this.services.cartesianScales.getDomainIdentifier(),i=e.axes[n],{groupMapsTo:o}=e.data,{bins:s=pl.defaultBins}=i,a=Array.isArray(s),l=function(){var t=eu,e=oi,n=iu;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,s,a=r.length,l=new Array(a);for(i=0;i<a;++i)l[i]=t(r[i],i,r);var c=e(l),u=c[0],h=c[1],d=n(l,u,h);if(!Array.isArray(d)){const t=h,n=+d;if(e===oi&&([u,h]=function(t,e,n){let r;for(;;){const i=pi(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(u,h,n)),(d=fi(u,h,n))[0]<=u&&(s=pi(u,h,n)),d[d.length-1]>=h)if(t>=h&&e===oi){const t=pi(u,h,n);isFinite(t)&&(t>0?h=(Math.floor(h/t)+1)*t:t<0&&(h=(Math.ceil(h*-t)+1)/-t))}else d.pop()}for(var f=d.length,p=0,m=f;d[p]<=u;)++p;for(;d[m-1]>h;)--m;(p||m<f)&&(d=d.slice(p,m),f=m-p);var g,y=new Array(f+1);for(i=0;i<=f;++i)(g=y[i]=[]).x0=i>0?d[i-1]:u,g.x1=i<f?d[i]:h;if(isFinite(s)){if(s>0)for(i=0;i<a;++i)null!=(o=l[i])&&u<=o&&o<=h&&y[Math.min(f,Math.floor((o-u)/s))].push(r[i]);else if(s<0)for(i=0;i<a;++i)if(null!=(o=l[i])&&u<=o&&o<=h){const t=Math.floor((u-o)*s);y[Math.min(f,t+(d[t]<=o))].push(r[i])}}else for(i=0;i<a;++i)null!=(o=l[i])&&u<=o&&o<=h&&y[ii(d,o,0,f)].push(r[i]);return y}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:ru(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:ru([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:ru(Array.isArray(t)?nu.call(t):t),r):n},r}().value((t=>t[r])).thresholds(s)(t);if(a)l[l.length-1].x1=s[s.length-1];else{const t=l[0].x1-l[0].x0;l[l.length-1].x1=+l[l.length-1].x0+t}const c=a?[s[0],s[s.length-1]]:[l[0].x0,l[l.length-1].x1],u=Array.from(new Set(t.map((t=>t[o])))),h=[];return l.forEach((t=>{const e=`${t.x0}-${t.x1}`,n=this.aggregateBinDataByGroup(t);u.forEach((r=>{h.push({group:r,key:e,value:n[r]||0,bin:t.x0})}))})),{bins:l,binsDomain:c}}getBinnedStackedData(){const t=this.getOptions(),{groupMapsTo:e}=t.data,n=this.getActiveDataGroupNames(),{bins:r}=this.getBinConfigurations(),i=this.getDataValuesGroupedByKeys({bins:r});return cu().keys(n)(i).map(((t,r)=>Object.keys(t).filter((t=>!isNaN(t))).map((i=>{const o=t[i];return o[e]=n[r],o}))))}getGroupedData(t){const e=this.getDisplayData(t),n={},{groupMapsTo:r}=this.getOptions().data;return e.map((t=>{const e=t[r];null!==n[e]&&void 0!==n[e]?n[e].push(t):n[e]=[t]})),Object.keys(n).map((t=>({name:t,data:n[t]})))}getStackKeys({bins:t=null,groups:e=null}={bins:null,groups:null}){const n=this.getOptions(),r=this.getDisplayData(e);let i;i=t?t.map((t=>`${t.x0}:${t.x1}`)):Jr(r.map((t=>{const e=this.services.cartesianScales.getDomainIdentifier(t);return t[e]instanceof Date?Wc(t[e]):t[e]&&"function"==typeof t[e].toString?t[e].toString():t[e]})));const o=this.services.cartesianScales.domainAxisPosition,s=n.axes[o].scaleType;return s===H.TIME?i.sort(((t,e)=>new Date(t)-new Date(e))):(s===H.LOG||s===H.LINEAR)&&i.sort(((t,e)=>t-e)),i}getDataValuesGroupedByKeys({bins:t=null,groups:e=null}){const n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.getDisplayData(e),o=this.getDataGroupNames(),s=this.getStackKeys({bins:t,groups:e});return t?s.map((e=>{const[n,i]=e.split(":"),s={x0:n,x1:i},a=t.find((t=>t.x0.toString()===n.toString()));return o.forEach((t=>{s[t]=a.filter((e=>e[r]===t)).length})),s})):s.map((t=>{const e={sharedStackKey:t};return o.forEach((n=>{const o=i.find((e=>{const i=this.services.cartesianScales.getDomainIdentifier(e);return e[r]===n&&Object.prototype.hasOwnProperty.call(e,i)&&(e[i]instanceof Date?Wc(e[i])===t:e[i].toString()===t)})),s=this.services.cartesianScales.getRangeIdentifier(e);e[n]=o?o[s]:null})),e}))}getStackedData({percentage:t=!1,groups:e=null,divergent:n=!1}){const r=this.getOptions(),{groupMapsTo:i}=r.data,o=this.getActiveDataGroupNames(e),s=this.getDataValuesGroupedByKeys({groups:e});if(t){const t=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r}(s.map((t=>[t.sharedStackKey,0])));s.forEach((e=>{o.forEach((n=>{t[e.sharedStackKey]+=e[n]}))})),s.forEach((e=>{o.forEach((n=>{const r=t[e.sharedStackKey];t[e.sharedStackKey]?e[n]=e[n]/r*100:e[n]=0}))}))}return(n?cu().offset(uu):cu()).keys(o)(s).map(((t,e)=>Object.keys(t).filter((t=>!isNaN(t))).map((n=>{const r=t[n];return r[i]=o[e],r}))))}getOptions(){return this.state.options}set(t,e){this.state=Object.assign({},this.state,t);const n=Object.assign({skipUpdate:!1,animate:!0},e);n.skipUpdate||this.update(n.animate)}get(t){return t?this.state[t]:this.state}setOptions(t){const e=this.getOptions();sc(e,t),this.set({options:qr(e,t)})}update(t=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(R.Model.UPDATE,{animate:t}))}toggleDataLabel(t){const{ACTIVE:e,DISABLED:n}=ml.items.status,r=this.getDataGroups(),i=r.some((t=>t.status===n)),o=r.filter((t=>t.status===e));if(i)if(1===o.length&&o[0].name===t)r.forEach(((t,n)=>{r[n].status=e}));else{const i=r.findIndex((e=>e.name===t));r[i].status=r[i].status===n?e:n}else r.forEach(((i,o)=>{r[o].status=i.name===t?e:n}));const s=r.filter((t=>t.status===e)),a=this.getOptions();r.some((t=>t.status===n))?a.data.selectedGroups=s.map((t=>t.name)):a.data.selectedGroups=[],this.services.events.dispatchEvent(R.Legend.ITEMS_UPDATE,{dataGroups:r}),this.set({dataGroups:r})}getIsFilled(t,e,n,r){const i=this.getOptions();return i.getIsFilled?i.getIsFilled(t,e,n,r):r}getFillColor(t,e,n){const r=this.getOptions(),i=ac(this.colorScale,t);return r.getFillColor?r.getFillColor(t,e,n,i):i}getStrokeColor(t,e,n){const r=this.getOptions(),i=ac(this.colorScale,t);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i}isUserProvidedColorScaleValid(){const t=ac(this.getOptions(),"color","scale"),e=this.getDataGroups();return null!=t&&0!=Object.keys(t).length&&e.some((e=>Object.keys(t).includes(e.name)))}getColorClassName(t){const e=this.colorClassNames(t.dataGroupName);let n=t.originalClassName;return t.classNameTypes.forEach((r=>n=t.originalClassName?`${n} ${r}-${e}`:`${r}-${e}`)),n||""}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 e=[],{datasets:n,labels:r}=t;return n.forEach((t=>{t.data.forEach(((n,i)=>{let o;const s=ac(t,"label");if(null===s){o=ac(r,i)||"Ungrouped"}else o=s;const a={group:o,key:r[i]};isNaN(n)?(a.value=n.value,a.date=n.date):a.value=n,e.push(a)}))})),e}getTabularDataArray(){return[]}exportToCSV(){const t=this.getTabularDataArray().map((t=>t.map((t=>`"${("–"===t?"–":t).split(/[,;'"`]/).map((t=>function(t){const e=t.trim();return["=","+","-","@","\t","\r"].includes(e.charAt(0))?` ${e}`:/[,\"\n]/.test(e)?`"${e}"`:e}(t))).join("")}"`)))).map((t=>t.join(","))).join("\n"),e=this.getOptions();let n="myChart";const r=ac(e,"fileDownload","fileName");"function"==typeof r?n=r("csv"):"string"==typeof r&&(n=r),this.services.files.downloadCSV(t,`${n}.csv`)}getTabularData(t){return Array.isArray(t)?t:this.transformToTabularData(t)}sanitize(t){return this.getTabularData(t)}updateAllDataGroups(){this.allDataGroups?this.getDataGroupNames().forEach((t=>{-1===this.allDataGroups.indexOf(t)&&this.allDataGroups.push(t)})):this.allDataGroups=this.getDataGroupNames()}generateDataGroups(t){const{groupMapsTo:e}=this.getOptions().data,{ACTIVE:n,DISABLED:r}=ml.items.status,i=this.getOptions(),o=Jr(t.map((t=>t[e])));i.data.selectedGroups.length&&(i.data.selectedGroups.every((t=>o.includes(t)))||(i.data.selectedGroups=[]));const s=t=>!i.data.selectedGroups.length||i.data.selectedGroups.includes(t)?n:r;return o.map((t=>({name:t,status:s(t)})))}setCustomColorScale(){if(!this.isUserProvidedColorScaleValid())return;const t=this.getOptions(),e=ac(t,"color","scale");Object.keys(e).forEach((t=>{this.allDataGroups.includes(t)||console.warn(`"${t}" does not exist in data groups.`)})),this.allDataGroups.filter((t=>e[t])).forEach((t=>this.colorScale[t]=e[t]))}setColorClassNames(){const t=ac(this.getOptions(),"color","pairing");let e=ac(t,"numberOfVariants");(!e||e<this.allDataGroups.length)&&(e=this.allDataGroups.length);let n=ac(t,"option");const r=e>5?14:e;n=n<=fl[`${r}-color`]?n:1;const i=this.allDataGroups.map(((t,e)=>`${r}-${n}-${e%14+1}`));this.colorClassNames=Ya().range(i).domain(this.allDataGroups)}}class du extends hu{constructor(t){super(t),this.axisFlavor=rt.DEFAULT}assignRangeAndDomains(){const{cartesianScales:t}=this.services,e=this.getOptions(),n=t.isDualAxes(),r={primaryDomain:t.domainAxisPosition,primaryRange:t.rangeAxisPosition,secondaryDomain:null,secondaryRange:null};return n&&(r.secondaryDomain=t.secondaryDomainAxisPosition,r.secondaryRange=t.secondaryRangeAxisPosition),Object.keys(r).forEach((n=>{const i=r[n];t.scales[i]?r[n]={position:i,label:t.getScaleLabel(i),identifier:ac(e,"axes",i,"mapsTo")}:r[n]=null})),r}getTabularDataArray(){const t=this.getDisplayData(),e=this.getOptions(),{groupMapsTo:n}=e.data,{primaryDomain:r,primaryRange:i,secondaryDomain:o,secondaryRange:s}=this.assignRangeAndDomains(),{number:a,code:l}=ac(this.getOptions(),"locale"),c=["Group",r.label,i.label,...o?[o.label]:[],...s?[s.label]:[]],u=t.map((t=>[t[n],null===t[r.identifier]?"–":t[r.identifier],null===t[i.identifier]||isNaN(t[i.identifier])?"–":a(t[i.identifier],l),...o?[null===t[o.identifier]?"–":t[o.identifier]]:[],...s?[null===t[s.identifier]||isNaN(t[s.identifier])?"–":t[s.identifier]]:[]]));return super.formatTable({headers:c,cells:u})}setData(t){let e;if(t&&(e=super.setData(t),ac(this.getOptions(),"zoomBar",B.TOP,"enabled"))){const t=ac(this.getOptions(),"zoomBar",B.TOP,"data");this.setZoomBarData(t)}return e}setZoomBarData(t){const e=t?this.sanitize(xr(t)):this.getDisplayData();let n=e;const{cartesianScales:r}=this.services;if(e&&r.domainAxisPosition&&r.rangeAxisPosition){const t=r.getDomainIdentifier(),i=r.getRangeIdentifier();let o=e.map((e=>e[t].getTime()));o=Jr(o).sort(),n=o.map((n=>{let r=0;const o={};return e.forEach((e=>{e[t].getTime()===n&&(r+=e[i])})),o[t]=new Date(n),o[i]=r,o}))}this.set({zoomBarData:n})}getZoomBarData(){return this.get("zoomBarData")}sanitizeDateValues(t){const e=this.getOptions();if(!e.axes)return t;const n=[];return Object.keys(B).forEach((t=>{const r=B[t],i=e.axes[r];if(i&&i.scaleType===H.TIME){const t=i.mapsTo;(null!==t||void 0!==t)&&n.push(t)}})),n.length>0&&t.forEach((t=>{n.forEach((e=>{null===ac(t,e,"getTime")&&(t[e]=new Date(t[e]))}))})),t}sanitize(t){return t=super.sanitize(t),this.sanitizeDateValues(t)}}var fu=/\s/,pu=/^\s+/;var mu=/^[-+]0x[0-9a-f]+$/i,gu=/^0b[01]+$/i,yu=/^0o[0-7]+$/i,vu=parseInt;function _u(t){if("number"==typeof t)return t;if(kt(t))return NaN;if(Ut(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Ut(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=function(t){return t&&t.slice(0,function(t){for(var e=t.length;e--&&fu.test(t.charAt(e)););return e}(t)+1).replace(pu,"")}(t);var n=gu.test(t);return n||yu.test(t)?vu(t.slice(2),n?2:8):mu.test(t)?NaN:+t}var bu=function(){return wt.Date.now()},wu=Math.max,Eu=Math.min;function xu(t){return"string"==typeof t?new Lo([[document.querySelector(t)]],[document.documentElement]):new Lo([[t]],ko)}function Tu(){var t,e,n=Ya().unknown(void 0),r=n.domain,i=n.range,o=0,s=1,a=!1,l=0,c=0,u=.5;function h(){var n=r().length,h=s<o,d=h?s:o,f=h?o:s;t=(f-d)/Math.max(1,n-l+2*c),a&&(t=Math.floor(t)),d+=(f-d-t*(n-l))*u,e=t*(1-l),a&&(d=Math.round(d),e=Math.round(e));var p=function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}(n).map((function(e){return d+t*e}));return i(h?p.reverse():p)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),h()):r()},n.range=function(t){return arguments.length?([o,s]=t,o=+o,s=+s,h()):[o,s]},n.rangeRound=function(t){return[o,s]=t,o=+o,s=+s,a=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,h()):a},n.padding=function(t){return arguments.length?(l=Math.min(1,c=+t),h()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),h()):l},n.paddingOuter=function(t){return arguments.length?(c=+t,h()):c},n.align=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),h()):u},n.copy=function(){return Tu(r(),[o,s]).round(a).paddingInner(l).paddingOuter(c).align(u)},Va.apply(h(),arguments)}function Ou(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],s=t[i];return s<o&&(n=r,r=i,i=n,n=o,o=s,s=n),t[r]=e.floor(o),t[i]=e.ceil(s),t}const Su=new Date,Mu=new Date;function Au(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=e=>(t(e=new Date(+e)),e),i.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),i.round=t=>{const e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=(t,n)=>(e(t=new Date(+t),null==n?1:Math.floor(n)),t),i.range=(n,r,o)=>{const s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;let a;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<r);return s},i.filter=n=>Au((e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),((t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})),n&&(i.count=(e,r)=>(Su.setTime(+e),Mu.setTime(+r),t(Su),t(Mu),Math.floor(n(Su,Mu))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?e=>r(e)%t==0:e=>i.count(0,e)%t==0):i:null)),i}const Cu=Au((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));Cu.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Au((e=>{e.setTime(Math.floor(e/t)*t)}),((e,n)=>{e.setTime(+e+n*t)}),((e,n)=>(n-e)/t)):Cu:null),Cu.range;const Du=1e3,ku=6e4,Lu=60*ku,Ru=24*Lu,Pu=7*Ru,Iu=30*Ru,Nu=365*Ru,Bu=Au((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*Du)}),((t,e)=>(e-t)/Du),(t=>t.getUTCSeconds()));Bu.range;const Uu=Au((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Du)}),((t,e)=>{t.setTime(+t+e*ku)}),((t,e)=>(e-t)/ku),(t=>t.getMinutes()));Uu.range;const Fu=Au((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*ku)}),((t,e)=>(e-t)/ku),(t=>t.getUTCMinutes()));Fu.range;const ju=Au((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Du-t.getMinutes()*ku)}),((t,e)=>{t.setTime(+t+e*Lu)}),((t,e)=>(e-t)/Lu),(t=>t.getHours()));ju.range;const Hu=Au((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*Lu)}),((t,e)=>(e-t)/Lu),(t=>t.getUTCHours()));Hu.range;const $u=Au((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ku)/Ru),(t=>t.getDate()-1));$u.range;const zu=Au((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/Ru),(t=>t.getUTCDate()-1));zu.range;const Gu=Au((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/Ru),(t=>Math.floor(t/Ru)));function Vu(t){return Au((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ku)/Pu))}Gu.range;const Wu=Vu(0),Yu=Vu(1),Zu=Vu(2),qu=Vu(3),Xu=Vu(4),Ku=Vu(5),Qu=Vu(6);function Ju(t){return Au((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/Pu))}Wu.range,Yu.range,Zu.range,qu.range,Xu.range,Ku.range,Qu.range;const th=Ju(0),eh=Ju(1),nh=Ju(2),rh=Ju(3),ih=Ju(4),oh=Ju(5),sh=Ju(6);th.range,eh.range,nh.range,rh.range,ih.range,oh.range,sh.range;const ah=Au((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth()));ah.range;const lh=Au((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()));lh.range;const ch=Au((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));ch.every=t=>isFinite(t=Math.floor(t))&&t>0?Au((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,n)=>{e.setFullYear(e.getFullYear()+n*t)})):null,ch.range;const uh=Au((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));uh.every=t=>isFinite(t=Math.floor(t))&&t>0?Au((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null,uh.range;const[hh,dh]=function(t,e,n,r,i,o){const s=[[Bu,1,Du],[Bu,5,5e3],[Bu,15,15e3],[Bu,30,3e4],[o,1,ku],[o,5,5*ku],[o,15,15*ku],[o,30,30*ku],[i,1,Lu],[i,3,3*Lu],[i,6,6*Lu],[i,12,12*Lu],[r,1,Ru],[r,2,2*Ru],[n,1,Pu],[e,1,Iu],[e,3,3*Iu],[t,1,Nu]];function a(e,n,r){const i=Math.abs(n-e)/r,o=ni((([,,t])=>t)).right(s,i);if(o===s.length)return t.every(mi(e/Nu,n/Nu,r));if(0===o)return Cu.every(Math.max(mi(e,n,r),1));const[a,l]=s[i/s[o-1][2]<s[o][2]/i?o-1:o];return a.every(l)}return[function(t,e,n){const r=e<t;r&&([t,e]=[e,t]);const i=n&&"function"==typeof n.range?n:a(t,e,n),o=i?i.range(t,+e+1):[];return r?o.reverse():o},a]}(ch,ah,Wu,$u,ju,Uu);function fh(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ph(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function mh(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var gh,yh,vh={"-":"",_:" ",0:"0"},_h=/^\s*\d+/,bh=/^%/,wh=/[\\^$*+?|[\]().{}]/g;function Eh(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function xh(t){return t.replace(wh,"\\$&")}function Th(t){return new RegExp("^(?:"+t.map(xh).join("|")+")","i")}function Oh(t){return new Map(t.map(((t,e)=>[t.toLowerCase(),e])))}function Sh(t,e,n){var r=_h.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Mh(t,e,n){var r=_h.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ah(t,e,n){var r=_h.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Ch(t,e,n){var r=_h.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Dh(t,e,n){var r=_h.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function kh(t,e,n){var r=_h.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Lh(t,e,n){var r=_h.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Rh(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ph(t,e,n){var r=_h.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Ih(t,e,n){var r=_h.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Nh(t,e,n){var r=_h.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Bh(t,e,n){var r=_h.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Uh(t,e,n){var r=_h.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Fh(t,e,n){var r=_h.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function jh(t,e,n){var r=_h.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Hh(t,e,n){var r=_h.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function $h(t,e,n){var r=_h.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function zh(t,e,n){var r=bh.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gh(t,e,n){var r=_h.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Vh(t,e,n){var r=_h.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Wh(t,e){return Eh(t.getDate(),e,2)}function Yh(t,e){return Eh(t.getHours(),e,2)}function Zh(t,e){return Eh(t.getHours()%12||12,e,2)}function qh(t,e){return Eh(1+$u.count(ch(t),t),e,3)}function Xh(t,e){return Eh(t.getMilliseconds(),e,3)}function Kh(t,e){return Xh(t,e)+"000"}function Qh(t,e){return Eh(t.getMonth()+1,e,2)}function Jh(t,e){return Eh(t.getMinutes(),e,2)}function td(t,e){return Eh(t.getSeconds(),e,2)}function ed(t){var e=t.getDay();return 0===e?7:e}function nd(t,e){return Eh(Wu.count(ch(t)-1,t),e,2)}function rd(t){var e=t.getDay();return e>=4||0===e?Xu(t):Xu.ceil(t)}function id(t,e){return t=rd(t),Eh(Xu.count(ch(t),t)+(4===ch(t).getDay()),e,2)}function od(t){return t.getDay()}function sd(t,e){return Eh(Yu.count(ch(t)-1,t),e,2)}function ad(t,e){return Eh(t.getFullYear()%100,e,2)}function ld(t,e){return Eh((t=rd(t)).getFullYear()%100,e,2)}function cd(t,e){return Eh(t.getFullYear()%1e4,e,4)}function ud(t,e){var n=t.getDay();return Eh((t=n>=4||0===n?Xu(t):Xu.ceil(t)).getFullYear()%1e4,e,4)}function hd(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Eh(e/60|0,"0",2)+Eh(e%60,"0",2)}function dd(t,e){return Eh(t.getUTCDate(),e,2)}function fd(t,e){return Eh(t.getUTCHours(),e,2)}function pd(t,e){return Eh(t.getUTCHours()%12||12,e,2)}function md(t,e){return Eh(1+zu.count(uh(t),t),e,3)}function gd(t,e){return Eh(t.getUTCMilliseconds(),e,3)}function yd(t,e){return gd(t,e)+"000"}function vd(t,e){return Eh(t.getUTCMonth()+1,e,2)}function _d(t,e){return Eh(t.getUTCMinutes(),e,2)}function bd(t,e){return Eh(t.getUTCSeconds(),e,2)}function wd(t){var e=t.getUTCDay();return 0===e?7:e}function Ed(t,e){return Eh(th.count(uh(t)-1,t),e,2)}function xd(t){var e=t.getUTCDay();return e>=4||0===e?ih(t):ih.ceil(t)}function Td(t,e){return t=xd(t),Eh(ih.count(uh(t),t)+(4===uh(t).getUTCDay()),e,2)}function Od(t){return t.getUTCDay()}function Sd(t,e){return Eh(eh.count(uh(t)-1,t),e,2)}function Md(t,e){return Eh(t.getUTCFullYear()%100,e,2)}function Ad(t,e){return Eh((t=xd(t)).getUTCFullYear()%100,e,2)}function Cd(t,e){return Eh(t.getUTCFullYear()%1e4,e,4)}function Dd(t,e){var n=t.getUTCDay();return Eh((t=n>=4||0===n?ih(t):ih.ceil(t)).getUTCFullYear()%1e4,e,4)}function kd(){return"+0000"}function Ld(){return"%"}function Rd(t){return+t}function Pd(t){return Math.floor(+t/1e3)}function Id(t){return new Date(t)}function Nd(t){return t instanceof Date?+t:+new Date(+t)}function Bd(t,e,n,r,i,o,s,a,l,c){var u=nl(),h=u.invert,d=u.domain,f=c(".%L"),p=c(":%S"),m=c("%I:%M"),g=c("%I %p"),y=c("%a %d"),v=c("%b %d"),_=c("%B"),b=c("%Y");function w(t){return(l(t)<t?f:a(t)<t?p:s(t)<t?m:o(t)<t?g:r(t)<t?i(t)<t?y:v:n(t)<t?_:b)(t)}return u.invert=function(t){return new Date(h(t))},u.domain=function(t){return arguments.length?d(Array.from(t,Nd)):d().map(Id)},u.ticks=function(e){var n=d();return t(n[0],n[n.length-1],e??10)},u.tickFormat=function(t,e){return null==e?w:c(e)},u.nice=function(t){var n=d();return(!t||"function"!=typeof t.range)&&(t=e(n[0],n[n.length-1],t??10)),t?d(Ou(n,t)):u},u.copy=function(){return tl(u,Bd(t,e,n,r,i,o,s,a,l,c))},u}function Ud(){return Va.apply(Bd(hh,dh,ch,ah,Wu,$u,ju,Uu,Bu,yh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}gh=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,c=Th(i),u=Oh(i),h=Th(o),d=Oh(o),f=Th(s),p=Oh(s),m=Th(a),g=Oh(a),y=Th(l),v=Oh(l),_={a:function(t){return s[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:Wh,e:Wh,f:Kh,g:ld,G:ud,H:Yh,I:Zh,j:qh,L:Xh,m:Qh,M:Jh,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Rd,s:Pd,S:td,u:ed,U:nd,V:id,w:od,W:sd,x:null,X:null,y:ad,Y:cd,Z:hd,"%":Ld},b={a:function(t){return s[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:dd,e:dd,f:yd,g:Ad,G:Dd,H:fd,I:pd,j:md,L:gd,m:vd,M:_d,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Rd,s:Pd,S:bd,u:wd,U:Ed,V:Td,w:Od,W:Sd,x:null,X:null,y:Md,Y:Cd,Z:kd,"%":Ld},w={a:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=d.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return T(t,e,n,r)},d:Nh,e:Nh,f:$h,g:Lh,G:kh,H:Uh,I:Uh,j:Bh,L:Hh,m:Ih,M:Fh,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:Ph,Q:Gh,s:Vh,S:jh,u:Mh,U:Ah,V:Ch,w:Sh,W:Dh,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:Lh,Y:kh,Z:Rh,"%":zh};function E(t,e){return function(n){var r,i,o,s=[],a=-1,l=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++a<c;)37===t.charCodeAt(a)&&(s.push(t.slice(l,a)),null!=(i=vh[r=t.charAt(++a)])?r=t.charAt(++a):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),s.push(r),l=a+1);return s.push(t.slice(l,a)),s.join("")}}function x(t,e){return function(n){var r,i,o=mh(1900,void 0,1);if(T(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(e&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=ph(mh(o.y,0,1))).getUTCDay(),r=i>4||0===i?eh.ceil(r):eh(r),r=zu.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=fh(mh(o.y,0,1))).getDay(),r=i>4||0===i?Yu.ceil(r):Yu(r),r=$u.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?ph(mh(o.y,0,1)).getUTCDay():fh(mh(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,ph(o)):fh(o)}}function T(t,e,n,r){for(var i,o,s=0,a=e.length,l=n.length;s<a;){if(r>=l)return-1;if(37===(i=e.charCodeAt(s++))){if(i=e.charAt(s++),!(o=w[i in vh?e.charAt(s++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return _.x=E(n,_),_.X=E(r,_),_.c=E(e,_),b.x=E(n,b),b.X=E(r,b),b.c=E(e,b),{format:function(t){var e=E(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=x(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=E(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=x(t+="",!0);return e.toString=function(){return t},e}}}({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"]}),yh=gh.format,gh.parse,gh.utcFormat,gh.utcParse;const Fd=Math.abs,jd=Math.atan2,Hd=Math.cos,$d=Math.max,zd=Math.min,Gd=Math.sin,Vd=Math.sqrt,Wd=1e-12,Yd=Math.PI,Zd=Yd/2,qd=2*Yd;function Xd(t){return t>=1?Zd:t<=-1?-Zd:Math.asin(t)}function Kd(t){this._context=t}function Qd(t){return new Kd(t)}function Jd(){}function tf(t){this._context=t}function ef(t){return new tf(t)}Kd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},tf.prototype={areaStart:Jd,areaEnd:Jd,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};const nf=(()=>{let t=0;return()=>(t+=1,`u${`0000${(Math.random()*36**4|0).toString(36)}`.slice(-4)}${t}`)})();function rf(t){const e=[];for(let n=0,r=t.length;n<r;n++)e.push(t[n]);return e}function of(t,e){const n=(t.ownerDocument.defaultView||window).getComputedStyle(t).getPropertyValue(e);return n?parseFloat(n.replace("px","")):0}function sf(t,e={}){const n=e.width||function(t){const e=of(t,"border-left-width"),n=of(t,"border-right-width");return t.clientWidth+e+n}(t),r=e.height||function(t){const e=of(t,"border-top-width"),n=of(t,"border-bottom-width");return t.clientHeight+e+n}(t);return{width:n,height:r}}const af=16384;function lf(t){return new Promise(((e,n)=>{const r=new Image;r.decode=()=>e(r),r.onload=()=>e(r),r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=t}))}const cf=(t,e)=>{if(t instanceof e)return!0;const n=Object.getPrototypeOf(t);return null!==n&&(n.constructor.name===e.name||cf(n,e))};function uf(t,e,n){const r=window.getComputedStyle(t,n),i=r.getPropertyValue("content");if(""===i||"none"===i)return;const o=nf();try{e.className=`${e.className} ${o}`}catch{return}const s=document.createElement("style");s.appendChild(function(t,e,n){const r=`.${t}:${e}`,i=n.cssText?function(t){const e=t.getPropertyValue("content");return`${t.cssText} content: '${e.replace(/'|"/g,"")}';`}(n):function(t){return rf(t).map((e=>`${e}: ${t.getPropertyValue(e)}${t.getPropertyPriority(e)?" !important":""};`)).join(" ")}(n);return document.createTextNode(`${r}{${i}}`)}(o,n,r)),e.appendChild(s)}const hf="application/font-woff",df="image/jpeg",ff={woff:hf,woff2:hf,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:df,jpeg:df,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function pf(t){const e=function(t){const e=/\.([^./]*?)$/g.exec(t);return e?e[1]:""}(t).toLowerCase();return ff[e]||""}function mf(t){return-1!==t.search(/^(data:)/)}async function gf(t,e,n){const r=await fetch(t,e);if(404===r.status)throw new Error(`Resource "${r.url}" not found`);const i=await r.blob();return new Promise(((t,e)=>{const o=new FileReader;o.onerror=e,o.onloadend=()=>{try{t(n({res:r,result:o.result}))}catch(t){e(t)}},o.readAsDataURL(i)}))}const yf={};async function vf(t,e,n){const r=function(t,e,n){let r=t.replace(/\?.*/,"");return n&&(r=t),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),e?`[${e}]${r}`:r}(t,e,n.includeQueryParams);if(null!=yf[r])return yf[r];let i;n.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());try{const r=await gf(t,n.fetchRequestInit,(({res:t,result:n})=>(e||(e=t.headers.get("Content-Type")||""),function(t){return t.split(/,/)[1]}(n))));i=function(t,e){return`data:${e};base64,${t}`}(r,e)}catch(e){i=n.imagePlaceholder||"";let r=`Failed to fetch resource: ${t}`;e&&(r="string"==typeof e?e:e.message),r&&console.warn(r)}return yf[r]=i,i}const _f=t=>null!=t.tagName&&"SLOT"===t.tagName.toUpperCase();async function bf(t,e,n){return n||!e.filter||e.filter(t)?Promise.resolve(t).then((t=>async function(t,e){return cf(t,HTMLCanvasElement)?async function(t){const e=t.toDataURL();return"data:,"===e?t.cloneNode(!1):lf(e)}(t):cf(t,HTMLVideoElement)?async function(t,e){if(t.currentSrc){const e=document.createElement("canvas"),n=e.getContext("2d");return e.width=t.clientWidth,e.height=t.clientHeight,null==n||n.drawImage(t,0,0,e.width,e.height),lf(e.toDataURL())}const n=t.poster,r=pf(n);return lf(await vf(n,r,e))}(t,e):cf(t,HTMLIFrameElement)?async function(t){var e;try{if(null!==(e=null==t?void 0:t.contentDocument)&&void 0!==e&&e.body)return await bf(t.contentDocument.body,{},!0)}catch{}return t.cloneNode(!1)}(t):t.cloneNode(!1)}(t,e))).then((n=>async function(t,e,n){var r,i;let o=[];return o=_f(t)&&t.assignedNodes?rf(t.assignedNodes()):cf(t,HTMLIFrameElement)&&null!==(r=t.contentDocument)&&void 0!==r&&r.body?rf(t.contentDocument.body.childNodes):rf((null!==(i=t.shadowRoot)&&void 0!==i?i:t).childNodes),0===o.length||cf(t,HTMLVideoElement)||await o.reduce(((t,r)=>t.then((()=>bf(r,n))).then((t=>{t&&e.appendChild(t)}))),Promise.resolve()),e}(t,n,e))).then((e=>function(t,e){return cf(e,Element)&&(function(t,e){const n=e.style;if(!n)return;const r=window.getComputedStyle(t);r.cssText?(n.cssText=r.cssText,n.transformOrigin=r.transformOrigin):rf(r).forEach((i=>{let o=r.getPropertyValue(i);"font-size"===i&&o.endsWith("px")&&(o=Math.floor(parseFloat(o.substring(0,o.length-2)))-.1+"px"),cf(t,HTMLIFrameElement)&&"display"===i&&"inline"===o&&(o="block"),"d"===i&&e.getAttribute("d")&&(o=`path(${e.getAttribute("d")})`),n.setProperty(i,o,r.getPropertyPriority(i))}))}(t,e),function(t,e){uf(t,e,":before"),uf(t,e,":after")}(t,e),function(t,e){cf(t,HTMLTextAreaElement)&&(e.innerHTML=t.value),cf(t,HTMLInputElement)&&e.setAttribute("value",t.value)}(t,e),function(t,e){if(cf(t,HTMLSelectElement)){const n=e,r=Array.from(n.children).find((e=>t.value===e.getAttribute("value")));r&&r.setAttribute("selected","")}}(t,e)),e}(t,e))).then((t=>async function(t,e){const n=t.querySelectorAll?t.querySelectorAll("use"):[];if(0===n.length)return t;const r={};for(let i=0;i<n.length;i++){const o=n[i].getAttribute("xlink:href");if(o){const n=t.querySelector(o),i=document.querySelector(o);!n&&i&&!r[o]&&(r[o]=await bf(i,e,!0))}}const i=Object.values(r);if(i.length){const e="http://www.w3.org/1999/xhtml",n=document.createElementNS(e,"svg");n.setAttribute("xmlns",e),n.style.position="absolute",n.style.width="0",n.style.height="0",n.style.overflow="hidden",n.style.display="none";const r=document.createElementNS(e,"defs");n.appendChild(r);for(let t=0;t<i.length;t++)r.appendChild(i[t]);t.appendChild(n)}return t}(t,e))):null}const wf=/url\((['"]?)([^'"]+?)\1\)/g,Ef=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,xf=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Tf(t){return-1!==t.search(wf)}async function Of(t,e,n){if(!Tf(t))return t;const r=function(t,{preferredFontFormat:e}){return e?t.replace(xf,(t=>{for(;;){const[n,,r]=Ef.exec(t)||[];if(!r)return"";if(r===e)return`src: ${n};`}})):t}(t,n);return function(t){const e=[];return t.replace(wf,((t,n,r)=>(e.push(r),t))),e.filter((t=>!mf(t)))}(r).reduce(((t,r)=>t.then((t=>async function(t,e,n,r,i){try{const o=n?function(t,e){if(t.match(/^[a-z]+:\/\//i))return t;if(t.match(/^\/\//))return window.location.protocol+t;if(t.match(/^[a-z]+:/i))return t;const n=document.implementation.createHTMLDocument(),r=n.createElement("base"),i=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(i),e&&(r.href=e),i.href=t,i.href}(e,n):e,s=pf(e);let a;return i||(a=await vf(o,s,r)),t.replace(function(t){const e=t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`,"g")}(e),`$1${a}$3`)}catch{}return t}(t,r,e,n)))),Promise.resolve(r))}async function Sf(t,e,n){var r;const i=null===(r=e.style)||void 0===r?void 0:r.getPropertyValue(t);if(i){const r=await Of(i,null,n);return e.style.setProperty(t,r,e.style.getPropertyPriority(t)),!0}return!1}async function Mf(t,e){cf(t,Element)&&(await async function(t,e){await Sf("background",t,e)||await Sf("background-image",t,e),await Sf("mask",t,e)||await Sf("mask-image",t,e)}(t,e),await async function(t,e){const n=cf(t,HTMLImageElement);if((!n||mf(t.src))&&(!cf(t,SVGImageElement)||mf(t.href.baseVal)))return;const r=n?t.src:t.href.baseVal,i=await vf(r,pf(r),e);await new Promise(((e,r)=>{t.onload=e,t.onerror=r;const o=t;o.decode&&(o.decode=e),"lazy"===o.loading&&(o.loading="eager"),n?(t.srcset="",t.src=i):t.href.baseVal=i}))}(t,e),await async function(t,e){const n=rf(t.childNodes).map((t=>Mf(t,e)));await Promise.all(n).then((()=>t))}(t,e))}const Af={};async function Cf(t){let e=Af[t];return null!=e||(e={url:t,cssText:await(await fetch(t)).text()},Af[t]=e),e}async function Df(t,e){let n=t.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,i=(n.match(/url\([^)]+\)/g)||[]).map((async i=>{let o=i.replace(r,"$1");return o.startsWith("https://")||(o=new URL(o,t.url).href),gf(o,e.fetchRequestInit,(({result:t})=>(n=n.replace(i,`url(${t})`),[i,t])))}));return Promise.all(i).then((()=>n))}function kf(t){if(null==t)return[];const e=[];let n=t.replace(/(\/\*[\s\S]*?\*\/)/gi,"");const r=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const t=r.exec(n);if(null===t)break;e.push(t[0])}n=n.replace(r,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o=new RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let t=i.exec(n);if(null===t){if(t=o.exec(n),null===t)break;i.lastIndex=o.lastIndex}else o.lastIndex=i.lastIndex;e.push(t[0])}return e}async function Lf(t,e){const n=null!=e.fontEmbedCSS?e.fontEmbedCSS:e.skipFonts?null:await async function(t,e){const n=await async function(t,e){if(null==t.ownerDocument)throw new Error("Provided element is not within a Document");const n=rf(t.ownerDocument.styleSheets),r=await async function(t,e){const n=[],r=[];return t.forEach((n=>{if("cssRules"in n)try{rf(n.cssRules||[]).forEach(((t,i)=>{if(t.type===CSSRule.IMPORT_RULE){let o=i+1;const s=Cf(t.href).then((t=>Df(t,e))).then((t=>kf(t).forEach((t=>{try{n.insertRule(t,t.startsWith("@import")?o+=1:n.cssRules.length)}catch(e){console.error("Error inserting rule from remote css",{rule:t,error:e})}})))).catch((t=>{console.error("Error loading remote css",t.toString())}));r.push(s)}}))}catch(i){const o=t.find((t=>null==t.href))||document.styleSheets[0];null!=n.href&&r.push(Cf(n.href).then((t=>Df(t,e))).then((t=>kf(t).forEach((t=>{o.insertRule(t,n.cssRules.length)})))).catch((t=>{console.error("Error loading remote stylesheet",t)}))),console.error("Error inlining remote css file",i)}})),Promise.all(r).then((()=>(t.forEach((t=>{if("cssRules"in t)try{rf(t.cssRules||[]).forEach((t=>{n.push(t)}))}catch(e){console.error(`Error while reading CSS rules from ${t.href}`,e)}})),n)))}(n,e);return function(t){return t.filter((t=>t.type===CSSRule.FONT_FACE_RULE)).filter((t=>Tf(t.style.getPropertyValue("src"))))}(r)}(t,e);return(await Promise.all(n.map((t=>{const n=t.parentStyleSheet?t.parentStyleSheet.href:null;return Of(t.cssText,n,e)})))).join("\n")}(t,e);if(n){const e=document.createElement("style"),r=document.createTextNode(n);e.appendChild(r),t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}}async function Rf(t,e={}){const{width:n,height:r}=sf(t,e),i=await bf(t,e,!0);return await Lf(i,e),await Mf(i,e),function(t,e){const{style:n}=t;e.backgroundColor&&(n.backgroundColor=e.backgroundColor),e.width&&(n.width=`${e.width}px`),e.height&&(n.height=`${e.height}px`);const r=e.style;null!=r&&Object.keys(r).forEach((t=>{n[t]=r[t]}))}(i,e),await async function(t,e,n){const r="http://www.w3.org/2000/svg",i=document.createElementNS(r,"svg"),o=document.createElementNS(r,"foreignObject");return i.setAttribute("width",`${e}`),i.setAttribute("height",`${n}`),i.setAttribute("viewBox",`0 0 ${e} ${n}`),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("externalResourcesRequired","true"),i.appendChild(o),o.appendChild(t),async function(t){return Promise.resolve().then((()=>(new XMLSerializer).serializeToString(t))).then(encodeURIComponent).then((t=>`data:image/svg+xml;charset=utf-8,${t}`))}(i)}(i,n,r)}async function Pf(t,e={}){const{width:n,height:r}=sf(t,e),i=await Rf(t,e),o=await lf(i),s=document.createElement("canvas"),a=s.getContext("2d"),l=e.pixelRatio||function(){let t,e;try{e=process}catch{}const n=e&&e.env?e.env.devicePixelRatio:null;return n&&(t=parseInt(n,10),Number.isNaN(t)&&(t=1)),t||window.devicePixelRatio||1}(),c=e.canvasWidth||n,u=e.canvasHeight||r;return s.width=c*l,s.height=u*l,e.skipAutoScale||function(t){(t.width>af||t.height>af)&&(t.width>af&&t.height>af?t.width>t.height?(t.height*=af/t.width,t.width=af):(t.width*=af/t.height,t.height=af):t.width>af?(t.height*=af/t.width,t.width=af):(t.width*=af/t.height,t.height=af))}(s),s.style.width=`${c}`,s.style.height=`${u}`,e.backgroundColor&&(a.fillStyle=e.backgroundColor,a.fillRect(0,0,s.width,s.height)),a.drawImage(o,0,0,s.width,s.height),s}let If=class{constructor(t,e){this.model=t,this.services=e,this.init()}init(){}update(){}setModel(t){this.model=t}setServices(t){this.services=t}},Nf=class t extends If{constructor(t,e){super(t,e)}static getHTMLElementSize(t){return{width:t.clientWidth,height:t.clientHeight}}static getSVGElementSize(t,e={useAttrs:!1,useClientDimensions:!1,useBBox:!1,useBoundingRect:!1}){t.attr||(t=xu(t));const n={width:0,height:0},r=t=>{t&&Object.keys(n).forEach((e=>{if(t[e]){const r=t[e],i=parseFloat(r);r&&i>n[e]&&-1===(""+r).indexOf("%")&&(n[e]=i)}}))},i={width:t.attr("width"),height:t.attr("height")},o=t.node();let s,a,l,c,u;try{"function"==typeof o.getBBox&&(s=o.getBBox(),a={width:s.width,height:s.height})}catch(t){console.error(t)}try{"function"==typeof(null==o?void 0:o.getBoundingClientRect)&&(l=o.getBoundingClientRect(),c={width:l.width,height:l.height})}catch(t){console.error(t)}if(o instanceof SVGSVGElement&&(u={width:o.clientWidth,height:o.clientHeight}),e){if(e.useAttrs&&(r(i),n.width>0&&n.height>0))return n;if(e.useClientDimensions&&(r(u),n.width>0&&n.height>0))return u;if(e.useBBox&&(r(a),n.width>0&&n.height>0))return a;if(e.useBoundingRect&&(r(c),n.width>0&&n.height>0))return c}try{r({width:ac(t.node(),"width","baseVal","value"),height:ac(t.node(),"height","baseVal","value")})}catch{r(u),r(a),r(i)}return n}static appendOrSelect(t,e){const n=t.select(`${e}`);if(n.empty()){let n,r,i=e.split("#");return 2===i.length?(n=i[0],i=i[1].split("."),r=i[0]):(i=e.split("."),n=i[0]),t.append(n).attr("id",r).attr("class",i.slice(1).join(" "))}return n}init(){this.initializeID(),this.styleHolderElement(),this.addMainContainer(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()}getChartID(){return this.chartID}getElementOffset(t,e=!1){const n={left:0,top:0},r=t.getBoundingClientRect(),i=e?{left:0,top:0}:this.getHolder().getBoundingClientRect();try{n.left=r.left-i.left,n.top=r.top-i.top}catch(t){console.error(t)}return n}generateElementIDString(t){return`chart-${this.chartID}-${t}`}initializeID(){this.chartID=Math.floor(281474976710656*(1+Math.random())).toString(16)}addMainContainer(){const t=this.model.getOptions(),e=ac(t,"style","prefix"),n=xu(this.getHolder()).append("div").classed(`${sl}--${e}--chart-wrapper`,!0).attr("id",`chart-${this.getChartID()}`).style("height","100%").style("width","100%");n.append("g").attr("class","DONT_STYLE_ME_css_styles_verifier"),this.mainContainer=n.node()}update(){this.styleHolderElement()}styleHolderElement(){const t=this.getHolder(),{width:e,height:n,theme:r}=this.model.getOptions();e!==this.width&&(t.style.width=e,this.width=e),n!==this.height&&(t.style.height=n,this.height=n),xu(this.getHolder()).classed(`${sl}--chart-holder`,!0).attr("data-carbon-theme",r)}getHolder(){return this.model.get("holder")}exportToJPG(){const t=this,e=this.model.getOptions(),n=xu(this.getHolder());n.classed("filled",!0),async function(t,e={}){return(await Pf(t,e)).toDataURL("image/jpeg",e.quality||1)}(this.getMainContainer(),{quality:1,filter:t=>!(t.classList&&t.classList.contains("cds--cc--toolbar"))}).then((function(r){var i;let o="myChart";const s=ac(e,"fileDownload","fileName");"function"==typeof s?o=s("jpg"):"string"==typeof s&&(o=s),null==(i=t.services.files)||i.downloadImage(r,`${o}.jpg`),n.classed("filled",!1)}))}exportToPNG(){const t=this,e=this.model.getOptions(),n=xu(this.getHolder());n.classed("filled",!0),async function(t,e={}){return(await Pf(t,e)).toDataURL()}(this.getMainContainer(),{quality:1,filter:t=>!(t.classList&&t.classList.contains("cds--cc--toolbar"))}).then((function(r){var i;let o="myChart";const s=ac(e,"fileDownload","fileName");"function"==typeof s?o=s("png"):"string"==typeof s&&(o=s),null==(i=t.services.files)||i.downloadImage(r,`${o}.png`),n.classed("filled",!1)})).catch((function(t){console.error("oops, something went wrong!",t)}))}isFullScreenMode(){return xu(this.getHolder()).classed("fullscreen")}toggleFullscreen(){const t=this.getHolder();xu(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=xu(this.getHolder()),e=t.classed("fullscreen");t.classed("fullscreen",!e)}))}setSVGMaxHeight(){if(!this.model.getOptions().height){const{height:e}=t.getSVGElementSize(xu(this.mainContainer),{useBBox:!0}),n=xu(this.mainContainer).attr("class"),r=xu(this.mainContainer).selectAll(`.${n} > svg`);let i=0;r.nodes().forEach((function(e){i+=Number(t.getSVGElementSize(xu(e),{useBBox:!0}).height)})),i<=e?xu(this.mainContainer).attr("height",i):xu(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){const t=this.getHolder();t&&xu(t).on("mouseover",(()=>{var t;null==(t=this.services.events)||t.dispatchEvent(R.Chart.MOUSEOVER)})).on("mouseout",(()=>{var t;null==(t=this.services.events)||t.dispatchEvent(R.Chart.MOUSEOUT)}))}addResizeListener(){const t=this.getHolder();if(!t)return;let e=t.clientWidth,n=t.clientHeight;const r=function(t,e,n){var r,i,o,s,a,l,c=0,u=!1,h=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(e){var n=r,o=i;return r=i=void 0,c=e,s=t.apply(o,n)}function p(t){var n=t-l;return void 0===l||n>=e||n<0||h&&t-c>=o}function m(){var t=bu();if(p(t))return g(t);a=setTimeout(m,function(t){var n=e-(t-l);return h?Eu(n,o-(t-c)):n}(t))}function g(t){return a=void 0,d&&r?f(t):(r=i=void 0,s)}function y(){var t=bu(),n=p(t);if(r=arguments,i=this,l=t,n){if(void 0===a)return function(t){return c=t,a=setTimeout(m,e),u?f(t):s}(l);if(h)return clearTimeout(a),a=setTimeout(m,e),f(l)}return void 0===a&&(a=setTimeout(m,e)),s}return e=_u(e)||0,Ut(n)&&(u=!!n.leading,o=(h="maxWait"in n)?wu(_u(n.maxWait)||0,e):o,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==a&&clearTimeout(a),c=0,r=l=i=a=void 0},y.flush=function(){return void 0===a?s:g(bu())},y}((()=>{var r;t&&(Math.abs(e-t.clientWidth)>1||Math.abs(n-t.clientHeight)>1)&&(e=t.clientWidth,n=t.clientHeight,null==(r=this.services.events)||r.dispatchEvent(R.Chart.RESIZE))}),12.5);new ResizeObserver(r).observe(t)}},Bf=class t extends If{static appendOrUpdateLinearGradient(t){let e=t.svg.select(`defs linearGradient#${t.id}`);e.empty()&&(e=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)),e.selectAll("stop").remove(),e.selectAll("stop").data(t.stops).enter().append("stop").attr("offset",(t=>t.offset)).style("stop-color",(t=>t.color)).style("stop-opacity",(t=>t.opacity))}static getOffsetRatio(t){return(100*Math.abs(t[1])/Math.abs(t[0]-t[1])).toFixed(2)+"%"}static getStops(e,n){let r=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return e[0]<0&&e[1]>0&&(r=[{offset:"0%",color:n,opacity:"0.6"},{offset:t.getOffsetRatio(e),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),r}};var Uf=function(t){return function(e){return null==t?void 0:t[e]}}({À:"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"}),Ff=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,jf=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),Hf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,$f=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zf="\\ud800-\\udfff",Gf="\\u2700-\\u27bf",Vf="a-z\\xdf-\\xf6\\xf8-\\xff",Wf="A-Z\\xc0-\\xd6\\xd8-\\xde",Yf="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Zf="["+Yf+"]",qf="\\d+",Xf="["+Gf+"]",Kf="["+Vf+"]",Qf="[^"+zf+Yf+qf+Gf+Vf+Wf+"]",Jf="(?:\\ud83c[\\udde6-\\uddff]){2}",tp="[\\ud800-\\udbff][\\udc00-\\udfff]",ep="["+Wf+"]",np="(?:"+Kf+"|"+Qf+")",rp="(?:"+ep+"|"+Qf+")",ip="(?:['’](?:d|ll|m|re|s|t|ve))?",op="(?:['’](?:D|LL|M|RE|S|T|VE))?",sp="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",ap="[\\ufe0e\\ufe0f]?",lp=ap+sp+"(?:\\u200d(?:"+["[^"+zf+"]",Jf,tp].join("|")+")"+ap+sp+")*",cp="(?:"+[Xf,Jf,tp].join("|")+")"+lp,up=RegExp([ep+"?"+Kf+"+"+ip+"(?="+[Zf,ep,"$"].join("|")+")",rp+"+"+op+"(?="+[Zf,ep+np,"$"].join("|")+")",ep+"?"+np+"+"+ip,ep+"+"+op,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",qf,cp].join("|"),"g");var hp=RegExp("['’]","g");function dp(t){return function(e){return function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)n=e(n,t[r],r,t);return n}(function(t,e){return t=mn(t),void 0===e?function(t){return $f.test(t)}(t)?function(t){return t.match(up)||[]}(t):function(t){return t.match(Hf)||[]}(t):t.match(e)||[]}(function(t){return(t=mn(t))&&t.replace(Ff,Uf).replace(jf,"")}(e).replace(hp,"")),t,"")}}ve((function(t,e,n){return function(t,e,n){if("function"!=typeof t)throw new TypeError("Expected a function");return setTimeout((function(){t.apply(void 0,n)}),e)}(t,_u(e)||0,n)})),dp((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}));class fp{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const e=this._partials;let n=0;for(let r=0;r<this._n&&r<32;r++){const i=e[r],o=t+i,s=Math.abs(t)<Math.abs(i)?t-(o-i):i-(o-t);s&&(e[n++]=s),t=o}return e[n]=t,this._n=n+1,this}valueOf(){const t=this._partials;let e,n,r,i=this._n,o=0;if(i>0){for(o=t[--i];i>0&&(e=o,n=t[--i],o=e+n,r=n-(o-e),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(n=2*r,e=o+n,n==e-o&&(o=e))}return o}}function pp(t){return t}var mp=1e-6;function gp(t){return"translate("+t+",0)"}function yp(t){return"translate(0,"+t+")"}function vp(t){return e=>+t(e)}function _p(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function bp(){return!this.__axis}function wp(t,e){var n=[],r=null,i=null,o=6,s=6,a=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",h=1===t||3===t?gp:yp;function d(d){var f=r??(e.ticks?e.ticks.apply(e,n):e.domain()),p=i??(e.tickFormat?e.tickFormat.apply(e,n):pp),m=Math.max(o,0)+a,g=e.range(),y=+g[0]+l,v=+g[g.length-1]+l,_=(e.bandwidth?_p:vp)(e.copy(),l),b=d.selection?d.selection():d,w=b.selectAll(".domain").data([null]),E=b.selectAll(".tick").data(f,e).order(),x=E.exit(),T=E.enter().append("g").attr("class","tick"),O=E.select("line"),S=E.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),E=E.merge(T),O=O.merge(T.append("line").attr("stroke","currentColor").attr(u+"2",c*o)),S=S.merge(T.append("text").attr("fill","currentColor").attr(u,c*m).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),d!==b&&(w=w.transition(d),E=E.transition(d),O=O.transition(d),S=S.transition(d),x=x.transition(d).attr("opacity",mp).attr("transform",(function(t){return isFinite(t=_(t))?h(t+l):this.getAttribute("transform")})),T.attr("opacity",mp).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:_(t))+l)}))),x.remove(),w.attr("d",4===t||2===t?s?"M"+c*s+","+y+"H"+l+"V"+v+"H"+c*s:"M"+l+","+y+"V"+v:s?"M"+y+","+c*s+"V"+l+"H"+v+"V"+c*s:"M"+y+","+l+"H"+v),E.attr("opacity",1).attr("transform",(function(t){return h(_(t)+l)})),O.attr(u+"2",c*o),S.attr(u,c*m).text(p),b.filter(bp).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),b.each((function(){this.__axis=_}))}return d.scale=function(t){return arguments.length?(e=t,d):e},d.ticks=function(){return n=Array.from(arguments),d},d.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),d):n.slice()},d.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),d):r&&r.slice()},d.tickFormat=function(t){return arguments.length?(i=t,d):i},d.tickSize=function(t){return arguments.length?(o=s=+t,d):o},d.tickSizeInner=function(t){return arguments.length?(o=+t,d):o},d.tickSizeOuter=function(t){return arguments.length?(s=+t,d):s},d.tickPadding=function(t){return arguments.length?(a=+t,d):a},d.offset=function(t){return arguments.length?(l=+t,d):l},d}function Ep(t){return wp(1,t)}function xp(t){return wp(2,t)}function Tp(t){return wp(3,t)}function Op(t){return wp(4,t)}const Sp={capture:!0,passive:!1};function Mp(t){t.preventDefault(),t.stopImmediatePropagation()}const Ap=t=>+t,Cp=t=>()=>t;function Dp(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function kp(t){t.preventDefault(),t.stopImmediatePropagation()}var Lp={name:"drag"},Rp={name:"space"},Pp={name:"handle"},Ip={name:"center"};const{abs:Np,max:Bp,min:Up}=Math;function Fp(t){return[+t[0],+t[1]]}function jp(t){return[Fp(t[0]),Fp(t[1])]}var Hp={name:"x",handles:["w","e"].map(Zp),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},$p={name:"y",handles:["n","s"].map(Zp),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},zp={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"},Gp={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Vp={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Wp={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Yp={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Zp(t){return{type:t}}function qp(t){return!t.ctrlKey&&!t.button}function Xp(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Kp(){return navigator.maxTouchPoints||"ontouchstart"in this}function Qp(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Jp(){return function(t){var e,n=Xp,r=qp,i=Kp,o=!0,s=vi("start","brush","end"),a=6;function l(e){var n=e.property("__brush",m).selectAll(".overlay").data([Zp("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",zp.overlay).merge(n).each((function(){var t=Qp(this).extent;xu(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([Zp("selection")]).enter().append("rect").attr("class","selection").attr("cursor",zp.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return zp[t.type]})),e.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",d).filter(i).on("touchstart.brush",d).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var t=xu(this),e=Qp(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-a/2:e[0][0]-a/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-a/2:e[0][1]-a/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+a:a})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+a:a}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new h(t,e,n):r}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function d(n){if((!e||n.touches)&&r.apply(this,arguments)){var i,s,a,l,h,d,f,p,m,g,y,v=this,_=n.target.__data__.type,b="selection"===(o&&n.metaKey?_="overlay":_)?Lp:o&&n.altKey?Ip:Pp,w=t===$p?null:Wp[_],E=t===Hp?null:Yp[_],x=Qp(v),T=x.extent,O=x.selection,S=T[0][0],M=T[0][1],A=T[1][0],C=T[1][1],D=0,k=0,L=w&&E&&o&&n.shiftKey,R=Array.from(n.touches||[n],(t=>{const e=t.identifier;return(t=Po(t,v)).point0=t.slice(),t.identifier=e,t}));oa(v);var P=u(v,arguments,!0).beforestart();if("overlay"===_){O&&(m=!0);const e=[R[0],R[1]||R[0]];x.selection=O=[[i=t===$p?S:Up(e[0][0],e[1][0]),a=t===Hp?M:Up(e[0][1],e[1][1])],[h=t===$p?A:Bp(e[0][0],e[1][0]),f=t===Hp?C:Bp(e[0][1],e[1][1])]],R.length>1&&F(n)}else i=O[0][0],a=O[0][1],h=O[1][0],f=O[1][1];s=i,l=a,d=h,p=f;var I=xu(v).attr("pointer-events","none"),N=I.selectAll(".overlay").attr("cursor",zp[_]);if(n.touches)P.moved=U,P.ended=j;else{var B=xu(n.view).on("mousemove.brush",U,!0).on("mouseup.brush",j,!0);o&&B.on("keydown.brush",(function(t){switch(t.keyCode){case 16:L=w&&E;break;case 18:b===Pp&&(w&&(h=d-D*w,i=s+D*w),E&&(f=p-k*E,a=l+k*E),b=Ip,F(t));break;case 32:(b===Pp||b===Ip)&&(w<0?h=d-D:w>0&&(i=s-D),E<0?f=p-k:E>0&&(a=l-k),b=Rp,N.attr("cursor",zp.selection),F(t));break;default:return}kp(t)}),!0).on("keyup.brush",(function(t){switch(t.keyCode){case 16:L&&(g=y=L=!1,F(t));break;case 18:b===Ip&&(w<0?h=d:w>0&&(i=s),E<0?f=p:E>0&&(a=l),b=Pp,F(t));break;case 32:b===Rp&&(t.altKey?(w&&(h=d-D*w,i=s+D*w),E&&(f=p-k*E,a=l+k*E),b=Ip):(w<0?h=d:w>0&&(i=s),E<0?f=p:E>0&&(a=l),b=Pp),N.attr("cursor",zp[_]),F(t));break;default:return}kp(t)}),!0),function(t){var e=t.document.documentElement,n=xu(t).on("dragstart.drag",Mp,Sp);"onselectstart"in e?n.on("selectstart.drag",Mp,Sp):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(n.view)}c.call(v),P.start(n,b.name)}function U(t){for(const e of t.changedTouches||[t])for(const t of R)t.identifier===e.identifier&&(t.cur=Po(e,v));if(L&&!g&&!y&&1===R.length){const t=R[0];Np(t.cur[0]-t[0])>Np(t.cur[1]-t[1])?y=!0:g=!0}for(const t of R)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);m=!0,kp(t),F(t)}function F(t){const e=R[0],n=e.point0;var r;switch(D=e[0]-n[0],k=e[1]-n[1],b){case Rp:case Lp:w&&(D=Bp(S-i,Up(A-h,D)),s=i+D,d=h+D),E&&(k=Bp(M-a,Up(C-f,k)),l=a+k,p=f+k);break;case Pp:R[1]?(w&&(s=Bp(S,Up(A,R[0][0])),d=Bp(S,Up(A,R[1][0])),w=1),E&&(l=Bp(M,Up(C,R[0][1])),p=Bp(M,Up(C,R[1][1])),E=1)):(w<0?(D=Bp(S-i,Up(A-i,D)),s=i+D,d=h):w>0&&(D=Bp(S-h,Up(A-h,D)),s=i,d=h+D),E<0?(k=Bp(M-a,Up(C-a,k)),l=a+k,p=f):E>0&&(k=Bp(M-f,Up(C-f,k)),l=a,p=f+k));break;case Ip:w&&(s=Bp(S,Up(A,i-D*w)),d=Bp(S,Up(A,h+D*w))),E&&(l=Bp(M,Up(C,a-k*E)),p=Bp(M,Up(C,f+k*E)))}d<s&&(w*=-1,r=i,i=h,h=r,r=s,s=d,d=r,_ in Gp&&N.attr("cursor",zp[_=Gp[_]])),p<l&&(E*=-1,r=a,a=f,f=r,r=l,l=p,p=r,_ in Vp&&N.attr("cursor",zp[_=Vp[_]])),x.selection&&(O=x.selection),g&&(s=O[0][0],d=O[1][0]),y&&(l=O[0][1],p=O[1][1]),(O[0][0]!==s||O[0][1]!==l||O[1][0]!==d||O[1][1]!==p)&&(x.selection=[[s,l],[d,p]],c.call(v),P.brush(t,b.name))}function j(t){if(function(t){t.stopImmediatePropagation()}(t),t.touches){if(t.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else(function(t,e){var n=t.document.documentElement,r=xu(t).on("dragstart.drag",null);e&&(r.on("click.drag",Mp,Sp),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)})(t.view,m),B.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);I.attr("pointer-events","all"),N.attr("cursor",zp.overlay),x.selection&&(O=x.selection),function(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}(O)&&(x.selection=null,c.call(v)),P.end(t,b.name)}}function f(t){u(this,arguments).moved(t)}function p(t){u(this,arguments).ended(t)}function m(){var e=this.__brush||{selection:null};return e.extent=jp(n.apply(this,arguments)),e.dim=t,e}return l.move=function(e,n,r){e.tween?e.on("start.brush",(function(t){u(this,arguments).beforestart().start(t)})).on("interrupt.brush end.brush",(function(t){u(this,arguments).end(t)})).tween("brush",(function(){var e=this,r=e.__brush,i=u(e,arguments),o=r.selection,s=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),a=Ss(o,s);function l(t){r.selection=1===t&&null===s?null:a(t),c.call(e),i.brush()}return null!==o&&null!==s?l:l(1)})):e.each((function(){var e=this,i=arguments,o=e.__brush,s=t.input("function"==typeof n?n.apply(e,i):n,o.extent),a=u(e,i).beforestart();oa(e),o.selection=null===s?null:s,c.call(e),a.start(r).brush(r).end(r)}))},l.clear=function(t,e){l.move(t,null,e)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,e){return this.starting?(this.starting=!1,this.emit("start",t,e)):this.emit("brush",t),this},brush:function(t,e){return this.emit("brush",t,e),this},end:function(t,e){return 0==--this.active&&(delete this.state.emitter,this.emit("end",t,e)),this},emit:function(e,n,r){var i=xu(this.that).datum();s.call(e,this.that,new Dp(e,{sourceEvent:n,target:l,selection:t.output(this.state.selection),mode:r,dispatch:s}),i)}},l.extent=function(t){return arguments.length?(n="function"==typeof t?t:Cp(jp(t)),l):n},l.filter=function(t){return arguments.length?(r="function"==typeof t?t:Cp(!!t),l):r},l.touchable=function(t){return arguments.length?(i="function"==typeof t?t:Cp(!!t),l):i},l.handleSize=function(t){return arguments.length?(a=+t,l):a},l.keyModifiers=function(t){return arguments.length?(o=!!t,l):o},l.on=function(){var t=s.on.apply(s,arguments);return t===s?l:t},l}(Hp)}const tm=Math.PI,em=2*tm,nm=1e-6,rm=em-nm;function im(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}let om=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?im:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return im;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,o){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let o=this._x1,s=this._y1,a=n-t,l=r-e,c=o-t,u=s-e,h=c*c+u*u;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(h>nm)if(Math.abs(u*a-l*c)>nm&&i){let d=n-o,f=r-s,p=a*a+l*l,m=d*d+f*f,g=Math.sqrt(p),y=Math.sqrt(h),v=i*Math.tan((tm-Math.acos((p+h-m)/(2*g*y)))/2),_=v/y,b=v/g;Math.abs(_-1)>nm&&this._append`L${t+_*c},${e+_*u}`,this._append`A${i},${i},0,0,${+(u*d>c*f)},${this._x1=t+b*a},${this._y1=e+b*l}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,n,r,i,o){if(t=+t,e=+e,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(r),a=n*Math.sin(r),l=t+s,c=e+a,u=1^o,h=o?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>nm||Math.abs(this._y1-c)>nm)&&this._append`L${l},${c}`,n&&(h<0&&(h=h%em+em),h>rm?this._append`A${n},${n},0,1,${u},${t-s},${e-a}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:h>nm&&this._append`A${n},${n},0,${+(h>=tm)},${u},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};var sm=Math.PI,am=2*sm,lm=sm/180,cm=Math.abs,um=(Math.atan,Math.atan2,Math.cos),hm=(Math.exp,Math.log,Math.sin,Math.sign,Math.sqrt);Math.tan;function dm(t,e){return cm(t)>sm&&(t-=Math.round(t/am)*am),[t,e]}function fm(){}function pm(t,e){return[t,e]}dm.invert=dm,new fp,new fp,new fp,fm.prototype={constructor:fm,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},um(30*lm),pm.invert=pm;hm(3);function mm(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function gm(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=vm)):void 0===e&&(e=ym);for(var n,r,i,o,s,a=new wm(t),l=[a];n=l.pop();)if((i=e(n.data))&&(s=(i=Array.from(i)).length))for(n.children=i,o=s-1;o>=0;--o)l.push(r=i[o]=new wm(i[o])),r.parent=n,r.depth=n.depth+1;return a.eachBefore(bm)}function ym(t){return t.children}function vm(t){return Array.isArray(t)?t[1]:null}function _m(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function bm(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function wm(t){this.data=t,this.depth=this.height=0,this.parent=null}function Em(t,e,n,r,i){for(var o,s=t.children,a=-1,l=s.length,c=t.value&&(r-e)/t.value;++a<l;)(o=s[a]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*c}function xm(t,e,n,r,i){for(var o,s=t.children,a=-1,l=s.length,c=t.value&&(i-n)/t.value;++a<l;)(o=s[a]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*c}function Tm(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new om(e)}function Om(t){return t.innerRadius}function Sm(t){return t.outerRadius}function Mm(t){return t.startAngle}function Am(t){return t.endAngle}function Cm(t){return t&&t.padAngle}function Dm(t,e,n,r,i,o,s){var a=t-n,l=e-r,c=(s?o:-o)/Vd(a*a+l*l),u=c*l,h=-c*a,d=t+u,f=e+h,p=n+u,m=r+h,g=(d+p)/2,y=(f+m)/2,v=p-d,_=m-f,b=v*v+_*_,w=i-o,E=d*m-p*f,x=(_<0?-1:1)*Vd($d(0,w*w*b-E*E)),T=(E*_-v*x)/b,O=(-E*v-_*x)/b,S=(E*_+v*x)/b,M=(-E*v+_*x)/b,A=T-g,C=O-y,D=S-g,k=M-y;return A*A+C*C>D*D+k*k&&(T=S,O=M),{cx:T,cy:O,x01:-u,y01:-h,x11:T*(i/w-1),y11:O*(i/w-1)}}function km(t){return t[0]}function Lm(t){return t[1]}function Rm(t,e){var n=qc(!0),r=null,i=Qd,o=null,s=Tm(a);function a(a){var l,c,u,h=(a=Xc(a)).length,d=!1;for(null==r&&(o=i(u=s())),l=0;l<=h;++l)!(l<h&&n(c=a[l],l,a))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+t(c,l,a),+e(c,l,a));if(u)return o=null,u+""||null}return t="function"==typeof t?t:void 0===t?km:qc(t),e="function"==typeof e?e:void 0===e?Lm:qc(e),a.x=function(e){return arguments.length?(t="function"==typeof e?e:qc(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:qc(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:qc(!!t),a):n},a.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),a):i},a.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),a):r},a}function Pm(t,e,n){var r=null,i=qc(!0),o=null,s=Qd,a=null,l=Tm(c);function c(c){var u,h,d,f,p,m=(c=Xc(c)).length,g=!1,y=new Array(m),v=new Array(m);for(null==o&&(a=s(p=l())),u=0;u<=m;++u){if(!(u<m&&i(f=c[u],u,c))===g)if(g=!g)h=u,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),d=u-1;d>=h;--d)a.point(y[d],v[d]);a.lineEnd(),a.areaEnd()}g&&(y[u]=+t(f,u,c),v[u]=+e(f,u,c),a.point(r?+r(f,u,c):y[u],n?+n(f,u,c):v[u]))}if(p)return a=null,p+""||null}function u(){return Rm().defined(i).curve(s).context(o)}return t="function"==typeof t?t:void 0===t?km:qc(+t),e="function"==typeof e?e:qc(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?Lm:qc(+n),c.x=function(e){return arguments.length?(t="function"==typeof e?e:qc(+e),r=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:qc(+e),c):t},c.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:qc(+t),c):r},c.y=function(t){return arguments.length?(e="function"==typeof t?t:qc(+t),n=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:qc(+t),c):e},c.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:qc(+t),c):n},c.lineX0=c.lineY0=function(){return u().x(t).y(e)},c.lineY1=function(){return u().x(t).y(n)},c.lineX1=function(){return u().x(r).y(e)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:qc(!!t),c):i},c.curve=function(t){return arguments.length?(s=t,null!=o&&(a=s(o)),c):s},c.context=function(t){return arguments.length?(null==t?o=a=null:a=s(o=t),c):o},c}function Im(t){this._curve=t}wm.prototype=gm.prototype={constructor:wm,count:function(){return this.eachAfter(mm)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,o=this,s=[o],a=[],l=-1;o=s.pop();)if(a.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)s.push(n[r]);for(;o=a.pop();)t.call(e,o,++l,this);return this},eachBefore:function(t,e){for(var n,r,i=this,o=[i],s=-1;i=o.pop();)if(t.call(e,i,++s,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return gm(this).eachBefore(_m)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,o=[i];do{for(t=o.reverse(),o=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n])}while(o.length)}},Object.create(wm.prototype),function t(e){function n(t,n,r,i,o){!function(t,e,n,r,i,o){for(var s,a,l,c,u,h,d,f,p,m,g,y=[],v=e.children,_=0,b=0,w=v.length,E=e.value;_<w;){l=i-n,c=o-r;do{u=v[b++].value}while(!u&&b<w);for(h=d=u,g=u*u*(m=Math.max(c/l,l/c)/(E*t)),p=Math.max(d/g,g/h);b<w;++b){if(u+=a=v[b].value,a<h&&(h=a),a>d&&(d=a),g=u*u*m,(f=Math.max(d/g,g/h))>p){u-=a;break}p=f}y.push(s={value:u,dice:l<c,children:v.slice(_,b)}),s.dice?Em(s,n,r,i,E?r+=c*u/E:o):xm(s,n,r,E?n+=l*u/E:i,o),E-=u,_=b}}(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2),function(t){function e(e){return new Im(t(e))}e._curve=t}(Qd),Im.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};let Nm=class{constructor(t,e,n){if(this.type="",this.renderType=P.HTML,this.id="",this.parent=void 0,this.configs={},this.model=t,this.services=e,n&&(this.configs=n,this.configs.id)){const t=ac(this.model.getOptions(),"style","prefix");this.id=`${t}--${this.configs.id}`}this.parent||this.setParent(xu(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 e;const n=this.parent;if(this.parent=t,(!n||n.node()!==t.node())&&this.type){const t=ac(this.model.getOptions(),"style","prefix");null==(e=this.parent)||e.classed(`${sl}--${t}--${this.type}`,!0),n&&n.classed(`${sl}--${t}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(t={ariaLabel:null,isPresentational:!1,withinChartClip:!1}){if(this.type){const e=ac(this.model.getOptions(),"style","prefix"),n=this.id?`#${this.id}`:"",r=Nf.appendOrSelect(this.parent,`${this.renderType===P.SVG?"svg":"div"}${n}.${sl}--${e}--${this.type}`);if(t.ariaLabel&&r.attr("aria-label",t.ariaLabel),t.isPresentational&&r.attr("role","presentation"),t.withinChartClip){const t=this.model.get("chartClipId");if(t){const e=xu(`#${t}`).select("rect");0!==e.size()&&parseFloat(e.attr("height"))>0&&r.attr("clip-path",`url(#${t})`)}}return r.attr("width","100%").attr("height","100%")}return this.parent}getOptions(){return this.configs.options?qr({},this.model.getOptions(),this.configs.options):this.model.getOptions()}};const{entries:Bm,setPrototypeOf:Um,isFrozen:Fm,getPrototypeOf:jm,getOwnPropertyDescriptor:Hm}=Object;let{freeze:$m,seal:zm,create:Gm}=Object,{apply:Vm,construct:Wm}=typeof Reflect<"u"&&Reflect;$m||($m=function(t){return t}),zm||(zm=function(t){return t}),Vm||(Vm=function(t,e,n){return t.apply(e,n)}),Wm||(Wm=function(t,e){return new t(...e)});const Ym=og(Array.prototype.forEach),Zm=og(Array.prototype.pop),qm=og(Array.prototype.push),Xm=og(String.prototype.toLowerCase),Km=og(String.prototype.toString),Qm=og(String.prototype.match),Jm=og(String.prototype.replace),tg=og(String.prototype.indexOf),eg=og(String.prototype.trim),ng=og(Object.prototype.hasOwnProperty),rg=og(RegExp.prototype.test),ig=function(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Wm(t,n)}}(TypeError);function og(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Vm(t,e,r)}}function sg(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Xm;Um&&Um(t,null);let r=e.length;for(;r--;){let i=e[r];if("string"==typeof i){const t=n(i);t!==i&&(Fm(e)||(e[r]=t),i=t)}t[i]=!0}return t}function ag(t){for(let e=0;e<t.length;e++)ng(t,e)||(t[e]=null);return t}function lg(t){const e=Gm(null);for(const[n,r]of Bm(t))ng(t,n)&&(Array.isArray(r)?e[n]=ag(r):r&&"object"==typeof r&&r.constructor===Object?e[n]=lg(r):e[n]=r);return e}function cg(t,e){for(;null!==t;){const n=Hm(t,e);if(n){if(n.get)return og(n.get);if("function"==typeof n.value)return og(n.value)}t=jm(t)}return function(){return null}}const ug=$m(["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"]),hg=$m(["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"]),dg=$m(["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"]),fg=$m(["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"]),pg=$m(["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"]),mg=$m(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),gg=$m(["#text"]),yg=$m(["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"]),vg=$m(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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"]),_g=$m(["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"]),bg=$m(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),wg=zm(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Eg=zm(/<%[\w\W]*|[\w\W]*%>/gm),xg=zm(/\${[\w\W]*}/gm),Tg=zm(/^data-[\-\w.\u00B7-\uFFFF]/),Og=zm(/^aria-[\-\w]+$/),Sg=zm(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Mg=zm(/^(?:\w+script|data):/i),Ag=zm(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Cg=zm(/^html$/i),Dg=zm(/^[a-z][.\w]*(-[.\w]+)+$/i);var kg=Object.freeze({__proto__:null,MUSTACHE_EXPR:wg,ERB_EXPR:Eg,TMPLIT_EXPR:xg,DATA_ATTR:Tg,ARIA_ATTR:Og,IS_ALLOWED_URI:Sg,IS_SCRIPT_OR_DATA:Mg,ATTR_WHITESPACE:Ag,DOCTYPE_NAME:Cg,CUSTOM_ELEMENT:Dg});var Lg=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:typeof window>"u"?null:window;const n=e=>t(e);if(n.version="3.1.6",n.removed=[],!e||!e.document||9!==e.document.nodeType)return n.isSupported=!1,n;let{document:r}=e;const i=r,o=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:l,Element:c,NodeFilter:u,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,g=cg(m,"cloneNode"),y=cg(m,"remove"),v=cg(m,"nextSibling"),_=cg(m,"childNodes"),b=cg(m,"parentNode");if("function"==typeof a){const t=r.createElement("template");t.content&&t.content.ownerDocument&&(r=t.content.ownerDocument)}let w,E="";const{implementation:x,createNodeIterator:T,createDocumentFragment:O,getElementsByTagName:S}=r,{importNode:M}=i;let A={};n.isSupported="function"==typeof Bm&&"function"==typeof b&&x&&void 0!==x.createHTMLDocument;const{MUSTACHE_EXPR:C,ERB_EXPR:D,TMPLIT_EXPR:k,DATA_ATTR:L,ARIA_ATTR:R,IS_SCRIPT_OR_DATA:P,ATTR_WHITESPACE:I,CUSTOM_ELEMENT:N}=kg;let{IS_ALLOWED_URI:B}=kg,U=null;const F=sg({},[...ug,...hg,...dg,...pg,...gg]);let j=null;const H=sg({},[...yg,...vg,..._g,...bg]);let $=Object.seal(Gm(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}})),z=null,G=null,V=!0,W=!0,Y=!1,Z=!0,q=!1,X=!0,K=!1,Q=!1,J=!1,tt=!1,et=!1,nt=!1,rt=!0,it=!1,ot=!0,st=!1,at={},lt=null;const ct=sg({},["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 ut=null;const ht=sg({},["audio","video","img","source","image","track"]);let dt=null;const ft=sg({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pt="http://www.w3.org/1998/Math/MathML",mt="http://www.w3.org/2000/svg",gt="http://www.w3.org/1999/xhtml";let yt=gt,vt=!1,_t=null;const bt=sg({},[pt,mt,gt],Km);let wt=null;const Et=["application/xhtml+xml","text/html"];let xt=null,Tt=null;const Ot=r.createElement("form"),St=function(t){return t instanceof RegExp||t instanceof Function},Mt=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Tt||Tt!==t){if((!t||"object"!=typeof t)&&(t={}),t=lg(t),wt=-1===Et.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,xt="application/xhtml+xml"===wt?Km:Xm,U=ng(t,"ALLOWED_TAGS")?sg({},t.ALLOWED_TAGS,xt):F,j=ng(t,"ALLOWED_ATTR")?sg({},t.ALLOWED_ATTR,xt):H,_t=ng(t,"ALLOWED_NAMESPACES")?sg({},t.ALLOWED_NAMESPACES,Km):bt,dt=ng(t,"ADD_URI_SAFE_ATTR")?sg(lg(ft),t.ADD_URI_SAFE_ATTR,xt):ft,ut=ng(t,"ADD_DATA_URI_TAGS")?sg(lg(ht),t.ADD_DATA_URI_TAGS,xt):ht,lt=ng(t,"FORBID_CONTENTS")?sg({},t.FORBID_CONTENTS,xt):ct,z=ng(t,"FORBID_TAGS")?sg({},t.FORBID_TAGS,xt):{},G=ng(t,"FORBID_ATTR")?sg({},t.FORBID_ATTR,xt):{},at=!!ng(t,"USE_PROFILES")&&t.USE_PROFILES,V=!1!==t.ALLOW_ARIA_ATTR,W=!1!==t.ALLOW_DATA_ATTR,Y=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Z=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,q=t.SAFE_FOR_TEMPLATES||!1,X=!1!==t.SAFE_FOR_XML,K=t.WHOLE_DOCUMENT||!1,tt=t.RETURN_DOM||!1,et=t.RETURN_DOM_FRAGMENT||!1,nt=t.RETURN_TRUSTED_TYPE||!1,J=t.FORCE_BODY||!1,rt=!1!==t.SANITIZE_DOM,it=t.SANITIZE_NAMED_PROPS||!1,ot=!1!==t.KEEP_CONTENT,st=t.IN_PLACE||!1,B=t.ALLOWED_URI_REGEXP||Sg,yt=t.NAMESPACE||gt,$=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&St(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&St(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&($.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),q&&(W=!1),et&&(tt=!0),at&&(U=sg({},gg),j=[],!0===at.html&&(sg(U,ug),sg(j,yg)),!0===at.svg&&(sg(U,hg),sg(j,vg),sg(j,bg)),!0===at.svgFilters&&(sg(U,dg),sg(j,vg),sg(j,bg)),!0===at.mathMl&&(sg(U,pg),sg(j,_g),sg(j,bg))),t.ADD_TAGS&&(U===F&&(U=lg(U)),sg(U,t.ADD_TAGS,xt)),t.ADD_ATTR&&(j===H&&(j=lg(j)),sg(j,t.ADD_ATTR,xt)),t.ADD_URI_SAFE_ATTR&&sg(dt,t.ADD_URI_SAFE_ATTR,xt),t.FORBID_CONTENTS&&(lt===ct&&(lt=lg(lt)),sg(lt,t.FORBID_CONTENTS,xt)),ot&&(U["#text"]=!0),K&&sg(U,["html","head","body"]),U.table&&(sg(U,["tbody"]),delete z.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw ig('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw ig('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=t.TRUSTED_TYPES_POLICY,E=w.createHTML("")}else void 0===w&&(w=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:t=>t,createScriptURL:t=>t})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(p,o)),null!==w&&"string"==typeof E&&(E=w.createHTML(""));$m&&$m(t),Tt=t}},At=sg({},["mi","mo","mn","ms","mtext"]),Ct=sg({},["foreignobject","annotation-xml"]),Dt=sg({},["title","style","font","a","script"]),kt=sg({},[...hg,...dg,...fg]),Lt=sg({},[...pg,...mg]),Rt=function(t){qm(n.removed,{element:t});try{b(t).removeChild(t)}catch{y(t)}},Pt=function(t,e){try{qm(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch{qm(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!j[t])if(tt||et)try{Rt(e)}catch{}else try{e.setAttribute(t,"")}catch{}},It=function(t){let e=null,n=null;if(J)t="<remove></remove>"+t;else{const e=Qm(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===wt&&yt===gt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const i=w?w.createHTML(t):t;if(yt===gt)try{e=(new f).parseFromString(i,wt)}catch{}if(!e||!e.documentElement){e=x.createDocument(yt,"template",null);try{e.documentElement.innerHTML=vt?E:i}catch{}}const o=e.body||e.documentElement;return t&&n&&o.insertBefore(r.createTextNode(n),o.childNodes[0]||null),yt===gt?S.call(e,K?"html":"body")[0]:K?e.documentElement:o},Nt=function(t){return T.call(t.ownerDocument||t,t,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Bt=function(t){return t instanceof d&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof h)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Ut=function(t){return"function"==typeof l&&t instanceof l},Ft=function(t,e,r){A[t]&&Ym(A[t],(t=>{t.call(n,e,r,Tt)}))},jt=function(t){let e=null;if(Ft("beforeSanitizeElements",t,null),Bt(t))return Rt(t),!0;const r=xt(t.nodeName);if(Ft("uponSanitizeElement",t,{tagName:r,allowedTags:U}),t.hasChildNodes()&&!Ut(t.firstElementChild)&&rg(/<[/\w]/g,t.innerHTML)&&rg(/<[/\w]/g,t.textContent)||7===t.nodeType||X&&8===t.nodeType&&rg(/<[/\w]/g,t.data))return Rt(t),!0;if(!U[r]||z[r]){if(!z[r]&&$t(r)&&($.tagNameCheck instanceof RegExp&&rg($.tagNameCheck,r)||$.tagNameCheck instanceof Function&&$.tagNameCheck(r)))return!1;if(ot&&!lt[r]){const e=b(t)||t.parentNode,n=_(t)||t.childNodes;if(n&&e)for(let r=n.length-1;r>=0;--r){const i=g(n[r],!0);i.__removalCount=(t.__removalCount||0)+1,e.insertBefore(i,v(t))}}return Rt(t),!0}return t instanceof c&&!function(t){let e=b(t);(!e||!e.tagName)&&(e={namespaceURI:yt,tagName:"template"});const n=Xm(t.tagName),r=Xm(e.tagName);return!!_t[t.namespaceURI]&&(t.namespaceURI===mt?e.namespaceURI===gt?"svg"===n:e.namespaceURI===pt?"svg"===n&&("annotation-xml"===r||At[r]):!!kt[n]:t.namespaceURI===pt?e.namespaceURI===gt?"math"===n:e.namespaceURI===mt?"math"===n&&Ct[r]:!!Lt[n]:t.namespaceURI===gt?!(e.namespaceURI===mt&&!Ct[r]||e.namespaceURI===pt&&!At[r])&&!Lt[n]&&(Dt[n]||!kt[n]):!("application/xhtml+xml"!==wt||!_t[t.namespaceURI]))}(t)||("noscript"===r||"noembed"===r||"noframes"===r)&&rg(/<\/no(script|embed|frames)/i,t.innerHTML)?(Rt(t),!0):(q&&3===t.nodeType&&(e=t.textContent,Ym([C,D,k],(t=>{e=Jm(e,t," ")})),t.textContent!==e&&(qm(n.removed,{element:t.cloneNode()}),t.textContent=e)),Ft("afterSanitizeElements",t,null),!1)},Ht=function(t,e,n){if(rt&&("id"===e||"name"===e)&&(n in r||n in Ot))return!1;if((!W||G[e]||!rg(L,e))&&(!V||!rg(R,e)))if(!j[e]||G[e]){if(!($t(t)&&($.tagNameCheck instanceof RegExp&&rg($.tagNameCheck,t)||$.tagNameCheck instanceof Function&&$.tagNameCheck(t))&&($.attributeNameCheck instanceof RegExp&&rg($.attributeNameCheck,e)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(e))||"is"===e&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&rg($.tagNameCheck,n)||$.tagNameCheck instanceof Function&&$.tagNameCheck(n))))return!1}else if(!dt[e]&&!rg(B,Jm(n,I,""))&&("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==tg(n,"data:")||!ut[t])&&(!Y||rg(P,Jm(n,I,"")))&&n)return!1;return!0},$t=function(t){return"annotation-xml"!==t&&Qm(t,N)},zt=function(t){Ft("beforeSanitizeAttributes",t,null);const{attributes:e}=t;if(!e)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:j};let i=e.length;for(;i--;){const o=e[i],{name:s,namespaceURI:a,value:l}=o,c=xt(s);let u="value"===s?l:eg(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,Ft("uponSanitizeAttribute",t,r),u=r.attrValue,X&&rg(/((--!?|])>)|<\/(style|title)/i,u)){Pt(s,t);continue}if(r.forceKeepAttr||(Pt(s,t),!r.keepAttr))continue;if(!Z&&rg(/\/>/i,u)){Pt(s,t);continue}q&&Ym([C,D,k],(t=>{u=Jm(u,t," ")}));const h=xt(t.nodeName);if(Ht(h,c,u)){if(it&&("id"===c||"name"===c)&&(Pt(s,t),u="user-content-"+u),w&&"object"==typeof p&&"function"==typeof p.getAttributeType&&!a)switch(p.getAttributeType(h,c)){case"TrustedHTML":u=w.createHTML(u);break;case"TrustedScriptURL":u=w.createScriptURL(u)}try{a?t.setAttributeNS(a,s,u):t.setAttribute(s,u),Bt(t)?Rt(t):Zm(n.removed)}catch{}}}Ft("afterSanitizeAttributes",t,null)},Gt=function t(e){let n=null;const r=Nt(e);for(Ft("beforeSanitizeShadowDOM",e,null);n=r.nextNode();)Ft("uponSanitizeShadowNode",n,null),!jt(n)&&(n.content instanceof s&&t(n.content),zt(n));Ft("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,a=null,c=null;if(vt=!t,vt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Ut(t)){if("function"!=typeof t.toString)throw ig("toString is not a function");if("string"!=typeof(t=t.toString()))throw ig("dirty is not a string, aborting")}if(!n.isSupported)return t;if(Q||Mt(e),n.removed=[],"string"==typeof t&&(st=!1),st){if(t.nodeName){const e=xt(t.nodeName);if(!U[e]||z[e])throw ig("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof l)r=It("\x3c!----\x3e"),o=r.ownerDocument.importNode(t,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!tt&&!q&&!K&&-1===t.indexOf("<"))return w&&nt?w.createHTML(t):t;if(r=It(t),!r)return tt?null:nt?E:""}r&&J&&Rt(r.firstChild);const u=Nt(st?t:r);for(;a=u.nextNode();)jt(a)||(a.content instanceof s&&Gt(a.content),zt(a));if(st)return t;if(tt){if(et)for(c=O.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(j.shadowroot||j.shadowrootmode)&&(c=M.call(i,c,!0)),c}let h=K?r.outerHTML:r.innerHTML;return K&&U["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&rg(Cg,r.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+h),q&&Ym([C,D,k],(t=>{h=Jm(h,t," ")})),w&&nt?w.createHTML(h):h},n.setConfig=function(){Mt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Q=!0},n.clearConfig=function(){Tt=null,Q=!1},n.isValidAttribute=function(t,e,n){Tt||Mt({});const r=xt(t),i=xt(e);return Ht(r,i,n)},n.addHook=function(t,e){"function"==typeof e&&(A[t]=A[t]||[],qm(A[t],e))},n.removeHook=function(t){if(A[t])return Zm(A[t])},n.removeHooks=function(t){A[t]&&(A[t]=[])},n.removeAllHooks=function(){A={}},n}();const Rg=t=>Lg.sanitize(t,{USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),Pg=t=>Lg.sanitize(t,{ALLOWED_TAGS:[]}),Ig=class t extends Nm{constructor(){super(...arguments),this.type="toolbar",this.renderType=P.HTML}init(){const t=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(R.Toolbar.SHOW_OVERFLOW_MENU,(()=>{this.renderOverflowMenu(),document.body.addEventListener("click",t)})),this.services.events.addEventListener(R.Toolbar.HIDE_OVERFLOW_MENU,(()=>{document.body.removeEventListener("click",t)}))}render(t=!0){const e=this.getComponentContainer({ariaLabel:"toolbar"}).attr("role","group");if(ac(this.getOptions(),"data","loading"))e.html(""),this.overflowMenu=null;else{this.overflowMenu||(this.overflowMenu=e.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:t,overflowMenuItemList:n}=this.getControlConfigs();n&&t.push(this.getOverflowButtonConfig());const r=e.selectAll("div.toolbar-control").data(t,(t=>t.id));r.exit().remove();const i=r.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu"),o=this;i.merge(r).classed("disabled",(t=>t.shouldBeDisabled())).attr("role","button").attr("aria-disabled",(t=>t.shouldBeDisabled())).attr("aria-label",(t=>t.title)).html((t=>`\n\t\t\t<button\n\t\t\t\tclass="cds--overflow-menu__trigger cds--overflow-menu__trigger"\n\t\t\t\taria-haspopup="true" aria-expanded="false" id="${this.services.domUtils.generateElementIDString(`control-${Pg(t.id)}`)}" aria-label="${Pg(t.title)}">\n\t\t\t\t<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">\n\t\t\t\t\t${(t=>Lg.sanitize(t,{NAMESPACE:"http://www.w3.org/2000/svg",USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}))(t.iconSVG.content)}\n\t\t\t\t</svg>\n\t\t\t</button>`)).each((function(t,e){xu(this).select("svg").style("pointer-events","none").style("will-change","transform").style("width",void 0!==t.iconSVG.width?t.iconSVG.width:"20px").style("height",void 0!==t.iconSVG.height?t.iconSVG.height:"20px"),xu(this).select("button").on("mouseover focus",(function(e){const n=xu(this);n.classed("hovered",!0),o.services.events.dispatchEvent(R.Toolbar.SHOW_TOOLTIP,{event:e,hoveredElement:n,content:t.title,noWrap:!0,placements:["top","bottom"]})})).on("mouseout blur",(function(){o.services.events.dispatchEvent(R.Toolbar.HIDE_TOOLTIP)})).on("click",(e=>{t.shouldBeDisabled()||o.triggerFunctionAndEvent(t,e,this)})).on("keydown",(n=>{n.key&&"Enter"===n.key||" "===n.key?(n.preventDefault(),o.triggerFunctionAndEvent(t,n,this)):n.key&&"ArrowLeft"===n.key?o.focusOnPreviousEnabledToolbarItem(e):n.key&&"ArrowRight"===n.key&&o.focusOnNextEnabledToolbarItem(e)}))})),this.overflowButton=this.getComponentContainer().select(`button.cds--overflow-menu__trigger#${this.services.domUtils.generateElementIDString("control-toolbar-overflow-menu")}`)}}renderOverflowMenu(){const{overflowMenuItemList:t}=this.getControlConfigs(),e=this.overflowMenu.select("ul").selectAll("li.cds--overflow-menu-options__option").data(t,(t=>ac(t,"id")));e.exit().remove();const n=e.enter().append("li").attr("id",(t=>this.services.domUtils.generateElementIDString(`control-${t.id}`))).attr("class","cds--overflow-menu-options__option cds--overflow-menu-options__option").attr("role","menuitem").attr("tabindex",1);n.append("button").attr("class","cds--overflow-menu-options__btn cds--overflow-menu-options__btn"),n.merge(e).classed("cds--overflow-menu-options__option--disabled",(t=>t.shouldBeDisabled())).classed("cds--overflow-menu-options__option--disabled",(t=>t.shouldBeDisabled())).attr("aria-disabled",(t=>t.shouldBeDisabled())).selectAll("button").text((t=>t.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),xu(this.overflowButton.node().parentNode).classed("cds--overflow-menu--open",t).classed("cds--overflow-menu--open",t)),t?this.services.events.dispatchEvent(R.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(R.Toolbar.HIDE_OVERFLOW_MENU))}focusOnPreviousEnabledToolbarItem(t){const e=this.getToolbarButtonItems();let n=e.length;for(let r=t-1;r>=0;r--)if(!e[r].shouldBeDisabled()){n=r;break}if(n<e.length){const t=xu(`button#${this.services.domUtils.generateElementIDString(`control-${e[n].id}`)}`).node();"focus"in t&&t.focus()}}focusOnNextEnabledToolbarItem(t){const e=this.getToolbarButtonItems();let n=-1;for(let r=t+1;r<e.length;r++)if(!e[r].shouldBeDisabled()){n=r;break}if(n>-1){const t=xu(`button#${this.services.domUtils.generateElementIDString(`control-${e[n].id}`)}`).node();"focus"in t&&t.focus()}}focusOnPreviousEnabledMenuItem(t){const e=this.getOverflowMenuItems();let n=e.length;for(let r=t-1;r>=0;r--)if(!e[r].shouldBeDisabled()){n=r;break}if(n<e.length){const t=xu(`#${this.services.domUtils.generateElementIDString(`control-${e[n].id}`)} button`).node();"focus"in t&&t.focus()}}focusOnNextEnabledMenuItem(t){const e=this.getOverflowMenuItems();let n=-1;for(let r=t+1;r<e.length;r++)if(!e[r].shouldBeDisabled()){n=r;break}if(n>-1){const t=xu(`#${this.services.domUtils.generateElementIDString(`control-${e[n].id}`)} button`).node();"focus"in t&&t.focus()}}toggleOverflowMenu(t){if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);const e=this;this.getOverflowMenuItems().forEach(((n,r)=>{const i=xu(`#${this.services.domUtils.generateElementIDString(`control-${n.id}`)}`);null!==i&&(i.on("click",(()=>{e.triggerFunctionAndEvent(n,t,i.node()),e.updateOverflowMenu(!1)})),i.on("keydown",(o=>{o&&"Enter"===o.key?e.triggerFunctionAndEvent(n,t,i.node()):o&&"ArrowUp"===o.key?e.focusOnPreviousEnabledMenuItem(r):o&&"ArrowDown"===o.key?e.focusOnNextEnabledMenuItem(r):o&&"Escape"===o.key&&e.updateOverflowMenu(!1),o.preventDefault()})))})),e.focusOnNextEnabledMenuItem(-1)}t&&t.stopImmediatePropagation()}triggerFunctionAndEvent(t,e,n){"function"==typeof t.shouldBeDisabled&&t.shouldBeDisabled()||("function"==typeof t.clickFunction&&t.clickFunction(e),this.services.events.dispatchEvent(R.Toolbar.BUTTON_CLICK,{control:t,event:e,element:n}))}getControlConfigs(){const e=ac(this.getOptions(),"toolbar","numberOfIcons")-1,n=ac(this.getOptions(),"toolbar","controls"),r=[],i=[],o=[];return n.forEach((n=>{let s=null;if(n.type===J.CUSTOM)null===ac(n,"id")&&(n.id="toolbar-button-"+t.buttonID++),null===ac(n,"shouldBeDisabled")&&(n.shouldBeDisabled=()=>!1),s=n;else{const t=this.services.domUtils.isFullScreenMode();n.type===J.MAKE_FULLSCREEN&&t?n.type=J.EXIT_FULLSCREEN:n.type===J.EXIT_FULLSCREEN&&!t&&(n.type=J.MAKE_FULLSCREEN),s=this.getControlConfigByType(n.type)}s&&(s.text=n.text?n.text:n.type,-1!==s.id.indexOf("toolbar-export")?r.push(s):i.length<e?null===ac(s,"iconSVG","content")?o.push(s):i.push(s):o.push(s))})),o.push(...r),o.length?{buttonList:i,overflowMenuItemList:o}:{buttonList:i}}getToolbarButtonItems(){const{buttonList:t,overflowMenuItemList:e}=this.getControlConfigs();return e&&t.push(this.getOverflowButtonConfig()),t||[]}getOverflowMenuItems(){const{overflowMenuItemList:t}=this.getControlConfigs();return t||[]}getOverflowButtonConfig(){const{moreOptions:t}=ac(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>\n\t\t\t\t<circle cx="16" cy="16" r="2"></circle>\n\t\t\t\t<circle cx="16" cy="24" r="2"></circle>'},clickFunction:t=>this.toggleOverflowMenu(t)}}getControlConfigByType(t){const e=this.services.zoom&&this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState(),n=this.model.getDisplayData(),r=this.model.getOptions(),{exportAsCSV:i,exportAsJPG:o,exportAsPNG:s,zoomIn:a,zoomOut:l,resetZoom:c,makeFullScreen:u,exitFullScreen:h,showAsTable:d}=ac(r,"locale","translations","toolbar");let f;switch(t){case J.ZOOM_IN:e&&(f={id:"toolbar-zoomIn",title:a,shouldBeDisabled:()=>this.services.zoom.isMinZoomDomain(),iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.zoom.zoomIn()});break;case J.ZOOM_OUT:e&&(f={id:"toolbar-zoomOut",title:l,shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.zoom.zoomOut()});break;case J.RESET_ZOOM:e&&(f={id:"toolbar-resetZoom",title:c,shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.zoom.resetZoomDomain()});break;case J.MAKE_FULLSCREEN:f={id:"toolbar-makefullscreen",iconSVG:{content:this.getControlIconByType(t),width:"15px",height:"15px"},title:u,shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case J.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 J.SHOW_AS_DATATABLE:f={id:"toolbar-showasdatatable",iconSVG:{content:this.getControlIconByType(t)},title:d,shouldBeDisabled:()=>0===n.length,clickFunction:()=>this.services.events.dispatchEvent(R.Modal.SHOW)};break;case J.EXPORT_CSV:f={id:"toolbar-export-CSV",title:i,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.model.exportToCSV()};break;case J.EXPORT_PNG:f={id:"toolbar-export-PNG",title:s,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.domUtils.exportToPNG()};break;case J.EXPORT_JPG:f={id:"toolbar-export-JPG",title:o,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 J.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"/>\n\t\t\t\t\t\t<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 J.ZOOM_OUT:return'<rect x="9" y="13" width="10" height="2"/>\n\t\t\t\t\t\t<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 J.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 J.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 J.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 J.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 J.EXPORT_CSV:case J.EXPORT_JPG:case J.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)}}};Ig.buttonID=0;let Ng=Ig;const Bg=class t extends Nm{constructor(e,n,r,i){super(e,n,i),this.type="layout",this.configs=i,this.children=r,this._instanceID=t.instanceID++,this.init()}init(){this.children.forEach((t=>{t.components.forEach((t=>{t.init()}))}))}getPreferedAndFixedSizeSum(){const t=this.parent;let e=0;return t.selectAll(`div.layout-child-${this._instanceID}`).filter((t=>{const e=ac(t,"growth");return e===Y.PREFERRED||e===Y.FIXED})).each((function(t){e+=t.size})),e}getNumOfStretchChildren(){return this.parent.selectAll(`div.layout-child-${this._instanceID}`).filter((t=>ac(t,"growth")===Y.STRETCH)).size()}render(t=!0){const e=this.model.getOptions(),n=this.parent,{width:r,height:i}=Nf.getHTMLElementSize(n.node()),o=this.configs.direction===W.ROW||this.configs.direction===W.ROW_REVERSE,s=ac(this.model.getOptions(),"style","prefix"),a=n.classed(`${sl}--${s}--layout-row`,this.configs.direction===W.ROW).classed(`${sl}--${s}--layout-row-reverse`,this.configs.direction===W.ROW_REVERSE).classed(`${sl}--${s}--layout-column`,this.configs.direction===W.COLUMN).classed(`${sl}--${s}--layout-column-reverse`,this.configs.direction===W.COLUMN_REVERSE).classed(`${sl}--${s}--layout-alignitems-center`,this.configs.alignItems===Z.CENTER).selectAll(`div.layout-child-${this._instanceID}`).data(this.children,(t=>t.id));a.enter().append("div").merge(n.selectAll(`div.layout-child-${this._instanceID}`)).attr("class",(t=>`layout-child layout-child-${this._instanceID} ${t.id}`)).each((function(n){n.components.forEach((r=>{var i;const o=xu(this),s=ac(n,"renderType")===P.SVG;r.setParent(s?Nf.appendOrSelect(o,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):o),s&&!o.select("svg.layout-svg-wrapper").attr("aria-label")&&o.select("svg.layout-svg-wrapper").attr("aria-label",(null==(i=null==e?void 0:e.accessibility)?void 0:i.svgAriaLabel)||(null==e?void 0:e.title));const a=ac(n,"growth");(a===Y.PREFERRED||a===Y.FIXED)&&r.render(t)}))})),n.selectAll(`div.layout-child-${this._instanceID}`).style("height",null).style("width",null).each((function(t){const e=ac(t,"growth"),n=ac(t,"renderType")===P.SVG?Nf.getSVGElementSize(xu(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):Nf.getHTMLElementSize(this);if(e===Y.PREFERRED){const e=o?n.width:n.height,s=o?r:i;t.size=e/s*100}})),a.exit().remove(),this.children.filter((t=>ac(t,"growth")===Y.STRETCH)).forEach((t=>{t.size=(100-+this.getPreferedAndFixedSizeSum())/+this.getNumOfStretchChildren()}));const l=n.selectAll(`div.layout-child-${this._instanceID}`).data(this.children,(t=>t.id));o?l.style("width",(t=>t.size/100*r+"px")).style("height","100%"):l.style("height",(t=>t.size/100*i+"px")).style("width","100%"),l.each((function(e){e.components.forEach((n=>{ac(e,"growth")===Y.STRETCH&&n.render(t)}))}))}setModel(t){super.setModel(t),this.children.forEach((e=>{e.components.forEach((e=>e.setModel(t)))}))}setServices(t){super.setServices(t),this.children.forEach((e=>{e.components.forEach((e=>e.setServices(t)))}))}destroy(){this.children.forEach((t=>{t.components.forEach((t=>t.destroy()))}))}};Bg.instanceID=Math.floor(99999999999*Math.random());let Ug=Bg;class Fg extends Nm{constructor(){super(...arguments),this.type="spacer"}render(t=!1){this.getComponentContainer({isPresentational:!0}).style("width",`${this.configs.size||gl}px`).style("height",`${this.configs.size||gl}px`).attr("opacity",0)}}var jg="bx",Hg="\n a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n textarea:not([disabled]):not([tabindex='-1']),\n iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]\n ";function $g(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function zg(t){return t.reduce((function(t,e){return Array.isArray(e)?t.push.apply(t,function(t){return function(t){if(Array.isArray(t))return $g(t)}(t)||function(t){if(typeof Symbol<"u"&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return $g(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $g(t,e)}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(zg(e))):t.push(e),t}),[])}function Gg(t){return(Gg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Vg(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Wg(t,e){return(Wg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Yg(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Zg(t){return(Zg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function qg(t){return(qg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Xg(){return Xg=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Qg(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Xg.apply(this,arguments)}function Kg(t,e){return(Kg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Qg(t){return(Qg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Jg(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return t.addEventListener.apply(t,n),{release:function(){return t.removeEventListener.apply(t,n),null}}}function ty(t){return(ty="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ey(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ny(t,e){return(ny=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ry(t){return(ry=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function iy(t,e){var n=t.target,r=t.currentTarget;if("function"==typeof n.matches){if(n.matches(e))return n;if(n.matches("".concat(e," *"))){var i=n.closest(e);if((r.nodeType===Node.DOCUMENT_NODE?r.documentElement:r).contains(i))return i}}}function oy(t){if(!t||"function"==typeof t)return{launchingElement:null,launchingEvent:null};var e=t.delegateTarget||t.currentTarget||t,n=t.currentTarget&&t;if(e&&!e.nodeType)throw new TypeError("DOM Node should be given for launching element.");if(n&&!n.type)throw new TypeError("DOM event should be given for launching event.");return{launchingElement:e,launchingEvent:n}}function sy(t){return(sy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ay(t,e){return(ay=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ly(t){return(ly=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var cy=[function(t){var e=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ny(t,e)}(n,t);var e=function(t){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=ry(t);if(e){var i=ry(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===ty(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),e.apply(this,arguments)}return function(t,e){e&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1})}(n,[{key:"_changeState",value:function(){throw new Error("_changeState() should be overridden to perform actual change in state.")}},{key:"changeState",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i="string"==typeof n[0]?n.shift():void 0,o=Object(n[0])===n[0]&&"function"!=typeof n[0]?n.shift():void 0,s="function"==typeof n[0]?n.shift():void 0;if("function"!=typeof this.shouldStateBeChanged||this.shouldStateBeChanged(i,o)){var a={group:o&&o.group,state:i},l=[a.group,i].filter(Boolean).join("-").split("-").map((function(t){return t[0].toUpperCase()+t.substr(1)})).join(""),c=new CustomEvent(this.options["eventBefore".concat(l)],{bubbles:!0,cancelable:!0,detail:o}),u=o&&o.delegatorNode||this.element;if(u.dispatchEvent(c)){var h=[i,o].filter(Boolean);this._changeState.apply(this,function(t){return function(t){if(Array.isArray(t))return ey(t)}(t)||function(t){if(typeof Symbol<"u"&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ey(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ey(t,e)}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(h).concat([function(){u.dispatchEvent(new CustomEvent(t.options["eventAfter".concat(l)],{bubbles:!0,cancelable:!0,detail:o})),s&&s()}]))}else if(s){var d=new Error("Changing state (".concat(JSON.stringify(a),") has been canceled."));d.canceled=!0,s(d)}}else s&&s(null,!0)}}]),n}(t);return e},function(t){var e=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ay(t,e)}(n,t);var e=function(t){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=ly(t);if(e){var i=ly(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===sy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),e.apply(this,arguments)}return function(t,e){e&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1})}(n,[{key:"show",value:function(t,e){(!t||"function"==typeof t)&&(e=t),this.changeState("shown",oy(t),e)}},{key:"hide",value:function(t,e){(!t||"function"==typeof t)&&(e=t),this.changeState("hidden",oy(t),e)}}]),n}(t);return e}];function uy(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var n=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})})),n}function hy(t){return(hy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function dy(t,e){return(dy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function fy(t){return(fy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function py(t){return(py="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function my(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function gy(t,e){return(gy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function yy(t){return(yy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var vy,_y,by=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gy(t,e)}(n,t);var e=function(t){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=yy(t);if(e){var i=yy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===py(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}(n);function n(t,r){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(i=e.call(this,t,r))._handleFocusinListener=void 0,i._handleKeydownListener=void 0,i._handleFocusin=function(t){var e=i.element.querySelector(i.options.selectorModalContainer)||i.element;i.element.classList.contains(i.options.classVisible)&&!e.contains(t.target)&&i.options.selectorsFloatingMenus.every((function(e){return!iy(t,e)}))&&i.element.querySelector(Hg).focus()},i._hookCloseActions(),i}return function(t,e,n){e&&my(t.prototype,e),n&&my(t,n),Object.defineProperty(t,"prototype",{writable:!1})}(n,[{key:"createdByLauncher",value:function(t){this.show(t)}},{key:"shouldStateBeChanged",value:function(t){return"shown"===t?!this.element.classList.contains(this.options.classVisible):this.element.classList.contains(this.options.classVisible)}},{key:"_changeState",value:function(t,e,n){var r,i=this;if(this._handleFocusinListener&&(this._handleFocusinListener=this.unmanage(this._handleFocusinListener).release()),"shown"===t){var o="onfocusin"in this.element.ownerDocument.defaultView,s=o?"focusin":"focus";this._handleFocusinListener=this.manage(Jg(this.element.ownerDocument,s,this._handleFocusin,!o))}"hidden"===t?(this.element.classList.toggle(this.options.classVisible,!1),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!1),(this.options.selectorFocusOnClose||this.previouslyFocusedNode)&&(this.element.ownerDocument.querySelector(this.options.selectorFocusOnClose)||this.previouslyFocusedNode).focus()):"shown"===t&&(this.element.classList.toggle(this.options.classVisible,!0),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!0)),r=this.manage(Jg(this.element,"transitionend",(function(){r&&(r=i.unmanage(r).release()),"shown"===t&&i.element.offsetWidth>0&&i.element.offsetHeight>0&&(i.previouslyFocusedNode=i.element.ownerDocument.activeElement,(i.element.querySelector(i.options.selectorPrimaryFocus)||i.element.querySelector(Hg)).focus()),n()})))}},{key:"_hookCloseActions",value:function(){var t=this;this.manage(Jg(this.element,"click",(function(e){var n=iy(e,t.options.selectorModalClose);n&&(e.delegateTarget=n),(n||e.target===t.element)&&t.hide(e)}))),this._handleKeydownListener&&(this._handleKeydownListener=this.unmanage(this._handleKeydownListener).release()),this._handleKeydownListener=this.manage(Jg(this.element.ownerDocument.body,"keydown",(function(e){27===e.which&&t.shouldStateBeChanged("hidden")&&(e.stopPropagation(),t.hide(e))})))}}],[{key:"options",get:function(){var t=jg;return{selectorInit:"[data-modal]",selectorModalClose:"[data-modal-close]",selectorPrimaryFocus:"[data-modal-primary-focus]",selectorsFloatingMenus:[".".concat(t,"--overflow-menu-options"),".".concat(t,"--tooltip"),".flatpickr-calendar"],selectorModalContainer:".".concat(t,"--modal-container"),classVisible:"is-visible",classBody:"".concat(t,"--body--with-modal-open"),attribInitTarget:"data-modal-target",initEventNames:["click"],eventBeforeShown:"modal-beingshown",eventAfterShown:"modal-shown",eventBeforeHidden:"modal-beinghidden",eventAfterHidden:"modal-hidden"}}}]),n.components=new WeakMap,n}(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return zg(e).reduce((function(t,e){return e(t)}),function(){return function(t){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}))}())}((function(t){var e=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wg(t,e)}(n,t);var e=function(t){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Zg(t);if(e){var i=Zg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Gg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Yg(t)}(this,n)}}(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(r=e.call(this,t,i)).children=[],!t||t.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");return r.element=t,r.options=Object.assign(Object.create(r.constructor.options),i),r.constructor.components.set(r.element,Yg(r)),r}return function(t,e,n){e&&Vg(t.prototype,e),n&&Vg(t,n),Object.defineProperty(t,"prototype",{writable:!1})}(n,[{key:"release",value:function(){for(var t=this.children.pop();t;t=this.children.pop())t.release();return this.constructor.components.delete(this.element),null}}],[{key:"create",value:function(t,e){return this.components.get(t)||new this(t,e)}}]),n}(t);return e}),(function(t){var e=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dy(t,e)}(n,t);var e=function(t){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=fy(t);if(e){var i=fy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===hy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),e.apply(this,arguments)}return function(t,e,n){n&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(t,n),Object.defineProperty(t,"prototype",{writable:!1})}(n,0,[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.assign(Object.create(this.options),n);if(!e||e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.DOCUMENT_NODE)throw new TypeError("DOM document or DOM element should be given to search for and initialize this widget.");if(e.nodeType!==Node.ELEMENT_NODE||!e.matches(r.selectorInit)){var i=r.initEventNames.map((function(i){return Jg(e,i,(function(e){var i=iy(e,"[".concat(r.attribInitTarget,"]"));if(i){e.delegateTarget=i;var o=i.ownerDocument.querySelectorAll(i.getAttribute(r.attribInitTarget));if(o.length>1)throw new Error("Target widget must be unique.");if(1===o.length){"A"===i.tagName&&e.preventDefault();var s=t.create(o[0],n);"function"==typeof s.createdByLauncher&&s.createdByLauncher(e)}}}))}));return{release:function(){for(var t=i.pop();t;t=i.pop())t.release()}}}return this.create(e,n),""}}]),n.forLazyInit=!0,n}(t);return e}),cy,(function(t){var e=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kg(t,e)}(n,t);var e=function(t){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Qg(t);if(e){var i=Qg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===qg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}(n);function n(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(t=e.call.apply(e,[this].concat(i))).handles=new Set,t}return function(t,e){e&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1})}(n,[{key:"manage",value:function(t){return this.handles.add(t),t}},{key:"unmanage",value:function(t){return this.handles.delete(t),t}},{key:"release",value:function(){var t=this;return this.handles.forEach((function(e){e.release(),t.handles.delete(e)})),Xg(Qg(n.prototype),"release",this).call(this)}}]),n}(t);return e})));class wy extends Nm{constructor(t,e,n){super(t,e,n),this.type="modal",this.isEventListenerAdded=!1,this.handleShowModal=()=>{const t=this.services.domUtils.getChartID();this.modal.attr("data-modal",!0).attr("class","cds--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby",`${t}__modal-title`).attr("aria-describedby",`${t}__modal-description`).attr("tabindex",-1),this.modal.html(this.getModalHTML()),this.modal.select("div.cds--modal-footer button.cds--btn").on("click",(()=>this.model.exportToCSV())),by.create(this.modal.node()).show(),document.addEventListener("modal-hidden",this.handleHideModal)},this.handleHideModal=()=>{this.modal.attr("role",null).attr("aria-modal",null).attr("aria-labelledby",null).attr("aria-describedby",null).attr("tabindex",null),document.removeEventListener("modal-hidden",this.handleHideModal)},this.init()}addEventListeners(){this.services.events.addEventListener(R.Modal.SHOW,this.handleShowModal)}removeEventListeners(){this.services.events.removeEventListener(R.Modal.SHOW,this.handleShowModal)}getModalHTML(){const t=this.services.domUtils.getChartID(),e=this.model.getOptions(),{title:n,downloadAsCSV:r}=ac(e,"locale","translations","tabularRep"),i=ac(e,"style","prefix"),o=this.model.getTabularDataArray();return`\n\t\t<div class="cds--modal-container">\n\t\t\t<div class="cds--modal-header">\n\n\t\t\t\t<p class="cds--modal-header__label cds--type-delta" id="modal-title">${n}</p>\n\n\t\t\t\t<p class="cds--modal-header__heading cds--type-beta" id="${t}__modal-description">${Pg(e.title)}</p>\n\n\t\t\t\t<button class="cds--modal-close" type="button" data-modal-close aria-label="close modal" data-modal-primary-focus>\n\t\t\t\t\t<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">\n\t\t\t\t\t\t<path d="M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"></path>\n\t\t\t\t\t</svg>\n\t\t\t\t</button>\n\t\t\t</div>\n\n\t\t\t<div class="cds--modal-content">\n\t\t\t\t<table class="cds--data-table cds--data-table--no-border">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t${bn(o,0).map((t=>`<th scope="col">\n\t\t\t\t\t\t\t\t<div class="cds--table-header-label">${Pg(t)}</div>\n\t\t\t\t\t\t\t</th>`)).join("")}\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\n\t\t\t\t\t<tbody>${o.slice(1).map((t=>`\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t${t.map((t=>`<td>${Pg(t)}</td>`)).join("")}\n\t\t\t\t\t\t\t</tr>`)).join("")}\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\n\t\t\t<div class="cds--modal-footer">\n\t\t\t <div class="${sl}--${i}-modal-footer-spacer"></div>\n\t\t\t <button class="cds--btn cds--btn--primary" type="button" data-modal-primary-focus>${r}</button>\n\t\t\t</div>\n\t\t</div>`}render(t=!1){const e=this.model.getOptions();if(!this.isEventListenerAdded){const t=xu(this.services.domUtils.getHolder()),n=ac(e,"style","prefix");this.modal=Nf.appendOrSelect(t,`div.${sl}--${n}--modal`),this.addEventListeners(),this.isEventListenerAdded=!0}}destroy(){this.removeEventListeners(),this.isEventListenerAdded=!1}}class Ey extends Nm{constructor(){super(...arguments),this.type="title",this.renderType=P.HTML}render(t=!1){const e=this.getComponentContainer(),n=ac(this.getOptions(),"title"),r=e.selectAll("p.title").data([n]);if(r.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(r).html((t=>Pg(t))),r.node()&&r.node().offsetWidth<r.node().scrollWidth){const t=this;r.on("mouseover",(function(e){t.services.events.dispatchEvent(R.Tooltip.SHOW,{event:e,hoveredElement:r,content:r.text()})})).on("mousemove",(function(e){t.services.events.dispatchEvent(R.Tooltip.MOVE,{event:e})})).on("mouseout",(function(){t.services.events.dispatchEvent(R.Tooltip.HIDE)}))}r.exit().remove()}truncateTitle(t,e){if(e<=0)return;const n=t.text();if(t.node().getComputedTextLength()>e){t.append("tspan").text("...");const r=Nf.appendOrSelect(t,"tspan").node().getComputedTextLength(),i=t.text(),o=this.getSubstringIndex(t.node(),0,i.length-1,e-r);t.html(i.substring(0,o-1)).append("tspan").text("...");const s=this;t.on("mouseover",(function(e){s.services.events.dispatchEvent(R.Tooltip.SHOW,{event:e,hoveredElement:t,content:n})})).on("mousemove",(function(t){s.services.events.dispatchEvent(R.Tooltip.MOVE,{event:t})})).on("mouseout",(function(){s.services.events.dispatchEvent(R.Tooltip.HIDE)}))}}getMaxTitleWidth(){return Nf.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width}getSubstringIndex(t,e,n,r){const i=Math.floor((n+e)/2);return t.getSubStringLength(0,i)>r?this.getSubstringIndex(t,e,i,r):t.getSubStringLength(0,i)<r?t.getSubStringLength(0,i+1)>r?i:this.getSubstringIndex(t,i,n,r):i}}class xy extends Nm{constructor(){super(...arguments),this.type="legend",this.renderType=P.HTML}render(t=!1){const e=this.getOptions(),n=ac(e,"legend"),r=ac(n,"alignment"),i=ac(e,"legend","orientation");let o=this.model.getDataGroups();const{DISABLED:s}=ml.items.status,a=o.some((t=>t.status===s)),l=ac(n,"order"),c=this.getComponentContainer().classed("center-aligned",r===z.CENTER).classed("right-aligned",r===z.RIGHT).classed(i,!0).classed("has-deactivated-items",a).attr("role",Yc.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");l&&(o=this.sortDataGroups(o,l));const u=c.selectAll("div.legend-item").data(o,(t=>t.name)),h=u.enter().append("div").attr("class","legend-item");h.merge(c.selectAll("div.legend-item")).classed("active",(function(t){return t.status===ml.items.status.ACTIVE}));const d=ac(this.getOptions(),"legend","clickable");c.classed("clickable",d&&o.length>1);const f=ml.checkbox.radius,p=h.append("div").classed("checkbox",!0),m=p.merge(u.select("div.checkbox")).attr("role",Yc.CHECKBOX).attr("tabindex",d?0:-1).attr("aria-labelledby",((t,e)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${e}-title`))).attr("aria-checked",(({status:t})=>t===ml.items.status.ACTIVE)).attr("width",2*f).attr("height",2*f).attr("class",(t=>this.model.getColorClassName({classNameTypes:[N.BACKGROUND],dataGroupName:t.name,originalClassName:"checkbox"}))).style("background",(t=>t.status===ml.items.status.ACTIVE?this.model.getFillColor(t.name)||this.model.getStrokeColor(t.name):null)).classed("active",(function(t){return t.status===ml.items.status.ACTIVE}));p.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(u.select("p"));const g=ac(e,"legend","additionalItems");if(g&&o.length){const t=this,e=c.selectAll("div.additional-item").data(g);e.exit().remove();const n=e.enter().append("div").merge(e).classed("legend-item",!0).classed("additional",!0).attr("aria-labelledby",((t,e)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${m.size()+e}-title`)));n.selectAll("*").remove();let r,i=1;n.append("svg").classed("icon",!0).each((function(e){const n=xu(this);r&&r==e.type?i++:(r=e.type,i=1),t.addAdditionalItem(n,e,i)})),n.append("p").merge(n.select("p")),this.truncateLegendText()}u.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),d&&h.size()>1&&this.addEventListeners()}sortDataGroups(t,e){if(t.sort(((t,n)=>e.indexOf(t.name)-e.indexOf(n.name))),e.length<t.length){const n=t.length-e.length;return t.slice(n).concat(t.slice(0,n))}return t}addAdditionalItem(t,e,n){const{width:r,height:i}=ml.area;if(e.type===et.RADIUS?t.style("width",`${i}px`).style("height",`${i}px`):t.style("width",`${r}px`).style("height",`${i}px`),e.type===et.RADIUS){const{iconData:n,fill:r,stroke:i}=ml.radius;t.attr("fill","none").selectAll("circle").data(n).enter().append("circle").classed("radius",!0).attr("role",Yc.IMG).attr("aria-label","radius").attr("cx",(t=>t.cx)).attr("cy",(t=>t.cy)).attr("r",(t=>t.r)).style("fill",e.fill?e.fill:r).style("stroke",e.stroke?e.stroke:i)}else if(e.type===et.LINE){const i=ml.line;t.select("line.line").empty()&&t.append("line").classed(`line-${n}`,!0).attr("role",Yc.IMG).attr("aria-label","line").attr("x1",0).attr("y1",i.yPosition).attr("x2",r).attr("y2",i.yPosition).style("stroke",e.stroke?e.stroke:i.stroke).style("stroke-width",i.strokeWidth)}else if(e.type===et.AREA)t.select("rect.area").empty()&&t.append("rect").classed(`area-${n}`,!0).attr("role",Yc.IMG).attr("aria-label","area").attr("width",r).attr("height",i).style("fill",n>3&&!e.fill?ml.area.fill:e.fill).style("stroke",e.stroke);else if(e.type===et.SIZE){const{iconData:n,fill:r,stroke:i}=ml.size;t.attr("fill","none").attr("role",Yc.IMG).attr("aria-label","size").selectAll("rect").data(n).enter().append("rect").classed("size",!0).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("y",(()=>0)).style("fill",e.fill?e.fill:r).style("stroke",e.stroke?e.stroke:i).style("stroke-width",1)}else if(e.type===et.QUARTILE){const{iconData:e}=ml.quartile;t.selectAll("rect").attr("role",Yc.IMG).attr("aria-label","quartile").data(e).enter().append("rect").attr("class",((t,e)=>"quartile-"+(0===e?"wrapper":"line"))).attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height))}else if(e.type===et.ZOOM){const{iconData:n,color:r}=ac(ml,"zoom"),i=t.attr("role",Yc.IMG).attr("aria-label","zoom").selectAll("g.icon").data(n).enter();i.append("g").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.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",(()=>e.color?e.color:r)),i.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",(()=>e.color?e.color:r))}}truncateLegendText(){const t=this.getComponentContainer(),e=ac(this.getOptions(),"legend","truncation"),n=ac(e,"type"),r=ac(e,"threshold"),i=ac(e,"numCharacter"),o=t.selectAll("div.legend-item p");o.attr("id",(function(){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")})),n!==F.NONE?o.html((function(t){const e=Pg(t.name);return e.length>r&&e.length!==i?oc(e,n,i):e})):o.html((t=>Pg(t.name)))}addEventListeners(){const t=this,e=this.getComponentContainer(),n=this.getOptions(),r=ac(n,"legend"),i=ac(r,"truncation");e.selectAll("div.legend-item").on("mouseover",(function(e){t.services.events.dispatchEvent(R.Legend.ITEM_HOVER,{hoveredElement:xu(this)});const n=xu(this);n.select("div.checkbox").classed("hovered",!0);const r=n.datum();r.name.length>i.threshold&&i.numCharacter<r.name.length&&i.type!==F.NONE&&t.services.events.dispatchEvent(R.Tooltip.SHOW,{event:e,hoveredElement:n,content:r.name})})).on("mousemove",(function(e){xu(this).datum().name.length>i.threshold&&i.type!==F.NONE&&t.services.events.dispatchEvent(R.Tooltip.MOVE,{event:e})})).on("click",(function(){t.services.events.dispatchEvent(R.Legend.ITEM_CLICK,{clickedElement:xu(this)});const e=xu(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){const e=xu(this);e.select("div.checkbox").classed("hovered",!1),e.datum().name.length>i.threshold&&i.type!==F.NONE&&t.services.events.dispatchEvent(R.Tooltip.HIDE),t.services.events.dispatchEvent(R.Legend.ITEM_MOUSEOUT,{hoveredElement:e})})),e.selectAll("div.legend-item div.checkbox").on("keyup",(function(e){e.key&&"Tab"===e.key&&t.services.events.dispatchEvent(R.Legend.ITEM_HOVER,{hoveredElement:xu(this)})})),e.selectAll("div.legend-item div.checkbox").on("keydown",(function(e,n){e.key&&" "===e.key?(e.preventDefault(),t.model.toggleDataLabel(n.name)):e.key&&"Tab"===e.key&&t.services.events.dispatchEvent(R.Legend.ITEM_MOUSEOUT,{hoveredElement:xu(this)})})),e.selectAll("g.additional-item").on("mouseover",(function(e){const n=xu(this),r=n.datum();r.name.length>i.threshold&&t.services.events.dispatchEvent(R.Tooltip.SHOW,{event:e,hoveredElement:n,content:r.name})}))}}class Ty extends Nm{constructor(t,e,n){super(t,e,n),this.type="chart-clip",this.renderType=P.SVG,this.chartClipId="chart-clip-id-"+Math.floor(99999999999*Math.random()),this.init()}init(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})}render(t=!0){this.createClipPath()}createClipPath(){const t=this.parent,{cartesianScales:e}=this.services;if(!e)throw new Error("Service cartesianScales was undefined");const n=e.getMainXScale(),r=e.getMainYScale(),[i,o]=n.range(),[s,a]=r.range();if(!t)throw new Error("svg is undefined");this.chartClipPath=Nf.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const l=Nf.appendOrSelect(this.chartClipPath,`rect.${this.type}`);o-i>0&&l.attr("x",i).attr("y",a).attr("width",o-i).attr("height",s-a),this.chartClipPath.merge(l).lower()}}class Oy extends Ty{constructor(){super(...arguments),this.type="canvas-chart-clip",this.chartClipId="canvas-chart-clip-id-"+Math.floor(99999999999*Math.random())}createClipPath(){const t=this.parent,{width:e,height:n}=Nf.getSVGElementSize(this.parent,{useAttrs:!0});this.chartClipPath=Nf.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const r=Nf.appendOrSelect(this.chartClipPath,`rect.${this.type}`);r.attr("x",0).attr("y",0).attr("width",e).attr("height",n),this.chartClipPath.merge(r).lower()}}!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(_y||(_y={}));var Sy=((vy={})[_y.LEFT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left-e.offsetWidth)}},vy[_y.RIGHT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left+n.width)}},vy[_y.TOP]=function(t,e,n){return{top:Math.round(t.top-e.offsetHeight),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},vy[_y.BOTTOM]=function(t,e,n){return{top:Math.round(t.top+n.height),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},vy),My=typeof window<"u"?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},Ay=function(){function t(t){void 0===t&&(t={}),this.positions=Sy,this.positions=Object.assign({},Sy,t)}return t.prototype.getRelativeOffset=function(t){for(var e={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&"static"===getComputedStyle(t.offsetParent).position;)e.left+=t.offsetLeft,e.top+=t.offsetTop,t=t.offsetParent;return e},t.prototype.getAbsoluteOffset=function(t){for(var e=t,n={top:0,left:0};e.offsetParent;){var r=getComputedStyle(e.offsetParent);"static"===r.position&&r.marginLeft&&r.marginTop&&(parseInt(r.marginTop,10)&&(n.top+=parseInt(r.marginTop,10)),parseInt(r.marginLeft,10)&&(n.left+=parseInt(r.marginLeft,10))),e=e.offsetParent}var i=t.getBoundingClientRect(),o=document.body.getBoundingClientRect();return{top:i.top-o.top+n.top,left:i.left-o.left+n.left}},t.prototype.findRelative=function(t,e,n){var r=this.getRelativeOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findAbsolute=function(t,e,n){var r=this.getAbsoluteOffset(t),i=t.getBoundingClientRect();return this.calculatePosition(r,i,e,n)},t.prototype.findPosition=function(t,e,n,r){void 0===r&&(r=this.getAbsoluteOffset.bind(this));var i=r(t),o=t.getBoundingClientRect();return this.calculatePosition(i,o,e,n)},t.prototype.findPositionAt=function(t,e,n){return this.calculatePosition(t,{top:0,left:0,height:0,width:0},e,n)},t.prototype.getPlacementBox=function(t,e){var n=t.offsetHeight+e.top,r=t.offsetWidth+e.left;return{top:e.top,bottom:n,left:e.left,right:r}},t.prototype.addOffset=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Object.assign({},t,{top:t.top+e,left:t.left+n})},t.prototype.setElement=function(t,e){t.style.top=e.top+"px",t.style.left=e.left+"px"},t.prototype.findBestPlacement=function(t,e,n,r,i){var o=this;void 0===r&&(r=this.defaultContainerFunction.bind(this)),void 0===i&&(i=this.findPosition.bind(this));var s=n.map((function(n){var s=i(t,e,n),a=o.getPlacementBox(e,s),l=0,c=0,u=r();a.top<u.top?l=u.top-a.top:a.bottom>u.height&&(l=a.bottom-u.height),a.left<u.left?c=u.left-a.left:a.right>u.width&&(c=a.right-u.width),l&&!c?c=1:c&&!l&&(l=1);var h=e.offsetHeight*e.offsetWidth;return{placement:n,weight:(h-l*c)/h}}));return s.sort((function(t,e){return e.weight-t.weight})),s[0].placement},t.prototype.findBestPlacementAt=function(t,e,n,r){var i=this;return void 0===r&&(r=this.defaultContainerFunction.bind(this)),this.findBestPlacement(null,e,n,r,(function(e,n,r){return i.findPositionAt(t,n,r)}))},t.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:My.innerHeight,width:My.innerWidth}},t.prototype.calculatePosition=function(t,e,n,r){return this.positions[r]?this.positions[r](t,n,e):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},t}();new Ay;class Cy extends Nm{constructor(t,e,n){super(t,e,n),this.type="tooltip",this.renderType=P.HTML,this.isEventListenerAdded=!1,this.lastTriggeredEventType="",this.positionService=new Ay,this.handleShowTooltip=t=>{const e=t.detail.data||t.detail.items,n=xu(t.detail.event.target).datum();let r;const i=this.formatItems(this.getItems(t));r=t.detail.content?`<div class="title-tooltip"><p>${Rg(t.detail.content)}</p></div>`:Rg(this.getTooltipHTML(i));const o=Nf.appendOrSelect(this.tooltip,"div.content-box");if(ac(this.getOptions(),"tooltip","customHTML"))if(t.detail.content){const e=`<div class="title-tooltip"><p>${Rg(t.detail.content)}</p></div>`;o.html(e)}else o.html(`<div class="title-tooltip"><p>${Rg(this.model.getOptions().tooltip.customHTML(e,r,n))}</p></div>`);else o.html(r);o.selectAll(".datapoint-tooltip").each((function(t,e){const n=i[e];i[e]&&i[e].color&&xu(this).select(".tooltip-color").attr("class","tooltip-color").style("background-color",n.color)})),this.positionTooltip(t),this.tooltip.classed("hidden",!1).attr("aria-hidden",!1),this.lastTriggeredEventType=t.type},this.handleHideTooltip=()=>{this.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},this.init()}addTooltipEventListener(){this.services.events.addEventListener(R.Tooltip.MOVE,(t=>{this.lastTriggeredEventType!==R.Toolbar.SHOW_TOOLTIP&&!1===this.tooltip.classed("hidden")&&this.positionTooltip(t)})),this.services.events.addEventListener(R.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(R.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(R.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.addEventListener(R.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.addEventListener(R.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}removeTooltipEventListener(){this.services.events.removeEventListener(R.Tooltip.MOVE,null),this.services.events.removeEventListener(R.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(R.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(R.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.removeEventListener(R.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.removeEventListener(R.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}getItems(t){return t.detail.items?t.detail.items:[]}formatItems(t){const e=this.getOptions(),n=ac(e,"tooltip","truncation","type"),r=ac(e,"tooltip","truncation","threshold"),i=ac(e,"tooltip","truncation","numCharacter");return n!==F.NONE?t.map((t=>{const e=t.labelIcon?12:0;return t.value=t.value?this.valueFormatter(t.value,t.label):t.value,t.label&&t.label.length+e>r&&(t.label=oc(t.label,n,i)),t.value&&t.value.length>r&&(t.value=oc(t.value,n,i)),t})):t.map((t=>(t.value=t.value?this.valueFormatter(t.value,t.label):t.value,t)))}getTooltipHTML(t){return'<ul class="multi-tooltip">'+t.map((t=>`<li>\n\t\t\t\t\t<div class="datapoint-tooltip${t.bold?" bold":""}">\n\t\t\t\t\t\t${t.class||t.color?`<div class="tooltip-color ${t.class}"></div>`:""}\n\t\t\t\t\t\t<div class="label">\n\t\t\t\t\t\t<p>${t.label||""}</p>\n\t\t\t\t\t\t${t.labelIcon?`<span class="label-icon"/>${t.labelIcon}</span>`:""}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t${void 0===t.value||null===t.value?"":`<p class="value"/>${t.value}</p>`}\n\t\t\t\t\t</div>\n\t\t\t\t</li>`)).join("")+"</ul>"}isDate(t){return t instanceof Date}valueFormatter(t,e){const n=this.getOptions(),r=ac(n,"tooltip","valueFormatter"),{code:i,number:o,date:s}=ac(n,"locale");if(r)return r(t,e);if(this.isDate(t))return s(t,i,{month:"short",day:"numeric",year:"numeric"});try{if("string"==typeof t&&/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(t))return s(new Date(t),i,{month:"short",day:"numeric",year:"numeric"})}catch{}return o(t,i)}render(t=!1){const e=this.getOptions(),n=ac(e,"tooltip","enabled");if(n){const t=xu(this.services.domUtils.getHolder()),n=ac(e,"style","prefix");this.tooltip=Nf.appendOrSelect(t,`div.${sl}--${n}--tooltip`),this.tooltip.style("max-width",null).attr("role","tooltip"),this.isEventListenerAdded||(this.addTooltipEventListener(),this.isEventListenerAdded=!0),this.tooltip.classed("hidden",!0)}else!n&&this.isEventListenerAdded&&(this.removeTooltipEventListener(),this.isEventListenerAdded=!1)}addOffsetByPlacement(t,e,n){const r=Object.assign({},t);return e==_y.LEFT?r.left-=n:e==_y.RIGHT?r.left+=n:e==_y.TOP?r.top-=n:e==_y.BOTTOM&&(r.top+=n),r}positionTooltip(t){const e=this.services.domUtils.getHolder(),n=e.offsetWidth,r=e.offsetHeight,i=this.tooltip.node(),o=this.getOptions(),s=ac(o,"zoomBar","top","enabled"),a=!!ac(t,"detail","noWrap"),l=Array.isArray(ac(t,"detail","placements")),c=l?ac(t,"detail","placements"):[_y.RIGHT,_y.LEFT,_y.TOP,_y.BOTTOM];let u,{horizontalOffset:h}=yl;const{defaultOffset:d}=yl;if(this.tooltip.select("div.title-tooltip").classed("title-tooltip-nowrap",a),l){const e=ac(t,"detail","event","target"),o=this.services.domUtils.getElementOffset(e,!0);u=this.positionService.findBestPlacementAt(o,i,c,(()=>({top:0,left:0,width:n,height:r})));let s=this.positionService.findPosition(e,i,u,(()=>this.services.domUtils.getElementOffset(e)));return s=this.addOffsetByPlacement(s,u,d),void this.positionService.setElement(i,s)}let f=ac(t,"detail","mousePosition");if(f){const t=ac(o,"zoomBar","top","type"),e=_l.height[t];s&&(f[1]+=e+_l.spacerHeight)}else f=Po(ac(t,"detail","event"),e);u=f[0]/n>.9?_y.LEFT:f[0]/n<.1?_y.RIGHT:this.positionService.findBestPlacementAt({left:f[0],top:f[1]},i,c,(()=>({top:void 0,left:void 0,width:n,height:r}))),u===_y.LEFT&&(h*=-1);const p=this.positionService.findPositionAt({left:f[0]+h,top:f[1]},i,u);this.positionService.setElement(i,p)}}const Dy=class t extends Nm{constructor(){super(...arguments),this.type="grid-brush",this.renderType=P.SVG,this.selectionSelector="rect.selection",this.frontSelectionSelector="rect.frontSelection"}render(e=!0){const n=this.parent,r=this.getComponentContainer({isPresentational:!0});if(!n)throw new Error("SVG was not defined");const i=Nf.appendOrSelect(n,"svg.chart-grid-backdrop"),o=Nf.appendOrSelect(i,`g.${this.type}`),s=Nf.appendOrSelect(o,this.selectionSelector),{width:a,height:l}=Nf.getSVGElementSize(i,{useAttrs:!0}),{cartesianScales:c}=this.services,u=c.getMainXScaleType(),h=c.getMainXScale(),[d]=h.range();r.attr("transform",`translate(${d},0)`);const f=Nf.appendOrSelect(r,this.frontSelectionSelector);if(h&&u===H.TIME){let e=this.model.get("zoomDomain");void 0===e&&(e=this.services.zoom.getDefaultZoomBarDomain(),e&&this.model.set({zoomDomain:e},{animate:!1}));const n=e=>{const n=e[1]-e[0];let r="0,"+n.toString();const i=Math.floor(l/t.DASH_LENGTH),o=i*t.DASH_LENGTH;for(let e=0;e<i;e++)r+=","+t.DASH_LENGTH;r+=","+(l-o),i%2==1&&(r+=",0"),r+=","+n.toString(),r+=","+l.toString(),f.attr("stroke-dasharray",r)},r=t=>{const e=t.selection;null===e||e[0]===e[1]||(f.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),n(e))},c=(t,n)=>{const r=Ud().range([0,a]).domain(e);let i=[r.invert(t),r.invert(n)];i[0].valueOf()===i[1].valueOf()&&(i=this.services.zoom.getDefaultZoomBarDomain()),(e[0].valueOf()!==i[0].valueOf()||e[1].valueOf()!==i[1].valueOf())&&this.services.zoom.handleDomainChange(i)};let u;const h=t=>{const e=t.selection;null!==e&&(c(e[0],e[1]),o.call(u.move,null),f.style("display","none"))};0!=l&&0!=a&&(u=Jp().extent([[0,0],[a-1,l]]).on("start brush end",r).on("end.brushed",h),o.call(u));const d=this.services.zoom.getZoomRatio();i.on("click",(function(t){if(t.shiftKey){const t=this.services.domUtils.getHolder(),e=Po(o.node(),t)[0];let n=e-a*d/2;n<0&&(n=0);let r=e+a*d/2;r>a&&(r=a),c(n,r)}}))}}};Dy.DASH_LENGTH=4;let ky=Dy;class Ly extends Nm{constructor(){super(...arguments),this.type="zoom-bar",this.renderType=P.SVG,this.MIN_SELECTION_DIFF=9e-10,this.brushSelector="g.zoom-bar-brush",this.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),this.brush=Jp(),this.highlightStrokeWidth=1}init(){this.services.events.addEventListener(R.ZoomBar.UPDATE,this.render.bind(this));const t=ac(this.getOptions(),"zoomBar",B.TOP,"data");this.model.setZoomBarData(t)}render(t=!0){const e=this.getComponentContainer({ariaLabel:"zoom bar"}),n=this.services.zoom.isZoomBarLoading(B.TOP),r=this.services.zoom.isZoomBarLocked(B.TOP),i=ac(this.getOptions(),"zoomBar",B.TOP,"type"),o=ac(this.getOptions(),"axes",B.BOTTOM,"highlights"),s=_l.height[i],{width:a}=Nf.getSVGElementSize(this.parent,{useAttrs:!0});if(0===a)return;let l=0;const c=this.model.get("axesMargins");c&&c.left&&(l=c.left);const u=Nf.appendOrSelect(e,"svg.zoom-container").attr("width","100%").attr("height",s).attr("opacity",1);if(Nf.appendOrSelect(e,"rect.zoom-spacer").attr("x",0).attr("y",s).attr("width","100%").attr("height",_l.spacerHeight).attr("opacity",1).attr("fill","none"),i===U.GRAPH_VIEW?Nf.appendOrSelect(u,"rect.zoom-bg").attr("x",l).attr("y",0).attr("width",a-l).attr("height","100%").classed("zoom-bg-skeleton",n).style("stroke",n?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null):i===U.SLIDER_VIEW&&Nf.appendOrSelect(u,"rect.zoom-slider-bg").attr("x",l).attr("y",s/2-1).attr("width",a-l).attr("height",2).classed("zoom-slider-bg-skeleton",n).style("stroke",n?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null),n)return void this.renderSkeleton(u,l,a);const{cartesianScales:h}=this.services,d=h.getMainXScale(),f=h.getMainYScale(),p=h.getMainXScaleType();if(d&&p===H.TIME){let t=this.services.zoom.getZoomBarData();if(function(t){if(null==t)return!0;if(be(t)&&(Rt(t)||"string"==typeof t||"function"==typeof t.splice||ke(t)||Fe(t)||Me(t)))return!t.length;var e=or(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(Ee(t))return!Ve(t).length;for(var n in t)if(Zr.call(t,n))return!1;return!0}(t)||1===t.length)return;this.xScale=d.copy(),this.yScale=f.copy();const n=this.services.zoom.getDefaultZoomBarDomain(t);t=this.compensateDataForDefaultDomain(t,n);const c=this.model.get("initialZoomDomain"),h=ac(this.getOptions(),"zoomBar",B.TOP,"initialZoomDomain");h&&h[0]&&h[1]&&(h[0]=new Date(h[0]),h[1]=new Date(h[1])),!h||c&&c[0].valueOf()===h[0].valueOf()&&c[1].valueOf()===h[1].valueOf()?null===h&&null!==c&&this.model.set({initialZoomDomain:null,zoomDomain:qr([],n)},{skipUpdate:!0}):this.model.set({initialZoomDomain:qr([],h),zoomDomain:h?qr([],h):n},{skipUpdate:!0}),this.xScale.range([l,a]).domain(n),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,s-6]).domain(oi(t,(t=>t.value)));const p=this.model.get("zoomDomain");if(i===U.GRAPH_VIEW&&(this.renderZoomBarArea(u,"path.zoom-graph-area-unselected",t,null),this.updateClipPath(e,this.clipId,0,0,0,0),this.renderZoomBarArea(u,"path.zoom-graph-area",t,this.clipId),this.renderZoomBarBaseline(u,l,a),o)){const t=o.highlightStartMapsTo,e=o.highlightEndMapsTo,n=o.color,r=o.labelMapsTo;o.data.forEach(((i,o)=>{Nf.appendOrSelect(u,`rect.highlight-${o}`).attr("height",s-2*this.highlightStrokeWidth).attr("y",this.highlightStrokeWidth).attr("x",this.xScale(i[t])).attr("width",this.xScale(i[e])-this.xScale(i[t])).style("fill",n&&n.scale[i[r]]?n.scale[i[r]]:null).style("fill-opacity",.1).style("stroke",n&&n.scale[i[r]]?n.scale[i[r]]:null).style("stroke-dasharray","2, 2").attr("stroke-width","1px")}))}this.addBrushEventListener(p,l,a);const m=Nf.appendOrSelect(e,this.brushSelector).call(this.brush);if(void 0!==p)if(p[0].valueOf()===p[1].valueOf())m.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getComponentContainer(),this.xScale.range());else{const t=p.map((t=>this.xScale(t)));t[1]-t[0]<this.MIN_SELECTION_DIFF||(m.call(this.brush.move,t),this.updateBrushHandle(this.getComponentContainer(),t))}r&&(this.brush.filter((()=>!1)),m.selectAll("rect").attr("cursor","auto"))}}addBrushEventListener(t,e,n){const r=ac(this.getOptions(),"zoomBar",B.TOP,"type"),i=_l.height[r];this.brush.extent([[e,0],[n,i]]).on("start brush end",null).on("start brush end",(e=>{const n=e.selection;null===n?this.handleBrushedEvent(e,t,this.xScale,this.xScale.range()):n[0]===n[1]||this.handleBrushedEvent(e,t,this.xScale,n)}))}handleBrushedEvent(t,e,n,r){const i=[n.invert(r[0]),n.invert(r[1])];if(this.updateBrushHandle(this.getComponentContainer(),r),null!=t.sourceEvent&&("mousemove"===t.sourceEvent.type||"mouseup"===t.sourceEvent.type||"mousedown"===t.sourceEvent.type||"touchstart"===t.sourceEvent.type||"touchmove"===t.sourceEvent.type||"touchend"===t.sourceEvent.type)){let n;(void 0===e||e[0]!==i[0]||e[1]!==i[1])&&this.services.zoom.handleDomainChange(i,{dispatchEvent:!1}),"start"===t.type?n=R.ZoomBar.SELECTION_START:"brush"===t.type?n=R.ZoomBar.SELECTION_IN_PROGRESS:"end"===t.type&&(n=R.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(R.ZoomDomain.CHANGE,{newDomain:i})),this.services.events.dispatchEvent(n,{selection:r,newDomain:i})}}updateBrushHandle(t,e){const n=this,r=_l.handleWidth,i=ac(this.getOptions(),"zoomBar",B.TOP,"type"),o=_l.height[i],s=-r/2,a=_l.handleBarWidth,l=i===U.GRAPH_VIEW?_l.handleBarHeight:6,c=-a/2,u=(o-l)/2;t.select(this.brushSelector).selectAll("rect.handle").data([{type:"w"},{type:"e"}]).attr("x",(function(t){return"w"===t.type?Math.max(e[0]+s,n.maxSelectionRange[0]):"e"===t.type?Math.min(e[1]+s,n.maxSelectionRange[1]-r):void 0})).attr("y",0).attr("width",r).attr("height",o).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(t){return"handle-bar handle-bar--"+t.type})),h.attr("x",(function(t){return"w"===t.type?Math.max(e[0]+c,n.maxSelectionRange[0]-s+c):"e"===t.type?Math.min(e[1]+c,n.maxSelectionRange[1]+s+c):void 0})).attr("y",u).attr("width",a).attr("height",l).attr("cursor","ew-resize"),i===U.SLIDER_VIEW&&this.updateSliderSelectedArea(e),this.updateClipPath(t,this.clipId,e[0],0,e[1]-e[0],o)}updateSliderSelectedArea(t){const e=ac(this.getOptions(),"zoomBar",B.TOP,"type"),n=_l.height[e],r=this.getComponentContainer().select("svg.zoom-container");Nf.appendOrSelect(r,"rect.zoom-slider-selected-area").attr("x",t[0]).attr("y",n/2-1).attr("width",t[1]-t[0]).attr("height",2)}renderZoomBarArea(t,e,n,r){const{cartesianScales:i}=this.services,o=i.getMainXAxisPosition(),s=i.getMainYAxisPosition(),a=i.getMainXScaleType(),l=i.getMainYScaleType(),c=(t,e,n)=>r=>i.getValueFromScale(t,e,n,r),u=c(this.xScale,a,o),h=c(this.yScale,l,s),d=ac(this.getOptions(),"zoomBar",B.TOP,"type"),f=_l.height[d],p=Pm().x((t=>u(t))).y0(f).y1((t=>f-h(t))),m=Nf.appendOrSelect(t,e).datum(n).attr("d",p);r&&m.attr("clip-path",`url(#${r})`)}updateClipPath(t,e,n,r,i,o){const s=Nf.appendOrSelect(t,"clipPath").attr("id",e);Nf.appendOrSelect(s,"rect").attr("x",n).attr("y",r).attr("width",i).attr("height",o)}compensateDataForDefaultDomain(t,e){if(!t||t.length<2)return;const n=xr(t),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier();if(Number(e[0])<Number(n[0][r])){const t={};t[r]=e[0],t[i]=0,n.unshift(t)}if(Number(e[1])>Number(n[n.length-1][r])){const t={};t[r]=e[1],t[i]=0,n.push(t)}return n}renderZoomBarBaseline(t,e,n,r=!1){const i=ac(this.model.getOptions(),"zoomBar",B.TOP,"type"),o=_l.height[i],s=Rm()([[e,o],[n,o]]);Nf.appendOrSelect(t,"path.zoom-bg-baseline").attr("d",s).classed("zoom-bg-baseline-skeleton",r).style("stroke",r?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}renderSkeleton(t,e,n){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),Nf.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),ac(this.getOptions(),"zoomBar",B.TOP,"type")===U.GRAPH_VIEW&&this.renderZoomBarBaseline(t,e,n,!0)}destroy(){this.brush.on("start brush end",null),this.services.events.removeEventListener(R.ZoomBar.UPDATE,this.render.bind(this))}}class Ry extends Nm{constructor(t,e){super(t,e),this.type="threshold",this.renderType=P.SVG,this.positionService=new Ay}render(t=!1){const e=ac(this.getOptions(),"axes"),n=[];Object.keys(e).forEach((t=>{if(Object.values(B).includes(t)){const r=e[t];r.thresholds&&r.thresholds.length>0&&n.push({axisPosition:t,thresholds:r.thresholds,correspondingDatasets:null==r?void 0:r.correspondingDatasets,mapsTo:null==r?void 0:r.mapsTo})}}));const r=this.getComponentContainer({ariaLabel:"threshold lines",withinChartClip:!0}).selectAll("g.axis-thresholds").data(n,(t=>t.axisPosition));r.exit().attr("opacity",0).remove();const i=r.enter().append("g").merge(r);i.attr("class",(t=>`axis-thresholds ${t.axisPosition}`));const o=i.selectAll("g.threshold-group").data((t=>t.thresholds.map((e=>(e.axisPosition=t.axisPosition,e.datum=this.constructDatumObj(t,e),e)))));o.exit().attr("opacity",0).remove();const s=o.enter().append("g");s.append("line").attr("class","threshold-line"),s.append("rect").attr("class","threshold-hoverable-area"),s.merge(o).attr("class","threshold-group");const a=this;i.each((function({axisPosition:e}){const n=a.services.cartesianScales.getScaleByPosition(e),r=a.services.cartesianScales.getScaleTypeByPosition(e);let i=null,o=null;e===B.LEFT||e===B.RIGHT?(o=n,i=a.services.cartesianScales.getMainXScale()):(i=n,o=a.services.cartesianScales.getMainYScale());const s=r===H.LABELS,[l,c]=i.range(),[u,h]=o.range(),{cartesianScales:d}=a.services,f=d.getOrientation(),[p,m]=uc((t=>d.getDomainValue(t)),(t=>d.getRangeValue(t)),f),g=xu(this);e===B.TOP||e===B.BOTTOM?(g.selectAll("line.threshold-line").transition().call((e=>a.services.transitions.setupTransition({transition:e,name:"threshold-line-update",animate:t}))).attr("y1",h).attr("y2",u).attr("x1",(({datum:t})=>p(t)+(s?n.step()/2:0))).attr("x2",(({datum:t})=>p(t)+(s?n.step()/2:0))).style("stroke",(({fillColor:t})=>t)),g.selectAll("rect.threshold-hoverable-area").attr("x",0).attr("y",(({datum:t})=>-p(t))).attr("width",Math.abs(u-h)).classed("rotate",!0)):(g.selectAll("line.threshold-line").transition().call((e=>a.services.transitions.setupTransition({transition:e,name:"threshold-line-update",animate:t}))).attr("x1",l).attr("x2",c).attr("y1",(({datum:t})=>m(t)+(s?n.step()/2:0))).attr("y2",(({datum:t})=>m(t)+(s?n.step()/2:0))).style("stroke",(({fillColor:t})=>t)),g.selectAll("rect.threshold-hoverable-area").attr("x",l).attr("y",(({datum:t})=>m(t))).attr("width",Math.abs(c-l)).classed("rotate",!1))})),this.services.events.addEventListener(R.Threshold.SHOW,(t=>{this.setThresholdLabelPosition(t.detail),this.label.classed("hidden",!1)})),this.services.events.addEventListener(R.Threshold.HIDE,(()=>{this.label.classed("hidden",!0)})),this.appendThresholdLabel(),this.addEventListeners()}getFormattedValue(t){const{value:e,axisPosition:n}=t,r=this.getOptions(),i=this.services.cartesianScales.getScaleTypeByPosition(n),{code:o,number:s}=ac(r,"locale");if(i===H.TIME){const t=[B.LEFT,B.RIGHT].includes(n),i=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),s=t?o:i,a=ac(r,"timeScale"),l=zc(s.ticks(),ac(a,"timeInterval"));return Hc(e,0,s.ticks(),l,a,r.locale)}return s(e,o)}appendThresholdLabel(){const t=xu(this.services.domUtils.getHolder()),e=ac(this.getOptions(),"style","prefix");this.label=Nf.appendOrSelect(t,`div.${sl}--${e}--threshold--label`).classed("hidden",!0)}setThresholdLabelPosition({event:t,datum:e}){const n=this.services.domUtils.getHolder(),r=Po(t,n),i=e.valueFormatter?e.valueFormatter(e.value):this.getFormattedValue(e);this.label.html(Pg(`${e.label||"Threshold"}: ${i}`)).style("background-color",e.fillColor);const o=this.label.node(),s=this.positionService.findBestPlacementAt({left:r[0],top:r[1]},o,[_y.RIGHT,_y.LEFT,_y.TOP,_y.BOTTOM],(()=>({top:void 0,left:void 0,width:n.offsetWidth,height:n.offsetHeight}))),a=this.positionService.findPositionAt({left:r[0],top:r[1]},o,s);this.positionService.setElement(o,a)}constructDatumObj(t,e){const n={};return t.correspondingDatasets&&(n.group=ac(t,"correspondingDatasets",0)),n[t.mapsTo]=e.value,n}addEventListeners(){const t=this;this.getComponentContainer({withinChartClip:!0}).selectAll("rect.threshold-hoverable-area").on("mouseover mousemove",(function(e){xu(this.parentNode).select("line.threshold-line").classed("active",!0),t.services.events.dispatchEvent(R.Threshold.SHOW,{event:e,hoveredElement:xu(this),datum:xu(this).datum()})})).on("mouseout",(function(e){xu(this.parentNode).select("line.threshold-line").classed("active",!1),t.services.events.dispatchEvent(R.Threshold.HIDE,{event:e,hoveredElement:xu(this),datum:xu(this).datum()})}))}}class Py extends Nm{constructor(t,e){super(t,e),this.type="highlight",this.renderType=P.SVG,this.positionService=new Ay,this.highlightStrokeWidth=1}render(t=!1){const e=ac(this.getOptions(),"axes"),n=[];Object.keys(e).forEach((t=>{if(Object.values(B).includes(t)){const r=e[t];r.highlights&&r.highlights.data.length>0&&n.push({axisPosition:t,highlightStartMapsTo:r.highlights.highlightStartMapsTo,highlightEndMapsTo:r.highlights.highlightEndMapsTo,labelMapsTo:r.highlights.labelMapsTo,highlight:r.highlights.data,color:r.highlights.color})}}));const r=this.getComponentContainer({ariaLabel:"highlight areas",withinChartClip:!0}).selectAll("g.axis-highlight").data(n,(t=>t.axisPosition));r.exit().attr("opacity",0).remove();const i=r.enter().append("g").merge(r);i.attr("class",(t=>`axis-highlight ${t.axisPosition}`));const o=i.selectAll("g.highlight-group").data((t=>t.highlight.map((e=>(e.axisPosition=t.axisPosition,e.highlightStartMapsTo=t.highlightStartMapsTo,e.labelMapsTo=t.labelMapsTo,e.color=t.color,e.highlightEndMapsTo=t.highlightEndMapsTo,e)))));o.exit().attr("opacity",0).remove();const s=o.enter().append("g");s.append("rect").attr("class","highlight-bar"),s.append("line").attr("class","highlight-line"),s.merge(o).attr("class","highlight-group");const a=this;i.each((function({axisPosition:e}){const n=a.services.cartesianScales.getMainXScale(),r=a.services.cartesianScales.getMainYScale(),[i,o]=n.range(),[s,l]=r.range(),{cartesianScales:c}=a.services,u=c.getOrientation(),[h,d]=uc((t=>c.getDomainValue(t)),(t=>c.getRangeValue(t)),u),f=xu(this);e===B.TOP||e===B.BOTTOM?f.selectAll("rect.highlight-bar").transition().call((e=>a.services.transitions.setupTransition({transition:e,name:"highlight-bar-update",animate:t}))).attr("y",Math.max(l+a.highlightStrokeWidth,0)).attr("height",Math.max(s-2*a.highlightStrokeWidth,0)).attr("x",(({highlightStartMapsTo:t,...e})=>h(e[t]))).attr("width",(({highlightStartMapsTo:t,highlightEndMapsTo:e,...n})=>Math.max(h(n[e])-h(n[t]),0))).style("stroke",(({color:t,labelMapsTo:e,...n})=>t&&t.scale[n[e]]?t.scale[n[e]]:null)).style("stroke-dasharray","2, 2").attr("stroke-width",a.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(({color:t,labelMapsTo:e,...n})=>t&&t.scale[n[e]]?t.scale[n[e]]:null)):f.selectAll("rect.highlight-bar").transition().call((e=>a.services.transitions.setupTransition({transition:e,name:"highlight-bar-update",animate:t}))).attr("x",i).attr("width",Math.max(o-i,0)).attr("y",(({highlightEndMapsTo:t,...e})=>d(e[t]))).attr("height",(({highlightStartMapsTo:t,highlightEndMapsTo:e,...n})=>Math.max(d(n[t])-d(n[e]),0))).style("stroke",(({color:t,labelMapsTo:e,...n})=>t&&t.scale[n[e]]?t.scale[n[e]]:null)).style("stroke-dasharray","2, 2").attr("stroke-width",a.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(({color:t,labelMapsTo:e,...n})=>t&&t.scale[n[e]]?t.scale[n[e]]:null))}))}}class Iy extends Cy{getItems(t){if(t.detail.items)return t.detail.items;const{data:e}=t.detail;if(!e||!e.length||!e[0])return[];const n=this.getOptions(),{cartesianScales:r}=this.services,i=r.getDomainIdentifier(),o=r.isDualAxes(),{groupMapsTo:s}=n.data,a=r.getDomainLabel();let l=r.getRangeLabel();const c=e[0][i];let u;if(1===e.length){const i=e[0],h=r.getRangeIdentifier(i);if(o){const t=r.getRangeAxisPosition({datum:i,groups:[i[s]]});l=r.getScaleLabel(t)}const d=i[h];u=[{label:a,value:c},...Array.isArray(d)&&2===d.length?[{label:"Start",value:d[0]},{label:"End",value:d[1]}]:[{label:l,value:i[h]}]],t.detail.additionalItems&&t.detail.additionalItems.forEach((t=>u.push({label:t.label,value:t.value}))),u.push({label:bn(n,"locale.translations.group")||bn(n,"tooltip.groupLabel"),value:i[s],color:this.model.getFillColor(i[s]),class:this.model.getColorClassName({classNameTypes:[N.TOOLTIP],dataGroupName:i[s]})})}else if(e.length>1&&(u=[{label:a,value:c}],u=u.concat(e.map((t=>{const e=t[r.getRangeIdentifier(t)];return{label:t[s],value:Array.isArray(e)&&2===e.length?`${e[0]} - ${e[1]}`:e,color:this.model.getFillColor(t[s]),class:this.model.getColorClassName({classNameTypes:[N.TOOLTIP],dataGroupName:t[s]})}})).sort(((t,e)=>e.value-t.value))),!o&&!0===ac(n,"tooltip","showTotal"))){const t=r.getRangeIdentifier();u.push({label:bn(n,"locale.translations.total")||bn(n,"tooltip.totalLabel")||"Total",value:e.reduce(((e,n)=>e+n[t]),0),bold:!0})}return u}}var Ny=Math.PI,By=2*Ny,Uy=1e-6,Fy=By-Uy;function jy(){this._x0=this._y0=this._x1=this._y1=null,this._=""}jy.prototype=function(){return new jy}.prototype={constructor:jy,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,s=this._y1,a=n-t,l=r-e,c=o-t,u=s-e,h=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>Uy)if(Math.abs(u*a-l*c)>Uy&&i){var d=n-o,f=r-s,p=a*a+l*l,m=d*d+f*f,g=Math.sqrt(p),y=Math.sqrt(h),v=i*Math.tan((Ny-Math.acos((p+h-m)/(2*g*y)))/2),_=v/y,b=v/g;Math.abs(_-1)>Uy&&(this._+="L"+(t+_*c)+","+(e+_*u)),this._+="A"+i+","+i+",0,0,"+ +(u*d>c*f)+","+(this._x1=t+b*a)+","+(this._y1=e+b*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var s=(n=+n)*Math.cos(r),a=n*Math.sin(r),l=t+s,c=e+a,u=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>Uy||Math.abs(this._y1-c)>Uy)&&(this._+="L"+l+","+c),n&&(h<0&&(h=h%By+By),h>Fy?this._+="A"+n+","+n+",0,1,"+u+","+(t-s)+","+(e-a)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>Uy&&(this._+="A"+n+","+n+",0,"+ +(h>=Ny)+","+u+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}},Array.prototype.slice;class Hy extends Nm{constructor(){super(...arguments),this.type="grid",this.renderType=P.SVG}render(t=!0){const e=ac(this.getOptions(),"grid","x","enabled"),n=ac(this.getOptions(),"grid","y","enabled");this.drawBackdrop(e,n),(e||n)&&(e&&(Nf.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(t)),n&&(Nf.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(t)))}drawXGrid(t){const e=this.parent,n=this.backdrop.attr("height"),r=Tp(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0);if(ac(this.getOptions(),"grid","x","alignWithAxisTicks")){const t=this.services.cartesianScales.getDomainAxisPosition(),e=ac(this.getOptions(),"axes",t,"ticks","values");e&&r.tickValues(e)}else{const t=ac(this.getOptions(),"grid","x","numberOfTicks");r.ticks(t)}const i=e.select(".x.grid").attr("transform",`translate(${-this.backdrop.attr("x")}, ${n})`);t?i.transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"grid-update",animate:t}))).call(r):i.call(r),this.cleanGrid(i)}drawYGrid(t){const e=this.parent,n=this.backdrop.attr("width"),r=Op(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0);if(ac(this.getOptions(),"grid","y","alignWithAxisTicks")){const t=this.services.cartesianScales.getRangeAxisPosition(),e=ac(this.getOptions(),"axes",t,"ticks","values");e&&r.tickValues(e)}else{const t=ac(this.getOptions(),"grid","y","numberOfTicks");r.ticks(t)}const i=e.select(".y.grid").attr("transform",`translate(0, ${-this.backdrop.attr("y")})`);t?i.transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"grid-update",animate:t}))).call(r):i.call(r),this.cleanGrid(i)}getGridlineThreshold(t){const e=this.parent,n=e.selectAll(".x.grid .tick").nodes().sort(((t,e)=>Number(ic(t).tx)-Number(ic(e).tx)));let r=-1;if(!n.length)return;n.forEach((e=>{t[0]>=+ic(e).tx&&r++}));const i=r+1<n.length?r+1:n.length,o=n[r],s=n[i];let a;if(o)if(s)a=+ic(s).tx-+ic(o).tx;else{const t=e.select("rect.chart-grid-backdrop").node();a=Nf.getSVGElementSize(t).width-+ic(o).tx}else a=+ic(s).tx;const{threshold:l}=this.getOptions().tooltip.gridline;return a*l}getActiveGridline(t){const e=ac(this.getOptions,"tooltip","gridline","threshold")||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){const n=ic(this),r=Number(n.tx)-e,i=Number(n.tx)+e;return r<=t[0]&&t[0]<=i}))}drawBackdrop(t,e){const n=this.parent,r=this.services.cartesianScales.getMainXScale(),i=this.services.cartesianScales.getMainYScale(),[o,s]=r.range(),[a,l]=i.range();this.backdrop=Nf.appendOrSelect(n,"svg.chart-grid-backdrop").attr("role","presentation");const c=Nf.appendOrSelect(this.backdrop,t||e?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",o).attr("y",l).attr("width",Math.abs(s-o)).attr("height",Math.abs(a-l)).lower(),c.attr("width","100%").attr("height","100%")}cleanGrid(t){t.selectAll("text").remove(),t.select(".domain").remove()}}class $y extends Nm{constructor(t,e,n){super(t,e,n),this.type="axes",this.renderType=P.SVG,this.truncation={[B.LEFT]:!1,[B.RIGHT]:!1,[B.TOP]:!1,[B.BOTTOM]:!1},n&&(this.configs=n),this.margins=this.configs.margins}render(t=!0){const{position:e}=this.configs,n=this.getOptions(),r=ac(n,"axes",e,"visible"),i=this.getComponentContainer({ariaLabel:"axes"}),{width:o,height:s}=Nf.getSVGElementSize(i,{useAttrs:!0}),a=Nf.appendOrSelect(i,`g.axis.${e}`);let l,c;if(e===B.BOTTOM||e===B.TOP?(l=this.configs.axes[B.LEFT]?this.margins.left:0,c=this.configs.axes[B.RIGHT]?o-this.margins.right:o):(l=s-this.margins.bottom,c=this.margins.top),!this.services.cartesianScales)throw new Error("Services cartesianScales undefined");const u=this.services.cartesianScales.getScaleByPosition(e);let h;switch(this.scaleType===H.LABELS||this.scaleType===H.LABELS_RATIO?u.rangeRound([l,c]):u.range([l,c]),e){case B.LEFT:h=Op;break;case B.BOTTOM:h=Tp;break;case B.RIGHT:h=xp;break;case B.TOP:h=Ep}a.attr("aria-label",`${e} axis`);const d=!a.select("g.ticks").empty();let f=Nf.appendOrSelect(a,"g.ticks");d||(f.attr("role",`${Yc.GRAPHICS_OBJECT} ${Yc.GROUP}`),f.attr("aria-label",`${e} ticks`));const p=Nf.appendOrSelect(a,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label",`invisible ${e} ticks`),m=ac(n,"axes",e),g=this.scaleType===H.TIME||m.scaleType===H.TIME,y=e===B.LEFT||e===B.RIGHT,v=this.model.get("zoomDomain");if(v&&g&&!y&&u.domain(v),!r)return void f.attr("aria-hidden",!0);const _=ac(m,"scaleType"),b=ac(n,"data","loading"),w=ac(m,"ticks","number"),E=ac(m,"ticks","values"),x=ac(m,"truncation","type"),T=ac(m,"truncation","threshold"),O=ac(m,"truncation","numCharacter"),S=null!==w,M=ac(n,"timeScale"),A=Nf.appendOrSelect(p,"g.tick"),C=Nf.appendOrSelect(A,"text").text("0"),D=Nf.getSVGElementSize(C.node(),{useBBox:!0}).height;A.remove();const k=this.scaleType||m.scaleType||H.LINEAR,L=h(u).tickSizeOuter(0);if(u.ticks){let t;if(S?t=w:(t=al,y&&(t=this.getNumberOfFittingTicks(s,D,ll))),1===u.ticks().length&&0===u.ticks()[0]&&(t=0),L.ticks(t),g)if(u.ticks(t).length){const r=ac(n,"timeScale","addSpaceOnEdges"),i=ac(n,"axes",e,"domain"),o=u.copy();r&&!i&&o.nice(t);const s=o.ticks(t);r&&s.length>2&&!i&&(s.splice(s.length-1,1),s.splice(0,1)),L.tickValues(s)}else L.tickValues([])}let R;const P=ac(m,"ticks","formatter"),{code:I,number:N}=ac(n,"locale");if(g){const t=zc(L.tickValues(),ac(n,"timeScale","timeInterval"));R=null===P?(e,r)=>Hc(e,r,L.tickValues(),t,M,n.locale):(e,r)=>{const i=Hc(e,r,L.tickValues(),t,M,n.locale);return P(e,r,i)}}else null===P?k===H.LINEAR&&(R=t=>N(t,I)):R=P;L.tickFormat(R);const[U,j]=this.services.cartesianScales.getScaleByPosition(e).domain();let $;if(E){if(g)E.forEach(((t,e)=>{void 0===t.getTime&&(E[e]=new Date(t))})),$=E.filter((t=>{const e=t.getTime();return e>=new Date(U).getTime()&&e<=new Date(j).getTime()}));else if(_===H.LABELS){const t=this.services.cartesianScales.getScaleByPosition(e).domain();$=E.filter((e=>t.includes(e)))}else $=E.filter((t=>t>=U&&t<=j));L.tickValues($)}switch(e){case B.LEFT:f.attr("transform",`translate(${this.margins.left}, 0)`);break;case B.BOTTOM:f.attr("transform",`translate(0, ${s-this.margins.bottom})`);break;case B.RIGHT:f.attr("transform",`translate(${o-this.margins.right}, 0)`);break;case B.TOP:f.attr("transform",`translate(0, ${this.margins.top})`)}const z=this.model.isDataEmpty();if(m.title){const t=Nf.appendOrSelect(a,"text.axis-title").html(z||b?"":Pg(m.title)),n=ac(m,"titleOrientation");let r;switch(e){case B.LEFT:n===tt.RIGHT?t.attr("transform","rotate(90)").attr("y",0).attr("x",u.range()[0]/2).attr("dy","-0.5em").style("text-anchor","middle"):t.attr("transform","rotate(-90)").attr("y",0).attr("x",-u.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case B.BOTTOM:t.attr("transform",`translate(${this.margins.left/2+u.range()[1]/2}, ${s+4})`).style("text-anchor","middle");break;case B.RIGHT:n===tt.LEFT?t.attr("transform","rotate(-90)").attr("y",o).attr("x",-u.range()[0]/2).style("text-anchor","middle"):t.attr("transform","rotate(90)").attr("y",-o).attr("x",u.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case B.TOP:r=Nf.getSVGElementSize(t,{useBBox:!0}).height,t.attr("transform",`translate(${this.margins.left/2+u.range()[1]/2}, ${r/2})`).style("text-anchor","middle")}}if(g){const e=zc(L.tickValues(),ac(n,"timeScale","timeInterval")),r=M.showDayName,i=f;t&&(f=f.transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"axis-update",animate:t})))),f=f.call(L),i.selectAll(".tick").data(L.tickValues(),u).order().select("text").style("font-weight",((t,n)=>jc(t,n,L.tickValues(),e,r)?"bold":"normal"))}else f=t&&d?f.transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"axis-update",animate:t}))).call(L):f.call(L);if(p.call(L),e===B.BOTTOM||e===B.TOP){let t=!1;const n=ac(m,"ticks","rotation");if(n===K.ALWAYS)t=!0;else if(n===K.NEVER)t=!1;else if(!n||n===K.AUTO)if(u.step)t=p.selectAll("g.tick text").nodes().some((t=>Nf.getSVGElementSize(t,{useBBox:!0}).width>=u.step()));else{t=!1;const e=p.append("text").text("A"),n=Nf.getSVGElementSize(e.node(),{useBBox:!0}).width;let r;p.selectAll("g.tick").each((function(){const e=xu(this),i=parseFloat(ac(ic(this),"tx"));null!==i&&r+e.text().length*n*.8>=i&&(t=!0),r=i})),e.remove()}t?(S||(L.ticks(this.getNumberOfFittingTicks(o,D,cl)),p.call(L),f.call(L)),a.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").attr("text-anchor",e===B.TOP?"start":"end")):a.selectAll("g.ticks g.tick text").attr("transform",null).attr("text-anchor",null)}if(b?a.attr("opacity",0):a.attr("opacity",1),f.selectAll("g.tick").attr("aria-label",(t=>t)),p.selectAll("g.tick").attr("aria-label",(t=>t)),x!==F.NONE&&_===H.LABELS&&!E){const t=this.services.cartesianScales.getScaleDomain(e);if(t.length>0){const n=i.select(`g.axis.${e} g.ticks g.tick`).html();a.selectAll("g.ticks g.tick").html(n);const r=this;a.selectAll("g.tick text").data(t).text((function(t){return t.length>T?(r.truncation[e]=!0,oc(t,x,O)):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(t).text((function(t){return t.length>T?oc(t,x,O):t})),a.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),a.selectAll("g.tick text").data(t)}}this.addEventListeners()}addEventListeners(){const t=this.getComponentContainer(),{position:e}=this.configs,n=Nf.appendOrSelect(t,`g.axis.${e}`),r=this.getOptions(),i=ac(r,"axes",e),o=ac(i,"scaleType"),s=ac(i,"truncation","threshold"),a=this;n.selectAll("g.tick text").on("mouseover",(function(t,e){a.services.events.dispatchEvent(R.Axis.LABEL_MOUSEOVER,{event:t,element:xu(this),datum:e}),o===H.LABELS&&e.length>s&&a.services.events.dispatchEvent(R.Tooltip.SHOW,{event:t,hoveredElement:xu(this),content:e})})).on("mousemove",(function(t,e){a.services.events.dispatchEvent(R.Axis.LABEL_MOUSEMOVE,{event:t,element:xu(this),datum:e}),o===H.LABELS&&e.length>s&&a.services.events.dispatchEvent(R.Tooltip.MOVE,{event:t})})).on("click",(function(t,e){a.services.events.dispatchEvent(R.Axis.LABEL_CLICK,{event:t,element:xu(this),datum:e})})).on("mouseout",(function(t,e){a.services.events.dispatchEvent(R.Axis.LABEL_MOUSEOUT,{event:t,element:xu(this),datum:e}),o===H.LABELS&&a.services.events.dispatchEvent(R.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,e,n){return function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=_u(n))==n?n:0),void 0!==e&&(e=(e=_u(e))==e?e:0),function(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}(_u(t),e,n)}(Math.floor(t/(e*n)),2,al)}destroy(){const t=this.getComponentContainer(),{position:e}=this.configs;Nf.appendOrSelect(t,`g.axis.${e}`).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)}}class zy extends $y{constructor(t,e,n){super(t,e,n)}render(t=!0){super.render(t),super.destroy();const e=this.configs.position,n=this.getComponentContainer({ariaLabel:"axes"}),r=Nf.appendOrSelect(n,`g.axis.${e}`),i=this;r.selectAll("g.tick").each((function(t,n){const r=xu(this);r.classed("tick-hover",!0).attr("tabindex",0===n?0:-1);const o=r.select("text"),{width:s,height:a}=Nf.getSVGElementSize(o,{useBBox:!0}),l=Nf.appendOrSelect(r,"rect.axis-holder");let c=0,u=0;switch(e){case B.LEFT:c=-s+Number(o.attr("x")),u=-a/2;break;case B.RIGHT:c=Math.abs(Number(o.attr("x"))),u=-a/2;break;case B.TOP:c=-s/2,u=-a+Number(o.attr("y"))/2,i.truncation[e]&&(c=0,l.attr("transform","rotate(-45)"));break;case B.BOTTOM:c=-s/2,u=a/2-2,i.truncation[e]&&(c=-s,l.attr("transform","rotate(-45)"))}l.attr("x",c-hl).attr("y",u).attr("width",s+2*hl).attr("height",a).lower()})),this.addEventListeners()}addEventListeners(){const t=this.getComponentContainer(),{position:e}=this.configs,n=Nf.appendOrSelect(t,`g.axis.${e}`),r=this.getOptions(),i=ac(r,"axes",e),o=ac(i,"scaleType"),s=ac(i,"truncation","threshold"),a=this;n.selectAll("g.tick.tick-hover").on("mouseover",(function(t){const e=xu(this).select("text"),n=e.datum();a.services.events.dispatchEvent(R.Axis.LABEL_MOUSEOVER,{event:t,element:e,datum:n}),o===H.LABELS&&n.length>s&&a.services.events.dispatchEvent(R.Tooltip.SHOW,{event:t,element:e,datum:n})})).on("mousemove",(function(t){const e=xu(this).select("text"),n=e.datum();a.services.events.dispatchEvent(R.Axis.LABEL_MOUSEMOVE,{event:t,element:e,datum:n}),a.services.events.dispatchEvent(R.Tooltip.MOVE,{event:t})})).on("click",(function(t){a.services.events.dispatchEvent(R.Axis.LABEL_CLICK,{event:t,element:xu(this).select("text"),datum:xu(this).select("text").datum()})})).on("mouseout",(function(t){a.services.events.dispatchEvent(R.Axis.LABEL_MOUSEOUT,{event:t,element:xu(this).select("text"),datum:xu(this).select("text").datum()}),o===H.LABELS&&a.services.events.dispatchEvent(R.Tooltip.HIDE)})).on("focus",(function(t){const e={clientX:0,clientY:0};if(t.target){t.target.focus();const n=t.target.getBoundingClientRect();e.clientX=n.x,e.clientY=n.y}a.services.events.dispatchEvent(R.Axis.LABEL_FOCUS,{event:{...t,...e},element:xu(this),datum:xu(this).select("text").datum()})})).on("blur",(function(t){a.services.events.dispatchEvent(R.Axis.LABEL_BLUR,{event:t,element:xu(this),datum:xu(this).select("text").datum()})})).on("keydown",(function(t){t.key&&"Escape"===t.key&&(a.services.events.dispatchEvent(R.Tooltip.HIDE),a.services.events.dispatchEvent(R.Axis.LABEL_BLUR,{event:t,element:xu(this),datum:xu(this).select("text").datum()})),e===B.LEFT||e===B.RIGHT?t.key&&"ArrowUp"===t.key?a.goNext(this,t):t.key&&"ArrowDown"===t.key&&a.goPrevious(this,t):t.key&&"ArrowLeft"===t.key?a.goPrevious(this,t):t.key&&"ArrowRight"===t.key&&a.goNext(this,t)}))}goNext(t,e){t.nextElementSibling&&"path"!==t.nextElementSibling.tagName&&t.nextElementSibling.dispatchEvent(new Event("focus")),e.preventDefault()}goPrevious(t,e){t.previousElementSibling&&"path"!==t.previousElementSibling.tagName&&t.previousElementSibling.dispatchEvent(new Event("focus")),e.preventDefault()}destroy(){const t=this.getComponentContainer(),{position:e}=this.configs;Nf.appendOrSelect(t,`g.axis.${e}`).selectAll("g.tick.tick-hover").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("focus",null).on("blur",null)}}class Gy extends Nm{constructor(){super(...arguments),this.type="2D-axes",this.renderType=P.SVG,this.children={},this.thresholds=[],this.margins={top:0,right:0,bottom:0,left:0}}render(t=!1){const e={},n=Object.keys(B),r=ac(this.getOptions(),"axes");n.forEach((t=>{r[B[t]]&&(e[B[t]]=!0)})),this.configs.axes=e,n.forEach((t=>{const e=B[t];if(this.configs.axes[e]&&!this.children[e]){const t={position:e,axes:this.configs.axes,margins:this.margins},n=this.model.axisFlavor===rt.DEFAULT?new $y(this.model,this.services,t):new zy(this.model,this.services,t);n.setModel(this.model),n.setServices(this.services),n.setParent(this.parent),this.children[e]=n}})),Object.keys(this.children).forEach((e=>{this.children[e].render(t)}));const i={};Object.keys(this.children).forEach((t=>{const e=this.children[t],n=e.configs.position,r=e.getInvisibleAxisRef(),{width:o,height:s}=Nf.getSVGElementSize(r,{useBBox:!0});let a;switch(e.getTitleRef().empty()?a=0:(a=Nf.getSVGElementSize(e.getTitleRef(),{useBBox:!0}).height,(n===B.LEFT||n===B.RIGHT)&&(a+=5)),n){case B.TOP:i.top=s+a;break;case B.BOTTOM:i.bottom=s+a;break;case B.LEFT:i.left=o+a;break;case B.RIGHT:i.right=o+a}})),this.services.events.dispatchEvent(R.Axis.RENDER_COMPLETE),Object.keys(i).some((t=>this.margins[t]!==i[t]))&&(this.margins=Object.assign(this.margins,i),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(R.ZoomBar.UPDATE),Object.keys(this.children).forEach((t=>{this.children[t].margins=this.margins})),this.render(!0))}}class Vy extends Nm{constructor(){super(...arguments),this.type="skeleton"}render(t=!0){const e=ac(this.getOptions(),"data","loading");e?this.renderSkeleton(e):this.removeSkeleton()}renderSkeleton(t){if(this.configs.skeleton===q.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===q.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===q.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==q.DONUT)throw new Error(`"${this.configs.skeleton}" is not a valid Skeleton type.`);this.renderDonutSkeleton(t)}}renderGridSkeleton(t){this.setScales(),this.drawBackdrop(t),this.drawXGrid(t),this.drawYGrid(t),t&&this.setShimmerEffect("shimmer-lines")}renderVertOrHorizSkeleton(t){const e=this.services.cartesianScales.getOrientation();this.setScales(),this.drawBackdrop(t),e===j.VERTICAL&&this.drawYGrid(t),e===j.HORIZONTAL&&this.drawXGrid(t),this.setShimmerEffect("shimmer-lines")}renderPieSkeleton(t){const e=this.computeOuterRadius();this.drawRing(e,0,t),t&&this.setShimmerEffect("shimmer-areas")}renderDonutSkeleton(t){const e=this.computeOuterRadius(),n=this.computeInnerRadius();this.drawRing(e,n,t),t&&this.setShimmerEffect("shimmer-areas")}setScales(){const t=this.services.cartesianScales.getMainXScale().range(),e=this.services.cartesianScales.getMainYScale().range();this.xScale=il().domain([0,1]).range(t),this.yScale=il().domain([0,1]).range(e)}drawBackdrop(t){const e=this.parent,{width:n,height:r}=Nf.getSVGElementSize(e,{useAttrs:!0});this.backdrop=Nf.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",n).attr("height",r);const i=Nf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");i.attr("width","100%").attr("height","100%");const[o]=this.xScale.range(),[,s]=this.yScale.range();this.backdrop.merge(i).attr("x",o).attr("y",s),i.classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawXGrid(t){const e=+this.backdrop.attr("width"),n=ac(this.getOptions(),"grid","x","numberOfTicks"),r=this.xScale.ticks(n).map((t=>t*e)),i=Nf.appendOrSelect(this.backdrop,"g.x.skeleton"),o=i.selectAll("line").data(r);o.enter().append("line").merge(o).attr("x1",(t=>t)).attr("x2",(t=>t)).attr("y1",0).attr("y2","100%"),i.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 e=+this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=ac(this.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((t=>t*e)),o=Nf.appendOrSelect(this.backdrop,"g.y.skeleton"),s=o.selectAll("line").data(i);s.enter().append("line").merge(s).attr("x1",0).attr("x2",n).attr("y1",(t=>t)).attr("y2",(t=>t)),o.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,e,n=!0){const r=this.parent,{width:i,height:o}=Nf.getSVGElementSize(r,{useAttrs:!0}),s=Nf.appendOrSelect(r,"svg.chart-skeleton").attr("width",i).attr("height",o),a=0===e?"pie":"donut",l=ac(this.getOptions(),a,"alignment");Nf.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",i).attr("height",o).attr("fill","none");const c=function(){var t=Om,e=Sm,n=qc(0),r=null,i=Mm,o=Am,s=Cm,a=null,l=Tm(c);function c(){var c,u,h=+t.apply(this,arguments),d=+e.apply(this,arguments),f=i.apply(this,arguments)-Zd,p=o.apply(this,arguments)-Zd,m=Fd(p-f),g=p>f;if(a||(a=c=l()),d<h&&(u=d,d=h,h=u),d>Wd)if(m>qd-Wd)a.moveTo(d*Hd(f),d*Gd(f)),a.arc(0,0,d,f,p,!g),h>Wd&&(a.moveTo(h*Hd(p),h*Gd(p)),a.arc(0,0,h,p,f,g));else{var y,v,_=f,b=p,w=f,E=p,x=m,T=m,O=s.apply(this,arguments)/2,S=O>Wd&&(r?+r.apply(this,arguments):Vd(h*h+d*d)),M=zd(Fd(d-h)/2,+n.apply(this,arguments)),A=M,C=M;if(S>Wd){var D=Xd(S/h*Gd(O)),k=Xd(S/d*Gd(O));(x-=2*D)>Wd?(w+=D*=g?1:-1,E-=D):(x=0,w=E=(f+p)/2),(T-=2*k)>Wd?(_+=k*=g?1:-1,b-=k):(T=0,_=b=(f+p)/2)}var L=d*Hd(_),R=d*Gd(_),P=h*Hd(E),I=h*Gd(E);if(M>Wd){var N,B=d*Hd(b),U=d*Gd(b),F=h*Hd(w),j=h*Gd(w);if(m<Yd)if(N=function(t,e,n,r,i,o,s,a){var l=n-t,c=r-e,u=s-i,h=a-o,d=h*l-u*c;if(!(d*d<Wd))return[t+(d=(u*(e-o)-h*(t-i))/d)*l,e+d*c]}(L,R,F,j,B,U,P,I)){var H=L-N[0],$=R-N[1],z=B-N[0],G=U-N[1],V=1/Gd(function(t){return t>1?0:t<-1?Yd:Math.acos(t)}((H*z+$*G)/(Vd(H*H+$*$)*Vd(z*z+G*G)))/2),W=Vd(N[0]*N[0]+N[1]*N[1]);A=zd(M,(h-W)/(V-1)),C=zd(M,(d-W)/(V+1))}else A=C=0}T>Wd?C>Wd?(y=Dm(F,j,L,R,d,C,g),v=Dm(B,U,P,I,d,C,g),a.moveTo(y.cx+y.x01,y.cy+y.y01),C<M?a.arc(y.cx,y.cy,C,jd(y.y01,y.x01),jd(v.y01,v.x01),!g):(a.arc(y.cx,y.cy,C,jd(y.y01,y.x01),jd(y.y11,y.x11),!g),a.arc(0,0,d,jd(y.cy+y.y11,y.cx+y.x11),jd(v.cy+v.y11,v.cx+v.x11),!g),a.arc(v.cx,v.cy,C,jd(v.y11,v.x11),jd(v.y01,v.x01),!g))):(a.moveTo(L,R),a.arc(0,0,d,_,b,!g)):a.moveTo(L,R),h>Wd&&x>Wd?A>Wd?(y=Dm(P,I,B,U,h,-A,g),v=Dm(L,R,F,j,h,-A,g),a.lineTo(y.cx+y.x01,y.cy+y.y01),A<M?a.arc(y.cx,y.cy,A,jd(y.y01,y.x01),jd(v.y01,v.x01),!g):(a.arc(y.cx,y.cy,A,jd(y.y01,y.x01),jd(y.y11,y.x11),!g),a.arc(0,0,h,jd(y.cy+y.y11,y.cx+y.x11),jd(v.cy+v.y11,v.cx+v.x11),g),a.arc(v.cx,v.cy,A,jd(v.y11,v.x11),jd(v.y01,v.x01),!g))):a.arc(0,0,h,E,w,g):a.lineTo(P,I)}else a.moveTo(0,0);if(a.closePath(),c)return a=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Yd/2;return[Hd(r)*n,Gd(r)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:qc(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:qc(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:qc(+t),c):n},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:qc(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:qc(+t),c):i},c.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:qc(+t),c):o},c.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:qc(+t),c):s},c.context=function(t){return arguments.length?(a=t??null,c):a},c}().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI),u=t+Math.abs(-15),h=t+(Math.min(i,o)-2*t)/2,d=Nf.appendOrSelect(s,"path").attr("class","skeleton-area-shape").attr("transform",`translate(${u}, ${h})`).attr("d",c).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n).style("fill",n?`url(#${this.services.domUtils.generateElementIDString("shimmer-areas")})`:null);let f=t+30;l===z.CENTER?f=i/2:l===z.RIGHT&&(f=i-t-30);const p=t+20;d.attr("transform",`translate(${f}, ${p})`)}computeOuterRadius(){const{width:t,height:e}=Nf.getSVGElementSize(this.parent,{useAttrs:!0});return Math.min(t,e)/2-15}computeInnerRadius(){return this.computeOuterRadius()*(3/4)}setShimmerEffect(t){const e="stop-bg-shimmer",n=this.parent.select(".chart-skeleton"),{width:r}=Nf.getSVGElementSize(this.parent,{useAttrs:!0}),i=r,o=Nf.appendOrSelect(n,"defs").lower(),s=Nf.appendOrSelect(o,"linearGradient").attr("id",this.services.domUtils.generateElementIDString(t)).attr("class",t).attr("x1",0-3*.2*r).attr("x2",i).attr("y1",0).attr("y2",0).attr("gradientUnits","userSpaceOnUse").attr("gradientTransform","translate(0, 0)"),a=`\n\t\t\t<stop class="${e}" offset="0"></stop>\n\t\t\t<stop class="stop-shimmer" offset="0.2"></stop>\n\t\t\t<stop class="${e}" offset="0.4"></stop>\n\t\t`;s.html(a),function t(){s.attr("gradientTransform",`translate(${0-3*.2*r}, 0)`).transition().duration(2e3).delay(1e3).ease(Ap).attr("gradientTransform",`translate(${i+3*.2*r}, 0)`).on("end",t)}()}removeSkeleton(){this.parent.select(".chart-skeleton").remove()}}class Wy extends Nm{constructor(){super(...arguments),this.type="zero-line",this.renderType=P.SVG}render(t){const e=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),n=this.services.cartesianScales.getScaleByPosition(e),[r,i]=n.domain(),o=r>0&&i<0||r<0&&i>0,s=this.getComponentContainer({isPresentational:!0});if(!o)return void s.selectAll("line.domain").remove();const[a,l]=this.services.cartesianScales.getDomainScale().range();let c=+n(0)+.5;c||(c=n.range()[0]);const u=lc({x0:a,x1:l,y0:c,y1:c},this.services.cartesianScales.getOrientation());Nf.appendOrSelect(s,"line.domain").transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"zero-line-update",animate:t}))).attr("y1",u.y0).attr("y2",u.y1).attr("x1",u.x0).attr("x2",u.x1)}}class Yy extends Nm{getBarWidth(){const t=this.getOptions();if(t.bars.width)return t.bars.width;const e=this.model.getDisplayData().length,n=this.services.cartesianScales.getMainXScale(),r=Nf.getSVGElementSize(this.parent,{useAttrs:!0}).width;if(!n.step){const n=ac(t,"bars","spacingFactor");return Math.min(t.bars.maxWidth,r*n/e)}return Math.min(t.bars.maxWidth,n.step()/2)}isOutsideZoomedDomain(t,e){if(this.model.getDisplayData().length<=1)return!1;const n=this.model.get("zoomDomain");if(void 0!==n){const r=this.services.cartesianScales.getDomainScale();return t<r(n[0])||e>r(n[1])}return!1}}class Zy extends Yy{constructor(){super(...arguments),this.type="grouped-bar",this.renderType=P.SVG,this.padding=5,this.defaultStepFactor=70,this.handleLegendOnHover=t=>{const{hoveredElement:e}=t.detail,{groupMapsTo:n}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call((t=>this.services.transitions.setupTransition({transition:t,name:"legend-hover-bar"}))).attr("opacity",(t=>t[n]!==e.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(R.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(R.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const e=this.model.getDisplayData(this.configs.groups),n=this.getOptions(),{groupMapsTo:r}=n.data;this.setGroupScale();const i=this.getComponentContainer({ariaLabel:"grouped bar graphs",withinChartClip:!0}),o=Jr(e.map((t=>{const e=this.services.cartesianScales.getDomainIdentifier(t);return t[e]&&"function"==typeof t[e].toString?t[e].toString():t[e]}))),s=i.selectAll("g.bars").data(o,(t=>t));s.exit().attr("opacity",0).remove();const a=s.enter().append("g").classed("bars",!0).attr("role",Yc.GROUP).attr("data-name","bars").merge(s);a.transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"bar-group-update-enter",animate:t}))).attr("transform",(t=>{const e=this.services.cartesianScales.getDomainValue(t)-this.getGroupWidth()/2;return this.services.cartesianScales.getOrientation()===j.VERTICAL?`translate(${e}, 0)`:`translate(0, ${e})`}));const l=a.selectAll("path.bar").data((t=>this.getDataCorrespondingToLabel(t)),(t=>t[r]));l.exit().attr("opacity",0).remove(),l.enter().append("path").attr("opacity",0).merge(l).classed("bar",!0).transition().call((e=>this.services.transitions.setupTransition({transition:e,name:"bar-update-enter",animate:t}))).attr("class",(t=>this.model.getColorClassName({classNameTypes:[N.FILL],dataGroupName:t[r],originalClassName:"bar"}))).style("fill",(t=>{const e=this.services.cartesianScales.getDomainIdentifier(t);return this.model.getFillColor(t[r],t[e],t)})).attr("d",(t=>{const e=this.groupScale(t[r]),n=this.getBarWidth(),i=e,o=e+n,s=this.services.cartesianScales.getRangeAxisPosition({datum:t}),a=this.services.cartesianScales.getDomainLowerBound(s),l=this.services.cartesianScales.getValueThroughAxisPosition(s,a),c=this.services.cartesianScales.getRangeValue(t),u=this.services.cartesianScales.getDomainValue(t)-n/2,h=u+n;if(!this.isOutsideZoomedDomain(u,h))return cc({x0:i,x1:o,y0:l,y1:c},this.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",Yc.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(t=>t.value)),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e,n){const r=xu(this);r.classed("hovered",!0),t.services.events.dispatchEvent(R.Bar.BAR_MOUSEOVER,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(R.Tooltip.SHOW,{event:e,hoveredElement:r,data:[n]})})).on("mousemove",(function(e,n){const r=xu(this);t.services.events.dispatchEvent(R.Bar.BAR_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(R.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(R.Bar.BAR_CLICK,{event:e,element:xu(this),datum:n})})).on("mouseout",(function(e,n){const r=xu(this);r.classed("hovered",!1),t.services.events.dispatchEvent(R.Bar.BAR_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(R.Tooltip.HIDE,{hoveredElement:r})}))}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(R.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(R.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getDataCorrespondingToLabel(t){return this.model.getDisplayData(this.configs.groups).filter((e=>e[this.services.cartesianScales.getDomainIdentifier(e)].toString()===t))}getGroupWidth(){const t=this.model.getGroupedData(this.configs.groups),e=this.getTotalGroupPadding();return this.getBarWidth()*t.length+e}getDomainScaleStep(){const t=this.services.cartesianScales.getDomainScale(),e=this.model.getGroupedData(this.configs.groups);let n=this.defaultStepFactor;if("function"==typeof t.step)n=t.step();else if(e.length>0){const r=e.find((t=>{var e;return(null==(e=t.data)?void 0:e.length)>1}));if(r){const e=this.services.cartesianScales.getDomainIdentifier(r.data[0]);n=Math.abs(t(r.data[1][e])-t(r.data[0][e]))}}return n}getTotalGroupPadding(){const t=this.model.getGroupedData(this.configs.groups);return 1===t.length?0:Math.min(5,this.getDomainScaleStep()/this.defaultStepFactor*5)*(t.length-1)}getBarWidth(){const t=this.getOptions(),e=ac(t,"bars","width"),n=ac(t,"bars","maxWidth");if(null!==e&&(null===n||e<=n))return e;const r=this.model.getGroupedData(this.configs.groups).length,i=this.getTotalGroupPadding();return Math.min(n,(this.getDomainScaleStep()-i)/r)}setGroupScale(){const t=this.model.getActiveDataGroupNames(this.configs.groups);this.groupScale=Tu().domain(t).rangeRound([0,this.getGroupWidth()])}}var qy={value:function(){}};function Xy(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Ky(r)}function Ky(t){this._=t}function Qy(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Jy(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=qy,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}function tv(t){return null!=t&&t.length?Tn(t,1):[]}function ev(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}function nv(t,e){return null==(t=function(t,e){return e.length<2?t:_n(t,ev(e,0,-1))}(t,e=gn(e,t)))||delete t[vn(Yr(e))]}function rv(t){return kn(t)?void 0:t}Ky.prototype=Xy.prototype={constructor:Ky,on:function(t,e){var n,r=this._,i=function(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}(t+"",r),o=-1,s=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=i[o]).type)r[n]=Jy(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Jy(r[n],t.name,null);return this}for(;++o<s;)if((n=(t=i[o]).type)&&(n=Qy(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Ky(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}},uy(Object.freeze(Object.defineProperty({__proto__:null,dispatch:Xy},Symbol.toStringTag,{value:"Module"}))).dispatch,Math.PI;var iv=function(t){return se(ye(t,void 0,tv),t+"")}((function(t,e){var n={};if(null==t)return n;var r=!1;e=Lt(e,(function(e){return e=gn(e,t),r||(r=e.length>1),e})),me(t,Vn(t),n),r&&(n=Er(n,7,rv));for(var i=e.length;i--;)nv(n,e[i]);return n}));function ov(t){return Math.log(t)}function sv(t){return Math.exp(t)}function av(t){return-Math.log(-t)}function lv(t){return-Math.exp(-t)}function cv(t){return isFinite(t)?+("1e"+t):t<0?0:t}function uv(t){return(e,n)=>-t(-e,n)}function hv(){const t=function(t){const e=t(ov,sv),n=e.domain;let r,i,o=10;function s(){return r=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}(o),i=function(t){return 10===t?cv:t===Math.E?Math.exp:e=>Math.pow(t,e)}(o),n()[0]<0?(r=uv(r),i=uv(i),t(av,lv)):t(ov,sv),e}return e.base=function(t){return arguments.length?(o=+t,s()):o},e.domain=function(t){return arguments.length?(n(t),s()):n()},e.ticks=t=>{const e=n();let s=e[0],a=e[e.length-1];const l=a<s;l&&([s,a]=[a,s]);let c,u,h=r(s),d=r(a);const f=null==t?10:+t;let p=[];if(!(o%1)&&d-h<f){if(h=Math.floor(h),d=Math.ceil(d),s>0){for(;h<=d;++h)for(c=1;c<o;++c)if(u=h<0?c/i(-h):c*i(h),!(u<s)){if(u>a)break;p.push(u)}}else for(;h<=d;++h)for(c=o-1;c>=1;--c)if(u=h>0?c/i(-h):c*i(h),!(u<s)){if(u>a)break;p.push(u)}2*p.length<f&&(p=fi(s,a,f))}else p=fi(h,d,Math.min(d-h,f)).map(i);return l?p.reverse():p},e.tickFormat=(t,n)=>{if(null==t&&(t=10),null==n&&(n=10===o?"s":","),"function"!=typeof n&&(!(o%1)&&null==(n=Ia(n)).precision&&(n.trim=!0),n=Ha(n)),t===1/0)return n;const s=Math.max(1,o*t/e.ticks().length);return t=>{let e=t/i(Math.round(r(t)));return e*o<o-.5&&(e*=o),e<=s?n(t):""}},e.nice=()=>n(Ou(n(),{floor:t=>i(Math.floor(r(t))),ceil:t=>i(Math.ceil(r(t)))})),e}(el()).domain([1,10]);return t.copy=()=>tl(t,hv()).base(t.base()),Va.apply(t,arguments),t}function dv(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function fv(t){this._context=t}function pv(t){return new fv(t)}function mv(t){this._context=t}function gv(t){return new mv(t)}function yv(t){this._context=t}function vv(t){return new yv(t)}function _v(t,e){this._basis=new fv(t),this._beta=e}fv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:dv(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:dv(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},mv.prototype={areaStart:Jd,areaEnd:Jd,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)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:dv(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},yv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:dv(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},_v.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],s=t[n]-i,a=e[n]-o,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+r*s),this._beta*e[l]+(1-this._beta)*(o+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const bv=function t(e){function n(t){return 1===e?new fv(t):new _v(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function wv(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Ev(t,e){this._context=t,this._k=(1-e)/6}Ev.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:wv(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:wv(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const xv=function t(e){function n(t){return new Ev(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Tv(t,e){this._context=t,this._k=(1-e)/6}Tv.prototype={areaStart:Jd,areaEnd:Jd,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)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:wv(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ov=function t(e){function n(t){return new Tv(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Sv(t,e){this._context=t,this._k=(1-e)/6}Sv.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:wv(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Mv=function t(e){function n(t){return new Sv(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Av(t,e,n){var r=t._x1,i=t._y1,o=t._x2,s=t._y2;if(t._l01_a>Wd){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Wd){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/u,s=(s*c+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(r,i,o,s,t._x2,t._y2)}function Cv(t,e){this._context=t,this._alpha=e}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)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Av(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Dv=function t(e){function n(t){return e?new Cv(t,e):new Ev(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function kv(t,e){this._context=t,this._alpha=e}kv.prototype={areaStart:Jd,areaEnd:Jd,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)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Av(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Lv=function t(e){function n(t){return e?new kv(t,e):new Tv(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Rv(t,e){this._context=t,this._alpha=e}Rv.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Av(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Pv=function t(e){function n(t){return e?new Rv(t,e):new Sv(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Iv(t){return t<0?-1:1}function Nv(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),s=(n-t._y1)/(i||r<0&&-0),a=(o*i+s*r)/(r+i);return(Iv(o)+Iv(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function Bv(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Uv(t,e,n){var r=t._x0,i=t._y0,o=t._x1,s=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,i+a*e,o-a,s-a*n,o,s)}function Fv(t){this._context=t}function jv(t){this._context=new Hv(t)}function Hv(t){this._context=t}function $v(t){return new Fv(t)}function zv(t){return new jv(t)}function Gv(t){this._context=t}function Vv(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),s=new Array(r);for(i[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,o[e]=4,s[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,o[r-1]=7,s[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/o[e-1],o[e]-=n,s[e]-=n*s[e-1];for(i[r-1]=s[r-1]/o[r-1],e=r-2;e>=0;--e)i[e]=(s[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function Wv(t){return new Gv(t)}function Yv(t,e){this._context=t,this._t=e}function Zv(t){return new Yv(t,.5)}function qv(t){return new Yv(t,0)}function Xv(t){return new Yv(t,1)}Fv.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:Uv(this,this._t0,Bv(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Uv(this,Bv(this,n=Nv(this,t,e)),n);break;default:Uv(this,this._t0,n=Nv(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(jv.prototype=Object.create(Fv.prototype)).point=function(t,e){Fv.prototype.point.call(this,e,t)},Hv.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}},Gv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=Vv(t),i=Vv(e),o=0,s=1;s<n;++o,++s)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[s],e[s]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},Yv.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&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};class Kv extends If{zoomIn(t,e,n){let r,i,o;const s=n||dl;t&&(r=t.x,i=t.y,o=2);const{width:a,height:l}=Nf.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0});e.transition().duration(s.duration).ease(s.ease).attr("transform",`translate(${a/2}, ${l/2}) scale(${o}) translate(${-r},${-i})`),this.services.events.dispatchEvent(R.CanvasZoom.CANVAS_ZOOM_IN,{element:xu(t)})}zoomOut(t,e){const n=e||dl;t.transition().duration(n.duration).ease(n.ease).attr("transform",""),this.services.events.dispatchEvent(R.CanvasZoom.CANVAS_ZOOM_OUT)}}class Qv extends If{init(){this.documentFragment=document.createDocumentFragment()}addEventListener(t,e){this.documentFragment.addEventListener(t,e)}removeEventListener(t,e){this.documentFragment.removeEventListener(t,e)}dispatchEvent(t,e){let n;e?n=new CustomEvent(t,{detail:e}):(n=document.createEvent("Event"),n.initEvent(t,!1,!0)),this.documentFragment.dispatchEvent(n)}}class Jv extends If{constructor(t,e){super(t,e)}downloadCSV(t,e){const n=document.createElement("a"),r="text/csv;encoding:utf-8";if(navigator.msSaveBlob)navigator.msSaveBlob(new Blob([t],{type:r}),e);else if(URL&&"download"in n){const i=URL.createObjectURL(new Blob([t],{type:r}));n.href=i,n.setAttribute("download",e),document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(i)}else location.href=`data:application/octet-stream,${encodeURIComponent(t)}`}downloadImage(t,e){const n=document.createElement("a");n.download=e,n.href=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}}class t_ extends If{constructor(){super(...arguments),this.pendingTransitions={}}init(){var t;null==(t=this.services.events)||t.addEventListener(R.Model.UPDATE,(()=>{this.pendingTransitions={}}))}setupTransition({transition:t,name:e,animate:n}){return this.pendingTransitions[t._id]=t,t.on("end interrupt cancel",(()=>{delete this.pendingTransitions[t._id]})),!1===this.model.getOptions().animations||!1===n?t.duration(0):t.duration(ac(vl,e,"duration")||vl.default.duration)}getPendingTransitions(){return this.pendingTransitions}}function e_(t,e){const n=ct(t),r=ct(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function n_(t,e){const n=ct(t);if(isNaN(e))return gc(t,NaN);if(!e)return n;const r=n.getDate(),i=gc(t,n.getTime());return i.setMonth(n.getMonth()+e+1,0),r>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),r),n)}function r_(t,e){return n_(t,12*e)}function i_(t,e){return r_(t,-e)}function o_(t,e){const n=ct(t),r=ct(e),i=e_(n,r),o=Math.abs(function(t,e){const n=ct(t),r=ct(e);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(n,r));let s;if(o<1)s=0;else{1===n.getMonth()&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);let e=e_(n,r)===-i;(function(t){const e=ct(t);return+function(t){const e=ct(t);return e.setHours(23,59,59,999),e}(e)==+function(t){const e=ct(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(23,59,59,999),e}(e)})(ct(t))&&1===o&&1===e_(t,r)&&(e=!1),s=i*(o-Number(e))}return 0===s?0:s}function s_(t,e){return n_(t,-e)}function a_(t,e){const n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function l_(t,e){const n=ct(t);return isNaN(e)?gc(t,NaN):(e&&n.setDate(n.getDate()+e),n)}function c_(t,e){return l_(t,-e)}function u_(t){return e=>{const n=(t?Math[t]:Math.trunc)(e);return 0===n?0:n}}function h_(t,e){return+ct(t)-+ct(e)}function d_(t,e){return gc(t,+ct(t)+e)}function f_(t,e){return d_(t,e*dc)}function p_(t,e){return f_(t,-e)}function m_(t,e,n){const r=h_(t,e)/6e4;return u_(void 0)(r)}function g_(t,e){return d_(t,6e4*e)}function y_(t,e){return g_(t,-e)}function v_(t,e,n){const r=h_(t,e)/1e3;return u_(void 0)(r)}function __(t,e){return d_(t,1e3*e)}function b_(t,e){return __(t,-e)}class w_ extends If{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 e=this.model.getOptions(),{groupMapsTo:n}=e.data,r=ac(e,"axes",this.secondaryDomainAxisPosition),i=t[n];if(null!=r&&r.correspondingDatasets&&r.correspondingDatasets.includes(i))return this.secondaryDomainAxisPosition}return this.domainAxisPosition}getRangeAxisPosition({datum:t=null,groups:e=null}={}){if(this.dualAxes){const n=this.model.getOptions(),{groupMapsTo:r}=n.data,i=ac(n,"axes",this.secondaryRangeAxisPosition);let o;if(null!==t?o=t[r]:e&&e.length>0&&(o=e[0]),null!=i&&i.correspondingDatasets&&i.correspondingDatasets.includes(o))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition}getAxisOptions(t){return ac(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===B.BOTTOM||t===B.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(B).map((t=>B[t])).forEach((t=>{this.scales[t]=this.createScale(t)}))}findDomainAndRangeAxes(){const t=this.findVerticalAxesPositions(),e=this.findHorizontalAxesPositions(),n=this.findDomainAndRangeAxesPositions(t,e);this.domainAxisPosition=n.primaryDomainAxisPosition,this.rangeAxisPosition=n.primaryRangeAxisPosition,this.isDualAxes()&&(this.secondaryDomainAxisPosition=n.secondaryDomainAxisPosition,this.secondaryRangeAxisPosition=n.secondaryRangeAxisPosition)}determineOrientation(){this.rangeAxisPosition!==B.LEFT&&this.rangeAxisPosition!==B.RIGHT||this.domainAxisPosition!==B.BOTTOM&&this.domainAxisPosition!==B.TOP?this.orientation=j.HORIZONTAL:this.orientation=j.VERTICAL}isDualAxes(){return this.dualAxes}determineAxisDuality(){var t,e,n,r;const i=this.model.getOptions(),o=ac(i,"axes");(null!=(t=o[B.LEFT])&&t.correspondingDatasets&&o[B.RIGHT]||null!=(e=o[B.RIGHT])&&e.correspondingDatasets&&o[B.LEFT]||null!=(n=o[B.TOP])&&n.correspondingDatasets&&o[B.BOTTOM]||null!=(r=o[B.BOTTOM])&&r.correspondingDatasets&&o[B.TOP])&&(this.dualAxes=!0)}getCustomDomainValuesByposition(t){const e=ac(this.model.getOptions(),"axes",t,"domain");if(e&&!Array.isArray(e))throw new Error(`Domain in ${t} axis is not a valid array`);if(Array.isArray(e)&&(this.scaleTypes[t]===H.LINEAR||this.scaleTypes[t]===H.TIME)&&2!==e.length)throw new Error(`There can only be 2 elements in domain for scale type: ${this.scaleTypes[t]}`);return e}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=[B.BOTTOM,B.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((e=>t.indexOf(e)>-1))}getMainYAxisPosition(){const t=[B.LEFT,B.RIGHT];return[this.domainAxisPosition,this.rangeAxisPosition].find((e=>t.indexOf(e)>-1))}getMainXScale(){return this.scales[this.getMainXAxisPosition()]}getMainYScale(){return this.scales[this.getMainYAxisPosition()]}getValueFromScale(t,e,n,r){const i=this.model.getOptions(),o=ac(i,"axes")[n],{mapsTo:s}=o,a=null!==ac(r,s)?r[s]:r;let l;switch(e){case H.LABELS:l=t(a)+t.step()/2;break;case H.TIME:l=t(new Date(a));break;default:l=t(a)}return l}getBoundedScaledValues(t){const{bounds:e}=this.model.getOptions(),n=this.getRangeAxisPosition({datum:t}),r=this.scales[n],i=this.model.getOptions(),o=ac(i,"axes")[n],{mapsTo:s}=o,a=void 0!==t[s]?t[s]:t;return[r(null!==ac(t,e.upperBoundMapsTo)?t[e.upperBoundMapsTo]:a),r(null!==ac(t,e.lowerBoundMapsTo)?t[e.lowerBoundMapsTo]:a)]}getValueThroughAxisPosition(t,e){const n=this.scaleTypes[t],r=this.scales[t];return this.getValueFromScale(r,n,t,e)}getDomainValue(t){const e=this.getDomainAxisPosition({datum:t});return this.getValueThroughAxisPosition(e,t)}getRangeValue(t){const e=this.getRangeAxisPosition({datum:t});return this.getValueThroughAxisPosition(e,t)}getMainXScaleType(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())}getMainYScaleType(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())}getDomainIdentifier(t){const e=this.model.getOptions();return ac(e,"axes",this.getDomainAxisPosition({datum:t}),"mapsTo")}getRangeIdentifier(t){const e=this.model.getOptions();return ac(e,"axes",this.getRangeAxisPosition({datum:t}),"mapsTo")}extendsDomain(t,e){const n=this.model.getOptions(),r=ac(n,"axes",t);return r.scaleType===H.TIME?function(t,e){const n=new Date(t[0]),r=new Date(t[1]);return function(t,e){const n=ct(t),r=ct(e),i=e_(n,r),o=Math.abs(function(t,e){const n=ct(t),r=ct(e);return n.getFullYear()-r.getFullYear()}(n,r));n.setFullYear(1584),r.setFullYear(1584);const s=i*(o-+(e_(n,r)===-i));return 0===s?0:s}(r,n)>1?[i_(n,e),r_(r,e)]:o_(r,n)>1?[s_(n,e),n_(r,e)]:function(t,e){const n=ct(t),r=ct(e),i=a_(n,r),o=Math.abs(mc(n,r));n.setDate(n.getDate()-i*o);const s=i*(o-+(a_(n,r)===-i));return 0===s?0:s}(r,n)>1?[c_(n,e),l_(r,e)]:function(t,e){const n=h_(t,e)/dc;return u_(void 0)(n)}(r,n)>1?[p_(n,e),f_(r,e)]:m_(r,n)>30?[y_(n,30*e),g_(r,30*e)]:m_(r,n)>1?[y_(n,e),g_(r,e)]:v_(r,n)>15?[b_(n,15*e),__(r,15*e)]:v_(r,n)>1?[b_(n,e),__(r,e)]:[n,r]}(e,ac(n,"timeScale","addSpaceOnEdges")):function([t,e],n,r){const i=(e-t)*n,o=e<=0&&e+i>0?0:e+i;let s=t>=0&&t-i<0?0:t-i;if(r===H.LOG&&s<=0){if(t<=0)throw Error("Data must have values greater than 0 if log scale type is used.");s=t}return[s,o]}(e,.1,r.scaleType)}findVerticalAxesPositions(){const t=this.model.getOptions(),e=ac(t,"axes"),n=this.isDualAxes();return null===ac(e,B.LEFT)&&null!==ac(e,B.RIGHT)||!0===ac(e,B.RIGHT,"main")||n&&ac(e,B.LEFT,"correspondingDatasets")?{primary:B.RIGHT,secondary:B.LEFT}:{primary:B.LEFT,secondary:B.RIGHT}}findHorizontalAxesPositions(){const t=this.model.getOptions(),e=ac(t,"axes"),n=this.isDualAxes();return null===ac(e,B.BOTTOM)&&null!==ac(e,B.TOP)||!0===ac(e,B.TOP,"main")||n&&ac(e,B.BOTTOM,"correspondingDatasets")?{primary:B.TOP,secondary:B.BOTTOM}:{primary:B.BOTTOM,secondary:B.TOP}}findDomainAndRangeAxesPositions(t,e){const n=this.model.getOptions(),r=ac(n,"axes",t.primary),i=ac(n,"axes",e.primary),o=r.scaleType||H.LINEAR,s=i.scaleType||H.LINEAR,a={primaryDomainAxisPosition:null,secondaryDomainAxisPosition:null,primaryRangeAxisPosition:null,secondaryRangeAxisPosition:null};return a.primaryDomainAxisPosition=e.primary,a.primaryRangeAxisPosition=t.primary,a.secondaryDomainAxisPosition=e.secondary,a.secondaryRangeAxisPosition=t.secondary,(!(s===H.LABELS||s===H.TIME)&&o===H.LABELS||o===H.TIME)&&(a.primaryDomainAxisPosition=t.primary,a.primaryRangeAxisPosition=e.primary,a.secondaryDomainAxisPosition=t.secondary,a.secondaryRangeAxisPosition=e.secondary),a}getScaleDomain(t){const e=this.model.getOptions(),n=ac(e,"axes",t),r=ac(e,"bounds"),{includeZero:i}=n,o=ac(n,"scaleType")||H.LINEAR;if(this.model.isDataEmpty())return[];if(n.binned){const{bins:t}=this.model.getBinConfigurations();return[0,gi(t,(t=>t.length))]}if(n.limitDomainToBins){const{bins:t}=this.model.getBinConfigurations(),e=this.model.getStackKeys({bins:t});return[e[0].split(":")[0],e[e.length-1].split(":")[1]]}const s=this.model.getDisplayData(),{extendLinearDomainBy:a,mapsTo:l,percentage:c,thresholds:u}=n,{reference:h,compareTo:d}=ul;if(n.domain)return o===H.LABELS?n.domain:(o===H.TIME&&(n.domain=n.domain.map((t=>void 0===t.getTime?new Date(t):t))),this.extendsDomain(t,n.domain));if(c)return[0,100];if(n&&o===H.LABELS)return Jr(s.map((t=>t[l])));let f,p;const m=this.model.getDataGroupNames();if(o===H.LABELS_RATIO)return s.map((t=>`${t[h]}/${t[d]}`));if(o===H.TIME)p=s.map((t=>+new Date(t[l])));else if(r&&e.axes)p=[],s.forEach((t=>{p.push(t[l]),t[r.upperBoundMapsTo]&&p.push(t[r.upperBoundMapsTo]),t[r.lowerBoundMapsTo]&&p.push(t[r.lowerBoundMapsTo])}));else if(!0===n.stacked&&m&&t===this.getRangeAxisPosition()){const{groupMapsTo:t}=e.data,n=this.model.getDataValuesGroupedByKeys({groups:m}),r=s.filter((e=>!m.includes(e[t]))),i=[];n.forEach((t=>{const{...e}=t;let n=0,r=0;Object.values(iv(e,"sharedStackKey")).forEach((t=>{isNaN(t)||(t<0?r+=t:n+=t)})),i.push([r,n])})),p=[...tv(i),...r.map((t=>t[l]))]}else p=[],s.forEach((t=>{const e=t[l];Array.isArray(e)&&2===e.length?(p.push(e[0]),p.push(e[1])):(a&&p.push(Math.max(t[l],t[a])),p.push(e))}));return o!==H.TIME&&o!==H.LOG&&i&&p.push(0),u&&u.length>0&&u.forEach((t=>{const e=ac(t,"value");null!==e&&p.push(e)})),f=oi(p),f=this.extendsDomain(t,f),f}createScale(t){const e=this.model.getOptions(),n=ac(e,"axes",t);if(!n)return null;const r=ac(n,"scaleType")||H.LINEAR;let i;return this.scaleTypes[t]=r,i=r===H.TIME?Ud():r===H.LOG?hv().base(n.base||10):r===H.LABELS||r===H.LABELS_RATIO?Tu():il(),i.domain(this.getScaleDomain(t)),i}getDomainLowerBound(t){let e,n=0;return e=this.getOrientation()===j.VERTICAL?this.getMainYScale().domain():this.getMainXScale().domain(),!1===ac(this.model.getOptions(),"axes",t,"includeZero")&&e[0]>0&&e[1]>0&&(n=e[0]),n}getHighestDomainThreshold(){const t=ac(this.model.getOptions(),"axes"),e=this.getDomainAxisPosition(),{thresholds:n}=t[e];if(!Array.isArray(n)||Array.isArray(n)&&!n.length)return null;const r=this.getDomainScale(),i=n.sort(((t,e)=>e.value-t.value))[0];return this.getScaleTypeByPosition(e)===H.TIME&&("string"==typeof i.value||void 0===i.value.getTime)&&(i.value=new Date(i.value)),{threshold:i,scaleValue:r(i.value)}}getHighestRangeThreshold(){const t=ac(this.model.getOptions(),"axes"),e=this.getRangeAxisPosition(),{thresholds:n}=t[e];if(!Array.isArray(n)||Array.isArray(n)&&!n.length)return null;const r=this.getRangeScale(),i=n.sort(((t,e)=>e.value-t.value))[0];return{threshold:i,scaleValue:r(i.value)}}}class E_ extends If{constructor(){super(...arguments),this.curveTypes={curveLinear:Qd,curveLinearClosed:ef,curveBasis:pv,curveBasisClosed:gv,curveBasisOpen:vv,curveBundle:bv,curveCardinal:xv,curveCardinalClosed:Ov,curveCardinalOpen:Mv,curveCatmullRom:Dv,curveCatmullRomClosed:Lv,curveCatmullRomOpen:Pv,curveMonotoneX:$v,curveMonotoneY:zv,curveNatural:Wv,curveStep:Zv,curveStepAfter:Xv,curveStepBefore:qv}}getD3Curve(){let t="curveLinear";const e=this.model.getOptions().curve;if(e&&(t="string"==typeof e?e:e.name),this.curveTypes[t]){let n=this.curveTypes[t];return e&&Object.keys(e).forEach((t=>{n[t]&&(n=n[t](e[t]))})),n}return console.warn(`The curve type '${t}' is invalid, using 'curveLinear' instead`),this.curveTypes.curveLinear}}class x_ extends If{isZoomBarEnabled(){if(!this.services.cartesianScales||!ac(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();const t=this.services.cartesianScales.getMainXAxisPosition(),e=ac(this.model.getOptions(),"axes",t,"scaleType");return t===B.BOTTOM&&e===H.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 e=t||this.services.zoom.getZoomBarData(),{cartesianScales:n}=this.services;if(!n)throw new Error("Services cartesianScales undefined");const r=n.getMainXAxisPosition(),i=n.getDomainIdentifier(),o=ac(this.model.getOptions(),"axes",r,"domain");if(Array.isArray(o)&&2===o.length)return o;if(!r)throw new Error("Not defined: mainXAxisPosition");return n.extendsDomain(r,oi(e,(t=>t[i])))}handleDomainChange(t,e={dispatchEvent:!0}){var n;this.model.set({zoomDomain:t},{animate:!1}),e.dispatchEvent&&(null==(n=this.services.events)||n.dispatchEvent(R.ZoomDomain.CHANGE,{newDomain:t}))}getZoomRatio(){return ac(this.model.getOptions(),"zoomBar","zoomRatio")}filterDataForRangeAxis(t,e){var n;const r=this.model.get("zoomDomain"),i=Object.assign({stacked:!1},e),o=ac(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&o&&r){const e=i.stacked?"sharedStackKey":null==(n=this.services.cartesianScales)?void 0:n.getDomainIdentifier(),o=t.filter((t=>new Date(t[e])>=r[0]&&new Date(t[e])<=r[1]));if(o.length>0)return o}return t}zoomIn(t=this.getZoomRatio()){var e;const n=this.model.get("zoomDomain"),r=_l.handleWidth,i=null==(e=this.services.cartesianScales)?void 0:e.getMainXScale().copy();i.domain(this.getDefaultZoomBarDomain());const o=i(n[0]),s=i(n[1]);if(s-o<r+1)return;const a=i.range(),l=s-o,c=Math.min((a[1]-a[0])/2*(t/2),l/2);let u=o+c,h=s-c;u>=h&&(u=o+l/2-r/2,h=s-l/2+r/2);const d=[i.invert(u),i.invert(h)];(n[0].valueOf()!==d[0].valueOf()||n[1].valueOf()!==d[1].valueOf())&&this.handleDomainChange(d)}zoomOut(t=this.getZoomRatio()){const e=this.model.get("zoomDomain");if(!this.services.cartesianScales)throw new Error("Services cartesianScales undefined");const n=this.services.cartesianScales.getMainXScale().copy();n.domain(this.getDefaultZoomBarDomain());const r=n(e[0]),i=n(e[1]),o=n.range(),s=(o[1]-o[0])/2*(t/2),a=Math.max(r-s,o[0]),l=Math.min(i+s,o[1]),c=[n.invert(a),n.invert(l)];(e[0].valueOf()!==c[0].valueOf()||e[1].valueOf()!==c[1].valueOf())&&this.handleDomainChange(c)}resetZoomDomain(){const t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();(t[0].valueOf()!==e[0].valueOf()||t[1].valueOf()!==e[1].valueOf())&&this.handleDomainChange(e)}isMinZoomDomain(){const t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!(!t||!e)&&(t[1].valueOf()-t[0].valueOf())/(e[1].valueOf()-e[0].valueOf())<ac(this.model.getOptions(),"zoomBar","minZoomRatio")}isMaxZoomDomain(){const t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!(!t||!e||t[0].valueOf()!==e[0].valueOf()||t[1].valueOf()!==e[1].valueOf())}isEmptyState(){return 0===this.getZoomBarData().length}isZoomBarLoading(t){return ac(this.model.getOptions(),"zoomBar",t,"loading")}isZoomBarLocked(t){return ac(this.model.getOptions(),"zoomBar",t,"locked")}}var T_=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function O_(t){return T_.test(t)}var S_="\\ud800-\\udfff",M_="["+S_+"]",A_="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",C_="\\ud83c[\\udffb-\\udfff]",D_="[^"+S_+"]",k_="(?:\\ud83c[\\udde6-\\uddff]){2}",L_="[\\ud800-\\udbff][\\udc00-\\udfff]",R_="(?:"+A_+"|"+C_+")?",P_="[\\ufe0e\\ufe0f]?",I_=P_+R_+"(?:\\u200d(?:"+[D_,k_,L_].join("|")+")"+P_+R_+")*",N_="(?:"+[D_+A_+"?",A_,k_,L_,M_].join("|")+")",B_=RegExp(C_+"(?="+C_+")|"+N_+I_,"g");var U_=function(t){var e=O_(t=mn(t))?function(t){return O_(t)?function(t){return t.match(B_)||[]}(t):function(t){return t.split("")}(t)}(t):void 0,n=e?e[0]:t.charAt(0),r=e?function(t,e,n){var r=t.length;return ev(t,1,n=void 0===n?r:n)}(e).join(""):t.slice(1);return n.toUpperCase()+r};dp((function(t,e,n){return e=e.toLowerCase(),t+(n?function(t){return U_(mn(t).toLowerCase())}(e):e)}));class F_{constructor(t,e){this.components=[],this.services={canvasZoom:Kv,domUtils:Nf,events:Qv,files:Jv,gradientUtils:Bf,transitions:t_},this.model=new hu(this.services)}init(t,e){this.model.set({holder:t},{skipUpdate:!0}),Object.keys(this.services).forEach((t=>{const e=this.services[t];this.services[t]=new e(this.model,this.services)})),this.services.events.addEventListener(R.Model.UPDATE,(t=>{const e=!!ac(t,"detail","animate");this.update(e)})),this.model.setData(e.data),this.services.events.addEventListener(R.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((t=>{this.services[t].update()})),this.components.forEach((e=>e.render(t)));const e=this.services.transitions.getPendingTransitions(),n=Object.keys(e).map((t=>e[t].end().catch((t=>t))));Promise.all(n).then((()=>this.services.events.dispatchEvent(R.Chart.RENDER_FINISHED)))}destroy(){this.components.forEach((t=>t.destroy())),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},{skipUpdate:!0})}getChartComponents(t,e){const n=this.model.getOptions(),r=ac(n,"toolbar","enabled"),i={id:"legend",components:[new xy(this.model,this.services)],growth:Y.PREFERRED},o=ac(n,"canvasZoom","enabled");o&&!0===o&&t.push(new Oy(this.model,this.services));const s=!!this.model.getOptions().title,a={id:"title",components:[new Ey(this.model,this.services)],growth:Y.STRETCH},l={id:"toolbar",components:[new Ng(this.model,this.services)],growth:Y.PREFERRED},c={id:"header",components:[new Ug(this.model,this.services,[a,...r?[l]:[]],{direction:W.ROW,alignItems:Z.CENTER})],growth:Y.PREFERRED},u={id:"graph-frame",components:t,growth:Y.STRETCH,renderType:ac(e,"graphFrameRenderType")||P.SVG},h=!0!==ac(e,"excludeLegend")&&!1!==n.legend.enabled;let d=W.COLUMN;if(h){const t=ac(n,"legend","position");"left"===t?(d=W.ROW,n.legend.orientation||(n.legend.orientation=G.VERTICAL)):"right"===t?(d=W.ROW_REVERSE,n.legend.orientation||(n.legend.orientation=G.VERTICAL)):"bottom"===t&&(d=W.COLUMN_REVERSE)}const f={id:"spacer",components:[new Fg(this.model,this.services)],growth:Y.PREFERRED},p={id:"full-frame",components:[new Ug(this.model,this.services,[...h?[i]:[],...h?[f]:[],u],{direction:d})],growth:Y.STRETCH},m=[];if(s||r){m.push(c);const t={id:"spacer",components:[new Fg(this.model,this.services,r?{size:15}:void 0)],growth:Y.PREFERRED};m.push(t)}return m.push(p),[new Cy(this.model,this.services),new wy(this.model,this.services),new Ug(this.model,this.services,m,{direction:W.COLUMN})]}}class j_ extends F_{constructor(t,e){super(t,e),this.services=Object.assign(this.services,{cartesianScales:w_,curves:E_,zoom:x_}),this.model=new du(this.services)}getAxisChartComponents(t,e){const n=this.model.getOptions(),r=ac(n,"zoomBar",B.TOP,"enabled"),i=ac(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const o=this.services.cartesianScales.getMainXAxisPosition(),s=ac(n,"axes",o,"scaleType"),a=r&&o===B.BOTTOM&&s===H.TIME,l=this.services.zoom.isZoomBarLocked(B.TOP),c=!!this.model.getOptions().title,u={id:"title",components:[new Ey(this.model,this.services)],growth:Y.STRETCH},h={id:"toolbar",components:[new Ng(this.model,this.services)],growth:Y.PREFERRED},d={id:"header",components:[new Ug(this.model,this.services,[u,...i?[h]:[]],{direction:W.ROW,alignItems:Z.CENTER})],growth:Y.PREFERRED},f={id:"legend",components:[new xy(this.model,this.services)],growth:Y.PREFERRED};a&&!l&&t.push(new Ty(this.model,this.services),new ky(this.model,this.services)),t.push(new Ry(this.model,this.services)),t.push(new Py(this.model,this.services));const p={id:"graph-frame",components:t,growth:Y.STRETCH,renderType:P.SVG},m=!1!==ac(e,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled;let g=W.COLUMN;if(m){const t=ac(this.model.getOptions(),"legend","position");t===$.LEFT?(g=W.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=G.VERTICAL)):t===$.RIGHT?(g=W.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=G.VERTICAL)):t===$.BOTTOM&&(g=W.COLUMN_REVERSE)}const y={id:"spacer",components:[new Fg(this.model,this.services)],growth:Y.PREFERRED},v={id:"full-frame",components:[new Ug(this.model,this.services,[...m?[f]:[],...m?[y]:[],p],{direction:g})],growth:Y.STRETCH},_={id:"zoom-bar",components:[new Ly(this.model,this.services)],growth:Y.PREFERRED,renderType:P.SVG},b=[];if(c||i){b.push(d);const t={id:"spacer",components:[new Fg(this.model,this.services,i?{size:15}:void 0)],growth:Y.PREFERRED};b.push(t)}return a&&b.push(_),b.push(v),[new Iy(this.model,this.services),new wy(this.model,this.services),new Ug(this.model,this.services,b,{direction:W.COLUMN})]}}Q.LINE,Q.SCATTER,Q.AREA,Q.STACKED_AREA,Q.SIMPLE_BAR,Q.GROUPED_BAR,Q.STACKED_BAR;class H_ extends j_{constructor(t,e){super(t,e),this.model.setOptions(function(t,e){var n;const r=xr(t),i=Object.keys(e.axes||{});null!=(n=null==e?void 0:e.toolbar)&&n.controls&&delete r.toolbar.controls,0===i.length&&delete r.axes;for(const t in r.axes)if(i.includes(t)){const n=e.axes[t];if((n.primary||n.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://charts.carbondesignsystem.com/"),null==n.mapsTo){const t=n.scaleType;null==t?n.mapsTo="value":t===H.TIME?n.mapsTo="date":t===H.LABELS&&(n.mapsTo="key")}}else delete r.axes[t];return sc(r,e),qr(r,e)}(rc.groupedBarChart,e.options)),this.init(t,e)}getComponents(){const t=[new Gy(this.model,this.services),new Hy(this.model,this.services),new Zy(this.model,this.services),new Wy(this.model,this.services),new Vy(this.model,this.services,{skeleton:q.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}var $_,z_={exports:{}},G_={};z_.exports=function(){if($_)return G_;$_=1;var t=r,e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(t,n,r){var a,l={},c=null,u=null;for(a in void 0!==r&&(c=""+r),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(u=n.ref),n)i.call(n,a)&&!s.hasOwnProperty(a)&&(l[a]=n[a]);if(t&&t.defaultProps)for(a in n=t.defaultProps)void 0===l[a]&&(l[a]=n[a]);return{$$typeof:e,type:t,key:c,ref:u,props:l,_owner:o.current}}return G_.Fragment=n,G_.jsx=a,G_.jsxs=a,G_}();var V_=z_.exports;class W_ extends r.PureComponent{constructor(){super(...arguments),o(this,"chart"),o(this,"chartRef",r.createRef())}createChart(t,e,n){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(t){var e,n;this.props.data!==t.data&&(null==(e=this.chart)||e.model.setData(this.props.data)),this.props.options!==t.options&&(null==(n=this.chart)||n.model.setOptions(this.props.options))}render(){return V_.jsx("div",{ref:this.chartRef,className:"chart-holder"})}}class Y_ extends W_{createChart(t,e,n){return new H_(t,{data:e,options:n})}}!function(t){!function(){var e={}.hasOwnProperty;function n(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(t=i(t,r(n)))}return t}function r(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var r="";for(var o in t)e.call(t,o)&&t[o]&&(r=i(r,o));return r}function i(t,e){return e?t?t+" "+e:t+e:t}t.exports?(n.default=n,t.exports=n):window.classNames=n}()}({exports:{}})}}]);
|