@feedmepos/mf-report 5.32.0 → 5.32.1-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-DmCGLjX7.js → App-CjrRU11g.js} +104 -104
  2. package/dist/{DateRangeSelect-ByNkTDjz.js → DateRangeSelect-DWuJKk38.js} +1 -1
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-B0KI2grl.js → Default.vue_vue_type_script_setup_true_lang-pxeEGv9f.js} +1 -1
  4. package/dist/{DigestListView-De9tIPMS.js → DigestListView-dLVRD-kY.js} +27 -27
  5. package/dist/{DigestReaderView-DO_nmqE8.js → DigestReaderView-jU_ukFZK.js} +4 -4
  6. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-BCrF_c93.js → DynamicWidget.vue_vue_type_script_setup_true_lang-8tad4MW2.js} +6 -6
  7. package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-CqSpNI7C.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-K7CvZban.js} +4 -4
  8. package/dist/{InsightView-C-CwTtk_.js → InsightView-djCqNyn3.js} +16 -16
  9. package/dist/{Integration-BRNvT1Bi.js → Integration-D9FMWr9Z.js} +3 -3
  10. package/dist/{Integrations-apd0BYi4.js → Integrations-DUTetJXV.js} +2 -2
  11. package/dist/{Layout-CAcG75jm.js → Layout-C1GSViy5.js} +1 -1
  12. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-D77iP1So.js → LocationSelect.vue_vue_type_script_setup_true_lang-DC2WdCE-.js} +2 -2
  13. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-0FI-8jfq.js → MenuTab.vue_vue_type_script_setup_true_lang-spQgZxjH.js} +9 -9
  14. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-caeBZJMd.js → NavigationTab.vue_vue_type_script_setup_true_lang-DyfcyW_a.js} +5 -5
  15. package/dist/{OverviewView-DT4wH9BY.js → OverviewView-DVPyBvIy.js} +5 -5
  16. package/dist/{Report-DC5SaVnn.js → Report-Buemqzxr.js} +39 -39
  17. package/dist/{ReportCanvasView-DKSSW9vS.js → ReportCanvasView-B3cX-r6H.js} +5 -5
  18. package/dist/{ReportEditor-pv17FE6d.js → ReportEditor-DpzAjKjU.js} +7 -7
  19. package/dist/{ReportView-hu8o7gHa.js → ReportView-Usm2F05o.js} +11 -11
  20. package/dist/{ReportViewRoute-Dv72tGDa.js → ReportViewRoute-BuxPA_WO.js} +2 -2
  21. package/dist/{Setting-B98DTITn.js → Setting-cThrrYa1.js} +3 -3
  22. package/dist/{Template-CaVg_yFH.js → Template-B9pnUMgc.js} +30 -30
  23. package/dist/{TileEditor-HXcsJvnS.js → TileEditor-ta3jcfD9.js} +6 -6
  24. package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-B9kTXx-f.js → TilePageStack.vue_vue_type_script_setup_true_lang-B5tgugcg.js} +2 -2
  25. package/dist/{TransitionFade-CIv_c2SU.js → TransitionFade-qS1hS_wS.js} +5 -5
  26. package/dist/{app-DvNjldW6.js → app-CMF_9rbJ.js} +2011 -2024
  27. package/dist/app.js +1 -1
  28. package/dist/{currency-DkfeAufo.js → currency-D5JvORk7.js} +1 -1
  29. package/dist/{index-BfS1DQsO.js → index-BjEEjEBa.js} +1 -1
  30. package/dist/{report-BYoPJJLO.js → report-CBkz_f_9.js} +1 -1
  31. package/dist/{useDigestFont-qj5lGRy-.js → useDigestFont-DQ0uozM-.js} +1 -1
  32. package/dist/{useReportCanvasPanel-BJTLOzd9.js → useReportCanvasPanel-BSJyXKS3.js} +3 -3
  33. package/dist/{useRestaurantPermission-Cy0Wr066.js → useRestaurantPermission-BsmsrHlc.js} +1 -1
  34. package/package.json +1 -1
@@ -1,40 +1,40 @@
1
- import { defineComponent as me, resolveComponent as Z, createBlock as pe, openBlock as A, unref as d, isRef as xe, withCtx as H, createElementVNode as re, createVNode as V, toDisplayString as ae, createTextVNode as Je, onMounted as fe, watch as C, ref as Q, computed as se, onBeforeMount as Qe, onBeforeUnmount as Ue, createElementBlock as K, Fragment as je } from "vue";
2
- import { detectLocale as U, useCoreStore as W } from "@feedmepos/mf-common";
3
- import { d as X, u as Pe, a as ie, b as Ge, c as ce, e as He, f as Ke, g as We, h as Ze, i as ue, t as Ve, z as Xe, j as Ye } from "./app-DvNjldW6.js";
1
+ import { defineComponent as me, resolveComponent as X, createBlock as pe, openBlock as A, unref as d, isRef as $e, withCtx as P, createElementVNode as ae, createVNode as Z, toDisplayString as re, createTextVNode as xe, onMounted as fe, watch as C, ref as Q, computed as se, onBeforeMount as Je, onBeforeUnmount as Qe, createElementBlock as G, Fragment as Ue } from "vue";
2
+ import { detectLocale as U, useCoreStore as H } from "@feedmepos/mf-common";
3
+ import { d as V, u as je, a as ie, b as We, c as ce, e as Ke, f as Pe, g as Ge, h as ue, t as He, z as Xe, i as Ze } from "./app-CMF_9rbJ.js";
4
4
  import { storeToRefs as k } from "pinia";
5
- import { u as Me } from "./global-loader-BuxFfehu.js";
6
- import { u as et, a as tt } from "./report-BYoPJJLO.js";
7
- import { u as nt, _ as ot } from "./NavigationTab.vue_vue_type_script_setup_true_lang-caeBZJMd.js";
5
+ import { u as Ve } from "./global-loader-BuxFfehu.js";
6
+ import { u as Ye, a as Me } from "./report-CBkz_f_9.js";
7
+ import { u as et, _ as tt } from "./NavigationTab.vue_vue_type_script_setup_true_lang-DyfcyW_a.js";
8
8
  import { u as de } from "./message-dialog-UoMWOnil.js";
