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

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