autoql-fe-utils 1.11.17 → 1.11.19

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.
@@ -14310,6 +14310,7 @@
14310
14310
  DisplayTypes2["SCATTERPLOT"] = "scatterplot";
14311
14311
  DisplayTypes2["COLUMN_LINE"] = "column_line";
14312
14312
  DisplayTypes2["NETWORK_GRAPH"] = "network_graph";
14313
+ DisplayTypes2["SANKEY"] = "sankey";
14313
14314
  return DisplayTypes2;
14314
14315
  })(DisplayTypes || {});
14315
14316
  var QueryErrorTypes = /* @__PURE__ */ ((QueryErrorTypes2) => {
@@ -14380,9 +14381,9 @@
14380
14381
  unit: unit2,
14381
14382
  supportedOperators
14382
14383
  }) {
14383
- var _a, _b;
14384
- this.type = (_a = type != null ? type : description) != null ? _a : "";
14385
- this.description = (_b = description != null ? description : type) != null ? _b : "";
14384
+ var _a2, _b2;
14385
+ this.type = (_a2 = type != null ? type : description) != null ? _a2 : "";
14386
+ this.description = (_b2 = description != null ? description : type) != null ? _b2 : "";
14386
14387
  this.continuous = !!continuous2;
14387
14388
  this.ordinal = !!ordinal2;
14388
14389
  this.aggOptions = aggOptions != null ? aggOptions : aggregable ? Object.values(AggTypes) : [];
@@ -14510,7 +14511,8 @@
14510
14511
  "column_line" /* COLUMN_LINE */,
14511
14512
  "histogram" /* HISTOGRAM */,
14512
14513
  "scatterplot" /* SCATTERPLOT */,
14513
- "network_graph" /* NETWORK_GRAPH */
14514
+ "network_graph" /* NETWORK_GRAPH */,
14515
+ "sankey" /* SANKEY */
14514
14516
  ];
14515
14517
  var CHARTS_WITHOUT_LEGENDS = [
14516
14518
  "pie" /* PIE */,
@@ -14518,16 +14520,18 @@
14518
14520
  "bubble" /* BUBBLE */,
14519
14521
  "scatterplot" /* SCATTERPLOT */,
14520
14522
  "histogram" /* HISTOGRAM */,
14521
- "network_graph" /* NETWORK_GRAPH */
14523
+ "network_graph" /* NETWORK_GRAPH */,
14524
+ "sankey" /* SANKEY */
14522
14525
  ];
14523
14526
  var CHARTS_WITHOUT_AGGREGATED_DATA = [
14524
14527
  "histogram" /* HISTOGRAM */,
14525
14528
  "scatterplot" /* SCATTERPLOT */,
14526
- "network_graph" /* NETWORK_GRAPH */
14529
+ "network_graph" /* NETWORK_GRAPH */,
14530
+ "sankey" /* SANKEY */
14527
14531
  ];
14528
14532
  var DATE_ONLY_CHART_TYPES = ["line" /* LINE */, "stacked_line" /* STACKED_LINE */];
14529
14533
  var DOUBLE_AXIS_CHART_TYPES = ["column_line" /* COLUMN_LINE */];
14530
- var CHARTS_WITHOUT_AXES = ["pie" /* PIE */, "network_graph" /* NETWORK_GRAPH */];
14534
+ var CHARTS_WITHOUT_AXES = ["pie" /* PIE */, "network_graph" /* NETWORK_GRAPH */, "sankey" /* SANKEY */];
14531
14535
  var DEFAULT_CHART_CONFIG = {
14532
14536
  isScaled: false
14533
14537
  };
@@ -14614,8 +14618,8 @@
14614
14618
  tooltip: "<strong>Count:</strong> The total number of non-blank values will be shown for all data points with the same label.",
14615
14619
  symbol: "#",
14616
14620
  fn: (arr) => {
14617
- var _a, _b;
14618
- return (_b = (_a = arr == null ? void 0 : arr.filter((value) => !!value)) == null ? void 0 : _a.length) != null ? _b : 0;
14621
+ var _a2, _b2;
14622
+ return (_b2 = (_a2 = arr == null ? void 0 : arr.filter((value) => !!value)) == null ? void 0 : _a2.length) != null ? _b2 : 0;
14619
14623
  },
14620
14624
  sqlFn: (columnName) => `count(${columnName})`
14621
14625
  }),
@@ -14627,8 +14631,8 @@
14627
14631
  tooltip: "<strong>Count Distinct:</strong> The total number of <em>unique</em> non-blank values will be shown for all data points with the same label.",
14628
14632
  symbol: "#!",
14629
14633
  fn: (arr) => {
14630
- var _a, _b, _c;
14631
- return (_c = (_b = (_a = arr == null ? void 0 : arr.filter((value) => !!value || value == 0)) == null ? void 0 : _a.filter(onlyUnique)) == null ? void 0 : _b.length) != null ? _c : 0;
14634
+ var _a2, _b2, _c;
14635
+ return (_c = (_b2 = (_a2 = arr == null ? void 0 : arr.filter((value) => !!value || value == 0)) == null ? void 0 : _a2.filter(onlyUnique)) == null ? void 0 : _b2.length) != null ? _c : 0;
14632
14636
  },
14633
14637
  sqlFn: (columnName) => `count(distinct ${columnName})`
14634
14638
  }),
@@ -15436,8 +15440,8 @@
15436
15440
  return [];
15437
15441
  };
