@feedmepos/mf-connect 0.1.98-beta.7 → 0.1.98-beta.71

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 (152) hide show
  1. package/dist/{App-BonFFUVJ.js → App-B-Onur9k.js} +812 -666
  2. package/dist/{AuditLogs-CaQisyMC.js → AuditLogs-BnEeKG1C.js} +14 -13
  3. package/dist/{Bin-Mu8gAiHw.js → Bin-BH9_nATR.js} +8 -8
  4. package/dist/Broadcast-Gt2ZLLpZ.js +302 -0
  5. package/dist/CampaignAnalytic-BT6zTgNk.js +1830 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BoLZVrCU.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-nNLLEzii.js} +6 -5
  7. package/dist/Card-dD52oor7.js +1084 -0
  8. package/dist/{Collections-CByXxRW_.js → Collections-7bwYNl3M.js} +14 -13
  9. package/dist/Credit-qZdlqXqR.js +286 -0
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-DeNn_k19.js +53 -0
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C09W9Qja.js +4213 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BXsAX1Xa.js → EffectSheet.vue_vue_type_style_index_0_lang-Bz1HRBMa.js} +35 -35
  13. package/dist/{Experience-B7J-aqPK.js → Experience-CAaWgWXP.js} +112 -86
  14. package/dist/{FileSaver.min-D_F_MSZt.js → FileSaver.min-BpfY6VnX.js} +1 -1
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
  16. package/dist/Game-fhrbFb_5.js +356 -0
  17. package/dist/GiftCardSetup-CTwmNKim.js +736 -0
  18. package/dist/{Grab-C45MmlD9.js → Grab-BnPfb92x.js} +33 -32
  19. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CPPcB3PC.js → ImageInput.vue_vue_type_script_setup_true_lang-BySju1oT.js} +1 -1
  20. package/dist/{Index-vQ6uP49O.js → Index-DRwvmm_j.js} +10 -10
  21. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Cj3hN3tg.js → LocationPicker.vue_vue_type_script_setup_true_lang-Ya4r9NNE.js} +1 -1
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DU9eIein.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CDwtqqLQ.js} +1 -1
  23. package/dist/LoyaltyDashboard-8jn6SIWo.js +2865 -0
  24. package/dist/MainLayout-Bf42AcB1.js +143 -0
  25. package/dist/{Marketing-B6xMdQvW.js → Marketing-DruTMjiR.js} +7 -6
  26. package/dist/{MarketingMaterialEdit-0cZN4bek.js → MarketingMaterialEdit-moEHd_gP.js} +15 -14
  27. package/dist/Member-C9VTQqIm.js +654 -0
  28. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DEsVSWmv.js +1279 -0
  29. package/dist/MemberImportHistory-DZVwya9v.js +187 -0
  30. package/dist/MemberList-KusIfy1u.js +334 -0
  31. package/dist/{MemberTransactions-Bg-ziZy8.js → MemberTransactions-msyjdzlI.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-jbDJkbZh.js → MessageInput.vue_vue_type_script_setup_true_lang-DbV-m3cC.js} +5928 -5644
  33. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-1DYGpJnD.js +40 -0
  34. package/dist/Mission-CUUxpBUF.js +360 -0
  35. package/dist/{Overview-nsyJGSCq.js → Overview-C9jyKXHX.js} +21 -20
  36. package/dist/Overview-CYKoF8Hp.js +1316 -0
  37. package/dist/Point-CPpQ07yp.js +288 -0
  38. package/dist/Promotion-CJ95m9Qb.js +423 -0
  39. package/dist/{Queue-Dkipt6fw.js → Queue-CX39ILh_.js} +14 -13
  40. package/dist/{Record-BFqx6vM-.js → Record-6I0qyXB5.js} +9 -9
  41. package/dist/Review-DoWu2XNT.js +45 -0
  42. package/dist/ReviewFacebookCallback-Co-5TnI7.js +238 -0
  43. package/dist/ReviewGoogleCallback-Ca7ZuMcF.js +213 -0
  44. package/dist/{Reward-DjFEE7I_.js → Reward-Cx_N6qBJ.js} +35 -35
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BzZ6VH80.js → RewardGroup.vue_vue_type_script_setup_true_lang-Cn5Yp37p.js} +14 -13
  46. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-A9jQX4jt.js → RuleGroup.vue_vue_type_script_setup_true_lang-M0c67Dyl.js} +196 -186
  47. package/dist/{Segment-BAjdUfZ6.js → Segment-Bx0EW966.js} +275 -276
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CAQPFzRH.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-ahvrEUGa.js} +37 -36
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Gkz8jhES.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-C7zSfZdl.js} +4 -4
  50. package/dist/{Setting-BK7y0XC-.js → Setting-DzEK3dWj.js} +14 -14
  51. package/dist/{SettingAdvertisements-DfQ645xr.js → SettingAdvertisements-BNALbI88.js} +12 -12
  52. package/dist/Settings-Cw85-xzq.js +230 -0
  53. package/dist/Store-BSqW1gwf.js +2612 -0
  54. package/dist/{StoreRewards-usHKOGmB.js → StoreRewards-CJXnS8Qf.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-C6tUwHEj.js +1329 -0
  56. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DrcWUZuR.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-iylphGuV.js} +2 -2
  57. package/dist/{Tier-BF3V430O.js → Tier-DfitNxp2.js} +2580 -754
  58. package/dist/{Title-DwPuqKfJ.js → Title-QCbtOvKB.js} +39 -37
  59. package/dist/Transaction-dOCzlidD.js +45 -0
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DToNRTJS.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Be5X1C-Y.js} +26 -26
  61. package/dist/{Voucher-DnhVIl_o.js → Voucher-BfoCDwjg.js} +156 -133
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Btb3UZCn.js → VoucherEditor.vue_vue_type_script_setup_true_lang-0EIYoZ0F.js} +118 -124
  63. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-EFUW9DMY.js → ZodTextField.vue_vue_type_script_setup_true_lang-UdStgKbX.js} +2 -2
  64. package/dist/{app-i3r-6ZVm.js → app-BxTElIm-.js} +45168 -37577
  65. package/dist/app.js +1 -1
  66. package/dist/base.export-BmUK8hMh.js +75 -0
  67. package/dist/{business-i0Gxk7gG.js → business-DjAiT8tR.js} +5 -5
  68. package/dist/campaign-DlR3KF9m.js +368 -0
  69. package/dist/campaign-tAmQNoq7.js +100 -0
  70. package/dist/{campaign.enum-CbUTfxek.js → campaign.enum-BjwEQd11.js} +1 -1
  71. package/dist/{campaign.fn-BjHSIDd1.js → campaign.fn-C6kWWIQx.js} +53 -53
  72. package/dist/{collectible.enum-DN7E_kHg.js → collectible.enum-BrtXpT9S.js} +1 -1
  73. package/dist/collection.fn-CDhfM3Eq.js +26 -0
  74. package/dist/currency-10nX5QnT.js +7 -0
  75. package/dist/{duplicateCampaign-DmdJQEIA.js → duplicateCampaign-6oMZOvfM.js} +11 -11
  76. package/dist/{effect-DM4AzeQl.js → effect-T4YzuTc5.js} +1 -1
  77. package/dist/{email-addresses-BlqVJhwZ.js → email-addresses-BjODnJMM.js} +209 -201
  78. package/dist/google-C3S8u0mT.js +4 -0
  79. package/dist/{helper-CkdISSVP.js → helper-BCl5r5yZ.js} +1 -1
  80. package/dist/{index-DgzNGQgE.js → index-B9ZMIUMa.js} +2083 -2559
  81. package/dist/{index-CB7ytKOE.js → index-BBsK7TUw.js} +1588 -1522
  82. package/dist/index-BQk6zTgf.js +32437 -0
  83. package/dist/index-Bd4clHfr.js +901 -0
  84. package/dist/index-BeVWchv7.js +14550 -0
  85. package/dist/index-Bht1Z11w.js +72 -0
  86. package/dist/{index-FD50UHqf.js → index-BiolIgqR.js} +105 -123
  87. package/dist/{index-Cl8t41Sk.js → index-BxU--5J5.js} +5 -5
  88. package/dist/index-Bz6oSli7.js +151 -0
  89. package/dist/index-C5IfNJUl.js +53 -0
  90. package/dist/{index-BWsj6lCJ.js → index-CRvUvCMA.js} +14 -14
  91. package/dist/{index-B6xi1soU.js → index-CnaQt4Pn.js} +1 -1
  92. package/dist/{index-4EtrCy_K.js → index-Ctja--IE.js} +4 -4
  93. package/dist/{index-D6qeYVNz.js → index-D8rGhchh.js} +1 -1
  94. package/dist/{index-BrboOmPq.js → index-DJdTDF9C.js} +347 -216
  95. package/dist/index-DXiJa8Cw.js +137 -0
  96. package/dist/{index-CxdLExX0.js → index-DeQKLilv.js} +24 -9
  97. package/dist/{index-vI-ndGu_.js → index-DhtKt4OL.js} +5 -5
  98. package/dist/{index.esm2017-BX5CyKoc.js → index.esm2017-CEOegJjn.js} +132 -132
  99. package/dist/{loading-DTKDhqew.js → loading-Dx4SCvZY.js} +1 -1
  100. package/dist/{lodash-CCPBsqhe.js → lodash-Dq8OKCKK.js} +1 -1
  101. package/dist/member-import-DX-jn2uk.js +187 -0
  102. package/dist/membership-CltAa-gH.js +274 -0
  103. package/dist/{money-wMK3QkZ5.js → money-DsaAjJTI.js} +1 -1
  104. package/dist/{number-DjKVlWn0.js → number-DmhHKYgY.js} +1 -1
  105. package/dist/objectid-BdNv-dZX.js +145 -0
  106. package/dist/{plugins-D25PaNJk.js → plugins-BFKVM3uC.js} +13 -12
  107. package/dist/remy-Qz_pNsUS.js +13 -0
  108. package/dist/{reward-E63jqJHm.js → reward--SjvIeyy.js} +1 -1
  109. package/dist/{rule-RVvPtAnk.js → rule-CAKdNobZ.js} +335 -275
  110. package/dist/style.css +1 -1
  111. package/dist/{template-zNxOQaqe.js → template-Cfxc5eM8.js} +6 -6
  112. package/dist/timezone-D2b-V5XD.js +20 -0
  113. package/dist/transaction.fn-B5mLY7bz.js +71 -0
  114. package/dist/{trigger-BXV02FhP.js → trigger-DvYcjRBZ.js} +17 -17
  115. package/dist/useMarketingMaterialActions-DtqnjMSt.js +96 -0
  116. package/dist/{usePagination-BPcPhEnp.js → usePagination-DKX24g31.js} +1 -1
  117. package/dist/{user-Bd8S7R5u.js → user-fWb1NxGO.js} +1 -1
  118. package/dist/vue-i18n-wJReAVJw.js +2365 -0
  119. package/dist/{xlsx-_tQC9Ezf.js → xlsx-Mthhu4JR.js} +440 -440
  120. package/dist/{zod-C1j2GLZP.js → zod-CVpVUgBZ.js} +1 -1
  121. package/package.json +10 -6
  122. package/dist/Broadcast-Cy-i-WOT.js +0 -266
  123. package/dist/Card-f2XOtWxp.js +0 -910
  124. package/dist/Credit-CcZF4aQS.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-C7KZ8GMx.js +0 -3377
  127. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  128. package/dist/Game-CUW7NeVG.js +0 -330
  129. package/dist/LoyaltyDashboard-GqyUwvXz.js +0 -1082
  130. package/dist/MainLayout-R5NxIBR-.js +0 -41
  131. package/dist/Member-CC5F6Bmz.js +0 -280
  132. package/dist/MemberList-Cq4zxopX.js +0 -1601
  133. package/dist/Mission-DcCZ6tAG.js +0 -334
  134. package/dist/Point-D1vLd5hL.js +0 -262
  135. package/dist/Promotion-Cv7MW5RJ.js +0 -397
  136. package/dist/Review-CKhakUMe.js +0 -1123
  137. package/dist/ReviewFacebookCallback-xgRpXQAg.js +0 -243
  138. package/dist/ReviewGoogleCallback-Cqi_43qi.js +0 -208
  139. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-DDqK4kV1.js +0 -181
  140. package/dist/Store-uTRQ6KbC.js +0 -1996
  141. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Bb2sTsuA.js +0 -1130
  142. package/dist/Transaction-CnTEfMGU.js +0 -39
  143. package/dist/campaign-CbMlARNI.js +0 -219
  144. package/dist/campaign-f7FT91GR.js +0 -277
  145. package/dist/export-DQR-0lmK.js +0 -97
  146. package/dist/index-COrXX9MR.js +0 -52
  147. package/dist/index-CWiaP-aV.js +0 -28900
  148. package/dist/index-jVfDVEtz.js +0 -85
  149. package/dist/membership-rifuatxU.js +0 -255
  150. package/dist/objectid-DjpWkCxH.js +0 -145
  151. package/dist/useMarketingMaterialActions-5TFNqZVo.js +0 -107
  152. package/dist/vue-i18n-CgMK-TaC.js +0 -2365
