@feedmepos/mf-connect 0.1.98-beta.5 → 0.1.98-beta.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/dist/{App-D_4snNiy.js → App-XRTSw_F1.js} +812 -666
  2. package/dist/{AuditLogs-KQU1O9_9.js → AuditLogs-CgsvZ-7X.js} +12 -11
  3. package/dist/{Bin-gp_uuNrE.js → Bin-CDwE00an.js} +8 -8
  4. package/dist/{Broadcast-CbBaOlnn.js → Broadcast-BOh56jYG.js} +39 -36
  5. package/dist/CampaignAnalytic-DZkCSGRF.js +1826 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-2bro245w.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DqYRlwCj.js} +7 -5
  7. package/dist/Card-DZ01wmGw.js +1060 -0
  8. package/dist/{Collections-CKeOHYZ4.js → Collections-CaIWOlsO.js} +14 -13
  9. package/dist/Credit-C8TM9q2f.js +286 -0
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bh2O4xdy.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-1UH_Ie4E.js} +34 -30
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BIdb46VQ.js → EffectSheet.vue_vue_type_style_index_0_lang-CVqMqYhi.js} +6 -6
  12. package/dist/{Experience-B-c5SMns.js → Experience-Cy0K8E9P.js} +112 -86
  13. package/dist/{FileSaver.min-DWnvGKCg.js → FileSaver.min-ClaVGDxU.js} +1 -1
  14. package/dist/Game-DxUNIK1H.js +356 -0
  15. package/dist/GiftCardSetup-DPuRb-29.js +662 -0
  16. package/dist/{Grab-BLC4GcgE.js → Grab-VSlV6K7E.js} +32 -31
  17. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-l2CmQ0nR.js → ImageInput.vue_vue_type_script_setup_true_lang-BJQzLNY1.js} +1 -1
  18. package/dist/{Index-DmAG2skd.js → Index-D_xXXqKL.js} +10 -10
  19. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-UmynGH00.js → LocationPicker.vue_vue_type_script_setup_true_lang-BJl8_bKp.js} +1 -1
  20. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BThofu65.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BOaXZf3X.js} +1 -1
  21. package/dist/LoyaltyDashboard-CWPV6CHM.js +2218 -0
  22. package/dist/MainLayout-CeA24f8v.js +143 -0
  23. package/dist/{Marketing-DmY25Ri9.js → Marketing-Bw437-ze.js} +7 -6
  24. package/dist/{MarketingMaterialEdit-DP9pba44.js → MarketingMaterialEdit-x6JdhQDh.js} +15 -14
  25. package/dist/Member-zLjxWmJf.js +626 -0
  26. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DM9c_Ow1.js +1287 -0
  27. package/dist/MemberImportHistory-BvvIfn9o.js +187 -0
  28. package/dist/MemberList-DqqAduX1.js +336 -0
  29. package/dist/{MemberTransactions-XRvUfeFB.js → MemberTransactions-j4nWa843.js} +1 -1
  30. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-g7v3ZoUS.js → MessageInput.vue_vue_type_script_setup_true_lang-z9lYA425.js} +5434 -5279
  31. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +38 -0
  32. package/dist/Mission-CPXEtNBm.js +360 -0
  33. package/dist/Overview-Bel0iCe8.js +1316 -0
  34. package/dist/{Overview-DgmVlUVi.js → Overview-DySRWqyr.js} +21 -20
  35. package/dist/Point-ClovAwUI.js +288 -0
  36. package/dist/Promotion-BiiruWmm.js +423 -0
  37. package/dist/{Queue-DxtykwmI.js → Queue-DY9zRWWp.js} +13 -12
  38. package/dist/{Record-fLCi2Oyh.js → Record-BJ6M5bXk.js} +9 -9
  39. package/dist/Review-Cyi-vRyc.js +45 -0
  40. package/dist/ReviewFacebookCallback-CdSAfiJ7.js +238 -0
  41. package/dist/ReviewGoogleCallback-COen72wx.js +213 -0
  42. package/dist/{Reward-BbdiCAiO.js → Reward-B3--b_8h.js} +35 -35
  43. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Cfjtk46d.js → RewardGroup.vue_vue_type_script_setup_true_lang-DCmSt5io.js} +14 -13
  44. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CYEBeuQQ.js → RuleGroup.vue_vue_type_script_setup_true_lang-F2B47wb8.js} +17 -15
  45. package/dist/{Segment-EkGcR2jo.js → Segment-DydGccSi.js} +31 -29
  46. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DND48RGu.js → SelectItems.vue_vue_type_script_setup_true_lang-Bf_1Lw5R.js} +2 -2
  47. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-sbYDSAFK.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BXrHY1DU.js} +37 -36
  48. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D8RmLtRC.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DhitF847.js} +4 -4
  49. package/dist/{Setting-D3swsR6P.js → Setting-DgXgWy7W.js} +14 -14
  50. package/dist/{SettingAdvertisements-BjhTK11W.js → SettingAdvertisements-TMTfvGdU.js} +12 -12
  51. package/dist/Settings-b3K8fH29.js +230 -0
  52. package/dist/Store-jAGYe4R6.js +2615 -0
  53. package/dist/{StoreRewards-CyrWuwLi.js → StoreRewards-23IXon0V.js} +15 -15
  54. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BUTYIDGo.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BroaESpx.js} +400 -455
  55. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DJQ022R4.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-gnjnQhXP.js} +2 -2
  56. package/dist/{Tier-DrPqr8_e.js → Tier-B_ixl0ZY.js} +44 -41
  57. package/dist/{Title-CaZtz98p.js → Title-CUc90kzn.js} +49 -46
  58. package/dist/Transaction-BNVEjOC4.js +45 -0
  59. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BsBqk0Rs.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CkbKlnrt.js} +6 -6
  60. package/dist/{Voucher-BZcr4D0y.js → Voucher-eALK6zg9.js} +156 -133
  61. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DXQF3LZK.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CEsMYQ-L.js} +12 -12
  62. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DI-tCQeb.js → ZodTextField.vue_vue_type_script_setup_true_lang-BEAJ5tb7.js} +2 -2
  63. package/dist/{app-B0vutEt5.js → app-I3z-EN92.js} +7269 -5971
  64. package/dist/app.js +1 -1
  65. package/dist/{business-IZLJeLD-.js → business-D_ksG_j8.js} +5 -5
  66. package/dist/campaign-BKIxUyuf.js +100 -0
  67. package/dist/{campaign-BPmgteCL.js → campaign-IZaOdcTr.js} +74 -96
  68. package/dist/{campaign.enum-BCdlLIt6.js → campaign.enum-k3u4N6yI.js} +1 -1
  69. package/dist/{campaign.fn-BIFWlQvS.js → campaign.fn-DeQTMPoH.js} +116 -116
  70. package/dist/{collectible.enum-CiuAWn6_.js → collectible.enum-CSQwvFfW.js} +1 -1
  71. package/dist/collection.fn-BtWAPYLz.js +26 -0
  72. package/dist/{duplicateCampaign-BouCkl9n.js → duplicateCampaign-BWdWO-Jv.js} +2 -2
  73. package/dist/{effect-Cov_Xrar.js → effect-BBSG58dq.js} +1 -1
  74. package/dist/{email-addresses-BiopO9xi.js → email-addresses-CJg5ttqC.js} +2 -2
  75. package/dist/{export-DAPTBdHb.js → export-BkjhRe8g.js} +3 -3
  76. package/dist/google-C3S8u0mT.js +4 -0
  77. package/dist/{helper-ClFo4nAk.js → helper-DsSVIIP1.js} +1 -1
  78. package/dist/index-38Rnr26K.js +53 -0
  79. package/dist/{index-N5t83KgP.js → index-BbBies0f.js} +1902 -2559
  80. package/dist/index-BmAoVlN8.js +151 -0
  81. package/dist/{index-BZvvCPbP.js → index-BsAuvfaE.js} +5 -4
  82. package/dist/{index-Kllafq_o.js → index-C-phzlda.js} +105 -123
  83. package/dist/{index-CD_3hR1g.js → index-C0qgi7n9.js} +1 -1
  84. package/dist/index-CPnv5m8Z.js +137 -0
  85. package/dist/{index-BeK9AXvx.js → index-CV1kOec1.js} +1 -1
  86. package/dist/{index-CmgQZKyo.js → index-Ckr8ODhI.js} +1 -1
  87. package/dist/{index-DTSGYksR.js → index-CtF4Z_fd.js} +281 -372
  88. package/dist/{index-k9DTOKkN.js → index-CtXqXihA.js} +4 -1
  89. package/dist/index-DCz9v1dd.js +51 -0
  90. package/dist/index-DdV1nasM.js +896 -0
  91. package/dist/index-ZPKkCZxS.js +72 -0
  92. package/dist/{index-k0hHOUBO.js → index-blX95L2R.js} +579 -571
  93. package/dist/{index-Bm5E2iD6.js → index-f0JDFqAr.js} +14 -14
  94. package/dist/{index-pKdJ8574.js → index-iagCxZ13.js} +5 -5
  95. package/dist/{index-C_AuIVay.js → index-wsdEChJx.js} +5 -5
  96. package/dist/{index.esm2017-ByFUnorr.js → index.esm2017-BMC-Q91P.js} +164 -164
  97. package/dist/{loading-t4ygCIAa.js → loading-3obmcgAf.js} +1 -1
  98. package/dist/{lodash-DwGVChOs.js → lodash-C69G7pFG.js} +1 -1
  99. package/dist/member-import-BxBe9NE7.js +187 -0
  100. package/dist/{membership-CMCTmRdh.js → membership-_XX1_j55.js} +3 -3
  101. package/dist/{money-MhQbdVIt.js → money-DZpYudCC.js} +1 -1
  102. package/dist/{number-klG94_wm.js → number-BbQQzzRA.js} +1 -1
  103. package/dist/objectid-kWi62XJQ.js +145 -0
  104. package/dist/{plugins-2py5EcqG.js → plugins-UfVjLlr4.js} +3 -3
  105. package/dist/remy-Qz_pNsUS.js +13 -0
  106. package/dist/{reward-CE9z-Us7.js → reward-1G2M5tgv.js} +1 -1
  107. package/dist/{rule-BKNHxNrQ.js → rule-DHHGjLt5.js} +3 -3
  108. package/dist/rule-builder-CgNmvg5o.js +126 -0
  109. package/dist/{template-C9yNa_0m.js → template-Ckva65hw.js} +6 -6
  110. package/dist/timezone-Ddve0ese.js +20 -0
  111. package/dist/transaction.fn-7n5XLxfA.js +64 -0
  112. package/dist/{trigger-Dk0tAyDv.js → trigger-F-XaDRpc.js} +14 -14
  113. package/dist/useMarketingMaterialActions-DIhnstdO.js +96 -0
  114. package/dist/{usePagination-cF1F_1NH.js → usePagination-C0TcC_Lo.js} +1 -1
  115. package/dist/{user-CNPPoxKh.js → user-DeuI7T2e.js} +1 -1
  116. package/dist/{vue-i18n-Bk_KpCO_.js → vue-i18n-DRrphfc1.js} +191 -191
  117. package/dist/{xlsx-D3muGzk7.js → xlsx-DaY_eyt1.js} +440 -440
  118. package/dist/{zod-D72USJGr.js → zod-BDdpK5Gp.js} +1 -1
  119. package/package.json +5 -3
  120. package/dist/Card-P7MqKEDT.js +0 -910
  121. package/dist/Credit-Dp5P2k79.js +0 -260
  122. package/dist/Game-CNSbh93g.js +0 -330
  123. package/dist/LoyaltyDashboard-Go9ClMrp.js +0 -1082
  124. package/dist/MainLayout-Dyw9Qqvh.js +0 -41
  125. package/dist/Member-DKXzaqlL.js +0 -280
  126. package/dist/MemberList-BJ5nI3Nz.js +0 -1601
  127. package/dist/Mission-BvHArY3W.js +0 -334
  128. package/dist/Point-BR0R03i6.js +0 -262
  129. package/dist/Promotion-DofFeR2N.js +0 -397
  130. package/dist/Review-7tFJOnrt.js +0 -1076
  131. package/dist/ReviewFacebookCallback-yl0w_vF9.js +0 -243
  132. package/dist/ReviewGoogleCallback-Dn_aF2ZD.js +0 -208
  133. package/dist/Store-U1jysb7b.js +0 -1996
  134. package/dist/Transaction-Bj6bSo8R.js +0 -39
  135. package/dist/campaign-Cxp-DOCG.js +0 -219
  136. package/dist/index-BQ8XZk2Y.js +0 -85
  137. package/dist/index-KmCk2ksK.js +0 -52
  138. package/dist/objectid-C4ak1ctJ.js +0 -145
  139. package/dist/useMarketingMaterialActions-BiXkdMcs.js +0 -107
