@feedmepos/mf-connect 0.1.114-prod → 0.1.116-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.
Files changed (157) hide show
  1. package/README.md +66 -1
  2. package/dist/{App-DMYXrCc7.js → App-DWDgsBqW.js} +700 -654
  3. package/dist/AuditLogs-BqEtvKFs.js +2016 -0
  4. package/dist/{Bin-CHZolo56.js → Bin-Cz6fmewG.js} +8 -8
  5. package/dist/Broadcast-CQ0pfKpx.js +306 -0
  6. package/dist/{CampaignAnalytic-DgZvsUoF.js → CampaignAnalytic-CiRCB3kh.js} +7 -7
  7. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-C42uL_JO.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bp7UeQWJ.js} +9 -9
  8. package/dist/{Card-wRFTJwJ9.js → Card-Kw2PFL2m.js} +25 -24
  9. package/dist/{Collections-9G-_9Etz.js → Collections-D8Vx_EEH.js} +197 -185
  10. package/dist/{Credit-Bl7IDMCU.js → Credit-B1jsQ5zg.js} +21 -20
  11. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BVLJeofG.js → DateRangeChip.vue_vue_type_script_setup_true_lang-B6Fpf8zy.js} +1 -1
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BW1RntIP.js +4442 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Q1f6EQW3.js → EffectSheet.vue_vue_type_style_index_0_lang-Cdpr9Ku4.js} +32 -32
  14. package/dist/{Experience-Cs2iViLv.js → Experience-B0JIA3sL.js} +32 -31
  15. package/dist/{FileSaver.min-B3Levdbu.js → FileSaver.min-M-9kTN8q.js} +1 -1
  16. package/dist/{Game-oXURgzan.js → Game-CNJyqnK3.js} +19 -18
  17. package/dist/{GiftCardSetup-C2Wu-dRl.js → GiftCardSetup-DSQIC7fD.js} +75 -75
  18. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-Da2e89Um.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-ABiLOF1j.js} +7 -7
  19. package/dist/{Goals-B_xEM7gf.js → Goals-DBPzGIRK.js} +4 -4
  20. package/dist/Grab-CGWinKBS.js +301 -0
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BRJR1heE.js → ImageInput.vue_vue_type_script_setup_true_lang-B2edB52s.js} +1 -1
  22. package/dist/{Index-kuT6W6R_.js → Index-CiWyZXnK.js} +10 -10
  23. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-7JqHfSk-.js → LocationPicker.vue_vue_type_script_setup_true_lang-DnP03_b7.js} +1 -1
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CI_4S7tW.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DM17LaNE.js} +1 -1
  25. package/dist/{LoyaltyDashboard-CqxHdZcm.js → LoyaltyDashboard-C4ZlK9Hv.js} +15 -15
  26. package/dist/MainLayout-D22Q2_jN.js +4 -0
  27. package/dist/{MainLayout-CAERFIms.js → MainLayout.vue_vue_type_script_setup_true_lang-CJncINki.js} +5 -4
  28. package/dist/Marketing-CmVnvEN6.js +269 -0
  29. package/dist/MarketingMaterialEdit-CQ55zG-W.js +1037 -0
  30. package/dist/{Member-B8VZEn9t.js → Member-B-l5P9jk.js} +7 -7
  31. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-B31lVLKh.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-C_ZjHH4I.js} +43 -50
  32. package/dist/{MemberImportHistory-D9tgHnTS.js → MemberImportHistory-BJcu-ahG.js} +7 -7
  33. package/dist/{MemberList-Hw_xQY1i.js → MemberList-DVsWNWIc.js} +103 -105
  34. package/dist/{MemberTransactions-DiBO4plw.js → MemberTransactions-C2VPySEO.js} +1 -1
  35. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CbFt5X89.js → MessageInput.vue_vue_type_script_setup_true_lang-BXqrn9tg.js} +4228 -4176
  36. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BE_-Ed4z.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BouFp66T.js} +1 -1
  37. package/dist/{Mission-DpYei3aF.js → Mission-DWO-IF0f.js} +22 -21
  38. package/dist/{Overview-BFQMmyT6.js → Overview-DPcWm2S0.js} +23 -22
  39. package/dist/{Overview-CARquJCS.js → Overview-Dbp4Sv-H.js} +145 -144
  40. package/dist/{Point-Dd2ykwNv.js → Point-PnWrzVOY.js} +22 -21
  41. package/dist/{Promotion-DXl-W7np.js → Promotion-Bwpi60dN.js} +137 -131
  42. package/dist/{Queue-Cd3N-4iB.js → Queue-BvEcKyVJ.js} +47 -46
  43. package/dist/{Record-C3HdDsh5.js → Record-DzNvU2fM.js} +9 -9
  44. package/dist/{Review-Bif3Ub9Z.js → Review-HDYwnMd6.js} +2 -2
  45. package/dist/ReviewFacebookCallback-rAlgcTQ_.js +225 -0
  46. package/dist/{ReviewGoogleCallback-i-RNLlLm.js → ReviewGoogleCallback-6V9JNKsl.js} +5 -5
  47. package/dist/{Reward-DHxzrR_7.js → Reward-DI6IyG-d.js} +29 -29
  48. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DcrFlcSo.js → RewardGroup.vue_vue_type_script_setup_true_lang-DFAIPMe7.js} +16 -15
  49. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CDoba0oG.js +1923 -0
  50. package/dist/{Segment-Cjpxordk.js → Segment-DrV6pQyx.js} +290 -291
  51. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-6u21xBu6.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CXHt_ZeT.js} +31 -30
  52. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BOXVzfer.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-XRXkLy6j.js} +4 -4
  53. package/dist/Setting-aLQCUCP9.js +574 -0
  54. package/dist/{SettingAdvertisements-aog5fz32.js → SettingAdvertisements-BtqKt4Ca.js} +12 -12
  55. package/dist/Settings-BkYtKb4l.js +286 -0
  56. package/dist/{Store-Bq3kw1l2.js → Store-HZs9GG03.js} +31 -30
  57. package/dist/{StoreRewards-ZGXKEM09.js → StoreRewards-BSTXL4FR.js} +15 -15
  58. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-D9nykzc3.js +1319 -0
  59. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DBnHk6jn.js +7007 -0
  60. package/dist/{Tier-CfgpEHY7.js → Tier-Ka0rbjC_.js} +2576 -687
  61. package/dist/{Title-B2itYWeD.js → Title-7jvrf34J.js} +94 -92
  62. package/dist/{Transaction-hJ5ygIcf.js → Transaction-D-M3udf5.js} +2 -2
  63. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-8BgGlpTh.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CrlpuElX.js} +26 -26
  64. package/dist/{Voucher-TG47pGR3.js → Voucher-BZCLPyDk.js} +19 -19
  65. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CjuXCTxg.js → VoucherEditor.vue_vue_type_script_setup_true_lang-C_MOMFkX.js} +16 -16
  66. package/dist/WhatsappAccount-BG0dIroG.js +159 -0
  67. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-Co05OXon.js +39 -0
  68. package/dist/WhatsappBot-O5h5UKXz.js +876 -0
  69. package/dist/WhatsappBotLogs-BOPTuu6o.js +372 -0
  70. package/dist/WhatsappBotSettings-BSiIvpGO.js +705 -0
  71. package/dist/WhatsappLayout-DLVIfkzJ.js +21 -0
  72. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DJdi7dV6.js +253 -0
  73. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BRs-gbP0.js → ZodTextField.vue_vue_type_script_setup_true_lang-Do4GTTKx.js} +2 -2
  74. package/dist/{app-tPHYkJcQ.js → app-CEe3kSZM.js} +10615 -8223
  75. package/dist/app.js +4 -3
  76. package/dist/{base.export-BHDVnGj2.js → base.export-BjSdr85q.js} +2 -2
  77. package/dist/browser-BSAOEeIM.js +1478 -0
  78. package/dist/{business-HLyWfrXY.js → business-CJjiItSo.js} +1 -1
  79. package/dist/campaign-D4MWLs1D.js +400 -0
  80. package/dist/{campaign-5zFgUNLw.js → campaign-DEXq52fE.js} +31 -25
  81. package/dist/{campaign.enum-BOkDnP2g.js → campaign.enum-Dx-Zo68Q.js} +3 -2
  82. package/dist/{campaign.fn-BIAoVtJj.js → campaign.fn-DiadKjES.js} +85 -85
  83. package/dist/{collectible.enum-BbZSAfys.js → collectible.enum-Liy2wH3s.js} +1 -1
  84. package/dist/{collection.fn-DPSgBHnz.js → collection.fn-CfqIdnSS.js} +2 -2
  85. package/dist/{currency-BVrMqU6-.js → currency-CPB6E_s-.js} +1 -1
  86. package/dist/duplicateCampaign-BzWvsZwc.js +51 -0
  87. package/dist/{effect-BBifVx76.js → effect-DFodA5mh.js} +1 -1
  88. package/dist/{email-addresses-9C7xHTNv.js → email-addresses-C0CwgNs_.js} +2 -2
  89. package/dist/feature-flag--GbS6Qn_.js +50 -0
  90. package/dist/feature-flag-Bap2oi_S.js +868 -0
  91. package/dist/google-BQK68wbe.js +5 -0
  92. package/dist/{helper-C08jyQNK.js → helper-DKKsSb2o.js} +1 -1
  93. package/dist/{index-Dk-jg0wN.js → index-4LQanFJi.js} +2 -2
  94. package/dist/{index-hSRM1smQ.js → index-BJCirs9i.js} +8028 -10767
  95. package/dist/index-BS6725ZB.js +14571 -0
  96. package/dist/{index-B_334Y_i.js → index-BWsGYTzB.js} +29 -15
  97. package/dist/{index-DZ-q5O-V.js → index-BdGo-qgB.js} +4 -4
  98. package/dist/index-C-iwb2Ln.js +109 -0
  99. package/dist/index-C1C21iKU.js +74 -0
  100. package/dist/{index-96ZiAKj_.js → index-CEFEuMOF.js} +1 -1
  101. package/dist/{index-C_WoO58V.js → index-CFZMwKR6.js} +8 -7
  102. package/dist/{index-kCbkOivd.js → index-CJGb1iJi.js} +1 -1
  103. package/dist/{index-CUle4c2B.js → index-CXqPYmyv.js} +4 -3
  104. package/dist/{index-DnRMNmUA.js → index-C_4eW8Sr.js} +396 -232
  105. package/dist/index-C_H8jFYf.js +2743 -0
  106. package/dist/{index-Yo0tP8KJ.js → index-CfqmNZUH.js} +683 -581
  107. package/dist/{index-ihw-WFCa.js → index-CtwPthW5.js} +2 -2
  108. package/dist/{index-Dhyqf1s8.js → index-D5veZ8LP.js} +2700 -2613
  109. package/dist/{index-NJSI4wX4.js → index-DDmpyI6z.js} +693 -231
  110. package/dist/{index-D24Q28cH.js → index-DFV2ydYE.js} +1 -1
  111. package/dist/{index-CEe1kJ0T.js → index-DRnUcSVN.js} +1 -1
  112. package/dist/{index-BgwZGunW.js → index-DxmlvoHV.js} +19 -6
  113. package/dist/{index-hIUtD2eY.js → index-RUdMURTx.js} +11 -10
  114. package/dist/{index-Ciw2TZxV.js → index-qAQiQd-s.js} +8 -7
  115. package/dist/{index.esm2017-hN99SQTb.js → index.esm2017-i1myv90H.js} +209 -209
  116. package/dist/{loading-CVuY4vQ4.js → loading-BAFiJnEb.js} +1 -1
  117. package/dist/{lodash-GFl9_FMH.js → lodash-De2KDgqX.js} +1 -1
  118. package/dist/{member-import-CshTzabx.js → member-import-BP4RZGbA.js} +6 -5
  119. package/dist/{membership-S0KES3Ex.js → membership-CQWw-rTa.js} +3 -3
  120. package/dist/{money-JxdX8ru4.js → money-rwjWYzdi.js} +1 -1
  121. package/dist/{number-BRLwa-mB.js → number-DwSvkBpS.js} +1 -1
  122. package/dist/objectid-DtEPzPd_.js +145 -0
  123. package/dist/{onboarding-BSKYeyP7.js → onboarding-u7cpl6k3.js} +25 -25
  124. package/dist/{onboardingSetup-BqT52VRm.js → onboardingSetup-DoxDlcVN.js} +2 -2
  125. package/dist/{plugins-BR_wmMFJ.js → plugins-CKaeoHSK.js} +3 -3
  126. package/dist/{MarketingMaterialEdit-BvIthCHG.js → remy-icon-BhUGu2NI.js} +2 -1031
  127. package/dist/{reward-CpCGg_W2.js → reward-BasbGRWt.js} +1 -1
  128. package/dist/{rule-Dbg9e8MO.js → rule-IN41b-qE.js} +572 -492
  129. package/dist/style.css +1 -1
  130. package/dist/template-3Nu_MAMG.js +188 -0
  131. package/dist/{timezone-CDVa-xPr.js → timezone-C68y8HiI.js} +1 -1
  132. package/dist/{transaction.fn-DrTBoF9T.js → transaction.fn-Ckxm2gof.js} +2 -2
  133. package/dist/{trigger-wqGwQfB2.js → trigger-xA8j3s9B.js} +8 -8
  134. package/dist/useMarketingMaterialActions-ClYoBaFw.js +125 -0
  135. package/dist/{usePagination-fODgpZZ8.js → usePagination-CIRxyVr8.js} +1 -1
  136. package/dist/{user-DaLUK1dk.js → user-PTTQTMyQ.js} +1 -1
  137. package/dist/vue-i18n-DYnrLWFT.js +2365 -0
  138. package/dist/{xlsx-Bl4_Dtrq.js → xlsx-l0AsOrP1.js} +786 -786
  139. package/dist/{zod-CAzWyVqj.js → zod-Bm1pKYLC.js} +1 -1
  140. package/package.json +12 -3
  141. package/dist/Broadcast-ByWvxVhW.js +0 -271
  142. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DGpQfV5T.js +0 -2431
  143. package/dist/Marketing-KgcwGErU.js +0 -236
  144. package/dist/ReviewFacebookCallback-mJF54-9l.js +0 -238
  145. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-39f3I4BB.js +0 -1883
  146. package/dist/Setting-Dl9MelHz.js +0 -2036
  147. package/dist/Settings-DvCCClIP.js +0 -179
  148. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DscLAF0p.js +0 -1264
  149. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-l_v4FHO0.js +0 -142
  150. package/dist/campaign-awCRccgX.js +0 -228
  151. package/dist/google-C3S8u0mT.js +0 -4
  152. package/dist/index-CoNJdOx7.js +0 -51
  153. package/dist/objectid-CEHN25HN.js +0 -145
  154. package/dist/rule-builder-BEIjxsE0.js +0 -102
  155. package/dist/template-CS-lExgI.js +0 -236
  156. package/dist/useMarketingMaterialActions-DC0gIyIZ.js +0 -96
  157. package/dist/vue-i18n-Dx-KXojZ.js +0 -2365
@@ -0,0 +1,21 @@
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
+ };
@@ -0,0 +1,253 @@
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
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as f, useAttrs as y, resolveComponent as b, openBlock as l, createBlock as v, mergeProps as x, unref as t, createSlots as g, withCtx as h, createElementVNode as a, toDisplayString as n, renderSlot as k, createElementBlock as F, createCommentVNode as S } from "vue";
2
- import { Z as d } from "./zod-CAzWyVqj.js";
3
- import { u as V } from "./vue-i18n-Dx-KXojZ.js";
2
+ import { Z as d } from "./zod-Bm1pKYLC.js";
3
+ import { u as V } from "./vue-i18n-DYnrLWFT.js";
4
4
  const B = { class: "fm-typo-en-body-lg-400 flex gap-4 text-fm-color-typo-primary items-center" }, C = {
5
5
  key: 0,
6
6
  class: "text-fm-color-typo-tertiary"