@feedmepos/mf-connect 0.1.38-beta.45 → 0.1.38-beta.46

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 (96) hide show
  1. package/dist/{Analytic-DzRxGF_t.js → Analytic-BGKCj1jr.js} +13 -13
  2. package/dist/{App-CAiDN8rO.js → App-Rjzbi736.js} +7 -7
  3. package/dist/{AuditLogs-BLSbQEeM.js → AuditLogs-Dip8piV3.js} +9 -9
  4. package/dist/{Bin-CCnoA4p4.js → Bin-DOvnUMsH.js} +8 -8
  5. package/dist/{Broadcast-BrRAGwcE.js → Broadcast-xcZBuHpL.js} +8 -8
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DjUo28QL.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Dizv5GP_.js} +6 -6
  7. package/dist/{Card-BKXk-LPv.js → Card-CKjNEigS.js} +18 -18
  8. package/dist/{Collections-Ckw1cc6Y.js → Collections-x5ofCSJN.js} +74 -73
  9. package/dist/{Credit-r6s5xB1Z.js → Credit-BWBu_w2L.js} +8 -8
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-B3o3_9OC.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CBoP1Jwt.js} +209 -206
  11. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-YjvIstf7.js +348 -0
  12. package/dist/{Experience-B-QsgzRX.js → Experience-pkdcwDSi.js} +8 -8
  13. package/dist/{Game-BTAp2PUX.js → Game-Dna43QZe.js} +9 -9
  14. package/dist/{Grab-2grgKCgD.js → Grab-C9Z_Zfe8.js} +8 -8
  15. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js → ImageInput.vue_vue_type_script_setup_true_lang-DElYlMlB.js} +44 -43
  16. package/dist/{Index-Crzd6V_e.js → Index-DRIWf1NE.js} +10 -10
  17. package/dist/{Marketing-72znTAbJ.js → Marketing-usRTwLLw.js} +7 -7
  18. package/dist/{Member-DcavBmkw.js → Member-B70QVgJa.js} +10 -10
  19. package/dist/{MemberList-L-sgN6nP.js → MemberList-JI4mBPfA.js} +25 -25
  20. package/dist/{MemberTransactions-Bx1BRKGB.js → MemberTransactions-DYHJdzBn.js} +1 -1
  21. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-B57rXfVH.js → MessageInput.vue_vue_type_script_setup_true_lang-Dvr2n1Qk.js} +5090 -5091
  22. package/dist/{Mission-DzfeU-U2.js → Mission-D8FTOnMy.js} +9 -9
  23. package/dist/{Overview-DXHUfefR.js → Overview-CaxFeeVL.js} +19 -19
  24. package/dist/{Point-MAnQZKQ0.js → Point-I9wVIa2q.js} +8 -8
  25. package/dist/{Promotion-CNVK3kxX.js → Promotion-CWFtbYmb.js} +9 -9
  26. package/dist/{Queue-C65uzJYa.js → Queue-BmjIEX84.js} +10 -10
  27. package/dist/{Record-CNzZB4vZ.js → Record-DuvGrBry.js} +8 -8
  28. package/dist/{Reward-Cw4EhYW9.js → Reward-BQ36_7d0.js} +16 -16
  29. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-e-BLmLll.js → RewardGroup.vue_vue_type_script_setup_true_lang-0AbXVk_6.js} +12 -12
  30. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DZrpBefN.js → RuleGroup.vue_vue_type_script_setup_true_lang-pwHQUtHq.js} +15 -15
  31. package/dist/{Segment-Chpwplve.js → Segment-ClGmNf-7.js} +23 -23
  32. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-B6IWbpoI.js → SelectItems.vue_vue_type_script_setup_true_lang-CGsYilHx.js} +2 -2
  33. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-VrswK2oC.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Bbisi3wu.js} +12 -12
  34. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-3bG4g6Yl.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CRnHuPPI.js} +3 -3
  35. package/dist/{Setting-BZyRBt7n.js → Setting-DtRP7-KR.js} +14 -14
  36. package/dist/{SettingAdvertisements-CCUR2JGR.js → SettingAdvertisements-9gG904yk.js} +12 -12
  37. package/dist/{Store-BfVrEOge.js → Store-j8N8l1e7.js} +21 -21
  38. package/dist/{StoreRewards-sfgkzvZR.js → StoreRewards-9o5EngS4.js} +15 -15
  39. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-dHgJjSrH.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Bs54sDKB.js} +31 -29
  40. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DgC5rSp5.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CqBeBxgc.js} +1 -1
  41. package/dist/{Tier-DSq05aWe.js → Tier-N4Fwb4c2.js} +23 -23
  42. package/dist/{Title-BPd8NkgA.js → Title-BisuO_Bq.js} +20 -20
  43. package/dist/{Transaction-mgdvhO3E.js → Transaction-BvL-lHUW.js} +2 -2
  44. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-C3upUu10.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-D3zT4NEB.js} +6 -6
  45. package/dist/{Voucher-Dul14F2K.js → Voucher-BNVS0bf_.js} +12 -12
  46. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BH40SVl1.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BdAaQtUx.js} +12 -12
  47. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Dx_65PIx.js → ZodTextField.vue_vue_type_script_setup_true_lang-Db5UjYDs.js} +2 -2
  48. package/dist/{app-BmlT5rWe.js → app-5gFoCIZ5.js} +739 -259
  49. package/dist/{app-BHoXxwSd.js → app-HOMrHaJX.js} +1 -1
  50. package/dist/app.js +1 -1
  51. package/dist/{business-BffDCvuW.js → business-DrOrg91y.js} +1 -1
  52. package/dist/{campaign-BLOhqNmK.js → campaign-D-0jxXgS.js} +1 -1
  53. package/dist/campaign-DxZjTV1c.js +233 -0
  54. package/dist/{campaign.enum-CxrXdUK5.js → campaign.enum-DfqdgPF7.js} +1 -1
  55. package/dist/{campaign.fn-CbmvJ9_A.js → campaign.fn-BA9SsYlS.js} +95 -95
  56. package/dist/{collectible.enum-BFN6omqT.js → collectible.enum-CUY4edTO.js} +1 -1
  57. package/dist/{collection.fn-Dbf300ZJ.js → collection.fn-BUyLrKuP.js} +2 -2
  58. package/dist/{dto-DDdkrd0L.js → dto-CdsbCKbi.js} +4 -4
  59. package/dist/{effect-B-WDkXGw.js → effect-CHvrDcct.js} +1 -1
  60. package/dist/{email-addresses-BuuQUEeC.js → email-addresses-BQGuEvTh.js} +1 -1
  61. package/dist/{export-CrIym_VI.js → export-CgyLGAFe.js} +3 -3
  62. package/dist/{helper-NaOsygD8.js → helper-CUXD11Bp.js} +1 -1
  63. package/dist/{index-BEEZcAxg.js → index-BMpQ1Eq2.js} +1 -1
  64. package/dist/{index-ClcKSapn.js → index-BTzBc44a.js} +4 -4
  65. package/dist/{index-C7znGNFh.js → index-BmOfDfwV.js} +43 -43
  66. package/dist/{index-DigtF3g0.js → index-Bsz-Af4_.js} +2 -2
  67. package/dist/{index-Cra9LhF-.js → index-D-Qagjww.js} +3 -3
  68. package/dist/{index-DJz5saei.js → index-DQlMaN5j.js} +3 -3
  69. package/dist/{index-B_3OqeIJ.js → index-DUBEbnDX.js} +1 -1
  70. package/dist/{index-Csa4xZZn.js → index-DUZWoVeF.js} +1 -1
  71. package/dist/{index-Df4Cjhjc.js → index-DrRjJg2A.js} +1 -1
  72. package/dist/{index-JsWMqBgG.js → index-DtcXk4cG.js} +1 -1
  73. package/dist/{index-Dx80UTIP.js → index-Dvy1ftAd.js} +1 -1
  74. package/dist/{index-BaZm_8os.js → index-ePW_CRtd.js} +1 -1
  75. package/dist/{index-CcvV0Ycm.js → index-uliDTEHQ.js} +3 -3
  76. package/dist/{index.esm2017-wI3mKHK2.js → index.esm2017-CJJcI6HI.js} +1 -1
  77. package/dist/{loading-DCn_bsMp.js → loading-O2OJnB-v.js} +1 -1
  78. package/dist/{membership-BKYeOLSh.js → membership-kVwD3i5I.js} +3 -3
  79. package/dist/{money-CnC0LxlQ.js → money-CvRqEjZN.js} +1 -1
  80. package/dist/{number-CrQ7VGjP.js → number-BtM53Gqu.js} +1 -1
  81. package/dist/{objectid-Ci50Ut-H.js → objectid-BbEyb60f.js} +4 -4
  82. package/dist/{campaign-8JVG_xlZ.js → plugins-nuoNiWZV.js} +706 -731
  83. package/dist/{reward-RNU0kxHS.js → reward-C904TC9N.js} +1 -1
  84. package/dist/{rule-7BPQX4bI.js → rule-B2r0vrQs.js} +3 -3
  85. package/dist/{rule-builder-nA2Fz_Io.js → rule-builder-DxCXxYrs.js} +1 -1
  86. package/dist/{template-kqdC8Xw5.js → template-C8z7oS1X.js} +5 -5
  87. package/dist/{timezone-CDuFFjqV.js → timezone-C-mgrIzx.js} +1 -1
  88. package/dist/trigger-DrmYFT7r.js +213 -0
  89. package/dist/{user-BgM-N8MI.js → user-C_PXVgnR.js} +1 -1
  90. package/dist/{vue-i18n-Do2KE3Pm.js → vue-i18n-CBY1MepG.js} +158 -158
  91. package/dist/{xlsx-Xu2Ba8cj.js → xlsx-DmlvPg-W.js} +1 -1
  92. package/dist/{zod-Bg2FbC-D.js → zod-DlxxgJ-R.js} +32 -31
  93. package/package.json +1 -1
  94. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CLUGsUwO.js +0 -348
  95. package/dist/plugins-BuYRryHJ.js +0 -208
  96. package/dist/trigger-CxzUKrF8.js +0 -144
@@ -1,63 +1,63 @@
1
1
  import { defineComponent, ref, watch, resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, createCommentVNode, computed, onMounted, toDisplayString, createBlock, withCtx, Fragment, renderList, withModifiers, unref, isRef, createTextVNode, normalizeClass, resolveDynamicComponent, toRefs, normalizeStyle, createSlots } from "vue";