15438
15442
  var getColumnDateRanges = (response) => {
15439
- var _a, _b;
15440
- const parsedInterpretation = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.parsed_interpretation;
15443
+ var _a2, _b2;
15444
+ const parsedInterpretation = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.parsed_interpretation;
15441
15445
  if (!parsedInterpretation) {
15442
15446
  return [];
15443
15447
  }
@@ -15528,10 +15532,10 @@
15528
15532
  var isChartType = (type) => CHART_TYPES.includes(type);
15529
15533
  var isTableType = (type) => TABLE_TYPES.includes(type);
15530
15534
  var isDisplayTypeValid = (response, displayType, dataLength, pivotDataLength, columns, isDataLimited2) => {
15531
- var _a, _b;
15535
+ var _a2, _b2;
15532
15536
  const supportedDisplayTypes = getSupportedDisplayTypes({
15533
15537
  response,
15534
- columns: columns != null ? columns : (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.columns,
15538
+ columns: columns != null ? columns : (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.columns,
15535
15539
  dataLength,
15536
15540
  pivotDataLength,
15537
15541
  isDataLimited: isDataLimited2
@@ -15556,10 +15560,10 @@
15556
15560
  return true;
15557
15561
  };
15558
15562
  var getPotentialDisplayTypes = (response) => {
15559
- var _a, _b, _c;
15563
+ var _a2, _b2, _c;
15560
15564
  return getSupportedDisplayTypes({
15561
15565
  response,
15562
- columns: (_c = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.columns) == null ? void 0 : _c.map((col) => ({
15566
+ columns: (_c = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.columns) == null ? void 0 : _c.map((col) => ({
15563
15567
  ...col
15564
15568
  }))
15565
15569
  });
@@ -15569,8 +15573,8 @@
15569
15573
  return potentialDisplayTypes == null ? void 0 : potentialDisplayTypes.includes("pivot_table");
15570
15574
  };
15571
15575
  var potentiallySupportsDatePivot = (response) => {
15572
- var _a, _b, _c;
15573
- return potentiallySupportsPivot(response) && ((_c = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.columns) == null ? void 0 : _c.length) === 2;
15576
+ var _a2, _b2, _c;
15577
+ return potentiallySupportsPivot(response) && ((_c = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.columns) == null ? void 0 : _c.length) === 2;
15574
15578
  };
15575
15579
  var usePivotDataForChart = (response) => {
15576
15580
  return potentiallySupportsPivot(response) && !potentiallySupportsDatePivot(response);
@@ -15596,17 +15600,17 @@
15596
15600
  return true;
15597
15601
  };
15598
15602
  var supportsDatePivotTable = (columns) => {
15599
- var _a;
15603
+ var _a2;
15600
15604
  const dateColumnIndex = getDateColumnIndex(columns);
15601
15605
  const dateColumn = columns[dateColumnIndex];
15602
- return dateColumn && ((_a = dateColumn == null ? void 0 : dateColumn.display_name) == null ? void 0 : _a.toLowerCase().includes("month")) && (columns == null ? void 0 : columns.length) === 2;
15606
+ return dateColumn && ((_a2 = dateColumn == null ? void 0 : dateColumn.display_name) == null ? void 0 : _a2.toLowerCase().includes("month")) && (columns == null ? void 0 : columns.length) === 2;
15603
15607
  };
15604
15608
  var isSingleValueResponse = (response) => {
15605
- var _a, _b, _c, _d, _e, _f;
15609
+ var _a2, _b2, _c, _d, _e, _f;
15606
15610
  if (!response) {
15607
15611
  return false;
15608
15612
  }
15609
- const rows = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.rows;
15613
+ const rows = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.rows;
15610
15614
  const columns = (_d = (_c = response == null ? void 0 : response.data) == null ? void 0 : _c.data) == null ? void 0 : _d.columns;
15611
15615
  const referenceID = (_e = response == null ? void 0 : response.data) == null ? void 0 : _e.reference_id;
15612
15616
  const hasNoData = rows && !(rows == null ? void 0 : rows.length);
@@ -15633,18 +15637,33 @@
15633
15637
  return uniqueYears;
15634
15638
  };
15635
15639
  var supportsNetworkGraph = (data, columns) => {
15636
- if (!data || data.length < 2) return false;
15637
- if (!columns || columns.length < 2) return false;
15640
+ var _a2, _b2;
15641
+ const logUnsupportedReason = (message) => {
15642
+ console.warn(`[supportsNetworkGraph] ${message}`);
15643
+ };
15644
+ if (!data || data.length < 2) {
15645
+ logUnsupportedReason(`Insufficient rows (${(_a2 = data == null ? void 0 : data.length) != null ? _a2 : 0}). Need at least 2 rows.`);
15646
+ return false;
15647
+ }
15648
+ if (!columns || columns.length < 2) {
15649
+ logUnsupportedReason(`Insufficient columns (${(_b2 = columns == null ? void 0 : columns.length) != null ? _b2 : 0}). Need at least 2 visible columns.`);
15650
+ return false;
15651
+ }
15638
15652
  const networkColumns = findNetworkColumns(columns);
15639
- if (!networkColumns || networkColumns.sourceColumnIndex === -1 || networkColumns.targetColumnIndex === -1)
15653
+ if (!networkColumns || networkColumns.sourceColumnIndex === -1 || networkColumns.targetColumnIndex === -1) {
15654
+ logUnsupportedReason("Unable to determine source/target columns from provided metadata.");
15640
15655
  return false;
15656
+ }
15641
15657
  const { sourceColumnIndex, targetColumnIndex } = networkColumns;
15642
15658
  const sourceValues = data.map((row) => row[sourceColumnIndex]).filter(Boolean);
15643
15659
  const targetValues = data.map((row) => row[targetColumnIndex]).filter(Boolean);
15644
15660
  const uniqueSources = new Set(sourceValues);
15645
15661
  const uniqueTargets = new Set(targetValues);
15646
15662
  const totalUniqueEntities = (/* @__PURE__ */ new Set([...uniqueSources, ...uniqueTargets])).size;
15647
- if (totalUniqueEntities < 1) return false;
15663
+ if (totalUniqueEntities < 2) {
15664
+ logUnsupportedReason(`Found only ${totalUniqueEntities} unique node(s). Need at least 2.`);
15665
+ return false;
15666
+ }
15648
15667
  const sourceCounts = {};
15649
15668
  const targetCounts = {};
15650
15669
  const relationshipPairs = /* @__PURE__ */ new Set();
@@ -15658,9 +15677,18 @@
15658
15677
  }
15659
15678
  });
15660
15679
  const actualConnections = relationshipPairs.size;
15661
- if (actualConnections === 0) return false;
15680
+ if (actualConnections === 0) {
15681
+ logUnsupportedReason("No valid source\u2192target connections detected in dataset.");
15682
+ return false;
15683
+ }
15662
15684
  const MAX_UNIQUE_ENTITIES = 5e4;
15663
- return totalUniqueEntities <= MAX_UNIQUE_ENTITIES;
15685
+ if (totalUniqueEntities > MAX_UNIQUE_ENTITIES) {
15686
+ logUnsupportedReason(
15687
+ `Too many unique nodes (${totalUniqueEntities}). Limit is ${MAX_UNIQUE_ENTITIES} for performance reasons.`
15688
+ );
15689
+ return false;
15690
+ }
15691
+ return true;
15664
15692
  };
15665
15693
  var findNetworkColumns = (columns) => {
15666
15694
  if (!columns || columns.length < 2) {
@@ -15673,10 +15701,10 @@
15673
15701
  let targetColumnIndex = -1;
15674
15702
  let weightColumnIndex = -1;
15675
15703
  columns.forEach((col, loopIndex) => {
15676
- var _a;
15704
+ var _a2;
15677
15705
  if (col.is_visible !== false && col.type !== "DATE" && col.type !== "DATE_STRING") {
15678
15706
  const colIndex = typeof col.index === "number" ? col.index : loopIndex;
15679
- const name = ((_a = col.display_name) == null ? void 0 : _a.toLowerCase()) || "";
15707
+ const name = ((_a2 = col.display_name) == null ? void 0 : _a2.toLowerCase()) || "";
15680
15708
  const matchesSource = sourceKeywords.some((keyword) => name.includes(keyword) && col.type === "STRING" /* STRING */);
15681
15709
  const matchesTarget = targetKeywords.some((keyword) => name.includes(keyword) && col.type === "STRING" /* STRING */);
15682
15710
  if (sourceColumnIndex === -1 && matchesSource) {
@@ -15737,6 +15765,78 @@
15737
15765
  }
15738
15766
  return { sourceColumnIndex, targetColumnIndex, weightColumnIndex };
15739
15767
  };
15768
+ var supportsSankey = (rows, columns) => {
15769
+ var _a2, _b2;
15770
+ try {
15771
+ const logUnsupportedReason = (message) => {
15772
+ console.warn(`[supportsSankey] ${message}`);
15773
+ };
15774
+ if (!(rows == null ? void 0 : rows.length) || !(columns == null ? void 0 : columns.length)) {
15775
+ logUnsupportedReason(
15776
+ `Missing required data. rows=${(_a2 = rows == null ? void 0 : rows.length) != null ? _a2 : 0}, columns=${(_b2 = columns == null ? void 0 : columns.length) != null ? _b2 : 0}. Need at least 1 row and 3 columns.`
15777
+ );
15778
+ return false;
15779
+ }
15780
+ const { sourceColumnIndex, targetColumnIndex, weightColumnIndex } = findNetworkColumns(columns);
15781
+ if (sourceColumnIndex === -1 || targetColumnIndex === -1 || weightColumnIndex === -1) {
15782
+ logUnsupportedReason("Unable to determine source, target, and weight columns required for Sankey.");
15783
+ return false;
15784
+ }
15785
+ const uniqueNodes = /* @__PURE__ */ new Set();
15786
+ const uniqueLinks = /* @__PURE__ */ new Set();
15787
+ let skippedRows = 0;
15788
+ const normalizeNodeValue = (value) => {
15789
+ if (value === void 0 || value === null) {
15790
+ return void 0;
15791
+ }
15792
+ const sanitized = `${value}`.trim();
15793
+ return sanitized.length ? sanitized : void 0;
15794
+ };
15795
+ const toFinitePositiveNumber = (value) => {
15796
+ if (typeof value === "number") {
15797
+ return Number.isFinite(value) ? value : NaN;
15798
+ }
15799
+ if (typeof value === "string") {
15800
+ const cleaned = value.replace(/[^0-9.-]/g, "");
15801
+ if (!cleaned.length) {
15802
+ return NaN;
15803
+ }
15804
+ const parsed = Number(cleaned);
15805
+ return Number.isFinite(parsed) ? parsed : NaN;
15806
+ }
15807
+ return NaN;
15808
+ };
15809
+ for (const row of rows) {
15810
+ if (!row) {
15811
+ continue;
15812
+ }
15813
+ const source = normalizeNodeValue(row[sourceColumnIndex]);
15814
+ const target = normalizeNodeValue(row[targetColumnIndex]);
15815
+ if (!source || !target || source === target) {
15816
+ skippedRows += 1;
15817
+ continue;
15818
+ }
15819
+ const weight = toFinitePositiveNumber(row[weightColumnIndex]);
15820
+ if (!Number.isFinite(weight) || weight <= 0) {
15821
+ skippedRows += 1;
15822
+ continue;
15823
+ }
15824
+ uniqueNodes.add(source);
15825
+ uniqueNodes.add(target);
15826
+ uniqueLinks.add(`${source}__${target}`);
15827
+ }
15828
+ if (!uniqueLinks.size || uniqueNodes.size < 2) {
15829
+ logUnsupportedReason(
15830
+ `Insufficient valid flows. uniqueNodes=${uniqueNodes.size}, uniqueLinks=${uniqueLinks.size}, skippedRows=${skippedRows}.`
15831
+ );
15832
+ return false;
15833
+ }
15834
+ return true;
15835
+ } catch (error) {
15836
+ console.error("[supportsSankey] Unexpected error determining support", error);
15837
+ return false;
15838
+ }
15839
+ };
15740
15840
  var getSupportedDisplayTypes = ({
15741
15841
  response,
15742
15842
  columns,
@@ -15745,9 +15845,9 @@
15745
15845
  isDataLimited: isDataLimited2,
15746
15846
  allowNumericStringColumns = true
15747
15847
  } = {}) => {
15748
- var _a, _b, _c, _d, _e, _f, _g;
15848
+ var _a2, _b2, _c, _d, _e, _f, _g;
15749
15849
  try {
15750
- if (!((_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.display_type)) {
15850
+ if (!((_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.display_type)) {
15751
15851
  return [];
15752
15852
  }
15753
15853
  const displayType = response.data.data.display_type;
@@ -15825,6 +15925,9 @@
15825
15925
  if (supportsNetworkGraph(rows, visibleColumns)) {
15826
15926
  supportedDisplayTypes.push("network_graph");
15827
15927
  }
15928
+ if (supportsSankey(rows, visibleColumns)) {
15929
+ supportedDisplayTypes.push("sankey");
15930
+ }
15828
15931
  return supportedDisplayTypes;
15829
15932
  } catch (error) {
15830
15933
  console.error(error);
@@ -15839,10 +15942,10 @@
15839
15942
  return fallback;
15840
15943
  };
15841
15944
  var getDefaultDisplayType = (response, defaultToChart, columns, dataLength, pivotDataLength, preferredDisplayType, isDataLimited2 = false, preferRegularTable = false) => {
15842
- var _a, _b, _c, _d, _e, _f, _g, _h;
15945
+ var _a2, _b2, _c, _d, _e, _f, _g, _h;
15843
15946
  const supportedDisplayTypes = getSupportedDisplayTypes({
15844
15947
  response,
15845
- columns: columns != null ? columns : (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.columns,
15948
+ columns: columns != null ? columns : (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.columns,
15846
15949
  dataLength,
15847
15950
  pivotDataLength,
15848
15951
  isDataLimited: isDataLimited2
@@ -15877,15 +15980,15 @@
15877
15980
  return "text";
15878
15981
  };
15879
15982
  var hasData = (response) => {
15880
- var _a, _b, _c;
15983
+ var _a2, _b2, _c;
15881
15984
  if (!response) {
15882
15985
  return false;
15883
15986
  }
15884
- return (_c = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.rows) == null ? void 0 : _c.length;
15987
+ return (_c = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.rows) == null ? void 0 : _c.length;
15885
15988
  };
15886
15989
  var hasMoreData = (response, currentNumRows) => {
15887
- var _a, _b, _c, _d, _e;
15888
- const numRows = currentNumRows != null ? currentNumRows : (_c = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.rows) == null ? void 0 : _c.length;
15990
+ var _a2, _b2, _c, _d, _e;
15991
+ const numRows = currentNumRows != null ? currentNumRows : (_c = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.rows) == null ? void 0 : _c.length;
15889
15992
  const totalRows = (_e = (_d = response == null ? void 0 : response.data) == null ? void 0 : _d.data) == null ? void 0 : _e.count_rows;
15890
15993
  if (!numRows || !totalRows) {
15891
15994
  return false;
@@ -15893,8 +15996,8 @@
15893
15996
  return numRows < totalRows;
15894
15997
  };
15895
15998
  var isDataLimited = (queryResponse, rows) => {
15896
- var _a, _b, _c, _d, _e, _f;
15897
- const numRows = (_d = rows == null ? void 0 : rows.length) != null ? _d : (_c = (_b = (_a = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _a.data) == null ? void 0 : _b.rows) == null ? void 0 : _c.length;
15999
+ var _a2, _b2, _c, _d, _e, _f;
16000
+ const numRows = (_d = rows == null ? void 0 : rows.length) != null ? _d : (_c = (_b2 = (_a2 = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.rows) == null ? void 0 : _c.length;
15898
16001
  const totalRows = (_f = (_e = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _e.data) == null ? void 0 : _f.count_rows;
15899
16002
  if (!numRows || !totalRows) {
15900
16003
  return false;
@@ -15902,9 +16005,9 @@
15902
16005
  return numRows < totalRows;
15903
16006
  };
15904
16007
  var isDrilldown = (queryResponse) => {
15905
- var _a, _b;
16008
+ var _a2, _b2;
15906
16009
  try {
15907
- const queryText = ((_b = (_a = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _a.data) == null ? void 0 : _b.text) || "";
16010
+ const queryText = ((_b2 = (_a2 = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.text) || "";
15908
16011
  const isDrilldown2 = queryText.split(":")[0] === "Drilldown";
15909
16012
  return isDrilldown2;
15910
16013
  } catch (error) {
@@ -15994,7 +16097,9 @@
15994
16097
  };
15995
16098
 
15996
16099
  // src/safeRegex.ts
15997
- var MAX_PATTERN_LENGTH = Number(process.env.REGEXP_GUARD_MAX_LEN) || 2e3;
16100
+ var _a, _b;
16101
+ var envPatternMaxLength = typeof globalThis !== "undefined" && typeof globalThis.process !== "undefined" && ((_b = (_a = globalThis.process) == null ? void 0 : _a.env) == null ? void 0 : _b.REGEXP_GUARD_MAX_LEN);
16102
+ var MAX_PATTERN_LENGTH = Number(envPatternMaxLength) || 2e3;
15998
16103
  function isSimpleLiteral(pattern) {
15999
16104
  return typeof pattern === "string" && /^[A-Za-z0-9 _\-\.,:\/]+$/.test(pattern);
16000
16105
  }
@@ -16051,16 +16156,16 @@
16051
16156
  BOOLEAN: "boolean"
16052
16157
  };
16053
16158
  var likeMatcher = (cell, cond) => {
16054
- var _a;
16159
+ var _a2;
16055
16160
  if (cell == null) return false;
16056
- const needle = String((_a = cond.value) != null ? _a : "").toLowerCase();
16161
+ const needle = String((_a2 = cond.value) != null ? _a2 : "").toLowerCase();
16057
16162
  if (needle.length === 0) return false;
16058
16163
  return String(cell).toLowerCase().includes(needle);
16059
16164
  };
16060
16165
  var notLikeMatcher = (cell, cond) => {
16061
- var _a;
16166
+ var _a2;
16062
16167
  if (cell == null) return false;
16063
- const needle = String((_a = cond.value) != null ? _a : "").toLowerCase();
16168
+ const needle = String((_a2 = cond.value) != null ? _a2 : "").toLowerCase();
16064
16169
  if (needle.length === 0) return true;
16065
16170
  return !String(cell).toLowerCase().includes(needle);
16066
16171
  };
@@ -16133,15 +16238,15 @@
16133
16238
  return FILTER_TYPES.includes(t);
16134
16239
  }
16135
16240
  function parseLocaleNumber(value, locale3) {
16136
- var _a, _b;
16241
+ var _a2, _b2;
16137
16242
  if (typeof value === "number") return value;
16138
16243
  let str = String(value != null ? value : "").trim();
16139
16244
  if (str.length === 0) return Number.NaN;
16140
16245
  str = str.replace(/\s|\u00A0/g, "");
16141
16246
  try {
16142
16247
  const parts = Intl.NumberFormat(locale3).formatToParts(12345.6);
16143
- const group = (_a = parts.find((p) => p.type === "group")) == null ? void 0 : _a.value;
16144
- const decimal = (_b = parts.find((p) => p.type === "decimal")) == null ? void 0 : _b.value;
16248
+ const group = (_a2 = parts.find((p) => p.type === "group")) == null ? void 0 : _a2.value;
16249
+ const decimal = (_b2 = parts.find((p) => p.type === "decimal")) == null ? void 0 : _b2.value;
16145
16250
  if (group) {
16146
16251
  const grpRe = compileSafeRegex(escapeRegExp(group), "g");
16147
16252
  if (grpRe) {
@@ -16172,7 +16277,7 @@
16172
16277
  return _logger;
16173
16278
  }
16174
16279
  function parseFilter(raw, type, defaultOperator = "like" /* LIKE */) {
16175
- var _a, _b, _c;
16280
+ var _a2, _b2, _c;
16176
16281
  if (typeof raw !== "string") return { operator: defaultOperator, value: raw, type };
16177
16282
  const trimmed = raw.trim();
16178
16283
  if (trimmed.length === 0) return { operator: defaultOperator, value: "", type };
@@ -16181,8 +16286,8 @@
16181
16286
  const opRe = compileSafeRegex(opPattern, "i");
16182
16287
  const opMatch = opRe ? opRe.exec(trimmed) : null;
16183
16288
  if (opMatch) {
16184
- let op = String((_a = opMatch[1]) != null ? _a : "").toLowerCase();
16185
- const rest = (_b = opMatch[2]) != null ? _b : "";
16289
+ let op = String((_a2 = opMatch[1]) != null ? _a2 : "").toLowerCase();
16290
+ const rest = (_b2 = opMatch[2]) != null ? _b2 : "";
16186
16291
  if (op === "!") op = "not_like" /* NOT_LIKE */;
16187
16292
  if (type === FilterTypeEnum.STRING && op === "!=") op = "not_like" /* NOT_LIKE */;
16188
16293
  if (op === "between" /* BETWEEN */) {
@@ -16233,12 +16338,12 @@
16233
16338
  // src/HelperFns/tableHelpers.ts
16234
16339
  var normalizeOperator = (op) => op === "!" ? "not_like" : op;
16235
16340
  function getColumnIdentifierCompat(col) {
16236
- var _a;
16341
+ var _a2;
16237
16342
  if (!col) return void 0;
16238
16343
  if (isTabulatorColumnComponent(col)) {
16239
16344
  if (typeof col.id === "string" && col.id) return col.id;
16240
16345
  if (typeof col.getField === "function") return col.getField();
16241
- const def = (_a = col.getDefinition) == null ? void 0 : _a.call(col);
16346
+ const def = (_a2 = col.getDefinition) == null ? void 0 : _a2.call(col);
16242
16347
  if (def && typeof def.field === "string") return def.field;
16243
16348
  return void 0;
16244
16349
  }
@@ -16246,12 +16351,12 @@
16246
16351
  return getColumnFieldCompat(col);
16247
16352
  }
16248
16353
  function getColumnOriginalIndexCompat(col, originalColumns) {
16249
- var _a;
16354
+ var _a2;
16250
16355
  if (!col || !Array.isArray(originalColumns)) return void 0;
16251
16356
  const identifier = getColumnIdentifierCompat(col);
16252
16357
  const idx = originalColumns.findIndex((orig) => getColumnIdentifierCompat(orig) === identifier);
16253
16358
  if (idx !== -1) return idx;
16254
- const def = (_a = col.getDefinition) == null ? void 0 : _a.call(col);
16359
+ const def = (_a2 = col.getDefinition) == null ? void 0 : _a2.call(col);
16255
16360
  if (def && typeof def.index === "number") return def.index;
16256
16361
  return void 0;
16257
16362
  }
@@ -16282,10 +16387,10 @@
16282
16387
  return void 0;
16283
16388
  }
16284
16389
  function getColumnFieldCompat(col) {
16285
- var _a;
16390
+ var _a2;
16286
16391
  if (!col) return void 0;
16287
16392
  if (typeof col.getField === "function") return col.getField();
16288
- if (typeof col.getDefinition === "function") return (_a = col.getDefinition()) == null ? void 0 : _a.field;
16393
+ if (typeof col.getDefinition === "function") return (_a2 = col.getDefinition()) == null ? void 0 : _a2.field;
16289
16394
  return col.field;
16290
16395
  }
16291
16396
  var formatTableParams = (params, columns) => {
@@ -16299,9 +16404,9 @@
16299
16404
  return configState;
16300
16405
  };
16301
16406
  var formatSortersForAPI = (params, columns) => {
16302
- var _a;
16407
+ var _a2;
16303
16408
  const sorters = [];
16304
- if (((_a = params == null ? void 0 : params.sort) == null ? void 0 : _a.length) > 0) {
16409
+ if (((_a2 = params == null ? void 0 : params.sort) == null ? void 0 : _a2.length) > 0) {
16305
16410
  params.sort.forEach((sorter) => {
16306
16411
  try {
16307
16412
  const column = columns.find((col) => col.field == sorter.field);
@@ -16332,21 +16437,21 @@
16332
16437
  return null;
16333
16438
  };
16334
16439
  var formatNumberFilterValue = (headerValue = "") => {
16335
- var _a, _b;
16440
+ var _a2, _b2;
16336
16441
  const trimmed = String(headerValue != null ? headerValue : "").trim();
16337
16442
  const extracted = extractOperatorFromValue(trimmed, "=");
16338
- const operator = (_a = extracted == null ? void 0 : extracted.operator) != null ? _a : "=";
16339
- const rest = (_b = extracted == null ? void 0 : extracted.cleanValue) != null ? _b : trimmed;
16443
+ const operator = (_a2 = extracted == null ? void 0 : extracted.operator) != null ? _a2 : "=";
16444
+ const rest = (_b2 = extracted == null ? void 0 : extracted.cleanValue) != null ? _b2 : trimmed;
16340
16445
  const re2 = /^([+-]?\d+(?:\.\d+)?)$/;
16341
16446
  const m = re2.exec(rest.replaceAll(",", ""));
16342
16447
  return m ? { value: m[1], operator } : { value: "", operator };
16343
16448
  };
16344
16449
  var formatFiltersForAPI = (params, columns) => {
16345
- var _a;
16450
+ var _a2;
16346
16451
  const filters = [];
16347
- if (((_a = params == null ? void 0 : params.filter) == null ? void 0 : _a.length) > 0) {
16452
+ if (((_a2 = params == null ? void 0 : params.filter) == null ? void 0 : _a2.length) > 0) {
16348
16453
  params.filter.forEach((filter3) => {
16349
- var _a2, _b, _c, _d;
16454
+ var _a3, _b2, _c, _d;
16350
16455
  try {
16351
16456
  const column = columns.find((col) => col.field == filter3.field);
16352
16457
  if (column) {
@@ -16361,7 +16466,7 @@
16361
16466
  const betweenMatch = svTrim.match(/^between\s*\(?\s*([^)]*?)\s*\)?$/i);
16362
16467
  if (betweenMatch) {
16363
16468
  operator = "between" /* BETWEEN */;
16364
- value = ((_a2 = betweenMatch[1]) != null ? _a2 : "").trim();
16469
+ value = ((_a3 = betweenMatch[1]) != null ? _a3 : "").trim();
16365
16470
  operatorExtracted = true;
16366
16471
  } else {
16367
16472
  const extracted = extractOperatorFromValue(stringValue);
@@ -16387,7 +16492,7 @@
16387
16492
  return;
16388
16493
  }
16389
16494
  const filterObj = {
16390
- name: (_b = column.name) != null ? _b : "",
16495
+ name: (_b2 = column.name) != null ? _b2 : "",
16391
16496
  columnName: (_c = column.title) != null ? _c : "",
16392
16497
  value,
16393
16498
  operator,
@@ -16479,9 +16584,9 @@
16479
16584
  });
16480
16585
  };
16481
16586
  var onTableCellClick = ({ cell, columns, tableConfig, pivotData }) => {
16482
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
16587
+ var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j;
16483
16588
  try {
16484
- if ((_b = (_a = cell == null ? void 0 : cell.getColumn()) == null ? void 0 : _a.getDefinition()) == null ? void 0 : _b.pivot) {
16589
+ if ((_b2 = (_a2 = cell == null ? void 0 : cell.getColumn()) == null ? void 0 : _a2.getDefinition()) == null ? void 0 : _b2.pivot) {
16485
16590
  return;
16486
16591
  }
16487
16592
  if (!columns) {
@@ -16545,21 +16650,21 @@
16545
16650
  }
16546
16651
  };
16547
16652
  var hasNumberColumn = (columns) => {
16548
- var _a;
16653
+ var _a2;
16549
16654
  const visibleColumns = getVisibleColumns(columns);
16550
- const hasNumberColumn2 = !!((_a = visibleColumns.filter((col) => isColumnNumberType(col))) == null ? void 0 : _a.length);
16655
+ const hasNumberColumn2 = !!((_a2 = visibleColumns.filter((col) => isColumnNumberType(col))) == null ? void 0 : _a2.length);
16551
16656
  return hasNumberColumn2;
16552
16657
  };
16553
16658
  var hasStringColumn = (columns) => {
16554
- var _a;
16659
+ var _a2;
16555
16660
  const visibleColumns = getVisibleColumns(columns);
16556
- const hasStringColumn2 = !!((_a = visibleColumns.filter((col) => isColumnStringType(col))) == null ? void 0 : _a.length);
16661
+ const hasStringColumn2 = !!((_a2 = visibleColumns.filter((col) => isColumnStringType(col))) == null ? void 0 : _a2.length);
16557
16662
  return hasStringColumn2;
16558
16663
  };
16559
16664
  var hasDateColumn = (columns) => {
16560
- var _a;
16665
+ var _a2;
16561
16666
  const visibleColumns = getVisibleColumns(columns);
16562
- const hasDateColumn2 = !!((_a = visibleColumns.filter((col) => isColumnDateType(col))) == null ? void 0 : _a.length);
16667
+ const hasDateColumn2 = !!((_a2 = visibleColumns.filter((col) => isColumnDateType(col))) == null ? void 0 : _a2.length);
16563
16668
  return hasDateColumn2;
16564
16669
  };
16565
16670
  var getVisibleColumns = (columns) => {
@@ -16632,9 +16737,9 @@
16632
16737
  return groupByArray;
16633
16738
  };
16634
16739
  var getGroupBysFromPivotTable = ({ cell, rowHeaderDefinition, columnHeaderDefinition }) => {
16635
- var _a, _b, _c, _d, _e, _f, _g;
16740
+ var _a2, _b2, _c, _d, _e, _f, _g;
16636
16741
  try {
16637
- const rowHeaderValue = (_d = (_c = (_b = (_a = cell == null ? void 0 : cell.getRow) == null ? void 0 : _a.call(cell)) == null ? void 0 : _b.getData) == null ? void 0 : _c.call(_b)) == null ? void 0 : _d[0];
16742
+ const rowHeaderValue = (_d = (_c = (_b2 = (_a2 = cell == null ? void 0 : cell.getRow) == null ? void 0 : _a2.call(cell)) == null ? void 0 : _b2.getData) == null ? void 0 : _c.call(_b2)) == null ? void 0 : _d[0];
16638
16743
  const clickedColDef = (_g = (_f = (_e = cell == null ? void 0 : cell.getColumn) == null ? void 0 : _e.call(cell)) == null ? void 0 : _f.getDefinition) == null ? void 0 : _g.call(_f);
16639
16744
  if (rowHeaderValue === void 0 || !clickedColDef) {
16640
16745
  return void 0;
@@ -16732,7 +16837,7 @@
16732
16837
  }) => {
16733
16838
  if ((column == null ? void 0 : column.type) === "DATE" /* DATE */) {
16734
16839
  return (headerValue, rowValue) => {
16735
- var _a;
16840
+ var _a2;
16736
16841
  try {
16737
16842
  if (rowValue === void 0 || rowValue === null) {
16738
16843
  getLogger().warn("date filter: row value missing", { column });
@@ -16755,7 +16860,7 @@
16755
16860
  }
16756
16861
  const precision = getPrecisionForDayJS(getFilterPrecision(column));
16757
16862
  const startDateRaw = parts[0];
16758
- const endDateRaw = (_a = parts[1]) != null ? _a : parts[0];
16863
+ const endDateRaw = (_a2 = parts[1]) != null ? _a2 : parts[0];
16759
16864
  const startDate = dayjsWithPlugins_default.utc(startDateRaw);
16760
16865
  const endDate = dayjsWithPlugins_default.utc(endDateRaw);
16761
16866
  if (!startDate.isValid() || !endDate.isValid()) {
@@ -16837,8 +16942,8 @@
16837
16942
  return aggConfig;
16838
16943
  };
16839
16944
  var getDrilldownGroupby = (queryResponse, newCol) => {
16840
- var _a, _b, _c, _d;
16841
- return (_d = (_c = (_b = (_a = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _a.data) == null ? void 0 : _b.fe_req) == null ? void 0 : _c.columns) == null ? void 0 : _d.find((column) => newCol.name === column.name);
16945
+ var _a2, _b2, _c, _d;
16946
+ return (_d = (_c = (_b2 = (_a2 = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.fe_req) == null ? void 0 : _c.columns) == null ? void 0 : _d.find((column) => newCol.name === column.name);
16842
16947
  };
16843
16948
  var formatQueryColumns = ({
16844
16949
  columns,
@@ -16853,9 +16958,9 @@
16853
16958
  }
16854
16959
  const isListQuery2 = getNumberOfGroupables(columns) === 0;
16855
16960
  const formattedColumns = columns.map((col, i) => {
16856
- var _a, _b, _c;
16961
+ var _a2, _b2, _c;
16857
16962
  const newCol = (0, import_lodash2.default)(col);
16858
- newCol.id = (_a = col.id) != null ? _a : v4_default();
16963
+ newCol.id = (_a2 = col.id) != null ? _a2 : v4_default();
16859
16964
  newCol.field = `${i}`;
16860
16965
  newCol.index = i;
16861
16966
  newCol.title = col.display_name;
@@ -16884,7 +16989,7 @@
16884
16989
  htmlElement: cell.getElement()
16885
16990
  });
16886
16991
  };
16887
- newCol.headerFilter = (_b = col.headerFilter) != null ? _b : "input";
16992
+ newCol.headerFilter = (_b2 = col.headerFilter) != null ? _b2 : "input";
16888
16993
  newCol.headerFilterPlaceholder = setHeaderFilterPlaceholder(newCol);
16889
16994
  newCol.headerFilterLiveFilter = false;
16890
16995
  newCol.headerFilterFunc = createFilterFunction({ column: newCol, dataFormatting });
@@ -16918,7 +17023,7 @@
16918
17023
  return formattedColumns;
16919
17024
  };
16920
17025
  var getStringColumnIndices = (columns, supportsPivot = false, includeNumerics = false, defaultDateColumn) => {
16921
- var _a, _b;
17026
+ var _a2, _b2;
16922
17027
  if (!columns) {
16923
17028
  return void 0;
16924
17029
  }
@@ -16949,12 +17054,12 @@
16949
17054
  }
16950
17055
  if (includeNumerics && stringColumnIndex == void 0) {
16951
17056
  const { numberColumnIndices, numberColumnIndices2 } = getNumberColumnIndices(columns);
16952
- stringColumnIndex = (_a = stringColumnIndices.find(
17057
+ stringColumnIndex = (_a2 = stringColumnIndices.find(
16953
17058
  (index) => !numberColumnIndices.includes(index) && !numberColumnIndices2.includes(index)
16954
- )) != null ? _a : stringColumnIndices.find((index) => !numberColumnIndices.includes(index));
17059
+ )) != null ? _a2 : stringColumnIndices.find((index) => !numberColumnIndices.includes(index));
16955
17060
  }
16956
17061
  if (supportsPivot) {
16957
- const isDateColumnGroupable = (_b = columns[dateColumnIndex]) == null ? void 0 : _b.groupable;
17062
+ const isDateColumnGroupable = (_b2 = columns[dateColumnIndex]) == null ? void 0 : _b2.groupable;
16958
17063
  stringColumnIndex = isDateColumnGroupable ? dateColumnIndex : stringColumnIndices.findIndex((index) => columns[index].groupable);
16959
17064
  if (!(stringColumnIndex >= 0)) {
16960
17065
  stringColumnIndex = stringColumnIndices[0];
@@ -17142,8 +17247,8 @@
17142
17247
  currentTableConfig,
17143
17248
  allowNumericalOrdinalAxis = true
17144
17249
  } = {}) => {
17145
- var _a, _b, _c, _d;
17146
- const cols = columns != null ? columns : (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.columns;
17250
+ var _a2, _b2, _c, _d;
17251
+ const cols = columns != null ? columns : (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.columns;
17147
17252
  if (!cols) {
17148
17253
  return;
17149
17254
  }
@@ -17240,8 +17345,8 @@
17240
17345
  return tableConfig;
17241
17346
  };
17242
17347
  var isColumnIndexConfigValid = ({ response, columnIndexConfig, columns, displayType }) => {
17243
- var _a, _b, _c, _d, _e, _f;
17244
- if (!columns || !((_c = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.rows) == null ? void 0 : _c.length)) {
17348
+ var _a2, _b2, _c, _d, _e, _f;
17349
+ if (!columns || !((_c = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.rows) == null ? void 0 : _c.length)) {
17245
17350
  console.debug("Invalid Config: either no columns or no data were provided to table config validation");
17246
17351
  return false;
17247
17352
  }
@@ -17268,8 +17373,8 @@
17268
17373
  return false;
17269
17374
  }
17270
17375
  if (isNumber(columnIndexConfig.stringColumnIndex) && (!((_d = columns[columnIndexConfig.stringColumnIndex]) == null ? void 0 : _d.is_visible) || columnIndexConfig.stringColumnIndices.length && columnIndexConfig.stringColumnIndices.find((i) => {
17271
- var _a2;
17272
- return !((_a2 = columns[i]) == null ? void 0 : _a2.is_visible);
17376
+ var _a3;
17377
+ return !((_a3 = columns[i]) == null ? void 0 : _a3.is_visible);
17273
17378
  }) !== void 0)) {
17274
17379
  console.debug(
17275
17380
  "Table config invalid: Some of the string column indices were pointing to hidden columns.",
@@ -17279,8 +17384,8 @@
17279
17384
  return false;
17280
17385
  }
17281
17386
  if (isNumber(columnIndexConfig.numberColumnIndex) && (!((_e = columns[columnIndexConfig.numberColumnIndex]) == null ? void 0 : _e.is_visible) || columnIndexConfig.numberColumnIndices.find((i) => {
17282
- var _a2;
17283
- return !((_a2 = columns[i]) == null ? void 0 : _a2.is_visible);
17387
+ var _a3;
17388
+ return !((_a3 = columns[i]) == null ? void 0 : _a3.is_visible);
17284
17389
  }) !== void 0)) {
17285
17390
  console.debug(
17286
17391
  "Table config invalid: Some of the number column indices were pointing to hidden columns.",
@@ -17295,8 +17400,8 @@
17295
17400
  }
17296
17401
  if (displayType === "column_line" /* COLUMN_LINE */ || displayType === "scatterplot" /* SCATTERPLOT */) {
17297
17402
  if (columnIndexConfig.numberColumnIndices2.find((i) => {
17298
- var _a2;
17299
- return !((_a2 = columns[i]) == null ? void 0 : _a2.is_visible);
17403
+ var _a3;
17404
+ return !((_a3 = columns[i]) == null ? void 0 : _a3.is_visible);
17300
17405
  })) {
17301
17406
  console.debug("Second axis indices had hidden columns");
17302
17407
  return false;
@@ -17325,14 +17430,14 @@
17325
17430
  };
17326
17431
  var getQuerySelectableJoinColumns = (columns) => {
17327
17432
  return columns.map((col, index) => {
17328
- var _a, _b;
17329
- return ((_b = (_a = getStringColumnIndices(columns)) == null ? void 0 : _a.stringColumnIndices) == null ? void 0 : _b.includes(index)) ? col : null;
17433
+ var _a2, _b2;
17434
+ return ((_b2 = (_a2 = getStringColumnIndices(columns)) == null ? void 0 : _a2.stringColumnIndices) == null ? void 0 : _b2.includes(index)) ? col : null;
17330
17435
  }).filter(Boolean);
17331
17436
  };
17332
17437
  var getDefaultJoinColumnAndDisplayNameAndJoinColumnsIndices = (queryResponse) => {
17333
- var _a, _b;
17438
+ var _a2, _b2;
17334
17439
  try {
17335
- const columns = ((_b = (_a = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _a.data) == null ? void 0 : _b.columns) || [];
17440
+ const columns = ((_b2 = (_a2 = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.columns) || [];
17336
17441
  const selectableJoinColumns = getQuerySelectableJoinColumns(columns);
17337
17442
  let defaultJoinColumn = [];
17338
17443
  let defaultDisplayName = "";
@@ -17359,10 +17464,10 @@
17359
17464
  }
17360
17465
  };
17361
17466
  var getDefaultJoinColumns = (firstQueryResult, secondQueryResult) => {
17362
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
17467
+ var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
17363
17468
  try {
17364
17469
  const firstSelectableJoinColumns = getQuerySelectableJoinColumns(
17365
- ((_b = (_a = firstQueryResult == null ? void 0 : firstQueryResult.data) == null ? void 0 : _a.data) == null ? void 0 : _b.columns) || []
17470
+ ((_b2 = (_a2 = firstQueryResult == null ? void 0 : firstQueryResult.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.columns) || []
17366
17471
  ).filter((column) => column.groupable === true);
17367
17472
  const secondSelectableJoinColumns = getQuerySelectableJoinColumns(
17368
17473
  ((_d = (_c = secondQueryResult == null ? void 0 : secondQueryResult.data) == null ? void 0 : _c.data) == null ? void 0 : _d.columns) || []
@@ -17629,7 +17734,7 @@
17629
17734
  }
17630
17735
  };
17631
17736
  var formatStringDate = (value, config = dataFormattingDefault) => {
17632
- var _a;
17737
+ var _a2;
17633
17738
  if (!value) {
17634
17739
  return void 0;
17635
17740
  }
@@ -17639,7 +17744,7 @@
17639
17744
  const day = dateArray == null ? void 0 : dateArray[2];
17640
17745
  let month;
17641
17746
  let week;
17642
- if ((_a = dateArray == null ? void 0 : dateArray[1]) == null ? void 0 : _a.includes("W")) {
17747
+ if ((_a2 = dateArray == null ? void 0 : dateArray[1]) == null ? void 0 : _a2.includes("W")) {
17643
17748
  week = dateArray == null ? void 0 : dateArray[1];
17644
17749
  } else {
17645
17750
  month = dateArray == null ? void 0 : dateArray[1];
@@ -17911,7 +18016,7 @@
17911
18016
  return a - b;
17912
18017
  };
17913
18018
  var dateStringSortFn = (a, b, col) => {
17914
- var _a;
18019
+ var _a2;
17915
18020
  if (typeof a !== "string" || typeof b !== "string" || !col) {
17916
18021
  return a - b;
17917
18022
  }
@@ -17946,7 +18051,7 @@
17946
18051
  } else {
17947
18052
  switch (col.precision) {
17948
18053
  case "DOW": {
17949
- const dowStyle = (_a = col.dow_style) != null ? _a : "ALPHA_MON";
18054
+ const dowStyle = (_a2 = col.dow_style) != null ? _a2 : "ALPHA_MON";
17950
18055
  let aIndex = WEEKDAY_NAMES_MON.findIndex((dow) => dow.toLowerCase().includes(aTrimmed.toLowerCase()));
17951
18056
  let bIndex = WEEKDAY_NAMES_MON.findIndex((dow) => dow.toLowerCase().includes(bTrimmed.toLowerCase()));
17952
18057
  if (dowStyle === "ALPHA_SUN") {
@@ -18048,13 +18153,13 @@
18048
18153
  if (op === "like" /* LIKE */ || op === "includes" || op === "contains") {
18049
18154
  if (colType === "DATE" /* DATE */) {
18050
18155
  return data.concat().filter((row) => {
18051
- var _a;
18156
+ var _a2;
18052
18157
  const cell = row[columnIndex];
18053
18158
  if (isNil(cell)) return false;
18054
18159
  const parts = parseRangeParts(filterValue);
18055
18160
  const precision = getPrecisionForDayJS(getFilterPrecision(column));
18056
18161
  const start = dayjsWithPlugins_default.utc(parts[0]).startOf(precision);
18057
- const end = dayjsWithPlugins_default.utc((_a = parts[1]) != null ? _a : parts[0]).endOf(precision);
18162
+ const end = dayjsWithPlugins_default.utc((_a2 = parts[1]) != null ? _a2 : parts[0]).endOf(precision);
18058
18163
  const rowVal = getDayJSObj({ value: cell, column });
18059
18164
  return start.isSameOrBefore(rowVal) && rowVal.isSameOrBefore(end);
18060
18165
  });
@@ -18089,14 +18194,14 @@
18089
18194
  }
18090
18195
  if (op === "between" /* BETWEEN */) {
18091
18196
  return data.concat().filter((row) => {
18092
- var _a;
18197
+ var _a2;
18093
18198
  const cell = row[columnIndex];
18094
18199
  if (isNil(cell)) return false;
18095
18200
  if (colType === "DATE" /* DATE */ || colType === "DATE_STRING" /* DATE_STRING */) {
18096
18201
  try {
18097
18202
  const parts2 = parseRangeParts(filterValue);
18098
18203
  const start = getDayJSObj({ value: parts2[0], column });
18099
- const end = getDayJSObj({ value: (_a = parts2[1]) != null ? _a : parts2[0], column });
18204
+ const end = getDayJSObj({ value: (_a2 = parts2[1]) != null ? _a2 : parts2[0], column });
18100
18205
  const rowVal = getDayJSObj({ value: cell, column });
18101
18206
  return start.isSameOrBefore(rowVal) && rowVal.isSameOrBefore(end);
18102
18207
  } catch (e) {
@@ -18152,13 +18257,13 @@
18152
18257
  if (op === "!" || op === "not_like") {
18153
18258
  if (colType === "DATE" /* DATE */) {
18154
18259
  return data.concat().filter((row) => {
18155
- var _a;
18260
+ var _a2;
18156
18261
  const cell = row[columnIndex];
18157
18262
  if (isNil(cell)) return true;
18158
18263
  const parts = parseRangeParts(filterValue);
18159
18264
  const precision = getPrecisionForDayJS(getFilterPrecision(column));
18160
18265
  const start = dayjsWithPlugins_default.utc(parts[0]).startOf(precision);
18161
- const end = dayjsWithPlugins_default.utc((_a = parts[1]) != null ? _a : parts[0]).endOf(precision);
18266
+ const end = dayjsWithPlugins_default.utc((_a2 = parts[1]) != null ? _a2 : parts[0]).endOf(precision);
18162
18267
  const rowVal = getDayJSObj({ value: cell, column });
18163
18268
  return !(start.isSameOrBefore(rowVal) && rowVal.isSameOrBefore(end));
18164
18269
  });
@@ -18214,8 +18319,8 @@
18214
18319
  } else {
18215
18320
  const sortedData = data.concat().sort(
18216
18321
  (a, b) => {
18217
- var _a;
18218
- return multiplier * ((_a = `${a[columnIndex]}`) == null ? void 0 : _a.localeCompare(`${b[columnIndex]}`, "en", { ignorePunctuation: true }));
18322
+ var _a2;
18323
+ return multiplier * ((_a2 = `${a[columnIndex]}`) == null ? void 0 : _a2.localeCompare(`${b[columnIndex]}`, "en", { ignorePunctuation: true }));
18219
18324
  }
18220
18325
  );
18221
18326
  return sortedData;
@@ -18251,8 +18356,8 @@
18251
18356
  if (stringColumnIndex >= 0) {
18252
18357
  let multiplier = sortDirection === "asc" ? -1 : 1;
18253
18358
  const sortedData = data.concat().sort((a, b) => {
18254
- var _a;
18255
- return (_a = a[0]) == null ? void 0 : _a.localeCompare(b[0]);
18359
+ var _a2;
18360
+ return (_a2 = a[0]) == null ? void 0 : _a2.localeCompare(b[0]);
18256
18361
  });
18257
18362
  return sortedData;
18258
18363
  }
@@ -18391,7 +18496,7 @@
18391
18496
  }
18392
18497
  };
18393
18498
  var getNumberFormatConfig = (d, scale) => {
18394
- var _a, _b, _c, _d, _e, _f, _g, _h;
18499
+ var _a2, _b2, _c, _d, _e, _f, _g, _h;
18395
18500
  const dNumber = typeof d === "string" ? parseFloat(d) : d;
18396
18501
  let minimumFractionDigits = 0;
18397
18502
  let maximumFractionDigits = 0;
@@ -18401,7 +18506,7 @@
18401
18506
  const maxValue = scale == null ? void 0 : scale.maxValue;
18402
18507
  let domainRange = 0;
18403
18508
  if (domain) {
18404
- domainRange = Math.abs(((_a = domain[1]) != null ? _a : 0) - ((_b = domain[0]) != null ? _b : 0));
18509
+ domainRange = Math.abs(((_a2 = domain[1]) != null ? _a2 : 0) - ((_b2 = domain[0]) != null ? _b2 : 0));
18405
18510
  } else if (!isNaN(maxValue) && !isNaN(minValue)) {
18406
18511
  domainRange = Math.abs(maxValue - minValue);
18407
18512
  }
@@ -18446,7 +18551,7 @@
18446
18551
  maxLabelWidth,
18447
18552
  sigDigits
18448
18553
  }) => {
18449
- var _a;
18554
+ var _a2;
18450
18555
  if (d === null) {
18451
18556
  return {
18452
18557
  fullWidthLabel: "Untitled Category",
@@ -18460,7 +18565,7 @@
18460
18565
  formattedLabel: d
18461
18566
  };
18462
18567
  }
18463
- const config = (_a = dataFormatting != null ? dataFormatting : scale == null ? void 0 : scale.dataFormatting) != null ? _a : getDataFormatting();
18568
+ const config = (_a2 = dataFormatting != null ? dataFormatting : scale == null ? void 0 : scale.dataFormatting) != null ? _a2 : getDataFormatting();
18464
18569
  const { currencyCode, languageCode } = config;
18465
18570
  let type = col.type;
18466
18571
  if ((scale == null ? void 0 : scale.units) === "none") {
@@ -18572,14 +18677,14 @@
18572
18677
  return { fullWidthLabel, formattedLabel };
18573
18678
  };
18574
18679
  var getCurrencySymbol = (dataFormatting = dataFormattingDefault) => {
18575
- var _a;
18680
+ var _a2;
18576
18681
  try {
18577
18682
  const { currencyCode, languageCode } = getDataFormatting(dataFormatting);
18578
18683
  const formattedParts = new Intl.NumberFormat(languageCode, {
18579
18684
  style: "currency",
18580
18685
  currency: currencyCode
18581
18686
  }).formatToParts(0);
18582
- const symbol = (_a = formattedParts.find((part) => (part == null ? void 0 : part.type) === "currency")) == null ? void 0 : _a.value;
18687
+ const symbol = (_a2 = formattedParts.find((part) => (part == null ? void 0 : part.type) === "currency")) == null ? void 0 : _a2.value;
18583
18688
  return symbol;
18584
18689
  } catch (error) {
18585
18690
  console.error(error);
@@ -18783,7 +18888,7 @@
18783
18888
  return chunkedFilter;
18784
18889
  };
18785
18890
  var chunkNullVLString = (str) => {
18786
- var _a;
18891
+ var _a2;
18787
18892
  let strArray = [];
18788
18893
  const splitStr = str.split("null");
18789
18894
  if (splitStr[0]) {
@@ -18797,7 +18902,7 @@
18797
18902
  c_type: "VALUE_LABEL",
18798
18903
  eng: "null",
18799
18904
  for: "null",
18800
- operator: (_a = splitStr[0].trim()) != null ? _a : void 0
18905
+ operator: (_a2 = splitStr[0].trim()) != null ? _a2 : void 0
18801
18906
  });
18802
18907
  if (splitStr[1]) {
18803
18908
  strArray.push({
@@ -18815,8 +18920,8 @@
18815
18920
  }).filter(Boolean);
18816
18921
  };
18817
18922
  var parseChunkCauses = (chunk) => {
18818
- var _a, _b;
18819
- if (!((_a = chunk == null ? void 0 : chunk.causes) == null ? void 0 : _a.length) || !((_b = chunk.causes_gen2) == null ? void 0 : _b.length) || !chunk.eng) {
18923
+ var _a2, _b2;
18924
+ if (!((_a2 = chunk == null ? void 0 : chunk.causes) == null ? void 0 : _a2.length) || !((_b2 = chunk.causes_gen2) == null ? void 0 : _b2.length) || !chunk.eng) {
18820
18925
  return chunk;
18821
18926
  }
18822
18927
  const cleanCauses = extractQuotedContent([...chunk.causes, ...chunk.causes_gen2]);
@@ -18829,7 +18934,7 @@
18829
18934
  };
18830
18935
  };
18831
18936
  var parseFilterChunk = (chunk) => {
18832
- var _a, _b, _c, _d, _e, _f, _g;
18937
+ var _a2, _b2, _c, _d, _e, _f, _g;
18833
18938
  try {
18834
18939
  const input = chunk.eng;
18835
18940
  const textOutsideBrackets = input.split(bracketsRegex);
@@ -18838,7 +18943,7 @@
18838
18943
  while ((match = bracketsRegex.exec(input)) !== null) {
18839
18944
  bracketTextMatches.push(match);
18840
18945
  }
18841
- if (!bracketTextMatches.length || !textOutsideBrackets.length || ((_a = bracketTextMatches[0]) == null ? void 0 : _a[0]) === "(Date)" || ((_b = bracketTextMatches[0]) == null ? void 0 : _b[0]) === "(Month)" || ((_c = bracketTextMatches[0]) == null ? void 0 : _c[0]) === "(Year)" || ((_d = bracketTextMatches[0]) == null ? void 0 : _d[0]) === "(Week)" || ((_e = bracketTextMatches[0]) == null ? void 0 : _e[0]) === "(Day)" || ((_g = (_f = textOutsideBrackets[0]) == null ? void 0 : _f.split(" ")) == null ? void 0 : _g.find((word) => {
18946
+ if (!bracketTextMatches.length || !textOutsideBrackets.length || ((_a2 = bracketTextMatches[0]) == null ? void 0 : _a2[0]) === "(Date)" || ((_b2 = bracketTextMatches[0]) == null ? void 0 : _b2[0]) === "(Month)" || ((_c = bracketTextMatches[0]) == null ? void 0 : _c[0]) === "(Year)" || ((_d = bracketTextMatches[0]) == null ? void 0 : _d[0]) === "(Week)" || ((_e = bracketTextMatches[0]) == null ? void 0 : _e[0]) === "(Day)" || ((_g = (_f = textOutsideBrackets[0]) == null ? void 0 : _f.split(" ")) == null ? void 0 : _g.find((word) => {
18842
18947
  if (isISODate(word)) return true;
18843
18948
  const trimmed = word.replace(/\'/g, "");
18844
18949
  if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(trimmed)) return true;
@@ -18852,21 +18957,21 @@
18852
18957
  }
18853
18958
  let mergedArray = [];
18854
18959
  textOutsideBrackets.forEach((str, i) => {
18855
- var _a2, _b2, _c2;
18960
+ var _a3, _b3, _c2;
18856
18961
  let strChunked = [];
18857
18962
  const isNullVL = str.trim() === "null" || str.includes(" null ");
18858
18963
  if (isNullVL) {
18859
18964
  strChunked = chunkNullVLString(str);
18860
18965
  } else {
18861
18966
  const textInQuotesMatches = getRegexMatchArray(str, singleQuoteRegex);
18862
- strChunked = (_a2 = chunkStrByMatches(str, textInQuotesMatches)) != null ? _a2 : [];
18967
+ strChunked = (_a3 = chunkStrByMatches(str, textInQuotesMatches)) != null ? _a3 : [];
18863
18968
  }
18864
18969
  mergedArray = [...mergedArray, ...strChunked];
18865
18970
  const vlSuffixMatch = bracketTextMatches[i];
18866
18971
  if (vlSuffixMatch) {
18867
18972
  mergedArray.push({
18868
18973
  c_type: "VL_SUFFIX",
18869
- eng: (_b2 = vlSuffixMatch[0]) == null ? void 0 : _b2.trim(),
18974
+ eng: (_b3 = vlSuffixMatch[0]) == null ? void 0 : _b3.trim(),
18870
18975
  for: (_c2 = strChunked.find((ch) => ch.c_type === "VALUE_LABEL")) == null ? void 0 : _c2.for
18871
18976
  });
18872
18977
  }
@@ -18905,9 +19010,9 @@
18905
19010
  }
18906
19011
  };
18907
19012
  var getDatesFromRT = (queryResponse) => {
18908
- var _a, _b;
19013
+ var _a2, _b2;
18909
19014
  try {
18910
- const parsedRT = (_b = (_a = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _a.data) == null ? void 0 : _b.parsed_interpretation;
19015
+ const parsedRT = (_b2 = (_a2 = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.parsed_interpretation;
18911
19016
  if (!parsedRT) {
18912
19017
  return;
18913
19018
  }
@@ -19183,7 +19288,7 @@
19183
19288
  }
19184
19289
  };
19185
19290
  var getChartColorVars = (prefix2) => {
19186
- var _a, _b, _c;
19291
+ var _a2, _b2, _c;
19187
19292
  try {
19188
19293
  const chartColors = [];
19189
19294
  const chartColorsDark = [];
@@ -19192,7 +19297,7 @@
19192
19297
  while (counter < maxLoops) {
19193
19298
  try {
19194
19299
  const chartColor = getThemeValue(`chart-color-${counter}`, prefix2);
19195
- const chartColorDark = (_a = getThemeValue(`chart-color-dark-${counter}`, prefix2)) != null ? _a : chartColor;
19300
+ const chartColorDark = (_a2 = getThemeValue(`chart-color-dark-${counter}`, prefix2)) != null ? _a2 : chartColor;
19196
19301
  if (chartColor) {
19197
19302
  chartColors.push(chartColor);
19198
19303
  chartColorsDark.push(chartColorDark);
@@ -19207,7 +19312,7 @@
19207
19312
  } catch (error) {
19208
19313
  console.error("Could not get chart color css vars. See below for error details");
19209
19314
  console.error(error);
19210
- return { chartColors: (_b = defaultThemeConfig.chartColors) != null ? _b : [], chartColorsDark: (_c = defaultThemeConfig.chartColors) != null ? _c : [] };
19315
+ return { chartColors: (_b2 = defaultThemeConfig.chartColors) != null ? _b2 : [], chartColorsDark: (_c = defaultThemeConfig.chartColors) != null ? _c : [] };
19211
19316
  }
19212
19317
  };
19213
19318
  var setAccentColorVars = (accentColor, themeStyles) => {
@@ -20097,8 +20202,8 @@
20097
20202
  });
20098
20203
  };
20099
20204
  var handleTooltipBoundaryCollision = (e, self2) => {
20100
- var _a;
20101
- const tooltipRef = (_a = self2 == null ? void 0 : self2.reactTooltipRef) == null ? void 0 : _a.tooltipRef;
20205
+ var _a2;
20206
+ const tooltipRef = (_a2 = self2 == null ? void 0 : self2.reactTooltipRef) == null ? void 0 : _a2.tooltipRef;
20102
20207
  if (!tooltipRef) {
20103
20208
  return;
20104
20209
  }
@@ -20197,10 +20302,10 @@
20197
20302
  };
20198
20303
  var svgToPng = (svgElement, scale = 3, CSS_PREFIX) => {
20199
20304
  return new Promise(function(resolve, reject) {
20200
- var _a, _b, _c, _d;
20305
+ var _a2, _b2, _c, _d;
20201
20306
  try {
20202
20307
  const margin = 10;
20203
- const originalWidth = (_b = (_a = svgElement == null ? void 0 : svgElement.getBoundingClientRect) == null ? void 0 : _a.call(svgElement)) == null ? void 0 : _b.width;
20308
+ const originalWidth = (_b2 = (_a2 = svgElement == null ? void 0 : svgElement.getBoundingClientRect) == null ? void 0 : _a2.call(svgElement)) == null ? void 0 : _b2.width;
20204
20309
  const originalHeight = (_d = (_c = svgElement == null ? void 0 : svgElement.getBoundingClientRect) == null ? void 0 : _c.call(svgElement)) == null ? void 0 : _d.height;
20205
20310
  if (!originalHeight || !originalWidth) {
20206
20311
  throw new Error("SVG has no height or width");
@@ -20250,12 +20355,12 @@
20250
20355
 
20251
20356
  // src/HelperFns/dataAlertHelpers.ts
20252
20357
  var getScheduleFrequencyObject = (dataAlert) => {
20253
- var _a, _b;
20358
+ var _a2, _b2;
20254
20359
  if (!dataAlert) {
20255
20360
  return;
20256
20361
  }
20257
20362
  if (dataAlert.notification_type === SCHEDULED_TYPE) {
20258
- const schedulePeriod = (_b = (_a = dataAlert.schedules) == null ? void 0 : _a[0]) == null ? void 0 : _b.notification_period;
20363
+ const schedulePeriod = (_b2 = (_a2 = dataAlert.schedules) == null ? void 0 : _a2[0]) == null ? void 0 : _b2.notification_period;
20259
20364
  let scheduleFrequency = schedulePeriod;
20260
20365
  if (schedulePeriod === "WEEK" && dataAlert.schedules.length === 7) {
20261
20366
  scheduleFrequency = "DAY";
@@ -20265,10 +20370,10 @@
20265
20370
  return RESET_PERIOD_OPTIONS[dataAlert.reset_period];
20266
20371
  };
20267
20372
  var getSupportedConditionTypes = (expression, queryResponse) => {
20268
- var _a, _b, _c, _d, _e, _f, _g, _h;
20373
+ var _a2, _b2, _c, _d, _e, _f, _g, _h;
20269
20374
  try {
20270
20375
  if (expression == null ? void 0 : expression[0]) {
20271
- const firstCondition = (_a = expression == null ? void 0 : expression[0]) == null ? void 0 : _a.condition;
20376
+ const firstCondition = (_a2 = expression == null ? void 0 : expression[0]) == null ? void 0 : _a2.condition;
20272
20377
  if (firstCondition && firstCondition === EXISTS_TYPE) {
20273
20378
  return [EXISTS_TYPE];
20274
20379
  }
@@ -20276,7 +20381,7 @@
20276
20381
  }
20277
20382
  if (isSingleValueResponse(queryResponse)) {
20278
20383
  return [COMPARE_TYPE];
20279
- } else if (isAggregation((_c = (_b = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _b.data) == null ? void 0 : _c.columns)) {
20384
+ } else if (isAggregation((_c = (_b2 = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _b2.data) == null ? void 0 : _c.columns)) {
20280
20385
  if ((_f = (_e = (_d = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _d.data) == null ? void 0 : _e.columns) == null ? void 0 : _f.find((col) => col.is_visible && isColumnNumberType(col))) {
20281
20386
  return [COMPARE_TYPE, EXISTS_TYPE];
20282
20387
  }
@@ -20310,12 +20415,12 @@
20310
20415
  return `${dateDayJS.format("ll [at] h:mma")} (${dataAlert.time_zone})`;
20311
20416
  };
20312
20417
  var formatNextScheduleDate = (schedules, short) => {
20313
- var _a, _b;
20418
+ var _a2, _b2;
20314
20419
  if (!(schedules == null ? void 0 : schedules.length)) {
20315
20420
  return "";
20316
20421
  }
20317
- const date2 = (_a = schedules[0]) == null ? void 0 : _a.next_evaluation;
20318
- const timezone2 = (_b = schedules[0]) == null ? void 0 : _b.time_zone;
20422
+ const date2 = (_a2 = schedules[0]) == null ? void 0 : _a2.next_evaluation;
20423
+ const timezone2 = (_b2 = schedules[0]) == null ? void 0 : _b2.time_zone;
20319
20424
  const dateDayJS = dayjsWithPlugins_default(date2).tz(timezone2);
20320
20425
  if (short) {
20321
20426
  const today = dayjsWithPlugins_default().tz(timezone2).startOf("day");
@@ -20391,12 +20496,12 @@
20391
20496
  // src/HelperFns/dataGeneration.ts
20392
20497
  var import_lodash4 = __toESM(require_lodash());
20393
20498
  var getLabelFromRow = ({ row, index, columns, dataFormatting }) => {
20394
- var _a, _b;
20499
+ var _a2, _b2;
20395
20500
  const column = columns[index];
20396
20501
  let label;
20397
20502
  if (row) {
20398
20503
  if ((column == null ? void 0 : column.type) === "DATE" /* DATE */ || (column == null ? void 0 : column.type) === "DATE_STRING" /* DATE_STRING */) {
20399
- label = (_b = (_a = formatChartLabel({ d: row[index], column, dataFormatting })) == null ? void 0 : _a.fullWidthLabel) != null ? _b : row[index];
20504
+ label = (_b2 = (_a2 = formatChartLabel({ d: row[index], column, dataFormatting })) == null ? void 0 : _a2.fullWidthLabel) != null ? _b2 : row[index];
20400
20505
  } else {
20401
20506
  return row[index];
20402
20507
  }
@@ -20429,9 +20534,9 @@
20429
20534
  var aggregateRow = (row, datasetsToAggregate, columns) => {
20430
20535
  const newRow = [...row];
20431
20536
  Object.keys(datasetsToAggregate).forEach((index) => {
20432
- var _a;
20537
+ var _a2;
20433
20538
  const aggType = columns[index].aggType || DEFAULT_AGG_TYPE;
20434
- newRow[index] = (_a = AGG_TYPES[aggType]) == null ? void 0 : _a.fn(datasetsToAggregate[index]);
20539
+ newRow[index] = (_a2 = AGG_TYPES[aggType]) == null ? void 0 : _a2.fn(datasetsToAggregate[index]);
20435
20540
  });
20436
20541
  return newRow;
20437
20542
  };
@@ -20448,14 +20553,14 @@
20448
20553
  const clonedSortedData = (0, import_lodash4.default)(sortedData);
20449
20554
  const dataWithOther = [];
20450
20555
  clonedSortedData.forEach((row, i) => {
20451
- var _a;
20556
+ var _a2;
20452
20557
  if (i === maxElements) {
20453
20558
  dataWithOther[maxElements] = row;
20454
20559
  dataWithOther[maxElements][columnIndexConfig.stringColumnIndex] = "Other";
20455
20560
  dataWithOther[maxElements].isOther = true;
20456
20561
  dataWithOther[maxElements][columnIndexConfig.numberColumnIndex] = parseFloat(dataWithOther[maxElements][columnIndexConfig.numberColumnIndex]) || 0;
20457
20562
  } else if (i > maxElements) {
20458
- const value = parseFloat((_a = sortedData[i]) == null ? void 0 : _a[columnIndexConfig.numberColumnIndex]) || 0;
20563
+ const value = parseFloat((_a2 = sortedData[i]) == null ? void 0 : _a2[columnIndexConfig.numberColumnIndex]) || 0;
20459
20564
  dataWithOther[maxElements][columnIndexConfig.numberColumnIndex] += value;
20460
20565
  } else {
20461
20566
  dataWithOther[i] = row;
@@ -20637,7 +20742,7 @@
20637
20742
  Object.keys(uniqueValues0).length
20638
20743
  );
20639
20744
  tableData.forEach((row) => {
20640
- var _a;
20745
+ var _a2;
20641
20746
  const pivotCategoryIndex = uniqueValues0[row[newStringColumnIndex]];
20642
20747
  const pivotCategoryValue = row[newStringColumnIndex];
20643
20748
  pivotTableData[pivotCategoryIndex][0] = pivotCategoryValue;
@@ -20645,7 +20750,7 @@
20645
20750
  const pivotValue = Number(row[numberColumnIndex]);
20646
20751
  pivotTableData[pivotCategoryIndex][pivotColumnIndex] = pivotValue;
20647
20752
  pivotTableColumns[pivotColumnIndex].origValues[pivotCategoryValue] = {
20648
- name: (_a = columns[newStringColumnIndex]) == null ? void 0 : _a.name,
20753
+ name: (_a2 = columns[newStringColumnIndex]) == null ? void 0 : _a2.name,
20649
20754
  value: pivotCategoryValue
20650
20755
  };
20651
20756
  });
@@ -20800,17 +20905,17 @@
20800
20905
  }
20801
20906
  };
20802
20907
  var generatePivotData = (params = {}) => {
20803
- var _a;
20804
- if (((_a = params.columns) == null ? void 0 : _a.length) === 2) {
20908
+ var _a2;
20909
+ if (((_a2 = params.columns) == null ? void 0 : _a2.length) === 2) {
20805
20910
  return generateDatePivotData(params);
20806
20911
  } else {
20807
20912
  return generatePivotTableData(params);
20808
20913
  }
20809
20914
  };
20810
20915
  var generateFilterDrilldownResponse = ({ response, rows, index, value }) => {
20811
- var _a, _b;
20916
+ var _a2, _b2;
20812
20917
  try {
20813
- const data = rows != null ? rows : (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.rows;
20918
+ const data = rows != null ? rows : (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.rows;
20814
20919
  const filteredRows = data == null ? void 0 : data.filter((origRow) => {
20815
20920
  return `${origRow[index]}` === `${value}`;
20816
20921
  });
@@ -20980,10 +21085,10 @@
20980
21085
  return updateStartAndEndIndexes({ selectedSuggestions, plainTextList });
20981
21086
  };
20982
21087
  var initializeQueryValidationOptions = ({ responseBody, initialSelections, autoSelectSuggestion = true }) => {
20983
- var _a, _b;
21088
+ var _a2, _b2;
20984
21089
  try {
20985
- const replacements = (_a = responseBody == null ? void 0 : responseBody.data) == null ? void 0 : _a.replacements;
20986
- const query = (_b = responseBody == null ? void 0 : responseBody.data) == null ? void 0 : _b.query;
21090
+ const replacements = (_a2 = responseBody == null ? void 0 : responseBody.data) == null ? void 0 : _a2.replacements;
21091
+ const query = (_b2 = responseBody == null ? void 0 : responseBody.data) == null ? void 0 : _b2.query;
20987
21092
  if (!(replacements == null ? void 0 : replacements.length) || !query) {
20988
21093
  console.warn("Unable to construct validation suggestions - One or more of the following was not found:", {
20989
21094
  sortedReplacements: !!replacements,
@@ -21348,25 +21453,25 @@
21348
21453
  return value === null || value === void 0 || value === "";
21349
21454
  };
21350
21455
  var convertToFunctionStr = (origColumnFnArray) => {
21351
- var _a, _b;
21456
+ var _a2, _b2;
21352
21457
  try {
21353
21458
  let columnFnStr = "";
21354
- const numRightBrackets = (_a = origColumnFnArray.filter(
21459
+ const numRightBrackets = (_a2 = origColumnFnArray.filter(
21355
21460
  (chunk) => chunk.value === "RIGHT_BRACKET" /* RIGHT_BRACKET */
21356
- )) == null ? void 0 : _a.length;
21357
- const numLeftBrackets = (_b = origColumnFnArray.filter((chunk) => chunk.value === "LEFT_BRACKET" /* LEFT_BRACKET */)) == null ? void 0 : _b.length;
21461
+ )) == null ? void 0 : _a2.length;
21462
+ const numLeftBrackets = (_b2 = origColumnFnArray.filter((chunk) => chunk.value === "LEFT_BRACKET" /* LEFT_BRACKET */)) == null ? void 0 : _b2.length;
21358
21463
  if (numRightBrackets !== numLeftBrackets) {
21359
21464
  throw new ChataError("Syntax Error: Formula contains unclosed brackets");
21360
21465
  }
21361
21466
  origColumnFnArray.forEach((chunk, i) => {
21362
- var _a2, _b2, _c;
21467
+ var _a3, _b3, _c;
21363
21468
  if (chunk.type === "operator" /* OPERATOR */) {
21364
21469
  if (i === origColumnFnArray.length - 1) {
21365
21470
  if (chunk.value !== "RIGHT_BRACKET" /* RIGHT_BRACKET */) {
21366
21471
  throw new ChataError("Syntax Error: Formula can't end with an operator");
21367
21472
  }
21368
21473
  }
21369
- columnFnStr = columnFnStr + " " + ((_b2 = (_a2 = OPERATORS[chunk.value]) == null ? void 0 : _a2.js) != null ? _b2 : "");
21474
+ columnFnStr = columnFnStr + " " + ((_b3 = (_a3 = OPERATORS[chunk.value]) == null ? void 0 : _a3.js) != null ? _b3 : "");
21370
21475
  } else if (chunk.type === "number") {
21371
21476
  if (isValueEmpty(chunk.value)) {
21372
21477
  throw new ChataError("Syntax Error: Number input is empty");
@@ -21407,13 +21512,13 @@
21407
21512
  try {
21408
21513
  let fnSummary = "";
21409
21514
  columnFnArray.forEach((chunk, i) => {
21410
- var _a, _b;
21515
+ var _a2, _b2;
21411
21516
  if (chunk.type === "operator" /* OPERATOR */) {
21412
- fnSummary = `${fnSummary} ${(_a = OPERATORS[chunk.value]) == null ? void 0 : _a.js}`;
21517
+ fnSummary = `${fnSummary} ${(_a2 = OPERATORS[chunk.value]) == null ? void 0 : _a2.js}`;
21413
21518
  } else if (chunk.type === "number" /* NUMBER */) {
21414
21519
  fnSummary = `${fnSummary} ${chunk.value}`;
21415
21520
  } else if (chunk.type === "column" /* COLUMN */ && (chunk == null ? void 0 : chunk.column)) {
21416
- fnSummary = `${fnSummary} ${(_b = chunk.column) == null ? void 0 : _b.display_name}`;
21521
+ fnSummary = `${fnSummary} ${(_b2 = chunk.column) == null ? void 0 : _b2.display_name}`;
21417
21522
  }
21418
21523
  });
21419
21524
  return fnSummary;
@@ -21435,8 +21540,8 @@
21435
21540
  return getVisibleColumns(columns).filter((col) => isColumnDateType(col));
21436
21541
  };
21437
21542
  var getCleanColumnName = (colName) => {
21438
- var _a;
21439
- return (_a = colName.replace(/\b(sum|avg|min|max|count|distinct|stddev)\b\(([^()]+)\)/g, "$2")) == null ? void 0 : _a.trim();
21543
+ var _a2;
21544
+ return (_a2 = colName.replace(/\b(sum|avg|min|max|count|distinct|stddev)\b\(([^()]+)\)/g, "$2")) == null ? void 0 : _a2.trim();
21440
21545
  };
21441
21546
  var buildPlainColumnArrayFn = (columnName) => {
21442
21547
  try {
@@ -23911,8 +24016,8 @@
23911
24016
  var MAX_SCALE_RATIO = 0.9;
23912
24017
  var MIN_SCALE_RATIO = 0.1;
23913
24018
  var dataStructureChanged = (props, prevProps) => {
23914
- var _a, _b;
23915
- return ((_a = props.data) == null ? void 0 : _a.length) !== ((_b = prevProps.data) == null ? void 0 : _b.length) || props.stringColumnIndex !== prevProps.stringColumnIndex || props.numberColumnIndex !== prevProps.numberColumnIndex || !(0, import_lodash7.default)(props.legendColumn, prevProps.legendColumn) || !(0, import_lodash7.default)(props.columns, prevProps.columns) || !(0, import_lodash7.default)(props.numberColumnIndices, prevProps.numberColumnIndices) || !(0, import_lodash7.default)(props.stringColumnIndices, prevProps.stringColumnIndices) || props.type === "pie" && !(0, import_lodash7.default)(props.data, prevProps.data);
24019
+ var _a2, _b2;
24020
+ return ((_a2 = props.data) == null ? void 0 : _a2.length) !== ((_b2 = prevProps.data) == null ? void 0 : _b2.length) || props.stringColumnIndex !== prevProps.stringColumnIndex || props.numberColumnIndex !== prevProps.numberColumnIndex || !(0, import_lodash7.default)(props.legendColumn, prevProps.legendColumn) || !(0, import_lodash7.default)(props.columns, prevProps.columns) || !(0, import_lodash7.default)(props.numberColumnIndices, prevProps.numberColumnIndices) || !(0, import_lodash7.default)(props.stringColumnIndices, prevProps.stringColumnIndices) || props.type === "pie" && !(0, import_lodash7.default)(props.data, prevProps.data);
23916
24021
  };
23917
24022
  var onlySeriesVisibilityChanged = (props, prevProps) => {
23918
24023
  if ((0, import_lodash7.default)(props.columns, prevProps.columns)) {
@@ -23981,10 +24086,10 @@
23981
24086
  }
23982
24087
  };
23983
24088
  var transformLabels = (orient, axisElement, innerHeight, rotateLabels) => {
23984
- var _a;
24089
+ var _a2;
23985
24090
  select_default2(axisElement).selectAll(".tick text").attr("transform", getLabelTranslateValue(orient)).style("stroke-width", 0).style("stroke", "inherit").style("font-size", "inherit").style("font-weight", "inherit").style("font-family", "inherit");
23986
24091
  if (orient === "bottom" || orient === "top") {
23987
- const labelsAreRotated = (_a = shouldLabelsRotate(axisElement)) != null ? _a : rotateLabels;
24092
+ const labelsAreRotated = (_a2 = shouldLabelsRotate(axisElement)) != null ? _a2 : rotateLabels;
23988
24093
  if (labelsAreRotated) {
23989
24094
  if (orient === "bottom") {
23990
24095
  select_default2(axisElement).selectAll(".tick text").style("text-anchor", "end").attr("dominant-baseline", "text-top").attr("transform", `rotate(-45, 0, ${innerHeight}) translate(-10, 0)`);
@@ -24005,13 +24110,13 @@
24005
24110
  columnIndexConfig,
24006
24111
  activeKey
24007
24112
  }) => {
24008
- var _a, _b, _c, _d;
24113
+ var _a2, _b2, _c, _d;
24009
24114
  const { stringColumnIndex } = columnIndexConfig;
24010
24115
  const drilldownData = {};
24011
24116
  const groupBys = [];
24012
24117
  const column = columns[colIndex];
24013
- const stringColumn = ((_a = columns == null ? void 0 : columns[stringColumnIndex]) == null ? void 0 : _a.origColumn) || (columns == null ? void 0 : columns[stringColumnIndex]);
24014
- if ((_b = columns == null ? void 0 : columns[stringColumnIndex]) == null ? void 0 : _b.datePivot) {
24118
+ const stringColumn = ((_a2 = columns == null ? void 0 : columns[stringColumnIndex]) == null ? void 0 : _a2.origColumn) || (columns == null ? void 0 : columns[stringColumnIndex]);
24119
+ if ((_b2 = columns == null ? void 0 : columns[stringColumnIndex]) == null ? void 0 : _b2.datePivot) {
24015
24120
  const year = Number((_c = columns == null ? void 0 : columns[colIndex]) == null ? void 0 : _c.name);
24016
24121
  const month = row == null ? void 0 : row[stringColumnIndex];
24017
24122
  const value = `${(_d = pivotOriginalColumnData == null ? void 0 : pivotOriginalColumnData[year]) == null ? void 0 : _d[month]}`;
@@ -24064,7 +24169,7 @@
24064
24169
  dataFormatting,
24065
24170
  aggregated = true
24066
24171
  }) => {
24067
- var _a, _b;
24172
+ var _a2, _b2;
24068
24173
  let tooltipElement = null;
24069
24174
  try {
24070
24175
  let tooltipLine1 = "";
@@ -24078,7 +24183,7 @@
24078
24183
  if (column1) {
24079
24184
  let column1Title = column1.origColumn ? column1.origColumn.display_name : column1.display_name;
24080
24185
  if (aggregated) {
24081
- const aggTypeDisplayName = (_a = AGG_TYPES[column1.aggType]) == null ? void 0 : _a.displayName;
24186
+ const aggTypeDisplayName = (_a2 = AGG_TYPES[column1.aggType]) == null ? void 0 : _a2.displayName;
24082
24187
  if (aggTypeDisplayName) {
24083
24188
  column1Title = `${column1Title} (${aggTypeDisplayName})`;
24084
24189
  }
@@ -24092,7 +24197,7 @@
24092
24197
  tooltipLine2 = `<div><strong>${column1Title}:</strong> ${column1Value}</div>`;
24093
24198
  }
24094
24199
  if (column2) {
24095
- const stringTitle = (_b = column2.tooltipTitle) != null ? _b : column2.display_name;
24200
+ const stringTitle = (_b2 = column2.tooltipTitle) != null ? _b2 : column2.display_name;
24096
24201
  const stringValue = formatElement({
24097
24202
  element: row[colIndex2],
24098
24203
  column: column2,
@@ -24113,9 +24218,9 @@
24113
24218
  }
24114
24219
  };
24115
24220
  var getFilterDrilldown = ({ stringColumnIndex, row, json }) => {
24116
- var _a;
24221
+ var _a2;
24117
24222
  try {
24118
- const filteredRows = (_a = json.data.data.rows) == null ? void 0 : _a.filter((origRow) => {
24223
+ const filteredRows = (_a2 = json.data.data.rows) == null ? void 0 : _a2.filter((origRow) => {
24119
24224
  return `${origRow[stringColumnIndex]}` === `${row[stringColumnIndex]}`;
24120
24225
  });
24121
24226
  const drilldownResponse = (0, import_lodash8.default)(json);
@@ -24154,8 +24259,8 @@
24154
24259
  };
24155
24260
  };
24156
24261
  var getCombinedFilters = (newFilter, response, formattedTableParams) => {
24157
- var _a, _b, _c, _d;
24158
- const queryRequestData = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.fe_req;
24262
+ var _a2, _b2, _c, _d;
24263
+ const queryRequestData = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.fe_req;
24159
24264
  const queryFilters = (_c = queryRequestData == null ? void 0 : queryRequestData.filters) != null ? _c : [];
24160
24265
  const tableFilters = (_d = formattedTableParams == null ? void 0 : formattedTableParams.filters) != null ? _d : [];
24161
24266
  const allFilters = [];
@@ -24184,8 +24289,8 @@
24184
24289
  }
24185
24290
  }
24186
24291
  return allFilters.map((filter3) => {
24187
- var _a2, _b2, _c2;
24188
- const foundColumn = (_c2 = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.columns) == null ? void 0 : _c2.find((column) => column.name === filter3.name);
24292
+ var _a3, _b3, _c2;
24293
+ const foundColumn = (_c2 = (_b3 = (_a3 = response == null ? void 0 : response.data) == null ? void 0 : _a3.data) == null ? void 0 : _b3.columns) == null ? void 0 : _c2.find((column) => column.name === filter3.name);
24189
24294
  return {
24190
24295
  ...filter3,
24191
24296
  columnName: foundColumn == null ? void 0 : foundColumn.title
@@ -24236,11 +24341,11 @@
24236
24341
  }
24237
24342
  const allAggTypesSame = numberColumns.every((col) => col.aggType === numberColumns[0].aggType);
24238
24343
  const legendLabels = numberColumnIndices.map((columnIndex, i) => {
24239
- var _a;
24344
+ var _a2;
24240
24345
  const column = columns[columnIndex];
24241
24346
  let label = column.display_name;
24242
24347
  if (!allAggTypesSame) {
24243
- const aggTypeDisplayName = (_a = AGG_TYPES[column == null ? void 0 : column.aggType]) == null ? void 0 : _a.displayName;
24348
+ const aggTypeDisplayName = (_a2 = AGG_TYPES[column == null ? void 0 : column.aggType]) == null ? void 0 : _a2.displayName;
24244
24349
  if (aggTypeDisplayName) {
24245
24350
  label = `${label} (${aggTypeDisplayName})`;
24246
24351
  }
@@ -24312,14 +24417,14 @@
24312
24417
  data.forEach((row) => {
24313
24418
  const label = `${row[stringColumnIndex]}`;
24314
24419
  numberColumnIndices.forEach((colIndex) => {
24315
- var _a;
24420
+ var _a2;
24316
24421
  const rawValue = row[colIndex];
24317
24422
  let value = Number(rawValue);
24318
24423
  if (isNaN(value)) {
24319
24424
  value = 0;
24320
24425
  }
24321
24426
  const sumsObject = value >= 0 ? positiveSumsObject : negativeSumsObject;
24322
- const previousValue = (_a = sumsObject[label]) != null ? _a : 0;
24427
+ const previousValue = (_a2 = sumsObject[label]) != null ? _a2 : 0;
24323
24428
  sumsObject[label] = previousValue + value;
24324
24429
  });
24325
24430
  });
@@ -24347,8 +24452,8 @@
24347
24452
  return Object.keys(obj).length;
24348
24453
  };
24349
24454
  var getMaxValueFromKeyValueObj = (obj) => {
24350
- var _a;
24351
- const size = (_a = getObjSize(obj)) != null ? _a : 0;
24455
+ var _a2;
24456
+ const size = (_a2 = getObjSize(obj)) != null ? _a2 : 0;
24352
24457
  let maxValue = 0;
24353
24458
  if (size === 1) {
24354
24459
  maxValue = obj[Object.keys(obj)[0]];
@@ -24361,8 +24466,8 @@
24361
24466
  return maxValue;
24362
24467
  };
24363
24468
  var getMinValueFromKeyValueObj = (obj) => {
24364
- var _a;
24365
- const size = (_a = getObjSize(obj)) != null ? _a : 0;
24469
+ var _a2;
24470
+ const size = (_a2 = getObjSize(obj)) != null ? _a2 : 0;
24366
24471
  let minValue = 0;
24367
24472
  if (size === 1) {
24368
24473
  minValue = obj[Object.keys(obj)[0]];
@@ -24496,7 +24601,7 @@
24496
24601
  changeStringColumnIndices,
24497
24602
  originalColumns
24498
24603
  }) => {
24499
- var _a, _b, _c, _d;
24604
+ var _a2, _b2, _c, _d;
24500
24605
  let error = false;
24501
24606
  const config = getDataFormatting(dataFormatting);
24502
24607
  const dateArray = data.map((d) => {
@@ -24543,9 +24648,9 @@
24543
24648
  scale.dataFormatting = config;
24544
24649
  scale.column = columns[columnIndex];
24545
24650
  scale.columnIndex = columnIndex;
24546
- scale.title = (_a = scale.column) == null ? void 0 : _a.display_name;
24651
+ scale.title = (_a2 = scale.column) == null ? void 0 : _a2.display_name;
24547
24652
  scale.fields = axisColumns;
24548
- const candidateStringIndices = (_b = getStringColumnIndices(originalColumns != null ? originalColumns : columns)) == null ? void 0 : _b.stringColumnIndices;
24653
+ const candidateStringIndices = (_b2 = getStringColumnIndices(originalColumns != null ? originalColumns : columns)) == null ? void 0 : _b2.stringColumnIndices;
24549
24654
  scale.allFields = candidateStringIndices;
24550
24655
  const nonStringColumns = (columns || []).filter(
24551
24656
  (col) => (col == null ? void 0 : col.type) && !["STRING" /* STRING */, "DATE_STRING" /* DATE_STRING */, "DATE" /* DATE */].includes(col.type)
@@ -24563,8 +24668,8 @@
24563
24668
  scale.changeColumnIndices = changeStringColumnIndices;
24564
24669
  scale.tickSize = 0;
24565
24670
  scale.getValue = (value) => {
24566
- var _a2;
24567
- return scale((_a2 = getDayJSObj({ value, column: scale.column })) == null ? void 0 : _a2.toDate());
24671
+ var _a3;
24672
+ return scale((_a3 = getDayJSObj({ value, column: scale.column })) == null ? void 0 : _a3.toDate());
24568
24673
  };
24569
24674
  return scale;
24570
24675
  };
@@ -24586,7 +24691,7 @@
24586
24691
  changeStringColumnIndices,
24587
24692
  originalColumns
24588
24693
  }) => {
24589
- var _a, _b, _c, _d;
24694
+ var _a2, _b2, _c, _d;
24590
24695
  const colIndex = columnIndex != null ? columnIndex : stringColumnIndex;
24591
24696
  const range2 = getRangeForAxis({ axis: axis2, height, width });
24592
24697
  const scaleDomain = domain != null ? domain : data.map((d) => `${d[colIndex]}`);
@@ -24597,9 +24702,9 @@
24597
24702
  scale.dataFormatting = getDataFormatting(dataFormatting);
24598
24703
  scale.column = column != null ? column : columns[colIndex];
24599
24704
  scale.columnIndex = colIndex;
24600
- scale.title = (_a = scale.column) == null ? void 0 : _a.display_name;
24705
+ scale.title = (_a2 = scale.column) == null ? void 0 : _a2.display_name;
24601
24706
  scale.fields = axisColumns;
24602
- const candidateStringIndices = (_b = getStringColumnIndices(originalColumns != null ? originalColumns : columns)) == null ? void 0 : _b.stringColumnIndices;
24707
+ const candidateStringIndices = (_b2 = getStringColumnIndices(originalColumns != null ? originalColumns : columns)) == null ? void 0 : _b2.stringColumnIndices;
24603
24708
  scale.allFields = candidateStringIndices;
24604
24709
  scale.tickSize = scale.bandwidth();
24605
24710
  const nonStringColumns = (columns || []).filter(
@@ -24633,10 +24738,10 @@
24633
24738
  return ordinal().domain(values).range(colors);
24634
24739
  };
24635
24740
  var getColorScales = ({ numberColumnIndices, numberColumnIndices2, CSS_PREFIX, data, type }) => {
24636
- var _a;
24741
+ var _a2;
24637
24742
  const colorScales = { colorScale: void 0, colorScale2: void 0 };
24638
24743
  const { chartColors, chartColorsDark } = getChartColorVars(CSS_PREFIX);
24639
- const numSeries = (_a = numberColumnIndices == null ? void 0 : numberColumnIndices.length) != null ? _a : 1;
24744
+ const numSeries = (_a2 = numberColumnIndices == null ? void 0 : numberColumnIndices.length) != null ? _a2 : 1;
24640
24745
  const chartColors2 = rotateArray(chartColorsDark, -1 * numSeries);
24641
24746
  const legendUsesColumns = type !== "pie" /* PIE */;
24642
24747
  const domain = legendUsesColumns ? numberColumnIndices : data.map((d, i) => i);
@@ -24647,13 +24752,13 @@
24647
24752
  return colorScales;
24648
24753
  };
24649
24754
  var getUnitsForColumn = (column, useAgg = true) => {
24650
- var _a;
24755
+ var _a2;
24651
24756
  if (!column) {
24652
24757
  return;
24653
24758
  }
24654
24759
  let aggUnit;
24655
24760
  if (useAgg && column.aggType) {
24656
- aggUnit = (_a = AGG_TYPES[column == null ? void 0 : column.aggType]) == null ? void 0 : _a.unit;
24761
+ aggUnit = (_a2 = AGG_TYPES[column == null ? void 0 : column.aggType]) == null ? void 0 : _a2.unit;
24657
24762
  }
24658
24763
  switch (aggUnit) {
24659
24764
  case "none": {
@@ -24688,14 +24793,14 @@
24688
24793
  aggregated = false,
24689
24794
  isDataAggregated = false
24690
24795
  }) => {
24691
- var _a, _b, _c;
24796
+ var _a2, _b2, _c;
24692
24797
  let title = "Amount";
24693
24798
  try {
24694
24799
  if (!(numberColumns == null ? void 0 : numberColumns.length)) {
24695
24800
  return void 0;
24696
24801
  }
24697
24802
  if (isDataAggregated) {
24698
- const origColumn = (_b = (_a = numberColumns[0]) == null ? void 0 : _a.origColumn) != null ? _b : numberColumns[0];
24803
+ const origColumn = (_b2 = (_a2 = numberColumns[0]) == null ? void 0 : _a2.origColumn) != null ? _b2 : numberColumns[0];
24699
24804
  if (origColumn == null ? void 0 : origColumn.display_name) {
24700
24805
  title = origColumn.display_name;
24701
24806
  }
@@ -24748,7 +24853,7 @@
24748
24853
  changeNumberColumnIndices,
24749
24854
  originalColumns
24750
24855
  }) => {
24751
- var _a, _b;
24856
+ var _a2, _b2;
24752
24857
  const { amountOfNumberColumns } = getColumnTypeAmounts(originalColumns != null ? originalColumns : columns);
24753
24858
  const domain = [bins[0], bins[bins.length - 1]];
24754
24859
  const range2 = getRangeForAxis({ axis: axis2, height, width });
@@ -24759,7 +24864,7 @@
24759
24864
  scale.maxValue = domain[1];
24760
24865
  scale.column = columns[columnIndex];
24761
24866
  scale.fields = [columnIndex];
24762
- scale.allFields = (_a = getNumberColumnIndices(originalColumns != null ? originalColumns : columns)) == null ? void 0 : _a.allNumberColumnIndices;
24867
+ scale.allFields = (_a2 = getNumberColumnIndices(originalColumns != null ? originalColumns : columns)) == null ? void 0 : _a2.allNumberColumnIndices;
24763
24868
  scale.columnIndex = columnIndex;
24764
24869
  scale.dataFormatting = {
24765
24870
  ...getDataFormatting(dataFormatting),
@@ -24768,7 +24873,7 @@
24768
24873
  scale.hasDropdown = enableAxisDropdown && amountOfNumberColumns > 1;
24769
24874
  scale.stacked = false;
24770
24875
  scale.units = getUnitsForColumn(columns[columnIndex], false);
24771
- scale.title = (_b = columns[columnIndex]) == null ? void 0 : _b.display_name;
24876
+ scale.title = (_b2 = columns[columnIndex]) == null ? void 0 : _b2.display_name;
24772
24877
  scale.tickSize = (axis2 === "x" ? innerWidth : innerHeight) / buckets.length;
24773
24878
  scale.isScaled = false;
24774
24879
  scale.aggregated = false;
@@ -24803,17 +24908,17 @@
24803
24908
  aggregated,
24804
24909
  isDataAggregated
24805
24910
  }) => {
24806
- var _a, _b, _c;
24911
+ var _a2, _b2, _c;
24807
24912
  const maxBins = (buckets == null ? void 0 : buckets.length) ? max(buckets, (d) => {
24808
- var _a2;
24809
- return (_a2 = d == null ? void 0 : d.length) != null ? _a2 : 0;
24913
+ var _a3;
24914
+ return (_a3 = d == null ? void 0 : d.length) != null ? _a3 : 0;
24810
24915
  }) : 1;
24811
24916
  const range2 = getRangeForAxis({ axis: axis2, height, width });
24812
24917
  const domain = [0, maxBins];
24813
24918
  const units = "none";
24814
24919
  const allowMultipleSeries = false;
24815
- const candidateNumberIndices = (_a = getNumberColumnIndices(originalColumns != null ? originalColumns : columns)) == null ? void 0 : _a.allNumberColumnIndices;
24816
- const hasDropdown = enableAxisDropdown && ((_c = (_b = candidateNumberIndices == null ? void 0 : candidateNumberIndices.length) != null ? _b : columns == null ? void 0 : columns.length) != null ? _c : 0) > 1;
24920
+ const candidateNumberIndices = (_a2 = getNumberColumnIndices(originalColumns != null ? originalColumns : columns)) == null ? void 0 : _a2.allNumberColumnIndices;
24921
+ const hasDropdown = enableAxisDropdown && ((_c = (_b2 = candidateNumberIndices == null ? void 0 : candidateNumberIndices.length) != null ? _b2 : columns == null ? void 0 : columns.length) != null ? _c : 0) > 1;
24817
24922
  const disableAutoScale = true;
24818
24923
  const title = "Count";
24819
24924
  return getLinearScale({
@@ -24876,11 +24981,11 @@
24876
24981
  originalColumns,
24877
24982
  isDataAggregated
24878
24983
  }) => {
24879
- var _a, _b, _c, _d, _e, _f, _g;
24984
+ var _a2, _b2, _c, _d, _e, _f, _g;
24880
24985
  let domainFinal = domain;
24881
24986
  if (!domain) {
24882
- let min2 = (_a = minValue != null ? minValue : tickValues == null ? void 0 : tickValues[0]) != null ? _a : 0;
24883
- let max2 = (_b = maxValue != null ? maxValue : tickValues == null ? void 0 : tickValues[(tickValues == null ? void 0 : tickValues.length) - 1]) != null ? _b : 0;
24987
+ let min2 = (_a2 = minValue != null ? minValue : tickValues == null ? void 0 : tickValues[0]) != null ? _a2 : 0;
24988
+ let max2 = (_b2 = maxValue != null ? maxValue : tickValues == null ? void 0 : tickValues[(tickValues == null ? void 0 : tickValues.length) - 1]) != null ? _b2 : 0;
24884
24989
  if (adjustRange) {
24885
24990
  const { newMinValue, newMaxValue } = adjustMinAndMaxForScaleRatio(min2, max2, isScaled);
24886
24991
  if (newMinValue) min2 = newMinValue;
@@ -24959,7 +25064,7 @@
24959
25064
  colorScales,
24960
25065
  isDataAggregated
24961
25066
  }) => {
24962
- var _a, _b;
25067
+ var _a2, _b2;
24963
25068
  const commonParams = {
24964
25069
  stacked,
24965
25070
  isScaled,
@@ -25016,7 +25121,7 @@
25016
25121
  maxValue: maxValue2,
25017
25122
  disableAutoScale: disableAutoScale != null ? disableAutoScale : disableScale2,
25018
25123
  range: tempScale1.range(),
25019
- numTicks: (_b = (_a = tempScale1.tickLabels) == null ? void 0 : _a.length) != null ? _b : void 0,
25124
+ numTicks: (_b2 = (_a2 = tempScale1.tickLabels) == null ? void 0 : _a2.length) != null ? _b2 : void 0,
25020
25125
  ...scaleColumnConfig2,
25021
25126
  ...commonParams
25022
25127
  });
@@ -25082,7 +25187,7 @@
25082
25187
  return date2;
25083
25188
  };
25084
25189
  var getNiceDateTickValues = ({ tickValues, scale }) => {
25085
- var _a;
25190
+ var _a2;
25086
25191
  try {
25087
25192
  if ((tickValues == null ? void 0 : tickValues.length) < 2) {
25088
25193
  return tickValues;
@@ -25098,7 +25203,7 @@
25098
25203
  }
25099
25204
  const newTickValues = [...tickValues];
25100
25205
  const tickRange = getEpochFromDate(tickValues[1]) - getEpochFromDate(tickValues[0]);
25101
- const dayjsPrecision = DAYJS_PRECISION_FORMATS[(_a = scale == null ? void 0 : scale.column) == null ? void 0 : _a.precision];
25206
+ const dayjsPrecision = DAYJS_PRECISION_FORMATS[(_a2 = scale == null ? void 0 : scale.column) == null ? void 0 : _a2.precision];
25102
25207
  const minTickValue = getEpochFromDate(tickValues[0], dayjsPrecision, "start");
25103
25208
  const maxTickValue = getEpochFromDate(tickValues[tickValues.length - 1], dayjsPrecision, "end");
25104
25209
  if (!tickRange || isNaN(minTickValue) || isNaN(maxTickValue)) {
@@ -25162,9 +25267,9 @@
25162
25267
  innerPadding = DEFAULT_INNER_PADDING,
25163
25268
  outerPadding = DEFAULT_OUTER_PADDING
25164
25269
  }) => {
25165
- var _a, _b, _c, _d;
25270
+ var _a2, _b2, _c, _d;
25166
25271
  const fontSize = 12;
25167
- const rangeStart = (_b = (_a = scale == null ? void 0 : scale.range()) == null ? void 0 : _a[1]) != null ? _b : 0;
25272
+ const rangeStart = (_b2 = (_a2 = scale == null ? void 0 : scale.range()) == null ? void 0 : _a2[1]) != null ? _b2 : 0;
25168
25273
  const rangeEnd = (_d = (_c = scale == null ? void 0 : scale.range()) == null ? void 0 : _c[0]) != null ? _d : 0;
25169
25274
  const fullSize = Math.abs(rangeEnd - rangeStart) + fontSize;
25170
25275
  if (scale.type !== "BAND") {
@@ -25182,7 +25287,7 @@
25182
25287
  innerPadding = DEFAULT_INNER_PADDING,
25183
25288
  outerPadding = DEFAULT_OUTER_PADDING
25184
25289
  }) => {
25185
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
25290
+ var _a2, _b2, _c, _d, _e, _f, _g, _h, _i;
25186
25291
  try {
25187
25292
  let tickValues = scale.tickLabels;
25188
25293
  if (initialTicks) {
@@ -25191,7 +25296,7 @@
25191
25296
  tickValues = scale.ticks(numTicks);
25192
25297
  }
25193
25298
  if (scale.type === "LINEAR" || scale.type === "BIN") {
25194
- const domainRange = ((_c = (_b = scale == null ? void 0 : scale.maxValue) != null ? _b : (_a = scale == null ? void 0 : scale.domain) == null ? void 0 : _a[1]) != null ? _c : 0) - ((_f = (_e = scale == null ? void 0 : scale.minValue) != null ? _e : (_d = scale == null ? void 0 : scale.domain) == null ? void 0 : _d[0]) != null ? _f : 0);
25299
+ const domainRange = ((_c = (_b2 = scale == null ? void 0 : scale.maxValue) != null ? _b2 : (_a2 = scale == null ? void 0 : scale.domain) == null ? void 0 : _a2[1]) != null ? _c : 0) - ((_f = (_e = scale == null ? void 0 : scale.minValue) != null ? _e : (_d = scale == null ? void 0 : scale.domain) == null ? void 0 : _d[0]) != null ? _f : 0);
25195
25300
  if (domainRange >= 2 && tickValues.length > domainRange) {
25196
25301
  tickValues = scale.ticks(domainRange);
25197
25302
  }
@@ -25321,7 +25426,7 @@
25321
25426
  return rowNumberList;
25322
25427
  };
25323
25428
  var getAxisLabelsBbox = (axisElement) => {
25324
- var _a;
25429
+ var _a2;
25325
25430
  if (!axisElement) {
25326
25431
  return;
25327
25432
  }
@@ -25337,7 +25442,7 @@
25337
25442
  yDiff = (axisBoundingRect == null ? void 0 : axisBoundingRect.y) - (axisBBox == null ? void 0 : axisBBox.y);
25338
25443
  }
25339
25444
  const labelBboxes = [];
25340
- (_a = selectedElement.selectAll) == null ? void 0 : _a.call(selectedElement, "g.tick text").each(function() {
25445
+ (_a2 = selectedElement.selectAll) == null ? void 0 : _a2.call(selectedElement, "g.tick text").each(function() {
25341
25446
  const textBoundingRect = select_default2(this).node().getBoundingClientRect();
25342
25447
  labelBboxes.push({
25343
25448
  left: textBoundingRect.left - xDiff,
@@ -25357,23 +25462,23 @@
25357
25462
  return;
25358
25463
  };
25359
25464
  var getTotalLeftPadding = (legendPadding = {}) => {
25360
- var _a;
25361
- return ((_a = legendPadding.left) != null ? _a : DEFAULT_LEGEND_PADDING_LEFT) + LEGEND_BORDER_PADDING + LEGEND_BORDER_THICKNESS;
25465
+ var _a2;
25466
+ return ((_a2 = legendPadding.left) != null ? _a2 : DEFAULT_LEGEND_PADDING_LEFT) + LEGEND_BORDER_PADDING + LEGEND_BORDER_THICKNESS;
25362
25467
  };
25363
25468
  var getTotalRightPadding = (legendPadding = {}) => {
25364
- var _a;
25365
- return ((_a = legendPadding.right) != null ? _a : DEFAULT_LEGEND_PADDING_RIGHT) + LEGEND_BORDER_PADDING + LEGEND_BORDER_THICKNESS;
25469
+ var _a2;
25470
+ return ((_a2 = legendPadding.right) != null ? _a2 : DEFAULT_LEGEND_PADDING_RIGHT) + LEGEND_BORDER_PADDING + LEGEND_BORDER_THICKNESS;
25366
25471
  };
25367
25472
  var getTotalHorizontalPadding = (legendPadding = {}) => {
25368
25473
  return getTotalLeftPadding(legendPadding) + getTotalRightPadding(legendPadding);
25369
25474
  };
25370
25475
  var getTotalBottomPadding = (legendPadding = {}) => {
25371
- var _a;
25372
- return ((_a = legendPadding.bottom) != null ? _a : DEFAULT_LEGEND_PADDING_BOTTOM) + LEGEND_BORDER_PADDING + LEGEND_BORDER_THICKNESS;
25476
+ var _a2;
25477
+ return ((_a2 = legendPadding.bottom) != null ? _a2 : DEFAULT_LEGEND_PADDING_BOTTOM) + LEGEND_BORDER_PADDING + LEGEND_BORDER_THICKNESS;
25373
25478
  };
25374
25479
  var getTotalTopPadding = (legendPadding = {}) => {
25375
- var _a;
25376
- return ((_a = legendPadding.top) != null ? _a : DEFAULT_LEGEND_PADDING_TOP) + LEGEND_BORDER_PADDING + LEGEND_BORDER_THICKNESS;
25480
+ var _a2;
25481
+ return ((_a2 = legendPadding.top) != null ? _a2 : DEFAULT_LEGEND_PADDING_TOP) + LEGEND_BORDER_PADDING + LEGEND_BORDER_THICKNESS;
25377
25482
  };
25378
25483
  var getTotalVerticalPadding = (legendPadding = {}) => {
25379
25484
  return getTotalBottomPadding(legendPadding) + getTotalTopPadding(legendPadding);
@@ -25417,11 +25522,11 @@
25417
25522
  return totalPossibleSections;
25418
25523
  };
25419
25524
  var distributeListsEvenly = (list1Orig, list2Orig, numSections) => {
25420
- var _a, _b;
25525
+ var _a2, _b2;
25421
25526
  const list1 = (0, import_lodash8.default)(list1Orig);
25422
25527
  const list2 = (0, import_lodash8.default)(list2Orig);
25423
- const list1Size = (_a = list1 == null ? void 0 : list1.length) != null ? _a : 0;
25424
- const list2Size = (_b = list2 == null ? void 0 : list2.length) != null ? _b : 0;
25528
+ const list1Size = (_a2 = list1 == null ? void 0 : list1.length) != null ? _a2 : 0;
25529
+ const list2Size = (_b2 = list2 == null ? void 0 : list2.length) != null ? _b2 : 0;
25425
25530
  const totalSize = list1Size + list2Size;
25426
25531
  const list1Distribution = list1Size / totalSize;
25427
25532
  let list1NumSections = Math.round(list1Distribution * numSections);
@@ -25450,7 +25555,7 @@
25450
25555
  return sections;
25451
25556
  };
25452
25557
  var getlegendLabelSections = ({ orientation, outerWidth, hasSecondAxis, labels, labels2, legendPadding }) => {
25453
- var _a, _b;
25558
+ var _a2, _b2;
25454
25559
  const totalPossibleSections = getTotalPossibleLegendSections({
25455
25560
  orientation,
25456
25561
  outerWidth,
@@ -25458,8 +25563,8 @@
25458
25563
  legendPadding
25459
25564
  });
25460
25565
  let totalSections = totalPossibleSections;
25461
- const legendLabels1Size = (_a = labels == null ? void 0 : labels.length) != null ? _a : 0;
25462
- const legendLabels2Size = (_b = labels2 == null ? void 0 : labels2.length) != null ? _b : 0;
25566
+ const legendLabels1Size = (_a2 = labels == null ? void 0 : labels.length) != null ? _a2 : 0;
25567
+ const legendLabels2Size = (_b2 = labels2 == null ? void 0 : labels2.length) != null ? _b2 : 0;
25463
25568
  const totalLabels = legendLabels1Size + legendLabels2Size;
25464
25569
  if (totalLabels < totalPossibleSections) {
25465
25570
  totalSections = totalLabels;
@@ -25500,19 +25605,19 @@
25500
25605
  return titleBBox;
25501
25606
  };
25502
25607
  var removeHiddenLegendLabels = ({ legendElement, legendBorder, chartTooltipID }) => {
25503
- var _a, _b;
25608
+ var _a2, _b2;
25504
25609
  const legendContainerBBox = legendBorder == null ? void 0 : legendBorder.getBoundingClientRect();
25505
- const legendBottom = ((_a = legendContainerBBox == null ? void 0 : legendContainerBBox.y) != null ? _a : 0) + ((_b = legendContainerBBox == null ? void 0 : legendContainerBBox.height) != null ? _b : 0) - LEGEND_BORDER_PADDING;
25610
+ const legendBottom = ((_a2 = legendContainerBBox == null ? void 0 : legendContainerBBox.y) != null ? _a2 : 0) + ((_b2 = legendContainerBBox == null ? void 0 : legendContainerBBox.height) != null ? _b2 : 0) - LEGEND_BORDER_PADDING;
25506
25611
  let hasRemovedElement = false;
25507
25612
  let removedElementYBottom = void 0;
25508
25613
  let removedElementTransform = void 0;
25509
25614
  select_default2(legendElement).selectAll(".cell").each(function() {
25510
- var _a2, _b2, _c, _d;
25615
+ var _a3, _b3, _c, _d;
25511
25616
  if (hasRemovedElement) {
25512
25617
  select_default2(this).remove();
25513
25618
  } else {
25514
25619
  const cellBBox = this.getBoundingClientRect();
25515
- const cellBottom = ((_a2 = cellBBox == null ? void 0 : cellBBox.y) != null ? _a2 : 0) + ((_b2 = cellBBox == null ? void 0 : cellBBox.height) != null ? _b2 : 0) - 2;
25620
+ const cellBottom = ((_a3 = cellBBox == null ? void 0 : cellBBox.y) != null ? _a3 : 0) + ((_b3 = cellBBox == null ? void 0 : cellBBox.height) != null ? _b3 : 0) - 2;
25516
25621
  if (cellBottom > legendBottom) {
25517
25622
  const bbox = this.getBBox();
25518
25623
  removedElementYBottom = ((_c = bbox == null ? void 0 : bbox.y) != null ? _c : 0) + ((_d = bbox == null ? void 0 : bbox.height) != null ? _d : 0);
@@ -25531,8 +25636,8 @@
25531
25636
  var applyStylesForHiddenSeries = ({ legendElement, legendLabels }) => {
25532
25637
  try {
25533
25638
  select_default2(legendElement).selectAll(".cell").each(function() {
25534
- var _a, _b;
25535
- const cellData = JSON.parse((_b = (_a = select_default2(this)) == null ? void 0 : _a.data) == null ? void 0 : _b.call(_a));
25639
+ var _a2, _b2;
25640
+ const cellData = JSON.parse((_b2 = (_a2 = select_default2(this)) == null ? void 0 : _a2.data) == null ? void 0 : _b2.call(_a2));
25536
25641
  const legendLabel = legendLabels == null ? void 0 : legendLabels.find((l) => l.label === (cellData == null ? void 0 : cellData.label));
25537
25642
  if (legendLabel) {
25538
25643
  select_default2(this).select(".swatch").attr("stroke", legendLabel.color).attr("stroke-location", "outside");
@@ -25557,8 +25662,8 @@
25557
25662
  ...d,
25558
25663
  legendLabel: legendLabels == null ? void 0 : legendLabels[i]
25559
25664
  })).filter((d) => {
25560
- var _a;
25561
- return !((_a = d == null ? void 0 : d.legendLabel) == null ? void 0 : _a.hidden);
25665
+ var _a2;
25666
+ return !((_a2 = d == null ? void 0 : d.legendLabel) == null ? void 0 : _a2.hidden);
25562
25667
  })
25563
25668
  )
25564
25669
  );
@@ -25597,15 +25702,15 @@
25597
25702
  return initialBucketSize;
25598
25703
  };
25599
25704
  var getBinData = ({ newBucketSize, bucketConfig, data, numberColumnIndex }) => {
25600
- var _a, _b, _c, _d;
25705
+ var _a2, _b2, _c, _d;
25601
25706
  let minValue = min(data, (d) => convertToNumber(d[numberColumnIndex]));
25602
25707
  let maxValue = max(data, (d) => convertToNumber(d[numberColumnIndex]));
25603
25708
  if (minValue === maxValue) {
25604
25709
  minValue = minValue - 1;
25605
25710
  maxValue = maxValue + 1;
25606
25711
  }
25607
- const maxBucketSizeRaw = (maxValue - minValue) / ((_a = bucketConfig.minNumBuckets) != null ? _a : 1);
25608
- const minBucketSizeRaw = (maxValue - minValue) / ((_b = bucketConfig.maxNumBuckets) != null ? _b : 1);
25712
+ const maxBucketSizeRaw = (maxValue - minValue) / ((_a2 = bucketConfig.minNumBuckets) != null ? _a2 : 1);
25713
+ const minBucketSizeRaw = (maxValue - minValue) / ((_b2 = bucketConfig.maxNumBuckets) != null ? _b2 : 1);
25609
25714
  const bucketSizeRange = maxBucketSizeRaw - minBucketSizeRaw;
25610
25715
  if (bucketSizeRange <= 10) {
25611
25716
  const avgNumSteps = 100;
@@ -25821,7 +25926,7 @@
25821
25926
  innerHeight,
25822
25927
  maxLabelWidth
25823
25928
  } = {}) => {
25824
- var _a, _b;
25929
+ var _a2, _b2;
25825
25930
  if (!axis2 || !axis2.scale()) {
25826
25931
  return;
25827
25932
  }
@@ -25832,7 +25937,7 @@
25832
25937
  }
25833
25938
  return d;
25834
25939
  });
25835
- if ((_b = (_a = axis2.scale()) == null ? void 0 : _a.tickLabels) == null ? void 0 : _b.length) {
25940
+ if ((_b2 = (_a2 = axis2.scale()) == null ? void 0 : _a2.tickLabels) == null ? void 0 : _b2.length) {
25836
25941
  axis2.tickValues(axis2.scale().tickLabels);
25837
25942
  }
25838
25943
  setTickSize({ axis: axis2, innerWidth, innerHeight });
@@ -25908,7 +26013,7 @@
25908
26013
  deltaX,
25909
26014
  chartPadding = 0
25910
26015
  } = {}, CSS_PREFIX = DEFAULT_CSS_PREFIX) => {
25911
- var _a, _b, _c;
26016
+ var _a2, _b2, _c;
25912
26017
  if (!titleElement || !labelsBBox || !innerWidth || !outerWidth) {
25913
26018
  console.warn("Unable to adjust bottom title - one of the following were not provided", {
25914
26019
  titleElement: !!titleElement,
@@ -25918,7 +26023,7 @@
25918
26023
  });
25919
26024
  return;
25920
26025
  }
25921
- const labelBBoxBottom = ((_a = labelsBBox == null ? void 0 : labelsBBox.y) != null ? _a : 0) + ((_b = labelsBBox == null ? void 0 : labelsBBox.height) != null ? _b : 0);
26026
+ const labelBBoxBottom = ((_a2 = labelsBBox == null ? void 0 : labelsBBox.y) != null ? _a2 : 0) + ((_b2 = labelsBBox == null ? void 0 : labelsBBox.height) != null ? _b2 : 0);
25922
26027
  const xLabelX = innerWidth / 2;
25923
26028
  const xLabelY = labelBBoxBottom + AXIS_TITLE_PADDING_TOP;
25924
26029
  select_default2(titleElement).attr("x", xLabelX).attr("y", xLabelY);
@@ -25946,11 +26051,11 @@
25946
26051
  labelsBBox,
25947
26052
  innerWidth
25948
26053
  } = {}) => {
25949
- var _a;
26054
+ var _a2;
25950
26055
  if (!innerWidth || !labelsBBox) {
25951
26056
  return;
25952
26057
  }
25953
- const labelBBoxTop = (_a = labelsBBox == null ? void 0 : labelsBBox.y) != null ? _a : 0;
26058
+ const labelBBoxTop = (_a2 = labelsBBox == null ? void 0 : labelsBBox.y) != null ? _a2 : 0;
25954
26059
  const xLabelX = innerWidth / 2;
25955
26060
  const xLabelY = labelBBoxTop - AXIS_TITLE_PADDING_TOP;
25956
26061
  select_default2(titleElement).attr("x", xLabelX).attr("y", xLabelY);
@@ -25959,7 +26064,7 @@
25959
26064
  deltaY,
25960
26065
  chartPadding = 0
25961
26066
  } = {}, CSS_PREFIX = DEFAULT_CSS_PREFIX) => {
25962
- var _a;
26067
+ var _a2;
25963
26068
  if (deltaY === void 0 || !titleElement) {
25964
26069
  return;
25965
26070
  }
@@ -25967,7 +26072,7 @@
25967
26072
  const chartContainerHeight = outerHeight - 2 * chartPadding;
25968
26073
  textElement.attr("textLength", null);
25969
26074
  const yTitleBBox = titleElement.getBBox();
25970
- const yTitleHeight = ((_a = yTitleBBox.height) != null ? _a : 0) + 2 * AXIS_TITLE_BORDER_PADDING_LEFT;
26075
+ const yTitleHeight = ((_a2 = yTitleBBox.height) != null ? _a2 : 0) + 2 * AXIS_TITLE_BORDER_PADDING_LEFT;
25971
26076
  if (yTitleHeight > chartContainerHeight) {
25972
26077
  let textLength = Math.floor(chartContainerHeight) - 2 * AXIS_TITLE_BORDER_PADDING_LEFT;
25973
26078
  if (textLength < 0) {
@@ -25993,7 +26098,7 @@
25993
26098
 
25994
26099
  // src/Charts/chartElementArrays.ts
25995
26100
  var getHistogramColumnObj = ({ xScale, yScale, index, d, activeKey }) => {
25996
- var _a;
26101
+ var _a2;
25997
26102
  if (!d) {
25998
26103
  return null;
25999
26104
  }
@@ -26017,7 +26122,7 @@
26017
26122
  const drilldownData = {
26018
26123
  activeKey: key,
26019
26124
  filter: {
26020
- name: (_a = xScale == null ? void 0 : xScale.column) == null ? void 0 : _a.name,
26125
+ name: (_a2 = xScale == null ? void 0 : xScale.column) == null ? void 0 : _a2.name,
26021
26126
  value: `${d.x0},${d.x1}`,
26022
26127
  operator: "between" /* BETWEEN */,
26023
26128
  column_type: "AMOUNT"
@@ -26256,9 +26361,9 @@
26256
26361
  prevY,
26257
26362
  prevHeight = 0
26258
26363
  }) => {
26259
- var _a;
26364
+ var _a2;
26260
26365
  const { stringColumnIndex } = columnIndexConfig;
26261
- const color3 = (_a = yScale.colorScale) == null ? void 0 : _a.call(yScale, colIndex);
26366
+ const color3 = (_a2 = yScale.colorScale) == null ? void 0 : _a2.call(yScale, colIndex);
26262
26367
  const value = d[colIndex];
26263
26368
  if (!value) {
26264
26369
  return null;
@@ -26324,9 +26429,9 @@
26324
26429
  prevX,
26325
26430
  prevWidth = 0
26326
26431
  }) => {
26327
- var _a;
26432
+ var _a2;
26328
26433
  const { stringColumnIndex } = columnIndexConfig;
26329
- const color3 = (_a = xScale.colorScale) == null ? void 0 : _a.call(xScale, colIndex);
26434
+ const color3 = (_a2 = xScale.colorScale) == null ? void 0 : _a2.call(xScale, colIndex);
26330
26435
  const value = d[colIndex];
26331
26436
  if (!value) {
26332
26437
  return null;
@@ -26378,16 +26483,16 @@
26378
26483
  columns,
26379
26484
  hasSecondAxis
26380
26485
  }) => {
26381
- var _a, _b, _c;
26486
+ var _a2, _b2, _c;
26382
26487
  if (isDataAggregated) {
26383
- return (_a = legendColumn == null ? void 0 : legendColumn.display_name) != null ? _a : "Legend";
26488
+ return (_a2 = legendColumn == null ? void 0 : legendColumn.display_name) != null ? _a2 : "Legend";
26384
26489
  }
26385
26490
  let title = "Fields";
26386
26491
  const legendColumns = columnIndices.map((index) => columns[index]);
26387
26492
  const columnTypeArray = columnIndices.map((index) => columns[index].type);
26388
26493
  const allTypesEqual = !columnTypeArray.find((type) => type !== columnTypeArray[0]);
26389
26494
  if (hasSecondAxis && allTypesEqual) {
26390
- const columnTypeName = (_b = COLUMN_TYPES[columnTypeArray[0]]) == null ? void 0 : _b.description;
26495
+ const columnTypeName = (_b2 = COLUMN_TYPES[columnTypeArray[0]]) == null ? void 0 : _b2.description;
26391
26496
  if (columnTypeName) {
26392
26497
  title = `${columnTypeName} ${title}`;
26393
26498
  }
@@ -29989,8 +30094,8 @@
29989
30094
  }
29990
30095
  };
29991
30096
  var factory = (env) => {
29992
- var _a;
29993
- const globalObject = (_a = utils_default.global) != null ? _a : globalThis;
30097
+ var _a2;
30098
+ const globalObject = (_a2 = utils_default.global) != null ? _a2 : globalThis;
29994
30099
  const { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = globalObject;
29995
30100
  env = utils_default.merge.call(
29996
30101
  {
@@ -30928,9 +31033,9 @@
30928
31033
  clickedFilter,
30929
31034
  ...args
30930
31035
  }) => {
30931
- var _a, _b;
31036
+ var _a2, _b2;
30932
31037
  try {
30933
- const queryRequestData = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.fe_req;
31038
+ const queryRequestData = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.fe_req;
30934
31039
  const allFilters = getCombinedFilters(clickedFilter, response, formattedTableParams);
30935
31040
  const queryParams = {
30936
31041
  ...authentication,
@@ -30963,9 +31068,9 @@
30963
31068
  };
30964
31069
  };
30965
31070
  var transformQueryResponse = (response, originalQueryID, isDrilldown2 = false, newColumns) => {
30966
- var _a, _b;
31071
+ var _a2, _b2;
30967
31072
  const transformedResponse = (0, import_lodash9.default)(response);
30968
- if ((_b = (_a = transformedResponse == null ? void 0 : transformedResponse.data) == null ? void 0 : _a.data) == null ? void 0 : _b.columns) {
31073
+ if ((_b2 = (_a2 = transformedResponse == null ? void 0 : transformedResponse.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.columns) {
30969
31074
  const transformedColumns = transformQueryResponseColumns(transformedResponse, newColumns);
30970
31075
  if (transformedColumns) {
30971
31076
  transformedResponse.data.data.columns = transformedColumns;
@@ -30981,21 +31086,21 @@
30981
31086
  return transformedResponse;
30982
31087
  };
30983
31088
  var transformQueryResponseColumns = (response, addedColumns) => {
30984
- var _a, _b;
30985
- const columns = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.columns;
31089
+ var _a2, _b2;
31090
+ const columns = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.columns;
30986
31091
  if (!(columns == null ? void 0 : columns.length)) {
30987
31092
  return columns;
30988
31093
  }
30989
31094
  const isSingleValue = isSingleValueResponse(response);
30990
31095
  const transformedColumns = columns.map((col, i) => {
30991
- var _a2, _b2, _c, _d;
30992
- const dataSample = (_d = (_c = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.rows) == null ? void 0 : _c.find((row) => row[i])) == null ? void 0 : _d[i];
31096
+ var _a3, _b3, _c, _d;
31097
+ const dataSample = (_d = (_c = (_b3 = (_a3 = response == null ? void 0 : response.data) == null ? void 0 : _a3.data) == null ? void 0 : _b3.rows) == null ? void 0 : _c.find((row) => row[i])) == null ? void 0 : _d[i];
30993
31098
  const drilldownGroupby = getDrilldownGroupby(response, col);
30994
31099
  let additional = false;
30995
31100
  let is_timestamp = false;
30996
31101
  if (addedColumns == null ? void 0 : addedColumns.find((select) => {
30997
- var _a3;
30998
- return select.columns.includes((_a3 = col.alt_name) != null ? _a3 : col.name);
31102
+ var _a4;
31103
+ return select.columns.includes((_a4 = col.alt_name) != null ? _a4 : col.name);
30999
31104
  })) {
31000
31105
  additional = true;
31001
31106
  }
@@ -31024,14 +31129,14 @@
31024
31129
  return { data: { message } };
31025
31130
  };
31026
31131
  var formatErrorResponse = (error) => {
31027
- var _a, _b, _c;
31132
+ var _a2, _b2, _c;
31028
31133
  if ((error == null ? void 0 : error.message) === REQUEST_CANCELLED_ERROR) {
31029
31134
  return Promise.reject(createErrorMessage(REQUEST_CANCELLED_ERROR));
31030
31135
  }
31031
31136
  if ((error == null ? void 0 : error.message) === "Parse error" /* PARSE_ERROR */) {
31032
31137
  return Promise.reject(createErrorMessage(GENERAL_QUERY_ERROR));
31033
31138
  }
31034
- if ((_b = (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) {
31139
+ if ((_b2 = (_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.message) {
31035
31140
  return Promise.reject(error == null ? void 0 : error.response);
31036
31141
  }
31037
31142
  const errorStatus = (_c = error == null ? void 0 : error.response) == null ? void 0 : _c.status;
@@ -31055,11 +31160,11 @@
31055
31160
  }
31056
31161
  const finalUserSelection = [];
31057
31162
  userSelection.forEach((suggestion) => {
31058
- var _a, _b, _c;
31163
+ var _a2, _b2, _c;
31059
31164
  if (!suggestion.hidden) {
31060
31165
  finalUserSelection.push({
31061
- start: (_a = suggestion.start) != null ? _a : 0,
31062
- end: (_b = suggestion.end) != null ? _b : 0,
31166
+ start: (_a2 = suggestion.start) != null ? _a2 : 0,
31167
+ end: (_b2 = suggestion.end) != null ? _b2 : 0,
31063
31168
  value: (_c = suggestion.text || suggestion.value || suggestion.format_txt) == null ? void 0 : _c.toLowerCase(),
31064
31169
  value_label: suggestion.value_label || suggestion.show_message || suggestion.display_name || "ORIGINAL_TEXT",
31065
31170
  canonical: suggestion.canonical || suggestion.key || "ORIGINAL_TEXT"
@@ -31090,8 +31195,8 @@
31090
31195
  return timeZone;
31091
31196
  };
31092
31197
  var failedValidation = (response) => {
31093
- var _a, _b, _c;
31094
- return ((_c = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.replacements) == null ? void 0 : _c.length) > 0;
31198
+ var _a2, _b2, _c;
31199
+ return ((_c = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.replacements) == null ? void 0 : _c.length) > 0;
31095
31200
  };
31096
31201
  var fetchSuggestions = ({
31097
31202
  query,
@@ -31150,14 +31255,14 @@
31150
31255
  cancelToken
31151
31256
  );
31152
31257
  return axios_default.post(url2, data, config).then((response) => {
31153
- var _a, _b;
31258
+ var _a2, _b2;
31154
31259
  if (response.data && typeof response.data === "string") {
31155
31260
  throw new Error("Parse error" /* PARSE_ERROR */);
31156
31261
  }
31157
- if ((_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) {
31262
+ if ((_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) {
31158
31263
  response.data.data.page = page;
31159
31264
  }
31160
- return Promise.resolve((_b = response == null ? void 0 : response.data) == null ? void 0 : _b.data);
31265
+ return Promise.resolve((_b2 = response == null ? void 0 : response.data) == null ? void 0 : _b2.data);
31161
31266
  }).catch((error) => formatErrorResponse(error));
31162
31267
  };
31163
31268
  var runQueryOnly = ({
@@ -31219,14 +31324,14 @@
31219
31324
  cancelToken
31220
31325
  );
31221
31326
  return axios_default.post(url2, data, config).then((response) => {
31222
- var _a;
31223
- if (!((_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data)) {
31327
+ var _a2;
31328
+ if (!((_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data)) {
31224
31329
  throw new Error("Parse error" /* PARSE_ERROR */);
31225
31330
  }
31226
31331
  return Promise.resolve(transformQueryResponse(response, void 0, void 0, newColumns));
31227
31332
  }).catch((error) => {
31228
- var _a, _b, _c, _d, _e;
31229
- const referenceId = (_b = (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.reference_id;
31333
+ var _a2, _b2, _c, _d, _e;
31334
+ const referenceId = (_b2 = (_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.reference_id;
31230
31335
  const isSubquery = (tableFilters == null ? void 0 : tableFilters.length) || (orders == null ? void 0 : orders.length);
31231
31336
  const needsSuggestions = referenceId === "1.1.430" || referenceId === "1.1.431" || isError500Type(referenceId);
31232
31337
  if (needsSuggestions && allowSuggestions && !isSubquery) {
@@ -31372,14 +31477,14 @@
31372
31477
  }
31373
31478
  };
31374
31479
  return axios_default.get(url2, config).then((response) => {
31375
- var _a;
31376
- if (!((_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data)) {
31480
+ var _a2;
31481
+ if (!((_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data)) {
31377
31482
  throw new Error("Parse error" /* PARSE_ERROR */);
31378
31483
  }
31379
31484
  return Promise.resolve(transformQueryResponse(response, void 0, void 0, newColumns));
31380
31485
  }).catch((error) => {
31381
- var _a, _b, _c, _d, _e;
31382
- const referenceId = (_b = (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.reference_id;
31486
+ var _a2, _b2, _c, _d, _e;
31487
+ const referenceId = (_b2 = (_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.reference_id;
31383
31488
  const isSubquery = (tableFilters == null ? void 0 : tableFilters.length) || (orders == null ? void 0 : orders.length);
31384
31489
  const needsSuggestions = referenceId === "1.1.430" || referenceId === "1.1.431" || isError500Type(referenceId);
31385
31490
  if (needsSuggestions && allowSuggestions && !isSubquery) {
@@ -31439,14 +31544,14 @@
31439
31544
  };
31440
31545
  const finalConfig = axiosUtils_default(config, cancelToken);
31441
31546
  return axios_default.post(url2, data, finalConfig).then((response) => {
31442
- var _a;
31443
- if (!((_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data)) {
31547
+ var _a2;
31548
+ if (!((_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data)) {
31444
31549
  throw new Error("Parse error" /* PARSE_ERROR */);
31445
31550
  }
31446
31551
  return Promise.resolve(transformQueryResponse(response, void 0, void 0, newColumns));
31447
31552
  }).catch((error) => {
31448
- var _a, _b, _c, _d, _e;
31449
- const referenceId = (_b = (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.reference_id;
31553
+ var _a2, _b2, _c, _d, _e;
31554
+ const referenceId = (_b2 = (_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.reference_id;
31450
31555
  const isSubquery = (tableFilters == null ? void 0 : tableFilters.length) || (orders == null ? void 0 : orders.length);
31451
31556
  const needsSuggestions = referenceId === "1.1.430" || referenceId === "1.1.431" || isError500Type(referenceId);
31452
31557
  if (needsSuggestions && allowSuggestions && !isSubquery) {
@@ -31461,12 +31566,18 @@
31461
31566
  domain,
31462
31567
  apiKey,
31463
31568
  token,
31569
+ filters,
31570
+ tableFilters,
31464
31571
  csvProgressCallback
31465
31572
  } = {}) => {
31466
31573
  if (!token || !domain || !apiKey) {
31467
31574
  return Promise.reject(new Error("Unauthenticated" /* UNAUTHENTICATED */));
31468
31575
  }
31469
31576
  const url2 = `${domain}/autoql/api/v1/query/${queryId}/export?key=${apiKey}`;
31577
+ const data = {
31578
+ session_filter_locks: filters,
31579
+ filters: tableFilters
31580
+ };
31470
31581
  const config = {
31471
31582
  headers: {
31472
31583
  Authorization: `Bearer ${token}`
@@ -31479,7 +31590,7 @@
31479
31590
  }
31480
31591
  }
31481
31592
  };
31482
- return axios_default.post(url2, {}, config).then((response) => Promise.resolve(response)).catch((error) => Promise.reject(error == null ? void 0 : error.response));
31593
+ return axios_default.post(url2, data, config).then((response) => Promise.resolve(response)).catch((error) => Promise.reject(error == null ? void 0 : error.response));
31483
31594
  };
31484
31595
  var runDrilldown = ({
31485
31596
  queryID,
@@ -31544,8 +31655,8 @@
31544
31655
  }
31545
31656
  };
31546
31657
  return axios_default.get(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
31547
- var _a;
31548
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31658
+ var _a2;
31659
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31549
31660
  });
31550
31661
  };
31551
31662
  var fetchAutocomplete = ({
@@ -31554,8 +31665,8 @@
31554
31665
  apiKey,
31555
31666
  token
31556
31667
  } = {}) => {
31557
- var _a;
31558
- if (!suggestion || !((_a = suggestion.trim) == null ? void 0 : _a.call(suggestion))) {
31668
+ var _a2;
31669
+ if (!suggestion || !((_a2 = suggestion.trim) == null ? void 0 : _a2.call(suggestion))) {
31559
31670
  return Promise.reject(new Error("No query supplied" /* NO_QUERY_SUPPLIED */));
31560
31671
  }
31561
31672
  if (!domain || !apiKey || !token) {
@@ -31568,8 +31679,8 @@
31568
31679
  }
31569
31680
  };
31570
31681
  return axios_default.get(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
31571
- var _a2;
31572
- return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31682
+ var _a3;
31683
+ return Promise.reject((_a3 = error == null ? void 0 : error.response) == null ? void 0 : _a3.data);
31573
31684
  });
31574
31685
  };
31575
31686
  var fetchVLAutocomplete = ({
@@ -31581,11 +31692,11 @@
31581
31692
  filter: filter3,
31582
31693
  cancelToken
31583
31694
  } = {}) => {
31584
- var _a, _b;
31695
+ var _a2, _b2;
31585
31696
  if (!domain || !apiKey || !token) {
31586
31697
  return Promise.reject(new Error("Unauthenticated" /* UNAUTHENTICATED */));
31587
31698
  }
31588
- const text = (_b = (_a = suggestion == null ? void 0 : suggestion.trim) == null ? void 0 : _a.call(suggestion)) != null ? _b : "";
31699
+ const text = (_b2 = (_a2 = suggestion == null ? void 0 : suggestion.trim) == null ? void 0 : _a2.call(suggestion)) != null ? _b2 : "";
31589
31700
  if (!text && !filter3) {
31590
31701
  return Promise.reject(
31591
31702
  new Error(
@@ -31609,13 +31720,13 @@
31609
31720
  cancelToken
31610
31721
  );
31611
31722
  return axios_default.get(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
31612
- var _a2;
31723
+ var _a3;
31613
31724
  if ((error == null ? void 0 : error.message) === REQUEST_CANCELLED_ERROR) {
31614
31725
  return Promise.reject({
31615
31726
  data: { message: REQUEST_CANCELLED_ERROR }
31616
31727
  });
31617
31728
  }
31618
- return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31729
+ return Promise.reject((_a3 = error == null ? void 0 : error.response) == null ? void 0 : _a3.data);
31619
31730
  });
31620
31731
  };
31621
31732
  var fetchFilters = ({
@@ -31633,8 +31744,8 @@
31633
31744
  }
31634
31745
  };
31635
31746
  return axios_default.get(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
31636
- var _a;
31637
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31747
+ var _a2;
31748
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31638
31749
  });
31639
31750
  };
31640
31751
  var setFilters = ({
@@ -31657,8 +31768,8 @@
31657
31768
  };
31658
31769
  const data = { columns: filters };
31659
31770
  return axios_default.put(url2, data, config).then((response) => Promise.resolve(response)).catch((error) => {
31660
- var _a;
31661
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31771
+ var _a2;
31772
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31662
31773
  });
31663
31774
  };
31664
31775
  var unsetFilterFromAPI = ({
@@ -31677,8 +31788,8 @@
31677
31788
  }
31678
31789
  };
31679
31790
  return axios_default.delete(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
31680
- var _a;
31681
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31791
+ var _a2;
31792
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31682
31793
  });
31683
31794
  };
31684
31795
  var setColumnVisibility = ({
@@ -31698,8 +31809,8 @@
31698
31809
  }
31699
31810
  };
31700
31811
  return axios_default.put(url2, data, config).then((response) => Promise.resolve(response)).catch((error) => {
31701
- var _a;
31702
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31812
+ var _a2;
31813
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31703
31814
  });
31704
31815
  };
31705
31816
  var sendSuggestion = ({
@@ -31720,8 +31831,8 @@
31720
31831
  }
31721
31832
  };
31722
31833
  return axios_default.put(url2, data, config).then((response) => Promise.resolve(response)).catch((error) => {
31723
- var _a;
31724
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31834
+ var _a2;
31835
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31725
31836
  });
31726
31837
  };
31727
31838
  var fetchExploreQueries = ({
@@ -31752,24 +31863,24 @@
31752
31863
  apiKey,
31753
31864
  token
31754
31865
  }).then((queryValidationResponse) => {
31755
- var _a, _b, _c;
31756
- if (((_c = (_b = (_a = queryValidationResponse == null ? void 0 : queryValidationResponse.data) == null ? void 0 : _a.data) == null ? void 0 : _b.replacements) == null ? void 0 : _c.length) > 0) {
31866
+ var _a2, _b2, _c;
31867
+ if (((_c = (_b2 = (_a2 = queryValidationResponse == null ? void 0 : queryValidationResponse.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.replacements) == null ? void 0 : _c.length) > 0) {
31757
31868
  return Promise.resolve(queryValidationResponse);
31758
31869
  }
31759
31870
  return axios_default.get(exploreQueriesUrl, config).then((response) => Promise.resolve(response)).catch((error) => {
31760
- var _a2;
31761
- return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31871
+ var _a3;
31872
+ return Promise.reject((_a3 = error == null ? void 0 : error.response) == null ? void 0 : _a3.data);
31762
31873
  });
31763
31874
  }).catch(() => {
31764
31875
  return axios_default.get(exploreQueriesUrl, config).then((response) => Promise.resolve(response)).catch((error) => {
31765
- var _a;
31766
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31876
+ var _a2;
31877
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31767
31878
  });
31768
31879
  });
31769
31880
  }
31770
31881
  return axios_default.get(exploreQueriesUrl, config).then((response) => Promise.resolve(response)).catch((error) => {
31771
- var _a;
31772
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31882
+ var _a2;
31883
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31773
31884
  });
31774
31885
  };
31775
31886
  var reportProblem = ({
@@ -31797,8 +31908,8 @@
31797
31908
  message
31798
31909
  };
31799
31910
  return axios_default.put(url2, data, config).then((response) => Promise.resolve(response)).catch((error) => {
31800
- var _a;
31801
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31911
+ var _a2;
31912
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31802
31913
  });
31803
31914
  };
31804
31915
  var fetchLLMSummary = ({
@@ -31821,8 +31932,8 @@
31821
31932
  }
31822
31933
  };
31823
31934
  return axios_default.post(url2, data, config).then((response) => Promise.resolve(response)).catch((error) => {
31824
- var _a;
31825
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31935
+ var _a2;
31936
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31826
31937
  });
31827
31938
  };
31828
31939
  var fetchLLMSummaryQuote = ({
@@ -31845,8 +31956,8 @@
31845
31956
  }
31846
31957
  };
31847
31958
  return axios_default.post(url2, data, config).then((response) => Promise.resolve(response)).catch((error) => {
31848
- var _a;
31849
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31959
+ var _a2;
31960
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31850
31961
  });
31851
31962
  };
31852
31963
  var fetchLLMSummaryEstimate = ({
@@ -31869,8 +31980,8 @@
31869
31980
  }
31870
31981
  };
31871
31982
  return axios_default.post(url2, data, config).then((response) => Promise.resolve(response)).catch((error) => {
31872
- var _a;
31873
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31983
+ var _a2;
31984
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31874
31985
  });
31875
31986
  };
31876
31987
 
@@ -31896,9 +32007,9 @@
31896
32007
  }
31897
32008
  let queryText = query;
31898
32009
  valueArray.forEach((valueKey) => {
31899
- var _a;
32010
+ var _a2;
31900
32011
  const chunk = values[valueKey];
31901
- const replacementText = (_a = chunk == null ? void 0 : chunk.replacement) == null ? void 0 : _a.format_txt;
32012
+ const replacementText = (_a2 = chunk == null ? void 0 : chunk.replacement) == null ? void 0 : _a2.format_txt;
31902
32013
  const pattern = `\\b${valueKey}\\b`;
31903
32014
  const valueKeyRegex = compileSafeRegex(pattern);
31904
32015
  if (replacementText) {
@@ -31918,19 +32029,19 @@
31918
32029
  var fetchTopicsForVL = () => {
31919
32030
  };
31920
32031
  var getQueryRequestParams = (chunk, values) => {
31921
- var _a, _b;
32032
+ var _a2, _b2;
31922
32033
  if (!chunk) {
31923
32034
  return;
31924
32035
  }
31925
32036
  const sampleQueryText = getSampleQueryText(chunk.initialQuery, values);
31926
32037
  const userSelection = [];
31927
- if ((_a = Object.keys(values)) == null ? void 0 : _a.length) {
31928
- (_b = Object.keys(values)) == null ? void 0 : _b.forEach((key) => {
31929
- var _a2, _b2, _c, _d;
32038
+ if ((_a2 = Object.keys(values)) == null ? void 0 : _a2.length) {
32039
+ (_b2 = Object.keys(values)) == null ? void 0 : _b2.forEach((key) => {
32040
+ var _a3, _b3, _c, _d;
31930
32041
  const value = values[key];
31931
32042
  if (value.type === "VL" /* SAMPLE_QUERY_VL_TYPE */ && value.replacement) {
31932
- const replacedValue = (_a2 = value.replacement) == null ? void 0 : _a2.format_txt;
31933
- const start = (_b2 = sampleQueryText.indexOf(replacedValue)) != null ? _b2 : 0;
32043
+ const replacedValue = (_a3 = value.replacement) == null ? void 0 : _a3.format_txt;
32044
+ const start = (_b3 = sampleQueryText.indexOf(replacedValue)) != null ? _b3 : 0;
31934
32045
  if (start > -1) {
31935
32046
  const end = start + ((_d = (_c = value == null ? void 0 : value.value) == null ? void 0 : _c.length) != null ? _d : 0);
31936
32047
  userSelection.push({
@@ -31966,17 +32077,17 @@
31966
32077
  return newSuggestions;
31967
32078
  };
31968
32079
  var transformSampleQueryValues = (originalValues = {}) => {
31969
- var _a;
32080
+ var _a2;
31970
32081
  const newValues = {};
31971
- if ((_a = Object.keys(originalValues)) == null ? void 0 : _a.length) {
32082
+ if ((_a2 = Object.keys(originalValues)) == null ? void 0 : _a2.length) {
31972
32083
  Object.keys(originalValues).forEach((key) => {
31973
- var _a2;
32084
+ var _a3;
31974
32085
  if (!key) {
31975
32086
  return;
31976
32087
  }
31977
32088
  newValues[key] = {
31978
32089
  replacement: originalValues[key],
31979
- value: (_a2 = originalValues[key]) == null ? void 0 : _a2.format_txt,
32090
+ value: (_a3 = originalValues[key]) == null ? void 0 : _a3.format_txt,
31980
32091
  type: getSampleQueryReplacementType(key, originalValues[key])
31981
32092
  };
31982
32093
  });
@@ -31998,7 +32109,7 @@
31998
32109
  }
31999
32110
  };
32000
32111
  var getSampleQueryChunks = (query, values = {}) => {
32001
- var _a, _b;
32112
+ var _a2, _b2;
32002
32113
  try {
32003
32114
  const valueArray = Object.keys(values);
32004
32115
  if (!(valueArray == null ? void 0 : valueArray.length)) {
@@ -32033,7 +32144,7 @@
32033
32144
  let matchedText = "";
32034
32145
  if (re2) {
32035
32146
  match = re2.exec(remaining);
32036
- matchedText = (_a = match == null ? void 0 : match[0]) != null ? _a : "";
32147
+ matchedText = (_a2 = match == null ? void 0 : match[0]) != null ? _a2 : "";
32037
32148
  } else if (isSimpleLiteral(value)) {
32038
32149
  const idx = remaining.toLowerCase().indexOf(String(value).toLowerCase());
32039
32150
  if (idx >= 0) {
@@ -32043,7 +32154,7 @@
32043
32154
  }
32044
32155
  }
32045
32156
  if (match) {
32046
- const matchIndex = (_b = match.index) != null ? _b : 0;
32157
+ const matchIndex = (_b2 = match.index) != null ? _b2 : 0;
32047
32158
  result.push(remaining.substring(0, matchIndex), matchedText || match[0]);
32048
32159
  remaining = remaining.substring(matchIndex + (matchedText || match[0]).length);
32049
32160
  }
@@ -32053,14 +32164,14 @@
32053
32164
  }
32054
32165
  const chunkedSuggestion = [];
32055
32166
  splitStrArray.forEach((key) => {
32056
- var _a2, _b2;
32057
- const replacement = (_a2 = values[key]) == null ? void 0 : _a2.replacement;
32167
+ var _a3, _b3;
32168
+ const replacement = (_a3 = values[key]) == null ? void 0 : _a3.replacement;
32058
32169
  const type = getSampleQueryReplacementType(key, replacement);
32059
32170
  const name = key == null ? void 0 : key.trim();
32060
32171
  if (!type || !name) {
32061
32172
  return;
32062
32173
  }
32063
- let value = (_b2 = replacement == null ? void 0 : replacement.format_txt) == null ? void 0 : _b2.trim();
32174
+ let value = (_b3 = replacement == null ? void 0 : replacement.format_txt) == null ? void 0 : _b3.trim();
32064
32175
  if (type == "TEXT" /* SAMPLE_QUERY_TEXT_TYPE */) {
32065
32176
  value = name;
32066
32177
  }
@@ -32081,9 +32192,9 @@
32081
32192
  }
32082
32193
  };
32083
32194
  var transformDataExplorerAutocompleteResponse = (response) => {
32084
- var _a, _b, _c, _d, _e, _f, _g, _h;
32195
+ var _a2, _b2, _c, _d, _e, _f, _g, _h;
32085
32196
  let vlMatches = [];
32086
- if ((_d = (_c = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.suggestions) == null ? void 0 : _c.value_labels) == null ? void 0 : _d.length) {
32197
+ if ((_d = (_c = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.suggestions) == null ? void 0 : _c.value_labels) == null ? void 0 : _d.length) {
32087
32198
  const vlMatchesTrimmed = response.data.data.suggestions.value_labels.slice(0, 10);
32088
32199
  vlMatches = vlMatchesTrimmed.map((vl) => new DataExplorerSubject(vl));
32089
32200
  }
@@ -32101,8 +32212,8 @@
32101
32212
  apiKey,
32102
32213
  cancelToken
32103
32214
  } = {}) => {
32104
- var _a;
32105
- if (!suggestion || !((_a = suggestion.trim) == null ? void 0 : _a.call(suggestion))) {
32215
+ var _a2;
32216
+ if (!suggestion || !((_a2 = suggestion.trim) == null ? void 0 : _a2.call(suggestion))) {
32106
32217
  return Promise.reject(new Error("No query supplied"));
32107
32218
  }
32108
32219
  if (!domain || !apiKey || !token) {
@@ -32124,21 +32235,21 @@
32124
32235
  return axios_default.get(url2, config).then((response) => {
32125
32236
  return transformDataExplorerAutocompleteResponse(response);
32126
32237
  }).catch((error) => {
32127
- var _a2;
32238
+ var _a3;
32128
32239
  if ((error == null ? void 0 : error.message) === REQUEST_CANCELLED_ERROR) {
32129
32240
  return Promise.reject({
32130
32241
  data: { message: REQUEST_CANCELLED_ERROR }
32131
32242
  });
32132
32243
  }
32133
- return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32244
+ return Promise.reject((_a3 = error == null ? void 0 : error.response) == null ? void 0 : _a3.data);
32134
32245
  });
32135
32246
  };
32136
32247
  var transformVLForDataExplorerSuggestions = (vl) => {
32137
- var _a;
32248
+ var _a2;
32138
32249
  return {
32139
32250
  name: vl.keyword,
32140
32251
  alias_name: vl.show_message,
32141
- column_name: (_a = vl.column_name) != null ? _a : ""
32252
+ column_name: (_a2 = vl.column_name) != null ? _a2 : ""
32142
32253
  };
32143
32254
  };
32144
32255
  var fetchDataExplorerSampleQueries = async ({
@@ -32165,15 +32276,15 @@
32165
32276
  cancelToken
32166
32277
  );
32167
32278
  return axios_default.post(url2, data, config).then((response) => {
32168
- var _a, _b, _c, _d;
32169
- if ((_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.suggestions) {
32279
+ var _a2, _b2, _c, _d;
32280
+ if ((_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.suggestions) {
32170
32281
  const suggestions = transformSampleQuerySuggestions((_d = (_c = response == null ? void 0 : response.data) == null ? void 0 : _c.data) == null ? void 0 : _d.suggestions);
32171
32282
  response.data.data.suggestions = suggestions;
32172
32283
  }
32173
32284
  return Promise.resolve(response);
32174
32285
  }).catch((error) => {
32175
- var _a;
32176
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32286
+ var _a2;
32287
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32177
32288
  });
32178
32289
  };
32179
32290
  var fetchDataExplorerSuggestions = async ({
@@ -32188,7 +32299,7 @@
32188
32299
  userVLSelection = [],
32189
32300
  skipQueryValidation
32190
32301
  } = {}) => {
32191
- var _a, _b, _c;
32302
+ var _a2, _b2, _c;
32192
32303
  if (!token || !domain || !apiKey) {
32193
32304
  return Promise.reject(new Error("Unauthenticated"));
32194
32305
  }
@@ -32199,7 +32310,7 @@
32199
32310
  apiKey,
32200
32311
  token
32201
32312
  });
32202
- if (((_c = (_b = (_a = queryValidationResponse == null ? void 0 : queryValidationResponse.data) == null ? void 0 : _a.data) == null ? void 0 : _b.replacements) == null ? void 0 : _c.length) > 0) {
32313
+ if (((_c = (_b2 = (_a2 = queryValidationResponse == null ? void 0 : queryValidationResponse.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.replacements) == null ? void 0 : _c.length) > 0) {
32203
32314
  return Promise.resolve(queryValidationResponse);
32204
32315
  }
32205
32316
  }
@@ -32225,8 +32336,8 @@
32225
32336
  value_label_info: vlInfo
32226
32337
  };
32227
32338
  return axios_default.post(exploreQueriesUrl, data, config).then((response) => Promise.resolve(response)).catch((error) => {
32228
- var _a2;
32229
- return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32339
+ var _a3;
32340
+ return Promise.reject((_a3 = error == null ? void 0 : error.response) == null ? void 0 : _a3.data);
32230
32341
  });
32231
32342
  };
32232
32343
  var fetchSubjectListV2 = ({
@@ -32252,9 +32363,9 @@
32252
32363
  cancelToken
32253
32364
  );
32254
32365
  return axios_default.get(url2, config).then((response) => {
32255
- var _a, _b;
32366
+ var _a2, _b2;
32256
32367
  let subjectList = [];
32257
- if ((_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.subjects) {
32368
+ if ((_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.subjects) {
32258
32369
  subjectList = response.data.data.subjects.sort((a, b) => {
32259
32370
  const aName = a.subject;
32260
32371
  const bName = b.subject;
@@ -32263,8 +32374,8 @@
32263
32374
  }
32264
32375
  return Promise.resolve(subjectList);
32265
32376
  }).catch((error) => {
32266
- var _a;
32267
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32377
+ var _a2;
32378
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32268
32379
  });
32269
32380
  };
32270
32381
  var fetchSubjectList = ({ domain, apiKey, token, valueLabel }) => {
@@ -32281,9 +32392,9 @@
32281
32392
  }
32282
32393
  };
32283
32394
  return axios_default.get(url2, config).then((response) => {
32284
- var _a, _b;
32395
+ var _a2, _b2;
32285
32396
  let subjectList = [];
32286
- if ((_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.subjects) {
32397
+ if ((_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.subjects) {
32287
32398
  subjectList = response.data.data.subjects.map((subject) => new DataExplorerSubject(subject)).sort((a, b) => {
32288
32399
  const aName = a.displayName;
32289
32400
  const bName = b.displayName;
@@ -32292,8 +32403,8 @@
32292
32403
  }
32293
32404
  return Promise.resolve(subjectList);
32294
32405
  }).catch((error) => {
32295
- var _a;
32296
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32406
+ var _a2;
32407
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32297
32408
  });
32298
32409
  };
32299
32410
  var fetchDataPreview = ({
@@ -32332,7 +32443,7 @@
32332
32443
 
32333
32444
  // src/Api/notificationService.ts
32334
32445
  var transformNotificationQueryResult = (queryResult) => {
32335
- var _a;
32446
+ var _a2;
32336
32447
  let transformedQueryResult = {};
32337
32448
  let hasQueryResult = false;
32338
32449
  for (let key in queryResult) {
@@ -32342,7 +32453,7 @@
32342
32453
  }
32343
32454
  }
32344
32455
  if (hasQueryResult) {
32345
- transformedQueryResult = (_a = transformQueryResponse({ data: queryResult })) == null ? void 0 : _a.data;
32456
+ transformedQueryResult = (_a2 = transformQueryResponse({ data: queryResult })) == null ? void 0 : _a2.data;
32346
32457
  } else {
32347
32458
  transformedQueryResult = {
32348
32459
  message: GENERAL_ERROR,
@@ -32362,8 +32473,8 @@
32362
32473
  });
32363
32474
  const url2 = `${domain}/autoql/api/v1/data-alerts/notifications/${id}?key=${apiKey}`;
32364
32475
  return axiosInstance.get(url2).then((response) => {
32365
- var _a, _b;
32366
- const queryResult = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.query_result;
32476
+ var _a2, _b2;
32477
+ const queryResult = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.query_result;
32367
32478
  let hasQueryResult = false;
32368
32479
  for (let key in queryResult) {
32369
32480
  if (queryResult.hasOwnProperty(key)) {
@@ -32378,8 +32489,8 @@
32378
32489
  return Promise.reject({ response: { data: { message: GENERAL_ERROR, hasQueryResult } } });
32379
32490
  }
32380
32491
  }).catch((error) => {
32381
- var _a;
32382
- return Promise.reject({ data: (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data });
32492
+ var _a2;
32493
+ return Promise.reject({ data: (_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data });
32383
32494
  });
32384
32495
  };
32385
32496
  var fetchNotification = ({ id, domain, apiKey, token }) => {
@@ -32393,14 +32504,14 @@
32393
32504
  });
32394
32505
  const url2 = `${domain}/autoql/api/v1/data-alerts/notifications/${id}?key=${apiKey}`;
32395
32506
  return axiosInstance.get(url2).then((response) => {
32396
- var _a, _b, _c, _d;
32397
- const transformedResponse = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) != null ? _b : {};
32507
+ var _a2, _b2, _c, _d;
32508
+ const transformedResponse = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) != null ? _b2 : {};
32398
32509
  const transformedQueryResult = transformNotificationQueryResult((_d = (_c = response == null ? void 0 : response.data) == null ? void 0 : _c.data) == null ? void 0 : _d.query_result);
32399
32510
  transformedResponse.query_result = transformedQueryResult;
32400
32511
  return Promise.resolve(transformedResponse);
32401
32512
  }).catch((error) => {
32402
- var _a;
32403
- return Promise.reject({ data: (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data });
32513
+ var _a2;
32514
+ return Promise.reject({ data: (_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data });
32404
32515
  });
32405
32516
  };
32406
32517
  var isExpressionQueryValid = ({ query, domain, apiKey, token }) => {
@@ -32472,8 +32583,8 @@
32472
32583
  url2 = url2 + withoutProjectsRestriction;
32473
32584
  }
32474
32585
  return axiosInstance.get(url2).then((response) => {
32475
- var _a, _b, _c;
32476
- const notificationList = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.items;
32586
+ var _a2, _b2, _c;
32587
+ const notificationList = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.items;
32477
32588
  if (notificationList == null ? void 0 : notificationList.length) {
32478
32589
  notificationList.forEach((notification) => {
32479
32590
  const transformedQueryResult = transformNotificationQueryResult(notification.query_result);
@@ -32482,8 +32593,8 @@
32482
32593
  }
32483
32594
  return Promise.resolve((_c = response == null ? void 0 : response.data) == null ? void 0 : _c.data);
32484
32595
  }).catch((error) => {
32485
- var _a;
32486
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32596
+ var _a2;
32597
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32487
32598
  });
32488
32599
  };
32489
32600
  var fetchNotificationChannels = ({ domain, apiKey, token, channelType }) => {
@@ -32497,11 +32608,11 @@
32497
32608
  });
32498
32609
  const url2 = `${domain}/autoql/api/v1/notifications/channels?key=${apiKey}&type=${channelType}`;
32499
32610
  return axiosInstance.get(url2).then((response) => Promise.resolve(response == null ? void 0 : response.data)).catch((error) => {
32500
- var _a, _b;
32501
- if (((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.status) === 404) {
32611
+ var _a2, _b2;
32612
+ if (((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.status) === 404) {
32502
32613
  return Promise.resolve({ data: [] });
32503
32614
  }
32504
- return Promise.reject((_b = error == null ? void 0 : error.response) == null ? void 0 : _b.data);
32615
+ return Promise.reject((_b2 = error == null ? void 0 : error.response) == null ? void 0 : _b2.data);
32505
32616
  });
32506
32617
  };
32507
32618
  var fetchDataAlerts = ({ domain, apiKey, token }) => {
@@ -32515,8 +32626,8 @@
32515
32626
  });
32516
32627
  const url2 = `${domain}/autoql/api/v1/data-alerts?key=${apiKey}`;
32517
32628
  return axiosInstance.get(url2).then((response) => Promise.resolve(response == null ? void 0 : response.data)).catch((error) => {
32518
- var _a;
32519
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32629
+ var _a2;
32630
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32520
32631
  });
32521
32632
  };
32522
32633
  var getDataAlertsByLabel = ({ domain, apiKey, token, labelId }) => {
@@ -32530,8 +32641,8 @@
32530
32641
  }
32531
32642
  };
32532
32643
  return axios_default.get(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
32533
- var _a;
32534
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32644
+ var _a2;
32645
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32535
32646
  });
32536
32647
  };
32537
32648
  var getNotLabeledDataAlerts = ({ domain, apiKey, token }) => {
@@ -32545,8 +32656,8 @@
32545
32656
  }
32546
32657
  };
32547
32658
  return axios_default.get(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
32548
- var _a;
32549
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32659
+ var _a2;
32660
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32550
32661
  });
32551
32662
  };
32552
32663
  var fetchSubscribedDataAlerts = ({ domain, apiKey, token }) => {
@@ -32560,8 +32671,8 @@
32560
32671
  });
32561
32672
  const url2 = `${domain}/autoql/api/v1/data-alerts?status=active&key=${apiKey}`;
32562
32673
  return axiosInstance.get(url2).then((response) => Promise.resolve(response == null ? void 0 : response.data)).catch((error) => {
32563
- var _a;
32564
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32674
+ var _a2;
32675
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32565
32676
  });
32566
32677
  };
32567
32678
  var fetchRule = ({ domain, apiKey, token, dataAlertId }) => {
@@ -32575,11 +32686,11 @@
32575
32686
  });
32576
32687
  const url2 = `${domain}/autoql/api/v1/data-alerts/${dataAlertId}?key=${apiKey}`;
32577
32688
  return axiosInstance.get(url2).then((response) => {
32578
- var _a;
32579
- return Promise.resolve((_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data);
32689
+ var _a2;
32690
+ return Promise.resolve((_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data);
32580
32691
  }).catch((error) => {
32581
- var _a;
32582
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32692
+ var _a2;
32693
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32583
32694
  });
32584
32695
  };
32585
32696
  var resetNotificationCount = ({ domain, apiKey, token }) => {
@@ -32597,11 +32708,11 @@
32597
32708
  };
32598
32709
  const url2 = `${domain}/autoql/api/v1/data-alerts/notifications?key=${apiKey}`;
32599
32710
  return axiosInstance.put(url2, data).then((response) => {
32600
- var _a;
32601
- return Promise.resolve((_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data);
32711
+ var _a2;
32712
+ return Promise.resolve((_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data);
32602
32713
  }).catch((error) => {
32603
- var _a;
32604
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32714
+ var _a2;
32715
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32605
32716
  });
32606
32717
  };
32607
32718
  var initializeAlert = ({ id, domain, apiKey, token }) => {
@@ -32618,11 +32729,11 @@
32618
32729
  });
32619
32730
  const url2 = `${domain}/autoql/api/v1/data-alerts/${id}/initialize?key=${apiKey}`;
32620
32731
  return axiosInstance.put(url2).then((response) => {
32621
- var _a;
32622
- return Promise.resolve((_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data);
32732
+ var _a2;
32733
+ return Promise.resolve((_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data);
32623
32734
  }).catch((error) => {
32624
- var _a;
32625
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32735
+ var _a2;
32736
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32626
32737
  });
32627
32738
  };
32628
32739
  var deleteNotification = ({ notificationId, domain, apiKey, token }) => {
@@ -32639,8 +32750,8 @@
32639
32750
  });
32640
32751
  const url2 = `${domain}/autoql/api/v1/data-alerts/notifications/${notificationId}?key=${apiKey}`;
32641
32752
  return axiosInstance.delete(url2).catch((error) => {
32642
- var _a;
32643
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32753
+ var _a2;
32754
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32644
32755
  });
32645
32756
  };
32646
32757
  var deleteMultipleNotifications = ({ notificationList, domain, apiKey, token }) => {
@@ -32658,8 +32769,8 @@
32658
32769
  const url2 = `${domain}/autoql/api/v1/data-alerts/notifications?key=${apiKey}`;
32659
32770
  const data = { operation: "delete", notifications: notificationList };
32660
32771
  return axios_default.patch(url2, data, config).catch((error) => {
32661
- var _a;
32662
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32772
+ var _a2;
32773
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32663
32774
  });
32664
32775
  };
32665
32776
  var deleteAllNotifications = ({ domain, apiKey, token, projectId }) => {
@@ -32677,8 +32788,8 @@
32677
32788
  const url2 = `${domain}/autoql/api/v1/data-alerts/notifications?key=${apiKey}&project=${projectId}`;
32678
32789
  const data = { operation: "delete_all" };
32679
32790
  return axios_default.patch(url2, data, config).catch((error) => {
32680
- var _a;
32681
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32791
+ var _a2;
32792
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32682
32793
  });
32683
32794
  };
32684
32795
  var dismissAllNotifications = ({ domain, apiKey, token }) => {
@@ -32695,8 +32806,8 @@
32695
32806
  };
32696
32807
  const url2 = `${domain}/autoql/api/v1/data-alerts/notifications?key=${apiKey}&project=all`;
32697
32808
  return axiosInstance.put(url2, data).catch((error) => {
32698
- var _a;
32699
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32809
+ var _a2;
32810
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32700
32811
  });
32701
32812
  };
32702
32813
  var markNotificationAsUnread = ({ notificationId, domain, apiKey, token }) => {
@@ -32716,8 +32827,8 @@
32716
32827
  };
32717
32828
  const url2 = `${domain}/autoql/api/v1/data-alerts/notifications/${notificationId}?key=${apiKey}`;
32718
32829
  return axiosInstance.put(url2, data).catch((error) => {
32719
- var _a;
32720
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32830
+ var _a2;
32831
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32721
32832
  });
32722
32833
  };
32723
32834
  var dismissNotification = ({ notificationId, domain, apiKey, token }) => {
@@ -32737,8 +32848,8 @@
32737
32848
  };
32738
32849
  const url2 = `${domain}/autoql/api/v1/data-alerts/notifications/${notificationId}?key=${apiKey}`;
32739
32850
  return axiosInstance.put(url2, data).catch((error) => {
32740
- var _a;
32741
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32851
+ var _a2;
32852
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32742
32853
  });
32743
32854
  };
32744
32855
  var removeUserFromProjectRule = ({ dataAlertId, token, domain, apiKey }) => {
@@ -32749,8 +32860,8 @@
32749
32860
  };
32750
32861
  const url2 = `${domain}/autoql/api/v1/data-alerts/${dataAlertId}/user?key=${apiKey}`;
32751
32862
  return axios_default.delete(url2, config).catch((error) => {
32752
- var _a;
32753
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32863
+ var _a2;
32864
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32754
32865
  });
32755
32866
  };
32756
32867
  var addUserToProjectRule = ({ dataAlertId, token, domain, apiKey }) => {
@@ -32761,8 +32872,8 @@
32761
32872
  };
32762
32873
  const url2 = `${domain}/autoql/api/v1/data-alerts/${dataAlertId}/user?key=${apiKey}`;
32763
32874
  return axios_default.post(url2, {}, config).catch((error) => {
32764
- var _a;
32765
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32875
+ var _a2;
32876
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32766
32877
  });
32767
32878
  };
32768
32879
  var toggleProjectDataAlertStatus = ({ dataAlertId, status, token, domain, apiKey }) => {
@@ -32793,8 +32904,8 @@
32793
32904
  };
32794
32905
  const url2 = `${domain}/autoql/api/v1/data-alerts/${dataAlertId}?key=${apiKey}`;
32795
32906
  return axios_default.put(url2, data, config).catch((error) => {
32796
- var _a;
32797
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32907
+ var _a2;
32908
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32798
32909
  });
32799
32910
  };
32800
32911
  var updateDataAlertStatus = ({ dataAlertId, status, type, domain, apiKey, token }) => {
@@ -32849,8 +32960,8 @@
32849
32960
  };
32850
32961
  const url2 = `${domain}/autoql/api/v1/notifications/channels?key=${apiKey}`;
32851
32962
  return axios_default.post(url2, data, config).catch((error) => {
32852
- var _a;
32853
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32963
+ var _a2;
32964
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32854
32965
  });
32855
32966
  };
32856
32967
  var sendDataToChannel = ({ token, domain, apiKey, channelId, fileName, base64Data }) => {
@@ -32868,8 +32979,8 @@
32868
32979
  };
32869
32980
  const url2 = `${domain}/autoql/api/v1/notifications/channels/${channelId}/send?key=${apiKey}`;
32870
32981
  return axios_default.post(url2, data, config).catch((error) => {
32871
- var _a;
32872
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32982
+ var _a2;
32983
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32873
32984
  });
32874
32985
  };
32875
32986
  var updateDataAlert = ({ dataAlert, domain, apiKey, token }) => {
@@ -32886,8 +32997,8 @@
32886
32997
  });
32887
32998
  const url2 = `${domain}/autoql/api/v1/data-alerts/${dataAlert.id}?key=${apiKey}`;
32888
32999
  return axiosInstance.put(url2, dataAlert).catch((error) => {
32889
- var _a;
32890
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33000
+ var _a2;
33001
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32891
33002
  });
32892
33003
  };
32893
33004
  var createDataAlert = ({ dataAlert = {}, domain, apiKey, token }) => {
@@ -32902,12 +33013,12 @@
32902
33013
  const data = { ...dataAlert, id: void 0 };
32903
33014
  const url2 = `${domain}/autoql/api/v1/data-alerts?validate=true&key=${apiKey}`;
32904
33015
  return axiosInstance.post(url2, data).catch((error) => {
32905
- var _a;
32906
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33016
+ var _a2;
33017
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32907
33018
  });
32908
33019
  };
32909
33020
  var createManagementDataAlert = ({ dataAlert = {}, domain, apiKey, token, projectId, evaluationMode }) => {
32910
- var _a, _b;
33021
+ var _a2, _b2;
32911
33022
  if (!token || !apiKey || !domain) {
32912
33023
  return Promise.reject(new Error("UNAUTHORIZED" /* UNAUTHORIZED */));
32913
33024
  }
@@ -32919,14 +33030,14 @@
32919
33030
  const projects = evaluationMode === "COMPOSITE" ? [] : [
32920
33031
  {
32921
33032
  id: projectId,
32922
- time_zone: (_b = (_a = Intl == null ? void 0 : Intl.DateTimeFormat()) == null ? void 0 : _a.resolvedOptions()) == null ? void 0 : _b.timeZone
33033
+ time_zone: (_b2 = (_a2 = Intl == null ? void 0 : Intl.DateTimeFormat()) == null ? void 0 : _a2.resolvedOptions()) == null ? void 0 : _b2.timeZone
32923
33034
  }
32924
33035
  ];
32925
33036
  const data = { ...dataAlert, id: void 0, projects };
32926
33037
  const url2 = `${domain}/autoql/management/api/v1/data-alerts?validate=true&key=${apiKey}`;
32927
33038
  return axiosInstance.post(url2, data).catch((error) => {
32928
- var _a2;
32929
- return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
33039
+ var _a3;
33040
+ return Promise.reject((_a3 = error == null ? void 0 : error.response) == null ? void 0 : _a3.data);
32930
33041
  });
32931
33042
  };
32932
33043
  var updateManagementDataAlert = ({ dataAlert, domain, apiKey, token, projectId }) => {
@@ -32941,8 +33052,8 @@
32941
33052
  const data = { ...dataAlert, id: void 0, project_id: projectId };
32942
33053
  const url2 = `${domain}/autoql/management/api/v1/data-alerts/${dataAlert == null ? void 0 : dataAlert.id}?key=${apiKey}`;
32943
33054
  return axiosInstance.put(url2, data).catch((error) => {
32944
- var _a;
32945
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33055
+ var _a2;
33056
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32946
33057
  });
32947
33058
  };
32948
33059
  var previewDataAlert = ({ dataAlertId, domain, apiKey, token }) => {
@@ -32956,8 +33067,8 @@
32956
33067
  });
32957
33068
  const url2 = `${domain}/autoql/api/v1/data-alerts/${dataAlertId}/preview?key=${apiKey}`;
32958
33069
  return axiosInstance.get(url2).then((response) => Promise.resolve(response)).catch((error) => {
32959
- var _a;
32960
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33070
+ var _a2;
33071
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32961
33072
  });
32962
33073
  };
32963
33074
  var previewManagementDataAlert = ({ dataAlertId, domain, apiKey, token, projectId }) => {
@@ -32971,8 +33082,8 @@
32971
33082
  });
32972
33083
  const url2 = `${domain}/autoql/management/api/v1/data-alerts/${dataAlertId}/preview?key=${apiKey}&project_id=${projectId}`;
32973
33084
  return axiosInstance.get(url2).then((response) => Promise.resolve(response)).catch((error) => {
32974
- var _a;
32975
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33085
+ var _a2;
33086
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32976
33087
  });
32977
33088
  };
32978
33089
  var assignLabelToManagementDataAlert = ({ dataAlertId, domain, apiKey, token, categoryId }) => {
@@ -32987,8 +33098,8 @@
32987
33098
  const data = { data_alert_ids: [dataAlertId], operation: "ADD" };
32988
33099
  const url2 = `${domain}/autoql/management/api/v1/data-alerts/labels/${categoryId}?key=${apiKey}`;
32989
33100
  return axiosInstance.patch(url2, data).catch((error) => {
32990
- var _a;
32991
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33101
+ var _a2;
33102
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32992
33103
  });
32993
33104
  };
32994
33105
  var validateExpression = ({ expression, domain, apiKey, token }) => {
@@ -33003,8 +33114,8 @@
33003
33114
  const data = { expression };
33004
33115
  const url2 = `${domain}/autoql/api/v1/data-alerts/validate?key=${apiKey}`;
33005
33116
  return axiosInstance.post(url2, data).catch((error) => {
33006
- var _a;
33007
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33117
+ var _a2;
33118
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
33008
33119
  });
33009
33120
  };
33010
33121
  var deleteDataAlert = (dataAlertId, authObject) => {
@@ -33019,8 +33130,8 @@
33019
33130
  });
33020
33131
  const url2 = `${domain}/autoql/api/v1/data-alerts/${dataAlertId}?key=${apiKey}`;
33021
33132
  return axiosInstance.delete(url2).catch((error) => {
33022
- var _a;
33023
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33133
+ var _a2;
33134
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
33024
33135
  });
33025
33136
  };
33026
33137
  var getAllDataAlertsLabelsByProject = ({ domain, apiKey, token }) => {
@@ -33034,8 +33145,8 @@
33034
33145
  }
33035
33146
  };
33036
33147
  return axios_default.get(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
33037
- var _a;
33038
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33148
+ var _a2;
33149
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
33039
33150
  });
33040
33151
  };
33041
33152
  var getAllDataAlertsLabels = ({ domain, apiKey, token }) => {
@@ -33049,8 +33160,8 @@
33049
33160
  }
33050
33161
  };
33051
33162
  return axios_default.get(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
33052
- var _a;
33053
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33163
+ var _a2;
33164
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
33054
33165
  });
33055
33166
  };
33056
33167
  var removeNotificationChannel = ({ channelId, domain, apiKey, token }) => {
@@ -33064,8 +33175,8 @@
33064
33175
  });
33065
33176
  const url2 = `${domain}/autoql/api/v1/notifications/channels/${channelId}?key=${apiKey}`;
33066
33177
  return axiosInstance.delete(url2).catch((error) => {
33067
- var _a;
33068
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33178
+ var _a2;
33179
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
33069
33180
  });
33070
33181
  };
33071
33182
 
@@ -33081,8 +33192,8 @@
33081
33192
  }
33082
33193
  };
33083
33194
  return axios_default.get(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
33084
- var _a;
33085
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33195
+ var _a2;
33196
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
33086
33197
  });
33087
33198
  };
33088
33199
  var removeDashboardRefreshInterval = ({ domain, apiKey, token, dashboard }) => {
@@ -33096,8 +33207,8 @@
33096
33207
  }
33097
33208
  };
33098
33209
  return axios_default.delete(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
33099
- var _a;
33100
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33210
+ var _a2;
33211
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
33101
33212
  });
33102
33213
  };
33103
33214
  var setDashboardRefreshInterval = ({ domain, apiKey, token, dashboard, refreshInterval }) => {
@@ -33116,8 +33227,8 @@
33116
33227
  }
33117
33228
  };
33118
33229
  return axios_default.post(url2, body, config).then((response) => Promise.resolve(response)).catch((error) => {
33119
- var _a;
33120
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33230
+ var _a2;
33231
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
33121
33232
  });
33122
33233
  };
33123
33234
 
@@ -33139,8 +33250,8 @@
33139
33250
  }
33140
33251
  };
33141
33252
  return axios_default.post(url2, data, config).then((response) => Promise.resolve(response)).catch((error) => {
33142
- var _a;
33143
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33253
+ var _a2;
33254
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
33144
33255
  });
33145
33256
  };
33146
33257
 
@@ -33442,8 +33553,8 @@
33442
33553
  let cellTrans, textTrans, textAlign = labelAlign == "start" ? 0 : labelAlign == "middle" ? 0.5 : 1;
33443
33554
  if (orient === "vertical") {
33444
33555
  const cellSize = textSize.map((d, i) => {
33445
- var _a;
33446
- return Math.max(d == null ? void 0 : d.height, (_a = shapeSize[i]) == null ? void 0 : _a.height);
33556
+ var _a2;
33557
+ return Math.max(d == null ? void 0 : d.height, (_a2 = shapeSize[i]) == null ? void 0 : _a2.height);
33447
33558
  });
33448
33559
  cellTrans = (d, i) => {
33449
33560
  const height = sum(cellSize.slice(0, i));
@@ -33451,19 +33562,19 @@
33451
33562
  };
33452
33563
  if (shapeSize == null ? void 0 : shapeSize.length) {
33453
33564
  textTrans = (d, i) => {
33454
- var _a, _b, _c, _d;
33455
- return `translate( ${((_a = shapeSize[i]) == null ? void 0 : _a.width) + ((_b = shapeSize[i]) == null ? void 0 : _b.x) + labelOffset}, ${((_c = shapeSize[i]) == null ? void 0 : _c.y) + ((_d = shapeSize[i]) == null ? void 0 : _d.height) / 2 + 4})`;
33565
+ var _a2, _b2, _c, _d;
33566
+ return `translate( ${((_a2 = shapeSize[i]) == null ? void 0 : _a2.width) + ((_b2 = shapeSize[i]) == null ? void 0 : _b2.x) + labelOffset}, ${((_c = shapeSize[i]) == null ? void 0 : _c.y) + ((_d = shapeSize[i]) == null ? void 0 : _d.height) / 2 + 4})`;
33456
33567
  };
33457
33568
  }
33458
33569
  } else if (orient === "horizontal") {
33459
33570
  if (shapeSize == null ? void 0 : shapeSize.length) {
33460
33571
  cellTrans = (d, i) => {
33461
- var _a;
33462
- return `translate(${i * (((_a = shapeSize[i]) == null ? void 0 : _a.width) + shapePadding)},0)`;
33572
+ var _a2;
33573
+ return `translate(${i * (((_a2 = shapeSize[i]) == null ? void 0 : _a2.width) + shapePadding)},0)`;
33463
33574
  };
33464
33575
  textTrans = (d, i) => {
33465
- var _a, _b, _c, _d;
33466
- return `translate(${((_a = shapeSize[i]) == null ? void 0 : _a.width) * textAlign + ((_b = shapeSize[i]) == null ? void 0 : _b.x)},
33576
+ var _a2, _b2, _c, _d;
33577
+ return `translate(${((_a2 = shapeSize[i]) == null ? void 0 : _a2.width) * textAlign + ((_b2 = shapeSize[i]) == null ? void 0 : _b2.x)},
33467
33578
  ${((_c = shapeSize[i]) == null ? void 0 : _c.height) + ((_d = shapeSize[i]) == null ? void 0 : _d.y) + labelOffset + 8})`;
33468
33579
  };
33469
33580
  }