@vincentt-xr/sdk 2.0.0-alpha.17 → 2.0.0-alpha.18

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