@feedmepos/mf-connect 0.1.98-beta.6 → 0.1.98-beta.61

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 (151) hide show
  1. package/dist/{App-CvJ0ASlp.js → App-BPFhGsvV.js} +812 -666
  2. package/dist/{AuditLogs-Bt9S2LKL.js → AuditLogs-CW8vs5kM.js} +14 -13
  3. package/dist/{Bin-ZSCDSioa.js → Bin-CgdkmL0M.js} +8 -8
  4. package/dist/Broadcast-CoRRvfXh.js +302 -0
  5. package/dist/CampaignAnalytic-UAwVz0E3.js +1830 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-LweQ57aG.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B_IbtQLp.js} +6 -5
  7. package/dist/Card-D3-MgguK.js +1084 -0
  8. package/dist/{Collections-H7zhe9zN.js → Collections-BU7-Lz_-.js} +14 -13
  9. package/dist/Credit-C9gf6eCr.js +286 -0
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-UK9GcPFC.js +53 -0
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-B9A98JpX.js +4213 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-qNmiKaJc.js → EffectSheet.vue_vue_type_style_index_0_lang-nKD6CT3U.js} +35 -35
  13. package/dist/{Experience-CH5tg-tm.js → Experience-dKvKT4v4.js} +112 -86
  14. package/dist/{FileSaver.min-DNFqiyZb.js → FileSaver.min-CI8hZvUL.js} +1 -1
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
  16. package/dist/Game-CBjdeb6F.js +356 -0
  17. package/dist/GiftCardSetup-DA9yMwPR.js +662 -0
  18. package/dist/{Grab-3s_sLewD.js → Grab-zCeZMSNI.js} +33 -32
  19. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-fbmoN1e9.js → ImageInput.vue_vue_type_script_setup_true_lang-CxhlYuM9.js} +1 -1
  20. package/dist/{Index-zTWZCiEo.js → Index-UGpjUfjV.js} +10 -10
  21. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BOxYPkf5.js → LocationPicker.vue_vue_type_script_setup_true_lang-D21fIVUX.js} +1 -1
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-wjJ_cwft.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DrB7xzy1.js} +1 -1
  23. package/dist/LoyaltyDashboard-CBPnQReU.js +2865 -0
  24. package/dist/MainLayout-BBJUWsAz.js +143 -0
  25. package/dist/{Marketing-Bto1OvK1.js → Marketing-BjQG6Q41.js} +7 -6
  26. package/dist/{MarketingMaterialEdit-D7rIqF5U.js → MarketingMaterialEdit-CMUbiKjd.js} +15 -14
  27. package/dist/Member-B-7tGoFW.js +649 -0
  28. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-BLmafK0n.js +1287 -0
  29. package/dist/MemberImportHistory-CDyHKO1L.js +187 -0
  30. package/dist/MemberList-f0dMdOF8.js +336 -0
  31. package/dist/{MemberTransactions-CjTtGB2y.js → MemberTransactions-DVcRoyxv.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DvKL7BL5.js → MessageInput.vue_vue_type_script_setup_true_lang-CnpXUVvO.js} +5682 -5479
  33. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BTBXutpq.js +40 -0
  34. package/dist/Mission-CrrXaD8F.js +360 -0
  35. package/dist/{Overview-mxGLyFvE.js → Overview-CAIxshHU.js} +21 -20
  36. package/dist/Overview-Y_hxLN7Y.js +1316 -0
  37. package/dist/Point-CE0G4oxW.js +288 -0
  38. package/dist/Promotion-C_NQWWOT.js +423 -0
  39. package/dist/{Queue-DgaFyyyH.js → Queue-BfZGOOsa.js} +14 -13
  40. package/dist/{Record-BRol__6_.js → Record-BR3Su26B.js} +9 -9
  41. package/dist/Review-FrIgV7vH.js +45 -0
  42. package/dist/ReviewFacebookCallback-DOyee73-.js +238 -0
  43. package/dist/ReviewGoogleCallback-CX0cbT4r.js +213 -0
  44. package/dist/{Reward-DQI0PvmR.js → Reward-COkgkVT-.js} +35 -35
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-B6bvQNsU.js → RewardGroup.vue_vue_type_script_setup_true_lang-CUd-Gy5a.js} +14 -13
  46. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DgAU7jGo.js → RuleGroup.vue_vue_type_script_setup_true_lang-eBVDv0Qy.js} +103 -109
  47. package/dist/{Segment-DFaLx0QZ.js → Segment-kh3FuWRP.js} +30 -29
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Cpb2i9iV.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CUoiQlba.js} +31 -30
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-MvoepHn9.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BkylJ859.js} +4 -4
  50. package/dist/{Setting-D2NjFJvq.js → Setting-UDrEIdF9.js} +14 -14
  51. package/dist/{SettingAdvertisements-CPWgSMaA.js → SettingAdvertisements-Dic4fC0u.js} +12 -12
  52. package/dist/Settings-Ct_ESMn8.js +230 -0
  53. package/dist/Store-CyG1FPWq.js +2612 -0
  54. package/dist/{StoreRewards-Ccj12pyq.js → StoreRewards-C9b_rMRT.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DaGFayps.js +1329 -0
  56. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CfWTn0Xd.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Dew6rC4d.js} +2 -2
  57. package/dist/{Tier-vaJoohiM.js → Tier-DgLEHrFJ.js} +2296 -750
  58. package/dist/{Title-BqHC7-v9.js → Title-C_8gMnYS.js} +39 -37
  59. package/dist/Transaction-B9E0jWw9.js +45 -0
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Dporb9KE.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DgW4dSkV.js} +26 -26
  61. package/dist/{Voucher-DeN6C6DQ.js → Voucher-DR3Eteh4.js} +156 -133
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-De16fuC4.js → VoucherEditor.vue_vue_type_script_setup_true_lang-JexB74ky.js} +115 -121
  63. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DAC-j0Ln.js → ZodTextField.vue_vue_type_script_setup_true_lang-ChOd_di8.js} +2 -2
  64. package/dist/{app-n4Y2jMee.js → app-BIjITpNJ.js} +29593 -25208
  65. package/dist/app.js +1 -1
  66. package/dist/base.export-DqZ38Nx2.js +75 -0
  67. package/dist/{business-jn-_l48y.js → business-j4ZuiLuJ.js} +5 -5
  68. package/dist/campaign-DxhXoOvw.js +100 -0
  69. package/dist/campaign-MS9awZ18.js +368 -0
  70. package/dist/{campaign.enum-C9HvoKuq.js → campaign.enum-Bk6qcWR3.js} +1 -1
  71. package/dist/campaign.fn-DR_X38U8.js +776 -0
  72. package/dist/{collectible.enum-_HVU4lWn.js → collectible.enum-C_E4CCGR.js} +1 -1
  73. package/dist/collection.fn-BfyWr7cC.js +26 -0
  74. package/dist/currency-DZzC-632.js +7 -0
  75. package/dist/{duplicateCampaign-gzVwrnWb.js → duplicateCampaign-BgTmR0T2.js} +11 -11
  76. package/dist/{effect-DhpIv1L3.js → effect-DPCjkqDR.js} +1 -1
  77. package/dist/{email-addresses-DPxYLSoa.js → email-addresses-BoPJkP5p.js} +209 -201
  78. package/dist/google-C3S8u0mT.js +4 -0
  79. package/dist/{helper-WYHUnHVy.js → helper-DwJK1iKj.js} +1 -1
  80. package/dist/{index-BPsofsGt.js → index-8vHynDvo.js} +1933 -2560
  81. package/dist/{index-BdqRrCt8.js → index-Bd4ErVnX.js} +5 -5
  82. package/dist/index-BkFxLxI6.js +137 -0
  83. package/dist/index-BvxBDSzh.js +72 -0
  84. package/dist/{index-DUTFNEn9.js → index-C5Jm1Was.js} +4 -4
  85. package/dist/{index-xao4ggML.js → index-CIuQyo1z.js} +5 -5
  86. package/dist/{index-C-5YgmkC.js → index-CMJCsyXT.js} +7 -5
  87. package/dist/index-CTo26AN3.js +14530 -0
  88. package/dist/{index-Cte6dHHy.js → index-CVMsPseO.js} +14 -14
  89. package/dist/{index-BdnHQSDd.js → index-CXbojcfi.js} +5 -4
  90. package/dist/index-Cso1GrEu.js +53 -0
  91. package/dist/{index-Cvfavr2M.js → index-DD24eHtV.js} +351 -216
  92. package/dist/index-DGOX45St.js +151 -0
  93. package/dist/index-DP6WMBRq.js +900 -0
  94. package/dist/{index-7HizF3GI.js → index-DfwXt9fy.js} +1588 -1522
  95. package/dist/{index--fNMSXUf.js → index-Dn2mOB0A.js} +1 -1
  96. package/dist/{index-BuLfxJyC.js → index-LJrZDUgh.js} +105 -123
  97. package/dist/{index-BN-FP9kx.js → index-a15EaBn7.js} +1 -1
  98. package/dist/{index.esm2017-CjzFPUCa.js → index.esm2017-CWii-ZqX.js} +164 -164
  99. package/dist/{loading-CojnK00V.js → loading-CibOtJVR.js} +1 -1
  100. package/dist/{lodash-CLkg5jTT.js → lodash-oHoQ9t6u.js} +1 -1
  101. package/dist/member-import-BgJP811X.js +187 -0
  102. package/dist/membership-CqFY6ya6.js +274 -0
  103. package/dist/{money-CyaLaEKo.js → money-tVvfE8ha.js} +1 -1
  104. package/dist/{number-DEtI4bEX.js → number-B4p37H0W.js} +1 -1
  105. package/dist/objectid-reVda6sT.js +145 -0
  106. package/dist/{plugins-MnP1vCcg.js → plugins-S4qmcyLz.js} +13 -12
  107. package/dist/remy-Qz_pNsUS.js +13 -0
  108. package/dist/{reward-Dk3D26xC.js → reward-CgHNw9uj.js} +1 -1
  109. package/dist/{rule-B1Agad1n.js → rule-BECsW_aD.js} +335 -275
  110. package/dist/style.css +1 -1
  111. package/dist/{template-DpqLCq1p.js → template-jOqP_F7D.js} +6 -6
  112. package/dist/timezone-BBXko2_m.js +20 -0
  113. package/dist/transaction.fn-3DOFgJNT.js +64 -0
  114. package/dist/{trigger-cwPN-4Ia.js → trigger-DBIaHlqi.js} +17 -17
  115. package/dist/useMarketingMaterialActions-Dnln39_O.js +96 -0
  116. package/dist/{usePagination-D8zBMxdJ.js → usePagination-BKN2uLM2.js} +1 -1
  117. package/dist/{user-EUGwaL2f.js → user-CTKTBdLx.js} +1 -1
  118. package/dist/{vue-i18n-BBj45p9N.js → vue-i18n-Di-6yoyq.js} +233 -233
  119. package/dist/{xlsx-DiMIlKmu.js → xlsx-Z1jRdg68.js} +584 -584
  120. package/dist/{zod-B1cU167C.js → zod-BmQ5EO9I.js} +1 -1
  121. package/package.json +6 -5
  122. package/dist/Broadcast-BT0R11RB.js +0 -266
  123. package/dist/Card-Wdh8lyUv.js +0 -910
  124. package/dist/Credit-BuKLrFtM.js +0 -260
  125. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  126. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-B2sZFWUF.js +0 -3377
  127. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  128. package/dist/Game-C9s4qZz4.js +0 -330
  129. package/dist/LoyaltyDashboard-tOOk6zvV.js +0 -1082
  130. package/dist/MainLayout-iWi1DzXS.js +0 -41
  131. package/dist/Member-BdgdT-sa.js +0 -280
  132. package/dist/MemberList-DBIE-RWC.js +0 -1601
  133. package/dist/Mission-CWR6FBvN.js +0 -334
  134. package/dist/Point-BIt82fJk.js +0 -262
  135. package/dist/Promotion-Cl1vPi0B.js +0 -397
  136. package/dist/Review-DmV2YnFd.js +0 -1076
  137. package/dist/ReviewFacebookCallback-B5XgAWXo.js +0 -243
  138. package/dist/ReviewGoogleCallback-CYR03Wfd.js +0 -208
  139. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CAImd3yc.js +0 -181
  140. package/dist/Store-DjUe8ady.js +0 -1996
  141. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B7w69A3j.js +0 -1130
  142. package/dist/Transaction-BOmDOGnD.js +0 -39
  143. package/dist/campaign-BnI7-ceP.js +0 -219
  144. package/dist/campaign-rgDnocfT.js +0 -277
  145. package/dist/campaign.fn-D21ettpH.js +0 -776
  146. package/dist/export-CWAxYj7W.js +0 -97
  147. package/dist/index-B6EBgIUx.js +0 -85
  148. package/dist/index-CxR1baaG.js +0 -52
  149. package/dist/membership-CeX8E_I9.js +0 -255
  150. package/dist/objectid-CMau7CW-.js +0 -145
  151. package/dist/useMarketingMaterialActions-CGzfJ68e.js +0 -107
