@feedmepos/mf-report 5.32.2 → 5.32.3-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 (40) hide show
  1. package/dist/{App-CbDEdVR2.js → App-BNQfnOS8.js} +81 -81
  2. package/dist/{DateRangeSelect-PE9H0GCA.js → DateRangeSelect-BS73I-EY.js} +1 -1
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-Cfu4CYAi.js → Default.vue_vue_type_script_setup_true_lang-D0mOTzcw.js} +1 -1
  4. package/dist/DigestListView-C8FI4P9l.js +876 -0
  5. package/dist/DigestReaderView-uYimDn1a.js +526 -0
  6. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-ldmbZtLO.js → DynamicWidget.vue_vue_type_script_setup_true_lang-g0wq9TN7.js} +6 -6
  7. package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-ud-55uWq.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-C6Kk1Oc6.js} +4 -4
  8. package/dist/{InsightView-B8ulTYh7.js → InsightView-CYY3JR4R.js} +5 -5
  9. package/dist/{Integration-DgYDFNeI.js → Integration-CV75SnmP.js} +179 -179
  10. package/dist/{Integrations-CKJ6D7qd.js → Integrations-CtE730pa.js} +2 -2
  11. package/dist/{Layout-DUIZFKm9.js → Layout-DjQ9AR4L.js} +1 -1
  12. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-DM0WlrQc.js → LocationSelect.vue_vue_type_script_setup_true_lang-CLZJZtaS.js} +2 -2
  13. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-UynluHLf.js → MenuTab.vue_vue_type_script_setup_true_lang-BkCwTEZ8.js} +5 -5
  14. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-E3heC6je.js → NavigationTab.vue_vue_type_script_setup_true_lang-BnbjdkWg.js} +5 -5
  15. package/dist/{OverviewView-DYZOb_qv.js → OverviewView-DrLXEnyQ.js} +5 -5
  16. package/dist/{Report-DCd6g-uK.js → Report-BFeedwld.js} +3 -3
  17. package/dist/ReportCanvasView-uSPSmxoS.js +1035 -0
  18. package/dist/{ReportEditor-CTKsXpB-.js → ReportEditor-DdmeWp-N.js} +7 -7
  19. package/dist/{ReportView-gNNAAc_q.js → ReportView-DP-3aapL.js} +6 -6
  20. package/dist/{ReportViewRoute-DoC6hYww.js → ReportViewRoute-Djtc4rpu.js} +2 -2
  21. package/dist/{Setting-BiCgtjoi.js → Setting-Co0Fv5PF.js} +3 -3
  22. package/dist/{Template-nHOQ1GMY.js → Template-Dmfdlx_-.js} +3 -3
  23. package/dist/{TileEditor-z9Wso4D0.js → TileEditor-lbcwAmG7.js} +6 -6
  24. package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-f5uCjyR1.js → TilePageStack.vue_vue_type_script_setup_true_lang-Bewf5Mwf.js} +2 -2
  25. package/dist/{TransitionFade-DUOfJMio.js → TransitionFade-BvzD7CKL.js} +5 -5
  26. package/dist/{app-zXupeysX.js → app-Bvy-gTq7.js} +16 -16
  27. package/dist/app.js +1 -1
  28. package/dist/{currency-BuoNDIHl.js → currency-CAUD27u3.js} +1 -1
  29. package/dist/{index-qcO4JKVu.js → index-D9j1ly8Z.js} +1 -1
  30. package/dist/{report-C3jQF-wm.js → report-B4jAut5H.js} +1 -1
  31. package/dist/report-canvas-libs/components-1.js +57 -15
  32. package/dist/report-canvas-libs-CNx4fuqd.js +40 -0
  33. package/dist/style.css +1 -1
  34. package/dist/{useDigestFont-B6du0dOB.js → useDigestFont-6hcS7_aG.js} +1 -1
  35. package/dist/{useReportCanvasPanel-DC-0p5rk.js → useReportCanvasPanel-C2iiBQZf.js} +356 -393
  36. package/dist/{useRestaurantPermission-C1QfXed8.js → useRestaurantPermission-D6WmoPR2.js} +1 -1
  37. package/package.json +1 -1
  38. package/dist/DigestListView-Da8l1BCq.js +0 -637
  39. package/dist/DigestReaderView-FBXcXxUr.js +0 -507
  40. package/dist/ReportCanvasView-DY0rJ32y.js +0 -966
