@modelform/react-native 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -220,7 +220,8 @@
220
220
 
221
221
 
222
222
 
223
- var _chunkYUXA7I4Jjs = require('./chunk-YUXA7I4J.js');
223
+
224
+ var _chunkQIBL3YULjs = require('./chunk-QIBL3YUL.js');
224
225
 
225
226
  // src/ui/theme.tsx
226
227
  var _react = require('react');
@@ -410,7 +411,7 @@ function DashboardProvider({ dashboard, resolve, refreshKey: externalKey = 0, on
410
411
  if (!dashboard.refresh) return;
411
412
  let ms;
412
413
  try {
413
- ms = _chunkYUXA7I4Jjs.parseDuration.call(void 0, dashboard.refresh);
414
+ ms = _chunkQIBL3YULjs.parseDuration.call(void 0, dashboard.refresh);
414
415
  } catch (e2) {
415
416
  return;
416
417
  }
@@ -418,7 +419,7 @@ function DashboardProvider({ dashboard, resolve, refreshKey: externalKey = 0, on
418
419
  return () => clearInterval(id);
419
420
  }, [dashboard.refresh, refresh]);
420
421
  const refreshKey = tick + externalKey;
421
- const range3 = _react.useMemo.call(void 0, () => _chunkYUXA7I4Jjs.parseRange.call(void 0, rawRange), [rawRange, refreshKey]);
422
+ const range3 = _react.useMemo.call(void 0, () => _chunkQIBL3YULjs.parseRange.call(void 0, rawRange), [rawRange, refreshKey]);
422
423
  const shared = _react.useMemo.call(void 0, () => /* @__PURE__ */ new Map(), [range3, vars.variables, vars.variableInfo]);
423
424
  const value = _react.useMemo.call(void 0,
424
425
  () => ({
@@ -455,8 +456,8 @@ function DashboardProvider({ dashboard, resolve, refreshKey: externalKey = 0, on
455
456
  ] });
456
457
  }
457
458
  function useDashboardVariables(dashboard, resolve, rawRange) {
458
- const [state, setState] = _react.useState.call(void 0, () => ({ values: _chunkYUXA7I4Jjs.initialVariableValues.call(void 0, dashboard), options: {}, errors: {} }));
459
- const [resolving, setResolving] = _react.useState.call(void 0, () => !!resolve && _chunkYUXA7I4Jjs.refreshedVariables.call(void 0, dashboard, "load").length > 0);
459
+ const [state, setState] = _react.useState.call(void 0, () => ({ values: _chunkQIBL3YULjs.initialVariableValues.call(void 0, dashboard), options: {}, errors: {} }));
460
+ const [resolving, setResolving] = _react.useState.call(void 0, () => !!resolve && _chunkQIBL3YULjs.refreshedVariables.call(void 0, dashboard, "load").length > 0);
460
461
  const [runKey, setRunKey] = _react.useState.call(void 0, 0);
461
462
  const pending = _react.useRef.call(void 0, /* @__PURE__ */ new Set());
462
463
  const stateRef = _react.useRef.call(void 0, state);
@@ -489,7 +490,7 @@ function useDashboardVariables(dashboard, resolve, rawRange) {
489
490
  setState(update);
490
491
  setResolving(false);
491
492
  };
492
- _chunkYUXA7I4Jjs.resolveVariables.call(void 0, dashboard, { values, options, names, resolve: resolve2, range: _chunkYUXA7I4Jjs.parseRange.call(void 0, rawRange), signal: controller.signal }).then(
493
+ _chunkQIBL3YULjs.resolveVariables.call(void 0, dashboard, { values, options, names, resolve: resolve2, range: _chunkQIBL3YULjs.parseRange.call(void 0, rawRange), signal: controller.signal }).then(
493
494
  (res) => finish((s) => ({
494
495
  // Only the re-run variables change, so a pick made while this ran isn't overwritten.
495
496
  values: { ...s.values, ...Object.fromEntries([...names].filter((n) => n in res.values).map((n) => [n, res.values[n]])) },
@@ -503,11 +504,11 @@ function useDashboardVariables(dashboard, resolve, rawRange) {
503
504
  const [loadedDashboard, setLoadedDashboard] = _react.useState.call(void 0, dashboard);
504
505
  if (dashboard !== loadedDashboard) {
505
506
  setLoadedDashboard(dashboard);
506
- setState((s) => ({ ...s, values: { ..._chunkYUXA7I4Jjs.initialVariableValues.call(void 0, dashboard), ...s.values } }));
507
+ setState((s) => ({ ...s, values: { ..._chunkQIBL3YULjs.initialVariableValues.call(void 0, dashboard), ...s.values } }));
507
508
  }
508
509
  _react.useEffect.call(void 0, () => {
509
- const roots = _chunkYUXA7I4Jjs.refreshedVariables.call(void 0, dashboard, "load");
510
- schedule([...roots, ..._chunkYUXA7I4Jjs.variableDependents.call(void 0, dashboard, roots)]);
510
+ const roots = _chunkQIBL3YULjs.refreshedVariables.call(void 0, dashboard, "load");
511
+ schedule([...roots, ..._chunkQIBL3YULjs.variableDependents.call(void 0, dashboard, roots)]);
511
512
  }, [dashboard, schedule]);
512
513
  const mounted = _react.useRef.call(void 0, false);
513
514
  _react.useEffect.call(void 0, () => {
@@ -515,17 +516,17 @@ function useDashboardVariables(dashboard, resolve, rawRange) {
515
516
  mounted.current = true;
516
517
  return;
517
518
  }
518
- const roots = _chunkYUXA7I4Jjs.refreshedVariables.call(void 0, dashboard, "range");
519
- schedule([...roots, ..._chunkYUXA7I4Jjs.variableDependents.call(void 0, dashboard, roots)]);
519
+ const roots = _chunkQIBL3YULjs.refreshedVariables.call(void 0, dashboard, "range");
520
+ schedule([...roots, ..._chunkQIBL3YULjs.variableDependents.call(void 0, dashboard, roots)]);
520
521
  }, [rawRange]);
521
522
  const setVariable = _react.useCallback.call(void 0,
522
523
  (name, value) => {
523
524
  setState((s) => ({ ...s, values: { ...s.values, [name]: value } }));
524
- schedule(_chunkYUXA7I4Jjs.variableDependents.call(void 0, dashboard, [name]));
525
+ schedule(_chunkQIBL3YULjs.variableDependents.call(void 0, dashboard, [name]));
525
526
  },
526
527
  [dashboard, schedule]
527
528
  );
528
- const info = _react.useMemo.call(void 0, () => _chunkYUXA7I4Jjs.variableInfo.call(void 0, dashboard, state.options), [dashboard, state.options]);
529
+ const info = _react.useMemo.call(void 0, () => _chunkQIBL3YULjs.variableInfo.call(void 0, dashboard, state.options), [dashboard, state.options]);
529
530
  return _react.useMemo.call(void 0,
530
531
  () => ({
531
532
  variables: state.values,
@@ -555,7 +556,7 @@ function usePanelData(panel, widthPx, enabled = true) {
555
556
  _react.useEffect.call(void 0, () => {
556
557
  if (!enabled || !request || !variablesReady) return;
557
558
  const controller = new AbortController();
558
- _chunkYUXA7I4Jjs.queryPanel.call(void 0, request.panel, request.options, controller.signal).then((frames) => !controller.signal.aborted && setResult({ request, frames })).catch((e) => !controller.signal.aborted && setResult({ request, frames: [], error: String(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _5 => _5.message]), () => ( e))) }));
559
+ _chunkQIBL3YULjs.queryPanel.call(void 0, request.panel, request.options, controller.signal).then((frames) => !controller.signal.aborted && setResult({ request, frames })).catch((e) => !controller.signal.aborted && setResult({ request, frames: [], error: String(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _5 => _5.message]), () => ( e))) }));
559
560
  return () => controller.abort();
560
561
  }, [enabled, request, variablesReady]);
561
562
  if (!enabled) return IDLE;
@@ -565,7 +566,7 @@ function usePanelData(panel, widthPx, enabled = true) {
565
566
  function usePanelLinks(panel) {
566
567
  const { dashboard, variables, variableInfo: variableInfo2, range: range3, openLinks } = useDashboard();
567
568
  const resolve = _react.useCallback.call(void 0,
568
- (links, data) => _chunkYUXA7I4Jjs.resolveLinks.call(void 0, links, { dashboard, values: variables, info: variableInfo2, scoped: panel.scopedVars, range: range3, timezone: dashboard.timezone, data }),
569
+ (links, data) => _chunkQIBL3YULjs.resolveLinks.call(void 0, links, { dashboard, values: variables, info: variableInfo2, scoped: panel.scopedVars, range: range3, timezone: dashboard.timezone, data }),
569
570
  [dashboard, variables, variableInfo2, panel.scopedVars, range3]
570
571
  );
571
572
  return { resolve, openLinks };
@@ -606,7 +607,7 @@ var RenderBoundary = (_class = class extends _react.Component {constructor(...ar
606
607
 
607
608
  // src/ui/inputs/formContext.ts
608
609
 
609
- var groupKey = (g) => g.id != null ? `#${g.id}` : _chunkYUXA7I4Jjs.groupFields.call(void 0, g).map((f) => f.options.metric).join("|");
610
+ var groupKey = (g) => g.id != null ? `#${g.id}` : _chunkQIBL3YULjs.groupFields.call(void 0, g).map((f) => f.options.metric).join("|");
610
611
  var InputFormContext = _react.createContext.call(void 0, null);
611
612
  function useInputForm() {
612
613
  const v = _react.useContext.call(void 0, InputFormContext);
@@ -667,14 +668,14 @@ var ArrowIcon = ({ color, dir }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
667
668
  function displayExpr(expr) {
668
669
  if (expr.trim().startsWith("now")) return expr;
669
670
  try {
670
- return _chunkYUXA7I4Jjs.formatLocalDateTime.call(void 0, _chunkYUXA7I4Jjs.parseTime.call(void 0, expr));
671
+ return _chunkQIBL3YULjs.formatLocalDateTime.call(void 0, _chunkQIBL3YULjs.parseTime.call(void 0, expr));
671
672
  } catch (e3) {
672
673
  return expr;
673
674
  }
674
675
  }
675
676
  function tryParse(expr, roundUp, now = Date.now()) {
676
677
  try {
677
- return _chunkYUXA7I4Jjs.parseTime.call(void 0, expr, now, roundUp);
678
+ return _chunkQIBL3YULjs.parseTime.call(void 0, expr, now, roundUp);
678
679
  } catch (e4) {
679
680
  return null;
680
681
  }
@@ -688,7 +689,7 @@ function endOfDay(ms) {
688
689
  return new Date(d.getFullYear(), d.getMonth(), d.getDate() + 1).getTime() - 1e3;
689
690
  }
690
691
  function resolveTo(expr) {
691
- return /^\s*\d{4}-\d{1,2}-\d{1,2}\s*$/.test(expr) ? _chunkYUXA7I4Jjs.formatLocalDateTime.call(void 0, endOfDay(_chunkYUXA7I4Jjs.parseTime.call(void 0, expr))) : expr;
692
+ return /^\s*\d{4}-\d{1,2}-\d{1,2}\s*$/.test(expr) ? _chunkQIBL3YULjs.formatLocalDateTime.call(void 0, endOfDay(_chunkQIBL3YULjs.parseTime.call(void 0, expr))) : expr;
692
693
  }
693
694
  function TimeRangeSheet({ visible, value, onApply, onClose }) {
694
695
  const theme = useDashTheme();
@@ -699,12 +700,12 @@ function TimeRangeSheet({ visible, value, onApply, onClose }) {
699
700
  const [now] = _react.useState.call(void 0, () => Date.now());
700
701
  const [month, setMonth] = _react.useState.call(void 0, () => new Date(_nullishCoalesce(tryParse(value.from, false), () => ( now))));
701
702
  const fromMs = tryParse(from, false, now);
702
- const toMs = tryParse(_chunkYUXA7I4Jjs.timeExprError.call(void 0, to) ? to : resolveTo(to), true, now);
703
- const fromError = _chunkYUXA7I4Jjs.timeExprError.call(void 0, from);
704
- const toError = _chunkYUXA7I4Jjs.timeExprError.call(void 0, to);
703
+ const toMs = tryParse(_chunkQIBL3YULjs.timeExprError.call(void 0, to) ? to : resolveTo(to), true, now);
704
+ const fromError = _chunkQIBL3YULjs.timeExprError.call(void 0, from);
705
+ const toError = _chunkQIBL3YULjs.timeExprError.call(void 0, to);
705
706
  const orderError = fromMs != null && toMs != null && fromMs >= toMs ? "\u201CTo\u201D must be after \u201CFrom\u201D" : null;
706
707
  const valid = !fromError && !toError && !orderError;
707
- const normalize = (expr) => expr.trim().startsWith("now") ? expr.trim() : _chunkYUXA7I4Jjs.formatLocalDateTime.call(void 0, _chunkYUXA7I4Jjs.parseTime.call(void 0, expr));
708
+ const normalize = (expr) => expr.trim().startsWith("now") ? expr.trim() : _chunkQIBL3YULjs.formatLocalDateTime.call(void 0, _chunkQIBL3YULjs.parseTime.call(void 0, expr));
708
709
  const apply = () => {
709
710
  if (!valid) return;
710
711
  onApply({ from: normalize(from), to: normalize(resolveTo(to)) });
@@ -713,14 +714,14 @@ function TimeRangeSheet({ visible, value, onApply, onClose }) {
713
714
  const pickDay = (day) => {
714
715
  const end = endOfDay(day);
715
716
  if (active === "from") {
716
- setFrom(_chunkYUXA7I4Jjs.formatLocalDateTime.call(void 0, day));
717
- if (toMs == null || toMs <= day) setTo(_chunkYUXA7I4Jjs.formatLocalDateTime.call(void 0, end));
717
+ setFrom(_chunkQIBL3YULjs.formatLocalDateTime.call(void 0, day));
718
+ if (toMs == null || toMs <= day) setTo(_chunkQIBL3YULjs.formatLocalDateTime.call(void 0, end));
718
719
  setActive("to");
719
720
  } else if (fromMs != null && day < startOfDay(fromMs)) {
720
- setFrom(_chunkYUXA7I4Jjs.formatLocalDateTime.call(void 0, day));
721
- setTo(_chunkYUXA7I4Jjs.formatLocalDateTime.call(void 0, end));
721
+ setFrom(_chunkQIBL3YULjs.formatLocalDateTime.call(void 0, day));
722
+ setTo(_chunkQIBL3YULjs.formatLocalDateTime.call(void 0, end));
722
723
  } else {
723
- setTo(_chunkYUXA7I4Jjs.formatLocalDateTime.call(void 0, end));
724
+ setTo(_chunkQIBL3YULjs.formatLocalDateTime.call(void 0, end));
724
725
  }
725
726
  };
726
727
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -756,7 +757,7 @@ function TimeRangeSheet({ visible, value, onApply, onClose }) {
756
757
  }
757
758
  ),
758
759
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles3.sectionTitle, { color: theme.textSecondary }], children: "Relative ranges" }),
759
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: styles3.chips, children: _chunkYUXA7I4Jjs.RELATIVE_RANGES.map((r) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
760
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: styles3.chips, children: _chunkQIBL3YULjs.RELATIVE_RANGES.map((r) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
760
761
  Chip,
761
762
  {
762
763
  label: r.label,
@@ -900,17 +901,17 @@ var FilterIcon = ({ color }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _re
900
901
  var CalendarIcon = ({ color }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg2.default, { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Path, { d: "M5 5h14a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zM4 10h16M8 3v4M16 3v4" }) });
901
902
  var ChevronIcon = ({ color, open }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg2.default, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2.2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Path, { d: open ? "M6 15l6-6 6 6" : "M6 9l6 6 6-6" }) });
902
903
  var CheckIcon = ({ color }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg2.default, { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2.4, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Path, { d: "M5 12.5l4.5 4.5L19 7" }) });
903
- function DashboardToolbar({ presets = _chunkYUXA7I4Jjs.TIME_PRESETS }) {
904
+ function DashboardToolbar({ presets = _chunkQIBL3YULjs.TIME_PRESETS }) {
904
905
  const theme = useDashTheme();
905
906
  const { dashboard, rawRange, setRawRange, variables, variableErrors } = useDashboard();
906
907
  const [filtersOpen, setFiltersOpen] = _react.useState.call(void 0, false);
907
908
  const [rangeOpen, setRangeOpen] = _react.useState.call(void 0, false);
908
909
  const [rangeKey, setRangeKey] = _react.useState.call(void 0, 0);
909
910
  const custom = !presets.some((p) => rawRange.from === p.from && rawRange.to === p.to);
910
- const vars = _chunkYUXA7I4Jjs.visibleVariables.call(void 0, dashboard);
911
+ const vars = _chunkQIBL3YULjs.visibleVariables.call(void 0, dashboard);
911
912
  const active = vars.filter((v) => {
912
913
  const cur = variables[v.name];
913
- return v.includeAll && cur != null && !(Array.isArray(cur) ? cur.includes(_chunkYUXA7I4Jjs.ALL) : cur === _chunkYUXA7I4Jjs.ALL);
914
+ return v.includeAll && cur != null && !(Array.isArray(cur) ? cur.includes(_chunkQIBL3YULjs.ALL) : cur === _chunkQIBL3YULjs.ALL);
914
915
  }).length;
915
916
  const hasError = vars.some((v) => variableErrors[v.name]);
916
917
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles4.toolbar, children: [
@@ -936,7 +937,7 @@ function DashboardToolbar({ presets = _chunkYUXA7I4Jjs.TIME_PRESETS }) {
936
937
  setRangeOpen(true);
937
938
  },
938
939
  accessibilityRole: "button",
939
- accessibilityLabel: custom ? `Time range, ${_chunkYUXA7I4Jjs.describeRange.call(void 0, rawRange)}` : "Custom time range",
940
+ accessibilityLabel: custom ? `Time range, ${_chunkQIBL3YULjs.describeRange.call(void 0, rawRange)}` : "Custom time range",
940
941
  style: ({ pressed }) => [
941
942
  custom ? styles4.rangeButton : styles4.iconButton,
942
943
  { borderColor: custom ? theme.accent : theme.border, backgroundColor: theme.surface },
@@ -944,7 +945,7 @@ function DashboardToolbar({ presets = _chunkYUXA7I4Jjs.TIME_PRESETS }) {
944
945
  ],
945
946
  children: [
946
947
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CalendarIcon, { color: custom ? theme.accent : theme.textSecondary }),
947
- custom && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles4.rangeLabel, { color: theme.accent }], numberOfLines: 1, children: _chunkYUXA7I4Jjs.describeRange.call(void 0, rawRange) })
948
+ custom && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles4.rangeLabel, { color: theme.accent }], numberOfLines: 1, children: _chunkQIBL3YULjs.describeRange.call(void 0, rawRange) })
948
949
  ]
949
950
  }
950
951
  ),
@@ -1000,14 +1001,14 @@ function FilterSection({ variable: v, open, onToggle }) {
1000
1001
  const theme = useDashTheme();
1001
1002
  const { variables, variableInfo: variableInfo2, variableErrors, variablesReady, setVariable } = useDashboard();
1002
1003
  const current = variables[v.name];
1003
- const summary = _chunkYUXA7I4Jjs.valueText.call(void 0, current, variableInfo2[v.name]) || (variablesReady ? "None" : "\u2026");
1004
- const options = [...v.includeAll ? [{ text: "All", value: _chunkYUXA7I4Jjs.ALL }] : [], ..._nullishCoalesce(_optionalChain([variableInfo2, 'access', _9 => _9[v.name], 'optionalAccess', _10 => _10.options]), () => ( []))];
1004
+ const summary = _chunkQIBL3YULjs.valueText.call(void 0, current, variableInfo2[v.name]) || (variablesReady ? "None" : "\u2026");
1005
+ const options = [...v.includeAll ? [{ text: "All", value: _chunkQIBL3YULjs.ALL }] : [], ..._nullishCoalesce(_optionalChain([variableInfo2, 'access', _9 => _9[v.name], 'optionalAccess', _10 => _10.options]), () => ( []))];
1005
1006
  const error = variableErrors[v.name];
1006
1007
  const choose = (value, selected) => {
1007
- if (v.multi && value !== _chunkYUXA7I4Jjs.ALL) {
1008
- const cur = (Array.isArray(current) ? current : [current]).filter((c) => c && c !== _chunkYUXA7I4Jjs.ALL);
1008
+ if (v.multi && value !== _chunkQIBL3YULjs.ALL) {
1009
+ const cur = (Array.isArray(current) ? current : [current]).filter((c) => c && c !== _chunkQIBL3YULjs.ALL);
1009
1010
  const next = selected ? cur.filter((c) => c !== value) : [...cur, value];
1010
- setVariable(v.name, next.length ? next : [_chunkYUXA7I4Jjs.ALL]);
1011
+ setVariable(v.name, next.length ? next : [_chunkQIBL3YULjs.ALL]);
1011
1012
  } else {
1012
1013
  setVariable(v.name, v.multi ? [value] : value);
1013
1014
  if (!v.multi) onToggle();
@@ -1147,7 +1148,7 @@ function barCategory(panel, frame) {
1147
1148
  }
1148
1149
  function categoryLabels(field) {
1149
1150
  if (field.type !== "time") return field.values.map((v) => v == null ? "" : String(v));
1150
- const times = field.values.map((v) => v == null ? null : _chunkYUXA7I4Jjs.toMillis.call(void 0, v));
1151
+ const times = field.values.map((v) => v == null ? null : _chunkQIBL3YULjs.toMillis.call(void 0, v));
1151
1152
  let step = Infinity;
1152
1153
  times.forEach((t, i) => {
1153
1154
  const prev = times[i - 1];
@@ -1193,19 +1194,19 @@ function formatTooltipTime(t) {
1193
1194
  return new Date(t).toLocaleString(void 0, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" });
1194
1195
  }
1195
1196
  function styledSeries(panel, frames, scheme) {
1196
- return styleSeries(panel, _chunkYUXA7I4Jjs.toSeries.call(void 0, frames), frames, scheme);
1197
+ return styleSeries(panel, _chunkQIBL3YULjs.toSeries.call(void 0, frames), frames, scheme);
1197
1198
  }
1198
1199
  function styledXYSeries(panel, frames, scheme) {
1199
- const { series, x } = _chunkYUXA7I4Jjs.toXYSeries.call(void 0, frames, _optionalChain([panel, 'access', _18 => _18.options, 'optionalAccess', _19 => _19.xField]) || void 0);
1200
- const xConfig = x ? _chunkYUXA7I4Jjs.resolveFieldConfig.call(void 0, panel, x.field, x.frame, x.field.name) : {};
1200
+ const { series, x } = _chunkQIBL3YULjs.toXYSeries.call(void 0, frames, _optionalChain([panel, 'access', _18 => _18.options, 'optionalAccess', _19 => _19.xField]) || void 0);
1201
+ const xConfig = x ? _chunkQIBL3YULjs.resolveFieldConfig.call(void 0, panel, x.field, x.frame, x.field.name) : {};
1201
1202
  return { series: styleSeries(panel, series, frames, scheme), xConfig };
1202
1203
  }
1203
1204
  function styleSeries(panel, series, frames, scheme) {
1204
1205
  const frameOf = /* @__PURE__ */ new Map();
1205
1206
  frames.forEach((f) => f.fields.forEach((field) => frameOf.set(field, f)));
1206
1207
  return series.map((s, i) => {
1207
- const config = _chunkYUXA7I4Jjs.resolveFieldConfig.call(void 0, panel, s.field, frameOf.get(s.field), s.name);
1208
- return { ...s, name: _nullishCoalesce(config.displayName, () => ( s.name)), config, color: _chunkYUXA7I4Jjs.seriesColor.call(void 0, i, scheme, config) };
1208
+ const config = _chunkQIBL3YULjs.resolveFieldConfig.call(void 0, panel, s.field, frameOf.get(s.field), s.name);
1209
+ return { ...s, name: _nullishCoalesce(config.displayName, () => ( s.name)), config, color: _chunkQIBL3YULjs.seriesColor.call(void 0, i, scheme, config) };
1209
1210
  });
1210
1211
  }
1211
1212
  function reducedValues(panel, frames, scheme) {
@@ -1213,30 +1214,30 @@ function reducedValues(panel, frames, scheme) {
1213
1214
  const out = [];
1214
1215
  const multiple = frames.length > 1;
1215
1216
  frames.forEach(
1216
- (frame, fi) => _chunkYUXA7I4Jjs.numberFields.call(void 0, frame).forEach((field) => {
1217
- const raw = _chunkYUXA7I4Jjs.fieldDisplayName.call(void 0, field, frame, multiple);
1218
- const config = _chunkYUXA7I4Jjs.resolveFieldConfig.call(void 0, panel, field, frame, raw);
1217
+ (frame, fi) => _chunkQIBL3YULjs.numberFields.call(void 0, frame).forEach((field) => {
1218
+ const raw = _chunkQIBL3YULjs.fieldDisplayName.call(void 0, field, frame, multiple);
1219
+ const config = _chunkQIBL3YULjs.resolveFieldConfig.call(void 0, panel, field, frame, raw);
1219
1220
  const values = field.values.map((v) => v == null ? null : Number(v));
1220
- const value = _chunkYUXA7I4Jjs.reduce.call(void 0, values, calc);
1221
- const color = _chunkYUXA7I4Jjs.seriesColor.call(void 0, out.length, scheme, config);
1222
- const step = _chunkYUXA7I4Jjs.thresholdStep.call(void 0, value, config);
1223
- const mapped = _chunkYUXA7I4Jjs.mappedResult.call(void 0, value, config);
1221
+ const value = _chunkQIBL3YULjs.reduce.call(void 0, values, calc);
1222
+ const color = _chunkQIBL3YULjs.seriesColor.call(void 0, out.length, scheme, config);
1223
+ const step = _chunkQIBL3YULjs.thresholdStep.call(void 0, value, config);
1224
+ const mapped = _chunkQIBL3YULjs.mappedResult.call(void 0, value, config);
1224
1225
  out.push({
1225
1226
  key: `${fi}/${field.name}/${JSON.stringify(_nullishCoalesce(field.labels, () => ( {})))}`,
1226
1227
  name: _nullishCoalesce(config.displayName, () => ( raw)),
1227
1228
  value,
1228
- text: _optionalChain([mapped, 'optionalAccess', _24 => _24.text]) || _chunkYUXA7I4Jjs.formatValue.call(void 0, value, config),
1229
+ text: _optionalChain([mapped, 'optionalAccess', _24 => _24.text]) || _chunkQIBL3YULjs.formatValue.call(void 0, value, config),
1229
1230
  mapped,
1230
1231
  config,
1231
1232
  color,
1232
- stateColor: _optionalChain([mapped, 'optionalAccess', _25 => _25.color]) ? _chunkYUXA7I4Jjs.resolveColor.call(void 0, mapped.color, color) : step ? _chunkYUXA7I4Jjs.resolveColor.call(void 0, step.color, color) : color,
1233
+ stateColor: _optionalChain([mapped, 'optionalAccess', _25 => _25.color]) ? _chunkQIBL3YULjs.resolveColor.call(void 0, mapped.color, color) : step ? _chunkQIBL3YULjs.resolveColor.call(void 0, step.color, color) : color,
1233
1234
  sparkline: values,
1234
1235
  field,
1235
1236
  frame
1236
1237
  });
1237
1238
  })
1238
1239
  );
1239
- return _chunkYUXA7I4Jjs.uniqueNames.call(void 0, out, (v) => v.field, frames);
1240
+ return _chunkQIBL3YULjs.uniqueNames.call(void 0, out, (v) => v.field, frames);
1240
1241
  }
1241
1242
  function yDomain(series, includeZero) {
1242
1243
  let min = Infinity;
@@ -1297,22 +1298,22 @@ function NoData({ message = "No data" }) {
1297
1298
  }
1298
1299
  function rowTooltipItems(panel, frame, row, multiple) {
1299
1300
  return frame.fields.flatMap((f) => {
1300
- const name = _chunkYUXA7I4Jjs.fieldDisplayName.call(void 0, f, frame, multiple);
1301
- const config = _chunkYUXA7I4Jjs.resolveFieldConfig.call(void 0, panel, f, frame, name);
1301
+ const name = _chunkQIBL3YULjs.fieldDisplayName.call(void 0, f, frame, multiple);
1302
+ const config = _chunkQIBL3YULjs.resolveFieldConfig.call(void 0, panel, f, frame, name);
1302
1303
  if (_optionalChain([config, 'access', _36 => _36.custom, 'optionalAccess', _37 => _37.hideFrom, 'optionalAccess', _38 => _38.tooltip])) return [];
1303
1304
  const v = f.values[row];
1304
- const value = v == null ? "\u2014" : f.type === "number" ? _chunkYUXA7I4Jjs.formatDisplay.call(void 0, Number(v), config) : f.type === "time" ? formatTooltipTime(_chunkYUXA7I4Jjs.toMillis.call(void 0, v)) : String(v);
1305
+ const value = v == null ? "\u2014" : f.type === "number" ? _chunkQIBL3YULjs.formatDisplay.call(void 0, Number(v), config) : f.type === "time" ? formatTooltipTime(_chunkQIBL3YULjs.toMillis.call(void 0, v)) : String(v);
1305
1306
  return [{ name: _nullishCoalesce(config.displayName, () => ( name)), value }];
1306
1307
  });
1307
1308
  }
1308
1309
  function rowLinks(panel, frame, row, multiple, resolve) {
1309
1310
  return mergeLinks(
1310
1311
  frame.fields.flatMap((f) => {
1311
- const name = _chunkYUXA7I4Jjs.fieldDisplayName.call(void 0, f, frame, multiple);
1312
- const config = _chunkYUXA7I4Jjs.resolveFieldConfig.call(void 0, panel, f, frame, name);
1312
+ const name = _chunkQIBL3YULjs.fieldDisplayName.call(void 0, f, frame, multiple);
1313
+ const config = _chunkQIBL3YULjs.resolveFieldConfig.call(void 0, panel, f, frame, name);
1313
1314
  if (!_optionalChain([config, 'access', _39 => _39.links, 'optionalAccess', _40 => _40.length])) return [];
1314
1315
  const v = f.values[row];
1315
- const text = v == null ? void 0 : f.type === "number" ? _chunkYUXA7I4Jjs.formatDisplay.call(void 0, Number(v), config) : String(v);
1316
+ const text = v == null ? void 0 : f.type === "number" ? _chunkQIBL3YULjs.formatDisplay.call(void 0, Number(v), config) : String(v);
1316
1317
  return [{ name: _nullishCoalesce(config.displayName, () => ( name)), links: resolve(config.links, { frame, row, field: f, fieldName: _nullishCoalesce(config.displayName, () => ( name)), value: v, text }) }];
1317
1318
  })
1318
1319
  );
@@ -1325,7 +1326,7 @@ function valueLinks(panel, v, resolve) {
1325
1326
  fieldName: v.name,
1326
1327
  seriesName: v.name,
1327
1328
  value: v.value,
1328
- text: _chunkYUXA7I4Jjs.formatValue.call(void 0, v.value, v.config),
1329
+ text: _chunkQIBL3YULjs.formatValue.call(void 0, v.value, v.config),
1329
1330
  calc: _nullishCoalesce(_optionalChain([panel, 'access', _44 => _44.options, 'optionalAccess', _45 => _45.reduceOptions, 'optionalAccess', _46 => _46.calcs, 'optionalAccess', _47 => _47[0]]), () => ( "lastNotNull"))
1330
1331
  });
1331
1332
  }
@@ -1470,15 +1471,15 @@ function NumberInput({ panel, value, onChange }) {
1470
1471
  }
1471
1472
  function DurationInput({ panel, value, onChange }) {
1472
1473
  const theme = useDashTheme();
1473
- const toDigits = (v) => typeof v === "number" ? _chunkYUXA7I4Jjs.formatClock.call(void 0, v).replace(/\D/g, "").replace(/^0+/, "") : "";
1474
+ const toDigits = (v) => typeof v === "number" ? _chunkQIBL3YULjs.formatClock.call(void 0, v).replace(/\D/g, "").replace(/^0+/, "") : "";
1474
1475
  const [digits, setDigits] = _react.useState.call(void 0, toDigits(value));
1475
1476
  const [syncedValue, setSyncedValue] = _react.useState.call(void 0, value);
1476
1477
  if (value !== syncedValue) {
1477
1478
  setSyncedValue(value);
1478
- setDigits((d) => value == null ? _chunkYUXA7I4Jjs.parseClockDigits.call(void 0, d) == null ? d : "" : _chunkYUXA7I4Jjs.parseClockDigits.call(void 0, d) === value ? d : toDigits(value));
1479
+ setDigits((d) => value == null ? _chunkQIBL3YULjs.parseClockDigits.call(void 0, d) == null ? d : "" : _chunkQIBL3YULjs.parseClockDigits.call(void 0, d) === value ? d : toDigits(value));
1479
1480
  }
1480
1481
  const masked = digits ? maskClock(digits) : "";
1481
- const invalid = !!digits && _chunkYUXA7I4Jjs.parseClockDigits.call(void 0, digits) == null;
1482
+ const invalid = !!digits && _chunkQIBL3YULjs.parseClockDigits.call(void 0, digits) == null;
1482
1483
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: [styles6.numberField, { borderColor: invalid ? theme.danger : theme.border }], children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1483
1484
  _reactnative.TextInput,
1484
1485
  {
@@ -1486,7 +1487,7 @@ function DurationInput({ panel, value, onChange }) {
1486
1487
  onChangeText: (t) => {
1487
1488
  const d = t.replace(/\D/g, "").replace(/^0+/, "").slice(0, 6);
1488
1489
  setDigits(d);
1489
- onChange(_chunkYUXA7I4Jjs.parseClockDigits.call(void 0, d));
1490
+ onChange(_chunkQIBL3YULjs.parseClockDigits.call(void 0, d));
1490
1491
  },
1491
1492
  keyboardType: "number-pad",
1492
1493
  placeholder: _nullishCoalesce(panel.options.placeholder, () => ( "00:00.00")),
@@ -1672,10 +1673,10 @@ function SuggestTextInput({ panel, value, onChange }) {
1672
1673
  }, [store, metric, suggestWith]);
1673
1674
  const withText = suggestWith ? form.value(suggestWith) : null;
1674
1675
  const own = entries.filter((e) => e.metric === metric);
1675
- const scoped = suggestWith && typeof withText === "string" && withText.trim() ? _chunkYUXA7I4Jjs.entriesSavedWith.call(void 0, entries, metric, suggestWith, withText) : [];
1676
+ const scoped = suggestWith && typeof withText === "string" && withText.trim() ? _chunkQIBL3YULjs.entriesSavedWith.call(void 0, entries, metric, suggestWith, withText) : [];
1676
1677
  const query = typed ? text : "";
1677
- const fromScoped = _chunkYUXA7I4Jjs.textSuggestions.call(void 0, scoped, query);
1678
- const suggestions = (fromScoped.length ? fromScoped : _chunkYUXA7I4Jjs.textSuggestions.call(void 0, own, query)).filter((s) => s.toLowerCase() !== text.trim().toLowerCase());
1678
+ const fromScoped = _chunkQIBL3YULjs.textSuggestions.call(void 0, scoped, query);
1679
+ const suggestions = (fromScoped.length ? fromScoped : _chunkQIBL3YULjs.textSuggestions.call(void 0, own, query)).filter((s) => s.toLowerCase() !== text.trim().toLowerCase());
1679
1680
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles6.suggest, children: [
1680
1681
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1681
1682
  _reactnative.TextInput,
@@ -1714,7 +1715,7 @@ function CounterInput({ panel }) {
1714
1715
  const { metric, increment = 1, unit } = panel.options;
1715
1716
  const [today, setToday] = _react.useState.call(void 0, 0);
1716
1717
  _react.useEffect.call(void 0, () => {
1717
- const load = () => store.list({ metrics: [metric], from: _chunkYUXA7I4Jjs.startOf.call(void 0, /* @__PURE__ */ new Date(), "d").getTime() }).then((rows) => setToday(rows.reduce((a, e) => a + (_nullishCoalesce(e.value, () => ( 0))), 0)));
1718
+ const load = () => store.list({ metrics: [metric], from: _chunkQIBL3YULjs.startOf.call(void 0, /* @__PURE__ */ new Date(), "d").getTime() }).then((rows) => setToday(rows.reduce((a, e) => a + (_nullishCoalesce(e.value, () => ( 0))), 0)));
1718
1719
  load();
1719
1720
  return store.subscribe(load);
1720
1721
  }, [store, metric]);
@@ -1787,21 +1788,117 @@ function titleText(v) {
1787
1788
  if (Array.isArray(v)) return v.length ? v.join(", ") : void 0;
1788
1789
  return typeof v === "boolean" ? void 0 : String(v);
1789
1790
  }
1791
+ function summaryText(f, v) {
1792
+ if (v == null || v === "" || Array.isArray(v) && !v.length) return void 0;
1793
+ if (f.type === "input-toggle") return v ? f.title || "Yes" : void 0;
1794
+ if (f.type === "input-duration" && typeof v === "number") return _chunkQIBL3YULjs.formatClock.call(void 0, v);
1795
+ if (f.type === "input-select" && f.options.choices) {
1796
+ const label = (x) => _nullishCoalesce(_optionalChain([f, 'access', _60 => _60.options, 'access', _61 => _61.choices, 'access', _62 => _62.find, 'call', _63 => _63((c) => c.value === x), 'optionalAccess', _64 => _64.label]), () => ( String(x)));
1797
+ return Array.isArray(v) ? v.map(label).join(", ") : label(v);
1798
+ }
1799
+ const text = Array.isArray(v) ? v.join(", ") : String(v);
1800
+ return f.options.unit ? `${text} ${f.options.unit}` : text;
1801
+ }
1802
+ var GAP = 8;
1803
+ function dropIndex(from, dy, keys, span) {
1804
+ let to = from;
1805
+ let left = dy;
1806
+ while (left > 0 && to < keys.length - 1 && left > span(keys[to + 1]) / 2) left -= span(keys[++to]);
1807
+ while (left < 0 && to > 0 && -left > span(keys[to - 1]) / 2) left += span(keys[--to]);
1808
+ return to;
1809
+ }
1790
1810
  function InputGroupBody({ panel }) {
1791
1811
  const theme = useDashTheme();
1792
1812
  const form = useInputForm();
1793
- const group = _optionalChain([form, 'access', _60 => _60.group, 'optionalCall', _61 => _61(panel)]);
1813
+ const group = _optionalChain([form, 'access', _65 => _65.group, 'optionalCall', _66 => _66(panel)]);
1814
+ const [collapsed, setCollapsed] = _react.useState.call(void 0, /* @__PURE__ */ new Set());
1815
+ const [drag, setDrag] = _react.useState.call(void 0, null);
1816
+ const [heights, setHeights] = _react.useState.call(void 0, {});
1817
+ const dragging = _react.useRef.call(void 0, null);
1818
+ const [wasEdited, setWasEdited] = _react.useState.call(void 0, _optionalChain([group, 'optionalAccess', _67 => _67.edited]));
1819
+ if (group && group.edited !== wasEdited) {
1820
+ setWasEdited(group.edited);
1821
+ if (!group.edited) setCollapsed(/* @__PURE__ */ new Set());
1822
+ }
1794
1823
  if (!group) return null;
1795
1824
  const label = panel.options.itemTitle || "Item";
1796
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.ScrollView, { style: styles7.fill, contentContainerStyle: styles7.list, nestedScrollEnabled: true, keyboardShouldPersistTaps: "handled", children: [
1825
+ const collapseFilled = (except) => setCollapsed(new Set(group.items.filter((i) => i.key !== except && !_chunkQIBL3YULjs.isEmptyItem.call(void 0, panel, i.values)).map((i) => i.key)));
1826
+ const toggle = (key) => setCollapsed((c) => {
1827
+ const next = new Set(c);
1828
+ if (!next.delete(key)) next.add(key);
1829
+ return next;
1830
+ });
1831
+ const setDragging = (d) => {
1832
+ dragging.current = d;
1833
+ setDrag(d);
1834
+ };
1835
+ const span = (key) => (_nullishCoalesce(heights[key], () => ( 0))) + GAP;
1836
+ const keys = group.items.map((i) => i.key);
1837
+ const startDrag = (key, e) => setDragging({ key, from: keys.indexOf(key), startY: e.nativeEvent.pageY, dy: 0 });
1838
+ const moveDrag = (e) => {
1839
+ const d = dragging.current;
1840
+ if (d) setDragging({ ...d, dy: e.nativeEvent.pageY - d.startY });
1841
+ };
1842
+ const dropDrag = () => {
1843
+ const d = dragging.current;
1844
+ setDragging(null);
1845
+ if (!d) return;
1846
+ const to2 = dropIndex(d.from, d.dy, keys, span);
1847
+ for (let i = d.from; i !== to2; i += to2 > i ? 1 : -1) group.move(i, to2 > i ? 1 : -1);
1848
+ };
1849
+ const endDrag = () => setDragging(null);
1850
+ const to = drag ? dropIndex(drag.from, drag.dy, keys, span) : -1;
1851
+ const shift = (i, key) => {
1852
+ if (!drag) return void 0;
1853
+ if (key === drag.key) return drag.dy;
1854
+ const room = span(drag.key);
1855
+ if (drag.from < i && i <= to) return -room;
1856
+ if (to <= i && i < drag.from) return room;
1857
+ return 0;
1858
+ };
1859
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.ScrollView, { style: styles7.fill, contentContainerStyle: styles7.list, nestedScrollEnabled: true, keyboardShouldPersistTaps: "handled", scrollEnabled: !drag, children: [
1797
1860
  group.items.map((item, i) => {
1798
1861
  const named = panel.options.titleFrom ? titleText(item.values[panel.options.titleFrom]) : void 0;
1799
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItemCard, { panel, group, form, index: i, title: _nullishCoalesce(named, () => ( `${label} ${i + 1}`)), last: i === group.items.length - 1 }, item.key);
1862
+ const title = _nullishCoalesce(named, () => ( `${label} ${i + 1}`));
1863
+ const troubled = _chunkQIBL3YULjs.groupFields.call(void 0, panel).some((f) => group.fieldProblem(i, f.options.metric));
1864
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1865
+ ItemCard,
1866
+ {
1867
+ panel,
1868
+ group,
1869
+ form,
1870
+ index: i,
1871
+ title,
1872
+ last: i === group.items.length - 1,
1873
+ collapsed: collapsed.has(item.key) && !troubled,
1874
+ onToggle: () => toggle(item.key),
1875
+ onDuplicate: () => {
1876
+ collapseFilled();
1877
+ group.duplicate(i);
1878
+ },
1879
+ dragOffset: shift(i, item.key),
1880
+ lifted: _optionalChain([drag, 'optionalAccess', _68 => _68.key]) === item.key,
1881
+ onLayout: (h) => setHeights((all) => all[item.key] === h ? all : { ...all, [item.key]: h }),
1882
+ handle: {
1883
+ onStartShouldSetResponder: () => true,
1884
+ onMoveShouldSetResponder: () => true,
1885
+ onResponderTerminationRequest: () => false,
1886
+ onResponderGrant: (e) => startDrag(item.key, e),
1887
+ onResponderMove: moveDrag,
1888
+ onResponderRelease: dropDrag,
1889
+ onResponderTerminate: endDrag
1890
+ }
1891
+ },
1892
+ item.key
1893
+ );
1800
1894
  }),
1801
1895
  group.canAdd && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1802
1896
  _reactnative.Pressable,
1803
1897
  {
1804
- onPress: group.add,
1898
+ onPress: () => {
1899
+ collapseFilled();
1900
+ group.add();
1901
+ },
1805
1902
  accessibilityRole: "button",
1806
1903
  style: ({ pressed }) => [styles7.add, { borderColor: theme.accent, opacity: pressed ? 0.7 : 1 }],
1807
1904
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.Text, { style: { color: theme.accent, fontWeight: "600" }, children: [
@@ -1812,9 +1909,9 @@ function InputGroupBody({ panel }) {
1812
1909
  )
1813
1910
  ] });
1814
1911
  }
1815
- function ItemCard({ panel, group, form, index, title, last }) {
1912
+ function ItemCard({ panel, group, form, index, title, last, collapsed, onToggle, onDuplicate, dragOffset, lifted, onLayout, handle }) {
1816
1913
  const theme = useDashTheme();
1817
- const fields = _react.useMemo.call(void 0, () => _chunkYUXA7I4Jjs.groupFields.call(void 0, panel), [panel]);
1914
+ const fields = _react.useMemo.call(void 0, () => _chunkQIBL3YULjs.groupFields.call(void 0, panel), [panel]);
1818
1915
  const item = group.items[index];
1819
1916
  const scoped = _react.useMemo.call(void 0,
1820
1917
  () => ({
@@ -1838,32 +1935,56 @@ function ItemCard({ panel, group, form, index, title, last }) {
1838
1935
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: { color: theme.textSecondary, fontSize: 15 }, children: text })
1839
1936
  }
1840
1937
  );
1841
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: [styles7.item, { borderColor: theme.border }], children: [
1842
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles7.itemHeader, children: [
1843
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles7.itemTitle, { color: theme.text }], numberOfLines: 1, children: title }),
1844
- button("\u2191", () => group.move(index, -1), `Move ${title} up`, index === 0),
1845
- button("\u2193", () => group.move(index, 1), `Move ${title} down`, last),
1846
- button("\u29C9", () => group.duplicate(index), `Duplicate ${title}`, !group.canAdd),
1847
- button("\u2715", () => group.remove(index), `Remove ${title}`)
1848
- ] }),
1849
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InputFormContext.Provider, { value: scoped, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: styles7.fields, children: fields.map((f) => {
1850
- const problem = _optionalChain([scoped, 'access', _62 => _62.problem, 'optionalCall', _63 => _63(f.options.metric)]);
1851
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: [styles7.field, { width: `${Math.min(24, Math.max(1, f.gridPos.w)) / 24 * 100}%` }], children: [
1852
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles7.fieldHeader, children: [
1853
- !!f.title && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles7.fieldTitle, { color: theme.textSecondary }], numberOfLines: 1, children: f.title }),
1854
- !!problem && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles7.problem, { color: theme.danger }], numberOfLines: 1, accessibilityRole: "alert", children: problem })
1938
+ const summary = collapsed ? fields.filter((f) => f.options.metric !== panel.options.titleFrom).map((f) => summaryText(f, item.values[f.options.metric])).filter(Boolean).join(" \xB7 ") : "";
1939
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1940
+ _reactnative.View,
1941
+ {
1942
+ onLayout: (e) => onLayout(e.nativeEvent.layout.height),
1943
+ style: [
1944
+ styles7.item,
1945
+ { borderColor: lifted ? theme.accent : theme.border, backgroundColor: theme.surface },
1946
+ !!dragOffset && { transform: [{ translateY: dragOffset }] },
1947
+ lifted && { zIndex: 1, opacity: 0.95 }
1948
+ ],
1949
+ children: [
1950
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles7.itemHeader, children: [
1951
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { ...handle, style: styles7.handle, accessibilityLabel: `Drag ${title} to reorder`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: { color: theme.textMuted, fontSize: 16 }, children: "\u2261" }) }),
1952
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.Pressable, { onPress: onToggle, style: styles7.titleArea, accessibilityRole: "button", accessibilityLabel: `${collapsed ? "Expand" : "Collapse"} ${title}`, accessibilityState: { expanded: !collapsed }, children: [
1953
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.Text, { style: [styles7.itemTitle, { color: theme.text }], numberOfLines: 1, children: [
1954
+ collapsed ? "\u25B8 " : "\u25BE ",
1955
+ title
1956
+ ] }),
1957
+ !!summary && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles7.summary, { color: theme.textSecondary }], numberOfLines: 1, children: summary })
1958
+ ] }),
1959
+ button("\u2191", () => group.move(index, -1), `Move ${title} up`, index === 0),
1960
+ button("\u2193", () => group.move(index, 1), `Move ${title} down`, last),
1961
+ button("\u29C9", onDuplicate, `Duplicate ${title}`, !group.canAdd),
1962
+ button("\u2715", () => group.remove(index), `Remove ${title}`)
1855
1963
  ] }),
1856
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: styles7.fieldBody, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InputPanelBody, { panel: f }) })
1857
- ] }, f.options.metric);
1858
- }) }) })
1859
- ] });
1964
+ !collapsed && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InputFormContext.Provider, { value: scoped, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: styles7.fields, children: fields.map((f) => {
1965
+ const problem = _optionalChain([scoped, 'access', _69 => _69.problem, 'optionalCall', _70 => _70(f.options.metric)]);
1966
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: [styles7.field, { width: `${Math.min(24, Math.max(1, f.gridPos.w)) / 24 * 100}%` }], children: [
1967
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles7.fieldHeader, children: [
1968
+ !!f.title && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles7.fieldTitle, { color: theme.textSecondary }], numberOfLines: 1, children: f.title }),
1969
+ !!problem && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles7.problem, { color: theme.danger }], numberOfLines: 1, accessibilityRole: "alert", children: problem })
1970
+ ] }),
1971
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: styles7.fieldBody, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InputPanelBody, { panel: f }) })
1972
+ ] }, f.options.metric);
1973
+ }) }) })
1974
+ ]
1975
+ }
1976
+ );
1860
1977
  }
