@feedmepos/mf-connect 0.1.37-prod → 0.1.38-beta.10

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 (118) hide show
  1. package/dist/Analytic-BdyLURDk.js +761 -0
  2. package/dist/{App-Bpo0XZSs.js → App-BLV7hTax.js} +364 -352
  3. package/dist/AuditLogs-DbJczPj1.js +1887 -0
  4. package/dist/{Bin-ohZ2CZZR.js → Bin-BMEEisLw.js} +8 -8
  5. package/dist/{Broadcast-D5x0_-zC.js → Broadcast-kJ4PM-iv.js} +40 -40
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CYb38NXA.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Dyy6Iknj.js} +18 -18
  7. package/dist/{Card-BM-Lrm5y.js → Card-SrRupWyd.js} +159 -159
  8. package/dist/{Collections-Cr4aoJer.js → Collections-CNoranW5.js} +136 -123
  9. package/dist/{Credit-DzDVFv4H.js → Credit-tW7knMvR.js} +74 -74
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +58 -0
  11. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bs8o9n1V.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BplJqfmQ.js} +491 -488
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-koqrPPqM.js → EffectSheet.vue_vue_type_style_index_0_lang-DKKptxcn.js} +91 -89
  13. package/dist/{Experience-CjaDdbvZ.js → Experience-DkZIYg_s.js} +41 -41
  14. package/dist/{FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js → FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js} +2 -6
  15. package/dist/{Game-BuiTygow.js → Game-D3smlHJp.js} +31 -31
  16. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
  17. package/dist/{Index-CQGzUU-w.js → Index-3Iep5Agi.js} +10 -10
  18. package/dist/Marketing-e3He2TRQ.js +20073 -0
  19. package/dist/Member-CdOzAmzY.js +279 -0
  20. package/dist/MemberList-DPNBniHV.js +1606 -0
  21. package/dist/MemberOverview-wL_ailso.js +58 -0
  22. package/dist/{MemberTransactions-DzG1fY0c.js → MemberTransactions-B4ROd3yQ.js} +1 -1
  23. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-CF0IVI5X.js +60482 -0
  24. package/dist/{Mission-BtypT2uF.js → Mission-BRnOVwzw.js} +21 -21
  25. package/dist/{Overview-Be7bUtRO.js → Overview-DJ4ihjSG.js} +335 -335
  26. package/dist/{Point-Bw4lnLqp.js → Point-X2XbIe2Q.js} +41 -41
  27. package/dist/Promotion-B6FXsO-R.js +289 -0
  28. package/dist/{Queue-CpPEVgn8.js → Queue-kzL4GDld.js} +52 -52
  29. package/dist/{Record-DQq4P69i.js → Record-CbpzqZvu.js} +9 -9
  30. package/dist/{Reward-DJH0eM8u.js → Reward-CnLgcOl6.js} +173 -173
  31. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-_kw_PR0h.js → RewardGroup.vue_vue_type_script_setup_true_lang-CGzaVt3L.js} +11 -11
  32. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BHSbFQ81.js +1751 -0
  33. package/dist/Segment-C9rvyN-t.js +882 -0
  34. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Dx6Ew9Z_.js → SelectItems.vue_vue_type_script_setup_true_lang-Bq2TBHn4.js} +2 -2
  35. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B60_8Toi.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-9rmFSymz.js} +11 -11
  36. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BCaJ3xKT.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-qAwMzxkn.js} +3 -3
  37. package/dist/Setting-CHWl3Rlt.js +1936 -0
  38. package/dist/{Store-H0UDQpln.js → Store-BEJYH91p.js} +211 -211
  39. package/dist/StoreRewards-C0LoDVM6.js +423 -0
  40. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Q7W66jrt.js +1029 -0
  41. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D-jL1oGS.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-zupkP2uw.js} +1 -1
  42. package/dist/{Tier-CJufQcIz.js → Tier-8dGY0rNK.js} +106 -106
  43. package/dist/{Title-BBMgGUld.js → Title-BdgXkzgT.js} +133 -131
  44. package/dist/{Transaction-DsucPnfp.js → Transaction-BgFnK0ZU.js} +2 -2
  45. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CwOcZEQX.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-gMC5mLHh.js} +6 -6
  46. package/dist/{Voucher-BPvxKO_w.js → Voucher-B2ITqfZO.js} +153 -123
  47. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BZ1uzuZz.js +419 -0
  48. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DMs4XKXM.js → ZodTextField.vue_vue_type_script_setup_true_lang-C9svkJkQ.js} +1 -1
  49. package/dist/{app-D3MT1deX.js → app-BpNK9Shm.js} +164 -125
  50. package/dist/{app-Bo0JpadQ.js → app-kfprY-bq.js} +1 -1
  51. package/dist/app.js +4 -3
  52. package/dist/business-DKrvq1V9.js +79 -0
  53. package/dist/{campaign-j1c3ou7l.js → campaign-DmYOJ9S0.js} +5 -3
  54. package/dist/{campaign-Z3l7BoMg.js → campaign-sim1PpwX.js} +9 -9
  55. package/dist/{campaign.enum-CVXPc5Pd.js → campaign.enum-BD2rWUV4.js} +1 -1
  56. package/dist/campaign.fn-CBkNQbkW.js +758 -0
  57. package/dist/{collectible.enum-CDSikBAy.js → collectible.enum-SmUqreZO.js} +1 -1
  58. package/dist/{collection.fn-Bz38mGMa.js → collection.fn-kt3pF_1n.js} +2 -2
  59. package/dist/{dto-D648NN4s.js → dto-CgQvfjEp.js} +4 -4
  60. package/dist/{effect-DbMAmVSR.js → effect-Cof8Q_oG.js} +1 -1
  61. package/dist/{email-addresses-KOVDrRiK.js → email-addresses-Bq1gqAtY.js} +1 -1
  62. package/dist/{export-cTZf8Avd.js → export-CvhFTpK3.js} +3 -3
  63. package/dist/{helper-BYyfcLqw.js → helper-fHTdEmqM.js} +1 -1
  64. package/dist/index-B5526zoT.js +56 -0
  65. package/dist/index-BKs8ARn4.js +32260 -0
  66. package/dist/{index-DPBHiqsJ.js → index-BOxj8CUi.js} +11 -4
  67. package/dist/{index-nF9iYTlh.js → index-CA6LB3uR.js} +1 -1
  68. package/dist/{index-BrKXRxe_.js → index-CDPz2U9g.js} +1 -1
  69. package/dist/{index-CTPMbFf5.js → index-CNB0Lbxl.js} +10 -9
  70. package/dist/{index-E-0tTd0_.js → index-CYkHKi_f.js} +1 -1
  71. package/dist/{index-B3p0hmIV.js → index-ChdZIg_A.js} +1 -1
  72. package/dist/index-CsaQJMAR.js +66 -0
  73. package/dist/{index-BTb8I_eB.js → index-DBwa778L.js} +1 -1
  74. package/dist/{index-B4MqsaBz.js → index-DFZmjlFv.js} +3 -3
  75. package/dist/{index-BMl2KZts.js → index-DR0MjqoO.js} +11415 -10933
  76. package/dist/{index-BIaCtk8e.js → index-DasON_G8.js} +192 -79
  77. package/dist/index-ZoiSAZFK.js +31 -0
  78. package/dist/{index-CvoShC5J.js → index-meUmYtul.js} +536 -461
  79. package/dist/{index.esm2017-DFYwde30.js → index.esm2017-C7S5pHXF.js} +127 -127
  80. package/dist/{loading-vUArhX_O.js → loading-CWqSCt18.js} +1 -1
  81. package/dist/{membership-BHKv29yt.js → membership-DetnBa1q.js} +3 -3
  82. package/dist/{money-Bl3_QRkE.js → money-BkjOh2D6.js} +1 -1
  83. package/dist/{number-hh_S9w7k.js → number-DgbK531o.js} +1 -1
  84. package/dist/objectid-BQwSaw2U.js +145 -0
  85. package/dist/{plugins-CVes2wzE.js → plugins-OrApXSK1.js} +2 -2
  86. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  87. package/dist/{reward-ANZOdWzf.js → reward-KXD18Lzr.js} +1 -1
  88. package/dist/{rule-BvFk5bQg.js → rule-BnAvQkaq.js} +3 -3
  89. package/dist/{rule-builder-BSN777PN.js → rule-builder-fPUwOVc7.js} +17 -17
  90. package/dist/style.css +4 -1
  91. package/dist/{template-Dh9lDLs_.js → template-SbZEb9hY.js} +64 -64
  92. package/dist/{trigger-C7THbt7R.js → trigger-CnST_aOW.js} +7 -7
  93. package/dist/{usePagination-JoYaROkV.js → usePagination-BeF5K3M7.js} +85 -85
  94. package/dist/{user-DtNR9JY2.js → user-D2wQnmQQ.js} +1 -1
  95. package/dist/{vue-i18n-BWyHnm4m.js → vue-i18n-DiFFrwf8.js} +375 -375
  96. package/dist/{xlsx-7u9SB0oa.js → xlsx-B47YZ_wM.js} +226 -226
  97. package/package.json +9 -3
  98. package/dist/Analytic-CavR2bzs.js +0 -427
  99. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
  100. package/dist/Marketing-BSspYuhg.js +0 -319
  101. package/dist/Member-B4S0UNGq.js +0 -287
  102. package/dist/MemberList-CfnUJ3mh.js +0 -1606
  103. package/dist/MemberOverview-C2n9oJZh.js +0 -58
  104. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-hZUWLTWj.js +0 -455
  105. package/dist/Promotion-Bg6x0rAh.js +0 -255
  106. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CRGep1RK.js +0 -1641
  107. package/dist/Segment-BLB4VWNJ.js +0 -882
  108. package/dist/Setting-GRIUo7vg.js +0 -1932
  109. package/dist/StoreRewards--TNIFaCo.js +0 -423
  110. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CfB8tA5l.js +0 -995
  111. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Bg-9YqLP.js +0 -419
  112. package/dist/business-DMALI7ZO.js +0 -78
  113. package/dist/campaign.fn-rsRhHYZP.js +0 -758
  114. package/dist/index-BsCGyJMY.js +0 -29566
  115. package/dist/index-CuvNtC_M.js +0 -61
  116. package/dist/index-DFKmjCG1.js +0 -44
  117. package/dist/index-Dbd4WA4r.js +0 -61
  118. package/dist/objectid-CEyMlMge.js +0 -145
@@ -1,41 +1,41 @@
1
1
  import { defineComponent, ref, watch, resolveComponent, openBlock, createElementBlock, createVNode, unref, isRef, withCtx, createBlock, createCommentVNode, computed, createElementVNode, Fragment, renderList, normalizeClass, toDisplayString, toRefs, normalizeStyle, resolveDynamicComponent, createSlots } from "vue";
2
2
  import { _ } from "./lodash-B5I3zXaY.js";
3
- import { z } from "./app-D3MT1deX.js";
3
+ import { z } from "./app-BpNK9Shm.js";
4
4
  import { Z as ZodHelper } from "./zod-Bg2FbC-D.js";
5
- import { c as getCampaignSummaryObject, C as CampaignOptions } from "./campaign-Z3l7BoMg.js";
6
- import { c as campaignRefinement, C as CampaignDtos, a as campaignTransform } from "./dto-D648NN4s.js";
7
- import { u as useMembershipStore } from "./membership-BHKv29yt.js";
8
- import { u as useBusinessStore } from "./business-DMALI7ZO.js";
9
- import "./index-CTPMbFf5.js";
10
- import { R as RuleBuilder, a as isRuleEntry } from "./rule-builder-BSN777PN.js";
5
+ import { c as getCampaignSummaryObject, C as CampaignOptions } from "./campaign-sim1PpwX.js";
6
+ import { c as campaignRefinement, C as CampaignDtos, a as campaignTransform } from "./dto-CgQvfjEp.js";
7
+ import { u as useMembershipStore } from "./membership-DetnBa1q.js";
8
+ import { u as useBusinessStore } from "./business-DKrvq1V9.js";
9
+ import "./index-CNB0Lbxl.js";
10
+ import { R as RuleBuilder, a as isRuleEntry } from "./rule-builder-fPUwOVc7.js";
11
11
  import { J as JsonViewer } from "./JsonViewer-v8_C7l5N.js";
12
12
  import { h as hooks } from "./moment-BWErdI6_.js";
13
- import { f as featureVersionMapping } from "./campaign.enum-CVXPc5Pd.js";
14
- import { _ as _sfc_main$o } from "./ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js";
15
- import { b as _sfc_main$m, a as _sfc_main$p, _ as _sfc_main$r } from "./EffectSheet.vue_vue_type_style_index_0_lang-koqrPPqM.js";
16
- import { _ as _sfc_main$q } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-D-jL1oGS.js";
17
- import { _ as _sfc_main$t } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-CwOcZEQX.js";
18
- import { _ as _sfc_main$j, a as _sfc_main$k } from "./RuleGroup.vue_vue_type_script_setup_true_lang-CRGep1RK.js";
19
- import { p as prompt, c as cases, f as firebaseStorage } from "./plugins-CVes2wzE.js";
20
- import { u as useI18n } from "./vue-i18n-BWyHnm4m.js";
21
- import { b as TypeToTriggerOptions, _ as _sfc_main$u, a as _sfc_main$v } from "./trigger-C7THbt7R.js";
22
- import { _ as _sfc_main$s } from "./MessageInput.vue_vue_type_script_setup_true_lang-hZUWLTWj.js";
23
- import { c as calculateNextScheduleAt, S as SummarizeRrule, R as RRule } from "./rule-BvFk5bQg.js";
24
- import { _ as _sfc_main$l, a as _sfc_main$n } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-Bg-9YqLP.js";
25
- import { t as FdoCreditLoyaltyReward, u as FdtoRandomReward, v as F_MISSION_TYPE, w as FdoThresholdCreditReward, x as FdtoThresholdReward, y as FdoMission } from "./index-CvoShC5J.js";
26
- import { T as TEMPLATES } from "./index-BIaCtk8e.js";
27
- import "./index-BrKXRxe_.js";
28
- import "./index-B4MqsaBz.js";
29
- import { a as F_GAME_TYPE } from "./collectible.enum-CDSikBAy.js";
13
+ import { f as featureVersionMapping } from "./campaign.enum-BD2rWUV4.js";
14
+ import { _ as _sfc_main$o } from "./ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js";
15
+ import { b as _sfc_main$m, a as _sfc_main$p, _ as _sfc_main$r } from "./EffectSheet.vue_vue_type_style_index_0_lang-DKKptxcn.js";
16
+ import { _ as _sfc_main$q } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-zupkP2uw.js";
17
+ import { _ as _sfc_main$t } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-gMC5mLHh.js";
18
+ import { _ as _sfc_main$j, a as _sfc_main$k } from "./RuleGroup.vue_vue_type_script_setup_true_lang-BHSbFQ81.js";
19
+ import { p as prompt, c as cases, f as firebaseStorage } from "./plugins-OrApXSK1.js";
20
+ import { u as useI18n } from "./vue-i18n-DiFFrwf8.js";
21
+ import { T as TypeToTriggerOptions, _ as _sfc_main$u, b as _sfc_main$v } from "./trigger-CnST_aOW.js";
22
+ import { _ as _sfc_main$s } from "./MessageInput.vue_vue_type_script_setup_true_lang-CF0IVI5X.js";
23
+ import { c as calculateNextScheduleAt, S as SummarizeRrule, R as RRule } from "./rule-BnAvQkaq.js";
24
+ import { _ as _sfc_main$l, a as _sfc_main$n } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-BZ1uzuZz.js";
25
+ import { T as TEMPLATES } from "./index-DasON_G8.js";
26
+ import { t as FdoCreditLoyaltyReward, u as FdtoRandomReward, v as F_MISSION_TYPE, w as FdoThresholdCreditReward, x as FdtoThresholdReward, y as FdoMission } from "./index-meUmYtul.js";
27
+ import "./index-CDPz2U9g.js";
28
+ import "./index-DFZmjlFv.js";
29
+ import { a as F_GAME_TYPE } from "./collectible.enum-SmUqreZO.js";
30
30
  import { useCoreStore } from "@feedmepos/mf-common";
31
- import { u as useLoading } from "./loading-vUArhX_O.js";
32
- import { i as initCollectibleConfig } from "./helper-BYyfcLqw.js";
33
- import { C as CollectionUtils } from "./collection.fn-Bz38mGMa.js";
34
- import { s as sentenceCase$1 } from "./index-CuvNtC_M.js";
35
- import "./index-BsCGyJMY.js";
31
+ import { u as useLoading } from "./loading-CWqSCt18.js";
32
+ import { i as initCollectibleConfig } from "./helper-fHTdEmqM.js";
33
+ import { C as CollectionUtils } from "./collection.fn-kt3pF_1n.js";
34
+ import { s as sentenceCase$1 } from "./index-CsaQJMAR.js";
35
+ import "./index-BKs8ARn4.js";
36
36
  import { useDialog } from "@feedmepos/ui-library";
37
- import { u as useCampaignStore } from "./campaign-j1c3ou7l.js";
38
- import { S as SvcConfig } from "./index-BMl2KZts.js";
37
+ import { u as useCampaignStore } from "./campaign-DmYOJ9S0.js";
38
+ import { S as SvcConfig } from "./index-DR0MjqoO.js";
39
39
  import { a as cleanPF } from "./object-qECH92oz.js";
40
40
  const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defineComponent({
41
41
  __name: "TimeRuleGroup",
@@ -47,13 +47,13 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
47
47
  }
48
48
  },
49
49
  emits: ["update:model-value"],
