@ikonai/sdk-react-ui 1.0.73 → 1.0.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +502 -475
  2. 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 Fs } 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";
2
+ import { UiStreamStore as Vs } from "@ikonai/sdk-ui";
3
+ import En, { useSyncExternalStore as ot, useMemo as V, 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
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";
5
+ import { randomUuid as Ys } from "@ikonai/sdk";
6
6
  var Ce = { exports: {} }, ge = {};
7
7
  /**
8
8
  * @license React
@@ -56,9 +56,9 @@ function jn() {
56
56
  switch (d) {
57
57
  case p:
58
58
  return "Fragment";
59
- case S:
60
- return "Profiler";
61
59
  case b:
60
+ return "Profiler";
61
+ case S:
62
62
  return "StrictMode";
63
63
  case U:
64
64
  return "Suspense";
@@ -71,7 +71,7 @@ function jn() {
71
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
- case g:
74
+ case y:
75
75
  return "Portal";
76
76
  case v:
77
77
  return d.displayName || "Context";
@@ -193,13 +193,13 @@ function jn() {
193
193
  if (N)
194
194
  if ($(L)) {
195
195
  for (N = 0; N < L.length; N++)
196
- y(L[N]);
196
+ g(L[N]);
197
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(L);
202
+ else g(L);
203
203
  if (B.call(A, "key")) {
204
204
  L = t(d);
205
205
  var Q = Object.keys(A).filter(function(Me) {
@@ -235,13 +235,13 @@ React keys must be passed directly to JSX without using spread:
235
235
  me
236
236
  );
237
237
  }
238
- function y(d) {
238
+ function g(d) {
239
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
241
  function m(d) {
242
242
  return typeof d == "object" && d !== null && d.$$typeof === u;
243
243
  }
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"), I = 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() {
244
+ var c = En, u = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), b = 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"), I = 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, W = console.createTask ? console.createTask : function() {
245
245
  return null;
246
246
  };
247
247
  c = {
@@ -252,7 +252,7 @@ React keys must be passed directly to JSX without using spread:
252
252
  var K, H = {}, Ee = c.react_stack_bottom_frame.bind(
253
253
  c,
254
254
  s
255
- )(), Re = V(r(s)), pe = {};
255
+ )(), Re = W(r(s)), pe = {};
256
256
  ye.Fragment = p, ye.jsx = function(d, A, O) {
257
257
  var N = 1e4 > M.recentlyCreatedOwnerStacks++;
258
258
  return f(
@@ -261,7 +261,7 @@ React keys must be passed directly to JSX without using spread:
261
261
  O,
262
262
  !1,
263
263
  N ? Error("react-stack-top-frame") : Ee,
264
- N ? V(r(d)) : Re
264
+ N ? W(r(d)) : Re
265
265
  );
266
266
  }, ye.jsxs = function(d, A, O) {
267
267
  var N = 1e4 > M.recentlyCreatedOwnerStacks++;
@@ -271,7 +271,7 @@ React keys must be passed directly to JSX without using spread:
271
271
  O,
272
272
  !0,
273
273
  N ? Error("react-stack-top-frame") : Ee,
274
- N ? V(r(d)) : Re
274
+ N ? W(r(d)) : Re
275
275
  );
276
276
  };
277
277
  })()), ye;
@@ -293,7 +293,7 @@ function Bn(t, e) {
293
293
  return `${o ?? ""}:${s?.id ?? ""}`;
294
294
  }
295
295
  );
296
- return W(() => {
296
+ return V(() => {
297
297
  const [r, o] = n.split(":");
298
298
  return {
299
299
  rootViewId: r || void 0,
@@ -307,10 +307,10 @@ function Z(t, e) {
307
307
  () => t.getNodeVersion(e),
308
308
  () => t.getNodeVersion(e)
309
309
  );
310
- return W(() => t.getNode(e), [t, e, n]);
310
+ return V(() => t.getNode(e), [t, e, n]);
311
311
  }
312
312
  const Fn = oe("UIRenderer");
313
- function Vn(t) {
313
+ function Wn(t) {
314
314
  if (t === void 0)
315
315
  return "{}";
316
316
  if (typeof t == "string")
@@ -321,7 +321,7 @@ function Vn(t) {
321
321
  return "{}";
322
322
  }
323
323
  }
324
- function Wn(t) {
324
+ function Vn(t) {
325
325
  const e = t.styleIds;
326
326
  return Array.isArray(e) ? e : [];
327
327
  }
@@ -341,8 +341,8 @@ function Gn(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 ? Kn(r) : [], s = Gn(o), i = W(
345
- () => o.length === 0 ? null : o.map((y) => /* @__PURE__ */ w.jsx(t, { nodeId: y.id, context: n }, y.id)),
344
+ const r = Z(n.store, e), o = r ? Kn(r) : [], s = Gn(o), i = V(
345
+ () => o.length === 0 ? null : o.map((g) => /* @__PURE__ */ w.jsx(t, { nodeId: g.id, context: n }, g.id)),
346
346
  // eslint-disable-next-line react-hooks/exhaustive-deps
347
347
  [s, n]
348
348
  );
