@ikonai/sdk-react-ui 1.0.72 → 1.0.73
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/index.js +320 -320
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IkonUiCore as Sn, UiStreamStore as wn, LiveSnapshotCache as Ut, prefetchBootSnapshot as vn } from "@ikonai/sdk-ui";
|
|
2
|
-
import { UiStreamStore as
|
|
2
|
+
import { UiStreamStore as Fs } from "@ikonai/sdk-ui";
|
|
3
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 _n, subscribeToLogEvents as jt, LogLevel as Je, parseUrlParams as In, clearSessionParamsFromUrl as On, isCloudEnvironment as ht, extractUserIdFromToken as pt, deriveBackendType as mt, IkonClient as xn,
|
|
5
|
-
import { randomUuid as
|
|
4
|
+
import { createLogger as oe, isInspectModeEnabled as Tn, getOrCreateDeviceId as kn, getSameOriginAuthUrl as Cn, abortSignalTimeout as Dt, deriveAuthUrl as ve, getDebugOverlayParam as _n, subscribeToLogEvents as jt, LogLevel as Je, parseUrlParams as In, clearSessionParamsFromUrl as On, isCloudEnvironment as ht, extractUserIdFromToken as pt, deriveBackendType as mt, IkonClient as xn, reportConnectTimeline as Nn, AccessDeniedError as Ln, ServerFullError as Pn, AuthenticationError as Un, isDebugModeEnabled as $t, getLangParam as Mn } from "@ikonai/sdk";
|
|
5
|
+
import { randomUuid as Ws } from "@ikonai/sdk";
|
|
6
6
|
var Ce = { exports: {} }, ge = {};
|
|
7
7
|
/**
|
|
8
8
|
* @license React
|
|
@@ -14,7 +14,7 @@ var Ce = { exports: {} }, ge = {};
|
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
16
|
var gt;
|
|
17
|
-
function
|
|
17
|
+
function Dn() {
|
|
18
18
|
if (gt) return ge;
|
|
19
19
|
gt = 1;
|
|
20
20
|
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
@@ -46,7 +46,7 @@ var ye = {};
|
|
|
46
46
|
* LICENSE file in the root directory of this source tree.
|
|
47
47
|
*/
|
|
48
48
|
var yt;
|
|
49
|
-
function
|
|
49
|
+
function jn() {
|
|
50
50
|
return yt || (yt = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
51
51
|
function t(d) {
|
|
52
52
|
if (d == null) return null;
|
|
@@ -277,11 +277,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
277
277
|
})()), ye;
|
|
278
278
|
}
|
|
279
279
|
var bt;
|
|
280
|
-
function
|
|
281
|
-
return bt || (bt = 1, process.env.NODE_ENV === "production" ? Ce.exports =
|
|
280
|
+
function $n() {
|
|
281
|
+
return bt || (bt = 1, process.env.NODE_ENV === "production" ? Ce.exports = Dn() : Ce.exports = jn()), Ce.exports;
|
|
282
282
|
}
|
|
283
|
-
var w =
|
|
284
|
-
function
|
|
283
|
+
var w = $n();
|
|
284
|
+
function Bn(t, e) {
|
|
285
285
|
const n = ot(
|
|
286
286
|
(r) => t.subscribe(r),
|
|
287
287
|
() => {
|
|
@@ -309,8 +309,8 @@ function Z(t, e) {
|
|
|
309
309
|
);
|
|
310
310
|
return W(() => t.getNode(e), [t, e, n]);
|
|
311
311
|
}
|
|
312
|
-
const
|
|
313
|
-
function
|
|
312
|
+
const Fn = oe("UIRenderer");
|
|
313
|
+
function Vn(t) {
|
|
314
314
|
if (t === void 0)
|
|
315
315
|
return "{}";
|
|
316
316
|
if (typeof t == "string")
|
|
@@ -321,18 +321,18 @@ function Fn(t) {
|
|
|
321
321
|
return "{}";
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function Wn(t) {
|
|
325
325
|
const e = t.styleIds;
|
|
326
326
|
return Array.isArray(e) ? e : [];
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function Kn(t) {
|
|
329
329
|
const e = t.children;
|
|
330
330
|
return Array.isArray(e) ? e : [];
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function Yn(t, e) {
|
|
333
333
|
return t.nodeId === e.nodeId && t.context === e.context;
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function Gn(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;
|
|
@@ -341,7 +341,7 @@ function Yn(t) {
|
|
|
341
341
|
return e;
|
|
342
342
|
}
|
|
343
343
|
const Ze = G(function t({ nodeId: e, context: n }) {
|
|
344
|
-
const r = Z(n.store, e), o = r ?
|
|
344
|
+
const r = Z(n.store, e), o = r ? Kn(r) : [], s = Gn(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]
|
|
@@ -352,18 +352,18 @@ const Ze = G(function t({ nodeId: e, context: n }) {
|
|
|
352
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 =
|
|
355
|
+
return Fn.warn(`No renderer for node type ${r.type}`), null;
|
|
356
|
+
const l = Wn(r), h = l.length > 0 ? l.join(" ") : void 0, f = a;
|
|
357
357
|
return /* @__PURE__ */ w.jsx(f, { nodeId: e, context: n, className: h });
|
|
358
|
-
},
|
|
359
|
-
function
|
|
358
|
+
}, Yn);
|
|
359
|
+
function zn(t, e) {
|
|
360
360
|
return !Array.isArray(t) || t.length === 0 ? null : t.map((n) => /* @__PURE__ */ w.jsx(Ze, { nodeId: n.id, context: e }, n.id));
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function Xn(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: h } =
|
|
365
|
+
const Hn = G(function({ store: e, library: n, viewId: r, emptyFallback: o = null, onAction: s, client: i, video: a }) {
|
|
366
|
+
const { rootViewId: l, rootNodeId: h } = Bn(e, r), f = E(s);
|
|
367
367
|
f.current = s;
|
|
368
368
|
const y = E(i);
|
|
369
369
|
y.current = i;
|
|
@@ -372,7 +372,7 @@ const Xn = G(function({ store: e, library: n, viewId: r, emptyFallback: o = null
|
|
|
372
372
|
const c = j((g, p) => {
|
|
373
373
|
if (!g)
|
|
374
374
|
return;
|
|
375
|
-
const b =
|
|
375
|
+
const b = Vn(p);
|
|
376
376
|
f.current?.(g, b);
|
|
377
377
|
}, []), u = W(() => {
|
|
378
378
|
const g = {
|
|
@@ -381,7 +381,7 @@ const Xn = G(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) => zn(p, g),
|
|
385
385
|
renderView: (p) => {
|
|
386
386
|
const b = e.getSnapshot().views.get(p);
|
|
387
387
|
return b ? /* @__PURE__ */ w.jsx(Ze, { nodeId: b.id, context: g }) : null;
|
|
@@ -398,8 +398,8 @@ const Xn = G(function({ store: e, library: n, viewId: r, emptyFallback: o = null
|
|
|
398
398
|
return g;
|
|
399
399
|
}, [e, n, c]);
|
|
400
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
|
-
},
|
|
402
|
-
class
|
|
401
|
+
}, Xn);
|
|
402
|
+
class qn {
|
|
403
403
|
constructor(e, n) {
|
|
404
404
|
if (this.fallback = n, e)
|
|
405
405
|
for (const [r, o] of e)
|
|
@@ -416,18 +416,18 @@ class Hn {
|
|
|
416
416
|
return this.renderers.get(e.type) ?? this.fallback;
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function ks(t, e) {
|
|
420
420
|
const n = Object.entries(t);
|
|
421
|
-
return new
|
|
421
|
+
return new qn(n, e);
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function Cs(t) {
|
|
424
424
|
return ot(
|
|
425
425
|
(e) => t.subscribe(e),
|
|
426
426
|
() => t.getSnapshot(),
|
|
427
427
|
() => t.getSnapshot()
|
|
428
428
|
);
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function Jn() {
|
|
431
431
|
const t = Tn();
|
|
432
432
|
return C(() => {
|
|
433
433
|
if (!t)
|
|
@@ -553,8 +553,8 @@ function qn() {
|
|
|
553
553
|
};
|
|
554
554
|
}, [t]), null;
|
|
555
555
|
}
|
|
556
|
-
const
|
|
557
|
-
function
|
|
556
|
+
const Zn = oe("IkonUiSurface"), Qe = "ikon-ui";
|
|
557
|
+
function Qn(t, e) {
|
|
558
558
|
return t === e;
|
|
559
559
|
}
|
|
560
560
|
const Bt = G(function({ stores: e, registry: n, category: r = Qe, onAction: o, client: s }) {
|
|
@@ -567,7 +567,7 @@ const Bt = G(function({ stores: e, registry: n, category: r = Qe, onAction: o, c
|
|
|
567
567
|
const m = [];
|
|
568
568
|
for (const [c, u] of e) {
|
|
569
569
|
const g = u.store.getSnapshot();
|
|
570
|
-
|
|
570
|
+
Qn(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
|
},
|
|
@@ -575,13 +575,13 @@ const Bt = G(function({ stores: e, registry: n, category: r = Qe, onAction: o, c
|
|
|
575
575
|
[e, r, i]
|
|
576
576
|
), f = E(!1), y = h.length > 0;
|
|
577
577
|
return C(() => {
|
|
578
|
-
y && !f.current && (f.current = !0,
|
|
578
|
+
y && !f.current && (f.current = !0, Zn.debug("First UI render"));
|
|
579
579
|
}, [y]), y ? /* @__PURE__ */ w.jsxs(w.Fragment, { children: [
|
|
580
|
-
/* @__PURE__ */ w.jsx(
|
|
581
|
-
h.map(({ key: m, store: c }) => /* @__PURE__ */ w.jsx(
|
|
580
|
+
/* @__PURE__ */ w.jsx(Jn, {}),
|
|
581
|
+
h.map(({ key: m, store: c }) => /* @__PURE__ */ w.jsx(Hn, { 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 er {
|
|
585
585
|
core;
|
|
586
586
|
ownsCore;
|
|
587
587
|
stores = /* @__PURE__ */ new Map();
|
|
@@ -684,7 +684,7 @@ class Qn {
|
|
|
684
684
|
n(e);
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
|
-
function
|
|
687
|
+
function tr(t) {
|
|
688
688
|
if (typeof t == "string") {
|
|
689
689
|
const e = t.trim();
|
|
690
690
|
return e.length > 0 ? e : void 0;
|
|
@@ -709,10 +709,10 @@ function it(...t) {
|
|
|
709
709
|
}
|
|
710
710
|
return e || void 0;
|
|
711
711
|
}
|
|
712
|
-
const St = /* @__PURE__ */ new WeakMap(),
|
|
712
|
+
const St = /* @__PURE__ */ new WeakMap(), nr = {};
|
|
713
713
|
function at(t) {
|
|
714
714
|
if (!t)
|
|
715
|
-
return
|
|
715
|
+
return nr;
|
|
716
716
|
const e = St.get(t);
|
|
717
717
|
if (e)
|
|
718
718
|
return e;
|
|
@@ -721,7 +721,7 @@ function at(t) {
|
|
|
721
721
|
o != null && (typeof o == "string" || typeof o == "number" || typeof o == "boolean") && (n[r] = o);
|
|
722
722
|
return St.set(t, n), n;
|
|
723
723
|
}
|
|
724
|
-
function
|
|
724
|
+
function rr(t) {
|
|
725
725
|
let e = t.parentElement;
|
|
726
726
|
for (; e; ) {
|
|
727
727
|
const r = window.getComputedStyle(e).overflowY;
|
|
@@ -738,20 +738,20 @@ function Vt(t, e) {
|
|
|
738
738
|
"scrollBehavior" in document.documentElement.style ? t.scrollTo({ top: o, behavior: i }) : t.scrollTop = o;
|
|
739
739
|
});
|
|
740
740
|
}
|
|
741
|
-
const et = "data-ikon-scroll-indicator",
|
|
741
|
+
const et = "data-ikon-scroll-indicator", or = 0.15, xe = "data-ikon-at-bottom";
|
|
742
742
|
function Wt(t) {
|
|
743
|
-
return Math.max(t.clientHeight *
|
|
743
|
+
return Math.max(t.clientHeight * or, 20);
|
|
744
744
|
}
|
|
745
|
-
function
|
|
745
|
+
function sr(t) {
|
|
746
746
|
return t.getAttribute(xe) !== "false";
|
|
747
747
|
}
|
|
748
|
-
function
|
|
748
|
+
function ir(t) {
|
|
749
749
|
t.getAttribute(xe) === null && (t.setAttribute(xe, "true"), t.addEventListener("scroll", () => {
|
|
750
750
|
const { scrollTop: e, scrollHeight: n, clientHeight: r } = t, s = n - e - r <= Wt(t);
|
|
751
751
|
t.setAttribute(xe, s ? "true" : "false");
|
|
752
752
|
}, { passive: !0 }));
|
|
753
753
|
}
|
|
754
|
-
function
|
|
754
|
+
function ar(t) {
|
|
755
755
|
const e = t.parentElement ?? t, n = e.querySelector(`[${et}]`);
|
|
756
756
|
if (n)
|
|
757
757
|
return n;
|
|
@@ -784,8 +784,8 @@ function ir(t) {
|
|
|
784
784
|
r.style.opacity = "0.9";
|
|
785
785
|
}), e.appendChild(r), r;
|
|
786
786
|
}
|
|
787
|
-
function
|
|
788
|
-
const n =
|
|
787
|
+
function cr(t, e) {
|
|
788
|
+
const n = ar(t);
|
|
789
789
|
n.style.display = "flex";
|
|
790
790
|
const r = () => {
|
|
791
791
|
Vt(t, e), n.style.display = "none";
|
|
@@ -797,7 +797,7 @@ function ar(t, e) {
|
|
|
797
797
|
n.removeEventListener("click", r), t.removeEventListener("scroll", o);
|
|
798
798
|
};
|
|
799
799
|
}
|
|
800
|
-
function
|
|
800
|
+
function lr() {
|
|
801
801
|
const t = G(function({ nodeId: n, context: r }) {
|
|
802
802
|
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;
|
|
803
803
|
return C(() => {
|
|
@@ -808,10 +808,10 @@ function cr() {
|
|
|
808
808
|
return;
|
|
809
809
|
let u;
|
|
810
810
|
if (l !== !0) {
|
|
811
|
-
const S =
|
|
811
|
+
const S = rr(c);
|
|
812
812
|
if (S)
|
|
813
|
-
if (
|
|
814
|
-
u =
|
|
813
|
+
if (ir(S), h === "Polite" && !sr(S))
|
|
814
|
+
u = cr(S, c);
|
|
815
815
|
else {
|
|
816
816
|
const U = (S.parentElement ?? S).querySelector(`[${et}]`);
|
|
817
817
|
U && (U.style.display = "none"), Vt(S, c);
|
|
@@ -850,9 +850,9 @@ function cr() {
|
|
|
850
850
|
return t;
|
|
851
851
|
};
|
|
852
852
|
}
|
|
853
|
-
function
|
|
853
|
+
function ur() {
|
|
854
854
|
const t = G(function({ nodeId: n, context: r, className: o }) {
|
|
855
|
-
const s = Z(r.store, n), i =
|
|
855
|
+
const s = Z(r.store, n), i = tr(s?.props?.onInvokeId), a = j(() => {
|
|
856
856
|
i && r.dispatchAction(i);
|
|
857
857
|
}, [i, r]);
|
|
858
858
|
if (!s)
|
|
@@ -878,7 +878,7 @@ function lr() {
|
|
|
878
878
|
return t;
|
|
879
879
|
};
|
|
880
880
|
}
|
|
881
|
-
function
|
|
881
|
+
function dr() {
|
|
882
882
|
const t = G(function({ nodeId: n, context: r, className: o }) {
|
|
883
883
|
const s = Z(r.store, n);
|
|
884
884
|
if (!s)
|
|
@@ -891,7 +891,7 @@ function ur() {
|
|
|
891
891
|
return t;
|
|
892
892
|
};
|
|
893
893
|
}
|
|
894
|
-
function
|
|
894
|
+
function fr() {
|
|
895
895
|
const t = G(function({ nodeId: n, context: r, className: o }) {
|
|
896
896
|
const s = Z(r.store, n);
|
|
897
897
|
if (!s)
|
|
@@ -904,19 +904,19 @@ function dr() {
|
|
|
904
904
|
return t;
|
|
905
905
|
};
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function hr() {
|
|
908
908
|
return [
|
|
909
|
-
lr(),
|
|
910
909
|
ur(),
|
|
911
910
|
dr(),
|
|
912
|
-
|
|
911
|
+
fr(),
|
|
912
|
+
lr()
|
|
913
913
|
];
|
|
914
914
|
}
|
|
915
|
-
const
|
|
916
|
-
function mr(t) {
|
|
917
|
-
t.registerModule(hr, pr);
|
|
918
|
-
}
|
|
915
|
+
const pr = "base", mr = async () => hr();
|
|
919
916
|
function gr(t) {
|
|
917
|
+
t.registerModule(pr, mr);
|
|
918
|
+
}
|
|
919
|
+
function yr(t) {
|
|
920
920
|
if (typeof t == "string") {
|
|
921
921
|
const e = t.trim();
|
|
922
922
|
return e.length > 0 ? e : void 0;
|
|
@@ -926,7 +926,7 @@ function gr(t) {
|
|
|
926
926
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
927
927
|
}
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function br(...t) {
|
|
930
930
|
const e = [];
|
|
931
931
|
for (const n of t)
|
|
932
932
|
n && n.trim() && e.push(n.trim());
|
|
@@ -947,8 +947,8 @@ function _e(t) {
|
|
|
947
947
|
if (e === "false") return !1;
|
|
948
948
|
}
|
|
949
949
|
}
|
|
950
|
-
const
|
|
951
|
-
function
|
|
950
|
+
const Sr = "std.audio-url-player";
|
|
951
|
+
function wr() {
|
|
952
952
|
const t = G(function({
|
|
953
953
|
nodeId: n,
|
|
954
954
|
context: r,
|
|
@@ -960,7 +960,7 @@ function Sr() {
|
|
|
960
960
|
});
|
|
961
961
|
}, [a, l]), !s)
|
|
962
962
|
return null;
|
|
963
|
-
const h = yr(
|
|
963
|
+
const h = br(yr(s.props?.className), o), f = wt(s.props?.preload), y = _e(s.props?.controls), m = _e(s.props?.loop), c = _e(s.props?.muted);
|
|
964
964
|
return /* @__PURE__ */ w.jsx(
|
|
965
965
|
"audio",
|
|
966
966
|
{
|
|
@@ -978,7 +978,7 @@ function Sr() {
|
|
|
978
978
|
);
|
|
979
979
|
});
|
|
980
980
|
return ({ type: e }) => {
|
|
981
|
-
if (e ===
|
|
981
|
+
if (e === Sr)
|
|
982
982
|
return t;
|
|
983
983
|
};
|
|
984
984
|
}
|
|
@@ -1013,8 +1013,8 @@ function tt(t) {
|
|
|
1013
1013
|
const e = t.trim();
|
|
1014
1014
|
return e.length > 0 ? e : void 0;
|
|
1015
1015
|
}
|
|
1016
|
-
const
|
|
1017
|
-
function
|
|
1016
|
+
const vr = "std.video-canvas", Er = "std.video-url-player";
|
|
1017
|
+
function Rr() {
|
|
1018
1018
|
const t = G(function({ nodeId: n, context: r, className: o }) {
|
|
1019
1019
|
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);
|
|
1020
1020
|
C(() => {
|
|
@@ -1069,12 +1069,12 @@ function Er() {
|
|
|
1069
1069
|
) : null;
|
|
1070
1070
|
});
|
|
1071
1071
|
return ({ type: e }) => {
|
|
1072
|
-
if (e ===
|
|
1072
|
+
if (e === vr)
|
|
1073
1073
|
return t;
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
|
-
function
|
|
1077
|
-
return [
|
|
1076
|
+
function Ar() {
|
|
1077
|
+
return [Rr(), Tr(), wr()];
|
|
1078
1078
|
}
|
|
1079
1079
|
function be(t) {
|
|
1080
1080
|
if (typeof t == "boolean")
|
|
@@ -1085,7 +1085,7 @@ function be(t) {
|
|
|
1085
1085
|
if (e === "false") return !1;
|
|
1086
1086
|
}
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1088
|
+
function Tr() {
|
|
1089
1089
|
const t = G(function({
|
|
1090
1090
|
nodeId: n,
|
|
1091
1091
|
context: r,
|
|
@@ -1119,27 +1119,27 @@ function Ar() {
|
|
|
1119
1119
|
);
|
|
1120
1120
|
});
|
|
1121
1121
|
return ({ type: e }) => {
|
|
1122
|
-
if (e ===
|
|
1122
|
+
if (e === Er)
|
|
1123
1123
|
return t;
|
|
1124
1124
|
};
|
|
1125
1125
|
}
|
|
1126
|
-
const
|
|
1127
|
-
function
|
|
1128
|
-
t.registerModule(
|
|
1126
|
+
const kr = "media", Cr = async () => Ar();
|
|
1127
|
+
function _r(t) {
|
|
1128
|
+
t.registerModule(kr, Cr);
|
|
1129
1129
|
}
|
|
1130
|
-
const
|
|
1130
|
+
const Ir = `#version 300 es
|
|
1131
1131
|
in vec4 a_position;
|
|
1132
1132
|
void main() {
|
|
1133
1133
|
gl_Position = a_position;
|
|
1134
1134
|
}
|
|
1135
1135
|
`, le = 4;
|
|
1136
|
-
function
|
|
1136
|
+
function Or(t, e) {
|
|
1137
1137
|
return new RegExp(`\\buniform\\s+\\w+\\s+${e}\\s*;`, "g").test(t);
|
|
1138
1138
|
}
|
|
1139
|
-
function
|
|
1139
|
+
function xr(t, e) {
|
|
1140
1140
|
const n = [];
|
|
1141
1141
|
for (const [r, o] of Object.entries(e)) {
|
|
1142
|
-
if (
|
|
1142
|
+
if (Or(t, r))
|
|
1143
1143
|
continue;
|
|
1144
1144
|
let s;
|
|
1145
1145
|
switch (o.type) {
|
|
@@ -1200,7 +1200,7 @@ void main() {
|
|
|
1200
1200
|
}
|
|
1201
1201
|
`;
|
|
1202
1202
|
}
|
|
1203
|
-
class
|
|
1203
|
+
class Nr {
|
|
1204
1204
|
gl;
|
|
1205
1205
|
program = null;
|
|
1206
1206
|
positionBuffer = null;
|
|
@@ -1275,10 +1275,10 @@ class xr {
|
|
|
1275
1275
|
}
|
|
1276
1276
|
compile(e, n = {}) {
|
|
1277
1277
|
this.lastError = null, this.customUniforms = n, this.currentShaderSource = e;
|
|
1278
|
-
const r = this.gl, o = this.compileShader(r.VERTEX_SHADER,
|
|
1278
|
+
const r = this.gl, o = this.compileShader(r.VERTEX_SHADER, Ir);
|
|
1279
1279
|
if (!o)
|
|
1280
1280
|
return !1;
|
|
1281
|
-
const s =
|
|
1281
|
+
const s = xr(e, n), i = this.compileShader(r.FRAGMENT_SHADER, s);
|
|
1282
1282
|
if (!i)
|
|
1283
1283
|
return r.deleteShader(o), !1;
|
|
1284
1284
|
const a = r.createProgram();
|
|
@@ -1384,7 +1384,7 @@ class xr {
|
|
|
1384
1384
|
this.channels = [], this.uniformLocations.clear();
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
1387
|
-
function
|
|
1387
|
+
function Lr(t) {
|
|
1388
1388
|
if (typeof t == "string") {
|
|
1389
1389
|
const e = t.trim();
|
|
1390
1390
|
return e.length > 0 ? e : void 0;
|
|
@@ -1394,7 +1394,7 @@ function Nr(t) {
|
|
|
1394
1394
|
return e.length > 0 ? e.join(" ") : void 0;
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
1397
|
-
function
|
|
1397
|
+
function Pr(...t) {
|
|
1398
1398
|
const e = [];
|
|
1399
1399
|
for (const n of t)
|
|
1400
1400
|
n && n.trim() && e.push(n.trim());
|
|
@@ -1409,10 +1409,10 @@ function Ke(t) {
|
|
|
1409
1409
|
return Math.floor(e);
|
|
1410
1410
|
}
|
|
1411
1411
|
}
|
|
1412
|
-
function
|
|
1412
|
+
function Ur(t) {
|
|
1413
1413
|
return typeof t == "string" ? t : "";
|
|
1414
1414
|
}
|
|
1415
|
-
function
|
|
1415
|
+
function Mr(t) {
|
|
1416
1416
|
if (typeof t == "boolean")
|
|
1417
1417
|
return t;
|
|
1418
1418
|
if (typeof t == "string") {
|
|
@@ -1421,7 +1421,7 @@ function Ur(t) {
|
|
|
1421
1421
|
if (e === "false") return !1;
|
|
1422
1422
|
}
|
|
1423
1423
|
}
|
|
1424
|
-
function
|
|
1424
|
+
function Dr(t) {
|
|
1425
1425
|
if (!t || typeof t != "object")
|
|
1426
1426
|
return {};
|
|
1427
1427
|
const e = {}, n = t;
|
|
@@ -1436,10 +1436,10 @@ function Mr(t) {
|
|
|
1436
1436
|
}
|
|
1437
1437
|
return e;
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1439
|
+
function jr(t) {
|
|
1440
1440
|
return Array.isArray(t) ? t.map((e) => typeof e == "string" ? e : null) : [];
|
|
1441
1441
|
}
|
|
1442
|
-
function
|
|
1442
|
+
function $r(t, e) {
|
|
1443
1443
|
const n = Object.keys(t), r = Object.keys(e);
|
|
1444
1444
|
if (n.length !== r.length)
|
|
1445
1445
|
return !1;
|
|
@@ -1460,8 +1460,8 @@ function jr(t, e) {
|
|
|
1460
1460
|
}
|
|
1461
1461
|
return !0;
|
|
1462
1462
|
}
|
|
1463
|
-
const
|
|
1464
|
-
function
|
|
1463
|
+
const Br = "std.shadertoy-canvas";
|
|
1464
|
+
function Fr() {
|
|
1465
1465
|
const t = G(function({ nodeId: n, context: r, className: o }) {
|
|
1466
1466
|
const s = Z(r.store, n), i = E(null), a = E(null), l = E(null), h = E(0), f = E(""), y = E({}), m = E({
|
|
1467
1467
|
x: 0,
|
|
@@ -1469,12 +1469,12 @@ function Br() {
|
|
|
1469
1469
|
clickX: 0,
|
|
1470
1470
|
clickY: 0,
|
|
1471
1471
|
isDown: !1
|
|
1472
|
-
}), c = s ?
|
|
1472
|
+
}), c = s ? Ur(s.props?.shaderSource) : "", u = s ? Ke(s.props?.fps) ?? 60 : 60, g = s?.props?.uniforms, p = W(() => Dr(g), [g]), b = s?.props?.channels, S = W(() => jr(b), [b]), R = s ? Mr(s.props?.enableMouse) ?? !0 : !0, v = s ? Ke(s.props?.width) : void 0, T = s ? Ke(s.props?.height) : void 0, U = s ? Pr(Lr(s.props?.className), o) : o;
|
|
1473
1473
|
C(() => {
|
|
1474
1474
|
const I = i.current;
|
|
1475
1475
|
if (I) {
|
|
1476
1476
|
try {
|
|
1477
|
-
const P = new
|
|
1477
|
+
const P = new Nr(I);
|
|
1478
1478
|
a.current = P;
|
|
1479
1479
|
} catch (P) {
|
|
1480
1480
|
console.error("[ShadertoyRenderer] Failed to create WebGL2 context:", P);
|
|
@@ -1494,7 +1494,7 @@ function Br() {
|
|
|
1494
1494
|
}
|
|
1495
1495
|
}, [c, p]), C(() => {
|
|
1496
1496
|
const I = a.current;
|
|
1497
|
-
!I || !f.current ||
|
|
1497
|
+
!I || !f.current || $r(y.current, p) || (I.setCustomUniforms(p), y.current = p);
|
|
1498
1498
|
}, [p]), C(() => {
|
|
1499
1499
|
const I = a.current;
|
|
1500
1500
|
I && I.setChannels(S);
|
|
@@ -1547,16 +1547,16 @@ function Br() {
|
|
|
1547
1547
|
) : null;
|
|
1548
1548
|
});
|
|
1549
1549
|
return ({ type: e }) => {
|
|
1550
|
-
if (e ===
|
|
1550
|
+
if (e === Br)
|
|
1551
1551
|
return t;
|
|
1552
1552
|
};
|
|
1553
1553
|
}
|
|
1554
|
-
const
|
|
1555
|
-
function
|
|
1556
|
-
t.registerModule(
|
|
1554
|
+
const Vr = "shadertoy", Wr = async () => Fr();
|
|
1555
|
+
function Kr(t) {
|
|
1556
|
+
t.registerModule(Vr, Wr);
|
|
1557
1557
|
}
|
|
1558
1558
|
const vt = oe("UIRegistry");
|
|
1559
|
-
class
|
|
1559
|
+
class Yr {
|
|
1560
1560
|
baseResolvers = [];
|
|
1561
1561
|
moduleLoaders = /* @__PURE__ */ new Map();
|
|
1562
1562
|
moduleResolvers = /* @__PURE__ */ new Map();
|
|
@@ -1578,7 +1578,7 @@ class Kr {
|
|
|
1578
1578
|
for (const [r, o] of this.moduleLoaders.entries())
|
|
1579
1579
|
if (!this.moduleResolvers.has(r))
|
|
1580
1580
|
try {
|
|
1581
|
-
const s = await o(), i =
|
|
1581
|
+
const s = await o(), i = Xr(s);
|
|
1582
1582
|
this.moduleResolvers.set(r, i), e = !0;
|
|
1583
1583
|
} catch (s) {
|
|
1584
1584
|
vt.error(`[IkonUiRegistry] Failed to load module '${r}'.`, s);
|
|
@@ -1586,7 +1586,7 @@ class Kr {
|
|
|
1586
1586
|
const n = [];
|
|
1587
1587
|
for (const r of this.moduleLoaders.keys())
|
|
1588
1588
|
this.moduleResolvers.has(r) && n.push(r);
|
|
1589
|
-
return
|
|
1589
|
+
return Hr(n, this.activeModuleOrder) || (this.activeModuleOrder = n, e = !0), e;
|
|
1590
1590
|
}
|
|
1591
1591
|
resolve(e) {
|
|
1592
1592
|
for (const n of this.baseResolvers) {
|
|
@@ -1606,17 +1606,17 @@ class Kr {
|
|
|
1606
1606
|
}
|
|
1607
1607
|
}
|
|
1608
1608
|
}
|
|
1609
|
-
function
|
|
1610
|
-
const t = new
|
|
1611
|
-
return
|
|
1609
|
+
function Gr() {
|
|
1610
|
+
const t = new Yr();
|
|
1611
|
+
return gr(t), _r(t), Kr(t), t.loadRegisteredModules(), t;
|
|
1612
1612
|
}
|
|
1613
|
-
function
|
|
1613
|
+
function zr(t) {
|
|
1614
1614
|
return Array.isArray(t) ? t : [t];
|
|
1615
1615
|
}
|
|
1616
|
-
function
|
|
1617
|
-
return t ?
|
|
1616
|
+
function Xr(t) {
|
|
1617
|
+
return t ? zr(t).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
|
|
1618
1618
|
}
|
|
1619
|
-
function
|
|
1619
|
+
function Hr(t, e) {
|
|
1620
1620
|
if (t.length !== e.length)
|
|
1621
1621
|
return !1;
|
|
1622
1622
|
for (let n = 0; n < t.length; n += 1)
|
|
@@ -1624,7 +1624,7 @@ function Xr(t, e) {
|
|
|
1624
1624
|
return !1;
|
|
1625
1625
|
return !0;
|
|
1626
1626
|
}
|
|
1627
|
-
function
|
|
1627
|
+
function _s({ mount: t, stores: e, registry: n, client: r, onAction: o }) {
|
|
1628
1628
|
return /* @__PURE__ */ w.jsx(
|
|
1629
1629
|
Bt,
|
|
1630
1630
|
{
|
|
@@ -1717,14 +1717,14 @@ function Tt(t, e, n, r) {
|
|
|
1717
1717
|
f[p] = y(p * 0.1, t, n);
|
|
1718
1718
|
return (p) => p <= 0 ? 0 : p >= 1 ? 1 : y(g(p), e, r);
|
|
1719
1719
|
}
|
|
1720
|
-
function
|
|
1720
|
+
function qr(t) {
|
|
1721
1721
|
const e = /steps\(\s*([0-9]+)\s*(?:,\s*([a-z-]+)\s*)?\)/i.exec(t);
|
|
1722
1722
|
if (!e)
|
|
1723
1723
|
return (o) => F(o);
|
|
1724
1724
|
const n = Math.max(1, parseInt(e[1], 10)), r = (e[2] ?? "end").toLowerCase();
|
|
1725
1725
|
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);
|
|
1726
1726
|
}
|
|
1727
|
-
function
|
|
1727
|
+
function Jr(t) {
|
|
1728
1728
|
if (!t)
|
|
1729
1729
|
return (n) => F(n);
|
|
1730
1730
|
const e = t.trim().toLowerCase();
|
|
@@ -1742,12 +1742,12 @@ function qr(t) {
|
|
|
1742
1742
|
}
|
|
1743
1743
|
}
|
|
1744
1744
|
if (e.startsWith("steps(") && e.endsWith(")")) {
|
|
1745
|
-
const n =
|
|
1745
|
+
const n = qr(e);
|
|
1746
1746
|
return (r) => n(F(r));
|
|
1747
1747
|
}
|
|
1748
1748
|
return (n) => F(n);
|
|
1749
1749
|
}
|
|
1750
|
-
function
|
|
1750
|
+
function Zr(t) {
|
|
1751
1751
|
if (!t)
|
|
1752
1752
|
return;
|
|
1753
1753
|
const e = /(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)\s*->\s*(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)/.exec(t);
|
|
@@ -1757,7 +1757,7 @@ function Jr(t) {
|
|
|
1757
1757
|
if (![n, r, o, s].some((i) => !Number.isFinite(i)))
|
|
1758
1758
|
return { inStart: n, inEnd: r, outStart: o, outEnd: s };
|
|
1759
1759
|
}
|
|
1760
|
-
class
|
|
1760
|
+
class Qr {
|
|
1761
1761
|
bindingsByStyle = /* @__PURE__ */ new Map();
|
|
1762
1762
|
observer;
|
|
1763
1763
|
observeScheduled = !1;
|
|
@@ -1802,7 +1802,7 @@ class Zr {
|
|
|
1802
1802
|
const n = e.source?.trim();
|
|
1803
1803
|
if (!n)
|
|
1804
1804
|
return;
|
|
1805
|
-
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 =
|
|
1805
|
+
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 = Jr(e.ease), h = Zr(e.map), f = e.targetId?.trim() || void 0;
|
|
1806
1806
|
return Number.isNaN(r) || Number.isNaN(s) ? void 0 : {
|
|
1807
1807
|
source: n.toLowerCase(),
|
|
1808
1808
|
min: r,
|
|
@@ -2015,8 +2015,8 @@ class Zr {
|
|
|
2015
2015
|
}
|
|
2016
2016
|
}
|
|
2017
2017
|
}
|
|
2018
|
-
const Ge = new
|
|
2019
|
-
function
|
|
2018
|
+
const Ge = new Qr();
|
|
2019
|
+
function eo(t) {
|
|
2020
2020
|
const e = E(/* @__PURE__ */ new Map()), n = j(({ styleId: s, css: i, common: a }) => {
|
|
2021
2021
|
if (!(!s || typeof document > "u")) {
|
|
2022
2022
|
if (i) {
|
|
@@ -2049,7 +2049,7 @@ function Qr(t) {
|
|
|
2049
2049
|
};
|
|
2050
2050
|
}, [t, o, n, r]), C(() => () => o(), [o]), { setStyle: n, deleteStyles: r, reset: o };
|
|
2051
2051
|
}
|
|
2052
|
-
function
|
|
2052
|
+
function to(t) {
|
|
2053
2053
|
const e = [];
|
|
2054
2054
|
for (const [n, r] of t) {
|
|
2055
2055
|
const o = r.store.getSnapshot(), s = o.rootViewId && o.views.has(o.rootViewId);
|
|
@@ -2057,7 +2057,7 @@ function eo(t) {
|
|
|
2057
2057
|
}
|
|
2058
2058
|
return e.sort(), e.join(",");
|
|
2059
2059
|
}
|
|
2060
|
-
function
|
|
2060
|
+
function no(t) {
|
|
2061
2061
|
const [e, n] = x(), r = E("");
|
|
2062
2062
|
return C(() => {
|
|
2063
2063
|
if (!t) {
|
|
@@ -2065,7 +2065,7 @@ function to(t) {
|
|
|
2065
2065
|
return;
|
|
2066
2066
|
}
|
|
2067
2067
|
const o = () => {
|
|
2068
|
-
const s = t.getStores(), i =
|
|
2068
|
+
const s = t.getStores(), i = to(s);
|
|
2069
2069
|
i !== r.current && (r.current = i, n(s));
|
|
2070
2070
|
};
|
|
2071
2071
|
return o(), t.subscribe(o);
|
|
@@ -2078,7 +2078,7 @@ const k = {
|
|
|
2078
2078
|
Line: 4,
|
|
2079
2079
|
Paragraph: 8,
|
|
2080
2080
|
Emoji: 16
|
|
2081
|
-
},
|
|
2081
|
+
}, ro = [
|
|
2082
2082
|
{
|
|
2083
2083
|
flag: k.Letter,
|
|
2084
2084
|
hints: [
|
|
@@ -2127,11 +2127,11 @@ const k = {
|
|
|
2127
2127
|
"[data-emoji]"
|
|
2128
2128
|
]
|
|
2129
2129
|
}
|
|
2130
|
-
], nt = k.Letter | k.Word | k.Line | k.Paragraph | k.Emoji,
|
|
2131
|
-
function
|
|
2132
|
-
if (!t || t.length >
|
|
2130
|
+
], nt = k.Letter | k.Word | k.Line | k.Paragraph | k.Emoji, oo = k.Letter | k.Word | k.Line | k.Paragraph, kt = /* @__PURE__ */ new Map(), so = 16384;
|
|
2131
|
+
function Is(t, e) {
|
|
2132
|
+
if (!t || t.length > so)
|
|
2133
2133
|
return t;
|
|
2134
|
-
const n =
|
|
2134
|
+
const n = Ro(e), r = fe(n, k.Emoji), o = n & oo;
|
|
2135
2135
|
if (o === k.None && !r)
|
|
2136
2136
|
return t;
|
|
2137
2137
|
const s = t.replace(/\r\n/g, `
|
|
@@ -2139,20 +2139,20 @@ function _s(t, e) {
|
|
|
2139
2139
|
`);
|
|
2140
2140
|
if (o === k.None)
|
|
2141
2141
|
return Ot(s);
|
|
2142
|
-
const i =
|
|
2142
|
+
const i = vo(s);
|
|
2143
2143
|
if (i.length === 0)
|
|
2144
2144
|
return r ? Ot(s) : t;
|
|
2145
|
-
const a =
|
|
2145
|
+
const a = Eo(i), l = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, h = [];
|
|
2146
2146
|
for (const f of a) {
|
|
2147
|
-
const y =
|
|
2147
|
+
const y = io(f, n, l);
|
|
2148
2148
|
h.push(...y);
|
|
2149
2149
|
}
|
|
2150
2150
|
return h;
|
|
2151
2151
|
}
|
|
2152
|
-
function
|
|
2152
|
+
function io(t, e, n) {
|
|
2153
2153
|
const r = [];
|
|
2154
2154
|
for (const o of t) {
|
|
2155
|
-
const s =
|
|
2155
|
+
const s = ao(o, e, n);
|
|
2156
2156
|
r.push(...s);
|
|
2157
2157
|
}
|
|
2158
2158
|
if (fe(e, k.Paragraph)) {
|
|
@@ -2171,8 +2171,8 @@ function so(t, e, n) {
|
|
|
2171
2171
|
}
|
|
2172
2172
|
return r;
|
|
2173
2173
|
}
|
|
2174
|
-
function
|
|
2175
|
-
const r =
|
|
2174
|
+
function ao(t, e, n) {
|
|
2175
|
+
const r = co(t.text, e, n), o = [];
|
|
2176
2176
|
if (fe(e, k.Line)) {
|
|
2177
2177
|
const s = n.line++;
|
|
2178
2178
|
o.push(
|
|
@@ -2184,7 +2184,7 @@ function io(t, e, n) {
|
|
|
2184
2184
|
o.push(/* @__PURE__ */ w.jsx("br", {}, `motion-break-${n.br++}`));
|
|
2185
2185
|
return o;
|
|
2186
2186
|
}
|
|
2187
|
-
function
|
|
2187
|
+
function co(t, e, n) {
|
|
2188
2188
|
if (!t)
|
|
2189
2189
|
return [];
|
|
2190
2190
|
const r = fe(e, k.Word), o = [], s = /(\s+)/g;
|
|
@@ -2203,13 +2203,13 @@ function ao(t, e, n) {
|
|
|
2203
2203
|
return o;
|
|
2204
2204
|
}
|
|
2205
2205
|
function Ct(t, e, n, r) {
|
|
2206
|
-
const o = e.word++, s =
|
|
2206
|
+
const o = e.word++, s = uo(t, n, e), i = `motion-word-${o}`, a = lo(o, r);
|
|
2207
2207
|
return r ? /* @__PURE__ */ w.jsx("span", { "data-motion-word": !0, style: a, children: s }, i) : /* @__PURE__ */ w.jsx("span", { style: a, children: s }, i);
|
|
2208
2208
|
}
|
|
2209
|
-
function
|
|
2209
|
+
function lo(t, e) {
|
|
2210
2210
|
return e ? { ...Ue(t), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
|
|
2211
2211
|
}
|
|
2212
|
-
function
|
|
2212
|
+
function uo(t, e, n) {
|
|
2213
2213
|
if (!t)
|
|
2214
2214
|
return [];
|
|
2215
2215
|
const r = fe(e, k.Letter), o = fe(e, k.Emoji);
|
|
@@ -2242,33 +2242,33 @@ function lo(t, e, n) {
|
|
|
2242
2242
|
function rt(t) {
|
|
2243
2243
|
if (!t)
|
|
2244
2244
|
return [];
|
|
2245
|
-
const e =
|
|
2246
|
-
return e ? Array.from(e.segment(t), (n) => n.segment) :
|
|
2245
|
+
const e = fo();
|
|
2246
|
+
return e ? Array.from(e.segment(t), (n) => n.segment) : ho(t);
|
|
2247
2247
|
}
|
|
2248
2248
|
let Se;
|
|
2249
|
-
function
|
|
2249
|
+
function fo() {
|
|
2250
2250
|
return Se !== void 0 || (typeof Intl < "u" && typeof Intl.Segmenter == "function" ? Se = new Intl.Segmenter(void 0, { granularity: "grapheme" }) : Se = null), Se;
|
|
2251
2251
|
}
|
|
2252
|
-
function
|
|
2252
|
+
function ho(t) {
|
|
2253
2253
|
const e = [], n = Array.from(t);
|
|
2254
2254
|
let r = "";
|
|
2255
2255
|
for (let o = 0; o < n.length; o++) {
|
|
2256
2256
|
const s = n[o], i = n[o + 1];
|
|
2257
|
-
r += s, !(i &&
|
|
2257
|
+
r += s, !(i && po(s, i)) && (e.push(r), r = "");
|
|
2258
2258
|
}
|
|
2259
2259
|
return r && e.push(r), e;
|
|
2260
2260
|
}
|
|
2261
|
-
function
|
|
2262
|
-
return e ? !!(_t(t) || _t(e) ||
|
|
2261
|
+
function po(t, e) {
|
|
2262
|
+
return e ? !!(_t(t) || _t(e) || yo(e) || mo(e) || go(e) || It(t) && It(e)) : !1;
|
|
2263
2263
|
}
|
|
2264
2264
|
function _t(t) {
|
|
2265
2265
|
return t.codePointAt(0) === 8205;
|
|
2266
2266
|
}
|
|
2267
|
-
function
|
|
2267
|
+
function mo(t) {
|
|
2268
2268
|
const e = t.codePointAt(0);
|
|
2269
2269
|
return e === void 0 ? !1 : e >= 65024 && e <= 65039 || e >= 917760 && e <= 917999;
|
|
2270
2270
|
}
|
|
2271
|
-
function
|
|
2271
|
+
function go(t) {
|
|
2272
2272
|
const e = t.codePointAt(0);
|
|
2273
2273
|
return e === void 0 ? !1 : e >= 127995 && e <= 127999;
|
|
2274
2274
|
}
|
|
@@ -2277,10 +2277,10 @@ function It(t) {
|
|
|
2277
2277
|
return e === void 0 ? !1 : e >= 127462 && e <= 127487;
|
|
2278
2278
|
}
|
|
2279
2279
|
let ze;
|
|
2280
|
-
function
|
|
2281
|
-
return t ? (ze || (ze =
|
|
2280
|
+
function yo(t) {
|
|
2281
|
+
return t ? (ze || (ze = bo()), ze(t)) : !1;
|
|
2282
2282
|
}
|
|
2283
|
-
function
|
|
2283
|
+
function bo() {
|
|
2284
2284
|
try {
|
|
2285
2285
|
const t = new RegExp("\\p{Mark}", "u");
|
|
2286
2286
|
return (e) => t.test(e);
|
|
@@ -2293,17 +2293,17 @@ function yo() {
|
|
|
2293
2293
|
}
|
|
2294
2294
|
let Xe;
|
|
2295
2295
|
function Gt(t) {
|
|
2296
|
-
return t ? (Xe || (Xe =
|
|
2296
|
+
return t ? (Xe || (Xe = So()), Xe(t)) : !1;
|
|
2297
2297
|
}
|
|
2298
|
-
function
|
|
2298
|
+
function So() {
|
|
2299
2299
|
try {
|
|
2300
2300
|
const t = new RegExp("\\p{Extended_Pictographic}", "u");
|
|
2301
2301
|
return (e) => t.test(e);
|
|
2302
2302
|
} catch {
|
|
2303
|
-
return
|
|
2303
|
+
return wo;
|
|
2304
2304
|
}
|
|
2305
2305
|
}
|
|
2306
|
-
function
|
|
2306
|
+
function wo(t) {
|
|
2307
2307
|
if (!t)
|
|
2308
2308
|
return !1;
|
|
2309
2309
|
for (const e of Array.from(t)) {
|
|
@@ -2313,7 +2313,7 @@ function So(t) {
|
|
|
2313
2313
|
}
|
|
2314
2314
|
return !1;
|
|
2315
2315
|
}
|
|
2316
|
-
function
|
|
2316
|
+
function vo(t) {
|
|
2317
2317
|
const e = [];
|
|
2318
2318
|
let n = "", r = 0;
|
|
2319
2319
|
for (let o = 0; o < t.length; o++) {
|
|
@@ -2327,7 +2327,7 @@ function wo(t) {
|
|
|
2327
2327
|
}
|
|
2328
2328
|
return (r > 0 || n.length > 0) && e.push({ text: n, breaks: r }), e;
|
|
2329
2329
|
}
|
|
2330
|
-
function
|
|
2330
|
+
function Eo(t) {
|
|
2331
2331
|
if (t.length === 0)
|
|
2332
2332
|
return [];
|
|
2333
2333
|
const e = [];
|
|
@@ -2384,7 +2384,7 @@ function zt(t, e) {
|
|
|
2384
2384
|
}
|
|
2385
2385
|
return i(), o ? { nodes: n, sawEmoji: !0 } : { nodes: [t.join("")], sawEmoji: !1 };
|
|
2386
2386
|
}
|
|
2387
|
-
function
|
|
2387
|
+
function Ro(t) {
|
|
2388
2388
|
if (!t)
|
|
2389
2389
|
return k.None;
|
|
2390
2390
|
const e = t.trim();
|
|
@@ -2398,8 +2398,8 @@ function Eo(t) {
|
|
|
2398
2398
|
const r = e.split(/\s+/).filter(Boolean);
|
|
2399
2399
|
if (r.length === 0)
|
|
2400
2400
|
return k.None;
|
|
2401
|
-
const s = r.map((l) => `.${
|
|
2402
|
-
(l) => new RegExp(`(^|[^a-zA-Z0-9_-])${
|
|
2401
|
+
const s = r.map((l) => `.${Ao(l)}`).map(
|
|
2402
|
+
(l) => new RegExp(`(^|[^a-zA-Z0-9_-])${To(l)}(?![a-zA-Z0-9_-])`)
|
|
2403
2403
|
);
|
|
2404
2404
|
let i = k.None, a = !1;
|
|
2405
2405
|
for (const l of Array.from(document.styleSheets)) {
|
|
@@ -2427,7 +2427,7 @@ function Xt(t, e) {
|
|
|
2427
2427
|
const a = s.selectorText ?? "";
|
|
2428
2428
|
if (!a || !e.some((h) => h.test(a))) continue;
|
|
2429
2429
|
r = !0;
|
|
2430
|
-
for (const h of
|
|
2430
|
+
for (const h of ro)
|
|
2431
2431
|
h.hints.some((f) => a.includes(f)) && (n |= h.flag);
|
|
2432
2432
|
if (n === nt)
|
|
2433
2433
|
return { mask: n, sawStyleRule: !0 };
|
|
@@ -2441,19 +2441,19 @@ function Xt(t, e) {
|
|
|
2441
2441
|
}
|
|
2442
2442
|
return { mask: n, sawStyleRule: r };
|
|
2443
2443
|
}
|
|
2444
|
-
function
|
|
2444
|
+
function Ao(t) {
|
|
2445
2445
|
return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(t) : t.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
|
|
2446
2446
|
}
|
|
2447
|
-
function
|
|
2447
|
+
function To(t) {
|
|
2448
2448
|
return t.replace(/[.*+?^${}()|[\]\\]/g, (e) => `\\${e}`);
|
|
2449
2449
|
}
|
|
2450
|
-
const ct = "ikon-auth-session", Ht = "ikon-auth-auto-login-attempted-run",
|
|
2450
|
+
const ct = "ikon-auth-session", Ht = "ikon-auth-auto-login-attempted-run", ko = 10080 * 60 * 1e3, Co = 60 * 1e3;
|
|
2451
2451
|
function qt(t) {
|
|
2452
2452
|
try {
|
|
2453
2453
|
const e = t.split(".");
|
|
2454
2454
|
if (e.length !== 3) return !0;
|
|
2455
2455
|
const n = e[1].replace(/-/g, "+").replace(/_/g, "/"), r = n + "=".repeat((4 - n.length % 4) % 4), o = JSON.parse(atob(r));
|
|
2456
|
-
return typeof o.exp != "number" ? !1 : Date.now() >= o.exp * 1e3 -
|
|
2456
|
+
return typeof o.exp != "number" ? !1 : Date.now() >= o.exp * 1e3 - Co;
|
|
2457
2457
|
} catch {
|
|
2458
2458
|
return !0;
|
|
2459
2459
|
}
|
|
@@ -2470,7 +2470,7 @@ function Jt() {
|
|
|
2470
2470
|
const t = localStorage.getItem(ct);
|
|
2471
2471
|
if (!t) return null;
|
|
2472
2472
|
const e = JSON.parse(t);
|
|
2473
|
-
return Date.now() - e.authenticatedAt >
|
|
2473
|
+
return Date.now() - e.authenticatedAt > ko || qt(e.token) ? (Le(), null) : e;
|
|
2474
2474
|
} catch {
|
|
2475
2475
|
return console.warn("Failed to load auth session from localStorage"), null;
|
|
2476
2476
|
}
|
|
@@ -2482,7 +2482,7 @@ function Le() {
|
|
|
2482
2482
|
console.warn("Failed to clear auth session from localStorage");
|
|
2483
2483
|
}
|
|
2484
2484
|
}
|
|
2485
|
-
function
|
|
2485
|
+
function _o(t) {
|
|
2486
2486
|
if (t)
|
|
2487
2487
|
try {
|
|
2488
2488
|
sessionStorage.setItem(Ht, t);
|
|
@@ -2490,7 +2490,7 @@ function Co(t) {
|
|
|
2490
2490
|
console.warn("Failed to record auto-login attempt in sessionStorage");
|
|
2491
2491
|
}
|
|
2492
2492
|
}
|
|
2493
|
-
function
|
|
2493
|
+
function Io() {
|
|
2494
2494
|
try {
|
|
2495
2495
|
return sessionStorage.getItem(Ht);
|
|
2496
2496
|
} catch {
|
|
@@ -2549,7 +2549,7 @@ async function Qt(t, e) {
|
|
|
2549
2549
|
};
|
|
2550
2550
|
return he(l), l;
|
|
2551
2551
|
}
|
|
2552
|
-
async function
|
|
2552
|
+
async function Oo({ email: t, spaceId: e, authUrl: n }) {
|
|
2553
2553
|
const r = await fetch(`${n}/email/send`, {
|
|
2554
2554
|
method: "POST",
|
|
2555
2555
|
headers: { "Content-Type": "application/json" },
|
|
@@ -2564,7 +2564,7 @@ async function Io({ email: t, spaceId: e, authUrl: n }) {
|
|
|
2564
2564
|
throw new Error(o);
|
|
2565
2565
|
}
|
|
2566
2566
|
}
|
|
2567
|
-
async function
|
|
2567
|
+
async function xo({ email: t, code: e, authUrl: n }) {
|
|
2568
2568
|
const r = await fetch(`${n}/email/code`, {
|
|
2569
2569
|
method: "POST",
|
|
2570
2570
|
headers: { "Content-Type": "application/json" },
|
|
@@ -2585,21 +2585,21 @@ async function Oo({ email: t, code: e, authUrl: n }) {
|
|
|
2585
2585
|
};
|
|
2586
2586
|
return he(s), s;
|
|
2587
2587
|
}
|
|
2588
|
-
function
|
|
2588
|
+
function No() {
|
|
2589
2589
|
const t = new URLSearchParams(window.location.search), e = t.get("ikon_token"), n = t.get("ikon_provider");
|
|
2590
2590
|
return e && n ? { token: e, provider: n } : null;
|
|
2591
2591
|
}
|
|
2592
|
-
function
|
|
2592
|
+
function Lo() {
|
|
2593
2593
|
return new URLSearchParams(window.location.search).get("error");
|
|
2594
2594
|
}
|
|
2595
2595
|
function Nt() {
|
|
2596
2596
|
window.history.replaceState({}, "", window.location.pathname);
|
|
2597
2597
|
}
|
|
2598
|
-
function
|
|
2598
|
+
function Po(t, e, n, r) {
|
|
2599
2599
|
const o = r ?? window.location.origin + window.location.pathname + window.location.search;
|
|
2600
2600
|
return `${n}/oauth/${t}?space=${encodeURIComponent(e)}&return=${encodeURIComponent(o)}`;
|
|
2601
2601
|
}
|
|
2602
|
-
async function
|
|
2602
|
+
async function Uo(t) {
|
|
2603
2603
|
const e = await fetch(`${t}/passkey/registration/options`, {
|
|
2604
2604
|
method: "POST",
|
|
2605
2605
|
headers: { "Content-Type": "application/json" }
|
|
@@ -2610,7 +2610,7 @@ async function Po(t) {
|
|
|
2610
2610
|
}
|
|
2611
2611
|
return e.json();
|
|
2612
2612
|
}
|
|
2613
|
-
async function
|
|
2613
|
+
async function Mo(t, e, n) {
|
|
2614
2614
|
const r = await fetch(`${t}/passkey/registration/verify`, {
|
|
2615
2615
|
method: "POST",
|
|
2616
2616
|
headers: { "Content-Type": "application/json" },
|
|
@@ -2627,7 +2627,7 @@ async function Uo(t, e, n) {
|
|
|
2627
2627
|
};
|
|
2628
2628
|
return he(s), s;
|
|
2629
2629
|
}
|
|
2630
|
-
async function
|
|
2630
|
+
async function Do(t, e) {
|
|
2631
2631
|
const n = await fetch(`${t}/passkey/authentication/options`, {
|
|
2632
2632
|
method: "POST",
|
|
2633
2633
|
headers: { "Content-Type": "application/json" },
|
|
@@ -2639,7 +2639,7 @@ async function Mo(t, e) {
|
|
|
2639
2639
|
}
|
|
2640
2640
|
return n.json();
|
|
2641
2641
|
}
|
|
2642
|
-
async function
|
|
2642
|
+
async function jo(t, e) {
|
|
2643
2643
|
const n = await fetch(`${t}/passkey/authentication/verify`, {
|
|
2644
2644
|
method: "POST",
|
|
2645
2645
|
headers: { "Content-Type": "application/json" },
|
|
@@ -2670,9 +2670,9 @@ function Pe(t) {
|
|
|
2670
2670
|
return s;
|
|
2671
2671
|
}
|
|
2672
2672
|
function lt() {
|
|
2673
|
-
return
|
|
2673
|
+
return $o.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
|
|
2674
2674
|
}
|
|
2675
|
-
const
|
|
2675
|
+
const $o = {
|
|
2676
2676
|
stubThis: (t) => t
|
|
2677
2677
|
};
|
|
2678
2678
|
function en(t) {
|
|
@@ -2705,7 +2705,7 @@ class D extends Error {
|
|
|
2705
2705
|
}), this.name = o ?? r.name, this.code = n;
|
|
2706
2706
|
}
|
|
2707
2707
|
}
|
|
2708
|
-
function
|
|
2708
|
+
function Bo({ error: t, options: e }) {
|
|
2709
2709
|
const { publicKey: n } = e;
|
|
2710
2710
|
if (!n)
|
|
2711
2711
|
throw Error("options was missing required publicKey property");
|
|
@@ -2791,7 +2791,7 @@ function $o({ error: t, options: e }) {
|
|
|
2791
2791
|
}
|
|
2792
2792
|
return t;
|
|
2793
2793
|
}
|
|
2794
|
-
class
|
|
2794
|
+
class Fo {
|
|
2795
2795
|
constructor() {
|
|
2796
2796
|
Object.defineProperty(this, "controller", {
|
|
2797
2797
|
enumerable: !0,
|
|
@@ -2815,12 +2815,12 @@ class Bo {
|
|
|
2815
2815
|
}
|
|
2816
2816
|
}
|
|
2817
2817
|
}
|
|
2818
|
-
const nn = new
|
|
2818
|
+
const nn = new Fo(), Vo = ["cross-platform", "platform"];
|
|
2819
2819
|
function rn(t) {
|
|
2820
|
-
if (t && !(
|
|
2820
|
+
if (t && !(Vo.indexOf(t) < 0))
|
|
2821
2821
|
return t;
|
|
2822
2822
|
}
|
|
2823
|
-
async function
|
|
2823
|
+
async function Wo(t) {
|
|
2824
2824
|
!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 });
|
|
2825
2825
|
const { optionsJSON: e, useAutoRegister: n = !1 } = t;
|
|
2826
2826
|
if (!lt())
|
|
@@ -2839,7 +2839,7 @@ async function Vo(t) {
|
|
|
2839
2839
|
try {
|
|
2840
2840
|
s = await navigator.credentials.create(o);
|
|
2841
2841
|
} catch (u) {
|
|
2842
|
-
throw
|
|
2842
|
+
throw Bo({ error: u, options: o });
|
|
2843
2843
|
}
|
|
2844
2844
|
if (!s)
|
|
2845
2845
|
throw new Error("Registration was not completed");
|
|
@@ -2888,7 +2888,7 @@ function He(t, e) {
|
|
|
2888
2888
|
console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${t}. You should report this error to them.
|
|
2889
2889
|
`, e);
|
|
2890
2890
|
}
|
|
2891
|
-
function
|
|
2891
|
+
function Ko() {
|
|
2892
2892
|
if (!lt())
|
|
2893
2893
|
return qe.stubThis(new Promise((e) => e(!1)));
|
|
2894
2894
|
const t = globalThis.PublicKeyCredential;
|
|
@@ -2897,7 +2897,7 @@ function Wo() {
|
|
|
2897
2897
|
const qe = {
|
|
2898
2898
|
stubThis: (t) => t
|
|
2899
2899
|
};
|
|
2900
|
-
function
|
|
2900
|
+
function Yo({ error: t, options: e }) {
|
|
2901
2901
|
const { publicKey: n } = e;
|
|
2902
2902
|
if (!n)
|
|
2903
2903
|
throw Error("options was missing required publicKey property");
|
|
@@ -2938,7 +2938,7 @@ function Ko({ error: t, options: e }) {
|
|
|
2938
2938
|
}
|
|
2939
2939
|
return t;
|
|
2940
2940
|
}
|
|
2941
|
-
async function
|
|
2941
|
+
async function Go(t) {
|
|
2942
2942
|
!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 });
|
|
2943
2943
|
const { optionsJSON: e, useBrowserAutofill: n = !1, verifyBrowserAutofillInput: r = !0 } = t;
|
|
2944
2944
|
if (!lt())
|
|
@@ -2951,7 +2951,7 @@ async function Yo(t) {
|
|
|
2951
2951
|
allowCredentials: o
|
|
2952
2952
|
}, i = {};
|
|
2953
2953
|
if (n) {
|
|
2954
|
-
if (!await
|
|
2954
|
+
if (!await Ko())
|
|
2955
2955
|
throw Error("Browser does not support WebAuthn autofill");
|
|
2956
2956
|
if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1 && r)
|
|
2957
2957
|
throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
|
|
@@ -2962,7 +2962,7 @@ async function Yo(t) {
|
|
|
2962
2962
|
try {
|
|
2963
2963
|
a = await navigator.credentials.get(i);
|
|
2964
2964
|
} catch (c) {
|
|
2965
|
-
throw
|
|
2965
|
+
throw Yo({ error: c, options: i });
|
|
2966
2966
|
}
|
|
2967
2967
|
if (!a)
|
|
2968
2968
|
throw new Error("Authentication was not completed");
|
|
@@ -2983,7 +2983,7 @@ async function Yo(t) {
|
|
|
2983
2983
|
};
|
|
2984
2984
|
}
|
|
2985
2985
|
const ut = Mt(null);
|
|
2986
|
-
function
|
|
2986
|
+
function Os({ children: t, config: e }) {
|
|
2987
2987
|
const [n, r] = x({
|
|
2988
2988
|
isAuthenticated: !1,
|
|
2989
2989
|
isLoading: !0,
|
|
@@ -2992,9 +2992,9 @@ function Is({ children: t, config: e }) {
|
|
|
2992
2992
|
});
|
|
2993
2993
|
C(() => {
|
|
2994
2994
|
(() => {
|
|
2995
|
-
const m = e.devLoginRunId, c = !!m &&
|
|
2996
|
-
m &&
|
|
2997
|
-
const u =
|
|
2995
|
+
const m = e.devLoginRunId, c = !!m && Io() === m;
|
|
2996
|
+
m && _o(m);
|
|
2997
|
+
const u = Lo();
|
|
2998
2998
|
if (u) {
|
|
2999
2999
|
Nt(), r({
|
|
3000
3000
|
isAuthenticated: !1,
|
|
@@ -3004,7 +3004,7 @@ function Is({ children: t, config: e }) {
|
|
|
3004
3004
|
});
|
|
3005
3005
|
return;
|
|
3006
3006
|
}
|
|
3007
|
-
const g =
|
|
3007
|
+
const g = No();
|
|
3008
3008
|
if (g) {
|
|
3009
3009
|
const b = {
|
|
3010
3010
|
token: g.token,
|
|
@@ -3083,7 +3083,7 @@ function Is({ children: t, config: e }) {
|
|
|
3083
3083
|
if (y === "passkey") {
|
|
3084
3084
|
r((c) => ({ ...c, isLoading: !0, error: null }));
|
|
3085
3085
|
try {
|
|
3086
|
-
const c = await
|
|
3086
|
+
const c = await Do(m), u = await Go({ optionsJSON: c }), g = await jo(m, u);
|
|
3087
3087
|
r({
|
|
3088
3088
|
isAuthenticated: !0,
|
|
3089
3089
|
isLoading: !1,
|
|
@@ -3101,7 +3101,7 @@ function Is({ children: t, config: e }) {
|
|
|
3101
3101
|
}
|
|
3102
3102
|
if (y === "email")
|
|
3103
3103
|
throw new Error("login('email') is not supported. Use requestEmailCode()/submitEmailCode() from useAuth() instead.");
|
|
3104
|
-
window.location.href =
|
|
3104
|
+
window.location.href = Po(y, e.spaceId, m);
|
|
3105
3105
|
},
|
|
3106
3106
|
[e.authUrl, e.spaceId]
|
|
3107
3107
|
), s = j(
|
|
@@ -3109,14 +3109,14 @@ function Is({ children: t, config: e }) {
|
|
|
3109
3109
|
if (!e.spaceId)
|
|
3110
3110
|
throw r((c) => ({ ...c, error: "Space ID is not configured" })), new Error("Space ID is not configured");
|
|
3111
3111
|
const m = await ve(e.authUrl);
|
|
3112
|
-
await
|
|
3112
|
+
await Oo({ email: y, spaceId: e.spaceId, authUrl: m });
|
|
3113
3113
|
},
|
|
3114
3114
|
[e.authUrl, e.spaceId]
|
|
3115
3115
|
), i = j(
|
|
3116
3116
|
async (y, m) => {
|
|
3117
3117
|
r((c) => ({ ...c, isLoading: !0, error: null }));
|
|
3118
3118
|
try {
|
|
3119
|
-
const c = await ve(e.authUrl), u = await
|
|
3119
|
+
const c = await ve(e.authUrl), u = await xo({ email: y, code: m, authUrl: c });
|
|
3120
3120
|
r({
|
|
3121
3121
|
isAuthenticated: !0,
|
|
3122
3122
|
isLoading: !1,
|
|
@@ -3141,7 +3141,7 @@ function Is({ children: t, config: e }) {
|
|
|
3141
3141
|
const m = await ve(e.authUrl);
|
|
3142
3142
|
r((c) => ({ ...c, isLoading: !0, error: null }));
|
|
3143
3143
|
try {
|
|
3144
|
-
const c = await
|
|
3144
|
+
const c = await Uo(m), u = await Wo({ optionsJSON: c }), g = await Mo(m, u, y);
|
|
3145
3145
|
r({
|
|
3146
3146
|
isAuthenticated: !0,
|
|
3147
3147
|
isLoading: !1,
|
|
@@ -3171,17 +3171,17 @@ function Is({ children: t, config: e }) {
|
|
|
3171
3171
|
);
|
|
3172
3172
|
return /* @__PURE__ */ w.jsx(ut, { value: f, children: t });
|
|
3173
3173
|
}
|
|
3174
|
-
function
|
|
3174
|
+
function zo() {
|
|
3175
3175
|
const t = st(ut);
|
|
3176
3176
|
if (!t)
|
|
3177
3177
|
throw new Error("useAuth must be used within an AuthProvider");
|
|
3178
3178
|
return t;
|
|
3179
3179
|
}
|
|
3180
|
-
function
|
|
3180
|
+
function Xo() {
|
|
3181
3181
|
return st(ut);
|
|
3182
3182
|
}
|
|
3183
|
-
function
|
|
3184
|
-
const { config: e, guestUrlParam: n } = t, { state: r, login: o } =
|
|
3183
|
+
function xs(t) {
|
|
3184
|
+
const { config: e, guestUrlParam: n } = t, { state: r, login: o } = zo(), s = E(!1);
|
|
3185
3185
|
return C(() => {
|
|
3186
3186
|
if (!n || r.isAuthenticated || r.isLoading || s.current || !e.methods.includes("guest"))
|
|
3187
3187
|
return;
|
|
@@ -3204,9 +3204,9 @@ const on = (() => {
|
|
|
3204
3204
|
} catch {
|
|
3205
3205
|
return !1;
|
|
3206
3206
|
}
|
|
3207
|
-
})(), sn = Date.now(), re = [],
|
|
3207
|
+
})(), sn = Date.now(), re = [], Ho = 300;
|
|
3208
3208
|
function Ie(t) {
|
|
3209
|
-
re.push(`[+${((Date.now() - sn) / 1e3).toFixed(1)}s] ${t}`), re.length >
|
|
3209
|
+
re.push(`[+${((Date.now() - sn) / 1e3).toFixed(1)}s] ${t}`), re.length > Ho && re.shift();
|
|
3210
3210
|
}
|
|
3211
3211
|
function Lt(t) {
|
|
3212
3212
|
if (typeof t == "string")
|
|
@@ -3242,7 +3242,7 @@ function an() {
|
|
|
3242
3242
|
}
|
|
3243
3243
|
}
|
|
3244
3244
|
on && an();
|
|
3245
|
-
function
|
|
3245
|
+
function qo() {
|
|
3246
3246
|
let t = !1;
|
|
3247
3247
|
try {
|
|
3248
3248
|
const e = URL.createObjectURL(new Blob([""]));
|
|
@@ -3253,11 +3253,11 @@ function Ho() {
|
|
|
3253
3253
|
}
|
|
3254
3254
|
return t;
|
|
3255
3255
|
}
|
|
3256
|
-
function
|
|
3256
|
+
function Jo() {
|
|
3257
3257
|
const t = globalThis;
|
|
3258
3258
|
return [
|
|
3259
3259
|
`Worker=${typeof Worker < "u"}`,
|
|
3260
|
-
`moduleWorker=${
|
|
3260
|
+
`moduleWorker=${qo()}`,
|
|
3261
3261
|
`WebSocket=${typeof WebSocket < "u"}`,
|
|
3262
3262
|
`WebTransport=${typeof t.WebTransport < "u"}`,
|
|
3263
3263
|
`RTCPeerConnection=${typeof RTCPeerConnection < "u"}`,
|
|
@@ -3270,7 +3270,7 @@ function qo() {
|
|
|
3270
3270
|
`online=${typeof navigator < "u" ? navigator.onLine : "?"}`
|
|
3271
3271
|
].join(" ");
|
|
3272
3272
|
}
|
|
3273
|
-
function
|
|
3273
|
+
function Zo(t) {
|
|
3274
3274
|
return /ERROR|error:|Rejection/.test(t) ? "#f88" : /WARN|warn:/.test(t) ? "#fc6" : "#9d9";
|
|
3275
3275
|
}
|
|
3276
3276
|
function cn({ state: t = "", forceVisible: e = !1 }) {
|
|
@@ -3311,12 +3311,12 @@ function cn({ state: t = "", forceVisible: e = !1 }) {
|
|
|
3311
3311
|
] }),
|
|
3312
3312
|
/* @__PURE__ */ w.jsx("div", { style: { color: "#9cf", wordBreak: "break-all", marginBottom: "4px" }, children: typeof window < "u" ? window.location.href : "" }),
|
|
3313
3313
|
/* @__PURE__ */ w.jsx("div", { style: { color: "#ff0", wordBreak: "break-all", marginBottom: "4px" }, children: typeof navigator < "u" ? navigator.userAgent : "no navigator" }),
|
|
3314
|
-
/* @__PURE__ */ w.jsx("div", { style: { color: "#8cf", marginBottom: "4px" }, children:
|
|
3314
|
+
/* @__PURE__ */ w.jsx("div", { style: { color: "#8cf", marginBottom: "4px" }, children: Jo() }),
|
|
3315
3315
|
/* @__PURE__ */ w.jsx("div", { style: { color: "#8cf", marginBottom: "10px" }, children: typeof window < "u" ? `viewport=${window.innerWidth}x${window.innerHeight} dpr=${window.devicePixelRatio}` : "" }),
|
|
3316
|
-
/* @__PURE__ */ w.jsx("div", { children: re.length === 0 ? "(nothing captured yet)" : re.map((l, h) => /* @__PURE__ */ w.jsx("div", { style: { color:
|
|
3316
|
+
/* @__PURE__ */ w.jsx("div", { children: re.length === 0 ? "(nothing captured yet)" : re.map((l, h) => /* @__PURE__ */ w.jsx("div", { style: { color: Zo(l), wordBreak: "break-all" }, children: l }, h)) })
|
|
3317
3317
|
] });
|
|
3318
3318
|
}
|
|
3319
|
-
function
|
|
3319
|
+
function Ns({
|
|
3320
3320
|
connectionState: t,
|
|
3321
3321
|
error: e,
|
|
3322
3322
|
isReady: n,
|
|
@@ -3369,16 +3369,16 @@ function xs({
|
|
|
3369
3369
|
] });
|
|
3370
3370
|
}
|
|
3371
3371
|
const Oe = oe("useIkonApp");
|
|
3372
|
-
function
|
|
3372
|
+
function Qo() {
|
|
3373
3373
|
if (typeof window < "u" && window.__IKON_AUTH_CONFIG__)
|
|
3374
3374
|
return window.__IKON_AUTH_CONFIG__;
|
|
3375
3375
|
}
|
|
3376
|
-
function
|
|
3376
|
+
function es() {
|
|
3377
3377
|
if (typeof window < "u" && window.__IKON_LOCAL_IKON_SERVER_CONFIG__)
|
|
3378
3378
|
return window.__IKON_LOCAL_IKON_SERVER_CONFIG__;
|
|
3379
3379
|
}
|
|
3380
|
-
function
|
|
3381
|
-
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 ?
|
|
3380
|
+
function Ls(t) {
|
|
3381
|
+
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 ? Qo() ?? null : e, u = es(), g = Xo(), 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), I = E(l), P = E(h), M = E(f), B = E(y), $ = E(m), V = E("local"), K = E(void 0);
|
|
3382
3382
|
T.current = o, U.current = r, ee.current = s, te.current = i, z.current = a, I.current = l, P.current = h, M.current = f, B.current = y, $.current = m;
|
|
3383
3383
|
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(() => {
|
|
3384
3384
|
try {
|
|
@@ -3442,11 +3442,11 @@ function Ns(t) {
|
|
|
3442
3442
|
}
|
|
3443
3443
|
};
|
|
3444
3444
|
}, [Ae, $e, Be, ce?.token, c?.spaceId, c?.backendUrl, c?.authUrl, ae, Fe, De, Y.sessionId, Y.channelKey, Y.parameters]);
|
|
3445
|
-
V.current = c?.spaceId ?? "local", K.current = ce?.token ?? ae ?? void 0,
|
|
3446
|
-
const hn =
|
|
3445
|
+
V.current = c?.spaceId ?? "local", K.current = ce?.token ?? ae ?? void 0, eo(ie);
|
|
3446
|
+
const hn = no(ie);
|
|
3447
3447
|
C(() => {
|
|
3448
3448
|
if (!R.current) {
|
|
3449
|
-
if (R.current = !0, S.current =
|
|
3449
|
+
if (R.current = !0, S.current = Gr(), n)
|
|
3450
3450
|
for (const _ of n)
|
|
3451
3451
|
_(S.current);
|
|
3452
3452
|
S.current.loadRegisteredModules().catch((_) => {
|
|
@@ -3476,21 +3476,21 @@ function Ns(t) {
|
|
|
3476
3476
|
}
|
|
3477
3477
|
});
|
|
3478
3478
|
p.current = _;
|
|
3479
|
-
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
|
|
3479
|
+
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 er({ client: _, liveSnapshot: gn, bootSnapshot: $.current });
|
|
3480
3480
|
b.current = ke, Me(ke), A(!1);
|
|
3481
3481
|
const yn = ke.subscribeToUiUpdates(() => {
|
|
3482
|
-
A(!0);
|
|
3482
|
+
A(!0), Nn();
|
|
3483
3483
|
});
|
|
3484
3484
|
return _.connect().catch((J) => {
|
|
3485
|
-
if (Oe.error("Connection failed:", J), J instanceof
|
|
3485
|
+
if (Oe.error("Connection failed:", J), J instanceof Ln) {
|
|
3486
3486
|
me(J.reason);
|
|
3487
3487
|
return;
|
|
3488
3488
|
}
|
|
3489
|
-
if (J instanceof
|
|
3489
|
+
if (J instanceof Pn) {
|
|
3490
3490
|
Q(!0);
|
|
3491
3491
|
return;
|
|
3492
3492
|
}
|
|
3493
|
-
J instanceof
|
|
3493
|
+
J instanceof Un && !v.current && (v.current = !0, Oe.warn("Auth session appears stale, clearing and retrying"), Ut.clearAll(), g ? g.logout() : (Le(), fn((bn) => bn + 1)));
|
|
3494
3494
|
}), () => {
|
|
3495
3495
|
yn(), _.disconnect(), p.current = null, ke.dispose(), b.current = null;
|
|
3496
3496
|
};
|
|
@@ -3530,7 +3530,7 @@ function Ns(t) {
|
|
|
3530
3530
|
webRtcTrackMap: p.current?.webRtcTrackMap ?? /* @__PURE__ */ new Map()
|
|
3531
3531
|
};
|
|
3532
3532
|
}
|
|
3533
|
-
function
|
|
3533
|
+
function Ps(t) {
|
|
3534
3534
|
const e = E(!1);
|
|
3535
3535
|
return j(() => {
|
|
3536
3536
|
if (e.current) return;
|
|
@@ -3539,8 +3539,8 @@ function Ls(t) {
|
|
|
3539
3539
|
n.rel = "stylesheet", n.href = t, document.head.appendChild(n);
|
|
3540
3540
|
}, [t]);
|
|
3541
3541
|
}
|
|
3542
|
-
let
|
|
3543
|
-
function
|
|
3542
|
+
let ts = 0;
|
|
3543
|
+
function ns(t = 5, e = 5e3) {
|
|
3544
3544
|
const [n, r] = x([]), o = E(/* @__PURE__ */ new Map()), s = j((i) => {
|
|
3545
3545
|
const a = o.current.get(i);
|
|
3546
3546
|
a && (clearTimeout(a), o.current.delete(i)), r((l) => l.filter((h) => h.id !== i));
|
|
@@ -3550,7 +3550,7 @@ function ts(t = 5, e = 5e3) {
|
|
|
3550
3550
|
(l) => {
|
|
3551
3551
|
if (!$t())
|
|
3552
3552
|
return;
|
|
3553
|
-
const h = `toast-${++
|
|
3553
|
+
const h = `toast-${++ts}`, f = l.level === Je.ERROR ? "error" : "warn", y = {
|
|
3554
3554
|
id: h,
|
|
3555
3555
|
level: f,
|
|
3556
3556
|
message: l.message,
|
|
@@ -3572,7 +3572,7 @@ function ts(t = 5, e = 5e3) {
|
|
|
3572
3572
|
};
|
|
3573
3573
|
}, [t, e, s]), { toasts: n, dismissToast: s };
|
|
3574
3574
|
}
|
|
3575
|
-
function
|
|
3575
|
+
function rs(t, e, n) {
|
|
3576
3576
|
const [r, o] = x(n);
|
|
3577
3577
|
return C(() => {
|
|
3578
3578
|
if (!t)
|
|
@@ -3589,7 +3589,7 @@ function ns(t, e, n) {
|
|
|
3589
3589
|
};
|
|
3590
3590
|
}, [t, e]), r;
|
|
3591
3591
|
}
|
|
3592
|
-
function
|
|
3592
|
+
function Us(t, e, n) {
|
|
3593
3593
|
const [r, o] = x(null);
|
|
3594
3594
|
return C(() => {
|
|
3595
3595
|
if (!t)
|
|
@@ -3602,17 +3602,17 @@ function Ps(t, e, n) {
|
|
|
3602
3602
|
}), () => {
|
|
3603
3603
|
s = !1;
|
|
3604
3604
|
};
|
|
3605
|
-
}, [t, e]),
|
|
3605
|
+
}, [t, e]), rs(r ? t : null, r ?? "", n);
|
|
3606
3606
|
}
|
|
3607
|
-
const ue = oe("IkonDebug"),
|
|
3607
|
+
const ue = oe("IkonDebug"), os = {
|
|
3608
3608
|
Digit1: "connecting",
|
|
3609
3609
|
Digit2: "connected",
|
|
3610
3610
|
Digit3: "reconnecting",
|
|
3611
3611
|
Digit4: "offline",
|
|
3612
3612
|
Digit5: "offline",
|
|
3613
3613
|
Digit0: "clear"
|
|
3614
|
-
},
|
|
3615
|
-
function
|
|
3614
|
+
}, ss = "Digit5", is = "Digit6", as = "Synthetic debug error (Ctrl+Shift+5)", cs = "Synthetic debug access-denied (Ctrl+Shift+6)", ls = 5e3;
|
|
3615
|
+
function us(t) {
|
|
3616
3616
|
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);
|
|
3617
3617
|
return C(() => {
|
|
3618
3618
|
if (!e)
|
|
@@ -3632,19 +3632,19 @@ function ls(t) {
|
|
|
3632
3632
|
S.preventDefault(), g((T) => (ue.warn(`Debug-overlay override: ${T ? "off" : "on"}`), !T));
|
|
3633
3633
|
return;
|
|
3634
3634
|
}
|
|
3635
|
-
if (S.code ===
|
|
3636
|
-
S.preventDefault(), h(
|
|
3635
|
+
if (S.code === is) {
|
|
3636
|
+
S.preventDefault(), h(cs), r(null), a(null), ue.warn("Forced access denied");
|
|
3637
3637
|
return;
|
|
3638
3638
|
}
|
|
3639
|
-
const R =
|
|
3639
|
+
const R = os[S.code];
|
|
3640
3640
|
if (R === void 0)
|
|
3641
3641
|
return;
|
|
3642
3642
|
if (S.preventDefault(), R === "clear") {
|
|
3643
3643
|
r(null), a(null), h(null), ue.warn("Cleared forced state");
|
|
3644
3644
|
return;
|
|
3645
3645
|
}
|
|
3646
|
-
const v = S.code ===
|
|
3647
|
-
r(R), a(v ?
|
|
3646
|
+
const v = S.code === ss;
|
|
3647
|
+
r(R), a(v ? as : null), h(null), ue.warn(`Forced state: ${R}${v ? " (with error)" : ""}`);
|
|
3648
3648
|
};
|
|
3649
3649
|
return window.addEventListener("keydown", b), () => window.removeEventListener("keydown", b);
|
|
3650
3650
|
}, [e]), C(() => {
|
|
@@ -3652,7 +3652,7 @@ function ls(t) {
|
|
|
3652
3652
|
s(!1);
|
|
3653
3653
|
return;
|
|
3654
3654
|
}
|
|
3655
|
-
const b = setTimeout(() => s(!0),
|
|
3655
|
+
const b = setTimeout(() => s(!0), ls);
|
|
3656
3656
|
return () => clearTimeout(b);
|
|
3657
3657
|
}, [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: {
|
|
3658
3658
|
...t,
|
|
@@ -3663,34 +3663,34 @@ function ls(t) {
|
|
|
3663
3663
|
accessDeniedReason: l ?? t.accessDeniedReason
|
|
3664
3664
|
}, forcedState: n, emptyStores: f, forcedError: i, forcedAccessDenied: l, forcedBranding: m, forcedDebugOverlay: u, debugEnabled: e };
|
|
3665
3665
|
}
|
|
3666
|
-
function
|
|
3666
|
+
function ds(t, e) {
|
|
3667
3667
|
return t === void 0 ? null : typeof t == "function" ? t(e) : t;
|
|
3668
3668
|
}
|
|
3669
|
-
function
|
|
3669
|
+
function fs(t) {
|
|
3670
3670
|
return t === void 0 ? null : typeof t == "function" ? t() : t;
|
|
3671
3671
|
}
|
|
3672
|
-
function
|
|
3672
|
+
function hs(t, e) {
|
|
3673
3673
|
return t === void 0 ? null : typeof t == "function" ? t(e) : t;
|
|
3674
3674
|
}
|
|
3675
|
-
function
|
|
3675
|
+
function ps(t, e) {
|
|
3676
3676
|
return t === void 0 ? null : typeof t == "function" ? t(e) : t;
|
|
3677
3677
|
}
|
|
3678
|
-
function
|
|
3679
|
-
const { connectingOverlay: e, reconnectingOverlay: n, offlineOverlay: r, accessDeniedScreen: o, ...s } = t, i =
|
|
3678
|
+
function Ms(t) {
|
|
3679
|
+
const { connectingOverlay: e, reconnectingOverlay: n, offlineOverlay: r, accessDeniedScreen: o, ...s } = t, i = us(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);
|
|
3680
3680
|
if (f && y && (u || f.size > 0) && (R.current = { stores: f, registry: y, client: m }), p)
|
|
3681
|
-
return
|
|
3681
|
+
return ps(o, p);
|
|
3682
3682
|
const v = R.current;
|
|
3683
3683
|
let T = null;
|
|
3684
3684
|
switch (l) {
|
|
3685
3685
|
case "waitingForExternalConnectUrl":
|
|
3686
3686
|
case "connecting":
|
|
3687
|
-
T =
|
|
3687
|
+
T = ds(e, h);
|
|
3688
3688
|
break;
|
|
3689
3689
|
case "reconnecting":
|
|
3690
|
-
T =
|
|
3690
|
+
T = fs(n);
|
|
3691
3691
|
break;
|
|
3692
3692
|
case "offline":
|
|
3693
|
-
T =
|
|
3693
|
+
T = hs(r, g);
|
|
3694
3694
|
break;
|
|
3695
3695
|
default:
|
|
3696
3696
|
T = null;
|
|
@@ -3706,18 +3706,18 @@ function Us(t) {
|
|
|
3706
3706
|
}
|
|
3707
3707
|
),
|
|
3708
3708
|
T,
|
|
3709
|
-
S && /* @__PURE__ */ w.jsx(
|
|
3710
|
-
/* @__PURE__ */ w.jsx(
|
|
3709
|
+
S && /* @__PURE__ */ w.jsx(gs, {}),
|
|
3710
|
+
/* @__PURE__ */ w.jsx(ys, {}),
|
|
3711
3711
|
/* @__PURE__ */ w.jsx(cn, { state: l, forceVisible: i.forcedDebugOverlay })
|
|
3712
3712
|
] });
|
|
3713
3713
|
}
|
|
3714
|
-
const
|
|
3715
|
-
function
|
|
3714
|
+
const ms = "https://ikonai.com";
|
|
3715
|
+
function gs() {
|
|
3716
3716
|
return /* @__PURE__ */ w.jsxs(
|
|
3717
3717
|
"a",
|
|
3718
3718
|
{
|
|
3719
3719
|
className: "ikon-branding-banner",
|
|
3720
|
-
href:
|
|
3720
|
+
href: ms,
|
|
3721
3721
|
target: "_blank",
|
|
3722
3722
|
rel: "noopener noreferrer",
|
|
3723
3723
|
style: {
|
|
@@ -3745,11 +3745,11 @@ function ms() {
|
|
|
3745
3745
|
}
|
|
3746
3746
|
);
|
|
3747
3747
|
}
|
|
3748
|
-
function
|
|
3749
|
-
const { toasts: t, dismissToast: e } =
|
|
3750
|
-
return t.length === 0 ? null : /* @__PURE__ */ w.jsx("div", { className: "ikon-toast-overlay", children: t.map((n) => /* @__PURE__ */ w.jsx(
|
|
3748
|
+
function ys() {
|
|
3749
|
+
const { toasts: t, dismissToast: e } = ns();
|
|
3750
|
+
return t.length === 0 ? null : /* @__PURE__ */ w.jsx("div", { className: "ikon-toast-overlay", children: t.map((n) => /* @__PURE__ */ w.jsx(bs, { toast: n, onDismiss: e }, n.id)) });
|
|
3751
3751
|
}
|
|
3752
|
-
function
|
|
3752
|
+
function bs({ toast: t, onDismiss: e }) {
|
|
3753
3753
|
return /* @__PURE__ */ w.jsxs(
|
|
3754
3754
|
"div",
|
|
3755
3755
|
{
|
|
@@ -3771,30 +3771,30 @@ function ys({ toast: t, onDismiss: e }) {
|
|
|
3771
3771
|
);
|
|
3772
3772
|
}
|
|
3773
3773
|
const ln = Mt(null);
|
|
3774
|
-
function
|
|
3774
|
+
function Ss(t, e) {
|
|
3775
3775
|
return e ? t.replace(/\{(\w+)\}/g, (n, r) => e[r] ?? `{${r}}`) : t;
|
|
3776
3776
|
}
|
|
3777
|
-
function
|
|
3778
|
-
const n =
|
|
3777
|
+
function ws(t, e) {
|
|
3778
|
+
const n = Mn();
|
|
3779
3779
|
if (n && t.includes(n))
|
|
3780
3780
|
return n;
|
|
3781
3781
|
const r = navigator.language.split("-")[0];
|
|
3782
3782
|
return t.includes(r) ? r : e && t.includes(e) ? e : "en";
|
|
3783
3783
|
}
|
|
3784
|
-
function
|
|
3785
|
-
return e ?
|
|
3784
|
+
function vs(t, e, n) {
|
|
3785
|
+
return e ? ws(t, n) : n && t.includes(n) ? n : "en";
|
|
3786
3786
|
}
|
|
3787
|
-
function
|
|
3787
|
+
function Ds({
|
|
3788
3788
|
children: t,
|
|
3789
3789
|
translations: e,
|
|
3790
3790
|
defaultLanguage: n,
|
|
3791
3791
|
detectLanguage: r = !1
|
|
3792
3792
|
}) {
|
|
3793
|
-
const o = Object.keys(e), s =
|
|
3793
|
+
const o = Object.keys(e), s = vs(o, r, n), i = e[s] ?? e.en, a = W(
|
|
3794
3794
|
() => ({
|
|
3795
3795
|
t: (l, h) => {
|
|
3796
3796
|
const f = i[l];
|
|
3797
|
-
return
|
|
3797
|
+
return Ss(f, h);
|
|
3798
3798
|
},
|
|
3799
3799
|
locale: s,
|
|
3800
3800
|
translations: i
|
|
@@ -3803,72 +3803,72 @@ function Ms({
|
|
|
3803
3803
|
);
|
|
3804
3804
|
return /* @__PURE__ */ w.jsx(ln, { value: a, children: t });
|
|
3805
3805
|
}
|
|
3806
|
-
function
|
|
3806
|
+
function js() {
|
|
3807
3807
|
const t = st(ln);
|
|
3808
3808
|
if (!t)
|
|
3809
3809
|
throw new Error("useI18n must be used within an I18nProvider");
|
|
3810
3810
|
return t;
|
|
3811
3811
|
}
|
|
3812
3812
|
export {
|
|
3813
|
-
|
|
3814
|
-
|
|
3813
|
+
Os as AuthProvider,
|
|
3814
|
+
Ns as ConnectionStateRenderer,
|
|
3815
3815
|
on as DEBUG_OVERLAY_ENABLED,
|
|
3816
3816
|
cn as DebugOverlay,
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3817
|
+
Ds as I18nProvider,
|
|
3818
|
+
pr as IKON_UI_BASE_MODULE,
|
|
3819
|
+
kr as IKON_UI_MEDIA_MODULE,
|
|
3820
|
+
Vr as IKON_UI_SHADERTOY_MODULE,
|
|
3821
|
+
Br as IKON_UI_SHADERTOY_TYPE,
|
|
3822
3822
|
Qe as IKON_UI_STREAM_CATEGORY,
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3823
|
+
vr as IKON_UI_VIDEO_CANVAS_TYPE,
|
|
3824
|
+
Er as IKON_UI_VIDEO_URL_PLAYER_TYPE,
|
|
3825
|
+
Ms as IkonApp,
|
|
3826
|
+
er as IkonUi,
|
|
3827
|
+
Yr as IkonUiRegistry,
|
|
3828
3828
|
Bt as IkonUiSurface,
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3829
|
+
Jn as InspectOverlay,
|
|
3830
|
+
_s as ParallaxView,
|
|
3831
|
+
qn as UiComponentRegistry,
|
|
3832
|
+
Hn as UiRenderer,
|
|
3833
|
+
Fs as UiStreamStore,
|
|
3834
3834
|
Qt as authenticateAnonymous,
|
|
3835
|
-
|
|
3835
|
+
Po as buildOAuthRedirectUrl,
|
|
3836
3836
|
Le as clearAuthSession,
|
|
3837
3837
|
Nt as clearOAuthParams,
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3838
|
+
hr as createBaseResolvers,
|
|
3839
|
+
ks as createComponentLibrary,
|
|
3840
|
+
Gr as createIkonUiRegistry,
|
|
3841
|
+
Ar as createMediaResolvers,
|
|
3842
|
+
Fr as createShadertoyRendererResolver,
|
|
3843
|
+
Qn as isIkonUiCategoryMatch,
|
|
3844
3844
|
Jt as loadAuthSession,
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3845
|
+
mr as loadBaseModule,
|
|
3846
|
+
Cr as loadMediaModule,
|
|
3847
|
+
Wr as loadShadertoyModule,
|
|
3848
|
+
No as parseOAuthCallback,
|
|
3849
|
+
Lo as parseOAuthError,
|
|
3850
|
+
Ws as randomUuid,
|
|
3851
|
+
gr as registerBaseModule,
|
|
3852
|
+
_r as registerMediaModule,
|
|
3853
|
+
Kr as registerShadertoyModule,
|
|
3854
|
+
zn as renderChildren,
|
|
3855
|
+
Is as renderMotionLetters,
|
|
3856
3856
|
he as saveAuthSession,
|
|
3857
|
-
|
|
3857
|
+
Oo as sendLoginCode,
|
|
3858
3858
|
ne as sessionToUser,
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3859
|
+
zo as useAuth,
|
|
3860
|
+
xs as useAuthGuard,
|
|
3861
|
+
Xo as useAuthOptional,
|
|
3862
|
+
js as useI18n,
|
|
3863
|
+
Ls as useIkonApp,
|
|
3864
|
+
us as useIkonDebug,
|
|
3865
|
+
rs as useIkonReactive,
|
|
3866
|
+
eo as useIkonStyles,
|
|
3867
|
+
no as useIkonUiStores,
|
|
3868
|
+
Ps as useLazyFont,
|
|
3869
|
+
Us as useReactive,
|
|
3870
|
+
ns as useToasts,
|
|
3871
3871
|
Z as useUiNode,
|
|
3872
|
-
|
|
3873
|
-
|
|
3872
|
+
Cs as useUiStore,
|
|
3873
|
+
xo as verifyLoginCode
|
|
3874
3874
|
};
|