@virtualdisplay.io/client 4.0.0-alpha.22 → 4.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.
@@ -50,11 +50,11 @@ function Nt(n) {
50
50
  const t = C(n);
51
51
  return t !== null && t.type === c.CAMERA && Array.isArray(t.transforms);
52
52
  }
53
- function Lt(n) {
53
+ function Mt(n) {
54
54
  const t = C(n);
55
55
  return t !== null && t.type === c.MAPPING && Array.isArray(t.attributes);
56
56
  }
57
- function Mt(n) {
57
+ function Lt(n) {
58
58
  const t = C(n);
59
59
  return t !== null && t.type === c.LOADING_INDICATOR && typeof t.progress == "number";
60
60
  }
@@ -408,7 +408,7 @@ class jt {
408
408
  }
409
409
  }
410
410
  function Ht(n) {
411
- const t = new Date(n.timestamp).toLocaleTimeString("en-GB", { hour12: !1 }), e = n.level.toUpperCase().padEnd(5), i = n.trace_id?.slice(0, 8) ?? "--------", o = n.msg, s = ["timestamp", "level", "msg", "service", "trace_id", "span_id"], r = Object.entries(n).filter(([l]) => !s.includes(l)).map(([l, u]) => `${l}=${JSON.stringify(u)}`).join(" ");
411
+ const t = new Date(n.timestamp).toLocaleTimeString("en-GB", { hour12: !1 }), e = n.level.toUpperCase().padEnd(5), i = n.trace_id?.slice(0, 8) ?? "--------", o = n.msg, s = ["timestamp", "level", "msg", "service", "trace_id", "span_id"], r = Object.entries(n).filter(([l]) => !s.includes(l)).map(([l, d]) => `${l}=${JSON.stringify(d)}`).join(" ");
412
412
  return `${t} ${e} [${i}] ${o}${r ? " " + r : ""}`;
413
413
  }
414
414
  function qt(n) {
@@ -503,7 +503,7 @@ class te {
503
503
  this.log("error", t, e);
504
504
  }
505
505
  }
506
- function dt(n, t) {
506
+ function ut(n, t) {
507
507
  const e = t?.isDev !== void 0 ? t.isDev : typeof process < "u" ? process.env.NODE_ENV !== "production" : !0;
508
508
  return new te({ service: n, isDev: e, traceProvider: t?.traceProvider });
509
509
  }
@@ -511,7 +511,7 @@ function O(n) {
511
511
  if (n !== void 0)
512
512
  return typeof n == "object" && n !== null && !Array.isArray(n) && !(n instanceof Error) ? n : n instanceof Error ? { error: n.message } : { value: n };
513
513
  }
514
- function ut(n) {
514
+ function dt(n) {
515
515
  return {
516
516
  debug: (t, e) => n.debug(t, O(e)),
517
517
  info: (t, e) => n.info(t, O(e)),
@@ -519,9 +519,9 @@ function ut(n) {
519
519
  error: (t, e) => n.error(t, O(e))
520
520
  };
521
521
  }
522
- let ht = !1, _ = ut(dt("client", { isDev: !1 }));
522
+ let ht = !1, _ = dt(ut("client", { isDev: !1 }));
523
523
  function ee() {
524
- ht = !0, _ = ut(dt("client", { isDev: !0 }));
524
+ ht = !0, _ = dt(ut("client", { isDev: !0 }));
525
525
  }
526
526
  function Ki() {
527
527
  return ht;
@@ -988,7 +988,7 @@ class ce {
988
988
  }
989
989
  }
990
990
  const X = 3e4;
991
- class de {
991
+ class ue {
992
992
  constructor(t) {
993
993
  this.send = t;
994
994
  }
@@ -1075,7 +1075,7 @@ class de {
1075
1075
  );
1076
1076
  }
1077
1077
  }
1078
- class ue {
1078
+ class de {
1079
1079
  container = null;
1080
1080
  attach(t) {
1081
1081
  this.container = t;
@@ -1173,14 +1173,14 @@ let ft = (n, t) => {
1173
1173
  !G && typeof window < "u" && window.location?.href && (s = pt(window.location.href));
1174
1174
  for (const l of s)
1175
1175
  if (l !== "baseLocale" && bt(l) && N.has(l)) {
1176
- const u = N.get(l);
1177
- if (u) {
1178
- let d = u.setLocale(n);
1179
- d instanceof Promise && (d = d.catch((p) => {
1176
+ const d = N.get(l);
1177
+ if (d) {
1178
+ let u = d.setLocale(n);
1179
+ u instanceof Promise && (u = u.catch((p) => {
1180
1180
  throw new Error(`Custom strategy "${l}" setLocale failed.`, {
1181
1181
  cause: p
1182
1182
  });
1183
- }), o.push(d));
1183
+ }), o.push(u));
1184
1184
  }
1185
1185
  }
1186
1186
  const r = () => {
@@ -1300,13 +1300,13 @@ const ve = (
1300
1300
  /** @type {LocalizedString} */
1301
1301
  "Dein Telefon öffnet das 3D-Modell im AR-Modus."
1302
1302
  )
1303
- ), Le = (
1303
+ ), Me = (
1304
1304
  /** @type {((inputs?: Controls_Qr_Modalinstructions1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Qr_Modalinstructions1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1305
1305
  ((n = {}, t = {}) => {
1306
1306
  const e = t.locale ?? h();
1307
1307
  return e === "en" ? Ie() : e === "nl" ? Oe() : Ne();
1308
1308
  })
1309
- ), Me = (
1309
+ ), Le = (
1310
1310
  /** @type {(inputs: Controls_Qr_Closebutton1Inputs) => LocalizedString} */
1311
1311
  () => (
1312
1312
  /** @type {LocalizedString} */
@@ -1328,7 +1328,7 @@ const ve = (
1328
1328
  /** @type {((inputs?: Controls_Qr_Closebutton1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Qr_Closebutton1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1329
1329
  ((n = {}, t = {}) => {
1330
1330
  const e = t.locale ?? h();
1331
- return e === "en" ? Me() : e === "nl" ? ze() : Pe();
1331
+ return e === "en" ? Le() : e === "nl" ? ze() : Pe();
1332
1332
  })
1333
1333
  ), $e = (
1334
1334
  /** @type {(inputs: Controls_Fullscreen_Buttonlabel1Inputs) => LocalizedString} */
@@ -1486,17 +1486,17 @@ const ve = (
1486
1486
  /** @type {LocalizedString} */
1487
1487
  "Camera resetten"
1488
1488
  )
1489
- ), dn = (
1489
+ ), un = (
1490
1490
  /** @type {(inputs: Controls_Camera_ResetInputs) => LocalizedString} */
1491
1491
  () => (
1492
1492
  /** @type {LocalizedString} */
1493
1493
  "Kamera zurücksetzen"
1494
1494
  )
1495
- ), un = (
1495
+ ), dn = (
1496
1496
  /** @type {((inputs?: Controls_Camera_ResetInputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_ResetInputs, { locale?: "en" | "nl" | "de" }, {}>} */
1497
1497
  ((n = {}, t = {}) => {
1498
1498
  const e = t.locale ?? h();
1499
- return e === "en" ? ln() : e === "nl" ? cn() : dn();
1499
+ return e === "en" ? ln() : e === "nl" ? cn() : un();
1500
1500
  })
1501
1501
  ), hn = (
1502
1502
  /** @type {(inputs: Controls_Camera_Zoomin1Inputs) => LocalizedString} */
@@ -1624,13 +1624,13 @@ const ve = (
1624
1624
  /** @type {LocalizedString} */
1625
1625
  "Tilt down"
1626
1626
  )
1627
- ), Ln = (
1627
+ ), Mn = (
1628
1628
  /** @type {(inputs: Controls_Camera_Tiltdown1Inputs) => LocalizedString} */
1629
1629
  () => (
1630
1630
  /** @type {LocalizedString} */
1631
1631
  "Omlaag kantelen"
1632
1632
  )
1633
- ), Mn = (
1633
+ ), Ln = (
1634
1634
  /** @type {(inputs: Controls_Camera_Tiltdown1Inputs) => LocalizedString} */
1635
1635
  () => (
1636
1636
  /** @type {LocalizedString} */
@@ -1640,7 +1640,7 @@ const ve = (
1640
1640
  /** @type {((inputs?: Controls_Camera_Tiltdown1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_Tiltdown1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1641
1641
  ((n = {}, t = {}) => {
1642
1642
  const e = t.locale ?? h();
1643
- return e === "en" ? Nn() : e === "nl" ? Ln() : Mn();
1643
+ return e === "en" ? Nn() : e === "nl" ? Mn() : Ln();
1644
1644
  })
1645
1645
  ), Pn = (
1646
1646
  /** @type {(inputs: Commerce_Submit_BusyInputs) => LocalizedString} */
@@ -1934,7 +1934,7 @@ class ci {
1934
1934
  this.selectCallback = t;
1935
1935
  }
1936
1936
  }
1937
- class di {
1937
+ class ui {
1938
1938
  element;
1939
1939
  select;
1940
1940
  constructor(t, e, i, o, s) {
@@ -1942,13 +1942,13 @@ class di {
1942
1942
  const r = document.createElement("option");
1943
1943
  r.value = "", r.disabled = !0, r.textContent = i, this.select.appendChild(r);
1944
1944
  let l = !1;
1945
- for (let d = 0; d < e.length; d++) {
1946
- const p = e[d], v = document.createElement("option");
1947
- v.value = p, v.textContent = s?.[d] ?? p, p === o && (v.selected = !0, l = !0), this.select.appendChild(v);
1945
+ for (let u = 0; u < e.length; u++) {
1946
+ const p = e[u], v = document.createElement("option");
1947
+ v.value = p, v.textContent = s?.[u] ?? p, p === o && (v.selected = !0, l = !0), this.select.appendChild(v);
1948
1948
  }
1949
1949
  l || (r.selected = !0);
1950
- const u = wt(_t, { width: 16, height: 16, "stroke-width": 2 });
1951
- u.classList.add("ui-native-select-icon"), this.element = document.createElement("div"), this.element.className = "ui-native-select-wrap", this.element.appendChild(this.select), this.element.appendChild(u);
1950
+ const d = wt(_t, { width: 16, height: 16, "stroke-width": 2 });
1951
+ d.classList.add("ui-native-select-icon"), this.element = document.createElement("div"), this.element.className = "ui-native-select-wrap", this.element.appendChild(this.select), this.element.appendChild(d);
1952
1952
  }
1953
1953
  setSelected(t) {
1954
1954
  this.select.value = t;
@@ -1976,7 +1976,7 @@ const w = {
1976
1976
  medium: "500",
1977
1977
  semibold: "600"
1978
1978
  }
1979
- }, x = w.fontFamily.sans.join(", "), ui = `
1979
+ }, x = w.fontFamily.sans.join(", "), di = `
1980
1980
  --primary: oklch(5% 0 0);
1981
1981
  --primary-foreground: oklch(100% 0 0);
1982
1982
  --secondary: oklch(92% 0 0);
@@ -1990,7 +1990,7 @@ const w = {
1990
1990
  --accent-foreground: oklch(5% 0 0);
1991
1991
  --muted-foreground: oklch(44% 0 0);
1992
1992
  `, hi = `
1993
- :root { ${ui} }
1993
+ :root { ${di} }
1994
1994
 
1995
1995
  /* ── Button ──────────────────────────────────────────────── */
1996
1996
  .ui-btn {
@@ -2297,7 +2297,7 @@ class pi {
2297
2297
  })), this.dialog.card.element.appendChild(this.createText(Re(), {
2298
2298
  fontSize: w.fontSize.sm,
2299
2299
  color: m.neutral[600]
2300
- })), this.qrSlot = this.createQrSlot(), this.dialog.card.element.appendChild(this.qrSlot), this.dialog.card.element.appendChild(this.createText(Le(), {
2300
+ })), this.qrSlot = this.createQrSlot(), this.dialog.card.element.appendChild(this.qrSlot), this.dialog.card.element.appendChild(this.createText(Me(), {
2301
2301
  fontSize: w.fontSize.xs,
2302
2302
  color: m.neutral[500]
2303
2303
  }));
@@ -2346,8 +2346,8 @@ function ot(n) {
2346
2346
  return t * t * (3 - 2 * t);
2347
2347
  }
2348
2348
  function fi(n, t, e, i, o, s) {
2349
- const [r, l, u] = n, d = Math.cos(t), p = Math.sin(t), v = d * r + p * u, E = -p * r + d * u, k = Math.cos(e), S = Math.sin(e), R = k * l - S * E, M = S * l + k * E, W = 0.55;
2350
- return [i + v * s * W, o - R * s * W, M];
2349
+ const [r, l, d] = n, u = Math.cos(t), p = Math.sin(t), v = u * r + p * d, E = -p * r + u * d, k = Math.cos(e), S = Math.sin(e), R = k * l - S * E, L = S * l + k * E, W = 0.55;
2350
+ return [i + v * s * W, o - R * s * W, L];
2351
2351
  }
2352
2352
  function gi(n, t, e) {
2353
2353
  n.beginPath(), n.moveTo(t[0], t[1]), n.lineTo(e[0], e[1]), n.strokeStyle = "#000", n.lineWidth = 2, n.stroke();
@@ -2495,15 +2495,15 @@ class wi {
2495
2495
  return;
2496
2496
  const t = this.canvas.width / Math.min(devicePixelRatio, 2), e = this.canvas.height / Math.min(devicePixelRatio, 2), i = (performance.now() - this.startTime) / 1e3;
2497
2497
  this.ctx.fillStyle = "#fff", this.ctx.fillRect(0, 0, t, e);
2498
- const o = t / 2, s = e * 0.44, r = Math.min(t, e) * 0.08, l = 0.785, u = 0.615, d = (S) => fi(S, l, u, o, s, r), p = 6, v = i % p / p, E = st.length;
2498
+ const o = t / 2, s = e * 0.44, r = Math.min(t, e) * 0.08, l = 0.785, d = 0.615, u = (S) => fi(S, l, d, o, s, r), p = 6, v = i % p / p, E = st.length;
2499
2499
  let k;
2500
2500
  v < 0.35 ? k = ot(v / 0.35) * E : v < 0.55 ? k = E : v < 0.9 ? k = (1 - ot((v - 0.55) / 0.35)) * E : k = 0, this.ctx.shadowBlur = 5, this.ctx.shadowColor = "rgba(30,30,30,0.08)";
2501
2501
  for (let S = 0; S < E && !(S >= k); S++) {
2502
2502
  const R = st[S];
2503
2503
  if (R === void 0)
2504
2504
  continue;
2505
- const M = Math.min(1, k - S);
2506
- bi(this.ctx, d, R[0], R[1], M);
2505
+ const L = Math.min(1, k - S);
2506
+ bi(this.ctx, u, R[0], R[1], L);
2507
2507
  }
2508
2508
  this.ctx.shadowBlur = 0;
2509
2509
  }
@@ -2553,7 +2553,7 @@ class _i {
2553
2553
  }
2554
2554
  }
2555
2555
  const T = 0.5;
2556
- class L {
2556
+ class M {
2557
2557
  element;
2558
2558
  constructor(t, e) {
2559
2559
  this.element = Object.assign(document.createElement("div"), { className: "vd-camera-controls" });
@@ -2565,7 +2565,7 @@ class L {
2565
2565
  }, o = Ci(t, e, i);
2566
2566
  e.onChange((s) => {
2567
2567
  i.targetRotation = s.rotation - i.thetaOffset, i.targetTilt = s.tilt, i.targetZoom = s.zoom, Si(o, e, s);
2568
- }), this.element.appendChild(L.buildZoom(o.zoomOut, o.zoomIn)), this.element.appendChild(L.buildDpad(o.tiltUp, o.rotateLeft, o.reset, o.rotateRight, o.tiltDown));
2568
+ }), this.element.appendChild(M.buildZoom(o.zoomOut, o.zoomIn)), this.element.appendChild(M.buildDpad(o.tiltUp, o.rotateLeft, o.reset, o.rotateRight, o.tiltDown));
2569
2569
  }
2570
2570
  static buildZoom(t, e) {
2571
2571
  const i = document.createElement("div");
@@ -2574,29 +2574,29 @@ class L {
2574
2574
  static buildDpad(t, e, i, o, s) {
2575
2575
  const r = document.createElement("div");
2576
2576
  r.className = "vd-dpad";
2577
- for (const [l, u] of [
2577
+ for (const [l, d] of [
2578
2578
  [t, "up"],
2579
2579
  [e, "left"],
2580
2580
  [i, "center"],
2581
2581
  [o, "right"],
2582
2582
  [s, "down"]
2583
2583
  ])
2584
- l.element.classList.add(`vd-dpad-${u}`), r.appendChild(l.element);
2584
+ l.element.classList.add(`vd-dpad-${d}`), r.appendChild(l.element);
2585
2585
  return r;
2586
2586
  }
2587
2587
  }
2588
2588
  function Ci(n, t, e) {
2589
2589
  const i = (r) => Math.max(t.limits?.minZoom ?? 1, Math.min(t.limits?.maxZoom ?? 1 / 0, r)), o = (r) => {
2590
- const l = t.limits?.minRotate, u = t.limits?.maxRotate;
2591
- return l !== void 0 || u !== void 0 ? Math.max(l ?? -1 / 0, Math.min(u ?? 1 / 0, r)) : r;
2590
+ const l = t.limits?.minRotate, d = t.limits?.maxRotate;
2591
+ return l !== void 0 || d !== void 0 ? Math.max(l ?? -1 / 0, Math.min(d ?? 1 / 0, r)) : r;
2592
2592
  }, s = (r) => {
2593
- const l = t.limits?.minTilt, u = t.limits?.maxTilt;
2594
- if (l !== void 0 || u !== void 0) {
2595
- e.targetTilt = Math.max(l ?? 0, Math.min(u ?? 180, e.targetTilt + r)), n.tilt(e.targetTilt).set();
2593
+ const l = t.limits?.minTilt, d = t.limits?.maxTilt;
2594
+ if (l !== void 0 || d !== void 0) {
2595
+ e.targetTilt = Math.max(l ?? 0, Math.min(d ?? 180, e.targetTilt + r)), n.tilt(e.targetTilt).set();
2596
2596
  return;
2597
2597
  }
2598
- const d = e.targetTilt + r;
2599
- d > 180 || d < 0 ? (e.targetTilt = d > 180 ? 360 - d : -d, e.thetaOffset = (e.thetaOffset + 180) % 360, n.tilt(e.targetTilt).rotate(e.targetRotation + e.thetaOffset).set()) : (e.targetTilt = d, n.tilt(e.targetTilt).set());
2598
+ const u = e.targetTilt + r;
2599
+ u > 180 || u < 0 ? (e.targetTilt = u > 180 ? 360 - u : -u, e.thetaOffset = (e.thetaOffset + 180) % 360, n.tilt(e.targetTilt).rotate(e.targetRotation + e.thetaOffset).set()) : (e.targetTilt = u, n.tilt(e.targetTilt).set());
2600
2600
  };
2601
2601
  return {
2602
2602
  zoomOut: new b({ variant: "outline", size: "icon", label: yn(), icon: g.zoomOut(), onClick: () => {
@@ -2611,7 +2611,7 @@ function Ci(n, t, e) {
2611
2611
  rotateLeft: new b({ variant: "outline", size: "icon", label: Sn(), icon: g.rotateLeft(), onClick: () => {
2612
2612
  e.targetRotation = o(e.targetRotation - 15), n.rotate(e.targetRotation + e.thetaOffset).set();
2613
2613
  } }),
2614
- reset: new b({ variant: "outline", size: "icon", label: un(), icon: g.reset(), onClick: () => {
2614
+ reset: new b({ variant: "outline", size: "icon", label: dn(), icon: g.reset(), onClick: () => {
2615
2615
  e.thetaOffset = 0, n.reset();
2616
2616
  } }),
2617
2617
  rotateRight: new b({ variant: "outline", size: "icon", label: xn(), icon: g.rotateRight(), onClick: () => {
@@ -2648,12 +2648,12 @@ function Ei(n, t, e, i, o) {
2648
2648
  s.className = "vd-attribute", s.dataset.name = n.name;
2649
2649
  const r = document.createElement("span");
2650
2650
  r.className = "vd-attribute-label", r.textContent = j(n.name), r.id = `vd-attribute-label-${Ai++}`, s.appendChild(r), s.setAttribute("role", "group"), s.setAttribute("aria-labelledby", r.id);
2651
- const l = n.values.find((p) => t.getValue(n.name, p)?.isSelected === !0), u = n.values.map(j), d = n.values.length <= ki ? new ci(n.values, l, u) : new di(n.name, n.values, j(n.name), l, u);
2652
- return d.onSelect((p) => {
2651
+ const l = n.values.find((p) => t.getValue(n.name, p)?.isSelected === !0), d = n.values.map(j), u = n.values.length <= ki ? new ci(n.values, l, d) : new ui(n.name, n.values, j(n.name), l, d);
2652
+ return u.onSelect((p) => {
2653
2653
  e.dispatch(I.SELECT, { attribute: n.name, value: p }, !0).defaultPrevented || i(n.name, p);
2654
2654
  }), o(n.name, (p) => {
2655
- d.setSelected(p.value), e.dispatch(I.SELECTED, { attribute: n.name, value: p.value });
2656
- }), s.appendChild(d.element), s;
2655
+ u.setSelected(p.value), e.dispatch(I.SELECTED, { attribute: n.name, value: p.value });
2656
+ }), s.appendChild(u.element), s;
2657
2657
  }
2658
2658
  const xi = 80, Ti = 2500;
2659
2659
  class Ri {
@@ -2744,6 +2744,12 @@ class St {
2744
2744
  }
2745
2745
  const Oi = 572;
2746
2746
  class Ni {
2747
+ /** @param actionBarSlot The shared corner slot the AR/fullscreen buttons live in — the
2748
+ * "open configurator" toggle joins them there instead of floating as its own overlay. */
2749
+ constructor(t) {
2750
+ this.actionBarSlot = t;
2751
+ }
2752
+ actionBarSlot;
2747
2753
  element = null;
2748
2754
  body = null;
2749
2755
  openButton = null;
@@ -2766,23 +2772,19 @@ class Ni {
2766
2772
  const i = document.createElement("div");
2767
2773
  i.className = "vd-sidebar-header", i.appendChild(this.closeButton.element), this.body = document.createElement("div"), this.body.className = "vd-sidebar-body", this.body.appendChild(e), this.element = document.createElement("div"), this.element.className = "vd-sidebar vd-hidden", this.element.append(i, this.body), t.appendChild(this.element), this.openButton = new b({
2768
2774
  variant: "outline",
2769
- size: "default",
2775
+ size: "icon",
2770
2776
  label: nn(),
2771
2777
  icon: g.configurator({ size: 18 }),
2772
2778
  onClick: () => {
2773
2779
  this.expanded = !0, this.render();
2774
2780
  }
2775
- }), this.openButton.element.classList.add("vd-configurator-toggle", "vd-hidden"), t.appendChild(this.openButton.element), this.observe();
2781
+ }), this.openButton.element.classList.add("vd-configurator-toggle", "vd-hidden"), this.actionBarSlot.appendChild(this.openButton.element), this.observe();
2776
2782
  }
2777
2783
  setVisible(t) {
2778
2784
  this.visible = t, this.render();
2779
2785
  }
2780
2786
  destroy() {
2781
- this.observer?.disconnect(), this.observer = null, this.openButton?.element.remove(), this.element?.remove(), this.container?.classList.remove(
2782
- "vd-layout-sidebar-right",
2783
- "vd-layout-sidebar-collapsed",
2784
- "vd-layout-sidebar-permanent"
2785
- ), this.container = null;
2787
+ this.observer?.disconnect(), this.observer = null, this.openButton?.element.remove(), this.element?.remove(), this.container?.classList.remove("vd-layout-sidebar-right", "vd-layout-sidebar-permanent"), this.container = null;
2786
2788
  }
2787
2789
  observe() {
2788
2790
  typeof ResizeObserver > "u" || this.container === null || (this.observer = new ResizeObserver((t) => {
@@ -2797,10 +2799,10 @@ class Ni {
2797
2799
  if (this.element === null || this.openButton === null || this.closeButton === null || this.container === null)
2798
2800
  return;
2799
2801
  const t = this.visible && this.expanded, e = this.visible && !this.expanded;
2800
- this.element.classList.toggle("vd-hidden", !this.visible), this.element.classList.toggle("vd-sidebar-collapsed", e), this.openButton.element.classList.toggle("vd-hidden", !e), this.closeButton.element.style.display = this.collapsible ? "" : "none", this.container.classList.toggle("vd-layout-sidebar-right", t), this.container.classList.toggle("vd-layout-sidebar-collapsed", e), this.container.classList.toggle("vd-layout-sidebar-permanent", t && !this.collapsible);
2802
+ this.element.classList.toggle("vd-hidden", !this.visible), this.element.classList.toggle("vd-sidebar-collapsed", e), this.openButton.element.classList.toggle("vd-hidden", !e), this.closeButton.element.style.display = this.collapsible ? "" : "none", this.container.classList.toggle("vd-layout-sidebar-right", t), this.container.classList.toggle("vd-layout-sidebar-permanent", t && !this.collapsible);
2801
2803
  }
2802
2804
  }
2803
- class Li {
2805
+ class Mi {
2804
2806
  attach(t, e) {
2805
2807
  }
2806
2808
  setVisible(t) {
@@ -2808,13 +2810,13 @@ class Li {
2808
2810
  destroy() {
2809
2811
  }
2810
2812
  }
2811
- const Mi = {
2813
+ const Li = {
2812
2814
  "inframe-bottom-left": () => new St(),
2813
- "sidebar-right": () => new Ni(),
2814
- hidden: () => new Li()
2815
+ "sidebar-right": (n) => new Ni(n),
2816
+ hidden: () => new Mi()
2815
2817
  };
2816
- function zi(n) {
2817
- return (Mi[n ?? ""] ?? (() => new St()))();
2818
+ function zi(n, t) {
2819
+ return (Li[n ?? ""] ?? (() => new St()))(t);
2818
2820
  }
2819
2821
  const H = w.fontFamily.sans.join(", "), q = `
2820
2822
  position: absolute;
@@ -2932,6 +2934,11 @@ const H = w.fontFamily.sans.join(", "), q = `
2932
2934
 
2933
2935
  .vd-hidden { display: none !important; }
2934
2936
 
2937
+ /* the "open configurator" toggle joins the shared bottom-right slot as a flex child;
2938
+ order pins it after AR/fullscreen regardless of DOM insertion order (MAPPING data,
2939
+ which mounts this button, always arrives before the toolbar mounts on ready). */
2940
+ .vd-configurator-toggle { order: 1; }
2941
+
2935
2942
  .vd-sidebar {
2936
2943
  position: absolute;
2937
2944
  inset-block: 0;
@@ -2975,25 +2982,10 @@ const H = w.fontFamily.sans.join(", "), q = `
2975
2982
  gap: ${a[5]};
2976
2983
  }
2977
2984
 
2978
- /* floating toggle, shown when the sidebar is collapsed on narrow embeds */
2979
- .vd-configurator-toggle {
2980
- position: absolute;
2981
- inset-block-end: ${a[3]};
2982
- inset-inline-end: ${a[3]};
2983
- z-index: 12;
2984
- }
2985
-
2986
2985
  /* while the panel is open, keep the corner controls clear of it */
2987
2986
  .vd-layout-sidebar-right .vd-slot-top-right { inset-inline-end: calc(var(--vd-sidebar-width) + ${a[3]}); }
2988
2987
  .vd-layout-sidebar-right .vd-slot-bottom-right { inset-inline-end: calc(var(--vd-sidebar-width) + ${a[3]}); }
2989
2988
 
2990
- /* while collapsed on a narrow embed, lift the bottom-right controls above the
2991
- floating toggle so the AR/fullscreen buttons aren't hidden behind the
2992
- "open configurator" button (spacing[9] = the default toggle button height) */
2993
- .vd-layout-sidebar-collapsed .vd-slot-bottom-right {
2994
- inset-block-end: calc(${a[3]} + ${a[9]} + ${a[1.5]});
2995
- }
2996
-
2997
2989
  /* Price + CTA — sit under the attribute controls, separated by a hairline */
2998
2990
  .vd-commerce {
2999
2991
  display: flex;
@@ -3089,7 +3081,7 @@ class Di {
3089
3081
  this.settings = t, t.language !== void 0 && ft(t.language, { reload: !1 }), this.syncScreenshotButton(), this.actionBar?.applySettings(t), this.cameraControls !== null && (this.cameraControls.element.style.display = t.cameraControls === !0 ? "flex" : "none"), this.placeScreenshotButton();
3090
3082
  }
3091
3083
  renderAttributeControls(t, e) {
3092
- if (!(this.container === null || this.slots.topRight === null) && (this.cameraControls?.element.remove(), this.cameraControls = null, this.teardownConfigurator(), this.settings.cameraControls === !0 && (this.cameraControls = new L(this.options.cameraApi, this.options.cameraPositionApi), this.cameraControls.element.style.display = "none", this.slots.topRight.appendChild(this.cameraControls.element)), this.placeScreenshotButton(), e.length !== 0)) {
3084
+ if (!(this.container === null || this.slots.topRight === null || this.slots.bottomRight === null) && (this.cameraControls?.element.remove(), this.cameraControls = null, this.teardownConfigurator(), this.settings.cameraControls === !0 && (this.cameraControls = new M(this.options.cameraApi, this.options.cameraPositionApi), this.cameraControls.element.style.display = "none", this.slots.topRight.appendChild(this.cameraControls.element)), this.placeScreenshotButton(), e.length !== 0)) {
3093
3085
  this.attributes = document.createElement("div"), this.attributes.className = "vd-attributes";
3094
3086
  for (const i of e)
3095
3087
  this.attributes.appendChild(Ei(
@@ -3099,7 +3091,7 @@ class Di {
3099
3091
  this.options.onSelect,
3100
3092
  this.options.onSubscribe
3101
3093
  ));
3102
- this.commerce = new Ri(this.options.configuration), this.attributes.appendChild(this.commerce.element), this.layout = zi(this.settings.configuratorLayout), this.layout.attach(this.container, this.attributes);
3094
+ this.commerce = new Ri(this.options.configuration), this.attributes.appendChild(this.commerce.element), this.layout = zi(this.settings.configuratorLayout, this.slots.bottomRight), this.layout.attach(this.container, this.attributes);
3103
3095
  }
3104
3096
  }
3105
3097
  get viewerSettings() {
@@ -3200,11 +3192,11 @@ function Vi(n) {
3200
3192
  }), t.on(c.CAMERA, (e) => {
3201
3193
  Nt(e) && n.cameraPosition.handlePositionUpdate(e);
3202
3194
  }), t.on(c.LOADING_INDICATOR, (e) => {
3203
- Mt(e) && (e.error !== void 0 ? n.ui.showError(e.error) : n.ui.updateProgress(e.progress, e.phase));
3195
+ Lt(e) && (e.error !== void 0 ? n.ui.showError(e.error) : n.ui.updateProgress(e.progress, e.phase));
3204
3196
  }), t.on(c.CONFIG, (e) => {
3205
3197
  Pt(e) && n.applyConfig(e);
3206
3198
  }), t.on(c.MAPPING, (e) => {
3207
- Lt(e) && (n.attributes.handleMappingReceived(e), n.configuration.handleSelectionChanged(n.attributes.getSelection()), n.ui.renderAttributeControls(n.attributes, e.attributes), n.readyStateTracker.handleMappingReceived());
3199
+ Mt(e) && (n.attributes.handleMappingReceived(e), n.configuration.handleSelectionChanged(n.attributes.getSelection()), n.ui.renderAttributeControls(n.attributes, e.attributes), n.readyStateTracker.handleMappingReceived());
3208
3200
  }), ji(n);
3209
3201
  }
3210
3202
  function ji(n) {
@@ -3267,7 +3259,7 @@ class qi {
3267
3259
  };
3268
3260
  this.attributes = new ne(i, (s, r) => {
3269
3261
  this.notifyMutationFailed(s, r);
3270
- }), this.snapshotApi = new de(i), this.annotationsApi = new Bt(i), this.cameraApi = new ie(i), this.cameraPositionApi = new oe(), this.focusApi = new le(i, (s) => {
3262
+ }), this.snapshotApi = new ue(i), this.annotationsApi = new Bt(i), this.cameraApi = new ie(i), this.cameraPositionApi = new oe(), this.focusApi = new le(i, (s) => {
3271
3263
  this.dispatchFocusChange(s);
3272
3264
  }), this.configurationApi = new ae(
3273
3265
  (s) => {
@@ -3276,7 +3268,7 @@ class qi {
3276
3268
  (s) => {
3277
3269
  this.dispatchConfigurationSubmit(s);
3278
3270
  }
3279
- ), this.eventBus = new ue(), this.arActivation = e?.createArActivation?.(i), this.syncTracker = e?.createSyncTracker?.(), this.readyStateTracker = new Hi(() => {
3271
+ ), this.eventBus = new de(), this.arActivation = e?.createArActivation?.(i), this.syncTracker = e?.createSyncTracker?.(), this.readyStateTracker = new Hi(() => {
3280
3272
  this.notifyReady();
3281
3273
  });
3282
3274
  const o = this.arActivation;
@@ -3578,7 +3570,7 @@ export {
3578
3570
  A as ERROR_CODES,
3579
3571
  le as Focus,
3580
3572
  ce as Photo,
3581
- de as Snapshot,
3573
+ ue as Snapshot,
3582
3574
  I as VD_EVENTS,
3583
3575
  Ji as VirtualdisplayClient,
3584
3576
  f as VirtualdisplayError,