@wexio/messenger-widget-react 1.1.5 → 1.2.1

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 (58) hide show
  1. package/CHANGELOG.md +603 -0
  2. package/dist/widget-react--D5-TDqS.js +475 -0
  3. package/dist/{widget-react-D9b9f-j_2.js → widget-react-2tTH7-bO.js} +1 -1
  4. package/dist/{widget-react-GkCAcRz0.js → widget-react-B8rXZyxg.js} +1 -1
  5. package/dist/widget-react-B9X7Tn7t.js +125 -0
  6. package/dist/{widget-react-D7Q1S5E02.js → widget-react-BPNfTldJ.js} +134 -121
  7. package/dist/{widget-react-NffhFueH.js → widget-react-BlTmXnei.js} +2 -2
  8. package/dist/{widget-react-D_1wQTaz.js → widget-react-CIy9jXND.js} +2 -2
  9. package/dist/widget-react-CVLHwRZh.js +21619 -0
  10. package/dist/{widget-react-DWO5MXt62.js → widget-react-CtvdaJvy.js} +5 -5
  11. package/dist/widget-react-D8-Z8fvu.js +323 -0
  12. package/dist/{widget-react-NUWScxeE2.js → widget-react-DF5yY9sQ.js} +120 -108
  13. package/dist/widget-react-DNFROpaS.js +262 -0
  14. package/dist/{widget-react-BhdM1EXE2.js → widget-react-DXP6EOCM.js} +1 -1
  15. package/dist/{widget-react-BDd1HJHs.js → widget-react-DejnNTzJ.js} +36 -36
  16. package/dist/{widget-react-Br8qtj152.js → widget-react-DubCiNev.js} +5 -5
  17. package/dist/{widget-react-BVRYDaf5.js → widget-react-faSyVXFQ.js} +2 -2
  18. package/dist/{widget-react-BGCZpMUT.js → widget-react-krPPnv02.js} +1 -1
  19. package/dist/widget-react.js +14513 -6394
  20. package/package.json +3 -2
  21. package/dist/widget-react--A4IVF5N2.js +0 -359
  22. package/dist/widget-react-BFgpQWPW.js +0 -7733
  23. package/dist/widget-react-BGmjRit12.js +0 -359
  24. package/dist/widget-react-BJN4_XqD.js +0 -359
  25. package/dist/widget-react-BepZON2O.js +0 -359
  26. package/dist/widget-react-BirV4fjr.js +0 -359
  27. package/dist/widget-react-BjeN5jDi.js +0 -359
  28. package/dist/widget-react-Blj9taMI2.js +0 -359
  29. package/dist/widget-react-Bpjcku_E.js +0 -359
  30. package/dist/widget-react-Br-jpQBt.js +0 -359
  31. package/dist/widget-react-C4jVLX4O.js +0 -359
  32. package/dist/widget-react-CMn2M4G7.js +0 -359
  33. package/dist/widget-react-CPIqSc_J.js +0 -359
  34. package/dist/widget-react-CPnUEeex.js +0 -9907
  35. package/dist/widget-react-CVrATfkA.js +0 -359
  36. package/dist/widget-react-CeQaem4N2.js +0 -126
  37. package/dist/widget-react-CkDPMun5.js +0 -359
  38. package/dist/widget-react-Cp0KM0D6.js +0 -359
  39. package/dist/widget-react-Cs_ooZdD.js +0 -359
  40. package/dist/widget-react-Csr68eN1.js +0 -359
  41. package/dist/widget-react-CxzW4Bam.js +0 -359
  42. package/dist/widget-react-D00lhVJW.js +0 -359
  43. package/dist/widget-react-DM5ptbez2.js +0 -359
  44. package/dist/widget-react-DU5Wg6Cl.js +0 -359
  45. package/dist/widget-react-DYBhHaDC.js +0 -359
  46. package/dist/widget-react-DZxVgDlM2.js +0 -359
  47. package/dist/widget-react-Dhi-efUB2.js +0 -359
  48. package/dist/widget-react-DmQP1bcj.js +0 -4293
  49. package/dist/widget-react-Dvze5gXC.js +0 -359
  50. package/dist/widget-react-H0QV1X13.js +0 -359
  51. package/dist/widget-react-JcQ9Xwb6.js +0 -359
  52. package/dist/widget-react-LjYTh4EJ.js +0 -359
  53. package/dist/widget-react-M3D_BLuT.js +0 -359
  54. package/dist/widget-react-O_BU6qSC.js +0 -359
  55. package/dist/widget-react-TB2Eoyvi2.js +0 -263
  56. package/dist/widget-react-WSHbDgKs.js +0 -359
  57. package/dist/widget-react-_6vfCiAZ.js +0 -359
  58. package/dist/widget-react-e8MoPThS2.js +0 -359