9
- import { u as rt } from "./_plugin-vue_export-helper-C6QDExPN.js";
10
- import { useRoute as at, useRouter as st } from "vue-router";
11
- const it = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, ct = /* @__PURE__ */ me({
9
+ import { u as nt } from "./_plugin-vue_export-helper-C6QDExPN.js";
10
+ import { useRoute as ot, useRouter as at } from "vue-router";
11
+ const rt = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, st = /* @__PURE__ */ me({
12
12
  __name: "Dialog",
13
13
  setup(q) {
14
- const { t: c } = rt(), g = de(), { isOpened: y, message: L, title: E } = k(de());
15
- return (T, R) => {
16
- const z = Z("FmButton"), j = Z("FmDialog");
14
+ const { t: c } = nt(), g = de(), { isOpened: y, message: E, title: L } = k(de());
15
+ return (T, _) => {
16
+ const z = X("FmButton"), j = X("FmDialog");
17
17
  return A(), pe(j, {
18
18
  modelValue: d(y),
19
- "onUpdate:modelValue": R[0] || (R[0] = (P) => xe(y) ? y.value = P : null),
19
+ "onUpdate:modelValue": _[0] || (_[0] = (W) => $e(y) ? y.value = W : null),
20
20
  overlay: "",
21
21
  "close-button": !1,
22
22
  "z-index": 3e3
23
23
  }, {
24
- "dialog-header": H(() => [
25
- Je(ae(d(E)), 1)
24
+ "dialog-header": P(() => [
25
+ xe(re(d(L)), 1)
26
26
  ]),
27
- default: H(() => [
28
- re("p", it, ae(d(L)), 1)
27
+ default: P(() => [
28
+ ae("p", rt, re(d(E)), 1)
29
29
  ]),
30
- "dialog-footer": H(() => [
31
- R[1] || (R[1] = re("div", { class: "grow" }, null, -1)),
32
- V(z, {
30
+ "dialog-footer": P(() => [
31
+ _[1] || (_[1] = ae("div", { class: "grow" }, null, -1)),
32
+ Z(z, {
33
33
  label: d(c)("report.common.cancel"),
34
34
  variant: "tertiary",
35
35
  onClick: d(g).dismiss
36
36
  }, null, 8, ["label", "onClick"]),
37
- V(z, {
37
+ Z(z, {
38
38
  label: d(c)("report.common.confirm"),
39
39
  onClick: d(g).confirm
40
40
  }, null, 8, ["label", "onClick"])
@@ -44,14 +44,14 @@ const it = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, ct
44
44
  };
45
45
  }
46
46
  }), le = Q(U());
47
- function ut() {
47
+ function it() {
48
48
  const q = (c) => {
49
49
  switch (le.value = c, c) {
50
50
  case "zh-CN":
51
- X.locale("zh-cn");
51
+ V.locale("zh-cn");
52
52
  break;
53
53
  default:
54
- X.locale("en");
54
+ V.locale("en");
55
55
  break;
56
56
  }
57
57
  };
@@ -61,23 +61,23 @@ function ut() {
61
61
  currentLocale: le
62
62
  };
63
63
  }
64
- X.locale(U() === "zh-CN" ? "zh-cn" : "en");
65
- const dt = ["src"], lt = ["src"], Rt = /* @__PURE__ */ me({
64
+ V.locale(U() === "zh-CN" ? "zh-cn" : "en");
65
+ const ct = ["src"], ut = ["src"], ht = /* @__PURE__ */ me({
66
66
  __name: "App",
67
67
  setup(q) {
68
- const { businessId: c, token: g, country: y } = k(Pe()), { sessionUser: L, currentBusiness: E, currentCountry: T, registerSidebarComponent: R } = W(), {
68
+ const { businessId: c, token: g, country: y } = k(je()), { sessionUser: E, currentBusiness: L, currentCountry: T, registerSidebarComponent: _ } = H(), {
69
69
  getRestaurantAndWarehouse: z,
70
70
  getBusinessSetting: j,
71
- beginBusinessLoad: P,
71
+ beginBusinessLoad: W,
72
72
  completeBusinessLoad: ge,
73
73
  resetTimezoneContext: ye
74
- } = ie(), ve = Ge(), { getFeatureFlags: Se } = ve, { version: v } = k(ce()), { getSettings: De } = He(), { loadHasDigest: he } = Ke(), { isAdmin: Ie } = We(), { promptLoader: Re } = Me(), n = at(), B = st(), b = et(), Y = nt(), a = ie(), F = ce(), { suppressReportRouteSync: N } = k(F), { getReports: _e, getOverviewReport: Le, getReportConfig: Ee, currentReportId: M } = b, { currentReportId: be, reports: we } = k(b), { getSchema: Ae } = tt(), { fetchSchedules: Ce } = Y, { init: ke } = Ze(), G = Q("v5"), O = Q(!1), $ = Q(!0), qe = se(() => `https://portal-v1.feedme.cc/b/${c.value}/report/CLOSE_UP?showHeader=false&country=${y.value.toUpperCase()}&menuOption=business-report&token=${g.value}&v2=true&reportV5Button=true`), Te = se(() => `https://report-v4.feedme.cc?businessId=${c.value}&country=${y.value}&token=${g.value}&reportV3Button=true`);
74
+ } = ie(), ve = We(), { getFeatureFlags: Se } = ve, { version: v } = k(ce()), { getSettings: De } = Ke(), { loadHasDigest: he } = Pe(), { promptLoader: Ie } = Ve(), n = ot(), N = at(), b = Ye(), Y = et(), r = ie(), B = ce(), { suppressReportRouteSync: F } = k(B), { getReports: _e, getOverviewReport: Re, getReportConfig: Ee, currentReportId: M } = b, { currentReportId: Le, reports: be } = k(b), { getSchema: we } = Me(), { fetchSchedules: Ae } = Y, { init: Ce } = Ge(), K = Q("v5"), O = Q(!1), $ = Q(!0), ke = se(() => `https://portal-v1.feedmedev.cc/b/${c.value}/report/CLOSE_UP?showHeader=false&country=${y.value.toUpperCase()}&menuOption=business-report&token=${g.value}&v2=true&reportV5Button=true`), qe = se(() => `https://report-v4.feedmedev.cc?businessId=${c.value}&country=${y.value}&token=${g.value}&reportV3Button=true`);
75
75
  C(
76
- [() => E.value, () => L.value, () => T.value],
76
+ [() => L.value, () => E.value, () => T.value],
77
77
  () => {
78
78
  var e, o;
79
- const t = ((e = E.value) == null ? void 0 : e.id) ?? "";
80
- E.value && L.value && T.value && (c.value !== t && (c.value = t), g.value = ((o = L.value) == null ? void 0 : o.token) ?? "", y.value = T.value ?? "");
79
+ const t = ((e = L.value) == null ? void 0 : e.id) ?? "";
80
+ L.value && E.value && T.value && (c.value !== t && (c.value = t), g.value = ((o = E.value) == null ? void 0 : o.token) ?? "", y.value = T.value ?? "");
81
81
  },
82
82
  { immediate: !0 }
83
83
  );
@@ -94,21 +94,21 @@ const dt = ["src"], lt = ["src"], Rt = /* @__PURE__ */ me({
94
94
  if (typeof t.data == "string")
95
95
  try {
96
96
  const e = JSON.parse(t.data);
97
- (e == null ? void 0 : e.v5) === !0 ? v.value = G.value : (e == null ? void 0 : e.v3) === !0 && (v.value = "v3");
97
+ (e == null ? void 0 : e.v5) === !0 ? v.value = K.value : (e == null ? void 0 : e.v3) === !0 && (v.value = "v3");
98
98
  } catch (e) {
99
99
  console.error(e);
100
100
  }
101
101
  }
102
102
  C(v, () => {
103
- ["v3", "v4"].includes(v.value) ? W().hideSidebarToggle(!0) : W().hideSidebarToggle(!1);
104
- }), Qe(() => {
105
- R(ot);
103
+ ["v3", "v4"].includes(v.value) ? H().hideSidebarToggle(!0) : H().hideSidebarToggle(!1);
104
+ }), Je(() => {
105
+ _(tt);
106
106
  }), fe(() => {
107
- console.log("5.32.0", !0), window.addEventListener("message", ee), window.addEventListener("message", te);
108
- }), Ue(() => {
107
+ console.log("5.32.1-beta.0", !0), window.addEventListener("message", ee), window.addEventListener("message", te);
108
+ }), Qe(() => {
109
109
  window.removeEventListener("message", ee), window.removeEventListener("message", te), b.$dispose(), Y.$dispose();
110
110
  });
111
- function ze(t) {
111
+ function Te(t) {
112
112
  try {
113
113
  return decodeURIComponent(t);
114
114
  } catch {
@@ -117,17 +117,17 @@ const dt = ["src"], lt = ["src"], Rt = /* @__PURE__ */ me({
117
117
  }
118
118
  function x(t) {
119
119
  if (typeof t != "string" || t.length === 0) return;
120
- const e = t.includes("%") ? [t, ze(t)] : [t];
120
+ const e = t.includes("%") ? [t, Te(t)] : [t];
121
121
  for (const o of e)
122
122
  try {
123
- const r = JSON.parse(o);
124
- if (typeof r == "string")
123
+ const a = JSON.parse(o);
124
+ if (typeof a == "string")
125
125
  try {
126
- return JSON.parse(r);
126
+ return JSON.parse(a);
127
127
  } catch {
128
- return r;
128
+ return a;
129
129
  }
130
- return r;
130
+ return a;
131
131
  } catch {
132
132
  }
133
133
  }
@@ -138,37 +138,37 @@ const dt = ["src"], lt = ["src"], Rt = /* @__PURE__ */ me({
138
138
  }
139
139
  function l(t, e, o) {
140
140
  if (typeof t != "string" || t.length === 0) return;
141
- const r = Ve(t, o);
142
- return e === "start" ? Xe(r, o) : Ye(r, o);
141
+ const a = He(t, o);
142
+ return e === "start" ? Xe(a, o) : Ze(a, o);
143
143
  }
144
- function Be(t = n.query) {
145
- const e = t, o = a.timezone, r = l(e.startDate, "start", o), m = l(e.endDate, "end", o), i = typeof e.timeStart == "string", S = typeof e.timeEnd == "string", D = x(e.timeStart), h = x(e.timeEnd), w = ne(D) ? D : null, p = ne(h) ? h : null, _ = l(e.compareStartDate, "start", o), u = l(e.compareEndDate, "end", o), J = e.isAllLocation === "true" || e.isAllLocation === void 0;
144
+ function ze(t = n.query) {
145
+ const e = t, o = r.timezone, a = l(e.startDate, "start", o), m = l(e.endDate, "end", o), i = typeof e.timeStart == "string", S = typeof e.timeEnd == "string", D = x(e.timeStart), h = x(e.timeEnd), w = ne(D) ? D : null, p = ne(h) ? h : null, R = l(e.compareStartDate, "start", o), u = l(e.compareEndDate, "end", o), J = e.isAllLocation === "true" || e.isAllLocation === void 0;
146
146
  let f = [];
147
147
  if (J)
148
- f = a.selectedLocationIds ?? [];
148
+ f = r.selectedLocationIds ?? [];
149
149
  else {
150
150
  const s = x(e.locationIds);
151
151
  f = Array.isArray(s) ? s : [];
152
152
  }
153
153
  let I = e.reportId || M;
154
- if (we.value.find((s) => s.id === I) || (I = M), I && I !== b.currentReportId && b.updateCurrentReportId(I), r || m) {
155
- const s = a.dateRange;
156
- (s.startDate !== r || s.endDate !== m) && a.setDateRange({ startDate: r, endDate: m });
154
+ if (be.value.find((s) => s.id === I) || (I = M), I && I !== b.currentReportId && b.updateCurrentReportId(I), a || m) {
155
+ const s = r.dateRange;
156
+ (s.startDate !== a || s.endDate !== m) && r.setDateRange({ startDate: a, endDate: m });
157
157
  }
158
158
  if (i || S) {
159
- const s = a.timeRange;
160
- (s.start !== w || s.end !== p) && a.setTimeRange({ start: w, end: p });
159
+ const s = r.timeRange;
160
+ (s.start !== w || s.end !== p) && r.setTimeRange({ start: w, end: p });
161
161
  }
162
- if (_ || u) {
163
- const s = a.compareDateRange;
164
- (s.startDate !== _ || s.endDate !== u) && a.setCompareDateRange({
165
- startDate: _,
162
+ if (R || u) {
163
+ const s = r.compareDateRange;
164
+ (s.startDate !== R || s.endDate !== u) && r.setCompareDateRange({
165
+ startDate: R,
166
166
  endDate: u
167
167
  });
168
168
  }
169
169
  if (!J) {
170
- const s = a.selectedLocationIds;
171
- s.length === f.length && s.every((Oe, $e) => Oe === f[$e]) || a.setSelectedLocationIds(f);
170
+ const s = r.selectedLocationIds;
171
+ s.length === f.length && s.every((Fe, Oe) => Fe === f[Oe]) || r.setSelectedLocationIds(f);
172
172
  }
173
173
  return {
174
174
  // TODO: this returned value can used for getBusinessSetting
@@ -187,23 +187,23 @@ const dt = ["src"], lt = ["src"], Rt = /* @__PURE__ */ me({
187
187
  () => c.value,
188
188
  async (t, e) => {
189
189
  if (t !== "") {
190
- O.value = !1, P(t);
191
- const o = "mf-report-prev-business-id", r = (() => {
190
+ O.value = !1, W(t);
191
+ const o = "mf-report-prev-business-id", a = (() => {
192
192
  try {
193
193
  return sessionStorage.getItem(o);
194
194
  } catch {
195
195
  return null;
196
196
  }
197
- })(), m = !!r && r !== t;
197
+ })(), m = !!a && a !== t;
198
198
  let i = { ...n.query }, S = !1;
199
199
  if (!$.value || e !== void 0 || m) {
200
- ye(), a.setSelectedLocationIds([]);
200
+ ye(), r.setSelectedLocationIds([]);
201
201
  const {
202
202
  locationIds: D,
203
203
  startDate: h,
204
204
  endDate: w,
205
205
  timeStart: p,
206
- timeEnd: _,
206
+ timeEnd: R,
207
207
  compareStartDate: u,
208
208
  compareEndDate: J,
209
209
  ...f
@@ -211,31 +211,31 @@ const dt = ["src"], lt = ["src"], Rt = /* @__PURE__ */ me({
211
211
  i = {
212
212
  ...f,
213
213
  isAllLocation: "true"
214
- }, S = !0, await B.replace({
214
+ }, S = !0, await N.replace({
215
215
  name: n.name,
216
216
  params: n.params,
217
217
  query: i
218
218
  });
219
219
  }
220
- N.value !== void 0 && (N.value = !0), await Re(async () => {
221
- await ke({
222
- apiKey: "6GhcttsJ9Rj9cTevcdrpin",
220
+ F.value !== void 0 && (F.value = !0), await Ie(async () => {
221
+ await Ce({
222
+ apiKey: "MaGoXrEWuEJNpWgKTqseee",
223
223
  url: "https://flag.feedme.farm/api/v1/",
224
224
  enableAnalytics: !1,
225
225
  cacheFlags: !1
226
226
  });
227
227
  const D = await Ee();
228
- G.value = D.version, v.value = G.value, await Se(), n.name === "template" && !F.canAccessTemplate() && await B.replace({
228
+ K.value = D.version, v.value = K.value, await Se(), n.name === "template" && !B.canAccessTemplate() && await N.replace({
229
229
  name: "reports",
230
230
  query: n.query
231
231
  });
232
- const h = F.canAccess(
232
+ const h = B.canAccess(
233
233
  ue.report_accessOverview
234
- ), w = F.canAccess(
234
+ ), w = B.canAccess(
235
235
  ue.report_accessIntegration
236
236
  ), p = [
237
+ we(),
237
238
  Ae(),
238
- Ce(),
239
239
  _e(),
240
240
  z(
241
241
  (() => {
@@ -244,22 +244,22 @@ const dt = ["src"], lt = ["src"], Rt = /* @__PURE__ */ me({
244
244
  })()
245
245
  )
246
246
  ];
247
- h && p.push(Le()), w && p.push(De()), Ie.value && p.push(he());
248
- const _ = await Promise.allSettled(p);
249
- for (const u of _)
247
+ h && p.push(Re()), w && p.push(De()), p.push(he());
248
+ const R = await Promise.allSettled(p);
249
+ for (const u of R)
250
250
  u.status === "rejected" && console.log(u.reason);
251
- if (await j(), Be(i), S) {
251
+ if (await j(), ze(i), S) {
252
252
  const {
253
253
  locationIds: u,
254
254
  startDate: J,
255
255
  endDate: f,
256
256
  timeStart: I,
257
- timeEnd: Fe,
257
+ timeEnd: Ne,
258
258
  compareStartDate: s,
259
- compareEndDate: Ne,
259
+ compareEndDate: Be,
260
260
  ...oe
261
261
  } = n.query;
262
- (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 B.replace({
262
+ (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 N.replace({
263
263
  name: n.name,
264
264
  params: n.params,
265
265
  query: {
@@ -281,20 +281,20 @@ const dt = ["src"], lt = ["src"], Rt = /* @__PURE__ */ me({
281
281
  }
282
282
  ), C(
283
283
  () => (O.value, {
284
- reportId: be.value,
285
- selectedLocationIds: a.selectedLocationIds,
286
- dateRange: a.dateRange,
287
- timeRange: a.timeRange,
288
- compareDateRange: a.compareDateRange,
289
- timezone: a.timezone
284
+ reportId: Le.value,
285
+ selectedLocationIds: r.selectedLocationIds,
286
+ dateRange: r.dateRange,
287
+ timeRange: r.timeRange,
288
+ compareDateRange: r.compareDateRange,
289
+ timezone: r.timezone
290
290
  }),
291
291
  (t) => {
292
292
  if (!O.value || !t.reportId || $.value) return;
293
- if (N.value) {
294
- N.value = !1;
293
+ if (F.value) {
294
+ F.value = !1;
295
295
  return;
296
296
  }
297
- const e = t.selectedLocationIds, o = t.dateRange, r = t.timeRange, m = t.compareDateRange, i = {
297
+ const e = t.selectedLocationIds, o = t.dateRange, a = t.timeRange, m = t.compareDateRange, i = {
298
298
  ...n.query,
299
299
  reportId: t.reportId,
300
300
  startDate: l(o.startDate, "start", t.timezone),
@@ -305,35 +305,35 @@ const dt = ["src"], lt = ["src"], Rt = /* @__PURE__ */ me({
305
305
  t.timezone
306
306
  ),
307
307
  compareEndDate: l(m.endDate, "end", t.timezone),
308
- timeStart: r.start ? JSON.stringify(r.start) : void 0,
309
- timeEnd: r.end ? JSON.stringify(r.end) : void 0
310
- }, S = e.length === a.locations.length;
308
+ timeStart: a.start ? JSON.stringify(a.start) : void 0,
309
+ timeEnd: a.end ? JSON.stringify(a.end) : void 0
310
+ }, S = e.length === r.locations.length;
311
311
  i.isAllLocation = String(S), S ? delete i.locationIds : e.length > 0 ? i.locationIds = JSON.stringify(e) : delete i.locationIds;
312
312
  const D = JSON.stringify(n.query), h = JSON.stringify(i);
313
- D !== h && B.replace({
313
+ D !== h && N.replace({
314
314
  name: n.name,
315
315
  params: n.params,
316
316
  query: i
317
317
  });
318
318
  },
319
319
  { deep: !0 }
320
- ), ut(), (t, e) => {
321
- const o = Z("router-view");
322
- return A(), K(je, null, [
323
- V(ct),
324
- d(v) === "v3" ? (A(), K("iframe", {
320
+ ), it(), (t, e) => {
321
+ const o = X("router-view");
322
+ return A(), G(Ue, null, [
323
+ Z(st),
324
+ d(v) === "v3" ? (A(), G("iframe", {
325
325
  key: 0,
326
326
  class: "bg-white h-full w-full",
327
- src: qe.value
328
- }, null, 8, dt)) : d(v) === "v4" ? (A(), K("iframe", {
327
+ src: ke.value
328
+ }, null, 8, ct)) : d(v) === "v4" ? (A(), G("iframe", {
329
329
  key: 1,
330
330
  class: "bg-white h-full w-full",
331
- src: Te.value
332
- }, null, 8, lt)) : (A(), pe(o, { key: 2 }))
331
+ src: qe.value
332
+ }, null, 8, ut)) : (A(), pe(o, { key: 2 }))
333
333
  ], 64);
334
334
  };
335
335
  }
336
336
  });
337
337
  export {
338
- Rt as default
338
+ ht as default
339
339
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as ne, resolveComponent as A, createBlock as b, openBlock as C, normalizeClass as fe, withCtx as U, createCommentVNode as F, createElementVNode as I, toDisplayString as De, renderSlot as ye, mergeModels as K, useModel as L, ref as P, computed as z, watch as M, nextTick as Z, onMounted as pe, onBeforeUnmount as ve, createElementBlock as ge, unref as $, createVNode as J } from "vue";
2
- import { d as i, a as he, j as Q, z as X, C as E, p as Ce, t as be } from "./app-DvNjldW6.js";
2
+ import { d as i, a as he, i as Q, z as X, C as E, p as Ce, t as be } from "./app-CMF_9rbJ.js";
3
3
  import { detectLocale as _ } from "@feedmepos/mf-common";
4
4
  import { u as Re, _ as Me } from "./_plugin-vue_export-helper-C6QDExPN.js";
5
5
  import { storeToRefs as Ye } from "pinia";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as u, computed as p, resolveComponent as f, createElementBlock as r, openBlock as t, normalizeStyle as n, normalizeClass as d, unref as e, createBlock as y, createCommentVNode as _, createVNode as h, createElementVNode as k, toDisplayString as g, renderSlot as x } from "vue";
2
- import { _ as v } from "./NavigationTab.vue_vue_type_script_setup_true_lang-caeBZJMd.js";
2
+ import { _ as v } from "./NavigationTab.vue_vue_type_script_setup_true_lang-DyfcyW_a.js";
3
3
  import { useBreakpoints as b } from "@feedmepos/ui-library";
4
4
  import { storeToRefs as C } from "pinia";
5
5
  import { u as q } from "./global-loader-BuxFfehu.js";
@@ -1,13 +1,13 @@
1
- import { defineComponent as ve, ref as C, watch as Le, onBeforeUnmount as Ce, computed as u, createElementBlock as r, openBlock as o, normalizeClass as H, createElementVNode as v, createCommentVNode as m, renderSlot as Re, createTextVNode as Te, toDisplayString as y, unref as x, Fragment as w, renderList as q, resolveComponent as he, createBlock as oe, withCtx as le, createVNode as Z, createSlots as Ee, onMounted as je, onUnmounted as qe } from "vue";
1
+ import { defineComponent as ve, ref as C, watch as Le, onBeforeUnmount as Ce, computed as u, createElementBlock as r, openBlock as o, normalizeClass as H, createElementVNode as v, createCommentVNode as m, renderSlot as Re, createTextVNode as Te, toDisplayString as y, unref as x, Fragment as w, renderList as q, resolveComponent as he, createBlock as oe, withCtx as le, createVNode as Z, createSlots as je, onMounted as Ee, onUnmounted as qe } from "vue";
2
2
  import { storeToRefs as Ie } from "pinia";
3
3
  import { useI18n as fe } from "@feedmepos/mf-common";
4
4
  import { useBreakpoints as Se } from "@feedmepos/ui-library";
5
- import { _ as Oe } from "./Default.vue_vue_type_script_setup_true_lang-B0KI2grl.js";
5
+ import { _ as Oe } from "./Default.vue_vue_type_script_setup_true_lang-pxeEGv9f.js";
6
6
  import { _ as we } from "./SelectComponent.vue_vue_type_script_setup_true_lang-DW7Dk7iQ.js";
7
7
  import { useRoute as Ne } from "vue-router";
8
- import { c as Pe, d as Be, u as Ae, a as He, n as Xe, _ as ze, D as Ye } from "./useDigestFont-qj5lGRy-.js";
8
+ import { c as Pe, d as Be, u as Ae, a as He, n as Xe, _ as ze, D as Ye } from "./useDigestFont-DQ0uozM-.js";
9
9
  import { _ as ge } from "./_plugin-vue_export-helper-C6QDExPN.js";
10
- import { g as Ue, f as We, A as Ze, k as be, r as Ge, l as Ke } from "./app-DvNjldW6.js";
10
+ import { j as Ue, f as We, A as Ze, k as be, r as Ge, l as Ke } from "./app-CMF_9rbJ.js";
11
11
  const Je = { class: "flex items-center justify-between gap-8" }, Qe = { class: "digest-kind" }, et = ["viewBox", "height", "aria-label"], tt = ["x2", "y1", "y2"], st = ["d"], at = ["d"], ot = ["d"], nt = ["x", "y", "width", "height"], rt = ["x", "y"], lt = ["x", "y", "width", "height"], it = ["x1", "x2", "y1", "y2"], ut = ["cx", "cy"], dt = ["x", "y", "text-anchor"], ct = ["x"], ht = ["x", "y"], vt = {
12
12
  key: 1,
13
13
  class: "flex items-start gap-8",
@@ -77,13 +77,13 @@ const Je = { class: "flex items-center justify-between gap-8" }, Qe = { class: "
77
77
  }), T = u(() => {
78
78
  var e;
79
79
  return ((e = n.cover) == null ? void 0 : e.x.length) ?? 0;
80
- }), G = u(() => T.value > 1 ? (B.value - W * 2) / (T.value - 1) : 0), E = (e) => T.value > 1 ? W + e * G.value : B.value / 2;
80
+ }), G = u(() => T.value > 1 ? (B.value - W * 2) / (T.value - 1) : 0), j = (e) => T.value > 1 ? W + e * G.value : B.value / 2;
81
81
  function K(e) {
82
82
  let s = "M";
83
83
  return e.map((t, i) => {
84
84
  if (t === null)
85
85
  return s = "M", "";
86
- const a = `${s}${E(i).toFixed(1)},${D.value(t).toFixed(1)}`;
86
+ const a = `${s}${j(i).toFixed(1)},${D.value(t).toFixed(1)}`;
87
87
  return s = "L", a;
88
88
  }).join(" ");
89
89
  }
@@ -97,7 +97,7 @@ const Je = { class: "flex items-center justify-between gap-8" }, Qe = { class: "
97
97
  const e = ((t = n.cover) == null ? void 0 : t.kind) === "line" ? (i = n.cover.series[0]) == null ? void 0 : i.values : void 0;
98
98
  if (!e || e.some((a) => a === null) || e.length < 2) return "";
99
99
  const s = (k.value - _.value).toFixed(1);
100
- return `${K(e)} L${E(e.length - 1).toFixed(1)},${s} L${E(0).toFixed(1)},${s} Z`;
100
+ return `${K(e)} L${j(e.length - 1).toFixed(1)},${s} L${j(0).toFixed(1)},${s} Z`;
101
101
  }), S = u(() => (B.value - W * 2) / Math.max(T.value, 1)), X = u(() => {
102
102
  var e;
103
103
  return Math.min(((e = n.cover) == null ? void 0 : e.series.length) ?? 0, 2);
@@ -129,7 +129,7 @@ const Je = { class: "flex items-center justify-between gap-8" }, Qe = { class: "
129
129
  }).format(i), c = t === "ratio" || t === "percent" ? "%" : "";
130
130
  return `${s ? "" : e < 0 ? "−" : "+"}${a}${c}`;
131
131
  }
132
- const j = u(() => {
132
+ const E = u(() => {
133
133
  const e = V.value, s = S.value * 0.6, t = R.value.map((a, c) => {
134
134
  const d = D.value(a.total ? e : a.from), h = D.value(a.to), g = W + c * S.value + (S.value - s) / 2;
135
135
  return {
@@ -151,7 +151,7 @@ const Je = { class: "flex items-center justify-between gap-8" }, Qe = { class: "
151
151
  var xe;
152
152
  const d = (xe = e.series[a.series]) == null ? void 0 : xe.values[a.at];
153
153
  if (d == null || !s && a.series >= X.value) return [];
154
- const h = s ? E(a.at) : ee(a.at, a.series) + Q.value / 2, g = D.value(d), $ = h > B.value * 0.8 ? "end" : h < B.value * 0.2 ? "start" : "middle", z = te(a.label), Y = $ === "end" ? h - z : $ === "start" ? h : h - z / 2, ue = !s && d < 0, U = s ? Math.max(g - 12, 16) : ue ? g + 14 : g - 6, pe = ue ? 14 : -14, De = (de) => de >= 12 && de <= k.value - _.value && !t.some((ce) => Y < ce.x1 && Y + z > ce.x0 && Math.abs(de - ce.y) < 14), ye = [U, U + pe, U + pe * 2], _e = D.value(0) + (ue ? -6 : 14), L = (s ? n.hero ? [...ye, g + 22, g + 36] : [U] : [...n.hero ? ye : [U], _e]).find(De);
154
+ const h = s ? j(a.at) : ee(a.at, a.series) + Q.value / 2, g = D.value(d), $ = h > B.value * 0.8 ? "end" : h < B.value * 0.2 ? "start" : "middle", z = te(a.label), Y = $ === "end" ? h - z : $ === "start" ? h : h - z / 2, ue = !s && d < 0, U = s ? Math.max(g - 12, 16) : ue ? g + 14 : g - 6, pe = ue ? 14 : -14, De = (de) => de >= 12 && de <= k.value - _.value && !t.some((ce) => Y < ce.x1 && Y + z > ce.x0 && Math.abs(de - ce.y) < 14), ye = [U, U + pe, U + pe * 2], _e = D.value(0) + (ue ? -6 : 14), L = (s ? n.hero ? [...ye, g + 22, g + 36] : [U] : [...n.hero ? ye : [U], _e]).find(De);
155
155
  L !== void 0 && t.push({ x0: Y, x1: Y + z, y: L });
156
156
  const ke = s ? 6 : 2, Fe = L === void 0 || L === U || !s && L === _e ? void 0 : L < g ? [g - ke, L + 3] : [g + ke, L - 11];
157
157
  return [
@@ -183,7 +183,7 @@ const Je = { class: "flex items-center justify-between gap-8" }, Qe = { class: "
183
183
  const e = n.cover;
184
184
  if (!n.hero || !e) return [];
185
185
  const s = e.kind !== "line", t = Math.ceil(e.x.length / mt), i = e.x.length - 1, a = (s ? S.value : G.value) * t, c = e.x.map((d, h) => ({
186
- x: s ? W + h * S.value + S.value / 2 : E(h),
186
+ x: s ? W + h * S.value + S.value / 2 : j(h),
187
187
  lines: A(Pe(e, h, N.value), a, s),
188
188
  marked: (e.marks ?? []).some((g) => g.at === h)
189
189
  })).filter((d, h) => (i - h) % t === 0);
@@ -252,7 +252,7 @@ const Je = { class: "flex items-center justify-between gap-8" }, Qe = { class: "
252
252
  d: J.value[0],
253
253
  class: "line"
254
254
  }, null, 8, ot)) : m("", !0)
255
- ], 64)) : e.cover.kind === "waterfall" ? (o(!0), r(w, { key: 1 }, q(j.value, (t) => (o(), r(w, {
255
+ ], 64)) : e.cover.kind === "waterfall" ? (o(!0), r(w, { key: 1 }, q(E.value, (t) => (o(), r(w, {
256
256
  key: t.key
257
257
  }, [
258
258
  v("rect", {
@@ -390,7 +390,7 @@ const Je = { class: "flex items-center justify-between gap-8" }, Qe = { class: "
390
390
  quote: k.value,
391
391
  dark: f.hero || !f.card.read,
392
392
  hero: M.value
393
- }, Ee({ _: 2 }, [
393
+ }, je({ _: 2 }, [
394
394
  f.card.read ? void 0 : {
395
395
  name: "badge",
396
396
  fn: le(() => [
@@ -455,10 +455,10 @@ const Je = { class: "flex items-center justify-between gap-8" }, Qe = { class: "
455
455
  key: 0,
456
456
  class: "mx-24 mt-24 flex flex-col gap-12",
457
457
  "aria-labelledby": "digest-new-heading"
458
- }, Et = {
458
+ }, jt = {
459
459
  id: "digest-new-heading",
460
460
  class: "fm-typo-en-title-sm-600"
461
- }, jt = {
461
+ }, Et = {
462
462
  key: 1,
463
463
  class: "mx-24 mt-[40px] flex flex-col gap-12",
464
464
  "aria-labelledby": "digest-earlier-heading"
@@ -475,21 +475,21 @@ const Je = { class: "flex items-center justify-between gap-8" }, Qe = { class: "
475
475
  Ae();
476
476
  const _ = C([]), k = C(), O = C(!0), f = C(!1), F = C(""), R = C(!1), b = C(), V = C("");
477
477
  let D;
478
- const T = (l) => l instanceof Error ? l.message : String(l), G = (l) => l instanceof Ze && l.status === 403, E = u(() => _.value[0]), K = u(() => _.value.slice(1)), J = u(
478
+ const T = (l) => l instanceof Error ? l.message : String(l), G = (l) => l instanceof Ze && l.status === 403, j = u(() => _.value[0]), K = u(() => _.value.slice(1)), J = u(
479
479
  () => {
480
480
  var l;
481
481
  return (l = B.value) != null && l.scheduled ? He(Xe(/* @__PURE__ */ new Date()), N.value) : "";
482
482
  }
483
483
  ), re = u(
484
484
  () => {
485
- var l, j;
486
- return ((l = b.value) == null ? void 0 : l.status) === "requested" || ((j = b.value) == null ? void 0 : j.status) === "running";
485
+ var l, E;
486
+ return ((l = b.value) == null ? void 0 : l.status) === "requested" || ((E = b.value) == null ? void 0 : E.status) === "running";
487
487
  }
488
488
  ), S = u(() => {
489
489
  const l = b.value;
490
490
  if (!l) return "";
491
- const j = new Date(Date.parse(`${l.weekStart}T00:00:00Z`) + 6 * 864e5).toISOString().slice(0, 10), te = {
492
- week: Be(l.weekStart, j, N.value),
491
+ const E = new Date(Date.parse(`${l.weekStart}T00:00:00Z`) + 6 * 864e5).toISOString().slice(0, 10), te = {
492
+ week: Be(l.weekStart, E, N.value),
493
493
  failure: (l.failure ?? "").split(`
494
494
  `)[0].slice(0, 160)
495
495
  };
@@ -519,7 +519,7 @@ const Je = { class: "flex items-center justify-between gap-8" }, Qe = { class: "
519
519
  }
520
520
  }
521
521
  }
522
- je(async () => {
522
+ Ee(async () => {
523
523
  await Promise.all([
524
524
  X(),
525
525
  M.loadSubscription().catch((l) => {
@@ -532,8 +532,8 @@ const Je = { class: "flex items-center justify-between gap-8" }, Qe = { class: "
532
532
  if (l) {
533
533
  try {
534
534
  b.value = await Ke(l.id);
535
- } catch (j) {
536
- V.value = T(j);
535
+ } catch (E) {
536
+ V.value = T(E);
537
537
  return;
538
538
  }
539
539
  if (re.value) {
@@ -553,7 +553,7 @@ const Je = { class: "flex items-center justify-between gap-8" }, Qe = { class: "
553
553
  }
554
554
  return qe(() => {
555
555
  D && clearTimeout(D);
556
- }), (l, j) => {
556
+ }), (l, E) => {
557
557
  const te = he("FmButton"), ie = he("FmPageHead");
558
558
  return o(), oe(Oe, null, {
559
559
  default: le(() => [
@@ -598,14 +598,14 @@ const Je = { class: "flex items-center justify-between gap-8" }, Qe = { class: "
598
598
  title: x(p)("reportV5.digest.emptyTitle"),
599
599
  "sub-title": x(p)("reportV5.digest.emptyBody")
600
600
  }, null, 8, ["title", "sub-title"])) : _.value.length ? (o(), r(w, { key: 2 }, [
601
- E.value ? (o(), r("section", Tt, [
602
- v("h2", Et, y(x(p)(E.value.read ? "reportV5.digest.latest" : "reportV5.digest.newForYou")), 1),
601
+ j.value ? (o(), r("section", Tt, [
602
+ v("h2", jt, y(x(p)(j.value.read ? "reportV5.digest.latest" : "reportV5.digest.newForYou")), 1),
603
603
  Z($e, {
604
- card: E.value,
604
+ card: j.value,
605
605
  hero: ""
606
606
  }, null, 8, ["card"])
607
607
  ])) : m("", !0),
608
- K.value.length ? (o(), r("section", jt, [
608
+ K.value.length ? (o(), r("section", Et, [
609
609
  v("h2", qt, y(x(p)("reportV5.digest.earlier")), 1),
610
610
  v("div", It, [
611
611
  (o(!0), r(w, null, q(K.value, (A) => (o(), oe($e, {
@@ -2,11 +2,11 @@ import { defineComponent as be, ref as h, watch as W, onMounted as _e, nextTick
2
2
  import { useRoute as mt, useRouter as ft } from "vue-router";
3
3
  import { useI18n as xe } from "@feedmepos/mf-common";
4
4
  import { useBreakpoints as vt } from "@feedmepos/ui-library";
5
- import { _ as gt } from "./Default.vue_vue_type_script_setup_true_lang-B0KI2grl.js";
5
+ import { _ as gt } from "./Default.vue_vue_type_script_setup_true_lang-pxeEGv9f.js";
6
6
  import { _ as ke } from "./SelectComponent.vue_vue_type_script_setup_true_lang-DW7Dk7iQ.js";
7
- import { u as ht, a as kt, R as wt, b as yt, c as bt, d as _t, e as xt } from "./useReportCanvasPanel-BJTLOzd9.js";
8
- import { b as St, d as Ct, a as Vt, _ as Rt, D as Tt } from "./useDigestFont-qj5lGRy-.js";
9
- import { f as Et, m as It, n as At, A as we } from "./app-DvNjldW6.js";
7
+ import { u as ht, a as kt, R as wt, b as yt, c as bt, d as _t, e as xt } from "./useReportCanvasPanel-BSJyXKS3.js";
8
+ import { b as St, d as Ct, a as Vt, _ as Rt, D as Tt } from "./useDigestFont-DQ0uozM-.js";
9
+ import { f as Et, m as It, n as At, A as we } from "./app-CMF_9rbJ.js";
10
10
  import { _ as Mt } from "./_plugin-vue_export-helper-C6QDExPN.js";
11
11
  const Pt = ["srcdoc", "title"], Bt = /* @__PURE__ */ be({
12
12
  __name: "DigestCanvasFrame",
@@ -1,12 +1,12 @@
1
1
  import { computed as c, defineComponent as ze, ref as k, watch as Le, onMounted as jt, onBeforeUnmount as Eo, resolveComponent as be, createBlock as ye, openBlock as G, Transition as Ya, withCtx as Re, createElementBlock as pe, createCommentVNode as we, createElementVNode as Q, unref as l, normalizeStyle as Ve, withModifiers as Cn, toDisplayString as Me, createVNode as Ce, Fragment as Ye, renderList as St, normalizeClass as Fe, nextTick as Go, mergeModels as ot, useModel as at, renderSlot as gt, h as Pt, createSlots as Xa, resolveDynamicComponent as jo, markRaw as So, toRaw as Ea, createTextVNode as Ga, onUnmounted as Yn, provide as ja, inject as qa, withDirectives as Ja, vShow as Za } from "vue";
2
- import { u as Qa, h as er, i as qo, j as tr, q as ko, k as nr } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-CqSpNI7C.js";
3
- import { u as Ln, ae as xn, a as _n, af as or } from "./app-DvNjldW6.js";
4
- import { W as Z, S as Je, v as Kt, F as Ot, c as gn, w as Hn, d as ar, o as rr, x as lr, E as Mt, y as sr } from "./report-BYoPJJLO.js";
5
- import { c as Dn, w as Et } from "./currency-DkfeAufo.js";
6
- import { d as Xn } from "./DateRangeSelect-ByNkTDjz.js";
2
+ import { u as Qa, h as er, i as qo, j as tr, q as ko, k as nr } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-K7CvZban.js";
3
+ import { u as Ln, ae as xn, a as _n, af as or } from "./app-CMF_9rbJ.js";
4
+ import { W as Z, S as Je, v as Kt, F as Ot, c as gn, w as Hn, d as ar, o as rr, x as lr, E as Mt, y as sr } from "./report-CBkz_f_9.js";
5
+ import { c as Dn, w as Et } from "./currency-D5JvORk7.js";
6
+ import { d as Xn } from "./DateRangeSelect-DWuJKk38.js";
7
7
  import { storeToRefs as At } from "pinia";
8
8
  import { detectLocale as oo } from "@feedmepos/mf-common";
9
- import "./index-BfS1DQsO.js";
9
+ import "./index-BjEEjEBa.js";
10
10
  import { C as En, t as ir } from "./chart-BywXiz4O.js";
11
11
  import { useBreakpoints as qt, useSnackbar as Sn, components as ur } from "@feedmepos/ui-library";
12
12
  import { u as kt, _ as Jo } from "./_plugin-vue_export-helper-C6QDExPN.js";