@ikonai/sdk-react-ui 0.0.36 → 0.0.38
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/index.d.ts +2 -2
- package/app/{useIkonApp.d.ts → use-ikon-app.d.ts} +14 -4
- package/auth/index.d.ts +2 -2
- package/hooks/index.d.ts +1 -1
- package/index.js +603 -601
- package/package.json +1 -1
- /package/app/{ConnectionStateRenderer.d.ts → connection-state-renderer.d.ts} +0 -0
- /package/auth/{AuthContext.d.ts → auth-context.d.ts} +0 -0
- /package/auth/{useAuthGuard.d.ts → use-auth-guard.d.ts} +0 -0
- /package/hooks/{useLazyFont.d.ts → use-lazy-font.d.ts} +0 -0
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,10 +12,10 @@ var le = { exports: {} }, ee = {};
|
|
|
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;
|
|
@@ -44,47 +44,47 @@ var te = {};
|
|
|
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
|
|
47
|
+
var Be;
|
|
48
|
+
function kt() {
|
|
49
|
+
return Be || (Be = 1, process.env.NODE_ENV !== "production" && function() {
|
|
50
50
|
function r(c) {
|
|
51
51
|
if (c == null) return null;
|
|
52
52
|
if (typeof c == "function")
|
|
53
|
-
return c.$$typeof ===
|
|
53
|
+
return c.$$typeof === ue ? null : c.displayName || c.name || null;
|
|
54
54
|
if (typeof c == "string") return c;
|
|
55
55
|
switch (c) {
|
|
56
56
|
case v:
|
|
57
57
|
return "Fragment";
|
|
58
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
69
|
if (typeof c == "object")
|
|
70
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
72
|
), c.$$typeof) {
|
|
73
|
-
case
|
|
73
|
+
case C:
|
|
74
74
|
return "Portal";
|
|
75
|
-
case
|
|
75
|
+
case P:
|
|
76
76
|
return (c.displayName || "Context") + ".Provider";
|
|
77
|
-
case
|
|
77
|
+
case w:
|
|
78
78
|
return (c._context.displayName || "Context") + ".Consumer";
|
|
79
79
|
case T:
|
|
80
|
-
var
|
|
81
|
-
return c = c.displayName, c || (c =
|
|
82
|
-
case H:
|
|
83
|
-
return m = c.displayName || null, m !== null ? m : r(c.type) || "Memo";
|
|
80
|
+
var h = c.render;
|
|
81
|
+
return c = c.displayName, c || (c = h.displayName || h.name || "", c = c !== "" ? "ForwardRef(" + c + ")" : "ForwardRef"), c;
|
|
84
82
|
case ae:
|
|
85
|
-
|
|
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(c(
|
|
87
|
+
return r(c(h));
|
|
88
88
|
} catch {
|
|
89
89
|
}
|
|
90
90
|
}
|
|
@@ -96,71 +96,71 @@ function Et() {
|
|
|
96
96
|
function t(c) {
|
|
97
97
|
try {
|
|
98
98
|
e(c);
|
|
99
|
-
var
|
|
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
110
|
), e(c);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
function n(c) {
|
|
114
114
|
if (c === v) return "<>";
|
|
115
|
-
if (typeof c == "object" && c !== null && c.$$typeof ===
|
|
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 c =
|
|
125
|
+
var c = q.A;
|
|
126
126
|
return c === null ? null : c.getOwner();
|
|
127
127
|
}
|
|
128
128
|
function s() {
|
|
129
129
|
return Error("react-stack-top-frame");
|
|
130
130
|
}
|
|
131
131
|
function i(c) {
|
|
132
|
-
if (
|
|
133
|
-
var
|
|
134
|
-
if (
|
|
132
|
+
if (le.call(c, "key")) {
|
|
133
|
+
var h = Object.getOwnPropertyDescriptor(c, "key").get;
|
|
134
|
+
if (h && h.isReactWarning) return !1;
|
|
135
135
|
}
|
|
136
136
|
return c.key !== void 0;
|
|
137
137
|
}
|
|
138
|
-
function a(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
151
|
var c = r(this.type);
|
|
152
|
-
return
|
|
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(c,
|
|
157
|
-
return
|
|
156
|
+
function d(c, h, S, R, M, j, W, Q) {
|
|
157
|
+
return S = j.ref, c = {
|
|
158
158
|
$$typeof: k,
|
|
159
159
|
type: c,
|
|
160
|
-
key:
|
|
161
|
-
props:
|
|
162
|
-
_owner:
|
|
163
|
-
}, (
|
|
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
166
|
}) : Object.defineProperty(c, "ref", { enumerable: !1, value: null }), c._store = {}, Object.defineProperty(c._store, "validated", {
|
|
@@ -177,113 +177,113 @@ function Et() {
|
|
|
177
177
|
configurable: !1,
|
|
178
178
|
enumerable: !1,
|
|
179
179
|
writable: !0,
|
|
180
|
-
value:
|
|
180
|
+
value: W
|
|
181
181
|
}), Object.defineProperty(c, "_debugTask", {
|
|
182
182
|
configurable: !1,
|
|
183
183
|
enumerable: !1,
|
|
184
184
|
writable: !0,
|
|
185
|
-
value:
|
|
185
|
+
value: Q
|
|
186
186
|
}), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
|
|
187
187
|
}
|
|
188
|
-
function l(c,
|
|
189
|
-
var
|
|
190
|
-
if (
|
|
191
|
-
if (
|
|
192
|
-
if (
|
|
193
|
-
for (
|
|
194
|
-
f(
|
|
195
|
-
Object.freeze && Object.freeze(
|
|
188
|
+
function l(c, h, S, R, M, j, W, Q) {
|
|
189
|
+
var A = h.children;
|
|
190
|
+
if (A !== void 0)
|
|
191
|
+
if (R)
|
|
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 f(
|
|
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
|
-
|
|
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} />
|
|
210
210
|
React keys must be passed directly to JSX without using spread:
|
|
211
211
|
let props = %s;
|
|
212
212
|
<%s key={someKey} {...props} />`,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
),
|
|
213
|
+
R,
|
|
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
|
-
|
|
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
226
|
typeof c == "function" ? c.displayName || c.name || "Unknown" : c
|
|
227
227
|
), d(
|
|
228
228
|
c,
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
229
|
+
A,
|
|
230
|
+
j,
|
|
231
|
+
M,
|
|
232
232
|
o(),
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
233
|
+
S,
|
|
234
|
+
W,
|
|
235
|
+
Q
|
|
236
236
|
);
|
|
237
237
|
}
|
|
238
238
|
function f(c) {
|
|
239
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
|
-
|
|
244
|
+
p = {
|
|
245
245
|
"react-stack-bottom-frame": function(c) {
|
|
246
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
|
-
te.Fragment = v, te.jsx = function(c,
|
|
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
256
|
c,
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
h,
|
|
258
|
+
S,
|
|
259
259
|
!1,
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
260
|
+
R,
|
|
261
|
+
M,
|
|
262
|
+
j ? Error("react-stack-top-frame") : B,
|
|
263
|
+
j ? J(n(c)) : fe
|
|
264
264
|
);
|
|
265
|
-
}, te.jsxs = function(c,
|
|
266
|
-
var
|
|
265
|
+
}, te.jsxs = function(c, h, S, R, M) {
|
|
266
|
+
var j = 1e4 > q.recentlyCreatedOwnerStacks++;
|
|
267
267
|
return l(
|
|
268
268
|
c,
|
|
269
|
-
|
|
270
|
-
|
|
269
|
+
h,
|
|
270
|
+
S,
|
|
271
271
|
!0,
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
272
|
+
R,
|
|
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 Rt(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,
|
|
@@ -303,15 +303,15 @@ function Rt(r, e) {
|
|
|
303
303
|
}, [t]);
|
|
304
304
|
}
|
|
305
305
|
function F(r, e) {
|
|
306
|
-
const t =
|
|
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 Nt(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,8 +341,8 @@ function jt(r) {
|
|
|
341
341
|
e += "," + r[t].id;
|
|
342
342
|
return e;
|
|
343
343
|
}
|
|
344
|
-
const
|
|
345
|
-
const n = F(t.store, e), o = n ?
|
|
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
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]
|
|
@@ -350,42 +350,42 @@ const Ae = L(function r({ nodeId: e, context: t }) {
|
|
|
350
350
|
if (!n)
|
|
351
351
|
return null;
|
|
352
352
|
if (n.type === "root")
|
|
353
|
-
return /* @__PURE__ */ b.jsx(
|
|
353
|
+
return /* @__PURE__ */ b.jsx(St, { children: i }, n.id);
|
|
354
354
|
const a = t.library.resolve(n);
|
|
355
355
|
if (!a)
|
|
356
|
-
return
|
|
357
|
-
const u =
|
|
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 Ot(r, e) {
|
|
361
|
-
return !Array.isArray(r) || r.length === 0 ? null : r.map((t) => /* @__PURE__ */ b.jsx(Ae, { nodeId: t.id, context: e }, t.id));
|
|
362
|
-
}
|
|
359
|
+
}, jt);
|
|
363
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
|
+
}
|
|
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 f =
|
|
369
|
+
const f = E(i);
|
|
370
370
|
f.current = i;
|
|
371
|
-
const
|
|
372
|
-
|
|
373
|
-
const k =
|
|
371
|
+
const p = E(a);
|
|
372
|
+
p.current = a;
|
|
373
|
+
const k = z((v, m) => {
|
|
374
374
|
if (!v)
|
|
375
375
|
return;
|
|
376
|
-
const g =
|
|
376
|
+
const g = Ct(m);
|
|
377
377
|
l.current?.(v, g);
|
|
378
|
-
}, []),
|
|
378
|
+
}, []), C = L(() => {
|
|
379
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 g = e.getSnapshot().views.get(
|
|
388
|
-
return g ? /* @__PURE__ */ b.jsx(
|
|
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
390
|
dispatchAction: k,
|
|
391
391
|
// Access client/video via refs to avoid context recreation
|
|
@@ -393,14 +393,14 @@ const _t = L(function({ store: e, library: t, viewId: n, emptyFallback: o = null
|
|
|
393
393
|
return f.current;
|
|
394
394
|
},
|
|
395
395
|
get video() {
|
|
396
|
-
return
|
|
396
|
+
return p.current;
|
|
397
397
|
}
|
|
398
398
|
};
|
|
399
399
|
return v;
|
|
400
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(
|
|
402
|
-
},
|
|
403
|
-
class
|
|
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,41 +417,41 @@ class Mt {
|
|
|
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
|
-
const i =
|
|
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
437
|
a.current = o;
|
|
438
|
-
const u =
|
|
438
|
+
const u = E(s);
|
|
439
439
|
u.current = s;
|
|
440
|
-
const d =
|
|
440
|
+
const d = L(
|
|
441
441
|
() => {
|
|
442
442
|
const l = [];
|
|
443
|
-
for (const [f,
|
|
444
|
-
const k =
|
|
445
|
-
|
|
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 }));
|
|
446
446
|
}
|
|
447
447
|
return l;
|
|
448
448
|
},
|
|
449
449
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
450
450
|
[e, n, i]
|
|
451
451
|
);
|
|
452
|
-
return d.length === 0 ? null : /* @__PURE__ */ b.jsx(b.Fragment, { children: d.map(({ key: l, store: f }) => /* @__PURE__ */ b.jsx(
|
|
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)) });
|
|
453
453
|
});
|
|
454
|
-
class
|
|
454
|
+
class xt {
|
|
455
455
|
core;
|
|
456
456
|
ownsCore;
|
|
457
457
|
stores = /* @__PURE__ */ new Map();
|
|
@@ -459,7 +459,7 @@ class Ut {
|
|
|
459
459
|
unsubscribeClears;
|
|
460
460
|
unsubscribeStoreChanges;
|
|
461
461
|
constructor(e) {
|
|
462
|
-
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();
|
|
463
463
|
}
|
|
464
464
|
dispose() {
|
|
465
465
|
this.unsubscribeClears(), this.unsubscribeStoreChanges(), this.ownsCore && this.core.dispose(), this.listeners.clear(), this.stores.clear();
|
|
@@ -506,8 +506,8 @@ class Ut {
|
|
|
506
506
|
if (t)
|
|
507
507
|
return t;
|
|
508
508
|
const n = {
|
|
509
|
-
category:
|
|
510
|
-
store: new
|
|
509
|
+
category: Ie,
|
|
510
|
+
store: new gt()
|
|
511
511
|
};
|
|
512
512
|
return this.stores.set(e, n), n;
|
|
513
513
|
}
|
|
@@ -515,7 +515,7 @@ class Ut {
|
|
|
515
515
|
const n = this.stores.get(e);
|
|
516
516
|
if (!n)
|
|
517
517
|
return !1;
|
|
518
|
-
const o = t ?? this.core.uiStore.getSnapshot(e)?.category ??
|
|
518
|
+
const o = t ?? this.core.uiStore.getSnapshot(e)?.category ?? Ie;
|
|
519
519
|
return n.category === o ? !1 : (this.stores.set(e, { ...n, category: o }), !0);
|
|
520
520
|
}
|
|
521
521
|
notify(e) {
|
|
@@ -542,21 +542,21 @@ function se(...r) {
|
|
|
542
542
|
}
|
|
543
543
|
return e || void 0;
|
|
544
544
|
}
|
|
545
|
-
const
|
|
545
|
+
const ze = /* @__PURE__ */ new WeakMap(), $t = {};
|
|
546
546
|
function ie(r) {
|
|
547
547
|
if (!r)
|
|
548
|
-
return
|
|
549
|
-
const e =
|
|
548
|
+
return $t;
|
|
549
|
+
const e = ze.get(r);
|
|
550
550
|
if (e)
|
|
551
551
|
return e;
|
|
552
552
|
const t = {};
|
|
553
553
|
for (const [n, o] of Object.entries(r))
|
|
554
554
|
o != null && (typeof o == "string" || typeof o == "number" || typeof o == "boolean") && (t[n] = o);
|
|
555
|
-
return
|
|
555
|
+
return ze.set(r, t), t;
|
|
556
556
|
}
|
|
557
|
-
function
|
|
558
|
-
const r =
|
|
559
|
-
const o = F(n.store, t), s =
|
|
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
560
|
return $(() => {
|
|
561
561
|
if (typeof document > "u")
|
|
562
562
|
return;
|
|
@@ -593,8 +593,8 @@ function $t() {
|
|
|
593
593
|
return r;
|
|
594
594
|
};
|
|
595
595
|
}
|
|
596
|
-
function
|
|
597
|
-
const r =
|
|
596
|
+
function Bt() {
|
|
597
|
+
const r = U(function({ nodeId: t, context: n, className: o }) {
|
|
598
598
|
const s = F(n.store, t);
|
|
599
599
|
if (!s)
|
|
600
600
|
return null;
|
|
@@ -606,8 +606,8 @@ function Ft() {
|
|
|
606
606
|
return r;
|
|
607
607
|
};
|
|
608
608
|
}
|
|
609
|
-
function
|
|
610
|
-
const r =
|
|
609
|
+
function Vt() {
|
|
610
|
+
const r = U(function({ nodeId: t, context: n, className: o }) {
|
|
611
611
|
const s = F(n.store, t);
|
|
612
612
|
if (!s)
|
|
613
613
|
return null;
|
|
@@ -628,8 +628,8 @@ function Bt() {
|
|
|
628
628
|
return r;
|
|
629
629
|
};
|
|
630
630
|
}
|
|
631
|
-
function
|
|
632
|
-
const r =
|
|
631
|
+
function zt() {
|
|
632
|
+
const r = U(function({ nodeId: t, context: n, className: o }) {
|
|
633
633
|
const s = F(n.store, t);
|
|
634
634
|
if (!s)
|
|
635
635
|
return null;
|
|
@@ -651,8 +651,8 @@ function Vt() {
|
|
|
651
651
|
return r;
|
|
652
652
|
};
|
|
653
653
|
}
|
|
654
|
-
function
|
|
655
|
-
const r =
|
|
654
|
+
function Dt() {
|
|
655
|
+
const r = U(function({ nodeId: t, context: n, className: o }) {
|
|
656
656
|
const s = F(n.store, t);
|
|
657
657
|
if (!s)
|
|
658
658
|
return null;
|
|
@@ -664,8 +664,8 @@ function zt() {
|
|
|
664
664
|
return r;
|
|
665
665
|
};
|
|
666
666
|
}
|
|
667
|
-
function
|
|
668
|
-
const r =
|
|
667
|
+
function qt() {
|
|
668
|
+
const r = U(function({ nodeId: t, context: n, className: o }) {
|
|
669
669
|
const s = F(n.store, t);
|
|
670
670
|
if (!s)
|
|
671
671
|
return null;
|
|
@@ -677,21 +677,21 @@ function Dt() {
|
|
|
677
677
|
return r;
|
|
678
678
|
};
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function Wt() {
|
|
681
681
|
return [
|
|
682
|
-
Ft(),
|
|
683
682
|
Bt(),
|
|
684
683
|
Vt(),
|
|
685
684
|
zt(),
|
|
686
685
|
Dt(),
|
|
687
|
-
|
|
686
|
+
qt(),
|
|
687
|
+
Ft()
|
|
688
688
|
];
|
|
689
689
|
}
|
|
690
|
-
const
|
|
691
|
-
function
|
|
692
|
-
r.registerModule(
|
|
690
|
+
const Yt = "base", Jt = async () => Wt();
|
|
691
|
+
function Kt(r) {
|
|
692
|
+
r.registerModule(Yt, Jt);
|
|
693
693
|
}
|
|
694
|
-
function
|
|
694
|
+
function ot(r) {
|
|
695
695
|
if (typeof r == "string") {
|
|
696
696
|
const e = r.trim();
|
|
697
697
|
return e.length > 0 ? e : void 0;
|
|
@@ -701,13 +701,13 @@ function rt(r) {
|
|
|
701
701
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
702
702
|
}
|
|
703
703
|
}
|
|
704
|
-
function
|
|
704
|
+
function st(...r) {
|
|
705
705
|
const e = [];
|
|
706
706
|
for (const t of r)
|
|
707
707
|
t && t.trim() && e.push(t.trim());
|
|
708
708
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function pe(r) {
|
|
711
711
|
if (typeof r == "number" && Number.isFinite(r))
|
|
712
712
|
return Math.floor(r);
|
|
713
713
|
if (typeof r == "string" && r.trim().length > 0) {
|
|
@@ -716,20 +716,20 @@ function fe(r) {
|
|
|
716
716
|
return Math.floor(e);
|
|
717
717
|
}
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function Te(r) {
|
|
720
720
|
if (typeof r != "string")
|
|
721
721
|
return;
|
|
722
722
|
const e = r.trim();
|
|
723
723
|
return e.length > 0 ? e : void 0;
|
|
724
724
|
}
|
|
725
|
-
const
|
|
726
|
-
function
|
|
727
|
-
const r =
|
|
728
|
-
const s = F(n.store, t), i =
|
|
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
729
|
return $(() => {
|
|
730
|
-
const
|
|
731
|
-
if (!(!a || !
|
|
732
|
-
return a.attachCanvas(u,
|
|
730
|
+
const p = i.current;
|
|
731
|
+
if (!(!a || !p || !u))
|
|
732
|
+
return a.attachCanvas(u, p), () => {
|
|
733
733
|
a.detachCanvas(u);
|
|
734
734
|
};
|
|
735
735
|
}, [a, u]), s ? /* @__PURE__ */ b.jsx(
|
|
@@ -745,12 +745,12 @@ function Ht() {
|
|
|
745
745
|
) : null;
|
|
746
746
|
});
|
|
747
747
|
return ({ type: e }) => {
|
|
748
|
-
if (e ===
|
|
748
|
+
if (e === Gt)
|
|
749
749
|
return r;
|
|
750
750
|
};
|
|
751
751
|
}
|
|
752
|
-
function
|
|
753
|
-
return [
|
|
752
|
+
function Zt() {
|
|
753
|
+
return [Xt(), Qt()];
|
|
754
754
|
}
|
|
755
755
|
function re(r) {
|
|
756
756
|
if (typeof r == "boolean")
|
|
@@ -761,8 +761,8 @@ function re(r) {
|
|
|
761
761
|
if (e === "false") return !1;
|
|
762
762
|
}
|
|
763
763
|
}
|
|
764
|
-
function
|
|
765
|
-
const r =
|
|
764
|
+
function Qt() {
|
|
765
|
+
const r = U(function({
|
|
766
766
|
nodeId: t,
|
|
767
767
|
context: n,
|
|
768
768
|
className: o
|
|
@@ -770,7 +770,7 @@ function Zt() {
|
|
|
770
770
|
const s = F(n.store, t);
|
|
771
771
|
if (!s)
|
|
772
772
|
return null;
|
|
773
|
-
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;
|
|
774
774
|
return /* @__PURE__ */ b.jsx(
|
|
775
775
|
"video",
|
|
776
776
|
{
|
|
@@ -779,27 +779,27 @@ function Zt() {
|
|
|
779
779
|
...d !== void 0 ? { controls: d } : {},
|
|
780
780
|
...l !== void 0 ? { autoPlay: l } : {},
|
|
781
781
|
...f !== void 0 ? { loop: f } : {},
|
|
782
|
-
...
|
|
782
|
+
...p !== void 0 ? { muted: p } : {},
|
|
783
783
|
...k !== void 0 ? { playsInline: k } : {},
|
|
784
|
-
...
|
|
784
|
+
...C ? { width: C } : {},
|
|
785
785
|
...v ? { height: v } : {},
|
|
786
786
|
"data-ikon-node-id": s.id,
|
|
787
787
|
className: i,
|
|
788
|
-
children:
|
|
788
|
+
children: m
|
|
789
789
|
}
|
|
790
790
|
);
|
|
791
791
|
});
|
|
792
792
|
return ({ type: e }) => {
|
|
793
|
-
if (e ===
|
|
793
|
+
if (e === Ht)
|
|
794
794
|
return r;
|
|
795
795
|
};
|
|
796
796
|
}
|
|
797
|
-
const
|
|
798
|
-
function
|
|
799
|
-
r.registerModule(
|
|
797
|
+
const er = "media", tr = async () => Zt();
|
|
798
|
+
function rr(r) {
|
|
799
|
+
r.registerModule(er, tr);
|
|
800
800
|
}
|
|
801
|
-
const
|
|
802
|
-
class
|
|
801
|
+
const De = ye("UIRegistry");
|
|
802
|
+
class nr {
|
|
803
803
|
baseResolvers = [];
|
|
804
804
|
moduleLoaders = /* @__PURE__ */ new Map();
|
|
805
805
|
moduleResolvers = /* @__PURE__ */ new Map();
|
|
@@ -821,15 +821,15 @@ class rr {
|
|
|
821
821
|
for (const [n, o] of this.moduleLoaders.entries())
|
|
822
822
|
if (!this.moduleResolvers.has(n))
|
|
823
823
|
try {
|
|
824
|
-
const s = await o(), i =
|
|
824
|
+
const s = await o(), i = ir(s);
|
|
825
825
|
this.moduleResolvers.set(n, i), e = !0;
|
|
826
826
|
} catch (s) {
|
|
827
|
-
|
|
827
|
+
De.error(`[IkonUiRegistry] Failed to load module '${n}'.`, s);
|
|
828
828
|
}
|
|
829
829
|
const t = [];
|
|
830
830
|
for (const n of this.moduleLoaders.keys())
|
|
831
831
|
this.moduleResolvers.has(n) && t.push(n);
|
|
832
|
-
return
|
|
832
|
+
return ar(t, this.activeModuleOrder) || (this.activeModuleOrder = t, e = !0), e;
|
|
833
833
|
}
|
|
834
834
|
resolve(e) {
|
|
835
835
|
for (const t of this.baseResolvers) {
|
|
@@ -839,7 +839,7 @@ class rr {
|
|
|
839
839
|
for (const t of this.activeModuleOrder) {
|
|
840
840
|
const n = this.moduleResolvers.get(t);
|
|
841
841
|
if (!n) {
|
|
842
|
-
|
|
842
|
+
De.warn(`Missing resolvers for module ${t}`);
|
|
843
843
|
continue;
|
|
844
844
|
}
|
|
845
845
|
for (const o of n) {
|
|
@@ -849,17 +849,17 @@ class rr {
|
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
851
|
}
|
|
852
|
-
function
|
|
853
|
-
const r = new
|
|
854
|
-
return
|
|
852
|
+
function or() {
|
|
853
|
+
const r = new nr();
|
|
854
|
+
return Kt(r), rr(r), r.loadRegisteredModules(), r;
|
|
855
855
|
}
|
|
856
|
-
function
|
|
856
|
+
function sr(r) {
|
|
857
857
|
return Array.isArray(r) ? r : [r];
|
|
858
858
|
}
|
|
859
|
-
function
|
|
860
|
-
return r ?
|
|
859
|
+
function ir(r) {
|
|
860
|
+
return r ? sr(r).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
|
|
861
861
|
}
|
|
862
|
-
function
|
|
862
|
+
function ar(r, e) {
|
|
863
863
|
if (r.length !== e.length)
|
|
864
864
|
return !1;
|
|
865
865
|
for (let t = 0; t < r.length; t += 1)
|
|
@@ -867,7 +867,7 @@ function ir(r, e) {
|
|
|
867
867
|
return !1;
|
|
868
868
|
return !0;
|
|
869
869
|
}
|
|
870
|
-
const
|
|
870
|
+
const ve = ye("MotionController"), qe = {
|
|
871
871
|
ease: [0.25, 0.1, 0.25, 1],
|
|
872
872
|
"ease-in": [0.42, 0, 1, 1],
|
|
873
873
|
"ease-out": [0, 0, 0.58, 1],
|
|
@@ -897,88 +897,88 @@ const Se = me("MotionController"), ze = {
|
|
|
897
897
|
"ease-out-back": [0.175, 0.885, 0.32, 1.275],
|
|
898
898
|
"ease-in-out-back": [0.68, -0.55, 0.265, 1.55]
|
|
899
899
|
};
|
|
900
|
-
function
|
|
900
|
+
function O(r) {
|
|
901
901
|
return r <= 0 ? 0 : r >= 1 ? 1 : r;
|
|
902
902
|
}
|
|
903
|
-
function
|
|
903
|
+
function We(r) {
|
|
904
904
|
if (r == null) return;
|
|
905
905
|
const e = `${r}`.trim();
|
|
906
906
|
if (!e) return;
|
|
907
907
|
const t = Number.parseFloat(e);
|
|
908
908
|
return Number.isFinite(t) ? t : void 0;
|
|
909
909
|
}
|
|
910
|
-
function
|
|
910
|
+
function Ye(r) {
|
|
911
911
|
return typeof CSS < "u" && CSS.escape ? CSS.escape(r) : r.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
|
|
912
912
|
}
|
|
913
|
-
function
|
|
913
|
+
function Je(r, e, t, n) {
|
|
914
914
|
const l = new Float32Array(11);
|
|
915
|
-
function f(
|
|
916
|
-
return ((3 * g - 3 *
|
|
915
|
+
function f(m, g, w) {
|
|
916
|
+
return ((3 * g - 3 * w + 1) * m + (3 * w - 6 * g)) * m * m + 3 * g * m;
|
|
917
917
|
}
|
|
918
|
-
function
|
|
919
|
-
return 3 * (3 * g - 3 *
|
|
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
920
|
}
|
|
921
|
-
function k(
|
|
922
|
-
for (let
|
|
923
|
-
const
|
|
924
|
-
if (
|
|
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
925
|
return g;
|
|
926
|
-
const T = f(g, r, t) -
|
|
927
|
-
g -= T /
|
|
926
|
+
const T = f(g, r, t) - m;
|
|
927
|
+
g -= T / P;
|
|
928
928
|
}
|
|
929
929
|
return g;
|
|
930
930
|
}
|
|
931
|
-
function
|
|
932
|
-
let
|
|
931
|
+
function C(m, g, w) {
|
|
932
|
+
let P = 0, T = 0, x = 0;
|
|
933
933
|
do
|
|
934
|
-
T = g + (
|
|
935
|
-
while (Math.abs(
|
|
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
936
|
return T;
|
|
937
937
|
}
|
|
938
|
-
function v(
|
|
939
|
-
let g = 0,
|
|
940
|
-
const
|
|
941
|
-
for (;
|
|
938
|
+
function v(m) {
|
|
939
|
+
let g = 0, w = 1;
|
|
940
|
+
const P = 10;
|
|
941
|
+
for (; w !== P && l[w] <= m; w += 1)
|
|
942
942
|
g += 0.1;
|
|
943
|
-
|
|
944
|
-
const T = (
|
|
945
|
-
return
|
|
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
946
|
}
|
|
947
|
-
for (let
|
|
948
|
-
l[
|
|
949
|
-
return (
|
|
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
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function cr(r) {
|
|
952
952
|
const e = /steps\(\s*([0-9]+)\s*(?:,\s*([a-z-]+)\s*)?\)/i.exec(r);
|
|
953
953
|
if (!e)
|
|
954
|
-
return (o) =>
|
|
954
|
+
return (o) => O(o);
|
|
955
955
|
const t = Math.max(1, parseInt(e[1], 10)), n = (e[2] ?? "end").toLowerCase();
|
|
956
|
-
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);
|
|
957
957
|
}
|
|
958
|
-
function
|
|
958
|
+
function ur(r) {
|
|
959
959
|
if (!r)
|
|
960
|
-
return (t) =>
|
|
960
|
+
return (t) => O(t);
|
|
961
961
|
const e = r.trim().toLowerCase();
|
|
962
962
|
if (!e || e === "linear")
|
|
963
|
-
return (t) =>
|
|
964
|
-
if (
|
|
965
|
-
const [t, n, o, s] =
|
|
966
|
-
return (a) =>
|
|
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)));
|
|
967
967
|
}
|
|
968
968
|
if (e.startsWith("cubic-bezier(") && e.endsWith(")")) {
|
|
969
969
|
const n = e.slice(13, -1).split(",").map((o) => Number.parseFloat(o.trim()));
|
|
970
970
|
if (n.length === 4 && n.every((o) => Number.isFinite(o))) {
|
|
971
|
-
const [o, s, i, a] = n, u =
|
|
972
|
-
return (d) =>
|
|
971
|
+
const [o, s, i, a] = n, u = Je(o, s, i, a);
|
|
972
|
+
return (d) => O(u(O(d)));
|
|
973
973
|
}
|
|
974
974
|
}
|
|
975
975
|
if (e.startsWith("steps(") && e.endsWith(")")) {
|
|
976
|
-
const t =
|
|
977
|
-
return (n) => t(
|
|
976
|
+
const t = cr(e);
|
|
977
|
+
return (n) => t(O(n));
|
|
978
978
|
}
|
|
979
|
-
return (t) =>
|
|
979
|
+
return (t) => O(t);
|
|
980
980
|
}
|
|
981
|
-
function
|
|
981
|
+
function lr(r) {
|
|
982
982
|
if (!r)
|
|
983
983
|
return;
|
|
984
984
|
const e = /(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)\s*->\s*(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)/.exec(r);
|
|
@@ -988,7 +988,7 @@ function ur(r) {
|
|
|
988
988
|
if (![t, n, o, s].some((i) => !Number.isFinite(i)))
|
|
989
989
|
return { inStart: t, inEnd: n, outStart: o, outEnd: s };
|
|
990
990
|
}
|
|
991
|
-
class
|
|
991
|
+
class dr {
|
|
992
992
|
bindingsByStyle = /* @__PURE__ */ new Map();
|
|
993
993
|
observer;
|
|
994
994
|
observeScheduled = !1;
|
|
@@ -1012,7 +1012,7 @@ class lr {
|
|
|
1012
1012
|
try {
|
|
1013
1013
|
e();
|
|
1014
1014
|
} catch (t) {
|
|
1015
|
-
|
|
1015
|
+
ve.warn("Failed to cleanup binding listener", t);
|
|
1016
1016
|
}
|
|
1017
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);
|
|
1018
1018
|
}
|
|
@@ -1022,7 +1022,7 @@ class lr {
|
|
|
1022
1022
|
const n = (JSON.parse(e).motionBindings ?? []).map((o) => this.parseBinding(o)).filter((o) => o !== void 0);
|
|
1023
1023
|
return n.length === 0 ? void 0 : { bindings: n };
|
|
1024
1024
|
} catch (t) {
|
|
1025
|
-
|
|
1025
|
+
ve.warn("Failed to parse motion metadata", t);
|
|
1026
1026
|
return;
|
|
1027
1027
|
}
|
|
1028
1028
|
}
|
|
@@ -1030,7 +1030,7 @@ class lr {
|
|
|
1030
1030
|
const t = e.source?.trim();
|
|
1031
1031
|
if (!t)
|
|
1032
1032
|
return;
|
|
1033
|
-
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;
|
|
1034
1034
|
return Number.isNaN(n) || Number.isNaN(s) ? void 0 : {
|
|
1035
1035
|
source: t.toLowerCase(),
|
|
1036
1036
|
min: n,
|
|
@@ -1088,7 +1088,7 @@ class lr {
|
|
|
1088
1088
|
const t = this.bindingsByStyle.get(e);
|
|
1089
1089
|
if (!t || typeof document > "u")
|
|
1090
1090
|
return;
|
|
1091
|
-
const n = `.${
|
|
1091
|
+
const n = `.${Ye(e)}`;
|
|
1092
1092
|
document.querySelectorAll(n).forEach((s) => this.applyStyleToElement(s, e, t));
|
|
1093
1093
|
}
|
|
1094
1094
|
applyStyleToElement(e, t, n) {
|
|
@@ -1128,7 +1128,7 @@ class lr {
|
|
|
1128
1128
|
}
|
|
1129
1129
|
resolveScrollContainer(e, t) {
|
|
1130
1130
|
if (t.targetId) {
|
|
1131
|
-
const n = `[data-ikon-motion-source="${
|
|
1131
|
+
const n = `[data-ikon-motion-source="${Ye(t.targetId)}"]`, o = typeof document < "u" ? document.querySelector(n) : null;
|
|
1132
1132
|
if (o)
|
|
1133
1133
|
return o;
|
|
1134
1134
|
}
|
|
@@ -1156,7 +1156,7 @@ class lr {
|
|
|
1156
1156
|
case "unclamped":
|
|
1157
1157
|
return e;
|
|
1158
1158
|
default:
|
|
1159
|
-
return
|
|
1159
|
+
return O(e);
|
|
1160
1160
|
}
|
|
1161
1161
|
}
|
|
1162
1162
|
applyMap(e, t) {
|
|
@@ -1198,7 +1198,7 @@ class lr {
|
|
|
1198
1198
|
try {
|
|
1199
1199
|
i();
|
|
1200
1200
|
} catch (a) {
|
|
1201
|
-
|
|
1201
|
+
ve.warn("Failed to cleanup listener", a);
|
|
1202
1202
|
}
|
|
1203
1203
|
this.globalCleanups.delete(i);
|
|
1204
1204
|
}
|
|
@@ -1243,14 +1243,14 @@ class lr {
|
|
|
1243
1243
|
}
|
|
1244
1244
|
}
|
|
1245
1245
|
}
|
|
1246
|
-
const
|
|
1247
|
-
function
|
|
1248
|
-
const e =
|
|
1246
|
+
const Ke = new dr(), we = "ikon-ds";
|
|
1247
|
+
function fr(r) {
|
|
1248
|
+
const e = z(({ styleId: n, css: o, common: s }) => {
|
|
1249
1249
|
if (!n || typeof document > "u") return;
|
|
1250
|
-
let i = document.getElementById(
|
|
1251
|
-
i || (i = document.createElement("style"), i.id =
|
|
1252
|
-
}, []), t =
|
|
1253
|
-
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();
|
|
1254
1254
|
}, []);
|
|
1255
1255
|
return $(() => {
|
|
1256
1256
|
if (!r) return;
|
|
@@ -1262,7 +1262,7 @@ function dr(r) {
|
|
|
1262
1262
|
};
|
|
1263
1263
|
}, [r, t, e]), $(() => () => t(), [t]), { setStyle: e, reset: t };
|
|
1264
1264
|
}
|
|
1265
|
-
function
|
|
1265
|
+
function hr(r) {
|
|
1266
1266
|
const e = [];
|
|
1267
1267
|
for (const [t, n] of r) {
|
|
1268
1268
|
const o = n.store.getSnapshot(), s = o.rootViewId && o.views.has(o.rootViewId);
|
|
@@ -1270,62 +1270,62 @@ function fr(r) {
|
|
|
1270
1270
|
}
|
|
1271
1271
|
return e.sort(), e.join(",");
|
|
1272
1272
|
}
|
|
1273
|
-
function
|
|
1274
|
-
const [e, t] =
|
|
1273
|
+
function mr(r) {
|
|
1274
|
+
const [e, t] = Y(), n = E("");
|
|
1275
1275
|
return $(() => {
|
|
1276
1276
|
if (!r) {
|
|
1277
1277
|
t(void 0), n.current = "";
|
|
1278
1278
|
return;
|
|
1279
1279
|
}
|
|
1280
1280
|
const o = () => {
|
|
1281
|
-
const s = r.getStores(), i =
|
|
1281
|
+
const s = r.getStores(), i = hr(s);
|
|
1282
1282
|
i !== n.current && (n.current = i, t(s));
|
|
1283
1283
|
};
|
|
1284
1284
|
return o(), r.subscribe(o);
|
|
1285
1285
|
}, [r]), e;
|
|
1286
1286
|
}
|
|
1287
|
-
var
|
|
1288
|
-
function
|
|
1289
|
-
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];
|
|
1290
1290
|
try {
|
|
1291
1291
|
r[ne] = void 0;
|
|
1292
1292
|
var n = !0;
|
|
1293
1293
|
} catch {
|
|
1294
1294
|
}
|
|
1295
|
-
var o =
|
|
1295
|
+
var o = br.call(r);
|
|
1296
1296
|
return n && (e ? r[ne] = t : delete r[ne]), o;
|
|
1297
1297
|
}
|
|
1298
|
-
var
|
|
1299
|
-
function
|
|
1300
|
-
return
|
|
1301
|
-
}
|
|
1302
|
-
var kr = "[object Null]", Rr = "[object Undefined]", Je = he ? he.toStringTag : void 0;
|
|
1303
|
-
function Ar(r) {
|
|
1304
|
-
return r == null ? r === void 0 ? Rr : kr : Je && Je in Object(r) ? br(r) : Er(r);
|
|
1298
|
+
var wr = Object.prototype, Er = wr.toString;
|
|
1299
|
+
function kr(r) {
|
|
1300
|
+
return Er.call(r);
|
|
1305
1301
|
}
|
|
1302
|
+
var Rr = "[object Null]", Ar = "[object Undefined]", Ge = ge ? ge.toStringTag : void 0;
|
|
1306
1303
|
function Nr(r) {
|
|
1304
|
+
return r == null ? r === void 0 ? Ar : Rr : Ge && Ge in Object(r) ? vr(r) : kr(r);
|
|
1305
|
+
}
|
|
1306
|
+
function Cr(r) {
|
|
1307
1307
|
return r != null && typeof r == "object";
|
|
1308
1308
|
}
|
|
1309
|
-
var
|
|
1310
|
-
function
|
|
1311
|
-
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;
|
|
1312
1312
|
}
|
|
1313
|
-
const
|
|
1314
|
-
function
|
|
1313
|
+
const He = "ikonUiModules";
|
|
1314
|
+
function je(r) {
|
|
1315
1315
|
return typeof r == "object" && r !== null && !Array.isArray(r);
|
|
1316
1316
|
}
|
|
1317
|
-
function
|
|
1317
|
+
function Or(r) {
|
|
1318
1318
|
if (!Array.isArray(r))
|
|
1319
1319
|
return;
|
|
1320
1320
|
const e = /* @__PURE__ */ new Set();
|
|
1321
1321
|
for (const t of r) {
|
|
1322
|
-
if (!
|
|
1322
|
+
if (!jr(t)) continue;
|
|
1323
1323
|
const n = t.trim();
|
|
1324
1324
|
n && (e.has(n) || e.add(n));
|
|
1325
1325
|
}
|
|
1326
1326
|
return Array.from(e);
|
|
1327
1327
|
}
|
|
1328
|
-
function
|
|
1328
|
+
function gn(r, e) {
|
|
1329
1329
|
if (r === e)
|
|
1330
1330
|
return !0;
|
|
1331
1331
|
if (!r || !e)
|
|
@@ -1337,19 +1337,19 @@ function pn(r, e) {
|
|
|
1337
1337
|
return !1;
|
|
1338
1338
|
return !0;
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1341
|
-
if (!(!
|
|
1342
|
-
return
|
|
1340
|
+
function Pr(r) {
|
|
1341
|
+
if (!(!je(r) || !Object.prototype.hasOwnProperty.call(r, He)))
|
|
1342
|
+
return Or(r[He]);
|
|
1343
1343
|
}
|
|
1344
|
-
function
|
|
1344
|
+
function yn(...r) {
|
|
1345
1345
|
for (const e of r) {
|
|
1346
|
-
const t =
|
|
1346
|
+
const t = Pr(e);
|
|
1347
1347
|
if (t !== void 0)
|
|
1348
1348
|
return t;
|
|
1349
1349
|
}
|
|
1350
1350
|
}
|
|
1351
|
-
function
|
|
1352
|
-
if (!
|
|
1351
|
+
function Sn(r) {
|
|
1352
|
+
if (!je(r))
|
|
1353
1353
|
return;
|
|
1354
1354
|
const e = r, t = Object.keys(e).find((u) => u.toLowerCase() === "modules");
|
|
1355
1355
|
if (!t)
|
|
@@ -1368,7 +1368,7 @@ function yn(r) {
|
|
|
1368
1368
|
o.push(v), i.add(v);
|
|
1369
1369
|
continue;
|
|
1370
1370
|
}
|
|
1371
|
-
if (!
|
|
1371
|
+
if (!je(u))
|
|
1372
1372
|
continue;
|
|
1373
1373
|
const d = u, l = Object.keys(d).find((v) => v.toLowerCase() === "name");
|
|
1374
1374
|
if (!l)
|
|
@@ -1376,11 +1376,11 @@ function yn(r) {
|
|
|
1376
1376
|
const f = d[l];
|
|
1377
1377
|
if (typeof f != "string")
|
|
1378
1378
|
continue;
|
|
1379
|
-
const
|
|
1380
|
-
if (!
|
|
1379
|
+
const p = f.trim();
|
|
1380
|
+
if (!p)
|
|
1381
1381
|
continue;
|
|
1382
|
-
const k = Object.keys(d).find((v) => v.toLowerCase() === "javascript"),
|
|
1383
|
-
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));
|
|
1384
1384
|
}
|
|
1385
1385
|
if (!o.length && s.size === 0)
|
|
1386
1386
|
return { modules: [] };
|
|
@@ -1390,16 +1390,16 @@ function yn(r) {
|
|
|
1390
1390
|
}));
|
|
1391
1391
|
return a.length > 0 ? { modules: o, inlineModules: a } : { modules: o };
|
|
1392
1392
|
}
|
|
1393
|
-
const
|
|
1393
|
+
const y = {
|
|
1394
1394
|
None: 0,
|
|
1395
1395
|
Letter: 1,
|
|
1396
1396
|
Word: 2,
|
|
1397
1397
|
Line: 4,
|
|
1398
1398
|
Paragraph: 8,
|
|
1399
1399
|
Emoji: 16
|
|
1400
|
-
},
|
|
1400
|
+
}, _r = [
|
|
1401
1401
|
{
|
|
1402
|
-
flag:
|
|
1402
|
+
flag: y.Letter,
|
|
1403
1403
|
hints: [
|
|
1404
1404
|
"[data-motion-letter]",
|
|
1405
1405
|
"[data-letter]",
|
|
@@ -1408,7 +1408,7 @@ const S = {
|
|
|
1408
1408
|
]
|
|
1409
1409
|
},
|
|
1410
1410
|
{
|
|
1411
|
-
flag:
|
|
1411
|
+
flag: y.Word,
|
|
1412
1412
|
hints: [
|
|
1413
1413
|
"[data-motion-word]",
|
|
1414
1414
|
"[data-word]",
|
|
@@ -1417,7 +1417,7 @@ const S = {
|
|
|
1417
1417
|
]
|
|
1418
1418
|
},
|
|
1419
1419
|
{
|
|
1420
|
-
flag:
|
|
1420
|
+
flag: y.Line,
|
|
1421
1421
|
hints: [
|
|
1422
1422
|
"[data-motion-line]",
|
|
1423
1423
|
"[data-line]",
|
|
@@ -1426,7 +1426,7 @@ const S = {
|
|
|
1426
1426
|
]
|
|
1427
1427
|
},
|
|
1428
1428
|
{
|
|
1429
|
-
flag:
|
|
1429
|
+
flag: y.Paragraph,
|
|
1430
1430
|
hints: [
|
|
1431
1431
|
"[data-motion-paragraph]",
|
|
1432
1432
|
"[data-paragraph]",
|
|
@@ -1437,7 +1437,7 @@ const S = {
|
|
|
1437
1437
|
]
|
|
1438
1438
|
},
|
|
1439
1439
|
{
|
|
1440
|
-
flag:
|
|
1440
|
+
flag: y.Emoji,
|
|
1441
1441
|
hints: [
|
|
1442
1442
|
":is([data-motion-emoji],[data-emoji],.tw-motion-emoji,.tw-emoji)",
|
|
1443
1443
|
"[data-motion-emoji]",
|
|
@@ -1446,42 +1446,42 @@ const S = {
|
|
|
1446
1446
|
"[data-emoji]"
|
|
1447
1447
|
]
|
|
1448
1448
|
}
|
|
1449
|
-
],
|
|
1450
|
-
function
|
|
1451
|
-
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)
|
|
1452
1452
|
return r;
|
|
1453
|
-
const t =
|
|
1454
|
-
if (o ===
|
|
1453
|
+
const t = Zr(e), n = K(t, y.Emoji), o = t & Mr;
|
|
1454
|
+
if (o === y.None && !n)
|
|
1455
1455
|
return r;
|
|
1456
1456
|
const s = r.replace(/\r\n/g, `
|
|
1457
1457
|
`).replace(/\r/g, `
|
|
1458
1458
|
`);
|
|
1459
|
-
if (o ===
|
|
1460
|
-
return
|
|
1461
|
-
const i =
|
|
1459
|
+
if (o === y.None)
|
|
1460
|
+
return tt(s);
|
|
1461
|
+
const i = Hr(s);
|
|
1462
1462
|
if (i.length === 0)
|
|
1463
|
-
return n ?
|
|
1464
|
-
const a =
|
|
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
1465
|
for (const l of a) {
|
|
1466
|
-
const f =
|
|
1466
|
+
const f = Ur(l, t, u);
|
|
1467
1467
|
d.push(...f);
|
|
1468
1468
|
}
|
|
1469
1469
|
return d;
|
|
1470
1470
|
}
|
|
1471
|
-
function
|
|
1471
|
+
function Ur(r, e, t) {
|
|
1472
1472
|
const n = [];
|
|
1473
1473
|
for (const o of r) {
|
|
1474
|
-
const s =
|
|
1474
|
+
const s = xr(o, e, t);
|
|
1475
1475
|
n.push(...s);
|
|
1476
1476
|
}
|
|
1477
|
-
if (K(e,
|
|
1477
|
+
if (K(e, y.Paragraph)) {
|
|
1478
1478
|
const o = t.paragraph++;
|
|
1479
1479
|
return [
|
|
1480
1480
|
/* @__PURE__ */ b.jsx(
|
|
1481
1481
|
"span",
|
|
1482
1482
|
{
|
|
1483
1483
|
"data-motion-paragraph": !0,
|
|
1484
|
-
style:
|
|
1484
|
+
style: Se(o),
|
|
1485
1485
|
children: n
|
|
1486
1486
|
},
|
|
1487
1487
|
`motion-paragraph-${o}`
|
|
@@ -1490,12 +1490,12 @@ function Lr(r, e, t) {
|
|
|
1490
1490
|
}
|
|
1491
1491
|
return n;
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1494
|
-
const n =
|
|
1495
|
-
if (K(e,
|
|
1493
|
+
function xr(r, e, t) {
|
|
1494
|
+
const n = $r(r.text, e, t), o = [];
|
|
1495
|
+
if (K(e, y.Line)) {
|
|
1496
1496
|
const s = t.line++;
|
|
1497
1497
|
o.push(
|
|
1498
|
-
/* @__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}`)
|
|
1499
1499
|
);
|
|
1500
1500
|
} else
|
|
1501
1501
|
o.push(...n);
|
|
@@ -1503,47 +1503,47 @@ function Ur(r, e, t) {
|
|
|
1503
1503
|
o.push(/* @__PURE__ */ b.jsx("br", {}, `motion-break-${t.br++}`));
|
|
1504
1504
|
return o;
|
|
1505
1505
|
}
|
|
1506
|
-
function
|
|
1506
|
+
function $r(r, e, t) {
|
|
1507
1507
|
if (!r)
|
|
1508
1508
|
return [];
|
|
1509
|
-
const n = K(e,
|
|
1509
|
+
const n = K(e, y.Word), o = [], s = /(\s+)/g;
|
|
1510
1510
|
let i = 0, a;
|
|
1511
1511
|
for (; (a = s.exec(r)) !== null; ) {
|
|
1512
1512
|
if (a.index > i) {
|
|
1513
1513
|
const u = r.slice(i, a.index);
|
|
1514
|
-
o.push(
|
|
1514
|
+
o.push(Ze(u, t, e, n));
|
|
1515
1515
|
}
|
|
1516
1516
|
o.push(a[0]), i = a.index + a[0].length;
|
|
1517
1517
|
}
|
|
1518
1518
|
if (i < r.length) {
|
|
1519
1519
|
const u = r.slice(i);
|
|
1520
|
-
o.push(
|
|
1520
|
+
o.push(Ze(u, t, e, n));
|
|
1521
1521
|
}
|
|
1522
1522
|
return o;
|
|
1523
1523
|
}
|
|
1524
|
-
function
|
|
1525
|
-
const o = e.word++, s =
|
|
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
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);
|
|
1527
1527
|
}
|
|
1528
|
-
function
|
|
1529
|
-
return e ? { ...
|
|
1528
|
+
function Fr(r, e) {
|
|
1529
|
+
return e ? { ...Se(r), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
|
|
1530
1530
|
}
|
|
1531
|
-
function
|
|
1531
|
+
function Br(r, e, t) {
|
|
1532
1532
|
if (!r)
|
|
1533
1533
|
return [];
|
|
1534
|
-
const n = K(e,
|
|
1534
|
+
const n = K(e, y.Letter), o = K(e, y.Emoji);
|
|
1535
1535
|
if (!n) {
|
|
1536
1536
|
if (!o)
|
|
1537
1537
|
return [r];
|
|
1538
|
-
const a =
|
|
1538
|
+
const a = Pe(r);
|
|
1539
1539
|
if (a.length === 0)
|
|
1540
1540
|
return [r];
|
|
1541
|
-
const { nodes: u } =
|
|
1541
|
+
const { nodes: u } = ct(a, t);
|
|
1542
1542
|
return u;
|
|
1543
1543
|
}
|
|
1544
|
-
const s = [], i =
|
|
1544
|
+
const s = [], i = Pe(r);
|
|
1545
1545
|
for (const a of i) {
|
|
1546
|
-
const u = t.letter++, d = `motion-letter-${u}`, l =
|
|
1546
|
+
const u = t.letter++, d = `motion-letter-${u}`, l = Se(u);
|
|
1547
1547
|
if (a === `
|
|
1548
1548
|
`) {
|
|
1549
1549
|
s.push(
|
|
@@ -1551,55 +1551,55 @@ function Fr(r, e, t) {
|
|
|
1551
1551
|
);
|
|
1552
1552
|
continue;
|
|
1553
1553
|
}
|
|
1554
|
-
const
|
|
1554
|
+
const p = o && at(a) ? { "data-motion-emoji": !0 } : void 0, k = a === " " ? " " : a;
|
|
1555
1555
|
s.push(
|
|
1556
|
-
/* @__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)
|
|
1557
1557
|
);
|
|
1558
1558
|
}
|
|
1559
1559
|
return s;
|
|
1560
1560
|
}
|
|
1561
|
-
function
|
|
1561
|
+
function Pe(r) {
|
|
1562
1562
|
if (!r)
|
|
1563
1563
|
return [];
|
|
1564
|
-
const e =
|
|
1565
|
-
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);
|
|
1566
1566
|
}
|
|
1567
1567
|
let oe;
|
|
1568
|
-
function
|
|
1568
|
+
function Vr() {
|
|
1569
1569
|
return oe !== void 0 || (typeof Intl < "u" && typeof Intl.Segmenter == "function" ? oe = new Intl.Segmenter(void 0, { granularity: "grapheme" }) : oe = null), oe;
|
|
1570
1570
|
}
|
|
1571
|
-
function
|
|
1571
|
+
function zr(r) {
|
|
1572
1572
|
const e = [], t = Array.from(r);
|
|
1573
1573
|
let n = "";
|
|
1574
1574
|
for (let o = 0; o < t.length; o++) {
|
|
1575
1575
|
const s = t[o], i = t[o + 1];
|
|
1576
|
-
n += s, !(i &&
|
|
1576
|
+
n += s, !(i && Dr(s, i)) && (e.push(n), n = "");
|
|
1577
1577
|
}
|
|
1578
1578
|
return n && e.push(n), e;
|
|
1579
1579
|
}
|
|
1580
|
-
function
|
|
1581
|
-
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;
|
|
1582
1582
|
}
|
|
1583
|
-
function
|
|
1583
|
+
function Qe(r) {
|
|
1584
1584
|
return r.codePointAt(0) === 8205;
|
|
1585
1585
|
}
|
|
1586
|
-
function
|
|
1586
|
+
function qr(r) {
|
|
1587
1587
|
const e = r.codePointAt(0);
|
|
1588
1588
|
return e === void 0 ? !1 : e >= 65024 && e <= 65039 || e >= 917760 && e <= 917999;
|
|
1589
1589
|
}
|
|
1590
|
-
function
|
|
1590
|
+
function Wr(r) {
|
|
1591
1591
|
const e = r.codePointAt(0);
|
|
1592
1592
|
return e === void 0 ? !1 : e >= 127995 && e <= 127999;
|
|
1593
1593
|
}
|
|
1594
|
-
function
|
|
1594
|
+
function et(r) {
|
|
1595
1595
|
const e = r.codePointAt(0);
|
|
1596
1596
|
return e === void 0 ? !1 : e >= 127462 && e <= 127487;
|
|
1597
1597
|
}
|
|
1598
|
-
let
|
|
1599
|
-
function
|
|
1600
|
-
return r ? (
|
|
1598
|
+
let Ee;
|
|
1599
|
+
function Yr(r) {
|
|
1600
|
+
return r ? (Ee || (Ee = Jr()), Ee(r)) : !1;
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1602
|
+
function Jr() {
|
|
1603
1603
|
try {
|
|
1604
1604
|
const r = new RegExp("\\p{Mark}", "u");
|
|
1605
1605
|
return (e) => r.test(e);
|
|
@@ -1610,19 +1610,19 @@ function Yr() {
|
|
|
1610
1610
|
};
|
|
1611
1611
|
}
|
|
1612
1612
|
}
|
|
1613
|
-
let
|
|
1614
|
-
function
|
|
1615
|
-
return r ? (
|
|
1613
|
+
let ke;
|
|
1614
|
+
function at(r) {
|
|
1615
|
+
return r ? (ke || (ke = Kr()), ke(r)) : !1;
|
|
1616
1616
|
}
|
|
1617
|
-
function
|
|
1617
|
+
function Kr() {
|
|
1618
1618
|
try {
|
|
1619
1619
|
const r = new RegExp("\\p{Extended_Pictographic}", "u");
|
|
1620
1620
|
return (e) => r.test(e);
|
|
1621
1621
|
} catch {
|
|
1622
|
-
return
|
|
1622
|
+
return Gr;
|
|
1623
1623
|
}
|
|
1624
1624
|
}
|
|
1625
|
-
function
|
|
1625
|
+
function Gr(r) {
|
|
1626
1626
|
if (!r)
|
|
1627
1627
|
return !1;
|
|
1628
1628
|
for (const e of Array.from(r)) {
|
|
@@ -1632,7 +1632,7 @@ function Kr(r) {
|
|
|
1632
1632
|
}
|
|
1633
1633
|
return !1;
|
|
1634
1634
|
}
|
|
1635
|
-
function
|
|
1635
|
+
function Hr(r) {
|
|
1636
1636
|
const e = [];
|
|
1637
1637
|
let t = "", n = 0;
|
|
1638
1638
|
for (let o = 0; o < r.length; o++) {
|
|
@@ -1646,7 +1646,7 @@ function Gr(r) {
|
|
|
1646
1646
|
}
|
|
1647
1647
|
return (n > 0 || t.length > 0) && e.push({ text: t, breaks: n }), e;
|
|
1648
1648
|
}
|
|
1649
|
-
function
|
|
1649
|
+
function Xr(r) {
|
|
1650
1650
|
if (r.length === 0)
|
|
1651
1651
|
return [];
|
|
1652
1652
|
const e = [];
|
|
@@ -1658,7 +1658,7 @@ function Hr(r) {
|
|
|
1658
1658
|
function K(r, e) {
|
|
1659
1659
|
return (r & e) === e;
|
|
1660
1660
|
}
|
|
1661
|
-
function
|
|
1661
|
+
function Se(r) {
|
|
1662
1662
|
return {
|
|
1663
1663
|
"--tw-motion-seq-index": r.toString(),
|
|
1664
1664
|
backgroundColor: "inherit",
|
|
@@ -1675,23 +1675,23 @@ function pe(r) {
|
|
|
1675
1675
|
WebkitTextFillColor: "inherit"
|
|
1676
1676
|
};
|
|
1677
1677
|
}
|
|
1678
|
-
function
|
|
1678
|
+
function tt(r) {
|
|
1679
1679
|
if (!r)
|
|
1680
1680
|
return r;
|
|
1681
|
-
const e =
|
|
1681
|
+
const e = Pe(r);
|
|
1682
1682
|
if (e.length === 0)
|
|
1683
1683
|
return r;
|
|
1684
|
-
const { nodes: t, sawEmoji: n } =
|
|
1684
|
+
const { nodes: t, sawEmoji: n } = ct(e);
|
|
1685
1685
|
return n ? t.length === 1 ? t[0] ?? r : t : r;
|
|
1686
1686
|
}
|
|
1687
|
-
function
|
|
1687
|
+
function ct(r, e) {
|
|
1688
1688
|
const t = [];
|
|
1689
1689
|
let n = "", o = !1, s = e?.emoji ?? 0;
|
|
1690
1690
|
const i = () => {
|
|
1691
1691
|
n && (t.push(n), n = "");
|
|
1692
1692
|
};
|
|
1693
1693
|
for (const a of r) {
|
|
1694
|
-
if (
|
|
1694
|
+
if (at(a)) {
|
|
1695
1695
|
o = !0, i();
|
|
1696
1696
|
const d = `motion-emoji-${e ? e.emoji++ : s++}`;
|
|
1697
1697
|
t.push(
|
|
@@ -1703,24 +1703,24 @@ function it(r, e) {
|
|
|
1703
1703
|
}
|
|
1704
1704
|
return i(), o ? { nodes: t, sawEmoji: !0 } : { nodes: [r.join("")], sawEmoji: !1 };
|
|
1705
1705
|
}
|
|
1706
|
-
function
|
|
1706
|
+
function Zr(r) {
|
|
1707
1707
|
if (!r)
|
|
1708
|
-
return
|
|
1708
|
+
return y.None;
|
|
1709
1709
|
const e = r.trim();
|
|
1710
1710
|
if (!e)
|
|
1711
|
-
return
|
|
1712
|
-
const t =
|
|
1711
|
+
return y.None;
|
|
1712
|
+
const t = Xe.get(e);
|
|
1713
1713
|
if (typeof t == "number")
|
|
1714
1714
|
return t;
|
|
1715
1715
|
if (typeof document > "u")
|
|
1716
|
-
return
|
|
1716
|
+
return y.None;
|
|
1717
1717
|
const n = e.split(/\s+/).filter(Boolean);
|
|
1718
1718
|
if (n.length === 0)
|
|
1719
|
-
return
|
|
1720
|
-
const s = n.map((u) => `.${
|
|
1721
|
-
(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_-])`)
|
|
1722
1722
|
);
|
|
1723
|
-
let i =
|
|
1723
|
+
let i = y.None, a = !1;
|
|
1724
1724
|
for (const u of Array.from(document.styleSheets)) {
|
|
1725
1725
|
let d;
|
|
1726
1726
|
try {
|
|
@@ -1728,17 +1728,17 @@ function Xr(r) {
|
|
|
1728
1728
|
} catch {
|
|
1729
1729
|
continue;
|
|
1730
1730
|
}
|
|
1731
|
-
const l =
|
|
1732
|
-
if (l.mask && (i |= l.mask, i ===
|
|
1731
|
+
const l = ut(d, s);
|
|
1732
|
+
if (l.mask && (i |= l.mask, i === Oe))
|
|
1733
1733
|
break;
|
|
1734
1734
|
a ||= l.sawStyleRule;
|
|
1735
1735
|
}
|
|
1736
|
-
return (i !==
|
|
1736
|
+
return (i !== y.None || a) && Xe.set(e, i), i;
|
|
1737
1737
|
}
|
|
1738
|
-
function
|
|
1738
|
+
function ut(r, e) {
|
|
1739
1739
|
if (!r)
|
|
1740
|
-
return { mask:
|
|
1741
|
-
let t =
|
|
1740
|
+
return { mask: y.None, sawStyleRule: !1 };
|
|
1741
|
+
let t = y.None, n = !1;
|
|
1742
1742
|
for (let o = 0; o < r.length; o++) {
|
|
1743
1743
|
const s = r[o];
|
|
1744
1744
|
if (s) {
|
|
@@ -1746,13 +1746,13 @@ function at(r, e) {
|
|
|
1746
1746
|
const a = s.selectorText ?? "";
|
|
1747
1747
|
if (!a || !e.some((d) => d.test(a))) continue;
|
|
1748
1748
|
n = !0;
|
|
1749
|
-
for (const d of
|
|
1749
|
+
for (const d of _r)
|
|
1750
1750
|
d.hints.some((l) => a.includes(l)) && (t |= d.flag);
|
|
1751
|
-
if (t ===
|
|
1751
|
+
if (t === Oe)
|
|
1752
1752
|
return { mask: t, sawStyleRule: !0 };
|
|
1753
1753
|
} else if ("cssRules" in s) {
|
|
1754
|
-
const i =
|
|
1755
|
-
if (i.mask && (t |= i.mask, t ===
|
|
1754
|
+
const i = ut(s.cssRules, e);
|
|
1755
|
+
if (i.mask && (t |= i.mask, t === Oe))
|
|
1756
1756
|
return { mask: t, sawStyleRule: !0 };
|
|
1757
1757
|
n ||= i.sawStyleRule;
|
|
1758
1758
|
}
|
|
@@ -1760,38 +1760,38 @@ function at(r, e) {
|
|
|
1760
1760
|
}
|
|
1761
1761
|
return { mask: t, sawStyleRule: n };
|
|
1762
1762
|
}
|
|
1763
|
-
function
|
|
1763
|
+
function Qr(r) {
|
|
1764
1764
|
return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(r) : r.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
|
|
1765
1765
|
}
|
|
1766
|
-
function
|
|
1766
|
+
function en(r) {
|
|
1767
1767
|
return r.replace(/[.*+?^${}()|[\]\\]/g, (e) => `\\${e}`);
|
|
1768
1768
|
}
|
|
1769
|
-
const
|
|
1770
|
-
function
|
|
1769
|
+
const Le = "ikon_auth_session", tn = 7 * 24 * 60 * 60 * 1e3;
|
|
1770
|
+
function lt(r) {
|
|
1771
1771
|
try {
|
|
1772
|
-
localStorage.setItem(
|
|
1772
|
+
localStorage.setItem(Le, JSON.stringify(r));
|
|
1773
1773
|
} catch {
|
|
1774
1774
|
console.warn("Failed to save auth session to localStorage");
|
|
1775
1775
|
}
|
|
1776
1776
|
}
|
|
1777
|
-
function
|
|
1777
|
+
function dt() {
|
|
1778
1778
|
try {
|
|
1779
|
-
const r = localStorage.getItem(
|
|
1779
|
+
const r = localStorage.getItem(Le);
|
|
1780
1780
|
if (!r) return null;
|
|
1781
1781
|
const e = JSON.parse(r);
|
|
1782
|
-
return Date.now() - e.authenticatedAt >
|
|
1782
|
+
return Date.now() - e.authenticatedAt > tn ? (ft(), null) : e;
|
|
1783
1783
|
} catch {
|
|
1784
1784
|
return console.warn("Failed to load auth session from localStorage"), null;
|
|
1785
1785
|
}
|
|
1786
1786
|
}
|
|
1787
|
-
function
|
|
1787
|
+
function ft() {
|
|
1788
1788
|
try {
|
|
1789
|
-
localStorage.removeItem(
|
|
1789
|
+
localStorage.removeItem(Le);
|
|
1790
1790
|
} catch {
|
|
1791
1791
|
console.warn("Failed to clear auth session from localStorage");
|
|
1792
1792
|
}
|
|
1793
1793
|
}
|
|
1794
|
-
function
|
|
1794
|
+
function Re(r) {
|
|
1795
1795
|
return {
|
|
1796
1796
|
id: "",
|
|
1797
1797
|
provider: r.provider,
|
|
@@ -1799,8 +1799,8 @@ function Ee(r) {
|
|
|
1799
1799
|
authenticatedAt: r.authenticatedAt
|
|
1800
1800
|
};
|
|
1801
1801
|
}
|
|
1802
|
-
async function
|
|
1803
|
-
const t =
|
|
1802
|
+
async function ht(r, e) {
|
|
1803
|
+
const t = me(), n = await fetch(`${e}/anonymous`, {
|
|
1804
1804
|
method: "POST",
|
|
1805
1805
|
headers: { "Content-Type": "application/json" },
|
|
1806
1806
|
body: JSON.stringify({ deviceId: t, space: r })
|
|
@@ -1814,9 +1814,9 @@ async function dt(r, e) {
|
|
|
1814
1814
|
provider: "anonymous",
|
|
1815
1815
|
authenticatedAt: Date.now()
|
|
1816
1816
|
};
|
|
1817
|
-
return
|
|
1817
|
+
return lt(s), s;
|
|
1818
1818
|
}
|
|
1819
|
-
async function
|
|
1819
|
+
async function vn(r) {
|
|
1820
1820
|
const { email: e, spaceId: t, authUrl: n, returnUrl: o = window.location.origin + window.location.pathname } = r, s = await fetch(`${n}/email/send`, {
|
|
1821
1821
|
method: "POST",
|
|
1822
1822
|
headers: { "Content-Type": "application/json" },
|
|
@@ -1831,24 +1831,24 @@ async function bn(r) {
|
|
|
1831
1831
|
throw new Error(i);
|
|
1832
1832
|
}
|
|
1833
1833
|
}
|
|
1834
|
-
function
|
|
1834
|
+
function rn() {
|
|
1835
1835
|
const r = new URLSearchParams(window.location.search), e = r.get("ikon_token"), t = r.get("ikon_provider");
|
|
1836
1836
|
return e && t ? { token: e, provider: t } : null;
|
|
1837
1837
|
}
|
|
1838
|
-
function
|
|
1838
|
+
function nn() {
|
|
1839
1839
|
const e = new URLSearchParams(window.location.search).get("error");
|
|
1840
1840
|
return e ? decodeURIComponent(e) : null;
|
|
1841
1841
|
}
|
|
1842
|
-
function
|
|
1842
|
+
function rt() {
|
|
1843
1843
|
window.history.replaceState({}, "", window.location.pathname);
|
|
1844
1844
|
}
|
|
1845
|
-
function
|
|
1845
|
+
function on(r, e, t, n) {
|
|
1846
1846
|
const o = n ?? window.location.origin + window.location.pathname + window.location.search;
|
|
1847
1847
|
return `${t}/oauth/${r}?space=${encodeURIComponent(e)}&return=${encodeURIComponent(o)}`;
|
|
1848
1848
|
}
|
|
1849
|
-
const
|
|
1850
|
-
function
|
|
1851
|
-
const [t, n] =
|
|
1849
|
+
const Ue = nt(null);
|
|
1850
|
+
function wn({ children: r, config: e }) {
|
|
1851
|
+
const [t, n] = Y({
|
|
1852
1852
|
isAuthenticated: !1,
|
|
1853
1853
|
isLoading: !0,
|
|
1854
1854
|
user: null,
|
|
@@ -1856,9 +1856,9 @@ function vn({ children: r, config: e }) {
|
|
|
1856
1856
|
});
|
|
1857
1857
|
$(() => {
|
|
1858
1858
|
(() => {
|
|
1859
|
-
const d =
|
|
1859
|
+
const d = nn();
|
|
1860
1860
|
if (d) {
|
|
1861
|
-
|
|
1861
|
+
rt(), n({
|
|
1862
1862
|
isAuthenticated: !1,
|
|
1863
1863
|
isLoading: !1,
|
|
1864
1864
|
user: null,
|
|
@@ -1866,27 +1866,27 @@ function vn({ children: r, config: e }) {
|
|
|
1866
1866
|
});
|
|
1867
1867
|
return;
|
|
1868
1868
|
}
|
|
1869
|
-
const l =
|
|
1869
|
+
const l = rn();
|
|
1870
1870
|
if (l) {
|
|
1871
|
-
const
|
|
1871
|
+
const p = {
|
|
1872
1872
|
token: l.token,
|
|
1873
1873
|
provider: l.provider,
|
|
1874
1874
|
authenticatedAt: Date.now()
|
|
1875
1875
|
};
|
|
1876
|
-
|
|
1876
|
+
lt(p), rt(), n({
|
|
1877
1877
|
isAuthenticated: !0,
|
|
1878
1878
|
isLoading: !1,
|
|
1879
|
-
user:
|
|
1879
|
+
user: Re(p),
|
|
1880
1880
|
error: null
|
|
1881
1881
|
});
|
|
1882
1882
|
return;
|
|
1883
1883
|
}
|
|
1884
|
-
const f =
|
|
1884
|
+
const f = dt();
|
|
1885
1885
|
if (f) {
|
|
1886
1886
|
n({
|
|
1887
1887
|
isAuthenticated: !0,
|
|
1888
1888
|
isLoading: !1,
|
|
1889
|
-
user:
|
|
1889
|
+
user: Re(f),
|
|
1890
1890
|
error: null
|
|
1891
1891
|
});
|
|
1892
1892
|
return;
|
|
@@ -1899,7 +1899,7 @@ function vn({ children: r, config: e }) {
|
|
|
1899
1899
|
});
|
|
1900
1900
|
})();
|
|
1901
1901
|
}, []);
|
|
1902
|
-
const o =
|
|
1902
|
+
const o = z(
|
|
1903
1903
|
async (u) => {
|
|
1904
1904
|
if (!e.spaceId) {
|
|
1905
1905
|
n((f) => ({
|
|
@@ -1911,34 +1911,34 @@ function vn({ children: r, config: e }) {
|
|
|
1911
1911
|
if (u === "guest") {
|
|
1912
1912
|
n((f) => ({ ...f, isLoading: !0 }));
|
|
1913
1913
|
try {
|
|
1914
|
-
const f = e.authUrl ??
|
|
1914
|
+
const f = e.authUrl ?? Ne(), p = await ht(e.spaceId, f);
|
|
1915
1915
|
n({
|
|
1916
1916
|
isAuthenticated: !0,
|
|
1917
1917
|
isLoading: !1,
|
|
1918
|
-
user:
|
|
1918
|
+
user: Re(p),
|
|
1919
1919
|
error: null
|
|
1920
1920
|
});
|
|
1921
1921
|
} catch (f) {
|
|
1922
|
-
n((
|
|
1923
|
-
...
|
|
1922
|
+
n((p) => ({
|
|
1923
|
+
...p,
|
|
1924
1924
|
isLoading: !1,
|
|
1925
1925
|
error: f instanceof Error ? f.message : "Guest login failed"
|
|
1926
1926
|
}));
|
|
1927
1927
|
}
|
|
1928
1928
|
return;
|
|
1929
1929
|
}
|
|
1930
|
-
const d = e.authUrl ??
|
|
1930
|
+
const d = e.authUrl ?? Ne(), l = on(u, e.spaceId, d);
|
|
1931
1931
|
window.location.href = l;
|
|
1932
1932
|
},
|
|
1933
1933
|
[e.authUrl, e.spaceId]
|
|
1934
|
-
), s =
|
|
1935
|
-
|
|
1934
|
+
), s = z(() => {
|
|
1935
|
+
ft(), n({
|
|
1936
1936
|
isAuthenticated: !1,
|
|
1937
1937
|
isLoading: !1,
|
|
1938
1938
|
user: null,
|
|
1939
1939
|
error: null
|
|
1940
1940
|
});
|
|
1941
|
-
}, []), i =
|
|
1941
|
+
}, []), i = z(() => t.user?.token ?? null, [t.user]), a = L(
|
|
1942
1942
|
() => ({
|
|
1943
1943
|
state: t,
|
|
1944
1944
|
login: o,
|
|
@@ -1947,19 +1947,19 @@ function vn({ children: r, config: e }) {
|
|
|
1947
1947
|
}),
|
|
1948
1948
|
[t, o, s, i]
|
|
1949
1949
|
);
|
|
1950
|
-
return /* @__PURE__ */ b.jsx(
|
|
1950
|
+
return /* @__PURE__ */ b.jsx(Ue, { value: a, children: r });
|
|
1951
1951
|
}
|
|
1952
|
-
function
|
|
1953
|
-
const r =
|
|
1952
|
+
function sn() {
|
|
1953
|
+
const r = Me(Ue);
|
|
1954
1954
|
if (!r)
|
|
1955
1955
|
throw new Error("useAuth must be used within an AuthProvider");
|
|
1956
1956
|
return r;
|
|
1957
1957
|
}
|
|
1958
|
-
function
|
|
1959
|
-
return
|
|
1958
|
+
function En() {
|
|
1959
|
+
return Me(Ue);
|
|
1960
1960
|
}
|
|
1961
|
-
function
|
|
1962
|
-
const { config: e, guestUrlParam: t } = r, { state: n, login: o } =
|
|
1961
|
+
function kn(r) {
|
|
1962
|
+
const { config: e, guestUrlParam: t } = r, { state: n, login: o } = sn(), s = E(!1);
|
|
1963
1963
|
return $(() => {
|
|
1964
1964
|
if (!t || n.isAuthenticated || n.isLoading || s.current || !e.methods.includes("guest"))
|
|
1965
1965
|
return;
|
|
@@ -1976,7 +1976,7 @@ function En(r) {
|
|
|
1976
1976
|
error: n.error
|
|
1977
1977
|
};
|
|
1978
1978
|
}
|
|
1979
|
-
function
|
|
1979
|
+
function Rn({
|
|
1980
1980
|
connectionState: r,
|
|
1981
1981
|
error: e,
|
|
1982
1982
|
isReady: t,
|
|
@@ -1989,7 +1989,7 @@ function kn({
|
|
|
1989
1989
|
renderConnectingSlow: d,
|
|
1990
1990
|
renderConnected: l,
|
|
1991
1991
|
renderOffline: f,
|
|
1992
|
-
renderError:
|
|
1992
|
+
renderError: p
|
|
1993
1993
|
}) {
|
|
1994
1994
|
switch (r) {
|
|
1995
1995
|
case "idle":
|
|
@@ -2010,219 +2010,221 @@ function kn({
|
|
|
2010
2010
|
case "offline":
|
|
2011
2011
|
return f();
|
|
2012
2012
|
case "offlineError":
|
|
2013
|
-
return
|
|
2013
|
+
return p(e ?? s?.lastError?.message ?? null);
|
|
2014
2014
|
default:
|
|
2015
2015
|
return null;
|
|
2016
2016
|
}
|
|
2017
2017
|
}
|
|
2018
|
-
const
|
|
2019
|
-
function
|
|
2020
|
-
const { authConfig: e, localServer: t, modules: n, registerModules: o, onJoined: s, onConnectionStateChange: i, onError: a, updateUrlOnJoin: u = !0, timeouts: d,
|
|
2021
|
-
|
|
2022
|
-
const [
|
|
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
2023
|
try {
|
|
2024
|
-
return
|
|
2024
|
+
return bt();
|
|
2025
2025
|
} catch {
|
|
2026
2026
|
return { parameters: {} };
|
|
2027
2027
|
}
|
|
2028
|
-
}, []),
|
|
2028
|
+
}, []), S = L(() => e?.enabled ? dt() : null, [e?.enabled]), R = t?.enabled ?? !1, M = t?.host ?? "localhost", j = t?.httpsPort ?? 8443;
|
|
2029
2029
|
$(() => {
|
|
2030
|
-
!
|
|
2031
|
-
|
|
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
2032
|
}).catch((I) => {
|
|
2033
|
-
|
|
2033
|
+
Ae.error("Anonymous auth failed:", I), J(I instanceof Error ? I.message : "Anonymous auth failed");
|
|
2034
2034
|
}).finally(() => {
|
|
2035
|
-
|
|
2035
|
+
c(!1);
|
|
2036
2036
|
}));
|
|
2037
|
-
}, [
|
|
2038
|
-
const
|
|
2039
|
-
if (
|
|
2040
|
-
const
|
|
2037
|
+
}, [R, e, B, Z]);
|
|
2038
|
+
const W = L(() => {
|
|
2039
|
+
if (R) {
|
|
2040
|
+
const N = S?.token ? vt(S.token) ?? me() : me();
|
|
2041
2041
|
return {
|
|
2042
2042
|
local: {
|
|
2043
|
-
host:
|
|
2044
|
-
httpsPort:
|
|
2045
|
-
userId:
|
|
2043
|
+
host: M,
|
|
2044
|
+
httpsPort: j,
|
|
2045
|
+
userId: N
|
|
2046
2046
|
}
|
|
2047
2047
|
};
|
|
2048
2048
|
}
|
|
2049
|
-
return
|
|
2049
|
+
return S?.token && e?.spaceId ? {
|
|
2050
2050
|
sessionToken: {
|
|
2051
|
-
token:
|
|
2051
|
+
token: S.token,
|
|
2052
2052
|
spaceId: e.spaceId,
|
|
2053
|
-
backendType:
|
|
2054
|
-
sessionId:
|
|
2055
|
-
channelKey:
|
|
2056
|
-
parameters:
|
|
2053
|
+
backendType: $e(),
|
|
2054
|
+
sessionId: h.sessionId,
|
|
2055
|
+
channelKey: h.channelKey,
|
|
2056
|
+
parameters: h.parameters
|
|
2057
2057
|
}
|
|
2058
|
-
} :
|
|
2058
|
+
} : B && e?.spaceId ? {
|
|
2059
2059
|
sessionToken: {
|
|
2060
|
-
token:
|
|
2060
|
+
token: B,
|
|
2061
2061
|
spaceId: e.spaceId,
|
|
2062
|
-
backendType:
|
|
2063
|
-
sessionId:
|
|
2064
|
-
channelKey:
|
|
2065
|
-
parameters:
|
|
2062
|
+
backendType: $e(),
|
|
2063
|
+
sessionId: h.sessionId,
|
|
2064
|
+
channelKey: h.channelKey,
|
|
2065
|
+
parameters: h.parameters
|
|
2066
2066
|
}
|
|
2067
|
-
} :
|
|
2067
|
+
} : xe() ? null : {
|
|
2068
2068
|
local: {
|
|
2069
|
-
host:
|
|
2070
|
-
httpsPort:
|
|
2071
|
-
userId:
|
|
2069
|
+
host: M,
|
|
2070
|
+
httpsPort: j,
|
|
2071
|
+
userId: me()
|
|
2072
2072
|
}
|
|
2073
2073
|
};
|
|
2074
|
-
}, [
|
|
2075
|
-
|
|
2076
|
-
const
|
|
2074
|
+
}, [R, M, j, S?.token, e?.spaceId, B, h.sessionId, h.channelKey, h.parameters]);
|
|
2075
|
+
fr(X);
|
|
2076
|
+
const Q = mr(X);
|
|
2077
2077
|
$(() => {
|
|
2078
|
-
if (!
|
|
2079
|
-
if (
|
|
2080
|
-
for (const
|
|
2081
|
-
|
|
2082
|
-
o?.(
|
|
2083
|
-
|
|
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
2084
|
});
|
|
2085
2085
|
}
|
|
2086
2086
|
}, []), $(() => {
|
|
2087
|
-
if (!
|
|
2088
|
-
const
|
|
2089
|
-
...
|
|
2090
|
-
debug:
|
|
2091
|
-
timeouts:
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
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?.(_);
|
|
2095
2097
|
},
|
|
2096
|
-
onError: (
|
|
2097
|
-
|
|
2098
|
+
onError: (_) => {
|
|
2099
|
+
J(_.message), H.current?.(_);
|
|
2098
2100
|
},
|
|
2099
2101
|
onJoined: () => {
|
|
2100
|
-
const
|
|
2101
|
-
|
|
2102
|
+
const _ = N.globalState?.SessionId;
|
|
2103
|
+
ue.current && _ && window.history.replaceState(null, "", `/s/${_}${window.location.search}`), ce.current?.(_);
|
|
2102
2104
|
}
|
|
2103
2105
|
});
|
|
2104
|
-
|
|
2105
|
-
const I = new
|
|
2106
|
-
return
|
|
2107
|
-
|
|
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:", _);
|
|
2108
2110
|
}), () => {
|
|
2109
|
-
|
|
2111
|
+
N.disconnect(), C.current = null, I.dispose(), v.current = null;
|
|
2110
2112
|
};
|
|
2111
|
-
}, [
|
|
2112
|
-
const
|
|
2113
|
-
const
|
|
2114
|
-
|
|
2115
|
-
}, []),
|
|
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";
|
|
2116
2118
|
return {
|
|
2117
|
-
connectionState:
|
|
2118
|
-
error:
|
|
2119
|
-
stores:
|
|
2120
|
-
client:
|
|
2121
|
-
registry:
|
|
2122
|
-
clientRef:
|
|
2123
|
-
uiRef:
|
|
2124
|
-
registryRef:
|
|
2125
|
-
onAction:
|
|
2126
|
-
isReady:
|
|
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
|
|
2127
2129
|
};
|
|
2128
2130
|
}
|
|
2129
|
-
function
|
|
2130
|
-
const e =
|
|
2131
|
-
return
|
|
2131
|
+
function Nn(r) {
|
|
2132
|
+
const e = E(!1);
|
|
2133
|
+
return z(() => {
|
|
2132
2134
|
if (e.current) return;
|
|
2133
2135
|
e.current = !0;
|
|
2134
2136
|
const t = document.createElement("link");
|
|
2135
2137
|
t.rel = "stylesheet", t.href = r, document.head.appendChild(t);
|
|
2136
2138
|
}, [r]);
|
|
2137
2139
|
}
|
|
2138
|
-
const
|
|
2139
|
-
function
|
|
2140
|
+
const mt = nt(null);
|
|
2141
|
+
function an(r, e) {
|
|
2140
2142
|
return e ? r.replace(/\{(\w+)\}/g, (t, n) => e[n] ?? `{${n}}`) : r;
|
|
2141
2143
|
}
|
|
2142
|
-
function
|
|
2144
|
+
function cn(r, e) {
|
|
2143
2145
|
const n = new URLSearchParams(window.location.search).get("lang");
|
|
2144
2146
|
if (n && r.includes(n))
|
|
2145
2147
|
return n;
|
|
2146
2148
|
const o = navigator.language.split("-")[0];
|
|
2147
2149
|
return r.includes(o) ? o : e && r.includes(e) ? e : "en";
|
|
2148
2150
|
}
|
|
2149
|
-
function
|
|
2150
|
-
return e ?
|
|
2151
|
+
function un(r, e, t) {
|
|
2152
|
+
return e ? cn(r, t) : t && r.includes(t) ? t : "en";
|
|
2151
2153
|
}
|
|
2152
|
-
function
|
|
2154
|
+
function Cn({
|
|
2153
2155
|
children: r,
|
|
2154
2156
|
translations: e,
|
|
2155
2157
|
defaultLanguage: t,
|
|
2156
2158
|
detectLanguage: n = !1
|
|
2157
2159
|
}) {
|
|
2158
|
-
const o = Object.keys(e), s =
|
|
2160
|
+
const o = Object.keys(e), s = un(o, n, t), i = e[s] ?? e.en, a = L(
|
|
2159
2161
|
() => ({
|
|
2160
2162
|
t: (u, d) => {
|
|
2161
2163
|
const l = i[u];
|
|
2162
|
-
return
|
|
2164
|
+
return an(l, d);
|
|
2163
2165
|
},
|
|
2164
2166
|
locale: s,
|
|
2165
2167
|
translations: i
|
|
2166
2168
|
}),
|
|
2167
2169
|
[i, s]
|
|
2168
2170
|
);
|
|
2169
|
-
return /* @__PURE__ */ b.jsx(
|
|
2171
|
+
return /* @__PURE__ */ b.jsx(mt, { value: a, children: r });
|
|
2170
2172
|
}
|
|
2171
|
-
function
|
|
2172
|
-
const r =
|
|
2173
|
+
function In() {
|
|
2174
|
+
const r = Me(mt);
|
|
2173
2175
|
if (!r)
|
|
2174
2176
|
throw new Error("useI18n must be used within an I18nProvider");
|
|
2175
2177
|
return r;
|
|
2176
2178
|
}
|
|
2177
2179
|
export {
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
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,
|
|
2226
2228
|
F as useUiNode,
|
|
2227
|
-
|
|
2229
|
+
mn as useUiStore
|
|
2228
2230
|
};
|