@streamlayer/react 1.24.5 → 1.24.7

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 (166) hide show
  1. package/lib/cjs/advertisement.js +19607 -203
  2. package/lib/cjs/auth.js +4459 -1
  3. package/lib/cjs/bet-pack.js +15691 -1
  4. package/lib/cjs/index.js +19411 -1
  5. package/lib/cjs/insight.js +13509 -1
  6. package/lib/cjs/masters.js +20696 -1
  7. package/lib/cjs/notification.js +13087 -1
  8. package/lib/cjs/package.json +1 -0
  9. package/lib/cjs/pause-ad.js +8390 -1
  10. package/lib/cjs/points.js +7189 -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 +20696 -1
  16. package/lib/dist/es/index.js +20669 -10
  17. package/lib/dist/es/polyfills.js +92 -0
  18. package/lib/es/Question.js +66 -65
  19. package/lib/es/advertisement.js +3402 -3294
  20. package/lib/es/analytics.js +1 -1
  21. package/lib/es/bet-pack.js +1 -1
  22. package/lib/es/feature.js +192 -37
  23. package/lib/es/{index-DvqmgCor.js → index-D8wyDNJD.js} +1 -1
  24. package/lib/es/index.js +1 -1
  25. package/lib/es/index10.js +181 -7
  26. package/lib/es/index11.js +371 -181
  27. package/lib/es/index12.js +366 -2579
  28. package/lib/es/index13.js +789 -234
  29. package/lib/es/index14.js +293 -792
  30. package/lib/es/index15.js +2550 -305
  31. package/lib/es/index16.js +64 -66
  32. package/lib/es/index2.js +285 -279
  33. package/lib/es/index3.js +34 -4
  34. package/lib/es/index4.js +16 -17
  35. package/lib/es/index5.js +3 -19
  36. package/lib/es/index6.js +7 -5
  37. package/lib/es/index7.js +284 -5
  38. package/lib/es/index8.js +236 -281
  39. package/lib/es/index9.js +8 -179
  40. package/lib/es/insight.js +2 -2
  41. package/lib/es/masters2.js +199 -189
  42. package/lib/es/notification.js +27 -28
  43. package/lib/es/pause-ad.js +124 -149
  44. package/lib/es/points.js +23 -24
  45. package/lib/es/polymarket.js +3 -3
  46. package/lib/es/storage.js +4 -4
  47. package/lib/es/style.css +1 -0
  48. package/lib/es/useStreamLayerApp2.js +5579 -4475
  49. package/lib/source.css +1 -120
  50. package/package.json +126 -91
  51. package/lib/cjs/Question.js +0 -1
  52. package/lib/cjs/analytics.js +0 -1
  53. package/lib/cjs/feature.js +0 -1
  54. package/lib/cjs/gamification-feature.js +0 -1
  55. package/lib/cjs/gamification-feature2.js +0 -1
  56. package/lib/cjs/hooks-n9ax4LRT.js +0 -1
  57. package/lib/cjs/index-DvqmgCor.js +0 -5
  58. package/lib/cjs/index10.js +0 -1
  59. package/lib/cjs/index11.js +0 -1
  60. package/lib/cjs/index12.js +0 -1
  61. package/lib/cjs/index13.js +0 -1
  62. package/lib/cjs/index14.js +0 -4
  63. package/lib/cjs/index15.js +0 -1
  64. package/lib/cjs/index16.js +0 -5
  65. package/lib/cjs/index2.js +0 -1
  66. package/lib/cjs/index3.js +0 -1
  67. package/lib/cjs/index4.js +0 -5
  68. package/lib/cjs/index5.js +0 -1
  69. package/lib/cjs/index6.js +0 -1
  70. package/lib/cjs/index7.js +0 -1
  71. package/lib/cjs/index8.js +0 -1
  72. package/lib/cjs/index9.js +0 -7
  73. package/lib/cjs/masters2.js +0 -8
  74. package/lib/cjs/sl-types.js +0 -1
  75. package/lib/cjs/storage.js +0 -1
  76. package/lib/cjs/theme.js +0 -1
  77. package/lib/cjs/useStreamLayerApp2.js +0 -17
  78. package/lib/cjs/utils.js +0 -47
  79. package/lib/classic/app/advertisement.d.ts +0 -19
  80. package/lib/classic/app/app.d.ts +0 -23
  81. package/lib/classic/app/auth.d.ts +0 -4
  82. package/lib/classic/app/bet-pack.d.ts +0 -10
  83. package/lib/classic/app/insight.d.ts +0 -13
  84. package/lib/classic/app/masters.d.ts +0 -19
  85. package/lib/classic/app/notification.d.ts +0 -5
  86. package/lib/classic/app/pause-ad.d.ts +0 -27
  87. package/lib/classic/app/points.d.ts +0 -3
  88. package/lib/classic/app/polymarket.d.ts +0 -7
  89. package/lib/classic/app/useStreamLayerApp.d.ts +0 -1
  90. package/lib/classic/cjs/Question.js +0 -1
  91. package/lib/classic/cjs/advertisement.js +0 -203
  92. package/lib/classic/cjs/analytics.js +0 -1
  93. package/lib/classic/cjs/auth.js +0 -1
  94. package/lib/classic/cjs/bet-pack.js +0 -5
  95. package/lib/classic/cjs/feature.js +0 -1
  96. package/lib/classic/cjs/gamification-feature.js +0 -1
  97. package/lib/classic/cjs/hooks-n9ax4LRT.js +0 -1
  98. package/lib/classic/cjs/index-DvqmgCor.js +0 -5
  99. package/lib/classic/cjs/index.js +0 -1
  100. package/lib/classic/cjs/index10.js +0 -1
  101. package/lib/classic/cjs/index11.js +0 -1
  102. package/lib/classic/cjs/index12.js +0 -1
  103. package/lib/classic/cjs/index13.js +0 -4
  104. package/lib/classic/cjs/index2.js +0 -5
  105. package/lib/classic/cjs/index3.js +0 -1
  106. package/lib/classic/cjs/index4.js +0 -1
  107. package/lib/classic/cjs/index5.js +0 -1
  108. package/lib/classic/cjs/index6.js +0 -1
  109. package/lib/classic/cjs/index7.js +0 -7
  110. package/lib/classic/cjs/index8.js +0 -1
  111. package/lib/classic/cjs/index9.js +0 -1
  112. package/lib/classic/cjs/insight.js +0 -1
  113. package/lib/classic/cjs/notification.js +0 -1
  114. package/lib/classic/cjs/notification2.js +0 -1
  115. package/lib/classic/cjs/pause-ad.js +0 -1
  116. package/lib/classic/cjs/points.js +0 -1
  117. package/lib/classic/cjs/polymarket.js +0 -14
  118. package/lib/classic/cjs/sl-types.js +0 -1
  119. package/lib/classic/cjs/useStreamLayerApp.js +0 -1
  120. package/lib/classic/cjs/useStreamLayerApp2.js +0 -17
  121. package/lib/classic/cjs/utils.js +0 -47
  122. package/lib/classic/es/Question.js +0 -388
  123. package/lib/classic/es/advertisement.js +0 -38759
  124. package/lib/classic/es/analytics.js +0 -84
  125. package/lib/classic/es/auth.js +0 -11
  126. package/lib/classic/es/bet-pack.js +0 -3419
  127. package/lib/classic/es/feature.js +0 -59
  128. package/lib/classic/es/gamification-feature.js +0 -4
  129. package/lib/classic/es/hooks-n9ax4LRT.js +0 -97
  130. package/lib/classic/es/index-DvqmgCor.js +0 -3775
  131. package/lib/classic/es/index.js +0 -15
  132. package/lib/classic/es/index10.js +0 -2592
  133. package/lib/classic/es/index11.js +0 -317
  134. package/lib/classic/es/index12.js +0 -185
  135. package/lib/classic/es/index13.js +0 -820
  136. package/lib/classic/es/index2.js +0 -2597
  137. package/lib/classic/es/index3.js +0 -19
  138. package/lib/classic/es/index4.js +0 -6
  139. package/lib/classic/es/index5.js +0 -5
  140. package/lib/classic/es/index6.js +0 -285
  141. package/lib/classic/es/index7.js +0 -181
  142. package/lib/classic/es/index8.js +0 -7
  143. package/lib/classic/es/index9.js +0 -11
  144. package/lib/classic/es/insight.js +0 -79
  145. package/lib/classic/es/notification.js +0 -9
  146. package/lib/classic/es/notification2.js +0 -1127
  147. package/lib/classic/es/pause-ad.js +0 -257
  148. package/lib/classic/es/points.js +0 -77
  149. package/lib/classic/es/polymarket.js +0 -6617
  150. package/lib/classic/es/sl-types.js +0 -156
  151. package/lib/classic/es/useStreamLayerApp.js +0 -4
  152. package/lib/classic/es/useStreamLayerApp2.js +0 -11573
  153. package/lib/classic/es/utils.js +0 -76
  154. package/lib/classic/index.d.ts +0 -6
  155. package/lib/classic/masters.d.ts +0 -8
  156. package/lib/classic/source.css +0 -110
  157. package/lib/dist/cjs/gamification-feature.js +0 -1
  158. package/lib/dist/cjs/index-DvqmgCor.js +0 -5
  159. package/lib/dist/cjs/masters.js +0 -69
  160. package/lib/dist/es/gamification-feature.js +0 -4
  161. package/lib/dist/es/index-DvqmgCor.js +0 -3775
  162. package/lib/dist/es/masters.js +0 -22204
  163. package/lib/dist/index.d.ts +0 -1355
  164. package/lib/dist/source.css +0 -64
  165. package/lib/es/sl-types.js +0 -156
  166. package/lib/style.css +0 -1
