@ikonai/sdk-react-ui 1.0.27 → 1.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { IkonUiCore as kt, UiStreamStore as Ct } from "@ikonai/sdk-ui";
2
- import { UiStreamStore as Co } from "@ikonai/sdk-ui";
3
- import It, { useSyncExternalStore as Ue, useMemo as $, memo as V, useRef as T, useCallback as x, Fragment as Ot, useEffect as L, useState as G, createContext as lt, use as xe } from "react";
4
- import { createLogger as pe, getOrCreateDeviceId as _t, deriveAuthUrl as Oe, parseUrlParams as Nt, clearSessionParamsFromUrl as Pt, isCloudEnvironment as Ke, extractUserIdFromToken as jt, deriveBackendType as Ye, IkonClient as Mt, subscribeToLogEvents as Lt, isDebugModeEnabled as Ut, LogLevel as We } from "@ikonai/sdk";
5
- var le = { exports: {} }, re = {};
1
+ import { IkonUiCore as It, UiStreamStore as Ot } from "@ikonai/sdk-ui";
2
+ import { UiStreamStore as Mo } from "@ikonai/sdk-ui";
3
+ import _t, { useSyncExternalStore as Fe, useMemo as K, memo as W, useRef as v, useCallback as D, Fragment as Nt, useEffect as L, useState as G, createContext as ht, use as Be } from "react";
4
+ import { createLogger as Re, getOrCreateDeviceId as Pt, deriveAuthUrl as Pe, parseUrlParams as Mt, clearSessionParamsFromUrl as jt, isCloudEnvironment as ze, extractUserIdFromToken as Lt, deriveBackendType as qe, IkonClient as Ut, AuthenticationError as xt, subscribeToLogEvents as Dt, isDebugModeEnabled as Ft, LogLevel as Ge, getLangParam as Bt } from "@ikonai/sdk";
5
+ var pe = { exports: {} }, ie = {};
6
6
  /**
7
7
  * @license React
8
8
  * react-jsx-runtime.production.js
@@ -12,10 +12,10 @@ var le = { exports: {} }, re = {};
12
12
  * This source code is licensed under the MIT license found in the
13
13
  * LICENSE file in the root directory of this source tree.
14
14
  */
