@feedmepos/mf-connect 0.1.126-dev → 0.1.126-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 (147) hide show
  1. package/dist/{App-B_Yp6cvN.js → App-DRHHPaMz.js} +216 -224
  2. package/dist/{Bin-CmIpEIwe.js → Bin-FkcYLSTm.js} +8 -8
  3. package/dist/{Broadcast-DkV4BdU_.js → Broadcast-Cgqp_BMa.js} +21 -22
  4. package/dist/{CampaignAnalytic-Dkwo_lpB.js → CampaignAnalytic-kKZ_BwW0.js} +7 -7
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Ch8Gblw6.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CX0mWLjO.js} +10 -9
  6. package/dist/{Card-DXCkG34M.js → Card-Bu1y37hV.js} +23 -23
  7. package/dist/{Collections-CybPfSO4.js → Collections-B3mJkBCT.js} +185 -197
  8. package/dist/{Credit-B-KUzWsX.js → Credit-Bn-2EcVy.js} +20 -21
  9. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CWHYeYVD.js → DateRangeChip.vue_vue_type_script_setup_true_lang-Cz7pZ7LD.js} +1 -1
  10. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DIUEjCFW.js +3638 -0
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-nMcH6y5e.js → EffectSheet.vue_vue_type_style_index_0_lang-B7XBiv4l.js} +33 -33
  12. package/dist/{Experience-Q2NHpa-V.js → Experience-CunbmoAu.js} +31 -32
  13. package/dist/{FileSaver.min-CKw2rn-J.js → FileSaver.min-ChFSxYyS.js} +1 -1
  14. package/dist/{Game-lZvkg04z.js → Game-dFDwx_UJ.js} +18 -19
  15. package/dist/{GiftCardSetup-CPRju80_.js → GiftCardSetup-DYpEqqX0.js} +31 -31
  16. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-Ci686UoB.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-DxJdI6gc.js} +7 -7
  17. package/dist/{Goals-asGsUeVv.js → Goals-DuZzgM_K.js} +4 -4
  18. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-nk87zPWH.js → ImageInput.vue_vue_type_script_setup_true_lang-lDulspkF.js} +1 -1
  19. package/dist/{Index-DIasPS4Y.js → Index-BxB2ohT0.js} +10 -10
  20. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DkOn8p1v.js → LocationPicker.vue_vue_type_script_setup_true_lang-9sKJE1A5.js} +1 -1
  21. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BdSkxiP-.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CxBNYzcz.js} +1 -1
  22. package/dist/{LoyaltyDashboard-DlCsZ3YX.js → LoyaltyDashboard-DQzGvQ7j.js} +15 -15
  23. package/dist/{MainLayout-DLObnTAA.js → MainLayout-MAZ1S06H.js} +1 -1
  24. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-DigSZKt1.js → MainLayout.vue_vue_type_script_setup_true_lang-CeF3LU-N.js} +3 -3
  25. package/dist/{Marketing-JflPW-w9.js → Marketing-ACF6F7be.js} +4 -4
  26. package/dist/{MarketingMaterialEdit-fSAB3YVb.js → MarketingMaterialEdit-B8NfkoHg.js} +211 -214
  27. package/dist/{Member-CzNahXTj.js → Member-rLxDUOr8.js} +7 -7
  28. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-bqWUIbMG.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-Bq3UKX7v.js} +48 -40
  29. package/dist/{MemberImportHistory--r_A_2Es.js → MemberImportHistory-BuG6DmdV.js} +7 -7
  30. package/dist/{MemberList-CQZQ4sN8.js → MemberList-CC6zm_I6.js} +105 -103
  31. package/dist/{MemberTransactions-BPg9JaUA.js → MemberTransactions-Bw2xu6jZ.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BhIFChx-.js → MessageInput.vue_vue_type_script_setup_true_lang-Cav8gQUK.js} +12 -12
  33. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CdGSNqEp.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-8wdY4FnI.js} +1 -1
  34. package/dist/{Mission-CYCB3YQc.js → Mission-DnEcbALs.js} +21 -22
  35. package/dist/{Overview-DuNuUYYq.js → Overview-COytI5xN.js} +21 -21
  36. package/dist/{Overview-B5ylMBHT.js → Overview-DShFohlk.js} +144 -145
  37. package/dist/{Point-DG-Uwj25.js → Point-CWYwlx0i.js} +21 -22
  38. package/dist/{Promotion-DqxBQ1yO.js → Promotion-LBrQYtad.js} +131 -137
  39. package/dist/{Queue-Cy8LGt_Y.js → Queue-DKg5EvDM.js} +46 -46
  40. package/dist/{Record-CzXbu41w.js → Record--lYpawLN.js} +9 -9
  41. package/dist/{Review-7VL6gIqp.js → Review-C4pNmJ7n.js} +2 -2
  42. package/dist/ReviewFacebookCallback-BYXwKQNG.js +238 -0
  43. package/dist/{ReviewGoogleCallback-1JXR_f5O.js → ReviewGoogleCallback-ge8fL_A-.js} +5 -5
  44. package/dist/{Reward-BKhUDEu3.js → Reward-B67r1Bpz.js} +16 -16
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DjjCytWF.js → RewardGroup.vue_vue_type_script_setup_true_lang-Bt0Kx2--.js} +14 -14
  46. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-fLtn32Rw.js +1884 -0
  47. package/dist/{Segment-DdHDJhaS.js → Segment-DeSC3z5G.js} +307 -304
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-9kGUkHMi.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DdjC7X1V.js} +15 -15
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DeFw0px7.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-Crys59UO.js} +4 -4
  50. package/dist/{Setting-DZKGXw-i.js → Setting-DiDcMU5E.js} +17 -17
  51. package/dist/{SettingAdvertisements-BBNs8tCw.js → SettingAdvertisements-3wMI9egH.js} +12 -12
  52. package/dist/Settings-BR6Y1DBZ.js +179 -0
  53. package/dist/{Store-C8IlE4IH.js → Store-DgefqByH.js} +29 -29
  54. package/dist/{StoreRewards-DWygRLR1.js → StoreRewards-CS2h5RVB.js} +15 -15
  55. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CeYYws6P.js → StoreTransactions.vue_vue_type_script_setup_true_lang-gPR8sn4k.js} +25 -25
  56. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Cjnkpd1j.js +142 -0
  57. package/dist/{Tier-7RoxGHsP.js → Tier-Cye6888q.js} +688 -2583
  58. package/dist/{Title-0q2Z4HIe.js → Title-B1eJh5oy.js} +95 -96
  59. package/dist/{Transaction-CFasERdg.js → Transaction-ouzdsBUx.js} +2 -2
  60. package/dist/{Upselling-DM9R6pYw.js → Upselling-CdQd2Fuk.js} +3 -3
  61. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BDjwcgnc.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BSlxe1Hf.js} +26 -26
  62. package/dist/{Voucher-BkzW2hVV.js → Voucher-CJJt8VlJ.js} +19 -19
  63. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DaE4xa3x.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BzbNaK6H.js} +12 -12
  64. package/dist/{WhatsappAccount-C3WpDF9O.js → WhatsappAccount-DIxSP6Tp.js} +6 -6
  65. package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BxC_3h52.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-L9Y5lAft.js} +1 -1
  66. package/dist/{WhatsappBot-DZb-Dn3s.js → WhatsappBot-BXxoaz7-.js} +6 -6
  67. package/dist/{WhatsappBotLogs--KskC32Z.js → WhatsappBotLogs-D8IfLHk3.js} +6 -6
  68. package/dist/WhatsappBotSettings-Bq9C7pNZ.js +704 -0
  69. package/dist/{WhatsappLayout-NIrFGbId.js → WhatsappLayout-3rWwmGRd.js} +3 -3
  70. package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-BfD5hHc7.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-C3N-loYJ.js} +3 -3
  71. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CJGxy7gf.js → ZodTextField.vue_vue_type_script_setup_true_lang-D1dORvMi.js} +2 -2
  72. package/dist/{app-B9nLnoBt.js → app-BXqas0p1.js} +3386 -4174
  73. package/dist/app.js +3 -4
  74. package/dist/{base.export-CBzNea0v.js → base.export-DQCZiS2E.js} +2 -2
  75. package/dist/{business-aT2zslwu.js → business-RsRhXSh8.js} +1 -1
  76. package/dist/{campaign-BDCLKFwN.js → campaign-C2X6aa7B.js} +25 -31
  77. package/dist/{campaign-B6nTwt17.js → campaign-DASPASQ0.js} +113 -126
  78. package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-BqekIiiN.js} +1 -2
  79. package/dist/campaign.fn-BEX99lsa.js +776 -0
  80. package/dist/{collection.fn-CDna_VLD.js → collection.fn-C7jNdh0A.js} +2 -2
  81. package/dist/{currency-Baum67Wz.js → currency-BvBM_Io9.js} +1 -1
  82. package/dist/{effect-CeJbflOK.js → effect-BA1yh6Mj.js} +1 -1
  83. package/dist/{email-addresses-Y3vF73J0.js → email-addresses-haS5P7hq.js} +2 -2
  84. package/dist/{feature-flag-zn6Ql9tv.js → feature-flag-B4bJnuei.js} +84 -84
  85. package/dist/google-C3S8u0mT.js +4 -0
  86. package/dist/{helper-DZvnn-yx.js → helper-BtTBvFuA.js} +1 -1
  87. package/dist/{index-CMs3aIA6.js → index-B1dAoOWi.js} +6 -19
  88. package/dist/{index-DXyOBtgF.js → index-B6A6sHpy.js} +1 -1
  89. package/dist/{index-B22ojkMy.js → index-BRTy6G9c.js} +2 -2
  90. package/dist/{index-r_T5o_hF.js → index-BV-YiCDM.js} +2 -2
  91. package/dist/{index-DJIt5tXC.js → index-BvFq5REc.js} +7 -7
  92. package/dist/{index-FgM7b2Sw.js → index-C2rjmdar.js} +2 -2
  93. package/dist/{index-DXKJsqgW.js → index-C7UBk5gq.js} +13 -31
  94. package/dist/{index-BqniSMV6.js → index-CBfVFFME.js} +197 -197
  95. package/dist/{index-B3LCTMwV.js → index-CH-uRaZH.js} +41 -52
  96. package/dist/{index-juXxYQ_a.js → index-CJ-BZCvB.js} +1242 -1314
  97. package/dist/{index-B5H4znfe.js → index-CXznvd79.js} +4 -4
  98. package/dist/{index-Da0-7h2j.js → index-ChGZ_S3V.js} +1 -1
  99. package/dist/{index-DCR1GFCA.js → index-D-D0s8PB.js} +234 -380
  100. package/dist/{index-BL2zQnXK.js → index-D9zjHXFU.js} +3 -3
  101. package/dist/{index-CPi3Qwmj.js → index-DAtVp1NI.js} +2613 -2699
  102. package/dist/{index-DkBOM8za.js → index-DeomfIu9.js} +251 -608
  103. package/dist/{index-DHNhIloU.js → index-Dg972Dfv.js} +1 -1
  104. package/dist/{index-BYUEPfbP.js → index-Dm2Dvxph.js} +23 -23
  105. package/dist/{index-njg4JLa-.js → index-DtbR7I4C.js} +9 -9
  106. package/dist/{index-B20FfbEE.js → index-Q-iHraJ3.js} +1 -1
  107. package/dist/{index-CDRTiAEu.js → index-g_SHjVWE.js} +1 -1
  108. package/dist/{index.esm2017-Dtk7BscN.js → index.esm2017-B7iE1Ggr.js} +93 -93
  109. package/dist/{loading-PoODMkQD.js → loading-BvlSfSVK.js} +1 -1
  110. package/dist/{lodash-TthNgH98.js → lodash-Daey2k0N.js} +1 -1
  111. package/dist/{member-import-D7zs0Jvh.js → member-import-CF9aym_y.js} +1 -1
  112. package/dist/{membership-Cab-iWQ1.js → membership-DfG-fl80.js} +2 -2
  113. package/dist/{money-9Q306M3g.js → money-SBIQhxqf.js} +1 -1
  114. package/dist/{number-D9M3D435.js → number-Cp1bFK9U.js} +1 -1
  115. package/dist/objectid-BMRA1fIL.js +145 -0
  116. package/dist/{onboarding-D5LKUHVI.js → onboarding-bjc7C8O-.js} +25 -25
  117. package/dist/{onboardingSetup-D0jsS6w5.js → onboardingSetup-BAu9TDI6.js} +2 -2
  118. package/dist/{plugins-CDTKQ1Pg.js → plugins-Def73Eyk.js} +3 -3
  119. package/dist/{reward-De3e9vYS.js → reward-KecVeztH.js} +1 -1
  120. package/dist/rule-builder-DgU6P24U.js +102 -0
  121. package/dist/{rule-trVJgEOe.js → rule-kMIC0vOi.js} +492 -572
  122. package/dist/style.css +1 -1
  123. package/dist/template-BH9vS8A9.js +275 -0
  124. package/dist/{timezone-DkuByUmb.js → timezone-CMX1sJ0a.js} +1 -1
  125. package/dist/{transaction.fn-CPE-oQhA.js → transaction.fn-Bjy5utxD.js} +2 -2
  126. package/dist/{trigger-C6oM-8pe.js → trigger-DnnOJVUi.js} +9 -9
  127. package/dist/{useMarketingMaterialActions-C5scdJQp.js → useMarketingMaterialActions-DMrNOpok.js} +4 -4
  128. package/dist/{usePagination-CIuTHSSG.js → usePagination-BCY4a-dh.js} +1 -1
  129. package/dist/{user-Bdlgn2yo.js → user-BTc0S1Vx.js} +1 -1
  130. package/dist/vue-i18n-7BKLPLxj.js +2365 -0
  131. package/dist/{xlsx-CvecxUOG.js → xlsx-DR5oLrEs.js} +1 -1
  132. package/dist/{zod-bniyeWdY.js → zod-CMq39HWn.js} +1 -1
  133. package/package.json +2 -6
  134. package/dist/AuditLogs-C1U17evK.js +0 -2016
  135. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C86llTFR.js +0 -4439
  136. package/dist/Grab-BjFLSMpE.js +0 -301
  137. package/dist/ReviewFacebookCallback-BwzuPmrz.js +0 -225
  138. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Vg7pRGIz.js +0 -1923
  139. package/dist/Settings-9v0hnBJZ.js +0 -286
  140. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BiN3uRJ_.js +0 -7007
  141. package/dist/WhatsappBotSettings-Dns_PqVE.js +0 -945
  142. package/dist/campaign.fn-Ck1t5C1T.js +0 -776
  143. package/dist/duplicateCampaign-BwrMZgaV.js +0 -51
  144. package/dist/google-BQK68wbe.js +0 -5
  145. package/dist/objectid-DKvQl6FD.js +0 -145
  146. package/dist/template-Bj3Tb6bP.js +0 -227
  147. package/dist/vue-i18n-DEpDI-dt.js +0 -2365
