@vincentt-xr/sdk 2.0.0-alpha.20 → 2.0.0-alpha.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/components.json +1 -1
  2. package/dist/{CanonicalHeadFrame-CQe2YX9a.js → CanonicalHeadFrame-S3Jk9F1P.js} +15 -15
  3. package/dist/{DebuggerUI-CKYrYmod.js → DebuggerUI-B8bheFk-.js} +1 -1
  4. package/dist/{FaceRetouch-l7y4oZBu.js → FaceRetouch-DW_9g5EA.js} +4 -4
  5. package/dist/{bodyMaskMaterial-BOdSJUEM.js → bodyMaskMaterial-CUlzyXnJ.js} +1 -1
  6. package/dist/cache-CsH3zPDX.js +307 -0
  7. package/dist/cache-DrEDi7qn.cjs +1 -0
  8. package/dist/components/Button/index.d.ts +1 -1
  9. package/dist/components/FaceSwap/settings.d.ts +1 -1
  10. package/dist/components/Light/index.d.ts +1 -1
  11. package/dist/components/Model/index.d.ts +1 -1
  12. package/dist/components/Object3D/index.d.ts +1 -1
  13. package/dist/components/PaintedFace/index.d.ts +1 -1
  14. package/dist/components/ScreenText/liveEditable.d.ts +1 -1
  15. package/dist/{contexts-Cl-4dUOI.js → contexts-C_l5hzI8.js} +52 -52
  16. package/dist/debug-ui/media-source.js +1 -1
  17. package/dist/debug-ui.cjs +1 -1
  18. package/dist/debug-ui.js +11 -11
  19. package/dist/{drawNormalizedCrop-D606u5-F.js → drawNormalizedCrop-D48Layv4.js} +14 -14
  20. package/dist/editor-defs/live.d.ts +18 -0
  21. package/dist/editor-defs/live.generated.d.ts +2 -0
  22. package/dist/face-effects.cjs +31 -31
  23. package/dist/face-effects.js +1287 -1287
  24. package/dist/{getFaceInfo-Mt44zlej.js → getFaceInfo-e9XzHPLC.js} +1 -1
  25. package/dist/{index-CicO_Tnw.js → index-B34w-TyW.js} +1 -1
  26. package/dist/{index-D5NbXaCn.js → index-B9ph9k5I.js} +4 -4
  27. package/dist/{index-Bn72laBn.js → index-BKZPBg1D.js} +1 -1
  28. package/dist/{index-CM3jkleV.js → index-DCjFgbB8.js} +12 -10
  29. package/dist/{index-fDwL47CM.cjs → index-DSMv6GWI.cjs} +1 -1
  30. package/dist/{index-CbBCl2ZU.js → index-Dk1UOe-H.js} +10 -10
  31. package/dist/{index-BDxJWWyy.js → index-MzlPbe9t.js} +9 -9
  32. package/dist/{index-B0EYdofX.js → index-em1AaMkI.js} +1 -1
  33. package/dist/instructions.js +7 -7
  34. package/dist/{internal-BoFDq5hC.js → internal-kwJxojDs.js} +3 -3
  35. package/dist/internal.js +2 -2
  36. package/dist/{landmarks-C3LvDhMt.js → landmarks-BgLF-yfd.js} +6 -6
  37. package/dist/low-level.js +17 -17
  38. package/dist/main.cjs +1 -1
  39. package/dist/main.js +770 -762
  40. package/dist/particles.js +5 -5
  41. package/dist/product.js +2 -2
  42. package/dist/{providers-Bxt_MfPK.js → providers-Bo1gfoXg.js} +3 -3
  43. package/dist/{renderGroups-uYPzUa66.js → renderGroups-Cul4eOG8.js} +1 -1
  44. package/dist/{renderPasses-C0wu5Cwg.js → renderPasses-CLOTeP38.js} +40 -40
  45. package/dist/scene-object.js +2 -2
  46. package/dist/{segmentation-DccvYBBO.js → segmentation-Q1eXSt_x.js} +1 -1
  47. package/dist/{selectors-J06V0eDb.js → selectors-CiawE6Ox.js} +4 -4
  48. package/dist/{session-CYiWfcvz.js → session-CmpigDxI.js} +9 -9
  49. package/dist/tracking.js +127 -127
  50. package/dist/{trigger-CQviD4xp.js → trigger-BHKfnvtB.js} +7 -7
  51. package/dist/{useBodies-DOuwRuew.js → useBodies-DzRzQg88.js} +7 -7
  52. package/dist/{useFaceInfo-XUGYTdfN.js → useFaceInfo-DUxqnPek.js} +10 -10
  53. package/dist/{useFaceResultReader-D8wXbF1L.js → useFaceResultReader-DSnUjQcw.js} +1 -1
  54. package/dist/{useIrisTracking-B0uLWgNE.js → useIrisTracking-Bfp1Fv66.js} +10 -10
  55. package/dist/{useXRCapabilities-DPUOvpdf.js → useXRCapabilities-BhN_CKwJ.js} +1 -1
  56. package/dist/utils/useEditOverrides.d.ts +4 -0
  57. package/dist/utils/useLiveProps.d.ts +8 -0
  58. package/package.json +1 -1
  59. package/settings.json +1 -1
  60. package/dist/cache-DFqZYsHC.cjs +0 -1
  61. package/dist/cache-Mu-VO_6E.js +0 -212