15
- var ze;
16
- function xt() {
17
- if (ze) return re;
18
- ze = 1;
15
+ var He;
16
+ function $t() {
17
+ if (He) return ie;
18
+ He = 1;
19
19
  var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
20
20
  function r(n, o, s) {
21
21
  var i = null;
@@ -32,9 +32,9 @@ function xt() {
32
32
  props: s
33
33
  };
34
34
  }
35
- return re.Fragment = e, re.jsx = r, re.jsxs = r, re;
35
+ return ie.Fragment = e, ie.jsx = r, ie.jsxs = r, ie;
36
36
  }
37
- var ne = {};
37
+ var ae = {};
38
38
  /**
39
39
  * @license React
40
40
  * react-jsx-runtime.development.js
@@ -44,26 +44,26 @@ var ne = {};
44
44
  * This source code is licensed under the MIT license found in the
45
45
  * LICENSE file in the root directory of this source tree.
46
46
  */
47
- var qe;
48
- function Dt() {
49
- return qe || (qe = 1, process.env.NODE_ENV !== "production" && function() {
47
+ var Je;
48
+ function Vt() {
49
+ return Je || (Je = 1, process.env.NODE_ENV !== "production" && function() {
50
50
  function t(d) {
51
51
  if (d == null) return null;
52
52
  if (typeof d == "function")
53
53
  return d.$$typeof === F ? null : d.displayName || d.name || null;
54
54
  if (typeof d == "string") return d;
55
55
  switch (d) {
56
- case S:
56
+ case b:
57
57
  return "Fragment";
58
- case p:
58
+ case g:
59
59
  return "Profiler";
60
- case m:
60
+ case p:
61
61
  return "StrictMode";
62
- case D:
62
+ case M:
63
63
  return "Suspense";
64
64
  case z:
65
65
  return "SuspenseList";
66
- case I:
66
+ case _:
67
67
  return "Activity";
68
68
  }
69
69
  if (typeof d == "object")
@@ -74,17 +74,17 @@ function Dt() {
74
74
  return "Portal";
75
75
  case k:
76
76
  return (d.displayName || "Context") + ".Provider";
77
- case v:
77
+ case w:
78
78
  return (d._context.displayName || "Context") + ".Consumer";
79
- case _:
80
- var w = d.render;
81
- return d = d.displayName, d || (d = w.displayName || w.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d;
82
- case H:
83
- return w = d.displayName || null, w !== null ? w : t(d.type) || "Memo";
84
- case C:
85
- w = d._payload, d = d._init;
79
+ case O:
80
+ var S = d.render;
81
+ return d = d.displayName, d || (d = S.displayName || S.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d;
82
+ case Q:
83
+ return S = d.displayName || null, S !== null ? S : t(d.type) || "Memo";
84
+ case T:
85
+ S = d._payload, d = d._init;
86
86
  try {
87
- return t(d(w));
87
+ return t(d(S));
88
88
  } catch {
89
89
  }
90
90
  }
@@ -96,33 +96,33 @@ function Dt() {
96
96
  function r(d) {
97
97
  try {
98
98
  e(d);
99
- var w = !1;
99
+ var S = !1;
100
100
  } catch {
101
- w = !0;
101
+ S = !0;
102
102
  }
103
- if (w) {
104
- w = console;
105
- var b = w.error, R = typeof Symbol == "function" && Symbol.toStringTag && d[Symbol.toStringTag] || d.constructor.name || "Object";
106
- return b.call(
107
- w,
103
+ if (S) {
104
+ S = console;
105
+ var R = S.error, C = typeof Symbol == "function" && Symbol.toStringTag && d[Symbol.toStringTag] || d.constructor.name || "Object";
106
+ return R.call(
107
+ S,
108
108
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
109
- R
109
+ C
110
110
  ), e(d);
111
111
  }
112
112
  }
113
113
  function n(d) {
114
- if (d === S) return "<>";
115
- if (typeof d == "object" && d !== null && d.$$typeof === C)
114
+ if (d === b) return "<>";
115
+ if (typeof d == "object" && d !== null && d.$$typeof === T)
116
116
  return "<...>";
117
117
  try {
118
- var w = t(d);
119
- return w ? "<" + w + ">" : "<...>";
118
+ var S = t(d);
119
+ return S ? "<" + S + ">" : "<...>";
120
120
  } catch {
121
121
  return "<...>";
122
122
  }
123
123
  }
124
124
  function o() {
125
- var d = N.A;
125
+ var d = j.A;
126
126
  return d === null ? null : d.getOwner();
127
127
  }
128
128
  function s() {
@@ -130,37 +130,37 @@ function Dt() {
130
130
  }
131
131
  function i(d) {
132
132
  if (U.call(d, "key")) {
133
- var w = Object.getOwnPropertyDescriptor(d, "key").get;
134
- if (w && w.isReactWarning) return !1;
133
+ var S = Object.getOwnPropertyDescriptor(d, "key").get;
134
+ if (S && S.isReactWarning) return !1;
135
135
  }
136
136
  return d.key !== void 0;
137
137
  }
138
- function a(d, w) {
139
- function b() {
138
+ function a(d, S) {
139
+ function R() {
140
140
  J || (J = !0, console.error(
141
141
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
142
- w
142
+ S
143
143
  ));
144
144
  }
145
- b.isReactWarning = !0, Object.defineProperty(d, "key", {
146
- get: b,
145
+ R.isReactWarning = !0, Object.defineProperty(d, "key", {
146
+ get: R,
147
147
  configurable: !0
148
148
  });
149
149
  }
150
150
  function c() {
151
151
  var d = t(this.type);
152
- return X[d] || (X[d] = !0, console.error(
152
+ return he[d] || (he[d] = !0, console.error(
153
153
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
154
154
  )), d = this.props.ref, d !== void 0 ? d : null;
155
155
  }
156
- function f(d, w, b, R, j, Y, Se, be) {
157
- return b = Y.ref, d = {
158
- $$typeof: g,
156
+ function f(d, S, R, C, V, B, ee, se) {
157
+ return R = B.ref, d = {
158
+ $$typeof: m,
159
159
  type: d,
160
- key: w,
161
- props: Y,
162
- _owner: j
163
- }, (b !== void 0 ? b : null) !== null ? Object.defineProperty(d, "ref", {
160
+ key: S,
161
+ props: B,
162
+ _owner: V
163
+ }, (R !== void 0 ? R : null) !== null ? Object.defineProperty(d, "ref", {
164
164
  enumerable: !1,
165
165
  get: c
166
166
  }) : Object.defineProperty(d, "ref", { enumerable: !1, value: null }), d._store = {}, Object.defineProperty(d._store, "validated", {
@@ -177,68 +177,68 @@ function Dt() {
177
177
  configurable: !1,
178
178
  enumerable: !1,
179
179
  writable: !0,
180
- value: Se
180
+ value: ee
181
181
  }), Object.defineProperty(d, "_debugTask", {
182
182
  configurable: !1,
183
183
  enumerable: !1,
184
184
  writable: !0,
185
- value: be
185
+ value: se
186
186
  }), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
187
187
  }
188
- function u(d, w, b, R, j, Y, Se, be) {
189
- var M = w.children;
190
- if (M !== void 0)
191
- if (R)
192
- if (O(M)) {
193
- for (R = 0; R < M.length; R++)
194
- h(M[R]);
195
- Object.freeze && Object.freeze(M);
188
+ function u(d, S, R, C, V, B, ee, se) {
189
+ var N = S.children;
190
+ if (N !== void 0)
191
+ if (C)
192
+ if (Y(N)) {
193
+ for (C = 0; C < N.length; C++)
194
+ h(N[C]);
195
+ Object.freeze && Object.freeze(N);
196
196
  } else
197
197
  console.error(
198
198
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
199
199
  );
200
- else h(M);
201
- if (U.call(w, "key")) {
202
- M = t(d);
203
- var ee = Object.keys(w).filter(function(Tt) {
204
- return Tt !== "key";
200
+ else h(N);
201
+ if (U.call(S, "key")) {
202
+ N = t(d);
203
+ var X = Object.keys(S).filter(function(x) {
204
+ return x !== "key";
205
205
  });
206
- R = 0 < ee.length ? "{key: someKey, " + ee.join(": ..., ") + ": ...}" : "{key: someKey}", ue[M + R] || (ee = 0 < ee.length ? "{" + ee.join(": ..., ") + ": ...}" : "{}", console.error(
206
+ C = 0 < X.length ? "{key: someKey, " + X.join(": ..., ") + ": ...}" : "{key: someKey}", me[N + C] || (X = 0 < X.length ? "{" + X.join(": ..., ") + ": ...}" : "{}", console.error(
207
207
  `A props object containing a "key" prop is being spread into JSX:
208
208
  let props = %s;
209
209
  <%s {...props} />
210
210
  React keys must be passed directly to JSX without using spread:
211
211
  let props = %s;
212
212
  <%s key={someKey} {...props} />`,
213
- R,
214
- M,
215
- ee,
216
- M
217
- ), ue[M + R] = !0);
213
+ C,
214
+ N,
215
+ X,
216
+ N
217
+ ), me[N + C] = !0);
218
218
  }
219
- if (M = null, b !== void 0 && (r(b), M = "" + b), i(w) && (r(w.key), M = "" + w.key), "key" in w) {
220
- b = {};
221
- for (var we in w)
222
- we !== "key" && (b[we] = w[we]);
223
- } else b = w;
224
- return M && a(
225
- b,
219
+ if (N = null, R !== void 0 && (r(R), N = "" + R), i(S) && (r(S.key), N = "" + S.key), "key" in S) {
220
+ R = {};
221
+ for (var I in S)
222
+ I !== "key" && (R[I] = S[I]);
223
+ } else R = S;
224
+ return N && a(
225
+ R,
226
226
  typeof d == "function" ? d.displayName || d.name || "Unknown" : d
227
227
  ), f(
228
228
  d,
229
- M,
230
- Y,
231
- j,
229
+ N,
230
+ B,
231
+ V,
232
232
  o(),
233
- b,
234
- Se,
235
- be
233
+ R,
234
+ ee,
235
+ se
236
236
  );
237
237
  }
238
238
  function h(d) {
239
- typeof d == "object" && d !== null && d.$$typeof === g && d._store && (d._store.validated = 1);
239
+ typeof d == "object" && d !== null && d.$$typeof === m && d._store && (d._store.validated = 1);
240
240
  }
241
- var l = It, g = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), S = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), v = Symbol.for("react.consumer"), k = Symbol.for("react.context"), _ = Symbol.for("react.forward_ref"), D = Symbol.for("react.suspense"), z = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), I = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), N = l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, O = Array.isArray, K = console.createTask ? console.createTask : function() {
241
+ var l = _t, m = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), k = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), M = Symbol.for("react.suspense"), z = Symbol.for("react.suspense_list"), Q = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), _ = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), j = l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, Y = Array.isArray, re = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
244
  l = {
@@ -246,44 +246,44 @@ React keys must be passed directly to JSX without using spread:
246
246
  return d();
247
247
  }
248
248
  };
249
- var J, X = {}, Z = l["react-stack-bottom-frame"].bind(
249
+ var J, he = {}, ne = l["react-stack-bottom-frame"].bind(
250
250
  l,
251
251
  s
252
- )(), Q = K(n(s)), ue = {};
253
- ne.Fragment = S, ne.jsx = function(d, w, b, R, j) {
254
- var Y = 1e4 > N.recentlyCreatedOwnerStacks++;
252
+ )(), oe = re(n(s)), me = {};
253
+ ae.Fragment = b, ae.jsx = function(d, S, R, C, V) {
254
+ var B = 1e4 > j.recentlyCreatedOwnerStacks++;
255
255
  return u(
256
256
  d,
257
- w,
258
- b,
259
- !1,
257
+ S,
260
258
  R,
261
- j,
262
- Y ? Error("react-stack-top-frame") : Z,
263
- Y ? K(n(d)) : Q
259
+ !1,
260
+ C,
261
+ V,
262
+ B ? Error("react-stack-top-frame") : ne,
263
+ B ? re(n(d)) : oe
264
264
  );
265
- }, ne.jsxs = function(d, w, b, R, j) {
266
- var Y = 1e4 > N.recentlyCreatedOwnerStacks++;
265
+ }, ae.jsxs = function(d, S, R, C, V) {
266
+ var B = 1e4 > j.recentlyCreatedOwnerStacks++;
267
267
  return u(
268
268
  d,
269
- w,
270
- b,
271
- !0,
269
+ S,
272
270
  R,
273
- j,
274
- Y ? Error("react-stack-top-frame") : Z,
275
- Y ? K(n(d)) : Q
271
+ !0,
272
+ C,
273
+ V,
274
+ B ? Error("react-stack-top-frame") : ne,
275
+ B ? re(n(d)) : oe
276
276
  );
277
277
  };
278
- }()), ne;
278
+ }()), ae;
279
279
  }
280
- var Ge;
281
- function Ft() {
282
- return Ge || (Ge = 1, process.env.NODE_ENV === "production" ? le.exports = xt() : le.exports = Dt()), le.exports;
280
+ var Xe;
281
+ function Kt() {
282
+ return Xe || (Xe = 1, process.env.NODE_ENV === "production" ? pe.exports = $t() : pe.exports = Vt()), pe.exports;
283
283
  }
284
- var A = Ft();
285
- function Bt(t, e) {
286
- const r = Ue(
284
+ var A = Kt();
285
+ function Yt(t, e) {
286
+ const r = Fe(
287
287
  (n) => t.subscribe(n),
288
288
  () => {
289
289
  const n = t.getSnapshot(), o = e ?? n.rootViewId, s = o ? n.views.get(o) : void 0;
@@ -294,7 +294,7 @@ function Bt(t, e) {
294
294
  return `${o ?? ""}:${s?.id ?? ""}`;
295
295
  }
296
296
  );
297
- return $(() => {
297
+ return K(() => {
298
298
  const [n, o] = r.split(":");
299
299
  return {
300
300
  rootViewId: n || void 0,
@@ -302,16 +302,16 @@ function Bt(t, e) {
302
302
  };
303
303
  }, [r]);
304
304
  }
305
- function q(t, e) {
306
- const r = Ue(
305
+ function H(t, e) {
306
+ const r = Fe(
307
307
  (n) => t.subscribeNode(e, n),
308
308
  () => t.getNodeVersion(e),
309
309
  () => t.getNodeVersion(e)
310
310
  );
311
- return $(() => t.getNode(e), [t, e, r]);
311
+ return K(() => t.getNode(e), [t, e, r]);
312
312
  }
313
- const $t = pe("UIRenderer");
314
- function Vt(t) {
313
+ const Wt = Re("UIRenderer");
314
+ function zt(t) {
315
315
  if (t === void 0)
316
316
  return "{}";
317
317
  if (typeof t == "string")
@@ -322,18 +322,18 @@ function Vt(t) {
322
322
  return "{}";
323
323
  }
324
324
  }
325
- function Kt(t) {
325
+ function qt(t) {
326
326
  const e = t.styleIds;
327
327
  return Array.isArray(e) ? e : [];
328
328
  }
329
- function Yt(t) {
329
+ function Gt(t) {
330
330
  const e = t.children;
331
331
  return Array.isArray(e) ? e : [];
332
332
  }
333
- function Wt(t, e) {
333
+ function Ht(t, e) {
334
334
  return t.nodeId === e.nodeId && t.context === e.context;
335
335
  }
336
- function zt(t) {
336
+ function Jt(t) {
337
337
  if (t.length === 0) return "";
338
338
  if (t.length === 1) return t[0].id;
339
339
  let e = t[0].id;
@@ -341,8 +341,8 @@ function zt(t) {
341
341
  e += "," + t[r].id;
342
342
  return e;
343
343
  }
344
- const _e = V(function t({ nodeId: e, context: r }) {
345
- const n = q(r.store, e), o = n ? Yt(n) : [], s = zt(o), i = $(
344
+ const Me = W(function t({ nodeId: e, context: r }) {
345
+ const n = H(r.store, e), o = n ? Gt(n) : [], s = Jt(o), i = K(
346
346
  () => o.length === 0 ? null : o.map((h) => /* @__PURE__ */ A.jsx(t, { nodeId: h.id, context: r }, h.id)),
347
347
  // eslint-disable-next-line react-hooks/exhaustive-deps
348
348
  [s, r]
@@ -350,44 +350,44 @@ const _e = V(function t({ nodeId: e, context: r }) {
350
350
  if (!n)
351
351
  return null;
352
352
  if (n.type === "root")
353
- return /* @__PURE__ */ A.jsx(Ot, { children: i }, n.id);
353
+ return /* @__PURE__ */ A.jsx(Nt, { children: i }, n.id);
354
354
  const a = r.library.resolve(n);
355
355
  if (!a)
356
- return $t.warn(`No renderer for node type ${n.type}`), null;
357
- const c = Kt(n), f = c.length > 0 ? c.join(" ") : void 0, u = a;
356
+ return Wt.warn(`No renderer for node type ${n.type}`), null;
357
+ const c = qt(n), f = c.length > 0 ? c.join(" ") : void 0, u = a;
358
358
  return /* @__PURE__ */ A.jsx(u, { nodeId: e, context: r, className: f });
359
- }, Wt);
360
- function qt(t, e) {
361
- return !Array.isArray(t) || t.length === 0 ? null : t.map((r) => /* @__PURE__ */ A.jsx(_e, { nodeId: r.id, context: e }, r.id));
359
+ }, Ht);
360
+ function Xt(t, e) {
361
+ return !Array.isArray(t) || t.length === 0 ? null : t.map((r) => /* @__PURE__ */ A.jsx(Me, { nodeId: r.id, context: e }, r.id));
362
362
  }
363
- function Gt(t, e) {
363
+ function Zt(t, e) {
364
364
  return t.store === e.store && t.library === e.library && t.viewId === e.viewId && t.emptyFallback === e.emptyFallback;
365
365
  }
366
- const Ht = V(function({ store: e, library: r, viewId: n, emptyFallback: o = null, onAction: s, client: i, video: a }) {
367
- const { rootViewId: c, rootNodeId: f } = Bt(e, n), u = T(s);
366
+ const Qt = W(function({ store: e, library: r, viewId: n, emptyFallback: o = null, onAction: s, client: i, video: a }) {
367
+ const { rootViewId: c, rootNodeId: f } = Yt(e, n), u = v(s);
368
368
  u.current = s;
369
- const h = T(i);
369
+ const h = v(i);
370
370
  h.current = i;
371
- const l = T(a);
371
+ const l = v(a);
372
372
  l.current = a;
373
- const g = x((S, m) => {
374
- if (!S)
373
+ const m = D((b, p) => {
374
+ if (!b)
375
375
  return;
376
- const p = Vt(m);
377
- u.current?.(S, p);
378
- }, []), y = $(() => {
379
- const S = {
376
+ const g = zt(p);
377
+ u.current?.(b, g);
378
+ }, []), y = K(() => {
379
+ const b = {
380
380
  store: e,
381
381
  library: r,
382
382
  handlerCache: e.handlerCache,
383
383
  // Access payloads from store at call time, not captured snapshot
384
- getPayload: (m) => e.getSnapshot().payloads.get(m),
385
- renderChildren: (m) => qt(m, S),
386
- renderView: (m) => {
387
- const p = e.getSnapshot().views.get(m);
388
- return p ? /* @__PURE__ */ A.jsx(_e, { nodeId: p.id, context: S }) : null;
384
+ getPayload: (p) => e.getSnapshot().payloads.get(p),
385
+ renderChildren: (p) => Xt(p, b),
386
+ renderView: (p) => {
387
+ const g = e.getSnapshot().views.get(p);
388
+ return g ? /* @__PURE__ */ A.jsx(Me, { nodeId: g.id, context: b }) : null;
389
389
  },
390
- dispatchAction: g,
390
+ dispatchAction: m,
391
391
  // Access client/video via refs to avoid context recreation
392
392
  get client() {
393
393
  return h.current;
@@ -396,11 +396,11 @@ const Ht = V(function({ store: e, library: r, viewId: n, emptyFallback: o = null
396
396
  return l.current;
397
397
  }
398
398
  };
399
- return S;
400
- }, [e, r, g]);
401
- return !c || !f ? o : /* @__PURE__ */ A.jsx("div", { "data-ikon-view-id": c, style: { display: "contents" }, children: /* @__PURE__ */ A.jsx(_e, { nodeId: f, context: y }) });
402
- }, Gt);
403
- class Jt {
399
+ return b;
400
+ }, [e, r, m]);
401
+ return !c || !f ? o : /* @__PURE__ */ A.jsx("div", { "data-ikon-view-id": c, style: { display: "contents" }, children: /* @__PURE__ */ A.jsx(Me, { nodeId: f, context: y }) });
402
+ }, Zt);
403
+ class er {
404
404
  constructor(e, r) {
405
405
  if (this.fallback = r, e)
406
406
  for (const [n, o] of e)
@@ -417,41 +417,41 @@ class Jt {
417
417
  return this.renderers.get(e.type) ?? this.fallback;
418
418
  }
419
419
  }
420
- function ao(t, e) {
420
+ function po(t, e) {
421
421
  const r = Object.entries(t);
422
- return new Jt(r, e);
422
+ return new er(r, e);
423
423
  }
424
- function co(t) {
425
- return Ue(
424
+ function go(t) {
425
+ return Fe(
426
426
  (e) => t.subscribe(e),
427
427
  () => t.getSnapshot(),
428
428
  () => t.getSnapshot()
429
429
  );
430
430
  }
431
- const Ne = "ikon-ui";
432
- function Xt(t, e) {
431
+ const je = "ikon-ui";
432
+ function tr(t, e) {
433
433
  return t === e;
434
434
  }
435
- const uo = V(function({ stores: e, registry: r, category: n = Ne, onAction: o, client: s }) {
436
- const i = $(() => Array.from(e.keys()).sort().join(","), [e]), a = T(o);
435
+ const yo = W(function({ stores: e, registry: r, category: n = je, onAction: o, client: s }) {
436
+ const i = K(() => Array.from(e.keys()).sort().join(","), [e]), a = v(o);
437
437
  a.current = o;
438
- const c = T(s);
438
+ const c = v(s);
439
439
  c.current = s;
440
- const f = $(
440
+ const f = K(
441
441
  () => {
442
442
  const u = [];
443
443
  for (const [h, l] of e) {
444
- const g = l.store.getSnapshot();
445
- Xt(l.category, n) && (!g.rootViewId || !g.views.has(g.rootViewId) || u.push({ key: h, store: l.store }));
444
+ const m = l.store.getSnapshot();
445
+ tr(l.category, n) && (!m.rootViewId || !m.views.has(m.rootViewId) || u.push({ key: h, store: l.store }));
446
446
  }
447
447
  return u;
448
448
  },
449
449
  // eslint-disable-next-line react-hooks/exhaustive-deps
450
450
  [e, n, i]
451
451
  );
452
- return f.length === 0 ? null : /* @__PURE__ */ A.jsx(A.Fragment, { children: f.map(({ key: u, store: h }) => /* @__PURE__ */ A.jsx(Ht, { store: h, library: r, onAction: a.current, client: c.current, video: c.current?.media?.video }, u)) });
452
+ return f.length === 0 ? null : /* @__PURE__ */ A.jsx(A.Fragment, { children: f.map(({ key: u, store: h }) => /* @__PURE__ */ A.jsx(Qt, { store: h, library: r, onAction: a.current, client: c.current, video: c.current?.media?.video }, u)) });
453
453
  });
454
- class Zt {
454
+ class rr {
455
455
  core;
456
456
  ownsCore;
457
457
  stores = /* @__PURE__ */ new Map();
@@ -459,7 +459,7 @@ class Zt {
459
459
  unsubscribeClears;
460
460
  unsubscribeStoreChanges;
461
461
  constructor(e) {
462
- this.core = e?.core ?? new kt({ client: e?.client }), this.ownsCore = !e?.core, this.unsubscribeClears = this.core.subscribeToUiStreamCleared(this.handleUiStreamCleared), this.unsubscribeStoreChanges = this.core.uiStore.subscribe(this.syncStreamSnapshot), this.syncAllStreams();
462
+ this.core = e?.core ?? new It({ client: e?.client }), this.ownsCore = !e?.core, this.unsubscribeClears = this.core.subscribeToUiStreamCleared(this.handleUiStreamCleared), this.unsubscribeStoreChanges = this.core.uiStore.subscribe(this.syncStreamSnapshot), this.syncAllStreams();
463
463
  }
464
464
  dispose() {
465
465
  this.unsubscribeClears(), this.unsubscribeStoreChanges(), this.ownsCore && this.core.dispose(), this.listeners.clear(), this.stores.clear();
@@ -509,8 +509,8 @@ class Zt {
509
509
  if (r)
510
510
  return r;
511
511
  const n = {
512
- category: Ne,
513
- store: new Ct()
512
+ category: je,
513
+ store: new Ot()
514
514
  };
515
515
  return this.stores.set(e, n), n;
516
516
  }
@@ -518,7 +518,7 @@ class Zt {
518
518
  const n = this.stores.get(e);
519
519
  if (!n)
520
520
  return !1;
521
- const o = r ?? this.core.uiStore.getSnapshot(e)?.category ?? Ne;
521
+ const o = r ?? this.core.uiStore.getSnapshot(e)?.category ?? je;
522
522
  return n.category === o ? !1 : (this.stores.set(e, { ...n, category: o }), !0);
523
523
  }
524
524
  notify(e) {
@@ -526,13 +526,13 @@ class Zt {
526
526
  r(e);
527
527
  }
528
528
  }
529
- function Qt(t) {
529
+ function nr(t) {
530
530
  if (typeof t == "string") {
531
531
  const e = t.trim();
532
532
  return e.length > 0 ? e : void 0;
533
533
  }
534
534
  }
535
- function ce(t) {
535
+ function fe(t) {
536
536
  if (typeof t == "string") {
537
537
  const e = t.trim();
538
538
  return e.length > 0 ? e : void 0;
@@ -542,7 +542,7 @@ function ce(t) {
542
542
  return e.length > 0 ? e.join(" ") : void 0;
543
543
  }
544
544
  }
545
- function De(...t) {
545
+ function $e(...t) {
546
546
  let e = "";
547
547
  for (const r of t)
548
548
  if (r) {
@@ -551,42 +551,42 @@ function De(...t) {
551
551
  }
552
552
  return e || void 0;
553
553
  }
554
- const He = /* @__PURE__ */ new WeakMap(), er = {};
555
- function Fe(t) {
554
+ const Ze = /* @__PURE__ */ new WeakMap(), or = {};
555
+ function Ve(t) {
556
556
  if (!t)
557
- return er;
558
- const e = He.get(t);
557
+ return or;
558
+ const e = Ze.get(t);
559
559
  if (e)
560
560
  return e;
561
561
  const r = {};
562
562
  for (const [n, o] of Object.entries(t))
563
563
  o != null && (typeof o == "string" || typeof o == "number" || typeof o == "boolean") && (r[n] = o);
564
- return He.set(t, r), r;
564
+ return Ze.set(t, r), r;
565
565
  }
566
- function tr() {
567
- const t = V(function({ nodeId: r, context: n }) {
568
- const o = q(n.store, r), s = T(null), i = ce(o?.props?.targetViewId), a = o?.props?.focusOnly, c = typeof a == "boolean" ? a : void 0, f = ce(o?.props?.key), u = o?.props?.preciseGeneratedAt;
566
+ function sr() {
567
+ const t = W(function({ nodeId: r, context: n }) {
568
+ const o = H(n.store, r), s = v(null), i = fe(o?.props?.targetViewId), a = o?.props?.focusOnly, c = typeof a == "boolean" ? a : void 0, f = fe(o?.props?.key), u = o?.props?.preciseGeneratedAt;
569
569
  return L(() => {
570
570
  if (typeof document > "u")
571
571
  return;
572
572
  const l = s.current;
573
573
  if (!l || i && l.closest("[data-ikon-view-id]")?.getAttribute("data-ikon-view-id") !== i)
574
574
  return;
575
- const g = c !== !0;
576
- if (g) {
577
- const p = ((v) => {
578
- let k = v.parentElement;
575
+ const m = c !== !0;
576
+ if (m) {
577
+ const g = ((w) => {
578
+ let k = w.parentElement;
579
579
  for (; k; ) {
580
- const D = window.getComputedStyle(k).overflowY;
581
- if (D === "auto" || D === "scroll" || k.hasAttribute("data-radix-scroll-area-viewport"))
580
+ const M = window.getComputedStyle(k).overflowY;
581
+ if (M === "auto" || M === "scroll" || k.hasAttribute("data-radix-scroll-area-viewport"))
582
582
  return k;
583
583
  k = k.parentElement;
584
584
  }
585
585
  return null;
586
586
  })(l);
587
- p ? requestAnimationFrame(() => {
588
- const v = p.getBoundingClientRect(), k = l.getBoundingClientRect(), _ = p.scrollTop + (k.bottom - v.bottom) + 16;
589
- "scrollBehavior" in document.documentElement.style ? p.scrollTo({ top: _, behavior: "smooth" }) : p.scrollTop = _;
587
+ g ? requestAnimationFrame(() => {
588
+ const w = g.getBoundingClientRect(), k = l.getBoundingClientRect(), O = g.scrollTop + (k.bottom - w.bottom) + 16;
589
+ "scrollBehavior" in document.documentElement.style ? g.scrollTo({ top: O, behavior: "smooth" }) : g.scrollTop = O;
590
590
  }) : typeof l.scrollIntoView == "function" && requestAnimationFrame(() => {
591
591
  try {
592
592
  l.scrollIntoView({ behavior: "smooth", block: "end", inline: "nearest" });
@@ -598,7 +598,7 @@ function tr() {
598
598
  const y = document.activeElement;
599
599
  if (!(y instanceof HTMLInputElement || y instanceof HTMLTextAreaElement || y?.getAttribute("contenteditable") === "true") && typeof l.focus == "function")
600
600
  try {
601
- l.focus({ preventScroll: !g });
601
+ l.focus({ preventScroll: !m });
602
602
  } catch {
603
603
  l.focus();
604
604
  }
@@ -619,16 +619,16 @@ function tr() {
619
619
  return t;
620
620
  };
621
621
  }
622
- function rr() {
623
- const t = V(function({ nodeId: r, context: n, className: o }) {
624
- const s = q(n.store, r), i = Qt(s?.props?.onInvokeId), a = x(() => {
622
+ function ir() {
623
+ const t = W(function({ nodeId: r, context: n, className: o }) {
624
+ const s = H(n.store, r), i = nr(s?.props?.onInvokeId), a = D(() => {
625
625
  i && n.dispatchAction(i);
626
626
  }, [i, n]);
627
627
  if (!s)
628
628
  return null;
629
- const c = Fe(s.props);
629
+ const c = Ve(s.props);
630
630
  delete c.onInvokeId;
631
- const f = De(ce(s.props?.className), o), u = s.children?.length ? n.renderChildren(s.children) : void 0;
631
+ const f = $e(fe(s.props?.className), o), u = s.children?.length ? n.renderChildren(s.children) : void 0;
632
632
  return /* @__PURE__ */ A.jsx(
633
633
  "div",
634
634
  {
@@ -646,12 +646,12 @@ function rr() {
646
646
  return t;
647
647
  };
648
648
  }
649
- function nr() {
650
- const t = V(function({ nodeId: r, context: n, className: o }) {
651
- const s = q(n.store, r);
649
+ function ar() {
650
+ const t = W(function({ nodeId: r, context: n, className: o }) {
651
+ const s = H(n.store, r);
652
652
  if (!s)
653
653
  return null;
654
- const i = Fe(s.props), a = De("relative", ce(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
654
+ const i = Ve(s.props), a = $e("relative", fe(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
655
655
  return /* @__PURE__ */ A.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
656
656
  });
657
657
  return ({ type: e }) => {
@@ -659,12 +659,12 @@ function nr() {
659
659
  return t;
660
660
  };
661
661
  }
662
- function or() {
663
- const t = V(function({ nodeId: r, context: n, className: o }) {
664
- const s = q(n.store, r);
662
+ function cr() {
663
+ const t = W(function({ nodeId: r, context: n, className: o }) {
664
+ const s = H(n.store, r);
665
665
  if (!s)
666
666
  return null;
667
- const i = Fe(s.props), a = De("absolute", ce(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
667
+ const i = Ve(s.props), a = $e("absolute", fe(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
668
668
  return /* @__PURE__ */ A.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
669
669
  });
670
670
  return ({ type: e }) => {
@@ -672,19 +672,19 @@ function or() {
672
672
  return t;
673
673
  };
674
674
  }
675
- function sr() {
675
+ function ur() {
676
676
  return [
677
- rr(),
678
- nr(),
679
- or(),
680
- tr()
677
+ ir(),
678
+ ar(),
679
+ cr(),
680
+ sr()
681
681
  ];
682
682
  }
683
- const ir = "base", ar = async () => sr();
684
- function cr(t) {
685
- t.registerModule(ir, ar);
683
+ const lr = "base", dr = async () => ur();
684
+ function fr(t) {
685
+ t.registerModule(lr, dr);
686
686
  }
687
- function ur(t) {
687
+ function hr(t) {
688
688
  if (typeof t == "string") {
689
689
  const e = t.trim();
690
690
  return e.length > 0 ? e : void 0;
@@ -694,19 +694,19 @@ function ur(t) {
694
694
  return e.length > 0 ? e.join(" ") : void 0;
695
695
  }
696
696
  }
697
- function lr(...t) {
697
+ function mr(...t) {
698
698
  const e = [];
699
699
  for (const r of t)
700
700
  r && r.trim() && e.push(r.trim());
701
701
  return e.length > 0 ? e.join(" ") : void 0;
702
702
  }
703
- function Je(t) {
703
+ function Qe(t) {
704
704
  if (typeof t != "string")
705
705
  return;
706
706
  const e = t.trim();
707
707
  return e.length > 0 ? e : void 0;
708
708
  }
709
- function de(t) {
709
+ function ge(t) {
710
710
  if (typeof t == "boolean")
711
711
  return t;
712
712
  if (typeof t == "string") {
@@ -715,17 +715,17 @@ function de(t) {
715
715
  if (e === "false") return !1;
716
716
  }
717
717
  }
718
- const dr = "std.audio-url-player";
719
- function fr() {
720
- const t = V(function({
718
+ const pr = "std.audio-url-player";
719
+ function gr() {
720
+ const t = W(function({
721
721
  nodeId: r,
722
722
  context: n,
723
723
  className: o
724
724
  }) {
725
- const s = q(n.store, r);
725
+ const s = H(n.store, r);
726
726
  if (!s)
727
727
  return null;
728
- const i = lr(ur(s.props?.className), o), a = Je(s.props?.src), c = Je(s.props?.preload), f = de(s.props?.controls), u = de(s.props?.autoplay), h = de(s.props?.loop), l = de(s.props?.muted);
728
+ const i = mr(hr(s.props?.className), o), a = Qe(s.props?.src), c = Qe(s.props?.preload), f = ge(s.props?.controls), u = ge(s.props?.autoplay), h = ge(s.props?.loop), l = ge(s.props?.muted);
729
729
  return /* @__PURE__ */ A.jsx(
730
730
  "audio",
731
731
  {
@@ -741,11 +741,11 @@ function fr() {
741
741
  );
742
742
  });
743
743
  return ({ type: e }) => {
744
- if (e === dr)
744
+ if (e === pr)
745
745
  return t;
746
746
  };
747
747
  }
748
- function dt(t) {
748
+ function mt(t) {
749
749
  if (typeof t == "string") {
750
750
  const e = t.trim();
751
751
  return e.length > 0 ? e : void 0;
@@ -755,13 +755,13 @@ function dt(t) {
755
755
  return e.length > 0 ? e.join(" ") : void 0;
756
756
  }
757
757
  }
758
- function ft(...t) {
758
+ function pt(...t) {
759
759
  const e = [];
760
760
  for (const r of t)
761
761
  r && r.trim() && e.push(r.trim());
762
762
  return e.length > 0 ? e.join(" ") : void 0;
763
763
  }
764
- function fe(t) {
764
+ function Se(t) {
765
765
  if (typeof t == "number" && Number.isFinite(t))
766
766
  return Math.floor(t);
767
767
  if (typeof t == "string" && t.trim().length > 0) {
@@ -770,27 +770,27 @@ function fe(t) {
770
770
  return Math.floor(e);
771
771
  }
772
772
  }
773
- function Pe(t) {
773
+ function Le(t) {
774
774
  if (typeof t != "string")
775
775
  return;
776
776
  const e = t.trim();
777
777
  return e.length > 0 ? e : void 0;
778
778
  }
779
- const hr = "std.video-canvas", mr = "std.video-url-player";
780
- function pr() {
781
- const t = V(function({ nodeId: r, context: n, className: o }) {
782
- const s = q(n.store, r), i = T(null), a = T(null), c = n.video, f = n.client, u = s ? Pe(s.props?.streamId) : void 0, h = s ? fe(s.props?.width) : void 0, l = s ? fe(s.props?.height) : void 0, g = s ? ft(dt(s.props?.className), o) : o, y = f?.isWebRtcEnabled && u ? f.getWebRtcVideoStreamByStreamId(u) : null;
779
+ const yr = "std.video-canvas", Sr = "std.video-url-player";
780
+ function br() {
781
+ const t = W(function({ nodeId: r, context: n, className: o }) {
782
+ const s = H(n.store, r), i = v(null), a = v(null), c = n.video, f = n.client, u = s ? Le(s.props?.streamId) : void 0, h = s ? Se(s.props?.width) : void 0, l = s ? Se(s.props?.height) : void 0, m = s ? pt(mt(s.props?.className), o) : o, y = f?.isWebRtcEnabled && u ? f.getWebRtcVideoStreamByStreamId(u) : null;
783
783
  return L(() => {
784
- const S = i.current;
785
- if (!(!c || !S || !u || y))
786
- return c.attachCanvas(u, S), () => {
784
+ const b = i.current;
785
+ if (!(!c || !b || !u || y))
786
+ return c.attachCanvas(u, b), () => {
787
787
  c.detachCanvas(u);
788
788
  };
789
789
  }, [c, u, y]), L(() => {
790
- const S = a.current;
791
- if (!(!S || !y))
792
- return S.srcObject = y, () => {
793
- S.srcObject = null;
790
+ const b = a.current;
791
+ if (!(!b || !y))
792
+ return b.srcObject = y, () => {
793
+ b.srcObject = null;
794
794
  };
795
795
  }, [y]), s ? y ? /* @__PURE__ */ A.jsx(
796
796
  "video",
@@ -801,7 +801,7 @@ function pr() {
801
801
  muted: !0,
802
802
  "data-ikon-node-id": s.id,
803
803
  "data-ikon-video-stream-id": u,
804
- className: g,
804
+ className: m,
805
805
  ...h ? { width: h } : {},
806
806
  ...l ? { height: l } : {}
807
807
  },
@@ -812,7 +812,7 @@ function pr() {
812
812
  ref: i,
813
813
  "data-ikon-node-id": s.id,
814
814
  "data-ikon-video-stream-id": u,
815
- className: g,
815
+ className: m,
816
816
  ...h ? { width: h } : {},
817
817
  ...l ? { height: l } : {}
818
818
  },
@@ -820,14 +820,14 @@ function pr() {
820
820
  ) : null;
821
821
  });
822
822
  return ({ type: e }) => {
823
- if (e === hr)
823
+ if (e === yr)
824
824
  return t;
825
825
  };
826
826
  }
827
- function gr() {
828
- return [pr(), yr(), fr()];
827
+ function wr() {
828
+ return [br(), vr(), gr()];
829
829
  }
830
- function oe(t) {
830
+ function ce(t) {
831
831
  if (typeof t == "boolean")
832
832
  return t;
833
833
  if (typeof t == "string") {
@@ -836,16 +836,16 @@ function oe(t) {
836
836
  if (e === "false") return !1;
837
837
  }
838
838
  }
839
- function yr() {
840
- const t = V(function({
839
+ function vr() {
840
+ const t = W(function({
841
841
  nodeId: r,
842
842
  context: n,
843
843
  className: o
844
844
  }) {
845
- const s = q(n.store, r);
845
+ const s = H(n.store, r);
846
846
  if (!s)
847
847
  return null;
848
- const i = ft(dt(s.props?.className), o), a = Pe(s.props?.src), c = Pe(s.props?.poster), f = oe(s.props?.controls), u = oe(s.props?.autoplay), h = oe(s.props?.loop), l = oe(s.props?.muted), g = oe(s.props?.playsInline), y = fe(s.props?.width), S = fe(s.props?.height), m = s.children?.length ? n.renderChildren(s.children) : void 0;
848
+ const i = pt(mt(s.props?.className), o), a = Le(s.props?.src), c = Le(s.props?.poster), f = ce(s.props?.controls), u = ce(s.props?.autoplay), h = ce(s.props?.loop), l = ce(s.props?.muted), m = ce(s.props?.playsInline), y = Se(s.props?.width), b = Se(s.props?.height), p = s.children?.length ? n.renderChildren(s.children) : void 0;
849
849
  return /* @__PURE__ */ A.jsx(
850
850
  "video",
851
851
  {
@@ -855,37 +855,37 @@ function yr() {
855
855
  ...u !== void 0 ? { autoPlay: u } : {},
856
856
  ...h !== void 0 ? { loop: h } : {},
857
857
  ...l !== void 0 ? { muted: l } : {},
858
- ...g !== void 0 ? { playsInline: g } : {},
858
+ ...m !== void 0 ? { playsInline: m } : {},
859
859
  ...y ? { width: y } : {},
860
- ...S ? { height: S } : {},
860
+ ...b ? { height: b } : {},
861
861
  "data-ikon-node-id": s.id,
862
862
  className: i,
863
- children: m
863
+ children: p
864
864
  }
865
865
  );
866
866
  });
867
867
  return ({ type: e }) => {
868
- if (e === mr)
868
+ if (e === Sr)
869
869
  return t;
870
870
  };
871
871
  }
872
- const Sr = "media", br = async () => gr();
873
- function wr(t) {
874
- t.registerModule(Sr, br);
872
+ const Rr = "media", Er = async () => wr();
873
+ function Ar(t) {
874
+ t.registerModule(Rr, Er);
875
875
  }
876
- const vr = `#version 300 es
876
+ const kr = `#version 300 es
877
877
  in vec4 a_position;
878
878
  void main() {
879
879
  gl_Position = a_position;
880
880
  }
881
881
  `;
882
- function Rr(t, e) {
882
+ function Tr(t, e) {
883
883
  return new RegExp(`\\buniform\\s+\\w+\\s+${e}\\s*;`, "g").test(t);
884
884
  }
885
- function Er(t, e) {
885
+ function Cr(t, e) {
886
886
  const r = [];
887
887
  for (const [n, o] of Object.entries(e)) {
888
- if (Rr(t, n))
888
+ if (Tr(t, n))
889
889
  continue;
890
890
  let s;
891
891
  switch (o.type) {
@@ -938,7 +938,7 @@ void main() {
938
938
  }
939
939
  `;
940
940
  }
941
- class Ar {
941
+ class Ir {
942
942
  gl;
943
943
  program = null;
944
944
  positionBuffer = null;
@@ -974,10 +974,10 @@ class Ar {
974
974
  }
975
975
  compile(e, r = {}) {
976
976
  this.lastError = null, this.customUniforms = r, this.currentShaderSource = e;
977
- const n = this.gl, o = this.compileShader(n.VERTEX_SHADER, vr);
977
+ const n = this.gl, o = this.compileShader(n.VERTEX_SHADER, kr);
978
978
  if (!o)
979
979
  return !1;
980
- const s = Er(e, r), i = this.compileShader(n.FRAGMENT_SHADER, s);
980
+ const s = Cr(e, r), i = this.compileShader(n.FRAGMENT_SHADER, s);
981
981
  if (!i)
982
982
  return n.deleteShader(o), !1;
983
983
  const a = n.createProgram();
@@ -1023,38 +1023,38 @@ class Ar {
1023
1023
  h && e.uniform1i(h, this.frameCount);
1024
1024
  const l = this.uniformLocations.get("iMouse");
1025
1025
  l && e.uniform4f(l, this.mouseX, this.mouseY, this.mouseClickX, this.mouseClickY);
1026
- const g = this.uniformLocations.get("iDate");
1027
- if (g) {
1026
+ const m = this.uniformLocations.get("iDate");
1027
+ if (m) {
1028
1028
  const y = /* @__PURE__ */ new Date();
1029
- e.uniform4f(g, y.getFullYear(), y.getMonth(), y.getDate(), y.getHours() * 3600 + y.getMinutes() * 60 + y.getSeconds() + y.getMilliseconds() / 1e3);
1029
+ e.uniform4f(m, y.getFullYear(), y.getMonth(), y.getDate(), y.getHours() * 3600 + y.getMinutes() * 60 + y.getSeconds() + y.getMilliseconds() / 1e3);
1030
1030
  }
1031
- for (const [y, S] of Object.entries(this.customUniforms)) {
1032
- const m = this.uniformLocations.get(y);
1033
- if (m)
1034
- switch (S.type) {
1031
+ for (const [y, b] of Object.entries(this.customUniforms)) {
1032
+ const p = this.uniformLocations.get(y);
1033
+ if (p)
1034
+ switch (b.type) {
1035
1035
  case "float":
1036
- e.uniform1f(m, S.value);
1036
+ e.uniform1f(p, b.value);
1037
1037
  break;
1038
1038
  case "vec2": {
1039
- const p = S.value;
1040
- e.uniform2f(m, p[0], p[1]);
1039
+ const g = b.value;
1040
+ e.uniform2f(p, g[0], g[1]);
1041
1041
  break;
1042
1042
  }
1043
1043
  case "vec3": {
1044
- const p = S.value;
1045
- e.uniform3f(m, p[0], p[1], p[2]);
1044
+ const g = b.value;
1045
+ e.uniform3f(p, g[0], g[1], g[2]);
1046
1046
  break;
1047
1047
  }
1048
1048
  case "vec4": {
1049
- const p = S.value;
1050
- e.uniform4f(m, p[0], p[1], p[2], p[3]);
1049
+ const g = b.value;
1050
+ e.uniform4f(p, g[0], g[1], g[2], g[3]);
1051
1051
  break;
1052
1052
  }
1053
1053
  case "int":
1054
- e.uniform1i(m, S.value);
1054
+ e.uniform1i(p, b.value);
1055
1055
  break;
1056
1056
  case "bool":
1057
- e.uniform1i(m, S.value ? 1 : 0);
1057
+ e.uniform1i(p, b.value ? 1 : 0);
1058
1058
  break;
1059
1059
  }
1060
1060
  }
@@ -1068,7 +1068,7 @@ class Ar {
1068
1068
  this.program && (e.deleteProgram(this.program), this.program = null), this.positionBuffer && (e.deleteBuffer(this.positionBuffer), this.positionBuffer = null), this.vao && (e.deleteVertexArray(this.vao), this.vao = null), this.uniformLocations.clear();
1069
1069
  }
1070
1070
  }
1071
- function Tr(t) {
1071
+ function Or(t) {
1072
1072
  if (typeof t == "string") {
1073
1073
  const e = t.trim();
1074
1074
  return e.length > 0 ? e : void 0;
@@ -1078,13 +1078,13 @@ function Tr(t) {
1078
1078
  return e.length > 0 ? e.join(" ") : void 0;
1079
1079
  }
1080
1080
  }
1081
- function kr(...t) {
1081
+ function _r(...t) {
1082
1082
  const e = [];
1083
1083
  for (const r of t)
1084
1084
  r && r.trim() && e.push(r.trim());
1085
1085
  return e.length > 0 ? e.join(" ") : void 0;
1086
1086
  }
1087
- function ve(t) {
1087
+ function ke(t) {
1088
1088
  if (typeof t == "number" && Number.isFinite(t))
1089
1089
  return Math.floor(t);
1090
1090
  if (typeof t == "string" && t.trim().length > 0) {
@@ -1093,10 +1093,10 @@ function ve(t) {
1093
1093
  return Math.floor(e);
1094
1094
  }
1095
1095
  }
1096
- function Cr(t) {
1096
+ function Nr(t) {
1097
1097
  return typeof t == "string" ? t : "";
1098
1098
  }
1099
- function Ir(t) {
1099
+ function Pr(t) {
1100
1100
  if (typeof t == "boolean")
1101
1101
  return t;
1102
1102
  if (typeof t == "string") {
@@ -1105,7 +1105,7 @@ function Ir(t) {
1105
1105
  if (e === "false") return !1;
1106
1106
  }
1107
1107
  }
1108
- function Or(t) {
1108
+ function Mr(t) {
1109
1109
  if (!t || typeof t != "object")
1110
1110
  return {};
1111
1111
  const e = {}, r = t;
@@ -1120,7 +1120,7 @@ function Or(t) {
1120
1120
  }
1121
1121
  return e;
1122
1122
  }
1123
- function _r(t, e) {
1123
+ function jr(t, e) {
1124
1124
  const r = Object.keys(t), n = Object.keys(e);
1125
1125
  if (r.length !== n.length)
1126
1126
  return !1;
@@ -1141,99 +1141,99 @@ function _r(t, e) {
1141
1141
  }
1142
1142
  return !0;
1143
1143
  }
1144
- const Nr = "std.shadertoy-canvas";
1145
- function Pr() {
1146
- const t = V(function({ nodeId: r, context: n, className: o }) {
1147
- const s = q(n.store, r), i = T(null), a = T(null), c = T(null), f = T(0), u = T(""), h = T({}), l = T({
1144
+ const Lr = "std.shadertoy-canvas";
1145
+ function Ur() {
1146
+ const t = W(function({ nodeId: r, context: n, className: o }) {
1147
+ const s = H(n.store, r), i = v(null), a = v(null), c = v(null), f = v(0), u = v(""), h = v({}), l = v({
1148
1148
  x: 0,
1149
1149
  y: 0,
1150
1150
  clickX: 0,
1151
1151
  clickY: 0,
1152
1152
  isDown: !1
1153
- }), g = s ? Cr(s.props?.shaderSource) : "", y = s ? ve(s.props?.fps) ?? 60 : 60, S = s?.props?.uniforms, m = $(() => Or(S), [S]), p = s ? Ir(s.props?.enableMouse) ?? !0 : !0, v = s ? ve(s.props?.width) : void 0, k = s ? ve(s.props?.height) : void 0, _ = s ? kr(Tr(s.props?.className), o) : o;
1153
+ }), m = s ? Nr(s.props?.shaderSource) : "", y = s ? ke(s.props?.fps) ?? 60 : 60, b = s?.props?.uniforms, p = K(() => Mr(b), [b]), g = s ? Pr(s.props?.enableMouse) ?? !0 : !0, w = s ? ke(s.props?.width) : void 0, k = s ? ke(s.props?.height) : void 0, O = s ? _r(Or(s.props?.className), o) : o;
1154
1154
  L(() => {
1155
- const C = i.current;
1156
- if (C) {
1155
+ const T = i.current;
1156
+ if (T) {
1157
1157
  try {
1158
- const I = new Ar(C);
1159
- a.current = I;
1160
- } catch (I) {
1161
- console.error("[ShadertoyRenderer] Failed to create WebGL2 context:", I);
1158
+ const _ = new Ir(T);
1159
+ a.current = _;
1160
+ } catch (_) {
1161
+ console.error("[ShadertoyRenderer] Failed to create WebGL2 context:", _);
1162
1162
  }
1163
1163
  return () => {
1164
1164
  a.current && (a.current.destroy(), a.current = null);
1165
1165
  };
1166
1166
  }
1167
1167
  }, []), L(() => {
1168
- const C = a.current;
1169
- if (!(!C || !g) && u.current !== g)
1170
- if (C.compile(g, m))
1171
- u.current = g, h.current = m;
1168
+ const T = a.current;
1169
+ if (!(!T || !m) && u.current !== m)
1170
+ if (T.compile(m, p))
1171
+ u.current = m, h.current = p;
1172
1172
  else {
1173
- const F = C.getError();
1173
+ const F = T.getError();
1174
1174
  console.error("[ShadertoyRenderer] Shader compilation failed:", F);
1175
1175
  }
1176
- }, [g, m]), L(() => {
1177
- const C = a.current;
1178
- !C || !u.current || _r(h.current, m) || (C.setCustomUniforms(m), h.current = m);
1179
- }, [m]), L(() => {
1180
- const C = a.current;
1181
- if (!C || !u.current) return;
1182
- const I = 1e3 / y, F = (N) => {
1183
- const U = N - f.current;
1184
- U >= I && (f.current = N - U % I, C.draw()), c.current = requestAnimationFrame(F);
1176
+ }, [m, p]), L(() => {
1177
+ const T = a.current;
1178
+ !T || !u.current || jr(h.current, p) || (T.setCustomUniforms(p), h.current = p);
1179
+ }, [p]), L(() => {
1180
+ const T = a.current;
1181
+ if (!T || !u.current) return;
1182
+ const _ = 1e3 / y, F = (j) => {
1183
+ const U = j - f.current;
1184
+ U >= _ && (f.current = j - U % _, T.draw()), c.current = requestAnimationFrame(F);
1185
1185
  };
1186
1186
  return c.current = requestAnimationFrame(F), () => {
1187
1187
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
1188
1188
  };
1189
1189
  }, [y]);
1190
- const D = x(
1191
- (C) => {
1192
- if (!p) return;
1193
- const I = i.current, F = a.current;
1194
- if (!I || !F) return;
1195
- const N = I.getBoundingClientRect(), U = C.clientX - N.left, O = N.height - (C.clientY - N.top);
1196
- l.current.x = U, l.current.y = O, F.setMouse(U, O, l.current.clickX, l.current.clickY);
1190
+ const M = D(
1191
+ (T) => {
1192
+ if (!g) return;
1193
+ const _ = i.current, F = a.current;
1194
+ if (!_ || !F) return;
1195
+ const j = _.getBoundingClientRect(), U = T.clientX - j.left, Y = j.height - (T.clientY - j.top);
1196
+ l.current.x = U, l.current.y = Y, F.setMouse(U, Y, l.current.clickX, l.current.clickY);
1197
1197
  },
1198
- [p]
1199
- ), z = x(
1200
- (C) => {
1201
- if (!p) return;
1202
- const I = i.current, F = a.current;
1203
- if (!I || !F) return;
1204
- const N = I.getBoundingClientRect(), U = C.clientX - N.left, O = N.height - (C.clientY - N.top);
1205
- l.current.isDown = !0, l.current.clickX = U, l.current.clickY = O, F.setMouse(U, O, U, O);
1198
+ [g]
1199
+ ), z = D(
1200
+ (T) => {
1201
+ if (!g) return;
1202
+ const _ = i.current, F = a.current;
1203
+ if (!_ || !F) return;
1204
+ const j = _.getBoundingClientRect(), U = T.clientX - j.left, Y = j.height - (T.clientY - j.top);
1205
+ l.current.isDown = !0, l.current.clickX = U, l.current.clickY = Y, F.setMouse(U, Y, U, Y);
1206
1206
  },
1207
- [p]
1208
- ), H = x(() => {
1209
- p && (l.current.isDown = !1, l.current.clickX = -Math.abs(l.current.clickX));
1210
- }, [p]);
1207
+ [g]
1208
+ ), Q = D(() => {
1209
+ g && (l.current.isDown = !1, l.current.clickX = -Math.abs(l.current.clickX));
1210
+ }, [g]);
1211
1211
  return s ? /* @__PURE__ */ A.jsx(
1212
1212
  "canvas",
1213
1213
  {
1214
1214
  ref: i,
1215
1215
  "data-ikon-node-id": s.id,
1216
- className: _,
1217
- ...v ? { width: v } : {},
1216
+ className: O,
1217
+ ...w ? { width: w } : {},
1218
1218
  ...k ? { height: k } : {},
1219
- onMouseMove: D,
1219
+ onMouseMove: M,
1220
1220
  onMouseDown: z,
1221
- onMouseUp: H,
1222
- onMouseLeave: H
1221
+ onMouseUp: Q,
1222
+ onMouseLeave: Q
1223
1223
  }
1224
1224
  ) : null;
1225
1225
  });
1226
1226
  return ({ type: e }) => {
1227
- if (e === Nr)
1227
+ if (e === Lr)
1228
1228
  return t;
1229
1229
  };
1230
1230
  }
1231
- const jr = "shadertoy", Mr = async () => Pr();
1232
- function Lr(t) {
1233
- t.registerModule(jr, Mr);
1231
+ const xr = "shadertoy", Dr = async () => Ur();
1232
+ function Fr(t) {
1233
+ t.registerModule(xr, Dr);
1234
1234
  }
1235
- const Xe = pe("UIRegistry");
1236
- class Ur {
1235
+ const et = Re("UIRegistry");
1236
+ class Br {
1237
1237
  baseResolvers = [];
1238
1238
  moduleLoaders = /* @__PURE__ */ new Map();
1239
1239
  moduleResolvers = /* @__PURE__ */ new Map();
@@ -1255,15 +1255,15 @@ class Ur {
1255
1255
  for (const [n, o] of this.moduleLoaders.entries())
1256
1256
  if (!this.moduleResolvers.has(n))
1257
1257
  try {
1258
- const s = await o(), i = Fr(s);
1258
+ const s = await o(), i = Kr(s);
1259
1259
  this.moduleResolvers.set(n, i), e = !0;
1260
1260
  } catch (s) {
1261
- Xe.error(`[IkonUiRegistry] Failed to load module '${n}'.`, s);
1261
+ et.error(`[IkonUiRegistry] Failed to load module '${n}'.`, s);
1262
1262
  }
1263
1263
  const r = [];
1264
1264
  for (const n of this.moduleLoaders.keys())
1265
1265
  this.moduleResolvers.has(n) && r.push(n);
1266
- return Br(r, this.activeModuleOrder) || (this.activeModuleOrder = r, e = !0), e;
1266
+ return Yr(r, this.activeModuleOrder) || (this.activeModuleOrder = r, e = !0), e;
1267
1267
  }
1268
1268
  resolve(e) {
1269
1269
  for (const r of this.baseResolvers) {
@@ -1273,7 +1273,7 @@ class Ur {
1273
1273
  for (const r of this.activeModuleOrder) {
1274
1274
  const n = this.moduleResolvers.get(r);
1275
1275
  if (!n) {
1276
- Xe.warn(`Missing resolvers for module ${r}`);
1276
+ et.warn(`Missing resolvers for module ${r}`);
1277
1277
  continue;
1278
1278
  }
1279
1279
  for (const o of n) {
@@ -1283,17 +1283,17 @@ class Ur {
1283
1283
  }
1284
1284
  }
1285
1285
  }
1286
- function xr() {
1287
- const t = new Ur();
1288
- return cr(t), wr(t), Lr(t), t.loadRegisteredModules(), t;
1286
+ function $r() {
1287
+ const t = new Br();
1288
+ return fr(t), Ar(t), Fr(t), t.loadRegisteredModules(), t;
1289
1289
  }
1290
- function Dr(t) {
1290
+ function Vr(t) {
1291
1291
  return Array.isArray(t) ? t : [t];
1292
1292
  }
1293
- function Fr(t) {
1294
- return t ? Dr(t).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
1293
+ function Kr(t) {
1294
+ return t ? Vr(t).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
1295
1295
  }
1296
- function Br(t, e) {
1296
+ function Yr(t, e) {
1297
1297
  if (t.length !== e.length)
1298
1298
  return !1;
1299
1299
  for (let r = 0; r < t.length; r += 1)
@@ -1301,7 +1301,7 @@ function Br(t, e) {
1301
1301
  return !1;
1302
1302
  return !0;
1303
1303
  }
1304
- const Re = pe("MotionController"), Ze = {
1304
+ const Te = Re("MotionController"), tt = {
1305
1305
  ease: [0.25, 0.1, 0.25, 1],
1306
1306
  "ease-in": [0.42, 0, 1, 1],
1307
1307
  "ease-out": [0, 0, 0.58, 1],
@@ -1331,88 +1331,88 @@ const Re = pe("MotionController"), Ze = {
1331
1331
  "ease-out-back": [0.175, 0.885, 0.32, 1.275],
1332
1332
  "ease-in-out-back": [0.68, -0.55, 0.265, 1.55]
1333
1333
  };
1334
- function B(t) {
1334
+ function $(t) {
1335
1335
  return t <= 0 ? 0 : t >= 1 ? 1 : t;
1336
1336
  }
1337
- function Qe(t) {
1337
+ function rt(t) {
1338
1338
  if (t == null) return;
1339
1339
  const e = `${t}`.trim();
1340
1340
  if (!e) return;
1341
1341
  const r = Number.parseFloat(e);
1342
1342
  return Number.isFinite(r) ? r : void 0;
1343
1343
  }
1344
- function et(t) {
1344
+ function nt(t) {
1345
1345
  return typeof CSS < "u" && CSS.escape ? CSS.escape(t) : t.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
1346
1346
  }
1347
- function tt(t, e, r, n) {
1347
+ function ot(t, e, r, n) {
1348
1348
  const u = new Float32Array(11);
1349
- function h(m, p, v) {
1350
- return ((3 * p - 3 * v + 1) * m + (3 * v - 6 * p)) * m * m + 3 * p * m;
1349
+ function h(p, g, w) {
1350
+ return ((3 * g - 3 * w + 1) * p + (3 * w - 6 * g)) * p * p + 3 * g * p;
1351
1351
  }
1352
- function l(m, p, v) {
1353
- return 3 * (3 * p - 3 * v + 1) * m * m + 2 * (3 * v - 6 * p) * m + 3 * p;
1352
+ function l(p, g, w) {
1353
+ return 3 * (3 * g - 3 * w + 1) * p * p + 2 * (3 * w - 6 * g) * p + 3 * g;
1354
1354
  }
1355
- function g(m, p) {
1356
- for (let v = 0; v < 4; v += 1) {
1357
- const k = l(p, t, r);
1355
+ function m(p, g) {
1356
+ for (let w = 0; w < 4; w += 1) {
1357
+ const k = l(g, t, r);
1358
1358
  if (k === 0)
1359
- return p;
1360
- const _ = h(p, t, r) - m;
1361
- p -= _ / k;
1359
+ return g;
1360
+ const O = h(g, t, r) - p;
1361
+ g -= O / k;
1362
1362
  }
1363
- return p;
1363
+ return g;
1364
1364
  }
1365
- function y(m, p, v) {
1366
- let k = 0, _ = 0, D = 0;
1365
+ function y(p, g, w) {
1366
+ let k = 0, O = 0, M = 0;
1367
1367
  do
1368
- _ = p + (v - p) / 2, k = h(_, t, r) - m, k > 0 ? v = _ : p = _;
1369
- while (Math.abs(k) > 1e-7 && ++D < 10);
1370
- return _;
1368
+ O = g + (w - g) / 2, k = h(O, t, r) - p, k > 0 ? w = O : g = O;
1369
+ while (Math.abs(k) > 1e-7 && ++M < 10);
1370
+ return O;
1371
1371
  }
1372
- function S(m) {
1373
- let p = 0, v = 1;
1372
+ function b(p) {
1373
+ let g = 0, w = 1;
1374
1374
  const k = 10;
1375
- for (; v !== k && u[v] <= m; v += 1)
1376
- p += 0.1;
1377
- v -= 1;
1378
- const _ = (m - u[v]) / (u[v + 1] - u[v]), D = p + _ * 0.1, z = l(D, t, r);
1379
- return z >= 1e-3 ? g(m, D) : z === 0 ? D : y(m, p, p + 0.1);
1375
+ for (; w !== k && u[w] <= p; w += 1)
1376
+ g += 0.1;
1377
+ w -= 1;
1378
+ const O = (p - u[w]) / (u[w + 1] - u[w]), M = g + O * 0.1, z = l(M, t, r);
1379
+ return z >= 1e-3 ? m(p, M) : z === 0 ? M : y(p, g, g + 0.1);
1380
1380
  }
1381
- for (let m = 0; m < 11; m += 1)
1382
- u[m] = h(m * 0.1, t, r);
1383
- return (m) => m <= 0 ? 0 : m >= 1 ? 1 : h(S(m), e, n);
1381
+ for (let p = 0; p < 11; p += 1)
1382
+ u[p] = h(p * 0.1, t, r);
1383
+ return (p) => p <= 0 ? 0 : p >= 1 ? 1 : h(b(p), e, n);
1384
1384
  }
1385
- function $r(t) {
1385
+ function Wr(t) {
1386
1386
  const e = /steps\(\s*([0-9]+)\s*(?:,\s*([a-z-]+)\s*)?\)/i.exec(t);
1387
1387
  if (!e)
1388
- return (o) => B(o);
1388
+ return (o) => $(o);
1389
1389
  const r = Math.max(1, parseInt(e[1], 10)), n = (e[2] ?? "end").toLowerCase();
1390
- return n === "start" || n === "jump-start" ? (o) => B(Math.ceil(o * r) / r) : n === "none" || n === "jump-none" ? (o) => B(Math.round(o * r) / r) : n === "both" || n === "jump-both" ? (o) => B((Math.floor(o * r) + 0.5) / r) : (o) => B(Math.floor(o * r) / r);
1390
+ return n === "start" || n === "jump-start" ? (o) => $(Math.ceil(o * r) / r) : n === "none" || n === "jump-none" ? (o) => $(Math.round(o * r) / r) : n === "both" || n === "jump-both" ? (o) => $((Math.floor(o * r) + 0.5) / r) : (o) => $(Math.floor(o * r) / r);
1391
1391
  }
1392
- function Vr(t) {
1392
+ function zr(t) {
1393
1393
  if (!t)
1394
- return (r) => B(r);
1394
+ return (r) => $(r);
1395
1395
  const e = t.trim().toLowerCase();
1396
1396
  if (!e || e === "linear")
1397
- return (r) => B(r);
1398
- if (Ze[e]) {
1399
- const [r, n, o, s] = Ze[e], i = tt(r, n, o, s);
1400
- return (a) => B(i(B(a)));
1397
+ return (r) => $(r);
1398
+ if (tt[e]) {
1399
+ const [r, n, o, s] = tt[e], i = ot(r, n, o, s);
1400
+ return (a) => $(i($(a)));
1401
1401
  }
1402
1402
  if (e.startsWith("cubic-bezier(") && e.endsWith(")")) {
1403
1403
  const n = e.slice(13, -1).split(",").map((o) => Number.parseFloat(o.trim()));
1404
1404
  if (n.length === 4 && n.every((o) => Number.isFinite(o))) {
1405
- const [o, s, i, a] = n, c = tt(o, s, i, a);
1406
- return (f) => B(c(B(f)));
1405
+ const [o, s, i, a] = n, c = ot(o, s, i, a);
1406
+ return (f) => $(c($(f)));
1407
1407
  }
1408
1408
  }
1409
1409
  if (e.startsWith("steps(") && e.endsWith(")")) {
1410
- const r = $r(e);
1411
- return (n) => r(B(n));
1410
+ const r = Wr(e);
1411
+ return (n) => r($(n));
1412
1412
  }
1413
- return (r) => B(r);
1413
+ return (r) => $(r);
1414
1414
  }
1415
- function Kr(t) {
1415
+ function qr(t) {
1416
1416
  if (!t)
1417
1417
  return;
1418
1418
  const e = /(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)\s*->\s*(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)/.exec(t);
@@ -1422,7 +1422,7 @@ function Kr(t) {
1422
1422
  if (![r, n, o, s].some((i) => !Number.isFinite(i)))
1423
1423
  return { inStart: r, inEnd: n, outStart: o, outEnd: s };
1424
1424
  }
1425
- class Yr {
1425
+ class Gr {
1426
1426
  bindingsByStyle = /* @__PURE__ */ new Map();
1427
1427
  observer;
1428
1428
  observeScheduled = !1;
@@ -1449,7 +1449,7 @@ class Yr {
1449
1449
  try {
1450
1450
  e();
1451
1451
  } catch (r) {
1452
- Re.warn("Failed to cleanup binding listener", r);
1452
+ Te.warn("Failed to cleanup binding listener", r);
1453
1453
  }
1454
1454
  this.globalCleanups.clear(), this.elementStates.clear(), this.styleToElements.clear(), this.bindingsByStyle.clear(), this.pendingScanStyles.clear(), this.scanScheduled = !1, this.observer && (this.observer.disconnect(), this.observer = void 0);
1455
1455
  }
@@ -1459,7 +1459,7 @@ class Yr {
1459
1459
  const n = (JSON.parse(e).motionBindings ?? []).map((o) => this.parseBinding(o)).filter((o) => o !== void 0);
1460
1460
  return n.length === 0 ? void 0 : { bindings: n };
1461
1461
  } catch (r) {
1462
- Re.warn("Failed to parse motion metadata", r);
1462
+ Te.warn("Failed to parse motion metadata", r);
1463
1463
  return;
1464
1464
  }
1465
1465
  }
@@ -1467,7 +1467,7 @@ class Yr {
1467
1467
  const r = e.source?.trim();
1468
1468
  if (!r)
1469
1469
  return;
1470
- const n = Qe(e.min) ?? 0, o = Qe(e.max), s = o === void 0 ? n + 100 : o, i = (e.clamp ?? "clamp").trim().toLowerCase(), a = !!e.reverse, c = Vr(e.ease), f = Kr(e.map), u = e.targetId?.trim() || void 0;
1470
+ const n = rt(e.min) ?? 0, o = rt(e.max), s = o === void 0 ? n + 100 : o, i = (e.clamp ?? "clamp").trim().toLowerCase(), a = !!e.reverse, c = zr(e.ease), f = qr(e.map), u = e.targetId?.trim() || void 0;
1471
1471
  return Number.isNaN(n) || Number.isNaN(s) ? void 0 : {
1472
1472
  source: r.toLowerCase(),
1473
1473
  min: n,
@@ -1525,7 +1525,7 @@ class Yr {
1525
1525
  const r = this.bindingsByStyle.get(e);
1526
1526
  if (!r || typeof document > "u")
1527
1527
  return;
1528
- const n = `.${et(e)}`;
1528
+ const n = `.${nt(e)}`;
1529
1529
  document.querySelectorAll(n).forEach((s) => this.applyStyleToElement(s, e, r));
1530
1530
  }
1531
1531
  applyStyleToElement(e, r, n) {
@@ -1565,7 +1565,7 @@ class Yr {
1565
1565
  }
1566
1566
  resolveScrollContainer(e, r) {
1567
1567
  if (r.targetId) {
1568
- const n = `[data-ikon-motion-source="${et(r.targetId)}"]`, o = typeof document < "u" ? document.querySelector(n) : null;
1568
+ const n = `[data-ikon-motion-source="${nt(r.targetId)}"]`, o = typeof document < "u" ? document.querySelector(n) : null;
1569
1569
  if (o)
1570
1570
  return o;
1571
1571
  }
@@ -1593,7 +1593,7 @@ class Yr {
1593
1593
  case "unclamped":
1594
1594
  return e;
1595
1595
  default:
1596
- return B(e);
1596
+ return $(e);
1597
1597
  }
1598
1598
  }
1599
1599
  applyMap(e, r) {
@@ -1635,7 +1635,7 @@ class Yr {
1635
1635
  try {
1636
1636
  i();
1637
1637
  } catch (a) {
1638
- Re.warn("Failed to cleanup listener", a);
1638
+ Te.warn("Failed to cleanup listener", a);
1639
1639
  }
1640
1640
  this.globalCleanups.delete(i);
1641
1641
  }
@@ -1680,29 +1680,29 @@ class Yr {
1680
1680
  }
1681
1681
  }
1682
1682
  }
1683
- const Ee = new Yr();
1684
- function Wr(t) {
1685
- const e = T(/* @__PURE__ */ new Map()), r = x(({ styleId: s, css: i, common: a }) => {
1683
+ const Ce = new Gr();
1684
+ function Hr(t) {
1685
+ const e = v(/* @__PURE__ */ new Map()), r = D(({ styleId: s, css: i, common: a }) => {
1686
1686
  if (!(!s || typeof document > "u")) {
1687
1687
  if (i) {
1688
1688
  let c = e.current.get(s);
1689
1689
  c || (c = document.createElement("style"), c.setAttribute("data-ikon-style-id", s), document.head.appendChild(c), e.current.set(s, c)), c.textContent = i;
1690
1690
  }
1691
- Ee.registerStyle(s, a);
1691
+ Ce.registerStyle(s, a);
1692
1692
  }
1693
- }, []), n = x((s) => {
1693
+ }, []), n = D((s) => {
1694
1694
  if (!(typeof document > "u"))
1695
1695
  for (const i of s) {
1696
1696
  const a = e.current.get(i);
1697
- a && (a.remove(), e.current.delete(i)), Ee.unregisterStyle(i);
1697
+ a && (a.remove(), e.current.delete(i)), Ce.unregisterStyle(i);
1698
1698
  }
1699
- }, []), o = x(() => {
1699
+ }, []), o = D(() => {
1700
1700
  if (typeof document < "u") {
1701
1701
  for (const s of e.current.values())
1702
1702
  s.remove();
1703
1703
  e.current.clear();
1704
1704
  }
1705
- Ee.reset();
1705
+ Ce.reset();
1706
1706
  }, []);
1707
1707
  return L(() => {
1708
1708
  if (!t) return;
@@ -1714,7 +1714,7 @@ function Wr(t) {
1714
1714
  };
1715
1715
  }, [t, o, r, n]), L(() => () => o(), [o]), { setStyle: r, deleteStyles: n, reset: o };
1716
1716
  }
1717
- function zr(t) {
1717
+ function Jr(t) {
1718
1718
  const e = [];
1719
1719
  for (const [r, n] of t) {
1720
1720
  const o = n.store.getSnapshot(), s = o.rootViewId && o.views.has(o.rootViewId);
@@ -1722,62 +1722,62 @@ function zr(t) {
1722
1722
  }
1723
1723
  return e.sort(), e.join(",");
1724
1724
  }
1725
- function qr(t) {
1726
- const [e, r] = G(), n = T("");
1725
+ function Xr(t) {
1726
+ const [e, r] = G(), n = v("");
1727
1727
  return L(() => {
1728
1728
  if (!t) {
1729
1729
  r(void 0), n.current = "";
1730
1730
  return;
1731
1731
  }
1732
1732
  const o = () => {
1733
- const s = t.getStores(), i = zr(s);
1733
+ const s = t.getStores(), i = Jr(s);
1734
1734
  i !== n.current && (n.current = i, r(s));
1735
1735
  };
1736
1736
  return o(), t.subscribe(o);
1737
1737
  }, [t]), e;
1738
1738
  }
1739
- var Gr = typeof global == "object" && global && global.Object === Object && global, Hr = typeof self == "object" && self && self.Object === Object && self, Jr = Gr || Hr || Function("return this")(), he = Jr.Symbol, ht = Object.prototype, Xr = ht.hasOwnProperty, Zr = ht.toString, se = he ? he.toStringTag : void 0;
1740
- function Qr(t) {
1741
- var e = Xr.call(t, se), r = t[se];
1739
+ var Zr = typeof global == "object" && global && global.Object === Object && global, Qr = typeof self == "object" && self && self.Object === Object && self, en = Zr || Qr || Function("return this")(), be = en.Symbol, gt = Object.prototype, tn = gt.hasOwnProperty, rn = gt.toString, ue = be ? be.toStringTag : void 0;
1740
+ function nn(t) {
1741
+ var e = tn.call(t, ue), r = t[ue];
1742
1742
  try {
1743
- t[se] = void 0;
1743
+ t[ue] = void 0;
1744
1744
  var n = !0;
1745
1745
  } catch {
1746
1746
  }
1747
- var o = Zr.call(t);
1748
- return n && (e ? t[se] = r : delete t[se]), o;
1747
+ var o = rn.call(t);
1748
+ return n && (e ? t[ue] = r : delete t[ue]), o;
1749
1749
  }
1750
- var en = Object.prototype, tn = en.toString;
1751
- function rn(t) {
1752
- return tn.call(t);
1750
+ var on = Object.prototype, sn = on.toString;
1751
+ function an(t) {
1752
+ return sn.call(t);
1753
1753
  }
1754
- var nn = "[object Null]", on = "[object Undefined]", rt = he ? he.toStringTag : void 0;
1755
- function sn(t) {
1756
- return t == null ? t === void 0 ? on : nn : rt && rt in Object(t) ? Qr(t) : rn(t);
1754
+ var cn = "[object Null]", un = "[object Undefined]", st = be ? be.toStringTag : void 0;
1755
+ function ln(t) {
1756
+ return t == null ? t === void 0 ? un : cn : st && st in Object(t) ? nn(t) : an(t);
1757
1757
  }
1758
- function an(t) {
1758
+ function dn(t) {
1759
1759
  return t != null && typeof t == "object";
1760
1760
  }
1761
- var cn = Array.isArray, un = "[object String]";
1762
- function ln(t) {
1763
- return typeof t == "string" || !cn(t) && an(t) && sn(t) == un;
1761
+ var fn = Array.isArray, hn = "[object String]";
1762
+ function mn(t) {
1763
+ return typeof t == "string" || !fn(t) && dn(t) && ln(t) == hn;
1764
1764
  }
1765
- const nt = "ikonUiModules";
1766
- function je(t) {
1765
+ const it = "ikonUiModules";
1766
+ function Ue(t) {
1767
1767
  return typeof t == "object" && t !== null && !Array.isArray(t);
1768
1768
  }
1769
- function dn(t) {
1769
+ function pn(t) {
1770
1770
  if (!Array.isArray(t))
1771
1771
  return;
1772
1772
  const e = /* @__PURE__ */ new Set();
1773
1773
  for (const r of t) {
1774
- if (!ln(r)) continue;
1774
+ if (!mn(r)) continue;
1775
1775
  const n = r.trim();
1776
1776
  n && (e.has(n) || e.add(n));
1777
1777
  }
1778
1778
  return Array.from(e);
1779
1779
  }
1780
- function lo(t, e) {
1780
+ function So(t, e) {
1781
1781
  if (t === e)
1782
1782
  return !0;
1783
1783
  if (!t || !e)
@@ -1789,19 +1789,19 @@ function lo(t, e) {
1789
1789
  return !1;
1790
1790
  return !0;
1791
1791
  }
1792
- function fn(t) {
1793
- if (!(!je(t) || !Object.prototype.hasOwnProperty.call(t, nt)))
1794
- return dn(t[nt]);
1792
+ function gn(t) {
1793
+ if (!(!Ue(t) || !Object.prototype.hasOwnProperty.call(t, it)))
1794
+ return pn(t[it]);
1795
1795
  }
1796
- function fo(...t) {
1796
+ function bo(...t) {
1797
1797
  for (const e of t) {
1798
- const r = fn(e);
1798
+ const r = gn(e);
1799
1799
  if (r !== void 0)
1800
1800
  return r;
1801
1801
  }
1802
1802
  }
1803
- function ho(t) {
1804
- if (!je(t))
1803
+ function wo(t) {
1804
+ if (!Ue(t))
1805
1805
  return;
1806
1806
  const e = t, r = Object.keys(e).find((c) => c.toLowerCase() === "modules");
1807
1807
  if (!r)
@@ -1814,15 +1814,15 @@ function ho(t) {
1814
1814
  const o = [], s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
1815
1815
  for (const c of n) {
1816
1816
  if (typeof c == "string") {
1817
- const S = c.trim();
1818
- if (!S || i.has(S))
1817
+ const b = c.trim();
1818
+ if (!b || i.has(b))
1819
1819
  continue;
1820
- o.push(S), i.add(S);
1820
+ o.push(b), i.add(b);
1821
1821
  continue;
1822
1822
  }
1823
- if (!je(c))
1823
+ if (!Ue(c))
1824
1824
  continue;
1825
- const f = c, u = Object.keys(f).find((S) => S.toLowerCase() === "name");
1825
+ const f = c, u = Object.keys(f).find((b) => b.toLowerCase() === "name");
1826
1826
  if (!u)
1827
1827
  continue;
1828
1828
  const h = f[u];
@@ -1831,7 +1831,7 @@ function ho(t) {
1831
1831
  const l = h.trim();
1832
1832
  if (!l)
1833
1833
  continue;
1834
- const g = Object.keys(f).find((S) => S.toLowerCase() === "javascript"), y = g ? f[g] : void 0;
1834
+ const m = Object.keys(f).find((b) => b.toLowerCase() === "javascript"), y = m ? f[m] : void 0;
1835
1835
  typeof y == "string" && s.set(l, y), i.has(l) || (o.push(l), i.add(l));
1836
1836
  }
1837
1837
  if (!o.length && s.size === 0)
@@ -1849,7 +1849,7 @@ const E = {
1849
1849
  Line: 4,
1850
1850
  Paragraph: 8,
1851
1851
  Emoji: 16
1852
- }, hn = [
1852
+ }, yn = [
1853
1853
  {
1854
1854
  flag: E.Letter,
1855
1855
  hints: [
@@ -1898,32 +1898,32 @@ const E = {
1898
1898
  "[data-emoji]"
1899
1899
  ]
1900
1900
  }
1901
- ], Me = E.Letter | E.Word | E.Line | E.Paragraph | E.Emoji, mn = E.Letter | E.Word | E.Line | E.Paragraph, ot = /* @__PURE__ */ new Map(), pn = 16384;
1902
- function mo(t, e) {
1903
- if (!t || t.length > pn)
1901
+ ], xe = E.Letter | E.Word | E.Line | E.Paragraph | E.Emoji, Sn = E.Letter | E.Word | E.Line | E.Paragraph, at = /* @__PURE__ */ new Map(), bn = 16384;
1902
+ function vo(t, e) {
1903
+ if (!t || t.length > bn)
1904
1904
  return t;
1905
- const r = Pn(e), n = te(r, E.Emoji), o = r & mn;
1905
+ const r = Un(e), n = te(r, E.Emoji), o = r & Sn;
1906
1906
  if (o === E.None && !n)
1907
1907
  return t;
1908
1908
  const s = t.replace(/\r\n/g, `
1909
1909
  `).replace(/\r/g, `
1910
1910
  `);
1911
1911
  if (o === E.None)
1912
- return ct(s);
1913
- const i = _n(s);
1912
+ return dt(s);
1913
+ const i = jn(s);
1914
1914
  if (i.length === 0)
1915
- return n ? ct(s) : t;
1916
- const a = Nn(i), c = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, f = [];
1915
+ return n ? dt(s) : t;
1916
+ const a = Ln(i), c = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, f = [];
1917
1917
  for (const u of a) {
1918
- const h = gn(u, r, c);
1918
+ const h = wn(u, r, c);
1919
1919
  f.push(...h);
1920
1920
  }
1921
1921
  return f;
1922
1922
  }
1923
- function gn(t, e, r) {
1923
+ function wn(t, e, r) {
1924
1924
  const n = [];
1925
1925
  for (const o of t) {
1926
- const s = yn(o, e, r);
1926
+ const s = vn(o, e, r);
1927
1927
  n.push(...s);
1928
1928
  }
1929
1929
  if (te(e, E.Paragraph)) {
@@ -1933,7 +1933,7 @@ function gn(t, e, r) {
1933
1933
  "span",
1934
1934
  {
1935
1935
  "data-motion-paragraph": !0,
1936
- style: ge(o),
1936
+ style: Ee(o),
1937
1937
  children: n
1938
1938
  },
1939
1939
  `motion-paragraph-${o}`
@@ -1942,12 +1942,12 @@ function gn(t, e, r) {
1942
1942
  }
1943
1943
  return n;
1944
1944
  }
1945
- function yn(t, e, r) {
1946
- const n = Sn(t.text, e, r), o = [];
1945
+ function vn(t, e, r) {
1946
+ const n = Rn(t.text, e, r), o = [];
1947
1947
  if (te(e, E.Line)) {
1948
1948
  const s = r.line++;
1949
1949
  o.push(
1950
- /* @__PURE__ */ A.jsx("span", { "data-motion-line": !0, style: ge(s), children: n }, `motion-line-${s}`)
1950
+ /* @__PURE__ */ A.jsx("span", { "data-motion-line": !0, style: Ee(s), children: n }, `motion-line-${s}`)
1951
1951
  );
1952
1952
  } else
1953
1953
  o.push(...n);
@@ -1955,7 +1955,7 @@ function yn(t, e, r) {
1955
1955
  o.push(/* @__PURE__ */ A.jsx("br", {}, `motion-break-${r.br++}`));
1956
1956
  return o;
1957
1957
  }
1958
- function Sn(t, e, r) {
1958
+ function Rn(t, e, r) {
1959
1959
  if (!t)
1960
1960
  return [];
1961
1961
  const n = te(e, E.Word), o = [], s = /(\s+)/g;
@@ -1963,39 +1963,39 @@ function Sn(t, e, r) {
1963
1963
  for (; (a = s.exec(t)) !== null; ) {
1964
1964
  if (a.index > i) {
1965
1965
  const c = t.slice(i, a.index);
1966
- o.push(st(c, r, e, n));
1966
+ o.push(ct(c, r, e, n));
1967
1967
  }
1968
1968
  o.push(a[0]), i = a.index + a[0].length;
1969
1969
  }
1970
1970
  if (i < t.length) {
1971
1971
  const c = t.slice(i);
1972
- o.push(st(c, r, e, n));
1972
+ o.push(ct(c, r, e, n));
1973
1973
  }
1974
1974
  return o;
1975
1975
  }
1976
- function st(t, e, r, n) {
1977
- const o = e.word++, s = wn(t, r, e), i = `motion-word-${o}`, a = bn(o, n);
1976
+ function ct(t, e, r, n) {
1977
+ const o = e.word++, s = An(t, r, e), i = `motion-word-${o}`, a = En(o, n);
1978
1978
  return n ? /* @__PURE__ */ A.jsx("span", { "data-motion-word": !0, style: a, children: s }, i) : /* @__PURE__ */ A.jsx("span", { style: a, children: s }, i);
1979
1979
  }
1980
- function bn(t, e) {
1981
- return e ? { ...ge(t), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
1980
+ function En(t, e) {
1981
+ return e ? { ...Ee(t), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
1982
1982
  }
1983
- function wn(t, e, r) {
1983
+ function An(t, e, r) {
1984
1984
  if (!t)
1985
1985
  return [];
1986
1986
  const n = te(e, E.Letter), o = te(e, E.Emoji);
1987
1987
  if (!n) {
1988
1988
  if (!o)
1989
1989
  return [t];
1990
- const a = Le(t);
1990
+ const a = De(t);
1991
1991
  if (a.length === 0)
1992
1992
  return [t];
1993
- const { nodes: c } = pt(a, r);
1993
+ const { nodes: c } = St(a, r);
1994
1994
  return c;
1995
1995
  }
1996
- const s = [], i = Le(t);
1996
+ const s = [], i = De(t);
1997
1997
  for (const a of i) {
1998
- const c = r.letter++, f = `motion-letter-${c}`, u = ge(c);
1998
+ const c = r.letter++, f = `motion-letter-${c}`, u = Ee(c);
1999
1999
  if (a === `
2000
2000
  `) {
2001
2001
  s.push(
@@ -2003,55 +2003,55 @@ function wn(t, e, r) {
2003
2003
  );
2004
2004
  continue;
2005
2005
  }
2006
- const l = o && mt(a) ? { "data-motion-emoji": !0 } : void 0, g = a === " " ? " " : a;
2006
+ const l = o && yt(a) ? { "data-motion-emoji": !0 } : void 0, m = a === " " ? " " : a;
2007
2007
  s.push(
2008
- /* @__PURE__ */ A.jsx("span", { "data-motion-letter": !0, style: u, ...l, children: g }, f)
2008
+ /* @__PURE__ */ A.jsx("span", { "data-motion-letter": !0, style: u, ...l, children: m }, f)
2009
2009
  );
2010
2010
  }
2011
2011
  return s;
2012
2012
  }
2013
- function Le(t) {
2013
+ function De(t) {
2014
2014
  if (!t)
2015
2015
  return [];
2016
- const e = vn();
2017
- return e ? Array.from(e.segment(t), (r) => r.segment) : Rn(t);
2016
+ const e = kn();
2017
+ return e ? Array.from(e.segment(t), (r) => r.segment) : Tn(t);
2018
2018
  }
2019
- let ie;
2020
- function vn() {
2021
- return ie !== void 0 || (typeof Intl < "u" && typeof Intl.Segmenter == "function" ? ie = new Intl.Segmenter(void 0, { granularity: "grapheme" }) : ie = null), ie;
2019
+ let le;
2020
+ function kn() {
2021
+ return le !== void 0 || (typeof Intl < "u" && typeof Intl.Segmenter == "function" ? le = new Intl.Segmenter(void 0, { granularity: "grapheme" }) : le = null), le;
2022
2022
  }
2023
- function Rn(t) {
2023
+ function Tn(t) {
2024
2024
  const e = [], r = Array.from(t);
2025
2025
  let n = "";
2026
2026
  for (let o = 0; o < r.length; o++) {
2027
2027
  const s = r[o], i = r[o + 1];
2028
- n += s, !(i && En(s, i)) && (e.push(n), n = "");
2028
+ n += s, !(i && Cn(s, i)) && (e.push(n), n = "");
2029
2029
  }
2030
2030
  return n && e.push(n), e;
2031
2031
  }
2032
- function En(t, e) {
2033
- return e ? !!(it(t) || it(e) || kn(e) || An(e) || Tn(e) || at(t) && at(e)) : !1;
2032
+ function Cn(t, e) {
2033
+ return e ? !!(ut(t) || ut(e) || _n(e) || In(e) || On(e) || lt(t) && lt(e)) : !1;
2034
2034
  }
2035
- function it(t) {
2035
+ function ut(t) {
2036
2036
  return t.codePointAt(0) === 8205;
2037
2037
  }
2038
- function An(t) {
2038
+ function In(t) {
2039
2039
  const e = t.codePointAt(0);
2040
2040
  return e === void 0 ? !1 : e >= 65024 && e <= 65039 || e >= 917760 && e <= 917999;
2041
2041
  }
2042
- function Tn(t) {
2042
+ function On(t) {
2043
2043
  const e = t.codePointAt(0);
2044
2044
  return e === void 0 ? !1 : e >= 127995 && e <= 127999;
2045
2045
  }
2046
- function at(t) {
2046
+ function lt(t) {
2047
2047
  const e = t.codePointAt(0);
2048
2048
  return e === void 0 ? !1 : e >= 127462 && e <= 127487;
2049
2049
  }
2050
- let Ae;
2051
- function kn(t) {
2052
- return t ? (Ae || (Ae = Cn()), Ae(t)) : !1;
2050
+ let Ie;
2051
+ function _n(t) {
2052
+ return t ? (Ie || (Ie = Nn()), Ie(t)) : !1;
2053
2053
  }
2054
- function Cn() {
2054
+ function Nn() {
2055
2055
  try {
2056
2056
  const t = new RegExp("\\p{Mark}", "u");
2057
2057
  return (e) => t.test(e);
@@ -2062,19 +2062,19 @@ function Cn() {
2062
2062
  };
2063
2063
  }
2064
2064
  }
2065
- let Te;
2066
- function mt(t) {
2067
- return t ? (Te || (Te = In()), Te(t)) : !1;
2065
+ let Oe;
2066
+ function yt(t) {
2067
+ return t ? (Oe || (Oe = Pn()), Oe(t)) : !1;
2068
2068
  }
2069
- function In() {
2069
+ function Pn() {
2070
2070
  try {
2071
2071
  const t = new RegExp("\\p{Extended_Pictographic}", "u");
2072
2072
  return (e) => t.test(e);
2073
2073
  } catch {
2074
- return On;
2074
+ return Mn;
2075
2075
  }
2076
2076
  }
2077
- function On(t) {
2077
+ function Mn(t) {
2078
2078
  if (!t)
2079
2079
  return !1;
2080
2080
  for (const e of Array.from(t)) {
@@ -2084,7 +2084,7 @@ function On(t) {
2084
2084
  }
2085
2085
  return !1;
2086
2086
  }
2087
- function _n(t) {
2087
+ function jn(t) {
2088
2088
  const e = [];
2089
2089
  let r = "", n = 0;
2090
2090
  for (let o = 0; o < t.length; o++) {
@@ -2098,7 +2098,7 @@ function _n(t) {
2098
2098
  }
2099
2099
  return (n > 0 || r.length > 0) && e.push({ text: r, breaks: n }), e;
2100
2100
  }
2101
- function Nn(t) {
2101
+ function Ln(t) {
2102
2102
  if (t.length === 0)
2103
2103
  return [];
2104
2104
  const e = [];
@@ -2110,7 +2110,7 @@ function Nn(t) {
2110
2110
  function te(t, e) {
2111
2111
  return (t & e) === e;
2112
2112
  }
2113
- function ge(t) {
2113
+ function Ee(t) {
2114
2114
  return {
2115
2115
  "--tw-motion-seq-index": t.toString(),
2116
2116
  backgroundColor: "inherit",
@@ -2127,23 +2127,23 @@ function ge(t) {
2127
2127
  WebkitTextFillColor: "inherit"
2128
2128
  };
2129
2129
  }
2130
- function ct(t) {
2130
+ function dt(t) {
2131
2131
  if (!t)
2132
2132
  return t;
2133
- const e = Le(t);
2133
+ const e = De(t);
2134
2134
  if (e.length === 0)
2135
2135
  return t;
2136
- const { nodes: r, sawEmoji: n } = pt(e);
2136
+ const { nodes: r, sawEmoji: n } = St(e);
2137
2137
  return n ? r.length === 1 ? r[0] ?? t : r : t;
2138
2138
  }
2139
- function pt(t, e) {
2139
+ function St(t, e) {
2140
2140
  const r = [];
2141
2141
  let n = "", o = !1, s = e?.emoji ?? 0;
2142
2142
  const i = () => {
2143
2143
  n && (r.push(n), n = "");
2144
2144
  };
2145
2145
  for (const a of t) {
2146
- if (mt(a)) {
2146
+ if (yt(a)) {
2147
2147
  o = !0, i();
2148
2148
  const f = `motion-emoji-${e ? e.emoji++ : s++}`;
2149
2149
  r.push(
@@ -2155,13 +2155,13 @@ function pt(t, e) {
2155
2155
  }
2156
2156
  return i(), o ? { nodes: r, sawEmoji: !0 } : { nodes: [t.join("")], sawEmoji: !1 };
2157
2157
  }
2158
- function Pn(t) {
2158
+ function Un(t) {
2159
2159
  if (!t)
2160
2160
  return E.None;
2161
2161
  const e = t.trim();
2162
2162
  if (!e)
2163
2163
  return E.None;
2164
- const r = ot.get(e);
2164
+ const r = at.get(e);
2165
2165
  if (typeof r == "number")
2166
2166
  return r;
2167
2167
  if (typeof document > "u")
@@ -2169,8 +2169,8 @@ function Pn(t) {
2169
2169
  const n = e.split(/\s+/).filter(Boolean);
2170
2170
  if (n.length === 0)
2171
2171
  return E.None;
2172
- const s = n.map((c) => `.${jn(c)}`).map(
2173
- (c) => new RegExp(`(^|[^a-zA-Z0-9_-])${Mn(c)}(?![a-zA-Z0-9_-])`)
2172
+ const s = n.map((c) => `.${xn(c)}`).map(
2173
+ (c) => new RegExp(`(^|[^a-zA-Z0-9_-])${Dn(c)}(?![a-zA-Z0-9_-])`)
2174
2174
  );
2175
2175
  let i = E.None, a = !1;
2176
2176
  for (const c of Array.from(document.styleSheets)) {
@@ -2180,14 +2180,14 @@ function Pn(t) {
2180
2180
  } catch {
2181
2181
  continue;
2182
2182
  }
2183
- const u = gt(f, s);
2184
- if (u.mask && (i |= u.mask, i === Me))
2183
+ const u = bt(f, s);
2184
+ if (u.mask && (i |= u.mask, i === xe))
2185
2185
  break;
2186
2186
  a ||= u.sawStyleRule;
2187
2187
  }
2188
- return (i !== E.None || a) && ot.set(e, i), i;
2188
+ return (i !== E.None || a) && at.set(e, i), i;
2189
2189
  }
2190
- function gt(t, e) {
2190
+ function bt(t, e) {
2191
2191
  if (!t)
2192
2192
  return { mask: E.None, sawStyleRule: !1 };
2193
2193
  let r = E.None, n = !1;
@@ -2198,13 +2198,13 @@ function gt(t, e) {
2198
2198
  const a = s.selectorText ?? "";
2199
2199
  if (!a || !e.some((f) => f.test(a))) continue;
2200
2200
  n = !0;
2201
- for (const f of hn)
2201
+ for (const f of yn)
2202
2202
  f.hints.some((u) => a.includes(u)) && (r |= f.flag);
2203
- if (r === Me)
2203
+ if (r === xe)
2204
2204
  return { mask: r, sawStyleRule: !0 };
2205
2205
  } else if ("cssRules" in s) {
2206
- const i = gt(s.cssRules, e);
2207
- if (i.mask && (r |= i.mask, r === Me))
2206
+ const i = bt(s.cssRules, e);
2207
+ if (i.mask && (r |= i.mask, r === xe))
2208
2208
  return { mask: r, sawStyleRule: !0 };
2209
2209
  n ||= i.sawStyleRule;
2210
2210
  }
@@ -2212,38 +2212,48 @@ function gt(t, e) {
2212
2212
  }
2213
2213
  return { mask: r, sawStyleRule: n };
2214
2214
  }
2215
- function jn(t) {
2215
+ function xn(t) {
2216
2216
  return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(t) : t.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
2217
2217
  }
2218
- function Mn(t) {
2218
+ function Dn(t) {
2219
2219
  return t.replace(/[.*+?^${}()|[\]\\]/g, (e) => `\\${e}`);
2220
2220
  }
2221
- const Be = "ikon_auth_session", Ln = 7 * 24 * 60 * 60 * 1e3;
2222
- function ye(t) {
2221
+ const Ke = "ikon_auth_session", Fn = 7 * 24 * 60 * 60 * 1e3, Bn = 60 * 1e3;
2222
+ function $n(t) {
2223
2223
  try {
2224
- localStorage.setItem(Be, JSON.stringify(t));
2224
+ const e = t.split(".");
2225
+ if (e.length !== 3) return !0;
2226
+ const r = JSON.parse(atob(e[1]));
2227
+ return typeof r.exp != "number" ? !1 : Date.now() >= r.exp * 1e3 - Bn;
2228
+ } catch {
2229
+ return !0;
2230
+ }
2231
+ }
2232
+ function Ae(t) {
2233
+ try {
2234
+ localStorage.setItem(Ke, JSON.stringify(t));
2225
2235
  } catch {
2226
2236
  console.warn("Failed to save auth session to localStorage");
2227
2237
  }
2228
2238
  }
2229
- function yt() {
2239
+ function wt() {
2230
2240
  try {
2231
- const t = localStorage.getItem(Be);
2241
+ const t = localStorage.getItem(Ke);
2232
2242
  if (!t) return null;
2233
2243
  const e = JSON.parse(t);
2234
- return Date.now() - e.authenticatedAt > Ln ? (St(), null) : e;
2244
+ return Date.now() - e.authenticatedAt > Fn || $n(e.token) ? (we(), null) : e;
2235
2245
  } catch {
2236
2246
  return console.warn("Failed to load auth session from localStorage"), null;
2237
2247
  }
2238
2248
  }
2239
- function St() {
2249
+ function we() {
2240
2250
  try {
2241
- localStorage.removeItem(Be);
2251
+ localStorage.removeItem(Ke);
2242
2252
  } catch {
2243
2253
  console.warn("Failed to clear auth session from localStorage");
2244
2254
  }
2245
2255
  }
2246
- function ae(t) {
2256
+ function de(t) {
2247
2257
  return {
2248
2258
  id: "",
2249
2259
  provider: t.provider,
@@ -2251,8 +2261,8 @@ function ae(t) {
2251
2261
  authenticatedAt: t.authenticatedAt
2252
2262
  };
2253
2263
  }
2254
- async function bt(t, e) {
2255
- const r = _t(), n = await fetch(`${e}/anonymous`, {
2264
+ async function vt(t, e) {
2265
+ const r = Pt(), n = await fetch(`${e}/anonymous`, {
2256
2266
  method: "POST",
2257
2267
  headers: { "Content-Type": "application/json" },
2258
2268
  body: JSON.stringify({ deviceId: r, space: t })
@@ -2266,9 +2276,9 @@ async function bt(t, e) {
2266
2276
  provider: "anonymous",
2267
2277
  authenticatedAt: Date.now()
2268
2278
  };
2269
- return ye(s), s;
2279
+ return Ae(s), s;
2270
2280
  }
2271
- async function po(t) {
2281
+ async function Ro(t) {
2272
2282
  const { email: e, spaceId: r, authUrl: n, returnUrl: o = window.location.origin + window.location.pathname } = t, s = await fetch(`${n}/email/send`, {
2273
2283
  method: "POST",
2274
2284
  headers: { "Content-Type": "application/json" },
@@ -2283,22 +2293,22 @@ async function po(t) {
2283
2293
  throw new Error(i);
2284
2294
  }
2285
2295
  }
2286
- function Un() {
2296
+ function Vn() {
2287
2297
  const t = new URLSearchParams(window.location.search), e = t.get("ikon_token"), r = t.get("ikon_provider");
2288
2298
  return e && r ? { token: e, provider: r } : null;
2289
2299
  }
2290
- function xn() {
2300
+ function Kn() {
2291
2301
  const e = new URLSearchParams(window.location.search).get("error");
2292
2302
  return e ? decodeURIComponent(e) : null;
2293
2303
  }
2294
- function ut() {
2304
+ function ft() {
2295
2305
  window.history.replaceState({}, "", window.location.pathname);
2296
2306
  }
2297
- function Dn(t, e, r, n) {
2307
+ function Yn(t, e, r, n) {
2298
2308
  const o = n ?? window.location.origin + window.location.pathname + window.location.search;
2299
2309
  return `${r}/oauth/${t}?space=${encodeURIComponent(e)}&return=${encodeURIComponent(o)}`;
2300
2310
  }
2301
- async function Fn(t) {
2311
+ async function Wn(t) {
2302
2312
  const e = await fetch(`${t}/passkey/registration/options`, {
2303
2313
  method: "POST",
2304
2314
  headers: { "Content-Type": "application/json" }
@@ -2309,7 +2319,7 @@ async function Fn(t) {
2309
2319
  }
2310
2320
  return e.json();
2311
2321
  }
2312
- async function Bn(t, e, r) {
2322
+ async function zn(t, e, r) {
2313
2323
  const n = await fetch(`${t}/passkey/registration/verify`, {
2314
2324
  method: "POST",
2315
2325
  headers: { "Content-Type": "application/json" },
@@ -2324,9 +2334,9 @@ async function Bn(t, e, r) {
2324
2334
  provider: "passkey",
2325
2335
  authenticatedAt: Date.now()
2326
2336
  };
2327
- return ye(s), s;
2337
+ return Ae(s), s;
2328
2338
  }
2329
- async function $n(t, e) {
2339
+ async function qn(t, e) {
2330
2340
  const r = await fetch(`${t}/passkey/authentication/options`, {
2331
2341
  method: "POST",
2332
2342
  headers: { "Content-Type": "application/json" },
@@ -2338,7 +2348,7 @@ async function $n(t, e) {
2338
2348
  }
2339
2349
  return r.json();
2340
2350
  }
2341
- async function Vn(t, e) {
2351
+ async function Gn(t, e) {
2342
2352
  const r = await fetch(`${t}/passkey/authentication/verify`, {
2343
2353
  method: "POST",
2344
2354
  headers: { "Content-Type": "application/json" },
@@ -2353,32 +2363,32 @@ async function Vn(t, e) {
2353
2363
  provider: "passkey",
2354
2364
  authenticatedAt: Date.now()
2355
2365
  };
2356
- return ye(o), o;
2366
+ return Ae(o), o;
2357
2367
  }
2358
- function W(t) {
2368
+ function q(t) {
2359
2369
  const e = new Uint8Array(t);
2360
2370
  let r = "";
2361
2371
  for (const o of e)
2362
2372
  r += String.fromCharCode(o);
2363
2373
  return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
2364
2374
  }
2365
- function me(t) {
2375
+ function ve(t) {
2366
2376
  const e = t.replace(/-/g, "+").replace(/_/g, "/"), r = (4 - e.length % 4) % 4, n = e.padEnd(e.length + r, "="), o = atob(n), s = new ArrayBuffer(o.length), i = new Uint8Array(s);
2367
2377
  for (let a = 0; a < o.length; a++)
2368
2378
  i[a] = o.charCodeAt(a);
2369
2379
  return s;
2370
2380
  }
2371
- function $e() {
2372
- return Kn.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
2381
+ function Ye() {
2382
+ return Hn.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
2373
2383
  }
2374
- const Kn = {
2384
+ const Hn = {
2375
2385
  stubThis: (t) => t
2376
2386
  };
2377
- function wt(t) {
2387
+ function Rt(t) {
2378
2388
  const { id: e } = t;
2379
2389
  return {
2380
2390
  ...t,
2381
- id: me(e),
2391
+ id: ve(e),
2382
2392
  /**
2383
2393
  * `descriptor.transports` is an array of our `AuthenticatorTransportFuture` that includes newer
2384
2394
  * transports that TypeScript's DOM lib is ignorant of. Convince TS that our list of transports
@@ -2387,7 +2397,7 @@ function wt(t) {
2387
2397
  transports: t.transports
2388
2398
  };
2389
2399
  }
2390
- function vt(t) {
2400
+ function Et(t) {
2391
2401
  return (
2392
2402
  // Consider localhost valid as well since it's okay wrt Secure Contexts
2393
2403
  t === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)
@@ -2403,7 +2413,7 @@ class P extends Error {
2403
2413
  }), this.name = o ?? n.name, this.code = r;
2404
2414
  }
2405
2415
  }
2406
- function Yn({ error: t, options: e }) {
2416
+ function Jn({ error: t, options: e }) {
2407
2417
  const { publicKey: r } = e;
2408
2418
  if (!r)
2409
2419
  throw Error("options was missing required publicKey property");
@@ -2461,7 +2471,7 @@ function Yn({ error: t, options: e }) {
2461
2471
  });
2462
2472
  if (t.name === "SecurityError") {
2463
2473
  const n = globalThis.location.hostname;
2464
- if (vt(n)) {
2474
+ if (Et(n)) {
2465
2475
  if (r.rp.id !== n)
2466
2476
  return new P({
2467
2477
  message: `The RP ID "${r.rp.id}" is invalid for this domain`,
@@ -2489,7 +2499,7 @@ function Yn({ error: t, options: e }) {
2489
2499
  }
2490
2500
  return t;
2491
2501
  }
2492
- class Wn {
2502
+ class Xn {
2493
2503
  constructor() {
2494
2504
  Object.defineProperty(this, "controller", {
2495
2505
  enumerable: !0,
@@ -2513,31 +2523,31 @@ class Wn {
2513
2523
  }
2514
2524
  }
2515
2525
  }
2516
- const Rt = new Wn(), zn = ["cross-platform", "platform"];
2517
- function Et(t) {
2518
- if (t && !(zn.indexOf(t) < 0))
2526
+ const At = new Xn(), Zn = ["cross-platform", "platform"];
2527
+ function kt(t) {
2528
+ if (t && !(Zn.indexOf(t) < 0))
2519
2529
  return t;
2520
2530
  }
2521
- async function qn(t) {
2531
+ async function Qn(t) {
2522
2532
  !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 });
2523
2533
  const { optionsJSON: e, useAutoRegister: r = !1 } = t;
2524
- if (!$e())
2534
+ if (!Ye())
2525
2535
  throw new Error("WebAuthn is not supported in this browser");
2526
2536
  const n = {
2527
2537
  ...e,
2528
- challenge: me(e.challenge),
2538
+ challenge: ve(e.challenge),
2529
2539
  user: {
2530
2540
  ...e.user,
2531
- id: me(e.user.id)
2541
+ id: ve(e.user.id)
2532
2542
  },
2533
- excludeCredentials: e.excludeCredentials?.map(wt)
2543
+ excludeCredentials: e.excludeCredentials?.map(Rt)
2534
2544
  }, o = {};
2535
- r && (o.mediation = "conditional"), o.publicKey = n, o.signal = Rt.createNewAbortSignal();
2545
+ r && (o.mediation = "conditional"), o.publicKey = n, o.signal = At.createNewAbortSignal();
2536
2546
  let s;
2537
2547
  try {
2538
2548
  s = await navigator.credentials.create(o);
2539
2549
  } catch (y) {
2540
- throw Yn({ error: y, options: o });
2550
+ throw Jn({ error: y, options: o });
2541
2551
  }
2542
2552
  if (!s)
2543
2553
  throw new Error("Registration was not completed");
@@ -2549,53 +2559,53 @@ async function qn(t) {
2549
2559
  try {
2550
2560
  h = c.getPublicKeyAlgorithm();
2551
2561
  } catch (y) {
2552
- ke("getPublicKeyAlgorithm()", y);
2562
+ _e("getPublicKeyAlgorithm()", y);
2553
2563
  }
2554
2564
  let l;
2555
2565
  if (typeof c.getPublicKey == "function")
2556
2566
  try {
2557
2567
  const y = c.getPublicKey();
2558
- y !== null && (l = W(y));
2568
+ y !== null && (l = q(y));
2559
2569
  } catch (y) {
2560
- ke("getPublicKey()", y);
2570
+ _e("getPublicKey()", y);
2561
2571
  }
2562
- let g;
2572
+ let m;
2563
2573
  if (typeof c.getAuthenticatorData == "function")
2564
2574
  try {
2565
- g = W(c.getAuthenticatorData());
2575
+ m = q(c.getAuthenticatorData());
2566
2576
  } catch (y) {
2567
- ke("getAuthenticatorData()", y);
2577
+ _e("getAuthenticatorData()", y);
2568
2578
  }
2569
2579
  return {
2570
2580
  id: i,
2571
- rawId: W(a),
2581
+ rawId: q(a),
2572
2582
  response: {
2573
- attestationObject: W(c.attestationObject),
2574
- clientDataJSON: W(c.clientDataJSON),
2583
+ attestationObject: q(c.attestationObject),
2584
+ clientDataJSON: q(c.clientDataJSON),
2575
2585
  transports: u,
2576
2586
  publicKeyAlgorithm: h,
2577
2587
  publicKey: l,
2578
- authenticatorData: g
2588
+ authenticatorData: m
2579
2589
  },
2580
2590
  type: f,
2581
2591
  clientExtensionResults: s.getClientExtensionResults(),
2582
- authenticatorAttachment: Et(s.authenticatorAttachment)
2592
+ authenticatorAttachment: kt(s.authenticatorAttachment)
2583
2593
  };
2584
2594
  }
2585
- function ke(t, e) {
2595
+ function _e(t, e) {
2586
2596
  console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${t}. You should report this error to them.
2587
2597
  `, e);
2588
2598
  }
2589
- function Gn() {
2590
- if (!$e())
2591
- return Ce.stubThis(new Promise((e) => e(!1)));
2599
+ function eo() {
2600
+ if (!Ye())
2601
+ return Ne.stubThis(new Promise((e) => e(!1)));
2592
2602
  const t = globalThis.PublicKeyCredential;
2593
- return t?.isConditionalMediationAvailable === void 0 ? Ce.stubThis(new Promise((e) => e(!1))) : Ce.stubThis(t.isConditionalMediationAvailable());
2603
+ return t?.isConditionalMediationAvailable === void 0 ? Ne.stubThis(new Promise((e) => e(!1))) : Ne.stubThis(t.isConditionalMediationAvailable());
2594
2604
  }
2595
- const Ce = {
2605
+ const Ne = {
2596
2606
  stubThis: (t) => t
2597
2607
  };
2598
- function Hn({ error: t, options: e }) {
2608
+ function to({ error: t, options: e }) {
2599
2609
  const { publicKey: r } = e;
2600
2610
  if (!r)
2601
2611
  throw Error("options was missing required publicKey property");
@@ -2615,7 +2625,7 @@ function Hn({ error: t, options: e }) {
2615
2625
  });
2616
2626
  if (t.name === "SecurityError") {
2617
2627
  const n = globalThis.location.hostname;
2618
- if (vt(n)) {
2628
+ if (Et(n)) {
2619
2629
  if (r.rpId !== n)
2620
2630
  return new P({
2621
2631
  message: `The RP ID "${r.rpId}" is invalid for this domain`,
@@ -2636,52 +2646,52 @@ function Hn({ error: t, options: e }) {
2636
2646
  }
2637
2647
  return t;
2638
2648
  }
2639
- async function Jn(t) {
2649
+ async function ro(t) {
2640
2650
  !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 });
2641
2651
  const { optionsJSON: e, useBrowserAutofill: r = !1, verifyBrowserAutofillInput: n = !0 } = t;
2642
- if (!$e())
2652
+ if (!Ye())
2643
2653
  throw new Error("WebAuthn is not supported in this browser");
2644
2654
  let o;
2645
- e.allowCredentials?.length !== 0 && (o = e.allowCredentials?.map(wt));
2655
+ e.allowCredentials?.length !== 0 && (o = e.allowCredentials?.map(Rt));
2646
2656
  const s = {
2647
2657
  ...e,
2648
- challenge: me(e.challenge),
2658
+ challenge: ve(e.challenge),
2649
2659
  allowCredentials: o
2650
2660
  }, i = {};
2651
2661
  if (r) {
2652
- if (!await Gn())
2662
+ if (!await eo())
2653
2663
  throw Error("Browser does not support WebAuthn autofill");
2654
2664
  if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1 && n)
2655
2665
  throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
2656
2666
  i.mediation = "conditional", s.allowCredentials = [];
2657
2667
  }
2658
- i.publicKey = s, i.signal = Rt.createNewAbortSignal();
2668
+ i.publicKey = s, i.signal = At.createNewAbortSignal();
2659
2669
  let a;
2660
2670
  try {
2661
2671
  a = await navigator.credentials.get(i);
2662
- } catch (g) {
2663
- throw Hn({ error: g, options: i });
2672
+ } catch (m) {
2673
+ throw to({ error: m, options: i });
2664
2674
  }
2665
2675
  if (!a)
2666
2676
  throw new Error("Authentication was not completed");
2667
2677
  const { id: c, rawId: f, response: u, type: h } = a;
2668
2678
  let l;
2669
- return u.userHandle && (l = W(u.userHandle)), {
2679
+ return u.userHandle && (l = q(u.userHandle)), {
2670
2680
  id: c,
2671
- rawId: W(f),
2681
+ rawId: q(f),
2672
2682
  response: {
2673
- authenticatorData: W(u.authenticatorData),
2674
- clientDataJSON: W(u.clientDataJSON),
2675
- signature: W(u.signature),
2683
+ authenticatorData: q(u.authenticatorData),
2684
+ clientDataJSON: q(u.clientDataJSON),
2685
+ signature: q(u.signature),
2676
2686
  userHandle: l
2677
2687
  },
2678
2688
  type: h,
2679
2689
  clientExtensionResults: a.getClientExtensionResults(),
2680
- authenticatorAttachment: Et(a.authenticatorAttachment)
2690
+ authenticatorAttachment: kt(a.authenticatorAttachment)
2681
2691
  };
2682
2692
  }
2683
- const Ve = lt(null);
2684
- function go({ children: t, config: e }) {
2693
+ const We = ht(null);
2694
+ function Eo({ children: t, config: e }) {
2685
2695
  const [r, n] = G({
2686
2696
  isAuthenticated: !1,
2687
2697
  isLoading: !0,
@@ -2690,9 +2700,9 @@ function go({ children: t, config: e }) {
2690
2700
  });
2691
2701
  L(() => {
2692
2702
  (() => {
2693
- const u = xn();
2703
+ const u = Kn();
2694
2704
  if (u) {
2695
- ut(), n({
2705
+ ft(), n({
2696
2706
  isAuthenticated: !1,
2697
2707
  isLoading: !1,
2698
2708
  user: null,
@@ -2700,27 +2710,27 @@ function go({ children: t, config: e }) {
2700
2710
  });
2701
2711
  return;
2702
2712
  }
2703
- const h = Un();
2713
+ const h = Vn();
2704
2714
  if (h) {
2705
- const g = {
2715
+ const m = {
2706
2716
  token: h.token,
2707
2717
  provider: h.provider,
2708
2718
  authenticatedAt: Date.now()
2709
2719
  };
2710
- ye(g), ut(), n({
2720
+ Ae(m), ft(), n({
2711
2721
  isAuthenticated: !0,
2712
2722
  isLoading: !1,
2713
- user: ae(g),
2723
+ user: de(m),
2714
2724
  error: null
2715
2725
  });
2716
2726
  return;
2717
2727
  }
2718
- const l = yt();
2728
+ const l = wt();
2719
2729
  if (l) {
2720
2730
  n({
2721
2731
  isAuthenticated: !0,
2722
2732
  isLoading: !1,
2723
- user: ae(l),
2733
+ user: de(l),
2724
2734
  error: null
2725
2735
  });
2726
2736
  return;
@@ -2733,7 +2743,7 @@ function go({ children: t, config: e }) {
2733
2743
  });
2734
2744
  })();
2735
2745
  }, []);
2736
- const o = x(
2746
+ const o = D(
2737
2747
  async (f) => {
2738
2748
  if (!e.spaceId) {
2739
2749
  n((l) => ({
@@ -2742,20 +2752,20 @@ function go({ children: t, config: e }) {
2742
2752
  }));
2743
2753
  return;
2744
2754
  }
2745
- const u = e.authUrl ?? Oe();
2755
+ const u = e.authUrl ?? Pe();
2746
2756
  if (f === "guest") {
2747
2757
  n((l) => ({ ...l, isLoading: !0 }));
2748
2758
  try {
2749
- const l = await bt(e.spaceId, u);
2759
+ const l = await vt(e.spaceId, u);
2750
2760
  n({
2751
2761
  isAuthenticated: !0,
2752
2762
  isLoading: !1,
2753
- user: ae(l),
2763
+ user: de(l),
2754
2764
  error: null
2755
2765
  });
2756
2766
  } catch (l) {
2757
- n((g) => ({
2758
- ...g,
2767
+ n((m) => ({
2768
+ ...m,
2759
2769
  isLoading: !1,
2760
2770
  error: l instanceof Error ? l.message : "Guest login failed"
2761
2771
  }));
@@ -2765,43 +2775,43 @@ function go({ children: t, config: e }) {
2765
2775
  if (f === "passkey") {
2766
2776
  n((l) => ({ ...l, isLoading: !0, error: null }));
2767
2777
  try {
2768
- const l = await $n(u), g = await Jn({ optionsJSON: l }), y = await Vn(u, g);
2778
+ const l = await qn(u), m = await ro({ optionsJSON: l }), y = await Gn(u, m);
2769
2779
  n({
2770
2780
  isAuthenticated: !0,
2771
2781
  isLoading: !1,
2772
- user: ae(y),
2782
+ user: de(y),
2773
2783
  error: null
2774
2784
  });
2775
2785
  } catch (l) {
2776
- n((g) => ({
2777
- ...g,
2786
+ n((m) => ({
2787
+ ...m,
2778
2788
  isLoading: !1,
2779
2789
  error: l instanceof Error ? l.message : "Passkey login failed"
2780
2790
  }));
2781
2791
  }
2782
2792
  return;
2783
2793
  }
2784
- const h = Dn(f, e.spaceId, u);
2794
+ const h = Yn(f, e.spaceId, u);
2785
2795
  window.location.href = h;
2786
2796
  },
2787
2797
  [e.authUrl, e.spaceId]
2788
- ), s = x(() => {
2789
- St(), n({
2798
+ ), s = D(() => {
2799
+ we(), n({
2790
2800
  isAuthenticated: !1,
2791
2801
  isLoading: !1,
2792
2802
  user: null,
2793
2803
  error: null
2794
2804
  });
2795
- }, []), i = x(
2805
+ }, []), i = D(
2796
2806
  async (f) => {
2797
- const u = e.authUrl ?? Oe();
2807
+ const u = e.authUrl ?? Pe();
2798
2808
  n((h) => ({ ...h, isLoading: !0, error: null }));
2799
2809
  try {
2800
- const h = await Fn(u), l = await qn({ optionsJSON: h }), g = await Bn(u, l, f);
2810
+ const h = await Wn(u), l = await Qn({ optionsJSON: h }), m = await zn(u, l, f);
2801
2811
  n({
2802
2812
  isAuthenticated: !0,
2803
2813
  isLoading: !1,
2804
- user: ae(g),
2814
+ user: de(m),
2805
2815
  error: null
2806
2816
  });
2807
2817
  } catch (h) {
@@ -2813,7 +2823,7 @@ function go({ children: t, config: e }) {
2813
2823
  }
2814
2824
  },
2815
2825
  [e.authUrl]
2816
- ), a = x(() => r.user?.token ?? null, [r.user]), c = $(
2826
+ ), a = D(() => r.user?.token ?? null, [r.user]), c = K(
2817
2827
  () => ({
2818
2828
  state: r,
2819
2829
  login: o,
@@ -2823,19 +2833,19 @@ function go({ children: t, config: e }) {
2823
2833
  }),
2824
2834
  [r, o, s, a, i]
2825
2835
  );
2826
- return /* @__PURE__ */ A.jsx(Ve, { value: c, children: t });
2836
+ return /* @__PURE__ */ A.jsx(We, { value: c, children: t });
2827
2837
  }
2828
- function Xn() {
2829
- const t = xe(Ve);
2838
+ function no() {
2839
+ const t = Be(We);
2830
2840
  if (!t)
2831
2841
  throw new Error("useAuth must be used within an AuthProvider");
2832
2842
  return t;
2833
2843
  }
2834
- function yo() {
2835
- return xe(Ve);
2844
+ function oo() {
2845
+ return Be(We);
2836
2846
  }
2837
- function So(t) {
2838
- const { config: e, guestUrlParam: r } = t, { state: n, login: o } = Xn(), s = T(!1);
2847
+ function Ao(t) {
2848
+ const { config: e, guestUrlParam: r } = t, { state: n, login: o } = no(), s = v(!1);
2839
2849
  return L(() => {
2840
2850
  if (!r || n.isAuthenticated || n.isLoading || s.current || !e.methods.includes("guest"))
2841
2851
  return;
@@ -2852,7 +2862,7 @@ function So(t) {
2852
2862
  error: n.error
2853
2863
  };
2854
2864
  }
2855
- function bo({
2865
+ function ko({
2856
2866
  connectionState: t,
2857
2867
  error: e,
2858
2868
  isReady: r,
@@ -2891,166 +2901,168 @@ function bo({
2891
2901
  return null;
2892
2902
  }
2893
2903
  }
2894
- const Ie = pe("useIkonApp");
2895
- function Zn() {
2904
+ const ye = Re("useIkonApp");
2905
+ function so() {
2896
2906
  if (typeof window < "u" && window.__IKON_AUTH_CONFIG__)
2897
2907
  return window.__IKON_AUTH_CONFIG__;
2898
2908
  }
2899
- function Qn() {
2909
+ function io() {
2900
2910
  if (typeof window < "u" && window.__IKON_LOCAL_IKON_SERVER_CONFIG__)
2901
2911
  return window.__IKON_LOCAL_IKON_SERVER_CONFIG__;
2902
2912
  }
2903
- function wo(t) {
2904
- const { authConfig: e, modules: r, timeouts: n, backgroundAudio: o, webRtc: s, audio: i, video: a } = t, c = e === void 0 ? Zn() ?? null : e, f = Qn(), u = T(null), h = T(null), l = T(null), g = T(!1), y = T(o), S = T(n), m = T(s), p = T(i), v = T(a);
2905
- y.current = o, S.current = n, m.current = s, p.current = i, v.current = a;
2906
- const [k, _] = G("idle"), [D, z] = G(null), [H, C] = G(null), [I, F] = G(null), [N, U] = G(!1), O = $(() => {
2913
+ function To(t) {
2914
+ const { authConfig: e, modules: r, timeouts: n, backgroundAudio: o, webRtc: s, audio: i, video: a, websocket: c, webtransport: f } = t, u = e === void 0 ? so() ?? null : e, h = io(), l = oo(), m = v(null), y = v(null), b = v(null), p = v(!1), g = v(!1), w = v(o), k = v(n), O = v(s), M = v(i), z = v(a), Q = v(c), T = v(f);
2915
+ w.current = o, k.current = n, O.current = s, M.current = i, z.current = a, Q.current = c, T.current = f;
2916
+ const [_, F] = G("idle"), [j, U] = G(null), [Y, re] = G(null), [J, he] = G(null), [ne, oe] = G(!1), [me, d] = G(0), S = K(() => {
2907
2917
  try {
2908
- const b = Nt();
2909
- return (b.sessionId || b.channelKey) && Pt(), b;
2918
+ const I = Mt();
2919
+ return (I.sessionId || I.channelKey) && jt(), I;
2910
2920
  } catch {
2911
2921
  return { parameters: {} };
2912
2922
  }
2913
- }, []), K = $(() => c?.enabled ? yt() : null, [c?.enabled]), J = f?.enabled ?? !1, X = f?.host ?? "localhost", Z = f?.port ?? 8443;
2923
+ }, []), R = K(() => u?.enabled ? wt() : null, [u?.enabled, me]), C = h?.enabled ?? !1, V = h?.host ?? "localhost", B = h?.port ?? 8443;
2914
2924
  L(() => {
2915
- !J && Ke() && c && !c.enabled && c.spaceId && !I && !N && (U(!0), bt(c.spaceId, c.authUrl ?? Oe()).then((R) => {
2916
- F(R.token);
2917
- }).catch((R) => {
2918
- Ie.error("Anonymous auth failed:", R), z(R instanceof Error ? R.message : "Anonymous auth failed");
2925
+ !C && ze() && u && !u.enabled && u.spaceId && !J && !ne && (oe(!0), vt(u.spaceId, u.authUrl ?? Pe()).then((x) => {
2926
+ he(x.token);
2927
+ }).catch((x) => {
2928
+ ye.error("Anonymous auth failed:", x), U(x instanceof Error ? x.message : "Anonymous auth failed");
2919
2929
  }).finally(() => {
2920
- U(!1);
2930
+ oe(!1);
2921
2931
  }));
2922
- }, [J, c, I, N]);
2923
- const Q = $(() => {
2924
- if (J) {
2925
- const b = K?.token ? jt(K.token) ?? void 0 : void 0;
2932
+ }, [C, u, J, ne]);
2933
+ const ee = K(() => {
2934
+ if (C) {
2935
+ const I = R?.token ? Lt(R.token) ?? void 0 : void 0;
2926
2936
  return {
2927
2937
  local: {
2928
- host: X,
2929
- httpsPort: Z,
2930
- userId: b,
2931
- token: K?.token ?? void 0,
2932
- spaceId: c?.spaceId,
2933
- parameters: O.parameters
2938
+ host: V,
2939
+ httpsPort: B,
2940
+ userId: I,
2941
+ token: R?.token ?? void 0,
2942
+ spaceId: u?.spaceId,
2943
+ parameters: S.parameters
2934
2944
  }
2935
2945
  };
2936
2946
  }
2937
- return K?.token && c?.spaceId ? {
2947
+ return R?.token && u?.spaceId ? {
2938
2948
  sessionToken: {
2939
- token: K.token,
2940
- spaceId: c.spaceId,
2941
- backendType: Ye(),
2942
- sessionId: O.sessionId,
2943
- channelKey: O.channelKey,
2944
- parameters: O.parameters
2949
+ token: R.token,
2950
+ spaceId: u.spaceId,
2951
+ backendType: qe(),
2952
+ sessionId: S.sessionId,
2953
+ channelKey: S.channelKey,
2954
+ parameters: S.parameters
2945
2955
  }
2946
- } : I && c?.spaceId ? {
2956
+ } : J && u?.spaceId ? {
2947
2957
  sessionToken: {
2948
- token: I,
2949
- spaceId: c.spaceId,
2950
- backendType: Ye(),
2951
- sessionId: O.sessionId,
2952
- channelKey: O.channelKey,
2953
- parameters: O.parameters
2958
+ token: J,
2959
+ spaceId: u.spaceId,
2960
+ backendType: qe(),
2961
+ sessionId: S.sessionId,
2962
+ channelKey: S.channelKey,
2963
+ parameters: S.parameters
2954
2964
  }
2955
- } : Ke() ? null : {
2965
+ } : ze() ? null : {
2956
2966
  local: {
2957
- host: X,
2958
- httpsPort: Z,
2959
- spaceId: c?.spaceId,
2960
- parameters: O.parameters
2967
+ host: V,
2968
+ httpsPort: B,
2969
+ spaceId: u?.spaceId,
2970
+ parameters: S.parameters
2961
2971
  }
2962
2972
  };
2963
- }, [J, X, Z, K?.token, c?.spaceId, I, O.sessionId, O.channelKey, O.parameters]);
2964
- Wr(H);
2965
- const ue = qr(H);
2973
+ }, [C, V, B, R?.token, u?.spaceId, J, S.sessionId, S.channelKey, S.parameters]);
2974
+ Hr(Y);
2975
+ const se = Xr(Y);
2966
2976
  L(() => {
2967
- if (!g.current) {
2968
- if (g.current = !0, l.current = xr(), r)
2969
- for (const b of r)
2970
- b(l.current);
2971
- l.current.loadRegisteredModules().catch((b) => {
2972
- Ie.error("Failed to load UI modules", b);
2977
+ if (!p.current) {
2978
+ if (p.current = !0, b.current = $r(), r)
2979
+ for (const I of r)
2980
+ I(b.current);
2981
+ b.current.loadRegisteredModules().catch((I) => {
2982
+ ye.error("Failed to load UI modules", I);
2973
2983
  });
2974
2984
  }
2975
2985
  }, []), L(() => {
2976
- if (!Q) return;
2977
- const b = new Mt({
2978
- ...Q,
2979
- timeouts: S.current,
2980
- audio: p.current !== void 0 || y.current ? {
2981
- enabled: p.current,
2982
- ...y.current ? { background: { allowOnDesktop: !0, allowOnMobile: !0 } } : {}
2986
+ if (!ee) return;
2987
+ const I = new Ut({
2988
+ ...ee,
2989
+ timeouts: k.current,
2990
+ audio: M.current !== void 0 || w.current ? {
2991
+ enabled: M.current,
2992
+ ...w.current ? { background: { allowOnDesktop: !0, allowOnMobile: !0 } } : {}
2983
2993
  } : void 0,
2984
- video: v.current !== void 0 ? { enabled: v.current } : void 0,
2994
+ video: z.current !== void 0 ? { enabled: z.current } : void 0,
2985
2995
  mediaSession: { title: document.title || void 0, artist: document.title || void 0 },
2986
- webRtc: m.current ? { enabled: !0 } : void 0,
2987
- onConnectionStateChange: (j) => {
2988
- _(j);
2996
+ webRtc: O.current ? { enabled: !0 } : void 0,
2997
+ websocket: Q.current,
2998
+ webtransport: T.current,
2999
+ onConnectionStateChange: (Z) => {
3000
+ F(Z);
2989
3001
  },
2990
- onError: (j) => {
2991
- z(j.message);
3002
+ onError: (Z) => {
3003
+ U(Z.message);
2992
3004
  }
2993
3005
  });
2994
- u.current = b;
2995
- const R = new Zt({ client: b });
2996
- return h.current = R, C(R), b.connect().catch((j) => {
2997
- Ie.error("Connection failed:", j);
3006
+ m.current = I;
3007
+ const x = new rr({ client: I });
3008
+ return y.current = x, re(x), I.connect().catch((Z) => {
3009
+ ye.error("Connection failed:", Z), Z instanceof xt && !g.current && (g.current = !0, ye.warn("Auth session appears stale, clearing and retrying"), l ? l.logout() : (we(), d((Ct) => Ct + 1)));
2998
3010
  }), () => {
2999
- b.disconnect(), u.current = null, R.dispose(), h.current = null;
3011
+ I.disconnect(), m.current = null, x.dispose(), y.current = null;
3000
3012
  };
3001
- }, [Q]);
3002
- const d = x((b, R) => {
3003
- const j = typeof R == "string" ? R : JSON.stringify(R ?? {});
3004
- u.current?.sendActionCall(b, j);
3005
- }, []), w = k === "connected" || k === "reconnecting";
3013
+ }, [ee]);
3014
+ const N = D((I, x) => {
3015
+ const Z = typeof x == "string" ? x : JSON.stringify(x ?? {});
3016
+ m.current?.sendActionCall(I, Z);
3017
+ }, []), X = _ === "connected" || _ === "reconnecting";
3006
3018
  return {
3007
- connectionState: k,
3008
- error: D,
3009
- stores: ue,
3010
- client: u.current,
3011
- registry: l.current,
3012
- clientRef: u,
3013
- uiRef: h,
3014
- registryRef: l,
3015
- onAction: d,
3016
- isReady: w,
3017
- webRtcVideoStreams: u.current?.webRtcVideoStreams ?? /* @__PURE__ */ new Map(),
3018
- webRtcTrackMap: u.current?.webRtcTrackMap ?? /* @__PURE__ */ new Map()
3019
+ connectionState: _,
3020
+ error: j,
3021
+ stores: se,
3022
+ client: m.current,
3023
+ registry: b.current,
3024
+ clientRef: m,
3025
+ uiRef: y,
3026
+ registryRef: b,
3027
+ onAction: N,
3028
+ isReady: X,
3029
+ webRtcVideoStreams: m.current?.webRtcVideoStreams ?? /* @__PURE__ */ new Map(),
3030
+ webRtcTrackMap: m.current?.webRtcTrackMap ?? /* @__PURE__ */ new Map()
3019
3031
  };
3020
3032
  }
3021
- function vo(t) {
3022
- const e = T(!1);
3023
- return x(() => {
3033
+ function Co(t) {
3034
+ const e = v(!1);
3035
+ return D(() => {
3024
3036
  if (e.current) return;
3025
3037
  e.current = !0;
3026
3038
  const r = document.createElement("link");
3027
3039
  r.rel = "stylesheet", r.href = t, document.head.appendChild(r);
3028
3040
  }, [t]);
3029
3041
  }
3030
- let eo = 0;
3031
- function Ro(t = 5, e = 5e3) {
3032
- const [r, n] = G([]), o = T(/* @__PURE__ */ new Map()), s = x((i) => {
3042
+ let ao = 0;
3043
+ function Io(t = 5, e = 5e3) {
3044
+ const [r, n] = G([]), o = v(/* @__PURE__ */ new Map()), s = D((i) => {
3033
3045
  const a = o.current.get(i);
3034
3046
  a && (clearTimeout(a), o.current.delete(i)), n((c) => c.filter((f) => f.id !== i));
3035
3047
  }, []);
3036
3048
  return L(() => {
3037
- const i = o.current, a = Lt(
3049
+ const i = o.current, a = Dt(
3038
3050
  (c) => {
3039
- if (!Ut())
3051
+ if (!Ft())
3040
3052
  return;
3041
- const f = `toast-${++eo}`, u = c.level === We.ERROR ? "error" : "warn", h = {
3053
+ const f = `toast-${++ao}`, u = c.level === Ge.ERROR ? "error" : "warn", h = {
3042
3054
  id: f,
3043
3055
  level: u,
3044
3056
  message: c.message,
3045
3057
  component: c.component
3046
3058
  };
3047
- n((g) => [...g, h].slice(-t));
3059
+ n((m) => [...m, h].slice(-t));
3048
3060
  const l = setTimeout(() => {
3049
3061
  s(f);
3050
3062
  }, e);
3051
3063
  i.set(f, l);
3052
3064
  },
3053
- { minLevel: We.WARN }
3065
+ { minLevel: Ge.WARN }
3054
3066
  );
3055
3067
  return () => {
3056
3068
  a();
@@ -3060,100 +3072,100 @@ function Ro(t = 5, e = 5e3) {
3060
3072
  };
3061
3073
  }, [t, e, s]), { toasts: r, dismissToast: s };
3062
3074
  }
3063
- const At = lt(null);
3064
- function to(t, e) {
3075
+ const Tt = ht(null);
3076
+ function co(t, e) {
3065
3077
  return e ? t.replace(/\{(\w+)\}/g, (r, n) => e[n] ?? `{${n}}`) : t;
3066
3078
  }
3067
- function ro(t, e) {
3068
- const n = new URLSearchParams(window.location.search).get("lang");
3069
- if (n && t.includes(n))
3070
- return n;
3071
- const o = navigator.language.split("-")[0];
3072
- return t.includes(o) ? o : e && t.includes(e) ? e : "en";
3079
+ function uo(t, e) {
3080
+ const r = Bt();
3081
+ if (r && t.includes(r))
3082
+ return r;
3083
+ const n = navigator.language.split("-")[0];
3084
+ return t.includes(n) ? n : e && t.includes(e) ? e : "en";
3073
3085
  }
3074
- function no(t, e, r) {
3075
- return e ? ro(t, r) : r && t.includes(r) ? r : "en";
3086
+ function lo(t, e, r) {
3087
+ return e ? uo(t, r) : r && t.includes(r) ? r : "en";
3076
3088
  }
3077
- function Eo({
3089
+ function Oo({
3078
3090
  children: t,
3079
3091
  translations: e,
3080
3092
  defaultLanguage: r,
3081
3093
  detectLanguage: n = !1
3082
3094
  }) {
3083
- const o = Object.keys(e), s = no(o, n, r), i = e[s] ?? e.en, a = $(
3095
+ const o = Object.keys(e), s = lo(o, n, r), i = e[s] ?? e.en, a = K(
3084
3096
  () => ({
3085
3097
  t: (c, f) => {
3086
3098
  const u = i[c];
3087
- return to(u, f);
3099
+ return co(u, f);
3088
3100
  },
3089
3101
  locale: s,
3090
3102
  translations: i
3091
3103
  }),
3092
3104
  [i, s]
3093
3105
  );
3094
- return /* @__PURE__ */ A.jsx(At, { value: a, children: t });
3106
+ return /* @__PURE__ */ A.jsx(Tt, { value: a, children: t });
3095
3107
  }
3096
- function Ao() {
3097
- const t = xe(At);
3108
+ function _o() {
3109
+ const t = Be(Tt);
3098
3110
  if (!t)
3099
3111
  throw new Error("useI18n must be used within an I18nProvider");
3100
3112
  return t;
3101
3113
  }
3102
3114
  export {
3103
- go as AuthProvider,
3104
- bo as ConnectionStateRenderer,
3105
- Eo as I18nProvider,
3106
- ir as IKON_UI_BASE_MODULE,
3107
- Sr as IKON_UI_MEDIA_MODULE,
3108
- jr as IKON_UI_SHADERTOY_MODULE,
3109
- Nr as IKON_UI_SHADERTOY_TYPE,
3110
- Ne as IKON_UI_STREAM_CATEGORY,
3111
- hr as IKON_UI_VIDEO_CANVAS_TYPE,
3112
- mr as IKON_UI_VIDEO_URL_PLAYER_TYPE,
3113
- Zt as IkonUi,
3114
- Ur as IkonUiRegistry,
3115
- uo as IkonUiSurface,
3116
- Jt as UiComponentRegistry,
3117
- Ht as UiRenderer,
3118
- Co as UiStreamStore,
3119
- lo as areIkonUiModuleListsEqual,
3120
- bt as authenticateAnonymous,
3121
- Dn as buildOAuthRedirectUrl,
3122
- St as clearAuthSession,
3123
- ut as clearOAuthParams,
3124
- sr as createBaseResolvers,
3125
- ao as createComponentLibrary,
3126
- xr as createIkonUiRegistry,
3127
- gr as createMediaResolvers,
3128
- Pr as createShadertoyRendererResolver,
3129
- Xt as isIkonUiCategoryMatch,
3130
- yt as loadAuthSession,
3131
- ar as loadBaseModule,
3132
- br as loadMediaModule,
3133
- Mr as loadShadertoyModule,
3134
- dn as normalizeIkonUiModuleList,
3135
- ho as parseIkonUiInitPayload,
3136
- Un as parseOAuthCallback,
3137
- xn as parseOAuthError,
3138
- fn as readIkonUiModules,
3139
- fo as readIkonUiModulesFromSources,
3140
- cr as registerBaseModule,
3141
- wr as registerMediaModule,
3142
- Lr as registerShadertoyModule,
3143
- qt as renderChildren,
3144
- mo as renderMotionLetters,
3145
- ye as saveAuthSession,
3146
- po as sendMagicLink,
3147
- ae as sessionToUser,
3148
- Xn as useAuth,
3149
- So as useAuthGuard,
3150
- yo as useAuthOptional,
3151
- Ao as useI18n,
3152
- wo as useIkonApp,
3153
- Wr as useIkonStyles,
3154
- qr as useIkonUiStores,
3155
- vo as useLazyFont,
3156
- Ro as useToasts,
3157
- q as useUiNode,
3158
- co as useUiStore
3115
+ Eo as AuthProvider,
3116
+ ko as ConnectionStateRenderer,
3117
+ Oo as I18nProvider,
3118
+ lr as IKON_UI_BASE_MODULE,
3119
+ Rr as IKON_UI_MEDIA_MODULE,
3120
+ xr as IKON_UI_SHADERTOY_MODULE,
3121
+ Lr as IKON_UI_SHADERTOY_TYPE,
3122
+ je as IKON_UI_STREAM_CATEGORY,
3123
+ yr as IKON_UI_VIDEO_CANVAS_TYPE,
3124
+ Sr as IKON_UI_VIDEO_URL_PLAYER_TYPE,
3125
+ rr as IkonUi,
3126
+ Br as IkonUiRegistry,
3127
+ yo as IkonUiSurface,
3128
+ er as UiComponentRegistry,
3129
+ Qt as UiRenderer,
3130
+ Mo as UiStreamStore,
3131
+ So as areIkonUiModuleListsEqual,
3132
+ vt as authenticateAnonymous,
3133
+ Yn as buildOAuthRedirectUrl,
3134
+ we as clearAuthSession,
3135
+ ft as clearOAuthParams,
3136
+ ur as createBaseResolvers,
3137
+ po as createComponentLibrary,
3138
+ $r as createIkonUiRegistry,
3139
+ wr as createMediaResolvers,
3140
+ Ur as createShadertoyRendererResolver,
3141
+ tr as isIkonUiCategoryMatch,
3142
+ wt as loadAuthSession,
3143
+ dr as loadBaseModule,
3144
+ Er as loadMediaModule,
3145
+ Dr as loadShadertoyModule,
3146
+ pn as normalizeIkonUiModuleList,
3147
+ wo as parseIkonUiInitPayload,
3148
+ Vn as parseOAuthCallback,
3149
+ Kn as parseOAuthError,
3150
+ gn as readIkonUiModules,
3151
+ bo as readIkonUiModulesFromSources,
3152
+ fr as registerBaseModule,
3153
+ Ar as registerMediaModule,
3154
+ Fr as registerShadertoyModule,
3155
+ Xt as renderChildren,
3156
+ vo as renderMotionLetters,
3157
+ Ae as saveAuthSession,
3158
+ Ro as sendMagicLink,
3159
+ de as sessionToUser,
3160
+ no as useAuth,
3161
+ Ao as useAuthGuard,
3162
+ oo as useAuthOptional,
3163
+ _o as useI18n,
3164
+ To as useIkonApp,
3165
+ Hr as useIkonStyles,
3166
+ Xr as useIkonUiStores,
3167
+ Co as useLazyFont,
3168
+ Io as useToasts,
3169
+ H as useUiNode,
3170
+ go as useUiStore
3159
3171
  };