@feedmepos/mf-report 5.31.1 → 5.31.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/{App-Zg9Nkn-X.js → App-BS7p-1_C.js} +110 -110
  2. package/dist/{DateRangeSelect-DlAzWqnp.js → DateRangeSelect-CU1zLhsi.js} +129 -121
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-BnkrjWB3.js → Default.vue_vue_type_script_setup_true_lang-BbIP6Sxr.js} +1 -1
  4. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-DWTr59nu.js → DynamicWidget.vue_vue_type_script_setup_true_lang-CzSVopxn.js} +7 -7
  5. package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DMIpD0Oo.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-V9SzUzmd.js} +453 -453
  6. package/dist/{InsightView-BveDydBM.js → InsightView-BY5Sgoxt.js} +5 -5
  7. package/dist/{Integration-D5cZHGJP.js → Integration-YOGVHjkr.js} +174 -174
  8. package/dist/{Integrations-CwGuJAUq.js → Integrations-DLn3wHzm.js} +2 -2
  9. package/dist/{Layout-B85IdhpJ.js → Layout-B8HhRlSf.js} +1 -1
  10. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-CzZlZnJ1.js → LocationSelect.vue_vue_type_script_setup_true_lang-C2yXmZru.js} +2 -2
  11. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-eRW_ry8V.js → MenuTab.vue_vue_type_script_setup_true_lang-CZFM47wC.js} +5 -5
  12. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-6pkps4_3.js → NavigationTab.vue_vue_type_script_setup_true_lang-BriXZRy-.js} +5 -5
  13. package/dist/{OverviewView-BaxcnLPg.js → OverviewView-B4auEUPK.js} +5 -5
  14. package/dist/{Report-Dl0RVdnn.js → Report-dar8N8tM.js} +3 -3
  15. package/dist/{ReportCanvasView-C2Y4wH4B.js → ReportCanvasView-J-TOAEDk.js} +5 -5
  16. package/dist/{ReportEditor-DEjzoJiJ.js → ReportEditor-GUrAEUjy.js} +7 -7
  17. package/dist/{ReportView-DhNKM2yU.js → ReportView-ok4zqyiS.js} +6 -6
  18. package/dist/{ReportViewRoute-BV9dHygI.js → ReportViewRoute-BcYLz9D0.js} +2 -2
  19. package/dist/{Setting-ClOpXx9i.js → Setting-CW-iwHV7.js} +3 -3
  20. package/dist/{Template-eE7pM1rQ.js → Template-CYnlmr86.js} +3 -3
  21. package/dist/TileEditor-btcTn9w6.js +4183 -0
  22. package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-D--qKpZi.js → TilePageStack.vue_vue_type_script_setup_true_lang-Be_qbuOb.js} +2 -2
  23. package/dist/{TransitionFade-Dnsvw7P8.js → TransitionFade-B3zeQDvF.js} +5 -5
  24. package/dist/{app-5-1VploO.js → app-Bw-zsS2R.js} +2337 -2297
  25. package/dist/app.js +1 -1
  26. package/dist/assets/{processTableData.worker-r9RKAQPd.js → formatChartData.worker-UoGYoYc3.js} +30 -42
  27. package/dist/assets/{formatChartData.worker-DcIXAZPX.js → processTableData.worker-DxE4bjxG.js} +33 -45
  28. package/dist/{currency-Da4VuYyM.js → currency-DmsNWBQ3.js} +1 -1
  29. package/dist/{index-DzEFpeJN.js → index-B5Reb-CL.js} +552 -564
  30. package/dist/{report-Zdnz-pse.js → report-CblaE0LI.js} +1 -1
  31. package/dist/style.css +1 -1
  32. package/dist/{useRestaurantPermission-CxQKtJOk.js → useRestaurantPermission-BZR1kItv.js} +3 -3
  33. package/package.json +1 -1
  34. package/dist/TileEditor-BApSzqn2.js +0 -4184
@@ -1,30 +1,30 @@
1
- import { ref as ve, computed as Se, defineComponent as yt, mergeModels as lt, useModel as ft, watch as Ie, resolveComponent as ee, createElementBlock as fe, openBlock as J, createVNode as P, withCtx as ue, createElementVNode as Q, createCommentVNode as bt, Fragment as Le, renderList as ht, createBlock as we, unref as D, createTextVNode as nt, withDirectives as $l, toDisplayString as he, vShow as xl, renderSlot as qt, normalizeStyle as Al, normalizeClass as Et, withModifiers as dt } from "vue";
2
- import { c as jt, _ as Qt, D as Gl, e as El } from "./DateRangeSelect-DlAzWqnp.js";
3
- import { e as St } from "./index-DzEFpeJN.js";
4
- import { d as $, u as Oe, c as qe, a as Me, F as ke, a2 as gt, r as Ae, g as Ll, h as Ml } from "./app-5-1VploO.js";
5
- import { b as B, C as W, Q as tt, u as Pe, o as Ge, p as Ue, D as be, a as Pl, x as Lt, W as Mt, A as Bl, S as Pt } from "./report-Zdnz-pse.js";
1
+ import { ref as ve, computed as Se, defineComponent as yt, mergeModels as lt, useModel as ft, watch as Ie, resolveComponent as ee, createElementBlock as fe, openBlock as J, createVNode as P, withCtx as ue, createElementVNode as Q, createCommentVNode as bt, Fragment as Le, renderList as ht, createBlock as we, unref as D, createTextVNode as nt, withDirectives as xl, toDisplayString as he, vShow as Al, renderSlot as jt, normalizeStyle as Gl, normalizeClass as Et, withModifiers as dt } from "vue";
2
+ import { c as Qt, _ as Kt, D as El, e as Ll } from "./DateRangeSelect-CU1zLhsi.js";
3
+ import { e as St } from "./index-B5Reb-CL.js";
4
+ import { d as E, u as ke, c as qe, a as Me, F as Oe, a5 as gt, r as Ae, g as Ml, i as Pl, z as Bl, h as zl, t as Lt } from "./app-Bw-zsS2R.js";
5
+ import { b as B, C as U, Q as tt, u as Pe, o as Ge, p as We, D as be, a as Ul, x as Mt, W as Pt, A as Wl, S as Bt } from "./report-CblaE0LI.js";
6
6
  import { defineStore as Ft, storeToRefs as re } from "pinia";
7
7
  import { detectLocale as xe } from "@feedmepos/mf-common";
