@feedmepos/mf-connect 0.1.0-beta.49 → 0.1.0-beta.50

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 (88) hide show
  1. package/dist/{Analytic-DTJ_SOI3.js → Analytic-D-yp03jJ.js} +11 -11
  2. package/dist/{App-Cls9g4sA.js → App-CeQWTGNK.js} +55 -51
  3. package/dist/{AuditLogs-xbOKPoQS.js → AuditLogs-2qzwcMXR.js} +8 -8
  4. package/dist/Bin-D1b2NbbA.js +191 -0
  5. package/dist/{Broadcast-UeoV6_0x.js → Broadcast-bKF9mIns.js} +9 -9
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BPl_0m0I.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B_q5K-cx.js} +6 -6
  7. package/dist/{Card-DSK_2b0H.js → Card-BCAyfBLi.js} +15 -15
  8. package/dist/{Collections-U63Y-tw8.js → Collections-Yz3F55bv.js} +5 -5
  9. package/dist/{Credit-CC1k4c10.js → Credit-Ceptt_g_.js} +9 -9
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BUPBXZWy.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-TjNinQ8e.js} +28 -28
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DnjTCWUk.js → EffectSheet.vue_vue_type_style_index_0_lang-D3Bt-Vuu.js} +8 -8
  12. package/dist/{Experience-UBLCm5X8.js → Experience-DskHKzfo.js} +9 -9
  13. package/dist/{Game-DN8qNmAV.js → Game-IJ6X0AXM.js} +9 -9
  14. package/dist/{Index-Cp5Iqmgq.js → Index-CEl2y9X6.js} +93 -90
  15. package/dist/{Marketing-BTZSeQdq.js → Marketing-CWekLb4c.js} +6 -6
  16. package/dist/{Member-DKGZpaNY.js → Member-BUZPQ5Lb.js} +4 -4
  17. package/dist/{MemberList-BDv5O7_F.js → MemberList-BmVNqvbm.js} +24 -24
  18. package/dist/{MemberTransactions-Cp_g2uYy.js → MemberTransactions-B3XhEOK_.js} +1 -1
  19. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-TBeUosVs.js → MessageInput.vue_vue_type_script_setup_true_lang-C6YIbQtM.js} +2 -2
  20. package/dist/{Mission-Cte8Jtyj.js → Mission-Ci9ed_ph.js} +9 -9
  21. package/dist/{Overview-COeyTvML.js → Overview-CU9uhC-k.js} +399 -395
  22. package/dist/{Point-Cu5_d5X1.js → Point-wuuR7AEb.js} +9 -9
  23. package/dist/{Promotion-Cf8ct95o.js → Promotion-BMi3kyE8.js} +10 -10
  24. package/dist/Record-Wmh-g8WY.js +340 -0
  25. package/dist/{Reward-Bcx7bCEh.js → Reward-BL4lxhIB.js} +35 -35
  26. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CwApma5p.js → RewardGroup.vue_vue_type_script_setup_true_lang-CqXuTxun.js} +11 -11
  27. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Cg3bA1cc.js → RuleGroup.vue_vue_type_script_setup_true_lang-Dbik0PEw.js} +12 -12
  28. package/dist/{Segment-BfMpM62H.js → Segment-DObdjyYi.js} +14 -14
  29. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-CqZIHzA3.js → SelectItems.vue_vue_type_script_setup_true_lang-BAuM6qP5.js} +2 -2
  30. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-BfyRVxWM.js +147 -0
  31. package/dist/{Setting-Btim3PZq.js → Setting-Dqgnd7TR.js} +10 -10
  32. package/dist/{Store-BbiTlkAz.js → Store--Z4So__g.js} +18 -18
  33. package/dist/{StoreRewards-hbNthA-_.js → StoreRewards-DPFVXWwm.js} +13 -13
  34. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Dv58wFeO.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CNsdA106.js} +17 -17
  35. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BJvBo7sT.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CGOmGozY.js} +1 -1
  36. package/dist/{Tier-Ddj_dwc8.js → Tier-36IfhsnP.js} +19 -19
  37. package/dist/{Title-CA6b8UxN.js → Title-XH56OOug.js} +19 -19
  38. package/dist/{Transaction-yp6PDE_8.js → Transaction-BUQcSmBs.js} +2 -2
  39. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DoCmo4D7.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BVCfeG5T.js} +6 -6
  40. package/dist/Voucher-CvmH0kcF.js +353 -0
  41. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-aYXqbp2E.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BQOD6uEf.js} +15 -15
  42. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Bz77dtVR.js → ZodTextField.vue_vue_type_script_setup_true_lang-CcIcCt4N.js} +1 -1
  43. package/dist/{app-BpikVDEt.js → app-DeW5_DB0.js} +712 -547
  44. package/dist/{app-DG6xKzyo.js → app-TN8KEPMu.js} +1 -1
  45. package/dist/app.js +1 -1
  46. package/dist/{business-DPl8ug6e.js → business-D1mLhSME.js} +1 -1
  47. package/dist/{campaign-D9xub_rP.js → campaign-0tnkhu78.js} +11 -11
  48. package/dist/{campaign-CLF6bWG4.js → campaign-B-12Im0w.js} +2 -2
  49. package/dist/{campaign.enum-DJijW358.js → campaign.enum-C8m-HHZE.js} +1 -1
  50. package/dist/{campaign.fn-DgyMbDS2.js → campaign.fn-CxkhbK9i.js} +110 -110
  51. package/dist/{collectible.enum-q3RNa6ac.js → collectible.enum-6Syq-vQ6.js} +3 -3
  52. package/dist/{collection.fn-DQdOmMPm.js → collection.fn-BUj75Jp2.js} +2 -2
  53. package/dist/{dto-Gtphhk7f.js → dto-8wODhIIC.js} +7 -7
  54. package/dist/{effect-b6TK6WqX.js → effect-BEZEjcJu.js} +1 -1
  55. package/dist/{email-addresses-BOOXVJIb.js → email-addresses-PwjkdYYD.js} +1 -1
  56. package/dist/{export-DB-hJPwq.js → export-BB-0vgwy.js} +3 -3
  57. package/dist/{helper-DaoMEMRy.js → helper-DOt8-wns.js} +1 -1
  58. package/dist/{index-Dd_g3RuO.js → index-B1qUjniH.js} +1 -1
  59. package/dist/{index-tXvAp_RD.js → index-BTMIZz4v.js} +1 -1
  60. package/dist/{index-zaGTl_qB.js → index-By-GlmG7.js} +2 -2
  61. package/dist/index-C7zBkoZ4.js +115 -0
  62. package/dist/{index-CC24qW42.js → index-CNlHabtk.js} +1 -1
  63. package/dist/{index-BsYcA4d4.js → index-CXGiIgdK.js} +1 -1
  64. package/dist/{index-DplAli0B.js → index-Cjn1LVjC.js} +38 -35
  65. package/dist/{index-CGCV3Q39.js → index-CpfUrdgw.js} +3 -3
  66. package/dist/{index-rU6SAS58.js → index-DZuEmMyY.js} +3 -3
  67. package/dist/{index-lAMRbOeY.js → index-D_zwqIhq.js} +1 -1
  68. package/dist/{index-V4sEiiYS.js → index-DabUEw_c.js} +1 -1
  69. package/dist/{index-BeE1k0xs.js → index-X-FfC49l.js} +6 -6
  70. package/dist/{index.esm2017-BpKyZnrS.js → index.esm2017-DJOUiVjR.js} +1 -1
  71. package/dist/{loading-aAPveWkt.js → loading-aCWVsOPY.js} +1 -1
  72. package/dist/{membership-CdHkfBpk.js → membership-1etsHC5G.js} +6 -6
  73. package/dist/{money-yvgF4-JZ.js → money-DzWRURZ5.js} +1 -1
  74. package/dist/{number-5CZfadpH.js → number-BxIQO1i3.js} +1 -1
  75. package/dist/{objectid-Cz3ihSHZ.js → objectid-DjhmYkn-.js} +7 -7
  76. package/dist/{plugins-CFwYNZo0.js → plugins-CSPFAU50.js} +4 -4
  77. package/dist/{reward-DfX_2rEr.js → reward-Bh4Li9f0.js} +1 -1
  78. package/dist/{rule-D_HCGBXt.js → rule-CHTTTUFB.js} +3 -3
  79. package/dist/{rule-builder-DaJ2wADR.js → rule-builder-OHfUJTIA.js} +1 -1
  80. package/dist/{template-BFcHBZjo.js → template-ZGxXqkaC.js} +4 -4
  81. package/dist/{trigger-BnfqcoU-.js → trigger-Ogu5FDs0.js} +13 -13
  82. package/dist/{user-bXWIOEFL.js → user-DBuU81tO.js} +1 -1
  83. package/dist/{vue-i18n-kVKjcgAi.js → vue-i18n-CKpKQ6iE.js} +299 -299
  84. package/dist/{xlsx-C0oaHSzL.js → xlsx-DJDZBIeg.js} +1 -1
  85. package/package.json +1 -1
  86. package/dist/Record-BTsMyNzQ.js +0 -339
  87. package/dist/Voucher-CGB4koQI.js +0 -491
  88. package/dist/index-CSmO-8Va.js +0 -99
@@ -1,28 +1,28 @@
1
- import { defineComponent as q, resolveComponent as _, openBlock as R, createElementBlock as B, Fragment as Y, createVNode as d, withCtx as V, createElementVNode as a, toDisplayString as O, unref as t, renderSlot as ve, ref as F, computed as G, watch as ie, createBlock as D, isRef as W, resolveDynamicComponent as ne, renderList as re, normalizeClass as de, createTextVNode as ce, createCommentVNode as z, h as te, onMounted as ge } from "vue";
2
- import { _ as we } from "./campaign-CpzFl8Vr.js";
3
- import { u as Z } from "./vue-i18n-kVKjcgAi.js";
4
- import { u as ue } from "./loading-aAPveWkt.js";
5
- import { c as _e, p as K } from "./plugins-CFwYNZo0.js";
1
+ import { defineComponent as q, resolveComponent as w, openBlock as C, createElementBlock as B, Fragment as Y, createVNode as c, withCtx as V, createElementVNode as a, toDisplayString as O, unref as r, renderSlot as ve, ref as F, computed as G, watch as ie, createBlock as j, isRef as J, resolveDynamicComponent as ne, renderList as re, normalizeClass as de, createTextVNode as ce, createCommentVNode as z, h as te, onMounted as _e } from "vue";
2
+ import { _ as ge } from "./campaign-CpzFl8Vr.js";
3
+ import { u as Z } from "./vue-i18n-CKpKQ6iE.js";
4
+ import { u as ue } from "./loading-aCWVsOPY.js";
5
+ import { c as we, p as K } from "./plugins-CSPFAU50.js";
6
6
  import { J as X } from "./JsonViewer-v8_C7l5N.js";