1861
1978
  var styles7 = _reactnative.StyleSheet.create({
1862
1979
  fill: { flex: 1 },
1863
1980
  list: { gap: 8, paddingBottom: 4 },
1864
1981
  item: { borderWidth: 1, borderRadius: 8, padding: 8, gap: 6 },
1865
1982
  itemHeader: { flexDirection: "row", alignItems: "center", gap: 4 },
1866
- itemTitle: { flex: 1, fontSize: 14, fontWeight: "600" },
1983
+ titleArea: { flex: 1, flexDirection: "row", alignItems: "baseline", gap: 8, minHeight: 28, paddingVertical: 4 },
1984
+ itemTitle: { fontSize: 14, fontWeight: "600", flexShrink: 0, maxWidth: "60%" },
1985
+ summary: { flex: 1, fontSize: 13 },
1986
+ // Web: no text selection or page scroll from dragging the handle.
1987
+ handle: { width: 24, height: 28, alignItems: "center", justifyContent: "center", cursor: "grab", userSelect: "none", touchAction: "none" },
1867
1988
  iconBtn: { width: 28, height: 28, alignItems: "center", justifyContent: "center" },
1868
1989
  fields: { flexDirection: "row", flexWrap: "wrap", marginHorizontal: -4 },
1869
1990
  field: { paddingHorizontal: 4, paddingVertical: 4, gap: 4 },
@@ -1888,17 +2009,17 @@ function StatPanel({ panel, frames }) {
1888
2009
  const theme = useDashTheme();
1889
2010
  const values = _react.useMemo.call(void 0, () => reducedValues(panel, frames, theme.scheme), [panel, frames, theme.scheme]);
1890
2011
  if (!values.length) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, NoData, {});
1891
- const horizontal = _optionalChain([panel, 'access', _64 => _64.options, 'optionalAccess', _65 => _65.orientation]) === "horizontal";
2012
+ const horizontal = _optionalChain([panel, 'access', _71 => _71.options, 'optionalAccess', _72 => _72.orientation]) === "horizontal";
1892
2013
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: [styles8.grid, { flexDirection: horizontal ? "column" : "row" }], children: values.map((v) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StatTile, { v, showName: values.length > 1, panel }, v.key)) });
1893
2014
  }
