@feedmepos/mf-connect 0.1.116-dev → 0.1.117-prod

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 (154) hide show
  1. package/README.md +1 -66
  2. package/dist/{App-DWDgsBqW.js → App-CAo1izHr.js} +618 -652
  3. package/dist/{Bin-Cz6fmewG.js → Bin-DDDfjisJ.js} +8 -8
  4. package/dist/{Broadcast-CQ0pfKpx.js → Broadcast-BsCulZhE.js} +21 -22
  5. package/dist/{CampaignAnalytic-CiRCB3kh.js → CampaignAnalytic-CnVYFSkT.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bp7UeQWJ.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-ZTHyZ_0y.js} +9 -9
  7. package/dist/{Card-Kw2PFL2m.js → Card-DPyQH9qZ.js} +24 -25
  8. package/dist/{Collections-D8Vx_EEH.js → Collections-CZCVA969.js} +185 -197
  9. package/dist/{Credit-B1jsQ5zg.js → Credit-BTg364-i.js} +20 -21
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-B6Fpf8zy.js → DateRangeChip.vue_vue_type_script_setup_true_lang-BJx8K6Ja.js} +1 -1
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Ijya9Cho.js +3494 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Cdpr9Ku4.js → EffectSheet.vue_vue_type_style_index_0_lang-CfEnSXzg.js} +32 -32
  13. package/dist/{Experience-B0JIA3sL.js → Experience-Bk_eUcSX.js} +31 -32
  14. package/dist/{FileSaver.min-M-9kTN8q.js → FileSaver.min-CXFiZAp7.js} +1 -1
  15. package/dist/{Game-CNJyqnK3.js → Game-CBnKpFdl.js} +18 -19
  16. package/dist/{GiftCardSetup-DSQIC7fD.js → GiftCardSetup-q75wNV_F.js} +75 -75
  17. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-ABiLOF1j.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-Cga0Th2O.js} +7 -7
  18. package/dist/{Goals-DBPzGIRK.js → Goals-Bbbgurfd.js} +4 -4
  19. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-B2edB52s.js → ImageInput.vue_vue_type_script_setup_true_lang-CZS05h1r.js} +1 -1
  20. package/dist/{Index-CiWyZXnK.js → Index-C8_OWllb.js} +10 -10
  21. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DnP03_b7.js → LocationPicker.vue_vue_type_script_setup_true_lang-BlCg-jI7.js} +1 -1
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DM17LaNE.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CACxChIo.js} +1 -1
  23. package/dist/{LoyaltyDashboard-C4ZlK9Hv.js → LoyaltyDashboard-DJlE0371.js} +15 -15
  24. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-CJncINki.js → MainLayout-Bs2UPvFx.js} +4 -5
  25. package/dist/Marketing-BvRYzFV8.js +236 -0
  26. package/dist/{remy-icon-BhUGu2NI.js → MarketingMaterialEdit-o88sdvTM.js} +1031 -2
  27. package/dist/{Member-B-l5P9jk.js → Member-C4yqwsMH.js} +7 -7
  28. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-C_ZjHH4I.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-BbumjyC_.js} +50 -43
  29. package/dist/{MemberImportHistory-BJcu-ahG.js → MemberImportHistory-CbuXCdxC.js} +7 -7
  30. package/dist/{MemberList-DVsWNWIc.js → MemberList-CpAepPBe.js} +105 -103
  31. package/dist/{MemberTransactions-C2VPySEO.js → MemberTransactions-BbpXvsSk.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BXqrn9tg.js → MessageInput.vue_vue_type_script_setup_true_lang-BaWgxbad.js} +14 -14
  33. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BouFp66T.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CEgMElLo.js} +1 -1
  34. package/dist/{Mission-DWO-IF0f.js → Mission-Bdb9KVeP.js} +21 -22
  35. package/dist/{Overview-DPcWm2S0.js → Overview-CEiyGMcf.js} +22 -23
  36. package/dist/{Overview-Dbp4Sv-H.js → Overview-D_9JwnFU.js} +144 -145
  37. package/dist/{Point-PnWrzVOY.js → Point-Bd5cMXQx.js} +21 -22
  38. package/dist/{Promotion-Bwpi60dN.js → Promotion-D9gZDvgR.js} +131 -137
  39. package/dist/{Queue-BvEcKyVJ.js → Queue-BnAOL_rp.js} +45 -46
  40. package/dist/{Record-DzNvU2fM.js → Record-D6TWFKe0.js} +9 -9
  41. package/dist/{Review-HDYwnMd6.js → Review-DLEgvnc-.js} +2 -2
  42. package/dist/ReviewFacebookCallback-jVlm2O8f.js +238 -0
  43. package/dist/{ReviewGoogleCallback-6V9JNKsl.js → ReviewGoogleCallback-BgAbO3pI.js} +5 -5
  44. package/dist/{Reward-DI6IyG-d.js → Reward-DBheQiFu.js} +29 -29
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DFAIPMe7.js → RewardGroup.vue_vue_type_script_setup_true_lang-Bt-EqsiH.js} +15 -16
  46. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CKL8MEld.js +1883 -0
  47. package/dist/{Segment-DrV6pQyx.js → Segment-B9Se5FFw.js} +305 -304
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CXHt_ZeT.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-f7AS5vwv.js} +30 -31
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-XRXkLy6j.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-3BKA0UFI.js} +4 -4
  50. package/dist/Setting-B92JT_Y4.js +2037 -0
  51. package/dist/{SettingAdvertisements-BtqKt4Ca.js → SettingAdvertisements-CLw-dqiA.js} +12 -12
  52. package/dist/Settings-BmmM8ZnR.js +179 -0
  53. package/dist/{Store-HZs9GG03.js → Store-B5PPP5zM.js} +30 -31
  54. package/dist/{StoreRewards-BSTXL4FR.js → StoreRewards-DllyaVBY.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-3Vvqf6_H.js +1264 -0
  56. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-7ZZ0e5tQ.js +142 -0
  57. package/dist/{Tier-Ka0rbjC_.js → Tier-M_TApfju.js} +687 -2576
  58. package/dist/{Title-7jvrf34J.js → Title-Cpltm-I2.js} +92 -94
  59. package/dist/{Transaction-D-M3udf5.js → Transaction-BYfAYRpv.js} +2 -2
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CrlpuElX.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BOhfGxVj.js} +26 -26
  61. package/dist/{Voucher-BZCLPyDk.js → Voucher-DHoyg0YZ.js} +19 -19
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-C_MOMFkX.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DWHwM6AJ.js} +16 -16
  63. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Do4GTTKx.js → ZodTextField.vue_vue_type_script_setup_true_lang-B6tTjLAZ.js} +2 -2
  64. package/dist/{app-CEe3kSZM.js → app-B_doYklh.js} +7107 -8879
  65. package/dist/app.js +3 -4
  66. package/dist/{base.export-BjSdr85q.js → base.export-DmbnT_bp.js} +2 -2
  67. package/dist/{business-CJjiItSo.js → business-DdVGtTvx.js} +1 -1
  68. package/dist/{campaign-DEXq52fE.js → campaign-CVkA08zl.js} +25 -31
  69. package/dist/{campaign-D4MWLs1D.js → campaign-jEhKmpKg.js} +94 -121
  70. package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-DWu6-kOo.js} +2 -3
  71. package/dist/{campaign.fn-DiadKjES.js → campaign.fn-BlgEyeFz.js} +82 -82
  72. package/dist/{collectible.enum-Liy2wH3s.js → collectible.enum-CVLkXKml.js} +1 -1
  73. package/dist/{collection.fn-CfqIdnSS.js → collection.fn-DLNGTrPf.js} +2 -2
  74. package/dist/{currency-CPB6E_s-.js → currency-DKS1md4e.js} +1 -1
  75. package/dist/{effect-DFodA5mh.js → effect-Bk-zYexf.js} +1 -1
  76. package/dist/{email-addresses-C0CwgNs_.js → email-addresses-I9A5iLzf.js} +2 -2
  77. package/dist/{feature-flag-Bap2oi_S.js → feature-flag-DQti61iR.js} +74 -74
  78. package/dist/google-C3S8u0mT.js +4 -0
  79. package/dist/{helper-DKKsSb2o.js → helper-9cPlo6ae.js} +1 -1
  80. package/dist/{index-CJGb1iJi.js → index-1Cdj34z1.js} +1 -1
  81. package/dist/{index-CtwPthW5.js → index-3V8E9GaZ.js} +2 -2
  82. package/dist/{index-CfqmNZUH.js → index-728mP6kW.js} +581 -683
  83. package/dist/{index-DDmpyI6z.js → index-BRm0LMTo.js} +252 -611
  84. package/dist/{index-qAQiQd-s.js → index-BxpbI0GH.js} +7 -7
  85. package/dist/{index-DFV2ydYE.js → index-C-OnJpT8.js} +1 -1
  86. package/dist/{index-D5veZ8LP.js → index-CIwdXphn.js} +2613 -2700
  87. package/dist/{index-DxmlvoHV.js → index-CNUXbXvG.js} +6 -19
  88. package/dist/{index-RUdMURTx.js → index-Cj6oxbl0.js} +10 -11
  89. package/dist/{index-CXqPYmyv.js → index-ClYX4COd.js} +3 -4
  90. package/dist/{index-CEFEuMOF.js → index-CuyzSc1l.js} +1 -1
  91. package/dist/{index-BS6725ZB.js → index-DOE2VR99.js} +198 -198
  92. package/dist/{index-C_4eW8Sr.js → index-DWkuIfHy.js} +232 -390
  93. package/dist/{index-BdGo-qgB.js → index-Dj51vqab.js} +4 -4
  94. package/dist/{index-DRnUcSVN.js → index-DuvnRxeo.js} +1 -1
  95. package/dist/{index-BJCirs9i.js → index-cgtAlOl9.js} +10767 -8028
  96. package/dist/{index-BWsGYTzB.js → index-fHiFL1dW.js} +15 -29
  97. package/dist/{index-CFZMwKR6.js → index-oNMFyOGe.js} +7 -8
  98. package/dist/{index-4LQanFJi.js → index-vKvGJ4Ve.js} +2 -2
  99. package/dist/{index.esm2017-i1myv90H.js → index.esm2017-CsF37oA-.js} +177 -177
  100. package/dist/{loading-BAFiJnEb.js → loading-BJJmTFoe.js} +1 -1
  101. package/dist/{lodash-De2KDgqX.js → lodash-BMJ6_hsa.js} +1 -1
  102. package/dist/{member-import-BP4RZGbA.js → member-import-DrGxVJt9.js} +5 -6
  103. package/dist/{membership-CQWw-rTa.js → membership-CAqKihwy.js} +3 -3
  104. package/dist/{money-rwjWYzdi.js → money-Bf9d2ZUH.js} +1 -1
  105. package/dist/{number-DwSvkBpS.js → number-CWXlGZa5.js} +1 -1
  106. package/dist/objectid-2DN5a9sY.js +145 -0
  107. package/dist/{onboarding-u7cpl6k3.js → onboarding-Dn9O7r3a.js} +25 -25
  108. package/dist/{onboardingSetup-DoxDlcVN.js → onboardingSetup-BMkDoGy-.js} +2 -2
  109. package/dist/{plugins-CKaeoHSK.js → plugins-KDgceFWV.js} +3 -3
  110. package/dist/{reward-BasbGRWt.js → reward-eilGRaXi.js} +1 -1
  111. package/dist/{rule-IN41b-qE.js → rule-Dr9Zjg_o.js} +492 -572
  112. package/dist/rule-builder-cz6Dy-no.js +102 -0
  113. package/dist/style.css +1 -1
  114. package/dist/template-DwbazO8p.js +236 -0
  115. package/dist/{timezone-C68y8HiI.js → timezone-C5CIfvHs.js} +1 -1
  116. package/dist/{transaction.fn-Ckxm2gof.js → transaction.fn-Cr-FLjh0.js} +2 -2
  117. package/dist/{trigger-xA8j3s9B.js → trigger-B0Fv6wbN.js} +8 -8
  118. package/dist/useMarketingMaterialActions-CNk3LR9M.js +96 -0
  119. package/dist/{usePagination-CIRxyVr8.js → usePagination-BcA-imTr.js} +1 -1
  120. package/dist/{user-PTTQTMyQ.js → user-DRvLwlBE.js} +1 -1
  121. package/dist/vue-i18n-y7bHQpNx.js +2365 -0
  122. package/dist/{xlsx-l0AsOrP1.js → xlsx-CBObn76o.js} +379 -379
  123. package/dist/{zod-Bm1pKYLC.js → zod-DWU5EdQV.js} +1 -1
  124. package/package.json +2 -6
  125. package/dist/AuditLogs-BqEtvKFs.js +0 -2016
  126. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BW1RntIP.js +0 -4442
  127. package/dist/Grab-CGWinKBS.js +0 -301
  128. package/dist/MainLayout-D22Q2_jN.js +0 -4
  129. package/dist/Marketing-CmVnvEN6.js +0 -269
  130. package/dist/MarketingMaterialEdit-CQ55zG-W.js +0 -1037
  131. package/dist/ReviewFacebookCallback-rAlgcTQ_.js +0 -225
  132. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CDoba0oG.js +0 -1923
  133. package/dist/Setting-aLQCUCP9.js +0 -574
  134. package/dist/Settings-BkYtKb4l.js +0 -286
  135. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-D9nykzc3.js +0 -1319
  136. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DBnHk6jn.js +0 -7007
  137. package/dist/WhatsappAccount-BG0dIroG.js +0 -159
  138. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-Co05OXon.js +0 -39
  139. package/dist/WhatsappBot-O5h5UKXz.js +0 -876
  140. package/dist/WhatsappBotLogs-BOPTuu6o.js +0 -372
  141. package/dist/WhatsappBotSettings-BSiIvpGO.js +0 -705
  142. package/dist/WhatsappLayout-DLVIfkzJ.js +0 -21
  143. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DJdi7dV6.js +0 -253
  144. package/dist/browser-BSAOEeIM.js +0 -1478
  145. package/dist/duplicateCampaign-BzWvsZwc.js +0 -51
  146. package/dist/feature-flag--GbS6Qn_.js +0 -50
  147. package/dist/google-BQK68wbe.js +0 -5
  148. package/dist/index-C-iwb2Ln.js +0 -109
  149. package/dist/index-C1C21iKU.js +0 -74
  150. package/dist/index-C_H8jFYf.js +0 -2743
  151. package/dist/objectid-DtEPzPd_.js +0 -145
  152. package/dist/template-3Nu_MAMG.js +0 -188
  153. package/dist/useMarketingMaterialActions-ClYoBaFw.js +0 -125
  154. package/dist/vue-i18n-DYnrLWFT.js +0 -2365
