@feedmepos/mf-report 5.33.3 → 5.34.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/{App-BgRqim5d.js → App-DyrakazI.js} +114 -113
  2. package/dist/{DateRangeSelect-XyU5XG5c.js → DateRangeSelect-D5SGi6ca.js} +67 -67
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-CC7fE3F8.js → Default.vue_vue_type_script_setup_true_lang-DsTRZa_6.js} +3 -3
  4. package/dist/DigestListView-BnkDRa7x.js +876 -0
  5. package/dist/{DigestReaderView-DSNoAESE.js → DigestReaderView-ByISB4qT.js} +63 -63
  6. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-CsDiXGUk.js → DynamicWidget.vue_vue_type_script_setup_true_lang-BKNNtuyG.js} +733 -733
  7. package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-D7Rsh-uY.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DHrnVaog.js} +526 -526
  8. package/dist/{InsightView-CF8mQJha.js → InsightView-CUBTqwTI.js} +88 -88
  9. package/dist/{Integration-QMdYwTwW.js → Integration-WDbqUebw.js} +30 -30
  10. package/dist/{Integrations-Dbx1ScOv.js → Integrations-C5_nERZt.js} +10 -10
  11. package/dist/{Layout-CgiplBHM.js → Layout-BqzoK8Mg.js} +3 -3
  12. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-zW8JA7j3.js → LocationSelect.vue_vue_type_script_setup_true_lang-kvdk_gEw.js} +306 -306
  13. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-B0q9V1x8.js → MenuTab.vue_vue_type_script_setup_true_lang-B8uHS4bV.js} +6 -6
  14. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-BVWZ8vTw.js → NavigationTab.vue_vue_type_script_setup_true_lang-CpexikuB.js} +12784 -11760
  15. package/dist/{OverviewView-BbZ8WkLb.js → OverviewView-mOEI9DAV.js} +7 -7
  16. package/dist/{Report-BYi0pPZs.js → Report-DmbTzjbj.js} +12 -12
  17. package/dist/{ReportCanvasView-CfFtVomc.js → ReportCanvasView-BqZ38Tsk.js} +426 -426
  18. package/dist/{ReportEditor-BLEkGUVR.js → ReportEditor-8oAVfFdY.js} +32 -32
  19. package/dist/{ReportView-TG78Krm2.js → ReportView-B6nE3qwV.js} +13 -13
  20. package/dist/{ReportViewRoute-BUADf4Cr.js → ReportViewRoute-DqXbM93B.js} +5 -5
  21. package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-Cxx-TQz9.js +137 -0
  22. package/dist/{Setting-Curkhv9_.js → Setting-C01x-O-V.js} +6 -6
  23. package/dist/{Template-BN_ds698.js → Template-VyBWHUXE.js} +80 -80
  24. package/dist/{TileEditor-Cfb0uXGr.js → TileEditor-DICyBR1o.js} +1566 -1566
  25. package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-1FKwWbpC.js → TilePageStack.vue_vue_type_script_setup_true_lang-Dyaao76o.js} +82 -82
  26. package/dist/{TransitionFade-D0_ZoB-O.js → TransitionFade-kXCDPEMQ.js} +170 -170
  27. package/dist/{XeroRedirect-CuTrP62C.js → XeroRedirect-D4sHbZe7.js} +3 -3
  28. package/dist/_plugin-vue_export-helper-Bx7s49ra.js +2828 -0
  29. package/dist/{app-LKjvcmXa.js → app-BQDKX7NB.js} +5688 -13890
  30. package/dist/app.js +1 -1
  31. package/dist/assets/{formatChartData.worker-DvK7K5ca.js → formatChartData.worker-Cpgnh20a.js} +62 -62
  32. package/dist/assets/{processTableData.worker-C3l4iUXL.js → processTableData.worker-B7I6PElJ.js} +64 -64
  33. package/dist/{chart-BywXiz4O.js → chart-DU0N9V2o.js} +7 -4
  34. package/dist/currency-8SmajsvB.js +12 -0
  35. package/dist/index-BQ8NJuCA.js +24722 -0
  36. package/dist/{report-Ci2ElGpp.js → report-CcXsPATD.js} +23 -23
  37. package/dist/style.css +1 -1
  38. package/dist/{useDigestFont-BxXC7U3d.js → useDigestFont-CjZZOIRM.js} +80 -80
  39. package/dist/{useReportCanvasPanel-BjmRiMSh.js → useReportCanvasPanel-dWlB_xvo.js} +975 -976
  40. package/dist/{useRestaurantPermission-DX52YBfA.js → useRestaurantPermission-D3G7ET0Z.js} +2 -2
  41. package/package.json +11 -11
  42. package/dist/DigestListView-Bqp4LA1w.js +0 -876
  43. package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-DW7Dk7iQ.js +0 -137
  44. package/dist/_plugin-vue_export-helper-C6QDExPN.js +0 -2718
  45. package/dist/currency-DFN_8rRJ.js +0 -12
  46. package/dist/index-xdTpLFHc.js +0 -25511
