@feedmepos/mf-connect 0.1.0-beta.23 → 0.1.0-beta.24

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 (79) hide show
  1. package/dist/{Analytic-Ady6Tf22.js → Analytic-BGHwfe8y.js} +8 -8
  2. package/dist/{App-mMLFtpWJ.js → App-BXeInbOn.js} +6 -6
  3. package/dist/{Broadcast-Cwd3YOmG.js → Broadcast-DHzSNUOX.js} +8 -8
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-F4HJ6Ddb.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cp3MEEHh.js} +8 -8
  5. package/dist/{Card-BdxomWxM.js → Card-lF1K-rNW.js} +15 -15
  6. package/dist/{Collections-D-uy_biJ.js → Collections-BbXYncse.js} +4 -4
  7. package/dist/{Credit-hHZqpCHR.js → Credit-DUlNSEou.js} +8 -8
  8. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BpJsO0EW.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-02UOqiCW.js} +27 -27
  9. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DdbMYWh5.js → EffectSheet.vue_vue_type_style_index_0_lang-BzBmvk4X.js} +6 -6
  10. package/dist/{Experience-CP7qWOjy.js → Experience-BkPcfGme.js} +8 -8
  11. package/dist/{Game-DA-djpXx.js → Game-BHk897qu.js} +8 -8
  12. package/dist/Index-DGDiIs4-.js +255 -0
  13. package/dist/{Marketing-G-FrBHyw.js → Marketing-CFbx8XyS.js} +5 -5
  14. package/dist/{Member-Cv29WkUY.js → Member-FTPScHYg.js} +4 -4
  15. package/dist/{MemberList-CLLJRE6o.js → MemberList-CIoGwQoH.js} +14 -14
  16. package/dist/{MemberTransactions-D0H_SDCF.js → MemberTransactions-CYZCTnUg.js} +1 -1
  17. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CMRiMvyM.js → MessageInput.vue_vue_type_script_setup_true_lang-C6nqufmL.js} +2 -2
  18. package/dist/{Mission-8lE9EnZn.js → Mission-BjBaGQwe.js} +8 -8
  19. package/dist/{Overview-DHYY-3Gn.js → Overview-BumR0wKz.js} +264 -254
  20. package/dist/{Point-D8QM0EN9.js → Point-qtTwRO4B.js} +8 -8
  21. package/dist/{Promotion-DGgBuEYJ.js → Promotion-BJJ6GeQ_.js} +9 -9
  22. package/dist/{Record-CC3UiV8I.js → Record-DSKsHHuR.js} +4 -4
  23. package/dist/{Reward-CkmTflbv.js → Reward-D2IaJe68.js} +79 -79
  24. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BjsNHJ2j.js → RewardGroup.vue_vue_type_script_setup_true_lang-BVayF0UI.js} +12 -12
  25. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CcfCd132.js → RuleGroup.vue_vue_type_script_setup_true_lang-X1J5AJUO.js} +14 -14
  26. package/dist/{Segment-DPWDH8RG.js → Segment-BroinGRV.js} +13 -13
  27. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DoToRvWT.js → SelectItems.vue_vue_type_script_setup_true_lang-VNRjXDrG.js} +2 -2
  28. package/dist/{Setting-Caao06p5.js → Setting-DxI2vvOQ.js} +8 -8
  29. package/dist/{Store-CMRHg0g8.js → Store-uZhvdQu2.js} +19 -19
  30. package/dist/{StoreRewards-A2tlaUxT.js → StoreRewards-BgDawQpI.js} +12 -12
  31. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BBrq6vsf.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DErl8VM7.js} +10 -10
  32. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CLoNoQRW.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-PRmabsgS.js} +1 -1
  33. package/dist/{Tier-CBgBZwqj.js → Tier-ywLpOTC5.js} +15 -15
  34. package/dist/{Title-CESmTt5x.js → Title-B_1N7WbH.js} +15 -15
  35. package/dist/{Transaction-DPOFlip9.js → Transaction-BfnydJEk.js} +2 -2
  36. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-PfhpSa-n.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DxY40ppg.js} +6 -6
  37. package/dist/{Voucher-BMfs1xQA.js → Voucher-DC3BFpt_.js} +11 -11
  38. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DFVfIhD1.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BH_o1H1R.js} +10 -10
  39. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BEGPqEsM.js → ZodTextField.vue_vue_type_script_setup_true_lang-Cx1NSSCO.js} +1 -1
  40. package/dist/{app-D73BshDm.js → app-CPAvOc6v.js} +32 -28
  41. package/dist/{app-CTgeKPky.js → app-DCoeSeFh.js} +1 -1
  42. package/dist/app.js +1 -1
  43. package/dist/{business-hktLeshv.js → business-Dk0g0MTT.js} +1 -1
  44. package/dist/{campaign-BI4BxVrv.js → campaign-CDIbjXrX.js} +2 -2
  45. package/dist/{collectible.enum-aYrp3Qxz.js → collectible.enum-D3iSKWKD.js} +1 -1
  46. package/dist/{collection.fn-Mvn-ybhl.js → collection.fn-Clqllg0e.js} +2 -2
  47. package/dist/{dto-C0_YDu7s.js → dto-Bfv1Q_1p.js} +51 -51
  48. package/dist/{effect-CGlygN7e.js → effect-CAw2hbV1.js} +1 -1
  49. package/dist/{email-addresses-DkSdLNKy.js → email-addresses-C2powe2O.js} +1 -1
  50. package/dist/{export-BWxsxOdj.js → export-48FIWl-y.js} +3 -3
  51. package/dist/{helper-CYbkxzW_.js → helper-CUflThOf.js} +1 -1
  52. package/dist/{index-D-fRN3Om.js → index-BDR6gyA3.js} +1 -1
  53. package/dist/{index-CDIlAWQI.js → index-BzUTz_f5.js} +3 -3
  54. package/dist/{index-Guoo-syL.js → index-C9s5LGWo.js} +1 -1
  55. package/dist/{index-D_9abEIl.js → index-CHAxmOpZ.js} +4 -4
  56. package/dist/{index-COjgPDAf.js → index-Cwfg1E0O.js} +1 -1
  57. package/dist/{index-DSIVRXga.js → index-D1veosa1.js} +2 -2
  58. package/dist/{index-3YTo7EZ2.js → index-DCmImPRu.js} +1 -1
  59. package/dist/{index-_oVultjS.js → index-DDnotVHT.js} +8 -8
  60. package/dist/{index-CSSBZmj3.js → index-DHK1GNFS.js} +3 -3
  61. package/dist/{index-DuMdHihE.js → index-DTk6tgu3.js} +4 -4
  62. package/dist/{index-CTDRx4XX.js → index-Dmuja8kq.js} +3 -3
  63. package/dist/{index-DX2QJ8KD.js → index-DpF2mO8S.js} +1 -1
  64. package/dist/{index-CqAB2Js1.js → index-YxGM0sYn.js} +1 -1
  65. package/dist/{index.esm2017-DqSgNJQw.js → index.esm2017-B6jyMj2I.js} +1 -1
  66. package/dist/{loading-BN-5qg_T.js → loading-5TfQs5SR.js} +4 -4
  67. package/dist/{membership-KSyxyhGK.js → membership-BCMMOGZz.js} +3 -3
  68. package/dist/{money-DASFf9_j.js → money-BavhjpvU.js} +1 -1
  69. package/dist/{number-8pjEnTwW.js → number-B4tdJr4Z.js} +1 -1
  70. package/dist/{objectid-Bobm4Hir.js → objectid-C40r-rFp.js} +1 -1
  71. package/dist/{reward-HT5yNPAE.js → reward-DjXyYMBi.js} +1 -1
  72. package/dist/{rule-BYPEFLPS.js → rule-DhNwPN-d.js} +3 -3
  73. package/dist/{rule-builder-a1kF6D5W.js → rule-builder-DmD22HBN.js} +1 -1
  74. package/dist/{template-a1sCwJhz.js → template-BXp7Uglk.js} +4 -4
  75. package/dist/{trigger-vqdSrumR.js → trigger-BdDXyHZg.js} +4 -4
  76. package/dist/{vue-i18n-B1yanwcr.js → vue-i18n-Tmy5Z8fL.js} +158 -158
  77. package/dist/{xlsx-Cknt4WbJ.js → xlsx-Ct43S4H1.js} +1 -1
  78. package/package.json +1 -1
  79. package/dist/Index-D1jGhs9Z.js +0 -226