@@ -1,21 +0,0 @@
1
- import { defineComponent as n, watch as s, unref as a, openBlock as o, createBlock as r, createCommentVNode as p } from "vue";
2
- import { useRouter as c } from "vue-router";
3
- import { _ as u, a as _ } from "./MainLayout.vue_vue_type_script_setup_true_lang-CJncINki.js";
4
- import { u as f } from "./feature-flag--GbS6Qn_.js";
5
- import { R as i } from "./app-CEe3kSZM.js";
6
- const y = /* @__PURE__ */ n({
7
- __name: "WhatsappLayout",
8
- setup(d) {
9
- const m = c(), e = f();
10
- return s(
11
- () => e.loaded && !e.whatsappBotEnabled,
12
- (t) => {
13
- t && m.replace({ name: i["$connect-ANALYTIC"] });
14
- },
15
- { immediate: !0 }
16
- ), (t, l) => a(e).loaded ? a(e).whatsappBotEnabled ? (o(), r(_, { key: 1 })) : p("", !0) : (o(), r(u, { key: 0 }));
17
- }
18
- });
19
- export {
20
- y as default
21
- };
@@ -1,253 +0,0 @@
1
- import { computed as f, toValue as j, ref as m, watch as S, defineComponent as W, mergeModels as O, useModel as $, onBeforeUnmount as z, resolveComponent as N, openBlock as h, createBlock as H, withCtx as T, createElementVNode as t, toDisplayString as n, unref as s, createElementBlock as _, createVNode as L, createTextVNode as V, Fragment as J, renderList as K, createCommentVNode as F } from "vue";
2
- import { u as U } from "./vue-i18n-DYnrLWFT.js";
3
- import { b as Q } from "./browser-BSAOEeIM.js";
4
- import { S as X, a as R } from "./index-qAQiQd-s.js";
5
- import { w as Y } from "./index-C1C21iKU.js";
6
- function Z(x) {
7
- const c = x.connectedAt !== null;
8
- switch (x.status) {
9
- case "connected":
10
- return "connected";
11
- case "disconnected":
12
- return c ? "disconnected" : void 0;
13
- case "connecting":
14
- return c ? "connecting" : void 0;
15
- }
16
- }
17
- const D = [
18
- "bg-fm-color-primary",
19
- "bg-fm-color-secondary-plum",
20
- "bg-fm-color-system-success-400"
21
- ];
22
- function ee(x) {
23
- const { t: c, locale: b } = U(), e = f(() => j(x)), v = f(
24
- () => {
25
- var o, a, r;
26
- return (r = (a = (o = e.value) == null ? void 0 : o.account) == null ? void 0 : a.profilePicture) == null ? void 0 : r.url;
27
- }
28
- ), k = m(!1);
29
- S(v, () => {
30
- k.value = !1;
31
- });
32
- const G = f(
33
- () => {
34
- var o, a, r, u, g, y;
35
- return ((a = (o = e.value) == null ? void 0 : o.account) == null ? void 0 : a.businessName) || ((u = (r = e.value) == null ? void 0 : r.account) == null ? void 0 : u.name) || ((y = (g = e.value) == null ? void 0 : g.account) == null ? void 0 : y.phoneNumber) || c("connect.whatsappBot.unnamedAccount");
36
- }
37
- ), p = f(
38
- () => {
39
- var o, a;
40
- return ((a = (o = e.value) == null ? void 0 : o.account) == null ? void 0 : a.phoneNumber) || c("connect.whatsappBot.phoneUnavailable");
41
- }
42
- ), w = f(
43
- () => G.value.trim().split(/\s+/).slice(0, 2).map((o) => Array.from(o)[0]).join("").toLocaleUpperCase(b.value)
44
- ), B = f(
45
- () => e.value ? Z(e.value) ?? "disconnected" : "disconnected"
46
- ), d = f(
47
- () => {
48
- var o;
49
- return D[parseInt(((o = e.value) == null ? void 0 : o.clientId.slice(-6)) ?? "0", 16) % D.length];
50
- }
51
- );
52
- return {
53
- name: G,
54
- phoneNumber: p,
55
- initials: w,
56
- state: B,
57
- avatarColor: d,
58
- profilePictureUrl: v,
59
- profilePictureFailed: k
60
- };
61
- }
62
- const te = { class: "min-w-0 flex flex-col" }, oe = { class: "text-[18px] leading-[24px] font-semibold" }, ne = { class: "text-[13px] leading-[18px] text-fm-color-typo-tertiary break-words" }, ae = {
63
- key: 0,
64
- role: "status",
65
- class: "py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
66
- }, se = {
67
- key: 1,
68
- class: "py-[40px] flex flex-col items-center text-center gap-[16px]"
69
- }, ie = {
70
- role: "alert",
71
- class: "text-[14px] text-fm-color-typo-error"
72
- }, le = {
73
- key: 2,
74
- class: "grid grid-cols-[minmax(0,1fr)_226px] xs:grid-cols-1 gap-[32px] p-[8px] xs:p-[0px]"
75
- }, re = { class: "min-w-0 flex flex-col gap-[20px] text-[14px] leading-[20px]" }, ce = { class: "text-fm-color-typo-secondary [text-wrap:pretty]" }, pe = { class: "flex flex-col gap-[10px]" }, ue = { class: "text-[12px] leading-[16px] font-semibold uppercase tracking-[0.06em] text-fm-color-typo-tertiary" }, de = { class: "flex flex-col gap-[10px]" }, fe = { class: "flex flex-col gap-[6px]" }, me = {
76
- id: "whatsapp-group-invite-link-label",
77
- class: "font-medium text-fm-color-typo-tertiary"
78
- }, xe = { class: "flex items-center gap-[8px] border border-fm-color-neutral-gray-200 rounded-[8px] pl-[12px] pr-[4px] py-[4px]" }, ve = {
79
- id: "whatsapp-group-invite-link",
80
- role: "textbox",
81
- "aria-readonly": "true",
82
- "aria-labelledby": "whatsapp-group-invite-link-label",
83
- tabindex: "0",
84
- class: "flex-1 min-w-0 h-[32px] overflow-x-auto overflow-y-hidden whitespace-nowrap text-[13px] leading-[32px] font-mono bg-fm-color-neutral-white rounded-[4px] focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary"
85
- }, he = ["disabled"], ge = {
86
- key: 0,
87
- role: "status",
88
- class: "sr-only"
89
- }, ye = {
90
- key: 1,
91
- role: "alert",
92
- class: "text-[12px] leading-[16px] text-fm-color-typo-error"
93
- }, _e = { class: "text-[12px] leading-[16px] text-fm-color-typo-tertiary" }, be = { class: "flex flex-col items-center gap-[12px] w-[226px] xs:justify-self-center" }, we = { class: "border border-fm-color-neutral-gray-100 rounded-[12px] overflow-hidden" }, Be = ["src", "alt"], ke = ["href"], Ve = /* @__PURE__ */ W({
94
- __name: "WhatsappNotificationGroupDialog",
95
- props: /* @__PURE__ */ O({
96
- account: {}
97
- }, {
98
- modelValue: { type: Boolean, required: !0 },
99
- modelModifiers: {}
100
- }),
101
- emits: ["update:modelValue"],
102
- setup(x) {
103
- const c = x, b = $(x, "modelValue"), { t: e } = U(), v = f(() => X.getBusinessId() ?? ""), { name: k, phoneNumber: G } = ee(() => c.account), p = m(), w = m(""), B = m(!1), d = m(""), o = m(!1), a = m(!1), r = m("");
104
- let u, g;
105
- function y() {
106
- u == null || u.abort(), clearTimeout(g), o.value = !1, a.value = !1;
107
- }
108
- async function I() {
109
- y();
110
- const i = new AbortController();
111
- u = i, B.value = !0, d.value = "", r.value = "", p.value = void 0, w.value = "";
112
- try {
113
- if (!v.value)
114
- throw new Error(e("connect.whatsappBot.errors.selectBusiness"));
115
- const l = await Y.getNotificationGroup(
116
- v.value,
117
- c.account.clientId,
118
- i.signal
119
- );
120
- if (i.signal.aborted) return;
121
- const A = await Q.toDataURL(l.inviteLink, {
122
- width: 224,
123
- margin: 2,
124
- errorCorrectionLevel: "M"
125
- });
126
- if (i.signal.aborted) return;
127
- p.value = l, w.value = A;
128
- } catch (l) {
129
- if (i.signal.aborted) return;
130
- l instanceof R && l.status === 409 ? d.value = e("connect.whatsappBot.notificationGroup.notReady") : l instanceof R && l.status === 404 ? d.value = e("connect.whatsappBot.errors.accountNotFound") : d.value = v.value ? e("connect.whatsappBot.errors.loadGroup") : e("connect.whatsappBot.errors.selectBusiness");
131
- } finally {
132
- i.signal.aborted || (B.value = !1);
133
- }
134
- }
135
- async function q() {
136
- if (!p.value || !u || a.value) return;
137
- const i = u;
138
- a.value = !0, o.value = !1, r.value = "", clearTimeout(g);
139
- try {
140
- if (await navigator.clipboard.writeText(p.value.inviteLink), i.signal.aborted) return;
141
- o.value = !0, g = setTimeout(() => {
142
- o.value = !1;
143
- }, 2e3);
144
- } catch {
145
- i.signal.aborted || (r.value = e("connect.whatsappBot.errors.copyGroupLink"));
146
- } finally {
147
- i.signal.aborted || (a.value = !1);
148
- }
149
- }
150
- return S(
151
- [b, v, () => c.account.clientId],
152
- ([i]) => {
153
- i ? I() : y();
154
- },
155
- { immediate: !0 }
156
- ), z(y), (i, l) => {
157
- const A = N("FmCircularProgress"), E = N("FmButton"), P = N("FmIcon"), M = N("FmDialog");
158
- return h(), H(M, {
159
- modelValue: b.value,
160
- "onUpdate:modelValue": l[0] || (l[0] = (C) => b.value = C),
161
- "min-width": "min(640px, calc(100% - 32px))",
162
- "max-width": "640px",
163
- "max-height": "90vh",
164
- "dismiss-away": ""
165
- }, {
166
- "dialog-header": T(() => [
167
- t("div", te, [
168
- t("h2", oe, n(s(e)("connect.whatsappBot.notificationGroup.dialogTitle")), 1),
169
- t("p", ne, n(s(k)) + " · " + n(s(G)), 1)
170
- ])
171
- ]),
172
- default: T(() => [
173
- B.value ? (h(), _("div", ae, [
174
- L(A),
175
- V(" " + n(s(e)("connect.whatsappBot.notificationGroup.loading")), 1)
176
- ])) : d.value ? (h(), _("div", se, [
177
- t("p", ie, n(d.value), 1),
178
- L(E, {
179
- label: s(e)("connect.whatsappBot.tryAgain"),
180
- "prepend-icon": "refresh",
181
- class: "!rounded-full [&_.label]:text-[14px]",
182
- onClick: I
183
- }, null, 8, ["label"])
184
- ])) : p.value ? (h(), _("div", le, [
185
- t("div", re, [
186
- t("p", ce, n(s(e)("connect.whatsappBot.notificationGroup.scanDescription")), 1),
187
- t("div", pe, [
188
- t("h3", ue, n(s(e)("connect.whatsappBot.notificationGroup.postsTitle")), 1),
189
- t("ul", de, [
190
- (h(), _(J, null, K(["unanswered", "staffRequests", "humanRequests"], (C) => t("li", {
191
- key: C,
192
- class: "flex gap-[10px]"
193
- }, [
194
- l[1] || (l[1] = t("span", {
195
- "aria-hidden": "true",
196
- class: "w-[6px] h-[6px] rounded-full bg-fm-color-primary shrink-0 mt-[7px]"
197
- }, null, -1)),
198
- V(" " + n(s(e)(`connect.whatsappBot.notificationGroup.posts.${C}`)), 1)
199
- ])), 64))
200
- ])
201
- ]),
202
- t("div", fe, [
203
- t("span", me, n(s(e)("connect.whatsappBot.notificationGroup.inviteLink")), 1),
204
- t("div", xe, [
205
- t("div", ve, n(p.value.inviteLink), 1),
206
- t("button", {
207
- type: "button",
208
- disabled: a.value,
209
- class: "shrink-0 h-[32px] px-[12px] rounded-[6px] bg-fm-color-neutral-gray-100 text-[13px] font-semibold hover:bg-fm-color-neutral-gray-200 disabled:opacity-50 focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary",
210
- onClick: q
211
- }, n(s(e)(
212
- `connect.whatsappBot.notificationGroup.${o.value ? "copied" : "copy"}`
213
- )), 9, he)
214
- ]),
215
- o.value ? (h(), _("span", ge, n(s(e)("connect.whatsappBot.notificationGroup.copied")), 1)) : F("", !0),
216
- r.value ? (h(), _("p", ye, n(r.value), 1)) : F("", !0),
217
- t("p", _e, n(s(e)("connect.whatsappBot.notificationGroup.shareNote")), 1)
218
- ])
219
- ]),
220
- t("div", be, [
221
- t("div", we, [
222
- t("img", {
223
- src: w.value,
224
- alt: s(e)("connect.whatsappBot.notificationGroup.qrAlt"),
225
- width: "224",
226
- height: "224"
227
- }, null, 8, Be)
228
- ]),
229
- t("a", {
230
- href: p.value.inviteLink,
231
- target: "_blank",
232
- rel: "noopener noreferrer",
233
- class: "w-full h-[40px] flex items-center justify-center gap-[6px] rounded-full bg-fm-color-primary text-fm-color-typo-white text-[14px] font-semibold no-underline hover:opacity-90 focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary focus-visible:ring-offset-[2px]"
234
- }, [
235
- V(n(s(e)("connect.whatsappBot.notificationGroup.openWhatsapp")) + " ", 1),
236
- L(P, {
237
- name: "open_in_new",
238
- size: "sm"
239
- })
240
- ], 8, ke)
241
- ])
242
- ])) : F("", !0)
243
- ]),
244
- _: 1
245
- }, 8, ["modelValue"]);
246
- };
247
- }
248
- });
249
- export {
250
- Ve as _,
251
- ee as u,
252
- Z as w
253
- };