50
- setup(e, { emit: c }) {
51
- const { t: a } = useI18n(), r = e, u = c, s = ref(
52
- !r.modelValue || !r.modelValue.rules.g_time ? "all_time" : RuleBuilder.getRules(r.modelValue.rules.g_time).length > 0 ? "custom" : "all_time"
50
+ setup(e, { emit: d }) {
51
+ const { t: a } = useI18n(), s = e, u = d, i = ref(
52
+ !s.modelValue || !s.modelValue.rules.g_time ? "all_time" : RuleBuilder.getRules(s.modelValue.rules.g_time).length > 0 ? "custom" : "all_time"
53
53
  );
54
- watch(s, async (l, n) => {
55
- var d;
56
- if (n == "custom" && l == "all_time" && RuleBuilder.getRules((d = r.modelValue) == null ? void 0 : d.rules.g_time).length > 0) {
54
+ watch(i, async (l, n) => {
55
+ var m;
56
+ if (n == "custom" && l == "all_time" && RuleBuilder.getRules((m = s.modelValue) == null ? void 0 : m.rules.g_time).length > 0) {
57
57
  const g = await prompt.confirm(
58
58
  a("connect.template.rule.time.confirm_remove"),
59
59
  a("connect.common.confirm"),
@@ -63,28 +63,28 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
63
63
  g && u(
64
64
  "update:model-value",
65
65
  RuleBuilder.setRuleToGroup(
66
- r.modelValue ?? RuleBuilder.scaffoldGroup(),
66
+ s.modelValue ?? RuleBuilder.scaffoldGroup(),
67
67
  RuleBuilder.scaffoldGroup("g_time")
68
68
  )
69
- ), s.value = g ? l : n;
69
+ ), i.value = g ? l : n;
70
70
  }
71
71
  });
72
72
  async function o(l) {
73
73
  var n;
74
- if (l == "custom" && RuleBuilder.getRules((n = r.modelValue) == null ? void 0 : n.rules.g_time).length > 0) {
74
+ if (l == "custom" && RuleBuilder.getRules((n = s.modelValue) == null ? void 0 : n.rules.g_time).length > 0) {
75
75
  if (!await prompt.confirm(
76
76
  a("connect.template.rule.time.confirm_remove"),
77
77
  a("connect.common.confirm"),
78
78
  a("connect.common.confirm"),
79
79
  a("connect.common.cancel")
80
80
  )) {
81
- s.value = "all_time";
81
+ i.value = "all_time";
82
82
  return;
83
83
  }
84
84
  u(
85
85
  "update:model-value",
86
86
  RuleBuilder.setRuleToGroup(
87
- r.modelValue ?? RuleBuilder.scaffoldGroup(),
87
+ s.modelValue ?? RuleBuilder.scaffoldGroup(),
88
88
  RuleBuilder.scaffoldGroup("g_time")
89
89
  )
90
90
  );
@@ -92,28 +92,28 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
92
92
  }
93
93
  return (l, n) => {
94
94
  var y;
95
- const d = resolveComponent("FmRadio"), g = resolveComponent("FmRadioGroup");
95
+ const m = resolveComponent("FmRadio"), g = resolveComponent("FmRadioGroup");
96
96
  return openBlock(), createElementBlock("div", _hoisted_1$g, [
97
97
  createVNode(g, {
98
- modelValue: unref(s),
98
+ modelValue: unref(i),
99
99
  "onUpdate:modelValue": [
100
- n[0] || (n[0] = (v) => isRef(s) ? s.value = v : null),
100
+ n[0] || (n[0] = (v) => isRef(i) ? i.value = v : null),
101
101
  n[1] || (n[1] = (v) => o(v))
102
102
  ]
103
103
  }, {
104
104
  default: withCtx(() => [
105
- createVNode(d, {
105
+ createVNode(m, {
106
106
  label: unref(a)("connect.template.rule.time.all_time"),
107
107
  value: "all_time"
108
108
  }, null, 8, ["label"]),
109
- createVNode(d, {
109
+ createVNode(m, {
110
110
  label: unref(a)("connect.template.rule.time.custom"),
111
111
  value: "custom"
112
112
  }, null, 8, ["label"])
113
113
  ]),
114
114
  _: 1
115
115
  }, 8, ["modelValue"]),
116
- unref(s) == "custom" ? (openBlock(), createBlock(_sfc_main$j, {
116
+ unref(i) == "custom" ? (openBlock(), createBlock(_sfc_main$j, {
117
117
  key: 0,
118
118
  class: "!mt-[0px]",
119
119
  "include-only": "trigger",
@@ -139,21 +139,21 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
139
139
  }
140
140
  },
141
141
  emits: ["update:model-value"],
142
- setup(e, { emit: c }) {
143
- const a = e, r = c, u = computed(() => {
144
- const { property: s, operator: o, equator: l } = RuleBuilder.simplify(
142
+ setup(e, { emit: d }) {
143
+ const a = e, s = d, u = computed(() => {
144
+ const { property: i, operator: o, equator: l } = RuleBuilder.simplify(
145
145
  a.modelValue ?? RuleBuilder.constructEntry("user.birthday", "_isDay", {
146
146
  op: "before",
147
147
  x: 1
148
148
  })
149
149
  );
150
150
  return {
151
- property: s,
151
+ property: i,
152
152
  operator: o,
153
153
  equator: l
154
154
  };
155
155
  });
156
- return (s, o) => {
156
+ return (i, o) => {
157
157
  const l = resolveComponent("FmRadio"), n = resolveComponent("FmStepperField");
158
158
  return openBlock(), createElementBlock("div", null, [
159
159
  createVNode(l, {
@@ -161,7 +161,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
161
161
  value: "_isRange-day",
162
162
  "model-value": `${unref(u).operator}-${unref(u).equator.unit}`,
163
163
  "onUpdate:modelValue": o[0] || (o[0] = () => {
164
- r(
164
+ s(
165
165
  "update:model-value",
166
166
  unref(RuleBuilder).constructEntry("user.birthday", "_isRange", {
167
167
  op: "this",
@@ -176,7 +176,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
176
176
  value: "_isDay",
177
177
  "model-value": unref(u).operator,
178
178
  "onUpdate:modelValue": o[1] || (o[1] = () => {
179
- r(
179
+ s(
180
180
  "update:model-value",
181
181
  unref(RuleBuilder).constructEntry("user.birthday", "_isDay", {
182
182
  op: "after",
@@ -191,11 +191,11 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
191
191
  label: "Days before birthday",
192
192
  "show-steppers": !1,
193
193
  "model-value": unref(u).equator.x,
194
- "onUpdate:modelValue": o[2] || (o[2] = (d) => r(
194
+ "onUpdate:modelValue": o[2] || (o[2] = (m) => s(
195
195
  "update:model-value",
196
196
  unref(RuleBuilder).constructEntry("user.birthday", "_isDay", {
197
197
  op: "after",
198
- x: d,
198
+ x: m,
199
199
  ignoreYear: !0
200
200
  })
201
201
  ))
@@ -205,7 +205,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
205
205
  value: "_isRange-week",
206
206
  "model-value": `${unref(u).operator}-${unref(u).equator.unit}`,
207
207
  "onUpdate:modelValue": o[3] || (o[3] = () => {
208
- r(
208
+ s(
209
209
  "update:model-value",
210
210
  unref(RuleBuilder).constructEntry("user.birthday", "_isRange", {
211
211
  op: "this",
@@ -220,7 +220,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
220
220
  value: "_isRange-month",
221
221
  "model-value": `${unref(u).operator}-${unref(u).equator.unit}`,
222
222
  "onUpdate:modelValue": o[4] || (o[4] = () => {
223
- r(
223
+ s(
224
224
  "update:model-value",
225
225
  unref(RuleBuilder).constructEntry("user.birthday", "_isRange", {
226
226
  op: "this",
@@ -233,7 +233,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
233
233
  ]);
234
234
  };
235
235
  }
236
- }), _hoisted_1$f = { class: "space-y-16" }, _hoisted_2$e = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Define the conditions that must be met to activate a reward. ", -1), _hoisted_3$c = { class: "grid grid-cols-3 gap-16" }, _hoisted_4$b = { class: "fm-typo-en-title-sm-800" }, _hoisted_5$6 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main$g = /* @__PURE__ */ defineComponent({
236
+ }), _hoisted_1$f = { class: "space-y-16" }, _hoisted_2$c = { class: "grid grid-cols-3 gap-16" }, _hoisted_3$a = { class: "fm-typo-en-title-sm-800" }, _hoisted_4$7 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main$g = /* @__PURE__ */ defineComponent({
237
237
  __name: "CampaignTriggerInput",
238
238
  props: {
239
239
  campaignType: {
@@ -249,15 +249,15 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
249
249
  }
250
250
  },
251
251
  emits: ["update:model-value"],
252
- setup(e, { emit: c }) {
253
- const a = e, r = c, u = computed(() => a.disabled ? TypeToTriggerOptions[a.campaignType].filter(
254
- (s) => s.value == a.modelValue
252
+ setup(e, { emit: d }) {
253
+ const a = e, s = d, u = computed(() => a.disabled ? TypeToTriggerOptions[a.campaignType].filter(
254
+ (i) => i.value == a.modelValue
255
255
  ) : TypeToTriggerOptions[a.campaignType]);
256
- return (s, o) => {
256
+ return (i, o) => {
257
257
  const l = resolveComponent("FmCard");
258
258
  return openBlock(), createElementBlock("div", _hoisted_1$f, [
259
- _hoisted_2$e,
260
- createElementVNode("div", _hoisted_3$c, [
259
+ o[0] || (o[0] = createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Define the conditions that must be met to activate a reward. ", -1)),
260
+ createElementVNode("div", _hoisted_2$c, [
261
261
  (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (n) => (openBlock(), createBlock(l, {
262
262
  variant: "outlined",
263
263
  disabled: a.disabled,
@@ -267,13 +267,13 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
267
267
  "hover:bg-fm-color-opacity-sm": e.modelValue != n.value
268
268
  }]),
269
269
  onClick: () => {
270
- a.modelValue != n.value && !a.disabled && r("update:model-value", n.value);
270
+ a.modelValue != n.value && !a.disabled && s("update:model-value", n.value);
271
271
  },
272
272
  key: n.name
273
273
  }, {
274
274
  default: withCtx(() => [
275
- createElementVNode("div", _hoisted_4$b, toDisplayString(n.name), 1),
276
- createElementVNode("div", _hoisted_5$6, toDisplayString(n.description), 1)
275
+ createElementVNode("div", _hoisted_3$a, toDisplayString(n.name), 1),
276
+ createElementVNode("div", _hoisted_4$7, toDisplayString(n.description), 1)
277
277
  ]),
278
278
  _: 2
279
279
  }, 1032, ["disabled", "class", "onClick"]))), 128))
@@ -294,10 +294,10 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
294
294
  }
295
295
  },
296
296
  emits: ["update:model-value"],
297
- setup(e, { emit: c }) {
298
- const a = c;
299
- return (r, u) => {
300
- const s = resolveComponent("FmButton"), o = resolveComponent("FmField"), l = resolveComponent("FmDatePicker");
297
+ setup(e, { emit: d }) {
298
+ const a = d;
299
+ return (s, u) => {
300
+ const i = resolveComponent("FmButton"), o = resolveComponent("FmField"), l = resolveComponent("FmDatePicker");
301
301
  return openBlock(), createBlock(l, {
302
302
  label: e.label,
303
303
  "model-value": e.modelValue || "",
@@ -310,11 +310,11 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
310
310
  "icon-outlined": !n
311
311
  }, {
312
312
  append: withCtx(() => [
313
- e.modelValue ? (openBlock(), createBlock(s, {
313
+ e.modelValue ? (openBlock(), createBlock(i, {
314
314
  key: 0,
315
315
  variant: "tertiary",
316
316
  icon: "clear",
317
- onClick: u[0] || (u[0] = (d) => (d.stopPropagation(), a("update:model-value", null)))
317
+ onClick: u[0] || (u[0] = (m) => (m.stopPropagation(), a("update:model-value", null)))
318
318
  })) : createCommentVNode("", !0)
319
319
  ]),
320
320
  default: withCtx(() => [
@@ -329,7 +329,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
329
329
  }, 8, ["label", "model-value"]);
330
330
  };
331
331
  }
332
- }), _hoisted_1$e = { class: "flex items-center gap-8 w-full xs:flex-col" }, _hoisted_2$d = { class: "flex-1 xs:w-full" }, _hoisted_3$b = /* @__PURE__ */ createElementVNode("div", { class: "mt-5 xs:hidden" }, "to", -1), _hoisted_4$a = { class: "flex-1 xs:w-full" }, _sfc_main$e = /* @__PURE__ */ defineComponent({
332
+ }), _hoisted_1$e = { class: "flex items-center gap-8 w-full xs:flex-col" }, _hoisted_2$b = { class: "flex-1 xs:w-full" }, _hoisted_3$9 = { class: "flex-1 xs:w-full" }, _sfc_main$e = /* @__PURE__ */ defineComponent({
333
333
  __name: "DateRangeInput",
334
334
  props: {
335
335
  modelValue: {
@@ -338,14 +338,14 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
338
338
  }
339
339
  },
340
340
  emits: ["update:model-value"],
341
- setup(e, { emit: c }) {
342
- const a = c;
343
- return (r, u) => {
344
- var s, o;
341
+ setup(e, { emit: d }) {
342
+ const a = d;
343
+ return (s, u) => {
344
+ var i, o;
345
345
  return openBlock(), createElementBlock("div", _hoisted_1$e, [
346
- createElementVNode("div", _hoisted_2$d, [
346
+ createElementVNode("div", _hoisted_2$b, [
347
347
  createVNode(_sfc_main$f, {
348
- "model-value": ((s = e.modelValue) == null ? void 0 : s.startDate) ?? null,
348
+ "model-value": ((i = e.modelValue) == null ? void 0 : i.startDate) ?? null,
349
349
  label: "Start date",
350
350
  "onUpdate:modelValue": u[0] || (u[0] = (l) => {
351
351
  var n;
@@ -356,8 +356,8 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
356
356
  })
357
357
  }, null, 8, ["model-value"])
358
358
  ]),
359
- _hoisted_3$b,
360
- createElementVNode("div", _hoisted_4$a, [
359
+ u[2] || (u[2] = createElementVNode("div", { class: "mt-5 xs:hidden" }, "to", -1)),
360
+ createElementVNode("div", _hoisted_3$9, [
361
361
  createVNode(_sfc_main$f, {
362
362
  "model-value": ((o = e.modelValue) == null ? void 0 : o.endDate) ?? null,
363
363
  label: "End date",
@@ -373,10 +373,10 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
373
373
  ]);
374
374
  };
375
375
  }
376
- }), _hoisted_1$d = { class: "space-y-8" }, _hoisted_2$c = { class: "grid grid-cols-2 gap-16" }, _hoisted_3$a = {
376
+ }), _hoisted_1$d = { class: "space-y-8" }, _hoisted_2$a = { class: "grid grid-cols-2 gap-16" }, _hoisted_3$8 = {
377
377
  key: 0,
378
378
  class: "space-y-4"
379
- }, _hoisted_4$9 = { class: "fm-typo-en-body-lg-400 class flex items-center justify-between" }, _hoisted_5$5 = /* @__PURE__ */ createElementVNode("div", null, "Notify date", -1), _hoisted_6$3 = { class: "text-ellipsis line-clamp-1" }, _sfc_main$d = /* @__PURE__ */ defineComponent({
379
+ }, _hoisted_4$6 = { class: "fm-typo-en-body-lg-400 class flex items-center justify-between" }, _hoisted_5$3 = { class: "text-ellipsis line-clamp-1" }, _sfc_main$d = /* @__PURE__ */ defineComponent({
380
380
  __name: "ScheduleRuleInput",
381
381
  props: {
382
382
  modelValue: {
@@ -391,19 +391,19 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
391
391
  }
392
392
  },
393
393
  emits: ["update:model-value"],
394
- setup(e, { emit: c }) {
395
- const a = e, r = c;
394
+ setup(e, { emit: d }) {
395
+ const a = e, s = d;
396
396
  function u() {
397
397
  const y = RuleBuilder.getRules(a.modelValue);
398
398
  return y.length == 0 ? "fixed" : y.some(
399
399
  (v) => isRuleEntry(v) && RuleBuilder.simplify(v).operator == "_rrule"
400
400
  ) ? "repeating" : "fixed";
401
401
  }
402
- const s = ref(u()), o = ref(!1), l = computed(() => {
402
+ const i = ref(u()), o = ref(!1), l = computed(() => {
403
403
  const y = RuleBuilder.getRules(a.modelValue), v = y.find(
404
- (p) => isRuleEntry(p) && RuleBuilder.simplify(p).property == "trigger.date"
404
+ (f) => isRuleEntry(f) && RuleBuilder.simplify(f).property == "trigger.date"
405
405
  ), h = y.find(
406
- (p) => isRuleEntry(p) && RuleBuilder.simplify(p).property == "trigger.time"
406
+ (f) => isRuleEntry(f) && RuleBuilder.simplify(f).property == "trigger.time"
407
407
  );
408
408
  return {
409
409
  date: v ? RuleBuilder.simplify(v).equator : null,
@@ -417,7 +417,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
417
417
  a.endDate ? new Date(a.endDate) : void 0
418
418
  )
419
419
  );
420
- function d(y) {
420
+ function m(y) {
421
421
  const v = y.label.toLowerCase(), h = v == "fixed" ? [
422
422
  RuleBuilder.constructEntry(
423
423
  "trigger.date",
@@ -433,16 +433,16 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
433
433
  ),
434
434
  RuleBuilder.constructEntry("trigger.time", "_isOnTime", "00:00")
435
435
  ];
436
- r(
436
+ s(
437
437
  "update:model-value",
438
438
  RuleBuilder.setRuleToGroup(
439
439
  RuleBuilder.scaffoldGroup("g_schedule"),
440
440
  h
441
441
  )
442
- ), s.value = v;
442
+ ), i.value = v;
443
443
  }
444
444
  function g(y) {
445
- s.value == "fixed" ? r(
445
+ i.value == "fixed" ? s(
446
446
  "update:model-value",
447
447
  RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup("g_schedule"), [
448
448
  RuleBuilder.constructEntry(
@@ -456,7 +456,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
456
456
  y.time
457
457
  )
458
458
  ])
459
- ) : r(
459
+ ) : s(
460
460
  "update:model-value",
461
461
  RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup("g_schedule"), [
462
462
  RuleBuilder.constructEntry(
@@ -473,33 +473,33 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
473
473
  );
474
474
  }
475
475
  return (y, v) => {
476
- const h = resolveComponent("FmButtonGroup"), p = resolveComponent("FmTimePicker"), i = resolveComponent("FmIcon"), f = resolveComponent("FmTooltip"), m = resolveComponent("FmField"), b = resolveComponent("FmCard"), x = resolveComponent("FmPopover"), k = resolveComponent("FmDatePicker"), C = resolveComponent("FmHelperText");
476
+ const h = resolveComponent("FmButtonGroup"), f = resolveComponent("FmTimePicker"), r = resolveComponent("FmIcon"), c = resolveComponent("FmTooltip"), p = resolveComponent("FmField"), b = resolveComponent("FmCard"), x = resolveComponent("FmPopover"), k = resolveComponent("FmDatePicker"), C = resolveComponent("FmHelperText");
477
477
  return openBlock(), createElementBlock(Fragment, null, [
478
478
  createVNode(h, {
479
479
  items: [{ label: "Fixed" }, { label: "Repeating" }],
480
- "model-value": { label: unref(cases).title(unref(s)) },
481
- "onUpdate:modelValue": d,
480
+ "model-value": { label: unref(cases).title(unref(i)) },
481
+ "onUpdate:modelValue": m,
482
482
  class: "mb-8"
483
483
  }, null, 8, ["model-value"]),
484
484
  createElementVNode("div", _hoisted_1$d, [
485
- createElementVNode("div", _hoisted_2$c, [
486
- createVNode(p, {
485
+ createElementVNode("div", _hoisted_2$a, [
486
+ createVNode(f, {
487
487
  label: "Notify time",
488
488
  "model-value": unref(l).time,
489
489
  "onUpdate:modelValue": v[0] || (v[0] = (B) => g({ date: unref(l).date, time: B })),
490
490
  "helper-text": unref(l).time ? void 0 : "Time is required",
491
491
  "helper-state": unref(l).time ? void 0 : "error"
492
492
  }, null, 8, ["model-value", "helper-text", "helper-state"]),
493
- unref(s) == "repeating" ? (openBlock(), createElementBlock("div", _hoisted_3$a, [
494
- createElementVNode("div", _hoisted_4$9, [
495
- _hoisted_5$5,
496
- unref(l).date ? (openBlock(), createBlock(f, {
493
+ unref(i) == "repeating" ? (openBlock(), createElementBlock("div", _hoisted_3$8, [
494
+ createElementVNode("div", _hoisted_4$6, [
495
+ v[5] || (v[5] = createElementVNode("div", null, "Notify date", -1)),
496
+ unref(l).date ? (openBlock(), createBlock(c, {
497
497
  key: 0,
498
498
  "z-index": 9999,
499
499
  content: unref(SummarizeRrule)(unref(RRule).fromString(unref(l).date).options)
500
500
  }, {
501
501
  default: withCtx(() => [
502
- createVNode(i, {
502
+ createVNode(r, {
503
503
  name: "info",
504
504
  size: "sm",
505
505
  outline: !0
@@ -513,13 +513,13 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
513
513
  onPopoverChanged: v[3] || (v[3] = (B) => o.value = B)
514
514
  }, {
515
515
  "popover-button": withCtx(() => [
516
- createVNode(m, {
516
+ createVNode(p, {
517
517
  class: "cursor-pointer",
518
518
  "helper-text": unref(l).date ? void 0 : "Date is required",
519
519
  "helper-state": unref(l).date ? void 0 : "error"
520
520
  }, {
521
521
  default: withCtx(() => [
522
- createElementVNode("div", _hoisted_6$3, toDisplayString(unref(l).date ? unref(SummarizeRrule)(unref(RRule).fromString(unref(l).date).options) : "Set a repeating date"), 1)
522
+ createElementVNode("div", _hoisted_5$3, toDisplayString(unref(l).date ? unref(SummarizeRrule)(unref(RRule).fromString(unref(l).date).options) : "Set a repeating date"), 1)
523
523
  ]),
524
524
  _: 1
525
525
  }, 8, ["helper-text", "helper-state"])
@@ -557,7 +557,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
557
557
  ], 64);
558
558
  };
559
559
  }
560
- }), _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$b = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Select a game where you want your customer to play. ", -1), _hoisted_3$9 = { class: "grid grid-cols-2 gap-16" }, _hoisted_4$8 = { class: "fm-typo-en-title-sm-800" }, _hoisted_5$4 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main$c = /* @__PURE__ */ defineComponent({
560
+ }), _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "grid grid-cols-2 gap-16" }, _hoisted_3$7 = { class: "fm-typo-en-title-sm-800" }, _hoisted_4$5 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main$c = /* @__PURE__ */ defineComponent({
561
561
  __name: "GameTypeInput",
562
562
  props: {
563
563
  modelValue: {
@@ -565,8 +565,8 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
565
565
  }
566
566
  },
567
567
  emits: ["update:model-value"],
568
- setup(e, { emit: c }) {
569
- const a = e, r = c, u = computed(
568
+ setup(e, { emit: d }) {
569
+ const a = e, s = d, u = computed(
570
570
  () => [
571
571
  {
572
572
  label: "Fortune Wheel",
@@ -580,13 +580,13 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
580
580
  value: F_GAME_TYPE.enum.ROCK_PAPER_SCISSORS,
581
581
  hidden: !0
582
582
  }
583
- ].filter((s) => !s.hidden)
583
+ ].filter((i) => !i.hidden)
584
584
  );
585
- return (s, o) => {
585
+ return (i, o) => {
586
586
  const l = resolveComponent("FmCard");
587
587
  return openBlock(), createElementBlock("div", _hoisted_1$c, [
588
- _hoisted_2$b,
589
- createElementVNode("div", _hoisted_3$9, [
588
+ o[0] || (o[0] = createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Select a game where you want your customer to play. ", -1)),
589
+ createElementVNode("div", _hoisted_2$9, [
590
590
  (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (n) => (openBlock(), createBlock(l, {
591
591
  variant: "outlined",
592
592
  class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
@@ -595,13 +595,13 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
595
595
  "hover:bg-fm-color-opacity-sm": e.modelValue != n.value
596
596
  }]),
597
597
  onClick: () => {
598
- a.modelValue != n.value && r("update:model-value", n.value);
598
+ a.modelValue != n.value && s("update:model-value", n.value);
599
599
  },
600
600
  key: n.value
601
601
  }, {
602
602
  default: withCtx(() => [
603
- createElementVNode("div", _hoisted_4$8, toDisplayString(n.label), 1),
604
- createElementVNode("div", _hoisted_5$4, toDisplayString(n.description), 1)
603
+ createElementVNode("div", _hoisted_3$7, toDisplayString(n.label), 1),
604
+ createElementVNode("div", _hoisted_4$5, toDisplayString(n.description), 1)
605
605
  ]),
606
606
  _: 2
607
607
  }, 1032, ["class", "onClick"]))), 128))
@@ -612,32 +612,32 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
612
612
  }), _hoisted_1$b = {
613
613
  key: 0,
614
614
  class: "flex flex-col gap-y-24"
615
- }, _hoisted_2$a = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1), _hoisted_3$8 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Validity option", -1), _hoisted_4$7 = { class: "flex gap-8 items-center justify-start" }, _sfc_main$b = /* @__PURE__ */ defineComponent({
615
+ }, _hoisted_2$8 = { class: "flex gap-8 items-center justify-start" }, _sfc_main$b = /* @__PURE__ */ defineComponent({
616
616
  __name: "EditRewardPoolSheet",
617
617
  emits: ["update:model-value"],
618
- setup(e, { expose: c, emit: a }) {
619
- const r = useMembershipStore(), { minor: u } = useLoading, s = ref(!1), o = ref(), l = ref(), n = ref(0), d = computed(() => {
620
- var i;
621
- return ((i = r.loyaltyRewards.items.find(
622
- (f) => {
623
- var m;
624
- return f.value === ((m = o.value) == null ? void 0 : m.collectible);
618
+ setup(e, { expose: d, emit: a }) {
619
+ const s = useMembershipStore(), { minor: u } = useLoading, i = ref(!1), o = ref(), l = ref(), n = ref(0), m = computed(() => {
620
+ var r;
621
+ return ((r = s.loyaltyRewards.items.find(
622
+ (c) => {
623
+ var p;
624
+ return c.value === ((p = o.value) == null ? void 0 : p.collectible);
625
625
  }
626
- )) == null ? void 0 : i.raw.type) === "CREDIT" ? FdoCreditLoyaltyReward : FdtoRandomReward;
626
+ )) == null ? void 0 : r.raw.type) === "CREDIT" ? FdoCreditLoyaltyReward : FdtoRandomReward;
627
627
  }), g = computed(() => {
628
- const p = d.value.safeParse(o.value);
629
- return p.success ? [] : p.error.errors;
628
+ const f = m.value.safeParse(o.value);
629
+ return f.success ? [] : f.error.errors;
630
630
  });
631
- function y(p, i, f) {
632
- p && (o.value = i, n.value = f), s.value = p;
631
+ function y(f, r, c) {
632
+ f && (o.value = r, n.value = c), i.value = f;
633
633
  }
634
634
  const v = a;
635
635
  async function h() {
636
- const p = d.value.safeParse(o.value);
637
- p.success && (await u(
636
+ const f = m.value.safeParse(o.value);
637
+ f.success && (await u(
638
638
  async () => {
639
- p.data.type === "VOUCHER" && l.value && (p.data.collectibleConfig.image = await firebaseStorage.update(
640
- p.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, l.value),
639
+ f.data.type === "VOUCHER" && l.value && (f.data.collectibleConfig.image = await firebaseStorage.update(
640
+ f.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, l.value),
641
641
  l.value
642
642
  ));
643
643
  },
@@ -645,36 +645,36 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
645
645
  message: "Uploading reward image",
646
646
  successMessage: "Reward image updated"
647
647
  }
648
- ), v("update:model-value", p.data, n.value));
648
+ ), v("update:model-value", f.data, n.value));
649
649
  }
650
- return c({
650
+ return d({
651
651
  showSheet: y
652
- }), (p, i) => {
653
- const f = resolveComponent("FmSelect"), m = resolveComponent("FmStepperField"), b = resolveComponent("FmButton"), x = resolveComponent("FmSideSheet");
652
+ }), (f, r) => {
653
+ const c = resolveComponent("FmSelect"), p = resolveComponent("FmStepperField"), b = resolveComponent("FmButton"), x = resolveComponent("FmSideSheet");
654
654
  return openBlock(), createBlock(x, {
655
655
  "max-width": 560,
656
- modelValue: unref(s),
656
+ modelValue: unref(i),
657
657
  "onUpdate:modelValue": [
658
- i[9] || (i[9] = (k) => isRef(s) ? s.value = k : null),
659
- i[10] || (i[10] = (k) => s.value = k)
658
+ r[9] || (r[9] = (k) => isRef(i) ? i.value = k : null),
659
+ r[10] || (r[10] = (k) => i.value = k)
660
660
  ],
661
661
  header: "Edit reward",
662
662
  "dismiss-away": ""
663
663
  }, {
664
664
  "side-sheet-footer": withCtx(() => [
665
- createElementVNode("div", _hoisted_4$7, [
665
+ createElementVNode("div", _hoisted_2$8, [
666
666
  createVNode(b, {
667
667
  variant: "primary",
668
668
  type: "button",
669
669
  disabled: unref(g).length > 0,
670
670
  label: "Confirm",
671
- onClick: i[7] || (i[7] = (k) => h())
671
+ onClick: r[7] || (r[7] = (k) => h())
672
672
  }, null, 8, ["disabled"]),
673
673
  createVNode(b, {
674
674
  variant: "secondary",
675
675
  type: "button",
676
676
  label: "Cancel",
677
- onClick: i[8] || (i[8] = (k) => s.value = !1)
677
+ onClick: r[8] || (r[8] = (k) => i.value = !1)
678
678
  })
679
679
  ])
680
680
  ]),
@@ -682,7 +682,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
682
682
  var k, C, B;
683
683
  return [
684
684
  unref(o) ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
685
- createVNode(f, {
685
+ createVNode(c, {
686
686
  label: "Reward Type",
687
687
  items: [
688
688
  { label: "No Reward", value: "NO_REWARD" },
@@ -690,7 +690,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
690
690
  { label: "Loyalty", value: "LOYALTY" }
691
691
  ],
692
692
  "model-value": unref(o).type,
693
- "onUpdate:modelValue": i[0] || (i[0] = (V) => {
693
+ "onUpdate:modelValue": r[0] || (r[0] = (V) => {
694
694
  V == "NO_REWARD" ? o.value = {
695
695
  type: "NO_REWARD",
696
696
  collectible: null,
@@ -710,7 +710,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
710
710
  },
711
711
  weight: 1
712
712
  } : o.value = {
713
- collectible: unref(r).loyaltyRewards.raw[0]._id,
713
+ collectible: unref(s).loyaltyRewards.raw[0]._id,
714
714
  type: "LOYALTY",
715
715
  earningOption: {
716
716
  amount: 1,
@@ -723,59 +723,59 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
723
723
  };
724
724
  })
725
725
  }, null, 8, ["model-value"]),
726
- unref(o).type == "LOYALTY" ? (openBlock(), createBlock(f, {
726
+ unref(o).type == "LOYALTY" ? (openBlock(), createBlock(c, {
727
727
  key: 0,
728
728
  label: "Loyalty type",
729
- rules: [unref(ZodHelper).ruleAtPath(unref(d), "collectible", [unref(o).type])],
730
- items: unref(r).loyaltyRewards.items,
729
+ rules: [unref(ZodHelper).ruleAtPath(unref(m), "collectible", [unref(o).type])],
730
+ items: unref(s).loyaltyRewards.items,
731
731
  "model-value": unref(o).collectible,
732
- "onUpdate:modelValue": i[1] || (i[1] = (V) => unref(o).collectible = V)
732
+ "onUpdate:modelValue": r[1] || (r[1] = (V) => unref(o).collectible = V)
733
733
  }, null, 8, ["rules", "items", "model-value"])) : createCommentVNode("", !0),
734
- createVNode(m, {
734
+ createVNode(p, {
735
735
  label: "Weight",
736
- rules: [unref(ZodHelper).ruleAtPath(unref(d), "weight", [unref(o).type])],
736
+ rules: [unref(ZodHelper).ruleAtPath(unref(m), "weight", [unref(o).type])],
737
737
  "model-value": unref(o).weight,
738
- "onUpdate:modelValue": i[2] || (i[2] = (V) => o.value = {
738
+ "onUpdate:modelValue": r[2] || (r[2] = (V) => o.value = {
739
739
  ...unref(o),
740
740
  weight: V
741
741
  })
742
742
  }, null, 8, ["rules", "model-value"]),
743
743
  unref(o).type === "LOYALTY" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
744
- ((k = unref(r).loyaltyRewards.items.find(
744
+ ((k = unref(s).loyaltyRewards.items.find(
745
745
  (V) => {
746
746
  var R;
747
747
  return V.value === ((R = unref(o)) == null ? void 0 : R.collectible);
748
748
  }
749
749
  )) == null ? void 0 : k.raw.type) !== "TITLE" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
750
- _hoisted_2$a,
750
+ r[11] || (r[11] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1)),
751
751
  createVNode(_sfc_main$l, {
752
752
  class: "mt-[-8px]",
753
753
  rules: [
754
- unref(ZodHelper).ruleAtPath(unref(d), "earningOption", [unref(o).type])
754
+ unref(ZodHelper).ruleAtPath(unref(m), "earningOption", [unref(o).type])
755
755
  ],
756
756
  "helper-state": unref(ZodHelper).helperState(unref(g), "earningOption"),
757
757
  "error-text": unref(ZodHelper).helperText(unref(g), "earningOption"),
758
758
  "fixed-type": !0,
759
759
  "model-value": unref(o).earningOption,
760
- "onUpdate:modelValue": i[3] || (i[3] = (V) => o.value = {
760
+ "onUpdate:modelValue": r[3] || (r[3] = (V) => o.value = {
761
761
  ...unref(o),
762
762
  earningOption: V
763
763
  })
764
764
  }, null, 8, ["rules", "helper-state", "error-text", "model-value"])
765
765
  ], 64)) : createCommentVNode("", !0),
766
- _hoisted_3$8,
766
+ r[12] || (r[12] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Validity option", -1)),
767
767
  createVNode(_sfc_main$m, {
768
768
  type: unref(o).type === "LOYALTY" ? "custom" : "range",
769
- "for-credit": unref(o).type === "LOYALTY" && ((C = unref(r).loyaltyRewards.items.find(
769
+ "for-credit": unref(o).type === "LOYALTY" && ((C = unref(s).loyaltyRewards.items.find(
770
770
  (V) => {
771
771
  var R;
772
772
  return V.value === ((R = unref(o)) == null ? void 0 : R.collectible);
773
773
  }
774
774
  )) == null ? void 0 : C.raw.type) === "CREDIT",
775
775
  class: "!gap-24",
776
- rules: [unref(ZodHelper).ruleAtPath(unref(d), "validityOption", [unref(o).type])],
776
+ rules: [unref(ZodHelper).ruleAtPath(unref(m), "validityOption", [unref(o).type])],
777
777
  "model-value": unref(o).validityOption,
778
- "onUpdate:modelValue": i[4] || (i[4] = (V) => o.value = {
778
+ "onUpdate:modelValue": r[4] || (r[4] = (V) => o.value = {
779
779
  ...unref(o),
780
780
  validityOption: V
781
781
  })
@@ -785,11 +785,11 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
785
785
  key: 2,
786
786
  "reward-image": unref(l),
787
787
  "model-value": ((B = unref(o)) == null ? void 0 : B.collectibleConfig) ?? void 0,
788
- "onUpdate:modelValue": i[5] || (i[5] = (V) => o.value = {
788
+ "onUpdate:modelValue": r[5] || (r[5] = (V) => o.value = {
789
789
  ...unref(o),
790
790
  collectibleConfig: V
791
791
  }),
792
- "onUpdate:rewardImage": i[6] || (i[6] = (V) => l.value = V)
792
+ "onUpdate:rewardImage": r[6] || (r[6] = (V) => l.value = V)
793
793
  }, null, 8, ["reward-image", "model-value"])) : createCommentVNode("", !0),
794
794
  createVNode(JsonViewer, { json: unref(g) }, null, 8, ["json"])
795
795
  ])) : createCommentVNode("", !0)
@@ -803,7 +803,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
803
803
  function isNullOrEmpty(e) {
804
804
  return e == null || e === "";
805
805
  }
806
- const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Configure the reward type and weightage given to your customer. ", -1), _hoisted_3$7 = { class: "fm-typo-en-body-lg-400" }, _hoisted_4$6 = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _sfc_main$a = /* @__PURE__ */ defineComponent({
806
+ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-en-body-lg-400" }, _hoisted_3$6 = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _sfc_main$a = /* @__PURE__ */ defineComponent({
807
807
  __name: "RewardPoolInput",
808
808
  props: {
809
809
  modelValue: {
@@ -818,37 +818,37 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
818
818
  }
819
819
  },
820
820
  emits: ["update:model-value"],
821
- setup(e, { emit: c }) {
822
- const a = e, r = c, u = useMembershipStore(), s = z.array(z.lazy(() => FdtoRandomReward)).min(1, "Requires at least 1 reward"), o = computed(() => a.modelValue ?? []), l = computed(() => {
823
- const p = s.safeParse(o.value);
824
- return p.success ? [] : p.error.errors;
821
+ setup(e, { emit: d }) {
822
+ const a = e, s = d, u = useMembershipStore(), i = z.array(z.lazy(() => FdtoRandomReward)).min(1, "Requires at least 1 reward"), o = computed(() => a.modelValue ?? []), l = computed(() => {
823
+ const f = i.safeParse(o.value);
824
+ return f.success ? [] : f.error.errors;
825
825
  }), n = ref();
826
- function d(p, i) {
827
- var m;
828
- const f = [...o.value];
829
- f[i] = p, (m = n.value) == null || m.showSheet(!1), r("update:model-value", f);
826
+ function m(f, r) {
827
+ var p;
828
+ const c = [...o.value];
829
+ c[r] = f, (p = n.value) == null || p.showSheet(!1), s("update:model-value", c);
830
830
  }
831
- function g(p) {
832
- const i = p.type == "VOUCHER" ? p.collectibleConfig : u.collectibles.find(
833
- (b) => b._id.toString() == p.collectible
834
- ), f = CollectionUtils.formattedType((i == null ? void 0 : i.name) || ""), m = p.weight;
831
+ function g(f) {
832
+ const r = f.type == "VOUCHER" ? f.collectibleConfig : u.collectibles.find(
833
+ (b) => b._id.toString() == f.collectible
834
+ ), c = CollectionUtils.formattedType((r == null ? void 0 : r.name) || ""), p = f.weight;
835
835
  return {
836
- label: isNullOrEmpty(f) ? "NO REWARD" : f,
837
- sublabel: `${m} (${(m / o.value.reduce((b, x) => b + x.weight, 0) * 100).toFixed(2)}%)`
836
+ label: isNullOrEmpty(c) ? "NO REWARD" : c,
837
+ sublabel: `${p} (${(p / o.value.reduce((b, x) => b + x.weight, 0) * 100).toFixed(2)}%)`
838
838
  };
839
839
  }
840
- function y(p) {
841
- var f;
842
- const i = [...o.value];
843
- (f = n.value) == null || f.showSheet(!0, i[p], p);
840
+ function y(f) {
841
+ var c;
842
+ const r = [...o.value];
843
+ (c = n.value) == null || c.showSheet(!0, r[f], f);
844
844
  }
845
- function v(p) {
846
- const i = [...o.value];
847
- i.splice(p, 1), r("update:model-value", i);
845
+ function v(f) {
846
+ const r = [...o.value];
847
+ r.splice(f, 1), s("update:model-value", r);
848
848
  }
849
849
  function h() {
850
- var p;
851
- (p = n.value) == null || p.showSheet(
850
+ var f;
851
+ (f = n.value) == null || f.showSheet(
852
852
  !0,
853
853
  {
854
854
  type: "NO_REWARD",
@@ -858,17 +858,17 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
858
858
  o.value.length
859
859
  );
860
860
  }
861
- return (p, i) => {
862
- const f = resolveComponent("FmButton"), m = resolveComponent("FmCard"), b = resolveComponent("FmHelperText");
861
+ return (f, r) => {
862
+ const c = resolveComponent("FmButton"), p = resolveComponent("FmCard"), b = resolveComponent("FmHelperText");
863
863
  return openBlock(), createElementBlock("div", _hoisted_1$a, [
864
- _hoisted_2$9,
865
- createVNode(f, {
864
+ r[1] || (r[1] = createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Configure the reward type and weightage given to your customer. ", -1)),
865
+ createVNode(c, {
866
866
  label: "Add Reward",
867
- onClick: i[0] || (i[0] = (x) => h()),
867
+ onClick: r[0] || (r[0] = (x) => h()),
868
868
  variant: "plain",
869
869
  icon: "add"
870
870
  }),
871
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(o), (x, k) => (openBlock(), createBlock(m, {
871
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(o), (x, k) => (openBlock(), createBlock(p, {
872
872
  key: k,
873
873
  class: "px-16 py-12 flex items-center justify-between cursor-pointer",
874
874
  variant: "outlined",
@@ -878,10 +878,10 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
878
878
  var C;
879
879
  return [
880
880
  createElementVNode("div", null, [
881
- createElementVNode("div", _hoisted_3$7, toDisplayString(x.type == "LOYALTY" ? (C = x == null ? void 0 : x.earningOption) == null ? void 0 : C.amount : "") + " " + toDisplayString(g(x).label), 1),
882
- createElementVNode("div", _hoisted_4$6, toDisplayString(g(x).sublabel), 1)
881
+ createElementVNode("div", _hoisted_2$7, toDisplayString(x.type == "LOYALTY" ? (C = x == null ? void 0 : x.earningOption) == null ? void 0 : C.amount : "") + " " + toDisplayString(g(x).label), 1),
882
+ createElementVNode("div", _hoisted_3$6, toDisplayString(g(x).sublabel), 1)
883
883
  ]),
884
- createVNode(f, {
884
+ createVNode(c, {
885
885
  icon: "delete",
886
886
  variant: "tertiary",
887
887
  onClick: (B) => (B.stopPropagation(), v(k))
@@ -898,15 +898,15 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
898
898
  createVNode(_sfc_main$b, {
899
899
  ref_key: "sheetRef",
900
900
  ref: n,
901
- "onUpdate:modelValue": d
901
+ "onUpdate:modelValue": m
902
902
  }, null, 512)
903
903
  ]);
904
904
  };
905
905
  }
906
- }), _hoisted_1$9 = { class: "space-y-16" }, _hoisted_2$8 = {
906
+ }), _hoisted_1$9 = { class: "space-y-16" }, _hoisted_2$6 = {
907
907
  key: 0,
908
908
  class: "grid grid-cols-2 gap-16"
909
- }, _hoisted_3$6 = { class: "fm-typo-en-title-sm-800" }, _hoisted_4$5 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main$9 = /* @__PURE__ */ defineComponent({
909
+ }, _hoisted_3$5 = { class: "fm-typo-en-title-sm-800" }, _hoisted_4$4 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main$9 = /* @__PURE__ */ defineComponent({
910
910
  __name: "PromotionGameTypeInput",
911
911
  props: {
912
912
  modelValue: {
@@ -914,48 +914,48 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
914
914
  }
915
915
  },
916
916
  emits: ["update:model-value"],
917
- setup(e, { emit: c }) {
918
- const a = e, r = c, u = computed(() => [
917
+ setup(e, { emit: d }) {
918
+ const a = e, s = d, u = computed(() => [
919
919
  {
920
920
  label: "Rock paper scissor",
921
921
  description: "Customers play 3 rounds of Rock Paper Scissors against the cashier. If customer won 2 rounds, they will get a discount.",
922
922
  value: F_GAME_TYPE.enum.ROCK_PAPER_SCISSORS
923
923
  }
924
924
  ]);
925
- return (s, o) => {
925
+ return (i, o) => {
926
926
  var g, y, v;
927
- const l = resolveComponent("FmSwitch"), n = resolveComponent("FmCard"), d = resolveComponent("FmHelperText");
927
+ const l = resolveComponent("FmSwitch"), n = resolveComponent("FmCard"), m = resolveComponent("FmHelperText");
928
928
  return openBlock(), createElementBlock("div", _hoisted_1$9, [
929
929
  createVNode(l, {
930
930
  label: "Enable game",
931
931
  "model-value": !!((g = e.modelValue) != null && g.gameType),
932
- "onUpdate:modelValue": o[0] || (o[0] = (h) => h ? r("update:model-value", { gameType: "ROCK_PAPER_SCISSORS" }) : r("update:model-value", null))
932
+ "onUpdate:modelValue": o[0] || (o[0] = (h) => h ? s("update:model-value", { gameType: "ROCK_PAPER_SCISSORS" }) : s("update:model-value", null))
933
933
  }, null, 8, ["model-value"]),
934
- ((y = e.modelValue) == null ? void 0 : y.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
934
+ ((y = e.modelValue) == null ? void 0 : y.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createElementBlock("div", _hoisted_2$6, [
935
935
  (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (h) => {
936
- var p, i;
936
+ var f, r;
937
937
  return openBlock(), createBlock(n, {
938
938
  variant: "outlined",
939
939
  class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
940
940
  "col-span-2": unref(u).length == 1,
941
- "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((p = e.modelValue) == null ? void 0 : p.gameType) == h.value,
942
- "hover:bg-fm-color-opacity-sm": ((i = e.modelValue) == null ? void 0 : i.gameType) != h.value
941
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((f = e.modelValue) == null ? void 0 : f.gameType) == h.value,
942
+ "hover:bg-fm-color-opacity-sm": ((r = e.modelValue) == null ? void 0 : r.gameType) != h.value
943
943
  }]),
944
944
  onClick: () => {
945
- var f;
946
- ((f = a.modelValue) == null ? void 0 : f.gameType) != h.value && r("update:model-value", { gameType: h.value });
945
+ var c;
946
+ ((c = a.modelValue) == null ? void 0 : c.gameType) != h.value && s("update:model-value", { gameType: h.value });
947
947
  },
948
948
  key: h.value
949
949
  }, {
950
950
  default: withCtx(() => [
951
- createElementVNode("div", _hoisted_3$6, toDisplayString(h.label), 1),
952
- createElementVNode("div", _hoisted_4$5, toDisplayString(h.description), 1)
951
+ createElementVNode("div", _hoisted_3$5, toDisplayString(h.label), 1),
952
+ createElementVNode("div", _hoisted_4$4, toDisplayString(h.description), 1)
953
953
  ]),
954
954
  _: 2
955
955
  }, 1032, ["class", "onClick"]);
956
956
  }), 128))
957
957
  ])) : createCommentVNode("", !0),
958
- ((v = e.modelValue) == null ? void 0 : v.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createBlock(d, {
958
+ ((v = e.modelValue) == null ? void 0 : v.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createBlock(m, {
959
959
  key: 1,
960
960
  text: "Rock paper scissors is only available for POS >= 7.7.4 with dual screen on android devices (Sunmi D3 Pro and Sunmi T3 Pro)",
961
961
  state: "warning"
@@ -963,7 +963,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
963
963
  ]);
964
964
  };
965
965
  }
966
- }), _hoisted_1$8 = { class: "space-y-16" }, _hoisted_2$7 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Select a game where you want your customer to play. ", -1), _hoisted_3$5 = { class: "grid grid-cols-2 gap-16" }, _hoisted_4$4 = { class: "fm-typo-en-title-sm-800" }, _hoisted_5$3 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main$8 = /* @__PURE__ */ defineComponent({
966
+ }), _hoisted_1$8 = { class: "space-y-16" }, _hoisted_2$5 = { class: "grid grid-cols-2 gap-16" }, _hoisted_3$4 = { class: "fm-typo-en-title-sm-800" }, _hoisted_4$3 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main$8 = /* @__PURE__ */ defineComponent({
967
967
  __name: "MissionTypeInput",
968
968
  props: {
969
969
  modelValue: {
@@ -971,8 +971,8 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
971
971
  }
972
972
  },
973
973
  emits: ["update:model-value"],
974
- setup(e, { emit: c }) {
975
- const a = e, r = c, u = computed(() => [
974
+ setup(e, { emit: d }) {
975
+ const a = e, s = d, u = computed(() => [
976
976
  {
977
977
  label: "Stamp",
978
978
  description: "Award stamps for purchases, redeemable after reaching set milestones.",
@@ -984,11 +984,11 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
984
984
  value: F_MISSION_TYPE.enum.PROGRESSIVE
985
985
  }
986
986
  ]);
987
- return (s, o) => {
987
+ return (i, o) => {
988
988
  const l = resolveComponent("FmCard");
989
989
  return openBlock(), createElementBlock("div", _hoisted_1$8, [
990
- _hoisted_2$7,
991
- createElementVNode("div", _hoisted_3$5, [
990
+ o[0] || (o[0] = createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Select a game where you want your customer to play. ", -1)),
991
+ createElementVNode("div", _hoisted_2$5, [
992
992
  (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (n) => (openBlock(), createBlock(l, {
993
993
  variant: "outlined",
994
994
  class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
@@ -997,13 +997,13 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
997
997
  "hover:bg-fm-color-opacity-sm": e.modelValue != n.value
998
998
  }]),
999
999
  onClick: () => {
1000
- a.modelValue != n.value && r("update:model-value", n.value);
1000
+ a.modelValue != n.value && s("update:model-value", n.value);
1001
1001
  },
1002
1002
  key: n.value
1003
1003
  }, {
1004
1004
  default: withCtx(() => [
1005
- createElementVNode("div", _hoisted_4$4, toDisplayString(n.label), 1),
1006
- createElementVNode("div", _hoisted_5$3, toDisplayString(n.description), 1)
1005
+ createElementVNode("div", _hoisted_3$4, toDisplayString(n.label), 1),
1006
+ createElementVNode("div", _hoisted_4$3, toDisplayString(n.description), 1)
1007
1007
  ]),
1008
1008
  _: 2
1009
1009
  }, 1032, ["class", "onClick"]))), 128))
@@ -1011,7 +1011,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
1011
1011
  ]);
1012
1012
  };
1013
1013
  }
1014
- }), _hoisted_1$7 = { class: "space-y-16" }, _hoisted_2$6 = /* @__PURE__ */ 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), _sfc_main$7 = /* @__PURE__ */ defineComponent({
1014
+ }), _hoisted_1$7 = { class: "space-y-16" }, _sfc_main$7 = /* @__PURE__ */ defineComponent({
1015
1015
  __name: "MissionEndInput",
1016
1016
  props: {
1017
1017
  modelValue: {
@@ -1025,13 +1025,13 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
1025
1025
  }
1026
1026
  },
1027
1027
  emits: ["update:model-value"],
1028
- setup(e, { emit: c }) {
1029
- const a = c;
1030
- return (r, u) => {
1031
- const s = resolveComponent("FmStepperField");
1028
+ setup(e, { emit: d }) {
1029
+ const a = d;
1030
+ return (s, u) => {
1031
+ const i = resolveComponent("FmStepperField");
1032
1032
  return openBlock(), createElementBlock("div", _hoisted_1$7, [
1033
- _hoisted_2$6,
1034
- createVNode(s, {
1033
+ u[1] || (u[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)),
1034
+ createVNode(i, {
1035
1035
  label: "Maximum to collect",
1036
1036
  "model-value": e.modelValue || null,
1037
1037
  "onUpdate:modelValue": u[0] || (u[0] = (o) => a("update:model-value", o)),
@@ -1041,7 +1041,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
1041
1041
  ]);
1042
1042
  };
1043
1043
  }
1044
- }), _hoisted_1$6 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1), _hoisted_2$5 = { class: "flex gap-8 items-center justify-start" }, _sfc_main$6 = /* @__PURE__ */ defineComponent({
1044
+ }), _hoisted_1$6 = { class: "flex gap-8 items-center justify-start" }, _sfc_main$6 = /* @__PURE__ */ defineComponent({
1045
1045
  __name: "EditMissionPoolSheet",
1046
1046
  props: {
1047
1047
  maxThreshold: {
@@ -1050,29 +1050,29 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
1050
1050
  }
1051
1051
  },
1052
1052
  emits: ["update:model-value"],
1053
- setup(e, { expose: c, emit: a }) {
1054
- const r = e, u = useMembershipStore(), { minor: s } = useLoading, o = ref(!1), l = ref(), n = ref(), d = ref(0), g = computed(() => {
1055
- var m;
1056
- return ((m = u.loyaltyRewards.items.find(
1053
+ setup(e, { expose: d, emit: a }) {
1054
+ const s = e, u = useMembershipStore(), { minor: i } = useLoading, o = ref(!1), l = ref(), n = ref(), m = ref(0), g = computed(() => {
1055
+ var p;
1056
+ return ((p = u.loyaltyRewards.items.find(
1057
1057
  (b) => {
1058
1058
  var x;
1059
1059
  return b.value === ((x = l.value) == null ? void 0 : x.collectible);
1060
1060
  }
1061
- )) == null ? void 0 : m.raw.type) === "CREDIT" ? FdoThresholdCreditReward : FdtoThresholdReward;
1061
+ )) == null ? void 0 : p.raw.type) === "CREDIT" ? FdoThresholdCreditReward : FdtoThresholdReward;
1062
1062
  }), y = computed(() => {
1063
- const f = g.value.safeParse(l.value);
1064
- return f.success ? [] : f.error.errors;
1063
+ const c = g.value.safeParse(l.value);
1064
+ return c.success ? [] : c.error.errors;
1065
1065
  });
1066
- function v(f, m, b) {
1067
- f && (l.value = m, d.value = b), o.value = f;
1066
+ function v(c, p, b) {
1067
+ c && (l.value = p, m.value = b), o.value = c;
1068
1068
  }
1069
1069
  const h = a;
1070
- async function p() {
1071
- const f = g.value.safeParse(l.value);
1072
- f.success && (await s(
1070
+ async function f() {
1071
+ const c = g.value.safeParse(l.value);
1072
+ c.success && (await i(
1073
1073
  async () => {
1074
- f.data.type === "VOUCHER" && n.value && (f.data.collectibleConfig.image = await firebaseStorage.update(
1075
- f.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, n.value),
1074
+ c.data.type === "VOUCHER" && n.value && (c.data.collectibleConfig.image = await firebaseStorage.update(
1075
+ c.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, n.value),
1076
1076
  n.value
1077
1077
  ));
1078
1078
  },
@@ -1080,40 +1080,40 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
1080
1080
  message: "Uploading reward image",
1081
1081
  successMessage: "Reward image updated"
1082
1082
  }
1083
- ), h("update:model-value", f.data, d.value));
1083
+ ), h("update:model-value", c.data, m.value));
1084
1084
  }
1085
- const i = ref();
1086
- return c({
1085
+ const r = ref();
1086
+ return d({
1087
1087
  showSheet: v
1088
- }), (f, m) => {
1088
+ }), (c, p) => {
1089
1089
  const b = resolveComponent("FmStepperField"), x = resolveComponent("FmSelect"), k = resolveComponent("FmForm"), C = resolveComponent("FmButton"), B = resolveComponent("FmSideSheet");
1090
1090
  return openBlock(), createBlock(B, {
1091
1091
  "max-width": 560,
1092
1092
  modelValue: unref(o),
1093
1093
  "onUpdate:modelValue": [
1094
- m[10] || (m[10] = (V) => isRef(o) ? o.value = V : null),
1095
- m[11] || (m[11] = (V) => o.value = V)
1094
+ p[10] || (p[10] = (V) => isRef(o) ? o.value = V : null),
1095
+ p[11] || (p[11] = (V) => o.value = V)
1096
1096
  ],
1097
1097
  header: "Edit reward",
1098
1098
  "dismiss-away": ""
1099
1099
  }, {
1100
1100
  "side-sheet-footer": withCtx(() => [
1101
- createElementVNode("div", _hoisted_2$5, [
1101
+ createElementVNode("div", _hoisted_1$6, [
1102
1102
  createVNode(C, {
1103
1103
  variant: "primary",
1104
1104
  type: "button",
1105
1105
  label: "Confirm",
1106
1106
  disabled: unref(y).length > 0,
1107
- onClick: m[8] || (m[8] = async () => {
1107
+ onClick: p[8] || (p[8] = async () => {
1108
1108
  var V;
1109
- return (V = unref(i)) == null ? void 0 : V.validateInputs();
1109
+ return (V = unref(r)) == null ? void 0 : V.validateInputs();
1110
1110
  })
1111
1111
  }, null, 8, ["disabled"]),
1112
1112
  createVNode(C, {
1113
1113
  variant: "secondary",
1114
1114
  type: "button",
1115
1115
  label: "Cancel",
1116
- onClick: m[9] || (m[9] = (V) => o.value = !1)
1116
+ onClick: p[9] || (p[9] = (V) => o.value = !1)
1117
1117
  })
1118
1118
  ])
1119
1119
  ]),
@@ -1123,8 +1123,8 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
1123
1123
  key: 0,
1124
1124
  class: "flex flex-col gap-y-24",
1125
1125
  ref_key: "formRef",
1126
- ref: i,
1127
- onValidationSuccess: m[7] || (m[7] = (V) => p())
1126
+ ref: r,
1127
+ onValidationSuccess: p[7] || (p[7] = (V) => f())
1128
1128
  }, {
1129
1129
  default: withCtx(() => {
1130
1130
  var V, R;
@@ -1135,13 +1135,13 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
1135
1135
  rules: [
1136
1136
  unref(ZodHelper).toRule(
1137
1137
  unref(z).number().min(1).max(
1138
- r.maxThreshold,
1139
- `Number cannot be more than ${r.maxThreshold}`
1138
+ s.maxThreshold,
1139
+ `Number cannot be more than ${s.maxThreshold}`
1140
1140
  )
1141
1141
  )
1142
1142
  ],
1143
1143
  "model-value": unref(l).threshold,
1144
- "onUpdate:modelValue": m[0] || (m[0] = (E) => l.value = {
1144
+ "onUpdate:modelValue": p[0] || (p[0] = (E) => l.value = {
1145
1145
  ...unref(l),
1146
1146
  threshold: E
1147
1147
  })
@@ -1153,8 +1153,8 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
1153
1153
  { label: "Loyalty", value: "LOYALTY" }
1154
1154
  ],
1155
1155
  "model-value": unref(l).type,
1156
- "onUpdate:modelValue": m[1] || (m[1] = (E) => {
1157
- var S, $;
1156
+ "onUpdate:modelValue": p[1] || (p[1] = (E) => {
1157
+ var S, w;
1158
1158
  E === "VOUCHER" ? l.value = {
1159
1159
  collectible: null,
1160
1160
  type: "VOUCHER",
@@ -1179,7 +1179,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
1179
1179
  validityOption: {
1180
1180
  validForDay: 7
1181
1181
  },
1182
- threshold: ($ = unref(l)) == null ? void 0 : $.threshold
1182
+ threshold: (w = unref(l)) == null ? void 0 : w.threshold
1183
1183
  };
1184
1184
  })
1185
1185
  }, null, 8, ["model-value"]),
@@ -1189,10 +1189,10 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
1189
1189
  rules: [unref(ZodHelper).ruleAtPath(unref(g), "collectible", [unref(l).type])],
1190
1190
  items: unref(u).loyaltyRewards.items,
1191
1191
  "model-value": unref(l).collectible,
1192
- "onUpdate:modelValue": m[2] || (m[2] = (E) => unref(l).collectible = E)
1192
+ "onUpdate:modelValue": p[2] || (p[2] = (E) => unref(l).collectible = E)
1193
1193
  }, null, 8, ["rules", "items", "model-value"])) : createCommentVNode("", !0),
1194
1194
  unref(l).type === "LOYALTY" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
1195
- _hoisted_1$6,
1195
+ p[12] || (p[12] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1)),
1196
1196
  createVNode(_sfc_main$l, {
1197
1197
  class: "mt-[-8px]",
1198
1198
  rules: [unref(ZodHelper).ruleAtPath(unref(g), "earningOption", [unref(l).type])],
@@ -1200,7 +1200,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
1200
1200
  "error-text": unref(ZodHelper).helperText(unref(y), "earningOption"),
1201
1201
  "fixed-type": !0,
1202
1202
  "model-value": unref(l).earningOption,
1203
- "onUpdate:modelValue": m[3] || (m[3] = (E) => l.value = {
1203
+ "onUpdate:modelValue": p[3] || (p[3] = (E) => l.value = {
1204
1204
  ...unref(l),
1205
1205
  earningOption: E
1206
1206
  })
@@ -1216,7 +1216,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
1216
1216
  )) == null ? void 0 : V.raw.type) === "CREDIT",
1217
1217
  rules: [unref(ZodHelper).ruleAtPath(unref(g), "validityOption", [unref(l).type])],
1218
1218
  "model-value": unref(l).validityOption,
1219
- "onUpdate:modelValue": m[4] || (m[4] = (E) => l.value = {
1219
+ "onUpdate:modelValue": p[4] || (p[4] = (E) => l.value = {
1220
1220
  ...unref(l),
1221
1221
  validityOption: E
1222
1222
  })
@@ -1226,11 +1226,11 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
1226
1226
  key: 3,
1227
1227
  "reward-image": unref(n),
1228
1228
  "model-value": ((R = unref(l)) == null ? void 0 : R.collectibleConfig) ?? void 0,
1229
- "onUpdate:modelValue": m[5] || (m[5] = (E) => l.value = {
1229
+ "onUpdate:modelValue": p[5] || (p[5] = (E) => l.value = {
1230
1230
  ...unref(l),
1231
1231
  collectibleConfig: E
1232
1232
  }),
1233
- "onUpdate:rewardImage": m[6] || (m[6] = (E) => n.value = E)
1233
+ "onUpdate:rewardImage": p[6] || (p[6] = (E) => n.value = E)
1234
1234
  }, null, 8, ["reward-image", "model-value"])) : createCommentVNode("", !0),
1235
1235
  createVNode(JsonViewer, { json: unref(y) }, null, 8, ["json"])
1236
1236
  ];
@@ -1245,7 +1245,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
1245
1245
  }), _hoisted_1$5 = {
1246
1246
  key: 0,
1247
1247
  class: "grid grid-cols-5 text-center gap-8 justify-between items-center w-full"
1248
- }, _hoisted_2$4 = { class: "flex flex-col gap-0 items-center justify-center" }, _hoisted_3$4 = /* @__PURE__ */ createElementVNode("div", null, "🎁", -1), _sfc_main$5 = /* @__PURE__ */ defineComponent({
1248
+ }, _hoisted_2$4 = { class: "flex flex-col gap-0 items-center justify-center" }, _sfc_main$5 = /* @__PURE__ */ defineComponent({
1249
1249
  __name: "MissionProgress",
1250
1250
  props: {
1251
1251
  type: {
@@ -1266,17 +1266,17 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
1266
1266
  }
1267
1267
  },
1268
1268
  setup(e) {
1269
- const c = e, { maxRange: a, currentRange: r, markers: u } = toRefs(c), s = computed(
1270
- () => Math.min(r.value / a.value * 100, 100)
1269
+ const d = e, { maxRange: a, currentRange: s, markers: u } = toRefs(d), i = computed(
1270
+ () => Math.min(s.value / a.value * 100, 100)
1271
1271
  ), o = (l) => l / a.value * 100;
1272
1272
  return (l, n) => {
1273
- const d = resolveComponent("FmIcon");
1273
+ const m = resolveComponent("FmIcon");
1274
1274
  return e.type === "STAMP" ? (openBlock(), createElementBlock("div", _hoisted_1$5, [
1275
- (openBlock(!0), createElementBlock(Fragment, null, renderList(Math.min(unref(a), 40), (g) => (openBlock(), createBlock(d, {
1275
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(Math.min(unref(a), 40), (g) => (openBlock(), createBlock(m, {
1276
1276
  class: normalizeClass(
1277
- unref(r) >= g ? "text-fm-color-primary" : "text-fm-color-neutral-gray-200"
1277
+ unref(s) >= g ? "text-fm-color-primary" : "text-fm-color-neutral-gray-200"
1278
1278
  ),
1279
- outline: unref(r) < g,
1279
+ outline: unref(s) < g,
1280
1280
  key: g,
1281
1281
  name: unref(u).some((y) => y === g) ? "featured_seasonal_and_gifts" : "check_circle"
1282
1282
  }, null, 8, ["class", "outline", "name"]))), 128))
@@ -1286,7 +1286,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
1286
1286
  }, [
1287
1287
  createElementVNode("div", {
1288
1288
  class: normalizeClass(["bg-fm-color-primary", "absolute top-0 left-0 h-full rounded-lg"]),
1289
- style: normalizeStyle({ width: unref(s) + "%" })
1289
+ style: normalizeStyle({ width: unref(i) + "%" })
1290
1290
  }, null, 4),
1291
1291
  (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (g, y) => (openBlock(), createElementBlock("div", {
1292
1292
  key: y,
@@ -1297,7 +1297,7 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
1297
1297
  createElementVNode("div", {
1298
1298
  class: normalizeClass(["h-16 w-[2px]", "bg-fm-color-system-warning-300"])
1299
1299
  }),
1300
- _hoisted_3$4
1300
+ n[0] || (n[0] = createElementVNode("div", null, "🎁", -1))
1301
1301
  ])
1302
1302
  ], 4))), 128))
1303
1303
  ]));
@@ -1305,19 +1305,19 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$9 = /* @__PURE__ */ cre
1305
1305
  }
1306
1306
  }), isObject = (e) => e !== null && typeof e == "object";
1307
1307
  function changeKeysFactory(e) {
1308
- return function c(a, r = 1, u) {
1309
- if (r === 0 || !isObject(a))
1308
+ return function d(a, s = 1, u) {
1309
+ if (s === 0 || !isObject(a))
1310
1310
  return a;
1311
1311
  if (Array.isArray(a))
1312
- return a.map((o) => c(o, r - 1, u));
1313
- const s = Object.create(Object.getPrototypeOf(a));
1312
+ return a.map((o) => d(o, s - 1, u));
1313
+ const i = Object.create(Object.getPrototypeOf(a));
1314
1314
  return Object.keys(a).forEach((o) => {
1315
- const l = a[o], n = e(o, u), d = c(l, r - 1, u);
1316
- s[n] = d;
1317
- }), s;
1315
+ const l = a[o], n = e(o, u), m = d(l, s - 1, u);
1316
+ i[n] = m;
1317
+ }), i;
1318
1318
  };
1319
1319
  }
1320
- const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class: "space-y-16" }, _hoisted_2$3 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Configure the reward type given to your customer. ", -1), _hoisted_3$3 = { class: "fm-typo-en-body-lg-400" }, _hoisted_4$3 = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _hoisted_5$2 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Mission Preview", -1), _hoisted_6$2 = { class: "flex items-center gap-4" }, _hoisted_7$2 = { class: "fm-typo-en-body-lg-600" }, _hoisted_8$2 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Earn a stamp! ", -1), _hoisted_9$2 = { class: "flex items-center gap-16" }, _hoisted_10$2 = { key: 0 }, _sfc_main$4 = /* @__PURE__ */ defineComponent({
1320
+ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class: "space-y-16" }, _hoisted_2$3 = { class: "fm-typo-en-body-lg-400" }, _hoisted_3$3 = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _hoisted_4$2 = { class: "flex items-center gap-4" }, _hoisted_5$2 = { class: "fm-typo-en-body-lg-600" }, _hoisted_6$2 = { class: "flex items-center gap-16" }, _hoisted_7$1 = { key: 0 }, _sfc_main$4 = /* @__PURE__ */ defineComponent({
1321
1321
  __name: "MissionPoolInput",
1322
1322
  props: {
1323
1323
  modelValue: {
@@ -1330,39 +1330,39 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1330
1330
  }
1331
1331
  },
1332
1332
  emits: ["update:model-value"],
1333
- setup(e, { emit: c }) {
1334
- const a = e, r = c, u = useMembershipStore(), s = z.array(z.lazy(() => FdtoThresholdReward)).min(1, "Requires at least 1 reward"), o = computed(
1335
- () => a.modelValue.sort((i, f) => i.threshold - f.threshold) ?? []
1333
+ setup(e, { emit: d }) {
1334
+ const a = e, s = d, u = useMembershipStore(), i = z.array(z.lazy(() => FdtoThresholdReward)).min(1, "Requires at least 1 reward"), o = computed(
1335
+ () => a.modelValue.sort((r, c) => r.threshold - c.threshold) ?? []
1336
1336
  ), l = computed(() => {
1337
- const i = s.safeParse(o.value);
1338
- return i.success ? [] : i.error.errors;
1337
+ const r = i.safeParse(o.value);
1338
+ return r.success ? [] : r.error.errors;
1339
1339
  }), n = ref();
1340
- function d(i, f) {
1340
+ function m(r, c) {
1341
1341
  var b;
1342
- const m = [...o.value];
1343
- m[f] = i, (b = n.value) == null || b.showSheet(!1), r("update:model-value", m);
1342
+ const p = [...o.value];
1343
+ p[c] = r, (b = n.value) == null || b.showSheet(!1), s("update:model-value", p);
1344
1344
  }
1345
- function g(i) {
1346
- const f = i.type == "VOUCHER" ? i.collectibleConfig : u.collectibles.find(
1347
- (b) => b._id.toString() == i.collectible
1348
- ), m = CollectionUtils.formattedType((f == null ? void 0 : f.name) || "");
1345
+ function g(r) {
1346
+ const c = r.type == "VOUCHER" ? r.collectibleConfig : u.collectibles.find(
1347
+ (b) => b._id.toString() == r.collectible
1348
+ ), p = CollectionUtils.formattedType((c == null ? void 0 : c.name) || "");
1349
1349
  return {
1350
- label: isNullOrEmpty(m) ? "NO REWARD" : m,
1351
- sublabel: `Reward at ${i.threshold} | Amount: ${i.earningOption.type == "FIXED" ? i.earningOption.amount : `${i.earningOption.amount} for every RM${i.earningOption.every} spent`} `
1350
+ label: isNullOrEmpty(p) ? "NO REWARD" : p,
1351
+ sublabel: `Reward at ${r.threshold} | Amount: ${r.earningOption.type == "FIXED" ? r.earningOption.amount : `${r.earningOption.amount} for every RM${r.earningOption.every} spent`} `
1352
1352
  };
1353
1353
  }
1354
- function y(i) {
1355
- var m;
1356
- const f = [...o.value];
1357
- (m = n.value) == null || m.showSheet(!0, f[i], i);
1354
+ function y(r) {
1355
+ var p;
1356
+ const c = [...o.value];
1357
+ (p = n.value) == null || p.showSheet(!0, c[r], r);
1358
1358
  }
1359
- function v(i) {
1360
- const f = [...o.value];
1361
- f.splice(i, 1), r("update:model-value", f);
1359
+ function v(r) {
1360
+ const c = [...o.value];
1361
+ c.splice(r, 1), s("update:model-value", c);
1362
1362
  }
1363
1363
  function h() {
1364
- var i;
1365
- (i = n.value) == null || i.showSheet(
1364
+ var r;
1365
+ (r = n.value) == null || r.showSheet(
1366
1366
  !0,
1367
1367
  {
1368
1368
  type: "LOYALTY",
@@ -1379,21 +1379,21 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1379
1379
  o.value.length
1380
1380
  );
1381
1381
  }
1382
- function p(i) {
1383
- var f, m;
1384
- return i.type == "VOUCHER" ? (f = i.collectibleConfig) == null ? void 0 : f.name : sentenceCase(
1385
- ((m = u.loyaltyRewards.items.find(
1386
- (b) => b.value == i.collectible
1387
- )) == null ? void 0 : m.label) || ""
1382
+ function f(r) {
1383
+ var c, p;
1384
+ return r.type == "VOUCHER" ? (c = r.collectibleConfig) == null ? void 0 : c.name : sentenceCase(
1385
+ ((p = u.loyaltyRewards.items.find(
1386
+ (b) => b.value == r.collectible
1387
+ )) == null ? void 0 : p.label) || ""
1388
1388
  );
1389
1389
  }
1390
- return (i, f) => {
1391
- const m = resolveComponent("FmButton"), b = resolveComponent("FmCard"), x = resolveComponent("FmHelperText");
1390
+ return (r, c) => {
1391
+ const p = resolveComponent("FmButton"), b = resolveComponent("FmCard"), x = resolveComponent("FmHelperText");
1392
1392
  return openBlock(), createElementBlock("div", _hoisted_1$4, [
1393
- _hoisted_2$3,
1394
- createVNode(m, {
1393
+ c[2] || (c[2] = createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Configure the reward type given to your customer. ", -1)),
1394
+ createVNode(p, {
1395
1395
  label: "Add Reward",
1396
- onClick: f[0] || (f[0] = (k) => h()),
1396
+ onClick: c[0] || (c[0] = (k) => h()),
1397
1397
  variant: "plain",
1398
1398
  icon: "add"
1399
1399
  }),
@@ -1405,10 +1405,10 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1405
1405
  }, {
1406
1406
  default: withCtx(() => [
1407
1407
  createElementVNode("div", null, [
1408
- createElementVNode("div", _hoisted_3$3, toDisplayString(g(k).label), 1),
1409
- createElementVNode("div", _hoisted_4$3, toDisplayString(g(k).sublabel), 1)
1408
+ createElementVNode("div", _hoisted_2$3, toDisplayString(g(k).label), 1),
1409
+ createElementVNode("div", _hoisted_3$3, toDisplayString(g(k).sublabel), 1)
1410
1410
  ]),
1411
- createVNode(m, {
1411
+ createVNode(p, {
1412
1412
  icon: "delete",
1413
1413
  variant: "tertiary",
1414
1414
  onClick: (B) => (B.stopPropagation(), v(C))
@@ -1421,7 +1421,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1421
1421
  text: k.message,
1422
1422
  state: "error"
1423
1423
  }, null, 8, ["text"]))), 128)),
1424
- _hoisted_5$2,
1424
+ c[3] || (c[3] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Mission Preview", -1)),
1425
1425
  (openBlock(), createBlock(b, {
1426
1426
  key: 0,
1427
1427
  variant: "outlined",
@@ -1430,20 +1430,20 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1430
1430
  default: withCtx(() => {
1431
1431
  var k, C;
1432
1432
  return [
1433
- createElementVNode("div", _hoisted_6$2, [
1433
+ createElementVNode("div", _hoisted_4$2, [
1434
1434
  createElementVNode("div", null, [
1435
- createElementVNode("div", _hoisted_7$2, " Collect " + toDisplayString(e.mission.end) + " stamps to get " + toDisplayString(((k = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : k.earningOption.amount) > 1 ? (C = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : C.earningOption.amount : "") + " " + toDisplayString(e.modelValue[e.modelValue.length - 1] ? p(e.modelValue[e.modelValue.length - 1]) : ""), 1),
1436
- _hoisted_8$2
1435
+ createElementVNode("div", _hoisted_5$2, " Collect " + toDisplayString(e.mission.end) + " stamps to get " + toDisplayString(((k = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : k.earningOption.amount) > 1 ? (C = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : C.earningOption.amount : "") + " " + toDisplayString(e.modelValue[e.modelValue.length - 1] ? f(e.modelValue[e.modelValue.length - 1]) : ""), 1),
1436
+ c[1] || (c[1] = createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Earn a stamp! ", -1))
1437
1437
  ])
1438
1438
  ]),
1439
- createElementVNode("div", _hoisted_9$2, [
1439
+ createElementVNode("div", _hoisted_6$2, [
1440
1440
  createVNode(_sfc_main$5, {
1441
1441
  type: e.mission.type,
1442
1442
  "max-range": e.mission.end,
1443
1443
  currentRange: e.mission.end / 4,
1444
1444
  markers: e.modelValue.map((B) => B.threshold)
1445
1445
  }, null, 8, ["type", "max-range", "currentRange", "markers"]),
1446
- e.mission.type == "PROGRESSIVE" ? (openBlock(), createElementBlock("div", _hoisted_10$2, " 0/" + toDisplayString(e.mission.end.toLocaleString()), 1)) : createCommentVNode("", !0)
1446
+ e.mission.type == "PROGRESSIVE" ? (openBlock(), createElementBlock("div", _hoisted_7$1, " 0/" + toDisplayString(e.mission.end.toLocaleString()), 1)) : createCommentVNode("", !0)
1447
1447
  ])
1448
1448
  ];
1449
1449
  }),
@@ -1452,20 +1452,20 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1452
1452
  createVNode(_sfc_main$6, {
1453
1453
  ref_key: "sheetRef",
1454
1454
  ref: n,
1455
- "onUpdate:modelValue": d,
1455
+ "onUpdate:modelValue": m,
1456
1456
  "max-threshold": e.mission.end
1457
1457
  }, null, 8, ["max-threshold"])
1458
1458
  ]);
1459
1459
  };
1460
1460
  }
1461
- }), _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = { class: "space-y-8" }, _hoisted_3$2 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Mission Type", -1), _hoisted_4$2 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Select a game where you want your customer to play. ", -1), _hoisted_5$1 = { class: "grid grid-cols-2 gap-16" }, _hoisted_6$1 = { class: "fm-typo-en-title-sm-800" }, _hoisted_7$1 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _hoisted_8$1 = { class: "space-y-8" }, _hoisted_9$1 = /* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Collections required", -1), _hoisted_10$1 = /* @__PURE__ */ 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), _sfc_main$3 = /* @__PURE__ */ defineComponent({
1461
+ }), _hoisted_1$3 = { class: "space-y-16" }, _hoisted_2$2 = { class: "space-y-8" }, _hoisted_3$2 = { class: "grid grid-cols-2 gap-16" }, _hoisted_4$1 = { class: "fm-typo-en-title-sm-800" }, _hoisted_5$1 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _hoisted_6$1 = { class: "space-y-8" }, _sfc_main$3 = /* @__PURE__ */ defineComponent({
1462
1462
  __name: "MissionInput",
1463
1463
  props: {
1464
1464
  modelValue: Object
1465
1465
  },
1466
1466
  emits: ["update:model-value"],
1467
- setup(e, { emit: c }) {
1468
- const a = e, r = computed(() => {
1467
+ setup(e, { emit: d }) {
1468
+ const a = e, s = computed(() => {
1469
1469
  const o = FdoMission.safeParse(a.modelValue);
1470
1470
  return o.success ? [] : o.error.errors;
1471
1471
  }), u = computed(() => [
@@ -1479,15 +1479,15 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1479
1479
  description: "Reward customers when they reach a cumulative spending goal.",
1480
1480
  value: F_MISSION_TYPE.enum.PROGRESSIVE
1481
1481
  }
1482
- ]), s = c;
1482
+ ]), i = d;
1483
1483
  return (o, l) => {
1484
1484
  var g;
1485
- const n = resolveComponent("FmCard"), d = resolveComponent("FmStepperField");
1485
+ const n = resolveComponent("FmCard"), m = resolveComponent("FmStepperField");
1486
1486
  return openBlock(), createElementBlock("div", _hoisted_1$3, [
1487
1487
  createElementVNode("div", _hoisted_2$2, [
1488
- _hoisted_3$2,
1489
- _hoisted_4$2,
1490
- createElementVNode("div", _hoisted_5$1, [
1488
+ l[1] || (l[1] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Mission Type", -1)),
1489
+ l[2] || (l[2] = createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Select a game where you want your customer to play. ", -1)),
1490
+ createElementVNode("div", _hoisted_3$2, [
1491
1491
  (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u), (y) => {
1492
1492
  var v, h;
1493
1493
  return openBlock(), createBlock(n, {
@@ -1498,40 +1498,40 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1498
1498
  "hover:bg-fm-color-opacity-sm": ((h = e.modelValue) == null ? void 0 : h.type) != y.value
1499
1499
  }]),
1500
1500
  onClick: () => {
1501
- var p, i;
1502
- ((p = e.modelValue) == null ? void 0 : p.type) != y.value && s("update:model-value", {
1501
+ var f, r;
1502
+ ((f = e.modelValue) == null ? void 0 : f.type) != y.value && i("update:model-value", {
1503
1503
  ...e.modelValue,
1504
1504
  type: y.value,
1505
- end: ((i = e.modelValue) == null ? void 0 : i.end) || 1
1505
+ end: ((r = e.modelValue) == null ? void 0 : r.end) || 1
1506
1506
  });
1507
1507
  },
1508
1508
  key: y.value
1509
1509
  }, {
1510
1510
  default: withCtx(() => [
1511
- createElementVNode("div", _hoisted_6$1, toDisplayString(y.label), 1),
1512
- createElementVNode("div", _hoisted_7$1, toDisplayString(y.description), 1)
1511
+ createElementVNode("div", _hoisted_4$1, toDisplayString(y.label), 1),
1512
+ createElementVNode("div", _hoisted_5$1, toDisplayString(y.description), 1)
1513
1513
  ]),
1514
1514
  _: 2
1515
1515
  }, 1032, ["class", "onClick"]);
1516
1516
  }), 128))
1517
1517
  ])
1518
1518
  ]),
1519
- createElementVNode("div", _hoisted_8$1, [
1520
- _hoisted_9$1,
1521
- _hoisted_10$1,
1522
- createVNode(d, {
1519
+ createElementVNode("div", _hoisted_6$1, [
1520
+ l[3] || (l[3] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Collections required", -1)),
1521
+ l[4] || (l[4] = 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)),
1522
+ createVNode(m, {
1523
1523
  label: "Maximum to collect",
1524
1524
  "model-value": ((g = e.modelValue) == null ? void 0 : g.end) || null,
1525
1525
  "onUpdate:modelValue": l[0] || (l[0] = (y) => {
1526
1526
  var v;
1527
- return s("update:model-value", {
1527
+ return i("update:model-value", {
1528
1528
  ...e.modelValue,
1529
1529
  type: ((v = e.modelValue) == null ? void 0 : v.type) || "STAMP",
1530
1530
  end: y
1531
1531
  });
1532
1532
  }),
1533
- "helper-text": unref(ZodHelper).helperText(unref(r), "end") || "Set the threshold required for reward eligibility",
1534
- "helper-state": unref(ZodHelper).helperState(unref(r), "end") || "none"
1533
+ "helper-text": unref(ZodHelper).helperText(unref(s), "end") || "Set the threshold required for reward eligibility",
1534
+ "helper-state": unref(ZodHelper).helperState(unref(s), "end") || "none"
1535
1535
  }, null, 8, ["model-value", "helper-text", "helper-state"])
1536
1536
  ])
1537
1537
  ]);
@@ -1559,12 +1559,12 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1559
1559
  }
1560
1560
  },
1561
1561
  emits: ["update:model-value", "update:file"],
1562
- setup(e, { emit: c }) {
1563
- const { t: a } = useI18n(), r = e, u = c;
1564
- function s(d) {
1565
- switch (r.field.type) {
1562
+ setup(e, { emit: d }) {
1563
+ const { t: a } = useI18n(), s = e, u = d;
1564
+ function i(m) {
1565
+ switch (s.field.type) {
1566
1566
  case "timeframe":
1567
- const g = d.startDate ? hooks(d.startDate).startOf("day").toISOString() : void 0, y = d.endDate ? hooks(d.endDate).endOf("day").toISOString() : void 0;
1567
+ const g = m.startDate ? hooks(m.startDate).startOf("day").toISOString() : void 0, y = m.endDate ? hooks(m.endDate).endOf("day").toISOString() : void 0;
1568
1568
  u("update:model-value", {
1569
1569
  type: "timeframe",
1570
1570
  property: "__now",
@@ -1575,63 +1575,63 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1575
1575
  case "image": {
1576
1576
  u(
1577
1577
  "update:file",
1578
- d,
1579
- o.value || firebaseStorage.collectibleImagePath(void 0, d)
1578
+ m,
1579
+ o.value || firebaseStorage.collectibleImagePath(void 0, m)
1580
1580
  );
1581
1581
  break;
1582
1582
  }
1583
1583
  default:
1584
- u("update:model-value", d);
1584
+ u("update:model-value", m);
1585
1585
  break;
1586
1586
  }
1587
1587
  }
1588
1588
  const o = computed(() => {
1589
- switch (r.field.type) {
1589
+ switch (s.field.type) {
1590
1590
  case "timeframe": {
1591
- const d = r.modelValue;
1591
+ const m = s.modelValue;
1592
1592
  return {
1593
- startDate: d != null && d.start ? hooks(d == null ? void 0 : d.start).format("YYYY-MM-DD") : null,
1594
- endDate: d != null && d.end ? hooks(d == null ? void 0 : d.end).format("YYYY-MM-DD") : null
1593
+ startDate: m != null && m.start ? hooks(m == null ? void 0 : m.start).format("YYYY-MM-DD") : null,
1594
+ endDate: m != null && m.end ? hooks(m == null ? void 0 : m.end).format("YYYY-MM-DD") : null
1595
1595
  };
1596
1596
  }
1597
1597
  default:
1598
- return r.modelValue;
1598
+ return s.modelValue;
1599
1599
  }
1600
1600
  });
1601
1601
  function l() {
1602
1602
  if (!n.value.schema) return [];
1603
- const d = n.value.schema.safeParse(r.modelValue);
1604
- return d.success ? [] : d.error.errors;
1603
+ const m = n.value.schema.safeParse(s.modelValue);
1604
+ return m.success ? [] : m.error.errors;
1605
1605
  }
1606
1606
  const n = computed(() => ({
1607
- schema: r.schema,
1608
- unwrapped: r.schema ? ZodHelper.unwrap(r.schema) : void 0,
1609
- rules: r.schema ? [ZodHelper.ruleAtPath(r.schema, "")] : void 0,
1610
- labelMark: r.schema && ZodHelper.isRequired(r.schema) == !1 ? "optional" : void 0,
1611
- zodLabel: r.schema ? ZodHelper.toInputLabel(r.schema, r.field.label) : void 0
1607
+ schema: s.schema,
1608
+ unwrapped: s.schema ? ZodHelper.unwrap(s.schema) : void 0,
1609
+ rules: s.schema ? [ZodHelper.ruleAtPath(s.schema, "")] : void 0,
1610
+ labelMark: s.schema && ZodHelper.isRequired(s.schema) == !1 ? "optional" : void 0,
1611
+ zodLabel: s.schema ? ZodHelper.toInputLabel(s.schema, s.field.label) : void 0
1612
1612
  }));
1613
- return (d, g) => {
1614
- var f, m, b, x, k;
1615
- const y = resolveComponent("FmTextField"), v = resolveComponent("FmStepperField"), h = resolveComponent("FmTextarea"), p = resolveComponent("FmHelperText"), i = resolveComponent("FmSwitch");
1613
+ return (m, g) => {
1614
+ var c, p, b, x, k;
1615
+ const y = resolveComponent("FmTextField"), v = resolveComponent("FmStepperField"), h = resolveComponent("FmTextarea"), f = resolveComponent("FmHelperText"), r = resolveComponent("FmSwitch");
1616
1616
  return e.field.type === "text" ? (openBlock(), createBlock(y, {
1617
1617
  key: 0,
1618
1618
  label: unref(a)(e.field.label),
1619
1619
  "label-mark": unref(n).labelMark,
1620
1620
  rules: unref(n).rules,
1621
1621
  "model-value": unref(o),
1622
- "onUpdate:modelValue": s,
1622
+ "onUpdate:modelValue": i,
1623
1623
  "helper-state": e.helperText ? "error" : void 0,
1624
1624
  "helper-text": e.helperText
1625
1625
  }, null, 8, ["label", "label-mark", "rules", "model-value", "helper-state", "helper-text"])) : e.field.type === "number" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1626
1626
  createVNode(JsonViewer, {
1627
- json: { schema: unref(n).unwrapped, props: r }
1627
+ json: { schema: unref(n).unwrapped, props: s }
1628
1628
  }, null, 8, ["json"]),
1629
1629
  createVNode(v, {
1630
1630
  label: unref(a)(e.field.label),
1631
1631
  "label-mark": e.field.isRuleChildren ? void 0 : unref(n).labelMark,
1632
1632
  "model-value": unref(o),
1633
1633
  rules: e.field.isRuleChildren ? [] : unref(n).rules,
1634
- "onUpdate:modelValue": s,
1634
+ "onUpdate:modelValue": i,
1635
1635
  "helper-state": e.field.isRuleChildren && e.helperText ? "error" : void 0,
1636
1636
  "helper-text": e.field.isRuleChildren ? e.helperText : void 0
1637
1637
  }, null, 8, ["label", "label-mark", "model-value", "rules", "helper-state", "helper-text"])
@@ -1641,21 +1641,21 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1641
1641
  "label-mark": unref(n).labelMark,
1642
1642
  rules: unref(n).rules,
1643
1643
  "model-value": unref(o),
1644
- "onUpdate:modelValue": s,
1644
+ "onUpdate:modelValue": i,
1645
1645
  "show-word-count": "",
1646
- "max-length": (k = (x = (b = (m = (f = unref(n)) == null ? void 0 : f.unwrapped) == null ? void 0 : m._def) == null ? void 0 : b.checks) == null ? void 0 : x.find((C) => C.kind == "max")) == null ? void 0 : k.value
1646
+ "max-length": (k = (x = (b = (p = (c = unref(n)) == null ? void 0 : c.unwrapped) == null ? void 0 : p._def) == null ? void 0 : b.checks) == null ? void 0 : x.find((C) => C.kind == "max")) == null ? void 0 : k.value
1647
1647
  }, null, 8, ["label", "label-mark", "rules", "model-value", "max-length"])) : e.field.type === "trigger" ? (openBlock(), createBlock(_sfc_main$g, {
1648
1648
  key: 3,
1649
1649
  "campaign-type": e.extras,
1650
1650
  "model-value": unref(o),
1651
1651
  disabled: e.disabled,
1652
- "onUpdate:modelValue": s
1652
+ "onUpdate:modelValue": i
1653
1653
  }, null, 8, ["campaign-type", "model-value", "disabled"])) : e.field.type === "timeframe" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
1654
1654
  createVNode(_sfc_main$e, {
1655
1655
  "model-value": unref(o),
1656
- "onUpdate:modelValue": s
1656
+ "onUpdate:modelValue": i
1657
1657
  }, null, 8, ["model-value"]),
1658
- createVNode(p, {
1658
+ createVNode(f, {
1659
1659
  class: "!mt-[8px]",
1660
1660
  text: unref(ZodHelper).helperText(l(), ""),
1661
1661
  state: unref(ZodHelper).helperState(l(), "")
@@ -1665,13 +1665,13 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1665
1665
  thumbnail: unref(o),
1666
1666
  "aspect-ratio": "16 / 9",
1667
1667
  class: "w-1/2 xs:w-2/3",
1668
- "onUpdate:file": s
1668
+ "onUpdate:file": i
1669
1669
  }, {
1670
1670
  label: withCtx(() => [
1671
1671
  (openBlock(), createBlock(resolveDynamicComponent(unref(n).zodLabel)))
1672
1672
  ]),
1673
1673
  _: 1
1674
- }, 8, ["thumbnail"])) : e.field.type === "switch" ? (openBlock(), createBlock(i, {
1674
+ }, 8, ["thumbnail"])) : e.field.type === "switch" ? (openBlock(), createBlock(r, {
1675
1675
  key: 6,
1676
1676
  label: unref(a)(e.field.label),
1677
1677
  "label-placement": "right",
@@ -1679,25 +1679,25 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1679
1679
  "label-mark": unref(n).labelMark,
1680
1680
  rules: unref(n).rules,
1681
1681
  "model-value": unref(o),
1682
- "onUpdate:modelValue": s
1682
+ "onUpdate:modelValue": i
1683
1683
  }, null, 8, ["label", "sublabel", "label-mark", "rules", "model-value"])) : e.field.type === "collectible_options" ? (openBlock(), createBlock(_sfc_main$p, {
1684
1684
  key: 7,
1685
1685
  "model-value": unref(o),
1686
- "onUpdate:modelValue": s,
1686
+ "onUpdate:modelValue": i,
1687
1687
  "no-campaign": !1,
1688
1688
  schema: unref(n).schema,
1689
1689
  "is-mission": e.extras === "MISSION"
1690
1690
  }, null, 8, ["model-value", "schema", "is-mission"])) : e.field.type === "target_location" ? (openBlock(), createBlock(_sfc_main$q, {
1691
1691
  key: 8,
1692
1692
  "model-value": unref(o),
1693
- "onUpdate:modelValue": s
1693
+ "onUpdate:modelValue": i
1694
1694
  }, null, 8, ["model-value"])) : e.field.type == "effect" ? (openBlock(), createElementBlock(Fragment, { key: 9 }, [
1695
1695
  createVNode(_sfc_main$r, {
1696
1696
  "model-value": unref(o),
1697
- "onUpdate:modelValue": s,
1697
+ "onUpdate:modelValue": i,
1698
1698
  "can-set-auto-apply": e.field.property == "campaign.effect"
1699
1699
  }, null, 8, ["model-value", "can-set-auto-apply"]),
1700
- unref(o) ? createCommentVNode("", !0) : (openBlock(), createBlock(p, {
1700
+ unref(o) ? createCommentVNode("", !0) : (openBlock(), createBlock(f, {
1701
1701
  key: 0,
1702
1702
  class: "!mt-[8px]",
1703
1703
  text: unref(a)("connect.campaign.common.effect_required"),
@@ -1706,58 +1706,59 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1706
1706
  ], 64)) : e.field.type === "message" ? (openBlock(), createBlock(_sfc_main$s, {
1707
1707
  key: 10,
1708
1708
  "allow-email": !0,
1709
+ "allow-whatsapp": !0,
1709
1710
  "model-value": unref(o),
1710
- "onUpdate:modelValue": s,
1711
+ "onUpdate:modelValue": i,
1711
1712
  "helper-text": unref(ZodHelper).helperText(l(), ""),
1712
1713
  "trigger-type": e.field.extras,
1713
1714
  "helper-state": unref(ZodHelper).helperState(l(), "")
1714
1715
  }, null, 8, ["model-value", "helper-text", "trigger-type", "helper-state"])) : e.field.type === "earning_option" ? (openBlock(), createBlock(_sfc_main$l, {
1715
1716
  key: 11,
1716
1717
  "model-value": unref(o),
1717
- "onUpdate:modelValue": s,
1718
+ "onUpdate:modelValue": i,
1718
1719
  extras: e.extras,
1719
1720
  "error-text": e.helperText
1720
1721
  }, null, 8, ["model-value", "extras", "error-text"])) : e.field.type === "validity_option" ? (openBlock(), createBlock(_sfc_main$m, {
1721
1722
  key: 12,
1722
1723
  type: "custom",
1723
1724
  "model-value": unref(o),
1724
- "onUpdate:modelValue": s,
1725
+ "onUpdate:modelValue": i,
1725
1726
  "helper-text": e.helperText || unref(ZodHelper).helperText(l(), "")
1726
1727
  }, null, 8, ["model-value", "helper-text"])) : e.field.type === "game_type" ? (openBlock(), createBlock(_sfc_main$c, {
1727
1728
  key: 13,
1728
1729
  "model-value": unref(o),
1729
- "onUpdate:modelValue": s
1730
+ "onUpdate:modelValue": i
1730
1731
  }, null, 8, ["model-value"])) : e.field.type === "reward_pool" ? (openBlock(), createBlock(_sfc_main$a, {
1731
1732
  key: 14,
1732
1733
  "model-value": unref(o),
1733
- "onUpdate:modelValue": s
1734
+ "onUpdate:modelValue": i
1734
1735
  }, null, 8, ["model-value"])) : e.field.type === "mission" ? (openBlock(), createBlock(_sfc_main$3, {
1735
1736
  key: 15,
1736
1737
  "model-value": unref(o),
1737
- "onUpdate:modelValue": s
1738
+ "onUpdate:modelValue": i
1738
1739
  }, null, 8, ["model-value"])) : e.field.type === "mission_type" ? (openBlock(), createBlock(_sfc_main$8, {
1739
1740
  key: 16,
1740
1741
  "model-value": unref(o),
1741
- "onUpdate:modelValue": s
1742
+ "onUpdate:modelValue": i
1742
1743
  }, null, 8, ["model-value"])) : e.field.type === "mission_end" ? (openBlock(), createBlock(_sfc_main$7, {
1743
1744
  key: 17,
1744
1745
  "model-value": unref(o),
1745
- "onUpdate:modelValue": s,
1746
+ "onUpdate:modelValue": i,
1746
1747
  "helper-text": unref(ZodHelper).helperText(l(), ""),
1747
1748
  "helper-state": unref(ZodHelper).helperState(l(), "")
1748
1749
  }, null, 8, ["model-value", "helper-text", "helper-state"])) : e.field.type === "mission_pool" ? (openBlock(), createBlock(_sfc_main$4, {
1749
1750
  key: 18,
1750
1751
  "model-value": unref(o),
1751
- "onUpdate:modelValue": s,
1752
+ "onUpdate:modelValue": i,
1752
1753
  mission: e.extras.mission
1753
1754
  }, null, 8, ["model-value", "mission"])) : e.field.type === "rule_schedule" ? (openBlock(), createElementBlock(Fragment, { key: 19 }, [
1754
1755
  createVNode(_sfc_main$d, {
1755
1756
  "model-value": unref(o),
1756
- "onUpdate:modelValue": s,
1757
+ "onUpdate:modelValue": i,
1757
1758
  "start-date": e.extras.start,
1758
1759
  "end-date": e.extras.end
1759
1760
  }, null, 8, ["model-value", "start-date", "end-date"]),
1760
- e.helperText ? (openBlock(), createBlock(p, {
1761
+ e.helperText ? (openBlock(), createBlock(f, {
1761
1762
  key: 0,
1762
1763
  class: "!mt-[8px]",
1763
1764
  text: e.helperText,
@@ -1766,25 +1767,25 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1766
1767
  ], 64)) : e.field.type === "rule_user" ? (openBlock(), createElementBlock(Fragment, { key: 20 }, [
1767
1768
  createVNode(_sfc_main$t, {
1768
1769
  "model-value": unref(o),
1769
- "onUpdate:modelValue": s
1770
+ "onUpdate:modelValue": i
1770
1771
  }, null, 8, ["model-value"]),
1771
- e.helperText ? (openBlock(), createBlock(p, {
1772
+ e.helperText ? (openBlock(), createBlock(f, {
1772
1773
  key: 0,
1773
1774
  class: "!mt-[8px]",
1774
1775
  text: e.helperText,
1775
1776
  state: "error"
1776
1777
  }, null, 8, ["text"])) : createCommentVNode("", !0)
1777
1778
  ], 64)) : e.field.type === "rule_time" ? (openBlock(), createElementBlock(Fragment, { key: 21 }, [
1778
- e.extras == "PROMOTION" && unref(RuleBuilder).getRules(unref(o).rules.g_time).length > 0 ? (openBlock(), createBlock(p, {
1779
+ e.extras == "PROMOTION" && unref(RuleBuilder).getRules(unref(o).rules.g_time).length > 0 ? (openBlock(), createBlock(f, {
1779
1780
  key: 0,
1780
1781
  state: "warning",
1781
1782
  text: `Time based rule only work for POS >= v${unref(featureVersionMapping).TIME_BASED_PROMOTION}`
1782
1783
  }, null, 8, ["text"])) : createCommentVNode("", !0),
1783
1784
  createVNode(_sfc_main$i, {
1784
1785
  "model-value": unref(o),
1785
- "onUpdate:modelValue": s
1786
+ "onUpdate:modelValue": i
1786
1787
  }, null, 8, ["model-value"]),
1787
- e.helperText ? (openBlock(), createBlock(p, {
1788
+ e.helperText ? (openBlock(), createBlock(f, {
1788
1789
  key: 1,
1789
1790
  class: "!mt-[8px]",
1790
1791
  text: e.helperText,
@@ -1793,9 +1794,9 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1793
1794
  ], 64)) : e.field.type === "rule_bill" ? (openBlock(), createElementBlock(Fragment, { key: 22 }, [
1794
1795
  createVNode(_sfc_main$u, {
1795
1796
  "model-value": unref(o),
1796
- "onUpdate:modelValue": s
1797
+ "onUpdate:modelValue": i
1797
1798
  }, null, 8, ["model-value"]),
1798
- e.helperText ? (openBlock(), createBlock(p, {
1799
+ e.helperText ? (openBlock(), createBlock(f, {
1799
1800
  key: 0,
1800
1801
  class: "!mt-[8px]",
1801
1802
  text: e.helperText,
@@ -1804,9 +1805,9 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1804
1805
  ], 64)) : e.field.type === "rule_feedback" ? (openBlock(), createElementBlock(Fragment, { key: 23 }, [
1805
1806
  createVNode(_sfc_main$v, {
1806
1807
  "model-value": unref(o),
1807
- "onUpdate:modelValue": s
1808
+ "onUpdate:modelValue": i
1808
1809
  }, null, 8, ["model-value"]),
1809
- e.helperText ? (openBlock(), createBlock(p, {
1810
+ e.helperText ? (openBlock(), createBlock(f, {
1810
1811
  key: 0,
1811
1812
  class: "!mt-[8px]",
1812
1813
  text: e.helperText,
@@ -1815,9 +1816,9 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1815
1816
  ], 64)) : e.field.type === "rule_birthday" ? (openBlock(), createElementBlock(Fragment, { key: 24 }, [
1816
1817
  createVNode(_sfc_main$h, {
1817
1818
  "model-value": unref(o),
1818
- "onUpdate:modelValue": s
1819
+ "onUpdate:modelValue": i
1819
1820
  }, null, 8, ["model-value"]),
1820
- e.helperText ? (openBlock(), createBlock(p, {
1821
+ e.helperText ? (openBlock(), createBlock(f, {
1821
1822
  key: 0,
1822
1823
  class: "!mt-[8px]",
1823
1824
  text: e.helperText,
@@ -1826,18 +1827,18 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1826
1827
  ], 64)) : e.field.type === "promotion_game_type" ? (openBlock(), createElementBlock(Fragment, { key: 25 }, [
1827
1828
  createVNode(_sfc_main$9, {
1828
1829
  "model-value": unref(o),
1829
- "onUpdate:modelValue": s
1830
+ "onUpdate:modelValue": i
1830
1831
  }, null, 8, ["model-value"]),
1831
- e.helperText ? (openBlock(), createBlock(p, {
1832
+ e.helperText ? (openBlock(), createBlock(f, {
1832
1833
  key: 0,
1833
1834
  class: "!mt-[8px]",
1834
1835
  text: e.helperText,
1835
1836
  state: "error"
1836
1837
  }, null, 8, ["text"])) : createCommentVNode("", !0)
1837
- ], 64)) : (openBlock(), createElementBlock("pre", _hoisted_1$2, toDisplayString(r.field), 1));
1838
+ ], 64)) : (openBlock(), createElementBlock("pre", _hoisted_1$2, toDisplayString(s.field), 1));
1838
1839
  };
1839
1840
  }
1840
- }), _hoisted_1$1 = { class: "fm-typo-en-body-lg-600" }, _hoisted_2$1 = /* @__PURE__ */ createElementVNode("div", { class: "h-[1px] bg-fm-color-neutral-gray-100 w-full" }, null, -1), _hoisted_3$1 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _hoisted_4$1 = { class: "fm-typo-en-body-lg-600" }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
1841
+ }), _hoisted_1$1 = { class: "fm-typo-en-body-lg-600" }, _hoisted_2$1 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _hoisted_3$1 = { class: "fm-typo-en-body-lg-600" }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
1841
1842
  __name: "CampaignSummary",
1842
1843
  props: {
1843
1844
  data: {
@@ -1846,23 +1847,23 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1846
1847
  }
1847
1848
  },
1848
1849
  setup(e) {
1849
- const { t: c, te: a } = useI18n();
1850
- return (r, u) => {
1851
- const s = resolveComponent("FmCard");
1852
- return openBlock(), createBlock(s, {
1850
+ const { t: d, te: a } = useI18n();
1851
+ return (s, u) => {
1852
+ const i = resolveComponent("FmCard");
1853
+ return openBlock(), createBlock(i, {
1853
1854
  variant: "outlined",
1854
1855
  class: "p-16 space-y-8"
1855
1856
  }, {
1856
1857
  default: withCtx(() => [
1857
- createElementVNode("div", _hoisted_1$1, toDisplayString(unref(c)("connect.campaign.common.summary")), 1),
1858
- _hoisted_2$1,
1858
+ createElementVNode("div", _hoisted_1$1, toDisplayString(unref(d)("connect.campaign.common.summary")), 1),
1859
+ u[0] || (u[0] = createElementVNode("div", { class: "h-[1px] bg-fm-color-neutral-gray-100 w-full" }, null, -1)),
1859
1860
  (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(getCampaignSummaryObject)(e.data), (o, l) => (openBlock(), createElementBlock("div", {
1860
1861
  class: "space-y-4",
1861
1862
  key: l
1862
1863
  }, [
1863
1864
  o ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1864
- createElementVNode("div", _hoisted_3$1, toDisplayString(unref(c)(`${l}`)), 1),
1865
- createElementVNode("div", _hoisted_4$1, toDisplayString(unref(a)(`${o}`) ? unref(c)(`${o}`) : o), 1)
1865
+ createElementVNode("div", _hoisted_2$1, toDisplayString(unref(d)(`${l}`)), 1),
1866
+ createElementVNode("div", _hoisted_3$1, toDisplayString(unref(a)(`${o}`) ? unref(d)(`${o}`) : o), 1)
1866
1867
  ], 64)) : createCommentVNode("", !0)
1867
1868
  ]))), 128))
1868
1869
  ]),
@@ -1873,28 +1874,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1873
1874
  }), _hoisted_1 = { class: "xs:hidden px-24 pb-[14px] pt-[22px] flex items-center justify-between w-full border-b" }, _hoisted_2 = { class: "flex items-center gap-8" }, _hoisted_3 = {
1874
1875
  key: 0,
1875
1876
  class: "max-w-6xl mx-auto"
1876
- }, _hoisted_4 = { class: "hidden xs:flex gap-8 items-center w-full px-16 py-8 border-b border-fm-color-neutral-gray-100" }, _hoisted_5 = { class: "grid grid-cols-3 gap-40" }, _hoisted_6 = { class: "col-span-2 space-y-40 xs:col-span-3 xs:px-16 xs:pt-16" }, _hoisted_7 = { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, _hoisted_8 = { class: "w-full flex items-center justify-end gap-8 pb-24" }, _hoisted_9 = { class: "max-w-6xl mx-auto rounded-md p-4 w-full" }, _hoisted_10 = { class: "animate-pulse flex space-x-4 pt-16" }, _hoisted_11 = { class: "grid grid-cols-3 w-full gap-40" }, _hoisted_12 = /* @__PURE__ */ createElementVNode("div", { class: "col-span-2 space-y-80 xs:col-span-3 xs:px-16 xs:pt-16" }, [
1877
- /* @__PURE__ */ createElementVNode("div", { class: "flex-1 space-y-6 py-1" }, [
1878
- /* @__PURE__ */ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100 rounded" }),
1879
- /* @__PURE__ */ createElementVNode("div", { class: "h-[80px] bg-fm-color-neutral-gray-100 rounded" }),
1880
- /* @__PURE__ */ createElementVNode("div", { class: "space-y-3" }, [
1881
- /* @__PURE__ */ createElementVNode("div", { class: "grid grid-cols-2 gap-4" }, [
1882
- /* @__PURE__ */ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" }),
1883
- /* @__PURE__ */ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" })
1884
- ]),
1885
- /* @__PURE__ */ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" })
1886
- ]),
1887
- /* @__PURE__ */ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100 rounded" }),
1888
- /* @__PURE__ */ createElementVNode("div", { class: "h-[80px] bg-fm-color-neutral-gray-100 rounded" }),
1889
- /* @__PURE__ */ createElementVNode("div", { class: "space-y-3" }, [
1890
- /* @__PURE__ */ createElementVNode("div", { class: "grid grid-cols-2 gap-4" }, [
1891
- /* @__PURE__ */ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" }),
1892
- /* @__PURE__ */ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" })
1893
- ]),
1894
- /* @__PURE__ */ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" })
1895
- ])
1896
- ])
1897
- ], -1), _sfc_main = /* @__PURE__ */ defineComponent({
1877
+ }, _hoisted_4 = { class: "hidden xs:flex gap-8 items-center w-full px-16 py-8 border-b border-fm-color-neutral-gray-100" }, _hoisted_5 = { class: "grid grid-cols-3 gap-40" }, _hoisted_6 = { class: "col-span-2 space-y-40 xs:col-span-3 xs:px-16 xs:pt-16" }, _hoisted_7 = { class: "fm-typo-en-title-sm-800 !mb-[-8px]" }, _hoisted_8 = { class: "w-full flex items-center justify-end gap-8 pb-24" }, _hoisted_9 = { class: "max-w-6xl mx-auto rounded-md p-4 w-full" }, _hoisted_10 = { class: "animate-pulse flex space-x-4 pt-16" }, _hoisted_11 = { class: "grid grid-cols-3 w-full gap-40" }, _sfc_main = /* @__PURE__ */ defineComponent({
1898
1878
  __name: "EditCampaignSheet",
1899
1879
  emits: ["submit:model-value"],
1900
1880
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -1902,7 +1882,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1902
1882
  TEMPLATES.VOUCHER
1903
1883
  ), { minor } = useLoading, isLoading = ref(!1), sheetTitle = ref("Create Campaign");
1904
1884
  async function showSheet(visible, type, campaign, selectedTemplate) {
1905
- var e, c;
1885
+ var e, d;
1906
1886
  if (sheetVisible.value = visible, visible == !0) {
1907
1887
  try {
1908
1888
  isLoading.value = visible, await useMembershipStore().readRewards(), await useBusinessStore().readLocations(), await useMembershipStore().readSegments(), await useMembershipStore().readMembership();
@@ -1910,16 +1890,16 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1910
1890
  } finally {
1911
1891
  await new Promise((a) => setTimeout(a, 120)), isLoading.value = !1;
1912
1892
  }
1913
- template.value = selectedTemplate ?? TEMPLATES[type], schema.value = CampaignDtos[type], type === "VOUCHER" && (await useCampaignStore().read(), schema.value = schema.value.superRefine((a, r) => {
1893
+ template.value = selectedTemplate ?? TEMPLATES[type], schema.value = CampaignDtos[type], type === "VOUCHER" && (await useCampaignStore().read(), schema.value = schema.value.superRefine((a, s) => {
1914
1894
  a.campaign.type === "VOUCHER" && a.campaign.code && useCampaignStore().campaigns.voucher.some(
1915
1895
  (u) => u.code === a.campaign.code && u._id.toString() !== a.campaign._id.toString()
1916
- ) && r.addIssue({
1896
+ ) && s.addIssue({
1917
1897
  code: "custom",
1918
1898
  message: "Code already exists, please use another code",
1919
1899
  path: ["campaign", "code"]
1920
1900
  });
1921
1901
  })), data.value = campaign != null ? { ...campaign, templateId: (e = campaign.template) == null ? void 0 : e._id } : _.cloneDeep({
1922
- ...(c = template.value) == null ? void 0 : c.defaultValue
1902
+ ...(d = template.value) == null ? void 0 : d.defaultValue
1923
1903
  }), "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 ? `Edit ${CampaignOptions[type].name} Campaign` : `Create ${CampaignOptions[type].name} Campaign`;
1924
1904
  }
1925
1905
  }
@@ -1946,10 +1926,12 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1946
1926
  return e.success ? [] : e.error.errors;
1947
1927
  });
1948
1928
  function stepErrors(e = currentStep.value - 1) {
1949
- const c = template.value.steps[e].groups.flatMap(
1950
- (a) => a.fields.map((r) => r.property)
1929
+ const d = template.value.steps[e].groups.flatMap(
1930
+ (a) => a.fields.map((s) => s.property)
1931
+ );
1932
+ return errors.value.filter(
1933
+ (a) => d.some((s) => a.path.join(".").includes(s))
1951
1934
  );
1952
- return errors.value.filter((a) => c.includes(a.path.join(".")));
1953
1935
  }
1954
1936
  __expose({ showSheet });
1955
1937
  function showSummaryDialog() {
@@ -1961,11 +1943,11 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1961
1943
  }
1962
1944
  });
1963
1945
  }
1964
- function onUpdateProperty(e, c) {
1965
- var a, r, u, s, o, l, n, d;
1966
- if (_.set(data.value, e, c), e == "campaign.event.type") {
1967
- const y = ((s = (u = (r = (a = template.value) == null ? void 0 : a.defaultValue) == null ? void 0 : r.campaign) == null ? void 0 : u.event) == null ? void 0 : s.rule) ? _.cloneDeep({
1968
- ...(d = (n = (l = (o = template.value) == null ? void 0 : o.defaultValue) == null ? void 0 : l.campaign) == null ? void 0 : n.event) == null ? void 0 : d.rule
1946
+ function onUpdateProperty(e, d) {
1947
+ var a, s, u, i, o, l, n, m;
1948
+ if (_.set(data.value, e, d), e == "campaign.event.type") {
1949
+ const y = ((i = (u = (s = (a = template.value) == null ? void 0 : a.defaultValue) == null ? void 0 : s.campaign) == null ? void 0 : u.event) == null ? void 0 : i.rule) ? _.cloneDeep({
1950
+ ...(m = (n = (l = (o = template.value) == null ? void 0 : o.defaultValue) == null ? void 0 : l.campaign) == null ? void 0 : n.event) == null ? void 0 : m.rule
1969
1951
  }) : RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup(), [
1970
1952
  RuleBuilder.scaffoldGroup("g_schedule"),
1971
1953
  RuleBuilder.scaffoldGroup("g_time"),
@@ -1983,7 +1965,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1983
1965
  ],
1984
1966
  "&&"
1985
1967
  );
1986
- if (c != "SCHEDULE") {
1968
+ if (d != "SCHEDULE") {
1987
1969
  _.set(data.value, "campaign.event.rule", y);
1988
1970
  return;
1989
1971
  }
@@ -1993,19 +1975,19 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1993
1975
  RuleBuilder.setRuleToGroup(y, v)
1994
1976
  );
1995
1977
  }
1996
- e == "campaign.notify" && c == !1 && _.set(data.value, "campaign.notifyMessage", void 0);
1978
+ e == "campaign.notify" && d == !1 && _.set(data.value, "campaign.notifyMessage", void 0);
1997
1979
  }
1998
- async function onUpdateFile(e, c) {
1999
- return e ? await minor(async () => firebaseStorage.update(c, e), {
1980
+ async function onUpdateFile(e, d) {
1981
+ return e ? await minor(async () => firebaseStorage.update(d, e), {
2000
1982
  message: `${e ? "Uploading" : "Removing"} file`,
2001
1983
  successMessage: `File ${e ? "uploaded" : "removed"} successfully`
2002
1984
  }) : "";
2003
1985
  }
2004
1986
  function isDisable(e) {
2005
- var c, a;
1987
+ var d, a;
2006
1988
  switch (e == null ? void 0 : e.property) {
2007
1989
  case "campaign.event.type":
2008
- return ((a = (c = data.value) == null ? void 0 : c.campaign) == null ? void 0 : a._id) || !1;
1990
+ return ((a = (d = data.value) == null ? void 0 : d.campaign) == null ? void 0 : a._id) || !1;
2009
1991
  default:
2010
1992
  return !1;
2011
1993
  }
@@ -2014,14 +1996,14 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
2014
1996
  const e = schema.value.superRefine(campaignRefinement).transform(campaignTransform).safeParse(data.value);
2015
1997
  e.success && (emits("submit:model-value", cleanPF(JSON.parse(JSON.stringify(e.data)))), sheetVisible.value = !1);
2016
1998
  }
2017
- return (e, c) => {
2018
- const a = resolveComponent("FmButton"), r = resolveComponent("FmStep"), u = resolveComponent("FmStepper"), s = resolveComponent("FmCard"), o = resolveComponent("FmTopSheet");
1999
+ return (e, d) => {
2000
+ const a = resolveComponent("FmButton"), s = resolveComponent("FmStep"), u = resolveComponent("FmStepper"), i = resolveComponent("FmCard"), o = resolveComponent("FmTopSheet");
2019
2001
  return openBlock(), createBlock(o, {
2020
2002
  "fullscreen-size": "lg",
2021
2003
  modelValue: unref(sheetVisible),
2022
2004
  "onUpdate:modelValue": [
2023
- c[7] || (c[7] = (l) => isRef(sheetVisible) ? sheetVisible.value = l : null),
2024
- c[8] || (c[8] = (l) => sheetVisible.value = l)
2005
+ d[7] || (d[7] = (l) => isRef(sheetVisible) ? sheetVisible.value = l : null),
2006
+ d[8] || (d[8] = (l) => sheetVisible.value = l)
2025
2007
  ]
2026
2008
  }, createSlots({
2027
2009
  "top-sheet-header": withCtx(() => [
@@ -2029,7 +2011,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
2029
2011
  createElementVNode("div", null, toDisplayString(unref(sheetTitle)), 1),
2030
2012
  createElementVNode("div", _hoisted_2, [
2031
2013
  createVNode(a, {
2032
- onClick: c[0] || (c[0] = (l) => hideSheet()),
2014
+ onClick: d[0] || (d[0] = (l) => hideSheet()),
2033
2015
  label: unref(t)("connect.campaign.common.cancel"),
2034
2016
  variant: "tertiary"
2035
2017
  }, null, 8, ["label"]),
@@ -2049,8 +2031,29 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
2049
2031
  createElementVNode("div", _hoisted_9, [
2050
2032
  createElementVNode("div", _hoisted_10, [
2051
2033
  createElementVNode("div", _hoisted_11, [
2052
- _hoisted_12,
2053
- createVNode(s, { class: "h-[150px] bg-fm-color-neutral-gray-100" })
2034
+ d[9] || (d[9] = createElementVNode("div", { class: "col-span-2 space-y-80 xs:col-span-3 xs:px-16 xs:pt-16" }, [
2035
+ createElementVNode("div", { class: "flex-1 space-y-6 py-1" }, [
2036
+ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100 rounded" }),
2037
+ createElementVNode("div", { class: "h-[80px] bg-fm-color-neutral-gray-100 rounded" }),
2038
+ createElementVNode("div", { class: "space-y-3" }, [
2039
+ createElementVNode("div", { class: "grid grid-cols-2 gap-4" }, [
2040
+ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" }),
2041
+ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" })
2042
+ ]),
2043
+ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" })
2044
+ ]),
2045
+ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100 rounded" }),
2046
+ createElementVNode("div", { class: "h-[80px] bg-fm-color-neutral-gray-100 rounded" }),
2047
+ createElementVNode("div", { class: "space-y-3" }, [
2048
+ createElementVNode("div", { class: "grid grid-cols-2 gap-4" }, [
2049
+ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" }),
2050
+ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" })
2051
+ ]),
2052
+ createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100" })
2053
+ ])
2054
+ ])
2055
+ ], -1)),
2056
+ createVNode(i, { class: "h-[150px] bg-fm-color-neutral-gray-100" })
2054
2057
  ])
2055
2058
  ])
2056
2059
  ])
@@ -2062,12 +2065,12 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
2062
2065
  unref(data) ? (openBlock(), createElementBlock("div", _hoisted_3, [
2063
2066
  createVNode(u, {
2064
2067
  modelValue: unref(currentStep),
2065
- "onUpdate:modelValue": c[1] || (c[1] = (l) => isRef(currentStep) ? currentStep.value = l : null),
2068
+ "onUpdate:modelValue": d[1] || (d[1] = (l) => isRef(currentStep) ? currentStep.value = l : null),
2066
2069
  orientation: "horizontal",
2067
2070
  class: "xs:hidden mx-[-24px] mt-16 mb-24 flex-1"
2068
2071
  }, {
2069
2072
  default: withCtx(() => [
2070
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (l, n) => (openBlock(), createBlock(r, {
2073
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (l, n) => (openBlock(), createBlock(s, {
2071
2074
  key: l.name,
2072
2075
  title: unref(t)(l.name),
2073
2076
  value: n + 1,
@@ -2081,16 +2084,16 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
2081
2084
  createVNode(a, {
2082
2085
  icon: "close",
2083
2086
  variant: "tertiary",
2084
- onClick: c[2] || (c[2] = (l) => sheetVisible.value = !1)
2087
+ onClick: d[2] || (d[2] = (l) => sheetVisible.value = !1)
2085
2088
  }),
2086
2089
  createVNode(u, {
2087
2090
  modelValue: unref(currentStep),
2088
- "onUpdate:modelValue": c[3] || (c[3] = (l) => isRef(currentStep) ? currentStep.value = l : null),
2091
+ "onUpdate:modelValue": d[3] || (d[3] = (l) => isRef(currentStep) ? currentStep.value = l : null),
2089
2092
  orientation: "horizontal",
2090
2093
  class: "flex-1"
2091
2094
  }, {
2092
2095
  default: withCtx(() => [
2093
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (l, n) => (openBlock(), createBlock(r, {
2096
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (l, n) => (openBlock(), createBlock(s, {
2094
2097
  key: l.name,
2095
2098
  title: unref(sheetTitle),
2096
2099
  description: unref(t)(l.name),
@@ -2104,7 +2107,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
2104
2107
  createVNode(a, {
2105
2108
  icon: "info",
2106
2109
  variant: "tertiary",
2107
- onClick: c[4] || (c[4] = () => showSummaryDialog())
2110
+ onClick: d[4] || (d[4] = () => showSummaryDialog())
2108
2111
  })
2109
2112
  ]),
2110
2113
  createElementVNode("div", _hoisted_5, [
@@ -2128,25 +2131,25 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
2128
2131
  class: "space-y-24"
2129
2132
  }, [
2130
2133
  createElementVNode("div", _hoisted_7, toDisplayString(l.name ? unref(t)(l.name) : ""), 1),
2131
- (openBlock(!0), createElementBlock(Fragment, null, renderList(l.fields, (d, g) => (openBlock(), createElementBlock("div", { key: g }, [
2134
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(l.fields, (m, g) => (openBlock(), createElementBlock("div", { key: g }, [
2132
2135
  (openBlock(), createBlock(_sfc_main$2, {
2133
2136
  key: g,
2134
- field: d,
2135
- modelValue: unref(_).get(unref(data), d.property),
2136
- disabled: isDisable(d),
2137
- "onUpdate:modelValue": (y) => onUpdateProperty(d.property, y),
2137
+ field: m,
2138
+ modelValue: unref(_).get(unref(data), m.property),
2139
+ disabled: isDisable(m),
2140
+ "onUpdate:modelValue": (y) => onUpdateProperty(m.property, y),
2138
2141
  "onUpdate:file": async (y, v) => {
2139
2142
  const h = await onUpdateFile(y, v);
2140
- onUpdateProperty(d.property, h || "");
2143
+ onUpdateProperty(m.property, h || "");
2141
2144
  },
2142
2145
  schema: unref(ZodHelper).typeAtPath(
2143
2146
  unref(schema),
2144
- d.property,
2147
+ m.property,
2145
2148
  unref(data).campaign.type != "MISSION" ? [unref(data).campaign.type] : ["STAMP", "MISSION"]
2146
2149
  ),
2147
- "helper-state": unref(ZodHelper).helperState(unref(errors), d.property),
2148
- "helper-text": unref(ZodHelper).helperText(unref(errors), d.property),
2149
- extras: d.extras != null ? d.extras == "" ? unref(data) : unref(_).get(unref(data), d.extras) : void 0
2150
+ "helper-state": unref(ZodHelper).helperState(unref(errors), m.property),
2151
+ "helper-text": unref(ZodHelper).helperText(unref(errors), m.property),
2152
+ extras: m.extras != null ? m.extras == "" ? unref(data) : unref(_).get(unref(data), m.extras) : void 0
2150
2153
  }, null, 8, ["field", "modelValue", "disabled", "onUpdate:modelValue", "onUpdate:file", "schema", "helper-state", "helper-text", "extras"]))
2151
2154
  ]))), 128))
2152
2155
  ]))), 128)),
@@ -2155,12 +2158,12 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
2155
2158
  label: "Back",
2156
2159
  variant: "tertiary",
2157
2160
  disabled: unref(currentStep) == 1,
2158
- onClick: c[5] || (c[5] = (l) => currentStep.value--)
2161
+ onClick: d[5] || (d[5] = (l) => currentStep.value--)
2159
2162
  }, null, 8, ["disabled"]),
2160
2163
  createVNode(a, {
2161
2164
  disabled: unref(currentStep) - 1 < unref(template).steps.length - 1 ? stepErrors().length > 0 : unref(errors).length > 0,
2162
2165
  label: unref(currentStep) - 1 < unref(template).steps.length - 1 ? "Next" : "Submit",
2163
- onClick: c[6] || (c[6] = (l) => unref(currentStep) - 1 < unref(template).steps.length - 1 ? currentStep.value++ : onSubmit())
2166
+ onClick: d[6] || (d[6] = (l) => unref(currentStep) - 1 < unref(template).steps.length - 1 ? currentStep.value++ : onSubmit())
2164
2167
  }, null, 8, ["disabled", "label"])
2165
2168
  ])
2166
2169
  ]),