@@ -1,42 +1,42 @@
1
- import { defineComponent as pe, resolveComponent as V, createBlock as fe, openBlock as C, unref as l, isRef as Ke, withCtx as G, createElementVNode as re, createVNode as X, toDisplayString as se, createTextVNode as Pe, onMounted as ge, watch as z, ref as j, computed as ie, onBeforeMount as Ge, onBeforeUnmount as He, createElementBlock as H, Fragment as We } from "vue";
2
- import { detectLocale as K, useCoreStore as W } from "@feedmepos/mf-common";
3
- import { d as Y, u as Ze, a as ce, b as Ve, c as ue, e as Xe, f as Ye, g as Me, r as Z, h as de, t as et, z as tt, i as nt } from "./app-LKjvcmXa.js";
1
+ import { defineComponent as pe, resolveComponent as Z, openBlock as C, createBlock as fe, isRef as Ke, unref as d, withCtx as P, createElementVNode as ne, createVNode as V, toDisplayString as se, createTextVNode as We, onMounted as ve, watch as z, ref as j, computed as ie, onBeforeMount as Pe, onBeforeUnmount as Ge, createElementBlock as G, Fragment as He } from "vue";
2
+ import { detectLocale as K, useCoreStore as H } from "@feedmepos/mf-common";
3
+ import { d as Y, u as Xe, a as ce, b as Ze, c as le, e as Ve, f as Ye, g as Me, r as X, h as ue, t as et, z as tt, i as ot } from "./app-BQDKX7NB.js";
4
4
  import { storeToRefs as N } from "pinia";
5
5
  import { u as at } from "./global-loader-BuxFfehu.js";
