@ikonai/sdk-react-ui 1.0.69 → 1.0.71
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/use-ikon-app.d.ts +5 -3
- package/auth/storage.d.ts +14 -0
- package/auth/types.d.ts +15 -2
- package/index.d.ts +0 -1
- package/index.js +953 -1033
- package/package.json +1 -1
- package/modules.d.ts +0 -15
package/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IkonUiCore as
|
|
2
|
-
import { UiStreamStore as
|
|
3
|
-
import
|
|
4
|
-
import { createLogger as
|
|
5
|
-
import { randomUuid as
|
|
6
|
-
var
|
|
1
|
+
import { IkonUiCore as Sn, UiStreamStore as wn, LiveSnapshotCache as Ut, prefetchBootSnapshot as vn } from "@ikonai/sdk-ui";
|
|
2
|
+
import { UiStreamStore as Bs } from "@ikonai/sdk-ui";
|
|
3
|
+
import En, { useSyncExternalStore as ot, useMemo as W, memo as G, useRef as E, useCallback as j, Fragment as Rn, useEffect as C, useState as x, use as st, createContext as Mt, useReducer as An } from "react";
|
|
4
|
+
import { createLogger as oe, isInspectModeEnabled as Tn, getOrCreateDeviceId as kn, getSameOriginAuthUrl as Cn, abortSignalTimeout as Dt, deriveAuthUrl as ve, getDebugOverlayParam as In, subscribeToLogEvents as jt, LogLevel as Je, parseUrlParams as _n, clearSessionParamsFromUrl as On, isCloudEnvironment as ht, extractUserIdFromToken as pt, deriveBackendType as mt, IkonClient as xn, AccessDeniedError as Nn, ServerFullError as Ln, AuthenticationError as Pn, isDebugModeEnabled as $t, getLangParam as Un } from "@ikonai/sdk";
|
|
5
|
+
import { randomUuid as Vs } from "@ikonai/sdk";
|
|
6
|
+
var Ce = { exports: {} }, ge = {};
|
|
7
7
|
/**
|
|
8
8
|
* @license React
|
|
9
9
|
* react-jsx-runtime.production.js
|
|
@@ -13,10 +13,10 @@ var Ie = { exports: {} }, me = {};
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
if (
|
|
19
|
-
|
|
16
|
+
var gt;
|
|
17
|
+
function Mn() {
|
|
18
|
+
if (gt) return ge;
|
|
19
|
+
gt = 1;
|
|
20
20
|
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
21
21
|
function n(r, o, s) {
|
|
22
22
|
var i = null;
|
|
@@ -33,9 +33,9 @@ function Bn() {
|
|
|
33
33
|
props: s
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
return
|
|
36
|
+
return ge.Fragment = e, ge.jsx = n, ge.jsxs = n, ge;
|
|
37
37
|
}
|
|
38
|
-
var
|
|
38
|
+
var ye = {};
|
|
39
39
|
/**
|
|
40
40
|
* @license React
|
|
41
41
|
* react-jsx-runtime.development.js
|
|
@@ -45,20 +45,20 @@ var ge = {};
|
|
|
45
45
|
* This source code is licensed under the MIT license found in the
|
|
46
46
|
* LICENSE file in the root directory of this source tree.
|
|
47
47
|
*/
|
|
48
|
-
var
|
|
49
|
-
function
|
|
50
|
-
return
|
|
51
|
-
function t(
|
|
52
|
-
if (
|
|
53
|
-
if (typeof
|
|
54
|
-
return
|
|
55
|
-
if (typeof
|
|
56
|
-
switch (
|
|
48
|
+
var yt;
|
|
49
|
+
function Dn() {
|
|
50
|
+
return yt || (yt = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
51
|
+
function t(d) {
|
|
52
|
+
if (d == null) return null;
|
|
53
|
+
if (typeof d == "function")
|
|
54
|
+
return d.$$typeof === P ? null : d.displayName || d.name || null;
|
|
55
|
+
if (typeof d == "string") return d;
|
|
56
|
+
switch (d) {
|
|
57
57
|
case p:
|
|
58
58
|
return "Fragment";
|
|
59
|
-
case b:
|
|
60
|
-
return "Profiler";
|
|
61
59
|
case S:
|
|
60
|
+
return "Profiler";
|
|
61
|
+
case b:
|
|
62
62
|
return "StrictMode";
|
|
63
63
|
case U:
|
|
64
64
|
return "Suspense";
|
|
@@ -67,222 +67,222 @@ function Fn() {
|
|
|
67
67
|
case _:
|
|
68
68
|
return "Activity";
|
|
69
69
|
}
|
|
70
|
-
if (typeof
|
|
71
|
-
switch (typeof
|
|
70
|
+
if (typeof d == "object")
|
|
71
|
+
switch (typeof d.tag == "number" && console.error(
|
|
72
72
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
73
|
-
),
|
|
73
|
+
), d.$$typeof) {
|
|
74
74
|
case g:
|
|
75
75
|
return "Portal";
|
|
76
76
|
case v:
|
|
77
|
-
return
|
|
77
|
+
return d.displayName || "Context";
|
|
78
78
|
case R:
|
|
79
|
-
return (
|
|
79
|
+
return (d._context.displayName || "Context") + ".Consumer";
|
|
80
80
|
case T:
|
|
81
|
-
var A =
|
|
82
|
-
return
|
|
81
|
+
var A = d.render;
|
|
82
|
+
return d = d.displayName, d || (d = A.displayName || A.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d;
|
|
83
83
|
case te:
|
|
84
|
-
return A =
|
|
84
|
+
return A = d.displayName || null, A !== null ? A : t(d.type) || "Memo";
|
|
85
85
|
case z:
|
|
86
|
-
A =
|
|
86
|
+
A = d._payload, d = d._init;
|
|
87
87
|
try {
|
|
88
|
-
return t(
|
|
88
|
+
return t(d(A));
|
|
89
89
|
} catch {
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
return null;
|
|
93
93
|
}
|
|
94
|
-
function e(
|
|
95
|
-
return "" +
|
|
94
|
+
function e(d) {
|
|
95
|
+
return "" + d;
|
|
96
96
|
}
|
|
97
|
-
function n(
|
|
97
|
+
function n(d) {
|
|
98
98
|
try {
|
|
99
|
-
e(
|
|
99
|
+
e(d);
|
|
100
100
|
var A = !1;
|
|
101
101
|
} catch {
|
|
102
102
|
A = !0;
|
|
103
103
|
}
|
|
104
104
|
if (A) {
|
|
105
105
|
A = console;
|
|
106
|
-
var O = A.error,
|
|
106
|
+
var O = A.error, N = typeof Symbol == "function" && Symbol.toStringTag && d[Symbol.toStringTag] || d.constructor.name || "Object";
|
|
107
107
|
return O.call(
|
|
108
108
|
A,
|
|
109
109
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
110
|
-
|
|
111
|
-
), e(
|
|
110
|
+
N
|
|
111
|
+
), e(d);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
function r(
|
|
115
|
-
if (
|
|
116
|
-
if (typeof
|
|
114
|
+
function r(d) {
|
|
115
|
+
if (d === p) return "<>";
|
|
116
|
+
if (typeof d == "object" && d !== null && d.$$typeof === z)
|
|
117
117
|
return "<...>";
|
|
118
118
|
try {
|
|
119
|
-
var A = t(
|
|
119
|
+
var A = t(d);
|
|
120
120
|
return A ? "<" + A + ">" : "<...>";
|
|
121
121
|
} catch {
|
|
122
122
|
return "<...>";
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
function o() {
|
|
126
|
-
var
|
|
127
|
-
return
|
|
126
|
+
var d = M.A;
|
|
127
|
+
return d === null ? null : d.getOwner();
|
|
128
128
|
}
|
|
129
129
|
function s() {
|
|
130
130
|
return Error("react-stack-top-frame");
|
|
131
131
|
}
|
|
132
|
-
function i(
|
|
133
|
-
if (B.call(
|
|
134
|
-
var A = Object.getOwnPropertyDescriptor(
|
|
132
|
+
function i(d) {
|
|
133
|
+
if (B.call(d, "key")) {
|
|
134
|
+
var A = Object.getOwnPropertyDescriptor(d, "key").get;
|
|
135
135
|
if (A && A.isReactWarning) return !1;
|
|
136
136
|
}
|
|
137
|
-
return
|
|
137
|
+
return d.key !== void 0;
|
|
138
138
|
}
|
|
139
|
-
function a(
|
|
139
|
+
function a(d, A) {
|
|
140
140
|
function O() {
|
|
141
141
|
K || (K = !0, console.error(
|
|
142
142
|
"%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)",
|
|
143
143
|
A
|
|
144
144
|
));
|
|
145
145
|
}
|
|
146
|
-
O.isReactWarning = !0, Object.defineProperty(
|
|
146
|
+
O.isReactWarning = !0, Object.defineProperty(d, "key", {
|
|
147
147
|
get: O,
|
|
148
148
|
configurable: !0
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
151
|
function l() {
|
|
152
|
-
var
|
|
153
|
-
return H[
|
|
152
|
+
var d = t(this.type);
|
|
153
|
+
return H[d] || (H[d] = !0, console.error(
|
|
154
154
|
"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."
|
|
155
|
-
)),
|
|
155
|
+
)), d = this.props.ref, d !== void 0 ? d : null;
|
|
156
156
|
}
|
|
157
|
-
function d
|
|
158
|
-
var
|
|
159
|
-
return
|
|
157
|
+
function h(d, A, O, N, se, me) {
|
|
158
|
+
var L = O.ref;
|
|
159
|
+
return d = {
|
|
160
160
|
$$typeof: u,
|
|
161
|
-
type:
|
|
161
|
+
type: d,
|
|
162
162
|
key: A,
|
|
163
163
|
props: O,
|
|
164
|
-
_owner:
|
|
165
|
-
}, (
|
|
164
|
+
_owner: N
|
|
165
|
+
}, (L !== void 0 ? L : null) !== null ? Object.defineProperty(d, "ref", {
|
|
166
166
|
enumerable: !1,
|
|
167
167
|
get: l
|
|
168
|
-
}) : Object.defineProperty(
|
|
168
|
+
}) : Object.defineProperty(d, "ref", { enumerable: !1, value: null }), d._store = {}, Object.defineProperty(d._store, "validated", {
|
|
169
169
|
configurable: !1,
|
|
170
170
|
enumerable: !1,
|
|
171
171
|
writable: !0,
|
|
172
172
|
value: 0
|
|
173
|
-
}), Object.defineProperty(
|
|
173
|
+
}), Object.defineProperty(d, "_debugInfo", {
|
|
174
174
|
configurable: !1,
|
|
175
175
|
enumerable: !1,
|
|
176
176
|
writable: !0,
|
|
177
177
|
value: null
|
|
178
|
-
}), Object.defineProperty(
|
|
178
|
+
}), Object.defineProperty(d, "_debugStack", {
|
|
179
179
|
configurable: !1,
|
|
180
180
|
enumerable: !1,
|
|
181
181
|
writable: !0,
|
|
182
|
-
value:
|
|
183
|
-
}), Object.defineProperty(
|
|
182
|
+
value: se
|
|
183
|
+
}), Object.defineProperty(d, "_debugTask", {
|
|
184
184
|
configurable: !1,
|
|
185
185
|
enumerable: !1,
|
|
186
186
|
writable: !0,
|
|
187
|
-
value:
|
|
188
|
-
}), Object.freeze && (Object.freeze(
|
|
189
|
-
}
|
|
190
|
-
function
|
|
191
|
-
var
|
|
192
|
-
if (
|
|
193
|
-
if (
|
|
194
|
-
if ($(
|
|
195
|
-
for (
|
|
196
|
-
y(
|
|
197
|
-
Object.freeze && Object.freeze(
|
|
187
|
+
value: me
|
|
188
|
+
}), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
|
|
189
|
+
}
|
|
190
|
+
function f(d, A, O, N, se, me) {
|
|
191
|
+
var L = A.children;
|
|
192
|
+
if (L !== void 0)
|
|
193
|
+
if (N)
|
|
194
|
+
if ($(L)) {
|
|
195
|
+
for (N = 0; N < L.length; N++)
|
|
196
|
+
y(L[N]);
|
|
197
|
+
Object.freeze && Object.freeze(L);
|
|
198
198
|
} else
|
|
199
199
|
console.error(
|
|
200
200
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
201
201
|
);
|
|
202
|
-
else y(
|
|
202
|
+
else y(L);
|
|
203
203
|
if (B.call(A, "key")) {
|
|
204
|
-
|
|
205
|
-
var Q = Object.keys(A).filter(function(
|
|
206
|
-
return
|
|
204
|
+
L = t(d);
|
|
205
|
+
var Q = Object.keys(A).filter(function(Me) {
|
|
206
|
+
return Me !== "key";
|
|
207
207
|
});
|
|
208
|
-
|
|
208
|
+
N = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", pe[L + N] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
209
209
|
`A props object containing a "key" prop is being spread into JSX:
|
|
210
210
|
let props = %s;
|
|
211
211
|
<%s {...props} />
|
|
212
212
|
React keys must be passed directly to JSX without using spread:
|
|
213
213
|
let props = %s;
|
|
214
214
|
<%s key={someKey} {...props} />`,
|
|
215
|
-
|
|
216
|
-
|
|
215
|
+
N,
|
|
216
|
+
L,
|
|
217
217
|
Q,
|
|
218
|
-
|
|
219
|
-
),
|
|
218
|
+
L
|
|
219
|
+
), pe[L + N] = !0);
|
|
220
220
|
}
|
|
221
|
-
if (
|
|
221
|
+
if (L = null, O !== void 0 && (n(O), L = "" + O), i(A) && (n(A.key), L = "" + A.key), "key" in A) {
|
|
222
222
|
O = {};
|
|
223
|
-
for (var
|
|
224
|
-
|
|
223
|
+
for (var ie in A)
|
|
224
|
+
ie !== "key" && (O[ie] = A[ie]);
|
|
225
225
|
} else O = A;
|
|
226
|
-
return
|
|
226
|
+
return L && a(
|
|
227
227
|
O,
|
|
228
|
-
typeof
|
|
229
|
-
),
|
|
230
|
-
|
|
231
|
-
|
|
228
|
+
typeof d == "function" ? d.displayName || d.name || "Unknown" : d
|
|
229
|
+
), h(
|
|
230
|
+
d,
|
|
231
|
+
L,
|
|
232
232
|
O,
|
|
233
233
|
o(),
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
se,
|
|
235
|
+
me
|
|
236
236
|
);
|
|
237
237
|
}
|
|
238
|
-
function y(
|
|
239
|
-
m(
|
|
238
|
+
function y(d) {
|
|
239
|
+
m(d) ? d._store && (d._store.validated = 1) : typeof d == "object" && d !== null && d.$$typeof === z && (d._payload.status === "fulfilled" ? m(d._payload.value) && d._payload.value._store && (d._payload.value._store.validated = 1) : d._store && (d._store.validated = 1));
|
|
240
240
|
}
|
|
241
|
-
function m(
|
|
242
|
-
return typeof
|
|
241
|
+
function m(d) {
|
|
242
|
+
return typeof d == "object" && d !== null && d.$$typeof === u;
|
|
243
243
|
}
|
|
244
|
-
var c =
|
|
244
|
+
var c = En, u = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), b = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), R = Symbol.for("react.consumer"), v = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), U = Symbol.for("react.suspense"), ee = Symbol.for("react.suspense_list"), te = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), _ = Symbol.for("react.activity"), P = Symbol.for("react.client.reference"), M = c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, B = Object.prototype.hasOwnProperty, $ = Array.isArray, V = console.createTask ? console.createTask : function() {
|
|
245
245
|
return null;
|
|
246
246
|
};
|
|
247
247
|
c = {
|
|
248
|
-
react_stack_bottom_frame: function(
|
|
249
|
-
return
|
|
248
|
+
react_stack_bottom_frame: function(d) {
|
|
249
|
+
return d();
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
|
-
var K, H = {},
|
|
252
|
+
var K, H = {}, Ee = c.react_stack_bottom_frame.bind(
|
|
253
253
|
c,
|
|
254
254
|
s
|
|
255
|
-
)(),
|
|
256
|
-
|
|
257
|
-
var
|
|
258
|
-
return
|
|
259
|
-
|
|
255
|
+
)(), Re = V(r(s)), pe = {};
|
|
256
|
+
ye.Fragment = p, ye.jsx = function(d, A, O) {
|
|
257
|
+
var N = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
258
|
+
return f(
|
|
259
|
+
d,
|
|
260
260
|
A,
|
|
261
261
|
O,
|
|
262
262
|
!1,
|
|
263
|
-
|
|
264
|
-
|
|
263
|
+
N ? Error("react-stack-top-frame") : Ee,
|
|
264
|
+
N ? V(r(d)) : Re
|
|
265
265
|
);
|
|
266
|
-
},
|
|
267
|
-
var
|
|
268
|
-
return
|
|
269
|
-
|
|
266
|
+
}, ye.jsxs = function(d, A, O) {
|
|
267
|
+
var N = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
268
|
+
return f(
|
|
269
|
+
d,
|
|
270
270
|
A,
|
|
271
271
|
O,
|
|
272
272
|
!0,
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
N ? Error("react-stack-top-frame") : Ee,
|
|
274
|
+
N ? V(r(d)) : Re
|
|
275
275
|
);
|
|
276
276
|
};
|
|
277
|
-
})()),
|
|
277
|
+
})()), ye;
|
|
278
278
|
}
|
|
279
|
-
var
|
|
280
|
-
function
|
|
281
|
-
return
|
|
279
|
+
var bt;
|
|
280
|
+
function jn() {
|
|
281
|
+
return bt || (bt = 1, process.env.NODE_ENV === "production" ? Ce.exports = Mn() : Ce.exports = Dn()), Ce.exports;
|
|
282
282
|
}
|
|
283
|
-
var w =
|
|
284
|
-
function
|
|
285
|
-
const n =
|
|
283
|
+
var w = jn();
|
|
284
|
+
function $n(t, e) {
|
|
285
|
+
const n = ot(
|
|
286
286
|
(r) => t.subscribe(r),
|
|
287
287
|
() => {
|
|
288
288
|
const r = t.getSnapshot(), o = e ?? r.rootViewId, s = o ? r.views.get(o) : void 0;
|
|
@@ -302,15 +302,15 @@ function Wn(t, e) {
|
|
|
302
302
|
}, [n]);
|
|
303
303
|
}
|
|
304
304
|
function Z(t, e) {
|
|
305
|
-
const n =
|
|
305
|
+
const n = ot(
|
|
306
306
|
(r) => t.subscribeNode(e, r),
|
|
307
307
|
() => t.getNodeVersion(e),
|
|
308
308
|
() => t.getNodeVersion(e)
|
|
309
309
|
);
|
|
310
310
|
return W(() => t.getNode(e), [t, e, n]);
|
|
311
311
|
}
|
|
312
|
-
const
|
|
313
|
-
function
|
|
312
|
+
const Bn = oe("UIRenderer");
|
|
313
|
+
function Fn(t) {
|
|
314
314
|
if (t === void 0)
|
|
315
315
|
return "{}";
|
|
316
316
|
if (typeof t == "string")
|
|
@@ -321,18 +321,18 @@ function Gn(t) {
|
|
|
321
321
|
return "{}";
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function Vn(t) {
|
|
325
325
|
const e = t.styleIds;
|
|
326
326
|
return Array.isArray(e) ? e : [];
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function Wn(t) {
|
|
329
329
|
const e = t.children;
|
|
330
330
|
return Array.isArray(e) ? e : [];
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function Kn(t, e) {
|
|
333
333
|
return t.nodeId === e.nodeId && t.context === e.context;
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function Yn(t) {
|
|
336
336
|
if (t.length === 0) return "";
|
|
337
337
|
if (t.length === 1) return t[0].id;
|
|
338
338
|
let e = t[0].id;
|
|
@@ -340,8 +340,8 @@ function Hn(t) {
|
|
|
340
340
|
e += "," + t[n].id;
|
|
341
341
|
return e;
|
|
342
342
|
}
|
|
343
|
-
const
|
|
344
|
-
const r = Z(n.store, e), o = r ?
|
|
343
|
+
const Ze = G(function t({ nodeId: e, context: n }) {
|
|
344
|
+
const r = Z(n.store, e), o = r ? Wn(r) : [], s = Yn(o), i = W(
|
|
345
345
|
() => o.length === 0 ? null : o.map((y) => /* @__PURE__ */ w.jsx(t, { nodeId: y.id, context: n }, y.id)),
|
|
346
346
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
347
347
|
[s, n]
|
|
@@ -349,31 +349,31 @@ const et = Y(function t({ nodeId: e, context: n }) {
|
|
|
349
349
|
if (!r)
|
|
350
350
|
return null;
|
|
351
351
|
if (r.type === "root")
|
|
352
|
-
return /* @__PURE__ */ w.jsx(
|
|
352
|
+
return /* @__PURE__ */ w.jsx(Rn, { children: i }, r.id);
|
|
353
353
|
const a = n.library.resolve(r);
|
|
354
354
|
if (!a)
|
|
355
|
-
return
|
|
356
|
-
const l =
|
|
357
|
-
return /* @__PURE__ */ w.jsx(
|
|
358
|
-
},
|
|
359
|
-
function
|
|
360
|
-
return !Array.isArray(t) || t.length === 0 ? null : t.map((n) => /* @__PURE__ */ w.jsx(
|
|
361
|
-
}
|
|
362
|
-
function
|
|
355
|
+
return Bn.warn(`No renderer for node type ${r.type}`), null;
|
|
356
|
+
const l = Vn(r), h = l.length > 0 ? l.join(" ") : void 0, f = a;
|
|
357
|
+
return /* @__PURE__ */ w.jsx(f, { nodeId: e, context: n, className: h });
|
|
358
|
+
}, Kn);
|
|
359
|
+
function Gn(t, e) {
|
|
360
|
+
return !Array.isArray(t) || t.length === 0 ? null : t.map((n) => /* @__PURE__ */ w.jsx(Ze, { nodeId: n.id, context: e }, n.id));
|
|
361
|
+
}
|
|
362
|
+
function zn(t, e) {
|
|
363
363
|
return t.store === e.store && t.library === e.library && t.viewId === e.viewId && t.emptyFallback === e.emptyFallback;
|
|
364
364
|
}
|
|
365
|
-
const
|
|
366
|
-
const { rootViewId: l, rootNodeId:
|
|
367
|
-
|
|
365
|
+
const Xn = G(function({ store: e, library: n, viewId: r, emptyFallback: o = null, onAction: s, client: i, video: a }) {
|
|
366
|
+
const { rootViewId: l, rootNodeId: h } = $n(e, r), f = E(s);
|
|
367
|
+
f.current = s;
|
|
368
368
|
const y = E(i);
|
|
369
369
|
y.current = i;
|
|
370
370
|
const m = E(a);
|
|
371
371
|
m.current = a;
|
|
372
|
-
const c =
|
|
372
|
+
const c = j((g, p) => {
|
|
373
373
|
if (!g)
|
|
374
374
|
return;
|
|
375
|
-
const
|
|
376
|
-
|
|
375
|
+
const b = Fn(p);
|
|
376
|
+
f.current?.(g, b);
|
|
377
377
|
}, []), u = W(() => {
|
|
378
378
|
const g = {
|
|
379
379
|
store: e,
|
|
@@ -381,10 +381,10 @@ const Zn = Y(function({ store: e, library: n, viewId: r, emptyFallback: o = null
|
|
|
381
381
|
handlerCache: e.handlerCache,
|
|
382
382
|
// Access payloads from store at call time, not captured snapshot
|
|
383
383
|
getPayload: (p) => e.getSnapshot().payloads.get(p),
|
|
384
|
-
renderChildren: (p) =>
|
|
384
|
+
renderChildren: (p) => Gn(p, g),
|
|
385
385
|
renderView: (p) => {
|
|
386
|
-
const
|
|
387
|
-
return
|
|
386
|
+
const b = e.getSnapshot().views.get(p);
|
|
387
|
+
return b ? /* @__PURE__ */ w.jsx(Ze, { nodeId: b.id, context: g }) : null;
|
|
388
388
|
},
|
|
389
389
|
dispatchAction: c,
|
|
390
390
|
// Access client/video via refs to avoid context recreation
|
|
@@ -397,9 +397,9 @@ const Zn = Y(function({ store: e, library: n, viewId: r, emptyFallback: o = null
|
|
|
397
397
|
};
|
|
398
398
|
return g;
|
|
399
399
|
}, [e, n, c]);
|
|
400
|
-
return !l || !
|
|
401
|
-
},
|
|
402
|
-
class
|
|
400
|
+
return !l || !h ? o : /* @__PURE__ */ w.jsx("div", { "data-ikon-view-id": l, style: { display: "contents" }, children: /* @__PURE__ */ w.jsx(Ze, { nodeId: h, context: u }) });
|
|
401
|
+
}, zn);
|
|
402
|
+
class Hn {
|
|
403
403
|
constructor(e, n) {
|
|
404
404
|
if (this.fallback = n, e)
|
|
405
405
|
for (const [r, o] of e)
|
|
@@ -416,19 +416,19 @@ class Qn {
|
|
|
416
416
|
return this.renderers.get(e.type) ?? this.fallback;
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function Ts(t, e) {
|
|
420
420
|
const n = Object.entries(t);
|
|
421
|
-
return new
|
|
421
|
+
return new Hn(n, e);
|
|
422
422
|
}
|
|
423
|
-
function
|
|
424
|
-
return
|
|
423
|
+
function ks(t) {
|
|
424
|
+
return ot(
|
|
425
425
|
(e) => t.subscribe(e),
|
|
426
426
|
() => t.getSnapshot(),
|
|
427
427
|
() => t.getSnapshot()
|
|
428
428
|
);
|
|
429
429
|
}
|
|
430
|
-
function
|
|
431
|
-
const t =
|
|
430
|
+
function qn() {
|
|
431
|
+
const t = Tn();
|
|
432
432
|
return C(() => {
|
|
433
433
|
if (!t)
|
|
434
434
|
return;
|
|
@@ -465,7 +465,7 @@ function er() {
|
|
|
465
465
|
return;
|
|
466
466
|
c.relatedTarget?.closest?.("[data-ikon-source]") !== n && s();
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function h(c) {
|
|
469
469
|
if (!e)
|
|
470
470
|
return;
|
|
471
471
|
const u = c.target.closest?.("[data-ikon-source]");
|
|
@@ -479,7 +479,7 @@ function er() {
|
|
|
479
479
|
};
|
|
480
480
|
window.dispatchEvent(new CustomEvent("ikon-inspect-select", { detail: g })), window.parent.postMessage({ type: "ikon-element-selected", payload: g }, "*");
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function f(c, u) {
|
|
483
483
|
return document.elementFromPoint(c, u)?.closest?.("[data-ikon-source]");
|
|
484
484
|
}
|
|
485
485
|
function y(c) {
|
|
@@ -498,7 +498,7 @@ function er() {
|
|
|
498
498
|
return;
|
|
499
499
|
}
|
|
500
500
|
if (c.data?.type === "ikon-inspect-at") {
|
|
501
|
-
const u =
|
|
501
|
+
const u = f(c.data.x, c.data.y);
|
|
502
502
|
y(u);
|
|
503
503
|
const g = u?.getAttribute("data-ikon-source") ?? "";
|
|
504
504
|
window.parent.postMessage({
|
|
@@ -507,7 +507,7 @@ function er() {
|
|
|
507
507
|
}, "*");
|
|
508
508
|
}
|
|
509
509
|
if (c.data?.type === "ikon-inspect-click") {
|
|
510
|
-
const u =
|
|
510
|
+
const u = f(c.data.x, c.data.y);
|
|
511
511
|
if (u) {
|
|
512
512
|
const g = {
|
|
513
513
|
sourceMarker: u.getAttribute("data-ikon-source") ?? "",
|
|
@@ -518,7 +518,7 @@ function er() {
|
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
520
|
if (c.data?.type === "ikon-inspect-click-add") {
|
|
521
|
-
const u =
|
|
521
|
+
const u = f(c.data.x, c.data.y);
|
|
522
522
|
if (u) {
|
|
523
523
|
const g = {
|
|
524
524
|
sourceMarker: u.getAttribute("data-ikon-source") ?? "",
|
|
@@ -532,10 +532,10 @@ function er() {
|
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
if (c.data?.type === "ikon-inspect-rect") {
|
|
535
|
-
const { x1: u, y1: g, x2: p, y2:
|
|
535
|
+
const { x1: u, y1: g, x2: p, y2: b, append: S } = c.data, R = document.querySelectorAll("[data-ikon-source]"), v = [];
|
|
536
536
|
for (const T of Array.from(R)) {
|
|
537
537
|
const U = T.getBoundingClientRect();
|
|
538
|
-
U.right > u && U.left < p && U.bottom > g && U.top <
|
|
538
|
+
U.right > u && U.left < p && U.bottom > g && U.top < b && v.push({
|
|
539
539
|
sourceMarker: T.getAttribute("data-ikon-source") ?? "",
|
|
540
540
|
tagName: T.tagName.toLowerCase(),
|
|
541
541
|
textContent: (T.textContent ?? "").trim().substring(0, 200)
|
|
@@ -543,45 +543,45 @@ function er() {
|
|
|
543
543
|
}
|
|
544
544
|
v.length > 0 && window.parent.postMessage({
|
|
545
545
|
type: "ikon-inspect-rect-result",
|
|
546
|
-
payload: { elements: v, append:
|
|
546
|
+
payload: { elements: v, append: S ?? !1 }
|
|
547
547
|
}, "*");
|
|
548
548
|
}
|
|
549
549
|
c.data?.type === "ikon-inspect-highlight" && i(c.data.markers ?? []), c.data?.type === "ikon-inspect-clear" && s();
|
|
550
550
|
}
|
|
551
|
-
return document.addEventListener("mouseover", a, !0), document.addEventListener("mouseout", l, !0), document.addEventListener("click",
|
|
552
|
-
document.removeEventListener("mouseover", a, !0), document.removeEventListener("mouseout", l, !0), document.removeEventListener("click",
|
|
551
|
+
return document.addEventListener("mouseover", a, !0), document.addEventListener("mouseout", l, !0), document.addEventListener("click", h, !0), window.addEventListener("message", m), () => {
|
|
552
|
+
document.removeEventListener("mouseover", a, !0), document.removeEventListener("mouseout", l, !0), document.removeEventListener("click", h, !0), window.removeEventListener("message", m), s(), i([]), o.remove();
|
|
553
553
|
};
|
|
554
554
|
}, [t]), null;
|
|
555
555
|
}
|
|
556
|
-
const
|
|
557
|
-
function
|
|
556
|
+
const Jn = oe("IkonUiSurface"), Qe = "ikon-ui";
|
|
557
|
+
function Zn(t, e) {
|
|
558
558
|
return t === e;
|
|
559
559
|
}
|
|
560
|
-
const
|
|
560
|
+
const Bt = G(function({ stores: e, registry: n, category: r = Qe, onAction: o, client: s }) {
|
|
561
561
|
const i = W(() => Array.from(e.keys()).sort().join(","), [e]), a = E(o);
|
|
562
562
|
a.current = o;
|
|
563
563
|
const l = E(s);
|
|
564
564
|
l.current = s;
|
|
565
|
-
const
|
|
565
|
+
const h = W(
|
|
566
566
|
() => {
|
|
567
567
|
const m = [];
|
|
568
568
|
for (const [c, u] of e) {
|
|
569
569
|
const g = u.store.getSnapshot();
|
|
570
|
-
|
|
570
|
+
Zn(u.category, r) && (!g.rootViewId || !g.views.has(g.rootViewId) || m.push({ key: c, store: u.store }));
|
|
571
571
|
}
|
|
572
572
|
return m;
|
|
573
573
|
},
|
|
574
574
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
575
575
|
[e, r, i]
|
|
576
|
-
),
|
|
576
|
+
), f = E(!1), y = h.length > 0;
|
|
577
577
|
return C(() => {
|
|
578
|
-
y && !
|
|
578
|
+
y && !f.current && (f.current = !0, Jn.debug("First UI render"));
|
|
579
579
|
}, [y]), y ? /* @__PURE__ */ w.jsxs(w.Fragment, { children: [
|
|
580
|
-
/* @__PURE__ */ w.jsx(
|
|
581
|
-
|
|
580
|
+
/* @__PURE__ */ w.jsx(qn, {}),
|
|
581
|
+
h.map(({ key: m, store: c }) => /* @__PURE__ */ w.jsx(Xn, { store: c, library: n, onAction: a.current, client: l.current, video: l.current?.media?.video }, m))
|
|
582
582
|
] }) : null;
|
|
583
583
|
});
|
|
584
|
-
class
|
|
584
|
+
class Qn {
|
|
585
585
|
core;
|
|
586
586
|
ownsCore;
|
|
587
587
|
stores = /* @__PURE__ */ new Map();
|
|
@@ -589,7 +589,7 @@ class rr {
|
|
|
589
589
|
unsubscribeClears;
|
|
590
590
|
unsubscribeStoreChanges;
|
|
591
591
|
constructor(e) {
|
|
592
|
-
this.core = e?.core ?? new
|
|
592
|
+
this.core = e?.core ?? new Sn({ client: e?.client, liveSnapshot: e?.liveSnapshot, bootSnapshot: e?.bootSnapshot }), this.ownsCore = !e?.core, this.unsubscribeClears = this.core.subscribeToUiStreamCleared(this.handleUiStreamCleared), this.unsubscribeStoreChanges = this.core.uiStore.subscribe(this.syncStreamSnapshot), this.syncAllStreams();
|
|
593
593
|
}
|
|
594
594
|
dispose() {
|
|
595
595
|
this.unsubscribeClears(), this.unsubscribeStoreChanges(), this.ownsCore && this.core.dispose(), this.listeners.clear(), this.stores.clear();
|
|
@@ -645,8 +645,8 @@ class rr {
|
|
|
645
645
|
if (n)
|
|
646
646
|
return n;
|
|
647
647
|
const r = {
|
|
648
|
-
category:
|
|
649
|
-
store: new
|
|
648
|
+
category: Qe,
|
|
649
|
+
store: new wn()
|
|
650
650
|
};
|
|
651
651
|
return this.stores.set(e, r), r;
|
|
652
652
|
}
|
|
@@ -654,7 +654,7 @@ class rr {
|
|
|
654
654
|
const r = this.stores.get(e);
|
|
655
655
|
if (!r)
|
|
656
656
|
return !1;
|
|
657
|
-
const o = n ?? this.core.uiStore.getSnapshot(e)?.category ??
|
|
657
|
+
const o = n ?? this.core.uiStore.getSnapshot(e)?.category ?? Qe;
|
|
658
658
|
return r.category === o ? !1 : (this.stores.set(e, { ...r, category: o }), !0);
|
|
659
659
|
}
|
|
660
660
|
notify(e) {
|
|
@@ -662,7 +662,7 @@ class rr {
|
|
|
662
662
|
n(e);
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function er(t) {
|
|
666
666
|
if (typeof t == "string") {
|
|
667
667
|
const e = t.trim();
|
|
668
668
|
return e.length > 0 ? e : void 0;
|
|
@@ -678,7 +678,7 @@ function de(t) {
|
|
|
678
678
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
|
-
function
|
|
681
|
+
function it(...t) {
|
|
682
682
|
let e = "";
|
|
683
683
|
for (const n of t)
|
|
684
684
|
if (n) {
|
|
@@ -687,19 +687,19 @@ function lt(...t) {
|
|
|
687
687
|
}
|
|
688
688
|
return e || void 0;
|
|
689
689
|
}
|
|
690
|
-
const
|
|
691
|
-
function
|
|
690
|
+
const St = /* @__PURE__ */ new WeakMap(), tr = {};
|
|
691
|
+
function at(t) {
|
|
692
692
|
if (!t)
|
|
693
|
-
return
|
|
694
|
-
const e =
|
|
693
|
+
return tr;
|
|
694
|
+
const e = St.get(t);
|
|
695
695
|
if (e)
|
|
696
696
|
return e;
|
|
697
697
|
const n = {};
|
|
698
698
|
for (const [r, o] of Object.entries(t))
|
|
699
699
|
o != null && (typeof o == "string" || typeof o == "number" || typeof o == "boolean") && (n[r] = o);
|
|
700
|
-
return
|
|
700
|
+
return St.set(t, n), n;
|
|
701
701
|
}
|
|
702
|
-
function
|
|
702
|
+
function nr(t) {
|
|
703
703
|
let e = t.parentElement;
|
|
704
704
|
for (; e; ) {
|
|
705
705
|
const r = window.getComputedStyle(e).overflowY;
|
|
@@ -709,32 +709,32 @@ function ir(t) {
|
|
|
709
709
|
}
|
|
710
710
|
return null;
|
|
711
711
|
}
|
|
712
|
-
const
|
|
713
|
-
function
|
|
712
|
+
const Ft = 1.5;
|
|
713
|
+
function Vt(t, e) {
|
|
714
714
|
requestAnimationFrame(() => {
|
|
715
|
-
const n = t.getBoundingClientRect(), r = e.getBoundingClientRect(), o = t.scrollTop + (r.bottom - n.bottom) + 16, i = Math.abs(o - t.scrollTop) > t.clientHeight *
|
|
715
|
+
const n = t.getBoundingClientRect(), r = e.getBoundingClientRect(), o = t.scrollTop + (r.bottom - n.bottom) + 16, i = Math.abs(o - t.scrollTop) > t.clientHeight * Ft ? "auto" : "smooth";
|
|
716
716
|
"scrollBehavior" in document.documentElement.style ? t.scrollTo({ top: o, behavior: i }) : t.scrollTop = o;
|
|
717
717
|
});
|
|
718
718
|
}
|
|
719
|
-
const
|
|
720
|
-
function
|
|
721
|
-
return Math.max(t.clientHeight *
|
|
719
|
+
const et = "data-ikon-scroll-indicator", rr = 0.15, xe = "data-ikon-at-bottom";
|
|
720
|
+
function Wt(t) {
|
|
721
|
+
return Math.max(t.clientHeight * rr, 20);
|
|
722
722
|
}
|
|
723
|
-
function
|
|
723
|
+
function or(t) {
|
|
724
724
|
return t.getAttribute(xe) !== "false";
|
|
725
725
|
}
|
|
726
|
-
function
|
|
726
|
+
function sr(t) {
|
|
727
727
|
t.getAttribute(xe) === null && (t.setAttribute(xe, "true"), t.addEventListener("scroll", () => {
|
|
728
|
-
const { scrollTop: e, scrollHeight: n, clientHeight: r } = t, s = n - e - r <=
|
|
728
|
+
const { scrollTop: e, scrollHeight: n, clientHeight: r } = t, s = n - e - r <= Wt(t);
|
|
729
729
|
t.setAttribute(xe, s ? "true" : "false");
|
|
730
730
|
}, { passive: !0 }));
|
|
731
731
|
}
|
|
732
|
-
function
|
|
733
|
-
const e = t.parentElement ?? t, n = e.querySelector(`[${
|
|
732
|
+
function ir(t) {
|
|
733
|
+
const e = t.parentElement ?? t, n = e.querySelector(`[${et}]`);
|
|
734
734
|
if (n)
|
|
735
735
|
return n;
|
|
736
736
|
const r = document.createElement("button");
|
|
737
|
-
return r.setAttribute(
|
|
737
|
+
return r.setAttribute(et, "true"), r.setAttribute("aria-label", "Scroll to latest"), r.textContent = "↓", Object.assign(r.style, {
|
|
738
738
|
position: "absolute",
|
|
739
739
|
bottom: "12px",
|
|
740
740
|
left: "50%",
|
|
@@ -762,22 +762,22 @@ function ur(t) {
|
|
|
762
762
|
r.style.opacity = "0.9";
|
|
763
763
|
}), e.appendChild(r), r;
|
|
764
764
|
}
|
|
765
|
-
function
|
|
766
|
-
const n =
|
|
765
|
+
function ar(t, e) {
|
|
766
|
+
const n = ir(t);
|
|
767
767
|
n.style.display = "flex";
|
|
768
768
|
const r = () => {
|
|
769
|
-
|
|
769
|
+
Vt(t, e), n.style.display = "none";
|
|
770
770
|
}, o = () => {
|
|
771
771
|
const { scrollTop: s, scrollHeight: i, clientHeight: a } = t;
|
|
772
|
-
i - s - a <=
|
|
772
|
+
i - s - a <= Wt(t) && (n.style.display = "none");
|
|
773
773
|
};
|
|
774
774
|
return n.addEventListener("click", r), t.addEventListener("scroll", o, { passive: !0 }), () => {
|
|
775
775
|
n.removeEventListener("click", r), t.removeEventListener("scroll", o);
|
|
776
776
|
};
|
|
777
777
|
}
|
|
778
|
-
function
|
|
779
|
-
const t =
|
|
780
|
-
const o = Z(r.store, n), s = E(null), i = de(o?.props?.targetViewId), a = o?.props?.focusOnly, l = typeof a == "boolean" ? a : void 0,
|
|
778
|
+
function cr() {
|
|
779
|
+
const t = G(function({ nodeId: n, context: r }) {
|
|
780
|
+
const o = Z(r.store, n), s = E(null), i = de(o?.props?.targetViewId), a = o?.props?.focusOnly, l = typeof a == "boolean" ? a : void 0, h = de(o?.props?.priority), f = de(o?.props?.key), y = o?.props?.preciseGeneratedAt;
|
|
781
781
|
return C(() => {
|
|
782
782
|
if (typeof document > "u")
|
|
783
783
|
return;
|
|
@@ -786,16 +786,16 @@ function fr() {
|
|
|
786
786
|
return;
|
|
787
787
|
let u;
|
|
788
788
|
if (l !== !0) {
|
|
789
|
-
const
|
|
790
|
-
if (
|
|
791
|
-
if (
|
|
792
|
-
u =
|
|
789
|
+
const S = nr(c);
|
|
790
|
+
if (S)
|
|
791
|
+
if (sr(S), h === "Polite" && !or(S))
|
|
792
|
+
u = ar(S, c);
|
|
793
793
|
else {
|
|
794
|
-
const U = (
|
|
795
|
-
U && (U.style.display = "none"),
|
|
794
|
+
const U = (S.parentElement ?? S).querySelector(`[${et}]`);
|
|
795
|
+
U && (U.style.display = "none"), Vt(S, c);
|
|
796
796
|
}
|
|
797
797
|
else typeof c.scrollIntoView == "function" && requestAnimationFrame(() => {
|
|
798
|
-
const R = c.getBoundingClientRect().top, v = typeof window < "u" ? window.innerHeight : 0, T = Math.abs(R) > v *
|
|
798
|
+
const R = c.getBoundingClientRect().top, v = typeof window < "u" ? window.innerHeight : 0, T = Math.abs(R) > v * Ft ? "auto" : "smooth";
|
|
799
799
|
try {
|
|
800
800
|
c.scrollIntoView({ behavior: T, block: "end", inline: "nearest" });
|
|
801
801
|
} catch {
|
|
@@ -811,7 +811,7 @@ function fr() {
|
|
|
811
811
|
c.focus();
|
|
812
812
|
}
|
|
813
813
|
return u;
|
|
814
|
-
}, [l,
|
|
814
|
+
}, [l, h, i, f, y]), o ? /* @__PURE__ */ w.jsx(
|
|
815
815
|
"span",
|
|
816
816
|
{
|
|
817
817
|
ref: s,
|
|
@@ -828,26 +828,26 @@ function fr() {
|
|
|
828
828
|
return t;
|
|
829
829
|
};
|
|
830
830
|
}
|
|
831
|
-
function
|
|
832
|
-
const t =
|
|
833
|
-
const s = Z(r.store, n), i =
|
|
831
|
+
function lr() {
|
|
832
|
+
const t = G(function({ nodeId: n, context: r, className: o }) {
|
|
833
|
+
const s = Z(r.store, n), i = er(s?.props?.onInvokeId), a = j(() => {
|
|
834
834
|
i && r.dispatchAction(i);
|
|
835
835
|
}, [i, r]);
|
|
836
836
|
if (!s)
|
|
837
837
|
return null;
|
|
838
|
-
const l =
|
|
838
|
+
const l = at(s.props);
|
|
839
839
|
delete l.onInvokeId;
|
|
840
|
-
const
|
|
840
|
+
const h = it(de(s.props?.className), o), f = s.children?.length ? r.renderChildren(s.children) : void 0;
|
|
841
841
|
return /* @__PURE__ */ w.jsx(
|
|
842
842
|
"div",
|
|
843
843
|
{
|
|
844
844
|
...l,
|
|
845
845
|
"data-ikon-node-id": s.id,
|
|
846
846
|
"data-ikon-source": s.sourceMarker,
|
|
847
|
-
className:
|
|
847
|
+
className: h,
|
|
848
848
|
onClick: i ? a : void 0,
|
|
849
849
|
style: i ? { cursor: "pointer" } : void 0,
|
|
850
|
-
children:
|
|
850
|
+
children: f
|
|
851
851
|
}
|
|
852
852
|
);
|
|
853
853
|
});
|
|
@@ -856,12 +856,12 @@ function hr() {
|
|
|
856
856
|
return t;
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
|
-
function
|
|
860
|
-
const t =
|
|
859
|
+
function ur() {
|
|
860
|
+
const t = G(function({ nodeId: n, context: r, className: o }) {
|
|
861
861
|
const s = Z(r.store, n);
|
|
862
862
|
if (!s)
|
|
863
863
|
return null;
|
|
864
|
-
const i =
|
|
864
|
+
const i = at(s.props), a = it("relative", de(s.props?.className), o), l = s.children?.length ? r.renderChildren(s.children) : void 0;
|
|
865
865
|
return /* @__PURE__ */ w.jsx("div", { ...i, "data-ikon-node-id": s.id, "data-ikon-source": s.sourceMarker, className: a, children: l });
|
|
866
866
|
});
|
|
867
867
|
return ({ type: e }) => {
|
|
@@ -869,12 +869,12 @@ function pr() {
|
|
|
869
869
|
return t;
|
|
870
870
|
};
|
|
871
871
|
}
|
|
872
|
-
function
|
|
873
|
-
const t =
|
|
872
|
+
function dr() {
|
|
873
|
+
const t = G(function({ nodeId: n, context: r, className: o }) {
|
|
874
874
|
const s = Z(r.store, n);
|
|
875
875
|
if (!s)
|
|
876
876
|
return null;
|
|
877
|
-
const i =
|
|
877
|
+
const i = at(s.props), a = it("absolute", de(s.props?.className), o), l = s.children?.length ? r.renderChildren(s.children) : void 0;
|
|
878
878
|
return /* @__PURE__ */ w.jsx("div", { ...i, "data-ikon-node-id": s.id, "data-ikon-source": s.sourceMarker, className: a, children: l });
|
|
879
879
|
});
|
|
880
880
|
return ({ type: e }) => {
|
|
@@ -882,19 +882,19 @@ function mr() {
|
|
|
882
882
|
return t;
|
|
883
883
|
};
|
|
884
884
|
}
|
|
885
|
-
function
|
|
885
|
+
function fr() {
|
|
886
886
|
return [
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
887
|
+
lr(),
|
|
888
|
+
ur(),
|
|
889
|
+
dr(),
|
|
890
|
+
cr()
|
|
891
891
|
];
|
|
892
892
|
}
|
|
893
|
-
const
|
|
894
|
-
function
|
|
895
|
-
t.registerModule(
|
|
893
|
+
const hr = "base", pr = async () => fr();
|
|
894
|
+
function mr(t) {
|
|
895
|
+
t.registerModule(hr, pr);
|
|
896
896
|
}
|
|
897
|
-
function
|
|
897
|
+
function gr(t) {
|
|
898
898
|
if (typeof t == "string") {
|
|
899
899
|
const e = t.trim();
|
|
900
900
|
return e.length > 0 ? e : void 0;
|
|
@@ -904,19 +904,19 @@ function wr(t) {
|
|
|
904
904
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
905
905
|
}
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function yr(...t) {
|
|
908
908
|
const e = [];
|
|
909
909
|
for (const n of t)
|
|
910
910
|
n && n.trim() && e.push(n.trim());
|
|
911
911
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
912
912
|
}
|
|
913
|
-
function
|
|
913
|
+
function wt(t) {
|
|
914
914
|
if (typeof t != "string")
|
|
915
915
|
return;
|
|
916
916
|
const e = t.trim();
|
|
917
917
|
return e.length > 0 ? e : void 0;
|
|
918
918
|
}
|
|
919
|
-
function
|
|
919
|
+
function Ie(t) {
|
|
920
920
|
if (typeof t == "boolean")
|
|
921
921
|
return t;
|
|
922
922
|
if (typeof t == "string") {
|
|
@@ -925,42 +925,42 @@ function _e(t) {
|
|
|
925
925
|
if (e === "false") return !1;
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
|
-
const
|
|
929
|
-
function
|
|
930
|
-
const t =
|
|
928
|
+
const br = "std.audio-url-player";
|
|
929
|
+
function Sr() {
|
|
930
|
+
const t = G(function({
|
|
931
931
|
nodeId: n,
|
|
932
932
|
context: r,
|
|
933
933
|
className: o
|
|
934
934
|
}) {
|
|
935
|
-
const s = Z(r.store, n), i = E(null), a = s ?
|
|
935
|
+
const s = Z(r.store, n), i = E(null), a = s ? Ie(s.props?.autoplay) : void 0, l = s ? wt(s.props?.src) : void 0;
|
|
936
936
|
if (C(() => {
|
|
937
937
|
a && i.current && i.current.play().catch(() => {
|
|
938
938
|
});
|
|
939
939
|
}, [a, l]), !s)
|
|
940
940
|
return null;
|
|
941
|
-
const
|
|
941
|
+
const h = yr(gr(s.props?.className), o), f = wt(s.props?.preload), y = Ie(s.props?.controls), m = Ie(s.props?.loop), c = Ie(s.props?.muted);
|
|
942
942
|
return /* @__PURE__ */ w.jsx(
|
|
943
943
|
"audio",
|
|
944
944
|
{
|
|
945
945
|
ref: i,
|
|
946
946
|
src: l,
|
|
947
|
-
...
|
|
947
|
+
...f !== void 0 ? { preload: f } : {},
|
|
948
948
|
...y !== void 0 ? { controls: y } : {},
|
|
949
949
|
...a !== void 0 ? { autoPlay: a } : {},
|
|
950
950
|
...m !== void 0 ? { loop: m } : {},
|
|
951
951
|
...c !== void 0 ? { muted: c } : {},
|
|
952
952
|
"data-ikon-node-id": s.id,
|
|
953
953
|
"data-ikon-source": s.sourceMarker,
|
|
954
|
-
className:
|
|
954
|
+
className: h
|
|
955
955
|
}
|
|
956
956
|
);
|
|
957
957
|
});
|
|
958
958
|
return ({ type: e }) => {
|
|
959
|
-
if (e ===
|
|
959
|
+
if (e === br)
|
|
960
960
|
return t;
|
|
961
961
|
};
|
|
962
962
|
}
|
|
963
|
-
function
|
|
963
|
+
function Kt(t) {
|
|
964
964
|
if (typeof t == "string") {
|
|
965
965
|
const e = t.trim();
|
|
966
966
|
return e.length > 0 ? e : void 0;
|
|
@@ -970,13 +970,13 @@ function Ht(t) {
|
|
|
970
970
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
971
971
|
}
|
|
972
972
|
}
|
|
973
|
-
function
|
|
973
|
+
function Yt(...t) {
|
|
974
974
|
const e = [];
|
|
975
975
|
for (const n of t)
|
|
976
976
|
n && n.trim() && e.push(n.trim());
|
|
977
977
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
978
978
|
}
|
|
979
|
-
function
|
|
979
|
+
function Ne(t) {
|
|
980
980
|
if (typeof t == "number" && Number.isFinite(t))
|
|
981
981
|
return Math.floor(t);
|
|
982
982
|
if (typeof t == "string" && t.trim().length > 0) {
|
|
@@ -985,33 +985,33 @@ function Pe(t) {
|
|
|
985
985
|
return Math.floor(e);
|
|
986
986
|
}
|
|
987
987
|
}
|
|
988
|
-
function
|
|
988
|
+
function tt(t) {
|
|
989
989
|
if (typeof t != "string")
|
|
990
990
|
return;
|
|
991
991
|
const e = t.trim();
|
|
992
992
|
return e.length > 0 ? e : void 0;
|
|
993
993
|
}
|
|
994
|
-
const
|
|
995
|
-
function
|
|
996
|
-
const t =
|
|
997
|
-
const s = Z(r.store, n), i = E(null), a = E(null), l = r.video,
|
|
994
|
+
const wr = "std.video-canvas", vr = "std.video-url-player";
|
|
995
|
+
function Er() {
|
|
996
|
+
const t = G(function({ nodeId: n, context: r, className: o }) {
|
|
997
|
+
const s = Z(r.store, n), i = E(null), a = E(null), l = r.video, h = r.client, f = s ? tt(s.props?.streamId) : void 0, y = s ? Ne(s.props?.width) : void 0, m = s ? Ne(s.props?.height) : void 0, c = s ? Yt(Kt(s.props?.className), o) : o, [, u] = x(0);
|
|
998
998
|
C(() => {
|
|
999
|
-
if (!
|
|
1000
|
-
const p =
|
|
1001
|
-
return
|
|
1002
|
-
p?.(
|
|
999
|
+
if (!h?.isWebRtcEnabled) return;
|
|
1000
|
+
const p = h.onWebRtcTrackMapChanged;
|
|
1001
|
+
return h.onWebRtcTrackMapChanged = (b) => {
|
|
1002
|
+
p?.(b), b.kind === "video" && u((S) => S + 1);
|
|
1003
1003
|
}, () => {
|
|
1004
|
-
|
|
1004
|
+
h.onWebRtcTrackMapChanged = p;
|
|
1005
1005
|
};
|
|
1006
|
-
}, [
|
|
1007
|
-
const g =
|
|
1006
|
+
}, [h]);
|
|
1007
|
+
const g = h?.isWebRtcEnabled && f ? h.getWebRtcVideoStreamByStreamId(f) : null;
|
|
1008
1008
|
return C(() => {
|
|
1009
1009
|
const p = i.current;
|
|
1010
|
-
if (!(!l || !p || !
|
|
1011
|
-
return l.attachCanvas(
|
|
1012
|
-
l.detachCanvas(
|
|
1010
|
+
if (!(!l || !p || !f || g))
|
|
1011
|
+
return l.attachCanvas(f, p), () => {
|
|
1012
|
+
l.detachCanvas(f);
|
|
1013
1013
|
};
|
|
1014
|
-
}, [l,
|
|
1014
|
+
}, [l, f, g]), C(() => {
|
|
1015
1015
|
const p = a.current;
|
|
1016
1016
|
if (!(!p || !g))
|
|
1017
1017
|
return p.srcObject = g, () => {
|
|
@@ -1026,35 +1026,35 @@ function kr() {
|
|
|
1026
1026
|
muted: !0,
|
|
1027
1027
|
"data-ikon-node-id": s.id,
|
|
1028
1028
|
"data-ikon-source": s.sourceMarker,
|
|
1029
|
-
"data-ikon-video-stream-id":
|
|
1029
|
+
"data-ikon-video-stream-id": f,
|
|
1030
1030
|
className: c,
|
|
1031
1031
|
...y ? { width: y } : {},
|
|
1032
1032
|
...m ? { height: m } : {}
|
|
1033
1033
|
},
|
|
1034
|
-
|
|
1034
|
+
f
|
|
1035
1035
|
) : /* @__PURE__ */ w.jsx(
|
|
1036
1036
|
"canvas",
|
|
1037
1037
|
{
|
|
1038
1038
|
ref: i,
|
|
1039
1039
|
"data-ikon-node-id": s.id,
|
|
1040
1040
|
"data-ikon-source": s.sourceMarker,
|
|
1041
|
-
"data-ikon-video-stream-id":
|
|
1041
|
+
"data-ikon-video-stream-id": f,
|
|
1042
1042
|
className: c,
|
|
1043
1043
|
...y ? { width: y } : {},
|
|
1044
1044
|
...m ? { height: m } : {}
|
|
1045
1045
|
},
|
|
1046
|
-
|
|
1046
|
+
f
|
|
1047
1047
|
) : null;
|
|
1048
1048
|
});
|
|
1049
1049
|
return ({ type: e }) => {
|
|
1050
|
-
if (e ===
|
|
1050
|
+
if (e === wr)
|
|
1051
1051
|
return t;
|
|
1052
1052
|
};
|
|
1053
1053
|
}
|
|
1054
|
-
function
|
|
1055
|
-
return [
|
|
1054
|
+
function Rr() {
|
|
1055
|
+
return [Er(), Ar(), Sr()];
|
|
1056
1056
|
}
|
|
1057
|
-
function
|
|
1057
|
+
function be(t) {
|
|
1058
1058
|
if (typeof t == "boolean")
|
|
1059
1059
|
return t;
|
|
1060
1060
|
if (typeof t == "string") {
|
|
@@ -1063,25 +1063,25 @@ function ye(t) {
|
|
|
1063
1063
|
if (e === "false") return !1;
|
|
1064
1064
|
}
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1067
|
-
const t =
|
|
1066
|
+
function Ar() {
|
|
1067
|
+
const t = G(function({
|
|
1068
1068
|
nodeId: n,
|
|
1069
1069
|
context: r,
|
|
1070
1070
|
className: o
|
|
1071
1071
|
}) {
|
|
1072
|
-
const s = Z(r.store, n), i = E(null), a = s ?
|
|
1072
|
+
const s = Z(r.store, n), i = E(null), a = s ? be(s.props?.autoplay) : void 0, l = s ? tt(s.props?.src) : void 0;
|
|
1073
1073
|
if (C(() => {
|
|
1074
1074
|
a && i.current && i.current.play().catch(() => {
|
|
1075
1075
|
});
|
|
1076
1076
|
}, [a, l]), !s)
|
|
1077
1077
|
return null;
|
|
1078
|
-
const
|
|
1078
|
+
const h = Yt(Kt(s.props?.className), o), f = tt(s.props?.poster), y = be(s.props?.controls), m = be(s.props?.loop), c = be(s.props?.muted), u = be(s.props?.playsInline), g = Ne(s.props?.width), p = Ne(s.props?.height), b = s.children?.length ? r.renderChildren(s.children) : void 0;
|
|
1079
1079
|
return /* @__PURE__ */ w.jsx(
|
|
1080
1080
|
"video",
|
|
1081
1081
|
{
|
|
1082
1082
|
ref: i,
|
|
1083
1083
|
src: l,
|
|
1084
|
-
poster:
|
|
1084
|
+
poster: f,
|
|
1085
1085
|
...y !== void 0 ? { controls: y } : {},
|
|
1086
1086
|
...a !== void 0 ? { autoPlay: a } : {},
|
|
1087
1087
|
...m !== void 0 ? { loop: m } : {},
|
|
@@ -1091,33 +1091,33 @@ function Ir() {
|
|
|
1091
1091
|
...p ? { height: p } : {},
|
|
1092
1092
|
"data-ikon-node-id": s.id,
|
|
1093
1093
|
"data-ikon-source": s.sourceMarker,
|
|
1094
|
-
className:
|
|
1095
|
-
children:
|
|
1094
|
+
className: h,
|
|
1095
|
+
children: b
|
|
1096
1096
|
}
|
|
1097
1097
|
);
|
|
1098
1098
|
});
|
|
1099
1099
|
return ({ type: e }) => {
|
|
1100
|
-
if (e ===
|
|
1100
|
+
if (e === vr)
|
|
1101
1101
|
return t;
|
|
1102
1102
|
};
|
|
1103
1103
|
}
|
|
1104
|
-
const
|
|
1105
|
-
function
|
|
1106
|
-
t.registerModule(
|
|
1104
|
+
const Tr = "media", kr = async () => Rr();
|
|
1105
|
+
function Cr(t) {
|
|
1106
|
+
t.registerModule(Tr, kr);
|
|
1107
1107
|
}
|
|
1108
|
-
const
|
|
1108
|
+
const Ir = `#version 300 es
|
|
1109
1109
|
in vec4 a_position;
|
|
1110
1110
|
void main() {
|
|
1111
1111
|
gl_Position = a_position;
|
|
1112
1112
|
}
|
|
1113
|
-
`,
|
|
1114
|
-
function
|
|
1113
|
+
`, le = 4;
|
|
1114
|
+
function _r(t, e) {
|
|
1115
1115
|
return new RegExp(`\\buniform\\s+\\w+\\s+${e}\\s*;`, "g").test(t);
|
|
1116
1116
|
}
|
|
1117
|
-
function
|
|
1117
|
+
function Or(t, e) {
|
|
1118
1118
|
const n = [];
|
|
1119
1119
|
for (const [r, o] of Object.entries(e)) {
|
|
1120
|
-
if (
|
|
1120
|
+
if (_r(t, r))
|
|
1121
1121
|
continue;
|
|
1122
1122
|
let s;
|
|
1123
1123
|
switch (o.type) {
|
|
@@ -1178,7 +1178,7 @@ void main() {
|
|
|
1178
1178
|
}
|
|
1179
1179
|
`;
|
|
1180
1180
|
}
|
|
1181
|
-
class
|
|
1181
|
+
class xr {
|
|
1182
1182
|
gl;
|
|
1183
1183
|
program = null;
|
|
1184
1184
|
positionBuffer = null;
|
|
@@ -1193,8 +1193,8 @@ class Ur {
|
|
|
1193
1193
|
mouseClickX = 0;
|
|
1194
1194
|
mouseClickY = 0;
|
|
1195
1195
|
channels = [];
|
|
1196
|
-
channelResolution = new Float32Array(
|
|
1197
|
-
channelTime = new Float32Array(
|
|
1196
|
+
channelResolution = new Float32Array(le * 3);
|
|
1197
|
+
channelTime = new Float32Array(le);
|
|
1198
1198
|
lastError = null;
|
|
1199
1199
|
currentShaderSource = "";
|
|
1200
1200
|
constructor(e) {
|
|
@@ -1217,7 +1217,7 @@ class Ur {
|
|
|
1217
1217
|
}
|
|
1218
1218
|
initializeChannels() {
|
|
1219
1219
|
const e = this.gl;
|
|
1220
|
-
for (let n = 0; n <
|
|
1220
|
+
for (let n = 0; n < le; n++) {
|
|
1221
1221
|
const r = e.createTexture();
|
|
1222
1222
|
e.bindTexture(e.TEXTURE_2D, r), e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, 1, 1, 0, e.RGBA, e.UNSIGNED_BYTE, new Uint8Array([0, 0, 0, 255])), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, e.LINEAR), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, e.LINEAR), this.channels.push({ texture: r, width: 0, height: 0, url: null });
|
|
1223
1223
|
}
|
|
@@ -1227,7 +1227,7 @@ class Ur {
|
|
|
1227
1227
|
// settings (vflip on, repeat wrap, mipmap filtering) so copy-pasted ShaderToy texture shaders render
|
|
1228
1228
|
// the same way. Only channels whose URL changed are reloaded.
|
|
1229
1229
|
setChannels(e) {
|
|
1230
|
-
for (let n = 0; n <
|
|
1230
|
+
for (let n = 0; n < le; n++) {
|
|
1231
1231
|
const r = e[n] ?? null, o = this.channels[n];
|
|
1232
1232
|
if (o.url !== r) {
|
|
1233
1233
|
if (o.url = r, !r) {
|
|
@@ -1253,10 +1253,10 @@ class Ur {
|
|
|
1253
1253
|
}
|
|
1254
1254
|
compile(e, n = {}) {
|
|
1255
1255
|
this.lastError = null, this.customUniforms = n, this.currentShaderSource = e;
|
|
1256
|
-
const r = this.gl, o = this.compileShader(r.VERTEX_SHADER,
|
|
1256
|
+
const r = this.gl, o = this.compileShader(r.VERTEX_SHADER, Ir);
|
|
1257
1257
|
if (!o)
|
|
1258
1258
|
return !1;
|
|
1259
|
-
const s =
|
|
1259
|
+
const s = Or(e, n), i = this.compileShader(r.FRAGMENT_SHADER, s);
|
|
1260
1260
|
if (!i)
|
|
1261
1261
|
return r.deleteShader(o), !1;
|
|
1262
1262
|
const a = r.createProgram();
|
|
@@ -1276,7 +1276,7 @@ class Ur {
|
|
|
1276
1276
|
const n = ["iResolution", "iTime", "iTimeDelta", "iFrame", "iMouse", "iDate"];
|
|
1277
1277
|
for (const r of n)
|
|
1278
1278
|
this.uniformLocations.set(r, e.getUniformLocation(this.program, r));
|
|
1279
|
-
for (let r = 0; r <
|
|
1279
|
+
for (let r = 0; r < le; r++)
|
|
1280
1280
|
this.uniformLocations.set(`iChannel${r}`, e.getUniformLocation(this.program, `iChannel${r}`));
|
|
1281
1281
|
this.uniformLocations.set("iChannelResolution", e.getUniformLocation(this.program, "iChannelResolution[0]")), this.uniformLocations.set("iChannelTime", e.getUniformLocation(this.program, "iChannelTime[0]"));
|
|
1282
1282
|
for (const r of Object.keys(this.customUniforms))
|
|
@@ -1295,10 +1295,10 @@ class Ur {
|
|
|
1295
1295
|
(n.width !== o || n.height !== s) && (n.width = o, n.height = s, e.viewport(0, 0, o, s));
|
|
1296
1296
|
const i = performance.now(), a = (i - this.startTime) / 1e3, l = (i - this.lastFrameTime) / 1e3;
|
|
1297
1297
|
this.lastFrameTime = i, this.frameCount++, e.clearColor(0, 0, 0, 1), e.clear(e.COLOR_BUFFER_BIT), e.useProgram(this.program), e.bindVertexArray(this.vao);
|
|
1298
|
-
const
|
|
1299
|
-
|
|
1300
|
-
const
|
|
1301
|
-
|
|
1298
|
+
const h = this.uniformLocations.get("iResolution");
|
|
1299
|
+
h && e.uniform3f(h, o, s, 1);
|
|
1300
|
+
const f = this.uniformLocations.get("iTime");
|
|
1301
|
+
f && e.uniform1f(f, a);
|
|
1302
1302
|
const y = this.uniformLocations.get("iTimeDelta");
|
|
1303
1303
|
y && e.uniform1f(y, l);
|
|
1304
1304
|
const m = this.uniformLocations.get("iFrame");
|
|
@@ -1307,45 +1307,45 @@ class Ur {
|
|
|
1307
1307
|
c && e.uniform4f(c, this.mouseX, this.mouseY, this.mouseClickX, this.mouseClickY);
|
|
1308
1308
|
const u = this.uniformLocations.get("iDate");
|
|
1309
1309
|
if (u) {
|
|
1310
|
-
const
|
|
1311
|
-
e.uniform4f(u,
|
|
1310
|
+
const b = /* @__PURE__ */ new Date();
|
|
1311
|
+
e.uniform4f(u, b.getFullYear(), b.getMonth(), b.getDate(), b.getHours() * 3600 + b.getMinutes() * 60 + b.getSeconds() + b.getMilliseconds() / 1e3);
|
|
1312
1312
|
}
|
|
1313
|
-
for (let
|
|
1314
|
-
e.activeTexture(e.TEXTURE0 +
|
|
1315
|
-
const
|
|
1316
|
-
|
|
1313
|
+
for (let b = 0; b < le; b++) {
|
|
1314
|
+
e.activeTexture(e.TEXTURE0 + b), e.bindTexture(e.TEXTURE_2D, this.channels[b].texture);
|
|
1315
|
+
const S = this.uniformLocations.get(`iChannel${b}`);
|
|
1316
|
+
S && e.uniform1i(S, b);
|
|
1317
1317
|
}
|
|
1318
1318
|
const g = this.uniformLocations.get("iChannelResolution");
|
|
1319
1319
|
g && e.uniform3fv(g, this.channelResolution);
|
|
1320
1320
|
const p = this.uniformLocations.get("iChannelTime");
|
|
1321
1321
|
p && e.uniform1fv(p, this.channelTime);
|
|
1322
|
-
for (const [
|
|
1323
|
-
const R = this.uniformLocations.get(
|
|
1322
|
+
for (const [b, S] of Object.entries(this.customUniforms)) {
|
|
1323
|
+
const R = this.uniformLocations.get(b);
|
|
1324
1324
|
if (R)
|
|
1325
|
-
switch (
|
|
1325
|
+
switch (S.type) {
|
|
1326
1326
|
case "float":
|
|
1327
|
-
e.uniform1f(R,
|
|
1327
|
+
e.uniform1f(R, S.value);
|
|
1328
1328
|
break;
|
|
1329
1329
|
case "vec2": {
|
|
1330
|
-
const v =
|
|
1330
|
+
const v = S.value;
|
|
1331
1331
|
e.uniform2f(R, v[0], v[1]);
|
|
1332
1332
|
break;
|
|
1333
1333
|
}
|
|
1334
1334
|
case "vec3": {
|
|
1335
|
-
const v =
|
|
1335
|
+
const v = S.value;
|
|
1336
1336
|
e.uniform3f(R, v[0], v[1], v[2]);
|
|
1337
1337
|
break;
|
|
1338
1338
|
}
|
|
1339
1339
|
case "vec4": {
|
|
1340
|
-
const v =
|
|
1340
|
+
const v = S.value;
|
|
1341
1341
|
e.uniform4f(R, v[0], v[1], v[2], v[3]);
|
|
1342
1342
|
break;
|
|
1343
1343
|
}
|
|
1344
1344
|
case "int":
|
|
1345
|
-
e.uniform1i(R,
|
|
1345
|
+
e.uniform1i(R, S.value);
|
|
1346
1346
|
break;
|
|
1347
1347
|
case "bool":
|
|
1348
|
-
e.uniform1i(R,
|
|
1348
|
+
e.uniform1i(R, S.value ? 1 : 0);
|
|
1349
1349
|
break;
|
|
1350
1350
|
}
|
|
1351
1351
|
}
|
|
@@ -1362,7 +1362,7 @@ class Ur {
|
|
|
1362
1362
|
this.channels = [], this.uniformLocations.clear();
|
|
1363
1363
|
}
|
|
1364
1364
|
}
|
|
1365
|
-
function
|
|
1365
|
+
function Nr(t) {
|
|
1366
1366
|
if (typeof t == "string") {
|
|
1367
1367
|
const e = t.trim();
|
|
1368
1368
|
return e.length > 0 ? e : void 0;
|
|
@@ -1372,13 +1372,13 @@ function Mr(t) {
|
|
|
1372
1372
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
1373
1373
|
}
|
|
1374
1374
|
}
|
|
1375
|
-
function
|
|
1375
|
+
function Lr(...t) {
|
|
1376
1376
|
const e = [];
|
|
1377
1377
|
for (const n of t)
|
|
1378
1378
|
n && n.trim() && e.push(n.trim());
|
|
1379
1379
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
1380
1380
|
}
|
|
1381
|
-
function
|
|
1381
|
+
function Ke(t) {
|
|
1382
1382
|
if (typeof t == "number" && Number.isFinite(t))
|
|
1383
1383
|
return Math.floor(t);
|
|
1384
1384
|
if (typeof t == "string" && t.trim().length > 0) {
|
|
@@ -1387,10 +1387,10 @@ function Ye(t) {
|
|
|
1387
1387
|
return Math.floor(e);
|
|
1388
1388
|
}
|
|
1389
1389
|
}
|
|
1390
|
-
function
|
|
1390
|
+
function Pr(t) {
|
|
1391
1391
|
return typeof t == "string" ? t : "";
|
|
1392
1392
|
}
|
|
1393
|
-
function
|
|
1393
|
+
function Ur(t) {
|
|
1394
1394
|
if (typeof t == "boolean")
|
|
1395
1395
|
return t;
|
|
1396
1396
|
if (typeof t == "string") {
|
|
@@ -1399,7 +1399,7 @@ function $r(t) {
|
|
|
1399
1399
|
if (e === "false") return !1;
|
|
1400
1400
|
}
|
|
1401
1401
|
}
|
|
1402
|
-
function
|
|
1402
|
+
function Mr(t) {
|
|
1403
1403
|
if (!t || typeof t != "object")
|
|
1404
1404
|
return {};
|
|
1405
1405
|
const e = {}, n = t;
|
|
@@ -1414,10 +1414,10 @@ function Br(t) {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
return e;
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1417
|
+
function Dr(t) {
|
|
1418
1418
|
return Array.isArray(t) ? t.map((e) => typeof e == "string" ? e : null) : [];
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1420
|
+
function jr(t, e) {
|
|
1421
1421
|
const n = Object.keys(t), r = Object.keys(e);
|
|
1422
1422
|
if (n.length !== r.length)
|
|
1423
1423
|
return !1;
|
|
@@ -1438,24 +1438,24 @@ function Vr(t, e) {
|
|
|
1438
1438
|
}
|
|
1439
1439
|
return !0;
|
|
1440
1440
|
}
|
|
1441
|
-
const
|
|
1442
|
-
function
|
|
1443
|
-
const t =
|
|
1444
|
-
const s = Z(r.store, n), i = E(null), a = E(null), l = E(null),
|
|
1441
|
+
const $r = "std.shadertoy-canvas";
|
|
1442
|
+
function Br() {
|
|
1443
|
+
const t = G(function({ nodeId: n, context: r, className: o }) {
|
|
1444
|
+
const s = Z(r.store, n), i = E(null), a = E(null), l = E(null), h = E(0), f = E(""), y = E({}), m = E({
|
|
1445
1445
|
x: 0,
|
|
1446
1446
|
y: 0,
|
|
1447
1447
|
clickX: 0,
|
|
1448
1448
|
clickY: 0,
|
|
1449
1449
|
isDown: !1
|
|
1450
|
-
}), c = s ?
|
|
1450
|
+
}), c = s ? Pr(s.props?.shaderSource) : "", u = s ? Ke(s.props?.fps) ?? 60 : 60, g = s?.props?.uniforms, p = W(() => Mr(g), [g]), b = s?.props?.channels, S = W(() => Dr(b), [b]), R = s ? Ur(s.props?.enableMouse) ?? !0 : !0, v = s ? Ke(s.props?.width) : void 0, T = s ? Ke(s.props?.height) : void 0, U = s ? Lr(Nr(s.props?.className), o) : o;
|
|
1451
1451
|
C(() => {
|
|
1452
1452
|
const _ = i.current;
|
|
1453
1453
|
if (_) {
|
|
1454
1454
|
try {
|
|
1455
|
-
const
|
|
1456
|
-
a.current =
|
|
1457
|
-
} catch (
|
|
1458
|
-
console.error("[ShadertoyRenderer] Failed to create WebGL2 context:",
|
|
1455
|
+
const P = new xr(_);
|
|
1456
|
+
a.current = P;
|
|
1457
|
+
} catch (P) {
|
|
1458
|
+
console.error("[ShadertoyRenderer] Failed to create WebGL2 context:", P);
|
|
1459
1459
|
}
|
|
1460
1460
|
return () => {
|
|
1461
1461
|
a.current && (a.current.destroy(), a.current = null);
|
|
@@ -1463,49 +1463,49 @@ function Kr() {
|
|
|
1463
1463
|
}
|
|
1464
1464
|
}, []), C(() => {
|
|
1465
1465
|
const _ = a.current;
|
|
1466
|
-
if (!(!_ || !c) &&
|
|
1466
|
+
if (!(!_ || !c) && f.current !== c)
|
|
1467
1467
|
if (_.compile(c, p))
|
|
1468
|
-
|
|
1468
|
+
f.current = c, y.current = p;
|
|
1469
1469
|
else {
|
|
1470
1470
|
const M = _.getError();
|
|
1471
1471
|
console.error("[ShadertoyRenderer] Shader compilation failed:", M);
|
|
1472
1472
|
}
|
|
1473
1473
|
}, [c, p]), C(() => {
|
|
1474
1474
|
const _ = a.current;
|
|
1475
|
-
!_ || !
|
|
1475
|
+
!_ || !f.current || jr(y.current, p) || (_.setCustomUniforms(p), y.current = p);
|
|
1476
1476
|
}, [p]), C(() => {
|
|
1477
1477
|
const _ = a.current;
|
|
1478
|
-
_ && _.setChannels(
|
|
1479
|
-
}, [
|
|
1478
|
+
_ && _.setChannels(S);
|
|
1479
|
+
}, [S]), C(() => {
|
|
1480
1480
|
const _ = a.current;
|
|
1481
|
-
if (!_ || !
|
|
1482
|
-
const
|
|
1483
|
-
const $ = B -
|
|
1484
|
-
$ >=
|
|
1481
|
+
if (!_ || !f.current) return;
|
|
1482
|
+
const P = 1e3 / u, M = (B) => {
|
|
1483
|
+
const $ = B - h.current;
|
|
1484
|
+
$ >= P && (h.current = B - $ % P, _.draw()), l.current = requestAnimationFrame(M);
|
|
1485
1485
|
};
|
|
1486
1486
|
return l.current = requestAnimationFrame(M), () => {
|
|
1487
1487
|
l.current !== null && (cancelAnimationFrame(l.current), l.current = null);
|
|
1488
1488
|
};
|
|
1489
1489
|
}, [u]);
|
|
1490
|
-
const ee =
|
|
1490
|
+
const ee = j(
|
|
1491
1491
|
(_) => {
|
|
1492
1492
|
if (!R) return;
|
|
1493
|
-
const
|
|
1494
|
-
if (!
|
|
1495
|
-
const B = window.devicePixelRatio || 1, $ =
|
|
1493
|
+
const P = i.current, M = a.current;
|
|
1494
|
+
if (!P || !M) return;
|
|
1495
|
+
const B = window.devicePixelRatio || 1, $ = P.getBoundingClientRect(), V = (_.clientX - $.left) * B, K = ($.height - (_.clientY - $.top)) * B;
|
|
1496
1496
|
m.current.x = V, m.current.y = K, M.setMouse(V, K, m.current.clickX, m.current.clickY);
|
|
1497
1497
|
},
|
|
1498
1498
|
[R]
|
|
1499
|
-
), te =
|
|
1499
|
+
), te = j(
|
|
1500
1500
|
(_) => {
|
|
1501
1501
|
if (!R) return;
|
|
1502
|
-
const
|
|
1503
|
-
if (!
|
|
1504
|
-
const B = window.devicePixelRatio || 1, $ =
|
|
1502
|
+
const P = i.current, M = a.current;
|
|
1503
|
+
if (!P || !M) return;
|
|
1504
|
+
const B = window.devicePixelRatio || 1, $ = P.getBoundingClientRect(), V = (_.clientX - $.left) * B, K = ($.height - (_.clientY - $.top)) * B;
|
|
1505
1505
|
m.current.isDown = !0, m.current.clickX = V, m.current.clickY = K, M.setMouse(V, K, V, K);
|
|
1506
1506
|
},
|
|
1507
1507
|
[R]
|
|
1508
|
-
), z =
|
|
1508
|
+
), z = j(() => {
|
|
1509
1509
|
R && (m.current.isDown = !1, m.current.clickX = -Math.abs(m.current.clickX));
|
|
1510
1510
|
}, [R]);
|
|
1511
1511
|
return s ? /* @__PURE__ */ w.jsx(
|
|
@@ -1525,16 +1525,16 @@ function Kr() {
|
|
|
1525
1525
|
) : null;
|
|
1526
1526
|
});
|
|
1527
1527
|
return ({ type: e }) => {
|
|
1528
|
-
if (e ===
|
|
1528
|
+
if (e === $r)
|
|
1529
1529
|
return t;
|
|
1530
1530
|
};
|
|
1531
1531
|
}
|
|
1532
|
-
const
|
|
1533
|
-
function
|
|
1534
|
-
t.registerModule(
|
|
1532
|
+
const Fr = "shadertoy", Vr = async () => Br();
|
|
1533
|
+
function Wr(t) {
|
|
1534
|
+
t.registerModule(Fr, Vr);
|
|
1535
1535
|
}
|
|
1536
|
-
const
|
|
1537
|
-
class
|
|
1536
|
+
const vt = oe("UIRegistry");
|
|
1537
|
+
class Kr {
|
|
1538
1538
|
baseResolvers = [];
|
|
1539
1539
|
moduleLoaders = /* @__PURE__ */ new Map();
|
|
1540
1540
|
moduleResolvers = /* @__PURE__ */ new Map();
|
|
@@ -1556,15 +1556,15 @@ class Xr {
|
|
|
1556
1556
|
for (const [r, o] of this.moduleLoaders.entries())
|
|
1557
1557
|
if (!this.moduleResolvers.has(r))
|
|
1558
1558
|
try {
|
|
1559
|
-
const s = await o(), i =
|
|
1559
|
+
const s = await o(), i = zr(s);
|
|
1560
1560
|
this.moduleResolvers.set(r, i), e = !0;
|
|
1561
1561
|
} catch (s) {
|
|
1562
|
-
|
|
1562
|
+
vt.error(`[IkonUiRegistry] Failed to load module '${r}'.`, s);
|
|
1563
1563
|
}
|
|
1564
1564
|
const n = [];
|
|
1565
1565
|
for (const r of this.moduleLoaders.keys())
|
|
1566
1566
|
this.moduleResolvers.has(r) && n.push(r);
|
|
1567
|
-
return
|
|
1567
|
+
return Xr(n, this.activeModuleOrder) || (this.activeModuleOrder = n, e = !0), e;
|
|
1568
1568
|
}
|
|
1569
1569
|
resolve(e) {
|
|
1570
1570
|
for (const n of this.baseResolvers) {
|
|
@@ -1574,7 +1574,7 @@ class Xr {
|
|
|
1574
1574
|
for (const n of this.activeModuleOrder) {
|
|
1575
1575
|
const r = this.moduleResolvers.get(n);
|
|
1576
1576
|
if (!r) {
|
|
1577
|
-
|
|
1577
|
+
vt.warn(`Missing resolvers for module ${n}`);
|
|
1578
1578
|
continue;
|
|
1579
1579
|
}
|
|
1580
1580
|
for (const o of r) {
|
|
@@ -1584,17 +1584,17 @@ class Xr {
|
|
|
1584
1584
|
}
|
|
1585
1585
|
}
|
|
1586
1586
|
}
|
|
1587
|
-
function
|
|
1588
|
-
const t = new
|
|
1589
|
-
return
|
|
1587
|
+
function Yr() {
|
|
1588
|
+
const t = new Kr();
|
|
1589
|
+
return mr(t), Cr(t), Wr(t), t.loadRegisteredModules(), t;
|
|
1590
1590
|
}
|
|
1591
|
-
function
|
|
1591
|
+
function Gr(t) {
|
|
1592
1592
|
return Array.isArray(t) ? t : [t];
|
|
1593
1593
|
}
|
|
1594
|
-
function
|
|
1595
|
-
return t ?
|
|
1594
|
+
function zr(t) {
|
|
1595
|
+
return t ? Gr(t).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
|
|
1596
1596
|
}
|
|
1597
|
-
function
|
|
1597
|
+
function Xr(t, e) {
|
|
1598
1598
|
if (t.length !== e.length)
|
|
1599
1599
|
return !1;
|
|
1600
1600
|
for (let n = 0; n < t.length; n += 1)
|
|
@@ -1602,9 +1602,9 @@ function Zr(t, e) {
|
|
|
1602
1602
|
return !1;
|
|
1603
1603
|
return !0;
|
|
1604
1604
|
}
|
|
1605
|
-
function
|
|
1605
|
+
function Cs({ mount: t, stores: e, registry: n, client: r, onAction: o }) {
|
|
1606
1606
|
return /* @__PURE__ */ w.jsx(
|
|
1607
|
-
|
|
1607
|
+
Bt,
|
|
1608
1608
|
{
|
|
1609
1609
|
stores: e,
|
|
1610
1610
|
registry: n,
|
|
@@ -1614,7 +1614,7 @@ function Xs({ mount: t, stores: e, registry: n, client: r, onAction: o }) {
|
|
|
1614
1614
|
}
|
|
1615
1615
|
);
|
|
1616
1616
|
}
|
|
1617
|
-
const
|
|
1617
|
+
const Ye = oe("MotionController"), Et = {
|
|
1618
1618
|
ease: [0.25, 0.1, 0.25, 1],
|
|
1619
1619
|
"ease-in": [0.42, 0, 1, 1],
|
|
1620
1620
|
"ease-out": [0, 0, 0.58, 1],
|
|
@@ -1647,85 +1647,85 @@ const ze = re("MotionController"), Tt = {
|
|
|
1647
1647
|
function F(t) {
|
|
1648
1648
|
return t <= 0 ? 0 : t >= 1 ? 1 : t;
|
|
1649
1649
|
}
|
|
1650
|
-
function
|
|
1650
|
+
function Rt(t) {
|
|
1651
1651
|
if (t == null) return;
|
|
1652
1652
|
const e = `${t}`.trim();
|
|
1653
1653
|
if (!e) return;
|
|
1654
1654
|
const n = Number.parseFloat(e);
|
|
1655
1655
|
return Number.isFinite(n) ? n : void 0;
|
|
1656
1656
|
}
|
|
1657
|
-
function
|
|
1657
|
+
function At(t) {
|
|
1658
1658
|
return typeof CSS < "u" && CSS.escape ? CSS.escape(t) : t.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
|
|
1659
1659
|
}
|
|
1660
|
-
function
|
|
1661
|
-
const
|
|
1662
|
-
function y(p,
|
|
1663
|
-
return ((3 *
|
|
1660
|
+
function Tt(t, e, n, r) {
|
|
1661
|
+
const f = new Float32Array(11);
|
|
1662
|
+
function y(p, b, S) {
|
|
1663
|
+
return ((3 * b - 3 * S + 1) * p + (3 * S - 6 * b)) * p * p + 3 * b * p;
|
|
1664
1664
|
}
|
|
1665
|
-
function m(p,
|
|
1666
|
-
return 3 * (3 *
|
|
1665
|
+
function m(p, b, S) {
|
|
1666
|
+
return 3 * (3 * b - 3 * S + 1) * p * p + 2 * (3 * S - 6 * b) * p + 3 * b;
|
|
1667
1667
|
}
|
|
1668
|
-
function c(p,
|
|
1669
|
-
for (let
|
|
1670
|
-
const R = m(
|
|
1668
|
+
function c(p, b) {
|
|
1669
|
+
for (let S = 0; S < 4; S += 1) {
|
|
1670
|
+
const R = m(b, t, n);
|
|
1671
1671
|
if (R === 0)
|
|
1672
|
-
return
|
|
1673
|
-
const v = y(
|
|
1674
|
-
|
|
1672
|
+
return b;
|
|
1673
|
+
const v = y(b, t, n) - p;
|
|
1674
|
+
b -= v / R;
|
|
1675
1675
|
}
|
|
1676
|
-
return
|
|
1676
|
+
return b;
|
|
1677
1677
|
}
|
|
1678
|
-
function u(p,
|
|
1678
|
+
function u(p, b, S) {
|
|
1679
1679
|
let R = 0, v = 0, T = 0;
|
|
1680
1680
|
do
|
|
1681
|
-
v =
|
|
1681
|
+
v = b + (S - b) / 2, R = y(v, t, n) - p, R > 0 ? S = v : b = v;
|
|
1682
1682
|
while (Math.abs(R) > 1e-7 && ++T < 10);
|
|
1683
1683
|
return v;
|
|
1684
1684
|
}
|
|
1685
1685
|
function g(p) {
|
|
1686
|
-
let
|
|
1686
|
+
let b = 0, S = 1;
|
|
1687
1687
|
const R = 10;
|
|
1688
|
-
for (;
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
const v = (p -
|
|
1692
|
-
return U >= 1e-3 ? c(p, T) : U === 0 ? T : u(p,
|
|
1688
|
+
for (; S !== R && f[S] <= p; S += 1)
|
|
1689
|
+
b += 0.1;
|
|
1690
|
+
S -= 1;
|
|
1691
|
+
const v = (p - f[S]) / (f[S + 1] - f[S]), T = b + v * 0.1, U = m(T, t, n);
|
|
1692
|
+
return U >= 1e-3 ? c(p, T) : U === 0 ? T : u(p, b, b + 0.1);
|
|
1693
1693
|
}
|
|
1694
1694
|
for (let p = 0; p < 11; p += 1)
|
|
1695
|
-
|
|
1695
|
+
f[p] = y(p * 0.1, t, n);
|
|
1696
1696
|
return (p) => p <= 0 ? 0 : p >= 1 ? 1 : y(g(p), e, r);
|
|
1697
1697
|
}
|
|
1698
|
-
function
|
|
1698
|
+
function Hr(t) {
|
|
1699
1699
|
const e = /steps\(\s*([0-9]+)\s*(?:,\s*([a-z-]+)\s*)?\)/i.exec(t);
|
|
1700
1700
|
if (!e)
|
|
1701
1701
|
return (o) => F(o);
|
|
1702
1702
|
const n = Math.max(1, parseInt(e[1], 10)), r = (e[2] ?? "end").toLowerCase();
|
|
1703
1703
|
return r === "start" || r === "jump-start" ? (o) => F(Math.ceil(o * n) / n) : r === "none" || r === "jump-none" ? (o) => F(Math.round(o * n) / n) : r === "both" || r === "jump-both" ? (o) => F((Math.floor(o * n) + 0.5) / n) : (o) => F(Math.floor(o * n) / n);
|
|
1704
1704
|
}
|
|
1705
|
-
function
|
|
1705
|
+
function qr(t) {
|
|
1706
1706
|
if (!t)
|
|
1707
1707
|
return (n) => F(n);
|
|
1708
1708
|
const e = t.trim().toLowerCase();
|
|
1709
1709
|
if (!e || e === "linear")
|
|
1710
1710
|
return (n) => F(n);
|
|
1711
|
-
if (
|
|
1712
|
-
const [n, r, o, s] =
|
|
1711
|
+
if (Et[e]) {
|
|
1712
|
+
const [n, r, o, s] = Et[e], i = Tt(n, r, o, s);
|
|
1713
1713
|
return (a) => F(i(F(a)));
|
|
1714
1714
|
}
|
|
1715
1715
|
if (e.startsWith("cubic-bezier(") && e.endsWith(")")) {
|
|
1716
1716
|
const r = e.slice(13, -1).split(",").map((o) => Number.parseFloat(o.trim()));
|
|
1717
1717
|
if (r.length === 4 && r.every((o) => Number.isFinite(o))) {
|
|
1718
|
-
const [o, s, i, a] = r, l =
|
|
1719
|
-
return (
|
|
1718
|
+
const [o, s, i, a] = r, l = Tt(o, s, i, a);
|
|
1719
|
+
return (h) => F(l(F(h)));
|
|
1720
1720
|
}
|
|
1721
1721
|
}
|
|
1722
1722
|
if (e.startsWith("steps(") && e.endsWith(")")) {
|
|
1723
|
-
const n =
|
|
1723
|
+
const n = Hr(e);
|
|
1724
1724
|
return (r) => n(F(r));
|
|
1725
1725
|
}
|
|
1726
1726
|
return (n) => F(n);
|
|
1727
1727
|
}
|
|
1728
|
-
function
|
|
1728
|
+
function Jr(t) {
|
|
1729
1729
|
if (!t)
|
|
1730
1730
|
return;
|
|
1731
1731
|
const e = /(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)\s*->\s*(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)/.exec(t);
|
|
@@ -1735,7 +1735,7 @@ function to(t) {
|
|
|
1735
1735
|
if (![n, r, o, s].some((i) => !Number.isFinite(i)))
|
|
1736
1736
|
return { inStart: n, inEnd: r, outStart: o, outEnd: s };
|
|
1737
1737
|
}
|
|
1738
|
-
class
|
|
1738
|
+
class Zr {
|
|
1739
1739
|
bindingsByStyle = /* @__PURE__ */ new Map();
|
|
1740
1740
|
observer;
|
|
1741
1741
|
observeScheduled = !1;
|
|
@@ -1762,7 +1762,7 @@ class no {
|
|
|
1762
1762
|
try {
|
|
1763
1763
|
e();
|
|
1764
1764
|
} catch (n) {
|
|
1765
|
-
|
|
1765
|
+
Ye.warn("Failed to cleanup binding listener", n);
|
|
1766
1766
|
}
|
|
1767
1767
|
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);
|
|
1768
1768
|
}
|
|
@@ -1772,7 +1772,7 @@ class no {
|
|
|
1772
1772
|
const r = (JSON.parse(e).motionBindings ?? []).map((o) => this.parseBinding(o)).filter((o) => o !== void 0);
|
|
1773
1773
|
return r.length === 0 ? void 0 : { bindings: r };
|
|
1774
1774
|
} catch (n) {
|
|
1775
|
-
|
|
1775
|
+
Ye.warn("Failed to parse motion metadata", n);
|
|
1776
1776
|
return;
|
|
1777
1777
|
}
|
|
1778
1778
|
}
|
|
@@ -1780,7 +1780,7 @@ class no {
|
|
|
1780
1780
|
const n = e.source?.trim();
|
|
1781
1781
|
if (!n)
|
|
1782
1782
|
return;
|
|
1783
|
-
const r =
|
|
1783
|
+
const r = Rt(e.min) ?? 0, o = Rt(e.max), s = o === void 0 ? r + 100 : o, i = (e.clamp ?? "clamp").trim().toLowerCase(), a = !!e.reverse, l = qr(e.ease), h = Jr(e.map), f = e.targetId?.trim() || void 0;
|
|
1784
1784
|
return Number.isNaN(r) || Number.isNaN(s) ? void 0 : {
|
|
1785
1785
|
source: n.toLowerCase(),
|
|
1786
1786
|
min: r,
|
|
@@ -1788,8 +1788,8 @@ class no {
|
|
|
1788
1788
|
clamp: i === "freeze-start" || i === "freeze-end" || i === "unclamped" ? i : "clamp",
|
|
1789
1789
|
reverse: a,
|
|
1790
1790
|
ease: l,
|
|
1791
|
-
map:
|
|
1792
|
-
targetId:
|
|
1791
|
+
map: h,
|
|
1792
|
+
targetId: f
|
|
1793
1793
|
};
|
|
1794
1794
|
}
|
|
1795
1795
|
ensureObserver() {
|
|
@@ -1838,7 +1838,7 @@ class no {
|
|
|
1838
1838
|
const n = this.bindingsByStyle.get(e);
|
|
1839
1839
|
if (!n || typeof document > "u")
|
|
1840
1840
|
return;
|
|
1841
|
-
const r = `.${
|
|
1841
|
+
const r = `.${At(e)}`;
|
|
1842
1842
|
document.querySelectorAll(r).forEach((s) => this.applyStyleToElement(s, e, n));
|
|
1843
1843
|
}
|
|
1844
1844
|
applyStyleToElement(e, n, r) {
|
|
@@ -1878,7 +1878,7 @@ class no {
|
|
|
1878
1878
|
}
|
|
1879
1879
|
resolveScrollContainer(e, n) {
|
|
1880
1880
|
if (n.targetId) {
|
|
1881
|
-
const r = `[data-ikon-motion-source="${
|
|
1881
|
+
const r = `[data-ikon-motion-source="${At(n.targetId)}"]`, o = typeof document < "u" ? document.querySelector(r) : null;
|
|
1882
1882
|
if (o)
|
|
1883
1883
|
return o;
|
|
1884
1884
|
}
|
|
@@ -1888,10 +1888,10 @@ class no {
|
|
|
1888
1888
|
const o = n.max - n.min, s = o === 0 ? r > n.min ? 1 : 0 : (r - n.min) / o;
|
|
1889
1889
|
let i = this.applyClamp(s, n.clamp);
|
|
1890
1890
|
n.reverse && (i = 1 - i);
|
|
1891
|
-
const a = n.ease(i), l = Number.isFinite(a) ? a : 0,
|
|
1892
|
-
if (e.style.setProperty("--tw-motion-bind-source-value", `${r}`), e.style.setProperty("--tw-motion-bind-progress-ratio", `${l}`), e.style.setProperty("--tw-motion-bind-progress", `${
|
|
1893
|
-
const
|
|
1894
|
-
|
|
1891
|
+
const a = n.ease(i), l = Number.isFinite(a) ? a : 0, h = l * 100;
|
|
1892
|
+
if (e.style.setProperty("--tw-motion-bind-source-value", `${r}`), e.style.setProperty("--tw-motion-bind-progress-ratio", `${l}`), e.style.setProperty("--tw-motion-bind-progress", `${h}`), n.map) {
|
|
1893
|
+
const f = this.applyMap(h, n.map);
|
|
1894
|
+
f !== void 0 && e.style.setProperty("--tw-motion-bind-value", `${f}`);
|
|
1895
1895
|
} else
|
|
1896
1896
|
e.style.removeProperty("--tw-motion-bind-value");
|
|
1897
1897
|
}
|
|
@@ -1948,7 +1948,7 @@ class no {
|
|
|
1948
1948
|
try {
|
|
1949
1949
|
i();
|
|
1950
1950
|
} catch (a) {
|
|
1951
|
-
|
|
1951
|
+
Ye.warn("Failed to cleanup listener", a);
|
|
1952
1952
|
}
|
|
1953
1953
|
this.globalCleanups.delete(i);
|
|
1954
1954
|
}
|
|
@@ -1993,29 +1993,29 @@ class no {
|
|
|
1993
1993
|
}
|
|
1994
1994
|
}
|
|
1995
1995
|
}
|
|
1996
|
-
const
|
|
1997
|
-
function
|
|
1998
|
-
const e = E(/* @__PURE__ */ new Map()), n =
|
|
1996
|
+
const Ge = new Zr();
|
|
1997
|
+
function Qr(t) {
|
|
1998
|
+
const e = E(/* @__PURE__ */ new Map()), n = j(({ styleId: s, css: i, common: a }) => {
|
|
1999
1999
|
if (!(!s || typeof document > "u")) {
|
|
2000
2000
|
if (i) {
|
|
2001
2001
|
let l = e.current.get(s);
|
|
2002
2002
|
l || (l = document.createElement("style"), l.setAttribute("data-ikon-style-id", s), document.head.appendChild(l), e.current.set(s, l)), l.textContent = i;
|
|
2003
2003
|
}
|
|
2004
|
-
|
|
2004
|
+
Ge.registerStyle(s, a);
|
|
2005
2005
|
}
|
|
2006
|
-
}, []), r =
|
|
2006
|
+
}, []), r = j((s) => {
|
|
2007
2007
|
if (!(typeof document > "u"))
|
|
2008
2008
|
for (const i of s) {
|
|
2009
2009
|
const a = e.current.get(i);
|
|
2010
|
-
a && (a.remove(), e.current.delete(i)),
|
|
2010
|
+
a && (a.remove(), e.current.delete(i)), Ge.unregisterStyle(i);
|
|
2011
2011
|
}
|
|
2012
|
-
}, []), o =
|
|
2012
|
+
}, []), o = j(() => {
|
|
2013
2013
|
if (typeof document < "u") {
|
|
2014
2014
|
for (const s of e.current.values())
|
|
2015
2015
|
s.remove();
|
|
2016
2016
|
e.current.clear();
|
|
2017
2017
|
}
|
|
2018
|
-
|
|
2018
|
+
Ge.reset();
|
|
2019
2019
|
}, []);
|
|
2020
2020
|
return C(() => {
|
|
2021
2021
|
if (!t) return;
|
|
@@ -2027,7 +2027,7 @@ function ro(t) {
|
|
|
2027
2027
|
};
|
|
2028
2028
|
}, [t, o, n, r]), C(() => () => o(), [o]), { setStyle: n, deleteStyles: r, reset: o };
|
|
2029
2029
|
}
|
|
2030
|
-
function
|
|
2030
|
+
function eo(t) {
|
|
2031
2031
|
const e = [];
|
|
2032
2032
|
for (const [n, r] of t) {
|
|
2033
2033
|
const o = r.store.getSnapshot(), s = o.rootViewId && o.views.has(o.rootViewId);
|
|
@@ -2035,126 +2035,20 @@ function oo(t) {
|
|
|
2035
2035
|
}
|
|
2036
2036
|
return e.sort(), e.join(",");
|
|
2037
2037
|
}
|
|
2038
|
-
function
|
|
2039
|
-
const [e, n] =
|
|
2038
|
+
function to(t) {
|
|
2039
|
+
const [e, n] = x(), r = E("");
|
|
2040
2040
|
return C(() => {
|
|
2041
2041
|
if (!t) {
|
|
2042
2042
|
n(void 0), r.current = "";
|
|
2043
2043
|
return;
|
|
2044
2044
|
}
|
|
2045
2045
|
const o = () => {
|
|
2046
|
-
const s = t.getStores(), i =
|
|
2046
|
+
const s = t.getStores(), i = eo(s);
|
|
2047
2047
|
i !== r.current && (r.current = i, n(s));
|
|
2048
2048
|
};
|
|
2049
2049
|
return o(), t.subscribe(o);
|
|
2050
2050
|
}, [t]), e;
|
|
2051
2051
|
}
|
|
2052
|
-
var io = typeof global == "object" && global && global.Object === Object && global, ao = typeof self == "object" && self && self.Object === Object && self, co = io || ao || Function("return this")(), Le = co.Symbol, Jt = Object.prototype, lo = Jt.hasOwnProperty, uo = Jt.toString, be = Le ? Le.toStringTag : void 0;
|
|
2053
|
-
function fo(t) {
|
|
2054
|
-
var e = lo.call(t, be), n = t[be];
|
|
2055
|
-
try {
|
|
2056
|
-
t[be] = void 0;
|
|
2057
|
-
var r = !0;
|
|
2058
|
-
} catch {
|
|
2059
|
-
}
|
|
2060
|
-
var o = uo.call(t);
|
|
2061
|
-
return r && (e ? t[be] = n : delete t[be]), o;
|
|
2062
|
-
}
|
|
2063
|
-
var ho = Object.prototype, po = ho.toString;
|
|
2064
|
-
function mo(t) {
|
|
2065
|
-
return po.call(t);
|
|
2066
|
-
}
|
|
2067
|
-
var go = "[object Null]", yo = "[object Undefined]", _t = Le ? Le.toStringTag : void 0;
|
|
2068
|
-
function bo(t) {
|
|
2069
|
-
return t == null ? t === void 0 ? yo : go : _t && _t in Object(t) ? fo(t) : mo(t);
|
|
2070
|
-
}
|
|
2071
|
-
function So(t) {
|
|
2072
|
-
return t != null && typeof t == "object";
|
|
2073
|
-
}
|
|
2074
|
-
var wo = Array.isArray, vo = "[object String]";
|
|
2075
|
-
function Eo(t) {
|
|
2076
|
-
return typeof t == "string" || !wo(t) && So(t) && bo(t) == vo;
|
|
2077
|
-
}
|
|
2078
|
-
const Ot = "ikonUiModules";
|
|
2079
|
-
function ot(t) {
|
|
2080
|
-
return typeof t == "object" && t !== null && !Array.isArray(t);
|
|
2081
|
-
}
|
|
2082
|
-
function Ro(t) {
|
|
2083
|
-
if (!Array.isArray(t))
|
|
2084
|
-
return;
|
|
2085
|
-
const e = /* @__PURE__ */ new Set();
|
|
2086
|
-
for (const n of t) {
|
|
2087
|
-
if (!Eo(n)) continue;
|
|
2088
|
-
const r = n.trim();
|
|
2089
|
-
r && (e.has(r) || e.add(r));
|
|
2090
|
-
}
|
|
2091
|
-
return Array.from(e);
|
|
2092
|
-
}
|
|
2093
|
-
function Hs(t, e) {
|
|
2094
|
-
if (t === e)
|
|
2095
|
-
return !0;
|
|
2096
|
-
if (!t || !e)
|
|
2097
|
-
return !t && !e;
|
|
2098
|
-
if (t.length !== e.length)
|
|
2099
|
-
return !1;
|
|
2100
|
-
for (let n = 0; n < t.length; n += 1)
|
|
2101
|
-
if (t[n] !== e[n])
|
|
2102
|
-
return !1;
|
|
2103
|
-
return !0;
|
|
2104
|
-
}
|
|
2105
|
-
function Ao(t) {
|
|
2106
|
-
if (!(!ot(t) || !Object.prototype.hasOwnProperty.call(t, Ot)))
|
|
2107
|
-
return Ro(t[Ot]);
|
|
2108
|
-
}
|
|
2109
|
-
function qs(...t) {
|
|
2110
|
-
for (const e of t) {
|
|
2111
|
-
const n = Ao(e);
|
|
2112
|
-
if (n !== void 0)
|
|
2113
|
-
return n;
|
|
2114
|
-
}
|
|
2115
|
-
}
|
|
2116
|
-
function Js(t) {
|
|
2117
|
-
if (!ot(t))
|
|
2118
|
-
return;
|
|
2119
|
-
const e = t, n = Object.keys(e).find((l) => l.toLowerCase() === "modules");
|
|
2120
|
-
if (!n)
|
|
2121
|
-
return;
|
|
2122
|
-
const r = e[n];
|
|
2123
|
-
if (r === null)
|
|
2124
|
-
return { resetToDefault: !0 };
|
|
2125
|
-
if (!Array.isArray(r))
|
|
2126
|
-
return;
|
|
2127
|
-
const o = [], s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
|
|
2128
|
-
for (const l of r) {
|
|
2129
|
-
if (typeof l == "string") {
|
|
2130
|
-
const g = l.trim();
|
|
2131
|
-
if (!g || i.has(g))
|
|
2132
|
-
continue;
|
|
2133
|
-
o.push(g), i.add(g);
|
|
2134
|
-
continue;
|
|
2135
|
-
}
|
|
2136
|
-
if (!ot(l))
|
|
2137
|
-
continue;
|
|
2138
|
-
const d = l, h = Object.keys(d).find((g) => g.toLowerCase() === "name");
|
|
2139
|
-
if (!h)
|
|
2140
|
-
continue;
|
|
2141
|
-
const y = d[h];
|
|
2142
|
-
if (typeof y != "string")
|
|
2143
|
-
continue;
|
|
2144
|
-
const m = y.trim();
|
|
2145
|
-
if (!m)
|
|
2146
|
-
continue;
|
|
2147
|
-
const c = Object.keys(d).find((g) => g.toLowerCase() === "javascript"), u = c ? d[c] : void 0;
|
|
2148
|
-
typeof u == "string" && s.set(m, u), i.has(m) || (o.push(m), i.add(m));
|
|
2149
|
-
}
|
|
2150
|
-
if (!o.length && s.size === 0)
|
|
2151
|
-
return { modules: [] };
|
|
2152
|
-
const a = Array.from(s.entries()).map(([l, d]) => ({
|
|
2153
|
-
name: l,
|
|
2154
|
-
javascript: d
|
|
2155
|
-
}));
|
|
2156
|
-
return a.length > 0 ? { modules: o, inlineModules: a } : { modules: o };
|
|
2157
|
-
}
|
|
2158
2052
|
const k = {
|
|
2159
2053
|
None: 0,
|
|
2160
2054
|
Letter: 1,
|
|
@@ -2162,7 +2056,7 @@ const k = {
|
|
|
2162
2056
|
Line: 4,
|
|
2163
2057
|
Paragraph: 8,
|
|
2164
2058
|
Emoji: 16
|
|
2165
|
-
},
|
|
2059
|
+
}, no = [
|
|
2166
2060
|
{
|
|
2167
2061
|
flag: k.Letter,
|
|
2168
2062
|
hints: [
|
|
@@ -2211,32 +2105,32 @@ const k = {
|
|
|
2211
2105
|
"[data-emoji]"
|
|
2212
2106
|
]
|
|
2213
2107
|
}
|
|
2214
|
-
],
|
|
2215
|
-
function
|
|
2216
|
-
if (!t || t.length >
|
|
2108
|
+
], nt = k.Letter | k.Word | k.Line | k.Paragraph | k.Emoji, ro = k.Letter | k.Word | k.Line | k.Paragraph, kt = /* @__PURE__ */ new Map(), oo = 16384;
|
|
2109
|
+
function Is(t, e) {
|
|
2110
|
+
if (!t || t.length > oo)
|
|
2217
2111
|
return t;
|
|
2218
|
-
const n =
|
|
2112
|
+
const n = Eo(e), r = fe(n, k.Emoji), o = n & ro;
|
|
2219
2113
|
if (o === k.None && !r)
|
|
2220
2114
|
return t;
|
|
2221
2115
|
const s = t.replace(/\r\n/g, `
|
|
2222
2116
|
`).replace(/\r/g, `
|
|
2223
2117
|
`);
|
|
2224
2118
|
if (o === k.None)
|
|
2225
|
-
return
|
|
2226
|
-
const i =
|
|
2119
|
+
return Ot(s);
|
|
2120
|
+
const i = wo(s);
|
|
2227
2121
|
if (i.length === 0)
|
|
2228
|
-
return r ?
|
|
2229
|
-
const a =
|
|
2230
|
-
for (const
|
|
2231
|
-
const y =
|
|
2232
|
-
|
|
2122
|
+
return r ? Ot(s) : t;
|
|
2123
|
+
const a = vo(i), l = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, h = [];
|
|
2124
|
+
for (const f of a) {
|
|
2125
|
+
const y = so(f, n, l);
|
|
2126
|
+
h.push(...y);
|
|
2233
2127
|
}
|
|
2234
|
-
return
|
|
2128
|
+
return h;
|
|
2235
2129
|
}
|
|
2236
|
-
function
|
|
2130
|
+
function so(t, e, n) {
|
|
2237
2131
|
const r = [];
|
|
2238
2132
|
for (const o of t) {
|
|
2239
|
-
const s =
|
|
2133
|
+
const s = io(o, e, n);
|
|
2240
2134
|
r.push(...s);
|
|
2241
2135
|
}
|
|
2242
2136
|
if (fe(e, k.Paragraph)) {
|
|
@@ -2246,7 +2140,7 @@ function Io(t, e, n) {
|
|
|
2246
2140
|
"span",
|
|
2247
2141
|
{
|
|
2248
2142
|
"data-motion-paragraph": !0,
|
|
2249
|
-
style:
|
|
2143
|
+
style: Ue(o),
|
|
2250
2144
|
children: r
|
|
2251
2145
|
},
|
|
2252
2146
|
`motion-paragraph-${o}`
|
|
@@ -2255,12 +2149,12 @@ function Io(t, e, n) {
|
|
|
2255
2149
|
}
|
|
2256
2150
|
return r;
|
|
2257
2151
|
}
|
|
2258
|
-
function
|
|
2259
|
-
const r =
|
|
2152
|
+
function io(t, e, n) {
|
|
2153
|
+
const r = ao(t.text, e, n), o = [];
|
|
2260
2154
|
if (fe(e, k.Line)) {
|
|
2261
2155
|
const s = n.line++;
|
|
2262
2156
|
o.push(
|
|
2263
|
-
/* @__PURE__ */ w.jsx("span", { "data-motion-line": !0, style:
|
|
2157
|
+
/* @__PURE__ */ w.jsx("span", { "data-motion-line": !0, style: Ue(s), children: r }, `motion-line-${s}`)
|
|
2264
2158
|
);
|
|
2265
2159
|
} else
|
|
2266
2160
|
o.push(...r);
|
|
@@ -2268,7 +2162,7 @@ function _o(t, e, n) {
|
|
|
2268
2162
|
o.push(/* @__PURE__ */ w.jsx("br", {}, `motion-break-${n.br++}`));
|
|
2269
2163
|
return o;
|
|
2270
2164
|
}
|
|
2271
|
-
function
|
|
2165
|
+
function ao(t, e, n) {
|
|
2272
2166
|
if (!t)
|
|
2273
2167
|
return [];
|
|
2274
2168
|
const r = fe(e, k.Word), o = [], s = /(\s+)/g;
|
|
@@ -2276,95 +2170,95 @@ function Oo(t, e, n) {
|
|
|
2276
2170
|
for (; (a = s.exec(t)) !== null; ) {
|
|
2277
2171
|
if (a.index > i) {
|
|
2278
2172
|
const l = t.slice(i, a.index);
|
|
2279
|
-
o.push(
|
|
2173
|
+
o.push(Ct(l, n, e, r));
|
|
2280
2174
|
}
|
|
2281
2175
|
o.push(a[0]), i = a.index + a[0].length;
|
|
2282
2176
|
}
|
|
2283
2177
|
if (i < t.length) {
|
|
2284
2178
|
const l = t.slice(i);
|
|
2285
|
-
o.push(
|
|
2179
|
+
o.push(Ct(l, n, e, r));
|
|
2286
2180
|
}
|
|
2287
2181
|
return o;
|
|
2288
2182
|
}
|
|
2289
|
-
function
|
|
2290
|
-
const o = e.word++, s =
|
|
2183
|
+
function Ct(t, e, n, r) {
|
|
2184
|
+
const o = e.word++, s = lo(t, n, e), i = `motion-word-${o}`, a = co(o, r);
|
|
2291
2185
|
return r ? /* @__PURE__ */ w.jsx("span", { "data-motion-word": !0, style: a, children: s }, i) : /* @__PURE__ */ w.jsx("span", { style: a, children: s }, i);
|
|
2292
2186
|
}
|
|
2293
|
-
function
|
|
2294
|
-
return e ? { ...
|
|
2187
|
+
function co(t, e) {
|
|
2188
|
+
return e ? { ...Ue(t), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
|
|
2295
2189
|
}
|
|
2296
|
-
function
|
|
2190
|
+
function lo(t, e, n) {
|
|
2297
2191
|
if (!t)
|
|
2298
2192
|
return [];
|
|
2299
2193
|
const r = fe(e, k.Letter), o = fe(e, k.Emoji);
|
|
2300
2194
|
if (!r) {
|
|
2301
2195
|
if (!o)
|
|
2302
2196
|
return [t];
|
|
2303
|
-
const a =
|
|
2197
|
+
const a = rt(t);
|
|
2304
2198
|
if (a.length === 0)
|
|
2305
2199
|
return [t];
|
|
2306
|
-
const { nodes: l } =
|
|
2200
|
+
const { nodes: l } = zt(a, n);
|
|
2307
2201
|
return l;
|
|
2308
2202
|
}
|
|
2309
|
-
const s = [], i =
|
|
2203
|
+
const s = [], i = rt(t);
|
|
2310
2204
|
for (const a of i) {
|
|
2311
|
-
const l = n.letter++,
|
|
2205
|
+
const l = n.letter++, h = `motion-letter-${l}`, f = Ue(l);
|
|
2312
2206
|
if (a === `
|
|
2313
2207
|
`) {
|
|
2314
2208
|
s.push(
|
|
2315
|
-
/* @__PURE__ */ w.jsx("span", { "data-motion-letter": !0, style:
|
|
2209
|
+
/* @__PURE__ */ w.jsx("span", { "data-motion-letter": !0, style: f, children: /* @__PURE__ */ w.jsx("br", {}) }, h)
|
|
2316
2210
|
);
|
|
2317
2211
|
continue;
|
|
2318
2212
|
}
|
|
2319
|
-
const m = o &&
|
|
2213
|
+
const m = o && Gt(a) ? { "data-motion-emoji": !0 } : void 0, c = a === " " ? " " : a;
|
|
2320
2214
|
s.push(
|
|
2321
|
-
/* @__PURE__ */ w.jsx("span", { "data-motion-letter": !0, style:
|
|
2215
|
+
/* @__PURE__ */ w.jsx("span", { "data-motion-letter": !0, style: f, ...m, children: c }, h)
|
|
2322
2216
|
);
|
|
2323
2217
|
}
|
|
2324
2218
|
return s;
|
|
2325
2219
|
}
|
|
2326
|
-
function
|
|
2220
|
+
function rt(t) {
|
|
2327
2221
|
if (!t)
|
|
2328
2222
|
return [];
|
|
2329
|
-
const e =
|
|
2330
|
-
return e ? Array.from(e.segment(t), (n) => n.segment) :
|
|
2223
|
+
const e = uo();
|
|
2224
|
+
return e ? Array.from(e.segment(t), (n) => n.segment) : fo(t);
|
|
2331
2225
|
}
|
|
2332
2226
|
let Se;
|
|
2333
|
-
function
|
|
2227
|
+
function uo() {
|
|
2334
2228
|
return Se !== void 0 || (typeof Intl < "u" && typeof Intl.Segmenter == "function" ? Se = new Intl.Segmenter(void 0, { granularity: "grapheme" }) : Se = null), Se;
|
|
2335
2229
|
}
|
|
2336
|
-
function
|
|
2230
|
+
function fo(t) {
|
|
2337
2231
|
const e = [], n = Array.from(t);
|
|
2338
2232
|
let r = "";
|
|
2339
2233
|
for (let o = 0; o < n.length; o++) {
|
|
2340
2234
|
const s = n[o], i = n[o + 1];
|
|
2341
|
-
r += s, !(i &&
|
|
2235
|
+
r += s, !(i && ho(s, i)) && (e.push(r), r = "");
|
|
2342
2236
|
}
|
|
2343
2237
|
return r && e.push(r), e;
|
|
2344
2238
|
}
|
|
2345
|
-
function
|
|
2346
|
-
return e ? !!(
|
|
2239
|
+
function ho(t, e) {
|
|
2240
|
+
return e ? !!(It(t) || It(e) || go(e) || po(e) || mo(e) || _t(t) && _t(e)) : !1;
|
|
2347
2241
|
}
|
|
2348
|
-
function
|
|
2242
|
+
function It(t) {
|
|
2349
2243
|
return t.codePointAt(0) === 8205;
|
|
2350
2244
|
}
|
|
2351
|
-
function
|
|
2245
|
+
function po(t) {
|
|
2352
2246
|
const e = t.codePointAt(0);
|
|
2353
2247
|
return e === void 0 ? !1 : e >= 65024 && e <= 65039 || e >= 917760 && e <= 917999;
|
|
2354
2248
|
}
|
|
2355
|
-
function
|
|
2249
|
+
function mo(t) {
|
|
2356
2250
|
const e = t.codePointAt(0);
|
|
2357
2251
|
return e === void 0 ? !1 : e >= 127995 && e <= 127999;
|
|
2358
2252
|
}
|
|
2359
|
-
function
|
|
2253
|
+
function _t(t) {
|
|
2360
2254
|
const e = t.codePointAt(0);
|
|
2361
2255
|
return e === void 0 ? !1 : e >= 127462 && e <= 127487;
|
|
2362
2256
|
}
|
|
2363
|
-
let
|
|
2364
|
-
function
|
|
2365
|
-
return t ? (
|
|
2257
|
+
let ze;
|
|
2258
|
+
function go(t) {
|
|
2259
|
+
return t ? (ze || (ze = yo()), ze(t)) : !1;
|
|
2366
2260
|
}
|
|
2367
|
-
function
|
|
2261
|
+
function yo() {
|
|
2368
2262
|
try {
|
|
2369
2263
|
const t = new RegExp("\\p{Mark}", "u");
|
|
2370
2264
|
return (e) => t.test(e);
|
|
@@ -2375,19 +2269,19 @@ function $o() {
|
|
|
2375
2269
|
};
|
|
2376
2270
|
}
|
|
2377
2271
|
}
|
|
2378
|
-
let
|
|
2379
|
-
function
|
|
2380
|
-
return t ? (
|
|
2272
|
+
let Xe;
|
|
2273
|
+
function Gt(t) {
|
|
2274
|
+
return t ? (Xe || (Xe = bo()), Xe(t)) : !1;
|
|
2381
2275
|
}
|
|
2382
|
-
function
|
|
2276
|
+
function bo() {
|
|
2383
2277
|
try {
|
|
2384
2278
|
const t = new RegExp("\\p{Extended_Pictographic}", "u");
|
|
2385
2279
|
return (e) => t.test(e);
|
|
2386
2280
|
} catch {
|
|
2387
|
-
return
|
|
2281
|
+
return So;
|
|
2388
2282
|
}
|
|
2389
2283
|
}
|
|
2390
|
-
function
|
|
2284
|
+
function So(t) {
|
|
2391
2285
|
if (!t)
|
|
2392
2286
|
return !1;
|
|
2393
2287
|
for (const e of Array.from(t)) {
|
|
@@ -2397,7 +2291,7 @@ function Fo(t) {
|
|
|
2397
2291
|
}
|
|
2398
2292
|
return !1;
|
|
2399
2293
|
}
|
|
2400
|
-
function
|
|
2294
|
+
function wo(t) {
|
|
2401
2295
|
const e = [];
|
|
2402
2296
|
let n = "", r = 0;
|
|
2403
2297
|
for (let o = 0; o < t.length; o++) {
|
|
@@ -2411,7 +2305,7 @@ function Vo(t) {
|
|
|
2411
2305
|
}
|
|
2412
2306
|
return (r > 0 || n.length > 0) && e.push({ text: n, breaks: r }), e;
|
|
2413
2307
|
}
|
|
2414
|
-
function
|
|
2308
|
+
function vo(t) {
|
|
2415
2309
|
if (t.length === 0)
|
|
2416
2310
|
return [];
|
|
2417
2311
|
const e = [];
|
|
@@ -2423,7 +2317,7 @@ function Wo(t) {
|
|
|
2423
2317
|
function fe(t, e) {
|
|
2424
2318
|
return (t & e) === e;
|
|
2425
2319
|
}
|
|
2426
|
-
function
|
|
2320
|
+
function Ue(t) {
|
|
2427
2321
|
return {
|
|
2428
2322
|
"--tw-motion-seq-index": t.toString(),
|
|
2429
2323
|
backgroundColor: "inherit",
|
|
@@ -2440,27 +2334,27 @@ function je(t) {
|
|
|
2440
2334
|
WebkitTextFillColor: "inherit"
|
|
2441
2335
|
};
|
|
2442
2336
|
}
|
|
2443
|
-
function
|
|
2337
|
+
function Ot(t) {
|
|
2444
2338
|
if (!t)
|
|
2445
2339
|
return t;
|
|
2446
|
-
const e =
|
|
2340
|
+
const e = rt(t);
|
|
2447
2341
|
if (e.length === 0)
|
|
2448
2342
|
return t;
|
|
2449
|
-
const { nodes: n, sawEmoji: r } =
|
|
2343
|
+
const { nodes: n, sawEmoji: r } = zt(e);
|
|
2450
2344
|
return r ? n.length === 1 ? n[0] ?? t : n : t;
|
|
2451
2345
|
}
|
|
2452
|
-
function
|
|
2346
|
+
function zt(t, e) {
|
|
2453
2347
|
const n = [];
|
|
2454
2348
|
let r = "", o = !1, s = e?.emoji ?? 0;
|
|
2455
2349
|
const i = () => {
|
|
2456
2350
|
r && (n.push(r), r = "");
|
|
2457
2351
|
};
|
|
2458
2352
|
for (const a of t) {
|
|
2459
|
-
if (
|
|
2353
|
+
if (Gt(a)) {
|
|
2460
2354
|
o = !0, i();
|
|
2461
|
-
const
|
|
2355
|
+
const h = `motion-emoji-${e ? e.emoji++ : s++}`;
|
|
2462
2356
|
n.push(
|
|
2463
|
-
/* @__PURE__ */ w.jsx("span", { "data-motion-emoji": !0, children: a },
|
|
2357
|
+
/* @__PURE__ */ w.jsx("span", { "data-motion-emoji": !0, children: a }, h)
|
|
2464
2358
|
);
|
|
2465
2359
|
continue;
|
|
2466
2360
|
}
|
|
@@ -2468,13 +2362,13 @@ function Qt(t, e) {
|
|
|
2468
2362
|
}
|
|
2469
2363
|
return i(), o ? { nodes: n, sawEmoji: !0 } : { nodes: [t.join("")], sawEmoji: !1 };
|
|
2470
2364
|
}
|
|
2471
|
-
function
|
|
2365
|
+
function Eo(t) {
|
|
2472
2366
|
if (!t)
|
|
2473
2367
|
return k.None;
|
|
2474
2368
|
const e = t.trim();
|
|
2475
2369
|
if (!e)
|
|
2476
2370
|
return k.None;
|
|
2477
|
-
const n =
|
|
2371
|
+
const n = kt.get(e);
|
|
2478
2372
|
if (typeof n == "number")
|
|
2479
2373
|
return n;
|
|
2480
2374
|
if (typeof document > "u")
|
|
@@ -2482,25 +2376,25 @@ function Ko(t) {
|
|
|
2482
2376
|
const r = e.split(/\s+/).filter(Boolean);
|
|
2483
2377
|
if (r.length === 0)
|
|
2484
2378
|
return k.None;
|
|
2485
|
-
const s = r.map((l) => `.${
|
|
2486
|
-
(l) => new RegExp(`(^|[^a-zA-Z0-9_-])${
|
|
2379
|
+
const s = r.map((l) => `.${Ro(l)}`).map(
|
|
2380
|
+
(l) => new RegExp(`(^|[^a-zA-Z0-9_-])${Ao(l)}(?![a-zA-Z0-9_-])`)
|
|
2487
2381
|
);
|
|
2488
2382
|
let i = k.None, a = !1;
|
|
2489
2383
|
for (const l of Array.from(document.styleSheets)) {
|
|
2490
|
-
let
|
|
2384
|
+
let h;
|
|
2491
2385
|
try {
|
|
2492
|
-
|
|
2386
|
+
h = l.cssRules;
|
|
2493
2387
|
} catch {
|
|
2494
2388
|
continue;
|
|
2495
2389
|
}
|
|
2496
|
-
const
|
|
2497
|
-
if (
|
|
2390
|
+
const f = Xt(h, s);
|
|
2391
|
+
if (f.mask && (i |= f.mask, i === nt))
|
|
2498
2392
|
break;
|
|
2499
|
-
a ||=
|
|
2393
|
+
a ||= f.sawStyleRule;
|
|
2500
2394
|
}
|
|
2501
|
-
return (i !== k.None || a) &&
|
|
2395
|
+
return (i !== k.None || a) && kt.set(e, i), i;
|
|
2502
2396
|
}
|
|
2503
|
-
function
|
|
2397
|
+
function Xt(t, e) {
|
|
2504
2398
|
if (!t)
|
|
2505
2399
|
return { mask: k.None, sawStyleRule: !1 };
|
|
2506
2400
|
let n = k.None, r = !1;
|
|
@@ -2509,15 +2403,15 @@ function en(t, e) {
|
|
|
2509
2403
|
if (s) {
|
|
2510
2404
|
if (s.type === CSSRule.STYLE_RULE) {
|
|
2511
2405
|
const a = s.selectorText ?? "";
|
|
2512
|
-
if (!a || !e.some((
|
|
2406
|
+
if (!a || !e.some((h) => h.test(a))) continue;
|
|
2513
2407
|
r = !0;
|
|
2514
|
-
for (const
|
|
2515
|
-
|
|
2516
|
-
if (n ===
|
|
2408
|
+
for (const h of no)
|
|
2409
|
+
h.hints.some((f) => a.includes(f)) && (n |= h.flag);
|
|
2410
|
+
if (n === nt)
|
|
2517
2411
|
return { mask: n, sawStyleRule: !0 };
|
|
2518
2412
|
} else if ("cssRules" in s) {
|
|
2519
|
-
const i =
|
|
2520
|
-
if (i.mask && (n |= i.mask, n ===
|
|
2413
|
+
const i = Xt(s.cssRules, e);
|
|
2414
|
+
if (i.mask && (n |= i.mask, n === nt))
|
|
2521
2415
|
return { mask: n, sawStyleRule: !0 };
|
|
2522
2416
|
r ||= i.sawStyleRule;
|
|
2523
2417
|
}
|
|
@@ -2525,48 +2419,63 @@ function en(t, e) {
|
|
|
2525
2419
|
}
|
|
2526
2420
|
return { mask: n, sawStyleRule: r };
|
|
2527
2421
|
}
|
|
2528
|
-
function
|
|
2422
|
+
function Ro(t) {
|
|
2529
2423
|
return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(t) : t.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
|
|
2530
2424
|
}
|
|
2531
|
-
function
|
|
2425
|
+
function Ao(t) {
|
|
2532
2426
|
return t.replace(/[.*+?^${}()|[\]\\]/g, (e) => `\\${e}`);
|
|
2533
2427
|
}
|
|
2534
|
-
const
|
|
2535
|
-
function
|
|
2428
|
+
const ct = "ikon-auth-session", Ht = "ikon-auth-auto-login-attempted-run", To = 10080 * 60 * 1e3, ko = 60 * 1e3;
|
|
2429
|
+
function qt(t) {
|
|
2536
2430
|
try {
|
|
2537
2431
|
const e = t.split(".");
|
|
2538
2432
|
if (e.length !== 3) return !0;
|
|
2539
2433
|
const n = e[1].replace(/-/g, "+").replace(/_/g, "/"), r = n + "=".repeat((4 - n.length % 4) % 4), o = JSON.parse(atob(r));
|
|
2540
|
-
return typeof o.exp != "number" ? !1 : Date.now() >= o.exp * 1e3 -
|
|
2434
|
+
return typeof o.exp != "number" ? !1 : Date.now() >= o.exp * 1e3 - ko;
|
|
2541
2435
|
} catch {
|
|
2542
2436
|
return !0;
|
|
2543
2437
|
}
|
|
2544
2438
|
}
|
|
2545
|
-
function
|
|
2439
|
+
function he(t) {
|
|
2546
2440
|
try {
|
|
2547
|
-
localStorage.setItem(
|
|
2441
|
+
localStorage.setItem(ct, JSON.stringify(t));
|
|
2548
2442
|
} catch {
|
|
2549
2443
|
console.warn("Failed to save auth session to localStorage");
|
|
2550
2444
|
}
|
|
2551
2445
|
}
|
|
2552
|
-
function
|
|
2446
|
+
function Jt() {
|
|
2553
2447
|
try {
|
|
2554
|
-
const t = localStorage.getItem(
|
|
2448
|
+
const t = localStorage.getItem(ct);
|
|
2555
2449
|
if (!t) return null;
|
|
2556
2450
|
const e = JSON.parse(t);
|
|
2557
|
-
return Date.now() - e.authenticatedAt >
|
|
2451
|
+
return Date.now() - e.authenticatedAt > To || qt(e.token) ? (Le(), null) : e;
|
|
2558
2452
|
} catch {
|
|
2559
2453
|
return console.warn("Failed to load auth session from localStorage"), null;
|
|
2560
2454
|
}
|
|
2561
2455
|
}
|
|
2562
|
-
function
|
|
2456
|
+
function Le() {
|
|
2563
2457
|
try {
|
|
2564
|
-
localStorage.removeItem(
|
|
2458
|
+
localStorage.removeItem(ct);
|
|
2565
2459
|
} catch {
|
|
2566
2460
|
console.warn("Failed to clear auth session from localStorage");
|
|
2567
2461
|
}
|
|
2568
2462
|
}
|
|
2569
|
-
function
|
|
2463
|
+
function Co(t) {
|
|
2464
|
+
if (t)
|
|
2465
|
+
try {
|
|
2466
|
+
sessionStorage.setItem(Ht, t);
|
|
2467
|
+
} catch {
|
|
2468
|
+
console.warn("Failed to record auto-login attempt in sessionStorage");
|
|
2469
|
+
}
|
|
2470
|
+
}
|
|
2471
|
+
function Io() {
|
|
2472
|
+
try {
|
|
2473
|
+
return sessionStorage.getItem(Ht);
|
|
2474
|
+
} catch {
|
|
2475
|
+
return null;
|
|
2476
|
+
}
|
|
2477
|
+
}
|
|
2478
|
+
function ne(t) {
|
|
2570
2479
|
return {
|
|
2571
2480
|
id: "",
|
|
2572
2481
|
provider: t.provider,
|
|
@@ -2574,16 +2483,16 @@ function le(t) {
|
|
|
2574
2483
|
authenticatedAt: t.authenticatedAt
|
|
2575
2484
|
};
|
|
2576
2485
|
}
|
|
2577
|
-
const
|
|
2578
|
-
async function
|
|
2486
|
+
const Zt = 15e3, we = oe("AuthService");
|
|
2487
|
+
async function xt(t) {
|
|
2579
2488
|
try {
|
|
2580
2489
|
return await fetch(t, { method: "GET", mode: "no-cors" }), "no-cors probe SUCCEEDED → origin is reachable; the failure is most likely CORS (missing/!allowed Access-Control headers)";
|
|
2581
2490
|
} catch (e) {
|
|
2582
2491
|
return `no-cors probe ALSO FAILED (${e instanceof Error ? e.name : "Error"}) → origin is unreachable: TLS handshake / certificate, DNS, or network (old browser may not trust this host's cert)`;
|
|
2583
2492
|
}
|
|
2584
2493
|
}
|
|
2585
|
-
async function
|
|
2586
|
-
const n =
|
|
2494
|
+
async function Qt(t, e) {
|
|
2495
|
+
const n = kn(), r = {
|
|
2587
2496
|
method: "POST",
|
|
2588
2497
|
headers: { "Content-Type": "application/json" },
|
|
2589
2498
|
body: JSON.stringify({ deviceId: n, space: t })
|
|
@@ -2592,33 +2501,33 @@ async function rn(t, e) {
|
|
|
2592
2501
|
let i;
|
|
2593
2502
|
try {
|
|
2594
2503
|
i = await fetch(s, r);
|
|
2595
|
-
} catch (
|
|
2596
|
-
const
|
|
2504
|
+
} catch (h) {
|
|
2505
|
+
const f = h instanceof Error ? `${h.name}: ${h.message}` : String(h), y = Cn(), m = y ? `${y}/anonymous` : null;
|
|
2597
2506
|
if (m && m !== s) {
|
|
2598
|
-
we.warn(`Anonymous auth could not reach ${s} (${
|
|
2507
|
+
we.warn(`Anonymous auth could not reach ${s} (${f}); falling back to same-origin ${m}`);
|
|
2599
2508
|
try {
|
|
2600
2509
|
i = await fetch(m, r);
|
|
2601
2510
|
} catch (c) {
|
|
2602
|
-
const u = c instanceof Error ? `${c.name}: ${c.message}` : String(c), g = await
|
|
2603
|
-
throw we.error(`Anonymous auth failed on both direct (${s}: ${
|
|
2511
|
+
const u = c instanceof Error ? `${c.name}: ${c.message}` : String(c), g = await xt(e);
|
|
2512
|
+
throw we.error(`Anonymous auth failed on both direct (${s}: ${f}) and same-origin (${m}: ${u}). ${g}`), new Error(`Anonymous auth unreachable: direct ${s} (${f}) and same-origin ${m} (${u})`);
|
|
2604
2513
|
}
|
|
2605
2514
|
} else {
|
|
2606
|
-
const c = await
|
|
2607
|
-
throw we.error(`Anonymous auth fetch threw for ${s} — ${
|
|
2515
|
+
const c = await xt(e);
|
|
2516
|
+
throw we.error(`Anonymous auth fetch threw for ${s} — ${f}. ${c}`), new Error(`Anonymous auth could not reach ${s} (${f}). ${c}`);
|
|
2608
2517
|
}
|
|
2609
2518
|
}
|
|
2610
2519
|
if (!i.ok) {
|
|
2611
|
-
const
|
|
2612
|
-
throw we.error(`Anonymous auth HTTP ${i.status} from ${i.url}: ${
|
|
2520
|
+
const h = await i.text().catch(() => "Unknown error");
|
|
2521
|
+
throw we.error(`Anonymous auth HTTP ${i.status} from ${i.url}: ${h}`), new Error(`Anonymous auth failed: ${i.status} ${h}`);
|
|
2613
2522
|
}
|
|
2614
2523
|
const { token: a } = await i.json(), l = {
|
|
2615
2524
|
token: a,
|
|
2616
2525
|
provider: "anonymous",
|
|
2617
2526
|
authenticatedAt: Date.now()
|
|
2618
2527
|
};
|
|
2619
|
-
return
|
|
2528
|
+
return he(l), l;
|
|
2620
2529
|
}
|
|
2621
|
-
async function
|
|
2530
|
+
async function _o({ email: t, spaceId: e, authUrl: n }) {
|
|
2622
2531
|
const r = await fetch(`${n}/email/send`, {
|
|
2623
2532
|
method: "POST",
|
|
2624
2533
|
headers: { "Content-Type": "application/json" },
|
|
@@ -2626,14 +2535,14 @@ async function qo({ email: t, spaceId: e, authUrl: n }) {
|
|
|
2626
2535
|
email: t.trim(),
|
|
2627
2536
|
space: e
|
|
2628
2537
|
}),
|
|
2629
|
-
signal:
|
|
2538
|
+
signal: Dt(Zt)
|
|
2630
2539
|
});
|
|
2631
2540
|
if (!r.ok) {
|
|
2632
2541
|
const o = await r.text().catch(() => "Failed to send login code");
|
|
2633
2542
|
throw new Error(o);
|
|
2634
2543
|
}
|
|
2635
2544
|
}
|
|
2636
|
-
async function
|
|
2545
|
+
async function Oo({ email: t, code: e, authUrl: n }) {
|
|
2637
2546
|
const r = await fetch(`${n}/email/code`, {
|
|
2638
2547
|
method: "POST",
|
|
2639
2548
|
headers: { "Content-Type": "application/json" },
|
|
@@ -2641,7 +2550,7 @@ async function Jo({ email: t, code: e, authUrl: n }) {
|
|
|
2641
2550
|
email: t.trim(),
|
|
2642
2551
|
code: e.trim()
|
|
2643
2552
|
}),
|
|
2644
|
-
signal:
|
|
2553
|
+
signal: Dt(Zt)
|
|
2645
2554
|
});
|
|
2646
2555
|
if (!r.ok) {
|
|
2647
2556
|
const i = await r.text().catch(() => "Invalid code");
|
|
@@ -2652,23 +2561,23 @@ async function Jo({ email: t, code: e, authUrl: n }) {
|
|
|
2652
2561
|
provider: "email",
|
|
2653
2562
|
authenticatedAt: Date.now()
|
|
2654
2563
|
};
|
|
2655
|
-
return
|
|
2564
|
+
return he(s), s;
|
|
2656
2565
|
}
|
|
2657
|
-
function
|
|
2566
|
+
function xo() {
|
|
2658
2567
|
const t = new URLSearchParams(window.location.search), e = t.get("ikon_token"), n = t.get("ikon_provider");
|
|
2659
2568
|
return e && n ? { token: e, provider: n } : null;
|
|
2660
2569
|
}
|
|
2661
|
-
function
|
|
2570
|
+
function No() {
|
|
2662
2571
|
return new URLSearchParams(window.location.search).get("error");
|
|
2663
2572
|
}
|
|
2664
|
-
function
|
|
2573
|
+
function Nt() {
|
|
2665
2574
|
window.history.replaceState({}, "", window.location.pathname);
|
|
2666
2575
|
}
|
|
2667
|
-
function
|
|
2576
|
+
function Lo(t, e, n, r) {
|
|
2668
2577
|
const o = r ?? window.location.origin + window.location.pathname + window.location.search;
|
|
2669
2578
|
return `${n}/oauth/${t}?space=${encodeURIComponent(e)}&return=${encodeURIComponent(o)}`;
|
|
2670
2579
|
}
|
|
2671
|
-
async function
|
|
2580
|
+
async function Po(t) {
|
|
2672
2581
|
const e = await fetch(`${t}/passkey/registration/options`, {
|
|
2673
2582
|
method: "POST",
|
|
2674
2583
|
headers: { "Content-Type": "application/json" }
|
|
@@ -2679,7 +2588,7 @@ async function ts(t) {
|
|
|
2679
2588
|
}
|
|
2680
2589
|
return e.json();
|
|
2681
2590
|
}
|
|
2682
|
-
async function
|
|
2591
|
+
async function Uo(t, e, n) {
|
|
2683
2592
|
const r = await fetch(`${t}/passkey/registration/verify`, {
|
|
2684
2593
|
method: "POST",
|
|
2685
2594
|
headers: { "Content-Type": "application/json" },
|
|
@@ -2694,9 +2603,9 @@ async function ns(t, e, n) {
|
|
|
2694
2603
|
provider: "passkey",
|
|
2695
2604
|
authenticatedAt: Date.now()
|
|
2696
2605
|
};
|
|
2697
|
-
return
|
|
2606
|
+
return he(s), s;
|
|
2698
2607
|
}
|
|
2699
|
-
async function
|
|
2608
|
+
async function Mo(t, e) {
|
|
2700
2609
|
const n = await fetch(`${t}/passkey/authentication/options`, {
|
|
2701
2610
|
method: "POST",
|
|
2702
2611
|
headers: { "Content-Type": "application/json" },
|
|
@@ -2708,7 +2617,7 @@ async function rs(t, e) {
|
|
|
2708
2617
|
}
|
|
2709
2618
|
return n.json();
|
|
2710
2619
|
}
|
|
2711
|
-
async function
|
|
2620
|
+
async function Do(t, e) {
|
|
2712
2621
|
const n = await fetch(`${t}/passkey/authentication/verify`, {
|
|
2713
2622
|
method: "POST",
|
|
2714
2623
|
headers: { "Content-Type": "application/json" },
|
|
@@ -2723,7 +2632,7 @@ async function os(t, e) {
|
|
|
2723
2632
|
provider: "passkey",
|
|
2724
2633
|
authenticatedAt: Date.now()
|
|
2725
2634
|
};
|
|
2726
|
-
return
|
|
2635
|
+
return he(o), o;
|
|
2727
2636
|
}
|
|
2728
2637
|
function X(t) {
|
|
2729
2638
|
const e = new Uint8Array(t);
|
|
@@ -2732,23 +2641,23 @@ function X(t) {
|
|
|
2732
2641
|
n += String.fromCharCode(o);
|
|
2733
2642
|
return btoa(n).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
2734
2643
|
}
|
|
2735
|
-
function
|
|
2644
|
+
function Pe(t) {
|
|
2736
2645
|
const e = t.replace(/-/g, "+").replace(/_/g, "/"), n = (4 - e.length % 4) % 4, r = e.padEnd(e.length + n, "="), o = atob(r), s = new ArrayBuffer(o.length), i = new Uint8Array(s);
|
|
2737
2646
|
for (let a = 0; a < o.length; a++)
|
|
2738
2647
|
i[a] = o.charCodeAt(a);
|
|
2739
2648
|
return s;
|
|
2740
2649
|
}
|
|
2741
|
-
function
|
|
2742
|
-
return
|
|
2650
|
+
function lt() {
|
|
2651
|
+
return jo.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
|
|
2743
2652
|
}
|
|
2744
|
-
const
|
|
2653
|
+
const jo = {
|
|
2745
2654
|
stubThis: (t) => t
|
|
2746
2655
|
};
|
|
2747
|
-
function
|
|
2656
|
+
function en(t) {
|
|
2748
2657
|
const { id: e } = t;
|
|
2749
2658
|
return {
|
|
2750
2659
|
...t,
|
|
2751
|
-
id:
|
|
2660
|
+
id: Pe(e),
|
|
2752
2661
|
/**
|
|
2753
2662
|
* `descriptor.transports` is an array of our `AuthenticatorTransportFuture` that includes newer
|
|
2754
2663
|
* transports that TypeScript's DOM lib is ignorant of. Convince TS that our list of transports
|
|
@@ -2757,14 +2666,14 @@ function on(t) {
|
|
|
2757
2666
|
transports: t.transports
|
|
2758
2667
|
};
|
|
2759
2668
|
}
|
|
2760
|
-
function
|
|
2669
|
+
function tn(t) {
|
|
2761
2670
|
return (
|
|
2762
2671
|
// Consider localhost valid as well since it's okay wrt Secure Contexts
|
|
2763
2672
|
t === "localhost" || // Support punycode (ACE) or ascii labels and domains
|
|
2764
2673
|
/^((xn--[a-z0-9-]+|[a-z0-9]+(-[a-z0-9]+)*)\.)+([a-z]{2,}|xn--[a-z0-9-]+)$/i.test(t)
|
|
2765
2674
|
);
|
|
2766
2675
|
}
|
|
2767
|
-
class
|
|
2676
|
+
class D extends Error {
|
|
2768
2677
|
constructor({ message: e, code: n, cause: r, name: o }) {
|
|
2769
2678
|
super(e, { cause: r }), Object.defineProperty(this, "code", {
|
|
2770
2679
|
enumerable: !0,
|
|
@@ -2774,20 +2683,20 @@ class j extends Error {
|
|
|
2774
2683
|
}), this.name = o ?? r.name, this.code = n;
|
|
2775
2684
|
}
|
|
2776
2685
|
}
|
|
2777
|
-
function
|
|
2686
|
+
function $o({ error: t, options: e }) {
|
|
2778
2687
|
const { publicKey: n } = e;
|
|
2779
2688
|
if (!n)
|
|
2780
2689
|
throw Error("options was missing required publicKey property");
|
|
2781
2690
|
if (t.name === "AbortError") {
|
|
2782
2691
|
if (e.signal instanceof AbortSignal)
|
|
2783
|
-
return new
|
|
2692
|
+
return new D({
|
|
2784
2693
|
message: "Registration ceremony was sent an abort signal",
|
|
2785
2694
|
code: "ERROR_CEREMONY_ABORTED",
|
|
2786
2695
|
cause: t
|
|
2787
2696
|
});
|
|
2788
2697
|
} else if (t.name === "ConstraintError") {
|
|
2789
2698
|
if (n.authenticatorSelection?.requireResidentKey === !0)
|
|
2790
|
-
return new
|
|
2699
|
+
return new D({
|
|
2791
2700
|
message: "Discoverable credentials were required but no available authenticator supported it",
|
|
2792
2701
|
code: "ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",
|
|
2793
2702
|
cause: t
|
|
@@ -2796,63 +2705,63 @@ function is({ error: t, options: e }) {
|
|
|
2796
2705
|
// @ts-ignore: `mediation` doesn't yet exist on CredentialCreationOptions but it's possible as of Sept 2024
|
|
2797
2706
|
e.mediation === "conditional" && n.authenticatorSelection?.userVerification === "required"
|
|
2798
2707
|
)
|
|
2799
|
-
return new
|
|
2708
|
+
return new D({
|
|
2800
2709
|
message: "User verification was required during automatic registration but it could not be performed",
|
|
2801
2710
|
code: "ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",
|
|
2802
2711
|
cause: t
|
|
2803
2712
|
});
|
|
2804
2713
|
if (n.authenticatorSelection?.userVerification === "required")
|
|
2805
|
-
return new
|
|
2714
|
+
return new D({
|
|
2806
2715
|
message: "User verification was required but no available authenticator supported it",
|
|
2807
2716
|
code: "ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",
|
|
2808
2717
|
cause: t
|
|
2809
2718
|
});
|
|
2810
2719
|
} else {
|
|
2811
2720
|
if (t.name === "InvalidStateError")
|
|
2812
|
-
return new
|
|
2721
|
+
return new D({
|
|
2813
2722
|
message: "The authenticator was previously registered",
|
|
2814
2723
|
code: "ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",
|
|
2815
2724
|
cause: t
|
|
2816
2725
|
});
|
|
2817
2726
|
if (t.name === "NotAllowedError")
|
|
2818
|
-
return new
|
|
2727
|
+
return new D({
|
|
2819
2728
|
message: t.message,
|
|
2820
2729
|
code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
|
|
2821
2730
|
cause: t
|
|
2822
2731
|
});
|
|
2823
2732
|
if (t.name === "NotSupportedError")
|
|
2824
|
-
return n.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new
|
|
2733
|
+
return n.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new D({
|
|
2825
2734
|
message: 'No entry in pubKeyCredParams was of type "public-key"',
|
|
2826
2735
|
code: "ERROR_MALFORMED_PUBKEYCREDPARAMS",
|
|
2827
2736
|
cause: t
|
|
2828
|
-
}) : new
|
|
2737
|
+
}) : new D({
|
|
2829
2738
|
message: "No available authenticator supported any of the specified pubKeyCredParams algorithms",
|
|
2830
2739
|
code: "ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",
|
|
2831
2740
|
cause: t
|
|
2832
2741
|
});
|
|
2833
2742
|
if (t.name === "SecurityError") {
|
|
2834
2743
|
const r = globalThis.location.hostname;
|
|
2835
|
-
if (
|
|
2744
|
+
if (tn(r)) {
|
|
2836
2745
|
if (n.rp.id !== r)
|
|
2837
|
-
return new
|
|
2746
|
+
return new D({
|
|
2838
2747
|
message: `The RP ID "${n.rp.id}" is invalid for this domain`,
|
|
2839
2748
|
code: "ERROR_INVALID_RP_ID",
|
|
2840
2749
|
cause: t
|
|
2841
2750
|
});
|
|
2842
|
-
} else return new
|
|
2751
|
+
} else return new D({
|
|
2843
2752
|
message: `${globalThis.location.hostname} is an invalid domain`,
|
|
2844
2753
|
code: "ERROR_INVALID_DOMAIN",
|
|
2845
2754
|
cause: t
|
|
2846
2755
|
});
|
|
2847
2756
|
} else if (t.name === "TypeError") {
|
|
2848
2757
|
if (n.user.id.byteLength < 1 || n.user.id.byteLength > 64)
|
|
2849
|
-
return new
|
|
2758
|
+
return new D({
|
|
2850
2759
|
message: "User ID was not between 1 and 64 characters",
|
|
2851
2760
|
code: "ERROR_INVALID_USER_ID_LENGTH",
|
|
2852
2761
|
cause: t
|
|
2853
2762
|
});
|
|
2854
2763
|
} else if (t.name === "UnknownError")
|
|
2855
|
-
return new
|
|
2764
|
+
return new D({
|
|
2856
2765
|
message: "The authenticator was unable to process the specified options, or could not create a new credential",
|
|
2857
2766
|
code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
|
|
2858
2767
|
cause: t
|
|
@@ -2860,7 +2769,7 @@ function is({ error: t, options: e }) {
|
|
|
2860
2769
|
}
|
|
2861
2770
|
return t;
|
|
2862
2771
|
}
|
|
2863
|
-
class
|
|
2772
|
+
class Bo {
|
|
2864
2773
|
constructor() {
|
|
2865
2774
|
Object.defineProperty(this, "controller", {
|
|
2866
2775
|
enumerable: !0,
|
|
@@ -2884,43 +2793,43 @@ class as {
|
|
|
2884
2793
|
}
|
|
2885
2794
|
}
|
|
2886
2795
|
}
|
|
2887
|
-
const
|
|
2888
|
-
function
|
|
2889
|
-
if (t && !(
|
|
2796
|
+
const nn = new Bo(), Fo = ["cross-platform", "platform"];
|
|
2797
|
+
function rn(t) {
|
|
2798
|
+
if (t && !(Fo.indexOf(t) < 0))
|
|
2890
2799
|
return t;
|
|
2891
2800
|
}
|
|
2892
|
-
async function
|
|
2801
|
+
async function Vo(t) {
|
|
2893
2802
|
!t.optionsJSON && t.challenge && (console.warn("startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."), t = { optionsJSON: t });
|
|
2894
2803
|
const { optionsJSON: e, useAutoRegister: n = !1 } = t;
|
|
2895
|
-
if (!
|
|
2804
|
+
if (!lt())
|
|
2896
2805
|
throw new Error("WebAuthn is not supported in this browser");
|
|
2897
2806
|
const r = {
|
|
2898
2807
|
...e,
|
|
2899
|
-
challenge:
|
|
2808
|
+
challenge: Pe(e.challenge),
|
|
2900
2809
|
user: {
|
|
2901
2810
|
...e.user,
|
|
2902
|
-
id:
|
|
2811
|
+
id: Pe(e.user.id)
|
|
2903
2812
|
},
|
|
2904
|
-
excludeCredentials: e.excludeCredentials?.map(
|
|
2813
|
+
excludeCredentials: e.excludeCredentials?.map(en)
|
|
2905
2814
|
}, o = {};
|
|
2906
|
-
n && (o.mediation = "conditional"), o.publicKey = r, o.signal =
|
|
2815
|
+
n && (o.mediation = "conditional"), o.publicKey = r, o.signal = nn.createNewAbortSignal();
|
|
2907
2816
|
let s;
|
|
2908
2817
|
try {
|
|
2909
2818
|
s = await navigator.credentials.create(o);
|
|
2910
2819
|
} catch (u) {
|
|
2911
|
-
throw
|
|
2820
|
+
throw $o({ error: u, options: o });
|
|
2912
2821
|
}
|
|
2913
2822
|
if (!s)
|
|
2914
2823
|
throw new Error("Registration was not completed");
|
|
2915
|
-
const { id: i, rawId: a, response: l, type:
|
|
2916
|
-
let
|
|
2917
|
-
typeof l.getTransports == "function" && (
|
|
2824
|
+
const { id: i, rawId: a, response: l, type: h } = s;
|
|
2825
|
+
let f;
|
|
2826
|
+
typeof l.getTransports == "function" && (f = l.getTransports());
|
|
2918
2827
|
let y;
|
|
2919
2828
|
if (typeof l.getPublicKeyAlgorithm == "function")
|
|
2920
2829
|
try {
|
|
2921
2830
|
y = l.getPublicKeyAlgorithm();
|
|
2922
2831
|
} catch (u) {
|
|
2923
|
-
|
|
2832
|
+
He("getPublicKeyAlgorithm()", u);
|
|
2924
2833
|
}
|
|
2925
2834
|
let m;
|
|
2926
2835
|
if (typeof l.getPublicKey == "function")
|
|
@@ -2928,14 +2837,14 @@ async function ls(t) {
|
|
|
2928
2837
|
const u = l.getPublicKey();
|
|
2929
2838
|
u !== null && (m = X(u));
|
|
2930
2839
|
} catch (u) {
|
|
2931
|
-
|
|
2840
|
+
He("getPublicKey()", u);
|
|
2932
2841
|
}
|
|
2933
2842
|
let c;
|
|
2934
2843
|
if (typeof l.getAuthenticatorData == "function")
|
|
2935
2844
|
try {
|
|
2936
2845
|
c = X(l.getAuthenticatorData());
|
|
2937
2846
|
} catch (u) {
|
|
2938
|
-
|
|
2847
|
+
He("getAuthenticatorData()", u);
|
|
2939
2848
|
}
|
|
2940
2849
|
return {
|
|
2941
2850
|
id: i,
|
|
@@ -2943,63 +2852,63 @@ async function ls(t) {
|
|
|
2943
2852
|
response: {
|
|
2944
2853
|
attestationObject: X(l.attestationObject),
|
|
2945
2854
|
clientDataJSON: X(l.clientDataJSON),
|
|
2946
|
-
transports:
|
|
2855
|
+
transports: f,
|
|
2947
2856
|
publicKeyAlgorithm: y,
|
|
2948
2857
|
publicKey: m,
|
|
2949
2858
|
authenticatorData: c
|
|
2950
2859
|
},
|
|
2951
|
-
type:
|
|
2860
|
+
type: h,
|
|
2952
2861
|
clientExtensionResults: s.getClientExtensionResults(),
|
|
2953
|
-
authenticatorAttachment:
|
|
2862
|
+
authenticatorAttachment: rn(s.authenticatorAttachment)
|
|
2954
2863
|
};
|
|
2955
2864
|
}
|
|
2956
|
-
function
|
|
2865
|
+
function He(t, e) {
|
|
2957
2866
|
console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${t}. You should report this error to them.
|
|
2958
2867
|
`, e);
|
|
2959
2868
|
}
|
|
2960
|
-
function
|
|
2961
|
-
if (!
|
|
2962
|
-
return
|
|
2869
|
+
function Wo() {
|
|
2870
|
+
if (!lt())
|
|
2871
|
+
return qe.stubThis(new Promise((e) => e(!1)));
|
|
2963
2872
|
const t = globalThis.PublicKeyCredential;
|
|
2964
|
-
return t?.isConditionalMediationAvailable === void 0 ?
|
|
2873
|
+
return t?.isConditionalMediationAvailable === void 0 ? qe.stubThis(new Promise((e) => e(!1))) : qe.stubThis(t.isConditionalMediationAvailable());
|
|
2965
2874
|
}
|
|
2966
|
-
const
|
|
2875
|
+
const qe = {
|
|
2967
2876
|
stubThis: (t) => t
|
|
2968
2877
|
};
|
|
2969
|
-
function
|
|
2878
|
+
function Ko({ error: t, options: e }) {
|
|
2970
2879
|
const { publicKey: n } = e;
|
|
2971
2880
|
if (!n)
|
|
2972
2881
|
throw Error("options was missing required publicKey property");
|
|
2973
2882
|
if (t.name === "AbortError") {
|
|
2974
2883
|
if (e.signal instanceof AbortSignal)
|
|
2975
|
-
return new
|
|
2884
|
+
return new D({
|
|
2976
2885
|
message: "Authentication ceremony was sent an abort signal",
|
|
2977
2886
|
code: "ERROR_CEREMONY_ABORTED",
|
|
2978
2887
|
cause: t
|
|
2979
2888
|
});
|
|
2980
2889
|
} else {
|
|
2981
2890
|
if (t.name === "NotAllowedError")
|
|
2982
|
-
return new
|
|
2891
|
+
return new D({
|
|
2983
2892
|
message: t.message,
|
|
2984
2893
|
code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
|
|
2985
2894
|
cause: t
|
|
2986
2895
|
});
|
|
2987
2896
|
if (t.name === "SecurityError") {
|
|
2988
2897
|
const r = globalThis.location.hostname;
|
|
2989
|
-
if (
|
|
2898
|
+
if (tn(r)) {
|
|
2990
2899
|
if (n.rpId !== r)
|
|
2991
|
-
return new
|
|
2900
|
+
return new D({
|
|
2992
2901
|
message: `The RP ID "${n.rpId}" is invalid for this domain`,
|
|
2993
2902
|
code: "ERROR_INVALID_RP_ID",
|
|
2994
2903
|
cause: t
|
|
2995
2904
|
});
|
|
2996
|
-
} else return new
|
|
2905
|
+
} else return new D({
|
|
2997
2906
|
message: `${globalThis.location.hostname} is an invalid domain`,
|
|
2998
2907
|
code: "ERROR_INVALID_DOMAIN",
|
|
2999
2908
|
cause: t
|
|
3000
2909
|
});
|
|
3001
2910
|
} else if (t.name === "UnknownError")
|
|
3002
|
-
return new
|
|
2911
|
+
return new D({
|
|
3003
2912
|
message: "The authenticator was unable to process the specified options, or could not create a new assertion signature",
|
|
3004
2913
|
code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
|
|
3005
2914
|
cause: t
|
|
@@ -3007,53 +2916,53 @@ function ds({ error: t, options: e }) {
|
|
|
3007
2916
|
}
|
|
3008
2917
|
return t;
|
|
3009
2918
|
}
|
|
3010
|
-
async function
|
|
2919
|
+
async function Yo(t) {
|
|
3011
2920
|
!t.optionsJSON && t.challenge && (console.warn("startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."), t = { optionsJSON: t });
|
|
3012
2921
|
const { optionsJSON: e, useBrowserAutofill: n = !1, verifyBrowserAutofillInput: r = !0 } = t;
|
|
3013
|
-
if (!
|
|
2922
|
+
if (!lt())
|
|
3014
2923
|
throw new Error("WebAuthn is not supported in this browser");
|
|
3015
2924
|
let o;
|
|
3016
|
-
e.allowCredentials?.length !== 0 && (o = e.allowCredentials?.map(
|
|
2925
|
+
e.allowCredentials?.length !== 0 && (o = e.allowCredentials?.map(en));
|
|
3017
2926
|
const s = {
|
|
3018
2927
|
...e,
|
|
3019
|
-
challenge:
|
|
2928
|
+
challenge: Pe(e.challenge),
|
|
3020
2929
|
allowCredentials: o
|
|
3021
2930
|
}, i = {};
|
|
3022
2931
|
if (n) {
|
|
3023
|
-
if (!await
|
|
2932
|
+
if (!await Wo())
|
|
3024
2933
|
throw Error("Browser does not support WebAuthn autofill");
|
|
3025
2934
|
if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1 && r)
|
|
3026
2935
|
throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
|
|
3027
2936
|
i.mediation = "conditional", s.allowCredentials = [];
|
|
3028
2937
|
}
|
|
3029
|
-
i.publicKey = s, i.signal =
|
|
2938
|
+
i.publicKey = s, i.signal = nn.createNewAbortSignal();
|
|
3030
2939
|
let a;
|
|
3031
2940
|
try {
|
|
3032
2941
|
a = await navigator.credentials.get(i);
|
|
3033
2942
|
} catch (c) {
|
|
3034
|
-
throw
|
|
2943
|
+
throw Ko({ error: c, options: i });
|
|
3035
2944
|
}
|
|
3036
2945
|
if (!a)
|
|
3037
2946
|
throw new Error("Authentication was not completed");
|
|
3038
|
-
const { id: l, rawId:
|
|
2947
|
+
const { id: l, rawId: h, response: f, type: y } = a;
|
|
3039
2948
|
let m;
|
|
3040
|
-
return
|
|
2949
|
+
return f.userHandle && (m = X(f.userHandle)), {
|
|
3041
2950
|
id: l,
|
|
3042
|
-
rawId: X(
|
|
2951
|
+
rawId: X(h),
|
|
3043
2952
|
response: {
|
|
3044
|
-
authenticatorData: X(
|
|
3045
|
-
clientDataJSON: X(
|
|
3046
|
-
signature: X(
|
|
2953
|
+
authenticatorData: X(f.authenticatorData),
|
|
2954
|
+
clientDataJSON: X(f.clientDataJSON),
|
|
2955
|
+
signature: X(f.signature),
|
|
3047
2956
|
userHandle: m
|
|
3048
2957
|
},
|
|
3049
2958
|
type: y,
|
|
3050
2959
|
clientExtensionResults: a.getClientExtensionResults(),
|
|
3051
|
-
authenticatorAttachment:
|
|
2960
|
+
authenticatorAttachment: rn(a.authenticatorAttachment)
|
|
3052
2961
|
};
|
|
3053
2962
|
}
|
|
3054
|
-
const
|
|
3055
|
-
function
|
|
3056
|
-
const [n, r] =
|
|
2963
|
+
const ut = Mt(null);
|
|
2964
|
+
function _s({ children: t, config: e }) {
|
|
2965
|
+
const [n, r] = x({
|
|
3057
2966
|
isAuthenticated: !1,
|
|
3058
2967
|
isLoading: !0,
|
|
3059
2968
|
user: null,
|
|
@@ -3061,37 +2970,53 @@ function Qs({ children: t, config: e }) {
|
|
|
3061
2970
|
});
|
|
3062
2971
|
C(() => {
|
|
3063
2972
|
(() => {
|
|
3064
|
-
const m =
|
|
3065
|
-
|
|
3066
|
-
|
|
2973
|
+
const m = e.devLoginRunId, c = !!m && Io() === m;
|
|
2974
|
+
m && Co(m);
|
|
2975
|
+
const u = No();
|
|
2976
|
+
if (u) {
|
|
2977
|
+
Nt(), r({
|
|
3067
2978
|
isAuthenticated: !1,
|
|
3068
2979
|
isLoading: !1,
|
|
3069
2980
|
user: null,
|
|
3070
|
-
error:
|
|
2981
|
+
error: u
|
|
3071
2982
|
});
|
|
3072
2983
|
return;
|
|
3073
2984
|
}
|
|
3074
|
-
const
|
|
3075
|
-
if (
|
|
3076
|
-
const
|
|
3077
|
-
token:
|
|
3078
|
-
provider:
|
|
2985
|
+
const g = xo();
|
|
2986
|
+
if (g) {
|
|
2987
|
+
const b = {
|
|
2988
|
+
token: g.token,
|
|
2989
|
+
provider: g.provider,
|
|
3079
2990
|
authenticatedAt: Date.now()
|
|
3080
2991
|
};
|
|
3081
|
-
|
|
2992
|
+
he(b), Nt(), r({
|
|
3082
2993
|
isAuthenticated: !0,
|
|
3083
2994
|
isLoading: !1,
|
|
3084
|
-
user:
|
|
2995
|
+
user: ne(b),
|
|
3085
2996
|
error: null
|
|
3086
2997
|
});
|
|
3087
2998
|
return;
|
|
3088
2999
|
}
|
|
3089
|
-
const
|
|
3090
|
-
if (
|
|
3000
|
+
const p = Jt();
|
|
3001
|
+
if (p) {
|
|
3091
3002
|
r({
|
|
3092
3003
|
isAuthenticated: !0,
|
|
3093
3004
|
isLoading: !1,
|
|
3094
|
-
user:
|
|
3005
|
+
user: ne(p),
|
|
3006
|
+
error: null
|
|
3007
|
+
});
|
|
3008
|
+
return;
|
|
3009
|
+
}
|
|
3010
|
+
if (e.devLoginToken && m && !c && !qt(e.devLoginToken)) {
|
|
3011
|
+
const b = {
|
|
3012
|
+
token: e.devLoginToken,
|
|
3013
|
+
provider: "dev",
|
|
3014
|
+
authenticatedAt: Date.now()
|
|
3015
|
+
};
|
|
3016
|
+
he(b), r({
|
|
3017
|
+
isAuthenticated: !0,
|
|
3018
|
+
isLoading: !1,
|
|
3019
|
+
user: ne(b),
|
|
3095
3020
|
error: null
|
|
3096
3021
|
});
|
|
3097
3022
|
return;
|
|
@@ -3103,8 +3028,8 @@ function Qs({ children: t, config: e }) {
|
|
|
3103
3028
|
error: null
|
|
3104
3029
|
});
|
|
3105
3030
|
})();
|
|
3106
|
-
}, []);
|
|
3107
|
-
const o =
|
|
3031
|
+
}, [e.devLoginToken, e.devLoginRunId]);
|
|
3032
|
+
const o = j(
|
|
3108
3033
|
async (y) => {
|
|
3109
3034
|
if (!e.spaceId) {
|
|
3110
3035
|
r((c) => ({
|
|
@@ -3117,11 +3042,11 @@ function Qs({ children: t, config: e }) {
|
|
|
3117
3042
|
if (y === "guest") {
|
|
3118
3043
|
r((c) => ({ ...c, isLoading: !0 }));
|
|
3119
3044
|
try {
|
|
3120
|
-
const c = await
|
|
3045
|
+
const c = await Qt(e.spaceId, m);
|
|
3121
3046
|
r({
|
|
3122
3047
|
isAuthenticated: !0,
|
|
3123
3048
|
isLoading: !1,
|
|
3124
|
-
user:
|
|
3049
|
+
user: ne(c),
|
|
3125
3050
|
error: null
|
|
3126
3051
|
});
|
|
3127
3052
|
} catch (c) {
|
|
@@ -3136,11 +3061,11 @@ function Qs({ children: t, config: e }) {
|
|
|
3136
3061
|
if (y === "passkey") {
|
|
3137
3062
|
r((c) => ({ ...c, isLoading: !0, error: null }));
|
|
3138
3063
|
try {
|
|
3139
|
-
const c = await
|
|
3064
|
+
const c = await Mo(m), u = await Yo({ optionsJSON: c }), g = await Do(m, u);
|
|
3140
3065
|
r({
|
|
3141
3066
|
isAuthenticated: !0,
|
|
3142
3067
|
isLoading: !1,
|
|
3143
|
-
user:
|
|
3068
|
+
user: ne(g),
|
|
3144
3069
|
error: null
|
|
3145
3070
|
});
|
|
3146
3071
|
} catch (c) {
|
|
@@ -3154,26 +3079,26 @@ function Qs({ children: t, config: e }) {
|
|
|
3154
3079
|
}
|
|
3155
3080
|
if (y === "email")
|
|
3156
3081
|
throw new Error("login('email') is not supported. Use requestEmailCode()/submitEmailCode() from useAuth() instead.");
|
|
3157
|
-
window.location.href =
|
|
3082
|
+
window.location.href = Lo(y, e.spaceId, m);
|
|
3158
3083
|
},
|
|
3159
3084
|
[e.authUrl, e.spaceId]
|
|
3160
|
-
), s =
|
|
3085
|
+
), s = j(
|
|
3161
3086
|
async (y) => {
|
|
3162
3087
|
if (!e.spaceId)
|
|
3163
3088
|
throw r((c) => ({ ...c, error: "Space ID is not configured" })), new Error("Space ID is not configured");
|
|
3164
3089
|
const m = await ve(e.authUrl);
|
|
3165
|
-
await
|
|
3090
|
+
await _o({ email: y, spaceId: e.spaceId, authUrl: m });
|
|
3166
3091
|
},
|
|
3167
3092
|
[e.authUrl, e.spaceId]
|
|
3168
|
-
), i =
|
|
3093
|
+
), i = j(
|
|
3169
3094
|
async (y, m) => {
|
|
3170
3095
|
r((c) => ({ ...c, isLoading: !0, error: null }));
|
|
3171
3096
|
try {
|
|
3172
|
-
const c = await ve(e.authUrl), u = await
|
|
3097
|
+
const c = await ve(e.authUrl), u = await Oo({ email: y, code: m, authUrl: c });
|
|
3173
3098
|
r({
|
|
3174
3099
|
isAuthenticated: !0,
|
|
3175
3100
|
isLoading: !1,
|
|
3176
|
-
user:
|
|
3101
|
+
user: ne(u),
|
|
3177
3102
|
error: null
|
|
3178
3103
|
});
|
|
3179
3104
|
} catch (c) {
|
|
@@ -3182,23 +3107,23 @@ function Qs({ children: t, config: e }) {
|
|
|
3182
3107
|
}
|
|
3183
3108
|
},
|
|
3184
3109
|
[e.authUrl]
|
|
3185
|
-
), a =
|
|
3186
|
-
|
|
3110
|
+
), a = j(() => {
|
|
3111
|
+
Le(), Ut.clearAll(), r({
|
|
3187
3112
|
isAuthenticated: !1,
|
|
3188
3113
|
isLoading: !1,
|
|
3189
3114
|
user: null,
|
|
3190
3115
|
error: null
|
|
3191
3116
|
});
|
|
3192
|
-
}, []), l =
|
|
3117
|
+
}, []), l = j(
|
|
3193
3118
|
async (y) => {
|
|
3194
3119
|
const m = await ve(e.authUrl);
|
|
3195
3120
|
r((c) => ({ ...c, isLoading: !0, error: null }));
|
|
3196
3121
|
try {
|
|
3197
|
-
const c = await
|
|
3122
|
+
const c = await Po(m), u = await Vo({ optionsJSON: c }), g = await Uo(m, u, y);
|
|
3198
3123
|
r({
|
|
3199
3124
|
isAuthenticated: !0,
|
|
3200
3125
|
isLoading: !1,
|
|
3201
|
-
user:
|
|
3126
|
+
user: ne(g),
|
|
3202
3127
|
error: null
|
|
3203
3128
|
});
|
|
3204
3129
|
} catch (c) {
|
|
@@ -3210,39 +3135,39 @@ function Qs({ children: t, config: e }) {
|
|
|
3210
3135
|
}
|
|
3211
3136
|
},
|
|
3212
3137
|
[e.authUrl]
|
|
3213
|
-
),
|
|
3138
|
+
), h = j(() => n.user?.token ?? null, [n.user]), f = W(
|
|
3214
3139
|
() => ({
|
|
3215
3140
|
state: n,
|
|
3216
3141
|
login: o,
|
|
3217
3142
|
logout: a,
|
|
3218
|
-
getToken:
|
|
3143
|
+
getToken: h,
|
|
3219
3144
|
registerPasskey: l,
|
|
3220
3145
|
requestEmailCode: s,
|
|
3221
3146
|
submitEmailCode: i
|
|
3222
3147
|
}),
|
|
3223
|
-
[n, o, a,
|
|
3148
|
+
[n, o, a, h, l, s, i]
|
|
3224
3149
|
);
|
|
3225
|
-
return /* @__PURE__ */ w.jsx(
|
|
3150
|
+
return /* @__PURE__ */ w.jsx(ut, { value: f, children: t });
|
|
3226
3151
|
}
|
|
3227
|
-
function
|
|
3228
|
-
const t =
|
|
3152
|
+
function Go() {
|
|
3153
|
+
const t = st(ut);
|
|
3229
3154
|
if (!t)
|
|
3230
3155
|
throw new Error("useAuth must be used within an AuthProvider");
|
|
3231
3156
|
return t;
|
|
3232
3157
|
}
|
|
3233
|
-
function
|
|
3234
|
-
return
|
|
3158
|
+
function zo() {
|
|
3159
|
+
return st(ut);
|
|
3235
3160
|
}
|
|
3236
|
-
function
|
|
3237
|
-
const { config: e, guestUrlParam: n } = t, { state: r, login: o } =
|
|
3161
|
+
function Os(t) {
|
|
3162
|
+
const { config: e, guestUrlParam: n } = t, { state: r, login: o } = Go(), s = E(!1);
|
|
3238
3163
|
return C(() => {
|
|
3239
3164
|
if (!n || r.isAuthenticated || r.isLoading || s.current || !e.methods.includes("guest"))
|
|
3240
3165
|
return;
|
|
3241
3166
|
const i = new URLSearchParams(window.location.search), a = i.get(n);
|
|
3242
3167
|
if (a === "true" || a === "1" || a === "") {
|
|
3243
3168
|
i.delete(n);
|
|
3244
|
-
const l = i.toString(),
|
|
3245
|
-
window.history.replaceState({}, "",
|
|
3169
|
+
const l = i.toString(), h = window.location.pathname + (l ? `?${l}` : "");
|
|
3170
|
+
window.history.replaceState({}, "", h), s.current = !0, o("guest");
|
|
3246
3171
|
}
|
|
3247
3172
|
}, [n, r.isAuthenticated, r.isLoading, e.methods, o]), {
|
|
3248
3173
|
shouldRenderChildren: r.isAuthenticated,
|
|
@@ -3251,17 +3176,17 @@ function ei(t) {
|
|
|
3251
3176
|
error: r.error
|
|
3252
3177
|
};
|
|
3253
3178
|
}
|
|
3254
|
-
const
|
|
3179
|
+
const on = (() => {
|
|
3255
3180
|
try {
|
|
3256
|
-
return
|
|
3181
|
+
return In();
|
|
3257
3182
|
} catch {
|
|
3258
3183
|
return !1;
|
|
3259
3184
|
}
|
|
3260
|
-
})(),
|
|
3261
|
-
function
|
|
3262
|
-
|
|
3185
|
+
})(), sn = Date.now(), re = [], Xo = 300;
|
|
3186
|
+
function _e(t) {
|
|
3187
|
+
re.push(`[+${((Date.now() - sn) / 1e3).toFixed(1)}s] ${t}`), re.length > Xo && re.shift();
|
|
3263
3188
|
}
|
|
3264
|
-
function
|
|
3189
|
+
function Lt(t) {
|
|
3265
3190
|
if (typeof t == "string")
|
|
3266
3191
|
return t;
|
|
3267
3192
|
if (t instanceof Error)
|
|
@@ -3272,30 +3197,30 @@ function Dt(t) {
|
|
|
3272
3197
|
return String(t);
|
|
3273
3198
|
}
|
|
3274
3199
|
}
|
|
3275
|
-
let
|
|
3276
|
-
function
|
|
3277
|
-
if (
|
|
3200
|
+
let Pt = !1;
|
|
3201
|
+
function an() {
|
|
3202
|
+
if (Pt || typeof window > "u")
|
|
3278
3203
|
return;
|
|
3279
|
-
|
|
3204
|
+
Pt = !0, window.addEventListener("error", (e) => _e(`window.error: ${e.message} @ ${e.filename ?? "?"}:${e.lineno ?? "?"}:${e.colno ?? "?"}`)), window.addEventListener("unhandledrejection", (e) => _e(`unhandledRejection: ${Lt(e.reason)}`));
|
|
3280
3205
|
const t = console;
|
|
3281
3206
|
for (const e of ["error", "warn", "log", "info"]) {
|
|
3282
3207
|
const n = t[e]?.bind(console) ?? (() => {
|
|
3283
3208
|
});
|
|
3284
3209
|
t[e] = (...r) => {
|
|
3285
3210
|
try {
|
|
3286
|
-
|
|
3211
|
+
_e(`console.${e}: ${r.map(Lt).join(" ")}`);
|
|
3287
3212
|
} catch {
|
|
3288
3213
|
}
|
|
3289
3214
|
n(...r);
|
|
3290
3215
|
};
|
|
3291
3216
|
}
|
|
3292
3217
|
try {
|
|
3293
|
-
|
|
3218
|
+
jt((e) => _e(`${e.levelName} [${e.component}] ${e.message}`), { minLevel: Je.DEBUG });
|
|
3294
3219
|
} catch {
|
|
3295
3220
|
}
|
|
3296
3221
|
}
|
|
3297
|
-
|
|
3298
|
-
function
|
|
3222
|
+
on && an();
|
|
3223
|
+
function Ho() {
|
|
3299
3224
|
let t = !1;
|
|
3300
3225
|
try {
|
|
3301
3226
|
const e = URL.createObjectURL(new Blob([""]));
|
|
@@ -3306,11 +3231,11 @@ function gs() {
|
|
|
3306
3231
|
}
|
|
3307
3232
|
return t;
|
|
3308
3233
|
}
|
|
3309
|
-
function
|
|
3234
|
+
function qo() {
|
|
3310
3235
|
const t = globalThis;
|
|
3311
3236
|
return [
|
|
3312
3237
|
`Worker=${typeof Worker < "u"}`,
|
|
3313
|
-
`moduleWorker=${
|
|
3238
|
+
`moduleWorker=${Ho()}`,
|
|
3314
3239
|
`WebSocket=${typeof WebSocket < "u"}`,
|
|
3315
3240
|
`WebTransport=${typeof t.WebTransport < "u"}`,
|
|
3316
3241
|
`RTCPeerConnection=${typeof RTCPeerConnection < "u"}`,
|
|
@@ -3323,15 +3248,15 @@ function ys() {
|
|
|
3323
3248
|
`online=${typeof navigator < "u" ? navigator.onLine : "?"}`
|
|
3324
3249
|
].join(" ");
|
|
3325
3250
|
}
|
|
3326
|
-
function
|
|
3251
|
+
function Jo(t) {
|
|
3327
3252
|
return /ERROR|error:|Rejection/.test(t) ? "#f88" : /WARN|warn:/.test(t) ? "#fc6" : "#9d9";
|
|
3328
3253
|
}
|
|
3329
|
-
function
|
|
3330
|
-
const n =
|
|
3254
|
+
function cn({ state: t = "", forceVisible: e = !1 }) {
|
|
3255
|
+
const n = on || e, r = t === "connected" || t === "reconnecting", [, o] = An((l) => l + 1, 0), [s, i] = x(!0);
|
|
3331
3256
|
if (C(() => {
|
|
3332
3257
|
if (!n)
|
|
3333
3258
|
return;
|
|
3334
|
-
|
|
3259
|
+
an();
|
|
3335
3260
|
const l = setInterval(o, 1e3);
|
|
3336
3261
|
return () => clearInterval(l);
|
|
3337
3262
|
}, [n]), !n)
|
|
@@ -3345,7 +3270,7 @@ function fn({ state: t = "", forceVisible: e = !1 }) {
|
|
|
3345
3270
|
style: { position: "fixed", bottom: 8, left: 8, zIndex: 2147483647, background: "#000", color: "#0f0", font: "13px monospace", padding: "6px 10px", border: "1px solid #0f0", borderRadius: 6 },
|
|
3346
3271
|
children: [
|
|
3347
3272
|
"🐞 debug (",
|
|
3348
|
-
|
|
3273
|
+
re.length,
|
|
3349
3274
|
")"
|
|
3350
3275
|
]
|
|
3351
3276
|
}
|
|
@@ -3356,20 +3281,20 @@ function fn({ state: t = "", forceVisible: e = !1 }) {
|
|
|
3356
3281
|
"Ikon debug overlay — state: ",
|
|
3357
3282
|
t || "?",
|
|
3358
3283
|
", +",
|
|
3359
|
-
Math.round((Date.now() -
|
|
3284
|
+
Math.round((Date.now() - sn) / 1e3),
|
|
3360
3285
|
"s, ",
|
|
3361
|
-
|
|
3286
|
+
re.length,
|
|
3362
3287
|
" entries",
|
|
3363
3288
|
r && /* @__PURE__ */ w.jsx("button", { type: "button", onClick: () => i(!0), style: { marginLeft: 12, font: "12px monospace", background: "#0f0", color: "#000", border: "none", borderRadius: 4, padding: "2px 8px" }, children: "hide" })
|
|
3364
3289
|
] }),
|
|
3365
3290
|
/* @__PURE__ */ w.jsx("div", { style: { color: "#9cf", wordBreak: "break-all", marginBottom: "4px" }, children: typeof window < "u" ? window.location.href : "" }),
|
|
3366
3291
|
/* @__PURE__ */ w.jsx("div", { style: { color: "#ff0", wordBreak: "break-all", marginBottom: "4px" }, children: typeof navigator < "u" ? navigator.userAgent : "no navigator" }),
|
|
3367
|
-
/* @__PURE__ */ w.jsx("div", { style: { color: "#8cf", marginBottom: "4px" }, children:
|
|
3292
|
+
/* @__PURE__ */ w.jsx("div", { style: { color: "#8cf", marginBottom: "4px" }, children: qo() }),
|
|
3368
3293
|
/* @__PURE__ */ w.jsx("div", { style: { color: "#8cf", marginBottom: "10px" }, children: typeof window < "u" ? `viewport=${window.innerWidth}x${window.innerHeight} dpr=${window.devicePixelRatio}` : "" }),
|
|
3369
|
-
/* @__PURE__ */ w.jsx("div", { children:
|
|
3294
|
+
/* @__PURE__ */ w.jsx("div", { children: re.length === 0 ? "(nothing captured yet)" : re.map((l, h) => /* @__PURE__ */ w.jsx("div", { style: { color: Jo(l), wordBreak: "break-all" }, children: l }, h)) })
|
|
3370
3295
|
] });
|
|
3371
3296
|
}
|
|
3372
|
-
function
|
|
3297
|
+
function xs({
|
|
3373
3298
|
connectionState: t,
|
|
3374
3299
|
error: e,
|
|
3375
3300
|
isReady: n,
|
|
@@ -3381,8 +3306,8 @@ function ti({
|
|
|
3381
3306
|
// renderIdle prop is intentionally accepted but never invoked — the runtime no longer
|
|
3382
3307
|
// emits the deprecated 'idle' state. Kept on the props for source compatibility.
|
|
3383
3308
|
renderIdle: l,
|
|
3384
|
-
renderConnecting:
|
|
3385
|
-
renderConnectingSlow:
|
|
3309
|
+
renderConnecting: h,
|
|
3310
|
+
renderConnectingSlow: f,
|
|
3386
3311
|
renderConnected: y,
|
|
3387
3312
|
renderOffline: m,
|
|
3388
3313
|
renderError: c
|
|
@@ -3391,7 +3316,7 @@ function ti({
|
|
|
3391
3316
|
switch (t) {
|
|
3392
3317
|
case "waitingForExternalConnectUrl":
|
|
3393
3318
|
case "connecting":
|
|
3394
|
-
return r ?
|
|
3319
|
+
return r ? f() : h();
|
|
3395
3320
|
case "connected":
|
|
3396
3321
|
case "reconnecting": {
|
|
3397
3322
|
if (!n || !o || !s) return null;
|
|
@@ -3418,98 +3343,98 @@ function ti({
|
|
|
3418
3343
|
})();
|
|
3419
3344
|
return /* @__PURE__ */ w.jsxs(w.Fragment, { children: [
|
|
3420
3345
|
g,
|
|
3421
|
-
/* @__PURE__ */ w.jsx(
|
|
3346
|
+
/* @__PURE__ */ w.jsx(cn, { state: t })
|
|
3422
3347
|
] });
|
|
3423
3348
|
}
|
|
3424
|
-
const
|
|
3425
|
-
function
|
|
3349
|
+
const Oe = oe("useIkonApp");
|
|
3350
|
+
function Zo() {
|
|
3426
3351
|
if (typeof window < "u" && window.__IKON_AUTH_CONFIG__)
|
|
3427
3352
|
return window.__IKON_AUTH_CONFIG__;
|
|
3428
3353
|
}
|
|
3429
|
-
function
|
|
3354
|
+
function Qo() {
|
|
3430
3355
|
if (typeof window < "u" && window.__IKON_LOCAL_IKON_SERVER_CONFIG__)
|
|
3431
3356
|
return window.__IKON_LOCAL_IKON_SERVER_CONFIG__;
|
|
3432
3357
|
}
|
|
3433
|
-
function
|
|
3434
|
-
const { authConfig: e, modules: n, timeouts: r, backgroundAudio: o, webRtc: s, audio: i, video: a, websocket: l, webtransport:
|
|
3435
|
-
T.current = o, U.current = r, ee.current = s, te.current = i, z.current = a, _.current = l,
|
|
3436
|
-
const [H,
|
|
3358
|
+
function Ns(t) {
|
|
3359
|
+
const { authConfig: e, modules: n, timeouts: r, backgroundAudio: o, webRtc: s, audio: i, video: a, websocket: l, webtransport: h, proxy: f, liveSnapshot: y, bootSnapshot: m } = t, c = e === void 0 ? Zo() ?? null : e, u = Qo(), g = zo(), p = E(null), b = E(null), S = E(null), R = E(!1), v = E(!1), T = E(o), U = E(r), ee = E(s), te = E(i), z = E(a), _ = E(l), P = E(h), M = E(f), B = E(y), $ = E(m), V = E("local"), K = E(void 0);
|
|
3360
|
+
T.current = o, U.current = r, ee.current = s, te.current = i, z.current = a, _.current = l, P.current = h, M.current = f, B.current = y, $.current = m;
|
|
3361
|
+
const [H, Ee] = x("connecting"), [Re, pe] = x(!1), [d, A] = x(!1), [O, N] = x(null), [se, me] = x(null), [L, Q] = x(!1), [ie, Me] = x(null), [ae, un] = x(null), [De, dt] = x(!1), je = E(!1), [dn, fn] = x(0), Y = W(() => {
|
|
3437
3362
|
try {
|
|
3438
|
-
const I =
|
|
3439
|
-
return (I.sessionId || I.channelKey) &&
|
|
3363
|
+
const I = _n();
|
|
3364
|
+
return (I.sessionId || I.channelKey) && On(), I;
|
|
3440
3365
|
} catch {
|
|
3441
3366
|
return { parameters: {} };
|
|
3442
3367
|
}
|
|
3443
3368
|
}, []);
|
|
3444
|
-
m !== !1 &&
|
|
3445
|
-
const
|
|
3446
|
-
|
|
3447
|
-
|
|
3369
|
+
m !== !1 && vn();
|
|
3370
|
+
const ce = W(() => c?.enabled ? Jt() : null, [c?.enabled, dn]), Ae = u?.enabled ?? !1, $e = u?.host ?? "localhost", Be = u?.port ?? 8443, Fe = !!c && !c.enabled && !!c.spaceId && (ht() || Ae);
|
|
3371
|
+
Fe && !ae && !De && !je.current && (je.current = !0, ve(c.authUrl).then((I) => Qt(c.spaceId, I)).then((I) => {
|
|
3372
|
+
un(I.token), dt(!0);
|
|
3448
3373
|
}).catch((I) => {
|
|
3449
|
-
|
|
3374
|
+
Oe.error("Anonymous auth failed:", I), je.current = !1, Ae ? dt(!0) : N(I instanceof Error ? I.message : "Anonymous auth failed");
|
|
3450
3375
|
}));
|
|
3451
|
-
const
|
|
3452
|
-
if (
|
|
3453
|
-
if (
|
|
3376
|
+
const Ve = W(() => {
|
|
3377
|
+
if (Ae) {
|
|
3378
|
+
if (Fe && !De)
|
|
3454
3379
|
return null;
|
|
3455
|
-
const I =
|
|
3380
|
+
const I = ce?.token ?? ae ?? void 0, q = I ? pt(I) ?? void 0 : void 0;
|
|
3456
3381
|
return {
|
|
3457
3382
|
local: {
|
|
3458
|
-
host:
|
|
3459
|
-
httpsPort:
|
|
3383
|
+
host: $e,
|
|
3384
|
+
httpsPort: Be,
|
|
3460
3385
|
userId: q,
|
|
3461
|
-
token:
|
|
3386
|
+
token: ce?.token ?? void 0,
|
|
3462
3387
|
spaceId: c?.spaceId,
|
|
3463
3388
|
backendUrl: c?.backendUrl,
|
|
3464
3389
|
authUrl: c?.authUrl,
|
|
3465
|
-
parameters:
|
|
3390
|
+
parameters: Y.parameters
|
|
3466
3391
|
}
|
|
3467
3392
|
};
|
|
3468
3393
|
}
|
|
3469
|
-
return
|
|
3394
|
+
return ce?.token && c?.spaceId ? {
|
|
3470
3395
|
sessionToken: {
|
|
3471
|
-
token:
|
|
3396
|
+
token: ce.token,
|
|
3472
3397
|
spaceId: c.spaceId,
|
|
3473
|
-
backendType:
|
|
3474
|
-
sessionId:
|
|
3475
|
-
channelKey:
|
|
3476
|
-
parameters:
|
|
3398
|
+
backendType: mt(),
|
|
3399
|
+
sessionId: Y.sessionId,
|
|
3400
|
+
channelKey: Y.channelKey,
|
|
3401
|
+
parameters: Y.parameters
|
|
3477
3402
|
}
|
|
3478
|
-
} :
|
|
3403
|
+
} : ae && c?.spaceId ? {
|
|
3479
3404
|
sessionToken: {
|
|
3480
|
-
token:
|
|
3405
|
+
token: ae,
|
|
3481
3406
|
spaceId: c.spaceId,
|
|
3482
|
-
backendType:
|
|
3483
|
-
sessionId:
|
|
3484
|
-
channelKey:
|
|
3485
|
-
parameters:
|
|
3407
|
+
backendType: mt(),
|
|
3408
|
+
sessionId: Y.sessionId,
|
|
3409
|
+
channelKey: Y.channelKey,
|
|
3410
|
+
parameters: Y.parameters
|
|
3486
3411
|
}
|
|
3487
|
-
} :
|
|
3412
|
+
} : ht() ? null : {
|
|
3488
3413
|
local: {
|
|
3489
|
-
host:
|
|
3490
|
-
httpsPort:
|
|
3414
|
+
host: $e,
|
|
3415
|
+
httpsPort: Be,
|
|
3491
3416
|
spaceId: c?.spaceId,
|
|
3492
3417
|
backendUrl: c?.backendUrl,
|
|
3493
3418
|
authUrl: c?.authUrl,
|
|
3494
|
-
parameters:
|
|
3419
|
+
parameters: Y.parameters
|
|
3495
3420
|
}
|
|
3496
3421
|
};
|
|
3497
|
-
}, [
|
|
3498
|
-
V.current = c?.spaceId ?? "local", K.current =
|
|
3499
|
-
const
|
|
3422
|
+
}, [Ae, $e, Be, ce?.token, c?.spaceId, c?.backendUrl, c?.authUrl, ae, Fe, De, Y.sessionId, Y.channelKey, Y.parameters]);
|
|
3423
|
+
V.current = c?.spaceId ?? "local", K.current = ce?.token ?? ae ?? void 0, Qr(ie);
|
|
3424
|
+
const hn = to(ie);
|
|
3500
3425
|
C(() => {
|
|
3501
3426
|
if (!R.current) {
|
|
3502
|
-
if (R.current = !0,
|
|
3427
|
+
if (R.current = !0, S.current = Yr(), n)
|
|
3503
3428
|
for (const I of n)
|
|
3504
|
-
I(
|
|
3505
|
-
|
|
3506
|
-
|
|
3429
|
+
I(S.current);
|
|
3430
|
+
S.current.loadRegisteredModules().catch((I) => {
|
|
3431
|
+
Oe.error("Failed to load UI modules", I);
|
|
3507
3432
|
});
|
|
3508
3433
|
}
|
|
3509
3434
|
}, []), C(() => {
|
|
3510
|
-
if (!
|
|
3511
|
-
const I = new
|
|
3512
|
-
...
|
|
3435
|
+
if (!Ve) return;
|
|
3436
|
+
const I = new xn({
|
|
3437
|
+
...Ve,
|
|
3513
3438
|
timeouts: U.current,
|
|
3514
3439
|
audio: te.current !== void 0 || T.current ? {
|
|
3515
3440
|
enabled: te.current,
|
|
@@ -3519,103 +3444,103 @@ function ni(t) {
|
|
|
3519
3444
|
mediaSession: { title: document.title || void 0, artist: document.title || void 0 },
|
|
3520
3445
|
webRtc: ee.current === !1 ? { enabled: !1 } : void 0,
|
|
3521
3446
|
websocket: _.current,
|
|
3522
|
-
webtransport:
|
|
3447
|
+
webtransport: P.current,
|
|
3523
3448
|
proxy: M.current,
|
|
3524
3449
|
onConnectionStateChange: (J) => {
|
|
3525
|
-
|
|
3450
|
+
Ee(J);
|
|
3526
3451
|
},
|
|
3527
3452
|
onError: (J) => {
|
|
3528
|
-
|
|
3453
|
+
N(J.message);
|
|
3529
3454
|
}
|
|
3530
3455
|
});
|
|
3531
3456
|
p.current = I;
|
|
3532
|
-
const q = B.current ?? !0,
|
|
3533
|
-
|
|
3534
|
-
const
|
|
3457
|
+
const q = B.current ?? !0, Te = K.current, ft = Te ? pt(Te) ?? null : null, gn = q && ft ? { enabled: !0, appId: V.current, userId: ft } : void 0, ke = new Qn({ client: I, liveSnapshot: gn, bootSnapshot: $.current });
|
|
3458
|
+
b.current = ke, Me(ke), A(!1);
|
|
3459
|
+
const yn = ke.subscribeToUiUpdates(() => {
|
|
3535
3460
|
A(!0);
|
|
3536
3461
|
});
|
|
3537
3462
|
return I.connect().catch((J) => {
|
|
3538
|
-
if (
|
|
3539
|
-
|
|
3463
|
+
if (Oe.error("Connection failed:", J), J instanceof Nn) {
|
|
3464
|
+
me(J.reason);
|
|
3540
3465
|
return;
|
|
3541
3466
|
}
|
|
3542
|
-
if (J instanceof
|
|
3467
|
+
if (J instanceof Ln) {
|
|
3543
3468
|
Q(!0);
|
|
3544
3469
|
return;
|
|
3545
3470
|
}
|
|
3546
|
-
J instanceof
|
|
3471
|
+
J instanceof Pn && !v.current && (v.current = !0, Oe.warn("Auth session appears stale, clearing and retrying"), Ut.clearAll(), g ? g.logout() : (Le(), fn((bn) => bn + 1)));
|
|
3547
3472
|
}), () => {
|
|
3548
|
-
|
|
3473
|
+
yn(), I.disconnect(), p.current = null, ke.dispose(), b.current = null;
|
|
3549
3474
|
};
|
|
3550
|
-
}, [
|
|
3551
|
-
const
|
|
3552
|
-
const
|
|
3553
|
-
p.current?.sendActionCall(I,
|
|
3475
|
+
}, [Ve]);
|
|
3476
|
+
const pn = j((I, q) => {
|
|
3477
|
+
const Te = typeof q == "string" ? q : JSON.stringify(q ?? {});
|
|
3478
|
+
p.current?.sendActionCall(I, Te);
|
|
3554
3479
|
}, []);
|
|
3555
3480
|
C(() => {
|
|
3556
3481
|
if (H !== "connecting") {
|
|
3557
|
-
|
|
3482
|
+
pe(!1);
|
|
3558
3483
|
return;
|
|
3559
3484
|
}
|
|
3560
|
-
const I = p.current?.slowConnectionThresholdMs ?? 5e3, q = setTimeout(() =>
|
|
3485
|
+
const I = p.current?.slowConnectionThresholdMs ?? 5e3, q = setTimeout(() => pe(!0), I);
|
|
3561
3486
|
return () => clearTimeout(q);
|
|
3562
3487
|
}, [H]);
|
|
3563
|
-
const
|
|
3488
|
+
const mn = H === "connected" || H === "reconnecting", We = d && H !== "offline";
|
|
3564
3489
|
return C(() => {
|
|
3565
|
-
typeof document > "u" || (document.documentElement.dataset.ikonLive = String(
|
|
3566
|
-
}, [
|
|
3490
|
+
typeof document > "u" || (document.documentElement.dataset.ikonLive = String(We));
|
|
3491
|
+
}, [We]), {
|
|
3567
3492
|
connectionState: H,
|
|
3568
3493
|
error: O,
|
|
3569
|
-
accessDeniedReason:
|
|
3570
|
-
isServerFull:
|
|
3571
|
-
stores:
|
|
3494
|
+
accessDeniedReason: se,
|
|
3495
|
+
isServerFull: L,
|
|
3496
|
+
stores: hn,
|
|
3572
3497
|
client: p.current,
|
|
3573
|
-
registry:
|
|
3498
|
+
registry: S.current,
|
|
3574
3499
|
clientRef: p,
|
|
3575
|
-
uiRef:
|
|
3576
|
-
registryRef:
|
|
3577
|
-
onAction:
|
|
3578
|
-
isReady:
|
|
3579
|
-
isLive:
|
|
3500
|
+
uiRef: b,
|
|
3501
|
+
registryRef: S,
|
|
3502
|
+
onAction: pn,
|
|
3503
|
+
isReady: mn,
|
|
3504
|
+
isLive: We,
|
|
3580
3505
|
brandingRequired: p.current?.brandingRequired ?? !1,
|
|
3581
|
-
isConnectingSlow:
|
|
3506
|
+
isConnectingSlow: Re,
|
|
3582
3507
|
webRtcVideoStreams: p.current?.webRtcVideoStreams ?? /* @__PURE__ */ new Map(),
|
|
3583
3508
|
webRtcTrackMap: p.current?.webRtcTrackMap ?? /* @__PURE__ */ new Map()
|
|
3584
3509
|
};
|
|
3585
3510
|
}
|
|
3586
|
-
function
|
|
3511
|
+
function Ls(t) {
|
|
3587
3512
|
const e = E(!1);
|
|
3588
|
-
return
|
|
3513
|
+
return j(() => {
|
|
3589
3514
|
if (e.current) return;
|
|
3590
3515
|
e.current = !0;
|
|
3591
3516
|
const n = document.createElement("link");
|
|
3592
3517
|
n.rel = "stylesheet", n.href = t, document.head.appendChild(n);
|
|
3593
3518
|
}, [t]);
|
|
3594
3519
|
}
|
|
3595
|
-
let
|
|
3596
|
-
function
|
|
3597
|
-
const [n, r] =
|
|
3520
|
+
let es = 0;
|
|
3521
|
+
function ts(t = 5, e = 5e3) {
|
|
3522
|
+
const [n, r] = x([]), o = E(/* @__PURE__ */ new Map()), s = j((i) => {
|
|
3598
3523
|
const a = o.current.get(i);
|
|
3599
|
-
a && (clearTimeout(a), o.current.delete(i)), r((l) => l.filter((
|
|
3524
|
+
a && (clearTimeout(a), o.current.delete(i)), r((l) => l.filter((h) => h.id !== i));
|
|
3600
3525
|
}, []);
|
|
3601
3526
|
return C(() => {
|
|
3602
|
-
const i = o.current, a =
|
|
3527
|
+
const i = o.current, a = jt(
|
|
3603
3528
|
(l) => {
|
|
3604
|
-
if (
|
|
3529
|
+
if (!$t())
|
|
3605
3530
|
return;
|
|
3606
|
-
const
|
|
3607
|
-
id:
|
|
3608
|
-
level:
|
|
3531
|
+
const h = `toast-${++es}`, f = l.level === Je.ERROR ? "error" : "warn", y = {
|
|
3532
|
+
id: h,
|
|
3533
|
+
level: f,
|
|
3609
3534
|
message: l.message,
|
|
3610
3535
|
component: l.component
|
|
3611
3536
|
};
|
|
3612
3537
|
r((c) => [...c, y].slice(-t));
|
|
3613
3538
|
const m = setTimeout(() => {
|
|
3614
|
-
s(
|
|
3539
|
+
s(h);
|
|
3615
3540
|
}, e);
|
|
3616
|
-
i.set(
|
|
3541
|
+
i.set(h, m);
|
|
3617
3542
|
},
|
|
3618
|
-
{ minLevel:
|
|
3543
|
+
{ minLevel: Je.WARN }
|
|
3619
3544
|
);
|
|
3620
3545
|
return () => {
|
|
3621
3546
|
a();
|
|
@@ -3625,8 +3550,8 @@ function Es(t = 5, e = 5e3) {
|
|
|
3625
3550
|
};
|
|
3626
3551
|
}, [t, e, s]), { toasts: n, dismissToast: s };
|
|
3627
3552
|
}
|
|
3628
|
-
function
|
|
3629
|
-
const [r, o] =
|
|
3553
|
+
function ns(t, e, n) {
|
|
3554
|
+
const [r, o] = x(n);
|
|
3630
3555
|
return C(() => {
|
|
3631
3556
|
if (!t)
|
|
3632
3557
|
return;
|
|
@@ -3642,8 +3567,8 @@ function Rs(t, e, n) {
|
|
|
3642
3567
|
};
|
|
3643
3568
|
}, [t, e]), r;
|
|
3644
3569
|
}
|
|
3645
|
-
function
|
|
3646
|
-
const [r, o] =
|
|
3570
|
+
function Ps(t, e, n) {
|
|
3571
|
+
const [r, o] = x(null);
|
|
3647
3572
|
return C(() => {
|
|
3648
3573
|
if (!t)
|
|
3649
3574
|
return;
|
|
@@ -3655,102 +3580,102 @@ function oi(t, e, n) {
|
|
|
3655
3580
|
}), () => {
|
|
3656
3581
|
s = !1;
|
|
3657
3582
|
};
|
|
3658
|
-
}, [t, e]),
|
|
3583
|
+
}, [t, e]), ns(r ? t : null, r ?? "", n);
|
|
3659
3584
|
}
|
|
3660
|
-
const ue =
|
|
3585
|
+
const ue = oe("IkonDebug"), rs = {
|
|
3661
3586
|
Digit1: "connecting",
|
|
3662
3587
|
Digit2: "connected",
|
|
3663
3588
|
Digit3: "reconnecting",
|
|
3664
3589
|
Digit4: "offline",
|
|
3665
3590
|
Digit5: "offline",
|
|
3666
3591
|
Digit0: "clear"
|
|
3667
|
-
},
|
|
3668
|
-
function
|
|
3669
|
-
const e =
|
|
3592
|
+
}, os = "Digit5", ss = "Digit6", is = "Synthetic debug error (Ctrl+Shift+5)", as = "Synthetic debug access-denied (Ctrl+Shift+6)", cs = 5e3;
|
|
3593
|
+
function ls(t) {
|
|
3594
|
+
const e = $t(), [n, r] = x(null), [o, s] = x(!1), [i, a] = x(null), [l, h] = x(null), [f, y] = x(!1), [m, c] = x(!1), [u, g] = x(!1);
|
|
3670
3595
|
return C(() => {
|
|
3671
3596
|
if (!e)
|
|
3672
3597
|
return;
|
|
3673
|
-
const
|
|
3674
|
-
if (!
|
|
3598
|
+
const b = (S) => {
|
|
3599
|
+
if (!S.ctrlKey || !S.shiftKey)
|
|
3675
3600
|
return;
|
|
3676
|
-
if (
|
|
3677
|
-
|
|
3601
|
+
if (S.code === "KeyE") {
|
|
3602
|
+
S.preventDefault(), y((T) => (ue.warn(`Empty-stores override: ${T ? "off" : "on"}`), !T));
|
|
3678
3603
|
return;
|
|
3679
3604
|
}
|
|
3680
|
-
if (
|
|
3681
|
-
|
|
3605
|
+
if (S.code === "Digit7") {
|
|
3606
|
+
S.preventDefault(), c((T) => (ue.warn(`Branding-banner override: ${T ? "off" : "on"}`), !T));
|
|
3682
3607
|
return;
|
|
3683
3608
|
}
|
|
3684
|
-
if (
|
|
3685
|
-
|
|
3609
|
+
if (S.code === "Digit8") {
|
|
3610
|
+
S.preventDefault(), g((T) => (ue.warn(`Debug-overlay override: ${T ? "off" : "on"}`), !T));
|
|
3686
3611
|
return;
|
|
3687
3612
|
}
|
|
3688
|
-
if (
|
|
3689
|
-
|
|
3613
|
+
if (S.code === ss) {
|
|
3614
|
+
S.preventDefault(), h(as), r(null), a(null), ue.warn("Forced access denied");
|
|
3690
3615
|
return;
|
|
3691
3616
|
}
|
|
3692
|
-
const R =
|
|
3617
|
+
const R = rs[S.code];
|
|
3693
3618
|
if (R === void 0)
|
|
3694
3619
|
return;
|
|
3695
|
-
if (
|
|
3696
|
-
r(null), a(null),
|
|
3620
|
+
if (S.preventDefault(), R === "clear") {
|
|
3621
|
+
r(null), a(null), h(null), ue.warn("Cleared forced state");
|
|
3697
3622
|
return;
|
|
3698
3623
|
}
|
|
3699
|
-
const v =
|
|
3700
|
-
r(R), a(v ?
|
|
3624
|
+
const v = S.code === os;
|
|
3625
|
+
r(R), a(v ? is : null), h(null), ue.warn(`Forced state: ${R}${v ? " (with error)" : ""}`);
|
|
3701
3626
|
};
|
|
3702
|
-
return window.addEventListener("keydown",
|
|
3627
|
+
return window.addEventListener("keydown", b), () => window.removeEventListener("keydown", b);
|
|
3703
3628
|
}, [e]), C(() => {
|
|
3704
3629
|
if (n !== "connecting") {
|
|
3705
3630
|
s(!1);
|
|
3706
3631
|
return;
|
|
3707
3632
|
}
|
|
3708
|
-
const
|
|
3709
|
-
return () => clearTimeout(
|
|
3710
|
-
}, [n]), !e || n === null && !
|
|
3633
|
+
const b = setTimeout(() => s(!0), cs);
|
|
3634
|
+
return () => clearTimeout(b);
|
|
3635
|
+
}, [n]), !e || n === null && !f && l === null && !m && !u ? { app: t, forcedState: null, emptyStores: !1, forcedError: null, forcedAccessDenied: null, forcedBranding: !1, forcedDebugOverlay: !1, debugEnabled: e } : { app: {
|
|
3711
3636
|
...t,
|
|
3712
3637
|
connectionState: n ?? t.connectionState,
|
|
3713
3638
|
isConnectingSlow: n === "connecting" ? o : t.isConnectingSlow,
|
|
3714
3639
|
error: n === "offline" && i ? i : n ? null : t.error,
|
|
3715
|
-
stores:
|
|
3640
|
+
stores: f ? /* @__PURE__ */ new Map() : t.stores,
|
|
3716
3641
|
accessDeniedReason: l ?? t.accessDeniedReason
|
|
3717
|
-
}, forcedState: n, emptyStores:
|
|
3642
|
+
}, forcedState: n, emptyStores: f, forcedError: i, forcedAccessDenied: l, forcedBranding: m, forcedDebugOverlay: u, debugEnabled: e };
|
|
3718
3643
|
}
|
|
3719
|
-
function
|
|
3644
|
+
function us(t, e) {
|
|
3720
3645
|
return t === void 0 ? null : typeof t == "function" ? t(e) : t;
|
|
3721
3646
|
}
|
|
3722
|
-
function
|
|
3647
|
+
function ds(t) {
|
|
3723
3648
|
return t === void 0 ? null : typeof t == "function" ? t() : t;
|
|
3724
3649
|
}
|
|
3725
|
-
function
|
|
3650
|
+
function fs(t, e) {
|
|
3726
3651
|
return t === void 0 ? null : typeof t == "function" ? t(e) : t;
|
|
3727
3652
|
}
|
|
3728
|
-
function
|
|
3653
|
+
function hs(t, e) {
|
|
3729
3654
|
return t === void 0 ? null : typeof t == "function" ? t(e) : t;
|
|
3730
3655
|
}
|
|
3731
|
-
function
|
|
3732
|
-
const { connectingOverlay: e, reconnectingOverlay: n, offlineOverlay: r, accessDeniedScreen: o, ...s } = t, i =
|
|
3733
|
-
if (
|
|
3734
|
-
return
|
|
3656
|
+
function Us(t) {
|
|
3657
|
+
const { connectingOverlay: e, reconnectingOverlay: n, offlineOverlay: r, accessDeniedScreen: o, ...s } = t, i = ls(s), { app: a } = i, { connectionState: l, isConnectingSlow: h, stores: f, registry: y, client: m, onAction: c, isReady: u, error: g, accessDeniedReason: p, brandingRequired: b } = a, S = b || i.forcedBranding, R = E(null);
|
|
3658
|
+
if (f && y && (u || f.size > 0) && (R.current = { stores: f, registry: y, client: m }), p)
|
|
3659
|
+
return hs(o, p);
|
|
3735
3660
|
const v = R.current;
|
|
3736
3661
|
let T = null;
|
|
3737
3662
|
switch (l) {
|
|
3738
3663
|
case "waitingForExternalConnectUrl":
|
|
3739
3664
|
case "connecting":
|
|
3740
|
-
T =
|
|
3665
|
+
T = us(e, h);
|
|
3741
3666
|
break;
|
|
3742
3667
|
case "reconnecting":
|
|
3743
|
-
T =
|
|
3668
|
+
T = ds(n);
|
|
3744
3669
|
break;
|
|
3745
3670
|
case "offline":
|
|
3746
|
-
T =
|
|
3671
|
+
T = fs(r, g);
|
|
3747
3672
|
break;
|
|
3748
3673
|
default:
|
|
3749
3674
|
T = null;
|
|
3750
3675
|
}
|
|
3751
3676
|
return /* @__PURE__ */ w.jsxs(w.Fragment, { children: [
|
|
3752
3677
|
v && /* @__PURE__ */ w.jsx(
|
|
3753
|
-
|
|
3678
|
+
Bt,
|
|
3754
3679
|
{
|
|
3755
3680
|
stores: v.stores,
|
|
3756
3681
|
registry: v.registry,
|
|
@@ -3759,18 +3684,18 @@ function si(t) {
|
|
|
3759
3684
|
}
|
|
3760
3685
|
),
|
|
3761
3686
|
T,
|
|
3762
|
-
|
|
3763
|
-
/* @__PURE__ */ w.jsx(
|
|
3764
|
-
/* @__PURE__ */ w.jsx(
|
|
3687
|
+
S && /* @__PURE__ */ w.jsx(ms, {}),
|
|
3688
|
+
/* @__PURE__ */ w.jsx(gs, {}),
|
|
3689
|
+
/* @__PURE__ */ w.jsx(cn, { state: l, forceVisible: i.forcedDebugOverlay })
|
|
3765
3690
|
] });
|
|
3766
3691
|
}
|
|
3767
|
-
const
|
|
3768
|
-
function
|
|
3692
|
+
const ps = "https://ikonai.com";
|
|
3693
|
+
function ms() {
|
|
3769
3694
|
return /* @__PURE__ */ w.jsxs(
|
|
3770
3695
|
"a",
|
|
3771
3696
|
{
|
|
3772
3697
|
className: "ikon-branding-banner",
|
|
3773
|
-
href:
|
|
3698
|
+
href: ps,
|
|
3774
3699
|
target: "_blank",
|
|
3775
3700
|
rel: "noopener noreferrer",
|
|
3776
3701
|
style: {
|
|
@@ -3798,11 +3723,11 @@ function Ms() {
|
|
|
3798
3723
|
}
|
|
3799
3724
|
);
|
|
3800
3725
|
}
|
|
3801
|
-
function
|
|
3802
|
-
const { toasts: t, dismissToast: e } =
|
|
3803
|
-
return t.length === 0 ? null : /* @__PURE__ */ w.jsx("div", { className: "ikon-toast-overlay", children: t.map((n) => /* @__PURE__ */ w.jsx(
|
|
3726
|
+
function gs() {
|
|
3727
|
+
const { toasts: t, dismissToast: e } = ts();
|
|
3728
|
+
return t.length === 0 ? null : /* @__PURE__ */ w.jsx("div", { className: "ikon-toast-overlay", children: t.map((n) => /* @__PURE__ */ w.jsx(ys, { toast: n, onDismiss: e }, n.id)) });
|
|
3804
3729
|
}
|
|
3805
|
-
function
|
|
3730
|
+
function ys({ toast: t, onDismiss: e }) {
|
|
3806
3731
|
return /* @__PURE__ */ w.jsxs(
|
|
3807
3732
|
"div",
|
|
3808
3733
|
{
|
|
@@ -3823,110 +3748,105 @@ function Ds({ toast: t, onDismiss: e }) {
|
|
|
3823
3748
|
}
|
|
3824
3749
|
);
|
|
3825
3750
|
}
|
|
3826
|
-
const
|
|
3827
|
-
function
|
|
3751
|
+
const ln = Mt(null);
|
|
3752
|
+
function bs(t, e) {
|
|
3828
3753
|
return e ? t.replace(/\{(\w+)\}/g, (n, r) => e[r] ?? `{${r}}`) : t;
|
|
3829
3754
|
}
|
|
3830
|
-
function
|
|
3831
|
-
const n =
|
|
3755
|
+
function Ss(t, e) {
|
|
3756
|
+
const n = Un();
|
|
3832
3757
|
if (n && t.includes(n))
|
|
3833
3758
|
return n;
|
|
3834
3759
|
const r = navigator.language.split("-")[0];
|
|
3835
3760
|
return t.includes(r) ? r : e && t.includes(e) ? e : "en";
|
|
3836
3761
|
}
|
|
3837
|
-
function
|
|
3838
|
-
return e ?
|
|
3762
|
+
function ws(t, e, n) {
|
|
3763
|
+
return e ? Ss(t, n) : n && t.includes(n) ? n : "en";
|
|
3839
3764
|
}
|
|
3840
|
-
function
|
|
3765
|
+
function Ms({
|
|
3841
3766
|
children: t,
|
|
3842
3767
|
translations: e,
|
|
3843
3768
|
defaultLanguage: n,
|
|
3844
3769
|
detectLanguage: r = !1
|
|
3845
3770
|
}) {
|
|
3846
|
-
const o = Object.keys(e), s =
|
|
3771
|
+
const o = Object.keys(e), s = ws(o, r, n), i = e[s] ?? e.en, a = W(
|
|
3847
3772
|
() => ({
|
|
3848
|
-
t: (l,
|
|
3849
|
-
const
|
|
3850
|
-
return
|
|
3773
|
+
t: (l, h) => {
|
|
3774
|
+
const f = i[l];
|
|
3775
|
+
return bs(f, h);
|
|
3851
3776
|
},
|
|
3852
3777
|
locale: s,
|
|
3853
3778
|
translations: i
|
|
3854
3779
|
}),
|
|
3855
3780
|
[i, s]
|
|
3856
3781
|
);
|
|
3857
|
-
return /* @__PURE__ */ w.jsx(
|
|
3782
|
+
return /* @__PURE__ */ w.jsx(ln, { value: a, children: t });
|
|
3858
3783
|
}
|
|
3859
|
-
function
|
|
3860
|
-
const t =
|
|
3784
|
+
function Ds() {
|
|
3785
|
+
const t = st(ln);
|
|
3861
3786
|
if (!t)
|
|
3862
3787
|
throw new Error("useI18n must be used within an I18nProvider");
|
|
3863
3788
|
return t;
|
|
3864
3789
|
}
|
|
3865
3790
|
export {
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
ro as useIkonStyles,
|
|
3925
|
-
so as useIkonUiStores,
|
|
3926
|
-
ri as useLazyFont,
|
|
3927
|
-
oi as useReactive,
|
|
3928
|
-
Es as useToasts,
|
|
3791
|
+
_s as AuthProvider,
|
|
3792
|
+
xs as ConnectionStateRenderer,
|
|
3793
|
+
on as DEBUG_OVERLAY_ENABLED,
|
|
3794
|
+
cn as DebugOverlay,
|
|
3795
|
+
Ms as I18nProvider,
|
|
3796
|
+
hr as IKON_UI_BASE_MODULE,
|
|
3797
|
+
Tr as IKON_UI_MEDIA_MODULE,
|
|
3798
|
+
Fr as IKON_UI_SHADERTOY_MODULE,
|
|
3799
|
+
$r as IKON_UI_SHADERTOY_TYPE,
|
|
3800
|
+
Qe as IKON_UI_STREAM_CATEGORY,
|
|
3801
|
+
wr as IKON_UI_VIDEO_CANVAS_TYPE,
|
|
3802
|
+
vr as IKON_UI_VIDEO_URL_PLAYER_TYPE,
|
|
3803
|
+
Us as IkonApp,
|
|
3804
|
+
Qn as IkonUi,
|
|
3805
|
+
Kr as IkonUiRegistry,
|
|
3806
|
+
Bt as IkonUiSurface,
|
|
3807
|
+
qn as InspectOverlay,
|
|
3808
|
+
Cs as ParallaxView,
|
|
3809
|
+
Hn as UiComponentRegistry,
|
|
3810
|
+
Xn as UiRenderer,
|
|
3811
|
+
Bs as UiStreamStore,
|
|
3812
|
+
Qt as authenticateAnonymous,
|
|
3813
|
+
Lo as buildOAuthRedirectUrl,
|
|
3814
|
+
Le as clearAuthSession,
|
|
3815
|
+
Nt as clearOAuthParams,
|
|
3816
|
+
fr as createBaseResolvers,
|
|
3817
|
+
Ts as createComponentLibrary,
|
|
3818
|
+
Yr as createIkonUiRegistry,
|
|
3819
|
+
Rr as createMediaResolvers,
|
|
3820
|
+
Br as createShadertoyRendererResolver,
|
|
3821
|
+
Zn as isIkonUiCategoryMatch,
|
|
3822
|
+
Jt as loadAuthSession,
|
|
3823
|
+
pr as loadBaseModule,
|
|
3824
|
+
kr as loadMediaModule,
|
|
3825
|
+
Vr as loadShadertoyModule,
|
|
3826
|
+
xo as parseOAuthCallback,
|
|
3827
|
+
No as parseOAuthError,
|
|
3828
|
+
Vs as randomUuid,
|
|
3829
|
+
mr as registerBaseModule,
|
|
3830
|
+
Cr as registerMediaModule,
|
|
3831
|
+
Wr as registerShadertoyModule,
|
|
3832
|
+
Gn as renderChildren,
|
|
3833
|
+
Is as renderMotionLetters,
|
|
3834
|
+
he as saveAuthSession,
|
|
3835
|
+
_o as sendLoginCode,
|
|
3836
|
+
ne as sessionToUser,
|
|
3837
|
+
Go as useAuth,
|
|
3838
|
+
Os as useAuthGuard,
|
|
3839
|
+
zo as useAuthOptional,
|
|
3840
|
+
Ds as useI18n,
|
|
3841
|
+
Ns as useIkonApp,
|
|
3842
|
+
ls as useIkonDebug,
|
|
3843
|
+
ns as useIkonReactive,
|
|
3844
|
+
Qr as useIkonStyles,
|
|
3845
|
+
to as useIkonUiStores,
|
|
3846
|
+
Ls as useLazyFont,
|
|
3847
|
+
Ps as useReactive,
|
|
3848
|
+
ts as useToasts,
|
|
3929
3849
|
Z as useUiNode,
|
|
3930
|
-
|
|
3931
|
-
|
|
3850
|
+
ks as useUiStore,
|
|
3851
|
+
Oo as verifyLoginCode
|
|
3932
3852
|
};
|