2
2
  import { _ } from "./lodash-B5I3zXaY.js";
3
- import { z } from "./app-BmlT5rWe.js";
4
- import { Z as ZodHelper } from "./zod-Bg2FbC-D.js";
5
- import { c as campaignRefinement, C as CampaignDtos, a as campaignTransform } from "./dto-DDdkrd0L.js";
6
- import { u as useMembershipStore } from "./membership-BKYeOLSh.js";
7
- import { u as useBusinessStore } from "./business-BffDCvuW.js";
8
- import "./index-DigtF3g0.js";
9
- import { R as RuleBuilder, a as isRuleEntry } from "./rule-builder-nA2Fz_Io.js";
3
+ import { z } from "./app-5gFoCIZ5.js";
4
+ import { Z as ZodHelper } from "./zod-DlxxgJ-R.js";
5
+ import { c as campaignRefinement, C as CampaignDtos, a as campaignTransform } from "./dto-CdsbCKbi.js";
6
+ import { u as useMembershipStore } from "./membership-kVwD3i5I.js";
7
+ import { u as useBusinessStore } from "./business-DrOrg91y.js";
8
+ import "./index-Bsz-Af4_.js";
9
+ import { R as RuleBuilder, a as isRuleEntry } from "./rule-builder-DxCXxYrs.js";
10
10
  import { J as JsonViewer } from "./JsonViewer-v8_C7l5N.js";
11
11
  import { h as hooks } from "./moment-D7p2TMB-.js";
12
- import { f as featureVersionMapping } from "./campaign.enum-CxrXdUK5.js";
13
- import { _ as _sfc_main$u } from "./ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js";
14
- import { b as _sfc_main$s, a as _sfc_main$v, _ as _sfc_main$x } from "./EffectSheet.vue_vue_type_style_index_0_lang-CLUGsUwO.js";
15
- import { _ as _sfc_main$w } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-DgC5rSp5.js";
16
- import { c as core, S as SvcConfig } from "./index-Cra9LhF-.js";
17
- import { p as prompt, f as firebaseStorage } from "./plugins-BuYRryHJ.js";
18
- import { C as Cb } from "./app-BHoXxwSd.js";
19
- import { _ as _sfc_main$o } from "./SelectItems.vue_vue_type_script_setup_true_lang-B6IWbpoI.js";
12
+ import { f as featureVersionMapping } from "./campaign.enum-DfqdgPF7.js";
13
+ import { _ as _sfc_main$u } from "./ImageInput.vue_vue_type_script_setup_true_lang-DElYlMlB.js";
14
+ import { b as _sfc_main$s, a as _sfc_main$v, _ as _sfc_main$x } from "./EffectSheet.vue_vue_type_style_index_0_lang-YjvIstf7.js";
15
+ import { _ as _sfc_main$w } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-CqBeBxgc.js";
16
+ import { c as core, S as SvcConfig } from "./index-D-Qagjww.js";
17
+ import { p as prompt, f as firebaseStorage } from "./plugins-nuoNiWZV.js";
18
+ import { C as Cb } from "./app-HOMrHaJX.js";
19
+ import { _ as _sfc_main$o } from "./SelectItems.vue_vue_type_script_setup_true_lang-CGsYilHx.js";
20
20
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-CHgC5LLL.js";
21
- import { _ as _sfc_main$z } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-C3upUu10.js";
22
- import { _ as _sfc_main$p, a as _sfc_main$q } from "./RuleGroup.vue_vue_type_script_setup_true_lang-DZrpBefN.js";
23
- import { u as useI18n } from "./vue-i18n-Do2KE3Pm.js";
24
- import { T as TypeToTriggerOptions, _ as _sfc_main$A, b as _sfc_main$B } from "./trigger-CxzUKrF8.js";
25
- import { _ as _sfc_main$y } from "./MessageInput.vue_vue_type_script_setup_true_lang-B57rXfVH.js";
26
- import { C as CountryTimezone, m as moment } from "./timezone-CDuFFjqV.js";
27
- import { c as calculateNextScheduleAt, S as SummarizeRrule, R as RRule } from "./rule-7BPQX4bI.js";
21
+ import { _ as _sfc_main$z } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-D3zT4NEB.js";
22
+ import { _ as _sfc_main$p, a as _sfc_main$q } from "./RuleGroup.vue_vue_type_script_setup_true_lang-pwHQUtHq.js";
23
+ import { u as useI18n } from "./vue-i18n-CBY1MepG.js";
24
+ import { T as TypeToTriggerOptions, _ as _sfc_main$A, b as _sfc_main$B } from "./trigger-DrmYFT7r.js";
25
+ import { _ as _sfc_main$y } from "./MessageInput.vue_vue_type_script_setup_true_lang-Dvr2n1Qk.js";
26
+ import { C as CountryTimezone, m as moment } from "./timezone-C-mgrIzx.js";
27
+ import { c as calculateNextScheduleAt, S as SummarizeRrule, R as RRule } from "./rule-B2r0vrQs.js";
28
28
  import { useCoreStore } from "@feedmepos/mf-common";
29
- import { _ as _sfc_main$r, a as _sfc_main$t } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-BH40SVl1.js";
30
- import { T as TEMPLATES } from "./index-C7znGNFh.js";
31
- import { v as FdoCreditLoyaltyReward, w as FdtoRandomReward, x as F_MISSION_TYPE, y as FdoThresholdCreditReward, z as FdtoThresholdReward, A as FdoMission } from "./index-ClcKSapn.js";
32
- import "./index-BEEZcAxg.js";
33
- import "./index-CcvV0Ycm.js";
34
- import { a as F_GAME_TYPE } from "./collectible.enum-BFN6omqT.js";
35
- import { u as useLoading } from "./loading-DCn_bsMp.js";
36
- import { i as initCollectibleConfig } from "./helper-NaOsygD8.js";
37
- import { C as CollectionUtils } from "./collection.fn-Dbf300ZJ.js";
29
+ import { _ as _sfc_main$r, a as _sfc_main$t } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-BdAaQtUx.js";
30
+ import { T as TEMPLATES } from "./index-BmOfDfwV.js";
31
+ import { v as FdoCreditLoyaltyReward, w as FdtoRandomReward, x as F_MISSION_TYPE, y as FdoThresholdCreditReward, z as FdtoThresholdReward, A as FdoMission } from "./index-BTzBc44a.js";
32
+ import "./index-BMpQ1Eq2.js";
33
+ import "./index-uliDTEHQ.js";
34
+ import { a as F_GAME_TYPE } from "./collectible.enum-CUY4edTO.js";
35
+ import { u as useLoading } from "./loading-O2OJnB-v.js";
36
+ import { i as initCollectibleConfig } from "./helper-CUXD11Bp.js";
37
+ import { C as CollectionUtils } from "./collection.fn-BUyLrKuP.js";
38
38
  import { s as sentenceCase$1 } from "./index-CsaQJMAR.js";
39
- import { c as getCampaignSummaryObject } from "./campaign-8JVG_xlZ.js";
40
- import "./index-DJz5saei.js";
39
+ import { c as getCampaignSummaryObject } from "./campaign-DxZjTV1c.js";
40
+ import "./index-DQlMaN5j.js";
41
41
  import { useDialog } from "@feedmepos/ui-library";
42
- import { u as useCampaignStore } from "./campaign-BLOhqNmK.js";
42
+ import { u as useCampaignStore } from "./campaign-D-0jxXgS.js";
43
43
  import { a as cleanPF } from "./object-qECH92oz.js";