8
- import { u as Kt } from "./_plugin-vue_export-helper-C6QDExPN.js";
9
- import { _ as zl } from "./SelectComponent.vue_vue_type_script_setup_true_lang-DW7Dk7iQ.js";
10
- var Jt = /* @__PURE__ */ ((l) => (l.generating = "GENERATING", l.completed = "COMPLETED", l.failed = "FAILED", l.canceled = "CANCELLED", l))(Jt || {});
11
- const Wl = "/assets/formatChartData.worker-DcIXAZPX.js", mt = /* @__PURE__ */ new Map();
12
- function Bt(l) {
8
+ import { u as Jt } from "./_plugin-vue_export-helper-C6QDExPN.js";
9
+ import { _ as ql } from "./SelectComponent.vue_vue_type_script_setup_true_lang-DW7Dk7iQ.js";
10
+ var Yt = /* @__PURE__ */ ((l) => (l.generating = "GENERATING", l.completed = "COMPLETED", l.failed = "FAILED", l.canceled = "CANCELLED", l))(Yt || {});
11
+ const jl = "/assets/formatChartData.worker-UoGYoYc3.js", mt = /* @__PURE__ */ new Map();
12
+ function zt(l) {
13
13
  return new Worker(l, { type: "module" });
14
14
  }
15
- async function Ul(l) {
15
+ async function Ql(l) {
16
16
  if (mt.has(l))
17
- return Bt(mt.get(l));
17
+ return zt(mt.get(l));
18
18
  let n = l;
19
19
  if (location.hostname !== new URL(import.meta.url).hostname) {
20
20
  const d = new URL(l.replace(/^\//, ""), import.meta.url).href, p = await fetch(d).then((g) => g.text()), f = new Blob([p], { type: "application/javascript" });
21
21
  n = URL.createObjectURL(f);
22
22
  }
23
- const r = Bt(n);
23
+ const r = zt(n);
24
24
  return mt.set(l, n), r;
25
25
  }
26
- async function ql(l, n) {
27
- const s = await Ul(l);
26
+ async function Kl(l, n) {
27
+ const s = await Ql(l);
28
28
  return s.postMessage(n), await new Promise((r) => {
29
29
  s.onmessage = async (d) => {
30
30
  const p = d.data;
@@ -32,11 +32,11 @@ async function ql(l, n) {
32
32
  };
33
33
  });
34
34
  }
35
- const jl = "mf-reportreport-sort-store", Yt = Ft(jl, () => {
35
+ const Jl = "mf-reportreport-sort-store", Ht = Ft(Jl, () => {
36
36
  const l = ve([]);
37
37
  function n(d, p) {
38
38
  if (d == null) return;
39
- const f = Array.isArray(p) ? p.filter((u) => u && u.key) : [], g = l.value.findIndex((u) => u.tileIndex === d), v = { tileIndex: d, sorts: f };
39
+ const f = Array.isArray(p) ? p.filter((i) => i && i.key) : [], g = l.value.findIndex((i) => i.tileIndex === d), v = { tileIndex: d, sorts: f };
40
40
  g !== -1 ? l.value.splice(g, 1, v) : l.value.push(v);
41
41
  }
42
42
  function s(d) {
@@ -47,7 +47,7 @@ const jl = "mf-reportreport-sort-store", Yt = Ft(jl, () => {
47
47
  typeof d == "number" ? l.value = l.value.filter((p) => p.tileIndex !== d) : l.value = [];
48
48
  }
49
49
  return { tileSort: l, setTileSorts: n, getTileSorts: s, clearTileSorts: r };
50
- }), Ql = "mf-reportreport-search-store", Kl = Ft(Ql, () => {
50
+ }), Yl = "mf-reportreport-search-store", Hl = Ft(Yl, () => {
51
51
  const l = ve({});
52
52
  function n(r, d) {
53
53
  r != null && (d ? l.value[r] = d : delete l.value[r]);
@@ -57,11 +57,11 @@ const jl = "mf-reportreport-sort-store", Yt = Ft(jl, () => {
57
57
  return l.value[r] || void 0;
58
58
  }
59
59
  return { tileSearch: l, setTileSearch: n, getTileSearch: s };
60
- }), Ht = "__EMPTY__";
61
- function We(l = []) {
60
+ }), Zt = "__EMPTY__";
61
+ function Ue(l = []) {
62
62
  return Array.from(new Set(l));
63
63
  }
64
- function Jl(l) {
64
+ function Zl(l) {
65
65
  return [
66
66
  l.schemaName,
67
67
  l.name,
@@ -70,37 +70,37 @@ function Jl(l) {
70
70
  l.operator
71
71
  ].join(":");
72
72
  }
73
- function Yl(l) {
74
- const n = (s, r) => $().set("hour", s).set("minute", r).set("second", 0).set("millisecond", 0).toISOString();
73
+ function Xl(l) {
74
+ const n = (s, r) => E().set("hour", s).set("minute", r).set("second", 0).set("millisecond", 0).toISOString();
75
75
  return !l.startTime || !l.endTime ? [] : [
76
76
  n(l.startTime.hour, l.startTime.minute),
77
77
  n(l.endTime.hour, l.endTime.minute)
78
78
  ];
79
79
  }
80
- function Hl(l, n) {
80
+ function en(l, n) {
81
81
  return {
82
82
  schemaName: l.schemaName,
83
83
  name: l.name,
84
84
  operator: n.operator,
85
85
  option: l.option ?? null,
86
- values: We(n.values),
86
+ values: Ue(n.values),
87
87
  dataFormula: l.dataFormula,
88
88
  isGlobalFilter: !0
89
89
  };
90
90
  }
91
- function Zl(l, n) {
92
- const s = Yl(n);
91
+ function tn(l, n) {
92
+ const s = Xl(n);
93
93
  return s.length !== 2 ? null : {
94
94
  schemaName: l.schemaName,
95
95
  name: l.name,
96
- operator: W.Between,
96
+ operator: U.Between,
97
97
  option: l.option ?? B.TimeOfDay,
98
98
  values: s,
99
99
  dataFormula: l.dataFormula,
100
100
  isGlobalFilter: !0
101
101
  };
102
102
  }
103
- function Xl(l) {
103
+ function ln(l) {
104
104
  var d, p, f, g;
105
105
  const n = (l.filters ?? []).map((v) => ({
106
106
  ...v,
@@ -109,38 +109,38 @@ function Xl(l) {
109
109
  if (s.length === 1 && String(s[0]) === "EMPTY_GLOBAL_FILTER_VALUE") {
110
110
  const v = Object.values(B).includes(
111
111
  String(l.option ?? "")
112
- ), u = l.option === B.TimeOfDay ? ["1000-01-01T23:59:59.999Z", "1000-01-01T00:00:00.000Z"] : [v ? "-1" : Ht];
112
+ ), i = l.option === B.TimeOfDay ? ["1000-01-01T23:59:59.999Z", "1000-01-01T00:00:00.000Z"] : [v ? "-1" : Zt];
113
113
  return [
114
114
  ...n,
115
115
  {
116
116
  schemaName: l.schemaName,
117
117
  name: l.name,
118
- operator: W.Equal,
118
+ operator: U.Equal,
119
119
  option: l.option ?? null,
120
- values: u,
120
+ values: i,
121
121
  dataFormula: l.dataFormula,
122
122
  isGlobalFilter: !0
123
123
  }
124
124
  ];
125
125
  }
126
126
  if ((((d = l.customTimeRanges) == null ? void 0 : d.length) ?? 0) > 0) {
127
- const v = new Set(s.map((u) => String(u)));
127
+ const v = new Set(s.map((i) => String(i)));
128
128
  return [
129
129
  ...n,
130
- ...((p = l.customTimeRanges) == null ? void 0 : p.filter((u) => {
131
- const w = String(u.name ?? "");
130
+ ...((p = l.customTimeRanges) == null ? void 0 : p.filter((i) => {
131
+ const w = String(i.name ?? "");
132
132
  return v.has(w);
133
- }).map((u) => Zl(l, u)).filter((u) => !!u)) ?? []
133
+ }).map((i) => tn(l, i)).filter((i) => !!i)) ?? []
134
134
  ];
135
135
  }
136
136
  if ((((f = l.customOptions) == null ? void 0 : f.length) ?? 0) > 0) {
137
- const v = new Set(s.map((u) => String(u)));
137
+ const v = new Set(s.map((i) => String(i)));
138
138
  return [
139
139
  ...n,
140
- ...((g = l.customOptions) == null ? void 0 : g.filter((u) => {
141
- const w = String(u.label ?? "");
140
+ ...((g = l.customOptions) == null ? void 0 : g.filter((i) => {
141
+ const w = String(i.label ?? "");
142
142
  return v.has(w);
143
- }).map((u) => Hl(l, u)).filter((u) => Array.isArray(u.values) && u.values.length > 0)) ?? []
143
+ }).map((i) => en(l, i)).filter((i) => Array.isArray(i.values) && i.values.length > 0)) ?? []
144
144
  ];
145
145
  }
146
146
  return s.length === 0 ? n : [
@@ -148,7 +148,7 @@ function Xl(l) {
148
148
  {
149
149
  schemaName: l.schemaName,
150
150
  name: l.name,
151
- operator: W.Equal,
151
+ operator: U.Equal,
152
152
  option: l.option ?? null,
153
153
  values: s,
154
154
  dataFormula: l.dataFormula,
@@ -156,86 +156,86 @@ function Xl(l) {
156
156
  }
157
157
  ];
158
158
  }
159
- function zt({
159
+ function Ut({
160
160
  originalFilters: l,
161
161
  globalFilters: n,
162
162
  schemaNames: s
163
163
  }) {
164
- const r = /* @__PURE__ */ new Map(), d = [], p = new Set((s ?? []).map((i) => String(i))), f = (i) => p.has(i.schemaName ?? ""), g = n.filter(f);
165
- function v(i) {
164
+ const r = /* @__PURE__ */ new Map(), d = [], p = new Set((s ?? []).map((u) => String(u))), f = (u) => p.has(u.schemaName ?? ""), g = n.filter(f);
165
+ function v(u) {
166
166
  const m = Object.values(B).includes(
167
- String(i.option ?? "")
167
+ String(u.option ?? "")
168
168
  );
169
- return i.option === B.TimeOfDay ? ["1000-01-01T23:59:59.999Z", "1000-01-01T00:00:00.000Z"] : [m ? "-1" : Ht];
169
+ return u.option === B.TimeOfDay ? ["1000-01-01T23:59:59.999Z", "1000-01-01T00:00:00.000Z"] : [m ? "-1" : Zt];
170
170
  }
171
- function u(i, m) {
172
- const h = typeof i == "number" ? i : Number(i), N = typeof m == "number" ? m : Number(m);
173
- return Number.isFinite(h) && Number.isFinite(N) ? h - N : typeof i == "string" && typeof m == "string" ? i.localeCompare(m) : null;
171
+ function i(u, m) {
172
+ const h = typeof u == "number" ? u : Number(u), N = typeof m == "number" ? m : Number(m);
173
+ return Number.isFinite(h) && Number.isFinite(N) ? h - N : typeof u == "string" && typeof m == "string" ? u.localeCompare(m) : null;
174
174
  }
175
- function w(i, m) {
176
- if (i.length === 0 || m.length === 0) return null;
177
- const h = u(i[0], m[0]);
178
- return h == null ? null : [h >= 0 ? i[0] : m[0]];
175
+ function w(u, m) {
176
+ if (u.length === 0 || m.length === 0) return null;
177
+ const h = i(u[0], m[0]);
178
+ return h == null ? null : [h >= 0 ? u[0] : m[0]];
179
179
  }
180
- function O(i, m) {
181
- if (i.length === 0 || m.length === 0) return null;
182
- const h = u(i[0], m[0]);
183
- return h == null ? null : [h <= 0 ? i[0] : m[0]];
180
+ function k(u, m) {
181
+ if (u.length === 0 || m.length === 0) return null;
182
+ const h = i(u[0], m[0]);
183
+ return h == null ? null : [h <= 0 ? u[0] : m[0]];
184
184
  }
185
- function te(i, m) {
186
- if (i.length < 2 || m.length < 2) return null;
187
- const h = u(i[0], m[0]), N = u(i[1], m[1]);
185
+ function te(u, m) {
186
+ if (u.length < 2 || m.length < 2) return null;
187
+ const h = i(u[0], m[0]), N = i(u[1], m[1]);
188
188
  if (h == null || N == null) return null;
189
- const I = h >= 0 ? i[0] : m[0], k = N <= 0 ? i[1] : m[1];
190
- return u(I, k) == null ? null : [I, k];
189
+ const I = h >= 0 ? u[0] : m[0], O = N <= 0 ? u[1] : m[1];
190
+ return i(I, O) == null ? null : [I, O];
191
191
  }
192
- function A(i, m) {
193
- const h = We(i.values), N = We(m.values);
192
+ function x(u, m) {
193
+ const h = Ue(u.values), N = Ue(m.values);
194
194
  switch (m.operator) {
195
- case W.Equal: {
196
- const I = new Set(N), k = h.filter((L) => I.has(L));
197
- return k.length ? k : v(i);
195
+ case U.Equal: {
196
+ const I = new Set(N), O = h.filter((L) => I.has(L));
197
+ return O.length ? O : v(u);
198
198
  }
199
- case W.NotEqual:
200
- case W.NotLike:
201
- return We([
199
+ case U.NotEqual:
200
+ case U.NotLike:
201
+ return Ue([
202
202
  ...h,
203
203
  ...N
204
204
  ]);
205
- case W.GreaterThan:
206
- case W.GreaterThanOrEqual:
205
+ case U.GreaterThan:
206
+ case U.GreaterThanOrEqual:
207
207
  return w(h, N);
208
- case W.LessThan:
209
- case W.LessThanOrEqual:
210
- return O(h, N);
211
- case W.Between:
208
+ case U.LessThan:
209
+ case U.LessThanOrEqual:
210
+ return k(h, N);
211
+ case U.Between:
212
212
  return te(h, N);
213
213
  default:
214
214
  return null;
215
215
  }
216
216
  }
217
- const S = (i) => {
218
- if (!i || !f(i) || !Array.isArray(i.values) || i.values.length === 0)
217
+ const S = (u) => {
218
+ if (!u || !f(u) || !Array.isArray(u.values) || u.values.length === 0)
219
219
  return;
220
220
  const m = {
221
- ...i,
222
- values: We(i.values)
221
+ ...u,
222
+ values: Ue(u.values)
223
223
  };
224
- if (m.option === B.TimeOfDay && m.operator === W.Between) {
224
+ if (m.option === B.TimeOfDay && m.operator === U.Between) {
225
225
  d.push(m);
226
226
  return;
227
227
  }
228
- const N = Jl(m), I = r.get(N);
228
+ const N = Zl(m), I = r.get(N);
229
229
  if (!I) {
230
230
  r.set(N, m);
231
231
  return;
232
232
  }
233
- const k = A(I, m);
234
- if (k == null) {
233
+ const O = x(I, m);
234
+ if (O == null) {
235
235
  d.push(m);
236
236
  return;
237
237
  }
238
- I.values = k, r.set(N, I);
238
+ I.values = O, r.set(N, I);
239
239
  };
240
240
  return l.forEach(S), g.forEach(S), [...Array.from(r.values()), ...d];
241
241
  }
@@ -244,12 +244,12 @@ function je(l, n, s) {
244
244
  const r = JSON.parse(JSON.stringify(l)), d = n.filter((f) => {
245
245
  var g;
246
246
  return (g = f.tileIds) == null ? void 0 : g.includes(s);
247
- }).flatMap((f) => Xl(f));
247
+ }).flatMap((f) => ln(f));
248
248
  return {
249
249
  ...r,
250
250
  config: {
251
251
  ...r.config,
252
- filters: zt({
252
+ filters: Ut({
253
253
  originalFilters: r.config.filters ?? [],
254
254
  globalFilters: d ?? [],
255
255
  schemaNames: r.config.schemaNames
@@ -258,7 +258,7 @@ function je(l, n, s) {
258
258
  var v;
259
259
  return {
260
260
  ...f,
261
- filters: zt({
261
+ filters: Ut({
262
262
  originalFilters: f.filters ?? [],
263
263
  globalFilters: d ?? [],
264
264
  schemaNames: (v = r.config.joinDatasources) == null ? void 0 : v[g].schemaNames
@@ -268,10 +268,10 @@ function je(l, n, s) {
268
268
  }
269
269
  };
270
270
  }
271
- function en(l) {
271
+ function nn(l) {
272
272
  return (l == null ? void 0 : l.queryDatasource) === tt.BigQuery ? tt.BigQuery : tt.Postgres;
273
273
  }
274
- const tn = [
274
+ const an = [
275
275
  "schemaNames",
276
276
  "schemas",
277
277
  "dimensions",
@@ -299,9 +299,9 @@ const tn = [
299
299
  "isBlend",
300
300
  "periodType"
301
301
  ];
302
- function Zt(l) {
302
+ function Xt(l) {
303
303
  const n = { ...l.config };
304
- for (const s of tn)
304
+ for (const s of an)
305
305
  delete n[s];
306
306
  return n;
307
307
  }
@@ -315,12 +315,12 @@ function Qe({
315
315
  compareDateRange: r,
316
316
  timezone: d
317
317
  }) {
318
- const { canReadReportDateRange: p, canReadPageDateRange: f } = Ml(), g = (u) => n ? f(n, u, d) : l ? p(l, u, d) : !0, v = !!(r != null && r.startDate && (r != null && r.endDate));
318
+ const { canReadReportDateRange: p, canReadPageDateRange: f } = Pl(), g = (i) => n ? f(n, i, d) : l ? p(l, i, d) : !0, v = !!(r != null && r.startDate && (r != null && r.endDate));
319
319
  return g(s) && (!v || g(r));
320
320
  }
321
321
  function Ke(l) {
322
322
  if (l === "overview")
323
- return Ll.report_accessOverview;
323
+ return Ml.report_accessOverview;
324
324
  }
325
325
  function wt({
326
326
  selectedNavigationTab: l,
@@ -331,7 +331,7 @@ function wt({
331
331
  }) {
332
332
  return l === "overview" && s ? s : n ? r ?? d : d;
333
333
  }
334
- async function Xt(l, n) {
334
+ async function el(l, n) {
335
335
  for (let s = 0; s < l.length; s++)
336
336
  try {
337
337
  return await l[s]();
@@ -341,7 +341,7 @@ async function Xt(l, n) {
341
341
  }
342
342
  throw new Error("No callback");
343
343
  }
344
- const ln = async ({
344
+ const sn = async ({
345
345
  widget: l,
346
346
  signal: n,
347
347
  tileId: s,
@@ -351,50 +351,50 @@ const ln = async ({
351
351
  scopedGlobalFilters: f,
352
352
  page: g,
353
353
  pageRead: v,
354
- search: u
354
+ search: i
355
355
  }) => {
356
356
  var me, ge, ye, ce;
357
- const { businessId: w } = re(Oe()), { currentReport: O, editingReport: te, overviewReport: A } = Pe(), { selectedNavigationTab: S, isEditorRoute: i } = qe(), m = wt({
357
+ const { businessId: w } = re(ke()), { currentReport: k, editingReport: te, overviewReport: x } = Pe(), { selectedNavigationTab: S, isEditorRoute: u } = qe(), m = wt({
358
358
  selectedNavigationTab: S,
359
- isEditorRoute: i,
360
- overviewReport: A,
359
+ isEditorRoute: u,
360
+ overviewReport: x,
361
361
  editingReport: te,
362
- currentReport: O
362
+ currentReport: k
363
363
  }), h = Ke(S), {
364
364
  selectedRestaurantIds: N,
365
365
  selectedWarehouseIds: I,
366
- selectedLocationIds: k,
366
+ selectedLocationIds: O,
367
367
  dateRange: L,
368
- compareDateRange: U,
368
+ compareDateRange: W,
369
369
  timeRange: q,
370
370
  timezone: le,
371
371
  restaurants: X,
372
372
  warehouses: ne
373
373
  } = Me(), { globalFilters: C } = Ge();
374
- if (k.length === 0)
374
+ if (O.length === 0)
375
375
  return null;
376
376
  const _ = p ?? L, K = d ?? q, Y = f ?? C;
377
377
  if (!Qe({
378
378
  report: m,
379
379
  pageSubject: h,
380
380
  dateRange: _,
381
- compareDateRange: U,
381
+ compareDateRange: W,
382
382
  timezone: le
383
383
  }))
384
384
  return null;
385
385
  const H = (r == null ? void 0 : r.filter((ie) => X.some((se) => se.id === ie))) ?? N, ae = (r == null ? void 0 : r.filter((ie) => ne.some((se) => se.id === ie))) ?? I, z = je(l, Y, s ?? ""), R = {
386
- fetchType: ke.Post,
386
+ fetchType: Oe.Post,
387
387
  url: v ? `/${w.value}/v2/query/page` : `/${w.value}/v2/query`,
388
388
  data: {
389
389
  ...g ? { page: g } : {},
390
390
  ...v ?? {},
391
- ...u ? { search: u } : {},
391
+ ...i ? { search: i } : {},
392
392
  widget: z,
393
393
  dateRange: [_.startDate, _.endDate],
394
- compareDateRange: U.startDate && U.endDate ? [U.startDate, U.endDate] : void 0,
394
+ compareDateRange: W.startDate && W.endDate ? [W.startDate, W.endDate] : void 0,
395
395
  timeRange: [
396
- $().tz(le).hour(Number((me = K.start) == null ? void 0 : me.hour)).minute(Number((ge = K.start) == null ? void 0 : ge.minute)).toISOString(),
397
- $().tz(le).hour(Number((ye = K.end) == null ? void 0 : ye.hour)).minute(Number((ce = K.end) == null ? void 0 : ce.minute)).endOf("minutes").toISOString()
396
+ E().tz(le).hour(Number((me = K.start) == null ? void 0 : me.hour)).minute(Number((ge = K.start) == null ? void 0 : ge.minute)).toISOString(),
397
+ E().tz(le).hour(Number((ye = K.end) == null ? void 0 : ye.hour)).minute(Number((ce = K.end) == null ? void 0 : ce.minute)).endOf("minutes").toISOString()
398
398
  ],
399
399
  businessIds: w.value ? [w.value] : [],
400
400
  restaurantIds: H,
@@ -402,7 +402,7 @@ const ln = async ({
402
402
  timezone: le,
403
403
  skipStringSpaceGrouping: !!(m != null && m.batch) || vt(m),
404
404
  reportId: m == null ? void 0 : m.id,
405
- queryDatasource: en(m)
405
+ queryDatasource: nn(m)
406
406
  },
407
407
  requestConfig: {
408
408
  timeout: 1e3 * 60 * 5,
@@ -411,8 +411,8 @@ const ln = async ({
411
411
  // A query is a read: a 502/503/504 from the gateway is safe to re-send.
412
412
  retry: 2
413
413
  };
414
- return await Xt([() => Ae.fetch(R)], 2e3);
415
- }, Bn = async ({
414
+ return await el([() => Ae.fetch(R)], 2e3);
415
+ }, Wn = async ({
416
416
  widget: l,
417
417
  signal: n,
418
418
  tileId: s,
@@ -420,41 +420,41 @@ const ln = async ({
420
420
  scopedCompareDateRange: d
421
421
  }) => {
422
422
  var ne, C, _, K;
423
- const { businessId: p } = re(Oe()), { currentReport: f, editingReport: g, overviewReport: v } = Pe(), { selectedNavigationTab: u, isEditorRoute: w } = qe(), O = wt({
424
- selectedNavigationTab: u,
423
+ const { businessId: p } = re(ke()), { currentReport: f, editingReport: g, overviewReport: v } = Pe(), { selectedNavigationTab: i, isEditorRoute: w } = qe(), k = wt({
424
+ selectedNavigationTab: i,
425
425
  isEditorRoute: w,
426
426
  overviewReport: v,
427
427
  editingReport: g,
428
428
  currentReport: f
429
- }), te = Ke(u), { restaurants: A, warehouses: S, dateRange: i, compareDateRange: m, timeRange: h, timezone: N } = Me(), { globalFilters: I } = Ge();
430
- if (A.length === 0 && S.length === 0)
429
+ }), te = Ke(i), { restaurants: x, warehouses: S, dateRange: u, compareDateRange: m, timeRange: h, timezone: N } = Me(), { globalFilters: I } = Ge();
430
+ if (x.length === 0 && S.length === 0)
431
431
  return { totalBytesProcessed: 0 };
432
- const k = r ?? i, L = d ?? m;
432
+ const O = r ?? u, L = d ?? m;
433
433
  if (!Qe({
434
- report: O,
434
+ report: k,
435
435
  pageSubject: te,
436
- dateRange: k,
436
+ dateRange: O,
437
437
  compareDateRange: L,
438
438
  timezone: N
439
439
  }))
440
440
  return { totalBytesProcessed: 0 };
441
- const U = A.map((Y) => Y.id), q = S.map((Y) => Y.id), le = je(l, I, s ?? ""), X = {
442
- fetchType: ke.Post,
441
+ const W = x.map((Y) => Y.id), q = S.map((Y) => Y.id), le = je(l, I, s ?? ""), X = {
442
+ fetchType: Oe.Post,
443
443
  url: `/${p.value}/v2/query/dry-run`,
444
444
  data: {
445
445
  widget: le,
446
- dateRange: [k.startDate, k.endDate],
446
+ dateRange: [O.startDate, O.endDate],
447
447
  compareDateRange: L.startDate && L.endDate ? [L.startDate, L.endDate] : void 0,
448
448
  timeRange: [
449
- $().tz(N).hour(Number((ne = h.start) == null ? void 0 : ne.hour)).minute(Number((C = h.start) == null ? void 0 : C.minute)).toISOString(),
450
- $().tz(N).hour(Number((_ = h.end) == null ? void 0 : _.hour)).minute(Number((K = h.end) == null ? void 0 : K.minute)).endOf("minutes").toISOString()
449
+ E().tz(N).hour(Number((ne = h.start) == null ? void 0 : ne.hour)).minute(Number((C = h.start) == null ? void 0 : C.minute)).toISOString(),
450
+ E().tz(N).hour(Number((_ = h.end) == null ? void 0 : _.hour)).minute(Number((K = h.end) == null ? void 0 : K.minute)).endOf("minutes").toISOString()
451
451
  ],
452
452
  businessIds: p.value ? [p.value] : [],
453
- restaurantIds: U,
453
+ restaurantIds: W,
454
454
  warehouseIds: q,
455
455
  timezone: N,
456
456
  skipStringSpaceGrouping: !1,
457
- reportId: O == null ? void 0 : O.id,
457
+ reportId: k == null ? void 0 : k.id,
458
458
  queryDatasource: tt.BigQuery
459
459
  },
460
460
  requestConfig: {
@@ -463,7 +463,7 @@ const ln = async ({
463
463
  }
464
464
  };
465
465
  return Ae.fetch(X);
466
- }, nn = async ({
466
+ }, rn = async ({
467
467
  widget: l,
468
468
  signal: n,
469
469
  tileId: s,
@@ -473,18 +473,18 @@ const ln = async ({
473
473
  scopedGlobalFilters: f,
474
474
  page: g,
475
475
  pageRead: v,
476
- search: u
476
+ search: i
477
477
  }) => {
478
478
  var ye, ce, ie, se;
479
- const { businessId: w, country: O } = re(Oe()), { currentReport: te, editingReport: A, overviewReport: S } = Pe(), { selectedNavigationTab: i, isEditorRoute: m } = qe(), h = wt({
480
- selectedNavigationTab: i,
479
+ const { businessId: w, country: k } = re(ke()), { currentReport: te, editingReport: x, overviewReport: S } = Pe(), { selectedNavigationTab: u, isEditorRoute: m } = qe(), h = wt({
480
+ selectedNavigationTab: u,
481
481
  isEditorRoute: m,
482
482
  overviewReport: S,
483
- editingReport: A,
483
+ editingReport: x,
484
484
  currentReport: te
485
- }), N = Ke(i);
485
+ }), N = Ke(u);
486
486
  if (vt(h))
487
- return ln({
487
+ return sn({
488
488
  widget: l,
489
489
  signal: n,
490
490
  tileId: s,
@@ -494,13 +494,13 @@ const ln = async ({
494
494
  scopedGlobalFilters: f,
495
495
  page: g,
496
496
  pageRead: v,
497
- search: u
497
+ search: i
498
498
  });
499
499
  const {
500
500
  selectedRestaurantIds: I,
501
- selectedWarehouseIds: k,
501
+ selectedWarehouseIds: O,
502
502
  selectedLocationIds: L,
503
- dateRange: U,
503
+ dateRange: W,
504
504
  compareDateRange: q,
505
505
  timeRange: le,
506
506
  timezone: X,
@@ -509,7 +509,7 @@ const ln = async ({
509
509
  } = Me(), { globalFilters: _ } = Ge();
510
510
  if (L.length === 0)
511
511
  return null;
512
- const K = p ?? U, Y = d ?? le, H = f ?? _;
512
+ const K = p ?? W, Y = d ?? le, H = f ?? _;
513
513
  if (!Qe({
514
514
  report: h,
515
515
  pageSubject: N,
@@ -518,16 +518,16 @@ const ln = async ({
518
518
  timezone: X
519
519
  }))
520
520
  return null;
521
- const ae = (r == null ? void 0 : r.filter((Z) => ne.some((De) => De.id === Z))) ?? I, z = (r == null ? void 0 : r.filter((Z) => C.some((De) => De.id === Z))) ?? k, R = je(l, H, s ?? ""), oe = {
522
- fetchType: ke.Post,
521
+ const ae = (r == null ? void 0 : r.filter((Z) => ne.some((De) => De.id === Z))) ?? I, z = (r == null ? void 0 : r.filter((Z) => C.some((De) => De.id === Z))) ?? O, R = je(l, H, s ?? ""), oe = {
522
+ fetchType: Oe.Post,
523
523
  url: `/${w.value}/postgres-query`,
524
524
  data: St.getQueryRequests({
525
525
  widget: R,
526
526
  dateRange: [K.startDate, K.endDate],
527
527
  compareDateRange: q.startDate && q.endDate ? [q.startDate, q.endDate] : void 0,
528
528
  timeRange: [
529
- $().tz(X).hour(Number((ye = Y.start) == null ? void 0 : ye.hour)).minute(Number((ce = Y.start) == null ? void 0 : ce.minute)).toISOString(),
530
- $().tz(X).hour(Number((ie = Y.end) == null ? void 0 : ie.hour)).minute(Number((se = Y.end) == null ? void 0 : se.minute)).endOf("minutes").toISOString()
529
+ E().tz(X).hour(Number((ye = Y.start) == null ? void 0 : ye.hour)).minute(Number((ce = Y.start) == null ? void 0 : ce.minute)).toISOString(),
530
+ E().tz(X).hour(Number((ie = Y.end) == null ? void 0 : ie.hour)).minute(Number((se = Y.end) == null ? void 0 : se.minute)).endOf("minutes").toISOString()
531
531
  ],
532
532
  businessIds: w.value ? [w.value] : [],
533
533
  restaurantIds: ae,
@@ -548,14 +548,14 @@ const ln = async ({
548
548
  }
549
549
  }, me = [() => Ae.fetch(oe)];
550
550
  I.length < 50 && me.push(() => Ae.fetch(oe)), me.push(() => Ae.fetch(oe));
551
- const ge = await Xt(me, 2e3);
552
- return (await ql(Wl, {
551
+ const ge = await el(me, 2e3);
552
+ return (await Kl(jl, {
553
553
  responses: ge,
554
554
  widget: JSON.parse(JSON.stringify(l)),
555
- country: O.value,
555
+ country: k.value,
556
556
  timezone: X
557
557
  })).data;
558
- }, zn = async ({
558
+ }, qn = async ({
559
559
  fileType: l,
560
560
  index: n,
561
561
  orientationTypes: s,
@@ -565,20 +565,20 @@ const ln = async ({
565
565
  dateRange: f,
566
566
  globalFilters: g
567
567
  }) => {
568
- const { businessId: v } = re(Oe()), u = Me(), { compareDateRange: w } = re(u), { restaurants: O, warehouses: te, timezone: A } = u, { globalFilters: S } = Ge(), { currentReport: i, overviewReport: m } = Pe(), { selectedNavigationTab: h } = qe(), { getTileSorts: N } = Yt(), { getTileSearch: I } = Kl();
569
- let k = i == null ? void 0 : i.id, L = Ue(i == null ? void 0 : i.tiles);
570
- h === "overview" && m && (k = m == null ? void 0 : m.id, L = Ue(m == null ? void 0 : m.tiles));
571
- const U = h === "overview" && m ? m : i, q = Ke(h);
568
+ const { businessId: v } = re(ke()), i = Me(), { compareDateRange: w } = re(i), { restaurants: k, warehouses: te, timezone: x } = i, { globalFilters: S } = Ge(), { currentReport: u, overviewReport: m } = Pe(), { selectedNavigationTab: h } = qe(), { getTileSorts: N } = Ht(), { getTileSearch: I } = Hl();
569
+ let O = u == null ? void 0 : u.id, L = We(u == null ? void 0 : u.tiles);
570
+ h === "overview" && m && (O = m == null ? void 0 : m.id, L = We(m == null ? void 0 : m.tiles));
571
+ const W = h === "overview" && m ? m : u, q = Ke(h);
572
572
  if (!Qe({
573
- report: U,
573
+ report: W,
574
574
  pageSubject: q,
575
575
  dateRange: f,
576
576
  compareDateRange: w.value,
577
- timezone: A
577
+ timezone: x
578
578
  }))
579
579
  return;
580
580
  const le = g ?? S, X = L.filter((ae, z) => typeof n == "number" ? z === n : !0).map((ae) => je(ae.widget, le, ae.id)), ne = {
581
- fetchType: ke.Post,
581
+ fetchType: Oe.Post,
582
582
  url: `/${v.value}/file?lang=${xe()}`,
583
583
  data: {
584
584
  configs: [
@@ -589,29 +589,29 @@ const ln = async ({
589
589
  dateRange: [f.startDate, f.endDate],
590
590
  compareDateRange: w.value.startDate && w.value.endDate ? [w.value.startDate, w.value.endDate] : void 0,
591
591
  timeRange: [
592
- $().tz(A).set("hour", Number((me = p.start) == null ? void 0 : me.hour)).set("minute", Number((ge = p.start) == null ? void 0 : ge.minute)).toISOString(),
593
- $().tz(A).set("hour", Number((ye = p.end) == null ? void 0 : ye.hour)).set("minute", Number((ce = p.end) == null ? void 0 : ce.minute)).toISOString()
592
+ E().tz(x).set("hour", Number((me = p.start) == null ? void 0 : me.hour)).set("minute", Number((ge = p.start) == null ? void 0 : ge.minute)).toISOString(),
593
+ E().tz(x).set("hour", Number((ye = p.end) == null ? void 0 : ye.hour)).set("minute", Number((ce = p.end) == null ? void 0 : ce.minute)).toISOString()
594
594
  ],
595
595
  businessIds: v ? [v.value] : [],
596
596
  restaurantIds: d.filter(
597
- (ie) => O.find((se) => se.id === ie)
597
+ (ie) => k.find((se) => se.id === ie)
598
598
  ),
599
599
  warehouseIds: d.filter(
600
600
  (ie) => te.find((se) => se.id === ie)
601
601
  ),
602
- timezone: A
602
+ timezone: x
603
603
  });
604
604
  return {
605
605
  // Every request, like the query API's search; the file service filters it in memory.
606
606
  requests: R ? oe.map((ie) => ({ ...ie, search: R })) : oe,
607
607
  index: n || z,
608
608
  drillDimension: null,
609
- ...Zt(ae),
609
+ ...Xt(ae),
610
610
  globalSorts: N(n ?? z)
611
611
  };
612
612
  })
613
613
  ],
614
- reportId: k,
614
+ reportId: O,
615
615
  type: l,
616
616
  orientationTypes: s,
617
617
  isCombinedLocationLayout: r
@@ -622,7 +622,7 @@ const ln = async ({
622
622
  }
623
623
  }, { headers: C, data: _ } = await gt.rawFetch(ne), K = C["content-disposition"].split("filename=")[1].replaceAll('"', ""), Y = window.URL.createObjectURL(new Blob([new Uint8Array(_).buffer])), H = document.createElement("a");
624
624
  H.href = Y, H.setAttribute("download", decodeURIComponent(K)), document.body.appendChild(H), H.click(), H.remove();
625
- }, Wn = async ({
625
+ }, jn = async ({
626
626
  emails: l,
627
627
  types: n,
628
628
  dateRange: s,
@@ -633,14 +633,14 @@ const ln = async ({
633
633
  attachFiles: g,
634
634
  globalFilters: v
635
635
  }) => {
636
- const { businessId: u } = re(Oe()), { currentReport: w, overviewReport: O } = Pe(), { selectedNavigationTab: te } = qe(), A = Me(), { compareDateRange: S } = re(A), { restaurants: i, warehouses: m, timezone: h } = A, { globalFilters: N } = Ge(), { getTileSorts: I } = Yt();
636
+ const { businessId: i } = re(ke()), { currentReport: w, overviewReport: k } = Pe(), { selectedNavigationTab: te } = qe(), x = Me(), { compareDateRange: S } = re(x), { restaurants: u, warehouses: m, timezone: h } = x, { globalFilters: N } = Ge(), { getTileSorts: I } = Ht();
637
637
  if (l.length === 0) {
638
638
  console.error("No email addresses provided.");
639
639
  return;
640
640
  }
641
- let k = (w == null ? void 0 : w.id) || "", L = (w == null ? void 0 : w.name) || "", U = Ue(w == null ? void 0 : w.tiles);
642
- te === "overview" && O && (k = O == null ? void 0 : O.id, L = O.name, U = Ue(O == null ? void 0 : O.tiles));
643
- const q = te === "overview" && O ? O : w, le = Ke(te);
641
+ let O = (w == null ? void 0 : w.id) || "", L = (w == null ? void 0 : w.name) || "", W = We(w == null ? void 0 : w.tiles);
642
+ te === "overview" && k && (O = k == null ? void 0 : k.id, L = k.name, W = We(k == null ? void 0 : k.tiles));
643
+ const q = te === "overview" && k ? k : w, le = Ke(te);
644
644
  if (!Qe({
645
645
  report: q,
646
646
  pageSubject: le,
@@ -649,9 +649,9 @@ const ln = async ({
649
649
  timezone: h
650
650
  }))
651
651
  return;
652
- const X = v ?? N, ne = U.map((_) => je(_.widget, X, _.id)), C = {
653
- businessId: u.value,
654
- status: Jt.generating,
652
+ const X = v ?? N, ne = W.map((_) => je(_.widget, X, _.id)), C = {
653
+ businessId: i.value,
654
+ status: Yt.generating,
655
655
  dateRange: {
656
656
  start: s.startDate,
657
657
  end: s.endDate
@@ -666,12 +666,12 @@ const ln = async ({
666
666
  dateRange: [s.startDate, s.endDate],
667
667
  compareDateRange: S.value.startDate && S.value.endDate ? [S.value.startDate, S.value.endDate] : void 0,
668
668
  timeRange: [
669
- $().tz(h).hour(Number((Y = r.start) == null ? void 0 : Y.hour)).minute(Number((H = r.start) == null ? void 0 : H.minute)).toISOString(),
670
- $().tz(h).hour(Number((ae = r.end) == null ? void 0 : ae.hour)).minute(Number((z = r.end) == null ? void 0 : z.minute)).endOf("minutes").toISOString()
669
+ E().tz(h).hour(Number((Y = r.start) == null ? void 0 : Y.hour)).minute(Number((H = r.start) == null ? void 0 : H.minute)).toISOString(),
670
+ E().tz(h).hour(Number((ae = r.end) == null ? void 0 : ae.hour)).minute(Number((z = r.end) == null ? void 0 : z.minute)).endOf("minutes").toISOString()
671
671
  ],
672
- businessIds: u ? [u.value] : [],
672
+ businessIds: i ? [i.value] : [],
673
673
  restaurantIds: d.filter(
674
- (R) => i.find((oe) => oe.id === R)
674
+ (R) => u.find((oe) => oe.id === R)
675
675
  ),
676
676
  warehouseIds: d.filter(
677
677
  (R) => m.find((oe) => oe.id === R)
@@ -680,44 +680,44 @@ const ln = async ({
680
680
  }),
681
681
  index: K,
682
682
  drillDimension: null,
683
- ...Zt(_),
683
+ ...Xt(_),
684
684
  globalSorts: I(K)
685
685
  };
686
686
  }),
687
- reportId: k,
687
+ reportId: O,
688
688
  type: n,
689
689
  orientationTypes: p,
690
690
  isCombinedLocationLayout: f,
691
691
  attachFiles: g
692
692
  };
693
693
  await gt.fetch({
694
- fetchType: ke.Post,
695
- url: `/${u.value}/reports/email?lang=${xe()}`,
694
+ fetchType: Oe.Post,
695
+ url: `/${i.value}/reports/email?lang=${xe()}`,
696
696
  data: C,
697
697
  requestConfig: { timeout: 1e3 * 60 * 3 }
698
698
  });
699
- }, Un = async (l) => {
700
- const { businessId: n } = re(Oe());
699
+ }, Qn = async (l) => {
700
+ const { businessId: n } = re(ke());
701
701
  await gt.fetch({
702
- fetchType: ke.Post,
702
+ fetchType: Oe.Post,
703
703
  url: `/${n.value}/reports/resend-email?lang=${xe()}`,
704
704
  data: { jobId: l },
705
705
  requestConfig: { timeout: 1e3 * 60 * 3 }
706
706
  });
707
- }, qn = async () => {
708
- const { businessId: l } = re(Oe());
707
+ }, Kn = async () => {
708
+ const { businessId: l } = re(ke());
709
709
  return await Ae.fetch({
710
- fetchType: ke.Get,
710
+ fetchType: Oe.Get,
711
711
  url: `/${l.value}/reports/email-recipients`
712
712
  });
713
- }, jn = async (l) => {
714
- const { businessId: n } = re(Oe());
713
+ }, Jn = async (l) => {
714
+ const { businessId: n } = re(ke());
715
715
  await Ae.fetch({
716
- fetchType: ke.Post,
716
+ fetchType: Oe.Post,
717
717
  url: `/${n.value}/reports/email-recipient/delete`,
718
718
  data: { email: l }
719
719
  });
720
- }, an = "mf-reportwidget-result-store", sn = Ft(an, () => {
720
+ }, on = "mf-reportwidget-result-store", un = Ft(on, () => {
721
721
  const l = ve({}), n = ve(0), s = Se(() => n.value === 0);
722
722
  function r() {
723
723
  n.value += 1;
@@ -725,13 +725,13 @@ const ln = async ({
725
725
  function d() {
726
726
  n.value = Math.max(0, n.value - 1);
727
727
  }
728
- function p(v, u) {
728
+ function p(v, i) {
729
729
  if (v)
730
- if (u === null)
730
+ if (i === null)
731
731
  l.value[v] = [];
732
732
  else {
733
733
  const w = l.value[v] ?? [];
734
- l.value[v] = Array.from(/* @__PURE__ */ new Set([...w, ...u]));
734
+ l.value[v] = Array.from(/* @__PURE__ */ new Set([...w, ...i]));
735
735
  }
736
736
  }
737
737
  function f(v) {
@@ -750,14 +750,14 @@ const ln = async ({
750
750
  getWidgetResult: f,
751
751
  clearAllWidgetResults: g
752
752
  };
753
- }), Wt = (l, n = "en") => $().set("hour", l.hour).set("minute", l.minute).locale(n).format("h:mm A"), rn = (l, n) => {
754
- const s = $().set("hour", l.hour).set("minute", l.minute);
755
- return $().set("hour", n.hour).set("minute", n.minute) < s ? "+1" : "";
753
+ }), Wt = (l, n = "en") => E().set("hour", l.hour).set("minute", l.minute).locale(n).format("h:mm A"), cn = (l, n) => {
754
+ const s = E().set("hour", l.hour).set("minute", l.minute);
755
+ return E().set("hour", n.hour).set("minute", n.minute) < s ? "+1" : "";
756
756
  };
757
- function Ut(l, n) {
757
+ function qt(l, n) {
758
758
  return l.isSystem ? n("reportV5.reportHour.fullDay") : l.name;
759
759
  }
760
- const on = { class: "px-24 py-16 rounded-lg shadow-light-300" }, un = { class: "text-fm-color-typo-primary" }, cn = { class: "text-fm-color-typo-secondary" }, dn = { class: "fm-typo-en-body-lg-600 mb-8" }, mn = { class: "flex items-center justify-center w-full" }, pn = { class: "fm-typo-en-body-lg-600 mb-8" }, fn = { class: "flex items-center justify-center" }, bn = { class: "flex flex-row mb-4 px-4 gap-2" }, hn = /* @__PURE__ */ yt({
760
+ const dn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, mn = { class: "text-fm-color-typo-primary" }, pn = { class: "text-fm-color-typo-secondary" }, fn = { class: "fm-typo-en-body-lg-600 mb-8" }, bn = { class: "flex items-center justify-center w-full" }, hn = { class: "fm-typo-en-body-lg-600 mb-8" }, vn = { class: "flex items-center justify-center" }, yn = { class: "flex flex-row mb-4 px-4 gap-2" }, Sn = /* @__PURE__ */ yt({
761
761
  __name: "TimeRangeSelect",
762
762
  props: /* @__PURE__ */ lt({
763
763
  defaultDateRange: {
@@ -799,30 +799,30 @@ const on = { class: "px-24 py-16 rounded-lg shadow-light-300" }, un = { class: "
799
799
  }),
800
800
  emits: /* @__PURE__ */ lt(["update", "chip-closed"], ["update:timeRange", "update:selectTimeDefault"]),
801
801
  setup(l, { emit: n }) {
802
- const { t: s, locale: r } = Kt(), d = ft(l, "timeRange"), p = n, f = ft(l, "selectTimeDefault");
802
+ const { t: s, locale: r } = Jt(), d = ft(l, "timeRange"), p = n, f = ft(l, "selectTimeDefault");
803
803
  function g(S) {
804
- S && (d.value = S, p("update", d.value)), O.value = !1;
804
+ S && (d.value = S, p("update", d.value)), k.value = !1;
805
805
  }
806
806
  function v(S) {
807
- const i = S.split(":"), m = $().set("hour", Number(i[0])).set("minute", Number(i[1]));
807
+ const u = S.split(":"), m = E().set("hour", Number(u[0])).set("minute", Number(u[1]));
808
808
  return {
809
809
  hours: Number(m.format("h")),
810
810
  minutes: Number(m.format("m")),
811
811
  period: m.format("A")
812
812
  };
813
813
  }
814
- const u = ve(JSON.parse(JSON.stringify(d.value)));
815
- function w(S, i) {
816
- u.value.start = JSON.parse(JSON.stringify(S)), u.value.end = JSON.parse(JSON.stringify(i));
814
+ const i = ve(JSON.parse(JSON.stringify(d.value)));
815
+ function w(S, u) {
816
+ i.value.start = JSON.parse(JSON.stringify(S)), i.value.end = JSON.parse(JSON.stringify(u));
817
817
  }
818
818
  Ie(
819
819
  () => [d.value, l.defaultDateRange],
820
820
  () => {
821
821
  if (d.value) {
822
822
  const S = l.defaultDateRange.findIndex(
823
- (i) => {
823
+ (u) => {
824
824
  var m, h, N, I;
825
- return i.startTime.hour === ((m = d.value.start) == null ? void 0 : m.hour) && i.startTime.minute === ((h = d.value.start) == null ? void 0 : h.minute) && i.endTime.hour === ((N = d.value.end) == null ? void 0 : N.hour) && i.endTime.minute === ((I = d.value.end) == null ? void 0 : I.minute);
825
+ return u.startTime.hour === ((m = d.value.start) == null ? void 0 : m.hour) && u.startTime.minute === ((h = d.value.start) == null ? void 0 : h.minute) && u.endTime.hour === ((N = d.value.end) == null ? void 0 : N.hour) && u.endTime.minute === ((I = d.value.end) == null ? void 0 : I.minute);
826
826
  }
827
827
  ) + 1;
828
828
  S !== 0 ? f.value = S : f.value = l.defaultDateRange.length + 1;
@@ -830,58 +830,58 @@ const on = { class: "px-24 py-16 rounded-lg shadow-light-300" }, un = { class: "
830
830
  },
831
831
  { deep: !0, immediate: !0 }
832
832
  );
833
- const O = ve(!1);
833
+ const k = ve(!1);
834
834
  function te(S) {
835
835
  p("chip-closed", S);
836
836
  }
837
- const A = Se(() => l.label ? l.label : jt({
837
+ const x = Se(() => l.label ? l.label : Qt({
838
838
  startTime: d.value.start,
839
839
  endTime: d.value.end,
840
840
  locale: r.value
841
841
  }));
842
- return (S, i) => {
843
- const m = ee("FmChip"), h = ee("FmRadio"), N = ee("FmMenuDivider"), I = ee("FmRadioGroup"), k = ee("FmTimeInput"), L = ee("FmButton"), U = ee("FmPopover");
842
+ return (S, u) => {
843
+ const m = ee("FmChip"), h = ee("FmRadio"), N = ee("FmMenuDivider"), I = ee("FmRadioGroup"), O = ee("FmTimeInput"), L = ee("FmButton"), W = ee("FmPopover");
844
844
  return J(), fe("div", null, [
845
- P(U, {
846
- "show-popover": O.value,
845
+ P(W, {
846
+ "show-popover": k.value,
847
847
  placement: "bottom",
848
- onPopoverChanged: i[6] || (i[6] = (q) => O.value = q)
848
+ onPopoverChanged: u[6] || (u[6] = (q) => k.value = q)
849
849
  }, {
850
850
  "popover-button": ue(() => [
851
- P(Qt, {
851
+ P(Kt, {
852
852
  "left-icon": l.label ? "filter_alt" : "schedule",
853
- label: A.value,
853
+ label: x.value,
854
854
  removable: l.removable,
855
- onChipClosed: i[0] || (i[0] = (q) => te(!0))
855
+ onChipClosed: u[0] || (u[0] = (q) => te(!0))
856
856
  }, null, 8, ["left-icon", "label", "removable"])
857
857
  ]),
858
858
  default: ue(() => {
859
859
  var q, le, X, ne;
860
860
  return [
861
- Q("div", on, [
861
+ Q("div", dn, [
862
862
  P(I, {
863
863
  modelValue: f.value,
864
- "onUpdate:modelValue": i[1] || (i[1] = (C) => f.value = C)
864
+ "onUpdate:modelValue": u[1] || (u[1] = (C) => f.value = C)
865
865
  }, {
866
866
  default: ue(() => [
867
867
  (J(!0), fe(Le, null, ht(l.defaultDateRange, (C, _) => (J(), we(h, {
868
868
  key: `range_${_}`,
869
869
  value: _ + 1,
870
- label: D(Ut)(C, D(s)),
870
+ label: D(qt)(C, D(s)),
871
871
  onClick: (K) => w(C.startTime, C.endTime)
872
872
  }, {
873
873
  label: ue(() => [
874
- Q("p", un, [
875
- nt(he(D(Ut)(C, D(s))) + " ", 1),
876
- $l(P(m, {
874
+ Q("p", mn, [
875
+ nt(he(D(qt)(C, D(s))) + " ", 1),
876
+ xl(P(m, {
877
877
  label: D(s)("report.common.default"),
878
878
  class: "bg-fm-color-system-info-100 border-fm-color-typo-info text-fm-color-typo-info",
879
879
  compact: ""
880
880
  }, null, 8, ["label"]), [
881
- [xl, C.isDefault]
881
+ [Al, C.isDefault]
882
882
  ])
883
883
  ]),
884
- Q("p", cn, he(D(Wt)(C.startTime, D(xe)())) + " - " + he(D(Wt)(C.endTime, D(xe)())) + " " + he(D(rn)(C.startTime, C.endTime)), 1)
884
+ Q("p", pn, he(D(Wt)(C.startTime, D(xe)())) + " - " + he(D(Wt)(C.endTime, D(xe)())) + " " + he(D(cn)(C.startTime, C.endTime)), 1)
885
885
  ]),
886
886
  _: 2
887
887
  }, 1032, ["value", "label", "onClick"]))), 128)),
@@ -895,45 +895,45 @@ const on = { class: "px-24 py-16 rounded-lg shadow-light-300" }, un = { class: "
895
895
  _: 1
896
896
  }, 8, ["modelValue"]),
897
897
  f.value === l.defaultDateRange.length + 1 ? (J(), fe(Le, { key: 0 }, [
898
- Q("p", dn, he(D(s)("report.date.startingTime")), 1),
899
- Q("div", mn, [
900
- P(k, {
901
- "model-value": v(`${(q = u.value.start) == null ? void 0 : q.hour}:${(le = u.value.start) == null ? void 0 : le.minute}`),
902
- "onUpdate:modelValue": i[2] || (i[2] = (C) => {
903
- if (u.value.start) {
904
- const _ = D($)(`${C.hours}:${C.minutes} ${C.period}`, "h:m A").locale(
898
+ Q("p", fn, he(D(s)("report.date.startingTime")), 1),
899
+ Q("div", bn, [
900
+ P(O, {
901
+ "model-value": v(`${(q = i.value.start) == null ? void 0 : q.hour}:${(le = i.value.start) == null ? void 0 : le.minute}`),
902
+ "onUpdate:modelValue": u[2] || (u[2] = (C) => {
903
+ if (i.value.start) {
904
+ const _ = D(E)(`${C.hours}:${C.minutes} ${C.period}`, "h:m A").locale(
905
905
  D(xe)()
906
906
  );
907
- u.value.start.hour = _.get("hour"), u.value.start.minute = _.get("minute");
907
+ i.value.start.hour = _.get("hour"), i.value.start.minute = _.get("minute");
908
908
  }
909
909
  })
910
910
  }, null, 8, ["model-value"])
911
911
  ]),
912
- Q("p", pn, he(D(s)("report.date.endingTime")), 1),
913
- Q("div", fn, [
914
- P(k, {
915
- "model-value": v(`${(X = u.value.end) == null ? void 0 : X.hour}:${(ne = u.value.end) == null ? void 0 : ne.minute}`),
916
- "onUpdate:modelValue": i[3] || (i[3] = (C) => {
917
- if (u.value.end) {
918
- const _ = D($)(`${C.hours}:${C.minutes} ${C.period}`, "h:m A").locale(
912
+ Q("p", hn, he(D(s)("report.date.endingTime")), 1),
913
+ Q("div", vn, [
914
+ P(O, {
915
+ "model-value": v(`${(X = i.value.end) == null ? void 0 : X.hour}:${(ne = i.value.end) == null ? void 0 : ne.minute}`),
916
+ "onUpdate:modelValue": u[3] || (u[3] = (C) => {
917
+ if (i.value.end) {
918
+ const _ = D(E)(`${C.hours}:${C.minutes} ${C.period}`, "h:m A").locale(
919
919
  D(xe)()
920
920
  );
921
- u.value.end.hour = _.get("hour"), u.value.end.minute = _.get("minute");
921
+ i.value.end.hour = _.get("hour"), i.value.end.minute = _.get("minute");
922
922
  }
923
923
  })
924
924
  }, null, 8, ["model-value"])
925
925
  ])
926
926
  ], 64)) : bt("", !0),
927
- Q("div", bn, [
928
- i[7] || (i[7] = Q("div", { class: "grow" }, null, -1)),
927
+ Q("div", yn, [
928
+ u[7] || (u[7] = Q("div", { class: "grow" }, null, -1)),
929
929
  P(L, {
930
930
  label: D(s)("report.common.cancel"),
931
931
  variant: "tertiary",
932
- onClick: i[4] || (i[4] = (C) => O.value = !1)
932
+ onClick: u[4] || (u[4] = (C) => k.value = !1)
933
933
  }, null, 8, ["label"]),
934
934
  P(L, {
935
935
  label: D(s)("report.common.apply"),
936
- onClick: i[5] || (i[5] = () => g(JSON.parse(JSON.stringify(u.value))))
936
+ onClick: u[5] || (u[5] = () => g(JSON.parse(JSON.stringify(i.value))))
937
937
  }, null, 8, ["label"])
938
938
  ])
939
939
  ])
@@ -944,7 +944,7 @@ const on = { class: "px-24 py-16 rounded-lg shadow-light-300" }, un = { class: "
944
944
  ]);
945
945
  };
946
946
  }
947
- }), Qn = /* @__PURE__ */ yt({
947
+ }), Yn = /* @__PURE__ */ yt({
948
948
  __name: "BaseDialog",
949
949
  props: /* @__PURE__ */ lt({
950
950
  title: {
@@ -972,26 +972,26 @@ const on = { class: "px-24 py-16 rounded-lg shadow-light-300" }, un = { class: "
972
972
  const g = ee("FmButton"), v = ee("FmDialog");
973
973
  return J(), we(v, {
974
974
  modelValue: s.value,
975
- "onUpdate:modelValue": f[2] || (f[2] = (u) => s.value = u),
975
+ "onUpdate:modelValue": f[2] || (f[2] = (i) => s.value = i),
976
976
  overlay: ""
977
977
  }, {
978
978
  "dialog-header": ue(() => [
979
979
  nt(he(r.title), 1)
980
980
  ]),
981
981
  default: ue(() => [
982
- qt(p.$slots, "content")
982
+ jt(p.$slots, "content")
983
983
  ]),
984
984
  "dialog-footer": ue(() => [
985
985
  f[3] || (f[3] = Q("div", { class: "grow" }, null, -1)),
986
986
  P(g, {
987
987
  label: r.secondaryButtonLabel,
988
988
  variant: "tertiary",
989
- onClick: f[0] || (f[0] = (u) => s.value = !1)
989
+ onClick: f[0] || (f[0] = (i) => s.value = !1)
990
990
  }, null, 8, ["label"]),
991
991
  P(g, {
992
992
  label: r.primaryButtonLabel,
993
993
  variant: "primary",
994
- onClick: f[1] || (f[1] = (u) => d("confirm"))
994
+ onClick: f[1] || (f[1] = (i) => d("confirm"))
995
995
  }, null, 8, ["label"])
996
996
  ]),
997
997
  _: 3
@@ -1000,22 +1000,22 @@ const on = { class: "px-24 py-16 rounded-lg shadow-light-300" }, un = { class: "
1000
1000
  }
1001
1001
  });
1002
1002
  var $e = /* @__PURE__ */ ((l) => (l.Select = "Select", l.TextField = "TextField", l.Timestamp = "Timestamp", l))($e || {});
1003
- function vn(l) {
1003
+ function gn(l) {
1004
1004
  let n = !1, s = 1;
1005
1005
  switch (l) {
1006
- case W.Equal:
1007
- case W.NotEqual:
1008
- case W.Like:
1009
- case W.NotLike:
1006
+ case U.Equal:
1007
+ case U.NotEqual:
1008
+ case U.Like:
1009
+ case U.NotLike:
1010
1010
  n = !1, s = 1;
1011
1011
  break;
1012
- case W.GreaterThan:
1013
- case W.GreaterThanOrEqual:
1014
- case W.LessThan:
1015
- case W.LessThanOrEqual:
1012
+ case U.GreaterThan:
1013
+ case U.GreaterThanOrEqual:
1014
+ case U.LessThan:
1015
+ case U.LessThanOrEqual:
1016
1016
  n = !0, s = 1;
1017
1017
  break;
1018
- case W.Between:
1018
+ case U.Between:
1019
1019
  n = !0, s = 2;
1020
1020
  break;
1021
1021
  }
@@ -1024,13 +1024,13 @@ function vn(l) {
1024
1024
  count: s
1025
1025
  };
1026
1026
  }
1027
- function Kn({
1027
+ function Hn({
1028
1028
  operator: l,
1029
1029
  dimensionOption: n,
1030
1030
  dataType: s,
1031
1031
  t: r
1032
1032
  }) {
1033
- const { fixed: d, count: p } = vn(l);
1033
+ const { fixed: d, count: p } = gn(l);
1034
1034
  switch (s) {
1035
1035
  case be.String:
1036
1036
  return {
@@ -1060,7 +1060,7 @@ function Kn({
1060
1060
  default: !0
1061
1061
  };
1062
1062
  case be.Timestamp:
1063
- return el({
1063
+ return tl({
1064
1064
  dimensionOption: n,
1065
1065
  fixed: d,
1066
1066
  count: p,
@@ -1075,7 +1075,7 @@ function Kn({
1075
1075
  default: ""
1076
1076
  };
1077
1077
  }
1078
- function Jn(l) {
1078
+ function Zn(l) {
1079
1079
  switch (l) {
1080
1080
  case B.HourOfDay:
1081
1081
  return 0;
@@ -1085,7 +1085,7 @@ function Jn(l) {
1085
1085
  return;
1086
1086
  }
1087
1087
  }
1088
- function Yn(l) {
1088
+ function Xn(l) {
1089
1089
  switch (l) {
1090
1090
  case B.HourOfDay:
1091
1091
  return 23;
@@ -1095,7 +1095,7 @@ function Yn(l) {
1095
1095
  return;
1096
1096
  }
1097
1097
  }
1098
- function el({
1098
+ function tl({
1099
1099
  dimensionOption: l,
1100
1100
  fixed: n,
1101
1101
  count: s,
@@ -1174,7 +1174,7 @@ function pt({
1174
1174
  dimensionOption: l,
1175
1175
  t: n
1176
1176
  }) {
1177
- const s = el({
1177
+ const s = tl({
1178
1178
  dimensionOption: l,
1179
1179
  fixed: !1,
1180
1180
  count: 1,
@@ -1182,10 +1182,10 @@ function pt({
1182
1182
  });
1183
1183
  return s.type !== $e.Select ? [] : [{ label: n("report.input.unknown"), value: "" }, ...s.options];
1184
1184
  }
1185
- const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-flex max-w-[460px]" }, gn = {
1185
+ const Fn = { class: "flex flex-row flex-wrap gap-2" }, wn = { class: "inline-flex max-w-[460px]" }, Dn = {
1186
1186
  key: 0,
1187
1187
  class: "flex justify-center my-2"
1188
- }, Fn = { class: "px-2 pb-8" }, wn = { class: "flex-1 overflow-y-auto overflow-x-hidden" }, Dn = { class: "px-2 pb-8" }, Tn = { class: "flex items-start w-full" }, Vn = ["onClick"], Nn = { class: "fm-typo-en-body-md-400" }, Cn = { key: 0 }, On = { class: "px-12 py-3" }, kn = { class: "flex items-center justify-between" }, _n = { class: "text-xs max-w-[200px]" }, Rn = { class: "px-4 py-3 flex flex-row justify-end gap-2 bg-white" }, Ce = "__EMPTY__", Fe = "__NO_SELECTION__", Hn = /* @__PURE__ */ yt({
1188
+ }, Tn = { class: "px-2 pb-8" }, Vn = { class: "flex-1 overflow-y-auto overflow-x-hidden" }, Nn = { class: "px-2 pb-8" }, Cn = { class: "flex items-start w-full" }, kn = ["onClick"], On = { class: "fm-typo-en-body-md-400" }, _n = { key: 0 }, Rn = { class: "px-12 py-3" }, In = { class: "flex items-center justify-between" }, $n = { class: "text-xs max-w-[200px]" }, xn = { class: "px-4 py-3 flex flex-row justify-end gap-2 bg-white" }, Ce = "__EMPTY__", Fe = "__NO_SELECTION__", ea = /* @__PURE__ */ yt({
1189
1189
  __name: "GlobalFilterSelect",
1190
1190
  props: {
1191
1191
  globalFilterId: {},
@@ -1197,20 +1197,20 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1197
1197
  isDialogGlobalFilter: { type: Boolean }
1198
1198
  },
1199
1199
  setup(l) {
1200
- const n = l, { t: s, locale: r } = Kt(), { currentReport: d, editingTile: p } = re(Pe());
1201
- let { timeRange: f, dateRange: g, selectedLocationIds: v, timezone: u } = re(Me()), { globalFilters: w } = re(Ge()), { schemas: O } = re(Pl()), {
1200
+ const n = l, { t: s, locale: r } = Jt(), { currentReport: d, editingTile: p } = re(Pe());
1201
+ let { timeRange: f, dateRange: g, selectedLocationIds: v, timezone: i } = re(Me()), { globalFilters: w } = re(Ge()), { schemas: k } = re(Ul()), {
1202
1202
  showMore: te,
1203
- getGlobalFilter: A,
1203
+ getGlobalFilter: x,
1204
1204
  setGlobalFilter: S,
1205
- setIncludeUnavailable: i,
1205
+ setIncludeUnavailable: u,
1206
1206
  getGlobalFilterKey: m,
1207
1207
  isMenuOpen: h,
1208
1208
  getGlobalFilterLabel: N,
1209
1209
  incrementAppliedTilesFiltersVersion: I
1210
1210
  } = Ge();
1211
- const k = Se(() => s("report.input.empty")), L = ["NULL", "", " "];
1212
- let U;
1213
- const q = sn(), { getWidgetResult: le } = q, { widgetResults: X, isAllWidgetResultLoaded: ne } = re(q), C = ve(!1), _ = ve(!1), K = ve(""), Y = ve({}), H = Se(() => {
1211
+ const O = Se(() => s("report.input.empty")), L = ["NULL", "", " "];
1212
+ let W;
1213
+ const q = un(), { getWidgetResult: le } = q, { widgetResults: X, isAllWidgetResultLoaded: ne } = re(q), C = ve(!1), _ = ve(!1), K = ve(""), Y = ve({}), H = Se(() => {
1214
1214
  var e;
1215
1215
  return n.globalFilterId ?? ((e = d.value) == null ? void 0 : e.id) ?? "";
1216
1216
  }), ae = Se(() => n.report ?? d.value), z = ve([]);
@@ -1224,8 +1224,8 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1224
1224
  return (e == null ? void 0 : e.startDate) === (t == null ? void 0 : t.startDate) && (e == null ? void 0 : e.endDate) === (t == null ? void 0 : t.endDate);
1225
1225
  }
1226
1226
  function ge(e, t) {
1227
- var o, a, b, T, y, G, M, x;
1228
- return ((o = e == null ? void 0 : e.start) == null ? void 0 : o.hour) === ((a = t == null ? void 0 : t.start) == null ? void 0 : a.hour) && ((b = e == null ? void 0 : e.start) == null ? void 0 : b.minute) === ((T = t == null ? void 0 : t.start) == null ? void 0 : T.minute) && ((y = e == null ? void 0 : e.end) == null ? void 0 : y.hour) === ((G = t == null ? void 0 : t.end) == null ? void 0 : G.hour) && ((M = e == null ? void 0 : e.end) == null ? void 0 : M.minute) === ((x = t == null ? void 0 : t.end) == null ? void 0 : x.minute);
1227
+ var o, a, b, T, y, A, M, $;
1228
+ return ((o = e == null ? void 0 : e.start) == null ? void 0 : o.hour) === ((a = t == null ? void 0 : t.start) == null ? void 0 : a.hour) && ((b = e == null ? void 0 : e.start) == null ? void 0 : b.minute) === ((T = t == null ? void 0 : t.start) == null ? void 0 : T.minute) && ((y = e == null ? void 0 : e.end) == null ? void 0 : y.hour) === ((A = t == null ? void 0 : t.end) == null ? void 0 : A.hour) && ((M = e == null ? void 0 : e.end) == null ? void 0 : M.minute) === (($ = t == null ? void 0 : t.end) == null ? void 0 : $.minute);
1229
1229
  }
1230
1230
  function ye(e, t) {
1231
1231
  return !e || !t ? e === t : e.length === t.length && e.every((o, a) => o === t[a]);
@@ -1254,7 +1254,7 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1254
1254
  return t ? Array.from(/* @__PURE__ */ new Set([...o, ...L])) : Array.from(new Set(o));
1255
1255
  }
1256
1256
  function Te(e) {
1257
- const t = A(
1257
+ const t = x(
1258
1258
  e.globalFilter,
1259
1259
  R(e.id)
1260
1260
  ).selectedValues;
@@ -1265,21 +1265,21 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1265
1265
  }
1266
1266
  function st(e) {
1267
1267
  const t = Je(e);
1268
- e.selectedValues = [...t], e.globalFilter.values = il(e), S(e.globalFilter, R(e.id), {
1268
+ e.selectedValues = [...t], e.globalFilter.values = ul(e), S(e.globalFilter, R(e.id), {
1269
1269
  selectedValues: t
1270
1270
  });
1271
1271
  }
1272
- function tl(e) {
1272
+ function ll(e) {
1273
1273
  e.options = [], at(e);
1274
1274
  }
1275
1275
  function Dt(e) {
1276
1276
  e.keepSelection || at(e);
1277
1277
  }
1278
- function ll(e) {
1278
+ function nl(e) {
1279
1279
  const t = Z(Te(e));
1280
1280
  Y.value[e.id] = [...t], at(e);
1281
1281
  }
1282
- function nl() {
1282
+ function al() {
1283
1283
  var a, b, T, y;
1284
1284
  const e = g.value, t = f.value, o = v.value || [];
1285
1285
  return JSON.stringify({
@@ -1302,17 +1302,17 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1302
1302
  if (t.length)
1303
1303
  return t.map((a) => String(a));
1304
1304
  const o = Z(
1305
- A(e.globalFilter, R(e.id)).selectedValues
1305
+ x(e.globalFilter, R(e.id)).selectedValues
1306
1306
  );
1307
1307
  return o.length ? o.map((a) => String(a)) : (e.globalFilter.values ?? []).map((a) => String(a));
1308
1308
  }
1309
- function al(e) {
1309
+ function sl(e) {
1310
1310
  if (Ve(e.selectedValues || []))
1311
1311
  return [Fe];
1312
1312
  const t = Z(e.selectedValues || []);
1313
1313
  if (t.length)
1314
1314
  return t;
1315
- const o = A(
1315
+ const o = x(
1316
1316
  e.globalFilter,
1317
1317
  R(e.id)
1318
1318
  ).selectedValues;
@@ -1350,8 +1350,8 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1350
1350
  const o = new Set((e.options || []).map((a) => a.value));
1351
1351
  return Z(t).filter((a) => o.has(a));
1352
1352
  }
1353
- function sl(e) {
1354
- const o = A(e.globalFilter, R(e.id)).selectedValues, a = n.isDialogGlobalFilter ? al(e) : [];
1353
+ function rl(e) {
1354
+ const o = x(e.globalFilter, R(e.id)).selectedValues, a = n.isDialogGlobalFilter ? sl(e) : [];
1355
1355
  if (Ve(e.selectedValues || []))
1356
1356
  return [Fe];
1357
1357
  if (Ve(o || []))
@@ -1367,32 +1367,32 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1367
1367
  if (y.length)
1368
1368
  return y;
1369
1369
  if (e.keepSelection) {
1370
- const G = ut(
1370
+ const A = ut(
1371
1371
  e,
1372
1372
  Te(e)
1373
1373
  );
1374
- if (G.length)
1375
- return G;
1374
+ if (A.length)
1375
+ return A;
1376
1376
  }
1377
1377
  return [];
1378
1378
  }
1379
1379
  return a.length ? [...a] : o.length ? [...o] : e.keepSelection ? Te(e) : [];
1380
1380
  }
1381
- function rl(e, t) {
1381
+ function ol(e, t) {
1382
1382
  const o = new Set(Z(t));
1383
1383
  if (!o.size) return !1;
1384
1384
  const a = (e.options || []).map((b) => b.value);
1385
1385
  return a.length ? a.every((b) => o.has(b)) : !1;
1386
1386
  }
1387
- function ol(e) {
1387
+ function il(e) {
1388
1388
  const t = e.selectedValues || [];
1389
1389
  return Ve(t) || !it(e) ? !1 : Z(t).length === 0;
1390
1390
  }
1391
- function il(e) {
1391
+ function ul(e) {
1392
1392
  const t = Je(e), o = Z(t), a = De(o), b = Ve(t);
1393
- if (ol(e))
1393
+ if (il(e))
1394
1394
  return [];
1395
- if (rl(e, t))
1395
+ if (ol(e, t))
1396
1396
  return [];
1397
1397
  if (!e.keepSelection || n.isDialogGlobalFilter)
1398
1398
  return a.length ? a : b ? [Ce] : [];
@@ -1402,8 +1402,8 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1402
1402
  (e.options || []).filter((M) => M.available !== !1).map((M) => M.value)
1403
1403
  ), y = o.filter(
1404
1404
  (M) => T.has(M)
1405
- ), G = De(y);
1406
- return G.length ? G : b ? [Ce] : [];
1405
+ ), A = De(y);
1406
+ return A.length ? A : b ? [Ce] : [];
1407
1407
  }
1408
1408
  function Ye(e) {
1409
1409
  const t = Y.value[e.id];
@@ -1411,25 +1411,25 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1411
1411
  e.selectedValues = [...t], st(e), delete Y.value[e.id];
1412
1412
  return;
1413
1413
  }
1414
- e.selectedValues = sl(e), st(e);
1414
+ e.selectedValues = rl(e), st(e);
1415
1415
  }
1416
- function ul() {
1416
+ function cl() {
1417
1417
  z.value.forEach((e) => {
1418
1418
  ce.value || Dt(e);
1419
1419
  });
1420
1420
  }
1421
- function cl() {
1422
- const e = nl();
1421
+ function dl() {
1422
+ const e = al();
1423
1423
  K.value !== e && z.value.forEach((o) => {
1424
1424
  if (o.keepSelection) {
1425
- ll(o);
1425
+ nl(o);
1426
1426
  return;
1427
1427
  }
1428
1428
  Dt(o);
1429
1429
  }), K.value = e;
1430
1430
  }
1431
1431
  const He = Se(() => n.globalFilters ?? w.value);
1432
- function dl(e) {
1432
+ function ml(e) {
1433
1433
  return {
1434
1434
  schemaName: e.schemaName,
1435
1435
  name: e.name,
@@ -1442,11 +1442,11 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1442
1442
  customTimeRanges: e.customTimeRanges ?? []
1443
1443
  };
1444
1444
  }
1445
- function ml(e) {
1446
- return e.map((t) => dl(t));
1445
+ function pl(e) {
1446
+ return e.map((t) => ml(t));
1447
1447
  }
1448
- function pl(e, t) {
1449
- const o = `${m(e, H.value)}|${t}`, a = A(e, R(o)), b = a.selectedValues.length ? [...a.selectedValues] : [...e.values ?? []];
1448
+ function fl(e, t) {
1449
+ const o = `${m(e, H.value)}|${t}`, a = x(e, R(o)), b = a.selectedValues.length ? [...a.selectedValues] : [...e.values ?? []];
1450
1450
  return {
1451
1451
  id: o,
1452
1452
  globalFilter: e,
@@ -1459,16 +1459,16 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1459
1459
  showAdvanced: a.showAdvanced
1460
1460
  };
1461
1461
  }
1462
- function fl() {
1462
+ function bl() {
1463
1463
  z.value = He.value.map(
1464
- (e, t) => pl(e, t)
1464
+ (e, t) => fl(e, t)
1465
1465
  );
1466
1466
  }
1467
- const bl = Se(
1468
- () => JSON.stringify(ml(He.value))
1469
- ), hl = Se(() => {
1467
+ const hl = Se(
1468
+ () => JSON.stringify(pl(He.value))
1469
+ ), vl = Se(() => {
1470
1470
  const e = He.value.map(
1471
- (t) => Lt(t, It())
1471
+ (t) => Mt(t, It())
1472
1472
  );
1473
1473
  return JSON.stringify(
1474
1474
  e.map((t) => ({
@@ -1480,12 +1480,12 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1480
1480
  Ie(
1481
1481
  () => ({
1482
1482
  globalFilterId: H.value,
1483
- globalFiltersConfigSignature: bl.value
1483
+ globalFiltersConfigSignature: hl.value
1484
1484
  }),
1485
1485
  (e, t) => {
1486
1486
  t && t.globalFilterId !== e.globalFilterId && z.value.forEach((o) => {
1487
1487
  o.options = [];
1488
- }), fl(), t && t.globalFiltersConfigSignature !== e.globalFiltersConfigSignature && se(), ne.value && Xe();
1488
+ }), bl(), t && t.globalFiltersConfigSignature !== e.globalFiltersConfigSignature && se(), ne.value && Xe();
1489
1489
  },
1490
1490
  { immediate: !0 }
1491
1491
  ), Ie(
@@ -1499,7 +1499,7 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1499
1499
  () => n.locationIds
1500
1500
  ],
1501
1501
  async () => {
1502
- n.isDialogGlobalFilter ? ul() : cl(), await Xe();
1502
+ n.isDialogGlobalFilter ? cl() : dl(), await Xe();
1503
1503
  },
1504
1504
  { immediate: !0 }
1505
1505
  ), Ie(
@@ -1511,24 +1511,24 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1511
1511
  },
1512
1512
  { deep: !0 }
1513
1513
  ), Ie(
1514
- () => hl.value,
1514
+ () => vl.value,
1515
1515
  async (e, t) => {
1516
1516
  e !== t && t && (n.isDialogGlobalFilter || Rt() || await Xe());
1517
1517
  }
1518
1518
  ), Ie(
1519
1519
  () => r.value,
1520
1520
  () => {
1521
- vl();
1521
+ yl();
1522
1522
  }
1523
1523
  );
1524
1524
  function Nt(e, t) {
1525
1525
  var o;
1526
- return t === !0 ? s("report.common.yes") || "Yes" : t === !1 ? s("report.common.no") || "No" : String(t).trim() === "" || t === Ce ? k.value : e.type === be.Timestamp && e.globalFilter.option !== B.DateTime && e.globalFilter.option !== B.TimeOfDay ? ((o = pt({
1526
+ return t === !0 ? s("report.common.yes") || "Yes" : t === !1 ? s("report.common.no") || "No" : String(t).trim() === "" || t === Ce ? O.value : e.type === be.Timestamp && e.globalFilter.option !== B.DateTime && e.globalFilter.option !== B.TimeOfDay ? ((o = pt({
1527
1527
  dimensionOption: e.globalFilter.option,
1528
1528
  t: s
1529
1529
  }).find((b) => String(b.value) === String(t))) == null ? void 0 : o.label) ?? String(t) : String(t);
1530
1530
  }
1531
- function vl() {
1531
+ function yl() {
1532
1532
  z.value.forEach((e) => {
1533
1533
  if (!e.options.length) return;
1534
1534
  const t = e.options.map((o) => ({
@@ -1540,49 +1540,49 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1540
1540
  }
1541
1541
  function Ct(e) {
1542
1542
  var o;
1543
- const t = (o = O.value.find((a) => a.name === e.schemaName)) == null ? void 0 : o.fields.find((a) => a.name === e.name);
1543
+ const t = (o = k.value.find((a) => a.name === e.schemaName)) == null ? void 0 : o.fields.find((a) => a.name === e.name);
1544
1544
  return t == null ? void 0 : t.type;
1545
1545
  }
1546
- function yl(e) {
1547
- var G, M;
1546
+ function Sl(e) {
1547
+ var A, M;
1548
1548
  if (!ae.value && !p.value) return [];
1549
- if (!((G = e.tileIds) != null && G.length)) return [];
1550
- const t = p.value ? [p.value] : Ue((M = ae.value) == null ? void 0 : M.tiles), { name: o = "", schemaName: a = "" } = e, b = t.filter((x) => {
1549
+ if (!((A = e.tileIds) != null && A.length)) return [];
1550
+ const t = p.value ? [p.value] : We((M = ae.value) == null ? void 0 : M.tiles), { name: o = "", schemaName: a = "" } = e, b = t.filter(($) => {
1551
1551
  var de, F;
1552
- const E = (de = x == null ? void 0 : x.widget) == null ? void 0 : de.config;
1553
- if (!E || (F = e.tileIds) != null && F.length && !e.tileIds.includes(x.id)) return !1;
1554
- const c = (E.dimensions ?? []).some(
1552
+ const G = (de = $ == null ? void 0 : $.widget) == null ? void 0 : de.config;
1553
+ if (!G || (F = e.tileIds) != null && F.length && !e.tileIds.includes($.id)) return !1;
1554
+ const c = (G.dimensions ?? []).some(
1555
1555
  (_e) => _e.schemaName === a && _e.name === o
1556
- ), j = (E.joinDatasources ?? []).some(
1556
+ ), j = (G.joinDatasources ?? []).some(
1557
1557
  (_e) => (_e.dimensions ?? []).some((ze) => ze.schemaName === a && ze.name === o)
1558
- ), V = (E.schemaNames ?? []).includes(a);
1558
+ ), V = (G.schemaNames ?? []).includes(a);
1559
1559
  return c || j || V;
1560
1560
  });
1561
1561
  if (!b.length) return [];
1562
- const T = (x, E) => {
1562
+ const T = ($, G) => {
1563
1563
  const c = /* @__PURE__ */ new Map(), j = (V) => {
1564
1564
  const de = `${V.schemaName}:${V.name}:${V.operator}:${V.option ?? ""}:${V.dataFormula ?? ""}`, F = c.get(de);
1565
- F ? [W.Like, W.NotLike].includes(V.operator) ? F.values = Array.from(/* @__PURE__ */ new Set([...F.values ?? [], ...V.values ?? []])) : c.set(de, { ...V }) : c.set(de, { ...V });
1565
+ F ? [U.Like, U.NotLike].includes(V.operator) ? F.values = Array.from(/* @__PURE__ */ new Set([...F.values ?? [], ...V.values ?? []])) : c.set(de, { ...V }) : c.set(de, { ...V });
1566
1566
  };
1567
- return x.forEach(j), E.forEach(j), Array.from(c.values());
1568
- }, y = (x) => {
1567
+ return $.forEach(j), G.forEach(j), Array.from(c.values());
1568
+ }, y = ($) => {
1569
1569
  var c;
1570
- const E = (c = x.dimensions) == null ? void 0 : c.find(
1570
+ const G = (c = $.dimensions) == null ? void 0 : c.find(
1571
1571
  (j) => j.schemaName === a && j.name === o
1572
1572
  );
1573
1573
  return {
1574
1574
  name: o,
1575
1575
  schemaName: a,
1576
- label: (E == null ? void 0 : E.label) ?? o,
1576
+ label: (G == null ? void 0 : G.label) ?? o,
1577
1577
  hide: !1,
1578
1578
  option: e.option ?? null,
1579
- dataFormula: E == null ? void 0 : E.dataFormula
1579
+ dataFormula: G == null ? void 0 : G.dataFormula
1580
1580
  };
1581
1581
  };
1582
- return b.reduce((x, E) => {
1582
+ return b.reduce(($, G) => {
1583
1583
  var ze, Gt;
1584
- const c = (ze = E == null ? void 0 : E.widget) == null ? void 0 : ze.config;
1585
- if (!c) return x;
1584
+ const c = (ze = G == null ? void 0 : G.widget) == null ? void 0 : ze.config;
1585
+ if (!c) return $;
1586
1586
  const j = y(c), V = (c.dimensions ?? []).some((Ne) => Ne.schemaName === a) || (c.schemaNames ?? []).includes(a), de = T(
1587
1587
  c.filters ?? [],
1588
1588
  (e.filters ?? []).filter((Ne) => {
@@ -1598,15 +1598,15 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1598
1598
  return (Re = F == null ? void 0 : F.schemaNames) == null ? void 0 : Re.includes(Ne.schemaName);
1599
1599
  })
1600
1600
  );
1601
- return x.push({
1602
- type: Mt.Table,
1601
+ return $.push({
1602
+ type: Pt.Table,
1603
1603
  title: "Global Filter",
1604
1604
  config: {
1605
1605
  schemaNames: c.schemaNames,
1606
1606
  schemas: c.schemas,
1607
1607
  dimensions: V ? [j] : [],
1608
1608
  filters: de,
1609
- sorts: V ? [{ name: o, schemaName: a, type: Pt.Asc, aggregation: null, dimensionOption: null }] : [],
1609
+ sorts: V ? [{ name: o, schemaName: a, type: Bt.Asc, aggregation: null, dimensionOption: null }] : [],
1610
1610
  joinDatasources: !V && F ? [
1611
1611
  {
1612
1612
  ...F,
@@ -1615,7 +1615,7 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1615
1615
  {
1616
1616
  name: o,
1617
1617
  schemaName: a,
1618
- type: Pt.Asc,
1618
+ type: Bt.Asc,
1619
1619
  aggregation: null,
1620
1620
  dimensionOption: null
1621
1621
  }
@@ -1637,17 +1637,17 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1637
1637
  colWidths: null,
1638
1638
  isBlend: !1
1639
1639
  }
1640
- }), x;
1640
+ }), $;
1641
1641
  }, []);
1642
1642
  }
1643
- function Ot(e) {
1643
+ function kt(e) {
1644
1644
  const t = new Set(Ee(e));
1645
1645
  return e.options.every((o) => t.has(o.value));
1646
1646
  }
1647
- function Sl(e) {
1648
- Ot(e) ? e.selectedValues = [Fe] : e.selectedValues = [];
1647
+ function gl(e) {
1648
+ kt(e) ? e.selectedValues = [Fe] : e.selectedValues = [];
1649
1649
  }
1650
- function kt(e, t) {
1650
+ function Ot(e, t) {
1651
1651
  return Ee(e).includes(t);
1652
1652
  }
1653
1653
  const _t = Se(
@@ -1658,10 +1658,10 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1658
1658
  ).slice(0, e.visibleCount);
1659
1659
  })
1660
1660
  );
1661
- function gl(e) {
1661
+ function Fl(e) {
1662
1662
  e.visibleCount += 50, te(e.globalFilter, R(e.id), 50);
1663
1663
  }
1664
- function Fl(e, t) {
1664
+ function wl(e, t) {
1665
1665
  S(e.globalFilter, R(e.id), { search: t });
1666
1666
  }
1667
1667
  function Be(e) {
@@ -1682,7 +1682,7 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1682
1682
  function Ze(e) {
1683
1683
  return String(e ?? "").trim() === "" ? Ce : String(e);
1684
1684
  }
1685
- function wl(e) {
1685
+ function Dl(e) {
1686
1686
  var t, o;
1687
1687
  return (((t = e.customTimeRanges) == null ? void 0 : t.length) ?? 0) > 0 ? e.customTimeRanges.map((a) => ({
1688
1688
  label: Ze(a.name),
@@ -1694,7 +1694,7 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1694
1694
  available: !0
1695
1695
  })) : [];
1696
1696
  }
1697
- function Dl(e) {
1697
+ function Tl(e) {
1698
1698
  const t = Z(e.selectedValues || []);
1699
1699
  if (!t.length) return;
1700
1700
  const o = new Set(e.options.map((b) => b.value)), a = t.filter((b) => !o.has(b)).map((b) => ({
@@ -1707,9 +1707,9 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1707
1707
  e.options = Vt(e) ? rt(b) : b;
1708
1708
  }
1709
1709
  }
1710
- function Tl(e) {
1710
+ function Vl(e) {
1711
1711
  if (e.keepSelection) {
1712
- Dl(e);
1712
+ Tl(e);
1713
1713
  const o = Te(e);
1714
1714
  e.selectedValues = o.length ? [...o] : [...e.selectedValues || []];
1715
1715
  } else {
@@ -1725,21 +1725,21 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1725
1725
  selectedValues: t
1726
1726
  });
1727
1727
  }
1728
- async function Vl(e, t) {
1728
+ async function Nl(e, t) {
1729
1729
  var o;
1730
1730
  if (e.options = [], !((o = e.globalFilter.tileIds) != null && o.length)) {
1731
- tl(e);
1731
+ ll(e);
1732
1732
  return;
1733
1733
  }
1734
1734
  if (!(!e.type && (e.type = Ct(e.globalFilter), !e.type))) {
1735
1735
  if (Be(e.globalFilter)) {
1736
- e.options = wl(e.globalFilter), Ye(e);
1736
+ e.options = Dl(e.globalFilter), Ye(e);
1737
1737
  return;
1738
1738
  }
1739
1739
  switch (e.type) {
1740
1740
  case be.String:
1741
1741
  try {
1742
- const a = yl(e.globalFilter);
1742
+ const a = Sl(e.globalFilter);
1743
1743
  if (!a.length) {
1744
1744
  e.options = [];
1745
1745
  return;
@@ -1748,7 +1748,7 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1748
1748
  for (const c of a) {
1749
1749
  if (t.aborted) return;
1750
1750
  if (b) {
1751
- const V = await nn({
1751
+ const V = await rn({
1752
1752
  widget: c,
1753
1753
  signal: t,
1754
1754
  scopedLocationIds: n.locationIds,
@@ -1756,22 +1756,22 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1756
1756
  scopedDateRange: n.dateRange,
1757
1757
  scopedGlobalFilters: n.globalFilters
1758
1758
  });
1759
- (V == null ? void 0 : V.type) === Mt.Table && T.push(...V.rows.map((de) => {
1759
+ (V == null ? void 0 : V.type) === Pt.Table && T.push(...V.rows.map((de) => {
1760
1760
  var F;
1761
1761
  return ((F = de.cells) == null ? void 0 : F[0]) ?? " ";
1762
1762
  }));
1763
1763
  continue;
1764
1764
  }
1765
1765
  const j = le(
1766
- Lt(e.globalFilter, It())
1766
+ Mt(e.globalFilter, It())
1767
1767
  );
1768
1768
  T.push(...j);
1769
1769
  }
1770
- const y = Array.from(new Set(T)), G = Te(e), M = e.keepSelection ? Array.from(/* @__PURE__ */ new Set([...y, ...G])) : y, x = new Set(T), E = new Set(y);
1770
+ const y = Array.from(new Set(T)), A = Te(e), M = e.keepSelection ? Array.from(/* @__PURE__ */ new Set([...y, ...A])) : y, $ = new Set(T), G = new Set(y);
1771
1771
  e.options = rt(
1772
- Bl(M, {
1773
- unknownLabel: k.value,
1774
- getAvailable: (c) => e.keepSelection ? x.has(c) : E.has(c)
1772
+ Wl(M, {
1773
+ unknownLabel: O.value,
1774
+ getAvailable: (c) => e.keepSelection ? $.has(c) : G.has(c)
1775
1775
  })
1776
1776
  ), Ye(e);
1777
1777
  } catch (a) {
@@ -1801,27 +1801,27 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1801
1801
  }
1802
1802
  async function Xe() {
1803
1803
  if (!H.value || !z.value.length) return;
1804
- U && U.abort();
1804
+ W && W.abort();
1805
1805
  const e = new AbortController();
1806
- U = e, C.value = !0, n.isDialogGlobalFilter && (_.value = !0);
1806
+ W = e, C.value = !0, n.isDialogGlobalFilter && (_.value = !0);
1807
1807
  try {
1808
1808
  await Promise.all(
1809
1809
  z.value.map(
1810
- (t) => Vl(t, e.signal)
1810
+ (t) => Nl(t, e.signal)
1811
1811
  )
1812
1812
  );
1813
1813
  } finally {
1814
- U === e && (C.value = !1), n.isDialogGlobalFilter && U === e && (_.value = !1);
1814
+ W === e && (C.value = !1), n.isDialogGlobalFilter && W === e && (_.value = !1);
1815
1815
  }
1816
1816
  }
1817
1817
  function $t(e, t) {
1818
1818
  const o = ot(e), a = Ee(e);
1819
1819
  if (a.includes(t)) {
1820
- const y = a.filter((G) => G !== t);
1820
+ const y = a.filter((A) => A !== t);
1821
1821
  e.selectedValues = y.length > 0 ? y : [Fe];
1822
1822
  } else {
1823
- const y = [...a, t], G = o.length > 0 && o.every((M) => y.includes(M));
1824
- e.selectedValues = G ? [] : y;
1823
+ const y = [...a, t], A = o.length > 0 && o.every((M) => y.includes(M));
1824
+ e.selectedValues = A ? [] : y;
1825
1825
  }
1826
1826
  const T = Je(e);
1827
1827
  e.selectedValues = [...T], S(e.globalFilter, R(e.id), {
@@ -1830,37 +1830,37 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1830
1830
  }
1831
1831
  function xt(e, t) {
1832
1832
  const o = e.globalFilter, a = t ? [
1833
- $(t.startDate).tz(u.value).startOf("day").utc().toISOString(),
1834
- $(t.endDate).tz(u.value).endOf("day").utc().toISOString()
1833
+ Bl(Lt(t.startDate, i.value), i.value),
1834
+ zl(Lt(t.endDate, i.value), i.value)
1835
1835
  ] : [];
1836
1836
  t === null ? o.values = [] : o.values = a, e.selectedValues = [...a], e.keepSelection = t !== null, S(e.globalFilter, R(e.id), {
1837
1837
  keepSelection: e.keepSelection,
1838
1838
  selectedValues: [...a]
1839
1839
  }), se(e.globalFilter);
1840
1840
  }
1841
- function Nl(e) {
1841
+ function Cl(e) {
1842
1842
  const t = Ee(e);
1843
1843
  return `${s("report.section.filter.selectAll")} (${t.length}/${e.options.length})`;
1844
1844
  }
1845
- function Cl() {
1845
+ function kl() {
1846
1846
  return s("report.section.filter.search");
1847
1847
  }
1848
1848
  function et(e) {
1849
1849
  const t = N(e.globalFilter), o = e.options.length > 0 ? "(0 selected)" : "";
1850
1850
  if (e.type === be.Timestamp && !Be(e.globalFilter)) {
1851
- const y = pe(e), G = y.length === 2;
1851
+ const y = pe(e), A = y.length === 2;
1852
1852
  if (e.globalFilter.option === B.DateTime)
1853
- return { preview: G ? `${t} is between ${El({
1853
+ return { preview: A ? `${t} is between ${Ll({
1854
1854
  startDate: y[0] || null,
1855
1855
  endDate: y[1] || null,
1856
1856
  locale: r.value,
1857
- timezone: u.value
1857
+ timezone: i.value
1858
1858
  })}` : t, suffix: "" };
1859
1859
  if (e.globalFilter.option === B.TimeOfDay) {
1860
- const M = y[0] ? $(y[0]).tz(u.value) : null, x = y[1] ? $(y[1]).tz(u.value) : null, E = (j) => j && j.isValid() ? { hour: j.hour(), minute: j.minute() } : null;
1861
- return { preview: G ? `${t} is between ${jt({
1862
- startTime: E(M),
1863
- endTime: E(x),
1860
+ const M = y[0] ? E(y[0]).tz(i.value) : null, $ = y[1] ? E(y[1]).tz(i.value) : null, G = (j) => j && j.isValid() ? { hour: j.hour(), minute: j.minute() } : null;
1861
+ return { preview: A ? `${t} is between ${Qt({
1862
+ startTime: G(M),
1863
+ endTime: G($),
1864
1864
  locale: r.value
1865
1865
  })}` : t, suffix: "" };
1866
1866
  }
@@ -1868,14 +1868,14 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1868
1868
  const M = pt({
1869
1869
  dimensionOption: e.globalFilter.option,
1870
1870
  t: s
1871
- }), x = new Map(M.map((V) => [String(V.value), V.label])), c = Ee(e).map((V) => x.get(String(V)) ?? String(V)), j = c.map((V) => V.length > 20 ? `${V.slice(0, 20)}…` : V).join(", ");
1871
+ }), $ = new Map(M.map((V) => [String(V.value), V.label])), c = Ee(e).map((V) => $.get(String(V)) ?? String(V)), j = c.map((V) => V.length > 20 ? `${V.slice(0, 20)}…` : V).join(", ");
1872
1872
  return c.length ? {
1873
1873
  preview: `${t}: ${j}`,
1874
1874
  suffix: `(${c.length} selected)`
1875
1875
  } : { preview: t, suffix: o };
1876
1876
  }
1877
1877
  }
1878
- const b = Ee(e).map((y) => y === !0 ? s("report.common.yes") || "Yes" : y === !1 ? s("report.common.no") || "No" : String(y).trim() === "" ? k.value : String(y)), T = b.map((y) => y.length > 20 ? `${y.slice(0, 20)}…` : y).join(", ");
1878
+ const b = Ee(e).map((y) => y === !0 ? s("report.common.yes") || "Yes" : y === !1 ? s("report.common.no") || "No" : String(y).trim() === "" ? O.value : String(y)), T = b.map((y) => y.length > 20 ? `${y.slice(0, 20)}…` : y).join(", ");
1879
1879
  return b.length ? {
1880
1880
  preview: `${t}: ${T}`,
1881
1881
  suffix: `(${b.length} selected)`
@@ -1884,8 +1884,8 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1884
1884
  function Ol(e) {
1885
1885
  st(e), se(e.globalFilter), document.body.click();
1886
1886
  }
1887
- function kl(e) {
1888
- const t = A(
1887
+ function _l(e) {
1888
+ const t = x(
1889
1889
  e.globalFilter,
1890
1890
  R(e.id)
1891
1891
  ).selectedValues;
@@ -1893,28 +1893,28 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1893
1893
  selectedValues: e.selectedValues
1894
1894
  }), document.body.click();
1895
1895
  }
1896
- function _l(e) {
1896
+ function Rl(e) {
1897
1897
  e.showAdvanced = !e.showAdvanced, S(e.globalFilter, R(e.id), {
1898
1898
  showAdvanced: e.showAdvanced
1899
1899
  });
1900
1900
  }
1901
- function Rl(e) {
1902
- e.keepSelection = !e.keepSelection, i(e.keepSelection), S(e.globalFilter, R(e.id), {
1901
+ function Il(e) {
1902
+ e.keepSelection = !e.keepSelection, u(e.keepSelection), S(e.globalFilter, R(e.id), {
1903
1903
  keepSelection: e.keepSelection
1904
- }), Tl(e);
1904
+ }), Vl(e);
1905
1905
  }
1906
- function Il(e, t) {
1907
- return e ? e.length > t ? `${e.slice(0, t)}…` : e : k.value;
1906
+ function $l(e, t) {
1907
+ return e ? e.length > t ? `${e.slice(0, t)}…` : e : O.value;
1908
1908
  }
1909
1909
  function At(e, t) {
1910
- var b, T, y, G;
1910
+ var b, T, y, A;
1911
1911
  const o = e.globalFilter;
1912
1912
  let a = [];
1913
1913
  if (t === null)
1914
1914
  o.values = [];
1915
1915
  else {
1916
- const M = $().tz(u.value).set("hour", Number((b = t.start) == null ? void 0 : b.hour)).set("minute", Number((T = t.start) == null ? void 0 : T.minute)).toISOString(), x = $().tz(u.value).set("hour", Number((y = t.end) == null ? void 0 : y.hour)).set("minute", Number((G = t.end) == null ? void 0 : G.minute)).toISOString();
1917
- a = [M, x], o.values = a;
1916
+ const M = E().tz(i.value).set("hour", Number((b = t.start) == null ? void 0 : b.hour)).set("minute", Number((T = t.start) == null ? void 0 : T.minute)).toISOString(), $ = E().tz(i.value).set("hour", Number((y = t.end) == null ? void 0 : y.hour)).set("minute", Number((A = t.end) == null ? void 0 : A.minute)).toISOString();
1917
+ a = [M, $], o.values = a;
1918
1918
  }
1919
1919
  e.selectedValues = [...a], e.keepSelection = t !== null, S(e.globalFilter, R(e.id), {
1920
1920
  keepSelection: e.keepSelection,
@@ -1922,12 +1922,12 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1922
1922
  }), se(e.globalFilter);
1923
1923
  }
1924
1924
  return (e, t) => {
1925
- const o = ee("FmCircularProgress"), a = ee("FmTextField"), b = ee("FmMenuItem"), T = ee("FmTooltip"), y = ee("FmIcon"), G = ee("FmMenuDivider"), M = ee("FmSwitch"), x = ee("FmButton"), E = ee("FmMenu");
1926
- return J(), fe("div", yn, [
1925
+ const o = ee("FmCircularProgress"), a = ee("FmTextField"), b = ee("FmMenuItem"), T = ee("FmTooltip"), y = ee("FmIcon"), A = ee("FmMenuDivider"), M = ee("FmSwitch"), $ = ee("FmButton"), G = ee("FmMenu");
1926
+ return J(), fe("div", Fn, [
1927
1927
  (J(!0), fe(Le, null, ht(z.value, (c, j) => (J(), fe("div", {
1928
1928
  key: c.id
1929
1929
  }, [
1930
- c.globalFilter.option === D(B).DateTime && !Be(c.globalFilter) ? (J(), we(Gl, {
1930
+ c.globalFilter.option === D(B).DateTime && !Be(c.globalFilter) ? (J(), we(El, {
1931
1931
  key: 0,
1932
1932
  "date-range": {
1933
1933
  startDate: pe(c)[0],
@@ -1938,16 +1938,16 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1938
1938
  removable: pe(c).length === 2,
1939
1939
  onUpdate: (V) => xt(c, V),
1940
1940
  onChipClosed: () => xt(c, null)
1941
- }, null, 8, ["date-range", "label", "removable", "onUpdate", "onChipClosed"])) : c.globalFilter.option === D(B).TimeOfDay && !Be(c.globalFilter) ? (J(), we(hn, {
1941
+ }, null, 8, ["date-range", "label", "removable", "onUpdate", "onChipClosed"])) : c.globalFilter.option === D(B).TimeOfDay && !Be(c.globalFilter) ? (J(), we(Sn, {
1942
1942
  key: 1,
1943
1943
  "time-range": {
1944
1944
  start: pe(c)[0] ? {
1945
- hour: D($)(pe(c)[0]).tz(D(u)).hour(),
1946
- minute: D($)(pe(c)[0]).tz(D(u)).minute()
1945
+ hour: D(E)(pe(c)[0]).tz(D(i)).hour(),
1946
+ minute: D(E)(pe(c)[0]).tz(D(i)).minute()
1947
1947
  } : null,
1948
1948
  end: pe(c)[1] ? {
1949
- hour: D($)(pe(c)[1]).tz(D(u)).hour(),
1950
- minute: D($)(pe(c)[1]).tz(D(u)).minute()
1949
+ hour: D(E)(pe(c)[1]).tz(D(i)).hour(),
1950
+ minute: D(E)(pe(c)[1]).tz(D(i)).minute()
1951
1951
  } : null
1952
1952
  },
1953
1953
  class: "w-full",
@@ -1955,15 +1955,15 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1955
1955
  removable: pe(c).length === 2,
1956
1956
  onUpdate: (V) => At(c, V),
1957
1957
  onChipClosed: () => At(c, null)
1958
- }, null, 8, ["time-range", "label", "removable", "onUpdate", "onChipClosed"])) : (J(), we(E, {
1958
+ }, null, 8, ["time-range", "label", "removable", "onUpdate", "onChipClosed"])) : (J(), we(G, {
1959
1959
  key: 2,
1960
1960
  "close-on-click": !1,
1961
1961
  shift: !0,
1962
1962
  open: D(h)(c.id)
1963
1963
  }, {
1964
1964
  "menu-button": ue(() => [
1965
- Q("div", Sn, [
1966
- P(Qt, {
1965
+ Q("div", wn, [
1966
+ P(Kt, {
1967
1967
  "left-icon": "filter_alt",
1968
1968
  "trailing-icon": "expand_more",
1969
1969
  loading: oe(c),
@@ -1980,29 +1980,29 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
1980
1980
  "menu-wrapper": ue(({ maxHeight: V, width: de }) => [
1981
1981
  Q("div", {
1982
1982
  class: "flex flex-col bg-fm-color-neutral-white p-2 rounded-lg shadow-light-300",
1983
- style: Al({ maxHeight: `${V}px`, width: de })
1983
+ style: Gl({ maxHeight: `${V}px`, width: de })
1984
1984
  }, [
1985
- oe(c) ? (J(), fe("div", gn, [
1985
+ oe(c) ? (J(), fe("div", Dn, [
1986
1986
  P(o)
1987
1987
  ])) : c.options.length > 0 ? (J(), fe(Le, { key: 1 }, [
1988
- Q("div", Fn, [
1988
+ Q("div", Tn, [
1989
1989
  P(a, {
1990
1990
  modelValue: c.search,
1991
- "onUpdate:modelValue": [(F) => c.search = F, (F) => Fl(c, F)],
1991
+ "onUpdate:modelValue": [(F) => c.search = F, (F) => wl(c, F)],
1992
1992
  type: "text",
1993
1993
  "prepend-icon": "search",
1994
- placeholder: Cl(),
1994
+ placeholder: kl(),
1995
1995
  class: "border px-2 pb-8 text-sm mb-1 rounded"
1996
1996
  }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
1997
1997
  ]),
1998
- Q("div", wn, [
1999
- Q("div", Dn, [
1998
+ Q("div", Vn, [
1999
+ Q("div", Nn, [
2000
2000
  P(b, {
2001
- label: Nl(c),
2001
+ label: Cl(c),
2002
2002
  "has-checkbox": !0,
2003
- "model-value": Ot(c),
2003
+ "model-value": kt(c),
2004
2004
  indeterminate: !0,
2005
- onClick: (F) => Sl(c)
2005
+ onClick: (F) => gl(c)
2006
2006
  }, null, 8, ["label", "model-value", "onClick"]),
2007
2007
  (J(!0), fe(Le, null, ht(_t.value[j], (F) => (J(), fe(Le, {
2008
2008
  key: F.value
@@ -2017,11 +2017,11 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
2017
2017
  nt(he(F.label), 1)
2018
2018
  ]),
2019
2019
  default: ue(() => [
2020
- Q("div", Tn, [
2020
+ Q("div", Cn, [
2021
2021
  P(b, {
2022
- label: Il(F.label, 110),
2022
+ label: $l(F.label, 110),
2023
2023
  "has-checkbox": !0,
2024
- "model-value": kt(c, F.value),
2024
+ "model-value": Ot(c, F.value),
2025
2025
  class: Et([
2026
2026
  "flex-1 text-left",
2027
2027
  { "bg-gray-200": F.available === !1 }
@@ -2035,7 +2035,7 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
2035
2035
  key: 1,
2036
2036
  label: F.label,
2037
2037
  "has-checkbox": !0,
2038
- "model-value": kt(c, F.value),
2038
+ "model-value": Ot(c, F.value),
2039
2039
  class: Et(["flex-1 text-left", { "bg-gray-100": F.available === !1 }]),
2040
2040
  onClick: () => $t(c, F.value)
2041
2041
  }, null, 8, ["label", "model-value", "class", "onClick"]))
@@ -2044,38 +2044,38 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
2044
2044
  key: 0,
2045
2045
  class: "fm-typo-en-body-md-400 -ml-2",
2046
2046
  label: D(s)("report.section.filter.loadMore"),
2047
- onClick: dt((F) => gl(c), ["stop"]),
2047
+ onClick: dt((F) => Fl(c), ["stop"]),
2048
2048
  icon: "autorenew"
2049
2049
  }, null, 8, ["label", "onClick"])) : bt("", !0)
2050
2050
  ])
2051
2051
  ]),
2052
2052
  Q("div", {
2053
2053
  class: "px-12 py-2 flex items-center gap-2 cursor-pointer hover:bg-fm-color-neutral-50 transition-colors",
2054
- onClick: (F) => _l(c)
2054
+ onClick: (F) => Rl(c)
2055
2055
  }, [
2056
2056
  P(y, {
2057
2057
  name: c.showAdvanced ? "keyboard_arrow_up" : "keyboard_arrow_down",
2058
2058
  size: "md",
2059
2059
  class: ""
2060
2060
  }, null, 8, ["name"]),
2061
- Q("span", Nn, he(D(s)("report.section.filter.advanced")), 1)
2062
- ], 8, Vn),
2063
- P(G),
2064
- c.showAdvanced ? (J(), fe("div", Cn, [
2065
- Q("div", On, [
2066
- Q("div", kn, [
2061
+ Q("span", On, he(D(s)("report.section.filter.advanced")), 1)
2062
+ ], 8, kn),
2063
+ P(A),
2064
+ c.showAdvanced ? (J(), fe("div", _n, [
2065
+ Q("div", Rn, [
2066
+ Q("div", In, [
2067
2067
  P(M, {
2068
2068
  "model-value": c.keepSelection,
2069
2069
  label: D(s)("report.section.filter.keepSelection"),
2070
2070
  labelPlacement: "right",
2071
- "onUpdate:modelValue": () => Rl(c)
2071
+ "onUpdate:modelValue": () => Il(c)
2072
2072
  }, null, 8, ["model-value", "label", "onUpdate:modelValue"]),
2073
2073
  P(T, {
2074
2074
  placement: "top",
2075
2075
  "z-index": 2e3
2076
2076
  }, {
2077
2077
  content: ue(() => [
2078
- Q("div", _n, he(D(s)("report.section.filter.keepSelectionTooltip")), 1)
2078
+ Q("div", $n, he(D(s)("report.section.filter.keepSelectionTooltip")), 1)
2079
2079
  ]),
2080
2080
  default: ue(() => [
2081
2081
  P(y, {
@@ -2089,19 +2089,19 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
2089
2089
  ])
2090
2090
  ])
2091
2091
  ])) : bt("", !0),
2092
- Q("div", Rn, [
2093
- P(x, {
2092
+ Q("div", xn, [
2093
+ P($, {
2094
2094
  variant: "tertiary",
2095
2095
  label: D(s)("report.common.cancel"),
2096
- onClick: dt((F) => kl(c), ["stop"])
2096
+ onClick: dt((F) => _l(c), ["stop"])
2097
2097
  }, null, 8, ["label", "onClick"]),
2098
- P(x, {
2098
+ P($, {
2099
2099
  color: "primary",
2100
2100
  onClick: dt((F) => Ol(c), ["stop"]),
2101
2101
  label: D(s)("report.common.apply")
2102
2102
  }, null, 8, ["onClick", "label"])
2103
2103
  ])
2104
- ], 64)) : (J(), we(zl, {
2104
+ ], 64)) : (J(), we(ql, {
2105
2105
  key: 2,
2106
2106
  title: ct(c) ? D(s)("report.messages.noWidgetsApplied") : void 0,
2107
2107
  "sub-title": ct(c) ? D(s)("report.messages.assignWidgetsToUseThisFilter") : void 0
@@ -2111,32 +2111,32 @@ const yn = { class: "flex flex-row flex-wrap gap-2" }, Sn = { class: "inline-fle
2111
2111
  _: 2
2112
2112
  }, 1032, ["open"]))
2113
2113
  ]))), 128)),
2114
- qt(e.$slots, "default")
2114
+ jt(e.$slots, "default")
2115
2115
  ]);
2116
2116
  };
2117
2117
  }
2118
2118
  });
2119
2119
  export {
2120
2120
  $e as I,
2121
- Jt as R,
2122
- Hn as _,
2123
- Qn as a,
2124
- Jn as b,
2125
- Yn as c,
2126
- Bn as d,
2127
- Ut as e,
2128
- hn as f,
2129
- Kn as g,
2130
- ql as h,
2131
- zn as i,
2132
- sn as j,
2133
- Kl as k,
2134
- jn as l,
2135
- qn as m,
2136
- Wn as n,
2137
- nn as q,
2138
- Un as r,
2139
- rn as s,
2121
+ Yt as R,
2122
+ ea as _,
2123
+ Yn as a,
2124
+ Zn as b,
2125
+ Xn as c,
2126
+ Wn as d,
2127
+ qt as e,
2128
+ Sn as f,
2129
+ Hn as g,
2130
+ Kl as h,
2131
+ qn as i,
2132
+ un as j,
2133
+ Hl as k,
2134
+ Jn as l,
2135
+ Kn as m,
2136
+ jn as n,
2137
+ rn as q,
2138
+ Qn as r,
2139
+ cn as s,
2140
2140
  Wt as t,
2141
- Yt as u
2141
+ Ht as u
2142
2142
  };