@@ -11,15 +11,15 @@ import "react";
11
11
  import "react-dom";
12
12
  import "react/jsx-runtime";
13
13
  import "react-dom/client";
14
- import { T as e, k as t, o as n } from "./widget-react-BFgpQWPW.js";
15
- import { i as r, n as i, o as a } from "./widget-react-BGCZpMUT.js";
16
- import { d as o, h as s, m as c, n as l, r as u } from "./widget-react-BDd1HJHs.js";
17
- import { t as d } from "./widget-react-D_1wQTaz.js";
18
- import { a as f, c as p, i as m, l as h, n as g, o as _, r as v, t as y } from "./widget-react-CPnUEeex.js";
19
- import { useState as b } from "react";
20
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
14
+ import { N as e, c as t, k as n, l as r } from "./widget-react-CVLHwRZh.js";
15
+ import { i, n as a, o } from "./widget-react-krPPnv02.js";
16
+ import { d as s, h as c, m as l, n as u, r as d } from "./widget-react-DejnNTzJ.js";
17
+ import { t as f } from "./widget-react-CIy9jXND.js";
18
+ import { a as p, c as ee, i as m, l as h, n as g, o as _, r as v, t as y } from "./widget-react-D8-Z8fvu.js";
19
+ import { useEffect as b, useRef as x, useState as S } from "react";
20
+ import { jsx as C, jsxs as w } from "react/jsx-runtime";
21
21
  //#region components/widget/news-article-view/helpers.ts
