@feedmepos/mf-connect 0.1.98-beta.72 → 0.1.98-beta.73

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 (117) hide show
  1. package/dist/{App-DpYceiwG.js → App-C4XD_vWL.js} +8 -8
  2. package/dist/{AuditLogs-CG98b2qE.js → AuditLogs-DpevHGsA.js} +11 -11
  3. package/dist/{Bin-vdipv2fF.js → Bin-FRrYZ8pV.js} +8 -8
  4. package/dist/{Broadcast-ChwVqheE.js → Broadcast-CoefxWt-.js} +11 -11
  5. package/dist/{CampaignAnalytic-4PHO849x.js → CampaignAnalytic-CdZjzsLr.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DmnN4pjm.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DQOLEDzY.js} +6 -6
  7. package/dist/{Card-B6ol3PQw.js → Card-BABL96V6.js} +21 -21
  8. package/dist/{Collections-DodNIUr1.js → Collections-D6XuhBO1.js} +8 -8
  9. package/dist/{Credit-CJQyAZYw.js → Credit-D2WTeN8Z.js} +12 -12
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang--FqHJ7Ez.js → DateRangeChip.vue_vue_type_script_setup_true_lang-B0KkvFWi.js} +1 -1
  11. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CA31QP-A.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-G2oU70Ef.js} +546 -497
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DkKhdp7G.js → EffectSheet.vue_vue_type_style_index_0_lang-C4RByg0k.js} +6 -6
  13. package/dist/{Experience-iLAKddx_.js → Experience-CUqmspwT.js} +12 -12
  14. package/dist/{FileSaver.min-w_ExQ0py.js → FileSaver.min-DX17A8Gj.js} +1 -1
  15. package/dist/{Game-DWdUbsAg.js → Game-D8IvyDdA.js} +13 -13
  16. package/dist/{GiftCardSetup-DnQ5vwxu.js → GiftCardSetup-BOSKBH8c.js} +10 -10
  17. package/dist/{Grab-CFLRHs5w.js → Grab-CnBGt_H2.js} +9 -9
  18. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-uQJvjvTe.js → ImageInput.vue_vue_type_script_setup_true_lang-BI00YCKv.js} +1 -1
  19. package/dist/{Index-CUy4z2tS.js → Index-BovDOTbf.js} +10 -10
  20. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-hKJ41Fe_.js → LocationPicker.vue_vue_type_script_setup_true_lang-D8auavm7.js} +1 -1
  21. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BDmtqTVC.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BM99IoIG.js} +1 -1
  22. package/dist/{LoyaltyDashboard-C5o7KriA.js → LoyaltyDashboard-DiCQnQ76.js} +13 -13
  23. package/dist/{MainLayout-Dt0ywph3.js → MainLayout-Cg37dK-P.js} +3 -3
  24. package/dist/{Marketing-BHwxzBZ0.js → Marketing-DRCT9dBo.js} +4 -4
  25. package/dist/{MarketingMaterialEdit-B6k4ceGx.js → MarketingMaterialEdit-DcE0A8_A.js} +6 -6
  26. package/dist/{Member-DcPZfTj6.js → Member-C8T1-ywK.js} +7 -7
  27. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-CiiBrlHY.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-CTl8LtJ9.js} +23 -23
  28. package/dist/{MemberImportHistory-DmPMuu1g.js → MemberImportHistory-CYCxxxN7.js} +7 -7
  29. package/dist/{MemberList-f9JejfNW.js → MemberList-Ddlnm4JX.js} +14 -14
  30. package/dist/{MemberTransactions-D1YSXeX-.js → MemberTransactions-DwyZTeZb.js} +1 -1
  31. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-freeE-DP.js → MessageInput.vue_vue_type_script_setup_true_lang-BWCxGlQO.js} +10 -10
  32. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-m7ytg0ok.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-LdVeH7gh.js} +1 -1
  33. package/dist/{Mission-BaaEl5BV.js → Mission-CW0y8Bzw.js} +13 -13
  34. package/dist/{Overview-fx-0E3b8.js → Overview-CO4T3l6l.js} +19 -19
  35. package/dist/{Overview-CviY55Gs.js → Overview-i2XPL7Pu.js} +4 -4
  36. package/dist/{Point-BfqtflbC.js → Point-CNWdfqQZ.js} +12 -12
  37. package/dist/{Promotion-Be2ogRYt.js → Promotion-DAemCP79.js} +13 -13
  38. package/dist/{Queue-CLSUL-Cx.js → Queue-DI50gMny.js} +11 -11
  39. package/dist/{Record-CpTMQT7B.js → Record-DX3WHXku.js} +9 -9
  40. package/dist/{Review-DzSDx7dY.js → Review-DzSNG4Le.js} +2 -2
  41. package/dist/{ReviewFacebookCallback-CvbPJADM.js → ReviewFacebookCallback-CrdRUN3t.js} +5 -5
  42. package/dist/{ReviewGoogleCallback-DJlqMbh3.js → ReviewGoogleCallback-Da28WNzU.js} +5 -5
  43. package/dist/{Reward-DJOmd6Z5.js → Reward-DUQAE99I.js} +16 -16
  44. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DY9fYxwc.js → RewardGroup.vue_vue_type_script_setup_true_lang-BGAOPkwD.js} +12 -12
  45. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BgYK4hpo.js → RuleGroup.vue_vue_type_script_setup_true_lang-B9Dbe9no.js} +13 -13
  46. package/dist/{Segment-G6xmeEaq.js → Segment-BgVf2-G2.js} +24 -24
  47. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-C3O0biLZ.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DDLXF5HM.js} +13 -13
  48. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CWP5sGT7.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-9UiH43em.js} +4 -4
  49. package/dist/{Setting-CKp441AW.js → Setting-3jW6EbKA.js} +14 -14
  50. package/dist/{SettingAdvertisements-C4Uf-DgK.js → SettingAdvertisements-C40QcuSn.js} +12 -12
  51. package/dist/{Settings-CTvMVwp6.js → Settings-DT9bypKs.js} +5 -5
  52. package/dist/{Store-Bzei6Xev.js → Store-DQyOUfEJ.js} +25 -25
  53. package/dist/{StoreRewards-DMQNIpF5.js → StoreRewards-Dr_c0PbO.js} +15 -15
  54. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-mm1jbcvo.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Bh5h8Lc_.js} +24 -24
  55. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BspBXIO2.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-LquvtnTy.js} +2 -2
  56. package/dist/{Tier-BN32RwYr.js → Tier-DmqfEWcB.js} +25 -25
  57. package/dist/{Title-BIhgfRUI.js → Title-Dx6pcJfP.js} +21 -21
  58. package/dist/{Transaction-CPjA7IN9.js → Transaction-CD6agt6m.js} +2 -2
  59. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DSutMvfk.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CNjBtitb.js} +6 -6
  60. package/dist/{Voucher-CGJtn9bC.js → Voucher-P4dyOeUd.js} +14 -14
  61. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-B-IwtPvx.js → VoucherEditor.vue_vue_type_script_setup_true_lang-Bv--fzY0.js} +12 -12
  62. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Ce9xPwqA.js → ZodTextField.vue_vue_type_script_setup_true_lang-Bq_7U0NO.js} +2 -2
  63. package/dist/{app-DAtx6aZ4.js → app-CmqX1V1B.js} +1254 -1239
  64. package/dist/app.js +1 -1
  65. package/dist/{base.export-BtRC4aWM.js → base.export-guVE-B2c.js} +2 -2
  66. package/dist/{business-BZUIs8Ub.js → business-DXmGtwPm.js} +1 -1
  67. package/dist/{campaign-B6I6PuY4.js → campaign-CVXbgs-y.js} +2 -2
  68. package/dist/{campaign-DKjBjV2k.js → campaign-D9Jufumh.js} +103 -101
  69. package/dist/{campaign.enum-BQy3e845.js → campaign.enum-CXhYMbkx.js} +1 -1
  70. package/dist/{campaign.fn--qVJ3jeH.js → campaign.fn-DoJPn6yl.js} +27 -27
  71. package/dist/{collectible.enum-vcvRFGl0.js → collectible.enum-Tk6LIMMm.js} +1 -1
  72. package/dist/{collection.fn-C3bMPBkC.js → collection.fn-DCVNYQau.js} +2 -2
  73. package/dist/{currency--R6VPInw.js → currency-BYhkCI6F.js} +1 -1
  74. package/dist/{duplicateCampaign-aIsX9cCi.js → duplicateCampaign-BOVBZHFs.js} +2 -2
  75. package/dist/{effect-CbjmtRph.js → effect-e6wYWgc8.js} +1 -1
  76. package/dist/{email-addresses-DZKMnoKf.js → email-addresses-Dcd_vAeM.js} +2 -2
  77. package/dist/{helper-BGqw2-RO.js → helper-DluoQ6zi.js} +1 -1
  78. package/dist/{index-kkhrPH6s.js → index-2QCDTrA9.js} +2 -2
  79. package/dist/{index-LnCoUCnx.js → index-BAs9N7bi.js} +3 -3
  80. package/dist/{index-CVvSd60O.js → index-BFzBAm6P.js} +1 -1
  81. package/dist/{index-ClP7Xy6Q.js → index-BpAhyOgv.js} +1 -1
  82. package/dist/{index-Bb4TieR_.js → index-C-oypk0K.js} +3 -3
  83. package/dist/{index-B9DM5Vuv.js → index-C9JY8Ru6.js} +2 -2
  84. package/dist/{index-DcA0B-Y5.js → index-CBRWvjup.js} +7 -7
  85. package/dist/{index-D-P90w8K.js → index-CDdNExzM.js} +1 -1
  86. package/dist/{index-CVYbfRGO.js → index-ChYMoLaB.js} +1 -1
  87. package/dist/{index-v8Zv-2ko.js → index-CiJQlOu7.js} +7 -7
  88. package/dist/{index-C22GPEM-.js → index-DB51l5yi.js} +1 -1
  89. package/dist/{index-FnsjvtSo.js → index-DIP_uzZm.js} +5 -5
  90. package/dist/{index-7TKoSEJ2.js → index-DKrJlWH3.js} +1124 -1124
  91. package/dist/{index-CXL5WAH0.js → index-DoiGG41P.js} +3 -3
  92. package/dist/{index-D_o9LsHU.js → index-SQItAw7w.js} +3 -3
  93. package/dist/{index-BbpqZrkB.js → index-SS72WJs_.js} +1 -1
  94. package/dist/{index-BWlfW4Kr.js → index-kPcRcSFx.js} +2 -2
  95. package/dist/{index-LlFZ5kxi.js → index-qkkPuNFM.js} +5 -5
  96. package/dist/{index.esm2017-DO7bbE7J.js → index.esm2017-BLVWhb4f.js} +1 -1
  97. package/dist/{loading-CzWOx4tE.js → loading-ClX4Z1ZH.js} +1 -1
  98. package/dist/{lodash-B_gr6Ayu.js → lodash-Cxh2BWuW.js} +1 -1
  99. package/dist/{member-import-BxCrd9tq.js → member-import-DKfSDn0D.js} +1 -1
  100. package/dist/{membership-ILB4aB4h.js → membership-BBAosVNQ.js} +3 -3
  101. package/dist/{money-CpIK1N_r.js → money-CWzvdiFT.js} +1 -1
  102. package/dist/{number-leVwmDCm.js → number-Cp7TGBzd.js} +1 -1
  103. package/dist/{objectid-8hKuNcMN.js → objectid-CXWfUmP_.js} +9 -9
  104. package/dist/{plugins-DLIgnFIF.js → plugins-BKD6oEHa.js} +3 -3
  105. package/dist/{reward-DqT0zF01.js → reward-CrjStT4w.js} +1 -1
  106. package/dist/{rule-DBtMGLxD.js → rule-CBZRptRM.js} +8 -8
  107. package/dist/{template-CYKGCWY4.js → template-D4qWK9tk.js} +6 -6
  108. package/dist/{timezone-Brs5nrTL.js → timezone-t0WxSk3e.js} +1 -1
  109. package/dist/{transaction.fn-0ZZcVp-j.js → transaction.fn-DZp6Drqf.js} +2 -2
  110. package/dist/{trigger-LhNre1L9.js → trigger-DN5yeimJ.js} +5 -5
  111. package/dist/{useMarketingMaterialActions-DbDRMmhM.js → useMarketingMaterialActions-ChkZyyRO.js} +3 -3
  112. package/dist/{usePagination-DmZX0V64.js → usePagination-Vda9U5Dh.js} +1 -1
  113. package/dist/{user-CBPsvnx9.js → user-jEjTV3E6.js} +1 -1
  114. package/dist/{vue-i18n-BPeSHE3c.js → vue-i18n-Bg_RJ_GV.js} +474 -474
  115. package/dist/{xlsx-Cm3vGmLN.js → xlsx-unW4U5Tx.js} +440 -440
  116. package/dist/{zod-GTEcy37q.js → zod-DIsCEUuE.js} +1 -1
  117. package/package.json +1 -1
@@ -1,45 +1,45 @@
1
1
  import { defineComponent, ref, watch, resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, unref, createCommentVNode, computed, onMounted, toDisplayString, createBlock, withCtx, Fragment, renderList, withModifiers, isRef, createTextVNode, normalizeClass, watchEffect, resolveDynamicComponent, toRefs, normalizeStyle, createSlots } from "vue";
2
- import { _ } from "./lodash-B_gr6Ayu.js";
3
- import { S as S6, f as Zh, z as z$1 } from "./app-DAtx6aZ4.js";
4
- import { Z as ZodHelper } from "./zod-GTEcy37q.js";
5
- import { F as FdoObjectId, z } from "./index-Bb4TieR_.js";
6
- import { e as FdoGroup, F as F_RUNNABLE_CAMPAIGN_TYPE, f as FdtoRunnableCampaign, g as FdoCreditLoyaltyReward, h as FdtoRandomReward, i as F_MISSION_TYPE, j as FdoThresholdCreditReward, k as FdtoThresholdReward, l as FdoMission } from "./index-FnsjvtSo.js";
7
- import { F as FdtoCollectibleConfig } from "./index-LnCoUCnx.js";
8
- import { a as isRuleGroup, R as RuleBuilder, s as stripRruleDtstartExceptSchedule, i as isRuleEntry, T as TEMPLATES } from "./index-DcA0B-Y5.js";
9
- import { g as F_APP_INBOX_DESTINATION, A as APP_INBOX_BODY_LIMIT, t as toDelivery, h as toLegacyMessage } from "./index-7TKoSEJ2.js";
10
- import { e as CHANNEL_DISPLAY_ORDER, i as isPaidChannel, f as isChannelComplete, h as addChannel, j as setMode, k as hasDraft, l as setPrimaryChannel, r as removeChannel, m as moveChannel, n as setChannelContent, o as getCampaignSummaryObject, p as normaliseBroadcastDelivery } from "./campaign-DKjBjV2k.js";
11
- import { u as useMembershipStore } from "./membership-ILB4aB4h.js";
12
- import { u as useBusinessStore } from "./business-BZUIs8Ub.js";
2
+ import { _ } from "./lodash-Cxh2BWuW.js";
3
+ import { S as S6, f as Zh, z as z$1 } from "./app-CmqX1V1B.js";
4
+ import { Z as ZodHelper } from "./zod-DIsCEUuE.js";
5
+ import { F as FdoObjectId, z } from "./index-C-oypk0K.js";
6
+ import { e as FdoGroup, F as F_RUNNABLE_CAMPAIGN_TYPE, f as FdtoRunnableCampaign, g as FdoCreditLoyaltyReward, h as FdtoRandomReward, i as F_MISSION_TYPE, j as FdoThresholdCreditReward, k as FdtoThresholdReward, l as FdoMission } from "./index-DIP_uzZm.js";
7
+ import { F as FdtoCollectibleConfig } from "./index-BAs9N7bi.js";
8
+ import { a as isRuleGroup, R as RuleBuilder, s as stripRruleDtstartExceptSchedule, i as isRuleEntry, T as TEMPLATES } from "./index-CBRWvjup.js";
9
+ import { A as APP_INBOX_BODY_LIMIT, g as FdoBroadcastUrl, h as F_PUSH_DESTINATION, t as toDelivery, i as toLegacyMessage } from "./index-DKrJlWH3.js";
10
+ import { e as CHANNEL_DISPLAY_ORDER, i as isPaidChannel, f as isChannelComplete, h as addChannel, j as setMode, k as hasDraft, l as setPrimaryChannel, r as removeChannel, m as moveChannel, n as setChannelContent, o as getCampaignSummaryObject, p as normaliseBroadcastDelivery } from "./campaign-D9Jufumh.js";
11
+ import { u as useMembershipStore } from "./membership-BBAosVNQ.js";
12
+ import { u as useBusinessStore } from "./business-DXmGtwPm.js";
13
13
  import { J as JsonViewer } from "./JsonViewer-v8_C7l5N.js";
14
14
  import { h as hooks } from "./moment-D7p2TMB-.js";
15
- import { f as featureVersionMapping } from "./campaign.enum-BQy3e845.js";
16
- import { _ as _sfc_main$C } from "./ImageInput.vue_vue_type_script_setup_true_lang-uQJvjvTe.js";
17
- import { b as _sfc_main$A, a as _sfc_main$D, _ as _sfc_main$F } from "./EffectSheet.vue_vue_type_style_index_0_lang-DkKhdp7G.js";
18
- import { _ as _sfc_main$E } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-BspBXIO2.js";
19
- import { c as core, S as SvcConfig } from "./index-B9DM5Vuv.js";
20
- import { p as prompt, f as firebaseStorage } from "./plugins-DLIgnFIF.js";
15
+ import { f as featureVersionMapping } from "./campaign.enum-CXhYMbkx.js";
16
+ import { _ as _sfc_main$C } from "./ImageInput.vue_vue_type_script_setup_true_lang-BI00YCKv.js";
17
+ import { b as _sfc_main$A, a as _sfc_main$D, _ as _sfc_main$F } from "./EffectSheet.vue_vue_type_style_index_0_lang-C4RByg0k.js";
18
+ import { _ as _sfc_main$E } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-LquvtnTy.js";
19
+ import { c as core, S as SvcConfig } from "./index-C9JY8Ru6.js";
20
+ import { p as prompt, f as firebaseStorage } from "./plugins-BKD6oEHa.js";
21
21
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-CHgC5LLL.js";
22
- import { _ as _sfc_main$G } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-DSutMvfk.js";
23
- import { a as _sfc_main$u, _ as _sfc_main$y } from "./RuleGroup.vue_vue_type_script_setup_true_lang-BgYK4hpo.js";
24
- import { u as useI18n } from "./vue-i18n-BPeSHE3c.js";
25
- import { T as TypeToTriggerOptions, _ as _sfc_main$H, b as _sfc_main$I } from "./trigger-LhNre1L9.js";
26
- import { D as DEFAULT_MESSAGE_VARIABLES, b as _sfc_main$v, g as getSmsMessageMetrics, _ as _sfc_main$w, a as _sfc_main$x } from "./MessageInput.vue_vue_type_script_setup_true_lang-freeE-DP.js";
22
+ import { _ as _sfc_main$G } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-CNjBtitb.js";
23
+ import { a as _sfc_main$u, _ as _sfc_main$y } from "./RuleGroup.vue_vue_type_script_setup_true_lang-B9Dbe9no.js";
24
+ import { u as useI18n } from "./vue-i18n-Bg_RJ_GV.js";
25
+ import { T as TypeToTriggerOptions, _ as _sfc_main$H, b as _sfc_main$I } from "./trigger-DN5yeimJ.js";
26
+ import { D as DEFAULT_MESSAGE_VARIABLES, b as _sfc_main$v, g as getSmsMessageMetrics, _ as _sfc_main$w, a as _sfc_main$x } from "./MessageInput.vue_vue_type_script_setup_true_lang-BWCxGlQO.js";
27
27
  import { useCoreStore } from "@feedmepos/mf-common";