1894
2015
  function StatTile({ v, showName, panel }) {
1895
2016
  const theme = useDashTheme();
1896
2017
  const [size, onLayout] = useLayout();
1897
- const colorMode = _nullishCoalesce(_optionalChain([panel, 'access', _66 => _66.options, 'optionalAccess', _67 => _67.colorMode]), () => ( "value"));
1898
- const graph = (_nullishCoalesce(_optionalChain([panel, 'access', _68 => _68.options, 'optionalAccess', _69 => _69.graphMode]), () => ( "area"))) === "area" && v.sparkline.filter((x) => x != null).length > 1;
2018
+ const colorMode = _nullishCoalesce(_optionalChain([panel, 'access', _73 => _73.options, 'optionalAccess', _74 => _74.colorMode]), () => ( "value"));
2019
+ const graph = (_nullishCoalesce(_optionalChain([panel, 'access', _75 => _75.options, 'optionalAccess', _76 => _76.graphMode]), () => ( "area"))) === "area" && v.sparkline.filter((x) => x != null).length > 1;
1899
2020
  const fontSize = Math.max(18, Math.min(56, size.height * (graph ? 0.4 : 0.5), size.width / 4.5));
1900
2021
  const { resolve, openLinks } = usePanelLinks(panel);
1901
- const hasLinks = !!_optionalChain([v, 'access', _70 => _70.config, 'access', _71 => _71.links, 'optionalAccess', _72 => _72.length]);
2022
+ const hasLinks = !!_optionalChain([v, 'access', _77 => _77.config, 'access', _78 => _78.links, 'optionalAccess', _79 => _79.length]);
1902
2023
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1903
2024
  _reactnative.Pressable,
1904
2025
  {
@@ -1963,7 +2084,7 @@ function Gauge({ v, showName, panel }) {
1963
2084
  const theme = useDashTheme();
1964
2085
  const [size, onLayout] = useLayout();
1965
2086
  const { resolve, openLinks } = usePanelLinks(panel);
1966
- const hasLinks = !!_optionalChain([v, 'access', _73 => _73.config, 'access', _74 => _74.links, 'optionalAccess', _75 => _75.length]);
2087
+ const hasLinks = !!_optionalChain([v, 'access', _80 => _80.config, 'access', _81 => _81.links, 'optionalAccess', _82 => _82.length]);
1967
2088
  const min = _nullishCoalesce(v.config.min, () => ( 0));
1968
2089
  const max = _nullishCoalesce(v.config.max, () => ( 100));
1969
2090
  const frac = v.value == null ? 0 : Math.min(1, Math.max(0, (v.value - min) / (max - min || 1)));
@@ -2010,8 +2131,8 @@ function BarGaugePanel({ panel, frames }) {
2010
2131
  const min = _nullishCoalesce(v.config.min, () => ( 0));
2011
2132
  const max = _nullishCoalesce(v.config.max, () => ( Math.max(...values.map((o) => _nullishCoalesce(o.value, () => ( 0))), 1)));
2012
2133
  const frac = v.value == null ? 0 : Math.min(1, Math.max(0, (v.value - min) / (max - min || 1)));
2013
- const color = v.config.thresholds || _optionalChain([v, 'access', _76 => _76.mapped, 'optionalAccess', _77 => _77.color]) ? v.stateColor : _chunkYUXA7I4Jjs.resolveColor.call(void 0, _optionalChain([v, 'access', _78 => _78.config, 'access', _79 => _79.color, 'optionalAccess', _80 => _80.fixedColor]), v.color);
2014
- const hasLinks = !!_optionalChain([v, 'access', _81 => _81.config, 'access', _82 => _82.links, 'optionalAccess', _83 => _83.length]);
2134
+ const color = v.config.thresholds || _optionalChain([v, 'access', _83 => _83.mapped, 'optionalAccess', _84 => _84.color]) ? v.stateColor : _chunkQIBL3YULjs.resolveColor.call(void 0, _optionalChain([v, 'access', _85 => _85.config, 'access', _86 => _86.color, 'optionalAccess', _87 => _87.fixedColor]), v.color);
2135
+ const hasLinks = !!_optionalChain([v, 'access', _88 => _88.config, 'access', _89 => _89.links, 'optionalAccess', _90 => _90.length]);
2015
2136
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2016
2137
  _reactnative.Pressable,
2017
2138
  {
@@ -2074,8 +2195,8 @@ var TILE_LAYERS = /* @__PURE__ */ new Set(["default", "carto", "esri-xyz", "xyz"
2074
2195
  var fillTemplate = (template, z, x, y) => template.replace("{z}", String(z)).replace("{x}", String(x)).replace("{-y}", String(2 ** z - 1 - y)).replace("{y}", String(y));
2075
2196
  var stripTags = (html) => html.replace(/<[^>]*>/g, "").replace(/&copy;/g, "\xA9").trim();
2076
2197
  function tileSource(layer, scheme, retina = false) {
2077
- const config = _nullishCoalesce(_optionalChain([layer, 'optionalAccess', _84 => _84.config]), () => ( {}));
2078
- switch (_optionalChain([layer, 'optionalAccess', _85 => _85.type])) {
2198
+ const config = _nullishCoalesce(_optionalChain([layer, 'optionalAccess', _91 => _91.config]), () => ( {}));
2199
+ switch (_optionalChain([layer, 'optionalAccess', _92 => _92.type])) {
2079
2200
  case "osm-standard":
2080
2201
  return { url: (z, x, y) => `https://tile.openstreetmap.org/${z}/${x}/${y}.png`, maxZoom: 19, attribution: "\xA9 OpenStreetMap contributors" };
2081
2202
  case "esri-xyz": {
@@ -2136,11 +2257,11 @@ var REGIONS = {
2136
2257
  oceania: { lat: -10, lon: -140, zoom: 3 }
2137
2258
  };
2138
2259
  function zoomLimits(panel) {
2139
- const v = _nullishCoalesce(_optionalChain([panel, 'access', _86 => _86.options, 'optionalAccess', _87 => _87.view]), () => ( {}));
2260
+ const v = _nullishCoalesce(_optionalChain([panel, 'access', _93 => _93.options, 'optionalAccess', _94 => _94.view]), () => ( {}));
2140
2261
  return [_nullishCoalesce(v.minZoom, () => ( 0)), _nullishCoalesce(v.maxZoom, () => ( MAX_ZOOM))];
2141
2262
  }
2142
2263
  function initialView(panel, layers, width, height) {
2143
- const v = _nullishCoalesce(_optionalChain([panel, 'access', _88 => _88.options, 'optionalAccess', _89 => _89.view]), () => ( {}));
2264
+ const v = _nullishCoalesce(_optionalChain([panel, 'access', _95 => _95.options, 'optionalAccess', _96 => _96.view]), () => ( {}));
2144
2265
  const [minZoom, maxZoom] = zoomLimits(panel);
2145
2266
  const limit = (view) => ({ ...view, zoom: clamp(view.zoom, minZoom, maxZoom) });
2146
2267
  if (v.id === "coords") return limit({ lat: _nullishCoalesce(v.lat, () => ( 0)), lon: _nullishCoalesce(v.lon, () => ( 0)), zoom: _nullishCoalesce(v.zoom, () => ( 1)) });
@@ -2173,7 +2294,7 @@ function geomapLayers(panel, frames, scheme, retina = false, gazetteers = {}) {
2173
2294
  const o = _nullishCoalesce(panel.options, () => ( {}));
2174
2295
  const out = [];
2175
2296
  const basemap = o.basemap;
2176
- out.push({ type: "tiles", key: "basemap", name: _nullishCoalesce(_optionalChain([basemap, 'optionalAccess', _90 => _90.name]), () => ( "Basemap")), opacity: _nullishCoalesce(_optionalChain([basemap, 'optionalAccess', _91 => _91.opacity]), () => ( 1)), source: tileSource(basemap, scheme, retina) });
2297
+ out.push({ type: "tiles", key: "basemap", name: _nullishCoalesce(_optionalChain([basemap, 'optionalAccess', _97 => _97.name]), () => ( "Basemap")), opacity: _nullishCoalesce(_optionalChain([basemap, 'optionalAccess', _98 => _98.opacity]), () => ( 1)), source: tileSource(basemap, scheme, retina) });
2177
2298
  const multiple = frames.length > 1;
2178
2299
  (_nullishCoalesce(o.layers, () => ( DEFAULT_LAYERS))).forEach((layer, li) => {
2179
2300
  const key = `${li}/${layer.type}`;
@@ -2186,12 +2307,12 @@ function geomapLayers(panel, frames, scheme, retina = false, gazetteers = {}) {
2186
2307
  }
2187
2308
  if (!isDataLayer(layer.type)) return;
2188
2309
  const filter = layer.filterData;
2189
- const chosen = _optionalChain([filter, 'optionalAccess', _92 => _92.id]) === "byRefId" && filter.options ? frames.filter((f) => f.refId === filter.options) : frames;
2310
+ const chosen = _optionalChain([filter, 'optionalAccess', _99 => _99.id]) === "byRefId" && filter.options ? frames.filter((f) => f.refId === filter.options) : frames;
2190
2311
  const style = _nullishCoalesce(config.style, () => ( {}));
2191
2312
  const color = _nullishCoalesce(style.color, () => ( {}));
2192
2313
  const size = _nullishCoalesce(style.size, () => ( {}));
2193
2314
  const text = style.text;
2194
- const fixedColor = _chunkYUXA7I4Jjs.resolveColor.call(void 0, _nullishCoalesce(color.fixed, () => ( "dark-green")), "#37872D");
2315
+ const fixedColor = _chunkQIBL3YULjs.resolveColor.call(void 0, _nullishCoalesce(color.fixed, () => ( "dark-green")), "#37872D");
2195
2316
  const heat = layer.type === "heatmap";
2196
2317
  const weight = _nullishCoalesce(config.weight, () => ( {}));
2197
2318
  const legend = [];
@@ -2203,14 +2324,14 @@ function geomapLayers(panel, frames, scheme, retina = false, gazetteers = {}) {
2203
2324
  let { xs, ys } = located;
2204
2325
  if (layer.type === "lastPointTracker" && rows.length) [rows, xs, ys] = [rows.slice(-1), xs.slice(-1), ys.slice(-1)];
2205
2326
  const find = (field) => field ? fieldByName(frame, field, multiple) : void 0;
2206
- const configOf = (f) => _chunkYUXA7I4Jjs.resolveFieldConfig.call(void 0, panel, f, frame, _chunkYUXA7I4Jjs.fieldDisplayName.call(void 0, f, frame, multiple));
2327
+ const configOf = (f) => _chunkQIBL3YULjs.resolveFieldConfig.call(void 0, panel, f, frame, _chunkQIBL3YULjs.fieldDisplayName.call(void 0, f, frame, multiple));
2207
2328
  let colors = rows.map(() => fixedColor);
2208
2329
  const colorField = !heat ? find(color.field) : void 0;
2209
2330
  if (colorField) {
2210
2331
  const cConfig = configOf(colorField);
2211
2332
  const values = rows.map((i) => num(colorField.values[i]));
2212
2333
  const extent = range(values);
2213
- colors = values.map((v) => _chunkYUXA7I4Jjs.valueColor.call(void 0, v, cConfig, fixedColor, extent));
2334
+ colors = values.map((v) => _chunkQIBL3YULjs.valueColor.call(void 0, v, cConfig, fixedColor, extent));
2214
2335
  if (showsLegend(layer) && legend.length === 0) legend.push(...thresholdLegend(`${key}/${frames.indexOf(frame)}`, cConfig, fixedColor));
2215
2336
  }
2216
2337
  const dim = heat ? weight : size;
@@ -2246,7 +2367,7 @@ function geomapLayers(panel, frames, scheme, retina = false, gazetteers = {}) {
2246
2367
  name,
2247
2368
  opacity,
2248
2369
  points,
2249
- symbol: markerSymbol(_optionalChain([style, 'access', _93 => _93.symbol, 'optionalAccess', _94 => _94.fixed])),
2370
+ symbol: markerSymbol(_optionalChain([style, 'access', _100 => _100.symbol, 'optionalAccess', _101 => _101.fixed])),
2250
2371
  fillOpacity: _nullishCoalesce(style.opacity, () => ( 0.4)),
2251
2372
  fontSize: _nullishCoalesce(textConfig.fontSize, () => ( 12)),
2252
2373
  labelOffset: [_nullishCoalesce(textConfig.offsetX, () => ( 0)), _nullishCoalesce(textConfig.offsetY, () => ( 0))],
@@ -2257,37 +2378,37 @@ function geomapLayers(panel, frames, scheme, retina = false, gazetteers = {}) {
2257
2378
  });
2258
2379
  return out;
2259
2380
  }
2260
- var showsLegend = (layer) => _optionalChain([layer, 'access', _95 => _95.config, 'optionalAccess', _96 => _96.showLegend]) !== false;
2381
+ var showsLegend = (layer) => _optionalChain([layer, 'access', _102 => _102.config, 'optionalAccess', _103 => _103.showLegend]) !== false;
2261
2382
  function markerSymbol(path) {
2262
2383
  const name = typeof path === "string" ? path.replace(/^.*\//, "").replace(/\.svg$/, "") : "";
2263
2384
  return name === "square" || name === "triangle" || name === "star" || name === "cross" || name === "x" ? name : "circle";
2264
2385
  }
2265
2386
  function thresholdLegend(key, config, fallback) {
2266
- if (_optionalChain([config, 'access', _97 => _97.color, 'optionalAccess', _98 => _98.mode]) && config.color.mode !== "thresholds") return [];
2267
- const steps = _nullishCoalesce(_optionalChain([config, 'access', _99 => _99.thresholds, 'optionalAccess', _100 => _100.steps]), () => ( []));
2387
+ if (_optionalChain([config, 'access', _104 => _104.color, 'optionalAccess', _105 => _105.mode]) && config.color.mode !== "thresholds") return [];
2388
+ const steps = _nullishCoalesce(_optionalChain([config, 'access', _106 => _106.thresholds, 'optionalAccess', _107 => _107.steps]), () => ( []));
2268
2389
  if (steps.length < 2) return [];
2269
2390
  return steps.map((s, i) => ({
2270
2391
  key: `${key}/${i}`,
2271
- name: s.value == null ? `< ${_chunkYUXA7I4Jjs.formatValue.call(void 0, steps[i + 1].value, config)}` : `${_chunkYUXA7I4Jjs.formatValue.call(void 0, s.value, config)}+`,
2272
- color: _chunkYUXA7I4Jjs.resolveColor.call(void 0, s.color, fallback)
2392
+ name: s.value == null ? `< ${_chunkQIBL3YULjs.formatValue.call(void 0, steps[i + 1].value, config)}` : `${_chunkQIBL3YULjs.formatValue.call(void 0, s.value, config)}+`,
2393
+ color: _chunkQIBL3YULjs.resolveColor.call(void 0, s.color, fallback)
2273
2394
  }));
2274
2395
  }
2275
2396
  var isDataLayer = (type) => type === "markers" || type === "heatmap" || type === "route" || type === "lastPointTracker";
2276
2397
  var lookupField = (frame) => frame.fields.find((f) => f.name.toLowerCase() === "lookup");
2277
2398
  function gazetteerPaths(panel, frames) {
2278
2399
  const paths = /* @__PURE__ */ new Set();
2279
- for (const layer of _nullishCoalesce(_optionalChain([panel, 'access', _101 => _101.options, 'optionalAccess', _102 => _102.layers]), () => ( DEFAULT_LAYERS))) {
2400
+ for (const layer of _nullishCoalesce(_optionalChain([panel, 'access', _108 => _108.options, 'optionalAccess', _109 => _109.layers]), () => ( DEFAULT_LAYERS))) {
2280
2401
  if (!isDataLayer(layer.type)) continue;
2281
- const mode = _nullishCoalesce(_optionalChain([layer, 'access', _103 => _103.location, 'optionalAccess', _104 => _104.mode]), () => ( "auto"));
2282
- if (mode === "lookup") paths.add(_optionalChain([layer, 'access', _105 => _105.location, 'optionalAccess', _106 => _106.gazetteer]) || _chunkYUXA7I4Jjs.DEFAULT_GAZETTEER);
2283
- else if (mode === "auto" && frames.some(lookupField)) paths.add(_chunkYUXA7I4Jjs.DEFAULT_GAZETTEER);
2402
+ const mode = _nullishCoalesce(_optionalChain([layer, 'access', _110 => _110.location, 'optionalAccess', _111 => _111.mode]), () => ( "auto"));
2403
+ if (mode === "lookup") paths.add(_optionalChain([layer, 'access', _112 => _112.location, 'optionalAccess', _113 => _113.gazetteer]) || _chunkQIBL3YULjs.DEFAULT_GAZETTEER);
2404
+ else if (mode === "auto" && frames.some(lookupField)) paths.add(_chunkQIBL3YULjs.DEFAULT_GAZETTEER);
2284
2405
  }
2285
2406
  return [...paths];
2286
2407
  }
2287
2408
  var LAT_NAMES = ["lat", "latitude"];
2288
2409
  var LON_NAMES = ["lon", "lng", "long", "longitude"];
2289
2410
  function fieldByName(frame, name, multiple) {
2290
- return _nullishCoalesce(frame.fields.find((f) => f.name === name), () => ( frame.fields.find((f) => _chunkYUXA7I4Jjs.fieldDisplayName.call(void 0, f, frame, multiple) === name)));
2411
+ return _nullishCoalesce(frame.fields.find((f) => f.name === name), () => ( frame.fields.find((f) => _chunkQIBL3YULjs.fieldDisplayName.call(void 0, f, frame, multiple) === name)));
2291
2412
  }
2292
2413
  function locate2(frame, location = {}, gazetteers = {}) {
2293
2414
  const mode = _nullishCoalesce(location.mode, () => ( "auto"));
@@ -2306,10 +2427,10 @@ function locate2(frame, location = {}, gazetteers = {}) {
2306
2427
  lat = named(LAT_NAMES);
2307
2428
  lon = named(LON_NAMES);
2308
2429
  if (!lat || !lon) hash = named(["geohash"]);
2309
- if ((!lat || !lon) && !hash) [lookup, gazetteer] = [lookupField(frame), gazetteers[_chunkYUXA7I4Jjs.DEFAULT_GAZETTEER]];
2430
+ if ((!lat || !lon) && !hash) [lookup, gazetteer] = [lookupField(frame), gazetteers[_chunkQIBL3YULjs.DEFAULT_GAZETTEER]];
2310
2431
  } else if (mode === "lookup") {
2311
2432
  lookup = location.lookup ? fieldByName(frame, location.lookup, false) : lookupField(frame);
2312
- gazetteer = gazetteers[location.gazetteer || _chunkYUXA7I4Jjs.DEFAULT_GAZETTEER];
2433
+ gazetteer = gazetteers[location.gazetteer || _chunkQIBL3YULjs.DEFAULT_GAZETTEER];
2313
2434
  }
2314
2435
  const rows = [];
2315
2436
  const xs = [];
@@ -2358,8 +2479,8 @@ function decodeGeohash(hash) {
2358
2479
  }
2359
2480
  function cellText(field, v, config) {
2360
2481
  if (v == null) return "";
2361
- if (field.type === "number") return _chunkYUXA7I4Jjs.formatDisplay.call(void 0, Number(v), config);
2362
- if (field.type === "time") return new Date(_chunkYUXA7I4Jjs.toMillis.call(void 0, v)).toLocaleString();
2482
+ if (field.type === "number") return _chunkQIBL3YULjs.formatDisplay.call(void 0, Number(v), config);
2483
+ if (field.type === "time") return new Date(_chunkQIBL3YULjs.toMillis.call(void 0, v)).toLocaleString();
2363
2484
  return String(v);
2364
2485
  }
2365
2486
  function num(v) {
@@ -2499,13 +2620,13 @@ function GeomapPanel({ panel, frames }) {
2499
2620
  ])
2500
2621
  );
2501
2622
  }, [layers, view, size.width, size.height]);
2502
- const tooltips = _optionalChain([panel, 'access', _107 => _107.options, 'optionalAccess', _108 => _108.tooltip, 'optionalAccess', _109 => _109.mode]) !== "none";
2623
+ const tooltips = _optionalChain([panel, 'access', _114 => _114.options, 'optionalAccess', _115 => _115.tooltip, 'optionalAccess', _116 => _116.mode]) !== "none";
2503
2624
  const pick = (x, y) => {
2504
2625
  let best = null;
2505
2626
  let bestD = HIT_PX * HIT_PX;
2506
2627
  for (const l of layers) {
2507
2628
  if (l.type === "tiles" || l.type === "heatmap" || !l.tooltip) continue;
2508
- _optionalChain([screen, 'access', _110 => _110.get, 'call', _111 => _111(l.key), 'optionalAccess', _112 => _112.forEach, 'call', _113 => _113(({ px, py }, group) => {
2629
+ _optionalChain([screen, 'access', _117 => _117.get, 'call', _118 => _118(l.key), 'optionalAccess', _119 => _119.forEach, 'call', _120 => _120(({ px, py }, group) => {
2509
2630
  for (let i = 0; i < px.length; i++) {
2510
2631
  const d = (px[i] - x) ** 2 + (py[i] - y) ** 2;
2511
2632
  if (d <= bestD) {
@@ -2555,7 +2676,7 @@ function GeomapPanel({ panel, frames }) {
2555
2676
  }
2556
2677
  };
2557
2678
  const shown = picked && resolvePicked(layers, screen, picked);
2558
- const controls = _nullishCoalesce(_optionalChain([panel, 'access', _114 => _114.options, 'optionalAccess', _115 => _115.controls]), () => ( {}));
2679
+ const controls = _nullishCoalesce(_optionalChain([panel, 'access', _121 => _121.options, 'optionalAccess', _122 => _122.controls]), () => ( {}));
2559
2680
  const attribution = [...new Set(layers.flatMap((l) => l.type === "tiles" && l.source.attribution ? [l.source.attribution] : []))].join(" ");
2560
2681
  const legend = layers.flatMap((l) => l.type === "markers" || l.type === "route" ? l.legend : []);
2561
2682
  const ready = size.width > 0 && size.height > 0;
@@ -2609,17 +2730,17 @@ function useGazetteers(panel, frames) {
2609
2730
  let live = true;
2610
2731
  let ds;
2611
2732
  try {
2612
- ds = _optionalChain([resolve, 'optionalCall', _116 => _116(_chunkYUXA7I4Jjs.normalizeRef.call(void 0, panel.datasource))]);
2733
+ ds = _optionalChain([resolve, 'optionalCall', _123 => _123(_chunkQIBL3YULjs.normalizeRef.call(void 0, panel.datasource))]);
2613
2734
  } catch (e5) {
2614
2735
  }
2615
2736
  const paths = key.split("\n");
2616
- Promise.allSettled(paths.map((p) => _chunkYUXA7I4Jjs.loadGazetteer.call(void 0, p, ds))).then((results) => {
2737
+ Promise.allSettled(paths.map((p) => _chunkQIBL3YULjs.loadGazetteer.call(void 0, p, ds))).then((results) => {
2617
2738
  if (!live) return;
2618
2739
  const gazetteers = {};
2619
2740
  const errors = [];
2620
2741
  results.forEach((r, i) => {
2621
2742
  if (r.status === "fulfilled") gazetteers[paths[i]] = r.value;
2622
- else errors.push(`Couldn't load ${paths[i]}: ${_nullishCoalesce(_optionalChain([r, 'access', _117 => _117.reason, 'optionalAccess', _118 => _118.message]), () => ( r.reason))}`);
2743
+ else errors.push(`Couldn't load ${paths[i]}: ${_nullishCoalesce(_optionalChain([r, 'access', _124 => _124.reason, 'optionalAccess', _125 => _125.message]), () => ( r.reason))}`);
2623
2744
  });
2624
2745
  setState({ key, gazetteers, error: errors.join("\n") || void 0 });
2625
2746
  });
@@ -2671,7 +2792,7 @@ function markerPaths(layer, screen, width, height, textColor) {
2671
2792
  if (px[i] < -r || px[i] > width + r || py[i] < -r || py[i] > height + r) continue;
2672
2793
  const parts = _nullishCoalesce(byColor.get(p.colors[i]), () => ( byColor.set(p.colors[i], []).get(p.colors[i])));
2673
2794
  parts.push(symbolPath(layer.symbol, px[i], py[i], r));
2674
- const label = _optionalChain([p, 'access', _119 => _119.labels, 'optionalAccess', _120 => _120[i]]);
2795
+ const label = _optionalChain([p, 'access', _126 => _126.labels, 'optionalAccess', _127 => _127[i]]);
2675
2796
  if (label && labels.length < MAX_LABELS)
2676
2797
  labels.push(
2677
2798
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -2710,7 +2831,7 @@ function resolvePicked(layers, screen, picked) {
2710
2831
  const layer = layers.find((l) => l.key === picked.layer);
2711
2832
  if (!layer || layer.type !== "markers" && layer.type !== "route") return null;
2712
2833
  const p = layer.points[picked.group];
2713
- const s = _optionalChain([screen, 'access', _121 => _121.get, 'call', _122 => _122(layer.key), 'optionalAccess', _123 => _123[picked.group]]);
2834
+ const s = _optionalChain([screen, 'access', _128 => _128.get, 'call', _129 => _129(layer.key), 'optionalAccess', _130 => _130[picked.group]]);
2714
2835
  if (!p || !s || picked.index >= p.rows.length) return null;
2715
2836
  return {
2716
2837
  layer,
@@ -2748,7 +2869,7 @@ var styles10 = _reactnative.StyleSheet.create({
2748
2869
  var DEFAULT_WIDTH = 120;
2749
2870
  function cellType(config) {
2750
2871
  const custom = _nullishCoalesce(config.custom, () => ( {}));
2751
- const type = _nullishCoalesce(_optionalChain([custom, 'access', _124 => _124.cellOptions, 'optionalAccess', _125 => _125.type]), () => ( custom.displayMode));
2872
+ const type = _nullishCoalesce(_optionalChain([custom, 'access', _131 => _131.cellOptions, 'optionalAccess', _132 => _132.type]), () => ( custom.displayMode));
2752
2873
  if (type === "color-text" || type === "color-background" || type === "gauge") return type;
2753
2874
  if (type === "color-background-solid") return "color-background";
2754
2875
  if (type === "gradient-gauge" || type === "lcd-gauge" || type === "basic") return "gauge";
@@ -2756,10 +2877,10 @@ function cellType(config) {
2756
2877
  }
2757
2878
  function tableColumns(panel, frame, multipleFrames = false) {
2758
2879
  return frame.fields.flatMap((field, i) => {
2759
- const raw = _chunkYUXA7I4Jjs.fieldDisplayName.call(void 0, field, frame, multipleFrames);
2760
- const config = _chunkYUXA7I4Jjs.resolveFieldConfig.call(void 0, panel, field, frame, raw);
2880
+ const raw = _chunkQIBL3YULjs.fieldDisplayName.call(void 0, field, frame, multipleFrames);
2881
+ const config = _chunkQIBL3YULjs.resolveFieldConfig.call(void 0, panel, field, frame, raw);
2761
2882
  const custom = _nullishCoalesce(config.custom, () => ( {}));
2762
- if (custom.hidden || _optionalChain([custom, 'access', _126 => _126.hideFrom, 'optionalAccess', _127 => _127.viz])) return [];
2883
+ if (custom.hidden || _optionalChain([custom, 'access', _133 => _133.hideFrom, 'optionalAccess', _134 => _134.viz])) return [];
2763
2884
  const numeric = field.type === "number";
2764
2885
  const align = custom.align === "left" || custom.align === "center" || custom.align === "right" ? custom.align : numeric ? "right" : "left";
2765
2886
  const type = cellType(config);
@@ -2772,8 +2893,8 @@ function tableColumns(panel, frame, multipleFrames = false) {
2772
2893
  width: Math.max(Number(custom.width) || DEFAULT_WIDTH, Number(custom.minWidth) || 0),
2773
2894
  align,
2774
2895
  cellType: type,
2775
- applyToRow: type === "color-background" && !!_optionalChain([custom, 'access', _128 => _128.cellOptions, 'optionalAccess', _129 => _129.applyToRow]),
2776
- wrap: !!_optionalChain([custom, 'access', _130 => _130.cellOptions, 'optionalAccess', _131 => _131.wrapText]),
2896
+ applyToRow: type === "color-background" && !!_optionalChain([custom, 'access', _135 => _135.cellOptions, 'optionalAccess', _136 => _136.applyToRow]),
2897
+ wrap: !!_optionalChain([custom, 'access', _137 => _137.cellOptions, 'optionalAccess', _138 => _138.wrapText]),
2777
2898
  extent: numeric ? extentOf(field.values) : void 0,
2778
2899
  reducers: footerReducers(panel, config, [field.name, _nullishCoalesce(config.displayName, () => ( raw))])
2779
2900
  }
@@ -2781,11 +2902,11 @@ function tableColumns(panel, frame, multipleFrames = false) {
2781
2902
  });
2782
2903
  }
2783
2904
  function footerReducers(panel, config, names) {
2784
- const own = _optionalChain([config, 'access', _132 => _132.custom, 'optionalAccess', _133 => _133.footer, 'optionalAccess', _134 => _134.reducers]);
2785
- if (_optionalChain([own, 'optionalAccess', _135 => _135.length])) return own;
2786
- const legacy = _optionalChain([panel, 'access', _136 => _136.options, 'optionalAccess', _137 => _137.footer]);
2787
- if (!_optionalChain([legacy, 'optionalAccess', _138 => _138.show])) return [];
2788
- const reducer = _optionalChain([legacy, 'access', _139 => _139.reducer, 'optionalAccess', _140 => _140.length]) ? legacy.reducer : ["sum"];
2905
+ const own = _optionalChain([config, 'access', _139 => _139.custom, 'optionalAccess', _140 => _140.footer, 'optionalAccess', _141 => _141.reducers]);
2906
+ if (_optionalChain([own, 'optionalAccess', _142 => _142.length])) return own;
2907
+ const legacy = _optionalChain([panel, 'access', _143 => _143.options, 'optionalAccess', _144 => _144.footer]);
2908
+ if (!_optionalChain([legacy, 'optionalAccess', _145 => _145.show])) return [];
2909
+ const reducer = _optionalChain([legacy, 'access', _146 => _146.reducer, 'optionalAccess', _147 => _147.length]) ? legacy.reducer : ["sum"];
2789
2910
  if (legacy.countRows && reducer[0] === "count") return ["countAll"];
2790
2911
  const fields = Array.isArray(legacy.fields) ? legacy.fields : legacy.fields ? [legacy.fields] : [];
2791
2912
  return !fields.length || names.some((n) => fields.includes(n)) ? reducer : [];
@@ -2800,16 +2921,16 @@ function tableFooter(columns) {
2800
2921
  counted = true;
2801
2922
  return [{ label: "Count", text: String(c.field.values.length) }];
2802
2923
  }
2803
- if (!_chunkYUXA7I4Jjs.isReducer.call(void 0, r)) return [];
2804
- const label = _chunkYUXA7I4Jjs.REDUCER_LABELS[r];
2924
+ if (!_chunkQIBL3YULjs.isReducer.call(void 0, r)) return [];
2925
+ const label = _chunkQIBL3YULjs.REDUCER_LABELS[r];
2805
2926
  if (r === "count") return [{ label, text: String(c.field.values.length) }];
2806
2927
  if (c.field.type !== "number") {
2807
2928
  if (r === "distinctCount") return [{ label, text: String(new Set(c.field.values.filter((v) => v != null)).size) }];
2808
2929
  return [];
2809
2930
  }
2810
- const value = _chunkYUXA7I4Jjs.reduce.call(void 0, c.field.values.map((v) => v == null ? null : Number(v)), r);
2931
+ const value = _chunkQIBL3YULjs.reduce.call(void 0, c.field.values.map((v) => v == null ? null : Number(v)), r);
2811
2932
  const counts = r === "distinctCount" || r === "changeCount";
2812
- return [{ label, text: counts ? String(_nullishCoalesce(value, () => ( 0))) : _chunkYUXA7I4Jjs.formatValue.call(void 0, value, c.config) }];
2933
+ return [{ label, text: counts ? String(_nullishCoalesce(value, () => ( 0))) : _chunkQIBL3YULjs.formatValue.call(void 0, value, c.config) }];
2813
2934
  });
2814
2935
  return lines.length === 1 && lines[0].label !== "Count" ? [{ text: lines[0].text }] : lines;
2815
2936
  });
@@ -2828,17 +2949,17 @@ function extentOf(values) {
2828
2949
  }
2829
2950
  function cellDisplay(col, raw, fallbackColor) {
2830
2951
  const { config, field } = col;
2831
- const mapped = _chunkYUXA7I4Jjs.mappedResult.call(void 0, raw, config);
2952
+ const mapped = _chunkQIBL3YULjs.mappedResult.call(void 0, raw, config);
2832
2953
  const num4 = field.type === "number" && raw != null && Number.isFinite(Number(raw)) ? Number(raw) : null;
2833
- const text = _nullishCoalesce(_optionalChain([mapped, 'optionalAccess', _141 => _141.text]), () => ( (raw == null ? _nullishCoalesce(config.noValue, () => ( "")) : field.type === "number" ? _chunkYUXA7I4Jjs.formatValue.call(void 0, num4, config) : field.type === "time" ? new Date(_chunkYUXA7I4Jjs.toMillis.call(void 0, raw)).toLocaleString() : String(raw))));
2954
+ const text = _nullishCoalesce(_optionalChain([mapped, 'optionalAccess', _148 => _148.text]), () => ( (raw == null ? _nullishCoalesce(config.noValue, () => ( "")) : field.type === "number" ? _chunkQIBL3YULjs.formatValue.call(void 0, num4, config) : field.type === "time" ? new Date(_chunkQIBL3YULjs.toMillis.call(void 0, raw)).toLocaleString() : String(raw))));
2834
2955
  if (col.cellType === "auto") return { text };
2835
- const mode = _optionalChain([config, 'access', _142 => _142.color, 'optionalAccess', _143 => _143.mode]);
2836
- const named = _nullishCoalesce(_optionalChain([mapped, 'optionalAccess', _144 => _144.color]), () => ( (mode === "fixed" ? _optionalChain([config, 'access', _145 => _145.color, 'optionalAccess', _146 => _146.fixedColor]) : (!mode || mode === "thresholds") && num4 != null ? _optionalChain([_chunkYUXA7I4Jjs.thresholdStep.call(void 0, num4, config), 'optionalAccess', _147 => _147.color]) : void 0)));
2837
- const color = named === "text" ? void 0 : _optionalChain([mapped, 'optionalAccess', _148 => _148.color]) ? _chunkYUXA7I4Jjs.resolveColor.call(void 0, mapped.color, fallbackColor) : num4 == null ? void 0 : _chunkYUXA7I4Jjs.valueColor.call(void 0, num4, config, fallbackColor, col.extent);
2956
+ const mode = _optionalChain([config, 'access', _149 => _149.color, 'optionalAccess', _150 => _150.mode]);
2957
+ const named = _nullishCoalesce(_optionalChain([mapped, 'optionalAccess', _151 => _151.color]), () => ( (mode === "fixed" ? _optionalChain([config, 'access', _152 => _152.color, 'optionalAccess', _153 => _153.fixedColor]) : (!mode || mode === "thresholds") && num4 != null ? _optionalChain([_chunkQIBL3YULjs.thresholdStep.call(void 0, num4, config), 'optionalAccess', _154 => _154.color]) : void 0)));
2958
+ const color = named === "text" ? void 0 : _optionalChain([mapped, 'optionalAccess', _155 => _155.color]) ? _chunkQIBL3YULjs.resolveColor.call(void 0, mapped.color, fallbackColor) : num4 == null ? void 0 : _chunkQIBL3YULjs.valueColor.call(void 0, num4, config, fallbackColor, col.extent);
2838
2959
  if (col.cellType === "color-text") return { text, color };
2839
2960
  if (col.cellType === "color-background") return { text, background: color };
2840
- const min = _nullishCoalesce(config.min, () => ( Math.min(0, _nullishCoalesce(_optionalChain([col, 'access', _149 => _149.extent, 'optionalAccess', _150 => _150[0]]), () => ( 0)))));
2841
- const max = _nullishCoalesce(_nullishCoalesce(config.max, () => ( _optionalChain([col, 'access', _151 => _151.extent, 'optionalAccess', _152 => _152[1]]))), () => ( 1));
2961
+ const min = _nullishCoalesce(config.min, () => ( Math.min(0, _nullishCoalesce(_optionalChain([col, 'access', _156 => _156.extent, 'optionalAccess', _157 => _157[0]]), () => ( 0)))));
2962
+ const max = _nullishCoalesce(_nullishCoalesce(config.max, () => ( _optionalChain([col, 'access', _158 => _158.extent, 'optionalAccess', _159 => _159[1]]))), () => ( 1));
2842
2963
  const gauge = num4 == null ? void 0 : Math.min(1, Math.max(0, (num4 - min) / (max - min || 1)));
2843
2964
  return { text, gauge, gaugeColor: color };
2844
2965
  }
@@ -2851,12 +2972,12 @@ function contrastText(background, fallback) {
2851
2972
  return lum > 0.55 ? "#111111" : "#ffffff";
2852
2973
  }
2853
2974
  function initialSort(panel, columns) {
2854
- const first = _optionalChain([panel, 'access', _153 => _153.options, 'optionalAccess', _154 => _154.sortBy, 'optionalAccess', _155 => _155[0]]);
2855
- const col = _optionalChain([first, 'optionalAccess', _156 => _156.displayName]) != null ? columns.find((c) => c.name === first.displayName || c.field.name === first.displayName) : void 0;
2975
+ const first = _optionalChain([panel, 'access', _160 => _160.options, 'optionalAccess', _161 => _161.sortBy, 'optionalAccess', _162 => _162[0]]);
2976
+ const col = _optionalChain([first, 'optionalAccess', _163 => _163.displayName]) != null ? columns.find((c) => c.name === first.displayName || c.field.name === first.displayName) : void 0;
2856
2977
  return col ? { key: col.key, desc: !!first.desc } : null;
2857
2978
  }
2858
2979
  function nextSort(current, key) {
2859
- if (_optionalChain([current, 'optionalAccess', _157 => _157.key]) !== key) return { key, desc: false };
2980
+ if (_optionalChain([current, 'optionalAccess', _164 => _164.key]) !== key) return { key, desc: false };
2860
2981
  return current.desc ? null : { key, desc: true };
2861
2982
  }
2862
2983
  function sortedRows(columns, length, sort) {
@@ -2865,7 +2986,7 @@ function sortedRows(columns, length, sort) {
2865
2986
  if (!col) return rows;
2866
2987
  const { field } = col;
2867
2988
  const dir = sort.desc ? -1 : 1;
2868
- const key = (v) => field.type === "time" ? _chunkYUXA7I4Jjs.toMillis.call(void 0, v) : field.type === "number" || field.type === "boolean" ? Number(v) : v;
2989
+ const key = (v) => field.type === "time" ? _chunkQIBL3YULjs.toMillis.call(void 0, v) : field.type === "number" || field.type === "boolean" ? Number(v) : v;
2869
2990
  const empty = (v) => v == null || v === "" || typeof v === "number" && Number.isNaN(v);
2870
2991
  return rows.sort((a, b) => {
2871
2992
  const va = field.values[a];
@@ -2891,7 +3012,7 @@ function PieChartPanel({ panel, frames }) {
2891
3012
  if (!values.length) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, NoData, {});
2892
3013
  const total = values.reduce((a, v) => a + (_nullishCoalesce(v.value, () => ( 0))), 0);
2893
3014
  const r = Math.min(size.width, size.height) / 2 - 2;
2894
- const inner = _optionalChain([panel, 'access', _158 => _158.options, 'optionalAccess', _159 => _159.pieType]) === "pie" ? 0 : r * 0.62;
3015
+ const inner = _optionalChain([panel, 'access', _165 => _165.options, 'optionalAccess', _166 => _166.pieType]) === "pie" ? 0 : r * 0.62;
2895
3016
  const cx = size.width / 2;
2896
3017
  const cy = size.height / 2;
2897
3018
  const gap = values.length > 1 ? 0.02 : 0;
@@ -2931,15 +3052,15 @@ function TablePanel({ panel, frames }) {
2931
3052
  const columns = _react.useMemo.call(void 0, () => frame ? tableColumns(panel, frame, frames.length > 1) : [], [panel, frame, frames.length]);
2932
3053
  const [tapped, setSort] = _react.useState.call(void 0, );
2933
3054
  const sort = tapped === void 0 ? initialSort(panel, columns) : tapped;
2934
- const order = _react.useMemo.call(void 0, () => sortedRows(columns, frame ? _chunkYUXA7I4Jjs.frameLength.call(void 0, frame) : 0, sort), [columns, frame, sort]);
2935
- if (!frame || !_chunkYUXA7I4Jjs.frameLength.call(void 0, frame)) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, NoData, {});
3055
+ const order = _react.useMemo.call(void 0, () => sortedRows(columns, frame ? _chunkQIBL3YULjs.frameLength.call(void 0, frame) : 0, sort), [columns, frame, sort]);
3056
+ if (!frame || !_chunkQIBL3YULjs.frameLength.call(void 0, frame)) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, NoData, {});
2936
3057
  const shown = order.slice(0, 500);
2937
3058
  const rowColumn = columns.find((c) => c.applyToRow);
2938
3059
  const footer = tableFooter(columns);
2939
3060
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.ScrollView, { horizontal: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles11.fill, children: [
2940
3061
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.ScrollView, { nestedScrollEnabled: true, style: styles11.fill, children: [
2941
3062
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: [styles11.tr, { borderBottomColor: theme.border }], children: columns.map((c) => {
2942
- const active = _optionalChain([sort, 'optionalAccess', _160 => _160.key]) === c.key;
3063
+ const active = _optionalChain([sort, 'optionalAccess', _167 => _167.key]) === c.key;
2943
3064
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2944
3065
  _reactnative.Pressable,
2945
3066
  {
@@ -2961,7 +3082,7 @@ function TablePanel({ panel, frames }) {
2961
3082
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: [styles11.tr, { borderBottomColor: theme.grid }, rowBg ? { backgroundColor: rowBg } : null], children: columns.map((c) => {
2962
3083
  const d = cellDisplay(c, c.field.values[i], theme.accent);
2963
3084
  const bg = _nullishCoalesce(d.background, () => ( rowBg));
2964
- const linked = !!_optionalChain([c, 'access', _161 => _161.config, 'access', _162 => _162.links, 'optionalAccess', _163 => _163.length]);
3085
+ const linked = !!_optionalChain([c, 'access', _168 => _168.config, 'access', _169 => _169.links, 'optionalAccess', _170 => _170.length]);
2965
3086
  const color = _nullishCoalesce(d.color, () => ( (bg ? contrastText(bg, theme.text) : linked ? theme.accent : theme.text)));
2966
3087
  const cellStyle = [styles11.td, { width: c.width }, d.background ? { backgroundColor: d.background } : null];
2967
3088
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -2992,9 +3113,9 @@ function TablePanel({ panel, frames }) {
2992
3113
  }
2993
3114
  function TextPanel({ panel }) {
2994
3115
  const theme = useDashTheme();
2995
- const raw = _optionalChain([panel, 'access', _164 => _164.options, 'optionalAccess', _165 => _165.content]);
3116
+ const raw = _optionalChain([panel, 'access', _171 => _171.options, 'optionalAccess', _172 => _172.content]);
2996
3117
  const content = typeof raw === "string" ? raw : "";
2997
- const text = _optionalChain([panel, 'access', _166 => _166.options, 'optionalAccess', _167 => _167.mode]) === "html" ? content.replace(/<[^>]+>/g, "") : content;
3118
+ const text = _optionalChain([panel, 'access', _173 => _173.options, 'optionalAccess', _174 => _174.mode]) === "html" ? content.replace(/<[^>]+>/g, "") : content;
2998
3119
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.ScrollView, { children: text.split(/\n{2,}/).map((block, i) => {
2999
3120
  const heading = /^#{1,6}\s+/.test(block);
3000
3121
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles11.para, { color: heading ? theme.text : theme.textSecondary }, heading && styles11.heading], children: block.replace(/^#{1,6}\s+/, "").replace(/\*\*(.+?)\*\*/g, "$1").replace(/\[(.+?)\]\(.+?\)/g, "$1") }, i);
@@ -3007,13 +3128,13 @@ function BarChartPanel({ panel, frames, width }) {
3007
3128
  const frame = frames[0];
3008
3129
  const category = frame && barCategory(panel, frame);
3009
3130
  if (!frame || !values.length) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, NoData, {});
3010
- const xField = _optionalChain([panel, 'access', _168 => _168.options, 'optionalAccess', _169 => _169.xField]);
3131
+ const xField = _optionalChain([panel, 'access', _175 => _175.options, 'optionalAccess', _176 => _176.xField]);
3011
3132
  if (xField && !category) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, NoData, { message: `No field named \u201C${String(xField)}\u201D` });
3012
3133
  const allNumeric = frame.fields.filter((f) => f.type === "number");
3013
3134
  const at = (f) => values[allNumeric.indexOf(f)];
3014
3135
  const numeric = category ? allNumeric.filter((f) => f !== category) : [];
3015
3136
  if (category && !numeric.length) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, NoData, { message: `No number fields to draw besides \u201C${category.name}\u201D` });
3016
- const fields = category ? numeric.map((f) => ({ key: f.name, name: _nullishCoalesce(_optionalChain([at, 'call', _170 => _170(f), 'optionalAccess', _171 => _171.name]), () => ( f.name)), color: _nullishCoalesce(_optionalChain([at, 'call', _172 => _172(f), 'optionalAccess', _173 => _173.color]), () => ( theme.accent)), config: _nullishCoalesce(_optionalChain([at, 'call', _174 => _174(f), 'optionalAccess', _175 => _175.config]), () => ( {})), values: f.values.map(num2) })) : [{ key: "reduced", name: "", color: theme.accent, config: values[0].config, values: values.map((v) => v.value) }];
3137
+ const fields = category ? numeric.map((f) => ({ key: f.name, name: _nullishCoalesce(_optionalChain([at, 'call', _177 => _177(f), 'optionalAccess', _178 => _178.name]), () => ( f.name)), color: _nullishCoalesce(_optionalChain([at, 'call', _179 => _179(f), 'optionalAccess', _180 => _180.color]), () => ( theme.accent)), config: _nullishCoalesce(_optionalChain([at, 'call', _181 => _181(f), 'optionalAccess', _182 => _182.config]), () => ( {})), values: f.values.map(num2) })) : [{ key: "reduced", name: "", color: theme.accent, config: values[0].config, values: values.map((v) => v.value) }];
3017
3138
  const labels = category ? categoryLabels(category) : values.map((v) => v.name);
3018
3139
  const colorAt = (fi, i) => category ? fields[fi].color : values[i].color;
3019
3140
  const axes = barAxes(
@@ -3032,14 +3153,14 @@ function BarChartPanel({ panel, frames, width }) {
3032
3153
  {
3033
3154
  style: [styles11.tick, { color: theme.textMuted, top: plot.height * (1 - barFraction(axis, t)) - 7 }, axis.side === "left" ? styles11.tickLeft : styles11.tickRight],
3034
3155
  numberOfLines: 1,
3035
- children: _chunkYUXA7I4Jjs.formatValue.call(void 0, t, { ...axis.config, decimals: tickDecimals(axis.ticks) })
3156
+ children: _chunkQIBL3YULjs.formatValue.call(void 0, t, { ...axis.config, decimals: tickDecimals(axis.ticks) })
3036
3157
  },
3037
3158
  t
3038
3159
  )) });
3039
3160
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles11.fill, children: [
3040
- (_optionalChain([left, 'optionalAccess', _176 => _176.label]) || _optionalChain([right, 'optionalAccess', _177 => _177.label])) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles11.axisLabels, children: [
3041
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles11.axisLabel, { color: theme.textMuted }], children: _nullishCoalesce(_optionalChain([left, 'optionalAccess', _178 => _178.label]), () => ( "")) }),
3042
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles11.axisLabel, { color: theme.textMuted }], children: _nullishCoalesce(_optionalChain([right, 'optionalAccess', _179 => _179.label]), () => ( "")) })
3161
+ (_optionalChain([left, 'optionalAccess', _183 => _183.label]) || _optionalChain([right, 'optionalAccess', _184 => _184.label])) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles11.axisLabels, children: [
3162
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles11.axisLabel, { color: theme.textMuted }], children: _nullishCoalesce(_optionalChain([left, 'optionalAccess', _185 => _185.label]), () => ( "")) }),
3163
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles11.axisLabel, { color: theme.textMuted }], children: _nullishCoalesce(_optionalChain([right, 'optionalAccess', _186 => _186.label]), () => ( "")) })
3043
3164
  ] }),
3044
3165
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles11.barRow, children: [
3045
3166
  left && axisColumn(left),
@@ -3135,9 +3256,9 @@ function TimeSeriesPanel({ panel, frames }) {
3135
3256
  [numericX, panel, frames, theme.scheme]
3136
3257
  );
3137
3258
  if (!series.length || series.every((s) => s.values.every((v) => v == null))) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, NoData, {});
3138
- const style = (s) => _nullishCoalesce(_optionalChain([s, 'access', _180 => _180.config, 'access', _181 => _181.custom, 'optionalAccess', _182 => _182.drawStyle]), () => ( (panel.type === "graph" && panel.bars ? "bars" : "line")));
3259
+ const style = (s) => _nullishCoalesce(_optionalChain([s, 'access', _187 => _187.config, 'access', _188 => _188.custom, 'optionalAccess', _189 => _189.drawStyle]), () => ( (panel.type === "graph" && panel.bars ? "bars" : "line")));
3139
3260
  const anyBars = series.some((s) => style(s) === "bars");
3140
- const anyFill = series.some((s) => (_nullishCoalesce(_optionalChain([s, 'access', _183 => _183.config, 'access', _184 => _184.custom, 'optionalAccess', _185 => _185.fillOpacity]), () => ( 0))) > 0);
3261
+ const anyFill = series.some((s) => (_nullishCoalesce(_optionalChain([s, 'access', _190 => _190.config, 'access', _191 => _191.custom, 'optionalAccess', _192 => _192.fillOpacity]), () => ( 0))) > 0);
3141
3262
  const yTitle = series.map((s) => axisTitle(s.config)).find(Boolean);
3142
3263
  const xTitle = numericX ? axisTitle(xConfig) : void 0;
3143
3264
  const PAD = {
@@ -3158,7 +3279,7 @@ function TimeSeriesPanel({ panel, frames }) {
3158
3279
  const y = linearScale(yMin, yMax, PAD.top + plotH, PAD.top);
3159
3280
  const span = xTo - xFrom;
3160
3281
  const xTicks = numericX ? numberTicks(xFrom, xTo, plotW) : timeTicks(xFrom, xTo, plotW);
3161
- const xLabel = (t) => numericX ? _chunkYUXA7I4Jjs.formatValue.call(void 0, t, { ...xConfig, decimals: tickDecimals(xTicks) }) : formatTimeTick(t, span);
3282
+ const xLabel = (t) => numericX ? _chunkQIBL3YULjs.formatValue.call(void 0, t, { ...xConfig, decimals: tickDecimals(xTicks) }) : formatTimeTick(t, span);
3162
3283
  const unitConfig = series[0].config;
3163
3284
  const barSeries = series.filter((s) => style(s) === "bars");
3164
3285
  const pointsCount = Math.max(...series.map((s) => s.times.length));
@@ -3166,7 +3287,7 @@ function TimeSeriesPanel({ panel, frames }) {
3166
3287
  const groupW = Math.min(slot * 0.8, BAR_MAX * barSeries.length);
3167
3288
  const barW = Math.max(2, groupW / Math.max(barSeries.length, 1) - (barSeries.length > 1 ? 2 : 0));
3168
3289
  const canPinch = plotW > 0;
3169
- const twoFingers = (e) => canPinch && (_nullishCoalesce(_optionalChain([e, 'access', _186 => _186.nativeEvent, 'access', _187 => _187.touches, 'optionalAccess', _188 => _188.length]), () => ( 0))) >= 2;
3290
+ const twoFingers = (e) => canPinch && (_nullishCoalesce(_optionalChain([e, 'access', _193 => _193.nativeEvent, 'access', _194 => _194.touches, 'optionalAccess', _195 => _195.length]), () => ( 0))) >= 2;
3170
3291
  const onPinchMove = (e) => {
3171
3292
  const touches = _nullishCoalesce(e.nativeEvent.touches, () => ( []));
3172
3293
  if (touches.length < 2) return;
@@ -3176,11 +3297,11 @@ function TimeSeriesPanel({ panel, frames }) {
3176
3297
  if (!pinch.current) pinch.current = { start: { from: xFrom, to: xTo }, dist, frac };
3177
3298
  const p = pinch.current;
3178
3299
  const limits = extent ? { minSpan: (extent[1] - extent[0]) / 1e3, maxSpan: extent[1] - extent[0], minFrom: extent[0], maxTo: extent[1] } : { maxTo: Math.max(Date.now(), p.start.to) };
3179
- setPreview(_chunkYUXA7I4Jjs.zoomRange.call(void 0, p.start, dist / p.dist, p.frac, frac, limits));
3300
+ setPreview(_chunkQIBL3YULjs.zoomRange.call(void 0, p.start, dist / p.dist, p.frac, frac, limits));
3180
3301
  };
3181
3302
  const onPinchEnd = (commit) => {
3182
3303
  if (commit && pinch.current && preview) {
3183
- if (!extent) setRawRange({ from: _chunkYUXA7I4Jjs.formatLocalDateTime.call(void 0, preview.from), to: _chunkYUXA7I4Jjs.formatLocalDateTime.call(void 0, preview.to) });
3304
+ if (!extent) setRawRange({ from: _chunkQIBL3YULjs.formatLocalDateTime.call(void 0, preview.from), to: _chunkQIBL3YULjs.formatLocalDateTime.call(void 0, preview.to) });
3184
3305
  else setXZoom(preview.to - preview.from >= extent[1] - extent[0] ? null : preview);
3185
3306
  }
3186
3307
  pinch.current = null;
@@ -3189,7 +3310,7 @@ function TimeSeriesPanel({ panel, frames }) {
3189
3310
  const hover = hoverX == null || !touching && pinned !== id ? null : nearest(series, xFrom + (hoverX - PAD.left) / (plotW || 1) * span);
3190
3311
  const hoverLinks = hover ? mergeLinks(
3191
3312
  hover.rows.flatMap(
3192
- (r) => r.value == null || !_optionalChain([r, 'access', _189 => _189.series, 'access', _190 => _190.config, 'access', _191 => _191.links, 'optionalAccess', _192 => _192.length]) ? [] : [{ name: r.name, links: resolve(r.series.config.links, linkData(r, frames, numericX ? String(_nullishCoalesce(_optionalChain([panel, 'access', _193 => _193.options, 'optionalAccess', _194 => _194.xField]), () => ( ""))) : void 0)) }]
3313
+ (r) => r.value == null || !_optionalChain([r, 'access', _196 => _196.series, 'access', _197 => _197.config, 'access', _198 => _198.links, 'optionalAccess', _199 => _199.length]) ? [] : [{ name: r.name, links: resolve(r.series.config.links, linkData(r, frames, numericX ? String(_nullishCoalesce(_optionalChain([panel, 'access', _200 => _200.options, 'optionalAccess', _201 => _201.xField]), () => ( ""))) : void 0)) }]
3193
3314
  )
3194
3315
  ) : [];
3195
3316
  const isPinned = !!hover && pinned === id;
@@ -3235,7 +3356,7 @@ function TimeSeriesPanel({ panel, frames }) {
3235
3356
  size.width > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg2.default, { width: size.width, height: size.height, children: [
3236
3357
  ticks.map((t) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg.G, { children: [
3237
3358
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Line, { x1: PAD.left, x2: PAD.left + plotW, y1: y(t), y2: y(t), stroke: theme.grid, strokeWidth: 1 }),
3238
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Text, { x: PAD.left - 6, y: y(t) + 3, fontSize: 10, fill: theme.textMuted, textAnchor: "end", children: _chunkYUXA7I4Jjs.formatValue.call(void 0, t, { ...unitConfig, decimals: tickDecimals(ticks) }) })
3359
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Text, { x: PAD.left - 6, y: y(t) + 3, fontSize: 10, fill: theme.textMuted, textAnchor: "end", children: _chunkQIBL3YULjs.formatValue.call(void 0, t, { ...unitConfig, decimals: tickDecimals(ticks) }) })
3239
3360
  ] }, t)),
3240
3361
  xTicks.map((t) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3241
3362
  _reactnativesvg.Text,
@@ -3261,12 +3382,12 @@ function TimeSeriesPanel({ panel, frames }) {
3261
3382
  })
3262
3383
  ),
3263
3384
  series.filter((s) => style(s) !== "bars").map((s) => {
3264
- const fill = (_nullishCoalesce(_optionalChain([s, 'access', _195 => _195.config, 'access', _196 => _196.custom, 'optionalAccess', _197 => _197.fillOpacity]), () => ( 0))) / 100;
3265
- const showPoints = style(s) === "points" || _optionalChain([s, 'access', _198 => _198.config, 'access', _199 => _199.custom, 'optionalAccess', _200 => _200.showPoints]) === "always" || _optionalChain([s, 'access', _201 => _201.config, 'access', _202 => _202.custom, 'optionalAccess', _203 => _203.showPoints]) !== "never" && s.times.length <= plotW / 14;
3266
- const segs = segments(s, x, y, _optionalChain([s, 'access', _204 => _204.config, 'access', _205 => _205.custom, 'optionalAccess', _206 => _206.lineInterpolation]) === "stepAfter");
3385
+ const fill = (_nullishCoalesce(_optionalChain([s, 'access', _202 => _202.config, 'access', _203 => _203.custom, 'optionalAccess', _204 => _204.fillOpacity]), () => ( 0))) / 100;
3386
+ const showPoints = style(s) === "points" || _optionalChain([s, 'access', _205 => _205.config, 'access', _206 => _206.custom, 'optionalAccess', _207 => _207.showPoints]) === "always" || _optionalChain([s, 'access', _208 => _208.config, 'access', _209 => _209.custom, 'optionalAccess', _210 => _210.showPoints]) !== "never" && s.times.length <= plotW / 14;
3387
+ const segs = segments(s, x, y, _optionalChain([s, 'access', _211 => _211.config, 'access', _212 => _212.custom, 'optionalAccess', _213 => _213.lineInterpolation]) === "stepAfter");
3267
3388
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg.G, { children: [
3268
3389
  fill > 0 && segs.map((seg, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Path, { d: `${seg.d}L${seg.lastX},${y(Math.max(yMin, 0))}L${seg.firstX},${y(Math.max(yMin, 0))}Z`, fill: s.color, opacity: fill }, `f${i}`)),
3269
- style(s) !== "points" && segs.map((seg, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Path, { d: seg.d, stroke: s.color, strokeWidth: _nullishCoalesce(_optionalChain([s, 'access', _207 => _207.config, 'access', _208 => _208.custom, 'optionalAccess', _209 => _209.lineWidth]), () => ( 2)), fill: "none", strokeLinejoin: "round", strokeLinecap: "round" }, `l${i}`)),
3390
+ style(s) !== "points" && segs.map((seg, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Path, { d: seg.d, stroke: s.color, strokeWidth: _nullishCoalesce(_optionalChain([s, 'access', _214 => _214.config, 'access', _215 => _215.custom, 'optionalAccess', _216 => _216.lineWidth]), () => ( 2)), fill: "none", strokeLinejoin: "round", strokeLinecap: "round" }, `l${i}`)),
3270
3391
  showPoints && s.times.map(
3271
3392
  (t, i) => s.values[i] == null ? null : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Circle, { cx: x(t), cy: y(s.values[i]), r: 4, fill: s.color, stroke: theme.surface, strokeWidth: 2 }, i)
3272
3393
  )
@@ -3301,11 +3422,11 @@ function TimeSeriesPanel({ panel, frames }) {
3301
3422
  x(hover.time) > size.width / 2 ? { right: size.width - x(hover.time) + 8 } : { left: x(hover.time) + 8 }
3302
3423
  ],
3303
3424
  children: [
3304
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles12.tooltipTime, { color: theme.textMuted }], children: numericX ? _chunkYUXA7I4Jjs.formatValue.call(void 0, hover.time, xConfig) : formatTooltipTime(hover.time) }),
3425
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles12.tooltipTime, { color: theme.textMuted }], children: numericX ? _chunkQIBL3YULjs.formatValue.call(void 0, hover.time, xConfig) : formatTooltipTime(hover.time) }),
3305
3426
  hover.rows.map((r) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles12.tooltipRow, children: [
3306
3427
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: [styles12.swatch, { backgroundColor: r.color }] }),
3307
3428
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles12.tooltipName, { color: theme.textSecondary }], numberOfLines: 1, children: r.name }),
3308
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles12.tooltipValue, { color: theme.text }], children: _chunkYUXA7I4Jjs.formatValue.call(void 0, r.value, r.config) })
3429
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles12.tooltipValue, { color: theme.text }], children: _chunkQIBL3YULjs.formatValue.call(void 0, r.value, r.config) })
3309
3430
  ] }, r.key)),
3310
3431
  isPinned && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipLinks, { links: hoverLinks, onOpen: (l) => openLinks([l]) })
3311
3432
  ]
@@ -3390,8 +3511,8 @@ function linkData(r, frames, xField) {
3390
3511
  if (frame && xField === void 0) {
3391
3512
  row = r.index;
3392
3513
  } else if (frame) {
3393
- const xf = _nullishCoalesce(frame.fields.find((f) => f.name === xField), () => ( _chunkYUXA7I4Jjs.numberFields.call(void 0, frame)[0]));
3394
- const at = _optionalChain([xf, 'optionalAccess', _210 => _210.values, 'access', _211 => _211.findIndex, 'call', _212 => _212((v, k) => Number(v) === r.time && Number(r.series.field.values[k]) === r.value)]);
3514
+ const xf = _nullishCoalesce(frame.fields.find((f) => f.name === xField), () => ( _chunkQIBL3YULjs.numberFields.call(void 0, frame)[0]));
3515
+ const at = _optionalChain([xf, 'optionalAccess', _217 => _217.values, 'access', _218 => _218.findIndex, 'call', _219 => _219((v, k) => Number(v) === r.time && Number(r.series.field.values[k]) === r.value)]);
3395
3516
  row = at != null && at >= 0 ? at : void 0;
3396
3517
  }
3397
3518
  return {
@@ -3401,7 +3522,7 @@ function linkData(r, frames, xField) {
3401
3522
  fieldName: r.name,
3402
3523
  seriesName: r.name,
3403
3524
  value: r.value,
3404
- text: _chunkYUXA7I4Jjs.formatValue.call(void 0, r.value, r.config),
3525
+ text: _chunkQIBL3YULjs.formatValue.call(void 0, r.value, r.config),
3405
3526
  time: xField === void 0 ? r.time : void 0
3406
3527
  };
3407
3528
  }
@@ -3446,14 +3567,14 @@ function mappings(panel) {
3446
3567
  frame: frame(s.frame),
3447
3568
  x: byName(s.x),
3448
3569
  y: byName(s.y),
3449
- color: byName(_optionalChain([s, 'access', _213 => _213.pointColor, 'optionalAccess', _214 => _214.field])),
3450
- size: byName(_optionalChain([s, 'access', _215 => _215.pointSize, 'optionalAccess', _216 => _216.field])),
3570
+ color: byName(_optionalChain([s, 'access', _220 => _220.pointColor, 'optionalAccess', _221 => _221.field])),
3571
+ size: byName(_optionalChain([s, 'access', _222 => _222.pointSize, 'optionalAccess', _223 => _223.field])),
3451
3572
  sizeRange: s.pointSize,
3452
3573
  name: { fixed: s.name }
3453
3574
  }));
3454
3575
  return { manual: true, series, exclude: [] };
3455
3576
  }
3456
- return { manual: false, series: [{ frame: frame(_optionalChain([o, 'access', _217 => _217.dims, 'optionalAccess', _218 => _218.frame])), x: byName(_optionalChain([o, 'access', _219 => _219.dims, 'optionalAccess', _220 => _220.x])) }], exclude: _nullishCoalesce(_optionalChain([o, 'access', _221 => _221.dims, 'optionalAccess', _222 => _222.exclude]), () => ( [])) };
3577
+ return { manual: false, series: [{ frame: frame(_optionalChain([o, 'access', _224 => _224.dims, 'optionalAccess', _225 => _225.frame])), x: byName(_optionalChain([o, 'access', _226 => _226.dims, 'optionalAccess', _227 => _227.x])) }], exclude: _nullishCoalesce(_optionalChain([o, 'access', _228 => _228.dims, 'optionalAccess', _229 => _229.exclude]), () => ( [])) };
3457
3578
  }
3458
3579
  return { manual: o.mapping === "manual", series: _nullishCoalesce(o.series, () => ( [])), exclude: [] };
3459
3580
  }
@@ -3462,11 +3583,11 @@ function xySeries(panel, frames, scheme) {
3462
3583
  const { manual, series: maps, exclude } = mappings(panel);
3463
3584
  const multiple = frames.length > 1;
3464
3585
  const out = [];
3465
- const config = (field, frame) => _chunkYUXA7I4Jjs.resolveFieldConfig.call(void 0, panel, field, frame, _chunkYUXA7I4Jjs.fieldDisplayName.call(void 0, field, frame, multiple));
3466
- const find = (pick, frame, fields = frame.fields) => pick ? fields.filter((f) => _chunkYUXA7I4Jjs.fieldMatches.call(void 0, pick.matcher, f, frame, _chunkYUXA7I4Jjs.fieldDisplayName.call(void 0, f, frame, multiple))) : [];
3586
+ const config = (field, frame) => _chunkQIBL3YULjs.resolveFieldConfig.call(void 0, panel, field, frame, _chunkQIBL3YULjs.fieldDisplayName.call(void 0, field, frame, multiple));
3587
+ const find = (pick, frame, fields = frame.fields) => pick ? fields.filter((f) => _chunkQIBL3YULjs.fieldMatches.call(void 0, pick.matcher, f, frame, _chunkQIBL3YULjs.fieldDisplayName.call(void 0, f, frame, multiple))) : [];
3467
3588
  for (const [mi, m] of (maps.length ? maps : [{}]).entries()) {
3468
- const matcher = _optionalChain([m, 'access', _223 => _223.frame, 'optionalAccess', _224 => _224.matcher]);
3469
- const chosen = _optionalChain([matcher, 'optionalAccess', _225 => _225.id]) === "byIndex" ? frames.filter((_, i) => i === matcher.options) : frames;
3589
+ const matcher = _optionalChain([m, 'access', _230 => _230.frame, 'optionalAccess', _231 => _231.matcher]);
3590
+ const chosen = _optionalChain([matcher, 'optionalAccess', _232 => _232.id]) === "byIndex" ? frames.filter((_, i) => i === matcher.options) : frames;
3470
3591
  for (const frame of chosen) {
3471
3592
  const numeric = frame.fields.filter(isNumeric);
3472
3593
  const xField = _nullishCoalesce(find(m.x, frame, numeric)[0], () => ( numeric[0]));
@@ -3477,41 +3598,41 @@ function xySeries(panel, frames, scheme) {
3477
3598
  const yFields = m.y ? find(m.y, frame, numeric).filter((f) => f !== xField) : manual ? [] : numeric.filter((f) => !used.has(f) && !exclude.includes(f.name));
3478
3599
  for (const yField of yFields) {
3479
3600
  const yConfig = config(yField, frame);
3480
- if (_optionalChain([yConfig, 'access', _226 => _226.custom, 'optionalAccess', _227 => _227.hideFrom, 'optionalAccess', _228 => _228.viz]) && !manual) continue;
3601
+ if (_optionalChain([yConfig, 'access', _233 => _233.custom, 'optionalAccess', _234 => _234.hideFrom, 'optionalAccess', _235 => _235.viz]) && !manual) continue;
3481
3602
  const xConfig = config(xField, frame);
3482
- const color = _chunkYUXA7I4Jjs.seriesColor.call(void 0, out.length, scheme, yConfig);
3483
- const base = _optionalChain([yConfig, 'access', _229 => _229.color, 'optionalAccess', _230 => _230.mode]) === "thresholds" ? _chunkYUXA7I4Jjs.valueColor.call(void 0, null, yConfig, color) : color;
3603
+ const color = _chunkQIBL3YULjs.seriesColor.call(void 0, out.length, scheme, yConfig);
3604
+ const base = _optionalChain([yConfig, 'access', _236 => _236.color, 'optionalAccess', _237 => _237.mode]) === "thresholds" ? _chunkQIBL3YULjs.valueColor.call(void 0, null, yConfig, color) : color;
3484
3605
  const rows = [];
3485
3606
  const xs = [];
3486
3607
  const ys = [];
3487
3608
  yField.values.forEach((yv, i) => {
3488
3609
  const xv = xField.values[i];
3489
3610
  if (xv == null || yv == null) return;
3490
- const xn = xField.type === "time" ? _chunkYUXA7I4Jjs.toMillis.call(void 0, xv) : Number(xv);
3491
- const yn = yField.type === "time" ? _chunkYUXA7I4Jjs.toMillis.call(void 0, yv) : Number(yv);
3611
+ const xn = xField.type === "time" ? _chunkQIBL3YULjs.toMillis.call(void 0, xv) : Number(xv);
3612
+ const yn = yField.type === "time" ? _chunkQIBL3YULjs.toMillis.call(void 0, yv) : Number(yv);
3492
3613
  if (!Number.isFinite(xn) || !Number.isFinite(yn)) return;
3493
3614
  rows.push(i);
3494
3615
  xs.push(xn);
3495
3616
  ys.push(yn);
3496
3617
  });
3497
- const pointSize = _optionalChain([yConfig, 'access', _231 => _231.custom, 'optionalAccess', _232 => _232.pointSize]);
3498
- const fixedSize = _nullishCoalesce(_nullishCoalesce(_optionalChain([m, 'access', _233 => _233.sizeRange, 'optionalAccess', _234 => _234.fixed]), () => ( _optionalChain([pointSize, 'optionalAccess', _235 => _235.fixed]))), () => ( 5));
3618
+ const pointSize = _optionalChain([yConfig, 'access', _238 => _238.custom, 'optionalAccess', _239 => _239.pointSize]);
3619
+ const fixedSize = _nullishCoalesce(_nullishCoalesce(_optionalChain([m, 'access', _240 => _240.sizeRange, 'optionalAccess', _241 => _241.fixed]), () => ( _optionalChain([pointSize, 'optionalAccess', _242 => _242.fixed]))), () => ( 5));
3499
3620
  let colors = rows.map(() => base);
3500
3621
  if (colorField) {
3501
3622
  const cConfig = config(colorField, frame);
3502
3623
  const values = rows.map((i) => num3(colorField.values[i]));
3503
3624
  const extent = range2(values);
3504
- colors = values.map((v) => _chunkYUXA7I4Jjs.valueColor.call(void 0, v, cConfig, base, extent));
3625
+ colors = values.map((v) => _chunkQIBL3YULjs.valueColor.call(void 0, v, cConfig, base, extent));
3505
3626
  }
3506
3627
  let sizes = rows.map(() => fixedSize);
3507
3628
  if (sizeField) {
3508
3629
  const values = rows.map((i) => num3(sizeField.values[i]));
3509
3630
  const [lo, hi] = _nullishCoalesce(range2(values), () => ( [0, 1]));
3510
- const [min, max] = [_nullishCoalesce(_nullishCoalesce(_optionalChain([m, 'access', _236 => _236.sizeRange, 'optionalAccess', _237 => _237.min]), () => ( _optionalChain([pointSize, 'optionalAccess', _238 => _238.min]))), () => ( 5)), _nullishCoalesce(_nullishCoalesce(_optionalChain([m, 'access', _239 => _239.sizeRange, 'optionalAccess', _240 => _240.max]), () => ( _optionalChain([pointSize, 'optionalAccess', _241 => _241.max]))), () => ( 20))];
3631
+ const [min, max] = [_nullishCoalesce(_nullishCoalesce(_optionalChain([m, 'access', _243 => _243.sizeRange, 'optionalAccess', _244 => _244.min]), () => ( _optionalChain([pointSize, 'optionalAccess', _245 => _245.min]))), () => ( 5)), _nullishCoalesce(_nullishCoalesce(_optionalChain([m, 'access', _246 => _246.sizeRange, 'optionalAccess', _247 => _247.max]), () => ( _optionalChain([pointSize, 'optionalAccess', _248 => _248.max]))), () => ( 20))];
3511
3632
  sizes = values.map((v) => v == null ? min : min + (v - lo) / (hi - lo || 1) * (max - min));
3512
3633
  }
3513
- const fixedName = _optionalChain([m, 'access', _242 => _242.name, 'optionalAccess', _243 => _243.fixed]);
3514
- const yName = _nullishCoalesce(yConfig.displayName, () => ( _chunkYUXA7I4Jjs.fieldDisplayName.call(void 0, yField, frame, multiple)));
3634
+ const fixedName = _optionalChain([m, 'access', _249 => _249.name, 'optionalAccess', _250 => _250.fixed]);
3635
+ const yName = _nullishCoalesce(yConfig.displayName, () => ( _chunkQIBL3YULjs.fieldDisplayName.call(void 0, yField, frame, multiple)));
3515
3636
  out.push({
3516
3637
  key: `${mi}/${frames.indexOf(frame)}/${yField.name}`,
3517
3638
  name: fixedName ? yFields.length > 1 ? `${fixedName} ${yName}` : fixedName : yName,
@@ -3526,8 +3647,8 @@ function xySeries(panel, frames, scheme) {
3526
3647
  ys,
3527
3648
  colors,
3528
3649
  sizes,
3529
- show: _nullishCoalesce(_optionalChain([yConfig, 'access', _244 => _244.custom, 'optionalAccess', _245 => _245.show]), () => ( "points")),
3530
- lineWidth: _nullishCoalesce(_optionalChain([yConfig, 'access', _246 => _246.custom, 'optionalAccess', _247 => _247.lineWidth]), () => ( 1))
3650
+ show: _nullishCoalesce(_optionalChain([yConfig, 'access', _251 => _251.custom, 'optionalAccess', _252 => _252.show]), () => ( "points")),
3651
+ lineWidth: _nullishCoalesce(_optionalChain([yConfig, 'access', _253 => _253.custom, 'optionalAccess', _254 => _254.lineWidth]), () => ( 1))
3531
3652
  });
3532
3653
  }
3533
3654
  }
@@ -3578,10 +3699,10 @@ function XYChartPanel({ panel, frames }) {
3578
3699
  const { resolve, openLinks } = usePanelLinks(panel);
3579
3700
  const series = _react.useMemo.call(void 0, () => xySeries(panel, frames, theme.scheme), [panel, frames, theme.scheme]);
3580
3701
  const first = series[0];
3581
- const showX = _optionalChain([first, 'optionalAccess', _248 => _248.xConfig, 'access', _249 => _249.custom, 'optionalAccess', _250 => _250.axisPlacement]) !== "hidden";
3582
- const showY = _optionalChain([first, 'optionalAccess', _251 => _251.yConfig, 'access', _252 => _252.custom, 'optionalAccess', _253 => _253.axisPlacement]) !== "hidden";
3583
- const xTitle = showX ? axisTitle(_optionalChain([first, 'optionalAccess', _254 => _254.xConfig])) : void 0;
3584
- const yTitle = showY ? axisTitle(_optionalChain([first, 'optionalAccess', _255 => _255.yConfig])) : void 0;
3702
+ const showX = _optionalChain([first, 'optionalAccess', _255 => _255.xConfig, 'access', _256 => _256.custom, 'optionalAccess', _257 => _257.axisPlacement]) !== "hidden";
3703
+ const showY = _optionalChain([first, 'optionalAccess', _258 => _258.yConfig, 'access', _259 => _259.custom, 'optionalAccess', _260 => _260.axisPlacement]) !== "hidden";
3704
+ const xTitle = showX ? axisTitle(_optionalChain([first, 'optionalAccess', _261 => _261.xConfig])) : void 0;
3705
+ const yTitle = showY ? axisTitle(_optionalChain([first, 'optionalAccess', _262 => _262.yConfig])) : void 0;
3585
3706
  const pad = {
3586
3707
  top: EDGE,
3587
3708
  right: EDGE,
@@ -3602,12 +3723,12 @@ function XYChartPanel({ panel, frames }) {
3602
3723
  if (!first || !layout || series.every((s) => !s.rows.length)) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, NoData, {});
3603
3724
  const xTicks = showX ? axisTicks(layout.x0, layout.x1, plotW < 220 ? 2 : plotW < 400 ? 3 : 5) : [];
3604
3725
  const yTicks = showY ? axisTicks(layout.y0, layout.y1, plotH < 100 ? 2 : 4) : [];
3605
- const gridX = _optionalChain([first, 'access', _256 => _256.xConfig, 'access', _257 => _257.custom, 'optionalAccess', _258 => _258.axisGridShow]) !== false;
3606
- const gridY = _optionalChain([first, 'access', _259 => _259.yConfig, 'access', _260 => _260.custom, 'optionalAccess', _261 => _261.axisGridShow]) !== false;
3726
+ const gridX = _optionalChain([first, 'access', _263 => _263.xConfig, 'access', _264 => _264.custom, 'optionalAccess', _265 => _265.axisGridShow]) !== false;
3727
+ const gridY = _optionalChain([first, 'access', _266 => _266.yConfig, 'access', _267 => _267.custom, 'optionalAccess', _268 => _268.axisGridShow]) !== false;
3607
3728
  const hover = touch && (touching || pinned === id) ? nearestPoint(series, layout.points, touch) : null;
3608
3729
  const hoverLinks = hover ? rowLinks(panel, hover.series.frame, hover.series.rows[hover.index], frames.length > 1, resolve) : [];
3609
3730
  const isPinned = !!hover && pinned === id;
3610
- const legendItems = series.filter((s) => !_optionalChain([s, 'access', _262 => _262.yConfig, 'access', _263 => _263.custom, 'optionalAccess', _264 => _264.hideFrom, 'optionalAccess', _265 => _265.legend]));
3731
+ const legendItems = series.filter((s) => !_optionalChain([s, 'access', _269 => _269.yConfig, 'access', _270 => _270.custom, 'optionalAccess', _271 => _271.hideFrom, 'optionalAccess', _272 => _272.legend]));
3611
3732
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles13.fill, children: [
3612
3733
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
3613
3734
  _reactnative.View,
@@ -3634,7 +3755,7 @@ function XYChartPanel({ panel, frames }) {
3634
3755
  size.width > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg2.default, { width: size.width, height: size.height, children: [
3635
3756
  yTicks.map((t) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg.G, { children: [
3636
3757
  gridY && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Line, { x1: pad.left, x2: pad.left + plotW, y1: layout.y(t), y2: layout.y(t), stroke: theme.grid, strokeWidth: 1 }),
3637
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Text, { x: pad.left - 6, y: layout.y(t) + 3, fontSize: 10, fill: theme.textMuted, textAnchor: "end", children: _chunkYUXA7I4Jjs.formatValue.call(void 0, t, { ...first.yConfig, decimals: _nullishCoalesce(first.yConfig.decimals, () => ( tickDecimals(yTicks))) }) })
3758
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Text, { x: pad.left - 6, y: layout.y(t) + 3, fontSize: 10, fill: theme.textMuted, textAnchor: "end", children: _chunkQIBL3YULjs.formatValue.call(void 0, t, { ...first.yConfig, decimals: _nullishCoalesce(first.yConfig.decimals, () => ( tickDecimals(yTicks))) }) })
3638
3759
  ] }, `y${t}`)),
3639
3760
  xTicks.map((t) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnativesvg.G, { children: [
3640
3761
  gridX && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnativesvg.Line, { x1: layout.x(t), x2: layout.x(t), y1: pad.top, y2: pad.top + plotH, stroke: theme.grid, strokeWidth: 1 }),
@@ -3646,7 +3767,7 @@ function XYChartPanel({ panel, frames }) {
3646
3767
  fontSize: 10,
3647
3768
  fill: theme.textMuted,
3648
3769
  textAnchor: layout.x(t) - pad.left < 20 ? "start" : pad.left + plotW - layout.x(t) < 20 ? "end" : "middle",
3649
- children: _chunkYUXA7I4Jjs.formatValue.call(void 0, t, { ...first.xConfig, decimals: _nullishCoalesce(first.xConfig.decimals, () => ( tickDecimals(xTicks))) })
3770
+ children: _chunkQIBL3YULjs.formatValue.call(void 0, t, { ...first.xConfig, decimals: _nullishCoalesce(first.xConfig.decimals, () => ( tickDecimals(xTicks))) })
3650
3771
  }
3651
3772
  )
3652
3773
  ] }, `x${t}`)),
@@ -3745,7 +3866,7 @@ function panelComponent(type) {
3745
3866
 
3746
3867
  // src/ui/DashboardView.tsx
3747
3868
 
3748
- var GAP = 8;
3869
+ var GAP2 = 8;
3749
3870
  var SIDE = 12;
3750
3871
  var TITLE_H = 28;
3751
3872
  var TABLET_WIDTH = 700;
@@ -3759,14 +3880,14 @@ function DashboardView({ mode = "auto", header, footer, refreshable }) {
3759
3880
  const width = (measured.width || window.width) - insets.left - insets.right;
3760
3881
  const layoutMode = mode === "auto" ? width >= TABLET_WIDTH ? "grid" : "phone" : mode;
3761
3882
  const sections = _react.useMemo.call(void 0,
3762
- () => _chunkYUXA7I4Jjs.layoutDashboard.call(void 0, dashboard, layoutMode, { values: variables, info: variableInfo2 }),
3883
+ () => _chunkQIBL3YULjs.layoutDashboard.call(void 0, dashboard, layoutMode, { values: variables, info: variableInfo2 }),
3763
3884
  [dashboard, layoutMode, variables, variableInfo2]
3764
3885
  );
3765
3886
  const [toggled, setToggled] = _react.useState.call(void 0, {});
3766
3887
  const { seen, viewportH, onScroll, onViewportLayout, onSectionLayout } = useSeenSections(window.height);
3767
3888
  const maxPanelH = Math.max(MIN_PANEL_H, viewportH - SIDE * 2);
3768
3889
  const contentW = width - SIDE * 2;
3769
- const canRefresh = _nullishCoalesce(refreshable, () => ( dashboard.panels.some((p) => _chunkYUXA7I4Jjs.panelHasQueries.call(void 0, p) || _optionalChain([p, 'access', _266 => _266.panels, 'optionalAccess', _267 => _267.some, 'call', _268 => _268(_chunkYUXA7I4Jjs.panelHasQueries)]))));
3890
+ const canRefresh = _nullishCoalesce(refreshable, () => ( dashboard.panels.some((p) => _chunkQIBL3YULjs.panelHasQueries.call(void 0, p) || _optionalChain([p, 'access', _273 => _273.panels, 'optionalAccess', _274 => _274.some, 'call', _275 => _275(_chunkQIBL3YULjs.panelHasQueries)]))));
3770
3891
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: [styles14.fill, { backgroundColor: theme.background }], onLayout, children: [
3771
3892
  width > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
3772
3893
  _reactnative.ScrollView,
@@ -3792,14 +3913,14 @@ function DashboardView({ mode = "auto", header, footer, refreshable }) {
3792
3913
  accessibilityState: { expanded: !collapsed },
3793
3914
  children: [
3794
3915
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles14.chevron, { color: theme.textMuted }], children: collapsed ? "\u25B8" : "\u25BE" }),
3795
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles14.rowTitle, { color: theme.text }], numberOfLines: 2, children: _chunkYUXA7I4Jjs.interpolate.call(void 0, _nullishCoalesce(section.row.title, () => ( "")), { values: variables, info: variableInfo2, scoped: section.row.scopedVars, timezone: dashboard.timezone }) })
3916
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles14.rowTitle, { color: theme.text }], numberOfLines: 2, children: _chunkQIBL3YULjs.interpolate.call(void 0, _nullishCoalesce(section.row.title, () => ( "")), { values: variables, info: variableInfo2, scoped: section.row.scopedVars, timezone: dashboard.timezone }) })
3796
3917
  ]
3797
3918
  }
3798
3919
  ),
3799
3920
  !collapsed && layoutMode === "grid" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, GridSection, { grid: section.grid, width: contentW, maxPanelH, deferred: !seen.has(section.key) }),
3800
3921
  !collapsed && layoutMode === "phone" && section.rows.map((row, ri) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: styles14.row, children: row.cells.map((cell) => {
3801
- const w = (contentW + GAP) * (cell.span / _chunkYUXA7I4Jjs.GRID_COLUMNS) - GAP;
3802
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PanelCard, { panel: cell.panel, width: w, height: Math.min(_chunkYUXA7I4Jjs.gridUnitsToPx.call(void 0, row.h), maxPanelH), deferred: !seen.has(section.key) }, cell.key);
3922
+ const w = (contentW + GAP2) * (cell.span / _chunkQIBL3YULjs.GRID_COLUMNS) - GAP2;
3923
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PanelCard, { panel: cell.panel, width: w, height: Math.min(_chunkQIBL3YULjs.gridUnitsToPx.call(void 0, row.h), maxPanelH), deferred: !seen.has(section.key) }, cell.key);
3803
3924
  }) }, ri))
3804
3925
  ] }, section.key);
3805
3926
  })
@@ -3810,10 +3931,10 @@ function DashboardView({ mode = "auto", header, footer, refreshable }) {
3810
3931
  ] });
3811
3932
  }
3812
3933
  function GridSection({ grid, width, maxPanelH, deferred }) {
3813
- const colW = (width + GAP) / _chunkYUXA7I4Jjs.GRID_COLUMNS;
3814
- const tallest = Math.max(0, ...grid.cells.map((c) => _chunkYUXA7I4Jjs.gridUnitsToPx.call(void 0, c.h)));
3934
+ const colW = (width + GAP2) / _chunkQIBL3YULjs.GRID_COLUMNS;
3935
+ const tallest = Math.max(0, ...grid.cells.map((c) => _chunkQIBL3YULjs.gridUnitsToPx.call(void 0, c.h)));
3815
3936
  const scale = tallest > maxPanelH ? maxPanelH / tallest : 1;
3816
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: { height: _chunkYUXA7I4Jjs.gridUnitsToPx.call(void 0, grid.h) * scale }, children: grid.cells.map((cell) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: [styles14.gridCell, { left: cell.x * colW, top: _chunkYUXA7I4Jjs.gridOffsetPx.call(void 0, cell.y) * scale }], children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PanelCard, { panel: cell.panel, width: cell.w * colW - GAP, height: _chunkYUXA7I4Jjs.gridUnitsToPx.call(void 0, cell.h) * scale, deferred }) }, cell.key)) });
3937
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: { height: _chunkQIBL3YULjs.gridUnitsToPx.call(void 0, grid.h) * scale }, children: grid.cells.map((cell) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { style: [styles14.gridCell, { left: cell.x * colW, top: _chunkQIBL3YULjs.gridOffsetPx.call(void 0, cell.y) * scale }], children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PanelCard, { panel: cell.panel, width: cell.w * colW - GAP2, height: _chunkQIBL3YULjs.gridUnitsToPx.call(void 0, cell.h) * scale, deferred }) }, cell.key)) });
3817
3938
  }