@@ -0,0 +1,526 @@
1
+ import { defineComponent as _e, ref as v, watch as W, onMounted as be, nextTick as dt, resolveComponent as z, createElementBlock as _, openBlock as m, createElementVNode as b, createCommentVNode as C, unref as a, createVNode as P, computed as k, onBeforeUnmount as ct, createBlock as R, withCtx as j, createSlots as pt, toDisplayString as L, normalizeClass as he } from "vue";
2
+ import { useRoute as mt, useRouter as ft } from "vue-router";
3
+ import { useI18n as xe } from "@feedmepos/mf-common";
4
+ import { useBreakpoints as vt } from "@feedmepos/ui-library";
5
+ import { _ as gt } from "./Default.vue_vue_type_script_setup_true_lang-D0mOTzcw.js";
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 _t, d as bt, e as xt } from "./useReportCanvasPanel-C2iiBQZf.js";
8
+ import { b as Ct, d as St, a as Vt, _ as Rt, D as Pt } from "./useDigestFont-6hcS7_aG.js";
9
+ import { f as Tt, m as Et, n as It, A as we } from "./app-Bvy-gTq7.js";
10
+ import { _ as At } from "./_plugin-vue_export-helper-C6QDExPN.js";
11
+ const Mt = { class: "relative flex min-h-0 grow flex-col" }, Ft = ["srcdoc", "title"], Bt = {
12
+ key: 0,
13
+ class: "pointer-events-none absolute inset-0 flex items-center justify-center",
14
+ "data-testid": "digest-frame-loading"
15
+ }, Dt = /* @__PURE__ */ _e({
16
+ __name: "DigestCanvasFrame",
17
+ props: {
18
+ digest: {},
19
+ commentMode: { type: Boolean },
20
+ picked: {}
21
+ },
22
+ emits: ["select", "area", "cancel"],
23
+ setup(ee, { emit: n }) {
24
+ const O = { MYR: "RM" }, w = ee, T = n, { t: K } = xe(), I = v(), S = v(!1), d = {
25
+ reportId: `digest-${w.digest.weekStart}`,
26
+ version: 1,
27
+ state: "published",
28
+ canEdit: !1,
29
+ hostFilters: !1,
30
+ ...w.digest.canvas
31
+ }, y = ht(d.reportId, { frozen: w.digest.rows }), A = new Set(
32
+ d.sections.flatMap((o) => {
33
+ var l;
34
+ const i = (l = o.config) == null ? void 0 : l.href;
35
+ return o.component === "digest-idea" && typeof i == "string" ? [i] : [];
36
+ })
37
+ ), x = kt(I, {
38
+ onSelectSection: (o, i) => T("select", o, i),
39
+ onSelectArea: (o) => T("area", o),
40
+ onCancelSelection: () => T("cancel"),
41
+ onSetParams: (o, i) => {
42
+ y.setParams(o, i);
43
+ },
44
+ // a saved page records nothing back (its sections were checked before it was saved); a drawn part ends the loader
45
+ onSectionRendered: () => {
46
+ S.value = !0;
47
+ },
48
+ onSectionError: (o, i, l) => {
49
+ S.value = !0, console.warn("[digest] section failed", { weekStart: w.digest.weekStart, sectionId: o, message: l });
50
+ },
51
+ onSectionLayout: () => {
52
+ },
53
+ onOpenLink: (o) => {
54
+ A.has(o) && window.open(o, "_blank", "noopener,noreferrer");
55
+ }
56
+ });
57
+ return y.onResult((o) => x.pushRows(o)), y.onParamsChanged(() => x.pushParams(y.paramState())), W([() => w.commentMode, () => w.picked, x.ready], () => {
58
+ x.setCommentMode(!!w.commentMode, w.picked ?? [], !0);
59
+ }), be(async () => {
60
+ y.load(d), await dt();
61
+ const o = y.env();
62
+ await x.init(d.sections, y.paramState(), {
63
+ ...o,
64
+ currency: w.digest.money || O[o.currency] || o.currency,
65
+ digest: !0,
66
+ digestFont: Ct
67
+ });
68
+ }), (o, i) => {
69
+ const l = z("FmCircularProgress");
70
+ return m(), _("div", Mt, [
71
+ b("iframe", {
72
+ ref_key: "frame",
73
+ ref: I,
74
+ "data-testid": "digest-frame",
75
+ class: "min-h-0 grow border-0",
76
+ srcdoc: a(wt),
77
+ sandbox: "allow-scripts",
78
+ title: a(K)("reportV5.digest.frameTitle")
79
+ }, null, 8, Ft),
80
+ S.value ? C("", !0) : (m(), _("div", Bt, [
81
+ P(l, { size: "xl" })
82
+ ]))
83
+ ]);
84
+ };
85
+ }
86
+ }), $t = { class: "flex min-w-0 grow flex-col" }, jt = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-hidden text-ellipsis whitespace-nowrap" }, Lt = {
87
+ key: 0,
88
+ class: "flex shrink-0 flex-wrap items-center gap-8 border-b border-fm-color-border-secondary px-16 py-8",
89
+ "data-testid": "digest-toolbar"
90
+ }, zt = { class: "digest-kind" }, Ot = {
91
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary",
92
+ "data-testid": "digest-published"
93
+ }, qt = {
94
+ key: 1,
95
+ "data-testid": "digest-comment-hint",
96
+ class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
97
+ }, Nt = ["aria-pressed", "aria-label", "disabled"], Ut = {
98
+ width: "20",
99
+ height: "20",
100
+ viewBox: "0 0 20 20",
101
+ fill: "none",
102
+ "aria-hidden": "true"
103
+ }, Ht = ["fill"], Yt = {
104
+ key: 3,
105
+ class: "fm-typo-en-body-sm-400 p-16 text-fm-color-typo-error",
106
+ "data-testid": "digest-error"
107
+ }, Gt = {
108
+ key: 4,
109
+ class: "flex min-h-[75vh] flex-1 items-center justify-center",
110
+ "data-testid": "digest-loading"
111
+ }, Kt = {
112
+ key: 5,
113
+ class: "flex min-h-[75vh] flex-1 flex-col"
114
+ }, Qt = ["role", "aria-modal", "aria-label"], ye = 24, Xt = /* @__PURE__ */ _e({
115
+ __name: "DigestReaderView",
116
+ setup(ee) {
117
+ var pe;
118
+ const { t: n, locale: O } = xe(), { breakpoints: w } = vt(), T = mt(), K = ft(), I = Tt(), S = k(() => String(T.params.weekStart ?? "")), d = v(), y = v(!0), A = v(""), x = v(!1), o = v(!1), i = v(!1), l = v(""), te = v(""), M = v(!1), f = v(!1), Q = v(!1), ae = k(() => f.value && !Q.value), { root: Ce, drawer: Se, docked: X, modal: Z } = yt(i, ae);
119
+ W([f, i], ([e, t]) => {
120
+ (!e || !t) && (Q.value = !1);
121
+ });
122
+ const q = v([]), F = v([]), r = k({
123
+ get: () => M.value ? q.value : F.value,
124
+ set: (e) => {
125
+ M.value ? q.value = e : F.value = e;
126
+ }
127
+ }), N = k(() => r.value.flatMap((e) => e.targets)), B = (e) => e.map((t) => ({ targets: [t], widen: [] })), Ve = k(() => r.value.map((e) => e.targets[0])), Re = k(
128
+ () => r.value.map(({ targets: [e, ...t] }) => {
129
+ if (!t.length) return e;
130
+ const s = [e, ...t];
131
+ return {
132
+ sectionId: e.sectionId,
133
+ version: e.version,
134
+ label: [...new Set(s.map((u) => u.label).filter(Boolean))].join(", "),
135
+ elementText: s.map((u) => u.elementText).filter(Boolean).join(" · "),
136
+ area: e.area
137
+ };
138
+ })
139
+ ), U = k(() => {
140
+ var e;
141
+ return ((e = d.value) == null ? void 0 : e.canvas.sections) ?? [];
142
+ }), se = k(
143
+ () => N.value.some(
144
+ (e) => !U.value.some(
145
+ (t) => t.id === e.sectionId && t.version === e.version
146
+ )
147
+ )
148
+ );
149
+ function Pe(e, t) {
150
+ var h;
151
+ const s = e.config ?? {}, u = s.title ?? s.headline;
152
+ if (typeof u == "string" && u) return u;
153
+ if (e.component === "digest-kpis") return n("reportV5.digest.ask.tiles");
154
+ const p = U.value.slice(0, t).reverse().find((c) => c.component === "digest-chapter");
155
+ return e.component === "digest-text" && typeof ((h = p == null ? void 0 : p.config) == null ? void 0 : h.title) == "string" ? p.config.title : n("reportV5.digest.ask.part", { number: t + 1 });
156
+ }
157
+ function H() {
158
+ r.value = [], f.value = !1;
159
+ }
160
+ function Te(e) {
161
+ const t = r.value[e];
162
+ if (!t) return;
163
+ const [s] = t.targets;
164
+ if (!s.element || s.area) {
165
+ r.value = r.value.filter(($, E) => E !== e);
166
+ return;
167
+ }
168
+ const { element: u, ...p } = s, [h, ...c] = t.widen, G = h ? { ...p, element: h, elementText: h.text ?? "", elementTag: h.tag } : p;
169
+ r.value = r.value.map(
170
+ ($, E) => E === e ? { targets: [G], widen: c } : $
171
+ );
172
+ }
173
+ function ne(e) {
174
+ const t = U.value.findIndex((u) => u.id === e.sectionId), s = U.value[t];
175
+ if (!(!s || s.version !== e.version))
176
+ return { ...e, label: e.label || Pe(s, t) };
177
+ }
178
+ function Ee(e, t) {
179
+ var s, u, p, h, c, G, $, E, me, fe, ve, ge;
180
+ return e.sectionId === t.sectionId && ((s = e.element) == null ? void 0 : s.part) === ((u = t.element) == null ? void 0 : u.part) && (((p = e.element) == null ? void 0 : p.path) ?? []).join(".") === (((h = t.element) == null ? void 0 : h.path) ?? []).join(".") && ((G = (c = e.element) == null ? void 0 : c.datum) == null ? void 0 : G.datasetIndex) === ((E = ($ = t.element) == null ? void 0 : $.datum) == null ? void 0 : E.datasetIndex) && ((fe = (me = e.element) == null ? void 0 : me.datum) == null ? void 0 : fe.index) === ((ge = (ve = t.element) == null ? void 0 : ve.datum) == null ? void 0 : ge.index);
181
+ }
182
+ function Ie(e, t) {
183
+ if (!f.value || V.value) return;
184
+ const s = ne(e);
185
+ if (!s) return;
186
+ const u = r.value.findIndex(
187
+ (p) => !p.targets[0].area && Ee(p.targets[0], s)
188
+ );
189
+ u >= 0 ? r.value = r.value.filter((p, h) => h !== u) : N.value.length < ye && (r.value = [...r.value, { targets: [s], widen: t }]), i.value = !0;
190
+ }
191
+ function Ae(e) {
192
+ if (!f.value || V.value) return;
193
+ const t = e.map(ne);
194
+ !t.length || !t.every((s) => !!s) || N.value.length + t.length > ye || (r.value = [...r.value, { targets: t, widen: [] }], i.value = !0);
195
+ }
196
+ const Me = ((pe = window.matchMedia) == null ? void 0 : pe.call(window, "(pointer: coarse)").matches) ?? !1;
197
+ function Fe() {
198
+ if (f.value) return H();
199
+ f.value = !0, i.value = !0;
200
+ }
201
+ function Be() {
202
+ Q.value = !0, i.value = !0;
203
+ }
204
+ function oe(e) {
205
+ e.key === "Escape" && f.value && H();
206
+ }
207
+ const g = _t(bt(S.value)), {
208
+ messages: De,
209
+ sessionId: $e,
210
+ title: je,
211
+ chats: Le,
212
+ chatsCursor: re,
213
+ chatsLoading: ze,
214
+ chatsError: Oe,
215
+ switching: J,
216
+ earlier: qe,
217
+ loadingEarlier: Ne,
218
+ streaming: Ue,
219
+ turnId: He,
220
+ step: Ye,
221
+ error: ie,
222
+ interrupted: Ge,
223
+ stoppable: Ke,
224
+ stopping: Qe,
225
+ unsent: Xe,
226
+ slow: Ze,
227
+ startedAt: Je,
228
+ awaiting: We,
229
+ noReplyId: et
230
+ } = g, V = k(() => Ue.value || We.value), le = k(() => V.value || J.value);
231
+ let ue = !1;
232
+ W(i, (e) => {
233
+ !e || ue || (ue = !0, g.load());
234
+ });
235
+ async function Y() {
236
+ const e = l.value.trim();
237
+ if (!(!e || V.value || J.value || se.value)) {
238
+ if (l.value = "", await g.send(e, N.value), ie.value) {
239
+ l.value || (l.value = e);
240
+ return;
241
+ }
242
+ H();
243
+ }
244
+ }
245
+ async function de(e) {
246
+ g.stashDraft(
247
+ l.value,
248
+ F.value.flatMap((s) => s.targets)
249
+ ), await e();
250
+ const t = g.recallDraft();
251
+ l.value = t.text, F.value = B(t.targets), f.value = !1;
252
+ }
253
+ async function tt(e) {
254
+ if (le.value) return;
255
+ const t = e ? [...q.value] : [];
256
+ let s = !1;
257
+ await de(async () => {
258
+ s = await g.startChat();
259
+ }), s && e && (M.value = !1, F.value = t, q.value = [], l.value = e, await Y());
260
+ }
261
+ const at = (e) => de(() => g.select(e));
262
+ function st(e) {
263
+ const t = g.takeUnsent(e);
264
+ if (t)
265
+ return l.value = t.text, r.value = B(t.targets), Y();
266
+ }
267
+ async function nt() {
268
+ const e = await g.stop();
269
+ !e || l.value.trim() || (l.value = e.text, r.value = B(e.targets));
270
+ }
271
+ function ot(e) {
272
+ const t = g.requestOf(e);
273
+ t && (l.value = t.text, r.value = B(t.targets));
274
+ }
275
+ function rt(e) {
276
+ const t = g.requestOf(e);
277
+ if (t)
278
+ return l.value = t.text, r.value = B(t.targets), Y();
279
+ }
280
+ const D = k(
281
+ () => d.value ? St(d.value.weekStart, d.value.weekEnd, O.value) : ""
282
+ ), it = k(() => {
283
+ const e = d.value;
284
+ if (!e) return "";
285
+ const t = [
286
+ n("reportV5.digest.published", {
287
+ date: Vt(e.createdAt, O.value, e.timezone)
288
+ })
289
+ ];
290
+ return e.outlets && t.push(n("reportV5.digest.outlets", { count: e.outlets }, e.outlets)), t.join(" · ");
291
+ }), lt = k(
292
+ () => {
293
+ var e;
294
+ return (((e = d.value) == null ? void 0 : e.canvas.sections) ?? []).filter(
295
+ (t) => {
296
+ var s;
297
+ return t.component === "digest-chapter" && typeof ((s = t.config) == null ? void 0 : s.title) == "string";
298
+ }
299
+ ).slice(0, 3).map((t) => {
300
+ var u;
301
+ const s = String((u = t.config) == null ? void 0 : u.title);
302
+ return { label: s, prompt: n("reportV5.digest.ask.about", { title: s }) };
303
+ });
304
+ }
305
+ ), ce = k(() => ({
306
+ title: n("reportV5.digest.ask.title"),
307
+ welcome: n("reportV5.digest.ask.welcome"),
308
+ hint: n("reportV5.digest.ask.hint", { subject: D.value }),
309
+ target: n("reportV5.digest.ask.target", { subject: D.value }),
310
+ placeholder: n("reportV5.digest.ask.title"),
311
+ outcomes: {
312
+ withheld: n("reportV5.digest.ask.withheld"),
313
+ failed: n("reportV5.digest.ask.failed"),
314
+ stopped: n("reportV5.digest.ask.stopped")
315
+ }
316
+ }));
317
+ function ut() {
318
+ K.push({ name: "digest", query: T.query });
319
+ }
320
+ return be(async () => {
321
+ window.addEventListener("keydown", oe);
322
+ try {
323
+ d.value = await Et(S.value), It(S.value).catch(() => {
324
+ });
325
+ } catch (e) {
326
+ e instanceof we && e.status === 403 ? x.value = !0 : e instanceof we && e.status === 404 ? o.value = !0 : A.value = e instanceof Error ? e.message : String(e);
327
+ } finally {
328
+ y.value = !1;
329
+ }
330
+ I.subscription || await I.loadSubscription().catch(() => {
331
+ });
332
+ }), ct(() => window.removeEventListener("keydown", oe)), (e, t) => {
333
+ const s = z("FmTooltip"), u = z("FmPageHead"), p = z("FmButton"), h = z("FmCircularProgress");
334
+ return m(), R(gt, null, {
335
+ default: j(() => [
336
+ b("div", {
337
+ ref_key: "root",
338
+ ref: Ce,
339
+ class: "relative flex h-full min-h-0 w-full"
340
+ }, [
341
+ b("div", $t, [
342
+ P(u, {
343
+ class: "shrink-0",
344
+ title: D.value || a(n)("reportV5.digest.title"),
345
+ "back-button": !0,
346
+ "data-testid": "digest-reader-head",
347
+ "onClick:back": ut
348
+ }, pt({
349
+ title: j(() => [
350
+ P(s, {
351
+ content: D.value,
352
+ placement: "bottom",
353
+ "z-index": 2e3,
354
+ class: "flex min-w-0 max-w-full justify-start"
355
+ }, {
356
+ default: j(() => [
357
+ b("p", jt, L(D.value || a(n)("reportV5.digest.title")), 1)
358
+ ]),
359
+ _: 1
360
+ }, 8, ["content"])
361
+ ]),
362
+ _: 2
363
+ }, [
364
+ a(w).lg || a(w).md ? {
365
+ name: "append",
366
+ fn: j(() => [
367
+ d.value ? (m(), R(Rt, { key: 0 })) : C("", !0)
368
+ ]),
369
+ key: "0"
370
+ } : void 0
371
+ ]), 1032, ["title"]),
372
+ d.value ? (m(), _("div", Lt, [
373
+ b("span", zt, L(a(n)("reportV5.digest.card.weekly")), 1),
374
+ b("span", Ot, L(it.value), 1),
375
+ t[9] || (t[9] = b("span", { class: "grow" }, null, -1)),
376
+ f.value && r.value.length && !a(X) ? (m(), R(p, {
377
+ key: 0,
378
+ "data-testid": "digest-ask-picked",
379
+ variant: "tertiary",
380
+ size: "sm",
381
+ "prepend-icon": "auto_awesome",
382
+ label: a(n)("reportV5.digest.ask.askPicked"),
383
+ onClick: Be
384
+ }, null, 8, ["label"])) : f.value ? (m(), _("span", qt, L(r.value.length ? a(n)("reportV5.digest.ask.picked", { count: r.value.length }) : a(n)(a(Me) ? "reportV5.digest.ask.pickingTouch" : "reportV5.digest.ask.picking")), 1)) : C("", !0),
385
+ P(s, {
386
+ placement: "bottom",
387
+ content: f.value ? a(n)("reportV5.reportAi.chat.cancelSelection") : a(n)("reportV5.digest.ask.comment")
388
+ }, {
389
+ default: j(() => [
390
+ b("button", {
391
+ "data-testid": "digest-comment-toggle",
392
+ class: he(["digest-comment flex h-32 w-32 items-center justify-center rounded-md text-fm-color-typo-secondary disabled:opacity-50", f.value && "bg-fm-color-neutral-gray-100 text-fm-color-primary"]),
393
+ "aria-pressed": f.value,
394
+ "aria-label": a(n)("reportV5.digest.ask.comment"),
395
+ disabled: V.value,
396
+ onClick: Fe
397
+ }, [
398
+ (m(), _("svg", Ut, [
399
+ b("path", {
400
+ d: "M5 3.5h5a6.5 6.5 0 1 1-6.5 6.5V5A1.5 1.5 0 0 1 5 3.5Z",
401
+ fill: f.value ? "currentColor" : "none",
402
+ stroke: "currentColor",
403
+ "stroke-width": "1.5",
404
+ "stroke-linecap": "round",
405
+ "stroke-linejoin": "round"
406
+ }, null, 8, Ht)
407
+ ]))
408
+ ], 10, Nt)
409
+ ]),
410
+ _: 1
411
+ }, 8, ["content"]),
412
+ i.value ? C("", !0) : (m(), R(p, {
413
+ key: 2,
414
+ "data-testid": "digest-ask-open",
415
+ variant: "tertiary",
416
+ "prepend-icon": "auto_awesome",
417
+ label: a(n)("reportV5.digest.ask.title"),
418
+ onClick: t[0] || (t[0] = (c) => i.value = !0)
419
+ }, null, 8, ["label"]))
420
+ ])) : C("", !0),
421
+ x.value ? (m(), R(ke, {
422
+ key: 1,
423
+ "data-testid": "digest-refused",
424
+ title: a(n)("reportV5.digest.refusedTitle"),
425
+ "sub-title": a(n)("reportV5.digest.refusedBody")
426
+ }, null, 8, ["title", "sub-title"])) : o.value ? (m(), R(ke, {
427
+ key: 2,
428
+ title: a(n)("reportV5.digest.missingTitle"),
429
+ "sub-title": a(n)("reportV5.digest.missingBody")
430
+ }, null, 8, ["title", "sub-title"])) : A.value ? (m(), _("p", Yt, L(A.value), 1)) : y.value ? (m(), _("div", Gt, [
431
+ P(h, { size: "xl" })
432
+ ])) : d.value ? (m(), _("div", Kt, [
433
+ P(Pt, {
434
+ "hide-subscribed": "",
435
+ class: "m-16 shrink-0"
436
+ }),
437
+ (m(), R(Dt, {
438
+ key: `${d.value.weekStart}:${d.value.createdAt}`,
439
+ digest: d.value,
440
+ "comment-mode": f.value && !V.value,
441
+ picked: Ve.value,
442
+ onSelect: Ie,
443
+ onArea: Ae,
444
+ onCancel: H
445
+ }, null, 8, ["digest", "comment-mode", "picked"]))
446
+ ])) : C("", !0)
447
+ ]),
448
+ a(Z) ? (m(), _("div", {
449
+ key: 0,
450
+ class: "digest-scrim absolute inset-0 z-20",
451
+ onClick: t[1] || (t[1] = (c) => i.value = !1)
452
+ })) : C("", !0),
453
+ i.value && d.value && (a(X) || !ae.value) ? (m(), _("div", {
454
+ key: 1,
455
+ ref_key: "drawer",
456
+ ref: Se,
457
+ "data-testid": "digest-chat",
458
+ class: he(
459
+ a(X) ? "w-[380px] shrink-0" : "absolute inset-y-0 right-0 z-30 w-full max-w-[380px] shadow-lg"
460
+ ),
461
+ role: a(Z) ? "dialog" : void 0,
462
+ "aria-modal": a(Z) ? "true" : void 0,
463
+ "aria-label": ce.value.title
464
+ }, [
465
+ P(xt, {
466
+ "home-draft": te.value,
467
+ "onUpdate:homeDraft": t[2] || (t[2] = (c) => te.value = c),
468
+ "home-open": M.value,
469
+ "onUpdate:homeOpen": t[3] || (t[3] = (c) => M.value = c),
470
+ messages: a(De),
471
+ draft: l.value,
472
+ targets: Re.value,
473
+ "target-stale": se.value,
474
+ streaming: V.value,
475
+ "turn-id": a(He),
476
+ phase: a(Ye) ?? "working",
477
+ slow: a(Ze),
478
+ "started-at": a(Je),
479
+ error: a(ie),
480
+ interrupted: a(Ge),
481
+ blank: !1,
482
+ run: null,
483
+ "run-anchor-id": null,
484
+ "run-stale": !1,
485
+ "retry-error": "",
486
+ "unsent-ids": a(Xe),
487
+ "no-reply-id": a(et),
488
+ "chat-id": a($e),
489
+ "chat-title": a(je),
490
+ chats: a(Le),
491
+ "chats-cursor": a(re),
492
+ "chats-loading": a(ze),
493
+ "chats-error": a(Oe),
494
+ switching: a(J),
495
+ busy: le.value,
496
+ stoppable: a(Ke),
497
+ stopping: a(Qe),
498
+ earlier: a(qe),
499
+ "loading-earlier": a(Ne),
500
+ copy: ce.value,
501
+ starters: lt.value,
502
+ "onUpdate:draft": t[4] || (t[4] = (c) => l.value = c),
503
+ onClearTarget: Te,
504
+ onSubmit: Y,
505
+ onClose: t[5] || (t[5] = (c) => i.value = !1),
506
+ onResend: st,
507
+ onAskAgain: rt,
508
+ onEditRequest: ot,
509
+ onStop: nt,
510
+ onNewChat: tt,
511
+ onSelectChat: at,
512
+ onLoadChats: t[6] || (t[6] = (c) => a(g).loadChats()),
513
+ onLoadMoreChats: t[7] || (t[7] = (c) => a(g).loadChats(a(re) ?? void 0)),
514
+ onLoadEarlier: t[8] || (t[8] = (c) => a(g).loadEarlier())
515
+ }, null, 8, ["home-draft", "home-open", "messages", "draft", "targets", "target-stale", "streaming", "turn-id", "phase", "slow", "started-at", "error", "interrupted", "unsent-ids", "no-reply-id", "chat-id", "chat-title", "chats", "chats-cursor", "chats-loading", "chats-error", "switching", "busy", "stoppable", "stopping", "earlier", "loading-earlier", "copy", "starters"])
516
+ ], 10, Qt)) : C("", !0)
517
+ ], 512)
518
+ ]),
519
+ _: 1
520
+ });
521
+ };
522
+ }
523
+ }), ia = /* @__PURE__ */ At(Xt, [["__scopeId", "data-v-bd126bd6"]]);
524
+ export {
525
+ ia as default
526
+ };
@@ -1,12 +1,12 @@
1
1
  import { computed as c, defineComponent as ze, ref as k, watch as Le, onMounted as Gt, onBeforeUnmount as Eo, resolveComponent as be, createBlock as ye, openBlock as j, 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 jo, mergeModels as ot, useModel as at, renderSlot as gt, h as Pt, createSlots as Xa, resolveDynamicComponent as Go, markRaw as So, toRaw as Ea, createTextVNode as ja, onUnmounted as Yn, provide as Ga, 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-ud-55uWq.js";
3
- import { u as Ln, ae as xn, a as _n, af as or } from "./app-zXupeysX.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-C3jQF-wm.js";
5
- import { c as Dn, w as Et } from "./currency-BuoNDIHl.js";
6
- import { d as Xn } from "./DateRangeSelect-PE9H0GCA.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-C6Kk1Oc6.js";
3
+ import { u as Ln, ae as xn, a as _n, af as or } from "./app-Bvy-gTq7.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-B4jAut5H.js";
5
+ import { c as Dn, w as Et } from "./currency-CAUD27u3.js";
6
+ import { d as Xn } from "./DateRangeSelect-BS73I-EY.js";
7
7
  import { storeToRefs as At } from "pinia";
8
8
  import { detectLocale as oo } from "@feedmepos/mf-common";
9
- import "./index-qcO4JKVu.js";
9
+ import "./index-D9j1ly8Z.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";
@@ -1,8 +1,8 @@
1
1
  import { ref as ve, computed as ge, 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 qt, 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-PE9H0GCA.js";
3
- import { e as gt } from "./index-qcO4JKVu.js";
4
- import { d as E, u as ke, c as je, a as Me, F as Oe, ag as St, v as Ae, h as Ml, j as Pl, z as Bl, i as zl, t as Lt } from "./app-zXupeysX.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 Wl, x as Mt, W as Pt, A as Ul, S as Bt } from "./report-C3jQF-wm.js";
2
+ import { c as Qt, _ as Kt, D as El, e as Ll } from "./DateRangeSelect-BS73I-EY.js";
3
+ import { e as gt } from "./index-D9j1ly8Z.js";
4
+ import { d as E, u as ke, c as je, a as Me, F as Oe, ag as St, v as Ae, h as Ml, j as Pl, z as Bl, i as zl, t as Lt } from "./app-Bvy-gTq7.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 Wl, x as Mt, W as Pt, A as Ul, S as Bt } from "./report-B4jAut5H.js";
6
6
  import { defineStore as Ft, storeToRefs as re } from "pinia";
7
7
  import { detectLocale as xe } from "@feedmepos/mf-common";
8
8
  import { u as Jt } from "./_plugin-vue_export-helper-C6QDExPN.js";
@@ -1,16 +1,16 @@
1
1
  import { ref as I, defineComponent as S, watch as P, computed as $, onMounted as de, createElementBlock as r, openBlock as o, createElementVNode as s, renderSlot as J, toDisplayString as C, resolveDirective as K, createCommentVNode as D, Fragment as z, renderList as N, createBlock as R, withDirectives as T, resolveDynamicComponent as U, unref as m, withCtx as B, createVNode as p, normalizeClass as W, resolveComponent as M, useModel as ce, createTextVNode as ue, isRef as j, nextTick as fe } from "vue";
2
- import { _ as me } from "./Default.vue_vue_type_script_setup_true_lang-Cfu4CYAi.js";
3
- import { D as ge } from "./DateRangeSelect-PE9H0GCA.js";
4
- import { d as E, u as Q, F as ee, q as te, a as pe, j as ve, h as H, o as he, p as ye, s as we } from "./app-zXupeysX.js";
2
+ import { _ as me } from "./Default.vue_vue_type_script_setup_true_lang-D0mOTzcw.js";
3
+ import { D as ge } from "./DateRangeSelect-BS73I-EY.js";
4
+ import { d as E, u as Q, F as ee, q as te, a as pe, j as ve, h as H, o as he, p as ye, s as we } from "./app-Bvy-gTq7.js";
5
5
  import { storeToRefs as ae } from "pinia";
6
6
  import { C as le, r as xe } from "./chart-BywXiz4O.js";
7
7
  import { components as Y, useSnackbar as be } from "@feedmepos/ui-library";
8
8
  import { u as se } from "./_plugin-vue_export-helper-C6QDExPN.js";
9
9
  import { c as X } from "./index-CtZE4sab.js";
10
10
  import { _ as Ce } from "./SelectComponent.vue_vue_type_script_setup_true_lang-DW7Dk7iQ.js";
11
- import { _ as ke } from "./LocationSelect.vue_vue_type_script_setup_true_lang-DM0WlrQc.js";
11
+ import { _ as ke } from "./LocationSelect.vue_vue_type_script_setup_true_lang-CLZJZtaS.js";
12
12
  import { useCoreStore as _e } from "@feedmepos/mf-common";
13
- import { G as $e } from "./NavigationTab.vue_vue_type_script_setup_true_lang-E3heC6je.js";
13
+ import { G as $e } from "./NavigationTab.vue_vue_type_script_setup_true_lang-BnbjdkWg.js";
14
14
  function Ae({ start: e, end: t }) {
15
15
  return `${E(t).format("DD MMM")}, ${E(t).format("YYYY")}`;
16
16
  }