@perses-dev/prometheus-plugin 0.51.0-beta.2 → 0.51.0-rc.1

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.
Files changed (98) hide show
  1. package/__mf/css/async/8909.dacad691.css +1 -0
  2. package/__mf/css/async/9263.dacad691.css +1 -0
  3. package/__mf/js/{622.f7592106.js → 622.d6ff9685.js} +1 -1
  4. package/__mf/js/{Prometheus.328aad7c.js → Prometheus.bee3ab4b.js} +3 -3
  5. package/__mf/js/async/1407.a7511546.js +7 -0
  6. package/__mf/js/async/1742.c468cb18.js +1 -0
  7. package/__mf/js/async/1959.ad668ff3.js +23 -0
  8. package/__mf/js/async/2285.15378f70.js +1 -0
  9. package/__mf/js/async/2292.37cc6c8f.js +2 -0
  10. package/__mf/js/async/2581.7c85a457.js +1 -0
  11. package/__mf/js/async/2641.1cd3c706.js +1 -0
  12. package/__mf/js/async/2675.99cf926f.js +1 -0
  13. package/__mf/js/async/4062.3ab7f987.js +1 -0
  14. package/__mf/js/async/4421.d4715b5f.js +1 -0
  15. package/__mf/js/async/4425.4a89f3b8.js +1 -0
  16. package/__mf/js/async/4659.c56181df.js +1 -0
  17. package/__mf/js/async/4665.70feb200.js +1 -0
  18. package/__mf/js/async/4800.e23c630f.js +1 -0
  19. package/__mf/js/async/{5345.8c2e4b4a.js → 5345.05718f02.js} +1 -1
  20. package/__mf/js/async/5409.d646c006.js +1 -0
  21. package/__mf/js/async/5769.f14c9663.js +1 -0
  22. package/__mf/js/async/{5913.9d30fd07.js → 5913.c7536be1.js} +3 -3
  23. package/__mf/js/async/6386.d92b974a.js +1 -0
  24. package/__mf/js/async/6712.341e962a.js +1 -0
  25. package/__mf/js/async/7376.c7eb05b9.js +1 -0
  26. package/__mf/js/async/7488.e0afae27.js +23 -0
  27. package/__mf/js/async/8909.a5d96930.js +1 -0
  28. package/__mf/js/async/8980.afe002d4.js +28 -0
  29. package/__mf/js/async/9216.7a78af54.js +1 -0
  30. package/__mf/js/async/9263.2c4799b2.js +1 -0
  31. package/__mf/js/async/9550.e19763f8.js +38 -0
  32. package/__mf/js/async/9611.58220d82.js +1 -0
  33. package/__mf/js/async/__federation_expose_PrometheusDatasource.19952f82.js +1 -0
  34. package/__mf/js/async/__federation_expose_PrometheusExplorer.035ddd24.js +1 -0
  35. package/__mf/js/async/{__federation_expose_PrometheusLabelNamesVariable.86d0ad5a.js → __federation_expose_PrometheusLabelNamesVariable.93231b2e.js} +1 -1
  36. package/__mf/js/async/{__federation_expose_PrometheusLabelValuesVariable.b2893484.js → __federation_expose_PrometheusLabelValuesVariable.f216888c.js} +1 -1
  37. package/__mf/js/async/{__federation_expose_PrometheusPromQLVariable.cd16f6e8.js → __federation_expose_PrometheusPromQLVariable.0060ab26.js} +1 -1
  38. package/__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.4e934fa1.js +1 -0
  39. package/__mf/js/main.8b69f3f7.js +1 -0
  40. package/lib/cjs/explore/PrometheusMetricsFinder/filter/FinderFilters.js +5 -1
  41. package/lib/cjs/model/prometheus-selectors.js +5 -4
  42. package/lib/cjs/plugins/index.js +1 -0
  43. package/lib/cjs/plugins/prometheus-time-series-query/PrometheusTimeSeriesQuery.js +3 -1
  44. package/lib/cjs/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.js +3 -2
  45. package/lib/cjs/plugins/prometheus-time-series-query/get-time-series-data.js +4 -2
  46. package/lib/explore/PrometheusMetricsFinder/filter/FinderFilters.d.ts.map +1 -1
  47. package/lib/explore/PrometheusMetricsFinder/filter/FinderFilters.js +6 -2
  48. package/lib/explore/PrometheusMetricsFinder/filter/FinderFilters.js.map +1 -1
  49. package/lib/model/prometheus-selectors.d.ts +5 -4
  50. package/lib/model/prometheus-selectors.d.ts.map +1 -1
  51. package/lib/model/prometheus-selectors.js +7 -6
  52. package/lib/model/prometheus-selectors.js.map +1 -1
  53. package/lib/plugins/index.d.ts +1 -0
  54. package/lib/plugins/index.d.ts.map +1 -1
  55. package/lib/plugins/index.js +1 -0
  56. package/lib/plugins/index.js.map +1 -1
  57. package/lib/plugins/prometheus-time-series-query/PrometheusTimeSeriesQuery.d.ts.map +1 -1
  58. package/lib/plugins/prometheus-time-series-query/PrometheusTimeSeriesQuery.js +4 -2
  59. package/lib/plugins/prometheus-time-series-query/PrometheusTimeSeriesQuery.js.map +1 -1
  60. package/lib/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.d.ts.map +1 -1
  61. package/lib/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.js +4 -3
  62. package/lib/plugins/prometheus-time-series-query/PrometheusTimeSeriesQueryEditor.js.map +1 -1
  63. package/lib/plugins/prometheus-time-series-query/get-time-series-data.d.ts.map +1 -1
  64. package/lib/plugins/prometheus-time-series-query/get-time-series-data.js +6 -4
  65. package/lib/plugins/prometheus-time-series-query/get-time-series-data.js.map +1 -1
  66. package/lib/plugins/prometheus-time-series-query/time-series-query-model.d.ts +2 -1
  67. package/lib/plugins/prometheus-time-series-query/time-series-query-model.d.ts.map +1 -1
  68. package/lib/plugins/prometheus-time-series-query/time-series-query-model.js.map +1 -1
  69. package/mf-manifest.json +287 -235
  70. package/mf-stats.json +293 -241
  71. package/package.json +9 -7
  72. package/__mf/js/async/1495.6c8b8071.js +0 -1
  73. package/__mf/js/async/1864.df7c4beb.js +0 -1
  74. package/__mf/js/async/1950.704c331e.js +0 -1
  75. package/__mf/js/async/1996.01084c88.js +0 -2
  76. package/__mf/js/async/212.bd5d617a.js +0 -1
  77. package/__mf/js/async/2316.fec4907a.js +0 -1
  78. package/__mf/js/async/2675.c3b73822.js +0 -1
  79. package/__mf/js/async/3436.97c926a4.js +0 -1
  80. package/__mf/js/async/3818.dde21d04.js +0 -1
  81. package/__mf/js/async/4421.1bcc1637.js +0 -1
  82. package/__mf/js/async/4489.3361e7bc.js +0 -29
  83. package/__mf/js/async/537.6911ea2e.js +0 -1
  84. package/__mf/js/async/5387.fd6e16d6.js +0 -1
  85. package/__mf/js/async/5654.ecb41aea.js +0 -38
  86. package/__mf/js/async/684.ca510333.js +0 -1
  87. package/__mf/js/async/8265.b9e2c31e.js +0 -1
  88. package/__mf/js/async/8587.4891ea90.js +0 -1
  89. package/__mf/js/async/8610.8300df79.js +0 -1
  90. package/__mf/js/async/87.fdc843ac.js +0 -1
  91. package/__mf/js/async/8997.18901f45.js +0 -28
  92. package/__mf/js/async/__federation_expose_PrometheusDatasource.f6f57299.js +0 -1
  93. package/__mf/js/async/__federation_expose_PrometheusExplorer.5fcf955a.js +0 -1
  94. package/__mf/js/async/__federation_expose_PrometheusTimeSeriesQuery.eb9eefa6.js +0 -1
  95. package/__mf/js/main.154a5b65.js +0 -1
  96. /package/__mf/js/async/{4489.3361e7bc.js.LICENSE.txt → 1407.a7511546.js.LICENSE.txt} +0 -0
  97. /package/__mf/js/async/{1996.01084c88.js.LICENSE.txt → 2292.37cc6c8f.js.LICENSE.txt} +0 -0
  98. /package/__mf/js/async/{5913.9d30fd07.js.LICENSE.txt → 5913.c7536be1.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkPrometheus=self.webpackChunkPrometheus||[]).push([["1742"],{70313:function(e,r,t){t.d(r,{d:()=>i});var s=t(54538),n=t(97048),o=t(81925),u=t(80668),a=t(94680);function d(e){return e.substring(2).toLowerCase()}function i(e){let{children:r,disableReactTree:t=!1,mouseEvent:i="onClick",onClickAway:l,touchEvent:c="onTouchEnd"}=e,p=s.useRef(!1),m=s.useRef(null),f=s.useRef(!1),M=s.useRef(!1);s.useEffect(()=>(setTimeout(()=>{f.current=!0},0),()=>{f.current=!1}),[]);let h=(0,n.Z)((0,a.Z)(r),m),y=(0,o.Z)(e=>{let r;let s=M.current;M.current=!1;let n=(0,u.Z)(m.current);if(f.current&&m.current&&(!("clientX"in e)||!(n.documentElement.clientWidth<e.clientX)&&!(n.documentElement.clientHeight<e.clientY))){if(p.current){p.current=!1;return}(e.composedPath?e.composedPath().includes(m.current):!n.documentElement.contains(e.target)||m.current.contains(e.target))||!t&&s||l(e)}}),v=e=>t=>{M.current=!0;let s=r.props[e];s&&s(t)},x={ref:h};return!1!==c&&(x[c]=v(c)),s.useEffect(()=>{if(!1!==c){let e=d(c),r=(0,u.Z)(m.current),t=()=>{p.current=!0};return r.addEventListener(e,y),r.addEventListener("touchmove",t),()=>{r.removeEventListener(e,y),r.removeEventListener("touchmove",t)}}},[y,c]),!1!==i&&(x[i]=v(i)),s.useEffect(()=>{if(!1!==i){let e=d(i),r=(0,u.Z)(m.current);return r.addEventListener(e,y),()=>{r.removeEventListener(e,y)}}},[y,i]),s.cloneElement(r,x)}},85843:function(e,r,t){t.d(r,{Z:()=>h});var s=t(54538),n=t(90496),o=t(82267),u=t(12709),a=t(51751),d=t(44124),i=t(6749);function l(e){return(0,i.ZP)("MuiFormGroup",e)}(0,d.Z)("MuiFormGroup",["root","row","error"]);var c=t(36683),p=t(33567),m=t(24246);let f=e=>{let{classes:r,row:t,error:s}=e;return(0,o.Z)({root:["root",t&&"row",s&&"error"]},l,r)},M=(0,u.ZP)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,r)=>{let{ownerState:t}=e;return[r.root,t.row&&r.row]}})({display:"flex",flexDirection:"column",flexWrap:"wrap",variants:[{props:{row:!0},style:{flexDirection:"row"}}]}),h=s.forwardRef(function(e,r){let t=(0,a.i)({props:e,name:"MuiFormGroup"}),{className:s,row:o=!1,...u}=t,d=(0,c.Z)(),i=(0,p.Z)({props:t,muiFormControl:d,states:["error"]}),l={...t,row:o,error:i.error},h=f(l);return(0,m.jsx)(M,{className:(0,n.Z)(h.root,s),ownerState:l,ref:r,...u})})},29085:function(e,r,t){t.d(r,{Gt:()=>i,Ib:()=>a,LU:()=>l,YF:()=>p,fs:()=>d,s3:()=>n,sG:()=>o});var s=t(20461);function n(e){return void 0!==e.pastDuration}function o(e){let r=e.end??new Date;return{start:(0,s.sub)(r,a(e.pastDuration)),end:r}}let u=/^(?:(\d+)y)?(?:(\d+)w)?(?:(\d+)d)?(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?(?:(\d+)ms)?$/;function a(e){let r=u.exec(e);if(null===r)throw Error(`Invalid duration string '${e}'`);return{years:parseInt(r[1]??"0"),months:0,weeks:parseInt(r[2]??"0"),days:parseInt(r[3]??"0"),hours:parseInt(r[4]??"0"),minutes:parseInt(r[5]??"0"),seconds:parseInt(r[6]??"0")+parseInt(r[7]??"0")/1e3}}function d(e){return""!==e&&u.test(e)}function i(e){return function(e){let r=Math.trunc(e/31536e6);r>0&&(e-=31536e6*r);let t=Math.trunc(e/6048e5);t>0&&(e-=6048e5*t);let s=Math.trunc(e/864e5);s>0&&(e-=864e5*s);let n=Math.trunc(e/36e5);n>0&&(e-=36e5*n);let o=Math.trunc(e/6e4);return o>0&&(e-=6e4*o),{years:r,months:0,weeks:t,days:s,hours:n,minutes:o,seconds:e/1e3}}(e.end.valueOf()-e.start.valueOf())}function l(e){let r=[];if(e.years&&r.push(`${e.years}y`),e.weeks&&r.push(`${e.weeks}w`),e.days&&r.push(`${e.days}d`),e.hours&&r.push(`${e.hours}h`),e.minutes&&r.push(`${e.minutes}m`),e.seconds){let t=Math.trunc(e.seconds);t&&r.push(`${t}s`);let s=Math.round((e.seconds-t)*1e3);s&&r.push(`${s}ms`)}return r.join("")}let c=[{maxMs:15,roundedStepMs:10,display:"0.01s"},{maxMs:35,roundedStepMs:20,display:"0.02s"},{maxMs:75,roundedStepMs:50,display:"0.05s"},{maxMs:150,roundedStepMs:100,display:"0.1s"},{maxMs:350,roundedStepMs:200,display:"0.2s"},{maxMs:750,roundedStepMs:500,display:"0.5s"},{maxMs:1500,roundedStepMs:1e3,display:"1s"},{maxMs:3500,roundedStepMs:2e3,display:"2s"},{maxMs:7500,roundedStepMs:5e3,display:"5s"},{maxMs:12500,roundedStepMs:1e4,display:"10s"},{maxMs:17500,roundedStepMs:15e3,display:"15s"},{maxMs:25e3,roundedStepMs:2e4,display:"20s"},{maxMs:45e3,roundedStepMs:3e4,display:"30s"},{maxMs:9e4,roundedStepMs:6e4,display:"1m"},{maxMs:21e4,roundedStepMs:12e4,display:"2m"},{maxMs:45e4,roundedStepMs:3e5,display:"5m"},{maxMs:75e4,roundedStepMs:6e5,display:"10m"},{maxMs:75e4,roundedStepMs:9e5,display:"15m"},{maxMs:15e5,roundedStepMs:12e5,display:"20m"},{maxMs:27e5,roundedStepMs:18e5,display:"30m"},{maxMs:54e5,roundedStepMs:36e5,display:"1h"},{maxMs:9e6,roundedStepMs:72e5,display:"2h"},{maxMs:162e5,roundedStepMs:108e5,display:"3h"},{maxMs:324e5,roundedStepMs:216e5,display:"6h"},{maxMs:864e5,roundedStepMs:432e5,display:"12h"},{maxMs:6048e5,roundedStepMs:864e5,display:"1d"},{maxMs:18144e5,roundedStepMs:6048e5,display:"1w"},{maxMs:36288e5,roundedStepMs:2592e6,display:"30d"},{maxMs:63072e6,roundedStepMs:31536e6,display:"1y"}];function p(e,r){return function(e){for(let{maxMs:r,roundedStepMs:t}of c)if(e<r)return t;return 15e3}(Math.floor((e.end.valueOf()-e.start.valueOf())/r))}},67469:function(e,r,t){t.d(r,{z:()=>n});var s=t(54538);function n(e){let r=(0,s.useRef)(e);return(0,s.useLayoutEffect)(()=>{r.current=e}),(0,s.useCallback)((...e)=>r.current(...e),[])}},14371:function(e,r,t){r.default=void 0;var s,n=(s=t(30265))&&s.__esModule?s:{default:s};r.default=(0,n.default)("M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z","OpenInNew")},494:function(e,r,t){t.d(r,{F:()=>u});var s=t(84275),n=t(57576),o=function(e,r){for(var t={};e.length;){var s=e[0],o=s.code,u=s.message,a=s.path.join(".");if(!t[a]){if("unionErrors"in s){var d=s.unionErrors[0].errors[0];t[a]={message:d.message,type:d.code}}else t[a]={message:u,type:o}}if("unionErrors"in s&&s.unionErrors.forEach(function(r){return r.errors.forEach(function(r){return e.push(r)})}),r){var i=t[a].types,l=i&&i[s.code];t[a]=(0,n.appendErrors)(a,r,t,o,l?[].concat(l,s.message):s.message)}e.shift()}return t},u=function(e,r,t){return void 0===t&&(t={}),function(n,u,a){try{return Promise.resolve(function(o,u){try{var d=Promise.resolve(e["sync"===t.mode?"parse":"parseAsync"](n,r)).then(function(e){return a.shouldUseNativeValidation&&(0,s.validateFieldsNatively)({},a),{errors:{},values:t.raw?n:e}})}catch(e){return u(e)}return d&&d.then?d.then(void 0,u):d}(0,function(e){if(Array.isArray(null==e?void 0:e.errors))return{values:{},errors:(0,s.toNestErrors)(o(e.errors,!a.shouldUseNativeValidation&&"all"===a.criteriaMode),a)};throw e}))}catch(e){return Promise.reject(e)}}}}}]);