@@ -1,97 +0,0 @@
1
- var g = Object.defineProperty;
2
- var b = (s, e, o) => e in s ? g(s, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : s[e] = o;
3
- var d = (s, e, o) => b(s, typeof e != "symbol" ? e + "" : e, o);
4
- import { u as a, w as f } from "./xlsx-DiMIlKmu.js";
5
- import { u as h } from "./loading-CojnK00V.js";
6
- import { h as x } from "./moment-D7p2TMB-.js";
7
- import { m as w } from "./index-C-5YgmkC.js";
8
- class y {
9
- constructor() {
10
- d(this, "records", []);
11
- }
12
- addRecord(e) {
13
- this.records.push(e);
14
- }
15
- addRecords(e) {
16
- this.records.push(...e);
17
- }
18
- buildExcel() {
19
- const e = a.json_to_sheet(this.records), o = a.book_new();
20
- return a.book_append_sheet(o, e, "Sheet1"), o;
21
- }
22
- }
23
- class k extends y {
24
- }
25
- const r = {
26
- sortBy: "_id",
27
- descending: !1,
28
- rowsPerPage: 1e3,
29
- page: 1,
30
- rowsNumber: 0
31
- }, { minor: _ } = h;
32
- async function S({
33
- exporter: s,
34
- readFunction: e,
35
- transformRecord: o,
36
- filename: t
37
- }) {
38
- const c = (await e({
39
- limit: 1,
40
- skip: 0,
41
- sortBy: r.sortBy,
42
- descending: r.descending
43
- })).meta.totalResources ?? 0, n = r.rowsPerPage;
44
- await _(
45
- async () => {
46
- for (let i = 0; i < c; i += n) {
47
- const m = {
48
- ...r,
49
- limit: n,
50
- skip: r.page - 1,
51
- sortBy: r.sortBy,
52
- descending: r.descending
53
- }, p = await e(m);
54
- for (const l of p.resources) {
55
- const u = o(l);
56
- s.addRecord(u);
57
- }
58
- r.page++;
59
- }
60
- await f(
61
- s.buildExcel(),
62
- `${t}-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
63
- {
64
- bookType: "xlsx",
65
- bookSST: !1,
66
- type: "array"
67
- }
68
- ), r.page = 1;
69
- },
70
- {
71
- message: `Exporting ${t}...`,
72
- successMessage: `${t} exported successfully`
73
- }
74
- );
75
- }
76
- async function E() {
77
- return S({
78
- exporter: new k(),
79
- readFunction: w.readCards,
80
- transformRecord: (s) => {
81
- var e, o;
82
- return {
83
- CardNumber: s.serialNumber || "",
84
- MemberId: ((e = s.pf_member) == null ? void 0 : e._id.toString()) || "",
85
- Phone: ((o = s.pf_member) == null ? void 0 : o.phoneNumber) || "",
86
- RedeemedAt: s.redeemedAt ? x(s.redeemedAt).format("DD/MM/YYYY") : ""
87
- };
88
- },
89
- filename: "cards"
90
- });
91
- }
92
- export {
93
- y as B,
94
- k as C,
95
- E as a,
96
- S as e
97
- };
@@ -1,85 +0,0 @@
1
- import { g as n, S as w, u as _, b as y } from "./index-BdnHQSDd.js";
2
- const r = () => {
3
- if (!w.getBusinessId()) throw new Error("Invalid business ID");
4
- return _("users");
5
- }, a = () => {
6
- const e = w.getBusinessId();
7
- if (!e) throw new Error("Invalid business ID");
8
- return y(`businesses/${e}/membership`, {
9
- noIdRequired: !0
10
- });
11
- }, C = (e) => {
12
- var s, t, c, o, i, u, p, m, d, l, b, I;
13
- return {
14
- ...e,
15
- collection_TIER_0_balance: ((c = (t = (s = e.collection) == null ? void 0 : s.TIER) == null ? void 0 : t[0]) == null ? void 0 : c.balance) ?? 0,
16
- collection_CREDIT_0_balance: ((u = (i = (o = e.collection) == null ? void 0 : o.CREDIT) == null ? void 0 : i[0]) == null ? void 0 : u.balance) ?? 0,
17
- collection_COIN_0_balance: ((d = (m = (p = e.collection) == null ? void 0 : p.COIN) == null ? void 0 : m[0]) == null ? void 0 : d.balance) ?? 0,
18
- collection_TITLE_0_title: ((I = (b = (l = e.collection) == null ? void 0 : l.TITLE) == null ? void 0 : b[0]) == null ? void 0 : I.title) ?? ""
19
- };
20
- }, E = {
21
- async read(e) {
22
- const s = n(
23
- await r().get("", { params: e })
24
- ), t = s.resources.map(C);
25
- return {
26
- meta: s.meta,
27
- resources: t
28
- };
29
- },
30
- async readCursor(e) {
31
- const s = n(
32
- await r().get("cursor", { params: e })
33
- ), t = s.resources.map(C);
34
- return {
35
- meta: s.meta,
36
- resources: t
37
- };
38
- },
39
- async readById(e) {
40
- return n(await r().get(`${e}`));
41
- },
42
- async sendCredit(e, s) {
43
- return n(
44
- await a().post(
45
- `members/${e}/send-credit`,
46
- s
47
- )
48
- );
49
- },
50
- async deductCredit(e, s) {
51
- return n(
52
- await a().post(
53
- `members/${e}/deduct-credit`,
54
- s
55
- )
56
- );
57
- },
58
- async sendCoin(e, s) {
59
- return n(
60
- await a().post(
61
- `members/${e}/send-coin`,
62
- s
63
- )
64
- );
65
- },
66
- async deductCoin(e, s) {
67
- return n(
68
- await a().post(
69
- `members/${e}/deduct-coin`,
70
- s
71
- )
72
- );
73
- },
74
- async updateMember(e, s) {
75
- return n(
76
- await r().put(`${e}`, s)
77
- );
78
- },
79
- async import(e) {
80
- return await r().post("import", e);
81
- }
82
- };
83
- export {
84
- E as m
85
- };
@@ -1,52 +0,0 @@
1
- import { g as n, S as r, b as c } from "./index-BdnHQSDd.js";
2
- const o = (e = "") => {
3
- const s = r.getBusinessId();
4
- if (!s) throw new Error("Invalid business ID");
5
- return c(`businesses/${s}/${e}`);
6
- }, g = {
7
- async listReviews(e) {
8
- const s = await o("reviews").get("", { params: e });
9
- return n(s);
10
- },
11
- async getSource() {
12
- const e = await o("reviews/config").get("");
13
- return n(e);
14
- },
15
- async connectGoogle(e, s, t) {
16
- const a = await o("reviews/config/google").post("", {
17
- code: e,
18
- redirectUri: s,
19
- state: t
20
- });
21
- return n(a);
22
- },
23
- async updateGoogleLocations(e) {
24
- const s = await o("reviews/config/google/locations").put("", { locations: e });
25
- return n(s);
26
- },
27
- async syncGoogleReviews() {
28
- const e = await o("reviews/config/google/sync").post("", {});
29
- return n(e);
30
- },
31
- async connectFacebook(e) {
32
- const s = await o("reviews/config/facebook").post("", { token: e });
33
- return n(s);
34
- },
35
- async updateFacebookPages(e) {
36
- const s = await o("reviews/config/facebook/pages").put("", { pages: e });
37
- return n(s);
38
- },
39
- async syncFacebookReviews() {
40
- const e = await o("reviews/config/facebook/sync").post("", {});
41
- return n(e);
42
- },
43
- async getOauthUrl(e, s) {
44
- const t = await o(`reviews/config/${e}/oauth`).get("", {
45
- params: { redirectUri: s }
46
- });
47
- return n(t);
48
- }
49
- };
50
- export {
51
- g as r
52
- };
@@ -1,255 +0,0 @@
1
- import { components as B } from "@feedmepos/ui-library";
2
- import { F as i } from "./collectible.enum-_HVU4lWn.js";
3
- import { h as f, ref as n } from "vue";
4
- import { defineStore as U } from "pinia";
5
- import { m as p } from "./index-C-5YgmkC.js";
6
- import { g as o, u as V } from "./index-BdnHQSDd.js";
7
- function m(t) {
8
- return f(
9
- "div",
10
- {
11
- class: `${t.chipClass} gap-4 h-[22px] inline-flex items-center justify-center min-w-min px-8 rounded-md`
12
- },
13
- [
14
- f(B.FmIcon, { size: "sm", name: t.icon, outline: !0 }),
15
- f("span", { class: "fm-typo-en-body-md-600" }, t.name)
16
- ]
17
- );
18
- }
19
- const k = {
20
- [i.enum.VOUCHER]: {
21
- chipClass: "!text-fm-color-secondary-halite !bg-[#fff0f6]",
22
- icon: "sell",
23
- name: "Voucher",
24
- chip() {
25
- return m(this);
26
- }
27
- },
28
- [i.enum.CREDIT]: {
29
- chipClass: "!text-fm-color-secondary-plum !bg-[#f2ebfe]",
30
- icon: "local_activity",
31
- name: "Credit",
32
- chip() {
33
- return m(this);
34
- }
35
- },
36
- [i.enum.POINT]: {
37
- chipClass: "!text-fm-color-secondary-cocoa !bg-[#fff9e6]",
38
- icon: "award_star",
39
- name: "Experience",
40
- chip() {
41
- return m(this);
42
- }
43
- },
44
- [i.enum.COIN]: {
45
- chipClass: "!text-fm-color-system-success-400 !bg-fm-color-system-success-100",
46
- icon: "monetization_on",
47
- name: "Point",
48
- chip() {
49
- return m(this);
50
- }
51
- },
52
- // TODO: add color for this
53
- [i.enum.TIER]: {
54
- chipClass: "!text-fm-color-secondary-cocoa !bg-[#fff9e6]",
55
- icon: "leaderboard",
56
- name: "Tier",
57
- chip() {
58
- return m(this);
59
- }
60
- },
61
- // TODO: add color for this
62
- [i.enum.TITLE]: {
63
- chipClass: "!text-fm-color-secondary-cocoa !bg-[#fff9e6]",
64
- icon: "id_card",
65
- name: "Title",
66
- chip() {
67
- return m(this);
68
- }
69
- },
70
- [i.enum.GAME]: {
71
- chipClass: "!text-fm-color-secondary-mint !bg-fm-color-system-success-100",
72
- icon: "database",
73
- name: "Token",
74
- chip() {
75
- return m(this);
76
- }
77
- },
78
- // TODO: confirm color
79
- [i.enum.STAMP]: {
80
- chipClass: "!text-fm-color-secondary-mint !bg-fm-color-system-success-100",
81
- icon: "database",
82
- name: "Stamp",
83
- chip() {
84
- return m(this);
85
- }
86
- },
87
- [i.enum.REFERRAL]: {
88
- chipClass: "!text-fm-color-secondary-mint !bg-fm-color-system-success-100",
89
- icon: "database",
90
- name: "Successful Referral",
91
- chip() {
92
- return m(this);
93
- }
94
- }
95
- }, c = () => V("segments"), D = {
96
- async readAll(t) {
97
- const a = o(
98
- await c().get("", { params: t })
99
- );
100
- return {
101
- meta: a.meta,
102
- resources: a.resources
103
- };
104
- },
105
- async readById(t) {
106
- return o(await c().get(t));
107
- },
108
- async refreshSegments() {
109
- return o(
110
- await c().get(
111
- "refresh"
112
- )
113
- );
114
- },
115
- async refreshSegment(t) {
116
- return o(
117
- await c().get(
118
- `refresh/${t}`
119
- )
120
- );
121
- },
122
- async refreshStatus() {
123
- return o(
124
- await c().get(
125
- "refresh/status"
126
- )
127
- );
128
- },
129
- async startDefaultSegments() {
130
- return o(
131
- await c().post(
132
- "default-segments/start"
133
- )
134
- );
135
- },
136
- async paginateSegmentUsers(t, a) {
137
- const l = o(
138
- await c().get(`/${t}/users`, {
139
- params: a
140
- })
141
- );
142
- return {
143
- meta: l.meta,
144
- resources: l.resources
145
- };
146
- },
147
- async create(t) {
148
- return o(await c().post("", t));
149
- },
150
- async update(t, a) {
151
- return o(await c().put(t, a));
152
- },
153
- async delete(t) {
154
- return o(await c().delete(t));
155
- },
156
- async createStatic(t) {
157
- return o(await c().post("static", t));
158
- },
159
- async updateStatic(t, a) {
160
- return o(await c().put(`static/${t}`, a));
161
- }
162
- }, q = U("mf-connect-membership", () => {
163
- var R, x;
164
- const t = n(null), a = n(null), l = n(null), u = n([]), d = n([]), y = n(null), h = n([]), g = n(), b = n(((R = t.value) == null ? void 0 : R.tiers) ?? []), v = n(((x = t.value) == null ? void 0 : x.pf_title) ?? []), w = n([]), C = n({ raw: [], items: [] }), T = n([]), A = async () => {
165
- const e = await p.read();
166
- t.value = e, y.value = e, b.value = e.tiers, v.value = e.pf_title ?? [], S(), E();
167
- }, I = async () => {
168
- const e = await p.readPayoutAccount();
169
- l.value = Array.isArray(e) && e.length == 0 ? null : e;
170
- }, _ = async () => {
171
- const e = await p.readStore();
172
- a.value = e, M(), P();
173
- }, O = async () => {
174
- const e = await p.readRewards();
175
- u.value = e, S(), E();
176
- }, L = async () => {
177
- const e = await D.readAll({
178
- skip: 0,
179
- sortBy: "_id",
180
- limit: 1e3
181
- });
182
- d.value = e.resources, F();
183
- }, M = () => {
184
- var e;
185
- h.value = (((e = a.value) == null ? void 0 : e.categories) ?? []).map((r) => ({
186
- ...r,
187
- bundles: r.bundles.sort(
188
- (s, $) => s.name.localeCompare($.name, "en", { numeric: !0 })
189
- )
190
- })).sort((r, s) => r.name.localeCompare(s.name, "en", { numeric: !0 }));
191
- }, P = () => {
192
- var e, r, s;
193
- g.value = {
194
- company: (e = a.value) == null ? void 0 : e.company,
195
- inclusiveTaxes: ((r = a.value) == null ? void 0 : r.inclusiveTaxes) ?? [],
196
- stripe: (s = a.value) == null ? void 0 : s.stripe
197
- };
198
- }, S = () => {
199
- var e;
200
- w.value = [
201
- ...u.value.filter((r) => r.type == "VOUCHER" && r.noCampaign),
202
- ...((e = t.value) == null ? void 0 : e.pf_title) ?? []
203
- ];
204
- }, E = () => {
205
- var r;
206
- const e = [
207
- ...u.value.filter(
208
- (s) => !["VOUCHER", "TIER", "GAME", "TITLE", "STAMP", "REFERRAL"].includes(s.type)
209
- ).map((s) => ({ ...s, name: k[s.type].name })),
210
- ...((r = t.value) == null ? void 0 : r.pf_title) ?? []
211
- ];
212
- C.value = {
213
- raw: e,
214
- items: e.map((s) => ({
215
- label: `${s.type === "TITLE" ? "[Title] " : ""}${s.name}`,
216
- value: s._id,
217
- raw: s
218
- }))
219
- };
220
- }, F = () => {
221
- T.value = d.value.map((e) => ({
222
- label: e.name,
223
- value: e._id,
224
- raw: e
225
- }));
226
- };
227
- return {
228
- // State
229
- membership: t,
230
- store: a,
231
- collectibles: u,
232
- segments: d,
233
- payoutAccount: l,
234
- // Actions
235
- readMembership: A,
236
- readPayoutAccount: I,
237
- readMemberStore: _,
238
- readRewards: O,
239
- readSegments: L,
240
- // Getters
241
- membershipInfo: y,
242
- sortedStoreCategories: h,
243
- storeOption: g,
244
- sortedTiers: b,
245
- sortedTitles: v,
246
- bundleRewards: w,
247
- loyaltyRewards: C,
248
- segmentOptions: T
249
- };
250
- });
251
- export {
252
- k as C,
253
- D as s,
254
- q as u
255
- };
@@ -1,145 +0,0 @@
1
- import { g as l } from "./app-n4Y2jMee.js";
2
- var o = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_ffc7fea8-c76e-4d06-b84a-bc1828b7068c", npm_package_dependencies_zod: "3.22.4", npm_package_devDependencies__types_node: "^18.19.41", DOTNET_NOLOGO: "1", npm_package_dependencies__feedmepos_remy_vue_client: "0.2.0-beta.14", npm_package_dependencies_pinia: "^2.1.7", npm_package_dependencies_vite_plugin_vue_devtools: "^7.6.4", npm_package_devDependencies_vitest: "^2.1.9", USER: "runner", npm_config_user_agent: "pnpm/9.15.9 npm/? node/v20.20.2 linux x64", CI: "true", npm_package_dependencies_vue: "^3.5.13", USE_BAZEL_FALLBACK_VERSION: "silent:", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_ffc7fea8-c76e-4d06-b84a-bc1828b7068c", PIPX_HOME: "/opt/pipx", npm_package_devDependencies_vite: "^5.3.4", npm_node_execpath: "/opt/hostedtoolcache/node/20.20.2/x64/bin/node", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", SHLVL: "1", HCA_CLOUD_PROVIDER: "azure", npm_package_files_0: "dist", HOME: "/home/runner", npm_package_dependencies_moment_timezone: "^0.6.0", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_scripts_build_mf_dev: "vite build --mode fmmf", npm_package_dependencies__types_qrcode: "^1.5.5", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "feedmepos", npm_package_scripts_build_mf_prod: "vite build --mode fmmf:prod", npm_package_dependencies_change_case: "^5.4.4", NODE_OPTIONS: "--max-old-space-size=8096", GRADLE_HOME: "/usr/share/gradle-9.6.1", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/29.0.14206865", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", GITHUB_RETENTION_DAYS: "90", npm_package_dependencies__feedmepos_mf_common: "1.29.23", npm_package_dependencies_fabric: "^5.5.1", npm_package_dependencies_ua_parser_js: "^2.0.3", npm_package_dependencies_zod_i18n_map: "2.27.0", GITHUB_REPOSITORY_OWNER_ID: "54831515", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-Linux", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_package_devDependencies__types_file_saver: "^2.0.7", SYSTEMD_EXEC_PID: "1790", ACTIONS_ORCHESTRATION_ID: "e7a5f057-8170-41a3-930a-a565108dac01.deploy.__default", npm_package_dependencies__feedmepos_ui_library: "1.10.8", npm_package_dependencies_dayjs: "^1.11.12", npm_package_dependencies_dotenv: "^16.4.5", npm_package_dependencies_moment: "^2.30.1", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_scripts_build_only_dev: "pnpm build:mf:dev", npm_package_dependencies__tailwindcss_typography: "^0.5.16", npm_package_dependencies_i18next: "24.2.1", npm_package_devDependencies_tailwindcss: "^3.4.6", npm_package_devDependencies_typescript: "^5.5.3", JAVA_HOME_25_X64: "/usr/lib/jvm/temurin-25-jdk-amd64", NVM_DIR: "/home/runner/.nvm", npm_package_scripts_build_dev: "cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build --mode development", npm_package_scripts_build_only_prod: "pnpm build:mf:prod", npm_package_dependencies_xlsx: "^0.18.5", npm_package_devDependencies_vue_tsc: "^2.0.26", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20260714.240.1", npm_package_scripts_dev: "vite", npm_package_scripts_build_prod: "cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build --mode production", npm_package_dependencies__feedmepos_custom_attributes: "0.0.1-rc.4", npm_package_dependencies_unplugin_auto_import: "^0.17.8", LOGNAME: "runner", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", STORE_PATH: "/home/runner/setup-pnpm/node_modules/.bin/store/v3", SWIFT_PATH: "/usr/share/swift/usr/bin", npm_package_type: "module", npm_package_dependencies__vueuse_core: "^14.1.0", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", JOURNAL_STREAM: "9:11445", GITHUB_WORKFLOW: "[CD:dev] connect-portal (mf-connect)", _: "/home/runner/setup-pnpm/node_modules/.bin/pnpm", npm_package_module: "./dist/app.js", npm_package_devDependencies_autoprefixer: "^10.4.19", MEMORY_PRESSURE_WATCH: "/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure", GOROOT_1_24_X64: "/opt/hostedtoolcache/go/1.24.13/x64", npm_package_devDependencies__types_uuid: "^9.0.8", npm_package_devDependencies_unlayer_types: "^1.157.0", npm_config_registry: "https://registry.npmjs.org/", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", GOROOT_1_25_X64: "/opt/hostedtoolcache/go/1.25.12/x64", GITHUB_RUN_ID: "29819554219", npm_package_dependencies_bson_objectid: "^2.0.4", npm_package_devDependencies__types_lodash: "^4.17.7", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "ef8b4fc4e3237cbfaba023a77addc2e604253140", GOROOT_1_26_X64: "/opt/hostedtoolcache/go/1.26.5/x64", GITHUB_BASE_REF: "", ImageOS: "ubuntu24", npm_package_exports___import: "./dist/app.js", npm_package_dependencies__ckeditor_ckeditor5_vue: "^7.3.0", npm_package_devDependencies__vitejs_plugin_vue: "^5.0.5", GITHUB_WORKFLOW_REF: "feedmepos/marketing-services/.github/workflows/[DEV] deploy-mf-connect.yml@refs/heads/dev", GITHUB_ACTION_REPOSITORY: "", ENABLE_RUNNER_TRACING: "true", npm_package_dependencies_axios: "^1.7.2", npm_config_node_gyp: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js", PATH: "/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.20.2/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_1e338a0f-cdef-4bc7-83fd-2dcfaec49766", INVOCATION_ID: "f4bee733a2574bcdb75b6b6432c213f1", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", NODE: "/opt/hostedtoolcache/node/20.20.2/x64/bin/node", npm_package_name: "@feedmepos/mf-connect", npm_package_scripts_deploy_dev: "pnpm run build-only:dev && pnpm publish --no-git-checks .", npm_package_dependencies_cross_env: "^7.0.3", npm_package_dependencies_file_saver: "^2.0.5", GITHUB_ACTION: "__run_5", GITHUB_RUN_NUMBER: "266", GITHUB_TRIGGERING_ACTOR: "yyueniao", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_scripts_deploy_prod: "pnpm run build-only:prod && pnpm publish --no-git-checks .", npm_config_frozen_lockfile: "", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_dependencies__feedmepos_mf_core_ui: "1.0.25", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 1000093566", XDG_CONFIG_HOME: "/home/runner/.config", GITHUB_REF_NAME: "dev", GITHUB_REPOSITORY: "feedmepos/marketing-services", npm_package_scripts_build_dts: "vue-tsc --declaration --noEmit false --emitDeclarationOnly -p tsconfig.json --outDir ./dist && mv ./dist/src/* dist", npm_package_scripts_build_types: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.json --outDir dist --composite false", npm_package_dependencies__feedmepos_core: "2.15.21", npm_lifecycle_script: "vite build --mode fmmf", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_scripts_test: "vitest run", npm_package_dependencies_rrule: "^2.8.1", npm_package_dependencies_vue3_lottie: "^3.3.0", SHELL: "/bin/bash", GITHUB_REPOSITORY_ID: "615151795", GITHUB_ACTIONS: "true", NODE_PATH: "/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules/vite/bin/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules/vite/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules", npm_package_version: "0.1.98-beta.6", npm_package_dependencies__feedmepos_hrm_permission: "1.0.14", npm_package_dependencies_ckeditor5: "^44.3.0", npm_lifecycle_event: "build:mf:dev", GITHUB_REF_PROTECTED: "false", npm_package_scripts_build: "vue-tsc && vite build", npm_package_dependencies_uuid: "^10.0.0", npm_package_dependencies_vue_i18n: "10.0.5", GITHUB_WORKSPACE: "/home/runner/work/marketing-services/marketing-services", ACCEPT_EULA: "Y", GITHUB_JOB: "deploy", npm_package_dependencies_lodash: "^4.17.21", GITHUB_SHA: "ef8b4fc4e3237cbfaba023a77addc2e604253140", GITHUB_RUN_ATTEMPT: "1", npm_package_exports___style: "./dist/style.css", npm_package_dependencies__ckeditor_ckeditor5_build_classic: "^44.3.0", npm_package_dependencies_vue_router: "^4.4.0", ACTIONS_RUNNER_RETURN_JOB_RESULT_FOR_HOSTED: "1", GITHUB_REF: "refs/heads/dev", GITHUB_ACTOR: "yyueniao", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "UNLICENSED", npm_package_dependencies_email_addresses: "^5.0.0", npm_package_scripts_test_watch: "vitest", npm_package_dependencies_firebase: "^10.12.4", npm_package_dependencies_qrcode: "^1.5.3", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_ffc7fea8-c76e-4d06-b84a-bc1828b7068c", JAVA_HOME: "/usr/lib/jvm/temurin-17-jdk-amd64", PWD: "/home/runner/work/marketing-services/marketing-services/packages/connect", GITHUB_ACTOR_ID: "91043129", RUNNER_WORKSPACE: "/home/runner/work/marketing-services", npm_execpath: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/pnpm.cjs", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", GITHUB_EVENT_NAME: "push", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_ffc7fea8-c76e-4d06-b84a-bc1828b7068c", npm_package_exports___types: "./dist/packages/connect/src/app.d.ts", EDGEWEBDRIVER: "/usr/local/share/edge_driver", PNPM_SCRIPT_SRC_DIR: "/home/runner/work/marketing-services/marketing-services/packages/connect", npm_package_devDependencies_postcss: "^8.4.39", npm_command: "run-script", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/27.3.13750724", SGX_AESM_ADDR: "1", PSModulePath: "/root/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/7/Modules:/usr/share/az_15.6.1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_preview: "vite preview", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", MEMORY_PRESSURE_WRITE: "c29tZSAyMDAwMDAgMjAwMDAwMAA=", PNPM_HOME: "/home/runner/setup-pnpm/node_modules/.bin", npm_package_dependencies__feedmepos_menu: "1.0.34", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_ffc7fea8-c76e-4d06-b84a-bc1828b7068c", INIT_CWD: "/home/runner/work/marketing-services/marketing-services/packages/connect", npm_package_dependencies__feedmepos_mf_remy_panel: "0.15.0", NODE_ENV: "production", FEEDME_NAMESPACE: "dev", FIREBASE_API_KEY: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", FIREBASE_AUTH_DOMAIN: "feedme-dev-4c3ef.firebaseapp.com", FIREBASE_DATABASE_URL: "https://feedme-dev-4c3ef.firebaseio.com", FIREBASE_PROJECT_ID: "feedme-dev-4c3ef", FIREBASE_STORAGE_BUCKET: "feedme-dev-4c3ef.appspot.com", FIREBASE_MESSAGING_SENDER_ID: "458797803788", FIREBASE_APP_ID: "1:458797803788:web:37f2af2926a84288f0c129", FIREBASE_MEASUREMENT_ID: "G-J2QG09D2Q7", ASSET_STORAGE_BUCKET: "feedme-dev-4c3ef.appspot.com", IMPORT_FILES_STORAGE_BUCKET: "feedme-dev-4c3ef.appspot.com", AUTH_URL: "https://portal-v2-dev.feedmeapi.com/", SLACK_WEBHOOK_URL: "https://hooks.slack.com/services/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", MEMBER_APP_URL: "feedmedev.vip", CRM_APP_URL: "crm.feedmedev.cc", MARKETING_V1_PORTAL: "https://marketing-v1.feedmedev.cc", CLIENT_ID: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4", PAYMENT_PORTAL_URL: "https://portal.feedmedev.cc/payment/payout-account", LICENSE_PORTAL_URL: "https://license.feedmedev.cc/", VOUCHER_APP_URL: "https://voucher.feedmedev.cc/" } }, a = Math.floor(Math.random() * 16777215), i = n.index = parseInt(Math.random() * 16777215, 10), c = (typeof o > "u" || typeof o.pid != "number" ? Math.floor(Math.random() * 1e5) : o.pid) % 65535, d = (() => {
3
- try {
4
- return _Buffer;
5
- } catch {
6
- try {
7
- return Buffer;
8
- } catch {
9
- return null;
10
- }
11
- }
12
- })(), r = function(e) {
13
- return !!(e != null && e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e));
14
- }, u = [];
15
- for (var p = 0; p < 256; p++)
16
- u[p] = (p <= 15 ? "0" : "") + p.toString(16);
17
- var m = new RegExp("^[0-9a-fA-F]{24}$"), s = [];
18
- p = 0;
19
- for (; p < 10; ) s[48 + p] = p++;
20
- for (; p < 16; ) s[55 + p] = s[87 + p] = p++;
21
- function n(e) {
22
- if (!(this instanceof n)) return new n(e);
23
- if (e && (e instanceof n || e._bsontype === "ObjectID"))
24
- return e;
25
- if (this._bsontype = "ObjectID", e == null || typeof e == "number") {
26
- this.id = this.generate(e);
27
- return;
28
- }
29
- var _ = n.isValid(e);
30
- if (!_ && e != null)
31
- throw new Error(
32
- "Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
33
- );
34
- if (_ && typeof e == "string" && e.length === 24)
35
- return n.createFromHexString(e);
36
- if (e != null && e.length === 12)
37
- this.id = e;
38
- else {
39
- if (e != null && typeof e.toHexString == "function")
40
- return e;
41
- throw new Error(
42
- "Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
43
- );
44
- }
45
- }
46
- var g = n;
47
- n.default = n;
48
- n.createFromTime = function(e) {
49
- return e = parseInt(e, 10) % 4294967295, new n(E(8, e) + "0000000000000000");
50
- };
51
- n.createFromHexString = function(e) {
52
- if (typeof e > "u" || e != null && e.length !== 24)
53
- throw new Error(
54
- "Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
55
- );
56
- for (var _ = "", t = 0; t < 24; )
57
- _ += String.fromCharCode(s[e.charCodeAt(t++)] << 4 | s[e.charCodeAt(t++)]);
58
- return new n(_);
59
- };
60
- n.isValid = function(e) {
61
- return e == null ? !1 : typeof e == "number" ? !0 : typeof e == "string" ? e.length === 12 || e.length === 24 && m.test(e) : e instanceof n ? !0 : r(e) ? n.isValid(e.toString("hex")) : typeof e.toHexString == "function" && d && (e.id instanceof d || typeof e.id == "string") ? e.id.length === 12 || e.id.length === 24 && m.test(e.id) : !1;
62
- };
63
- n.prototype = {
64
- constructor: n,
65
- /**
66
- * Return the ObjectID id as a 24 byte hex string representation
67
- *
68
- * @return {String} return the 24 byte hex string representation.
69
- * @api public
70
- */
71
- toHexString: function() {
72
- if (!this.id || !this.id.length)
73
- throw new Error(
74
- "invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is [" + JSON.stringify(this.id) + "]"
75
- );
76
- if (this.id.length === 24)
77
- return this.id;
78
- if (r(this.id))
79
- return this.id.toString("hex");
80
- for (var e = "", _ = 0; _ < this.id.length; _++)
81
- e += u[this.id.charCodeAt(_)];
82
- return e;
83
- },
84
- /**
85
- * Compares the equality of this ObjectID with `otherID`.
86
- *
87
- * @param {Object} otherId ObjectID instance to compare against.
88
- * @return {Boolean} the result of comparing two ObjectID's
89
- * @api public
90
- */
91
- equals: function(e) {
92
- return e instanceof n ? this.toString() === e.toString() : typeof e == "string" && n.isValid(e) && e.length === 12 && r(this.id) ? e === this.id.toString("binary") : typeof e == "string" && n.isValid(e) && e.length === 24 ? e.toLowerCase() === this.toHexString() : typeof e == "string" && n.isValid(e) && e.length === 12 ? e === this.id : e != null && (e instanceof n || e.toHexString) ? e.toHexString() === this.toHexString() : !1;
93
- },
94
- /**
95
- * Returns the generation date (accurate up to the second) that this ID was generated.
96
- *
97
- * @return {Date} the generation date
98
- * @api public
99
- */
100
- getTimestamp: function() {
101
- var e = /* @__PURE__ */ new Date(), _;
102
- return r(this.id) ? _ = this.id[3] | this.id[2] << 8 | this.id[1] << 16 | this.id[0] << 24 : _ = this.id.charCodeAt(3) | this.id.charCodeAt(2) << 8 | this.id.charCodeAt(1) << 16 | this.id.charCodeAt(0) << 24, e.setTime(Math.floor(_) * 1e3), e;
103
- },
104
- /**
105
- * Generate a 12 byte id buffer used in ObjectID's
106
- *
107
- * @method
108
- * @param {number} [time] optional parameter allowing to pass in a second based timestamp.
109
- * @return {string} return the 12 byte id buffer string.
110
- */
111
- generate: function(e) {
112
- typeof e != "number" && (e = ~~(Date.now() / 1e3)), e = parseInt(e, 10) % 4294967295;
113
- var _ = f();
114
- return String.fromCharCode(
115
- e >> 24 & 255,
116
- e >> 16 & 255,
117
- e >> 8 & 255,
118
- e & 255,
119
- a >> 16 & 255,
120
- a >> 8 & 255,
121
- a & 255,
122
- c >> 8 & 255,
123
- c & 255,
124
- _ >> 16 & 255,
125
- _ >> 8 & 255,
126
- _ & 255
127
- );
128
- }
129
- };
130
- function f() {
131
- return i = (i + 1) % 16777215;
132
- }
133
- function E(e, _) {
134
- return _ = _.toString(16), _.length === e ? _ : "00000000".substring(_.length, e) + _;
135
- }
136
- var h = Symbol && Symbol.for && Symbol.for("nodejs.util.inspect.custom") || "inspect";
137
- n.prototype[h] = function() {
138
- return "ObjectID(" + this + ")";
139
- };
140
- n.prototype.toJSON = n.prototype.toHexString;
141
- n.prototype.toString = n.prototype.toHexString;
142
- const k = /* @__PURE__ */ l(g);
143
- export {
144
- k as O
145
- };