@@ -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 = {
@@ -1,7 +1,7 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { e as i } from "./index3.js";
3
3
  import { useEffect as n } from "react";
4
- import "./sl-types.js";
4
+ import "./feature.js";
5
5
  import { D as c } from "./index4.js";
6
6
  import { Y as m } from "./hooks-n9ax4LRT.js";
7
7
  const r = (t) => {
package/lib/es/feature.js CHANGED
@@ -1,59 +1,214 @@
1
- import { pino as a } from "pino";
2
- import "./sl-types.js";
3
- import "nanostores";
4
- import { S as s } from "./useStreamLayerApp2.js";
5
- const d = a({
1
+ import y, { forwardRef as A, createElement as O } from "react";
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
+ }
9
+ var B = function() {
10
+ const t = Array.prototype.slice.call(arguments).filter(Boolean), n = {}, r = [];
11
+ t.forEach((a) => {
12
+ (a ? a.split(" ") : []).forEach((u) => {
13
+ if (u.startsWith("atm_")) {
14
+ const [, p] = u.split("_");
15
+ n[p] = u;
16
+ } else
17
+ r.push(u);
18
+ });
19
+ });
20
+ const o = [];
21
+ for (const a in n)
22
+ Object.prototype.hasOwnProperty.call(n, a) && o.push(n[a]);
23
+ return o.push(...r), o.join(" ");
24
+ }, T = B;
25
+ function D(e) {
26
+ var t = /* @__PURE__ */ Object.create(null);
27
+ return function(n) {
28
+ return t[n] === void 0 && (t[n] = e(n)), t[n];
29
+ };
30
+ }
31
+ var H = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, x = /* @__PURE__ */ D(
32
+ function(e) {
33
+ return H.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
34
+ }
35
+ /* Z+1 */
36
+ ), j = (e) => e.toUpperCase() === e, q = (e) => (t) => e.indexOf(t) === -1, U = (e, t) => {
37
+ const n = {};
38
+ return Object.keys(e).filter(q(t)).forEach((r) => {
39
+ n[r] = e[r];
40
+ }), n;
41
+ };
42
+ function z(e, t, n) {
43
+ const r = U(t, n);
44
+ if (!e) {
45
+ const o = typeof x == "function" ? { default: x } : x;
46
+ Object.keys(r).forEach((a) => {
47
+ o.default(a) || delete r[a];
48
+ });
49
+ }
50
+ return r;
51
+ }
52
+ var V = (e, t) => {
53
+ };
54
+ function F(e) {
55
+ let t = "";
56
+ return (n) => {
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, [
59
+ "as",
60
+ "class"
61
+ ]);
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}`;
69
+ }
70
+ const f = d.style || {}, m = Object.keys(f);
71
+ m.length > 0 && m.forEach((l) => {
72
+ i[l] = f[l];
73
+ }), d.style = i;
74
+ }
75
+ return e.__wyw_meta && e !== u ? (d.as = u, O(e, d)) : O(u, d);
76
+ }, o = A ? A(r) : (
77
+ // React.forwardRef won't available on older React versions and in Preact
78
+ // Fallback to a innerRef prop in that case
79
+ ((a) => {
80
+ const c = U(a, ["innerRef"]);
81
+ return r(c, a.innerRef);
82
+ })
83
+ );
84
+ return o.displayName = n.name, o.__wyw_meta = {
85
+ className: n.class || t,
86
+ extends: e
87
+ }, o;
88
+ };
89
+ }
90
+ var ne = F, E = { exports: {} }, k = {};
91
+ var R;
92
+ function G() {
93
+ if (R) return k;
94
+ R = 1;
95
+ var e = y;
96
+ function t(s, i) {
97
+ return s === i && (s !== 0 || 1 / s === 1 / i) || s !== s && i !== i;
98
+ }
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];
102
+ return a(
103
+ function() {
104
+ l.value = f, l.getSnapshot = i, p(l) && h({ inst: l });
105
+ },
106
+ [s, f, i]
107
+ ), o(
108
+ function() {
109
+ return p(l) && h({ inst: l }), s(function() {
110
+ p(l) && h({ inst: l });
111
+ });
112
+ },
113
+ [s]
114
+ ), c(f), f;
115
+ }
116
+ function p(s) {
117
+ var i = s.getSnapshot;
118
+ s = s.value;
119
+ try {
120
+ var f = i();
121
+ return !n(s, f);
122
+ } catch {
123
+ return !0;
124
+ }
125
+ }
126
+ function v(s, i) {
127
+ return i();
128
+ }
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;
131
+ }
132
+ var C;
133
+ function W() {
134
+ return C || (C = 1, E.exports = G()), E.exports;
135
+ }
136
+ var $ = W();
137
+ const w = (e, t) => (n) => {
138
+ e.current !== n && (e.current = n, t());
139
+ };
140
+ function X(e, { keys: t, deps: n = [e, t] } = {}) {
141
+ const r = y.useRef();
142
+ r.current = e.get();
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;
144
+ return y.useSyncExternalStore ? y.useSyncExternalStore(o, a, a) : $.useSyncExternalStore(o, a, a);
145
+ }
146
+ const re = X, K = () => [
147
+ !1,
148
+ (e) => {
149
+ window.requestAnimationFrame(() => e());
150
+ }
151
+ ], ae = y.useTransition || K, Y = _.pino({
6
152
  level: "trace",
7
153
  enabled: typeof window < "u" && !!window.localStorage.getItem("SL_DEBUG"),
8
154
  browser: {
9
- write: (t) => {
10
- console.log(t);
155
+ write: (e) => {
156
+ console.log(e);
11
157
  }
12
158
  }
13
- }), l = (t, e) => d.child({ name: t }, e);
14
- class c extends Event {
159
+ }), Q = (e, t) => Y.child({ name: e }, t);
160
+ class Z extends Event {
15
161
  slEventBus;
16
- constructor(e, n) {
17
- super(e), this.slEventBus = n;
162
+ constructor(t, n) {
163
+ super(t), this.slEventBus = n;
18
164
  }
19
165
  }
20
- const v = l("event-bus");
21
- class h {
166
+ const J = Q("event-bus");
167
+ class se {
22
168
  name;
23
169
  listeners;
24
- constructor(e = "sl-event-bus") {
25
- this.name = e, this.listeners = /* @__PURE__ */ new Set();
170
+ constructor(t = "sl-event-bus") {
171
+ this.name = t, this.listeners = /* @__PURE__ */ new Set();
26
172
  }
27
- emit = (e, n) => {
28
- const i = new c(this.name, { ...n, type: e });
29
- v.debug(i, "Emitting event"), window.dispatchEvent(i);
173
+ emit = (t, n) => {
174
+ const r = new Z(this.name, { ...n, type: t });
175
+ J.debug(r, "Emitting event"), window.dispatchEvent(r);
30
176
  };
31
- listen(e) {
32
- return window.addEventListener(this.name, e), this.listeners.add(e), () => {
33
- this.off(e);
177
+ listen(t) {
178
+ return window.addEventListener(this.name, t), this.listeners.add(t), () => {
179
+ this.off(t);
34
180
  };
35
181
  }
36
- off(e) {
37
- window.removeEventListener(this.name, e), this.listeners.delete(e);
182
+ off(t) {
183
+ window.removeEventListener(this.name, t), this.listeners.delete(t);
38
184
  }
39
185
  destroy = () => {
40
- this.listeners.forEach((e) => {
41
- window.removeEventListener(this.name, e), this.listeners.delete(e);
186
+ this.listeners.forEach((t) => {
187
+ window.removeEventListener(this.name, t), this.listeners.delete(t);
42
188
  }), this.listeners.clear();
43
189
  };
44
190
  }
191
+ var I;
192
+ (function(e) {
193
+ e[e.ONBOARDING = 1] = "ONBOARDING", e[e.QUESTION = 2] = "QUESTION", e[e.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
194
+ })(I || (I = {}));
45
195
  window.slStore = /* @__PURE__ */ Object.create(null);
46
- var o;
47
- (function(t) {
48
- t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
49
- })(o || (o = {}));
50
- s.BETTING + "", s.GAMES + "", s.PUBLIC_CHAT + "", s.TWITTER + "";
51
- var r;
52
- (function(t) {
53
- t.Ready = "ready", t.Suspended = "suspended";
54
- })(r || (r = {}));
196
+ var P;
197
+ (function(e) {
198
+ e.ORGANIZATION = "ORGANIZATION", e.STREAM = "STREAM";
199
+ })(P || (P = {}));
200
+ g.BETTING + "", g.GAMES + "", g.PUBLIC_CHAT + "", g.TWITTER + "";
201
+ var L;
202
+ (function(e) {
203
+ e.Ready = "ready", e.Suspended = "suspended";
204
+ })(L || (L = {}));
55
205
  export {
56
- h as E,
57
- r as F,
58
- l as c
206
+ se as E,
207
+ L as F,
208
+ I as N,
209
+ Q as a,
210
+ ae as b,
211
+ T as c,
212
+ ne as s,
213
+ re as u
59
214
  };
@@ -1,4 +1,4 @@
1
- import { r as ir } from "./useStreamLayerApp2.js";
1
+ import { u as ir } from "./useStreamLayerApp2.js";
2
2
  function sr(A, S) {
3
3
  for (var G = 0; G < S.length; G++) {
4
4
  const X = S[G];
package/lib/es/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { h as a } from "./index7.js";
1
+ import { h as a } from "./index6.js";
2
2
  import { D as m } from "./index2.js";
3
3
  import { StreamLayerSDKNotification as S, StreamLayerSDKNotificationUI as s } from "./notification.js";
4
4
  import { V as L, g as i, Y as f, _ as D, q as p } from "./hooks-n9ax4LRT.js";
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 "./sl-types.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 y } from "./index14.js";
6
+ import { B as T } from "./index7.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", L = (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
+ }, D = /* @__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
+ }), H = /* @__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 && L(p);
66
+ return /* @__PURE__ */ t(D, { children: [
67
+ r && /* @__PURE__ */ t(H, { 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
+ y,
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
  };