@@ -0,0 +1,23 @@
1
+ "use strict";(self.webpackChunkPrometheus=self.webpackChunkPrometheus||[]).push([["1959"],{4208:function(e,t,n){let i;n.r(t),n.d(t,{ErrorAlert:()=>tX,JSONEditor:()=>t8,INCREASE_NEARBY_SERIES_MULTIPLIER:()=>nJ,OptionsEditorGroup:()=>ip,DensitySelector:()=>tI,assembleTransform:()=>n4,clearHighlightedSeries:()=>nU,getColorsForValues:()=>rH,ErrorBoundary:()=>tq.ErrorBoundary,SeriesMarker:()=>nF,TimeRangeSelector:()=>iK,testChartsTheme:()=>i8,ChartsThemeContext:()=>P,TextOverlay:()=>im,hexToHSL:()=>rB,DEFAULT_COLUMN_HEIGHT:()=>eV,useMousePosition:()=>nM,NoDataOverlay:()=>ix,generateChartsTheme:()=>i3,OptionsEditorGrid:()=>ih,OPTIMIZED_MODE_SERIES_LIMIT:()=>n$,TOOLTIP_ADJUST_Y_POS_MULTIPLIER:()=>nv,DiscardChangesConfirmationDialog:()=>tx,getDateRange:()=>Q,EMPHASIZED_SERIES_DESCRIPTION:()=>nj,useChartsTheme:()=>N,persesColumnsToTanstackColumns:()=>eY,mockChartsContext:()=>i9,Legend:()=>tr,TOOLTIP_DATE_FORMAT:()=>nZ,TOOLTIP_MAX_WIDTH:()=>nm,dateFormatOptionsWithTimeZone:()=>no,legacyCheckforNearbySeries:()=>n5,ToolbarIconButton:()=>iq,PIN_TOOLTIP_HELP_TEXT:()=>nT,checkforNearbyTimeSeries:()=>n1,getTheme:()=>ry,PieChart:()=>rP,TooltipHeader:()=>nW,TOOLTIP_BG_COLOR_FALLBACK:()=>nw,UNPIN_TOOLTIP_HELP_TEXT:()=>nA,DateTimeRangePicker:()=>iG,handleMoveUp:()=>tB,getClosestTimestamp:()=>nX,getFormattedAxis:()=>J,formatWithTimeZone:()=>na,batchDispatchNearbySeriesActions:()=>nG,useTimeZone:()=>np,ChartsProvider:()=>L,isWithinPercentageRange:()=>n3,TOOLTIP_MIN_WIDTH:()=>ng,StatusHistoryChart:()=>rz,TOOLTIP_LABELS_MAX_WIDTH:()=>nf,getYBuffer:()=>n7,DEFAULT_PINNED_CROSSHAIR:()=>nB,LineChartTooltip:()=>n9,FormatControls:()=>i0,TooltipContent:()=>nR,hslToHex:()=>r_,SHOW_FEWER_SERIES_LIMIT:()=>n0,TimeChartTooltip:()=>iN,getClosestTimestampInFullDataset:()=>nq,getTableCellLayout:()=>eU,EChart:()=>K,PINNED_CROSSHAIR_SERIES_NAME:()=>nH,SortSelector:()=>ib,SnackbarProvider:()=>i5.wT,Drawer:()=>tG,AlignSelector:()=>s,LinksEditor:()=>io,ValueMappingsEditor:()=>rG,TimeZoneContext:()=>nu,GaugeChart:()=>t2,LineChart:()=>ie,SeriesLabelsStack:()=>nL,checkCrosshairPinnedStatus:()=>nK,StatChart:()=>iZ,SeriesInfo:()=>nP,ColorPicker:()=>ea,Table:()=>e9,useSnackbar:()=>i2,InfoTooltip:()=>tw,TimeZoneProvider:()=>nh,LoadingOverlay:()=>iv,typography:()=>rf,Dialog:()=>tm,DropIndicator:()=>tE,TransformsEditor:()=>rE,OptionsEditorControl:()=>tk,TOOLTIP_PADDING:()=>ny,getFormattedAxisLabel:()=>nc,SortSelectorButtons:()=>iC,getTooltipStyles:()=>n8,useChartsContext:()=>R,RefreshIntervalPicker:()=>rF,enableDataZoom:()=>n_,useDragAndDropMonitor:()=>tO,combineSx:()=>ey,OptionsEditorColumn:()=>iu,getDateAndTime:()=>nd,ThresholdsEditor:()=>iE,DEFAULT_TOOLTIP_CONFIG:()=>nD,handleMoveDown:()=>t_,DragButton:()=>tV,useId:()=>tb,ContentWithLegend:()=>to,BarChart:()=>ee,getFormattedDate:()=>ns,NEARBY_SERIES_DESCRIPTION:()=>nC,getColorForValue:()=>r$,isLegendItemVisuallySelected:()=>ew,getPointInGrid:()=>nY,EMPTY_TOOLTIP_DATA:()=>nk,legacyGetNearbySeriesData:()=>n6,buildRelativeTimeOption:()=>i7,SettingsAutocomplete:()=>tT,FontSizeSelector:()=>tQ,defaultCursorData:()=>nS,DYNAMIC_NEARBY_SERIES_MULTIPLIER:()=>nQ,FALLBACK_COLOR:()=>rW,getNearbySeriesData:()=>n2,TOOLTIP_MAX_HEIGHT:()=>nx,YAxisLabel:()=>i1,TimeChart:()=>iO,FALLBACK_CHART_WIDTH:()=>nb,DragAndDropElement:()=>tz,getResponsiveValueSize:()=>t6,restoreChart:()=>nV,ModeSelector:()=>ic,TextField:()=>ta,DEFAULT_COLUMN_WIDTH:()=>e_,FormActions:()=>t1,OptionsColorPicker:()=>eu});var r,l=n(24246),o=n(10970),a=n(48565);function s({onChange:e,value:t="left",...n}){let i=t=>{e(t)};return(0,l.jsxs)(o.Z,{"aria-label":"Alignement",...n,children:[(0,l.jsx)(a.Z,{onClick:()=>i("left"),variant:"left"===t?"contained":"outlined",children:"Left"},"left"),(0,l.jsx)(a.Z,{onClick:()=>i("center"),variant:"center"===t?"contained":"outlined",children:"Center"},"center"),(0,l.jsx)(a.Z,{onClick:()=>i("right"),variant:"right"===t?"contained":"outlined",children:"Right"},"right")]})}var c=n(54538),d=n.n(c),u=n(74638);function h(e){return"number"==typeof e}function p(e){return e&&(e<0?e=0:e>20&&(e=20)),e}function g(e,{shortValues:t,decimalPlaces:n}){if(!1===t||1e3>Math.abs(e)){let i={style:"unit",unit:"byte",unitDisplay:"long",useGrouping:!0};return h(n)?(i.minimumFractionDigits=p(n),i.maximumFractionDigits=p(n)):!1!==t&&(i.maximumSignificantDigits=3),Intl.NumberFormat("en-US",i).format(e)}return(0,u.Z)(e).format({output:"byte",base:"decimal",spaceSeparated:!0,mantissa:h(n)?n:2,trimMantissa:!h(n),optionalMantissa:!h(n)})}let m="Percent",x="Time";var f=((r={}).milliseconds="millisecond",r.seconds="second",r.minutes="minute",r.hours="hour",r.days="day",r.weeks="week",r.months="month",r.years="year",r);let v={years:31536e3,months:2592e3,weeks:604800,days:86400,hours:3600,minutes:60,seconds:1,milliseconds:.001},y=["years","months","weeks","days","hours","minutes","seconds","milliseconds"],b="Throughput",C={Time:{label:"Time",decimalPlaces:!0},Percent:{label:"percent",decimalPlaces:!0},Decimal:{label:"Decimal",decimalPlaces:!0,shortValues:!0},Bytes:{label:"Bytes",decimalPlaces:!0,shortValues:!0},Throughput:{label:"Throughput",decimalPlaces:!0}},j={milliseconds:{group:x,label:"Milliseconds"},seconds:{group:x,label:"Seconds"},minutes:{group:x,label:"Minutes"},hours:{group:x,label:"Hours"},days:{group:x,label:"Days"},weeks:{group:x,label:"Weeks"},months:{group:x,label:"Months"},years:{group:x,label:"Years"},percent:{group:m,label:"Percent (0-100)"},"percent-decimal":{group:m,label:"Percent (0.0-1.0)"},"%":{disableSelectorOption:!0,group:m,label:"%"},decimal:{group:"Decimal",label:"Decimal"},bytes:{group:"Bytes",label:"Bytes"},"bits/sec":{group:b,label:"Bits/sec"},"bytes/sec":{group:b,label:"Bytes/sec"},"counts/sec":{group:b,label:"Counts/sec"},"events/sec":{group:b,label:"Events/sec"},"messages/sec":{group:b,label:"Messages/sec"},"ops/sec":{group:b,label:"Ops/sec"},"packets/sec":{group:b,label:"Packets/sec"},"reads/sec":{group:b,label:"Reads/sec"},"requests/sec":{group:b,label:"Requests/sec"},"records/sec":{group:b,label:"Records/sec"},"rows/sec":{group:b,label:"Rows/sec"},"writes/sec":{group:b,label:"Writes/sec"}};function w(e,t){if(void 0===t)return e.toString();if("Bytes"===Z(t))return g(e,t);if("Decimal"===Z(t))return function(e,{shortValues:t,decimalPlaces:n}){let i={style:"decimal",useGrouping:!0};return!1!==t&&(i.notation="compact"),h(n)?(i.minimumFractionDigits=p(n),i.maximumFractionDigits=p(n)):!1!==t&&(i.maximumSignificantDigits=3),Intl.NumberFormat("en-US",i).format(e)}(e,t);if("Percent"===Z(t))return function(e,{unit:t,decimalPlaces:n}){let i={style:"percent",useGrouping:!0};return h(n)?(i.minimumFractionDigits=p(n),i.maximumFractionDigits=p(n)):i.maximumSignificantDigits=3,"percent"===t&&(e/=100),Intl.NumberFormat("en-US",i).format(e)}(e,t);if("Time"===Z(t))return function(e,{unit:t,decimalPlaces:n}){var i;if(0===e)return"0s";let r=function(e,t){let n=e*v[t],i=y[0]||"years",r=i,l=n/v[i];for(r of y)if((l=n/v[r])>=1)break;return{value:l,unit:r}}(e,t),l={style:"unit",unit:f[r.unit],unitDisplay:"months"===(i=r.unit)||"years"===i?"long":"narrow"};return h(n)?(l.minimumFractionDigits=p(n),l.maximumFractionDigits=p(n)):l.maximumSignificantDigits=3,Intl.NumberFormat("en-US",l).format(r.value)}(e,t);if("Throughput"===Z(t))return function(e,{unit:t,shortValues:n,decimalPlaces:i}){if("bytes/sec"===t){let t=1e3>Math.abs(e)?"sec":"s";return g(e,{unit:"bytes",shortValues:n,decimalPlaces:i})+"/"+t}let r={style:"decimal",useGrouping:!0};return!1!==n&&(r.notation="compact"),h(i)?(r.minimumFractionDigits=p(i),r.maximumFractionDigits=p(i)):!1!==n&&(r.maximumSignificantDigits=3),Intl.NumberFormat("en-US",r).format(e)+" "+t}(e,t);throw Error(`Unknown unit options ${t}`)}function Z(e){return j[e.unit].group}function S(e){return C[j[e.unit].group]}var k=n(36232),M=n(508),D=n(65201),T=n(99635),A=n(23709),I=n(67745),E=n(50378),F=n(36372);function L(e){let{children:t,chartsTheme:n,enablePinning:i=!1}=e,[r,o]=(0,c.useState)(null),a=(0,c.useMemo)(()=>({chartsTheme:n,enablePinning:i,lastTooltipPinnedCoords:r,setLastTooltipPinnedCoords:o}),[n,i,r,o]);return(0,l.jsx)(P.Provider,{value:a,children:t})}let P=(0,c.createContext)(void 0);function R(){let e=(0,c.useContext)(P);if(void 0===e)throw Error("No ChartsThemeContext found. Did you forget a Provider?");return e}function N(){return R().chartsTheme}var O=n(59161),z=n(56141),W=n.n(z),$=n(66726),H=n.n($),B=n(8890),_=n(35246),V=n(48906),U=n(27806);(0,k.D)([T.N,V.N,U.N,B.N,_.N,D.N,A.N,I.N,E.N]);let Y=["click","dblclick","mousedown","mousemove","mouseup","mouseover","mouseout","globalout","contextmenu"],G=["datazoom","downplay","highlight"],K=(0,c.memo)(function({option:e,theme:t,renderer:n,sx:i,style:r,onEvents:o,_instance:a,syncGroup:s,onChartInitialized:d}){let u=(0,c.useRef)(e),h=(0,c.useRef)(e),p=(0,c.useRef)(null),g=(0,c.useRef)(null);return(0,c.useLayoutEffect)(()=>{if(null!==p.current&&null===g.current&&(g.current=(0,O.S1)(p.current,t,{renderer:n??"canvas"}),void 0!==g.current))return g.current.setOption(u.current,!0),d?.(g.current),void 0!==a&&(a.current=g.current),()=>{null!==g.current&&(g.current.dispose(),g.current=null)}},[a,d,t,n]),(0,c.useEffect)(()=>{g.current&&s&&(g.current.group=s,(0,O.$j)([g.current]))},[s,g]),(0,c.useEffect)(()=>{!(void 0===h.current||W()(h.current,e))&&g.current&&(g.current.setOption(e,!0),h.current=e)},[e]),(0,c.useLayoutEffect)(()=>{let e=H()(()=>{g.current&&g.current.resize()},200);return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}},[]),(0,c.useEffect)(()=>{let e=g.current;if(e&&void 0!==o)return function(e,t){if(void 0!==t){for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let i=t[n]??null;i&&function(t,n){var i,r;"function"==typeof n&&((i=t,Y.includes(i))?e.on(t,t=>n(t,e)):(r=t,G.includes(r))?e.on(t,e=>n(e)):e.on(t,()=>n(null,e)))}(n,i)}}}(e,o),()=>{if(void 0!==e&&!0!==e.isDisposed())for(let t in o)e.off(t)}},[o]),(0,c.useEffect)(()=>{H()(()=>{g.current&&g.current.resize()},200,{leading:!0})()},[i,r]),(0,l.jsx)(F.Z,{ref:p,sx:i,style:r})});var X=n(15409),q=n.n(X);function J(e,t){return[q()({type:"value",boundaryGap:[0,"10%"],axisLabel:{formatter:e=>w(e,t)}},e)]}function Q(e){if(0===e.length)return 36e5;let t=e[e.length-1];return void 0===e[0]||void 0===t?36e5:t-e[0]}function ee(e){let{width:t,height:n,data:i,format:r={unit:"decimal"},mode:o="value"}=e,a=N(),s=(0,c.useMemo)(()=>{if(!i||!i.length)return a.noDataOption;let e=[];return i.map(t=>{e.push([t.label,t.value])}),{title:{show:!1},dataset:[{dimensions:["label","value"],source:e}],xAxis:J({},r),yAxis:{type:"category",splitLine:{show:!1},axisLabel:{overflow:"truncate",width:t/3}},series:{type:"bar",label:{show:!0,position:"right",formatter:e=>e.data[1]?"percentage"===o?w(e.data[1],{unit:"percent",decimalPlaces:r.decimalPlaces}):w(e.data[1],r):void 0,barMinWidth:14,barCategoryGap:6},itemStyle:{borderRadius:4,color:a.echartsTheme[0]}},tooltip:{appendToBody:!0,confine:!0,formatter:e=>e.data[1]&&`<b>${e.name}</b> &emsp; ${w(e.data[1],r)}`},grid:{left:"5%",right:"5%"}}},[i,a,t,o,r]);return(0,l.jsx)(F.Z,{style:{width:t,height:n},sx:{overflow:"auto"},children:(0,l.jsx)(K,{sx:{minHeight:n,height:i?20*i.length:"100%"},option:s,theme:a.echartsTheme})})}(0,k.D)([M.N,D.N,T.N,A.N,I.N,E.N]);var et=n(25283),en=n(75094),ei=n(8695),er=n(53094),el=n(20791),eo=n(80354);let ea=({color:e,onChange:t,onClear:n,palette:i})=>{let[r,o]=(0,c.useState)(e),a=e=>{o(e),t?.(e)};return(0,l.jsxs)(et.Z,{spacing:1,children:[(0,l.jsx)(er.gW,{color:e,onChange:a,style:{width:"100%"}}),(0,l.jsx)(et.Z,{direction:"row",flexWrap:"wrap",justifyContent:"space-evenly",width:"200px",children:i&&i.map((e,t)=>(0,l.jsx)(en.Z,{size:"small","aria-label":`change color to ${e}`,sx:{color:e},onClick:()=>a(e),children:(0,l.jsx)(el.default,{})},t))}),(0,l.jsxs)(et.Z,{direction:"row",gap:1,alignItems:"center",children:[(0,l.jsx)(ei.Z,{inputProps:{"aria-label":"enter hex color"},fullWidth:!0,value:r,onChange:e=>{let n=e.target.value.replace(/([^0-9A-F]+)/gi,"").substring(0,8);o(`#${n}`),es(e.target.value)&&t?.(e.target.value)}}),n&&(0,l.jsx)(en.Z,{onClick:n,children:(0,l.jsx)(eo.default,{})})]})]})},es=(e,t)=>{let n=/^#?([0-9A-F]{3,8})$/i.exec(e),i=n&&n[1]?n[1].length:0;return 3===i||6===i||!!t&&4===i||!!t&&8===i};var ec=n(6714),ed=n(12709);function eu({label:e,color:t,onColorChange:n,onClear:i}){let[r,o]=(0,c.useState)(null),a=!!r,{thresholds:{defaultColor:s,palette:d}}=N();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eh,{size:"small","aria-label":`change ${e} color`,isSelected:a,iconColor:t,onClick:e=>{o(e.currentTarget)},children:(0,l.jsx)(el.default,{})}),(0,l.jsx)(ec.ZP,{"data-testid":"options color picker",open:a,anchorEl:r,onClose:()=>{o(null)},slotProps:{paper:{sx:{padding:e=>e.spacing(2)}}},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},children:(0,l.jsx)(ea,{color:t,palette:[s,...d],onChange:n,onClear:i})})]})}let eh=(0,ed.ZP)(en.Z,{shouldForwardProp:e=>"isSelected"!==e&&"iconColor"!==e})(({iconColor:e,isSelected:t})=>({backgroundColor:t&&e?`${e}3F`:"undefined",color:e}));var ep=n(94776),eg=n(38475),em=n(75586),ex=n(83675),ef=n(73845),ev=n(12577);function ey(...e){return e.flatMap(e=>void 0===e?[]:Array.isArray(e)?e:[e])}let eb=(0,c.memo)(function({color:e,sx:t,...n}){return(0,l.jsx)(F.Z,{...n,sx:ey({height:4,width:16,margin:e=>e.spacing(.5)},t),style:{backgroundColor:e}})}),eC=(0,c.forwardRef)(function({item:e,sx:t,truncateLabel:n,onClick:i,isVisuallySelected:r,onMouseOver:o,onMouseOut:a,index:s,...d},u){let[h,p]=(0,c.useState)(n);return(0,l.jsxs)(ef.Z,{...d,role:"listitem",sx:ey({padding:0,cursor:"pointer"},t),dense:!0,onClick:t=>{i(t,e.id),e.onClick?.(t)},onMouseOver:t=>o?.(t,{id:e.id,index:s}),onMouseOut:t=>a?.(t,{id:e.id,index:s}),selected:r,ref:u,children:[(0,l.jsx)(F.Z,{sx:{display:"flex",alignItems:"center"},children:(0,l.jsx)(eb,{color:e.color})}),(0,l.jsx)(ev.Z,{primary:e.label,primaryTypographyProps:{noWrap:h},onMouseOver:function(){n&&p(!1)},onMouseOut:function(){n&&p(!0)}})]})}),ej=(0,c.memo)(eC);function ew(e,t){return"ALL"!==t&&!!t[e.id]}function eZ({items:e,height:t,width:n,selectedItems:i,onLegendItemClick:r,onItemMouseOver:o,onItemMouseOut:a}){let s=e.length>5;return(0,l.jsx)(ex.OO,{style:{height:t,width:n},data:e,itemContent:(e,t)=>(0,l.jsx)(ej,{item:t,index:e,truncateLabel:s,isVisuallySelected:ew(t,i),onClick:r,onMouseOver:o,onMouseOut:a,sx:{width:"100%",wordBreak:"break-word",overflow:"hidden"}},t.id),role:"list"})}function eS({height:e,items:t,selectedItems:n,onLegendItemClick:i,onItemMouseOver:r,onItemMouseOut:o}){return(0,l.jsx)(F.Z,{component:"ul",sx:{width:"100%",height:e,padding:[0,1,0,0],overflowY:"scroll",margin:0},children:t.map((e,t)=>(0,l.jsx)(ej,{item:e,index:t,isVisuallySelected:ew(e,n),onMouseOver:r,onMouseOut:o,onClick:i,sx:{width:"auto",float:"left",paddingRight:1.5}},e.id))})}var ek=n(22577),eM=n(80900),eD=n(14968),eT=n(42158),eA=n(16838);let eI=(0,c.forwardRef)(function(e,t){return(0,l.jsx)(eD.Z,{...e,ref:t,sx:{backgroundColor:e=>e.palette.background.default,"&:hover":{backgroundColor:e=>(0,eA.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity)}}})});var eE=n(56174);let eF=(0,c.forwardRef)(function(e,t){return(0,l.jsx)(eE.Z,{...e,ref:t})});var eL=n(90190);let eP=(0,ed.ZP)(eL.Z)(({theme:e})=>({tableLayout:"fixed",borderCollapse:"separate",backgroundColor:e.palette.background.default})),eR={compact:"small",standard:"medium",comfortable:"medium"},eN=(0,c.forwardRef)(function({density:e,...t},n){return(0,l.jsx)(eP,{...t,tabIndex:-1,size:eR[e],ref:n,sx:{width:"100%"}})});var eO=n(31889);let ez=(0,c.forwardRef)(function(e,t){return(0,l.jsx)(eO.Z,{...e,ref:t})});var eW=n(52054),e$=n(78214),eH=n(23147),eB=n(96205);let e_=150,eV=40;function eU(e,t,{isHeader:n,isLastColumn:i,isFirstColumn:r,defaultColumnHeight:l}={}){var o,a;let s=e.spacing(1),c=e.spacing(1.25),d=e.spacing(2),u=r?d:c,h=i?d:c,p=e.typography.body1.lineHeight,g=e.typography.body1.fontSize;"compact"===t&&(s=e.spacing(.5),c=e.spacing(.5),d=e.spacing(1),u=r?d:c,h=i?d:c,p=e.typography.body2.lineHeight,g=e.typography.body2.fontSize),"comfortable"===t&&(s=e.spacing(2),c=e.spacing(1.5),d=e.spacing(2),u=r?d:c,h=i?d:c,p=e.typography.body1.lineHeight,g=e.typography.body1.fontSize);let m=n||!l||"auto"===l?(o=p,a=s,("string"==typeof o?parseInt(o,10):o??0)+2*("string"==typeof a?parseInt(a,10):a)):l;return{padding:`${s} ${h} ${s} ${u}`,height:m,fontSize:g,lineHeight:p}}function eY(e){return e.map(({width:e,align:t,headerDescription:n,cellDescription:i,enableSorting:r,...l})=>({...l,..."auto"===e||void 0===e?{size:0,minSize:0,maxSize:0}:{size:e},enableSorting:!!r,meta:{align:t,headerDescription:n,cellDescription:i}}))}let eG=(0,ed.ZP)(eB.Z)(({theme:e})=>({padding:0,backgroundColor:"inherit","&.MuiTableCell-head":{backgroundColor:e.palette.background.default},"&:focus-visible":{outline:`solid 1px ${e.palette.primary.main}`,outlineOffset:"-1px",borderRadius:0}}));function eK({children:e,density:t,variant:n,width:i,defaultColumnHeight:r,focusState:o="none",onFocusTrigger:a,isFirstColumn:s,isLastColumn:d,description:u,align:h,color:p,backgroundColor:g,...m}){let x=(0,ep.Z)(),f=(0,c.useRef)(),v="head"===n;(0,c.useEffect)(()=>{"trigger-focus"===o&&f.current&&f.current.focus()},[o]);let y=e=>{a?.(e)};return(0,l.jsx)(eG,{...m,tabIndex:"none"!==o?0:-1,onFocus:e=>{let t=e.currentTarget?.querySelector('a[href], button, input, textarea, select, details,[role="button"]');t&&t.focus()},onClick:y,onKeyUp:y,style:{width:i},sx:{position:"relative",borderBottom:v?`solid 1px ${x.palette.grey[100]}`:`solid 1px ${x.palette.grey[50]}`,"&:hover #original-cell":{position:"absolute",top:0,left:0,zIndex:10,width:"fit-content",minWidth:"100%",whiteSpace:"nowrap",overflow:"visible",backgroundColor:`${g??x.palette.background.default} !important`,outline:`solid 1px ${x.palette.info.main}`,outlineOffset:"-1px"}},ref:f,children:(0,l.jsx)(F.Z,{id:"original-cell",sx:{...eU(x,t,{isHeader:v,isLastColumn:d,isFirstColumn:s,defaultColumnHeight:r}),position:"relative",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexDirection:"inherit"},style:{backgroundColor:g??"inherit",color:p??"inherit"},title:u,"aria-label":u,textAlign:h,children:e})})}function eX({onSort:e,sortDirection:t,nextSortDirection:n,children:i,...r}){let o=!!e,a=(0,l.jsx)(eW.Z,{noWrap:!0,variant:"inherit",component:"div",color:"inherit",children:i}),s=!!t;return(0,l.jsx)(eK,{...r,children:o?(0,l.jsx)(e$.Z,{onClick:e,direction:s?t:n,active:s,sx:{verticalAlign:"unset",maxWidth:"100%","&:focus-visible":{[`& .${eH.Z.icon}`]:{opacity:s?1:.5}}},children:a}):a})}var eq=n(59019);let eJ=(0,c.forwardRef)(function(e,t){return(0,l.jsx)(eq.Z,{...e,tabIndex:-1,ref:t})}),eQ={row:0,column:0},e0=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"];var e1=n(25329);let e5=(0,c.forwardRef)(function(e,t){return(0,l.jsx)(e1.Z,{...e,ref:t})});function e2({width:e,height:t,density:n,defaultColumnWidth:i,defaultColumnHeight:r,onRowClick:o,onRowMouseOver:a,onRowMouseOut:s,rows:d,columns:u,headers:h,cellConfigs:p,pagination:g,onPaginationChange:m,rowCount:x}){let f=(0,c.useRef)(null),v=(0,c.useRef)({startIndex:0,endIndex:0}),y=function({visibleRange:e,virtualTable:t,maxRows:n,maxColumns:i}){return function({maxRows:e,maxColumns:t,onActiveCellChange:n}){let[i,r]=(0,c.useState)(eQ),[l,o]=(0,c.useState)(!1);return{activeCell:i,isActive:l,onTableKeyDown:(0,c.useCallback)(i=>{let l=i.key;(e0.includes(l)||"Home"===l||"End"===l||"PageDown"===l||"PageUp"===l)&&r(r=>{let o=r.row,a=r.column;"ArrowRight"===l&&a<t-1?(i.preventDefault(),a+=1):"ArrowLeft"===l&&a>0?(i.preventDefault(),a-=1):"ArrowDown"===l&&o<e-1?(i.preventDefault(),o+=1):"ArrowUp"===l&&o>0?(i.preventDefault(),o-=1):"Home"===l?(i.preventDefault(),o=0,a=0):"End"===l&&(i.preventDefault(),o=e-1,a=t-1);let s={column:a,row:o},c=n?.(i,r,s)||s;return c.row===r.row&&c.column===r.column?r:c})},[t,e,n]),onCellFocus:e=>{(e.column!==i.column||e.row!==i.row||!l)&&(o(!0),r(e))}}}({maxRows:n,maxColumns:i,onActiveCellChange:(i,r,l)=>{let o=i.key,a=l&&(r.column!==l.column||r.row!==l.row),s=l?.row??r.row;if("ArrowDown"===o&&a)(s-1<e.current.startIndex||s-1>e.current.endIndex)&&t.current?.scrollToIndex({index:s-1,align:"end"});else if("ArrowUp"===o&&a)(s-1<e.current.startIndex||s-1>e.current.endIndex)&&t.current?.scrollToIndex({index:s-1,align:"start"});else if(a&&("Home"===o||"End"===o))t.current?.scrollToIndex({index:Math.max(s-1,0),align:"start"});else if("PageDown"===o){i.preventDefault();let l=r.row;return l=Math.min(n-1,e.current.endIndex+1),t.current?.scrollToIndex({index:l-1,align:"start"}),{row:l,column:r.column}}else if("PageUp"===o){let n=r.row;return n=Math.max(0,e.current.startIndex-1),t.current?.scrollToIndex({index:n-1,align:"end"}),{row:n,column:r.column}}return l}})}({visibleRange:v,virtualTable:f,maxRows:d.length+1,maxColumns:u.length}),b=e=>e.row===y.activeCell.row&&e.column===y.activeCell.column?y.isActive?"trigger-focus":"focus-next":"none",C=(0,c.useMemo)(()=>({Scroller:eJ,Table:t=>(0,l.jsx)(eN,{...t,width:e,density:n,onKeyDown:y.onTableKeyDown}),TableHead:ez,TableFoot:e5,TableRow:({item:e,...t})=>{let i=d[t["data-index"]];if(!i)return null;let r={id:i.id,index:i.index};return(0,l.jsx)(eI,{...t,onClick:e=>o(e,i.id),density:n,onMouseOver:e=>{a?.(e,r)},onMouseOut:e=>{s?.(e,r)}})},TableBody:eF}),[n,y.onTableKeyDown,o,s,a,d,e]),j=(e,t)=>{g&&m&&m({...g,pageIndex:t})},w=e=>{g&&m&&m({pageIndex:0,pageSize:parseInt(e.target.value,10)})};return(0,l.jsx)(F.Z,{style:{width:e,height:t},children:(0,l.jsx)(ex._n,{ref:f,totalCount:d.length,components:C,rangeChanged:e=>{v.current=e},fixedHeaderContent:()=>(0,l.jsx)(l.Fragment,{children:h.map(e=>(0,l.jsx)(eI,{density:n,children:e.headers.map((e,t,o)=>{let a=e.column,s={row:0,column:t},c=a.getIsSorted(),d=a.getNextSortingOrder();return(0,l.jsx)(eX,{onSort:a.getCanSort()?a.getToggleSortingHandler():void 0,sortDirection:"string"==typeof c?c:void 0,nextSortDirection:"string"==typeof d?d:void 0,width:a.getSize()||i,defaultColumnHeight:r,align:a.columnDef.meta?.align,variant:"head",density:n,description:a.columnDef.meta?.headerDescription,focusState:b(s),onFocusTrigger:()=>y.onCellFocus(s),isFirstColumn:0===t,isLastColumn:t===o.length-1,children:(0,ek.ie)(a.columnDef.header,e.getContext())},e.id)})},e.id))}),fixedFooterContent:g?()=>(0,l.jsx)(eD.Z,{sx:{backgroundColor:e=>e.palette.background.default},children:(0,l.jsx)(eT.Z,{colSpan:u.length,count:x,page:g.pageIndex,rowsPerPage:g.pageSize,onPageChange:j,onRowsPerPageChange:w})}):void 0,itemContent:e=>{let t=d[e];return t?(0,l.jsx)(l.Fragment,{children:t.getVisibleCells().map((t,o,a)=>{let s;let c={row:e+1,column:o},d=t.getContext(),u=p?.[d.cell.id],h=t.column.columnDef.cell,g="function"==typeof h?h(d):null,m=t.column.columnDef.meta?.cellDescription;return"function"==typeof m?s=m(d):m&&"string"==typeof g&&(s=g),(0,l.jsx)(eK,{"data-testid":t.id,title:s||u?.text||g,width:t.column.getSize()||i,defaultColumnHeight:r,align:t.column.columnDef.meta?.align,density:n,focusState:b(c),onFocusTrigger:()=>y.onCellFocus(c),isFirstColumn:0===o,isLastColumn:o===a.length-1,description:s,color:u?.textColor??void 0,backgroundColor:u?.backgroundColor??void 0,children:u?.text||g},t.id)})}):null}})})}var e6=n(82707);function e3({color:e,density:t,...n}){let i="compact"===t;return(0,l.jsx)(e6.Z,{size:i?"small":"medium",...n,focusRipple:!1,tabIndex:-1,sx:{color:e,padding:e=>e.spacing(i?.25:.5),position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)","&.Mui-checked":{color:e},"&.Mui-focusVisible":{background:e?(0,eA.Fq)(e,.5):void 0},"& .MuiSvgIcon-root":{fontSize:i?16:18}}})}let e7=(e,t)=>`${t}`,e4={},e8=[];function e9({data:e,columns:t,cellConfigs:n,density:i="standard",defaultColumnWidth:r=e_,defaultColumnHeight:o="auto",checkboxSelection:a,onRowSelectionChange:s,onSortingChange:d,getCheckboxColor:u,getRowId:h=e7,rowSelection:p=e4,sorting:g=e8,pagination:m,onPaginationChange:x,rowSelectionVariant:f="standard",...v}){let y=(0,ep.Z)(),b=(0,c.useCallback)((e,t,n)=>{"standard"===f||n?t.toggleSelected():t.getIsSelected()&&!e.getIsAllRowsSelected()?e.toggleAllRowsSelected():s?.({[t.id]:!0})},[s,f]),C=(0,c.useCallback)((e,t,n)=>{let i=e.nativeEvent&&(e.nativeEvent instanceof MouseEvent||e.nativeEvent instanceof KeyboardEvent)?e.nativeEvent:void 0;b(t,n,!!i?.metaKey||!!i?.shiftKey)},[b]),j=(0,c.useMemo)(()=>({id:"checkboxRowSelect",size:28,header:({table:e})=>(0,l.jsx)(e3,{checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler(),color:y.palette.text.primary,density:i}),cell:({row:e,table:t})=>(0,l.jsx)(e3,{checked:e.getIsSelected(),indeterminate:e.getIsSomeSelected(),onChange:n=>{C(n,t,e)},color:u?.(e.original),density:i}),enableSorting:!1}),[y.palette.text.primary,i,u,C]),w=(0,c.useMemo)(()=>{let e=eY(t);return a&&e.unshift(j),e},[j,a,t]),Z=(0,ek.b7)({data:e,columns:w,getRowId:h,getCoreRowModel:(0,eM.sC)(),getSortedRowModel:(0,eM.tj)(),getPaginationRowModel:m?(0,eM.G_)():void 0,manualPagination:!m,enableRowSelection:!!a,onRowSelectionChange:e=>{let t="function"==typeof e?e(p):e;s?.(t)},onSortingChange:e=>{let t="function"==typeof e?e(g):e;d?.(t)},sortDescFirst:!0,state:{rowSelection:p,sorting:g,...m?{pagination:m}:{}}}),S=(0,c.useCallback)((e,t)=>{let n=Z.getRow(t);b(Z,n,e.metaKey||e.shiftKey)},[b,Z]);return(0,l.jsx)(e2,{...v,density:i,defaultColumnWidth:r,defaultColumnHeight:o,onRowClick:S,rows:Z.getRowModel().rows,columns:Z.getAllFlatColumns(),headers:Z.getHeaderGroups(),cellConfigs:n,pagination:m,onPaginationChange:x,rowCount:Z.getRowCount()})}let te=[{accessorKey:"label",header:"Name",enableSorting:!0,cell:({getValue:e})=>(0,l.jsx)("span",{title:e(),children:e()})}],tt=e=>e.id,tn=e=>e.color;function ti({items:e,selectedItems:t,onSelectedItemsChange:n,onItemMouseOver:i,onItemMouseOut:r,height:o,width:a,columns:s=[],sorting:d,onSortingChange:u}){let h=(0,c.useMemo)(()=>"string"!=typeof t?t:e.reduce((e,t,n)=>(e[tt(t,n)]=!0,e),{}),[t,e]),p=(0,c.useMemo)(()=>[...te,...s],[s]);return(0,l.jsx)(e9,{height:o,width:a,rowSelection:h,onRowSelectionChange:n,onRowMouseOver:i,onRowMouseOut:r,sorting:d,onSortingChange:u,data:e,columns:p,density:"compact",defaultColumnWidth:"auto",getRowId:tt,getCheckboxColor:tn,checkboxSelection:!0,rowSelectionVariant:"legend"})}function tr({width:e,height:t,options:n,data:i,selectedItems:r,onSelectedItemsChange:o,onItemMouseOver:a,onItemMouseOut:s,tableProps:c}){let d;let u=(e,t)=>{let n=e.metaKey||e.shiftKey;o((0,em.Uy)(r,e=>{if("ALL"===e)return{[t]:!0};let i=!!e[t];return n?(i?delete e[t]:e[t]=!0,e):i?"ALL":{[t]:!0}}))},h=(0,eg.bk)(n.mode),p=i.length>=500,g={height:t,items:i,selectedItems:r,onLegendItemClick:u,onItemMouseOver:a,onItemMouseOut:s};return(d="table"===h?(0,l.jsx)(ti,{...g,onSelectedItemsChange:o,width:e,...c}):"right"===n.position||p?(0,l.jsx)(eZ,{...g,width:e,onLegendItemClick:u}):(0,l.jsx)(eS,{...g,onLegendItemClick:u}),"right"===n.position)?(0,l.jsx)(F.Z,{style:{width:e,height:t},sx:{position:"absolute",top:0,right:0},children:d}):(0,l.jsx)(F.Z,{style:{width:e,height:t},sx:{position:"absolute",bottom:0},children:d})}let tl={medium:{bottom:6,right:250},small:{bottom:4,right:150}};function to({children:e,legendProps:t,width:n,height:i,spacing:r=0,legendSize:o,minChildrenWidth:a=100,minChildrenHeight:s=100}){let{content:c,legend:d,margin:u}=function({width:e,height:t,legendProps:n,legendSize:i,minChildrenHeight:r,minChildrenWidth:l,spacing:o,theme:a}){let s,c;let d=n?.options,u={legend:{show:!1,width:0,height:0},content:{width:e,height:t},margin:{right:0,bottom:0}};if(!d)return u;let{position:h}=d;if("list"===(0,eg.bk)(d.mode))s="right"===h?200:e,c=40,"right"===h?c=t:t>=300&&(c=100);else{let r=eU(a,"compact"),l=(n?.tableProps?.columns||[]).reduce((e,t)=>("number"==typeof t.width&&(e+=t.width),e),0);s="right"===h?tl[i].right+l:e;let o=Math.min(tl[i].bottom,n.data.length+1);c="bottom"===h?o*r.height:t}let p="right"===h?e-s-o:e,g="bottom"===h?t-c-o:t;return"right"===h&&p<l||"bottom"===h&&g<r?u:{legend:{width:s,height:c,show:!0},content:{width:p,height:g},margin:{right:"right"===h?o:0,bottom:"bottom"===h?o:0}}}({width:n,height:i,legendProps:t,minChildrenHeight:s,minChildrenWidth:a,spacing:r,theme:(0,ep.Z)(),legendSize:(0,eg.dT)(o)});return(0,l.jsxs)(F.Z,{style:{width:n,height:i},sx:{position:"relative",overflow:"hidden"},children:[(0,l.jsx)(F.Z,{style:{width:c.width,height:c.height},sx:{marginRight:`${u.right}px`,marginBottom:`${u.bottom}px`,overflow:"hidden"},children:"function"==typeof e?e({width:c.width,height:c.height}):e}),t&&d.show&&(0,l.jsx)(tr,{...t,height:d.height,width:d.width})]})}let ta=(0,c.forwardRef)(function({debounceMs:e=250,value:t,onChange:n,...i},r){let[o,a]=(0,c.useState)(t),s=(0,c.useCallback)(e=>{n?.(e)},[n]),d=(0,c.useMemo)(()=>H()(s,e),[e,s]);return(0,l.jsx)(ei.Z,{ref:r,value:o,onChange:function(e){a(e.target.value),d(e.target.value)},...i})});ta.displayName="TextField";var ts=n(51602),tc=n(19978),td=n(56873),tu=n(70616),th=n(10763);let tp=(0,ed.ZP)("form")({overflowY:"auto",display:"flex",flexDirection:"column"}),tg=e=>({position:"absolute",top:e.spacing(.5),right:e.spacing(.5)}),tm=({children:e,...t})=>(0,l.jsx)(td.Z,{...t,children:e});tm.Header=({children:e,onClose:t,...n})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ts.Z,{style:{textOverflow:"ellipsis",overflow:"hidden"},...n,children:e}),t&&(0,l.jsx)(en.Z,{"aria-label":"Close",onClick:t,sx:tg,children:(0,l.jsx)(th.default,{})})]}),tm.Form=tp,tm.Content=({children:e,sx:t,...n})=>(0,l.jsx)(tc.Z,{dividers:!0,...n,sx:ey({minWidth:"500px",textWrap:"balance"},t),children:e}),tm.PrimaryButton=({children:e,...t})=>(0,l.jsx)(a.Z,{variant:"contained",type:"submit",...t,children:e}),tm.SecondaryButton=({children:e,...t})=>(0,l.jsx)(a.Z,{variant:"outlined",color:"secondary",...t,children:e}),tm.Actions=tu.Z;let tx=e=>{let{description:t,isOpen:n,onCancel:i,onDiscardChanges:r}=e;return(0,l.jsxs)(tm,{open:n,"aria-labelledby":"discard-dialog",children:[(0,l.jsx)(tm.Header,{children:"Discard Changes"}),(0,l.jsx)(tm.Content,{children:t}),(0,l.jsxs)(tm.Actions,{children:[(0,l.jsx)(a.Z,{variant:"contained",onClick:r,children:"Discard Changes"}),(0,l.jsx)(a.Z,{variant:"outlined",color:"secondary",onClick:i,children:"Cancel"})]})]})};var tf=n(90192),tv=n(23626),ty=n(39398);function tb(e){void 0===globalThis.useIdValue&&(globalThis.useIdValue=0);let t=(0,c.useRef)(void 0);return void 0===t.current&&(t.current=`${e}-${globalThis.useIdValue++}`),t.current}var tC=n(32964),tj=n(87143);let tw=({id:e,title:t,description:n,placement:i,children:r,enterDelay:o,enterNextDelay:a})=>{let s=(0,l.jsx)("span",{children:r});return(0,l.jsx)(tS,{arrow:!0,id:e,placement:i??"top",title:(0,l.jsx)(tZ,{title:t,description:n}),enterDelay:o??500,enterNextDelay:a??500,children:s})},tZ=({title:e,description:t})=>(0,l.jsxs)(l.Fragment,{children:[e&&(0,l.jsx)(eW.Z,{variant:"body2",sx:e=>({color:e.palette.text.primary,fontWeight:e.typography.fontWeightMedium}),children:e}),(0,l.jsx)(eW.Z,{variant:"caption",sx:e=>({color:e.palette.text.primary,whiteSpace:"pre-line"}),children:t})]}),tS=(0,ed.ZP)(({className:e,...t})=>(0,l.jsx)(tC.Z,{...t,classes:{popper:e}}))(({theme:e})=>({[`& .${tj.Z.tooltip}`]:{backgroundColor:e.palette.background.tooltip,color:e.palette.text.primary,maxWidth:"300px",padding:e.spacing(1),boxShadow:e.shadows[1]},[`& .${tj.Z.arrow}`]:{color:e.palette.background.tooltip}})),tk=({label:e,control:t,description:n})=>{let i=tb("EditorSectionControl"),r=`${i}-control`;return(0,l.jsx)(tf.Z,{children:(0,l.jsxs)(et.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,l.jsxs)(et.Z,{direction:"row",alignItems:"center",justifyContent:"center",children:[(0,l.jsx)(tv.Z,{htmlFor:r,children:e}),n&&(0,l.jsx)(tw,{description:n,enterDelay:100,children:(0,l.jsx)(en.Z,{size:"small",sx:e=>({borderRadius:e.shape.borderRadius,padding:"4x",margin:"0 2px"}),children:(0,l.jsx)(ty.default,{"aria-describedby":"info-tooltip","aria-hidden":!1,fontSize:"inherit",sx:{color:e=>e.palette.grey[700]}})})})]}),(0,l.jsxs)(F.Z,{sx:{width:"180px",textAlign:"right"},children:[" ",d().cloneElement(t,{id:r})]})]})})};var tM=n(11774),tD=n(57174);function tT({options:e,renderInput:t=e=>(0,l.jsx)(ei.Z,{...e}),...n}){let i=e=>e.label??e.id;return(0,l.jsx)(tM.Z,{isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionDisabled:e=>!!e.disabled,getOptionLabel:i,options:e,renderInput:t,renderOption:({key:e,...t},n)=>(0,l.jsx)("li",{...t,children:(0,l.jsxs)("div",{children:[(0,l.jsx)(eW.Z,{variant:"body1",component:"div",children:i(n)}),n.description&&(0,l.jsx)(eW.Z,{variant:"body2",component:"div",sx:{color:e=>e.palette.text.secondary},children:n.description})]})},e),filterOptions:(0,tD.D)({stringify:e=>`${i(e)} ${e.description||""}`}),...n})}let tA=[{id:"compact",label:"Compact"},{id:"standard",label:"Standard"},{id:"comfortable",label:"Comfortable"}];function tI({onChange:e,value:t="standard"}){return(0,l.jsx)(tk,{label:"Density",control:(0,l.jsx)(tT,{value:tA.find(e=>e.id===t),options:tA,getOptionLabel:e=>e.label,onChange:(t,{id:n})=>{e(n)},disableClearable:!0})})}function tE(){return(0,l.jsxs)(et.Z,{direction:"row",alignItems:"center",children:[(0,l.jsx)(F.Z,{sx:{content:'""',width:8,height:8,boxSizing:"border-box",position:"absolute",backgroundColor:e=>e.palette.background.default,border:e=>`2px solid ${e.palette.info.main}`,borderRadius:"50%"}}),(0,l.jsx)(F.Z,{sx:{content:'""',height:2,background:e=>e.palette.info.main,width:"100%"}})]})}var tF=n(39020),tL=n(55255),tP=n(62422),tR=n(74183);let tN={type:"idle"};function tO({elements:e,accessKey:t,axis:n="vertical",onChange:i}){return(0,c.useEffect)(()=>(0,tL.sd)({onDrop({location:r,source:l}){let o=r.current.dropTargets[0];if(!o)return;let a=l.data,s=o.data,c=e.findIndex(e=>e[t]===a[t]),d=e.findIndex(e=>e[t]===s[t]);if(d<0||c<0)return;let u=(0,tR.A)(s);i((0,tF.h)({list:e,startIndex:c,indexOfTarget:d,closestEdgeOfTarget:u,axis:n}))}}),[t,n,e,i])}function tz({children:e,data:t}){let n=(0,c.useRef)(null),[i,r]=(0,c.useState)(tN);return(0,c.useEffect)(()=>{let e=n.current;if(e)return(0,tP.$)((0,tL.En)({element:e,getInitialData:()=>t,onDragStart(){r({type:"is-dragging"})},onDrop(){r(tN)}}),(0,tL.wO)({element:e,canDrop:({source:t})=>t.element!==e,getData:({input:n})=>(0,tR.X)(t,{element:e,input:n,allowedEdges:["top","bottom"]}),getIsSticky:()=>!0,onDragEnter({self:e}){r({type:"is-dragging-over",closestEdge:(0,tR.A)(e.data)})},onDrag({self:e}){let t=(0,tR.A)(e.data);r(e=>"is-dragging-over"===e.type&&e.closestEdge===t?e:{type:"is-dragging-over",closestEdge:t})},onDragLeave(){r(tN)},onDrop(){r(tN)}}))},[t]),(0,l.jsxs)(et.Z,{ref:n,spacing:1,style:{opacity:"is-dragging"===i.type?.5:"unset"},children:["is-dragging-over"===i.type&&"top"===i.closestEdge?(0,l.jsx)(tE,{}):null,e,"is-dragging-over"===i.type&&"bottom"===i.closestEdge?(0,l.jsx)(tE,{}):null]})}var tW=n(5549),t$=n(10517),tH=n(11682);function tB(e,t){let n=t.indexOf(e);if(0===n)return t;let i=[...t];return i.splice(n,1),i.splice(n-1,0,e),i}function t_(e,t){let n=t.indexOf(e);if(n===t.length-1)return t;let i=[...t];return i.splice(n,1),i.splice(n+1,0,e),i}let tV=(0,c.forwardRef)(function({onMoveUp:e,onMoveDown:t,onMoveLeft:n,onMoveRight:i,menuSx:r,...o},a){let[s,d]=(0,c.useState)(null),u=!!s;function h(e){d(null),e?.()}return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(en.Z,{...o,ref:a,"aria-label":"move","aria-haspopup":!0,"aria-expanded":u,size:"small",onClick:function(e){d(e.currentTarget)},children:(0,l.jsx)(tH.default,{})}),(e||t||n||i)&&(0,l.jsxs)(tW.Z,{id:"drag-button-menu",MenuListProps:{"aria-labelledby":"drag-button-menu"},anchorEl:s,open:u,onClose:()=>h(void 0),sx:r,children:[e&&(0,l.jsx)(t$.Z,{onClick:()=>h(e),children:"Move Up"}),t&&(0,l.jsx)(t$.Z,{onClick:()=>h(t),children:"Move Down"}),n&&(0,l.jsx)(t$.Z,{onClick:()=>h(n),children:"Move Left"}),i&&(0,l.jsx)(t$.Z,{onClick:()=>h(i),children:"Move Right"}),i&&(0,l.jsx)(t$.Z,{onClick:()=>h(i),children:"Move Right"})]})]})});var tU=n(76439),tY=n(73957);let tG=({anchor:e="right",isOpen:t,onClose:n,PaperProps:i,children:r,...o})=>{let a=(0,tU.Z)("(max-width:1080px)");return(0,l.jsx)(tY.ZP,{...o,open:t,onClose:n,anchor:e,PaperProps:{...i,sx:ey({width:a?"100%":"1080px",overflow:"hidden"},i?.sx)},children:r})};var tK=n(315);function tX(e){let{error:t}=e;return(0,l.jsx)(tK.Z,{severity:"error",children:t.message})}var tq=n(68715);let tJ=[{id:"default",label:"Default",value:void 0},{id:"12",label:"12",value:12},{id:"14",label:"14",value:14},{id:"16",label:"16",value:16},{id:"20",label:"20",value:20},{id:"24",label:"24",value:24},{id:"28",label:"28",value:28},{id:"32",label:"32",value:32},{id:"36",label:"36",value:36},{id:"40",label:"40",value:40},{id:"48",label:"48",value:48},{id:"56",label:"56",value:56},{id:"64",label:"64",value:64},{id:"72",label:"72",value:72},{id:"96",label:"96",value:96},{id:"128",label:"128",value:128},{id:"160",label:"160",value:160},{id:"192",label:"192",value:192}];function tQ({value:e,onChange:t}){return(0,l.jsx)(tk,{label:"Font Size",control:(0,l.jsx)(tT,{value:tJ.find(t=>t.value===e),options:tJ,getOptionLabel:e=>e.label,onChange:(e,{value:n})=>{t(n)},disableClearable:!0})})}var t0=n(79119);function t1({action:e,submitText:t="Save",cancelText:n="Cancel",isReadonly:i,isValid:r,onActionChange:o,onSubmit:s,onDelete:c,onCancel:d,...u}){return(0,l.jsx)(et.Z,{direction:"row",gap:1,sx:{marginLeft:"auto"},...u,children:"read"===e?(0,l.jsxs)(l.Fragment,{children:[o&&(0,l.jsx)(a.Z,{disabled:i,variant:"contained",onClick:()=>o("update"),children:"Edit"}),c&&(0,l.jsx)(a.Z,{color:"error",disabled:i,variant:"outlined",onClick:c,children:"Delete"}),d&&(s||c)&&(0,l.jsx)(t0.Z,{orientation:"vertical",flexItem:!0,sx:{borderColor:e=>e.palette.grey["500"],"&.MuiDivider-root":{marginLeft:2,marginRight:1}}}),d&&(0,l.jsx)(a.Z,{color:"secondary",variant:"outlined",onClick:d,children:n})]}):(0,l.jsxs)(l.Fragment,{children:[s&&(0,l.jsx)(a.Z,{variant:"contained",disabled:!r,onClick:s,children:t}),d&&(0,l.jsx)(a.Z,{color:"secondary",variant:"outlined",onClick:d,children:n})]})})}var t5=n(78846);function t2(e){let{width:t,height:n,data:i,format:r,axisLine:o,max:a}=e,s=N(),d=function(e,t){let n=(0,c.useRef)();return(void 0===n.current||!1===W()(t,n.current.deps))&&(n.current={value:e(),deps:t}),n.current.value}(()=>{if(void 0===i.value)return s.noDataOption;let e=t6(i.value,r,t,n);return{title:{show:!1},tooltip:{show:!1},series:[{type:"gauge",center:["50%","65%"],radius:"86%",startAngle:200,endAngle:-20,min:0,max:a,silent:!0,progress:{show:!0,width:16,itemStyle:{color:"auto"}},pointer:{show:!1},axisLine:{lineStyle:{color:[[1,"rgba(127,127,127,0.35)"]],width:16}},axisTick:{show:!1,distance:0},splitLine:{show:!1},axisLabel:{show:!1,distance:-18,color:"#999",fontSize:12},anchor:{show:!1},title:{show:!1},detail:{show:!1},data:[{value:i.value}]},{type:"gauge",center:["50%","65%"],radius:"100%",startAngle:200,endAngle:-20,min:0,max:a,pointer:{show:!0,icon:t>170?"path://M12.8,0.7l12,40.1H0.7L12.8,0.7z":"none",length:10,width:5,offsetCenter:[0,"-49%"],itemStyle:{color:"auto"}},axisLine:o,axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1},detail:{show:!0,width:"60%",borderRadius:8,offsetCenter:[0,"-9%"],color:"inherit",fontSize:e,formatter:null===i.value?()=>"null":e=>w(e,r)},data:[{value:i.value,name:i.label,title:{show:!0,color:s.echartsTheme.textStyle?.color??"inherit",offsetCenter:[0,"55%"],overflow:"truncate",fontSize:12,width:.8*t}}]}]}},[i,t,n,s,r,o,a]);return(0,l.jsx)(K,{sx:{width:t,height:n,padding:`${s.container.padding.default}px`},option:d,theme:s.echartsTheme})}function t6(e,t,n,i){let r=Math.min(n,i)/(("number"==typeof e?w(e,t):`${e}`).length??2)*.7;return`clamp(3px, ${r}px, 24px)`}(0,k.D)([t5.N,D.N,A.N,I.N,E.N]);var t3=n(46359),t7=n(76777),t4=n(68799);function t8(e){let t=(0,ep.Z)(),n="dark"===t.palette.mode,[i,r]=(0,c.useState)(()=>JSON.stringify(e.value,null,2)),[o,a]=(0,c.useState)(i);return(0,l.jsx)(t3.ZP,{...e,style:{border:`1px solid ${t.palette.divider}`},theme:n?"dark":"light",extensions:[(0,t7.AV)(),(0,t4.ir)((0,t7.ap)()),(0,t4.Q2)()],value:i,onChange:t=>{r(t),e.onChange&&e.onChange(t)},onBlur:()=>{o!==i&&void 0!==e.onChange&&(e.onChange(i),a(i))},placeholder:e.placeholder})}var t9=n(44811),ne=n(98857),nt=n(219),nn=n(17846),ni=n(55328),nr=n(4665),nl=n(20461);function no(e,t){if(t){let n=t.toLowerCase();if("local"!==n&&"browser"!==n)return{...e,timeZone:"utc"===n?"UTC":t}}return e}function na(e,t,n){let i=n?.toLowerCase();return n&&"local"!==i&&"browser"!==i?(0,nr.formatInTimeZone)(e,"utc"===i?"UTC":n,t):(0,nl.format)(e,t)}function ns(e,t,n){let i=no({hour:"numeric",minute:"numeric",hourCycle:"h23"},n);return t<=18e5?i.second="numeric":t>=864e5&&(i.month="numeric",i.day="numeric"),new Intl.DateTimeFormat(void 0,i).format(e).replace(/, /g," ")}function nc(e){return e>15768e7?"{yyyy}":e>63072e6?"{MMM} {yyyy}":e>432e6&&e<1577664e4?"{MM}/{dd}":e>1728e5&&e<=432e6?"{MM}/{dd} {HH}:{mm}":{year:"{yearStyle|{yyyy}}\n{monthStyle|{MMM}}",month:"{MMM}",day:"{MM}/{dd}"}}let nd=e=>{if(!e)return{formattedDate:"",formattedTime:""};let t=new Date(e);return{formattedDate:(0,nl.format)(t,"MMM dd, yyyy - "),formattedTime:(0,nl.format)(t,"HH:mm:ss")}},nu=(0,c.createContext)(void 0);function nh(e){let{children:t,timeZone:n}=e;return(0,l.jsx)(nu.Provider,{value:n,children:t})}function np(){let e=(0,c.useContext)(nu);return{timeZone:e??"local",formatWithUserTimeZone:(t,n)=>na(t,n,e),dateFormatOptionsWithUserTimeZone:t=>no(t,e)}}let ng=375,nm=650,nx=650,nf=500,nv=.75,ny=8,nb=750,nC="nearby series showing in tooltip",nj="emphasized series showing as bold in tooltip",nw="#2E313E",nZ=new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0}),nS={coords:{plotCanvas:{x:0,y:0},zrender:{x:0,y:0},target:null},chartWidth:0},nk=[],nM=()=>{let[e,t]=(0,c.useState)(null);return(0,c.useEffect)(()=>{let e=e=>t({page:{x:e.pageX,y:e.pageY},client:{x:e.clientX,y:e.clientY},plotCanvas:{x:e.zrX??e.offsetX,y:e.zrY??e.offsetY},target:e.target});return window.addEventListener("mousemove",e),()=>{window.removeEventListener("mousemove",e)}},[]),e},nD={wrapLabels:!0,enablePinning:!0},nT="Click chart to pin",nA="Click chart to unpin";var nI=n(7444),nE=n(75276);function nF(e){let{markerColor:t,sx:n}=e;return(0,l.jsx)(F.Z,{sx:ey({display:"inline-block",width:"11px",height:"11px",borderRadius:"2px",marginRight:1,verticalAlign:"top"},n),style:{backgroundColor:t}})}function nL(e){let{formattedY:t,markerColor:n,metricName:i,metricLabels:r}=e;return(0,l.jsxs)(et.Z,{spacing:.5,children:[(0,l.jsxs)(F.Z,{sx:e=>({display:"flex",height:"16px",flexDirection:"row",alignItems:"center",justifyContent:"left",color:e.palette.common.white,fontSize:"11px"}),children:[(0,l.jsx)(nF,{markerColor:n,sx:{marginTop:.25}}),(0,l.jsxs)(F.Z,{component:"span",children:[i,(0,l.jsx)(F.Z,{component:"span",sx:e=>({color:e.palette.common.white,fontWeight:700,paddingLeft:"2px"}),children:t})]})]}),(0,l.jsx)(t0.Z,{sx:e=>({borderColor:e.palette.grey["500"]})}),(0,l.jsx)(F.Z,{sx:e=>({color:e.palette.common.white}),children:r.map(e=>{if(e){let[t,n]=e.split("="),i=void 0!==n?`${t}: `:t,r=void 0!==n?n.replace(/(^"|"$)/g,""):n;return(0,l.jsxs)(F.Z,{sx:{display:"flex",gap:"4px"},children:[(0,l.jsx)(eW.Z,{sx:{fontSize:"11px"},children:i}),(0,l.jsx)(eW.Z,{sx:e=>({color:e.palette.common.white,fontWeight:700,fontSize:"11px"}),children:r})]},e)}})})]})}function nP(e){let{seriesName:t,formattedY:n,markerColor:i,totalSeries:r,emphasizeText:o=!1,wrapLabels:a=!0}=e,s=t.split("{"),c=(s[1]??t).replace(/[{}]/g,"").split(",");if(1===r&&c.length>1){let e=s[0]?`${s[0]}:`:"value:";return(0,l.jsx)(nL,{formattedY:n,metricName:e,metricLabels:c,markerColor:i})}let d=t.replace(/[,]/g,", ");return(0,l.jsxs)(F.Z,{sx:{display:"table-row",paddingTop:.5},children:[(0,l.jsxs)(F.Z,{sx:{display:"table-cell",maxWidth:"520px"},children:[(0,l.jsx)(nF,{markerColor:i,sx:{marginTop:.5}}),(0,l.jsx)(F.Z,{component:"span",sx:e=>({display:"inline-block",width:"calc(100% - 20px)",minWidth:150,maxWidth:nf,overflow:"hidden",color:e.palette.common.white,fontWeight:o?e.typography.fontWeightBold:e.typography.fontWeightRegular,textOverflow:"ellipsis",whiteSpace:a?"normal":"nowrap"}),"aria-label":o?nj:nC,children:d})]}),(0,l.jsx)(F.Z,{sx:e=>({display:"table-cell",paddingLeft:1.5,textAlign:"right",verticalAlign:"top",fontWeight:o?e.typography.fontWeightBold:e.typography.fontWeightRegular}),children:n})]})}function nR(e){let{series:t,wrapLabels:n}=e,i=(0,c.useMemo)(()=>null===t?null:t.sort((e,t)=>e.y>t.y?-1:1),[t]);return null===t||null===i?null:(0,l.jsx)(F.Z,{sx:e=>({display:"table",padding:e.spacing(.5,2)}),children:i.map(({datumIdx:e,seriesIdx:t,seriesName:r,y:o,formattedY:a,markerColor:s,isClosestToCursor:c})=>{if(null===e||null===t)return null;let d=t.toString()+e.toString();return(0,l.jsx)(nP,{seriesName:r,y:o,formattedY:a,markerColor:s,totalSeries:i.length,wrapLabels:n,emphasizeText:c},d)})})}var nN=n(87895),nO=n(1889),nz=n(75186);let nW=(0,c.memo)(function({nearbySeries:e,totalSeries:t,isTooltipPinned:n,showAllSeries:i,enablePinning:r=!0,onShowAllClick:o,onUnpinClick:a}){let s=e[0]?.date??null;if(null===s)return null;let c=r&&t>5;return(0,l.jsxs)(F.Z,{sx:e=>({width:"100%",maxWidth:nm,padding:e.spacing(1.5,2,.5,2),backgroundColor:e.palette.designSystem?.grey[800]??nw,position:"sticky",top:0,left:0}),children:[(0,l.jsxs)(F.Z,{sx:{width:"100%",display:"flex",justifyContent:"start",alignItems:"center",paddingBottom:.5},children:[(e=>{let{formattedTime:t,formattedDate:n}=nd(e);return(0,l.jsxs)(F.Z,{children:[(0,l.jsx)(eW.Z,{variant:"caption",sx:e=>({color:e.palette.common.white}),children:n}),(0,l.jsx)(eW.Z,{variant:"caption",children:(0,l.jsx)("strong",{children:t})})]})})(s),(0,l.jsxs)(et.Z,{direction:"row",gap:1,sx:{marginLeft:"auto"},children:[c&&(0,l.jsxs)(et.Z,{direction:"row",gap:.5,alignItems:"center",sx:{textAlign:"right"},children:[(0,l.jsx)(eW.Z,{sx:{fontSize:11},children:"Show All"}),(0,l.jsx)(nN.Z,{checked:i,size:"small",onChange:(e,t)=>{if(void 0!==o)return o(t)},sx:e=>({"& .MuiSwitch-switchBase":{color:e.palette.common.white},"& .MuiSwitch-track":{backgroundColor:e.palette.common.white}})})]}),r&&(0,l.jsxs)(et.Z,{direction:"row",alignItems:"center",children:[(0,l.jsx)(eW.Z,{sx:{marginRight:.5,fontSize:11,verticalAlign:"middle"},children:n?nA:nT}),n?(0,l.jsx)(nO.default,{onClick:()=>{void 0!==a&&a()},sx:{fontSize:16,cursor:"pointer"}}):(0,l.jsx)(nz.default,{sx:{fontSize:16}})]})]})]}),(0,l.jsx)(t0.Z,{sx:e=>({width:"100%",borderColor:e.palette.grey["500"]})})]})}),n$=1e3,nH="Pinned Crosshair",nB={name:nH,type:"line",markLine:{data:[],lineStyle:{type:"dashed",width:2},emphasis:{lineStyle:{width:2,opacity:1}},blur:{lineStyle:{width:2,opacity:1}}}};function n_(e){let t=e._model;void 0!==t&&void 0!==t.option.toolbox&&t.option.toolbox.length>0&&"normal"===t.option.toolbox[0].feature.dataZoom.iconStatus.zoom&&e.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:!0})}function nV(e){e.dispatchAction({type:"restore"})}function nU(e){void 0!==e.dispatchAction&&(e.dispatchAction({type:"unselect"}),e.dispatchAction({type:"downplay"}))}function nY(e,t,n){if(void 0===n)return null;let i=[e,t];return n.containPixel("grid",i)?n.convertFromPixel("grid",i):null}function nG(e,t,n,i,r,l){let o=l.length>0?l[l.length-1]:r[r.length-1];void 0!==o&&e.dispatchAction({type:"select",seriesIndex:o.seriesIndex,dataIndex:o.dataIndex,escapeConnect:!0}),e.dispatchAction({type:"downplay",seriesIndex:i}),n.length>0?e.dispatchAction({type:"highlight",seriesIndex:n,notBlur:!1,escapeConnect:!0}):(e.dispatchAction({type:"highlight",seriesIndex:t,notBlur:!0,escapeConnect:!0}),e.dispatchAction({type:"toggleSelect"}))}function nK(e){return e[e.length-1]?.name===nH}function nX(e,t){if(void 0===e||void 0===t)return null;let n=null,i=1/0;for(let[r]of e){let e=Math.abs(r-t);e<i&&(n=r,i=e)}return n}function nq(e,t){if(void 0===t)return null;let n=e.length,i=null;for(let r=0;r<n;r++){let l=n>0?e[r]:null;if(!l)break;i=nX(l.values,t)}return i}let nJ=5.5,nQ=30,n0=5;function n1(e,t,n,i,r,l){let o=[],a=n[0]??null,s=n[1]??null;if(null===a||null===s||void 0===r.dispatchAction||!Array.isArray(e))return o;let c=[],d=[],u=[],h=[],p=[],g=e.length,m=new Map,x=nX(e[0]?.values,a);if(null===x)return nk;for(let n=0;n<g;n++){let a=t[n];if(!a)break;let f=g>0?e[n]:null;if(!f)break;let v=f.values;if(void 0===v||!Array.isArray(v))break;let y=a.name?a.name.toString():"",b=a.color??"#000";if(Array.isArray(e))for(let e=0;e<v.length;e++){let t=v[e];if(void 0===t||!Array.isArray(t))break;let a=t[0],f=t[1];if(null!=f&&x===a&&s<=f+i&&s>=f-i){let t=n3({valueToCheck:s,baseValue:f,percentage:Math.max(g>n0?2:5,100/g)});if(t){d.push(n);let t=m.get(f)??0;m.set(f,t+1),t>0&&p.push({seriesIndex:n,dataIndex:e,seriesName:y,yValue:f}),h.push({seriesIndex:n,dataIndex:e,seriesName:y,yValue:f})}else u.push(n),r.dispatchAction({type:"downplay",seriesIndex:n});let i=w(f,l);o.push({seriesIdx:n,datumIdx:e,seriesName:y,date:x,x:a,y:f,formattedY:i,markerColor:b.toString(),isClosestToCursor:t}),c.push(n)}}}return nG(r,c,d,u,h,p),o}function n5(e,t,n,i,r){let l=[],o=t[0]??null,a=t[1]??null;if(null===o||null===a)return l;let s=[],c=[],d=[],u=e.timeSeries.length;if(Array.isArray(e.xAxis)&&Array.isArray(e.timeSeries))for(let t=0;t<u;t++){let h=e.timeSeries[t];if(void 0===h||l.length>=n$)break;let p=h.name?h.name.toString():"",g=h.color??"#000";if(Array.isArray(h.data))for(let m=0;m<h.data.length;m++){let x=e.xAxis[m]??0,f=h.data[m];if(null!=f&&o===m&&"-"!==f&&a<=f+n&&a>=f-n){let e=n3({valueToCheck:a,baseValue:f,percentage:Math.max(u>n0?2:5,100/u)});e?c.push(t):(d.push(t),i?.dispatchAction!==void 0&&i.dispatchAction({type:"downplay",seriesIndex:t}));let n=x>0x174876e7ff?x:1e3*x,o=w(f,r);l.push({seriesIdx:t,datumIdx:m,seriesName:p,date:n,x:x,y:f,formattedY:o,markerColor:g.toString(),isClosestToCursor:e}),s.push(t)}}}return i?.dispatchAction!==void 0&&(i.dispatchAction({type:"downplay",seriesIndex:d}),c.length>0?i.dispatchAction({type:"highlight",seriesIndex:c,notBlur:!1,escapeConnect:!0}):i.dispatchAction({type:"highlight",seriesIndex:s,notBlur:!0,escapeConnect:!0})),l}function n2({mousePos:e,pinnedPos:t,data:n,seriesMapping:i,chart:r,format:l,showAllSeries:o=!1}){if(void 0===r||null===e)return nk;let a=!1;if(null!==e.target){let t=e.target.parentElement;if(null!==t){let e=t.parentElement;null!==e&&r.getDom()===e&&(a=!0)}}if(null!==t&&(e=t,a=!0),!1===a||null===n||void 0===r._model||void 0===e.plotCanvas.x||void 0===e.plotCanvas.y)return nk;let s=nY(e.plotCanvas.x,e.plotCanvas.y,r);if(null!==s){let e=n7({yInterval:r._model.getComponent("yAxis").axis.scale._interval,totalSeries:n.length,showAllSeries:o});return n1(n,i,s,e,r,l)}return nk}function n6({mousePos:e,pinnedPos:t,chartData:n,chart:i,format:r,showAllSeries:l=!1}){if(void 0===i||null===e)return[];let o=!1;if(null!==e.target){let t=e.target.parentElement;if(null!==t){let e=t.parentElement;null!==e&&i.getDom()===e&&(o=!0)}}if(null!==t&&(e=t,o=!0),!1===o||void 0===i._model)return[];let a=n7({yInterval:i._model.getComponent("yAxis").axis.scale._interval,totalSeries:n.timeSeries.length,showAllSeries:l}),s=[e.plotCanvas.x??0,e.plotCanvas.y??0];if(i.containPixel("grid",s)){let e=i.convertFromPixel("grid",s);if(void 0!==e[0]&&void 0!==e[1])return n5(n,e,a,i,r)}return[]}function n3({valueToCheck:e,baseValue:t,percentage:n}){let i=n/100*t;return e>=t-i&&e<=t+i}function n7({yInterval:e,totalSeries:t,showAllSeries:n=!1}){if(n)return 10*e;let i=.3*e;return t>n0?Math.max(i,e*nQ/t):Math.max(i,e*nJ)}function n4(e,t,n,i,r){if(null===e||(null!==t&&(e=t),void 0===e.plotCanvas.x))return;let l=e.page.x+32,o=e.page.y+16;if(r){let e=r.getBoundingClientRect();l=l-e.left+r.scrollLeft,o=o-e.top+r.scrollTop;let t=e.top+r.scrollHeight;o+n>t&&(o=Math.max(t-n-16,ny/2))}else o+n>window.innerHeight+window.scrollY&&(o=Math.max(window.innerHeight+window.scrollY-n-16,ny/2));return l+i>window.innerWidth&&(l=e.page.x-i-32),l<32&&(l=32),o<ny/2&&(o=ny/2),`translate3d(${l}px, ${o}px, 0)`}function n8(e,t,n){return{minWidth:ng,maxWidth:nm,maxHeight:(n?n-ny:void 0)??nx,padding:0,position:"absolute",top:0,left:0,backgroundColor:e.palette.designSystem?.grey[800]??nw,borderRadius:"6px",color:"#fff",fontSize:"11px",visibility:"visible",opacity:1,transition:"all 0.1s ease-out",zIndex:null!==t?"auto":e.zIndex.tooltip,overflow:"hidden","&:hover":{overflowY:"auto"}}}let n9=(0,c.memo)(function({chartRef:e,chartData:t,enablePinning:n=!0,wrapLabels:i,format:r,onUnpinClick:o,pinnedPos:a,containerId:s}){let[d,u]=(0,c.useState)(!1),h=nM(),{height:p,width:g,ref:m}=(0,nE.default)(),x=(0,c.useRef)(),f=null!==a&&n;if(null===h||null===h.target||null===a&&"CANVAS"!==h.target.tagName)return null;let v=n6({mousePos:h,chartData:t,pinnedPos:a,chart:e.current,format:r,showAllSeries:d});if(0===v.length)return null;let y=t.timeSeries.length,b=s?document.querySelector(s):void 0,C=b?b.getBoundingClientRect().height:void 0;return x.current=n4(h,a,p??0,g??0,b),(0,l.jsx)(nI.Z,{container:b,children:(0,l.jsx)(F.Z,{ref:m,sx:e=>({minWidth:ng,maxWidth:nm,maxHeight:C??nx,padding:0,position:"absolute",top:0,left:0,backgroundColor:e.palette.designSystem?.grey[800]??nw,borderRadius:"6px",color:"#fff",fontSize:"11px",visibility:"visible",opacity:1,transition:"all 0.1s ease-out",zIndex:null!==a?"auto":e.zIndex.tooltip,overflow:"hidden","&:hover":{overflowY:"auto"}}),style:{transform:x.current,display:x.current?"block":"none"},children:(0,l.jsxs)(et.Z,{spacing:.5,children:[(0,l.jsx)(nW,{nearbySeries:v,totalSeries:y,enablePinning:n,isTooltipPinned:f,showAllSeries:d,onShowAllClick:e=>u(e),onUnpinClick:o}),(0,l.jsx)(nR,{series:v,wrapLabels:i})]})})})});(0,k.D)([t9.N,D.N,V.N,ne.N,nt.N,nn.N,A.N,ni.N,I.N,U.N,E.N]);let ie=(0,c.forwardRef)(function({height:e,data:t,yAxis:n,format:i,grid:r,legend:o,tooltipConfig:a=nD,noDataVariant:s="message",syncGroup:d,onDataZoom:u,onDoubleClick:h,__experimentalEChartsOptionsOverride:p},g){let m=N(),x=(0,c.useRef)(),[f,v]=(0,c.useState)(!0),[y,b]=(0,c.useState)(null),{timeZone:C}=np(),[j,w]=(0,c.useState)(!1),[Z,S]=(0,c.useState)(0);(0,c.useImperativeHandle)(g,()=>({highlightSeries({id:e}){x.current&&x.current.dispatchAction({type:"highlight",seriesId:e})},clearHighlightedSeries:()=>{x.current&&nU(x.current)}}),[]);let k=(0,c.useMemo)(()=>({datazoom:e=>{if(void 0===u&&setTimeout(()=>{b(null)},10),void 0===u||void 0===e.batch[0])return;let n=e.batch[0].startValue??0,i=e.batch[0].endValue??t.xAxis.length-1,r=t.xAxis[n],l=t.xAxis[i];void 0!==r&&void 0!==l&&u({start:r,end:l,startIndex:n,endIndex:i})}}),[t,u,b]);void 0!==x.current&&n_(x.current);let{noDataOption:M}=m,D=(0,c.useMemo)(()=>{if(void 0===t.timeSeries)return{};if(null===t.timeSeries||0===t.timeSeries.length&&"message"===s)return M;let e=t.rangeMs??Q(t.xAxis),l={series:t.timeSeries,xAxis:{type:"category",data:t.xAxis,max:t.xAxisMax,axisLabel:{formatter:t=>ns(t,e,C)}},yAxis:J(n,i),animation:!1,tooltip:{show:!0,trigger:"axis",showContent:!1},axisPointer:{type:"line",z:0,triggerEmphasis:!1,triggerTooltip:!1,snap:!0},toolbox:{feature:{dataZoom:{icon:null,yAxisIndex:"none"}}},grid:r,legend:o};return p?p(l):l},[t,n,i,r,o,M,C,p,s]);return(0,l.jsxs)(F.Z,{style:{height:e},onClick:e=>{a.enablePinning&&e.target instanceof HTMLCanvasElement&&b(t=>null===t?{page:{x:e.pageX,y:e.pageY},client:{x:e.clientX,y:e.clientY},plotCanvas:{x:e.nativeEvent.offsetX,y:e.nativeEvent.offsetY},target:e.target}:null)},onMouseDown:e=>{let{clientX:t}=e;w(!0),S(t)},onMouseMove:e=>{if(!(e.target instanceof HTMLCanvasElement))return;let{clientX:t}=e;j&&t-Z>0&&v(!1)},onMouseUp:()=>{w(!1),S(0),v(!0)},onMouseLeave:()=>{null===y&&v(!1),void 0!==x.current&&nU(x.current)},onMouseEnter:()=>{v(!0),void 0!==x.current&&n_(x.current)},onDoubleClick:e=>{b(null),void 0===h?void 0!==x.current&&nV(x.current):h(e)},children:[!0===f&&D.tooltip?.showContent===!1&&!0!==a.hidden&&(0,l.jsx)(n9,{chartRef:x,chartData:t,wrapLabels:a.wrapLabels,enablePinning:a.enablePinning,pinnedPos:y,format:i,onUnpinClick:()=>{b(null)},containerId:m.tooltipPortalContainerId}),(0,l.jsx)(K,{sx:{width:"100%",height:"100%"},option:D,theme:m.echartsTheme,onEvents:k,_instance:x,syncGroup:d})]})});var it=n(28797),ii=n(48137),ir=n(33755),il=n(86396);function io({control:e,...t}){let{fields:n,append:i,remove:r}=(0,ii.useFieldArray)({control:e,name:"panelDefinition.spec.links"});return(0,l.jsxs)(et.Z,{...t,gap:3,children:[n&&n.length>0?n.map((t,n)=>(0,l.jsxs)(c.Fragment,{children:[(0,l.jsxs)(et.Z,{direction:"row",gap:1,alignItems:"center",children:[(0,l.jsx)(ia,{control:e,index:n}),(0,l.jsx)(en.Z,{style:{width:"fit-content",height:"fit-content"},onClick:()=>r(n),children:(0,l.jsx)(il.default,{})})]}),(0,l.jsx)(t0.Z,{})]},t.id)):(0,l.jsx)(eW.Z,{variant:"subtitle1",mb:2,fontStyle:"italic",children:"No links defined"}),(0,l.jsx)(en.Z,{style:{width:"fit-content",height:"fit-content"},onClick:()=>i({url:""}),children:(0,l.jsx)(ir.default,{})})]})}function ia({control:e,index:t}){return(0,l.jsxs)(et.Z,{gap:2,flexGrow:1,children:[(0,l.jsxs)(et.Z,{direction:"row",gap:2,children:[(0,l.jsx)(ii.Controller,{control:e,name:`panelDefinition.spec.links.${t}.url`,render:({field:e,fieldState:t})=>(0,l.jsx)(ei.Z,{...e,required:!0,fullWidth:!0,label:"URL",error:!!t.error,helperText:t.error?.message,onChange:t=>{e.onChange(t)}})}),(0,l.jsx)(ii.Controller,{control:e,name:`panelDefinition.spec.links.${t}.name`,render:({field:e,fieldState:t})=>(0,l.jsx)(ei.Z,{...e,fullWidth:!0,label:"Name",defaultValue:"",error:!!t.error,helperText:t.error?.message,onChange:t=>{e.onChange(t)}})}),(0,l.jsx)(ii.Controller,{control:e,name:`panelDefinition.spec.links.${t}.tooltip`,render:({field:e,fieldState:t})=>(0,l.jsx)(ei.Z,{...e,fullWidth:!0,label:"Tooltip",defaultValue:"",error:!!t.error,helperText:t.error?.message,onChange:t=>{e.onChange(t)}})})]}),(0,l.jsxs)(et.Z,{gap:2,direction:"row",alignItems:"center",children:[(0,l.jsx)(ii.Controller,{control:e,name:`panelDefinition.spec.links.${t}.renderVariables`,render:({field:e})=>(0,l.jsx)(it.Z,{label:"Render Variables",control:(0,l.jsx)(e6.Z,{...e,checked:e.value,onChange:t=>e.onChange(t.target.checked)})})}),(0,l.jsx)(ii.Controller,{control:e,name:`panelDefinition.spec.links.${t}.targetBlank`,render:({field:e})=>(0,l.jsx)(it.Z,{label:"Open in new tab",control:(0,l.jsx)(e6.Z,{...e,checked:e.value,onChange:t=>e.onChange(t.target.checked)})})})]})]})}let is=[{id:"value",label:"Value"},{id:"percentage",label:"Percentage"}];function ic({disablePercentageMode:e,onChange:t,value:n="value"}){return(0,l.jsx)(tk,{label:"Mode",control:(0,l.jsx)(tT,{value:is.find(e=>e.id===n),options:is,getOptionLabel:e=>e.label,getOptionDisabled:t=>"percentage"===t.id&&e,onChange:(e,{id:n})=>{t(n)},disableClearable:!0})})}var id=n(38359);let iu=({children:e})=>(0,l.jsx)(id.ZP,{item:!0,xs:4,children:(0,l.jsx)(et.Z,{spacing:3,children:e})}),ih=({children:e})=>(0,l.jsx)(id.ZP,{container:!0,spacing:8,children:e}),ip=({title:e,children:t,icon:n})=>(0,l.jsxs)(F.Z,{children:[(0,l.jsxs)(F.Z,{display:"flex",borderBottom:1,borderColor:"grey.300",marginBottom:e=>e.spacing(1),children:[(0,l.jsx)(eW.Z,{variant:"overline",component:"h4",children:e}),n&&(0,l.jsx)(F.Z,{sx:{marginLeft:"auto"},children:n})]}),(0,l.jsx)(et.Z,{spacing:1,children:t})]});var ig=n(66224);function im(e){let{message:t}=e;return(0,l.jsx)(et.Z,{sx:{height:"100%",alignItems:"center",justifyContent:"center"},children:(0,l.jsx)(eW.Z,{children:t})})}function ix(e){let{resource:t}=e;return(0,l.jsx)(im,{message:`No ${t}`})}function iv(e){let{variant:t="rounded"}=e;return(0,l.jsx)(et.Z,{sx:{height:"100%",alignItems:"center",justifyContent:"center",px:1},children:(0,l.jsx)(ig.Z,{variant:t,width:"100%",height:"30%","aria-label":"Loading..."})})}let iy=[{id:"asc",label:"Ascending"},{id:"desc",label:"Descending"}];function ib({onChange:e,value:t="desc"}){return(0,l.jsx)(tk,{label:"Sort",control:(0,l.jsx)(tT,{value:iy.find(e=>e.id===t),options:iy,getOptionLabel:e=>e.label,onChange:(t,{id:n})=>{e(n)},disableClearable:!0})})}function iC({onChange:e,value:t,...n}){let i=t=>{e(t)};return(0,l.jsxs)(o.Z,{"aria-label":"Sort",...n,children:[(0,l.jsx)(a.Z,{onClick:()=>i(void 0),variant:void 0===t?"contained":"outlined",children:"None"}),(0,l.jsx)(a.Z,{onClick:()=>i("asc"),variant:"asc"===t?"contained":"outlined",children:"Asc"}),(0,l.jsx)(a.Z,{onClick:()=>i("desc"),variant:"desc"===t?"contained":"outlined",children:"Desc"})]})}function ij({text:e,fontWeight:t,width:n,height:r,lineHeight:l,maxSize:o,fontSizeOverride:a}){let s=function(){if(!i&&null===(i=document.createElement("canvas").getContext("2d")))throw Error("Canvas context is null.");return i}(),{echartsTheme:c}=N();if(void 0!==a)return Number(a);let d=c.textStyle,u=Number(d?.fontSize)??12,h=d?.fontFamily??"Lato",p=`${t} ${u}px ${h}`;s.font=p;let g=Math.min(r/l,n/s.measureText(e).width*u);return o?Math.min(g,o):g}let iw=(e,t)=>null===e?"null":"number"==typeof e?w(e,t):void 0===e?"":e;(0,k.D)([t9.N,D.N,T.N,A.N,I.N,E.N]);let iZ=e=>{let{width:t,height:n,data:i,sparkline:r,showSeriesName:o,format:a,valueFontSize:s}=e,d=N(),u=i.color,h=iw(i.calculatedValue,a),p=d.container.padding.default,g=ij({text:i?.seriesData?.name??"",fontWeight:400,width:t,height:.125*n,lineHeight:1.2,maxSize:30}),m=o?1.2*g+p:0,x=t-2*p,f=n-m,v=ij({text:h,fontSizeOverride:s,fontWeight:700,width:r?x:.5*x,height:r?.25*f:.9*f,lineHeight:1.2}),y=1.2*v;g=Math.min(.7*v,g);let b=(0,c.useMemo)(()=>{if(void 0===i.seriesData)return d.noDataOption;let e=i.seriesData,t=[];if(void 0!==r){let n={type:"line",name:e.name,data:e.values,zlevel:1,symbol:"none",animation:!1,silent:!0},i=q()(n,r);t.push(i)}return{title:{show:!1},grid:{show:!1,top:"35%",right:0,bottom:0,left:0,containLabel:!1},xAxis:{type:"time",show:!1,boundaryGap:!1},yAxis:{type:"value",show:!1,min:e=>e.min>=0&&e.min<=1?0:e.min},tooltip:{show:!1},series:t}},[i,d,r]),C=r?"auto":"center";return(0,l.jsxs)(F.Z,{sx:{height:"100%",width:"100%",display:"flex",flexDirection:"column",justifyContent:C,alignItems:C},children:[o&&(0,l.jsx)(iS,{padding:p,fontSize:g,children:i.seriesData?.name}),(0,l.jsx)(ik,{variant:"h3",color:u,fontSize:v,padding:p,children:h}),void 0!==r&&(0,l.jsx)(K,{sx:{width:"100%"},style:{height:Math.floor(n-m-y)},option:b,theme:d.echartsTheme,renderer:"svg"})]})},iS=(0,ed.ZP)(eW.Z,{shouldForwardProp:e=>"padding"!==e&&"fontSize"!==e})(({theme:e,padding:t,fontSize:n})=>({color:e.palette.text.secondary,padding:`${t}px`,fontSize:`${n}px`,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"})),ik=(0,ed.ZP)(eW.Z,{shouldForwardProp:e=>"color"!==e&&"padding"!==e&&"fontSize"!==e&&"sparkline"!==e})(({theme:e,color:t,padding:n,fontSize:i,sparkline:r})=>({color:t??e.palette.text.primary,fontSize:`${i}px`,padding:r?`${n}px ${n}px 0 ${n}px`:` 0 ${n}px`,whiteSpace:"nowrap",lineHeight:1.2}));var iM=n(5404),iD=n(98346),iT=n(12434),iA=n(22446);function iI({inputRef:e,label:t,color:n,value:i,mode:r,onChange:o,onColorChange:a,onBlur:s,onDelete:d}){let[u,h]=(0,c.useState)(0);return(0,l.jsxs)(et.Z,{flex:1,direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,l.jsx)(eu,{label:t,color:n,onColorChange:a}),(0,l.jsx)(tv.Z,{htmlFor:t,children:t}),(0,l.jsx)(ei.Z,{id:t,inputRef:e,type:"number",value:0===i?"":i,placeholder:"0",onChange:o,onBlur:s,onKeyDown:e=>{"Enter"===e.key&&(s(),h(u+1))},InputProps:{endAdornment:"percent"===r?(0,l.jsx)(F.Z,{paddingX:1,children:"%"}):void 0}},u),(0,l.jsx)(en.Z,{"aria-label":`delete threshold ${t}`,size:"small",onClick:d,children:(0,l.jsx)(iA.default,{})})]})}function iE({thresholds:e,onChange:t,hideDefault:n,disablePercentMode:i}){let{thresholds:{defaultColor:r,palette:o}}=N(),a=e?.defaultColor??r,[s,d]=(0,c.useState)(e?.steps);(0,c.useEffect)(()=>{d(e?.steps)},[e?.steps]);let u=(0,c.useRef)(null),h=(0,c.useRef)(!1);(0,c.useEffect)(()=>{u.current&&h.current&&(u.current?.focus(),h.current=!1)},[s?.length]);let p=(e,t)=>{d((0,em.Uy)(s,n=>{let i=n?.[t];i&&(i.value=Number(e.target.value))}))},g=(n,i)=>{void 0!==e&&t((0,em.Uy)(e,e=>{if(void 0!==e.steps){let t=e.steps[i];t&&(t.color=n)}}))},m=()=>{if(void 0!==s){let n=[...s];n.sort((e,t)=>e.value-t.value),void 0!==e&&t((0,em.Uy)(e,e=>{e.steps=n}))}},x=n=>{void 0!==e&&t((0,em.Uy)(e,e=>{e.steps&&e.steps.splice(n,1)}))};return(0,l.jsxs)(ip,{title:"Thresholds",icon:(0,l.jsx)(tw,{description:"Add threshold",children:(0,l.jsx)(en.Z,{size:"small","aria-label":"add threshold",onClick:()=>{h.current=!0,void 0===e?t({steps:[{value:10}]}):e&&void 0===e.steps?t((0,em.Uy)(e,e=>{e.steps=[{value:10}]})):t((0,em.Uy)(e,e=>{let t=e.steps;if(t?.length){let e=t[t.length-1],n=o[t.length]??iF();t.push({color:n,value:(e?.value??0)+10})}else t&&t.push({value:10})}))},children:(0,l.jsx)(ir.default,{})})}),children:[(0,l.jsx)(tk,{label:"Mode",description:"Percentage means thresholds relative to min & max",control:(0,l.jsxs)(iM.Z,{exclusive:!0,disabled:i,value:e?.mode??"absolute",onChange:(n,i)=>{let r="percent"===i?"percent":void 0;void 0!==e?t((0,em.Uy)(e,e=>{e.mode=r})):t({mode:r})},sx:{height:"36px",marginLeft:"auto"},children:[(0,l.jsx)(iD.Z,{"aria-label":"absolute",value:"absolute",sx:{fontWeight:500},children:"Absolute"}),(0,l.jsx)(iD.Z,{"aria-label":"percent",value:"percent",sx:{fontWeight:500},children:"Percent"})]})}),s&&s.map((t,n)=>(0,l.jsx)(iI,{inputRef:n===s.length-1?u:void 0,label:`T${n+1}`,color:t.color??o[n]??a,value:t.value,mode:e?.mode,onColorChange:e=>g(e,n),onChange:e=>{p(e,n)},onDelete:()=>{x(n)},onBlur:m},n)).reverse(),!n&&(0,l.jsxs)(iT.Z,{flex:1,direction:"row",alignItems:"center",spacing:1,children:[(0,l.jsx)(eu,{label:"default",color:a,onColorChange:n=>{void 0!==e?t((0,em.Uy)(e,e=>{e.defaultColor=n})):t({defaultColor:n})}}),(0,l.jsx)(eW.Z,{children:"Default"})]})]})}let iF=()=>"#"+Math.floor(0x1000000*Math.random()).toString(16).padStart(6,"0");var iL=n(15539),iP=n(70590);let{gcd:iR}=(0,iL.U)({gcdDependencies:iP.e}),iN=(0,c.memo)(function({containerId:e,chartRef:t,data:n,seriesMapping:i,enablePinning:r=!0,wrapLabels:o,format:a,onUnpinClick:s,pinnedPos:d}){let[u,h]=(0,c.useState)(!1),p=(0,c.useRef)(),g=nM(),{height:m,width:x,ref:f}=(0,nE.default)(),v=null!==d&&r;if(null===g||null===g.target||null===n||null===d&&"CANVAS"!==g.target.tagName)return null;let y=t.current,b=e?document.querySelector(e):void 0,C=b?b.getBoundingClientRect().height:void 0;p.current=n4(g,d,m??0,x??0,b);let j=n2({mousePos:g,data:n,seriesMapping:i,pinnedPos:d,chart:y,format:a,showAllSeries:u});if(0===j.length)return null;let w=n.length;return(0,l.jsx)(nI.Z,{container:b,children:(0,l.jsx)(F.Z,{ref:f,sx:e=>n8(e,d,C),style:{transform:p.current},children:(0,l.jsxs)(et.Z,{spacing:.5,children:[(0,l.jsx)(nW,{nearbySeries:j,totalSeries:w,enablePinning:r,isTooltipPinned:v,showAllSeries:u,onShowAllClick:e=>h(e),onUnpinClick:s}),(0,l.jsx)(nR,{series:j,wrapLabels:o})]})})})});(0,k.D)([t9.N,M.N,D.N,T.N,V.N,ne.N,nt.N,nn.N,A.N,ni.N,I.N,E.N]);let iO=(0,c.forwardRef)(function({height:e,data:t,seriesMapping:n,timeScale:i,yAxis:r,format:o,grid:a,isStackedBar:s=!1,tooltipConfig:d=nD,noDataVariant:u="message",syncGroup:h,onDataZoom:p,onDoubleClick:g,__experimentalEChartsOptionsOverride:m},x){let f;let{chartsTheme:v,enablePinning:y,lastTooltipPinnedCoords:b,setLastTooltipPinnedCoords:C}=R(),j=d.enablePinning&&y,w=(0,c.useRef)(),[Z,S]=(0,c.useState)(!0),[k,M]=(0,c.useState)(null),[D,T]=(0,c.useState)(null),[A,I]=(0,c.useState)(!1),[E,L]=(0,c.useState)(0),{timeZone:P}=np();if(void 0===i){let e=function(e){let t,n;let i=[];for(let t of e)if(t&&"timeRange"in t){if(void 0===t||void 0===t.timeRange||void 0===t.stepMs)continue;if(i.push(t.stepMs),void 0===n){n=t.timeRange;continue}t.timeRange.start<n.start&&(n.start=t.timeRange.start),t.timeRange.end>n.end&&(n.end=t.timeRange.end)}else if(t&&"values"in t){for(let e=0;e<t.values.length;e++){let i=t.values[e];if(void 0===i)continue;let[r]=i,l=new Date(r),o=new Date(r);if(void 0===n){n={start:l,end:o};continue}l<n.start&&(n.start=l),o>n.end&&(n.end=o)}if(void 0===n)return;let e=n.start.valueOf(),i=n.end.valueOf(),r=i-e;return{startMs:e,endMs:i,rangeMs:r,stepMs:10}}if(void 0===n)return;if(1===i.length)t=i[0];else{let e=iR(...i);t=e<10?10:e}let r=n.start.valueOf(),l=n.end.valueOf();return{startMs:r,endMs:l,stepMs:t,rangeMs:l-r}}(t);if(void 0===e){let e=new Date,t=new Date(e);t.setFullYear(e.getFullYear()-5);let n=e.getTime(),i=t.getTime();f={startMs:i,endMs:n,stepMs:1,rangeMs:n-i}}else f=e}else f=i;(0,c.useImperativeHandle)(x,()=>({highlightSeries({name:e}){w.current&&w.current.dispatchAction({type:"highlight",seriesId:e})},clearHighlightedSeries:()=>{w.current&&nU(w.current)}}),[]);let N=(0,c.useMemo)(()=>({datazoom:e=>{if(void 0===p&&setTimeout(()=>{M(null)},10),void 0===p||void 0===e.batch[0])return;let t=e.batch[0].startValue,n=e.batch[0].endValue;void 0!==t&&void 0!==n&&p({start:t,end:n})},finished:()=>{void 0!==w.current&&n_(w.current)}}),[p,M]),{noDataOption:O}=v,z=(0,c.useMemo)(()=>{if(null===t||0===t.length&&"message"===u)return O;let e=[],i="local"===P;t.map((t,n)=>{let r=t.values.map(([e,t])=>[i?e:(0,nr.toZonedTime)(e,P),null===t?"-":t]);e.push({id:n,source:[...r],dimensions:["time","value"]})});let l={dataset:e,series:y&&null!==D?[...n,D]:n,xAxis:{type:"time",min:i?f.startMs:(0,nr.toZonedTime)(f.startMs,P),max:i?f.endMs:(0,nr.toZonedTime)(f.endMs,P),axisLabel:{hideOverlap:!0,formatter:nc(f.rangeMs??0)},axisPointer:{snap:!1}},yAxis:J(r,o),animation:!1,tooltip:{show:!0,showContent:s,trigger:s?"item":"axis",appendToBody:s},axisPointer:{type:"line",z:0,triggerEmphasis:!1,triggerTooltip:!1,snap:!1},toolbox:{feature:{dataZoom:{icon:null,yAxisIndex:"none"}}},grid:a};return m?m(l):l},[t,n,f,r,o,a,O,m,u,P,s,y,D]);return(0,c.useEffect)(()=>{null===k||null===b||W()(b,k)||(M(null),null!==k&&null!==D&&T(null))},[b,n]),(0,l.jsxs)(F.Z,{style:{height:e},onClick:e=>{let n=e.ctrlKey||e.metaKey;n&&e.preventDefault();let i=nY(e.nativeEvent.offsetX,e.nativeEvent.offsetY,w.current);if(null!==i&&j&&e.target instanceof HTMLCanvasElement){let r={page:{x:e.pageX,y:e.pageY},client:{x:e.clientX,y:e.clientY},plotCanvas:{x:e.nativeEvent.offsetX,y:e.nativeEvent.offsetY},target:e.target};M(e=>null===e?r:(T(null),null)),T(e=>{if(null!==e)return null;{let e=i[0],n=nX(t[0]?.values,e);return q()({},nB,{markLine:{data:[{xAxis:n}]}})}}),n||C(r)}},onMouseDown:e=>{let{clientX:t}=e;I(!0),L(t)},onMouseMove:e=>{if(!(e.target instanceof HTMLCanvasElement))return;let{clientX:t}=e;A&&t-E>0&&S(!1)},onMouseUp:()=>{I(!1),L(0),S(!0)},onMouseLeave:()=>{null===k&&S(!1),void 0!==w.current&&nU(w.current)},onMouseEnter:()=>{S(!0),void 0!==w.current&&n_(w.current)},onDoubleClick:e=>{M(null),void 0===g?void 0!==w.current&&nV(w.current):g(e)},children:[!0===Z&&z.tooltip?.showContent===!1&&!0!==d.hidden&&(0,l.jsx)(iN,{containerId:v.tooltipPortalContainerId,chartRef:w,data:t,seriesMapping:n,wrapLabels:d.wrapLabels,enablePinning:j,pinnedPos:k,format:o,onUnpinClick:()=>{M(null),T(null)}}),(0,l.jsx)(K,{sx:{width:"100%",height:"100%"},option:z,theme:v.echartsTheme,onEvents:N,_instance:w,syncGroup:h})]})});var iz=n(63767),iW=n(59986),i$=n(93729),iH=n(53578),iB=n(74905),i_=n(75141),iV=n(51727);let iU="yyyy-MM-dd HH:mm:ss";function iY(e,t){return e?(0,i$.s3)(e)?e.pastDuration:function(e,t,n){let i=na(e.start,t,n),r=na(e.end,t,n);return`${i} - ${r}`}(e,iU,t):"Custom Time Range"}let iG=({initialTimeRange:e,onChange:t,onCancel:n})=>{let{formatWithUserTimeZone:i}=np(),[r,o]=(0,c.useState)(e),[s,d]=(0,c.useState)({start:i(e.start,iU),end:i(e.end,iU)}),[u,h]=(0,c.useState)(!0),p=(e,t)=>{let n="string"==typeof e,r=n?e:i(e,iU);d(e=>({...e,[t]:r})),n||o(n=>({...n,[t]:e}))},g=e=>{p(e,"start")},m=e=>{p(e,"end")},x=()=>{var e,t;let n={start:new Date(s.start),end:new Date(s.end)};if(e=n.start,t=n.end,(0,nl.isValid)(e)&&(0,nl.isValid)(t)?!!(0,nl.isBefore)(e,t)||(console.error("End Time is before Start Time"),!1):(console.error("Invalid Date"),!1))return o(n),n},f=()=>{let e=x();e&&t(e)};return(0,l.jsx)(iH._,{dateAdapter:iV.H,children:(0,l.jsxs)(et.Z,{spacing:2,sx:e=>({padding:e.spacing(1,0,2)}),children:[u&&(0,l.jsxs)(F.Z,{sx:e=>({".MuiPickersLayout-contentWrapper":{backgroundColor:e.palette.background.default}}),children:[(0,l.jsx)(eW.Z,{variant:"h3",padding:1,paddingLeft:2,children:"Select Start Time"}),(0,l.jsx)(iB.S,{displayStaticWrapperAs:"desktop",openTo:"day",disableHighlightToday:!0,value:e.start,onChange:e=>{null!==e&&g(e)},onAccept:()=>{h(!1)}})]}),!u&&(0,l.jsxs)(F.Z,{sx:e=>({".MuiPickersLayout-contentWrapper":{backgroundColor:e.palette.background.default}}),children:[(0,l.jsx)(eW.Z,{variant:"h3",padding:1,paddingLeft:2,children:"Select End Time"}),(0,l.jsx)(iB.S,{displayStaticWrapperAs:"desktop",openTo:"day",disableHighlightToday:!0,value:e.end,minDateTime:r.start,onChange:e=>{null!==e&&m(e)},onAccept:e=>{null!==e&&(h(!0),m(e))}})]}),(0,l.jsxs)(et.Z,{direction:"row",alignItems:"center",gap:1,pl:1,pr:1,children:[(0,l.jsx)(tq.ErrorBoundary,{FallbackComponent:tX,children:(0,l.jsx)(i_.l,{label:"Start Time",value:new Date(s.start),onChange:e=>{e&&g(e)},onBlur:()=>x(),format:iU})}),(0,l.jsx)(tq.ErrorBoundary,{FallbackComponent:tX,children:(0,l.jsx)(i_.l,{label:"End Time",value:new Date(s.end),onChange:e=>{e&&m(e)},onBlur:()=>x(),format:iU})})]}),(0,l.jsxs)(et.Z,{direction:"row",sx:{padding:e=>e.spacing(0,1)},gap:1,children:[(0,l.jsx)(a.Z,{variant:"contained",onClick:()=>f(),fullWidth:!0,children:"Apply"}),(0,l.jsx)(a.Z,{variant:"outlined",onClick:()=>n(),fullWidth:!0,children:"Cancel"})]})]})})};function iK({value:e,timeOptions:t,onChange:n,height:i,showCustomTimeRange:r=!0}){let{timeZone:o}=np(),a=(0,c.useRef)(),[s,d]=(0,c.useState)(!1),u=(0,c.useMemo)(()=>(0,i$.s3)(e)?(0,i$.sG)(e):e,[e]),h=(0,c.useMemo)(()=>{var t;return{value:t=(0,i$.s3)(e)?void 0:e,display:iY(t,o)}},[e,o]),[p,g]=(0,c.useState)(!1);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ec.ZP,{anchorEl:a.current,anchorOrigin:{vertical:"bottom",horizontal:"center"},open:s,onClose:()=>d(!1),sx:e=>({padding:e.spacing(2)}),children:(0,l.jsx)(iG,{initialTimeRange:u,onChange:e=>{n(e),d(!1),g(!1)},onCancel:()=>d(!1)})}),(0,l.jsx)(F.Z,{ref:a,children:(0,l.jsxs)(iz.Z,{open:p,value:iY(e,o),onClick:()=>g(!p),IconComponent:iW.default,inputProps:{"aria-label":`Select time range. Currently set to ${e}`},sx:{".MuiSelect-icon":{marginTop:"1px",transform:"none"},".MuiSelect-select.MuiSelect-outlined.MuiInputBase-input":{paddingRight:"36px"},".MuiSelect-select":i?{lineHeight:i,paddingY:0}:{}},children:[t.map((e,t)=>(0,l.jsx)(t$.Z,{value:iY(e.value,o),onClick:()=>{n(e.value)},children:e.display},t)),r&&(0,l.jsx)(t$.Z,{value:iY(h.value,o),onClick:()=>d(!0),children:h.display})]})})]})}let iX=(0,ed.ZP)(a.Z)(({theme:e})=>({padding:e.spacing(.5),minWidth:"auto"})),iq=(0,c.forwardRef)(function(e,t){return(0,l.jsx)(iX,{ref:t,variant:"outlined",color:"secondary",...e})}),iJ=Object.entries(j).map(([e,t])=>({id:e,...t})).filter(e=>!e.disableSelectorOption),iQ=[{id:"default",label:"Default",decimalPlaces:void 0},{id:"0",label:"0",decimalPlaces:0},{id:"1",label:"1",decimalPlaces:1},{id:"2",label:"2",decimalPlaces:2},{id:"3",label:"3",decimalPlaces:3},{id:"4",label:"4",decimalPlaces:4}];function i0({value:e,onChange:t,disabled:n=!1}){var i;let r=!!S(e).decimalPlaces,o=!!S(e).shortValues,a=({decimalPlaces:n})=>{r&&t({...e,decimalPlaces:n})},s=j[e.unit];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tk,{label:"Short values",control:(0,l.jsx)(nN.Z,{checked:!!o&&!1!==e.shortValues,onChange:(n,i)=>{o&&t({...e,shortValues:i})},disabled:!o})}),(0,l.jsx)(tk,{label:"Unit",control:(0,l.jsx)(tT,{value:{id:e.unit,...s},options:iJ,groupBy:e=>e.group,onChange:(e,n)=>{t({unit:n.id})},disableClearable:!0,disabled:n})}),(0,l.jsx)(tk,{label:"Decimals",control:(0,l.jsx)(tT,{value:(i=e.decimalPlaces,iQ.find(e=>e.decimalPlaces===i)),options:iQ,getOptionLabel:e=>e.label,onChange:(e,t)=>a(t),disabled:!r,disableClearable:!0})})]})}function i1({name:e,height:t}){return(0,l.jsx)(F.Z,{style:{maxWidth:t,top:`calc(${t}px / 2)`},sx:{display:"inline-block",position:"absolute",transform:"translateX(-50%) rotate(-90deg)",transformOrigin:"top",textAlign:"center",zIndex:1},children:(0,l.jsx)(eW.Z,{variant:"body1","aria-label":"y axis label",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e})})}var i5=n(78439);function i2(){let{enqueueSnackbar:e,closeSnackbar:t}=(0,i5.Ds)(),n=i6(e,"error"),i=i6(e,"info"),r=i6(e,"warning"),l=i6(e,"success"),o=(0,c.useCallback)((e,t)=>n(e instanceof Error?e.message:`An unexpected error occurred: ${e}`,t),[n]);return{enqueueSnackbar:e,closeSnackbar:t,errorSnackbar:n,infoSnackbar:i,warningSnackbar:r,successSnackbar:l,exceptionSnackbar:o}}function i6(e,t){return(0,c.useCallback)((n,i)=>e(n,{...i,variant:t}),[e,t])}function i3(e,t){let n=e.palette.text?.primary??"#222",i={title:{show:!1},textStyle:{color:n,fontFamily:e.typography.fontFamily,fontSize:12},grid:{top:5,right:20,bottom:0,left:20,containLabel:!0},color:["#56B4E9","#009E73","#0072B2","#CC79A7","#F0E442","#E69F00","#D55E00"],categoryAxis:{show:!0,axisLabel:{show:!0,color:n,margin:15},axisTick:{show:!1,length:6,lineStyle:{color:e.palette.grey[600]}},axisLine:{show:!0,lineStyle:{color:e.palette.grey[600]}},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.4}},splitArea:{show:!1,areaStyle:{color:[e.palette.grey[300]]}}},timeAxis:{show:!0,axisLabel:{show:!0,color:n,margin:15},axisTick:{show:!1,length:6,lineStyle:{color:e.palette.grey[600]}},axisLine:{show:!0,lineStyle:{color:e.palette.grey[600]}},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.4}},splitArea:{show:!1,areaStyle:{color:[e.palette.grey[300]]}}},valueAxis:{show:!0,axisLabel:{color:n,margin:12},axisLine:{show:!1},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.6}}},legend:{orient:"horizontal",textStyle:{color:n},pageTextStyle:{color:e.palette.grey[600]},pageIconColor:e?.palette?.action?.active,pageIconInactiveColor:e?.palette?.action?.disabled},toolbox:{show:!0,top:10,right:10,iconStyle:{borderColor:n}},tooltip:{backgroundColor:e.palette.designSystem?.grey[800],borderColor:e.palette.designSystem?.grey[800],textStyle:{color:"#fff",fontSize:11}},axisPointer:{lineStyle:{color:e.palette.grey[500]}},markLine:{symbol:"none",symbolSize:0,itemStyle:{color:e.palette.grey[500]},lineStyle:{type:"dashed",width:1}},line:{showSymbol:!1,symbol:"circle",symbolSize:4,smooth:!1,lineStyle:{width:1},emphasis:{lineStyle:{width:1.5}}},bar:{barMaxWidth:150,itemStyle:{borderWidth:0,borderRadius:0,borderColor:e.palette.grey[300]},label:{show:!1,color:n}},gauge:{detail:{fontSize:18,fontWeight:600,valueAnimation:!1},splitLine:{distance:0,length:4,lineStyle:{width:1}},splitNumber:12}};return q()({echartsTheme:i,noDataOption:{title:{show:!0,textStyle:{color:n,fontSize:16,fontWeight:400},text:"No data",left:"center",top:"center"},xAxis:{show:!1},yAxis:{show:!1}},sparkline:{width:2,color:"#1976d2"},container:{padding:{default:parseInt(e.spacing(1.5),10)}},thresholds:{defaultColor:e.palette.success.main,palette:["#FFCC00",e.palette.warning.main,e.palette.error.main]}},t)}function i7(e){return{value:{pastDuration:e},display:`Last ${(0,nl.formatDuration)((0,i$.Ib)(e),{delimiter:", "})}`}}var i4=n(28730);let i8=i3((0,i4.Z)({}),{echartsTheme:{textStyle:{fontFamily:"Lato"},categoryAxis:{splitLine:{show:!1}},timeAxis:{splitLine:{show:!1}},bar:{barCategoryGap:2}}}),i9={chartsTheme:i8,enablePinning:!1,lastTooltipPinnedCoords:null,setLastTooltipPinnedCoords:()=>null};var re=n(79602);let rt={defaultProps:{variant:"standard",severity:"success"},styleOverrides:{standardError:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.error.dark,color:e.palette.error.light,[`& .${re.Z.icon}`]:{color:e.palette.error.main}}:{...e.typography.body1,backgroundColor:e.palette.error.light,color:e.palette.error.dark,[`& .${re.Z.icon}`]:{color:e.palette.error.main}},standardInfo:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.info.dark,color:e.palette.info.light,[`& .${re.Z.icon}`]:{color:e.palette.info.main}}:{...e.typography.body1,backgroundColor:e.palette.info.light,color:e.palette.info.dark,[`& .${re.Z.icon}`]:{color:e.palette.info.main}},standardSuccess:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.success.dark,color:e.palette.success.light,[`& .${re.Z.icon}`]:{color:e.palette.success.main}}:{...e.typography.body1,backgroundColor:e.palette.success.light,color:e.palette.success.dark,[`& .${re.Z.icon}`]:{color:e.palette.success.main}},standardWarning:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.warning.dark,color:e.palette.warning.light,[`& .${re.Z.icon}`]:{color:e.palette.warning.main}}:{...e.typography.body1,backgroundColor:e.palette.warning.light,color:e.palette.warning.dark,[`& .${re.Z.icon}`]:{color:e.palette.warning.main}},root:{["& ."+n(757).Z.root]:{textDecoration:"underline"}}}},rn={50:"#F0F1F6",100:"#E1E3ED",150:"#D2D5E4",200:"#C3C7DB",300:"#A4ACC8",400:"#8690B6",500:"#717CA4",600:"#535D83",700:"#3E4662",800:"#2A2E42",850:"#1F2331",900:"#151721",950:"#0A0C10"},ri={50:"#E7F1FC",100:"#D0E3FA",150:"#B8D5F7",200:"#A1C7F5",300:"#72ABF0",400:"#438FEB",500:"#1473E6",600:"#105CB8",700:"#0C458A",800:"#082E5C",850:"#062345",900:"#04172E",950:"#020C17"},rr="#FFFFFF",rl=e=>{let t=rn["800"],n=rn["300"];return"light"===e?{navigation:t,accent:n,primary:rn["800"],secondary:rn["700"],disabled:rn["300"],link:ri["500"],linkHover:ri["600"]}:{navigation:t,accent:n,primary:rr,secondary:rn["50"],disabled:rn["600"],link:ri["400"],linkHover:ri["500"]}},ro=e=>{let t=ri["150"],n="rgba(21, 23, 33, 0.75)";return"light"===e?{navigation:t,overlay:n,default:rr,paper:rn["50"],code:rn["50"],tooltip:rn["100"],lighter:rn["50"],border:rn["100"]}:{navigation:t,overlay:n,default:rn["900"],paper:rn["850"],code:rn["800"],tooltip:rn["600"],lighter:rn["700"],border:rn["600"]}},ra=e=>"light"===e?{50:rn["50"],100:rn["100"],200:rn["200"],300:rn["300"],400:rn["400"],500:rn["500"],600:rn["600"],700:rn["700"],800:rn["800"],900:rn["900"],950:rn["950"]}:{50:rn["950"],100:rn["900"],200:rn["800"],300:rn["700"],400:rn["600"],500:rn["500"],600:rn["400"],700:rn["300"],800:rn["200"],900:rn["100"],950:rn["50"]},rs=e=>"light"===e?{main:ri["500"],dark:ri["600"],light:ri["50"]}:{main:ri["400"],dark:ri["800"],light:ri["200"]},rc=e=>"light"===e?{main:rn["600"],dark:rn["900"],light:rn["100"]}:{main:rr,dark:rr,light:rr},rd={50:"#EAF9F1",100:"#D5F2E3",150:"#C1ECD4",200:"#ACE5C6",300:"#82D9AA",400:"#59CC8D",500:"#2FBF71",600:"#26995A",700:"#1C7344",800:"#134C2D",850:"#0E3922",900:"#092617",950:"#05130B"},ru={50:"#FFF5E8",100:"#FFECD2",150:"#FFE2BB",200:"#FFD9A4",300:"#FFC577",400:"#FFB249",500:"#FF9F1C",600:"#CC7F16",700:"#995F11",800:"#66400B",850:"#4D3008",900:"#332006",950:"#1A1003"},rh={50:"#EFE9FD",100:"#E0D2FC",150:"#D0BCFA",200:"#C1A6F8",300:"#A179F5",400:"#824DF1",500:"#6320EE",600:"#4F1ABE",700:"#3B138F",800:"#280D5F",850:"#1E0A47",900:"#140630",950:"#0A0318"},rp={50:"#FDEDED",100:"#FBDADA",150:"#F9C8C8",200:"#F7B5B5",300:"#F29191",400:"#EE6C6C",500:"#EA4747",600:"#BD3939",700:"#902B2B",800:"#621D1D",850:"#4C1616",900:"#350F0F",950:"#1F0808"},rg=e=>"light"===e?{main:rp["500"],dark:rp["600"],light:rp["50"]}:{main:rp["400"],dark:rp["800"],light:rp["300"]},rm=e=>"light"===e?{main:rd["500"],dark:rd["700"],light:rd["50"]}:{main:rd["400"],dark:rd["800"],light:rd["300"]},rx=e=>"light"===e?{main:ru["500"],dark:ru["700"],light:ru["50"]}:{main:ru["400"],dark:ru["800"],light:ru["300"]};n(12711),n(89479),n(99511),n(53213);let rf={fontFamily:'"Lato", sans-serif',fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:700,fontWeightBold:900,h1:{fontSize:"1.5rem",fontWeight:700,lineHeight:"32px"},h2:{fontSize:"1.25rem",fontWeight:700,lineHeight:"28px"},h3:{fontSize:"1rem",fontWeight:700,lineHeight:"24px"},h4:{fontSize:"0.875rem",fontWeight:700,lineHeight:"22px"},h5:void 0,h6:void 0,body1:{fontSize:"0.875rem",fontWeight:400,lineHeight:"20px"},body2:{fontSize:"0.75rem",fontWeight:400,lineHeight:"18px"},subtitle1:{fontSize:"1rem",fontWeight:400,lineHeight:"24px",letterSpacing:"0.02rem"},subtitle2:{fontSize:"0.875rem",fontWeight:700,lineHeight:"22px",letterSpacing:"0.03rem",textTransform:"uppercase"},button:{fontSize:"0.875rem",fontWeight:700,lineHeight:"1.25rem",textTransform:"none",letterSpacing:"0.03rem"},caption:{fontSize:"0.6875rem",fontWeight:400,lineHeight:"16px"}},rv=({theme:e})=>({..."light"===e.palette.mode?{}:{backgroundImage:"unset",backgroundColor:e.palette.designSystem.grey[800]}});function ry(e,t={}){return(0,i4.Z)({palette:{mode:e,primary:rs(e),secondary:rc(e),grey:ra(e),background:ro(e),text:rl(e),error:rg(e),warning:rx(e),info:rs(e),success:rm(e),common:{white:rr,black:"#000000"},designSystem:{blue:ri,green:rd,grey:rn,orange:ru,purple:rh,red:rp}},typography:rf,mixins:{},components:rb,...t})}let rb={MuiAlert:rt,MuiFormControl:{defaultProps:{size:"small"}},MuiPaper:{styleOverrides:{root:({theme:e})=>({backgroundColor:e.palette.background.default})}},MuiTextField:{defaultProps:{size:"small"}},MuiDrawer:{styleOverrides:{paper:rv}},MuiDialog:{styleOverrides:{paper:rv}},MuiPopover:{styleOverrides:{paper:rv}}};var rC=n(84974),rj=n(12449),rw=n(28418),rZ=n(57689);let rS={JoinByColumnValue:"Join by column value",MergeColumns:"Merge columns",MergeIndexedColumns:"Merge indexed columns",MergeSeries:"Merge series"};function rk({value:e,onChange:t}){return(0,l.jsxs)(et.Z,{direction:"row",children:[(0,l.jsx)(tM.Z,{freeSolo:!0,multiple:!0,id:"join-columns",sx:{width:"100%"},options:[],value:e.spec.columns??[],renderInput:e=>(0,l.jsx)(ei.Z,{...e,variant:"outlined",label:"Columns",required:!0}),onChange:(n,i)=>{t({...e,spec:{...e.spec,columns:i}})}}),(0,l.jsx)(it.Z,{label:"Enabled",labelPlacement:"start",control:(0,l.jsx)(nN.Z,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function rM({value:e,onChange:t}){return(0,l.jsxs)(et.Z,{direction:"row",gap:1,alignItems:"center",children:[(0,l.jsx)(tM.Z,{freeSolo:!0,multiple:!0,id:"merge-columns-columns",sx:{width:"100%"},options:[],value:e.spec.columns??[],renderInput:e=>(0,l.jsx)(ei.Z,{...e,variant:"outlined",label:"Columns",required:!0}),onChange:(n,i)=>{t({...e,spec:{...e.spec,columns:i}})}}),(0,l.jsx)(ta,{id:"merge-columns-name",variant:"outlined",label:"Output Name",value:e.spec.name??"",sx:{width:"100%"},onChange:n=>{t({...e,spec:{...e.spec,name:n}})},required:!0}),(0,l.jsx)(it.Z,{label:"Enabled",labelPlacement:"start",control:(0,l.jsx)(nN.Z,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function rD({value:e,onChange:t}){return(0,l.jsxs)(et.Z,{direction:"row",children:[(0,l.jsx)(ta,{id:"merge-indexed-columns",variant:"outlined",label:"Column",placeholder:"Example: 'value' for merging 'value #1', 'value #2' and 'value #...'",value:e.spec.column??"",sx:{width:"100%"},onChange:n=>{t({...e,spec:{...e.spec,column:n}})},required:!0}),(0,l.jsx)(it.Z,{label:"Enabled",labelPlacement:"start",control:(0,l.jsx)(nN.Z,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function rT({value:e,onChange:t}){return(0,l.jsx)(et.Z,{direction:"row",children:(0,l.jsx)(it.Z,{label:"Enabled",labelPlacement:"start",control:(0,l.jsx)(nN.Z,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})})}function rA({value:e,onChange:t,...n}){return(0,l.jsxs)(et.Z,{gap:2,sx:{width:"100%"},mt:1,...n,children:[(0,l.jsxs)(ta,{select:!0,label:"Kind",value:e.kind,onChange:n=>t({...e,kind:n}),children:[(0,l.jsx)(t$.Z,{value:"JoinByColumnValue",children:(0,l.jsxs)(et.Z,{children:[(0,l.jsx)(eW.Z,{children:"Join by column value"}),(0,l.jsx)(eW.Z,{variant:"caption",children:"Regroup rows with equal cell value in a column"})]})}),(0,l.jsx)(t$.Z,{value:"MergeColumns",children:(0,l.jsxs)(et.Z,{children:[(0,l.jsx)(eW.Z,{children:"Merge columns"}),(0,l.jsx)(eW.Z,{variant:"caption",children:"Multiple columns are merged to one column"})]})}),(0,l.jsx)(t$.Z,{value:"MergeIndexedColumns",children:(0,l.jsxs)(et.Z,{children:[(0,l.jsx)(eW.Z,{children:"Merge indexed columns"}),(0,l.jsx)(eW.Z,{variant:"caption",children:"Indexed columns are merged to one column"})]})}),(0,l.jsx)(t$.Z,{value:"MergeSeries",children:(0,l.jsxs)(et.Z,{children:[(0,l.jsx)(eW.Z,{children:"Merge series"}),(0,l.jsx)(eW.Z,{variant:"caption",children:"Series will be merged by their labels"})]})})]}),"JoinByColumnValue"===e.kind&&(0,l.jsx)(rk,{value:e,onChange:t}),"MergeColumns"===e.kind&&(0,l.jsx)(rM,{value:e,onChange:t}),"MergeIndexedColumns"===e.kind&&(0,l.jsx)(rD,{value:e,onChange:t}),"MergeSeries"===e.kind&&(0,l.jsx)(rT,{value:e,onChange:t})]})}function rI({index:e,value:t,isCollapsed:n,onChange:i,onCollapse:r,onDelete:o,...a}){return(0,l.jsxs)(et.Z,{...a,children:[(0,l.jsxs)(et.Z,{direction:"row",alignItems:"center",borderBottom:1,borderColor:e=>e.palette.divider,justifyContent:"space-between",gap:4,children:[(0,l.jsxs)(et.Z,{direction:"row",gap:1,children:[(0,l.jsx)(en.Z,{"data-testid":`transform-toggle#${e}`,size:"small",onClick:()=>r(!n),children:n?(0,l.jsx)(rC.default,{}):(0,l.jsx)(rj.default,{})}),(0,l.jsx)(eW.Z,{variant:"overline",component:"h4",sx:{textTransform:"none"},children:t.kind?(0,l.jsx)("span",{children:(0,l.jsx)("strong",{children:rS[t.kind]})}):(0,l.jsx)("strong",{children:"Select a transformation kind"})})]}),(0,l.jsxs)(et.Z,{direction:"row",gap:1,children:[n&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tC.Z,{title:t.spec?.disabled?"Enable transformation":"Disable transformation",placement:"top",children:(0,l.jsx)(en.Z,{size:"small",sx:{marginLeft:"auto"},onClick:function(){i({...t,spec:{...t.spec,disabled:!t.spec?.disabled}})},children:t.spec?.disabled?(0,l.jsx)(rw.default,{}):(0,l.jsx)(rZ.default,{})})}),(0,l.jsx)(t0.Z,{flexItem:!0,orientation:"vertical",variant:"middle"})]}),(0,l.jsx)(tC.Z,{title:"Remove transformation",placement:"top",children:(0,l.jsx)(en.Z,{size:"small",sx:{marginLeft:"auto"},onClick:o,children:(0,l.jsx)(iA.default,{})})})]})]}),!n&&(0,l.jsx)(rA,{value:t,onChange:i})]})}function rE({value:e,onChange:t,...n}){let[i,r]=(0,c.useState)(e.map(()=>!0));return(0,l.jsxs)(et.Z,{gap:1,...n,children:[e.map((n,o)=>(0,l.jsx)(rI,{index:o,value:n,isCollapsed:i[o]??!0,onChange:n=>(function(n,i){let r=[...e];r[n]=i,t(r)})(o,n),onDelete:()=>(function(n){let i=[...e];i.splice(n,1),t(i),r(e=>(e.splice(n,1),[...e]))})(o),onCollapse:e=>{r(t=>(t[o]=e,[...t]))}},o)),(0,l.jsx)(a.Z,{variant:"contained",startIcon:(0,l.jsx)(ir.default,{}),sx:{marginTop:1},onClick:function(){let n=[...e];n.push({kind:"",spec:{}}),t(n),r(e=>(e.push(!1),[...e]))},children:"Add Transformation"})]})}function rF(e){let{value:t,onChange:n,timeOptions:i,height:r}=e,o=(0,c.useMemo)(()=>{if(t&&!i.some(e=>e.value.pastDuration===t))return(0,l.jsx)(t$.Z,{value:t,children:t})},[i,t]);return(0,l.jsx)(tf.Z,{children:(0,l.jsx)(F.Z,{children:(0,l.jsxs)(iz.Z,{id:"refreshInterval",value:t,onChange:e=>{n(e.target.value)},inputProps:{"aria-label":`Select refresh interval. Currently set to ${t}`},sx:{".MuiSelect-select":r?{lineHeight:r,paddingY:0}:{}},children:[i.map((e,t)=>(0,l.jsx)(t$.Z,{value:e.value.pastDuration,children:e.display},t)),o]})})})}var rL=n(85731);function rP(e){let{width:t,height:n,data:i}=e,r=N(),o={title:{text:"Referer of a Website",subtext:"Fake Data",left:"center"},tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c} ({d}%)"},axisLabel:{overflow:"truncate",width:t/3},series:[{name:"Access From",type:"pie",radius:"55%",label:!1,center:["40%","50%"],data:i,emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}],itemStyle:{borderRadius:2,color:r.echartsTheme[0]}};return(0,l.jsx)(F.Z,{style:{width:t,height:n},sx:{overflow:"auto"},children:(0,l.jsx)(K,{sx:{minHeight:n,height:i?16*i.length:"100%"},option:o,theme:r.echartsTheme})})}(0,k.D)([rL.N,D.N,T.N,A.N,I.N,E.N]);var rR=n(27835),rN=n(943),rO=n(72116);(0,k.D)([rR.N,rN.N,D.N,T.N,A.N,I.N,E.N]);let rz=e=>{var t;let{height:n,data:i,xAxisCategories:r,yAxisCategories:o,timeScale:a,colors:s}=e,{timeZone:c}=np(),d=N(),u=(0,ep.Z)(),h={tooltip:{appendToBody:!0,formatter:e=>(function({data:e,label:t,marker:n,xAxisCategories:i,yAxisCategories:r,theme:l}){let[o,a]=e,{formattedDate:s,formattedTime:c}=nd(i[o]),d=(0,rO.css)`
2
+ border-bottom: 1px solid ${l.palette.grey[500]};
3
+ padding-bottom: 8px;
4
+ `,u=(0,rO.css)`
5
+ display: flex;
6
+ justify-content: space-between;
7
+ padding-top: 8px;
8
+ `,h=(0,rO.css)`
9
+ margin-right: 16px;
10
+ `;return`
11
+ <div>
12
+ <div style="${d.styles}">${s} ${c}</div>
13
+ <div style="${u.styles}">
14
+ <div style="${h.styles}">
15
+ ${n}
16
+ <strong>${r[a]}</strong>
17
+ </div>
18
+ <div>
19
+ ${t}
20
+ </div>
21
+ </div>
22
+ </div>
23
+ `})({data:e.data.value,label:e.data.label,marker:e.marker,xAxisCategories:r,yAxisCategories:o,theme:u})},grid:{top:"5%",bottom:"5%"},xAxis:{type:"category",data:r,axisLine:{show:!1},splitArea:{show:!1},axisLabel:{hideOverlap:!0,formatter:(t=a?.rangeMs??0,function(e){let n=new Date(Number(e));return t>15768e7?na(n,"yyy",c):t>63072e6?na(n,"MMM yyy",c):t>864e6&&t<1577664e4?na(n,"dd.MM",c):t>1728e5&&t<=864e6?na(n,"dd.MM HH:mm",c):na(n,"HH:mm",c)})}},yAxis:{type:"category",data:o,axisLine:{show:!1},splitArea:{show:!1,interval:0},splitLine:{show:!1},axisLabel:{interval:0}},visualMap:{show:!1,type:"piecewise",pieces:s},series:[{name:"Status history",type:"heatmap",coordinateSystem:"cartesian2d",data:i,label:{show:!1},itemStyle:{borderWidth:1,borderType:"solid",borderColor:"#ffffff"},emphasis:{itemStyle:{opacity:.5}}}]};return(0,l.jsx)(F.Z,{style:{height:n},sx:{overflow:"auto"},children:(0,l.jsx)(K,{sx:{width:"100%",height:n},option:h,theme:d.echartsTheme})})},rW="#1f77b4";function r$(e,t){t.match(/^#[0-9A-Fa-f]{6}$/)||(t=rW);try{let[n,i,r]=rB(t);if(isNaN(n)||isNaN(i)||isNaN(r))throw Error("Invalid HSL values");let l=String(e).split("").reduce((e,t)=>e+t.charCodeAt(0),0),o=Math.min(i+10,90),a=r_(Math.abs((n+l%6*60)%360),Math.min(Math.max(o,50),90),Math.min(Math.max(r+(l%2?15:-15),30),70));if(!a.match(/^#[0-9A-Fa-f]{6}$/))throw Error("Invalid generated color");return a}catch(e){return rW}}function rH(e,t){return t.length>=e.length?t.slice(0,e.length):e.map((e,n)=>n<t.length?t[n]||rW:r$(e,t[0]||rW))}function rB(e){let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,i=parseInt(e.slice(5,7),16)/255,r=Math.max(t,n,i),l=Math.min(t,n,i),o=0,a=0,s=(r+l)/2;if(r!==l){let e=r-l;switch(a=s>.5?e/(2-r-l):e/(r+l),r){case t:o=(n-i)/e+6*(n<i);break;case n:o=(i-t)/e+2;break;case i:o=(t-n)/e+4}o/=6}return[360*o,100*a,100*s]}function r_(e,t,n){let i=t*Math.min(n/=100,1-n)/100,r=t=>{let r=(t+e/30)%12;return Math.round(255*(n-i*Math.max(Math.min(r-3,9-r,1),-1))).toString(16).padStart(2,"0")};return`#${r(0)}${r(8)}${r(4)}`}var rV=n(41305);let rU=({mapping:e,onChange:t,...n})=>{switch(e.kind){case"Value":return(0,l.jsx)(et.Z,{gap:1,direction:"row",...n,children:(0,l.jsx)(ei.Z,{label:"Value",placeholder:"Exact value",value:e.spec?.value??"",onChange:n=>t({...e,spec:{...e.spec,value:n.target.value}}),fullWidth:!0})});case"Range":return(0,l.jsxs)(et.Z,{gap:1,direction:"row",...n,children:[(0,l.jsx)(ei.Z,{label:"From",placeholder:"Start of range",value:e.spec?.from??"",onChange:n=>t({...e,spec:{...e.spec,from:""===n.target.value?void 0:+n.target.value}}),fullWidth:!0}),(0,l.jsx)(ei.Z,{label:"To",placeholder:"End of range (inclusive)",value:e.spec?.to??"",onChange:n=>t({...e,spec:{...e.spec,to:""===n.target.value?void 0:+n.target.value}}),fullWidth:!0})]});case"Regex":return(0,l.jsx)(et.Z,{gap:1,direction:"row",...n,children:(0,l.jsx)(ei.Z,{label:"Regular Expression",placeholder:"JavaScript regular expression",value:e.spec?.pattern??"",onChange:n=>t({...e,spec:{...e.spec,pattern:n.target.value}}),fullWidth:!0})});case"Misc":return(0,l.jsx)(et.Z,{gap:1,direction:"row",...n,children:(0,l.jsxs)(ei.Z,{select:!0,label:"Value",value:e.spec?.value??"",onChange:n=>t({...e,spec:{value:n.target.value}}),SelectProps:{renderValue:e=>{switch(e){case"empty":return"Empty";case"null":return"Null";case"NaN":return"NaN";case"true":return"True";case"false":return"False";default:return String(e)}}},fullWidth:!0,children:[(0,l.jsx)(t$.Z,{value:"empty",children:(0,l.jsxs)(et.Z,{children:[(0,l.jsx)(eW.Z,{children:"Empty"}),(0,l.jsx)(eW.Z,{variant:"caption",children:"Matches empty string"})]})}),(0,l.jsx)(t$.Z,{value:"null",children:(0,l.jsxs)(et.Z,{children:[(0,l.jsx)(eW.Z,{children:"Null"}),(0,l.jsx)(eW.Z,{variant:"caption",children:"Matches null or undefined"})]})}),(0,l.jsx)(t$.Z,{value:"NaN",children:(0,l.jsxs)(et.Z,{children:[(0,l.jsx)(eW.Z,{children:"NaN"}),(0,l.jsx)(eW.Z,{variant:"caption",children:"Matches Not a Number value"})]})}),(0,l.jsx)(t$.Z,{value:"true",children:(0,l.jsxs)(et.Z,{children:[(0,l.jsx)(eW.Z,{children:"True"}),(0,l.jsx)(eW.Z,{variant:"caption",children:"Matches true boolean"})]})}),(0,l.jsx)(t$.Z,{value:"false",children:(0,l.jsxs)(et.Z,{children:[(0,l.jsx)(eW.Z,{children:"False"}),(0,l.jsx)(eW.Z,{variant:"caption",children:"Matches false boolean"})]})})]})});default:return null}},rY=({mapping:e,onChange:t,onDelete:n,...i})=>{let r=n=>{t({...e,spec:{...e.spec,result:{...e.spec.result,color:n}}})};return(0,l.jsxs)(rV.Z,{container:!0,spacing:2,...i,children:[(0,l.jsx)(rV.Z,{size:{xs:5},children:(0,l.jsxs)(et.Z,{direction:"row",gap:1,width:"100%",children:[(0,l.jsxs)(ei.Z,{select:!0,label:"Type",value:e.kind,onChange:n=>t({...e,kind:n.target.value}),required:!0,sx:{width:"120px"},children:[(0,l.jsx)(t$.Z,{value:"Value",children:(0,l.jsxs)(et.Z,{children:[(0,l.jsx)(eW.Z,{children:"Value"}),"Value"!==e.kind&&(0,l.jsx)(eW.Z,{variant:"caption",children:"Matches an exact text value"})]})}),(0,l.jsx)(t$.Z,{value:"Range",children:(0,l.jsxs)(et.Z,{children:[(0,l.jsx)(eW.Z,{children:"Range"}),"Range"!==e.kind&&(0,l.jsx)(eW.Z,{variant:"caption",children:"Matches against a numerical range"})]})}),(0,l.jsx)(t$.Z,{value:"Regex",children:(0,l.jsxs)(et.Z,{children:[(0,l.jsx)(eW.Z,{children:"Regex"}),"Regex"!==e.kind&&(0,l.jsx)(eW.Z,{variant:"caption",children:"Matches against a regular expression"})]})}),(0,l.jsx)(t$.Z,{value:"Misc",children:(0,l.jsxs)(et.Z,{children:[(0,l.jsx)(eW.Z,{children:"Misc"}),"Misc"!==e.kind&&(0,l.jsx)(eW.Z,{variant:"caption",children:"Matches against empty, null and NaN values"})]})})]}),(0,l.jsx)(rU,{width:"100%",mapping:e,onChange:n=>t({...e,...n})})]})}),(0,l.jsx)(rV.Z,{size:{xs:4},children:(0,l.jsx)(ei.Z,{label:"Display text",value:e.spec?.result?.value??"",onChange:n=>t({...e,spec:{...e.spec,result:{...e.spec?.result,value:n.target.value}}}),fullWidth:!0})}),(0,l.jsx)(rV.Z,{size:{xs:1},children:(0,l.jsx)(et.Z,{direction:"row",justifyContent:"center",gap:1,children:e.spec?.result?.color?(0,l.jsx)(eu,{label:"Color",color:e.spec.result.color??"#000",onColorChange:r,onClear:()=>r(void 0)}):(0,l.jsx)(en.Z,{onClick:()=>r("#000"),children:(0,l.jsx)(ir.default,{})})})}),(0,l.jsx)(rV.Z,{size:{xs:1},textAlign:"end",children:(0,l.jsx)(tC.Z,{title:"Remove mapping settings",placement:"top",children:(0,l.jsx)(en.Z,{size:"small",sx:{marginLeft:"auto"},onClick:n,children:(0,l.jsx)(iA.default,{})})})})]})},rG=({mappings:e,onChange:t})=>{let[n,i]=(0,c.useState)(e);return(0,l.jsxs)(et.Z,{spacing:1,children:[(0,l.jsxs)(rV.Z,{container:!0,spacing:2,children:[(0,l.jsx)(rV.Z,{size:{xs:5},children:(0,l.jsx)(eW.Z,{variant:"subtitle1",children:"Condition"})}),(0,l.jsx)(rV.Z,{size:{xs:4},children:(0,l.jsx)(eW.Z,{variant:"subtitle1",children:"Display Text"})}),(0,l.jsx)(rV.Z,{size:{xs:1},textAlign:"center",children:(0,l.jsx)(eW.Z,{variant:"subtitle1",children:"Color"})}),(0,l.jsx)(rV.Z,{size:{xs:1}})]}),(0,l.jsx)(et.Z,{gap:1.5,divider:(0,l.jsx)(t0.Z,{flexItem:!0,orientation:"horizontal"}),children:n.map((e,r)=>(0,l.jsx)(rY,{mapping:e,onChange:e=>(function(e,r){let l=[...n];l[e]=r,i(l),t(l)})(r,e),onDelete:()=>(function(e){let r=[...n];r.splice(e,1),i(r),t(r)})(r)},r))}),(0,l.jsx)(a.Z,{variant:"contained",startIcon:(0,l.jsx)(ir.default,{}),sx:{marginTop:1},onClick:function(){let e=[...n];e.push({kind:"Value",spec:{result:{value:""}}}),i(e),t(e)},children:"Add value mappings"})]})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkPrometheus=self.webpackChunkPrometheus||[]).push([["2285"],{76439:function(e,t,n){n.d(t,{Z:()=>s});var r=n(54538),u=n(96858),i=n(49267),a=n(24105);let l={...r}.useSyncExternalStore;function c(e={}){let{themeId:t}=e;return function(e,n={}){let c=(0,a.Z)();c&&t&&(c=c[t]||c);let s="undefined"!=typeof window&&void 0!==window.matchMedia,{defaultMatches:o=!1,matchMedia:d=s?window.matchMedia:null,ssrMatchMedia:h=null,noSsr:m=!1}=(0,i.Z)({name:"MuiUseMediaQuery",props:n,theme:c}),f="function"==typeof e?e(c):e;return(void 0!==l?function(e,t,n,u,i){let a=r.useCallback(()=>t,[t]),c=r.useMemo(()=>{if(i&&n)return()=>n(e).matches;if(null!==u){let{matches:t}=u(e);return()=>t}return a},[a,e,u,i,n]),[s,o]=r.useMemo(()=>{if(null===n)return[a,()=>()=>{}];let t=n(e);return[()=>t.matches,e=>(t.addEventListener("change",e),()=>{t.removeEventListener("change",e)})]},[a,n,e]);return l(o,s,c)}:function(e,t,n,i,a){let[l,c]=r.useState(()=>a&&n?n(e).matches:i?i(e).matches:t);return(0,u.Z)(()=>{if(!n)return;let t=n(e),r=()=>{c(t.matches)};return r(),t.addEventListener("change",r),()=>{t.removeEventListener("change",r)}},[e,n]),l})(f=f.replace(/^@media( ?)/m,""),o,d,h,m)}}c();let s=c({themeId:n(92994).Z})},66694:function(e,t,n){n.d(t,{Q:()=>u,U:()=>r});let r="1h",u="0s"}}]);