@feedmepos/mf-connect 0.1.126-dev → 0.1.127-dev
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.
- package/dist/{App-B_Yp6cvN.js → App-CLrxVFgX.js} +10 -10
- package/dist/{AuditLogs-C1U17evK.js → AuditLogs-DYlfToAk.js} +13 -13
- package/dist/{Bin-CmIpEIwe.js → Bin-C0CugBW4.js} +8 -8
- package/dist/{Broadcast-DkV4BdU_.js → Broadcast-DhVQa_WW.js} +12 -12
- package/dist/{CampaignAnalytic-Dkwo_lpB.js → CampaignAnalytic-6jeG5U90.js} +97 -97
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Ch8Gblw6.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cxydrkof.js} +9 -9
- package/dist/{Card-DXCkG34M.js → Card-cpLj34Oy.js} +23 -23
- package/dist/{Collections-CybPfSO4.js → Collections-CdRpJuHO.js} +8 -8
- package/dist/{Credit-B-KUzWsX.js → Credit-E_N_yfnJ.js} +12 -12
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CWHYeYVD.js → DateRangeChip.vue_vue_type_script_setup_true_lang-Dq-2vUqT.js} +1 -1
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-C86llTFR.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CSXO2bYC.js} +1285 -1140
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-nMcH6y5e.js → EffectSheet.vue_vue_type_style_index_0_lang-BeQZjLIw.js} +6 -6
- package/dist/{Experience-Q2NHpa-V.js → Experience-D9i0ax4C.js} +13 -13
- package/dist/{FileSaver.min-CKw2rn-J.js → FileSaver.min-BOE2RBne.js} +1 -1
- package/dist/{Game-lZvkg04z.js → Game-CirwX_l1.js} +13 -13
- package/dist/{GiftCardSetup-CPRju80_.js → GiftCardSetup-DpJb_azW.js} +10 -10
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-Ci686UoB.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-ff6Nfvxe.js} +140 -128
- package/dist/{Goals-asGsUeVv.js → Goals-TejbPs-I.js} +4 -4
- package/dist/{Grab-BjFLSMpE.js → Grab-CeUX-LlF.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-nk87zPWH.js → ImageInput.vue_vue_type_script_setup_true_lang-CnZzRDGS.js} +1 -1
- package/dist/{Index-DIasPS4Y.js → Index-gqWBDZBN.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DkOn8p1v.js → LocationPicker.vue_vue_type_script_setup_true_lang-CzobgD7L.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BdSkxiP-.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DgeD1RQq.js} +1 -1
- package/dist/{LoyaltyDashboard-DlCsZ3YX.js → LoyaltyDashboard-R22oQHTd.js} +82 -82
- package/dist/{MainLayout-DLObnTAA.js → MainLayout-pJBEBaM-.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-DigSZKt1.js → MainLayout.vue_vue_type_script_setup_true_lang-IX_utv2Z.js} +3 -3
- package/dist/{Marketing-JflPW-w9.js → Marketing-5gMwO1jV.js} +4 -4
- package/dist/{MarketingMaterialEdit-fSAB3YVb.js → MarketingMaterialEdit-BaHNX_qE.js} +6 -6
- package/dist/{Member-CzNahXTj.js → Member-Cd0oraEq.js} +7 -7
- package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DzyM1fW_.js +1322 -0
- package/dist/{MemberImportHistory--r_A_2Es.js → MemberImportHistory-C_RkY3fg.js} +7 -7
- package/dist/{MemberList-CQZQ4sN8.js → MemberList-CJK1akUC.js} +14 -14
- package/dist/{MemberTransactions-BPg9JaUA.js → MemberTransactions-DP6schuy.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BhIFChx-.js → MessageInput.vue_vue_type_script_setup_true_lang-BaivunRx.js} +10 -10
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CdGSNqEp.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DOdYyPp2.js} +1 -1
- package/dist/{Mission-CYCB3YQc.js → Mission-DJ40IcG9.js} +14 -14
- package/dist/{Overview-B5ylMBHT.js → Overview-CaQlLSBg.js} +4 -4
- package/dist/{Overview-DuNuUYYq.js → Overview-DXHjNmIO.js} +21 -21
- package/dist/{Point-DG-Uwj25.js → Point-D0Qqmgai.js} +14 -14
- package/dist/{Promotion-DqxBQ1yO.js → Promotion-CQU2-tpG.js} +14 -14
- package/dist/{Queue-Cy8LGt_Y.js → Queue-B-Uki3qh.js} +13 -13
- package/dist/{Record-CzXbu41w.js → Record-BvQ0nVja.js} +9 -9
- package/dist/{Review-7VL6gIqp.js → Review-DMfBPU_D.js} +2 -2
- package/dist/{ReviewFacebookCallback-BwzuPmrz.js → ReviewFacebookCallback-Bq6JQ7LR.js} +5 -5
- package/dist/{ReviewGoogleCallback-1JXR_f5O.js → ReviewGoogleCallback-Bg9PFxog.js} +5 -5
- package/dist/{Reward-BKhUDEu3.js → Reward-CNC0z98e.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DjjCytWF.js → RewardGroup.vue_vue_type_script_setup_true_lang-DXr-5wJE.js} +14 -14
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Vg7pRGIz.js → RuleGroup.vue_vue_type_script_setup_true_lang-OznhirAU.js} +15 -15
- package/dist/{Segment-DdHDJhaS.js → Segment-V0ZQJkN-.js} +27 -27
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-9kGUkHMi.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BmFp2pst.js} +15 -15
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DeFw0px7.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-C0IbEZMG.js} +4 -4
- package/dist/{Setting-DZKGXw-i.js → Setting-DCb6IIrk.js} +15 -15
- package/dist/{SettingAdvertisements-BBNs8tCw.js → SettingAdvertisements-Dc9XfzVl.js} +12 -12
- package/dist/{Settings-9v0hnBJZ.js → Settings-BIjIfmFI.js} +5 -5
- package/dist/{Store-C8IlE4IH.js → Store-DkoB_5IF.js} +27 -27
- package/dist/{StoreRewards-DWygRLR1.js → StoreRewards-a4ujLMfY.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CeYYws6P.js → StoreTransactions.vue_vue_type_script_setup_true_lang-UbMY0RzG.js} +25 -25
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BiN3uRJ_.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BWjb1wHV.js} +2 -2
- package/dist/{Tier-7RoxGHsP.js → Tier-1WKuUirS.js} +28 -28
- package/dist/{Title-0q2Z4HIe.js → Title-CznZg4jL.js} +23 -23
- package/dist/{Transaction-CFasERdg.js → Transaction-DBRQDmA3.js} +2 -2
- package/dist/{Upselling-DM9R6pYw.js → Upselling-CjZvUUqn.js} +3 -3
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BDjwcgnc.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DS4hdSE9.js} +6 -6
- package/dist/{Voucher-BkzW2hVV.js → Voucher-Di6VhoSM.js} +18 -18
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DaE4xa3x.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BjSzCnBw.js} +12 -12
- package/dist/{WhatsappAccount-C3WpDF9O.js → WhatsappAccount-DdXadlHI.js} +6 -6
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BxC_3h52.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-Cnlvi-GG.js} +1 -1
- package/dist/WhatsappBot-DwhQmZLJ.js +882 -0
- package/dist/{WhatsappBotLogs--KskC32Z.js → WhatsappBotLogs-BAglKUAZ.js} +66 -66
- package/dist/{WhatsappBotSettings-Dns_PqVE.js → WhatsappBotSettings-DslJTj2X.js} +5 -5
- package/dist/{WhatsappLayout-NIrFGbId.js → WhatsappLayout-14847AOz.js} +3 -3
- package/dist/{WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-BfD5hHc7.js → WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-otzgv6Jh.js} +3 -3
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CJGxy7gf.js → ZodTextField.vue_vue_type_script_setup_true_lang-BEY-LOVu.js} +2 -2
- package/dist/{app-B9nLnoBt.js → app-KbxCI4gY.js} +107 -91
- package/dist/app.js +1 -1
- package/dist/{base.export-CBzNea0v.js → base.export-DH8OxNrx.js} +2 -2
- package/dist/business-DuKNr9P7.js +83 -0
- package/dist/{campaign-BDCLKFwN.js → campaign-DR5xHhgA.js} +2 -2
- package/dist/{campaign-B6nTwt17.js → campaign-Ddv-RZgo.js} +113 -99
- package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-DsaSpHDQ.js} +1 -1
- package/dist/{campaign.fn-Ck1t5C1T.js → campaign.fn-CJlEovlZ.js} +142 -142
- package/dist/{collectible.enum-Liy2wH3s.js → collectible.enum-CDHT9uk3.js} +1 -1
- package/dist/{collection.fn-CDna_VLD.js → collection.fn-DTZs-hUX.js} +2 -2
- package/dist/{currency-Baum67Wz.js → currency-1-Yhpyv5.js} +1 -1
- package/dist/{duplicateCampaign-BwrMZgaV.js → duplicateCampaign-BncSxYSg.js} +2 -2
- package/dist/{effect-CeJbflOK.js → effect-TTD5--LN.js} +1 -1
- package/dist/{email-addresses-Y3vF73J0.js → email-addresses-pxXp67Al.js} +2 -2
- package/dist/{feature-flag-zn6Ql9tv.js → feature-flag-CFVZl4ed.js} +1 -1
- package/dist/{helper-DZvnn-yx.js → helper-BC_Cl5VR.js} +1 -1
- package/dist/{index-Da0-7h2j.js → index-42Wl_5UE.js} +1 -1
- package/dist/{index-BYUEPfbP.js → index-BRl7Besd.js} +2 -2
- package/dist/{index-CPi3Qwmj.js → index-BxUMqeaY.js} +4 -4
- package/dist/{index-DHNhIloU.js → index-ByFFDLTo.js} +1 -1
- package/dist/{index-njg4JLa-.js → index-CBKbnJRo.js} +9 -9
- package/dist/index-CGtlXLTG.js +10767 -0
- package/dist/{index-B3LCTMwV.js → index-CRKdLbXL.js} +68 -60
- package/dist/{index-CMs3aIA6.js → index-CaHkqz0W.js} +3 -3
- package/dist/{index-DkBOM8za.js → index-CcXMYJxc.js} +8 -8
- package/dist/{index-DXyOBtgF.js → index-CkiP4iG6.js} +1 -1
- package/dist/{index-CDRTiAEu.js → index-D1iOPNg3.js} +1 -1
- package/dist/{index-DCR1GFCA.js → index-D2Nq0UoL.js} +6 -6
- package/dist/index-D4nA0Z7e.js +19528 -0
- package/dist/{index-r_T5o_hF.js → index-DHw8wo7T.js} +2 -2
- package/dist/{index-FgM7b2Sw.js → index-DKOoRHPf.js} +4 -4
- package/dist/{index-B20FfbEE.js → index-DcbPYZkw.js} +26 -19
- package/dist/{index-DXKJsqgW.js → index-DjwrfZk3.js} +18 -18
- package/dist/{index-DJIt5tXC.js → index-EuZfRdBT.js} +5 -5
- package/dist/{index-juXxYQ_a.js → index-H4XJDOoT.js} +6 -6
- package/dist/{index-B5H4znfe.js → index-ImU7YXN7.js} +1 -1
- package/dist/{index-B22ojkMy.js → index-N4EzkcEu.js} +2 -2
- package/dist/{index-BqniSMV6.js → index-j7eLKJK3.js} +4 -4
- package/dist/{index.esm2017-Dtk7BscN.js → index.esm2017-CBo4j3U1.js} +1 -1
- package/dist/{loading-PoODMkQD.js → loading-COAu2l7W.js} +1 -1
- package/dist/{lodash-TthNgH98.js → lodash-Bu1ipIkR.js} +1 -1
- package/dist/{member-import-D7zs0Jvh.js → member-import-CkiTJIqy.js} +2 -2
- package/dist/{membership-Cab-iWQ1.js → membership-BSEeYyiz.js} +3 -3
- package/dist/{money-9Q306M3g.js → money-BOaGQSGa.js} +1 -1
- package/dist/{number-D9M3D435.js → number-B2AC2EMT.js} +1 -1
- package/dist/{objectid-DKvQl6FD.js → objectid-BKw48v5L.js} +2 -2
- package/dist/{onboarding-D5LKUHVI.js → onboarding-ClA8xAnH.js} +3 -3
- package/dist/{onboardingSetup-D0jsS6w5.js → onboardingSetup-DHjnq0H1.js} +2 -2
- package/dist/{plugins-CDTKQ1Pg.js → plugins-DewN43sP.js} +3 -3
- package/dist/{reward-De3e9vYS.js → reward-deDdPQiR.js} +1 -1
- package/dist/{rule-trVJgEOe.js → rule-B8ifutnO.js} +10 -10
- package/dist/{template-Bj3Tb6bP.js → template-z3VMmWei.js} +6 -6
- package/dist/timezone-BxJDy-bY.js +19 -0
- package/dist/{transaction.fn-CPE-oQhA.js → transaction.fn-CBBhq01K.js} +2 -2
- package/dist/{trigger-C6oM-8pe.js → trigger-B_quLwWr.js} +5 -5
- package/dist/{useMarketingMaterialActions-C5scdJQp.js → useMarketingMaterialActions-DqoRLx1M.js} +4 -4
- package/dist/{usePagination-CIuTHSSG.js → usePagination-Q1fPttcp.js} +1 -1
- package/dist/{user-Bdlgn2yo.js → user-Bw6h9xn-.js} +1 -1
- package/dist/{vue-i18n-DEpDI-dt.js → vue-i18n-DpCS1FnK.js} +109 -109
- package/dist/{xlsx-CvecxUOG.js → xlsx--toeD6hC.js} +1 -1
- package/dist/{zod-bniyeWdY.js → zod-BkNAcpay.js} +1 -1
- package/package.json +1 -1
- package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-bqWUIbMG.js +0 -1300
- package/dist/WhatsappBot-DZb-Dn3s.js +0 -878
- package/dist/business-aT2zslwu.js +0 -82
- package/dist/index-BL2zQnXK.js +0 -27551
- package/dist/index-C_H8jFYf.js +0 -2743
- package/dist/timezone-DkuByUmb.js +0 -20
package/dist/app.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var w = Object.defineProperty;
|
|
2
2
|
var y = (e, s, o) => s in e ? w(e, s, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[s] = o;
|
|
3
3
|
var n = (e, s, o) => y(e, typeof s != "symbol" ? s + "" : s, o);
|
|
4
|
-
import { u as x } from "./loading-
|
|
5
|
-
import { w as h, u as a } from "./xlsx
|
|
4
|
+
import { u as x } from "./loading-COAu2l7W.js";
|
|
5
|
+
import { w as h, u as a } from "./xlsx--toeD6hC.js";
|
|
6
6
|
const t = {
|
|
7
7
|
sortBy: "_id",
|
|
8
8
|
descending: !1,
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { ref as r, computed as l } from "vue";
|
|
2
|
+
import { defineStore as y } from "pinia";
|
|
3
|
+
import { useCoreStore as I } from "@feedmepos/mf-common";
|
|
4
|
+
import { d as b, g as i, A as S, S as C, b as D } from "./index-EuZfRdBT.js";
|
|
5
|
+
const $ = {
|
|
6
|
+
async readSettings(e) {
|
|
7
|
+
try {
|
|
8
|
+
return i(await b(`marketing-v2/${e}/setting`).get(""));
|
|
9
|
+
} catch (s) {
|
|
10
|
+
if (console.error(JSON.stringify(s)), s instanceof S)
|
|
11
|
+
return {
|
|
12
|
+
_id: e,
|
|
13
|
+
business: e,
|
|
14
|
+
apiVersion: "v1"
|
|
15
|
+
};
|
|
16
|
+
throw s;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}, o = () => {
|
|
20
|
+
const e = C.getBusinessId();
|
|
21
|
+
if (!e) throw new Error("Invalid business ID");
|
|
22
|
+
return D(`businesses/${e}/location`, {
|
|
23
|
+
noIdRequired: !0
|
|
24
|
+
});
|
|
25
|
+
}, v = {
|
|
26
|
+
async read() {
|
|
27
|
+
return i(await o().get(""));
|
|
28
|
+
},
|
|
29
|
+
async readDevices() {
|
|
30
|
+
return i(await o().get("devices"));
|
|
31
|
+
},
|
|
32
|
+
async unregisterDevice(e) {
|
|
33
|
+
await i(await o().delete(`devices/${e}`));
|
|
34
|
+
},
|
|
35
|
+
async getOtp(e) {
|
|
36
|
+
return i(await o().post(`${e}/otp`));
|
|
37
|
+
}
|
|
38
|
+
}, E = y("mf-connect-business", () => {
|
|
39
|
+
const e = r("v2"), s = r(!1), c = r(!1), a = r([]), u = r([]);
|
|
40
|
+
async function d() {
|
|
41
|
+
const n = I().currentBusiness.value, t = await $.readSettings(n == null ? void 0 : n.id);
|
|
42
|
+
return c.value = t && "business" in t && t.premium == !0 || !1, s.value = t && "profileSource" in t && t.profileSource === "CRM" || !1, e.value = (t == null ? void 0 : t.apiVersion) || "v1", c.value;
|
|
43
|
+
}
|
|
44
|
+
async function p() {
|
|
45
|
+
return a.value = await v.read(), a.value;
|
|
46
|
+
}
|
|
47
|
+
async function f() {
|
|
48
|
+
return u.value = await v.readDevices(), u.value;
|
|
49
|
+
}
|
|
50
|
+
function m(n) {
|
|
51
|
+
return a.value.find((t) => t._id === n);
|
|
52
|
+
}
|
|
53
|
+
const g = l(() => [
|
|
54
|
+
{ label: "All", value: null },
|
|
55
|
+
...a.value.map((n) => ({
|
|
56
|
+
label: n.name,
|
|
57
|
+
value: n._id
|
|
58
|
+
}))
|
|
59
|
+
]), w = l(() => a.value.map((n) => ({
|
|
60
|
+
label: `${n.code ? `${n.code} - ` : ""} ${n.name}`,
|
|
61
|
+
value: n._id
|
|
62
|
+
})));
|
|
63
|
+
return {
|
|
64
|
+
// state
|
|
65
|
+
version: e,
|
|
66
|
+
isCrmProfile: s,
|
|
67
|
+
isPremium: c,
|
|
68
|
+
locations: a,
|
|
69
|
+
locationDevices: u,
|
|
70
|
+
// actions
|
|
71
|
+
readPremium: d,
|
|
72
|
+
readLocations: p,
|
|
73
|
+
readLocationDevices: f,
|
|
74
|
+
locationById: m,
|
|
75
|
+
// getters
|
|
76
|
+
locationItems: g,
|
|
77
|
+
locationOptions: w
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
export {
|
|
81
|
+
v as l,
|
|
82
|
+
E as u
|
|
83
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineStore as d } from "pinia";
|
|
2
2
|
import { reactive as b, onMounted as f, ref as s } from "vue";
|
|
3
|
-
import { c } from "./index-
|
|
4
|
-
import { g as i, S as g, b as h } from "./index-
|
|
3
|
+
import { c } from "./index-DHw8wo7T.js";
|
|
4
|
+
import { g as i, S as g, b as h } from "./index-EuZfRdBT.js";
|
|
5
5
|
const p = () => {
|
|
6
6
|
const e = g.getBusinessId();
|
|
7
7
|
if (!e) throw new Error("Invalid business ID");
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { h as u } from "./moment-D7p2TMB-.js";
|
|
2
|
-
import "./index-
|
|
3
|
-
import { e as
|
|
4
|
-
import { components as
|
|
5
|
-
import { a as E } from "./index-
|
|
6
|
-
import { c as N } from "./rule-
|
|
7
|
-
import { u as I } from "./business-
|
|
8
|
-
import { C as m } from "./campaign.fn-
|
|
9
|
-
import { g as
|
|
10
|
-
import { c as
|
|
11
|
-
import { i as
|
|
12
|
-
import { h as
|
|
13
|
-
import { F as s } from "./campaign.enum-
|
|
14
|
-
const
|
|
2
|
+
import "./index-D2Nq0UoL.js";
|
|
3
|
+
import { e as f } from "./effect-TTD5--LN.js";
|
|
4
|
+
import { components as h } from "@feedmepos/ui-library";
|
|
5
|
+
import { a as E } from "./index-CcXMYJxc.js";
|
|
6
|
+
import { c as N } from "./rule-B8ifutnO.js";
|
|
7
|
+
import { u as I } from "./business-DuKNr9P7.js";
|
|
8
|
+
import { C as m } from "./campaign.fn-CJlEovlZ.js";
|
|
9
|
+
import { g as C, t as y } from "./index-j7eLKJK3.js";
|
|
10
|
+
import { c as O } from "./string-Gcy5IM_H.js";
|
|
11
|
+
import { i as g } from "./plugins-DewN43sP.js";
|
|
12
|
+
import { h as l } from "vue";
|
|
13
|
+
import { F as s } from "./campaign.enum-DsaSpHDQ.js";
|
|
14
|
+
const S = [
|
|
15
15
|
"APP_INBOX",
|
|
16
16
|
"PUSH",
|
|
17
17
|
"SMS",
|
|
18
18
|
"EMAIL",
|
|
19
19
|
"WHATSAPP"
|
|
20
|
-
],
|
|
21
|
-
function
|
|
22
|
-
return
|
|
20
|
+
], R = [...S];
|
|
21
|
+
function X(t) {
|
|
22
|
+
return R.includes(t);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function b(t, e) {
|
|
25
25
|
return t === "APP_INBOX" ? {
|
|
26
26
|
title: "",
|
|
27
27
|
previewText: "",
|
|
@@ -40,17 +40,17 @@ function O(t, e) {
|
|
|
40
40
|
variables: e
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function z(t, e, n = []) {
|
|
44
44
|
return t.channels.includes(e) ? t : {
|
|
45
45
|
...t,
|
|
46
46
|
channels: [...t.channels, e],
|
|
47
47
|
content: {
|
|
48
48
|
...t.content,
|
|
49
|
-
[e]: t.content[e] ??
|
|
49
|
+
[e]: t.content[e] ?? b(e, n)
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function W(t, e) {
|
|
54
54
|
const n = { ...t.content };
|
|
55
55
|
return delete n[e], {
|
|
56
56
|
...t,
|
|
@@ -58,94 +58,106 @@ function X(t, e) {
|
|
|
58
58
|
content: n
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function J(t, e, n) {
|
|
62
62
|
return {
|
|
63
63
|
...t,
|
|
64
64
|
content: { ...t.content, [e]: n }
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
const o = t.channels.indexOf(e),
|
|
69
|
-
if (o < 0 ||
|
|
70
|
-
const
|
|
71
|
-
return [
|
|
67
|
+
function K(t, e, n) {
|
|
68
|
+
const o = t.channels.indexOf(e), r = o + n;
|
|
69
|
+
if (o < 0 || r < 0 || r >= t.channels.length) return t;
|
|
70
|
+
const a = [...t.channels];
|
|
71
|
+
return [a[o], a[r]] = [a[r], a[o]], { ...t, channels: a };
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
const [o, ...
|
|
73
|
+
function q(t, e, n = []) {
|
|
74
|
+
const [o, ...r] = t.channels;
|
|
75
75
|
if (o === e) return t;
|
|
76
|
-
const
|
|
76
|
+
const a = {
|
|
77
77
|
...t.content,
|
|
78
|
-
[e]: t.content[e] ??
|
|
78
|
+
[e]: t.content[e] ?? b(e, n)
|
|
79
79
|
};
|
|
80
|
-
return o && delete
|
|
80
|
+
return o && delete a[o], {
|
|
81
81
|
...t,
|
|
82
|
-
channels: [e, ...
|
|
83
|
-
content:
|
|
82
|
+
channels: [e, ...r.filter((p) => p !== e)],
|
|
83
|
+
content: a
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function Q(t, e) {
|
|
87
87
|
if (!e) return !1;
|
|
88
88
|
const n = t.content[e];
|
|
89
89
|
return n ? ["title", "previewText", "content", "body"].some(
|
|
90
90
|
(o) => typeof n[o] == "string" && !!n[o].trim()
|
|
91
91
|
) : !1;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function Z(t, e) {
|
|
94
94
|
return { ...t, mode: e };
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function tt(t, e) {
|
|
97
97
|
const n = t.content[e];
|
|
98
98
|
if (!n) return !1;
|
|
99
99
|
if (e === "APP_INBOX") {
|
|
100
|
-
const o = n,
|
|
101
|
-
(
|
|
100
|
+
const o = n, r = (o.buttons ?? []).every(
|
|
101
|
+
(a) => a.label.trim().length > 0 && C.safeParse(a.url ?? "").success
|
|
102
102
|
);
|
|
103
|
-
return o.title.trim().length > 0 && o.previewText.trim().length > 0 &&
|
|
103
|
+
return o.title.trim().length > 0 && o.previewText.trim().length > 0 && r;
|
|
104
104
|
}
|
|
105
105
|
if (e === "PUSH") {
|
|
106
|
-
const o = n,
|
|
107
|
-
return
|
|
106
|
+
const o = n, r = o.title.trim().length > 0 && o.body.trim().length > 0, a = o.destination !== "EXTERNAL" || C.safeParse(o.url ?? "").success;
|
|
107
|
+
return r && a;
|
|
108
108
|
}
|
|
109
109
|
return n.content.trim().length > 0;
|
|
110
110
|
}
|
|
111
111
|
function A(t, e) {
|
|
112
112
|
return t.channels.map(e).join(t.mode === "fallback" ? " → " : " + ");
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function et(t) {
|
|
115
115
|
var e, n;
|
|
116
116
|
if (!(!t || t.delivery)) {
|
|
117
117
|
if ((n = (e = t.message) == null ? void 0 : e.content) != null && n.trim()) {
|
|
118
|
-
t.delivery =
|
|
118
|
+
t.delivery = y(t);
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
121
|
delete t.message, t.delivery = { mode: "fallback", channels: [], content: {} };
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
const
|
|
125
|
-
function D() {
|
|
126
|
-
|
|
124
|
+
const _ = 5;
|
|
125
|
+
function D(t, e) {
|
|
126
|
+
if (!t) return { kind: "all" };
|
|
127
|
+
const n = new Map(e.map((a) => [String(a._id), a])), o = [];
|
|
128
|
+
for (const a of t) {
|
|
129
|
+
const p = n.get(String(a));
|
|
130
|
+
p && o.push({ id: String(a), code: p.code, name: p.name });
|
|
131
|
+
}
|
|
132
|
+
if (t.length === 0) return { kind: "none" };
|
|
133
|
+
const r = t.length - o.length;
|
|
134
|
+
return r === 0 && o.length <= _ ? { kind: "names", names: o.map((a) => a.name) } : { kind: "count", rows: o, total: e.length, unavailable: r };
|
|
135
|
+
}
|
|
136
|
+
const c = g.global.t;
|
|
137
|
+
function P() {
|
|
138
|
+
const t = g.global.locale;
|
|
127
139
|
return typeof t == "string" ? t : t.value;
|
|
128
140
|
}
|
|
129
|
-
function
|
|
130
|
-
return new Intl.DateTimeFormat(
|
|
141
|
+
function d(t) {
|
|
142
|
+
return new Intl.DateTimeFormat(P(), {
|
|
131
143
|
day: "2-digit",
|
|
132
144
|
month: "short",
|
|
133
145
|
year: "numeric"
|
|
134
146
|
}).format(new Date(t));
|
|
135
147
|
}
|
|
136
148
|
function i(t) {
|
|
137
|
-
return
|
|
149
|
+
return l(
|
|
138
150
|
"div",
|
|
139
151
|
{
|
|
140
152
|
class: `${t.chipClass} gap-4 h-[22px] inline-flex items-center justify-center min-w-min px-8 rounded-md`
|
|
141
153
|
},
|
|
142
154
|
[
|
|
143
|
-
|
|
144
|
-
|
|
155
|
+
l(h.FmIcon, { size: "sm", name: t.icon, outline: !0 }),
|
|
156
|
+
l("span", { class: "fm-typo-en-body-md-600" }, t.name)
|
|
145
157
|
]
|
|
146
158
|
);
|
|
147
159
|
}
|
|
148
|
-
const
|
|
160
|
+
const nt = {
|
|
149
161
|
[s.enum.CREDIT]: {
|
|
150
162
|
chipClass: "!text-fm-color-secondary-plum !bg-[#f2ebfe]",
|
|
151
163
|
icon: "local_activity",
|
|
@@ -255,44 +267,44 @@ const tt = {
|
|
|
255
267
|
}
|
|
256
268
|
}
|
|
257
269
|
};
|
|
258
|
-
function
|
|
259
|
-
const e =
|
|
270
|
+
function ot(t) {
|
|
271
|
+
const e = M(t), n = {
|
|
260
272
|
active: "text-fm-color-typo-success bg-fm-color-system-success-100",
|
|
261
273
|
upcoming: "text-fm-color-typo-info bg-fm-color-system-info-100",
|
|
262
274
|
expired: "text-fm-color-typo-error bg-fm-color-system-error-100"
|
|
263
275
|
};
|
|
264
|
-
return t.type == "VOUCHER" ?
|
|
276
|
+
return t.type == "VOUCHER" ? l(h.FmChip, {
|
|
265
277
|
class: n[e],
|
|
266
|
-
label:
|
|
278
|
+
label: O.title(c(`connect.campaign.common.status.${e}`)),
|
|
267
279
|
compact: !0
|
|
268
|
-
}) :
|
|
280
|
+
}) : l(h.FmChip, {
|
|
269
281
|
class: n[e],
|
|
270
|
-
label:
|
|
282
|
+
label: O.title(c(`connect.campaign.common.status.${e}`)),
|
|
271
283
|
compact: !0
|
|
272
284
|
});
|
|
273
285
|
}
|
|
274
|
-
function
|
|
286
|
+
function at(t) {
|
|
275
287
|
const e = t.timeframeOptions;
|
|
276
288
|
if (!e || !e.start && !e.end)
|
|
277
289
|
return c("connect.campaign.common.always_active");
|
|
278
290
|
if (!e.start && e.end)
|
|
279
291
|
return c("connect.campaign.common.valid_until", {
|
|
280
|
-
date:
|
|
292
|
+
date: d(e.end)
|
|
281
293
|
});
|
|
282
|
-
const n =
|
|
294
|
+
const n = d(e.start), o = e.end ? d(e.end) : c("connect.campaign.common.unlimited");
|
|
283
295
|
return `${n} -> ${o}`;
|
|
284
296
|
}
|
|
285
|
-
function
|
|
297
|
+
function T(t) {
|
|
286
298
|
if (!t || !t.start && !t.end)
|
|
287
299
|
return "connect.campaign.common.always";
|
|
288
300
|
const e = t.start ? u(t.start).format("DD MMM YYYY") : "From campaign creation", n = t.end ? u(t.end).format("DD MMM YYYY") : "Never ends";
|
|
289
301
|
return `${e} - ${n}`;
|
|
290
302
|
}
|
|
291
|
-
function
|
|
303
|
+
function rt(t) {
|
|
292
304
|
const { campaign: e } = t;
|
|
293
305
|
return {
|
|
294
306
|
"connect.campaign.common.campaign_name": e.name,
|
|
295
|
-
"connect.campaign.common.campaign_period":
|
|
307
|
+
"connect.campaign.common.campaign_period": T(
|
|
296
308
|
e.timeframeOptions
|
|
297
309
|
),
|
|
298
310
|
get "connect.campaign.common.next_schedule_at"() {
|
|
@@ -304,46 +316,48 @@ function ot(t) {
|
|
|
304
316
|
return n ? u(n).format("ddd, DD MMM YYYY, hh:mmA") : void 0;
|
|
305
317
|
},
|
|
306
318
|
get "connect.campaign.common.discount_type"() {
|
|
307
|
-
if (e.type == "PROMOTION") return
|
|
319
|
+
if (e.type == "PROMOTION") return f(e.effect);
|
|
308
320
|
if ("configs" in t && t.configs.type == "VOUCHER")
|
|
309
|
-
return
|
|
321
|
+
return f(t.configs.extras.effect);
|
|
310
322
|
},
|
|
311
323
|
get "connect.campaign.broadcast.summary.delivery"() {
|
|
312
324
|
if (e.type != "BROADCAST") return;
|
|
313
|
-
const n =
|
|
325
|
+
const n = y(e);
|
|
314
326
|
if (!(n.channels.length < 2))
|
|
315
327
|
return `connect.campaign.broadcast.mode.${n.mode}.label`;
|
|
316
328
|
},
|
|
317
329
|
get "connect.campaign.broadcast.summary.channels"() {
|
|
318
330
|
var n;
|
|
319
331
|
if (e.type == "BROADCAST")
|
|
320
|
-
return ((n =
|
|
332
|
+
return ((n = x(e)) == null ? void 0 : n.route) ?? "connect.campaign.broadcast.noChannelsSelected";
|
|
321
333
|
},
|
|
322
334
|
get "connect.campaign.common.available_at"() {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
335
|
+
const n = D(
|
|
336
|
+
e.targetLocation,
|
|
337
|
+
I().locations
|
|
338
|
+
);
|
|
339
|
+
return n.kind === "all" ? "connect.campaign.common.all_locations" : n.kind === "none" ? "connect.campaign.common.no_location" : n.kind === "names" ? n.names.join(", ") : n;
|
|
326
340
|
}
|
|
327
341
|
};
|
|
328
342
|
}
|
|
329
|
-
function
|
|
343
|
+
function M(t) {
|
|
330
344
|
return t.timeframeOptions && t.timeframeOptions.type == "timeframe" ? u().isBetween(
|
|
331
345
|
t.timeframeOptions.start ?? u().subtract(1, "d"),
|
|
332
346
|
t.timeframeOptions.end ?? u().add(1, "d")
|
|
333
347
|
) ? "active" : u().isAfter(t.timeframeOptions.end) ? "expired" : "upcoming" : "active";
|
|
334
348
|
}
|
|
335
|
-
function
|
|
336
|
-
const e =
|
|
349
|
+
function x(t) {
|
|
350
|
+
const e = y(t);
|
|
337
351
|
if (!e.channels.length) return null;
|
|
338
|
-
const o = A(e, (
|
|
352
|
+
const o = A(e, (r) => g.global.t(`connect.campaign.broadcast.channel.${r}`));
|
|
339
353
|
return {
|
|
340
|
-
strategy: e.channels.length > 1 ?
|
|
354
|
+
strategy: e.channels.length > 1 ? g.global.t(
|
|
341
355
|
`connect.campaign.broadcast.strategy.${e.mode}`
|
|
342
356
|
) : null,
|
|
343
357
|
route: o
|
|
344
358
|
};
|
|
345
359
|
}
|
|
346
|
-
function
|
|
360
|
+
function ct(t) {
|
|
347
361
|
var e, n;
|
|
348
362
|
switch (t.event.type) {
|
|
349
363
|
case "BILL_COMPLETED":
|
|
@@ -354,8 +368,8 @@ function at(t) {
|
|
|
354
368
|
case "COIN":
|
|
355
369
|
return t.earningOption.type == "FIXED" ? `Spend to get ${t.earningOption.amount} ${m.formattedType(t.type)}` : `Every ${t.earningOption.every} amount spent get ${t.earningOption.amount} ${m.formattedType(t.type)}`;
|
|
356
370
|
case "VOUCHER":
|
|
357
|
-
const
|
|
358
|
-
return
|
|
371
|
+
const r = (n = (e = t == null ? void 0 : t.pf_collectible) == null ? void 0 : e.extras) == null ? void 0 : n.effect;
|
|
372
|
+
return r ? `${o} - ${f(r)}` : o;
|
|
359
373
|
default:
|
|
360
374
|
return o;
|
|
361
375
|
}
|
|
@@ -370,7 +384,7 @@ function at(t) {
|
|
|
370
384
|
case "MEMBERSHIP_JOINED":
|
|
371
385
|
return `Receive ${m.formattedType(t.type)} when member joined`;
|
|
372
386
|
case "MAKING_ORDER":
|
|
373
|
-
return t.type !== "PROMOTION" ? void 0 :
|
|
387
|
+
return t.type !== "PROMOTION" ? void 0 : f(t.effect);
|
|
374
388
|
default:
|
|
375
389
|
throw new Error(
|
|
376
390
|
`Not implemented ${JSON.stringify({ cause: t.event.type })}`
|
|
@@ -378,23 +392,23 @@ function at(t) {
|
|
|
378
392
|
}
|
|
379
393
|
}
|
|
380
394
|
export {
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
395
|
+
nt as C,
|
|
396
|
+
M as a,
|
|
397
|
+
ot as b,
|
|
398
|
+
ct as c,
|
|
399
|
+
x as d,
|
|
400
|
+
S as e,
|
|
401
|
+
tt as f,
|
|
402
|
+
at as g,
|
|
403
|
+
Z as h,
|
|
404
|
+
X as i,
|
|
405
|
+
z as j,
|
|
406
|
+
Q as k,
|
|
407
|
+
q as l,
|
|
408
|
+
K as m,
|
|
409
|
+
J as n,
|
|
410
|
+
rt as o,
|
|
411
|
+
et as p,
|
|
412
|
+
W as r,
|
|
413
|
+
T as s
|
|
400
414
|
};
|