7
7
  import { Z as N } from "./zod-Bg2FbC-D.js";
8
- import { u as J } from "./app-wDQR6dpb.js";
9
- import { u as Q, _ as ye } from "./RewardGroup.vue_vue_type_script_setup_true_lang-CwApma5p.js";
10
- import { u as me } from "./reward-DfX_2rEr.js";
11
- import { a as be, b as xe } from "./index-BeE1k0xs.js";
12
- import { q as le, r as se } from "./index-DplAli0B.js";
13
- import "./index-zaGTl_qB.js";
14
- import "./index-Dd_g3RuO.js";
15
- import "./index-rU6SAS58.js";
16
- import { C as fe } from "./membership-CdHkfBpk.js";
17
- import { t as ee } from "./helper-DaoMEMRy.js";
8
+ import { u as W } from "./app-wDQR6dpb.js";
9
+ import { u as Q, _ as ye } from "./RewardGroup.vue_vue_type_script_setup_true_lang-CqXuTxun.js";
10
+ import { u as me } from "./reward-Bh4Li9f0.js";
11
+ import { a as be, b as xe } from "./index-X-FfC49l.js";
12
+ import { i as le, j as se } from "./index-Cjn1LVjC.js";
13
+ import "./index-By-GlmG7.js";
14
+ import "./index-B1qUjniH.js";
15
+ import "./index-DZuEmMyY.js";
16
+ import { C as fe } from "./membership-1etsHC5G.js";
17
+ import { t as ee } from "./helper-DOt8-wns.js";
18
18
  import { c as H } from "./object-qECH92oz.js";