@@ -1,29 +1,29 @@
1
- import { defineComponent as Y, resolveComponent as _, openBlock as S, createElementBlock as B, Fragment as H, createVNode as i, withCtx as $, createElementVNode as a, toDisplayString as E, unref as r, renderSlot as pe, ref as x, computed as j, watch as ne, createBlock as M, isRef as z, resolveDynamicComponent as oe, renderList as te, normalizeClass as le, createTextVNode as he, createCommentVNode as Q, h as se, onMounted as ve } from "vue";
1
+ import { defineComponent as Y, resolveComponent as _, openBlock as C, createElementBlock as B, Fragment as H, createVNode as d, withCtx as k, createElementVNode as a, toDisplayString as E, unref as r, renderSlot as pe, ref as x, computed as D, watch as se, createBlock as j, isRef as z, resolveDynamicComponent as ne, renderList as te, normalizeClass as ie, createTextVNode as he, createCommentVNode as Z, h as re, onMounted as ve } from "vue";
2
2
  import { _ as ge } from "./campaign-CpzFl8Vr.js";
3
- import { u as W } from "./vue-i18n-B1yanwcr.js";
4
- import { p as K, u as ie } from "./loading-BN-5qg_T.js";
3
+ import { u as W } from "./vue-i18n-Tmy5Z8fL.js";
4
+ import { c as we, p as K, u as de } from "./loading-5TfQs5SR.js";
5
5
  import { J as X } from "./JsonViewer-v8_C7l5N.js";
6
- import { Z as G } from "./zod-Bg2FbC-D.js";
6
+ import { Z as M } from "./zod-Bg2FbC-D.js";
7
7
  import { u as q } from "./app-wDQR6dpb.js";
8
- import { u as Z, _ as we } from "./RewardGroup.vue_vue_type_script_setup_true_lang-BjsNHJ2j.js";
9
- import { u as de } from "./reward-HT5yNPAE.js";
10
- import "./index-CTDRx4XX.js";
11
- import "./index-DSIVRXga.js";
12
- import { l as ae, m as _e } from "./index-DuMdHihE.js";
13
- import "./index-D_9abEIl.js";
14
- import { a as ye, b as be } from "./index-_oVultjS.js";
15
- import "./index-CqAB2Js1.js";
16
- import "./index-CSSBZmj3.js";
17
- import { C as ce } from "./membership-KSyxyhGK.js";
18
- import { t as ee } from "./helper-CYbkxzW_.js";
8
+ import { u as Q, _ as _e } from "./RewardGroup.vue_vue_type_script_setup_true_lang-BVayF0UI.js";
9
+ import { u as ce } from "./reward-DjXyYMBi.js";
10
+ import "./index-Dmuja8kq.js";
11
+ import "./index-D1veosa1.js";
12
+ import { l as le, m as ye } from "./index-DTk6tgu3.js";
13
+ import "./index-CHAxmOpZ.js";
14
+ import { a as be, b as xe } from "./index-DDnotVHT.js";
15
+ import "./index-YxGM0sYn.js";
16
+ import "./index-DHK1GNFS.js";
17
+ import { C as ue } from "./membership-BCMMOGZz.js";
18
+ import { t as ee } from "./helper-CUflThOf.js";
19
19
  import { c as N } from "./object-qECH92oz.js";