package/dist/main.js CHANGED
@@ -1,61 +1,61 @@
1
- var Be = Object.defineProperty;
2
- var $e = (e, t, r) => t in e ? Be(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
1
+ var He = Object.defineProperty;
2
+ var $e = (e, t, r) => t in e ? He(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var D = (e, t, r) => $e(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { j as _, J as Xe, u as He, as as Ke, at as je, au as Ve, av as Ze, aw as Ye, ax as Je } from "./index-BDxJWWyy.js";
5
- import { b8 as bs, az as Rs, b9 as As, M as Fs, P as Cs, L as xs, w as _s, ay as ks, ba as vs, b5 as ws, b6 as Ds, aA as Ps, c as Us, z as Ns, y as Ls, d as Is, k as Os, aR as Gs, aS as zs, aT as qs, aU as Ws, n as Bs, aV as $s, i as Xs, aB as Hs, O as Ks, aW as js, aC as Vs, aD as Zs, aX as Ys, aY as Js, b3 as Qs, p as ea, A as ta, b7 as ra, r as sa, K as aa, a3 as na, aI as oa, aZ as ia, aJ as ca, aK as la, aL as ua, aH as da, aM as ma, aN as fa, aE as pa, aO as ha, a_ as ga, b4 as ya, aP as Sa, a$ as Ta, t as Ma, aF as Ea, aG as ba, b0 as Ra, b1 as Aa, aQ as Fa, b2 as Ca } from "./index-BDxJWWyy.js";
6
- import { S as Qe } from "./contexts-Cl-4dUOI.js";
7
- import { X as _a } from "./contexts-Cl-4dUOI.js";
8
- import { S as va, T as wa } from "./TextLabel-fEF1o3wE.js";
9
- import { jsxs as O, jsx as y, Fragment as ne } from "react/jsx-runtime";
10
- import { useRef as A, useMemo as z, useEffect as x, useState as k, Suspense as et, useCallback as F, forwardRef as tt, useImperativeHandle as rt, useContext as st, createContext as at, useId as nt, useSyncExternalStore as ot } from "react";
11
- import * as de from "three";
12
- import { MathUtils as it, Vector2 as ct, Vector3 as lt, DoubleSide as se, RepeatWrapping as Ee, LinearFilter as be } from "three";
13
- import { D as Pa, H as Ua, G as Na, E as La, J as Ia, K as Oa, P as Ga, S as za, C as qa, I as Wa, L as Ba, M as $a, F as Xa, B as Ha } from "./index-D5NbXaCn.js";
14
- import { useThree as ut, useFrame as Pe } from "@react-three/fiber";
15
- import { R as dt } from "./uv-DJU_XfmN.js";
16
- import { c as Ue, b as mt } from "./selectors-J06V0eDb.js";
17
- import { u as ft, a as pt, s as ht, F as gt } from "./drawNormalizedCrop-D606u5-F.js";
18
- import { d as ja, b as Va, r as Za } from "./drawNormalizedCrop-D606u5-F.js";
19
- import { S as yt, c as St, D as L, L as Tt } from "./index-CM3jkleV.js";
20
- import { d as Ja, R as Qa, a as en, e as tn, b as rn, f as sn } from "./index-CM3jkleV.js";
21
- import { g as Mt } from "./Scenes-icIQpHtV.js";
22
- import { a as nn, b as on, u as cn } from "./Scenes-icIQpHtV.js";
23
- import { useTexture as Et } from "@react-three/drei";
24
- import { a as bt } from "./context-DTxSQvp4.js";
25
- import { j as K, T as Rt } from "./renderPasses-C0wu5Cwg.js";
26
- import { k as un, D as dn, E as mn, M as fn, h as pn, S as hn, l as gn, g as yn, n as Sn, r as Tn } from "./renderPasses-C0wu5Cwg.js";
27
- import { D as Re, M as At } from "./index-Bn72laBn.js";
28
- import { c as En, n as bn } from "./index-Bn72laBn.js";
29
- import { M as An } from "./index-CbBCl2ZU.js";
30
- import { u as Cn } from "./useXRCapabilities-DPUOvpdf.js";
31
- import { g as Ne } from "./cache-Mu-VO_6E.js";
32
- import { D as _n, X as kn, c as vn, u as wn } from "./cache-Mu-VO_6E.js";
33
- import { a as Ft } from "./segmentation-DccvYBBO.js";
34
- import { d as Pn, b as Un, e as Nn, f as Ln, g as In, h as On, i as Gn } from "./segmentation-DccvYBBO.js";
35
- const J = (e, t, r, s) => it.damp(e, t, Math.max(0, r), Math.max(0, s)), Or = (e, t, r, s, a = new ct()) => a.set(
36
- J(e.x, t.x, r, s),
37
- J(e.y, t.y, r, s)
38
- ), Gr = (e, t, r, s, a = new lt()) => a.set(
39
- J(e.x, t.x, r, s),
40
- J(e.y, t.y, r, s),
41
- J(e.z, t.z, r, s)
42
- ), Ct = "rgba(20,40,110,0.88)", xt = 24, _t = 512;
43
- function zr({
4
+ import { f as k, J as Xe, u as Ke, as as je, at as Ve, au as Ze, av as Ye, aw as Je, ax as Qe } from "./index-MzlPbe9t.js";
5
+ import { b8 as As, az as Rs, b9 as Fs, M as xs, P as Cs, L as _s, w as ks, ay as vs, ba as ws, b5 as Ds, b6 as Us, aA as Ns, c as Ps, z as Ls, y as Is, d as Os, g as Gs, aR as zs, aS as qs, aT as Ws, aU as Bs, n as Hs, aV as $s, i as Xs, aB as Ks, O as js, aW as Vs, aC as Zs, aD as Ys, aX as Js, aY as Qs, b3 as ea, p as ta, A as ra, b7 as sa, r as aa, K as na, a3 as oa, aI as ia, aZ as ca, aJ as la, aK as ua, aL as da, aH as ma, aM as fa, aN as pa, aE as ha, aO as ga, a_ as ya, b4 as Sa, aP as Ta, a$ as Ma, t as Ea, aF as ba, aG as Aa, b0 as Ra, b1 as Fa, aQ as xa, b2 as Ca } from "./index-MzlPbe9t.js";
6
+ import { S as et } from "./contexts-C_l5hzI8.js";
7
+ import { X as ka } from "./contexts-C_l5hzI8.js";
8
+ import { S as wa, T as Da } from "./TextLabel-fEF1o3wE.js";
9
+ import { jsxs as z, jsx as S, Fragment as ne } from "react/jsx-runtime";
10
+ import { useRef as R, useMemo as W, useEffect as x, useState as v, Suspense as tt, useCallback as F, forwardRef as rt, useImperativeHandle as st, useContext as at, createContext as nt, useId as ot, useSyncExternalStore as it } from "react";
11
+ import * as me from "three";
12
+ import { MathUtils as ct, Vector2 as lt, Vector3 as ut, DoubleSide as se, RepeatWrapping as be, LinearFilter as Ae } from "three";
13
+ import { D as Na, H as Pa, G as La, E as Ia, J as Oa, K as Ga, P as za, S as qa, C as Wa, I as Ba, L as Ha, M as $a, F as Xa, B as Ka } from "./index-B9ph9k5I.js";
14
+ import { useThree as dt, useFrame as Ne } from "@react-three/fiber";
15
+ import { R as mt } from "./uv-DJU_XfmN.js";
16
+ import { c as Pe, u as ft } from "./selectors-CiawE6Ox.js";
17
+ import { u as pt, a as ht, s as gt, F as yt } from "./drawNormalizedCrop-D48Layv4.js";
18
+ import { d as Va, b as Za, r as Ya } from "./drawNormalizedCrop-D48Layv4.js";
19
+ import { S as St, c as Tt, D as O, L as Mt } from "./index-DCjFgbB8.js";
20
+ import { d as Qa, R as en, a as tn, e as rn, b as sn, f as an } from "./index-DCjFgbB8.js";
21
+ import { g as Et } from "./Scenes-icIQpHtV.js";
22
+ import { a as on, b as cn, u as ln } from "./Scenes-icIQpHtV.js";
23
+ import { useTexture as bt } from "@react-three/drei";
24
+ import { a as At } from "./context-DTxSQvp4.js";
25
+ import { j as V, T as Rt } from "./renderPasses-CLOTeP38.js";
26
+ import { k as dn, D as mn, E as fn, M as pn, h as hn, S as gn, l as yn, g as Sn, n as Tn, r as Mn } from "./renderPasses-CLOTeP38.js";
27
+ import { D as Re, M as Ft } from "./index-BKZPBg1D.js";
28
+ import { c as bn, n as An } from "./index-BKZPBg1D.js";
29
+ import { u as ie, g as Le } from "./cache-CsH3zPDX.js";
30
+ import { D as Fn, X as xn, c as Cn, a as _n } from "./cache-CsH3zPDX.js";
31
+ import { M as vn } from "./index-Dk1UOe-H.js";
32
+ import { u as Dn } from "./useXRCapabilities-BhN_CKwJ.js";
33
+ import { a as xt } from "./segmentation-Q1eXSt_x.js";
34
+ import { d as Nn, b as Pn, e as Ln, f as In, g as On, h as Gn, i as zn } from "./segmentation-Q1eXSt_x.js";
35
+ const ee = (e, t, r, s) => ct.damp(e, t, Math.max(0, r), Math.max(0, s)), Gr = (e, t, r, s, a = new lt()) => a.set(
36
+ ee(e.x, t.x, r, s),
37
+ ee(e.y, t.y, r, s)
38
+ ), zr = (e, t, r, s, a = new ut()) => a.set(
39
+ ee(e.x, t.x, r, s),
40
+ ee(e.y, t.y, r, s),
41
+ ee(e.z, t.z, r, s)
42
+ ), Ct = "rgba(20,40,110,0.88)", _t = 24, kt = 512;
43
+ function qr({
44
44
  color: e = Ct,
45
45
  borderColor: t,
46
46
  borderWidth: r = 0,
47
- borderRadius: s = xt,
48
- resolution: a = _t,
47
+ borderRadius: s = _t,
48
+ resolution: a = kt,
49
49
  aspect: n = 1,
50
50
  opacity: o = 1,
51
51
  name: c,
52
52
  overlay: i = !0,
53
53
  position: l,
54
- rotation: h,
55
- scale: m,
54
+ rotation: p,
55
+ scale: d,
56
56
  visible: f
57
57
  }) {
58
- const u = A(null), d = A(null), g = z(() => kt({
58
+ const m = R(null), u = R(null), g = W(() => vt({
59
59
  width: Math.round(a * Math.max(n, 0.05)),
60
60
  height: Math.round(a),
61
61
  color: e,
@@ -66,30 +66,30 @@ function zr({
66
66
  x(() => () => {
67
67
  g.dispose();
68
68
  }, [g]);
69
- const T = A(null), p = A(o);
70
- return p.current !== o && (p.current = o, T.current = null, d.current && (d.current.opacity = o)), x(() => {
71
- const S = u.current;
72
- if (S)
73
- return S.userData.setOpacity = (E) => {
74
- T.current = E, d.current && (d.current.opacity = E);
69
+ const M = R(null), h = R(o);
70
+ return h.current !== o && (h.current = o, M.current = null, u.current && (u.current.opacity = o)), x(() => {
71
+ const y = m.current;
72
+ if (y)
73
+ return y.userData.setOpacity = (E) => {
74
+ M.current = E, u.current && (u.current.opacity = E);
75
75
  }, () => {
76
- delete S.userData.setOpacity;
76
+ delete y.userData.setOpacity;
77
77
  };
78
- }, []), /* @__PURE__ */ O(
78
+ }, []), /* @__PURE__ */ z(
79
79
  "mesh",
80
80
  {
81
- ref: u,
81
+ ref: m,
82
82
  name: c,
83
83
  position: l,
84
- rotation: h,
85
- scale: m,
84
+ rotation: p,
85
+ scale: d,
86
86
  visible: f,
87
87
  children: [
88
- /* @__PURE__ */ y("planeGeometry", { args: [1, 1] }),
89
- /* @__PURE__ */ y(
88
+ /* @__PURE__ */ S("planeGeometry", { args: [1, 1] }),
89
+ /* @__PURE__ */ S(
90
90
  "meshBasicMaterial",
91
91
  {
92
- ref: d,
92
+ ref: u,
93
93
  map: g,
94
94
  transparent: !0,
95
95
  opacity: o,
@@ -101,44 +101,44 @@ function zr({
101
101
  }
102
102
  );
103
103
  }
104
- function kt(e) {
104
+ function vt(e) {
105
105
  const { width: t, height: r, color: s, borderColor: a, borderWidth: n, borderRadius: o } = e, c = typeof OffscreenCanvas < "u" ? new OffscreenCanvas(t, r) : (() => {
106
- const m = document.createElement("canvas");
107
- return m.width = t, m.height = r, m;
106
+ const d = document.createElement("canvas");
107
+ return d.width = t, d.height = r, d;
108
108
  })(), i = c.getContext("2d");
109
109
  i.clearRect(0, 0, t, r);
110
110
  const l = Math.min(o, Math.min(t, r) / 2);
111
111
  i.beginPath(), i.moveTo(l, 0), i.lineTo(t - l, 0), i.quadraticCurveTo(t, 0, t, l), i.lineTo(t, r - l), i.quadraticCurveTo(t, r, t - l, r), i.lineTo(l, r), i.quadraticCurveTo(0, r, 0, r - l), i.lineTo(0, l), i.quadraticCurveTo(0, 0, l, 0), i.closePath(), i.fillStyle = s, i.fill(), a && n > 0 && (i.lineWidth = n, i.strokeStyle = a, i.stroke());
112
- const h = new de.CanvasTexture(c);
113
- return h.needsUpdate = !0, h;
112
+ const p = new me.CanvasTexture(c);
113
+ return p.needsUpdate = !0, p;
114
114
  }
115
- const qr = ({
115
+ const Wr = ({
116
116
  segmentationMask: e,
117
117
  segmentation: t,
118
118
  invert: r = !1,
119
119
  customBackground: s,
120
- renderOrder: a = dt.BACKGROUND
120
+ renderOrder: a = mt.BACKGROUND
121
121
  }) => {
122
- const { camera: n, size: o } = ut(), c = Ue(), i = mt(_.BACKGROUND_SEGMENTATION), l = t ? i == null ? void 0 : i.backgroundSegmentationMask : void 0, h = A(!1);
122
+ const { camera: n, size: o } = dt(), c = Pe(), i = ft(k.BACKGROUND_SEGMENTATION), l = t ? i == null ? void 0 : i.backgroundSegmentationMask : void 0, p = R(!1);
123
123
  x(() => {
124
124
  if (!t) {
125
- h.current = !1;
125
+ p.current = !1;
126
126
  return;
127
127
  }
128
- i === null && !h.current && (console.warn(
128
+ i === null && !p.current && (console.warn(
129
129
  `[VideoBackground] segmentation="${t}" set but no matching <Segmentation> component is mounted; rendering unmasked.`
130
- ), h.current = !0);
130
+ ), p.current = !0);
131
131
  }, [t, i]);
132
- const m = t ? l : e, f = z(() => {
132
+ const d = t ? l : e, f = W(() => {
133
133
  if (!n.isPerspectiveCamera)
134
134
  return [10, 10];
135
- const u = n, T = (u.position.z || 5) - -1, p = u.fov * Math.PI / 180, S = 2 * Math.tan(p / 2) * T;
136
- return [S * (o.width / o.height), S];
135
+ const m = n, M = (m.position.z || 5) - -1, h = m.fov * Math.PI / 180, y = 2 * Math.tan(h / 2) * M;
136
+ return [y * (o.width / o.height), y];
137
137
  }, [n, o]);
138
- return c ? /* @__PURE__ */ y("group", { position: [0, 0, -1], children: r ? /* @__PURE__ */ O(ne, { children: [
139
- /* @__PURE__ */ O("mesh", { position: [0, 0, -0.01], renderOrder: a - 1, children: [
140
- /* @__PURE__ */ y("planeGeometry", { args: f }),
141
- /* @__PURE__ */ y(
138
+ return c ? /* @__PURE__ */ S("group", { position: [0, 0, -1], children: r ? /* @__PURE__ */ z(ne, { children: [
139
+ /* @__PURE__ */ z("mesh", { position: [0, 0, -0.01], renderOrder: a - 1, children: [
140
+ /* @__PURE__ */ S("planeGeometry", { args: f }),
141
+ /* @__PURE__ */ S(
142
142
  "meshBasicMaterial",
143
143
  {
144
144
  map: c,
@@ -149,14 +149,14 @@ const qr = ({
149
149
  }
150
150
  )
151
151
  ] }),
152
- s && m && /* @__PURE__ */ O("mesh", { position: [0, 0, 0], renderOrder: a, children: [
153
- /* @__PURE__ */ y("planeGeometry", { args: f }),
154
- /* @__PURE__ */ y(
152
+ s && d && /* @__PURE__ */ z("mesh", { position: [0, 0, 0], renderOrder: a, children: [
153
+ /* @__PURE__ */ S("planeGeometry", { args: f }),
154
+ /* @__PURE__ */ S(
155
155
  "meshBasicMaterial",
156
156
  {
157
157
  map: typeof s == "string" ? void 0 : s,
158
158
  color: typeof s == "string" ? s : void 0,
159
- alphaMap: m,
159
+ alphaMap: d,
160
160
  transparent: !1,
161
161
  alphaTest: 0.5,
162
162
  depthTest: !1,
@@ -167,10 +167,10 @@ const qr = ({
167
167
  "inverted-mask"
168
168
  )
169
169
  ] })
170
- ] }) : /* @__PURE__ */ O(ne, { children: [
171
- s && m && /* @__PURE__ */ O("mesh", { position: [0, 0, -0.01], renderOrder: a - 1, children: [
172
- /* @__PURE__ */ y("planeGeometry", { args: f }),
173
- /* @__PURE__ */ y(
170
+ ] }) : /* @__PURE__ */ z(ne, { children: [
171
+ s && d && /* @__PURE__ */ z("mesh", { position: [0, 0, -0.01], renderOrder: a - 1, children: [
172
+ /* @__PURE__ */ S("planeGeometry", { args: f }),
173
+ /* @__PURE__ */ S(
174
174
  "meshBasicMaterial",
175
175
  {
176
176
  map: typeof s == "string" ? void 0 : s,
@@ -182,25 +182,25 @@ const qr = ({
182
182
  }
183
183
  )
184
184
  ] }),
185
- /* @__PURE__ */ O("mesh", { position: [0, 0, 0], renderOrder: a, children: [
186
- /* @__PURE__ */ y("planeGeometry", { args: f }),
187
- /* @__PURE__ */ y(
185
+ /* @__PURE__ */ z("mesh", { position: [0, 0, 0], renderOrder: a, children: [
186
+ /* @__PURE__ */ S("planeGeometry", { args: f }),
187
+ /* @__PURE__ */ S(
188
188
  "meshBasicMaterial",
189
189
  {
190
190
  map: c,
191
- alphaMap: m,
191
+ alphaMap: d,
192
192
  transparent: !1,
193
- alphaTest: m ? 0.5 : void 0,
193
+ alphaTest: d ? 0.5 : void 0,
194
194
  depthTest: !1,
195
195
  depthWrite: !1,
196
196
  toneMapped: !1,
197
197
  side: se
198
198
  },
199
- m ? "with-mask" : "no-mask"
199
+ d ? "with-mask" : "no-mask"
200
200
  )
201
201
  ] })
202
202
  ] }) }) : null;
203
- }, Le = ({
203
+ }, Ie = ({
204
204
  mask: e,
205
205
  status: t,
206
206
  error: r,
@@ -208,50 +208,50 @@ const qr = ({
208
208
  fallback: a = "camera",
209
209
  onStatusChange: n,
210
210
  fit: o = "cover",
211
- anchors: c = gt,
211
+ anchors: c = yt,
212
212
  renderOrder: i = 100,
213
213
  visible: l = !0,
214
- maskFeather: h = 4,
215
- maskErode: m = 0.7,
214
+ maskFeather: p = 4,
215
+ maskErode: d = 0.7,
216
216
  ...f
217
217
  }) => {
218
- const u = Ue();
218
+ const m = Pe();
219
219
  if (x(() => {
220
220
  n == null || n(t, r);
221
- }, [t, r, n]), !u) return null;
222
- const d = t === "ready" && e;
223
- return !d && !ht(t, a) ? null : /* @__PURE__ */ y(
224
- yt,
221
+ }, [t, r, n]), !m) return null;
222
+ const u = t === "ready" && e;
223
+ return !u && !gt(t, a) ? null : /* @__PURE__ */ S(
224
+ St,
225
225
  {
226
226
  ...f,
227
- source: { kind: "texture", texture: u },
227
+ source: { kind: "texture", texture: m },
228
228
  fit: o,
229
229
  anchors: c,
230
230
  renderOrder: i,
231
231
  visible: l,
232
- maskTexture: d ? e : null,
232
+ maskTexture: u ? e : null,
233
233
  maskChannel: "green",
234
234
  maskInvert: s,
235
- maskFeather: h,
236
- maskErode: m
235
+ maskFeather: p,
236
+ maskErode: d
237
237
  }
238
238
  );
239
- }, vt = ({ active: e = !0, ...t }) => {
240
- const { texture: r, status: s, error: a } = pt(e);
241
- return /* @__PURE__ */ y(Le, { ...t, mask: r, status: s, error: a });
242
- }, wt = ({ bodyId: e, subject: t, numBodies: r, active: s = !0, ...a }) => {
243
- const { texture: n, status: o, error: c } = ft({ bodyId: e, subject: t, numBodies: r, active: s });
244
- return /* @__PURE__ */ y(Le, { ...a, mask: n, status: o, error: c });
245
- }, Wr = ({ bodyId: e, subject: t, numBodies: r, ...s }) => e !== void 0 || t ? /* @__PURE__ */ y(wt, { ...s, bodyId: e, subject: t, numBodies: r }) : /* @__PURE__ */ y(vt, { ...s }), ce = 9, le = 16, Br = ({ children: e }) => {
246
- const [t, r] = k({ width: 0, height: 0 });
239
+ }, wt = ({ active: e = !0, ...t }) => {
240
+ const { texture: r, status: s, error: a } = ht(e);
241
+ return /* @__PURE__ */ S(Ie, { ...t, mask: r, status: s, error: a });
242
+ }, Dt = ({ bodyId: e, subject: t, numBodies: r, active: s = !0, ...a }) => {
243
+ const { texture: n, status: o, error: c } = pt({ bodyId: e, subject: t, numBodies: r, active: s });
244
+ return /* @__PURE__ */ S(Ie, { ...a, mask: n, status: o, error: c });
245
+ }, Br = ({ bodyId: e, subject: t, numBodies: r, ...s }) => e !== void 0 || t ? /* @__PURE__ */ S(Dt, { ...s, bodyId: e, subject: t, numBodies: r }) : /* @__PURE__ */ S(wt, { ...s }), le = 9, ue = 16, Hr = ({ children: e }) => {
246
+ const [t, r] = v({ width: 0, height: 0 });
247
247
  return x(() => {
248
248
  const s = () => {
249
- const a = document.documentElement.clientWidth, n = document.documentElement.clientHeight, o = a / n, c = ce / le;
249
+ const a = document.documentElement.clientWidth, n = document.documentElement.clientHeight, o = a / n, c = le / ue;
250
250
  let i, l;
251
- o > c ? (l = n, i = l * ce / le) : (i = a, l = i * le / ce), r({ width: i, height: l });
251
+ o > c ? (l = n, i = l * le / ue) : (i = a, l = i * ue / le), r({ width: i, height: l });
252
252
  };
253
253
  return s(), window.addEventListener("resize", s), () => window.removeEventListener("resize", s);
254
- }, []), /* @__PURE__ */ y(
254
+ }, []), /* @__PURE__ */ S(
255
255
  "div",
256
256
  {
257
257
  style: {
@@ -262,108 +262,108 @@ const qr = ({
262
262
  justifyContent: "center",
263
263
  backgroundColor: "#0d0d0d"
264
264
  },
265
- children: /* @__PURE__ */ y("div", { style: { width: t.width, height: t.height, position: "relative" }, children: e })
265
+ children: /* @__PURE__ */ S("div", { style: { width: t.width, height: t.height, position: "relative" }, children: e })
266
266
  }
267
267
  );
268
- }, $r = ({ size: e = 0.25, ...t }) => /* @__PURE__ */ y("axesHelper", { args: [e], ...t }), Dt = { left: -1, right: 1, top: 1, bottom: -1 }, Pt = (e, t, r) => {
268
+ }, $r = ({ size: e = 0.25, ...t }) => /* @__PURE__ */ S("axesHelper", { args: [e], ...t }), Ut = { left: -1, right: 1, top: 1, bottom: -1 }, Nt = (e, t, r) => {
269
269
  const s = e % t, a = Math.floor(e / t);
270
270
  return { x: s / t, y: (r - 1 - a) / r };
271
- }, Ut = ({
271
+ }, Pt = ({
272
272
  sheet: e,
273
273
  contentAspect: t,
274
274
  renderOrder: r,
275
275
  name: s
276
276
  }) => {
277
- const a = Et(e.url), n = A(0), o = A(-1), c = bt(), [i, l] = t != null ? St(c, t) : [1, 1];
278
- return Pe((h, m) => {
279
- a.wrapS = Ee, a.wrapT = Ee, a.magFilter = be, a.minFilter = be, a.generateMipmaps = !1, a.repeat.set(1 / e.cols, 1 / e.rows), n.current += m;
277
+ const a = bt(e.url), n = R(0), o = R(-1), c = At(), [i, l] = t != null ? Tt(c, t) : [1, 1];
278
+ return Ne((p, d) => {
279
+ a.wrapS = be, a.wrapT = be, a.magFilter = Ae, a.minFilter = Ae, a.generateMipmaps = !1, a.repeat.set(1 / e.cols, 1 / e.rows), n.current += d;
280
280
  const f = Math.floor(n.current * e.fps) % e.frames;
281
281
  if (f === o.current) return;
282
282
  o.current = f;
283
- const { x: u, y: d } = Pt(f, e.cols, e.rows);
284
- a.offset.set(u, d);
285
- }), /* @__PURE__ */ O("mesh", { name: s, renderOrder: r, scale: [i, l, 1], children: [
286
- /* @__PURE__ */ y("planeGeometry", { args: [1, 1] }),
287
- /* @__PURE__ */ y("meshBasicMaterial", { map: a, transparent: !0, toneMapped: !1, depthWrite: !1 })
283
+ const { x: m, y: u } = Nt(f, e.cols, e.rows);
284
+ a.offset.set(m, u);
285
+ }), /* @__PURE__ */ z("mesh", { name: s, renderOrder: r, scale: [i, l, 1], children: [
286
+ /* @__PURE__ */ S("planeGeometry", { args: [1, 1] }),
287
+ /* @__PURE__ */ S("meshBasicMaterial", { map: a, transparent: !0, toneMapped: !1, depthWrite: !1 })
288
288
  ] });
289
289
  }, Xr = ({
290
290
  sheet: e,
291
- anchors: t = Dt,
291
+ anchors: t = Ut,
292
292
  contentAspect: r,
293
293
  renderOrder: s = 10,
294
294
  name: a = "spriteAnimation"
295
- }) => /* @__PURE__ */ y(et, { fallback: null, children: /* @__PURE__ */ y(Qe, { anchors: t, children: /* @__PURE__ */ y(Ut, { sheet: e, contentAspect: r, renderOrder: s, name: a }) }) }), Nt = 64, Lt = 3, It = /^[A-Za-z][A-Za-z0-9]{0,39}$/, Ot = /^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, Gt = /^(?:rgb|rgba|hsl|hsla)\([0-9a-z.,%\s/+-]{1,60}\)$/i, zt = /^-?[0-9]{1,4}(?:\.[0-9]{1,4})?(?:px|em|rem|%)?$/, qt = /^[A-Za-z0-9 ,'"_-]{1,120}$/;
296
- function Wt(e) {
297
- return Ot.test(e) || Gt.test(e) || zt.test(e) || qt.test(e);
298
- }
299
- const Ae = (e) => e.map((t) => t.replace(/[A-Z]/g, (r) => `-${r.toLowerCase()}`)).join("-");
295
+ }) => /* @__PURE__ */ S(tt, { fallback: null, children: /* @__PURE__ */ S(et, { anchors: t, children: /* @__PURE__ */ S(Pt, { sheet: e, contentAspect: r, renderOrder: s, name: a }) }) }), Lt = 64, It = 3, Ot = /^[A-Za-z][A-Za-z0-9]{0,39}$/, Gt = /^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, zt = /^(?:rgb|rgba|hsl|hsla)\([0-9a-z.,%\s/+-]{1,60}\)$/i, qt = /^-?[0-9]{1,4}(?:\.[0-9]{1,4})?(?:px|em|rem|%)?$/, Wt = /^[A-Za-z0-9 ,'"_-]{1,120}$/;
300
296
  function Bt(e) {
297
+ return Gt.test(e) || zt.test(e) || qt.test(e) || Wt.test(e);
298
+ }
299
+ const Fe = (e) => e.map((t) => t.replace(/[A-Z]/g, (r) => `-${r.toLowerCase()}`)).join("-");
300
+ function Ht(e) {
301
301
  const t = {};
302
302
  let r = 0;
303
303
  const s = (a, n) => {
304
304
  for (const o of Object.keys(a)) {
305
- if (r >= Nt) return;
306
- if (!It.test(o)) continue;
305
+ if (r >= Lt) return;
306
+ if (!Ot.test(o)) continue;
307
307
  const c = a[o], i = [...n, o];
308
- typeof c == "number" ? Number.isFinite(c) && (t[`--vincentt-${Ae(i)}`] = String(c), r++) : typeof c == "string" ? Wt(c) && (t[`--vincentt-${Ae(i)}`] = c, r++) : c && typeof c == "object" && !Array.isArray(c) && i.length < Lt && s(c, i);
308
+ typeof c == "number" ? Number.isFinite(c) && (t[`--vincentt-${Fe(i)}`] = String(c), r++) : typeof c == "string" ? Bt(c) && (t[`--vincentt-${Fe(i)}`] = c, r++) : c && typeof c == "object" && !Array.isArray(c) && i.length < It && s(c, i);
309
309
  }
310
310
  };
311
311
  return e && typeof e == "object" && s(e, []), t;
312
312
  }
313
- function Hr({ theme: e, className: t, children: r }) {
314
- const s = { display: "contents", ...Bt(e) };
315
- return /* @__PURE__ */ y("div", { className: t, style: s, children: r });
313
+ function Kr({ theme: e, className: t, children: r }) {
314
+ const s = { display: "contents", ...Ht(e) };
315
+ return /* @__PURE__ */ S("div", { className: t, style: s, children: r });
316
316
  }
317
- const ue = (e, t) => ({
317
+ const de = (e, t) => ({
318
318
  x: (t == null ? void 0 : t.x) ?? e.x,
319
319
  y: (t == null ? void 0 : t.y) ?? e.y,
320
320
  z: (t == null ? void 0 : t.z) ?? e.z
321
321
  });
322
- function Kr({
323
- src: e,
324
- position: t,
325
- rotation: r,
326
- scale: s,
327
- visible: a = !0,
328
- material: n,
329
- // `name` and `locked` are editor metadata; neither changes rendering.
330
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
331
- name: o,
332
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
333
- locked: c
334
- }) {
335
- const [i, l, h] = [t == null ? void 0 : t.x, t == null ? void 0 : t.y, t == null ? void 0 : t.z], [m, f, u] = [r == null ? void 0 : r.x, r == null ? void 0 : r.y, r == null ? void 0 : r.z], [d, g, T] = [s == null ? void 0 : s.x, s == null ? void 0 : s.y, s == null ? void 0 : s.z], p = z(
322
+ function jr(e) {
323
+ const {
324
+ src: t,
325
+ position: r,
326
+ rotation: s,
327
+ scale: a,
328
+ visible: n = !0,
329
+ material: o,
330
+ // `name` and `locked` are editor metadata; neither changes rendering.
331
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
332
+ name: c,
333
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
334
+ locked: i
335
+ } = ie("Model", e), [l, p, d] = [r == null ? void 0 : r.x, r == null ? void 0 : r.y, r == null ? void 0 : r.z], [f, m, u] = [s == null ? void 0 : s.x, s == null ? void 0 : s.y, s == null ? void 0 : s.z], [g, M, h] = [a == null ? void 0 : a.x, a == null ? void 0 : a.y, a == null ? void 0 : a.z], y = W(
336
336
  () => ({
337
- ...K,
338
- position: ue(K.position, { x: i, y: l, z: h }),
339
- rotation: ue(K.rotation, { x: m, y: f, z: u }),
340
- scale: ue(K.scale, { x: d, y: g, z: T }),
341
- visible: a
337
+ ...V,
338
+ position: de(V.position, { x: l, y: p, z: d }),
339
+ rotation: de(V.rotation, { x: f, y: m, z: u }),
340
+ scale: de(V.scale, { x: g, y: M, z: h }),
341
+ visible: n
342
342
  }),
343
- [i, l, h, m, f, u, d, g, T, a]
344
- ), S = z(
343
+ [l, p, d, f, m, u, g, M, h, n]
344
+ ), E = W(
345
345
  () => ({
346
346
  ...Re,
347
- assetUrl: e,
348
- material: { ...Re.material, ...n }
347
+ assetUrl: t,
348
+ material: { ...Re.material, ...o }
349
349
  }),
350
- [e, n]
350
+ [t, o]
351
351
  );
352
- return /* @__PURE__ */ y(Rt, { value: p, children: /* @__PURE__ */ y(At, { value: S }) });
352
+ return /* @__PURE__ */ S(Rt, { value: y, children: /* @__PURE__ */ S(Ft, { value: E }) });
353
353
  }
354
354
  const $t = (e) => Array.isArray(e) ? e : [e], Xt = (e) => {
355
- const [t, r] = k(null);
355
+ const [t, r] = v(null);
356
356
  return x(() => {
357
357
  if (!e) return;
358
358
  let s = !0, a = null;
359
- return new de.TextureLoader().load(
359
+ return new me.TextureLoader().load(
360
360
  e,
361
361
  (n) => {
362
362
  if (a = n, !s) {
363
363
  n.dispose();
364
364
  return;
365
365
  }
366
- n.colorSpace = de.SRGBColorSpace, n.flipY = !1, r({ url: e, texture: n });
366
+ n.colorSpace = me.SRGBColorSpace, n.flipY = !1, r({ url: e, texture: n });
367
367
  },
368
368
  void 0,
369
369
  () => console.warn(`${Xe.loggerPrefix} Object3D could not load ${e}`)
@@ -372,37 +372,37 @@ const $t = (e) => Array.isArray(e) ? e : [e], Xt = (e) => {
372
372
  };
373
373
  }, [e]), e && (t == null ? void 0 : t.url) === e ? t.texture : null;
374
374
  };
375
- function jr({
376
- colour: e,
377
- texture: t,
378
- size: r = 1,
379
- visible: s = !0,
380
- children: a,
381
- // `name` and `locked` are editor metadata; neither changes rendering.
382
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
383
- name: n,
384
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
385
- locked: o
386
- }) {
387
- const c = A(null), i = A(/* @__PURE__ */ new Map()), l = Xt(t), h = e !== void 0 || l !== null, m = () => {
388
- for (const [f, { original: u, own: d }] of i.current)
389
- f.material = u, d.forEach((g) => g.dispose());
390
- i.current.clear();
375
+ function Vr(e) {
376
+ const {
377
+ colour: t,
378
+ texture: r,
379
+ size: s = 1,
380
+ visible: a = !0,
381
+ children: n,
382
+ // `name` and `locked` are editor metadata; neither changes rendering.
383
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
384
+ name: o,
385
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
386
+ locked: c
387
+ } = ie("Object3D", e), i = R(null), l = R(/* @__PURE__ */ new Map()), p = Xt(r), d = t !== void 0 || p !== null, f = () => {
388
+ for (const [m, { original: u, own: g }] of l.current)
389
+ m.material = u, g.forEach((M) => M.dispose());
390
+ l.current.clear();
391
391
  };
392
- return Pe(() => {
393
- !h || !c.current || c.current.traverse((f) => {
394
- const u = f;
395
- if (!u.isMesh || i.current.has(u)) return;
396
- const d = u.material, g = $t(d).map((T) => {
397
- var S;
398
- const p = T.clone();
399
- return e !== void 0 && ((S = p.color) == null || S.set(e)), l && (p.map = l, p.needsUpdate = !0), p;
392
+ return Ne(() => {
393
+ !d || !i.current || i.current.traverse((m) => {
394
+ const u = m;
395
+ if (!u.isMesh || l.current.has(u)) return;
396
+ const g = u.material, M = $t(g).map((h) => {
397
+ var E;
398
+ const y = h.clone();
399
+ return t !== void 0 && ((E = y.color) == null || E.set(t)), p && (y.map = p, y.needsUpdate = !0), y;
400
400
  });
401
- u.material = Array.isArray(d) ? g : g[0], i.current.set(u, { original: d, own: g });
401
+ u.material = Array.isArray(g) ? M : M[0], l.current.set(u, { original: g, own: M });
402
402
  });
403
- }), x(() => (m(), m), [e, l]), /* @__PURE__ */ y("group", { ref: c, visible: s, scale: r, children: a });
403
+ }), x(() => (f(), f), [t, p]), /* @__PURE__ */ S("group", { ref: i, visible: a, scale: s, children: n });
404
404
  }
405
- function Vr({
405
+ function Zr({
406
406
  className: e,
407
407
  children: t,
408
408
  // `name` and `locked` are editor metadata; neither changes rendering.
@@ -411,20 +411,20 @@ function Vr({
411
411
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
412
412
  locked: s
413
413
  }) {
414
- return /* @__PURE__ */ y("div", { className: e, children: t });
414
+ return /* @__PURE__ */ S("div", { className: e, children: t });
415
415
  }
416
- const Ht = 2048;
417
- function Kt(e) {
416
+ const Kt = 2048;
417
+ function jt(e) {
418
418
  return e <= 32 || e >= 127 && e <= 160 || e === 173 || e === 92 || e === 1564 || e === 6158 || e >= 8192 && e <= 8207 || e >= 8232 && e <= 8238 || e >= 8288 && e <= 8303 || e === 12288 || e === 65279 || e >= 917504 && e <= 917631;
419
419
  }
420
- function jt(e) {
421
- if (typeof e != "string" || e.length === 0 || e.length > Ht) return;
420
+ function Vt(e) {
421
+ if (typeof e != "string" || e.length === 0 || e.length > Kt) return;
422
422
  for (const s of e)
423
- if (Kt(s.codePointAt(0) ?? 0)) return;
423
+ if (jt(s.codePointAt(0) ?? 0)) return;
424
424
  const t = e.toLowerCase();
425
425
  return t.startsWith("https://") || t.startsWith("http://") || t.startsWith("mailto:") || t.startsWith("#") || t.startsWith("/") && !t.startsWith("//") ? e : void 0;
426
426
  }
427
- const Fe = {
427
+ const xe = {
428
428
  display: "inline-block",
429
429
  padding: "0.6em 1.2em",
430
430
  border: "none",
@@ -435,89 +435,90 @@ const Fe = {
435
435
  textDecoration: "none",
436
436
  cursor: "pointer"
437
437
  };
438
- function Zr({
439
- label: e,
440
- action: t,
441
- target: r,
442
- link: s,
443
- onTap: a,
444
- color: n,
445
- visible: o = !0,
446
- className: c,
447
- children: i,
448
- // `name` and `locked` are editor metadata; neither changes rendering.
449
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
450
- name: l,
451
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
452
- locked: h
453
- }) {
454
- if (!o) return null;
455
- const m = n ? { ...Fe, background: n } : Fe, f = t === "scene" && !a && typeof r == "string" && r ? r : void 0, u = t === "scene" ? void 0 : jt(s), d = f ? () => Mt(f) : a, g = i ?? e;
438
+ function Yr(e) {
439
+ const {
440
+ label: t,
441
+ action: r,
442
+ target: s,
443
+ link: a,
444
+ onTap: n,
445
+ color: o,
446
+ visible: c = !0,
447
+ className: i,
448
+ children: l,
449
+ // `name` and `locked` are editor metadata; neither changes rendering.
450
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
451
+ name: p,
452
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
453
+ locked: d
454
+ } = ie("Button", e);
455
+ if (!c) return null;
456
+ const f = o ? { ...xe, background: o } : xe, m = r === "scene" && !n && typeof s == "string" && s ? s : void 0, u = r === "scene" ? void 0 : Vt(a), g = m ? () => Et(m) : n, M = l ?? t;
456
457
  if (u) {
457
- const T = /^https?:/i.test(u);
458
- return /* @__PURE__ */ y(
458
+ const h = /^https?:/i.test(u);
459
+ return /* @__PURE__ */ S(
459
460
  "a",
460
461
  {
461
462
  href: u,
462
- className: c,
463
- style: m,
464
- onClick: d,
465
- ...T ? { target: "_blank", rel: "noopener noreferrer" } : {},
466
- children: g
463
+ className: i,
464
+ style: f,
465
+ onClick: g,
466
+ ...h ? { target: "_blank", rel: "noopener noreferrer" } : {},
467
+ children: M
467
468
  }
468
469
  );
469
470
  }
470
- return /* @__PURE__ */ y("button", { type: "button", className: c, style: m, onClick: d, children: g });
471
+ return /* @__PURE__ */ S("button", { type: "button", className: i, style: f, onClick: g, children: M });
471
472
  }
472
473
  const Ce = (e, t) => ({
473
474
  x: (t == null ? void 0 : t.x) ?? e.x,
474
475
  y: (t == null ? void 0 : t.y) ?? e.y,
475
476
  z: (t == null ? void 0 : t.z) ?? e.z
476
477
  });
477
- function Yr({
478
- type: e = L.type,
479
- color: t = L.color,
480
- intensity: r = L.intensity,
481
- enabled: s = L.enabled,
482
- castShadow: a = !1,
483
- distance: n = L.distance,
484
- decay: o = L.decay,
485
- angle: c = L.angle,
486
- penumbra: i = L.penumbra,
487
- position: l,
488
- rotation: h,
489
- showHelper: m = L.showHelper,
490
- // `name` and `locked` are editor metadata; neither changes rendering.
491
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
492
- name: f,
493
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
494
- locked: u
495
- }) {
496
- const [d, g, T] = [l == null ? void 0 : l.x, l == null ? void 0 : l.y, l == null ? void 0 : l.z], [p, S, E] = [h == null ? void 0 : h.x, h == null ? void 0 : h.y, h == null ? void 0 : h.z], q = z(
478
+ function Jr(e) {
479
+ const {
480
+ type: t = O.type,
481
+ color: r = O.color,
482
+ intensity: s = O.intensity,
483
+ enabled: a = O.enabled,
484
+ castShadow: n = !1,
485
+ distance: o = O.distance,
486
+ decay: c = O.decay,
487
+ angle: i = O.angle,
488
+ penumbra: l = O.penumbra,
489
+ position: p,
490
+ rotation: d,
491
+ showHelper: f = O.showHelper,
492
+ // `name` and `locked` are editor metadata; neither changes rendering.
493
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
494
+ name: m,
495
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
496
+ locked: u
497
+ } = ie("Light", e), [g, M, h] = [p == null ? void 0 : p.x, p == null ? void 0 : p.y, p == null ? void 0 : p.z], [y, E, L] = [d == null ? void 0 : d.x, d == null ? void 0 : d.y, d == null ? void 0 : d.z], T = W(
497
498
  () => ({
498
- ...K,
499
- position: Ce(K.position, { x: d, y: g, z: T }),
500
- rotation: Ce(K.rotation, { x: p, y: S, z: E })
499
+ ...V,
500
+ position: Ce(V.position, { x: g, y: M, z: h }),
501
+ rotation: Ce(V.rotation, { x: y, y: E, z: L })
501
502
  }),
502
- [d, g, T, p, S, E]
503
- ), b = z(
503
+ [g, M, h, y, E, L]
504
+ ), _ = W(
504
505
  () => ({
505
- enabled: s,
506
- type: e,
507
- color: t,
508
- intensity: r,
509
- castShadow: a,
510
- distance: n,
511
- angle: c,
512
- penumbra: i,
513
- decay: o,
514
- showHelper: m
506
+ enabled: a,
507
+ type: t,
508
+ color: r,
509
+ intensity: s,
510
+ castShadow: n,
511
+ distance: o,
512
+ angle: i,
513
+ penumbra: l,
514
+ decay: c,
515
+ showHelper: f
515
516
  }),
516
- [s, e, t, r, a, n, c, i, o, m]
517
+ [a, t, r, s, n, o, i, l, c, f]
517
518
  );
518
- return /* @__PURE__ */ y(Tt, { settings: b, transform: q });
519
+ return /* @__PURE__ */ S(Mt, { settings: _, transform: T });
519
520
  }
520
- const B = (e) => {
521
+ const $ = (e) => {
521
522
  switch (e) {
522
523
  case "start":
523
524
  return "starting";
@@ -535,13 +536,13 @@ const B = (e) => {
535
536
  case "clear":
536
537
  return "idle";
537
538
  }
538
- }, Vt = [
539
+ }, Zt = [
539
540
  "video/mp4",
540
541
  "video/webm;codecs=vp9",
541
542
  "video/webm;codecs=vp8",
542
543
  "video/webm"
543
544
  ];
544
- function Jr(e = {}) {
545
+ function Qr(e = {}) {
545
546
  const {
546
547
  audio: t = !1,
547
548
  mimeType: r,
@@ -552,103 +553,103 @@ function Jr(e = {}) {
552
553
  onRecordingPause: c,
553
554
  onRecordingResume: i,
554
555
  onRecordingStop: l,
555
- onRecordingComplete: h,
556
- onError: m,
556
+ onRecordingComplete: p,
557
+ onError: d,
557
558
  passThroughStream: f
558
- } = e, u = A(null), d = A(null), g = A([]), [T, p] = k("idle"), [S, E] = k(null), [q, b] = k(null), w = F(() => {
559
+ } = e, m = R(null), u = R(null), g = R([]), [M, h] = v("idle"), [y, E] = v(null), [L, T] = v(null), _ = F(() => {
559
560
  var C;
560
- const M = [r, ...Vt].filter(Boolean);
561
- for (const R of M)
562
- if ((C = MediaRecorder.isTypeSupported) != null && C.call(MediaRecorder, R)) return R;
563
- }, [r]), W = F(
564
- async (M) => {
561
+ const b = [r, ...Zt].filter(Boolean);
562
+ for (const A of b)
563
+ if ((C = MediaRecorder.isTypeSupported) != null && C.call(MediaRecorder, A)) return A;
564
+ }, [r]), N = F(
565
+ async (b) => {
565
566
  const C = new MediaStream();
566
- if (M.getTracks().forEach((R) => C.addTrack(R)), t) {
567
- let R;
567
+ if (b.getTracks().forEach((A) => C.addTrack(A)), t) {
568
+ let A;
568
569
  if (t instanceof MediaStream)
569
- R = t;
570
+ A = t;
570
571
  else {
571
- const v = typeof t == "object" ? { audio: t } : { audio: !0, video: !1 };
572
- R = await navigator.mediaDevices.getUserMedia(v);
572
+ const w = typeof t == "object" ? { audio: t } : { audio: !0, video: !1 };
573
+ A = await navigator.mediaDevices.getUserMedia(w);
573
574
  }
574
- R.getAudioTracks().forEach((v) => C.addTrack(v));
575
+ A.getAudioTracks().forEach((w) => C.addTrack(w));
575
576
  }
576
577
  if (!C.getTracks().length)
577
578
  throw new Error("No tracks available in combined stream.");
578
- return d.current = C, C;
579
+ return u.current = C, C;
579
580
  },
580
581
  [t]
581
- ), Q = F(
582
- async (M, C) => {
583
- p(B("start")), b(null), E(null);
582
+ ), B = F(
583
+ async (b, C) => {
584
+ h($("start")), T(null), E(null);
584
585
  try {
585
- let R;
586
+ let A;
586
587
  if (f)
587
- R = f, d.current = R;
588
+ A = f, u.current = A;
588
589
  else {
589
- if (!M) throw new Error("start(stream) requires a MediaStream.");
590
- R = await W(M);
590
+ if (!b) throw new Error("start(stream) requires a MediaStream.");
591
+ A = await N(b);
591
592
  }
592
- const v = w(), j = {};
593
- v && (j.mimeType = v), s && (j.bitsPerSecond = s);
594
- const H = new MediaRecorder(R, j);
595
- H.ondataavailable = (N) => {
596
- var Z;
597
- ((Z = N.data) == null ? void 0 : Z.size) > 0 && (g.current.push(N.data), a == null || a(N.data));
598
- }, H.onstop = () => {
599
- const N = new Blob(g.current, {
600
- type: v ?? "video/webm"
593
+ const w = _(), Z = {};
594
+ w && (Z.mimeType = w), s && (Z.bitsPerSecond = s);
595
+ const j = new MediaRecorder(A, Z);
596
+ j.ondataavailable = (I) => {
597
+ var J;
598
+ ((J = I.data) == null ? void 0 : J.size) > 0 && (g.current.push(I.data), a == null || a(I.data));
599
+ }, j.onstop = () => {
600
+ const I = new Blob(g.current, {
601
+ type: w ?? "video/webm"
601
602
  });
602
- E(N), n == null || n(N), h == null || h(N), g.current = [], p(B("complete"));
603
- }, u.current = H, H.start(C), p(B("started")), o == null || o();
604
- } catch (R) {
605
- const v = R instanceof Error ? R : new Error(String(R));
606
- console.error("start(stream) failed", v), b(v), p(B("fail")), m == null || m(v);
603
+ E(I), n == null || n(I), p == null || p(I), g.current = [], h($("complete"));
604
+ }, m.current = j, j.start(C), h($("started")), o == null || o();
605
+ } catch (A) {
606
+ const w = A instanceof Error ? A : new Error(String(A));
607
+ console.error("start(stream) failed", w), T(w), h($("fail")), d == null || d(w);
607
608
  }
608
609
  },
609
610
  [
610
- W,
611
- w,
611
+ N,
612
+ _,
612
613
  s,
613
614
  a,
614
615
  n,
615
- h,
616
+ p,
616
617
  o,
617
- m,
618
+ d,
618
619
  f
619
620
  ]
620
- ), ee = F(() => {
621
- const M = u.current;
622
- !M || M.state === "inactive" || (p(B("stop")), M.stop(), l == null || l());
621
+ ), H = F(() => {
622
+ const b = m.current;
623
+ !b || b.state === "inactive" || (h($("stop")), b.stop(), l == null || l());
623
624
  }, [l]), te = F(() => {
624
- const M = u.current;
625
- (M == null ? void 0 : M.state) === "recording" && (M.pause(), p(B("pause")), c == null || c());
625
+ const b = m.current;
626
+ (b == null ? void 0 : b.state) === "recording" && (b.pause(), h($("pause")), c == null || c());
626
627
  }, [c]), re = F(() => {
627
- const M = u.current;
628
- (M == null ? void 0 : M.state) === "paused" && (M.resume(), p(B("resume")), i == null || i());
629
- }, [i]), V = F(() => {
630
- var M;
628
+ const b = m.current;
629
+ (b == null ? void 0 : b.state) === "paused" && (b.resume(), h($("resume")), i == null || i());
630
+ }, [i]), Y = F(() => {
631
+ var b;
631
632
  try {
632
- u.current && (u.current.onstop = null, u.current.state !== "inactive" && u.current.stop()), u.current = null, (M = d.current) == null || M.getTracks().forEach((C) => C.stop()), d.current = null, E(null), p(B("clear")), g.current = [], b(null);
633
+ m.current && (m.current.onstop = null, m.current.state !== "inactive" && m.current.stop()), m.current = null, (b = u.current) == null || b.getTracks().forEach((C) => C.stop()), u.current = null, E(null), h($("clear")), g.current = [], T(null);
633
634
  } catch (C) {
634
635
  console.error("clear failed", C);
635
636
  }
636
637
  }, []);
637
- return x(() => () => V(), []), {
638
- status: T,
639
- start: Q,
640
- stop: ee,
638
+ return x(() => () => Y(), []), {
639
+ status: M,
640
+ start: B,
641
+ stop: H,
641
642
  pause: te,
642
643
  resume: re,
643
- clear: V,
644
- isRecording: T === "recording" || T === "paused",
645
- isPaused: T === "paused",
646
- recordedBlob: S,
647
- error: q,
648
- getActiveStream: () => d.current
644
+ clear: Y,
645
+ isRecording: M === "recording" || M === "paused",
646
+ isPaused: M === "paused",
647
+ recordedBlob: y,
648
+ error: L,
649
+ getActiveStream: () => u.current
649
650
  };
650
651
  }
651
- const Zt = async (e, t = {}) => {
652
+ const Yt = async (e, t = {}) => {
652
653
  var r, s, a;
653
654
  (r = t.onCaptureStart) == null || r.call(t), await Promise.resolve();
654
655
  try {
@@ -658,37 +659,37 @@ const Zt = async (e, t = {}) => {
658
659
  const o = n instanceof Error ? n : new Error(String(n));
659
660
  throw (a = t.onError) == null || a.call(t, o), o;
660
661
  }
661
- }, Qr = (e = {}) => {
662
- const { session: t } = He(), {
662
+ }, es = (e = {}) => {
663
+ const { session: t } = Ke(), {
663
664
  captureFrame: r = t.captureFrame,
664
665
  onCaptureStart: s,
665
666
  onCaptureComplete: a,
666
667
  onError: n
667
- } = e, [o, c] = k("idle"), [i, l] = k(null), [h, m] = k(null), f = F(async () => {
668
- c("capturing"), l(null), m(null);
668
+ } = e, [o, c] = v("idle"), [i, l] = v(null), [p, d] = v(null), f = F(async () => {
669
+ c("capturing"), l(null), d(null);
669
670
  try {
670
- const d = await Zt(r, {
671
+ const u = await Yt(r, {
671
672
  onCaptureStart: s,
672
673
  onCaptureComplete: a,
673
674
  onError: n
674
675
  });
675
- return l(d), c("completed"), d;
676
- } catch (d) {
677
- const g = d instanceof Error ? d : new Error(String(d));
678
- return m(g), c("error"), null;
676
+ return l(u), c("completed"), u;
677
+ } catch (u) {
678
+ const g = u instanceof Error ? u : new Error(String(u));
679
+ return d(g), c("error"), null;
679
680
  }
680
- }, [r, s, a, n]), u = F(() => {
681
- c("idle"), l(null), m(null);
681
+ }, [r, s, a, n]), m = F(() => {
682
+ c("idle"), l(null), d(null);
682
683
  }, []);
683
- return { status: o, capturePhoto: f, clear: u, dataUrl: i, error: h };
684
- }, es = (e, t) => {
684
+ return { status: o, capturePhoto: f, clear: m, dataUrl: i, error: p };
685
+ }, ts = (e, t) => {
685
686
  const r = e.split(","), s = r[0].match(/:(.*?);/), a = s ? s[1] : "application/octet-stream", n = atob(r[r.length - 1]);
686
687
  let o = n.length;
687
688
  const c = new Uint8Array(o);
688
689
  for (; o--; )
689
690
  c[o] = n.charCodeAt(o);
690
691
  return new File([c], t, { type: a });
691
- }, Yt = 4, Jt = 50, Qt = 5e3, ae = (e) => Math.min(1, Math.max(0, e)), xe = (e) => new Promise((t) => {
692
+ }, Jt = 4, Qt = 50, er = 5e3, ae = (e) => Math.min(1, Math.max(0, e)), _e = (e) => new Promise((t) => {
692
693
  if (e.readyState >= 4) {
693
694
  t();
694
695
  return;
@@ -697,18 +698,18 @@ const Zt = async (e, t = {}) => {
697
698
  const s = () => {
698
699
  r || (r = !0, t());
699
700
  };
700
- e.addEventListener("canplaythrough", s, { once: !0 }), e.addEventListener("error", s, { once: !0 }), setTimeout(s, Qt);
701
- }), _e = (e, t) => {
701
+ e.addEventListener("canplaythrough", s, { once: !0 }), e.addEventListener("error", s, { once: !0 }), setTimeout(s, er);
702
+ }), ke = (e, t) => {
702
703
  const r = document.createElement("audio");
703
704
  return r.src = e, r.loop = t, r.preload = "auto", r.setAttribute("playsinline", ""), r.setAttribute("webkit-playsinline", ""), r.load(), r;
704
- }, er = (e) => {
705
+ }, tr = (e) => {
705
706
  e.muted = !0, e.play().then(() => {
706
707
  e.pause(), e.currentTime = 0, e.muted = !1;
707
708
  }).catch(() => {
708
709
  e.muted = !1;
709
710
  });
710
711
  };
711
- class tr {
712
+ class rr {
712
713
  constructor(t = {}) {
713
714
  D(this, "sfxPoolSize");
714
715
  D(this, "coalesceMs");
@@ -723,7 +724,7 @@ class tr {
723
724
  D(this, "lastPlayed", /* @__PURE__ */ new Map());
724
725
  /** Readiness promises so a loading gate can await decode/buffer. */
725
726
  D(this, "ready", /* @__PURE__ */ new Map());
726
- this.sfxPoolSize = t.sfxPoolSize ?? Yt, this.coalesceMs = t.coalesceMs ?? Jt;
727
+ this.sfxPoolSize = t.sfxPoolSize ?? Jt, this.coalesceMs = t.coalesceMs ?? Qt;
727
728
  }
728
729
  /**
729
730
  * Create + buffer the looping music element. Await in the loading gate so the
@@ -734,8 +735,8 @@ class tr {
734
735
  const s = ae(r);
735
736
  if (this.musicWanted = { url: t, volume: s }, this.musicUrl === t && this.musicReady)
736
737
  return this.music && (this.music.volume = s), this.musicReady;
737
- this.music && (this.music.pause(), this.music.currentTime = 0, this.music.removeAttribute("src"), this.music.load()), this.music = _e(t, !0), this.musicUrl = t, this.music.volume = s;
738
- const a = xe(this.music);
738
+ this.music && (this.music.pause(), this.music.currentTime = 0, this.music.removeAttribute("src"), this.music.load()), this.music = ke(t, !0), this.musicUrl = t, this.music.volume = s;
739
+ const a = _e(this.music);
739
740
  return this.musicReady = a, a;
740
741
  }
741
742
  /**
@@ -748,13 +749,13 @@ class tr {
748
749
  if (s) return s;
749
750
  const a = ae(r), n = [];
750
751
  for (let c = 0; c < this.sfxPoolSize; c += 1) {
751
- const i = _e(t, !1);
752
+ const i = ke(t, !1);
752
753
  i.volume = a, i.addEventListener("ended", () => {
753
754
  i.currentTime = 0;
754
755
  }), n.push(i);
755
756
  }
756
757
  this.pools.set(t, { els: n, next: 0, volume: a });
757
- const o = xe(n[0]);
758
+ const o = _e(n[0]);
758
759
  return this.ready.set(t, o), o;
759
760
  }
760
761
  /** Subscribe to mute-state changes (for a toggle UI). Fires immediately with
@@ -772,7 +773,7 @@ class tr {
772
773
  * then start the music. All elements are already buffered, so this is instant.
773
774
  */
774
775
  setMuted(t) {
775
- t !== this.muted && (this.muted = t, this.muted || this.pools.forEach((r) => r.els.forEach(er)), this.applyMusic(), this.listeners.forEach((r) => r(this.muted)));
776
+ t !== this.muted && (this.muted = t, this.muted || this.pools.forEach((r) => r.els.forEach(tr)), this.applyMusic(), this.listeners.forEach((r) => r(this.muted)));
776
777
  }
777
778
  toggleMuted() {
778
779
  this.setMuted(!this.muted);
@@ -816,7 +817,7 @@ class tr {
816
817
  }), this.muted && !this.music.paused && this.music.pause());
817
818
  }
818
819
  }
819
- const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math.floor(r)) ? "replay" : "ended", sr = (e, t, r) => e && t !== r, ar = (e) => Math.min(100, Math.max(0, e)) / 100, ts = tt(function({
820
+ const sr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math.floor(r)) ? "replay" : "ended", ar = (e, t, r) => e && t !== r, nr = (e) => Math.min(100, Math.max(0, e)) / 100, rs = rt(function({
820
821
  src: t,
821
822
  playMode: r = "once",
822
823
  loopCount: s = 1,
@@ -826,119 +827,126 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
826
827
  preload: c = "auto",
827
828
  onReady: i,
828
829
  onPlay: l,
829
- onPause: h,
830
- onEnded: m,
830
+ onPause: p,
831
+ onEnded: d,
831
832
  onError: f
832
- }, u) {
833
- const d = A(null), g = A(0), T = A(null), p = F(async () => {
834
- const b = d.current;
835
- if (b)
833
+ }, m) {
834
+ const u = R(null);
835
+ u.current === null && typeof Audio < "u" && (u.current = new Audio());
836
+ const g = R(0), M = R(null), h = F(async () => {
837
+ const T = u.current;
838
+ if (T)
836
839
  try {
837
- await b.play();
838
- } catch (w) {
839
- const W = w instanceof Error ? w : new Error(String(w));
840
- throw f == null || f(W), W;
840
+ await T.play();
841
+ } catch (_) {
842
+ const N = _ instanceof Error ? _ : new Error(String(_));
843
+ throw f == null || f(N), N;
841
844
  }
842
- }, [f]), S = F(() => {
843
- var b;
844
- return (b = d.current) == null ? void 0 : b.pause();
845
+ }, [f]), y = F(() => {
846
+ var T;
847
+ return (T = u.current) == null ? void 0 : T.pause();
845
848
  }, []), E = F(() => {
846
- const b = d.current;
847
- b && (b.pause(), b.currentTime = 0, g.current = 0);
849
+ const T = u.current;
850
+ T && (T.pause(), T.currentTime = 0, g.current = 0);
848
851
  }, []);
849
- rt(
850
- u,
852
+ st(
853
+ m,
851
854
  () => ({
852
- play: p,
853
- pause: S,
855
+ play: h,
856
+ pause: y,
854
857
  stop: E,
855
858
  get current() {
856
- return d.current;
859
+ return u.current;
857
860
  }
858
861
  }),
859
- [S, p, E]
862
+ [y, h, E]
860
863
  ), x(() => {
861
- g.current = 0, T.current = null;
864
+ g.current = 0, M.current = null;
862
865
  }, [t]), x(() => {
863
- d.current && (d.current.volume = ar(o));
866
+ const T = u.current;
867
+ T && (T.preload = c, T.muted = n, T.loop = !1, T.getAttribute("src") !== t && (T.src = t));
868
+ }, [t, c, n]), x(() => {
869
+ const T = u.current;
870
+ return () => {
871
+ T && (T.pause(), T.removeAttribute("src"), T.load());
872
+ };
873
+ }, []), x(() => {
874
+ u.current && (u.current.volume = nr(o));
864
875
  }, [o]), x(() => {
865
- sr(a, T.current, t) && (T.current = t, p().catch(() => {
876
+ ar(a, M.current, t) && (M.current = t, h().catch(() => {
866
877
  }));
867
878
  }, [a, t]);
868
- const q = F(() => {
879
+ const L = F(() => {
869
880
  g.current += 1;
870
- const b = Math.max(1, Math.floor(s));
871
- if (rr(r, g.current, b) === "replay") {
872
- const w = d.current;
873
- w && (w.currentTime = 0, p().catch(() => {
881
+ const T = Math.max(1, Math.floor(s));
882
+ if (sr(r, g.current, T) === "replay") {
883
+ const _ = u.current;
884
+ _ && (_.currentTime = 0, h().catch(() => {
874
885
  }));
875
886
  return;
876
887
  }
877
- g.current = 0, m == null || m();
878
- }, [s, m, p, r]);
879
- return /* @__PURE__ */ y(
880
- "audio",
881
- {
882
- ref: d,
883
- src: t,
884
- preload: c,
885
- autoPlay: !1,
886
- muted: n,
887
- loop: !1,
888
- playsInline: !0,
889
- style: { display: "none" },
890
- onCanPlayThrough: i,
891
- onPlay: l,
892
- onPause: h,
893
- onEnded: q,
894
- onError: () => f == null ? void 0 : f(new Error(`Unable to load audio: ${t}`))
895
- }
896
- );
897
- }), U = new tr(), rs = (e, t) => U.prefetchMusic(e, t), ss = (e, t) => U.registerSound(e, t), as = (e, t) => U.startMusic(e, t), ns = () => U.stopMusic(), os = (e, t) => U.playOneShot(e, t), is = (e) => U.setMuted(e), cs = () => U.toggleMuted(), ls = () => U.isMuted(), us = (e) => U.onMuteChange(e), ds = () => {
898
- const [e, t] = k(U.isMuted());
899
- return x(() => U.onMuteChange(t), []), e;
900
- }, nr = (e = {}) => {
901
- const { auto: t = !1 } = e, r = A(e.env ?? Ke()), s = A(e.constraints);
888
+ g.current = 0, d == null || d();
889
+ }, [s, d, h, r]);
890
+ return x(() => {
891
+ const T = u.current;
892
+ if (!T) return;
893
+ const N = [
894
+ ["canplaythrough", () => i == null ? void 0 : i()],
895
+ ["play", () => l == null ? void 0 : l()],
896
+ ["pause", () => p == null ? void 0 : p()],
897
+ ["ended", L],
898
+ ["error", () => f == null ? void 0 : f(new Error(`Unable to load audio: ${t}`))]
899
+ ];
900
+ for (const [B, H] of N) T.addEventListener(B, H);
901
+ return () => {
902
+ for (const [B, H] of N) T.removeEventListener(B, H);
903
+ };
904
+ }, [t, i, l, p, f, L]), null;
905
+ }), P = new rr(), ss = (e, t) => P.prefetchMusic(e, t), as = (e, t) => P.registerSound(e, t), ns = (e, t) => P.startMusic(e, t), os = () => P.stopMusic(), is = (e, t) => P.playOneShot(e, t), cs = (e) => P.setMuted(e), ls = () => P.toggleMuted(), us = () => P.isMuted(), ds = (e) => P.onMuteChange(e), ms = () => {
906
+ const [e, t] = v(P.isMuted());
907
+ return x(() => P.onMuteChange(t), []), e;
908
+ }, or = (e = {}) => {
909
+ const { auto: t = !1 } = e, r = R(e.env ?? je()), s = R(e.constraints);
902
910
  s.current = e.constraints;
903
- const [a, n] = k("unknown"), [o, c] = k(null), i = A(0), l = F(async () => {
904
- const m = ++i.current, f = await je(r.current);
905
- if (m !== i.current) return a;
906
- const u = f.state === "unknown" ? "unknown" : f.state;
907
- return n((d) => d === "requesting" ? d : u), u !== "blocked" && c(null), u;
908
- }, []), h = F(
909
- async (m) => {
911
+ const [a, n] = v("unknown"), [o, c] = v(null), i = R(0), l = F(async () => {
912
+ const d = ++i.current, f = await Ve(r.current);
913
+ if (d !== i.current) return a;
914
+ const m = f.state === "unknown" ? "unknown" : f.state;
915
+ return n((u) => u === "requesting" ? u : m), m !== "blocked" && c(null), m;
916
+ }, []), p = F(
917
+ async (d) => {
910
918
  const f = ++i.current;
911
919
  n("requesting"), c(null);
912
- const u = await Ve(
913
- { constraints: (m == null ? void 0 : m.constraints) ?? s.current, keepStream: !1 },
920
+ const m = await Ze(
921
+ { constraints: (d == null ? void 0 : d.constraints) ?? s.current, keepStream: !1 },
914
922
  r.current
915
923
  );
916
- return f !== i.current || (n(u.state), c(u.reason)), u.state;
924
+ return f !== i.current || (n(m.state), c(m.reason)), m.state;
917
925
  },
918
926
  []
919
927
  );
920
928
  return x(() => {
921
- let m = () => {
929
+ let d = () => {
922
930
  }, f = !0;
923
- return t ? h() : l(), Ze((u) => {
924
- f && (n((d) => d === "requesting" ? d : u.state === "unknown" ? "unknown" : u.state), u.state !== "blocked" && c(null));
925
- }, r.current).then((u) => {
926
- f ? m = u : u();
931
+ return t ? p() : l(), Ye((m) => {
932
+ f && (n((u) => u === "requesting" ? u : m.state === "unknown" ? "unknown" : m.state), m.state !== "blocked" && c(null));
933
+ }, r.current).then((m) => {
934
+ f ? d = m : m();
927
935
  }), () => {
928
- f = !1, i.current += 1, m();
936
+ f = !1, i.current += 1, d();
929
937
  };
930
- }, [t, l, h]), z(
938
+ }, [t, l, p]), W(
931
939
  () => ({
932
940
  state: a,
933
941
  reason: o,
934
- canPrompt: Ye(a),
942
+ canPrompt: Je(a),
935
943
  usable: a === "granted",
936
- request: h,
944
+ request: p,
937
945
  refresh: l
938
946
  }),
939
- [a, o, h, l]
947
+ [a, o, p, l]
940
948
  );
941
- }, or = {
949
+ }, ir = {
942
950
  display: "flex",
943
951
  flexDirection: "column",
944
952
  alignItems: "center",
@@ -951,7 +959,7 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
951
959
  background: "#111827",
952
960
  color: "#f9fafb",
953
961
  fontFamily: "system-ui, sans-serif"
954
- }, ir = {
962
+ }, cr = {
955
963
  font: "inherit",
956
964
  padding: "10px 18px",
957
965
  borderRadius: 8,
@@ -959,58 +967,58 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
959
967
  background: "#2563eb",
960
968
  color: "#fff",
961
969
  cursor: "pointer"
962
- }, ms = ({
970
+ }, fs = ({
963
971
  children: e,
964
972
  fallback: t,
965
973
  auto: r = !1,
966
974
  constraints: s,
967
975
  requestLabel: a = "Allow camera"
968
976
  }) => {
969
- const n = nr({ auto: r, constraints: s });
970
- if (n.usable) return /* @__PURE__ */ y(ne, { children: e });
971
- if (t) return /* @__PURE__ */ y(ne, { children: t(n) });
977
+ const n = or({ auto: r, constraints: s });
978
+ if (n.usable) return /* @__PURE__ */ S(ne, { children: e });
979
+ if (t) return /* @__PURE__ */ S(ne, { children: t(n) });
972
980
  const { state: o, reason: c, canPrompt: i, request: l } = n;
973
- return /* @__PURE__ */ O("div", { style: or, role: "region", "aria-label": "Camera access", children: [
974
- /* @__PURE__ */ y("p", { "aria-live": "polite", style: { margin: 0 }, children: (c == null ? void 0 : c.message) ?? Je[o] }),
975
- /* @__PURE__ */ y(
981
+ return /* @__PURE__ */ z("div", { style: ir, role: "region", "aria-label": "Camera access", children: [
982
+ /* @__PURE__ */ S("p", { "aria-live": "polite", style: { margin: 0 }, children: (c == null ? void 0 : c.message) ?? Qe[o] }),
983
+ /* @__PURE__ */ S(
976
984
  "button",
977
985
  {
978
986
  type: "button",
979
987
  onClick: () => void l(),
980
988
  disabled: !i || o === "requesting",
981
989
  "aria-disabled": !i || o === "requesting",
982
- style: { ...ir, opacity: i && o !== "requesting" ? 1 : 0.5 },
990
+ style: { ...cr, opacity: i && o !== "requesting" ? 1 : 0.5 },
983
991
  children: o === "requesting" ? "Waiting…" : o === "denied" ? "Try again" : a
984
992
  }
985
993
  )
986
994
  ] });
987
- }, cr = () => {
995
+ }, lr = () => {
988
996
  var e;
989
997
  return {
990
998
  enumerateDevices: typeof navigator < "u" && ((e = navigator.mediaDevices) != null && e.enumerateDevices) ? () => navigator.mediaDevices.enumerateDevices() : void 0
991
999
  };
992
- }, lr = /\b(back|rear|environment|world)\b/i, ur = /\b(front|user|facetime|selfie)\b/i, dr = (e) => lr.test(e) ? "environment" : ur.test(e) ? "user" : null, fs = async (e = cr()) => {
1000
+ }, ur = /\b(back|rear|environment|world)\b/i, dr = /\b(front|user|facetime|selfie)\b/i, mr = (e) => ur.test(e) ? "environment" : dr.test(e) ? "user" : null, ps = async (e = lr()) => {
993
1001
  if (!e.enumerateDevices) return [];
994
1002
  try {
995
1003
  return (await e.enumerateDevices()).filter((r) => r.kind === "videoinput").map((r) => ({
996
1004
  deviceId: r.deviceId,
997
1005
  label: r.label,
998
- facing: dr(r.label)
1006
+ facing: mr(r.label)
999
1007
  }));
1000
1008
  } catch {
1001
1009
  return [];
1002
1010
  }
1003
- }, ps = (e, t) => e.find((r) => r.facing === t) ?? null, Ie = at(null), hs = ({
1011
+ }, hs = (e, t) => e.find((r) => r.facing === t) ?? null, Oe = nt(null), gs = ({
1004
1012
  cache: e,
1005
1013
  disposeUnreferencedOnUnmount: t = !0,
1006
1014
  children: r
1007
1015
  }) => {
1008
- const s = e ?? Ne();
1016
+ const s = e ?? Le();
1009
1017
  return x(() => () => {
1010
1018
  t && s.disposeUnreferenced();
1011
- }, [s, t]), /* @__PURE__ */ y(Ie.Provider, { value: s, children: r });
1012
- }, Oe = () => st(Ie) ?? Ne(), gs = (e, t = {}) => {
1013
- const { enabled: r = !0 } = t, s = Oe(), a = nt(), n = (e == null ? void 0 : e.key) ?? null, [o, c] = k({
1019
+ }, [s, t]), /* @__PURE__ */ S(Oe.Provider, { value: s, children: r });
1020
+ }, Ge = () => at(Oe) ?? Le(), ys = (e, t = {}) => {
1021
+ const { enabled: r = !0 } = t, s = Ge(), a = ot(), n = (e == null ? void 0 : e.key) ?? null, [o, c] = v({
1014
1022
  value: null,
1015
1023
  status: "idle",
1016
1024
  error: null
@@ -1022,22 +1030,22 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1022
1030
  }
1023
1031
  let i = !0;
1024
1032
  const l = s.get(e.key);
1025
- return c({ value: l ?? null, status: l ? "ready" : "loading", error: null }), s.acquire(e, a).then((h) => {
1026
- i && c({ value: h, status: "ready", error: null });
1027
- }).catch((h) => {
1028
- i && c({ value: null, status: "error", error: h });
1033
+ return c({ value: l ?? null, status: l ? "ready" : "loading", error: null }), s.acquire(e, a).then((p) => {
1034
+ i && c({ value: p, status: "ready", error: null });
1035
+ }).catch((p) => {
1036
+ i && c({ value: null, status: "error", error: p });
1029
1037
  }), () => {
1030
1038
  i = !1, s.release(e.key, a);
1031
1039
  };
1032
1040
  }, [s, n, r, a]), o;
1033
- }, ys = (e) => {
1034
- const t = Oe(), r = e ?? t;
1035
- return ot(
1041
+ }, Ss = (e) => {
1042
+ const t = Ge(), r = e ?? t;
1043
+ return it(
1036
1044
  (s) => r.subscribe(s),
1037
1045
  () => r.getStats(),
1038
1046
  () => r.getStats()
1039
1047
  );
1040
- }, oe = 1, Ge = Object.freeze({
1048
+ }, oe = 1, ze = Object.freeze({
1041
1049
  version: oe,
1042
1050
  trackers: {
1043
1051
  face: { enabled: !0, numFaces: 1, targetFps: null, holdMs: 250, predictMs: 0, smoothing: 0 },
@@ -1065,13 +1073,13 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1065
1073
  fallbacks: { onUnsupported: "degrade", delegate: "auto" },
1066
1074
  assets: { holisticModelUrl: null, semanticSegmentationModelUrl: null },
1067
1075
  updatedAt: 0
1068
- }), P = (e, t, r, s, a, n) => {
1076
+ }), U = (e, t, r, s, a, n) => {
1069
1077
  if (e === void 0) return t;
1070
1078
  if (typeof e != "number" || !Number.isFinite(e))
1071
1079
  return n(`${a}: not a number, kept ${t}`), t;
1072
1080
  const o = Math.min(s, Math.max(r, e));
1073
1081
  return o !== e && n(`${a}: ${e} clamped to ${o}`), o;
1074
- }, Y = (e, t, r, s) => e === void 0 ? t : e === null ? null : typeof e != "number" || !Number.isFinite(e) || e <= 0 ? (s(`${r}: invalid fps, kept ${t}`), t) : (e > 120 && s(`${r}: ${e} clamped to 120`), Math.min(120, e)), mr = [
1082
+ }, Q = (e, t, r, s) => e === void 0 ? t : e === null ? null : typeof e != "number" || !Number.isFinite(e) || e <= 0 ? (s(`${r}: invalid fps, kept ${t}`), t) : (e > 120 && s(`${r}: ${e} clamped to 120`), Math.min(120, e)), fr = [
1075
1083
  "tiers",
1076
1084
  "budget",
1077
1085
  "initialTier",
@@ -1079,32 +1087,32 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1079
1087
  "maxTier",
1080
1088
  "adaptive",
1081
1089
  "historySize"
1082
- ], ke = (e) => {
1090
+ ], ve = (e) => {
1083
1091
  const t = {};
1084
- for (const r of mr) e[r] !== void 0 && (t[r] = e[r]);
1092
+ for (const r of fr) e[r] !== void 0 && (t[r] = e[r]);
1085
1093
  return t;
1086
- }, I = (e, t, r, s) => e === void 0 ? t : typeof e != "boolean" ? (s(`${r}: not a boolean, kept ${t}`), t) : e, $ = (e, t, r, s, a) => e === void 0 ? r : t.includes(e) ? e : (a(`${s}: "${String(e)}" is not one of ${t.join(" | ")}, kept ${r}`), r), ve = (e, t, r, s) => e === void 0 ? t : e === null ? null : typeof e != "string" || !/^https?:\/\//.test(e) ? (s(`${r}: not an http(s) URL, kept ${t === null ? "the SDK default" : t}`), t) : e, X = (e = {}, t = Ge, r = []) => {
1087
- var c, i, l, h, m, f, u, d, g, T, p, S, E, q, b, w, W, Q, ee, te, re, V, M, C, R, v, j, H, N, Z, fe, pe, he, ge, ye, Se, Te, Me;
1088
- const s = (We) => r.push(We), a = e.trackers ?? {}, n = t.trackers, o = e.quality === void 0 ? t.quality === !1 ? !1 : ke(t.quality) : e.quality === !1 ? !1 : typeof e.quality == "object" && e.quality !== null ? ke(e.quality) : (s("quality: must be an object or false, kept base"), t.quality);
1094
+ }, G = (e, t, r, s) => e === void 0 ? t : typeof e != "boolean" ? (s(`${r}: not a boolean, kept ${t}`), t) : e, X = (e, t, r, s, a) => e === void 0 ? r : t.includes(e) ? e : (a(`${s}: "${String(e)}" is not one of ${t.join(" | ")}, kept ${r}`), r), we = (e, t, r, s) => e === void 0 ? t : e === null ? null : typeof e != "string" || !/^https?:\/\//.test(e) ? (s(`${r}: not an http(s) URL, kept ${t === null ? "the SDK default" : t}`), t) : e, K = (e = {}, t = ze, r = []) => {
1095
+ var c, i, l, p, d, f, m, u, g, M, h, y, E, L, T, _, N, B, H, te, re, Y, b, C, A, w, Z, j, I, J, pe, he, ge, ye, Se, Te, Me, Ee;
1096
+ const s = (Be) => r.push(Be), a = e.trackers ?? {}, n = t.trackers, o = e.quality === void 0 ? t.quality === !1 ? !1 : ve(t.quality) : e.quality === !1 ? !1 : typeof e.quality == "object" && e.quality !== null ? ve(e.quality) : (s("quality: must be an object or false, kept base"), t.quality);
1089
1097
  return {
1090
1098
  version: oe,
1091
1099
  trackers: {
1092
1100
  face: {
1093
- enabled: I((c = a.face) == null ? void 0 : c.enabled, n.face.enabled, "trackers.face.enabled", s),
1101
+ enabled: G((c = a.face) == null ? void 0 : c.enabled, n.face.enabled, "trackers.face.enabled", s),
1094
1102
  numFaces: Math.round(
1095
- P((i = a.face) == null ? void 0 : i.numFaces, n.face.numFaces, 1, 10, "trackers.face.numFaces", s)
1103
+ U((i = a.face) == null ? void 0 : i.numFaces, n.face.numFaces, 1, 10, "trackers.face.numFaces", s)
1096
1104
  ),
1097
- targetFps: Y((l = a.face) == null ? void 0 : l.targetFps, n.face.targetFps, "trackers.face.targetFps", s),
1098
- holdMs: P((h = a.face) == null ? void 0 : h.holdMs, n.face.holdMs, 0, 5e3, "trackers.face.holdMs", s),
1099
- predictMs: P(
1100
- (m = a.face) == null ? void 0 : m.predictMs,
1105
+ targetFps: Q((l = a.face) == null ? void 0 : l.targetFps, n.face.targetFps, "trackers.face.targetFps", s),
1106
+ holdMs: U((p = a.face) == null ? void 0 : p.holdMs, n.face.holdMs, 0, 5e3, "trackers.face.holdMs", s),
1107
+ predictMs: U(
1108
+ (d = a.face) == null ? void 0 : d.predictMs,
1101
1109
  n.face.predictMs,
1102
1110
  0,
1103
1111
  1e3,
1104
1112
  "trackers.face.predictMs",
1105
1113
  s
1106
1114
  ),
1107
- smoothing: P(
1115
+ smoothing: U(
1108
1116
  (f = a.face) == null ? void 0 : f.smoothing,
1109
1117
  n.face.smoothing,
1110
1118
  0,
@@ -1114,47 +1122,47 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1114
1122
  )
1115
1123
  },
1116
1124
  hand: {
1117
- enabled: I((u = a.hand) == null ? void 0 : u.enabled, n.hand.enabled, "trackers.hand.enabled", s),
1118
- targetFps: Y((d = a.hand) == null ? void 0 : d.targetFps, n.hand.targetFps, "trackers.hand.targetFps", s)
1125
+ enabled: G((m = a.hand) == null ? void 0 : m.enabled, n.hand.enabled, "trackers.hand.enabled", s),
1126
+ targetFps: Q((u = a.hand) == null ? void 0 : u.targetFps, n.hand.targetFps, "trackers.hand.targetFps", s)
1119
1127
  },
1120
1128
  gesture: {
1121
- enabled: I((g = a.gesture) == null ? void 0 : g.enabled, n.gesture.enabled, "trackers.gesture.enabled", s),
1122
- targetFps: Y(
1123
- (T = a.gesture) == null ? void 0 : T.targetFps,
1129
+ enabled: G((g = a.gesture) == null ? void 0 : g.enabled, n.gesture.enabled, "trackers.gesture.enabled", s),
1130
+ targetFps: Q(
1131
+ (M = a.gesture) == null ? void 0 : M.targetFps,
1124
1132
  n.gesture.targetFps,
1125
1133
  "trackers.gesture.targetFps",
1126
1134
  s
1127
1135
  )
1128
1136
  },
1129
1137
  body: {
1130
- enabled: I((p = a.body) == null ? void 0 : p.enabled, n.body.enabled, "trackers.body.enabled", s),
1131
- targetFps: Y((S = a.body) == null ? void 0 : S.targetFps, n.body.targetFps, "trackers.body.targetFps", s)
1138
+ enabled: G((h = a.body) == null ? void 0 : h.enabled, n.body.enabled, "trackers.body.enabled", s),
1139
+ targetFps: Q((y = a.body) == null ? void 0 : y.targetFps, n.body.targetFps, "trackers.body.targetFps", s)
1132
1140
  },
1133
1141
  holistic: {
1134
- enabled: I((E = a.holistic) == null ? void 0 : E.enabled, n.holistic.enabled, "trackers.holistic.enabled", s),
1135
- targetFps: Y(
1136
- (q = a.holistic) == null ? void 0 : q.targetFps,
1142
+ enabled: G((E = a.holistic) == null ? void 0 : E.enabled, n.holistic.enabled, "trackers.holistic.enabled", s),
1143
+ targetFps: Q(
1144
+ (L = a.holistic) == null ? void 0 : L.targetFps,
1137
1145
  n.holistic.targetFps,
1138
1146
  "trackers.holistic.targetFps",
1139
1147
  s
1140
1148
  ),
1141
- hands: $(
1142
- (b = a.holistic) == null ? void 0 : b.hands,
1149
+ hands: X(
1150
+ (T = a.holistic) == null ? void 0 : T.hands,
1143
1151
  ["both", "left", "right", "none"],
1144
1152
  n.holistic.hands,
1145
1153
  "trackers.holistic.hands",
1146
1154
  s
1147
1155
  ),
1148
- holdMs: P(
1149
- (w = a.holistic) == null ? void 0 : w.holdMs,
1156
+ holdMs: U(
1157
+ (_ = a.holistic) == null ? void 0 : _.holdMs,
1150
1158
  n.holistic.holdMs,
1151
1159
  0,
1152
1160
  5e3,
1153
1161
  "trackers.holistic.holdMs",
1154
1162
  s
1155
1163
  ),
1156
- predictMs: P(
1157
- (W = a.holistic) == null ? void 0 : W.predictMs,
1164
+ predictMs: U(
1165
+ (N = a.holistic) == null ? void 0 : N.predictMs,
1158
1166
  n.holistic.predictMs,
1159
1167
  0,
1160
1168
  1e3,
@@ -1162,8 +1170,8 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1162
1170
  s
1163
1171
  ),
1164
1172
  analysisMaxDimension: Math.round(
1165
- P(
1166
- (Q = a.holistic) == null ? void 0 : Q.analysisMaxDimension,
1173
+ U(
1174
+ (B = a.holistic) == null ? void 0 : B.analysisMaxDimension,
1167
1175
  n.holistic.analysisMaxDimension,
1168
1176
  128,
1169
1177
  2048,
@@ -1171,13 +1179,13 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1171
1179
  s
1172
1180
  )
1173
1181
  ),
1174
- outputFaceBlendshapes: I(
1175
- (ee = a.holistic) == null ? void 0 : ee.outputFaceBlendshapes,
1182
+ outputFaceBlendshapes: G(
1183
+ (H = a.holistic) == null ? void 0 : H.outputFaceBlendshapes,
1176
1184
  n.holistic.outputFaceBlendshapes,
1177
1185
  "trackers.holistic.outputFaceBlendshapes",
1178
1186
  s
1179
1187
  ),
1180
- confidence: P(
1188
+ confidence: U(
1181
1189
  (te = a.holistic) == null ? void 0 : te.confidence,
1182
1190
  n.holistic.confidence,
1183
1191
  0,
@@ -1185,7 +1193,7 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1185
1193
  "trackers.holistic.confidence",
1186
1194
  s
1187
1195
  ),
1188
- delegate: $(
1196
+ delegate: X(
1189
1197
  (re = a.holistic) == null ? void 0 : re.delegate,
1190
1198
  ["auto", "GPU", "CPU"],
1191
1199
  n.holistic.delegate,
@@ -1194,14 +1202,14 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1194
1202
  )
1195
1203
  },
1196
1204
  segmentation: {
1197
- enabled: I(
1198
- (V = a.segmentation) == null ? void 0 : V.enabled,
1205
+ enabled: G(
1206
+ (Y = a.segmentation) == null ? void 0 : Y.enabled,
1199
1207
  n.segmentation.enabled,
1200
1208
  "trackers.segmentation.enabled",
1201
1209
  s
1202
1210
  ),
1203
- quality: $(
1204
- (M = a.segmentation) == null ? void 0 : M.quality,
1211
+ quality: X(
1212
+ (b = a.segmentation) == null ? void 0 : b.quality,
1205
1213
  ["low", "medium", "high"],
1206
1214
  n.segmentation.quality,
1207
1215
  "trackers.segmentation.quality",
@@ -1209,21 +1217,21 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1209
1217
  )
1210
1218
  },
1211
1219
  semanticSegmentation: {
1212
- enabled: I(
1220
+ enabled: G(
1213
1221
  (C = a.semanticSegmentation) == null ? void 0 : C.enabled,
1214
1222
  n.semanticSegmentation.enabled,
1215
1223
  "trackers.semanticSegmentation.enabled",
1216
1224
  s
1217
1225
  ),
1218
- preset: $(
1219
- (R = a.semanticSegmentation) == null ? void 0 : R.preset,
1220
- Ft,
1226
+ preset: X(
1227
+ (A = a.semanticSegmentation) == null ? void 0 : A.preset,
1228
+ xt,
1221
1229
  n.semanticSegmentation.preset,
1222
1230
  "trackers.semanticSegmentation.preset",
1223
1231
  s
1224
1232
  ),
1225
- quality: $(
1226
- (v = a.semanticSegmentation) == null ? void 0 : v.quality,
1233
+ quality: X(
1234
+ (w = a.semanticSegmentation) == null ? void 0 : w.quality,
1227
1235
  ["low", "medium", "high"],
1228
1236
  n.semanticSegmentation.quality,
1229
1237
  "trackers.semanticSegmentation.quality",
@@ -1232,11 +1240,11 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1232
1240
  }
1233
1241
  },
1234
1242
  perf: {
1235
- targetFps: P((j = e.perf) == null ? void 0 : j.targetFps, t.perf.targetFps, 0, 120, "perf.targetFps", s),
1236
- camRes: Math.round(P((H = e.perf) == null ? void 0 : H.camRes, t.perf.camRes, 160, 3840, "perf.camRes", s)),
1237
- cameraZoom: P((N = e.perf) == null ? void 0 : N.cameraZoom, t.perf.cameraZoom, 1, 3, "perf.cameraZoom", s),
1238
- analysisScale: P(
1239
- (Z = e.perf) == null ? void 0 : Z.analysisScale,
1243
+ targetFps: U((Z = e.perf) == null ? void 0 : Z.targetFps, t.perf.targetFps, 0, 120, "perf.targetFps", s),
1244
+ camRes: Math.round(U((j = e.perf) == null ? void 0 : j.camRes, t.perf.camRes, 160, 3840, "perf.camRes", s)),
1245
+ cameraZoom: U((I = e.perf) == null ? void 0 : I.cameraZoom, t.perf.cameraZoom, 1, 3, "perf.cameraZoom", s),
1246
+ analysisScale: U(
1247
+ (J = e.perf) == null ? void 0 : J.analysisScale,
1240
1248
  t.perf.analysisScale,
1241
1249
  0.25,
1242
1250
  1,
@@ -1245,8 +1253,8 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1245
1253
  )
1246
1254
  },
1247
1255
  lifecycle: {
1248
- pauseWhenHidden: I(
1249
- (fe = e.lifecycle) == null ? void 0 : fe.pauseWhenHidden,
1256
+ pauseWhenHidden: G(
1257
+ (pe = e.lifecycle) == null ? void 0 : pe.pauseWhenHidden,
1250
1258
  t.lifecycle.pauseWhenHidden,
1251
1259
  "lifecycle.pauseWhenHidden",
1252
1260
  s
@@ -1254,26 +1262,26 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1254
1262
  },
1255
1263
  quality: o,
1256
1264
  camera: {
1257
- facingMode: $(
1258
- (pe = e.camera) == null ? void 0 : pe.facingMode,
1265
+ facingMode: X(
1266
+ (he = e.camera) == null ? void 0 : he.facingMode,
1259
1267
  ["user", "environment"],
1260
1268
  t.camera.facingMode,
1261
1269
  "camera.facingMode",
1262
1270
  s
1263
1271
  ),
1264
- deviceId: ((he = e.camera) == null ? void 0 : he.deviceId) === void 0 ? t.camera.deviceId : typeof e.camera.deviceId == "string" || e.camera.deviceId === null ? e.camera.deviceId : (s("camera.deviceId: not a string, kept base"), t.camera.deviceId),
1265
- mirrored: ((ge = e.camera) == null ? void 0 : ge.mirrored) === void 0 ? t.camera.mirrored : e.camera.mirrored === "auto" || typeof e.camera.mirrored == "boolean" ? e.camera.mirrored : (s('camera.mirrored: must be boolean or "auto", kept base'), t.camera.mirrored)
1272
+ deviceId: ((ge = e.camera) == null ? void 0 : ge.deviceId) === void 0 ? t.camera.deviceId : typeof e.camera.deviceId == "string" || e.camera.deviceId === null ? e.camera.deviceId : (s("camera.deviceId: not a string, kept base"), t.camera.deviceId),
1273
+ mirrored: ((ye = e.camera) == null ? void 0 : ye.mirrored) === void 0 ? t.camera.mirrored : e.camera.mirrored === "auto" || typeof e.camera.mirrored == "boolean" ? e.camera.mirrored : (s('camera.mirrored: must be boolean or "auto", kept base'), t.camera.mirrored)
1266
1274
  },
1267
1275
  fallbacks: {
1268
- onUnsupported: $(
1269
- (ye = e.fallbacks) == null ? void 0 : ye.onUnsupported,
1276
+ onUnsupported: X(
1277
+ (Se = e.fallbacks) == null ? void 0 : Se.onUnsupported,
1270
1278
  ["block", "degrade"],
1271
1279
  t.fallbacks.onUnsupported,
1272
1280
  "fallbacks.onUnsupported",
1273
1281
  s
1274
1282
  ),
1275
- delegate: $(
1276
- (Se = e.fallbacks) == null ? void 0 : Se.delegate,
1283
+ delegate: X(
1284
+ (Te = e.fallbacks) == null ? void 0 : Te.delegate,
1277
1285
  ["auto", "GPU", "CPU"],
1278
1286
  t.fallbacks.delegate,
1279
1287
  "fallbacks.delegate",
@@ -1281,14 +1289,14 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1281
1289
  )
1282
1290
  },
1283
1291
  assets: {
1284
- holisticModelUrl: ve(
1285
- (Te = e.assets) == null ? void 0 : Te.holisticModelUrl,
1292
+ holisticModelUrl: we(
1293
+ (Me = e.assets) == null ? void 0 : Me.holisticModelUrl,
1286
1294
  t.assets.holisticModelUrl,
1287
1295
  "assets.holisticModelUrl",
1288
1296
  s
1289
1297
  ),
1290
- semanticSegmentationModelUrl: ve(
1291
- (Me = e.assets) == null ? void 0 : Me.semanticSegmentationModelUrl,
1298
+ semanticSegmentationModelUrl: we(
1299
+ (Ee = e.assets) == null ? void 0 : Ee.semanticSegmentationModelUrl,
1292
1300
  t.assets.semanticSegmentationModelUrl,
1293
1301
  "assets.semanticSegmentationModelUrl",
1294
1302
  s
@@ -1296,7 +1304,7 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1296
1304
  },
1297
1305
  updatedAt: typeof e.updatedAt == "number" && Number.isFinite(e.updatedAt) ? e.updatedAt : t.updatedAt
1298
1306
  };
1299
- }, we = (e, t, r = Date.now()) => X({ ...t, updatedAt: r }, e), ze = (e) => JSON.stringify(X({}, e)), qe = (e) => {
1307
+ }, De = (e, t, r = Date.now()) => K({ ...t, updatedAt: r }, e), qe = (e) => JSON.stringify(K({}, e)), We = (e) => {
1300
1308
  const t = [];
1301
1309
  let r = e;
1302
1310
  if (typeof e == "string")
@@ -1304,22 +1312,22 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1304
1312
  r = JSON.parse(e);
1305
1313
  } catch {
1306
1314
  return {
1307
- config: X(),
1315
+ config: K(),
1308
1316
  migrated: !0,
1309
1317
  warnings: ["not valid JSON; defaults used"]
1310
1318
  };
1311
1319
  }
1312
1320
  if (!r || typeof r != "object")
1313
1321
  return {
1314
- config: X(),
1322
+ config: K(),
1315
1323
  migrated: !0,
1316
1324
  warnings: ["not an object; defaults used"]
1317
1325
  };
1318
1326
  const s = r, a = s.version !== oe;
1319
1327
  return a && t.push(
1320
1328
  `migrated from version ${String(s.version ?? "none")} to ${oe}`
1321
- ), { config: X(s, Ge, t), migrated: a, warnings: t };
1322
- }, Ss = [
1329
+ ), { config: K(s, ze, t), migrated: a, warnings: t };
1330
+ }, Ts = [
1323
1331
  "face",
1324
1332
  "hand",
1325
1333
  "gesture",
@@ -1327,7 +1335,7 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1327
1335
  "holistic",
1328
1336
  "segmentation",
1329
1337
  "semanticSegmentation"
1330
- ], fr = (e) => ({
1338
+ ], pr = (e) => ({
1331
1339
  perf: {
1332
1340
  targetFps: e.perf.targetFps > 0 ? e.perf.targetFps : void 0,
1333
1341
  camRes: e.perf.camRes,
@@ -1336,25 +1344,25 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1336
1344
  },
1337
1345
  lifecycle: { pauseWhenHidden: e.lifecycle.pauseWhenHidden },
1338
1346
  quality: e.quality
1339
- }), pr = (e) => ({
1347
+ }), hr = (e) => ({
1340
1348
  facingMode: e.camera.facingMode,
1341
1349
  ...e.camera.deviceId ? { deviceId: e.camera.deviceId } : {},
1342
1350
  ...e.camera.mirrored === "auto" ? {} : { mirrored: e.camera.mirrored }
1343
- }), G = (e) => e === null ? {} : { targetFps: e }, hr = (e, t) => {
1351
+ }), q = (e) => e === null ? {} : { targetFps: e }, gr = (e, t) => {
1344
1352
  const r = e.trackers;
1345
1353
  return {
1346
1354
  face: {
1347
1355
  numFaces: r.face.numFaces,
1348
- ...G(r.face.targetFps),
1356
+ ...q(r.face.targetFps),
1349
1357
  holdMs: r.face.holdMs,
1350
1358
  predictMs: r.face.predictMs,
1351
1359
  active: r.face.enabled
1352
1360
  },
1353
- hand: { ...G(r.hand.targetFps), active: r.hand.enabled },
1354
- gesture: { ...G(r.gesture.targetFps), active: r.gesture.enabled },
1361
+ hand: { ...q(r.hand.targetFps), active: r.hand.enabled },
1362
+ gesture: { ...q(r.gesture.targetFps), active: r.gesture.enabled },
1355
1363
  body: { active: r.body.enabled },
1356
1364
  holistic: {
1357
- ...G(r.holistic.targetFps),
1365
+ ...q(r.holistic.targetFps),
1358
1366
  hands: r.holistic.hands,
1359
1367
  holdMs: r.holistic.holdMs,
1360
1368
  predictMs: r.holistic.predictMs,
@@ -1372,21 +1380,21 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1372
1380
  active: r.semanticSegmentation.enabled
1373
1381
  }
1374
1382
  }[t];
1375
- }, gr = (e, t) => {
1383
+ }, yr = (e, t) => {
1376
1384
  const r = e.trackers;
1377
1385
  switch (t) {
1378
- case _.FACE_TRACKER:
1379
- return { numFaces: r.face.numFaces, ...G(r.face.targetFps) };
1380
- case _.HAND_TRACKER:
1381
- return { ...G(r.hand.targetFps) };
1382
- case _.GESTURE_TRACKER:
1383
- return { ...G(r.gesture.targetFps) };
1384
- case _.BODY_TRACKER:
1385
- return { ...G(r.body.targetFps) };
1386
- case _.HOLISTIC_TRACKER: {
1386
+ case k.FACE_TRACKER:
1387
+ return { numFaces: r.face.numFaces, ...q(r.face.targetFps) };
1388
+ case k.HAND_TRACKER:
1389
+ return { ...q(r.hand.targetFps) };
1390
+ case k.GESTURE_TRACKER:
1391
+ return { ...q(r.gesture.targetFps) };
1392
+ case k.BODY_TRACKER:
1393
+ return { ...q(r.body.targetFps) };
1394
+ case k.HOLISTIC_TRACKER: {
1387
1395
  const s = r.holistic;
1388
1396
  return {
1389
- ...G(s.targetFps),
1397
+ ...q(s.targetFps),
1390
1398
  hands: s.hands,
1391
1399
  holdMs: s.holdMs,
1392
1400
  predictMs: s.predictMs,
@@ -1401,9 +1409,9 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1401
1409
  ...e.assets.holisticModelUrl ? { modelUrl: e.assets.holisticModelUrl } : {}
1402
1410
  };
1403
1411
  }
1404
- case _.BACKGROUND_SEGMENTATION:
1412
+ case k.BACKGROUND_SEGMENTATION:
1405
1413
  return { quality: r.segmentation.quality };
1406
- case _.SEMANTIC_SEGMENTATION:
1414
+ case k.SEMANTIC_SEGMENTATION:
1407
1415
  return {
1408
1416
  preset: r.semanticSegmentation.preset,
1409
1417
  quality: r.semanticSegmentation.quality,
@@ -1412,275 +1420,275 @@ const rr = (e, t, r) => e === "infinite" || e === "loop" && t < Math.max(1, Math
1412
1420
  default:
1413
1421
  return {};
1414
1422
  }
1415
- }, yr = (e) => {
1423
+ }, Sr = (e) => {
1416
1424
  const t = e.trackers, r = [];
1417
- return t.face.enabled && r.push(_.FACE_TRACKER), t.hand.enabled && r.push(_.HAND_TRACKER), t.gesture.enabled && r.push(_.GESTURE_TRACKER), t.body.enabled && r.push(_.BODY_TRACKER), t.holistic.enabled && r.push(_.HOLISTIC_TRACKER), t.segmentation.enabled && r.push(_.BACKGROUND_SEGMENTATION), t.semanticSegmentation.enabled && r.push(_.SEMANTIC_SEGMENTATION), r;
1418
- }, ie = "vincentt.xr.tracking-config", me = () => {
1425
+ return t.face.enabled && r.push(k.FACE_TRACKER), t.hand.enabled && r.push(k.HAND_TRACKER), t.gesture.enabled && r.push(k.GESTURE_TRACKER), t.body.enabled && r.push(k.BODY_TRACKER), t.holistic.enabled && r.push(k.HOLISTIC_TRACKER), t.segmentation.enabled && r.push(k.BACKGROUND_SEGMENTATION), t.semanticSegmentation.enabled && r.push(k.SEMANTIC_SEGMENTATION), r;
1426
+ }, ce = "vincentt.xr.tracking-config", fe = () => {
1419
1427
  try {
1420
1428
  return typeof localStorage < "u" ? localStorage : null;
1421
1429
  } catch {
1422
1430
  return null;
1423
1431
  }
1424
- }, Sr = (e = ie, t = me()) => {
1432
+ }, Tr = (e = ce, t = fe()) => {
1425
1433
  if (!t) return null;
1426
1434
  try {
1427
1435
  const r = t.getItem(e);
1428
- return r ? qe(r) : null;
1436
+ return r ? We(r) : null;
1429
1437
  } catch {
1430
1438
  return null;
1431
1439
  }
1432
- }, De = (e, t = ie, r = me()) => {
1440
+ }, Ue = (e, t = ce, r = fe()) => {
1433
1441
  if (!r) return !1;
1434
1442
  try {
1435
- return r.setItem(t, ze(e)), !0;
1443
+ return r.setItem(t, qe(e)), !0;
1436
1444
  } catch {
1437
1445
  return !1;
1438
1446
  }
1439
- }, Tr = (e = ie, t = me()) => {
1447
+ }, Mr = (e = ce, t = fe()) => {
1440
1448
  if (t)
1441
1449
  try {
1442
1450
  t.removeItem(e);
1443
1451
  } catch {
1444
1452
  }
1445
- }, Ts = (e = {}) => {
1446
- const { storageKey: t = ie, persist: r = !0 } = e, s = e.storage, a = A(e.initial), n = z(() => X(a.current ?? {}), []), [o, c] = k(n), [i, l] = k([]), [h, m] = k(!r), f = A(o);
1453
+ }, Ms = (e = {}) => {
1454
+ const { storageKey: t = ce, persist: r = !0 } = e, s = e.storage, a = R(e.initial), n = W(() => K(a.current ?? {}), []), [o, c] = v(n), [i, l] = v([]), [p, d] = v(!r), f = R(o);
1447
1455
  f.current = o, x(() => {
1448
1456
  if (!r) {
1449
- m(!0);
1457
+ d(!0);
1450
1458
  return;
1451
1459
  }
1452
- const p = Sr(t, s);
1453
- if (p) {
1454
- const S = X(p.config, n);
1455
- f.current = S, c(S), l(p.warnings), p.migrated && De(S, t, s);
1460
+ const h = Tr(t, s);
1461
+ if (h) {
1462
+ const y = K(h.config, n);
1463
+ f.current = y, c(y), l(h.warnings), h.migrated && Ue(y, t, s);
1456
1464
  }
1457
- m(!0);
1465
+ d(!0);
1458
1466
  }, [r, t, s, n]);
1459
- const u = F(
1460
- (p, S) => (f.current = p, c(p), l(S), r && De(p, t, s), p),
1467
+ const m = F(
1468
+ (h, y) => (f.current = h, c(h), l(y), r && Ue(h, t, s), h),
1461
1469
  [r, t, s]
1462
- ), d = F(
1463
- (p) => {
1464
- const S = [], E = X({ ...p, updatedAt: Date.now() }, f.current, S);
1465
- return u(E, S);
1470
+ ), u = F(
1471
+ (h) => {
1472
+ const y = [], E = K({ ...h, updatedAt: Date.now() }, f.current, y);
1473
+ return m(E, y);
1466
1474
  },
1467
- [u]
1475
+ [m]
1468
1476
  ), g = F(() => {
1469
- const p = we(n, {}, 0);
1470
- return f.current = p, c(p), l([]), r && Tr(t, s), p;
1471
- }, [n, r, t, s]), T = F(
1472
- (p) => {
1473
- const S = qe(p);
1474
- return S.warnings.some((E) => E.startsWith("not valid JSON") || E.startsWith("not an object")) ? (l([`import: ${S.warnings[0]}; config unchanged`]), f.current) : u(we(S.config, {}, Date.now()), S.warnings);
1477
+ const h = De(n, {}, 0);
1478
+ return f.current = h, c(h), l([]), r && Mr(t, s), h;
1479
+ }, [n, r, t, s]), M = F(
1480
+ (h) => {
1481
+ const y = We(h);
1482
+ return y.warnings.some((E) => E.startsWith("not valid JSON") || E.startsWith("not an object")) ? (l([`import: ${y.warnings[0]}; config unchanged`]), f.current) : m(De(y.config, {}, Date.now()), y.warnings);
1475
1483
  },
1476
- [u]
1484
+ [m]
1477
1485
  );
1478
- return z(
1486
+ return W(
1479
1487
  () => ({
1480
1488
  config: o,
1481
- hydrated: h,
1489
+ hydrated: p,
1482
1490
  warnings: i,
1483
- update: d,
1491
+ update: u,
1484
1492
  reset: g,
1485
- importJson: T,
1486
- json: ze(o),
1487
- providerProps: fr(o),
1488
- cameraRequest: pr(o),
1489
- trackerProps: (p) => hr(o, p),
1490
- modelOptions: (p) => gr(o, p),
1491
- enabledModels: yr(o)
1493
+ importJson: M,
1494
+ json: qe(o),
1495
+ providerProps: pr(o),
1496
+ cameraRequest: hr(o),
1497
+ trackerProps: (h) => gr(o, h),
1498
+ modelOptions: (h) => yr(o, h),
1499
+ enabledModels: Sr(o)
1492
1500
  }),
1493
- [o, h, i, d, g, T]
1501
+ [o, p, i, u, g, M]
1494
1502
  );
1495
1503
  };
1496
1504
  export {
1497
- Br as AspectRatioContainer,
1498
- tr as AudioEngine,
1499
- ts as AudioPlayer,
1505
+ Hr as AspectRatioContainer,
1506
+ rr as AudioEngine,
1507
+ rs as AudioPlayer,
1500
1508
  $r as Axes,
1501
- Zr as Button,
1502
- Je as CAMERA_PERMISSION_MESSAGES,
1503
- ms as CameraPermissionGate,
1504
- _n as DEFAULT_ASSET_BUDGET_BYTES,
1505
- un as DEFAULT_MATERIAL_FILL,
1509
+ Yr as Button,
1510
+ Qe as CAMERA_PERMISSION_MESSAGES,
1511
+ fs as CameraPermissionGate,
1512
+ Fn as DEFAULT_ASSET_BUDGET_BYTES,
1513
+ dn as DEFAULT_MATERIAL_FILL,
1506
1514
  Re as DEFAULT_MESH_RENDERER,
1507
- En as DEFAULT_MESH_RENDERER_RENDER_STATE,
1508
- bs as DEFAULT_PERFORMANCE_BUDGET,
1515
+ bn as DEFAULT_MESH_RENDERER_RENDER_STATE,
1516
+ As as DEFAULT_PERFORMANCE_BUDGET,
1509
1517
  Rs as DEFAULT_PIXEL_SNAP_INCREMENT,
1510
- As as DEFAULT_QUALITY_TIERS,
1511
- Fs as DEFAULT_REFERENCE_PIXELS_PER_UNIT,
1512
- Pa as DEFAULT_SCREEN_GLASS,
1513
- dn as DEFAULT_SCREEN_GRADIENT,
1514
- Ua as DEFAULT_SCREEN_IMAGE_SCENE_SETTINGS,
1515
- Na as DEFAULT_SCREEN_IMAGE_SETTINGS,
1516
- La as DEFAULT_SCREEN_SHAPE_SETTINGS,
1517
- Ia as DEFAULT_SCREEN_TEXT_SCENE_SETTINGS,
1518
- Oa as DEFAULT_SCREEN_TEXT_SHADOW_LAYER,
1518
+ Fs as DEFAULT_QUALITY_TIERS,
1519
+ xs as DEFAULT_REFERENCE_PIXELS_PER_UNIT,
1520
+ Na as DEFAULT_SCREEN_GLASS,
1521
+ mn as DEFAULT_SCREEN_GRADIENT,
1522
+ Pa as DEFAULT_SCREEN_IMAGE_SCENE_SETTINGS,
1523
+ La as DEFAULT_SCREEN_IMAGE_SETTINGS,
1524
+ Ia as DEFAULT_SCREEN_SHAPE_SETTINGS,
1525
+ Oa as DEFAULT_SCREEN_TEXT_SCENE_SETTINGS,
1526
+ Ga as DEFAULT_SCREEN_TEXT_SHADOW_LAYER,
1519
1527
  Cs as DEFAULT_SCREEN_TRANSFORM_2D,
1520
- xs as DEFAULT_SCREEN_TRANSFORM_ROOT,
1521
- Ge as DEFAULT_TRACKING_CONFIG,
1522
- K as DEFAULT_TRANSFORM_3D,
1523
- mn as EXTERNAL_BACKGROUND_RENDER_LAYER,
1524
- gt as FULL_SCREEN_ANCHORS,
1525
- Vr as HtmlRegion,
1526
- Yr as Light,
1527
- Tt as LightObject,
1528
- Ja as LookAt,
1529
- fn as MAX_RENDER_GROUP_PASSES,
1530
- pn as MaterialFill,
1531
- An as MeshMaterial,
1532
- At as MeshRenderer,
1533
- Kr as Model,
1534
- jr as Object3D,
1535
- zr as Panel,
1536
- Wr as PersonCutout,
1537
- Ga as PinToMesh,
1538
- Qa as RenderGroupLayer,
1539
- en as SCREEN_IMAGE_MASK_CHANNELS,
1540
- nn as Scene,
1541
- tn as SceneObjectRenderer,
1542
- on as Scenes,
1543
- za as ScreenGlassMaterial,
1544
- hn as ScreenGradientMaterial,
1545
- yt as ScreenImage,
1546
- qa as ScreenShape,
1547
- va as ScreenSpaceUI,
1548
- rn as ScreenText,
1549
- Qe as ScreenTransform,
1550
- sn as SequentialRenderPasses,
1528
+ _s as DEFAULT_SCREEN_TRANSFORM_ROOT,
1529
+ ze as DEFAULT_TRACKING_CONFIG,
1530
+ V as DEFAULT_TRANSFORM_3D,
1531
+ fn as EXTERNAL_BACKGROUND_RENDER_LAYER,
1532
+ yt as FULL_SCREEN_ANCHORS,
1533
+ Zr as HtmlRegion,
1534
+ Jr as Light,
1535
+ Mt as LightObject,
1536
+ Qa as LookAt,
1537
+ pn as MAX_RENDER_GROUP_PASSES,
1538
+ hn as MaterialFill,
1539
+ vn as MeshMaterial,
1540
+ Ft as MeshRenderer,
1541
+ jr as Model,
1542
+ Vr as Object3D,
1543
+ qr as Panel,
1544
+ Br as PersonCutout,
1545
+ za as PinToMesh,
1546
+ en as RenderGroupLayer,
1547
+ tn as SCREEN_IMAGE_MASK_CHANNELS,
1548
+ on as Scene,
1549
+ rn as SceneObjectRenderer,
1550
+ cn as Scenes,
1551
+ qa as ScreenGlassMaterial,
1552
+ gn as ScreenGradientMaterial,
1553
+ St as ScreenImage,
1554
+ Wa as ScreenShape,
1555
+ wa as ScreenSpaceUI,
1556
+ sn as ScreenText,
1557
+ et as ScreenTransform,
1558
+ an as SequentialRenderPasses,
1551
1559
  Xr as SpriteAnimation,
1552
- Ss as TRACKER_KINDS,
1553
- ie as TRACKING_CONFIG_STORAGE_KEY,
1560
+ Ts as TRACKER_KINDS,
1561
+ ce as TRACKING_CONFIG_STORAGE_KEY,
1554
1562
  oe as TRACKING_CONFIG_VERSION,
1555
- wa as TextLabel,
1556
- Hr as ThemeProvider,
1563
+ Da as TextLabel,
1564
+ Kr as ThemeProvider,
1557
1565
  Rt as Transform3D,
1558
- qr as VideoBackground,
1559
- kn as XRAssetCache,
1560
- hs as XRAssetCacheProvider,
1561
- _s as XRMediaSource,
1562
- _ as XRModel,
1563
- ks as XRProvider,
1564
- vs as XRQualityController,
1565
- _a as XRScene,
1566
- ws as XR_FALLBACK_MESSAGES,
1567
- Ds as XR_MODEL_ASSET_URLS,
1568
- U as audio,
1569
- Ye as canPromptForCamera,
1570
- Tr as clearTrackingConfig,
1571
- Ps as clientToScreenPixels,
1572
- St as computeContainScale,
1573
- Us as computeFeedCrop,
1574
- Ns as computeFitLayout,
1575
- vn as createAssetCache,
1576
- Ls as createFallbackReason,
1577
- gn as createTwoStopGradient,
1578
- es as dataURLtoFile,
1579
- Pn as defineGltfAsset,
1580
- Un as defineTextureAsset,
1581
- Nn as defineVideoAsset,
1582
- Is as detectXRCapabilities,
1583
- Ln as disposeObject3D,
1584
- ja as drawNormalizedCrop,
1585
- yr as enabledModels,
1586
- In as estimateGeometryBytes,
1587
- On as estimateObjectBytes,
1588
- Gn as estimateTextureBytes,
1589
- Os as feedSidedName,
1590
- Gs as feedToScreenPixels,
1591
- zs as feedToSource,
1592
- qs as feedToTracker,
1593
- Ws as feedToViewport,
1594
- Bs as feedToWorld,
1595
- ps as findCameraByFacing,
1596
- Ne as getDefaultAssetCache,
1597
- yn as getRenderGroupLayer,
1598
- Mt as goToScene,
1566
+ Wr as VideoBackground,
1567
+ xn as XRAssetCache,
1568
+ gs as XRAssetCacheProvider,
1569
+ ks as XRMediaSource,
1570
+ k as XRModel,
1571
+ vs as XRProvider,
1572
+ ws as XRQualityController,
1573
+ ka as XRScene,
1574
+ Ds as XR_FALLBACK_MESSAGES,
1575
+ Us as XR_MODEL_ASSET_URLS,
1576
+ P as audio,
1577
+ Je as canPromptForCamera,
1578
+ Mr as clearTrackingConfig,
1579
+ Ns as clientToScreenPixels,
1580
+ Tt as computeContainScale,
1581
+ Ps as computeFeedCrop,
1582
+ Ls as computeFitLayout,
1583
+ Cn as createAssetCache,
1584
+ Is as createFallbackReason,
1585
+ yn as createTwoStopGradient,
1586
+ ts as dataURLtoFile,
1587
+ Nn as defineGltfAsset,
1588
+ Pn as defineTextureAsset,
1589
+ Ln as defineVideoAsset,
1590
+ Os as detectXRCapabilities,
1591
+ In as disposeObject3D,
1592
+ Va as drawNormalizedCrop,
1593
+ Sr as enabledModels,
1594
+ On as estimateGeometryBytes,
1595
+ Gn as estimateObjectBytes,
1596
+ zn as estimateTextureBytes,
1597
+ Gs as feedSidedName,
1598
+ zs as feedToScreenPixels,
1599
+ qs as feedToSource,
1600
+ Ws as feedToTracker,
1601
+ Bs as feedToViewport,
1602
+ Hs as feedToWorld,
1603
+ hs as findCameraByFacing,
1604
+ Le as getDefaultAssetCache,
1605
+ Sn as getRenderGroupLayer,
1606
+ Et as goToScene,
1599
1607
  $s as isFeedPointInSource,
1600
1608
  Xs as isMirroredSourceKind,
1601
- ls as isMuted,
1602
- fs as listCameras,
1603
- Sr as loadTrackingConfig,
1604
- Wa as mapScreenImageSettingsToProps,
1605
- Ba as mapScreenTextInnerShadowToProps,
1609
+ us as isMuted,
1610
+ ps as listCameras,
1611
+ Tr as loadTrackingConfig,
1612
+ Ba as mapScreenImageSettingsToProps,
1613
+ Ha as mapScreenTextInnerShadowToProps,
1606
1614
  $a as mapScreenTextSettingsToProps,
1607
- Hs as mediaToScreenPixels,
1615
+ Ks as mediaToScreenPixels,
1608
1616
  Xa as mergeScreenShapeSettings,
1609
- Ks as mergeScreenTransform2D,
1610
- we as mergeTrackingConfig,
1611
- js as mirrorFeedX,
1612
- bn as normalizeMeshRendererRenderState,
1613
- Ha as normalizeScreenGlass,
1614
- Sn as normalizeScreenGradient,
1615
- Vs as normalizedToScreenPixels,
1616
- Zs as normalizedToTransform2DPixels,
1617
- us as onMuteChange,
1618
- Ys as orientSourcePoint,
1619
- Js as orientedSize,
1620
- Qs as otherSide,
1621
- qe as parseTrackingConfig,
1622
- ea as personLeftSign,
1623
- ta as personSide,
1624
- os as playOneShot,
1625
- rs as prefetchMusic,
1626
- je as queryCameraPermission,
1627
- ss as registerSound,
1628
- Tn as renderSequentialPasses,
1629
- Ve as requestCameraAccess,
1630
- ra as resolveModelAssetUrl,
1631
- Va as resolveNormalizedCrop,
1632
- Za as resolvePersonCutoutStatus,
1633
- sa as resolveQualityConfig,
1634
- aa as resolveScreenTransform2D,
1635
- na as resolveTrackerSupport,
1636
- X as resolveTrackingConfig,
1637
- De as saveTrackingConfig,
1638
- oa as screenPixelsToClient,
1639
- ia as screenPixelsToFeed,
1640
- ca as screenPixelsToMedia,
1641
- la as screenPixelsToNormalized,
1642
- ua as screenPixelsToScreenSpace,
1643
- da as screenPixelsToUnits,
1644
- ma as screenPointToRay,
1645
- fa as screenSpaceToScreenPixels,
1646
- pa as screenTransform2DScale,
1647
- ha as screenUnitsToPixels,
1648
- ze as serializeTrackingConfig,
1649
- is as setMuted,
1650
- ht as shouldDrawFallback,
1651
- J as smoothNumber,
1652
- Or as smoothVector2,
1653
- Gr as smoothVector3,
1654
- ga as sourceToFeed,
1655
- as as startMusic,
1656
- ns as stopMusic,
1657
- Ze as subscribeCameraPermission,
1658
- ya as swapSidedName,
1659
- pr as toCameraRequest,
1660
- gr as toModelOptions,
1661
- fr as toProviderProps,
1662
- hr as toTrackerProps,
1663
- cs as toggleMuted,
1664
- Sa as trackerPointToScreenPixels,
1665
- Ta as trackerToFeed,
1666
- Ma as trackerToWorld,
1667
- Ea as transform2DPixelsToNormalized,
1668
- nr as useCameraPermission,
1669
- Qr as useFrameCapture,
1670
- Jr as useMediaRecorder,
1671
- ds as useMuted,
1672
- pt as usePersonMaskTexture,
1673
- cn as useSceneSample,
1674
- bt as useScreenRectAspect,
1675
- gs as useXRAsset,
1676
- Oe as useXRAssetCache,
1677
- ys as useXRAssetStats,
1678
- Cn as useXRCapabilities,
1679
- wn as useXRQuality,
1680
- Ts as useXRTrackingConfig,
1681
- ba as viewportSizeToTransform2DPixels,
1617
+ js as mergeScreenTransform2D,
1618
+ De as mergeTrackingConfig,
1619
+ Vs as mirrorFeedX,
1620
+ An as normalizeMeshRendererRenderState,
1621
+ Ka as normalizeScreenGlass,
1622
+ Tn as normalizeScreenGradient,
1623
+ Zs as normalizedToScreenPixels,
1624
+ Ys as normalizedToTransform2DPixels,
1625
+ ds as onMuteChange,
1626
+ Js as orientSourcePoint,
1627
+ Qs as orientedSize,
1628
+ ea as otherSide,
1629
+ We as parseTrackingConfig,
1630
+ ta as personLeftSign,
1631
+ ra as personSide,
1632
+ is as playOneShot,
1633
+ ss as prefetchMusic,
1634
+ Ve as queryCameraPermission,
1635
+ as as registerSound,
1636
+ Mn as renderSequentialPasses,
1637
+ Ze as requestCameraAccess,
1638
+ sa as resolveModelAssetUrl,
1639
+ Za as resolveNormalizedCrop,
1640
+ Ya as resolvePersonCutoutStatus,
1641
+ aa as resolveQualityConfig,
1642
+ na as resolveScreenTransform2D,
1643
+ oa as resolveTrackerSupport,
1644
+ K as resolveTrackingConfig,
1645
+ Ue as saveTrackingConfig,
1646
+ ia as screenPixelsToClient,
1647
+ ca as screenPixelsToFeed,
1648
+ la as screenPixelsToMedia,
1649
+ ua as screenPixelsToNormalized,
1650
+ da as screenPixelsToScreenSpace,
1651
+ ma as screenPixelsToUnits,
1652
+ fa as screenPointToRay,
1653
+ pa as screenSpaceToScreenPixels,
1654
+ ha as screenTransform2DScale,
1655
+ ga as screenUnitsToPixels,
1656
+ qe as serializeTrackingConfig,
1657
+ cs as setMuted,
1658
+ gt as shouldDrawFallback,
1659
+ ee as smoothNumber,
1660
+ Gr as smoothVector2,
1661
+ zr as smoothVector3,
1662
+ ya as sourceToFeed,
1663
+ ns as startMusic,
1664
+ os as stopMusic,
1665
+ Ye as subscribeCameraPermission,
1666
+ Sa as swapSidedName,
1667
+ hr as toCameraRequest,
1668
+ yr as toModelOptions,
1669
+ pr as toProviderProps,
1670
+ gr as toTrackerProps,
1671
+ ls as toggleMuted,
1672
+ Ta as trackerPointToScreenPixels,
1673
+ Ma as trackerToFeed,
1674
+ Ea as trackerToWorld,
1675
+ ba as transform2DPixelsToNormalized,
1676
+ or as useCameraPermission,
1677
+ es as useFrameCapture,
1678
+ Qr as useMediaRecorder,
1679
+ ms as useMuted,
1680
+ ht as usePersonMaskTexture,
1681
+ ln as useSceneSample,
1682
+ At as useScreenRectAspect,
1683
+ ys as useXRAsset,
1684
+ Ge as useXRAssetCache,
1685
+ Ss as useXRAssetStats,
1686
+ Dn as useXRCapabilities,
1687
+ _n as useXRQuality,
1688
+ Ms as useXRTrackingConfig,
1689
+ Aa as viewportSizeToTransform2DPixels,
1682
1690
  Ra as viewportToFeed,
1683
- Aa as worldToFeed,
1684
- Fa as worldToScreenPixels,
1691
+ Fa as worldToFeed,
1692
+ xa as worldToScreenPixels,
1685
1693
  Ca as worldToTracker
1686
1694
  };