3818
3939
  function useSeenSections(viewportHeight) {
3819
3940
  const [seen, setSeen] = _react.useState.call(void 0, /* @__PURE__ */ new Set());
@@ -3872,13 +3993,13 @@ function PanelCardContent({ panel, width, height, deferred }) {
3872
3993
  const theme = useDashTheme();
3873
3994
  const { dashboard, variables, variableInfo: variableInfo2 } = useDashboard();
3874
3995
  const { resolve, openLinks } = usePanelLinks(panel);
3875
- const group = _chunkYUXA7I4Jjs.isInputGroup.call(void 0, panel);
3876
- const input = _chunkYUXA7I4Jjs.isInputPanel.call(void 0, panel) || group;
3996
+ const group = _chunkQIBL3YULjs.isInputGroup.call(void 0, panel);
3997
+ const input = _chunkQIBL3YULjs.isInputPanel.call(void 0, panel) || group;
3877
3998
  const form = _react.useContext.call(void 0, InputFormContext);
3878
- const problem = group ? _optionalChain([form, 'optionalAccess', _269 => _269.group, 'optionalCall', _270 => _270(panel), 'optionalAccess', _271 => _271.problem]) : _chunkYUXA7I4Jjs.isInputPanel.call(void 0, panel) ? _optionalChain([form, 'optionalAccess', _272 => _272.problem, 'optionalCall', _273 => _273(panel.options.metric)]) : void 0;
3879
- const hasLinks = !!_optionalChain([panel, 'access', _274 => _274.links, 'optionalAccess', _275 => _275.length]);
3999
+ const problem = group ? _optionalChain([form, 'optionalAccess', _276 => _276.group, 'optionalCall', _277 => _277(panel), 'optionalAccess', _278 => _278.problem]) : _chunkQIBL3YULjs.isInputPanel.call(void 0, panel) ? _optionalChain([form, 'optionalAccess', _279 => _279.problem, 'optionalCall', _280 => _280(panel.options.metric)]) : void 0;
4000
+ const hasLinks = !!_optionalChain([panel, 'access', _281 => _281.links, 'optionalAccess', _282 => _282.length]);
3880
4001
  const hasTitle = !!panel.title || hasLinks || !!problem;
3881
- const title = panel.title ? _chunkYUXA7I4Jjs.interpolate.call(void 0, panel.title, { values: variables, info: variableInfo2, scoped: panel.scopedVars, timezone: dashboard.timezone }) : "";
4002
+ const title = panel.title ? _chunkQIBL3YULjs.interpolate.call(void 0, panel.title, { values: variables, info: variableInfo2, scoped: panel.scopedVars, timezone: dashboard.timezone }) : "";
3882
4003
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: [styles14.card, { width, height, backgroundColor: theme.surface, borderColor: theme.border }], children: [
3883
4004
  hasTitle && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles14.titleRow, children: [
3884
4005
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles14.title, { color: theme.text }], numberOfLines: 1, children: title }),
@@ -3900,7 +4021,7 @@ function PanelCardContent({ panel, width, height, deferred }) {
3900
4021
  }
3901
4022
  function DataPanelBody({ panel, width, height }) {
3902
4023
  const theme = useDashTheme();
3903
- const needsData = _chunkYUXA7I4Jjs.panelHasQueries.call(void 0, panel);
4024
+ const needsData = _chunkQIBL3YULjs.panelHasQueries.call(void 0, panel);
3904
4025
  const data = usePanelData(panel, width, needsData);
3905
4026
  const Component2 = panelComponent(panel.type);
3906
4027
  if (needsData && data.error) {
@@ -3913,12 +4034,12 @@ function DataPanelBody({ panel, width, height }) {
3913
4034
  }
3914
4035
  var styles14 = _reactnative.StyleSheet.create({
3915
4036
  fill: { flex: 1 },
3916
- content: { padding: SIDE, paddingBottom: 32, gap: GAP },
3917
- section: { gap: GAP },
4037
+ content: { padding: SIDE, paddingBottom: 32, gap: GAP2 },
4038
+ section: { gap: GAP2 },
3918
4039
  rowHeader: { flexDirection: "row", alignItems: "center", gap: 6, paddingVertical: 6 },
3919
4040
  chevron: { fontSize: 14, width: 14 },
3920
4041
  rowTitle: { fontSize: 15, fontWeight: "600" },
3921
- row: { flexDirection: "row", gap: GAP },
4042
+ row: { flexDirection: "row", gap: GAP2 },
3922
4043
  gridCell: { position: "absolute" },
3923
4044
  card: { borderRadius: 10, borderWidth: _reactnative.StyleSheet.hairlineWidth, paddingHorizontal: 12, paddingVertical: 8, overflow: "hidden" },
3924
4045
  titleRow: { flexDirection: "row", alignItems: "flex-start", gap: 8, height: TITLE_H - 8, marginBottom: 8 },
@@ -3942,35 +4063,35 @@ function savedValues(panels, entries) {
3942
4063
  const values = {};
3943
4064
  for (const p of panels) {
3944
4065
  const mine = entries.filter((e) => e.metric === p.options.metric);
3945
- values[p.options.metric] = p.options.multi ? mine.length ? mine.map((e) => _nullishCoalesce(e.text, () => ( e.value))) : null : _chunkYUXA7I4Jjs.entryToInputValue.call(void 0, p, mine[0]);
4066
+ values[p.options.metric] = p.options.multi ? mine.length ? mine.map((e) => _nullishCoalesce(e.text, () => ( e.value))) : null : _chunkQIBL3YULjs.entryToInputValue.call(void 0, p, mine[0]);
3946
4067
  }
3947
4068
  return values;
3948
4069
  }
3949
4070
  async function lastItems(store, group) {
3950
- const metrics = _chunkYUXA7I4Jjs.groupFields.call(void 0, group).map((f) => f.options.metric);
4071
+ const metrics = _chunkQIBL3YULjs.groupFields.call(void 0, group).map((f) => f.options.metric);
3951
4072
  const latest = (await Promise.all(metrics.map((m) => store.latest(m)))).filter((e) => !!e).sort((a, b) => b.ts - a.ts)[0];
3952
4073
  if (!latest) return [];
3953
- return _chunkYUXA7I4Jjs.entriesToItems.call(void 0, group, _chunkYUXA7I4Jjs.sameSave.call(void 0, latest, await store.list({ metrics, from: latest.ts, to: latest.ts })));
4074
+ return _chunkQIBL3YULjs.entriesToItems.call(void 0, group, _chunkQIBL3YULjs.sameSave.call(void 0, latest, await store.list({ metrics, from: latest.ts, to: latest.ts })));
3954
4075
  }
3955
4076
  function freshItem(group, position, last) {
3956
4077
  const item = {};
3957
- for (const f of _chunkYUXA7I4Jjs.groupFields.call(void 0, group)) {
4078
+ for (const f of _chunkQIBL3YULjs.groupFields.call(void 0, group)) {
3958
4079
  const d = f.options.default;
3959
- const v = d === "last" ? _optionalChain([last, 'optionalAccess', _276 => _276[position], 'optionalAccess', _277 => _277[f.options.metric]]) : d;
4080
+ const v = d === "last" ? _optionalChain([last, 'optionalAccess', _283 => _283[position], 'optionalAccess', _284 => _284[f.options.metric]]) : d;
3960
4081
  if (v !== void 0 && v !== null) item[f.options.metric] = v;
3961
4082
  }
3962
4083
  return item;
3963
4084
  }
3964
4085
  function baseItems(group, editing, last) {
3965
4086
  const start = group.options.start;
3966
- const values = editing ? _chunkYUXA7I4Jjs.entriesToItems.call(void 0, group, editing) : start === "last" && _optionalChain([last, 'optionalAccess', _278 => _278.length]) ? last : Array.from({ length: typeof start === "number" ? Math.max(0, start) : 1 }, (_, i) => freshItem(group, i, last));
4087
+ const values = editing ? _chunkQIBL3YULjs.entriesToItems.call(void 0, group, editing) : start === "last" && _optionalChain([last, 'optionalAccess', _285 => _285.length]) ? last : Array.from({ length: typeof start === "number" ? Math.max(0, start) : 1 }, (_, i) => freshItem(group, i, last));
3967
4088
  return values.map((v, i) => ({ key: `b${i}`, values: v, edited: [] }));
3968
4089
  }
3969
4090
  var nextItemKey = 1;
3970
4091
  function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, timestamp, defaults: given = NO_DEFAULTS, beforeSave, editing }) {
3971
4092
  const theme = useDashTheme();
3972
- const panels = _react.useMemo.call(void 0, () => _chunkYUXA7I4Jjs.plainInputPanels.call(void 0, dashboard), [dashboard]);
3973
- const groups = _react.useMemo.call(void 0, () => _chunkYUXA7I4Jjs.inputGroups.call(void 0, dashboard), [dashboard]);
4093
+ const panels = _react.useMemo.call(void 0, () => _chunkQIBL3YULjs.plainInputPanels.call(void 0, dashboard), [dashboard]);
4094
+ const groups = _react.useMemo.call(void 0, () => _chunkQIBL3YULjs.inputGroups.call(void 0, dashboard), [dashboard]);
3974
4095
  const saved = _react.useMemo.call(void 0, () => editing ? savedValues(panels, editing) : NO_DEFAULTS, [panels, editing]);
3975
4096
  const [defaults, setDefaults] = _react.useState.call(void 0, {});
3976
4097
  const [edits, setEdits] = _react.useState.call(void 0, {});
@@ -3986,12 +4107,12 @@ function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, ti
3986
4107
  const next = {};
3987
4108
  for (const p of panels) {
3988
4109
  const d = p.options.default;
3989
- if (d === "last") next[p.options.metric] = _chunkYUXA7I4Jjs.entryToInputValue.call(void 0, p, await store.latest(p.options.metric));
4110
+ if (d === "last") next[p.options.metric] = _chunkQIBL3YULjs.entryToInputValue.call(void 0, p, await store.latest(p.options.metric));
3990
4111
  else if (d !== void 0) next[p.options.metric] = d;
3991
4112
  }
3992
4113
  const lastNext = {};
3993
4114
  for (const g of groups) {
3994
- const wanted = g.options.start === "last" || _chunkYUXA7I4Jjs.groupFields.call(void 0, g).some((f) => f.options.default === "last");
4115
+ const wanted = g.options.start === "last" || _chunkQIBL3YULjs.groupFields.call(void 0, g).some((f) => f.options.default === "last");
3995
4116
  if (wanted) lastNext[groupKey(g)] = await lastItems(store, g);
3996
4117
  }
3997
4118
  if (mine === run) {
@@ -4021,9 +4142,9 @@ function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, ti
4021
4142
  choices,
4022
4143
  problem: (m) => {
4023
4144
  const p = panels.find((x) => x.options.metric === m);
4024
- return p && (checked || m in edits) ? _chunkYUXA7I4Jjs.inputProblem.call(void 0, p, value(m)) : void 0;
4145
+ return p && (checked || m in edits) ? _chunkQIBL3YULjs.inputProblem.call(void 0, p, value(m)) : void 0;
4025
4146
  },
4026
- group: (g) => groupState(g, itemsOf(g), last[groupKey(g)], checked || groupKey(g) in groupEdits, (update) => {
4147
+ group: (g) => groupState(g, itemsOf(g), last[groupKey(g)], groupKey(g) in groupEdits, checked, (update) => {
4027
4148
  setStatus(null);
4028
4149
  setGroupEdits((all) => ({ ...all, [groupKey(g)]: update(_nullishCoalesce(_nullishCoalesce(all[groupKey(g)], () => ( base[groupKey(g)])), () => ( []))) }));
4029
4150
  })
@@ -4031,25 +4152,25 @@ function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, ti
4031
4152
  }, [edits, saved, defaults, given, store, choices, panels, checked, itemsOf, last, groupEdits, base]);
4032
4153
  const dirty = Object.keys(edits).length + groups.reduce((n, g) => n + groupChanges(_nullishCoalesce(base[groupKey(g)], () => ( [])), groupEdits[groupKey(g)]), 0);
4033
4154
  const recordedGroups = _react.useCallback.call(void 0,
4034
- () => groups.filter((g) => editing || groupKey(g) in groupEdits || _chunkYUXA7I4Jjs.groupFields.call(void 0, g).some((f) => f.options.record === "always")),
4155
+ () => groups.filter((g) => editing || groupKey(g) in groupEdits || _chunkQIBL3YULjs.groupFields.call(void 0, g).some((f) => f.options.record === "always")),
4035
4156
  [groups, editing, groupEdits]
4036
4157
  );
4037
4158
  const save = _react.useCallback.call(void 0, async () => {
4038
4159
  const problems = panels.flatMap((p) => {
4039
- const problem = _chunkYUXA7I4Jjs.inputProblem.call(void 0, p, state.value(p.options.metric));
4160
+ const problem = _chunkQIBL3YULjs.inputProblem.call(void 0, p, state.value(p.options.metric));
4040
4161
  return problem ? [`${p.title || p.options.metric}: ${problem.toLowerCase()}`] : [];
4041
4162
  });
4042
- for (const g of recordedGroups()) problems.push(..._chunkYUXA7I4Jjs.groupProblems.call(void 0, g, itemsOf(g).map((i) => i.values)));
4163
+ for (const g of recordedGroups()) problems.push(..._chunkQIBL3YULjs.groupProblems.call(void 0, g, itemsOf(g).map((i) => i.values)));
4043
4164
  if (problems.length) {
4044
4165
  setChecked(true);
4045
4166
  setStatus(problems.length === 1 ? `Can\u2019t save. ${problems[0]}` : `Can\u2019t save: ${problems.length} fields need fixing`);
4046
4167
  return;
4047
4168
  }
4048
- const ts = _nullishCoalesce(_optionalChain([editing, 'optionalAccess', _279 => _279[0], 'optionalAccess', _280 => _280.ts]), () => ( (header !== void 0 ? _nullishCoalesce(_optionalChain([timestamp, 'optionalCall', _281 => _281()]), () => ( Date.now())) : Date.now() + offsetMs)));
4049
- const saveId = _nullishCoalesce(_optionalChain([editing, 'optionalAccess', _282 => _282.find, 'call', _283 => _283((e) => e.save), 'optionalAccess', _284 => _284.save]), () => ( _chunkYUXA7I4Jjs.newSaveId.call(void 0, )));
4169
+ const ts = _nullishCoalesce(_optionalChain([editing, 'optionalAccess', _286 => _286[0], 'optionalAccess', _287 => _287.ts]), () => ( (header !== void 0 ? _nullishCoalesce(_optionalChain([timestamp, 'optionalCall', _288 => _288()]), () => ( Date.now())) : Date.now() + offsetMs)));
4170
+ const saveId = _nullishCoalesce(_optionalChain([editing, 'optionalAccess', _289 => _289.find, 'call', _290 => _290((e) => e.save), 'optionalAccess', _291 => _291.save]), () => ( _chunkQIBL3YULjs.newSaveId.call(void 0, )));
4050
4171
  const entries = [
4051
- ...panels.filter((p) => editing || p.options.metric in edits || p.options.record === "always").flatMap((p) => _chunkYUXA7I4Jjs.toEntries.call(void 0, p, state.value(p.options.metric), ts, { save: saveId })),
4052
- ...recordedGroups().flatMap((g) => _chunkYUXA7I4Jjs.groupToEntries.call(void 0, g, itemsOf(g).map((i) => i.values), ts, saveId))
4172
+ ...panels.filter((p) => editing || p.options.metric in edits || p.options.record === "always").flatMap((p) => _chunkQIBL3YULjs.toEntries.call(void 0, p, state.value(p.options.metric), ts, { save: saveId })),
4173
+ ...recordedGroups().flatMap((g) => _chunkQIBL3YULjs.groupToEntries.call(void 0, g, itemsOf(g).map((i) => i.values), ts, saveId))
4053
4174
  ];
4054
4175
  if (!entries.length) return;
4055
4176
  const extra = beforeSave ? await beforeSave(ts) : [];
@@ -4060,14 +4181,14 @@ function InputForm({ dashboard, store, onSaved, choices = NO_CHOICES, header, ti
4060
4181
  setChecked(false);
4061
4182
  setOffsetMs(0);
4062
4183
  setStatus(`Saved ${added.length} ${added.length === 1 ? "value" : "values"}`);
4063
- _optionalChain([onSaved, 'optionalCall', _285 => _285(added.length, added)]);
4184
+ _optionalChain([onSaved, 'optionalCall', _292 => _292(added.length, added)]);
4064
4185
  }, [panels, edits, state, offsetMs, store, onSaved, header, timestamp, beforeSave, editing, recordedGroups, itemsOf]);
4065
4186
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InputFormContext.Provider, { value: state, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DashboardProvider, { dashboard, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4066
4187
  DashboardView,
4067
4188
  {
4068
4189
  header: header !== void 0 ? header : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TimestampPicker, { offsetMs, onChange: setOffsetMs }),
4069
4190
  footer: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: [styles15.footer, { backgroundColor: theme.surface, borderTopColor: theme.border }], children: [
4070
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles15.status, { color: _optionalChain([status, 'optionalAccess', _286 => _286.startsWith, 'call', _287 => _287("Can\u2019t")]) ? theme.danger : theme.textSecondary }], children: _nullishCoalesce(status, () => ( (dirty ? `${dirty} unsaved ${dirty === 1 ? "change" : "changes"}` : "Nothing to save"))) }),
4191
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { style: [styles15.status, { color: _optionalChain([status, 'optionalAccess', _293 => _293.startsWith, 'call', _294 => _294("Can\u2019t")]) ? theme.danger : theme.textSecondary }], children: _nullishCoalesce(status, () => ( (dirty ? `${dirty} unsaved ${dirty === 1 ? "change" : "changes"}` : "Nothing to save"))) }),
4071
4192
  dirty > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4072
4193
  _reactnative.Pressable,
4073
4194
  {
@@ -4103,18 +4224,19 @@ function groupChanges(base, items) {
4103
4224
  const edited = items.reduce((n, i) => n + (baseKeys.has(i.key) ? i.edited.length : 0), 0);
4104
4225
  const added = items.filter((i) => !baseKeys.has(i.key)).length;
4105
4226
  const removed = base.filter((i) => !keys.has(i.key)).length;
4106
- const moved = edited + added + removed === 0 && items.some((i, n) => _optionalChain([base, 'access', _288 => _288[n], 'optionalAccess', _289 => _289.key]) !== i.key) ? 1 : 0;
4227
+ const moved = edited + added + removed === 0 && items.some((i, n) => _optionalChain([base, 'access', _295 => _295[n], 'optionalAccess', _296 => _296.key]) !== i.key) ? 1 : 0;
4107
4228
  return edited + added + removed + moved;
4108
4229
  }
4109
- function groupState(group, items, last, showProblems, update) {
4110
- const fields = _chunkYUXA7I4Jjs.groupFields.call(void 0, group);
4230
+ function groupState(group, items, last, edited, showProblems, update) {
4231
+ const fields = _chunkQIBL3YULjs.groupFields.call(void 0, group);
4111
4232
  const { max } = group.options;
4112
4233
  const fresh = (position) => ({ key: `n${nextItemKey++}`, values: freshItem(group, position, last), edited: [] });
4113
- const filled = items.filter((i) => !_chunkYUXA7I4Jjs.isEmptyItem.call(void 0, group, i.values)).length;
4234
+ const filled = items.filter((i) => !_chunkQIBL3YULjs.isEmptyItem.call(void 0, group, i.values)).length;
4114
4235
  const { min } = group.options;
4115
4236
  return {
4116
4237
  items: items.map((i) => ({ key: i.key, values: i.values, edited: i.edited })),
4117
4238
  canAdd: typeof max !== "number" || items.length < max,
4239
+ edited,
4118
4240
  problem: showProblems && typeof min === "number" && filled < min ? `At least ${min}` : void 0,
4119
4241
  add: () => update((all) => typeof max === "number" && all.length >= max ? all : [...all, fresh(all.length)]),
4120
4242
  duplicate: (index) => update(
@@ -4134,8 +4256,8 @@ function groupState(group, items, last, showProblems, update) {
4134
4256
  fieldProblem: (index, metric) => {
4135
4257
  const item = items[index];
4136
4258
  const field = fields.find((f) => f.options.metric === metric);
4137
- if (!item || !field || _chunkYUXA7I4Jjs.isEmptyItem.call(void 0, group, item.values)) return void 0;
4138
- return showProblems || item.edited.includes(metric) ? _chunkYUXA7I4Jjs.inputProblem.call(void 0, field, _nullishCoalesce(item.values[metric], () => ( null))) : void 0;
4259
+ if (!item || !field || _chunkQIBL3YULjs.isEmptyItem.call(void 0, group, item.values)) return void 0;
4260
+ return showProblems || item.edited.includes(metric) ? _chunkQIBL3YULjs.inputProblem.call(void 0, field, _nullishCoalesce(item.values[metric], () => ( null))) : void 0;
4139
4261
  }
4140
4262
  };
4141
4263
  }
@@ -4420,4 +4542,5 @@ var styles15 = _reactnative.StyleSheet.create({
4420
4542
 
4421
4543
 
4422
4544
 
4423
- exports.ALL = _chunkYUXA7I4Jjs.ALL; exports.BUNDLE_ACCEPT = _chunkYUXA7I4Jjs.BUNDLE_ACCEPT; exports.BUNDLE_TYPE = _chunkYUXA7I4Jjs.BUNDLE_TYPE; exports.CANVAS_GAP = _chunkYUXA7I4Jjs.CANVAS_GAP; exports.CANVAS_ROW_HEADER = _chunkYUXA7I4Jjs.CANVAS_ROW_HEADER; exports.Calendar = Calendar; exports.Chip = Chip; exports.ConfigLoader = _chunkYUXA7I4Jjs.ConfigLoader; exports.DASHBOARD_DS = _chunkYUXA7I4Jjs.DASHBOARD_DS; exports.DEFAULT_GAZETTEER = _chunkYUXA7I4Jjs.DEFAULT_GAZETTEER; exports.DashThemeProvider = DashThemeProvider; exports.DashboardProvider = DashboardProvider; exports.DashboardToolbar = DashboardToolbar; exports.DashboardView = DashboardView; exports.EDITABLE_VARIABLE_TYPES = _chunkYUXA7I4Jjs.EDITABLE_VARIABLE_TYPES; exports.GRID_COLUMNS = _chunkYUXA7I4Jjs.GRID_COLUMNS; exports.GROUP_FIELD_TYPES = _chunkYUXA7I4Jjs.GROUP_FIELD_TYPES; exports.GrafanaClient = _chunkYUXA7I4Jjs.GrafanaClient; exports.GrafanaDataSource = _chunkYUXA7I4Jjs.GrafanaDataSource; exports.GrafanaError = _chunkYUXA7I4Jjs.GrafanaError; exports.HttpConfigFiles = _chunkYUXA7I4Jjs.HttpConfigFiles; exports.INPUT_GROUP = _chunkYUXA7I4Jjs.INPUT_GROUP; exports.INPUT_OPTION_KEYS = _chunkYUXA7I4Jjs.INPUT_OPTION_KEYS; exports.INPUT_TYPES = _chunkYUXA7I4Jjs.INPUT_TYPES; exports.InputForm = InputForm; exports.InputFormContext = InputFormContext; exports.LOCAL_DATASOURCE_TYPE = _chunkYUXA7I4Jjs.LOCAL_DATASOURCE_TYPE; exports.Legend = Legend; exports.LocalDataSource = _chunkYUXA7I4Jjs.LocalDataSource; exports.MANIFEST_VERSION = _chunkYUXA7I4Jjs.MANIFEST_VERSION; exports.MAPPING_TYPES = _chunkYUXA7I4Jjs.MAPPING_TYPES; exports.MemoryEntryStore = _chunkYUXA7I4Jjs.MemoryEntryStore; exports.NAMED_COLORS = _chunkYUXA7I4Jjs.NAMED_COLORS; exports.NoData = NoData; exports.OPTION_CATEGORIES = _chunkYUXA7I4Jjs.OPTION_CATEGORIES; exports.OVERRIDE_MATCHERS = _chunkYUXA7I4Jjs.OVERRIDE_MATCHERS; exports.PANEL_TYPES = _chunkYUXA7I4Jjs.PANEL_TYPES; exports.PanelCard = PanelCard; exports.REDUCER_LABELS = _chunkYUXA7I4Jjs.REDUCER_LABELS; exports.REFRESH_CHOICES = _chunkYUXA7I4Jjs.REFRESH_CHOICES; exports.RELATIVE_RANGES = _chunkYUXA7I4Jjs.RELATIVE_RANGES; exports.RenderBoundary = RenderBoundary; exports.SERIES_PALETTE = _chunkYUXA7I4Jjs.SERIES_PALETTE; exports.SNIPPET_VERSION = _chunkYUXA7I4Jjs.SNIPPET_VERSION; exports.SPECIAL_MATCHES = _chunkYUXA7I4Jjs.SPECIAL_MATCHES; exports.SaveConflictError = _chunkYUXA7I4Jjs.SaveConflictError; exports.TEMPLATE_VERSION = _chunkYUXA7I4Jjs.TEMPLATE_VERSION; exports.TIME_PRESETS = _chunkYUXA7I4Jjs.TIME_PRESETS; exports.UNIT_CHOICES = _chunkYUXA7I4Jjs.UNIT_CHOICES; exports.addTime = _chunkYUXA7I4Jjs.addTime; exports.appSchema = _chunkYUXA7I4Jjs.appSchema; exports.applyDashboardLink = _chunkYUXA7I4Jjs.applyDashboardLink; exports.applyJsonEdits = _chunkYUXA7I4Jjs.applyJsonEdits; exports.applyTemplate = _chunkYUXA7I4Jjs.applyTemplate; exports.applyTransformations = _chunkYUXA7I4Jjs.applyTransformations; exports.assembleBundle = _chunkYUXA7I4Jjs.assembleBundle; exports.assembleFromResponse = _chunkYUXA7I4Jjs.assembleFromResponse; exports.buildFrames = _chunkYUXA7I4Jjs.buildFrames; exports.bundleFromFiles = _chunkYUXA7I4Jjs.bundleFromFiles; exports.bundleRoot = _chunkYUXA7I4Jjs.bundleRoot; exports.calculateInterval = _chunkYUXA7I4Jjs.calculateInterval; exports.checkFiles = _chunkYUXA7I4Jjs.checkFiles; exports.cleanDashboard = _chunkYUXA7I4Jjs.cleanDashboard; exports.cleanPanelOptions = _chunkYUXA7I4Jjs.cleanPanelOptions; exports.collapseRow = _chunkYUXA7I4Jjs.collapseRow; exports.compactGrid = _chunkYUXA7I4Jjs.compactGrid; exports.copyPanels = _chunkYUXA7I4Jjs.copyPanels; exports.darkTheme = darkTheme; exports.dashboardSchema = _chunkYUXA7I4Jjs.dashboardSchema; exports.dashboardSchemaIssues = _chunkYUXA7I4Jjs.dashboardSchemaIssues; exports.dashboardSourceIds = _chunkYUXA7I4Jjs.dashboardSourceIds; exports.defaultFetchJson = _chunkYUXA7I4Jjs.defaultFetchJson; exports.describeRange = _chunkYUXA7I4Jjs.describeRange; exports.diffJson = _chunkYUXA7I4Jjs.diffJson; exports.documentIdFor = _chunkYUXA7I4Jjs.documentIdFor; exports.documentUses = _chunkYUXA7I4Jjs.documentUses; exports.dropTarget = _chunkYUXA7I4Jjs.dropTarget; exports.duplicatePanel = _chunkYUXA7I4Jjs.duplicatePanel; exports.entriesSavedWith = _chunkYUXA7I4Jjs.entriesSavedWith; exports.entriesToItems = _chunkYUXA7I4Jjs.entriesToItems; exports.entryToInputValue = _chunkYUXA7I4Jjs.entryToInputValue; exports.expandRow = _chunkYUXA7I4Jjs.expandRow; exports.fetchBundle = _chunkYUXA7I4Jjs.fetchBundle; exports.fetchJsonWithToken = _chunkYUXA7I4Jjs.fetchJsonWithToken; exports.fieldDisplayName = _chunkYUXA7I4Jjs.fieldDisplayName; exports.fieldMatches = _chunkYUXA7I4Jjs.fieldMatches; exports.formatClock = _chunkYUXA7I4Jjs.formatClock; exports.formatDisplay = _chunkYUXA7I4Jjs.formatDisplay; exports.formatDuration = _chunkYUXA7I4Jjs.formatDuration; exports.formatJsonText = _chunkYUXA7I4Jjs.formatJsonText; exports.formatLocalDateTime = _chunkYUXA7I4Jjs.formatLocalDateTime; exports.formatValue = _chunkYUXA7I4Jjs.formatValue; exports.frameLength = _chunkYUXA7I4Jjs.frameLength; exports.framesToOptions = _chunkYUXA7I4Jjs.framesToOptions; exports.fromWire = _chunkYUXA7I4Jjs.fromWire; exports.getPath = _chunkYUXA7I4Jjs.getPath; exports.gridOffsetPx = _chunkYUXA7I4Jjs.gridOffsetPx; exports.gridUnitsToPx = _chunkYUXA7I4Jjs.gridUnitsToPx; exports.groupFields = _chunkYUXA7I4Jjs.groupFields; exports.groupKey = groupKey; exports.groupProblems = _chunkYUXA7I4Jjs.groupProblems; exports.groupToEntries = _chunkYUXA7I4Jjs.groupToEntries; exports.httpFetchJson = _chunkYUXA7I4Jjs.httpFetchJson; exports.initialVariableValues = _chunkYUXA7I4Jjs.initialVariableValues; exports.inputGroups = _chunkYUXA7I4Jjs.inputGroups; exports.inputPanels = _chunkYUXA7I4Jjs.inputPanels; exports.inputProblem = _chunkYUXA7I4Jjs.inputProblem; exports.insertPanel = _chunkYUXA7I4Jjs.insertPanel; exports.interpolate = _chunkYUXA7I4Jjs.interpolate; exports.interpolateDeep = _chunkYUXA7I4Jjs.interpolateDeep; exports.isBundleResponse = _chunkYUXA7I4Jjs.isBundleResponse; exports.isEditableVariableType = _chunkYUXA7I4Jjs.isEditableVariableType; exports.isEmptyItem = _chunkYUXA7I4Jjs.isEmptyItem; exports.isFormPanelType = _chunkYUXA7I4Jjs.isFormPanelType; exports.isInputGroup = _chunkYUXA7I4Jjs.isInputGroup; exports.isInputPanel = _chunkYUXA7I4Jjs.isInputPanel; exports.isInputType = _chunkYUXA7I4Jjs.isInputType; exports.isLocalDatasource = _chunkYUXA7I4Jjs.isLocalDatasource; exports.isReducer = _chunkYUXA7I4Jjs.isReducer; exports.isRow = _chunkYUXA7I4Jjs.isRow; exports.isSqlDatasource = _chunkYUXA7I4Jjs.isSqlDatasource; exports.layoutCanvas = _chunkYUXA7I4Jjs.layoutCanvas; exports.layoutDashboard = _chunkYUXA7I4Jjs.layoutDashboard; exports.lightTheme = lightTheme; exports.lineColumn = _chunkYUXA7I4Jjs.lineColumn; exports.loadGazetteer = _chunkYUXA7I4Jjs.loadGazetteer; exports.locate = _chunkYUXA7I4Jjs.locate; exports.makeTemplate = _chunkYUXA7I4Jjs.makeTemplate; exports.manifestSchemaIssues = _chunkYUXA7I4Jjs.manifestSchemaIssues; exports.mappedResult = _chunkYUXA7I4Jjs.mappedResult; exports.mappingProblem = _chunkYUXA7I4Jjs.mappingProblem; exports.mappingRow = _chunkYUXA7I4Jjs.mappingRow; exports.mappingRows = _chunkYUXA7I4Jjs.mappingRows; exports.metricChanges = _chunkYUXA7I4Jjs.metricChanges; exports.movePanel = _chunkYUXA7I4Jjs.movePanel; exports.newDocument = _chunkYUXA7I4Jjs.newDocument; exports.newPanel = _chunkYUXA7I4Jjs.newPanel; exports.newSaveId = _chunkYUXA7I4Jjs.newSaveId; exports.newVariable = _chunkYUXA7I4Jjs.newVariable; exports.nextPanelId = _chunkYUXA7I4Jjs.nextPanelId; exports.normalizeRef = _chunkYUXA7I4Jjs.normalizeRef; exports.numberFields = _chunkYUXA7I4Jjs.numberFields; exports.optionValue = _chunkYUXA7I4Jjs.optionValue; exports.overrideProperties = _chunkYUXA7I4Jjs.overrideProperties; exports.panelEdits = _chunkYUXA7I4Jjs.panelEdits; exports.panelHasQueries = _chunkYUXA7I4Jjs.panelHasQueries; exports.panelKey = _chunkYUXA7I4Jjs.panelKey; exports.panelMetrics = _chunkYUXA7I4Jjs.panelMetrics; exports.panelOptions = _chunkYUXA7I4Jjs.panelOptions; exports.panelOverrides = _chunkYUXA7I4Jjs.panelOverrides; exports.panelSize = _chunkYUXA7I4Jjs.panelSize; exports.panelSpan = _chunkYUXA7I4Jjs.panelSpan; exports.parseClockDigits = _chunkYUXA7I4Jjs.parseClockDigits; exports.parseDashboardLink = _chunkYUXA7I4Jjs.parseDashboardLink; exports.parseDuration = _chunkYUXA7I4Jjs.parseDuration; exports.parseGazetteer = _chunkYUXA7I4Jjs.parseGazetteer; exports.parseJsonText = _chunkYUXA7I4Jjs.parseJsonText; exports.parseLocalDateTime = _chunkYUXA7I4Jjs.parseLocalDateTime; exports.parseRange = _chunkYUXA7I4Jjs.parseRange; exports.parseSnippet = _chunkYUXA7I4Jjs.parseSnippet; exports.parseTemplate = _chunkYUXA7I4Jjs.parseTemplate; exports.parseTime = _chunkYUXA7I4Jjs.parseTime; exports.pasteSnippet = _chunkYUXA7I4Jjs.pasteSnippet; exports.placePanel = _chunkYUXA7I4Jjs.placePanel; exports.plainInputPanels = _chunkYUXA7I4Jjs.plainInputPanels; exports.pointerToPath = _chunkYUXA7I4Jjs.pointerToPath; exports.prepareDashboard = _chunkYUXA7I4Jjs.prepareDashboard; exports.previewPaste = _chunkYUXA7I4Jjs.previewPaste; exports.queryPanel = _chunkYUXA7I4Jjs.queryPanel; exports.queryParam = _chunkYUXA7I4Jjs.queryParam; exports.readConfigFiles = _chunkYUXA7I4Jjs.readConfigFiles; exports.readingOrder = _chunkYUXA7I4Jjs.readingOrder; exports.reduce = _chunkYUXA7I4Jjs.reduce; exports.refineOptions = _chunkYUXA7I4Jjs.refineOptions; exports.refreshedVariables = _chunkYUXA7I4Jjs.refreshedVariables; exports.registerPanel = registerPanel; exports.removeDocumentFromManifest = _chunkYUXA7I4Jjs.removeDocumentFromManifest; exports.removePanel = _chunkYUXA7I4Jjs.removePanel; exports.renameDocumentInManifest = _chunkYUXA7I4Jjs.renameDocumentInManifest; exports.renameMetrics = _chunkYUXA7I4Jjs.renameMetrics; exports.renameVariableInPanels = _chunkYUXA7I4Jjs.renameVariableInPanels; exports.repack = _chunkYUXA7I4Jjs.repack; exports.repeatOptions = _chunkYUXA7I4Jjs.repeatOptions; exports.resizePanel = _chunkYUXA7I4Jjs.resizePanel; exports.resolveColor = _chunkYUXA7I4Jjs.resolveColor; exports.resolveFieldConfig = _chunkYUXA7I4Jjs.resolveFieldConfig; exports.resolveLinks = _chunkYUXA7I4Jjs.resolveLinks; exports.resolveTimezone = _chunkYUXA7I4Jjs.resolveTimezone; exports.resolveUrl = _chunkYUXA7I4Jjs.resolveUrl; exports.resolveVariables = _chunkYUXA7I4Jjs.resolveVariables; exports.revalidateBundle = _chunkYUXA7I4Jjs.revalidateBundle; exports.rowsToMappings = _chunkYUXA7I4Jjs.rowsToMappings; exports.sameSave = _chunkYUXA7I4Jjs.sameSave; exports.sampleEntries = _chunkYUXA7I4Jjs.sampleEntries; exports.screenDocuments = _chunkYUXA7I4Jjs.screenDocuments; exports.screenOfType = _chunkYUXA7I4Jjs.screenOfType; exports.selectValue = _chunkYUXA7I4Jjs.selectValue; exports.seriesColor = _chunkYUXA7I4Jjs.seriesColor; exports.setHiddenOnPhones = _chunkYUXA7I4Jjs.setHiddenOnPhones; exports.setJsonValue = _chunkYUXA7I4Jjs.setJsonValue; exports.setOption = _chunkYUXA7I4Jjs.setOption; exports.setOptionValue = _chunkYUXA7I4Jjs.setOptionValue; exports.setOverrides = _chunkYUXA7I4Jjs.setOverrides; exports.settleLayout = _chunkYUXA7I4Jjs.settleLayout; exports.snapToGrid = _chunkYUXA7I4Jjs.snapToGrid; exports.splitPath = _chunkYUXA7I4Jjs.splitPath; exports.startOf = _chunkYUXA7I4Jjs.startOf; exports.stringifyCompact = _chunkYUXA7I4Jjs.stringifyCompact; exports.tabIdFor = _chunkYUXA7I4Jjs.tabIdFor; exports.templateNeeds = _chunkYUXA7I4Jjs.templateNeeds; exports.textSuggestions = _chunkYUXA7I4Jjs.textSuggestions; exports.thresholdStep = _chunkYUXA7I4Jjs.thresholdStep; exports.timeExprError = _chunkYUXA7I4Jjs.timeExprError; exports.timeField = _chunkYUXA7I4Jjs.timeField; exports.toEntries = _chunkYUXA7I4Jjs.toEntries; exports.toMillis = _chunkYUXA7I4Jjs.toMillis; exports.toSeries = _chunkYUXA7I4Jjs.toSeries; exports.toXYSeries = _chunkYUXA7I4Jjs.toXYSeries; exports.uniqueNames = _chunkYUXA7I4Jjs.uniqueNames; exports.useDashTheme = useDashTheme; exports.useDashboard = useDashboard; exports.useInputForm = useInputForm; exports.usePanelData = usePanelData; exports.validateBundle = _chunkYUXA7I4Jjs.validateBundle; exports.validateDashboard = _chunkYUXA7I4Jjs.validateDashboard; exports.validateManifest = _chunkYUXA7I4Jjs.validateManifest; exports.valueColor = _chunkYUXA7I4Jjs.valueColor; exports.valueText = _chunkYUXA7I4Jjs.valueText; exports.variableDependents = _chunkYUXA7I4Jjs.variableDependents; exports.variableInfo = _chunkYUXA7I4Jjs.variableInfo; exports.variableNameError = _chunkYUXA7I4Jjs.variableNameError; exports.variableOptions = _chunkYUXA7I4Jjs.variableOptions; exports.variableOrder = _chunkYUXA7I4Jjs.variableOrder; exports.variableReferences = _chunkYUXA7I4Jjs.variableReferences; exports.variableUses = _chunkYUXA7I4Jjs.variableUses; exports.variableWithCurrent = _chunkYUXA7I4Jjs.variableWithCurrent; exports.variableWithFlags = _chunkYUXA7I4Jjs.variableWithFlags; exports.variableWithQuery = _chunkYUXA7I4Jjs.variableWithQuery; exports.variableWithType = _chunkYUXA7I4Jjs.variableWithType; exports.visibleVariables = _chunkYUXA7I4Jjs.visibleVariables; exports.zoomRange = _chunkYUXA7I4Jjs.zoomRange;
4545
+
4546
+ exports.ALL = _chunkQIBL3YULjs.ALL; exports.BUNDLE_ACCEPT = _chunkQIBL3YULjs.BUNDLE_ACCEPT; exports.BUNDLE_TYPE = _chunkQIBL3YULjs.BUNDLE_TYPE; exports.CANVAS_GAP = _chunkQIBL3YULjs.CANVAS_GAP; exports.CANVAS_ROW_HEADER = _chunkQIBL3YULjs.CANVAS_ROW_HEADER; exports.Calendar = Calendar; exports.Chip = Chip; exports.ConfigLoader = _chunkQIBL3YULjs.ConfigLoader; exports.DASHBOARD_DS = _chunkQIBL3YULjs.DASHBOARD_DS; exports.DEFAULT_GAZETTEER = _chunkQIBL3YULjs.DEFAULT_GAZETTEER; exports.DashThemeProvider = DashThemeProvider; exports.DashboardProvider = DashboardProvider; exports.DashboardToolbar = DashboardToolbar; exports.DashboardView = DashboardView; exports.EDITABLE_VARIABLE_TYPES = _chunkQIBL3YULjs.EDITABLE_VARIABLE_TYPES; exports.GRID_COLUMNS = _chunkQIBL3YULjs.GRID_COLUMNS; exports.GROUP_FIELD_TYPES = _chunkQIBL3YULjs.GROUP_FIELD_TYPES; exports.GrafanaClient = _chunkQIBL3YULjs.GrafanaClient; exports.GrafanaDataSource = _chunkQIBL3YULjs.GrafanaDataSource; exports.GrafanaError = _chunkQIBL3YULjs.GrafanaError; exports.HttpConfigFiles = _chunkQIBL3YULjs.HttpConfigFiles; exports.INPUT_GROUP = _chunkQIBL3YULjs.INPUT_GROUP; exports.INPUT_OPTION_KEYS = _chunkQIBL3YULjs.INPUT_OPTION_KEYS; exports.INPUT_TYPES = _chunkQIBL3YULjs.INPUT_TYPES; exports.InputForm = InputForm; exports.InputFormContext = InputFormContext; exports.LOCAL_DATASOURCE_TYPE = _chunkQIBL3YULjs.LOCAL_DATASOURCE_TYPE; exports.Legend = Legend; exports.LocalDataSource = _chunkQIBL3YULjs.LocalDataSource; exports.MANIFEST_VERSION = _chunkQIBL3YULjs.MANIFEST_VERSION; exports.MAPPING_TYPES = _chunkQIBL3YULjs.MAPPING_TYPES; exports.MemoryEntryStore = _chunkQIBL3YULjs.MemoryEntryStore; exports.NAMED_COLORS = _chunkQIBL3YULjs.NAMED_COLORS; exports.NoData = NoData; exports.OPTION_CATEGORIES = _chunkQIBL3YULjs.OPTION_CATEGORIES; exports.OVERRIDE_MATCHERS = _chunkQIBL3YULjs.OVERRIDE_MATCHERS; exports.PANEL_TYPES = _chunkQIBL3YULjs.PANEL_TYPES; exports.PanelCard = PanelCard; exports.REDUCER_LABELS = _chunkQIBL3YULjs.REDUCER_LABELS; exports.REFRESH_CHOICES = _chunkQIBL3YULjs.REFRESH_CHOICES; exports.RELATIVE_RANGES = _chunkQIBL3YULjs.RELATIVE_RANGES; exports.RenderBoundary = RenderBoundary; exports.SERIES_PALETTE = _chunkQIBL3YULjs.SERIES_PALETTE; exports.SNIPPET_VERSION = _chunkQIBL3YULjs.SNIPPET_VERSION; exports.SPECIAL_MATCHES = _chunkQIBL3YULjs.SPECIAL_MATCHES; exports.SaveConflictError = _chunkQIBL3YULjs.SaveConflictError; exports.TEMPLATE_VERSION = _chunkQIBL3YULjs.TEMPLATE_VERSION; exports.TIME_PRESETS = _chunkQIBL3YULjs.TIME_PRESETS; exports.UNIT_CHOICES = _chunkQIBL3YULjs.UNIT_CHOICES; exports.addTime = _chunkQIBL3YULjs.addTime; exports.appSchema = _chunkQIBL3YULjs.appSchema; exports.applyDashboardLink = _chunkQIBL3YULjs.applyDashboardLink; exports.applyJsonEdits = _chunkQIBL3YULjs.applyJsonEdits; exports.applyTemplate = _chunkQIBL3YULjs.applyTemplate; exports.applyTransformations = _chunkQIBL3YULjs.applyTransformations; exports.assembleBundle = _chunkQIBL3YULjs.assembleBundle; exports.assembleFromResponse = _chunkQIBL3YULjs.assembleFromResponse; exports.buildFrames = _chunkQIBL3YULjs.buildFrames; exports.bundleFromFiles = _chunkQIBL3YULjs.bundleFromFiles; exports.bundleRoot = _chunkQIBL3YULjs.bundleRoot; exports.calculateInterval = _chunkQIBL3YULjs.calculateInterval; exports.checkFiles = _chunkQIBL3YULjs.checkFiles; exports.cleanDashboard = _chunkQIBL3YULjs.cleanDashboard; exports.cleanPanelOptions = _chunkQIBL3YULjs.cleanPanelOptions; exports.collapseRow = _chunkQIBL3YULjs.collapseRow; exports.compactGrid = _chunkQIBL3YULjs.compactGrid; exports.copyPanels = _chunkQIBL3YULjs.copyPanels; exports.darkTheme = darkTheme; exports.dashboardSchema = _chunkQIBL3YULjs.dashboardSchema; exports.dashboardSchemaIssues = _chunkQIBL3YULjs.dashboardSchemaIssues; exports.dashboardSourceIds = _chunkQIBL3YULjs.dashboardSourceIds; exports.defaultFetchJson = _chunkQIBL3YULjs.defaultFetchJson; exports.describeRange = _chunkQIBL3YULjs.describeRange; exports.diffJson = _chunkQIBL3YULjs.diffJson; exports.documentIdFor = _chunkQIBL3YULjs.documentIdFor; exports.documentUses = _chunkQIBL3YULjs.documentUses; exports.dropTarget = _chunkQIBL3YULjs.dropTarget; exports.duplicatePanel = _chunkQIBL3YULjs.duplicatePanel; exports.entriesSavedWith = _chunkQIBL3YULjs.entriesSavedWith; exports.entriesToItems = _chunkQIBL3YULjs.entriesToItems; exports.entryToInputValue = _chunkQIBL3YULjs.entryToInputValue; exports.expandRow = _chunkQIBL3YULjs.expandRow; exports.fetchBundle = _chunkQIBL3YULjs.fetchBundle; exports.fetchJsonWithToken = _chunkQIBL3YULjs.fetchJsonWithToken; exports.fieldDisplayName = _chunkQIBL3YULjs.fieldDisplayName; exports.fieldMatches = _chunkQIBL3YULjs.fieldMatches; exports.formatClock = _chunkQIBL3YULjs.formatClock; exports.formatDisplay = _chunkQIBL3YULjs.formatDisplay; exports.formatDuration = _chunkQIBL3YULjs.formatDuration; exports.formatJsonText = _chunkQIBL3YULjs.formatJsonText; exports.formatLocalDateTime = _chunkQIBL3YULjs.formatLocalDateTime; exports.formatValue = _chunkQIBL3YULjs.formatValue; exports.frameLength = _chunkQIBL3YULjs.frameLength; exports.framesToOptions = _chunkQIBL3YULjs.framesToOptions; exports.fromWire = _chunkQIBL3YULjs.fromWire; exports.getPath = _chunkQIBL3YULjs.getPath; exports.gridOffsetPx = _chunkQIBL3YULjs.gridOffsetPx; exports.gridUnitsToPx = _chunkQIBL3YULjs.gridUnitsToPx; exports.groupField = _chunkQIBL3YULjs.groupField; exports.groupFields = _chunkQIBL3YULjs.groupFields; exports.groupKey = groupKey; exports.groupProblems = _chunkQIBL3YULjs.groupProblems; exports.groupToEntries = _chunkQIBL3YULjs.groupToEntries; exports.httpFetchJson = _chunkQIBL3YULjs.httpFetchJson; exports.initialVariableValues = _chunkQIBL3YULjs.initialVariableValues; exports.inputGroups = _chunkQIBL3YULjs.inputGroups; exports.inputPanels = _chunkQIBL3YULjs.inputPanels; exports.inputProblem = _chunkQIBL3YULjs.inputProblem; exports.insertPanel = _chunkQIBL3YULjs.insertPanel; exports.interpolate = _chunkQIBL3YULjs.interpolate; exports.interpolateDeep = _chunkQIBL3YULjs.interpolateDeep; exports.isBundleResponse = _chunkQIBL3YULjs.isBundleResponse; exports.isEditableVariableType = _chunkQIBL3YULjs.isEditableVariableType; exports.isEmptyItem = _chunkQIBL3YULjs.isEmptyItem; exports.isFormPanelType = _chunkQIBL3YULjs.isFormPanelType; exports.isInputGroup = _chunkQIBL3YULjs.isInputGroup; exports.isInputPanel = _chunkQIBL3YULjs.isInputPanel; exports.isInputType = _chunkQIBL3YULjs.isInputType; exports.isLocalDatasource = _chunkQIBL3YULjs.isLocalDatasource; exports.isReducer = _chunkQIBL3YULjs.isReducer; exports.isRow = _chunkQIBL3YULjs.isRow; exports.isSqlDatasource = _chunkQIBL3YULjs.isSqlDatasource; exports.layoutCanvas = _chunkQIBL3YULjs.layoutCanvas; exports.layoutDashboard = _chunkQIBL3YULjs.layoutDashboard; exports.lightTheme = lightTheme; exports.lineColumn = _chunkQIBL3YULjs.lineColumn; exports.loadGazetteer = _chunkQIBL3YULjs.loadGazetteer; exports.locate = _chunkQIBL3YULjs.locate; exports.makeTemplate = _chunkQIBL3YULjs.makeTemplate; exports.manifestSchemaIssues = _chunkQIBL3YULjs.manifestSchemaIssues; exports.mappedResult = _chunkQIBL3YULjs.mappedResult; exports.mappingProblem = _chunkQIBL3YULjs.mappingProblem; exports.mappingRow = _chunkQIBL3YULjs.mappingRow; exports.mappingRows = _chunkQIBL3YULjs.mappingRows; exports.metricChanges = _chunkQIBL3YULjs.metricChanges; exports.movePanel = _chunkQIBL3YULjs.movePanel; exports.newDocument = _chunkQIBL3YULjs.newDocument; exports.newPanel = _chunkQIBL3YULjs.newPanel; exports.newSaveId = _chunkQIBL3YULjs.newSaveId; exports.newVariable = _chunkQIBL3YULjs.newVariable; exports.nextPanelId = _chunkQIBL3YULjs.nextPanelId; exports.normalizeRef = _chunkQIBL3YULjs.normalizeRef; exports.numberFields = _chunkQIBL3YULjs.numberFields; exports.optionValue = _chunkQIBL3YULjs.optionValue; exports.overrideProperties = _chunkQIBL3YULjs.overrideProperties; exports.panelEdits = _chunkQIBL3YULjs.panelEdits; exports.panelHasQueries = _chunkQIBL3YULjs.panelHasQueries; exports.panelKey = _chunkQIBL3YULjs.panelKey; exports.panelMetrics = _chunkQIBL3YULjs.panelMetrics; exports.panelOptions = _chunkQIBL3YULjs.panelOptions; exports.panelOverrides = _chunkQIBL3YULjs.panelOverrides; exports.panelSize = _chunkQIBL3YULjs.panelSize; exports.panelSpan = _chunkQIBL3YULjs.panelSpan; exports.parseClockDigits = _chunkQIBL3YULjs.parseClockDigits; exports.parseDashboardLink = _chunkQIBL3YULjs.parseDashboardLink; exports.parseDuration = _chunkQIBL3YULjs.parseDuration; exports.parseGazetteer = _chunkQIBL3YULjs.parseGazetteer; exports.parseJsonText = _chunkQIBL3YULjs.parseJsonText; exports.parseLocalDateTime = _chunkQIBL3YULjs.parseLocalDateTime; exports.parseRange = _chunkQIBL3YULjs.parseRange; exports.parseSnippet = _chunkQIBL3YULjs.parseSnippet; exports.parseTemplate = _chunkQIBL3YULjs.parseTemplate; exports.parseTime = _chunkQIBL3YULjs.parseTime; exports.pasteSnippet = _chunkQIBL3YULjs.pasteSnippet; exports.placePanel = _chunkQIBL3YULjs.placePanel; exports.plainInputPanels = _chunkQIBL3YULjs.plainInputPanels; exports.pointerToPath = _chunkQIBL3YULjs.pointerToPath; exports.prepareDashboard = _chunkQIBL3YULjs.prepareDashboard; exports.previewPaste = _chunkQIBL3YULjs.previewPaste; exports.queryPanel = _chunkQIBL3YULjs.queryPanel; exports.queryParam = _chunkQIBL3YULjs.queryParam; exports.readConfigFiles = _chunkQIBL3YULjs.readConfigFiles; exports.readingOrder = _chunkQIBL3YULjs.readingOrder; exports.reduce = _chunkQIBL3YULjs.reduce; exports.refineOptions = _chunkQIBL3YULjs.refineOptions; exports.refreshedVariables = _chunkQIBL3YULjs.refreshedVariables; exports.registerPanel = registerPanel; exports.removeDocumentFromManifest = _chunkQIBL3YULjs.removeDocumentFromManifest; exports.removePanel = _chunkQIBL3YULjs.removePanel; exports.renameDocumentInManifest = _chunkQIBL3YULjs.renameDocumentInManifest; exports.renameMetrics = _chunkQIBL3YULjs.renameMetrics; exports.renameVariableInPanels = _chunkQIBL3YULjs.renameVariableInPanels; exports.repack = _chunkQIBL3YULjs.repack; exports.repeatOptions = _chunkQIBL3YULjs.repeatOptions; exports.resizePanel = _chunkQIBL3YULjs.resizePanel; exports.resolveColor = _chunkQIBL3YULjs.resolveColor; exports.resolveFieldConfig = _chunkQIBL3YULjs.resolveFieldConfig; exports.resolveLinks = _chunkQIBL3YULjs.resolveLinks; exports.resolveTimezone = _chunkQIBL3YULjs.resolveTimezone; exports.resolveUrl = _chunkQIBL3YULjs.resolveUrl; exports.resolveVariables = _chunkQIBL3YULjs.resolveVariables; exports.revalidateBundle = _chunkQIBL3YULjs.revalidateBundle; exports.rowsToMappings = _chunkQIBL3YULjs.rowsToMappings; exports.sameSave = _chunkQIBL3YULjs.sameSave; exports.sampleEntries = _chunkQIBL3YULjs.sampleEntries; exports.screenDocuments = _chunkQIBL3YULjs.screenDocuments; exports.screenOfType = _chunkQIBL3YULjs.screenOfType; exports.selectValue = _chunkQIBL3YULjs.selectValue; exports.seriesColor = _chunkQIBL3YULjs.seriesColor; exports.setHiddenOnPhones = _chunkQIBL3YULjs.setHiddenOnPhones; exports.setJsonValue = _chunkQIBL3YULjs.setJsonValue; exports.setOption = _chunkQIBL3YULjs.setOption; exports.setOptionValue = _chunkQIBL3YULjs.setOptionValue; exports.setOverrides = _chunkQIBL3YULjs.setOverrides; exports.settleLayout = _chunkQIBL3YULjs.settleLayout; exports.snapToGrid = _chunkQIBL3YULjs.snapToGrid; exports.splitPath = _chunkQIBL3YULjs.splitPath; exports.startOf = _chunkQIBL3YULjs.startOf; exports.stringifyCompact = _chunkQIBL3YULjs.stringifyCompact; exports.tabIdFor = _chunkQIBL3YULjs.tabIdFor; exports.templateNeeds = _chunkQIBL3YULjs.templateNeeds; exports.textSuggestions = _chunkQIBL3YULjs.textSuggestions; exports.thresholdStep = _chunkQIBL3YULjs.thresholdStep; exports.timeExprError = _chunkQIBL3YULjs.timeExprError; exports.timeField = _chunkQIBL3YULjs.timeField; exports.toEntries = _chunkQIBL3YULjs.toEntries; exports.toMillis = _chunkQIBL3YULjs.toMillis; exports.toSeries = _chunkQIBL3YULjs.toSeries; exports.toXYSeries = _chunkQIBL3YULjs.toXYSeries; exports.uniqueNames = _chunkQIBL3YULjs.uniqueNames; exports.useDashTheme = useDashTheme; exports.useDashboard = useDashboard; exports.useInputForm = useInputForm; exports.usePanelData = usePanelData; exports.validateBundle = _chunkQIBL3YULjs.validateBundle; exports.validateDashboard = _chunkQIBL3YULjs.validateDashboard; exports.validateManifest = _chunkQIBL3YULjs.validateManifest; exports.valueColor = _chunkQIBL3YULjs.valueColor; exports.valueText = _chunkQIBL3YULjs.valueText; exports.variableDependents = _chunkQIBL3YULjs.variableDependents; exports.variableInfo = _chunkQIBL3YULjs.variableInfo; exports.variableNameError = _chunkQIBL3YULjs.variableNameError; exports.variableOptions = _chunkQIBL3YULjs.variableOptions; exports.variableOrder = _chunkQIBL3YULjs.variableOrder; exports.variableReferences = _chunkQIBL3YULjs.variableReferences; exports.variableUses = _chunkQIBL3YULjs.variableUses; exports.variableWithCurrent = _chunkQIBL3YULjs.variableWithCurrent; exports.variableWithFlags = _chunkQIBL3YULjs.variableWithFlags; exports.variableWithQuery = _chunkQIBL3YULjs.variableWithQuery; exports.variableWithType = _chunkQIBL3YULjs.variableWithType; exports.visibleVariables = _chunkQIBL3YULjs.visibleVariables; exports.zoomRange = _chunkQIBL3YULjs.zoomRange;