28
- import { c as campaignApi } from "./index-kkhrPH6s.js";
29
- import { m as membershipApi } from "./index-D_o9LsHU.js";
30
- import { m as moment } from "./index-CVYbfRGO.js";
31
- import { c as calculateNextScheduleAt, R as RRule, S as SummarizeRrule, g as getRruleAnchorDate } from "./rule-DBtMGLxD.js";
32
- import { C as CountryTimezone } from "./timezone-Brs5nrTL.js";
33
- import { _ as _sfc_main$z, a as _sfc_main$B } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-B-IwtPvx.js";
34
- import "./index-LlFZ5kxi.js";
35
- import "./index-CXL5WAH0.js";
36
- import { a as F_GAME_TYPE } from "./collectible.enum-vcvRFGl0.js";
37
- import { u as useLoading } from "./loading-CzWOx4tE.js";
38
- import { i as initCollectibleConfig } from "./helper-BGqw2-RO.js";
39
- import { C as CollectionUtils } from "./collection.fn-C3bMPBkC.js";
28
+ import { c as campaignApi } from "./index-2QCDTrA9.js";
29
+ import { m as membershipApi } from "./index-SQItAw7w.js";
30
+ import { m as moment } from "./index-ChYMoLaB.js";
31
+ import { c as calculateNextScheduleAt, R as RRule, S as SummarizeRrule, g as getRruleAnchorDate } from "./rule-CBZRptRM.js";
32
+ import { C as CountryTimezone } from "./timezone-t0WxSk3e.js";
33
+ import { _ as _sfc_main$z, a as _sfc_main$B } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-Bv--fzY0.js";
34
+ import "./index-qkkPuNFM.js";
35
+ import "./index-DoiGG41P.js";
36
+ import { a as F_GAME_TYPE } from "./collectible.enum-Tk6LIMMm.js";
37
+ import { u as useLoading } from "./loading-ClX4Z1ZH.js";
38
+ import { i as initCollectibleConfig } from "./helper-DluoQ6zi.js";
39
+ import { C as CollectionUtils } from "./collection.fn-DCVNYQau.js";
40
40
  import { s as sentenceCase$1 } from "./index-CuvNtC_M.js";
41
41
  import { useDialog } from "@feedmepos/ui-library";
42
- import { u as useCampaignStore } from "./campaign-B6I6PuY4.js";
42
+ import { u as useCampaignStore } from "./campaign-CVXbgs-y.js";
43
43
  import { a as cleanPF } from "./object-BYyQ0PZp.js";
44
44
  function campaignRefinement(e, s) {
45
45
  var i, c;
@@ -124,8 +124,8 @@ function campaignRefinement(e, s) {
124
124
  }
125
125
  ];