@@ -1,85 +0,0 @@
1
- import { g as n, S as w, u as _, b as y } from "./index-CWiaP-aV.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,255 +0,0 @@
1
- import { components as B } from "@feedmepos/ui-library";
2
- import { F as i } from "./collectible.enum-DN7E_kHg.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-CxdLExX0.js";
6
- import { g as o, u as V } from "./index-CWiaP-aV.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-i3r-6ZVm.js";
2
- var o = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_791ca23f-c5e7-4146-a6d3-61e980b37bdd", 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_791ca23f-c5e7-4146-a6d3-61e980b37bdd", 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: "1834", ACTIONS_ORCHESTRATION_ID: "521356b6-317a-44ae-ad7d-51f148aa00b0.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", GITHUB_ARTIFACTS: "/home/runner/work/_temp/_runner_file_commands/artifacts_791ca23f-c5e7-4146-a6d3-61e980b37bdd", 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:12816", 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: "29894378546", 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: "669ca507ea69fbd88ae66fd1b75c6f6ab536c3ff", 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_48ced2a4-23ca-414e-9e13-30e40d2f6bfe", INVOCATION_ID: "1b457713cb7d4d12a70b8a9e61ad4b51", 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: "268", 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 1000094419", 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.7", 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: "669ca507ea69fbd88ae66fd1b75c6f6ab536c3ff", 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_791ca23f-c5e7-4146-a6d3-61e980b37bdd", 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_791ca23f-c5e7-4146-a6d3-61e980b37bdd", 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", GITHUB_ARTIFACTS_LIST: "/home/runner/work/_temp/_runner_file_commands/artifacts_list_791ca23f-c5e7-4146-a6d3-61e980b37bdd", 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_791ca23f-c5e7-4146-a6d3-61e980b37bdd", 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), d = (typeof o > "u" || typeof o.pid != "number" ? Math.floor(Math.random() * 1e5) : o.pid) % 65535, c = (() => {
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" && c && (e.id instanceof c || 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
- d >> 8 & 255,
123
- d & 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 T = /* @__PURE__ */ l(g);
143
- export {
144
- T as O
145
- };
@@ -1,107 +0,0 @@
1
- import { S as o, g as c, b as w } from "./index-CWiaP-aV.js";
2
- import { useAppStore as h, initializeRemyChat as y } from "@feedmepos/mf-remy-panel";
3
- import { onMounted as k } from "vue";
4
- import { u as I } from "./vue-i18n-CgMK-TaC.js";
5
- import { useSnackbar as M } from "@feedmepos/ui-library";
6
- import { c as v } from "./plugins-D25PaNJk.js";
7
- const l = (e) => w(`businesses/${e}/marketing-materials`), j = {
8
- async createMarketingMaterial(e) {
9
- const t = o.getBusinessId();
10
- if (!t) throw new Error("Invalid business ID");
11
- return c(
12
- await l(t).post("", e)
13
- );
14
- },
15
- async getMarketingMaterial(e) {
16
- const t = o.getBusinessId();
17
- if (!t) throw new Error("Invalid business ID");
18
- return c(
19
- await l(t).get(`/${e}`)
20
- );
21
- },
22
- async listMarketingMaterials(e = null, t = 20) {
23
- const r = o.getBusinessId();
24
- if (!r) throw new Error("Invalid business ID");
25
- return c(
26
- await l(r).get("", {
27
- params: { ...e ? { cursor: e } : {}, limit: t }
28
- })
29
- );
30
- },
31
- async updateMarketingMaterial(e, t) {
32
- const r = o.getBusinessId();
33
- if (!r) throw new Error("Invalid business ID");
34
- return c(
35
- await l(r).patch(`/${e}`, t)
36
- );
37
- }
38
- };
39
- let g = null;
40
- function B() {
41
- const e = h();
42
- async function t() {
43
- g || (g = y()), await g;
44
- }
45
- return k(t), Object.assign(e);
46
- }
47
- function F() {
48
- const { t: e } = I(), t = M();
49
- async function r(n) {
50
- if (!(n != null && n.imageUrl)) return;
51
- const { headline: i, caption: u, imageUrl: s } = n;
52
- if (!navigator.share) {
53
- t.open({
54
- message: e("connect.marketing.actions.webShareNotSupported"),
55
- type: "error"
56
- });
57
- return;
58
- }
59
- try {
60
- const a = {
61
- title: i ?? void 0,
62
- text: u ?? void 0
63
- };
64
- if (navigator.canShare)
65
- try {
66
- const f = await (await fetch(s, { mode: "cors", cache: "no-store" })).blob(), p = [new File([f], "marketing-material.jpg", {
67
- type: f.type || "image/jpeg"
68
- })];
69
- navigator.canShare({ files: p }) ? a.files = p : a.url = s;
70
- } catch (m) {
71
- console.error("Failed to fetch image for sharing:", m), a.url = s;
72
- }
73
- else
74
- a.url = s;
75
- await navigator.share(a);
76
- } catch (a) {
77
- a.name !== "AbortError" && t.open({
78
- message: e("connect.marketing.actions.failedToShare", { message: a.message }),
79
- type: "error"
80
- });
81
- }
82
- }
83
- async function d(n) {
84
- if (n)
85
- try {
86
- const u = await (await fetch(n, { mode: "cors", cache: "no-store" })).blob(), s = URL.createObjectURL(u), a = document.createElement("a");
87
- a.href = s, a.download = "marketing-material", a.click(), URL.revokeObjectURL(s);
88
- } catch (i) {
89
- console.error("Failed to download image:", i), window.open(n, "_blank");
90
- }
91
- }
92
- async function b(n) {
93
- n && await v(n, {
94
- successMessage: e("connect.marketing.actions.imageLinkCopied")
95
- });
96
- }
97
- return {
98
- shareMaterial: r,
99
- downloadMaterialImage: d,
100
- copyMaterialLink: b
101
- };
102
- }
103
- export {
104
- F as a,
105
- j as m,
106
- B as u
107
- };