@@ -353,7 +353,7 @@ const Ze = G(function t({ nodeId: e, context: n }) {
353
353
  const a = n.library.resolve(r);
354
354
  if (!a)
355
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;
356
+ const l = Vn(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
358
  }, Yn);
359
359
  function zn(t, e) {
@@ -365,37 +365,37 @@ function Xn(t, e) {
365
365
  const Hn = G(function({ store: e, library: n, viewId: r, emptyFallback: o = null, onAction: s, client: i, video: a }) {
366
366
  const { rootViewId: l, rootNodeId: h } = Bn(e, r), f = E(s);
367
367
  f.current = s;
368
- const y = E(i);
369
- y.current = i;
368
+ const g = E(i);
369
+ g.current = i;
370
370
  const m = E(a);
371
371
  m.current = a;
372
- const c = j((g, p) => {
373
- if (!g)
372
+ const c = j((y, p) => {
373
+ if (!y)
374
374
  return;
375
- const b = Vn(p);
376
- f.current?.(g, b);
377
- }, []), u = W(() => {
378
- const g = {
375
+ const S = Wn(p);
376
+ f.current?.(y, S);
377
+ }, []), u = V(() => {
378
+ const y = {
379
379
  store: e,
380
380
  library: n,
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) => zn(p, g),
384
+ renderChildren: (p) => zn(p, y),
385
385
  renderView: (p) => {
386
- const b = e.getSnapshot().views.get(p);
387
- return b ? /* @__PURE__ */ w.jsx(Ze, { nodeId: b.id, context: g }) : null;
386
+ const S = e.getSnapshot().views.get(p);
387
+ return S ? /* @__PURE__ */ w.jsx(Ze, { nodeId: S.id, context: y }) : null;
388
388
  },
389
389
  dispatchAction: c,
390
390
  // Access client/video via refs to avoid context recreation
391
391
  get client() {
392
- return y.current;
392
+ return g.current;
393
393
  },
394
394
  get video() {
395
395
  return m.current;
396
396
  }
397
397
  };
398
- return g;
398
+ return y;
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
401
  }, Xn);
@@ -416,11 +416,11 @@ class qn {
416
416
  return this.renderers.get(e.type) ?? this.fallback;
417
417
  }
418
418
  }
419
- function ks(t, e) {
419
+ function _s(t, e) {
420
420
  const n = Object.entries(t);
421
421
  return new qn(n, e);
422
422
  }
423
- function Cs(t) {
423
+ function Is(t) {
424
424
  return ot(
425
425
  (e) => t.subscribe(e),
426
426
  () => t.getSnapshot(),
@@ -439,13 +439,13 @@ function Jn() {
439
439
  n && !r.includes(n) && (n.style.outline = "", n.style.outlineOffset = ""), n = null, o.style.display = "none";
440
440
  }
441
441
  function i(c) {
442
- for (const g of r)
443
- g !== n && (g.style.outline = "", g.style.outlineOffset = "");
442
+ for (const y of r)
443
+ y !== n && (y.style.outline = "", y.style.outlineOffset = "");
444
444
  r = [];
445
445
  const u = new Set(c);
446
- for (const g of Array.from(document.querySelectorAll("[data-ikon-source]"))) {
447
- const p = g.getAttribute("data-ikon-source") ?? "";
448
- u.has(p) && (g.style.outline = "2px solid #a6e3a1", g.style.outlineOffset = "1px", r.push(g));
446
+ for (const y of Array.from(document.querySelectorAll("[data-ikon-source]"))) {
447
+ const p = y.getAttribute("data-ikon-source") ?? "";
448
+ u.has(p) && (y.style.outline = "2px solid #a6e3a1", y.style.outlineOffset = "1px", r.push(y));
449
449
  }
450
450
  }
451
451
  function a(c) {
@@ -455,8 +455,8 @@ function Jn() {
455
455
  if (!u || u === n)
456
456
  return;
457
457
  s(), n = u, n.style.outline = "2px solid #89b4fa", n.style.outlineOffset = "1px";
458
- const g = u.getAttribute("data-ikon-source") ?? "";
459
- o.textContent = g, o.style.display = "block";
458
+ const y = u.getAttribute("data-ikon-source") ?? "";
459
+ o.textContent = y, o.style.display = "block";
460
460
  const p = u.getBoundingClientRect();
461
461
  o.style.left = `${p.left}px`, o.style.top = `${Math.max(0, p.top - 24)}px`;
462
462
  }
@@ -472,24 +472,24 @@ function Jn() {
472
472
  if (!u)
473
473
  return;
474
474
  c.preventDefault(), c.stopPropagation();
475
- const g = {
475
+ const y = {
476
476
  sourceMarker: u.getAttribute("data-ikon-source") ?? "",
477
477
  tagName: u.tagName.toLowerCase(),
478
478
  textContent: (u.textContent ?? "").trim().substring(0, 200)
479
479
  };
480
- window.dispatchEvent(new CustomEvent("ikon-inspect-select", { detail: g })), window.parent.postMessage({ type: "ikon-element-selected", payload: g }, "*");
480
+ window.dispatchEvent(new CustomEvent("ikon-inspect-select", { detail: y })), window.parent.postMessage({ type: "ikon-element-selected", payload: y }, "*");
481
481
  }
482
482
  function f(c, u) {
483
483
  return document.elementFromPoint(c, u)?.closest?.("[data-ikon-source]");
484
484
  }
485
- function y(c) {
485
+ function g(c) {
486
486
  if (c === n || (s(), !c))
487
487
  return;
488
488
  n = c, n.style.outline = `2px solid ${r.includes(c) ? "#a6e3a1" : "#89b4fa"}`, n.style.outlineOffset = "1px";
489
489
  const u = c.getAttribute("data-ikon-source") ?? "";
490
490
  o.textContent = u, o.style.display = "block";
491
- const g = c.getBoundingClientRect();
492
- o.style.left = `${g.left}px`, o.style.top = `${Math.max(0, g.top - 24)}px`;
491
+ const y = c.getBoundingClientRect();
492
+ o.style.left = `${y.left}px`, o.style.top = `${Math.max(0, y.top - 24)}px`;
493
493
  }
494
494
  function m(c) {
495
495
  if (c.data?.type === "ikon-inspect-mode") {
@@ -499,43 +499,43 @@ function Jn() {
499
499
  }
500
500
  if (c.data?.type === "ikon-inspect-at") {
501
501
  const u = f(c.data.x, c.data.y);
502
- y(u);
503
- const g = u?.getAttribute("data-ikon-source") ?? "";
502
+ g(u);
503
+ const y = u?.getAttribute("data-ikon-source") ?? "";
504
504
  window.parent.postMessage({
505
505
  type: "ikon-inspect-hover-result",
506
- payload: { sourceMarker: g }
506
+ payload: { sourceMarker: y }
507
507
  }, "*");
508
508
  }
509
509
  if (c.data?.type === "ikon-inspect-click") {
510
510
  const u = f(c.data.x, c.data.y);
511
511
  if (u) {
512
- const g = {
512
+ const y = {
513
513
  sourceMarker: u.getAttribute("data-ikon-source") ?? "",
514
514
  tagName: u.tagName.toLowerCase(),
515
515
  textContent: (u.textContent ?? "").trim().substring(0, 200)
516
516
  };
517
- window.dispatchEvent(new CustomEvent("ikon-inspect-select", { detail: g })), window.parent.postMessage({ type: "ikon-element-selected", payload: g }, "*");
517
+ window.dispatchEvent(new CustomEvent("ikon-inspect-select", { detail: y })), window.parent.postMessage({ type: "ikon-element-selected", payload: y }, "*");
518
518
  }
519
519
  }
520
520
  if (c.data?.type === "ikon-inspect-click-add") {
521
521
  const u = f(c.data.x, c.data.y);
522
522
  if (u) {
523
- const g = {
523
+ const y = {
524
524
  sourceMarker: u.getAttribute("data-ikon-source") ?? "",
525
525
  tagName: u.tagName.toLowerCase(),
526
526
  textContent: (u.textContent ?? "").trim().substring(0, 200)
527
527
  };
528
528
  window.parent.postMessage({
529
529
  type: "ikon-inspect-rect-result",
530
- payload: { elements: [g], append: !0 }
530
+ payload: { elements: [y], append: !0 }
531
531
  }, "*");
532
532
  }
533
533
  }
534
534
  if (c.data?.type === "ikon-inspect-rect") {
535
- const { x1: u, y1: g, x2: p, y2: b, append: S } = c.data, R = document.querySelectorAll("[data-ikon-source]"), v = [];
535
+ const { x1: u, y1: y, x2: p, y2: S, append: b } = 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 < b && v.push({
538
+ U.right > u && U.left < p && U.bottom > y && U.top < S && 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,7 +543,7 @@ function Jn() {
543
543
  }
544
544
  v.length > 0 && window.parent.postMessage({
545
545
  type: "ikon-inspect-rect-result",
546
- payload: { elements: v, append: S ?? !1 }
546
+ payload: { elements: v, append: b ?? !1 }
547
547
  }, "*");
548
548
  }
549
549
  c.data?.type === "ikon-inspect-highlight" && i(c.data.markers ?? []), c.data?.type === "ikon-inspect-clear" && s();
@@ -558,25 +558,25 @@ 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 }) {
561
- const i = W(() => Array.from(e.keys()).sort().join(","), [e]), a = E(o);
561
+ const i = V(() => 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 h = W(
565
+ const h = V(
566
566
  () => {
567
567
  const m = [];
568
568
  for (const [c, u] of e) {
569
- const g = u.store.getSnapshot();
570
- Qn(u.category, r) && (!g.rootViewId || !g.views.has(g.rootViewId) || m.push({ key: c, store: u.store }));
569
+ const y = u.store.getSnapshot();
570
+ Qn(u.category, r) && (!y.rootViewId || !y.views.has(y.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
- ), f = E(!1), y = h.length > 0;
576
+ ), f = E(!1), g = h.length > 0;
577
577
  return C(() => {
578
- y && !f.current && (f.current = !0, Zn.debug("First UI render"));
579
- }, [y]), y ? /* @__PURE__ */ w.jsxs(w.Fragment, { children: [
578
+ g && !f.current && (f.current = !0, Zn.debug("First UI render"));
579
+ }, [g]), g ? /* @__PURE__ */ w.jsxs(w.Fragment, { children: [
580
580
  /* @__PURE__ */ w.jsx(Jn, {}),
581
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;
@@ -710,6 +710,22 @@ function it(...t) {
710
710
  return e || void 0;
711
711
  }
712
712
  const St = /* @__PURE__ */ new WeakMap(), nr = {};
713
+ function rr(t) {
714
+ const e = {};
715
+ for (const n of t.split(";")) {
716
+ const r = n.indexOf(":");
717
+ if (r <= 0) continue;
718
+ const o = n.slice(0, r).trim(), s = n.slice(r + 1).trim();
719
+ if (!o || !s) continue;
720
+ const i = o.startsWith("--") ? o : o.replace(/-([a-z])/g, (a, l) => l.toUpperCase());
721
+ e[i] = s;
722
+ }
723
+ return e;
724
+ }
725
+ function or(t, e) {
726
+ const n = t && typeof t == "object" ? t : void 0;
727
+ return e ? { ...n ?? {}, cursor: e } : n;
728
+ }
713
729
  function at(t) {
714
730
  if (!t)
715
731
  return nr;
@@ -718,10 +734,16 @@ function at(t) {
718
734
  return e;
719
735
  const n = {};
720
736
  for (const [r, o] of Object.entries(t))
721
- o != null && (typeof o == "string" || typeof o == "number" || typeof o == "boolean") && (n[r] = o);
737
+ if (o != null) {
738
+ if (r === "style" && typeof o == "string") {
739
+ n[r] = rr(o);
740
+ continue;
741
+ }
742
+ (typeof o == "string" || typeof o == "number" || typeof o == "boolean") && (n[r] = o);
743
+ }
722
744
  return St.set(t, n), n;
723
745
  }
724
- function rr(t) {
746
+ function sr(t) {
725
747
  let e = t.parentElement;
726
748
  for (; e; ) {
727
749
  const r = window.getComputedStyle(e).overflowY;
@@ -732,26 +754,26 @@ function rr(t) {
732
754
  return null;
733
755
  }
734
756
  const Ft = 1.5;
735
- function Vt(t, e) {
757
+ function Wt(t, e) {
736
758
  requestAnimationFrame(() => {
737
759
  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";
738
760
  "scrollBehavior" in document.documentElement.style ? t.scrollTo({ top: o, behavior: i }) : t.scrollTop = o;
739
761
  });
740
762
  }
741
- const et = "data-ikon-scroll-indicator", or = 0.15, xe = "data-ikon-at-bottom";
742
- function Wt(t) {
743
- return Math.max(t.clientHeight * or, 20);
763
+ const et = "data-ikon-scroll-indicator", ir = 0.15, xe = "data-ikon-at-bottom";
764
+ function Vt(t) {
765
+ return Math.max(t.clientHeight * ir, 20);
744
766
  }
745
- function sr(t) {
767
+ function ar(t) {
746
768
  return t.getAttribute(xe) !== "false";
747
769
  }
748
- function ir(t) {
770
+ function cr(t) {
749
771
  t.getAttribute(xe) === null && (t.setAttribute(xe, "true"), t.addEventListener("scroll", () => {
750
- const { scrollTop: e, scrollHeight: n, clientHeight: r } = t, s = n - e - r <= Wt(t);
772
+ const { scrollTop: e, scrollHeight: n, clientHeight: r } = t, s = n - e - r <= Vt(t);
751
773
  t.setAttribute(xe, s ? "true" : "false");
752
774
  }, { passive: !0 }));
753
775
  }
754
- function ar(t) {
776
+ function lr(t) {
755
777
  const e = t.parentElement ?? t, n = e.querySelector(`[${et}]`);
756
778
  if (n)
757
779
  return n;
@@ -784,22 +806,22 @@ function ar(t) {
784
806
  r.style.opacity = "0.9";
785
807
  }), e.appendChild(r), r;
786
808
  }
787
- function cr(t, e) {
788
- const n = ar(t);
809
+ function ur(t, e) {
810
+ const n = lr(t);
789
811
  n.style.display = "flex";
790
812
  const r = () => {
791
- Vt(t, e), n.style.display = "none";
813
+ Wt(t, e), n.style.display = "none";
792
814
  }, o = () => {
793
815
  const { scrollTop: s, scrollHeight: i, clientHeight: a } = t;
794
- i - s - a <= Wt(t) && (n.style.display = "none");
816
+ i - s - a <= Vt(t) && (n.style.display = "none");
795
817
  };
796
818
  return n.addEventListener("click", r), t.addEventListener("scroll", o, { passive: !0 }), () => {
797
819
  n.removeEventListener("click", r), t.removeEventListener("scroll", o);
798
820
  };
799
821
  }
800
- function lr() {
822
+ function dr() {
801
823
  const t = G(function({ nodeId: n, context: r }) {
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;
824
+ 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), g = o?.props?.preciseGeneratedAt;
803
825
  return C(() => {
804
826
  if (typeof document > "u")
805
827
  return;
@@ -808,13 +830,13 @@ function lr() {
808
830
  return;
809
831
  let u;
810
832
  if (l !== !0) {
811
- const S = rr(c);
812
- if (S)
813
- if (ir(S), h === "Polite" && !sr(S))
814
- u = cr(S, c);
833
+ const b = sr(c);
834
+ if (b)
835
+ if (cr(b), h === "Polite" && !ar(b))
836
+ u = ur(b, c);
815
837
  else {
816
- const U = (S.parentElement ?? S).querySelector(`[${et}]`);
817
- U && (U.style.display = "none"), Vt(S, c);
838
+ const U = (b.parentElement ?? b).querySelector(`[${et}]`);
839
+ U && (U.style.display = "none"), Wt(b, c);
818
840
  }
819
841
  else typeof c.scrollIntoView == "function" && requestAnimationFrame(() => {
820
842
  const R = c.getBoundingClientRect().top, v = typeof window < "u" ? window.innerHeight : 0, T = Math.abs(R) > v * Ft ? "auto" : "smooth";
@@ -833,7 +855,7 @@ function lr() {
833
855
  c.focus();
834
856
  }
835
857
  return u;
836
- }, [l, h, i, f, y]), o ? /* @__PURE__ */ w.jsx(
858
+ }, [l, h, i, f, g]), o ? /* @__PURE__ */ w.jsx(
837
859
  "span",
838
860
  {
839
861
  ref: s,
@@ -850,7 +872,7 @@ function lr() {
850
872
  return t;
851
873
  };
852
874
  }
853
- function ur() {
875
+ function fr() {
854
876
  const t = G(function({ nodeId: n, context: r, className: o }) {
855
877
  const s = Z(r.store, n), i = tr(s?.props?.onInvokeId), a = j(() => {
856
878
  i && r.dispatchAction(i);
@@ -868,7 +890,12 @@ function ur() {
868
890
  "data-ikon-source": s.sourceMarker,
869
891
  className: h,
870
892
  onClick: i ? a : void 0,
871
- style: i ? { cursor: "pointer" } : void 0,
893
+ role: i && !l.role ? "button" : l.role,
894
+ tabIndex: i && l.tabIndex === void 0 ? 0 : l.tabIndex,
895
+ onKeyDown: i ? (g) => {
896
+ (g.key === "Enter" || g.key === " ") && (g.preventDefault(), a());
897
+ } : void 0,
898
+ style: or(l.style, i ? "pointer" : void 0),
872
899
  children: f
873
900
  }
874
901
  );
@@ -878,7 +905,7 @@ function ur() {
878
905
  return t;
879
906
  };
880
907
  }
881
- function dr() {
908
+ function hr() {
882
909
  const t = G(function({ nodeId: n, context: r, className: o }) {
883
910
  const s = Z(r.store, n);
884
911
  if (!s)
@@ -891,7 +918,7 @@ function dr() {
891
918
  return t;
892
919
  };
893
920
  }
894
- function fr() {
921
+ function pr() {
895
922
  const t = G(function({ nodeId: n, context: r, className: o }) {
896
923
  const s = Z(r.store, n);
897
924
  if (!s)
@@ -904,19 +931,19 @@ function fr() {
904
931
  return t;
905
932
  };
906
933
  }
907
- function hr() {
934
+ function mr() {
908
935
  return [
909
- ur(),
910
- dr(),
911
936
  fr(),
912
- lr()
937
+ hr(),
938
+ pr(),
939
+ dr()
913
940
  ];
914
941
  }
915
- const pr = "base", mr = async () => hr();
916
- function gr(t) {
917
- t.registerModule(pr, mr);
942
+ const gr = "base", yr = async () => mr();
943
+ function br(t) {
944
+ t.registerModule(gr, yr);
918
945
  }
919
- function yr(t) {
946
+ function Sr(t) {
920
947
  if (typeof t == "string") {
921
948
  const e = t.trim();
922
949
  return e.length > 0 ? e : void 0;
@@ -926,7 +953,7 @@ function yr(t) {
926
953
  return e.length > 0 ? e.join(" ") : void 0;
927
954
  }
928
955
  }
929
- function br(...t) {
956
+ function wr(...t) {
930
957
  const e = [];
931
958
  for (const n of t)
932
959
  n && n.trim() && e.push(n.trim());
@@ -947,8 +974,8 @@ function _e(t) {
947
974
  if (e === "false") return !1;
948
975
  }
949
976
  }
950
- const Sr = "std.audio-url-player";
951
- function wr() {
977
+ const vr = "std.audio-url-player";
978
+ function Er() {
952
979
  const t = G(function({
953
980
  nodeId: n,
954
981
  context: r,
@@ -960,14 +987,14 @@ function wr() {
960
987
  });
961
988
  }, [a, l]), !s)
962
989
  return null;
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);
990
+ const h = wr(Sr(s.props?.className), o), f = wt(s.props?.preload), g = _e(s.props?.controls), m = _e(s.props?.loop), c = _e(s.props?.muted);
964
991
  return /* @__PURE__ */ w.jsx(
965
992
  "audio",
966
993
  {
967
994
  ref: i,
968
995
  src: l,
969
996
  ...f !== void 0 ? { preload: f } : {},
970
- ...y !== void 0 ? { controls: y } : {},
997
+ ...g !== void 0 ? { controls: g } : {},
971
998
  ...a !== void 0 ? { autoPlay: a } : {},
972
999
  ...m !== void 0 ? { loop: m } : {},
973
1000
  ...c !== void 0 ? { muted: c } : {},
@@ -978,7 +1005,7 @@ function wr() {
978
1005
  );
979
1006
  });
980
1007
  return ({ type: e }) => {
981
- if (e === Sr)
1008
+ if (e === vr)
982
1009
  return t;
983
1010
  };
984
1011
  }
@@ -1013,33 +1040,33 @@ function tt(t) {
1013
1040
  const e = t.trim();
1014
1041
  return e.length > 0 ? e : void 0;
1015
1042
  }
1016
- const vr = "std.video-canvas", Er = "std.video-url-player";
1017
- function Rr() {
1043
+ const Rr = "std.video-canvas", Ar = "std.video-url-player";
1044
+ function Tr() {
1018
1045
  const t = G(function({ nodeId: n, context: r, className: o }) {
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);
1046
+ 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, g = 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
1047
  C(() => {
1021
1048
  if (!h?.isWebRtcEnabled) return;
1022
1049
  const p = h.onWebRtcTrackMapChanged;
1023
- return h.onWebRtcTrackMapChanged = (b) => {
1024
- p?.(b), b.kind === "video" && u((S) => S + 1);
1050
+ return h.onWebRtcTrackMapChanged = (S) => {
1051
+ p?.(S), S.kind === "video" && u((b) => b + 1);
1025
1052
  }, () => {
1026
1053
  h.onWebRtcTrackMapChanged = p;
1027
1054
  };
1028
1055
  }, [h]);
1029
- const g = h?.isWebRtcEnabled && f ? h.getWebRtcVideoStreamByStreamId(f) : null;
1056
+ const y = h?.isWebRtcEnabled && f ? h.getWebRtcVideoStreamByStreamId(f) : null;
1030
1057
  return C(() => {
1031
1058
  const p = i.current;
1032
- if (!(!l || !p || !f || g))
1059
+ if (!(!l || !p || !f || y))
1033
1060
  return l.attachCanvas(f, p), () => {
1034
1061
  l.detachCanvas(f);
1035
1062
  };
1036
- }, [l, f, g]), C(() => {
1063
+ }, [l, f, y]), C(() => {
1037
1064
  const p = a.current;
1038
- if (!(!p || !g))
1039
- return p.srcObject = g, () => {
1065
+ if (!(!p || !y))
1066
+ return p.srcObject = y, () => {
1040
1067
  p.srcObject = null;
1041
1068
  };
1042
- }, [g]), s ? g ? /* @__PURE__ */ w.jsx(
1069
+ }, [y]), s ? y ? /* @__PURE__ */ w.jsx(
1043
1070
  "video",
1044
1071
  {
1045
1072
  ref: a,
@@ -1050,7 +1077,7 @@ function Rr() {
1050
1077
  "data-ikon-source": s.sourceMarker,
1051
1078
  "data-ikon-video-stream-id": f,
1052
1079
  className: c,
1053
- ...y ? { width: y } : {},
1080
+ ...g ? { width: g } : {},
1054
1081
  ...m ? { height: m } : {}
1055
1082
  },
1056
1083
  f
@@ -1062,19 +1089,19 @@ function Rr() {
1062
1089
  "data-ikon-source": s.sourceMarker,
1063
1090
  "data-ikon-video-stream-id": f,
1064
1091
  className: c,
1065
- ...y ? { width: y } : {},
1092
+ ...g ? { width: g } : {},
1066
1093
  ...m ? { height: m } : {}
1067
1094
  },
1068
1095
  f
1069
1096
  ) : null;
1070
1097
  });
1071
1098
  return ({ type: e }) => {
1072
- if (e === vr)
1099
+ if (e === Rr)
1073
1100
  return t;
1074
1101
  };
1075
1102
  }
1076
- function Ar() {
1077
- return [Rr(), Tr(), wr()];
1103
+ function kr() {
1104
+ return [Tr(), Cr(), Er()];
1078
1105
  }
1079
1106
  function be(t) {
1080
1107
  if (typeof t == "boolean")
@@ -1085,7 +1112,7 @@ function be(t) {
1085
1112
  if (e === "false") return !1;
1086
1113
  }
1087
1114
  }
1088
- function Tr() {
1115
+ function Cr() {
1089
1116
  const t = G(function({
1090
1117
  nodeId: n,
1091
1118
  context: r,
@@ -1097,49 +1124,49 @@ function Tr() {
1097
1124
  });
1098
1125
  }, [a, l]), !s)
1099
1126
  return null;
1100
- 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;
1127
+ const h = Yt(Kt(s.props?.className), o), f = tt(s.props?.poster), g = be(s.props?.controls), m = be(s.props?.loop), c = be(s.props?.muted), u = be(s.props?.playsInline), y = Ne(s.props?.width), p = Ne(s.props?.height), S = s.children?.length ? r.renderChildren(s.children) : void 0;
1101
1128
  return /* @__PURE__ */ w.jsx(
1102
1129
  "video",
1103
1130
  {
1104
1131
  ref: i,
1105
1132
  src: l,
1106
1133
  poster: f,
1107
- ...y !== void 0 ? { controls: y } : {},
1134
+ ...g !== void 0 ? { controls: g } : {},
1108
1135
  ...a !== void 0 ? { autoPlay: a } : {},
1109
1136
  ...m !== void 0 ? { loop: m } : {},
1110
1137
  ...c !== void 0 ? { muted: c } : {},
1111
1138
  ...u !== void 0 ? { playsInline: u } : {},
1112
- ...g ? { width: g } : {},
1139
+ ...y ? { width: y } : {},
1113
1140
  ...p ? { height: p } : {},
1114
1141
  "data-ikon-node-id": s.id,
1115
1142
  "data-ikon-source": s.sourceMarker,
1116
1143
  className: h,
1117
- children: b
1144
+ children: S
1118
1145
  }
1119
1146
  );
1120
1147
  });
1121
1148
  return ({ type: e }) => {
1122
- if (e === Er)
1149
+ if (e === Ar)
1123
1150
  return t;
1124
1151
  };
1125
1152
  }
1126
- const kr = "media", Cr = async () => Ar();
1127
- function _r(t) {
1128
- t.registerModule(kr, Cr);
1153
+ const _r = "media", Ir = async () => kr();
1154
+ function Or(t) {
1155
+ t.registerModule(_r, Ir);
1129
1156
  }
1130
- const Ir = `#version 300 es
1157
+ const xr = `#version 300 es
1131
1158
  in vec4 a_position;
1132
1159
  void main() {
1133
1160
  gl_Position = a_position;
1134
1161
  }
1135
1162
  `, le = 4;
1136
- function Or(t, e) {
1163
+ function Nr(t, e) {
1137
1164
  return new RegExp(`\\buniform\\s+\\w+\\s+${e}\\s*;`, "g").test(t);
1138
1165
  }
1139
- function xr(t, e) {
1166
+ function Lr(t, e) {
1140
1167
  const n = [];
1141
1168
  for (const [r, o] of Object.entries(e)) {
1142
- if (Or(t, r))
1169
+ if (Nr(t, r))
1143
1170
  continue;
1144
1171
  let s;
1145
1172
  switch (o.type) {
@@ -1200,7 +1227,7 @@ void main() {
1200
1227
  }
1201
1228
  `;
1202
1229
  }
1203
- class Nr {
1230
+ class Pr {
1204
1231
  gl;
1205
1232
  program = null;
1206
1233
  positionBuffer = null;
@@ -1275,10 +1302,10 @@ class Nr {
1275
1302
  }
1276
1303
  compile(e, n = {}) {
1277
1304
  this.lastError = null, this.customUniforms = n, this.currentShaderSource = e;
1278
- const r = this.gl, o = this.compileShader(r.VERTEX_SHADER, Ir);
1305
+ const r = this.gl, o = this.compileShader(r.VERTEX_SHADER, xr);
1279
1306
  if (!o)
1280
1307
  return !1;
1281
- const s = xr(e, n), i = this.compileShader(r.FRAGMENT_SHADER, s);
1308
+ const s = Lr(e, n), i = this.compileShader(r.FRAGMENT_SHADER, s);
1282
1309
  if (!i)
1283
1310
  return r.deleteShader(o), !1;
1284
1311
  const a = r.createProgram();
@@ -1321,53 +1348,53 @@ class Nr {
1321
1348
  h && e.uniform3f(h, o, s, 1);
1322
1349
  const f = this.uniformLocations.get("iTime");
1323
1350
  f && e.uniform1f(f, a);
1324
- const y = this.uniformLocations.get("iTimeDelta");
1325
- y && e.uniform1f(y, l);
1351
+ const g = this.uniformLocations.get("iTimeDelta");
1352
+ g && e.uniform1f(g, l);
1326
1353
  const m = this.uniformLocations.get("iFrame");
1327
1354
  m && e.uniform1i(m, this.frameCount);
1328
1355
  const c = this.uniformLocations.get("iMouse");
1329
1356
  c && e.uniform4f(c, this.mouseX, this.mouseY, this.mouseClickX, this.mouseClickY);
1330
1357
  const u = this.uniformLocations.get("iDate");
1331
1358
  if (u) {
1332
- const b = /* @__PURE__ */ new Date();
1333
- e.uniform4f(u, b.getFullYear(), b.getMonth(), b.getDate(), b.getHours() * 3600 + b.getMinutes() * 60 + b.getSeconds() + b.getMilliseconds() / 1e3);
1359
+ const S = /* @__PURE__ */ new Date();
1360
+ e.uniform4f(u, S.getFullYear(), S.getMonth(), S.getDate(), S.getHours() * 3600 + S.getMinutes() * 60 + S.getSeconds() + S.getMilliseconds() / 1e3);
1334
1361
  }
1335
- for (let b = 0; b < le; b++) {
1336
- e.activeTexture(e.TEXTURE0 + b), e.bindTexture(e.TEXTURE_2D, this.channels[b].texture);
1337
- const S = this.uniformLocations.get(`iChannel${b}`);
1338
- S && e.uniform1i(S, b);
1362
+ for (let S = 0; S < le; S++) {
1363
+ e.activeTexture(e.TEXTURE0 + S), e.bindTexture(e.TEXTURE_2D, this.channels[S].texture);
1364
+ const b = this.uniformLocations.get(`iChannel${S}`);
1365
+ b && e.uniform1i(b, S);
1339
1366
  }
1340
- const g = this.uniformLocations.get("iChannelResolution");
1341
- g && e.uniform3fv(g, this.channelResolution);
1367
+ const y = this.uniformLocations.get("iChannelResolution");
1368
+ y && e.uniform3fv(y, this.channelResolution);
1342
1369
  const p = this.uniformLocations.get("iChannelTime");
1343
1370
  p && e.uniform1fv(p, this.channelTime);
1344
- for (const [b, S] of Object.entries(this.customUniforms)) {
1345
- const R = this.uniformLocations.get(b);
1371
+ for (const [S, b] of Object.entries(this.customUniforms)) {
1372
+ const R = this.uniformLocations.get(S);
1346
1373
  if (R)
1347
- switch (S.type) {
1374
+ switch (b.type) {
1348
1375
  case "float":
1349
- e.uniform1f(R, S.value);
1376
+ e.uniform1f(R, b.value);
1350
1377
  break;
1351
1378
  case "vec2": {
1352
- const v = S.value;
1379
+ const v = b.value;
1353
1380
  e.uniform2f(R, v[0], v[1]);
1354
1381
  break;
1355
1382
  }
1356
1383
  case "vec3": {
1357
- const v = S.value;
1384
+ const v = b.value;
1358
1385
  e.uniform3f(R, v[0], v[1], v[2]);
1359
1386
  break;
1360
1387
  }
1361
1388
  case "vec4": {
1362
- const v = S.value;
1389
+ const v = b.value;
1363
1390
  e.uniform4f(R, v[0], v[1], v[2], v[3]);
1364
1391
  break;
1365
1392
  }
1366
1393
  case "int":
1367
- e.uniform1i(R, S.value);
1394
+ e.uniform1i(R, b.value);
1368
1395
  break;
1369
1396
  case "bool":
1370
- e.uniform1i(R, S.value ? 1 : 0);
1397
+ e.uniform1i(R, b.value ? 1 : 0);
1371
1398
  break;
1372
1399
  }
1373
1400
  }
@@ -1384,7 +1411,7 @@ class Nr {
1384
1411
  this.channels = [], this.uniformLocations.clear();
1385
1412
  }
1386
1413
  }
1387
- function Lr(t) {
1414
+ function Ur(t) {
1388
1415
  if (typeof t == "string") {
1389
1416
  const e = t.trim();
1390
1417
  return e.length > 0 ? e : void 0;
@@ -1394,7 +1421,7 @@ function Lr(t) {
1394
1421
  return e.length > 0 ? e.join(" ") : void 0;
1395
1422
  }
1396
1423
  }
1397
- function Pr(...t) {
1424
+ function Mr(...t) {
1398
1425
  const e = [];
1399
1426
  for (const n of t)
1400
1427
  n && n.trim() && e.push(n.trim());
@@ -1409,10 +1436,10 @@ function Ke(t) {
1409
1436
  return Math.floor(e);
1410
1437
  }
1411
1438
  }
1412
- function Ur(t) {
1439
+ function Dr(t) {
1413
1440
  return typeof t == "string" ? t : "";
1414
1441
  }
1415
- function Mr(t) {
1442
+ function jr(t) {
1416
1443
  if (typeof t == "boolean")
1417
1444
  return t;
1418
1445
  if (typeof t == "string") {
@@ -1421,7 +1448,7 @@ function Mr(t) {
1421
1448
  if (e === "false") return !1;
1422
1449
  }
1423
1450
  }
1424
- function Dr(t) {
1451
+ function $r(t) {
1425
1452
  if (!t || typeof t != "object")
1426
1453
  return {};
1427
1454
  const e = {}, n = t;
@@ -1436,10 +1463,10 @@ function Dr(t) {
1436
1463
  }
1437
1464
  return e;
1438
1465
  }
1439
- function jr(t) {
1466
+ function Br(t) {
1440
1467
  return Array.isArray(t) ? t.map((e) => typeof e == "string" ? e : null) : [];
1441
1468
  }
1442
- function $r(t, e) {
1469
+ function Fr(t, e) {
1443
1470
  const n = Object.keys(t), r = Object.keys(e);
1444
1471
  if (n.length !== r.length)
1445
1472
  return !1;
@@ -1460,21 +1487,21 @@ function $r(t, e) {
1460
1487
  }
1461
1488
  return !0;
1462
1489
  }
1463
- const Br = "std.shadertoy-canvas";
1464
- function Fr() {
1490
+ const Wr = "std.shadertoy-canvas";
1491
+ function Vr() {
1465
1492
  const t = G(function({ nodeId: n, context: r, className: o }) {
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({
1493
+ const s = Z(r.store, n), i = E(null), a = E(null), l = E(null), h = E(0), f = E(""), g = E({}), m = E({
1467
1494
  x: 0,
1468
1495
  y: 0,
1469
1496
  clickX: 0,
1470
1497
  clickY: 0,
1471
1498
  isDown: !1
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;
1499
+ }), c = s ? Dr(s.props?.shaderSource) : "", u = s ? Ke(s.props?.fps) ?? 60 : 60, y = s?.props?.uniforms, p = V(() => $r(y), [y]), S = s?.props?.channels, b = V(() => Br(S), [S]), R = s ? jr(s.props?.enableMouse) ?? !0 : !0, v = s ? Ke(s.props?.width) : void 0, T = s ? Ke(s.props?.height) : void 0, U = s ? Mr(Ur(s.props?.className), o) : o;
1473
1500
  C(() => {
1474
1501
  const I = i.current;
1475
1502
  if (I) {
1476
1503
  try {
1477
- const P = new Nr(I);
1504
+ const P = new Pr(I);
1478
1505
  a.current = P;
1479
1506
  } catch (P) {
1480
1507
  console.error("[ShadertoyRenderer] Failed to create WebGL2 context:", P);
@@ -1487,18 +1514,18 @@ function Fr() {
1487
1514
  const I = a.current;
1488
1515
  if (!(!I || !c) && f.current !== c)
1489
1516
  if (I.compile(c, p))
1490
- f.current = c, y.current = p;
1517
+ f.current = c, g.current = p;
1491
1518
  else {
1492
1519
  const M = I.getError();
1493
1520
  console.error("[ShadertoyRenderer] Shader compilation failed:", M);
1494
1521
  }
1495
1522
  }, [c, p]), C(() => {
1496
1523
  const I = a.current;
1497
- !I || !f.current || $r(y.current, p) || (I.setCustomUniforms(p), y.current = p);
1524
+ !I || !f.current || Fr(g.current, p) || (I.setCustomUniforms(p), g.current = p);
1498
1525
  }, [p]), C(() => {
1499
1526
  const I = a.current;
1500
- I && I.setChannels(S);
1501
- }, [S]), C(() => {
1527
+ I && I.setChannels(b);
1528
+ }, [b]), C(() => {
1502
1529
  const I = a.current;
1503
1530
  if (!I || !f.current) return;
1504
1531
  const P = 1e3 / u, M = (B) => {
@@ -1514,8 +1541,8 @@ function Fr() {
1514
1541
  if (!R) return;
1515
1542
  const P = i.current, M = a.current;
1516
1543
  if (!P || !M) return;
1517
- const B = window.devicePixelRatio || 1, $ = P.getBoundingClientRect(), V = (I.clientX - $.left) * B, K = ($.height - (I.clientY - $.top)) * B;
1518
- m.current.x = V, m.current.y = K, M.setMouse(V, K, m.current.clickX, m.current.clickY);
1544
+ const B = window.devicePixelRatio || 1, $ = P.getBoundingClientRect(), W = (I.clientX - $.left) * B, K = ($.height - (I.clientY - $.top)) * B;
1545
+ m.current.x = W, m.current.y = K, M.setMouse(W, K, m.current.clickX, m.current.clickY);
1519
1546
  },
1520
1547
  [R]
1521
1548
  ), te = j(
@@ -1523,8 +1550,8 @@ function Fr() {
1523
1550
  if (!R) return;
1524
1551
  const P = i.current, M = a.current;
1525
1552
  if (!P || !M) return;
1526
- const B = window.devicePixelRatio || 1, $ = P.getBoundingClientRect(), V = (I.clientX - $.left) * B, K = ($.height - (I.clientY - $.top)) * B;
1527
- m.current.isDown = !0, m.current.clickX = V, m.current.clickY = K, M.setMouse(V, K, V, K);
1553
+ const B = window.devicePixelRatio || 1, $ = P.getBoundingClientRect(), W = (I.clientX - $.left) * B, K = ($.height - (I.clientY - $.top)) * B;
1554
+ m.current.isDown = !0, m.current.clickX = W, m.current.clickY = K, M.setMouse(W, K, W, K);
1528
1555
  },
1529
1556
  [R]
1530
1557
  ), z = j(() => {
@@ -1547,16 +1574,16 @@ function Fr() {
1547
1574
  ) : null;
1548
1575
  });
1549
1576
  return ({ type: e }) => {
1550
- if (e === Br)
1577
+ if (e === Wr)
1551
1578
  return t;
1552
1579
  };
1553
1580
  }
1554
- const Vr = "shadertoy", Wr = async () => Fr();
1555
- function Kr(t) {
1556
- t.registerModule(Vr, Wr);
1581
+ const Kr = "shadertoy", Yr = async () => Vr();
1582
+ function Gr(t) {
1583
+ t.registerModule(Kr, Yr);
1557
1584
  }
1558
1585
  const vt = oe("UIRegistry");
1559
- class Yr {
1586
+ class zr {
1560
1587
  baseResolvers = [];
1561
1588
  moduleLoaders = /* @__PURE__ */ new Map();
1562
1589
  moduleResolvers = /* @__PURE__ */ new Map();
@@ -1578,7 +1605,7 @@ class Yr {
1578
1605
  for (const [r, o] of this.moduleLoaders.entries())
1579
1606
  if (!this.moduleResolvers.has(r))
1580
1607
  try {
1581
- const s = await o(), i = Xr(s);
1608
+ const s = await o(), i = qr(s);
1582
1609
  this.moduleResolvers.set(r, i), e = !0;
1583
1610
  } catch (s) {
1584
1611
  vt.error(`[IkonUiRegistry] Failed to load module '${r}'.`, s);
@@ -1586,7 +1613,7 @@ class Yr {
1586
1613
  const n = [];
1587
1614
  for (const r of this.moduleLoaders.keys())
1588
1615
  this.moduleResolvers.has(r) && n.push(r);
1589
- return Hr(n, this.activeModuleOrder) || (this.activeModuleOrder = n, e = !0), e;
1616
+ return Jr(n, this.activeModuleOrder) || (this.activeModuleOrder = n, e = !0), e;
1590
1617
  }
1591
1618
  resolve(e) {
1592
1619
  for (const n of this.baseResolvers) {
@@ -1606,17 +1633,17 @@ class Yr {
1606
1633
  }
1607
1634
  }
1608
1635
  }
1609
- function Gr() {
1610
- const t = new Yr();
1611
- return gr(t), _r(t), Kr(t), t.loadRegisteredModules(), t;
1636
+ function Xr() {
1637
+ const t = new zr();
1638
+ return br(t), Or(t), Gr(t), t.loadRegisteredModules(), t;
1612
1639
  }
1613
- function zr(t) {
1640
+ function Hr(t) {
1614
1641
  return Array.isArray(t) ? t : [t];
1615
1642
  }
1616
- function Xr(t) {
1617
- return t ? zr(t).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
1643
+ function qr(t) {
1644
+ return t ? Hr(t).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
1618
1645
  }
1619
- function Hr(t, e) {
1646
+ function Jr(t, e) {
1620
1647
  if (t.length !== e.length)
1621
1648
  return !1;
1622
1649
  for (let n = 0; n < t.length; n += 1)
@@ -1624,7 +1651,7 @@ function Hr(t, e) {
1624
1651
  return !1;
1625
1652
  return !0;
1626
1653
  }
1627
- function _s({ mount: t, stores: e, registry: n, client: r, onAction: o }) {
1654
+ function Os({ mount: t, stores: e, registry: n, client: r, onAction: o }) {
1628
1655
  return /* @__PURE__ */ w.jsx(
1629
1656
  Bt,
1630
1657
  {
@@ -1681,50 +1708,50 @@ function At(t) {
1681
1708
  }
1682
1709
  function Tt(t, e, n, r) {
1683
1710
  const f = new Float32Array(11);
1684
- function y(p, b, S) {
1685
- return ((3 * b - 3 * S + 1) * p + (3 * S - 6 * b)) * p * p + 3 * b * p;
1711
+ function g(p, S, b) {
1712
+ return ((3 * S - 3 * b + 1) * p + (3 * b - 6 * S)) * p * p + 3 * S * p;
1686
1713
  }
1687
- function m(p, b, S) {
1688
- return 3 * (3 * b - 3 * S + 1) * p * p + 2 * (3 * S - 6 * b) * p + 3 * b;
1714
+ function m(p, S, b) {
1715
+ return 3 * (3 * S - 3 * b + 1) * p * p + 2 * (3 * b - 6 * S) * p + 3 * S;
1689
1716
  }
1690
- function c(p, b) {
1691
- for (let S = 0; S < 4; S += 1) {
1692
- const R = m(b, t, n);
1717
+ function c(p, S) {
1718
+ for (let b = 0; b < 4; b += 1) {
1719
+ const R = m(S, t, n);
1693
1720
  if (R === 0)
1694
- return b;
1695
- const v = y(b, t, n) - p;
1696
- b -= v / R;
1721
+ return S;
1722
+ const v = g(S, t, n) - p;
1723
+ S -= v / R;
1697
1724
  }
1698
- return b;
1725
+ return S;
1699
1726
  }
1700
- function u(p, b, S) {
1727
+ function u(p, S, b) {
1701
1728
  let R = 0, v = 0, T = 0;
1702
1729
  do
1703
- v = b + (S - b) / 2, R = y(v, t, n) - p, R > 0 ? S = v : b = v;
1730
+ v = S + (b - S) / 2, R = g(v, t, n) - p, R > 0 ? b = v : S = v;
1704
1731
  while (Math.abs(R) > 1e-7 && ++T < 10);
1705
1732
  return v;
1706
1733
  }
1707
- function g(p) {
1708
- let b = 0, S = 1;
1734
+ function y(p) {
1735
+ let S = 0, b = 1;
1709
1736
  const R = 10;
1710
- for (; S !== R && f[S] <= p; S += 1)
1711
- b += 0.1;
1712
- S -= 1;
1713
- const v = (p - f[S]) / (f[S + 1] - f[S]), T = b + v * 0.1, U = m(T, t, n);
1714
- return U >= 1e-3 ? c(p, T) : U === 0 ? T : u(p, b, b + 0.1);
1737
+ for (; b !== R && f[b] <= p; b += 1)
1738
+ S += 0.1;
1739
+ b -= 1;
1740
+ const v = (p - f[b]) / (f[b + 1] - f[b]), T = S + v * 0.1, U = m(T, t, n);
1741
+ return U >= 1e-3 ? c(p, T) : U === 0 ? T : u(p, S, S + 0.1);
1715
1742
  }
1716
1743
  for (let p = 0; p < 11; p += 1)
1717
- f[p] = y(p * 0.1, t, n);
1718
- return (p) => p <= 0 ? 0 : p >= 1 ? 1 : y(g(p), e, r);
1744
+ f[p] = g(p * 0.1, t, n);
1745
+ return (p) => p <= 0 ? 0 : p >= 1 ? 1 : g(y(p), e, r);
1719
1746
  }
1720
- function qr(t) {
1747
+ function Zr(t) {
1721
1748
  const e = /steps\(\s*([0-9]+)\s*(?:,\s*([a-z-]+)\s*)?\)/i.exec(t);
1722
1749
  if (!e)
1723
1750
  return (o) => F(o);
1724
1751
  const n = Math.max(1, parseInt(e[1], 10)), r = (e[2] ?? "end").toLowerCase();
1725
1752
  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
1753
  }
1727
- function Jr(t) {
1754
+ function Qr(t) {
1728
1755
  if (!t)
1729
1756
  return (n) => F(n);
1730
1757
  const e = t.trim().toLowerCase();
@@ -1742,12 +1769,12 @@ function Jr(t) {
1742
1769
  }
1743
1770
  }
1744
1771
  if (e.startsWith("steps(") && e.endsWith(")")) {
1745
- const n = qr(e);
1772
+ const n = Zr(e);
1746
1773
  return (r) => n(F(r));
1747
1774
  }
1748
1775
  return (n) => F(n);
1749
1776
  }
1750
- function Zr(t) {
1777
+ function eo(t) {
1751
1778
  if (!t)
1752
1779
  return;
1753
1780
  const e = /(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)\s*->\s*(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)/.exec(t);
@@ -1757,7 +1784,7 @@ function Zr(t) {
1757
1784
  if (![n, r, o, s].some((i) => !Number.isFinite(i)))
1758
1785
  return { inStart: n, inEnd: r, outStart: o, outEnd: s };
1759
1786
  }
1760
- class Qr {
1787
+ class to {
1761
1788
  bindingsByStyle = /* @__PURE__ */ new Map();
1762
1789
  observer;
1763
1790
  observeScheduled = !1;
@@ -1802,7 +1829,7 @@ class Qr {
1802
1829
  const n = e.source?.trim();
1803
1830
  if (!n)
1804
1831
  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 = Jr(e.ease), h = Zr(e.map), f = e.targetId?.trim() || void 0;
1832
+ 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 = eo(e.map), f = e.targetId?.trim() || void 0;
1806
1833
  return Number.isNaN(r) || Number.isNaN(s) ? void 0 : {
1807
1834
  source: n.toLowerCase(),
1808
1835
  min: r,
@@ -2015,8 +2042,8 @@ class Qr {
2015
2042
  }
2016
2043
  }
2017
2044
  }
2018
- const Ge = new Qr();
2019
- function eo(t) {
2045
+ const Ge = new to();
2046
+ function no(t) {
2020
2047
  const e = E(/* @__PURE__ */ new Map()), n = j(({ styleId: s, css: i, common: a }) => {
2021
2048
  if (!(!s || typeof document > "u")) {
2022
2049
  if (i) {
@@ -2049,7 +2076,7 @@ function eo(t) {
2049
2076
  };
2050
2077
  }, [t, o, n, r]), C(() => () => o(), [o]), { setStyle: n, deleteStyles: r, reset: o };
2051
2078
  }
2052
- function to(t) {
2079
+ function ro(t) {
2053
2080
  const e = [];
2054
2081
  for (const [n, r] of t) {
2055
2082
  const o = r.store.getSnapshot(), s = o.rootViewId && o.views.has(o.rootViewId);
@@ -2057,7 +2084,7 @@ function to(t) {
2057
2084
  }
2058
2085
  return e.sort(), e.join(",");
2059
2086
  }
2060
- function no(t) {
2087
+ function oo(t) {
2061
2088
  const [e, n] = x(), r = E("");
2062
2089
  return C(() => {
2063
2090
  if (!t) {
@@ -2065,7 +2092,7 @@ function no(t) {
2065
2092
  return;
2066
2093
  }
2067
2094
  const o = () => {
2068
- const s = t.getStores(), i = to(s);
2095
+ const s = t.getStores(), i = ro(s);
2069
2096
  i !== r.current && (r.current = i, n(s));
2070
2097
  };
2071
2098
  return o(), t.subscribe(o);
@@ -2078,7 +2105,7 @@ const k = {
2078
2105
  Line: 4,
2079
2106
  Paragraph: 8,
2080
2107
  Emoji: 16
2081
- }, ro = [
2108
+ }, so = [
2082
2109
  {
2083
2110
  flag: k.Letter,
2084
2111
  hints: [
@@ -2127,11 +2154,11 @@ const k = {
2127
2154
  "[data-emoji]"
2128
2155
  ]
2129
2156
  }
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)
2157
+ ], nt = k.Letter | k.Word | k.Line | k.Paragraph | k.Emoji, io = k.Letter | k.Word | k.Line | k.Paragraph, kt = /* @__PURE__ */ new Map(), ao = 16384;
2158
+ function xs(t, e) {
2159
+ if (!t || t.length > ao)
2133
2160
  return t;
2134
- const n = Ro(e), r = fe(n, k.Emoji), o = n & oo;
2161
+ const n = To(e), r = fe(n, k.Emoji), o = n & io;
2135
2162
  if (o === k.None && !r)
2136
2163
  return t;
2137
2164
  const s = t.replace(/\r\n/g, `
@@ -2139,20 +2166,20 @@ function Is(t, e) {
2139
2166
  `);
2140
2167
  if (o === k.None)
2141
2168
  return Ot(s);
2142
- const i = vo(s);
2169
+ const i = Ro(s);
2143
2170
  if (i.length === 0)
2144
2171
  return r ? Ot(s) : t;
2145
- const a = Eo(i), l = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, h = [];
2172
+ const a = Ao(i), l = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, h = [];
2146
2173
  for (const f of a) {
2147
- const y = io(f, n, l);
2148
- h.push(...y);
2174
+ const g = co(f, n, l);
2175
+ h.push(...g);
2149
2176
  }
2150
2177
  return h;
2151
2178
  }
2152
- function io(t, e, n) {
2179
+ function co(t, e, n) {
2153
2180
  const r = [];
2154
2181
  for (const o of t) {
2155
- const s = ao(o, e, n);
2182
+ const s = lo(o, e, n);
2156
2183
  r.push(...s);
2157
2184
  }
2158
2185
  if (fe(e, k.Paragraph)) {
@@ -2171,8 +2198,8 @@ function io(t, e, n) {
2171
2198
  }
2172
2199
  return r;
2173
2200
  }
2174
- function ao(t, e, n) {
2175
- const r = co(t.text, e, n), o = [];
2201
+ function lo(t, e, n) {
2202
+ const r = uo(t.text, e, n), o = [];
2176
2203
  if (fe(e, k.Line)) {
2177
2204
  const s = n.line++;
2178
2205
  o.push(
@@ -2184,7 +2211,7 @@ function ao(t, e, n) {
2184
2211
  o.push(/* @__PURE__ */ w.jsx("br", {}, `motion-break-${n.br++}`));
2185
2212
  return o;
2186
2213
  }
2187
- function co(t, e, n) {
2214
+ function uo(t, e, n) {
2188
2215
  if (!t)
2189
2216
  return [];
2190
2217
  const r = fe(e, k.Word), o = [], s = /(\s+)/g;
@@ -2203,13 +2230,13 @@ function co(t, e, n) {
2203
2230
  return o;
2204
2231
  }
2205
2232
  function Ct(t, e, n, r) {
2206
- const o = e.word++, s = uo(t, n, e), i = `motion-word-${o}`, a = lo(o, r);
2233
+ const o = e.word++, s = ho(t, n, e), i = `motion-word-${o}`, a = fo(o, r);
2207
2234
  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
2235
  }
2209
- function lo(t, e) {
2236
+ function fo(t, e) {
2210
2237
  return e ? { ...Ue(t), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
2211
2238
  }
2212
- function uo(t, e, n) {
2239
+ function ho(t, e, n) {
2213
2240
  if (!t)
2214
2241
  return [];
2215
2242
  const r = fe(e, k.Letter), o = fe(e, k.Emoji);
@@ -2242,33 +2269,33 @@ function uo(t, e, n) {
2242
2269
  function rt(t) {
2243
2270
  if (!t)
2244
2271
  return [];
2245
- const e = fo();
2246
- return e ? Array.from(e.segment(t), (n) => n.segment) : ho(t);
2272
+ const e = po();
2273
+ return e ? Array.from(e.segment(t), (n) => n.segment) : mo(t);
2247
2274
  }
2248
2275
  let Se;
2249
- function fo() {
2276
+ function po() {
2250
2277
  return Se !== void 0 || (typeof Intl < "u" && typeof Intl.Segmenter == "function" ? Se = new Intl.Segmenter(void 0, { granularity: "grapheme" }) : Se = null), Se;
2251
2278
  }
2252
- function ho(t) {
2279
+ function mo(t) {
2253
2280
  const e = [], n = Array.from(t);
2254
2281
  let r = "";
2255
2282
  for (let o = 0; o < n.length; o++) {
2256
2283
  const s = n[o], i = n[o + 1];
2257
- r += s, !(i && po(s, i)) && (e.push(r), r = "");
2284
+ r += s, !(i && go(s, i)) && (e.push(r), r = "");
2258
2285
  }
2259
2286
  return r && e.push(r), e;
2260
2287
  }
2261
- function po(t, e) {
2262
- return e ? !!(_t(t) || _t(e) || yo(e) || mo(e) || go(e) || It(t) && It(e)) : !1;
2288
+ function go(t, e) {
2289
+ return e ? !!(_t(t) || _t(e) || So(e) || yo(e) || bo(e) || It(t) && It(e)) : !1;
2263
2290
  }
2264
2291
  function _t(t) {
2265
2292
  return t.codePointAt(0) === 8205;
2266
2293
  }
2267
- function mo(t) {
2294
+ function yo(t) {
2268
2295
  const e = t.codePointAt(0);
2269
2296
  return e === void 0 ? !1 : e >= 65024 && e <= 65039 || e >= 917760 && e <= 917999;
2270
2297
  }
2271
- function go(t) {
2298
+ function bo(t) {
2272
2299
  const e = t.codePointAt(0);
2273
2300
  return e === void 0 ? !1 : e >= 127995 && e <= 127999;
2274
2301
  }
@@ -2277,10 +2304,10 @@ function It(t) {
2277
2304
  return e === void 0 ? !1 : e >= 127462 && e <= 127487;
2278
2305
  }
2279
2306
  let ze;
2280
- function yo(t) {
2281
- return t ? (ze || (ze = bo()), ze(t)) : !1;
2307
+ function So(t) {
2308
+ return t ? (ze || (ze = wo()), ze(t)) : !1;
2282
2309
  }
2283
- function bo() {
2310
+ function wo() {
2284
2311
  try {
2285
2312
  const t = new RegExp("\\p{Mark}", "u");
2286
2313
  return (e) => t.test(e);
@@ -2293,17 +2320,17 @@ function bo() {
2293
2320
  }
2294
2321
  let Xe;
2295
2322
  function Gt(t) {
2296
- return t ? (Xe || (Xe = So()), Xe(t)) : !1;
2323
+ return t ? (Xe || (Xe = vo()), Xe(t)) : !1;
2297
2324
  }
2298
- function So() {
2325
+ function vo() {
2299
2326
  try {
2300
2327
  const t = new RegExp("\\p{Extended_Pictographic}", "u");
2301
2328
  return (e) => t.test(e);
2302
2329
  } catch {
2303
- return wo;
2330
+ return Eo;
2304
2331
  }
2305
2332
  }
2306
- function wo(t) {
2333
+ function Eo(t) {
2307
2334
  if (!t)
2308
2335
  return !1;
2309
2336
  for (const e of Array.from(t)) {
@@ -2313,7 +2340,7 @@ function wo(t) {
2313
2340
  }
2314
2341
  return !1;
2315
2342
  }
2316
- function vo(t) {
2343
+ function Ro(t) {
2317
2344
  const e = [];
2318
2345
  let n = "", r = 0;
2319
2346
  for (let o = 0; o < t.length; o++) {
@@ -2327,7 +2354,7 @@ function vo(t) {
2327
2354
  }
2328
2355
  return (r > 0 || n.length > 0) && e.push({ text: n, breaks: r }), e;
2329
2356
  }
2330
- function Eo(t) {
2357
+ function Ao(t) {
2331
2358
  if (t.length === 0)
2332
2359
  return [];
2333
2360
  const e = [];
@@ -2384,7 +2411,7 @@ function zt(t, e) {
2384
2411
  }
2385
2412
  return i(), o ? { nodes: n, sawEmoji: !0 } : { nodes: [t.join("")], sawEmoji: !1 };
2386
2413
  }
2387
- function Ro(t) {
2414
+ function To(t) {
2388
2415
  if (!t)
2389
2416
  return k.None;
2390
2417
  const e = t.trim();
@@ -2398,8 +2425,8 @@ function Ro(t) {
2398
2425
  const r = e.split(/\s+/).filter(Boolean);
2399
2426
  if (r.length === 0)
2400
2427
  return k.None;
2401
- const s = r.map((l) => `.${Ao(l)}`).map(
2402
- (l) => new RegExp(`(^|[^a-zA-Z0-9_-])${To(l)}(?![a-zA-Z0-9_-])`)
2428
+ const s = r.map((l) => `.${ko(l)}`).map(
2429
+ (l) => new RegExp(`(^|[^a-zA-Z0-9_-])${Co(l)}(?![a-zA-Z0-9_-])`)
2403
2430
  );
2404
2431
  let i = k.None, a = !1;
2405
2432
  for (const l of Array.from(document.styleSheets)) {
@@ -2427,7 +2454,7 @@ function Xt(t, e) {
2427
2454
  const a = s.selectorText ?? "";
2428
2455
  if (!a || !e.some((h) => h.test(a))) continue;
2429
2456
  r = !0;
2430
- for (const h of ro)
2457
+ for (const h of so)
2431
2458
  h.hints.some((f) => a.includes(f)) && (n |= h.flag);
2432
2459
  if (n === nt)
2433
2460
  return { mask: n, sawStyleRule: !0 };
@@ -2441,19 +2468,19 @@ function Xt(t, e) {
2441
2468
  }
2442
2469
  return { mask: n, sawStyleRule: r };
2443
2470
  }
2444
- function Ao(t) {
2471
+ function ko(t) {
2445
2472
  return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(t) : t.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
2446
2473
  }
2447
- function To(t) {
2474
+ function Co(t) {
2448
2475
  return t.replace(/[.*+?^${}()|[\]\\]/g, (e) => `\\${e}`);
2449
2476
  }
2450
- const ct = "ikon-auth-session", Ht = "ikon-auth-auto-login-attempted-run", ko = 10080 * 60 * 1e3, Co = 60 * 1e3;
2477
+ const ct = "ikon-auth-session", Ht = "ikon-auth-auto-login-attempted-run", _o = 10080 * 60 * 1e3, Io = 60 * 1e3;
2451
2478
  function qt(t) {
2452
2479
  try {
2453
2480
  const e = t.split(".");
2454
2481
  if (e.length !== 3) return !0;
2455
2482
  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 - Co;
2483
+ return typeof o.exp != "number" ? !1 : Date.now() >= o.exp * 1e3 - Io;
2457
2484
  } catch {
2458
2485
  return !0;
2459
2486
  }
@@ -2470,7 +2497,7 @@ function Jt() {
2470
2497
  const t = localStorage.getItem(ct);
2471
2498
  if (!t) return null;
2472
2499
  const e = JSON.parse(t);
2473
- return Date.now() - e.authenticatedAt > ko || qt(e.token) ? (Le(), null) : e;
2500
+ return Date.now() - e.authenticatedAt > _o || qt(e.token) ? (Le(), null) : e;
2474
2501
  } catch {
2475
2502
  return console.warn("Failed to load auth session from localStorage"), null;
2476
2503
  }
@@ -2482,7 +2509,7 @@ function Le() {
2482
2509
  console.warn("Failed to clear auth session from localStorage");
2483
2510
  }
2484
2511
  }
2485
- function _o(t) {
2512
+ function Oo(t) {
2486
2513
  if (t)
2487
2514
  try {
2488
2515
  sessionStorage.setItem(Ht, t);
@@ -2490,7 +2517,7 @@ function _o(t) {
2490
2517
  console.warn("Failed to record auto-login attempt in sessionStorage");
2491
2518
  }
2492
2519
  }
2493
- function Io() {
2520
+ function xo() {
2494
2521
  try {
2495
2522
  return sessionStorage.getItem(Ht);
2496
2523
  } catch {
@@ -2524,14 +2551,14 @@ async function Qt(t, e) {
2524
2551
  try {
2525
2552
  i = await fetch(s, r);
2526
2553
  } catch (h) {
2527
- const f = h instanceof Error ? `${h.name}: ${h.message}` : String(h), y = Cn(), m = y ? `${y}/anonymous` : null;
2554
+ const f = h instanceof Error ? `${h.name}: ${h.message}` : String(h), g = Cn(), m = g ? `${g}/anonymous` : null;
2528
2555
  if (m && m !== s) {
2529
2556
  we.warn(`Anonymous auth could not reach ${s} (${f}); falling back to same-origin ${m}`);
2530
2557
  try {
2531
2558
  i = await fetch(m, r);
2532
2559
  } catch (c) {
2533
- const u = c instanceof Error ? `${c.name}: ${c.message}` : String(c), g = await xt(e);
2534
- 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})`);
2560
+ const u = c instanceof Error ? `${c.name}: ${c.message}` : String(c), y = await xt(e);
2561
+ throw we.error(`Anonymous auth failed on both direct (${s}: ${f}) and same-origin (${m}: ${u}). ${y}`), new Error(`Anonymous auth unreachable: direct ${s} (${f}) and same-origin ${m} (${u})`);
2535
2562
  }
2536
2563
  } else {
2537
2564
  const c = await xt(e);
@@ -2549,7 +2576,7 @@ async function Qt(t, e) {
2549
2576
  };
2550
2577
  return he(l), l;
2551
2578
  }
2552
- async function Oo({ email: t, spaceId: e, authUrl: n }) {
2579
+ async function No({ email: t, spaceId: e, authUrl: n }) {
2553
2580
  const r = await fetch(`${n}/email/send`, {
2554
2581
  method: "POST",
2555
2582
  headers: { "Content-Type": "application/json" },
@@ -2564,7 +2591,7 @@ async function Oo({ email: t, spaceId: e, authUrl: n }) {
2564
2591
  throw new Error(o);
2565
2592
  }
2566
2593
  }
2567
- async function xo({ email: t, code: e, authUrl: n }) {
2594
+ async function Lo({ email: t, code: e, authUrl: n }) {
2568
2595
  const r = await fetch(`${n}/email/code`, {
2569
2596
  method: "POST",
2570
2597
  headers: { "Content-Type": "application/json" },
@@ -2585,21 +2612,21 @@ async function xo({ email: t, code: e, authUrl: n }) {
2585
2612
  };
2586
2613
  return he(s), s;
2587
2614
  }
2588
- function No() {
2615
+ function Po() {
2589
2616
  const t = new URLSearchParams(window.location.search), e = t.get("ikon_token"), n = t.get("ikon_provider");
2590
2617
  return e && n ? { token: e, provider: n } : null;
2591
2618
  }
2592
- function Lo() {
2619
+ function Uo() {
2593
2620
  return new URLSearchParams(window.location.search).get("error");
2594
2621
  }
2595
2622
  function Nt() {
2596
2623
  window.history.replaceState({}, "", window.location.pathname);
2597
2624
  }
2598
- function Po(t, e, n, r) {
2625
+ function Mo(t, e, n, r) {
2599
2626
  const o = r ?? window.location.origin + window.location.pathname + window.location.search;
2600
2627
  return `${n}/oauth/${t}?space=${encodeURIComponent(e)}&return=${encodeURIComponent(o)}`;
2601
2628
  }
2602
- async function Uo(t) {
2629
+ async function Do(t) {
2603
2630
  const e = await fetch(`${t}/passkey/registration/options`, {
2604
2631
  method: "POST",
2605
2632
  headers: { "Content-Type": "application/json" }
@@ -2610,7 +2637,7 @@ async function Uo(t) {
2610
2637
  }
2611
2638
  return e.json();
2612
2639
  }
2613
- async function Mo(t, e, n) {
2640
+ async function jo(t, e, n) {
2614
2641
  const r = await fetch(`${t}/passkey/registration/verify`, {
2615
2642
  method: "POST",
2616
2643
  headers: { "Content-Type": "application/json" },
@@ -2627,7 +2654,7 @@ async function Mo(t, e, n) {
2627
2654
  };
2628
2655
  return he(s), s;
2629
2656
  }
2630
- async function Do(t, e) {
2657
+ async function $o(t, e) {
2631
2658
  const n = await fetch(`${t}/passkey/authentication/options`, {
2632
2659
  method: "POST",
2633
2660
  headers: { "Content-Type": "application/json" },
@@ -2639,7 +2666,7 @@ async function Do(t, e) {
2639
2666
  }
2640
2667
  return n.json();
2641
2668
  }
2642
- async function jo(t, e) {
2669
+ async function Bo(t, e) {
2643
2670
  const n = await fetch(`${t}/passkey/authentication/verify`, {
2644
2671
  method: "POST",
2645
2672
  headers: { "Content-Type": "application/json" },
@@ -2670,9 +2697,9 @@ function Pe(t) {
2670
2697
  return s;
2671
2698
  }
2672
2699
  function lt() {
2673
- return $o.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
2700
+ return Fo.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
2674
2701
  }
2675
- const $o = {
2702
+ const Fo = {
2676
2703
  stubThis: (t) => t
2677
2704
  };
2678
2705
  function en(t) {
@@ -2705,7 +2732,7 @@ class D extends Error {
2705
2732
  }), this.name = o ?? r.name, this.code = n;
2706
2733
  }
2707
2734
  }
2708
- function Bo({ error: t, options: e }) {
2735
+ function Wo({ error: t, options: e }) {
2709
2736
  const { publicKey: n } = e;
2710
2737
  if (!n)
2711
2738
  throw Error("options was missing required publicKey property");
@@ -2791,7 +2818,7 @@ function Bo({ error: t, options: e }) {
2791
2818
  }
2792
2819
  return t;
2793
2820
  }
2794
- class Fo {
2821
+ class Vo {
2795
2822
  constructor() {
2796
2823
  Object.defineProperty(this, "controller", {
2797
2824
  enumerable: !0,
@@ -2815,12 +2842,12 @@ class Fo {
2815
2842
  }
2816
2843
  }
2817
2844
  }
2818
- const nn = new Fo(), Vo = ["cross-platform", "platform"];
2845
+ const nn = new Vo(), Ko = ["cross-platform", "platform"];
2819
2846
  function rn(t) {
2820
- if (t && !(Vo.indexOf(t) < 0))
2847
+ if (t && !(Ko.indexOf(t) < 0))
2821
2848
  return t;
2822
2849
  }
2823
- async function Wo(t) {
2850
+ async function Yo(t) {
2824
2851
  !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
2852
  const { optionsJSON: e, useAutoRegister: n = !1 } = t;
2826
2853
  if (!lt())
@@ -2839,17 +2866,17 @@ async function Wo(t) {
2839
2866
  try {
2840
2867
  s = await navigator.credentials.create(o);
2841
2868
  } catch (u) {
2842
- throw Bo({ error: u, options: o });
2869
+ throw Wo({ error: u, options: o });
2843
2870
  }
2844
2871
  if (!s)
2845
2872
  throw new Error("Registration was not completed");
2846
2873
  const { id: i, rawId: a, response: l, type: h } = s;
2847
2874
  let f;
2848
2875
  typeof l.getTransports == "function" && (f = l.getTransports());
2849
- let y;
2876
+ let g;
2850
2877
  if (typeof l.getPublicKeyAlgorithm == "function")
2851
2878
  try {
2852
- y = l.getPublicKeyAlgorithm();
2879
+ g = l.getPublicKeyAlgorithm();
2853
2880
  } catch (u) {
2854
2881
  He("getPublicKeyAlgorithm()", u);
2855
2882
  }
@@ -2875,7 +2902,7 @@ async function Wo(t) {
2875
2902
  attestationObject: X(l.attestationObject),
2876
2903
  clientDataJSON: X(l.clientDataJSON),
2877
2904
  transports: f,
2878
- publicKeyAlgorithm: y,
2905
+ publicKeyAlgorithm: g,
2879
2906
  publicKey: m,
2880
2907
  authenticatorData: c
2881
2908
  },
@@ -2888,7 +2915,7 @@ function He(t, e) {
2888
2915
  console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${t}. You should report this error to them.
2889
2916
  `, e);
2890
2917
  }
2891
- function Ko() {
2918
+ function Go() {
2892
2919
  if (!lt())
2893
2920
  return qe.stubThis(new Promise((e) => e(!1)));
2894
2921
  const t = globalThis.PublicKeyCredential;
@@ -2897,7 +2924,7 @@ function Ko() {
2897
2924
  const qe = {
2898
2925
  stubThis: (t) => t
2899
2926
  };
2900
- function Yo({ error: t, options: e }) {
2927
+ function zo({ error: t, options: e }) {
2901
2928
  const { publicKey: n } = e;
2902
2929
  if (!n)
2903
2930
  throw Error("options was missing required publicKey property");
@@ -2938,7 +2965,7 @@ function Yo({ error: t, options: e }) {
2938
2965
  }
2939
2966
  return t;
2940
2967
  }
2941
- async function Go(t) {
2968
+ async function Xo(t) {
2942
2969
  !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
2970
  const { optionsJSON: e, useBrowserAutofill: n = !1, verifyBrowserAutofillInput: r = !0 } = t;
2944
2971
  if (!lt())
@@ -2951,7 +2978,7 @@ async function Go(t) {
2951
2978
  allowCredentials: o
2952
2979
  }, i = {};
2953
2980
  if (n) {
2954
- if (!await Ko())
2981
+ if (!await Go())
2955
2982
  throw Error("Browser does not support WebAuthn autofill");
2956
2983
  if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1 && r)
2957
2984
  throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
@@ -2962,11 +2989,11 @@ async function Go(t) {
2962
2989
  try {
2963
2990
  a = await navigator.credentials.get(i);
2964
2991
  } catch (c) {
2965
- throw Yo({ error: c, options: i });
2992
+ throw zo({ error: c, options: i });
2966
2993
  }
2967
2994
  if (!a)
2968
2995
  throw new Error("Authentication was not completed");
2969
- const { id: l, rawId: h, response: f, type: y } = a;
2996
+ const { id: l, rawId: h, response: f, type: g } = a;
2970
2997
  let m;
2971
2998
  return f.userHandle && (m = X(f.userHandle)), {
2972
2999
  id: l,
@@ -2977,13 +3004,13 @@ async function Go(t) {
2977
3004
  signature: X(f.signature),
2978
3005
  userHandle: m
2979
3006
  },
2980
- type: y,
3007
+ type: g,
2981
3008
  clientExtensionResults: a.getClientExtensionResults(),
2982
3009
  authenticatorAttachment: rn(a.authenticatorAttachment)
2983
3010
  };
2984
3011
  }
2985
3012
  const ut = Mt(null);
2986
- function Os({ children: t, config: e }) {
3013
+ function Ns({ children: t, config: e }) {
2987
3014
  const [n, r] = x({
2988
3015
  isAuthenticated: !1,
2989
3016
  isLoading: !0,
@@ -2992,23 +3019,23 @@ function Os({ children: t, config: e }) {
2992
3019
  });
2993
3020
  C(() => {
2994
3021
  (() => {
2995
- const m = e.devLoginRunId, c = !!m && Io() === m;
2996
- m && _o(m);
2997
- const u = Lo();
2998
- if (u) {
3022
+ const m = e.devLoginRunId, c = !!m && xo() === m;
3023
+ m && Oo(m);
3024
+ const u = !!e.devLoginToken && !!m && !c && !qt(e.devLoginToken), y = Uo();
3025
+ if (y) {
2999
3026
  Nt(), r({
3000
3027
  isAuthenticated: !1,
3001
3028
  isLoading: !1,
3002
3029
  user: null,
3003
- error: u
3030
+ error: y
3004
3031
  });
3005
3032
  return;
3006
3033
  }
3007
- const g = No();
3008
- if (g) {
3034
+ const p = Po();
3035
+ if (p) {
3009
3036
  const b = {
3010
- token: g.token,
3011
- provider: g.provider,
3037
+ token: p.token,
3038
+ provider: p.provider,
3012
3039
  authenticatedAt: Date.now()
3013
3040
  };
3014
3041
  he(b), Nt(), r({
@@ -3019,17 +3046,17 @@ function Os({ children: t, config: e }) {
3019
3046
  });
3020
3047
  return;
3021
3048
  }
3022
- const p = Jt();
3023
- if (p) {
3049
+ const S = Jt();
3050
+ if (S && !(u && S.provider === "anonymous")) {
3024
3051
  r({
3025
3052
  isAuthenticated: !0,
3026
3053
  isLoading: !1,
3027
- user: ne(p),
3054
+ user: ne(S),
3028
3055
  error: null
3029
3056
  });
3030
3057
  return;
3031
3058
  }
3032
- if (e.devLoginToken && m && !c && !qt(e.devLoginToken)) {
3059
+ if (u && e.devLoginToken) {
3033
3060
  const b = {
3034
3061
  token: e.devLoginToken,
3035
3062
  provider: "dev",
@@ -3052,7 +3079,7 @@ function Os({ children: t, config: e }) {
3052
3079
  })();
3053
3080
  }, [e.devLoginToken, e.devLoginRunId]);
3054
3081
  const o = j(
3055
- async (y) => {
3082
+ async (g) => {
3056
3083
  if (!e.spaceId) {
3057
3084
  r((c) => ({
3058
3085
  ...c,
@@ -3061,7 +3088,7 @@ function Os({ children: t, config: e }) {
3061
3088
  return;
3062
3089
  }
3063
3090
  const m = await ve(e.authUrl);
3064
- if (y === "guest") {
3091
+ if (g === "guest") {
3065
3092
  r((c) => ({ ...c, isLoading: !0 }));
3066
3093
  try {
3067
3094
  const c = await Qt(e.spaceId, m);
@@ -3080,14 +3107,14 @@ function Os({ children: t, config: e }) {
3080
3107
  }
3081
3108
  return;
3082
3109
  }
3083
- if (y === "passkey") {
3110
+ if (g === "passkey") {
3084
3111
  r((c) => ({ ...c, isLoading: !0, error: null }));
3085
3112
  try {
3086
- const c = await Do(m), u = await Go({ optionsJSON: c }), g = await jo(m, u);
3113
+ const c = await $o(m), u = await Xo({ optionsJSON: c }), y = await Bo(m, u);
3087
3114
  r({
3088
3115
  isAuthenticated: !0,
3089
3116
  isLoading: !1,
3090
- user: ne(g),
3117
+ user: ne(y),
3091
3118
  error: null
3092
3119
  });
3093
3120
  } catch (c) {
@@ -3099,24 +3126,24 @@ function Os({ children: t, config: e }) {
3099
3126
  }
3100
3127
  return;
3101
3128
  }
3102
- if (y === "email")
3129
+ if (g === "email")
3103
3130
  throw new Error("login('email') is not supported. Use requestEmailCode()/submitEmailCode() from useAuth() instead.");
3104
- window.location.href = Po(y, e.spaceId, m);
3131
+ window.location.href = Mo(g, e.spaceId, m);
3105
3132
  },
3106
3133
  [e.authUrl, e.spaceId]
3107
3134
  ), s = j(
3108
- async (y) => {
3135
+ async (g) => {
3109
3136
  if (!e.spaceId)
3110
3137
  throw r((c) => ({ ...c, error: "Space ID is not configured" })), new Error("Space ID is not configured");
3111
3138
  const m = await ve(e.authUrl);
3112
- await Oo({ email: y, spaceId: e.spaceId, authUrl: m });
3139
+ await No({ email: g, spaceId: e.spaceId, authUrl: m });
3113
3140
  },
3114
3141
  [e.authUrl, e.spaceId]
3115
3142
  ), i = j(
3116
- async (y, m) => {
3143
+ async (g, m) => {
3117
3144
  r((c) => ({ ...c, isLoading: !0, error: null }));
3118
3145
  try {
3119
- const c = await ve(e.authUrl), u = await xo({ email: y, code: m, authUrl: c });
3146
+ const c = await ve(e.authUrl), u = await Lo({ email: g, code: m, authUrl: c });
3120
3147
  r({
3121
3148
  isAuthenticated: !0,
3122
3149
  isLoading: !1,
@@ -3125,7 +3152,7 @@ function Os({ children: t, config: e }) {
3125
3152
  });
3126
3153
  } catch (c) {
3127
3154
  const u = c instanceof Error ? c.message : "Code verification failed";
3128
- throw r((g) => ({ ...g, isLoading: !1, error: u })), c;
3155
+ throw r((y) => ({ ...y, isLoading: !1, error: u })), c;
3129
3156
  }
3130
3157
  },
3131
3158
  [e.authUrl]
@@ -3137,15 +3164,15 @@ function Os({ children: t, config: e }) {
3137
3164
  error: null
3138
3165
  });
3139
3166
  }, []), l = j(
3140
- async (y) => {
3167
+ async (g) => {
3141
3168
  const m = await ve(e.authUrl);
3142
3169
  r((c) => ({ ...c, isLoading: !0, error: null }));
3143
3170
  try {
3144
- const c = await Uo(m), u = await Wo({ optionsJSON: c }), g = await Mo(m, u, y);
3171
+ const c = await Do(m), u = await Yo({ optionsJSON: c }), y = await jo(m, u, g);
3145
3172
  r({
3146
3173
  isAuthenticated: !0,
3147
3174
  isLoading: !1,
3148
- user: ne(g),
3175
+ user: ne(y),
3149
3176
  error: null
3150
3177
  });
3151
3178
  } catch (c) {
@@ -3157,7 +3184,7 @@ function Os({ children: t, config: e }) {
3157
3184
  }
3158
3185
  },
3159
3186
  [e.authUrl]
3160
- ), h = j(() => n.user?.token ?? null, [n.user]), f = W(
3187
+ ), h = j(() => n.user?.token ?? null, [n.user]), f = V(
3161
3188
  () => ({
3162
3189
  state: n,
3163
3190
  login: o,
@@ -3171,17 +3198,17 @@ function Os({ children: t, config: e }) {
3171
3198
  );
3172
3199
  return /* @__PURE__ */ w.jsx(ut, { value: f, children: t });
3173
3200
  }
3174
- function zo() {
3201
+ function Ho() {
3175
3202
  const t = st(ut);
3176
3203
  if (!t)
3177
3204
  throw new Error("useAuth must be used within an AuthProvider");
3178
3205
  return t;
3179
3206
  }
3180
- function Xo() {
3207
+ function qo() {
3181
3208
  return st(ut);
3182
3209
  }
3183
- function xs(t) {
3184
- const { config: e, guestUrlParam: n } = t, { state: r, login: o } = zo(), s = E(!1);
3210
+ function Ls(t) {
3211
+ const { config: e, guestUrlParam: n } = t, { state: r, login: o } = Ho(), s = E(!1);
3185
3212
  return C(() => {
3186
3213
  if (!n || r.isAuthenticated || r.isLoading || s.current || !e.methods.includes("guest"))
3187
3214
  return;
@@ -3204,9 +3231,9 @@ const on = (() => {
3204
3231
  } catch {
3205
3232
  return !1;
3206
3233
  }
3207
- })(), sn = Date.now(), re = [], Ho = 300;
3234
+ })(), sn = Date.now(), re = [], Jo = 300;
3208
3235
  function Ie(t) {
3209
- re.push(`[+${((Date.now() - sn) / 1e3).toFixed(1)}s] ${t}`), re.length > Ho && re.shift();
3236
+ re.push(`[+${((Date.now() - sn) / 1e3).toFixed(1)}s] ${t}`), re.length > Jo && re.shift();
3210
3237
  }
3211
3238
  function Lt(t) {
3212
3239
  if (typeof t == "string")
@@ -3242,7 +3269,7 @@ function an() {
3242
3269
  }
3243
3270
  }
3244
3271
  on && an();
3245
- function qo() {
3272
+ function Zo() {
3246
3273
  let t = !1;
3247
3274
  try {
3248
3275
  const e = URL.createObjectURL(new Blob([""]));
@@ -3253,11 +3280,11 @@ function qo() {
3253
3280
  }
3254
3281
  return t;
3255
3282
  }
3256
- function Jo() {
3283
+ function Qo() {
3257
3284
  const t = globalThis;
3258
3285
  return [
3259
3286
  `Worker=${typeof Worker < "u"}`,
3260
- `moduleWorker=${qo()}`,
3287
+ `moduleWorker=${Zo()}`,
3261
3288
  `WebSocket=${typeof WebSocket < "u"}`,
3262
3289
  `WebTransport=${typeof t.WebTransport < "u"}`,
3263
3290
  `RTCPeerConnection=${typeof RTCPeerConnection < "u"}`,
@@ -3270,7 +3297,7 @@ function Jo() {
3270
3297
  `online=${typeof navigator < "u" ? navigator.onLine : "?"}`
3271
3298
  ].join(" ");
3272
3299
  }
3273
- function Zo(t) {
3300
+ function es(t) {
3274
3301
  return /ERROR|error:|Rejection/.test(t) ? "#f88" : /WARN|warn:/.test(t) ? "#fc6" : "#9d9";
3275
3302
  }
3276
3303
  function cn({ state: t = "", forceVisible: e = !1 }) {
@@ -3311,12 +3338,12 @@ function cn({ state: t = "", forceVisible: e = !1 }) {
3311
3338
  ] }),
3312
3339
  /* @__PURE__ */ w.jsx("div", { style: { color: "#9cf", wordBreak: "break-all", marginBottom: "4px" }, children: typeof window < "u" ? window.location.href : "" }),
3313
3340
  /* @__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: Jo() }),
3341
+ /* @__PURE__ */ w.jsx("div", { style: { color: "#8cf", marginBottom: "4px" }, children: Qo() }),
3315
3342
  /* @__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: Zo(l), wordBreak: "break-all" }, children: l }, h)) })
3343
+ /* @__PURE__ */ w.jsx("div", { children: re.length === 0 ? "(nothing captured yet)" : re.map((l, h) => /* @__PURE__ */ w.jsx("div", { style: { color: es(l), wordBreak: "break-all" }, children: l }, h)) })
3317
3344
  ] });
3318
3345
  }
3319
- function Ns({
3346
+ function Ps({
3320
3347
  connectionState: t,
3321
3348
  error: e,
3322
3349
  isReady: n,
@@ -3330,11 +3357,11 @@ function Ns({
3330
3357
  renderIdle: l,
3331
3358
  renderConnecting: h,
3332
3359
  renderConnectingSlow: f,
3333
- renderConnected: y,
3360
+ renderConnected: g,
3334
3361
  renderOffline: m,
3335
3362
  renderError: c
3336
3363
  }) {
3337
- const u = E(!1), g = (() => {
3364
+ const u = E(!1), y = (() => {
3338
3365
  switch (t) {
3339
3366
  case "waitingForExternalConnectUrl":
3340
3367
  case "connecting":
@@ -3344,7 +3371,7 @@ function Ns({
3344
3371
  if (!n || !o || !s) return null;
3345
3372
  t === "reconnecting" && (u.current = !0);
3346
3373
  const p = o.size > 0;
3347
- return p && (u.current = !1), y({
3374
+ return p && (u.current = !1), g({
3348
3375
  stores: o,
3349
3376
  registry: s,
3350
3377
  client: i,
@@ -3364,23 +3391,23 @@ function Ns({
3364
3391
  }
3365
3392
  })();
3366
3393
  return /* @__PURE__ */ w.jsxs(w.Fragment, { children: [
3367
- g,
3394
+ y,
3368
3395
  /* @__PURE__ */ w.jsx(cn, { state: t })
3369
3396
  ] });
3370
3397
  }
3371
3398
  const Oe = oe("useIkonApp");
3372
- function Qo() {
3399
+ function ts() {
3373
3400
  if (typeof window < "u" && window.__IKON_AUTH_CONFIG__)
3374
3401
  return window.__IKON_AUTH_CONFIG__;
3375
3402
  }
3376
- function es() {
3403
+ function ns() {
3377
3404
  if (typeof window < "u" && window.__IKON_LOCAL_IKON_SERVER_CONFIG__)
3378
3405
  return window.__IKON_LOCAL_IKON_SERVER_CONFIG__;
3379
3406
  }
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
- 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
- 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(() => {
3407
+ function Us(t) {
3408
+ const { authConfig: e, modules: n, timeouts: r, backgroundAudio: o, webRtc: s, audio: i, video: a, websocket: l, webtransport: h, proxy: f, liveSnapshot: g, bootSnapshot: m } = t, c = e === void 0 ? ts() ?? null : e, u = ns(), y = qo(), p = E(null), S = E(null), b = 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(g), $ = E(m), W = E("local"), K = E(void 0);
3409
+ 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 = g, $.current = m;
3410
+ 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 = V(() => {
3384
3411
  try {
3385
3412
  const _ = In();
3386
3413
  return (_.sessionId || _.channelKey) && On(), _;
@@ -3389,13 +3416,13 @@ function Ls(t) {
3389
3416
  }
3390
3417
  }, []);
3391
3418
  m !== !1 && vn();
3392
- 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);
3419
+ const ce = V(() => 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);
3393
3420
  Fe && !ae && !De && !je.current && (je.current = !0, ve(c.authUrl).then((_) => Qt(c.spaceId, _)).then((_) => {
3394
3421
  un(_.token), dt(!0);
3395
3422
  }).catch((_) => {
3396
3423
  Oe.error("Anonymous auth failed:", _), je.current = !1, Ae ? dt(!0) : N(_ instanceof Error ? _.message : "Anonymous auth failed");
3397
3424
  }));
3398
- const Ve = W(() => {
3425
+ const We = V(() => {
3399
3426
  if (Ae) {
3400
3427
  if (Fe && !De)
3401
3428
  return null;
@@ -3442,21 +3469,21 @@ function Ls(t) {
3442
3469
  }
3443
3470
  };
3444
3471
  }, [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, eo(ie);
3446
- const hn = no(ie);
3472
+ W.current = c?.spaceId ?? "local", K.current = ce?.token ?? ae ?? void 0, no(ie);
3473
+ const hn = oo(ie);
3447
3474
  C(() => {
3448
3475
  if (!R.current) {
3449
- if (R.current = !0, S.current = Gr(), n)
3476
+ if (R.current = !0, b.current = Xr(), n)
3450
3477
  for (const _ of n)
3451
- _(S.current);
3452
- S.current.loadRegisteredModules().catch((_) => {
3478
+ _(b.current);
3479
+ b.current.loadRegisteredModules().catch((_) => {
3453
3480
  Oe.error("Failed to load UI modules", _);
3454
3481
  });
3455
3482
  }
3456
3483
  }, []), C(() => {
3457
- if (!Ve) return;
3484
+ if (!We) return;
3458
3485
  const _ = new xn({
3459
- ...Ve,
3486
+ ...We,
3460
3487
  timeouts: U.current,
3461
3488
  audio: te.current !== void 0 || T.current ? {
3462
3489
  enabled: te.current,
@@ -3476,8 +3503,8 @@ function Ls(t) {
3476
3503
  }
3477
3504
  });
3478
3505
  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 er({ client: _, liveSnapshot: gn, bootSnapshot: $.current });
3480
- b.current = ke, Me(ke), A(!1);
3506
+ const q = B.current ?? !0, Te = K.current, ft = Te ? pt(Te) ?? null : null, gn = q && ft ? { enabled: !0, appId: W.current, userId: ft } : void 0, ke = new er({ client: _, liveSnapshot: gn, bootSnapshot: $.current });
3507
+ S.current = ke, Me(ke), A(!1);
3481
3508
  const yn = ke.subscribeToUiUpdates(() => {
3482
3509
  A(!0), Nn();
3483
3510
  });
@@ -3490,11 +3517,11 @@ function Ls(t) {
3490
3517
  Q(!0);
3491
3518
  return;
3492
3519
  }
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)));
3520
+ J instanceof Un && !v.current && (v.current = !0, Oe.warn("Auth session appears stale, clearing and retrying"), Ut.clearAll(), y ? y.logout() : (Le(), fn((bn) => bn + 1)));
3494
3521
  }), () => {
3495
- yn(), _.disconnect(), p.current = null, ke.dispose(), b.current = null;
3522
+ yn(), _.disconnect(), p.current = null, ke.dispose(), S.current = null;
3496
3523
  };
3497
- }, [Ve]);
3524
+ }, [We]);
3498
3525
  const pn = j((_, q) => {
3499
3526
  const Te = typeof q == "string" ? q : JSON.stringify(q ?? {});
3500
3527
  p.current?.sendActionCall(_, Te);
@@ -3507,30 +3534,30 @@ function Ls(t) {
3507
3534
  const _ = p.current?.slowConnectionThresholdMs ?? 5e3, q = setTimeout(() => pe(!0), _);
3508
3535
  return () => clearTimeout(q);
3509
3536
  }, [H]);
3510
- const mn = H === "connected" || H === "reconnecting", We = d && H !== "offline";
3537
+ const mn = H === "connected" || H === "reconnecting", Ve = d && H !== "offline";
3511
3538
  return C(() => {
3512
- typeof document > "u" || (document.documentElement.dataset.ikonLive = String(We));
3513
- }, [We]), {
3539
+ typeof document > "u" || (document.documentElement.dataset.ikonLive = String(Ve));
3540
+ }, [Ve]), {
3514
3541
  connectionState: H,
3515
3542
  error: O,
3516
3543
  accessDeniedReason: se,
3517
3544
  isServerFull: L,
3518
3545
  stores: hn,
3519
3546
  client: p.current,
3520
- registry: S.current,
3547
+ registry: b.current,
3521
3548
  clientRef: p,
3522
- uiRef: b,
3523
- registryRef: S,
3549
+ uiRef: S,
3550
+ registryRef: b,
3524
3551
  onAction: pn,
3525
3552
  isReady: mn,
3526
- isLive: We,
3553
+ isLive: Ve,
3527
3554
  brandingRequired: p.current?.brandingRequired ?? !1,
3528
3555
  isConnectingSlow: Re,
3529
3556
  webRtcVideoStreams: p.current?.webRtcVideoStreams ?? /* @__PURE__ */ new Map(),
3530
3557
  webRtcTrackMap: p.current?.webRtcTrackMap ?? /* @__PURE__ */ new Map()
3531
3558
  };
3532
3559
  }
3533
- function Ps(t) {
3560
+ function Ms(t) {
3534
3561
  const e = E(!1);
3535
3562
  return j(() => {
3536
3563
  if (e.current) return;
@@ -3539,8 +3566,8 @@ function Ps(t) {
3539
3566
  n.rel = "stylesheet", n.href = t, document.head.appendChild(n);
3540
3567
  }, [t]);
3541
3568
  }
3542
- let ts = 0;
3543
- function ns(t = 5, e = 5e3) {
3569
+ let rs = 0;
3570
+ function os(t = 5, e = 5e3) {
3544
3571
  const [n, r] = x([]), o = E(/* @__PURE__ */ new Map()), s = j((i) => {
3545
3572
  const a = o.current.get(i);
3546
3573
  a && (clearTimeout(a), o.current.delete(i)), r((l) => l.filter((h) => h.id !== i));
@@ -3550,13 +3577,13 @@ function ns(t = 5, e = 5e3) {
3550
3577
  (l) => {
3551
3578
  if (!$t())
3552
3579
  return;
3553
- const h = `toast-${++ts}`, f = l.level === Je.ERROR ? "error" : "warn", y = {
3580
+ const h = `toast-${++rs}`, f = l.level === Je.ERROR ? "error" : "warn", g = {
3554
3581
  id: h,
3555
3582
  level: f,
3556
3583
  message: l.message,
3557
3584
  component: l.component
3558
3585
  };
3559
- r((c) => [...c, y].slice(-t));
3586
+ r((c) => [...c, g].slice(-t));
3560
3587
  const m = setTimeout(() => {
3561
3588
  s(h);
3562
3589
  }, e);
@@ -3572,7 +3599,7 @@ function ns(t = 5, e = 5e3) {
3572
3599
  };
3573
3600
  }, [t, e, s]), { toasts: n, dismissToast: s };
3574
3601
  }
3575
- function rs(t, e, n) {
3602
+ function ss(t, e, n) {
3576
3603
  const [r, o] = x(n);
3577
3604
  return C(() => {
3578
3605
  if (!t)
@@ -3589,7 +3616,7 @@ function rs(t, e, n) {
3589
3616
  };
3590
3617
  }, [t, e]), r;
3591
3618
  }
3592
- function Us(t, e, n) {
3619
+ function Ds(t, e, n) {
3593
3620
  const [r, o] = x(null);
3594
3621
  return C(() => {
3595
3622
  if (!t)
@@ -3602,58 +3629,58 @@ function Us(t, e, n) {
3602
3629
  }), () => {
3603
3630
  s = !1;
3604
3631
  };
3605
- }, [t, e]), rs(r ? t : null, r ?? "", n);
3632
+ }, [t, e]), ss(r ? t : null, r ?? "", n);
3606
3633
  }
3607
- const ue = oe("IkonDebug"), os = {
3634
+ const ue = oe("IkonDebug"), is = {
3608
3635
  Digit1: "connecting",
3609
3636
  Digit2: "connected",
3610
3637
  Digit3: "reconnecting",
3611
3638
  Digit4: "offline",
3612
3639
  Digit5: "offline",
3613
3640
  Digit0: "clear"
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
- 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);
3641
+ }, as = "Digit5", cs = "Digit6", ls = "Synthetic debug error (Ctrl+Shift+5)", us = "Synthetic debug access-denied (Ctrl+Shift+6)", ds = 5e3;
3642
+ function fs(t) {
3643
+ const e = $t(), [n, r] = x(null), [o, s] = x(!1), [i, a] = x(null), [l, h] = x(null), [f, g] = x(!1), [m, c] = x(!1), [u, y] = x(!1);
3617
3644
  return C(() => {
3618
3645
  if (!e)
3619
3646
  return;
3620
- const b = (S) => {
3621
- if (!S.ctrlKey || !S.shiftKey)
3647
+ const S = (b) => {
3648
+ if (!b.ctrlKey || !b.shiftKey)
3622
3649
  return;
3623
- if (S.code === "KeyE") {
3624
- S.preventDefault(), y((T) => (ue.warn(`Empty-stores override: ${T ? "off" : "on"}`), !T));
3650
+ if (b.code === "KeyE") {
3651
+ b.preventDefault(), g((T) => (ue.warn(`Empty-stores override: ${T ? "off" : "on"}`), !T));
3625
3652
  return;
3626
3653
  }
3627
- if (S.code === "Digit7") {
3628
- S.preventDefault(), c((T) => (ue.warn(`Branding-banner override: ${T ? "off" : "on"}`), !T));
3654
+ if (b.code === "Digit7") {
3655
+ b.preventDefault(), c((T) => (ue.warn(`Branding-banner override: ${T ? "off" : "on"}`), !T));
3629
3656
  return;
3630
3657
  }
3631
- if (S.code === "Digit8") {
3632
- S.preventDefault(), g((T) => (ue.warn(`Debug-overlay override: ${T ? "off" : "on"}`), !T));
3658
+ if (b.code === "Digit8") {
3659
+ b.preventDefault(), y((T) => (ue.warn(`Debug-overlay override: ${T ? "off" : "on"}`), !T));
3633
3660
  return;
3634
3661
  }
3635
- if (S.code === is) {
3636
- S.preventDefault(), h(cs), r(null), a(null), ue.warn("Forced access denied");
3662
+ if (b.code === cs) {
3663
+ b.preventDefault(), h(us), r(null), a(null), ue.warn("Forced access denied");
3637
3664
  return;
3638
3665
  }
3639
- const R = os[S.code];
3666
+ const R = is[b.code];
3640
3667
  if (R === void 0)
3641
3668
  return;
3642
- if (S.preventDefault(), R === "clear") {
3669
+ if (b.preventDefault(), R === "clear") {
3643
3670
  r(null), a(null), h(null), ue.warn("Cleared forced state");
3644
3671
  return;
3645
3672
  }
3646
- const v = S.code === ss;
3647
- r(R), a(v ? as : null), h(null), ue.warn(`Forced state: ${R}${v ? " (with error)" : ""}`);
3673
+ const v = b.code === as;
3674
+ r(R), a(v ? ls : null), h(null), ue.warn(`Forced state: ${R}${v ? " (with error)" : ""}`);
3648
3675
  };
3649
- return window.addEventListener("keydown", b), () => window.removeEventListener("keydown", b);
3676
+ return window.addEventListener("keydown", S), () => window.removeEventListener("keydown", S);
3650
3677
  }, [e]), C(() => {
3651
3678
  if (n !== "connecting") {
3652
3679
  s(!1);
3653
3680
  return;
3654
3681
  }
3655
- const b = setTimeout(() => s(!0), ls);
3656
- return () => clearTimeout(b);
3682
+ const S = setTimeout(() => s(!0), ds);
3683
+ return () => clearTimeout(S);
3657
3684
  }, [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
3685
  ...t,
3659
3686
  connectionState: n ?? t.connectionState,
@@ -3663,34 +3690,34 @@ function us(t) {
3663
3690
  accessDeniedReason: l ?? t.accessDeniedReason
3664
3691
  }, forcedState: n, emptyStores: f, forcedError: i, forcedAccessDenied: l, forcedBranding: m, forcedDebugOverlay: u, debugEnabled: e };
3665
3692
  }
3666
- function ds(t, e) {
3693
+ function hs(t, e) {
3667
3694
  return t === void 0 ? null : typeof t == "function" ? t(e) : t;
3668
3695
  }
3669
- function fs(t) {
3696
+ function ps(t) {
3670
3697
  return t === void 0 ? null : typeof t == "function" ? t() : t;
3671
3698
  }
3672
- function hs(t, e) {
3699
+ function ms(t, e) {
3673
3700
  return t === void 0 ? null : typeof t == "function" ? t(e) : t;
3674
3701
  }
3675
- function ps(t, e) {
3702
+ function gs(t, e) {
3676
3703
  return t === void 0 ? null : typeof t == "function" ? t(e) : t;
3677
3704
  }
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
- if (f && y && (u || f.size > 0) && (R.current = { stores: f, registry: y, client: m }), p)
3681
- return ps(o, p);
3705
+ function js(t) {
3706
+ const { connectingOverlay: e, reconnectingOverlay: n, offlineOverlay: r, accessDeniedScreen: o, ...s } = t, i = fs(s), { app: a } = i, { connectionState: l, isConnectingSlow: h, stores: f, registry: g, client: m, onAction: c, isReady: u, error: y, accessDeniedReason: p, brandingRequired: S } = a, b = S || i.forcedBranding, R = E(null);
3707
+ if (f && g && (u || f.size > 0) && (R.current = { stores: f, registry: g, client: m }), p)
3708
+ return gs(o, p);
3682
3709
  const v = R.current;
3683
3710
  let T = null;
3684
3711
  switch (l) {
3685
3712
  case "waitingForExternalConnectUrl":
3686
3713
  case "connecting":
3687
- T = ds(e, h);
3714
+ T = hs(e, h);
3688
3715
  break;
3689
3716
  case "reconnecting":
3690
- T = fs(n);
3717
+ T = ps(n);
3691
3718
  break;
3692
3719
  case "offline":
3693
- T = hs(r, g);
3720
+ T = ms(r, y);
3694
3721
  break;
3695
3722
  default:
3696
3723
  T = null;
@@ -3706,18 +3733,18 @@ function Ms(t) {
3706
3733
  }
3707
3734
  ),
3708
3735
  T,
3709
- S && /* @__PURE__ */ w.jsx(gs, {}),
3710
- /* @__PURE__ */ w.jsx(ys, {}),
3736
+ b && /* @__PURE__ */ w.jsx(bs, {}),
3737
+ /* @__PURE__ */ w.jsx(Ss, {}),
3711
3738
  /* @__PURE__ */ w.jsx(cn, { state: l, forceVisible: i.forcedDebugOverlay })
3712
3739
  ] });
3713
3740
  }
3714
- const ms = "https://ikonai.com";
3715
- function gs() {
3741
+ const ys = "https://ikonai.com";
3742
+ function bs() {
3716
3743
  return /* @__PURE__ */ w.jsxs(
3717
3744
  "a",
3718
3745
  {
3719
3746
  className: "ikon-branding-banner",
3720
- href: ms,
3747
+ href: ys,
3721
3748
  target: "_blank",
3722
3749
  rel: "noopener noreferrer",
3723
3750
  style: {
@@ -3745,11 +3772,11 @@ function gs() {
3745
3772
  }
3746
3773
  );
3747
3774
  }
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)) });
3775
+ function Ss() {
3776
+ const { toasts: t, dismissToast: e } = os();
3777
+ return t.length === 0 ? null : /* @__PURE__ */ w.jsx("div", { className: "ikon-toast-overlay", children: t.map((n) => /* @__PURE__ */ w.jsx(ws, { toast: n, onDismiss: e }, n.id)) });
3751
3778
  }
3752
- function bs({ toast: t, onDismiss: e }) {
3779
+ function ws({ toast: t, onDismiss: e }) {
3753
3780
  return /* @__PURE__ */ w.jsxs(
3754
3781
  "div",
3755
3782
  {
@@ -3771,30 +3798,30 @@ function bs({ toast: t, onDismiss: e }) {
3771
3798
  );
3772
3799
  }
3773
3800
  const ln = Mt(null);
3774
- function Ss(t, e) {
3801
+ function vs(t, e) {
3775
3802
  return e ? t.replace(/\{(\w+)\}/g, (n, r) => e[r] ?? `{${r}}`) : t;
3776
3803
  }
3777
- function ws(t, e) {
3804
+ function Es(t, e) {
3778
3805
  const n = Mn();
3779
3806
  if (n && t.includes(n))
3780
3807
  return n;
3781
3808
  const r = navigator.language.split("-")[0];
3782
3809
  return t.includes(r) ? r : e && t.includes(e) ? e : "en";
3783
3810
  }
3784
- function vs(t, e, n) {
3785
- return e ? ws(t, n) : n && t.includes(n) ? n : "en";
3811
+ function Rs(t, e, n) {
3812
+ return e ? Es(t, n) : n && t.includes(n) ? n : "en";
3786
3813
  }
3787
- function Ds({
3814
+ function $s({
3788
3815
  children: t,
3789
3816
  translations: e,
3790
3817
  defaultLanguage: n,
3791
3818
  detectLanguage: r = !1
3792
3819
  }) {
3793
- const o = Object.keys(e), s = vs(o, r, n), i = e[s] ?? e.en, a = W(
3820
+ const o = Object.keys(e), s = Rs(o, r, n), i = e[s] ?? e.en, a = V(
3794
3821
  () => ({
3795
3822
  t: (l, h) => {
3796
3823
  const f = i[l];
3797
- return Ss(f, h);
3824
+ return vs(f, h);
3798
3825
  },
3799
3826
  locale: s,
3800
3827
  translations: i
@@ -3803,72 +3830,72 @@ function Ds({
3803
3830
  );
3804
3831
  return /* @__PURE__ */ w.jsx(ln, { value: a, children: t });
3805
3832
  }
3806
- function js() {
3833
+ function Bs() {
3807
3834
  const t = st(ln);
3808
3835
  if (!t)
3809
3836
  throw new Error("useI18n must be used within an I18nProvider");
3810
3837
  return t;
3811
3838
  }
3812
3839
  export {
3813
- Os as AuthProvider,
3814
- Ns as ConnectionStateRenderer,
3840
+ Ns as AuthProvider,
3841
+ Ps as ConnectionStateRenderer,
3815
3842
  on as DEBUG_OVERLAY_ENABLED,
3816
3843
  cn as DebugOverlay,
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,
3844
+ $s as I18nProvider,
3845
+ gr as IKON_UI_BASE_MODULE,
3846
+ _r as IKON_UI_MEDIA_MODULE,
3847
+ Kr as IKON_UI_SHADERTOY_MODULE,
3848
+ Wr as IKON_UI_SHADERTOY_TYPE,
3822
3849
  Qe as IKON_UI_STREAM_CATEGORY,
3823
- vr as IKON_UI_VIDEO_CANVAS_TYPE,
3824
- Er as IKON_UI_VIDEO_URL_PLAYER_TYPE,
3825
- Ms as IkonApp,
3850
+ Rr as IKON_UI_VIDEO_CANVAS_TYPE,
3851
+ Ar as IKON_UI_VIDEO_URL_PLAYER_TYPE,
3852
+ js as IkonApp,
3826
3853
  er as IkonUi,
3827
- Yr as IkonUiRegistry,
3854
+ zr as IkonUiRegistry,
3828
3855
  Bt as IkonUiSurface,
3829
3856
  Jn as InspectOverlay,
3830
- _s as ParallaxView,
3857
+ Os as ParallaxView,
3831
3858
  qn as UiComponentRegistry,
3832
3859
  Hn as UiRenderer,
3833
- Fs as UiStreamStore,
3860
+ Vs as UiStreamStore,
3834
3861
  Qt as authenticateAnonymous,
3835
- Po as buildOAuthRedirectUrl,
3862
+ Mo as buildOAuthRedirectUrl,
3836
3863
  Le as clearAuthSession,
3837
3864
  Nt as clearOAuthParams,
3838
- hr as createBaseResolvers,
3839
- ks as createComponentLibrary,
3840
- Gr as createIkonUiRegistry,
3841
- Ar as createMediaResolvers,
3842
- Fr as createShadertoyRendererResolver,
3865
+ mr as createBaseResolvers,
3866
+ _s as createComponentLibrary,
3867
+ Xr as createIkonUiRegistry,
3868
+ kr as createMediaResolvers,
3869
+ Vr as createShadertoyRendererResolver,
3843
3870
  Qn as isIkonUiCategoryMatch,
3844
3871
  Jt as loadAuthSession,
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,
3872
+ yr as loadBaseModule,
3873
+ Ir as loadMediaModule,
3874
+ Yr as loadShadertoyModule,
3875
+ Po as parseOAuthCallback,
3876
+ Uo as parseOAuthError,
3877
+ Ys as randomUuid,
3878
+ br as registerBaseModule,
3879
+ Or as registerMediaModule,
3880
+ Gr as registerShadertoyModule,
3854
3881
  zn as renderChildren,
3855
- Is as renderMotionLetters,
3882
+ xs as renderMotionLetters,
3856
3883
  he as saveAuthSession,
3857
- Oo as sendLoginCode,
3884
+ No as sendLoginCode,
3858
3885
  ne as sessionToUser,
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,
3886
+ Ho as useAuth,
3887
+ Ls as useAuthGuard,
3888
+ qo as useAuthOptional,
3889
+ Bs as useI18n,
3890
+ Us as useIkonApp,
3891
+ fs as useIkonDebug,
3892
+ ss as useIkonReactive,
3893
+ no as useIkonStyles,
3894
+ oo as useIkonUiStores,
3895
+ Ms as useLazyFont,
3896
+ Ds as useReactive,
3897
+ os as useToasts,
3871
3898
  Z as useUiNode,
3872
- Cs as useUiStore,
3873
- xo as verifyLoginCode
3899
+ Is as useUiStore,
3900
+ Lo as verifyLoginCode
3874
3901
  };