@streamlayer/react 1.24.6 → 1.24.8

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 (155) hide show
  1. package/lib/cjs/advertisement.js +19606 -203
  2. package/lib/cjs/auth.js +4459 -1
  3. package/lib/cjs/bet-pack.js +15690 -1
  4. package/lib/cjs/index.js +19410 -1
  5. package/lib/cjs/insight.js +13508 -1
  6. package/lib/cjs/masters.js +20695 -1
  7. package/lib/cjs/notification.js +13086 -1
  8. package/lib/cjs/package.json +1 -0
  9. package/lib/cjs/pause-ad.js +8390 -1
  10. package/lib/cjs/points.js +7188 -1
  11. package/lib/cjs/polyfills.js +69 -0
  12. package/lib/cjs/polymarket.js +16394 -14
  13. package/lib/cjs/style.css +1 -0
  14. package/lib/cjs/useStreamLayerApp.js +4711 -1
  15. package/lib/dist/cjs/index.js +20695 -1
  16. package/lib/dist/es/index.js +20668 -10
  17. package/lib/dist/es/polyfills.js +92 -0
  18. package/lib/es/advertisement.js +2821 -2746
  19. package/lib/es/analytics.js +1 -1
  20. package/lib/es/feature.js +60 -56
  21. package/lib/es/index10.js +181 -7
  22. package/lib/es/index11.js +371 -181
  23. package/lib/es/index12.js +19 -19
  24. package/lib/es/index13.js +44 -44
  25. package/lib/es/index14.js +30 -30
  26. package/lib/es/index15.js +384 -414
  27. package/lib/es/index16.js +66 -67
  28. package/lib/es/index2.js +35 -38
  29. package/lib/es/index3.js +34 -4
  30. package/lib/es/index4.js +3 -3
  31. package/lib/es/index5.js +270 -16
  32. package/lib/es/index6.js +0 -1
  33. package/lib/es/index8.js +236 -281
  34. package/lib/es/index9.js +8 -179
  35. package/lib/es/masters2.js +33 -34
  36. package/lib/es/notification.js +25 -25
  37. package/lib/es/points.js +10 -10
  38. package/lib/es/storage.js +14 -14
  39. package/lib/es/style.css +1 -0
  40. package/lib/es/useStreamLayerApp2.js +5654 -4604
  41. package/lib/source.css +1 -120
  42. package/package.json +99 -83
  43. package/lib/cjs/Question.js +0 -1
  44. package/lib/cjs/analytics.js +0 -1
  45. package/lib/cjs/feature.js +0 -1
  46. package/lib/cjs/gamification-feature.js +0 -1
  47. package/lib/cjs/gamification-feature2.js +0 -1
  48. package/lib/cjs/hooks-n9ax4LRT.js +0 -1
  49. package/lib/cjs/index-CfSdnrfA.js +0 -5
  50. package/lib/cjs/index10.js +0 -1
  51. package/lib/cjs/index11.js +0 -1
  52. package/lib/cjs/index12.js +0 -1
  53. package/lib/cjs/index13.js +0 -4
  54. package/lib/cjs/index14.js +0 -1
  55. package/lib/cjs/index15.js +0 -1
  56. package/lib/cjs/index16.js +0 -5
  57. package/lib/cjs/index2.js +0 -1
  58. package/lib/cjs/index3.js +0 -1
  59. package/lib/cjs/index4.js +0 -5
  60. package/lib/cjs/index5.js +0 -1
  61. package/lib/cjs/index6.js +0 -1
  62. package/lib/cjs/index7.js +0 -1
  63. package/lib/cjs/index8.js +0 -1
  64. package/lib/cjs/index9.js +0 -7
  65. package/lib/cjs/masters2.js +0 -8
  66. package/lib/cjs/storage.js +0 -1
  67. package/lib/cjs/theme.js +0 -1
  68. package/lib/cjs/useStreamLayerApp2.js +0 -17
  69. package/lib/cjs/utils.js +0 -47
  70. package/lib/classic/app/advertisement.d.ts +0 -19
  71. package/lib/classic/app/app.d.ts +0 -23
  72. package/lib/classic/app/auth.d.ts +0 -4
  73. package/lib/classic/app/bet-pack.d.ts +0 -10
  74. package/lib/classic/app/insight.d.ts +0 -13
  75. package/lib/classic/app/masters.d.ts +0 -19
  76. package/lib/classic/app/notification.d.ts +0 -5
  77. package/lib/classic/app/pause-ad.d.ts +0 -27
  78. package/lib/classic/app/points.d.ts +0 -3
  79. package/lib/classic/app/polymarket.d.ts +0 -7
  80. package/lib/classic/app/useStreamLayerApp.d.ts +0 -1
  81. package/lib/classic/cjs/Question.js +0 -1
  82. package/lib/classic/cjs/advertisement.js +0 -203
  83. package/lib/classic/cjs/analytics.js +0 -1
  84. package/lib/classic/cjs/auth.js +0 -1
  85. package/lib/classic/cjs/bet-pack.js +0 -5
  86. package/lib/classic/cjs/feature.js +0 -1
  87. package/lib/classic/cjs/gamification-feature.js +0 -1
  88. package/lib/classic/cjs/hooks-n9ax4LRT.js +0 -1
  89. package/lib/classic/cjs/index-CfSdnrfA.js +0 -5
  90. package/lib/classic/cjs/index.js +0 -1
  91. package/lib/classic/cjs/index10.js +0 -1
  92. package/lib/classic/cjs/index11.js +0 -1
  93. package/lib/classic/cjs/index12.js +0 -1
  94. package/lib/classic/cjs/index13.js +0 -4
  95. package/lib/classic/cjs/index2.js +0 -5
  96. package/lib/classic/cjs/index3.js +0 -1
  97. package/lib/classic/cjs/index4.js +0 -1
  98. package/lib/classic/cjs/index5.js +0 -1
  99. package/lib/classic/cjs/index6.js +0 -1
  100. package/lib/classic/cjs/index7.js +0 -7
  101. package/lib/classic/cjs/index8.js +0 -1
  102. package/lib/classic/cjs/index9.js +0 -1
  103. package/lib/classic/cjs/insight.js +0 -1
  104. package/lib/classic/cjs/notification.js +0 -1
  105. package/lib/classic/cjs/notification2.js +0 -1
  106. package/lib/classic/cjs/pause-ad.js +0 -1
  107. package/lib/classic/cjs/points.js +0 -1
  108. package/lib/classic/cjs/polymarket.js +0 -14
  109. package/lib/classic/cjs/useStreamLayerApp.js +0 -1
  110. package/lib/classic/cjs/useStreamLayerApp2.js +0 -17
  111. package/lib/classic/cjs/utils.js +0 -47
  112. package/lib/classic/es/Question.js +0 -503
  113. package/lib/classic/es/advertisement.js +0 -38792
  114. package/lib/classic/es/analytics.js +0 -84
  115. package/lib/classic/es/auth.js +0 -11
  116. package/lib/classic/es/bet-pack.js +0 -3418
  117. package/lib/classic/es/feature.js +0 -210
  118. package/lib/classic/es/gamification-feature.js +0 -4
  119. package/lib/classic/es/hooks-n9ax4LRT.js +0 -97
  120. package/lib/classic/es/index.js +0 -15
  121. package/lib/classic/es/index10.js +0 -321
  122. package/lib/classic/es/index11.js +0 -2592
  123. package/lib/classic/es/index12.js +0 -185
  124. package/lib/classic/es/index13.js +0 -820
  125. package/lib/classic/es/index2.js +0 -2605
  126. package/lib/classic/es/index3.js +0 -19
  127. package/lib/classic/es/index4.js +0 -6
  128. package/lib/classic/es/index5.js +0 -4
  129. package/lib/classic/es/index6.js +0 -285
  130. package/lib/classic/es/index7.js +0 -181
  131. package/lib/classic/es/index8.js +0 -7
  132. package/lib/classic/es/index9.js +0 -11
  133. package/lib/classic/es/insight.js +0 -79
  134. package/lib/classic/es/notification.js +0 -9
  135. package/lib/classic/es/notification2.js +0 -1126
  136. package/lib/classic/es/pause-ad.js +0 -232
  137. package/lib/classic/es/points.js +0 -76
  138. package/lib/classic/es/polymarket.js +0 -6617
  139. package/lib/classic/es/useStreamLayerApp.js +0 -4
  140. package/lib/classic/es/useStreamLayerApp2.js +0 -11627
  141. package/lib/classic/es/utils.js +0 -76
  142. package/lib/classic/index.d.ts +0 -6
  143. package/lib/classic/masters.d.ts +0 -8
  144. package/lib/classic/source.css +0 -110
  145. package/lib/dist/cjs/gamification-feature.js +0 -1
  146. package/lib/dist/cjs/index-CfSdnrfA.js +0 -5
  147. package/lib/dist/cjs/masters.js +0 -69
  148. package/lib/dist/es/gamification-feature.js +0 -4
  149. package/lib/dist/es/index-CfSdnrfA.js +0 -3775
  150. package/lib/dist/es/masters.js +0 -22387
  151. package/lib/dist/index.d.ts +0 -1357
  152. package/lib/dist/source.css +0 -64
  153. package/lib/es/index-CfSdnrfA.js +0 -3775
  154. package/lib/style.css +0 -1
  155. /package/lib/{classic/es/index-CfSdnrfA.js → es/index-D8wyDNJD.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { useEffect as c } from "react";
2
2
  import { e as s } from "./index3.js";
3
- import { A as v } from "./index9.js";
3
+ import { A as v } from "./index8.js";
4
4
  let i = [], r = 0;
5
5
  const u = 4, d = /* @__NO_SIDE_EFFECTS__ */ (a) => {
6
6
  let e = [], t = {
package/lib/es/feature.js CHANGED
@@ -1,23 +1,27 @@
1
1
  import y, { forwardRef as A, createElement as O } from "react";
2
- import { listenKeys as _ } from "nanostores";
3
- import { pino as M } from "pino";
4
- import { S as g } from "./useStreamLayerApp2.js";
2
+ import { e as _, S as g } from "./useStreamLayerApp2.js";
3
+ function M(e, t, n) {
4
+ let r = new Set(t).add(void 0);
5
+ return e.listen((o, a, c) => {
6
+ r.has(c) && n(o, a, c);
7
+ });
8
+ }
5
9
  var B = function() {
6
10
  const t = Array.prototype.slice.call(arguments).filter(Boolean), n = {}, r = [];
7
11
  t.forEach((a) => {
8
- (a ? a.split(" ") : []).forEach((c) => {
9
- if (c.startsWith("atm_")) {
10
- const [, p] = c.split("_");
11
- n[p] = c;
12
+ (a ? a.split(" ") : []).forEach((u) => {
13
+ if (u.startsWith("atm_")) {
14
+ const [, p] = u.split("_");
15
+ n[p] = u;
12
16
  } else
13
- r.push(c);
17
+ r.push(u);
14
18
  });
15
19
  });
16
20
  const o = [];
17
21
  for (const a in n)
18
22
  Object.prototype.hasOwnProperty.call(n, a) && o.push(n[a]);
19
23
  return o.push(...r), o.join(" ");
20
- }, R = B;
24
+ }, T = B;
21
25
  function D(e) {
22
26
  var t = /* @__PURE__ */ Object.create(null);
23
27
  return function(n) {
@@ -50,31 +54,31 @@ var V = (e, t) => {
50
54
  function F(e) {
51
55
  let t = "";
52
56
  return (n) => {
53
- const r = (a, d) => {
54
- const { as: c = e, class: p = t } = a, v = n.propsAsIs === void 0 ? !(typeof c == "string" && c.indexOf("-") === -1 && !j(c[0])) : n.propsAsIs, u = z(v, a, [
57
+ const r = (a, c) => {
58
+ const { as: u = e, class: p = t } = a, v = n.propsAsIs === void 0 ? !(typeof u == "string" && u.indexOf("-") === -1 && !j(u[0])) : n.propsAsIs, d = z(v, a, [
55
59
  "as",
56
60
  "class"
57
61
  ]);
58
- u.ref = d, u.className = n.atomic ? R(n.class, u.className || p) : R(u.className || p, n.class);
59
- const { vars: i } = n;
60
- if (i) {
61
- const s = {};
62
- for (const l in i) {
63
- const h = i[l], S = h[0], N = h[1] || "", b = typeof S == "function" ? S(a) : S;
64
- V(b, n.name), s[`--${l}`] = `${b}${N}`;
62
+ d.ref = c, d.className = n.atomic ? T(n.class, d.className || p) : T(d.className || p, n.class);
63
+ const { vars: s } = n;
64
+ if (s) {
65
+ const i = {};
66
+ for (const l in s) {
67
+ const h = s[l], S = h[0], N = h[1] || "", b = typeof S == "function" ? S(a) : S;
68
+ V(b, n.name), i[`--${l}`] = `${b}${N}`;
65
69
  }
66
- const f = u.style || {}, m = Object.keys(f);
70
+ const f = d.style || {}, m = Object.keys(f);
67
71
  m.length > 0 && m.forEach((l) => {
68
- s[l] = f[l];
69
- }), u.style = s;
72
+ i[l] = f[l];
73
+ }), d.style = i;
70
74
  }
71
- return e.__wyw_meta && e !== c ? (u.as = c, O(e, u)) : O(c, u);
75
+ return e.__wyw_meta && e !== u ? (d.as = u, O(e, d)) : O(u, d);
72
76
  }, o = A ? A(r) : (
73
77
  // React.forwardRef won't available on older React versions and in Preact
74
78
  // Fallback to a innerRef prop in that case
75
79
  ((a) => {
76
- const d = U(a, ["innerRef"]);
77
- return r(d, a.innerRef);
80
+ const c = U(a, ["innerRef"]);
81
+ return r(c, a.innerRef);
78
82
  })
79
83
  );
80
84
  return o.displayName = n.name, o.__wyw_meta = {
@@ -83,47 +87,47 @@ function F(e) {
83
87
  }, o;
84
88
  };
85
89
  }
86
- var ae = F, E = { exports: {} }, k = {};
87
- var T;
90
+ var ne = F, E = { exports: {} }, k = {};
91
+ var R;
88
92
  function G() {
89
- if (T) return k;
90
- T = 1;
93
+ if (R) return k;
94
+ R = 1;
91
95
  var e = y;
92
- function t(i, s) {
93
- return i === s && (i !== 0 || 1 / i === 1 / s) || i !== i && s !== s;
96
+ function t(s, i) {
97
+ return s === i && (s !== 0 || 1 / s === 1 / i) || s !== s && i !== i;
94
98
  }
95
- var n = typeof Object.is == "function" ? Object.is : t, r = e.useState, o = e.useEffect, a = e.useLayoutEffect, d = e.useDebugValue;
96
- function c(i, s) {
97
- var f = s(), m = r({ inst: { value: f, getSnapshot: s } }), l = m[0].inst, h = m[1];
99
+ var n = typeof Object.is == "function" ? Object.is : t, r = e.useState, o = e.useEffect, a = e.useLayoutEffect, c = e.useDebugValue;
100
+ function u(s, i) {
101
+ var f = i(), m = r({ inst: { value: f, getSnapshot: i } }), l = m[0].inst, h = m[1];
98
102
  return a(
99
103
  function() {
100
- l.value = f, l.getSnapshot = s, p(l) && h({ inst: l });
104
+ l.value = f, l.getSnapshot = i, p(l) && h({ inst: l });
101
105
  },
102
- [i, f, s]
106
+ [s, f, i]
103
107
  ), o(
104
108
  function() {
105
- return p(l) && h({ inst: l }), i(function() {
109
+ return p(l) && h({ inst: l }), s(function() {
106
110
  p(l) && h({ inst: l });
107
111
  });
108
112
  },
109
- [i]
110
- ), d(f), f;
113
+ [s]
114
+ ), c(f), f;
111
115
  }
112
- function p(i) {
113
- var s = i.getSnapshot;
114
- i = i.value;
116
+ function p(s) {
117
+ var i = s.getSnapshot;
118
+ s = s.value;
115
119
  try {
116
- var f = s();
117
- return !n(i, f);
120
+ var f = i();
121
+ return !n(s, f);
118
122
  } catch {
119
123
  return !0;
120
124
  }
121
125
  }
122
- function v(i, s) {
123
- return s();
126
+ function v(s, i) {
127
+ return i();
124
128
  }
125
- var u = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? v : c;
126
- return k.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : u, k;
129
+ var d = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? v : u;
130
+ return k.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : d, k;
127
131
  }
128
132
  var C;
129
133
  function W() {
@@ -136,15 +140,15 @@ const w = (e, t) => (n) => {
136
140
  function X(e, { keys: t, deps: n = [e, t] } = {}) {
137
141
  const r = y.useRef();
138
142
  r.current = e.get();
139
- const o = y.useCallback((d) => (w(r, d)(e.value), t?.length > 0 ? _(e, t, w(r, d)) : e.listen(w(r, d))), n), a = () => r.current;
143
+ const o = y.useCallback((c) => (w(r, c)(e.value), t?.length > 0 ? M(e, t, w(r, c)) : e.listen(w(r, c))), n), a = () => r.current;
140
144
  return y.useSyncExternalStore ? y.useSyncExternalStore(o, a, a) : $.useSyncExternalStore(o, a, a);
141
145
  }
142
- const ie = X, K = () => [
146
+ const re = X, K = () => [
143
147
  !1,
144
148
  (e) => {
145
149
  window.requestAnimationFrame(() => e());
146
150
  }
147
- ], se = y.useTransition || K, Y = M({
151
+ ], ae = y.useTransition || K, Y = _.pino({
148
152
  level: "trace",
149
153
  enabled: typeof window < "u" && !!window.localStorage.getItem("SL_DEBUG"),
150
154
  browser: {
@@ -160,7 +164,7 @@ class Z extends Event {
160
164
  }
161
165
  }
162
166
  const J = Q("event-bus");
163
- class oe {
167
+ class se {
164
168
  name;
165
169
  listeners;
166
170
  constructor(t = "sl-event-bus") {
@@ -199,12 +203,12 @@ var L;
199
203
  e.Ready = "ready", e.Suspended = "suspended";
200
204
  })(L || (L = {}));
201
205
  export {
202
- oe as E,
206
+ se as E,
203
207
  L as F,
204
208
  I as N,
205
209
  Q as a,
206
- se as b,
207
- R as c,
208
- ae as s,
209
- ie as u
210
+ ae as b,
211
+ T as c,
212
+ ne as s,
213
+ re as u
210
214
  };
package/lib/es/index10.js CHANGED
@@ -1,11 +1,185 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { s as l } from "./feature.js";
3
- const i = /* @__PURE__ */ l("div")({
1
+ import { s as a } from "./feature.js";
2
+ import { Q as i } from "./useStreamLayerApp2.js";
3
+ import { jsxs as t, jsx as s, Fragment as U } from "react/jsx-runtime";
4
+ import { memo as $, useMemo as w } from "react";
5
+ import { V as H } from "./index14.js";
6
+ import { H as T } from "./index5.js";
7
+ const G = {
8
+ [i.TWEET]: { label: "Insight", iconName: "icon-insight" },
9
+ [i.PROMOTION]: { label: "Insight", iconName: "icon-insight" },
10
+ [i.UNSET]: void 0,
11
+ [i.FACTOID]: { label: "Insight", iconName: "icon-insight" },
12
+ [i.POLL]: { label: "Poll", iconName: "icon-poll" },
13
+ [i.TRIVIA]: { label: "Trivia", iconName: "icon-trivia" },
14
+ [i.PREDICTION]: { label: "Prediction", iconName: "icon-prediction" }
15
+ }, J = {
16
+ [i.TWEET]: "Learn more",
17
+ [i.FACTOID]: "Learn more",
18
+ [i.POLL]: "Answer",
19
+ [i.TRIVIA]: "Answer",
20
+ [i.PREDICTION]: "Answer",
21
+ [i.PROMOTION]: "",
22
+ [i.UNSET]: ""
23
+ }, K = (r) => r.split(/\s+/).map((n) => n[0]).join("").toUpperCase(), X = (r) => r ? r.toLocaleString("en-US") : "0", y = (r) => {
24
+ const n = new Date(r);
25
+ if (!n)
26
+ return "";
27
+ const c = /* @__PURE__ */ new Date(), o = Math.floor(c.getTime() - n.getTime());
28
+ return o < 6e4 ? `${Math.floor(o / 1e3)}s` : o < 36e5 ? `${Math.floor(o / 6e4)}m` : o < 864e5 ? `${Math.floor(o / 36e5)}h` : n.getFullYear() === c.getFullYear() ? `${n.toLocaleDateString("en-US", {
29
+ month: "short",
30
+ day: "numeric"
31
+ })}` : `${n.toLocaleDateString("en-US", {
32
+ month: "2-digit",
33
+ day: "2-digit",
34
+ year: "2-digit"
35
+ })}`;
36
+ }, L = /* @__PURE__ */ a("div")({
4
37
  name: "Container",
5
- class: "cqg02m",
38
+ class: "cjq447q",
6
39
  propsAsIs: !1
7
- }), a = ({ children: s, style: e, loading: o }) => o ? /* @__PURE__ */ t(i, { style: e, children: s }) : s;
40
+ }), D = /* @__PURE__ */ a("div")({
41
+ name: "ImageContainer",
42
+ class: "i14egogb",
43
+ propsAsIs: !1
44
+ }), S = /* @__PURE__ */ a("img")({
45
+ name: "Image",
46
+ class: "i2g9g4l",
47
+ propsAsIs: !1
48
+ }), O = () => T, E = /* @__PURE__ */ a(O())({
49
+ name: "TwitterIcon",
50
+ class: "t1c454nm",
51
+ propsAsIs: !0
52
+ }), b = /* @__PURE__ */ a("div")({
53
+ name: "Details",
54
+ class: "d11nigc3",
55
+ propsAsIs: !1
56
+ }), x = /* @__PURE__ */ a("div")({
57
+ name: "Name",
58
+ class: "nrxa4k8",
59
+ propsAsIs: !1
60
+ }), C = /* @__PURE__ */ a("div")({
61
+ name: "UserNameAndDate",
62
+ class: "u1p051g3",
63
+ propsAsIs: !1
64
+ }), P = ({ image: r, name: n, userName: c, verified: o, createdTweet: p }) => {
65
+ const m = p && y(p);
66
+ return /* @__PURE__ */ t(L, { children: [
67
+ r && /* @__PURE__ */ t(D, { children: [
68
+ /* @__PURE__ */ s(S, { className: "SL_AccountImage", src: r }),
69
+ /* @__PURE__ */ s(E, { name: "twitter" })
70
+ ] }),
71
+ /* @__PURE__ */ t(b, { children: [
72
+ n && /* @__PURE__ */ t(x, { className: "SL_TweetAccountName", children: [
73
+ n,
74
+ " ",
75
+ o && /* @__PURE__ */ s(T, { name: "icon-twitter-verified" })
76
+ ] }),
77
+ c && /* @__PURE__ */ t(C, { className: "SL_TweetAccountUserName", children: [
78
+ "@",
79
+ c,
80
+ " ",
81
+ m && `・ ${m}`
82
+ ] })
83
+ ] })
84
+ ] });
85
+ }, M = /* @__PURE__ */ a("div")({
86
+ name: "Container",
87
+ class: "c1kzqw87",
88
+ propsAsIs: !1
89
+ }), R = /* @__PURE__ */ a("div")({
90
+ name: "Details",
91
+ class: "d9r1hf9",
92
+ propsAsIs: !1
93
+ }), V = /* @__PURE__ */ a("div")({
94
+ name: "Body",
95
+ class: "bezygt5",
96
+ propsAsIs: !1
97
+ }), d = /* @__PURE__ */ a("div")({
98
+ name: "ImagesContainer",
99
+ class: "i1y8f7ym",
100
+ propsAsIs: !1
101
+ }), h = /* @__PURE__ */ a("div")({
102
+ name: "ImagesBlock",
103
+ class: "i18gwonx",
104
+ propsAsIs: !1
105
+ }), N = /* @__PURE__ */ a("img")({
106
+ name: "Image",
107
+ class: "i3g0xjd",
108
+ propsAsIs: !1
109
+ }), j = () => N, l = /* @__PURE__ */ a(j())({
110
+ name: "ImageFullSize",
111
+ class: "io8rt7p",
112
+ propsAsIs: !0
113
+ }), F = () => N, f = /* @__PURE__ */ a(F())({
114
+ name: "ImageHalfSize",
115
+ class: "i4hn3ox",
116
+ propsAsIs: !0
117
+ }), _ = new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"), z = (r) => r?.replace(_, ""), Z = $(
118
+ ({ image: r, body: n, muted: c, account: o, accountVerified: p, tweet: m, isDetail: u, controlVideo: v }) => {
119
+ const e = m?.meta?.extendedEntities?.media, g = e?.find(
120
+ ({ type: I }) => I === "photo"
121
+ /* PHOTO */
122
+ ), A = w(() => e?.[0]?.videoInfo?.variants?.findLast(
123
+ ({ contentType: I }) => I === "video/mp4"
124
+ /* VIDEO */
125
+ )?.url, [e]);
126
+ return /* @__PURE__ */ t(M, { children: [
127
+ /* @__PURE__ */ t(R, { children: [
128
+ /* @__PURE__ */ s(
129
+ P,
130
+ {
131
+ image: r,
132
+ name: m?.meta?.accountName,
133
+ userName: o,
134
+ verified: p,
135
+ createdTweet: m?.date
136
+ }
137
+ ),
138
+ /* @__PURE__ */ s(V, { children: z(n) }),
139
+ !u && g && /* @__PURE__ */ s(d, { children: /* @__PURE__ */ s(l, { src: e?.[0].mediaUrlHttps }) }),
140
+ u && g && /* @__PURE__ */ t(U, { children: [
141
+ e?.length === 1 && /* @__PURE__ */ s(d, { children: /* @__PURE__ */ s(l, { src: e[0].mediaUrlHttps }) }),
142
+ e?.length === 2 && /* @__PURE__ */ t(d, { children: [
143
+ /* @__PURE__ */ s(f, { src: e[0].mediaUrlHttps }),
144
+ /* @__PURE__ */ s(f, { src: e[1].mediaUrlHttps })
145
+ ] }),
146
+ e?.length === 3 && /* @__PURE__ */ t(d, { children: [
147
+ /* @__PURE__ */ s(f, { src: e[0].mediaUrlHttps }),
148
+ /* @__PURE__ */ t(h, { children: [
149
+ /* @__PURE__ */ s(l, { src: e[1].mediaUrlHttps }),
150
+ /* @__PURE__ */ s(l, { src: e[2].mediaUrlHttps })
151
+ ] })
152
+ ] }),
153
+ e?.length === 4 && /* @__PURE__ */ t(d, { children: [
154
+ /* @__PURE__ */ t(h, { children: [
155
+ /* @__PURE__ */ s(l, { src: e[0].mediaUrlHttps }),
156
+ /* @__PURE__ */ s(l, { src: e[1].mediaUrlHttps })
157
+ ] }),
158
+ /* @__PURE__ */ t(h, { children: [
159
+ /* @__PURE__ */ s(l, { src: e[2].mediaUrlHttps }),
160
+ /* @__PURE__ */ s(l, { src: e[3].mediaUrlHttps })
161
+ ] })
162
+ ] })
163
+ ] })
164
+ ] }),
165
+ !g && (e?.[0]?.type === "video" || e?.[0]?.type === "animated_gif") && A && /* @__PURE__ */ s(
166
+ H,
167
+ {
168
+ muted: c,
169
+ source: A,
170
+ poster: e[0].mediaUrlHttps,
171
+ controlVideo: v
172
+ }
173
+ )
174
+ ] });
175
+ }
176
+ );
8
177
  export {
9
- i as e,
10
- a as i
178
+ P as D,
179
+ K as I,
180
+ Z as N,
181
+ G as e,
182
+ z as j,
183
+ J as o,
184
+ X as s
11
185
  };