@feedmepos/mf-connect 0.1.2-prod → 0.1.4-prod

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 (87) hide show
  1. package/dist/Analytic-07T9poLx.js +423 -0
  2. package/dist/{App-CRTD0U-N.js → App-C6MukSCT.js} +276 -275
  3. package/dist/Broadcast-CzsgeZNO.js +223 -0
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-C5zUv0Zx.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BirunpzI.js} +8 -8
  5. package/dist/Card-DQnyWZZf.js +824 -0
  6. package/dist/{Collections-BgbWoLWI.js → Collections-BV7CSqRw.js} +4 -4
  7. package/dist/Credit-CxsbYGLZ.js +220 -0
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-C137bE1q.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BKSZYxvb.js} +918 -901
  9. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-DpsrI-Z3.js +345 -0
  10. package/dist/Experience-eMUbhq7h.js +221 -0
  11. package/dist/Game-CxAG2ViS.js +255 -0
  12. package/dist/Marketing-CozMj2Y5.js +316 -0
  13. package/dist/Member-DM1dj3F5.js +69 -0
  14. package/dist/{MemberList-ISy05wGZ.js → MemberList-DNjK9BbG.js} +14 -14
  15. package/dist/{MemberTransactions-CXvhJngX.js → MemberTransactions-CsjN3LZA.js} +1 -1
  16. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Ca1LO__F.js → MessageInput.vue_vue_type_script_setup_true_lang-DVQE9v2R.js} +2 -2
  17. package/dist/Mission-BugvTPPH.js +261 -0
  18. package/dist/Point-D8BjGtqT.js +222 -0
  19. package/dist/Promotion-mc9KBzoJ.js +253 -0
  20. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-D1eQ3i5D.js → RuleGroup.vue_vue_type_script_setup_true_lang-B2H3D_kZ.js} +15 -15
  21. package/dist/Segment-DZRFA-Pb.js +565 -0
  22. package/dist/Setting-DxNhR44e.js +1871 -0
  23. package/dist/Store-CdkJWpjV.js +1530 -0
  24. package/dist/StoreRewards-Cdturia8.js +400 -0
  25. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-nhS5Dhhk.js → StoreTransactions.vue_vue_type_script_setup_true_lang-D7GcOiUM.js} +10 -10
  26. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DWlpmE56.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-nuCOrrLE.js} +1 -1
  27. package/dist/{Tier-DLrOmrnK.js → Tier-I_MMd39Y.js} +470 -445
  28. package/dist/{Title-MHQuel7h.js → Title-DK5gmUvo.js} +298 -282
  29. package/dist/Transaction-BXpTIMS_.js +39 -0
  30. package/dist/Voucher-BQ5h2G0I.js +490 -0
  31. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-eAP99wyg.js +141 -0
  32. package/dist/app-CL2Wxzv5.js +5639 -0
  33. package/dist/{app-BjOpRVdv.js → app-DTAyCT-G.js} +1 -1
  34. package/dist/app.js +4 -3
  35. package/dist/{business-DveMDDHY.js → business-B9OUlaFZ.js} +1 -1
  36. package/dist/{campaign-CMb05XLt.js → campaign-CNbUA51l.js} +2 -2
  37. package/dist/{collection.fn-BjaBPYMU.js → collection.fn-D_i45T4Q.js} +2 -2
  38. package/dist/dto-B4208_es.js +2770 -0
  39. package/dist/{effect-CxAdSlyD.js → effect-Ye_yr8et.js} +1 -1
  40. package/dist/{email-addresses-Dtr5OALQ.js → email-addresses-Gm7Dyaxy.js} +1 -1
  41. package/dist/{export-DuBekrcg.js → export-Buee5oUV.js} +3 -3
  42. package/dist/{helper-DL6hnmtJ.js → helper-BBlHhMFc.js} +1 -1
  43. package/dist/{index-raYm7Ew2.js → index-BxJgFvym.js} +2 -2
  44. package/dist/{index-gcsOy_cD.js → index-ByaM-yoc.js} +91 -86
  45. package/dist/{index-DISwCnfH.js → index-C0QHb5SL.js} +2 -2
  46. package/dist/{index-Cibwzgac.js → index-C363BG5A.js} +3 -3
  47. package/dist/{index-BZAlqAaJ.js → index-CLL3no-v.js} +1 -1
  48. package/dist/{index-CAQpU5Rv.js → index-ChSVaFk3.js} +1 -1
  49. package/dist/{index-BSIUoSG3.js → index-Co9n8I_5.js} +3 -3
  50. package/dist/index-CoGNKU8v.js +3 -0
  51. package/dist/{index-Dx4pkNRc.js → index-DHGcUMVN.js} +1 -1
  52. package/dist/{index-CgPlJqkX.js → index-DWWtZSrm.js} +1 -1
  53. package/dist/{index-CGHNWhkM.js → index-DdVZgYE4.js} +258 -256
  54. package/dist/{index-BBBytzpn.js → index-Dx3HwWcb.js} +1 -1
  55. package/dist/{index.esm2017-Bs9CWbrs.js → index.esm2017-Dd02dg_O.js} +38 -38
  56. package/dist/{loading-Dj5bx8fg.js → loading-Or1ZDzDS.js} +11 -11
  57. package/dist/{membership-B2avlZoN.js → membership-B8h5ku-v.js} +3 -3
  58. package/dist/{money-CNSWtAf-.js → money-CmsKAJBT.js} +1 -1
  59. package/dist/{number-BA58pjU6.js → number-iEhp7Uai.js} +1 -1
  60. package/dist/{rule-BWazFYuZ.js → rule-BORkgSMK.js} +3 -3
  61. package/dist/{rule-builder-RIloDQBn.js → rule-builder-DEfkSr68.js} +1 -1
  62. package/dist/{template-u01r84LY.js → template-C_Y7bhlI.js} +4 -4
  63. package/dist/{usePagination--B6Wt7C1.js → usePagination-Ci8-uZvb.js} +1 -1
  64. package/dist/vue-i18n-BXzrZRP6.js +2365 -0
  65. package/package.json +7 -4
  66. package/dist/Analytic-AqWU_lJy.js +0 -620
  67. package/dist/Broadcast-utWSrzP9.js +0 -216
  68. package/dist/Card-x6qnEaIt.js +0 -823
  69. package/dist/Credit-CojzmUnh.js +0 -214
  70. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-8l3Dt_Lo.js +0 -344
  71. package/dist/Experience-CPjovKWF.js +0 -211
  72. package/dist/Game-DWcjPfZP.js +0 -250
  73. package/dist/Marketing-CwoI0pFF.js +0 -309
  74. package/dist/Member-oRcVGr20.js +0 -92
  75. package/dist/Mission-Y8s5MQIC.js +0 -248
  76. package/dist/Point-0Fw3qLIW.js +0 -220
  77. package/dist/Promotion-vqM23NPX.js +0 -244
  78. package/dist/Segment-lgzMRCyd.js +0 -564
  79. package/dist/Setting-CFGB53S0.js +0 -1870
  80. package/dist/Store-fJlew3HJ.js +0 -1533
  81. package/dist/StoreRewards-DWq34E4p.js +0 -429
  82. package/dist/Transaction-CYqMFEzc.js +0 -36
  83. package/dist/Voucher-B0QCX_nG.js +0 -485
  84. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +0 -140
  85. package/dist/app-SOHUUM08.js +0 -2974
  86. package/dist/dto-CY7JrHkZ.js +0 -1145
  87. package/dist/index-BMxu_XL-.js +0 -11