19
- import { useDialog as Re, components as oe } from "@feedmepos/ui-library";
20
- import { _ as Ce } from "./ZodTextField.vue_vue_type_script_setup_true_lang-Bz77dtVR.js";
21
- import { b as Se, _ as Fe, a as ke } from "./trigger-BnfqcoU-.js";
22
- import { O as $e } from "./objectid-Cz3ihSHZ.js";
23
- import { r as pe } from "./index-V4sEiiYS.js";
24
- import { u as Pe } from "./business-DPl8ug6e.js";
25
- const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, Te = { class: "flex-1" }, Ue = { class: "flex items-center gap-8" }, Ae = { class: "fm-typo-en-title-sm-800" }, Le = { class: "flex gap-8 items-center" }, Ee = { class: "space-y-4 hidden xs:block border-b border-fm-color-neutral-gray-100 px-16 flex-1 pb-24" }, Be = { class: "flex items-center justify-between" }, Oe = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, De = { class: "flex-1 space-y-4" }, je = { class: "fm-typo-en-body-lg-600" }, Ge = /* @__PURE__ */ q({
19
+ import { useDialog as Ce, components as oe } from "@feedmepos/ui-library";
20
+ import { _ as Re } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CcIcCt4N.js";
21
+ import { T as Se, _ as Fe, a as ke } from "./trigger-Ogu5FDs0.js";
22
+ import { O as $e } from "./objectid-DjhmYkn-.js";
23
+ import { r as pe } from "./index-DabUEw_c.js";
24
+ import { u as Pe } from "./business-D1mLhSME.js";
25
+ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, Te = { class: "flex-1" }, Ue = { class: "flex items-center gap-8" }, Ae = { class: "fm-typo-en-title-sm-800" }, Le = { class: "flex gap-8 items-center" }, Ee = { class: "space-y-4 hidden xs:block border-b border-fm-color-neutral-gray-100 px-16 flex-1 pb-24" }, Be = { class: "flex items-center justify-between" }, Oe = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, je = { class: "flex-1 space-y-4" }, De = { class: "fm-typo-en-body-lg-600" }, Ge = /* @__PURE__ */ q({
26
26
  __name: "ReferralRewadGroupCard",
27
27
  props: {
28
28
  rewardGroup: {
@@ -35,13 +35,13 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
35
35
  }
36
36
  },
37
37
  emits: ["edit", "addCount", "remove"],
38
- setup(k, { emit: m }) {
39
- const { t: I } = Z(), p = m;
40
- return (w, f) => {
41
- const l = _("FmButton"), c = _("FmListItem");
42
- return R(), B(Y, null, [
43
- d(c, {
44
- onClick: f[4] || (f[4] = (u) => p("edit", k.level)),
38
+ setup(k, { emit: l }) {
39
+ const { t: I } = Z(), p = l;
40
+ return (g, f) => {
41
+ const s = w("FmButton"), u = w("FmListItem");
42
+ return C(), B(Y, null, [
43
+ c(u, {
44
+ onClick: f[4] || (f[4] = (m) => p("edit", k.level)),
45
45
  class: "!p-0"
46
46
  }, {
47
47
  default: V(() => [
@@ -54,18 +54,18 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
54
54
  ])
55
55
  ]),
56
56
  a("div", Le, [
57
- d(l, {
57
+ c(s, {
58
58
  variant: "secondary",
59
- label: t(I)("connect.referral.reward.add_count"),
59
+ label: r(I)("connect.referral.reward.add_count"),
60
60
  icon: "add",
61
- onClick: f[0] || (f[0] = (u) => {
62
- u.stopPropagation(), p("addCount", k.level);
61
+ onClick: f[0] || (f[0] = (m) => {
62
+ m.stopPropagation(), p("addCount", k.level);
63
63
  })
64
64
  }, null, 8, ["label"]),
65
- d(l, {
65
+ c(s, {
66
66
  icon: "delete",
67
- onClick: f[1] || (f[1] = (u) => {
68
- u.stopPropagation(), p("remove", k.level);
67
+ onClick: f[1] || (f[1] = (m) => {
68
+ m.stopPropagation(), p("remove", k.level);
69
69
  }),
70
70
  variant: "tertiary"
71
71
  })
@@ -74,72 +74,72 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
74
74
  a("div", Ee, [
75
75
  a("div", Be, [
76
76
  a("div", Oe, [
77
- a("div", De, [
77
+ a("div", je, [
78
78
  a("div", null, [
79
- a("div", je, O(k.rewardGroup.name), 1)
79
+ a("div", De, O(k.rewardGroup.name), 1)
80
80
  ])
81
81
  ])
82
82
  ]),
83
- d(l, {
83
+ c(s, {
84
84
  variant: "tertiary",
85
85
  icon: "delete",
86
- onClick: f[2] || (f[2] = (u) => (u.stopPropagation(), p("remove", k.level)))
86
+ onClick: f[2] || (f[2] = (m) => (m.stopPropagation(), p("remove", k.level)))
87
87
  })
88
88
  ]),
89
- d(l, {
89
+ c(s, {
90
90
  class: "w-full",
91
91
  variant: "secondary",
92
92
  label: "Add count",
93
93
  disabled: !0,
94
94
  icon: "add",
95
- onClick: f[3] || (f[3] = (u) => (u.stopPropagation(), p("addCount", k.level)))
95
+ onClick: f[3] || (f[3] = (m) => (m.stopPropagation(), p("addCount", k.level)))
96
96
  })
97
97
  ])
98
98
  ]),
99
99
  _: 1
100
100
  }),
101
- ve(w.$slots, "default")
101
+ ve(g.$slots, "default")
102
102
  ], 64);
103
103
  };
104
104
  }
105
- }), Me = { class: "flex flex-col space-y-16 pr-12" }, Ne = { class: "flex gap-16 items-center" }, He = { class: "fm-typo-en-title-sm-800" }, ze = { class: "flex items-center gap-8" }, Ye = /* @__PURE__ */ q({
105
+ }), Me = { class: "flex flex-col space-y-16 pr-12" }, Ne = { class: "flex gap-16 items-center" }, He = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ze = { class: "fm-typo-en-title-sm-800" }, Ye = { class: "flex items-center gap-8" }, qe = /* @__PURE__ */ q({
106
106
  __name: "EditReferralCountSheet",
107
107
  emits: ["update"],
108
- setup(k, { expose: m, emit: I }) {
109
- const { t: p } = Z(), w = I, f = F(!1), l = F({}), c = F(-1), u = F(-1), C = Q(), A = be.superRefine((e, r) => {
108
+ setup(k, { expose: l, emit: I }) {
109
+ const { t: p } = Z(), g = I, f = F(!1), s = F({}), u = F(-1), m = F(-1), R = Q(), A = be.superRefine((e, t) => {
110
110
  var $, U, P, x, v, E, ae;
111
- const i = u.value == -1 ? ((P = (U = ($ = C.referralProgram) == null ? void 0 : $.reward[c.value]) == null ? void 0 : U.rewards) == null ? void 0 : P.length) || 0 : u.value, g = (v = (x = C.referralProgram) == null ? void 0 : x.reward[c.value]) == null ? void 0 : v.rewards[i - 1], b = (ae = (E = C.referralProgram) == null ? void 0 : E.reward[c.value]) == null ? void 0 : ae.rewards[i + 1];
112
- g && e.threshold.from < g.threshold.from + 1 && r.addIssue({
111
+ const d = m.value == -1 ? ((P = (U = ($ = R.referralProgram) == null ? void 0 : $.reward[u.value]) == null ? void 0 : U.rewards) == null ? void 0 : P.length) || 0 : m.value, _ = (v = (x = R.referralProgram) == null ? void 0 : x.reward[u.value]) == null ? void 0 : v.rewards[d - 1], b = (ae = (E = R.referralProgram) == null ? void 0 : E.reward[u.value]) == null ? void 0 : ae.rewards[d + 1];
112
+ _ && e.threshold.from < _.threshold.from + 1 && t.addIssue({
113
113
  code: "custom",
114
- message: `The min referral must be at least ${g.threshold.from + 1}`,
114
+ message: `The min referral must be at least ${_.threshold.from + 1}`,
115
115
  path: ["option"]
116
- }), b && e.threshold.to && b.threshold.to && e.threshold.to > b.threshold.to - 1 && r.addIssue({
116
+ }), b && e.threshold.to && b.threshold.to && e.threshold.to > b.threshold.to - 1 && t.addIssue({
117
117
  code: "custom",
118
118
  message: `The max referral must be at most ${b.threshold.to - 2}`,
119
119
  path: ["option"]
120
120
  });
121
121
  }), T = G(() => {
122
- const e = A.safeParse(l.value);
122
+ const e = A.safeParse(s.value);
123
123
  return e.success ? [] : e.error.errors;
124
124
  });
125
125
  function M() {
126
- const e = A.safeParse(l.value);
127
- e.success && w("update", {
128
- groupIndex: c.value,
129
- countIndex: u.value,
126
+ const e = A.safeParse(s.value);
127
+ e.success && g("update", {
128
+ groupIndex: u.value,
129
+ countIndex: m.value,
130
130
  referralCount: e.data
131
131
  });
132
132
  }
133
- async function j(e, r) {
134
- var i, g, b, $, U, P;
135
- if (f.value = e, e && typeof (r == null ? void 0 : r.countIndex) == "number" && r.countIndex >= 0)
136
- c.value = r.groupIndex, u.value = r.countIndex, l.value = H(
137
- (i = C.referralProgram) == null ? void 0 : i.reward[r.groupIndex].rewards[r.countIndex]
133
+ async function D(e, t) {
134
+ var d, _, b, $, U, P;
135
+ if (f.value = e, e && typeof (t == null ? void 0 : t.countIndex) == "number" && t.countIndex >= 0)
136
+ u.value = t.groupIndex, m.value = t.countIndex, s.value = H(
137
+ (d = R.referralProgram) == null ? void 0 : d.reward[t.groupIndex].rewards[t.countIndex]
138
138
  );
139
139
  else {
140
- c.value = r.groupIndex, u.value = -1;
141
- const x = u.value == -1 ? (($ = (b = (g = C.referralProgram) == null ? void 0 : g.reward[c.value]) == null ? void 0 : b.rewards) == null ? void 0 : $.length) || 0 : u.value, v = (P = (U = C.referralProgram) == null ? void 0 : U.reward[c.value]) == null ? void 0 : P.rewards[x - 1];
142
- l.value = {
140
+ u.value = t.groupIndex, m.value = -1;
141
+ const x = m.value == -1 ? (($ = (b = (_ = R.referralProgram) == null ? void 0 : _.reward[u.value]) == null ? void 0 : b.rewards) == null ? void 0 : $.length) || 0 : m.value, v = (P = (U = R.referralProgram) == null ? void 0 : U.reward[u.value]) == null ? void 0 : P.rewards[x - 1];
142
+ s.value = {
143
143
  threshold: {
144
144
  from: v != null && v.threshold ? v != null && v.threshold.to ? v.threshold.to + 1 : (v == null ? void 0 : v.threshold.from) + 1 : 1,
145
145
  to: null
@@ -147,8 +147,8 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
147
147
  rewards: []
148
148
  };
149
149
  }
150
- h.value = [], h.value = s.value.map(
151
- (x) => l.value.rewards.includes(x.id)
150
+ h.value = [], h.value = i.value.map(
151
+ (x) => s.value.rewards.includes(x.id)
152
152
  );
153
153
  }
154
154
  function L() {
@@ -171,19 +171,19 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
171
171
  header: "Description",
172
172
  accessorFn: (e) => e.description,
173
173
  cell(e) {
174
- const r = e.row.original;
175
- if (r.collectible.type == "VOUCHER" || r.selectedReward == null)
176
- return r.description;
174
+ const t = e.row.original;
175
+ if (t.collectible.type == "VOUCHER" || t.selectedReward == null)
176
+ return t.description;
177
177
  }
178
178
  }
179
- ], n = me(), o = F([]), s = G(() => n.rewards.map((e) => {
180
- let r = "No expiry";
179
+ ], n = me(), o = F([]), i = G(() => n.rewards.map((e) => {
180
+ let t = "No expiry";
181
181
  switch (e.option.type) {
182
182
  case "VOUCHER":
183
- r = `${e.option.collectibleConfig.options.maxUse} use(s), ${ee(e.option.collectibleConfig.options.validityOption || {})}`;
183
+ t = `${e.option.collectibleConfig.options.maxUse} use(s), ${ee(e.option.collectibleConfig.options.validityOption || {})}`;
184
184
  break;
185
185
  case "LOYALTY":
186
- r = `${e.option.earningOption.amount}, ${ee(e.option.validityOption || {})}`;
186
+ t = `${e.option.earningOption.amount}, ${ee(e.option.validityOption || {})}`;
187
187
  break;
188
188
  }
189
189
  return {
@@ -191,64 +191,64 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
191
191
  name: e.name,
192
192
  collectible: e.option,
193
193
  collectibleConfig: e.collectibleConfig,
194
- description: r
194
+ description: t
195
195
  };
196
196
  }));
197
197
  G(() => []);
198
198
  function S() {
199
- const e = s.value;
200
- for (let r = 0; r < e.length; r++) {
201
- const i = e[r], g = h.value[r];
202
- g && !l.value.rewards.includes(i.id) && l.value.rewards.push(i.id), !g && l.value.rewards.includes(i.id) && (l.value.rewards = l.value.rewards.filter(
203
- (b) => b != i.id
199
+ const e = i.value;
200
+ for (let t = 0; t < e.length; t++) {
201
+ const d = e[t], _ = h.value[t];
202
+ _ && !s.value.rewards.includes(d.id) && s.value.rewards.push(d.id), !_ && s.value.rewards.includes(d.id) && (s.value.rewards = s.value.rewards.filter(
203
+ (b) => b != d.id
204
204
  ));
205
205
  }
206
206
  }
207
207
  const h = F({});
208
- return ie(h, S, { deep: !0 }), m({
209
- showSheet: j,
208
+ return ie(h, S, { deep: !0 }), l({
209
+ showSheet: D,
210
210
  hideSheet: L,
211
- data: l
212
- }), (e, r) => {
213
- const i = _("FmStepperField"), g = _("FmHelperText"), b = _("FmTable"), $ = _("FmButton"), U = _("FmSideSheet");
214
- return R(), D(U, {
211
+ data: s
212
+ }), (e, t) => {
213
+ const d = w("FmStepperField"), _ = w("FmHelperText"), b = w("FmTable"), $ = w("FmButton"), U = w("FmSideSheet");
214
+ return C(), j(U, {
215
215
  "max-width": 1e3,
216
- modelValue: t(f),
217
- "onUpdate:modelValue": r[4] || (r[4] = (P) => W(f) ? f.value = P : null),
218
- header: `${t(u) == -1 ? t(p)("connect.referral.editReferralCountSheet.add") : t(p)("connect.referral.editReferralCountSheet.edit")}`
216
+ modelValue: r(f),
217
+ "onUpdate:modelValue": t[4] || (t[4] = (P) => J(f) ? f.value = P : null),
218
+ header: `${r(m) == -1 ? r(p)("connect.referral.editReferralCountSheet.add") : r(p)("connect.referral.editReferralCountSheet.edit")}`
219
219
  }, {
220
220
  "side-sheet-footer": V(() => [
221
- a("div", ze, [
222
- d($, {
223
- label: t(p)("connect.editTierSheet.submit"),
221
+ a("div", Ye, [
222
+ c($, {
223
+ label: r(p)("connect.editTierSheet.submit"),
224
224
  onClick: M,
225
- disabled: t(T).length > 0 || t(J)().isLoading,
226
- loading: t(J)().isLoading
225
+ disabled: r(T).length > 0 || r(W)().isLoading,
226
+ loading: r(W)().isLoading
227
227
  }, null, 8, ["label", "disabled", "loading"]),
228
- d($, {
229
- label: t(p)("connect.editTierSheet.cancel"),
230
- onClick: r[3] || (r[3] = (P) => L()),
228
+ c($, {
229
+ label: r(p)("connect.editTierSheet.cancel"),
230
+ onClick: t[3] || (t[3] = (P) => L()),
231
231
  variant: "tertiary"
232
232
  }, null, 8, ["label"])
233
233
  ])
234
234
  ]),
235
235
  default: V(() => [
236
- d(X, { json: t(l) }, null, 8, ["json"]),
237
- d(X, { json: t(T) }, null, 8, ["json"]),
236
+ c(X, { json: r(s) }, null, 8, ["json"]),
237
+ c(X, { json: r(T) }, null, 8, ["json"]),
238
238
  a("div", Me, [
239
239
  a("div", null, [
240
240
  a("div", Ne, [
241
- d(i, {
242
- modelValue: t(l).threshold.from,
243
- "onUpdate:modelValue": r[0] || (r[0] = (P) => t(l).threshold.from = P),
241
+ c(d, {
242
+ modelValue: r(s).threshold.from,
243
+ "onUpdate:modelValue": t[0] || (t[0] = (P) => r(s).threshold.from = P),
244
244
  "show-steppers": !1,
245
- rules: [t(N).ruleAtPath(t(A), "threshold.from")]
245
+ rules: [r(N).ruleAtPath(r(A), "threshold.from")]
246
246
  }, {
247
247
  label: V(() => [
248
- (R(), D(ne(
249
- t(N).toInputLabel(
250
- t(N).typeAtPath(t(A), "threshold.from"),
251
- t(p)(
248
+ (C(), j(ne(
249
+ r(N).toInputLabel(
250
+ r(N).typeAtPath(r(A), "threshold.from"),
251
+ r(p)(
252
252
  "connect.referral.editReferralCountSheet.min_referral_count"
253
253
  )
254
254
  )
@@ -256,17 +256,17 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
256
256
  ]),
257
257
  _: 1
258
258
  }, 8, ["modelValue", "rules"]),
259
- d(i, {
260
- modelValue: t(l).threshold.to,
261
- "onUpdate:modelValue": r[1] || (r[1] = (P) => t(l).threshold.to = P),
259
+ c(d, {
260
+ modelValue: r(s).threshold.to,
261
+ "onUpdate:modelValue": t[1] || (t[1] = (P) => r(s).threshold.to = P),
262
262
  "show-steppers": !1,
263
- rules: [t(N).ruleAtPath(t(A), "threshold.to")]
263
+ rules: [r(N).ruleAtPath(r(A), "threshold.to")]
264
264
  }, {
265
265
  label: V(() => [
266
- (R(), D(ne(
267
- t(N).toInputLabel(
268
- t(N).typeAtPath(t(A), "threshold.to"),
269
- t(p)(
266
+ (C(), j(ne(
267
+ r(N).toInputLabel(
268
+ r(N).typeAtPath(r(A), "threshold.to"),
269
+ r(p)(
270
270
  "connect.referral.editReferralCountSheet.max_referral_count"
271
271
  )
272
272
  )
@@ -275,20 +275,22 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
275
275
  _: 1
276
276
  }, 8, ["modelValue", "rules"])
277
277
  ]),
278
- d(g, {
279
- text: t(N).helperText(t(T), "threshold"),
280
- state: t(N).helperState(t(T), "threshold")
278
+ c(_, {
279
+ text: r(N).helperText(r(T), "threshold"),
280
+ state: r(N).helperState(r(T), "threshold")
281
281
  }, null, 8, ["text", "state"]),
282
- r[5] || (r[5] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " When max. referral count is not set, it will default unlimited ", -1))
282
+ a("div", He, O(r(p)(
283
+ "connect.referral.editReferralCountSheet.max_referral_count_description"
284
+ )), 1)
283
285
  ]),
284
- a("div", He, O(t(p)("connect.referral.editReferralCountSheet.referrer_reward")), 1),
285
- d(b, {
286
- modelValue: t(h),
287
- "onUpdate:modelValue": r[2] || (r[2] = (P) => W(h) ? h.value = P : null),
286
+ a("div", ze, O(r(p)("connect.referral.editReferralCountSheet.referrer_reward")), 1),
287
+ c(b, {
288
+ modelValue: r(h),
289
+ "onUpdate:modelValue": t[2] || (t[2] = (P) => J(h) ? h.value = P : null),
288
290
  selection: "multiple",
289
- "column-filter": t(o),
291
+ "column-filter": r(o),
290
292
  "column-defs": y,
291
- "row-data": t(s),
293
+ "row-data": r(i),
292
294
  "page-size": 10
293
295
  }, null, 8, ["modelValue", "column-filter", "row-data"])
294
296
  ])
@@ -297,7 +299,7 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
297
299
  }, 8, ["modelValue", "header"]);
298
300
  };
299
301
  }
300
- }), qe = { class: "space-y-16" }, Ke = { class: "grid grid-cols-3 gap-16" }, We = { class: "fm-typo-en-title-sm-800" }, Je = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ze = /* @__PURE__ */ q({
302
+ }), Ke = { class: "space-y-16" }, Je = { class: "grid grid-cols-3 gap-16" }, We = { class: "fm-typo-en-title-sm-800" }, Ze = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Qe = /* @__PURE__ */ q({
301
303
  __name: "CriteriaTriggerInput",
302
304
  props: {
303
305
  modelValue: {
@@ -309,32 +311,32 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
309
311
  }
310
312
  },
311
313
  emits: ["update:model-value"],
312
- setup(k, { emit: m }) {
313
- const I = k, p = m, w = G(() => [
314
+ setup(k, { emit: l }) {
315
+ const I = k, p = l, g = G(() => [
314
316
  le.enum.BILL_COMPLETED,
315
317
  le.enum.FEEDBACK
316
318
  ].map((f) => Se[f]));
317
- return (f, l) => {
318
- const c = _("FmCard");
319
- return R(), B("div", qe, [
320
- l[0] || (l[0] = a("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Define the conditions that must be met to activate a reward. ", -1)),
321
- a("div", Ke, [
322
- (R(!0), B(Y, null, re(t(w), (u) => (R(), D(c, {
323
- key: u.name,
319
+ return (f, s) => {
320
+ const u = w("FmCard");
321
+ return C(), B("div", Ke, [
322
+ s[0] || (s[0] = a("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Define the conditions that must be met to activate a reward. ", -1)),
323
+ a("div", Je, [
324
+ (C(!0), B(Y, null, re(r(g), (m) => (C(), j(u, {
325
+ key: m.name,
324
326
  variant: "outlined",
325
327
  disabled: I.disabled,
326
328
  class: de(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
327
- "col-span-3": t(w).length == 1,
328
- "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": k.modelValue == u.value,
329
- "hover:bg-fm-color-opacity-sm": k.modelValue != u.value
329
+ "col-span-3": r(g).length == 1,
330
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": k.modelValue == m.value,
331
+ "hover:bg-fm-color-opacity-sm": k.modelValue != m.value
330
332
  }]),
331
333
  onClick: () => {
332
- I.modelValue != u.value && !I.disabled && p("update:model-value", u.value);
334
+ I.modelValue != m.value && !I.disabled && p("update:model-value", m.value);
333
335
  }
334
336
  }, {
335
337
  default: V(() => [
336
- a("div", We, O(u.name), 1),
337
- a("div", Je, O(u.description), 1)
338
+ a("div", We, O(m.name), 1),
339
+ a("div", Ze, O(m.description), 1)
338
340
  ]),
339
341
  _: 2
340
342
  }, 1032, ["disabled", "class", "onClick"]))), 128))
@@ -342,17 +344,17 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
342
344
  ]);
343
345
  };
344
346
  }
345
- }), Qe = { class: "flex items-center gap-x-8" }, Xe = { class: "flex flex-col space-y-16 pr-12" }, er = {
347
+ }), Xe = { class: "flex items-center gap-x-8" }, er = { class: "flex flex-col space-y-16 pr-12" }, rr = {
346
348
  key: 0,
347
349
  class: "space-y-16"
348
- }, rr = {
350
+ }, tr = {
349
351
  key: 1,
350
352
  class: "space-y-16"
351
- }, tr = { class: "flex items-center gap-8" }, or = /* @__PURE__ */ q({
353
+ }, or = { class: "flex items-center gap-8" }, ar = /* @__PURE__ */ q({
352
354
  __name: "EditCriteriaSheet",
353
355
  emits: ["update"],
354
- setup(k, { expose: m, emit: I }) {
355
- const { t: p } = Z(), w = I, f = F(!1), l = F(-1), c = F({}), u = Q(), C = xe.superRefine((y, n) => {
356
+ setup(k, { expose: l, emit: I }) {
357
+ const { t: p } = Z(), g = I, f = F(!1), s = F(-1), u = F({}), m = Q(), R = xe.superRefine((y, n) => {
356
358
  y.name.length >= 50 && n.addIssue({
357
359
  code: "custom",
358
360
  message: "Name must be less than 50 characters"
@@ -361,14 +363,14 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
361
363
  message: "Name is required"
362
364
  });
363
365
  }), A = G(() => {
364
- const y = C.safeParse(c.value);
366
+ const y = R.safeParse(u.value);
365
367
  return y.success ? [] : y.error.errors;
366
368
  });
367
369
  function T(y, n) {
368
370
  var o;
369
- f.value = y, y && typeof n == "number" && n >= 0 ? (l.value = n, c.value = H(
370
- (o = u.referralProgram) == null ? void 0 : o.criteria[n]
371
- )) : (l.value = -1, c.value = {
371
+ f.value = y, y && typeof n == "number" && n >= 0 ? (s.value = n, u.value = H(
372
+ (o = m.referralProgram) == null ? void 0 : o.criteria[n]
373
+ )) : (s.value = -1, u.value = {
372
374
  _id: new $e().toString(),
373
375
  name: "",
374
376
  type: "AUTO",
@@ -378,27 +380,27 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
378
380
  function M() {
379
381
  f.value = !1;
380
382
  }
381
- function j() {
382
- const y = C.safeParse(c.value);
383
- y.success && w("update", l.value, y.data);
383
+ function D() {
384
+ const y = R.safeParse(u.value);
385
+ y.success && g("update", s.value, y.data);
384
386
  }
385
387
  function L(y) {
386
- c.value.type = y, y == "AUTO" ? c.value.event = { type: "BILL_COMPLETED" } : c.value.event = void 0;
388
+ u.value.type = y, y == "AUTO" ? u.value.event = { type: "BILL_COMPLETED" } : u.value.event = void 0;
387
389
  }
388
- return m({
390
+ return l({
389
391
  showSheet: T,
390
392
  hideSheet: M,
391
- data: c
393
+ data: u
392
394
  }), (y, n) => {
393
- const o = _("FmButton"), s = _("FmRadio"), S = _("FmRadioGroup"), h = _("FmSideSheet");
394
- return R(), D(h, {
395
+ const o = w("FmButton"), i = w("FmRadio"), S = w("FmRadioGroup"), h = w("FmSideSheet");
396
+ return C(), j(h, {
395
397
  "max-width": 768,
396
- modelValue: t(f),
397
- "onUpdate:modelValue": n[6] || (n[6] = (e) => W(f) ? f.value = e : null)
398
+ modelValue: r(f),
399
+ "onUpdate:modelValue": n[6] || (n[6] = (e) => J(f) ? f.value = e : null)
398
400
  }, {
399
401
  "side-sheet-header": V(() => [
400
- a("div", Qe, [
401
- d(o, {
402
+ a("div", Xe, [
403
+ c(o, {
402
404
  icon: "arrow_back",
403
405
  variant: "tertiary",
404
406
  onClick: n[0] || (n[0] = (e) => T(!1))
@@ -407,43 +409,43 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
407
409
  ])
408
410
  ]),
409
411
  "side-sheet-footer": V(() => [
410
- a("div", tr, [
411
- d(o, {
412
- label: t(p)("connect.editTierSheet.submit"),
413
- onClick: j,
414
- disabled: t(A).length > 0 || t(J)().isLoading,
415
- loading: t(J)().isLoading
412
+ a("div", or, [
413
+ c(o, {
414
+ label: r(p)("connect.editTierSheet.submit"),
415
+ onClick: D,
416
+ disabled: r(A).length > 0 || r(W)().isLoading,
417
+ loading: r(W)().isLoading
416
418
  }, null, 8, ["label", "disabled", "loading"]),
417
- d(o, {
418
- label: t(p)("connect.editTierSheet.cancel"),
419
+ c(o, {
420
+ label: r(p)("connect.editTierSheet.cancel"),
419
421
  onClick: n[5] || (n[5] = (e) => T(!1)),
420
422
  variant: "tertiary"
421
423
  }, null, 8, ["label"])
422
424
  ])
423
425
  ]),
424
426
  default: V(() => [
425
- d(X, { json: t(c) }, null, 8, ["json"]),
426
- a("div", Xe, [
427
+ c(X, { json: r(u) }, null, 8, ["json"]),
428
+ a("div", er, [
427
429
  n[12] || (n[12] = a("div", { class: "fm-typo-en-title-sm-600" }, "Program Criteria", -1)),
428
- d(Ce, {
429
- modelValue: t(c).name,
430
- "onUpdate:modelValue": n[1] || (n[1] = (e) => t(c).name = e),
431
- label: t(p)("connect.referral.editReferralTierSheet.name"),
432
- schema: t(N).typeAtPath(t(C), "name")
430
+ c(Re, {
431
+ modelValue: r(u).name,
432
+ "onUpdate:modelValue": n[1] || (n[1] = (e) => r(u).name = e),
433
+ label: r(p)("connect.referral.editReferralTierSheet.name"),
434
+ schema: r(N).typeAtPath(r(R), "name")
433
435
  }, null, 8, ["modelValue", "label", "schema"]),
434
436
  n[13] || (n[13] = a("div", { class: "fm-typo-en-title-sm-600" }, "Configuration", -1)),
435
- d(S, {
436
- "model-value": t(c).type,
437
+ c(S, {
438
+ "model-value": r(u).type,
437
439
  label: "Verify status",
438
440
  "onUpdate:modelValue": L
439
441
  }, {
440
442
  default: V(() => [
441
- d(s, {
443
+ c(i, {
442
444
  value: "AUTO",
443
445
  label: "Auto",
444
446
  sublabel: "Verify based on rule configuration"
445
447
  }),
446
- d(s, {
448
+ c(i, {
447
449
  value: "MANUAL",
448
450
  label: "Manual",
449
451
  sublabel: "Verify based on manual inspection"
@@ -451,25 +453,25 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
451
453
  ]),
452
454
  _: 1
453
455
  }, 8, ["model-value"]),
454
- t(c).type == "AUTO" ? (R(), B(Y, { key: 0 }, [
456
+ r(u).type == "AUTO" ? (C(), B(Y, { key: 0 }, [
455
457
  n[10] || (n[10] = a("div", { class: "fm-typo-en-title-sm-600" }, "Trigger", -1)),
456
458
  n[11] || (n[11] = a("div", null, " Select trigger what referee need to complete in order for referral to earn reward ", -1)),
457
- d(Ze, {
458
- "model-value": t(c).event.type,
459
- "onUpdate:modelValue": n[2] || (n[2] = (e) => t(c).event.type = e)
459
+ c(Qe, {
460
+ "model-value": r(u).event.type,
461
+ "onUpdate:modelValue": n[2] || (n[2] = (e) => r(u).event.type = e)
460
462
  }, null, 8, ["model-value"]),
461
- t(c).event.type == t(se).enum.BILL_COMPLETED ? (R(), B("div", er, [
463
+ r(u).event.type == r(se).enum.BILL_COMPLETED ? (C(), B("div", rr, [
462
464
  n[8] || (n[8] = a("div", { class: "fm-typo-en-title-sm-600" }, "Spending Criteria", -1)),
463
- d(Fe, {
464
- "model-value": t(c).event.rule,
465
- "onUpdate:modelValue": n[3] || (n[3] = (e) => t(c).event.rule = e)
465
+ c(Fe, {
466
+ "model-value": r(u).event.rule,
467
+ "onUpdate:modelValue": n[3] || (n[3] = (e) => r(u).event.rule = e)
466
468
  }, null, 8, ["model-value"])
467
469
  ])) : z("", !0),
468
- t(c).event.type == t(se).enum.FEEDBACK ? (R(), B("div", rr, [
470
+ r(u).event.type == r(se).enum.FEEDBACK ? (C(), B("div", tr, [
469
471
  n[9] || (n[9] = a("div", { class: "fm-typo-en-title-sm-600" }, "Feedback Criteria", -1)),
470
- d(ke, {
471
- "model-value": t(c).event.rule,
472
- "onUpdate:modelValue": n[4] || (n[4] = (e) => t(c).event.rule = e)
472
+ c(ke, {
473
+ "model-value": r(u).event.rule,
474
+ "onUpdate:modelValue": n[4] || (n[4] = (e) => r(u).event.rule = e)
473
475
  }, null, 8, ["model-value"])
474
476
  ])) : z("", !0)
475
477
  ], 64)) : z("", !0)
@@ -481,11 +483,11 @@ const Ve = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ie =
481
483
  }
482
484
  });
483
485
  function he() {
484
- const k = F(!1), m = Re();
486
+ const k = F(!1), l = Ce();
485
487
  return {
486
488
  confirmUpdateReferralRecord: async () => {
487
489
  await new Promise((p) => {
488
- m.open({
490
+ l.open({
489
491
  title: "Confirmation",
490
492
  message: "This will change all referral settings? Would you like to update previous referral record?",
491
493
  primaryActions: { text: "Update all", close: !0 },
@@ -500,29 +502,29 @@ function he() {
500
502
  updateReferralRecord: k
501
503
  };
502
504
  }
503
- const ar = { class: "flex flex-col space-y-16 mt-24" }, nr = { class: "flex justify-between items-center" }, lr = /* @__PURE__ */ q({
505
+ const nr = { class: "flex flex-col space-y-16 mt-24" }, lr = { class: "flex justify-between items-center" }, sr = /* @__PURE__ */ q({
504
506
  __name: "ManageCriteriaSheet",
505
- setup(k, { expose: m }) {
506
- const { t: I } = Z(), { minor: p } = ue, { confirmUpdateReferralRecord: w, updateReferralRecord: f } = he(), l = F(!1), c = F({}), u = Q(), C = F(
507
+ setup(k, { expose: l }) {
508
+ const { t: I } = Z(), { minor: p } = ue, { confirmUpdateReferralRecord: g, updateReferralRecord: f } = he(), s = F(!1), u = F({}), m = Q(), R = F(
507
509
  null
508
510
  ), A = G(() => {
509
511
  var o;
510
- return (o = u.referralProgram) == null ? void 0 : o.criteria;
512
+ return (o = m.referralProgram) == null ? void 0 : o.criteria;
511
513
  });
512
514
  async function T(o) {
513
- await w(), await p(async () => {
515
+ await g(), await p(async () => {
514
516
  await pe.update({
515
517
  ...o,
516
518
  updateReferralRecord: f.value
517
- }), await u.readReferralProgram();
519
+ }), await m.readReferralProgram();
518
520
  });
519
521
  }
520
- async function M(o, s) {
521
- var e, r;
522
- const S = o == -1 ? ((e = u.referralProgram) == null ? void 0 : e.criteria.length) || 0 : o, h = H(u.referralProgram);
523
- h.criteria[S] = s, await T(h), (r = C.value) == null || r.showSheet(!1);
522
+ async function M(o, i) {
523
+ var e, t;
524
+ const S = o == -1 ? ((e = m.referralProgram) == null ? void 0 : e.criteria.length) || 0 : o, h = H(m.referralProgram);
525
+ h.criteria[S] = i, await T(h), (t = R.value) == null || t.showSheet(!1);
524
526
  }
525
- async function j(o) {
527
+ async function D(o) {
526
528
  var h, e;
527
529
  if (!await K.remove(
528
530
  "Are you sure to remove criteria",
@@ -531,8 +533,8 @@ const ar = { class: "flex flex-col space-y-16 mt-24" }, nr = { class: "flex just
531
533
  I("connect.prompt.cancel")
532
534
  ))
533
535
  return;
534
- const s = o == -1 ? ((h = u.referralProgram) == null ? void 0 : h.criteria.length) || 0 : o, S = H(u.referralProgram);
535
- S.criteria.splice(s, 1), await T(S), (e = C.value) == null || e.showSheet(!1);
536
+ const i = o == -1 ? ((h = m.referralProgram) == null ? void 0 : h.criteria.length) || 0 : o, S = H(m.referralProgram);
537
+ S.criteria.splice(i, 1), await T(S), (e = R.value) == null || e.showSheet(!1);
536
538
  }
537
539
  const L = [
538
540
  {
@@ -543,7 +545,7 @@ const ar = { class: "flex flex-col space-y-16 mt-24" }, nr = { class: "flex just
543
545
  header: "Validity method",
544
546
  cell(o) {
545
547
  return te(oe.FmChip, {
546
- label: _e.title(o.row.original.type),
548
+ label: we.title(o.row.original.type),
547
549
  variant: "plain"
548
550
  });
549
551
  }
@@ -556,8 +558,8 @@ const ar = { class: "flex flex-col space-y-16 mt-24" }, nr = { class: "flex just
556
558
  variant: "tertiary",
557
559
  icon: "delete",
558
560
  iconColor: "neutral-gray-400",
559
- onClick: (s) => {
560
- s.stopPropagation(), j(o.row.index);
561
+ onClick: (i) => {
562
+ i.stopPropagation(), D(o.row.index);
561
563
  }
562
564
  })
563
565
  ];
@@ -565,75 +567,75 @@ const ar = { class: "flex flex-col space-y-16 mt-24" }, nr = { class: "flex just
565
567
  }
566
568
  ];
567
569
  function y(o) {
568
- l.value = o;
570
+ s.value = o;
569
571
  }
570
572
  function n() {
571
- l.value = !1;
573
+ s.value = !1;
572
574
  }
573
- return m({
575
+ return l({
574
576
  showSheet: y,
575
577
  hideSheet: n,
576
- data: c
577
- }), (o, s) => {
578
- const S = _("FmButton"), h = _("FmTable"), e = _("FmSideSheet");
579
- return R(), B(Y, null, [
580
- d(e, {
578
+ data: u
579
+ }), (o, i) => {
580
+ const S = w("FmButton"), h = w("FmTable"), e = w("FmSideSheet");
581
+ return C(), B(Y, null, [
582
+ c(e, {
581
583
  "max-width": 768,
582
- modelValue: t(l),
583
- "onUpdate:modelValue": s[2] || (s[2] = (r) => W(l) ? l.value = r : null),
584
+ modelValue: r(s),
585
+ "onUpdate:modelValue": i[2] || (i[2] = (t) => J(s) ? s.value = t : null),
584
586
  header: "Manage Criteria"
585
587
  }, {
586
588
  default: V(() => [
587
- a("div", ar, [
588
- a("div", nr, [
589
- s[3] || (s[3] = a("div", null, [
589
+ a("div", nr, [
590
+ a("div", lr, [
591
+ i[3] || (i[3] = a("div", null, [
590
592
  a("div", { class: "fm-typo-en-title-sm-600" }, "Program Criteria"),
591
593
  a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Set participation rules to start your referral program ")
592
594
  ], -1)),
593
- d(S, {
595
+ c(S, {
594
596
  label: "Add Criteria",
595
597
  icon: "add",
596
598
  variant: "secondary",
597
- onClick: s[0] || (s[0] = (r) => {
598
- var i;
599
- return (i = t(C)) == null ? void 0 : i.showSheet(!0);
599
+ onClick: i[0] || (i[0] = (t) => {
600
+ var d;
601
+ return (d = r(R)) == null ? void 0 : d.showSheet(!0);
600
602
  })
601
603
  })
602
604
  ]),
603
- d(h, {
604
- "row-data": t(A),
605
+ c(h, {
606
+ "row-data": r(A),
605
607
  "hide-footer": !0,
606
608
  "page-size": 100,
607
609
  "shrink-at": !1,
608
610
  "column-defs": L,
609
- onRowClick: s[1] || (s[1] = (r) => {
610
- var i;
611
- return (i = t(C)) == null ? void 0 : i.showSheet(!0, r.index);
611
+ onRowClick: i[1] || (i[1] = (t) => {
612
+ var d;
613
+ return (d = r(R)) == null ? void 0 : d.showSheet(!0, t.index);
612
614
  })
613
615
  }, null, 8, ["row-data"])
614
616
  ])
615
617
  ]),
616
618
  _: 1
617
619
  }, 8, ["modelValue"]),
618
- d(or, {
620
+ c(ar, {
619
621
  ref_key: "editCriteriaSheetRef",
620
- ref: C,
622
+ ref: R,
621
623
  onUpdate: M
622
624
  }, null, 512)
623
625
  ], 64);
624
626
  };
625
627
  }
626
- }), sr = { class: "flex flex-col space-y-16 pr-12" }, ir = { class: "fm-typo-en-title-sm-800" }, dr = { class: "flex items-center gap-8" }, cr = /* @__PURE__ */ q({
628
+ }), ir = { class: "flex flex-col space-y-16 pr-12" }, dr = { class: "fm-typo-en-title-sm-800" }, cr = { class: "flex items-center gap-8" }, ur = /* @__PURE__ */ q({
627
629
  __name: "EditRefereeRewardSheet",
628
630
  emits: ["update"],
629
- setup(k, { expose: m, emit: I }) {
630
- const { t: p } = Z(), w = I, f = F(!1), l = F([]), c = Q();
631
- function u() {
632
- w("update", l.value);
631
+ setup(k, { expose: l, emit: I }) {
632
+ const { t: p } = Z(), g = I, f = F(!1), s = F([]), u = Q();
633
+ function m() {
634
+ g("update", s.value);
633
635
  }
634
- async function C(o) {
635
- var s, S;
636
- f.value = o, l.value = ((S = (s = c.referralProgram) == null ? void 0 : s.refereeReward) == null ? void 0 : S.map((h) => h.toString())) || [], n.value = L.value.map((h) => l.value.includes(h.id));
636
+ async function R(o) {
637
+ var i, S;
638
+ f.value = o, s.value = ((S = (i = u.referralProgram) == null ? void 0 : i.refereeReward) == null ? void 0 : S.map((h) => h.toString())) || [], n.value = L.value.map((h) => s.value.includes(h.id));
637
639
  }
638
640
  function A() {
639
641
  f.value = !1;
@@ -655,19 +657,19 @@ const ar = { class: "flex flex-col space-y-16 mt-24" }, nr = { class: "flex just
655
657
  header: "Description",
656
658
  accessorFn: (o) => o.description,
657
659
  cell(o) {
658
- const s = o.row.original;
659
- if (s.collectible.type == "VOUCHER" || s.selectedReward == null)
660
- return s.description;
660
+ const i = o.row.original;
661
+ if (i.collectible.type == "VOUCHER" || i.selectedReward == null)
662
+ return i.description;
661
663
  }
662
664
  }
663
- ], M = me(), j = F([]), L = G(() => M.rewards.map((o) => {
664
- let s = "No expiry";
665
+ ], M = me(), D = F([]), L = G(() => M.rewards.map((o) => {
666
+ let i = "No expiry";
665
667
  switch (o.option.type) {
666
668
  case "VOUCHER":
667
- s = `${o.option.collectibleConfig.options.maxUse} use(s), ${ee(o.option.collectibleConfig.options.validityOption || {})}`;
669
+ i = `${o.option.collectibleConfig.options.maxUse} use(s), ${ee(o.option.collectibleConfig.options.validityOption || {})}`;
668
670
  break;
669
671
  case "LOYALTY":
670
- s = `${o.option.earningOption.amount}, ${ee(o.option.validityOption || {})}`;
672
+ i = `${o.option.earningOption.amount}, ${ee(o.option.validityOption || {})}`;
671
673
  break;
672
674
  }
673
675
  return {
@@ -675,56 +677,56 @@ const ar = { class: "flex flex-col space-y-16 mt-24" }, nr = { class: "flex just
675
677
  name: o.name,
676
678
  collectible: o.option,
677
679
  collectibleConfig: o.collectibleConfig,
678
- description: s
680
+ description: i
679
681
  };
680
682
  }));
681
683
  G(() => []);
682
684
  function y() {
683
685
  const o = L.value;
684
- for (let s = 0; s < o.length; s++) {
685
- const S = o[s], h = n.value[s];
686
- h && !l.value.includes(S.id) && l.value.push(S.id), !h && l.value.includes(S.id) && (l.value = l.value.filter((e) => e != S.id));
686
+ for (let i = 0; i < o.length; i++) {
687
+ const S = o[i], h = n.value[i];
688
+ h && !s.value.includes(S.id) && s.value.push(S.id), !h && s.value.includes(S.id) && (s.value = s.value.filter((e) => e != S.id));
687
689
  }
688
690
  }
689
691
  const n = F({});
690
- return ie(n, y, { deep: !0 }), m({
691
- showSheet: C,
692
+ return ie(n, y, { deep: !0 }), l({
693
+ showSheet: R,
692
694
  hideSheet: A,
693
- data: l
694
- }), (o, s) => {
695
- const S = _("FmTable"), h = _("FmButton"), e = _("FmSideSheet");
696
- return R(), D(e, {
695
+ data: s
696
+ }), (o, i) => {
697
+ const S = w("FmTable"), h = w("FmButton"), e = w("FmSideSheet");
698
+ return C(), j(e, {
697
699
  "max-width": 1e3,
698
- modelValue: t(f),
699
- "onUpdate:modelValue": s[2] || (s[2] = (r) => W(f) ? f.value = r : null),
700
+ modelValue: r(f),
701
+ "onUpdate:modelValue": i[2] || (i[2] = (t) => J(f) ? f.value = t : null),
700
702
  header: "Referee reward"
701
703
  }, {
702
704
  "side-sheet-footer": V(() => [
703
- a("div", dr, [
704
- d(h, {
705
- label: t(p)("connect.common.save"),
706
- onClick: u,
707
- disabled: t(J)().isLoading,
708
- loading: t(J)().isLoading
705
+ a("div", cr, [
706
+ c(h, {
707
+ label: r(p)("connect.common.save"),
708
+ onClick: m,
709
+ disabled: r(W)().isLoading,
710
+ loading: r(W)().isLoading
709
711
  }, null, 8, ["label", "disabled", "loading"]),
710
- d(h, {
711
- label: t(p)("connect.common.cancel"),
712
- onClick: s[1] || (s[1] = (r) => A()),
712
+ c(h, {
713
+ label: r(p)("connect.common.cancel"),
714
+ onClick: i[1] || (i[1] = (t) => A()),
713
715
  variant: "tertiary"
714
716
  }, null, 8, ["label"])
715
717
  ])
716
718
  ]),
717
719
  default: V(() => [
718
- d(X, { json: t(l) }, null, 8, ["json"]),
719
- a("div", sr, [
720
- a("div", ir, O(t(p)("connect.referral.refereeRewardSheet.referee_reward")), 1),
721
- d(S, {
722
- modelValue: t(n),
723
- "onUpdate:modelValue": s[0] || (s[0] = (r) => W(n) ? n.value = r : null),
720
+ c(X, { json: r(s) }, null, 8, ["json"]),
721
+ a("div", ir, [
722
+ a("div", dr, O(r(p)("connect.referral.refereeRewardSheet.referee_reward")), 1),
723
+ c(S, {
724
+ modelValue: r(n),
725
+ "onUpdate:modelValue": i[0] || (i[0] = (t) => J(n) ? n.value = t : null),
724
726
  selection: "multiple",
725
- "column-filter": t(j),
727
+ "column-filter": r(D),
726
728
  "column-defs": T,
727
- "row-data": t(L),
729
+ "row-data": r(L),
728
730
  "page-size": 10
729
731
  }, null, 8, ["modelValue", "column-filter", "row-data"])
730
732
  ])
@@ -733,40 +735,42 @@ const ar = { class: "flex flex-col space-y-16 mt-24" }, nr = { class: "flex just
733
735
  }, 8, ["modelValue"]);
734
736
  };
735
737
  }
736
- }), ur = { class: "fm-typo-en-title-sm-600" }, mr = { class: "grid grid-cols-4 xs:grid-cols-1 gap-4 divide-x xs:divide-x-0" }, fr = { class: "flex gap-x-8" }, pr = { class: "fm-typo-body-lg-600 flex items-center gap-x-4" }, hr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, vr = { class: "mb-40" }, gr = {
738
+ }), mr = { class: "fm-typo-en-title-sm-600" }, fr = { class: "grid grid-cols-4 xs:grid-cols-1 gap-4 divide-x xs:divide-x-0" }, pr = { class: "flex gap-x-8" }, hr = { class: "fm-typo-body-lg-600 flex items-center gap-x-4" }, vr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _r = { class: "mb-40" }, gr = {
737
739
  key: 0,
738
740
  class: "flex flex-col items-center justify-center gap-y-16 p-24"
739
- }, wr = { class: "flex flex-col gap-16 text-center" }, _r = { class: "fm-typo-en-title-sm-800" }, yr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, zr = /* @__PURE__ */ q({
741
+ }, wr = { class: "flex flex-col gap-16 text-center" }, yr = { class: "fm-typo-en-title-sm-800" }, br = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Yr = /* @__PURE__ */ q({
740
742
  __name: "Overview",
741
743
  setup(k) {
742
- const { t: m } = Z(), { minor: I } = ue, p = Pe(), w = Q(), { confirmUpdateReferralRecord: f, updateReferralRecord: l } = he(), c = G(() => {
744
+ const { t: l } = Z(), { minor: I } = ue, p = Pe(), g = Q(), { confirmUpdateReferralRecord: f, updateReferralRecord: s } = he(), u = G(() => {
743
745
  var e;
744
- return ((e = w.referralProgram) == null ? void 0 : e.reward) ?? [];
745
- }), u = F(null);
746
+ return ((e = g.referralProgram) == null ? void 0 : e.reward) ?? [];
747
+ }), m = F(null);
746
748
  F(null);
747
- const C = F(null), A = F(null), T = F(null), M = G(() => {
748
- var e, r, i, g;
749
+ const R = F(null), A = F(null), T = F(null), M = G(() => {
750
+ var e, t, d, _;
749
751
  return [
750
752
  {
751
753
  label: "connect.referral.how_it_works.generate_link",
752
- sublabel: m("connect.referral.how_it_works.generate_link_for_member"),
754
+ sublabel: l("connect.referral.how_it_works.generate_link_for_member"),
753
755
  icon: "offline_share"
754
756
  },
755
757
  {
756
758
  label: "connect.referral.how_it_works.referee_join_reward",
757
- sublabel: `${((r = (e = w.referralProgram) == null ? void 0 : e.pf_refereeReward) == null ? void 0 : r.length) || 0} reward(s)`,
758
- action: m("connect.referral.actions.manage_reward"),
759
+ sublabel: `${((t = (e = g.referralProgram) == null ? void 0 : e.pf_refereeReward) == null ? void 0 : t.length) || 0} ${l("connect.referral.how_it_works.reward")}`,
760
+ action: l("connect.referral.actions.manage_reward"),
759
761
  onClick: () => {
760
762
  var b;
761
763
  return (b = T.value) == null ? void 0 : b.showSheet(!0);
762
764
  },
763
- helperText: "Referee will receive rewards after successfully competing all criteria",
765
+ helperText: l(
766
+ "connect.referral.how_it_works.referee_join_reward_description"
767
+ ),
764
768
  icon: "group_add"
765
769
  },
766
770
  {
767
771
  label: "connect.referral.how_it_works.referee_meet_criteria",
768
- sublabel: `${(i = w.referralProgram) == null ? void 0 : i.criteria.length} criteria`,
769
- action: m("connect.referral.actions.manage_criteria"),
772
+ sublabel: `${(d = g.referralProgram) == null ? void 0 : d.criteria.length} ${l("connect.referral.how_it_works.criteria")}`,
773
+ action: l("connect.referral.actions.manage_criteria"),
770
774
  onClick: () => {
771
775
  var b;
772
776
  return (b = A.value) == null ? void 0 : b.showSheet(!0);
@@ -775,76 +779,76 @@ const ar = { class: "flex flex-col space-y-16 mt-24" }, nr = { class: "flex just
775
779
  },
776
780
  {
777
781
  label: "connect.referral.how_it_works.referer_get_reward",
778
- sublabel: `${(g = w.referralProgram) == null ? void 0 : g.reward.length} configured tier(s)`,
779
- helperText: "Referer will receive rewards after referee completed all criteria",
782
+ sublabel: `${(_ = g.referralProgram) == null ? void 0 : _.reward.length} ${l("connect.referral.how_it_works.reward_tier")}`,
783
+ helperText: l("connect.referral.how_it_works.referral_tier_description"),
780
784
  icon: "featured_seasonal_and_gifts"
781
785
  }
782
786
  ];
783
787
  });
784
- function j(e) {
785
- var r;
786
- (r = u.value) == null || r.onManageRewardGroup(e);
788
+ function D(e) {
789
+ var t;
790
+ (t = m.value) == null || t.onManageRewardGroup(e);
787
791
  }
788
792
  function L(e) {
789
- var r;
790
- (r = C.value) == null || r.showSheet(!0, {
793
+ var t;
794
+ (t = R.value) == null || t.showSheet(!0, {
791
795
  groupIndex: e.groupIndex,
792
796
  countIndex: e.countIndex
793
797
  });
794
798
  }
795
799
  async function y(e) {
796
800
  var P, x, v, E;
797
- const r = e.countIndex == -1 ? ((x = (P = w.referralProgram) == null ? void 0 : P.reward[e.groupIndex]) == null ? void 0 : x.rewards.length) || 0 : e.countIndex || 0, i = e.referralCount, g = H(
798
- w.referralProgram
799
- ), b = g.reward[e.groupIndex];
800
- b.rewards[r] = e.referralCount;
801
- const $ = b.rewards[r - 1], U = b.rewards[r + 1];
802
- if ($ && $.threshold.to != i.threshold.from - 1) {
801
+ const t = e.countIndex == -1 ? ((x = (P = g.referralProgram) == null ? void 0 : P.reward[e.groupIndex]) == null ? void 0 : x.rewards.length) || 0 : e.countIndex || 0, d = e.referralCount, _ = H(
802
+ g.referralProgram
803
+ ), b = _.reward[e.groupIndex];
804
+ b.rewards[t] = e.referralCount;
805
+ const $ = b.rewards[t - 1], U = b.rewards[t + 1];
806
+ if ($ && $.threshold.to != d.threshold.from - 1) {
803
807
  if (!await K.confirm(
804
- m(
808
+ l(
805
809
  "connect.referral.referral_count.update.range_discontinuous.previous",
806
810
  {
807
811
  name: $.threshold.from,
808
812
  from: $.threshold.from ?? 0,
809
813
  to: $.threshold.to ?? 1 / 0,
810
- newTo: i.threshold.from - 1
814
+ newTo: d.threshold.from - 1
811
815
  }
812
816
  ),
813
- m("connect.referral.referral_count.title"),
814
- m("connect.referral.referral_count.remove.next_range")
817
+ l("connect.referral.referral_count.title"),
818
+ l("connect.referral.referral_count.remove.next_range")
815
819
  ))
816
820
  return;
817
- $.threshold.to = i.threshold.from - 1;
821
+ $.threshold.to = d.threshold.from - 1;
818
822
  }
819
- if (U && U.threshold.from - 1 != i.threshold.to) {
823
+ if (U && U.threshold.from - 1 != d.threshold.to) {
820
824
  if (!await K.confirm(
821
- m("connect.program.tier.update.range_discontinuous.next", {
825
+ l("connect.program.tier.update.range_discontinuous.next", {
822
826
  name: U.threshold.from,
823
827
  from: U.threshold.from ?? 0,
824
828
  to: U.threshold.to ?? 1 / 0,
825
- newFrom: i.threshold.to ?? 1
829
+ newFrom: d.threshold.to ?? 1
826
830
  }),
827
- m("connect.program.tier.title"),
828
- m("connect.program.tier.remove.next_range"),
829
- m("connect.prompt.cancel")
831
+ l("connect.program.tier.title"),
832
+ l("connect.program.tier.remove.next_range"),
833
+ l("connect.prompt.cancel")
830
834
  ))
831
835
  return;
832
- U.threshold.from = (i.threshold.to ?? 0) + 1;
836
+ U.threshold.from = (d.threshold.to ?? 0) + 1;
833
837
  }
834
- !U && !((v = i.threshold) != null && v.to) && (i.threshold.to = void 0), await o(g), (E = C.value) == null || E.hideSheet();
838
+ !U && !((v = d.threshold) != null && v.to) && (d.threshold.to = void 0), await o(_), (E = R.value) == null || E.hideSheet();
835
839
  }
836
840
  async function n(e) {
837
- var i;
838
- const r = H(w.referralProgram);
839
- r.refereeReward = e, await o(r), (i = T.value) == null || i.hideSheet();
841
+ var d;
842
+ const t = H(g.referralProgram);
843
+ t.refereeReward = e, await o(t), (d = T.value) == null || d.hideSheet();
840
844
  }
841
845
  async function o(e) {
842
846
  await f(), await I(
843
847
  async () => {
844
848
  await pe.update({
845
849
  ...e,
846
- updateReferralRecord: l.value
847
- }), await w.readReferralProgram();
850
+ updateReferralRecord: s.value
851
+ }), await g.readReferralProgram();
848
852
  },
849
853
  {
850
854
  message: "Updating referral program",
@@ -852,53 +856,53 @@ const ar = { class: "flex flex-col space-y-16 mt-24" }, nr = { class: "flex just
852
856
  }
853
857
  );
854
858
  }
855
- async function s(e) {
859
+ async function i(e) {
856
860
  if (!await K.remove(
857
- "Are you sure to remove referral tier",
858
- "Remove referral tier",
859
- m("connect.prompt.confirm"),
860
- m("connect.prompt.cancel")
861
+ l("connect.referral.reward.confirm_remove_referral_tier"),
862
+ l("connect.referral.reward.remove_referral_tier"),
863
+ l("connect.prompt.confirm"),
864
+ l("connect.prompt.cancel")
861
865
  ))
862
866
  return;
863
- const r = H(w.referralProgram);
864
- r.reward.splice(e, 1), await o(r);
867
+ const t = H(g.referralProgram);
868
+ t.reward.splice(e, 1), await o(t);
865
869
  }
866
- async function S(e, r) {
870
+ async function S(e, t) {
867
871
  if (!await K.remove(
868
- "Are you sure to remove referral count",
869
- "Remove referral tier",
870
- m("connect.prompt.confirm"),
871
- m("connect.prompt.cancel")
872
+ l("connect.referral.reward.confirm_remove_referral_count"),
873
+ l("connect.referral.reward.remove_referral_count"),
874
+ l("connect.prompt.confirm"),
875
+ l("connect.prompt.cancel")
872
876
  ))
873
877
  return;
874
- const i = H(w.referralProgram), g = i.reward[e].rewards[r + 1];
875
- if (g) {
878
+ const d = H(g.referralProgram), _ = d.reward[e].rewards[t + 1];
879
+ if (_) {
876
880
  if (!await K.confirm(
877
- m("connect.referral.referral_count.update.range_discontinuous.next", {
878
- from: g.threshold.from ?? 0,
879
- to: g.threshold.to ?? 1 / 0,
880
- newFrom: i.reward[e].rewards[r].threshold.from
881
+ l("connect.referral.referral_count.update.range_discontinuous.next", {
882
+ from: _.threshold.from ?? 0,
883
+ to: _.threshold.to ?? 1 / 0,
884
+ newFrom: d.reward[e].rewards[t].threshold.from
881
885
  }),
882
- m("connect.referral.referral_count.remove.title"),
883
- m("connect.referral.referral_count.remove.next_range"),
884
- m("connect.prompt.cancel")
886
+ l("connect.referral.referral_count.remove.title"),
887
+ l("connect.referral.referral_count.remove.next_range"),
888
+ l("connect.prompt.cancel")
885
889
  ))
886
890
  return;
887
- g.threshold.from = i.reward[e].rewards[r].threshold.from;
891
+ _.threshold.from = d.reward[e].rewards[t].threshold.from;
888
892
  }
889
- i.reward[e].rewards.splice(r, 1), await o(i);
893
+ d.reward[e].rewards.splice(t, 1), await o(d);
890
894
  }
891
895
  const h = [
892
896
  {
893
- header: "Referral Count",
897
+ header: l("connect.referral.reward.table.count"),
894
898
  accessorFn: (e) => e.threshold.from == e.threshold.to ? `${e.threshold.from}` : e.threshold.to ? `${e.threshold.from} - ${e.threshold.to ?? "∞"}` : `${e.threshold.from}+`
895
899
  },
896
900
  {
897
- header: "Rewards",
901
+ header: l("connect.referral.reward.table.reward"),
898
902
  accessorKey: "type",
899
903
  accessorFn: (e) => {
900
- var r;
901
- return `${((r = e.pf_reward) == null ? void 0 : r.length) || 0} reward(s)`;
904
+ var t;
905
+ return `${((t = e.pf_reward) == null ? void 0 : t.length) || 0} reward(s)`;
902
906
  }
903
907
  },
904
908
  {
@@ -912,45 +916,45 @@ const ar = { class: "flex flex-col space-y-16 mt-24" }, nr = { class: "flex just
912
916
  icon: "delete",
913
917
  iconColor: "neutral-gray-400",
914
918
  class: "ml-auto",
915
- onClick: (r) => {
916
- r.stopPropagation(), console.log(e.row), S(e.row.original.groupIndex, e.row.index);
919
+ onClick: (t) => {
920
+ t.stopPropagation(), console.log(e.row), S(e.row.original.groupIndex, e.row.index);
917
921
  }
918
922
  });
919
923
  }
920
924
  }
921
925
  ];
922
- return ge(async () => {
923
- await w.readReferralProgram();
924
- }), (e, r) => {
925
- const i = _("FmCard"), g = _("FmIcon"), b = _("FmTooltip"), $ = _("FmButton"), U = _("FmTable"), P = _("FmList");
926
- return R(), B(Y, null, [
926
+ return _e(async () => {
927
+ await g.readReferralProgram();
928
+ }), (e, t) => {
929
+ const d = w("FmCard"), _ = w("FmIcon"), b = w("FmTooltip"), $ = w("FmButton"), U = w("FmTable"), P = w("FmList");
930
+ return C(), B(Y, null, [
927
931
  z("", !0),
928
- d(i, {
932
+ c(d, {
929
933
  variant: "outlined",
930
934
  class: "flex flex-col gap-16 p-16"
931
935
  }, {
932
936
  default: V(() => [
933
- a("div", ur, O(t(m)("connect.referral.how_it_works.title")), 1),
934
- a("div", mr, [
935
- (R(!0), B(Y, null, re(t(M), (x, v) => (R(), B("div", {
937
+ a("div", mr, O(r(l)("connect.referral.how_it_works.title")), 1),
938
+ a("div", fr, [
939
+ (C(!0), B(Y, null, re(r(M), (x, v) => (C(), B("div", {
936
940
  key: v,
937
941
  class: de(["px-8", { "xs:!border-r": v % 2 == 0 }])
938
942
  }, [
939
- a("div", fr, [
940
- d(g, {
943
+ a("div", pr, [
944
+ c(_, {
941
945
  name: x.icon,
942
946
  color: "primary",
943
947
  class: "bg-fm-color-system-warning-100 p-8 fm-corner-radius-md max-h-40 max-w-40"
944
948
  }, null, 8, ["name"]),
945
949
  a("div", null, [
946
- a("div", pr, [
947
- ce(O(t(m)(x.label)) + " ", 1),
948
- x.helperText ? (R(), D(b, {
950
+ a("div", hr, [
951
+ ce(O(r(l)(x.label)) + " ", 1),
952
+ x.helperText ? (C(), j(b, {
949
953
  key: 0,
950
954
  content: x.helperText
951
955
  }, {
952
956
  default: V(() => [
953
- d(g, {
957
+ c(_, {
954
958
  name: "help",
955
959
  size: "sm",
956
960
  outline: !0
@@ -959,12 +963,12 @@ const ar = { class: "flex flex-col space-y-16 mt-24" }, nr = { class: "flex just
959
963
  _: 2
960
964
  }, 1032, ["content"])) : z("", !0)
961
965
  ]),
962
- a("div", hr, O(x.sublabel), 1),
963
- x.action ? (R(), D($, {
966
+ a("div", vr, O(x.sublabel), 1),
967
+ x.action ? (C(), j($, {
964
968
  key: 0,
965
969
  variant: "plain",
966
970
  label: x.action,
967
- disabled: !t(p).isPremium,
971
+ disabled: !r(p).isPremium,
968
972
  class: "fm-typo-en-body-md-400 !p-0",
969
973
  onClick: x.onClick
970
974
  }, null, 8, ["label", "disabled", "onClick"])) : z("", !0)
@@ -975,27 +979,27 @@ const ar = { class: "flex flex-col space-y-16 mt-24" }, nr = { class: "flex just
975
979
  ]),
976
980
  _: 1
977
981
  }),
978
- t(c) && t(c).length > 0 ? (R(), D(i, {
982
+ r(u) && r(u).length > 0 ? (C(), j(d, {
979
983
  key: 1,
980
984
  variant: "outlined",
981
985
  class: "flex flex-col gap-16 p-16"
982
986
  }, {
983
987
  default: V(() => [
984
- d(P, { separator: !0 }, {
988
+ c(P, { separator: !0 }, {
985
989
  default: V(() => [
986
- (R(!0), B(Y, null, re(t(c), (x, v) => (R(), D(Ge, {
990
+ (C(!0), B(Y, null, re(r(u), (x, v) => (C(), j(Ge, {
987
991
  key: v,
988
992
  "reward-group": x,
989
993
  level: v,
990
- onEdit: (E) => j(v),
991
- onRemove: (E) => s(v),
992
- onAddCount: r[0] || (r[0] = (E) => {
994
+ onEdit: (E) => D(v),
995
+ onRemove: (E) => i(v),
996
+ onAddCount: t[0] || (t[0] = (E) => {
993
997
  L({ groupIndex: E, countIndex: -1 });
994
998
  })
995
999
  }, {
996
1000
  default: V(() => [
997
- a("div", vr, [
998
- d(U, {
1001
+ a("div", _r, [
1002
+ c(U, {
999
1003
  "row-data": x.rewards.map((E) => ({ ...E, groupIndex: v })),
1000
1004
  "column-defs": h,
1001
1005
  "hide-footer": !0,
@@ -1003,12 +1007,12 @@ const ar = { class: "flex flex-col space-y-16 mt-24" }, nr = { class: "flex just
1003
1007
  onRowClick: (E) => L({ groupIndex: v, countIndex: E.index })
1004
1008
  }, null, 8, ["row-data", "onRowClick"])
1005
1009
  ]),
1006
- x.rewards.length ? z("", !0) : (R(), B("div", gr, [
1007
- r[3] || (r[3] = a("div", { class: "flex flex-col gap-16 text-center" }, [
1010
+ x.rewards.length ? z("", !0) : (C(), B("div", gr, [
1011
+ t[3] || (t[3] = a("div", { class: "flex flex-col gap-16 text-center" }, [
1008
1012
  a("div", { class: "fm-typo-en-title-sm-800" }, "Create progressive reward"),
1009
1013
  a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Add referral count to configure progression reward to the referral program ")
1010
1014
  ], -1)),
1011
- d($, {
1015
+ c($, {
1012
1016
  variant: "secondary",
1013
1017
  label: "Add count",
1014
1018
  icon: "add",
@@ -1023,44 +1027,44 @@ const ar = { class: "flex flex-col space-y-16 mt-24" }, nr = { class: "flex just
1023
1027
  })
1024
1028
  ]),
1025
1029
  _: 1
1026
- })) : (R(), D(i, {
1030
+ })) : (C(), j(d, {
1027
1031
  key: 2,
1028
1032
  variant: "outlined",
1029
1033
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
1030
1034
  }, {
1031
1035
  default: V(() => [
1032
- r[4] || (r[4] = a("img", {
1033
- src: we,
1036
+ t[4] || (t[4] = a("img", {
1037
+ src: ge,
1034
1038
  class: "aspect-square w-[150px]"
1035
1039
  }, null, -1)),
1036
1040
  a("div", wr, [
1037
- a("div", _r, O(t(m)("connect.referral.referral_tier_title")), 1),
1038
- a("div", yr, O(t(m)("connect.referral.referral_tier_description")), 1)
1041
+ a("div", yr, O(r(l)("connect.referral.referral_tier_title")), 1),
1042
+ a("div", br, O(r(l)("connect.referral.referral_tier_description")), 1)
1039
1043
  ]),
1040
- d($, {
1044
+ c($, {
1041
1045
  variant: "primary",
1042
- label: t(m)("connect.referral.add_referral_tier"),
1046
+ label: r(l)("connect.referral.add_referral_tier"),
1043
1047
  icon: "add",
1044
- disabled: !t(p).isPremium,
1045
- onClick: r[1] || (r[1] = (x) => j(-1))
1048
+ disabled: !r(p).isPremium,
1049
+ onClick: t[1] || (t[1] = (x) => D(-1))
1046
1050
  }, null, 8, ["label", "disabled"])
1047
1051
  ]),
1048
1052
  _: 1
1049
1053
  })),
1050
- d(ye, {
1054
+ c(ye, {
1051
1055
  ref_key: "rewardGroupRef",
1052
- ref: u
1056
+ ref: m
1053
1057
  }, null, 512),
1054
- d(Ye, {
1058
+ c(qe, {
1055
1059
  ref_key: "editReferralCountSheetRef",
1056
- ref: C,
1060
+ ref: R,
1057
1061
  onUpdate: y
1058
1062
  }, null, 512),
1059
- d(lr, {
1063
+ c(sr, {
1060
1064
  ref_key: "manageCriteriaSheetRef",
1061
1065
  ref: A
1062
1066
  }, null, 512),
1063
- d(cr, {
1067
+ c(ur, {
1064
1068
  ref_key: "editRefereeRewardSheetRef",
1065
1069
  ref: T,
1066
1070
  onUpdate: n
@@ -1070,5 +1074,5 @@ const ar = { class: "flex flex-col space-y-16 mt-24" }, nr = { class: "flex just
1070
1074
  }
1071
1075
  });
1072
1076
  export {
1073
- zr as default
1077
+ Yr as default
1074
1078
  };