package/dist/app.js CHANGED
@@ -1,7 +1,6 @@
1
- import "vue";
2
- import { F as e, i as o, r as p } from "./app-B9nLnoBt.js";
1
+ import { F as e, i as r, r as o } from "./app-BXqas0p1.js";
3
2
  export {
4
3
  e as FmApp,
5
- o as i18nMessages,
6
- p as routes
4
+ r as i18nMessages,
5
+ o as routes
7
6
  };
@@ -1,8 +1,8 @@
1
1
  var w = Object.defineProperty;
2
2
  var y = (e, s, o) => s in e ? w(e, s, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[s] = o;
3
3
  var n = (e, s, o) => y(e, typeof s != "symbol" ? s + "" : s, o);
4
- import { u as x } from "./loading-PoODMkQD.js";
5
- import { w as h, u as a } from "./xlsx-CvecxUOG.js";
4
+ import { u as x } from "./loading-BvlSfSVK.js";
5
+ import { w as h, u as a } from "./xlsx-DR5oLrEs.js";
6
6
  const t = {
7
7
  sortBy: "_id",
8
8
  descending: !1,
@@ -1,7 +1,7 @@
1
1
  import { ref as i, computed as u } from "vue";
2
2
  import { defineStore as w } from "pinia";
3
3
  import { useCoreStore as y } from "@feedmepos/mf-common";
4
- import { d as I, g as r, A as b, S, b as D } from "./index-DJIt5tXC.js";
4
+ import { d as I, g as r, A as b, S, b as D } from "./index-BvFq5REc.js";
5
5
  const $ = {
6
6
  async readSettings(e) {
7
7
  try {
@@ -1,14 +1,14 @@
1
1
  import { defineStore as d } from "pinia";
2
- import { reactive as b, onMounted as f, ref as s } from "vue";
3
- import { c } from "./index-r_T5o_hF.js";
4
- import { g as i, S as g, b as h } from "./index-DJIt5tXC.js";
2
+ import { reactive as f, onMounted as b, ref as a } from "vue";
3
+ import { c } from "./index-BV-YiCDM.js";
4
+ import { g as i, S as I, b as g } from "./index-BvFq5REc.js";
5
5
  const p = () => {
6
- const e = g.getBusinessId();
6
+ const e = I.getBusinessId();
7
7
  if (!e) throw new Error("Invalid business ID");
8
- return h(`businesses/${e}/campaigns`, {
8
+ return g(`businesses/${e}/campaigns`, {
9
9
  noIdRequired: !0
10
10
  });
11
- }, I = {
11
+ }, h = {
12
12
  async readAll() {
13
13
  return i(await p().get("templates"));
14
14
  },
@@ -17,8 +17,8 @@ const p = () => {
17
17
  await p().get(`templates/${e}`)
18
18
  );
19
19
  }
20
- }, A = d("mf-connect-campaign", () => {
21
- const e = b({
20
+ }, S = d("mf-connect-campaign", () => {
21
+ const e = f({
22
22
  promotion: [],
23
23
  voucher: [],
24
24
  broadcast: [],
@@ -27,13 +27,12 @@ const p = () => {
27
27
  credit: [],
28
28
  token: [],
29
29
  mission: [],
30
- grab: [],
31
30
  all: []
32
31
  });
33
- f(() => {
32
+ b(() => {
34
33
  console.log("🔧 CampaignStore Installed");
35
34
  });
36
- const t = s([]), r = s([]), n = s([]);
35
+ const t = a([]), r = a([]), n = a([]);
37
36
  async function u(k) {
38
37
  const o = await c.readAll({
39
38
  limit: 1e3,
@@ -41,39 +40,34 @@ const p = () => {
41
40
  sortBy: "_id",
42
41
  descending: !0
43
42
  });
44
- Object.keys(e).forEach((a) => {
45
- e[a] = [];
46
- }), e.all = o.resources.filter(
47
- (a) => a.type !== "MEMBERSHIP"
48
- );
49
- for (const a of o.resources)
50
- switch (a.type) {
43
+ Object.keys(e).forEach((s) => {
44
+ e[s] = [];
45
+ }), e.all = o.resources.filter((s) => s.type !== "MEMBERSHIP");
46
+ for (const s of o.resources)
47
+ switch (s.type) {
51
48
  case "PROMOTION":
52
- e.promotion.push(a);
49
+ e.promotion.push(s);
53
50
  break;
54
51
  case "VOUCHER":
55
- e.voucher.push(a), n.value.push(a);
52
+ e.voucher.push(s), n.value.push(s);
56
53
  break;
57
54
  case "BROADCAST":
58
- ["SCHEDULE", "FEEDBACK"].includes(a.event.type) && e.broadcast.push(a);
55
+ ["SCHEDULE", "FEEDBACK"].includes(s.event.type) && e.broadcast.push(s);
59
56
  break;
60
57
  case "POINT":
61
- e.experience.push(a);
58
+ e.experience.push(s);
62
59
  break;
63
60
  case "COIN":
64
- e.point.push(a);
61
+ e.point.push(s);
65
62
  break;
66
63
  case "CREDIT":
67
- e.credit.push(a);
64
+ e.credit.push(s);
68
65
  break;
69
66
  case "GAME":
70
- e.token.push(a);
67
+ e.token.push(s);
71
68
  break;
72
69
  case "MISSION":
73
- e.mission.push(a);
74
- break;
75
- case "GRAB":
76
- e.grab.push(a);
70
+ e.mission.push(s);
77
71
  break;
78
72
  }
79
73
  }
@@ -81,7 +75,7 @@ const p = () => {
81
75
  r.value = await c.readGroups();
82
76
  }
83
77
  async function m() {
84
- t.value = await I.readAll();
78
+ t.value = await h.readAll();
85
79
  }
86
80
  return {
87
81
  // State
@@ -96,5 +90,5 @@ const p = () => {
96
90
  };
97
91
  });
98
92
  export {
99
- A as u
93
+ S as u
100
94
  };
@@ -1,27 +1,27 @@
1
1
  import { h as u } from "./moment-D7p2TMB-.js";
2
- import "./index-DCR1GFCA.js";
3
- import { e as l } from "./effect-CeJbflOK.js";
4
- import { components as d } from "@feedmepos/ui-library";
5
- import { a as E } from "./index-DkBOM8za.js";
6
- import { c as N } from "./rule-trVJgEOe.js";
7
- import { u as I } from "./business-aT2zslwu.js";
8
- import { C as m } from "./campaign.fn-Ck1t5C1T.js";
9
- import { g as y, t as h } from "./index-BqniSMV6.js";
10
- import { c as C } from "./string-Gcy5IM_H.js";
11
- import { i as f } from "./plugins-CDTKQ1Pg.js";
2
+ import "./index-D-D0s8PB.js";
3
+ import { e as f } from "./effect-BA1yh6Mj.js";
4
+ import { components as g } from "@feedmepos/ui-library";
5
+ import { i as b } from "./rule-builder-DgU6P24U.js";
6
+ import { c as O } from "./rule-kMIC0vOi.js";
7
+ import { u as E } from "./business-RsRhXSh8.js";
8
+ import { C as m } from "./campaign.fn-BEX99lsa.js";
9
+ import { g as h, t as d } from "./index-CBfVFFME.js";
10
+ import { c as y } from "./string-Gcy5IM_H.js";
11
+ import { i as c } from "./plugins-Def73Eyk.js";
12
12
  import { h as p } from "vue";
13
- import { F as s } from "./campaign.enum-Dx-Zo68Q.js";
14
- const R = [
13
+ import { F as s } from "./campaign.enum-BqekIiiN.js";
14
+ const N = [
15
15
  "APP_INBOX",
16
16
  "PUSH",
17
17
  "SMS",
18
18
  "EMAIL",
19
19
  "WHATSAPP"
20
- ], S = [...R];
21
- function j(t) {
22
- return S.includes(t);
20
+ ], I = [...N];
21
+ function G(t) {
22
+ return I.includes(t);
23
23
  }
24
- function O(t, e) {
24
+ function C(t, e) {
25
25
  return t === "APP_INBOX" ? {
26
26
  title: "",
27
27
  previewText: "",
@@ -40,17 +40,17 @@ function O(t, e) {
40
40
  variables: e
41
41
  };
42
42
  }
43
- function V(t, e, n = []) {
43
+ function j(t, e, n = []) {
44
44
  return t.channels.includes(e) ? t : {
45
45
  ...t,
46
46
  channels: [...t.channels, e],
47
47
  content: {
48
48
  ...t.content,
49
- [e]: t.content[e] ?? O(e, n)
49
+ [e]: t.content[e] ?? C(e, n)
50
50
  }
51
51
  };
52
52
  }
53
- function X(t, e) {
53
+ function V(t, e) {
54
54
  const n = { ...t.content };
55
55
  return delete n[e], {
56
56
  ...t,
@@ -58,80 +58,80 @@ function X(t, e) {
58
58
  content: n
59
59
  };
60
60
  }
61
- function z(t, e, n) {
61
+ function X(t, e, n) {
62
62
  return {
63
63
  ...t,
64
64
  content: { ...t.content, [e]: n }
65
65
  };
66
66
  }
67
- function W(t, e, n) {
68
- const o = t.channels.indexOf(e), a = o + n;
69
- if (o < 0 || a < 0 || a >= t.channels.length) return t;
70
- const r = [...t.channels];
71
- return [r[o], r[a]] = [r[a], r[o]], { ...t, channels: r };
67
+ function z(t, e, n) {
68
+ const o = t.channels.indexOf(e), r = o + n;
69
+ if (o < 0 || r < 0 || r >= t.channels.length) return t;
70
+ const a = [...t.channels];
71
+ return [a[o], a[r]] = [a[r], a[o]], { ...t, channels: a };
72
72
  }
73
- function J(t, e, n = []) {
74
- const [o, ...a] = t.channels;
73
+ function W(t, e, n = []) {
74
+ const [o, ...r] = t.channels;
75
75
  if (o === e) return t;
76
- const r = {
76
+ const a = {
77
77
  ...t.content,
78
- [e]: t.content[e] ?? O(e, n)
78
+ [e]: t.content[e] ?? C(e, n)
79
79
  };
80
- return o && delete r[o], {
80
+ return o && delete a[o], {
81
81
  ...t,
82
- channels: [e, ...a.filter((b) => b !== e)],
83
- content: r
82
+ channels: [e, ...r.filter((l) => l !== e)],
83
+ content: a
84
84
  };
85
85
  }
86
- function K(t, e) {
86
+ function J(t, e) {
87
87
  if (!e) return !1;
88
88
  const n = t.content[e];
89
89
  return n ? ["title", "previewText", "content", "body"].some(
90
90
  (o) => typeof n[o] == "string" && !!n[o].trim()
91
91
  ) : !1;
92
92
  }
93
- function q(t, e) {
93
+ function K(t, e) {
94
94
  return { ...t, mode: e };
95
95
  }
96
- function Q(t, e) {
96
+ function q(t, e) {
97
97
  const n = t.content[e];
98
98
  if (!n) return !1;
99
99
  if (e === "APP_INBOX") {
100
- const o = n, a = (o.buttons ?? []).every(
101
- (r) => r.label.trim().length > 0 && y.safeParse(r.url ?? "").success
100
+ const o = n, r = (o.buttons ?? []).every(
101
+ (a) => a.label.trim().length > 0 && h.safeParse(a.url ?? "").success
102
102
  );
103
- return o.title.trim().length > 0 && o.previewText.trim().length > 0 && a;
103
+ return o.title.trim().length > 0 && o.previewText.trim().length > 0 && r;
104
104
  }
105
105
  if (e === "PUSH") {
106
- const o = n, a = o.title.trim().length > 0 && o.body.trim().length > 0, r = o.destination !== "EXTERNAL" || y.safeParse(o.url ?? "").success;
107
- return a && r;
106
+ const o = n, r = o.title.trim().length > 0 && o.body.trim().length > 0, a = o.destination !== "EXTERNAL" || h.safeParse(o.url ?? "").success;
107
+ return r && a;
108
108
  }
109
109
  return n.content.trim().length > 0;
110
110
  }
111
- function A(t, e) {
111
+ function S(t, e) {
112
112
  return t.channels.map(e).join(t.mode === "fallback" ? " → " : " + ");
113
113
  }
114
- function Z(t) {
114
+ function Q(t) {
115
115
  var e, n;
116
116
  if (!(!t || t.delivery)) {
117
117
  if ((n = (e = t.message) == null ? void 0 : e.content) != null && n.trim()) {
118
- t.delivery = h(t);
118
+ t.delivery = d(t);
119
119
  return;
120
120
  }
121
121
  delete t.message, t.delivery = { mode: "fallback", channels: [], content: {} };
122
122
  }
123
123
  }
124
- const c = f.global.t;
125
- function D() {
126
- const t = f.global.locale;
127
- return typeof t == "string" ? t : t.value;
128
- }
129
- function g(t) {
130
- return new Intl.DateTimeFormat(D(), {
131
- day: "2-digit",
132
- month: "short",
133
- year: "numeric"
134
- }).format(new Date(t));
124
+ const R = 5;
125
+ function A(t, e) {
126
+ if (!t) return { kind: "all" };
127
+ const n = new Map(e.map((a) => [String(a._id), a])), o = [];
128
+ for (const a of t) {
129
+ const l = n.get(String(a));
130
+ l && o.push({ id: String(a), code: l.code, name: l.name });
131
+ }
132
+ if (t.length === 0) return { kind: "none" };
133
+ const r = t.length - o.length;
134
+ return r === 0 && o.length <= R ? { kind: "names", names: o.map((a) => a.name) } : { kind: "count", rows: o, total: e.length, unavailable: r };
135
135
  }
136
136
  function i(t) {
137
137
  return p(
@@ -140,17 +140,17 @@ function i(t) {
140
140
  class: `${t.chipClass} gap-4 h-[22px] inline-flex items-center justify-center min-w-min px-8 rounded-md`
141
141
  },
142
142
  [
143
- p(d.FmIcon, { size: "sm", name: t.icon, outline: !0 }),
143
+ p(g.FmIcon, { size: "sm", name: t.icon, outline: !0 }),
144
144
  p("span", { class: "fm-typo-en-body-md-600" }, t.name)
145
145
  ]
146
146
  );
147
147
  }
148
- const tt = {
148
+ const Z = {
149
149
  [s.enum.CREDIT]: {
150
150
  chipClass: "!text-fm-color-secondary-plum !bg-[#f2ebfe]",
151
151
  icon: "local_activity",
152
152
  get name() {
153
- return c("connect.campaign.common.typeName.CREDIT");
153
+ return c.global.t("connect.campaign.common.typeName.CREDIT");
154
154
  },
155
155
  chip() {
156
156
  return i(this);
@@ -160,7 +160,7 @@ const tt = {
160
160
  chipClass: "!text-fm-color-secondary-citrus !bg-fm-color-system-warning-100",
161
161
  icon: "loyalty",
162
162
  get name() {
163
- return c("connect.campaign.common.typeName.PROMOTION");
163
+ return c.global.t("connect.campaign.common.typeName.PROMOTION");
164
164
  },
165
165
  chip() {
166
166
  return i(this);
@@ -170,7 +170,7 @@ const tt = {
170
170
  chipClass: "!text-fm-color-secondary-halite !bg-[#fff0f6]",
171
171
  icon: "sell",
172
172
  get name() {
173
- return c("connect.campaign.common.typeName.VOUCHER");
173
+ return c.global.t("connect.campaign.common.typeName.VOUCHER");
174
174
  },
175
175
  chip() {
176
176
  return i(this);
@@ -180,7 +180,7 @@ const tt = {
180
180
  chipClass: "!text-fm-color-secondary-cocoa !bg-[#fff9e6]",
181
181
  icon: "award_star",
182
182
  get name() {
183
- return c("connect.campaign.common.typeName.POINT");
183
+ return c.global.t("connect.campaign.common.typeName.POINT");
184
184
  },
185
185
  chip() {
186
186
  return i(this);
@@ -190,7 +190,7 @@ const tt = {
190
190
  chipClass: "!text-fm-color-typo-info !bg-fm-color-system-info-100",
191
191
  icon: "campaign",
192
192
  get name() {
193
- return c("connect.campaign.common.typeName.BROADCAST");
193
+ return c.global.t("connect.campaign.common.typeName.BROADCAST");
194
194
  },
195
195
  chip() {
196
196
  return i(this);
@@ -200,7 +200,7 @@ const tt = {
200
200
  chipClass: "!text-fm-color-secondary-mint !bg-fm-color-system-success-100",
201
201
  icon: "database",
202
202
  get name() {
203
- return c("connect.campaign.common.typeName.GAME");
203
+ return c.global.t("connect.campaign.common.typeName.GAME");
204
204
  },
205
205
  chip() {
206
206
  return i(this);
@@ -210,7 +210,7 @@ const tt = {
210
210
  chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
211
211
  icon: "editor_choice",
212
212
  get name() {
213
- return c("connect.campaign.common.typeName.REWARD_POOL");
213
+ return c.global.t("connect.campaign.common.typeName.REWARD_POOL");
214
214
  },
215
215
  chip() {
216
216
  return i(this);
@@ -220,7 +220,7 @@ const tt = {
220
220
  chipClass: "!text-fm-color-system-success-400 !bg-fm-color-system-success-100",
221
221
  icon: "monetization_on",
222
222
  get name() {
223
- return c("connect.campaign.common.typeName.COIN");
223
+ return c.global.t("connect.campaign.common.typeName.COIN");
224
224
  },
225
225
  chip() {
226
226
  return i(this);
@@ -230,65 +230,51 @@ const tt = {
230
230
  chipClass: "",
231
231
  icon: "",
232
232
  get name() {
233
- return c("connect.campaign.common.typeName.MEMBERSHIP");
233
+ return c.global.t("connect.campaign.common.typeName.MEMBERSHIP");
234
234
  },
235
235
  chip() {
236
236
  return i(this);
237
237
  }
238
238
  },
239
+ // TODO: confirm color
239
240
  [s.enum.MISSION]: {
240
241
  chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
241
242
  icon: "editor_choice",
242
243
  get name() {
243
- return c("connect.campaign.common.typeName.MISSION");
244
+ return c.global.t("connect.campaign.common.typeName.MISSION");
244
245
  },
245
246
  chip() {
246
247
  return i(this);
247
248
  }
248
- },
249
- [s.enum.GRAB]: {
250
- chipClass: "!text-fm-color-secondary-tuna !bg-[#e3f4f9]",
251
- icon: "editor_choice",
252
- name: "Grab",
253
- chip() {
254
- return i(this);
255
- }
256
249
  }
257
250
  };
258
- function et(t) {
259
- const e = _(t), n = {
251
+ function tt(t) {
252
+ const e = M(t), n = {
260
253
  active: "text-fm-color-typo-success bg-fm-color-system-success-100",
261
254
  upcoming: "text-fm-color-typo-info bg-fm-color-system-info-100",
262
255
  expired: "text-fm-color-typo-error bg-fm-color-system-error-100"
263
256
  };
264
- return t.type == "VOUCHER" ? p(d.FmChip, {
257
+ return t.type == "VOUCHER" ? p(g.FmChip, {
265
258
  class: n[e],
266
- label: C.title(c(`connect.campaign.common.status.${e}`)),
259
+ label: y.title(
260
+ c.global.t(`connect.campaign.common.status.${e}`)
261
+ ),
267
262
  compact: !0
268
- }) : p(d.FmChip, {
263
+ }) : p(g.FmChip, {
269
264
  class: n[e],
270
- label: C.title(c(`connect.campaign.common.status.${e}`)),
265
+ label: y.title(
266
+ c.global.t(`connect.campaign.common.status.${e}`)
267
+ ),
271
268
  compact: !0
272
269
  });
273
270
  }
274
- function nt(t) {
275
- const e = t.timeframeOptions;
276
- if (!e || !e.start && !e.end)
277
- return c("connect.campaign.common.always_active");
278
- if (!e.start && e.end)
279
- return c("connect.campaign.common.valid_until", {
280
- date: g(e.end)
281
- });
282
- const n = g(e.start), o = e.end ? g(e.end) : c("connect.campaign.common.unlimited");
283
- return `${n} -> ${o}`;
284
- }
285
271
  function P(t) {
286
272
  if (!t || !t.start && !t.end)
287
273
  return "connect.campaign.common.always";
288
274
  const e = t.start ? u(t.start).format("DD MMM YYYY") : "From campaign creation", n = t.end ? u(t.end).format("DD MMM YYYY") : "Never ends";
289
275
  return `${e} - ${n}`;
290
276
  }
291
- function ot(t) {
277
+ function et(t) {
292
278
  const { campaign: e } = t;
293
279
  return {
294
280
  "connect.campaign.common.campaign_name": e.name,
@@ -296,21 +282,21 @@ function ot(t) {
296
282
  e.timeframeOptions
297
283
  ),
298
284
  get "connect.campaign.common.next_schedule_at"() {
299
- if ((e == null ? void 0 : e.event.type) != "SCHEDULE" || !e.event.rule || !E(e.event.rule))
285
+ if (e.event.type != "SCHEDULE" || !e.event.rule || !b(e.event.rule))
300
286
  return;
301
- const n = N(
287
+ const n = O(
302
288
  e.event.rule.rules.g_schedule
303
289
  );
304
290
  return n ? u(n).format("ddd, DD MMM YYYY, hh:mmA") : void 0;
305
291
  },
306
292
  get "connect.campaign.common.discount_type"() {
307
- if (e.type == "PROMOTION") return l(e.effect);
293
+ if (e.type == "PROMOTION") return f(e.effect);
308
294
  if ("configs" in t && t.configs.type == "VOUCHER")
309
- return l(t.configs.extras.effect);
295
+ return f(t.configs.extras.effect);
310
296
  },
311
297
  get "connect.campaign.broadcast.summary.delivery"() {
312
298
  if (e.type != "BROADCAST") return;
313
- const n = h(e);
299
+ const n = d(e);
314
300
  if (!(n.channels.length < 2))
315
301
  return `connect.campaign.broadcast.mode.${n.mode}.label`;
316
302
  },
@@ -320,30 +306,32 @@ function ot(t) {
320
306
  return ((n = T(e)) == null ? void 0 : n.route) ?? "connect.campaign.broadcast.noChannelsSelected";
321
307
  },
322
308
  get "connect.campaign.common.available_at"() {
323
- return e.targetLocation ? e.targetLocation.length > 0 ? e.targetLocation.map(
324
- (n) => I().locationItems.find((o) => o.value == n).label
325
- ).join(",") : "connect.campaign.common.no_location" : "connect.campaign.common.all_locations";
309
+ const n = A(
310
+ e.targetLocation,
311
+ E().locations
312
+ );
313
+ return n.kind === "all" ? "connect.campaign.common.all_locations" : n.kind === "none" ? "connect.campaign.common.no_location" : n.kind === "names" ? n.names.join(", ") : n;
326
314
  }
327
315
  };
328
316
  }
329
- function _(t) {
317
+ function M(t) {
330
318
  return t.timeframeOptions && t.timeframeOptions.type == "timeframe" ? u().isBetween(
331
319
  t.timeframeOptions.start ?? u().subtract(1, "d"),
332
320
  t.timeframeOptions.end ?? u().add(1, "d")
333
321
  ) ? "active" : u().isAfter(t.timeframeOptions.end) ? "expired" : "upcoming" : "active";
334
322
  }
335
323
  function T(t) {
336
- const e = h(t);
324
+ const e = d(t);
337
325
  if (!e.channels.length) return null;
338
- const o = A(e, (a) => f.global.t(`connect.campaign.broadcast.channel.${a}`));
326
+ const o = S(e, (r) => c.global.t(`connect.campaign.broadcast.channel.${r}`));
339
327
  return {
340
- strategy: e.channels.length > 1 ? f.global.t(
328
+ strategy: e.channels.length > 1 ? c.global.t(
341
329
  `connect.campaign.broadcast.strategy.${e.mode}`
342
330
  ) : null,
343
331
  route: o
344
332
  };
345
333
  }
346
- function at(t) {
334
+ function nt(t) {
347
335
  var e, n;
348
336
  switch (t.event.type) {
349
337
  case "BILL_COMPLETED":
@@ -354,8 +342,8 @@ function at(t) {
354
342
  case "COIN":
355
343
  return t.earningOption.type == "FIXED" ? `Spend to get ${t.earningOption.amount} ${m.formattedType(t.type)}` : `Every ${t.earningOption.every} amount spent get ${t.earningOption.amount} ${m.formattedType(t.type)}`;
356
344
  case "VOUCHER":
357
- const a = (n = (e = t == null ? void 0 : t.pf_collectible) == null ? void 0 : e.extras) == null ? void 0 : n.effect;
358
- return a ? `${o} - ${l(a)}` : o;
345
+ const r = (n = (e = t == null ? void 0 : t.pf_collectible) == null ? void 0 : e.extras) == null ? void 0 : n.effect;
346
+ return r ? `${o} - ${f(r)}` : o;
359
347
  default:
360
348
  return o;
361
349
  }
@@ -370,7 +358,7 @@ function at(t) {
370
358
  case "MEMBERSHIP_JOINED":
371
359
  return `Receive ${m.formattedType(t.type)} when member joined`;
372
360
  case "MAKING_ORDER":
373
- return t.type !== "PROMOTION" ? void 0 : l(t.effect);
361
+ return t.type !== "PROMOTION" ? void 0 : f(t.effect);
374
362
  default:
375
363
  throw new Error(
376
364
  `Not implemented ${JSON.stringify({ cause: t.event.type })}`
@@ -378,23 +366,22 @@ function at(t) {
378
366
  }
379
367
  }
380
368
  export {
381
- tt as C,
382
- _ as a,
383
- et as b,
384
- at as c,
385
- T as d,
386
- R as e,
387
- Q as f,
388
- nt as g,
389
- q as h,
390
- j as i,
391
- V as j,
392
- K as k,
393
- J as l,
394
- W as m,
395
- z as n,
396
- ot as o,
397
- Z as p,
398
- X as r,
369
+ Z as C,
370
+ tt as a,
371
+ nt as b,
372
+ T as c,
373
+ N as d,
374
+ q as e,
375
+ K as f,
376
+ M as g,
377
+ j as h,
378
+ G as i,
379
+ J as j,
380
+ W as k,
381
+ X as l,
382
+ z as m,
383
+ et as n,
384
+ Q as o,
385
+ V as r,
399
386
  P as s
400
387
  };
@@ -9,8 +9,7 @@ const M = E.enum([
9
9
  "COIN",
10
10
  "REWARD_POOL",
11
11
  "GAME",
12
- "MISSION",
13
- "GRAB"
12
+ "MISSION"
14
13
  ]), O = E.enum([
15
14
  "TIME_BASED_PROMOTION",
16
15
  "GAME_PROMOTION",