20
- import { useDialog as xe, components as ue } from "@feedmepos/ui-library";
21
- import { _ as Ce } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BEGPqEsM.js";
22
- import { a as Re, _ as Se } from "./trigger-vqdSrumR.js";
23
- import { O as Fe } from "./objectid-Bobm4Hir.js";
24
- import { r as me } from "./index-Guoo-syL.js";
25
- import { u as $e } from "./business-hktLeshv.js";
26
- const ke = { class: "flex items-center justify-between flex-1 xs:hidden" }, Pe = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, Ve = { class: "flex-1" }, Ie = { class: "flex items-center gap-8" }, Te = { class: "fm-typo-en-title-sm-800" }, Ue = { class: "flex gap-8 items-center" }, Ae = { class: "space-y-4 hidden xs:block border-b border-fm-color-neutral-gray-100 px-16 flex-1" }, Le = { class: "flex items-center justify-between" }, Be = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, Ee = { class: "flex-1 space-y-4" }, Oe = { class: "fm-typo-en-body-lg-600" }, je = /* @__PURE__ */ Y({
20
+ import { useDialog as Ce, components as oe } from "@feedmepos/ui-library";
21
+ import { _ as Re } from "./ZodTextField.vue_vue_type_script_setup_true_lang-Cx1NSSCO.js";
22
+ import { a as Se, _ as Fe } from "./trigger-BdDXyHZg.js";
23
+ import { O as ke } from "./objectid-C40r-rFp.js";
24
+ import { r as me } from "./index-C9s5LGWo.js";
25
+ import { u as $e } from "./business-Dk0g0MTT.js";
26
+ const Pe = { class: "flex items-center justify-between flex-1 xs:hidden" }, Ve = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, Ie = { class: "flex-1" }, Te = { class: "flex items-center gap-8" }, Ue = { class: "fm-typo-en-title-sm-800" }, Ae = { class: "flex gap-8 items-center" }, Le = { 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" }, Ee = { class: "flex items-center gap-x-24 h-[80px] p-8 flex-1" }, Oe = { class: "flex-1 space-y-4" }, je = { class: "fm-typo-en-body-lg-600" }, De = /* @__PURE__ */ Y({
27
27
  __name: "ReferralRewadGroupCard",
28
28
  props: {
29
29
  rewardGroup: {
@@ -36,64 +36,64 @@ const ke = { class: "flex items-center justify-between flex-1 xs:hidden" }, Pe =
36
36
  }
37
37
  },
38
38
  emits: ["edit", "addCount", "remove"],
39
- setup(C, { emit: f }) {
40
- const { t: k } = W(), p = f;
39
+ setup(R, { emit: f }) {
40
+ const { t: $ } = W(), p = f;
41
41
  return (g, m) => {
42
42
  const n = _("FmButton"), c = _("FmListItem");
43
- return S(), B(H, null, [
44
- i(c, {
45
- onClick: m[4] || (m[4] = (u) => p("edit", C.level)),
43
+ return C(), B(H, null, [
44
+ d(c, {
45
+ onClick: m[4] || (m[4] = (u) => p("edit", R.level)),
46
46
  class: "!p-0"
47
47
  }, {
48
- default: $(() => [
49
- a("div", ke, [
50
- a("div", Pe, [
51
- a("div", Ve, [
52
- a("div", Ie, [
53
- a("div", Te, E(C.rewardGroup.name), 1)
48
+ default: k(() => [
49
+ a("div", Pe, [
50
+ a("div", Ve, [
51
+ a("div", Ie, [
52
+ a("div", Te, [
53
+ a("div", Ue, E(R.rewardGroup.name), 1)
54
54
  ])
55
55
  ])
56
56
  ]),
57
- a("div", Ue, [
58
- i(n, {
57
+ a("div", Ae, [
58
+ d(n, {
59
59
  variant: "secondary",
60
- label: r(k)("connect.referral.reward.add_count"),
60
+ label: r($)("connect.referral.reward.add_count"),
61
61
  icon: "add",
62
62
  onClick: m[0] || (m[0] = (u) => {
63
- u.stopPropagation(), p("addCount", C.level);
63
+ u.stopPropagation(), p("addCount", R.level);
64
64
  })
65
65
  }, null, 8, ["label"]),
66
- i(n, {
66
+ d(n, {
67
67
  icon: "delete",
68
68
  onClick: m[1] || (m[1] = (u) => {
69
- u.stopPropagation(), p("remove", C.level);
69
+ u.stopPropagation(), p("remove", R.level);
70
70
  }),
71
71
  variant: "tertiary"
72
72
  })
73
73
  ])
74
74
  ]),
75
- a("div", Ae, [
76
- a("div", Le, [
77
- a("div", Be, [
78
- a("div", Ee, [
75
+ a("div", Le, [
76
+ a("div", Be, [
77
+ a("div", Ee, [
78
+ a("div", Oe, [
79
79
  a("div", null, [
80
- a("div", Oe, E(C.rewardGroup.name), 1)
80
+ a("div", je, E(R.rewardGroup.name), 1)
81
81
  ])
82
82
  ])
83
83
  ]),
84
- i(n, {
84
+ d(n, {
85
85
  variant: "tertiary",
86
86
  icon: "delete",
87
- onClick: m[2] || (m[2] = (u) => (u.stopPropagation(), p("remove", C.level)))
87
+ onClick: m[2] || (m[2] = (u) => (u.stopPropagation(), p("remove", R.level)))
88
88
  })
89
89
  ]),
90
- i(n, {
90
+ d(n, {
91
91
  class: "w-full",
92
92
  variant: "secondary",
93
93
  label: "Add count",
94
94
  disabled: !0,
95
95
  icon: "add",
96
- onClick: m[3] || (m[3] = (u) => (u.stopPropagation(), p("addCount", C.level)))
96
+ onClick: m[3] || (m[3] = (u) => (u.stopPropagation(), p("addCount", R.level)))
97
97
  })
98
98
  ])
99
99
  ]),
@@ -103,13 +103,13 @@ const ke = { class: "flex items-center justify-between flex-1 xs:hidden" }, Pe =
103
103
  ], 64);
104
104
  };
105
105
  }
106
- }), De = { class: "flex flex-col space-y-16 pr-12" }, Ge = { class: "flex gap-16 items-center" }, Me = { class: "fm-typo-en-title-sm-800" }, Ne = { class: "flex items-center gap-8" }, He = /* @__PURE__ */ Y({
106
+ }), Ge = { class: "flex flex-col space-y-16 pr-12" }, Me = { class: "flex gap-16 items-center" }, Ne = { class: "fm-typo-en-title-sm-800" }, He = { class: "flex items-center gap-8" }, Ye = /* @__PURE__ */ Y({
107
107
  __name: "EditReferralCountSheet",
108
108
  emits: ["update"],
109
- setup(C, { expose: f, emit: k }) {
110
- const { t: p } = W(), g = k, m = x(!1), n = x({}), c = x(-1), u = x(-1), R = Z(), V = ye.superRefine((e, t) => {
111
- var U, A, v, I, L, J, re;
112
- const d = u.value == -1 ? ((v = (A = (U = R.referralProgram) == null ? void 0 : U.reward[c.value]) == null ? void 0 : A.rewards) == null ? void 0 : v.length) || 0 : u.value, F = (L = (I = R.referralProgram) == null ? void 0 : I.reward[c.value]) == null ? void 0 : L.rewards[d - 1], b = (re = (J = R.referralProgram) == null ? void 0 : J.reward[c.value]) == null ? void 0 : re.rewards[d + 1];
109
+ setup(R, { expose: f, emit: $ }) {
110
+ const { t: p } = W(), g = $, m = x(!1), n = x({}), c = x(-1), u = x(-1), S = Q(), V = be.superRefine((e, t) => {
111
+ var U, A, v, I, L, J, ae;
112
+ const i = u.value == -1 ? ((v = (A = (U = S.referralProgram) == null ? void 0 : U.reward[c.value]) == null ? void 0 : A.rewards) == null ? void 0 : v.length) || 0 : u.value, F = (L = (I = S.referralProgram) == null ? void 0 : I.reward[c.value]) == null ? void 0 : L.rewards[i - 1], b = (ae = (J = S.referralProgram) == null ? void 0 : J.reward[c.value]) == null ? void 0 : ae.rewards[i + 1];
113
113
  F && e.threshold.from < F.threshold.from + 1 && t.addIssue({
114
114
  code: "custom",
115
115
  message: `The min referral must be at least ${F.threshold.from + 1}`,
@@ -119,11 +119,11 @@ const ke = { class: "flex items-center justify-between flex-1 xs:hidden" }, Pe =
119
119
  message: `The max referral must be at most ${b.threshold.to - 2}`,
120
120
  path: ["option"]
121
121
  });
122
- }), P = j(() => {
122
+ }), P = D(() => {
123
123
  const e = V.safeParse(n.value);
124
124
  return e.success ? [] : e.error.errors;
125
125
  });
126
- function D() {
126
+ function G() {
127
127
  const e = V.safeParse(n.value);
128
128
  e.success && g("update", {
129
129
  groupIndex: c.value,
@@ -132,9 +132,9 @@ const ke = { class: "flex items-center justify-between flex-1 xs:hidden" }, Pe =
132
132
  });
133
133
  }
134
134
  async function O(e, t) {
135
- var d;
135
+ var i;
136
136
  m.value = e, e && typeof (t == null ? void 0 : t.countIndex) == "number" && t.countIndex >= 0 ? (c.value = t.groupIndex, u.value = t.countIndex, n.value = N(
137
- (d = R.referralProgram) == null ? void 0 : d.reward[t.groupIndex].rewards[t.countIndex]
137
+ (i = S.referralProgram) == null ? void 0 : i.reward[t.groupIndex].rewards[t.countIndex]
138
138
  )) : (c.value = t.groupIndex, u.value = -1, n.value = {
139
139
  threshold: {
140
140
  from: 0,
@@ -158,7 +158,7 @@ const ke = { class: "flex items-center justify-between flex-1 xs:hidden" }, Pe =
158
158
  id: "type",
159
159
  header: "Reward type",
160
160
  cell(e) {
161
- return ce[e.row.original.collectibleConfig.type].chip();
161
+ return ue[e.row.original.collectibleConfig.type].chip();
162
162
  }
163
163
  },
164
164
  {
@@ -170,7 +170,7 @@ const ke = { class: "flex items-center justify-between flex-1 xs:hidden" }, Pe =
170
170
  return t.description;
171
171
  }
172
172
  }
173
- ], s = de(), o = x([]), l = j(() => s.rewards.map((e) => {
173
+ ], s = ce(), o = x([]), l = D(() => s.rewards.map((e) => {
174
174
  let t = "No expiry";
175
175
  switch (e.option.type) {
176
176
  case "VOUCHER":
@@ -188,60 +188,60 @@ const ke = { class: "flex items-center justify-between flex-1 xs:hidden" }, Pe =
188
188
  description: t
189
189
  };
190
190
  }));
191
- j(() => []);
191
+ D(() => []);
192
192
  function y() {
193
193
  const e = l.value;
194
194
  for (let t = 0; t < e.length; t++) {
195
- const d = e[t], F = h.value[t];
196
- F && !n.value.rewards.includes(d.id) && n.value.rewards.push(d.id), !F && n.value.rewards.includes(d.id) && (n.value.rewards = n.value.rewards.filter(
197
- (b) => b != d.id
195
+ const i = e[t], F = h.value[t];
196
+ F && !n.value.rewards.includes(i.id) && n.value.rewards.push(i.id), !F && n.value.rewards.includes(i.id) && (n.value.rewards = n.value.rewards.filter(
197
+ (b) => b != i.id
198
198
  ));
199
199
  }
200
200
  }
201
201
  const h = x({});
202
- return ne(h, y, { deep: !0 }), f({
202
+ return se(h, y, { deep: !0 }), f({
203
203
  showSheet: O,
204
204
  hideSheet: T,
205
205
  data: n
206
206
  }), (e, t) => {
207
- const d = _("FmStepperField"), F = _("FmHelperText"), b = _("FmTable"), U = _("FmButton"), A = _("FmSideSheet");
208
- return S(), M(A, {
207
+ const i = _("FmStepperField"), F = _("FmHelperText"), b = _("FmTable"), U = _("FmButton"), A = _("FmSideSheet");
208
+ return C(), j(A, {
209
209
  "max-width": 1e3,
210
210
  modelValue: r(m),
211
211
  "onUpdate:modelValue": t[4] || (t[4] = (v) => z(m) ? m.value = v : null),
212
212
  header: `${r(u) == -1 ? r(p)("connect.referral.editReferralCountSheet.add") : r(p)("connect.referral.editReferralCountSheet.edit")}`
213
213
  }, {
214
- "side-sheet-footer": $(() => [
215
- a("div", Ne, [
216
- i(U, {
214
+ "side-sheet-footer": k(() => [
215
+ a("div", He, [
216
+ d(U, {
217
217
  label: r(p)("connect.editTierSheet.submit"),
218
- onClick: D,
218
+ onClick: G,
219
219
  disabled: r(P).length > 0 || r(q)().isLoading,
220
220
  loading: r(q)().isLoading
221
221
  }, null, 8, ["label", "disabled", "loading"]),
222
- i(U, {
222
+ d(U, {
223
223
  label: r(p)("connect.editTierSheet.cancel"),
224
224
  onClick: t[3] || (t[3] = (v) => T()),
225
225
  variant: "tertiary"
226
226
  }, null, 8, ["label"])
227
227
  ])
228
228
  ]),
229
- default: $(() => [
230
- i(X, { json: r(n) }, null, 8, ["json"]),
231
- i(X, { json: r(P) }, null, 8, ["json"]),
232
- a("div", De, [
229
+ default: k(() => [
230
+ d(X, { json: r(n) }, null, 8, ["json"]),
231
+ d(X, { json: r(P) }, null, 8, ["json"]),
232
+ a("div", Ge, [
233
233
  a("div", null, [
234
- a("div", Ge, [
235
- i(d, {
234
+ a("div", Me, [
235
+ d(i, {
236
236
  modelValue: r(n).threshold.from,
237
237
  "onUpdate:modelValue": t[0] || (t[0] = (v) => r(n).threshold.from = v),
238
238
  "show-steppers": !1,
239
- rules: [r(G).ruleAtPath(r(V), "threshold.from")]
239
+ rules: [r(M).ruleAtPath(r(V), "threshold.from")]
240
240
  }, {
241
- label: $(() => [
242
- (S(), M(oe(
243
- r(G).toInputLabel(
244
- r(G).typeAtPath(r(V), "threshold.from"),
241
+ label: k(() => [
242
+ (C(), j(ne(
243
+ r(M).toInputLabel(
244
+ r(M).typeAtPath(r(V), "threshold.from"),
245
245
  r(p)(
246
246
  "connect.referral.editReferralCountSheet.min_referral_count"
247
247
  )
@@ -250,16 +250,16 @@ const ke = { class: "flex items-center justify-between flex-1 xs:hidden" }, Pe =
250
250
  ]),
251
251
  _: 1
252
252
  }, 8, ["modelValue", "rules"]),
253
- i(d, {
253
+ d(i, {
254
254
  modelValue: r(n).threshold.to,
255
255
  "onUpdate:modelValue": t[1] || (t[1] = (v) => r(n).threshold.to = v),
256
256
  "show-steppers": !1,
257
- rules: [r(G).ruleAtPath(r(V), "threshold.to")]
257
+ rules: [r(M).ruleAtPath(r(V), "threshold.to")]
258
258
  }, {
259
- label: $(() => [
260
- (S(), M(oe(
261
- r(G).toInputLabel(
262
- r(G).typeAtPath(r(V), "threshold.to"),
259
+ label: k(() => [
260
+ (C(), j(ne(
261
+ r(M).toInputLabel(
262
+ r(M).typeAtPath(r(V), "threshold.to"),
263
263
  r(p)(
264
264
  "connect.referral.editReferralCountSheet.max_referral_count"
265
265
  )
@@ -269,14 +269,14 @@ const ke = { class: "flex items-center justify-between flex-1 xs:hidden" }, Pe =
269
269
  _: 1
270
270
  }, 8, ["modelValue", "rules"])
271
271
  ]),
272
- i(F, {
273
- text: r(G).helperText(r(P), "option"),
274
- state: r(G).helperState(r(P), "option")
272
+ d(F, {
273
+ text: r(M).helperText(r(P), "option"),
274
+ state: r(M).helperState(r(P), "option")
275
275
  }, null, 8, ["text", "state"]),
276
276
  t[5] || (t[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))
277
277
  ]),
278
- a("div", Me, E(r(p)("connect.referral.editReferralCountSheet.referrer_reward")), 1),
279
- i(b, {
278
+ a("div", Ne, E(r(p)("connect.referral.editReferralCountSheet.referrer_reward")), 1),
279
+ d(b, {
280
280
  modelValue: r(h),
281
281
  "onUpdate:modelValue": t[2] || (t[2] = (v) => z(h) ? h.value = v : null),
282
282
  selection: "multiple",
@@ -291,7 +291,7 @@ const ke = { class: "flex items-center justify-between flex-1 xs:hidden" }, Pe =
291
291
  }, 8, ["modelValue", "header"]);
292
292
  };
293
293
  }
294
- }), Ye = { class: "space-y-16" }, ze = { class: "grid grid-cols-3 gap-16" }, qe = { class: "fm-typo-en-title-sm-800" }, We = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Je = /* @__PURE__ */ Y({
294
+ }), ze = { class: "space-y-16" }, qe = { 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" }, Ke = /* @__PURE__ */ Y({
295
295
  __name: "CriteriaTriggerInput",
296
296
  props: {
297
297
  modelValue: {
@@ -303,32 +303,32 @@ const ke = { class: "flex items-center justify-between flex-1 xs:hidden" }, Pe =
303
303
  }
304
304
  },
305
305
  emits: ["update:model-value"],
306
- setup(C, { emit: f }) {
307
- const k = C, p = f, g = j(() => [
308
- ae.enum.BILL_COMPLETED,
309
- ae.enum.FEEDBACK
310
- ].map((m) => Re[m]));
306
+ setup(R, { emit: f }) {
307
+ const $ = R, p = f, g = D(() => [
308
+ le.enum.BILL_COMPLETED,
309
+ le.enum.FEEDBACK
310
+ ].map((m) => Se[m]));
311
311
  return (m, n) => {
312
312
  const c = _("FmCard");
313
- return S(), B("div", Ye, [
313
+ return C(), B("div", ze, [
314
314
  n[0] || (n[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)),
315
- a("div", ze, [
316
- (S(!0), B(H, null, te(r(g), (u) => (S(), M(c, {
315
+ a("div", qe, [
316
+ (C(!0), B(H, null, te(r(g), (u) => (C(), j(c, {
317
317
  key: u.name,
318
318
  variant: "outlined",
319
- disabled: k.disabled,
320
- class: le(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
319
+ disabled: $.disabled,
320
+ class: ie(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
321
321
  "col-span-3": r(g).length == 1,
322
- "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": C.modelValue == u.value,
323
- "hover:bg-fm-color-opacity-sm": C.modelValue != u.value
322
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": R.modelValue == u.value,
323
+ "hover:bg-fm-color-opacity-sm": R.modelValue != u.value
324
324
  }]),
325
325
  onClick: () => {
326
- k.modelValue != u.value && !k.disabled && p("update:model-value", u.value);
326
+ $.modelValue != u.value && !$.disabled && p("update:model-value", u.value);
327
327
  }
328
328
  }, {
329
- default: $(() => [
330
- a("div", qe, E(u.name), 1),
331
- a("div", We, E(u.description), 1)
329
+ default: k(() => [
330
+ a("div", We, E(u.name), 1),
331
+ a("div", Je, E(u.description), 1)
332
332
  ]),
333
333
  _: 2
334
334
  }, 1032, ["disabled", "class", "onClick"]))), 128))
@@ -336,14 +336,14 @@ const ke = { class: "flex items-center justify-between flex-1 xs:hidden" }, Pe =
336
336
  ]);
337
337
  };
338
338
  }
339
- }), Ke = { class: "flex items-center gap-x-8" }, Ze = { class: "flex flex-col space-y-16 pr-12" }, Qe = {
339
+ }), Ze = { class: "flex items-center gap-x-8" }, Qe = { class: "flex flex-col space-y-16 pr-12" }, Xe = {
340
340
  key: 0,
341
341
  class: "space-y-16"
342
- }, Xe = { class: "flex items-center gap-8" }, et = /* @__PURE__ */ Y({
342
+ }, et = { class: "flex items-center gap-8" }, tt = /* @__PURE__ */ Y({
343
343
  __name: "EditCriteriaSheet",
344
344
  emits: ["update"],
345
- setup(C, { expose: f, emit: k }) {
346
- const { t: p } = W(), g = k, m = x(!1), n = x(-1), c = x({}), u = Z(), R = be.superRefine((w, s) => {
345
+ setup(R, { expose: f, emit: $ }) {
346
+ const { t: p } = W(), g = $, m = x(!1), n = x(-1), c = x({}), u = Q(), S = xe.superRefine((w, s) => {
347
347
  w.name.length >= 50 && s.addIssue({
348
348
  code: "custom",
349
349
  message: "Name must be less than 50 characters"
@@ -351,8 +351,8 @@ const ke = { class: "flex items-center justify-between flex-1 xs:hidden" }, Pe =
351
351
  code: "custom",
352
352
  message: "Name is required"
353
353
  });
354
- }), V = j(() => {
355
- const w = R.safeParse(c.value);
354
+ }), V = D(() => {
355
+ const w = S.safeParse(c.value);
356
356
  return w.success ? [] : w.error.errors;
357
357
  });
358
358
  function P(w, s) {
@@ -360,17 +360,17 @@ const ke = { class: "flex items-center justify-between flex-1 xs:hidden" }, Pe =
360
360
  m.value = w, w && typeof s == "number" && s >= 0 ? (n.value = s, c.value = N(
361
361
  (o = u.referralProgram) == null ? void 0 : o.criteria[s]
362
362
  )) : (n.value = -1, c.value = {
363
- _id: new Fe().toString(),
363
+ _id: new ke().toString(),
364
364
  name: "",
365
365
  type: "AUTO",
366
366
  event: { type: "BILL_COMPLETED" }
367
367
  });
368
368
  }
369
- function D() {
369
+ function G() {
370
370
  m.value = !1;
371
371
  }
372
372
  function O() {
373
- const w = R.safeParse(c.value);
373
+ const w = S.safeParse(c.value);
374
374
  w.success && g("update", n.value, w.data);
375
375
  }
376
376
  function T(w) {
@@ -378,18 +378,18 @@ const ke = { class: "flex items-center justify-between flex-1 xs:hidden" }, Pe =
378
378
  }
379
379
  return f({
380
380
  showSheet: P,
381
- hideSheet: D,
381
+ hideSheet: G,
382
382
  data: c
383
383
  }), (w, s) => {
384
384
  const o = _("FmButton"), l = _("FmRadio"), y = _("FmRadioGroup"), h = _("FmSideSheet");
385
- return S(), M(h, {
385
+ return C(), j(h, {
386
386
  "max-width": 768,
387
387
  modelValue: r(m),
388
388
  "onUpdate:modelValue": s[5] || (s[5] = (e) => z(m) ? m.value = e : null)
389
389
  }, {
390
- "side-sheet-header": $(() => [
391
- a("div", Ke, [
392
- i(o, {
390
+ "side-sheet-header": k(() => [
391
+ a("div", Ze, [
392
+ d(o, {
393
393
  icon: "arrow_back",
394
394
  variant: "tertiary",
395
395
  onClick: s[0] || (s[0] = (e) => P(!1))
@@ -397,44 +397,44 @@ const ke = { class: "flex items-center justify-between flex-1 xs:hidden" }, Pe =
397
397
  s[6] || (s[6] = he("Add Criteria "))
398
398
  ])
399
399
  ]),
400
- "side-sheet-footer": $(() => [
401
- a("div", Xe, [
402
- i(o, {
400
+ "side-sheet-footer": k(() => [
401
+ a("div", et, [
402
+ d(o, {
403
403
  label: r(p)("connect.editTierSheet.submit"),
404
404
  onClick: O,
405
405
  disabled: r(V).length > 0 || r(q)().isLoading,
406
406
  loading: r(q)().isLoading
407
407
  }, null, 8, ["label", "disabled", "loading"]),
408
- i(o, {
408
+ d(o, {
409
409
  label: r(p)("connect.editTierSheet.cancel"),
410
410
  onClick: s[4] || (s[4] = (e) => P(!1)),
411
411
  variant: "tertiary"
412
412
  }, null, 8, ["label"])
413
413
  ])
414
414
  ]),
415
- default: $(() => [
416
- i(X, { json: r(c) }, null, 8, ["json"]),
417
- a("div", Ze, [
415
+ default: k(() => [
416
+ d(X, { json: r(c) }, null, 8, ["json"]),
417
+ a("div", Qe, [
418
418
  s[10] || (s[10] = a("div", { class: "fm-typo-en-title-sm-600" }, "Program Criteria", -1)),
419
- i(Ce, {
419
+ d(Re, {
420
420
  modelValue: r(c).name,
421
421
  "onUpdate:modelValue": s[1] || (s[1] = (e) => r(c).name = e),
422
422
  label: r(p)("connect.referral.editReferralTierSheet.name"),
423
- schema: r(G).typeAtPath(r(R), "name")
423
+ schema: r(M).typeAtPath(r(S), "name")
424
424
  }, null, 8, ["modelValue", "label", "schema"]),
425
425
  s[11] || (s[11] = a("div", { class: "fm-typo-en-title-sm-600" }, "Configuration", -1)),
426
- i(y, {
426
+ d(y, {
427
427
  "model-value": r(c).type,
428
428
  label: "Verify status",
429
429
  "onUpdate:modelValue": T
430
430
  }, {
431
- default: $(() => [
432
- i(l, {
431
+ default: k(() => [
432
+ d(l, {
433
433
  value: "AUTO",
434
434
  label: "Auto",
435
435
  sublabel: "Verify based on rule configuration"
436
436
  }),
437
- i(l, {
437
+ d(l, {
438
438
  value: "MANUAL",
439
439
  label: "Manual",
440
440
  sublabel: "Verify based on manual inspection"
@@ -442,21 +442,21 @@ const ke = { class: "flex items-center justify-between flex-1 xs:hidden" }, Pe =
442
442
  ]),
443
443
  _: 1
444
444
  }, 8, ["model-value"]),
445
- r(c).type == "AUTO" ? (S(), B(H, { key: 0 }, [
445
+ r(c).type == "AUTO" ? (C(), B(H, { key: 0 }, [
446
446
  s[8] || (s[8] = a("div", { class: "fm-typo-en-title-sm-600" }, "Trigger", -1)),
447
447
  s[9] || (s[9] = a("div", null, " Select trigger what referee need to complete in order for referral to earn reward ", -1)),
448
- i(Je, {
448
+ d(Ke, {
449
449
  "model-value": r(c).event.type,
450
450
  "onUpdate:modelValue": s[2] || (s[2] = (e) => r(c).event.type = e)
451
451
  }, null, 8, ["model-value"]),
452
- r(c).event.type == r(_e).enum.BILL_COMPLETED ? (S(), B("div", Qe, [
452
+ r(c).event.type == r(ye).enum.BILL_COMPLETED ? (C(), B("div", Xe, [
453
453
  s[7] || (s[7] = a("div", { class: "fm-typo-en-title-sm-600" }, "Spending Criteria", -1)),
454
- i(Se, {
454
+ d(Fe, {
455
455
  "model-value": r(c).event.rule,
456
456
  "onUpdate:modelValue": s[3] || (s[3] = (e) => r(c).event.rule = e)
457
457
  }, null, 8, ["model-value"])
458
- ])) : Q("", !0)
459
- ], 64)) : Q("", !0)
458
+ ])) : Z("", !0)
459
+ ], 64)) : Z("", !0)
460
460
  ])
461
461
  ]),
462
462
  _: 1
@@ -465,7 +465,7 @@ const ke = { class: "flex items-center justify-between flex-1 xs:hidden" }, Pe =
465
465
  }
466
466
  });
467
467
  function fe() {
468
- const C = x(!1), f = xe();
468
+ const R = x(!1), f = Ce();
469
469
  return {
470
470
  confirmUpdateReferralRecord: async () => {
471
471
  await new Promise((p) => {
@@ -475,21 +475,21 @@ function fe() {
475
475
  primaryActions: { text: "Update all", close: !0 },
476
476
  secondaryActions: { text: "Update future only", close: !0 }
477
477
  }).onPrimary(async () => {
478
- C.value = !0, p();
478
+ R.value = !0, p();
479
479
  }).onSecondary(async () => {
480
- C.value = !1, p();
480
+ R.value = !1, p();
481
481
  });
482
482
  });
483
483
  },
484
- updateReferralRecord: C
484
+ updateReferralRecord: R
485
485
  };
486
486
  }
487
- const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex justify-between items-center" }, ot = /* @__PURE__ */ Y({
487
+ const rt = { class: "flex flex-col space-y-16 mt-24" }, ot = { class: "flex justify-between items-center" }, at = /* @__PURE__ */ Y({
488
488
  __name: "ManageCriteriaSheet",
489
- setup(C, { expose: f }) {
490
- const { t: k } = W(), { minor: p } = ie, { confirmUpdateReferralRecord: g, updateReferralRecord: m } = fe(), n = x(!1), c = x({}), u = Z(), R = x(
489
+ setup(R, { expose: f }) {
490
+ const { t: $ } = W(), { minor: p } = de, { confirmUpdateReferralRecord: g, updateReferralRecord: m } = fe(), n = x(!1), c = x({}), u = Q(), S = x(
491
491
  null
492
- ), V = j(() => {
492
+ ), V = D(() => {
493
493
  var o;
494
494
  return (o = u.referralProgram) == null ? void 0 : o.criteria;
495
495
  });
@@ -501,22 +501,22 @@ const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex just
501
501
  }), await u.readReferralProgram();
502
502
  });
503
503
  }
504
- async function D(o, l) {
504
+ async function G(o, l) {
505
505
  var e, t;
506
506
  const y = o == -1 ? ((e = u.referralProgram) == null ? void 0 : e.criteria.length) || 0 : o, h = N(u.referralProgram);
507
- h.criteria[y] = l, await P(h), (t = R.value) == null || t.showSheet(!1);
507
+ h.criteria[y] = l, await P(h), (t = S.value) == null || t.showSheet(!1);
508
508
  }
509
509
  async function O(o) {
510
510
  var h, e;
511
511
  if (!await K.remove(
512
512
  "Are you sure to remove criteria",
513
513
  "Remove criteria",
514
- k("connect.prompt.confirm"),
515
- k("connect.prompt.cancel")
514
+ $("connect.prompt.confirm"),
515
+ $("connect.prompt.cancel")
516
516
  ))
517
517
  return;
518
518
  const l = o == -1 ? ((h = u.referralProgram) == null ? void 0 : h.criteria.length) || 0 : o, y = N(u.referralProgram);
519
- y.criteria.splice(l, 1), await P(y), (e = R.value) == null || e.showSheet(!1);
519
+ y.criteria.splice(l, 1), await P(y), (e = S.value) == null || e.showSheet(!1);
520
520
  }
521
521
  const T = [
522
522
  {
@@ -525,13 +525,18 @@ const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex just
525
525
  },
526
526
  {
527
527
  header: "Validity method",
528
- accessorFn: (o) => o.type
528
+ cell(o) {
529
+ return re(oe.FmChip, {
530
+ label: we.title(o.row.original.type),
531
+ variant: "plain"
532
+ });
533
+ }
529
534
  },
530
535
  {
531
536
  header: "Actions",
532
537
  cell(o) {
533
538
  return [
534
- se(ue.FmButton, {
539
+ re(oe.FmButton, {
535
540
  variant: "tertiary",
536
541
  icon: "delete",
537
542
  iconColor: "neutral-gray-400",
@@ -555,61 +560,62 @@ const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex just
555
560
  data: c
556
561
  }), (o, l) => {
557
562
  const y = _("FmButton"), h = _("FmTable"), e = _("FmSideSheet");
558
- return S(), B(H, null, [
559
- i(e, {
563
+ return C(), B(H, null, [
564
+ d(e, {
560
565
  "max-width": 768,
561
566
  modelValue: r(n),
562
567
  "onUpdate:modelValue": l[2] || (l[2] = (t) => z(n) ? n.value = t : null),
563
568
  header: "Manage Criteria"
564
569
  }, {
565
- default: $(() => [
566
- a("div", tt, [
567
- a("div", rt, [
570
+ default: k(() => [
571
+ a("div", rt, [
572
+ a("div", ot, [
568
573
  l[3] || (l[3] = a("div", null, [
569
574
  a("div", { class: "fm-typo-en-title-sm-600" }, "Program Criteria"),
570
575
  a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Set participation rules to start your referral program ")
571
576
  ], -1)),
572
- i(y, {
577
+ d(y, {
573
578
  label: "Add Criteria",
574
579
  icon: "add",
575
580
  variant: "secondary",
576
581
  onClick: l[0] || (l[0] = (t) => {
577
- var d;
578
- return (d = r(R)) == null ? void 0 : d.showSheet(!0);
582
+ var i;
583
+ return (i = r(S)) == null ? void 0 : i.showSheet(!0);
579
584
  })
580
585
  })
581
586
  ]),
582
- i(h, {
587
+ d(h, {
583
588
  "row-data": r(V),
584
589
  "hide-footer": !0,
585
590
  "page-size": 100,
591
+ "shrink-at": !1,
586
592
  "column-defs": T,
587
593
  onRowClick: l[1] || (l[1] = (t) => {
588
- var d;
589
- return (d = r(R)) == null ? void 0 : d.showSheet(!0, t.index);
594
+ var i;
595
+ return (i = r(S)) == null ? void 0 : i.showSheet(!0, t.index);
590
596
  })
591
597
  }, null, 8, ["row-data"])
592
598
  ])
593
599
  ]),
594
600
  _: 1
595
601
  }, 8, ["modelValue"]),
596
- i(et, {
602
+ d(tt, {
597
603
  ref_key: "editCriteriaSheetRef",
598
- ref: R,
599
- onUpdate: D
604
+ ref: S,
605
+ onUpdate: G
600
606
  }, null, 512)
601
607
  ], 64);
602
608
  };
603
609
  }
604
- }), at = { class: "flex flex-col space-y-16 pr-12" }, nt = { class: "fm-typo-en-title-sm-800" }, lt = { class: "flex items-center gap-8" }, st = /* @__PURE__ */ Y({
610
+ }), nt = { class: "flex flex-col space-y-16 pr-12" }, lt = { class: "fm-typo-en-title-sm-800" }, st = { class: "flex items-center gap-8" }, it = /* @__PURE__ */ Y({
605
611
  __name: "EditRefereeRewardSheet",
606
612
  emits: ["update"],
607
- setup(C, { expose: f, emit: k }) {
608
- const { t: p } = W(), g = k, m = x(!1), n = x([]), c = Z();
613
+ setup(R, { expose: f, emit: $ }) {
614
+ const { t: p } = W(), g = $, m = x(!1), n = x([]), c = Q();
609
615
  function u() {
610
616
  g("update", n.value);
611
617
  }
612
- async function R(o) {
618
+ async function S(o) {
613
619
  var l, y;
614
620
  m.value = o, n.value = ((y = (l = c.referralProgram) == null ? void 0 : l.refereeReward) == null ? void 0 : y.map((h) => h.toString())) || [], s.value = T.value.map((h) => n.value.includes(h.id));
615
621
  }
@@ -626,7 +632,7 @@ const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex just
626
632
  id: "type",
627
633
  header: "Reward type",
628
634
  cell(o) {
629
- return ce[o.row.original.collectibleConfig.type].chip();
635
+ return ue[o.row.original.collectibleConfig.type].chip();
630
636
  }
631
637
  },
632
638
  {
@@ -638,7 +644,7 @@ const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex just
638
644
  return l.description;
639
645
  }
640
646
  }
641
- ], D = de(), O = x([]), T = j(() => D.rewards.map((o) => {
647
+ ], G = ce(), O = x([]), T = D(() => G.rewards.map((o) => {
642
648
  let l = "No expiry";
643
649
  switch (o.option.type) {
644
650
  case "VOUCHER":
@@ -656,7 +662,7 @@ const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex just
656
662
  description: l
657
663
  };
658
664
  }));
659
- j(() => []);
665
+ D(() => []);
660
666
  function w() {
661
667
  const o = T.value;
662
668
  for (let l = 0; l < o.length; l++) {
@@ -665,38 +671,38 @@ const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex just
665
671
  }
666
672
  }
667
673
  const s = x({});
668
- return ne(s, w, { deep: !0 }), f({
669
- showSheet: R,
674
+ return se(s, w, { deep: !0 }), f({
675
+ showSheet: S,
670
676
  hideSheet: V,
671
677
  data: n
672
678
  }), (o, l) => {
673
679
  const y = _("FmTable"), h = _("FmButton"), e = _("FmSideSheet");
674
- return S(), M(e, {
680
+ return C(), j(e, {
675
681
  "max-width": 1e3,
676
682
  modelValue: r(m),
677
683
  "onUpdate:modelValue": l[2] || (l[2] = (t) => z(m) ? m.value = t : null),
678
684
  header: "Referee reward"
679
685
  }, {
680
- "side-sheet-footer": $(() => [
681
- a("div", lt, [
682
- i(h, {
683
- label: r(p)("connect.editTierSheet.submit"),
686
+ "side-sheet-footer": k(() => [
687
+ a("div", st, [
688
+ d(h, {
689
+ label: r(p)("connect.common.save"),
684
690
  onClick: u,
685
691
  disabled: r(q)().isLoading,
686
692
  loading: r(q)().isLoading
687
693
  }, null, 8, ["label", "disabled", "loading"]),
688
- i(h, {
689
- label: r(p)("connect.editTierSheet.cancel"),
694
+ d(h, {
695
+ label: r(p)("connect.common.cancel"),
690
696
  onClick: l[1] || (l[1] = (t) => V()),
691
697
  variant: "tertiary"
692
698
  }, null, 8, ["label"])
693
699
  ])
694
700
  ]),
695
- default: $(() => [
696
- i(X, { json: r(n) }, null, 8, ["json"]),
697
- a("div", at, [
698
- a("div", nt, E(r(p)("connect.referral.editReferralCountSheet.referrer_reward")), 1),
699
- i(y, {
701
+ default: k(() => [
702
+ d(X, { json: r(n) }, null, 8, ["json"]),
703
+ a("div", nt, [
704
+ a("div", lt, E(r(p)("connect.referral.refereeRewardSheet.referee_reward")), 1),
705
+ d(y, {
700
706
  modelValue: r(s),
701
707
  "onUpdate:modelValue": l[0] || (l[0] = (t) => z(s) ? s.value = t : null),
702
708
  selection: "multiple",
@@ -711,19 +717,19 @@ const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex just
711
717
  }, 8, ["modelValue"]);
712
718
  };
713
719
  }
714
- }), it = { class: "fm-typo-en-title-sm-600" }, dt = { class: "grid grid-cols-4 xs:grid-cols-2 gap-4 divide-x xs:divide-x-0" }, ct = { class: "flex gap-x-8" }, ut = { class: "fm-typo-body-lg-600" }, mt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ft = { class: "mb-40" }, pt = {
720
+ }), dt = { class: "fm-typo-en-title-sm-600" }, ct = { class: "grid grid-cols-4 xs:grid-cols-1 gap-4 divide-x xs:divide-x-0" }, ut = { class: "flex gap-x-8" }, mt = { class: "fm-typo-body-lg-600" }, ft = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pt = { class: "mb-40" }, ht = {
715
721
  key: 0,
716
722
  class: "flex flex-col items-center justify-center gap-y-16 p-24"
717
- }, ht = { class: "flex flex-col gap-16 text-center" }, vt = { class: "fm-typo-en-title-sm-800" }, gt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Nt = /* @__PURE__ */ Y({
723
+ }, vt = { class: "flex flex-col gap-16 text-center" }, gt = { class: "fm-typo-en-title-sm-800" }, wt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ht = /* @__PURE__ */ Y({
718
724
  __name: "Overview",
719
- setup(C) {
720
- const { t: f } = W(), { minor: k } = ie, p = $e(), g = Z(), { confirmUpdateReferralRecord: m, updateReferralRecord: n } = fe(), c = j(() => {
725
+ setup(R) {
726
+ const { t: f } = W(), { minor: $ } = de, p = $e(), g = Q(), { confirmUpdateReferralRecord: m, updateReferralRecord: n } = fe(), c = D(() => {
721
727
  var e;
722
728
  return ((e = g.referralProgram) == null ? void 0 : e.reward) ?? [];
723
729
  }), u = x(null);
724
730
  x(null);
725
- const R = x(null), V = x(null), P = x(null), D = j(() => {
726
- var e, t, d, F;
731
+ const S = x(null), V = x(null), P = x(null), G = D(() => {
732
+ var e, t, i, F;
727
733
  return [
728
734
  {
729
735
  label: "connect.referral.how_it_works.generate_link",
@@ -732,7 +738,7 @@ const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex just
732
738
  },
733
739
  {
734
740
  label: "connect.referral.how_it_works.referee_join_reward",
735
- sublabel: `${((t = (e = g.referralProgram) == null ? void 0 : e.refereeReward) == null ? void 0 : t.length) || 0} reward(s)`,
741
+ sublabel: `${((t = (e = g.referralProgram) == null ? void 0 : e.pf_refereeReward) == null ? void 0 : t.length) || 0} reward(s)`,
736
742
  action: f("connect.referral.actions.manage_reward"),
737
743
  onClick: () => {
738
744
  var b;
@@ -742,7 +748,7 @@ const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex just
742
748
  },
743
749
  {
744
750
  label: "connect.referral.how_it_works.referee_meet_criteria",
745
- sublabel: `${(d = g.referralProgram) == null ? void 0 : d.criteria.length} criteria`,
751
+ sublabel: `${(i = g.referralProgram) == null ? void 0 : i.criteria.length} criteria`,
746
752
  action: f("connect.referral.actions.manage_criteria"),
747
753
  onClick: () => {
748
754
  var b;
@@ -763,56 +769,56 @@ const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex just
763
769
  }
764
770
  function T(e) {
765
771
  var t;
766
- (t = R.value) == null || t.showSheet(!0, {
772
+ (t = S.value) == null || t.showSheet(!0, {
767
773
  groupIndex: e.groupIndex,
768
774
  countIndex: e.countIndex
769
775
  });
770
776
  }
771
777
  async function w(e) {
772
778
  var v, I, L, J;
773
- const t = e.countIndex == -1 ? ((I = (v = g.referralProgram) == null ? void 0 : v.reward[e.groupIndex]) == null ? void 0 : I.rewards.length) || 0 : e.countIndex || 0, d = e.referralCount, F = N(
779
+ const t = e.countIndex == -1 ? ((I = (v = g.referralProgram) == null ? void 0 : v.reward[e.groupIndex]) == null ? void 0 : I.rewards.length) || 0 : e.countIndex || 0, i = e.referralCount, F = N(
774
780
  g.referralProgram
775
781
  ), b = F.reward[e.groupIndex];
776
782
  b.rewards[t] = e.referralCount;
777
783
  const U = b.rewards[t - 1], A = b.rewards[t + 1];
778
- if (U && U.threshold.to != d.threshold.from - 1) {
784
+ if (U && U.threshold.to != i.threshold.from - 1) {
779
785
  if (!await K.confirm(
780
786
  f("connect.program.tier.update.range_discontinuous.previous", {
781
787
  name: U.threshold.from,
782
788
  from: U.threshold.from ?? 0,
783
789
  to: U.threshold.to ?? 1 / 0,
784
- newTo: d.threshold.from - 1
790
+ newTo: i.threshold.from - 1
785
791
  }),
786
792
  f("connect.program.tier.title"),
787
793
  f("connect.program.tier.remove.next_range")
788
794
  ))
789
795
  return;
790
- U.threshold.to = d.threshold.from - 1;
796
+ U.threshold.to = i.threshold.from - 1;
791
797
  }
792
- if (A && A.threshold.from - 1 != d.threshold.to) {
798
+ if (A && A.threshold.from - 1 != i.threshold.to) {
793
799
  if (!await K.confirm(
794
800
  f("connect.program.tier.update.range_discontinuous.next", {
795
801
  name: A.threshold.from,
796
802
  from: A.threshold.from ?? 0,
797
803
  to: A.threshold.to ?? 1 / 0,
798
- newFrom: d.threshold.to ?? 1
804
+ newFrom: i.threshold.to ?? 1
799
805
  }),
800
806
  f("connect.program.tier.title"),
801
807
  f("connect.program.tier.remove.next_range"),
802
808
  f("connect.prompt.cancel")
803
809
  ))
804
810
  return;
805
- A.threshold.from = (d.threshold.to ?? 0) + 1;
811
+ A.threshold.from = (i.threshold.to ?? 0) + 1;
806
812
  }
807
- !A && !((L = d.threshold) != null && L.to) && (d.threshold.to = void 0), await o(F), (J = R.value) == null || J.hideSheet();
813
+ !A && !((L = i.threshold) != null && L.to) && (i.threshold.to = void 0), await o(F), (J = S.value) == null || J.hideSheet();
808
814
  }
809
815
  async function s(e) {
810
- var d;
816
+ var i;
811
817
  const t = N(g.referralProgram);
812
- t.refereeReward = e, await o(t), (d = P.value) == null || d.hideSheet();
818
+ t.refereeReward = e, await o(t), (i = P.value) == null || i.hideSheet();
813
819
  }
814
820
  async function o(e) {
815
- await m(), await k(
821
+ await m(), await $(
816
822
  async () => {
817
823
  await me.update({
818
824
  ...e,
@@ -844,8 +850,8 @@ const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex just
844
850
  f("connect.prompt.cancel")
845
851
  ))
846
852
  return;
847
- const d = N(g.referralProgram);
848
- d.reward[e].rewards.splice(t, 1), await o(d);
853
+ const i = N(g.referralProgram);
854
+ i.reward[e].rewards.splice(t, 1), await o(i);
849
855
  }
850
856
  const h = [
851
857
  {
@@ -855,7 +861,10 @@ const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex just
855
861
  {
856
862
  header: "Rewards",
857
863
  accessorKey: "type",
858
- accessorFn: (e) => `${e.rewards.length} reward(s)`
864
+ accessorFn: (e) => {
865
+ var t;
866
+ return `${((t = e.pf_reward) == null ? void 0 : t.length) || 0} reward(s)`;
867
+ }
859
868
  },
860
869
  {
861
870
  id: "actions",
@@ -863,7 +872,7 @@ const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex just
863
872
  textAlign: "right"
864
873
  },
865
874
  cell(e) {
866
- return se(ue.FmButton, {
875
+ return re(oe.FmButton, {
867
876
  variant: "tertiary",
868
877
  icon: "delete",
869
878
  iconColor: "neutral-gray-400",
@@ -878,36 +887,37 @@ const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex just
878
887
  return ve(async () => {
879
888
  await g.readReferralProgram();
880
889
  }), (e, t) => {
881
- const d = _("FmCard"), F = _("FmIcon"), b = _("FmButton"), U = _("FmTable"), A = _("FmList");
882
- return S(), B(H, null, [
883
- Q("", !0),
884
- i(d, {
890
+ const i = _("FmCard"), F = _("FmIcon"), b = _("FmButton"), U = _("FmTable"), A = _("FmList");
891
+ return C(), B(H, null, [
892
+ Z("", !0),
893
+ d(i, {
885
894
  variant: "outlined",
886
895
  class: "flex flex-col gap-16 p-16"
887
896
  }, {
888
- default: $(() => [
889
- a("div", it, E(r(f)("connect.referral.how_it_works.title")), 1),
890
- a("div", dt, [
891
- (S(!0), B(H, null, te(r(D), (v, I) => (S(), B("div", {
897
+ default: k(() => [
898
+ a("div", dt, E(r(f)("connect.referral.how_it_works.title")), 1),
899
+ a("div", ct, [
900
+ (C(!0), B(H, null, te(r(G), (v, I) => (C(), B("div", {
892
901
  key: I,
893
- class: le(["px-8", { "xs:!border-r": I % 2 == 0 }])
902
+ class: ie(["px-8", { "xs:!border-r": I % 2 == 0 }])
894
903
  }, [
895
- a("div", ct, [
896
- i(F, {
904
+ a("div", ut, [
905
+ d(F, {
897
906
  name: v.icon,
898
907
  color: "primary",
899
908
  class: "bg-fm-color-system-warning-100 p-8 fm-corner-radius-md max-h-40 max-w-40"
900
909
  }, null, 8, ["name"]),
901
910
  a("div", null, [
902
- a("div", ut, E(r(f)(v.label)), 1),
903
- a("div", mt, E(v.sublabel), 1),
904
- i(b, {
911
+ a("div", mt, E(r(f)(v.label)), 1),
912
+ a("div", ft, E(v.sublabel), 1),
913
+ v.action ? (C(), j(b, {
914
+ key: 0,
905
915
  variant: "plain",
906
916
  label: v.action,
907
917
  disabled: !r(p).isPremium,
908
918
  class: "fm-typo-en-body-md-400 !p-0",
909
919
  onClick: v.onClick
910
- }, null, 8, ["label", "disabled", "onClick"])
920
+ }, null, 8, ["label", "disabled", "onClick"])) : Z("", !0)
911
921
  ])
912
922
  ])
913
923
  ], 2))), 128))
@@ -915,15 +925,15 @@ const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex just
915
925
  ]),
916
926
  _: 1
917
927
  }),
918
- r(c) && r(c).length > 0 ? (S(), M(d, {
928
+ r(c) && r(c).length > 0 ? (C(), j(i, {
919
929
  key: 1,
920
930
  variant: "outlined",
921
931
  class: "flex flex-col gap-16 p-16"
922
932
  }, {
923
- default: $(() => [
924
- i(A, { separator: !0 }, {
925
- default: $(() => [
926
- (S(!0), B(H, null, te(r(c), (v, I) => (S(), M(je, {
933
+ default: k(() => [
934
+ d(A, { separator: !0 }, {
935
+ default: k(() => [
936
+ (C(!0), B(H, null, te(r(c), (v, I) => (C(), j(De, {
927
937
  key: I,
928
938
  "reward-group": v,
929
939
  level: I,
@@ -933,9 +943,9 @@ const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex just
933
943
  T({ groupIndex: L, countIndex: -1 });
934
944
  })
935
945
  }, {
936
- default: $(() => [
937
- a("div", ft, [
938
- i(U, {
946
+ default: k(() => [
947
+ a("div", pt, [
948
+ d(U, {
939
949
  "row-data": v.rewards.map((L) => ({ ...L, groupIndex: I })),
940
950
  "column-defs": h,
941
951
  "hide-footer": !0,
@@ -943,12 +953,12 @@ const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex just
943
953
  onRowClick: (L) => T({ groupIndex: I, countIndex: L.index })
944
954
  }, null, 8, ["row-data", "onRowClick"])
945
955
  ]),
946
- v.rewards.length ? Q("", !0) : (S(), B("div", pt, [
956
+ v.rewards.length ? Z("", !0) : (C(), B("div", ht, [
947
957
  t[3] || (t[3] = a("div", { class: "flex flex-col gap-16 text-center" }, [
948
958
  a("div", { class: "fm-typo-en-title-sm-800" }, "Create progressive reward"),
949
959
  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 ")
950
960
  ], -1)),
951
- i(b, {
961
+ d(b, {
952
962
  variant: "secondary",
953
963
  label: "Add count",
954
964
  icon: "add",
@@ -963,21 +973,21 @@ const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex just
963
973
  })
964
974
  ]),
965
975
  _: 1
966
- })) : (S(), M(d, {
976
+ })) : (C(), j(i, {
967
977
  key: 2,
968
978
  variant: "outlined",
969
979
  class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
970
980
  }, {
971
- default: $(() => [
981
+ default: k(() => [
972
982
  t[4] || (t[4] = a("img", {
973
983
  src: ge,
974
984
  class: "aspect-square w-[150px]"
975
985
  }, null, -1)),
976
- a("div", ht, [
977
- a("div", vt, E(r(f)("connect.referral.referral_tier_title")), 1),
978
- a("div", gt, E(r(f)("connect.referral.referral_tier_description")), 1)
986
+ a("div", vt, [
987
+ a("div", gt, E(r(f)("connect.referral.referral_tier_title")), 1),
988
+ a("div", wt, E(r(f)("connect.referral.referral_tier_description")), 1)
979
989
  ]),
980
- i(b, {
990
+ d(b, {
981
991
  variant: "primary",
982
992
  label: r(f)("connect.referral.add_referral_tier"),
983
993
  icon: "add",
@@ -987,20 +997,20 @@ const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex just
987
997
  ]),
988
998
  _: 1
989
999
  })),
990
- i(we, {
1000
+ d(_e, {
991
1001
  ref_key: "rewardGroupRef",
992
1002
  ref: u
993
1003
  }, null, 512),
994
- i(He, {
1004
+ d(Ye, {
995
1005
  ref_key: "editReferralCountSheetRef",
996
- ref: R,
1006
+ ref: S,
997
1007
  onUpdate: w
998
1008
  }, null, 512),
999
- i(ot, {
1009
+ d(at, {
1000
1010
  ref_key: "manageCriteriaSheetRef",
1001
1011
  ref: V
1002
1012
  }, null, 512),
1003
- i(st, {
1013
+ d(it, {
1004
1014
  ref_key: "editRefereeRewardSheetRef",
1005
1015
  ref: P,
1006
1016
  onUpdate: s
@@ -1010,5 +1020,5 @@ const tt = { class: "flex flex-col space-y-16 pr-12" }, rt = { class: "flex just
1010
1020
  }
1011
1021
  });
1012
1022
  export {
1013
- Nt as default
1023
+ Ht as default
1014
1024
  };