@@ -0,0 +1,824 @@
1
+ import { defineComponent as ee, ref as b, computed as G, watch as ve, onMounted as ne, resolveComponent as g, openBlock as _, createBlock as I, unref as n, isRef as Q, withCtx as k, createElementVNode as m, createVNode as d, createElementBlock as N, Fragment as M, renderList as Z, createCommentVNode as O, normalizeClass as Ee, createSlots as Se, h as W, toDisplayString as q, withModifiers as ye } from "vue";
2
+ import { _ as ke } from "./campaign-CpzFl8Vr.js";
3
+ import { h as ie } from "./moment-BWErdI6_.js";
4
+ import { useDialog as Te, components as Re } from "@feedmepos/ui-library";
5
+ import { p as Ae, u as te, f as le } from "./loading-Or1ZDzDS.js";
6
+ import { u as Ce } from "./app-wDQR6dpb.js";
7
+ import { u as oe } from "./membership-B8h5ku-v.js";
8
+ import { _ as de } from "./index-DdVZgYE4.js";
9
+ import { m as se } from "./index-DHGcUMVN.js";
10
+ import { _ as pe } from "./ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js";
11
+ import "./index-BxJgFvym.js";
12
+ import "./index-ChSVaFk3.js";
13
+ import { l as Oe } from "./index-ByaM-yoc.js";
14
+ import "./index-C363BG5A.js";
15
+ import "./index-C0QHb5SL.js";
16
+ import "./index-CLL3no-v.js";
17
+ import { g as Ie } from "./_commonjsHelpers-BkfeUUK-.js";
18
+ import { a as Ne } from "./object-qECH92oz.js";
19
+ import { u as xe } from "./business-B9OUlaFZ.js";
20
+ import { a as De, _ as we, w as Ue } from "./usePagination-Ci8-uZvb.js";
21
+ import { e as He, C as Fe } from "./export-Buee5oUV.js";
22
+ import { u as Pe } from "./vue-i18n-BXzrZRP6.js";
23
+ import { o as Be } from "./objectId-dwaoBfJX.js";
24
+ const Me = /* @__PURE__ */ m("div", { class: "fm-typo-en-body-lg-600" }, "Number type", -1), Ve = { class: "space-y-16" }, Ge = /* @__PURE__ */ m("div", { class: "fm-typo-en-body-lg-600" }, "Number Settings", -1), Le = { class: "gap-16 grid grid-cols-2" }, je = { class: "space-y-16" }, $e = /* @__PURE__ */ m("div", { class: "fm-typo-en-body-lg-600" }, "Card Settings", -1), Ke = {
25
+ key: 0,
26
+ class: "flex flex-col gap-[16px] w-full"
27
+ }, Ye = { class: "flex flex-col gap-[8px]" }, Xe = /* @__PURE__ */ m("p", { class: "fm-typo-en-title-sm-800" }, "Design preview", -1), We = ["src"], qe = { class: "flex pt-[24px] gap-[24px]" }, ze = ["src", "onClick", "alt"], Je = { class: "flex items-center gap-8" }, Qe = /* @__PURE__ */ ee({
28
+ __name: "CreateCardSheet",
29
+ emits: ["success", "export"],
30
+ setup(e, { expose: i, emit: x }) {
31
+ const { minor: w } = te, E = oe(), R = b(), h = b(!1), c = x, v = b(!1);
32
+ function L(l) {
33
+ v.value = l, l && (r.value = {
34
+ quantity: 1,
35
+ code: "",
36
+ codeConfig: {
37
+ length: 12,
38
+ charset: "1234567890",
39
+ prefix: "",
40
+ suffix: "",
41
+ pattern: "####-####-####-####"
42
+ }
43
+ });
44
+ }
45
+ const r = b({
46
+ quantity: 1,
47
+ code: "",
48
+ codeConfig: {
49
+ length: 12,
50
+ charset: "1234567890",
51
+ prefix: "",
52
+ suffix: "",
53
+ pattern: "####-####-####-####"
54
+ },
55
+ setCardOnBind: !1,
56
+ bundle: void 0
57
+ }), y = [
58
+ {
59
+ label: "Bulk number",
60
+ value: "bulk",
61
+ sublabel: "Bulk generate unique number"
62
+ },
63
+ {
64
+ label: "Custom number",
65
+ value: "single",
66
+ sublabel: "Enter your own custom number"
67
+ }
68
+ ], V = [
69
+ {
70
+ label: "Alphanumeric",
71
+ value: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
72
+ },
73
+ {
74
+ label: "Alphabetic",
75
+ value: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
76
+ },
77
+ { label: "Alphabetic Lowercase", value: "abcdefghijklmnopqrstuvwxyz" },
78
+ { label: "Alphabetic Uppercase", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
79
+ { label: "Numbers", value: "0123456789" },
80
+ { label: "Custom", value: "" }
81
+ ], U = b(V[0].value), T = b("bulk"), A = b(0), P = G(
82
+ () => {
83
+ var l;
84
+ return (l = E.membership.design) == null ? void 0 : l[A.value];
85
+ }
86
+ ), u = b(!1), a = G(
87
+ () => E.sortedStoreCategories.flatMap((l) => l.bundles)
88
+ );
89
+ async function s(l) {
90
+ var D, H;
91
+ if (await ((D = R.value) == null ? void 0 : D.validateInputs()), !h.value) return;
92
+ l.design = (H = P.value) == null ? void 0 : H.image;
93
+ const t = await Ae.confirm(
94
+ "",
95
+ "Do you want to export generated card(s)?",
96
+ "Export",
97
+ "Generate and without export"
98
+ );
99
+ console.log(t), await w(
100
+ async () => {
101
+ const B = await se.createCards(l);
102
+ console.log(B), await c("success"), t && await c("export", B);
103
+ },
104
+ {
105
+ message: "Creating card(s)",
106
+ successMessage: "Card(s) created"
107
+ }
108
+ );
109
+ }
110
+ return i({
111
+ showSheet: L
112
+ }), ve(
113
+ () => r.value.codeConfig.length,
114
+ (l, t) => {
115
+ l != t && (r.value.codeConfig.pattern = "#".repeat(Number(l)));
116
+ }
117
+ ), ne(async () => {
118
+ await E.readMemberStore();
119
+ }), (l, t) => {
120
+ const D = g("FmRadio"), H = g("FmRadioGroup"), B = g("FmSwitch"), f = g("FmStepperField"), $ = g("FmSelect"), F = g("FmTextField"), fe = g("FmTextarea"), K = g("FmButton"), be = g("FmForm"), he = g("FmSideSheet");
121
+ return _(), I(he, {
122
+ "max-width": 560,
123
+ "dismiss-away": !0,
124
+ header: "Create collection",
125
+ modelValue: n(v),
126
+ "onUpdate:modelValue": [
127
+ t[19] || (t[19] = (C) => Q(v) ? v.value = C : null),
128
+ t[20] || (t[20] = (C) => v.value = C)
129
+ ]
130
+ }, {
131
+ "side-sheet-footer": k(() => [
132
+ m("div", Je, [
133
+ d(K, {
134
+ label: "Save",
135
+ onClick: t[17] || (t[17] = (C) => s(n(r))),
136
+ loading: n(Ce)().isLoading
137
+ }, null, 8, ["loading"]),
138
+ d(K, {
139
+ label: "Cancel",
140
+ type: "button",
141
+ variant: "tertiary",
142
+ onClick: t[18] || (t[18] = (C) => v.value = !1)
143
+ })
144
+ ])
145
+ ]),
146
+ default: k(() => [
147
+ d(be, {
148
+ ref_key: "form",
149
+ ref: R,
150
+ class: "space-y-40",
151
+ onValidationSuccess: t[15] || (t[15] = (C) => h.value = !0),
152
+ onValidationFailed: t[16] || (t[16] = (C) => h.value = !1)
153
+ }, {
154
+ default: k(() => {
155
+ var C, ae, re;
156
+ return [
157
+ m("div", null, [
158
+ Me,
159
+ d(H, {
160
+ modelValue: n(T),
161
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => Q(T) ? T.value = o : null),
162
+ inline: !1
163
+ }, {
164
+ default: k(() => [
165
+ (_(), N(M, null, Z(y, (o) => d(D, {
166
+ key: o.value,
167
+ value: o.value,
168
+ label: o.label,
169
+ sublabel: o.sublabel
170
+ }, null, 8, ["value", "label", "sublabel"])), 64))
171
+ ]),
172
+ _: 1
173
+ }, 8, ["modelValue"])
174
+ ]),
175
+ m("div", Ve, [
176
+ Ge,
177
+ n(T) === "bulk" ? (_(), N(M, { key: 0 }, [
178
+ d(B, {
179
+ "model-value": n(u),
180
+ "label-placement": "right",
181
+ value: "true",
182
+ label: "Advance number setting",
183
+ required: !0,
184
+ "onUpdate:modelValue": t[1] || (t[1] = () => u.value = !n(u))
185
+ }, null, 8, ["model-value"]),
186
+ n(u) ? (_(), N(M, { key: 0 }, [
187
+ d(f, {
188
+ "model-value": n(r).codeConfig.length || null,
189
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => n(r).codeConfig.length = o),
190
+ label: "Code length",
191
+ rules: [(o) => Number(o) >= 1 || "Code length must at least 1"],
192
+ required: !0
193
+ }, null, 8, ["model-value", "rules"]),
194
+ d($, {
195
+ label: "Charset",
196
+ "model-value": n(U),
197
+ items: V,
198
+ "helper-text": n(r).codeConfig.charset.length > 62 ? `${n(r).codeConfig.charset.substring(0, 62)}...` : n(r).codeConfig.charset,
199
+ "onUpdate:modelValue": t[3] || (t[3] = (o) => {
200
+ U.value = o, n(r).codeConfig.charset = o;
201
+ })
202
+ }, null, 8, ["model-value", "helper-text"]),
203
+ n(U) === "" ? (_(), I(F, {
204
+ key: 0,
205
+ modelValue: n(r).codeConfig.charset,
206
+ "onUpdate:modelValue": t[4] || (t[4] = (o) => n(r).codeConfig.charset = o),
207
+ label: "Custom Charset",
208
+ required: ""
209
+ }, null, 8, ["modelValue"])) : O("", !0),
210
+ m("div", Le, [
211
+ d(F, {
212
+ modelValue: n(r).codeConfig.prefix,
213
+ "onUpdate:modelValue": t[5] || (t[5] = (o) => n(r).codeConfig.prefix = o),
214
+ label: "Prefix (Optional)"
215
+ }, null, 8, ["modelValue"]),
216
+ d(F, {
217
+ modelValue: n(r).codeConfig.suffix,
218
+ "onUpdate:modelValue": t[6] || (t[6] = (o) => n(r).codeConfig.suffix = o),
219
+ label: "Suffix (Optional)"
220
+ }, null, 8, ["modelValue"])
221
+ ]),
222
+ d(F, {
223
+ modelValue: n(r).codeConfig.pattern,
224
+ "onUpdate:modelValue": t[7] || (t[7] = (o) => n(r).codeConfig.pattern = o),
225
+ label: "Pattern",
226
+ required: !0
227
+ }, null, 8, ["modelValue"])
228
+ ], 64)) : O("", !0),
229
+ d(F, {
230
+ modelValue: n(r).quantity,
231
+ "onUpdate:modelValue": t[8] || (t[8] = (o) => n(r).quantity = o),
232
+ label: "Number of code",
233
+ rules: [
234
+ (o) => o >= 1 || "Quantity cannot be less than 1",
235
+ (o) => o <= 1e4 || "Quantity cannot more than 10,000"
236
+ ],
237
+ required: !0,
238
+ "helper-text": `${n(r).quantity} card will be created`
239
+ }, null, 8, ["modelValue", "rules", "helper-text"])
240
+ ], 64)) : O("", !0),
241
+ n(T) !== "bulk" ? (_(), I(fe, {
242
+ key: 1,
243
+ modelValue: n(r).code,
244
+ "onUpdate:modelValue": t[9] || (t[9] = (o) => n(r).code = o),
245
+ label: "Custom Card Number",
246
+ rules: [(o) => n(T) != "single" || !!o || "Custom code is required"],
247
+ placeholder: "(For multiple numbers, please enter in the new row.)"
248
+ }, null, 8, ["modelValue", "rules"])) : O("", !0)
249
+ ]),
250
+ m("div", je, [
251
+ $e,
252
+ d(B, {
253
+ "label-placement": "right",
254
+ label: "Set card number on bind",
255
+ "model-value": n(r).setCardOnBind || !1,
256
+ "onUpdate:modelValue": t[10] || (t[10] = (o) => n(r).setCardOnBind = o)
257
+ }, null, 8, ["model-value"]),
258
+ d(de, {
259
+ label: "Activate bundle on bind",
260
+ placeholder: "Select bundle",
261
+ items: n(a).filter((o) => !o.stripePriceId).map((o) => ({ label: o.name, value: o._id })),
262
+ modelValue: n(r).bundle,
263
+ "onUpdate:modelValue": t[12] || (t[12] = (o) => n(r).bundle = o)
264
+ }, {
265
+ append: k(() => [
266
+ n(r).bundle ? (_(), I(K, {
267
+ key: 0,
268
+ icon: "link_off",
269
+ variant: "plain",
270
+ onClick: t[11] || (t[11] = (o) => n(r).bundle = void 0)
271
+ })) : O("", !0)
272
+ ]),
273
+ _: 1
274
+ }, 8, ["items", "modelValue"]),
275
+ (ae = (C = n(E).store) == null ? void 0 : C.stripe) != null && ae.apiKey ? (_(), I(de, {
276
+ key: 0,
277
+ label: "Linked subscription bundle",
278
+ placeholder: "Select bundle",
279
+ items: n(a).filter((o) => o.stripePriceId).map((o) => ({ label: o.name, value: o._id })),
280
+ modelValue: n(r).subscriptionBundle,
281
+ "onUpdate:modelValue": t[14] || (t[14] = (o) => n(r).subscriptionBundle = o)
282
+ }, {
283
+ append: k(() => [
284
+ n(r).subscriptionBundle ? (_(), I(K, {
285
+ key: 0,
286
+ icon: "link_off",
287
+ variant: "plain",
288
+ onClick: t[13] || (t[13] = (o) => n(r).subscriptionBundle = void 0)
289
+ })) : O("", !0)
290
+ ]),
291
+ _: 1
292
+ }, 8, ["items", "modelValue"])) : O("", !0)
293
+ ]),
294
+ n(E).membership.design ? (_(), N("div", Ke, [
295
+ m("div", Ye, [
296
+ Xe,
297
+ m("img", {
298
+ src: (re = n(P)) == null ? void 0 : re.image,
299
+ class: "aspect-[16/9]"
300
+ }, null, 8, We),
301
+ m("div", qe, [
302
+ (_(!0), N(M, null, Z(n(E).membership.design, (o, Y) => (_(), N("img", {
303
+ src: o.image,
304
+ key: `image_${Y}`,
305
+ class: Ee(["w-[112px] h-[63px] cursor-pointer", `${n(A) === Y ? "border-[2px] border-fm-color-primary" : ""}`]),
306
+ onClick: (vn) => A.value = Y,
307
+ alt: `ai_image_predict_${Y}`,
308
+ style: { objectFit: "cover" }
309
+ }, null, 10, ze))), 128))
310
+ ])
311
+ ])
312
+ ])) : O("", !0)
313
+ ];
314
+ }),
315
+ _: 1
316
+ }, 512)
317
+ ]),
318
+ _: 1
319
+ }, 8, ["modelValue"]);
320
+ };
321
+ }
322
+ });
323
+ var z = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_9698996e-013d-4b24-94a3-d803c7be0a34", npm_package_dependencies_zod: "3.22.4", npm_package_devDependencies__types_node: "^18.19.41", STATS_TRP: "true", DEPLOYMENT_BASEPATH: "/opt/runner", DOTNET_NOLOGO: "1", npm_package_dependencies_pinia: "^2.1.7", npm_package_dependencies_vite_plugin_vue_devtools: "^7.6.4", USER: "runner", npm_config_user_agent: "pnpm/9.15.9 npm/? node/v20.19.0 linux x64", CI: "true", npm_package_dependencies_vue: "^3.4.33", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_9698996e-013d-4b24-94a3-d803c7be0a34", PIPX_HOME: "/opt/pipx", npm_package_devDependencies_vite: "^5.3.4", npm_node_execpath: "/opt/hostedtoolcache/node/20.19.0/x64/bin/node", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", SHLVL: "1", npm_package_files_0: "dist", HOME: "/home/runner", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_scripts_build_mf_dev: "vite build --mode fmmf", npm_package_dependencies__types_qrcode: "^1.5.5", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "feedmepos", npm_package_scripts_build_mf_prod: "vite build --mode fmmf:prod", npm_package_dependencies_change_case: "^5.4.4", NODE_OPTIONS: "--max-old-space-size=8096", GRADLE_HOME: "/usr/share/gradle-8.13", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/28.0.13004108", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", STATS_RDCL: "true", GITHUB_RETENTION_DAYS: "90", npm_package_dependencies__feedmepos_mf_common: "1.12.5", npm_package_dependencies_fabric: "^6.4.2", npm_package_dependencies_zod_i18n_map: "2.27.0", GITHUB_REPOSITORY_OWNER_ID: "54831515", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu24", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", SYSTEMD_EXEC_PID: "711", npm_package_dependencies__feedmepos_ui_library: "1.3.5", npm_package_dependencies_dayjs: "^1.11.12", npm_package_dependencies_dotenv: "^16.4.5", npm_package_dependencies_moment: "^2.30.1", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_scripts_build_only_dev: "pnpm build:mf:dev", npm_package_dependencies_i18next: "24.2.1", npm_package_devDependencies_tailwindcss: "^3.4.6", npm_package_devDependencies_typescript: "^5.5.3", NVM_DIR: "/home/runner/.nvm", npm_package_scripts_build_dev: "cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build --mode development", npm_package_scripts_build_only_prod: "pnpm build:mf:prod", npm_package_dependencies_xlsx: "^0.18.5", npm_package_devDependencies_vue_tsc: "^2.0.26", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", GOROOT_1_21_X64: "/opt/hostedtoolcache/go/1.21.13/x64", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20250316.1.0", npm_package_scripts_dev: "vite", npm_package_scripts_build_prod: "cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build --mode production", npm_package_dependencies_unplugin_auto_import: "^0.17.8", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.12/x64", STORE_PATH: "/home/runner/setup-pnpm/node_modules/.bin/store/v3", SWIFT_PATH: "/usr/share/swift/usr/bin", npm_package_type: "module", RUNNER_USER: "runner", STATS_V3PS: "true", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", GOROOT_1_23_X64: "/opt/hostedtoolcache/go/1.23.7/x64", JOURNAL_STREAM: "8:5714", GITHUB_WORKFLOW: "Publish mf-connect - production", _: "/home/runner/setup-pnpm/node_modules/.bin/pnpm", npm_package_module: "./dist/app.js", npm_package_devDependencies_autoprefixer: "^10.4.19", MEMORY_PRESSURE_WATCH: "/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure", npm_package_devDependencies__types_uuid: "^9.0.8", npm_package_devDependencies_unlayer_types: "^1.157.0", npm_config_registry: "https://registry.npmjs.org/", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", STATS_D: "false", GITHUB_RUN_ID: "14051873103", STATS_VMFE: "true", npm_package_dependencies_bson_objectid: "^2.0.4", npm_package_devDependencies__types_lodash: "^4.17.7", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "e0994c1c55c351765fe14c591c6fb296a9c6ae58", GITHUB_BASE_REF: "", ImageOS: "ubuntu24", npm_package_exports___import: "./dist/app.js", npm_package_devDependencies__vitejs_plugin_vue: "^5.0.5", GITHUB_WORKFLOW_REF: "feedmepos/marketing-services/.github/workflows/[PROD] publish-mf-connect.yml@refs/heads/main", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GITHUB_ACTION_REPOSITORY: "", npm_package_dependencies_axios: "^1.7.2", npm_config_node_gyp: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js", PATH: "/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.19.0/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_ec518dea-2640-49e9-a08a-43430d65528e", INVOCATION_ID: "62b15e72800f441f8dbb39f78ca6d1ff", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", NODE: "/opt/hostedtoolcache/node/20.19.0/x64/bin/node", npm_package_name: "@feedmepos/mf-connect", npm_package_scripts_deploy_dev: "pnpm run build-only:dev && pnpm publish --no-git-checks .", npm_package_dependencies_cross_env: "^7.0.3", GITHUB_ACTION: "__run_5", GITHUB_RUN_NUMBER: "44", GITHUB_TRIGGERING_ACTOR: "qaijunse", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_scripts_deploy_prod: "pnpm run build-only:prod && pnpm publish --no-git-checks .", npm_config_frozen_lockfile: "", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_dependencies__feedmepos_mf_core_ui: "1.0.18", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 63", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "main", GITHUB_REPOSITORY: "feedmepos/marketing-services", STATS_D_D: "false", npm_package_scripts_build_dts: "vue-tsc --declaration --noEmit false --emitDeclarationOnly -p tsconfig.json --outDir ./dist && mv ./dist/src/* dist", npm_package_scripts_build_types: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.json --outDir dist --composite false", npm_package_dependencies__feedmepos_core: "^2.14.6", npm_lifecycle_script: "vite build --mode fmmf:prod", STATS_UE: "true", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/27.2.12479018", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_dependencies_rrule: "^2.8.1", npm_package_dependencies_vue3_lottie: "^3.3.0", GITHUB_REPOSITORY_ID: "615151795", GITHUB_ACTIONS: "true", STATS_PIP: "false", NODE_PATH: "/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules/vite/bin/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules/vite/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules", npm_package_version: "0.1.4-prod", npm_lifecycle_event: "build:mf:prod", GITHUB_REF_PROTECTED: "false", npm_package_scripts_build: "vue-tsc && vite build", npm_package_dependencies_uuid: "^10.0.0", npm_package_dependencies_vue_i18n: "10.0.5", GITHUB_WORKSPACE: "/home/runner/work/marketing-services/marketing-services", ACCEPT_EULA: "Y", GITHUB_JOB: "deploy", RUNNER_PERFLOG: "/home/runner/perflog", npm_package_dependencies_lodash: "^4.17.21", GITHUB_SHA: "e0994c1c55c351765fe14c591c6fb296a9c6ae58", GITHUB_RUN_ATTEMPT: "1", STATS_D_TC: "true", npm_package_exports___style: "./dist/style.css", npm_package_dependencies_vue_router: "^4.4.0", GITHUB_REF: "refs/heads/main", GITHUB_ACTOR: "qaijunse", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "UNLICENSED", npm_package_dependencies_email_addresses: "^5.0.0", npm_package_dependencies_firebase: "^10.12.4", npm_package_dependencies_qrcode: "^1.5.3", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_9698996e-013d-4b24-94a3-d803c7be0a34", JAVA_HOME: "/usr/lib/jvm/temurin-17-jdk-amd64", PWD: "/home/runner/work/marketing-services/marketing-services/packages/connect", GITHUB_ACTOR_ID: "39590157", RUNNER_WORKSPACE: "/home/runner/work/marketing-services", npm_execpath: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/pnpm.cjs", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", STATS_TIS: "mining", GITHUB_EVENT_NAME: "workflow_dispatch", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_9698996e-013d-4b24-94a3-d803c7be0a34", npm_package_exports___types: "./dist/packages/connect/src/app.d.ts", EDGEWEBDRIVER: "/usr/local/share/edge_driver", STATS_EXT: "true", PNPM_SCRIPT_SRC_DIR: "/home/runner/work/marketing-services/marketing-services/packages/connect", npm_package_devDependencies_postcss: "^8.4.39", npm_command: "run-script", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/27.2.12479018", SGX_AESM_ADDR: "1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_preview: "vite preview", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", MEMORY_PRESSURE_WRITE: "c29tZSAyMDAwMDAgMjAwMDAwMAA=", PNPM_HOME: "/home/runner/setup-pnpm/node_modules/.bin", STATS_EXTP: "https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data", npm_package_dependencies__feedmepos_menu: "1.0.34", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/27.2.12479018", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_9698996e-013d-4b24-94a3-d803c7be0a34", INIT_CWD: "/home/runner/work/marketing-services/marketing-services/packages/connect", NODE_ENV: "production", FEEDME_NAMESPACE: "prod", FIREBASE_API_KEY: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", FIREBASE_AUTH_DOMAIN: "feedme-253402.firebaseapp.com", FIREBASE_DATABASE_URL: "https://feedme-253402.firebaseio.com", FIREBASE_PROJECT_ID: "feedme-253402", FIREBASE_STORAGE_BUCKET: "image.feedme.cc", FIREBASE_MESSAGING_SENDER_ID: "128512026847", FIREBASE_APP_ID: "1:128512026847:web:7c5c8ab7e8b90502dc616a", FIREBASE_MEASUREMENT_ID: "G-LTKS7N2HQS", ASSET_STORAGE_BUCKET: "static.feedme.cc", AUTH_URL: "https://portal-v2.feedmeapi.com/", SLACK_WEBHOOK_URL: "https://hooks.slack.com/services/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", MEMBER_APP_URL: "member.feedme.cc", CRM_APP_URL: "crm.feedme.cc", MARKETING_V1_PORTAL: "https://marketing-v1.feedme.cc", CLIENT_ID: "d5f8840d63dbb758b6c4ee2a5e8b013d15dd25e242c457481326062b83962476", PAYMENT_PORTAL_URL: "https://portal.feedme.cc/payment/payout-account" } }, J = Math.floor(Math.random() * 16777215), ce = p.index = parseInt(Math.random() * 16777215, 10), me = (typeof z > "u" || typeof z.pid != "number" ? Math.floor(Math.random() * 1e5) : z.pid) % 65535, ue = (() => {
324
+ try {
325
+ return _Buffer;
326
+ } catch {
327
+ try {
328
+ return Buffer;
329
+ } catch {
330
+ return null;
331
+ }
332
+ }
333
+ })(), X = function(e) {
334
+ return !!(e != null && e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e));
335
+ }, ge = [];
336
+ for (var S = 0; S < 256; S++)
337
+ ge[S] = (S <= 15 ? "0" : "") + S.toString(16);
338
+ var _e = new RegExp("^[0-9a-fA-F]{24}$"), j = [];
339
+ S = 0;
340
+ for (; S < 10; ) j[48 + S] = S++;
341
+ for (; S < 16; ) j[55 + S] = j[87 + S] = S++;
342
+ function p(e) {
343
+ if (!(this instanceof p)) return new p(e);
344
+ if (e && (e instanceof p || e._bsontype === "ObjectID"))
345
+ return e;
346
+ if (this._bsontype = "ObjectID", e == null || typeof e == "number") {
347
+ this.id = this.generate(e);
348
+ return;
349
+ }
350
+ var i = p.isValid(e);
351
+ if (!i && e != null)
352
+ throw new Error(
353
+ "Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
354
+ );
355
+ if (i && typeof e == "string" && e.length === 24)
356
+ return p.createFromHexString(e);
357
+ if (e != null && e.length === 12)
358
+ this.id = e;
359
+ else {
360
+ if (e != null && typeof e.toHexString == "function")
361
+ return e;
362
+ throw new Error(
363
+ "Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
364
+ );
365
+ }
366
+ }
367
+ var Ze = p;
368
+ p.default = p;
369
+ p.createFromTime = function(e) {
370
+ return e = parseInt(e, 10) % 4294967295, new p(nn(8, e) + "0000000000000000");
371
+ };
372
+ p.createFromHexString = function(e) {
373
+ if (typeof e > "u" || e != null && e.length !== 24)
374
+ throw new Error(
375
+ "Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
376
+ );
377
+ for (var i = "", x = 0; x < 24; )
378
+ i += String.fromCharCode(j[e.charCodeAt(x++)] << 4 | j[e.charCodeAt(x++)]);
379
+ return new p(i);
380
+ };
381
+ p.isValid = function(e) {
382
+ return e == null ? !1 : typeof e == "number" ? !0 : typeof e == "string" ? e.length === 12 || e.length === 24 && _e.test(e) : e instanceof p ? !0 : X(e) ? p.isValid(e.toString("hex")) : typeof e.toHexString == "function" && ue && (e.id instanceof ue || typeof e.id == "string") ? e.id.length === 12 || e.id.length === 24 && _e.test(e.id) : !1;
383
+ };
384
+ p.prototype = {
385
+ constructor: p,
386
+ /**
387
+ * Return the ObjectID id as a 24 byte hex string representation
388
+ *
389
+ * @return {String} return the 24 byte hex string representation.
390
+ * @api public
391
+ */
392
+ toHexString: function() {
393
+ if (!this.id || !this.id.length)
394
+ throw new Error(
395
+ "invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is [" + JSON.stringify(this.id) + "]"
396
+ );
397
+ if (this.id.length === 24)
398
+ return this.id;
399
+ if (X(this.id))
400
+ return this.id.toString("hex");
401
+ for (var e = "", i = 0; i < this.id.length; i++)
402
+ e += ge[this.id.charCodeAt(i)];
403
+ return e;
404
+ },
405
+ /**
406
+ * Compares the equality of this ObjectID with `otherID`.
407
+ *
408
+ * @param {Object} otherId ObjectID instance to compare against.
409
+ * @return {Boolean} the result of comparing two ObjectID's
410
+ * @api public
411
+ */
412
+ equals: function(e) {
413
+ return e instanceof p ? this.toString() === e.toString() : typeof e == "string" && p.isValid(e) && e.length === 12 && X(this.id) ? e === this.id.toString("binary") : typeof e == "string" && p.isValid(e) && e.length === 24 ? e.toLowerCase() === this.toHexString() : typeof e == "string" && p.isValid(e) && e.length === 12 ? e === this.id : e != null && (e instanceof p || e.toHexString) ? e.toHexString() === this.toHexString() : !1;
414
+ },
415
+ /**
416
+ * Returns the generation date (accurate up to the second) that this ID was generated.
417
+ *
418
+ * @return {Date} the generation date
419
+ * @api public
420
+ */
421
+ getTimestamp: function() {
422
+ var e = /* @__PURE__ */ new Date(), i;
423
+ return X(this.id) ? i = this.id[3] | this.id[2] << 8 | this.id[1] << 16 | this.id[0] << 24 : i = this.id.charCodeAt(3) | this.id.charCodeAt(2) << 8 | this.id.charCodeAt(1) << 16 | this.id.charCodeAt(0) << 24, e.setTime(Math.floor(i) * 1e3), e;
424
+ },
425
+ /**
426
+ * Generate a 12 byte id buffer used in ObjectID's
427
+ *
428
+ * @method
429
+ * @param {number} [time] optional parameter allowing to pass in a second based timestamp.
430
+ * @return {string} return the 12 byte id buffer string.
431
+ */
432
+ generate: function(e) {
433
+ typeof e != "number" && (e = ~~(Date.now() / 1e3)), e = parseInt(e, 10) % 4294967295;
434
+ var i = en();
435
+ return String.fromCharCode(
436
+ e >> 24 & 255,
437
+ e >> 16 & 255,
438
+ e >> 8 & 255,
439
+ e & 255,
440
+ J >> 16 & 255,
441
+ J >> 8 & 255,
442
+ J & 255,
443
+ me >> 8 & 255,
444
+ me & 255,
445
+ i >> 16 & 255,
446
+ i >> 8 & 255,
447
+ i & 255
448
+ );
449
+ }
450
+ };
451
+ function en() {
452
+ return ce = (ce + 1) % 16777215;
453
+ }
454
+ function nn(e, i) {
455
+ return i = i.toString(16), i.length === e ? i : "00000000".substring(i.length, e) + i;
456
+ }
457
+ var tn = Symbol && Symbol.for && Symbol.for("nodejs.util.inspect.custom") || "inspect";
458
+ p.prototype[tn] = function() {
459
+ return "ObjectID(" + this + ")";
460
+ };
461
+ p.prototype.toJSON = p.prototype.toHexString;
462
+ p.prototype.toString = p.prototype.toHexString;
463
+ const on = /* @__PURE__ */ Ie(Ze), sn = {
464
+ key: 0,
465
+ class: "grid grid-cols-1 gap-8"
466
+ }, an = { class: "flex items-center gap-8" }, rn = { class: "flex items-center gap-8" }, ln = 5, dn = /* @__PURE__ */ ee({
467
+ __name: "CardDesignSheet",
468
+ emits: ["success"],
469
+ setup(e, { expose: i, emit: x }) {
470
+ const { minor: w } = te, E = oe(), R = Te(), h = b(!1);
471
+ b(), b(!1);
472
+ const c = b(), v = b(null);
473
+ G(() => {
474
+ var u, a;
475
+ return Math.min((((a = (u = c.value) == null ? void 0 : u.design) == null ? void 0 : a.length) ?? 0) + 1, ln);
476
+ });
477
+ const L = x, r = G(() => {
478
+ var u, a;
479
+ return ((a = (u = E.membership) == null ? void 0 : u.design) == null ? void 0 : a.filter((s) => s.image)) || [];
480
+ }), y = b(!1);
481
+ function V(u) {
482
+ y.value = u;
483
+ }
484
+ function U() {
485
+ h.value = !0;
486
+ }
487
+ async function T() {
488
+ await w(
489
+ async () => {
490
+ var s;
491
+ const u = Ne(c.value), a = Oe.parse(u);
492
+ if (a.design = (a == null ? void 0 : a.design) || [], v.value) {
493
+ const l = on().toHexString(), t = await le.update(
494
+ le.designPath(l, v.value),
495
+ v.value
496
+ );
497
+ (s = a.design) == null || s.push({
498
+ _id: l,
499
+ image: t
500
+ });
501
+ }
502
+ await se.update(a), await P(), await L("success"), v.value = null, h.value = !1;
503
+ },
504
+ {
505
+ message: "Saving card design",
506
+ successMessage: "Card design saved"
507
+ }
508
+ );
509
+ }
510
+ async function A(u, a) {
511
+ u ? v.value = u : a && R.open({
512
+ title: "Delete Design",
513
+ message: "Are you sure you want to delete this design?",
514
+ primaryActions: { text: "Delete", close: !0 },
515
+ secondaryActions: { text: "Cancel", close: !1 }
516
+ }).onPrimary(async () => {
517
+ var l, t;
518
+ const s = (l = c.value.design) == null ? void 0 : l.findIndex((D) => D._id == a);
519
+ console.log(s), s !== -1 && ((t = c.value.design) == null || t.splice(s, 1)), await T();
520
+ }).onSecondary(() => {
521
+ R.close();
522
+ });
523
+ }
524
+ async function P() {
525
+ await E.readMembership(), c.value = E.membership;
526
+ }
527
+ return i({
528
+ showSheet: V
529
+ }), ne(async () => {
530
+ await P(), r.value.length || (h.value = !0);
531
+ }), (u, a) => {
532
+ const s = g("FmButton"), l = g("FmSideSheet");
533
+ return _(), I(l, {
534
+ "max-width": 560,
535
+ "dismiss-away": !0,
536
+ header: "Manage Design",
537
+ modelValue: n(y),
538
+ "onUpdate:modelValue": [
539
+ a[2] || (a[2] = (t) => Q(y) ? y.value = t : null),
540
+ a[3] || (a[3] = (t) => y.value = t)
541
+ ]
542
+ }, Se({
543
+ default: k(() => [
544
+ n(h) ? O("", !0) : (_(), N("div", sn, [
545
+ (_(!0), N(M, null, Z(n(r), (t) => (_(), I(pe, {
546
+ key: String(t._id),
547
+ "image-fit": "cover",
548
+ label: "",
549
+ "aspect-ratio": "16/9",
550
+ thumbnail: t.image,
551
+ accept: ".png, .jpg, .jpeg, .gif",
552
+ "recommended-size": "Recommended 16:9 ratio / 1280px x 720px",
553
+ file: void 0,
554
+ "delete-button": !1
555
+ }, {
556
+ "delete-button": k(() => [
557
+ d(s, {
558
+ class: "!text-neutral-50 !bg-neutral-700",
559
+ icon: "delete",
560
+ variant: "tertiary",
561
+ onClick: (D) => A(null, t._id)
562
+ }, null, 8, ["onClick"])
563
+ ]),
564
+ _: 2
565
+ }, 1032, ["thumbnail"]))), 128))
566
+ ])),
567
+ n(h) ? (_(), I(pe, {
568
+ key: 1,
569
+ "image-fit": "cover",
570
+ label: "",
571
+ "aspect-ratio": "16/9",
572
+ accept: ".png, .jpg, .jpeg, .gif",
573
+ "recommended-size": "Recommended 16:9 ratio / 1280px x 720px",
574
+ "onUpdate:file": A
575
+ })) : O("", !0)
576
+ ]),
577
+ _: 2
578
+ }, [
579
+ n(h) ? {
580
+ name: "side-sheet-footer",
581
+ fn: k(() => [
582
+ m("div", rn, [
583
+ d(s, {
584
+ label: "Save",
585
+ onClick: T,
586
+ disabled: !n(v)
587
+ }, null, 8, ["disabled"]),
588
+ d(s, {
589
+ label: "Cancel",
590
+ type: "button",
591
+ variant: "tertiary",
592
+ onClick: a[1] || (a[1] = (t) => h.value = !1)
593
+ })
594
+ ])
595
+ ]),
596
+ key: "1"
597
+ } : {
598
+ name: "side-sheet-footer",
599
+ fn: k(() => [
600
+ m("div", an, [
601
+ d(s, {
602
+ label: "Add Design",
603
+ onClick: U
604
+ }),
605
+ d(s, {
606
+ label: "Cancel",
607
+ type: "button",
608
+ variant: "tertiary",
609
+ onClick: a[0] || (a[0] = (t) => y.value = !1)
610
+ })
611
+ ])
612
+ ]),
613
+ key: "0"
614
+ }
615
+ ]), 1032, ["modelValue"]);
616
+ };
617
+ }
618
+ }), pn = { class: "flex items-center" }, cn = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, mn = { class: "px-24 flex flex-col pb-24 gap-y-16" }, un = { class: "flex items-center justify-end" }, _n = /* @__PURE__ */ m("img", {
619
+ src: ke,
620
+ class: "aspect-square w-[150px]"
621
+ }, null, -1), gn = { class: "flex flex-col gap-16 text-center" }, fn = { class: "fm-typo-en-title-sm-800" }, bn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, hn = { class: "flex gap-x-8" }, jn = /* @__PURE__ */ ee({
622
+ __name: "Card",
623
+ setup(e) {
624
+ const { minor: i, global: x } = te, w = b(), E = b(), R = xe(), h = oe(), { t: c } = Pe(), v = G(
625
+ () => h.sortedStoreCategories.flatMap((a) => a.bundles)
626
+ ), L = [
627
+ {
628
+ header: c("connect.loyalty.card.table.card_number"),
629
+ accessorFn: (a) => a.serialNumber
630
+ },
631
+ {
632
+ header: c("connect.loyalty.card.table.redeemed_by"),
633
+ accessorKey: "user",
634
+ enableSorting: !1,
635
+ cell(a) {
636
+ const s = a.row.original.pf_member;
637
+ return W(
638
+ "div",
639
+ {
640
+ class: "flex items-center gap-x-8"
641
+ },
642
+ [
643
+ W(Re.FmAvatar, {
644
+ name: s != null && s.photoUrl || s == null ? void 0 : s.name,
645
+ src: (s == null ? void 0 : s.photoUrl) ?? void 0,
646
+ size: "sm"
647
+ }),
648
+ W("span", { class: "fm-typo-en-body-sm-400" }, s == null ? void 0 : s.name)
649
+ ]
650
+ );
651
+ }
652
+ },
653
+ {
654
+ header: c("connect.loyalty.card.table.phone"),
655
+ accessorFn: (a) => {
656
+ var s;
657
+ return ((s = a.pf_member) == null ? void 0 : s.phoneNumber) || "-";
658
+ },
659
+ accessorKey: "pf_member.phoneNumber"
660
+ },
661
+ {
662
+ header: c("connect.loyalty.card.table.created_at"),
663
+ accessorKey: "_id",
664
+ accessorFn: (a) => ie(Be(a._id.toString())).format("DD MMM YYYY hh:mmA")
665
+ },
666
+ {
667
+ header: c("connect.loyalty.card.table.bundle"),
668
+ accessorFn: (a) => {
669
+ var s;
670
+ return ((s = v.value.find((l) => l._id === a.bundle)) == null ? void 0 : s.name) || "-";
671
+ }
672
+ },
673
+ {
674
+ header: c("connect.loyalty.card.table.redeemed_at"),
675
+ accessorKey: "redeemedAt",
676
+ accessorFn: (a) => a.redeemedAt ? ie(a.redeemedAt).format("DD MMM YYYY hh:mmA") : "-"
677
+ }
678
+ ], { tableMeta: r, rowData: y, onSort: V, debouncedFetchData: U, onSearch: T } = De(se.readCards);
679
+ async function A() {
680
+ var a;
681
+ await U(), (a = w.value) == null || a.showSheet(!1);
682
+ }
683
+ const P = G(() => R.isPremium ? [
684
+ {
685
+ label: c("connect.loyalty.card.actions.create"),
686
+ value: "create",
687
+ isPrimary: !0
688
+ },
689
+ {
690
+ label: c("connect.loyalty.card.actions.manage_design"),
691
+ value: "design",
692
+ isPrimary: !0
693
+ }
694
+ ] : []);
695
+ async function u(a) {
696
+ const s = new Fe(), l = a.map((t) => ({
697
+ CardNumber: t
698
+ }));
699
+ s.addRecords(l), await Ue(
700
+ s.buildExcel(),
701
+ `cards-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
702
+ {
703
+ bookType: "xlsx",
704
+ bookSST: !1,
705
+ type: "array"
706
+ }
707
+ );
708
+ }
709
+ return ne(async () => {
710
+ await x(async () => {
711
+ await R.readPremium(), await h.readMemberStore(), await h.readMembership(), await A();
712
+ });
713
+ }), (a, s) => {
714
+ const l = g("FmPill"), t = g("FmPageHead"), D = g("FmSearch"), H = g("FmButton"), B = g("FmCard");
715
+ return _(), N(M, null, [
716
+ d(t, {
717
+ title: n(c)("connect.loyalty.card.title"),
718
+ actions: n(P),
719
+ "onClick:action": s[0] || (s[0] = (f) => {
720
+ var $, F;
721
+ console.log(f), f === "design" && (($ = n(E)) == null || $.showSheet(!0)), f === "create" && ((F = n(w)) == null || F.showSheet(!0));
722
+ })
723
+ }, {
724
+ title: k(() => [
725
+ m("div", pn, [
726
+ m("span", cn, q(n(c)("connect.loyalty.card.title")), 1),
727
+ d(l, {
728
+ class: "ml-8",
729
+ variant: "premium"
730
+ })
731
+ ])
732
+ ]),
733
+ _: 1
734
+ }, 8, ["title", "actions"]),
735
+ m("div", mn, [
736
+ n(y).length > 0 || n(y).length <= 0 && n(r).searchValue || n(r).pageCount > 0 ? (_(), N(M, { key: 0 }, [
737
+ m("div", un, [
738
+ d(D, {
739
+ class: "mt-4",
740
+ modelValue: n(r).searchValue,
741
+ "onUpdate:modelValue": [
742
+ s[1] || (s[1] = (f) => n(r).searchValue = f),
743
+ n(T)
744
+ ],
745
+ placeholder: "Search",
746
+ collapsible: ""
747
+ }, null, 8, ["modelValue", "onUpdate:modelValue"]),
748
+ d(H, {
749
+ icon: "ios_share",
750
+ variant: "tertiary",
751
+ onClick: ye(n(He), ["prevent"])
752
+ }, null, 8, ["onClick"])
753
+ ]),
754
+ d(we, {
755
+ loading: n(r).isLoading,
756
+ "row-data": n(y),
757
+ "row-count": n(r).totalRows,
758
+ "column-defs": L,
759
+ "shrink-at": !1,
760
+ "page-count": n(r).pageCount,
761
+ "page-index": n(r).pageIndex,
762
+ "page-size": n(r).pageSize,
763
+ onSortChange: n(V),
764
+ onPageChange: s[2] || (s[2] = (f) => {
765
+ n(U)({
766
+ pageSize: f.pageSize,
767
+ pageIndex: f.pageIndex
768
+ });
769
+ })
770
+ }, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"])
771
+ ], 64)) : (_(), I(B, {
772
+ key: 1,
773
+ variant: "outlined",
774
+ class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
775
+ }, {
776
+ default: k(() => [
777
+ _n,
778
+ m("div", gn, [
779
+ m("div", fn, q(n(c)("connect.loyalty.card.empty_state.title")), 1),
780
+ m("div", bn, q(n(c)("connect.loyalty.card.empty_state.description")), 1)
781
+ ]),
782
+ m("div", hn, [
783
+ d(H, {
784
+ variant: "primary",
785
+ label: n(c)("connect.loyalty.card.actions.add"),
786
+ icon: "add",
787
+ disabled: !n(R).isPremium,
788
+ onClick: s[3] || (s[3] = () => {
789
+ var f;
790
+ return (f = n(w)) == null ? void 0 : f.showSheet(!0);
791
+ })
792
+ }, null, 8, ["label", "disabled"]),
793
+ d(H, {
794
+ variant: "secondary",
795
+ label: n(c)("connect.loyalty.card.actions.manage_design"),
796
+ disabled: !n(R).isPremium,
797
+ onClick: s[4] || (s[4] = () => {
798
+ var f;
799
+ return (f = n(E)) == null ? void 0 : f.showSheet(!0);
800
+ })
801
+ }, null, 8, ["label", "disabled"])
802
+ ])
803
+ ]),
804
+ _: 1
805
+ })),
806
+ d(Qe, {
807
+ ref_key: "sheetRef",
808
+ ref: w,
809
+ onSuccess: A,
810
+ onExport: u
811
+ }, null, 512),
812
+ d(dn, {
813
+ ref_key: "designSheetRef",
814
+ ref: E,
815
+ onSuccess: A
816
+ }, null, 512)
817
+ ])
818
+ ], 64);
819
+ };
820
+ }
821
+ });
822
+ export {
823
+ jn as default
824
+ };