22
- function C(e) {
22
+ function T(e) {
23
23
  if (!e || typeof e != "object") return null;
24
24
  let t = e, n = String(t._id ?? t.id ?? "");
25
25
  if (!n) return null;
@@ -81,8 +81,8 @@ function C(e) {
81
81
  }
82
82
  //#endregion
83
83
  //#region components/widget/news-article-view/related-news-list.tsx
84
- function w({ currentId: e, currentCategoryIds: t, currentTagIds: n, previewPostsById: i, visitorRelatedRaw: a, isDummy: o, onOpen: s }) {
85
- let c = r("news"), l = (() => {
84
+ function E({ currentId: e, currentCategoryIds: t, currentTagIds: n, previewPostsById: r, visitorRelatedRaw: a, isDummy: o, onOpen: s }) {
85
+ let c = i("news"), l = (() => {
86
86
  if (o) return [];
87
87
  if (Array.isArray(a) && a.length > 0) return a.filter((e) => !!e && typeof e == "object").map((e) => {
88
88
  let t = e.coverImageUrl?.url ?? e.externalCoverImageUrl;
@@ -92,11 +92,11 @@ function w({ currentId: e, currentCategoryIds: t, currentTagIds: n, previewPosts
92
92
  coverImageUrl: typeof t == "string" ? t : void 0
93
93
  };
94
94
  }).filter((e) => e.id && e.title);
95
- if (i && Object.keys(i).length > 0 && (t.length > 0 || n.length > 0)) {
96
- let r = new Set(t), a = new Set(n), o = [];
97
- for (let [t, n] of Object.entries(i)) {
95
+ if (r && Object.keys(r).length > 0 && (t.length > 0 || n.length > 0)) {
96
+ let i = new Set(t), a = new Set(n), o = [];
97
+ for (let [t, n] of Object.entries(r)) {
98
98
  if (t === e || !n || typeof n != "object") continue;
99
- let i = n, s = Array.isArray(i.categories) ? i.categories : [], c = Array.isArray(i.tags) ? i.tags : [], l = (e) => {
99
+ let r = n, s = Array.isArray(r.categories) ? r.categories : [], c = Array.isArray(r.tags) ? r.tags : [], l = (e) => {
100
100
  let t = /* @__PURE__ */ new Set();
101
101
  for (let n of e) if (n && typeof n == "object") {
102
102
  let e = n._id ?? n.id;
@@ -104,16 +104,16 @@ function w({ currentId: e, currentCategoryIds: t, currentTagIds: n, previewPosts
104
104
  }
105
105
  return t;
106
106
  }, u = l(s), d = l(c), f = 0;
107
- for (let e of u) r.has(e) && f++;
107
+ for (let e of u) i.has(e) && f++;
108
108
  for (let e of d) a.has(e) && f++;
109
109
  if (f === 0) continue;
110
- let p = i.coverImageUrl?.url ?? i.externalCoverImageUrl;
110
+ let p = r.coverImageUrl?.url ?? r.externalCoverImageUrl;
111
111
  o.push({
112
112
  id: t,
113
- title: typeof i.title == "string" ? i.title : "",
113
+ title: typeof r.title == "string" ? r.title : "",
114
114
  coverImageUrl: typeof p == "string" ? p : void 0,
115
115
  overlap: f,
116
- publishedAt: typeof i.publishedAt == "string" ? i.publishedAt : ""
116
+ publishedAt: typeof r.publishedAt == "string" ? r.publishedAt : ""
117
117
  });
118
118
  }
119
119
  return o.sort((e, t) => t.overlap === e.overlap ? t.publishedAt.localeCompare(e.publishedAt) : t.overlap - e.overlap), o.slice(0, 5).map(({ id: e, title: t, coverImageUrl: n }) => ({
@@ -124,22 +124,22 @@ function w({ currentId: e, currentCategoryIds: t, currentTagIds: n, previewPosts
124
124
  }
125
125
  return [];
126
126
  })();
127
- return l.length === 0 ? null : /* @__PURE__ */ S("section", {
127
+ return l.length === 0 ? null : /* @__PURE__ */ w("section", {
128
128
  className: "mt-6",
129
- children: [/* @__PURE__ */ x("p", {
129
+ children: [/* @__PURE__ */ C("p", {
130
130
  className: "mb-2 text-xs font-semibold tracking-wide text-wx-fg-muted uppercase",
131
131
  children: c("relatedTitle")
132
- }), /* @__PURE__ */ x("ul", {
132
+ }), /* @__PURE__ */ C("ul", {
133
133
  className: "flex flex-col gap-2",
134
- children: l.map((e) => /* @__PURE__ */ x("li", { children: /* @__PURE__ */ S("button", {
134
+ children: l.map((e) => /* @__PURE__ */ C("li", { children: /* @__PURE__ */ w("button", {
135
135
  type: "button",
136
136
  onClick: () => s(e.id),
137
137
  className: "flex w-full items-center gap-3 rounded-wx-lg bg-wx-bg-elevated px-3 py-2 text-left transition-colors hover:bg-wx-bg-elevated/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary",
138
- children: [/* @__PURE__ */ x("span", {
138
+ children: [/* @__PURE__ */ C("span", {
139
139
  className: "aspect-square w-12 shrink-0 rounded-wx-sm bg-cover bg-center",
140
140
  style: e.coverImageUrl ? { backgroundImage: `url(${e.coverImageUrl})` } : { background: "linear-gradient(135deg, #1e1f21, #121314)" },
141
141
  "aria-hidden": "true"
142
- }), /* @__PURE__ */ x("span", {
142
+ }), /* @__PURE__ */ C("span", {
143
143
  className: "min-w-0 flex-1 truncate text-sm font-medium text-wx-fg",
144
144
  children: e.title
145
145
  })]
@@ -149,149 +149,162 @@ function w({ currentId: e, currentCategoryIds: t, currentTagIds: n, previewPosts
149
149
  }
150
150
  //#endregion
151
151
  //#region components/widget/news-article-view/index.tsx
152
- function T({ id: T, isDummy: D, onOpenRelated: O, onTitleResolved: k }) {
153
- let A = r("news"), j = r("demo"), M = a(), N = t(), { config: P } = e(), F = P.messenger?.showRelatedNews ?? !0, I = P.messenger?.showReactionCounts ?? !0, [L, R] = b(M), z = f(L, j), B = D ? null : N.previewData?.newsPostsById?.[T], V = !!B, { data: H, loading: U } = c({
152
+ function D({ id: D, isDummy: k, onOpenRelated: A, onTitleResolved: j }) {
153
+ let M = i("news"), N = i("demo"), P = o(), F = e(), { config: I } = n(), L = I.messenger?.showRelatedNews ?? !0, R = I.messenger?.showReactionCounts ?? !0, { trackLinkClick: z } = t(), B = x(null), V = (e) => {
154
+ A?.(e);
155
+ }, [H, U] = S(P), W = p(H, N), G = k ? null : F.previewData?.newsPostsById?.[D], K = !!G, { data: q, loading: J } = l({
154
156
  variables: { args: {
155
- id: T,
156
- locale: M
157
+ id: D,
158
+ locale: P
157
159
  } },
158
- skip: D || V || !T
159
- }), { data: W } = s({
160
+ skip: k || K || !D
161
+ }), { data: Y } = c({
160
162
  variables: {
161
- postId: T,
163
+ postId: D,
162
164
  limit: 5,
163
- locale: M
165
+ locale: P
164
166
  },
165
- skip: D || V || !T || !F
166
- }), G = D ? o(z).find((e) => e.id === T) ?? null : null, K = G ? {
167
- id: G.id,
168
- title: G.title,
169
- excerpt: G.excerpt,
170
- contentMarkdown: G.contentMarkdown,
167
+ skip: k || K || !D || !L
168
+ }), X = k ? s(W).find((e) => e.id === D) ?? null : null, Z = X ? {
169
+ id: X.id,
170
+ title: X.title,
171
+ excerpt: X.excerpt,
172
+ contentMarkdown: X.contentMarkdown,
171
173
  bodyFormat: "markdown",
172
- coverImageUrl: G.coverImageUrl,
173
- coverGradient: G.coverGradient,
174
- publishedAt: G.publishedAt,
175
- upstreamUpdatedAt: G.upstreamUpdatedAt,
176
- tags: G.tags,
177
- authors: G.authors,
178
- category: G.category,
179
- locale: L
180
- } : C(V ? B : H?.visitorNewsPost);
181
- if (_(K?.title, k), !K) return U ? /* @__PURE__ */ x(E, {}) : /* @__PURE__ */ x("div", {
174
+ coverImageUrl: X.coverImageUrl,
175
+ coverGradient: X.coverGradient,
176
+ publishedAt: X.publishedAt,
177
+ upstreamUpdatedAt: X.upstreamUpdatedAt,
178
+ tags: X.tags,
179
+ authors: X.authors,
180
+ category: X.category,
181
+ locale: H
182
+ } : T(K ? G : q?.visitorNewsPost);
183
+ if (_(Z?.title, j), b(() => {
184
+ k || K || !Z?.id || B.current !== Z.id && (B.current = Z.id, z({
185
+ url: `/news/${Z.id}`,
186
+ targetType: "NEWS_POST",
187
+ targetRefId: Z.id
188
+ }));
189
+ }, [
190
+ Z?.id,
191
+ k,
192
+ K,
193
+ z
194
+ ]), !Z) return J ? /* @__PURE__ */ C(O, {}) : /* @__PURE__ */ C("div", {
182
195
  className: "flex flex-1 items-center justify-center px-6 py-12 text-center",
183
- children: /* @__PURE__ */ x("p", {
196
+ children: /* @__PURE__ */ C("p", {
184
197
  className: "text-sm text-wx-fg-muted",
185
- children: A("articleNotFound")
198
+ children: M("articleNotFound")
186
199
  })
187
200
  });
188
- let q = M.split("-")[0].toLowerCase(), J = K.locale ? K.locale.split("-")[0].toLowerCase() : null;
189
- if (!D && !V && !P.contentLocaleFallback && J !== null && J !== q) return /* @__PURE__ */ x("div", {
201
+ let te = P.split("-")[0].toLowerCase(), Q = Z.locale ? Z.locale.split("-")[0].toLowerCase() : null;
202
+ if (!k && !K && !I.contentLocaleFallback && Q !== null && Q !== te) return /* @__PURE__ */ C("div", {
190
203
  className: "flex flex-1 items-center justify-center px-6 py-12 text-center",
191
- children: /* @__PURE__ */ x("p", {
204
+ children: /* @__PURE__ */ C("p", {
192
205
  className: "text-sm text-wx-fg-muted",
193
- children: A("articleNotTranslated")
206
+ children: M("articleNotTranslated")
194
207
  })
195
208
  });
196
- let Y = K.coverGradient ?? ["#1e1f21", "#121314"];
197
- return /* @__PURE__ */ x(n, {
209
+ let $ = Z.coverGradient ?? ["#1e1f21", "#121314"];
210
+ return /* @__PURE__ */ C(r, {
198
211
  className: "flex-1",
199
- children: /* @__PURE__ */ S("div", {
212
+ children: /* @__PURE__ */ w("div", {
200
213
  className: "flex flex-col",
201
- children: [/* @__PURE__ */ x("div", {
202
- className: i("relative w-full"),
214
+ children: [/* @__PURE__ */ C("div", {
215
+ className: a("relative w-full"),
203
216
  style: {
204
217
  aspectRatio: "16 / 9",
205
- background: K.coverImageUrl ? `url(${K.coverImageUrl}) center/cover` : `linear-gradient(135deg, ${Y[0]}, ${Y[1]})`
218
+ background: Z.coverImageUrl ? `url(${Z.coverImageUrl}) center/cover` : `linear-gradient(135deg, ${$[0]}, ${$[1]})`
206
219
  },
207
220
  "aria-hidden": "true"
208
- }), /* @__PURE__ */ S("div", {
221
+ }), /* @__PURE__ */ w("div", {
209
222
  className: "flex flex-col gap-3 px-5 pt-5 pb-12",
210
223
  children: [
211
- K.category && /* @__PURE__ */ x("p", {
224
+ Z.category && /* @__PURE__ */ C("p", {
212
225
  className: "text-[11px] font-semibold tracking-[0.14em] text-wx-primary uppercase",
213
- children: K.category.label
226
+ children: Z.category.label
214
227
  }),
215
- /* @__PURE__ */ S("p", {
228
+ /* @__PURE__ */ w("p", {
216
229
  className: "flex items-center gap-2 text-xs text-wx-fg-subtle",
217
- children: [/* @__PURE__ */ x("span", { children: new Date(K.publishedAt).toLocaleDateString(M, {
230
+ children: [/* @__PURE__ */ C("span", { children: new Date(Z.publishedAt).toLocaleDateString(P, {
218
231
  month: "long",
219
232
  day: "numeric",
220
233
  year: "numeric"
221
- }) }), u(K) && K.upstreamUpdatedAt && /* @__PURE__ */ x("span", {
234
+ }) }), d(Z) && Z.upstreamUpdatedAt && /* @__PURE__ */ C("span", {
222
235
  className: "rounded-full bg-wx-bg-elevated px-1.5 py-0.5 text-[10px] font-medium text-wx-fg-muted",
223
- title: new Date(K.upstreamUpdatedAt).toLocaleString(M),
224
- children: A("editedAt", { when: l(K.upstreamUpdatedAt) })
236
+ title: new Date(Z.upstreamUpdatedAt).toLocaleString(P),
237
+ children: M("editedAt", { when: u(Z.upstreamUpdatedAt) })
225
238
  })]
226
239
  }),
227
- /* @__PURE__ */ x("h2", {
240
+ /* @__PURE__ */ C("h2", {
228
241
  className: "text-2xl leading-tight font-bold text-wx-fg",
229
- children: K.title
242
+ children: Z.title
230
243
  }),
231
- K.authors && K.authors.length > 0 && /* @__PURE__ */ S("p", {
244
+ Z.authors && Z.authors.length > 0 && /* @__PURE__ */ w("p", {
232
245
  className: "flex items-center gap-2 text-xs text-wx-fg-muted",
233
- children: [/* @__PURE__ */ x("span", {
246
+ children: [/* @__PURE__ */ C("span", {
234
247
  className: "flex -space-x-1.5",
235
- children: K.authors.slice(0, 3).map((e) => /* @__PURE__ */ x("span", {
248
+ children: Z.authors.slice(0, 3).map((e) => /* @__PURE__ */ C("span", {
236
249
  className: "h-5 w-5 overflow-hidden rounded-full bg-wx-bg-elevated ring-1 ring-wx-bg",
237
250
  "aria-hidden": "true",
238
- children: /* @__PURE__ */ x("img", {
251
+ children: /* @__PURE__ */ C("img", {
239
252
  src: e.photo.url,
240
253
  alt: "",
241
254
  className: "h-full w-full object-cover"
242
255
  })
243
256
  }, e._id))
244
- }), /* @__PURE__ */ x("span", { children: A("writtenBy", { names: K.authors.map((e) => e.name).join(", ") }) })]
257
+ }), /* @__PURE__ */ C("span", { children: M("writtenBy", { names: Z.authors.map((e) => e.name).join(", ") }) })]
245
258
  }),
246
- K.tags && K.tags.length > 0 && /* @__PURE__ */ x("div", {
259
+ Z.tags && Z.tags.length > 0 && /* @__PURE__ */ C("div", {
247
260
  className: "flex flex-wrap gap-1",
248
- children: K.tags.map((e) => /* @__PURE__ */ x("span", {
261
+ children: Z.tags.map((e) => /* @__PURE__ */ C("span", {
249
262
  className: "rounded-full bg-wx-bg-elevated px-2 py-0.5 text-[11px] font-medium text-wx-fg-muted",
250
263
  children: e.label
251
264
  }, e.slug))
252
265
  }),
253
- K.excerpt && /* @__PURE__ */ x("p", {
266
+ Z.excerpt && /* @__PURE__ */ C("p", {
254
267
  className: "text-base leading-relaxed text-wx-fg-muted",
255
- children: K.excerpt
268
+ children: Z.excerpt
256
269
  }),
257
- K.contentMarkdown && /* @__PURE__ */ x(v, {
258
- content: K.contentMarkdown,
259
- isHtml: K.bodyFormat === "html" || h(K.contentMarkdown),
270
+ Z.contentMarkdown && /* @__PURE__ */ C(v, {
271
+ content: Z.contentMarkdown,
272
+ isHtml: Z.bodyFormat === "html" || h(Z.contentMarkdown),
260
273
  markdownMarginClass: "mt-3"
261
274
  }),
262
- K.sourceUrl && /* @__PURE__ */ S("a", {
263
- href: K.sourceUrl,
275
+ Z.sourceUrl && /* @__PURE__ */ w("a", {
276
+ href: Z.sourceUrl,
264
277
  target: "_blank",
265
278
  rel: "noopener noreferrer",
266
279
  className: "mt-4 flex items-center justify-center gap-1.5 text-xs text-wx-primary underline underline-offset-2 transition-opacity hover:opacity-80",
267
- children: [/* @__PURE__ */ x(d, { size: 12 }), /* @__PURE__ */ x("span", { children: A("readOriginal") })]
280
+ children: [/* @__PURE__ */ C(f, { size: 12 }), /* @__PURE__ */ C("span", { children: M("readOriginal") })]
268
281
  }),
269
- F && /* @__PURE__ */ x(w, {
270
- currentId: K.id,
271
- currentCategoryIds: K.categoryIds ?? [],
272
- currentTagIds: K.tagIds ?? [],
273
- previewPostsById: D ? void 0 : N.previewData?.newsPostsById,
274
- visitorRelatedRaw: W?.visitorNewsRelated,
275
- isDummy: D,
276
- onOpen: O ?? (() => {})
282
+ L && /* @__PURE__ */ C(E, {
283
+ currentId: Z.id,
284
+ currentCategoryIds: Z.categoryIds ?? [],
285
+ currentTagIds: Z.tagIds ?? [],
286
+ previewPostsById: k ? void 0 : F.previewData?.newsPostsById,
287
+ visitorRelatedRaw: Y?.visitorNewsRelated,
288
+ isDummy: k,
289
+ onOpen: V
277
290
  }),
278
- K.id && /* @__PURE__ */ x(y, {
279
- surface: p.NEWS,
280
- itemId: K.id,
281
- reactionCounts: K.reactionCounts ?? null,
282
- viewerReaction: K.viewerReaction ?? null,
283
- groupItemIds: [K.id, ...(K.translations ?? []).map((e) => e.id)],
284
- isDummy: D,
285
- showCounts: I,
291
+ Z.id && /* @__PURE__ */ C(y, {
292
+ surface: ee.NEWS,
293
+ itemId: Z.id,
294
+ reactionCounts: Z.reactionCounts ?? null,
295
+ viewerReaction: Z.viewerReaction ?? null,
296
+ groupItemIds: [Z.id, ...(Z.translations ?? []).map((e) => e.id)],
297
+ isDummy: k,
298
+ showCounts: R,
286
299
  className: "mt-6"
287
300
  }),
288
- /* @__PURE__ */ x(g, {
289
- currentLocale: D ? L : K.locale ?? M,
290
- locales: D ? [...m] : (K.translations ?? []).map((e) => e.locale),
291
- allowedLocales: D ? void 0 : P.supportedLocales,
292
- onSelect: D ? (e) => R(e) : (e) => {
293
- let t = (K.translations ?? []).find((t) => t.locale === e);
294
- t && O?.(t.id);
301
+ /* @__PURE__ */ C(g, {
302
+ currentLocale: k ? H : Z.locale ?? P,
303
+ locales: k ? [...m] : (Z.translations ?? []).map((e) => e.locale),
304
+ allowedLocales: k ? void 0 : I.supportedLocales,
305
+ onSelect: k ? (e) => U(e) : (e) => {
306
+ let t = (Z.translations ?? []).find((t) => t.locale === e);
307
+ t && V(t.id);
295
308
  },
296
309
  className: "mt-6"
297
310
  })
@@ -300,28 +313,28 @@ function T({ id: T, isDummy: D, onOpenRelated: O, onTitleResolved: k }) {
300
313
  })
301
314
  });
302
315
  }
303
- function E() {
304
- return /* @__PURE__ */ x(n, {
316
+ function O() {
317
+ return /* @__PURE__ */ C(r, {
305
318
  className: "flex-1",
306
- children: /* @__PURE__ */ S("div", {
319
+ children: /* @__PURE__ */ w("div", {
307
320
  className: "flex flex-col",
308
321
  "aria-busy": "true",
309
322
  "aria-live": "polite",
310
- children: [/* @__PURE__ */ x("div", {
323
+ children: [/* @__PURE__ */ C("div", {
311
324
  className: "w-full animate-pulse bg-wx-bg-elevated",
312
325
  style: { aspectRatio: "16 / 9" }
313
- }), /* @__PURE__ */ S("div", {
326
+ }), /* @__PURE__ */ w("div", {
314
327
  className: "px-5 pt-5 pb-12",
315
328
  children: [
316
- /* @__PURE__ */ S("div", {
329
+ /* @__PURE__ */ w("div", {
317
330
  className: "animate-pulse space-y-2.5",
318
- children: [/* @__PURE__ */ x("div", { className: "h-5 w-3/4 rounded-md bg-wx-bg-elevated" }), /* @__PURE__ */ x("div", { className: "h-5 w-1/2 rounded-md bg-wx-bg-elevated" })]
331
+ children: [/* @__PURE__ */ C("div", { className: "h-5 w-3/4 rounded-md bg-wx-bg-elevated" }), /* @__PURE__ */ C("div", { className: "h-5 w-1/2 rounded-md bg-wx-bg-elevated" })]
319
332
  }),
320
- /* @__PURE__ */ x("div", {
333
+ /* @__PURE__ */ C("div", {
321
334
  className: "mt-4 flex items-center gap-2 animate-pulse",
322
- children: /* @__PURE__ */ x("div", { className: "h-3 w-24 rounded-md bg-wx-bg-elevated" })
335
+ children: /* @__PURE__ */ C("div", { className: "h-3 w-24 rounded-md bg-wx-bg-elevated" })
323
336
  }),
324
- /* @__PURE__ */ x("div", {
337
+ /* @__PURE__ */ C("div", {
325
338
  className: "mt-6 space-y-2.5 animate-pulse",
326
339
  children: [
327
340
  "w-full",
@@ -330,7 +343,7 @@ function E() {
330
343
  "w-full",
331
344
  "w-9/12",
332
345
  "w-7/12"
333
- ].map((e, t) => /* @__PURE__ */ x("div", { className: i("h-3 rounded-md bg-wx-bg-elevated", e) }, t))
346
+ ].map((e, t) => /* @__PURE__ */ C("div", { className: a("h-3 rounded-md bg-wx-bg-elevated", e) }, t))
334
347
  })
335
348
  ]
336
349
  })]
@@ -338,6 +351,6 @@ function E() {
338
351
  });
339
352
  }
340
353
  //#endregion
341
- export { T as NewsArticleView };
354
+ export { D as NewsArticleView };
342
355
 
343
- //# sourceMappingURL=widget-react-D7Q1S5E02.js.map
356
+ //# sourceMappingURL=widget-react-BPNfTldJ.js.map
@@ -11,7 +11,7 @@ import "react";
11
11
  import "react-dom";
12
12
  import "react/jsx-runtime";
13
13
  import "react-dom/client";
14
- import { t as e } from "./widget-react-BGCZpMUT.js";
14
+ import { t as e } from "./widget-react-krPPnv02.js";
15
15
  var t = e("send", [["path", {
16
16
  d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",
17
17
  key: "1ffxy3"
@@ -22,4 +22,4 @@ var t = e("send", [["path", {
22
22
  //#endregion
23
23
  export { t };
24
24
 
25
- //# sourceMappingURL=widget-react-NffhFueH.js.map
25
+ //# sourceMappingURL=widget-react-BlTmXnei.js.map
@@ -11,7 +11,7 @@ import "react";
11
11
  import "react-dom";
12
12
  import "react/jsx-runtime";
13
13
  import "react-dom/client";
14
- import { t as e } from "./widget-react-BGCZpMUT.js";
14
+ import { t as e } from "./widget-react-krPPnv02.js";
15
15
  var t = e("external-link", [
16
16
  ["path", {
17
17
  d: "M15 3h6v6",
@@ -29,4 +29,4 @@ var t = e("external-link", [
29
29
  //#endregion
30
30
  export { t };
31
31
 
32
- //# sourceMappingURL=widget-react-D_1wQTaz.js.map
32
+ //# sourceMappingURL=widget-react-CIy9jXND.js.map