126
126
  n.length == l.length && n.every((r) => l.some((p) => {
127
- const h = RuleBuilder.simplify(p);
128
- return h.property === r.property && r.operator.includes(h.operator);
127
+ const v = RuleBuilder.simplify(p);
128
+ return v.property === r.property && r.operator.includes(v.operator);
129
129
  })) || s.addIssue({
130
130
  code: "custom",
131
131
  path: ["campaign", "event", "rule"],
@@ -352,7 +352,7 @@ const _hoisted_1$r = {
352
352
  d("confirm", a);
353
353
  }
354
354
  return (a, r) => {
355
- const p = resolveComponent("FmIcon"), h = resolveComponent("FmButton");
355
+ const p = resolveComponent("FmIcon"), v = resolveComponent("FmButton");
356
356
  return e.visible ? (openBlock(), createElementBlock("div", _hoisted_1$r, [
357
357
  createElementVNode("div", _hoisted_2$n, [
358
358
  createElementVNode("div", _hoisted_3$k, [
@@ -362,7 +362,7 @@ const _hoisted_1$r = {
362
362
  }),
363
363
  r[0] || (r[0] = createElementVNode("h3", { class: "fm-typo-en-body-lg-600" }, "Select Items", -1))
364
364
  ]),
365
- createVNode(h, {
365
+ createVNode(v, {
366
366
  icon: "close",
367
367
  variant: "tertiary",
368
368
  onClick: l
@@ -380,12 +380,12 @@ const _hoisted_1$r = {
380
380
  }, null, 8, ["initial-value", "filter-items"])
381
381
  ]),
382
382
  createElementVNode("div", _hoisted_5$g, [
383
- createVNode(h, {
383
+ createVNode(v, {
384
384
  variant: "secondary",
385
385
  label: "Cancel",
386
386
  onClick: l
387
387
  }),
388
- createVNode(h, {
388
+ createVNode(v, {
389
389
  variant: "primary",
390
390
  label: "Confirm Selection",
391
391
  onClick: c
@@ -397,7 +397,7 @@ const _hoisted_1$r = {
397
397
  }), _hoisted_1$q = {
398
398
  key: 0,
399
399
  class: "bg-fm-color-neutral-gray-50 border border-fm-color-neutral-gray-200 rounded-8 p-16 space-y-16"
400
- }, _hoisted_2$m = { class: "flex items-center justify-between" }, _hoisted_3$j = { class: "flex items-center gap-8" }, _hoisted_4$i = { class: "flex gap-16 items-center flex-wrap" }, _hoisted_5$f = { class: "flex gap-8 items-center" }, _hoisted_6$b = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _hoisted_7$a = { class: "bg-white border border-fm-color-neutral-gray-200 rounded-8 max-h-[300px] overflow-y-auto" }, _hoisted_8$8 = { class: "flex items-center gap-12" }, _hoisted_9$8 = { class: "fm-typo-en-body-md-600" }, _hoisted_10$8 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _hoisted_11$6 = {
400
+ }, _hoisted_2$m = { class: "flex items-center justify-between" }, _hoisted_3$j = { class: "flex items-center gap-8" }, _hoisted_4$i = { class: "flex gap-16 items-center flex-wrap" }, _hoisted_5$f = { class: "flex gap-8 items-center" }, _hoisted_6$b = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _hoisted_7$a = { class: "bg-white border border-fm-color-neutral-gray-200 rounded-8 max-h-[300px] overflow-y-auto" }, _hoisted_8$9 = { class: "flex items-center gap-12" }, _hoisted_9$9 = { class: "fm-typo-en-body-md-600" }, _hoisted_10$8 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _hoisted_11$6 = {
401
401
  key: 1,
402
402
  class: "p-24 text-center"
403
403
  }, _hoisted_12$5 = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _hoisted_13$5 = { class: "flex justify-end gap-8 pt-8 border-t border-fm-color-neutral-gray-200" }, _sfc_main$s = /* @__PURE__ */ defineComponent({
@@ -432,10 +432,10 @@ const _hoisted_1$r = {
432
432
  }), onMounted(async () => {
433
433
  await i.store.getMenu(), p();
434
434
  });
435
- function h(u) {
435
+ function v(u) {
436
436
  c.value[u] = !c.value[u];
437
437
  }
438
- function y() {
438
+ function f() {
439
439
  const u = r.value === a.value.length;
440
440
  a.value.forEach((m) => {
441
441
  c.value[m.id] = !u;
@@ -446,18 +446,18 @@ const _hoisted_1$r = {
446
446
  c.value[u] = !1;
447
447
  });
448
448
  }
449
- function x() {
449
+ function k() {
450
450
  const u = Object.entries(c.value).filter(([, m]) => m).map(([m]) => m);
451
451
  d("confirm", u);
452
452
  }
453
- function f() {
453
+ function y() {
454
454
  d("cancel");
455
455
  }
456
- const v = computed(() => a.value.length > 0 && a.value.every(
456
+ const g = computed(() => a.value.length > 0 && a.value.every(
457
457
  (u) => c.value[u.id]
458
458
  ));
459
459
  return (u, m) => {
460
- const C = resolveComponent("FmIcon"), k = resolveComponent("FmButton"), $ = resolveComponent("FmTextField"), F = resolveComponent("FmCheckbox"), N = resolveComponent("FmListItem"), D = resolveComponent("FmList");
460
+ const C = resolveComponent("FmIcon"), x = resolveComponent("FmButton"), $ = resolveComponent("FmTextField"), F = resolveComponent("FmCheckbox"), N = resolveComponent("FmListItem"), D = resolveComponent("FmList");
461
461
  return e.visible ? (openBlock(), createElementBlock("div", _hoisted_1$q, [
462
462
  createElementVNode("div", _hoisted_2$m, [
463
463
  createElementVNode("div", _hoisted_3$j, [
@@ -467,23 +467,23 @@ const _hoisted_1$r = {
467
467
  }),
468
468
  m[2] || (m[2] = createElementVNode("h3", { class: "fm-typo-en-body-lg-600" }, "Select Categories", -1))
469
469
  ]),
470
- createVNode(k, {
470
+ createVNode(x, {
471
471
  icon: "close",
472
472
  variant: "tertiary",
473
- onClick: f
473
+ onClick: y
474
474
  })
475
475
  ]),
476
476
  m[3] || (m[3] = createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Choose which categories this discount applies to. The discount will be available for all items within the selected categories. ", -1)),
477
477
  createElementVNode("div", _hoisted_4$i, [
478
478
  createElementVNode("div", _hoisted_5$f, [
479
- createVNode(k, {
479
+ createVNode(x, {
480
480
  icon: "select_all",
481
481
  variant: "tertiary",
482
482
  size: "small",
483
- label: `${v.value ? "Deselect" : "Select"} All`,
484
- onClick: y
483
+ label: `${g.value ? "Deselect" : "Select"} All`,
484
+ onClick: f
485
485
  }, null, 8, ["label"]),
486
- createVNode(k, {
486
+ createVNode(x, {
487
487
  icon: "sync",
488
488
  variant: "tertiary",
489
489
  size: "small",
@@ -506,26 +506,26 @@ const _hoisted_1$r = {
506
506
  (openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (w) => (openBlock(), createBlock(N, {
507
507
  key: w.id,
508
508
  clickable: !0,
509
- onClick: (O) => h(w.id)
509
+ onClick: (O) => v(w.id)
510
510
  }, {
511
511
  leading: withCtx(() => [
512
512
  createVNode(F, {
513
513
  "model-value": c.value[w.id] || !1,
514
514
  value: w.id,
515
- "onUpdate:modelValue": (O) => h(w.id),
515
+ "onUpdate:modelValue": (O) => v(w.id),
516
516
  onClick: m[1] || (m[1] = withModifiers(() => {
517
517
  }, ["stop"]))
518
518
  }, null, 8, ["model-value", "value", "onUpdate:modelValue"])
519
519
  ]),
520
520
  default: withCtx(() => [
521
- createElementVNode("div", _hoisted_8$8, [
521
+ createElementVNode("div", _hoisted_8$9, [
522
522
  createVNode(C, {
523
523
  name: "category",
524
524
  size: "sm",
525
525
  class: "text-fm-color-typo-secondary"
526
526
  }),
527
527
  createElementVNode("div", null, [
528
- createElementVNode("div", _hoisted_9$8, toDisplayString(w.name), 1),
528
+ createElementVNode("div", _hoisted_9$9, toDisplayString(w.name), 1),
529
529
  createElementVNode("div", _hoisted_10$8, " ID: " + toDisplayString(w.id), 1)
530
530
  ])
531
531
  ])
@@ -539,16 +539,16 @@ const _hoisted_1$r = {
539
539
  ]))
540
540
  ]),
541
541
  createElementVNode("div", _hoisted_13$5, [
542
- createVNode(k, {
542
+ createVNode(x, {
543
543
  variant: "secondary",
544
544
  label: "Cancel",
545
- onClick: f
545
+ onClick: y
546
546
  }),
547
- createVNode(k, {
547
+ createVNode(x, {
548
548
  variant: "primary",
549
549
  label: `Confirm Selection (${r.value})`,
550
550
  disabled: r.value === 0,
551
- onClick: x
551
+ onClick: k
552
552
  }, null, 8, ["label", "disabled"])
553
553
  ])
554
554
  ])) : createCommentVNode("", !0);
@@ -557,7 +557,7 @@ const _hoisted_1$r = {
557
557
  }), _hoisted_1$p = { class: "space-y-8" }, _hoisted_2$l = {
558
558
  key: 1,
559
559
  class: "border-1 rounded-md flex gap-16 items-center justify-between px-16 py-12"
560
- }, _hoisted_3$i = { class: "fm-typo-en-body-lg-400" }, _hoisted_4$h = { class: "text-fm-color-typo-secondary" }, _hoisted_5$e = { key: 0 }, _hoisted_6$a = { class: "space-y-24" }, _hoisted_7$9 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary mt-4" }, _hoisted_8$7 = { key: 0 }, _hoisted_9$7 = { class: "fm-typo-en-body-md-600 mb-8 block" }, _hoisted_10$7 = { key: 1 }, _hoisted_11$5 = { key: 2 }, _hoisted_12$4 = { key: 0 }, _hoisted_13$4 = { class: "space-y-8" }, _hoisted_14$4 = { class: "flex items-center justify-between p-12 border border-fm-color-neutral-gray-200 fm-corner-radius-md" }, _hoisted_15$3 = { class: "flex items-center gap-8" }, _hoisted_16$2 = { class: "fm-typo-en-body-md-400" }, _hoisted_17$2 = { key: 3 }, _hoisted_18$2 = { key: 0 }, _hoisted_19$2 = { class: "space-y-8" }, _hoisted_20$2 = { class: "flex items-center justify-between p-12 border border-fm-color-neutral-gray-200 fm-corner-radius-md" }, _hoisted_21$1 = { class: "flex items-center gap-8" }, _hoisted_22$1 = { class: "fm-typo-en-body-md-400" }, _hoisted_23$1 = {
560
+ }, _hoisted_3$i = { class: "fm-typo-en-body-lg-400" }, _hoisted_4$h = { class: "text-fm-color-typo-secondary" }, _hoisted_5$e = { key: 0 }, _hoisted_6$a = { class: "space-y-24" }, _hoisted_7$9 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary mt-4" }, _hoisted_8$8 = { key: 0 }, _hoisted_9$8 = { class: "fm-typo-en-body-md-600 mb-8 block" }, _hoisted_10$7 = { key: 1 }, _hoisted_11$5 = { key: 2 }, _hoisted_12$4 = { key: 0 }, _hoisted_13$4 = { class: "space-y-8" }, _hoisted_14$4 = { class: "flex items-center justify-between p-12 border border-fm-color-neutral-gray-200 fm-corner-radius-md" }, _hoisted_15$3 = { class: "flex items-center gap-8" }, _hoisted_16$2 = { class: "fm-typo-en-body-md-400" }, _hoisted_17$2 = { key: 3 }, _hoisted_18$2 = { key: 0 }, _hoisted_19$2 = { class: "space-y-8" }, _hoisted_20$2 = { class: "flex items-center justify-between p-12 border border-fm-color-neutral-gray-200 fm-corner-radius-md" }, _hoisted_21$1 = { class: "flex items-center gap-8" }, _hoisted_22$1 = { class: "fm-typo-en-body-md-400" }, _hoisted_23$1 = {
561
561
  key: 0,
562
562
  class: "mt-16 p-12 bg-fm-color-feedback-error-light rounded-8 border border-fm-color-feedback-error-main"
563
563
  }, _hoisted_24$1 = { class: "flex items-center gap-8 mb-8 text-fm-color-system-error-300" }, _hoisted_25 = { class: "space-y-4" }, _hoisted_26 = { class: "flex gap-16" }, _sfc_main$r = /* @__PURE__ */ defineComponent({
@@ -585,16 +585,16 @@ const _hoisted_1$r = {
585
585
  });
586
586
  const r = computed(() => {
587
587
  var b;
588
- return !(!a.value.type || !((b = a.value.scope) != null && b.type) || y(a.value.type) && (!a.value.value || a.value.value <= 0) || (a.value.scope.type === "items" || a.value.scope.type === "category") && (!a.value.scope.objectIDs || a.value.scope.objectIDs.length === 0));
588
+ return !(!a.value.type || !((b = a.value.scope) != null && b.type) || f(a.value.type) && (!a.value.value || a.value.value <= 0) || (a.value.scope.type === "items" || a.value.scope.type === "category") && (!a.value.scope.objectIDs || a.value.scope.objectIDs.length === 0));
589
589
  });
590
590
  async function p(b) {
591
591
  b.stopPropagation(), await prompt.remove("Are you sure you want to remove this discount?") && d("update:model-value", null);
592
592
  }
593
- function h() {
593
+ function v() {
594
594
  var b;
595
595
  return C(((b = a.value.scope) == null ? void 0 : b.type) || "order");
596
596
  }
597
- function y(b) {
597
+ function f(b) {
598
598
  return b && !["freeItem", "delivery"].includes(b);
599
599
  }
600
600
  function V(b) {
@@ -602,13 +602,13 @@ const _hoisted_1$r = {
602
602
  b
603
603
  );
604
604
  }
605
- function x(b) {
605
+ function k(b) {
606
606
  return b != null && b.includes("Percentage") ? "Discount percentage" : b != null && b.includes("FixPrice") ? "Bundle fixed price" : b === "percentage" ? "Discount percentage" : "Discount amount";
607
607
  }
608
- function f(b) {
608
+ function y(b) {
609
609
  return b != null && b.includes("Percentage") || b === "percentage" ? "10" : "5.00";
610
610
  }
611
- function v(b) {
611
+ function g(b) {
612
612
  return b != null && b.includes("Percentage") || b === "percentage" ? "%" : "$";
613
613
  }
614
614
  function u(b, B) {
@@ -629,7 +629,7 @@ const _hoisted_1$r = {
629
629
  }, b === "type") {
630
630
  const P = C(B);
631
631
  P.some(
632
- (g) => g.value === a.value.type
632
+ (h) => h.value === a.value.type
633
633
  ) || (a.value = {
634
634
  ...a.value,
635
635
  type: ((U = P[0]) == null ? void 0 : U.value) || "net",
@@ -686,7 +686,7 @@ const _hoisted_1$r = {
686
686
  ];
687
687
  }
688
688
  }
689
- function k(b) {
689
+ function x(b) {
690
690
  switch (b) {
691
691
  case "order":
692
692
  return "Applies to entire order. Available: Amount off, Percentage off, Delivery fee discount.";
@@ -713,7 +713,7 @@ const _hoisted_1$r = {
713
713
  return "No items selected";
714
714
  const B = i.menu.value;
715
715
  return B && b.length <= 3 ? b.map((P) => {
716
- const A = B.modules.item.find((g) => g._id === P);
716
+ const A = B.modules.item.find((h) => h._id === P);
717
717
  return A ? (A.name2 || A.name).trim() : `Item ${P}`;
718
718
  }).join(", ") : b.length === 1 ? "1 item selected" : `${b.length} items selected`;
719
719
  }
@@ -724,7 +724,7 @@ const _hoisted_1$r = {
724
724
  return "No categories selected";
725
725
  const B = i.menu.value;
726
726
  return B && b.length <= 3 ? b.map((P) => {
727
- const A = B.modules.category.find((g) => g._id === P);
727
+ const A = B.modules.category.find((h) => h._id === P);
728
728
  return A ? A.name : `Category ${P}`;
729
729
  }).join(", ") : b.length === 1 ? "1 category selected" : `${b.length} categories selected`;
730
730
  }
@@ -749,7 +749,7 @@ const _hoisted_1$r = {
749
749
  const G = computed(() => {
750
750
  var B, T, U;
751
751
  const b = [];
752
- return a.value.type || b.push("Discount type is required"), (B = a.value.scope) != null && B.type || b.push("Scope type is required"), y(a.value.type) && (!a.value.value || a.value.value <= 0) && b.push("Discount amount must be greater than 0"), ((T = a.value.scope) == null ? void 0 : T.type) === "items" && (!a.value.scope.objectIDs || a.value.scope.objectIDs.length === 0) && b.push("Please select at least one item"), ((U = a.value.scope) == null ? void 0 : U.type) === "category" && (!a.value.scope.objectIDs || a.value.scope.objectIDs.length === 0) && b.push("Please select at least one category"), b;
752
+ return a.value.type || b.push("Discount type is required"), (B = a.value.scope) != null && B.type || b.push("Scope type is required"), f(a.value.type) && (!a.value.value || a.value.value <= 0) && b.push("Discount amount must be greater than 0"), ((T = a.value.scope) == null ? void 0 : T.type) === "items" && (!a.value.scope.objectIDs || a.value.scope.objectIDs.length === 0) && b.push("Please select at least one item"), ((U = a.value.scope) == null ? void 0 : U.type) === "category" && (!a.value.scope.objectIDs || a.value.scope.objectIDs.length === 0) && b.push("Please select at least one category"), b;
753
753
  });
754
754
  function Y() {
755
755
  d("update:model-value", a.value), c.value = !1;
@@ -760,8 +760,8 @@ const _hoisted_1$r = {
760
760
  { label: "Category discount", value: "category" }
761
761
  ];
762
762
  return (b, B) => {
763
- const T = resolveComponent("FmButton"), U = resolveComponent("FmSelect"), P = resolveComponent("FmStepperField"), A = resolveComponent("FmIcon"), g = resolveComponent("FmSideSheet");
764
- return openBlock(), createBlock(g, {
763
+ const T = resolveComponent("FmButton"), U = resolveComponent("FmSelect"), P = resolveComponent("FmStepperField"), A = resolveComponent("FmIcon"), h = resolveComponent("FmSideSheet");
764
+ return openBlock(), createBlock(h, {
765
765
  "max-width": 550,
766
766
  header: "Apply discount",
767
767
  modelValue: unref(c),
@@ -829,7 +829,7 @@ const _hoisted_1$r = {
829
829
  placeholder: "Select campaign type",
830
830
  items: Z
831
831
  }, null, 8, ["model-value"]),
832
- createElementVNode("div", _hoisted_7$9, toDisplayString(k((R = unref(a).scope) == null ? void 0 : R.type)), 1)
832
+ createElementVNode("div", _hoisted_7$9, toDisplayString(x((R = unref(a).scope) == null ? void 0 : R.type)), 1)
833
833
  ]),
834
834
  createElementVNode("div", null, [
835
835
  B[9] || (B[9] = createElementVNode("label", { class: "fm-typo-en-body-md-600 mb-8 block" }, "Discount type", -1)),
@@ -837,16 +837,16 @@ const _hoisted_1$r = {
837
837
  "model-value": unref(a).type,
838
838
  "onUpdate:modelValue": B[1] || (B[1] = (L) => u("type", L)),
839
839
  placeholder: "Select discount type",
840
- items: h()
840
+ items: v()
841
841
  }, null, 8, ["model-value", "items"])
842
842
  ]),
843
- y(unref(a).type) ? (openBlock(), createElementBlock("div", _hoisted_8$7, [
844
- createElementVNode("label", _hoisted_9$7, toDisplayString(x(unref(a).type)), 1),
843
+ f(unref(a).type) ? (openBlock(), createElementBlock("div", _hoisted_8$8, [
844
+ createElementVNode("label", _hoisted_9$8, toDisplayString(k(unref(a).type)), 1),
845
845
  createVNode(P, {
846
846
  modelValue: unref(a).value,
847
847
  "onUpdate:modelValue": B[2] || (B[2] = (L) => unref(a).value = L),
848
- placeholder: f(unref(a).type),
849
- suffix: v(unref(a).type),
848
+ placeholder: y(unref(a).type),
849
+ suffix: g(unref(a).type),
850
850
  type: "number"
851
851
  }, null, 8, ["modelValue", "placeholder", "suffix"])
852
852
  ])) : createCommentVNode("", !0),
@@ -993,14 +993,14 @@ const _hoisted_1$r = {
993
993
  }
994
994
  }
995
995
  return (n, a) => {
996
- var h;
996
+ var v;
997
997
  const r = resolveComponent("FmRadio"), p = resolveComponent("FmRadioGroup");
998
998
  return openBlock(), createElementBlock("div", _hoisted_1$o, [
999
999
  createVNode(p, {
1000
1000
  modelValue: unref(c),
1001
1001
  "onUpdate:modelValue": [
1002
- a[0] || (a[0] = (y) => isRef(c) ? c.value = y : null),
1003
- a[1] || (a[1] = (y) => l(y))
1002
+ a[0] || (a[0] = (f) => isRef(c) ? c.value = f : null),
1003
+ a[1] || (a[1] = (f) => l(f))
1004
1004
  ]
1005
1005
  }, {
1006
1006
  default: withCtx(() => [
@@ -1020,12 +1020,12 @@ const _hoisted_1$r = {
1020
1020
  class: "!mt-[0px]",
1021
1021
  "include-only": "trigger",
1022
1022
  "trigger-type": "SCHEDULE",
1023
- "model-value": ((h = e.modelValue) == null ? void 0 : h.rules.g_time) ?? unref(RuleBuilder).scaffoldGroup("g_time"),
1024
- "onUpdate:modelValue": a[2] || (a[2] = (y) => i(
1023
+ "model-value": ((v = e.modelValue) == null ? void 0 : v.rules.g_time) ?? unref(RuleBuilder).scaffoldGroup("g_time"),
1024
+ "onUpdate:modelValue": a[2] || (a[2] = (f) => i(
1025
1025
  "update:model-value",
1026
1026
  unref(RuleBuilder).setRuleToGroup(
1027
1027
  e.modelValue ?? unref(RuleBuilder).scaffoldGroup(),
1028
- y,
1028
+ f,
1029
1029
  "&&"
1030
1030
  )
1031
1031
  ))
@@ -1275,7 +1275,7 @@ const _hoisted_1$r = {
1275
1275
  ]);
1276
1276
  };
1277
1277
  }
1278
- }), _hoisted_1$l = { class: "flex flex-col gap-16" }, _hoisted_2$i = { class: "mb-[6px] flex items-baseline justify-between" }, _hoisted_3$f = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _hoisted_4$e = { class: "mb-[6px] flex items-baseline justify-between" }, _hoisted_5$c = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _hoisted_6$9 = { class: "flex items-center justify-between gap-8" }, _hoisted_7$8 = { class: "fm-typo-en-body-lg-400" }, _hoisted_8$6 = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _hoisted_9$6 = { class: "flex flex-col gap-8" }, _hoisted_10$6 = { class: "flex items-baseline justify-between" }, _hoisted_11$4 = { class: "fm-typo-en-body-lg-400" }, _hoisted_12$3 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _hoisted_13$3 = { class: "min-w-[160px] flex-1" }, _hoisted_14$3 = { class: "min-w-[180px] flex-1" }, TITLE_LIMIT$1 = 40, PREVIEW_LIMIT = 120, MAX_BUTTONS = 2, TITLE_WARN_AT$1 = 34, PREVIEW_WARN_AT = 110, _sfc_main$l = /* @__PURE__ */ defineComponent({
1278
+ }), _hoisted_1$l = { class: "flex flex-col gap-16" }, _hoisted_2$i = { class: "mb-[6px] flex items-baseline justify-between" }, _hoisted_3$f = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _hoisted_4$e = { class: "mb-[6px] flex items-baseline justify-between" }, _hoisted_5$c = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _hoisted_6$9 = { class: "flex items-center justify-between gap-8" }, _hoisted_7$8 = { class: "fm-typo-en-body-lg-400" }, _hoisted_8$7 = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _hoisted_9$7 = { class: "flex flex-col gap-8" }, _hoisted_10$6 = { class: "flex items-baseline justify-between" }, _hoisted_11$4 = { class: "fm-typo-en-body-lg-400" }, _hoisted_12$3 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _hoisted_13$3 = { class: "min-w-[160px] flex-1" }, _hoisted_14$3 = { class: "min-w-[180px] flex-1" }, TITLE_LIMIT$1 = 40, PREVIEW_LIMIT = 120, MAX_BUTTONS = 2, TITLE_WARN_AT$1 = 34, PREVIEW_WARN_AT = 110, _sfc_main$l = /* @__PURE__ */ defineComponent({
1279
1279
  __name: "AppInboxInput",
1280
1280
  props: {
1281
1281
  modelValue: {
@@ -1285,187 +1285,234 @@ const _hoisted_1$r = {
1285
1285
  variables: {
1286
1286
  type: Array,
1287
1287
  default: () => [...DEFAULT_MESSAGE_VARIABLES]
1288
+ },
1289
+ /** False until the form is submitted; broadcasts validate on submit. */
1290
+ showValidation: {
1291
+ type: Boolean,
1292
+ default: !0
1288
1293
  }
1289
1294
  },
1290
1295
  emits: ["update:model-value"],
1291
1296
  setup(e, { emit: s }) {
1292
- const { t: o } = useI18n(), d = e, i = s, c = F_APP_INBOX_DESTINATION.options;
1293
- function l(V) {
1297
+ const { t: o } = useI18n(), d = e, i = s;
1298
+ function c(V) {
1294
1299
  i("update:model-value", { ...d.modelValue, ...V });
1295
1300
  }
1296
- function n(V, x) {
1297
- return V >= x ? "text-fm-color-system-warning-400" : "text-fm-color-typo-secondary";
1301
+ function l(V, k) {
1302
+ return V >= k ? "text-fm-color-system-warning-400" : "text-fm-color-typo-secondary";
1298
1303
  }
1299
- const a = computed(() => d.modelValue.buttons ?? []), r = computed(() => {
1304
+ const n = computed(() => d.modelValue.buttons ?? []), a = computed(() => {
1300
1305
  var V;
1301
1306
  return ((V = d.modelValue.content) == null ? void 0 : V.length) ?? 0;
1302
1307
  });
1303
- function p(V, x) {
1304
- l({
1305
- buttons: a.value.map(
1306
- (f, v) => v === V ? { ...f, ...x } : f
1308
+ function r(V, k) {
1309
+ c({
1310
+ buttons: n.value.map(
1311
+ (y, g) => g === V ? { ...y, ...k } : y
1307
1312
  )
1308
1313
  });
1309
1314
  }
1310
- function h() {
1311
- a.value.length >= MAX_BUTTONS || l({ buttons: [...a.value, { label: "", destination: "NONE" }] });
1315
+ function p() {
1316
+ n.value.length >= MAX_BUTTONS || c({ buttons: [...n.value, { label: "", url: "" }] });
1312
1317
  }
1313
- function y(V) {
1314
- l({ buttons: a.value.filter((x, f) => f !== V) });
1318
+ function v(V) {
1319
+ var y;
1320
+ if (!d.showValidation) return { label: void 0, url: void 0 };
1321
+ const k = (y = V.url) == null ? void 0 : y.trim();
1322
+ return {
1323
+ label: V.label.trim() ? void 0 : o("connect.campaign.appInbox.buttonLabelRequired"),
1324
+ url: k ? FdoBroadcastUrl.safeParse(k).success ? void 0 : o("connect.campaign.push.linkUrlInvalid") : o("connect.campaign.appInbox.buttonUrlRequired")
1325
+ };
1326
+ }
1327
+ function f(V) {
1328
+ c({ buttons: n.value.filter((k, y) => y !== V) });
1315
1329
  }
1316
- return (V, x) => {
1317
- const f = resolveComponent("FmTextField"), v = resolveComponent("FmSelect"), u = resolveComponent("FmButton");
1330
+ return (V, k) => {
1331
+ const y = resolveComponent("FmTextField"), g = resolveComponent("FmButton");
1318
1332
  return openBlock(), createElementBlock("div", _hoisted_1$l, [
1319
1333
  createElementVNode("div", null, [
1320
1334
  createElementVNode("div", _hoisted_2$i, [
1321
1335
  createElementVNode("span", _hoisted_3$f, toDisplayString(unref(o)("connect.campaign.appInbox.title")), 1),
1322
1336
  createElementVNode("span", {
1323
- class: normalizeClass(["fm-typo-en-body-sm-400", n(e.modelValue.title.length, TITLE_WARN_AT$1)])
1337
+ class: normalizeClass(["fm-typo-en-body-sm-400", l(e.modelValue.title.length, TITLE_WARN_AT$1)])
1324
1338
  }, toDisplayString(e.modelValue.title.length) + " / " + toDisplayString(TITLE_LIMIT$1), 3)
1325
1339
  ]),
1326
- createVNode(f, {
1340
+ createVNode(y, {
1327
1341
  "model-value": e.modelValue.title,
1328
1342
  "max-length": TITLE_LIMIT$1,
1329
1343
  placeholder: unref(o)("connect.campaign.appInbox.titlePlaceholder"),
1330
- "onUpdate:modelValue": x[0] || (x[0] = (m) => l({ title: m }))
1344
+ "onUpdate:modelValue": k[0] || (k[0] = (u) => c({ title: u }))
1331
1345
  }, null, 8, ["model-value", "placeholder"])
1332
1346
  ]),
1333
1347
  createElementVNode("div", null, [
1334
1348
  createElementVNode("div", _hoisted_4$e, [
1335
1349
  createElementVNode("span", _hoisted_5$c, toDisplayString(unref(o)("connect.campaign.appInbox.previewText")), 1),
1336
1350
  createElementVNode("span", {
1337
- class: normalizeClass(["fm-typo-en-body-sm-400", n(e.modelValue.previewText.length, PREVIEW_WARN_AT)])
1351
+ class: normalizeClass(["fm-typo-en-body-sm-400", l(e.modelValue.previewText.length, PREVIEW_WARN_AT)])
1338
1352
  }, toDisplayString(e.modelValue.previewText.length) + " / " + toDisplayString(PREVIEW_LIMIT), 3)
1339
1353
  ]),
1340
- createVNode(f, {
1354
+ createVNode(y, {
1341
1355
  "model-value": e.modelValue.previewText,
1342
1356
  "max-length": PREVIEW_LIMIT,
1343
1357
  placeholder: unref(o)("connect.campaign.appInbox.previewTextPlaceholder"),
1344
- "onUpdate:modelValue": x[1] || (x[1] = (m) => l({ previewText: m }))
1358
+ "onUpdate:modelValue": k[1] || (k[1] = (u) => c({ previewText: u }))
1345
1359
  }, null, 8, ["model-value", "placeholder"])
1346
1360
  ]),
1347
1361
  createElementVNode("div", _hoisted_6$9, [
1348
1362
  createElementVNode("div", null, [
1349
1363
  createElementVNode("div", _hoisted_7$8, toDisplayString(unref(o)("connect.campaign.appInbox.bodyMessage")), 1),
1350
- createElementVNode("div", _hoisted_8$6, toDisplayString(unref(o)("connect.campaign.appInbox.bodyMessageDescription")), 1),
1364
+ createElementVNode("div", _hoisted_8$7, toDisplayString(unref(o)("connect.campaign.appInbox.bodyMessageDescription")), 1),
1351
1365
  createElementVNode("div", {
1352
1366
  class: normalizeClass([
1353
1367
  "mt-[2px] fm-typo-en-body-sm-400",
1354
- unref(r) > unref(APP_INBOX_BODY_LIMIT) ? "text-fm-color-system-error-400" : "text-fm-color-typo-secondary"
1368
+ unref(a) > unref(APP_INBOX_BODY_LIMIT) ? "text-fm-color-system-error-400" : "text-fm-color-typo-secondary"
1355
1369
  ])
1356
- }, toDisplayString(unref(r)) + " / " + toDisplayString(unref(APP_INBOX_BODY_LIMIT)), 3)
1370
+ }, toDisplayString(unref(a)) + " / " + toDisplayString(unref(APP_INBOX_BODY_LIMIT)), 3)
1357
1371
  ]),
1358
1372
  createVNode(_sfc_main$v, {
1359
1373
  html: e.modelValue.content,
1360
1374
  variables: e.variables,
1361
1375
  "media-limit": 1,
1362
1376
  "button-label": unref(o)("connect.campaign.appInbox.editBodyMessage"),
1363
- "onUpdate:html": x[2] || (x[2] = (m) => l({ content: m.html }))
1377
+ "onUpdate:html": k[2] || (k[2] = (u) => c({ content: u.html }))
1364
1378
  }, null, 8, ["html", "variables", "button-label"])
1365
1379
  ]),
1366
- createElementVNode("div", _hoisted_9$6, [
1380
+ createElementVNode("div", _hoisted_9$7, [
1367
1381
  createElementVNode("div", _hoisted_10$6, [
1368
1382
  createElementVNode("span", _hoisted_11$4, toDisplayString(unref(o)("connect.campaign.appInbox.buttons")), 1),
1369
- createElementVNode("span", _hoisted_12$3, toDisplayString(unref(a).length) + " / " + toDisplayString(MAX_BUTTONS), 1)
1383
+ createElementVNode("span", _hoisted_12$3, toDisplayString(unref(n).length) + " / " + toDisplayString(MAX_BUTTONS), 1)
1370
1384
  ]),
1371
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(a), (m, C) => (openBlock(), createElementBlock("div", {
1372
- key: C,
1385
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (u, m) => (openBlock(), createElementBlock("div", {
1386
+ key: m,
1373
1387
  class: "flex flex-wrap items-start gap-8"
1374
1388
  }, [
1375
1389
  createElementVNode("div", _hoisted_13$3, [
1376
- createVNode(f, {
1377
- "model-value": m.label,
1390
+ createVNode(y, {
1391
+ "model-value": u.label,
1392
+ "max-length": 20,
1378
1393
  placeholder: unref(o)("connect.campaign.appInbox.buttonLabel"),
1379
- "onUpdate:modelValue": (k) => p(C, { label: k })
1380
- }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
1394
+ "helper-state": v(u).label ? "error" : "none",
1395
+ "helper-text": v(u).label,
1396
+ "onUpdate:modelValue": (C) => r(m, { label: C })
1397
+ }, null, 8, ["model-value", "placeholder", "helper-state", "helper-text", "onUpdate:modelValue"])
1381
1398
  ]),
1382
1399
  createElementVNode("div", _hoisted_14$3, [
1383
- createVNode(v, {
1384
- "model-value": m.destination,
1385
- items: unref(c).map((k) => ({
1386
- label: unref(o)(`connect.campaign.appInbox.destination.${k}`),
1387
- value: k
1388
- })),
1389
- "onUpdate:modelValue": (k) => p(C, { destination: k })
1390
- }, null, 8, ["model-value", "items", "onUpdate:modelValue"])
1400
+ createVNode(y, {
1401
+ "model-value": u.url ?? "",
1402
+ inputmode: "url",
1403
+ placeholder: unref(o)("connect.campaign.push.linkUrlPlaceholder"),
1404
+ "helper-state": v(u).url ? "error" : "none",
1405
+ "helper-text": v(u).url,
1406
+ "onUpdate:modelValue": (C) => r(m, { url: C.trim() })
1407
+ }, null, 8, ["model-value", "placeholder", "helper-state", "helper-text", "onUpdate:modelValue"])
1391
1408
  ]),
1392
- createVNode(u, {
1409
+ createVNode(g, {
1393
1410
  icon: "delete",
1394
1411
  "icon-color": "neutral-gray-400",
1395
1412
  variant: "tertiary",
1396
- onClick: (k) => y(C)
1413
+ onClick: (C) => f(m)
1397
1414
  }, null, 8, ["onClick"])
1398
1415
  ]))), 128)),
1399
- unref(a).length < MAX_BUTTONS ? (openBlock(), createBlock(u, {
1416
+ unref(n).length < MAX_BUTTONS ? (openBlock(), createBlock(g, {
1400
1417
  key: 0,
1401
1418
  variant: "tertiary",
1402
1419
  icon: "add",
1403
1420
  label: unref(o)("connect.campaign.appInbox.addButton"),
1404
- onClick: h
1421
+ onClick: p
1405
1422
  }, null, 8, ["label"])) : createCommentVNode("", !0)
1406
1423
  ])
1407
1424
  ]);
1408
1425
  };
1409
1426
  }
1410
- }), _hoisted_1$k = { class: "flex flex-col gap-16" }, _hoisted_2$h = { class: "mb-[6px] flex items-baseline justify-between" }, _hoisted_3$e = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _hoisted_4$d = { class: "mb-[6px] flex items-baseline justify-between" }, _hoisted_5$b = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _hoisted_6$8 = { class: "mb-[6px] fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _hoisted_7$7 = { class: "mt-4 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, TITLE_LIMIT = 40, BODY_LIMIT = 120, TITLE_WARN_AT = 34, BODY_WARN_AT = 110, _sfc_main$k = /* @__PURE__ */ defineComponent({
1427
+ }), _hoisted_1$k = { class: "flex flex-col gap-16" }, _hoisted_2$h = { class: "mb-[6px] flex items-baseline justify-between" }, _hoisted_3$e = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _hoisted_4$d = { class: "mb-[6px] flex items-baseline justify-between" }, _hoisted_5$b = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _hoisted_6$8 = { class: "mb-[6px] fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _hoisted_7$7 = {
1428
+ key: 0,
1429
+ class: "mt-4 fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
1430
+ }, _hoisted_8$6 = {
1431
+ key: 1,
1432
+ class: "mt-12"
1433
+ }, _hoisted_9$6 = { class: "mb-[6px] fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, TITLE_LIMIT = 40, BODY_LIMIT = 120, TITLE_WARN_AT = 34, BODY_WARN_AT = 110, _sfc_main$k = /* @__PURE__ */ defineComponent({
1411
1434
  __name: "PushInput",
1412
1435
  props: {
1413
1436
  modelValue: {
1414
1437
  type: Object,
1415
1438
  required: !0
1439
+ },
1440
+ /** False until the form is submitted; broadcasts validate on submit. */
1441
+ showValidation: {
1442
+ type: Boolean,
1443
+ default: !0
1416
1444
  }
1417
1445
  },
1418
1446
  emits: ["update:model-value"],
1419
1447
  setup(e, { emit: s }) {
1420
- const { t: o } = useI18n(), d = e, i = s, c = F_APP_INBOX_DESTINATION.options;
1421
- function l(a) {
1422
- i("update:model-value", { ...d.modelValue, ...a });
1448
+ const { t: o } = useI18n(), d = e, i = s, c = F_PUSH_DESTINATION.options, l = computed(() => d.modelValue.destination === "EXTERNAL"), n = computed(() => {
1449
+ var f;
1450
+ if (!d.showValidation || !l.value) return;
1451
+ const v = (f = d.modelValue.url) == null ? void 0 : f.trim();
1452
+ return v ? FdoBroadcastUrl.safeParse(v).success ? void 0 : o("connect.campaign.push.linkUrlInvalid") : o("connect.campaign.push.linkUrlRequired");
1453
+ });
1454
+ function a(v) {
1455
+ i("update:model-value", { ...d.modelValue, ...v });
1423
1456
  }
1424
- function n(a, r) {
1425
- return a >= r ? "text-fm-color-system-warning-400" : "text-fm-color-typo-secondary";
1457
+ function r(v) {
1458
+ a(v === "EXTERNAL" ? { destination: v } : { destination: v, url: null });
1426
1459
  }
1427
- return (a, r) => {
1428
- const p = resolveComponent("FmTextField"), h = resolveComponent("FmTextarea"), y = resolveComponent("FmSelect");
1460
+ function p(v, f) {
1461
+ return v >= f ? "text-fm-color-system-warning-400" : "text-fm-color-typo-secondary";
1462
+ }
1463
+ return (v, f) => {
1464
+ const V = resolveComponent("FmTextField"), k = resolveComponent("FmTextarea"), y = resolveComponent("FmSelect");
1429
1465
  return openBlock(), createElementBlock("div", _hoisted_1$k, [
1430
1466
  createElementVNode("div", null, [
1431
1467
  createElementVNode("div", _hoisted_2$h, [
1432
1468
  createElementVNode("span", _hoisted_3$e, toDisplayString(unref(o)("connect.campaign.push.title")), 1),
1433
1469
  createElementVNode("span", {
1434
- class: normalizeClass(["fm-typo-en-body-sm-400", n(e.modelValue.title.length, TITLE_WARN_AT)])
1470
+ class: normalizeClass(["fm-typo-en-body-sm-400", p(e.modelValue.title.length, TITLE_WARN_AT)])
1435
1471
  }, toDisplayString(e.modelValue.title.length) + " / " + toDisplayString(TITLE_LIMIT), 3)
1436
1472
  ]),
1437
- createVNode(p, {
1473
+ createVNode(V, {
1438
1474
  "model-value": e.modelValue.title,
1439
1475
  "max-length": TITLE_LIMIT,
1440
1476
  placeholder: unref(o)("connect.campaign.push.titlePlaceholder"),
1441
- "onUpdate:modelValue": r[0] || (r[0] = (V) => l({ title: V }))
1477
+ "onUpdate:modelValue": f[0] || (f[0] = (g) => a({ title: g }))
1442
1478
  }, null, 8, ["model-value", "placeholder"])
1443
1479
  ]),
1444
1480
  createElementVNode("div", null, [
1445
1481
  createElementVNode("div", _hoisted_4$d, [
1446
1482
  createElementVNode("span", _hoisted_5$b, toDisplayString(unref(o)("connect.campaign.push.body")), 1),
1447
1483
  createElementVNode("span", {
1448
- class: normalizeClass(["fm-typo-en-body-sm-400", n(e.modelValue.body.length, BODY_WARN_AT)])
1484
+ class: normalizeClass(["fm-typo-en-body-sm-400", p(e.modelValue.body.length, BODY_WARN_AT)])
1449
1485
  }, toDisplayString(e.modelValue.body.length) + " / " + toDisplayString(BODY_LIMIT), 3)
1450
1486
  ]),
1451
- createVNode(h, {
1487
+ createVNode(k, {
1452
1488
  "model-value": e.modelValue.body,
1453
1489
  "max-length": BODY_LIMIT,
1454
1490
  placeholder: unref(o)("connect.campaign.push.bodyPlaceholder"),
1455
- "onUpdate:modelValue": r[1] || (r[1] = (V) => l({ body: V }))
1491
+ "onUpdate:modelValue": f[1] || (f[1] = (g) => a({ body: g }))
1456
1492
  }, null, 8, ["model-value", "placeholder"])
1457
1493
  ]),
1458
1494
  createElementVNode("div", null, [
1459
1495
  createElementVNode("div", _hoisted_6$8, toDisplayString(unref(o)("connect.campaign.push.link")), 1),
1460
1496
  createVNode(y, {
1461
1497
  "model-value": e.modelValue.destination ?? "NONE",
1462
- items: unref(c).map((V) => ({
1463
- label: unref(o)(`connect.campaign.appInbox.destination.${V}`),
1464
- value: V
1498
+ items: unref(c).map((g) => ({
1499
+ label: unref(o)(`connect.campaign.appInbox.destination.${g}`),
1500
+ value: g
1465
1501
  })),
1466
- "onUpdate:modelValue": r[2] || (r[2] = (V) => l({ destination: V }))
1502
+ "onUpdate:modelValue": f[2] || (f[2] = (g) => r(g))
1467
1503
  }, null, 8, ["model-value", "items"]),
1468
- createElementVNode("div", _hoisted_7$7, toDisplayString(unref(o)("connect.campaign.push.linkHelper")), 1)
1504
+ unref(l) ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_7$7, toDisplayString(unref(o)("connect.campaign.push.linkHelper")), 1)),
1505
+ unref(l) ? (openBlock(), createElementBlock("div", _hoisted_8$6, [
1506
+ createElementVNode("div", _hoisted_9$6, toDisplayString(unref(o)("connect.campaign.push.linkUrl")), 1),
1507
+ createVNode(V, {
1508
+ "model-value": e.modelValue.url ?? "",
1509
+ inputmode: "url",
1510
+ placeholder: unref(o)("connect.campaign.push.linkUrlPlaceholder"),
1511
+ "helper-state": unref(n) ? "error" : "none",
1512
+ "helper-text": unref(n),
1513
+ "onUpdate:modelValue": f[3] || (f[3] = (g) => a({ url: g.trim() || null }))
1514
+ }, null, 8, ["model-value", "placeholder", "helper-state", "helper-text"])
1515
+ ])) : createCommentVNode("", !0)
1469
1516
  ])
1470
1517
  ]);
1471
1518
  };
@@ -1553,29 +1600,29 @@ const _hoisted_1$r = {
1553
1600
  ), c = computed(
1554
1601
  () => o.target === "SMS" || o.target === "WHATSAPP" ? o.content : void 0
1555
1602
  ), l = computed(() => {
1556
- var h, y;
1557
- const p = (y = (h = c.value) == null ? void 0 : h.content) == null ? void 0 : y.trim();
1603
+ var v, f;
1604
+ const p = (f = (v = c.value) == null ? void 0 : v.content) == null ? void 0 : f.trim();
1558
1605
  return p ? o.senderPrefix ? `${o.senderPrefix}${p}` : p : s("connect.campaign.broadcast.preview.emptyText");
1559
1606
  }), n = computed(() => {
1560
- var h;
1561
- const p = ((h = i.value) == null ? void 0 : h.content) ?? "";
1607
+ var v;
1608
+ const p = ((v = i.value) == null ? void 0 : v.content) ?? "";
1562
1609
  return p.trim() ? `<!doctype html><meta charset="utf-8"><base target="_blank"><style>
1563
1610
  html,body{margin:0;font:400 12px/1.5 Inter,system-ui,sans-serif;color:#1C1C1E;word-break:break-word}
1564
1611
  img{max-width:100%;height:auto}
1565
1612
  </style>${p}` : "";
1566
1613
  }), a = computed(() => {
1567
- const p = /* @__PURE__ */ new Date(), h = p.toLocaleDateString(void 0, {
1614
+ const p = /* @__PURE__ */ new Date(), v = p.toLocaleDateString(void 0, {
1568
1615
  weekday: "short",
1569
1616
  day: "2-digit",
1570
1617
  month: "short"
1571
- }), y = p.toLocaleTimeString(void 0, {
1618
+ }), f = p.toLocaleTimeString(void 0, {
1572
1619
  hour: "2-digit",
1573
1620
  minute: "2-digit"
1574
1621
  });
1575
- return `${h} · ${y}`;
1622
+ return `${v} · ${f}`;
1576
1623
  }), r = computed(() => o.target === "PUSH" ? s("connect.campaign.broadcast.preview.note.push") : o.target === "APP_INBOX" ? s("connect.campaign.broadcast.preview.note.inbox") : s("connect.campaign.broadcast.preview.note.text"));
1577
- return (p, h) => {
1578
- var y, V, x, f, v, u, m, C, k, $, F;
1624
+ return (p, v) => {
1625
+ var f, V, k, y, g, u, m, C, x, $, F;
1579
1626
  return e.target !== "EMAIL" ? (openBlock(), createElementBlock("div", _hoisted_1$i, [
1580
1627
  createElementVNode("div", _hoisted_2$f, toDisplayString(unref(s)("connect.campaign.broadcast.preview.title")), 1),
1581
1628
  createElementVNode("div", {
@@ -1595,15 +1642,15 @@ const _hoisted_1$r = {
1595
1642
  e.target === "PUSH" ? (openBlock(), createElementBlock("div", _hoisted_4$b, [
1596
1643
  createElementVNode("div", _hoisted_5$9, toDisplayString(unref(a)), 1),
1597
1644
  createElementVNode("div", _hoisted_6$6, [
1598
- createElementVNode("div", _hoisted_7$6, toDisplayString(((V = (y = unref(d)) == null ? void 0 : y.title) == null ? void 0 : V.trim()) || unref(s)("connect.campaign.broadcast.preview.emptyTitle")), 1),
1599
- createElementVNode("div", _hoisted_8$5, toDisplayString(((f = (x = unref(d)) == null ? void 0 : x.body) == null ? void 0 : f.trim()) || unref(s)("connect.campaign.broadcast.preview.emptyBody")), 1)
1645
+ createElementVNode("div", _hoisted_7$6, toDisplayString(((V = (f = unref(d)) == null ? void 0 : f.title) == null ? void 0 : V.trim()) || unref(s)("connect.campaign.broadcast.preview.emptyTitle")), 1),
1646
+ createElementVNode("div", _hoisted_8$5, toDisplayString(((y = (k = unref(d)) == null ? void 0 : k.body) == null ? void 0 : y.trim()) || unref(s)("connect.campaign.broadcast.preview.emptyBody")), 1)
1600
1647
  ])
1601
1648
  ])) : e.target === "APP_INBOX" ? (openBlock(), createElementBlock("div", _hoisted_9$5, [
1602
1649
  createElementVNode("div", _hoisted_10$5, toDisplayString(unref(s)("connect.campaign.broadcast.preview.inboxHeading")), 1),
1603
1650
  createElementVNode("div", _hoisted_11$3, [
1604
- createElementVNode("div", _hoisted_12$2, toDisplayString(((u = (v = unref(i)) == null ? void 0 : v.title) == null ? void 0 : u.trim()) || unref(s)("connect.campaign.broadcast.preview.emptyTitle")), 1),
1651
+ createElementVNode("div", _hoisted_12$2, toDisplayString(((u = (g = unref(i)) == null ? void 0 : g.title) == null ? void 0 : u.trim()) || unref(s)("connect.campaign.broadcast.preview.emptyTitle")), 1),
1605
1652
  createElementVNode("div", _hoisted_13$2, toDisplayString(((C = (m = unref(i)) == null ? void 0 : m.previewText) == null ? void 0 : C.trim()) || unref(s)("connect.campaign.broadcast.preview.emptyBody")), 1),
1606
- (k = unref(i)) != null && k.imageUrl ? (openBlock(), createElementBlock("img", {
1653
+ (x = unref(i)) != null && x.imageUrl ? (openBlock(), createElementBlock("img", {
1607
1654
  key: 0,
1608
1655
  src: unref(i).imageUrl,
1609
1656
  alt: "",
@@ -1682,7 +1729,7 @@ const _hoisted_1$r = {
1682
1729
  "icon-color": "neutral-gray-400",
1683
1730
  variant: "tertiary",
1684
1731
  disabled: p === 0,
1685
- onClick: (h) => i.$emit("move", r.channel, -1)
1732
+ onClick: (v) => i.$emit("move", r.channel, -1)
1686
1733
  }, null, 8, ["disabled", "onClick"])
1687
1734
  ], 8, _hoisted_11$2),
1688
1735
  createElementVNode("span", {
@@ -1694,7 +1741,7 @@ const _hoisted_1$r = {
1694
1741
  "icon-color": "neutral-gray-400",
1695
1742
  variant: "tertiary",
1696
1743
  disabled: p === e.rows.length - 1,
1697
- onClick: (h) => i.$emit("move", r.channel, 1)
1744
+ onClick: (v) => i.$emit("move", r.channel, 1)
1698
1745
  }, null, 8, ["disabled", "onClick"])
1699
1746
  ], 8, _hoisted_12$1),
1700
1747
  createElementVNode("span", {
@@ -1705,7 +1752,7 @@ const _hoisted_1$r = {
1705
1752
  icon: "delete",
1706
1753
  "icon-color": "neutral-gray-400",
1707
1754
  variant: "tertiary",
1708
- onClick: (h) => i.$emit("remove", r.channel)
1755
+ onClick: (v) => i.$emit("remove", r.channel)
1709
1756
  }, null, 8, ["onClick"])
1710
1757
  ], 8, _hoisted_13$1)
1711
1758
  ])
@@ -1783,41 +1830,41 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
1783
1830
  emits: ["update:model-value"],
1784
1831
  setup(e, { emit: s }) {
1785
1832
  const { t: o } = useI18n(), d = useCoreStore(), i = useMembershipStore(), c = e, l = s, n = ref(!1), a = ref("SMS"), r = computed(() => {
1786
- const g = c.modelValue;
1787
- return g && "channels" in g ? g : toDelivery({ message: g });
1833
+ const h = c.modelValue;
1834
+ return h && "channels" in h ? h : toDelivery({ message: h });
1788
1835
  });
1789
- function p(g) {
1790
- l("update:model-value", g);
1836
+ function p(h) {
1837
+ l("update:model-value", h);
1791
1838
  }
1792
- function h(g) {
1793
- return o(`connect.campaign.broadcast.channel.${g}`);
1839
+ function v(h) {
1840
+ return o(`connect.campaign.broadcast.channel.${h}`);
1794
1841
  }
1795
- const y = {
1842
+ const f = {
1796
1843
  SMS: "chat",
1797
1844
  WHATSAPP: "chat",
1798
1845
  EMAIL: "mail",
1799
1846
  APP_INBOX: "inbox",
1800
1847
  PUSH: "notifications"
1801
1848
  };
1802
- function V(g) {
1803
- return y[g];
1849
+ function V(h) {
1850
+ return f[h];
1804
1851
  }
1805
- const x = computed(() => r.value.mode === "fallback"), f = computed(
1852
+ const k = computed(() => r.value.mode === "fallback"), y = computed(
1806
1853
  () => c.variables.filter(
1807
- (g) => c.triggerType == "SCHEDULE" ? !g.startsWith("transaction.") : !0
1854
+ (h) => c.triggerType == "SCHEDULE" ? !h.startsWith("transaction.") : !0
1808
1855
  )
1809
1856
  );
1810
- function v(g) {
1811
- return g === "WHATSAPP" ? n.value : !0;
1857
+ function g(h) {
1858
+ return h === "WHATSAPP" ? n.value : !0;
1812
1859
  }
1813
1860
  const u = ["fallback", "all"];
1814
- function m(g) {
1815
- g !== r.value.mode && p(setMode(r.value, g));
1861
+ function m(h) {
1862
+ h !== r.value.mode && p(setMode(r.value, h));
1816
1863
  }
1817
1864
  const C = ref(null);
1818
- function k(g) {
1865
+ function x(h) {
1819
1866
  var R;
1820
- const E = (R = C.value) == null ? void 0 : R[g];
1867
+ const E = (R = C.value) == null ? void 0 : R[h];
1821
1868
  return E ? new Intl.NumberFormat(void 0, {
1822
1869
  style: "currency",
1823
1870
  currency: E.currency,
@@ -1826,126 +1873,126 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
1826
1873
  }).format(E.amount / 10 ** E.precision) : null;
1827
1874
  }
1828
1875
  const $ = computed(
1829
- () => CHANNEL_DISPLAY_ORDER.map((g) => {
1830
- const E = r.value.channels.includes(g), R = k(g);
1876
+ () => CHANNEL_DISPLAY_ORDER.map((h) => {
1877
+ const E = r.value.channels.includes(h), R = x(h);
1831
1878
  return {
1832
- channel: g,
1833
- label: h(g),
1879
+ channel: h,
1880
+ label: v(h),
1834
1881
  selected: E,
1835
- available: v(g),
1836
- rateNote: isPaidChannel(g) ? R ? o("connect.campaign.broadcast.perMessage", { price: R }) : null : o("connect.campaign.broadcast.freeChannel"),
1882
+ available: g(h),
1883
+ rateNote: isPaidChannel(h) ? R ? o("connect.campaign.broadcast.perMessage", { price: R }) : null : o("connect.campaign.broadcast.freeChannel"),
1837
1884
  // In fallback mode the grid is a radio for the primary channel, so only
1838
1885
  // the primary reads as checked; a fallback is tagged instead.
1839
- checked: x.value ? r.value.channels[0] === g : E,
1840
- usedAsFallback: x.value && r.value.channels.indexOf(g) > 0
1886
+ checked: k.value ? r.value.channels[0] === h : E,
1887
+ usedAsFallback: k.value && r.value.channels.indexOf(h) > 0
1841
1888
  };
1842
1889
  })
1843
1890
  );
1844
- async function F(g) {
1845
- if (v(g)) {
1846
- if (x.value) {
1847
- await N(g);
1891
+ async function F(h) {
1892
+ if (g(h)) {
1893
+ if (k.value) {
1894
+ await N(h);
1848
1895
  return;
1849
1896
  }
1850
- if (r.value.channels.includes(g)) {
1851
- await D(g);
1897
+ if (r.value.channels.includes(h)) {
1898
+ await D(h);
1852
1899
  return;
1853
1900
  }
1854
- p(addChannel(r.value, g, f.value));
1901
+ p(addChannel(r.value, h, y.value));
1855
1902
  }
1856
1903
  }
1857
- async function N(g) {
1904
+ async function N(h) {
1858
1905
  const E = r.value.channels[0];
1859
- E !== g && (E && hasDraft(r.value, E) && !await prompt.remove(
1906
+ E !== h && (E && hasDraft(r.value, E) && !await prompt.remove(
1860
1907
  o("connect.campaign.broadcast.replaceChannelConfirm", {
1861
- channel: h(E),
1862
- next: h(g)
1908
+ channel: v(E),
1909
+ next: v(h)
1863
1910
  })
1864
- ) || (p(setPrimaryChannel(r.value, g, f.value)), a.value = g));
1911
+ ) || (p(setPrimaryChannel(r.value, h, y.value)), a.value = h));
1865
1912
  }
1866
- async function D(g) {
1867
- if (hasDraft(r.value, g) && !await prompt.remove(
1913
+ async function D(h) {
1914
+ if (hasDraft(r.value, h) && !await prompt.remove(
1868
1915
  o("connect.campaign.broadcast.removeChannelConfirm", {
1869
- channel: h(g)
1916
+ channel: v(h)
1870
1917
  })
1871
1918
  ))
1872
1919
  return;
1873
- const E = removeChannel(r.value, g);
1874
- p(E), a.value === g && (a.value = E.channels[0] ?? "SMS");
1920
+ const E = removeChannel(r.value, h);
1921
+ p(E), a.value === h && (a.value = E.channels[0] ?? "SMS");
1875
1922
  }
1876
- function w(g, E) {
1877
- p(moveChannel(r.value, g, E));
1923
+ function w(h, E) {
1924
+ p(moveChannel(r.value, h, E));
1878
1925
  }
1879
1926
  const O = computed(
1880
- () => r.value.channels.slice(1).map((g, E) => ({
1881
- channel: g,
1882
- label: h(g),
1927
+ () => r.value.channels.slice(1).map((h, E) => ({
1928
+ channel: h,
1929
+ label: v(h),
1883
1930
  position: E + 2,
1884
- complete: !c.showValidation || isChannelComplete(r.value, g)
1931
+ complete: !c.showValidation || isChannelComplete(r.value, h)
1885
1932
  }))
1886
1933
  ), j = computed(
1887
1934
  () => CHANNEL_DISPLAY_ORDER.filter(
1888
- (g) => !r.value.channels.includes(g) && v(g)
1889
- ).map((g) => ({
1890
- channel: g,
1891
- label: h(g)
1935
+ (h) => !r.value.channels.includes(h) && g(h)
1936
+ ).map((h) => ({
1937
+ channel: h,
1938
+ label: v(h)
1892
1939
  }))
1893
1940
  ), I = computed(
1894
- () => r.value.channels.map((g, E) => ({
1895
- key: g,
1896
- label: h(g),
1897
- sub: x.value ? o(E === 0 ? "connect.campaign.broadcast.tab.firstAttempt" : "connect.campaign.broadcast.tab.ifNotReached") : o("connect.campaign.broadcast.tab.sendsToEligible"),
1898
- complete: !c.showValidation || isChannelComplete(r.value, g),
1899
- step: x.value ? E + 1 : void 0,
1900
- connector: E === 0 ? void 0 : x.value ? "→" : "+"
1941
+ () => r.value.channels.map((h, E) => ({
1942
+ key: h,
1943
+ label: v(h),
1944
+ sub: k.value ? o(E === 0 ? "connect.campaign.broadcast.tab.firstAttempt" : "connect.campaign.broadcast.tab.ifNotReached") : o("connect.campaign.broadcast.tab.sendsToEligible"),
1945
+ complete: !c.showValidation || isChannelComplete(r.value, h),
1946
+ step: k.value ? E + 1 : void 0,
1947
+ connector: E === 0 ? void 0 : k.value ? "→" : "+"
1901
1948
  }))
1902
1949
  );
1903
1950
  watchEffect(() => {
1904
- const g = I.value.map((E) => E.key);
1905
- g.length && !g.includes(a.value) && (a.value = g[0]);
1951
+ const h = I.value.map((E) => E.key);
1952
+ h.length && !h.includes(a.value) && (a.value = h[0]);
1906
1953
  });
1907
1954
  const H = computed(() => a.value), q = computed(() => {
1908
- const g = H.value;
1909
- if (!(g === "APP_INBOX" || g === "PUSH"))
1910
- return r.value.content[g];
1955
+ const h = H.value;
1956
+ if (!(h === "APP_INBOX" || h === "PUSH"))
1957
+ return r.value.content[h];
1911
1958
  }), G = computed(
1912
1959
  () => r.value.content.APP_INBOX
1913
1960
  ), Y = computed(
1914
1961
  () => r.value.content.PUSH
1915
1962
  );
1916
- function Z(g) {
1917
- p(setChannelContent(r.value, "APP_INBOX", g));
1963
+ function Z(h) {
1964
+ p(setChannelContent(r.value, "APP_INBOX", h));
1918
1965
  }
1919
- function b(g) {
1920
- p(setChannelContent(r.value, "PUSH", g));
1966
+ function b(h) {
1967
+ p(setChannelContent(r.value, "PUSH", h));
1921
1968
  }
1922
- function B(g, E) {
1923
- g === "APP_INBOX" || g === "PUSH" || p(setChannelContent(r.value, g, { ...E, channel: g }));
1969
+ function B(h, E) {
1970
+ h === "APP_INBOX" || h === "PUSH" || p(setChannelContent(r.value, h, { ...E, channel: h }));
1924
1971
  }
1925
1972
  const T = computed(
1926
1973
  () => r.value.channels.filter(isPaidChannel)
1927
1974
  ), U = computed(() => {
1928
1975
  var E, R, M;
1929
- const g = ((E = i.membership) == null ? void 0 : E.brand) || ((M = (R = d.currentBusiness) == null ? void 0 : R.value) == null ? void 0 : M.name) || "";
1930
- return getSmsMessageMetrics({ brandName: g, content: "" }).prefix;
1976
+ const h = ((E = i.membership) == null ? void 0 : E.brand) || ((M = (R = d.currentBusiness) == null ? void 0 : R.value) == null ? void 0 : M.name) || "";
1977
+ return getSmsMessageMetrics({ brandName: h, content: "" }).prefix;
1931
1978
  }), P = `${define_appEndpoint_default.licensePortalUrl}settings?businessId=${SvcConfig.businessId}`;
1932
1979
  async function A() {
1933
1980
  try {
1934
- const g = await membershipApi.getWhatsappNumbers();
1935
- n.value = g.some(
1981
+ const h = await membershipApi.getWhatsappNumbers();
1982
+ n.value = h.some(
1936
1983
  (E) => {
1937
1984
  var R;
1938
1985
  return (R = E == null ? void 0 : E.default) == null ? void 0 : R.includes("Marketing");
1939
1986
  }
1940
1987
  );
1941
- } catch (g) {
1942
- console.error("Failed to fetch WhatsApp numbers:", g);
1988
+ } catch (h) {
1989
+ console.error("Failed to fetch WhatsApp numbers:", h);
1943
1990
  }
1944
1991
  }
1945
1992
  return onMounted(async () => {
1946
- const g = r.value.channels[0];
1947
- g && (a.value = g), campaignApi.readBroadcastCreditSummary().then((E) => C.value = E.prices).catch(() => C.value = null), await A();
1948
- }), (g, E) => {
1993
+ const h = r.value.channels[0];
1994
+ h && (a.value = h), campaignApi.readBroadcastCreditSummary().then((E) => C.value = E.prices).catch(() => C.value = null), await A();
1995
+ }), (h, E) => {
1949
1996
  const R = resolveComponent("FmIcon"), M = resolveComponent("FmCard");
1950
1997
  return openBlock(), createElementBlock("div", _hoisted_1$g, [
1951
1998
  createElementVNode("div", _hoisted_2$d, [
@@ -1988,7 +2035,7 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
1988
2035
  ])) : createCommentVNode("", !0)
1989
2036
  ]),
1990
2037
  createElementVNode("div", _hoisted_10$3, [
1991
- createElementVNode("div", _hoisted_11$1, toDisplayString(unref(x) ? unref(o)("connect.campaign.broadcast.primaryChannel") : unref(o)("connect.campaign.broadcast.channels")), 1),
2038
+ createElementVNode("div", _hoisted_11$1, toDisplayString(unref(k) ? unref(o)("connect.campaign.broadcast.primaryChannel") : unref(o)("connect.campaign.broadcast.channels")), 1),
1992
2039
  createElementVNode("div", _hoisted_12, [
1993
2040
  (openBlock(!0), createElementBlock(Fragment, null, renderList(unref($), (S) => (openBlock(), createBlock(M, {
1994
2041
  key: S.channel,
@@ -2016,11 +2063,11 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2016
2063
  S.available ? (openBlock(), createElementBlock("span", {
2017
2064
  key: 0,
2018
2065
  class: normalizeClass(["flex h-[22px] w-[22px] flex-none items-center justify-center border-2 transition-colors", [
2019
- unref(x) ? "rounded-full" : "rounded-[4px]",
2066
+ unref(k) ? "rounded-full" : "rounded-[4px]",
2020
2067
  S.checked ? "border-fm-color-primary bg-fm-color-primary text-fm-color-typo-white" : "border-fm-color-neutral-gray-300 bg-fm-color-neutral-white"
2021
2068
  ]])
2022
2069
  }, [
2023
- S.checked && !unref(x) ? (openBlock(), createBlock(R, {
2070
+ S.checked && !unref(k) ? (openBlock(), createBlock(R, {
2024
2071
  key: 0,
2025
2072
  name: "check",
2026
2073
  size: "sm"
@@ -2047,13 +2094,13 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2047
2094
  }, 1032, ["class", "aria-disabled", "onClick"]))), 128))
2048
2095
  ]),
2049
2096
  e.showValidation && !unref(r).channels.length ? (openBlock(), createElementBlock("div", _hoisted_18, toDisplayString(unref(o)("connect.campaign.broadcast.selectChannelRequired")), 1)) : createCommentVNode("", !0),
2050
- unref(x) && unref(r).channels.length ? (openBlock(), createBlock(_sfc_main$h, {
2097
+ unref(k) && unref(r).channels.length ? (openBlock(), createBlock(_sfc_main$h, {
2051
2098
  key: 1,
2052
2099
  rows: unref(O),
2053
2100
  addable: unref(j),
2054
2101
  onMove: w,
2055
2102
  onRemove: D,
2056
- onAdd: E[1] || (E[1] = (S) => p(unref(addChannel)(unref(r), S, unref(f))))
2103
+ onAdd: E[1] || (E[1] = (S) => p(unref(addChannel)(unref(r), S, unref(y))))
2057
2104
  }, null, 8, ["rows", "addable"])) : createCommentVNode("", !0)
2058
2105
  ]),
2059
2106
  createElementVNode("div", _hoisted_19, [
@@ -2077,20 +2124,22 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2077
2124
  unref(a) === "PUSH" && unref(Y) ? (openBlock(), createBlock(_sfc_main$k, {
2078
2125
  key: 0,
2079
2126
  "model-value": unref(Y),
2127
+ "show-validation": e.showValidation,
2080
2128
  "onUpdate:modelValue": b
2081
- }, null, 8, ["model-value"])) : unref(a) === "APP_INBOX" && unref(G) ? (openBlock(), createBlock(_sfc_main$l, {
2129
+ }, null, 8, ["model-value", "show-validation"])) : unref(a) === "APP_INBOX" && unref(G) ? (openBlock(), createBlock(_sfc_main$l, {
2082
2130
  key: 1,
2083
2131
  "model-value": unref(G),
2084
- variables: unref(f),
2132
+ variables: unref(y),
2133
+ "show-validation": e.showValidation,
2085
2134
  "onUpdate:modelValue": Z
2086
- }, null, 8, ["model-value", "variables"])) : unref(a) !== "APP_INBOX" && unref(a) !== "PUSH" ? (openBlock(), createBlock(_sfc_main$x, {
2135
+ }, null, 8, ["model-value", "variables", "show-validation"])) : unref(a) !== "APP_INBOX" && unref(a) !== "PUSH" ? (openBlock(), createBlock(_sfc_main$x, {
2087
2136
  key: unref(a),
2088
2137
  "model-value": unref(q),
2089
2138
  "allow-email": !1,
2090
2139
  "allow-whatsapp": !1,
2091
2140
  "hide-credit-card": !0,
2092
2141
  "trigger-type": e.triggerType,
2093
- variables: unref(f),
2142
+ variables: unref(y),
2094
2143
  placeholder: e.placeholder,
2095
2144
  "onUpdate:modelValue": E[3] || (E[3] = (S) => B(unref(H), S))
2096
2145
  }, null, 8, ["model-value", "trigger-type", "variables", "placeholder"])) : createCommentVNode("", !0)
@@ -2133,14 +2182,14 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2133
2182
  (m) => isRuleEntry(m) && RuleBuilder.simplify(m).operator == "_rrule"
2134
2183
  ) ? "repeating" : "fixed";
2135
2184
  }
2136
- const a = ref(n()), r = ref(!1), p = ref(!1), h = computed(() => [
2185
+ const a = ref(n()), r = ref(!1), p = ref(!1), v = computed(() => [
2137
2186
  { label: o("connect.template.rule.schedule.fixed"), value: "fixed" },
2138
2187
  { label: o("connect.template.rule.schedule.repeating"), value: "repeating" }
2139
- ]), y = computed(() => {
2188
+ ]), f = computed(() => {
2140
2189
  const u = RuleBuilder.getRules(d.modelValue), m = u.find(
2141
- (k) => isRuleEntry(k) && RuleBuilder.simplify(k).property == "trigger.date"
2190
+ (x) => isRuleEntry(x) && RuleBuilder.simplify(x).property == "trigger.date"
2142
2191
  ), C = u.find(
2143
- (k) => isRuleEntry(k) && RuleBuilder.simplify(k).property == "trigger.time"
2192
+ (x) => isRuleEntry(x) && RuleBuilder.simplify(x).property == "trigger.time"
2144
2193
  );
2145
2194
  return {
2146
2195
  date: m ? RuleBuilder.simplify(m).equator : null,
@@ -2154,7 +2203,7 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2154
2203
  d.endDate ? new Date(d.endDate) : void 0
2155
2204
  )
2156
2205
  );
2157
- function x(u, m) {
2206
+ function k(u, m) {
2158
2207
  i(
2159
2208
  "update:model-value",
2160
2209
  RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup("g_schedule"), [
@@ -2166,18 +2215,18 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2166
2215
  watch(
2167
2216
  () => d.startDate,
2168
2217
  (u, m) => {
2169
- if (!u || u === m || a.value !== "repeating" || !y.value.date) return;
2170
- const C = RRule.fromString(y.value.date), k = new RRule({
2218
+ if (!u || u === m || a.value !== "repeating" || !f.value.date) return;
2219
+ const C = RRule.fromString(f.value.date), x = new RRule({
2171
2220
  ...C.origOptions,
2172
2221
  dtstart: new Date(u)
2173
2222
  }).toString();
2174
- k !== y.value.date && (x(k, y.value.time), p.value = !0);
2223
+ x !== f.value.date && (k(x, f.value.time), p.value = !0);
2175
2224
  }
2176
2225
  );
2177
- function f(u) {
2226
+ function y(u) {
2178
2227
  const m = u.value, C = getRruleAnchorDate({
2179
2228
  startDate: d.startDate ? new Date(d.startDate) : void 0
2180
- }), k = m == "fixed" ? [
2229
+ }), x = m == "fixed" ? [
2181
2230
  RuleBuilder.constructEntry(
2182
2231
  "trigger.date",
2183
2232
  "_isOnDate",
@@ -2204,11 +2253,11 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2204
2253
  "update:model-value",
2205
2254
  RuleBuilder.setRuleToGroup(
2206
2255
  RuleBuilder.scaffoldGroup("g_schedule"),
2207
- k
2256
+ x
2208
2257
  )
2209
2258
  ), a.value = m, p.value = !1;
2210
2259
  }
2211
- function v(u) {
2260
+ function g(u) {
2212
2261
  a.value == "fixed" ? i(
2213
2262
  "update:model-value",
2214
2263
  RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup("g_schedule"), [
@@ -2223,33 +2272,33 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2223
2272
  u.time
2224
2273
  )
2225
2274
  ])
2226
- ) : x(u.date, u.time), p.value = !1;
2275
+ ) : k(u.date, u.time), p.value = !1;
2227
2276
  }
2228
2277
  return (u, m) => {
2229
- const C = resolveComponent("FmButtonGroup"), k = resolveComponent("FmTimePicker"), $ = resolveComponent("FmIcon"), F = resolveComponent("FmTooltip"), N = resolveComponent("FmField"), D = resolveComponent("FmCard"), w = resolveComponent("FmPopover"), O = resolveComponent("FmDatePicker"), j = resolveComponent("FmHelperText");
2278
+ const C = resolveComponent("FmButtonGroup"), x = resolveComponent("FmTimePicker"), $ = resolveComponent("FmIcon"), F = resolveComponent("FmTooltip"), N = resolveComponent("FmField"), D = resolveComponent("FmCard"), w = resolveComponent("FmPopover"), O = resolveComponent("FmDatePicker"), j = resolveComponent("FmHelperText");
2230
2279
  return openBlock(), createElementBlock(Fragment, null, [
2231
2280
  createVNode(C, {
2232
- items: unref(h),
2233
- "model-value": unref(h).find((I) => I.value === unref(a)) ?? null,
2234
- "onUpdate:modelValue": f,
2281
+ items: unref(v),
2282
+ "model-value": unref(v).find((I) => I.value === unref(a)) ?? null,
2283
+ "onUpdate:modelValue": y,
2235
2284
  class: "mb-8"
2236
2285
  }, null, 8, ["items", "model-value"]),
2237
2286
  createElementVNode("div", _hoisted_1$f, [
2238
2287
  createElementVNode("div", _hoisted_2$c, [
2239
- createVNode(k, {
2288
+ createVNode(x, {
2240
2289
  label: unref(o)("connect.template.rule.schedule.notify_time"),
2241
- "model-value": unref(y).time,
2242
- "onUpdate:modelValue": m[0] || (m[0] = (I) => v({ date: unref(y).date, time: I })),
2243
- "helper-text": unref(y).time ? void 0 : unref(o)("connect.template.rule.schedule.time_required"),
2244
- "helper-state": unref(y).time ? void 0 : "error"
2290
+ "model-value": unref(f).time,
2291
+ "onUpdate:modelValue": m[0] || (m[0] = (I) => g({ date: unref(f).date, time: I })),
2292
+ "helper-text": unref(f).time ? void 0 : unref(o)("connect.template.rule.schedule.time_required"),
2293
+ "helper-state": unref(f).time ? void 0 : "error"
2245
2294
  }, null, 8, ["label", "model-value", "helper-text", "helper-state"]),
2246
2295
  unref(a) == "repeating" ? (openBlock(), createElementBlock("div", _hoisted_3$9, [
2247
2296
  createElementVNode("div", _hoisted_4$8, [
2248
2297
  createElementVNode("div", null, toDisplayString(unref(o)("connect.template.rule.schedule.notify_date")), 1),
2249
- unref(y).date ? (openBlock(), createBlock(F, {
2298
+ unref(f).date ? (openBlock(), createBlock(F, {
2250
2299
  key: 0,
2251
2300
  "z-index": 9999,
2252
- content: unref(SummarizeRrule)(unref(RRule).fromString(unref(y).date).options)
2301
+ content: unref(SummarizeRrule)(unref(RRule).fromString(unref(f).date).options)
2253
2302
  }, {
2254
2303
  default: withCtx(() => [
2255
2304
  createVNode($, {
@@ -2268,11 +2317,11 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2268
2317
  "popover-button": withCtx(() => [
2269
2318
  createVNode(N, {
2270
2319
  class: "cursor-pointer",
2271
- "helper-text": unref(y).date ? void 0 : unref(o)("connect.template.rule.schedule.date_required"),
2272
- "helper-state": unref(y).date ? void 0 : "error"
2320
+ "helper-text": unref(f).date ? void 0 : unref(o)("connect.template.rule.schedule.date_required"),
2321
+ "helper-state": unref(f).date ? void 0 : "error"
2273
2322
  }, {
2274
2323
  default: withCtx(() => [
2275
- createElementVNode("div", _hoisted_5$6, toDisplayString(unref(y).date ? unref(SummarizeRrule)(unref(RRule).fromString(unref(y).date).options) : unref(o)("connect.template.rule.schedule.set_repeating_date")), 1)
2324
+ createElementVNode("div", _hoisted_5$6, toDisplayString(unref(f).date ? unref(SummarizeRrule)(unref(RRule).fromString(unref(f).date).options) : unref(o)("connect.template.rule.schedule.set_repeating_date")), 1)
2276
2325
  ]),
2277
2326
  _: 1
2278
2327
  }, 8, ["helper-text", "helper-state"])
@@ -2282,10 +2331,10 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2282
2331
  default: withCtx(() => [
2283
2332
  createVNode(_sfc_main$y, {
2284
2333
  "apply-button": !0,
2285
- "model-value": unref(y).date || "",
2334
+ "model-value": unref(f).date || "",
2286
2335
  "start-date": e.startDate ? new Date(e.startDate) : /* @__PURE__ */ new Date(),
2287
2336
  onCancel: m[1] || (m[1] = (I) => r.value = !1),
2288
- "onUpdate:modelValue": m[2] || (m[2] = (I) => (v({ date: I, time: unref(y).time }), r.value = !1))
2337
+ "onUpdate:modelValue": m[2] || (m[2] = (I) => (g({ date: I, time: unref(f).time }), r.value = !1))
2289
2338
  }, null, 8, ["model-value", "start-date"])
2290
2339
  ]),
2291
2340
  _: 1
@@ -2296,13 +2345,13 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2296
2345
  ])) : (openBlock(), createBlock(O, {
2297
2346
  key: 1,
2298
2347
  label: unref(o)("connect.template.rule.schedule.notify_date"),
2299
- "model-value": unref(y).date || "",
2300
- "onUpdate:modelValue": m[4] || (m[4] = (I) => v({ date: I, time: unref(y).time })),
2301
- "helper-text": unref(y).date ? void 0 : unref(o)("connect.template.rule.schedule.date_required"),
2302
- "helper-state": unref(y).date ? void 0 : "error"
2348
+ "model-value": unref(f).date || "",
2349
+ "onUpdate:modelValue": m[4] || (m[4] = (I) => g({ date: I, time: unref(f).time })),
2350
+ "helper-text": unref(f).date ? void 0 : unref(o)("connect.template.rule.schedule.date_required"),
2351
+ "helper-state": unref(f).date ? void 0 : "error"
2303
2352
  }, null, 8, ["label", "model-value", "helper-text", "helper-state"]))
2304
2353
  ]),
2305
- unref(y).date && unref(y).time && unref(V) ? (openBlock(), createBlock(j, {
2354
+ unref(f).date && unref(f).time && unref(V) ? (openBlock(), createBlock(j, {
2306
2355
  key: 0,
2307
2356
  text: `${unref(moment)(unref(V)).isAfter(unref(moment)()) ? unref(o)("connect.template.rule.schedule.next_notification") : unref(o)("connect.template.rule.schedule.last_trigger_on")} ${unref(moment)(unref(V)).format("dddd, DD MMM YYYY")} at
2308
2357
  ${unref(moment)(unref(V)).format("hh:mmA")}(UTC${unref(moment).tz(unref(l)).format("Z")}) (${unref(moment)(unref(V)).fromNow()})`
@@ -2376,27 +2425,27 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2376
2425
  emits: ["update:model-value"],
2377
2426
  setup(e, { expose: s, emit: o }) {
2378
2427
  const d = useMembershipStore(), { minor: i } = useLoading, c = ref(!1), l = ref(), n = ref(), a = ref(0), r = computed(() => {
2379
- var f;
2380
- return ((f = d.loyaltyRewards.items.find(
2381
- (v) => {
2428
+ var y;
2429
+ return ((y = d.loyaltyRewards.items.find(
2430
+ (g) => {
2382
2431
  var u;
2383
- return v.value === ((u = l.value) == null ? void 0 : u.collectible);
2432
+ return g.value === ((u = l.value) == null ? void 0 : u.collectible);
2384
2433
  }
2385
- )) == null ? void 0 : f.raw.type) === "CREDIT" ? FdoCreditLoyaltyReward : FdtoRandomReward;
2434
+ )) == null ? void 0 : y.raw.type) === "CREDIT" ? FdoCreditLoyaltyReward : FdtoRandomReward;
2386
2435
  }), p = computed(() => {
2387
- const x = r.value.safeParse(l.value);
2388
- return x.success ? [] : x.error.errors;
2436
+ const k = r.value.safeParse(l.value);
2437
+ return k.success ? [] : k.error.errors;
2389
2438
  });
2390
- function h(x, f, v) {
2391
- x && (l.value = f, a.value = v), c.value = x;
2439
+ function v(k, y, g) {
2440
+ k && (l.value = y, a.value = g), c.value = k;
2392
2441
  }
2393
- const y = o;
2442
+ const f = o;
2394
2443
  async function V() {
2395
- const x = r.value.safeParse(l.value);
2396
- x.success && (await i(
2444
+ const k = r.value.safeParse(l.value);
2445
+ k.success && (await i(
2397
2446
  async () => {
2398
- x.data.type === "VOUCHER" && n.value && (x.data.collectibleConfig.image = await firebaseStorage.update(
2399
- x.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, n.value),
2447
+ k.data.type === "VOUCHER" && n.value && (k.data.collectibleConfig.image = await firebaseStorage.update(
2448
+ k.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, n.value),
2400
2449
  n.value
2401
2450
  ));
2402
2451
  },
@@ -2404,18 +2453,18 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2404
2453
  message: "Uploading reward image",
2405
2454
  successMessage: "Reward image updated"
2406
2455
  }
2407
- ), y("update:model-value", x.data, a.value));
2456
+ ), f("update:model-value", k.data, a.value));
2408
2457
  }
2409
2458
  return s({
2410
- showSheet: h
2411
- }), (x, f) => {
2412
- const v = resolveComponent("FmSelect"), u = resolveComponent("FmStepperField"), m = resolveComponent("FmButton"), C = resolveComponent("FmSideSheet");
2459
+ showSheet: v
2460
+ }), (k, y) => {
2461
+ const g = resolveComponent("FmSelect"), u = resolveComponent("FmStepperField"), m = resolveComponent("FmButton"), C = resolveComponent("FmSideSheet");
2413
2462
  return openBlock(), createBlock(C, {
2414
2463
  "max-width": 560,
2415
2464
  modelValue: unref(c),
2416
2465
  "onUpdate:modelValue": [
2417
- f[9] || (f[9] = (k) => isRef(c) ? c.value = k : null),
2418
- f[10] || (f[10] = (k) => c.value = k)
2466
+ y[9] || (y[9] = (x) => isRef(c) ? c.value = x : null),
2467
+ y[10] || (y[10] = (x) => c.value = x)
2419
2468
  ],
2420
2469
  header: "Edit reward",
2421
2470
  "dismiss-away": ""
@@ -2427,21 +2476,21 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2427
2476
  type: "button",
2428
2477
  disabled: unref(p).length > 0,
2429
2478
  label: "Confirm",
2430
- onClick: f[7] || (f[7] = (k) => V())
2479
+ onClick: y[7] || (y[7] = (x) => V())
2431
2480
  }, null, 8, ["disabled"]),
2432
2481
  createVNode(m, {
2433
2482
  variant: "secondary",
2434
2483
  type: "button",
2435
2484
  label: "Cancel",
2436
- onClick: f[8] || (f[8] = (k) => c.value = !1)
2485
+ onClick: y[8] || (y[8] = (x) => c.value = !1)
2437
2486
  })
2438
2487
  ])
2439
2488
  ]),
2440
2489
  default: withCtx(() => {
2441
- var k, $, F;
2490
+ var x, $, F;
2442
2491
  return [
2443
2492
  unref(l) ? (openBlock(), createElementBlock("div", _hoisted_1$d, [
2444
- createVNode(v, {
2493
+ createVNode(g, {
2445
2494
  label: "Reward Type",
2446
2495
  items: [
2447
2496
  { label: "No Reward", value: "NO_REWARD" },
@@ -2449,7 +2498,7 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2449
2498
  { label: "Loyalty", value: "LOYALTY" }
2450
2499
  ],
2451
2500
  "model-value": unref(l).type,
2452
- "onUpdate:modelValue": f[0] || (f[0] = (N) => {
2501
+ "onUpdate:modelValue": y[0] || (y[0] = (N) => {
2453
2502
  N == "NO_REWARD" ? l.value = {
2454
2503
  type: "NO_REWARD",
2455
2504
  collectible: null,
@@ -2482,31 +2531,31 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2482
2531
  };
2483
2532
  })
2484
2533
  }, null, 8, ["model-value"]),
2485
- unref(l).type == "LOYALTY" ? (openBlock(), createBlock(v, {
2534
+ unref(l).type == "LOYALTY" ? (openBlock(), createBlock(g, {
2486
2535
  key: 0,
2487
2536
  label: "Loyalty type",
2488
2537
  rules: [unref(ZodHelper).ruleAtPath(unref(r), "collectible", [unref(l).type])],
2489
2538
  items: unref(d).loyaltyRewards.items,
2490
2539
  "model-value": unref(l).collectible,
2491
- "onUpdate:modelValue": f[1] || (f[1] = (N) => unref(l).collectible = N)
2540
+ "onUpdate:modelValue": y[1] || (y[1] = (N) => unref(l).collectible = N)
2492
2541
  }, null, 8, ["rules", "items", "model-value"])) : createCommentVNode("", !0),
2493
2542
  createVNode(u, {
2494
2543
  label: "Weight",
2495
2544
  rules: [unref(ZodHelper).ruleAtPath(unref(r), "weight", [unref(l).type])],
2496
2545
  "model-value": unref(l).weight,
2497
- "onUpdate:modelValue": f[2] || (f[2] = (N) => l.value = {
2546
+ "onUpdate:modelValue": y[2] || (y[2] = (N) => l.value = {
2498
2547
  ...unref(l),
2499
2548
  weight: N
2500
2549
  })
2501
2550
  }, null, 8, ["rules", "model-value"]),
2502
2551
  unref(l).type === "LOYALTY" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2503
- ((k = unref(d).loyaltyRewards.items.find(
2552
+ ((x = unref(d).loyaltyRewards.items.find(
2504
2553
  (N) => {
2505
2554
  var D;
2506
2555
  return N.value === ((D = unref(l)) == null ? void 0 : D.collectible);
2507
2556
  }
2508
- )) == null ? void 0 : k.raw.type) !== "TITLE" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2509
- f[11] || (f[11] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1)),
2557
+ )) == null ? void 0 : x.raw.type) !== "TITLE" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2558
+ y[11] || (y[11] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1)),
2510
2559
  createVNode(_sfc_main$z, {
2511
2560
  class: "mt-[-8px]",
2512
2561
  rules: [
@@ -2516,13 +2565,13 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2516
2565
  "error-text": unref(ZodHelper).helperText(unref(p), "earningOption"),
2517
2566
  "fixed-type": !0,
2518
2567
  "model-value": unref(l).earningOption,
2519
- "onUpdate:modelValue": f[3] || (f[3] = (N) => l.value = {
2568
+ "onUpdate:modelValue": y[3] || (y[3] = (N) => l.value = {
2520
2569
  ...unref(l),
2521
2570
  earningOption: N
2522
2571
  })
2523
2572
  }, null, 8, ["rules", "helper-state", "error-text", "model-value"])
2524
2573
  ], 64)) : createCommentVNode("", !0),
2525
- f[12] || (f[12] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Validity option", -1)),
2574
+ y[12] || (y[12] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Validity option", -1)),
2526
2575
  createVNode(_sfc_main$A, {
2527
2576
  type: unref(l).type === "LOYALTY" ? "custom" : "range",
2528
2577
  "for-credit": unref(l).type === "LOYALTY" && (($ = unref(d).loyaltyRewards.items.find(
@@ -2534,7 +2583,7 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2534
2583
  class: "!gap-24",
2535
2584
  rules: [unref(ZodHelper).ruleAtPath(unref(r), "validityOption", [unref(l).type])],
2536
2585
  "model-value": unref(l).validityOption,
2537
- "onUpdate:modelValue": f[4] || (f[4] = (N) => l.value = {
2586
+ "onUpdate:modelValue": y[4] || (y[4] = (N) => l.value = {
2538
2587
  ...unref(l),
2539
2588
  validityOption: N
2540
2589
  })
@@ -2544,11 +2593,11 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2544
2593
  key: 2,
2545
2594
  "reward-image": unref(n),
2546
2595
  "model-value": ((F = unref(l)) == null ? void 0 : F.collectibleConfig) ?? void 0,
2547
- "onUpdate:modelValue": f[5] || (f[5] = (N) => l.value = {
2596
+ "onUpdate:modelValue": y[5] || (y[5] = (N) => l.value = {
2548
2597
  ...unref(l),
2549
2598
  collectibleConfig: N
2550
2599
  }),
2551
- "onUpdate:rewardImage": f[6] || (f[6] = (N) => n.value = N)
2600
+ "onUpdate:rewardImage": y[6] || (y[6] = (N) => n.value = N)
2552
2601
  }, null, 8, ["reward-image", "model-value"])) : createCommentVNode("", !0),
2553
2602
  createVNode(JsonViewer, { json: unref(p) }, null, 8, ["json"])
2554
2603
  ])) : createCommentVNode("", !0)
@@ -2579,35 +2628,35 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2579
2628
  emits: ["update:model-value"],
2580
2629
  setup(e, { emit: s }) {
2581
2630
  const o = e, d = s, i = useMembershipStore(), { t: c } = useI18n(), l = z$1.array(z$1.lazy(() => FdtoRandomReward)).min(1, "Requires at least 1 reward"), n = computed(() => o.modelValue ?? []), a = computed(() => {
2582
- const f = l.safeParse(n.value);
2583
- return f.success ? [] : f.error.errors;
2631
+ const y = l.safeParse(n.value);
2632
+ return y.success ? [] : y.error.errors;
2584
2633
  }), r = ref();
2585
- function p(f, v) {
2634
+ function p(y, g) {
2586
2635
  var m;
2587
2636
  const u = [...n.value];
2588
- u[v] = f, (m = r.value) == null || m.showSheet(!1), d("update:model-value", u);
2637
+ u[g] = y, (m = r.value) == null || m.showSheet(!1), d("update:model-value", u);
2589
2638
  }
2590
- function h(f) {
2591
- const v = f.type == "VOUCHER" ? f.collectibleConfig : i.collectibles.find(
2592
- (C) => C._id.toString() == f.collectible
2593
- ), u = CollectionUtils.formattedType((v == null ? void 0 : v.name) || ""), m = f.weight;
2639
+ function v(y) {
2640
+ const g = y.type == "VOUCHER" ? y.collectibleConfig : i.collectibles.find(
2641
+ (C) => C._id.toString() == y.collectible
2642
+ ), u = CollectionUtils.formattedType((g == null ? void 0 : g.name) || ""), m = y.weight;
2594
2643
  return {
2595
2644
  label: isNullOrEmpty(u) ? "NO REWARD" : u,
2596
- sublabel: `${m} (${(m / n.value.reduce((C, k) => C + k.weight, 0) * 100).toFixed(2)}%)`
2645
+ sublabel: `${m} (${(m / n.value.reduce((C, x) => C + x.weight, 0) * 100).toFixed(2)}%)`
2597
2646
  };
2598
2647
  }
2599
- function y(f) {
2648
+ function f(y) {
2600
2649
  var u;
2601
- const v = [...n.value];
2602
- (u = r.value) == null || u.showSheet(!0, v[f], f);
2650
+ const g = [...n.value];
2651
+ (u = r.value) == null || u.showSheet(!0, g[y], y);
2603
2652
  }
2604
- function V(f) {
2605
- const v = [...n.value];
2606
- v.splice(f, 1), d("update:model-value", v);
2653
+ function V(y) {
2654
+ const g = [...n.value];
2655
+ g.splice(y, 1), d("update:model-value", g);
2607
2656
  }
2608
- function x() {
2609
- var f;
2610
- (f = r.value) == null || f.showSheet(
2657
+ function k() {
2658
+ var y;
2659
+ (y = r.value) == null || y.showSheet(
2611
2660
  !0,
2612
2661
  {
2613
2662
  type: "NO_REWARD",
@@ -2617,28 +2666,28 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2617
2666
  n.value.length
2618
2667
  );
2619
2668
  }
2620
- return (f, v) => {
2669
+ return (y, g) => {
2621
2670
  const u = resolveComponent("FmButton"), m = resolveComponent("FmCard"), C = resolveComponent("FmHelperText");
2622
2671
  return openBlock(), createElementBlock("div", _hoisted_1$c, [
2623
2672
  createElementVNode("div", _hoisted_2$9, toDisplayString(unref(c)("connect.template.configure_reward_type")), 1),
2624
2673
  createVNode(u, {
2625
2674
  label: unref(c)("connect.campaign.rewardPool.addReward"),
2626
- onClick: v[0] || (v[0] = (k) => x()),
2675
+ onClick: g[0] || (g[0] = (x) => k()),
2627
2676
  variant: "plain",
2628
2677
  icon: "add"
2629
2678
  }, null, 8, ["label"]),
2630
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (k, $) => (openBlock(), createBlock(m, {
2679
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (x, $) => (openBlock(), createBlock(m, {
2631
2680
  key: $,
2632
2681
  class: "px-16 py-12 flex items-center justify-between cursor-pointer",
2633
2682
  variant: "outlined",
2634
- onClick: (F) => y($)
2683
+ onClick: (F) => f($)
2635
2684
  }, {
2636
2685
  default: withCtx(() => {
2637
2686
  var F;
2638
2687
  return [
2639
2688
  createElementVNode("div", null, [
2640
- createElementVNode("div", _hoisted_3$7, toDisplayString(k.type == "LOYALTY" ? (F = k == null ? void 0 : k.earningOption) == null ? void 0 : F.amount : "") + " " + toDisplayString(h(k).label), 1),
2641
- createElementVNode("div", _hoisted_4$6, toDisplayString(h(k).sublabel), 1)
2689
+ createElementVNode("div", _hoisted_3$7, toDisplayString(x.type == "LOYALTY" ? (F = x == null ? void 0 : x.earningOption) == null ? void 0 : F.amount : "") + " " + toDisplayString(v(x).label), 1),
2690
+ createElementVNode("div", _hoisted_4$6, toDisplayString(v(x).sublabel), 1)
2642
2691
  ]),
2643
2692
  createVNode(u, {
2644
2693
  icon: "delete",
@@ -2649,9 +2698,9 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2649
2698
  }),
2650
2699
  _: 2
2651
2700
  }, 1032, ["onClick"]))), 128)),
2652
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(a).filter((k) => k.path.join(".") == ""), (k) => (openBlock(), createBlock(C, {
2653
- key: k.message,
2654
- text: k.message,
2701
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(a).filter((x) => x.path.join(".") == ""), (x) => (openBlock(), createBlock(C, {
2702
+ key: x.message,
2703
+ text: x.message,
2655
2704
  state: "error"
2656
2705
  }, null, 8, ["text"]))), 128)),
2657
2706
  createVNode(_sfc_main$d, {
@@ -2682,33 +2731,33 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2682
2731
  }
2683
2732
  ]);
2684
2733
  return (l, n) => {
2685
- var h, y, V;
2734
+ var v, f, V;
2686
2735
  const a = resolveComponent("FmSwitch"), r = resolveComponent("FmCard"), p = resolveComponent("FmHelperText");
2687
2736
  return openBlock(), createElementBlock("div", _hoisted_1$b, [
2688
2737
  createVNode(a, {
2689
2738
  label: unref(o)("connect.template.promotion_game.enable"),
2690
- "model-value": !!((h = e.modelValue) != null && h.gameType),
2691
- "onUpdate:modelValue": n[0] || (n[0] = (x) => x ? i("update:model-value", { gameType: "ROCK_PAPER_SCISSORS" }) : i("update:model-value", null))
2739
+ "model-value": !!((v = e.modelValue) != null && v.gameType),
2740
+ "onUpdate:modelValue": n[0] || (n[0] = (k) => k ? i("update:model-value", { gameType: "ROCK_PAPER_SCISSORS" }) : i("update:model-value", null))
2692
2741
  }, null, 8, ["label", "model-value"]),
2693
- ((y = e.modelValue) == null ? void 0 : y.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
2694
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(c), (x) => {
2695
- var f, v;
2742
+ ((f = e.modelValue) == null ? void 0 : f.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
2743
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(c), (k) => {
2744
+ var y, g;
2696
2745
  return openBlock(), createBlock(r, {
2697
2746
  variant: "outlined",
2698
2747
  class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
2699
2748
  "col-span-2": unref(c).length == 1,
2700
- "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) == x.value,
2701
- "hover:bg-fm-color-opacity-sm": ((v = e.modelValue) == null ? void 0 : v.gameType) != x.value
2749
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((y = e.modelValue) == null ? void 0 : y.gameType) == k.value,
2750
+ "hover:bg-fm-color-opacity-sm": ((g = e.modelValue) == null ? void 0 : g.gameType) != k.value
2702
2751
  }]),
2703
2752
  onClick: () => {
2704
2753
  var u;
2705
- ((u = d.modelValue) == null ? void 0 : u.gameType) != x.value && i("update:model-value", { gameType: x.value });
2754
+ ((u = d.modelValue) == null ? void 0 : u.gameType) != k.value && i("update:model-value", { gameType: k.value });
2706
2755
  },
2707
- key: x.value
2756
+ key: k.value
2708
2757
  }, {
2709
2758
  default: withCtx(() => [
2710
- createElementVNode("div", _hoisted_3$6, toDisplayString(x.label), 1),
2711
- createElementVNode("div", _hoisted_4$5, toDisplayString(x.description), 1)
2759
+ createElementVNode("div", _hoisted_3$6, toDisplayString(k.label), 1),
2760
+ createElementVNode("div", _hoisted_4$5, toDisplayString(k.description), 1)
2712
2761
  ]),
2713
2762
  _: 2
2714
2763
  }, 1032, ["class", "onClick"]);
@@ -2740,11 +2789,11 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2740
2789
  setup(e, { emit: s }) {
2741
2790
  const { t: o } = useI18n(), d = e, i = s, c = ref(d.modelValue ?? {}), l = ref(
2742
2791
  (() => {
2743
- const h = {};
2744
- return c.value.workingHour && Object.keys(c.value.workingHour).forEach((y) => {
2745
- const V = c.value.workingHour[y];
2746
- V && "periods" in V && Array.isArray(V.periods) ? h[y] = V.periods : Array.isArray(V) && (h[y] = V);
2747
- }), h;
2792
+ const v = {};
2793
+ return c.value.workingHour && Object.keys(c.value.workingHour).forEach((f) => {
2794
+ const V = c.value.workingHour[f];
2795
+ V && "periods" in V && Array.isArray(V.periods) ? v[f] = V.periods : Array.isArray(V) && (v[f] = V);
2796
+ }), v;
2748
2797
  })()
2749
2798
  ), n = [
2750
2799
  { key: "mon", label: "Monday" },
@@ -2754,30 +2803,30 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2754
2803
  { key: "fri", label: "Friday" },
2755
2804
  { key: "sat", label: "Saturday" },
2756
2805
  { key: "sun", label: "Sunday" }
2757
- ], a = (h) => {
2758
- l.value[h] || (l.value[h] = []), l.value[h].push({
2806
+ ], a = (v) => {
2807
+ l.value[v] || (l.value[v] = []), l.value[v].push({
2759
2808
  startTime: "00:00",
2760
2809
  endTime: "23:59"
2761
2810
  }), p();
2762
- }, r = (h, y) => {
2763
- l.value[h] && l.value[h].length > y && (l.value[h].splice(y, 1), l.value[h].length === 0 && delete l.value[h], p());
2811
+ }, r = (v, f) => {
2812
+ l.value[v] && l.value[v].length > f && (l.value[v].splice(f, 1), l.value[v].length === 0 && delete l.value[v], p());
2764
2813
  }, p = () => {
2765
- const h = Object.keys(l.value).reduce(
2766
- (y, V) => (l.value[V] && l.value[V].length > 0 && (y[V] = {
2814
+ const v = Object.keys(l.value).reduce(
2815
+ (f, V) => (l.value[V] && l.value[V].length > 0 && (f[V] = {
2767
2816
  periods: l.value[V]
2768
- }), y),
2817
+ }), f),
2769
2818
  {}
2770
2819
  );
2771
- c.value.workingHour = Object.keys(h).length > 0 ? h : void 0;
2820
+ c.value.workingHour = Object.keys(v).length > 0 ? v : void 0;
2772
2821
  };
2773
- return watch(c, () => i("update:model-value", c.value), { deep: !0 }), watch(l, p, { deep: !0 }), (h, y) => {
2774
- const V = resolveComponent("FmSelect"), x = resolveComponent("FmStepperField"), f = resolveComponent("FmCheckbox"), v = resolveComponent("FmTimePicker"), u = resolveComponent("FmButton");
2822
+ return watch(c, () => i("update:model-value", c.value), { deep: !0 }), watch(l, p, { deep: !0 }), (v, f) => {
2823
+ const V = resolveComponent("FmSelect"), k = resolveComponent("FmStepperField"), y = resolveComponent("FmCheckbox"), g = resolveComponent("FmTimePicker"), u = resolveComponent("FmButton");
2775
2824
  return openBlock(), createElementBlock("div", _hoisted_1$a, [
2776
2825
  createElementVNode("div", _hoisted_2$7, [
2777
2826
  createVNode(V, {
2778
2827
  label: unref(o)("connect.template.eaterType"),
2779
2828
  modelValue: unref(c).eaterType,
2780
- "onUpdate:modelValue": y[0] || (y[0] = (m) => unref(c).eaterType = m),
2829
+ "onUpdate:modelValue": f[0] || (f[0] = (m) => unref(c).eaterType = m),
2781
2830
  items: [
2782
2831
  { label: unref(o)("connect.template.allEaters"), value: "all" },
2783
2832
  { label: unref(o)("connect.template.newEatersOnly"), value: "new" },
@@ -2788,9 +2837,9 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2788
2837
  ],
2789
2838
  rules: [unref(ZodHelper).ruleAtPath(e.schema, "eaterType")]
2790
2839
  }, null, 8, ["label", "modelValue", "items", "rules"]),
2791
- createVNode(x, {
2840
+ createVNode(k, {
2792
2841
  modelValue: unref(c).minBasketAmount,
2793
- "onUpdate:modelValue": y[1] || (y[1] = (m) => unref(c).minBasketAmount = m),
2842
+ "onUpdate:modelValue": f[1] || (f[1] = (m) => unref(c).minBasketAmount = m),
2794
2843
  "show-steppers": !1,
2795
2844
  rules: [unref(ZodHelper).ruleAtPath(e.schema, "minBasketAmount")]
2796
2845
  }, {
@@ -2804,9 +2853,9 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2804
2853
  ]),
2805
2854
  _: 1
2806
2855
  }, 8, ["modelValue", "rules"]),
2807
- createVNode(x, {
2856
+ createVNode(k, {
2808
2857
  modelValue: unref(c).bundleQuantity,
2809
- "onUpdate:modelValue": y[2] || (y[2] = (m) => unref(c).bundleQuantity = m),
2858
+ "onUpdate:modelValue": f[2] || (f[2] = (m) => unref(c).bundleQuantity = m),
2810
2859
  "show-steppers": !1,
2811
2860
  rules: [unref(ZodHelper).ruleAtPath(e.schema, "bundleQuantity")]
2812
2861
  }, {
@@ -2829,7 +2878,7 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2829
2878
  class: "space-y-2"
2830
2879
  }, [
2831
2880
  createElementVNode("div", _hoisted_6$3, [
2832
- createVNode(f, {
2881
+ createVNode(y, {
2833
2882
  label: m.label,
2834
2883
  "model-value": !!(unref(l)[m.key] && unref(l)[m.key].length > 0),
2835
2884
  "onUpdate:modelValue": (C) => {
@@ -2838,30 +2887,30 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2838
2887
  }, null, 8, ["label", "model-value", "onUpdate:modelValue"])
2839
2888
  ]),
2840
2889
  unref(l)[m.key] && unref(l)[m.key].length > 0 ? (openBlock(), createElementBlock("div", _hoisted_7$3, [
2841
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(l)[m.key] || [], (C, k) => (openBlock(), createElementBlock("div", {
2842
- key: k,
2890
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(l)[m.key] || [], (C, x) => (openBlock(), createElementBlock("div", {
2891
+ key: x,
2843
2892
  class: "flex items-center space-x-2 w-100"
2844
2893
  }, [
2845
- createVNode(v, {
2894
+ createVNode(g, {
2846
2895
  "model-value": C.startTime || "",
2847
2896
  "onUpdate:modelValue": ($) => {
2848
- unref(l)[m.key] && unref(l)[m.key][k] && (unref(l)[m.key][k].startTime = $ || "", p());
2897
+ unref(l)[m.key] && unref(l)[m.key][x] && (unref(l)[m.key][x].startTime = $ || "", p());
2849
2898
  }
2850
2899
  }, null, 8, ["model-value", "onUpdate:modelValue"]),
2851
- y[3] || (y[3] = createElementVNode("span", null, "to", -1)),
2852
- createVNode(v, {
2900
+ f[3] || (f[3] = createElementVNode("span", null, "to", -1)),
2901
+ createVNode(g, {
2853
2902
  "model-value": C.endTime || "",
2854
2903
  "onUpdate:modelValue": ($) => {
2855
- unref(l)[m.key] && unref(l)[m.key][k] && (unref(l)[m.key][k].endTime = $ || "", p());
2904
+ unref(l)[m.key] && unref(l)[m.key][x] && (unref(l)[m.key][x].endTime = $ || "", p());
2856
2905
  }
2857
2906
  }, null, 8, ["model-value", "onUpdate:modelValue"]),
2858
2907
  createVNode(u, {
2859
2908
  variant: "tertiary",
2860
2909
  size: "sm",
2861
- onClick: ($) => r(m.key, k),
2910
+ onClick: ($) => r(m.key, x),
2862
2911
  icon: "close"
2863
2912
  }, null, 8, ["onClick"]),
2864
- k === 0 ? (openBlock(), createBlock(u, {
2913
+ x === 0 ? (openBlock(), createBlock(u, {
2865
2914
  key: 0,
2866
2915
  onClick: ($) => a(m.key),
2867
2916
  icon: "add",
@@ -3025,20 +3074,20 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3025
3074
  return m.value === ((C = n.value) == null ? void 0 : C.collectible);
3026
3075
  }
3027
3076
  )) == null ? void 0 : u.raw.type) === "CREDIT" ? FdoThresholdCreditReward : FdtoThresholdReward;
3028
- }), h = computed(() => {
3029
- const v = p.value.safeParse(n.value);
3030
- return v.success ? [] : v.error.errors;
3077
+ }), v = computed(() => {
3078
+ const g = p.value.safeParse(n.value);
3079
+ return g.success ? [] : g.error.errors;
3031
3080
  });
3032
- function y(v, u, m) {
3033
- v && (n.value = u, r.value = m), l.value = v;
3081
+ function f(g, u, m) {
3082
+ g && (n.value = u, r.value = m), l.value = g;
3034
3083
  }
3035
3084
  const V = o;
3036
- async function x() {
3037
- const v = p.value.safeParse(n.value);
3038
- v.success && (await c(
3085
+ async function k() {
3086
+ const g = p.value.safeParse(n.value);
3087
+ g.success && (await c(
3039
3088
  async () => {
3040
- v.data.type === "VOUCHER" && a.value && (v.data.collectibleConfig.image = await firebaseStorage.update(
3041
- v.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, a.value),
3089
+ g.data.type === "VOUCHER" && a.value && (g.data.collectibleConfig.image = await firebaseStorage.update(
3090
+ g.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, a.value),
3042
3091
  a.value
3043
3092
  ));
3044
3093
  },
@@ -3046,13 +3095,13 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3046
3095
  message: "Uploading reward image",
3047
3096
  successMessage: "Reward image updated"
3048
3097
  }
3049
- ), V("update:model-value", v.data, r.value));
3098
+ ), V("update:model-value", g.data, r.value));
3050
3099
  }
3051
- const f = ref();
3100
+ const y = ref();
3052
3101
  return s({
3053
- showSheet: y
3054
- }), (v, u) => {
3055
- const m = resolveComponent("FmStepperField"), C = resolveComponent("FmSelect"), k = resolveComponent("FmForm"), $ = resolveComponent("FmButton"), F = resolveComponent("FmSideSheet");
3102
+ showSheet: f
3103
+ }), (g, u) => {
3104
+ const m = resolveComponent("FmStepperField"), C = resolveComponent("FmSelect"), x = resolveComponent("FmForm"), $ = resolveComponent("FmButton"), F = resolveComponent("FmSideSheet");
3056
3105
  return openBlock(), createBlock(F, {
3057
3106
  "max-width": 560,
3058
3107
  modelValue: unref(l),
@@ -3069,10 +3118,10 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3069
3118
  variant: "primary",
3070
3119
  type: "button",
3071
3120
  label: "Confirm",
3072
- disabled: unref(h).length > 0,
3121
+ disabled: unref(v).length > 0,
3073
3122
  onClick: u[8] || (u[8] = async () => {
3074
3123
  var N;
3075
- return (N = unref(f)) == null ? void 0 : N.validateInputs();
3124
+ return (N = unref(y)) == null ? void 0 : N.validateInputs();
3076
3125
  })
3077
3126
  }, null, 8, ["disabled"]),
3078
3127
  createVNode($, {
@@ -3085,12 +3134,12 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3085
3134
  ]),
3086
3135
  default: withCtx(() => [
3087
3136
  createVNode(JsonViewer, { json: unref(n) }, null, 8, ["json"]),
3088
- unref(n) ? (openBlock(), createBlock(k, {
3137
+ unref(n) ? (openBlock(), createBlock(x, {
3089
3138
  key: 0,
3090
3139
  class: "flex flex-col gap-y-24",
3091
3140
  ref_key: "formRef",
3092
- ref: f,
3093
- onValidationSuccess: u[7] || (u[7] = (N) => x())
3141
+ ref: y,
3142
+ onValidationSuccess: u[7] || (u[7] = (N) => k())
3094
3143
  }, {
3095
3144
  default: withCtx(() => {
3096
3145
  var N, D;
@@ -3162,8 +3211,8 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3162
3211
  createVNode(_sfc_main$z, {
3163
3212
  class: "mt-[-8px]",
3164
3213
  rules: [unref(ZodHelper).ruleAtPath(unref(p), "earningOption", [unref(n).type])],
3165
- "helper-state": unref(ZodHelper).helperState(unref(h), "earningOption"),
3166
- "error-text": unref(ZodHelper).helperText(unref(h), "earningOption"),
3214
+ "helper-state": unref(ZodHelper).helperState(unref(v), "earningOption"),
3215
+ "error-text": unref(ZodHelper).helperText(unref(v), "earningOption"),
3167
3216
  "fixed-type": !0,
3168
3217
  "model-value": unref(n).earningOption,
3169
3218
  "onUpdate:modelValue": u[3] || (u[3] = (w) => n.value = {
@@ -3198,7 +3247,7 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3198
3247
  }),
3199
3248
  "onUpdate:rewardImage": u[6] || (u[6] = (w) => a.value = w)
3200
3249
  }, null, 8, ["reward-image", "model-value"])) : createCommentVNode("", !0),
3201
- createVNode(JsonViewer, { json: unref(h) }, null, 8, ["json"])
3250
+ createVNode(JsonViewer, { json: unref(v) }, null, 8, ["json"])
3202
3251
  ];
3203
3252
  }),
3204
3253
  _: 1
@@ -3244,7 +3293,7 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3244
3293
  ),
3245
3294
  outline: unref(d) < p,
3246
3295
  key: p,
3247
- name: unref(i).some((h) => h === p) ? "featured_seasonal_and_gifts" : "check_circle"
3296
+ name: unref(i).some((v) => v === p) ? "featured_seasonal_and_gifts" : "check_circle"
3248
3297
  }, null, 8, ["class", "outline", "name"]))), 128))
3249
3298
  ])) : (openBlock(), createElementBlock("div", {
3250
3299
  key: 1,
@@ -3254,8 +3303,8 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3254
3303
  class: normalizeClass(["bg-fm-color-primary", "absolute top-0 left-0 h-full rounded-lg"]),
3255
3304
  style: normalizeStyle({ width: unref(c) + "%" })
3256
3305
  }, null, 4),
3257
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(i), (p, h) => (openBlock(), createElementBlock("div", {
3258
- key: h,
3306
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(i), (p, v) => (openBlock(), createElementBlock("div", {
3307
+ key: v,
3259
3308
  class: "absolute -top-1.5 flex flex-col items-center -translate-x-1/2",
3260
3309
  style: normalizeStyle({ left: l(p) + "%" })
3261
3310
  }, [
@@ -3298,44 +3347,44 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3298
3347
  emits: ["update:model-value"],
3299
3348
  setup(e, { emit: s }) {
3300
3349
  const { t: o } = useI18n(), d = e, i = s, c = useMembershipStore(), l = z$1.array(z$1.lazy(() => FdtoThresholdReward)).min(1, "Requires at least 1 reward"), n = computed(
3301
- () => d.modelValue.sort((v, u) => v.threshold - u.threshold) ?? []
3350
+ () => d.modelValue.sort((g, u) => g.threshold - u.threshold) ?? []
3302
3351
  ), a = computed(() => {
3303
- const v = l.safeParse(n.value);
3304
- return v.success ? [] : v.error.errors;
3352
+ const g = l.safeParse(n.value);
3353
+ return g.success ? [] : g.error.errors;
3305
3354
  }), r = ref();
3306
- function p(v, u) {
3355
+ function p(g, u) {
3307
3356
  var C;
3308
3357
  const m = [...n.value];
3309
- m[u] = v, (C = r.value) == null || C.showSheet(!1), i("update:model-value", m);
3358
+ m[u] = g, (C = r.value) == null || C.showSheet(!1), i("update:model-value", m);
3310
3359
  }
3311
- function h(v) {
3312
- const u = v.type == "VOUCHER" ? v.collectibleConfig : c.collectibles.find(
3313
- (k) => k._id.toString() == v.collectible
3314
- ), m = CollectionUtils.formattedType((u == null ? void 0 : u.name) || ""), C = v.earningOption.type == "FIXED" ? o("connect.template.mission_pool.reward_sublabel_fixed", {
3315
- threshold: v.threshold,
3316
- amount: v.earningOption.amount
3360
+ function v(g) {
3361
+ const u = g.type == "VOUCHER" ? g.collectibleConfig : c.collectibles.find(
3362
+ (x) => x._id.toString() == g.collectible
3363
+ ), m = CollectionUtils.formattedType((u == null ? void 0 : u.name) || ""), C = g.earningOption.type == "FIXED" ? o("connect.template.mission_pool.reward_sublabel_fixed", {
3364
+ threshold: g.threshold,
3365
+ amount: g.earningOption.amount
3317
3366
  }) : o("connect.template.mission_pool.reward_sublabel_per_spend", {
3318
- threshold: v.threshold,
3319
- amount: v.earningOption.amount,
3320
- every: v.earningOption.every
3367
+ threshold: g.threshold,
3368
+ amount: g.earningOption.amount,
3369
+ every: g.earningOption.every
3321
3370
  });
3322
3371
  return {
3323
3372
  label: isNullOrEmpty(m) ? o("connect.template.mission_pool.no_reward") : m,
3324
3373
  sublabel: C
3325
3374
  };
3326
3375
  }
3327
- function y(v) {
3376
+ function f(g) {
3328
3377
  var m;
3329
3378
  const u = [...n.value];
3330
- (m = r.value) == null || m.showSheet(!0, u[v], v);
3379
+ (m = r.value) == null || m.showSheet(!0, u[g], g);
3331
3380
  }
3332
- function V(v) {
3381
+ function V(g) {
3333
3382
  const u = [...n.value];
3334
- u.splice(v, 1), i("update:model-value", u);
3383
+ u.splice(g, 1), i("update:model-value", u);
3335
3384
  }
3336
- function x() {
3337
- var v;
3338
- (v = r.value) == null || v.showSheet(
3385
+ function k() {
3386
+ var g;
3387
+ (g = r.value) == null || g.showSheet(
3339
3388
  !0,
3340
3389
  {
3341
3390
  type: "LOYALTY",
@@ -3352,21 +3401,21 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3352
3401
  n.value.length
3353
3402
  );
3354
3403
  }
3355
- function f(v) {
3404
+ function y(g) {
3356
3405
  var u, m;
3357
- return v.type == "VOUCHER" ? (u = v.collectibleConfig) == null ? void 0 : u.name : sentenceCase(
3406
+ return g.type == "VOUCHER" ? (u = g.collectibleConfig) == null ? void 0 : u.name : sentenceCase(
3358
3407
  ((m = c.loyaltyRewards.items.find(
3359
- (C) => C.value == v.collectible
3408
+ (C) => C.value == g.collectible
3360
3409
  )) == null ? void 0 : m.label) || ""
3361
3410
  );
3362
3411
  }
3363
- return (v, u) => {
3364
- const m = resolveComponent("FmButton"), C = resolveComponent("FmCard"), k = resolveComponent("FmHelperText");
3412
+ return (g, u) => {
3413
+ const m = resolveComponent("FmButton"), C = resolveComponent("FmCard"), x = resolveComponent("FmHelperText");
3365
3414
  return openBlock(), createElementBlock("div", _hoisted_1$4, [
3366
3415
  createElementVNode("div", _hoisted_2$3, toDisplayString(unref(o)("connect.template.configure_reward_customer")), 1),
3367
3416
  createVNode(m, {
3368
3417
  label: unref(o)("connect.template.mission_pool.add_reward"),
3369
- onClick: u[0] || (u[0] = ($) => x()),
3418
+ onClick: u[0] || (u[0] = ($) => k()),
3370
3419
  variant: "plain",
3371
3420
  icon: "add"
3372
3421
  }, null, 8, ["label"]),
@@ -3374,12 +3423,12 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3374
3423
  key: F,
3375
3424
  class: "px-16 py-12 flex items-center justify-between cursor-pointer",
3376
3425
  variant: "outlined",
3377
- onClick: (N) => y(F)
3426
+ onClick: (N) => f(F)
3378
3427
  }, {
3379
3428
  default: withCtx(() => [
3380
3429
  createElementVNode("div", null, [
3381
- createElementVNode("div", _hoisted_3$3, toDisplayString(h($).label), 1),
3382
- createElementVNode("div", _hoisted_4$2, toDisplayString(h($).sublabel), 1)
3430
+ createElementVNode("div", _hoisted_3$3, toDisplayString(v($).label), 1),
3431
+ createElementVNode("div", _hoisted_4$2, toDisplayString(v($).sublabel), 1)
3383
3432
  ]),
3384
3433
  createVNode(m, {
3385
3434
  icon: "delete",
@@ -3389,7 +3438,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3389
3438
  ]),
3390
3439
  _: 2
3391
3440
  }, 1032, ["onClick"]))), 128)),
3392
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(a).filter(($) => $.path.join(".") == ""), ($) => (openBlock(), createBlock(k, {
3441
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(a).filter(($) => $.path.join(".") == ""), ($) => (openBlock(), createBlock(x, {
3393
3442
  key: $.message,
3394
3443
  text: $.message,
3395
3444
  state: "error"
@@ -3405,7 +3454,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3405
3454
  return [
3406
3455
  createElementVNode("div", _hoisted_6$2, [
3407
3456
  createElementVNode("div", null, [
3408
- createElementVNode("div", _hoisted_7$2, toDisplayString(unref(o)("connect.template.mission_pool.collect_stamps", { end: e.mission.end })) + " " + toDisplayString((($ = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : $.earningOption.amount) > 1 ? (F = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : F.earningOption.amount : "") + " " + toDisplayString(e.modelValue[e.modelValue.length - 1] ? f(e.modelValue[e.modelValue.length - 1]) : ""), 1),
3457
+ createElementVNode("div", _hoisted_7$2, toDisplayString(unref(o)("connect.template.mission_pool.collect_stamps", { end: e.mission.end })) + " " + toDisplayString((($ = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : $.earningOption.amount) > 1 ? (F = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : F.earningOption.amount : "") + " " + toDisplayString(e.modelValue[e.modelValue.length - 1] ? y(e.modelValue[e.modelValue.length - 1]) : ""), 1),
3409
3458
  createElementVNode("div", _hoisted_8$2, toDisplayString(unref(o)("connect.template.mission_pool.earn_stamp")), 1)
3410
3459
  ])
3411
3460
  ]),
@@ -3454,35 +3503,35 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3454
3503
  }
3455
3504
  ]), l = s;
3456
3505
  return (n, a) => {
3457
- var h;
3506
+ var v;
3458
3507
  const r = resolveComponent("FmCard"), p = resolveComponent("FmStepperField");
3459
3508
  return openBlock(), createElementBlock("div", _hoisted_1$3, [
3460
3509
  createElementVNode("div", _hoisted_2$2, [
3461
3510
  createElementVNode("div", _hoisted_3$2, toDisplayString(unref(o)("connect.campaign.mission.missionType")), 1),
3462
3511
  createElementVNode("div", _hoisted_4$1, toDisplayString(unref(o)("connect.template.select_game")), 1),
3463
3512
  createElementVNode("div", _hoisted_5$1, [
3464
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(c), (y) => {
3465
- var V, x;
3513
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(c), (f) => {
3514
+ var V, k;
3466
3515
  return openBlock(), createBlock(r, {
3467
3516
  variant: "outlined",
3468
3517
  class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
3469
3518
  "col-span-2": unref(c).length == 1,
3470
- "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((V = e.modelValue) == null ? void 0 : V.type) == y.value,
3471
- "hover:bg-fm-color-opacity-sm": ((x = e.modelValue) == null ? void 0 : x.type) != y.value
3519
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((V = e.modelValue) == null ? void 0 : V.type) == f.value,
3520
+ "hover:bg-fm-color-opacity-sm": ((k = e.modelValue) == null ? void 0 : k.type) != f.value
3472
3521
  }]),
3473
3522
  onClick: () => {
3474
- var f, v;
3475
- ((f = e.modelValue) == null ? void 0 : f.type) != y.value && l("update:model-value", {
3523
+ var y, g;
3524
+ ((y = e.modelValue) == null ? void 0 : y.type) != f.value && l("update:model-value", {
3476
3525
  ...e.modelValue,
3477
- type: y.value,
3478
- end: ((v = e.modelValue) == null ? void 0 : v.end) || 1
3526
+ type: f.value,
3527
+ end: ((g = e.modelValue) == null ? void 0 : g.end) || 1
3479
3528
  });
3480
3529
  },
3481
- key: y.value
3530
+ key: f.value
3482
3531
  }, {
3483
3532
  default: withCtx(() => [
3484
- createElementVNode("div", _hoisted_6$1, toDisplayString(y.label), 1),
3485
- createElementVNode("div", _hoisted_7$1, toDisplayString(y.description), 1)
3533
+ createElementVNode("div", _hoisted_6$1, toDisplayString(f.label), 1),
3534
+ createElementVNode("div", _hoisted_7$1, toDisplayString(f.description), 1)
3486
3535
  ]),
3487
3536
  _: 2
3488
3537
  }, 1032, ["class", "onClick"]);
@@ -3494,13 +3543,13 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3494
3543
  createElementVNode("div", _hoisted_10$1, toDisplayString(unref(o)("connect.campaign.mission.collectionsRequiredDescription")), 1),
3495
3544
  createVNode(p, {
3496
3545
  label: unref(o)("connect.campaign.mission.maximumToCollect"),
3497
- "model-value": ((h = e.modelValue) == null ? void 0 : h.end) || null,
3498
- "onUpdate:modelValue": a[0] || (a[0] = (y) => {
3546
+ "model-value": ((v = e.modelValue) == null ? void 0 : v.end) || null,
3547
+ "onUpdate:modelValue": a[0] || (a[0] = (f) => {
3499
3548
  var V;
3500
3549
  return l("update:model-value", {
3501
3550
  ...e.modelValue,
3502
3551
  type: ((V = e.modelValue) == null ? void 0 : V.type) || "STAMP",
3503
- end: y
3552
+ end: f
3504
3553
  });
3505
3554
  }),
3506
3555
  "helper-text": unref(ZodHelper).helperText(unref(i), "end") || unref(o)("connect.campaign.mission.thresholdHelperText"),
@@ -3554,12 +3603,12 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3554
3603
  function l(p) {
3555
3604
  switch (i.field.type) {
3556
3605
  case "timeframe":
3557
- const h = p.startDate ? hooks(p.startDate).startOf("day").toISOString() : void 0, y = p.endDate ? hooks(p.endDate).endOf("day").toISOString() : void 0;
3606
+ const v = p.startDate ? hooks(p.startDate).startOf("day").toISOString() : void 0, f = p.endDate ? hooks(p.endDate).endOf("day").toISOString() : void 0;
3558
3607
  c("update:model-value", {
3559
3608
  type: "timeframe",
3560
3609
  property: "__now",
3561
- start: h,
3562
- end: y
3610
+ start: v,
3611
+ end: f
3563
3612
  });
3564
3613
  break;
3565
3614
  case "image": {
@@ -3603,10 +3652,10 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3603
3652
  d(i.field.label_locale, i.field.label ?? "")
3604
3653
  ) : void 0
3605
3654
  }));
3606
- return (p, h) => {
3607
- var u, m, C, k, $;
3608
- const y = resolveComponent("FmTextField"), V = resolveComponent("FmStepperField"), x = resolveComponent("FmTextarea"), f = resolveComponent("FmHelperText"), v = resolveComponent("FmSwitch");
3609
- return e.field.type === "text" ? (openBlock(), createBlock(y, {
3655
+ return (p, v) => {
3656
+ var u, m, C, x, $;
3657
+ const f = resolveComponent("FmTextField"), V = resolveComponent("FmStepperField"), k = resolveComponent("FmTextarea"), y = resolveComponent("FmHelperText"), g = resolveComponent("FmSwitch");
3658
+ return e.field.type === "text" ? (openBlock(), createBlock(f, {
3610
3659
  key: 0,
3611
3660
  label: unref(d)(e.field.label_locale, e.field.label ?? ""),
3612
3661
  "label-mark": unref(r).labelMark,
@@ -3628,7 +3677,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3628
3677
  "helper-state": e.field.isRuleChildren && e.helperText ? "error" : void 0,
3629
3678
  "helper-text": e.field.isRuleChildren ? e.helperText : void 0
3630
3679
  }, null, 8, ["label", "label-mark", "model-value", "rules", "helper-state", "helper-text"])
3631
- ], 64)) : e.field.type === "textarea" ? (openBlock(), createBlock(x, {
3680
+ ], 64)) : e.field.type === "textarea" ? (openBlock(), createBlock(k, {
3632
3681
  key: 2,
3633
3682
  label: unref(d)(e.field.label_locale, e.field.label ?? ""),
3634
3683
  "label-mark": unref(r).labelMark,
@@ -3636,7 +3685,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3636
3685
  "model-value": unref(n),
3637
3686
  "onUpdate:modelValue": l,
3638
3687
  "show-word-count": "",
3639
- "max-length": ($ = (k = (C = (m = (u = unref(r)) == null ? void 0 : u.unwrapped) == null ? void 0 : m._def) == null ? void 0 : C.checks) == null ? void 0 : k.find((F) => F.kind == "max")) == null ? void 0 : $.value
3688
+ "max-length": ($ = (x = (C = (m = (u = unref(r)) == null ? void 0 : u.unwrapped) == null ? void 0 : m._def) == null ? void 0 : C.checks) == null ? void 0 : x.find((F) => F.kind == "max")) == null ? void 0 : $.value
3640
3689
  }, null, 8, ["label", "label-mark", "rules", "model-value", "max-length"])) : e.field.type === "trigger" ? (openBlock(), createBlock(_sfc_main$o, {
3641
3690
  key: 3,
3642
3691
  "campaign-type": e.extras,
@@ -3648,7 +3697,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3648
3697
  "model-value": unref(n),
3649
3698
  "onUpdate:modelValue": l
3650
3699
  }, null, 8, ["model-value"]),
3651
- createVNode(f, {
3700
+ createVNode(y, {
3652
3701
  class: "!mt-[8px]",
3653
3702
  text: unref(ZodHelper).helperText(a(), ""),
3654
3703
  state: unref(ZodHelper).helperState(a(), "")
@@ -3664,7 +3713,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3664
3713
  (openBlock(), createBlock(resolveDynamicComponent(unref(r).zodLabel)))
3665
3714
  ]),
3666
3715
  _: 1
3667
- }, 8, ["thumbnail"])) : e.field.type === "switch" ? (openBlock(), createBlock(v, {
3716
+ }, 8, ["thumbnail"])) : e.field.type === "switch" ? (openBlock(), createBlock(g, {
3668
3717
  key: 6,
3669
3718
  label: unref(d)(e.field.label_locale, e.field.label ?? ""),
3670
3719
  "label-placement": "right",
@@ -3700,7 +3749,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3700
3749
  "onUpdate:modelValue": l,
3701
3750
  "can-set-auto-apply": e.field.property == "campaign.effect"
3702
3751
  }, null, 8, ["model-value", "can-set-auto-apply"]),
3703
- unref(n) ? createCommentVNode("", !0) : (openBlock(), createBlock(f, {
3752
+ unref(n) ? createCommentVNode("", !0) : (openBlock(), createBlock(y, {
3704
3753
  key: 0,
3705
3754
  class: "!mt-[8px]",
3706
3755
  text: unref(o)("connect.campaign.common.effect_required"),
@@ -3711,7 +3760,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3711
3760
  "model-value": unref(n),
3712
3761
  "onUpdate:modelValue": l
3713
3762
  }, null, 8, ["model-value"]),
3714
- unref(n) ? createCommentVNode("", !0) : (openBlock(), createBlock(f, {
3763
+ unref(n) ? createCommentVNode("", !0) : (openBlock(), createBlock(y, {
3715
3764
  key: 0,
3716
3765
  class: "!mt-[8px]",
3717
3766
  text: unref(o)("connect.campaign.common.effect_required"),
@@ -3783,7 +3832,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3783
3832
  "start-date": e.extras.start,
3784
3833
  "end-date": e.extras.end
3785
3834
  }, null, 8, ["model-value", "start-date", "end-date"]),
3786
- e.helperText ? (openBlock(), createBlock(f, {
3835
+ e.helperText ? (openBlock(), createBlock(y, {
3787
3836
  key: 0,
3788
3837
  class: "!mt-[8px]",
3789
3838
  text: e.helperText,
@@ -3794,14 +3843,14 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3794
3843
  "model-value": unref(n),
3795
3844
  "onUpdate:modelValue": l
3796
3845
  }, null, 8, ["model-value"]),
3797
- e.helperText ? (openBlock(), createBlock(f, {
3846
+ e.helperText ? (openBlock(), createBlock(y, {
3798
3847
  key: 0,
3799
3848
  class: "!mt-[8px]",
3800
3849
  text: e.helperText,
3801
3850
  state: "error"
3802
3851
  }, null, 8, ["text"])) : createCommentVNode("", !0)
3803
3852
  ], 64)) : e.field.type === "rule_time" ? (openBlock(), createElementBlock(Fragment, { key: 24 }, [
3804
- e.extras == "PROMOTION" && unref(RuleBuilder).getRules(unref(n).rules.g_time).length > 0 ? (openBlock(), createBlock(f, {
3853
+ e.extras == "PROMOTION" && unref(RuleBuilder).getRules(unref(n).rules.g_time).length > 0 ? (openBlock(), createBlock(y, {
3805
3854
  key: 0,
3806
3855
  state: "warning",
3807
3856
  text: `Time based rule only work for POS >= v${unref(featureVersionMapping).TIME_BASED_PROMOTION}`
@@ -3810,7 +3859,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3810
3859
  "model-value": unref(n),
3811
3860
  "onUpdate:modelValue": l
3812
3861
  }, null, 8, ["model-value"]),
3813
- e.helperText ? (openBlock(), createBlock(f, {
3862
+ e.helperText ? (openBlock(), createBlock(y, {
3814
3863
  key: 1,
3815
3864
  class: "!mt-[8px]",
3816
3865
  text: e.helperText,
@@ -3821,7 +3870,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3821
3870
  "model-value": unref(n),
3822
3871
  "onUpdate:modelValue": l
3823
3872
  }, null, 8, ["model-value"]),
3824
- e.helperText ? (openBlock(), createBlock(f, {
3873
+ e.helperText ? (openBlock(), createBlock(y, {
3825
3874
  key: 0,
3826
3875
  class: "!mt-[8px]",
3827
3876
  text: e.helperText,
@@ -3832,7 +3881,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3832
3881
  "model-value": unref(n),
3833
3882
  "onUpdate:modelValue": l
3834
3883
  }, null, 8, ["model-value"]),
3835
- e.helperText ? (openBlock(), createBlock(f, {
3884
+ e.helperText ? (openBlock(), createBlock(y, {
3836
3885
  key: 0,
3837
3886
  class: "!mt-[8px]",
3838
3887
  text: e.helperText,
@@ -3843,7 +3892,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3843
3892
  "model-value": unref(n),
3844
3893
  "onUpdate:modelValue": l
3845
3894
  }, null, 8, ["model-value"]),
3846
- e.helperText ? (openBlock(), createBlock(f, {
3895
+ e.helperText ? (openBlock(), createBlock(y, {
3847
3896
  key: 0,
3848
3897
  class: "!mt-[8px]",
3849
3898
  text: e.helperText,
@@ -3854,7 +3903,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3854
3903
  "model-value": unref(n),
3855
3904
  "onUpdate:modelValue": l
3856
3905
  }, null, 8, ["model-value"]),
3857
- e.helperText ? (openBlock(), createBlock(f, {
3906
+ e.helperText ? (openBlock(), createBlock(y, {
3858
3907
  key: 0,
3859
3908
  class: "!mt-[8px]",
3860
3909
  text: e.helperText,
@@ -4021,14 +4070,14 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
4021
4070
  return;
4022
4071
  }
4023
4072
  if (_.set(data.value, e, s), e == "campaign.event.type") {
4024
- const h = ((c = (i = (d = (o = template.value) == null ? void 0 : o.defaultValue) == null ? void 0 : d.campaign) == null ? void 0 : i.event) == null ? void 0 : c.rule) ? _.cloneDeep({
4073
+ const v = ((c = (i = (d = (o = template.value) == null ? void 0 : o.defaultValue) == null ? void 0 : d.campaign) == null ? void 0 : i.event) == null ? void 0 : c.rule) ? _.cloneDeep({
4025
4074
  ...(r = (a = (n = (l = template.value) == null ? void 0 : l.defaultValue) == null ? void 0 : n.campaign) == null ? void 0 : a.event) == null ? void 0 : r.rule
4026
4075
  }) : RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup(), [
4027
4076
  RuleBuilder.scaffoldGroup("g_schedule"),
4028
4077
  RuleBuilder.scaffoldGroup("g_time"),
4029
4078
  RuleBuilder.scaffoldGroup("g_user"),
4030
4079
  RuleBuilder.scaffoldGroup("g_bill")
4031
- ]), y = RuleBuilder.setRuleToGroup(
4080
+ ]), f = RuleBuilder.setRuleToGroup(
4032
4081
  RuleBuilder.scaffoldGroup("g_schedule"),
4033
4082
  [
4034
4083
  RuleBuilder.constructEntry(
@@ -4041,13 +4090,13 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
4041
4090
  "&&"
4042
4091
  );
4043
4092
  if (s != "SCHEDULE") {
4044
- _.set(data.value, "campaign.event.rule", h);
4093
+ _.set(data.value, "campaign.event.rule", v);
4045
4094
  return;
4046
4095
  }
4047
4096
  _.set(
4048
4097
  data.value,
4049
4098
  "campaign.event.rule",
4050
- RuleBuilder.setRuleToGroup(h, y)
4099
+ RuleBuilder.setRuleToGroup(v, f)
4051
4100
  );
4052
4101
  }
4053
4102
  e == "campaign.notify" && s == !1 && _.set(data.value, "campaign.notifyMessage", void 0);
@@ -4221,9 +4270,9 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
4221
4270
  disabled: isDisable(r),
4222
4271
  "campaign-type": unref(campaignType),
4223
4272
  "show-validation": unref(showValidation),
4224
- "onUpdate:modelValue": (h) => onUpdateProperty(r.property, h),
4225
- "onUpdate:file": async (h, y) => {
4226
- const V = await onUpdateFile(h, y);
4273
+ "onUpdate:modelValue": (v) => onUpdateProperty(r.property, v),
4274
+ "onUpdate:file": async (v, f) => {
4275
+ const V = await onUpdateFile(v, f);
4227
4276
  onUpdateProperty(r.property, V || "");
4228
4277
  },
4229
4278
  schema: unref(ZodHelper).typeAtPath(