6
- import { u as ot, a as rt } from "./report-Ci2ElGpp.js";
7
- import { u as st, _ as it } from "./NavigationTab.vue_vue_type_script_setup_true_lang-BVWZ8vTw.js";
8
- import { u as le } from "./message-dialog-UoMWOnil.js";
9
- import { u as ct } from "./_plugin-vue_export-helper-C6QDExPN.js";
10
- import { useRoute as ut, useRouter as dt } from "vue-router";
11
- const lt = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, mt = /* @__PURE__ */ pe({
6
+ import { u as rt, a as nt } from "./report-CcXsPATD.js";
7
+ import { u as st, _ as it } from "./NavigationTab.vue_vue_type_script_setup_true_lang-CpexikuB.js";
8
+ import { u as de } from "./message-dialog-UoMWOnil.js";
9
+ import { u as ct } from "./_plugin-vue_export-helper-Bx7s49ra.js";
10
+ import { useRoute as lt, useRouter as ut } from "vue-router";
11
+ const dt = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, mt = /* @__PURE__ */ pe({
12
12
  __name: "Dialog",
13
13
  setup(O) {
14
- const { t: d } = ct(), b = le(), { isOpened: R, message: L, title: w } = N(le());
14
+ const { t: u } = ct(), b = de(), { isOpened: R, message: E, title: w } = N(de());
15
15
  return (T, m) => {
16
- const u = V("FmButton"), p = V("FmDialog");
16
+ const l = Z("FmButton"), p = Z("FmDialog");
17
17
  return C(), fe(p, {
18
- modelValue: l(R),
18
+ modelValue: d(R),
19
19
  "onUpdate:modelValue": m[0] || (m[0] = (A) => Ke(R) ? R.value = A : null),
20
20
  overlay: "",
21
21
  "close-button": !1,
22
22
  "z-index": 3e3
23
23
  }, {
24
- "dialog-header": G(() => [
25
- Pe(se(l(w)), 1)
24
+ "dialog-header": P(() => [
25
+ We(se(d(w)), 1)
26
26
  ]),
27
- default: G(() => [
28
- re("p", lt, se(l(L)), 1)
27
+ default: P(() => [
28
+ ne("p", dt, se(d(E)), 1)
29
29
  ]),
30
- "dialog-footer": G(() => [
31
- m[1] || (m[1] = re("div", { class: "grow" }, null, -1)),
32
- X(u, {
33
- label: l(d)("report.common.cancel"),
30
+ "dialog-footer": P(() => [
31
+ m[1] || (m[1] = ne("div", { class: "grow" }, null, -1)),
32
+ V(l, {
33
+ label: d(u)("report.common.cancel"),
34
34
  variant: "tertiary",
35
- onClick: l(b).dismiss
35
+ onClick: d(b).dismiss
36
36
  }, null, 8, ["label", "onClick"]),
37
- X(u, {
38
- label: l(d)("report.common.confirm"),
39
- onClick: l(b).confirm
37
+ V(l, {
38
+ label: d(u)("report.common.confirm"),
39
+ onClick: d(b).confirm
40
40
  }, null, 8, ["label", "onClick"])
41
41
  ]),
42
42
  _: 1
@@ -45,56 +45,57 @@ const lt = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, mt
45
45
  }
46
46
  }), me = j(K());
47
47
  function pt() {
48
- const O = (d) => {
49
- switch (me.value = d, d) {
48
+ const O = (u) => {
49
+ switch (me.value = u, u) {
50
50
  case "zh-CN":
51
51
  Y.locale("zh-cn");
52
52
  break;
53
+ // TODO: add other locales
53
54
  default:
54
55
  Y.locale("en");
55
56
  break;
56
57
  }
57
58
  };
58
- return ge(() => {
59
+ return ve(() => {
59
60
  O(K());
60
61
  }), z(() => K(), O, { deep: !0, immediate: !0 }), {
61
62
  currentLocale: me
62
63
  };
63
64
  }
64
65
  Y.locale(K() === "zh-CN" ? "zh-cn" : "en");
65
- const ft = ["src"], gt = ["src"], bt = /* @__PURE__ */ pe({
66
+ const ft = ["src"], vt = ["src"], bt = /* @__PURE__ */ pe({
66
67
  __name: "App",
67
68
  setup(O) {
68
- const { scope: d, businessId: b, isFoodCourt: R, token: L, country: w } = N(Ze()), {
69
+ const { scope: u, businessId: b, isFoodCourt: R, token: E, country: w } = N(Xe()), {
69
70
  sessionUser: T,
70
71
  currentBusiness: m,
71
- currentFoodCourt: u,
72
+ currentFoodCourt: l,
72
73
  currentContextType: p,
73
74
  currentCountry: A,
74
- registerSidebarComponent: ve
75
- } = W(), {
75
+ registerSidebarComponent: ge
76
+ } = H(), {
76
77
  getRestaurantAndWarehouse: ye,
77
78
  getBusinessSetting: Se,
78
79
  beginBusinessLoad: De,
79
80
  completeBusinessLoad: he,
80
81
  resetTimezoneContext: Ie
81
- } = ce(), _e = Ve(), { getFeatureFlags: Re } = _e, { version: S } = N(ue()), { getSettings: Le } = Xe(), { loadHasDigest: Ee } = Ye(), { promptLoader: be } = at(), n = ut(), $ = dt(), k = ot(), M = st(), r = ce(), B = ue(), { suppressReportRouteSync: F } = N(B), { getReports: we, getOverviewReport: Ae, getReportConfig: ke, currentReportId: ee } = k, { currentReportId: qe, reports: Ce } = N(k), { getSchema: ze } = rt(), { fetchSchedules: Ne } = M, { init: Oe } = Me(), P = j("v5"), x = j(!1), J = j(!0), Te = ie(() => `https://portal-v1.feedme.cc/b/${b.value}/report/CLOSE_UP?showHeader=false&country=${w.value.toUpperCase()}&menuOption=business-report&token=${L.value}&v2=true&reportV5Button=true`), $e = ie(() => `https://report-v4.feedme.cc?businessId=${b.value}&country=${w.value}&token=${L.value}&reportV3Button=true`);
82
+ } = ce(), _e = Ze(), { getFeatureFlags: Re } = _e, { version: S } = N(le()), { getSettings: Ee } = Ve(), { loadHasDigest: Le } = Ye(), { promptLoader: be } = at(), o = lt(), $ = ut(), k = rt(), M = st(), n = ce(), B = le(), { suppressReportRouteSync: F } = N(B), { getReports: we, getOverviewReport: Ae, getReportConfig: ke, currentReportId: ee } = k, { currentReportId: qe, reports: Ce } = N(k), { getSchema: ze } = nt(), { fetchSchedules: Ne } = M, { init: Oe } = Me(), W = j("v5"), x = j(!1), J = j(!0), Te = ie(() => `https://portal-v1.feedmedev.cc/b/${b.value}/report/CLOSE_UP?showHeader=false&country=${w.value.toUpperCase()}&menuOption=business-report&token=${E.value}&v2=true&reportV5Button=true`), $e = ie(() => `https://report-v4.feedmedev.cc?businessId=${b.value}&country=${w.value}&token=${E.value}&reportV3Button=true`);
82
83
  function Be() {
83
84
  var t, e;
84
- return (p == null ? void 0 : p.value) === "foodCourt" ? (t = u == null ? void 0 : u.value) != null && t._id ? { type: "foodCourt", id: u.value._id } : null : (e = m.value) != null && e.id ? { type: "business", id: m.value.id } : null;
85
+ return (p == null ? void 0 : p.value) === "foodCourt" ? (t = l == null ? void 0 : l.value) != null && t._id ? { type: "foodCourt", id: l.value._id } : null : (e = m.value) != null && e.id ? { type: "business", id: m.value.id } : null;
85
86
  }
86
87
  z(
87
88
  [
88
89
  () => p == null ? void 0 : p.value,
89
90
  () => m.value,
90
- () => u == null ? void 0 : u.value,
91
+ () => l == null ? void 0 : l.value,
91
92
  () => T.value,
92
93
  () => A.value
93
94
  ],
94
95
  () => {
95
96
  var e;
96
97
  const t = Be();
97
- t && T.value && A.value && (Z(d.value) !== Z(t) && (d.value = t), L.value = ((e = T.value) == null ? void 0 : e.token) ?? "", w.value = A.value ?? "");
98
+ t && T.value && A.value && (X(u.value) !== X(t) && (u.value = t), E.value = ((e = T.value) == null ? void 0 : e.token) ?? "", w.value = A.value ?? "");
98
99
  },
99
100
  { immediate: !0 }
100
101
  );
@@ -102,28 +103,28 @@ const ft = ["src"], gt = ["src"], bt = /* @__PURE__ */ pe({
102
103
  if (typeof t.data == "string")
103
104
  try {
104
105
  const e = JSON.parse(t.data);
105
- (e == null ? void 0 : e.token) !== "" && (e == null ? void 0 : e.token) !== void 0 && (L.value = e.token);
106
+ (e == null ? void 0 : e.token) !== "" && (e == null ? void 0 : e.token) !== void 0 && (E.value = e.token);
106
107
  } catch (e) {
107
108
  console.error(e);
108
109
  }
109
110
  }
110
- function ne(t) {
111
+ function oe(t) {
111
112
  if (typeof t.data == "string")
112
113
  try {
113
114
  const e = JSON.parse(t.data);
114
- (e == null ? void 0 : e.v5) === !0 ? S.value = P.value : (e == null ? void 0 : e.v3) === !0 && (S.value = "v3");
115
+ (e == null ? void 0 : e.v5) === !0 ? S.value = W.value : (e == null ? void 0 : e.v3) === !0 && (S.value = "v3");
115
116
  } catch (e) {
116
117
  console.error(e);
117
118
  }
118
119
  }
119
120
  z(S, () => {
120
- ["v3", "v4"].includes(S.value) ? W().hideSidebarToggle(!0) : W().hideSidebarToggle(!1);
121
+ ["v3", "v4"].includes(S.value) ? H().hideSidebarToggle(!0) : H().hideSidebarToggle(!1);
122
+ }), Pe(() => {
123
+ ge(it);
124
+ }), ve(() => {
125
+ console.log("5.34.0-beta.1", !0), window.addEventListener("message", te), window.addEventListener("message", oe);
121
126
  }), Ge(() => {
122
- ve(it);
123
- }), ge(() => {
124
- console.log("5.33.3", !0), window.addEventListener("message", te), window.addEventListener("message", ne);
125
- }), He(() => {
126
- window.removeEventListener("message", te), window.removeEventListener("message", ne), k.$dispose(), M.$dispose();
127
+ window.removeEventListener("message", te), window.removeEventListener("message", oe), k.$dispose(), M.$dispose();
127
128
  });
128
129
  function Fe(t) {
129
130
  try {
@@ -135,9 +136,9 @@ const ft = ["src"], gt = ["src"], bt = /* @__PURE__ */ pe({
135
136
  function Q(t) {
136
137
  if (typeof t != "string" || t.length === 0) return;
137
138
  const e = t.includes("%") ? [t, Fe(t)] : [t];
138
- for (const o of e)
139
+ for (const r of e)
139
140
  try {
140
- const a = JSON.parse(o);
141
+ const a = JSON.parse(r);
141
142
  if (typeof a == "string")
142
143
  try {
143
144
  return JSON.parse(a);
@@ -153,39 +154,39 @@ const ft = ["src"], gt = ["src"], bt = /* @__PURE__ */ pe({
153
154
  const e = t;
154
155
  return typeof e.hour == "number" && typeof e.minute == "number";
155
156
  }
156
- function f(t, e, o) {
157
+ function f(t, e, r) {
157
158
  if (typeof t != "string" || t.length === 0) return;
158
- const a = et(t, o);
159
- return e === "start" ? tt(a, o) : nt(a, o);
159
+ const a = et(t, r);
160
+ return e === "start" ? tt(a, r) : ot(a, r);
160
161
  }
161
- function xe(t = n.query) {
162
- const e = t, o = r.timezone, a = f(e.startDate, "start", o), g = f(e.endDate, "end", o), i = typeof e.timeStart == "string", D = typeof e.timeEnd == "string", h = Q(e.timeStart), I = Q(e.timeEnd), q = ae(h) ? h : null, v = ae(I) ? I : null, E = f(e.compareStartDate, "start", o), c = f(e.compareEndDate, "end", o), U = e.isAllLocation === "true" || e.isAllLocation === void 0;
162
+ function xe(t = o.query) {
163
+ const e = t, r = n.timezone, a = f(e.startDate, "start", r), v = f(e.endDate, "end", r), i = typeof e.timeStart == "string", D = typeof e.timeEnd == "string", h = Q(e.timeStart), I = Q(e.timeEnd), q = ae(h) ? h : null, g = ae(I) ? I : null, L = f(e.compareStartDate, "start", r), c = f(e.compareEndDate, "end", r), U = e.isAllLocation === "true" || e.isAllLocation === void 0;
163
164
  let y = [];
164
165
  if (U)
165
- y = r.selectedLocationIds ?? [];
166
+ y = n.selectedLocationIds ?? [];
166
167
  else {
167
168
  const s = Q(e.locationIds);
168
169
  y = Array.isArray(s) ? s : [];
169
170
  }
170
171
  let _ = e.reportId || ee;
171
- if (Ce.value.find((s) => s.id === _) || (_ = ee), _ && _ !== k.currentReportId && k.updateCurrentReportId(_), a || g) {
172
- const s = r.dateRange;
173
- (s.startDate !== a || s.endDate !== g) && r.setDateRange({ startDate: a, endDate: g });
172
+ if (Ce.value.find((s) => s.id === _) || (_ = ee), _ && _ !== k.currentReportId && k.updateCurrentReportId(_), a || v) {
173
+ const s = n.dateRange;
174
+ (s.startDate !== a || s.endDate !== v) && n.setDateRange({ startDate: a, endDate: v });
174
175
  }
175
176
  if (i || D) {
176
- const s = r.timeRange;
177
- (s.start !== q || s.end !== v) && r.setTimeRange({ start: q, end: v });
177
+ const s = n.timeRange;
178
+ (s.start !== q || s.end !== g) && n.setTimeRange({ start: q, end: g });
178
179
  }
179
- if (E || c) {
180
- const s = r.compareDateRange;
181
- (s.startDate !== E || s.endDate !== c) && r.setCompareDateRange({
182
- startDate: E,
180
+ if (L || c) {
181
+ const s = n.compareDateRange;
182
+ (s.startDate !== L || s.endDate !== c) && n.setCompareDateRange({
183
+ startDate: L,
183
184
  endDate: c
184
185
  });
185
186
  }
186
187
  if (!U) {
187
- const s = r.selectedLocationIds;
188
- s.length === y.length && s.every((Ue, je) => Ue === y[je]) || r.setSelectedLocationIds(y);
188
+ const s = n.selectedLocationIds;
189
+ s.length === y.length && s.every((Ue, je) => Ue === y[je]) || n.setSelectedLocationIds(y);
189
190
  }
190
191
  return {
191
192
  // TODO: this returned value can used for getBusinessSetting
@@ -201,56 +202,56 @@ const ft = ["src"], gt = ["src"], bt = /* @__PURE__ */ pe({
201
202
  };
202
203
  }
203
204
  return z(
204
- () => Z(d.value),
205
+ () => X(u.value),
205
206
  async (t, e) => {
206
207
  if (t !== "") {
207
208
  x.value = !1, De(t);
208
- const o = "mf-report-prev-business-id", a = (() => {
209
+ const r = "mf-report-prev-business-id", a = (() => {
209
210
  try {
210
- return sessionStorage.getItem(o);
211
+ return sessionStorage.getItem(r);
211
212
  } catch {
212
213
  return null;
213
214
  }
214
- })(), g = !!a && a !== t;
215
- let i = { ...n.query }, D = !1;
216
- if (!J.value || e !== void 0 || g) {
217
- Ie(), r.setSelectedLocationIds([]);
215
+ })(), v = !!a && a !== t;
216
+ let i = { ...o.query }, D = !1;
217
+ if (!J.value || e !== void 0 || v) {
218
+ Ie(), n.setSelectedLocationIds([]);
218
219
  const {
219
220
  locationIds: h,
220
221
  startDate: I,
221
222
  endDate: q,
222
- timeStart: v,
223
- timeEnd: E,
223
+ timeStart: g,
224
+ timeEnd: L,
224
225
  compareStartDate: c,
225
226
  compareEndDate: U,
226
227
  ...y
227
- } = n.query;
228
+ } = o.query;
228
229
  i = {
229
230
  ...y,
230
231
  isAllLocation: "true"
231
232
  }, D = !0, await $.replace({
232
- name: n.name,
233
- params: n.params,
233
+ name: o.name,
234
+ params: o.params,
234
235
  query: i
235
236
  });
236
237
  }
237
238
  F.value !== void 0 && (F.value = !0), await be(async () => {
238
239
  await Oe({
239
- apiKey: "6GhcttsJ9Rj9cTevcdrpin",
240
+ apiKey: "MaGoXrEWuEJNpWgKTqseee",
240
241
  url: "https://flag.feedme.farm/api/v1/",
241
242
  enableAnalytics: !1,
242
243
  cacheFlags: !1
243
244
  });
244
245
  const h = await ke();
245
- P.value = h.version, S.value = P.value, await Re(), n.name === "template" && !B.canAccessTemplate() && await $.replace({
246
+ W.value = h.version, S.value = W.value, await Re(), o.name === "template" && !B.canAccessTemplate() && await $.replace({
246
247
  name: "reports",
247
- query: n.query
248
+ query: o.query
248
249
  });
249
250
  const I = B.canAccess(
250
- de.report_accessOverview
251
+ ue.report_accessOverview
251
252
  ), q = B.canAccess(
252
- de.report_accessIntegration
253
- ), v = [
253
+ ue.report_accessIntegration
254
+ ), g = [
254
255
  ze(),
255
256
  Ne(),
256
257
  we(),
@@ -261,9 +262,9 @@ const ft = ["src"], gt = ["src"], bt = /* @__PURE__ */ pe({
261
262
  })()
262
263
  )
263
264
  ];
264
- I && v.push(Ae()), q && !R.value && v.push(Le()), R.value || v.push(Ee());
265
- const E = await Promise.allSettled(v);
266
- for (const c of E)
265
+ I && g.push(Ae()), q && !R.value && g.push(Ee()), R.value || g.push(Le());
266
+ const L = await Promise.allSettled(g);
267
+ for (const c of L)
267
268
  c.status === "rejected" && console.log(c.reason);
268
269
  if (await Se(), xe(i), D) {
269
270
  const {
@@ -274,20 +275,20 @@ const ft = ["src"], gt = ["src"], bt = /* @__PURE__ */ pe({
274
275
  timeEnd: Je,
275
276
  compareStartDate: s,
276
277
  compareEndDate: Qe,
277
- ...oe
278
- } = n.query;
279
- (n.query.locationIds !== void 0 || n.query.startDate !== void 0 || n.query.endDate !== void 0 || n.query.timeStart !== void 0 || n.query.timeEnd !== void 0 || n.query.compareStartDate !== void 0 || n.query.compareEndDate !== void 0 || n.query.isAllLocation !== "true") && await $.replace({
280
- name: n.name,
281
- params: n.params,
278
+ ...re
279
+ } = o.query;
280
+ (o.query.locationIds !== void 0 || o.query.startDate !== void 0 || o.query.endDate !== void 0 || o.query.timeStart !== void 0 || o.query.timeEnd !== void 0 || o.query.compareStartDate !== void 0 || o.query.compareEndDate !== void 0 || o.query.isAllLocation !== "true") && await $.replace({
281
+ name: o.name,
282
+ params: o.params,
282
283
  query: {
283
- ...oe,
284
+ ...re,
284
285
  isAllLocation: "true"
285
286
  }
286
287
  });
287
288
  }
288
289
  he(t);
289
290
  try {
290
- sessionStorage.setItem(o, t);
291
+ sessionStorage.setItem(r, t);
291
292
  } catch {
292
293
  }
293
294
  }), x.value = !0, J.value && (J.value = !1);
@@ -299,11 +300,11 @@ const ft = ["src"], gt = ["src"], bt = /* @__PURE__ */ pe({
299
300
  ), z(
300
301
  () => (x.value, {
301
302
  reportId: qe.value,
302
- selectedLocationIds: r.selectedLocationIds,
303
- dateRange: r.dateRange,
304
- timeRange: r.timeRange,
305
- compareDateRange: r.compareDateRange,
306
- timezone: r.timezone
303
+ selectedLocationIds: n.selectedLocationIds,
304
+ dateRange: n.dateRange,
305
+ timeRange: n.timeRange,
306
+ compareDateRange: n.compareDateRange,
307
+ timezone: n.timezone
307
308
  }),
308
309
  (t) => {
309
310
  if (!x.value || !t.reportId || J.value) return;
@@ -311,44 +312,44 @@ const ft = ["src"], gt = ["src"], bt = /* @__PURE__ */ pe({
311
312
  F.value = !1;
312
313
  return;
313
314
  }
314
- const e = t.selectedLocationIds, o = t.dateRange, a = t.timeRange, g = t.compareDateRange, i = {
315
- ...n.query,
315
+ const e = t.selectedLocationIds, r = t.dateRange, a = t.timeRange, v = t.compareDateRange, i = {
316
+ ...o.query,
316
317
  reportId: t.reportId,
317
- startDate: f(o.startDate, "start", t.timezone),
318
- endDate: f(o.endDate, "end", t.timezone),
318
+ startDate: f(r.startDate, "start", t.timezone),
319
+ endDate: f(r.endDate, "end", t.timezone),
319
320
  compareStartDate: f(
320
- g.startDate,
321
+ v.startDate,
321
322
  "start",
322
323
  t.timezone
323
324
  ),
324
- compareEndDate: f(g.endDate, "end", t.timezone),
325
+ compareEndDate: f(v.endDate, "end", t.timezone),
325
326
  timeStart: a.start ? JSON.stringify(a.start) : void 0,
326
327
  timeEnd: a.end ? JSON.stringify(a.end) : void 0
327
- }, D = e.length === r.locations.length;
328
+ }, D = e.length === n.locations.length;
328
329
  i.isAllLocation = String(D), D ? delete i.locationIds : e.length > 0 ? i.locationIds = JSON.stringify(e) : delete i.locationIds;
329
- const h = JSON.stringify(n.query), I = JSON.stringify(i);
330
+ const h = JSON.stringify(o.query), I = JSON.stringify(i);
330
331
  h !== I && $.replace({
331
- name: n.name,
332
- params: n.params,
332
+ name: o.name,
333
+ params: o.params,
333
334
  query: i
334
335
  });
335
336
  },
336
337
  { deep: !0 }
337
338
  ), pt(), (t, e) => {
338
- const o = V("router-view");
339
- return C(), H(We, null, [
340
- X(mt),
341
- l(S) === "v3" ? (C(), H("iframe", {
339
+ const r = Z("router-view");
340
+ return C(), G(He, null, [
341
+ V(mt),
342
+ d(S) === "v3" ? (C(), G("iframe", {
342
343
  key: 0,
343
344
  title: "Report v3",
344
345
  class: "bg-white h-full w-full",
345
346
  src: Te.value
346
- }, null, 8, ft)) : l(S) === "v4" ? (C(), H("iframe", {
347
+ }, null, 8, ft)) : d(S) === "v4" ? (C(), G("iframe", {
347
348
  key: 1,
348
349
  title: "Report v4",
349
350
  class: "bg-white h-full w-full",
350
351
  src: $e.value
351
- }, null, 8, gt)) : (C(), fe(o, { key: 2 }))
352
+ }, null, 8, vt)) : (C(), fe(r, { key: 2 }))
352
353
  ], 64);
353
354
  };
354
355
  }