@ikonai/sdk-react-ui 1.0.6 → 1.0.8

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 Tt } from "@ikonai/sdk-ui";
2
- import { UiStreamStore as ho } from "@ikonai/sdk-ui";
3
- import Ct, { useSyncExternalStore as De, useMemo as z, memo as q, useRef as w, useCallback as B, Fragment as It, useEffect as F, useState as ee, createContext as lt, use as Fe } from "react";
4
- import { createLogger as be, getOrCreateDeviceId as pe, deriveAuthUrl as _e, parseUrlParams as Ot, isCloudEnvironment as Ye, extractUserIdFromToken as Nt, deriveBackendType as We, IkonClient as _t } from "@ikonai/sdk";
5
- var me = { exports: {} }, ie = {};
1
+ import { IkonUiCore as kt, UiStreamStore as Ct } from "@ikonai/sdk-ui";
2
+ import { UiStreamStore as wo } from "@ikonai/sdk-ui";
3
+ import It, { useSyncExternalStore as De, useMemo as Y, memo as q, useRef as v, useCallback as $, Fragment as Ot, useEffect as x, useState as X, createContext as dt, use as Fe } from "react";
4
+ import { createLogger as we, getOrCreateDeviceId as ge, deriveAuthUrl as Ne, parseUrlParams as _t, isCloudEnvironment as ze, extractUserIdFromToken as Nt, deriveBackendType as We, IkonClient as Pt, subscribeToLogEvents as Mt, isDebugModeEnabled as jt, LogLevel as qe } 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 me = { exports: {} }, ie = {};
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 qe;
16
- function Pt() {
17
- if (qe) return ie;
18
- qe = 1;
15
+ var Ge;
16
+ function Lt() {
17
+ if (Ge) return ie;
18
+ Ge = 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;
@@ -44,26 +44,26 @@ var ae = {};
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 Je;
48
- function jt() {
49
- return Je || (Je = 1, process.env.NODE_ENV !== "production" && function() {
47
+ var He;
48
+ function Ut() {
49
+ return He || (He = 1, process.env.NODE_ENV !== "production" && function() {
50
50
  function t(u) {
51
51
  if (u == null) return null;
52
52
  if (typeof u == "function")
53
- return u.$$typeof === M ? null : u.displayName || u.name || null;
53
+ return u.$$typeof === L ? null : u.displayName || u.name || null;
54
54
  if (typeof u == "string") return u;
55
55
  switch (u) {
56
56
  case b:
57
57
  return "Fragment";
58
58
  case p:
59
59
  return "Profiler";
60
- case m:
60
+ case g:
61
61
  return "StrictMode";
62
- case V:
62
+ case j:
63
63
  return "Suspense";
64
- case J:
64
+ case G:
65
65
  return "SuspenseList";
66
- case C:
66
+ case O:
67
67
  return "Activity";
68
68
  }
69
69
  if (typeof u == "object")
@@ -72,19 +72,19 @@ function jt() {
72
72
  ), u.$$typeof) {
73
73
  case S:
74
74
  return "Portal";
75
- case P:
75
+ case T:
76
76
  return (u.displayName || "Context") + ".Provider";
77
- case A:
77
+ case w:
78
78
  return (u._context.displayName || "Context") + ".Consumer";
79
- case j:
80
- var g = u.render;
81
- return u = u.displayName, u || (u = g.displayName || g.name || "", u = u !== "" ? "ForwardRef(" + u + ")" : "ForwardRef"), u;
82
- case Z:
83
- return g = u.displayName || null, g !== null ? g : t(u.type) || "Memo";
79
+ case I:
80
+ var y = u.render;
81
+ return u = u.displayName, u || (u = y.displayName || y.name || "", u = u !== "" ? "ForwardRef(" + u + ")" : "ForwardRef"), u;
82
+ case Q:
83
+ return y = u.displayName || null, y !== null ? y : t(u.type) || "Memo";
84
84
  case k:
85
- g = u._payload, u = u._init;
85
+ y = u._payload, u = u._init;
86
86
  try {
87
- return t(u(g));
87
+ return t(u(y));
88
88
  } catch {
89
89
  }
90
90
  }
@@ -96,17 +96,17 @@ function jt() {
96
96
  function r(u) {
97
97
  try {
98
98
  e(u);
99
- var g = !1;
99
+ var y = !1;
100
100
  } catch {
101
- g = !0;
101
+ y = !0;
102
102
  }
103
- if (g) {
104
- g = console;
105
- var R = g.error, T = typeof Symbol == "function" && Symbol.toStringTag && u[Symbol.toStringTag] || u.constructor.name || "Object";
103
+ if (y) {
104
+ y = console;
105
+ var R = y.error, C = typeof Symbol == "function" && Symbol.toStringTag && u[Symbol.toStringTag] || u.constructor.name || "Object";
106
106
  return R.call(
107
- g,
107
+ y,
108
108
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
109
- T
109
+ C
110
110
  ), e(u);
111
111
  }
112
112
  }
@@ -115,31 +115,31 @@ function jt() {
115
115
  if (typeof u == "object" && u !== null && u.$$typeof === k)
116
116
  return "<...>";
117
117
  try {
118
- var g = t(u);
119
- return g ? "<" + g + ">" : "<...>";
118
+ var y = t(u);
119
+ return y ? "<" + y + ">" : "<...>";
120
120
  } catch {
121
121
  return "<...>";
122
122
  }
123
123
  }
124
124
  function o() {
125
- var u = I.A;
125
+ var u = _.A;
126
126
  return u === null ? null : u.getOwner();
127
127
  }
128
128
  function s() {
129
129
  return Error("react-stack-top-frame");
130
130
  }
131
131
  function i(u) {
132
- if (L.call(u, "key")) {
133
- var g = Object.getOwnPropertyDescriptor(u, "key").get;
134
- if (g && g.isReactWarning) return !1;
132
+ if (D.call(u, "key")) {
133
+ var y = Object.getOwnPropertyDescriptor(u, "key").get;
134
+ if (y && y.isReactWarning) return !1;
135
135
  }
136
136
  return u.key !== void 0;
137
137
  }
138
- function a(u, g) {
138
+ function a(u, y) {
139
139
  function R() {
140
140
  ne || (ne = !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
- g
142
+ y
143
143
  ));
144
144
  }
145
145
  R.isReactWarning = !0, Object.defineProperty(u, "key", {
@@ -149,16 +149,16 @@ function jt() {
149
149
  }
150
150
  function c() {
151
151
  var u = t(this.type);
152
- return fe[u] || (fe[u] = !0, console.error(
152
+ return he[u] || (he[u] = !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
  )), u = this.props.ref, u !== void 0 ? u : null;
155
155
  }
156
- function f(u, g, R, T, K, x, Q, se) {
157
- return R = x.ref, u = {
158
- $$typeof: y,
156
+ function f(u, y, R, C, K, F, ee, se) {
157
+ return R = F.ref, u = {
158
+ $$typeof: h,
159
159
  type: u,
160
- key: g,
161
- props: x,
160
+ key: y,
161
+ props: F,
162
162
  _owner: K
163
163
  }, (R !== void 0 ? R : null) !== null ? Object.defineProperty(u, "ref", {
164
164
  enumerable: !1,
@@ -177,7 +177,7 @@ function jt() {
177
177
  configurable: !1,
178
178
  enumerable: !1,
179
179
  writable: !0,
180
- value: Q
180
+ value: ee
181
181
  }), Object.defineProperty(u, "_debugTask", {
182
182
  configurable: !1,
183
183
  enumerable: !1,
@@ -185,104 +185,104 @@ function jt() {
185
185
  value: se
186
186
  }), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
187
187
  }
188
- function l(u, g, R, T, K, x, Q, se) {
189
- var O = g.children;
190
- if (O !== void 0)
191
- if (T)
192
- if (Y(O)) {
193
- for (T = 0; T < O.length; T++)
194
- h(O[T]);
195
- Object.freeze && Object.freeze(O);
188
+ function d(u, y, R, C, K, F, ee, se) {
189
+ var N = y.children;
190
+ if (N !== void 0)
191
+ if (C)
192
+ if (z(N)) {
193
+ for (C = 0; C < N.length; C++)
194
+ m(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(O);
201
- if (L.call(g, "key")) {
202
- O = t(u);
203
- var H = Object.keys(g).filter(function(U) {
200
+ else m(N);
201
+ if (D.call(y, "key")) {
202
+ N = t(u);
203
+ var J = Object.keys(y).filter(function(U) {
204
204
  return U !== "key";
205
205
  });
206
- T = 0 < H.length ? "{key: someKey, " + H.join(": ..., ") + ": ...}" : "{key: someKey}", oe[O + T] || (H = 0 < H.length ? "{" + H.join(": ..., ") + ": ...}" : "{}", console.error(
206
+ C = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", oe[N + C] || (J = 0 < J.length ? "{" + J.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
- T,
214
- O,
215
- H,
216
- O
217
- ), oe[O + T] = !0);
213
+ C,
214
+ N,
215
+ J,
216
+ N
217
+ ), oe[N + C] = !0);
218
218
  }
219
- if (O = null, R !== void 0 && (r(R), O = "" + R), i(g) && (r(g.key), O = "" + g.key), "key" in g) {
219
+ if (N = null, R !== void 0 && (r(R), N = "" + R), i(y) && (r(y.key), N = "" + y.key), "key" in y) {
220
220
  R = {};
221
- for (var N in g)
222
- N !== "key" && (R[N] = g[N]);
223
- } else R = g;
224
- return O && a(
221
+ for (var P in y)
222
+ P !== "key" && (R[P] = y[P]);
223
+ } else R = y;
224
+ return N && a(
225
225
  R,
226
226
  typeof u == "function" ? u.displayName || u.name || "Unknown" : u
227
227
  ), f(
228
228
  u,
229
- O,
230
- x,
229
+ N,
230
+ F,
231
231
  K,
232
232
  o(),
233
233
  R,
234
- Q,
234
+ ee,
235
235
  se
236
236
  );
237
237
  }
238
- function h(u) {
239
- typeof u == "object" && u !== null && u.$$typeof === y && u._store && (u._store.validated = 1);
238
+ function m(u) {
239
+ typeof u == "object" && u !== null && u.$$typeof === h && u._store && (u._store.validated = 1);
240
240
  }
241
- var d = Ct, y = Symbol.for("react.transitional.element"), S = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), P = Symbol.for("react.context"), j = Symbol.for("react.forward_ref"), V = Symbol.for("react.suspense"), J = Symbol.for("react.suspense_list"), Z = Symbol.for("react.memo"), k = Symbol.for("react.lazy"), C = Symbol.for("react.activity"), M = Symbol.for("react.client.reference"), I = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, Y = Array.isArray, te = console.createTask ? console.createTask : function() {
241
+ var l = It, h = Symbol.for("react.transitional.element"), S = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), g = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), T = Symbol.for("react.context"), I = Symbol.for("react.forward_ref"), j = Symbol.for("react.suspense"), G = Symbol.for("react.suspense_list"), Q = Symbol.for("react.memo"), k = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), L = Symbol.for("react.client.reference"), _ = l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, D = Object.prototype.hasOwnProperty, z = Array.isArray, te = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
- d = {
244
+ l = {
245
245
  "react-stack-bottom-frame": function(u) {
246
246
  return u();
247
247
  }
248
248
  };
249
- var ne, fe = {}, G = d["react-stack-bottom-frame"].bind(
250
- d,
249
+ var ne, he = {}, H = l["react-stack-bottom-frame"].bind(
250
+ l,
251
251
  s
252
- )(), he = te(n(s)), oe = {};
253
- ae.Fragment = b, ae.jsx = function(u, g, R, T, K) {
254
- var x = 1e4 > I.recentlyCreatedOwnerStacks++;
255
- return l(
252
+ )(), me = te(n(s)), oe = {};
253
+ ae.Fragment = b, ae.jsx = function(u, y, R, C, K) {
254
+ var F = 1e4 > _.recentlyCreatedOwnerStacks++;
255
+ return d(
256
256
  u,
257
- g,
257
+ y,
258
258
  R,
259
259
  !1,
260
- T,
260
+ C,
261
261
  K,
262
- x ? Error("react-stack-top-frame") : G,
263
- x ? te(n(u)) : he
262
+ F ? Error("react-stack-top-frame") : H,
263
+ F ? te(n(u)) : me
264
264
  );
265
- }, ae.jsxs = function(u, g, R, T, K) {
266
- var x = 1e4 > I.recentlyCreatedOwnerStacks++;
267
- return l(
265
+ }, ae.jsxs = function(u, y, R, C, K) {
266
+ var F = 1e4 > _.recentlyCreatedOwnerStacks++;
267
+ return d(
268
268
  u,
269
- g,
269
+ y,
270
270
  R,
271
271
  !0,
272
- T,
272
+ C,
273
273
  K,
274
- x ? Error("react-stack-top-frame") : G,
275
- x ? te(n(u)) : he
274
+ F ? Error("react-stack-top-frame") : H,
275
+ F ? te(n(u)) : me
276
276
  );
277
277
  };
278
278
  }()), ae;
279
279
  }
280
- var Ge;
281
- function Mt() {
282
- return Ge || (Ge = 1, process.env.NODE_ENV === "production" ? me.exports = Pt() : me.exports = jt()), me.exports;
280
+ var Je;
281
+ function xt() {
282
+ return Je || (Je = 1, process.env.NODE_ENV === "production" ? pe.exports = Lt() : pe.exports = Ut()), pe.exports;
283
283
  }
284
- var E = Mt();
285
- function Ut(t, e) {
284
+ var A = xt();
285
+ function Dt(t, e) {
286
286
  const r = De(
287
287
  (n) => t.subscribe(n),
288
288
  () => {
@@ -294,7 +294,7 @@ function Ut(t, e) {
294
294
  return `${o ?? ""}:${s?.id ?? ""}`;
295
295
  }
296
296
  );
297
- return z(() => {
297
+ return Y(() => {
298
298
  const [n, o] = r.split(":");
299
299
  return {
300
300
  rootViewId: n || void 0,
@@ -302,16 +302,16 @@ function Ut(t, e) {
302
302
  };
303
303
  }, [r]);
304
304
  }
305
- function X(t, e) {
305
+ function Z(t, e) {
306
306
  const r = De(
307
307
  (n) => t.subscribeNode(e, n),
308
308
  () => t.getNodeVersion(e),
309
309
  () => t.getNodeVersion(e)
310
310
  );
311
- return z(() => t.getNode(e), [t, e, r]);
311
+ return Y(() => t.getNode(e), [t, e, r]);
312
312
  }
313
- const Lt = be("UIRenderer");
314
- function xt(t) {
313
+ const Ft = we("UIRenderer");
314
+ function Bt(t) {
315
315
  if (t === void 0)
316
316
  return "{}";
317
317
  if (typeof t == "string")
@@ -322,18 +322,18 @@ function xt(t) {
322
322
  return "{}";
323
323
  }
324
324
  }
325
- function Dt(t) {
325
+ function $t(t) {
326
326
  const e = t.styleIds;
327
327
  return Array.isArray(e) ? e : [];
328
328
  }
329
- function Ft(t) {
329
+ function Vt(t) {
330
330
  const e = t.children;
331
331
  return Array.isArray(e) ? e : [];
332
332
  }
333
- function $t(t, e) {
333
+ function Kt(t, e) {
334
334
  return t.nodeId === e.nodeId && t.context === e.context;
335
335
  }
336
- function Bt(t) {
336
+ function Yt(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;
@@ -342,65 +342,65 @@ function Bt(t) {
342
342
  return e;
343
343
  }
344
344
  const Pe = q(function t({ nodeId: e, context: r }) {
345
- const n = X(r.store, e), o = n ? Ft(n) : [], s = Bt(o), i = z(
346
- () => o.length === 0 ? null : o.map((h) => /* @__PURE__ */ E.jsx(t, { nodeId: h.id, context: r }, h.id)),
345
+ const n = Z(r.store, e), o = n ? Vt(n) : [], s = Yt(o), i = Y(
346
+ () => o.length === 0 ? null : o.map((m) => /* @__PURE__ */ A.jsx(t, { nodeId: m.id, context: r }, m.id)),
347
347
  // eslint-disable-next-line react-hooks/exhaustive-deps
348
348
  [s, r]
349
349
  );
350
350
  if (!n)
351
351
  return null;
352
352
  if (n.type === "root")
353
- return /* @__PURE__ */ E.jsx(It, { children: i }, n.id);
353
+ return /* @__PURE__ */ A.jsx(Ot, { children: i }, n.id);
354
354
  const a = r.library.resolve(n);
355
355
  if (!a)
356
- return Lt.warn(`No renderer for node type ${n.type}`), null;
357
- const c = Dt(n), f = c.length > 0 ? c.join(" ") : void 0, l = a;
358
- return /* @__PURE__ */ E.jsx(l, { nodeId: e, context: r, className: f });
359
- }, $t);
360
- function Vt(t, e) {
361
- return !Array.isArray(t) || t.length === 0 ? null : t.map((r) => /* @__PURE__ */ E.jsx(Pe, { nodeId: r.id, context: e }, r.id));
356
+ return Ft.warn(`No renderer for node type ${n.type}`), null;
357
+ const c = $t(n), f = c.length > 0 ? c.join(" ") : void 0, d = a;
358
+ return /* @__PURE__ */ A.jsx(d, { nodeId: e, context: r, className: f });
359
+ }, Kt);
360
+ function zt(t, e) {
361
+ return !Array.isArray(t) || t.length === 0 ? null : t.map((r) => /* @__PURE__ */ A.jsx(Pe, { nodeId: r.id, context: e }, r.id));
362
362
  }
363
- function Kt(t, e) {
363
+ function Wt(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 zt = q(function({ store: e, library: r, viewId: n, emptyFallback: o = null, onAction: s, client: i, video: a }) {
367
- const { rootViewId: c, rootNodeId: f } = Ut(e, n), l = w(s);
368
- l.current = s;
369
- const h = w(i);
370
- h.current = i;
371
- const d = w(a);
372
- d.current = a;
373
- const y = B((b, m) => {
366
+ const qt = q(function({ store: e, library: r, viewId: n, emptyFallback: o = null, onAction: s, client: i, video: a }) {
367
+ const { rootViewId: c, rootNodeId: f } = Dt(e, n), d = v(s);
368
+ d.current = s;
369
+ const m = v(i);
370
+ m.current = i;
371
+ const l = v(a);
372
+ l.current = a;
373
+ const h = $((b, g) => {
374
374
  if (!b)
375
375
  return;
376
- const p = xt(m);
377
- l.current?.(b, p);
378
- }, []), S = z(() => {
376
+ const p = Bt(g);
377
+ d.current?.(b, p);
378
+ }, []), S = Y(() => {
379
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) => Vt(m, b),
386
- renderView: (m) => {
387
- const p = e.getSnapshot().views.get(m);
388
- return p ? /* @__PURE__ */ E.jsx(Pe, { nodeId: p.id, context: b }) : null;
384
+ getPayload: (g) => e.getSnapshot().payloads.get(g),
385
+ renderChildren: (g) => zt(g, b),
386
+ renderView: (g) => {
387
+ const p = e.getSnapshot().views.get(g);
388
+ return p ? /* @__PURE__ */ A.jsx(Pe, { nodeId: p.id, context: b }) : null;
389
389
  },
390
- dispatchAction: y,
390
+ dispatchAction: h,
391
391
  // Access client/video via refs to avoid context recreation
392
392
  get client() {
393
- return h.current;
393
+ return m.current;
394
394
  },
395
395
  get video() {
396
- return d.current;
396
+ return l.current;
397
397
  }
398
398
  };
399
399
  return b;
400
- }, [e, r, y]);
401
- return !c || !f ? o : /* @__PURE__ */ E.jsx("div", { "data-ikon-view-id": c, style: { display: "contents" }, children: /* @__PURE__ */ E.jsx(Pe, { nodeId: f, context: S }) });
402
- }, Kt);
403
- class Yt {
400
+ }, [e, r, h]);
401
+ return !c || !f ? o : /* @__PURE__ */ A.jsx("div", { "data-ikon-view-id": c, style: { display: "contents" }, children: /* @__PURE__ */ A.jsx(Pe, { nodeId: f, context: S }) });
402
+ }, Wt);
403
+ class Gt {
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 Yt {
417
417
  return this.renderers.get(e.type) ?? this.fallback;
418
418
  }
419
419
  }
420
- function Jn(t, e) {
420
+ function eo(t, e) {
421
421
  const r = Object.entries(t);
422
- return new Yt(r, e);
422
+ return new Gt(r, e);
423
423
  }
424
- function Gn(t) {
424
+ function to(t) {
425
425
  return De(
426
426
  (e) => t.subscribe(e),
427
427
  () => t.getSnapshot(),
428
428
  () => t.getSnapshot()
429
429
  );
430
430
  }
431
- const je = "ikon-ui";
432
- function Wt(t, e) {
431
+ const Me = "ikon-ui";
432
+ function Ht(t, e) {
433
433
  return t === e;
434
434
  }
435
- const Hn = q(function({ stores: e, registry: r, category: n = je, onAction: o, client: s }) {
436
- const i = z(() => Array.from(e.keys()).sort().join(","), [e]), a = w(o);
435
+ const ro = q(function({ stores: e, registry: r, category: n = Me, onAction: o, client: s }) {
436
+ const i = Y(() => Array.from(e.keys()).sort().join(","), [e]), a = v(o);
437
437
  a.current = o;
438
- const c = w(s);
438
+ const c = v(s);
439
439
  c.current = s;
440
- const f = z(
440
+ const f = Y(
441
441
  () => {
442
- const l = [];
443
- for (const [h, d] of e) {
444
- const y = d.store.getSnapshot();
445
- Wt(d.category, n) && (!y.rootViewId || !y.views.has(y.rootViewId) || l.push({ key: h, store: d.store }));
442
+ const d = [];
443
+ for (const [m, l] of e) {
444
+ const h = l.store.getSnapshot();
445
+ Ht(l.category, n) && (!h.rootViewId || !h.views.has(h.rootViewId) || d.push({ key: m, store: l.store }));
446
446
  }
447
- return l;
447
+ return d;
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__ */ E.jsx(E.Fragment, { children: f.map(({ key: l, store: h }) => /* @__PURE__ */ E.jsx(zt, { store: h, library: r, onAction: a.current, client: c.current, video: c.current?.media?.video }, l)) });
452
+ return f.length === 0 ? null : /* @__PURE__ */ A.jsx(A.Fragment, { children: f.map(({ key: d, store: m }) => /* @__PURE__ */ A.jsx(qt, { store: m, library: r, onAction: a.current, client: c.current, video: c.current?.media?.video }, d)) });
453
453
  });
454
- class qt {
454
+ class Jt {
455
455
  core;
456
456
  ownsCore;
457
457
  stores = /* @__PURE__ */ new Map();
@@ -509,8 +509,8 @@ class qt {
509
509
  if (r)
510
510
  return r;
511
511
  const n = {
512
- category: je,
513
- store: new Tt()
512
+ category: Me,
513
+ store: new Ct()
514
514
  };
515
515
  return this.stores.set(e, n), n;
516
516
  }
@@ -518,7 +518,7 @@ class qt {
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 ?? je;
521
+ const o = r ?? this.core.uiStore.getSnapshot(e)?.category ?? Me;
522
522
  return n.category === o ? !1 : (this.stores.set(e, { ...n, category: o }), !0);
523
523
  }
524
524
  notify(e) {
@@ -526,7 +526,7 @@ class qt {
526
526
  r(e);
527
527
  }
528
528
  }
529
- function we(t) {
529
+ function fe(t) {
530
530
  if (typeof t == "string") {
531
531
  const e = t.trim();
532
532
  return e.length > 0 ? e : void 0;
@@ -536,7 +536,7 @@ function we(t) {
536
536
  return e.length > 0 ? e.join(" ") : void 0;
537
537
  }
538
538
  }
539
- function $e(...t) {
539
+ function Be(...t) {
540
540
  let e = "";
541
541
  for (const r of t)
542
542
  if (r) {
@@ -545,41 +545,58 @@ function $e(...t) {
545
545
  }
546
546
  return e || void 0;
547
547
  }
548
- const He = /* @__PURE__ */ new WeakMap(), Jt = {};
549
- function Be(t) {
548
+ const Xe = /* @__PURE__ */ new WeakMap(), Xt = {};
549
+ function $e(t) {
550
550
  if (!t)
551
- return Jt;
552
- const e = He.get(t);
551
+ return Xt;
552
+ const e = Xe.get(t);
553
553
  if (e)
554
554
  return e;
555
555
  const r = {};
556
556
  for (const [n, o] of Object.entries(t))
557
557
  o != null && (typeof o == "string" || typeof o == "number" || typeof o == "boolean") && (r[n] = o);
558
- return He.set(t, r), r;
558
+ return Xe.set(t, r), r;
559
559
  }
560
- function Gt() {
560
+ function Zt() {
561
561
  const t = q(function({ nodeId: r, context: n }) {
562
- const o = X(n.store, r), s = w(null), i = we(o?.props?.targetViewId), a = o?.props?.focusOnly, c = typeof a == "boolean" ? a : void 0;
563
- return F(() => {
562
+ const o = Z(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), d = o?.props?.preciseGeneratedAt;
563
+ return x(() => {
564
564
  if (typeof document > "u")
565
565
  return;
566
566
  const l = s.current;
567
567
  if (!l || i && l.closest("[data-ikon-view-id]")?.getAttribute("data-ikon-view-id") !== i)
568
568
  return;
569
569
  const h = c !== !0;
570
- if (h && typeof l.scrollIntoView == "function")
571
- try {
572
- l.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
573
- } catch {
574
- l.scrollIntoView();
575
- }
576
- if (typeof l.focus == "function")
570
+ if (h) {
571
+ const p = ((w) => {
572
+ let T = w.parentElement;
573
+ for (; T; ) {
574
+ const j = window.getComputedStyle(T).overflowY;
575
+ if (j === "auto" || j === "scroll" || T.hasAttribute("data-radix-scroll-area-viewport"))
576
+ return T;
577
+ T = T.parentElement;
578
+ }
579
+ return null;
580
+ })(l);
581
+ p ? requestAnimationFrame(() => {
582
+ const w = p.getBoundingClientRect(), T = l.getBoundingClientRect(), I = p.scrollTop + (T.bottom - w.bottom) + 16;
583
+ "scrollBehavior" in document.documentElement.style ? p.scrollTo({ top: I, behavior: "smooth" }) : p.scrollTop = I;
584
+ }) : typeof l.scrollIntoView == "function" && requestAnimationFrame(() => {
585
+ try {
586
+ l.scrollIntoView({ behavior: "smooth", block: "end", inline: "nearest" });
587
+ } catch {
588
+ l.scrollIntoView(!1);
589
+ }
590
+ });
591
+ }
592
+ const S = document.activeElement;
593
+ if (!(S instanceof HTMLInputElement || S instanceof HTMLTextAreaElement || S?.getAttribute("contenteditable") === "true") && typeof l.focus == "function")
577
594
  try {
578
595
  l.focus({ preventScroll: !h });
579
596
  } catch {
580
597
  l.focus();
581
598
  }
582
- }, [c, i]), o ? /* @__PURE__ */ E.jsx(
599
+ }, [c, i, f, d]), o ? /* @__PURE__ */ A.jsx(
583
600
  "span",
584
601
  {
585
602
  ref: s,
@@ -596,58 +613,58 @@ function Gt() {
596
613
  return t;
597
614
  };
598
615
  }
599
- function Ht() {
616
+ function Qt() {
600
617
  const t = q(function({ nodeId: r, context: n, className: o }) {
601
- const s = X(n.store, r);
618
+ const s = Z(n.store, r);
602
619
  if (!s)
603
620
  return null;
604
- const i = Be(s.props), a = $e(we(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
605
- return /* @__PURE__ */ E.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
621
+ const i = $e(s.props), a = Be(fe(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
622
+ return /* @__PURE__ */ A.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
606
623
  });
607
624
  return ({ type: e }) => {
608
625
  if (e === "std.div")
609
626
  return t;
610
627
  };
611
628
  }
612
- function Xt() {
629
+ function er() {
613
630
  const t = q(function({ nodeId: r, context: n, className: o }) {
614
- const s = X(n.store, r);
631
+ const s = Z(n.store, r);
615
632
  if (!s)
616
633
  return null;
617
- const i = Be(s.props), a = $e("relative", we(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
618
- return /* @__PURE__ */ E.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
634
+ const i = $e(s.props), a = Be("relative", fe(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
635
+ return /* @__PURE__ */ A.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
619
636
  });
620
637
  return ({ type: e }) => {
621
638
  if (e === "std.stack")
622
639
  return t;
623
640
  };
624
641
  }
625
- function Zt() {
642
+ function tr() {
626
643
  const t = q(function({ nodeId: r, context: n, className: o }) {
627
- const s = X(n.store, r);
644
+ const s = Z(n.store, r);
628
645
  if (!s)
629
646
  return null;
630
- const i = Be(s.props), a = $e("absolute", we(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
631
- return /* @__PURE__ */ E.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
647
+ const i = $e(s.props), a = Be("absolute", fe(s.props?.className), o), c = s.children?.length ? n.renderChildren(s.children) : void 0;
648
+ return /* @__PURE__ */ A.jsx("div", { ...i, "data-ikon-node-id": s.id, className: a, children: c });
632
649
  });
633
650
  return ({ type: e }) => {
634
651
  if (e === "std.layer")
635
652
  return t;
636
653
  };
637
654
  }
638
- function Qt() {
655
+ function rr() {
639
656
  return [
640
- Ht(),
641
- Xt(),
642
- Zt(),
643
- Gt()
657
+ Qt(),
658
+ er(),
659
+ tr(),
660
+ Zt()
644
661
  ];
645
662
  }
646
- const er = "base", tr = async () => Qt();
647
- function rr(t) {
648
- t.registerModule(er, tr);
663
+ const nr = "base", or = async () => rr();
664
+ function sr(t) {
665
+ t.registerModule(nr, or);
649
666
  }
650
- function dt(t) {
667
+ function ft(t) {
651
668
  if (typeof t == "string") {
652
669
  const e = t.trim();
653
670
  return e.length > 0 ? e : void 0;
@@ -657,13 +674,13 @@ function dt(t) {
657
674
  return e.length > 0 ? e.join(" ") : void 0;
658
675
  }
659
676
  }
660
- function ft(...t) {
677
+ function ht(...t) {
661
678
  const e = [];
662
679
  for (const r of t)
663
680
  r && r.trim() && e.push(r.trim());
664
681
  return e.length > 0 ? e.join(" ") : void 0;
665
682
  }
666
- function ge(t) {
683
+ function ye(t) {
667
684
  if (typeof t == "number" && Number.isFinite(t))
668
685
  return Math.floor(t);
669
686
  if (typeof t == "string" && t.trim().length > 0) {
@@ -672,42 +689,42 @@ function ge(t) {
672
689
  return Math.floor(e);
673
690
  }
674
691
  }
675
- function Me(t) {
692
+ function je(t) {
676
693
  if (typeof t != "string")
677
694
  return;
678
695
  const e = t.trim();
679
696
  return e.length > 0 ? e : void 0;
680
697
  }
681
- const nr = "std.video-canvas", or = "std.video-url-player";
682
- function sr() {
698
+ const ir = "std.video-canvas", ar = "std.video-url-player";
699
+ function cr() {
683
700
  const t = q(function({ nodeId: r, context: n, className: o }) {
684
- const s = X(n.store, r), i = w(null), a = n.video, c = s ? Me(s.props?.streamId) : void 0, f = s ? ge(s.props?.width) : void 0, l = s ? ge(s.props?.height) : void 0, h = s ? ft(dt(s.props?.className), o) : o;
685
- return F(() => {
686
- const d = i.current;
687
- if (!(!a || !d || !c))
688
- return a.attachCanvas(c, d), () => {
701
+ const s = Z(n.store, r), i = v(null), a = n.video, c = s ? je(s.props?.streamId) : void 0, f = s ? ye(s.props?.width) : void 0, d = s ? ye(s.props?.height) : void 0, m = s ? ht(ft(s.props?.className), o) : o;
702
+ return x(() => {
703
+ const l = i.current;
704
+ if (!(!a || !l || !c))
705
+ return a.attachCanvas(c, l), () => {
689
706
  a.detachCanvas(c);
690
707
  };
691
- }, [a, c]), s ? /* @__PURE__ */ E.jsx(
708
+ }, [a, c]), s ? /* @__PURE__ */ A.jsx(
692
709
  "canvas",
693
710
  {
694
711
  ref: i,
695
712
  "data-ikon-node-id": s.id,
696
713
  "data-ikon-video-stream-id": c,
697
- className: h,
714
+ className: m,
698
715
  ...f ? { width: f } : {},
699
- ...l ? { height: l } : {}
716
+ ...d ? { height: d } : {}
700
717
  },
701
718
  c
702
719
  ) : null;
703
720
  });
704
721
  return ({ type: e }) => {
705
- if (e === nr)
722
+ if (e === ir)
706
723
  return t;
707
724
  };
708
725
  }
709
- function ir() {
710
- return [sr(), ar()];
726
+ function ur() {
727
+ return [cr(), lr()];
711
728
  }
712
729
  function ce(t) {
713
730
  if (typeof t == "boolean")
@@ -718,56 +735,56 @@ function ce(t) {
718
735
  if (e === "false") return !1;
719
736
  }
720
737
  }
721
- function ar() {
738
+ function lr() {
722
739
  const t = q(function({
723
740
  nodeId: r,
724
741
  context: n,
725
742
  className: o
726
743
  }) {
727
- const s = X(n.store, r);
744
+ const s = Z(n.store, r);
728
745
  if (!s)
729
746
  return null;
730
- const i = ft(dt(s.props?.className), o), a = Me(s.props?.src), c = Me(s.props?.poster), f = ce(s.props?.controls), l = ce(s.props?.autoplay), h = ce(s.props?.loop), d = ce(s.props?.muted), y = ce(s.props?.playsInline), S = ge(s.props?.width), b = ge(s.props?.height), m = s.children?.length ? n.renderChildren(s.children) : void 0;
731
- return /* @__PURE__ */ E.jsx(
747
+ const i = ht(ft(s.props?.className), o), a = je(s.props?.src), c = je(s.props?.poster), f = ce(s.props?.controls), d = ce(s.props?.autoplay), m = ce(s.props?.loop), l = ce(s.props?.muted), h = ce(s.props?.playsInline), S = ye(s.props?.width), b = ye(s.props?.height), g = s.children?.length ? n.renderChildren(s.children) : void 0;
748
+ return /* @__PURE__ */ A.jsx(
732
749
  "video",
733
750
  {
734
751
  src: a,
735
752
  poster: c,
736
753
  ...f !== void 0 ? { controls: f } : {},
737
- ...l !== void 0 ? { autoPlay: l } : {},
738
- ...h !== void 0 ? { loop: h } : {},
739
- ...d !== void 0 ? { muted: d } : {},
740
- ...y !== void 0 ? { playsInline: y } : {},
754
+ ...d !== void 0 ? { autoPlay: d } : {},
755
+ ...m !== void 0 ? { loop: m } : {},
756
+ ...l !== void 0 ? { muted: l } : {},
757
+ ...h !== void 0 ? { playsInline: h } : {},
741
758
  ...S ? { width: S } : {},
742
759
  ...b ? { height: b } : {},
743
760
  "data-ikon-node-id": s.id,
744
761
  className: i,
745
- children: m
762
+ children: g
746
763
  }
747
764
  );
748
765
  });
749
766
  return ({ type: e }) => {
750
- if (e === or)
767
+ if (e === ar)
751
768
  return t;
752
769
  };
753
770
  }
754
- const cr = "media", ur = async () => ir();
755
- function lr(t) {
756
- t.registerModule(cr, ur);
771
+ const dr = "media", fr = async () => ur();
772
+ function hr(t) {
773
+ t.registerModule(dr, fr);
757
774
  }
758
- const dr = `#version 300 es
775
+ const mr = `#version 300 es
759
776
  in vec4 a_position;
760
777
  void main() {
761
778
  gl_Position = a_position;
762
779
  }
763
780
  `;
764
- function fr(t, e) {
781
+ function pr(t, e) {
765
782
  return new RegExp(`\\buniform\\s+\\w+\\s+${e}\\s*;`, "g").test(t);
766
783
  }
767
- function hr(t, e) {
784
+ function gr(t, e) {
768
785
  const r = [];
769
786
  for (const [n, o] of Object.entries(e)) {
770
- if (fr(t, n))
787
+ if (pr(t, n))
771
788
  continue;
772
789
  let s;
773
790
  switch (o.type) {
@@ -820,7 +837,7 @@ void main() {
820
837
  }
821
838
  `;
822
839
  }
823
- class mr {
840
+ class yr {
824
841
  gl;
825
842
  program = null;
826
843
  positionBuffer = null;
@@ -856,10 +873,10 @@ class mr {
856
873
  }
857
874
  compile(e, r = {}) {
858
875
  this.lastError = null, this.customUniforms = r, this.currentShaderSource = e;
859
- const n = this.gl, o = this.compileShader(n.VERTEX_SHADER, dr);
876
+ const n = this.gl, o = this.compileShader(n.VERTEX_SHADER, mr);
860
877
  if (!o)
861
878
  return !1;
862
- const s = hr(e, r), i = this.compileShader(n.FRAGMENT_SHADER, s);
879
+ const s = gr(e, r), i = this.compileShader(n.FRAGMENT_SHADER, s);
863
880
  if (!i)
864
881
  return n.deleteShader(o), !1;
865
882
  const a = n.createProgram();
@@ -899,44 +916,44 @@ class mr {
899
916
  c && e.uniform3f(c, n, o, 1);
900
917
  const f = this.uniformLocations.get("iTime");
901
918
  f && e.uniform1f(f, i);
902
- const l = this.uniformLocations.get("iTimeDelta");
903
- l && e.uniform1f(l, a);
904
- const h = this.uniformLocations.get("iFrame");
905
- h && e.uniform1i(h, this.frameCount);
906
- const d = this.uniformLocations.get("iMouse");
907
- d && e.uniform4f(d, this.mouseX, this.mouseY, this.mouseClickX, this.mouseClickY);
908
- const y = this.uniformLocations.get("iDate");
909
- if (y) {
919
+ const d = this.uniformLocations.get("iTimeDelta");
920
+ d && e.uniform1f(d, a);
921
+ const m = this.uniformLocations.get("iFrame");
922
+ m && e.uniform1i(m, this.frameCount);
923
+ const l = this.uniformLocations.get("iMouse");
924
+ l && e.uniform4f(l, this.mouseX, this.mouseY, this.mouseClickX, this.mouseClickY);
925
+ const h = this.uniformLocations.get("iDate");
926
+ if (h) {
910
927
  const S = /* @__PURE__ */ new Date();
911
- e.uniform4f(y, S.getFullYear(), S.getMonth(), S.getDate(), S.getHours() * 3600 + S.getMinutes() * 60 + S.getSeconds() + S.getMilliseconds() / 1e3);
928
+ e.uniform4f(h, S.getFullYear(), S.getMonth(), S.getDate(), S.getHours() * 3600 + S.getMinutes() * 60 + S.getSeconds() + S.getMilliseconds() / 1e3);
912
929
  }
913
930
  for (const [S, b] of Object.entries(this.customUniforms)) {
914
- const m = this.uniformLocations.get(S);
915
- if (m)
931
+ const g = this.uniformLocations.get(S);
932
+ if (g)
916
933
  switch (b.type) {
917
934
  case "float":
918
- e.uniform1f(m, b.value);
935
+ e.uniform1f(g, b.value);
919
936
  break;
920
937
  case "vec2": {
921
938
  const p = b.value;
922
- e.uniform2f(m, p[0], p[1]);
939
+ e.uniform2f(g, p[0], p[1]);
923
940
  break;
924
941
  }
925
942
  case "vec3": {
926
943
  const p = b.value;
927
- e.uniform3f(m, p[0], p[1], p[2]);
944
+ e.uniform3f(g, p[0], p[1], p[2]);
928
945
  break;
929
946
  }
930
947
  case "vec4": {
931
948
  const p = b.value;
932
- e.uniform4f(m, p[0], p[1], p[2], p[3]);
949
+ e.uniform4f(g, p[0], p[1], p[2], p[3]);
933
950
  break;
934
951
  }
935
952
  case "int":
936
- e.uniform1i(m, b.value);
953
+ e.uniform1i(g, b.value);
937
954
  break;
938
955
  case "bool":
939
- e.uniform1i(m, b.value ? 1 : 0);
956
+ e.uniform1i(g, b.value ? 1 : 0);
940
957
  break;
941
958
  }
942
959
  }
@@ -950,7 +967,7 @@ class mr {
950
967
  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();
951
968
  }
952
969
  }
953
- function pr(t) {
970
+ function Sr(t) {
954
971
  if (typeof t == "string") {
955
972
  const e = t.trim();
956
973
  return e.length > 0 ? e : void 0;
@@ -960,13 +977,13 @@ function pr(t) {
960
977
  return e.length > 0 ? e.join(" ") : void 0;
961
978
  }
962
979
  }
963
- function gr(...t) {
980
+ function br(...t) {
964
981
  const e = [];
965
982
  for (const r of t)
966
983
  r && r.trim() && e.push(r.trim());
967
984
  return e.length > 0 ? e.join(" ") : void 0;
968
985
  }
969
- function Ee(t) {
986
+ function Re(t) {
970
987
  if (typeof t == "number" && Number.isFinite(t))
971
988
  return Math.floor(t);
972
989
  if (typeof t == "string" && t.trim().length > 0) {
@@ -975,10 +992,10 @@ function Ee(t) {
975
992
  return Math.floor(e);
976
993
  }
977
994
  }
978
- function yr(t) {
995
+ function wr(t) {
979
996
  return typeof t == "string" ? t : "";
980
997
  }
981
- function Sr(t) {
998
+ function vr(t) {
982
999
  if (typeof t == "boolean")
983
1000
  return t;
984
1001
  if (typeof t == "string") {
@@ -987,7 +1004,7 @@ function Sr(t) {
987
1004
  if (e === "false") return !1;
988
1005
  }
989
1006
  }
990
- function br(t) {
1007
+ function Er(t) {
991
1008
  if (!t || typeof t != "object")
992
1009
  return {};
993
1010
  const e = {}, r = t;
@@ -1002,7 +1019,7 @@ function br(t) {
1002
1019
  }
1003
1020
  return e;
1004
1021
  }
1005
- function wr(t, e) {
1022
+ function Rr(t, e) {
1006
1023
  const r = Object.keys(t), n = Object.keys(e);
1007
1024
  if (r.length !== n.length)
1008
1025
  return !1;
@@ -1023,99 +1040,99 @@ function wr(t, e) {
1023
1040
  }
1024
1041
  return !0;
1025
1042
  }
1026
- const vr = "std.shader-canvas";
1027
- function Rr() {
1043
+ const Ar = "std.shader-canvas";
1044
+ function Tr() {
1028
1045
  const t = q(function({ nodeId: r, context: n, className: o }) {
1029
- const s = X(n.store, r), i = w(null), a = w(null), c = w(null), f = w(0), l = w(""), h = w({}), d = w({
1046
+ const s = Z(n.store, r), i = v(null), a = v(null), c = v(null), f = v(0), d = v(""), m = v({}), l = v({
1030
1047
  x: 0,
1031
1048
  y: 0,
1032
1049
  clickX: 0,
1033
1050
  clickY: 0,
1034
1051
  isDown: !1
1035
- }), y = s ? yr(s.props?.shaderSource) : "", S = s ? Ee(s.props?.fps) ?? 60 : 60, b = s?.props?.uniforms, m = z(() => br(b), [b]), p = s ? Sr(s.props?.enableMouse) ?? !0 : !0, A = s ? Ee(s.props?.width) : void 0, P = s ? Ee(s.props?.height) : void 0, j = s ? gr(pr(s.props?.className), o) : o;
1036
- F(() => {
1052
+ }), h = s ? wr(s.props?.shaderSource) : "", S = s ? Re(s.props?.fps) ?? 60 : 60, b = s?.props?.uniforms, g = Y(() => Er(b), [b]), p = s ? vr(s.props?.enableMouse) ?? !0 : !0, w = s ? Re(s.props?.width) : void 0, T = s ? Re(s.props?.height) : void 0, I = s ? br(Sr(s.props?.className), o) : o;
1053
+ x(() => {
1037
1054
  const k = i.current;
1038
1055
  if (k) {
1039
1056
  try {
1040
- const C = new mr(k);
1041
- a.current = C;
1042
- } catch (C) {
1043
- console.error("[ShaderRenderer] Failed to create WebGL2 context:", C);
1057
+ const O = new yr(k);
1058
+ a.current = O;
1059
+ } catch (O) {
1060
+ console.error("[ShaderRenderer] Failed to create WebGL2 context:", O);
1044
1061
  }
1045
1062
  return () => {
1046
1063
  a.current && (a.current.destroy(), a.current = null);
1047
1064
  };
1048
1065
  }
1049
- }, []), F(() => {
1066
+ }, []), x(() => {
1050
1067
  const k = a.current;
1051
- if (!(!k || !y) && l.current !== y)
1052
- if (k.compile(y, m))
1053
- l.current = y, h.current = m;
1068
+ if (!(!k || !h) && d.current !== h)
1069
+ if (k.compile(h, g))
1070
+ d.current = h, m.current = g;
1054
1071
  else {
1055
- const M = k.getError();
1056
- console.error("[ShaderRenderer] Shader compilation failed:", M);
1072
+ const L = k.getError();
1073
+ console.error("[ShaderRenderer] Shader compilation failed:", L);
1057
1074
  }
1058
- }, [y, m]), F(() => {
1075
+ }, [h, g]), x(() => {
1059
1076
  const k = a.current;
1060
- !k || !l.current || wr(h.current, m) || (k.setCustomUniforms(m), h.current = m);
1061
- }, [m]), F(() => {
1077
+ !k || !d.current || Rr(m.current, g) || (k.setCustomUniforms(g), m.current = g);
1078
+ }, [g]), x(() => {
1062
1079
  const k = a.current;
1063
- if (!k || !l.current) return;
1064
- const C = 1e3 / S, M = (I) => {
1065
- const L = I - f.current;
1066
- L >= C && (f.current = I - L % C, k.draw()), c.current = requestAnimationFrame(M);
1080
+ if (!k || !d.current) return;
1081
+ const O = 1e3 / S, L = (_) => {
1082
+ const D = _ - f.current;
1083
+ D >= O && (f.current = _ - D % O, k.draw()), c.current = requestAnimationFrame(L);
1067
1084
  };
1068
- return c.current = requestAnimationFrame(M), () => {
1085
+ return c.current = requestAnimationFrame(L), () => {
1069
1086
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
1070
1087
  };
1071
1088
  }, [S]);
1072
- const V = B(
1089
+ const j = $(
1073
1090
  (k) => {
1074
1091
  if (!p) return;
1075
- const C = i.current, M = a.current;
1076
- if (!C || !M) return;
1077
- const I = C.getBoundingClientRect(), L = k.clientX - I.left, Y = I.height - (k.clientY - I.top);
1078
- d.current.x = L, d.current.y = Y, M.setMouse(L, Y, d.current.clickX, d.current.clickY);
1092
+ const O = i.current, L = a.current;
1093
+ if (!O || !L) return;
1094
+ const _ = O.getBoundingClientRect(), D = k.clientX - _.left, z = _.height - (k.clientY - _.top);
1095
+ l.current.x = D, l.current.y = z, L.setMouse(D, z, l.current.clickX, l.current.clickY);
1079
1096
  },
1080
1097
  [p]
1081
- ), J = B(
1098
+ ), G = $(
1082
1099
  (k) => {
1083
1100
  if (!p) return;
1084
- const C = i.current, M = a.current;
1085
- if (!C || !M) return;
1086
- const I = C.getBoundingClientRect(), L = k.clientX - I.left, Y = I.height - (k.clientY - I.top);
1087
- d.current.isDown = !0, d.current.clickX = L, d.current.clickY = Y, M.setMouse(L, Y, L, Y);
1101
+ const O = i.current, L = a.current;
1102
+ if (!O || !L) return;
1103
+ const _ = O.getBoundingClientRect(), D = k.clientX - _.left, z = _.height - (k.clientY - _.top);
1104
+ l.current.isDown = !0, l.current.clickX = D, l.current.clickY = z, L.setMouse(D, z, D, z);
1088
1105
  },
1089
1106
  [p]
1090
- ), Z = B(() => {
1091
- p && (d.current.isDown = !1, d.current.clickX = -Math.abs(d.current.clickX));
1107
+ ), Q = $(() => {
1108
+ p && (l.current.isDown = !1, l.current.clickX = -Math.abs(l.current.clickX));
1092
1109
  }, [p]);
1093
- return s ? /* @__PURE__ */ E.jsx(
1110
+ return s ? /* @__PURE__ */ A.jsx(
1094
1111
  "canvas",
1095
1112
  {
1096
1113
  ref: i,
1097
1114
  "data-ikon-node-id": s.id,
1098
- className: j,
1099
- ...A ? { width: A } : {},
1100
- ...P ? { height: P } : {},
1101
- onMouseMove: V,
1102
- onMouseDown: J,
1103
- onMouseUp: Z,
1104
- onMouseLeave: Z
1115
+ className: I,
1116
+ ...w ? { width: w } : {},
1117
+ ...T ? { height: T } : {},
1118
+ onMouseMove: j,
1119
+ onMouseDown: G,
1120
+ onMouseUp: Q,
1121
+ onMouseLeave: Q
1105
1122
  }
1106
1123
  ) : null;
1107
1124
  });
1108
1125
  return ({ type: e }) => {
1109
- if (e === vr)
1126
+ if (e === Ar)
1110
1127
  return t;
1111
1128
  };
1112
1129
  }
1113
- const Er = "shader", Ar = async () => Rr();
1114
- function kr(t) {
1115
- t.registerModule(Er, Ar);
1130
+ const kr = "shader", Cr = async () => Tr();
1131
+ function Ir(t) {
1132
+ t.registerModule(kr, Cr);
1116
1133
  }
1117
- const Xe = be("UIRegistry");
1118
- class Tr {
1134
+ const Ze = we("UIRegistry");
1135
+ class Or {
1119
1136
  baseResolvers = [];
1120
1137
  moduleLoaders = /* @__PURE__ */ new Map();
1121
1138
  moduleResolvers = /* @__PURE__ */ new Map();
@@ -1137,15 +1154,15 @@ class Tr {
1137
1154
  for (const [n, o] of this.moduleLoaders.entries())
1138
1155
  if (!this.moduleResolvers.has(n))
1139
1156
  try {
1140
- const s = await o(), i = Or(s);
1157
+ const s = await o(), i = Pr(s);
1141
1158
  this.moduleResolvers.set(n, i), e = !0;
1142
1159
  } catch (s) {
1143
- Xe.error(`[IkonUiRegistry] Failed to load module '${n}'.`, s);
1160
+ Ze.error(`[IkonUiRegistry] Failed to load module '${n}'.`, s);
1144
1161
  }
1145
1162
  const r = [];
1146
1163
  for (const n of this.moduleLoaders.keys())
1147
1164
  this.moduleResolvers.has(n) && r.push(n);
1148
- return Nr(r, this.activeModuleOrder) || (this.activeModuleOrder = r, e = !0), e;
1165
+ return Mr(r, this.activeModuleOrder) || (this.activeModuleOrder = r, e = !0), e;
1149
1166
  }
1150
1167
  resolve(e) {
1151
1168
  for (const r of this.baseResolvers) {
@@ -1155,7 +1172,7 @@ class Tr {
1155
1172
  for (const r of this.activeModuleOrder) {
1156
1173
  const n = this.moduleResolvers.get(r);
1157
1174
  if (!n) {
1158
- Xe.warn(`Missing resolvers for module ${r}`);
1175
+ Ze.warn(`Missing resolvers for module ${r}`);
1159
1176
  continue;
1160
1177
  }
1161
1178
  for (const o of n) {
@@ -1165,17 +1182,17 @@ class Tr {
1165
1182
  }
1166
1183
  }
1167
1184
  }
1168
- function Cr() {
1169
- const t = new Tr();
1170
- return rr(t), lr(t), kr(t), t.loadRegisteredModules(), t;
1185
+ function _r() {
1186
+ const t = new Or();
1187
+ return sr(t), hr(t), Ir(t), t.loadRegisteredModules(), t;
1171
1188
  }
1172
- function Ir(t) {
1189
+ function Nr(t) {
1173
1190
  return Array.isArray(t) ? t : [t];
1174
1191
  }
1175
- function Or(t) {
1176
- return t ? Ir(t).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
1192
+ function Pr(t) {
1193
+ return t ? Nr(t).flatMap((e) => e ? Array.isArray(e) ? e.filter(Boolean) : [e] : []) : [];
1177
1194
  }
1178
- function Nr(t, e) {
1195
+ function Mr(t, e) {
1179
1196
  if (t.length !== e.length)
1180
1197
  return !1;
1181
1198
  for (let r = 0; r < t.length; r += 1)
@@ -1183,7 +1200,7 @@ function Nr(t, e) {
1183
1200
  return !1;
1184
1201
  return !0;
1185
1202
  }
1186
- const Ae = be("MotionController"), Ze = {
1203
+ const Ae = we("MotionController"), Qe = {
1187
1204
  ease: [0.25, 0.1, 0.25, 1],
1188
1205
  "ease-in": [0.42, 0, 1, 1],
1189
1206
  "ease-out": [0, 0, 0.58, 1],
@@ -1213,88 +1230,88 @@ const Ae = be("MotionController"), Ze = {
1213
1230
  "ease-out-back": [0.175, 0.885, 0.32, 1.275],
1214
1231
  "ease-in-out-back": [0.68, -0.55, 0.265, 1.55]
1215
1232
  };
1216
- function D(t) {
1233
+ function B(t) {
1217
1234
  return t <= 0 ? 0 : t >= 1 ? 1 : t;
1218
1235
  }
1219
- function Qe(t) {
1236
+ function et(t) {
1220
1237
  if (t == null) return;
1221
1238
  const e = `${t}`.trim();
1222
1239
  if (!e) return;
1223
1240
  const r = Number.parseFloat(e);
1224
1241
  return Number.isFinite(r) ? r : void 0;
1225
1242
  }
1226
- function et(t) {
1243
+ function tt(t) {
1227
1244
  return typeof CSS < "u" && CSS.escape ? CSS.escape(t) : t.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
1228
1245
  }
1229
- function tt(t, e, r, n) {
1230
- const l = new Float32Array(11);
1231
- function h(m, p, A) {
1232
- return ((3 * p - 3 * A + 1) * m + (3 * A - 6 * p)) * m * m + 3 * p * m;
1246
+ function rt(t, e, r, n) {
1247
+ const d = new Float32Array(11);
1248
+ function m(g, p, w) {
1249
+ return ((3 * p - 3 * w + 1) * g + (3 * w - 6 * p)) * g * g + 3 * p * g;
1233
1250
  }
1234
- function d(m, p, A) {
1235
- return 3 * (3 * p - 3 * A + 1) * m * m + 2 * (3 * A - 6 * p) * m + 3 * p;
1251
+ function l(g, p, w) {
1252
+ return 3 * (3 * p - 3 * w + 1) * g * g + 2 * (3 * w - 6 * p) * g + 3 * p;
1236
1253
  }
1237
- function y(m, p) {
1238
- for (let A = 0; A < 4; A += 1) {
1239
- const P = d(p, t, r);
1240
- if (P === 0)
1254
+ function h(g, p) {
1255
+ for (let w = 0; w < 4; w += 1) {
1256
+ const T = l(p, t, r);
1257
+ if (T === 0)
1241
1258
  return p;
1242
- const j = h(p, t, r) - m;
1243
- p -= j / P;
1259
+ const I = m(p, t, r) - g;
1260
+ p -= I / T;
1244
1261
  }
1245
1262
  return p;
1246
1263
  }
1247
- function S(m, p, A) {
1248
- let P = 0, j = 0, V = 0;
1264
+ function S(g, p, w) {
1265
+ let T = 0, I = 0, j = 0;
1249
1266
  do
1250
- j = p + (A - p) / 2, P = h(j, t, r) - m, P > 0 ? A = j : p = j;
1251
- while (Math.abs(P) > 1e-7 && ++V < 10);
1252
- return j;
1253
- }
1254
- function b(m) {
1255
- let p = 0, A = 1;
1256
- const P = 10;
1257
- for (; A !== P && l[A] <= m; A += 1)
1267
+ I = p + (w - p) / 2, T = m(I, t, r) - g, T > 0 ? w = I : p = I;
1268
+ while (Math.abs(T) > 1e-7 && ++j < 10);
1269
+ return I;
1270
+ }
1271
+ function b(g) {
1272
+ let p = 0, w = 1;
1273
+ const T = 10;
1274
+ for (; w !== T && d[w] <= g; w += 1)
1258
1275
  p += 0.1;
1259
- A -= 1;
1260
- const j = (m - l[A]) / (l[A + 1] - l[A]), V = p + j * 0.1, J = d(V, t, r);
1261
- return J >= 1e-3 ? y(m, V) : J === 0 ? V : S(m, p, p + 0.1);
1276
+ w -= 1;
1277
+ const I = (g - d[w]) / (d[w + 1] - d[w]), j = p + I * 0.1, G = l(j, t, r);
1278
+ return G >= 1e-3 ? h(g, j) : G === 0 ? j : S(g, p, p + 0.1);
1262
1279
  }
1263
- for (let m = 0; m < 11; m += 1)
1264
- l[m] = h(m * 0.1, t, r);
1265
- return (m) => m <= 0 ? 0 : m >= 1 ? 1 : h(b(m), e, n);
1280
+ for (let g = 0; g < 11; g += 1)
1281
+ d[g] = m(g * 0.1, t, r);
1282
+ return (g) => g <= 0 ? 0 : g >= 1 ? 1 : m(b(g), e, n);
1266
1283
  }
1267
- function _r(t) {
1284
+ function jr(t) {
1268
1285
  const e = /steps\(\s*([0-9]+)\s*(?:,\s*([a-z-]+)\s*)?\)/i.exec(t);
1269
1286
  if (!e)
1270
- return (o) => D(o);
1287
+ return (o) => B(o);
1271
1288
  const r = Math.max(1, parseInt(e[1], 10)), n = (e[2] ?? "end").toLowerCase();
1272
- return n === "start" || n === "jump-start" ? (o) => D(Math.ceil(o * r) / r) : n === "none" || n === "jump-none" ? (o) => D(Math.round(o * r) / r) : n === "both" || n === "jump-both" ? (o) => D((Math.floor(o * r) + 0.5) / r) : (o) => D(Math.floor(o * r) / r);
1289
+ 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);
1273
1290
  }
1274
- function Pr(t) {
1291
+ function Lr(t) {
1275
1292
  if (!t)
1276
- return (r) => D(r);
1293
+ return (r) => B(r);
1277
1294
  const e = t.trim().toLowerCase();
1278
1295
  if (!e || e === "linear")
1279
- return (r) => D(r);
1280
- if (Ze[e]) {
1281
- const [r, n, o, s] = Ze[e], i = tt(r, n, o, s);
1282
- return (a) => D(i(D(a)));
1296
+ return (r) => B(r);
1297
+ if (Qe[e]) {
1298
+ const [r, n, o, s] = Qe[e], i = rt(r, n, o, s);
1299
+ return (a) => B(i(B(a)));
1283
1300
  }
1284
1301
  if (e.startsWith("cubic-bezier(") && e.endsWith(")")) {
1285
1302
  const n = e.slice(13, -1).split(",").map((o) => Number.parseFloat(o.trim()));
1286
1303
  if (n.length === 4 && n.every((o) => Number.isFinite(o))) {
1287
- const [o, s, i, a] = n, c = tt(o, s, i, a);
1288
- return (f) => D(c(D(f)));
1304
+ const [o, s, i, a] = n, c = rt(o, s, i, a);
1305
+ return (f) => B(c(B(f)));
1289
1306
  }
1290
1307
  }
1291
1308
  if (e.startsWith("steps(") && e.endsWith(")")) {
1292
- const r = _r(e);
1293
- return (n) => r(D(n));
1309
+ const r = jr(e);
1310
+ return (n) => r(B(n));
1294
1311
  }
1295
- return (r) => D(r);
1312
+ return (r) => B(r);
1296
1313
  }
1297
- function jr(t) {
1314
+ function Ur(t) {
1298
1315
  if (!t)
1299
1316
  return;
1300
1317
  const e = /(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)\s*->\s*(-?\d+(?:\.\d+)?)\s*\.\.\s*(-?\d+(?:\.\d+)?)/.exec(t);
@@ -1304,7 +1321,7 @@ function jr(t) {
1304
1321
  if (![r, n, o, s].some((i) => !Number.isFinite(i)))
1305
1322
  return { inStart: r, inEnd: n, outStart: o, outEnd: s };
1306
1323
  }
1307
- class Mr {
1324
+ class xr {
1308
1325
  bindingsByStyle = /* @__PURE__ */ new Map();
1309
1326
  observer;
1310
1327
  observeScheduled = !1;
@@ -1349,7 +1366,7 @@ class Mr {
1349
1366
  const r = e.source?.trim();
1350
1367
  if (!r)
1351
1368
  return;
1352
- 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 = Pr(e.ease), f = jr(e.map), l = e.targetId?.trim() || void 0;
1369
+ const n = et(e.min) ?? 0, o = et(e.max), s = o === void 0 ? n + 100 : o, i = (e.clamp ?? "clamp").trim().toLowerCase(), a = !!e.reverse, c = Lr(e.ease), f = Ur(e.map), d = e.targetId?.trim() || void 0;
1353
1370
  return Number.isNaN(n) || Number.isNaN(s) ? void 0 : {
1354
1371
  source: r.toLowerCase(),
1355
1372
  min: n,
@@ -1358,7 +1375,7 @@ class Mr {
1358
1375
  reverse: a,
1359
1376
  ease: c,
1360
1377
  map: f,
1361
- targetId: l
1378
+ targetId: d
1362
1379
  };
1363
1380
  }
1364
1381
  ensureObserver() {
@@ -1407,7 +1424,7 @@ class Mr {
1407
1424
  const r = this.bindingsByStyle.get(e);
1408
1425
  if (!r || typeof document > "u")
1409
1426
  return;
1410
- const n = `.${et(e)}`;
1427
+ const n = `.${tt(e)}`;
1411
1428
  document.querySelectorAll(n).forEach((s) => this.applyStyleToElement(s, e, r));
1412
1429
  }
1413
1430
  applyStyleToElement(e, r, n) {
@@ -1447,7 +1464,7 @@ class Mr {
1447
1464
  }
1448
1465
  resolveScrollContainer(e, r) {
1449
1466
  if (r.targetId) {
1450
- const n = `[data-ikon-motion-source="${et(r.targetId)}"]`, o = typeof document < "u" ? document.querySelector(n) : null;
1467
+ const n = `[data-ikon-motion-source="${tt(r.targetId)}"]`, o = typeof document < "u" ? document.querySelector(n) : null;
1451
1468
  if (o)
1452
1469
  return o;
1453
1470
  }
@@ -1459,8 +1476,8 @@ class Mr {
1459
1476
  r.reverse && (i = 1 - i);
1460
1477
  const a = r.ease(i), c = Number.isFinite(a) ? a : 0, f = c * 100;
1461
1478
  if (e.style.setProperty("--tw-motion-bind-source-value", `${n}`), e.style.setProperty("--tw-motion-bind-progress-ratio", `${c}`), e.style.setProperty("--tw-motion-bind-progress", `${f}`), r.map) {
1462
- const l = this.applyMap(f, r.map);
1463
- l !== void 0 && e.style.setProperty("--tw-motion-bind-value", `${l}`);
1479
+ const d = this.applyMap(f, r.map);
1480
+ d !== void 0 && e.style.setProperty("--tw-motion-bind-value", `${d}`);
1464
1481
  } else
1465
1482
  e.style.removeProperty("--tw-motion-bind-value");
1466
1483
  }
@@ -1475,7 +1492,7 @@ class Mr {
1475
1492
  case "unclamped":
1476
1493
  return e;
1477
1494
  default:
1478
- return D(e);
1495
+ return B(e);
1479
1496
  }
1480
1497
  }
1481
1498
  applyMap(e, r) {
@@ -1562,31 +1579,31 @@ class Mr {
1562
1579
  }
1563
1580
  }
1564
1581
  }
1565
- const ke = new Mr();
1566
- function Ur(t) {
1567
- const e = w(/* @__PURE__ */ new Map()), r = B(({ styleId: s, css: i, common: a }) => {
1582
+ const Te = new xr();
1583
+ function Dr(t) {
1584
+ const e = v(/* @__PURE__ */ new Map()), r = $(({ styleId: s, css: i, common: a }) => {
1568
1585
  if (!(!s || typeof document > "u")) {
1569
1586
  if (i) {
1570
1587
  let c = e.current.get(s);
1571
1588
  c || (c = document.createElement("style"), c.setAttribute("data-ikon-style-id", s), document.head.appendChild(c), e.current.set(s, c)), c.textContent = i;
1572
1589
  }
1573
- ke.registerStyle(s, a);
1590
+ Te.registerStyle(s, a);
1574
1591
  }
1575
- }, []), n = B((s) => {
1592
+ }, []), n = $((s) => {
1576
1593
  if (!(typeof document > "u"))
1577
1594
  for (const i of s) {
1578
1595
  const a = e.current.get(i);
1579
- a && (a.remove(), e.current.delete(i)), ke.unregisterStyle(i);
1596
+ a && (a.remove(), e.current.delete(i)), Te.unregisterStyle(i);
1580
1597
  }
1581
- }, []), o = B(() => {
1598
+ }, []), o = $(() => {
1582
1599
  if (typeof document < "u") {
1583
1600
  for (const s of e.current.values())
1584
1601
  s.remove();
1585
1602
  e.current.clear();
1586
1603
  }
1587
- ke.reset();
1604
+ Te.reset();
1588
1605
  }, []);
1589
- return F(() => {
1606
+ return x(() => {
1590
1607
  if (!t) return;
1591
1608
  for (const a of t.getUiStyles())
1592
1609
  r(a);
@@ -1594,9 +1611,9 @@ function Ur(t) {
1594
1611
  return () => {
1595
1612
  s?.(), i?.(), o();
1596
1613
  };
1597
- }, [t, o, r, n]), F(() => () => o(), [o]), { setStyle: r, deleteStyles: n, reset: o };
1614
+ }, [t, o, r, n]), x(() => () => o(), [o]), { setStyle: r, deleteStyles: n, reset: o };
1598
1615
  }
1599
- function Lr(t) {
1616
+ function Fr(t) {
1600
1617
  const e = [];
1601
1618
  for (const [r, n] of t) {
1602
1619
  const o = n.store.getSnapshot(), s = o.rootViewId && o.views.has(o.rootViewId);
@@ -1604,62 +1621,62 @@ function Lr(t) {
1604
1621
  }
1605
1622
  return e.sort(), e.join(",");
1606
1623
  }
1607
- function xr(t) {
1608
- const [e, r] = ee(), n = w("");
1609
- return F(() => {
1624
+ function Br(t) {
1625
+ const [e, r] = X(), n = v("");
1626
+ return x(() => {
1610
1627
  if (!t) {
1611
1628
  r(void 0), n.current = "";
1612
1629
  return;
1613
1630
  }
1614
1631
  const o = () => {
1615
- const s = t.getStores(), i = Lr(s);
1632
+ const s = t.getStores(), i = Fr(s);
1616
1633
  i !== n.current && (n.current = i, r(s));
1617
1634
  };
1618
1635
  return o(), t.subscribe(o);
1619
1636
  }, [t]), e;
1620
1637
  }
1621
- var Dr = typeof global == "object" && global && global.Object === Object && global, Fr = typeof self == "object" && self && self.Object === Object && self, $r = Dr || Fr || Function("return this")(), ye = $r.Symbol, ht = Object.prototype, Br = ht.hasOwnProperty, Vr = ht.toString, ue = ye ? ye.toStringTag : void 0;
1622
- function Kr(t) {
1623
- var e = Br.call(t, ue), r = t[ue];
1638
+ var $r = typeof global == "object" && global && global.Object === Object && global, Vr = typeof self == "object" && self && self.Object === Object && self, Kr = $r || Vr || Function("return this")(), Se = Kr.Symbol, mt = Object.prototype, Yr = mt.hasOwnProperty, zr = mt.toString, ue = Se ? Se.toStringTag : void 0;
1639
+ function Wr(t) {
1640
+ var e = Yr.call(t, ue), r = t[ue];
1624
1641
  try {
1625
1642
  t[ue] = void 0;
1626
1643
  var n = !0;
1627
1644
  } catch {
1628
1645
  }
1629
- var o = Vr.call(t);
1646
+ var o = zr.call(t);
1630
1647
  return n && (e ? t[ue] = r : delete t[ue]), o;
1631
1648
  }
1632
- var zr = Object.prototype, Yr = zr.toString;
1633
- function Wr(t) {
1634
- return Yr.call(t);
1649
+ var qr = Object.prototype, Gr = qr.toString;
1650
+ function Hr(t) {
1651
+ return Gr.call(t);
1635
1652
  }
1636
- var qr = "[object Null]", Jr = "[object Undefined]", rt = ye ? ye.toStringTag : void 0;
1637
- function Gr(t) {
1638
- return t == null ? t === void 0 ? Jr : qr : rt && rt in Object(t) ? Kr(t) : Wr(t);
1653
+ var Jr = "[object Null]", Xr = "[object Undefined]", nt = Se ? Se.toStringTag : void 0;
1654
+ function Zr(t) {
1655
+ return t == null ? t === void 0 ? Xr : Jr : nt && nt in Object(t) ? Wr(t) : Hr(t);
1639
1656
  }
1640
- function Hr(t) {
1657
+ function Qr(t) {
1641
1658
  return t != null && typeof t == "object";
1642
1659
  }
1643
- var Xr = Array.isArray, Zr = "[object String]";
1644
- function Qr(t) {
1645
- return typeof t == "string" || !Xr(t) && Hr(t) && Gr(t) == Zr;
1660
+ var en = Array.isArray, tn = "[object String]";
1661
+ function rn(t) {
1662
+ return typeof t == "string" || !en(t) && Qr(t) && Zr(t) == tn;
1646
1663
  }
1647
- const nt = "ikonUiModules";
1648
- function Ue(t) {
1664
+ const ot = "ikonUiModules";
1665
+ function Le(t) {
1649
1666
  return typeof t == "object" && t !== null && !Array.isArray(t);
1650
1667
  }
1651
- function en(t) {
1668
+ function nn(t) {
1652
1669
  if (!Array.isArray(t))
1653
1670
  return;
1654
1671
  const e = /* @__PURE__ */ new Set();
1655
1672
  for (const r of t) {
1656
- if (!Qr(r)) continue;
1673
+ if (!rn(r)) continue;
1657
1674
  const n = r.trim();
1658
1675
  n && (e.has(n) || e.add(n));
1659
1676
  }
1660
1677
  return Array.from(e);
1661
1678
  }
1662
- function Xn(t, e) {
1679
+ function no(t, e) {
1663
1680
  if (t === e)
1664
1681
  return !0;
1665
1682
  if (!t || !e)
@@ -1671,19 +1688,19 @@ function Xn(t, e) {
1671
1688
  return !1;
1672
1689
  return !0;
1673
1690
  }
1674
- function tn(t) {
1675
- if (!(!Ue(t) || !Object.prototype.hasOwnProperty.call(t, nt)))
1676
- return en(t[nt]);
1691
+ function on(t) {
1692
+ if (!(!Le(t) || !Object.prototype.hasOwnProperty.call(t, ot)))
1693
+ return nn(t[ot]);
1677
1694
  }
1678
- function Zn(...t) {
1695
+ function oo(...t) {
1679
1696
  for (const e of t) {
1680
- const r = tn(e);
1697
+ const r = on(e);
1681
1698
  if (r !== void 0)
1682
1699
  return r;
1683
1700
  }
1684
1701
  }
1685
- function Qn(t) {
1686
- if (!Ue(t))
1702
+ function so(t) {
1703
+ if (!Le(t))
1687
1704
  return;
1688
1705
  const e = t, r = Object.keys(e).find((c) => c.toLowerCase() === "modules");
1689
1706
  if (!r)
@@ -1702,19 +1719,19 @@ function Qn(t) {
1702
1719
  o.push(b), i.add(b);
1703
1720
  continue;
1704
1721
  }
1705
- if (!Ue(c))
1722
+ if (!Le(c))
1706
1723
  continue;
1707
- const f = c, l = Object.keys(f).find((b) => b.toLowerCase() === "name");
1708
- if (!l)
1724
+ const f = c, d = Object.keys(f).find((b) => b.toLowerCase() === "name");
1725
+ if (!d)
1709
1726
  continue;
1710
- const h = f[l];
1711
- if (typeof h != "string")
1727
+ const m = f[d];
1728
+ if (typeof m != "string")
1712
1729
  continue;
1713
- const d = h.trim();
1714
- if (!d)
1730
+ const l = m.trim();
1731
+ if (!l)
1715
1732
  continue;
1716
- const y = Object.keys(f).find((b) => b.toLowerCase() === "javascript"), S = y ? f[y] : void 0;
1717
- typeof S == "string" && s.set(d, S), i.has(d) || (o.push(d), i.add(d));
1733
+ const h = Object.keys(f).find((b) => b.toLowerCase() === "javascript"), S = h ? f[h] : void 0;
1734
+ typeof S == "string" && s.set(l, S), i.has(l) || (o.push(l), i.add(l));
1718
1735
  }
1719
1736
  if (!o.length && s.size === 0)
1720
1737
  return { modules: [] };
@@ -1724,16 +1741,16 @@ function Qn(t) {
1724
1741
  }));
1725
1742
  return a.length > 0 ? { modules: o, inlineModules: a } : { modules: o };
1726
1743
  }
1727
- const v = {
1744
+ const E = {
1728
1745
  None: 0,
1729
1746
  Letter: 1,
1730
1747
  Word: 2,
1731
1748
  Line: 4,
1732
1749
  Paragraph: 8,
1733
1750
  Emoji: 16
1734
- }, rn = [
1751
+ }, sn = [
1735
1752
  {
1736
- flag: v.Letter,
1753
+ flag: E.Letter,
1737
1754
  hints: [
1738
1755
  "[data-motion-letter]",
1739
1756
  "[data-letter]",
@@ -1742,7 +1759,7 @@ const v = {
1742
1759
  ]
1743
1760
  },
1744
1761
  {
1745
- flag: v.Word,
1762
+ flag: E.Word,
1746
1763
  hints: [
1747
1764
  "[data-motion-word]",
1748
1765
  "[data-word]",
@@ -1751,7 +1768,7 @@ const v = {
1751
1768
  ]
1752
1769
  },
1753
1770
  {
1754
- flag: v.Line,
1771
+ flag: E.Line,
1755
1772
  hints: [
1756
1773
  "[data-motion-line]",
1757
1774
  "[data-line]",
@@ -1760,7 +1777,7 @@ const v = {
1760
1777
  ]
1761
1778
  },
1762
1779
  {
1763
- flag: v.Paragraph,
1780
+ flag: E.Paragraph,
1764
1781
  hints: [
1765
1782
  "[data-motion-paragraph]",
1766
1783
  "[data-paragraph]",
@@ -1771,7 +1788,7 @@ const v = {
1771
1788
  ]
1772
1789
  },
1773
1790
  {
1774
- flag: v.Emoji,
1791
+ flag: E.Emoji,
1775
1792
  hints: [
1776
1793
  ":is([data-motion-emoji],[data-emoji],.tw-motion-emoji,.tw-emoji)",
1777
1794
  "[data-motion-emoji]",
@@ -1780,38 +1797,38 @@ const v = {
1780
1797
  "[data-emoji]"
1781
1798
  ]
1782
1799
  }
1783
- ], Le = v.Letter | v.Word | v.Line | v.Paragraph | v.Emoji, nn = v.Letter | v.Word | v.Line | v.Paragraph, ot = /* @__PURE__ */ new Map(), on = 16384;
1784
- function eo(t, e) {
1785
- if (!t || t.length > on)
1800
+ ], Ue = E.Letter | E.Word | E.Line | E.Paragraph | E.Emoji, an = E.Letter | E.Word | E.Line | E.Paragraph, st = /* @__PURE__ */ new Map(), cn = 16384;
1801
+ function io(t, e) {
1802
+ if (!t || t.length > cn)
1786
1803
  return t;
1787
- const r = Rn(e), n = re(r, v.Emoji), o = r & nn;
1788
- if (o === v.None && !n)
1804
+ const r = Tn(e), n = re(r, E.Emoji), o = r & an;
1805
+ if (o === E.None && !n)
1789
1806
  return t;
1790
1807
  const s = t.replace(/\r\n/g, `
1791
1808
  `).replace(/\r/g, `
1792
1809
  `);
1793
- if (o === v.None)
1794
- return ct(s);
1795
- const i = wn(s);
1810
+ if (o === E.None)
1811
+ return ut(s);
1812
+ const i = Rn(s);
1796
1813
  if (i.length === 0)
1797
- return n ? ct(s) : t;
1798
- const a = vn(i), c = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, f = [];
1799
- for (const l of a) {
1800
- const h = sn(l, r, c);
1801
- f.push(...h);
1814
+ return n ? ut(s) : t;
1815
+ const a = An(i), c = { letter: 0, word: 0, line: 0, paragraph: 0, br: 0, emoji: 0 }, f = [];
1816
+ for (const d of a) {
1817
+ const m = un(d, r, c);
1818
+ f.push(...m);
1802
1819
  }
1803
1820
  return f;
1804
1821
  }
1805
- function sn(t, e, r) {
1822
+ function un(t, e, r) {
1806
1823
  const n = [];
1807
1824
  for (const o of t) {
1808
- const s = an(o, e, r);
1825
+ const s = ln(o, e, r);
1809
1826
  n.push(...s);
1810
1827
  }
1811
- if (re(e, v.Paragraph)) {
1828
+ if (re(e, E.Paragraph)) {
1812
1829
  const o = r.paragraph++;
1813
1830
  return [
1814
- /* @__PURE__ */ E.jsx(
1831
+ /* @__PURE__ */ A.jsx(
1815
1832
  "span",
1816
1833
  {
1817
1834
  "data-motion-paragraph": !0,
@@ -1824,70 +1841,70 @@ function sn(t, e, r) {
1824
1841
  }
1825
1842
  return n;
1826
1843
  }
1827
- function an(t, e, r) {
1828
- const n = cn(t.text, e, r), o = [];
1829
- if (re(e, v.Line)) {
1844
+ function ln(t, e, r) {
1845
+ const n = dn(t.text, e, r), o = [];
1846
+ if (re(e, E.Line)) {
1830
1847
  const s = r.line++;
1831
1848
  o.push(
1832
- /* @__PURE__ */ E.jsx("span", { "data-motion-line": !0, style: ve(s), children: n }, `motion-line-${s}`)
1849
+ /* @__PURE__ */ A.jsx("span", { "data-motion-line": !0, style: ve(s), children: n }, `motion-line-${s}`)
1833
1850
  );
1834
1851
  } else
1835
1852
  o.push(...n);
1836
1853
  for (let s = 0; s < t.breaks; s++)
1837
- o.push(/* @__PURE__ */ E.jsx("br", {}, `motion-break-${r.br++}`));
1854
+ o.push(/* @__PURE__ */ A.jsx("br", {}, `motion-break-${r.br++}`));
1838
1855
  return o;
1839
1856
  }
1840
- function cn(t, e, r) {
1857
+ function dn(t, e, r) {
1841
1858
  if (!t)
1842
1859
  return [];
1843
- const n = re(e, v.Word), o = [], s = /(\s+)/g;
1860
+ const n = re(e, E.Word), o = [], s = /(\s+)/g;
1844
1861
  let i = 0, a;
1845
1862
  for (; (a = s.exec(t)) !== null; ) {
1846
1863
  if (a.index > i) {
1847
1864
  const c = t.slice(i, a.index);
1848
- o.push(st(c, r, e, n));
1865
+ o.push(it(c, r, e, n));
1849
1866
  }
1850
1867
  o.push(a[0]), i = a.index + a[0].length;
1851
1868
  }
1852
1869
  if (i < t.length) {
1853
1870
  const c = t.slice(i);
1854
- o.push(st(c, r, e, n));
1871
+ o.push(it(c, r, e, n));
1855
1872
  }
1856
1873
  return o;
1857
1874
  }
1858
- function st(t, e, r, n) {
1859
- const o = e.word++, s = ln(t, r, e), i = `motion-word-${o}`, a = un(o, n);
1860
- return n ? /* @__PURE__ */ E.jsx("span", { "data-motion-word": !0, style: a, children: s }, i) : /* @__PURE__ */ E.jsx("span", { style: a, children: s }, i);
1875
+ function it(t, e, r, n) {
1876
+ const o = e.word++, s = hn(t, r, e), i = `motion-word-${o}`, a = fn(o, n);
1877
+ return n ? /* @__PURE__ */ A.jsx("span", { "data-motion-word": !0, style: a, children: s }, i) : /* @__PURE__ */ A.jsx("span", { style: a, children: s }, i);
1861
1878
  }
1862
- function un(t, e) {
1879
+ function fn(t, e) {
1863
1880
  return e ? { ...ve(t), whiteSpace: "nowrap" } : { whiteSpace: "nowrap" };
1864
1881
  }
1865
- function ln(t, e, r) {
1882
+ function hn(t, e, r) {
1866
1883
  if (!t)
1867
1884
  return [];
1868
- const n = re(e, v.Letter), o = re(e, v.Emoji);
1885
+ const n = re(e, E.Letter), o = re(e, E.Emoji);
1869
1886
  if (!n) {
1870
1887
  if (!o)
1871
1888
  return [t];
1872
1889
  const a = xe(t);
1873
1890
  if (a.length === 0)
1874
1891
  return [t];
1875
- const { nodes: c } = pt(a, r);
1892
+ const { nodes: c } = gt(a, r);
1876
1893
  return c;
1877
1894
  }
1878
1895
  const s = [], i = xe(t);
1879
1896
  for (const a of i) {
1880
- const c = r.letter++, f = `motion-letter-${c}`, l = ve(c);
1897
+ const c = r.letter++, f = `motion-letter-${c}`, d = ve(c);
1881
1898
  if (a === `
1882
1899
  `) {
1883
1900
  s.push(
1884
- /* @__PURE__ */ E.jsx("span", { "data-motion-letter": !0, style: l, children: /* @__PURE__ */ E.jsx("br", {}) }, f)
1901
+ /* @__PURE__ */ A.jsx("span", { "data-motion-letter": !0, style: d, children: /* @__PURE__ */ A.jsx("br", {}) }, f)
1885
1902
  );
1886
1903
  continue;
1887
1904
  }
1888
- const d = o && mt(a) ? { "data-motion-emoji": !0 } : void 0, y = a === " " ? " " : a;
1905
+ const l = o && pt(a) ? { "data-motion-emoji": !0 } : void 0, h = a === " " ? " " : a;
1889
1906
  s.push(
1890
- /* @__PURE__ */ E.jsx("span", { "data-motion-letter": !0, style: l, ...d, children: y }, f)
1907
+ /* @__PURE__ */ A.jsx("span", { "data-motion-letter": !0, style: d, ...l, children: h }, f)
1891
1908
  );
1892
1909
  }
1893
1910
  return s;
@@ -1895,45 +1912,45 @@ function ln(t, e, r) {
1895
1912
  function xe(t) {
1896
1913
  if (!t)
1897
1914
  return [];
1898
- const e = dn();
1899
- return e ? Array.from(e.segment(t), (r) => r.segment) : fn(t);
1915
+ const e = mn();
1916
+ return e ? Array.from(e.segment(t), (r) => r.segment) : pn(t);
1900
1917
  }
1901
1918
  let le;
1902
- function dn() {
1919
+ function mn() {
1903
1920
  return le !== void 0 || (typeof Intl < "u" && typeof Intl.Segmenter == "function" ? le = new Intl.Segmenter(void 0, { granularity: "grapheme" }) : le = null), le;
1904
1921
  }
1905
- function fn(t) {
1922
+ function pn(t) {
1906
1923
  const e = [], r = Array.from(t);
1907
1924
  let n = "";
1908
1925
  for (let o = 0; o < r.length; o++) {
1909
1926
  const s = r[o], i = r[o + 1];
1910
- n += s, !(i && hn(s, i)) && (e.push(n), n = "");
1927
+ n += s, !(i && gn(s, i)) && (e.push(n), n = "");
1911
1928
  }
1912
1929
  return n && e.push(n), e;
1913
1930
  }
1914
- function hn(t, e) {
1915
- return e ? !!(it(t) || it(e) || gn(e) || mn(e) || pn(e) || at(t) && at(e)) : !1;
1931
+ function gn(t, e) {
1932
+ return e ? !!(at(t) || at(e) || bn(e) || yn(e) || Sn(e) || ct(t) && ct(e)) : !1;
1916
1933
  }
1917
- function it(t) {
1934
+ function at(t) {
1918
1935
  return t.codePointAt(0) === 8205;
1919
1936
  }
1920
- function mn(t) {
1937
+ function yn(t) {
1921
1938
  const e = t.codePointAt(0);
1922
1939
  return e === void 0 ? !1 : e >= 65024 && e <= 65039 || e >= 917760 && e <= 917999;
1923
1940
  }
1924
- function pn(t) {
1941
+ function Sn(t) {
1925
1942
  const e = t.codePointAt(0);
1926
1943
  return e === void 0 ? !1 : e >= 127995 && e <= 127999;
1927
1944
  }
1928
- function at(t) {
1945
+ function ct(t) {
1929
1946
  const e = t.codePointAt(0);
1930
1947
  return e === void 0 ? !1 : e >= 127462 && e <= 127487;
1931
1948
  }
1932
- let Te;
1933
- function gn(t) {
1934
- return t ? (Te || (Te = yn()), Te(t)) : !1;
1949
+ let ke;
1950
+ function bn(t) {
1951
+ return t ? (ke || (ke = wn()), ke(t)) : !1;
1935
1952
  }
1936
- function yn() {
1953
+ function wn() {
1937
1954
  try {
1938
1955
  const t = new RegExp("\\p{Mark}", "u");
1939
1956
  return (e) => t.test(e);
@@ -1945,18 +1962,18 @@ function yn() {
1945
1962
  }
1946
1963
  }
1947
1964
  let Ce;
1948
- function mt(t) {
1949
- return t ? (Ce || (Ce = Sn()), Ce(t)) : !1;
1965
+ function pt(t) {
1966
+ return t ? (Ce || (Ce = vn()), Ce(t)) : !1;
1950
1967
  }
1951
- function Sn() {
1968
+ function vn() {
1952
1969
  try {
1953
1970
  const t = new RegExp("\\p{Extended_Pictographic}", "u");
1954
1971
  return (e) => t.test(e);
1955
1972
  } catch {
1956
- return bn;
1973
+ return En;
1957
1974
  }
1958
1975
  }
1959
- function bn(t) {
1976
+ function En(t) {
1960
1977
  if (!t)
1961
1978
  return !1;
1962
1979
  for (const e of Array.from(t)) {
@@ -1966,7 +1983,7 @@ function bn(t) {
1966
1983
  }
1967
1984
  return !1;
1968
1985
  }
1969
- function wn(t) {
1986
+ function Rn(t) {
1970
1987
  const e = [];
1971
1988
  let r = "", n = 0;
1972
1989
  for (let o = 0; o < t.length; o++) {
@@ -1980,7 +1997,7 @@ function wn(t) {
1980
1997
  }
1981
1998
  return (n > 0 || r.length > 0) && e.push({ text: r, breaks: n }), e;
1982
1999
  }
1983
- function vn(t) {
2000
+ function An(t) {
1984
2001
  if (t.length === 0)
1985
2002
  return [];
1986
2003
  const e = [];
@@ -2009,27 +2026,27 @@ function ve(t) {
2009
2026
  WebkitTextFillColor: "inherit"
2010
2027
  };
2011
2028
  }
2012
- function ct(t) {
2029
+ function ut(t) {
2013
2030
  if (!t)
2014
2031
  return t;
2015
2032
  const e = xe(t);
2016
2033
  if (e.length === 0)
2017
2034
  return t;
2018
- const { nodes: r, sawEmoji: n } = pt(e);
2035
+ const { nodes: r, sawEmoji: n } = gt(e);
2019
2036
  return n ? r.length === 1 ? r[0] ?? t : r : t;
2020
2037
  }
2021
- function pt(t, e) {
2038
+ function gt(t, e) {
2022
2039
  const r = [];
2023
2040
  let n = "", o = !1, s = e?.emoji ?? 0;
2024
2041
  const i = () => {
2025
2042
  n && (r.push(n), n = "");
2026
2043
  };
2027
2044
  for (const a of t) {
2028
- if (mt(a)) {
2045
+ if (pt(a)) {
2029
2046
  o = !0, i();
2030
2047
  const f = `motion-emoji-${e ? e.emoji++ : s++}`;
2031
2048
  r.push(
2032
- /* @__PURE__ */ E.jsx("span", { "data-motion-emoji": !0, children: a }, f)
2049
+ /* @__PURE__ */ A.jsx("span", { "data-motion-emoji": !0, children: a }, f)
2033
2050
  );
2034
2051
  continue;
2035
2052
  }
@@ -2037,24 +2054,24 @@ function pt(t, e) {
2037
2054
  }
2038
2055
  return i(), o ? { nodes: r, sawEmoji: !0 } : { nodes: [t.join("")], sawEmoji: !1 };
2039
2056
  }
2040
- function Rn(t) {
2057
+ function Tn(t) {
2041
2058
  if (!t)
2042
- return v.None;
2059
+ return E.None;
2043
2060
  const e = t.trim();
2044
2061
  if (!e)
2045
- return v.None;
2046
- const r = ot.get(e);
2062
+ return E.None;
2063
+ const r = st.get(e);
2047
2064
  if (typeof r == "number")
2048
2065
  return r;
2049
2066
  if (typeof document > "u")
2050
- return v.None;
2067
+ return E.None;
2051
2068
  const n = e.split(/\s+/).filter(Boolean);
2052
2069
  if (n.length === 0)
2053
- return v.None;
2054
- const s = n.map((c) => `.${En(c)}`).map(
2055
- (c) => new RegExp(`(^|[^a-zA-Z0-9_-])${An(c)}(?![a-zA-Z0-9_-])`)
2070
+ return E.None;
2071
+ const s = n.map((c) => `.${kn(c)}`).map(
2072
+ (c) => new RegExp(`(^|[^a-zA-Z0-9_-])${Cn(c)}(?![a-zA-Z0-9_-])`)
2056
2073
  );
2057
- let i = v.None, a = !1;
2074
+ let i = E.None, a = !1;
2058
2075
  for (const c of Array.from(document.styleSheets)) {
2059
2076
  let f;
2060
2077
  try {
@@ -2062,17 +2079,17 @@ function Rn(t) {
2062
2079
  } catch {
2063
2080
  continue;
2064
2081
  }
2065
- const l = gt(f, s);
2066
- if (l.mask && (i |= l.mask, i === Le))
2082
+ const d = yt(f, s);
2083
+ if (d.mask && (i |= d.mask, i === Ue))
2067
2084
  break;
2068
- a ||= l.sawStyleRule;
2085
+ a ||= d.sawStyleRule;
2069
2086
  }
2070
- return (i !== v.None || a) && ot.set(e, i), i;
2087
+ return (i !== E.None || a) && st.set(e, i), i;
2071
2088
  }
2072
- function gt(t, e) {
2089
+ function yt(t, e) {
2073
2090
  if (!t)
2074
- return { mask: v.None, sawStyleRule: !1 };
2075
- let r = v.None, n = !1;
2091
+ return { mask: E.None, sawStyleRule: !1 };
2092
+ let r = E.None, n = !1;
2076
2093
  for (let o = 0; o < t.length; o++) {
2077
2094
  const s = t[o];
2078
2095
  if (s) {
@@ -2080,13 +2097,13 @@ function gt(t, e) {
2080
2097
  const a = s.selectorText ?? "";
2081
2098
  if (!a || !e.some((f) => f.test(a))) continue;
2082
2099
  n = !0;
2083
- for (const f of rn)
2084
- f.hints.some((l) => a.includes(l)) && (r |= f.flag);
2085
- if (r === Le)
2100
+ for (const f of sn)
2101
+ f.hints.some((d) => a.includes(d)) && (r |= f.flag);
2102
+ if (r === Ue)
2086
2103
  return { mask: r, sawStyleRule: !0 };
2087
2104
  } else if ("cssRules" in s) {
2088
- const i = gt(s.cssRules, e);
2089
- if (i.mask && (r |= i.mask, r === Le))
2105
+ const i = yt(s.cssRules, e);
2106
+ if (i.mask && (r |= i.mask, r === Ue))
2090
2107
  return { mask: r, sawStyleRule: !0 };
2091
2108
  n ||= i.sawStyleRule;
2092
2109
  }
@@ -2094,31 +2111,31 @@ function gt(t, e) {
2094
2111
  }
2095
2112
  return { mask: r, sawStyleRule: n };
2096
2113
  }
2097
- function En(t) {
2114
+ function kn(t) {
2098
2115
  return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(t) : t.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
2099
2116
  }
2100
- function An(t) {
2117
+ function Cn(t) {
2101
2118
  return t.replace(/[.*+?^${}()|[\]\\]/g, (e) => `\\${e}`);
2102
2119
  }
2103
- const Ve = "ikon_auth_session", kn = 7 * 24 * 60 * 60 * 1e3;
2104
- function Re(t) {
2120
+ const Ve = "ikon_auth_session", In = 7 * 24 * 60 * 60 * 1e3;
2121
+ function Ee(t) {
2105
2122
  try {
2106
2123
  localStorage.setItem(Ve, JSON.stringify(t));
2107
2124
  } catch {
2108
2125
  console.warn("Failed to save auth session to localStorage");
2109
2126
  }
2110
2127
  }
2111
- function yt() {
2128
+ function St() {
2112
2129
  try {
2113
2130
  const t = localStorage.getItem(Ve);
2114
2131
  if (!t) return null;
2115
2132
  const e = JSON.parse(t);
2116
- return Date.now() - e.authenticatedAt > kn ? (St(), null) : e;
2133
+ return Date.now() - e.authenticatedAt > In ? (bt(), null) : e;
2117
2134
  } catch {
2118
2135
  return console.warn("Failed to load auth session from localStorage"), null;
2119
2136
  }
2120
2137
  }
2121
- function St() {
2138
+ function bt() {
2122
2139
  try {
2123
2140
  localStorage.removeItem(Ve);
2124
2141
  } catch {
@@ -2133,8 +2150,8 @@ function de(t) {
2133
2150
  authenticatedAt: t.authenticatedAt
2134
2151
  };
2135
2152
  }
2136
- async function bt(t, e) {
2137
- const r = pe(), n = await fetch(`${e}/anonymous`, {
2153
+ async function wt(t, e) {
2154
+ const r = ge(), n = await fetch(`${e}/anonymous`, {
2138
2155
  method: "POST",
2139
2156
  headers: { "Content-Type": "application/json" },
2140
2157
  body: JSON.stringify({ deviceId: r, space: t })
@@ -2148,9 +2165,9 @@ async function bt(t, e) {
2148
2165
  provider: "anonymous",
2149
2166
  authenticatedAt: Date.now()
2150
2167
  };
2151
- return Re(s), s;
2168
+ return Ee(s), s;
2152
2169
  }
2153
- async function to(t) {
2170
+ async function ao(t) {
2154
2171
  const { email: e, spaceId: r, authUrl: n, returnUrl: o = window.location.origin + window.location.pathname } = t, s = await fetch(`${n}/email/send`, {
2155
2172
  method: "POST",
2156
2173
  headers: { "Content-Type": "application/json" },
@@ -2165,22 +2182,22 @@ async function to(t) {
2165
2182
  throw new Error(i);
2166
2183
  }
2167
2184
  }
2168
- function Tn() {
2185
+ function On() {
2169
2186
  const t = new URLSearchParams(window.location.search), e = t.get("ikon_token"), r = t.get("ikon_provider");
2170
2187
  return e && r ? { token: e, provider: r } : null;
2171
2188
  }
2172
- function Cn() {
2189
+ function _n() {
2173
2190
  const e = new URLSearchParams(window.location.search).get("error");
2174
2191
  return e ? decodeURIComponent(e) : null;
2175
2192
  }
2176
- function ut() {
2193
+ function lt() {
2177
2194
  window.history.replaceState({}, "", window.location.pathname);
2178
2195
  }
2179
- function In(t, e, r, n) {
2196
+ function Nn(t, e, r, n) {
2180
2197
  const o = n ?? window.location.origin + window.location.pathname + window.location.search;
2181
2198
  return `${r}/oauth/${t}?space=${encodeURIComponent(e)}&return=${encodeURIComponent(o)}`;
2182
2199
  }
2183
- async function On(t) {
2200
+ async function Pn(t) {
2184
2201
  const e = await fetch(`${t}/passkey/registration/options`, {
2185
2202
  method: "POST",
2186
2203
  headers: { "Content-Type": "application/json" }
@@ -2191,7 +2208,7 @@ async function On(t) {
2191
2208
  }
2192
2209
  return e.json();
2193
2210
  }
2194
- async function Nn(t, e, r) {
2211
+ async function Mn(t, e, r) {
2195
2212
  const n = await fetch(`${t}/passkey/registration/verify`, {
2196
2213
  method: "POST",
2197
2214
  headers: { "Content-Type": "application/json" },
@@ -2206,9 +2223,9 @@ async function Nn(t, e, r) {
2206
2223
  provider: "passkey",
2207
2224
  authenticatedAt: Date.now()
2208
2225
  };
2209
- return Re(s), s;
2226
+ return Ee(s), s;
2210
2227
  }
2211
- async function _n(t, e) {
2228
+ async function jn(t, e) {
2212
2229
  const r = await fetch(`${t}/passkey/authentication/options`, {
2213
2230
  method: "POST",
2214
2231
  headers: { "Content-Type": "application/json" },
@@ -2220,7 +2237,7 @@ async function _n(t, e) {
2220
2237
  }
2221
2238
  return r.json();
2222
2239
  }
2223
- async function Pn(t, e) {
2240
+ async function Ln(t, e) {
2224
2241
  const r = await fetch(`${t}/passkey/authentication/verify`, {
2225
2242
  method: "POST",
2226
2243
  headers: { "Content-Type": "application/json" },
@@ -2235,7 +2252,7 @@ async function Pn(t, e) {
2235
2252
  provider: "passkey",
2236
2253
  authenticatedAt: Date.now()
2237
2254
  };
2238
- return Re(o), o;
2255
+ return Ee(o), o;
2239
2256
  }
2240
2257
  function W(t) {
2241
2258
  const e = new Uint8Array(t);
@@ -2244,23 +2261,23 @@ function W(t) {
2244
2261
  r += String.fromCharCode(o);
2245
2262
  return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
2246
2263
  }
2247
- function Se(t) {
2264
+ function be(t) {
2248
2265
  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);
2249
2266
  for (let a = 0; a < o.length; a++)
2250
2267
  i[a] = o.charCodeAt(a);
2251
2268
  return s;
2252
2269
  }
2253
2270
  function Ke() {
2254
- return jn.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
2271
+ return Un.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
2255
2272
  }
2256
- const jn = {
2273
+ const Un = {
2257
2274
  stubThis: (t) => t
2258
2275
  };
2259
- function wt(t) {
2276
+ function vt(t) {
2260
2277
  const { id: e } = t;
2261
2278
  return {
2262
2279
  ...t,
2263
- id: Se(e),
2280
+ id: be(e),
2264
2281
  /**
2265
2282
  * `descriptor.transports` is an array of our `AuthenticatorTransportFuture` that includes newer
2266
2283
  * transports that TypeScript's DOM lib is ignorant of. Convince TS that our list of transports
@@ -2269,13 +2286,13 @@ function wt(t) {
2269
2286
  transports: t.transports
2270
2287
  };
2271
2288
  }
2272
- function vt(t) {
2289
+ function Et(t) {
2273
2290
  return (
2274
2291
  // Consider localhost valid as well since it's okay wrt Secure Contexts
2275
2292
  t === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)
2276
2293
  );
2277
2294
  }
2278
- class _ extends Error {
2295
+ class M extends Error {
2279
2296
  constructor({ message: e, code: r, cause: n, name: o }) {
2280
2297
  super(e, { cause: n }), Object.defineProperty(this, "code", {
2281
2298
  enumerable: !0,
@@ -2285,20 +2302,20 @@ class _ extends Error {
2285
2302
  }), this.name = o ?? n.name, this.code = r;
2286
2303
  }
2287
2304
  }
2288
- function Mn({ error: t, options: e }) {
2305
+ function xn({ error: t, options: e }) {
2289
2306
  const { publicKey: r } = e;
2290
2307
  if (!r)
2291
2308
  throw Error("options was missing required publicKey property");
2292
2309
  if (t.name === "AbortError") {
2293
2310
  if (e.signal instanceof AbortSignal)
2294
- return new _({
2311
+ return new M({
2295
2312
  message: "Registration ceremony was sent an abort signal",
2296
2313
  code: "ERROR_CEREMONY_ABORTED",
2297
2314
  cause: t
2298
2315
  });
2299
2316
  } else if (t.name === "ConstraintError") {
2300
2317
  if (r.authenticatorSelection?.requireResidentKey === !0)
2301
- return new _({
2318
+ return new M({
2302
2319
  message: "Discoverable credentials were required but no available authenticator supported it",
2303
2320
  code: "ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",
2304
2321
  cause: t
@@ -2307,63 +2324,63 @@ function Mn({ error: t, options: e }) {
2307
2324
  // @ts-ignore: `mediation` doesn't yet exist on CredentialCreationOptions but it's possible as of Sept 2024
2308
2325
  e.mediation === "conditional" && r.authenticatorSelection?.userVerification === "required"
2309
2326
  )
2310
- return new _({
2327
+ return new M({
2311
2328
  message: "User verification was required during automatic registration but it could not be performed",
2312
2329
  code: "ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",
2313
2330
  cause: t
2314
2331
  });
2315
2332
  if (r.authenticatorSelection?.userVerification === "required")
2316
- return new _({
2333
+ return new M({
2317
2334
  message: "User verification was required but no available authenticator supported it",
2318
2335
  code: "ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",
2319
2336
  cause: t
2320
2337
  });
2321
2338
  } else {
2322
2339
  if (t.name === "InvalidStateError")
2323
- return new _({
2340
+ return new M({
2324
2341
  message: "The authenticator was previously registered",
2325
2342
  code: "ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",
2326
2343
  cause: t
2327
2344
  });
2328
2345
  if (t.name === "NotAllowedError")
2329
- return new _({
2346
+ return new M({
2330
2347
  message: t.message,
2331
2348
  code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
2332
2349
  cause: t
2333
2350
  });
2334
2351
  if (t.name === "NotSupportedError")
2335
- return r.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new _({
2352
+ return r.pubKeyCredParams.filter((o) => o.type === "public-key").length === 0 ? new M({
2336
2353
  message: 'No entry in pubKeyCredParams was of type "public-key"',
2337
2354
  code: "ERROR_MALFORMED_PUBKEYCREDPARAMS",
2338
2355
  cause: t
2339
- }) : new _({
2356
+ }) : new M({
2340
2357
  message: "No available authenticator supported any of the specified pubKeyCredParams algorithms",
2341
2358
  code: "ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",
2342
2359
  cause: t
2343
2360
  });
2344
2361
  if (t.name === "SecurityError") {
2345
2362
  const n = globalThis.location.hostname;
2346
- if (vt(n)) {
2363
+ if (Et(n)) {
2347
2364
  if (r.rp.id !== n)
2348
- return new _({
2365
+ return new M({
2349
2366
  message: `The RP ID "${r.rp.id}" is invalid for this domain`,
2350
2367
  code: "ERROR_INVALID_RP_ID",
2351
2368
  cause: t
2352
2369
  });
2353
- } else return new _({
2370
+ } else return new M({
2354
2371
  message: `${globalThis.location.hostname} is an invalid domain`,
2355
2372
  code: "ERROR_INVALID_DOMAIN",
2356
2373
  cause: t
2357
2374
  });
2358
2375
  } else if (t.name === "TypeError") {
2359
2376
  if (r.user.id.byteLength < 1 || r.user.id.byteLength > 64)
2360
- return new _({
2377
+ return new M({
2361
2378
  message: "User ID was not between 1 and 64 characters",
2362
2379
  code: "ERROR_INVALID_USER_ID_LENGTH",
2363
2380
  cause: t
2364
2381
  });
2365
2382
  } else if (t.name === "UnknownError")
2366
- return new _({
2383
+ return new M({
2367
2384
  message: "The authenticator was unable to process the specified options, or could not create a new credential",
2368
2385
  code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
2369
2386
  cause: t
@@ -2371,7 +2388,7 @@ function Mn({ error: t, options: e }) {
2371
2388
  }
2372
2389
  return t;
2373
2390
  }
2374
- class Un {
2391
+ class Dn {
2375
2392
  constructor() {
2376
2393
  Object.defineProperty(this, "controller", {
2377
2394
  enumerable: !0,
@@ -2395,56 +2412,56 @@ class Un {
2395
2412
  }
2396
2413
  }
2397
2414
  }
2398
- const Rt = new Un(), Ln = ["cross-platform", "platform"];
2399
- function Et(t) {
2400
- if (t && !(Ln.indexOf(t) < 0))
2415
+ const Rt = new Dn(), Fn = ["cross-platform", "platform"];
2416
+ function At(t) {
2417
+ if (t && !(Fn.indexOf(t) < 0))
2401
2418
  return t;
2402
2419
  }
2403
- async function xn(t) {
2420
+ async function Bn(t) {
2404
2421
  !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 });
2405
2422
  const { optionsJSON: e, useAutoRegister: r = !1 } = t;
2406
2423
  if (!Ke())
2407
2424
  throw new Error("WebAuthn is not supported in this browser");
2408
2425
  const n = {
2409
2426
  ...e,
2410
- challenge: Se(e.challenge),
2427
+ challenge: be(e.challenge),
2411
2428
  user: {
2412
2429
  ...e.user,
2413
- id: Se(e.user.id)
2430
+ id: be(e.user.id)
2414
2431
  },
2415
- excludeCredentials: e.excludeCredentials?.map(wt)
2432
+ excludeCredentials: e.excludeCredentials?.map(vt)
2416
2433
  }, o = {};
2417
2434
  r && (o.mediation = "conditional"), o.publicKey = n, o.signal = Rt.createNewAbortSignal();
2418
2435
  let s;
2419
2436
  try {
2420
2437
  s = await navigator.credentials.create(o);
2421
2438
  } catch (S) {
2422
- throw Mn({ error: S, options: o });
2439
+ throw xn({ error: S, options: o });
2423
2440
  }
2424
2441
  if (!s)
2425
2442
  throw new Error("Registration was not completed");
2426
2443
  const { id: i, rawId: a, response: c, type: f } = s;
2427
- let l;
2428
- typeof c.getTransports == "function" && (l = c.getTransports());
2429
- let h;
2444
+ let d;
2445
+ typeof c.getTransports == "function" && (d = c.getTransports());
2446
+ let m;
2430
2447
  if (typeof c.getPublicKeyAlgorithm == "function")
2431
2448
  try {
2432
- h = c.getPublicKeyAlgorithm();
2449
+ m = c.getPublicKeyAlgorithm();
2433
2450
  } catch (S) {
2434
2451
  Ie("getPublicKeyAlgorithm()", S);
2435
2452
  }
2436
- let d;
2453
+ let l;
2437
2454
  if (typeof c.getPublicKey == "function")
2438
2455
  try {
2439
2456
  const S = c.getPublicKey();
2440
- S !== null && (d = W(S));
2457
+ S !== null && (l = W(S));
2441
2458
  } catch (S) {
2442
2459
  Ie("getPublicKey()", S);
2443
2460
  }
2444
- let y;
2461
+ let h;
2445
2462
  if (typeof c.getAuthenticatorData == "function")
2446
2463
  try {
2447
- y = W(c.getAuthenticatorData());
2464
+ h = W(c.getAuthenticatorData());
2448
2465
  } catch (S) {
2449
2466
  Ie("getAuthenticatorData()", S);
2450
2467
  }
@@ -2454,21 +2471,21 @@ async function xn(t) {
2454
2471
  response: {
2455
2472
  attestationObject: W(c.attestationObject),
2456
2473
  clientDataJSON: W(c.clientDataJSON),
2457
- transports: l,
2458
- publicKeyAlgorithm: h,
2459
- publicKey: d,
2460
- authenticatorData: y
2474
+ transports: d,
2475
+ publicKeyAlgorithm: m,
2476
+ publicKey: l,
2477
+ authenticatorData: h
2461
2478
  },
2462
2479
  type: f,
2463
2480
  clientExtensionResults: s.getClientExtensionResults(),
2464
- authenticatorAttachment: Et(s.authenticatorAttachment)
2481
+ authenticatorAttachment: At(s.authenticatorAttachment)
2465
2482
  };
2466
2483
  }
2467
2484
  function Ie(t, e) {
2468
2485
  console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${t}. You should report this error to them.
2469
2486
  `, e);
2470
2487
  }
2471
- function Dn() {
2488
+ function $n() {
2472
2489
  if (!Ke())
2473
2490
  return Oe.stubThis(new Promise((e) => e(!1)));
2474
2491
  const t = globalThis.PublicKeyCredential;
@@ -2477,40 +2494,40 @@ function Dn() {
2477
2494
  const Oe = {
2478
2495
  stubThis: (t) => t
2479
2496
  };
2480
- function Fn({ error: t, options: e }) {
2497
+ function Vn({ error: t, options: e }) {
2481
2498
  const { publicKey: r } = e;
2482
2499
  if (!r)
2483
2500
  throw Error("options was missing required publicKey property");
2484
2501
  if (t.name === "AbortError") {
2485
2502
  if (e.signal instanceof AbortSignal)
2486
- return new _({
2503
+ return new M({
2487
2504
  message: "Authentication ceremony was sent an abort signal",
2488
2505
  code: "ERROR_CEREMONY_ABORTED",
2489
2506
  cause: t
2490
2507
  });
2491
2508
  } else {
2492
2509
  if (t.name === "NotAllowedError")
2493
- return new _({
2510
+ return new M({
2494
2511
  message: t.message,
2495
2512
  code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
2496
2513
  cause: t
2497
2514
  });
2498
2515
  if (t.name === "SecurityError") {
2499
2516
  const n = globalThis.location.hostname;
2500
- if (vt(n)) {
2517
+ if (Et(n)) {
2501
2518
  if (r.rpId !== n)
2502
- return new _({
2519
+ return new M({
2503
2520
  message: `The RP ID "${r.rpId}" is invalid for this domain`,
2504
2521
  code: "ERROR_INVALID_RP_ID",
2505
2522
  cause: t
2506
2523
  });
2507
- } else return new _({
2524
+ } else return new M({
2508
2525
  message: `${globalThis.location.hostname} is an invalid domain`,
2509
2526
  code: "ERROR_INVALID_DOMAIN",
2510
2527
  cause: t
2511
2528
  });
2512
2529
  } else if (t.name === "UnknownError")
2513
- return new _({
2530
+ return new M({
2514
2531
  message: "The authenticator was unable to process the specified options, or could not create a new assertion signature",
2515
2532
  code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
2516
2533
  cause: t
@@ -2518,20 +2535,20 @@ function Fn({ error: t, options: e }) {
2518
2535
  }
2519
2536
  return t;
2520
2537
  }
2521
- async function $n(t) {
2538
+ async function Kn(t) {
2522
2539
  !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 });
2523
2540
  const { optionsJSON: e, useBrowserAutofill: r = !1, verifyBrowserAutofillInput: n = !0 } = t;
2524
2541
  if (!Ke())
2525
2542
  throw new Error("WebAuthn is not supported in this browser");
2526
2543
  let o;
2527
- e.allowCredentials?.length !== 0 && (o = e.allowCredentials?.map(wt));
2544
+ e.allowCredentials?.length !== 0 && (o = e.allowCredentials?.map(vt));
2528
2545
  const s = {
2529
2546
  ...e,
2530
- challenge: Se(e.challenge),
2547
+ challenge: be(e.challenge),
2531
2548
  allowCredentials: o
2532
2549
  }, i = {};
2533
2550
  if (r) {
2534
- if (!await Dn())
2551
+ if (!await $n())
2535
2552
  throw Error("Browser does not support WebAuthn autofill");
2536
2553
  if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1 && n)
2537
2554
  throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
@@ -2541,68 +2558,68 @@ async function $n(t) {
2541
2558
  let a;
2542
2559
  try {
2543
2560
  a = await navigator.credentials.get(i);
2544
- } catch (y) {
2545
- throw Fn({ error: y, options: i });
2561
+ } catch (h) {
2562
+ throw Vn({ error: h, options: i });
2546
2563
  }
2547
2564
  if (!a)
2548
2565
  throw new Error("Authentication was not completed");
2549
- const { id: c, rawId: f, response: l, type: h } = a;
2550
- let d;
2551
- return l.userHandle && (d = W(l.userHandle)), {
2566
+ const { id: c, rawId: f, response: d, type: m } = a;
2567
+ let l;
2568
+ return d.userHandle && (l = W(d.userHandle)), {
2552
2569
  id: c,
2553
2570
  rawId: W(f),
2554
2571
  response: {
2555
- authenticatorData: W(l.authenticatorData),
2556
- clientDataJSON: W(l.clientDataJSON),
2557
- signature: W(l.signature),
2558
- userHandle: d
2572
+ authenticatorData: W(d.authenticatorData),
2573
+ clientDataJSON: W(d.clientDataJSON),
2574
+ signature: W(d.signature),
2575
+ userHandle: l
2559
2576
  },
2560
- type: h,
2577
+ type: m,
2561
2578
  clientExtensionResults: a.getClientExtensionResults(),
2562
- authenticatorAttachment: Et(a.authenticatorAttachment)
2579
+ authenticatorAttachment: At(a.authenticatorAttachment)
2563
2580
  };
2564
2581
  }
2565
- const ze = lt(null);
2566
- function ro({ children: t, config: e }) {
2567
- const [r, n] = ee({
2582
+ const Ye = dt(null);
2583
+ function co({ children: t, config: e }) {
2584
+ const [r, n] = X({
2568
2585
  isAuthenticated: !1,
2569
2586
  isLoading: !0,
2570
2587
  user: null,
2571
2588
  error: null
2572
2589
  });
2573
- F(() => {
2590
+ x(() => {
2574
2591
  (() => {
2575
- const l = Cn();
2576
- if (l) {
2577
- ut(), n({
2592
+ const d = _n();
2593
+ if (d) {
2594
+ lt(), n({
2578
2595
  isAuthenticated: !1,
2579
2596
  isLoading: !1,
2580
2597
  user: null,
2581
- error: l
2598
+ error: d
2582
2599
  });
2583
2600
  return;
2584
2601
  }
2585
- const h = Tn();
2586
- if (h) {
2587
- const y = {
2588
- token: h.token,
2589
- provider: h.provider,
2602
+ const m = On();
2603
+ if (m) {
2604
+ const h = {
2605
+ token: m.token,
2606
+ provider: m.provider,
2590
2607
  authenticatedAt: Date.now()
2591
2608
  };
2592
- Re(y), ut(), n({
2609
+ Ee(h), lt(), n({
2593
2610
  isAuthenticated: !0,
2594
2611
  isLoading: !1,
2595
- user: de(y),
2612
+ user: de(h),
2596
2613
  error: null
2597
2614
  });
2598
2615
  return;
2599
2616
  }
2600
- const d = yt();
2601
- if (d) {
2617
+ const l = St();
2618
+ if (l) {
2602
2619
  n({
2603
2620
  isAuthenticated: !0,
2604
2621
  isLoading: !1,
2605
- user: de(d),
2622
+ user: de(l),
2606
2623
  error: null
2607
2624
  });
2608
2625
  return;
@@ -2615,87 +2632,87 @@ function ro({ children: t, config: e }) {
2615
2632
  });
2616
2633
  })();
2617
2634
  }, []);
2618
- const o = B(
2635
+ const o = $(
2619
2636
  async (f) => {
2620
2637
  if (!e.spaceId) {
2621
- n((d) => ({
2622
- ...d,
2638
+ n((l) => ({
2639
+ ...l,
2623
2640
  error: "Space ID is not configured"
2624
2641
  }));
2625
2642
  return;
2626
2643
  }
2627
- const l = e.authUrl ?? _e();
2644
+ const d = e.authUrl ?? Ne();
2628
2645
  if (f === "guest") {
2629
- n((d) => ({ ...d, isLoading: !0 }));
2646
+ n((l) => ({ ...l, isLoading: !0 }));
2630
2647
  try {
2631
- const d = await bt(e.spaceId, l);
2648
+ const l = await wt(e.spaceId, d);
2632
2649
  n({
2633
2650
  isAuthenticated: !0,
2634
2651
  isLoading: !1,
2635
- user: de(d),
2652
+ user: de(l),
2636
2653
  error: null
2637
2654
  });
2638
- } catch (d) {
2639
- n((y) => ({
2640
- ...y,
2655
+ } catch (l) {
2656
+ n((h) => ({
2657
+ ...h,
2641
2658
  isLoading: !1,
2642
- error: d instanceof Error ? d.message : "Guest login failed"
2659
+ error: l instanceof Error ? l.message : "Guest login failed"
2643
2660
  }));
2644
2661
  }
2645
2662
  return;
2646
2663
  }
2647
2664
  if (f === "passkey") {
2648
- n((d) => ({ ...d, isLoading: !0, error: null }));
2665
+ n((l) => ({ ...l, isLoading: !0, error: null }));
2649
2666
  try {
2650
- const d = await _n(l), y = await $n({ optionsJSON: d }), S = await Pn(l, y);
2667
+ const l = await jn(d), h = await Kn({ optionsJSON: l }), S = await Ln(d, h);
2651
2668
  n({
2652
2669
  isAuthenticated: !0,
2653
2670
  isLoading: !1,
2654
2671
  user: de(S),
2655
2672
  error: null
2656
2673
  });
2657
- } catch (d) {
2658
- n((y) => ({
2659
- ...y,
2674
+ } catch (l) {
2675
+ n((h) => ({
2676
+ ...h,
2660
2677
  isLoading: !1,
2661
- error: d instanceof Error ? d.message : "Passkey login failed"
2678
+ error: l instanceof Error ? l.message : "Passkey login failed"
2662
2679
  }));
2663
2680
  }
2664
2681
  return;
2665
2682
  }
2666
- const h = In(f, e.spaceId, l);
2667
- window.location.href = h;
2683
+ const m = Nn(f, e.spaceId, d);
2684
+ window.location.href = m;
2668
2685
  },
2669
2686
  [e.authUrl, e.spaceId]
2670
- ), s = B(() => {
2671
- St(), n({
2687
+ ), s = $(() => {
2688
+ bt(), n({
2672
2689
  isAuthenticated: !1,
2673
2690
  isLoading: !1,
2674
2691
  user: null,
2675
2692
  error: null
2676
2693
  });
2677
- }, []), i = B(
2694
+ }, []), i = $(
2678
2695
  async (f) => {
2679
- const l = e.authUrl ?? _e();
2680
- n((h) => ({ ...h, isLoading: !0, error: null }));
2696
+ const d = e.authUrl ?? Ne();
2697
+ n((m) => ({ ...m, isLoading: !0, error: null }));
2681
2698
  try {
2682
- const h = await On(l), d = await xn({ optionsJSON: h }), y = await Nn(l, d, f);
2699
+ const m = await Pn(d), l = await Bn({ optionsJSON: m }), h = await Mn(d, l, f);
2683
2700
  n({
2684
2701
  isAuthenticated: !0,
2685
2702
  isLoading: !1,
2686
- user: de(y),
2703
+ user: de(h),
2687
2704
  error: null
2688
2705
  });
2689
- } catch (h) {
2690
- n((d) => ({
2691
- ...d,
2706
+ } catch (m) {
2707
+ n((l) => ({
2708
+ ...l,
2692
2709
  isLoading: !1,
2693
- error: h instanceof Error ? h.message : "Passkey registration failed"
2710
+ error: m instanceof Error ? m.message : "Passkey registration failed"
2694
2711
  }));
2695
2712
  }
2696
2713
  },
2697
2714
  [e.authUrl]
2698
- ), a = B(() => r.user?.token ?? null, [r.user]), c = z(
2715
+ ), a = $(() => r.user?.token ?? null, [r.user]), c = Y(
2699
2716
  () => ({
2700
2717
  state: r,
2701
2718
  login: o,
@@ -2705,20 +2722,20 @@ function ro({ children: t, config: e }) {
2705
2722
  }),
2706
2723
  [r, o, s, a, i]
2707
2724
  );
2708
- return /* @__PURE__ */ E.jsx(ze, { value: c, children: t });
2725
+ return /* @__PURE__ */ A.jsx(Ye, { value: c, children: t });
2709
2726
  }
2710
- function Bn() {
2711
- const t = Fe(ze);
2727
+ function Yn() {
2728
+ const t = Fe(Ye);
2712
2729
  if (!t)
2713
2730
  throw new Error("useAuth must be used within an AuthProvider");
2714
2731
  return t;
2715
2732
  }
2716
- function no() {
2717
- return Fe(ze);
2733
+ function uo() {
2734
+ return Fe(Ye);
2718
2735
  }
2719
- function oo(t) {
2720
- const { config: e, guestUrlParam: r } = t, { state: n, login: o } = Bn(), s = w(!1);
2721
- return F(() => {
2736
+ function lo(t) {
2737
+ const { config: e, guestUrlParam: r } = t, { state: n, login: o } = Yn(), s = v(!1);
2738
+ return x(() => {
2722
2739
  if (!r || n.isAuthenticated || n.isLoading || s.current || !e.methods.includes("guest"))
2723
2740
  return;
2724
2741
  const i = new URLSearchParams(window.location.search), a = i.get(r);
@@ -2734,7 +2751,7 @@ function oo(t) {
2734
2751
  error: n.error
2735
2752
  };
2736
2753
  }
2737
- function so({
2754
+ function fo({
2738
2755
  connectionState: t,
2739
2756
  error: e,
2740
2757
  isReady: r,
@@ -2745,9 +2762,9 @@ function so({
2745
2762
  renderIdle: a,
2746
2763
  renderConnecting: c,
2747
2764
  renderConnectingSlow: f,
2748
- renderConnected: l,
2749
- renderOffline: h,
2750
- renderError: d
2765
+ renderConnected: d,
2766
+ renderOffline: m,
2767
+ renderError: l
2751
2768
  }) {
2752
2769
  switch (t) {
2753
2770
  case "idle":
@@ -2758,7 +2775,7 @@ function so({
2758
2775
  return f();
2759
2776
  case "connected":
2760
2777
  case "reconnecting":
2761
- return !r || !n || !o ? null : l({
2778
+ return !r || !n || !o ? null : d({
2762
2779
  stores: n,
2763
2780
  registry: o,
2764
2781
  client: s,
@@ -2766,230 +2783,271 @@ function so({
2766
2783
  isReconnecting: t === "reconnecting"
2767
2784
  });
2768
2785
  case "offline":
2769
- return h();
2786
+ return m();
2770
2787
  case "offlineError":
2771
- return d(e ?? s?.lastError?.message ?? null);
2788
+ return l(e ?? s?.lastError?.message ?? null);
2772
2789
  default:
2773
2790
  return null;
2774
2791
  }
2775
2792
  }
2776
- const Ne = be("useIkonApp");
2777
- function io(t) {
2778
- const { authConfig: e, localServer: r, modules: n, registerModules: o, onJoined: s, onConnectionStateChange: i, onError: a, updateUrlOnJoin: c = !0, timeouts: f, audio: l, video: h, mediaSession: d, debug: y } = t, S = w(null), b = w(null), m = w(null), p = w(!1), A = w(l), P = w(h), j = w(d), V = w(y), J = w(f), Z = w(i), k = w(a), C = w(s), M = w(c);
2779
- A.current = l, P.current = h, j.current = d, V.current = y, J.current = f, Z.current = i, k.current = a, C.current = s, M.current = c;
2780
- const [I, L] = ee("idle"), [Y, te] = ee(null), [ne, fe] = ee(null), [G, he] = ee(null), [oe, u] = ee(!1), g = z(() => {
2793
+ const _e = we("useIkonApp");
2794
+ function zn() {
2795
+ if (typeof window < "u" && window.__IKON_AUTH_CONFIG__)
2796
+ return window.__IKON_AUTH_CONFIG__;
2797
+ }
2798
+ function Wn() {
2799
+ if (typeof window < "u" && window.__IKON_LOCAL_IKON_SERVER_CONFIG__)
2800
+ return window.__IKON_LOCAL_IKON_SERVER_CONFIG__;
2801
+ }
2802
+ function ho(t) {
2803
+ const { authConfig: e, localServer: r, modules: n, registerModules: o, onJoined: s, onConnectionStateChange: i, onError: a, updateUrlOnJoin: c = !0, timeouts: f, audio: d, video: m, mediaSession: l } = t, h = e === void 0 ? zn() ?? null : e, S = r ?? Wn(), b = v(null), g = v(null), p = v(null), w = v(!1), T = v(d), I = v(m), j = v(l), G = v(f), Q = v(i), k = v(a), O = v(s), L = v(c);
2804
+ T.current = d, I.current = m, j.current = l, G.current = f, Q.current = i, k.current = a, O.current = s, L.current = c;
2805
+ const [_, D] = X("idle"), [z, te] = X(null), [ne, he] = X(null), [H, me] = X(null), [oe, u] = X(!1), y = Y(() => {
2781
2806
  try {
2782
- return Ot();
2807
+ return _t();
2783
2808
  } catch {
2784
2809
  return { parameters: {} };
2785
2810
  }
2786
- }, []), R = z(() => e?.enabled ? yt() : null, [e?.enabled]), T = r?.enabled ?? !1, K = r?.host ?? "localhost", x = r?.httpsPort ?? 8443;
2787
- F(() => {
2788
- !T && Ye() && e && !e.enabled && e.spaceId && !G && !oe && (u(!0), bt(e.spaceId, e.authUrl ?? _e()).then((U) => {
2789
- he(U.token);
2811
+ }, []), R = Y(() => h?.enabled ? St() : null, [h?.enabled]), C = S?.enabled ?? !1, K = S?.host ?? "localhost", F = S?.port ?? 8443;
2812
+ x(() => {
2813
+ !C && ze() && h && !h.enabled && h.spaceId && !H && !oe && (u(!0), wt(h.spaceId, h.authUrl ?? Ne()).then((U) => {
2814
+ me(U.token);
2790
2815
  }).catch((U) => {
2791
- Ne.error("Anonymous auth failed:", U), te(U instanceof Error ? U.message : "Anonymous auth failed");
2816
+ _e.error("Anonymous auth failed:", U), te(U instanceof Error ? U.message : "Anonymous auth failed");
2792
2817
  }).finally(() => {
2793
2818
  u(!1);
2794
2819
  }));
2795
- }, [T, e, G, oe]);
2796
- const Q = z(() => {
2797
- if (T) {
2798
- const N = R?.token ? Nt(R.token) ?? pe() : pe();
2820
+ }, [C, h, H, oe]);
2821
+ const ee = Y(() => {
2822
+ if (C) {
2823
+ const P = R?.token ? Nt(R.token) ?? ge() : ge();
2799
2824
  return {
2800
2825
  local: {
2801
2826
  host: K,
2802
- httpsPort: x,
2803
- userId: N,
2804
- parameters: g.parameters
2827
+ httpsPort: F,
2828
+ userId: P,
2829
+ parameters: y.parameters
2805
2830
  }
2806
2831
  };
2807
2832
  }
2808
- return R?.token && e?.spaceId ? {
2833
+ return R?.token && h?.spaceId ? {
2809
2834
  sessionToken: {
2810
2835
  token: R.token,
2811
- spaceId: e.spaceId,
2836
+ spaceId: h.spaceId,
2812
2837
  backendType: We(),
2813
- sessionId: g.sessionId,
2814
- channelKey: g.channelKey,
2815
- parameters: g.parameters
2838
+ sessionId: y.sessionId,
2839
+ channelKey: y.channelKey,
2840
+ parameters: y.parameters
2816
2841
  }
2817
- } : G && e?.spaceId ? {
2842
+ } : H && h?.spaceId ? {
2818
2843
  sessionToken: {
2819
- token: G,
2820
- spaceId: e.spaceId,
2844
+ token: H,
2845
+ spaceId: h.spaceId,
2821
2846
  backendType: We(),
2822
- sessionId: g.sessionId,
2823
- channelKey: g.channelKey,
2824
- parameters: g.parameters
2847
+ sessionId: y.sessionId,
2848
+ channelKey: y.channelKey,
2849
+ parameters: y.parameters
2825
2850
  }
2826
- } : Ye() ? null : {
2851
+ } : ze() ? null : {
2827
2852
  local: {
2828
2853
  host: K,
2829
- httpsPort: x,
2830
- userId: pe(),
2831
- parameters: g.parameters
2854
+ httpsPort: F,
2855
+ userId: ge(),
2856
+ parameters: y.parameters
2832
2857
  }
2833
2858
  };
2834
- }, [T, K, x, R?.token, e?.spaceId, G, g.sessionId, g.channelKey, g.parameters]);
2835
- Ur(ne);
2836
- const se = xr(ne);
2837
- F(() => {
2838
- if (!p.current) {
2839
- if (p.current = !0, m.current = Cr(), n)
2840
- for (const N of n)
2841
- N(m.current);
2842
- o?.(m.current), m.current.loadRegisteredModules().catch((N) => {
2843
- Ne.error("Failed to load UI modules", N);
2859
+ }, [C, K, F, R?.token, h?.spaceId, H, y.sessionId, y.channelKey, y.parameters]);
2860
+ Dr(ne);
2861
+ const se = Br(ne);
2862
+ x(() => {
2863
+ if (!w.current) {
2864
+ if (w.current = !0, p.current = _r(), n)
2865
+ for (const P of n)
2866
+ P(p.current);
2867
+ o?.(p.current), p.current.loadRegisteredModules().catch((P) => {
2868
+ _e.error("Failed to load UI modules", P);
2844
2869
  });
2845
2870
  }
2846
- }, []), F(() => {
2847
- if (!Q) return;
2848
- const N = new _t({
2849
- ...Q,
2850
- debug: V.current,
2851
- timeouts: J.current,
2852
- audio: A.current,
2853
- video: P.current,
2871
+ }, []), x(() => {
2872
+ if (!ee) return;
2873
+ const P = new Pt({
2874
+ ...ee,
2875
+ timeouts: G.current,
2876
+ audio: T.current,
2877
+ video: I.current,
2854
2878
  mediaSession: j.current,
2855
- onConnectionStateChange: ($) => {
2856
- L($), Z.current?.($);
2879
+ onConnectionStateChange: (V) => {
2880
+ D(V), Q.current?.(V);
2857
2881
  },
2858
- onError: ($) => {
2859
- te($.message), k.current?.($);
2882
+ onError: (V) => {
2883
+ te(V.message), k.current?.(V);
2860
2884
  },
2861
2885
  onJoined: () => {
2862
- const $ = N.globalState?.SessionId;
2863
- M.current && $ && window.history.replaceState(null, "", `/s/${$}${window.location.search}`), C.current?.($);
2886
+ const V = P.globalState?.SessionId;
2887
+ L.current && V && window.history.replaceState(null, "", `/s/${V}${window.location.search}`), O.current?.(V);
2864
2888
  }
2865
2889
  });
2866
- S.current = N;
2867
- const U = new qt({ client: N });
2868
- return b.current = U, fe(U), N.connect().catch(($) => {
2869
- Ne.error("Connection failed:", $);
2890
+ b.current = P;
2891
+ const U = new Jt({ client: P });
2892
+ return g.current = U, he(U), P.connect().catch((V) => {
2893
+ _e.error("Connection failed:", V);
2870
2894
  }), () => {
2871
- N.disconnect(), S.current = null, U.dispose(), b.current = null;
2895
+ P.disconnect(), b.current = null, U.dispose(), g.current = null;
2872
2896
  };
2873
- }, [Q]);
2874
- const O = B((N, U) => {
2875
- const $ = typeof U == "string" ? U : JSON.stringify(U ?? {});
2876
- S.current?.sendActionCall(N, $);
2877
- }, []), H = I === "connected" || I === "reconnecting";
2897
+ }, [ee]);
2898
+ const N = $((P, U) => {
2899
+ const V = typeof U == "string" ? U : JSON.stringify(U ?? {});
2900
+ b.current?.sendActionCall(P, V);
2901
+ }, []), J = _ === "connected" || _ === "reconnecting";
2878
2902
  return {
2879
- connectionState: I,
2880
- error: Y,
2903
+ connectionState: _,
2904
+ error: z,
2881
2905
  stores: se,
2882
- client: S.current,
2883
- registry: m.current,
2884
- clientRef: S,
2885
- uiRef: b,
2886
- registryRef: m,
2887
- onAction: O,
2888
- isReady: H
2906
+ client: b.current,
2907
+ registry: p.current,
2908
+ clientRef: b,
2909
+ uiRef: g,
2910
+ registryRef: p,
2911
+ onAction: N,
2912
+ isReady: J
2889
2913
  };
2890
2914
  }
2891
- function ao(t) {
2892
- const e = w(!1);
2893
- return B(() => {
2915
+ function mo(t) {
2916
+ const e = v(!1);
2917
+ return $(() => {
2894
2918
  if (e.current) return;
2895
2919
  e.current = !0;
2896
2920
  const r = document.createElement("link");
2897
2921
  r.rel = "stylesheet", r.href = t, document.head.appendChild(r);
2898
2922
  }, [t]);
2899
2923
  }
2900
- const At = lt(null);
2901
- function Vn(t, e) {
2924
+ let qn = 0;
2925
+ function po(t = 5, e = 5e3) {
2926
+ const [r, n] = X([]), o = v(/* @__PURE__ */ new Map()), s = $((i) => {
2927
+ const a = o.current.get(i);
2928
+ a && (clearTimeout(a), o.current.delete(i)), n((c) => c.filter((f) => f.id !== i));
2929
+ }, []);
2930
+ return x(() => {
2931
+ const i = o.current, a = Mt(
2932
+ (c) => {
2933
+ if (!jt())
2934
+ return;
2935
+ const f = `toast-${++qn}`, d = c.level === qe.ERROR ? "error" : "warn", m = {
2936
+ id: f,
2937
+ level: d,
2938
+ message: c.message,
2939
+ component: c.component
2940
+ };
2941
+ n((h) => [...h, m].slice(-t));
2942
+ const l = setTimeout(() => {
2943
+ s(f);
2944
+ }, e);
2945
+ i.set(f, l);
2946
+ },
2947
+ { minLevel: qe.WARN }
2948
+ );
2949
+ return () => {
2950
+ a();
2951
+ for (const c of i.values())
2952
+ clearTimeout(c);
2953
+ i.clear();
2954
+ };
2955
+ }, [t, e, s]), { toasts: r, dismissToast: s };
2956
+ }
2957
+ const Tt = dt(null);
2958
+ function Gn(t, e) {
2902
2959
  return e ? t.replace(/\{(\w+)\}/g, (r, n) => e[n] ?? `{${n}}`) : t;
2903
2960
  }
2904
- function Kn(t, e) {
2961
+ function Hn(t, e) {
2905
2962
  const n = new URLSearchParams(window.location.search).get("lang");
2906
2963
  if (n && t.includes(n))
2907
2964
  return n;
2908
2965
  const o = navigator.language.split("-")[0];
2909
2966
  return t.includes(o) ? o : e && t.includes(e) ? e : "en";
2910
2967
  }
2911
- function zn(t, e, r) {
2912
- return e ? Kn(t, r) : r && t.includes(r) ? r : "en";
2968
+ function Jn(t, e, r) {
2969
+ return e ? Hn(t, r) : r && t.includes(r) ? r : "en";
2913
2970
  }
2914
- function co({
2971
+ function go({
2915
2972
  children: t,
2916
2973
  translations: e,
2917
2974
  defaultLanguage: r,
2918
2975
  detectLanguage: n = !1
2919
2976
  }) {
2920
- const o = Object.keys(e), s = zn(o, n, r), i = e[s] ?? e.en, a = z(
2977
+ const o = Object.keys(e), s = Jn(o, n, r), i = e[s] ?? e.en, a = Y(
2921
2978
  () => ({
2922
2979
  t: (c, f) => {
2923
- const l = i[c];
2924
- return Vn(l, f);
2980
+ const d = i[c];
2981
+ return Gn(d, f);
2925
2982
  },
2926
2983
  locale: s,
2927
2984
  translations: i
2928
2985
  }),
2929
2986
  [i, s]
2930
2987
  );
2931
- return /* @__PURE__ */ E.jsx(At, { value: a, children: t });
2988
+ return /* @__PURE__ */ A.jsx(Tt, { value: a, children: t });
2932
2989
  }
2933
- function uo() {
2934
- const t = Fe(At);
2990
+ function yo() {
2991
+ const t = Fe(Tt);
2935
2992
  if (!t)
2936
2993
  throw new Error("useI18n must be used within an I18nProvider");
2937
2994
  return t;
2938
2995
  }
2939
2996
  export {
2940
- ro as AuthProvider,
2941
- so as ConnectionStateRenderer,
2942
- co as I18nProvider,
2943
- er as IKON_UI_BASE_MODULE,
2944
- cr as IKON_UI_MEDIA_MODULE,
2945
- Er as IKON_UI_SHADER_MODULE,
2946
- vr as IKON_UI_SHADER_TYPE,
2947
- je as IKON_UI_STREAM_CATEGORY,
2948
- nr as IKON_UI_VIDEO_CANVAS_TYPE,
2949
- or as IKON_UI_VIDEO_URL_PLAYER_TYPE,
2950
- qt as IkonUi,
2951
- Tr as IkonUiRegistry,
2952
- Hn as IkonUiSurface,
2953
- Yt as UiComponentRegistry,
2954
- zt as UiRenderer,
2955
- ho as UiStreamStore,
2956
- Xn as areIkonUiModuleListsEqual,
2957
- bt as authenticateAnonymous,
2958
- In as buildOAuthRedirectUrl,
2959
- St as clearAuthSession,
2960
- ut as clearOAuthParams,
2961
- Qt as createBaseResolvers,
2962
- Jn as createComponentLibrary,
2963
- Cr as createIkonUiRegistry,
2964
- ir as createMediaResolvers,
2965
- Rr as createShaderRendererResolver,
2966
- Wt as isIkonUiCategoryMatch,
2967
- yt as loadAuthSession,
2968
- tr as loadBaseModule,
2969
- ur as loadMediaModule,
2970
- Ar as loadShaderModule,
2971
- en as normalizeIkonUiModuleList,
2972
- Qn as parseIkonUiInitPayload,
2973
- Tn as parseOAuthCallback,
2974
- Cn as parseOAuthError,
2975
- tn as readIkonUiModules,
2976
- Zn as readIkonUiModulesFromSources,
2977
- rr as registerBaseModule,
2978
- lr as registerMediaModule,
2979
- kr as registerShaderModule,
2980
- Vt as renderChildren,
2981
- eo as renderMotionLetters,
2982
- Re as saveAuthSession,
2983
- to as sendMagicLink,
2997
+ co as AuthProvider,
2998
+ fo as ConnectionStateRenderer,
2999
+ go as I18nProvider,
3000
+ nr as IKON_UI_BASE_MODULE,
3001
+ dr as IKON_UI_MEDIA_MODULE,
3002
+ kr as IKON_UI_SHADER_MODULE,
3003
+ Ar as IKON_UI_SHADER_TYPE,
3004
+ Me as IKON_UI_STREAM_CATEGORY,
3005
+ ir as IKON_UI_VIDEO_CANVAS_TYPE,
3006
+ ar as IKON_UI_VIDEO_URL_PLAYER_TYPE,
3007
+ Jt as IkonUi,
3008
+ Or as IkonUiRegistry,
3009
+ ro as IkonUiSurface,
3010
+ Gt as UiComponentRegistry,
3011
+ qt as UiRenderer,
3012
+ wo as UiStreamStore,
3013
+ no as areIkonUiModuleListsEqual,
3014
+ wt as authenticateAnonymous,
3015
+ Nn as buildOAuthRedirectUrl,
3016
+ bt as clearAuthSession,
3017
+ lt as clearOAuthParams,
3018
+ rr as createBaseResolvers,
3019
+ eo as createComponentLibrary,
3020
+ _r as createIkonUiRegistry,
3021
+ ur as createMediaResolvers,
3022
+ Tr as createShaderRendererResolver,
3023
+ Ht as isIkonUiCategoryMatch,
3024
+ St as loadAuthSession,
3025
+ or as loadBaseModule,
3026
+ fr as loadMediaModule,
3027
+ Cr as loadShaderModule,
3028
+ nn as normalizeIkonUiModuleList,
3029
+ so as parseIkonUiInitPayload,
3030
+ On as parseOAuthCallback,
3031
+ _n as parseOAuthError,
3032
+ on as readIkonUiModules,
3033
+ oo as readIkonUiModulesFromSources,
3034
+ sr as registerBaseModule,
3035
+ hr as registerMediaModule,
3036
+ Ir as registerShaderModule,
3037
+ zt as renderChildren,
3038
+ io as renderMotionLetters,
3039
+ Ee as saveAuthSession,
3040
+ ao as sendMagicLink,
2984
3041
  de as sessionToUser,
2985
- Bn as useAuth,
2986
- oo as useAuthGuard,
2987
- no as useAuthOptional,
2988
- uo as useI18n,
2989
- io as useIkonApp,
2990
- Ur as useIkonStyles,
2991
- xr as useIkonUiStores,
2992
- ao as useLazyFont,
2993
- X as useUiNode,
2994
- Gn as useUiStore
3042
+ Yn as useAuth,
3043
+ lo as useAuthGuard,
3044
+ uo as useAuthOptional,
3045
+ yo as useI18n,
3046
+ ho as useIkonApp,
3047
+ Dr as useIkonStyles,
3048
+ Br as useIkonUiStores,
3049
+ mo as useLazyFont,
3050
+ po as useToasts,
3051
+ Z as useUiNode,
3052
+ to as useUiStore
2995
3053
  };