@ikonai/sdk-react-ui 0.0.34 → 0.0.37
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/app/connection-state-renderer.d.ts +56 -0
- package/app/index.d.ts +2 -0
- package/app/use-ikon-app.d.ts +134 -0
- package/auth/auth-context.d.ts +21 -0
- package/auth/auth-service.d.ts +43 -0
- package/auth/index.d.ts +5 -0
- package/auth/storage.d.ts +18 -0
- package/auth/types.d.ts +49 -0
- package/auth/use-auth-guard.d.ts +35 -0
- package/hooks/index.d.ts +1 -0
- package/hooks/use-lazy-font.d.ts +18 -0
- package/i18n/i18n.d.ts +16 -0
- package/i18n/index.d.ts +1 -0
- package/index.d.ts +11 -7
- package/index.js +1017 -607
- package/package.json +1 -1
- package/renderer/types.d.ts +2 -2
- package/renderer/ui-renderer.d.ts +2 -2
- package/surface.d.ts +3 -4
package/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IkonUICore as
|
|
2
|
-
import { UiStreamStore as
|
|
3
|
-
import
|
|
4
|
-
import { createLogger as
|
|
5
|
-
var
|
|
1
|
+
import { IkonUICore as pt, UiStreamStore as gt } from "@ikonai/sdk-ui";
|
|
2
|
+
import { UiStreamStore as On } from "@ikonai/sdk-ui";
|
|
3
|
+
import yt, { useSyncExternalStore as _e, useMemo as L, memo as U, useRef as E, useCallback as z, Fragment as St, useEffect as $, useState as Y, createContext as nt, use as Me } from "react";
|
|
4
|
+
import { createLogger as ye, getOrCreateDeviceId as me, deriveAuthUrl as Ne, parseUrlParams as bt, isCloudEnvironment as xe, extractUserIdFromToken as vt, deriveBackendType as $e, IkonClient as wt } from "@ikonai/sdk";
|
|
5
|
+
var he = { exports: {} }, ee = {};
|
|
6
6
|
/**
|
|
7
7
|
* @license React
|
|
8
8
|
* react-jsx-runtime.production.js
|
|
@@ -12,17 +12,17 @@ var K = { exports: {} }, F = {};
|
|
|
12
12
|
* This source code is licensed under the MIT license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
if (
|
|
18
|
-
|
|
15
|
+
var Fe;
|
|
16
|
+
function Et() {
|
|
17
|
+
if (Fe) return ee;
|
|
18
|
+
Fe = 1;
|
|
19
19
|
var r = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
20
20
|
function t(n, o, s) {
|
|
21
21
|
var i = null;
|
|
22
22
|
if (s !== void 0 && (i = "" + s), o.key !== void 0 && (i = "" + o.key), "key" in o) {
|
|
23
23
|
s = {};
|
|
24
|
-
for (var
|
|
25
|
-
|
|
24
|
+
for (var a in o)
|
|
25
|
+
a !== "key" && (s[a] = o[a]);
|
|
26
26
|
} else s = o;
|
|
27
27
|
return o = s.ref, {
|
|
28
28
|
$$typeof: r,
|
|
@@ -32,9 +32,9 @@ function rt() {
|
|
|
32
32
|
props: s
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
return
|
|
35
|
+
return ee.Fragment = e, ee.jsx = t, ee.jsxs = t, ee;
|
|
36
36
|
}
|
|
37
|
-
var
|
|
37
|
+
var te = {};
|
|
38
38
|
/**
|
|
39
39
|
* @license React
|
|
40
40
|
* react-jsx-runtime.development.js
|
|
@@ -44,166 +44,166 @@ var V = {};
|
|
|
44
44
|
* This source code is licensed under the MIT license found in the
|
|
45
45
|
* LICENSE file in the root directory of this source tree.
|
|
46
46
|
*/
|
|
47
|
-
var
|
|
48
|
-
function
|
|
49
|
-
return
|
|
50
|
-
function r(
|
|
51
|
-
if (
|
|
52
|
-
if (typeof
|
|
53
|
-
return
|
|
54
|
-
if (typeof
|
|
55
|
-
switch (
|
|
56
|
-
case
|
|
47
|
+
var Be;
|
|
48
|
+
function kt() {
|
|
49
|
+
return Be || (Be = 1, process.env.NODE_ENV !== "production" && function() {
|
|
50
|
+
function r(c) {
|
|
51
|
+
if (c == null) return null;
|
|
52
|
+
if (typeof c == "function")
|
|
53
|
+
return c.$$typeof === ue ? null : c.displayName || c.name || null;
|
|
54
|
+
if (typeof c == "string") return c;
|
|
55
|
+
switch (c) {
|
|
56
|
+
case v:
|
|
57
57
|
return "Fragment";
|
|
58
|
-
case
|
|
58
|
+
case g:
|
|
59
59
|
return "Profiler";
|
|
60
|
-
case
|
|
60
|
+
case m:
|
|
61
61
|
return "StrictMode";
|
|
62
|
-
case
|
|
62
|
+
case x:
|
|
63
63
|
return "Suspense";
|
|
64
|
-
case
|
|
64
|
+
case D:
|
|
65
65
|
return "SuspenseList";
|
|
66
|
-
case
|
|
66
|
+
case ce:
|
|
67
67
|
return "Activity";
|
|
68
68
|
}
|
|
69
|
-
if (typeof
|
|
70
|
-
switch (typeof
|
|
69
|
+
if (typeof c == "object")
|
|
70
|
+
switch (typeof c.tag == "number" && console.error(
|
|
71
71
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
72
|
-
),
|
|
73
|
-
case N:
|
|
74
|
-
return "Portal";
|
|
75
|
-
case O:
|
|
76
|
-
return (a.displayName || "Context") + ".Provider";
|
|
77
|
-
case E:
|
|
78
|
-
return (a._context.displayName || "Context") + ".Consumer";
|
|
72
|
+
), c.$$typeof) {
|
|
79
73
|
case C:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
74
|
+
return "Portal";
|
|
75
|
+
case P:
|
|
76
|
+
return (c.displayName || "Context") + ".Provider";
|
|
77
|
+
case w:
|
|
78
|
+
return (c._context.displayName || "Context") + ".Consumer";
|
|
79
|
+
case T:
|
|
80
|
+
var h = c.render;
|
|
81
|
+
return c = c.displayName, c || (c = h.displayName || h.name || "", c = c !== "" ? "ForwardRef(" + c + ")" : "ForwardRef"), c;
|
|
82
|
+
case ae:
|
|
83
|
+
return h = c.displayName || null, h !== null ? h : r(c.type) || "Memo";
|
|
84
|
+
case H:
|
|
85
|
+
h = c._payload, c = c._init;
|
|
86
86
|
try {
|
|
87
|
-
return r(
|
|
87
|
+
return r(c(h));
|
|
88
88
|
} catch {
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
return null;
|
|
92
92
|
}
|
|
93
|
-
function e(
|
|
94
|
-
return "" +
|
|
93
|
+
function e(c) {
|
|
94
|
+
return "" + c;
|
|
95
95
|
}
|
|
96
|
-
function t(
|
|
96
|
+
function t(c) {
|
|
97
97
|
try {
|
|
98
|
-
e(
|
|
99
|
-
var
|
|
98
|
+
e(c);
|
|
99
|
+
var h = !1;
|
|
100
100
|
} catch {
|
|
101
|
-
|
|
101
|
+
h = !0;
|
|
102
102
|
}
|
|
103
|
-
if (
|
|
104
|
-
|
|
105
|
-
var
|
|
106
|
-
return
|
|
107
|
-
|
|
103
|
+
if (h) {
|
|
104
|
+
h = console;
|
|
105
|
+
var S = h.error, R = typeof Symbol == "function" && Symbol.toStringTag && c[Symbol.toStringTag] || c.constructor.name || "Object";
|
|
106
|
+
return S.call(
|
|
107
|
+
h,
|
|
108
108
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
109
109
|
R
|
|
110
|
-
), e(
|
|
110
|
+
), e(c);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
function n(
|
|
114
|
-
if (
|
|
115
|
-
if (typeof
|
|
113
|
+
function n(c) {
|
|
114
|
+
if (c === v) return "<>";
|
|
115
|
+
if (typeof c == "object" && c !== null && c.$$typeof === H)
|
|
116
116
|
return "<...>";
|
|
117
117
|
try {
|
|
118
|
-
var
|
|
119
|
-
return
|
|
118
|
+
var h = r(c);
|
|
119
|
+
return h ? "<" + h + ">" : "<...>";
|
|
120
120
|
} catch {
|
|
121
121
|
return "<...>";
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
function o() {
|
|
125
|
-
var
|
|
126
|
-
return
|
|
125
|
+
var c = q.A;
|
|
126
|
+
return c === null ? null : c.getOwner();
|
|
127
127
|
}
|
|
128
128
|
function s() {
|
|
129
129
|
return Error("react-stack-top-frame");
|
|
130
130
|
}
|
|
131
|
-
function i(
|
|
132
|
-
if (
|
|
133
|
-
var
|
|
134
|
-
if (
|
|
131
|
+
function i(c) {
|
|
132
|
+
if (le.call(c, "key")) {
|
|
133
|
+
var h = Object.getOwnPropertyDescriptor(c, "key").get;
|
|
134
|
+
if (h && h.isReactWarning) return !1;
|
|
135
135
|
}
|
|
136
|
-
return
|
|
136
|
+
return c.key !== void 0;
|
|
137
137
|
}
|
|
138
|
-
function c
|
|
139
|
-
function
|
|
140
|
-
|
|
138
|
+
function a(c, h) {
|
|
139
|
+
function S() {
|
|
140
|
+
X || (X = !0, console.error(
|
|
141
141
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
142
|
-
|
|
142
|
+
h
|
|
143
143
|
));
|
|
144
144
|
}
|
|
145
|
-
|
|
146
|
-
get:
|
|
145
|
+
S.isReactWarning = !0, Object.defineProperty(c, "key", {
|
|
146
|
+
get: S,
|
|
147
147
|
configurable: !0
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
150
|
function u() {
|
|
151
|
-
var
|
|
152
|
-
return
|
|
151
|
+
var c = r(this.type);
|
|
152
|
+
return de[c] || (de[c] = !0, console.error(
|
|
153
153
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
154
|
-
)),
|
|
154
|
+
)), c = this.props.ref, c !== void 0 ? c : null;
|
|
155
155
|
}
|
|
156
|
-
function d(
|
|
157
|
-
return
|
|
158
|
-
$$typeof:
|
|
159
|
-
type:
|
|
160
|
-
key:
|
|
161
|
-
props:
|
|
162
|
-
_owner:
|
|
163
|
-
}, (
|
|
156
|
+
function d(c, h, S, R, M, j, W, Q) {
|
|
157
|
+
return S = j.ref, c = {
|
|
158
|
+
$$typeof: k,
|
|
159
|
+
type: c,
|
|
160
|
+
key: h,
|
|
161
|
+
props: j,
|
|
162
|
+
_owner: M
|
|
163
|
+
}, (S !== void 0 ? S : null) !== null ? Object.defineProperty(c, "ref", {
|
|
164
164
|
enumerable: !1,
|
|
165
165
|
get: u
|
|
166
|
-
}) : Object.defineProperty(
|
|
166
|
+
}) : Object.defineProperty(c, "ref", { enumerable: !1, value: null }), c._store = {}, Object.defineProperty(c._store, "validated", {
|
|
167
167
|
configurable: !1,
|
|
168
168
|
enumerable: !1,
|
|
169
169
|
writable: !0,
|
|
170
170
|
value: 0
|
|
171
|
-
}), Object.defineProperty(
|
|
171
|
+
}), Object.defineProperty(c, "_debugInfo", {
|
|
172
172
|
configurable: !1,
|
|
173
173
|
enumerable: !1,
|
|
174
174
|
writable: !0,
|
|
175
175
|
value: null
|
|
176
|
-
}), Object.defineProperty(
|
|
176
|
+
}), Object.defineProperty(c, "_debugStack", {
|
|
177
177
|
configurable: !1,
|
|
178
178
|
enumerable: !1,
|
|
179
179
|
writable: !0,
|
|
180
|
-
value:
|
|
181
|
-
}), Object.defineProperty(
|
|
180
|
+
value: W
|
|
181
|
+
}), Object.defineProperty(c, "_debugTask", {
|
|
182
182
|
configurable: !1,
|
|
183
183
|
enumerable: !1,
|
|
184
184
|
writable: !0,
|
|
185
|
-
value:
|
|
186
|
-
}), Object.freeze && (Object.freeze(
|
|
185
|
+
value: Q
|
|
186
|
+
}), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
|
|
187
187
|
}
|
|
188
|
-
function l(
|
|
189
|
-
var
|
|
190
|
-
if (
|
|
188
|
+
function l(c, h, S, R, M, j, W, Q) {
|
|
189
|
+
var A = h.children;
|
|
190
|
+
if (A !== void 0)
|
|
191
191
|
if (R)
|
|
192
|
-
if (
|
|
193
|
-
for (R = 0; R <
|
|
194
|
-
|
|
195
|
-
Object.freeze && Object.freeze(
|
|
192
|
+
if (be(A)) {
|
|
193
|
+
for (R = 0; R < A.length; R++)
|
|
194
|
+
f(A[R]);
|
|
195
|
+
Object.freeze && Object.freeze(A);
|
|
196
196
|
} else
|
|
197
197
|
console.error(
|
|
198
198
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
199
199
|
);
|
|
200
|
-
else
|
|
201
|
-
if (
|
|
202
|
-
|
|
203
|
-
var
|
|
204
|
-
return
|
|
200
|
+
else f(A);
|
|
201
|
+
if (le.call(h, "key")) {
|
|
202
|
+
A = r(c);
|
|
203
|
+
var V = Object.keys(h).filter(function(I) {
|
|
204
|
+
return I !== "key";
|
|
205
205
|
});
|
|
206
|
-
R = 0 <
|
|
206
|
+
R = 0 < V.length ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}", Z[A + R] || (V = 0 < V.length ? "{" + V.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
207
207
|
`A props object containing a "key" prop is being spread into JSX:
|
|
208
208
|
let props = %s;
|
|
209
209
|
<%s {...props} />
|
|
@@ -211,79 +211,79 @@ React keys must be passed directly to JSX without using spread:
|
|
|
211
211
|
let props = %s;
|
|
212
212
|
<%s key={someKey} {...props} />`,
|
|
213
213
|
R,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
),
|
|
214
|
+
A,
|
|
215
|
+
V,
|
|
216
|
+
A
|
|
217
|
+
), Z[A + R] = !0);
|
|
218
218
|
}
|
|
219
|
-
if (
|
|
220
|
-
|
|
221
|
-
for (var
|
|
222
|
-
|
|
223
|
-
} else
|
|
224
|
-
return
|
|
225
|
-
|
|
226
|
-
typeof
|
|
219
|
+
if (A = null, S !== void 0 && (t(S), A = "" + S), i(h) && (t(h.key), A = "" + h.key), "key" in h) {
|
|
220
|
+
S = {};
|
|
221
|
+
for (var N in h)
|
|
222
|
+
N !== "key" && (S[N] = h[N]);
|
|
223
|
+
} else S = h;
|
|
224
|
+
return A && a(
|
|
225
|
+
S,
|
|
226
|
+
typeof c == "function" ? c.displayName || c.name || "Unknown" : c
|
|
227
227
|
), d(
|
|
228
|
-
|
|
229
|
-
k,
|
|
228
|
+
c,
|
|
230
229
|
A,
|
|
231
|
-
|
|
230
|
+
j,
|
|
231
|
+
M,
|
|
232
232
|
o(),
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
233
|
+
S,
|
|
234
|
+
W,
|
|
235
|
+
Q
|
|
236
236
|
);
|
|
237
237
|
}
|
|
238
|
-
function
|
|
239
|
-
typeof
|
|
238
|
+
function f(c) {
|
|
239
|
+
typeof c == "object" && c !== null && c.$$typeof === k && c._store && (c._store.validated = 1);
|
|
240
240
|
}
|
|
241
|
-
var
|
|
241
|
+
var p = yt, k = Symbol.for("react.transitional.element"), C = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), P = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), ae = Symbol.for("react.memo"), H = Symbol.for("react.lazy"), ce = Symbol.for("react.activity"), ue = Symbol.for("react.client.reference"), q = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, le = Object.prototype.hasOwnProperty, be = Array.isArray, J = console.createTask ? console.createTask : function() {
|
|
242
242
|
return null;
|
|
243
243
|
};
|
|
244
|
-
|
|
245
|
-
"react-stack-bottom-frame": function(
|
|
246
|
-
return
|
|
244
|
+
p = {
|
|
245
|
+
"react-stack-bottom-frame": function(c) {
|
|
246
|
+
return c();
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
|
-
var
|
|
250
|
-
|
|
249
|
+
var X, de = {}, B = p["react-stack-bottom-frame"].bind(
|
|
250
|
+
p,
|
|
251
251
|
s
|
|
252
|
-
)(),
|
|
253
|
-
|
|
254
|
-
var
|
|
252
|
+
)(), fe = J(n(s)), Z = {};
|
|
253
|
+
te.Fragment = v, te.jsx = function(c, h, S, R, M) {
|
|
254
|
+
var j = 1e4 > q.recentlyCreatedOwnerStacks++;
|
|
255
255
|
return l(
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
256
|
+
c,
|
|
257
|
+
h,
|
|
258
|
+
S,
|
|
259
259
|
!1,
|
|
260
260
|
R,
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
261
|
+
M,
|
|
262
|
+
j ? Error("react-stack-top-frame") : B,
|
|
263
|
+
j ? J(n(c)) : fe
|
|
264
264
|
);
|
|
265
|
-
},
|
|
266
|
-
var
|
|
265
|
+
}, te.jsxs = function(c, h, S, R, M) {
|
|
266
|
+
var j = 1e4 > q.recentlyCreatedOwnerStacks++;
|
|
267
267
|
return l(
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
268
|
+
c,
|
|
269
|
+
h,
|
|
270
|
+
S,
|
|
271
271
|
!0,
|
|
272
272
|
R,
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
273
|
+
M,
|
|
274
|
+
j ? Error("react-stack-top-frame") : B,
|
|
275
|
+
j ? J(n(c)) : fe
|
|
276
276
|
);
|
|
277
277
|
};
|
|
278
|
-
}()),
|
|
278
|
+
}()), te;
|
|
279
279
|
}
|
|
280
|
-
var
|
|
281
|
-
function
|
|
282
|
-
return
|
|
280
|
+
var Ve;
|
|
281
|
+
function Rt() {
|
|
282
|
+
return Ve || (Ve = 1, process.env.NODE_ENV === "production" ? he.exports = Et() : he.exports = kt()), he.exports;
|
|
283
283
|
}
|
|
284
|
-
var b =
|
|
285
|
-
function
|
|
286
|
-
const t =
|
|
284
|
+
var b = Rt();
|
|
285
|
+
function At(r, e) {
|
|
286
|
+
const t = _e(
|
|
287
287
|
(n) => r.subscribe(n),
|
|
288
288
|
() => {
|
|
289
289
|
const n = r.getSnapshot(), o = e ?? n.rootViewId, s = o ? n.views.get(o) : void 0;
|
|
@@ -294,7 +294,7 @@ function st(r, e) {
|
|
|
294
294
|
return `${o ?? ""}:${s?.id ?? ""}`;
|
|
295
295
|
}
|
|
296
296
|
);
|
|
297
|
-
return
|
|
297
|
+
return L(() => {
|
|
298
298
|
const [n, o] = t.split(":");
|
|
299
299
|
return {
|
|
300
300
|
rootViewId: n || void 0,
|
|
@@ -302,16 +302,16 @@ function st(r, e) {
|
|
|
302
302
|
};
|
|
303
303
|
}, [t]);
|
|
304
304
|
}
|
|
305
|
-
function
|
|
306
|
-
const t =
|
|
305
|
+
function F(r, e) {
|
|
306
|
+
const t = _e(
|
|
307
307
|
(n) => r.subscribeNode(e, n),
|
|
308
308
|
() => r.getNodeVersion(e),
|
|
309
309
|
() => r.getNodeVersion(e)
|
|
310
310
|
);
|
|
311
|
-
return
|
|
311
|
+
return L(() => r.getNode(e), [r, e, t]);
|
|
312
312
|
}
|
|
313
|
-
const
|
|
314
|
-
function
|
|
313
|
+
const Nt = ye("UIRenderer");
|
|
314
|
+
function Ct(r) {
|
|
315
315
|
if (r === void 0)
|
|
316
316
|
return "{}";
|
|
317
317
|
if (typeof r == "string")
|
|
@@ -322,18 +322,18 @@ function at(r) {
|
|
|
322
322
|
return "{}";
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function It(r) {
|
|
326
326
|
const e = r.styleIds;
|
|
327
327
|
return Array.isArray(e) ? e : [];
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function Tt(r) {
|
|
330
330
|
const e = r.children;
|
|
331
331
|
return Array.isArray(e) ? e : [];
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function jt(r, e) {
|
|
334
334
|
return r.nodeId === e.nodeId && r.context === e.context;
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function Ot(r) {
|
|
337
337
|
if (r.length === 0) return "";
|
|
338
338
|
if (r.length === 1) return r[0].id;
|
|
339
339
|
let e = r[0].id;
|
|
@@ -341,66 +341,66 @@ function dt(r) {
|
|
|
341
341
|
e += "," + r[t].id;
|
|
342
342
|
return e;
|
|
343
343
|
}
|
|
344
|
-
const
|
|
345
|
-
const n =
|
|
346
|
-
() => o.length === 0 ? null : o.map((
|
|
344
|
+
const Ce = U(function r({ nodeId: e, context: t }) {
|
|
345
|
+
const n = F(t.store, e), o = n ? Tt(n) : [], s = Ot(o), i = L(
|
|
346
|
+
() => o.length === 0 ? null : o.map((f) => /* @__PURE__ */ b.jsx(r, { nodeId: f.id, context: t }, f.id)),
|
|
347
347
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
348
348
|
[s, t]
|
|
349
349
|
);
|
|
350
350
|
if (!n)
|
|
351
351
|
return null;
|
|
352
352
|
if (n.type === "root")
|
|
353
|
-
return /* @__PURE__ */ b.jsx(
|
|
354
|
-
const
|
|
355
|
-
if (!
|
|
356
|
-
return
|
|
357
|
-
const u =
|
|
353
|
+
return /* @__PURE__ */ b.jsx(St, { children: i }, n.id);
|
|
354
|
+
const a = t.library.resolve(n);
|
|
355
|
+
if (!a)
|
|
356
|
+
return Nt.warn(`No renderer for node type ${n.type}`), null;
|
|
357
|
+
const u = It(n), d = u.length > 0 ? u.join(" ") : void 0, l = a;
|
|
358
358
|
return /* @__PURE__ */ b.jsx(l, { nodeId: e, context: t, className: d });
|
|
359
|
-
},
|
|
360
|
-
function
|
|
361
|
-
return !Array.isArray(r) || r.length === 0 ? null : r.map((t) => /* @__PURE__ */ b.jsx(
|
|
359
|
+
}, jt);
|
|
360
|
+
function Pt(r, e) {
|
|
361
|
+
return !Array.isArray(r) || r.length === 0 ? null : r.map((t) => /* @__PURE__ */ b.jsx(Ce, { nodeId: t.id, context: e }, t.id));
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function _t(r, e) {
|
|
364
364
|
return r.store === e.store && r.library === e.library && r.viewId === e.viewId && r.emptyFallback === e.emptyFallback;
|
|
365
365
|
}
|
|
366
|
-
const
|
|
367
|
-
const { rootViewId: u, rootNodeId: d } =
|
|
366
|
+
const Mt = U(function({ store: e, library: t, viewId: n, emptyFallback: o = null, onAction: s, client: i, video: a }) {
|
|
367
|
+
const { rootViewId: u, rootNodeId: d } = At(e, n), l = E(s);
|
|
368
368
|
l.current = s;
|
|
369
|
-
const
|
|
370
|
-
|
|
371
|
-
const
|
|
372
|
-
|
|
373
|
-
const
|
|
374
|
-
if (!
|
|
369
|
+
const f = E(i);
|
|
370
|
+
f.current = i;
|
|
371
|
+
const p = E(a);
|
|
372
|
+
p.current = a;
|
|
373
|
+
const k = z((v, m) => {
|
|
374
|
+
if (!v)
|
|
375
375
|
return;
|
|
376
|
-
const
|
|
377
|
-
l.current?.(
|
|
378
|
-
}, []),
|
|
379
|
-
const
|
|
376
|
+
const g = Ct(m);
|
|
377
|
+
l.current?.(v, g);
|
|
378
|
+
}, []), C = L(() => {
|
|
379
|
+
const v = {
|
|
380
380
|
store: e,
|
|
381
381
|
library: t,
|
|
382
382
|
handlerCache: e.handlerCache,
|
|
383
383
|
// Access payloads from store at call time, not captured snapshot
|
|
384
|
-
getPayload: (
|
|
385
|
-
renderChildren: (
|
|
386
|
-
renderView: (
|
|
387
|
-
const
|
|
388
|
-
return
|
|
384
|
+
getPayload: (m) => e.getSnapshot().payloads.get(m),
|
|
385
|
+
renderChildren: (m) => Pt(m, v),
|
|
386
|
+
renderView: (m) => {
|
|
387
|
+
const g = e.getSnapshot().views.get(m);
|
|
388
|
+
return g ? /* @__PURE__ */ b.jsx(Ce, { nodeId: g.id, context: v }) : null;
|
|
389
389
|
},
|
|
390
|
-
dispatchAction:
|
|
390
|
+
dispatchAction: k,
|
|
391
391
|
// Access client/video via refs to avoid context recreation
|
|
392
392
|
get client() {
|
|
393
|
-
return
|
|
393
|
+
return f.current;
|
|
394
394
|
},
|
|
395
395
|
get video() {
|
|
396
|
-
return
|
|
396
|
+
return p.current;
|
|
397
397
|
}
|
|
398
398
|
};
|
|
399
|
-
return
|
|
400
|
-
}, [e, t,
|
|
401
|
-
return !u || !d ? o : /* @__PURE__ */ b.jsx("div", { "data-ikon-view-id": u, style: { display: "contents" }, children: /* @__PURE__ */ b.jsx(
|
|
402
|
-
},
|
|
403
|
-
class
|
|
399
|
+
return v;
|
|
400
|
+
}, [e, t, k]);
|
|
401
|
+
return !u || !d ? o : /* @__PURE__ */ b.jsx("div", { "data-ikon-view-id": u, style: { display: "contents" }, children: /* @__PURE__ */ b.jsx(Ce, { nodeId: d, context: C }) });
|
|
402
|
+
}, _t);
|
|
403
|
+
class Lt {
|
|
404
404
|
constructor(e, t) {
|
|
405
405
|
if (this.fallback = t, e)
|
|
406
406
|
for (const [n, o] of e)
|
|
@@ -417,60 +417,41 @@ class ht {
|
|
|
417
417
|
return this.renderers.get(e.type) ?? this.fallback;
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function hn(r, e) {
|
|
421
421
|
const t = Object.entries(r);
|
|
422
|
-
return new
|
|
422
|
+
return new Lt(t, e);
|
|
423
423
|
}
|
|
424
|
-
function
|
|
425
|
-
return
|
|
424
|
+
function mn(r) {
|
|
425
|
+
return _e(
|
|
426
426
|
(e) => r.subscribe(e),
|
|
427
427
|
() => r.getSnapshot(),
|
|
428
428
|
() => r.getSnapshot()
|
|
429
429
|
);
|
|
430
430
|
}
|
|
431
|
-
const
|
|
432
|
-
function
|
|
431
|
+
const Ie = "ikon-ui";
|
|
432
|
+
function Ut(r, e) {
|
|
433
433
|
return r === e;
|
|
434
434
|
}
|
|
435
|
-
const
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
video: i
|
|
442
|
-
}) {
|
|
443
|
-
const c = x(() => Array.from(e.keys()).sort().join(","), [e]), u = I(o);
|
|
444
|
-
u.current = o;
|
|
445
|
-
const d = I(s);
|
|
446
|
-
d.current = s;
|
|
447
|
-
const l = I(i);
|
|
448
|
-
l.current = i;
|
|
449
|
-
const p = x(
|
|
435
|
+
const pn = U(function({ stores: e, registry: t, category: n = Ie, onAction: o, client: s }) {
|
|
436
|
+
const i = L(() => Array.from(e.keys()).sort().join(","), [e]), a = E(o);
|
|
437
|
+
a.current = o;
|
|
438
|
+
const u = E(s);
|
|
439
|
+
u.current = s;
|
|
440
|
+
const d = L(
|
|
450
441
|
() => {
|
|
451
|
-
const
|
|
452
|
-
for (const [
|
|
453
|
-
const
|
|
454
|
-
|
|
442
|
+
const l = [];
|
|
443
|
+
for (const [f, p] of e) {
|
|
444
|
+
const k = p.store.getSnapshot();
|
|
445
|
+
Ut(p.category, n) && (!k.rootViewId || !k.views.has(k.rootViewId) || l.push({ key: f, store: p.store }));
|
|
455
446
|
}
|
|
456
|
-
return
|
|
447
|
+
return l;
|
|
457
448
|
},
|
|
458
449
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
459
|
-
[e, n,
|
|
450
|
+
[e, n, i]
|
|
460
451
|
);
|
|
461
|
-
return
|
|
462
|
-
pt,
|
|
463
|
-
{
|
|
464
|
-
store: w,
|
|
465
|
-
library: t,
|
|
466
|
-
onAction: u.current,
|
|
467
|
-
client: d.current,
|
|
468
|
-
video: l.current
|
|
469
|
-
},
|
|
470
|
-
h
|
|
471
|
-
)) });
|
|
452
|
+
return d.length === 0 ? null : /* @__PURE__ */ b.jsx(b.Fragment, { children: d.map(({ key: l, store: f }) => /* @__PURE__ */ b.jsx(Mt, { store: f, library: t, onAction: a.current, client: u.current, video: u.current?.media?.video }, l)) });
|
|
472
453
|
});
|
|
473
|
-
class
|
|
454
|
+
class xt {
|
|
474
455
|
core;
|
|
475
456
|
ownsCore;
|
|
476
457
|
stores = /* @__PURE__ */ new Map();
|
|
@@ -478,7 +459,7 @@ class Ur {
|
|
|
478
459
|
unsubscribeClears;
|
|
479
460
|
unsubscribeStoreChanges;
|
|
480
461
|
constructor(e) {
|
|
481
|
-
this.core = e?.core ?? new
|
|
462
|
+
this.core = e?.core ?? new pt({ client: e?.client }), this.ownsCore = !e?.core, this.unsubscribeClears = this.core.subscribeToUiStreamCleared(this.handleUiStreamCleared), this.unsubscribeStoreChanges = this.core.uiStore.subscribe(this.syncStreamSnapshot), this.syncAllStreams();
|
|
482
463
|
}
|
|
483
464
|
dispose() {
|
|
484
465
|
this.unsubscribeClears(), this.unsubscribeStoreChanges(), this.ownsCore && this.core.dispose(), this.listeners.clear(), this.stores.clear();
|
|
@@ -525,8 +506,8 @@ class Ur {
|
|
|
525
506
|
if (t)
|
|
526
507
|
return t;
|
|
527
508
|
const n = {
|
|
528
|
-
category:
|
|
529
|
-
store: new
|
|
509
|
+
category: Ie,
|
|
510
|
+
store: new gt()
|
|
530
511
|
};
|
|
531
512
|
return this.stores.set(e, n), n;
|
|
532
513
|
}
|
|
@@ -534,7 +515,7 @@ class Ur {
|
|
|
534
515
|
const n = this.stores.get(e);
|
|
535
516
|
if (!n)
|
|
536
517
|
return !1;
|
|
537
|
-
const o = t ?? this.core.uiStore.getSnapshot(e)?.category ??
|
|
518
|
+
const o = t ?? this.core.uiStore.getSnapshot(e)?.category ?? Ie;
|
|
538
519
|
return n.category === o ? !1 : (this.stores.set(e, { ...n, category: o }), !0);
|
|
539
520
|
}
|
|
540
521
|
notify(e) {
|
|
@@ -542,7 +523,7 @@ class Ur {
|
|
|
542
523
|
t(e);
|
|
543
524
|
}
|
|
544
525
|
}
|
|
545
|
-
function
|
|
526
|
+
function G(r) {
|
|
546
527
|
if (typeof r == "string") {
|
|
547
528
|
const e = r.trim();
|
|
548
529
|
return e.length > 0 ? e : void 0;
|
|
@@ -552,7 +533,7 @@ function $(r) {
|
|
|
552
533
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
553
534
|
}
|
|
554
535
|
}
|
|
555
|
-
function
|
|
536
|
+
function se(...r) {
|
|
556
537
|
let e = "";
|
|
557
538
|
for (const t of r)
|
|
558
539
|
if (t) {
|
|
@@ -561,29 +542,29 @@ function W(...r) {
|
|
|
561
542
|
}
|
|
562
543
|
return e || void 0;
|
|
563
544
|
}
|
|
564
|
-
const
|
|
565
|
-
function
|
|
545
|
+
const ze = /* @__PURE__ */ new WeakMap(), $t = {};
|
|
546
|
+
function ie(r) {
|
|
566
547
|
if (!r)
|
|
567
|
-
return
|
|
568
|
-
const e =
|
|
548
|
+
return $t;
|
|
549
|
+
const e = ze.get(r);
|
|
569
550
|
if (e)
|
|
570
551
|
return e;
|
|
571
552
|
const t = {};
|
|
572
553
|
for (const [n, o] of Object.entries(r))
|
|
573
554
|
o != null && (typeof o == "string" || typeof o == "number" || typeof o == "boolean") && (t[n] = o);
|
|
574
|
-
return
|
|
555
|
+
return ze.set(r, t), t;
|
|
575
556
|
}
|
|
576
|
-
function
|
|
577
|
-
const r =
|
|
578
|
-
const o =
|
|
579
|
-
return
|
|
557
|
+
function Ft() {
|
|
558
|
+
const r = U(function({ nodeId: t, context: n }) {
|
|
559
|
+
const o = F(n.store, t), s = E(null), i = G(o?.props?.targetViewId), a = o?.props?.focusOnly, u = typeof a == "boolean" ? a : void 0;
|
|
560
|
+
return $(() => {
|
|
580
561
|
if (typeof document > "u")
|
|
581
562
|
return;
|
|
582
563
|
const l = s.current;
|
|
583
564
|
if (!l || i && l.closest("[data-ikon-view-id]")?.getAttribute("data-ikon-view-id") !== i)
|
|
584
565
|
return;
|
|
585
|
-
const
|
|
586
|
-
if (
|
|
566
|
+
const f = u !== !0;
|
|
567
|
+
if (f && typeof l.scrollIntoView == "function")
|
|
587
568
|
try {
|
|
588
569
|
l.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
|
|
589
570
|
} catch {
|
|
@@ -591,7 +572,7 @@ function St() {
|
|
|
591
572
|
}
|
|
592
573
|
if (typeof l.focus == "function")
|
|
593
574
|
try {
|
|
594
|
-
l.focus({ preventScroll: !
|
|
575
|
+
l.focus({ preventScroll: !f });
|
|
595
576
|
} catch {
|
|
596
577
|
l.focus();
|
|
597
578
|
}
|
|
@@ -612,31 +593,31 @@ function St() {
|
|
|
612
593
|
return r;
|
|
613
594
|
};
|
|
614
595
|
}
|
|
615
|
-
function
|
|
616
|
-
const r =
|
|
617
|
-
const s =
|
|
596
|
+
function Bt() {
|
|
597
|
+
const r = U(function({ nodeId: t, context: n, className: o }) {
|
|
598
|
+
const s = F(n.store, t);
|
|
618
599
|
if (!s)
|
|
619
600
|
return null;
|
|
620
|
-
const i =
|
|
621
|
-
return /* @__PURE__ */ b.jsx("div", { ...i, "data-ikon-node-id": s.id, className:
|
|
601
|
+
const i = ie(s.props), a = se(G(s.props?.className), o), u = s.children?.length ? n.renderChildren(s.children) : void 0;
|
|
602
|
+
return /* @__PURE__ */ b.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: u });
|
|
622
603
|
});
|
|
623
604
|
return ({ type: e }) => {
|
|
624
605
|
if (e === "common.div")
|
|
625
606
|
return r;
|
|
626
607
|
};
|
|
627
608
|
}
|
|
628
|
-
function
|
|
629
|
-
const r =
|
|
630
|
-
const s =
|
|
609
|
+
function Vt() {
|
|
610
|
+
const r = U(function({ nodeId: t, context: n, className: o }) {
|
|
611
|
+
const s = F(n.store, t);
|
|
631
612
|
if (!s)
|
|
632
613
|
return null;
|
|
633
|
-
const i =
|
|
614
|
+
const i = ie(s.props), a = se(G(s.props?.className), o), u = s.children?.length ? n.renderChildren(s.children) : void 0;
|
|
634
615
|
return /* @__PURE__ */ b.jsx(
|
|
635
616
|
"form",
|
|
636
617
|
{
|
|
637
618
|
...i,
|
|
638
619
|
"data-ikon-node-id": s.id,
|
|
639
|
-
className:
|
|
620
|
+
className: a,
|
|
640
621
|
onSubmit: (d) => d.preventDefault(),
|
|
641
622
|
children: u
|
|
642
623
|
}
|
|
@@ -647,12 +628,12 @@ function vt() {
|
|
|
647
628
|
return r;
|
|
648
629
|
};
|
|
649
630
|
}
|
|
650
|
-
function
|
|
651
|
-
const r =
|
|
652
|
-
const s =
|
|
631
|
+
function zt() {
|
|
632
|
+
const r = U(function({ nodeId: t, context: n, className: o }) {
|
|
633
|
+
const s = F(n.store, t);
|
|
653
634
|
if (!s)
|
|
654
635
|
return null;
|
|
655
|
-
const i =
|
|
636
|
+
const i = ie(s.props), a = se(G(s.props?.className), o), u = s.children?.length ? n.renderChildren(s.children) : void 0;
|
|
656
637
|
return /* @__PURE__ */ b.jsx(
|
|
657
638
|
"div",
|
|
658
639
|
{
|
|
@@ -660,7 +641,7 @@ function Et() {
|
|
|
660
641
|
"data-ikon-node-id": s.id,
|
|
661
642
|
"data-ikon-view-type": "scroll-view",
|
|
662
643
|
"data-ikon-scroll-container": "true",
|
|
663
|
-
className:
|
|
644
|
+
className: a,
|
|
664
645
|
children: u
|
|
665
646
|
}
|
|
666
647
|
);
|
|
@@ -670,47 +651,47 @@ function Et() {
|
|
|
670
651
|
return r;
|
|
671
652
|
};
|
|
672
653
|
}
|
|
673
|
-
function
|
|
674
|
-
const r =
|
|
675
|
-
const s =
|
|
654
|
+
function Dt() {
|
|
655
|
+
const r = U(function({ nodeId: t, context: n, className: o }) {
|
|
656
|
+
const s = F(n.store, t);
|
|
676
657
|
if (!s)
|
|
677
658
|
return null;
|
|
678
|
-
const i =
|
|
679
|
-
return /* @__PURE__ */ b.jsx("div", { ...i, "data-ikon-node-id": s.id, className:
|
|
659
|
+
const i = ie(s.props), a = se("relative", G(s.props?.className), o), u = s.children?.length ? n.renderChildren(s.children) : void 0;
|
|
660
|
+
return /* @__PURE__ */ b.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: u });
|
|
680
661
|
});
|
|
681
662
|
return ({ type: e }) => {
|
|
682
663
|
if (e === "common.stack")
|
|
683
664
|
return r;
|
|
684
665
|
};
|
|
685
666
|
}
|
|
686
|
-
function
|
|
687
|
-
const r =
|
|
688
|
-
const s =
|
|
667
|
+
function qt() {
|
|
668
|
+
const r = U(function({ nodeId: t, context: n, className: o }) {
|
|
669
|
+
const s = F(n.store, t);
|
|
689
670
|
if (!s)
|
|
690
671
|
return null;
|
|
691
|
-
const i =
|
|
692
|
-
return /* @__PURE__ */ b.jsx("div", { ...i, "data-ikon-node-id": s.id, className:
|
|
672
|
+
const i = ie(s.props), a = se("absolute", G(s.props?.className), o), u = s.children?.length ? n.renderChildren(s.children) : void 0;
|
|
673
|
+
return /* @__PURE__ */ b.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: u });
|
|
693
674
|
});
|
|
694
675
|
return ({ type: e }) => {
|
|
695
676
|
if (e === "common.layer")
|
|
696
677
|
return r;
|
|
697
678
|
};
|
|
698
679
|
}
|
|
699
|
-
function
|
|
680
|
+
function Wt() {
|
|
700
681
|
return [
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
682
|
+
Bt(),
|
|
683
|
+
Vt(),
|
|
684
|
+
zt(),
|
|
685
|
+
Dt(),
|
|
686
|
+
qt(),
|
|
687
|
+
Ft()
|
|
707
688
|
];
|
|
708
689
|
}
|
|
709
|
-
const
|
|
710
|
-
function
|
|
711
|
-
r.registerModule(
|
|
690
|
+
const Yt = "base", Jt = async () => Wt();
|
|
691
|
+
function Kt(r) {
|
|
692
|
+
r.registerModule(Yt, Jt);
|
|
712
693
|
}
|
|
713
|
-
function
|
|
694
|
+
function ot(r) {
|
|
714
695
|
if (typeof r == "string") {
|
|
715
696
|
const e = r.trim();
|
|
716
697
|
return e.length > 0 ? e : void 0;
|
|
@@ -720,13 +701,13 @@ function Ve(r) {
|
|
|
720
701
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
721
702
|
}
|
|
722
703
|
}
|
|
723
|
-
function
|
|
704
|
+
function st(...r) {
|
|
724
705
|
const e = [];
|
|
725
706
|
for (const t of r)
|
|
726
707
|
t && t.trim() && e.push(t.trim());
|
|
727
708
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
728
709
|
}
|
|
729
|
-
function
|
|
710
|
+
function pe(r) {
|
|
730
711
|
if (typeof r == "number" && Number.isFinite(r))
|
|
731
712
|
return Math.floor(r);
|
|
732
713
|
if (typeof r == "string" && r.trim().length > 0) {
|
|
@@ -735,43 +716,43 @@ function X(r) {
|
|
|
735
716
|
return Math.floor(e);
|
|
736
717
|
}
|
|
737
718
|
}
|
|
738
|
-
function
|
|
719
|
+
function Te(r) {
|
|
739
720
|
if (typeof r != "string")
|
|
740
721
|
return;
|
|
741
722
|
const e = r.trim();
|
|
742
723
|
return e.length > 0 ? e : void 0;
|
|
743
724
|
}
|
|
744
|
-
const
|
|
745
|
-
function
|
|
746
|
-
const r =
|
|
747
|
-
const s =
|
|
748
|
-
return
|
|
749
|
-
const
|
|
750
|
-
if (!(!
|
|
751
|
-
return
|
|
752
|
-
|
|
725
|
+
const Gt = "media.video-canvas", Ht = "media.video-url-player";
|
|
726
|
+
function Xt() {
|
|
727
|
+
const r = U(function({ nodeId: t, context: n, className: o }) {
|
|
728
|
+
const s = F(n.store, t), i = E(null), a = n.video, u = s ? Te(s.props?.streamId) : void 0, d = s ? pe(s.props?.width) : void 0, l = s ? pe(s.props?.height) : void 0, f = s ? st(ot(s.props?.className), o) : o;
|
|
729
|
+
return $(() => {
|
|
730
|
+
const p = i.current;
|
|
731
|
+
if (!(!a || !p || !u))
|
|
732
|
+
return a.attachCanvas(u, p), () => {
|
|
733
|
+
a.detachCanvas(u);
|
|
753
734
|
};
|
|
754
|
-
}, [
|
|
735
|
+
}, [a, u]), s ? /* @__PURE__ */ b.jsx(
|
|
755
736
|
"canvas",
|
|
756
737
|
{
|
|
757
738
|
ref: i,
|
|
758
739
|
"data-ikon-node-id": s.id,
|
|
759
740
|
"data-ikon-video-stream-id": u,
|
|
760
|
-
className:
|
|
741
|
+
className: f,
|
|
761
742
|
...d ? { width: d } : {},
|
|
762
743
|
...l ? { height: l } : {}
|
|
763
744
|
}
|
|
764
745
|
) : null;
|
|
765
746
|
});
|
|
766
747
|
return ({ type: e }) => {
|
|
767
|
-
if (e ===
|
|
748
|
+
if (e === Gt)
|
|
768
749
|
return r;
|
|
769
750
|
};
|
|
770
751
|
}
|
|
771
|
-
function
|
|
772
|
-
return [
|
|
752
|
+
function Zt() {
|
|
753
|
+
return [Xt(), Qt()];
|
|
773
754
|
}
|
|
774
|
-
function
|
|
755
|
+
function re(r) {
|
|
775
756
|
if (typeof r == "boolean")
|
|
776
757
|
return r;
|
|
777
758
|
if (typeof r == "string") {
|
|
@@ -780,45 +761,45 @@ function B(r) {
|
|
|
780
761
|
if (e === "false") return !1;
|
|
781
762
|
}
|
|
782
763
|
}
|
|
783
|
-
function
|
|
784
|
-
const r =
|
|
764
|
+
function Qt() {
|
|
765
|
+
const r = U(function({
|
|
785
766
|
nodeId: t,
|
|
786
767
|
context: n,
|
|
787
768
|
className: o
|
|
788
769
|
}) {
|
|
789
|
-
const s =
|
|
770
|
+
const s = F(n.store, t);
|
|
790
771
|
if (!s)
|
|
791
772
|
return null;
|
|
792
|
-
const i =
|
|
773
|
+
const i = st(ot(s.props?.className), o), a = Te(s.props?.src), u = Te(s.props?.poster), d = re(s.props?.controls), l = re(s.props?.autoplay), f = re(s.props?.loop), p = re(s.props?.muted), k = re(s.props?.playsInline), C = pe(s.props?.width), v = pe(s.props?.height), m = s.children?.length ? n.renderChildren(s.children) : void 0;
|
|
793
774
|
return /* @__PURE__ */ b.jsx(
|
|
794
775
|
"video",
|
|
795
776
|
{
|
|
796
|
-
src:
|
|
777
|
+
src: a,
|
|
797
778
|
poster: u,
|
|
798
779
|
...d !== void 0 ? { controls: d } : {},
|
|
799
780
|
...l !== void 0 ? { autoPlay: l } : {},
|
|
800
|
-
...
|
|
801
|
-
...
|
|
802
|
-
...
|
|
803
|
-
...
|
|
804
|
-
...
|
|
781
|
+
...f !== void 0 ? { loop: f } : {},
|
|
782
|
+
...p !== void 0 ? { muted: p } : {},
|
|
783
|
+
...k !== void 0 ? { playsInline: k } : {},
|
|
784
|
+
...C ? { width: C } : {},
|
|
785
|
+
...v ? { height: v } : {},
|
|
805
786
|
"data-ikon-node-id": s.id,
|
|
806
787
|
className: i,
|
|
807
|
-
children:
|
|
788
|
+
children: m
|
|
808
789
|
}
|
|
809
790
|
);
|
|
810
791
|
});
|
|
811
792
|
return ({ type: e }) => {
|
|
812
|
-
if (e ===
|
|
793
|
+
if (e === Ht)
|
|
813
794
|
return r;
|
|
814
795
|
};
|
|
815
796
|
}
|
|
816
|
-
const
|
|
817
|
-
function
|
|
818
|
-
r.registerModule(
|
|
797
|
+
const er = "media", tr = async () => Zt();
|
|
798
|
+
function rr(r) {
|
|
799
|
+
r.registerModule(er, tr);
|
|
819
800
|
}
|
|
820
|
-
const
|
|
821
|
-
class
|
|
801
|
+
const De = ye("UIRegistry");
|
|
802
|
+
class nr {
|
|
822
803
|
baseResolvers = [];
|
|
823
804
|
moduleLoaders = /* @__PURE__ */ new Map();
|
|
824
805
|
moduleResolvers = /* @__PURE__ */ new Map();
|
|
@@ -840,15 +821,15 @@ class xt {
|
|
|
840
821
|
for (const [n, o] of this.moduleLoaders.entries())
|
|
841
822
|
if (!this.moduleResolvers.has(n))
|
|
842
823
|
try {
|
|
843
|
-
const s = await o(), i =
|
|
824
|
+
const s = await o(), i = ir(s);
|
|
844
825
|
this.moduleResolvers.set(n, i), e = !0;
|
|
845
826
|
} catch (s) {
|
|
846
|
-
|
|
827
|
+
De.error(`[IkonUiRegistry] Failed to load module '${n}'.`, s);
|
|
847
828
|
}
|
|
848
829
|
const t = [];
|
|
849
830
|
for (const n of this.moduleLoaders.keys())
|
|
850
831
|
this.moduleResolvers.has(n) && t.push(n);
|
|
851
|
-
return
|
|
832
|
+
return ar(t, this.activeModuleOrder) || (this.activeModuleOrder = t, e = !0), e;
|
|
852
833
|
}
|
|
853
834
|
resolve(e) {
|
|
854
835
|
for (const t of this.baseResolvers) {
|
|
@@ -858,7 +839,7 @@ class xt {
|
|
|
858
839
|
for (const t of this.activeModuleOrder) {
|
|
859
840
|
const n = this.moduleResolvers.get(t);
|
|
860
841
|
if (!n) {
|
|
861
|
-
|
|
842
|
+
De.warn(`Missing resolvers for module ${t}`);
|
|
862
843
|
continue;
|
|
863
844
|
}
|
|
864
845
|
for (const o of n) {
|
|
@@ -868,17 +849,17 @@ class xt {
|
|
|
868
849
|
}
|
|
869
850
|
}
|
|
870
851
|
}
|
|
871
|
-
function
|
|
872
|
-
const r = new
|
|
873
|
-
return
|
|
852
|
+
function or() {
|
|
853
|
+
const r = new nr();
|
|
854
|
+
return Kt(r), rr(r), r.loadRegisteredModules(), r;
|
|
874
855
|
}
|
|
875
|
-
function
|
|
856
|
+
function sr(r) {
|
|
876
857
|
return Array.isArray(r) ? r : [r];
|
|
877
858
|
}
|
|
878
|
-
function
|
|
879
|
-
return r ?
|
|
859
|
+
function ir(r) {
|
|
860
|
+
return r ? sr(r).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
|
|
880
861
|
}
|
|
881
|
-
function
|
|
862
|
+
function ar(r, e) {
|
|
882
863
|
if (r.length !== e.length)
|
|
883
864
|
return !1;
|
|
884
865
|
for (let t = 0; t < r.length; t += 1)
|
|
@@ -886,7 +867,7 @@ function Ft(r, e) {
|
|
|
886
867
|
return !1;
|
|
887
868
|
return !0;
|
|
888
869
|
}
|
|
889
|
-
const
|
|
870
|
+
const ve = ye("MotionController"), qe = {
|
|
890
871
|
ease: [0.25, 0.1, 0.25, 1],
|
|
891
872
|
"ease-in": [0.42, 0, 1, 1],
|
|
892
873
|
"ease-out": [0, 0, 0.58, 1],
|
|
@@ -916,88 +897,88 @@ const ne = he("MotionController"), je = {
|
|
|
916
897
|
"ease-out-back": [0.175, 0.885, 0.32, 1.275],
|
|
917
898
|
"ease-in-out-back": [0.68, -0.55, 0.265, 1.55]
|
|
918
899
|
};
|
|
919
|
-
function
|
|
900
|
+
function O(r) {
|
|
920
901
|
return r <= 0 ? 0 : r >= 1 ? 1 : r;
|
|
921
902
|
}
|
|
922
|
-
function
|
|
903
|
+
function We(r) {
|
|
923
904
|
if (r == null) return;
|
|
924
905
|
const e = `${r}`.trim();
|
|
925
906
|
if (!e) return;
|
|
926
907
|
const t = Number.parseFloat(e);
|
|
927
908
|
return Number.isFinite(t) ? t : void 0;
|
|
928
909
|
}
|
|
929
|
-
function
|
|
910
|
+
function Ye(r) {
|
|
930
911
|
return typeof CSS < "u" && CSS.escape ? CSS.escape(r) : r.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
|
|
931
912
|
}
|
|
932
|
-
function
|
|
913
|
+
function Je(r, e, t, n) {
|
|
933
914
|
const l = new Float32Array(11);
|
|
934
|
-
function
|
|
935
|
-
return ((3 *
|
|
936
|
-
}
|
|
937
|
-
function
|
|
938
|
-
return 3 * (3 *
|
|
939
|
-
}
|
|
940
|
-
function
|
|
941
|
-
for (let
|
|
942
|
-
const
|
|
943
|
-
if (
|
|
944
|
-
return
|
|
945
|
-
const
|
|
946
|
-
|
|
915
|
+
function f(m, g, w) {
|
|
916
|
+
return ((3 * g - 3 * w + 1) * m + (3 * w - 6 * g)) * m * m + 3 * g * m;
|
|
917
|
+
}
|
|
918
|
+
function p(m, g, w) {
|
|
919
|
+
return 3 * (3 * g - 3 * w + 1) * m * m + 2 * (3 * w - 6 * g) * m + 3 * g;
|
|
920
|
+
}
|
|
921
|
+
function k(m, g) {
|
|
922
|
+
for (let w = 0; w < 4; w += 1) {
|
|
923
|
+
const P = p(g, r, t);
|
|
924
|
+
if (P === 0)
|
|
925
|
+
return g;
|
|
926
|
+
const T = f(g, r, t) - m;
|
|
927
|
+
g -= T / P;
|
|
947
928
|
}
|
|
948
|
-
return
|
|
929
|
+
return g;
|
|
949
930
|
}
|
|
950
|
-
function
|
|
951
|
-
let
|
|
931
|
+
function C(m, g, w) {
|
|
932
|
+
let P = 0, T = 0, x = 0;
|
|
952
933
|
do
|
|
953
|
-
|
|
954
|
-
while (Math.abs(
|
|
955
|
-
return
|
|
956
|
-
}
|
|
957
|
-
function
|
|
958
|
-
let
|
|
959
|
-
const
|
|
960
|
-
for (;
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
const
|
|
964
|
-
return
|
|
965
|
-
}
|
|
966
|
-
for (let
|
|
967
|
-
l[
|
|
968
|
-
return (
|
|
969
|
-
}
|
|
970
|
-
function
|
|
934
|
+
T = g + (w - g) / 2, P = f(T, r, t) - m, P > 0 ? w = T : g = T;
|
|
935
|
+
while (Math.abs(P) > 1e-7 && ++x < 10);
|
|
936
|
+
return T;
|
|
937
|
+
}
|
|
938
|
+
function v(m) {
|
|
939
|
+
let g = 0, w = 1;
|
|
940
|
+
const P = 10;
|
|
941
|
+
for (; w !== P && l[w] <= m; w += 1)
|
|
942
|
+
g += 0.1;
|
|
943
|
+
w -= 1;
|
|
944
|
+
const T = (m - l[w]) / (l[w + 1] - l[w]), x = g + T * 0.1, D = p(x, r, t);
|
|
945
|
+
return D >= 1e-3 ? k(m, x) : D === 0 ? x : C(m, g, g + 0.1);
|
|
946
|
+
}
|
|
947
|
+
for (let m = 0; m < 11; m += 1)
|
|
948
|
+
l[m] = f(m * 0.1, r, t);
|
|
949
|
+
return (m) => m <= 0 ? 0 : m >= 1 ? 1 : f(v(m), e, n);
|
|
950
|
+
}
|
|
951
|
+
function cr(r) {
|
|
971
952
|
const e = /steps\(\s*([0-9]+)\s*(?:,\s*([a-z-]+)\s*)?\)/i.exec(r);
|
|
972
953
|
if (!e)
|
|
973
|
-
return (o) =>
|
|
954
|
+
return (o) => O(o);
|
|
974
955
|
const t = Math.max(1, parseInt(e[1], 10)), n = (e[2] ?? "end").toLowerCase();
|
|
975
|
-
return n === "start" || n === "jump-start" ? (o) =>
|
|
956
|
+
return n === "start" || n === "jump-start" ? (o) => O(Math.ceil(o * t) / t) : n === "none" || n === "jump-none" ? (o) => O(Math.round(o * t) / t) : n === "both" || n === "jump-both" ? (o) => O((Math.floor(o * t) + 0.5) / t) : (o) => O(Math.floor(o * t) / t);
|
|
976
957
|
}
|
|
977
|
-
function
|
|
958
|
+
function ur(r) {
|
|
978
959
|
if (!r)
|
|
979
|
-
return (t) =>
|
|
960
|
+
return (t) => O(t);
|
|
980
961
|
const e = r.trim().toLowerCase();
|
|
981
962
|
if (!e || e === "linear")
|
|
982
|
-
return (t) =>
|
|
983
|
-
if (
|
|
984
|
-
const [t, n, o, s] =
|
|
985
|
-
return (
|
|
963
|
+
return (t) => O(t);
|
|
964
|
+
if (qe[e]) {
|
|
965
|
+
const [t, n, o, s] = qe[e], i = Je(t, n, o, s);
|
|
966
|
+
return (a) => O(i(O(a)));
|
|
986
967
|
}
|
|
987
968
|
if (e.startsWith("cubic-bezier(") && e.endsWith(")")) {
|
|
988
969
|
const n = e.slice(13, -1).split(",").map((o) => Number.parseFloat(o.trim()));
|
|
989
970
|
if (n.length === 4 && n.every((o) => Number.isFinite(o))) {
|
|
990
|
-
const [o, s, i,
|
|
991
|
-
return (d) =>
|
|
971
|
+
const [o, s, i, a] = n, u = Je(o, s, i, a);
|
|
972
|
+
return (d) => O(u(O(d)));
|
|
992
973
|
}
|
|
993
974
|
}
|
|
994
975
|
if (e.startsWith("steps(") && e.endsWith(")")) {
|
|
995
|
-
const t =
|
|
996
|
-
return (n) => t(
|
|
976
|
+
const t = cr(e);
|
|
977
|
+
return (n) => t(O(n));
|
|
997
978
|
}
|
|
998
|
-
return (t) =>
|
|
979
|
+
return (t) => O(t);
|
|
999
980
|
}
|
|
1000
|
-
function
|
|
981
|
+
function lr(r) {
|
|
1001
982
|
if (!r)
|
|
1002
983
|
return;
|
|
1003
984
|
const e = /(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)\s*->\s*(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)/.exec(r);
|
|
@@ -1007,7 +988,7 @@ function zt(r) {
|
|
|
1007
988
|
if (![t, n, o, s].some((i) => !Number.isFinite(i)))
|
|
1008
989
|
return { inStart: t, inEnd: n, outStart: o, outEnd: s };
|
|
1009
990
|
}
|
|
1010
|
-
class
|
|
991
|
+
class dr {
|
|
1011
992
|
bindingsByStyle = /* @__PURE__ */ new Map();
|
|
1012
993
|
observer;
|
|
1013
994
|
observeScheduled = !1;
|
|
@@ -1031,7 +1012,7 @@ class Dt {
|
|
|
1031
1012
|
try {
|
|
1032
1013
|
e();
|
|
1033
1014
|
} catch (t) {
|
|
1034
|
-
|
|
1015
|
+
ve.warn("Failed to cleanup binding listener", t);
|
|
1035
1016
|
}
|
|
1036
1017
|
this.globalCleanups.clear(), this.elementStates.clear(), this.styleToElements.clear(), this.bindingsByStyle.clear(), this.pendingScanStyles.clear(), this.scanScheduled = !1, this.observer && (this.observer.disconnect(), this.observer = void 0);
|
|
1037
1018
|
}
|
|
@@ -1041,7 +1022,7 @@ class Dt {
|
|
|
1041
1022
|
const n = (JSON.parse(e).motionBindings ?? []).map((o) => this.parseBinding(o)).filter((o) => o !== void 0);
|
|
1042
1023
|
return n.length === 0 ? void 0 : { bindings: n };
|
|
1043
1024
|
} catch (t) {
|
|
1044
|
-
|
|
1025
|
+
ve.warn("Failed to parse motion metadata", t);
|
|
1045
1026
|
return;
|
|
1046
1027
|
}
|
|
1047
1028
|
}
|
|
@@ -1049,13 +1030,13 @@ class Dt {
|
|
|
1049
1030
|
const t = e.source?.trim();
|
|
1050
1031
|
if (!t)
|
|
1051
1032
|
return;
|
|
1052
|
-
const n =
|
|
1033
|
+
const n = We(e.min) ?? 0, o = We(e.max), s = o === void 0 ? n + 100 : o, i = (e.clamp ?? "clamp").trim().toLowerCase(), a = !!e.reverse, u = ur(e.ease), d = lr(e.map), l = e.targetId?.trim() || void 0;
|
|
1053
1034
|
return Number.isNaN(n) || Number.isNaN(s) ? void 0 : {
|
|
1054
1035
|
source: t.toLowerCase(),
|
|
1055
1036
|
min: n,
|
|
1056
1037
|
max: s,
|
|
1057
1038
|
clamp: i === "freeze-start" || i === "freeze-end" || i === "unclamped" ? i : "clamp",
|
|
1058
|
-
reverse:
|
|
1039
|
+
reverse: a,
|
|
1059
1040
|
ease: u,
|
|
1060
1041
|
map: d,
|
|
1061
1042
|
targetId: l
|
|
@@ -1107,7 +1088,7 @@ class Dt {
|
|
|
1107
1088
|
const t = this.bindingsByStyle.get(e);
|
|
1108
1089
|
if (!t || typeof document > "u")
|
|
1109
1090
|
return;
|
|
1110
|
-
const n = `.${
|
|
1091
|
+
const n = `.${Ye(e)}`;
|
|
1111
1092
|
document.querySelectorAll(n).forEach((s) => this.applyStyleToElement(s, e, t));
|
|
1112
1093
|
}
|
|
1113
1094
|
applyStyleToElement(e, t, n) {
|
|
@@ -1142,12 +1123,12 @@ class Dt {
|
|
|
1142
1123
|
s();
|
|
1143
1124
|
const i = new AbortController();
|
|
1144
1125
|
o.addEventListener("scroll", s, { passive: !0, signal: i.signal }), this.registerCleanup(e, t, () => i.abort());
|
|
1145
|
-
const
|
|
1146
|
-
window.addEventListener("resize",
|
|
1126
|
+
const a = () => s();
|
|
1127
|
+
window.addEventListener("resize", a), this.registerCleanup(e, t, () => window.removeEventListener("resize", a));
|
|
1147
1128
|
}
|
|
1148
1129
|
resolveScrollContainer(e, t) {
|
|
1149
1130
|
if (t.targetId) {
|
|
1150
|
-
const n = `[data-ikon-motion-source="${
|
|
1131
|
+
const n = `[data-ikon-motion-source="${Ye(t.targetId)}"]`, o = typeof document < "u" ? document.querySelector(n) : null;
|
|
1151
1132
|
if (o)
|
|
1152
1133
|
return o;
|
|
1153
1134
|
}
|
|
@@ -1157,7 +1138,7 @@ class Dt {
|
|
|
1157
1138
|
const o = t.max - t.min, s = o === 0 ? n > t.min ? 1 : 0 : (n - t.min) / o;
|
|
1158
1139
|
let i = this.applyClamp(s, t.clamp);
|
|
1159
1140
|
t.reverse && (i = 1 - i);
|
|
1160
|
-
const
|
|
1141
|
+
const a = t.ease(i), u = Number.isFinite(a) ? a : 0, d = u * 100;
|
|
1161
1142
|
if (e.style.setProperty("--tw-motion-bind-source-value", `${n}`), e.style.setProperty("--tw-motion-bind-progress-ratio", `${u}`), e.style.setProperty("--tw-motion-bind-progress", `${d}`), t.map) {
|
|
1162
1143
|
const l = this.applyMap(d, t.map);
|
|
1163
1144
|
l !== void 0 && e.style.setProperty("--tw-motion-bind-value", `${l}`);
|
|
@@ -1175,7 +1156,7 @@ class Dt {
|
|
|
1175
1156
|
case "unclamped":
|
|
1176
1157
|
return e;
|
|
1177
1158
|
default:
|
|
1178
|
-
return
|
|
1159
|
+
return O(e);
|
|
1179
1160
|
}
|
|
1180
1161
|
}
|
|
1181
1162
|
applyMap(e, t) {
|
|
@@ -1216,8 +1197,8 @@ class Dt {
|
|
|
1216
1197
|
for (const i of o) {
|
|
1217
1198
|
try {
|
|
1218
1199
|
i();
|
|
1219
|
-
} catch (
|
|
1220
|
-
|
|
1200
|
+
} catch (a) {
|
|
1201
|
+
ve.warn("Failed to cleanup listener", a);
|
|
1221
1202
|
}
|
|
1222
1203
|
this.globalCleanups.delete(i);
|
|
1223
1204
|
}
|
|
@@ -1262,16 +1243,16 @@ class Dt {
|
|
|
1262
1243
|
}
|
|
1263
1244
|
}
|
|
1264
1245
|
}
|
|
1265
|
-
const
|
|
1266
|
-
function
|
|
1267
|
-
const e =
|
|
1246
|
+
const Ke = new dr(), we = "ikon-ds";
|
|
1247
|
+
function fr(r) {
|
|
1248
|
+
const e = z(({ styleId: n, css: o, common: s }) => {
|
|
1268
1249
|
if (!n || typeof document > "u") return;
|
|
1269
|
-
let i = document.getElementById(
|
|
1270
|
-
i || (i = document.createElement("style"), i.id =
|
|
1271
|
-
}, []), t =
|
|
1272
|
-
typeof document < "u" && document.getElementById(
|
|
1250
|
+
let i = document.getElementById(we);
|
|
1251
|
+
i || (i = document.createElement("style"), i.id = we, document.head.appendChild(i)), o && (i.innerHTML += o), Ke.registerStyle(n, s);
|
|
1252
|
+
}, []), t = z(() => {
|
|
1253
|
+
typeof document < "u" && document.getElementById(we)?.remove(), Ke.reset();
|
|
1273
1254
|
}, []);
|
|
1274
|
-
return
|
|
1255
|
+
return $(() => {
|
|
1275
1256
|
if (!r) return;
|
|
1276
1257
|
for (const o of r.getUiStyles())
|
|
1277
1258
|
e(o);
|
|
@@ -1279,9 +1260,9 @@ function Fr(r) {
|
|
|
1279
1260
|
return () => {
|
|
1280
1261
|
n?.(), t();
|
|
1281
1262
|
};
|
|
1282
|
-
}, [r, t, e]),
|
|
1263
|
+
}, [r, t, e]), $(() => () => t(), [t]), { setStyle: e, reset: t };
|
|
1283
1264
|
}
|
|
1284
|
-
function
|
|
1265
|
+
function hr(r) {
|
|
1285
1266
|
const e = [];
|
|
1286
1267
|
for (const [t, n] of r) {
|
|
1287
1268
|
const o = n.store.getSnapshot(), s = o.rootViewId && o.views.has(o.rootViewId);
|
|
@@ -1289,62 +1270,62 @@ function qt(r) {
|
|
|
1289
1270
|
}
|
|
1290
1271
|
return e.sort(), e.join(",");
|
|
1291
1272
|
}
|
|
1292
|
-
function
|
|
1293
|
-
const [e, t] =
|
|
1294
|
-
return
|
|
1273
|
+
function mr(r) {
|
|
1274
|
+
const [e, t] = Y(), n = E("");
|
|
1275
|
+
return $(() => {
|
|
1295
1276
|
if (!r) {
|
|
1296
1277
|
t(void 0), n.current = "";
|
|
1297
1278
|
return;
|
|
1298
1279
|
}
|
|
1299
1280
|
const o = () => {
|
|
1300
|
-
const s = r.getStores(), i =
|
|
1281
|
+
const s = r.getStores(), i = hr(s);
|
|
1301
1282
|
i !== n.current && (n.current = i, t(s));
|
|
1302
1283
|
};
|
|
1303
1284
|
return o(), r.subscribe(o);
|
|
1304
1285
|
}, [r]), e;
|
|
1305
1286
|
}
|
|
1306
|
-
var
|
|
1307
|
-
function
|
|
1308
|
-
var e =
|
|
1287
|
+
var pr = typeof global == "object" && global && global.Object === Object && global, gr = typeof self == "object" && self && self.Object === Object && self, yr = pr || gr || Function("return this")(), ge = yr.Symbol, it = Object.prototype, Sr = it.hasOwnProperty, br = it.toString, ne = ge ? ge.toStringTag : void 0;
|
|
1288
|
+
function vr(r) {
|
|
1289
|
+
var e = Sr.call(r, ne), t = r[ne];
|
|
1309
1290
|
try {
|
|
1310
|
-
r[
|
|
1291
|
+
r[ne] = void 0;
|
|
1311
1292
|
var n = !0;
|
|
1312
1293
|
} catch {
|
|
1313
1294
|
}
|
|
1314
|
-
var o =
|
|
1315
|
-
return n && (e ? r[
|
|
1295
|
+
var o = br.call(r);
|
|
1296
|
+
return n && (e ? r[ne] = t : delete r[ne]), o;
|
|
1316
1297
|
}
|
|
1317
|
-
var
|
|
1318
|
-
function
|
|
1319
|
-
return
|
|
1298
|
+
var wr = Object.prototype, Er = wr.toString;
|
|
1299
|
+
function kr(r) {
|
|
1300
|
+
return Er.call(r);
|
|
1320
1301
|
}
|
|
1321
|
-
var
|
|
1322
|
-
function
|
|
1323
|
-
return r == null ? r === void 0 ?
|
|
1302
|
+
var Rr = "[object Null]", Ar = "[object Undefined]", Ge = ge ? ge.toStringTag : void 0;
|
|
1303
|
+
function Nr(r) {
|
|
1304
|
+
return r == null ? r === void 0 ? Ar : Rr : Ge && Ge in Object(r) ? vr(r) : kr(r);
|
|
1324
1305
|
}
|
|
1325
|
-
function
|
|
1306
|
+
function Cr(r) {
|
|
1326
1307
|
return r != null && typeof r == "object";
|
|
1327
1308
|
}
|
|
1328
|
-
var
|
|
1329
|
-
function
|
|
1330
|
-
return typeof r == "string" || !
|
|
1309
|
+
var Ir = Array.isArray, Tr = "[object String]";
|
|
1310
|
+
function jr(r) {
|
|
1311
|
+
return typeof r == "string" || !Ir(r) && Cr(r) && Nr(r) == Tr;
|
|
1331
1312
|
}
|
|
1332
|
-
const
|
|
1333
|
-
function
|
|
1313
|
+
const He = "ikonUiModules";
|
|
1314
|
+
function je(r) {
|
|
1334
1315
|
return typeof r == "object" && r !== null && !Array.isArray(r);
|
|
1335
1316
|
}
|
|
1336
|
-
function
|
|
1317
|
+
function Or(r) {
|
|
1337
1318
|
if (!Array.isArray(r))
|
|
1338
1319
|
return;
|
|
1339
1320
|
const e = /* @__PURE__ */ new Set();
|
|
1340
1321
|
for (const t of r) {
|
|
1341
|
-
if (!
|
|
1322
|
+
if (!jr(t)) continue;
|
|
1342
1323
|
const n = t.trim();
|
|
1343
1324
|
n && (e.has(n) || e.add(n));
|
|
1344
1325
|
}
|
|
1345
1326
|
return Array.from(e);
|
|
1346
1327
|
}
|
|
1347
|
-
function
|
|
1328
|
+
function gn(r, e) {
|
|
1348
1329
|
if (r === e)
|
|
1349
1330
|
return !0;
|
|
1350
1331
|
if (!r || !e)
|
|
@@ -1356,19 +1337,19 @@ function Br(r, e) {
|
|
|
1356
1337
|
return !1;
|
|
1357
1338
|
return !0;
|
|
1358
1339
|
}
|
|
1359
|
-
function
|
|
1360
|
-
if (!(!
|
|
1361
|
-
return
|
|
1340
|
+
function Pr(r) {
|
|
1341
|
+
if (!(!je(r) || !Object.prototype.hasOwnProperty.call(r, He)))
|
|
1342
|
+
return Or(r[He]);
|
|
1362
1343
|
}
|
|
1363
|
-
function
|
|
1344
|
+
function yn(...r) {
|
|
1364
1345
|
for (const e of r) {
|
|
1365
|
-
const t =
|
|
1346
|
+
const t = Pr(e);
|
|
1366
1347
|
if (t !== void 0)
|
|
1367
1348
|
return t;
|
|
1368
1349
|
}
|
|
1369
1350
|
}
|
|
1370
|
-
function
|
|
1371
|
-
if (!
|
|
1351
|
+
function Sn(r) {
|
|
1352
|
+
if (!je(r))
|
|
1372
1353
|
return;
|
|
1373
1354
|
const e = r, t = Object.keys(e).find((u) => u.toLowerCase() === "modules");
|
|
1374
1355
|
if (!t)
|
|
@@ -1381,44 +1362,44 @@ function Dr(r) {
|
|
|
1381
1362
|
const o = [], s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
|
|
1382
1363
|
for (const u of n) {
|
|
1383
1364
|
if (typeof u == "string") {
|
|
1384
|
-
const
|
|
1385
|
-
if (!
|
|
1365
|
+
const v = u.trim();
|
|
1366
|
+
if (!v || i.has(v))
|
|
1386
1367
|
continue;
|
|
1387
|
-
o.push(
|
|
1368
|
+
o.push(v), i.add(v);
|
|
1388
1369
|
continue;
|
|
1389
1370
|
}
|
|
1390
|
-
if (!
|
|
1371
|
+
if (!je(u))
|
|
1391
1372
|
continue;
|
|
1392
|
-
const d = u, l = Object.keys(d).find((
|
|
1373
|
+
const d = u, l = Object.keys(d).find((v) => v.toLowerCase() === "name");
|
|
1393
1374
|
if (!l)
|
|
1394
1375
|
continue;
|
|
1395
|
-
const
|
|
1396
|
-
if (typeof
|
|
1376
|
+
const f = d[l];
|
|
1377
|
+
if (typeof f != "string")
|
|
1397
1378
|
continue;
|
|
1398
|
-
const
|
|
1399
|
-
if (!
|
|
1379
|
+
const p = f.trim();
|
|
1380
|
+
if (!p)
|
|
1400
1381
|
continue;
|
|
1401
|
-
const
|
|
1402
|
-
typeof
|
|
1382
|
+
const k = Object.keys(d).find((v) => v.toLowerCase() === "javascript"), C = k ? d[k] : void 0;
|
|
1383
|
+
typeof C == "string" && s.set(p, C), i.has(p) || (o.push(p), i.add(p));
|
|
1403
1384
|
}
|
|
1404
1385
|
if (!o.length && s.size === 0)
|
|
1405
1386
|
return { modules: [] };
|
|
1406
|
-
const
|
|
1387
|
+
const a = Array.from(s.entries()).map(([u, d]) => ({
|
|
1407
1388
|
name: u,
|
|
1408
1389
|
javascript: d
|
|
1409
1390
|
}));
|
|
1410
|
-
return
|
|
1391
|
+
return a.length > 0 ? { modules: o, inlineModules: a } : { modules: o };
|
|
1411
1392
|
}
|
|
1412
|
-
const
|
|
1393
|
+
const y = {
|
|
1413
1394
|
None: 0,
|
|
1414
1395
|
Letter: 1,
|
|
1415
1396
|
Word: 2,
|
|
1416
1397
|
Line: 4,
|
|
1417
1398
|
Paragraph: 8,
|
|
1418
1399
|
Emoji: 16
|
|
1419
|
-
},
|
|
1400
|
+
}, _r = [
|
|
1420
1401
|
{
|
|
1421
|
-
flag:
|
|
1402
|
+
flag: y.Letter,
|
|
1422
1403
|
hints: [
|
|
1423
1404
|
"[data-motion-letter]",
|
|
1424
1405
|
"[data-letter]",
|
|
@@ -1427,7 +1408,7 @@ const g = {
|
|
|
1427
1408
|
]
|
|
1428
1409
|
},
|
|
1429
1410
|
{
|
|
1430
|
-
flag:
|
|
1411
|
+
flag: y.Word,
|
|
1431
1412
|
hints: [
|
|
1432
1413
|
"[data-motion-word]",
|
|
1433
1414
|
"[data-word]",
|
|
@@ -1436,7 +1417,7 @@ const g = {
|
|
|
1436
1417
|
]
|
|
1437
1418
|
},
|
|
1438
1419
|
{
|
|
1439
|
-
flag:
|
|
1420
|
+
flag: y.Line,
|
|
1440
1421
|
hints: [
|
|
1441
1422
|
"[data-motion-line]",
|
|
1442
1423
|
"[data-line]",
|
|
@@ -1445,7 +1426,7 @@ const g = {
|
|
|
1445
1426
|
]
|
|
1446
1427
|
},
|
|
1447
1428
|
{
|
|
1448
|
-
flag:
|
|
1429
|
+
flag: y.Paragraph,
|
|
1449
1430
|
hints: [
|
|
1450
1431
|
"[data-motion-paragraph]",
|
|
1451
1432
|
"[data-paragraph]",
|
|
@@ -1456,7 +1437,7 @@ const g = {
|
|
|
1456
1437
|
]
|
|
1457
1438
|
},
|
|
1458
1439
|
{
|
|
1459
|
-
flag:
|
|
1440
|
+
flag: y.Emoji,
|
|
1460
1441
|
hints: [
|
|
1461
1442
|
":is([data-motion-emoji],[data-emoji],.tw-motion-emoji,.tw-emoji)",
|
|
1462
1443
|
"[data-motion-emoji]",
|
|
@@ -1465,42 +1446,42 @@ const g = {
|
|
|
1465
1446
|
"[data-emoji]"
|
|
1466
1447
|
]
|
|
1467
1448
|
}
|
|
1468
|
-
],
|
|
1469
|
-
function
|
|
1470
|
-
if (!r || r.length >
|
|
1449
|
+
], Oe = y.Letter | y.Word | y.Line | y.Paragraph | y.Emoji, Mr = y.Letter | y.Word | y.Line | y.Paragraph, Xe = /* @__PURE__ */ new Map(), Lr = 16384;
|
|
1450
|
+
function bn(r, e) {
|
|
1451
|
+
if (!r || r.length > Lr)
|
|
1471
1452
|
return r;
|
|
1472
|
-
const t =
|
|
1473
|
-
if (o ===
|
|
1453
|
+
const t = Zr(e), n = K(t, y.Emoji), o = t & Mr;
|
|
1454
|
+
if (o === y.None && !n)
|
|
1474
1455
|
return r;
|
|
1475
1456
|
const s = r.replace(/\r\n/g, `
|
|
1476
1457
|
`).replace(/\r/g, `
|
|
1477
1458
|
`);
|
|
1478
|
-
if (o ===
|
|
1479
|
-
return
|
|
1480
|
-
const i =
|
|
1459
|
+
if (o === y.None)
|
|
1460
|
+
return tt(s);
|
|
1461
|
+
const i = Hr(s);
|
|
1481
1462
|
if (i.length === 0)
|
|
1482
|
-
return n ?
|
|
1483
|
-
const
|
|
1484
|
-
for (const l of
|
|
1485
|
-
const
|
|
1486
|
-
d.push(...
|
|
1463
|
+
return n ? tt(s) : r;
|
|
1464
|
+
const a = Xr(i), u = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, d = [];
|
|
1465
|
+
for (const l of a) {
|
|
1466
|
+
const f = Ur(l, t, u);
|
|
1467
|
+
d.push(...f);
|
|
1487
1468
|
}
|
|
1488
1469
|
return d;
|
|
1489
1470
|
}
|
|
1490
|
-
function
|
|
1471
|
+
function Ur(r, e, t) {
|
|
1491
1472
|
const n = [];
|
|
1492
1473
|
for (const o of r) {
|
|
1493
|
-
const s =
|
|
1474
|
+
const s = xr(o, e, t);
|
|
1494
1475
|
n.push(...s);
|
|
1495
1476
|
}
|
|
1496
|
-
if (
|
|
1477
|
+
if (K(e, y.Paragraph)) {
|
|
1497
1478
|
const o = t.paragraph++;
|
|
1498
1479
|
return [
|
|
1499
1480
|
/* @__PURE__ */ b.jsx(
|
|
1500
1481
|
"span",
|
|
1501
1482
|
{
|
|
1502
1483
|
"data-motion-paragraph": !0,
|
|
1503
|
-
style:
|
|
1484
|
+
style: Se(o),
|
|
1504
1485
|
children: n
|
|
1505
1486
|
},
|
|
1506
1487
|
`motion-paragraph-${o}`
|
|
@@ -1509,12 +1490,12 @@ function fr(r, e, t) {
|
|
|
1509
1490
|
}
|
|
1510
1491
|
return n;
|
|
1511
1492
|
}
|
|
1512
|
-
function
|
|
1513
|
-
const n =
|
|
1514
|
-
if (
|
|
1493
|
+
function xr(r, e, t) {
|
|
1494
|
+
const n = $r(r.text, e, t), o = [];
|
|
1495
|
+
if (K(e, y.Line)) {
|
|
1515
1496
|
const s = t.line++;
|
|
1516
1497
|
o.push(
|
|
1517
|
-
/* @__PURE__ */ b.jsx("span", { "data-motion-line": !0, style:
|
|
1498
|
+
/* @__PURE__ */ b.jsx("span", { "data-motion-line": !0, style: Se(s), children: n }, `motion-line-${s}`)
|
|
1518
1499
|
);
|
|
1519
1500
|
} else
|
|
1520
1501
|
o.push(...n);
|
|
@@ -1522,103 +1503,103 @@ function mr(r, e, t) {
|
|
|
1522
1503
|
o.push(/* @__PURE__ */ b.jsx("br", {}, `motion-break-${t.br++}`));
|
|
1523
1504
|
return o;
|
|
1524
1505
|
}
|
|
1525
|
-
function
|
|
1506
|
+
function $r(r, e, t) {
|
|
1526
1507
|
if (!r)
|
|
1527
1508
|
return [];
|
|
1528
|
-
const n =
|
|
1529
|
-
let i = 0,
|
|
1530
|
-
for (; (
|
|
1531
|
-
if (
|
|
1532
|
-
const u = r.slice(i,
|
|
1533
|
-
o.push(
|
|
1509
|
+
const n = K(e, y.Word), o = [], s = /(\s+)/g;
|
|
1510
|
+
let i = 0, a;
|
|
1511
|
+
for (; (a = s.exec(r)) !== null; ) {
|
|
1512
|
+
if (a.index > i) {
|
|
1513
|
+
const u = r.slice(i, a.index);
|
|
1514
|
+
o.push(Ze(u, t, e, n));
|
|
1534
1515
|
}
|
|
1535
|
-
o.push(
|
|
1516
|
+
o.push(a[0]), i = a.index + a[0].length;
|
|
1536
1517
|
}
|
|
1537
1518
|
if (i < r.length) {
|
|
1538
1519
|
const u = r.slice(i);
|
|
1539
|
-
o.push(
|
|
1520
|
+
o.push(Ze(u, t, e, n));
|
|
1540
1521
|
}
|
|
1541
1522
|
return o;
|
|
1542
1523
|
}
|
|
1543
|
-
function
|
|
1544
|
-
const o = e.word++, s =
|
|
1545
|
-
return n ? /* @__PURE__ */ b.jsx("span", { "data-motion-word": !0, style:
|
|
1524
|
+
function Ze(r, e, t, n) {
|
|
1525
|
+
const o = e.word++, s = Br(r, t, e), i = `motion-word-${o}`, a = Fr(o, n);
|
|
1526
|
+
return n ? /* @__PURE__ */ b.jsx("span", { "data-motion-word": !0, style: a, children: s }, i) : /* @__PURE__ */ b.jsx("span", { style: a, children: s }, i);
|
|
1546
1527
|
}
|
|
1547
|
-
function
|
|
1548
|
-
return e ? { ...
|
|
1528
|
+
function Fr(r, e) {
|
|
1529
|
+
return e ? { ...Se(r), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
|
|
1549
1530
|
}
|
|
1550
|
-
function
|
|
1531
|
+
function Br(r, e, t) {
|
|
1551
1532
|
if (!r)
|
|
1552
1533
|
return [];
|
|
1553
|
-
const n =
|
|
1534
|
+
const n = K(e, y.Letter), o = K(e, y.Emoji);
|
|
1554
1535
|
if (!n) {
|
|
1555
1536
|
if (!o)
|
|
1556
1537
|
return [r];
|
|
1557
|
-
const
|
|
1558
|
-
if (
|
|
1538
|
+
const a = Pe(r);
|
|
1539
|
+
if (a.length === 0)
|
|
1559
1540
|
return [r];
|
|
1560
|
-
const { nodes: u } =
|
|
1541
|
+
const { nodes: u } = ct(a, t);
|
|
1561
1542
|
return u;
|
|
1562
1543
|
}
|
|
1563
|
-
const s = [], i =
|
|
1564
|
-
for (const
|
|
1565
|
-
const u = t.letter++, d = `motion-letter-${u}`, l =
|
|
1566
|
-
if (
|
|
1544
|
+
const s = [], i = Pe(r);
|
|
1545
|
+
for (const a of i) {
|
|
1546
|
+
const u = t.letter++, d = `motion-letter-${u}`, l = Se(u);
|
|
1547
|
+
if (a === `
|
|
1567
1548
|
`) {
|
|
1568
1549
|
s.push(
|
|
1569
1550
|
/* @__PURE__ */ b.jsx("span", { "data-motion-letter": !0, style: l, children: /* @__PURE__ */ b.jsx("br", {}) }, d)
|
|
1570
1551
|
);
|
|
1571
1552
|
continue;
|
|
1572
1553
|
}
|
|
1573
|
-
const
|
|
1554
|
+
const p = o && at(a) ? { "data-motion-emoji": !0 } : void 0, k = a === " " ? " " : a;
|
|
1574
1555
|
s.push(
|
|
1575
|
-
/* @__PURE__ */ b.jsx("span", { "data-motion-letter": !0, style: l, ...
|
|
1556
|
+
/* @__PURE__ */ b.jsx("span", { "data-motion-letter": !0, style: l, ...p, children: k }, d)
|
|
1576
1557
|
);
|
|
1577
1558
|
}
|
|
1578
1559
|
return s;
|
|
1579
1560
|
}
|
|
1580
|
-
function
|
|
1561
|
+
function Pe(r) {
|
|
1581
1562
|
if (!r)
|
|
1582
1563
|
return [];
|
|
1583
|
-
const e =
|
|
1584
|
-
return e ? Array.from(e.segment(r), (t) => t.segment) :
|
|
1564
|
+
const e = Vr();
|
|
1565
|
+
return e ? Array.from(e.segment(r), (t) => t.segment) : zr(r);
|
|
1585
1566
|
}
|
|
1586
|
-
let
|
|
1587
|
-
function
|
|
1588
|
-
return
|
|
1567
|
+
let oe;
|
|
1568
|
+
function Vr() {
|
|
1569
|
+
return oe !== void 0 || (typeof Intl < "u" && typeof Intl.Segmenter == "function" ? oe = new Intl.Segmenter(void 0, { granularity: "grapheme" }) : oe = null), oe;
|
|
1589
1570
|
}
|
|
1590
|
-
function
|
|
1571
|
+
function zr(r) {
|
|
1591
1572
|
const e = [], t = Array.from(r);
|
|
1592
1573
|
let n = "";
|
|
1593
1574
|
for (let o = 0; o < t.length; o++) {
|
|
1594
1575
|
const s = t[o], i = t[o + 1];
|
|
1595
|
-
n += s, !(i &&
|
|
1576
|
+
n += s, !(i && Dr(s, i)) && (e.push(n), n = "");
|
|
1596
1577
|
}
|
|
1597
1578
|
return n && e.push(n), e;
|
|
1598
1579
|
}
|
|
1599
|
-
function
|
|
1600
|
-
return e ? !!(
|
|
1580
|
+
function Dr(r, e) {
|
|
1581
|
+
return e ? !!(Qe(r) || Qe(e) || Yr(e) || qr(e) || Wr(e) || et(r) && et(e)) : !1;
|
|
1601
1582
|
}
|
|
1602
|
-
function
|
|
1583
|
+
function Qe(r) {
|
|
1603
1584
|
return r.codePointAt(0) === 8205;
|
|
1604
1585
|
}
|
|
1605
|
-
function
|
|
1586
|
+
function qr(r) {
|
|
1606
1587
|
const e = r.codePointAt(0);
|
|
1607
1588
|
return e === void 0 ? !1 : e >= 65024 && e <= 65039 || e >= 917760 && e <= 917999;
|
|
1608
1589
|
}
|
|
1609
|
-
function
|
|
1590
|
+
function Wr(r) {
|
|
1610
1591
|
const e = r.codePointAt(0);
|
|
1611
1592
|
return e === void 0 ? !1 : e >= 127995 && e <= 127999;
|
|
1612
1593
|
}
|
|
1613
|
-
function
|
|
1594
|
+
function et(r) {
|
|
1614
1595
|
const e = r.codePointAt(0);
|
|
1615
1596
|
return e === void 0 ? !1 : e >= 127462 && e <= 127487;
|
|
1616
1597
|
}
|
|
1617
|
-
let
|
|
1618
|
-
function
|
|
1619
|
-
return r ? (
|
|
1598
|
+
let Ee;
|
|
1599
|
+
function Yr(r) {
|
|
1600
|
+
return r ? (Ee || (Ee = Jr()), Ee(r)) : !1;
|
|
1620
1601
|
}
|
|
1621
|
-
function
|
|
1602
|
+
function Jr() {
|
|
1622
1603
|
try {
|
|
1623
1604
|
const r = new RegExp("\\p{Mark}", "u");
|
|
1624
1605
|
return (e) => r.test(e);
|
|
@@ -1629,19 +1610,19 @@ function Rr() {
|
|
|
1629
1610
|
};
|
|
1630
1611
|
}
|
|
1631
1612
|
}
|
|
1632
|
-
let
|
|
1633
|
-
function
|
|
1634
|
-
return r ? (
|
|
1613
|
+
let ke;
|
|
1614
|
+
function at(r) {
|
|
1615
|
+
return r ? (ke || (ke = Kr()), ke(r)) : !1;
|
|
1635
1616
|
}
|
|
1636
|
-
function
|
|
1617
|
+
function Kr() {
|
|
1637
1618
|
try {
|
|
1638
1619
|
const r = new RegExp("\\p{Extended_Pictographic}", "u");
|
|
1639
1620
|
return (e) => r.test(e);
|
|
1640
1621
|
} catch {
|
|
1641
|
-
return
|
|
1622
|
+
return Gr;
|
|
1642
1623
|
}
|
|
1643
1624
|
}
|
|
1644
|
-
function
|
|
1625
|
+
function Gr(r) {
|
|
1645
1626
|
if (!r)
|
|
1646
1627
|
return !1;
|
|
1647
1628
|
for (const e of Array.from(r)) {
|
|
@@ -1651,7 +1632,7 @@ function Nr(r) {
|
|
|
1651
1632
|
}
|
|
1652
1633
|
return !1;
|
|
1653
1634
|
}
|
|
1654
|
-
function
|
|
1635
|
+
function Hr(r) {
|
|
1655
1636
|
const e = [];
|
|
1656
1637
|
let t = "", n = 0;
|
|
1657
1638
|
for (let o = 0; o < r.length; o++) {
|
|
@@ -1665,7 +1646,7 @@ function Tr(r) {
|
|
|
1665
1646
|
}
|
|
1666
1647
|
return (n > 0 || t.length > 0) && e.push({ text: t, breaks: n }), e;
|
|
1667
1648
|
}
|
|
1668
|
-
function
|
|
1649
|
+
function Xr(r) {
|
|
1669
1650
|
if (r.length === 0)
|
|
1670
1651
|
return [];
|
|
1671
1652
|
const e = [];
|
|
@@ -1674,10 +1655,10 @@ function Cr(r) {
|
|
|
1674
1655
|
t.push(n), n.breaks >= 2 && (e.push(t), t = []);
|
|
1675
1656
|
return t.length > 0 && e.push(t), e;
|
|
1676
1657
|
}
|
|
1677
|
-
function
|
|
1658
|
+
function K(r, e) {
|
|
1678
1659
|
return (r & e) === e;
|
|
1679
1660
|
}
|
|
1680
|
-
function
|
|
1661
|
+
function Se(r) {
|
|
1681
1662
|
return {
|
|
1682
1663
|
"--tw-motion-seq-index": r.toString(),
|
|
1683
1664
|
backgroundColor: "inherit",
|
|
@@ -1694,52 +1675,52 @@ function J(r) {
|
|
|
1694
1675
|
WebkitTextFillColor: "inherit"
|
|
1695
1676
|
};
|
|
1696
1677
|
}
|
|
1697
|
-
function
|
|
1678
|
+
function tt(r) {
|
|
1698
1679
|
if (!r)
|
|
1699
1680
|
return r;
|
|
1700
|
-
const e =
|
|
1681
|
+
const e = Pe(r);
|
|
1701
1682
|
if (e.length === 0)
|
|
1702
1683
|
return r;
|
|
1703
|
-
const { nodes: t, sawEmoji: n } =
|
|
1684
|
+
const { nodes: t, sawEmoji: n } = ct(e);
|
|
1704
1685
|
return n ? t.length === 1 ? t[0] ?? r : t : r;
|
|
1705
1686
|
}
|
|
1706
|
-
function
|
|
1687
|
+
function ct(r, e) {
|
|
1707
1688
|
const t = [];
|
|
1708
1689
|
let n = "", o = !1, s = e?.emoji ?? 0;
|
|
1709
1690
|
const i = () => {
|
|
1710
1691
|
n && (t.push(n), n = "");
|
|
1711
1692
|
};
|
|
1712
|
-
for (const
|
|
1713
|
-
if (
|
|
1693
|
+
for (const a of r) {
|
|
1694
|
+
if (at(a)) {
|
|
1714
1695
|
o = !0, i();
|
|
1715
1696
|
const d = `motion-emoji-${e ? e.emoji++ : s++}`;
|
|
1716
1697
|
t.push(
|
|
1717
|
-
/* @__PURE__ */ b.jsx("span", { "data-motion-emoji": !0, children:
|
|
1698
|
+
/* @__PURE__ */ b.jsx("span", { "data-motion-emoji": !0, children: a }, d)
|
|
1718
1699
|
);
|
|
1719
1700
|
continue;
|
|
1720
1701
|
}
|
|
1721
|
-
n +=
|
|
1702
|
+
n += a;
|
|
1722
1703
|
}
|
|
1723
1704
|
return i(), o ? { nodes: t, sawEmoji: !0 } : { nodes: [r.join("")], sawEmoji: !1 };
|
|
1724
1705
|
}
|
|
1725
|
-
function
|
|
1706
|
+
function Zr(r) {
|
|
1726
1707
|
if (!r)
|
|
1727
|
-
return
|
|
1708
|
+
return y.None;
|
|
1728
1709
|
const e = r.trim();
|
|
1729
1710
|
if (!e)
|
|
1730
|
-
return
|
|
1731
|
-
const t =
|
|
1711
|
+
return y.None;
|
|
1712
|
+
const t = Xe.get(e);
|
|
1732
1713
|
if (typeof t == "number")
|
|
1733
1714
|
return t;
|
|
1734
1715
|
if (typeof document > "u")
|
|
1735
|
-
return
|
|
1716
|
+
return y.None;
|
|
1736
1717
|
const n = e.split(/\s+/).filter(Boolean);
|
|
1737
1718
|
if (n.length === 0)
|
|
1738
|
-
return
|
|
1739
|
-
const s = n.map((u) => `.${
|
|
1740
|
-
(u) => new RegExp(`(^|[^a-zA-Z0-9_-])${
|
|
1719
|
+
return y.None;
|
|
1720
|
+
const s = n.map((u) => `.${Qr(u)}`).map(
|
|
1721
|
+
(u) => new RegExp(`(^|[^a-zA-Z0-9_-])${en(u)}(?![a-zA-Z0-9_-])`)
|
|
1741
1722
|
);
|
|
1742
|
-
let i =
|
|
1723
|
+
let i = y.None, a = !1;
|
|
1743
1724
|
for (const u of Array.from(document.styleSheets)) {
|
|
1744
1725
|
let d;
|
|
1745
1726
|
try {
|
|
@@ -1747,31 +1728,31 @@ function jr(r) {
|
|
|
1747
1728
|
} catch {
|
|
1748
1729
|
continue;
|
|
1749
1730
|
}
|
|
1750
|
-
const l =
|
|
1751
|
-
if (l.mask && (i |= l.mask, i ===
|
|
1731
|
+
const l = ut(d, s);
|
|
1732
|
+
if (l.mask && (i |= l.mask, i === Oe))
|
|
1752
1733
|
break;
|
|
1753
|
-
|
|
1734
|
+
a ||= l.sawStyleRule;
|
|
1754
1735
|
}
|
|
1755
|
-
return (i !==
|
|
1736
|
+
return (i !== y.None || a) && Xe.set(e, i), i;
|
|
1756
1737
|
}
|
|
1757
|
-
function
|
|
1738
|
+
function ut(r, e) {
|
|
1758
1739
|
if (!r)
|
|
1759
|
-
return { mask:
|
|
1760
|
-
let t =
|
|
1740
|
+
return { mask: y.None, sawStyleRule: !1 };
|
|
1741
|
+
let t = y.None, n = !1;
|
|
1761
1742
|
for (let o = 0; o < r.length; o++) {
|
|
1762
1743
|
const s = r[o];
|
|
1763
1744
|
if (s) {
|
|
1764
1745
|
if (s.type === CSSRule.STYLE_RULE) {
|
|
1765
|
-
const
|
|
1766
|
-
if (!
|
|
1746
|
+
const a = s.selectorText ?? "";
|
|
1747
|
+
if (!a || !e.some((d) => d.test(a))) continue;
|
|
1767
1748
|
n = !0;
|
|
1768
|
-
for (const d of
|
|
1769
|
-
d.hints.some((l) =>
|
|
1770
|
-
if (t ===
|
|
1749
|
+
for (const d of _r)
|
|
1750
|
+
d.hints.some((l) => a.includes(l)) && (t |= d.flag);
|
|
1751
|
+
if (t === Oe)
|
|
1771
1752
|
return { mask: t, sawStyleRule: !0 };
|
|
1772
1753
|
} else if ("cssRules" in s) {
|
|
1773
|
-
const i =
|
|
1774
|
-
if (i.mask && (t |= i.mask, t ===
|
|
1754
|
+
const i = ut(s.cssRules, e);
|
|
1755
|
+
if (i.mask && (t |= i.mask, t === Oe))
|
|
1775
1756
|
return { mask: t, sawStyleRule: !0 };
|
|
1776
1757
|
n ||= i.sawStyleRule;
|
|
1777
1758
|
}
|
|
@@ -1779,42 +1760,471 @@ function We(r, e) {
|
|
|
1779
1760
|
}
|
|
1780
1761
|
return { mask: t, sawStyleRule: n };
|
|
1781
1762
|
}
|
|
1782
|
-
function
|
|
1763
|
+
function Qr(r) {
|
|
1783
1764
|
return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(r) : r.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
|
|
1784
1765
|
}
|
|
1785
|
-
function
|
|
1766
|
+
function en(r) {
|
|
1786
1767
|
return r.replace(/[.*+?^${}()|[\]\\]/g, (e) => `\\${e}`);
|
|
1787
1768
|
}
|
|
1769
|
+
const Le = "ikon_auth_session", tn = 7 * 24 * 60 * 60 * 1e3;
|
|
1770
|
+
function lt(r) {
|
|
1771
|
+
try {
|
|
1772
|
+
localStorage.setItem(Le, JSON.stringify(r));
|
|
1773
|
+
} catch {
|
|
1774
|
+
console.warn("Failed to save auth session to localStorage");
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
function dt() {
|
|
1778
|
+
try {
|
|
1779
|
+
const r = localStorage.getItem(Le);
|
|
1780
|
+
if (!r) return null;
|
|
1781
|
+
const e = JSON.parse(r);
|
|
1782
|
+
return Date.now() - e.authenticatedAt > tn ? (ft(), null) : e;
|
|
1783
|
+
} catch {
|
|
1784
|
+
return console.warn("Failed to load auth session from localStorage"), null;
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1787
|
+
function ft() {
|
|
1788
|
+
try {
|
|
1789
|
+
localStorage.removeItem(Le);
|
|
1790
|
+
} catch {
|
|
1791
|
+
console.warn("Failed to clear auth session from localStorage");
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
function Re(r) {
|
|
1795
|
+
return {
|
|
1796
|
+
id: "",
|
|
1797
|
+
provider: r.provider,
|
|
1798
|
+
token: r.token,
|
|
1799
|
+
authenticatedAt: r.authenticatedAt
|
|
1800
|
+
};
|
|
1801
|
+
}
|
|
1802
|
+
async function ht(r, e) {
|
|
1803
|
+
const t = me(), n = await fetch(`${e}/anonymous`, {
|
|
1804
|
+
method: "POST",
|
|
1805
|
+
headers: { "Content-Type": "application/json" },
|
|
1806
|
+
body: JSON.stringify({ deviceId: t, space: r })
|
|
1807
|
+
});
|
|
1808
|
+
if (!n.ok) {
|
|
1809
|
+
const i = await n.text().catch(() => "Unknown error");
|
|
1810
|
+
throw new Error(`Anonymous auth failed: ${n.status} ${i}`);
|
|
1811
|
+
}
|
|
1812
|
+
const { token: o } = await n.json(), s = {
|
|
1813
|
+
token: o,
|
|
1814
|
+
provider: "anonymous",
|
|
1815
|
+
authenticatedAt: Date.now()
|
|
1816
|
+
};
|
|
1817
|
+
return lt(s), s;
|
|
1818
|
+
}
|
|
1819
|
+
async function vn(r) {
|
|
1820
|
+
const { email: e, spaceId: t, authUrl: n, returnUrl: o = window.location.origin + window.location.pathname } = r, s = await fetch(`${n}/email/send`, {
|
|
1821
|
+
method: "POST",
|
|
1822
|
+
headers: { "Content-Type": "application/json" },
|
|
1823
|
+
body: JSON.stringify({
|
|
1824
|
+
email: e.trim(),
|
|
1825
|
+
space: t,
|
|
1826
|
+
return: o
|
|
1827
|
+
})
|
|
1828
|
+
});
|
|
1829
|
+
if (!s.ok) {
|
|
1830
|
+
const i = await s.text().catch(() => "Failed to send email");
|
|
1831
|
+
throw new Error(i);
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
function rn() {
|
|
1835
|
+
const r = new URLSearchParams(window.location.search), e = r.get("ikon_token"), t = r.get("ikon_provider");
|
|
1836
|
+
return e && t ? { token: e, provider: t } : null;
|
|
1837
|
+
}
|
|
1838
|
+
function nn() {
|
|
1839
|
+
const e = new URLSearchParams(window.location.search).get("error");
|
|
1840
|
+
return e ? decodeURIComponent(e) : null;
|
|
1841
|
+
}
|
|
1842
|
+
function rt() {
|
|
1843
|
+
window.history.replaceState({}, "", window.location.pathname);
|
|
1844
|
+
}
|
|
1845
|
+
function on(r, e, t, n) {
|
|
1846
|
+
const o = n ?? window.location.origin + window.location.pathname + window.location.search;
|
|
1847
|
+
return `${t}/oauth/${r}?space=${encodeURIComponent(e)}&return=${encodeURIComponent(o)}`;
|
|
1848
|
+
}
|
|
1849
|
+
const Ue = nt(null);
|
|
1850
|
+
function wn({ children: r, config: e }) {
|
|
1851
|
+
const [t, n] = Y({
|
|
1852
|
+
isAuthenticated: !1,
|
|
1853
|
+
isLoading: !0,
|
|
1854
|
+
user: null,
|
|
1855
|
+
error: null
|
|
1856
|
+
});
|
|
1857
|
+
$(() => {
|
|
1858
|
+
(() => {
|
|
1859
|
+
const d = nn();
|
|
1860
|
+
if (d) {
|
|
1861
|
+
rt(), n({
|
|
1862
|
+
isAuthenticated: !1,
|
|
1863
|
+
isLoading: !1,
|
|
1864
|
+
user: null,
|
|
1865
|
+
error: d
|
|
1866
|
+
});
|
|
1867
|
+
return;
|
|
1868
|
+
}
|
|
1869
|
+
const l = rn();
|
|
1870
|
+
if (l) {
|
|
1871
|
+
const p = {
|
|
1872
|
+
token: l.token,
|
|
1873
|
+
provider: l.provider,
|
|
1874
|
+
authenticatedAt: Date.now()
|
|
1875
|
+
};
|
|
1876
|
+
lt(p), rt(), n({
|
|
1877
|
+
isAuthenticated: !0,
|
|
1878
|
+
isLoading: !1,
|
|
1879
|
+
user: Re(p),
|
|
1880
|
+
error: null
|
|
1881
|
+
});
|
|
1882
|
+
return;
|
|
1883
|
+
}
|
|
1884
|
+
const f = dt();
|
|
1885
|
+
if (f) {
|
|
1886
|
+
n({
|
|
1887
|
+
isAuthenticated: !0,
|
|
1888
|
+
isLoading: !1,
|
|
1889
|
+
user: Re(f),
|
|
1890
|
+
error: null
|
|
1891
|
+
});
|
|
1892
|
+
return;
|
|
1893
|
+
}
|
|
1894
|
+
n({
|
|
1895
|
+
isAuthenticated: !1,
|
|
1896
|
+
isLoading: !1,
|
|
1897
|
+
user: null,
|
|
1898
|
+
error: null
|
|
1899
|
+
});
|
|
1900
|
+
})();
|
|
1901
|
+
}, []);
|
|
1902
|
+
const o = z(
|
|
1903
|
+
async (u) => {
|
|
1904
|
+
if (!e.spaceId) {
|
|
1905
|
+
n((f) => ({
|
|
1906
|
+
...f,
|
|
1907
|
+
error: "Space ID is not configured"
|
|
1908
|
+
}));
|
|
1909
|
+
return;
|
|
1910
|
+
}
|
|
1911
|
+
if (u === "guest") {
|
|
1912
|
+
n((f) => ({ ...f, isLoading: !0 }));
|
|
1913
|
+
try {
|
|
1914
|
+
const f = e.authUrl ?? Ne(), p = await ht(e.spaceId, f);
|
|
1915
|
+
n({
|
|
1916
|
+
isAuthenticated: !0,
|
|
1917
|
+
isLoading: !1,
|
|
1918
|
+
user: Re(p),
|
|
1919
|
+
error: null
|
|
1920
|
+
});
|
|
1921
|
+
} catch (f) {
|
|
1922
|
+
n((p) => ({
|
|
1923
|
+
...p,
|
|
1924
|
+
isLoading: !1,
|
|
1925
|
+
error: f instanceof Error ? f.message : "Guest login failed"
|
|
1926
|
+
}));
|
|
1927
|
+
}
|
|
1928
|
+
return;
|
|
1929
|
+
}
|
|
1930
|
+
const d = e.authUrl ?? Ne(), l = on(u, e.spaceId, d);
|
|
1931
|
+
window.location.href = l;
|
|
1932
|
+
},
|
|
1933
|
+
[e.authUrl, e.spaceId]
|
|
1934
|
+
), s = z(() => {
|
|
1935
|
+
ft(), n({
|
|
1936
|
+
isAuthenticated: !1,
|
|
1937
|
+
isLoading: !1,
|
|
1938
|
+
user: null,
|
|
1939
|
+
error: null
|
|
1940
|
+
});
|
|
1941
|
+
}, []), i = z(() => t.user?.token ?? null, [t.user]), a = L(
|
|
1942
|
+
() => ({
|
|
1943
|
+
state: t,
|
|
1944
|
+
login: o,
|
|
1945
|
+
logout: s,
|
|
1946
|
+
getToken: i
|
|
1947
|
+
}),
|
|
1948
|
+
[t, o, s, i]
|
|
1949
|
+
);
|
|
1950
|
+
return /* @__PURE__ */ b.jsx(Ue, { value: a, children: r });
|
|
1951
|
+
}
|
|
1952
|
+
function sn() {
|
|
1953
|
+
const r = Me(Ue);
|
|
1954
|
+
if (!r)
|
|
1955
|
+
throw new Error("useAuth must be used within an AuthProvider");
|
|
1956
|
+
return r;
|
|
1957
|
+
}
|
|
1958
|
+
function En() {
|
|
1959
|
+
return Me(Ue);
|
|
1960
|
+
}
|
|
1961
|
+
function kn(r) {
|
|
1962
|
+
const { config: e, guestUrlParam: t } = r, { state: n, login: o } = sn(), s = E(!1);
|
|
1963
|
+
return $(() => {
|
|
1964
|
+
if (!t || n.isAuthenticated || n.isLoading || s.current || !e.methods.includes("guest"))
|
|
1965
|
+
return;
|
|
1966
|
+
const i = new URLSearchParams(window.location.search), a = i.get(t);
|
|
1967
|
+
if (a === "true" || a === "1" || a === "") {
|
|
1968
|
+
i.delete(t);
|
|
1969
|
+
const u = i.toString(), d = window.location.pathname + (u ? `?${u}` : "");
|
|
1970
|
+
window.history.replaceState({}, "", d), s.current = !0, o("guest");
|
|
1971
|
+
}
|
|
1972
|
+
}, [t, n.isAuthenticated, n.isLoading, e.methods, o]), {
|
|
1973
|
+
shouldRenderChildren: n.isAuthenticated,
|
|
1974
|
+
isCheckingAuth: n.isLoading,
|
|
1975
|
+
isAuthenticated: n.isAuthenticated,
|
|
1976
|
+
error: n.error
|
|
1977
|
+
};
|
|
1978
|
+
}
|
|
1979
|
+
function Rn({
|
|
1980
|
+
connectionState: r,
|
|
1981
|
+
error: e,
|
|
1982
|
+
isReady: t,
|
|
1983
|
+
stores: n,
|
|
1984
|
+
registry: o,
|
|
1985
|
+
client: s,
|
|
1986
|
+
onAction: i,
|
|
1987
|
+
renderIdle: a,
|
|
1988
|
+
renderConnecting: u,
|
|
1989
|
+
renderConnectingSlow: d,
|
|
1990
|
+
renderConnected: l,
|
|
1991
|
+
renderOffline: f,
|
|
1992
|
+
renderError: p
|
|
1993
|
+
}) {
|
|
1994
|
+
switch (r) {
|
|
1995
|
+
case "idle":
|
|
1996
|
+
return a();
|
|
1997
|
+
case "connecting":
|
|
1998
|
+
return u();
|
|
1999
|
+
case "connectingSlow":
|
|
2000
|
+
return d();
|
|
2001
|
+
case "connected":
|
|
2002
|
+
case "reconnecting":
|
|
2003
|
+
return !t || !n || !o ? null : l({
|
|
2004
|
+
stores: n,
|
|
2005
|
+
registry: o,
|
|
2006
|
+
client: s,
|
|
2007
|
+
onAction: i,
|
|
2008
|
+
isReconnecting: r === "reconnecting"
|
|
2009
|
+
});
|
|
2010
|
+
case "offline":
|
|
2011
|
+
return f();
|
|
2012
|
+
case "offlineError":
|
|
2013
|
+
return p(e ?? s?.lastError?.message ?? null);
|
|
2014
|
+
default:
|
|
2015
|
+
return null;
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
const Ae = ye("useIkonApp");
|
|
2019
|
+
function An(r) {
|
|
2020
|
+
const { authConfig: e, localServer: t, modules: n, registerModules: o, onJoined: s, onConnectionStateChange: i, onError: a, updateUrlOnJoin: u = !0, timeouts: d, audio: l, video: f, mediaSession: p, debug: k } = r, C = E(null), v = E(null), m = E(null), g = E(!1), w = E(l), P = E(f), T = E(p), x = E(k), D = E(d), ae = E(i), H = E(a), ce = E(s), ue = E(u);
|
|
2021
|
+
w.current = l, P.current = f, T.current = p, x.current = k, D.current = d, ae.current = i, H.current = a, ce.current = s, ue.current = u;
|
|
2022
|
+
const [q, le] = Y("idle"), [be, J] = Y(null), [X, de] = Y(null), [B, fe] = Y(null), [Z, c] = Y(!1), h = L(() => {
|
|
2023
|
+
try {
|
|
2024
|
+
return bt();
|
|
2025
|
+
} catch {
|
|
2026
|
+
return { parameters: {} };
|
|
2027
|
+
}
|
|
2028
|
+
}, []), S = L(() => e?.enabled ? dt() : null, [e?.enabled]), R = t?.enabled ?? !1, M = t?.host ?? "localhost", j = t?.httpsPort ?? 8443;
|
|
2029
|
+
$(() => {
|
|
2030
|
+
!R && xe() && e && !e.enabled && e.spaceId && !B && !Z && (c(!0), ht(e.spaceId, e.authUrl ?? Ne()).then((I) => {
|
|
2031
|
+
fe(I.token);
|
|
2032
|
+
}).catch((I) => {
|
|
2033
|
+
Ae.error("Anonymous auth failed:", I), J(I instanceof Error ? I.message : "Anonymous auth failed");
|
|
2034
|
+
}).finally(() => {
|
|
2035
|
+
c(!1);
|
|
2036
|
+
}));
|
|
2037
|
+
}, [R, e, B, Z]);
|
|
2038
|
+
const W = L(() => {
|
|
2039
|
+
if (R) {
|
|
2040
|
+
const N = S?.token ? vt(S.token) ?? me() : me();
|
|
2041
|
+
return {
|
|
2042
|
+
local: {
|
|
2043
|
+
host: M,
|
|
2044
|
+
httpsPort: j,
|
|
2045
|
+
userId: N
|
|
2046
|
+
}
|
|
2047
|
+
};
|
|
2048
|
+
}
|
|
2049
|
+
return S?.token && e?.spaceId ? {
|
|
2050
|
+
sessionToken: {
|
|
2051
|
+
token: S.token,
|
|
2052
|
+
spaceId: e.spaceId,
|
|
2053
|
+
backendType: $e(),
|
|
2054
|
+
sessionId: h.sessionId,
|
|
2055
|
+
channelKey: h.channelKey,
|
|
2056
|
+
parameters: h.parameters
|
|
2057
|
+
}
|
|
2058
|
+
} : B && e?.spaceId ? {
|
|
2059
|
+
sessionToken: {
|
|
2060
|
+
token: B,
|
|
2061
|
+
spaceId: e.spaceId,
|
|
2062
|
+
backendType: $e(),
|
|
2063
|
+
sessionId: h.sessionId,
|
|
2064
|
+
channelKey: h.channelKey,
|
|
2065
|
+
parameters: h.parameters
|
|
2066
|
+
}
|
|
2067
|
+
} : xe() ? null : {
|
|
2068
|
+
local: {
|
|
2069
|
+
host: M,
|
|
2070
|
+
httpsPort: j,
|
|
2071
|
+
userId: me()
|
|
2072
|
+
}
|
|
2073
|
+
};
|
|
2074
|
+
}, [R, M, j, S?.token, e?.spaceId, B, h.sessionId, h.channelKey, h.parameters]);
|
|
2075
|
+
fr(X);
|
|
2076
|
+
const Q = mr(X);
|
|
2077
|
+
$(() => {
|
|
2078
|
+
if (!g.current) {
|
|
2079
|
+
if (g.current = !0, m.current = or(), n)
|
|
2080
|
+
for (const N of n)
|
|
2081
|
+
N(m.current);
|
|
2082
|
+
o?.(m.current), m.current.loadRegisteredModules().catch((N) => {
|
|
2083
|
+
Ae.error("Failed to load UI modules", N);
|
|
2084
|
+
});
|
|
2085
|
+
}
|
|
2086
|
+
}, []), $(() => {
|
|
2087
|
+
if (!W) return;
|
|
2088
|
+
const N = new wt({
|
|
2089
|
+
...W,
|
|
2090
|
+
debug: x.current,
|
|
2091
|
+
timeouts: D.current,
|
|
2092
|
+
audio: w.current,
|
|
2093
|
+
video: P.current,
|
|
2094
|
+
mediaSession: T.current,
|
|
2095
|
+
onConnectionStateChange: (_) => {
|
|
2096
|
+
le(_), ae.current?.(_);
|
|
2097
|
+
},
|
|
2098
|
+
onError: (_) => {
|
|
2099
|
+
J(_.message), H.current?.(_);
|
|
2100
|
+
},
|
|
2101
|
+
onJoined: () => {
|
|
2102
|
+
const _ = N.globalState?.SessionId;
|
|
2103
|
+
ue.current && _ && window.history.replaceState(null, "", `/s/${_}${window.location.search}`), ce.current?.(_);
|
|
2104
|
+
}
|
|
2105
|
+
});
|
|
2106
|
+
C.current = N;
|
|
2107
|
+
const I = new xt({ client: N });
|
|
2108
|
+
return v.current = I, de(I), N.connect().catch((_) => {
|
|
2109
|
+
Ae.error("Connection failed:", _);
|
|
2110
|
+
}), () => {
|
|
2111
|
+
N.disconnect(), C.current = null, I.dispose(), v.current = null;
|
|
2112
|
+
};
|
|
2113
|
+
}, [W]);
|
|
2114
|
+
const A = z((N, I) => {
|
|
2115
|
+
const _ = typeof I == "string" ? I : JSON.stringify(I ?? {});
|
|
2116
|
+
C.current?.sendActionCall(N, _);
|
|
2117
|
+
}, []), V = q === "connected" || q === "reconnecting";
|
|
2118
|
+
return {
|
|
2119
|
+
connectionState: q,
|
|
2120
|
+
error: be,
|
|
2121
|
+
stores: Q,
|
|
2122
|
+
client: C.current,
|
|
2123
|
+
registry: m.current,
|
|
2124
|
+
clientRef: C,
|
|
2125
|
+
uiRef: v,
|
|
2126
|
+
registryRef: m,
|
|
2127
|
+
onAction: A,
|
|
2128
|
+
isReady: V
|
|
2129
|
+
};
|
|
2130
|
+
}
|
|
2131
|
+
function Nn(r) {
|
|
2132
|
+
const e = E(!1);
|
|
2133
|
+
return z(() => {
|
|
2134
|
+
if (e.current) return;
|
|
2135
|
+
e.current = !0;
|
|
2136
|
+
const t = document.createElement("link");
|
|
2137
|
+
t.rel = "stylesheet", t.href = r, document.head.appendChild(t);
|
|
2138
|
+
}, [r]);
|
|
2139
|
+
}
|
|
2140
|
+
const mt = nt(null);
|
|
2141
|
+
function an(r, e) {
|
|
2142
|
+
return e ? r.replace(/\{(\w+)\}/g, (t, n) => e[n] ?? `{${n}}`) : r;
|
|
2143
|
+
}
|
|
2144
|
+
function cn(r, e) {
|
|
2145
|
+
const n = new URLSearchParams(window.location.search).get("lang");
|
|
2146
|
+
if (n && r.includes(n))
|
|
2147
|
+
return n;
|
|
2148
|
+
const o = navigator.language.split("-")[0];
|
|
2149
|
+
return r.includes(o) ? o : e && r.includes(e) ? e : "en";
|
|
2150
|
+
}
|
|
2151
|
+
function un(r, e, t) {
|
|
2152
|
+
return e ? cn(r, t) : t && r.includes(t) ? t : "en";
|
|
2153
|
+
}
|
|
2154
|
+
function Cn({
|
|
2155
|
+
children: r,
|
|
2156
|
+
translations: e,
|
|
2157
|
+
defaultLanguage: t,
|
|
2158
|
+
detectLanguage: n = !1
|
|
2159
|
+
}) {
|
|
2160
|
+
const o = Object.keys(e), s = un(o, n, t), i = e[s] ?? e.en, a = L(
|
|
2161
|
+
() => ({
|
|
2162
|
+
t: (u, d) => {
|
|
2163
|
+
const l = i[u];
|
|
2164
|
+
return an(l, d);
|
|
2165
|
+
},
|
|
2166
|
+
locale: s,
|
|
2167
|
+
translations: i
|
|
2168
|
+
}),
|
|
2169
|
+
[i, s]
|
|
2170
|
+
);
|
|
2171
|
+
return /* @__PURE__ */ b.jsx(mt, { value: a, children: r });
|
|
2172
|
+
}
|
|
2173
|
+
function In() {
|
|
2174
|
+
const r = Me(mt);
|
|
2175
|
+
if (!r)
|
|
2176
|
+
throw new Error("useI18n must be used within an I18nProvider");
|
|
2177
|
+
return r;
|
|
2178
|
+
}
|
|
1788
2179
|
export {
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
2180
|
+
wn as AuthProvider,
|
|
2181
|
+
Rn as ConnectionStateRenderer,
|
|
2182
|
+
Cn as I18nProvider,
|
|
2183
|
+
Yt as IKON_UI_BASE_MODULE,
|
|
2184
|
+
er as IKON_UI_MEDIA_MODULE,
|
|
2185
|
+
Ie as IKON_UI_STREAM_CATEGORY,
|
|
2186
|
+
Gt as IKON_UI_VIDEO_CANVAS_TYPE,
|
|
2187
|
+
Ht as IKON_UI_VIDEO_URL_PLAYER_TYPE,
|
|
2188
|
+
xt as IkonUi,
|
|
2189
|
+
nr as IkonUiRegistry,
|
|
2190
|
+
pn as IkonUiSurface,
|
|
2191
|
+
Lt as UiComponentRegistry,
|
|
2192
|
+
Mt as UiRenderer,
|
|
2193
|
+
On as UiStreamStore,
|
|
2194
|
+
gn as areIkonUiModuleListsEqual,
|
|
2195
|
+
ht as authenticateAnonymous,
|
|
2196
|
+
on as buildOAuthRedirectUrl,
|
|
2197
|
+
ft as clearAuthSession,
|
|
2198
|
+
rt as clearOAuthParams,
|
|
2199
|
+
Wt as createBaseResolvers,
|
|
2200
|
+
hn as createComponentLibrary,
|
|
2201
|
+
or as createIkonUiRegistry,
|
|
2202
|
+
Zt as createMediaResolvers,
|
|
2203
|
+
Ut as isIkonUiCategoryMatch,
|
|
2204
|
+
dt as loadAuthSession,
|
|
2205
|
+
Jt as loadBaseModule,
|
|
2206
|
+
tr as loadMediaModule,
|
|
2207
|
+
Or as normalizeIkonUiModuleList,
|
|
2208
|
+
Sn as parseIkonUiInitPayload,
|
|
2209
|
+
rn as parseOAuthCallback,
|
|
2210
|
+
nn as parseOAuthError,
|
|
2211
|
+
Pr as readIkonUiModules,
|
|
2212
|
+
yn as readIkonUiModulesFromSources,
|
|
2213
|
+
Kt as registerBaseModule,
|
|
2214
|
+
rr as registerMediaModule,
|
|
2215
|
+
Pt as renderChildren,
|
|
2216
|
+
bn as renderMotionLetters,
|
|
2217
|
+
lt as saveAuthSession,
|
|
2218
|
+
vn as sendMagicLink,
|
|
2219
|
+
Re as sessionToUser,
|
|
2220
|
+
sn as useAuth,
|
|
2221
|
+
kn as useAuthGuard,
|
|
2222
|
+
En as useAuthOptional,
|
|
2223
|
+
In as useI18n,
|
|
2224
|
+
An as useIkonApp,
|
|
2225
|
+
fr as useIkonStyles,
|
|
2226
|
+
mr as useIkonUiStores,
|
|
2227
|
+
Nn as useLazyFont,
|
|
2228
|
+
F as useUiNode,
|
|
2229
|
+
mn as useUiStore
|
|
1820
2230
|
};
|