44
44
  function summarizeGrabDiscount(e) {
45
45
  if (!e)
46
46
  return null;
47
- const d = core.Config.getCountry().currency.symbol;
47
+ const m = core.Config.getCountry().currency.symbol;
48
48
  function a(l) {
49
49
  switch (l.scope.type) {
50
50
  case "order":
51
51
  return "Bill discount";
52
52
  case "items":
53
- return l.type.startsWith("bundle") ? m(l.type) : "Item discount";
53
+ return l.type.startsWith("bundle") ? d(l.type) : "Item discount";
54
54
  case "categories":
55
55
  return "Category discount";
56
56
  default:
57
57
  return "Discount";
58
58
  }
59
59
  }
60
- function m(l) {
60
+ function d(l) {
61
61
  switch (l) {
62
62
  case "bundleSameFixPrice":
63
63
  return "Bundle (same item) - Fixed price";
@@ -84,20 +84,20 @@ function summarizeGrabDiscount(e) {
84
84
  case "net":
85
85
  case "bundleSameNet":
86
86
  case "bundleDiffNet":
87
- return `${d}${l.value} discount`;
87
+ return `${m}${l.value} discount`;
88
88
  case "bundleSameFixPrice":
89
89
  case "bundleDiffFixPrice":
90
- return `${d}${l.value} fixed price`;
90
+ return `${m}${l.value} fixed price`;
91
91
  case "delivery":
92
92
  return "Delivery fee discount";
93
93
  case "freeItem":
94
94
  return "Free item";
95
95
  default:
96
- return `${d}${l.value} discount`;
96
+ return `${m}${l.value} discount`;
97
97
  }
98
98
  }
99
99
  function s(l) {
100
- return l.cap && l.cap > 0 ? `capped at ${d}${l.cap}` : null;
100
+ return l.cap && l.cap > 0 ? `capped at ${m}${l.cap}` : null;
101
101
  }
102
102
  return {
103
103
  type: a(e),
@@ -108,7 +108,7 @@ function summarizeGrabDiscount(e) {
108
108
  const _hoisted_1$l = {
109
109
  key: 0,
110
110
  class: "bg-fm-color-neutral-gray-50 border border-fm-color-neutral-gray-200 rounded-8 p-16 space-y-16"
111
- }, _hoisted_2$h = { class: "flex items-center justify-between" }, _hoisted_3$e = { class: "flex items-center gap-8" }, _hoisted_4$c = { class: "bg-white border border-fm-color-neutral-gray-200 rounded-8 p-16" }, _hoisted_5$a = { class: "flex justify-end gap-8 pt-8 border-t border-fm-color-neutral-gray-200" }, _sfc_main$n = /* @__PURE__ */ defineComponent({
111
+ }, _hoisted_2$h = { class: "flex items-center justify-between" }, _hoisted_3$e = { class: "flex items-center gap-8" }, _hoisted_4$d = { class: "bg-white border border-fm-color-neutral-gray-200 rounded-8 p-16" }, _hoisted_5$a = { class: "flex justify-end gap-8 pt-8 border-t border-fm-color-neutral-gray-200" }, _sfc_main$n = /* @__PURE__ */ defineComponent({
112
112
  __name: "GrabItemSelectionInline",
113
113
  props: {
114
114
  visible: { type: Boolean },
@@ -116,8 +116,8 @@ const _hoisted_1$l = {
116
116
  filterItems: { type: Function }
117
117
  },
118
118
  emits: ["confirm", "cancel"],
119
- setup(e, { emit: d }) {
120
- const a = e, m = d, i = ref();
119
+ setup(e, { emit: m }) {
120
+ const a = e, d = m, i = ref();
121
121
  watch(
122
122
  () => a.visible,
123
123
  (n) => {
@@ -130,10 +130,10 @@ const _hoisted_1$l = {
130
130
  (n = i.value) == null || n.onConfirm();
131
131
  }
132
132
  function l() {
133
- m("cancel");
133
+ d("cancel");
134
134
  }
135
135
  function o(n) {
136
- m("confirm", n);
136
+ d("confirm", n);
137
137
  }
138
138
  return (n, r) => {
139
139
  const y = resolveComponent("FmIcon"), v = resolveComponent("FmButton");
@@ -153,7 +153,7 @@ const _hoisted_1$l = {
153
153
  })
154
154
  ]),
155
155
  r[1] || (r[1] = createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Choose which items this discount applies to. For bundle discounts, select multiple items that can be bundled together. ", -1)),
156
- createElementVNode("div", _hoisted_4$c, [
156
+ createElementVNode("div", _hoisted_4$d, [
157
157
  createVNode(_sfc_main$o, {
158
158
  ref_key: "selectItemRef",
159
159
  ref: i,
@@ -181,7 +181,7 @@ const _hoisted_1$l = {
181
181
  }), _hoisted_1$k = {
182
182
  key: 0,
183
183
  class: "bg-fm-color-neutral-gray-50 border border-fm-color-neutral-gray-200 rounded-8 p-16 space-y-16"
184
- }, _hoisted_2$g = { class: "flex items-center justify-between" }, _hoisted_3$d = { class: "flex items-center gap-8" }, _hoisted_4$b = { class: "flex gap-16 items-center flex-wrap" }, _hoisted_5$9 = { class: "flex gap-8 items-center" }, _hoisted_6$5 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _hoisted_7$5 = { class: "bg-white border border-fm-color-neutral-gray-200 rounded-8 max-h-[300px] overflow-y-auto" }, _hoisted_8$4 = { class: "flex items-center gap-12" }, _hoisted_9$4 = { class: "fm-typo-en-body-md-600" }, _hoisted_10$4 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _hoisted_11$2 = {
184
+ }, _hoisted_2$g = { class: "flex items-center justify-between" }, _hoisted_3$d = { class: "flex items-center gap-8" }, _hoisted_4$c = { class: "flex gap-16 items-center flex-wrap" }, _hoisted_5$9 = { class: "flex gap-8 items-center" }, _hoisted_6$5 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _hoisted_7$5 = { class: "bg-white border border-fm-color-neutral-gray-200 rounded-8 max-h-[300px] overflow-y-auto" }, _hoisted_8$4 = { class: "flex items-center gap-12" }, _hoisted_9$4 = { class: "fm-typo-en-body-md-600" }, _hoisted_10$4 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _hoisted_11$2 = {
185
185
  key: 1,
186
186
  class: "p-24 text-center"
187
187
  }, _hoisted_12$1 = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _hoisted_13$1 = { class: "flex justify-end gap-8 pt-8 border-t border-fm-color-neutral-gray-200" }, _sfc_main$m = /* @__PURE__ */ defineComponent({
@@ -191,8 +191,8 @@ const _hoisted_1$l = {
191
191
  initialValue: {}
192
192
  },
193
193
  emits: ["confirm", "cancel"],
194
- setup(e, { emit: d }) {
195
- const a = e, m = d, i = Cb(), s = ref({}), l = ref(""), o = computed(() => {
194
+ setup(e, { emit: m }) {
195
+ const a = e, d = m, i = Cb(), s = ref({}), l = ref(""), o = computed(() => {
196
196
  const c = i.menu.value;
197
197
  return c ? c.modules.category.map((f) => ({
198
198
  id: f._id,
@@ -232,10 +232,10 @@ const _hoisted_1$l = {
232
232
  }
233
233
  function k() {
234
234
  const c = Object.entries(s.value).filter(([, f]) => f).map(([f]) => f);
235
- m("confirm", c);
235
+ d("confirm", c);
236
236
  }
237
237
  function p() {
238
- m("cancel");
238
+ d("cancel");
239
239
  }
240
240
  const u = computed(() => n.value.length > 0 && n.value.every(
241
241
  (c) => s.value[c.id]
@@ -258,7 +258,7 @@ const _hoisted_1$l = {
258
258
  })
259
259
  ]),
260
260
  f[3] || (f[3] = createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Choose which categories this discount applies to. The discount will be available for all items within the selected categories. ", -1)),
261
- createElementVNode("div", _hoisted_4$b, [
261
+ createElementVNode("div", _hoisted_4$c, [
262
262
  createElementVNode("div", _hoisted_5$9, [
263
263
  createVNode(b, {
264
264
  icon: "select_all",
@@ -341,7 +341,7 @@ const _hoisted_1$l = {
341
341
  }), _hoisted_1$j = { class: "space-y-8" }, _hoisted_2$f = {
342
342
  key: 1,
343
343
  class: "border-1 rounded-md flex gap-16 items-center justify-between px-16 py-12"
344
- }, _hoisted_3$c = { class: "fm-typo-en-body-lg-400" }, _hoisted_4$a = { class: "text-fm-color-typo-secondary" }, _hoisted_5$8 = { key: 0 }, _hoisted_6$4 = { class: "space-y-24" }, _hoisted_7$4 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary mt-4" }, _hoisted_8$3 = { key: 0 }, _hoisted_9$3 = { class: "fm-typo-en-body-md-600 mb-8 block" }, _hoisted_10$3 = { key: 1 }, _hoisted_11$1 = { key: 2 }, _hoisted_12 = { key: 0 }, _hoisted_13 = { class: "space-y-8" }, _hoisted_14 = { class: "flex items-center justify-between p-12 border border-fm-color-neutral-gray-200 fm-corner-radius-md" }, _hoisted_15 = { class: "flex items-center gap-8" }, _hoisted_16 = { class: "fm-typo-en-body-md-400" }, _hoisted_17 = { key: 3 }, _hoisted_18 = { key: 0 }, _hoisted_19 = { class: "space-y-8" }, _hoisted_20 = { class: "flex items-center justify-between p-12 border border-fm-color-neutral-gray-200 fm-corner-radius-md" }, _hoisted_21 = { class: "flex items-center gap-8" }, _hoisted_22 = { class: "fm-typo-en-body-md-400" }, _hoisted_23 = {
344
+ }, _hoisted_3$c = { class: "fm-typo-en-body-lg-400" }, _hoisted_4$b = { class: "text-fm-color-typo-secondary" }, _hoisted_5$8 = { key: 0 }, _hoisted_6$4 = { class: "space-y-24" }, _hoisted_7$4 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary mt-4" }, _hoisted_8$3 = { key: 0 }, _hoisted_9$3 = { class: "fm-typo-en-body-md-600 mb-8 block" }, _hoisted_10$3 = { key: 1 }, _hoisted_11$1 = { key: 2 }, _hoisted_12 = { key: 0 }, _hoisted_13 = { class: "space-y-8" }, _hoisted_14 = { class: "flex items-center justify-between p-12 border border-fm-color-neutral-gray-200 fm-corner-radius-md" }, _hoisted_15 = { class: "flex items-center gap-8" }, _hoisted_16 = { class: "fm-typo-en-body-md-400" }, _hoisted_17 = { key: 3 }, _hoisted_18 = { key: 0 }, _hoisted_19 = { class: "space-y-8" }, _hoisted_20 = { class: "flex items-center justify-between p-12 border border-fm-color-neutral-gray-200 fm-corner-radius-md" }, _hoisted_21 = { class: "flex items-center gap-8" }, _hoisted_22 = { class: "fm-typo-en-body-md-400" }, _hoisted_23 = {
345
345
  key: 0,
346
346
  class: "mt-16 p-12 bg-fm-color-feedback-error-light rounded-8 border border-fm-color-feedback-error-main"
347
347
  }, _hoisted_24 = { class: "flex items-center gap-8 mb-8 text-fm-color-system-error-300" }, _hoisted_25 = { class: "space-y-4" }, _hoisted_26 = { class: "flex gap-16" }, _sfc_main$l = /* @__PURE__ */ defineComponent({
@@ -350,8 +350,8 @@ const _hoisted_1$l = {
350
350
  modelValue: { type: Object }
351
351
  },
352
352
  emits: ["update:model-value"],
353
- setup(e, { emit: d }) {
354
- const a = e, m = d, i = Cb(), s = ref(!1), l = ref(!1), o = ref(!1), n = ref({
353
+ setup(e, { emit: m }) {
354
+ const a = e, d = m, i = Cb(), s = ref(!1), l = ref(!1), o = ref(!1), n = ref({
355
355
  type: "net",
356
356
  value: 0,
357
357
  scope: {
@@ -372,7 +372,7 @@ const _hoisted_1$l = {
372
372
  return !(!n.value.type || !((g = n.value.scope) != null && g.type) || h(n.value.type) && (!n.value.value || n.value.value <= 0) || (n.value.scope.type === "items" || n.value.scope.type === "category") && (!n.value.scope.objectIDs || n.value.scope.objectIDs.length === 0));
373
373
  });
374
374
  async function y(g) {
375
- g.stopPropagation(), await prompt.remove("Are you sure you want to remove this discount?") && m("update:model-value", null);
375
+ g.stopPropagation(), await prompt.remove("Are you sure you want to remove this discount?") && d("update:model-value", null);
376
376
  }
377
377
  function v() {
378
378
  var g;
@@ -536,7 +536,7 @@ const _hoisted_1$l = {
536
536
  return n.value.type || g.push("Discount type is required"), (V = n.value.scope) != null && V.type || g.push("Scope type is required"), h(n.value.type) && (!n.value.value || n.value.value <= 0) && g.push("Discount amount must be greater than 0"), ((w = n.value.scope) == null ? void 0 : w.type) === "items" && (!n.value.scope.objectIDs || n.value.scope.objectIDs.length === 0) && g.push("Please select at least one item"), ((D = n.value.scope) == null ? void 0 : D.type) === "category" && (!n.value.scope.objectIDs || n.value.scope.objectIDs.length === 0) && g.push("Please select at least one category"), g;
537
537
  });
538
538
  function Z() {
539
- m("update:model-value", n.value), s.value = !1;
539
+ d("update:model-value", n.value), s.value = !1;
540
540
  }
541
541
  const q = [
542
542
  { label: "Bill discount", value: "order" },
@@ -562,7 +562,7 @@ const _hoisted_1$l = {
562
562
  e.modelValue ? (openBlock(), createElementBlock("div", _hoisted_2$f, [
563
563
  createElementVNode("div", _hoisted_3$c, [
564
564
  createElementVNode("div", null, toDisplayString((O = unref(summarizeGrabDiscount)(e.modelValue)) == null ? void 0 : O.type), 1),
565
- createElementVNode("div", _hoisted_4$a, [
565
+ createElementVNode("div", _hoisted_4$b, [
566
566
  createTextVNode(toDisplayString((U = unref(summarizeGrabDiscount)(e.modelValue)) == null ? void 0 : U.adjustment) + " ", 1),
567
567
  (A = unref(summarizeGrabDiscount)(e.modelValue)) != null && A.cap ? (openBlock(), createElementBlock("span", _hoisted_5$8, toDisplayString((L = unref(summarizeGrabDiscount)(e.modelValue)) == null ? void 0 : L.cap), 1)) : createCommentVNode("", !0)
568
568
  ])
@@ -733,13 +733,13 @@ const _hoisted_1$l = {
733
733
  }
734
734
  },
735
735
  emits: ["update:model-value"],
736
- setup(e, { emit: d }) {
737
- const { t: a } = useI18n(), m = e, i = d, s = ref(
738
- !m.modelValue || !m.modelValue.rules.g_time ? "all_time" : RuleBuilder.getRules(m.modelValue.rules.g_time).length > 0 ? "custom" : "all_time"
736
+ setup(e, { emit: m }) {
737
+ const { t: a } = useI18n(), d = e, i = m, s = ref(
738
+ !d.modelValue || !d.modelValue.rules.g_time ? "all_time" : RuleBuilder.getRules(d.modelValue.rules.g_time).length > 0 ? "custom" : "all_time"
739
739
  );
740
740
  watch(s, async (o, n) => {
741
741
  var r;
742
- if (n == "custom" && o == "all_time" && RuleBuilder.getRules((r = m.modelValue) == null ? void 0 : r.rules.g_time).length > 0) {
742
+ if (n == "custom" && o == "all_time" && RuleBuilder.getRules((r = d.modelValue) == null ? void 0 : r.rules.g_time).length > 0) {
743
743
  const y = await prompt.confirm(
744
744
  a("connect.template.rule.time.confirm_remove"),
745
745
  a("connect.common.confirm"),
@@ -749,7 +749,7 @@ const _hoisted_1$l = {
749
749
  y && i(
750
750
  "update:model-value",
751
751
  RuleBuilder.setRuleToGroup(
752
- m.modelValue ?? RuleBuilder.scaffoldGroup(),
752
+ d.modelValue ?? RuleBuilder.scaffoldGroup(),
753
753
  RuleBuilder.scaffoldGroup("g_time")
754
754
  )
755
755
  ), s.value = y ? o : n;
@@ -757,7 +757,7 @@ const _hoisted_1$l = {
757
757
  });
758
758
  async function l(o) {
759
759
  var n;
760
- if (o == "custom" && RuleBuilder.getRules((n = m.modelValue) == null ? void 0 : n.rules.g_time).length > 0) {
760
+ if (o == "custom" && RuleBuilder.getRules((n = d.modelValue) == null ? void 0 : n.rules.g_time).length > 0) {
761
761
  if (!await prompt.confirm(
762
762
  a("connect.template.rule.time.confirm_remove"),
763
763
  a("connect.common.confirm"),
@@ -770,7 +770,7 @@ const _hoisted_1$l = {
770
770
  i(
771
771
  "update:model-value",
772
772
  RuleBuilder.setRuleToGroup(
773
- m.modelValue ?? RuleBuilder.scaffoldGroup(),
773
+ d.modelValue ?? RuleBuilder.scaffoldGroup(),
774
774
  RuleBuilder.scaffoldGroup("g_time")
775
775
  )
776
776
  );
@@ -825,10 +825,10 @@ const _hoisted_1$l = {
825
825
  }
826
826
  },
827
827
  emits: ["update:model-value"],
828
- setup(e, { emit: d }) {
829
- const { t: a } = useI18n(), m = e, i = d, s = computed(() => {
828
+ setup(e, { emit: m }) {
829
+ const { t: a } = useI18n(), d = e, i = m, s = computed(() => {
830
830
  const { property: l, operator: o, equator: n } = RuleBuilder.simplify(
831
- m.modelValue ?? RuleBuilder.constructEntry("user.birthday", "_isDay", {
831
+ d.modelValue ?? RuleBuilder.constructEntry("user.birthday", "_isDay", {
832
832
  op: "before",
833
833
  x: 1
834
834
  })
@@ -919,7 +919,7 @@ const _hoisted_1$l = {
919
919
  ]);
920
920
  };
921
921
  }
922
- }), _hoisted_1$h = { class: "space-y-16" }, _hoisted_2$e = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _hoisted_3$b = { class: "grid grid-cols-3 gap-16" }, _hoisted_4$9 = { class: "fm-typo-en-title-sm-800" }, _hoisted_5$7 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main$i = /* @__PURE__ */ defineComponent({
922
+ }), _hoisted_1$h = { class: "space-y-16" }, _hoisted_2$e = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _hoisted_3$b = { class: "grid grid-cols-3 gap-16" }, _hoisted_4$a = { class: "fm-typo-en-title-sm-800" }, _hoisted_5$7 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main$i = /* @__PURE__ */ defineComponent({
923
923
  __name: "CampaignTriggerInput",
924
924
  props: {
925
925
  campaignType: {
@@ -935,10 +935,10 @@ const _hoisted_1$l = {
935
935
  }
936
936
  },
937
937
  emits: ["update:model-value"],
938
- setup(e, { emit: d }) {
939
- const { t: a } = useI18n(), m = e, i = d, s = computed(() => m.disabled ? TypeToTriggerOptions[m.campaignType].filter(
940
- (l) => l.value == m.modelValue
941
- ) : TypeToTriggerOptions[m.campaignType]);
938
+ setup(e, { emit: m }) {
939
+ const { t: a } = useI18n(), d = e, i = m, s = computed(() => d.disabled ? TypeToTriggerOptions[d.campaignType].filter(
940
+ (l) => l.value == d.modelValue
941
+ ) : TypeToTriggerOptions[d.campaignType]);
942
942
  return (l, o) => {
943
943
  const n = resolveComponent("FmCard");
944
944
  return openBlock(), createElementBlock("div", _hoisted_1$h, [
@@ -946,19 +946,19 @@ const _hoisted_1$l = {
946
946
  createElementVNode("div", _hoisted_3$b, [
947
947
  (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(s), (r) => (openBlock(), createBlock(n, {
948
948
  variant: "outlined",
949
- disabled: m.disabled,
949
+ disabled: d.disabled,
950
950
  class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
951
951
  "col-span-3": unref(s).length == 1,
952
952
  "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": e.modelValue == r.value,
953
953
  "hover:bg-fm-color-opacity-sm": e.modelValue != r.value
954
954
  }]),
955
955
  onClick: () => {
956
- m.modelValue != r.value && !m.disabled && i("update:model-value", r.value);
956
+ d.modelValue != r.value && !d.disabled && i("update:model-value", r.value);
957
957
  },
958
958
  key: r.name
959
959
  }, {
960
960
  default: withCtx(() => [
961
- createElementVNode("div", _hoisted_4$9, toDisplayString(r.name), 1),
961
+ createElementVNode("div", _hoisted_4$a, toDisplayString(r.name), 1),
962
962
  createElementVNode("div", _hoisted_5$7, toDisplayString(r.description), 1)
963
963
  ]),
964
964
  _: 2
@@ -980,9 +980,9 @@ const _hoisted_1$l = {
980
980
  }
981
981
  },
982
982
  emits: ["update:model-value"],
983
- setup(e, { emit: d }) {
984
- const a = d;
985
- return (m, i) => {
983
+ setup(e, { emit: m }) {
984
+ const a = m;
985
+ return (d, i) => {
986
986
  const s = resolveComponent("FmButton"), l = resolveComponent("FmField"), o = resolveComponent("FmDatePicker");
987
987
  return openBlock(), createBlock(o, {
988
988
  label: e.label,
@@ -1015,7 +1015,7 @@ const _hoisted_1$l = {
1015
1015
  }, 8, ["label", "model-value"]);
1016
1016
  };
1017
1017
  }
1018
- }), _hoisted_1$g = { class: "flex items-center gap-8 w-full xs:flex-col" }, _hoisted_2$d = { class: "flex-1 xs:w-full" }, _hoisted_3$a = { class: "flex-1 xs:w-full" }, _sfc_main$g = /* @__PURE__ */ defineComponent({
1018
+ }), _hoisted_1$g = { class: "flex items-center gap-8 w-full xs:flex-col" }, _hoisted_2$d = { class: "flex-1 xs:w-full" }, _hoisted_3$a = { class: "mt-5 xs:hidden" }, _hoisted_4$9 = { class: "flex-1 xs:w-full" }, _sfc_main$g = /* @__PURE__ */ defineComponent({
1019
1019
  __name: "DateRangeInput",
1020
1020
  props: {
1021
1021
  modelValue: {
@@ -1024,37 +1024,37 @@ const _hoisted_1$l = {
1024
1024
  }
1025
1025
  },
1026
1026
  emits: ["update:model-value"],
1027
- setup(e, { emit: d }) {
1028
- const a = d;
1029
- return (m, i) => {
1030
- var s, l;
1027
+ setup(e, { emit: m }) {
1028
+ const { t: a } = useI18n(), d = m;
1029
+ return (i, s) => {
1030
+ var l, o;
1031
1031
  return openBlock(), createElementBlock("div", _hoisted_1$g, [
1032
1032
  createElementVNode("div", _hoisted_2$d, [
1033
1033
  createVNode(_sfc_main$h, {
1034
- "model-value": ((s = e.modelValue) == null ? void 0 : s.startDate) ?? null,
1035
- label: "Start date",
1036
- "onUpdate:modelValue": i[0] || (i[0] = (o) => {
1037
- var n;
1038
- return a("update:model-value", {
1039
- startDate: o,
1040
- endDate: ((n = e.modelValue) == null ? void 0 : n.endDate) ?? null
1034
+ "model-value": ((l = e.modelValue) == null ? void 0 : l.startDate) ?? null,
1035
+ label: unref(a)("connect.common.startDate"),
1036
+ "onUpdate:modelValue": s[0] || (s[0] = (n) => {
1037
+ var r;
1038
+ return d("update:model-value", {
1039
+ startDate: n,
1040
+ endDate: ((r = e.modelValue) == null ? void 0 : r.endDate) ?? null
1041
1041
  });
1042
1042
  })
1043
- }, null, 8, ["model-value"])
1043
+ }, null, 8, ["model-value", "label"])
1044
1044
  ]),
1045
- i[2] || (i[2] = createElementVNode("div", { class: "mt-5 xs:hidden" }, "to", -1)),
1046
- createElementVNode("div", _hoisted_3$a, [
1045
+ createElementVNode("div", _hoisted_3$a, toDisplayString(unref(a)("connect.common.to")), 1),
1046
+ createElementVNode("div", _hoisted_4$9, [
1047
1047
  createVNode(_sfc_main$h, {
1048
- "model-value": ((l = e.modelValue) == null ? void 0 : l.endDate) ?? null,
1049
- label: "End date",
1050
- "onUpdate:modelValue": i[1] || (i[1] = (o) => {
1051
- var n;
1052
- return a("update:model-value", {
1053
- startDate: ((n = e.modelValue) == null ? void 0 : n.startDate) ?? null,
1054
- endDate: o
1048
+ "model-value": ((o = e.modelValue) == null ? void 0 : o.endDate) ?? null,
1049
+ label: unref(a)("connect.common.endDate"),
1050
+ "onUpdate:modelValue": s[1] || (s[1] = (n) => {
1051
+ var r;
1052
+ return d("update:model-value", {
1053
+ startDate: ((r = e.modelValue) == null ? void 0 : r.startDate) ?? null,
1054
+ endDate: n
1055
1055
  });
1056
1056
  })
1057
- }, null, 8, ["model-value"])
1057
+ }, null, 8, ["model-value", "label"])
1058
1058
  ])
1059
1059
  ]);
1060
1060
  };
@@ -1077,12 +1077,12 @@ const _hoisted_1$l = {
1077
1077
  }
1078
1078
  },
1079
1079
  emits: ["update:model-value"],
1080
- setup(e, { emit: d }) {
1081
- const { t: a } = useI18n(), m = e, i = d, s = useCoreStore(), l = computed(
1080
+ setup(e, { emit: m }) {
1081
+ const { t: a } = useI18n(), d = e, i = m, s = useCoreStore(), l = computed(
1082
1082
  () => CountryTimezone[s.currentCountry.value || "MY"]
1083
1083
  );
1084
1084
  function o() {
1085
- const p = RuleBuilder.getRules(m.modelValue);
1085
+ const p = RuleBuilder.getRules(d.modelValue);
1086
1086
  return p.length == 0 ? "fixed" : p.some(
1087
1087
  (u) => isRuleEntry(u) && RuleBuilder.simplify(u).operator == "_rrule"
1088
1088
  ) ? "repeating" : "fixed";
@@ -1091,7 +1091,7 @@ const _hoisted_1$l = {
1091
1091
  { label: a("connect.template.rule.schedule.fixed"), value: "fixed" },
1092
1092
  { label: a("connect.template.rule.schedule.repeating"), value: "repeating" }
1093
1093
  ]), v = computed(() => {
1094
- const p = RuleBuilder.getRules(m.modelValue), u = p.find(
1094
+ const p = RuleBuilder.getRules(d.modelValue), u = p.find(
1095
1095
  (f) => isRuleEntry(f) && RuleBuilder.simplify(f).property == "trigger.date"
1096
1096
  ), c = p.find(
1097
1097
  (f) => isRuleEntry(f) && RuleBuilder.simplify(f).property == "trigger.time"
@@ -1102,10 +1102,10 @@ const _hoisted_1$l = {
1102
1102
  };
1103
1103
  }), h = computed(
1104
1104
  () => calculateNextScheduleAt(
1105
- m.modelValue,
1105
+ d.modelValue,
1106
1106
  /* @__PURE__ */ new Date(),
1107
- m.startDate ? new Date(m.startDate) : void 0,
1108
- m.endDate ? new Date(m.endDate) : void 0
1107
+ d.startDate ? new Date(d.startDate) : void 0,
1108
+ d.endDate ? new Date(d.endDate) : void 0
1109
1109
  )
1110
1110
  );
1111
1111
  function x(p) {
@@ -1256,8 +1256,8 @@ const _hoisted_1$l = {
1256
1256
  }
1257
1257
  },
1258
1258
  emits: ["update:model-value"],
1259
- setup(e, { emit: d }) {
1260
- const { t: a } = useI18n(), m = e, i = d, s = computed(
1259
+ setup(e, { emit: m }) {
1260
+ const { t: a } = useI18n(), d = e, i = m, s = computed(
1261
1261
  () => [
1262
1262
  {
1263
1263
  label: a("connect.campaign.gameType.option.FORTUNE_WHEEL.label"),
@@ -1286,7 +1286,7 @@ const _hoisted_1$l = {
1286
1286
  "hover:bg-fm-color-opacity-sm": e.modelValue != r.value
1287
1287
  }]),
1288
1288
  onClick: () => {
1289
- m.modelValue != r.value && i("update:model-value", r.value);
1289
+ d.modelValue != r.value && i("update:model-value", r.value);
1290
1290
  },
1291
1291
  key: r.value
1292
1292
  }, {
@@ -1306,10 +1306,10 @@ const _hoisted_1$l = {
1306
1306
  }, _hoisted_2$a = { class: "flex gap-8 items-center justify-start" }, _sfc_main$d = /* @__PURE__ */ defineComponent({
1307
1307
  __name: "EditRewardPoolSheet",
1308
1308
  emits: ["update:model-value"],
1309
- setup(e, { expose: d, emit: a }) {
1310
- const m = useMembershipStore(), { minor: i } = useLoading, s = ref(!1), l = ref(), o = ref(), n = ref(0), r = computed(() => {
1309
+ setup(e, { expose: m, emit: a }) {
1310
+ const d = useMembershipStore(), { minor: i } = useLoading, s = ref(!1), l = ref(), o = ref(), n = ref(0), r = computed(() => {
1311
1311
  var p;
1312
- return ((p = m.loyaltyRewards.items.find(
1312
+ return ((p = d.loyaltyRewards.items.find(
1313
1313
  (u) => {
1314
1314
  var c;
1315
1315
  return u.value === ((c = l.value) == null ? void 0 : c.collectible);
@@ -1338,7 +1338,7 @@ const _hoisted_1$l = {
1338
1338
  }
1339
1339
  ), h("update:model-value", k.data, n.value));
1340
1340
  }
1341
- return d({
1341
+ return m({
1342
1342
  showSheet: v
1343
1343
  }), (k, p) => {
1344
1344
  const u = resolveComponent("FmSelect"), c = resolveComponent("FmStepperField"), f = resolveComponent("FmButton"), B = resolveComponent("FmSideSheet");
@@ -1401,7 +1401,7 @@ const _hoisted_1$l = {
1401
1401
  },
1402
1402
  weight: 1
1403
1403
  } : l.value = {
1404
- collectible: unref(m).loyaltyRewards.raw[0]._id,
1404
+ collectible: unref(d).loyaltyRewards.raw[0]._id,
1405
1405
  type: "LOYALTY",
1406
1406
  earningOption: {
1407
1407
  amount: 1,
@@ -1418,7 +1418,7 @@ const _hoisted_1$l = {
1418
1418
  key: 0,
1419
1419
  label: "Loyalty type",
1420
1420
  rules: [unref(ZodHelper).ruleAtPath(unref(r), "collectible", [unref(l).type])],
1421
- items: unref(m).loyaltyRewards.items,
1421
+ items: unref(d).loyaltyRewards.items,
1422
1422
  "model-value": unref(l).collectible,
1423
1423
  "onUpdate:modelValue": p[1] || (p[1] = (C) => unref(l).collectible = C)
1424
1424
  }, null, 8, ["rules", "items", "model-value"])) : createCommentVNode("", !0),
@@ -1432,7 +1432,7 @@ const _hoisted_1$l = {
1432
1432
  })
1433
1433
  }, null, 8, ["rules", "model-value"]),
1434
1434
  unref(l).type === "LOYALTY" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1435
- ((b = unref(m).loyaltyRewards.items.find(
1435
+ ((b = unref(d).loyaltyRewards.items.find(
1436
1436
  (C) => {
1437
1437
  var R;
1438
1438
  return C.value === ((R = unref(l)) == null ? void 0 : R.collectible);
@@ -1457,7 +1457,7 @@ const _hoisted_1$l = {
1457
1457
  p[12] || (p[12] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Validity option", -1)),
1458
1458
  createVNode(_sfc_main$s, {
1459
1459
  type: unref(l).type === "LOYALTY" ? "custom" : "range",
1460
- "for-credit": unref(l).type === "LOYALTY" && ((E = unref(m).loyaltyRewards.items.find(
1460
+ "for-credit": unref(l).type === "LOYALTY" && ((E = unref(d).loyaltyRewards.items.find(
1461
1461
  (C) => {
1462
1462
  var R;
1463
1463
  return C.value === ((R = unref(l)) == null ? void 0 : R.collectible);
@@ -1509,15 +1509,15 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
1509
1509
  }
1510
1510
  },
1511
1511
  emits: ["update:model-value"],
1512
- setup(e, { emit: d }) {
1513
- const a = e, m = d, i = useMembershipStore(), { t: s } = useI18n(), l = z.array(z.lazy(() => FdtoRandomReward)).min(1, "Requires at least 1 reward"), o = computed(() => a.modelValue ?? []), n = computed(() => {
1512
+ setup(e, { emit: m }) {
1513
+ const a = e, d = m, i = useMembershipStore(), { t: s } = useI18n(), l = z.array(z.lazy(() => FdtoRandomReward)).min(1, "Requires at least 1 reward"), o = computed(() => a.modelValue ?? []), n = computed(() => {
1514
1514
  const p = l.safeParse(o.value);
1515
1515
  return p.success ? [] : p.error.errors;
1516
1516
  }), r = ref();
1517
1517
  function y(p, u) {
1518
1518
  var f;
1519
1519
  const c = [...o.value];
1520
- c[u] = p, (f = r.value) == null || f.showSheet(!1), m("update:model-value", c);
1520
+ c[u] = p, (f = r.value) == null || f.showSheet(!1), d("update:model-value", c);
1521
1521
  }
1522
1522
  function v(p) {
1523
1523
  const u = p.type == "VOUCHER" ? p.collectibleConfig : i.collectibles.find(
@@ -1535,7 +1535,7 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
1535
1535
  }
1536
1536
  function x(p) {
1537
1537
  const u = [...o.value];
1538
- u.splice(p, 1), m("update:model-value", u);
1538
+ u.splice(p, 1), d("update:model-value", u);
1539
1539
  }
1540
1540
  function k() {
1541
1541
  var p;
@@ -1605,8 +1605,8 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
1605
1605
  }
1606
1606
  },
1607
1607
  emits: ["update:model-value"],
1608
- setup(e, { emit: d }) {
1609
- const { t: a } = useI18n(), m = e, i = d, s = computed(() => [
1608
+ setup(e, { emit: m }) {
1609
+ const { t: a } = useI18n(), d = e, i = m, s = computed(() => [
1610
1610
  {
1611
1611
  label: a("connect.template.promotion_game.rock_paper_scissors.label"),
1612
1612
  description: a("connect.template.promotion_game.rock_paper_scissors.description"),
@@ -1634,7 +1634,7 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
1634
1634
  }]),
1635
1635
  onClick: () => {
1636
1636
  var c;
1637
- ((c = m.modelValue) == null ? void 0 : c.gameType) != k.value && i("update:model-value", { gameType: k.value });
1637
+ ((c = d.modelValue) == null ? void 0 : c.gameType) != k.value && i("update:model-value", { gameType: k.value });
1638
1638
  },
1639
1639
  key: k.value
1640
1640
  }, {
@@ -1669,8 +1669,8 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
1669
1669
  }
1670
1670
  },
1671
1671
  emits: ["update:model-value"],
1672
- setup(e, { emit: d }) {
1673
- const { t: a } = useI18n(), m = e, i = d, s = ref(m.modelValue ?? {}), l = ref(
1672
+ setup(e, { emit: m }) {
1673
+ const { t: a } = useI18n(), d = e, i = m, s = ref(d.modelValue ?? {}), l = ref(
1674
1674
  (() => {
1675
1675
  const v = {};
1676
1676
  return s.value.workingHour && Object.keys(s.value.workingHour).forEach((h) => {
@@ -1819,8 +1819,8 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
1819
1819
  }
1820
1820
  },
1821
1821
  emits: ["update:model-value"],
1822
- setup(e, { emit: d }) {
1823
- const { t: a } = useI18n(), m = e, i = d, s = ref(m.modelValue ?? {});
1822
+ setup(e, { emit: m }) {
1823
+ const { t: a } = useI18n(), d = e, i = m, s = ref(d.modelValue ?? {});
1824
1824
  return watch(s, () => i("update:model-value", s.value)), (l, o) => {
1825
1825
  const n = resolveComponent("FmStepperField");
1826
1826
  return openBlock(), createElementBlock("div", _hoisted_1$9, [
@@ -1869,8 +1869,8 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
1869
1869
  }
1870
1870
  },
1871
1871
  emits: ["update:model-value"],
1872
- setup(e, { emit: d }) {
1873
- const { t: a } = useI18n(), m = e, i = d, s = computed(() => [
1872
+ setup(e, { emit: m }) {
1873
+ const { t: a } = useI18n(), d = e, i = m, s = computed(() => [
1874
1874
  {
1875
1875
  label: a("connect.campaign.mission.typeOption.STAMP.label"),
1876
1876
  description: a("connect.campaign.mission.typeOption.STAMP.description"),
@@ -1895,7 +1895,7 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
1895
1895
  "hover:bg-fm-color-opacity-sm": e.modelValue != r.value
1896
1896
  }]),
1897
1897
  onClick: () => {
1898
- m.modelValue != r.value && i("update:model-value", r.value);
1898
+ d.modelValue != r.value && i("update:model-value", r.value);
1899
1899
  },
1900
1900
  key: r.value
1901
1901
  }, {
@@ -1923,9 +1923,9 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
1923
1923
  }
1924
1924
  },
1925
1925
  emits: ["update:model-value"],
1926
- setup(e, { emit: d }) {
1927
- const a = d;
1928
- return (m, i) => {
1926
+ setup(e, { emit: m }) {
1927
+ const a = m;
1928
+ return (d, i) => {
1929
1929
  const s = resolveComponent("FmStepperField");
1930
1930
  return openBlock(), createElementBlock("div", _hoisted_1$7, [
1931
1931
  i[1] || (i[1] = createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Input the total number of stamps needed to complete the mission ", -1)),
@@ -1948,8 +1948,8 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
1948
1948
  }
1949
1949
  },
1950
1950
  emits: ["update:model-value"],
1951
- setup(e, { expose: d, emit: a }) {
1952
- const m = e, i = useMembershipStore(), { minor: s } = useLoading, l = ref(!1), o = ref(), n = ref(), r = ref(0), y = computed(() => {
1951
+ setup(e, { expose: m, emit: a }) {
1952
+ const d = e, i = useMembershipStore(), { minor: s } = useLoading, l = ref(!1), o = ref(), n = ref(), r = ref(0), y = computed(() => {
1953
1953
  var c;
1954
1954
  return ((c = i.loyaltyRewards.items.find(
1955
1955
  (f) => {
@@ -1981,7 +1981,7 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
1981
1981
  ), x("update:model-value", u.data, r.value));
1982
1982
  }
1983
1983
  const p = ref();
1984
- return d({
1984
+ return m({
1985
1985
  showSheet: h
1986
1986
  }), (u, c) => {
1987
1987
  const f = resolveComponent("FmStepperField"), B = resolveComponent("FmSelect"), b = resolveComponent("FmForm"), E = resolveComponent("FmButton"), N = resolveComponent("FmSideSheet");
@@ -2033,8 +2033,8 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2033
2033
  rules: [
2034
2034
  unref(ZodHelper).toRule(
2035
2035
  unref(z).number().min(1).max(
2036
- m.maxThreshold,
2037
- `Number cannot be more than ${m.maxThreshold}`
2036
+ d.maxThreshold,
2037
+ `Number cannot be more than ${d.maxThreshold}`
2038
2038
  )
2039
2039
  )
2040
2040
  ],
@@ -2164,17 +2164,17 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2164
2164
  }
2165
2165
  },
2166
2166
  setup(e) {
2167
- const d = e, { maxRange: a, currentRange: m, markers: i } = toRefs(d), s = computed(
2168
- () => Math.min(m.value / a.value * 100, 100)
2167
+ const m = e, { maxRange: a, currentRange: d, markers: i } = toRefs(m), s = computed(
2168
+ () => Math.min(d.value / a.value * 100, 100)
2169
2169
  ), l = (o) => o / a.value * 100;
2170
2170
  return (o, n) => {
2171
2171
  const r = resolveComponent("FmIcon");
2172
2172
  return e.type === "STAMP" ? (openBlock(), createElementBlock("div", _hoisted_1$5, [
2173
2173
  (openBlock(!0), createElementBlock(Fragment, null, renderList(Math.min(unref(a), 40), (y) => (openBlock(), createBlock(r, {
2174
2174
  class: normalizeClass(
2175
- unref(m) >= y ? "text-fm-color-primary" : "text-fm-color-neutral-gray-200"
2175
+ unref(d) >= y ? "text-fm-color-primary" : "text-fm-color-neutral-gray-200"
2176
2176
  ),
2177
- outline: unref(m) < y,
2177
+ outline: unref(d) < y,
2178
2178
  key: y,
2179
2179
  name: unref(i).some((v) => v === y) ? "featured_seasonal_and_gifts" : "check_circle"
2180
2180
  }, null, 8, ["class", "outline", "name"]))), 128))
@@ -2203,14 +2203,14 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2203
2203
  }
2204
2204
  }), isObject = (e) => e !== null && typeof e == "object";
2205
2205
  function changeKeysFactory(e) {
2206
- return function d(a, m = 1, i) {
2207
- if (m === 0 || !isObject(a))
2206
+ return function m(a, d = 1, i) {
2207
+ if (d === 0 || !isObject(a))
2208
2208
  return a;
2209
2209
  if (Array.isArray(a))
2210
- return a.map((l) => d(l, m - 1, i));
2210
+ return a.map((l) => m(l, d - 1, i));
2211
2211
  const s = Object.create(Object.getPrototypeOf(a));
2212
2212
  return Object.keys(a).forEach((l) => {
2213
- const o = a[l], n = e(l, i), r = d(o, m - 1, i);
2213
+ const o = a[l], n = e(l, i), r = m(o, d - 1, i);
2214
2214
  s[n] = r;
2215
2215
  }), s;
2216
2216
  };
@@ -2228,9 +2228,9 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
2228
2228
  }
2229
2229
  },
2230
2230
  emits: ["update:model-value"],
2231
- setup(e, { emit: d }) {
2232
- const { t: a } = useI18n(), m = e, i = d, s = useMembershipStore(), l = z.array(z.lazy(() => FdtoThresholdReward)).min(1, "Requires at least 1 reward"), o = computed(
2233
- () => m.modelValue.sort((u, c) => u.threshold - c.threshold) ?? []
2231
+ setup(e, { emit: m }) {
2232
+ const { t: a } = useI18n(), d = e, i = m, s = useMembershipStore(), l = z.array(z.lazy(() => FdtoThresholdReward)).min(1, "Requires at least 1 reward"), o = computed(
2233
+ () => d.modelValue.sort((u, c) => u.threshold - c.threshold) ?? []
2234
2234
  ), n = computed(() => {
2235
2235
  const u = l.safeParse(o.value);
2236
2236
  return u.success ? [] : u.error.errors;
@@ -2369,9 +2369,9 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
2369
2369
  modelValue: Object
2370
2370
  },
2371
2371
  emits: ["update:model-value"],
2372
- setup(e, { emit: d }) {
2373
- const { t: a } = useI18n(), m = e, i = computed(() => {
2374
- const o = FdoMission.safeParse(m.modelValue);
2372
+ setup(e, { emit: m }) {
2373
+ const { t: a } = useI18n(), d = e, i = computed(() => {
2374
+ const o = FdoMission.safeParse(d.modelValue);
2375
2375
  return o.success ? [] : o.error.errors;
2376
2376
  }), s = computed(() => [
2377
2377
  {
@@ -2384,7 +2384,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
2384
2384
  description: a("connect.campaign.mission.typeOption.PROGRESSIVE.description"),
2385
2385
  value: F_MISSION_TYPE.enum.PROGRESSIVE
2386
2386
  }
2387
- ]), l = d;
2387
+ ]), l = m;
2388
2388
  return (o, n) => {
2389
2389
  var v;
2390
2390
  const r = resolveComponent("FmCard"), y = resolveComponent("FmStepperField");
@@ -2444,9 +2444,9 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
2444
2444
  }
2445
2445
  });
2446
2446
  function useLocaleText() {
2447
- const { locale: e, t: d } = useI18n();
2448
- function a(m, i) {
2449
- return m ? m[e.value] ?? m["en-US"] ?? d(i) : d(i);
2447
+ const { locale: e, t: m } = useI18n();
2448
+ function a(d, i) {
2449
+ return d ? d[e.value] ?? d["en-US"] ?? m(i) : m(i);
2450
2450
  }
2451
2451
  return { getLocaleText: a };
2452
2452
  }
@@ -2476,8 +2476,8 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2476
2476
  }
2477
2477
  },
2478
2478
  emits: ["update:model-value", "update:file"],
2479
- setup(e, { emit: d }) {
2480
- const { t: a } = useI18n(), { getLocaleText: m } = useLocaleText(), i = e, s = d;
2479
+ setup(e, { emit: m }) {
2480
+ const { t: a } = useI18n(), { getLocaleText: d } = useLocaleText(), i = e, s = m;
2481
2481
  function l(y) {
2482
2482
  switch (i.field.type) {
2483
2483
  case "timeframe":
@@ -2525,14 +2525,17 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2525
2525
  unwrapped: i.schema ? ZodHelper.unwrap(i.schema) : void 0,
2526
2526
  rules: i.schema ? [ZodHelper.ruleAtPath(i.schema, "")] : void 0,
2527
2527
  labelMark: i.schema && ZodHelper.isRequired(i.schema) == !1 ? "optional" : void 0,
2528
- zodLabel: i.schema ? ZodHelper.toInputLabel(i.schema, i.field.label) : void 0
2528
+ zodLabel: i.schema ? ZodHelper.toInputLabel(
2529
+ i.schema,
2530
+ d(i.field.label_locale, i.field.label ?? "")
2531
+ ) : void 0
2529
2532
  }));
2530
2533
  return (y, v) => {
2531
2534
  var c, f, B, b, E;
2532
2535
  const h = resolveComponent("FmTextField"), x = resolveComponent("FmStepperField"), k = resolveComponent("FmTextarea"), p = resolveComponent("FmHelperText"), u = resolveComponent("FmSwitch");
2533
2536
  return e.field.type === "text" ? (openBlock(), createBlock(h, {
2534
2537
  key: 0,
2535
- label: unref(m)(e.field.label_locale, e.field.label ?? ""),
2538
+ label: unref(d)(e.field.label_locale, e.field.label ?? ""),
2536
2539
  "label-mark": unref(r).labelMark,
2537
2540
  rules: unref(r).rules,
2538
2541
  "model-value": unref(o),
@@ -2544,7 +2547,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2544
2547
  json: { schema: unref(r).unwrapped, props: i }
2545
2548
  }, null, 8, ["json"]),
2546
2549
  createVNode(x, {
2547
- label: unref(m)(e.field.label_locale, e.field.label ?? ""),
2550
+ label: unref(d)(e.field.label_locale, e.field.label ?? ""),
2548
2551
  "label-mark": e.field.isRuleChildren ? void 0 : unref(r).labelMark,
2549
2552
  "model-value": unref(o),
2550
2553
  rules: e.field.isRuleChildren ? [] : unref(r).rules,
@@ -2554,7 +2557,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2554
2557
  }, null, 8, ["label", "label-mark", "model-value", "rules", "helper-state", "helper-text"])
2555
2558
  ], 64)) : e.field.type === "textarea" ? (openBlock(), createBlock(k, {
2556
2559
  key: 2,
2557
- label: unref(m)(e.field.label_locale, e.field.label ?? ""),
2560
+ label: unref(d)(e.field.label_locale, e.field.label ?? ""),
2558
2561
  "label-mark": unref(r).labelMark,
2559
2562
  rules: unref(r).rules,
2560
2563
  "model-value": unref(o),
@@ -2590,7 +2593,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2590
2593
  _: 1
2591
2594
  }, 8, ["thumbnail"])) : e.field.type === "switch" ? (openBlock(), createBlock(u, {
2592
2595
  key: 6,
2593
- label: unref(m)(e.field.label_locale, e.field.label ?? ""),
2596
+ label: unref(d)(e.field.label_locale, e.field.label ?? ""),
2594
2597
  "label-placement": "right",
2595
2598
  sublabel: e.field.property == "campaign.notify" ? "Notify customer when customer receives the reward" : void 0,
2596
2599
  "label-mark": unref(r).labelMark,
@@ -2786,23 +2789,23 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2786
2789
  }
2787
2790
  },
2788
2791
  setup(e) {
2789
- const { t: d, te: a } = useI18n();
2790
- return (m, i) => {
2792
+ const { t: m, te: a } = useI18n();
2793
+ return (d, i) => {
2791
2794
  const s = resolveComponent("FmCard");
2792
2795
  return openBlock(), createBlock(s, {
2793
2796
  variant: "outlined",
2794
2797
  class: "p-16 space-y-8"
2795
2798
  }, {
2796
2799
  default: withCtx(() => [
2797
- createElementVNode("div", _hoisted_1$1, toDisplayString(unref(d)("connect.campaign.common.summary")), 1),
2800
+ createElementVNode("div", _hoisted_1$1, toDisplayString(unref(m)("connect.campaign.common.summary")), 1),
2798
2801
  i[0] || (i[0] = createElementVNode("div", { class: "h-[1px] bg-fm-color-neutral-gray-100 w-full" }, null, -1)),
2799
2802
  (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(getCampaignSummaryObject)(e.data), (l, o) => (openBlock(), createElementBlock("div", {
2800
2803
  class: "space-y-4",
2801
2804
  key: o
2802
2805
  }, [
2803
2806
  l ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2804
- createElementVNode("div", _hoisted_2$1, toDisplayString(unref(d)(`${o}`)), 1),
2805
- createElementVNode("div", _hoisted_3$1, toDisplayString(unref(a)(`${l}`) ? unref(d)(`${l}`) : l), 1)
2807
+ createElementVNode("div", _hoisted_2$1, toDisplayString(unref(m)(`${o}`)), 1),
2808
+ createElementVNode("div", _hoisted_3$1, toDisplayString(unref(a)(`${l}`) ? unref(m)(`${l}`) : l), 1)
2806
2809
  ], 64)) : createCommentVNode("", !0)
2807
2810
  ]))), 128))
2808
2811
  ]),
@@ -2821,7 +2824,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2821
2824
  TEMPLATES.VOUCHER
2822
2825
  ), { minor } = useLoading, isLoading = ref(!1), sheetTitle = ref("Create Campaign"), campaignType = ref("VOUCHER");
2823
2826
  async function showSheet(visible, type, campaign, selectedTemplate) {
2824
- var e, d;
2827
+ var e, m;
2825
2828
  if (sheetVisible.value = visible, campaignType.value = type, visible == !0) {
2826
2829
  try {
2827
2830
  isLoading.value = visible, await useMembershipStore().readRewards(), await useBusinessStore().readLocations(), await useMembershipStore().readSegments(), await useMembershipStore().readMembership();
@@ -2832,16 +2835,16 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2832
2835
  console.log(
2833
2836
  TEMPLATES[type],
2834
2837
  "base template"
2835
- ), template.value = selectedTemplate ?? TEMPLATES[type], schema.value = CampaignDtos[type], type === "VOUCHER" && (await useCampaignStore().read(), schema.value = schema.value.superRefine((a, m) => {
2838
+ ), template.value = selectedTemplate ?? TEMPLATES[type], schema.value = CampaignDtos[type], type === "VOUCHER" && (await useCampaignStore().read(), schema.value = schema.value.superRefine((a, d) => {
2836
2839
  a.campaign.type === "VOUCHER" && a.campaign.code && useCampaignStore().campaigns.voucher.some(
2837
2840
  (i) => i.code === a.campaign.code && i._id.toString() !== a.campaign._id.toString()
2838
- ) && m.addIssue({
2841
+ ) && d.addIssue({
2839
2842
  code: "custom",
2840
2843
  message: "Code already exists, please use another code",
2841
2844
  path: ["campaign", "code"]
2842
2845
  });
2843
2846
  })), data.value = campaign != null ? { ...campaign, templateId: (e = campaign.template) == null ? void 0 : e._id } : _.cloneDeep({
2844
- ...(d = template.value) == null ? void 0 : d.defaultValue
2847
+ ...(m = template.value) == null ? void 0 : m.defaultValue
2845
2848
  }), "configs" in data.value && typeof data.value.configs == "string" && (data.value.configs = eval(data.value.configs)), data.value = cleanPF(data.value), data.value.templateId = SvcConfig.getBusinessId(), data.value.campaign.business = SvcConfig.getBusinessId(), data.value.campaign.templateId = SvcConfig.getBusinessId(), "configs" in data.value && (data.value.configs.business = SvcConfig.getBusinessId()), currentStep.value = 1, sheetTitle.value = campaign ? t("connect.campaign.common.edit_campaign_title", {
2846
2849
  typeName: t(`connect.campaign.common.typeName.${type}`)
2847
2850
  }) : t("connect.campaign.common.create_campaign_title", {
@@ -2872,11 +2875,11 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2872
2875
  return e.success ? [] : e.error.errors;
2873
2876
  });
2874
2877
  function stepErrors(e = currentStep.value - 1) {
2875
- const d = template.value.steps[e].groups.flatMap(
2876
- (a) => a.fields.map((m) => m.property)
2878
+ const m = template.value.steps[e].groups.flatMap(
2879
+ (a) => a.fields.map((d) => d.property)
2877
2880
  );
2878
2881
  return errors.value.filter(
2879
- (a) => d.some((m) => a.path.join(".").includes(m))
2882
+ (a) => m.some((d) => a.path.join(".").includes(d))
2880
2883
  );
2881
2884
  }
2882
2885
  __expose({ showSheet });
@@ -2889,10 +2892,10 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2889
2892
  }
2890
2893
  });
2891
2894
  }
2892
- function onUpdateProperty(e, d) {
2893
- var a, m, i, s, l, o, n, r;
2894
- if (_.set(data.value, e, d), e == "campaign.event.type") {
2895
- const v = ((s = (i = (m = (a = template.value) == null ? void 0 : a.defaultValue) == null ? void 0 : m.campaign) == null ? void 0 : i.event) == null ? void 0 : s.rule) ? _.cloneDeep({
2895
+ function onUpdateProperty(e, m) {
2896
+ var a, d, i, s, l, o, n, r;
2897
+ if (_.set(data.value, e, m), e == "campaign.event.type") {
2898
+ const v = ((s = (i = (d = (a = template.value) == null ? void 0 : a.defaultValue) == null ? void 0 : d.campaign) == null ? void 0 : i.event) == null ? void 0 : s.rule) ? _.cloneDeep({
2896
2899
  ...(r = (n = (o = (l = template.value) == null ? void 0 : l.defaultValue) == null ? void 0 : o.campaign) == null ? void 0 : n.event) == null ? void 0 : r.rule
2897
2900
  }) : RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup(), [
2898
2901
  RuleBuilder.scaffoldGroup("g_schedule"),
@@ -2911,7 +2914,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2911
2914
  ],
2912
2915
  "&&"
2913
2916
  );
2914
- if (d != "SCHEDULE") {
2917
+ if (m != "SCHEDULE") {
2915
2918
  _.set(data.value, "campaign.event.rule", v);
2916
2919
  return;
2917
2920
  }
@@ -2921,19 +2924,19 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2921
2924
  RuleBuilder.setRuleToGroup(v, h)
2922
2925
  );
2923
2926
  }
2924
- e == "campaign.notify" && d == !1 && _.set(data.value, "campaign.notifyMessage", void 0);
2927
+ e == "campaign.notify" && m == !1 && _.set(data.value, "campaign.notifyMessage", void 0);
2925
2928
  }
2926
- async function onUpdateFile(e, d) {
2927
- return e ? await minor(async () => firebaseStorage.update(d, e), {
2929
+ async function onUpdateFile(e, m) {
2930
+ return e ? await minor(async () => firebaseStorage.update(m, e), {
2928
2931
  message: `${e ? "Uploading" : "Removing"} file`,
2929
2932
  successMessage: `File ${e ? "uploaded" : "removed"} successfully`
2930
2933
  }) : "";
2931
2934
  }
2932
2935
  function isDisable(e) {
2933
- var d, a;
2936
+ var m, a;
2934
2937
  switch (e == null ? void 0 : e.property) {
2935
2938
  case "campaign.event.type":
2936
- return ((a = (d = data.value) == null ? void 0 : d.campaign) == null ? void 0 : a._id) || !1;
2939
+ return ((a = (m = data.value) == null ? void 0 : m.campaign) == null ? void 0 : a._id) || !1;
2937
2940
  default:
2938
2941
  return !1;
2939
2942
  }
@@ -2942,20 +2945,20 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2942
2945
  const e = schema.value.superRefine(campaignRefinement).transform(campaignTransform).safeParse(data.value);
2943
2946
  if (!e.success)
2944
2947
  return;
2945
- const d = await emits(
2948
+ const m = await emits(
2946
2949
  "submit:model-value",
2947
2950
  cleanPF(JSON.parse(JSON.stringify(e.data)))
2948
2951
  );
2949
- (d || d === void 0) && (sheetVisible.value = !1);
2952
+ (m || m === void 0) && (sheetVisible.value = !1);
2950
2953
  }
2951
- return (e, d) => {
2952
- const a = resolveComponent("FmButton"), m = resolveComponent("FmStep"), i = resolveComponent("FmStepper"), s = resolveComponent("FmCard"), l = resolveComponent("FmTopSheet");
2954
+ return (e, m) => {
2955
+ const a = resolveComponent("FmButton"), d = resolveComponent("FmStep"), i = resolveComponent("FmStepper"), s = resolveComponent("FmCard"), l = resolveComponent("FmTopSheet");
2953
2956
  return openBlock(), createBlock(l, {
2954
2957
  "fullscreen-size": "lg",
2955
2958
  modelValue: unref(sheetVisible),
2956
2959
  "onUpdate:modelValue": [
2957
- d[7] || (d[7] = (o) => isRef(sheetVisible) ? sheetVisible.value = o : null),
2958
- d[8] || (d[8] = (o) => sheetVisible.value = o)
2960
+ m[7] || (m[7] = (o) => isRef(sheetVisible) ? sheetVisible.value = o : null),
2961
+ m[8] || (m[8] = (o) => sheetVisible.value = o)
2959
2962
  ]
2960
2963
  }, createSlots({
2961
2964
  "top-sheet-header": withCtx(() => [
@@ -2963,7 +2966,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2963
2966
  createElementVNode("div", null, toDisplayString(unref(sheetTitle)), 1),
2964
2967
  createElementVNode("div", _hoisted_2, [
2965
2968
  createVNode(a, {
2966
- onClick: d[0] || (d[0] = (o) => hideSheet()),
2969
+ onClick: m[0] || (m[0] = (o) => hideSheet()),
2967
2970
  label: unref(t)("connect.campaign.common.cancel"),
2968
2971
  variant: "tertiary"
2969
2972
  }, null, 8, ["label"]),
@@ -2983,7 +2986,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2983
2986
  createElementVNode("div", _hoisted_9, [
2984
2987
  createElementVNode("div", _hoisted_10, [
2985
2988
  createElementVNode("div", _hoisted_11, [
2986
- d[9] || (d[9] = createElementVNode("div", { class: "col-span-2 space-y-80 xs:col-span-3 xs:px-16 xs:pt-16" }, [
2989
+ m[9] || (m[9] = createElementVNode("div", { class: "col-span-2 space-y-80 xs:col-span-3 xs:px-16 xs:pt-16" }, [
2987
2990
  createElementVNode("div", { class: "flex-1 space-y-6 py-1" }, [
2988
2991
  createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100 rounded" }),
2989
2992
  createElementVNode("div", { class: "h-[80px] bg-fm-color-neutral-gray-100 rounded" }),
@@ -3017,12 +3020,12 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3017
3020
  unref(data) ? (openBlock(), createElementBlock("div", _hoisted_3, [
3018
3021
  createVNode(i, {
3019
3022
  modelValue: unref(currentStep),
3020
- "onUpdate:modelValue": d[1] || (d[1] = (o) => isRef(currentStep) ? currentStep.value = o : null),
3023
+ "onUpdate:modelValue": m[1] || (m[1] = (o) => isRef(currentStep) ? currentStep.value = o : null),
3021
3024
  orientation: "horizontal",
3022
3025
  class: "xs:hidden mx-[-24px] mt-16 mb-24 flex-1"
3023
3026
  }, {
3024
3027
  default: withCtx(() => [
3025
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (o, n) => (openBlock(), createBlock(m, {
3028
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (o, n) => (openBlock(), createBlock(d, {
3026
3029
  key: o.name,
3027
3030
  title: unref(getLocaleText)(o.name_locale, o.name),
3028
3031
  value: n + 1,
@@ -3036,16 +3039,16 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3036
3039
  createVNode(a, {
3037
3040
  icon: "close",
3038
3041
  variant: "tertiary",
3039
- onClick: d[2] || (d[2] = (o) => sheetVisible.value = !1)
3042
+ onClick: m[2] || (m[2] = (o) => sheetVisible.value = !1)
3040
3043
  }),
3041
3044
  createVNode(i, {
3042
3045
  modelValue: unref(currentStep),
3043
- "onUpdate:modelValue": d[3] || (d[3] = (o) => isRef(currentStep) ? currentStep.value = o : null),
3046
+ "onUpdate:modelValue": m[3] || (m[3] = (o) => isRef(currentStep) ? currentStep.value = o : null),
3044
3047
  orientation: "horizontal",
3045
3048
  class: "flex-1"
3046
3049
  }, {
3047
3050
  default: withCtx(() => [
3048
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (o, n) => (openBlock(), createBlock(m, {
3051
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (o, n) => (openBlock(), createBlock(d, {
3049
3052
  key: o.name,
3050
3053
  title: unref(sheetTitle),
3051
3054
  description: unref(getLocaleText)(o.name_locale, o.name),
@@ -3059,7 +3062,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3059
3062
  createVNode(a, {
3060
3063
  icon: "info",
3061
3064
  variant: "tertiary",
3062
- onClick: d[4] || (d[4] = () => showSummaryDialog())
3065
+ onClick: m[4] || (m[4] = () => showSummaryDialog())
3063
3066
  })
3064
3067
  ]),
3065
3068
  createElementVNode("div", _hoisted_5, [
@@ -3111,12 +3114,12 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3111
3114
  label: unref(t)("connect.common.back"),
3112
3115
  variant: "tertiary",
3113
3116
  disabled: unref(currentStep) == 1,
3114
- onClick: d[5] || (d[5] = (o) => currentStep.value--)
3117
+ onClick: m[5] || (m[5] = (o) => currentStep.value--)
3115
3118
  }, null, 8, ["label", "disabled"]),
3116
3119
  createVNode(a, {
3117
3120
  disabled: unref(currentStep) - 1 < unref(template).steps.length - 1 ? stepErrors().length > 0 : unref(errors).length > 0,
3118
3121
  label: unref(currentStep) - 1 < unref(template).steps.length - 1 ? unref(t)("connect.common.next") : unref(t)("connect.common.submit"),
3119
- onClick: d[6] || (d[6] = (o) => unref(currentStep) - 1 < unref(template).steps.length - 1 ? currentStep.value++ : onSubmit())
3122
+ onClick: m[6] || (m[6] = (o) => unref(currentStep) - 1 < unref(template).steps.length - 1 ? currentStep.value++ : onSubmit())
3120
3123
  }, null, 8, ["disabled", "label"])
3121
3124
  ])
3122
3125
  ]),