@devtable/dashboard 14.17.0 → 14.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,68 +1,35 @@
1
1
  var ru = Object.defineProperty;
2
2
  var au = (e, t, n) => t in e ? ru(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var j = (e, t, n) => (au(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import E from "dayjs";
5
- import iu from "dayjs/plugin/advancedFormat";
6
- import ou from "dayjs/plugin/arraySupport";
7
- import lu from "dayjs/plugin/buddhistEra";
8
- import su from "dayjs/plugin/calendar";
9
- import cu from "dayjs/plugin/customParseFormat";
10
- import du from "dayjs/plugin/dayOfYear";
11
- import uu from "dayjs/plugin/duration";
12
- import hu from "dayjs/plugin/isBetween";
13
- import pu from "dayjs/plugin/isLeapYear";
14
- import mu from "dayjs/plugin/isMoment";
15
- import gu from "dayjs/plugin/isoWeek";
16
- import fu from "dayjs/plugin/isoWeeksInYear";
17
- import bu from "dayjs/plugin/isSameOrAfter";
18
- import yu from "dayjs/plugin/isSameOrBefore";
19
- import _u from "dayjs/plugin/isToday";
20
- import xu from "dayjs/plugin/isTomorrow";
21
- import vu from "dayjs/plugin/isYesterday";
22
- import wu from "dayjs/plugin/localeData";
23
- import Su from "dayjs/plugin/localizedFormat";
24
- import Cu from "dayjs/plugin/minMax";
25
- import ku from "dayjs/plugin/objectSupport";
26
- import zu from "dayjs/plugin/pluralGetSet";
27
- import Tu from "dayjs/plugin/preParsePostFormat";
28
- import Du from "dayjs/plugin/quarterOfYear";
29
- import Iu from "dayjs/plugin/relativeTime";
30
- import Mu from "dayjs/plugin/timezone";
31
- import Lu from "dayjs/plugin/toArray";
32
- import Vu from "dayjs/plugin/toObject";
33
- import Au from "dayjs/plugin/updateLocale";
34
- import $u from "dayjs/plugin/utc";
35
- import Pu from "dayjs/plugin/weekday";
36
- import Ru from "dayjs/plugin/weekOfYear";
37
- import Eu from "dayjs/plugin/weekYear";
38
- import { createInstance as Ou } from "i18next";
39
- import { useTranslation as x, Trans as Sr, initReactI18next as qu, I18nextProvider as Fu } from "react-i18next";
40
- import Bu from "i18next-browser-languagedetector";
4
+ import { createInstance as iu } from "i18next";
5
+ import { useTranslation as x, Trans as Sr, initReactI18next as ou, I18nextProvider as lu } from "react-i18next";
6
+ import su from "i18next-browser-languagedetector";
41
7
  import "intl-pluralrules";
42
- import C, { unset as Nu, get as le, isObject as Xo, set as wa, omit as sn, isFunction as ju, orderBy as Qu, last as Zo, cloneDeepWith as Jo, defaults as he, minBy as Gu, maxBy as Hu, cloneDeep as Pe, values as el, template as Sa, throttle as Wu, range as Uu, defaultsDeep as Ge, isEqual as Fe, keyBy as Ku, isEmpty as tl, isNumber as Yu, findLastIndex as Xu, isString as nl, pick as rl } from "lodash";
8
+ import C, { unset as cu, get as le, isObject as Xo, set as wa, omit as sn, isFunction as du, orderBy as uu, last as Zo, cloneDeepWith as Jo, defaults as he, minBy as hu, maxBy as pu, cloneDeep as Pe, values as el, template as Sa, throttle as mu, range as gu, defaultsDeep as Ge, isEqual as Fe, keyBy as fu, isEmpty as tl, isNumber as bu, findLastIndex as yu, isString as nl, pick as rl } from "lodash";
43
9
  import { observable as al, runInAction as Nn, toJS as Et, reaction as Be, makeAutoObservable as Wn } from "mobx";
44
10
  import ji from "eventemitter2";
45
11
  import { jsx as r, Fragment as F, jsxs as u } from "react/jsx-runtime";
46
- import $, { useId as Zu, useState as G, useEffect as B, useCallback as ae, forwardRef as J, useMemo as z, useRef as $t, createContext as il, createElement as Mn, useContext as Ht, memo as Ju } from "react";
12
+ import $, { useId as _u, useState as G, useEffect as B, useCallback as ae, forwardRef as J, useMemo as z, useRef as $t, createContext as il, createElement as Mn, useContext as Ht, memo as xu } from "react";
47
13
  import cn, { random as Cr } from "chroma-js";
48
14
  import He from "echarts-for-react/lib/core";
49
15
  import "echarts-gl";
50
16
  import * as Ne from "echarts/core";
51
- import { use as eh } from "echarts/core";
52
- import { useBoolean as De, useCreation as Pt, usePrevious as th, useAsyncEffect as Ln, useRequest as dn, useLatest as oa, useWhyDidYouUpdate as ol } from "ahooks";
53
- import { Box as V, TextInput as A, Group as _, Text as k, Select as O, Button as L, Modal as ve, Stack as T, Divider as P, NumberInput as ne, SimpleGrid as ke, Menu as W, UnstyledButton as Ca, Tooltip as re, Flex as tt, ColorInput as Jt, Center as Ot, ActionIcon as ee, Badge as jt, CloseButton as xt, Overlay as en, NativeSelect as ka, useMantineTheme as kr, ColorSwatch as dr, Popover as ut, ColorPicker as Qi, HoverCard as _e, Checkbox as te, Paper as nh, Code as Gi, Tabs as S, Switch as Ce, Table as w, MultiSelect as un, LoadingOverlay as tn, Alert as Un, Collapse as Kn, CheckIcon as rh, SegmentedControl as za, Anchor as Qn, Pagination as zr, Textarea as ll, RangeSlider as ah, Autocomplete as ih, Combobox as Bt, Mark as sl, Slider as oh, List as We, getRadius as Ta, Affix as lh, AppShell as Xe, FileInput as sh, Highlight as ch, rem as Hi, ThemeIcon as ar, JsonInput as cl, Drawer as dh, Radio as Wi, Skeleton as Ui, NavLink as la, useCombobox as uh, Loader as Da, InputBase as hh, Input as ph } from "@mantine/core";
54
- import { useHover as mh, useDisclosure as nn, useClipboard as gh, randomId as hn, useElementSize as dl, useResizeObserver as fh, useInputState as ul } from "@mantine/hooks";
55
- import * as bh from "popmotion";
17
+ import { use as vu } from "echarts/core";
18
+ import { useBoolean as De, useCreation as Pt, usePrevious as wu, useAsyncEffect as Ln, useRequest as dn, useLatest as oa, useWhyDidYouUpdate as ol } from "ahooks";
19
+ import { Box as V, TextInput as A, Group as _, Text as k, Select as O, Button as L, Modal as ve, Stack as T, Divider as P, NumberInput as ne, SimpleGrid as ke, Menu as W, UnstyledButton as Ca, Tooltip as re, Flex as tt, ColorInput as Jt, Center as Ot, ActionIcon as ee, Badge as jt, CloseButton as xt, Overlay as en, NativeSelect as ka, useMantineTheme as kr, ColorSwatch as dr, Popover as ut, ColorPicker as Qi, HoverCard as _e, Checkbox as te, Paper as Su, Code as Gi, Tabs as S, Switch as Ce, Table as w, MultiSelect as un, LoadingOverlay as tn, Alert as Un, Collapse as Kn, CheckIcon as Cu, SegmentedControl as za, Anchor as Qn, Pagination as zr, Textarea as ll, RangeSlider as ku, Autocomplete as zu, Combobox as Bt, Mark as sl, Slider as Tu, List as We, getRadius as Ta, Affix as Du, AppShell as Xe, FileInput as Iu, Highlight as Mu, rem as Hi, ThemeIcon as ar, JsonInput as cl, Drawer as Lu, Radio as Wi, Skeleton as Ui, NavLink as la, useCombobox as Vu, Loader as Da, InputBase as Au, Input as $u } from "@mantine/core";
20
+ import { useHover as Pu, useDisclosure as nn, useClipboard as Ru, randomId as hn, useElementSize as dl, useResizeObserver as Eu, useInputState as ul } from "@mantine/hooks";
21
+ import * as Ou from "popmotion";
56
22
  import { interpolate as bn } from "popmotion";
57
23
  import * as hl from "d3-array";
58
24
  import { quantile as ir } from "d3-array";
59
25
  import * as kn from "mathjs";
60
- import { faker as yh } from "@faker-js/faker";
61
- import * as _h from "crypto-js";
62
- import xh from "crypto-js";
26
+ import { faker as qu } from "@faker-js/faker";
27
+ import * as Fu from "crypto-js";
28
+ import Bu from "crypto-js";
29
+ import E from "dayjs";
63
30
  import pn from "numbro";
64
- import { IconMathFunction as Wt, IconRecycle as mt, IconDeviceFloppy as me, IconSelector as vh, IconGripVertical as pl, IconTrash as $e, IconArrowBackUp as wh, IconPlayerSkipBack as ml, IconMathFunctionOff as Sh, IconTextSize as Ia, IconInfoCircle as Re, IconCheck as Ch, IconBorderAll as kh, IconCircleOff as gl, IconX as Ma, IconAlertCircle as Gn, IconPlus as lt, IconGripHorizontal as zh, IconChevronUp as Th, IconChevronDown as fl, IconChartAreaLineFilled as Dh, IconPlaylistAdd as Hn, IconArrowDown as Ih, IconArrowUp as Mh, IconArrowBarToRight as La, IconArrowCurveRight as sa, IconCalendar as Lh, IconMinus as Vh, IconRefresh as Tr, IconChevronsUp as Ah, IconChevronsDown as $h, IconDatabase as Xt, IconDownload as Yn, IconCode as mn, IconCamera as Dr, IconArrowsMaximize as bl, IconAppWindow as Va, IconVariable as Vn, IconChartHistogram as yl, IconRoute as Aa, IconCopy as $a, IconArrowLeft as _l, IconArrowsMove as Ph, IconChevronDownRight as Rh, IconShare3 as Eh, IconArrowsLeftRight as Oh, IconCodeDots as xl, IconFilter as Pa, IconBoxMultiple as Ra, IconCaretDown as qh, IconAlertTriangle as vl, IconDevices as Fh, IconSettings as An, IconPointFilled as Ir, IconFileImport as Ki, IconSearch as wl, IconCircleDashed as Bh, IconCircleDot as Nh, IconChevronsUpRight as jh, IconAdjustments as Qh, IconLine as Gh, IconEye as Sl, IconTable as Hh, IconColumns as Wh, IconVectorTriangle as Uh, IconVariablePlus as Kh, IconHierarchy as Yh, IconDiscountCheckFilled as Xh, IconHash as Zh } from "@tabler/icons-react";
65
- import { RichTextEditor as oe, Link as Cl, useRichTextEditorContext as Jh } from "@mantine/tiptap";
31
+ import { IconMathFunction as Wt, IconRecycle as mt, IconDeviceFloppy as me, IconSelector as Nu, IconGripVertical as pl, IconTrash as $e, IconArrowBackUp as ju, IconPlayerSkipBack as ml, IconMathFunctionOff as Qu, IconTextSize as Ia, IconInfoCircle as Re, IconCheck as Gu, IconBorderAll as Hu, IconCircleOff as gl, IconX as Ma, IconAlertCircle as Gn, IconPlus as lt, IconGripHorizontal as Wu, IconChevronUp as Uu, IconChevronDown as fl, IconChartAreaLineFilled as Ku, IconPlaylistAdd as Hn, IconArrowDown as Yu, IconArrowUp as Xu, IconArrowBarToRight as La, IconArrowCurveRight as sa, IconCalendar as Zu, IconMinus as Ju, IconRefresh as Tr, IconChevronsUp as eh, IconChevronsDown as th, IconDatabase as Xt, IconDownload as Yn, IconCode as mn, IconCamera as Dr, IconArrowsMaximize as bl, IconAppWindow as Va, IconVariable as Vn, IconChartHistogram as yl, IconRoute as Aa, IconCopy as $a, IconArrowLeft as _l, IconArrowsMove as nh, IconChevronDownRight as rh, IconShare3 as ah, IconArrowsLeftRight as ih, IconCodeDots as xl, IconFilter as Pa, IconBoxMultiple as Ra, IconCaretDown as oh, IconAlertTriangle as vl, IconDevices as lh, IconSettings as An, IconPointFilled as Ir, IconFileImport as Ki, IconSearch as wl, IconCircleDashed as sh, IconCircleDot as ch, IconChevronsUpRight as dh, IconAdjustments as uh, IconLine as hh, IconEye as Sl, IconTable as ph, IconColumns as mh, IconVectorTriangle as gh, IconVariablePlus as fh, IconHierarchy as bh, IconDiscountCheckFilled as yh, IconHash as _h } from "@tabler/icons-react";
32
+ import { RichTextEditor as oe, Link as Cl, useRichTextEditorContext as xh } from "@mantine/tiptap";
66
33
  import { Color as kl } from "@tiptap/extension-color";
67
34
  import zl from "@tiptap/extension-highlight";
68
35
  import Tl from "@tiptap/extension-placeholder";
@@ -77,80 +44,76 @@ import Pl from "@tiptap/extension-text-style";
77
44
  import Rl from "@tiptap/extension-underline";
78
45
  import { useEditor as El } from "@tiptap/react";
79
46
  import Ol from "@tiptap/starter-kit";
80
- import { DatesProvider as ep, DatePicker as tp } from "@mantine/dates";
47
+ import { DatesProvider as vh, DatePicker as wh } from "@mantine/dates";
81
48
  import qt, { loader as Jr } from "@monaco-editor/react";
82
- import { Mark as ql, Extension as np } from "@tiptap/core";
83
- import * as rp from "d3-scale";
84
- import { useForm as ge, Controller as f, useFieldArray as Mr, useWatch as ap } from "react-hook-form";
49
+ import { Mark as ql, Extension as Sh } from "@tiptap/core";
50
+ import * as Ch from "d3-scale";
51
+ import { useForm as ge, Controller as f, useFieldArray as Mr, useWatch as kh } from "react-hook-form";
85
52
  import { observer as D } from "mobx-react-lite";
86
53
  import { move as Fl } from "@dnd-kit/helpers";
87
54
  import { DragDropProvider as Ea } from "@dnd-kit/react";
88
55
  import { useSortable as Oa } from "@dnd-kit/react/sortable";
89
56
  import { v4 as Lt } from "uuid";
90
- import { BarChart as ip, BoxplotChart as op, CustomChart as lp, FunnelChart as sp, HeatmapChart as cp, LineChart as dp, PieChart as up, RadarChart as hp, ScatterChart as pp, SunburstChart as mp } from "echarts/charts";
91
- import { CalendarComponent as gp, DataZoomComponent as fp, GridComponent as bp, LegendComponent as yp, TooltipComponent as _p, MarkLineComponent as xp, MarkAreaComponent as vp, VisualMapComponent as wp } from "echarts/components";
92
- import { CanvasRenderer as Sp } from "echarts/renderers";
93
- import { constrainedEditor as Cp } from "constrained-editor-plugin";
94
- import { showNotification as gn, updateNotification as kp, notifications as Bl } from "@mantine/notifications";
57
+ import { BarChart as zh, BoxplotChart as Th, CustomChart as Dh, FunnelChart as Ih, HeatmapChart as Mh, LineChart as Lh, PieChart as Vh, RadarChart as Ah, ScatterChart as $h, SunburstChart as Ph } from "echarts/charts";
58
+ import { CalendarComponent as Rh, DataZoomComponent as Eh, GridComponent as Oh, LegendComponent as qh, TooltipComponent as Fh, MarkLineComponent as Bh, MarkAreaComponent as Nh, VisualMapComponent as jh } from "echarts/components";
59
+ import { CanvasRenderer as Qh } from "echarts/renderers";
60
+ import { constrainedEditor as Gh } from "constrained-editor-plugin";
61
+ import { showNotification as gn, updateNotification as Hh, notifications as Bl } from "@mantine/notifications";
95
62
  import { createStyles as $n, MantineEmotionProvider as Nl } from "@mantine/emotion";
96
63
  import * as Yt from "d3-regression";
97
64
  import { CodeHighlight as vt } from "@mantine/code-highlight";
98
- import { flexRender as Tn, createColumnHelper as qa, useReactTable as Fa, getCoreRowModel as Ba, getSortedRowModel as zp } from "@tanstack/react-table";
99
- import { useVirtualizer as Tp } from "@tanstack/react-virtual";
65
+ import { flexRender as Tn, createColumnHelper as qa, useReactTable as Fa, getCoreRowModel as Ba, getSortedRowModel as Wh } from "@tanstack/react-table";
66
+ import { useVirtualizer as Uh } from "@tanstack/react-virtual";
100
67
  import ot from "axios";
101
- import { useModals as wt, ModalsProvider as jl } from "@mantine/modals";
102
- import { encode as Dp, decode as Ip } from "js-base64";
103
- import { types as m, cast as Rt, getParent as we, destroy as Mp, getRoot as Le, addDisposer as Ue, detach as ur, isAlive as Yi, flow as Vt, toGenerator as It, clone as Lp, getSnapshot as Mt, applySnapshot as je, addMiddleware as Vp, getType as Ap, castToSnapshot as Ql } from "mobx-state-tree";
68
+ import Kh from "dayjs/plugin/advancedFormat";
69
+ import Yh from "dayjs/plugin/arraySupport";
70
+ import Xh from "dayjs/plugin/buddhistEra";
71
+ import Zh from "dayjs/plugin/calendar";
72
+ import Jh from "dayjs/plugin/customParseFormat";
73
+ import ep from "dayjs/plugin/dayOfYear";
74
+ import tp from "dayjs/plugin/duration";
75
+ import np from "dayjs/plugin/isBetween";
76
+ import rp from "dayjs/plugin/isLeapYear";
77
+ import ap from "dayjs/plugin/isMoment";
78
+ import ip from "dayjs/plugin/isoWeek";
79
+ import op from "dayjs/plugin/isoWeeksInYear";
80
+ import lp from "dayjs/plugin/isSameOrAfter";
81
+ import sp from "dayjs/plugin/isSameOrBefore";
82
+ import cp from "dayjs/plugin/isToday";
83
+ import dp from "dayjs/plugin/isTomorrow";
84
+ import up from "dayjs/plugin/isYesterday";
85
+ import hp from "dayjs/plugin/localeData";
86
+ import pp from "dayjs/plugin/localizedFormat";
87
+ import mp from "dayjs/plugin/minMax";
88
+ import gp from "dayjs/plugin/objectSupport";
89
+ import fp from "dayjs/plugin/pluralGetSet";
90
+ import bp from "dayjs/plugin/preParsePostFormat";
91
+ import yp from "dayjs/plugin/quarterOfYear";
92
+ import _p from "dayjs/plugin/relativeTime";
93
+ import xp from "dayjs/plugin/timezone";
94
+ import vp from "dayjs/plugin/toArray";
95
+ import wp from "dayjs/plugin/toObject";
96
+ import Sp from "dayjs/plugin/updateLocale";
97
+ import Cp from "dayjs/plugin/utc";
98
+ import kp from "dayjs/plugin/weekday";
99
+ import zp from "dayjs/plugin/weekOfYear";
100
+ import Tp from "dayjs/plugin/weekYear";
101
+ import { types as m, cast as Rt, getParent as we, destroy as Dp, getRoot as Le, addDisposer as Ue, detach as ur, isAlive as Yi, flow as Vt, toGenerator as It, clone as Ip, getSnapshot as Mt, applySnapshot as je, addMiddleware as Mp, getType as Lp, castToSnapshot as jl } from "mobx-state-tree";
104
102
  import { saveAs as Lr } from "file-saver";
105
- import Gl from "dom-to-image-more";
106
- import Hl from "jszip";
107
- import { AsyncParser as $p } from "@json2csv/whatwg";
108
- import Wl, { SHOW_PARENT as Pp } from "rc-tree-select";
103
+ import Ql from "dom-to-image-more";
104
+ import Gl from "jszip";
105
+ import { AsyncParser as Vp } from "@json2csv/whatwg";
106
+ import { encode as Ap, decode as $p } from "js-base64";
107
+ import Hl, { SHOW_PARENT as Pp } from "rc-tree-select";
109
108
  import { arrayToTree as Rp } from "performant-array-to-tree";
110
109
  import Ep, { Option as Op } from "rc-select";
111
- import { WidthProvider as Ul, Responsive as Kl } from "react-grid-layout";
110
+ import { useModals as wt, ModalsProvider as Wl } from "@mantine/modals";
112
111
  import { createPortal as qp } from "react-dom";
112
+ import { WidthProvider as Ul, Responsive as Kl } from "react-grid-layout";
113
113
  import { Spotlight as zn, spotlight as Fp } from "@mantine/spotlight";
114
114
  import "@mantine/spotlight/styles.css";
115
115
  import Bp, { Position as _t, Handle as Xi, MiniMap as Np, Controls as jp, Background as Qp } from "reactflow";
116
116
  import "reactflow/dist/style.css";
117
- E.extend(iu);
118
- E.extend(ou);
119
- E.extend(lu);
120
- E.extend(su);
121
- E.extend(cu);
122
- E.extend(du);
123
- E.extend(uu);
124
- E.extend(hu);
125
- E.extend(pu);
126
- E.extend(mu);
127
- E.extend(bu);
128
- E.extend(yu);
129
- E.extend(_u);
130
- E.extend(xu);
131
- E.extend(vu);
132
- E.extend(gu);
133
- E.extend(fu);
134
- E.extend(wu);
135
- E.extend(Su);
136
- E.extend(Cu);
137
- E.extend(ku);
138
- E.extend(zu);
139
- E.extend(Tu);
140
- E.extend(Du);
141
- E.extend(Iu);
142
- E.extend(Mu);
143
- E.extend(Lu);
144
- E.extend(Vu);
145
- E.extend(Au);
146
- E.extend($u);
147
- E.extend(Ru);
148
- E.extend(Eu);
149
- E.extend(Pu);
150
- E.tz.setDefault("UTC");
151
- E.updateLocale("en", {
152
- weekStart: 1
153
- });
154
117
  const Gp = {
155
118
  translation: {
156
119
  filter: {
@@ -2195,7 +2158,7 @@ class Vr {
2195
2158
  }
2196
2159
  async deleteItem(t) {
2197
2160
  Nn(() => {
2198
- Nu(this.rootRef.current, [t]);
2161
+ cu(this.rootRef.current, [t]);
2199
2162
  });
2200
2163
  }
2201
2164
  getItem(t) {
@@ -2406,7 +2369,7 @@ class Na {
2406
2369
  dispose() {
2407
2370
  this.instanceRegistry.forEach((t) => {
2408
2371
  const n = le(t, "dispose");
2409
- ju(n) && n.bind(t)();
2372
+ du(n) && n.bind(t)();
2410
2373
  }), this.instanceRegistry.clear(), this.factoryRegistry.clear();
2411
2374
  }
2412
2375
  }
@@ -2428,7 +2391,7 @@ const Zl = $.createContext({
2428
2391
  function Jl({
2429
2392
  children: e
2430
2393
  }) {
2431
- const t = `panel-addon-slot-${Zu()}`;
2394
+ const t = `panel-addon-slot-${_u()}`;
2432
2395
  return /* @__PURE__ */ u(Zl.Provider, { value: {
2433
2396
  addonSlotId: t
2434
2397
  }, children: [
@@ -2446,7 +2409,7 @@ function im() {
2446
2409
  } = $.useContext(Zl);
2447
2410
  return e ? document.getElementById(e) : null;
2448
2411
  }
2449
- const es = "14.17.0", om = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2412
+ const es = "14.17.2", om = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2450
2413
  __proto__: null,
2451
2414
  version: es
2452
2415
  }, Symbol.toStringTag, { value: "Module" }));
@@ -2530,7 +2493,7 @@ class cm {
2530
2493
  return n;
2531
2494
  if (t.from > t.to)
2532
2495
  throw new Error(`Can not downgrade from version '${t.from}' to (${t.to})`);
2533
- const i = this.migrations.filter((s) => s.version > t.from && s.version <= t.to), o = Qu(i, "version", "asc");
2496
+ const i = this.migrations.filter((s) => s.version > t.from && s.version <= t.to), o = uu(i, "version", "asc");
2534
2497
  if (((l = Zo(o)) == null ? void 0 : l.version) !== t.to)
2535
2498
  throw new Error(`Migration to version ${t.to} not found`);
2536
2499
  return o.reduce((s, c) => c.handler(s, a), n);
@@ -2672,14 +2635,14 @@ function or(e, t) {
2672
2635
  return e[a];
2673
2636
  }
2674
2637
  const kt = {
2675
- CryptoJS: xh,
2638
+ CryptoJS: Bu,
2676
2639
  d3Array: hl,
2677
2640
  dayjs: E,
2678
2641
  lodash: C,
2679
2642
  numbro: pn,
2680
2643
  mathjs: kn,
2681
- faker: yh,
2682
- popmotion: bh
2644
+ faker: qu,
2645
+ popmotion: Ou
2683
2646
  }, gm = [{
2684
2647
  name: "CryptoJS",
2685
2648
  url: "https://github.com/brix/crypto-js",
@@ -2870,7 +2833,7 @@ function hs({
2870
2833
  const a = t.language;
2871
2834
  return Im[a] ?? "en";
2872
2835
  }, [t.language]);
2873
- return /* @__PURE__ */ r(ep, { settings: {
2836
+ return /* @__PURE__ */ r(vh, { settings: {
2874
2837
  locale: n,
2875
2838
  firstDayOfWeek: 1
2876
2839
  }, children: e });
@@ -2969,7 +2932,7 @@ function Vm(e, t, n) {
2969
2932
  if (e.length < 2)
2970
2933
  throw new Error("[getColorMappingFunc] expected at least 2 colors");
2971
2934
  const a = (n - t) / (e.length - 1), i = hl.range(t, n + a, a);
2972
- return rp.scaleLinear(i, e);
2935
+ return Ch.scaleLinear(i, e);
2973
2936
  } catch (a) {
2974
2937
  return console.error(a), () => "inherit";
2975
2938
  }
@@ -3189,7 +3152,7 @@ function Rm(e) {
3189
3152
  } = n, {
3190
3153
  hovered: s,
3191
3154
  ref: c
3192
- } = mh();
3155
+ } = Pu();
3193
3156
  return /* @__PURE__ */ r(V, { ref: c, ...a, children: /* @__PURE__ */ u(_, { wrap: "nowrap", justify: "space-between", children: [
3194
3157
  /* @__PURE__ */ r(k, { size: "sm", sx: {
3195
3158
  flexGrow: 1
@@ -3516,7 +3479,7 @@ const jm = Nm(), Qm = ({
3516
3479
  backgroundImage: i,
3517
3480
  borderRadius: 4
3518
3481
  } }),
3519
- /* @__PURE__ */ r(vh, { size: 14, color: "rgb(134, 142, 150)" })
3482
+ /* @__PURE__ */ r(Nu, { size: 14, color: "rgb(134, 142, 150)" })
3520
3483
  ] })
3521
3484
  ] }) }),
3522
3485
  /* @__PURE__ */ u(W.Dropdown, { children: [
@@ -3685,7 +3648,7 @@ const jm = Nm(), Qm = ({
3685
3648
  /* @__PURE__ */ u(_, { justify: "space-between", px: "1rem", pb: "0.75rem", children: [
3686
3649
  /* @__PURE__ */ u(_, { justify: "flex-start", children: [
3687
3650
  /* @__PURE__ */ r(L, { color: "red", size: "xs", onClick: n, leftSection: /* @__PURE__ */ r($e, { size: 18 }), children: a("common.actions.clear") }),
3688
- /* @__PURE__ */ r(L, { color: "orange", size: "xs", onClick: c, leftSection: /* @__PURE__ */ r(wh, { size: 18 }), children: a("common.actions.revert") })
3651
+ /* @__PURE__ */ r(L, { color: "orange", size: "xs", onClick: c, leftSection: /* @__PURE__ */ r(ju, { size: 18 }), children: a("common.actions.revert") })
3689
3652
  ] }),
3690
3653
  /* @__PURE__ */ r(L, { color: "green", size: "xs", onClick: l(t), leftSection: /* @__PURE__ */ r(me, { size: 18 }), children: a("common.actions.save_changes") })
3691
3654
  ] })
@@ -3920,7 +3883,7 @@ const Bn = "data-value", rg = Bn, zs = "dynamicColor", Ts = ql.create({
3920
3883
  const g = ae((v, I) => {
3921
3884
  if (i.length === 0)
3922
3885
  return;
3923
- const M = Cp(I), R = v.getModel();
3886
+ const M = Gh(I), R = v.getModel();
3924
3887
  if (M.initializeIn(v), M.addRestrictionsTo(R, i), !!R && !R._hasHighlight) {
3925
3888
  M.toggleDevMode(), R.toggleHighlightOfEditableAreas();
3926
3889
  const q = R.getCurrentEditableRanges(), X = R.getValueInEditableRanges();
@@ -4016,9 +3979,9 @@ const Bn = "data-value", rg = Bn, zs = "dynamicColor", Ts = ql.create({
4016
3979
  lineHeight: "26px",
4017
3980
  borderColor: "#ced4da !important",
4018
3981
  color: "#000"
4019
- }, disabled: !n, onClick: () => e.chain().focus().unsetDynamicColor().run(), children: /* @__PURE__ */ r(Sh, { stroke: 1.5, size: 16 }) }) })
3982
+ }, disabled: !n, onClick: () => e.chain().focus().unsetDynamicColor().run(), children: /* @__PURE__ */ r(Qu, { stroke: 1.5, size: 16 }) }) })
4020
3983
  ] });
4021
- }, Ds = np.create({
3984
+ }, Ds = Sh.create({
4022
3985
  name: "fontSize",
4023
3986
  addOptions() {
4024
3987
  return {
@@ -4146,7 +4109,7 @@ const no = ({
4146
4109
  flexGrow: 1
4147
4110
  }, children: /* @__PURE__ */ u(_, { justify: "space-between", wrap: "nowrap", children: [
4148
4111
  /* @__PURE__ */ u(_, { justify: "flex-start", gap: "0.5em", children: [
4149
- t && /* @__PURE__ */ r(Ch, { size: 16, color: "green" }),
4112
+ t && /* @__PURE__ */ r(Gu, { size: 16, color: "green" }),
4150
4113
  /* @__PURE__ */ r(k, { size: "sm", sx: {
4151
4114
  flexGrow: 1
4152
4115
  }, children: a })
@@ -4220,12 +4183,12 @@ const no = ({
4220
4183
  function mg() {
4221
4184
  const {
4222
4185
  editor: e
4223
- } = Jh();
4186
+ } = xh();
4224
4187
  return /* @__PURE__ */ r(oe.Control, { onClick: () => e == null ? void 0 : e.commands.insertTable({
4225
4188
  rows: 3,
4226
4189
  cols: 3,
4227
4190
  withHeaderRow: !0
4228
- }), "aria-label": "Insert table", title: "Insert table", children: /* @__PURE__ */ r(kh, { stroke: 1.5, size: 16 }) });
4191
+ }), "aria-label": "Insert table", title: "Insert table", children: /* @__PURE__ */ r(Hu, { stroke: 1.5, size: 16 }) });
4229
4192
  }
4230
4193
  const Zt = J(({
4231
4194
  value: e,
@@ -4639,7 +4602,7 @@ function ro(e, t, n) {
4639
4602
  return e ? new Function(`return ${e}`)()(t, kt, n) : t;
4640
4603
  }
4641
4604
  function Es() {
4642
- eh([Sp, ip, op, lp, sp, cp, dp, up, hp, pp, mp, gp, fp, bp, yp, _p, xp, vp, wp]);
4605
+ vu([Qh, zh, Th, Dh, Ih, Mh, Lh, Vh, Ah, $h, Ph, Rh, Eh, Oh, qh, Fh, Bh, Nh, jh]);
4643
4606
  }
4644
4607
  const Gt = (e) => Jo(e, (t, n) => {
4645
4608
  if (n !== void 0 && t)
@@ -4782,7 +4745,7 @@ function Lg({
4782
4745
  min: I,
4783
4746
  max: M
4784
4747
  } = z(() => {
4785
- const Q = Gu(g, (Z) => Z[v.columnKey]), ue = Hu(g, (Z) => Z[v.columnKey]);
4748
+ const Q = hu(g, (Z) => Z[v.columnKey]), ue = pu(g, (Z) => Z[v.columnKey]);
4786
4749
  return {
4787
4750
  min: le(Q, v.columnKey),
4788
4751
  max: le(ue, v.columnKey)
@@ -5315,7 +5278,7 @@ const st = (e, t) => {
5315
5278
  return B(() => e.watchTriggerSnapshotList((i) => a(i.filter((o) => o.schemaRef === t))), []), n;
5316
5279
  }, da = il(null);
5317
5280
  function qr(e) {
5318
- const t = $.useContext(da), n = Pt(() => e.configure(t || new Na()), [e.configure]), a = th(n);
5281
+ const t = $.useContext(da), n = Pt(() => e.configure(t || new Na()), [e.configure]), a = wu(n);
5319
5282
  return a && a !== n && a.dispose(), /* @__PURE__ */ r(da.Provider, { value: n, children: e.children });
5320
5283
  }
5321
5284
  function Fr() {
@@ -5327,13 +5290,13 @@ const ct = ({}) => Fr().getRequired(ye.instanceScope.interactionManager), Fs = (
5327
5290
  } = x(), {
5328
5291
  title: n = "Variables",
5329
5292
  variables: a
5330
- } = e, i = gh(), o = (l) => {
5293
+ } = e, i = Ru(), o = (l) => {
5331
5294
  i.copy(l), gn({
5332
5295
  color: "green",
5333
5296
  message: t("common.copied")
5334
5297
  });
5335
5298
  };
5336
- return /* @__PURE__ */ u(nh, { withBorder: !0, p: "sm", children: [
5299
+ return /* @__PURE__ */ u(Su, { withBorder: !0, p: "sm", children: [
5337
5300
  /* @__PURE__ */ r(k, { size: "xs", c: "dimmed", mb: "sm", children: n }),
5338
5301
  /* @__PURE__ */ r(T, { style: {
5339
5302
  maxHeight: "500px"
@@ -6114,7 +6077,7 @@ const Lf = D(({
6114
6077
  return B(() => o.instanceData.watchItem(
6115
6078
  null,
6116
6079
  // avoid too many updates
6117
- Wu((s) => {
6080
+ mu((s) => {
6118
6081
  e.viz.setConf(s);
6119
6082
  }, 100, {
6120
6083
  leading: !1,
@@ -6939,7 +6902,7 @@ const hb = D(({
6939
6902
  }) => {
6940
6903
  const {
6941
6904
  classes: t
6942
- } = Ws(), n = Uu(0, 13, 1).map((a) => 100 / 12 * a).map((a) => [e.interpolation.getColor(a), a]);
6905
+ } = Ws(), n = gu(0, 13, 1).map((a) => 100 / 12 * a).map((a) => [e.interpolation.getColor(a), a]);
6943
6906
  return /* @__PURE__ */ r("div", { className: t.palette, children: n.map(([a, i], o) => /* @__PURE__ */ r(ub, { index: o, color: a, value: e.getStepFromValue(i), onChange: (l) => e.changeStep(l, i) }, a)) });
6944
6907
  }), pb = D(function(t) {
6945
6908
  const n = Pt(() => new db(), []);
@@ -7086,7 +7049,7 @@ const hb = D(({
7086
7049
  id: e,
7087
7050
  index: t
7088
7051
  });
7089
- return /* @__PURE__ */ r(S.Tab, { ref: l, value: e, leftSection: /* @__PURE__ */ r(zh, { size: 14, color: a || t === 0 ? "rgb(34, 139, 230)" : "transparent" }), onMouseEnter: i, onMouseLeave: o, children: n });
7052
+ return /* @__PURE__ */ r(S.Tab, { ref: l, value: e, leftSection: /* @__PURE__ */ r(Wu, { size: 14, color: a || t === 0 ? "rgb(34, 139, 230)" : "transparent" }), onMouseEnter: i, onMouseLeave: o, children: n });
7090
7053
  }, _b = ({
7091
7054
  fieldArray: e,
7092
7055
  add: t,
@@ -7419,7 +7382,7 @@ function Ib({
7419
7382
  toggle: a
7420
7383
  }] = nn(!1);
7421
7384
  return /* @__PURE__ */ u(V, { children: [
7422
- /* @__PURE__ */ r(L, { variant: "subtle", w: "100%", size: "compact-sm", onClick: a, leftSection: n ? /* @__PURE__ */ r(Th, { size: 14 }) : /* @__PURE__ */ r(fl, { size: 14 }), children: t(n ? "numbro.format.preview.close" : "numbro.format.preview.open") }),
7385
+ /* @__PURE__ */ r(L, { variant: "subtle", w: "100%", size: "compact-sm", onClick: a, leftSection: n ? /* @__PURE__ */ r(Uu, { size: 14 }) : /* @__PURE__ */ r(fl, { size: 14 }), children: t(n ? "numbro.format.preview.close" : "numbro.format.preview.open") }),
7423
7386
  /* @__PURE__ */ r(Kn, { in: n, children: n && /* @__PURE__ */ u(w, { highlightOnHover: !0, sx: {
7424
7387
  tableLayout: "fixed"
7425
7388
  }, children: [
@@ -7913,7 +7876,7 @@ const li = {
7913
7876
  const s = a.colors[l][6];
7914
7877
  return /* @__PURE__ */ r(dr, { color: s, onClick: i(l), radius: 4, size: 26, sx: {
7915
7878
  cursor: "pointer"
7916
- }, children: o(l) && /* @__PURE__ */ r(rh, { width: 10, color: "white" }) }, l);
7879
+ }, children: o(l) && /* @__PURE__ */ r(Cu, { width: 10, color: "white" }) }, l);
7917
7880
  }) })
7918
7881
  ] });
7919
7882
  }, Yb = ["xs", "sm", "md", "lg", "xl"], pa = J(({
@@ -8126,7 +8089,7 @@ const ry = {
8126
8089
  };
8127
8090
  return /* @__PURE__ */ u(T, { ref: n, children: [
8128
8091
  /* @__PURE__ */ r(P, { mt: 10, mb: -10, variant: "dashed", label: /* @__PURE__ */ u(_, { gap: 6, children: [
8129
- /* @__PURE__ */ r(Dh, { size: 14, style: {
8092
+ /* @__PURE__ */ r(Ku, { size: 14, style: {
8130
8093
  color: "#999"
8131
8094
  } }),
8132
8095
  a("chart.series.line.area_style.label")
@@ -9094,7 +9057,7 @@ function Wy({
9094
9057
  } = t, {
9095
9058
  queryID: l,
9096
9059
  columnKey: s
9097
- } = N(a), c = Ku($r(n, l), s);
9060
+ } = N(a), c = fu($r(n, l), s);
9098
9061
  return (d, h) => {
9099
9062
  let p;
9100
9063
  h.name ? p = c[h.name] : p = n[h.dataIndex];
@@ -13598,7 +13561,7 @@ const jv = J(({
13598
13561
  }, [n]);
13599
13562
  return /* @__PURE__ */ u(T, { gap: 4, mt: 2, mb: "1rem", children: [
13600
13563
  /* @__PURE__ */ r("label", { className: "form-field-label required", children: e }),
13601
- /* @__PURE__ */ r(ah, { value: i, onChange: o, onChangeEnd: l, label: (s) => `${s}%` })
13564
+ /* @__PURE__ */ r(ku, { value: i, onChange: o, onChangeEnd: l, label: (s) => `${s}%` })
13602
13565
  ] });
13603
13566
  }), Qv = ({
13604
13567
  row: e,
@@ -13640,7 +13603,7 @@ const jv = J(({
13640
13603
  /* @__PURE__ */ u(_, { grow: !0, wrap: "nowrap", style: {
13641
13604
  flex: 1
13642
13605
  }, children: [
13643
- /* @__PURE__ */ r(ih, { size: "xs", value: e.name, placeholder: o("viz.pie_chart.color.map.name"), onChange: y, onClick: s, error: l && !e.name, data: i, maxDropdownHeight: 500 }),
13606
+ /* @__PURE__ */ r(zu, { size: "xs", value: e.name, placeholder: o("viz.pie_chart.color.map.name"), onChange: y, onClick: s, error: l && !e.name, data: i, maxDropdownHeight: 500 }),
13644
13607
  /* @__PURE__ */ r(Jt, { styles: {
13645
13608
  root: {
13646
13609
  flexGrow: 1
@@ -17759,9 +17722,9 @@ const mc = ["function text({ value, row_data }, utils) {", " return value", "
17759
17722
  }) => {
17760
17723
  switch (e) {
17761
17724
  case "asc":
17762
- return /* @__PURE__ */ r(Mh, { size: 16 });
17725
+ return /* @__PURE__ */ r(Xu, { size: 16 });
17763
17726
  case "desc":
17764
- return /* @__PURE__ */ r(Ih, { size: "1em" });
17727
+ return /* @__PURE__ */ r(Yu, { size: "1em" });
17765
17728
  default:
17766
17729
  return null;
17767
17730
  }
@@ -17956,7 +17919,7 @@ function vS({
17956
17919
  rows: t
17957
17920
  }) {
17958
17921
  var s, c;
17959
- const n = Tp({
17922
+ const n = Uh({
17960
17923
  getScrollElement: () => e.current,
17961
17924
  count: t.length,
17962
17925
  estimateSize: ae(() => 28, []),
@@ -18058,7 +18021,7 @@ function CS(e, t, n) {
18058
18021
  } = x();
18059
18022
  if (!e)
18060
18023
  return a("viz.table.click_cell.click_cell_content");
18061
- if (Yu(e.column)) {
18024
+ if (bu(e.column)) {
18062
18025
  if (n)
18063
18026
  return a("viz.table.click_cell.click_cell_of_x_th", {
18064
18027
  x: e.column + 1
@@ -18098,7 +18061,7 @@ class zS {
18098
18061
  return (o) => a * o + i;
18099
18062
  }
18100
18063
  getStepFunctionForValue(t) {
18101
- let n = Xu(this.steps, (a) => a.from <= t);
18064
+ let n = yu(this.steps, (a) => a.from <= t);
18102
18065
  return n = fo(n, 0, this.steps.length - 2), this.getLinearFunction(this.steps[n], this.steps[n + 1]);
18103
18066
  }
18104
18067
  mapValue(t) {
@@ -18213,7 +18176,7 @@ function bo({
18213
18176
  columns: v,
18214
18177
  columnResizeMode: "onChange",
18215
18178
  getCoreRowModel: Ba(),
18216
- getSortedRowModel: zp()
18179
+ getSortedRowModel: Wh()
18217
18180
  }), {
18218
18181
  rows: q
18219
18182
  } = R.getRowModel(), X = $.useRef(null), Q = q.length, ue = Q > 0, Z = ue ? n - 22 : n, Oe = ue ? 22 : 0;
@@ -18879,7 +18842,7 @@ function JS({
18879
18842
  s && n(s.label);
18880
18843
  }, [i]), /* @__PURE__ */ u(T, { gap: 0, mt: "sm", mb: "lg", children: [
18881
18844
  /* @__PURE__ */ r(k, { size: "sm", children: e }),
18882
- /* @__PURE__ */ r(V, { px: "1.5em", children: /* @__PURE__ */ r(oh, { label: null, marks: nr, value: i, onChange: o, step: 25, ref: a }) })
18845
+ /* @__PURE__ */ r(V, { px: "1.5em", children: /* @__PURE__ */ r(Tu, { label: null, marks: nr, value: i, onChange: o, step: 25, ref: a }) })
18883
18846
  ] });
18884
18847
  }
18885
18848
  const eC = $.forwardRef(JS), tC = ({
@@ -22793,7 +22756,7 @@ try {
22793
22756
  wn.install(zc());
22794
22757
  } catch {
22795
22758
  }
22796
- const yr = Ou({
22759
+ const yr = iu({
22797
22760
  debug: !1,
22798
22761
  fallbackLng: "en",
22799
22762
  interpolation: {
@@ -22803,7 +22766,7 @@ const yr = Ou({
22803
22766
  en: Gp,
22804
22767
  zh: Hp
22805
22768
  }
22806
- }).use(Bu).use(qu);
22769
+ }).use(su).use(ou);
22807
22770
  yr.init();
22808
22771
  Di.forEach((e) => {
22809
22772
  var t;
@@ -22819,8 +22782,45 @@ function Tc({
22819
22782
  }) {
22820
22783
  return B(() => {
22821
22784
  yr.changeLanguage(e);
22822
- }, [e]), /* @__PURE__ */ r(Fu, { i18n: yr, children: t });
22823
- }
22785
+ }, [e]), /* @__PURE__ */ r(lu, { i18n: yr, children: t });
22786
+ }
22787
+ E.extend(Kh);
22788
+ E.extend(Yh);
22789
+ E.extend(Xh);
22790
+ E.extend(Zh);
22791
+ E.extend(Jh);
22792
+ E.extend(ep);
22793
+ E.extend(tp);
22794
+ E.extend(np);
22795
+ E.extend(rp);
22796
+ E.extend(ap);
22797
+ E.extend(lp);
22798
+ E.extend(sp);
22799
+ E.extend(cp);
22800
+ E.extend(dp);
22801
+ E.extend(up);
22802
+ E.extend(ip);
22803
+ E.extend(op);
22804
+ E.extend(hp);
22805
+ E.extend(pp);
22806
+ E.extend(mp);
22807
+ E.extend(gp);
22808
+ E.extend(fp);
22809
+ E.extend(bp);
22810
+ E.extend(yp);
22811
+ E.extend(_p);
22812
+ E.extend(xp);
22813
+ E.extend(vp);
22814
+ E.extend(wp);
22815
+ E.extend(Sp);
22816
+ E.extend(Cp);
22817
+ E.extend(zp);
22818
+ E.extend(Tp);
22819
+ E.extend(kp);
22820
+ E.tz.setDefault("UTC");
22821
+ E.updateLocale("en", {
22822
+ weekStart: 1
22823
+ });
22824
22824
  function o5(e) {
22825
22825
  e = e || {};
22826
22826
  const t = Object.keys(e).sort(), n = [];
@@ -22840,7 +22840,7 @@ function o5(e) {
22840
22840
  }
22841
22841
  function l5(e, t) {
22842
22842
  let n = o5(e);
22843
- return n += "&key=" + t, _h.MD5(n).toString().toUpperCase();
22843
+ return n += "&key=" + t, Fu.MD5(n).toString().toUpperCase();
22844
22844
  }
22845
22845
  class s5 {
22846
22846
  constructor() {
@@ -22985,126 +22985,7 @@ const Sn = new c5();
22985
22985
  function Dc(e) {
22986
22986
  Sn.baseURL !== e.apiBaseURL && (Sn.baseURL = e.apiBaseURL), e.app_id && (Sn.app_id = e.app_id), e.app_secret && (Sn.app_secret = e.app_secret), e.makeQueryENV && (Sn.makeQueryENV = e.makeQueryENV);
22987
22987
  }
22988
- const u5 = new d5(Sn), dt = u5;
22989
- function h5(e, t) {
22990
- const n = Ip(t);
22991
- n !== e && (console.error("Inconsistent sql"), console.groupCollapsed("Inconsistent sql"), console.table({
22992
- before: e,
22993
- after: t,
22994
- v: n
22995
- }), console.groupEnd());
22996
- }
22997
- async function p5({
22998
- query: e,
22999
- name: t,
23000
- payload: n,
23001
- additionals: a
23002
- }, i) {
23003
- if (!e.sql)
23004
- return [];
23005
- const {
23006
- type: o,
23007
- key: l,
23008
- sql: s,
23009
- pre_process: c,
23010
- post_process: d
23011
- } = e, h = Ja(s, n), p = zg({
23012
- sql: h,
23013
- pre_process: c
23014
- }), g = Dp(p);
23015
- h5(p, g);
23016
- let y = await dt.query(i)({
23017
- type: o,
23018
- key: l,
23019
- query: g,
23020
- ...a
23021
- }, {
23022
- params: {
23023
- name: t
23024
- }
23025
- });
23026
- return y = Tg(d, y, Za(n)), y;
23027
- }
23028
- async function m5({
23029
- type: e,
23030
- key: t,
23031
- configString: n,
23032
- name: a,
23033
- additionals: i
23034
- }, o) {
23035
- try {
23036
- return await dt.httpDataSourceQuery(o)({
23037
- type: e,
23038
- key: t,
23039
- query: n,
23040
- ...i
23041
- }, {
23042
- params: {
23043
- name: a
23044
- }
23045
- });
23046
- } catch (l) {
23047
- if (ot.isCancel(l))
23048
- throw l;
23049
- return console.error(l), l;
23050
- }
23051
- }
23052
- async function g5({
23053
- key: e,
23054
- configString: t,
23055
- name: n,
23056
- additionals: a
23057
- }, i) {
23058
- try {
23059
- return await dt.mericoMetricQuery(i)({
23060
- type: "merico_metric_system",
23061
- key: e,
23062
- query: t,
23063
- ...a
23064
- }, {
23065
- params: {
23066
- name: n
23067
- }
23068
- });
23069
- } catch (o) {
23070
- throw o;
23071
- }
23072
- }
23073
- async function Mi() {
23074
- try {
23075
- return (await dt.post()("/datasource/list", {
23076
- filter: {},
23077
- sort: [{
23078
- field: "create_time",
23079
- order: "ASC"
23080
- }],
23081
- pagination: {
23082
- page: 1,
23083
- pagesize: 100
23084
- }
23085
- }, {})).data;
23086
- } catch (e) {
23087
- return console.error(e), [];
23088
- }
23089
- }
23090
- async function Ic() {
23091
- try {
23092
- return (await dt.post()("/sql_snippet/list", {
23093
- filter: {},
23094
- sort: [{
23095
- field: "id",
23096
- order: "ASC"
23097
- }],
23098
- pagination: {
23099
- page: 1,
23100
- pagesize: 1e3
23101
- }
23102
- }, {})).data;
23103
- } catch (e) {
23104
- return console.error(e), [];
23105
- }
23106
- }
23107
- const Mc = m.model("MockContextMeta", {
22988
+ const u5 = new d5(Sn), dt = u5, Ic = m.model("MockContextMeta", {
23108
22989
  current: m.optional(m.frozen(), {})
23109
22990
  }).views((e) => ({
23110
22991
  get keys() {
@@ -23133,12 +23014,12 @@ const Mc = m.model("MockContextMeta", {
23133
23014
  e.current[t] = n;
23134
23015
  }
23135
23016
  }));
23136
- function Lc(e) {
23017
+ function Mc(e) {
23137
23018
  return {
23138
23019
  current: e
23139
23020
  };
23140
23021
  }
23141
- const f5 = m.model("PanelStyleBorderMeta", {
23022
+ const h5 = m.model("PanelStyleBorderMeta", {
23142
23023
  enabled: m.boolean
23143
23024
  }).views((e) => ({
23144
23025
  get json() {
@@ -23153,8 +23034,8 @@ const f5 = m.model("PanelStyleBorderMeta", {
23153
23034
  setEnabled(t) {
23154
23035
  e.enabled = t;
23155
23036
  }
23156
- })), b5 = m.model("PanelStyleMeta", {
23157
- border: f5
23037
+ })), p5 = m.model("PanelStyleMeta", {
23038
+ border: h5
23158
23039
  }).views((e) => ({
23159
23040
  get json() {
23160
23041
  const {
@@ -23164,7 +23045,7 @@ const f5 = m.model("PanelStyleBorderMeta", {
23164
23045
  border: t.json
23165
23046
  };
23166
23047
  }
23167
- })).actions((e) => ({})), y5 = m.model("PanelTitleMeta", {
23048
+ })).actions((e) => ({})), m5 = m.model("PanelTitleMeta", {
23168
23049
  show: m.optional(m.boolean, !0)
23169
23050
  }).views((e) => ({
23170
23051
  get json() {
@@ -23179,7 +23060,7 @@ const f5 = m.model("PanelStyleBorderMeta", {
23179
23060
  setShow(t) {
23180
23061
  e.show = t;
23181
23062
  }
23182
- })), _5 = m.model("VariableMeta", {
23063
+ })), g5 = m.model("VariableMeta", {
23183
23064
  name: m.string,
23184
23065
  size: m.string,
23185
23066
  weight: m.string,
@@ -23246,7 +23127,7 @@ const f5 = m.model("PanelStyleBorderMeta", {
23246
23127
  aggregation: s
23247
23128
  });
23248
23129
  }
23249
- })), x5 = m.model("PanelVizMeta", {
23130
+ })), f5 = m.model("PanelVizMeta", {
23250
23131
  type: m.string,
23251
23132
  conf: m.frozen()
23252
23133
  }).views((e) => ({
@@ -23263,15 +23144,15 @@ const f5 = m.model("PanelStyleBorderMeta", {
23263
23144
  setConf(t) {
23264
23145
  Fe(e.conf, t) || (e.conf = t);
23265
23146
  }
23266
- })), v5 = m.model({
23147
+ })), b5 = m.model({
23267
23148
  id: m.string,
23268
23149
  name: m.optional(m.string, ""),
23269
- title: y5,
23150
+ title: m5,
23270
23151
  description: m.string,
23271
23152
  queryIDs: m.array(m.string),
23272
- viz: x5,
23273
- style: b5,
23274
- variables: m.optional(m.array(_5), [])
23153
+ viz: f5,
23154
+ style: p5,
23155
+ variables: m.optional(m.array(g5), [])
23275
23156
  }).views((e) => ({
23276
23157
  get json() {
23277
23158
  const {
@@ -23325,7 +23206,7 @@ const f5 = m.model("PanelStyleBorderMeta", {
23325
23206
  }
23326
23207
  }));
23327
23208
  var ie = /* @__PURE__ */ ((e) => (e.Postgresql = "postgresql", e.MySQL = "mysql", e.HTTP = "http", e.Transform = "transform", e.MericoMetricSystem = "merico_metric_system", e))(ie || {});
23328
- const Vc = m.model("DBQueryMeta", {
23209
+ const Lc = m.model("DBQueryMeta", {
23329
23210
  _type: m.enumeration([ie.MySQL, ie.Postgresql]),
23330
23211
  sql: m.string
23331
23212
  }).views((e) => ({
@@ -23349,10 +23230,10 @@ const Vc = m.model("DBQueryMeta", {
23349
23230
  setSQL(t) {
23350
23231
  e.sql = t;
23351
23232
  }
23352
- })), w5 = (e) => Vc.create({
23233
+ })), y5 = (e) => Lc.create({
23353
23234
  _type: e,
23354
23235
  sql: ""
23355
- }), Ac = m.model("HTTPQueryMeta", {
23236
+ }), Vc = m.model("HTTPQueryMeta", {
23356
23237
  _type: m.literal(ie.HTTP),
23357
23238
  react_to: m.optional(m.array(m.string), [])
23358
23239
  }).views((e) => ({
@@ -23373,10 +23254,10 @@ const Vc = m.model("DBQueryMeta", {
23373
23254
  setReactTo(t) {
23374
23255
  e.react_to.length = 0, e.react_to.push(...t);
23375
23256
  }
23376
- })), S5 = () => Ac.create({
23257
+ })), _5 = () => Vc.create({
23377
23258
  _type: ie.HTTP,
23378
23259
  react_to: []
23379
- }), $c = m.model("TransformQueryMeta", {
23260
+ }), Ac = m.model("TransformQueryMeta", {
23380
23261
  _type: m.literal(ie.Transform),
23381
23262
  dep_query_ids: m.optional(m.array(m.string), [])
23382
23263
  }).views((e) => ({
@@ -23397,7 +23278,7 @@ const Vc = m.model("DBQueryMeta", {
23397
23278
  setDependantQueryIDs(t) {
23398
23279
  e.dep_query_ids.length = 0, e.dep_query_ids.push(...t);
23399
23280
  }
23400
- })), C5 = () => $c.create({
23281
+ })), x5 = () => Ac.create({
23401
23282
  _type: ie.Transform,
23402
23283
  dep_query_ids: []
23403
23284
  }), Co = m.model("MetricFilterColMeta", {
@@ -23427,7 +23308,7 @@ const Vc = m.model("DBQueryMeta", {
23427
23308
  setVariable(t) {
23428
23309
  e.variable = t ?? "", e.allEmpty && this.removeSelf();
23429
23310
  }
23430
- })), Pc = m.model("MericoMetricQueryMeta", {
23311
+ })), $c = m.model("MericoMetricQueryMeta", {
23431
23312
  _type: m.literal(ie.MericoMetricSystem),
23432
23313
  id: m.optional(m.string, ""),
23433
23314
  type: m.optional(m.enumeration("MetricType", ["derived", "combined"]), "derived"),
@@ -23495,7 +23376,7 @@ const Vc = m.model("DBQueryMeta", {
23495
23376
  }));
23496
23377
  },
23497
23378
  removeFilter(t) {
23498
- Mp(t);
23379
+ Dp(t);
23499
23380
  },
23500
23381
  setGroupBys(t) {
23501
23382
  e.groupBys.length = 0, e.groupBys.push(...t);
@@ -23509,7 +23390,7 @@ const Vc = m.model("DBQueryMeta", {
23509
23390
  setTimeQueryEnabled(t) {
23510
23391
  e.timeQuery.enabled = t, t ? e.groupBys.length > 1 && (e.groupBys.length = 0) : (e.timeQuery.range_variable = "", e.timeQuery.unit_variable = "");
23511
23392
  }
23512
- })), k5 = () => Pc.create({
23393
+ })), v5 = () => $c.create({
23513
23394
  _type: ie.MericoMetricSystem,
23514
23395
  id: "",
23515
23396
  type: "derived",
@@ -23521,12 +23402,12 @@ const Vc = m.model("DBQueryMeta", {
23521
23402
  timezone: "PRC",
23522
23403
  stepKeyFormat: "YYYY-MM-DD"
23523
23404
  }
23524
- }), z5 = m.model("QueryMeta", {
23405
+ }), w5 = m.model("QueryMeta", {
23525
23406
  id: m.string,
23526
23407
  name: m.string,
23527
23408
  key: m.string,
23528
23409
  type: m.enumeration("DataSourceType", [ie.Postgresql, ie.MySQL, ie.HTTP, ie.Transform, ie.MericoMetricSystem]),
23529
- config: m.union(Vc, Ac, $c, Pc),
23410
+ config: m.union(Lc, Vc, Ac, $c),
23530
23411
  pre_process: m.optional(m.string, ""),
23531
23412
  post_process: m.optional(m.string, ""),
23532
23413
  run_by: m.optional(m.array(m.string), [])
@@ -23573,17 +23454,17 @@ const Vc = m.model("DBQueryMeta", {
23573
23454
  setType(t) {
23574
23455
  switch (e.type = t, t) {
23575
23456
  case ie.HTTP:
23576
- e.config = S5();
23457
+ e.config = _5();
23577
23458
  break;
23578
23459
  case ie.MySQL:
23579
23460
  case ie.Postgresql:
23580
- e.config = w5(t);
23461
+ e.config = y5(t);
23581
23462
  break;
23582
23463
  case ie.Transform:
23583
- e.config = C5();
23464
+ e.config = x5();
23584
23465
  break;
23585
23466
  case ie.MericoMetricSystem:
23586
- e.config = k5();
23467
+ e.config = v5();
23587
23468
  break;
23588
23469
  default:
23589
23470
  throw new Error(`Unexpected query type[${t}]`);
@@ -23598,7 +23479,7 @@ const Vc = m.model("DBQueryMeta", {
23598
23479
  setPostProcess(t) {
23599
23480
  e.post_process = t;
23600
23481
  }
23601
- })), T5 = m.model("LayoutItemMeta", {
23482
+ })), S5 = m.model("LayoutItemMeta", {
23602
23483
  id: m.identifier,
23603
23484
  panelID: m.string,
23604
23485
  x: m.number,
@@ -23677,11 +23558,11 @@ const Vc = m.model("DBQueryMeta", {
23677
23558
  setHeight(t) {
23678
23559
  e.h = t;
23679
23560
  }
23680
- })), D5 = m.model("LayoutSetMeta", {
23561
+ })), C5 = m.model("LayoutSetMeta", {
23681
23562
  id: m.identifier,
23682
23563
  name: m.string,
23683
23564
  breakpoint: m.number,
23684
- list: m.optional(m.array(T5), [])
23565
+ list: m.optional(m.array(S5), [])
23685
23566
  }).views((e) => ({
23686
23567
  get contentModel() {
23687
23568
  return Le(e).content;
@@ -23786,13 +23667,13 @@ const Vc = m.model("DBQueryMeta", {
23786
23667
  color: "red",
23787
23668
  autoClose: !1
23788
23669
  };
23789
- gn(i), kp(i);
23670
+ gn(i), Hh(i);
23790
23671
  }, {
23791
23672
  fireImmediately: !0,
23792
23673
  delay: 0
23793
23674
  }));
23794
23675
  }
23795
- })), I5 = m.model("SQLSnippetMeta", {
23676
+ })), k5 = m.model("SQLSnippetMeta", {
23796
23677
  key: m.string,
23797
23678
  value: m.string
23798
23679
  }).views((e) => ({
@@ -23815,7 +23696,7 @@ const Vc = m.model("DBQueryMeta", {
23815
23696
  }
23816
23697
  }));
23817
23698
  var H = /* @__PURE__ */ ((e) => (e.Select = "select", e.MultiSelect = "multi-select", e.TreeSelect = "tree-select", e.TreeSingleSelect = "tree-single-select", e.TextInput = "text-input", e.Checkbox = "checkbox", e.DateRange = "date-range", e))(H || {});
23818
- const Rc = m.model("FilterCheckboxConfigMeta", {
23699
+ const Pc = m.model("FilterCheckboxConfigMeta", {
23819
23700
  _name: m.literal("checkbox"),
23820
23701
  description: m.optional(m.string, ""),
23821
23702
  default_value: m.boolean
@@ -23845,11 +23726,11 @@ const Rc = m.model("FilterCheckboxConfigMeta", {
23845
23726
  setDescription(t) {
23846
23727
  e.description = t;
23847
23728
  }
23848
- })), M5 = () => Rc.create({
23729
+ })), z5 = () => Pc.create({
23849
23730
  _name: "checkbox",
23850
23731
  description: "",
23851
23732
  default_value: !1
23852
- }), Ec = () => [{
23733
+ }), Rc = () => [{
23853
23734
  key: "d",
23854
23735
  value: "yesterday",
23855
23736
  group: "last",
@@ -24059,19 +23940,19 @@ const Rc = m.model("FilterCheckboxConfigMeta", {
24059
23940
  };
24060
23941
  }
24061
23942
  }];
24062
- function Li(e) {
23943
+ function Mi(e) {
24063
23944
  if (!e)
24064
23945
  return null;
24065
- const n = Ec().find((a) => a.value === e);
23946
+ const n = Rc().find((a) => a.value === e);
24066
23947
  return n ? n.getRange() : null;
24067
23948
  }
24068
- function Oc() {
24069
- return C.groupBy(Ec(), "group");
23949
+ function Ec() {
23950
+ return C.groupBy(Rc(), "group");
24070
23951
  }
24071
- function L5(e) {
23952
+ function T5(e) {
24072
23953
  try {
24073
23954
  if (e.default_shortcut) {
24074
- const n = Li(e.default_shortcut);
23955
+ const n = Mi(e.default_shortcut);
24075
23956
  if (n)
24076
23957
  return {
24077
23958
  value: n.value.map((a) => E(a).toDate()),
@@ -24089,7 +23970,7 @@ function L5(e) {
24089
23970
  };
24090
23971
  }
24091
23972
  }
24092
- function qc(e, t) {
23973
+ function Oc(e, t) {
24093
23974
  return e.map((n) => {
24094
23975
  try {
24095
23976
  return n ? E.tz(n, "UTC").toISOString() : null;
@@ -24098,7 +23979,7 @@ function qc(e, t) {
24098
23979
  }
24099
23980
  });
24100
23981
  }
24101
- const V5 = m.model("FilterDateRangeConfigMeta", {
23982
+ const D5 = m.model("FilterDateRangeConfigMeta", {
24102
23983
  _name: m.literal("date-range"),
24103
23984
  required: m.boolean,
24104
23985
  inputFormat: m.enumeration("DateRangeInputFormat", ["YYYY", "YYYYMM", "YYYYMMDD", "YYYY-MM", "YYYY-MM-DD"]),
@@ -24126,7 +24007,7 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
24126
24007
  required: a,
24127
24008
  clearable: i,
24128
24009
  inputFormat: o,
24129
- default_value: qc(l),
24010
+ default_value: Oc(l),
24130
24011
  default_shortcut: s,
24131
24012
  allowSingleDateInRange: c
24132
24013
  };
@@ -24176,7 +24057,7 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
24176
24057
  setDefaultShortcut(t) {
24177
24058
  if (e.default_shortcut = t ?? "", !t)
24178
24059
  return;
24179
- const n = Li(e.default_shortcut);
24060
+ const n = Mi(e.default_shortcut);
24180
24061
  n && e.setFilterValue(n);
24181
24062
  },
24182
24063
  setMaxDays(t) {
@@ -24186,7 +24067,7 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
24186
24067
  setAllowSingleDateInRange(t) {
24187
24068
  e.allowSingleDateInRange = t;
24188
24069
  }
24189
- })), Fc = m.snapshotProcessor(V5, {
24070
+ })), qc = m.snapshotProcessor(D5, {
24190
24071
  preProcessor({
24191
24072
  default_value: e,
24192
24073
  ...t
@@ -24203,10 +24084,10 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
24203
24084
  } = e;
24204
24085
  return {
24205
24086
  ...n,
24206
- default_value: qc(t, n.inputFormat)
24087
+ default_value: Oc(t, n.inputFormat)
24207
24088
  };
24208
24089
  }
24209
- }), A5 = () => Fc.create({
24090
+ }), I5 = () => qc.create({
24210
24091
  _name: "date-range",
24211
24092
  required: !1,
24212
24093
  inputFormat: "YYYY-MM-DD",
@@ -24222,7 +24103,7 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
24222
24103
  setValue(t) {
24223
24104
  e.value = t;
24224
24105
  }
24225
- })), Vi = m.model("FilterConfigModel_BaseSelect", {
24106
+ })), Li = m.model("FilterConfigModel_BaseSelect", {
24226
24107
  static_options: m.optional(m.array(ko), []),
24227
24108
  options_query_id: m.optional(m.string, ""),
24228
24109
  default_selection_count: m.optional(m.number, 0),
@@ -24280,11 +24161,11 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
24280
24161
  setOptionsQueryID(t) {
24281
24162
  e.options_query_id = t ?? "";
24282
24163
  }
24283
- })), Bc = m.compose("FilterMultiSelectConfigMeta", m.model({
24164
+ })), Fc = m.compose("FilterMultiSelectConfigMeta", m.model({
24284
24165
  _name: m.literal("multi-select"),
24285
24166
  min_width: m.optional(m.string, ""),
24286
24167
  default_value: m.optional(m.array(m.string), [])
24287
- }), Vi).views((e) => ({
24168
+ }), Li).views((e) => ({
24288
24169
  get json() {
24289
24170
  const {
24290
24171
  _name: t,
@@ -24335,18 +24216,18 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
24335
24216
  delay: 0
24336
24217
  }));
24337
24218
  }
24338
- })), $5 = () => Bc.create({
24219
+ })), M5 = () => Fc.create({
24339
24220
  _name: "multi-select",
24340
24221
  default_value: [],
24341
24222
  static_options: [],
24342
24223
  options_query_id: "",
24343
24224
  default_selection_count: 0
24344
- }), Nc = m.compose("FilterConfigModel_Select", m.model({
24225
+ }), Bc = m.compose("FilterConfigModel_Select", m.model({
24345
24226
  _name: m.literal("select"),
24346
24227
  default_value: m.string,
24347
24228
  width: m.optional(m.string, ""),
24348
24229
  clearable: m.optional(m.boolean, !1)
24349
- }), Vi).views((e) => ({
24230
+ }), Li).views((e) => ({
24350
24231
  get json() {
24351
24232
  const {
24352
24233
  _name: t,
@@ -24400,14 +24281,14 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
24400
24281
  delay: 0
24401
24282
  }));
24402
24283
  }
24403
- })), P5 = () => Nc.create({
24284
+ })), L5 = () => Bc.create({
24404
24285
  _name: "select",
24405
24286
  required: !1,
24406
24287
  default_value: "",
24407
24288
  static_options: [],
24408
24289
  options_query_id: "",
24409
24290
  default_selection_count: 0
24410
- }), jc = m.model("FilterTextInputConfigMeta", {
24291
+ }), Nc = m.model("FilterTextInputConfigMeta", {
24411
24292
  _name: m.literal("text-input"),
24412
24293
  required: m.boolean,
24413
24294
  default_value: m.string
@@ -24434,11 +24315,11 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
24434
24315
  setDefaultValue(t) {
24435
24316
  e.default_value = t;
24436
24317
  }
24437
- })), Qc = () => jc.create({
24318
+ })), jc = () => Nc.create({
24438
24319
  _name: "text-input",
24439
24320
  required: !1,
24440
24321
  default_value: ""
24441
- }), R5 = `
24322
+ }), V5 = `
24442
24323
  // row
24443
24324
  {
24444
24325
  label: string;
@@ -24447,15 +24328,15 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
24447
24328
  description?: string;
24448
24329
  disabled?: boolean;
24449
24330
  }
24450
- `, Gc = () => {
24331
+ `, Qc = () => {
24451
24332
  const {
24452
24333
  t: e
24453
24334
  } = x(), [t, n] = G(!1);
24454
24335
  return /* @__PURE__ */ u(F, { children: [
24455
24336
  /* @__PURE__ */ r(L, { variant: "subtle", size: "compact-sm", onClick: () => n((a) => !a), children: e(t ? "common.actions.close" : "filter.widget.common.see_data_structure") }),
24456
- /* @__PURE__ */ r(Kn, { in: t, children: /* @__PURE__ */ r(vt, { language: "typescript", withCopyButton: !1, code: R5 }) })
24337
+ /* @__PURE__ */ r(Kn, { in: t, children: /* @__PURE__ */ r(vt, { language: "typescript", withCopyButton: !1, code: V5 }) })
24457
24338
  ] });
24458
- }, E5 = {
24339
+ }, A5 = {
24459
24340
  [H.Checkbox]: "true",
24460
24341
  [H.DateRange]: "[new Date('2023-01-01 00:00:00'), new Date('2024-01-01 00:00:00')]",
24461
24342
  [H.MultiSelect]: "[]",
@@ -24463,14 +24344,14 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
24463
24344
  [H.TreeSelect]: "[]",
24464
24345
  [H.TreeSingleSelect]: '""',
24465
24346
  [H.TextInput]: '""'
24466
- }, O5 = (e) => ["function getDefaultValue(filter, utils, context) {", ` return ${E5[e]};`, "}"].join(`
24347
+ }, $5 = (e) => ["function getDefaultValue(filter, utils, context) {", ` return ${A5[e]};`, "}"].join(`
24467
24348
  `), xn = D(({
24468
24349
  filter: e
24469
24350
  }) => {
24470
24351
  const {
24471
24352
  t
24472
24353
  } = x();
24473
- return /* @__PURE__ */ r(Ya, { label: "", title: t("filter.field.custom_default_value.title"), triggerLabel: t("filter.field.custom_default_value.trigger"), value: e.default_value_func, onChange: e.setDefaultValueFunc, defaultValue: O5(e.type), triggerButtonProps: {
24354
+ return /* @__PURE__ */ r(Ya, { label: "", title: t("filter.field.custom_default_value.title"), triggerLabel: t("filter.field.custom_default_value.trigger"), value: e.default_value_func, onChange: e.setDefaultValueFunc, defaultValue: $5(e.type), triggerButtonProps: {
24474
24355
  size: "xs",
24475
24356
  color: "grape",
24476
24357
  sx: {
@@ -24501,7 +24382,7 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
24501
24382
  display: "block"
24502
24383
  }
24503
24384
  } });
24504
- }), q5 = D(function({
24385
+ }), P5 = D(function({
24505
24386
  filter: t
24506
24387
  }) {
24507
24388
  const {
@@ -24517,19 +24398,19 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
24517
24398
  /* @__PURE__ */ r(te, { checked: a.treeCheckStrictly, onChange: (i) => a.setTreeCheckStrictly(i.currentTarget.checked), label: n("filter.widget.tree_select.strictly") }),
24518
24399
  /* @__PURE__ */ r(ne, { value: a.default_selection_count, onChange: a.setDefaultSelectionCount, label: n("filter.widget.common.default_selection_count") }),
24519
24400
  /* @__PURE__ */ r(Kr, { value: a.options_query_id, onChange: a.setOptionsQueryID }),
24520
- /* @__PURE__ */ r(Gc, {})
24401
+ /* @__PURE__ */ r(Qc, {})
24521
24402
  ] });
24522
- }), Ai = ({
24403
+ }), Vi = ({
24523
24404
  errorMessage: e
24524
24405
  }) => {
24525
24406
  const {
24526
24407
  t
24527
24408
  } = x();
24528
24409
  return e ? /* @__PURE__ */ r(k, { c: "red", size: "12px", children: e }) : /* @__PURE__ */ r(k, { c: "dimmed", size: "12px", children: t("filter.widget.common.selector_option_empty") });
24529
- }, F5 = ({
24410
+ }, R5 = ({
24530
24411
  rotate: e,
24531
24412
  onClick: t
24532
- }) => /* @__PURE__ */ r("svg", { onClick: t, className: "caret-icon", viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "caret-down", width: "14px", height: "14px", fill: "currentColor", "aria-hidden": "true", transform: `rotate(${e})`, children: /* @__PURE__ */ r("path", { d: "M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z" }) }), Hc = ({
24413
+ }) => /* @__PURE__ */ r("svg", { onClick: t, className: "caret-icon", viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "caret-down", width: "14px", height: "14px", fill: "currentColor", "aria-hidden": "true", transform: `rotate(${e})`, children: /* @__PURE__ */ r("path", { d: "M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z" }) }), Gc = ({
24533
24414
  expanded: e,
24534
24415
  isLeaf: t,
24535
24416
  value: n,
@@ -24538,17 +24419,17 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
24538
24419
  }) => t ? /* @__PURE__ */ r("span", { style: {
24539
24420
  width: "14px",
24540
24421
  display: "inline-block"
24541
- } }) : /* @__PURE__ */ r(F5, { rotate: e ? "0" : "-90", onClick: a, ...i }), B5 = ({
24422
+ } }) : /* @__PURE__ */ r(R5, { rotate: e ? "0" : "-90", onClick: a, ...i }), E5 = ({
24542
24423
  onClick: e
24543
24424
  }) => /* @__PURE__ */ u("svg", { onClick: e, className: "checkbox-icon", width: "16", height: "16", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: "2", fill: "none", strokeLinecap: "round", strokeLinejoin: "round", children: [
24544
24425
  /* @__PURE__ */ r("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
24545
24426
  /* @__PURE__ */ r("rect", { className: "border", x: "4", y: "4", width: "16", height: "16", rx: "2" }),
24546
24427
  /* @__PURE__ */ r("rect", { className: "checkmark-indeterminate", x: "8", y: "8", width: "8", height: "8", rx: "2", stroke: "none" }),
24547
24428
  /* @__PURE__ */ r("path", { className: "checkmark-checked", d: "M9 12l2 2l4 -4" })
24548
- ] }), Wc = ({
24429
+ ] }), Hc = ({
24549
24430
  onClick: e,
24550
24431
  ...t
24551
- }) => /* @__PURE__ */ r(B5, { onClick: e, ...t }), N5 = $n((e, {
24432
+ }) => /* @__PURE__ */ r(E5, { onClick: e, ...t }), O5 = $n((e, {
24552
24433
  radius: t = 4,
24553
24434
  width: n,
24554
24435
  name: a
@@ -24809,7 +24690,7 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
24809
24690
  }
24810
24691
  }
24811
24692
  }
24812
- })), j5 = ({
24693
+ })), q5 = ({
24813
24694
  disabled: e,
24814
24695
  // styling props
24815
24696
  radius: t,
@@ -24828,7 +24709,7 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
24828
24709
  } = x(), {
24829
24710
  classes: p,
24830
24711
  cx: g
24831
- } = N5({
24712
+ } = O5({
24832
24713
  radius: t,
24833
24714
  width: n.width,
24834
24715
  name: "FilterTreeSelectWidget"
@@ -24846,7 +24727,7 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
24846
24727
  }), children: /* @__PURE__ */ r(jt, { variant: "light", children: i.length }) })
24847
24728
  ] }),
24848
24729
  /* @__PURE__ */ r(
24849
- Wl,
24730
+ Hl,
24850
24731
  {
24851
24732
  disabled: e,
24852
24733
  allowClear: {
@@ -24862,12 +24743,12 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
24862
24743
  style: n,
24863
24744
  listHeight: 510,
24864
24745
  treeLine: !0,
24865
- switcherIcon: Hc,
24866
- treeIcon: Wc,
24746
+ switcherIcon: Gc,
24747
+ treeIcon: Hc,
24867
24748
  maxTagTextLength: 10,
24868
24749
  value: i,
24869
24750
  treeData: l,
24870
- notFoundContent: /* @__PURE__ */ r(Ai, { errorMessage: s }),
24751
+ notFoundContent: /* @__PURE__ */ r(Vi, { errorMessage: s }),
24871
24752
  treeNodeFilterProp: "filterBasis",
24872
24753
  treeCheckable: !0,
24873
24754
  showCheckedStrategy: Pp,
@@ -24880,7 +24761,7 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
24880
24761
  }
24881
24762
  )
24882
24763
  ] });
24883
- }, Q5 = D(({
24764
+ }, F5 = D(({
24884
24765
  label: e,
24885
24766
  config: t,
24886
24767
  value: n,
@@ -24894,13 +24775,13 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
24894
24775
  const y = g.map((b) => b.value);
24895
24776
  a(y, !1);
24896
24777
  }, c = z(() => t.initialSelection(n), [n, t.initialSelection, o]), d = t.min_width ? t.min_width : "200px", p = !!t.options_query_id ? o : !1;
24897
- return /* @__PURE__ */ r(j5, { disabled: p, style: {
24778
+ return /* @__PURE__ */ r(q5, { disabled: p, style: {
24898
24779
  minWidth: "160px",
24899
24780
  width: d,
24900
24781
  maxWidth: p ? d : "unset",
24901
24782
  borderColor: "#e9ecef"
24902
24783
  }, value: [...c], onChange: s, treeData: i, errorMessage: l, label: e, required: t.required, treeCheckStrictly: t.treeCheckStrictly });
24903
- }), G5 = D(({
24784
+ }), B5 = D(({
24904
24785
  filter: e
24905
24786
  }) => {
24906
24787
  const {
@@ -24915,9 +24796,9 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
24915
24796
  /* @__PURE__ */ r(P, { label: t("filter.widget.common.fetch_options_from_datasource"), labelPosition: "center" }),
24916
24797
  /* @__PURE__ */ r(te, { checked: n.default_selection_count === 1, onChange: (a) => n.setDefaultSelectionCount(a.currentTarget.checked ? 1 : 0), label: t("filter.widget.tree_single_select.select_first_option_by_default") }),
24917
24798
  /* @__PURE__ */ r(Kr, { value: n.options_query_id, onChange: n.setOptionsQueryID }),
24918
- /* @__PURE__ */ r(Gc, {})
24799
+ /* @__PURE__ */ r(Qc, {})
24919
24800
  ] });
24920
- }), H5 = $n((e, {
24801
+ }), N5 = $n((e, {
24921
24802
  radius: t = 4,
24922
24803
  width: n,
24923
24804
  name: a
@@ -25162,7 +25043,7 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
25162
25043
  }
25163
25044
  }
25164
25045
  }
25165
- })), W5 = ({
25046
+ })), j5 = ({
25166
25047
  disabled: e,
25167
25048
  // styling props
25168
25049
  radius: t,
@@ -25179,7 +25060,7 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
25179
25060
  const {
25180
25061
  classes: d,
25181
25062
  cx: h
25182
- } = H5({
25063
+ } = N5({
25183
25064
  radius: t,
25184
25065
  width: n.width,
25185
25066
  name: "FilterTreeSelectWidget"
@@ -25190,7 +25071,7 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
25190
25071
  c && /* @__PURE__ */ r("span", { className: d.required, "aria-hidden": "true", children: "*" })
25191
25072
  ] }) }),
25192
25073
  /* @__PURE__ */ r(
25193
- Wl,
25074
+ Hl,
25194
25075
  {
25195
25076
  disabled: e,
25196
25077
  allowClear: {
@@ -25205,11 +25086,11 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
25205
25086
  style: n,
25206
25087
  listHeight: 510,
25207
25088
  treeLine: !0,
25208
- switcherIcon: Hc,
25209
- treeIcon: Wc,
25089
+ switcherIcon: Gc,
25090
+ treeIcon: Hc,
25210
25091
  value: i,
25211
25092
  treeData: l,
25212
- notFoundContent: /* @__PURE__ */ r(Ai, { errorMessage: s }),
25093
+ notFoundContent: /* @__PURE__ */ r(Vi, { errorMessage: s }),
25213
25094
  treeNodeFilterProp: "filterBasis",
25214
25095
  treeCheckable: !1,
25215
25096
  onChange: o,
@@ -25218,7 +25099,7 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
25218
25099
  }
25219
25100
  )
25220
25101
  ] });
25221
- }, U5 = D(({
25102
+ }, Q5 = D(({
25222
25103
  label: e,
25223
25104
  config: t,
25224
25105
  value: n,
@@ -25231,13 +25112,13 @@ const V5 = m.model("FilterDateRangeConfigMeta", {
25231
25112
  } = t, s = (g) => {
25232
25113
  a(g ? g.value : null, !1);
25233
25114
  }, c = z(() => t.initialSelection(n), [n, t.initialSelection, t.treeDataLoading]), d = t.min_width ? t.min_width : "200px", p = !!t.options_query_id ? o : !1;
25234
- return /* @__PURE__ */ r(W5, { disabled: p, style: {
25115
+ return /* @__PURE__ */ r(j5, { disabled: p, style: {
25235
25116
  width: d,
25236
25117
  maxWidth: p ? d : "unset",
25237
25118
  borderColor: "#e9ecef"
25238
25119
  }, value: c, onChange: s, treeData: i, errorMessage: l, label: e, required: t.required });
25239
25120
  });
25240
- function K5(e) {
25121
+ function G5(e) {
25241
25122
  return Rp(e, {
25242
25123
  id: "value",
25243
25124
  parentId: "parent_value",
@@ -25245,7 +25126,7 @@ function K5(e) {
25245
25126
  dataField: null
25246
25127
  });
25247
25128
  }
25248
- function Y5(e) {
25129
+ function H5(e) {
25249
25130
  return e.map((t) => {
25250
25131
  const {
25251
25132
  label: n,
@@ -25268,9 +25149,9 @@ function Y5(e) {
25268
25149
  }, t.description)])), o;
25269
25150
  });
25270
25151
  }
25271
- const Uc = m.compose("FilterConfigModel_BaseTreeSelect", m.model({
25152
+ const Wc = m.compose("FilterConfigModel_BaseTreeSelect", m.model({
25272
25153
  min_width: m.optional(m.string, "")
25273
- }), Vi).views((e) => ({
25154
+ }), Li).views((e) => ({
25274
25155
  get plainData() {
25275
25156
  const {
25276
25157
  data: t
@@ -25278,8 +25159,8 @@ const Uc = m.compose("FilterConfigModel_BaseTreeSelect", m.model({
25278
25159
  return t;
25279
25160
  },
25280
25161
  get treeData() {
25281
- const t = this.plainData, n = Y5(t);
25282
- return K5(n);
25162
+ const t = this.plainData, n = H5(t);
25163
+ return G5(n);
25283
25164
  },
25284
25165
  get errorMessage() {
25285
25166
  const {
@@ -25297,11 +25178,11 @@ const Uc = m.compose("FilterConfigModel_BaseTreeSelect", m.model({
25297
25178
  setMinWidth(t) {
25298
25179
  e.min_width = t;
25299
25180
  }
25300
- })), Kc = m.compose("FilterTreeSelectConfigMeta", m.model({
25181
+ })), Uc = m.compose("FilterTreeSelectConfigMeta", m.model({
25301
25182
  _name: m.literal("tree-select"),
25302
25183
  default_value: m.optional(m.array(m.string), []),
25303
25184
  treeCheckStrictly: m.optional(m.boolean, !1)
25304
- }), Uc).views((e) => ({
25185
+ }), Wc).views((e) => ({
25305
25186
  get json() {
25306
25187
  const {
25307
25188
  _name: t,
@@ -25362,16 +25243,16 @@ const Uc = m.compose("FilterConfigModel_BaseTreeSelect", m.model({
25362
25243
  delay: 0
25363
25244
  }));
25364
25245
  }
25365
- })), X5 = () => Kc.create({
25246
+ })), W5 = () => Uc.create({
25366
25247
  _name: "tree-select",
25367
25248
  default_value: [],
25368
25249
  static_options: [],
25369
25250
  options_query_id: "",
25370
25251
  default_selection_count: 0
25371
- }), Yc = m.compose("FilterTreeSingleSelectConfigMeta", m.model({
25252
+ }), Kc = m.compose("FilterTreeSingleSelectConfigMeta", m.model({
25372
25253
  _name: m.literal("tree-single-select"),
25373
25254
  default_value: m.optional(m.string, "")
25374
- }), Uc).views((e) => ({
25255
+ }), Wc).views((e) => ({
25375
25256
  get json() {
25376
25257
  const {
25377
25258
  _name: t,
@@ -25428,13 +25309,13 @@ const Uc = m.compose("FilterConfigModel_BaseTreeSelect", m.model({
25428
25309
  delay: 0
25429
25310
  }));
25430
25311
  }
25431
- })), Z5 = () => Yc.create({
25312
+ })), U5 = () => Kc.create({
25432
25313
  _name: "tree-single-select",
25433
25314
  default_value: "",
25434
25315
  static_options: [],
25435
25316
  options_query_id: "",
25436
25317
  default_selection_count: 0
25437
- }), Xc = m.model("FilterMeta", {
25318
+ }), Yc = m.model("FilterMeta", {
25438
25319
  id: m.identifier,
25439
25320
  key: m.string,
25440
25321
  label: m.string,
@@ -25443,7 +25324,7 @@ const Uc = m.compose("FilterConfigModel_BaseTreeSelect", m.model({
25443
25324
  auto_submit: m.optional(m.boolean, !1),
25444
25325
  default_value_func: m.optional(m.string, ""),
25445
25326
  type: m.enumeration("DashboardFilterType", [H.Select, H.MultiSelect, H.TreeSelect, H.TreeSingleSelect, H.TextInput, H.Checkbox, H.DateRange]),
25446
- config: m.union(Nc, Bc, Kc, Yc, jc, Rc, Fc)
25327
+ config: m.union(Bc, Fc, Uc, Kc, Nc, Pc, qc)
25447
25328
  }).views((e) => ({
25448
25329
  get contentModel() {
25449
25330
  return Le(e).content;
@@ -25522,25 +25403,25 @@ const Uc = m.compose("FilterConfigModel_BaseTreeSelect", m.model({
25522
25403
  setType(t) {
25523
25404
  switch (t) {
25524
25405
  case H.Select:
25525
- e.config = P5();
25406
+ e.config = L5();
25526
25407
  break;
25527
25408
  case H.MultiSelect:
25528
- e.config = $5();
25409
+ e.config = M5();
25529
25410
  break;
25530
25411
  case H.TreeSelect:
25531
- e.config = X5();
25412
+ e.config = W5();
25532
25413
  break;
25533
25414
  case H.TreeSingleSelect:
25534
- e.config = Z5();
25415
+ e.config = U5();
25535
25416
  break;
25536
25417
  case H.TextInput:
25537
- e.config = Qc();
25418
+ e.config = jc();
25538
25419
  break;
25539
25420
  case H.Checkbox:
25540
- e.config = M5();
25421
+ e.config = z5();
25541
25422
  break;
25542
25423
  case H.DateRange:
25543
- e.config = A5();
25424
+ e.config = I5();
25544
25425
  break;
25545
25426
  default:
25546
25427
  return;
@@ -25558,7 +25439,7 @@ const Uc = m.compose("FilterConfigModel_BaseTreeSelect", m.model({
25558
25439
  }
25559
25440
  }));
25560
25441
  var U = /* @__PURE__ */ ((e) => (e.Division = "div", e.Modal = "modal", e.Tabs = "tabs", e))(U || {});
25561
- const Zc = m.model("ViewDivisionConfig", {
25442
+ const Xc = m.model("ViewDivisionConfig", {
25562
25443
  _name: m.literal(U.Division)
25563
25444
  }).views((e) => ({
25564
25445
  get json() {
@@ -25569,9 +25450,9 @@ const Zc = m.model("ViewDivisionConfig", {
25569
25450
  _name: t
25570
25451
  };
25571
25452
  }
25572
- })), J5 = () => Zc.create({
25453
+ })), K5 = () => Xc.create({
25573
25454
  _name: U.Division
25574
- }), e3 = m.model("CustomModalTitleModel", {
25455
+ }), Y5 = m.model("CustomModalTitleModel", {
25575
25456
  enabled: m.optional(m.boolean, !1),
25576
25457
  func_content: m.optional(m.string, "")
25577
25458
  }).views((e) => ({
@@ -25619,11 +25500,11 @@ const Zc = m.model("ViewDivisionConfig", {
25619
25500
  enabled: !1,
25620
25501
  func_content: ["function text({ filters, context}) {", " // your code goes here", ' return "text"', "}"].join(`
25621
25502
  `)
25622
- }, Jc = m.model("ViewModalConfig", {
25503
+ }, Zc = m.model("ViewModalConfig", {
25623
25504
  _name: m.literal(U.Modal),
25624
25505
  width: m.string,
25625
25506
  height: m.string,
25626
- custom_modal_title: m.optional(e3, ba)
25507
+ custom_modal_title: m.optional(Y5, ba)
25627
25508
  }).views((e) => ({
25628
25509
  get json() {
25629
25510
  const {
@@ -25646,11 +25527,11 @@ const Zc = m.model("ViewDivisionConfig", {
25646
25527
  setHeight(t) {
25647
25528
  e.height = t;
25648
25529
  }
25649
- })), t3 = () => Jc.create({
25530
+ })), X5 = () => Zc.create({
25650
25531
  _name: U.Modal,
25651
25532
  width: "90vw",
25652
25533
  height: "90vh"
25653
- }), n3 = m.model("ViewTabsTabModel", {
25534
+ }), Z5 = m.model("ViewTabsTabModel", {
25654
25535
  id: m.identifier,
25655
25536
  name: m.string,
25656
25537
  view_id: m.string,
@@ -25686,9 +25567,9 @@ const Zc = m.model("ViewDivisionConfig", {
25686
25567
  setOrder(t) {
25687
25568
  typeof t != "string" && (e.order = t);
25688
25569
  }
25689
- })), ed = m.model("ViewTabsConfig", {
25570
+ })), Jc = m.model("ViewTabsConfig", {
25690
25571
  _name: m.literal(U.Modal),
25691
- tabs: m.optional(m.array(n3), []),
25572
+ tabs: m.optional(m.array(Z5), []),
25692
25573
  variant: m.optional(m.enumeration("variant", ["default", "outline", "pills"]), "default"),
25693
25574
  orientation: m.optional(m.enumeration("orientation", ["horizontal", "vertical"]), "horizontal"),
25694
25575
  grow: m.optional(m.boolean, !1)
@@ -25736,14 +25617,14 @@ const Zc = m.model("ViewDivisionConfig", {
25736
25617
  removeTab(t) {
25737
25618
  e.tabs.splice(t, 1);
25738
25619
  }
25739
- })), r3 = () => ed.create({
25620
+ })), J5 = () => Jc.create({
25740
25621
  _name: U.Modal,
25741
25622
  tabs: []
25742
- }), a3 = m.model({
25623
+ }), e3 = m.model({
25743
25624
  id: m.identifier,
25744
25625
  name: m.string,
25745
25626
  type: m.enumeration("EViewComponentType", [U.Division, U.Modal, U.Tabs]),
25746
- config: m.union(Zc, Jc, ed),
25627
+ config: m.union(Xc, Zc, Jc),
25747
25628
  panelIDs: m.optional(m.array(m.string), [])
25748
25629
  }).views((e) => ({
25749
25630
  get json() {
@@ -25769,13 +25650,13 @@ const Zc = m.model("ViewDivisionConfig", {
25769
25650
  if (e.type !== t) {
25770
25651
  switch (t) {
25771
25652
  case U.Division:
25772
- e.config = J5();
25653
+ e.config = K5();
25773
25654
  break;
25774
25655
  case U.Modal:
25775
- e.config = t3();
25656
+ e.config = X5();
25776
25657
  break;
25777
25658
  case U.Tabs:
25778
- e.config = r3();
25659
+ e.config = J5();
25779
25660
  break;
25780
25661
  default:
25781
25662
  return;
@@ -25815,13 +25696,13 @@ const Zc = m.model("ViewDivisionConfig", {
25815
25696
  list: [],
25816
25697
  breakpoint: 0
25817
25698
  }]
25818
- }, td = m.model("DataSourceMetaModel", {
25699
+ }, ed = m.model("DataSourceMetaModel", {
25819
25700
  id: m.string,
25820
25701
  type: m.enumeration("DataSourceType", [ie.HTTP, ie.MySQL, ie.Postgresql, ie.MericoMetricSystem]),
25821
25702
  key: m.string,
25822
25703
  config: m.frozen()
25823
- }), i3 = m.model("DataSourcesMetaModel", {
25824
- list: m.optional(m.array(td), [])
25704
+ }), t3 = m.model("DataSourcesMetaModel", {
25705
+ list: m.optional(m.array(ed), [])
25825
25706
  }).views((e) => ({
25826
25707
  find({
25827
25708
  type: t,
@@ -25839,14 +25720,14 @@ const Zc = m.model("ViewDivisionConfig", {
25839
25720
  replace(t) {
25840
25721
  e.list.length = 0, e.list.push(...t);
25841
25722
  }
25842
- })), o3 = m.model({
25723
+ })), n3 = m.model({
25843
25724
  id: m.string,
25844
25725
  content: m.string,
25845
25726
  create_time: m.string,
25846
25727
  update_time: m.string,
25847
25728
  is_preset: m.boolean
25848
- }), nd = m.model("GlobalSQLSnippetsMeta", {
25849
- list: m.optional(m.array(o3), [])
25729
+ }), td = m.model("GlobalSQLSnippetsMeta", {
25730
+ list: m.optional(m.array(n3), [])
25850
25731
  }).views((e) => ({
25851
25732
  find(t) {
25852
25733
  return e.list.find((n) => n.id === t);
@@ -25861,7 +25742,7 @@ const Zc = m.model("ViewDivisionConfig", {
25861
25742
  replace(t) {
25862
25743
  e.list.length = 0, e.list.push(...t);
25863
25744
  }
25864
- })), $i = m.model("ContextMeta", {
25745
+ })), Ai = m.model("ContextMeta", {
25865
25746
  current: m.optional(m.frozen(), {})
25866
25747
  }).views((e) => ({
25867
25748
  get keys() {
@@ -25881,12 +25762,12 @@ const Zc = m.model("ViewDivisionConfig", {
25881
25762
  e.current[t] = n;
25882
25763
  }
25883
25764
  }));
25884
- function rd(e) {
25885
- return $i.create({
25765
+ function nd(e) {
25766
+ return Ai.create({
25886
25767
  current: e
25887
25768
  });
25888
25769
  }
25889
- const ad = m.compose("ViewRenderModel", a3, m.model({
25770
+ const rd = m.compose("ViewRenderModel", e3, m.model({
25890
25771
  tab: m.optional(m.string, "")
25891
25772
  // FIXME: manage this state in a better way
25892
25773
  })).views((e) => ({
@@ -25920,7 +25801,7 @@ const ad = m.compose("ViewRenderModel", a3, m.model({
25920
25801
  return e.type === U.Tabs && t.push(this.tabViewID), t;
25921
25802
  },
25922
25803
  async downloadScreenshot(t) {
25923
- const n = t.offsetWidth * 2 + 10, a = t.offsetHeight * 2 + 10, i = new Hl(), o = (/* @__PURE__ */ new Date()).getTime(), l = await Gl.toBlob(t, {
25804
+ const n = t.offsetWidth * 2 + 10, a = t.offsetHeight * 2 + 10, i = new Gl(), o = (/* @__PURE__ */ new Date()).getTime(), l = await Ql.toBlob(t, {
25924
25805
  bgcolor: "white",
25925
25806
  width: n,
25926
25807
  height: a,
@@ -25948,8 +25829,8 @@ const ad = m.compose("ViewRenderModel", a3, m.model({
25948
25829
  setTabByTabInfo(t) {
25949
25830
  e.tab = t.id ?? "";
25950
25831
  }
25951
- })), id = m.model("ViewsRenderModel", {
25952
- current: m.optional(m.array(ad), []),
25832
+ })), ad = m.model("ViewsRenderModel", {
25833
+ current: m.optional(m.array(rd), []),
25953
25834
  visibleViewIDs: m.array(m.string)
25954
25835
  }).views((e) => ({
25955
25836
  get json() {
@@ -26001,7 +25882,7 @@ const ad = m.compose("ViewRenderModel", a3, m.model({
26001
25882
  n == null || n.setTabByTabInfo(t);
26002
25883
  }
26003
25884
  }));
26004
- function l3(e, t) {
25885
+ function r3(e, t) {
26005
25886
  const n = e.length > 0 ? [e[0].id] : [], a = e.map((i) => {
26006
25887
  const {
26007
25888
  _name: o = i.type
@@ -26025,24 +25906,24 @@ function l3(e, t) {
26025
25906
  visibleViewIDs: n
26026
25907
  };
26027
25908
  }
26028
- const s3 = new $p({
25909
+ const a3 = new Vp({
26029
25910
  withBOM: !0
26030
25911
  });
26031
- async function od(e) {
26032
- return !Array.isArray(e) || e.length === 0 ? "" : await s3.parse(e).promise();
25912
+ async function id(e) {
25913
+ return !Array.isArray(e) || e.length === 0 ? "" : await a3.parse(e).promise();
26033
25914
  }
26034
- async function ld(e, t) {
26035
- const n = await od(t), a = new Blob([n], {
25915
+ async function od(e, t) {
25916
+ const n = await id(t), a = new Blob([n], {
26036
25917
  type: "text/csv"
26037
25918
  });
26038
25919
  Lr(a, `${e}.csv`);
26039
25920
  }
26040
25921
  function zo(e, t) {
26041
- const n = new Hl(), a = t.map(async ({
25922
+ const n = new Gl(), a = t.map(async ({
26042
25923
  id: i,
26043
25924
  data: o
26044
25925
  }) => {
26045
- const l = await od(o);
25926
+ const l = await id(o);
26046
25927
  n.file(`${i}.csv`, l);
26047
25928
  });
26048
25929
  Promise.all(a).then(() => {
@@ -26065,7 +25946,7 @@ function qn(e, t) {
26065
25946
  });
26066
25947
  Lr(n, `${e}.json`);
26067
25948
  }
26068
- const sd = v5.views((e) => ({
25949
+ const ld = b5.views((e) => ({
26069
25950
  get contentModel() {
26070
25951
  return Le(e).content;
26071
25952
  }
@@ -26165,7 +26046,7 @@ const sd = v5.views((e) => ({
26165
26046
  qn(l, o);
26166
26047
  }
26167
26048
  }));
26168
- function c3(e) {
26049
+ function i3(e) {
26169
26050
  return {
26170
26051
  id: e,
26171
26052
  name: "Panel",
@@ -26185,8 +26066,8 @@ function c3(e) {
26185
26066
  }
26186
26067
  };
26187
26068
  }
26188
- const cd = m.model("PanelsRenderModel", {
26189
- list: m.optional(m.array(sd), [])
26069
+ const sd = m.model("PanelsRenderModel", {
26070
+ list: m.optional(m.array(ld), [])
26190
26071
  }).views((e) => ({
26191
26072
  get json() {
26192
26073
  return e.list.map((t) => t.json);
@@ -26209,11 +26090,11 @@ const cd = m.model("PanelsRenderModel", {
26209
26090
  }), n;
26210
26091
  }
26211
26092
  }));
26212
- function dd(e) {
26093
+ function cd(e) {
26213
26094
  const t = e.config, n = t == null ? void 0 : t.default_value;
26214
- return n === void 0 ? n : t._name === "date-range" ? L5(t) : n;
26095
+ return n === void 0 ? n : t._name === "date-range" ? T5(t) : n;
26215
26096
  }
26216
- function d3(e, t) {
26097
+ function o3(e, t) {
26217
26098
  const n = e.default_value_func;
26218
26099
  try {
26219
26100
  const a = new Function(`return ${n}`)()(e, kt, t);
@@ -26222,17 +26103,17 @@ function d3(e, t) {
26222
26103
  shortcut: null
26223
26104
  } : a;
26224
26105
  } catch (a) {
26225
- return console.error(a), dd(e);
26106
+ return console.error(a), cd(e);
26226
26107
  }
26227
26108
  }
26228
- function ud(e, t) {
26109
+ function dd(e, t) {
26229
26110
  var n;
26230
- return (n = e.default_value_func) != null && n.trim() ? d3(e, t) : dd(e);
26111
+ return (n = e.default_value_func) != null && n.trim() ? o3(e, t) : cd(e);
26231
26112
  }
26232
- function hd(e, t) {
26233
- return e.reduce((n, a) => (n[a.key] = ud(a, t), n), {});
26113
+ function ud(e, t) {
26114
+ return e.reduce((n, a) => (n[a.key] = dd(a, t), n), {});
26234
26115
  }
26235
- function pd(e, t) {
26116
+ function hd(e, t) {
26236
26117
  const n = {};
26237
26118
  return Object.entries(t).forEach(([a, i]) => {
26238
26119
  const o = e[a];
@@ -26242,8 +26123,8 @@ function pd(e, t) {
26242
26123
  } : n[a] = o ?? i, n;
26243
26124
  }), n;
26244
26125
  }
26245
- const md = m.model("FiltersRenderModel", {
26246
- current: m.optional(m.array(Xc), []),
26126
+ const pd = m.model("FiltersRenderModel", {
26127
+ current: m.optional(m.array(Yc), []),
26247
26128
  values: m.optional(m.frozen(), {})
26248
26129
  }).views((e) => ({
26249
26130
  get json() {
@@ -26282,7 +26163,7 @@ const md = m.model("FiltersRenderModel", {
26282
26163
  });
26283
26164
  },
26284
26165
  get formattedDefaultValues() {
26285
- return hd(this.json, this.contentModel.context);
26166
+ return ud(this.json, this.contentModel.context);
26286
26167
  },
26287
26168
  get firstID() {
26288
26169
  if (e.current.length !== 0)
@@ -26327,7 +26208,7 @@ const md = m.model("FiltersRenderModel", {
26327
26208
  console.debug("⚪️ setting filter values: ", JSON.stringify(t)), e.values = t;
26328
26209
  },
26329
26210
  patchValues(t) {
26330
- console.debug("⚪️ patching filter values: ", JSON.stringify(t)), e.values = pd(t, e.values);
26211
+ console.debug("⚪️ patching filter values: ", JSON.stringify(t)), e.values = hd(t, e.values);
26331
26212
  },
26332
26213
  setValueByKey(t, n) {
26333
26214
  console.debug(`⚪️ setting filter[${t}] to value: `, JSON.stringify(n)), e.values = {
@@ -26358,17 +26239,135 @@ const md = m.model("FiltersRenderModel", {
26358
26239
  qn("Filters", n);
26359
26240
  }
26360
26241
  }));
26361
- function gd(e, t, n, a) {
26242
+ function md(e, t, n, a) {
26362
26243
  const i = {
26363
26244
  ...n,
26364
26245
  ...t
26365
- }, o = hd(e, i), l = pd(a, o);
26246
+ }, o = ud(e, i), l = hd(a, o);
26366
26247
  return {
26367
26248
  current: e,
26368
26249
  values: l
26369
26250
  };
26370
26251
  }
26371
- const u3 = z5.views((e) => ({
26252
+ function l3(e, t) {
26253
+ const n = $p(t);
26254
+ n !== e && (console.error("Inconsistent sql"), console.groupCollapsed("Inconsistent sql"), console.table({
26255
+ before: e,
26256
+ after: t,
26257
+ v: n
26258
+ }), console.groupEnd());
26259
+ }
26260
+ async function s3({
26261
+ query: e,
26262
+ name: t,
26263
+ payload: n,
26264
+ additionals: a
26265
+ }, i) {
26266
+ if (!e.sql)
26267
+ return [];
26268
+ const {
26269
+ type: o,
26270
+ key: l,
26271
+ sql: s,
26272
+ pre_process: c,
26273
+ post_process: d
26274
+ } = e, h = Ja(s, n), p = zg({
26275
+ sql: h,
26276
+ pre_process: c
26277
+ }), g = Ap(p);
26278
+ l3(p, g);
26279
+ let y = await dt.query(i)({
26280
+ type: o,
26281
+ key: l,
26282
+ query: g,
26283
+ ...a
26284
+ }, {
26285
+ params: {
26286
+ name: t
26287
+ }
26288
+ });
26289
+ return y = Tg(d, y, Za(n)), y;
26290
+ }
26291
+ async function c3({
26292
+ type: e,
26293
+ key: t,
26294
+ configString: n,
26295
+ name: a,
26296
+ additionals: i
26297
+ }, o) {
26298
+ try {
26299
+ return await dt.httpDataSourceQuery(o)({
26300
+ type: e,
26301
+ key: t,
26302
+ query: n,
26303
+ ...i
26304
+ }, {
26305
+ params: {
26306
+ name: a
26307
+ }
26308
+ });
26309
+ } catch (l) {
26310
+ if (ot.isCancel(l))
26311
+ throw l;
26312
+ return console.error(l), l;
26313
+ }
26314
+ }
26315
+ async function d3({
26316
+ key: e,
26317
+ configString: t,
26318
+ name: n,
26319
+ additionals: a
26320
+ }, i) {
26321
+ try {
26322
+ return await dt.mericoMetricQuery(i)({
26323
+ type: "merico_metric_system",
26324
+ key: e,
26325
+ query: t,
26326
+ ...a
26327
+ }, {
26328
+ params: {
26329
+ name: n
26330
+ }
26331
+ });
26332
+ } catch (o) {
26333
+ throw o;
26334
+ }
26335
+ }
26336
+ async function $i() {
26337
+ try {
26338
+ return (await dt.post()("/datasource/list", {
26339
+ filter: {},
26340
+ sort: [{
26341
+ field: "create_time",
26342
+ order: "ASC"
26343
+ }],
26344
+ pagination: {
26345
+ page: 1,
26346
+ pagesize: 100
26347
+ }
26348
+ }, {})).data;
26349
+ } catch (e) {
26350
+ return console.error(e), [];
26351
+ }
26352
+ }
26353
+ async function gd() {
26354
+ try {
26355
+ return (await dt.post()("/sql_snippet/list", {
26356
+ filter: {},
26357
+ sort: [{
26358
+ field: "id",
26359
+ order: "ASC"
26360
+ }],
26361
+ pagination: {
26362
+ page: 1,
26363
+ pagesize: 1e3
26364
+ }
26365
+ }, {})).data;
26366
+ } catch (e) {
26367
+ return console.error(e), [];
26368
+ }
26369
+ }
26370
+ const u3 = w5.views((e) => ({
26372
26371
  get rootModel() {
26373
26372
  return Le(e);
26374
26373
  },
@@ -26662,7 +26661,7 @@ const u3 = z5.views((e) => ({
26662
26661
  e.controller = new AbortController(), e.state = "loading";
26663
26662
  try {
26664
26663
  const n = e.payload, a = e.config;
26665
- e.data = yield* It(p5({
26664
+ e.data = yield* It(s3({
26666
26665
  payload: n,
26667
26666
  name: e.name,
26668
26667
  query: {
@@ -26697,7 +26696,7 @@ const u3 = z5.views((e) => ({
26697
26696
  } = e.json;
26698
26697
  let o = JSON.parse(e.httpConfigString);
26699
26698
  o = pr(e.datasource, o);
26700
- const l = yield* It(m5({
26699
+ const l = yield* It(c3({
26701
26700
  type: n,
26702
26701
  key: a,
26703
26702
  configString: JSON.stringify(o),
@@ -26732,7 +26731,7 @@ const u3 = z5.views((e) => ({
26732
26731
  data: e.metricQueryPayload
26733
26732
  };
26734
26733
  o = pr(e.datasource, o);
26735
- const l = yield* It(g5({
26734
+ const l = yield* It(d3({
26736
26735
  key: a,
26737
26736
  configString: JSON.stringify(o),
26738
26737
  name: e.name,
@@ -26904,7 +26903,7 @@ const u3 = z5.views((e) => ({
26904
26903
  const {
26905
26904
  data: i
26906
26905
  } = a, o = t ?? a.name;
26907
- ld(o, i);
26906
+ od(o, i);
26908
26907
  },
26909
26908
  refetchDataByQueryID(t) {
26910
26909
  const n = e.findByID(t);
@@ -26956,7 +26955,7 @@ function To({
26956
26955
  return `[${n}, ${a})`;
26957
26956
  }
26958
26957
  const yd = m.model("LayoutsRenderModel", {
26959
- list: m.array(D5),
26958
+ list: m.array(C5),
26960
26959
  currentBreakpoint: m.string
26961
26960
  }).views((e) => ({
26962
26961
  get json() {
@@ -27058,7 +27057,7 @@ const yd = m.model("LayoutsRenderModel", {
27058
27057
  delay: 0
27059
27058
  }));
27060
27059
  }
27061
- })), p3 = I5.views((e) => ({
27060
+ })), p3 = k5.views((e) => ({
27062
27061
  isADuplicatedKey(t) {
27063
27062
  return !t || t === e.key ? !1 : !!we(e, 2).findByKey(t);
27064
27063
  }
@@ -27117,7 +27116,7 @@ class g3 {
27117
27116
  constructor(t) {
27118
27117
  j(this, "origin");
27119
27118
  j(this, "copy");
27120
- this.origin = t, this.copy = Lp(t), Wn(this, {}, {
27119
+ this.origin = t, this.copy = Ip(t), Wn(this, {}, {
27121
27120
  autoBind: !0,
27122
27121
  deep: !1
27123
27122
  });
@@ -27189,7 +27188,7 @@ const f3 = (e) => new g3(e), b3 = ({
27189
27188
  if (l && !s && a > 0)
27190
27189
  return E(l).add(a - 1, "days").toDate();
27191
27190
  }, [l, s, a]);
27192
- return /* @__PURE__ */ r(tp, { defaultDate: c, numberOfColumns: 2, type: "range", value: o, onChange: (g) => {
27191
+ return /* @__PURE__ */ r(wh, { defaultDate: c, numberOfColumns: 2, type: "range", value: o, onChange: (g) => {
27193
27192
  const [y, b] = g;
27194
27193
  t({
27195
27194
  value: g,
@@ -27234,7 +27233,7 @@ const f3 = (e) => new g3(e), b3 = ({
27234
27233
  } = x(), a = (l) => () => {
27235
27234
  const s = l();
27236
27235
  e(s);
27237
- }, i = z(() => Oc(), []), o = n.language === "zh";
27236
+ }, i = z(() => Ec(), []), o = n.language === "zh";
27238
27237
  return /* @__PURE__ */ u(F, { children: [
27239
27238
  /* @__PURE__ */ r(P, { variant: "dashed", my: 10 }),
27240
27239
  /* @__PURE__ */ r(w, { withTableBorder: !1, sx: {
@@ -27293,7 +27292,7 @@ const f3 = (e) => new g3(e), b3 = ({
27293
27292
  }, children: [
27294
27293
  /* @__PURE__ */ r(ut.Target, { children: /* @__PURE__ */ r(A, { label: e, labelProps: {
27295
27294
  title: e
27296
- }, required: t, leftSection: /* @__PURE__ */ r(Lh, { size: 16 }), placeholder: c("filter.widget.date_range.start_date"), readOnly: !0, disabled: s, value: b, onFocus: h, styles: Do(d), sx: {
27295
+ }, required: t, leftSection: /* @__PURE__ */ r(Zu, { size: 16 }), placeholder: c("filter.widget.date_range.start_date"), readOnly: !0, disabled: s, value: b, onFocus: h, styles: Do(d), sx: {
27297
27296
  ".mantine-TextInput-label": {
27298
27297
  textOverflow: "ellipsis",
27299
27298
  overflow: "hidden",
@@ -27316,7 +27315,7 @@ const f3 = (e) => new g3(e), b3 = ({
27316
27315
  opacity: 0.6
27317
27316
  }
27318
27317
  } }) }),
27319
- /* @__PURE__ */ r(A, { label: /* @__PURE__ */ r(_, { justify: "flex-end", children: /* @__PURE__ */ r(x3, { begin: g, end: y }) }), leftSection: /* @__PURE__ */ r(Vh, { size: 16 }), placeholder: c("filter.widget.date_range.end_date"), readOnly: !0, disabled: !g || s, value: v, onFocus: h, styles: Do(d), sx: {
27318
+ /* @__PURE__ */ r(A, { label: /* @__PURE__ */ r(_, { justify: "flex-end", children: /* @__PURE__ */ r(x3, { begin: g, end: y }) }), leftSection: /* @__PURE__ */ r(Ju, { size: 16 }), placeholder: c("filter.widget.date_range.end_date"), readOnly: !0, disabled: !g || s, value: v, onFocus: h, styles: Do(d), sx: {
27320
27319
  ".mantine-Input-section": {
27321
27320
  transform: "translateX(-18px)"
27322
27321
  },
@@ -27345,7 +27344,7 @@ const f3 = (e) => new g3(e), b3 = ({
27345
27344
  value: [null, null],
27346
27345
  shortcut: null
27347
27346
  }, vd = (e) => {
27348
- const t = Li(e.shortcut);
27347
+ const t = Mi(e.shortcut);
27349
27348
  return t || (Array.isArray(e.value) ? e : xd);
27350
27349
  }, C3 = (e) => z(() => vd(e), [e]), wd = D(({
27351
27350
  label: e,
@@ -27603,7 +27602,7 @@ const f3 = (e) => new g3(e), b3 = ({
27603
27602
  count: i.length
27604
27603
  }), children: /* @__PURE__ */ r(jt, { variant: "light", children: i.length }) })
27605
27604
  ] }),
27606
- /* @__PURE__ */ r(Ep, { disabled: e, allowClear: !0, className: p(h.root, "check-select"), dropdownClassName: p(h.dropdown, ""), onDropdownVisibleChange: b, transitionName: "rc-select-dropdown-slide-up", choiceTransitionName: "rc-select-selection__choice-zoom", style: n, clearIcon: () => /* @__PURE__ */ r(xt, { size: "sm" }), value: i, onChange: o, onSelect: console.log, mode: "multiple", maxTagCount: 0, notFoundContent: /* @__PURE__ */ r(Ai, { errorMessage: s }), maxTagTextLength: 10, maxTagPlaceholder: (Z) => d("filter.widget.common.x_selected", {
27605
+ /* @__PURE__ */ r(Ep, { disabled: e, allowClear: !0, className: p(h.root, "check-select"), dropdownClassName: p(h.dropdown, ""), onDropdownVisibleChange: b, transitionName: "rc-select-dropdown-slide-up", choiceTransitionName: "rc-select-selection__choice-zoom", style: n, clearIcon: () => /* @__PURE__ */ r(xt, { size: "sm" }), value: i, onChange: o, onSelect: console.log, mode: "multiple", maxTagCount: 0, notFoundContent: /* @__PURE__ */ r(Vi, { errorMessage: s }), maxTagTextLength: 10, maxTagPlaceholder: (Z) => d("filter.widget.common.x_selected", {
27607
27606
  count: Z.length
27608
27607
  }), searchValue: I, onSearch: M, filterOption: !1, dropdownRender: (Z) => /* @__PURE__ */ u(F, { children: [
27609
27608
  q.size > 0 && !I && /* @__PURE__ */ r(_, { px: "xs", py: "xs", onClick: ue, styles: z3, children: /* @__PURE__ */ r(te, { size: "xs", checked: Q, onChange: C.noop, label: d("common.actions.select_all") }) }),
@@ -27717,9 +27716,9 @@ const V3 = D(({
27717
27716
  case H.MultiSelect:
27718
27717
  return /* @__PURE__ */ r(D3, { ...a, ...i, config: t });
27719
27718
  case H.TreeSelect:
27720
- return /* @__PURE__ */ r(Q5, { ...a, ...i, config: t });
27719
+ return /* @__PURE__ */ r(F5, { ...a, ...i, config: t });
27721
27720
  case H.TreeSingleSelect:
27722
- return /* @__PURE__ */ r(U5, { ...a, ...i, config: t });
27721
+ return /* @__PURE__ */ r(Q5, { ...a, ...i, config: t });
27723
27722
  case H.TextInput:
27724
27723
  return /* @__PURE__ */ r(L3, { ...a, ...i, config: t });
27725
27724
  case H.DateRange:
@@ -27821,7 +27820,7 @@ const F3 = ({
27821
27820
  const {
27822
27821
  t: n
27823
27822
  } = x();
27824
- return /* @__PURE__ */ r(_, { justify: "flex-end", ml: -4, mt: -4, mb: e ? 4 : 0, children: /* @__PURE__ */ r(L, { size: "compact-xs", variant: "subtle", color: e ? "gray" : "blue", leftSection: e ? /* @__PURE__ */ r(Ah, { size: 14 }) : /* @__PURE__ */ r($h, { size: 14 }), onClick: t, children: n(e ? "filter.hide_filters" : "filter.show_filters") }) });
27823
+ return /* @__PURE__ */ r(_, { justify: "flex-end", ml: -4, mt: -4, mb: e ? 4 : 0, children: /* @__PURE__ */ r(L, { size: "compact-xs", variant: "subtle", color: e ? "gray" : "blue", leftSection: e ? /* @__PURE__ */ r(eh, { size: 14 }) : /* @__PURE__ */ r(th, { size: 14 }), onClick: t, children: n(e ? "filter.hide_filters" : "filter.show_filters") }) });
27825
27824
  }, Cd = D(function({
27826
27825
  view: t
27827
27826
  }) {
@@ -27835,7 +27834,7 @@ const F3 = ({
27835
27834
  defaultValues: i.filters.values,
27836
27835
  // make sure the preview value is updated when filters are changed
27837
27836
  reValidateMode: "onBlur"
27838
- }), c = ap({
27837
+ }), c = kh({
27839
27838
  control: o
27840
27839
  });
27841
27840
  B(() => {
@@ -27848,7 +27847,7 @@ const F3 = ({
27848
27847
  I(M), (v.should_auto_submit || R) && i.filters.setValueByKey(v.key, M);
27849
27848
  }, b = ae((v) => {
27850
27849
  const I = C.get(v, "force", !1);
27851
- l(i.filters.setValues), I && i.queries.forceReloadVisibleQueries();
27850
+ l(i.filters.setValues)(), I && i.queries.forceReloadVisibleQueries();
27852
27851
  }, [l, i.filters.setValues]);
27853
27852
  return /* @__PURE__ */ u("form", { children: [
27854
27853
  /* @__PURE__ */ r(F3, { opened: n, toggle: a }),
@@ -28005,7 +28004,7 @@ function W3(e) {
28005
28004
  if (!a)
28006
28005
  return;
28007
28006
  const i = a.offsetWidth * 2, o = a.offsetHeight * 2;
28008
- Gl.toBlob(t.current, {
28007
+ Ql.toBlob(t.current, {
28009
28008
  bgcolor: "white",
28010
28009
  width: i,
28011
28010
  height: o,
@@ -28457,7 +28456,7 @@ const fz = $.forwardRef(({
28457
28456
  "&:hover": {
28458
28457
  color: "#228be6"
28459
28458
  }
28460
- }, variant: "transparent", children: /* @__PURE__ */ r(Ph, { size: 16 }) })), bz = $.forwardRef(({
28459
+ }, variant: "transparent", children: /* @__PURE__ */ r(nh, { size: 16 }) })), bz = $.forwardRef(({
28461
28460
  handleAxis: e,
28462
28461
  ...t
28463
28462
  }, n) => /* @__PURE__ */ r(ee, { ref: n, className: "react-grid-customResizeHandle", sx: {
@@ -28470,7 +28469,7 @@ const fz = $.forwardRef(({
28470
28469
  "&:hover": {
28471
28470
  color: "#228be6"
28472
28471
  }
28473
- }, variant: "transparent", ...t, children: /* @__PURE__ */ r(Rh, { size: 16 }) })), yz = Ul(Kl), _z = D(({
28472
+ }, variant: "transparent", ...t, children: /* @__PURE__ */ r(rh, { size: 16 }) })), yz = Ul(Kl), _z = D(({
28474
28473
  view: e,
28475
28474
  className: t = "layout"
28476
28475
  }) => {
@@ -28524,7 +28523,7 @@ const wz = D(({
28524
28523
  qn(d, c);
28525
28524
  };
28526
28525
  return /* @__PURE__ */ u(W, { shadow: "md", width: 200, trigger: "hover", openDelay: 200, closeDelay: 400, withinPortal: !0, position: "bottom-end", children: [
28527
- /* @__PURE__ */ r(W.Target, { children: /* @__PURE__ */ r(lh, { position: {
28526
+ /* @__PURE__ */ r(W.Target, { children: /* @__PURE__ */ r(Du, { position: {
28528
28527
  bottom: "20px",
28529
28528
  right: "10px"
28530
28529
  }, zIndex: 1, children: /* @__PURE__ */ r(ee, { size: "md", variant: "gradient", gradient: {
@@ -28535,7 +28534,7 @@ const wz = D(({
28535
28534
  transform: `translateX(${n ? 0 : "2px"})`,
28536
28535
  transition: "all ease 300ms",
28537
28536
  borderRadius: "50%"
28538
- }, children: /* @__PURE__ */ r(Eh, { size: "1rem" }) }) }) }),
28537
+ }, children: /* @__PURE__ */ r(ah, { size: "1rem" }) }) }) }),
28539
28538
  /* @__PURE__ */ u(W.Dropdown, { children: [
28540
28539
  /* @__PURE__ */ r(W.Item, { leftSection: /* @__PURE__ */ r(Dr, { size: 14 }), onClick: e, children: t("common.actions.download_screenshot") }),
28541
28540
  /* @__PURE__ */ r(W.Divider, {}),
@@ -28646,7 +28645,7 @@ const wz = D(({
28646
28645
  children: e,
28647
28646
  view: t
28648
28647
  }) => {
28649
- const a = ce().layouts, [i, o] = fh();
28648
+ const a = ce().layouts, [i, o] = Eu();
28650
28649
  return B(() => {
28651
28650
  a.setCurrentLayoutWrapperWidth(o.width);
28652
28651
  }, [o.width]), /* @__PURE__ */ r(V, { sx: {
@@ -28810,7 +28809,7 @@ const Dz = D(({
28810
28809
  /* @__PURE__ */ r(O, { label: t("view.label"), value: d.view_id, onChange: d.setViewID, data: i }),
28811
28810
  /* @__PURE__ */ r(ne, { label: t("view.component.tabs.tab.order"), required: !0, value: d.order, onChange: (g) => d.setOrder(g || 0), min: 0, max: 1e3, step: 1 }),
28812
28811
  /* @__PURE__ */ r(Jt, { label: t("view.component.tabs.tab.color"), value: d.color, onChange: d.setColor, disabled: o.variant !== "default" }),
28813
- p && /* @__PURE__ */ r(L, { mt: 20, variant: "gradient", leftSection: /* @__PURE__ */ r(Oh, { size: 18 }), gradient: {
28812
+ p && /* @__PURE__ */ r(L, { mt: 20, variant: "gradient", leftSection: /* @__PURE__ */ r(ih, { size: 18 }), gradient: {
28814
28813
  from: "cyan",
28815
28814
  to: "indigo"
28816
28815
  }, onClick: () => a.views.setIDOfVIE(p.id), children: t("view.component.tabs.tab.switch_to_view", {
@@ -28899,13 +28898,13 @@ const f9 = {
28899
28898
  [U.Tabs]: "#ffad18"
28900
28899
  };
28901
28900
  function Rz(e, t, n) {
28902
- Ue(e, Vp(e, (a, i) => {
28901
+ Ue(e, Mp(e, (a, i) => {
28903
28902
  i(a, () => {
28904
- Ap(a.context) === t && a.type === "action" && n(a.name, a.context);
28903
+ Lp(a.context) === t && a.type === "action" && n(a.name, a.context);
28905
28904
  });
28906
28905
  }));
28907
28906
  }
28908
- const Ez = m.compose("FiltersModel", md, m.model("FiltersModel", {
28907
+ const Ez = m.compose("FiltersModel", pd, m.model("FiltersModel", {
28909
28908
  // values to be displayed in preview content, e.g. Data Settings
28910
28909
  previewValues: m.optional(m.frozen(), {})
28911
28910
  })).views((e) => ({
@@ -28963,9 +28962,9 @@ const Ez = m.compose("FiltersModel", md, m.model("FiltersModel", {
28963
28962
  }
28964
28963
  })).actions((e) => {
28965
28964
  function t() {
28966
- Rz(e.current, Xc, (n, a) => {
28965
+ Rz(e.current, Yc, (n, a) => {
28967
28966
  if (n === "setType") {
28968
- const i = ud(a.config.default_value, a.config);
28967
+ const i = dd(a.config.default_value, a.config);
28969
28968
  e.setValueByKey(a.key, i), e.updatePreviewValues({
28970
28969
  ...e.previewValues,
28971
28970
  [a.key]: i
@@ -29652,7 +29651,7 @@ const Yz = m.model({
29652
29651
  selectMetric(t) {
29653
29652
  e.metricID = t;
29654
29653
  }
29655
- })), Jz = m.compose("DataSourceModel", td, m.model({
29654
+ })), Jz = m.compose("DataSourceModel", ed, m.model({
29656
29655
  dbInfo: m.optional(Gz, {}),
29657
29656
  mericoMetricInfo: m.optional(Zz, {})
29658
29657
  })), eT = m.model("DataSourcesModel", {
@@ -30019,7 +30018,7 @@ const uT = m.model("EditorModel", {
30019
30018
  this.removeByID(n);
30020
30019
  });
30021
30020
  }
30022
- })), pT = sd.views((e) => ({
30021
+ })), pT = ld.views((e) => ({
30023
30022
  get realDataFieldOptions() {
30024
30023
  return e.queryIDs.length === 0 ? [] : e.queries.map((t) => {
30025
30024
  const n = t.data;
@@ -30132,7 +30131,7 @@ const uT = m.model("EditorModel", {
30132
30131
  moveToView(t, n) {
30133
30132
  Le(e).content.views.findByID(t).removePanelID(e.id), Le(e).content.views.findByID(n).appendPanelID(e.id), Le(e).editor.setPath(["_VIEWS_", n, "_PANELS_", e.id]);
30134
30133
  }
30135
- })), mT = m.compose("PanelsModel", cd, m.model({
30134
+ })), mT = m.compose("PanelsModel", sd, m.model({
30136
30135
  list: m.optional(m.array(pT), [])
30137
30136
  })).views((e) => ({
30138
30137
  get contentModel() {
@@ -30160,7 +30159,7 @@ const uT = m.model("EditorModel", {
30160
30159
  }
30161
30160
  })).actions((e) => ({
30162
30161
  replace(t) {
30163
- e.list = Ql(t);
30162
+ e.list = jl(t);
30164
30163
  },
30165
30164
  append(t) {
30166
30165
  e.list.push(t);
@@ -30198,7 +30197,7 @@ const uT = m.model("EditorModel", {
30198
30197
  replaceByIndex(t, n) {
30199
30198
  e.list.splice(t, 1, n);
30200
30199
  }
30201
- })), gT = ad.actions((e) => ({
30200
+ })), gT = rd.actions((e) => ({
30202
30201
  getSchema() {
30203
30202
  const t = e.json, n = [], a = [];
30204
30203
  e.panels.forEach((l) => {
@@ -30224,7 +30223,7 @@ const uT = m.model("EditorModel", {
30224
30223
  const t = JSON.stringify(this.getSchema(), null, 2), n = e.name;
30225
30224
  qn(n, t);
30226
30225
  }
30227
- })), fT = m.compose("ViewsModel", id, m.model({
30226
+ })), fT = m.compose("ViewsModel", ad, m.model({
30228
30227
  current: m.optional(m.array(gT), []),
30229
30228
  idOfVIE: m.string
30230
30229
  // VIE: view in edit
@@ -30338,7 +30337,7 @@ const bT = m.model({
30338
30337
  views: fT,
30339
30338
  panels: mT,
30340
30339
  layouts: hT,
30341
- mock_context: Mc,
30340
+ mock_context: Ic,
30342
30341
  /**
30343
30342
  * this field should be excluded from snapshot
30344
30343
  */
@@ -30563,7 +30562,7 @@ const bT = m.model({
30563
30562
  addANewPanel(t) {
30564
30563
  var a;
30565
30564
  const n = Lt();
30566
- e.panels.append(c3(n)), (a = e.views.findByID(t)) == null || a.appendPanelID(n), e.layouts.addALayoutItem(n);
30565
+ e.panels.append(i3(n)), (a = e.views.findByID(t)) == null || a.appendPanelID(n), e.layouts.addALayoutItem(n);
30567
30566
  },
30568
30567
  applyJSONSchema(t) {
30569
30568
  var p;
@@ -30667,7 +30666,7 @@ const bT = m.model({
30667
30666
  },
30668
30667
  postProcessor(e) {
30669
30668
  delete e.origin;
30670
- const t = Ql(e.queries.current.map((n) => rl(n, ["id", "key", "type", "sql"])));
30669
+ const t = jl(e.queries.current.map((n) => rl(n, ["id", "key", "type", "sql"])));
30671
30670
  return he({}, {
30672
30671
  queries: {
30673
30672
  current: t
@@ -30707,14 +30706,14 @@ function yT({
30707
30706
  create_time: a,
30708
30707
  update_time: i,
30709
30708
  version: c,
30710
- filters: gd(d, l, v, s),
30709
+ filters: md(d, l, v, s),
30711
30710
  queries: {
30712
30711
  current: y
30713
30712
  },
30714
30713
  sqlSnippets: {
30715
30714
  current: b
30716
30715
  },
30717
- mock_context: Lc(v),
30716
+ mock_context: Mc(v),
30718
30717
  views: Ed(h),
30719
30718
  panels: {
30720
30719
  list: p
@@ -30732,8 +30731,8 @@ const _T = m.model({
30732
30731
  content: Od,
30733
30732
  content_id: m.string,
30734
30733
  datasources: eT,
30735
- globalSQLSnippets: nd,
30736
- context: $i,
30734
+ globalSQLSnippets: td,
30735
+ context: Ai,
30737
30736
  editor: uT
30738
30737
  }).views((e) => ({
30739
30738
  get json() {
@@ -30788,7 +30787,7 @@ function xT({
30788
30787
  globalSQLSnippets: {
30789
30788
  list: l
30790
30789
  },
30791
- context: rd(s),
30790
+ context: nd(s),
30792
30791
  editor: {}
30793
30792
  });
30794
30793
  }
@@ -30920,7 +30919,7 @@ const vT = D(({
30920
30919
  fill: "rgb(173, 181, 189)",
30921
30920
  stroke: "none"
30922
30921
  }
30923
- }, children: /* @__PURE__ */ r(qh, { size: 18 }) }) }),
30922
+ }, children: /* @__PURE__ */ r(oh, { size: 18 }) }) }),
30924
30923
  /* @__PURE__ */ r(W.Dropdown, { children: /* @__PURE__ */ r(W.Item, { leftSection: /* @__PURE__ */ r(mt, { size: 14, color: "red" }), disabled: !o, onClick: i, children: t("common.actions.revert_changes") }) })
30925
30924
  ] })
30926
30925
  ] });
@@ -31090,7 +31089,7 @@ const vT = D(({
31090
31089
  return /* @__PURE__ */ u(F, { children: [
31091
31090
  /* @__PURE__ */ u(_, { children: [
31092
31091
  /* @__PURE__ */ u(W, { withArrow: !0, withinPortal: !0, zIndex: 320, trigger: "hover", children: [
31093
- /* @__PURE__ */ r(W.Target, { children: /* @__PURE__ */ r(L, { size: "xs", variant: "subtle", leftSection: /* @__PURE__ */ r(Fh, { size: 16 }), sx: {
31092
+ /* @__PURE__ */ r(W.Target, { children: /* @__PURE__ */ r(L, { size: "xs", variant: "subtle", leftSection: /* @__PURE__ */ r(lh, { size: 16 }), sx: {
31094
31093
  borderRadius: 0
31095
31094
  }, children: /* @__PURE__ */ u(_, { gap: 6, children: [
31096
31095
  /* @__PURE__ */ r(k, { size: "xs", fw: "normal", children: l.name }),
@@ -31344,7 +31343,7 @@ const PT = D(({
31344
31343
  }, [b, I]), /* @__PURE__ */ r(V, { mx: "auto", sx: {
31345
31344
  position: "relative"
31346
31345
  }, children: /* @__PURE__ */ u("form", { onSubmit: o(p), children: [
31347
- /* @__PURE__ */ r(sh, { label: a("import.json_file"), required: !0, value: g, onChange: y, error: (R = l == null ? void 0 : l.content) == null ? void 0 : R.message, sx: {
31346
+ /* @__PURE__ */ r(Iu, { label: a("import.json_file"), required: !0, value: g, onChange: y, error: (R = l == null ? void 0 : l.content) == null ? void 0 : R.message, sx: {
31348
31347
  maxWidth: 500
31349
31348
  } }),
31350
31349
  I ? /* @__PURE__ */ r(w, { fz: 12, mt: 10, children: /* @__PURE__ */ u(w.Tbody, { children: [
@@ -31436,7 +31435,7 @@ const PT = D(({
31436
31435
  /* @__PURE__ */ u("div", { style: {
31437
31436
  flex: 1
31438
31437
  }, children: [
31439
- /* @__PURE__ */ r(ch, { highlight: t, size: "sm", children: e.title ? n(e.title) : "" }),
31438
+ /* @__PURE__ */ r(Mu, { highlight: t, size: "sm", children: e.title ? n(e.title) : "" }),
31440
31439
  /* @__PURE__ */ r(OT, { action: e })
31441
31440
  ] })
31442
31441
  ] }) });
@@ -31825,8 +31824,8 @@ function c6(e) {
31825
31824
  return s6(s);
31826
31825
  }
31827
31826
  const ra = {
31828
- "builtin:op:open-link": /* @__PURE__ */ r(ar, { color: "blue", size: 20, radius: "xl", children: /* @__PURE__ */ r(Bh, { size: 14 }) }),
31829
- "builtin:op:set_filter_values": /* @__PURE__ */ r(ar, { color: "orange", size: 20, radius: "xl", children: /* @__PURE__ */ r(Nh, { size: 14 }) }),
31827
+ "builtin:op:open-link": /* @__PURE__ */ r(ar, { color: "blue", size: 20, radius: "xl", children: /* @__PURE__ */ r(sh, { size: 14 }) }),
31828
+ "builtin:op:set_filter_values": /* @__PURE__ */ r(ar, { color: "orange", size: 20, radius: "xl", children: /* @__PURE__ */ r(ch, { size: 14 }) }),
31830
31829
  "builtin:op:clear_filter_values": /* @__PURE__ */ r(ar, { color: "orange", size: 20, radius: "xl", children: /* @__PURE__ */ r(gl, { size: 14 }) })
31831
31830
  };
31832
31831
  function d6(e) {
@@ -31876,7 +31875,7 @@ function d6(e) {
31876
31875
  }
31877
31876
  }), t;
31878
31877
  }
31879
- const u6 = Ju(({
31878
+ const u6 = xu(({
31880
31879
  data: e,
31881
31880
  isConnectable: t,
31882
31881
  sourcePosition: n = _t.Right,
@@ -31890,7 +31889,7 @@ const u6 = Ju(({
31890
31889
  position: "absolute",
31891
31890
  top: 0,
31892
31891
  right: 0
31893
- }, children: /* @__PURE__ */ r(jh, { size: 12 }) }),
31892
+ }, children: /* @__PURE__ */ r(dh, { size: 12 }) }),
31894
31893
  /* @__PURE__ */ u(_e, { shadow: "xl", withinPortal: !0, children: [
31895
31894
  /* @__PURE__ */ r(_e.Target, { children: /* @__PURE__ */ r(k, { size: "sm", children: e.label }) }),
31896
31895
  /* @__PURE__ */ r(_e.Dropdown, { children: /* @__PURE__ */ r(We, { spacing: "xs", size: "sm", center: !0, children: o.map((l) => /* @__PURE__ */ r(We.Item, { icon: l.icon, children: l.text }, l.key)) }) })
@@ -31993,7 +31992,7 @@ function f6({
31993
31992
  right: 0,
31994
31993
  zIndex: 0,
31995
31994
  borderRadius: 0
31996
- }, children: /* @__PURE__ */ r(Qh, { size: 16 }) }) })
31995
+ }, children: /* @__PURE__ */ r(uh, { size: 16 }) }) })
31997
31996
  ] });
31998
31997
  }
31999
31998
  const b6 = D(() => {
@@ -32106,7 +32105,7 @@ const b6 = D(() => {
32106
32105
  const {
32107
32106
  t: n
32108
32107
  } = x(), a = t.config, i = z(() => {
32109
- const l = Oc();
32108
+ const l = Ec();
32110
32109
  return Object.entries(l).map(([s, c]) => ({
32111
32110
  group: n(`filter.widget.date_range.shortcut.${s}.label`),
32112
32111
  items: c.map(({
@@ -32391,8 +32390,8 @@ const b6 = D(() => {
32391
32390
  }), D6 = {
32392
32391
  [H.Select]: k6,
32393
32392
  [H.MultiSelect]: S6,
32394
- [H.TreeSelect]: q5,
32395
- [H.TreeSingleSelect]: G5,
32393
+ [H.TreeSelect]: P5,
32394
+ [H.TreeSingleSelect]: B5,
32396
32395
  [H.TextInput]: z6,
32397
32396
  [H.Checkbox]: _6,
32398
32397
  [H.DateRange]: v6
@@ -32933,9 +32932,9 @@ const F6 = [{
32933
32932
  n.editor.setPath(["_QUERIES_", d]);
32934
32933
  }, c = i.queryIDs.length;
32935
32934
  return /* @__PURE__ */ u(F, { children: [
32936
- /* @__PURE__ */ r(dh, { opened: o, onClose: () => l(!1), title: t("panel.settings.choose_queries"), padding: "xl", size: 500, zIndex: 320, children: /* @__PURE__ */ r(te.Group, { value: [...i.queryIDs], onChange: i.setQueryIDs, children: /* @__PURE__ */ r(T, { gap: "lg", children: a.queries.options.map((d) => /* @__PURE__ */ r(te, { label: d.label, value: d.value }, d.value)) }) }) }),
32935
+ /* @__PURE__ */ r(Lu, { opened: o, onClose: () => l(!1), title: t("panel.settings.choose_queries"), padding: "xl", size: 500, zIndex: 320, children: /* @__PURE__ */ r(te.Group, { value: [...i.queryIDs], onChange: i.setQueryIDs, children: /* @__PURE__ */ r(T, { gap: "lg", children: a.queries.options.map((d) => /* @__PURE__ */ r(te, { label: d.label, value: d.value }, d.value)) }) }) }),
32937
32936
  /* @__PURE__ */ u(T, { gap: 6, children: [
32938
- /* @__PURE__ */ r(_, { justify: "flex-start", children: /* @__PURE__ */ r(L, { variant: "light", size: "sm", leftSection: /* @__PURE__ */ r(Gh, { size: 16 }), onClick: () => l(!0), children: t(c === 0 ? "panel.settings.need_to_choose_queries" : "panel.settings.choose_queries") }) }),
32937
+ /* @__PURE__ */ r(_, { justify: "flex-start", children: /* @__PURE__ */ r(L, { variant: "light", size: "sm", leftSection: /* @__PURE__ */ r(hh, { size: 16 }), onClick: () => l(!0), children: t(c === 0 ? "panel.settings.need_to_choose_queries" : "panel.settings.choose_queries") }) }),
32939
32938
  c === 1 && /* @__PURE__ */ r(xa, { id: i.queryIDs[0], moreActions: /* @__PURE__ */ r(re, { label: t("query.open"), children: /* @__PURE__ */ r(ee, { variant: "subtle", color: "blue", onClick: () => s(i.queryIDs[0]), children: /* @__PURE__ */ r(sa, { size: 16 }) }) }) }),
32940
32939
  c > 1 && /* @__PURE__ */ u(S, { defaultValue: i.queryIDs[0], children: [
32941
32940
  /* @__PURE__ */ r(S.List, { children: i.queries.map((d) => /* @__PURE__ */ r(S.Tab, { value: d.id, children: d.name }, d.id)) }),
@@ -33760,7 +33759,7 @@ const c4 = D(({
33760
33759
  function x4({
33761
33760
  table_type: e
33762
33761
  }) {
33763
- return e === "VIEW" ? /* @__PURE__ */ r(Sl, { size: 14 }) : e === "BASE TABLE" ? /* @__PURE__ */ r(Hh, { size: 14 }) : null;
33762
+ return e === "VIEW" ? /* @__PURE__ */ r(Sl, { size: 14 }) : e === "BASE TABLE" ? /* @__PURE__ */ r(ph, { size: 14 }) : null;
33764
33763
  }
33765
33764
  const v4 = D(({
33766
33765
  dataSource: e
@@ -33876,7 +33875,7 @@ const v4 = D(({
33876
33875
  }, children: /* @__PURE__ */ r(ze, { children: /* @__PURE__ */ r(v4, { dataSource: e }) }) }),
33877
33876
  /* @__PURE__ */ u(S, { defaultValue: "structure", styles: T4, children: [
33878
33877
  /* @__PURE__ */ u(S.List, { children: [
33879
- /* @__PURE__ */ r(S.Tab, { value: "structure", leftSection: /* @__PURE__ */ r(Wh, { size: 14 }), children: t("data_source.table_structure_short") }),
33878
+ /* @__PURE__ */ r(S.Tab, { value: "structure", leftSection: /* @__PURE__ */ r(mh, { size: 14 }), children: t("data_source.table_structure_short") }),
33880
33879
  /* @__PURE__ */ r(S.Tab, { value: "data", leftSection: /* @__PURE__ */ r(Xt, { size: 14 }), children: t("data.label") })
33881
33880
  ] }),
33882
33881
  /* @__PURE__ */ r(S.Panel, { value: "structure", children: /* @__PURE__ */ r(_4, { dataSource: e }) }),
@@ -33961,7 +33960,7 @@ const v4 = D(({
33961
33960
  }
33962
33961
  }
33963
33962
  }, children: [
33964
- /* @__PURE__ */ r(Uh, { size: 14, color: "#228be6" }),
33963
+ /* @__PURE__ */ r(gh, { size: 14, color: "#228be6" }),
33965
33964
  /* @__PURE__ */ r(k, { size: "sm", c: "blue", children: n })
33966
33965
  ] }) : /* @__PURE__ */ u(_, { justify: "space-between", ...t, sx: {
33967
33966
  flexGrow: 1
@@ -33978,7 +33977,7 @@ const v4 = D(({
33978
33977
  } = x(), a = de(), {
33979
33978
  data: i = [],
33980
33979
  loading: o
33981
- } = dn(Mi, {
33980
+ } = dn($i, {
33982
33981
  refreshDeps: []
33983
33982
  }, []), l = z(() => {
33984
33983
  const h = i.map((p) => ({
@@ -34110,7 +34109,7 @@ WHERE
34110
34109
  /* @__PURE__ */ u(S.List, { grow: !0, children: [
34111
34110
  /* @__PURE__ */ r(S.Tab, { value: "guide", leftSection: /* @__PURE__ */ r(Gn, { size: 14 }), children: a("query_variable.guide.tabs.guide") }),
34112
34111
  /* @__PURE__ */ r(S.Tab, { value: "local_query_vars", leftSection: /* @__PURE__ */ r(Vn, { size: 14 }), children: a("query_variable.guide.tabs.variables_in_this_dashboard") }),
34113
- /* @__PURE__ */ r(S.Tab, { value: "global_sql_snippets", leftSection: /* @__PURE__ */ r(Kh, { size: 14 }), children: a("query_variable.guide.tabs.global_sql_snippets") })
34112
+ /* @__PURE__ */ r(S.Tab, { value: "global_sql_snippets", leftSection: /* @__PURE__ */ r(fh, { size: 14 }), children: a("query_variable.guide.tabs.global_sql_snippets") })
34114
34113
  ] }),
34115
34114
  /* @__PURE__ */ r(S.Panel, { value: "guide", pt: "xs", children: /* @__PURE__ */ r(vt, { language: "sql", sx: {
34116
34115
  width: "100%"
@@ -34207,7 +34206,7 @@ WHERE
34207
34206
  t
34208
34207
  } = x(), n = z(() => C.groupBy(e.dependencies, "type"), [e.dependencies]), a = z(() => e.dependencies.some((o) => !o.valid), [e.dependencies]), i = e.dependencies.length > 0;
34209
34208
  return i ? /* @__PURE__ */ u(_e, { withinPortal: !0, zIndex: 340, shadow: "md", disabled: !i, children: [
34210
- /* @__PURE__ */ r(_e.Target, { children: /* @__PURE__ */ r(L, { size: "xs", variant: "subtle", color: a ? "red" : "green", disabled: !i, leftSection: a ? /* @__PURE__ */ r(vl, { size: 16 }) : /* @__PURE__ */ r(Xh, { size: 16 }), children: t("query.dependency.label") }) }),
34209
+ /* @__PURE__ */ r(_e.Target, { children: /* @__PURE__ */ r(L, { size: "xs", variant: "subtle", color: a ? "red" : "green", disabled: !i, leftSection: a ? /* @__PURE__ */ r(vl, { size: 16 }) : /* @__PURE__ */ r(yh, { size: 16 }), children: t("query.dependency.label") }) }),
34211
34210
  /* @__PURE__ */ r(_e.Dropdown, { children: /* @__PURE__ */ r(We, { spacing: "md", size: "sm", listStyleType: "none", children: Object.entries(n).map(([o, l]) => /* @__PURE__ */ u(We.Item, { children: [
34212
34211
  /* @__PURE__ */ r(k, { size: "sm", fw: "bold", ff: "monospace", children: t(`${o}.label`) }),
34213
34212
  /* @__PURE__ */ r(We, { withPadding: !0, size: "sm", sx: {
@@ -34221,7 +34220,7 @@ WHERE
34221
34220
  }
34222
34221
  }, children: /* @__PURE__ */ r(Ir, { size: 12 }) }), children: s.key }, s.key)) })
34223
34222
  ] }, o)) }) })
34224
- ] }) : /* @__PURE__ */ r(re, { label: t("query.dependency.has_none"), children: /* @__PURE__ */ r(L, { size: "xs", variant: "subtle", color: "gray", leftSection: /* @__PURE__ */ r(Yh, { size: 16, style: {
34223
+ ] }) : /* @__PURE__ */ r(re, { label: t("query.dependency.has_none"), children: /* @__PURE__ */ r(L, { size: "xs", variant: "subtle", color: "gray", leftSection: /* @__PURE__ */ r(bh, { size: 16, style: {
34225
34224
  transform: "rotate(180deg)"
34226
34225
  } }), sx: {
34227
34226
  transform: "none !important"
@@ -34625,7 +34624,7 @@ const X4 = [{
34625
34624
  } = e, a = n === "loading", i = ae(() => {
34626
34625
  e.fetchData(!0);
34627
34626
  }, [e.fetchData]), o = () => {
34628
- ld(e.name, e.data);
34627
+ od(e.name, e.data);
34629
34628
  };
34630
34629
  B(() => {
34631
34630
  i();
@@ -34791,9 +34790,9 @@ const X4 = [{
34791
34790
  onChange: n,
34792
34791
  usedKeys: a
34793
34792
  }) => {
34794
- const i = e.metricDetail, o = e.metrics.loading || i.loading, l = i.error, s = i.filterColOptions, c = uh({
34793
+ const i = e.metricDetail, o = e.metrics.loading || i.loading, l = i.error, s = i.filterColOptions, c = Vu({
34795
34794
  onDropdownClose: () => c.resetSelectedOption()
34796
- }), d = z(() => o ? /* @__PURE__ */ r(Da, { size: "xs" }) : t ? /* @__PURE__ */ r(xt, { size: "xs", onClick: () => n(null) }) : /* @__PURE__ */ r(Bt.Chevron, { size: "xs" }), [o, t]), h = /* @__PURE__ */ r(hh, { component: "button", type: "button", variant: "unstyled", size: "xs", pointer: !0, rightSection: d, rightSectionPointerEvents: !o && t ? "all" : "none", onClick: () => c.toggleDropdown(), disabled: o || s.length === 0, styles: dD, error: !!l, children: t || /* @__PURE__ */ r(ph.Placeholder, { children: "选择维度" }) });
34795
+ }), d = z(() => o ? /* @__PURE__ */ r(Da, { size: "xs" }) : t ? /* @__PURE__ */ r(xt, { size: "xs", onClick: () => n(null) }) : /* @__PURE__ */ r(Bt.Chevron, { size: "xs" }), [o, t]), h = /* @__PURE__ */ r(Au, { component: "button", type: "button", variant: "unstyled", size: "xs", pointer: !0, rightSection: d, rightSectionPointerEvents: !o && t ? "all" : "none", onClick: () => c.toggleDropdown(), disabled: o || s.length === 0, styles: dD, error: !!l, children: t || /* @__PURE__ */ r($u.Placeholder, { children: "选择维度" }) });
34797
34796
  return /* @__PURE__ */ u(Bt, { store: c, onOptionSubmit: (p) => {
34798
34797
  n(p), c.closeDropdown();
34799
34798
  }, styles: cD, children: [
@@ -35179,7 +35178,7 @@ const X4 = [{
35179
35178
  }
35180
35179
  }, ...t, children: [
35181
35180
  /* @__PURE__ */ u(_, { flex: "1", gap: 4, children: [
35182
- /* @__PURE__ */ r(Zh, { size: 12 }),
35181
+ /* @__PURE__ */ r(_h, { size: 12 }),
35183
35182
  /* @__PURE__ */ r(k, { size: "xs", children: n.label })
35184
35183
  ] }),
35185
35184
  /* @__PURE__ */ r(k, { ml: 16, size: "xs", c: t.checked ? "rgba(255,255,255,.8)" : "dimmed", children: n.description })
@@ -35675,7 +35674,7 @@ const X4 = [{
35675
35674
  label: a,
35676
35675
  order: t.content.filters.current.length + 1,
35677
35676
  type: H.TextInput,
35678
- config: Qc(),
35677
+ config: jc(),
35679
35678
  visibleInViewsIDs: ["Main"],
35680
35679
  auto_submit: !1
35681
35680
  };
@@ -35941,9 +35940,9 @@ const oI = {
35941
35940
  iI(o.monacoPath), Dc(o);
35942
35941
  const {
35943
35942
  data: y = []
35944
- } = dn(Mi), {
35943
+ } = dn($i), {
35945
35944
  data: b = []
35946
- } = dn(Ic), v = $.useMemo(() => xT(t, n, y, b, e, c ?? {}), [t, n]);
35945
+ } = dn(gd), v = $.useMemo(() => xT(t, n, y, b, e, c ?? {}), [t, n]);
35947
35946
  $.useImperativeHandle(g, () => v, [v]), qd(v.content, !0), $.useEffect(() => {
35948
35947
  v.context.replace(e);
35949
35948
  }, [e]), $.useEffect(() => {
@@ -35973,7 +35972,7 @@ const oI = {
35973
35972
  onFilterValuesChange: d,
35974
35973
  onExit: h,
35975
35974
  lang: p
35976
- }), /* @__PURE__ */ r(Nl, { children: /* @__PURE__ */ r(Tc, { lang: p, children: /* @__PURE__ */ r(jl, { children: /* @__PURE__ */ r(hs, { children: /* @__PURE__ */ r(as, { value: {
35975
+ }), /* @__PURE__ */ r(Nl, { children: /* @__PURE__ */ r(Tc, { lang: p, children: /* @__PURE__ */ r(Wl, { children: /* @__PURE__ */ r(hs, { children: /* @__PURE__ */ r(as, { value: {
35977
35976
  renderSearchButton: o.renderSearchButton
35978
35977
  }, children: /* @__PURE__ */ r(ns, { value: v, children: /* @__PURE__ */ r(os, { value: v.content, children: /* @__PURE__ */ u(Rr.Provider, { value: {
35979
35978
  inEditMode: !0
@@ -36010,13 +36009,13 @@ const tu = m.model({
36010
36009
  update_time: m.string,
36011
36010
  version: m.string,
36012
36011
  // schema version
36013
- filters: md,
36012
+ filters: pd,
36014
36013
  queries: bd,
36015
36014
  sqlSnippets: _d,
36016
- views: id,
36017
- panels: cd,
36015
+ views: ad,
36016
+ panels: sd,
36018
36017
  layouts: yd,
36019
- mock_context: Mc
36018
+ mock_context: Ic
36020
36019
  }).views((e) => ({
36021
36020
  get json() {
36022
36021
  return {
@@ -36134,11 +36133,11 @@ function sI({
36134
36133
  create_time: a,
36135
36134
  update_time: i,
36136
36135
  version: d,
36137
- filters: gd(h, l, I, s),
36136
+ filters: md(h, l, I, s),
36138
36137
  queries: h3(b),
36139
36138
  sqlSnippets: m3(v),
36140
- mock_context: Lc(I),
36141
- views: l3(p, c),
36139
+ mock_context: Mc(I),
36140
+ views: r3(p, c),
36142
36141
  panels: {
36143
36142
  list: g
36144
36143
  },
@@ -36154,9 +36153,9 @@ const cI = m.model({
36154
36153
  group: m.string,
36155
36154
  content: tu,
36156
36155
  content_id: m.string,
36157
- datasources: i3,
36158
- globalSQLSnippets: nd,
36159
- context: $i
36156
+ datasources: t3,
36157
+ globalSQLSnippets: td,
36158
+ context: Ai
36160
36159
  });
36161
36160
  function dI({
36162
36161
  id: e,
@@ -36176,7 +36175,7 @@ function dI({
36176
36175
  globalSQLSnippets: {
36177
36176
  list: l
36178
36177
  },
36179
- context: rd(s)
36178
+ context: nd(s)
36180
36179
  });
36181
36180
  }
36182
36181
  fs();
@@ -36198,9 +36197,9 @@ const uI = ({
36198
36197
  Dc(i);
36199
36198
  const {
36200
36199
  data: g = []
36201
- } = dn(Mi), {
36200
+ } = dn($i), {
36202
36201
  data: y = []
36203
- } = dn(Ic), b = $.useMemo(() => dI(t, n, g, y, e, s ?? {}, d ?? null), [t, n]);
36202
+ } = dn(gd), b = $.useMemo(() => dI(t, n, g, y, e, s ?? {}, d ?? null), [t, n]);
36204
36203
  qd(b.content, !1), $.useEffect(() => {
36205
36204
  b.context.replace(e);
36206
36205
  }, [e]), $.useEffect(() => {
@@ -36230,7 +36229,7 @@ const uI = ({
36230
36229
  activeTab: d,
36231
36230
  onActiveTabChange: h,
36232
36231
  lang: p
36233
- }), /* @__PURE__ */ r(Nl, { children: /* @__PURE__ */ r(Tc, { lang: p, children: /* @__PURE__ */ r(jl, { children: /* @__PURE__ */ r(hs, { children: /* @__PURE__ */ r(as, { value: {
36232
+ }), /* @__PURE__ */ r(Nl, { children: /* @__PURE__ */ r(Tc, { lang: p, children: /* @__PURE__ */ r(Wl, { children: /* @__PURE__ */ r(hs, { children: /* @__PURE__ */ r(as, { value: {
36234
36233
  renderSearchButton: i.renderSearchButton
36235
36234
  }, children: /* @__PURE__ */ r(ns, { value: b, children: /* @__PURE__ */ r(os, { value: b.content, children: /* @__PURE__ */ r(us.Provider, { value: {
36236
36235
  fullScreenPanelID: o,
@@ -36248,7 +36247,7 @@ export {
36248
36247
  Od as ContentModel,
36249
36248
  os as ContentModelContextProvider,
36250
36249
  tu as ContentRenderModel,
36251
- $i as ContextMeta,
36250
+ Ai as ContextMeta,
36252
36251
  ba as DEFAULT_CUSTOM_MODAL_TITLE,
36253
36252
  c5 as DashboardApiClient,
36254
36253
  d5 as DashboardApiFacadeClient,
@@ -36261,101 +36260,101 @@ export {
36261
36260
  as as DashboardThemeContextProvider,
36262
36261
  Az as DashboardViewEditor,
36263
36262
  Oi as DashboardViewRender,
36264
- td as DataSourceMetaModel,
36263
+ ed as DataSourceMetaModel,
36265
36264
  ie as DataSourceType,
36266
- i3 as DataSourcesMetaModel,
36265
+ t3 as DataSourcesMetaModel,
36267
36266
  hs as DatesProvider,
36268
36267
  s5 as DefaultApiClient,
36269
36268
  kd as DescriptionPopover,
36270
36269
  g3 as DraftModel,
36271
36270
  U as EViewComponentType,
36272
36271
  h9 as FacadeApiClient,
36273
- Rc as FilterCheckboxConfigMeta,
36274
- Fc as FilterDateRangeConfigMeta,
36275
- Xc as FilterMeta,
36276
- Bc as FilterMultiSelectConfigMeta,
36277
- Nc as FilterSelectConfigMeta,
36278
- jc as FilterTextInputConfigMeta,
36279
- Kc as FilterTreeSelectConfigMeta,
36280
- Yc as FilterTreeSingleSelectConfigMeta,
36272
+ Pc as FilterCheckboxConfigMeta,
36273
+ qc as FilterDateRangeConfigMeta,
36274
+ Yc as FilterMeta,
36275
+ Fc as FilterMultiSelectConfigMeta,
36276
+ Bc as FilterSelectConfigMeta,
36277
+ Nc as FilterTextInputConfigMeta,
36278
+ Uc as FilterTreeSelectConfigMeta,
36279
+ Kc as FilterTreeSingleSelectConfigMeta,
36281
36280
  Ez as FiltersModel,
36282
- md as FiltersRenderModel,
36281
+ pd as FiltersRenderModel,
36283
36282
  mz as FullScreenPanel,
36284
36283
  us as FullScreenPanelContext,
36285
- o3 as GlobalSQLSnippetMeta,
36286
- nd as GlobalSQLSnippetsMeta,
36287
- T5 as LayoutItemMeta,
36288
- D5 as LayoutSetMeta,
36284
+ n3 as GlobalSQLSnippetMeta,
36285
+ td as GlobalSQLSnippetsMeta,
36286
+ S5 as LayoutItemMeta,
36287
+ C5 as LayoutSetMeta,
36289
36288
  Rr as LayoutStateContext,
36290
36289
  yd as LayoutsRenderModel,
36291
- Pc as MericoMetricQueryMeta,
36292
- Mc as MockContextMeta,
36290
+ $c as MericoMetricQueryMeta,
36291
+ Ic as MockContextMeta,
36293
36292
  u3 as MuteQueryModel,
36294
36293
  cz as Panel,
36295
36294
  cs as PanelContextProvider,
36296
36295
  iz as PanelErrorOrStateMessage,
36297
- v5 as PanelMeta,
36296
+ b5 as PanelMeta,
36298
36297
  pT as PanelModel,
36299
36298
  Ad as PanelRender,
36300
- sd as PanelRenderModel,
36301
- b5 as PanelStyleMeta,
36302
- y5 as PanelTitleMeta,
36299
+ ld as PanelRenderModel,
36300
+ p5 as PanelStyleMeta,
36301
+ m5 as PanelTitleMeta,
36303
36302
  az as PanelVizAddons,
36304
- x5 as PanelVizMeta,
36303
+ f5 as PanelVizMeta,
36305
36304
  Vd as PanelVizSection,
36306
36305
  mT as PanelsModel,
36307
- cd as PanelsRenderModel,
36306
+ sd as PanelsRenderModel,
36308
36307
  qz as QueriesModel,
36309
36308
  bd as QueriesRenderModel,
36310
- z5 as QueryMeta,
36309
+ w5 as QueryMeta,
36311
36310
  Oz as QueryModel,
36312
36311
  fd as QueryRenderModel,
36313
36312
  x9 as ReadOnlyDashboard,
36314
- I5 as SQLSnippetMeta,
36313
+ k5 as SQLSnippetMeta,
36315
36314
  p3 as SQLSnippetRenderModel,
36316
36315
  Fz as SQLSnippetsModel,
36317
36316
  _d as SQLSnippetsRenderModel,
36318
- _5 as VariableMeta,
36317
+ g5 as VariableMeta,
36319
36318
  Pz as ViewComponentTypeBackground,
36320
36319
  b9 as ViewComponentTypeColor,
36321
36320
  f9 as ViewComponentTypeName,
36322
- Zc as ViewDivisionConfig,
36323
- a3 as ViewMeta,
36324
- Jc as ViewModalConfig,
36325
- ad as ViewRenderModel,
36326
- ed as ViewTabsConfig,
36321
+ Xc as ViewDivisionConfig,
36322
+ e3 as ViewMeta,
36323
+ Zc as ViewModalConfig,
36324
+ rd as ViewRenderModel,
36325
+ Jc as ViewTabsConfig,
36327
36326
  fT as ViewsModel,
36328
- id as ViewsRenderModel,
36327
+ ad as ViewsRenderModel,
36329
36328
  rz as Viz,
36330
36329
  y9 as applyPartialDashboard,
36331
36330
  Dc as configureAPIClient,
36332
36331
  yT as createContentModel,
36333
36332
  sI as createContentRenderModel,
36334
- rd as createContextMeta,
36333
+ nd as createContextMeta,
36335
36334
  xT as createDashboardModel,
36336
36335
  dI as createDashboardRenderModel,
36337
36336
  f3 as createDraft,
36338
- M5 as createFilterCheckboxConfig,
36339
- A5 as createFilterDateRangeConfig,
36340
- $5 as createFilterMultiSelectConfig,
36341
- P5 as createFilterSelectConfig,
36342
- Qc as createFilterTextInputConfig,
36343
- X5 as createFilterTreeSelectConfig,
36344
- Z5 as createFilterTreeSingleSelectConfig,
36345
- k5 as createMericoMetricQueryMetaConfig,
36346
- J5 as createViewDivisionConfig,
36347
- t3 as createViewModalConfig,
36348
- r3 as createViewTabsConfig,
36337
+ z5 as createFilterCheckboxConfig,
36338
+ I5 as createFilterDateRangeConfig,
36339
+ M5 as createFilterMultiSelectConfig,
36340
+ L5 as createFilterSelectConfig,
36341
+ jc as createFilterTextInputConfig,
36342
+ W5 as createFilterTreeSelectConfig,
36343
+ U5 as createFilterTreeSingleSelectConfig,
36344
+ v5 as createMericoMetricQueryMetaConfig,
36345
+ K5 as createViewDivisionConfig,
36346
+ X5 as createViewModalConfig,
36347
+ J5 as createViewTabsConfig,
36349
36348
  u5 as facadeApiClient,
36350
36349
  _r as formatSQLSnippet,
36351
36350
  Ed as getInitialDashboardViewsModel,
36352
- gd as getInitialFiltersConfig,
36353
- Lc as getInitialMockContextMeta,
36351
+ md as getInitialFiltersConfig,
36352
+ Mc as getInitialMockContextMeta,
36354
36353
  h3 as getInitialQueriesRenderModel,
36355
36354
  m3 as getInitialSQLSnippetsRenderModel,
36356
- l3 as getInitialViewsRenderModel,
36357
- c3 as getNewPanel,
36358
- L5 as getStaticDateRangeDefaultValue,
36355
+ r3 as getInitialViewsRenderModel,
36356
+ i3 as getNewPanel,
36357
+ T5 as getStaticDateRangeDefaultValue,
36359
36358
  v9 as getVersion,
36360
36359
  p9 as initialDashboardContent,
36361
36360
  Ye as notifyVizRendered,