@@ -1,39 +0,0 @@
1
- import { defineComponent as d, ref as f, resolveComponent as s, openBlock as t, createElementBlock as v, Fragment as b, createVNode as r, unref as o, createElementVNode as k, createBlock as l, KeepAlive as x, resolveDynamicComponent as m, createCommentVNode as F } from "vue";
2
- import { _ as g, a as y } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-BUTYIDGo.js";
3
- import { u as C } from "./vue-i18n-Bk_KpCO_.js";
4
- const T = { class: "px-24 flex flex-col gap-y-32 pb-24" }, P = /* @__PURE__ */ d({
5
- __name: "Transaction",
6
- setup(V) {
7
- const { t: n } = C(), a = [
8
- {
9
- label: n("connect.transaction.tabs.collection"),
10
- value: "collection"
11
- },
12
- {
13
- label: n("connect.transaction.tabs.store"),
14
- value: "store"
15
- }
16
- ], e = f(a[0]);
17
- return (B, c) => {
18
- const i = s("FmPageHead"), u = s("FmTabs");
19
- return t(), v(b, null, [
20
- r(i, {
21
- title: o(n)("connect.transaction.title")
22
- }, null, 8, ["title"]),
23
- k("div", T, [
24
- r(u, {
25
- "model-value": o(e).value,
26
- items: a,
27
- "onUpdate:modelValue": c[0] || (c[0] = (p) => e.value = a.find((_) => _.value === p))
28
- }, null, 8, ["model-value"]),
29
- (t(), l(x, null, [
30
- o(e).value == "collection" ? (t(), l(m(g), { key: 0 })) : o(e).value == "store" ? (t(), l(m(y), { key: 1 })) : F("", !0)
31
- ], 1024))
32
- ])
33
- ], 64);
34
- };
35
- }
36
- });
37
- export {
38
- P as default
39
- };
@@ -1,219 +0,0 @@
1
- import { defineStore as w } from "pinia";
2
- import { reactive as I, onMounted as b, ref as o } from "vue";
3
- import { g as a, S as l, b as d } from "./index-BZvvCPbP.js";
4
- const s = () => {
5
- const e = l.getBusinessId();
6
- if (!e) throw new Error("Invalid business ID");
7
- return d(`businesses/${e}/campaigns`, {
8
- // url: 'http://localhost:3000/portal/',
9
- });
10
- }, u = {
11
- async readAllGrouped(e) {
12
- const t = a(
13
- await s().get("grouped", { params: e })
14
- );
15
- return {
16
- meta: t.meta,
17
- resources: t.resources
18
- };
19
- },
20
- async readAll(e, t) {
21
- const n = a(
22
- await s().get("", {
23
- params: { ...e, ...t }
24
- })
25
- );
26
- return {
27
- meta: n.meta,
28
- resources: n.resources
29
- };
30
- },
31
- async readById(e) {
32
- return a(await s().get(`/${e}`));
33
- },
34
- async create(e) {
35
- return a(await s().post("", e));
36
- },
37
- async update(e, t) {
38
- return a(await s().put(e, t));
39
- },
40
- async delete(e) {
41
- return a(await s().delete(e));
42
- },
43
- async readCollectionsByCampaignId(e, t) {
44
- const n = a(
45
- await s().get(`/${e}/collections`, {
46
- params: t
47
- })
48
- );
49
- return {
50
- meta: n.meta,
51
- resources: n.resources
52
- };
53
- },
54
- async readTransactions(e) {
55
- return a(
56
- await s().get(
57
- `/${e}/collections/transactions`
58
- )
59
- );
60
- },
61
- async createCollectionByCampaignId(e, t) {
62
- return a(
63
- await s().post(`/${e}/collections`, t)
64
- );
65
- },
66
- async readGroups() {
67
- return a(await s().get("/groups")) ?? [];
68
- },
69
- async readStats(e) {
70
- return a(
71
- await s().get("/stats", { params: e })
72
- );
73
- },
74
- async createGroup(e) {
75
- return a(await s().post("/groups", e));
76
- },
77
- async updateGroup(e, t) {
78
- return a(
79
- await s().put(`/groups/${e}`, t)
80
- );
81
- },
82
- async deleteGroup(e) {
83
- return a(await s().delete(`/groups/${e}`));
84
- },
85
- async sendCollection(e, t) {
86
- return a(
87
- await s().post(
88
- `/${e}/collections/send`,
89
- t
90
- )
91
- );
92
- },
93
- async sendStamp(e, t) {
94
- return a(
95
- await s().post(
96
- `/${e}/collections/send-stamp`,
97
- t
98
- )
99
- );
100
- },
101
- async syncAllPromotion() {
102
- return a(await s().post("/promotion/sync"));
103
- },
104
- async readAllDeleted(e, t) {
105
- const n = a(
106
- await s().get("/bin", {
107
- params: { ...e, ...t }
108
- })
109
- );
110
- return {
111
- meta: n.meta,
112
- resources: n.resources
113
- };
114
- },
115
- async restore(e) {
116
- return a(
117
- await s().post(`/${e}/restore`)
118
- );
119
- },
120
- async getPromotionQueue() {
121
- return a(await s().get("/promotion/queue"));
122
- }
123
- }, p = () => {
124
- const e = l.getBusinessId();
125
- if (!e) throw new Error("Invalid business ID");
126
- return d(`businesses/${e}/campaigns`, {
127
- noIdRequired: !0
128
- });
129
- }, f = {
130
- async readAll() {
131
- return a(await p().get("templates"));
132
- },
133
- async readById(e) {
134
- return a(
135
- await p().get(`templates/${e}`)
136
- );
137
- }
138
- }, E = w("mf-connect-campaign", () => {
139
- const e = I({
140
- promotion: [],
141
- voucher: [],
142
- broadcast: [],
143
- experience: [],
144
- point: [],
145
- credit: [],
146
- token: [],
147
- mission: [],
148
- grab: [],
149
- all: []
150
- });
151
- b(() => {
152
- console.log("🔧 CampaignStore Installed");
153
- });
154
- const t = o([]), n = o([]), c = o([]);
155
- async function m(h) {
156
- const i = await u.readAll({
157
- limit: 1e3,
158
- skip: 0,
159
- sortBy: "_id",
160
- descending: !0
161
- });
162
- Object.keys(e).forEach((r) => {
163
- e[r] = [];
164
- }), e.all = i.resources.filter(
165
- (r) => r.type !== "MEMBERSHIP"
166
- );
167
- for (const r of i.resources)
168
- switch (r.type) {
169
- case "PROMOTION":
170
- e.promotion.push(r);
171
- break;
172
- case "VOUCHER":
173
- e.voucher.push(r), c.value.push(r);
174
- break;
175
- case "BROADCAST":
176
- ["SCHEDULE", "FEEDBACK"].includes(r.event.type) && e.broadcast.push(r);
177
- break;
178
- case "POINT":
179
- e.experience.push(r);
180
- break;
181
- case "COIN":
182
- e.point.push(r);
183
- break;
184
- case "CREDIT":
185
- e.credit.push(r);
186
- break;
187
- case "GAME":
188
- e.token.push(r);
189
- break;
190
- case "MISSION":
191
- e.mission.push(r);
192
- break;
193
- case "GRAB":
194
- e.grab.push(r);
195
- break;
196
- }
197
- }
198
- async function g() {
199
- n.value = await u.readGroups();
200
- }
201
- async function y() {
202
- t.value = await f.readAll();
203
- }
204
- return {
205
- // State
206
- campaigns: e,
207
- templates: t,
208
- groups: n,
209
- voucher: c,
210
- // Actions
211
- read: m,
212
- readGroups: g,
213
- readTemplates: y
214
- };
215
- });
216
- export {
217
- u as c,
218
- E as u
219
- };
@@ -1,85 +0,0 @@
1
- import { g as n, S as w, u as _, b as y } from "./index-BZvvCPbP.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-BZvvCPbP.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,145 +0,0 @@
1
- import { g as l } from "./app-B0vutEt5.js";
2
- var o = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_efd9b000-cc23-4dc0-a61b-26233f14b324", 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_efd9b000-cc23-4dc0-a61b-26233f14b324", 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: "1809", ACTIONS_ORCHESTRATION_ID: "b3872d2a-5265-46ac-8063-db2f23b90919.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:13403", 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: "29813557688", 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: "4e3f2195e151eca314082a3ebdee5e65bc1176c3", 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_0e1e5ec0-3a5b-4932-85ce-278ef41b7aeb", INVOCATION_ID: "b33137e8b5bd46d79aed3b0cbbb6fcdf", 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: "264", 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 1000093410", 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.5", 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: "4e3f2195e151eca314082a3ebdee5e65bc1176c3", 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_efd9b000-cc23-4dc0-a61b-26233f14b324", 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_efd9b000-cc23-4dc0-a61b-26233f14b324", 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_efd9b000-cc23-4dc0-a61b-26233f14b324", 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/" } }, i = Math.floor(Math.random() * 16777215), a = 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(f(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 _ = E();
114
- return String.fromCharCode(
115
- e >> 24 & 255,
116
- e >> 16 & 255,
117
- e >> 8 & 255,
118
- e & 255,
119
- i >> 16 & 255,
120
- i >> 8 & 255,
121
- i & 255,
122
- c >> 8 & 255,
123
- c & 255,
124
- _ >> 16 & 255,
125
- _ >> 8 & 255,
126
- _ & 255
127
- );
128
- }
129
- };
130
- function E() {
131
- return a = (a + 1) % 16777215;
132
- }
133
- function f(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
- };
@@ -1,107 +0,0 @@
1
- import { S as o, g as c, b as w } from "./index-BZvvCPbP.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-Bk_KpCO_.js";
5
- import { useSnackbar as M } from "@feedmepos/ui-library";
6
- import { c as v } from "./plugins-2py5EcqG.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
- };