@feedmepos/mf-connect 0.1.117-dev → 0.1.118-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/README.md +12 -8
- package/dist/{App-BpcsgH7K.js → App-CBFNBDb2.js} +275 -275
- package/dist/{AuditLogs-BNnUiVnD.js → AuditLogs-BtSA8b08.js} +13 -13
- package/dist/{Bin-Cm0wjQeR.js → Bin-CjmS_Tfn.js} +8 -8
- package/dist/{Broadcast-BoJaHqnO.js → Broadcast-BeePmZa1.js} +12 -12
- package/dist/{CampaignAnalytic-Eg4xZW0B.js → CampaignAnalytic-CZlnyvOi.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BXylK6Ze.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Du3Ah4HP.js} +9 -9
- package/dist/{Card-BfkMcFaG.js → Card-C8SzQQ0z.js} +23 -23
- package/dist/{Collections-RXmxQbII.js → Collections-BXNWTSZH.js} +8 -8
- package/dist/{Credit-CsRPM1jv.js → Credit-CK0-0yD1.js} +12 -12
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-D2tvK7pw.js → DateRangeChip.vue_vue_type_script_setup_true_lang-BXYpYC7Y.js} +1 -1
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BgPeHurN.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CdpnNDzR.js} +1042 -1045
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CUx8UIIq.js → EffectSheet.vue_vue_type_style_index_0_lang--Oyj3KYg.js} +6 -6
- package/dist/{Experience-BC8Pj-v9.js → Experience-CWJaj62g.js} +13 -13
- package/dist/{FileSaver.min-DzmoQFA0.js → FileSaver.min-lV9H82L5.js} +1 -1
- package/dist/{Game-DJXNHFBs.js → Game-zBV1LYAg.js} +13 -13
- package/dist/{GiftCardSetup-_0n8lU-t.js → GiftCardSetup-Cnq9353j.js} +10 -10
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-C-AiJdui.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-CdgSBdrX.js} +7 -7
- package/dist/{Goals-DSZwKpds.js → Goals-Utk08egN.js} +4 -4
- package/dist/{Grab-DDc7e-AC.js → Grab-DwMmWmbT.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BZb-H4fM.js → ImageInput.vue_vue_type_script_setup_true_lang-CNPeU9xm.js} +1 -1
- package/dist/{Index-Cbi0bquE.js → Index-Bjgs18xf.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-GLhMtvzi.js → LocationPicker.vue_vue_type_script_setup_true_lang-DWnf4lXH.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Bt9CO_QR.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Dy_oWJaZ.js} +1 -1
- package/dist/{LoyaltyDashboard-fK90c27A.js → LoyaltyDashboard-DmUfujX_.js} +15 -15
- package/dist/{MainLayout-Bf-l9yL4.js → MainLayout-DlDZQJfy.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-COR6YYYI.js → MainLayout.vue_vue_type_script_setup_true_lang-yAflY70k.js} +3 -3
- package/dist/{Marketing-B7cZGsO-.js → Marketing-B0iKlHP-.js} +4 -4
- package/dist/{MarketingMaterialEdit-5IcV2ct6.js → MarketingMaterialEdit-BNHxVb8A.js} +6 -6
- package/dist/{Member-BGTrRVdq.js → Member-Bcm3_pWB.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-DJr2hV2W.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-CPp4OpOx.js} +24 -24
- package/dist/{MemberImportHistory--FxkTJmu.js → MemberImportHistory-AQgLzB3g.js} +7 -7
- package/dist/{MemberList-EjY5dgwt.js → MemberList-CkMTo2uD.js} +14 -14
- package/dist/{MemberTransactions-Oia7LIFK.js → MemberTransactions-CxLCVjvw.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CLOQZCYy.js → MessageInput.vue_vue_type_script_setup_true_lang-4N20f8Sj.js} +10 -10
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Ev3bB8cg.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DghbYpSQ.js} +1 -1
- package/dist/{Mission-BFHYb4aT.js → Mission-CQS1CoDN.js} +14 -14
- package/dist/{Overview-BVNyQxFL.js → Overview-NQ287sgq.js} +21 -21
- package/dist/{Overview-d5U37aot.js → Overview-UG1IjY7-.js} +4 -4
- package/dist/{Point-CXkqH02Z.js → Point-krMa_mb1.js} +14 -14
- package/dist/{Promotion-DdxNvlOO.js → Promotion-vFBmJSti.js} +14 -14
- package/dist/{Queue-C96oNKyP.js → Queue-BusxSPt-.js} +13 -13
- package/dist/{Record-Bj2e2Y4i.js → Record-DjKqn0za.js} +9 -9
- package/dist/{Review-CJK5S1oI.js → Review-CqLp8l7U.js} +2 -2
- package/dist/{ReviewFacebookCallback-ChG7TRy5.js → ReviewFacebookCallback-D2kMSVFC.js} +5 -5
- package/dist/{ReviewGoogleCallback-Dmk4VyGA.js → ReviewGoogleCallback-B1cHR-o2.js} +5 -5
- package/dist/Reward-FeSxgzuS.js +444 -0
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-U47m3AAn.js → RewardGroup.vue_vue_type_script_setup_true_lang-CCxVjBsO.js} +14 -14
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-2L6ZGMW7.js → RuleGroup.vue_vue_type_script_setup_true_lang-U403emCF.js} +15 -15
- package/dist/{Segment-FYvtCkqH.js → Segment-Nj59F9Nr.js} +26 -26
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DPZZz2e0.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Kg9m-0DS.js} +15 -15
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D8wBgLlS.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BLbDApPL.js} +4 -4
- package/dist/{Setting-CUAWjCqa.js → Setting-CCIzNxv-.js} +14 -14
- package/dist/{SettingAdvertisements-COIQwUD6.js → SettingAdvertisements-CkPyAg5y.js} +12 -12
- package/dist/{Settings-D2gFPvmW.js → Settings-CYjKGCpa.js} +5 -5
- package/dist/{Store-BAXwiyvx.js → Store-Bp8Zkzi2.js} +27 -27
- package/dist/{StoreRewards-2mUavtUg.js → StoreRewards-DXW5nVyW.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-5g3yIL1a.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BYVezFI2.js} +25 -25
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DHi4rdT1.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CS6b1cM3.js} +2 -2
- package/dist/{Tier-BmAOzRHL.js → Tier-B8Utn9Qb.js} +27 -27
- package/dist/{Title-DMxiUg30.js → Title-CwaNSFer.js} +23 -23
- package/dist/{Transaction-CF6hXEpN.js → Transaction-ieciAdXP.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BON_t0dL.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CMwZl4E6.js} +6 -6
- package/dist/{Voucher-DrtITxq-.js → Voucher-BKfujj6r.js} +18 -18
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-1DZOzJKx.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CkH-rNqZ.js} +12 -12
- package/dist/{WhatsappAccount-Bb0Y7ikk.js → WhatsappAccount-D73WDP7a.js} +66 -64
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-CPlyzkp4.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-C3L7vWZE.js} +1 -1
- package/dist/{WhatsappBot-DNvvaPey.js → WhatsappBot-DTWZAXhi.js} +324 -322
- package/dist/{WhatsappBotLogs-C8M-1pvv.js → WhatsappBotLogs-DtDcrjs9.js} +11 -11
- package/dist/{WhatsappBotSettings-D6egqUyU.js → WhatsappBotSettings-7_mH9U4y.js} +287 -288
- package/dist/WhatsappLayout-BVpaFJ8H.js +21 -0
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-CMeaNKJt.js +261 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CKZscSjU.js → ZodTextField.vue_vue_type_script_setup_true_lang-BO1zA9AR.js} +2 -2
- package/dist/{app-BjdLqYQq.js → app-DX7OWVY2.js} +528 -524
- package/dist/app.js +1 -1
- package/dist/{base.export-B68z5BF6.js → base.export-bamzzexi.js} +2 -2
- package/dist/{business-D9fgkHxb.js → business-D3U9HSu9.js} +1 -1
- package/dist/{campaign-Dw_ujovr.js → campaign-BqRf2VUO.js} +8 -8
- package/dist/{campaign-eMaPX8r6.js → campaign-CKfeN2xN.js} +2 -2
- package/dist/{campaign.fn-DFjGNvmN.js → campaign.fn-DQe5LZuT.js} +38 -38
- package/dist/{collection.fn-CCOWtB-c.js → collection.fn-BcGqExuE.js} +2 -2
- package/dist/{currency-CTLKReFC.js → currency-sjMYWoI8.js} +1 -1
- package/dist/{duplicateCampaign-BcpBfUGL.js → duplicateCampaign-CJF3ZLNd.js} +2 -2
- package/dist/{effect-CTI1ZH57.js → effect-Cv8ugBR3.js} +1 -1
- package/dist/{email-addresses-B74e3bnB.js → email-addresses-CWqtseTn.js} +2 -2
- package/dist/{feature-flag-DVdEaChJ.js → feature-flag-BIh6MM4i.js} +159 -159
- package/dist/{helper-as9K-piK.js → helper-WnxOxoRK.js} +1 -1
- package/dist/{index-CHU3UePP.js → index-5TTGGDnF.js} +1 -1
- package/dist/{index-Ba719MYq.js → index-B3CkAr-6.js} +1 -1
- package/dist/{index-Czg-2Ni0.js → index-B9XVyhtC.js} +3 -3
- package/dist/{index-BW7FoVEA.js → index-BGguMtc0.js} +1 -1
- package/dist/{index-BbVbqe4Y.js → index-Bdg48Cus.js} +2 -2
- package/dist/{index-B_wRpO02.js → index-BoAmM8QH.js} +2 -2
- package/dist/{index-TAoQpeLQ.js → index-BtmVXdRR.js} +1 -1
- package/dist/{index-3LjKJhQa.js → index-CDTETsXQ.js} +1 -1
- package/dist/{index-DKI8401o.js → index-CeafUn1o.js} +2 -2
- package/dist/{index-QHqcSN2q.js → index-CiSTQhs9.js} +1 -1
- package/dist/{index-C5V6u2Qd.js → index-ClvaVYkG.js} +2 -2
- package/dist/{index-CWLOcQ6j.js → index-CnsSd5Dg.js} +9 -9
- package/dist/{index-B0h0iYWP.js → index-D3yYjyaj.js} +2 -2
- package/dist/{index-8mBfDn3M.js → index-DDzi_-Lu.js} +7 -7
- package/dist/{index-Ckz6u3ac.js → index-DOgDR_QH.js} +2 -2
- package/dist/{index-BEKMTiFb.js → index-DqZX-A6e.js} +3 -3
- package/dist/{index-DcZiikOH.js → index-DxhNNZ-a.js} +2 -2
- package/dist/{index-wsCCqwdr.js → index-DzYFQGSw.js} +2 -2
- package/dist/{index-C-iwb2Ln.js → index-I9lmcd2w.js} +2 -2
- package/dist/{index-CQxkDpX0.js → index-iiWxryxo.js} +4 -4
- package/dist/{index-BhTrG89b.js → index-qI1yx02a.js} +4 -4
- package/dist/{index.esm2017-DL6rTGDW.js → index.esm2017-GI2alVO5.js} +1 -1
- package/dist/{loading-x6IScY4K.js → loading-Qx5K2WL0.js} +1 -1
- package/dist/{lodash-nwnDizYo.js → lodash-CeSjJptg.js} +1 -1
- package/dist/{member-import-C-b01Tyd.js → member-import-Cq8G7SsW.js} +1 -1
- package/dist/{membership-DfarOMtO.js → membership-BbeavSNs.js} +2 -2
- package/dist/{money-CFn-jR4W.js → money-D8YIFaGA.js} +1 -1
- package/dist/{number-CSlyDL2x.js → number-DAubZ5bt.js} +1 -1
- package/dist/{objectid-zcT6ESET.js → objectid-DeXFWDMh.js} +6 -6
- package/dist/{onboarding-DyaFaaF2.js → onboarding-SyFxaTJY.js} +3 -3
- package/dist/{onboardingSetup-DQt91O9f.js → onboardingSetup-CLpHlBn8.js} +2 -2
- package/dist/{plugins-DEHr0UOe.js → plugins-BHuaMEYA.js} +3 -3
- package/dist/{reward-Du_Pv-4p.js → reward-dYWnmAC8.js} +1 -1
- package/dist/{rule-DfqmQTVK.js → rule-BVsfOP2h.js} +10 -10
- package/dist/{template-CcbNF4PF.js → template-BcdtbhUJ.js} +6 -6
- package/dist/{timezone-_4tabIaK.js → timezone-CUc7q5Ii.js} +1 -1
- package/dist/{transaction.fn-C46PHwCV.js → transaction.fn-jF9u_cBy.js} +2 -2
- package/dist/{trigger-Dipr6btC.js → trigger-COlbQlaB.js} +5 -5
- package/dist/{useMarketingMaterialActions-BAw2ZjeF.js → useMarketingMaterialActions-Dq6-gsOW.js} +4 -4
- package/dist/{usePagination-D6RZ18zS.js → usePagination-BYZB6ORK.js} +1 -1
- package/dist/{user-BCexQj3Q.js → user-DK7L8VFR.js} +1 -1
- package/dist/{vue-i18n-DXvyTCZf.js → vue-i18n-CDSTH7g5.js} +162 -162
- package/dist/{xlsx-BTxt_Jg6.js → xlsx-CKxXlDzD.js} +1 -1
- package/dist/{zod-T4wMYjWT.js → zod-DjtAaF0U.js} +1 -1
- package/package.json +1 -1
- package/dist/Reward-Dh2YI0Xb.js +0 -442
- package/dist/WhatsappLayout-DeQTPuF6.js +0 -21
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DI0pcHcE.js +0 -253
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as
|
|
2
|
-
import { u as Y } from "./vue-i18n-
|
|
1
|
+
import { defineComponent as Z, ref as w, computed as M, watch as H, onBeforeUnmount as te, resolveComponent as B, openBlock as o, createElementBlock as p, createElementVNode as t, normalizeClass as R, unref as e, toDisplayString as a, createBlock as A, withCtx as S, createTextVNode as Q, createVNode as k, createCommentVNode as D, Fragment as G, renderList as X, mergeModels as ae, useModel as le, isRef as ce } from "vue";
|
|
2
|
+
import { u as Y } from "./vue-i18n-CDSTH7g5.js";
|
|
3
3
|
import { useRouter as ie } from "vue-router";
|
|
4
4
|
import { useCoreStore as pe } from "@feedmepos/mf-common";
|
|
5
|
-
import { S as K, a as
|
|
6
|
-
import { w as J } from "./index-
|
|
7
|
-
import { u as ue, _ as de, w as me } from "./WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { R as
|
|
9
|
-
import { _ as fe } from "./WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { S as K, a as se } from "./index-CeafUn1o.js";
|
|
6
|
+
import { w as J } from "./index-DzYFQGSw.js";
|
|
7
|
+
import { u as ue, _ as de, w as me } from "./WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-CMeaNKJt.js";
|
|
8
|
+
import { R as N } from "./app-DX7OWVY2.js";
|
|
9
|
+
import { _ as fe } from "./WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-C3L7vWZE.js";
|
|
10
10
|
import { b as re } from "./browser-BSAOEeIM.js";
|
|
11
11
|
const xe = { class: "min-w-0" }, ve = { class: "flex items-center gap-[12px]" }, he = ["src"], _e = { key: 1 }, ge = { class: "min-w-0 flex-1" }, ye = ["title"], be = { key: 1 }, we = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary break-all" }, Be = { class: "relative z-10 shrink-0" }, ke = ["aria-label", "title", "aria-expanded", "disabled", "aria-busy"], $e = { class: "text-[14px] text-fm-color-typo-error" }, Ce = { class: "flex items-center justify-between flex-wrap gap-[8px] border-t border-fm-color-neutral-gray-100 pt-[12px]" }, Ae = {
|
|
12
12
|
key: 0,
|
|
@@ -21,100 +21,100 @@ const xe = { class: "min-w-0" }, ve = { class: "flex items-center gap-[12px]" },
|
|
|
21
21
|
account: {}
|
|
22
22
|
},
|
|
23
23
|
emits: ["removed"],
|
|
24
|
-
setup(
|
|
25
|
-
const
|
|
26
|
-
let
|
|
24
|
+
setup($, { emit: m }) {
|
|
25
|
+
const _ = $, s = m, { t: n, locale: u } = Y(), d = w(!1), g = w(""), x = w(!1), y = w(!1);
|
|
26
|
+
let v;
|
|
27
27
|
const {
|
|
28
|
-
name:
|
|
28
|
+
name: C,
|
|
29
29
|
phoneNumber: b,
|
|
30
30
|
initials: I,
|
|
31
|
-
state:
|
|
32
|
-
avatarColor:
|
|
31
|
+
state: T,
|
|
32
|
+
avatarColor: E,
|
|
33
33
|
profilePictureUrl: l,
|
|
34
|
-
profilePictureFailed:
|
|
35
|
-
} = ue(() =>
|
|
36
|
-
name:
|
|
37
|
-
params: { clientId:
|
|
34
|
+
profilePictureFailed: i
|
|
35
|
+
} = ue(() => _.account), f = M(() => T.value === "connected"), h = M(() => ({
|
|
36
|
+
name: N["$connect-WHATSAPP_ACCOUNT"],
|
|
37
|
+
params: { clientId: _.account.clientId }
|
|
38
38
|
}));
|
|
39
|
-
function
|
|
40
|
-
return new Intl.DateTimeFormat(
|
|
39
|
+
function W(V) {
|
|
40
|
+
return new Intl.DateTimeFormat(u.value, {
|
|
41
41
|
year: "numeric",
|
|
42
42
|
month: "short",
|
|
43
43
|
day: "numeric"
|
|
44
|
-
}).format(new Date(
|
|
44
|
+
}).format(new Date(V));
|
|
45
45
|
}
|
|
46
|
-
async function
|
|
47
|
-
if (
|
|
48
|
-
const
|
|
49
|
-
if (!
|
|
50
|
-
|
|
46
|
+
async function L() {
|
|
47
|
+
if (d.value) return;
|
|
48
|
+
const V = K.getBusinessId();
|
|
49
|
+
if (!V) {
|
|
50
|
+
g.value = n("connect.whatsappBot.errors.selectBusiness");
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
|
-
const
|
|
54
|
-
|
|
53
|
+
const c = _.account.clientId, r = new AbortController();
|
|
54
|
+
v = r, d.value = !0, g.value = "";
|
|
55
55
|
try {
|
|
56
|
-
await J.deleteClient(
|
|
56
|
+
await J.deleteClient(V, c, r.signal), r.signal.aborted || s("removed", c);
|
|
57
57
|
} catch {
|
|
58
|
-
|
|
58
|
+
r.signal.aborted || (g.value = n("connect.whatsappBot.errors.removeAccount"));
|
|
59
59
|
} finally {
|
|
60
|
-
|
|
60
|
+
v === r && (v = void 0, d.value = !1);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
|
|
63
|
+
function P() {
|
|
64
|
+
v == null || v.abort(), v = void 0, d.value = !1, g.value = "";
|
|
65
65
|
}
|
|
66
66
|
return H(
|
|
67
67
|
() => K.getBusinessId(),
|
|
68
68
|
() => {
|
|
69
|
-
|
|
69
|
+
P(), y.value = !1;
|
|
70
70
|
}
|
|
71
|
-
), te(
|
|
72
|
-
const
|
|
73
|
-
return o(),
|
|
71
|
+
), te(P), (V, c) => {
|
|
72
|
+
const r = B("RouterLink"), j = B("FmCircularProgress"), O = B("FmIcon"), q = B("FmMenuItem"), ee = B("FmMenu");
|
|
73
|
+
return o(), p("li", xe, [
|
|
74
74
|
t("div", {
|
|
75
75
|
class: R(["relative h-full border border-fm-color-neutral-gray-100 rounded-[16px] p-[20px] flex flex-col gap-[16px] bg-fm-color-neutral-white text-fm-color-typo-primary", {
|
|
76
|
-
"cursor-pointer transition-shadow hover:border-fm-color-neutral-gray-200 hover:fm-shadow-light-100":
|
|
76
|
+
"cursor-pointer transition-shadow hover:border-fm-color-neutral-gray-200 hover:fm-shadow-light-100": f.value
|
|
77
77
|
}])
|
|
78
78
|
}, [
|
|
79
79
|
t("div", ve, [
|
|
80
80
|
t("div", {
|
|
81
81
|
"aria-hidden": "true",
|
|
82
|
-
class: R(["w-[48px] h-[48px] rounded-full overflow-hidden shrink-0 flex items-center justify-center text-[16px] font-semibold text-fm-color-typo-white", e(
|
|
82
|
+
class: R(["w-[48px] h-[48px] rounded-full overflow-hidden shrink-0 flex items-center justify-center text-[16px] font-semibold text-fm-color-typo-white", e(E)])
|
|
83
83
|
}, [
|
|
84
|
-
e(l) && !e(
|
|
84
|
+
e(l) && !e(i) ? (o(), p("img", {
|
|
85
85
|
key: 0,
|
|
86
86
|
src: e(l),
|
|
87
87
|
alt: "",
|
|
88
88
|
class: "w-full h-full object-cover",
|
|
89
89
|
referrerpolicy: "no-referrer",
|
|
90
|
-
onError:
|
|
91
|
-
}, null, 40, he)) : (o(),
|
|
90
|
+
onError: c[0] || (c[0] = (U) => i.value = !0)
|
|
91
|
+
}, null, 40, he)) : (o(), p("span", _e, a(e(I)), 1))
|
|
92
92
|
], 2),
|
|
93
93
|
t("div", ge, [
|
|
94
94
|
t("h2", {
|
|
95
95
|
class: "text-[16px] leading-[24px] font-semibold truncate",
|
|
96
|
-
title: e(
|
|
96
|
+
title: e(C)
|
|
97
97
|
}, [
|
|
98
|
-
|
|
98
|
+
f.value ? (o(), A(r, {
|
|
99
99
|
key: 0,
|
|
100
|
-
to:
|
|
100
|
+
to: h.value,
|
|
101
101
|
class: "text-inherit no-underline after:absolute after:inset-0 after:rounded-[16px] focus-visible:outline-none focus-visible:after:ring-[2px] focus-visible:after:ring-fm-color-primary focus-visible:after:ring-offset-[2px]"
|
|
102
102
|
}, {
|
|
103
103
|
default: S(() => [
|
|
104
|
-
Q(a(e(
|
|
104
|
+
Q(a(e(C)), 1)
|
|
105
105
|
]),
|
|
106
106
|
_: 1
|
|
107
|
-
}, 8, ["to"])) : (o(),
|
|
107
|
+
}, 8, ["to"])) : (o(), p("span", be, a(e(C)), 1))
|
|
108
108
|
], 8, ye),
|
|
109
109
|
t("p", we, a(e(b)), 1)
|
|
110
110
|
]),
|
|
111
111
|
t("div", Be, [
|
|
112
|
-
|
|
112
|
+
k(ee, {
|
|
113
113
|
placement: "bottom-end",
|
|
114
114
|
width: 220,
|
|
115
|
-
disabled:
|
|
115
|
+
disabled: d.value,
|
|
116
116
|
"stop-click-propagation": "",
|
|
117
|
-
onMenuChanged:
|
|
117
|
+
onMenuChanged: c[3] || (c[3] = (U) => x.value = U)
|
|
118
118
|
}, {
|
|
119
119
|
"menu-button": S(() => [
|
|
120
120
|
t("button", {
|
|
@@ -122,16 +122,16 @@ const xe = { class: "min-w-0" }, ve = { class: "flex items-center gap-[12px]" },
|
|
|
122
122
|
"aria-label": e(n)("connect.whatsappBot.moreActions"),
|
|
123
123
|
title: e(n)("connect.whatsappBot.moreActions"),
|
|
124
124
|
"aria-haspopup": "menu",
|
|
125
|
-
"aria-expanded":
|
|
126
|
-
disabled:
|
|
127
|
-
"aria-busy":
|
|
128
|
-
class: R(["w-[32px] h-[32px] flex items-center justify-center rounded-[8px] text-fm-color-typo-tertiary transition-colors hover:bg-fm-color-neutral-gray-100 hover:text-fm-color-typo-primary focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary disabled:cursor-wait disabled:opacity-50", { "bg-fm-color-neutral-gray-100":
|
|
125
|
+
"aria-expanded": x.value,
|
|
126
|
+
disabled: d.value,
|
|
127
|
+
"aria-busy": d.value,
|
|
128
|
+
class: R(["w-[32px] h-[32px] flex items-center justify-center rounded-[8px] text-fm-color-typo-tertiary transition-colors hover:bg-fm-color-neutral-gray-100 hover:text-fm-color-typo-primary focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary disabled:cursor-wait disabled:opacity-50", { "bg-fm-color-neutral-gray-100": x.value }])
|
|
129
129
|
}, [
|
|
130
|
-
|
|
130
|
+
d.value ? (o(), A(j, {
|
|
131
131
|
key: 0,
|
|
132
132
|
size: "md",
|
|
133
133
|
"aria-hidden": "true"
|
|
134
|
-
})) : (o(),
|
|
134
|
+
})) : (o(), A(O, {
|
|
135
135
|
key: 1,
|
|
136
136
|
name: "more_vert",
|
|
137
137
|
size: "sm",
|
|
@@ -140,14 +140,14 @@ const xe = { class: "min-w-0" }, ve = { class: "flex items-center gap-[12px]" },
|
|
|
140
140
|
], 10, ke)
|
|
141
141
|
]),
|
|
142
142
|
default: S(() => [
|
|
143
|
-
|
|
143
|
+
f.value ? (o(), A(q, {
|
|
144
144
|
key: 0,
|
|
145
145
|
label: e(n)("connect.whatsappBot.notificationGroup.title"),
|
|
146
|
-
disabled:
|
|
147
|
-
"onUpdate:modelValue":
|
|
146
|
+
disabled: d.value,
|
|
147
|
+
"onUpdate:modelValue": c[1] || (c[1] = (U) => y.value = !0)
|
|
148
148
|
}, {
|
|
149
149
|
prepend: S(() => [
|
|
150
|
-
|
|
150
|
+
k(O, {
|
|
151
151
|
name: "notifications",
|
|
152
152
|
size: "sm",
|
|
153
153
|
outline: "",
|
|
@@ -156,12 +156,12 @@ const xe = { class: "min-w-0" }, ve = { class: "flex items-center gap-[12px]" },
|
|
|
156
156
|
]),
|
|
157
157
|
_: 1
|
|
158
158
|
}, 8, ["label", "disabled"])) : D("", !0),
|
|
159
|
-
|
|
160
|
-
disabled:
|
|
161
|
-
"onUpdate:modelValue":
|
|
159
|
+
k(q, {
|
|
160
|
+
disabled: d.value,
|
|
161
|
+
"onUpdate:modelValue": c[2] || (c[2] = (U) => L())
|
|
162
162
|
}, {
|
|
163
163
|
prepend: S(() => [
|
|
164
|
-
|
|
164
|
+
k(O, {
|
|
165
165
|
name: "delete",
|
|
166
166
|
size: "sm",
|
|
167
167
|
outline: "",
|
|
@@ -180,18 +180,18 @@ const xe = { class: "min-w-0" }, ve = { class: "flex items-center gap-[12px]" },
|
|
|
180
180
|
])
|
|
181
181
|
]),
|
|
182
182
|
t("div", Ce, [
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
date:
|
|
183
|
+
k(fe, { state: e(T) }, null, 8, ["state"]),
|
|
184
|
+
f.value && $.account.connectedAt ? (o(), p("span", Ae, a(e(n)("connect.whatsappBot.connectedSince", {
|
|
185
|
+
date: W($.account.connectedAt)
|
|
186
186
|
})), 1)) : D("", !0)
|
|
187
187
|
]),
|
|
188
|
-
|
|
188
|
+
g.value ? (o(), p("p", Ie, a(g.value), 1)) : D("", !0)
|
|
189
189
|
], 2),
|
|
190
|
-
y.value ? (o(),
|
|
190
|
+
y.value ? (o(), A(de, {
|
|
191
191
|
key: 0,
|
|
192
192
|
modelValue: y.value,
|
|
193
|
-
"onUpdate:modelValue":
|
|
194
|
-
account:
|
|
193
|
+
"onUpdate:modelValue": c[4] || (c[4] = (U) => y.value = U),
|
|
194
|
+
account: $.account
|
|
195
195
|
}, null, 8, ["modelValue", "account"])) : D("", !0)
|
|
196
196
|
]);
|
|
197
197
|
};
|
|
@@ -202,13 +202,13 @@ const xe = { class: "min-w-0" }, ve = { class: "flex items-center gap-[12px]" },
|
|
|
202
202
|
accounts: {}
|
|
203
203
|
},
|
|
204
204
|
emits: ["removed"],
|
|
205
|
-
setup(
|
|
206
|
-
const
|
|
207
|
-
return (
|
|
208
|
-
(o(!0),
|
|
209
|
-
key:
|
|
210
|
-
account:
|
|
211
|
-
onRemoved: n[0] || (n[0] = (
|
|
205
|
+
setup($, { emit: m }) {
|
|
206
|
+
const _ = m;
|
|
207
|
+
return (s, n) => (o(), p("ul", Fe, [
|
|
208
|
+
(o(!0), p(G, null, X($.accounts, (u) => (o(), A(Te, {
|
|
209
|
+
key: u.clientId,
|
|
210
|
+
account: u,
|
|
211
|
+
onRemoved: n[0] || (n[0] = (d) => _("removed", d))
|
|
212
212
|
}, null, 8, ["account"]))), 128))
|
|
213
213
|
]));
|
|
214
214
|
}
|
|
@@ -232,167 +232,173 @@ const xe = { class: "min-w-0" }, ve = { class: "flex items-center gap-[12px]" },
|
|
|
232
232
|
class: "flex w-full flex-col items-center gap-[12px]"
|
|
233
233
|
}, Re = {
|
|
234
234
|
key: 0,
|
|
235
|
-
role: "status",
|
|
236
235
|
class: "flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
|
|
237
236
|
}, He = {
|
|
238
237
|
role: "alert",
|
|
239
238
|
class: "text-[14px] text-fm-color-typo-error"
|
|
240
239
|
}, ze = ["src", "alt"], Qe = { class: "flex w-full min-w-0 flex-col gap-[6px]" }, Ke = { class: "text-[13px] font-medium text-fm-color-typo-secondary" }, Ze = ["href"], Je = { class: "w-full rounded-[12px] bg-fm-color-neutral-gray-100 p-[16px] text-[14px] leading-[20px]" }, Xe = { class: "flex w-full items-center justify-between gap-[12px]" }, Ye = /* @__PURE__ */ Z({
|
|
241
240
|
__name: "WhatsappBotTutorialDialog",
|
|
242
|
-
props: /* @__PURE__ */
|
|
241
|
+
props: /* @__PURE__ */ ae({
|
|
243
242
|
clientId: {}
|
|
244
243
|
}, {
|
|
245
244
|
modelValue: { type: Boolean, required: !0 },
|
|
246
245
|
modelModifiers: {}
|
|
247
246
|
}),
|
|
248
247
|
emits: ["update:modelValue"],
|
|
249
|
-
setup(
|
|
250
|
-
const m =
|
|
248
|
+
setup($) {
|
|
249
|
+
const m = $, _ = le($, "modelValue"), { t: s } = Y(), n = w(0), u = M(() => z[n.value]), d = M(
|
|
251
250
|
() => n.value === z.length - 1
|
|
252
|
-
),
|
|
251
|
+
), g = M(() => K.getBusinessId()), x = w(""), y = w(""), v = w(!1), C = w("");
|
|
253
252
|
let b;
|
|
254
|
-
|
|
253
|
+
function I(l) {
|
|
254
|
+
if (l instanceof se) {
|
|
255
|
+
if (l.status === 409)
|
|
256
|
+
return s("connect.whatsappBot.notificationGroup.notReady");
|
|
257
|
+
if (l.status === 404)
|
|
258
|
+
return s("connect.whatsappBot.errors.accountNotFound");
|
|
259
|
+
}
|
|
260
|
+
return s("connect.whatsappBot.errors.loadGroup");
|
|
261
|
+
}
|
|
262
|
+
async function T() {
|
|
255
263
|
b == null || b.abort();
|
|
256
|
-
const
|
|
257
|
-
b =
|
|
264
|
+
const l = new AbortController();
|
|
265
|
+
b = l, x.value = "", y.value = "", C.value = "", v.value = !0;
|
|
258
266
|
try {
|
|
259
|
-
if (!
|
|
260
|
-
|
|
261
|
-
|
|
267
|
+
if (!g.value || !m.clientId) {
|
|
268
|
+
C.value = s(
|
|
269
|
+
g.value ? "connect.whatsappBot.notificationGroup.notReady" : "connect.whatsappBot.errors.selectBusiness"
|
|
262
270
|
);
|
|
263
271
|
return;
|
|
264
272
|
}
|
|
265
|
-
const
|
|
266
|
-
|
|
273
|
+
const i = await J.getNotificationGroup(
|
|
274
|
+
g.value,
|
|
267
275
|
m.clientId,
|
|
268
|
-
|
|
276
|
+
l.signal
|
|
269
277
|
);
|
|
270
|
-
if (
|
|
271
|
-
const
|
|
278
|
+
if (l.signal.aborted) return;
|
|
279
|
+
const f = await re.toDataURL(i.inviteLink, {
|
|
272
280
|
width: 224,
|
|
273
281
|
margin: 2,
|
|
274
282
|
errorCorrectionLevel: "M"
|
|
275
283
|
});
|
|
276
|
-
if (
|
|
277
|
-
|
|
278
|
-
} catch (
|
|
279
|
-
if (
|
|
280
|
-
|
|
281
|
-
l instanceof oe && l.status === 409 ? "connect.whatsappBot.notificationGroup.notReady" : l instanceof oe && l.status === 404 ? "connect.whatsappBot.errors.accountNotFound" : "connect.whatsappBot.errors.loadGroup"
|
|
282
|
-
);
|
|
284
|
+
if (l.signal.aborted) return;
|
|
285
|
+
x.value = i.inviteLink, y.value = f;
|
|
286
|
+
} catch (i) {
|
|
287
|
+
if (l.signal.aborted) return;
|
|
288
|
+
C.value = I(i);
|
|
283
289
|
} finally {
|
|
284
|
-
|
|
290
|
+
l.signal.aborted || (v.value = !1);
|
|
285
291
|
}
|
|
286
292
|
}
|
|
287
293
|
H(
|
|
288
|
-
[
|
|
289
|
-
([
|
|
290
|
-
|
|
294
|
+
[_, () => u.value.key, g, () => m.clientId],
|
|
295
|
+
([l, i]) => {
|
|
296
|
+
l && i === "escalations" ? T() : b == null || b.abort();
|
|
291
297
|
}
|
|
292
298
|
), te(() => b == null ? void 0 : b.abort());
|
|
293
|
-
function
|
|
294
|
-
|
|
299
|
+
function E() {
|
|
300
|
+
d.value ? _.value = !1 : n.value += 1;
|
|
295
301
|
}
|
|
296
|
-
return H(
|
|
297
|
-
|
|
298
|
-
}), (
|
|
299
|
-
const
|
|
300
|
-
return o(),
|
|
301
|
-
modelValue:
|
|
302
|
-
"onUpdate:modelValue":
|
|
302
|
+
return H(_, (l) => {
|
|
303
|
+
l && (n.value = 0);
|
|
304
|
+
}), (l, i) => {
|
|
305
|
+
const f = B("FmIcon"), h = B("FmCircularProgress"), W = B("FmButton"), L = B("FmDialog");
|
|
306
|
+
return o(), A(L, {
|
|
307
|
+
modelValue: _.value,
|
|
308
|
+
"onUpdate:modelValue": i[1] || (i[1] = (P) => _.value = P),
|
|
303
309
|
"min-width": "min(600px, calc(100% - 32px))",
|
|
304
310
|
"max-width": "600px",
|
|
305
311
|
"max-height": "90vh",
|
|
306
312
|
"dismiss-away": ""
|
|
307
313
|
}, {
|
|
308
314
|
"dialog-header": S(() => [
|
|
309
|
-
t("h2", Pe, a(e(
|
|
315
|
+
t("h2", Pe, a(e(s)("connect.whatsappBot.tutorial.title")), 1)
|
|
310
316
|
]),
|
|
311
317
|
"dialog-footer": S(() => [
|
|
312
318
|
t("div", Xe, [
|
|
313
|
-
|
|
319
|
+
k(W, {
|
|
314
320
|
variant: "secondary",
|
|
315
321
|
"border-color": "neutral-gray-200",
|
|
316
|
-
label: e(
|
|
322
|
+
label: e(s)("connect.common.back"),
|
|
317
323
|
disabled: n.value === 0,
|
|
318
324
|
"prepend-icon": "chevron_left",
|
|
319
325
|
class: "!rounded-full [&_.label]:text-[14px]",
|
|
320
|
-
onClick:
|
|
326
|
+
onClick: i[0] || (i[0] = (P) => n.value -= 1)
|
|
321
327
|
}, null, 8, ["label", "disabled"]),
|
|
322
|
-
|
|
323
|
-
label:
|
|
324
|
-
"append-icon":
|
|
328
|
+
k(W, {
|
|
329
|
+
label: d.value ? e(s)("connect.whatsappBot.tutorial.done") : e(s)("connect.common.next"),
|
|
330
|
+
"append-icon": d.value ? void 0 : "chevron_right",
|
|
325
331
|
class: "!rounded-full [&_.label]:text-[14px]",
|
|
326
|
-
onClick:
|
|
332
|
+
onClick: E
|
|
327
333
|
}, null, 8, ["label", "append-icon"])
|
|
328
334
|
])
|
|
329
335
|
]),
|
|
330
336
|
default: S(() => [
|
|
331
337
|
t("div", Ve, [
|
|
332
338
|
t("div", Le, [
|
|
333
|
-
t("p", De, a(e(
|
|
339
|
+
t("p", De, a(e(s)("connect.whatsappBot.tutorial.progress", {
|
|
334
340
|
current: n.value + 1,
|
|
335
341
|
total: e(z).length
|
|
336
342
|
})), 1),
|
|
337
343
|
t("div", Ee, [
|
|
338
|
-
(o(!0),
|
|
339
|
-
key:
|
|
344
|
+
(o(!0), p(G, null, X(e(z), (P, V) => (o(), p("span", {
|
|
345
|
+
key: V,
|
|
340
346
|
class: R([
|
|
341
347
|
"h-[4px] flex-1 rounded-full",
|
|
342
|
-
|
|
348
|
+
V <= n.value ? "bg-fm-color-primary" : "bg-fm-color-neutral-gray-100"
|
|
343
349
|
])
|
|
344
350
|
}, null, 2))), 128))
|
|
345
351
|
])
|
|
346
352
|
]),
|
|
347
353
|
t("div", Me, [
|
|
348
|
-
t("span", We, a(e(
|
|
354
|
+
t("span", We, a(e(s)("connect.whatsappBot.tutorial.progress", {
|
|
349
355
|
current: n.value + 1,
|
|
350
356
|
total: e(z).length
|
|
351
357
|
})), 1),
|
|
352
358
|
t("div", je, [
|
|
353
|
-
|
|
354
|
-
name:
|
|
359
|
+
k(f, {
|
|
360
|
+
name: u.value.icon,
|
|
355
361
|
size: "lg"
|
|
356
362
|
}, null, 8, ["name"])
|
|
357
363
|
]),
|
|
358
364
|
t("div", Oe, [
|
|
359
|
-
t("h3", Ue, a(e(
|
|
360
|
-
t("p", Ne, a(e(
|
|
361
|
-
`connect.whatsappBot.tutorial.steps.${
|
|
365
|
+
t("h3", Ue, a(e(s)(`connect.whatsappBot.tutorial.steps.${u.value.key}.title`)), 1),
|
|
366
|
+
t("p", Ne, a(e(s)(
|
|
367
|
+
`connect.whatsappBot.tutorial.steps.${u.value.key}.description`
|
|
362
368
|
)), 1)
|
|
363
369
|
]),
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
Q(" " + a(e(
|
|
368
|
-
])) :
|
|
369
|
-
t("p", He, a(
|
|
370
|
-
|
|
371
|
-
label: e(
|
|
370
|
+
u.value.key === "escalations" ? (o(), p("div", Ge, [
|
|
371
|
+
v.value ? (o(), p("output", Re, [
|
|
372
|
+
k(h),
|
|
373
|
+
Q(" " + a(e(s)("connect.whatsappBot.notificationGroup.loading")), 1)
|
|
374
|
+
])) : C.value ? (o(), p(G, { key: 1 }, [
|
|
375
|
+
t("p", He, a(C.value), 1),
|
|
376
|
+
k(W, {
|
|
377
|
+
label: e(s)("connect.whatsappBot.tryAgain"),
|
|
372
378
|
"prepend-icon": "refresh",
|
|
373
379
|
class: "!rounded-full [&_.label]:text-[14px]",
|
|
374
|
-
onClick:
|
|
380
|
+
onClick: T
|
|
375
381
|
}, null, 8, ["label"])
|
|
376
|
-
], 64)) :
|
|
382
|
+
], 64)) : x.value ? (o(), p(G, { key: 2 }, [
|
|
377
383
|
t("img", {
|
|
378
384
|
src: y.value,
|
|
379
|
-
alt: e(
|
|
385
|
+
alt: e(s)("connect.whatsappBot.notificationGroup.qrAlt"),
|
|
380
386
|
width: "224",
|
|
381
387
|
height: "224",
|
|
382
388
|
class: "rounded-[12px] border border-fm-color-neutral-gray-100"
|
|
383
389
|
}, null, 8, ze),
|
|
384
390
|
t("div", Qe, [
|
|
385
|
-
t("span", Ke, a(e(
|
|
391
|
+
t("span", Ke, a(e(s)("connect.whatsappBot.notificationGroup.inviteLink")), 1),
|
|
386
392
|
t("a", {
|
|
387
|
-
href:
|
|
393
|
+
href: x.value,
|
|
388
394
|
target: "_blank",
|
|
389
395
|
rel: "noopener noreferrer",
|
|
390
396
|
class: "break-all rounded-[8px] border border-fm-color-neutral-gray-200 p-[12px] font-mono text-[13px] text-fm-color-primary underline focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary"
|
|
391
|
-
}, a(
|
|
397
|
+
}, a(x.value), 9, Ze)
|
|
392
398
|
])
|
|
393
399
|
], 64)) : D("", !0)
|
|
394
400
|
])) : D("", !0),
|
|
395
|
-
t("p", Je, a(e(
|
|
401
|
+
t("p", Je, a(e(s)(`connect.whatsappBot.tutorial.steps.${u.value.key}.hint`)), 1)
|
|
396
402
|
])
|
|
397
403
|
])
|
|
398
404
|
]),
|
|
@@ -402,14 +408,12 @@ const xe = { class: "min-w-0" }, ve = { class: "flex items-center gap-[12px]" },
|
|
|
402
408
|
}
|
|
403
409
|
}), qe = { class: "text-[18px] font-semibold" }, et = {
|
|
404
410
|
key: 0,
|
|
405
|
-
role: "status",
|
|
406
411
|
class: "flex flex-col items-center text-center gap-[8px] px-[8px] py-[40px]"
|
|
407
412
|
}, tt = { class: "text-[18px] font-semibold" }, ot = { class: "text-[14px] text-fm-color-typo-secondary break-all" }, nt = {
|
|
408
413
|
key: 1,
|
|
409
414
|
class: "grid grid-cols-[minmax(0,1fr)_232px] xs:grid-cols-1 gap-[32px] p-[8px] xs:p-[0px]"
|
|
410
415
|
}, at = { class: "flex flex-col gap-[20px] text-[14px] leading-[20px]" }, lt = { class: "text-fm-color-typo-secondary" }, st = { class: "flex flex-col gap-[14px]" }, rt = { class: "w-[22px] h-[22px] shrink-0 rounded-full bg-fm-color-neutral-gray-100 flex items-center justify-center text-[12px] font-semibold" }, ct = { key: 0 }, it = { class: "font-semibold" }, pt = { class: "font-semibold" }, ut = { class: "font-semibold" }, dt = { class: "font-semibold" }, mt = { key: 3 }, ft = { class: "text-[12px] leading-[16px] text-fm-color-typo-tertiary" }, xt = { class: "relative w-[232px] h-[232px] xs:justify-self-center border border-fm-color-neutral-gray-100 rounded-[12px] flex items-center justify-center overflow-hidden" }, vt = {
|
|
411
416
|
key: 0,
|
|
412
|
-
role: "status",
|
|
413
417
|
class: "flex flex-col items-center gap-[12px] text-[13px]"
|
|
414
418
|
}, ht = {
|
|
415
419
|
key: 1,
|
|
@@ -419,7 +423,6 @@ const xe = { class: "min-w-0" }, ve = { class: "flex items-center gap-[12px]" },
|
|
|
419
423
|
class: "text-[14px] text-fm-color-typo-error"
|
|
420
424
|
}, gt = ["src", "alt"], yt = {
|
|
421
425
|
key: 3,
|
|
422
|
-
role: "status",
|
|
423
426
|
"aria-live": "polite",
|
|
424
427
|
class: "absolute inset-0 bg-fm-color-neutral-white/90 flex flex-col items-center justify-center gap-[10px] text-[13px] font-medium"
|
|
425
428
|
}, bt = /* @__PURE__ */ Z({
|
|
@@ -428,74 +431,74 @@ const xe = { class: "min-w-0" }, ve = { class: "flex items-center gap-[12px]" },
|
|
|
428
431
|
modelValue: { type: Boolean, required: !0 },
|
|
429
432
|
modelModifiers: {}
|
|
430
433
|
},
|
|
431
|
-
emits: /* @__PURE__ */
|
|
432
|
-
setup(
|
|
433
|
-
const
|
|
434
|
-
let
|
|
434
|
+
emits: /* @__PURE__ */ ae(["connected"], ["update:modelValue"]),
|
|
435
|
+
setup($, { emit: m }) {
|
|
436
|
+
const _ = le($, "modelValue"), s = m, { t: n } = Y(), u = w(""), d = w(!1), g = w(""), x = w(!1), y = w();
|
|
437
|
+
let v, C, b;
|
|
435
438
|
function I() {
|
|
436
|
-
|
|
439
|
+
v == null || v.abort(), clearTimeout(C), C = void 0, clearTimeout(b), b = void 0;
|
|
437
440
|
}
|
|
438
|
-
async function
|
|
439
|
-
if (!
|
|
441
|
+
async function T(l, i, f) {
|
|
442
|
+
if (!f.aborted) {
|
|
440
443
|
try {
|
|
441
|
-
const
|
|
442
|
-
if (
|
|
443
|
-
if (
|
|
444
|
-
I(),
|
|
445
|
-
|
|
444
|
+
const h = await J.getClient(l, i, f);
|
|
445
|
+
if (f.aborted) return;
|
|
446
|
+
if (x.value = h.status === "connected" || h.status === "connecting" && h.connectedAt !== null, h.status === "connected" && h.connectedAt !== null && h.profileStatus === "ready") {
|
|
447
|
+
I(), x.value = !1, y.value = h, s("connected", h), b = setTimeout(() => {
|
|
448
|
+
_.value = !1;
|
|
446
449
|
}, 1800);
|
|
447
450
|
return;
|
|
448
451
|
}
|
|
449
|
-
if (
|
|
450
|
-
I(),
|
|
452
|
+
if (h.status === "disconnected") {
|
|
453
|
+
I(), x.value = !1, u.value = "", g.value = n("connect.whatsappBot.errors.qrExpired");
|
|
451
454
|
return;
|
|
452
455
|
}
|
|
453
|
-
} catch (
|
|
454
|
-
if (
|
|
455
|
-
if (
|
|
456
|
-
I(),
|
|
456
|
+
} catch (h) {
|
|
457
|
+
if (f.aborted) return;
|
|
458
|
+
if (h instanceof se && h.status === 409) {
|
|
459
|
+
I(), x.value = !1, u.value = "", g.value = n("connect.whatsappBot.errors.accountAlreadyLinked");
|
|
457
460
|
return;
|
|
458
461
|
}
|
|
459
462
|
}
|
|
460
|
-
|
|
461
|
-
|
|
463
|
+
f.aborted || (C = setTimeout(() => {
|
|
464
|
+
T(l, i, f);
|
|
462
465
|
}, 2e3));
|
|
463
466
|
}
|
|
464
467
|
}
|
|
465
|
-
async function
|
|
468
|
+
async function E() {
|
|
466
469
|
I();
|
|
467
470
|
const l = new AbortController();
|
|
468
|
-
|
|
471
|
+
v = l, u.value = "", g.value = "", x.value = !1, y.value = void 0, d.value = !0;
|
|
469
472
|
try {
|
|
470
|
-
const
|
|
471
|
-
if (!
|
|
473
|
+
const i = K.getBusinessId();
|
|
474
|
+
if (!i)
|
|
472
475
|
throw new Error(n("connect.whatsappBot.errors.selectBusiness"));
|
|
473
|
-
const
|
|
474
|
-
|
|
476
|
+
const f = await J.createClient(
|
|
477
|
+
i,
|
|
475
478
|
l.signal
|
|
476
|
-
),
|
|
479
|
+
), h = await re.toDataURL(f.qr, {
|
|
477
480
|
width: 224,
|
|
478
481
|
margin: 2,
|
|
479
482
|
errorCorrectionLevel: "M"
|
|
480
483
|
});
|
|
481
|
-
l.signal.aborted || (
|
|
482
|
-
} catch (
|
|
483
|
-
l.signal.aborted || (
|
|
484
|
+
l.signal.aborted || (u.value = h, T(i, f.clientId, l.signal));
|
|
485
|
+
} catch (i) {
|
|
486
|
+
l.signal.aborted || (g.value = i instanceof Error ? i.message : n("connect.whatsappBot.errors.loadQr"));
|
|
484
487
|
} finally {
|
|
485
|
-
l.signal.aborted || (
|
|
488
|
+
l.signal.aborted || (d.value = !1);
|
|
486
489
|
}
|
|
487
490
|
}
|
|
488
491
|
return H(
|
|
489
|
-
|
|
492
|
+
_,
|
|
490
493
|
(l) => {
|
|
491
|
-
l ?
|
|
494
|
+
l ? E() : I();
|
|
492
495
|
},
|
|
493
496
|
{ immediate: !0 }
|
|
494
|
-
), te(I), (l,
|
|
495
|
-
const
|
|
496
|
-
return o(),
|
|
497
|
-
modelValue:
|
|
498
|
-
"onUpdate:modelValue":
|
|
497
|
+
), te(I), (l, i) => {
|
|
498
|
+
const f = B("i18n-t"), h = B("FmCircularProgress"), W = B("FmButton"), L = B("FmDialog");
|
|
499
|
+
return o(), A(L, {
|
|
500
|
+
modelValue: _.value,
|
|
501
|
+
"onUpdate:modelValue": i[0] || (i[0] = (P) => _.value = P),
|
|
499
502
|
"min-width": "min(720px, calc(100% - 32px))",
|
|
500
503
|
"max-width": "720px",
|
|
501
504
|
"max-height": "90vh",
|
|
@@ -505,10 +508,10 @@ const xe = { class: "min-w-0" }, ve = { class: "flex items-center gap-[12px]" },
|
|
|
505
508
|
t("h2", qe, a(e(n)("connect.whatsappBot.connectAccount")), 1)
|
|
506
509
|
]),
|
|
507
510
|
default: S(() => {
|
|
508
|
-
var
|
|
511
|
+
var P, V, c;
|
|
509
512
|
return [
|
|
510
|
-
y.value ? (o(),
|
|
511
|
-
|
|
513
|
+
y.value ? (o(), p("output", et, [
|
|
514
|
+
i[1] || (i[1] = t("div", {
|
|
512
515
|
"aria-hidden": "true",
|
|
513
516
|
class: "w-[64px] h-[64px] rounded-full bg-fm-color-system-success-100 text-fm-color-typo-success flex items-center justify-center mb-[8px]"
|
|
514
517
|
}, [
|
|
@@ -526,17 +529,17 @@ const xe = { class: "min-w-0" }, ve = { class: "flex items-center gap-[12px]" },
|
|
|
526
529
|
])
|
|
527
530
|
], -1)),
|
|
528
531
|
t("h3", tt, a(e(n)("connect.whatsappBot.accountConnected")), 1),
|
|
529
|
-
t("p", ot, a(((
|
|
530
|
-
])) : (o(),
|
|
532
|
+
t("p", ot, a(((P = y.value.account) == null ? void 0 : P.businessName) || ((V = y.value.account) == null ? void 0 : V.name) || e(n)("connect.whatsappBot.unnamedAccount")) + " · " + a(((c = y.value.account) == null ? void 0 : c.phoneNumber) || e(n)("connect.whatsappBot.phoneUnavailable")), 1)
|
|
533
|
+
])) : (o(), p("div", nt, [
|
|
531
534
|
t("div", at, [
|
|
532
535
|
t("p", lt, a(e(n)("connect.whatsappBot.scanDescription")), 1),
|
|
533
536
|
t("ol", st, [
|
|
534
|
-
(o(),
|
|
535
|
-
key:
|
|
537
|
+
(o(), p(G, null, X(4, (r) => t("li", {
|
|
538
|
+
key: r,
|
|
536
539
|
class: "flex gap-[12px]"
|
|
537
540
|
}, [
|
|
538
|
-
t("span", rt, a(
|
|
539
|
-
|
|
541
|
+
t("span", rt, a(r), 1),
|
|
542
|
+
r === 1 ? (o(), p("span", ct, a(e(n)("connect.whatsappBot.steps.openApp")), 1)) : r === 2 ? (o(), A(f, {
|
|
540
543
|
key: 1,
|
|
541
544
|
keypath: "connect.whatsappBot.steps.openSettings",
|
|
542
545
|
tag: "span",
|
|
@@ -549,7 +552,7 @@ const xe = { class: "min-w-0" }, ve = { class: "flex items-center gap-[12px]" },
|
|
|
549
552
|
t("b", pt, a(e(n)("connect.whatsappBot.settings")), 1)
|
|
550
553
|
]),
|
|
551
554
|
_: 1
|
|
552
|
-
})) :
|
|
555
|
+
})) : r === 3 ? (o(), A(f, {
|
|
553
556
|
key: 2,
|
|
554
557
|
keypath: "connect.whatsappBot.steps.linkDevice",
|
|
555
558
|
tag: "span",
|
|
@@ -562,33 +565,33 @@ const xe = { class: "min-w-0" }, ve = { class: "flex items-center gap-[12px]" },
|
|
|
562
565
|
t("b", dt, a(e(n)("connect.whatsappBot.linkDevice")), 1)
|
|
563
566
|
]),
|
|
564
567
|
_: 1
|
|
565
|
-
})) : (o(),
|
|
568
|
+
})) : (o(), p("span", mt, a(e(n)("connect.whatsappBot.steps.scanQr")), 1))
|
|
566
569
|
])), 64))
|
|
567
570
|
]),
|
|
568
571
|
t("p", ft, a(e(n)("connect.whatsappBot.connectionNote")), 1)
|
|
569
572
|
]),
|
|
570
573
|
t("div", xt, [
|
|
571
|
-
|
|
572
|
-
|
|
574
|
+
d.value ? (o(), p("output", vt, [
|
|
575
|
+
k(h),
|
|
573
576
|
Q(a(e(n)("connect.whatsappBot.generatingQr")), 1)
|
|
574
|
-
])) :
|
|
575
|
-
t("p", _t, a(
|
|
576
|
-
|
|
577
|
+
])) : g.value ? (o(), p("div", ht, [
|
|
578
|
+
t("p", _t, a(g.value), 1),
|
|
579
|
+
k(W, {
|
|
577
580
|
label: e(n)("connect.whatsappBot.tryAgain"),
|
|
578
581
|
"prepend-icon": "refresh",
|
|
579
582
|
class: "!rounded-full [&_.label]:text-[14px]",
|
|
580
|
-
onClick:
|
|
583
|
+
onClick: E
|
|
581
584
|
}, null, 8, ["label"])
|
|
582
|
-
])) :
|
|
585
|
+
])) : u.value ? (o(), p("img", {
|
|
583
586
|
key: 2,
|
|
584
|
-
src:
|
|
587
|
+
src: u.value,
|
|
585
588
|
alt: e(n)("connect.whatsappBot.qrAlt"),
|
|
586
589
|
width: "224",
|
|
587
590
|
height: "224",
|
|
588
|
-
class: R({ "opacity-20":
|
|
591
|
+
class: R({ "opacity-20": x.value })
|
|
589
592
|
}, null, 10, gt)) : D("", !0),
|
|
590
|
-
|
|
591
|
-
|
|
593
|
+
x.value ? (o(), p("output", yt, [
|
|
594
|
+
k(h),
|
|
592
595
|
Q(" " + a(e(n)("connect.whatsappBot.connecting")), 1)
|
|
593
596
|
])) : D("", !0)
|
|
594
597
|
])
|
|
@@ -605,12 +608,12 @@ const xe = { class: "min-w-0" }, ve = { class: "flex items-center gap-[12px]" },
|
|
|
605
608
|
}, At = { class: "flex flex-col gap-[4px]" }, It = { class: "text-[14px] leading-[20px] font-semibold" }, Tt = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary" }, Ft = /* @__PURE__ */ Z({
|
|
606
609
|
__name: "WhatsappEmptyState",
|
|
607
610
|
emits: ["connect"],
|
|
608
|
-
setup(
|
|
609
|
-
const
|
|
610
|
-
return (n,
|
|
611
|
-
const
|
|
612
|
-
return o(),
|
|
613
|
-
|
|
611
|
+
setup($, { emit: m }) {
|
|
612
|
+
const _ = m, { t: s } = Y();
|
|
613
|
+
return (n, u) => {
|
|
614
|
+
const d = B("FmIcon"), g = B("FmButton");
|
|
615
|
+
return o(), p("div", wt, [
|
|
616
|
+
u[1] || (u[1] = t("div", { class: "w-[72px] h-[72px] rounded-full bg-fm-color-primary-oats text-fm-color-primary flex items-center justify-center mb-[12px]" }, [
|
|
614
617
|
t("svg", {
|
|
615
618
|
width: "34",
|
|
616
619
|
height: "34",
|
|
@@ -626,79 +629,78 @@ const xe = { class: "min-w-0" }, ve = { class: "flex items-center gap-[12px]" },
|
|
|
626
629
|
t("path", { d: "M9 10h.01M12 10h.01M15 10h.01" })
|
|
627
630
|
])
|
|
628
631
|
], -1)),
|
|
629
|
-
t("h2", Bt, a(e(
|
|
630
|
-
t("p", kt, a(e(
|
|
632
|
+
t("h2", Bt, a(e(s)("connect.whatsappBot.emptyTitle")), 1),
|
|
633
|
+
t("p", kt, a(e(s)("connect.whatsappBot.emptyDescription")), 1),
|
|
631
634
|
t("ul", {
|
|
632
|
-
"aria-label": e(
|
|
635
|
+
"aria-label": e(s)("connect.whatsappBot.tutorial.title"),
|
|
633
636
|
class: "mt-[24px] grid w-full max-w-[880px] grid-cols-2 xs:grid-cols-1 gap-[20px] text-left"
|
|
634
637
|
}, [
|
|
635
|
-
(o(!0),
|
|
636
|
-
key:
|
|
638
|
+
(o(!0), p(G, null, X(e(z), (x) => (o(), p("li", {
|
|
639
|
+
key: x.key,
|
|
637
640
|
class: "flex items-start gap-[12px]"
|
|
638
641
|
}, [
|
|
639
642
|
t("div", Ct, [
|
|
640
|
-
|
|
641
|
-
name:
|
|
643
|
+
k(d, {
|
|
644
|
+
name: x.icon,
|
|
642
645
|
size: "sm"
|
|
643
646
|
}, null, 8, ["name"])
|
|
644
647
|
]),
|
|
645
648
|
t("div", At, [
|
|
646
|
-
t("h3", It, a(e(
|
|
647
|
-
t("p", Tt, a(e(
|
|
649
|
+
t("h3", It, a(e(s)(`connect.whatsappBot.tutorial.steps.${x.key}.title`)), 1),
|
|
650
|
+
t("p", Tt, a(e(s)(`connect.whatsappBot.tutorial.steps.${x.key}.description`)), 1)
|
|
648
651
|
])
|
|
649
652
|
]))), 128))
|
|
650
653
|
], 8, $t),
|
|
651
|
-
|
|
654
|
+
k(g, {
|
|
652
655
|
class: "mt-[16px] !rounded-full !px-[20px] [&_.label]:text-[14px]",
|
|
653
|
-
label: e(
|
|
656
|
+
label: e(s)("connect.whatsappBot.connectAccount"),
|
|
654
657
|
"prepend-icon": "add",
|
|
655
|
-
onClick:
|
|
658
|
+
onClick: u[0] || (u[0] = (x) => _("connect"))
|
|
656
659
|
}, null, 8, ["label"])
|
|
657
660
|
]);
|
|
658
661
|
};
|
|
659
662
|
}
|
|
660
663
|
});
|
|
661
|
-
function St(
|
|
662
|
-
const m =
|
|
663
|
-
let
|
|
664
|
-
function
|
|
665
|
-
return `feedme_connect_whatsapp_bot_tutorial:${
|
|
664
|
+
function St($) {
|
|
665
|
+
const m = w(!1);
|
|
666
|
+
let _ = !1, s = !1, n = !1;
|
|
667
|
+
function u() {
|
|
668
|
+
return `feedme_connect_whatsapp_bot_tutorial:${$.value}`;
|
|
666
669
|
}
|
|
667
|
-
function
|
|
668
|
-
let
|
|
670
|
+
function d(y) {
|
|
671
|
+
let v = n;
|
|
669
672
|
try {
|
|
670
|
-
|
|
673
|
+
v || (v = localStorage.getItem(u()) === "1");
|
|
671
674
|
} catch {
|
|
672
675
|
}
|
|
673
|
-
|
|
676
|
+
_ = !!$.value && !y && !v, s = !1;
|
|
674
677
|
}
|
|
675
|
-
function
|
|
676
|
-
|
|
678
|
+
function g() {
|
|
679
|
+
s = _;
|
|
677
680
|
}
|
|
678
|
-
function
|
|
679
|
-
if (
|
|
681
|
+
function x() {
|
|
682
|
+
if (s) {
|
|
680
683
|
m.value = !0, n = !0;
|
|
681
684
|
try {
|
|
682
|
-
localStorage.setItem(
|
|
685
|
+
localStorage.setItem(u(), "1");
|
|
683
686
|
} catch {
|
|
684
687
|
}
|
|
685
688
|
}
|
|
686
|
-
|
|
689
|
+
_ = !1, s = !1;
|
|
687
690
|
}
|
|
688
691
|
return H(
|
|
689
|
-
|
|
692
|
+
$,
|
|
690
693
|
() => {
|
|
691
|
-
m.value = !1,
|
|
694
|
+
m.value = !1, _ = !1, s = !1, n = !1;
|
|
692
695
|
},
|
|
693
696
|
{ flush: "sync" }
|
|
694
|
-
), { tutorialOpen: m, startConnection:
|
|
697
|
+
), { tutorialOpen: m, startConnection: d, onConnected: g, onConnectionClosed: x };
|
|
695
698
|
}
|
|
696
699
|
const Pt = { class: "px-[24px] xs:px-[12px] pt-[20px] pb-[40px] text-fm-color-typo-primary" }, Vt = { class: "flex items-center justify-between gap-[16px] flex-wrap min-h-[40px]" }, Lt = { class: "flex items-center gap-8" }, Dt = { class: "text-[24px] leading-[32px] font-semibold tracking-[-0.01em]" }, Et = { class: "flex items-center gap-[8px] flex-wrap" }, Mt = {
|
|
697
700
|
key: 0,
|
|
698
701
|
class: "mt-[8px] w-full text-[14px] leading-[20px] text-fm-color-typo-secondary [text-wrap:pretty]"
|
|
699
702
|
}, Wt = ["aria-label"], jt = {
|
|
700
703
|
key: 3,
|
|
701
|
-
role: "status",
|
|
702
704
|
class: "mt-[24px] py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
|
|
703
705
|
}, Ot = {
|
|
704
706
|
key: 4,
|
|
@@ -708,164 +710,164 @@ const Pt = { class: "px-[24px] xs:px-[12px] pt-[20px] pb-[40px] text-fm-color-ty
|
|
|
708
710
|
class: "text-[14px] text-fm-color-typo-error"
|
|
709
711
|
}, Yt = /* @__PURE__ */ Z({
|
|
710
712
|
__name: "WhatsappBot",
|
|
711
|
-
setup(
|
|
712
|
-
const { t: m } = Y(),
|
|
713
|
-
var
|
|
714
|
-
return !!((
|
|
715
|
-
}),
|
|
716
|
-
let
|
|
713
|
+
setup($) {
|
|
714
|
+
const { t: m } = Y(), _ = ie(), s = pe(), n = M(() => {
|
|
715
|
+
var c, r;
|
|
716
|
+
return !!((r = (c = s.sessionUser.value) == null ? void 0 : c.role) != null && r.isAdmin);
|
|
717
|
+
}), u = M(() => K.getBusinessId()), { tutorialOpen: d, startConnection: g, onConnected: x, onConnectionClosed: y } = St(u), v = w([]), C = w(), b = w(!0), I = w("");
|
|
718
|
+
let T, E;
|
|
717
719
|
const l = M(
|
|
718
|
-
() =>
|
|
719
|
-
),
|
|
720
|
+
() => v.value.filter((c) => me(c) !== void 0)
|
|
721
|
+
), i = M(
|
|
720
722
|
() => [
|
|
721
723
|
{
|
|
722
724
|
label: m("connect.whatsappBot.accounts"),
|
|
723
|
-
value:
|
|
725
|
+
value: N["$connect-WHATSAPP_BOT"],
|
|
724
726
|
badge: l.value.length
|
|
725
727
|
},
|
|
726
728
|
{
|
|
727
729
|
label: m("connect.whatsappBot.settings"),
|
|
728
|
-
value:
|
|
730
|
+
value: N["$connect-WHATSAPP_BOT_SETTINGS"]
|
|
729
731
|
},
|
|
730
732
|
...n.value ? [
|
|
731
733
|
{
|
|
732
734
|
label: m("connect.whatsappBot.logs.title"),
|
|
733
|
-
value:
|
|
735
|
+
value: N["$connect-WHATSAPP_BOT_LOGS"]
|
|
734
736
|
}
|
|
735
737
|
] : []
|
|
736
738
|
]
|
|
737
|
-
),
|
|
738
|
-
const
|
|
739
|
-
return
|
|
739
|
+
), f = M(() => {
|
|
740
|
+
const c = _.currentRoute.value.name;
|
|
741
|
+
return i.value.some((r) => r.value === c) ? c : N["$connect-WHATSAPP_BOT"];
|
|
740
742
|
});
|
|
741
|
-
async function
|
|
742
|
-
clearTimeout(
|
|
743
|
-
const
|
|
744
|
-
|
|
743
|
+
async function h(c = !1) {
|
|
744
|
+
clearTimeout(E), T == null || T.abort();
|
|
745
|
+
const r = new AbortController();
|
|
746
|
+
T = r, c || (b.value = !0, I.value = "");
|
|
745
747
|
try {
|
|
746
|
-
const
|
|
747
|
-
if (!
|
|
748
|
+
const j = K.getBusinessId();
|
|
749
|
+
if (!j)
|
|
748
750
|
throw new Error(m("connect.whatsappBot.errors.selectBusiness"));
|
|
749
|
-
const
|
|
750
|
-
|
|
751
|
-
} catch (
|
|
752
|
-
!
|
|
751
|
+
const O = await J.listClients(j, r.signal);
|
|
752
|
+
r.signal.aborted || (v.value = O, I.value = "");
|
|
753
|
+
} catch (j) {
|
|
754
|
+
!r.signal.aborted && !c && (I.value = j instanceof Error ? j.message : m("connect.whatsappBot.errors.loadSessions"));
|
|
753
755
|
} finally {
|
|
754
|
-
|
|
756
|
+
r.signal.aborted || (b.value = !1, E = setTimeout(() => void h(!0), 1e4));
|
|
755
757
|
}
|
|
756
758
|
}
|
|
757
|
-
function
|
|
758
|
-
|
|
759
|
-
(
|
|
760
|
-
),
|
|
759
|
+
function W(c) {
|
|
760
|
+
v.value = v.value.filter(
|
|
761
|
+
(r) => r.clientId !== c
|
|
762
|
+
), h(!0);
|
|
761
763
|
}
|
|
762
|
-
const
|
|
763
|
-
function
|
|
764
|
-
|
|
764
|
+
const L = w(!1);
|
|
765
|
+
function P() {
|
|
766
|
+
g(l.value.length > 0), L.value = !0;
|
|
765
767
|
}
|
|
766
|
-
function
|
|
767
|
-
|
|
768
|
-
...
|
|
769
|
-
|
|
770
|
-
],
|
|
768
|
+
function V(c) {
|
|
769
|
+
C.value = c.clientId, v.value = [
|
|
770
|
+
...v.value.filter((r) => r.clientId !== c.clientId),
|
|
771
|
+
c
|
|
772
|
+
], x();
|
|
771
773
|
}
|
|
772
|
-
return H(
|
|
773
|
-
|
|
774
|
+
return H(L, (c) => {
|
|
775
|
+
c || (y(), h());
|
|
774
776
|
}), H(
|
|
775
|
-
|
|
777
|
+
u,
|
|
776
778
|
() => {
|
|
777
|
-
|
|
779
|
+
L.value = !1, C.value = void 0, v.value = [], h();
|
|
778
780
|
},
|
|
779
781
|
{ immediate: !0 }
|
|
780
782
|
), te(() => {
|
|
781
|
-
|
|
782
|
-
}), (
|
|
783
|
-
var
|
|
784
|
-
const
|
|
785
|
-
return o(),
|
|
783
|
+
T == null || T.abort(), clearTimeout(E);
|
|
784
|
+
}), (c, r) => {
|
|
785
|
+
var oe, ne;
|
|
786
|
+
const j = B("FmPill"), O = B("FmButton"), q = B("RouterLink"), ee = B("RouterView"), U = B("FmCircularProgress");
|
|
787
|
+
return o(), p(G, null, [
|
|
786
788
|
t("div", Pt, [
|
|
787
789
|
t("div", Vt, [
|
|
788
790
|
t("div", Lt, [
|
|
789
791
|
t("h1", Dt, a(e(m)("connect.navigation.whatsappBot")), 1),
|
|
790
|
-
|
|
792
|
+
k(j, { variant: "beta" })
|
|
791
793
|
]),
|
|
792
794
|
t("div", Et, [
|
|
793
|
-
|
|
795
|
+
k(O, {
|
|
794
796
|
variant: "tertiary",
|
|
795
797
|
label: e(m)("connect.whatsappBot.tutorial.learnMore"),
|
|
796
798
|
"prepend-icon": "help_outline",
|
|
797
799
|
class: "!h-[36px] !rounded-full !px-[16px] [&_.label]:text-[14px]",
|
|
798
|
-
onClick:
|
|
800
|
+
onClick: r[0] || (r[0] = (F) => d.value = !0)
|
|
799
801
|
}, null, 8, ["label"]),
|
|
800
|
-
|
|
802
|
+
f.value === e(N)["$connect-WHATSAPP_BOT"] && l.value.length ? (o(), A(O, {
|
|
801
803
|
key: 0,
|
|
802
804
|
label: e(m)("connect.whatsappBot.connectAccountCta"),
|
|
803
805
|
"prepend-icon": "add",
|
|
804
806
|
class: "!h-[36px] !rounded-full !px-[16px] [&_.label]:text-[14px]",
|
|
805
|
-
onClick:
|
|
807
|
+
onClick: P
|
|
806
808
|
}, null, 8, ["label"])) : D("", !0)
|
|
807
809
|
])
|
|
808
810
|
]),
|
|
809
|
-
l.value.length ? (o(),
|
|
811
|
+
l.value.length ? (o(), p("p", Mt, a(e(m)("connect.whatsappBot.description")), 1)) : D("", !0),
|
|
810
812
|
t("nav", {
|
|
811
813
|
"aria-label": e(m)("connect.navigation.whatsappBot"),
|
|
812
814
|
class: "mt-[16px] flex gap-[24px] overflow-x-auto border-b border-fm-color-neutral-gray-100"
|
|
813
815
|
}, [
|
|
814
|
-
(o(!0),
|
|
816
|
+
(o(!0), p(G, null, X(i.value, (F) => (o(), A(q, {
|
|
815
817
|
key: F.value,
|
|
816
818
|
to: { name: F.value },
|
|
817
|
-
"aria-current":
|
|
819
|
+
"aria-current": f.value === F.value ? "page" : void 0,
|
|
818
820
|
class: R([
|
|
819
821
|
"flex h-[40px] shrink-0 items-center gap-[6px] whitespace-nowrap border-b-[2px] px-[2px] text-[14px] leading-[20px] font-medium no-underline transition-colors hover:text-fm-color-primary focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-inset focus-visible:ring-fm-color-primary",
|
|
820
|
-
|
|
822
|
+
f.value === F.value ? "border-fm-color-primary text-fm-color-primary" : "border-transparent text-fm-color-typo-secondary"
|
|
821
823
|
])
|
|
822
824
|
}, {
|
|
823
825
|
default: S(() => [
|
|
824
826
|
Q(a(F.label) + " ", 1),
|
|
825
|
-
F.badge ? (o(),
|
|
827
|
+
F.badge ? (o(), p("span", {
|
|
826
828
|
key: 0,
|
|
827
829
|
class: R([
|
|
828
830
|
"min-w-[20px] rounded-full px-[6px] text-center text-[12px] leading-[20px] font-semibold tabular-nums",
|
|
829
|
-
|
|
831
|
+
f.value === F.value ? "bg-fm-color-primary-oats text-fm-color-primary" : "bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary"
|
|
830
832
|
])
|
|
831
833
|
}, a(F.badge), 3)) : D("", !0)
|
|
832
834
|
]),
|
|
833
835
|
_: 2
|
|
834
836
|
}, 1032, ["to", "aria-current", "class"]))), 128))
|
|
835
837
|
], 8, Wt),
|
|
836
|
-
|
|
838
|
+
f.value === e(N)["$connect-WHATSAPP_BOT_SETTINGS"] ? (o(), A(ee, { key: 1 })) : f.value === e(N)["$connect-WHATSAPP_BOT_LOGS"] ? (o(), A(ee, {
|
|
837
839
|
key: 2,
|
|
838
840
|
accounts: l.value
|
|
839
|
-
}, null, 8, ["accounts"])) : b.value ? (o(),
|
|
840
|
-
|
|
841
|
+
}, null, 8, ["accounts"])) : b.value ? (o(), p("output", jt, [
|
|
842
|
+
k(U),
|
|
841
843
|
Q(" " + a(e(m)("connect.whatsappBot.loadingSessions")), 1)
|
|
842
|
-
])) : I.value ? (o(),
|
|
844
|
+
])) : I.value ? (o(), p("div", Ot, [
|
|
843
845
|
t("p", Ut, a(I.value), 1),
|
|
844
|
-
|
|
846
|
+
k(O, {
|
|
845
847
|
label: e(m)("connect.whatsappBot.tryAgain"),
|
|
846
848
|
"prepend-icon": "refresh",
|
|
847
849
|
class: "!rounded-full [&_.label]:text-[14px]",
|
|
848
|
-
onClick:
|
|
850
|
+
onClick: r[1] || (r[1] = (F) => h())
|
|
849
851
|
}, null, 8, ["label"])
|
|
850
|
-
])) : l.value.length ? (o(),
|
|
852
|
+
])) : l.value.length ? (o(), A(Se, {
|
|
851
853
|
key: 5,
|
|
852
854
|
accounts: l.value,
|
|
853
|
-
onRemoved:
|
|
854
|
-
}, null, 8, ["accounts"])) : (o(),
|
|
855
|
+
onRemoved: W
|
|
856
|
+
}, null, 8, ["accounts"])) : (o(), A(Ft, {
|
|
855
857
|
key: 6,
|
|
856
|
-
onConnect:
|
|
858
|
+
onConnect: P
|
|
857
859
|
}))
|
|
858
860
|
]),
|
|
859
|
-
(o(),
|
|
860
|
-
key:
|
|
861
|
-
modelValue:
|
|
862
|
-
"onUpdate:modelValue":
|
|
863
|
-
onConnected:
|
|
861
|
+
(o(), A(bt, {
|
|
862
|
+
key: u.value,
|
|
863
|
+
modelValue: L.value,
|
|
864
|
+
"onUpdate:modelValue": r[2] || (r[2] = (F) => L.value = F),
|
|
865
|
+
onConnected: V
|
|
864
866
|
}, null, 8, ["modelValue"])),
|
|
865
|
-
|
|
866
|
-
modelValue: e(
|
|
867
|
-
"onUpdate:modelValue":
|
|
868
|
-
"client-id": ((
|
|
867
|
+
k(Ye, {
|
|
868
|
+
modelValue: e(d),
|
|
869
|
+
"onUpdate:modelValue": r[3] || (r[3] = (F) => ce(d) ? d.value = F : null),
|
|
870
|
+
"client-id": ((oe = l.value.find((F) => F.clientId === C.value)) == null ? void 0 : oe.clientId) ?? ((ne = l.value[0]) == null ? void 0 : ne.clientId)
|
|
869
871
|
}, null, 8, ["modelValue", "client-id"])
|
|
870
872
|
], 64);
|
|
871
873
|
};
|