@_solaris/messenger-widget 0.5.63 → 0.5.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/messenger.js CHANGED
@@ -1,4 +1,4 @@
1
- import { reactive as Ve, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as R, toDisplayString as v, resolveComponent as B, createVNode as V, Transition as Ne, withCtx as je, Fragment as I, renderList as j, withKeys as ge, withModifiers as J, createElementVNode as o, createCommentVNode as w, createBlock as U, resolveDynamicComponent as Ae, mergeProps as Fe, withDirectives as G, vModelText as te, createTextVNode as Se, renderSlot as Ke, vModelCheckbox as We, vModelSelect as Ge, markRaw as Re } from "vue";
1
+ import { reactive as Ve, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as R, toDisplayString as v, resolveComponent as B, createVNode as V, Transition as Ne, withCtx as Fe, Fragment as I, renderList as F, withKeys as ge, withModifiers as J, createElementVNode as o, createCommentVNode as w, createBlock as U, resolveDynamicComponent as Ae, mergeProps as je, withDirectives as G, vModelText as te, createTextVNode as Se, renderSlot as Ke, vModelCheckbox as We, vModelSelect as Ge, markRaw as Re } from "vue";
2
2
  const Ye = [
3
3
  "connected",
4
4
  "message",
@@ -1150,7 +1150,7 @@ function xe(e) {
1150
1150
  function ne(e) {
1151
1151
  return Le[xe(e)] || Le[ue];
1152
1152
  }
1153
- function F(e) {
1153
+ function j(e) {
1154
1154
  const t = xe(e), n = ke[t] || ke[ue], r = ke[ue];
1155
1155
  return function(s, i) {
1156
1156
  let l = n[s];
@@ -1168,7 +1168,7 @@ function Ie(e, t) {
1168
1168
  function He(e, t, n) {
1169
1169
  return Array.isArray(t) ? t.map((r) => Ie(e, String(r))).join(", ") : typeof t == "boolean" ? n(t ? "common.yes" : "common.no") : Ie(e, String(t));
1170
1170
  }
1171
- function ht(e, t, n = F()) {
1171
+ function ht(e, t, n = j()) {
1172
1172
  if (!e || !t) return "";
1173
1173
  const r = Array.isArray(e.fields) ? e.fields : [], a = [];
1174
1174
  for (const s of r) {
@@ -1183,7 +1183,7 @@ ${l}`);
1183
1183
 
1184
1184
  `);
1185
1185
  }
1186
- function mt(e, t, n = F()) {
1186
+ function mt(e, t, n = j()) {
1187
1187
  const r = [], a = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
1188
1188
  for (const s of a) {
1189
1189
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
@@ -1342,7 +1342,7 @@ function pt(e, t, n, r) {
1342
1342
  return a.join(`
1343
1343
  `);
1344
1344
  }
1345
- function vt(e, t, n = F(), r) {
1345
+ function vt(e, t, n = j(), r) {
1346
1346
  if (!e) return;
1347
1347
  const a = pt(e, t || [], n, ne(r)), s = new Blob([a], { type: "text/plain;charset=utf-8" });
1348
1348
  try {
@@ -1857,7 +1857,7 @@ const ve = /* @__PURE__ */ P(St, [["render", Tt], ["__scopeId", "data-v-14e10c0d
1857
1857
  inject: {
1858
1858
  // Translator shared by the Messenger shell; French fallback when
1859
1859
  // the component is used standalone.
1860
- t: { default: () => F() }
1860
+ t: { default: () => j() }
1861
1861
  },
1862
1862
  props: {
1863
1863
  // Nombre de conversations non lues — pilote la pastille.
@@ -1877,7 +1877,7 @@ const ve = /* @__PURE__ */ P(St, [["render", Tt], ["__scopeId", "data-v-14e10c0d
1877
1877
  return this.peeks.slice(0, xt).reverse();
1878
1878
  }
1879
1879
  }
1880
- }, Rt = ["aria-label", "onClick", "onKeydown"], Lt = ["aria-label", "onClick"], It = { class: "wm-peek__avatar" }, Et = ["aria-label"], Bt = { class: "wm-peek__body" }, Pt = { class: "wm-peek__head" }, Ut = { class: "wm-peek__name" }, Dt = { class: "wm-peek__action" }, Nt = { class: "wm-peek__text" }, jt = ["onClick"], Ft = ["aria-label"], Ht = ["aria-label"];
1880
+ }, Rt = ["aria-label", "onClick", "onKeydown"], Lt = ["aria-label", "onClick"], It = { class: "wm-peek__avatar" }, Et = ["aria-label"], Bt = { class: "wm-peek__body" }, Pt = { class: "wm-peek__head" }, Ut = { class: "wm-peek__name" }, Dt = { class: "wm-peek__action" }, Nt = { class: "wm-peek__text" }, Ft = ["onClick"], jt = ["aria-label"], Ht = ["aria-label"];
1881
1881
  function zt(e, t, n, r, a, s) {
1882
1882
  const i = B("HumanAvatar");
1883
1883
  return c(), d("div", {
@@ -1888,12 +1888,12 @@ function zt(e, t, n, r, a, s) {
1888
1888
  onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
1889
1889
  }, [
1890
1890
  V(Ne, { name: "wm-peek" }, {
1891
- default: je(() => [
1891
+ default: Fe(() => [
1892
1892
  s.visiblePeeks.length ? (c(), d("div", {
1893
1893
  key: 0,
1894
1894
  class: R(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
1895
1895
  }, [
1896
- (c(!0), d(I, null, j(s.visiblePeeks, (l, g) => (c(), d("div", {
1896
+ (c(!0), d(I, null, F(s.visiblePeeks, (l, g) => (c(), d("div", {
1897
1897
  key: l.convId,
1898
1898
  class: "wm-peek",
1899
1899
  style: z({
@@ -1954,7 +1954,7 @@ function zt(e, t, n, r, a, s) {
1954
1954
  type: "button",
1955
1955
  class: "wm-peek__open",
1956
1956
  onClick: J((k) => e.$emit("open", l.convId), ["stop"])
1957
- }, v(s.t("common.open")), 9, jt)
1957
+ }, v(s.t("common.open")), 9, Ft)
1958
1958
  ], 44, Rt))), 128))
1959
1959
  ], 2)) : w("", !0)
1960
1960
  ]),
@@ -1988,7 +1988,7 @@ function zt(e, t, n, r, a, s) {
1988
1988
  count: n.unreadCount
1989
1989
  })
1990
1990
  }, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Ht)) : w("", !0)
1991
- ], 8, Ft)
1991
+ ], 8, jt)
1992
1992
  ], 32);
1993
1993
  }
1994
1994
  const qt = /* @__PURE__ */ P(Ot, [["render", zt], ["__scopeId", "data-v-44ddf1a1"]]), $t = {
@@ -2117,7 +2117,7 @@ function en(e, t, n, r, a, s) {
2117
2117
  class: "wm-team__stack",
2118
2118
  style: z({ width: s.stackWidth + "px" })
2119
2119
  }, [
2120
- (c(!0), d(I, null, j(n.members.slice(0, 3), (i, l) => (c(), d("div", {
2120
+ (c(!0), d(I, null, F(n.members.slice(0, 3), (i, l) => (c(), d("div", {
2121
2121
  key: l,
2122
2122
  class: "wm-team__pill",
2123
2123
  style: z({
@@ -2142,7 +2142,7 @@ const tn = /* @__PURE__ */ P(Yt, [["render", en], ["__scopeId", "data-v-e49a9063
2142
2142
  inject: {
2143
2143
  // Translator shared by the Messenger shell. Falls back to a French
2144
2144
  // translator when the component is used standalone (no provider).
2145
- t: { default: () => F() }
2145
+ t: { default: () => j() }
2146
2146
  },
2147
2147
  props: {
2148
2148
  title: { type: String, default: "Nouvelle conversation" },
@@ -2295,7 +2295,7 @@ const _n = /* @__PURE__ */ P(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2295
2295
  // shell. The language getter feeds `formatTs` (relative date
2296
2296
  // labels on unread alerts) ; falls back to French when the
2297
2297
  // component is used standalone.
2298
- t: { default: () => F() },
2298
+ t: { default: () => j() },
2299
2299
  wmLocale: { default: () => () => "fr" }
2300
2300
  },
2301
2301
  props: {
@@ -2415,7 +2415,7 @@ const _n = /* @__PURE__ */ P(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2415
2415
  }, Rn = ["innerHTML"], Ln = { class: "wm-onb__alert-meta" }, In = {
2416
2416
  key: 0,
2417
2417
  class: "wm-onb__alert-time"
2418
- }, En = { class: "wm-onb__alert-resume" }, Bn = { class: "wm-onb__actions" }, Pn = ["disabled"], Un = { class: "wm-onb__btn-label" }, Dn = ["onClick"], Nn = { class: "wm-onb__btn-icon" }, jn = ["aria-label"], Fn = {
2418
+ }, En = { class: "wm-onb__alert-resume" }, Bn = { class: "wm-onb__actions" }, Pn = ["disabled"], Un = { class: "wm-onb__btn-label" }, Dn = ["onClick"], Nn = { class: "wm-onb__btn-icon" }, Fn = ["aria-label"], jn = {
2419
2419
  key: 1,
2420
2420
  width: "18",
2421
2421
  height: "18",
@@ -2497,7 +2497,7 @@ function Yn(e, t, n, r, a, s) {
2497
2497
  ])
2498
2498
  ]),
2499
2499
  s.unreadThreads.length ? (c(), d("div", kn, [
2500
- (c(!0), d(I, null, j(s.unreadThreads, (l) => (c(), d("button", {
2500
+ (c(!0), d(I, null, F(s.unreadThreads, (l) => (c(), d("button", {
2501
2501
  key: l.id,
2502
2502
  type: "button",
2503
2503
  class: "wm-onb__alert",
@@ -2520,7 +2520,7 @@ function Yn(e, t, n, r, a, s) {
2520
2520
  }, [
2521
2521
  o("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2522
2522
  ], -1)
2523
- ])])) : (c(), U(Ae(s.avatarComponent(l)), Fe({
2523
+ ])])) : (c(), U(Ae(s.avatarComponent(l)), je({
2524
2524
  key: 1,
2525
2525
  ref_for: !0
2526
2526
  }, s.avatarProps(l)), null, 16)),
@@ -2568,7 +2568,7 @@ function Yn(e, t, n, r, a, s) {
2568
2568
  ], -1)),
2569
2569
  o("span", Un, v(n.busy ? "…" : s.t("onboarding.start")), 1)
2570
2570
  ], 8, Pn),
2571
- (c(!0), d(I, null, j(n.quickLinks, (l, g) => (c(), d("button", {
2571
+ (c(!0), d(I, null, F(n.quickLinks, (l, g) => (c(), d("button", {
2572
2572
  key: "ql-" + g,
2573
2573
  type: "button",
2574
2574
  class: "wm-onb__btn",
@@ -2581,7 +2581,7 @@ function Yn(e, t, n, r, a, s) {
2581
2581
  style: z(s.iconUrlStyle(l)),
2582
2582
  role: "img",
2583
2583
  "aria-label": l.label || ""
2584
- }, null, 12, jn)) : (c(), d("svg", Fn, [
2584
+ }, null, 12, Fn)) : (c(), d("svg", jn, [
2585
2585
  o("path", {
2586
2586
  d: s.iconPath(l.icon)
2587
2587
  }, null, 8, Hn)
@@ -2629,7 +2629,7 @@ const Jn = /* @__PURE__ */ P(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe
2629
2629
  name: "WmHistory",
2630
2630
  components: { AIAvatar: oe, HumanAvatar: ve },
2631
2631
  inject: {
2632
- t: { default: () => F() },
2632
+ t: { default: () => j() },
2633
2633
  wmLocale: { default: () => () => "fr" }
2634
2634
  },
2635
2635
  props: {
@@ -2732,7 +2732,7 @@ function us(e, t, n, r, a, s) {
2732
2732
  ])
2733
2733
  ]),
2734
2734
  o("div", ts, [
2735
- (c(!0), d(I, null, j(s.filteredThreads, (i) => (c(), d("button", {
2735
+ (c(!0), d(I, null, F(s.filteredThreads, (i) => (c(), d("button", {
2736
2736
  key: i.id,
2737
2737
  type: "button",
2738
2738
  class: R(["wm-hist__thread", { "wm-hist__thread--unread": i.unread }]),
@@ -2755,7 +2755,7 @@ function us(e, t, n, r, a, s) {
2755
2755
  }, [
2756
2756
  o("path", { d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" })
2757
2757
  ], -1)
2758
- ])])) : (c(), U(Ae(s.avatarComponent(i)), Fe({
2758
+ ])])) : (c(), U(Ae(s.avatarComponent(i)), je({
2759
2759
  key: 1,
2760
2760
  ref_for: !0
2761
2761
  }, s.avatarProps(i)), null, 16)),
@@ -2904,7 +2904,7 @@ const As = /* @__PURE__ */ P(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0
2904
2904
  inject: {
2905
2905
  // Translator shared by the Messenger shell; French fallback when
2906
2906
  // the component is used standalone.
2907
- t: { default: () => F() }
2907
+ t: { default: () => j() }
2908
2908
  },
2909
2909
  props: {
2910
2910
  data: { type: Object, required: !0 }
@@ -2938,7 +2938,7 @@ function Is(e, t, n, r, a, s) {
2938
2938
  ])
2939
2939
  ]),
2940
2940
  o("div", Rs, [
2941
- (c(!0), d(I, null, j(s.fields, (i, l) => (c(), d("div", {
2941
+ (c(!0), d(I, null, F(s.fields, (i, l) => (c(), d("div", {
2942
2942
  key: l,
2943
2943
  class: "wm-art__field"
2944
2944
  }, [
@@ -2971,7 +2971,7 @@ const Es = /* @__PURE__ */ P(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1
2971
2971
  }, Ps = { class: "wm-art wm-art--infoCard" }, Us = {
2972
2972
  key: 0,
2973
2973
  class: "wm-art__image"
2974
- }, Ds = ["src", "alt"], Ns = { class: "wm-art__head" }, js = { class: "wm-art__headMain" }, Fs = { class: "wm-art__title" }, Hs = {
2974
+ }, Ds = ["src", "alt"], Ns = { class: "wm-art__head" }, Fs = { class: "wm-art__headMain" }, js = { class: "wm-art__title" }, Hs = {
2975
2975
  key: 0,
2976
2976
  class: "wm-art__subtitle"
2977
2977
  }, zs = {
@@ -2991,8 +2991,8 @@ function Vs(e, t, n, r, a, s) {
2991
2991
  }, null, 8, Ds)
2992
2992
  ])) : w("", !0),
2993
2993
  o("div", Ns, [
2994
- o("div", js, [
2995
- o("div", Fs, v(n.data.title), 1),
2994
+ o("div", Fs, [
2995
+ o("div", js, v(n.data.title), 1),
2996
2996
  n.data.subtitle ? (c(), d("div", Hs, v(n.data.subtitle), 1)) : w("", !0)
2997
2997
  ]),
2998
2998
  n.data.badge && n.data.badge.label ? (c(), d("span", {
@@ -3005,7 +3005,7 @@ function Vs(e, t, n, r, a, s) {
3005
3005
  ]),
3006
3006
  s.hasBody ? (c(), d("div", zs, [
3007
3007
  n.data.body ? (c(), d("div", qs, v(n.data.body), 1)) : w("", !0),
3008
- s.fields.length ? (c(!0), d(I, { key: 1 }, j(s.fields, (i, l) => (c(), d("div", {
3008
+ s.fields.length ? (c(!0), d(I, { key: 1 }, F(s.fields, (i, l) => (c(), d("div", {
3009
3009
  key: l,
3010
3010
  class: "wm-art__field"
3011
3011
  }, [
@@ -3040,7 +3040,7 @@ const Gs = {
3040
3040
  inject: {
3041
3041
  // Translator + resolved-language getter shared by the Messenger
3042
3042
  // shell. Fall back to French wording when used standalone.
3043
- t: { default: () => F() },
3043
+ t: { default: () => j() },
3044
3044
  wmLocale: { default: () => () => "fr" }
3045
3045
  },
3046
3046
  props: {
@@ -3142,7 +3142,7 @@ function ar(e, t, n, r, a, s) {
3142
3142
  n.data.body ? (c(), d("div", er, v(n.data.body), 1)) : w("", !0)
3143
3143
  ]),
3144
3144
  s.fields.length ? (c(), d("div", tr, [
3145
- (c(!0), d(I, null, j(s.fields, (i, l) => (c(), d("div", {
3145
+ (c(!0), d(I, null, F(s.fields, (i, l) => (c(), d("div", {
3146
3146
  key: l,
3147
3147
  class: "wm-art__field"
3148
3148
  }, [
@@ -3253,7 +3253,7 @@ const ur = /* @__PURE__ */ P(cr, [["render", dr]]), hr = {
3253
3253
  signAttachmentFn: { default: null },
3254
3254
  // Translator shared by the Messenger shell; French fallback when
3255
3255
  // the component is used standalone.
3256
- t: { default: () => F() }
3256
+ t: { default: () => j() }
3257
3257
  },
3258
3258
  props: {
3259
3259
  attachment: { type: Object, required: !0 }
@@ -3348,7 +3348,8 @@ function kr(e, t, n, r, a, s) {
3348
3348
  key: 2,
3349
3349
  src: a.url,
3350
3350
  controls: "",
3351
- preload: "metadata"
3351
+ playsinline: "",
3352
+ preload: "auto"
3352
3353
  }, null, 8, gr)) : (c(), d("a", {
3353
3354
  key: 3,
3354
3355
  class: "wm-att__file",
@@ -3382,7 +3383,7 @@ function kr(e, t, n, r, a, s) {
3382
3383
  ], 8, pr))
3383
3384
  ], 2);
3384
3385
  }
3385
- const Cr = /* @__PURE__ */ P(hr, [["render", kr], ["__scopeId", "data-v-0c3d5983"]]), Ar = {
3386
+ const Cr = /* @__PURE__ */ P(hr, [["render", kr], ["__scopeId", "data-v-0d27fca6"]]), Ar = {
3386
3387
  name: "WmBubble",
3387
3388
  props: {
3388
3389
  role: { type: String, default: "ai" },
@@ -3437,7 +3438,7 @@ const Ir = {
3437
3438
  inject: {
3438
3439
  // Translator + resolved-language getter shared by the Messenger
3439
3440
  // shell. Fall back to French wording when used standalone.
3440
- t: { default: () => F() },
3441
+ t: { default: () => j() },
3441
3442
  wmLocale: { default: () => () => "fr" }
3442
3443
  },
3443
3444
  props: {
@@ -3984,10 +3985,10 @@ const Ir = {
3984
3985
  class: "wm-list__loadMore",
3985
3986
  role: "status",
3986
3987
  "aria-live": "polite"
3987
- }, Nr = { class: "wm-list__loadMore-lbl" }, jr = {
3988
+ }, Nr = { class: "wm-list__loadMore-lbl" }, Fr = {
3988
3989
  key: 1,
3989
3990
  class: "wm-list__historyEnd"
3990
- }, Fr = {
3991
+ }, jr = {
3991
3992
  key: 2,
3992
3993
  class: "wm-list__sep"
3993
3994
  }, Hr = { class: "wm-list__sep-label" }, zr = {
@@ -4023,13 +4024,13 @@ function si(e, t, n, r, a, s) {
4023
4024
  "aria-hidden": "true"
4024
4025
  }, null, -1)),
4025
4026
  o("span", Nr, v(s.t("messageList.loadingHistory")), 1)
4026
- ])) : s.historyExhausted ? (c(), d("div", jr, v(s.t("messageList.conversationStart")), 1)) : w("", !0),
4027
- n.dateLabel ? (c(), d("div", Fr, [
4027
+ ])) : s.historyExhausted ? (c(), d("div", Fr, v(s.t("messageList.conversationStart")), 1)) : w("", !0),
4028
+ n.dateLabel ? (c(), d("div", jr, [
4028
4029
  t[7] || (t[7] = o("div", { class: "wm-list__line" }, null, -1)),
4029
4030
  o("span", Hr, v(n.dateLabel), 1),
4030
4031
  t[8] || (t[8] = o("div", { class: "wm-list__line" }, null, -1))
4031
4032
  ])) : w("", !0),
4032
- (c(!0), d(I, null, j(s.groups, (A, q) => (c(), d(I, {
4033
+ (c(!0), d(I, null, F(s.groups, (A, q) => (c(), d(I, {
4033
4034
  key: A.key
4034
4035
  }, [
4035
4036
  A.key === s.unreadGroupKey ? (c(), d("div", zr, [
@@ -4046,7 +4047,7 @@ function si(e, t, n, r, a, s) {
4046
4047
  o("span", Vr, v(A.systemLabel), 1),
4047
4048
  t[12] || (t[12] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
4048
4049
  ])) : (c(), d(I, { key: 1 }, [
4049
- (c(!0), d(I, null, j(A.items, (M, D) => (c(), d(I, {
4050
+ (c(!0), d(I, null, F(A.items, (M, D) => (c(), d(I, {
4050
4051
  key: `${s.messageKey(M.message)}-${M.partKey}`
4051
4052
  }, [
4052
4053
  o("div", {
@@ -4113,10 +4114,11 @@ function si(e, t, n, r, a, s) {
4113
4114
  s.attachmentsOf(M.message).length ? (c(), d("div", {
4114
4115
  key: 1,
4115
4116
  class: R(["wm-list__atts", {
4116
- "wm-list__atts--align-end": A.role === "user"
4117
+ "wm-list__atts--align-end": A.role === "user",
4118
+ "wm-list__atts--mosaic": s.attachmentsOf(M.message).length >= 2
4117
4119
  }])
4118
4120
  }, [
4119
- (c(!0), d(I, null, j(s.attachmentsOf(
4121
+ (c(!0), d(I, null, F(s.attachmentsOf(
4120
4122
  M.message
4121
4123
  ), (N, L) => (c(), U(T, {
4122
4124
  key: `${s.messageKey(M.message)}-att-${L}`,
@@ -4158,7 +4160,7 @@ function si(e, t, n, r, a, s) {
4158
4160
  ])) : w("", !0)
4159
4161
  ], 34),
4160
4162
  V(Ne, { name: "wm-scrollDown" }, {
4161
- default: je(() => [
4163
+ default: Fe(() => [
4162
4164
  a.showScrollDown ? (c(), d("button", {
4163
4165
  key: 0,
4164
4166
  type: "button",
@@ -4186,7 +4188,7 @@ function si(e, t, n, r, a, s) {
4186
4188
  })
4187
4189
  ]);
4188
4190
  }
4189
- const ri = /* @__PURE__ */ P(Pr, [["render", si], ["__scopeId", "data-v-7486891c"]]), pe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Oe = typeof window < "u" && typeof window.MediaRecorder < "u";
4191
+ const ri = /* @__PURE__ */ P(Pr, [["render", si], ["__scopeId", "data-v-6e757ccd"]]), pe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Oe = typeof window < "u" && typeof window.MediaRecorder < "u";
4190
4192
  function ii() {
4191
4193
  return Oe && [
4192
4194
  "video/webm;codecs=vp9,opus",
@@ -4329,7 +4331,7 @@ const ci = [
4329
4331
  inject: {
4330
4332
  // Translator shared by the Messenger shell; French fallback when
4331
4333
  // the component is used standalone.
4332
- t: { default: () => F() }
4334
+ t: { default: () => j() }
4333
4335
  },
4334
4336
  props: {
4335
4337
  modelValue: { type: String, default: "" },
@@ -4527,7 +4529,7 @@ function ki(e, t, n, r, a, s) {
4527
4529
  onClick: t[2] || (t[2] = (i) => a.attachOpen = !1)
4528
4530
  })) : w("", !0),
4529
4531
  a.attachOpen ? (c(), d("div", mi, [
4530
- (c(!0), d(I, null, j(s.attachItems, (i) => (c(), d("button", {
4532
+ (c(!0), d(I, null, F(s.attachItems, (i) => (c(), d("button", {
4531
4533
  key: i.action,
4532
4534
  type: "button",
4533
4535
  class: "wm-compose__menuItem",
@@ -4631,7 +4633,7 @@ function Mi(e, t, n, r, a, s) {
4631
4633
  key: s.batchKey,
4632
4634
  class: "wm-chips"
4633
4635
  }, [
4634
- (c(!0), d(I, null, j(n.items, (i, l) => (c(), d("button", {
4636
+ (c(!0), d(I, null, F(n.items, (i, l) => (c(), d("button", {
4635
4637
  key: l,
4636
4638
  type: "button",
4637
4639
  class: "wm-chip",
@@ -4646,7 +4648,7 @@ const Ti = /* @__PURE__ */ P(Ai, [["render", Mi], ["__scopeId", "data-v-47ad8085
4646
4648
  inject: {
4647
4649
  // Translator shared by the Messenger shell; French fallback when
4648
4650
  // the component is used standalone.
4649
- t: { default: () => F() }
4651
+ t: { default: () => j() }
4650
4652
  },
4651
4653
  props: {
4652
4654
  action: { type: String, required: !0 },
@@ -4730,13 +4732,13 @@ const Ni = /* @__PURE__ */ new Set([
4730
4732
  "select",
4731
4733
  "multiselect",
4732
4734
  "date"
4733
- ]), ji = {
4735
+ ]), Fi = {
4734
4736
  name: "WmFormCard",
4735
4737
  components: { AIAvatar: oe },
4736
4738
  inject: {
4737
4739
  // Translator shared by the Messenger shell; French fallback when
4738
4740
  // the component is used standalone.
4739
- t: { default: () => F() }
4741
+ t: { default: () => j() }
4740
4742
  },
4741
4743
  props: {
4742
4744
  form: { type: Object, required: !0 },
@@ -4813,7 +4815,7 @@ const Ni = /* @__PURE__ */ new Set([
4813
4815
  }
4814
4816
  }
4815
4817
  }
4816
- }, Fi = { class: "wm-form" }, Hi = { class: "wm-form__head" }, zi = { class: "wm-form__icon" }, qi = { class: "wm-form__main" }, $i = { class: "wm-form__title" }, Vi = {
4818
+ }, ji = { class: "wm-form" }, Hi = { class: "wm-form__head" }, zi = { class: "wm-form__icon" }, qi = { class: "wm-form__main" }, $i = { class: "wm-form__title" }, Vi = {
4817
4819
  key: 0,
4818
4820
  class: "wm-form__detail"
4819
4821
  }, Ki = ["for"], Wi = {
@@ -4842,7 +4844,7 @@ const Ni = /* @__PURE__ */ new Set([
4842
4844
  };
4843
4845
  function ca(e, t, n, r, a, s) {
4844
4846
  const i = B("AIAvatar");
4845
- return c(), d("div", Fi, [
4847
+ return c(), d("div", ji, [
4846
4848
  o("div", Hi, [
4847
4849
  o("div", zi, [
4848
4850
  V(i, {
@@ -4860,7 +4862,7 @@ function ca(e, t, n, r, a, s) {
4860
4862
  class: "wm-form__body",
4861
4863
  onSubmit: t[0] || (t[0] = J((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
4862
4864
  }, [
4863
- (c(!0), d(I, null, j(s.normalizedFields, (l) => (c(), d("div", {
4865
+ (c(!0), d(I, null, F(s.normalizedFields, (l) => (c(), d("div", {
4864
4866
  key: l.key,
4865
4867
  class: "wm-form__field"
4866
4868
  }, [
@@ -4938,14 +4940,14 @@ function ca(e, t, n, r, a, s) {
4938
4940
  disabled: n.readOnly || a.busy
4939
4941
  }, [
4940
4942
  o("option", ta, v(l.placeholder || s.t("form.choose")), 1),
4941
- (c(!0), d(I, null, j(l.options, (g) => (c(), d("option", {
4943
+ (c(!0), d(I, null, F(l.options, (g) => (c(), d("option", {
4942
4944
  key: g.value,
4943
4945
  value: g.value
4944
4946
  }, v(g.label), 9, na))), 128))
4945
4947
  ], 8, ea)), [
4946
4948
  [Ge, a.values[l.key]]
4947
4949
  ]) : l.type === "multiselect" ? (c(), d("div", sa, [
4948
- (c(!0), d(I, null, j(l.options, (g) => (c(), d("label", {
4950
+ (c(!0), d(I, null, F(l.options, (g) => (c(), d("label", {
4949
4951
  key: g.value,
4950
4952
  class: "wm-form__multiItem"
4951
4953
  }, [
@@ -4977,12 +4979,12 @@ function ca(e, t, n, r, a, s) {
4977
4979
  ], 32)
4978
4980
  ]);
4979
4981
  }
4980
- const da = /* @__PURE__ */ P(ji, [["render", ca], ["__scopeId", "data-v-fe65cc56"]]), ua = {
4982
+ const da = /* @__PURE__ */ P(Fi, [["render", ca], ["__scopeId", "data-v-fe65cc56"]]), ua = {
4981
4983
  name: "WmFeedback",
4982
4984
  inject: {
4983
4985
  // Translator shared by the Messenger shell; French fallback when
4984
4986
  // the component is used standalone.
4985
- t: { default: () => F() }
4987
+ t: { default: () => j() }
4986
4988
  },
4987
4989
  props: {
4988
4990
  busy: { type: Boolean, default: !1 },
@@ -5039,7 +5041,7 @@ function Ca(e, t, n, r, a, s) {
5039
5041
  o("div", ma, v(s.t("feedback.question")), 1),
5040
5042
  o("div", fa, v(s.t("feedback.subtitle")), 1),
5041
5043
  o("div", _a, [
5042
- (c(!0), d(I, null, j(s.options, (i) => (c(), d("button", {
5044
+ (c(!0), d(I, null, F(s.options, (i) => (c(), d("button", {
5043
5045
  key: i.v,
5044
5046
  type: "button",
5045
5047
  class: R(["wm-fb__opt", { "is-selected": a.sel === i.v }]),
@@ -5063,7 +5065,7 @@ const Aa = /* @__PURE__ */ P(ua, [["render", Ca], ["__scopeId", "data-v-9b630564
5063
5065
  inject: {
5064
5066
  // Translator shared by the Messenger shell; French fallback when
5065
5067
  // the component is used standalone.
5066
- t: { default: () => F() }
5068
+ t: { default: () => j() }
5067
5069
  },
5068
5070
  props: {
5069
5071
  canRename: { type: Boolean, default: !0 },
@@ -5243,12 +5245,12 @@ function Da(e, t, n, r, a, s) {
5243
5245
  ])
5244
5246
  ]);
5245
5247
  }
5246
- const Na = /* @__PURE__ */ P(Sa, [["render", Da], ["__scopeId", "data-v-4cf6d578"]]), ja = {
5248
+ const Na = /* @__PURE__ */ P(Sa, [["render", Da], ["__scopeId", "data-v-4cf6d578"]]), Fa = {
5247
5249
  name: "WmRenameDialog",
5248
5250
  inject: {
5249
5251
  // Translator shared by the Messenger shell; French fallback when
5250
5252
  // the component is used standalone.
5251
- t: { default: () => F() }
5253
+ t: { default: () => j() }
5252
5254
  },
5253
5255
  props: {
5254
5256
  // Empty defaults: the resolved fallback comes from the translator
@@ -5285,13 +5287,13 @@ const Na = /* @__PURE__ */ P(Sa, [["render", Da], ["__scopeId", "data-v-4cf6d578
5285
5287
  this.canSubmit && this.$emit("submit", this.value.trim());
5286
5288
  }
5287
5289
  }
5288
- }, Fa = { class: "wm-dialog" }, Ha = {
5290
+ }, ja = { class: "wm-dialog" }, Ha = {
5289
5291
  class: "wm-dialog__card",
5290
5292
  role: "dialog",
5291
5293
  "aria-modal": "true"
5292
5294
  }, za = { class: "wm-dialog__head" }, qa = { class: "wm-dialog__title" }, $a = ["aria-label"], Va = { class: "wm-dialog__body" }, Ka = ["placeholder"], Wa = { class: "wm-dialog__actions" }, Ga = ["disabled"];
5293
5295
  function Ya(e, t, n, r, a, s) {
5294
- return c(), d("div", Fa, [
5296
+ return c(), d("div", ja, [
5295
5297
  o("div", {
5296
5298
  class: "wm-dialog__scrim",
5297
5299
  onClick: t[0] || (t[0] = (i) => e.$emit("close"))
@@ -5352,7 +5354,7 @@ function Ya(e, t, n, r, a, s) {
5352
5354
  ])
5353
5355
  ]);
5354
5356
  }
5355
- const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8"]]), De = "ww-messenger-tokens", Xa = {
5357
+ const Ja = /* @__PURE__ */ P(Fa, [["render", Ya], ["__scopeId", "data-v-6d5f94a8"]]), De = "ww-messenger-tokens", Xa = {
5356
5358
  name: "Messenger",
5357
5359
  components: {
5358
5360
  Launcher: qt,
@@ -5543,7 +5545,7 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5543
5545
  // `locale` changes. `t()` below (and the provided closure) delegate
5544
5546
  // to it so every string resolves against the current language.
5545
5547
  translator() {
5546
- return F(this.locale);
5548
+ return j(this.locale);
5547
5549
  },
5548
5550
  error() {
5549
5551
  var e;
@@ -6118,14 +6120,7 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6118
6120
  }
6119
6121
  },
6120
6122
  async refresh() {
6121
- this.store && this.store.destroy(), this.cancelReveals(), this.cancelWelcomeTimers(), this.welcomeRevealedAt = {}, this.teardownLiveReveal(), this.teardownNotifications(), this.convOpenedAt = 0, this.transport = null, this.store = null, this.isOpen = !1, this.draft = "", this.busy = !1, this.bootError = null;
6122
- for (const e of this.pendingAttachments)
6123
- if (e != null && e._previewUrl)
6124
- try {
6125
- URL.revokeObjectURL(e._previewUrl);
6126
- } catch {
6127
- }
6128
- this.pendingAttachments = [], this.feedbackBusy = !1, this.feedbackDone = !1, this.moreOpen = !1, this.renameDialogOpen = !1, this.draftConv = null, this.activeConvId = null, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = !1, await this.boot(), this.isEmbedded && this.store && await this.open();
6123
+ this.store && this.store.destroy(), this.cancelReveals(), this.cancelWelcomeTimers(), this.welcomeRevealedAt = {}, this.teardownLiveReveal(), this.teardownNotifications(), this.convOpenedAt = 0, this.transport = null, this.store = null, this.isOpen = !1, this.draft = "", this.busy = !1, this.bootError = null, this.pendingAttachments = [], this.feedbackBusy = !1, this.feedbackDone = !1, this.moreOpen = !1, this.renameDialogOpen = !1, this.draftConv = null, this.activeConvId = null, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = !1, await this.boot(), this.isEmbedded && this.store && await this.open();
6129
6124
  },
6130
6125
  // ── Float overlay measurement ────────────────────────────────────
6131
6126
  syncFloatObserver(e) {
@@ -6443,12 +6438,7 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6443
6438
  const n = t.id, r = this.pendingAttachments.slice();
6444
6439
  this.pendingAttachments = [], this.unreadAnchorId = null, this.unreadBoundaryTs = "";
6445
6440
  const a = r.map((s) => {
6446
- const { _previewUrl: i, ...l } = s;
6447
- if (i)
6448
- try {
6449
- URL.revokeObjectURL(i);
6450
- } catch {
6451
- }
6441
+ const { previewUrl: i, ...l } = s;
6452
6442
  return l;
6453
6443
  });
6454
6444
  await this.store.send(n, e, {
@@ -6484,11 +6474,6 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6484
6474
  }
6485
6475
  }));
6486
6476
  },
6487
- // True for attachments whose mime type makes them eligible for a
6488
- // local-blob thumbnail in the pending strip.
6489
- isPendingImage(e) {
6490
- return ((e == null ? void 0 : e.mime_type) || "").toLowerCase().startsWith("image/");
6491
- },
6492
6477
  // Human-readable size label (bytes / KB / MB) for the pending
6493
6478
  // file-card footer. Returns an empty string when the size is
6494
6479
  // unknown so the row keeps a single-line layout.
@@ -6499,40 +6484,32 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6499
6484
  size: (e / (1024 * 1024)).toFixed(1)
6500
6485
  }) : "";
6501
6486
  },
6502
- // Drop a pending attachment from the strip, revoking the blob URL
6503
- // we created at attach time so the browser releases the underlying
6504
- // memory. Safe to call on non-image attachments (the field is
6505
- // simply absent).
6487
+ // Drop a pending attachment from the strip.
6506
6488
  removePendingAttachment(e) {
6507
- const t = this.pendingAttachments[e];
6508
- if (t != null && t._previewUrl)
6509
- try {
6510
- URL.revokeObjectURL(t._previewUrl);
6511
- } catch {
6512
- }
6513
6489
  this.pendingAttachments.splice(e, 1);
6514
6490
  },
6515
6491
  async onAttach(e) {
6516
- if (!e || !this.transport) return;
6517
- const n = (e.type || "").toLowerCase().startsWith("image/") ? URL.createObjectURL(e) : null;
6518
- try {
6519
- const r = await this.transport.uploadAttachment(e);
6520
- this.pendingAttachments.push({
6521
- type: r.type || "file",
6522
- path: r.path,
6523
- name: e.name || this.t("attachment.fileFallbackName"),
6524
- mime_type: e.type,
6525
- size_bytes: e.size,
6526
- _previewUrl: n
6527
- });
6528
- } catch (r) {
6529
- if (n)
6530
- try {
6531
- URL.revokeObjectURL(n);
6532
- } catch {
6533
- }
6534
- console.error("[ww-messenger] attachment upload failed", r);
6535
- }
6492
+ var t, n;
6493
+ if (!(!e || !this.transport))
6494
+ try {
6495
+ const r = await this.transport.uploadAttachment(e), a = (r == null ? void 0 : r.type) === "image" || (e.type || "").toLowerCase().startsWith("image/") || ((r == null ? void 0 : r.mime_type) || "").toLowerCase().startsWith("image/");
6496
+ let s = null;
6497
+ if (a)
6498
+ try {
6499
+ s = await ((n = (t = this.store) == null ? void 0 : t.signAttachment) == null ? void 0 : n.call(t, r.path)) || null;
6500
+ } catch {
6501
+ }
6502
+ this.pendingAttachments.push({
6503
+ type: r.type || "file",
6504
+ path: r.path,
6505
+ name: e.name || this.t("attachment.fileFallbackName"),
6506
+ mime_type: e.type,
6507
+ size_bytes: e.size,
6508
+ previewUrl: s
6509
+ });
6510
+ } catch (r) {
6511
+ console.error("[ww-messenger] attachment upload failed", r);
6512
+ }
6536
6513
  },
6537
6514
  // Délégation des clics sur les liens `<a href="#...">` rendus dans le
6538
6515
  // panel (typiquement par le markdown des messages agent). On capture
@@ -6766,14 +6743,14 @@ function go(e, t, n, r, a, s) {
6766
6743
  })), 1)
6767
6744
  ])) : w("", !0),
6768
6745
  a.pendingAttachments.length ? (c(), d("div", lo, [
6769
- (c(!0), d(I, null, j(a.pendingAttachments, (L, K) => (c(), d("div", {
6746
+ (c(!0), d(I, null, F(a.pendingAttachments, (L, K) => (c(), d("div", {
6770
6747
  key: L.path || K,
6771
6748
  class: "wm-attached__item"
6772
6749
  }, [
6773
- s.isPendingImage(L) && L._previewUrl ? (c(), d("img", {
6750
+ L.previewUrl ? (c(), d("img", {
6774
6751
  key: 0,
6775
6752
  class: "wm-attached__thumb",
6776
- src: L._previewUrl,
6753
+ src: L.previewUrl,
6777
6754
  alt: L.name
6778
6755
  }, null, 8, co)) : (c(), d("div", uo, [
6779
6756
  t[11] || (t[11] = o("span", { class: "wm-attached__fileIcon" }, [
@@ -6881,7 +6858,7 @@ function go(e, t, n, r, a, s) {
6881
6858
  ], 6)) : w("", !0)
6882
6859
  ], 6);
6883
6860
  }
6884
- const yo = /* @__PURE__ */ P(Xa, [["render", go], ["__scopeId", "data-v-b87f85e6"]]), wo = "0.5.63";
6861
+ const yo = /* @__PURE__ */ P(Xa, [["render", go], ["__scopeId", "data-v-a54649f6"]]), wo = "0.5.64";
6885
6862
  export {
6886
6863
  oe as AIAvatar,
6887
6864
  be as AVATAR_COLORS,
@@ -6917,7 +6894,7 @@ export {
6917
6894
  ai as captureScreenshotFile,
6918
6895
  H as colors,
6919
6896
  st as createStore,
6920
- F as createTranslator,
6897
+ j as createTranslator,
6921
6898
  Ze as createTransport,
6922
6899
  ne as dateLocale,
6923
6900
  yo as default,