@virtualdisplay.io/client 4.0.0-alpha.34 → 4.0.0-alpha.36

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.
@@ -18,7 +18,11 @@ var t = {
18
18
  QR_SHOWN: "qr_shown",
19
19
  SYNC: "sync",
20
20
  SELECTABLE: "selectable",
21
- APP_RESOLVED: "app_resolved"
21
+ APP_RESOLVED: "app_resolved",
22
+ PERSONALISE: "personalise",
23
+ PERSONALISED: "personalised",
24
+ ZONES: "zones",
25
+ PLACE: "place"
22
26
  }, n = "main", r = {
23
27
  FOCUS: "focus",
24
28
  UNFOCUS: "unfocus"
@@ -55,46 +59,61 @@ function ee(e) {
55
59
  }
56
60
  function d(e) {
57
61
  let n = o(e);
58
- return n !== null && n.type === t.MUTATION && typeof n.instance == "string" && n.instance !== "" && Array.isArray(n.results);
62
+ return n !== null && n.type === t.PERSONALISED && typeof n.id == "string" && n.id !== "" && typeof n.instance == "string" && n.instance !== "" && typeof n.zone == "string" && typeof n.ok == "boolean" && (n.error === void 0 || typeof n.error == "string");
59
63
  }
60
64
  function f(e) {
65
+ return typeof e == "number" && Number.isFinite(e);
66
+ }
67
+ function p(e) {
68
+ let t = o(e);
69
+ return t !== null && typeof t.name == "string" && t.name !== "" && f(t.aspect) && f(t.widthMm) && f(t.heightMm);
70
+ }
71
+ function te(e) {
72
+ let n = o(e);
73
+ return n !== null && n.type === t.ZONES && typeof n.instance == "string" && n.instance !== "" && Array.isArray(n.zones) && n.zones.every(p);
74
+ }
75
+ function ne(e) {
76
+ let n = o(e);
77
+ return n !== null && n.type === t.MUTATION && typeof n.instance == "string" && n.instance !== "" && Array.isArray(n.results);
78
+ }
79
+ function m(e) {
61
80
  let n = o(e);
62
81
  return n !== null && n.type === t.SNAPSHOT && ("data" in n || "error" in n);
63
82
  }
64
- function p(e) {
83
+ function re(e) {
65
84
  let n = o(e);
66
85
  return n !== null && n.type === t.CAMERA && Array.isArray(n.transforms);
67
86
  }
68
- function te(e) {
87
+ function ie(e) {
69
88
  let n = o(e);
70
89
  return n !== null && n.type === t.MAPPING && typeof n.instance == "string" && n.instance !== "" && Array.isArray(n.attributes);
71
90
  }
72
- function ne(e) {
91
+ function ae(e) {
73
92
  let n = o(e);
74
93
  return n !== null && n.type === t.LOADING_INDICATOR && typeof n.progress == "number";
75
94
  }
76
- function m(e) {
95
+ function oe(e) {
77
96
  let n = o(e);
78
97
  return n !== null && n.type === t.SYNC && typeof n.connected == "boolean";
79
98
  }
80
- function re(e) {
99
+ function se(e) {
81
100
  let n = o(e);
82
101
  return n !== null && n.type === t.SELECTABLE && typeof n.instance == "string" && n.instance !== "" && Array.isArray(n.attributes);
83
102
  }
84
- function ie(e) {
103
+ function ce(e) {
85
104
  let n = o(e);
86
105
  return n !== null && n.type === t.CONFIG && typeof n.viewerSettings == "object";
87
106
  }
88
- function ae(e) {
107
+ function le(e) {
89
108
  let n = o(e);
90
109
  return n !== null && n.type === t.FOCUS && typeof n.instance == "string" && n.instance !== "" && typeof n.state == "string";
91
110
  }
92
- function oe(e) {
111
+ function ue(e) {
93
112
  let n = o(e);
94
113
  return n !== null && n.type === t.PRICING && typeof n.instance == "string" && n.instance !== "" && typeof n.pricing == "object" && n.pricing !== null;
95
114
  }
96
115
  // ../messaging/src/queue.ts
97
- var se = class {
116
+ var de = class {
98
117
  processor;
99
118
  pending = [];
100
119
  isReady = !1;
@@ -116,7 +135,7 @@ var se = class {
116
135
  clear() {
117
136
  this.pending.length = 0;
118
137
  }
119
- }, ce = class {
138
+ }, fe = class {
120
139
  getTarget;
121
140
  handlers = /* @__PURE__ */ new Map();
122
141
  publisher;
@@ -127,7 +146,7 @@ var se = class {
127
146
  isValid;
128
147
  onHandlerError;
129
148
  constructor(e, t) {
130
- this.getTarget = e, this.sourceId = `vd-${Math.random().toString(36).slice(2, 8)}`, this.targetOrigin = "*", this.isValid = t?.isValid ?? c, this.onHandlerError = t?.onHandlerError ?? le, this.publisher = new se((e) => this.post(e)), this.consumer = new se((e) => this.routeToHandler(e)), t?.bufferIncoming !== !0 && this.consumer.markReady();
149
+ this.getTarget = e, this.sourceId = `vd-${Math.random().toString(36).slice(2, 8)}`, this.targetOrigin = "*", this.isValid = t?.isValid ?? c, this.onHandlerError = t?.onHandlerError ?? pe, this.publisher = new de((e) => this.post(e)), this.consumer = new de((e) => this.routeToHandler(e)), t?.bufferIncoming !== !0 && this.consumer.markReady();
131
150
  }
132
151
  on(e, t) {
133
152
  this.handlers.set(e, t);
@@ -185,13 +204,13 @@ var se = class {
185
204
  });
186
205
  }
187
206
  };
188
- function le(e, t) {
207
+ function pe(e, t) {
189
208
  let n = t instanceof Error ? t.message : String(t);
190
209
  console.error(`Virtualdisplay: error handling ${e.type}: ${n}`);
191
210
  }
192
211
  t.CAMERA, t.LOADING_INDICATOR;
193
212
  // ../client-core/src/annotations/annotations.ts
194
- var ue = class {
213
+ var me = class {
195
214
  send;
196
215
  instance;
197
216
  constructor(e, t) {
@@ -204,7 +223,7 @@ var ue = class {
204
223
  enabled: e
205
224
  });
206
225
  }
207
- }, de = class {
226
+ }, he = class {
208
227
  value;
209
228
  attribute;
210
229
  label;
@@ -218,52 +237,50 @@ var ue = class {
218
237
  setSelected(e) {
219
238
  this.isSelectedValue = e;
220
239
  }
221
- }, fe = {}, pe = [
240
+ }, ge = {}, _e = [
222
241
  "en",
223
242
  "nl",
224
243
  "de"
225
- ], me = "PARAGLIDE_LOCALE", h = ["globalVariable", "baseLocale"], he = [], g = typeof window > "u";
226
- globalThis.__paraglide = globalThis.__paraglide ?? {}, globalThis.__paraglide.ssr = globalThis.__paraglide.ssr ?? {};
227
- var _, ge = !1, v = () => {
228
- let e = h;
229
- !g && typeof window < "u" && window.location?.href && (e = Ne(window.location.href));
230
- let t = _e(e, typeof window < "u" ? window.location?.href : void 0);
231
- if (t) return ge || (_ = t, ge = !0, ye(t, { reload: !1 })), t;
244
+ ], h = ["globalVariable", "baseLocale"], g = [], _ = typeof window > "u";
245
+ globalThis.__paraglide = globalThis.__paraglide ?? {};
246
+ var v, ve = !1, y = () => {
247
+ let e = !_ && g.length > 0 && typeof window < "u" ? window.location?.href : void 0, t = ye(e ? Ie(e) : h, e);
248
+ if (t) return ve || (v = t, ve = !0, xe(t, { reload: !1 })), t;
232
249
  throw Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found");
233
250
  };
234
- function _e(e, t) {
251
+ function ye(e, t) {
235
252
  let n;
236
253
  for (let t of e) {
237
254
  if (t === "baseLocale") n = "en";
238
- else if (t === "globalVariable" && _ !== void 0) n = _;
239
- else if (Pe(t) && x.has(t)) {
240
- let e = x.get(t);
255
+ else if (t === "globalVariable" && v !== void 0) n = v;
256
+ else if (Le(t) && S.has(t)) {
257
+ let e = S.get(t);
241
258
  if (e) {
242
259
  let t = e.getLocale();
243
260
  if (t instanceof Promise) continue;
244
- if (t !== void 0) return xe(t);
261
+ if (t !== void 0) return Te(t);
245
262
  }
246
263
  }
247
- let e = y(n);
264
+ let e = b(n);
248
265
  if (e) return e;
249
266
  }
250
267
  }
251
- var ve = (e) => {
268
+ var be = (e) => {
252
269
  e ? window.location.href = e : window.location.reload();
253
- }, ye = (e, t) => {
270
+ }, xe = (e, t) => {
254
271
  let n = {
255
272
  reload: !0,
256
273
  ...t
257
274
  }, r;
258
275
  try {
259
- r = v();
276
+ r = y();
260
277
  } catch {}
261
278
  let i = [], a = h;
262
- !g && typeof window < "u" && window.location?.href && (a = Ne(window.location.href));
263
- for (let t of a) if (t === "globalVariable") _ = e;
279
+ !_ && typeof window < "u" && window.location?.href && (a = Ie(window.location.href));
280
+ for (let t of a) if (t === "globalVariable") v = e;
264
281
  else if (t === "baseLocale") continue;
265
- else if (Pe(t) && x.has(t)) {
266
- let n = x.get(t);
282
+ else if (Le(t) && S.has(t)) {
283
+ let n = S.get(t);
267
284
  if (n) {
268
285
  let r = n.setLocale(e);
269
286
  r instanceof Promise && (r = r.catch((e) => {
@@ -272,111 +289,116 @@ var ve = (e) => {
272
289
  }
273
290
  }
274
291
  let o = () => {
275
- !g && n.reload && window.location && e !== r && ve(void 0);
292
+ !_ && n.reload && window.location && e !== r && be(void 0);
276
293
  };
277
294
  if (i.length) return Promise.all(i).then(() => {
278
295
  o();
279
296
  });
280
297
  o();
281
- }, be = () => typeof window < "u" ? window.location.origin : "http://fallback.com";
282
- function y(e) {
283
- if (typeof e != "string") return;
284
- let t = e.toLowerCase();
285
- for (let e of pe) if (e.toLowerCase() === t) return e;
286
- }
287
- function xe(e) {
288
- let t = y(e);
298
+ }, Se = () => typeof window < "u" ? window.location.origin : "http://fallback.com", Ce;
299
+ function b(e) {
300
+ if (typeof e == "string") return Ce ??= we(), Ce.get(e.toLowerCase());
301
+ }
302
+ function we() {
303
+ let e = /* @__PURE__ */ new Map();
304
+ for (let t of _e) {
305
+ let n = t.toLowerCase();
306
+ e.has(n) || e.set(n, t);
307
+ }
308
+ return e;
309
+ }
310
+ function Te(e) {
311
+ let t = b(e);
289
312
  if (t) return t;
290
- throw Error(`Invalid locale: ${e}. Expected one of: ${pe.join(", ")}`);
313
+ throw Error(`Invalid locale: ${e}. Expected one of: ${_e.join(", ")}`);
291
314
  }
292
- function b(e) {
315
+ function x(e) {
293
316
  return e;
294
317
  }
295
- function Se(e, t) {
296
- return new fe(e, t.href);
318
+ function Ee(e, t) {
319
+ return new ge(e, t.href);
297
320
  }
298
- function Ce() {
321
+ function De() {
299
322
  return 0;
300
323
  }
301
- function we(e) {
302
- return he;
324
+ function Oe(e) {
325
+ return g;
303
326
  }
304
- function Te(e, t) {
327
+ function ke(e, t) {
305
328
  return e.exec(t.href);
306
329
  }
307
- var Ee = me.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
308
- RegExp(`(?:^|;\\s*)${Ee}=([^;]*)`);
309
- function De(e) {
310
- return Oe(e);
330
+ function Ae(e) {
331
+ return je(e);
311
332
  }
312
- function Oe(e) {
313
- let t = b(typeof e == "string" ? new URL(e, be()) : new URL(e.href)), n = t.pathname.replace(/^\/+/, "").split("/");
314
- return n.length > 0 && y(n[0]) && (t.pathname = "/" + n.slice(1).join("/")), b(t);
315
- }
316
- var ke = -1, Ae, je;
317
- function Me(e) {
318
- if (he.length === 0) return;
319
- let t = typeof e == "string" ? e : e.href, n = Ce();
320
- if (Ae === t && ke === n) return je;
321
- let r = b(new URL(t, "http://example.com")), i = De(r), a = i.href === r.href ? [r] : [r, i], o;
333
+ function je(e) {
334
+ let t = x(typeof e == "string" ? new URL(e, Se()) : new URL(e.href)), n = t.pathname.replace(/^\/+/, "").split("/");
335
+ return n.length > 0 && b(n[0]) && (t.pathname = "/" + n.slice(1).join("/")), x(t);
336
+ }
337
+ var Me = -1, Ne, Pe;
338
+ function Fe(e) {
339
+ if (g.length === 0) return;
340
+ let t = typeof e == "string" ? e : e.href, n = De();
341
+ if (Ne === t && Me === n) return Pe;
342
+ let r = x(new URL(t, "http://example.com")), i = Ae(r), a = i.href === r.href ? [r] : [r, i], o;
322
343
  for (let e of a) {
323
- for (let t of we(e)) if (Te(Se(t.match, e), e)) {
344
+ for (let t of Oe(e)) if (ke(Ee(t.match, e), e)) {
324
345
  o = t;
325
346
  break;
326
347
  }
327
348
  if (o) break;
328
349
  }
329
- return ke = n, Ae = t, je = o, o;
350
+ return Me = n, Ne = t, Pe = o, o;
330
351
  }
331
- function Ne(e) {
332
- let t = Me(e);
352
+ function Ie(e) {
353
+ let t = Fe(e);
333
354
  return t && t.exclude !== !0 && Array.isArray(t.strategy) ? t.strategy : h;
334
355
  }
335
- var x = /* @__PURE__ */ new Map();
336
- function Pe(e) {
356
+ var S = /* @__PURE__ */ new Map();
357
+ function Le(e) {
337
358
  return typeof e == "string" && /^custom-[A-Za-z0-9_-]+$/.test(e);
338
359
  }
339
360
  // ../client-core/src/attributes/label.ts
340
- function Fe(e, t) {
341
- return Ie(t !== void 0 && Object.hasOwn(t, e) ? t[e] : void 0) ?? S(e);
361
+ function Re(e, t) {
362
+ return ze(t !== void 0 && Object.hasOwn(t, e) ? t[e] : void 0) ?? C(e);
342
363
  }
343
- function Ie(e) {
364
+ function ze(e) {
344
365
  if (e === void 0) return;
345
366
  for (let t of [
346
- v(),
367
+ y(),
347
368
  "nl",
348
369
  "en"
349
370
  ]) if (Object.hasOwn(e, t) && e[t] !== void 0) return e[t];
350
371
  let [t] = Object.values(e);
351
372
  return t;
352
373
  }
353
- function S(e) {
374
+ function C(e) {
354
375
  let t = e.replace(/([A-Z])/g, " $1").trim();
355
376
  return t.charAt(0).toUpperCase() + t.slice(1).toLowerCase();
356
377
  }
357
378
  // ../client-core/src/client/error.ts
358
- var C = {
379
+ var w = {
359
380
  NO_MAPPING: "NO_MAPPING",
360
381
  ATTRIBUTE_NOT_FOUND: "ATTRIBUTE_NOT_FOUND",
361
382
  VALUE_NOT_FOUND: "VALUE_NOT_FOUND",
362
383
  PARENT_NOT_FOUND: "PARENT_NOT_FOUND",
363
384
  INVALID_PARAMETER: "INVALID_PARAMETER",
364
- SNAPSHOT_FAILED: "SNAPSHOT_FAILED"
365
- }, w = class e extends Error {
385
+ SNAPSHOT_FAILED: "SNAPSHOT_FAILED",
386
+ PERSONALISATION_FAILED: "PERSONALISATION_FAILED"
387
+ }, T = class e extends Error {
366
388
  code;
367
389
  constructor(e, t) {
368
390
  super(e), this.name = "VirtualdisplayError", this.code = t;
369
391
  }
370
392
  static valueNotFound(t, n) {
371
- return new e(`Value "${n}" not found for attribute "${t}"`, C.VALUE_NOT_FOUND);
393
+ return new e(`Value "${n}" not found for attribute "${t}"`, w.VALUE_NOT_FOUND);
372
394
  }
373
395
  static parentNotFound(t) {
374
- return new e(`Parent element not found: ${t}`, C.PARENT_NOT_FOUND);
396
+ return new e(`Parent element not found: ${t}`, w.PARENT_NOT_FOUND);
375
397
  }
376
398
  static invalidParameter(t) {
377
- return new e(t, C.INVALID_PARAMETER);
399
+ return new e(t, w.INVALID_PARAMETER);
378
400
  }
379
- }, Le = class {
401
+ }, Be = class {
380
402
  name;
381
403
  defaultValue;
382
404
  values;
@@ -386,7 +408,7 @@ var C = {
386
408
  this.name = e.name, this.defaultValue = e.defaultValue, this.onSelect = e.onSelect, this.values = this.createValues(e.values, e.labels);
387
409
  }
388
410
  select(e) {
389
- if (!this.values.has(e)) throw w.valueNotFound(this.name, e);
411
+ if (!this.values.has(e)) throw T.valueNotFound(this.name, e);
390
412
  this.onSelect(this.name, e);
391
413
  }
392
414
  getValues() {
@@ -412,17 +434,17 @@ var C = {
412
434
  createValues(e, t) {
413
435
  let n = /* @__PURE__ */ new Map();
414
436
  for (let r of e) {
415
- let e = new de(r, this.name, Fe(r, t));
437
+ let e = new he(r, this.name, Re(r, t));
416
438
  r === this.defaultValue && e.setSelected(!0), n.set(r, e);
417
439
  }
418
440
  return n;
419
441
  }
420
- }, Re = class {
442
+ }, Ve = class {
421
443
  attributes = /* @__PURE__ */ new Map();
422
444
  constructor(e, t, n) {
423
445
  for (let n of e) {
424
446
  let e = this.buildOptions(n, t);
425
- this.attributes.set(n.name, new Le(e));
447
+ this.attributes.set(n.name, new Be(e));
426
448
  }
427
449
  this.onMutationFailed = n;
428
450
  }
@@ -458,11 +480,11 @@ var C = {
458
480
  defaultValue: e.defaultValue
459
481
  };
460
482
  }
461
- }, T = 4096, E = 16384, ze = [
483
+ }, E = 4096, D = 16384, He = [
462
484
  1024,
463
485
  256,
464
486
  64
465
- ], Be = 20, D = [
487
+ ], Ue = 20, O = [
466
488
  "timestamp",
467
489
  "level",
468
490
  "msg",
@@ -470,38 +492,38 @@ var C = {
470
492
  "trace_id",
471
493
  "span_id"
472
494
  ];
473
- function Ve(e) {
474
- let t = new Date(e.timestamp).toLocaleTimeString("en-GB", { hour12: !1 }), n = e.level.toUpperCase().padEnd(5), r = e.trace_id?.slice(0, 8) ?? "--------", i = e.msg, a = Object.entries(e).filter(([e]) => !D.includes(e)).map(([e, t]) => `${e}=${O(t, T).line}`).join(" ");
495
+ function We(e) {
496
+ let t = new Date(e.timestamp).toLocaleTimeString("en-GB", { hour12: !1 }), n = e.level.toUpperCase().padEnd(5), r = e.trace_id?.slice(0, 8) ?? "--------", i = e.msg, a = Object.entries(e).filter(([e]) => !O.includes(e)).map(([e, t]) => `${e}=${k(t, E).line}`).join(" ");
475
497
  return `${t} ${n} [${r}] ${i}${a ? " " + a : ""}`;
476
498
  }
477
- function He(e) {
478
- for (let t of [T, ...ze]) {
479
- let { line: n, truncated: r } = O(e, t);
499
+ function Ge(e) {
500
+ for (let t of [E, ...He]) {
501
+ let { line: n, truncated: r } = k(e, t);
480
502
  if (!r) {
481
- if (n.length <= E) return n;
503
+ if (n.length <= D) return n;
482
504
  continue;
483
505
  }
484
- let { line: i } = O({
506
+ let { line: i } = k({
485
507
  ...e,
486
508
  log_truncated: !0
487
509
  }, t);
488
- if (i.length <= E) return i;
510
+ if (i.length <= D) return i;
489
511
  }
490
- let t = Object.keys(e).filter((e) => !D.includes(e)), n = {
491
- ...We(e, D),
512
+ let t = Object.keys(e).filter((e) => !O.includes(e)), n = {
513
+ ...qe(e, O),
492
514
  log_truncated: !0,
493
515
  log_dropped_count: t.length
494
- }, r = O({
516
+ }, r = k({
495
517
  ...n,
496
- log_dropped_attrs: t.slice(0, Be)
497
- }, T);
498
- return r.line.length <= E ? r.line : O(n, T).line;
518
+ log_dropped_attrs: t.slice(0, Ue)
519
+ }, E);
520
+ return r.line.length <= D ? r.line : k(n, E).line;
499
521
  }
500
- function O(e, t) {
522
+ function k(e, t) {
501
523
  let n = [], r = !1;
502
524
  return {
503
525
  line: JSON.stringify(e, function(e, i) {
504
- if (typeof i == "string") return i.length > t && (r = !0), Ue(i, t);
526
+ if (typeof i == "string") return i.length > t && (r = !0), Ke(i, t);
505
527
  if (typeof i == "bigint") return i.toString();
506
528
  if (typeof i != "object" || !i) return i;
507
529
  for (; n.length > 0 && n.at(-1) !== this;) n.pop();
@@ -510,80 +532,80 @@ function O(e, t) {
510
532
  truncated: r
511
533
  };
512
534
  }
513
- function Ue(e, t) {
535
+ function Ke(e, t) {
514
536
  return e.length <= t ? e : `${e.slice(0, t)}...[truncated ${e.length - t} chars]`;
515
537
  }
516
- function We(e, t) {
538
+ function qe(e, t) {
517
539
  let n = {};
518
540
  for (let r of t) e[r] !== void 0 && (n[r] = e[r]);
519
541
  return n;
520
542
  }
521
543
  // ../logger/src/write.ts
522
- function Ge(e, t) {
523
- let n = t ? Ve(e) : He(e);
544
+ function Je(e, t) {
545
+ let n = t ? We(e) : Ge(e);
524
546
  e.level === "error" ? console.error(n) : e.level === "warn" ? console.warn(n) : console.log(n);
525
547
  }
526
548
  // ../logger/src/serialise.ts
527
- function Ke(e, t = 0) {
549
+ function Ye(e, t = 0) {
528
550
  let n = {
529
551
  name: e.name,
530
552
  message: e.message
531
553
  };
532
- return e.stack !== void 0 && (n.stack = e.stack), Je(e, n), e.cause !== void 0 && e.cause !== null && (n.cause = e.cause instanceof Error && t < 5 ? Ke(e.cause, t + 1) : String(e.cause)), n;
554
+ return e.stack !== void 0 && (n.stack = e.stack), Ze(e, n), e.cause !== void 0 && e.cause !== null && (n.cause = e.cause instanceof Error && t < 5 ? Ye(e.cause, t + 1) : String(e.cause)), n;
533
555
  }
534
- var qe = /* @__PURE__ */ new Set([
556
+ var Xe = /* @__PURE__ */ new Set([
535
557
  "name",
536
558
  "message",
537
559
  "stack",
538
560
  "cause"
539
561
  ]);
540
- function Je(e, t) {
562
+ function Ze(e, t) {
541
563
  for (let n of Object.getOwnPropertyNames(e)) {
542
- if (qe.has(n)) continue;
564
+ if (Xe.has(n)) continue;
543
565
  let r = e[n];
544
566
  r !== void 0 && (t[n] = r);
545
567
  }
546
568
  }
547
- function Ye(e) {
569
+ function Qe(e) {
548
570
  let t = {};
549
- for (let [n, r] of Object.entries(e)) t[n] = r instanceof Error ? Ke(r) : r;
571
+ for (let [n, r] of Object.entries(e)) t[n] = r instanceof Error ? Ye(r) : r;
550
572
  return t;
551
573
  }
552
574
  // ../utils/src/now.ts
553
- function Xe() {
575
+ function $e() {
554
576
  return /* @__PURE__ */ new Date();
555
577
  }
556
578
  // ../utils/src/device.ts
557
- function Ze() {
579
+ function et() {
558
580
  return typeof navigator > "u" ? "" : navigator.userAgent;
559
581
  }
560
- function Qe() {
582
+ function tt() {
561
583
  return typeof navigator > "u" ? !1 : navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
562
584
  }
563
- function $e() {
564
- return /iPhone|iPad|iPod/i.test(Ze()) || Qe();
585
+ function nt() {
586
+ return /iPhone|iPad|iPod/i.test(et()) || tt();
565
587
  }
566
- function et() {
567
- return /Android/i.test(Ze());
588
+ function rt() {
589
+ return /Android/i.test(et());
568
590
  }
569
- function tt() {
570
- return $e() || et();
591
+ function it() {
592
+ return nt() || rt();
571
593
  }
572
594
  // ../logger/src/logger.ts
573
- var nt = class {
595
+ var at = class {
574
596
  config;
575
597
  constructor(e) {
576
598
  this.config = e;
577
599
  }
578
600
  log(e, t, n = {}) {
579
601
  let r = this.config.traceProvider?.() ?? {};
580
- Ge({
581
- timestamp: Xe().toISOString(),
602
+ Je({
603
+ timestamp: $e().toISOString(),
582
604
  level: e,
583
605
  msg: t,
584
606
  service: this.config.service,
585
607
  ...r,
586
- ...Ye(n)
608
+ ...Qe(n)
587
609
  }, this.config.isDev);
588
610
  }
589
611
  debug(e, t) {
@@ -599,34 +621,34 @@ var nt = class {
599
621
  this.log("error", e, t);
600
622
  }
601
623
  };
602
- function rt(e, t) {
603
- return new nt({
624
+ function ot(e, t) {
625
+ return new at({
604
626
  service: e,
605
627
  isDev: t?.isDev === void 0 ? typeof process < "u" ? process.env.NODE_ENV !== "production" : !0 : t.isDev,
606
628
  traceProvider: t?.traceProvider
607
629
  });
608
630
  }
609
631
  // ../client-core/src/utils/logger.ts
610
- function k(e) {
632
+ function A(e) {
611
633
  if (e !== void 0) return typeof e == "object" && e && !Array.isArray(e) && !(e instanceof Error) ? e : e instanceof Error ? { error: e.message } : { value: e };
612
634
  }
613
- function it(e) {
635
+ function st(e) {
614
636
  return {
615
- debug: (t, n) => e.debug(t, k(n)),
616
- info: (t, n) => e.info(t, k(n)),
617
- warn: (t, n) => e.warn(t, k(n)),
618
- error: (t, n) => e.error(t, k(n))
637
+ debug: (t, n) => e.debug(t, A(n)),
638
+ info: (t, n) => e.info(t, A(n)),
639
+ warn: (t, n) => e.warn(t, A(n)),
640
+ error: (t, n) => e.error(t, A(n))
619
641
  };
620
642
  }
621
- var at = !1, A = it(rt("client", { isDev: !1 }));
622
- function ot() {
623
- at = !0, A = it(rt("client", { isDev: !0 }));
643
+ var ct = !1, j = st(ot("client", { isDev: !1 }));
644
+ function lt() {
645
+ ct = !0, j = st(ot("client", { isDev: !0 }));
624
646
  }
625
- function st() {
626
- return at;
647
+ function ut() {
648
+ return ct;
627
649
  }
628
650
  // ../client-core/src/attributes/attributes.ts
629
- var ct = class {
651
+ var dt = class {
630
652
  send;
631
653
  instance;
632
654
  onMutationFailed;
@@ -636,7 +658,7 @@ var ct = class {
636
658
  this.send = e, this.instance = t, this.onMutationFailed = n;
637
659
  }
638
660
  handleMappingReceived(e) {
639
- A.debug("Initializing from server mapping", { attributeCount: e.attributes.length }), this.registry = new Re(e.attributes, (e, t) => this.sendMutation(e, t), this.onMutationFailed), this.replayPendingCallbacks();
661
+ j.debug("Initializing from server mapping", { attributeCount: e.attributes.length }), this.registry = new Ve(e.attributes, (e, t) => this.sendMutation(e, t), this.onMutationFailed), this.replayPendingCallbacks();
640
662
  }
641
663
  handleMutationResult(e) {
642
664
  this.registry?.handleResults(e.results);
@@ -668,7 +690,7 @@ var ct = class {
668
690
  return;
669
691
  }
670
692
  let n = this.registry.get(e);
671
- n === void 0 ? A.warn(`onChange: attribute "${e}" not found — callback will not fire`) : n.onChange(t);
693
+ n === void 0 ? j.warn(`onChange: attribute "${e}" not found — callback will not fire`) : n.onChange(t);
672
694
  }
673
695
  getAttribute(e) {
674
696
  return this.registry?.get(e);
@@ -689,11 +711,11 @@ var ct = class {
689
711
  replayPendingCallbacks() {
690
712
  for (let { name: e, callback: t } of this.pendingCallbacks) {
691
713
  let n = this.registry?.get(e);
692
- n === void 0 && A.warn(`onChange: attribute "${e}" not found — buffered callback will not fire`), n?.onChange(t);
714
+ n === void 0 && j.warn(`onChange: attribute "${e}" not found — buffered callback will not fire`), n?.onChange(t);
693
715
  }
694
716
  this.pendingCallbacks.length = 0;
695
717
  }
696
- }, lt = class {
718
+ }, ft = class {
697
719
  snapshot;
698
720
  callbacks = [];
699
721
  handleSnapshot(e) {
@@ -709,7 +731,7 @@ var ct = class {
709
731
  get current() {
710
732
  return this.snapshot ?? [];
711
733
  }
712
- }, ut = class {
734
+ }, pt = class {
713
735
  send;
714
736
  commands = [];
715
737
  constructor(e) {
@@ -734,7 +756,7 @@ var ct = class {
734
756
  }), this;
735
757
  }
736
758
  set() {
737
- if (this.commands.length === 0) throw w.invalidParameter("No camera commands to execute. Call rotate(), tilt(), or zoom() before set().");
759
+ if (this.commands.length === 0) throw T.invalidParameter("No camera commands to execute. Call rotate(), tilt(), or zoom() before set().");
738
760
  let e = {
739
761
  type: t.CAMERA,
740
762
  commands: this.commands
@@ -742,7 +764,7 @@ var ct = class {
742
764
  this.send(e), this.commands = [];
743
765
  }
744
766
  validateFiniteNumber(e, t) {
745
- if (!Number.isFinite(e)) throw w.invalidParameter(`${t}() requires a finite number, got ${String(e)}`);
767
+ if (!Number.isFinite(e)) throw T.invalidParameter(`${t}() requires a finite number, got ${String(e)}`);
746
768
  }
747
769
  reset() {
748
770
  let e = {
@@ -751,7 +773,7 @@ var ct = class {
751
773
  };
752
774
  this.send(e);
753
775
  }
754
- }, dt = class {
776
+ }, mt = class {
755
777
  state;
756
778
  limitsState;
757
779
  changeCallbacks = [];
@@ -811,20 +833,20 @@ var ct = class {
811
833
  }
812
834
  };
813
835
  // ../client-core/src/configuration/pricing-rule.ts
814
- function ft(e, t) {
815
- let n = e.filter((e) => pt(e, t));
836
+ function ht(e, t) {
837
+ let n = e.filter((e) => gt(e, t));
816
838
  if (n.length === 0) return;
817
- let r = Math.max(...n.map(mt)), i = n.filter((e) => mt(e) === r);
839
+ let r = Math.max(...n.map(_t)), i = n.filter((e) => _t(e) === r);
818
840
  return i.length === 1 ? i[0] : void 0;
819
841
  }
820
- function pt(e, t) {
842
+ function gt(e, t) {
821
843
  return Object.entries(e.attributes).every(([e, n]) => t[e] === n);
822
844
  }
823
- function mt(e) {
845
+ function _t(e) {
824
846
  return Object.keys(e.attributes).length;
825
847
  }
826
848
  // ../client-core/src/configuration/configuration.ts
827
- var ht = class {
849
+ var vt = class {
828
850
  dispatchChange;
829
851
  dispatchSubmit;
830
852
  pricing;
@@ -893,7 +915,7 @@ var ht = class {
893
915
  }
894
916
  resolve() {
895
917
  if (this.pricing === void 0) return;
896
- let e = ft(this.pricing.rules, this.selection);
918
+ let e = ht(this.pricing.rules, this.selection);
897
919
  if (e !== void 0 && e.availability !== a.HIDDEN) return {
898
920
  attributes: { ...this.selection },
899
921
  reference: e.reference,
@@ -902,7 +924,7 @@ var ht = class {
902
924
  availability: e.availability
903
925
  };
904
926
  }
905
- }, gt = class {
927
+ }, yt = class {
906
928
  send;
907
929
  dispatch;
908
930
  instance;
@@ -916,7 +938,7 @@ var ht = class {
916
938
  return this.focused;
917
939
  }
918
940
  set(e) {
919
- if (typeof e != "string" || e.length === 0) throw w.invalidParameter(`set() requires a non-empty component name, got ${String(e)}`);
941
+ if (typeof e != "string" || e.length === 0) throw T.invalidParameter(`set() requires a non-empty component name, got ${String(e)}`);
920
942
  this.send({
921
943
  type: t.FOCUS,
922
944
  instance: this.instance,
@@ -943,7 +965,100 @@ var ht = class {
943
965
  for (let e of this.changeCallbacks) e(t);
944
966
  this.dispatch(t);
945
967
  }
946
- }, _t = class {
968
+ }, bt = 3e4, xt = "Virtualdisplay: the print zone could not be personalised", St = class {
969
+ send;
970
+ instance;
971
+ pending = /* @__PURE__ */ new Map();
972
+ zoneListeners = /* @__PURE__ */ new Set();
973
+ zoneReport = [];
974
+ sequence = 0;
975
+ pendingPlacements = /* @__PURE__ */ new Map();
976
+ frame = null;
977
+ constructor(e, t) {
978
+ this.send = e, this.instance = t;
979
+ }
980
+ setImage(e, t) {
981
+ return typeof e != "string" || e === "" ? Promise.reject(T.invalidParameter("setImage() takes a zone name")) : t instanceof Blob ? this.request(e, t) : Promise.reject(T.invalidParameter("setImage() takes an image as a Blob"));
982
+ }
983
+ clear(e) {
984
+ return typeof e != "string" || e === "" ? Promise.reject(T.invalidParameter("clear() takes a zone name")) : this.request(e, null);
985
+ }
986
+ get zones() {
987
+ return this.zoneReport;
988
+ }
989
+ onZones(e) {
990
+ this.zoneListeners.add(e);
991
+ }
992
+ place(e, n) {
993
+ if (typeof e != "string" || e === "") throw T.invalidParameter("place() takes a zone name");
994
+ if (![
995
+ n.x,
996
+ n.y,
997
+ n.scale
998
+ ].every(Number.isFinite)) throw T.invalidParameter("place() takes x, y and scale as numbers");
999
+ if (typeof n.editing != "boolean") throw T.invalidParameter("place() takes editing as true or false");
1000
+ this.pendingPlacements.set(e, {
1001
+ type: t.PLACE,
1002
+ instance: this.instance,
1003
+ zone: e,
1004
+ x: n.x,
1005
+ y: n.y,
1006
+ scale: n.scale,
1007
+ editing: n.editing
1008
+ }), this.frame ??= requestAnimationFrame(() => {
1009
+ this.sendPlacements();
1010
+ });
1011
+ }
1012
+ sendPlacements() {
1013
+ let e = [...this.pendingPlacements.values()];
1014
+ this.frame = null, this.pendingPlacements.clear();
1015
+ for (let t of e) this.send(t);
1016
+ }
1017
+ request(e, n) {
1018
+ return new Promise((r, i) => {
1019
+ this.sequence += 1;
1020
+ let a = String(this.sequence), o = setTimeout(() => {
1021
+ this.expire(a, e);
1022
+ }, bt);
1023
+ this.pending.set(a, {
1024
+ resolve: r,
1025
+ reject: i,
1026
+ timeout: o
1027
+ }), this.send({
1028
+ type: t.PERSONALISE,
1029
+ id: a,
1030
+ instance: this.instance,
1031
+ zone: e,
1032
+ image: n
1033
+ });
1034
+ });
1035
+ }
1036
+ expire(e, t) {
1037
+ let n = this.pending.get(e);
1038
+ n !== void 0 && (this.pending.delete(e), j.warn("Personalisation timed out", { zone: t }), n.reject(M(`Virtualdisplay: the viewer did not answer for zone "${t}"`)));
1039
+ }
1040
+ handleReplyReceived(e) {
1041
+ let t = this.pending.get(e.id);
1042
+ t === void 0 ? j.info("Personalisation reply with no call waiting", {
1043
+ id: e.id,
1044
+ zone: e.zone
1045
+ }) : (this.pending.delete(e.id), clearTimeout(t.timeout), e.ok ? t.resolve() : t.reject(M(e.error ?? xt)));
1046
+ }
1047
+ handleZonesReceived(e) {
1048
+ this.zoneReport = e.zones;
1049
+ for (let e of this.zoneListeners) e(this.zoneReport);
1050
+ }
1051
+ destroy() {
1052
+ this.frame !== null && cancelAnimationFrame(this.frame), this.frame = null, this.pendingPlacements.clear(), this.zoneListeners.clear();
1053
+ for (let e of this.pending.values()) clearTimeout(e.timeout), e.reject(M("Virtualdisplay: the client was destroyed before the viewer answered"));
1054
+ this.pending.clear();
1055
+ }
1056
+ };
1057
+ function M(e) {
1058
+ return new T(e, w.PERSONALISATION_FAILED);
1059
+ }
1060
+ // ../client-core/src/snapshot/photo.ts
1061
+ var Ct = class {
947
1062
  filename;
948
1063
  developedCallbacks = /* @__PURE__ */ new Set();
949
1064
  errorCallbacks = /* @__PURE__ */ new Set();
@@ -972,7 +1087,7 @@ var ht = class {
972
1087
  t(e);
973
1088
  }), this.developedCallbacks.clear(), this.errorCallbacks.clear());
974
1089
  }
975
- }, vt = 3e4, yt = class {
1090
+ }, wt = 3e4, Tt = class {
976
1091
  send;
977
1092
  validExtensions = [".png"];
978
1093
  pendingPhotos = /* @__PURE__ */ new Map();
@@ -986,10 +1101,10 @@ var ht = class {
986
1101
  return this.request(e, t);
987
1102
  }
988
1103
  request(e, n) {
989
- this.validateFilename(e), A.debug("Taking snapshot", { filename: e });
990
- let r = new _t(e), i = setTimeout(() => {
991
- this.pendingPhotos.delete(e), A.warn("Snapshot timed out", { filename: e }), r.fail(new w(`Snapshot timed out: the viewer did not respond within ${vt}ms`, C.SNAPSHOT_FAILED));
992
- }, vt);
1104
+ this.validateFilename(e), j.debug("Taking snapshot", { filename: e });
1105
+ let r = new Ct(e), i = setTimeout(() => {
1106
+ this.pendingPhotos.delete(e), j.warn("Snapshot timed out", { filename: e }), r.fail(new T(`Snapshot timed out: the viewer did not respond within ${wt}ms`, w.SNAPSHOT_FAILED));
1107
+ }, wt);
993
1108
  return this.pendingPhotos.set(e, {
994
1109
  photo: r,
995
1110
  timeout: i
@@ -1002,7 +1117,7 @@ var ht = class {
1002
1117
  handleSnapshotResult(e) {
1003
1118
  let t = this.pendingPhotos.get(e.filename);
1004
1119
  if (t === void 0) {
1005
- A.warn("No pending photo found for filename", {
1120
+ j.warn("No pending photo found for filename", {
1006
1121
  filename: e.filename,
1007
1122
  pendingFilenames: Array.from(this.pendingPhotos.keys())
1008
1123
  });
@@ -1013,20 +1128,20 @@ var ht = class {
1013
1128
  e.error === void 0 ? e.data !== void 0 && n.develop({
1014
1129
  filename: e.filename,
1015
1130
  data: e.data
1016
- }) : n.fail(new w(e.error, C.SNAPSHOT_FAILED));
1131
+ }) : n.fail(new T(e.error, w.SNAPSHOT_FAILED));
1017
1132
  }
1018
1133
  clear() {
1019
1134
  if (this.pendingPhotos.size === 0) return;
1020
- let e = new w("Client destroyed before snapshot completed", C.SNAPSHOT_FAILED);
1135
+ let e = new T("Client destroyed before snapshot completed", w.SNAPSHOT_FAILED);
1021
1136
  for (let { photo: t, timeout: n } of this.pendingPhotos.values()) clearTimeout(n), t.fail(e);
1022
1137
  this.pendingPhotos.clear();
1023
1138
  }
1024
1139
  validateFilename(e) {
1025
- if (e === "" || typeof e != "string") throw new w("Filename must be a non-empty string", C.INVALID_PARAMETER);
1026
- if (!this.validExtensions.some((t) => e.toLowerCase().endsWith(t))) throw new w(`Invalid filename: "${e}". Filename must end with one of: ${this.validExtensions.join(", ")}`, C.INVALID_PARAMETER);
1027
- if (e.includes("..") || e.includes("/") || e.includes("\\")) throw new w("Filename cannot contain path separators or \"..\"", C.INVALID_PARAMETER);
1140
+ if (e === "" || typeof e != "string") throw new T("Filename must be a non-empty string", w.INVALID_PARAMETER);
1141
+ if (!this.validExtensions.some((t) => e.toLowerCase().endsWith(t))) throw new T(`Invalid filename: "${e}". Filename must end with one of: ${this.validExtensions.join(", ")}`, w.INVALID_PARAMETER);
1142
+ if (e.includes("..") || e.includes("/") || e.includes("\\")) throw new T("Filename cannot contain path separators or \"..\"", w.INVALID_PARAMETER);
1028
1143
  }
1029
- }, bt = class {
1144
+ }, Et = class {
1030
1145
  container = null;
1031
1146
  attach(e) {
1032
1147
  this.container = e;
@@ -1052,76 +1167,76 @@ var ht = class {
1052
1167
  this.container?.removeEventListener(e, n);
1053
1168
  };
1054
1169
  }
1055
- }, xt = ((e = {}, t = {}) => {
1056
- let n = t.locale ?? v();
1170
+ }, Dt = ((e = {}, t = {}) => {
1171
+ let n = t.locale ?? y();
1057
1172
  return n === "nl" ? "Bezig…" : n === "de" ? "Läuft…" : "Working…";
1058
- }), St = ((e = {}, t = {}) => {
1059
- let n = t.locale ?? v();
1173
+ }), Ot = ((e = {}, t = {}) => {
1174
+ let n = t.locale ?? y();
1060
1175
  return n === "nl" ? "Mislukt" : n === "de" ? "Fehlgeschlagen" : "Failed";
1061
- }), Ct = ((e = {}, t = {}) => {
1062
- let n = t.locale ?? v();
1176
+ }), kt = ((e = {}, t = {}) => {
1177
+ let n = t.locale ?? y();
1063
1178
  return n === "nl" ? "Gelukt" : n === "de" ? "Fertig" : "Done";
1064
- }), wt = ((e = {}, t = {}) => {
1065
- let n = t.locale ?? v();
1179
+ }), At = ((e = {}, t = {}) => {
1180
+ let n = t.locale ?? y();
1066
1181
  return n === "nl" ? "Annotaties" : n === "de" ? "Anmerkungen" : "Annotations";
1067
- }), Tt = ((e = {}, t = {}) => {
1068
- let n = t.locale ?? v();
1182
+ }), jt = ((e = {}, t = {}) => {
1183
+ let n = t.locale ?? y();
1069
1184
  return n === "nl" ? "AR activeren" : n === "de" ? "AR aktivieren" : "Activate AR";
1070
- }), Et = ((e = {}, t = {}) => {
1071
- let n = t.locale ?? v();
1185
+ }), Mt = ((e = {}, t = {}) => {
1186
+ let n = t.locale ?? y();
1072
1187
  return n === "nl" ? "Camera resetten" : n === "de" ? "Kamera zurücksetzen" : "Reset camera";
1073
- }), Dt = ((e = {}, t = {}) => {
1074
- let n = t.locale ?? v();
1188
+ }), Nt = ((e = {}, t = {}) => {
1189
+ let n = t.locale ?? y();
1075
1190
  return n === "nl" ? "Naar links draaien" : n === "de" ? "Nach links drehen" : "Rotate left";
1076
- }), Ot = ((e = {}, t = {}) => {
1077
- let n = t.locale ?? v();
1191
+ }), Pt = ((e = {}, t = {}) => {
1192
+ let n = t.locale ?? y();
1078
1193
  return n === "nl" ? "Naar rechts draaien" : n === "de" ? "Nach rechts drehen" : "Rotate right";
1079
- }), kt = ((e = {}, t = {}) => {
1080
- let n = t.locale ?? v();
1194
+ }), Ft = ((e = {}, t = {}) => {
1195
+ let n = t.locale ?? y();
1081
1196
  return n === "nl" ? "Omlaag kantelen" : n === "de" ? "Nach unten kippen" : "Tilt down";
1082
- }), At = ((e = {}, t = {}) => {
1083
- let n = t.locale ?? v();
1197
+ }), It = ((e = {}, t = {}) => {
1198
+ let n = t.locale ?? y();
1084
1199
  return n === "nl" ? "Omhoog kantelen" : n === "de" ? "Nach oben kippen" : "Tilt up";
1085
- }), jt = ((e = {}, t = {}) => {
1086
- let n = t.locale ?? v();
1200
+ }), Lt = ((e = {}, t = {}) => {
1201
+ let n = t.locale ?? y();
1087
1202
  return n === "nl" ? "Inzoomen" : n === "de" ? "Hineinzoomen" : "Zoom in";
1088
- }), Mt = ((e = {}, t = {}) => {
1089
- let n = t.locale ?? v();
1203
+ }), Rt = ((e = {}, t = {}) => {
1204
+ let n = t.locale ?? y();
1090
1205
  return n === "nl" ? "Uitzoomen" : n === "de" ? "Herauszoomen" : "Zoom out";
1091
- }), Nt = ((e = {}, t = {}) => {
1092
- let n = t.locale ?? v();
1206
+ }), zt = ((e = {}, t = {}) => {
1207
+ let n = t.locale ?? y();
1093
1208
  return n === "nl" ? "Sluiten" : n === "de" ? "Schließen" : "Close";
1094
- }), Pt = ((e = {}, t = {}) => {
1095
- let n = t.locale ?? v();
1209
+ }), Bt = ((e = {}, t = {}) => {
1210
+ let n = t.locale ?? y();
1096
1211
  return n === "nl" ? "Configureren" : n === "de" ? "Konfigurieren" : "Configure";
1097
- }), Ft = ((e = {}, t = {}) => {
1098
- let n = t.locale ?? v();
1212
+ }), Vt = ((e = {}, t = {}) => {
1213
+ let n = t.locale ?? y();
1099
1214
  return n === "nl" ? "Volledig scherm" : n === "de" ? "Vollbild" : "Fullscreen";
1100
- }), It = ((e = {}, t = {}) => {
1101
- let n = t.locale ?? v();
1215
+ }), Ht = ((e = {}, t = {}) => {
1216
+ let n = t.locale ?? y();
1102
1217
  return n === "nl" ? "Sluiten" : n === "de" ? "Schließen" : "Close";
1103
- }), Lt = ((e = {}, t = {}) => {
1104
- let n = t.locale ?? v();
1218
+ }), Ut = ((e = {}, t = {}) => {
1219
+ let n = t.locale ?? y();
1105
1220
  return n === "nl" ? "QR-code" : n === "de" ? "QR-Code" : "QR code";
1106
- }), Rt = ((e = {}, t = {}) => {
1107
- let n = t.locale ?? v();
1221
+ }), Wt = ((e = {}, t = {}) => {
1222
+ let n = t.locale ?? y();
1108
1223
  return n === "nl" ? "Gebruik de camera van je smartphone om deze QR-code te scannen" : n === "de" ? "Verwende die Kamera deines Smartphones, um diesen QR-Code zu scannen" : "Use your smartphone camera to scan this QR code";
1109
- }), zt = ((e = {}, t = {}) => {
1110
- let n = t.locale ?? v();
1224
+ }), Gt = ((e = {}, t = {}) => {
1225
+ let n = t.locale ?? y();
1111
1226
  return n === "nl" ? "Je telefoon opent het 3D-model in AR-modus." : n === "de" ? "Dein Telefon öffnet das 3D-Modell im AR-Modus." : "Your phone will open the 3D model in AR mode.";
1112
- }), Bt = ((e = {}, t = {}) => {
1113
- let n = t.locale ?? v();
1227
+ }), Kt = ((e = {}, t = {}) => {
1228
+ let n = t.locale ?? y();
1114
1229
  return n === "nl" ? "Scan om in AR te bekijken" : n === "de" ? "Scannen für AR-Ansicht" : "Scan to view in AR";
1115
- }), Vt = ((e = {}, t = {}) => {
1116
- let n = t.locale ?? v();
1230
+ }), qt = ((e = {}, t = {}) => {
1231
+ let n = t.locale ?? y();
1117
1232
  return n === "nl" ? "We kunnen de QR-code nu niet tonen. Open deze link op je telefoon:" : n === "de" ? "Wir können den QR-Code gerade nicht anzeigen. Öffne diesen Link auf deinem Handy:" : "We can't show the QR code right now. Open this link on your phone:";
1118
- }), Ht = ((e = {}, t = {}) => (t.locale ?? v(), "Screenshot")), Ut = ((e = {}, t = {}) => {
1119
- let n = t.locale ?? v();
1233
+ }), Jt = ((e = {}, t = {}) => (t.locale ?? y(), "Screenshot")), Yt = ((e = {}, t = {}) => {
1234
+ let n = t.locale ?? y();
1120
1235
  return n === "nl" ? "Downloaden" : n === "de" ? "Herunterladen" : "Downloading";
1121
- }), Wt = ((e = {}, t = {}) => {
1122
- let n = t.locale ?? v();
1236
+ }), Xt = ((e = {}, t = {}) => {
1237
+ let n = t.locale ?? y();
1123
1238
  return n === "nl" ? "Laden mislukt. Ververs de pagina om het opnieuw te proberen." : n === "de" ? "Laden fehlgeschlagen. Lade die Seite neu, um es erneut zu versuchen." : "Load failed. Refresh the page to try again.";
1124
- }), Gt = {
1239
+ }), Zt = {
1125
1240
  xmlns: "http://www.w3.org/2000/svg",
1126
1241
  width: 24,
1127
1242
  height: 24,
@@ -1131,50 +1246,50 @@ var ht = class {
1131
1246
  "stroke-width": 2,
1132
1247
  "stroke-linecap": "round",
1133
1248
  "stroke-linejoin": "round"
1134
- }, Kt = ([e, t, n]) => {
1249
+ }, Qt = ([e, t, n]) => {
1135
1250
  let r = document.createElementNS("http://www.w3.org/2000/svg", e);
1136
1251
  return Object.keys(t).forEach((e) => {
1137
1252
  r.setAttribute(e, String(t[e]));
1138
1253
  }), n?.length && n.forEach((e) => {
1139
- let t = Kt(e);
1254
+ let t = Qt(e);
1140
1255
  r.appendChild(t);
1141
1256
  }), r;
1142
- }, qt = (e, t = {}) => Kt([
1257
+ }, $t = (e, t = {}) => Qt([
1143
1258
  "svg",
1144
1259
  {
1145
- ...Gt,
1260
+ ...Zt,
1146
1261
  ...t
1147
1262
  },
1148
1263
  e
1149
- ]), Jt = [
1264
+ ]), en = [
1150
1265
  ["path", { d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z" }],
1151
1266
  ["path", { d: "m3.3 7 8.7 5 8.7-5" }],
1152
1267
  ["path", { d: "M12 22V12" }]
1153
- ], Yt = [["path", { d: "M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z" }], ["circle", {
1268
+ ], tn = [["path", { d: "M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z" }], ["circle", {
1154
1269
  cx: "12",
1155
1270
  cy: "13",
1156
1271
  r: "3"
1157
- }]], Xt = [["path", { d: "m6 9 6 6 6-6" }]], Zt = [["path", { d: "m15 18-6-6 6-6" }]], Qt = [["path", { d: "m9 18 6-6-6-6" }]], $t = [["path", { d: "m18 15-6-6-6 6" }]], en = [
1272
+ }]], N = [["path", { d: "m6 9 6 6 6-6" }]], nn = [["path", { d: "m15 18-6-6 6-6" }]], rn = [["path", { d: "m9 18 6-6-6-6" }]], an = [["path", { d: "m18 15-6-6-6 6" }]], on = [
1158
1273
  ["path", { d: "M12.75 7.09a3 3 0 0 1 2.16 2.16" }],
1159
1274
  ["path", { d: "M17.072 17.072c-1.634 2.17-3.527 3.912-4.471 4.727a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 1.432-4.568" }],
1160
1275
  ["path", { d: "m2 2 20 20" }],
1161
1276
  ["path", { d: "M8.475 2.818A8 8 0 0 1 20 10c0 1.183-.31 2.377-.81 3.533" }],
1162
1277
  ["path", { d: "M9.13 9.13a3 3 0 0 0 3.74 3.74" }]
1163
- ], tn = [["path", { d: "M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0" }], ["circle", {
1278
+ ], sn = [["path", { d: "M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0" }], ["circle", {
1164
1279
  cx: "12",
1165
1280
  cy: "10",
1166
1281
  r: "3"
1167
- }]], nn = [
1282
+ }]], cn = [
1168
1283
  ["path", { d: "M15 3h6v6" }],
1169
1284
  ["path", { d: "m21 3-7 7" }],
1170
1285
  ["path", { d: "m3 21 7-7" }],
1171
1286
  ["path", { d: "M9 21H3v-6" }]
1172
- ], rn = [
1287
+ ], ln = [
1173
1288
  ["path", { d: "m14 10 7-7" }],
1174
1289
  ["path", { d: "M20 10h-6V4" }],
1175
1290
  ["path", { d: "m3 21 7-7" }],
1176
1291
  ["path", { d: "M4 14h6v6" }]
1177
- ], an = [["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }], ["path", { d: "M3 3v5h5" }]], on = [
1292
+ ], un = [["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }], ["path", { d: "M3 3v5h5" }]], dn = [
1178
1293
  ["path", { d: "M10 5H3" }],
1179
1294
  ["path", { d: "M12 19H3" }],
1180
1295
  ["path", { d: "M14 3v4" }],
@@ -1184,7 +1299,7 @@ var ht = class {
1184
1299
  ["path", { d: "M21 5h-7" }],
1185
1300
  ["path", { d: "M8 10v4" }],
1186
1301
  ["path", { d: "M8 12H3" }]
1187
- ], sn = [["path", { d: "M18 6 6 18" }], ["path", { d: "m6 6 12 12" }]], cn = [
1302
+ ], fn = [["path", { d: "M18 6 6 18" }], ["path", { d: "m6 6 12 12" }]], pn = [
1188
1303
  ["circle", {
1189
1304
  cx: "11",
1190
1305
  cy: "11",
@@ -1196,13 +1311,19 @@ var ht = class {
1196
1311
  y1: "21",
1197
1312
  y2: "16.65"
1198
1313
  }],
1314
+ ["line", {
1315
+ x1: "11",
1316
+ x2: "11",
1317
+ y1: "8",
1318
+ y2: "14"
1319
+ }],
1199
1320
  ["line", {
1200
1321
  x1: "8",
1201
1322
  x2: "14",
1202
1323
  y1: "11",
1203
1324
  y2: "11"
1204
1325
  }]
1205
- ], ln = [
1326
+ ], mn = [
1206
1327
  ["circle", {
1207
1328
  cx: "11",
1208
1329
  cy: "11",
@@ -1214,12 +1335,6 @@ var ht = class {
1214
1335
  y1: "21",
1215
1336
  y2: "16.65"
1216
1337
  }],
1217
- ["line", {
1218
- x1: "11",
1219
- x2: "11",
1220
- y1: "8",
1221
- y2: "14"
1222
- }],
1223
1338
  ["line", {
1224
1339
  x1: "8",
1225
1340
  x2: "14",
@@ -1228,30 +1343,31 @@ var ht = class {
1228
1343
  }]
1229
1344
  ];
1230
1345
  // ../ui/src/icons.ts
1231
- function j(e, { size: t = 20, strokeWidth: n = 1.75 } = {}) {
1232
- return qt(e, {
1346
+ function P(e, { size: t = 20, strokeWidth: n = 1.75 } = {}) {
1347
+ return $t(e, {
1233
1348
  width: t,
1234
1349
  height: t,
1235
1350
  "stroke-width": n
1236
1351
  });
1237
1352
  }
1238
- var M = {
1239
- ar: (e) => j(Jt, e),
1240
- annotations: (e) => j(tn, e),
1241
- annotationsOff: (e) => j(en, e),
1242
- fullscreen: (e) => j(nn, e),
1243
- exitFullscreen: (e) => j(rn, e),
1244
- screenshot: (e) => j(Yt, e),
1245
- tiltUp: (e) => j($t, e),
1246
- tiltDown: (e) => j(Xt, e),
1247
- rotateLeft: (e) => j(Zt, e),
1248
- rotateRight: (e) => j(Qt, e),
1249
- zoomIn: (e) => j(ln, e),
1250
- zoomOut: (e) => j(cn, e),
1251
- reset: (e) => j(an, e),
1252
- configurator: (e) => j(on, e),
1253
- close: (e) => j(sn, e)
1254
- }, N = class {
1353
+ var F = {
1354
+ ar: (e) => P(en, e),
1355
+ annotations: (e) => P(sn, e),
1356
+ annotationsOff: (e) => P(on, e),
1357
+ fullscreen: (e) => P(cn, e),
1358
+ exitFullscreen: (e) => P(ln, e),
1359
+ screenshot: (e) => P(tn, e),
1360
+ tiltUp: (e) => P(an, e),
1361
+ tiltDown: (e) => P(N, e),
1362
+ rotateLeft: (e) => P(nn, e),
1363
+ rotateRight: (e) => P(rn, e),
1364
+ zoomIn: (e) => P(pn, e),
1365
+ zoomOut: (e) => P(mn, e),
1366
+ reset: (e) => P(un, e),
1367
+ configurator: (e) => P(dn, e),
1368
+ close: (e) => P(fn, e),
1369
+ expand: (e) => P(N, e)
1370
+ }, I = class {
1255
1371
  element;
1256
1372
  constructor({ variant: e = "default", size: t = "default", label: n, icon: r, onClick: i, disabled: a = !1 } = {}) {
1257
1373
  this.element = document.createElement("button"), this.element.className = `ui-btn ui-btn--${e} ui-btn--size-${t}`, n !== void 0 && (this.element.setAttribute("aria-label", n), this.element.title = n), r === void 0 ? n !== void 0 && (this.element.textContent = n) : this.element.appendChild(r), i && this.element.addEventListener("click", i), this.element.disabled = a;
@@ -1260,7 +1376,233 @@ var M = {
1260
1376
  let t = this.element.querySelector("svg");
1261
1377
  t === null ? this.element.appendChild(e) : t.replaceWith(e);
1262
1378
  }
1263
- }, un = class {
1379
+ };
1380
+ // ../ui/src/vanilla/components/loading-indicator/wireframe-cube.ts
1381
+ function hn(e) {
1382
+ let t = Math.max(0, Math.min(1, e));
1383
+ return t * t * (3 - 2 * t);
1384
+ }
1385
+ function gn(e, t, n, r, i, a) {
1386
+ let [o, s, c] = e, l = Math.cos(t), u = Math.sin(t), ee = l * o + u * c, d = -u * o + l * c, f = Math.cos(n), p = Math.sin(n), te = f * s - p * d, ne = p * s + f * d, m = .55;
1387
+ return [
1388
+ r + ee * a * m,
1389
+ i - te * a * m,
1390
+ ne
1391
+ ];
1392
+ }
1393
+ function _n(e, t, n) {
1394
+ e.beginPath(), e.moveTo(t[0], t[1]), e.lineTo(n[0], n[1]), e.lineWidth = 2, e.stroke();
1395
+ }
1396
+ function vn(e, t, n, r, i) {
1397
+ let a = t(n), o = t(r);
1398
+ _n(e, a, [
1399
+ a[0] + (o[0] - a[0]) * i,
1400
+ a[1] + (o[1] - a[1]) * i,
1401
+ a[2]
1402
+ ]);
1403
+ }
1404
+ var L = [
1405
+ -1,
1406
+ -1,
1407
+ 1
1408
+ ], R = [
1409
+ 1,
1410
+ -1,
1411
+ 1
1412
+ ], z = [
1413
+ 1,
1414
+ -1,
1415
+ -1
1416
+ ], B = [
1417
+ -1,
1418
+ -1,
1419
+ -1
1420
+ ], V = [
1421
+ -1,
1422
+ 1,
1423
+ 1
1424
+ ], H = [
1425
+ 1,
1426
+ 1,
1427
+ 1
1428
+ ], U = [
1429
+ 1,
1430
+ 1,
1431
+ -1
1432
+ ], W = [
1433
+ -1,
1434
+ 1,
1435
+ -1
1436
+ ], G = [
1437
+ [L, R],
1438
+ [R, z],
1439
+ [z, B],
1440
+ [B, L],
1441
+ [L, V],
1442
+ [R, H],
1443
+ [z, U],
1444
+ [B, W],
1445
+ [V, H],
1446
+ [H, U],
1447
+ [U, W],
1448
+ [W, V]
1449
+ ];
1450
+ function yn(e) {
1451
+ let t = e % 6 / 6, n = G.length;
1452
+ return t < .35 ? hn(t / .35) * n : t < .55 ? n : t < .9 ? (1 - hn((t - .55) / .35)) * n : 0;
1453
+ }
1454
+ function bn(e, { width: t, height: n }, r, i = "#000") {
1455
+ let a = t / 2, o = n * .44, s = Math.min(t, n) * .08, c = (e) => gn(e, .785, .615, a, o, s), l = yn(r);
1456
+ e.shadowBlur = 5, e.shadowColor = "rgba(30,30,30,0.08)", e.strokeStyle = i;
1457
+ for (let t = 0; t < G.length && !(t >= l); t++) {
1458
+ let n = G[t];
1459
+ if (n === void 0) continue;
1460
+ let r = Math.min(1, l - t);
1461
+ vn(e, c, n[0], n[1], r);
1462
+ }
1463
+ e.shadowBlur = 0;
1464
+ }
1465
+ // ../ui/src/vanilla/components/loading-indicator/index.ts
1466
+ var xn = 400, Sn = 3e4, Cn = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif";
1467
+ function wn(e) {
1468
+ let t = getComputedStyle(e).color, n = t === "" ? "#000" : t;
1469
+ return {
1470
+ surface: "transparent",
1471
+ ink: n,
1472
+ danger: n
1473
+ };
1474
+ }
1475
+ function Tn(e, t) {
1476
+ let n = document.createElement("div");
1477
+ Object.assign(n.style, {
1478
+ position: "absolute",
1479
+ inset: "0",
1480
+ display: "flex",
1481
+ flexDirection: "column",
1482
+ alignItems: "center",
1483
+ justifyContent: "center",
1484
+ background: e.surface,
1485
+ zIndex: "20",
1486
+ opacity: "0",
1487
+ transition: "opacity 0.3s ease-in-out"
1488
+ });
1489
+ let r = document.createElement("canvas");
1490
+ Object.assign(r.style, {
1491
+ width: "100%",
1492
+ height: "100%",
1493
+ position: "absolute",
1494
+ inset: "0"
1495
+ });
1496
+ let i = document.createElement("div");
1497
+ i.setAttribute("role", "status"), Object.assign(i.style, {
1498
+ position: "absolute",
1499
+ top: "56%",
1500
+ left: "0",
1501
+ right: "0",
1502
+ textAlign: "center",
1503
+ pointerEvents: "none"
1504
+ });
1505
+ let a = document.createElement("span");
1506
+ Object.assign(a.style, {
1507
+ fontSize: "13px",
1508
+ fontWeight: "400",
1509
+ color: e.ink,
1510
+ fontVariantNumeric: "tabular-nums",
1511
+ fontFamily: Cn
1512
+ });
1513
+ let o = document.createElement("span");
1514
+ return Object.assign(o.style, {
1515
+ fontSize: "13px",
1516
+ color: e.ink,
1517
+ fontFamily: Cn
1518
+ }), o.textContent = t, i.appendChild(a), i.appendChild(o), n.appendChild(r), n.appendChild(i), {
1519
+ overlay: n,
1520
+ canvas: r,
1521
+ pctEl: a,
1522
+ phaseEl: o
1523
+ };
1524
+ }
1525
+ var En = class {
1526
+ overlay;
1527
+ canvas;
1528
+ ctx;
1529
+ pctEl;
1530
+ phaseEl;
1531
+ animationId = null;
1532
+ showTimerId = null;
1533
+ noSignalTimerId = null;
1534
+ startTime;
1535
+ hidden = !1;
1536
+ visible = !1;
1537
+ errored = !1;
1538
+ noSignalErrored = !1;
1539
+ colours;
1540
+ text;
1541
+ constructor(e, t) {
1542
+ this.startTime = performance.now(), this.colours = t.colours ?? wn(e), this.text = t.text;
1543
+ let n = Tn(this.colours, this.text.downloading());
1544
+ this.overlay = n.overlay, t.className !== void 0 && (this.overlay.className = t.className), this.canvas = n.canvas, this.pctEl = n.pctEl, this.phaseEl = n.phaseEl, e.appendChild(this.overlay), this.ctx = this.canvas.getContext("2d"), this.ctx !== null && (this.sizeCanvas(), this.tick()), this.showTimerId = setTimeout(() => {
1545
+ this.reveal();
1546
+ }, xn), this.noSignalTimerId = setTimeout(() => {
1547
+ this.hidden || (this.noSignalErrored = !0, this.showError(this.text.loadError()));
1548
+ }, Sn);
1549
+ }
1550
+ viewerAlive() {
1551
+ this.cancelNoSignalTimer(), this.noSignalErrored && this.recoverFromNoSignal();
1552
+ }
1553
+ recoverFromNoSignal() {
1554
+ this.noSignalErrored = !1, this.errored = !1, this.pctEl.textContent = "", this.phaseEl.textContent = this.text.downloading(), this.phaseEl.style.color = this.colours.ink, this.ctx !== null && this.animationId === null && !this.hidden && this.tick();
1555
+ }
1556
+ recolour(e) {
1557
+ this.colours = e, this.overlay.style.background = e.surface, this.pctEl.style.color = e.ink, this.phaseEl.style.color = this.errored ? e.danger : e.ink, this.errored && this.clearCanvas();
1558
+ }
1559
+ updateProgress(e, t) {
1560
+ this.cancelNoSignalTimer(), this.hidden || this.errored || (this.pctEl.textContent = `${Math.round(e)}%`, this.phaseEl.textContent = t === "" ? "" : ` \u00B7 ${t}`);
1561
+ }
1562
+ showError(e) {
1563
+ this.cancelNoSignalTimer(), this.hidden = !1, this.errored = !0, this.animationId !== null && (cancelAnimationFrame(this.animationId), this.animationId = null), this.clearCanvas(), this.pctEl.textContent = "", this.phaseEl.textContent = e, this.phaseEl.style.color = this.colours.danger, this.reveal();
1564
+ }
1565
+ hide() {
1566
+ this.hidden || (this.hidden = !0, this.cancelShowTimer(), this.visible ? (this.overlay.style.opacity = "0", this.overlay.addEventListener("transitionend", () => {
1567
+ this.destroy();
1568
+ }, { once: !0 }), setTimeout(() => {
1569
+ this.destroy();
1570
+ }, 500)) : this.destroy());
1571
+ }
1572
+ destroy() {
1573
+ this.cancelShowTimer(), this.cancelNoSignalTimer(), this.animationId !== null && (cancelAnimationFrame(this.animationId), this.animationId = null), this.overlay.remove();
1574
+ }
1575
+ reveal() {
1576
+ this.hidden || this.visible || (this.visible = !0, this.overlay.style.opacity = "1");
1577
+ }
1578
+ clearCanvas() {
1579
+ if (this.ctx === null) return;
1580
+ let e = Math.min(devicePixelRatio, 2), t = this.canvas.width / e, n = this.canvas.height / e;
1581
+ this.ctx.clearRect(0, 0, t, n);
1582
+ }
1583
+ cancelShowTimer() {
1584
+ this.showTimerId !== null && (clearTimeout(this.showTimerId), this.showTimerId = null);
1585
+ }
1586
+ cancelNoSignalTimer() {
1587
+ this.noSignalTimerId !== null && (clearTimeout(this.noSignalTimerId), this.noSignalTimerId = null);
1588
+ }
1589
+ sizeCanvas() {
1590
+ if (this.ctx === null) return;
1591
+ let e = Math.min(devicePixelRatio, 2), t = this.overlay.clientWidth || 440, n = this.overlay.clientHeight || 360;
1592
+ this.canvas.width = t * e, this.canvas.height = n * e, this.ctx.scale(e, e), this.ctx.lineCap = "round", this.ctx.lineJoin = "round";
1593
+ }
1594
+ tick = () => {
1595
+ this.hidden || (this.drawFrame(), this.animationId = requestAnimationFrame(this.tick));
1596
+ };
1597
+ drawFrame() {
1598
+ if (this.ctx === null) return;
1599
+ let e = this.canvas.width / Math.min(devicePixelRatio, 2), t = this.canvas.height / Math.min(devicePixelRatio, 2), n = (performance.now() - this.startTime) / 1e3;
1600
+ this.ctx.clearRect(0, 0, e, t), bn(this.ctx, {
1601
+ width: e,
1602
+ height: t
1603
+ }, n, this.colours.ink);
1604
+ }
1605
+ }, Dn = class {
1264
1606
  element;
1265
1607
  selectCallback = null;
1266
1608
  constructor(e, t, n) {
@@ -1287,7 +1629,7 @@ var M = {
1287
1629
  t.disabled = !n, t.setAttribute("aria-disabled", n ? "false" : "true");
1288
1630
  }
1289
1631
  }
1290
- }, dn = class {
1632
+ }, On = class {
1291
1633
  element;
1292
1634
  select;
1293
1635
  constructor(e, t, n, r, i) {
@@ -1300,7 +1642,7 @@ var M = {
1300
1642
  a.value = n, a.textContent = i?.[e] ?? n, n === r && (a.selected = !0, o = !0), this.select.appendChild(a);
1301
1643
  }
1302
1644
  o || (a.selected = !0);
1303
- let s = qt(Xt, {
1645
+ let s = $t(N, {
1304
1646
  width: 16,
1305
1647
  height: 16,
1306
1648
  "stroke-width": 2
@@ -1318,7 +1660,7 @@ var M = {
1318
1660
  setEnabled(e) {
1319
1661
  for (let t of this.select.options) t.value !== "" && (t.disabled = e !== null && !e.includes(t.value));
1320
1662
  }
1321
- }, fn = class {
1663
+ }, kn = class {
1322
1664
  element;
1323
1665
  input;
1324
1666
  valueText;
@@ -1379,7 +1721,7 @@ var M = {
1379
1721
  let t = this.labelAt(e);
1380
1722
  return this.options.unit === void 0 ? t : `${t} ${this.options.unit}`;
1381
1723
  }
1382
- }, P = {
1724
+ }, K = {
1383
1725
  neutral: {
1384
1726
  50: "oklch(98.5% 0 0)",
1385
1727
  100: "oklch(96.5% 0 0)",
@@ -1395,7 +1737,7 @@ var M = {
1395
1737
  },
1396
1738
  white: "oklch(100% 0 0)",
1397
1739
  semantic: { error: "oklch(47% 0.17 25)" }
1398
- }, F = {
1740
+ }, q = {
1399
1741
  px: "1px",
1400
1742
  0: "0",
1401
1743
  .5: "0.125rem",
@@ -1417,7 +1759,7 @@ var M = {
1417
1759
  16: "4rem",
1418
1760
  20: "5rem",
1419
1761
  24: "6rem"
1420
- }, I = {
1762
+ }, J = {
1421
1763
  fontFamily: {
1422
1764
  sans: [
1423
1765
  "Mona Sans",
@@ -1456,25 +1798,25 @@ var M = {
1456
1798
  normal: "1.5",
1457
1799
  relaxed: "1.75"
1458
1800
  }
1459
- }, pn = class {
1801
+ }, An = class {
1460
1802
  element;
1461
1803
  constructor() {
1462
1804
  this.element = document.createElement("div"), Object.assign(this.element.style, {
1463
- background: P.white,
1805
+ background: K.white,
1464
1806
  borderRadius: "var(--radius)",
1465
- padding: F[6],
1466
- boxShadow: `0 ${F[2]} ${F[8]} oklch(0% 0 0 / 20%)`,
1807
+ padding: q[6],
1808
+ boxShadow: `0 ${q[2]} ${q[8]} oklch(0% 0 0 / 20%)`,
1467
1809
  maxWidth: "20rem",
1468
1810
  width: "100%"
1469
1811
  });
1470
1812
  }
1471
- }, mn = class {
1813
+ }, jn = class {
1472
1814
  options;
1473
1815
  card;
1474
1816
  backdrop;
1475
1817
  keyHandler = null;
1476
1818
  constructor(e = {}) {
1477
- this.options = e, this.card = new pn(), this.backdrop = this.createBackdrop(), this.backdrop.appendChild(this.card.element);
1819
+ this.options = e, this.card = new An(), this.backdrop = this.createBackdrop(), this.backdrop.appendChild(this.card.element);
1478
1820
  }
1479
1821
  get content() {
1480
1822
  return this.card.element;
@@ -1491,7 +1833,7 @@ var M = {
1491
1833
  let e = document.createElement("div");
1492
1834
  return Object.assign(e.style, {
1493
1835
  position: "fixed",
1494
- inset: F[0],
1836
+ inset: q[0],
1495
1837
  background: "oklch(0% 0 0 / 50%)",
1496
1838
  zIndex: "9999",
1497
1839
  display: "flex",
@@ -1501,7 +1843,7 @@ var M = {
1501
1843
  t.target === e && this.close();
1502
1844
  }), e;
1503
1845
  }
1504
- }, L = I.fontFamily.sans.join(", "), hn = `
1846
+ }, Y = J.fontFamily.sans.join(", "), Mn = `
1505
1847
  :root {
1506
1848
  --primary: oklch(5% 0 0);
1507
1849
  --primary-foreground: oklch(100% 0 0);
@@ -1525,7 +1867,7 @@ var M = {
1525
1867
  gap: 0.5rem;
1526
1868
  border: 1px solid transparent;
1527
1869
  border-radius: var(--radius);
1528
- font-family: ${L};
1870
+ font-family: ${Y};
1529
1871
  font-size: 0.875rem;
1530
1872
  font-weight: 600;
1531
1873
  white-space: nowrap;
@@ -1582,7 +1924,7 @@ var M = {
1582
1924
  border-radius: var(--radius);
1583
1925
  background: var(--background);
1584
1926
  color: var(--foreground);
1585
- font-family: ${L};
1927
+ font-family: ${Y};
1586
1928
  font-size: 0.875rem;
1587
1929
  font-weight: 600;
1588
1930
  cursor: pointer;
@@ -1623,7 +1965,7 @@ var M = {
1623
1965
  background: var(--background);
1624
1966
  appearance: none;
1625
1967
  color: var(--foreground);
1626
- font-family: ${L};
1968
+ font-family: ${Y};
1627
1969
  font-size: 0.875rem;
1628
1970
  font-weight: 400;
1629
1971
  cursor: pointer;
@@ -1661,7 +2003,7 @@ var M = {
1661
2003
 
1662
2004
  /* Tabular figures keep the readout and layout steady mid-drag. */
1663
2005
  .ui-slider-value {
1664
- font-family: ${L};
2006
+ font-family: ${Y};
1665
2007
  font-size: 0.875rem;
1666
2008
  font-weight: 600;
1667
2009
  color: var(--foreground);
@@ -1672,7 +2014,7 @@ var M = {
1672
2014
  .ui-slider-ends {
1673
2015
  display: flex;
1674
2016
  justify-content: space-between;
1675
- font-family: ${L};
2017
+ font-family: ${Y};
1676
2018
  font-size: 0.75rem;
1677
2019
  color: var(--muted-foreground);
1678
2020
  font-variant-numeric: tabular-nums;
@@ -1808,7 +2150,7 @@ var M = {
1808
2150
  border: 2px solid oklch(100% 0 0);
1809
2151
  background: var(--primary);
1810
2152
  color: var(--primary-foreground);
1811
- font-family: ${L};
2153
+ font-family: ${Y};
1812
2154
  font-size: 0.8125rem;
1813
2155
  font-weight: 600;
1814
2156
  cursor: pointer;
@@ -1897,7 +2239,7 @@ var M = {
1897
2239
  }
1898
2240
 
1899
2241
  .vd-annotation-popup-title {
1900
- font-family: ${L};
2242
+ font-family: ${Y};
1901
2243
  font-size: 0.875rem;
1902
2244
  font-weight: 600;
1903
2245
  line-height: 1.25rem;
@@ -1945,7 +2287,7 @@ button.vd-annotation-popup-title:focus-visible {
1945
2287
  }
1946
2288
 
1947
2289
  .vd-annotation-popup-description {
1948
- font-family: ${L};
2290
+ font-family: ${Y};
1949
2291
  font-size: 0.8125rem;
1950
2292
  font-weight: 400;
1951
2293
  line-height: 1.125rem;
@@ -1984,41 +2326,41 @@ button.vd-annotation-popup-title:focus-visible {
1984
2326
  0%, 100% { opacity: 1; }
1985
2327
  50% { opacity: 0.55; }
1986
2328
  }
1987
- `, gn = !1;
1988
- function _n() {
1989
- if (gn || typeof document > "u") return;
1990
- gn = !0;
2329
+ `, Nn = !1;
2330
+ function Pn() {
2331
+ if (Nn || typeof document > "u") return;
2332
+ Nn = !0;
1991
2333
  let e = document.createElement("style");
1992
- e.id = "vd-ui-vanilla", e.textContent = hn, document.head.appendChild(e);
2334
+ e.id = "vd-ui-vanilla", e.textContent = Mn, document.head.appendChild(e);
1993
2335
  }
1994
2336
  // ../ui/src/vanilla/composites/qr-modal/index.ts
1995
- var vn = I.fontFamily.sans.join(", "), yn = class {
2337
+ var Fn = J.fontFamily.sans.join(", "), In = class {
1996
2338
  qrLib = null;
1997
2339
  dialog = null;
1998
2340
  qrSlot = null;
1999
2341
  show() {
2000
- this.hide(), _n(), this.dialog = new mn({ onClose: () => {
2342
+ this.hide(), Pn(), this.dialog = new jn({ onClose: () => {
2001
2343
  this.dialog = null, this.qrSlot = null;
2002
2344
  } }), Object.assign(this.dialog.content.style, {
2003
2345
  display: "flex",
2004
2346
  flexDirection: "column",
2005
2347
  alignItems: "center",
2006
- gap: F[3],
2007
- fontFamily: vn
2008
- }), this.dialog.content.appendChild(this.createText(Bt(), {
2009
- fontSize: I.fontSize.base,
2010
- fontWeight: I.fontWeight.semibold,
2011
- color: P.neutral[900]
2012
- })), this.dialog.content.appendChild(this.createText(Rt(), {
2013
- fontSize: I.fontSize.sm,
2014
- color: P.neutral[600]
2015
- })), this.qrSlot = this.createQrSlot(), this.dialog.content.appendChild(this.qrSlot), this.dialog.content.appendChild(this.createText(zt(), {
2016
- fontSize: I.fontSize.xs,
2017
- color: P.neutral[500]
2348
+ gap: q[3],
2349
+ fontFamily: Fn
2350
+ }), this.dialog.content.appendChild(this.createText(Kt(), {
2351
+ fontSize: J.fontSize.base,
2352
+ fontWeight: J.fontWeight.semibold,
2353
+ color: K.neutral[900]
2354
+ })), this.dialog.content.appendChild(this.createText(Wt(), {
2355
+ fontSize: J.fontSize.sm,
2356
+ color: K.neutral[600]
2357
+ })), this.qrSlot = this.createQrSlot(), this.dialog.content.appendChild(this.qrSlot), this.dialog.content.appendChild(this.createText(Gt(), {
2358
+ fontSize: J.fontSize.xs,
2359
+ color: K.neutral[500]
2018
2360
  }));
2019
- let e = new N({
2361
+ let e = new I({
2020
2362
  variant: "outline",
2021
- label: It(),
2363
+ label: Ht(),
2022
2364
  onClick: () => {
2023
2365
  this.hide();
2024
2366
  }
@@ -2028,7 +2370,7 @@ var vn = I.fontFamily.sans.join(", "), yn = class {
2028
2370
  async update(t) {
2029
2371
  let n;
2030
2372
  try {
2031
- this.qrLib ??= await import("./browser-DtVlHXIz.js").then((t) => /* @__PURE__ */ e(t.default, 1)), n = await this.qrLib.toDataURL(t, {
2373
+ this.qrLib ??= await import("./browser-Dq7GBPtw.js").then((t) => /* @__PURE__ */ e(t.default, 1)), n = await this.qrLib.toDataURL(t, {
2032
2374
  width: 256,
2033
2375
  margin: 4,
2034
2376
  errorCorrectionLevel: "M",
@@ -2043,12 +2385,12 @@ var vn = I.fontFamily.sans.join(", "), yn = class {
2043
2385
  return this.qrSlot !== null && (this.qrSlot.classList.remove("ui-qr-slot--loading"), this.qrSlot.replaceChildren(this.createQrImage(n)), !0);
2044
2386
  }
2045
2387
  showLink(e) {
2046
- this.qrSlot !== null && (this.qrSlot.classList.remove("ui-qr-slot--loading"), this.qrSlot.replaceChildren(this.createText(Vt(), {
2047
- fontSize: I.fontSize.sm,
2048
- color: P.neutral[600]
2388
+ this.qrSlot !== null && (this.qrSlot.classList.remove("ui-qr-slot--loading"), this.qrSlot.replaceChildren(this.createText(qt(), {
2389
+ fontSize: J.fontSize.sm,
2390
+ color: K.neutral[600]
2049
2391
  }), this.createText(e, {
2050
- fontSize: I.fontSize.xs,
2051
- color: P.neutral[900],
2392
+ fontSize: J.fontSize.xs,
2393
+ color: K.neutral[900],
2052
2394
  overflowWrap: "anywhere",
2053
2395
  userSelect: "all"
2054
2396
  })));
@@ -2070,223 +2412,9 @@ var vn = I.fontFamily.sans.join(", "), yn = class {
2070
2412
  }
2071
2413
  createQrImage(e) {
2072
2414
  let t = document.createElement("img");
2073
- return t.src = e, t.alt = Lt(), t;
2074
- }
2075
- };
2076
- // ../client-core/src/ui/wireframe-cube.ts
2077
- function bn(e) {
2078
- let t = Math.max(0, Math.min(1, e));
2079
- return t * t * (3 - 2 * t);
2080
- }
2081
- function xn(e, t, n, r, i, a) {
2082
- let [o, s, c] = e, l = Math.cos(t), u = Math.sin(t), ee = l * o + u * c, d = -u * o + l * c, f = Math.cos(n), p = Math.sin(n), te = f * s - p * d, ne = p * s + f * d, m = .55;
2083
- return [
2084
- r + ee * a * m,
2085
- i - te * a * m,
2086
- ne
2087
- ];
2088
- }
2089
- function Sn(e, t, n) {
2090
- e.beginPath(), e.moveTo(t[0], t[1]), e.lineTo(n[0], n[1]), e.lineWidth = 2, e.stroke();
2091
- }
2092
- function Cn(e, t, n, r, i) {
2093
- let a = t(n), o = t(r);
2094
- Sn(e, a, [
2095
- a[0] + (o[0] - a[0]) * i,
2096
- a[1] + (o[1] - a[1]) * i,
2097
- a[2]
2098
- ]);
2099
- }
2100
- var R = [
2101
- -1,
2102
- -1,
2103
- 1
2104
- ], z = [
2105
- 1,
2106
- -1,
2107
- 1
2108
- ], B = [
2109
- 1,
2110
- -1,
2111
- -1
2112
- ], V = [
2113
- -1,
2114
- -1,
2115
- -1
2116
- ], H = [
2117
- -1,
2118
- 1,
2119
- 1
2120
- ], U = [
2121
- 1,
2122
- 1,
2123
- 1
2124
- ], W = [
2125
- 1,
2126
- 1,
2127
- -1
2128
- ], G = [
2129
- -1,
2130
- 1,
2131
- -1
2132
- ], K = [
2133
- [R, z],
2134
- [z, B],
2135
- [B, V],
2136
- [V, R],
2137
- [R, H],
2138
- [z, U],
2139
- [B, W],
2140
- [V, G],
2141
- [H, U],
2142
- [U, W],
2143
- [W, G],
2144
- [G, H]
2145
- ];
2146
- function wn(e) {
2147
- let t = e % 6 / 6, n = K.length;
2148
- return t < .35 ? bn(t / .35) * n : t < .55 ? n : t < .9 ? (1 - bn((t - .55) / .35)) * n : 0;
2149
- }
2150
- function Tn(e, { width: t, height: n }, r, i) {
2151
- let a = t / 2, o = n * .44, s = Math.min(t, n) * .08, c = (e) => xn(e, .785, .615, a, o, s), l = wn(r);
2152
- e.shadowBlur = 5, e.shadowColor = "rgba(30,30,30,0.08)", e.strokeStyle = i;
2153
- for (let t = 0; t < K.length && !(t >= l); t++) {
2154
- let n = K[t];
2155
- if (n === void 0) continue;
2156
- let r = Math.min(1, l - t);
2157
- Cn(e, c, n[0], n[1], r);
2415
+ return t.src = e, t.alt = Ut(), t;
2158
2416
  }
2159
- e.shadowBlur = 0;
2160
- }
2161
- // ../client-core/src/ui/loading.ts
2162
- var En = 400, Dn = 3e4, On = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif";
2163
- function kn(e) {
2164
- let t = document.createElement("div");
2165
- Object.assign(t.style, {
2166
- position: "absolute",
2167
- inset: "0",
2168
- display: "flex",
2169
- flexDirection: "column",
2170
- alignItems: "center",
2171
- justifyContent: "center",
2172
- background: "transparent",
2173
- color: e,
2174
- zIndex: "20",
2175
- opacity: "0",
2176
- transition: "opacity 0.3s ease-in-out"
2177
- });
2178
- let n = document.createElement("canvas");
2179
- Object.assign(n.style, {
2180
- width: "100%",
2181
- height: "100%",
2182
- position: "absolute",
2183
- inset: "0"
2184
- });
2185
- let r = document.createElement("div");
2186
- Object.assign(r.style, {
2187
- position: "absolute",
2188
- top: "56%",
2189
- left: "0",
2190
- right: "0",
2191
- textAlign: "center",
2192
- pointerEvents: "none"
2193
- });
2194
- let i = document.createElement("span");
2195
- Object.assign(i.style, {
2196
- fontSize: "13px",
2197
- fontWeight: "400",
2198
- fontVariantNumeric: "tabular-nums",
2199
- fontFamily: On
2200
- });
2201
- let a = document.createElement("span");
2202
- return Object.assign(a.style, {
2203
- fontSize: "13px",
2204
- fontFamily: On
2205
- }), a.textContent = Ut(), r.appendChild(i), r.appendChild(a), t.appendChild(n), t.appendChild(r), {
2206
- overlay: t,
2207
- canvas: n,
2208
- pctEl: i,
2209
- phaseEl: a
2210
- };
2211
- }
2212
- var An = class {
2213
- overlay;
2214
- canvas;
2215
- ctx;
2216
- pctEl;
2217
- phaseEl;
2218
- animationId = null;
2219
- showTimerId = null;
2220
- noSignalTimerId = null;
2221
- startTime;
2222
- textColor;
2223
- hidden = !1;
2224
- visible = !1;
2225
- errored = !1;
2226
- noSignalErrored = !1;
2227
- constructor(e) {
2228
- this.startTime = performance.now();
2229
- let t = getComputedStyle(e).color;
2230
- this.textColor = t === "" ? "#000" : t;
2231
- let n = kn(this.textColor);
2232
- this.overlay = n.overlay, this.canvas = n.canvas, this.pctEl = n.pctEl, this.phaseEl = n.phaseEl, e.appendChild(this.overlay), this.ctx = this.canvas.getContext("2d"), this.ctx !== null && (this.sizeCanvas(), this.tick()), this.showTimerId = setTimeout(() => {
2233
- this.reveal();
2234
- }, En), this.noSignalTimerId = setTimeout(() => {
2235
- this.hidden || (this.noSignalErrored = !0, this.showError(Wt()));
2236
- }, Dn);
2237
- }
2238
- viewerAlive() {
2239
- this.cancelNoSignalTimer(), this.noSignalErrored && this.recoverFromNoSignal();
2240
- }
2241
- recoverFromNoSignal() {
2242
- this.noSignalErrored = !1, this.errored = !1, this.pctEl.textContent = "", this.phaseEl.textContent = Ut(), this.ctx !== null && this.animationId === null && !this.hidden && this.tick();
2243
- }
2244
- updateProgress(e, t) {
2245
- this.cancelNoSignalTimer(), !(this.hidden || this.errored) && (this.pctEl.textContent = `${Math.round(e)}%`, this.phaseEl.textContent = t === "" ? "" : ` \u00B7 ${t}`);
2246
- }
2247
- showError(e) {
2248
- if (this.cancelNoSignalTimer(), this.hidden = !1, this.errored = !0, this.animationId !== null && (cancelAnimationFrame(this.animationId), this.animationId = null), this.ctx !== null) {
2249
- let e = Math.min(devicePixelRatio, 2), t = this.canvas.width / e, n = this.canvas.height / e;
2250
- this.ctx.clearRect(0, 0, t, n);
2251
- }
2252
- this.pctEl.textContent = "", this.phaseEl.textContent = e, this.reveal();
2253
- }
2254
- hide() {
2255
- this.hidden || (this.hidden = !0, this.cancelShowTimer(), this.visible ? (this.overlay.style.opacity = "0", this.overlay.addEventListener("transitionend", () => {
2256
- this.destroy();
2257
- }, { once: !0 }), setTimeout(() => {
2258
- this.destroy();
2259
- }, 500)) : this.destroy());
2260
- }
2261
- destroy() {
2262
- this.cancelShowTimer(), this.cancelNoSignalTimer(), this.animationId !== null && (cancelAnimationFrame(this.animationId), this.animationId = null), this.overlay.remove();
2263
- }
2264
- reveal() {
2265
- this.hidden || this.visible || (this.visible = !0, this.overlay.style.opacity = "1");
2266
- }
2267
- cancelShowTimer() {
2268
- this.showTimerId !== null && (clearTimeout(this.showTimerId), this.showTimerId = null);
2269
- }
2270
- cancelNoSignalTimer() {
2271
- this.noSignalTimerId !== null && (clearTimeout(this.noSignalTimerId), this.noSignalTimerId = null);
2272
- }
2273
- sizeCanvas() {
2274
- if (this.ctx === null) return;
2275
- let e = Math.min(devicePixelRatio, 2), t = this.overlay.clientWidth || 440, n = this.overlay.clientHeight || 360;
2276
- this.canvas.width = t * e, this.canvas.height = n * e, this.ctx.scale(e, e), this.ctx.lineCap = "round", this.ctx.lineJoin = "round";
2277
- }
2278
- tick = () => {
2279
- this.hidden || (this.drawFrame(), this.animationId = requestAnimationFrame(this.tick));
2280
- };
2281
- drawFrame() {
2282
- if (this.ctx === null) return;
2283
- let e = this.canvas.width / Math.min(devicePixelRatio, 2), t = this.canvas.height / Math.min(devicePixelRatio, 2), n = (performance.now() - this.startTime) / 1e3;
2284
- this.ctx.clearRect(0, 0, e, t), Tn(this.ctx, {
2285
- width: e,
2286
- height: t
2287
- }, n, this.textColor);
2288
- }
2289
- }, jn = class {
2417
+ }, Ln = class {
2290
2418
  options;
2291
2419
  element;
2292
2420
  arBtn = null;
@@ -2303,7 +2431,7 @@ var An = class {
2303
2431
  }, document.addEventListener("fullscreenchange", this.onFullscreenChange);
2304
2432
  }
2305
2433
  setFullscreenIcon(e) {
2306
- this.fullscreenBtn !== null && this.fullscreenBtn.setIcon(e ? M.exitFullscreen() : M.fullscreen());
2434
+ this.fullscreenBtn !== null && this.fullscreenBtn.setIcon(e ? F.exitFullscreen() : F.fullscreen());
2307
2435
  }
2308
2436
  syncButton(e, t, n) {
2309
2437
  if (t && e === null) {
@@ -2313,19 +2441,19 @@ var An = class {
2313
2441
  return !t && e !== null ? (e.element.remove(), null) : e;
2314
2442
  }
2315
2443
  applySettings(e) {
2316
- this.arBtn = this.syncButton(this.arBtn, e.ar !== !1 && this.options.onAr !== void 0, () => new N({
2444
+ this.arBtn = this.syncButton(this.arBtn, e.ar !== !1 && this.options.onAr !== void 0, () => new I({
2317
2445
  variant: "outline",
2318
2446
  size: "icon",
2319
- label: Tt(),
2320
- icon: M.ar(),
2447
+ label: jt(),
2448
+ icon: F.ar(),
2321
2449
  onClick: () => {
2322
2450
  this.options.onAr?.();
2323
2451
  }
2324
- })), this.fullscreenBtn = this.syncButton(this.fullscreenBtn, e.fullscreen !== !1 && this.options.onFullscreen !== void 0, () => new N({
2452
+ })), this.fullscreenBtn = this.syncButton(this.fullscreenBtn, e.fullscreen !== !1 && this.options.onFullscreen !== void 0, () => new I({
2325
2453
  variant: "outline",
2326
2454
  size: "icon",
2327
- label: Ft(),
2328
- icon: M.fullscreen(),
2455
+ label: Vt(),
2456
+ icon: F.fullscreen(),
2329
2457
  onClick: () => {
2330
2458
  this.options.onFullscreen?.();
2331
2459
  }
@@ -2333,11 +2461,11 @@ var An = class {
2333
2461
  let t = e.annotations === "toggle-shown" || e.annotations === "toggle-hidden";
2334
2462
  this.annotationsBtn = this.syncButton(this.annotationsBtn, t && this.options.onAnnotationsToggle !== void 0, () => {
2335
2463
  this.annotationsShown = e.annotations === "toggle-shown";
2336
- let t = new N({
2464
+ let t = new I({
2337
2465
  variant: "outline",
2338
2466
  size: "icon",
2339
- label: wt(),
2340
- icon: this.annotationsShown ? M.annotations() : M.annotationsOff(),
2467
+ label: At(),
2468
+ icon: this.annotationsShown ? F.annotations() : F.annotationsOff(),
2341
2469
  onClick: () => {
2342
2470
  this.flipAnnotations();
2343
2471
  }
@@ -2346,12 +2474,12 @@ var An = class {
2346
2474
  });
2347
2475
  }
2348
2476
  flipAnnotations() {
2349
- this.annotationsShown = !this.annotationsShown, this.annotationsBtn?.element.setAttribute("aria-pressed", String(this.annotationsShown)), this.annotationsBtn?.setIcon(this.annotationsShown ? M.annotations() : M.annotationsOff()), this.options.onAnnotationsToggle?.(this.annotationsShown);
2477
+ this.annotationsShown = !this.annotationsShown, this.annotationsBtn?.element.setAttribute("aria-pressed", String(this.annotationsShown)), this.annotationsBtn?.setIcon(this.annotationsShown ? F.annotations() : F.annotationsOff()), this.options.onAnnotationsToggle?.(this.annotationsShown);
2350
2478
  }
2351
2479
  destroy() {
2352
2480
  document.removeEventListener("fullscreenchange", this.onFullscreenChange);
2353
2481
  }
2354
- }, q = .5, Mn = class e {
2482
+ }, X = .5, Rn = class e {
2355
2483
  element;
2356
2484
  constructor(t, n) {
2357
2485
  this.element = Object.assign(document.createElement("div"), { className: "vd-camera-controls" });
@@ -2360,9 +2488,9 @@ var An = class {
2360
2488
  targetTilt: n.tilt,
2361
2489
  targetZoom: n.zoom,
2362
2490
  thetaOffset: 0
2363
- }, i = Ln(t, n, r);
2491
+ }, i = Wn(t, n, r);
2364
2492
  n.onChange((e) => {
2365
- r.targetRotation = e.rotation - r.thetaOffset, r.targetTilt = e.tilt, r.targetZoom = e.zoom, Rn(i, n, e);
2493
+ r.targetRotation = e.rotation - r.thetaOffset, r.targetTilt = e.tilt, r.targetZoom = e.zoom, Gn(i, n, e);
2366
2494
  }), this.element.appendChild(e.buildZoom(i.zoomOut, i.zoomIn)), this.element.appendChild(e.buildDpad(i.tiltUp, i.rotateLeft, i.reset, i.rotateRight, i.tiltDown));
2367
2495
  }
2368
2496
  static buildZoom(e, t) {
@@ -2382,18 +2510,18 @@ var An = class {
2382
2510
  return a;
2383
2511
  }
2384
2512
  };
2385
- function Nn(e, t) {
2513
+ function zn(e, t) {
2386
2514
  let n = e;
2387
2515
  for (; n < t;) n += 360;
2388
2516
  for (; n >= t + 360;) n -= 360;
2389
2517
  return n;
2390
2518
  }
2391
- function Pn(e, t, n) {
2392
- let r = Nn(e, t);
2519
+ function Bn(e, t, n) {
2520
+ let r = zn(e, t);
2393
2521
  return r <= n ? r : r - n <= t + 360 - r ? n : t;
2394
2522
  }
2395
- function J(e, t, n) {
2396
- return new N({
2523
+ function Z(e, t, n) {
2524
+ return new I({
2397
2525
  variant: "outline",
2398
2526
  size: "icon",
2399
2527
  label: e,
@@ -2401,14 +2529,14 @@ function J(e, t, n) {
2401
2529
  onClick: n
2402
2530
  });
2403
2531
  }
2404
- function Fn(e, t) {
2532
+ function Vn(e, t) {
2405
2533
  return Math.max(e.limits?.minZoom ?? 1, Math.min(e.limits?.maxZoom ?? Infinity, t));
2406
2534
  }
2407
- function In(e, t) {
2535
+ function Hn(e, t) {
2408
2536
  let n = e.limits?.minRotate, r = e.limits?.maxRotate;
2409
- return n === void 0 || r === void 0 || r - n >= 360 ? t : Pn(t, n, r);
2537
+ return n === void 0 || r === void 0 || r - n >= 360 ? t : Bn(t, n, r);
2410
2538
  }
2411
- function Y(e, t, n, r) {
2539
+ function Un(e, t, n, r) {
2412
2540
  let i = t.limits?.minTilt, a = t.limits?.maxTilt;
2413
2541
  if (i !== void 0 || a !== void 0) {
2414
2542
  n.targetTilt = Math.max(i ?? 0, Math.min(a ?? 180, n.targetTilt + r)), e.tilt(n.targetTilt).set();
@@ -2417,126 +2545,151 @@ function Y(e, t, n, r) {
2417
2545
  let o = n.targetTilt + r;
2418
2546
  o > 180 || o < 0 ? (n.targetTilt = o > 180 ? 360 - o : -o, n.thetaOffset = (n.thetaOffset + 180) % 360, e.tilt(n.targetTilt).rotate(n.targetRotation + n.thetaOffset).set()) : (n.targetTilt = o, e.tilt(n.targetTilt).set());
2419
2547
  }
2420
- function Ln(e, t, n) {
2548
+ function Wn(e, t, n) {
2421
2549
  let r = (r) => {
2422
- n.targetZoom = Fn(t, n.targetZoom + r), e.zoom(n.targetZoom).set();
2550
+ n.targetZoom = Vn(t, n.targetZoom + r), e.zoom(n.targetZoom).set();
2423
2551
  }, i = (r) => {
2424
- n.targetRotation = In(t, n.targetRotation + r), e.rotate(n.targetRotation + n.thetaOffset).set();
2552
+ n.targetRotation = Hn(t, n.targetRotation + r), e.rotate(n.targetRotation + n.thetaOffset).set();
2425
2553
  };
2426
2554
  return {
2427
- zoomOut: J(Mt(), M.zoomOut(), () => {
2555
+ zoomOut: Z(Rt(), F.zoomOut(), () => {
2428
2556
  r(-10);
2429
2557
  }),
2430
- zoomIn: J(jt(), M.zoomIn(), () => {
2558
+ zoomIn: Z(Lt(), F.zoomIn(), () => {
2431
2559
  r(10);
2432
2560
  }),
2433
- tiltUp: J(At(), M.tiltUp(), () => {
2434
- Y(e, t, n, -15);
2561
+ tiltUp: Z(It(), F.tiltUp(), () => {
2562
+ Un(e, t, n, -15);
2435
2563
  }),
2436
- rotateLeft: J(Dt(), M.rotateLeft(), () => {
2564
+ rotateLeft: Z(Nt(), F.rotateLeft(), () => {
2437
2565
  i(-15);
2438
2566
  }),
2439
- reset: J(Et(), M.reset(), () => {
2567
+ reset: Z(Mt(), F.reset(), () => {
2440
2568
  n.thetaOffset = 0, e.reset();
2441
2569
  }),
2442
- rotateRight: J(Ot(), M.rotateRight(), () => {
2570
+ rotateRight: Z(Pt(), F.rotateRight(), () => {
2443
2571
  i(15);
2444
2572
  }),
2445
- tiltDown: J(kt(), M.tiltDown(), () => {
2446
- Y(e, t, n, 15);
2573
+ tiltDown: Z(Ft(), F.tiltDown(), () => {
2574
+ Un(e, t, n, 15);
2447
2575
  })
2448
2576
  };
2449
2577
  }
2450
- function Rn(e, t, n) {
2578
+ function Gn(e, t, n) {
2451
2579
  let r = t.limits;
2452
2580
  if (r === void 0) return;
2453
- e.zoomOut.element.disabled = r.minZoom !== void 0 && n.zoom <= r.minZoom + q, e.zoomIn.element.disabled = r.maxZoom !== void 0 && n.zoom >= r.maxZoom - q, e.tiltUp.element.disabled = r.minTilt !== void 0 && n.tilt <= r.minTilt + q, e.tiltDown.element.disabled = r.maxTilt !== void 0 && n.tilt >= r.maxTilt - q;
2581
+ e.zoomOut.element.disabled = r.minZoom !== void 0 && n.zoom <= r.minZoom + X, e.zoomIn.element.disabled = r.maxZoom !== void 0 && n.zoom >= r.maxZoom - X, e.tiltUp.element.disabled = r.minTilt !== void 0 && n.tilt <= r.minTilt + X, e.tiltDown.element.disabled = r.maxTilt !== void 0 && n.tilt >= r.maxTilt - X;
2454
2582
  let { minRotate: i, maxRotate: a } = r;
2455
2583
  if (i === void 0 || a === void 0 || a - i >= 360) {
2456
2584
  e.rotateLeft.element.disabled = !1, e.rotateRight.element.disabled = !1;
2457
2585
  return;
2458
2586
  }
2459
- let o = Nn(n.rotation, i);
2460
- e.rotateLeft.element.disabled = o <= i + q, e.rotateRight.element.disabled = o >= a - q;
2587
+ let o = zn(n.rotation, i);
2588
+ e.rotateLeft.element.disabled = o <= i + X, e.rotateRight.element.disabled = o >= a - X;
2461
2589
  }
2462
2590
  // ../client-core/src/client/events.ts
2463
- var X = {
2591
+ var Q = {
2464
2592
  SELECT: "vd:select",
2465
2593
  SELECTED: "vd:selected",
2466
2594
  FOCUS_CHANGE: "vd:focus-change",
2467
2595
  CONFIGURATION_CHANGE: "vd:configuration-change",
2468
2596
  CONFIGURATION_SUBMIT: "vd:configuration-submit"
2469
- }, zn = {
2470
- mm: 1,
2471
- cm: 10,
2472
- m: 1e3,
2473
- in: 25.4
2474
- }, Bn = 3;
2475
- function Vn(e) {
2476
- let t = e.stepMm / zn[e.displayUnit];
2477
- for (let e = 0; e <= Bn; e++) {
2478
- let n = t * 10 ** e;
2479
- if (Math.abs(n - Math.round(n)) < 1e-9) return e;
2480
- }
2481
- return Bn;
2482
- }
2483
- function Hn(e, t, n) {
2484
- let r = Vn(t), i = e / zn[t.displayUnit];
2485
- return new Intl.NumberFormat(n, {
2486
- minimumFractionDigits: r,
2487
- maximumFractionDigits: r
2488
- }).format(i);
2489
- }
2597
+ };
2490
2598
  // ../client-core/src/ui/controls/measurement-group.ts
2491
- function Un(e, t, n, r, i, a, o) {
2492
- let s = v(), c = e.values.map((e) => Hn(Number(e), t, s)), l = e.values.find((t) => n.getValue(e.name, t)?.isSelected === !0) ?? e.defaultValue, u = new fn(e.values, {
2599
+ function Kn(e, t, n, r, i, a, o) {
2600
+ let s = e.values.find((t) => n.getValue(e.name, t)?.isSelected === !0) ?? e.defaultValue, c = new kn(e.values, {
2493
2601
  label: e.name,
2494
- labels: c,
2495
- unit: t.displayUnit,
2496
- ...l !== void 0 && { initialSelected: l }
2602
+ labels: t.labels,
2603
+ unit: t.unit,
2604
+ ...s !== void 0 && { initialSelected: s }
2497
2605
  });
2498
- return u.onSelect((t) => {
2606
+ return c.onSelect((t) => {
2499
2607
  i(e.name, t);
2500
- }), u.onSettle((t) => {
2501
- r.dispatch(X.SELECT, {
2608
+ }), c.onSettle((t) => {
2609
+ r.dispatch(Q.SELECT, {
2502
2610
  attribute: e.name,
2503
2611
  value: t
2504
2612
  }, !0).defaultPrevented || a(e.name, t);
2505
2613
  }), o(e.name, (t) => {
2506
- u.setSelected(t.value), r.dispatch(X.SELECTED, {
2614
+ c.setSelected(t.value), r.dispatch(Q.SELECTED, {
2507
2615
  attribute: e.name,
2508
2616
  value: t.value
2509
2617
  });
2510
2618
  }), {
2511
- element: u.element,
2619
+ element: c.element,
2512
2620
  setSelectable: () => {}
2513
2621
  };
2514
2622
  }
2623
+ // ../measurements/src/units.ts
2624
+ var qn = {
2625
+ mm: 1,
2626
+ cm: 10,
2627
+ m: 1e3,
2628
+ in: 25.4
2629
+ };
2630
+ function Jn(e, t) {
2631
+ return e / qn[t];
2632
+ }
2633
+ // ../client-core/src/ui/controls/measurement-format.ts
2634
+ var Yn = 3;
2635
+ function Xn(e) {
2636
+ let t = Jn(e.stepMm, e.displayUnit);
2637
+ for (let e = 0; e <= Yn; e++) {
2638
+ let n = t * 10 ** e;
2639
+ if (Math.abs(n - Math.round(n)) < 1e-9) return e;
2640
+ }
2641
+ return Yn;
2642
+ }
2643
+ function Zn(e, t, n) {
2644
+ let r = Xn(t), i = Jn(e, t.displayUnit);
2645
+ return new Intl.NumberFormat(n, {
2646
+ minimumFractionDigits: r,
2647
+ maximumFractionDigits: r
2648
+ }).format(i);
2649
+ }
2650
+ function Qn(e, t, n) {
2651
+ return {
2652
+ labels: e.values.map((e) => Zn(Number(e), t, n)),
2653
+ unit: t.displayUnit
2654
+ };
2655
+ }
2656
+ var $n = 20;
2657
+ function er(e, t) {
2658
+ let n = new Intl.NumberFormat(t, { maximumFractionDigits: $n });
2659
+ return {
2660
+ labels: e.numbers.map((e) => n.format(e)),
2661
+ unit: e.unit
2662
+ };
2663
+ }
2515
2664
  // ../client-core/src/ui/controls/attribute-group.ts
2516
- var Wn = 5, Gn = 0;
2517
- function Kn(e, t, n, r, i, a) {
2665
+ var tr = 5, nr = 0;
2666
+ function rr(e, t, n, r, i, a) {
2518
2667
  let o = document.createElement("div");
2519
2668
  o.className = "vd-attribute", o.dataset.name = e.name;
2520
2669
  let s = document.createElement("span");
2521
- s.className = "vd-attribute-label", s.textContent = S(e.name), s.id = `vd-attribute-label-${Gn++}`, o.appendChild(s), o.setAttribute("role", "group"), o.setAttribute("aria-labelledby", s.id);
2670
+ s.className = "vd-attribute-label", s.textContent = C(e.name), s.id = `vd-attribute-label-${nr++}`, o.appendChild(s), o.setAttribute("role", "group"), o.setAttribute("aria-labelledby", s.id);
2522
2671
  let c = (e) => {
2523
2672
  o.style.display = e ? "none" : "";
2524
- }, l = e.dimension === void 0 ? qn(e, t, n, r, a) : Un(e, e.dimension, t, n, i, r, a);
2525
- return o.appendChild(l.element), {
2673
+ }, l = ir(e), u = l === void 0 ? ar(e, t, n, r, a) : Kn(e, l, t, n, i, r, a);
2674
+ return o.appendChild(u.element), {
2526
2675
  element: o,
2527
- setSelectable: l.setSelectable,
2676
+ setSelectable: u.setSelectable,
2528
2677
  setHidden: c
2529
2678
  };
2530
2679
  }
2531
- function qn(e, t, n, r, i) {
2532
- let a = e.values.find((n) => t.getValue(e.name, n)?.isSelected === !0), o = e.values.map((t) => Fe(t, e.labels)), s = e.values.length <= Wn ? new un(e.values, a, o) : new dn(e.name, e.values, S(e.name), a, o);
2680
+ function ir(e) {
2681
+ if (e.dimension !== void 0) return Qn(e, e.dimension, y());
2682
+ if (e.size !== void 0) return er(e.size, y());
2683
+ }
2684
+ function ar(e, t, n, r, i) {
2685
+ let a = e.values.find((n) => t.getValue(e.name, n)?.isSelected === !0), o = e.values.map((t) => Re(t, e.labels)), s = e.values.length <= tr ? new Dn(e.values, a, o) : new On(e.name, e.values, C(e.name), a, o);
2533
2686
  return s.onSelect((t) => {
2534
- n.dispatch(X.SELECT, {
2687
+ n.dispatch(Q.SELECT, {
2535
2688
  attribute: e.name,
2536
2689
  value: t
2537
2690
  }, !0).defaultPrevented || r(e.name, t);
2538
2691
  }), i(e.name, (t) => {
2539
- s.setSelected(t.value), n.dispatch(X.SELECTED, {
2692
+ s.setSelected(t.value), n.dispatch(Q.SELECTED, {
2540
2693
  attribute: e.name,
2541
2694
  value: t.value
2542
2695
  });
@@ -2548,7 +2701,7 @@ function qn(e, t, n, r, i) {
2548
2701
  };
2549
2702
  }
2550
2703
  // ../client-core/src/ui/commerce-panel.ts
2551
- var Jn = 80, Yn = 2500, Xn = class {
2704
+ var or = 80, sr = 2500, cr = class {
2552
2705
  configuration;
2553
2706
  element;
2554
2707
  priceEl;
@@ -2560,7 +2713,7 @@ var Jn = 80, Yn = 2500, Xn = class {
2560
2713
  constructor(e) {
2561
2714
  this.configuration = e, this.element = document.createElement("div"), this.element.className = "vd-commerce vd-hidden";
2562
2715
  let t = document.createElement("div");
2563
- t.className = "vd-commerce-price", this.priceEl = document.createElement("span"), this.priceEl.className = "vd-price", this.vatEl = document.createElement("span"), this.vatEl.className = "vd-vat", t.append(this.priceEl, this.vatEl), this.button = new N({
2716
+ t.className = "vd-commerce-price", this.priceEl = document.createElement("span"), this.priceEl.className = "vd-price", this.vatEl = document.createElement("span"), this.vatEl.className = "vd-vat", t.append(this.priceEl, this.vatEl), this.button = new I({
2564
2717
  variant: "default",
2565
2718
  onClick: () => {
2566
2719
  this.handleSubmit();
@@ -2578,23 +2731,23 @@ var Jn = 80, Yn = 2500, Xn = class {
2578
2731
  this.unsubscribe(), this.resetTimer !== void 0 && clearTimeout(this.resetTimer), this.element.remove();
2579
2732
  }
2580
2733
  renderPrice(e) {
2581
- e === void 0 ? (this.priceEl.textContent = "", this.vatEl.textContent = "") : (this.priceEl.textContent = Zn(e.price, e.currency), this.vatEl.textContent = Z(this.configuration.vatDisplay));
2734
+ e === void 0 ? (this.priceEl.textContent = "", this.vatEl.textContent = "") : (this.priceEl.textContent = lr(e.price, e.currency), this.vatEl.textContent = $(this.configuration.vatDisplay));
2582
2735
  }
2583
2736
  renderButton() {
2584
2737
  let e = this.configuration.submitEnabled;
2585
- this.button.element.classList.toggle("vd-hidden", !e), e && this.state === "idle" && this.setButtonText(Z(this.configuration.buttonLabel));
2738
+ this.button.element.classList.toggle("vd-hidden", !e), e && this.state === "idle" && this.setButtonText($(this.configuration.buttonLabel));
2586
2739
  }
2587
2740
  async handleSubmit() {
2588
2741
  if (this.state !== "busy") {
2589
- this.setState("busy", xt());
2742
+ this.setState("busy", Dt());
2590
2743
  try {
2591
- await this.configuration.submit(), this.setState("success", Ct());
2744
+ await this.configuration.submit(), this.setState("success", kt());
2592
2745
  } catch (e) {
2593
2746
  if (e instanceof DOMException && e.name === "AbortError") {
2594
- this.setState("idle", Z(this.configuration.buttonLabel));
2747
+ this.setState("idle", $(this.configuration.buttonLabel));
2595
2748
  return;
2596
2749
  }
2597
- A.warn("Commerce submit failed", { error: e }), this.setState("failed", St());
2750
+ j.warn("Commerce submit failed", { error: e }), this.setState("failed", Ot());
2598
2751
  }
2599
2752
  this.scheduleReset();
2600
2753
  }
@@ -2602,7 +2755,7 @@ var Jn = 80, Yn = 2500, Xn = class {
2602
2755
  scheduleReset() {
2603
2756
  this.resetTimer !== void 0 && clearTimeout(this.resetTimer), this.resetTimer = setTimeout(() => {
2604
2757
  this.state = "idle", this.update();
2605
- }, Yn);
2758
+ }, sr);
2606
2759
  }
2607
2760
  setState(e, t) {
2608
2761
  this.state = e, this.element.dataset.submit = e, this.button.element.disabled = e === "busy", this.setButtonText(t);
@@ -2611,12 +2764,12 @@ var Jn = 80, Yn = 2500, Xn = class {
2611
2764
  this.button.element.textContent = e, this.button.element.setAttribute("aria-label", e);
2612
2765
  }
2613
2766
  };
2614
- function Z(e) {
2615
- return (e ?? "").slice(0, Jn);
2767
+ function $(e) {
2768
+ return (e ?? "").slice(0, or);
2616
2769
  }
2617
- function Zn(e, t) {
2770
+ function lr(e, t) {
2618
2771
  try {
2619
- let n = new Intl.NumberFormat(v(), {
2772
+ let n = new Intl.NumberFormat(y(), {
2620
2773
  style: "currency",
2621
2774
  currency: t
2622
2775
  }), r = n.resolvedOptions().maximumFractionDigits ?? 2;
@@ -2626,7 +2779,7 @@ function Zn(e, t) {
2626
2779
  }
2627
2780
  }
2628
2781
  // ../client-core/src/ui/layouts/inframe-layout.ts
2629
- var Qn = class {
2782
+ var ur = class {
2630
2783
  slot = null;
2631
2784
  panel = null;
2632
2785
  attach(e, t) {
@@ -2638,7 +2791,7 @@ var Qn = class {
2638
2791
  destroy() {
2639
2792
  this.slot?.remove(), this.slot = null, this.panel = null;
2640
2793
  }
2641
- }, $n = 572, er = class {
2794
+ }, dr = 572, fr = class {
2642
2795
  actionBarSlot;
2643
2796
  element = null;
2644
2797
  body = null;
@@ -2653,21 +2806,21 @@ var Qn = class {
2653
2806
  this.actionBarSlot = e;
2654
2807
  }
2655
2808
  attach(e, t) {
2656
- this.container = e, t.classList.add("vd-attributes-sidebar"), this.closeButton = new N({
2809
+ this.container = e, t.classList.add("vd-attributes-sidebar"), this.closeButton = new I({
2657
2810
  variant: "ghost",
2658
2811
  size: "icon-sm",
2659
- label: Nt(),
2660
- icon: M.close({ size: 18 }),
2812
+ label: zt(),
2813
+ icon: F.close({ size: 18 }),
2661
2814
  onClick: () => {
2662
2815
  this.expanded = !1, this.render();
2663
2816
  }
2664
2817
  });
2665
2818
  let n = document.createElement("div");
2666
- n.className = "vd-sidebar-header", n.appendChild(this.closeButton.element), this.body = document.createElement("div"), this.body.className = "vd-sidebar-body", this.body.appendChild(t), this.element = document.createElement("div"), this.element.className = "vd-sidebar vd-hidden", this.element.append(n, this.body), e.appendChild(this.element), this.openButton = new N({
2819
+ n.className = "vd-sidebar-header", n.appendChild(this.closeButton.element), this.body = document.createElement("div"), this.body.className = "vd-sidebar-body", this.body.appendChild(t), this.element = document.createElement("div"), this.element.className = "vd-sidebar vd-hidden", this.element.append(n, this.body), e.appendChild(this.element), this.openButton = new I({
2667
2820
  variant: "outline",
2668
2821
  size: "icon",
2669
- label: Pt(),
2670
- icon: M.configurator({ size: 18 }),
2822
+ label: Bt(),
2823
+ icon: F.configurator({ size: 18 }),
2671
2824
  onClick: () => {
2672
2825
  this.expanded = !0, this.render();
2673
2826
  }
@@ -2682,7 +2835,7 @@ var Qn = class {
2682
2835
  observe() {
2683
2836
  typeof ResizeObserver < "u" && this.container !== null && (this.observer = new ResizeObserver((e) => {
2684
2837
  let t = e[0]?.contentRect.width ?? 0;
2685
- this.setCollapsible(t > 0 && t < $n);
2838
+ this.setCollapsible(t > 0 && t < dr);
2686
2839
  }), this.observer.observe(this.container));
2687
2840
  }
2688
2841
  setCollapsible(e) {
@@ -2693,20 +2846,20 @@ var Qn = class {
2693
2846
  let e = this.visible && this.expanded, t = this.visible && !this.expanded;
2694
2847
  this.element.classList.toggle("vd-hidden", !this.visible), this.element.classList.toggle("vd-sidebar-collapsed", t), this.openButton.element.classList.toggle("vd-hidden", !t), this.closeButton.element.style.display = this.collapsible ? "" : "none", this.container.classList.toggle("vd-layout-sidebar-right", e), this.container.classList.toggle("vd-layout-sidebar-permanent", e && !this.collapsible);
2695
2848
  }
2696
- }, tr = class {
2849
+ }, pr = class {
2697
2850
  attach(e, t) {}
2698
2851
  setVisible(e) {}
2699
2852
  destroy() {}
2700
- }, nr = {
2701
- "inframe-bottom-left": () => new Qn(),
2702
- "sidebar-right": (e) => new er(e),
2703
- hidden: () => new tr()
2853
+ }, mr = {
2854
+ "inframe-bottom-left": () => new ur(),
2855
+ "sidebar-right": (e) => new fr(e),
2856
+ hidden: () => new pr()
2704
2857
  };
2705
- function rr(e, t) {
2706
- return (nr[e ?? ""] ?? (() => new Qn()))(t);
2858
+ function hr(e, t) {
2859
+ return (mr[e ?? ""] ?? (() => new ur()))(t);
2707
2860
  }
2708
2861
  // ../client-core/src/ui/styles.ts
2709
- var Q = I.fontFamily.sans.join(", "), $ = "\n position: absolute;\n display: flex;\n z-index: 10;\n transition: inset-inline-end 0.18s ease;\n", ir = `
2862
+ var gr = J.fontFamily.sans.join(", "), _r = "\n position: absolute;\n display: flex;\n z-index: 10;\n transition: inset-inline-end 0.18s ease;\n", vr = `
2710
2863
  /* Override browser's default black fullscreen backdrop */
2711
2864
  .vd-container:fullscreen {
2712
2865
  background: oklch(100% 0 0);
@@ -2714,52 +2867,52 @@ var Q = I.fontFamily.sans.join(", "), $ = "\n position: absolute;\n display: f
2714
2867
 
2715
2868
  /* Layout slots — four corners */
2716
2869
  .vd-slot-top-right {
2717
- ${$}
2718
- inset-block-start: ${F[3]};
2719
- inset-inline-end: ${F[3]};
2870
+ ${_r}
2871
+ inset-block-start: ${q[3]};
2872
+ inset-inline-end: ${q[3]};
2720
2873
  flex-direction: column;
2721
2874
  align-items: flex-end;
2722
- gap: ${F[1.5]};
2875
+ gap: ${q[1.5]};
2723
2876
  }
2724
2877
 
2725
2878
  .vd-slot-bottom-left {
2726
- ${$}
2727
- inset-block-end: ${F[3]};
2728
- inset-inline-start: ${F[3]};
2879
+ ${_r}
2880
+ inset-block-end: ${q[3]};
2881
+ inset-inline-start: ${q[3]};
2729
2882
  flex-direction: column;
2730
2883
  align-items: flex-start;
2731
- gap: ${F[1.5]};
2884
+ gap: ${q[1.5]};
2732
2885
  }
2733
2886
 
2734
2887
  .vd-slot-bottom-right {
2735
- ${$}
2736
- inset-block-end: ${F[3]};
2737
- inset-inline-end: ${F[3]};
2888
+ ${_r}
2889
+ inset-block-end: ${q[3]};
2890
+ inset-inline-end: ${q[3]};
2738
2891
  flex-direction: row;
2739
- gap: ${F[1.5]};
2892
+ gap: ${q[1.5]};
2740
2893
  }
2741
2894
 
2742
2895
  /* Component styles — no positioning */
2743
2896
  .vd-camera-controls {
2744
2897
  display: flex;
2745
2898
  flex-direction: column;
2746
- gap: ${F[1]};
2747
- background: color-mix(in oklch, ${P.white} 85%, transparent);
2899
+ gap: ${q[1]};
2900
+ background: color-mix(in oklch, ${K.white} 85%, transparent);
2748
2901
  backdrop-filter: blur(8px);
2749
- border-radius: ${F[2]};
2750
- padding: ${F[2]};
2902
+ border-radius: ${q[2]};
2903
+ padding: ${q[2]};
2751
2904
  }
2752
2905
 
2753
2906
  .vd-zoom {
2754
2907
  display: flex;
2755
- gap: ${F[.5]};
2908
+ gap: ${q[.5]};
2756
2909
  }
2757
2910
 
2758
2911
  .vd-dpad {
2759
2912
  display: grid;
2760
- grid-template-columns: repeat(3, ${F[9]});
2761
- grid-template-rows: repeat(3, ${F[9]});
2762
- gap: ${F[.5]};
2913
+ grid-template-columns: repeat(3, ${q[9]});
2914
+ grid-template-rows: repeat(3, ${q[9]});
2915
+ gap: ${q[.5]};
2763
2916
  }
2764
2917
 
2765
2918
  .vd-dpad-up { grid-column: 2; grid-row: 1; }
@@ -2771,30 +2924,30 @@ var Q = I.fontFamily.sans.join(", "), $ = "\n position: absolute;\n display: f
2771
2924
  .vd-attributes {
2772
2925
  display: flex;
2773
2926
  flex-direction: column;
2774
- gap: ${F[3]};
2775
- background: color-mix(in oklch, ${P.white} 85%, transparent);
2927
+ gap: ${q[3]};
2928
+ background: color-mix(in oklch, ${K.white} 85%, transparent);
2776
2929
  backdrop-filter: blur(8px);
2777
- border: 1px solid color-mix(in oklch, ${P.neutral[900]} 8%, transparent);
2778
- border-radius: ${F[3]};
2779
- padding: ${F[3]};
2780
- box-shadow: 0 ${F[1]} ${F[4]} color-mix(in oklch, ${P.neutral[900]} 6%, transparent);
2781
- font-family: ${Q};
2930
+ border: 1px solid color-mix(in oklch, ${K.neutral[900]} 8%, transparent);
2931
+ border-radius: ${q[3]};
2932
+ padding: ${q[3]};
2933
+ box-shadow: 0 ${q[1]} ${q[4]} color-mix(in oklch, ${K.neutral[900]} 6%, transparent);
2934
+ font-family: ${gr};
2782
2935
  }
2783
2936
 
2784
2937
  .vd-attribute {
2785
2938
  display: flex;
2786
2939
  flex-direction: column;
2787
- gap: ${F[1.5]};
2940
+ gap: ${q[1.5]};
2788
2941
  }
2789
2942
 
2790
2943
  /* Micro-label: recedes so the controls lead. */
2791
2944
  .vd-attribute-label {
2792
- font-size: ${I.fontSize.xs};
2793
- font-weight: ${I.fontWeight.medium};
2794
- color: ${P.neutral[500]};
2945
+ font-size: ${J.fontSize.xs};
2946
+ font-weight: ${J.fontWeight.medium};
2947
+ color: ${K.neutral[500]};
2795
2948
  text-transform: uppercase;
2796
2949
  letter-spacing: 0.05em;
2797
- font-family: ${Q};
2950
+ font-family: ${gr};
2798
2951
  }
2799
2952
 
2800
2953
  /* sidebar-right layout — a docked, full-height right panel */
@@ -2830,10 +2983,10 @@ var Q = I.fontFamily.sans.join(", "), $ = "\n position: absolute;\n display: f
2830
2983
  z-index: 11;
2831
2984
  display: flex;
2832
2985
  flex-direction: column;
2833
- background: color-mix(in oklch, ${P.white} 90%, transparent);
2986
+ background: color-mix(in oklch, ${K.white} 90%, transparent);
2834
2987
  backdrop-filter: blur(10px);
2835
- border-inline-start: 1px solid color-mix(in oklch, ${P.neutral[900]} 8%, transparent);
2836
- box-shadow: -${F[1]} 0 ${F[4]} color-mix(in oklch, ${P.neutral[900]} 5%, transparent);
2988
+ border-inline-start: 1px solid color-mix(in oklch, ${K.neutral[900]} 8%, transparent);
2989
+ box-shadow: -${q[1]} 0 ${q[4]} color-mix(in oklch, ${K.neutral[900]} 5%, transparent);
2837
2990
  }
2838
2991
 
2839
2992
  @media (prefers-reduced-motion: no-preference) {
@@ -2845,13 +2998,13 @@ var Q = I.fontFamily.sans.join(", "), $ = "\n position: absolute;\n display: f
2845
2998
  .vd-sidebar-header {
2846
2999
  display: flex;
2847
3000
  justify-content: flex-end;
2848
- padding: ${F[1.5]} ${F[1.5]} 0;
3001
+ padding: ${q[1.5]} ${q[1.5]} 0;
2849
3002
  }
2850
3003
 
2851
3004
  .vd-sidebar-body {
2852
3005
  flex: 1;
2853
3006
  overflow-y: auto;
2854
- padding: ${F[4]};
3007
+ padding: ${q[4]};
2855
3008
  }
2856
3009
 
2857
3010
  /* attributes inside the sidebar: flat and full-width — the panel provides the frosting */
@@ -2862,38 +3015,38 @@ var Q = I.fontFamily.sans.join(", "), $ = "\n position: absolute;\n display: f
2862
3015
  border-radius: 0;
2863
3016
  padding: 0;
2864
3017
  box-shadow: none;
2865
- gap: ${F[5]};
3018
+ gap: ${q[5]};
2866
3019
  }
2867
3020
 
2868
3021
  /* while the panel is open, keep the corner controls clear of it */
2869
- .vd-layout-sidebar-right .vd-slot-top-right { inset-inline-end: calc(var(--vd-sidebar-width) + ${F[3]}); }
2870
- .vd-layout-sidebar-right .vd-slot-bottom-right { inset-inline-end: calc(var(--vd-sidebar-width) + ${F[3]}); }
3022
+ .vd-layout-sidebar-right .vd-slot-top-right { inset-inline-end: calc(var(--vd-sidebar-width) + ${q[3]}); }
3023
+ .vd-layout-sidebar-right .vd-slot-bottom-right { inset-inline-end: calc(var(--vd-sidebar-width) + ${q[3]}); }
2871
3024
 
2872
3025
  /* Price + CTA — sit under the attribute controls, separated by a hairline */
2873
3026
  .vd-commerce {
2874
3027
  display: flex;
2875
3028
  flex-direction: column;
2876
- gap: ${F[2]};
2877
- padding-block-start: ${F[3]};
2878
- border-block-start: 1px solid color-mix(in oklch, ${P.neutral[900]} 8%, transparent);
2879
- font-family: ${Q};
3029
+ gap: ${q[2]};
3030
+ padding-block-start: ${q[3]};
3031
+ border-block-start: 1px solid color-mix(in oklch, ${K.neutral[900]} 8%, transparent);
3032
+ font-family: ${gr};
2880
3033
  }
2881
3034
 
2882
3035
  .vd-commerce-price {
2883
3036
  display: flex;
2884
3037
  align-items: baseline;
2885
- gap: ${F[1.5]};
3038
+ gap: ${q[1.5]};
2886
3039
  }
2887
3040
 
2888
3041
  .vd-price {
2889
- font-size: ${I.fontSize.lg};
2890
- font-weight: ${I.fontWeight.semibold};
2891
- color: ${P.neutral[900]};
3042
+ font-size: ${J.fontSize.lg};
3043
+ font-weight: ${J.fontWeight.semibold};
3044
+ color: ${K.neutral[900]};
2892
3045
  }
2893
3046
 
2894
3047
  .vd-vat {
2895
- font-size: ${I.fontSize.xs};
2896
- color: ${P.neutral[500]};
3048
+ font-size: ${J.fontSize.xs};
3049
+ color: ${K.neutral[500]};
2897
3050
  }
2898
3051
 
2899
3052
  .vd-cta {
@@ -2903,23 +3056,23 @@ var Q = I.fontFamily.sans.join(", "), $ = "\n position: absolute;\n display: f
2903
3056
 
2904
3057
  /* Failed submit is the one place red belongs: a clear, recoverable error state. */
2905
3058
  .vd-commerce[data-submit="failed"] .vd-cta {
2906
- background: ${P.semantic.error};
2907
- border-color: ${P.semantic.error};
2908
- color: ${P.white};
3059
+ background: ${K.semantic.error};
3060
+ border-color: ${K.semantic.error};
3061
+ color: ${K.white};
2909
3062
  }
2910
3063
 
2911
3064
  `;
2912
- function ar() {
2913
- if (_n(), document.getElementById("vd-styles") !== null) return;
3065
+ function yr() {
3066
+ if (Pn(), document.getElementById("vd-styles") !== null) return;
2914
3067
  let e = document.createElement("style");
2915
- e.id = "vd-styles", e.textContent = ir, document.head.appendChild(e);
3068
+ e.id = "vd-styles", e.textContent = vr, document.head.appendChild(e);
2916
3069
  }
2917
3070
  // ../client-core/src/ui/standard-interface.ts
2918
- function or(e, t) {
3071
+ function br(e, t) {
2919
3072
  let n = document.createElement("a");
2920
3073
  n.href = `data:image/png;base64,${e}`, n.download = t, n.click();
2921
3074
  }
2922
- var sr = class {
3075
+ var xr = class {
2923
3076
  options;
2924
3077
  settings = {};
2925
3078
  container = null;
@@ -2941,7 +3094,10 @@ var sr = class {
2941
3094
  this.options = e;
2942
3095
  }
2943
3096
  attach(e) {
2944
- ar(), this.container = e, this.loading = new An(e), this.slots.topRight = this.createSlot(e, "vd-slot-top-right"), this.slots.bottomRight = this.createSlot(e, "vd-slot-bottom-right");
3097
+ yr(), this.container = e, this.loading = new En(e, { text: {
3098
+ downloading: () => Yt(),
3099
+ loadError: () => Xt()
3100
+ } }), this.slots.topRight = this.createSlot(e, "vd-slot-top-right"), this.slots.bottomRight = this.createSlot(e, "vd-slot-bottom-right");
2945
3101
  }
2946
3102
  onReady() {
2947
3103
  this.ready = !0, this.loading?.hide(), this.loading = null, this.mountToolbar(), this.cameraControls !== null && (this.cameraControls.element.style.display = "flex"), this.layout?.setVisible(!0);
@@ -2949,7 +3105,7 @@ var sr = class {
2949
3105
  mountToolbar() {
2950
3106
  if (this.actionBar !== null || this.slots.bottomRight === null || this.container === null) return;
2951
3107
  let e = typeof this.container.requestFullscreen == "function" && document.fullscreenEnabled !== !1;
2952
- this.actionBar = new jn({
3108
+ this.actionBar = new Ln({
2953
3109
  onAr: this.options.onAr,
2954
3110
  onFullscreen: e ? () => {
2955
3111
  this.toggleFullscreen();
@@ -2959,7 +3115,7 @@ var sr = class {
2959
3115
  }
2960
3116
  toggleFullscreen() {
2961
3117
  this.container !== null && (document.fullscreenElement === null ? (this.options.onFullscreenEnter?.(), this.container.requestFullscreen().catch((e) => {
2962
- A.warn("Fullscreen request refused", { error: e });
3118
+ j.warn("Fullscreen request refused", { error: e });
2963
3119
  })) : document.exitFullscreen());
2964
3120
  }
2965
3121
  updateProgress(e, t) {
@@ -2972,20 +3128,20 @@ var sr = class {
2972
3128
  this.loading?.viewerAlive();
2973
3129
  }
2974
3130
  applyViewerSettings(e) {
2975
- this.settings = e, e.language !== void 0 && ye(e.language, { reload: !1 }), this.syncScreenshotButton(), this.actionBar?.applySettings(e), this.cameraControls !== null && (this.cameraControls.element.style.display = e.cameraControls === !0 ? "flex" : "none"), this.placeScreenshotButton();
3131
+ this.settings = e, e.language !== void 0 && xe(e.language, { reload: !1 }), this.syncScreenshotButton(), this.actionBar?.applySettings(e), this.cameraControls !== null && (this.cameraControls.element.style.display = e.cameraControls === !0 ? "flex" : "none"), this.placeScreenshotButton();
2976
3132
  }
2977
3133
  renderModelControls(e, t) {
2978
3134
  if (this.container !== null && this.slots.topRight !== null && this.slots.bottomRight !== null && (this.cameraControls?.element.remove(), this.cameraControls = null, this.teardownConfigurator(), this.mountCameraControls(this.slots.topRight), this.placeScreenshotButton(), t.length !== 0)) {
2979
3135
  this.attributes = document.createElement("div"), this.attributes.className = "vd-attributes", this.groupHandles = /* @__PURE__ */ new Map();
2980
3136
  for (let n of t) {
2981
- let t = Kn(n, e, this.options.eventBus, this.options.onSelect, this.options.onSelectTransient, this.options.onSubscribe);
3137
+ let t = rr(n, e, this.options.eventBus, this.options.onSelect, this.options.onSelectTransient, this.options.onSubscribe);
2982
3138
  this.groupHandles.set(n.name, t), this.attributes.appendChild(t.element);
2983
3139
  }
2984
- this.commerce = new Xn(this.options.configuration), this.attributes.appendChild(this.commerce.element), this.layout = rr(this.settings.configuratorLayout, this.slots.bottomRight), this.layout.attach(this.container, this.attributes), this.ready === !0 && this.layout.setVisible(!0), this.lastSelectable !== null && this.applySelectable(this.lastSelectable);
3140
+ this.commerce = new cr(this.options.configuration), this.attributes.appendChild(this.commerce.element), this.layout = hr(this.settings.configuratorLayout, this.slots.bottomRight), this.layout.attach(this.container, this.attributes), this.ready === !0 && this.layout.setVisible(!0), this.lastSelectable !== null && this.applySelectable(this.lastSelectable);
2985
3141
  }
2986
3142
  }
2987
3143
  mountCameraControls(e) {
2988
- this.settings.cameraControls === !0 && (this.cameraControls = new Mn(this.options.cameraApi, this.options.cameraPositionApi), this.cameraControls.element.style.display = this.ready ? "flex" : "none", e.appendChild(this.cameraControls.element));
3144
+ this.settings.cameraControls === !0 && (this.cameraControls = new Rn(this.options.cameraApi, this.options.cameraPositionApi), this.cameraControls.element.style.display = this.ready ? "flex" : "none", e.appendChild(this.cameraControls.element));
2989
3145
  }
2990
3146
  applySelectable(e) {
2991
3147
  this.lastSelectable = e;
@@ -3011,11 +3167,11 @@ var sr = class {
3011
3167
  }
3012
3168
  syncScreenshotButton() {
3013
3169
  let e = this.settings.screenshot === !0;
3014
- e && this.screenshotBtn === null && (this.screenshotBtn = new N({
3170
+ e && this.screenshotBtn === null && (this.screenshotBtn = new I({
3015
3171
  variant: "outline",
3016
3172
  size: "icon",
3017
- label: Ht(),
3018
- icon: M.screenshot(),
3173
+ label: Jt(),
3174
+ icon: F.screenshot(),
3019
3175
  onClick: () => {
3020
3176
  this.takeScreenshot();
3021
3177
  }
@@ -3024,15 +3180,15 @@ var sr = class {
3024
3180
  takeScreenshot() {
3025
3181
  let e = this.screenshotBtn;
3026
3182
  e === null || e.element.disabled || (e.element.disabled = !0, this.options.snapshotApi.take("snapshot.png").onDeveloped(({ data: t, filename: n }) => {
3027
- e.element.disabled = !1, or(t, n);
3183
+ e.element.disabled = !1, br(t, n);
3028
3184
  }).onError((t) => {
3029
- e.element.disabled = !1, A.warn("Screenshot failed", { error: t });
3185
+ e.element.disabled = !1, j.warn("Screenshot failed", { error: t });
3030
3186
  }));
3031
3187
  }
3032
3188
  placeScreenshotButton() {
3033
3189
  this.screenshotBtn !== null && this.slots.topRight !== null && (this.cameraControls === null ? this.slots.topRight.appendChild(this.screenshotBtn.element) : this.cameraControls.element.appendChild(this.screenshotBtn.element));
3034
3190
  }
3035
- }, cr = class {
3191
+ }, Sr = class {
3036
3192
  defaultServer = "https://server.virtualdisplay.io";
3037
3193
  options;
3038
3194
  serverHost;
@@ -3070,7 +3226,7 @@ var sr = class {
3070
3226
  return t.toString();
3071
3227
  }
3072
3228
  setAddressParams(e) {
3073
- this.options.app === void 0 ? (e.searchParams.set("license", this.options.license), e.searchParams.set("model", this.options.model)) : (e.searchParams.set("app", this.options.app), (this.options.license !== void 0 || this.options.model !== void 0) && A.warn("Both `app` and `license`/`model` were supplied: `app` wins, the pair was ignored"));
3229
+ this.options.app === void 0 ? (e.searchParams.set("license", this.options.license), e.searchParams.set("model", this.options.model)) : (e.searchParams.set("app", this.options.app), (this.options.license !== void 0 || this.options.model !== void 0) && j.warn("Both `app` and `license`/`model` were supplied: `app` wins, the pair was ignored"));
3074
3230
  }
3075
3231
  getServerUrl() {
3076
3232
  return this.serverHost === void 0 ? this.defaultServer : this.serverHost;
@@ -3078,54 +3234,58 @@ var sr = class {
3078
3234
  getParentElement() {
3079
3235
  if (typeof this.options.parent != "string") return this.options.parent;
3080
3236
  let e = document.querySelector(this.options.parent);
3081
- if (e === null) throw w.parentNotFound(this.options.parent);
3237
+ if (e === null) throw T.parentNotFound(this.options.parent);
3082
3238
  return e;
3083
3239
  }
3084
3240
  };
3085
3241
  // ../client-core/src/client/incoming-message-routing.ts
3086
- function lr(e) {
3242
+ function Cr(e) {
3087
3243
  let { messenger: n } = e;
3088
3244
  n.on(t.HANDSHAKE, (t) => {
3089
- l(t) && (A.info("Server handshake received, flushing publisher queue"), n.markReady(), e.ui.viewerAlive());
3245
+ l(t) && (j.info("Server handshake received, flushing publisher queue"), n.markReady(), e.ui.viewerAlive());
3090
3246
  }), n.on(t.SESSION, (t) => {
3091
3247
  u(t) && e.onSession(t.sessionId);
3092
3248
  }), n.on(t.MUTATION, (t) => {
3093
- d(t) && (e.attributes.handleMutationResult(t), e.configuration.handleSelectionChanged(e.attributes.getSelection()));
3249
+ ne(t) && (e.attributes.handleMutationResult(t), e.configuration.handleSelectionChanged(e.attributes.getSelection()));
3094
3250
  }), n.on(t.SNAPSHOT, (t) => {
3095
- f(t) && e.snapshot.handleSnapshotResult(t);
3251
+ m(t) && e.snapshot.handleSnapshotResult(t);
3096
3252
  }), n.on(t.CAMERA, (t) => {
3097
- p(t) && e.cameraPosition.handlePositionUpdate(t);
3253
+ re(t) && e.cameraPosition.handlePositionUpdate(t);
3098
3254
  }), n.on(t.LOADING_INDICATOR, (t) => {
3099
- ne(t) && (t.error === void 0 ? e.ui.updateProgress(t.progress, t.phase) : e.ui.showError(t.error));
3255
+ ae(t) && (t.error === void 0 ? e.ui.updateProgress(t.progress, t.phase) : e.ui.showError(t.error));
3100
3256
  }), n.on(t.CONFIG, (t) => {
3101
- ie(t) && e.applyConfig(t);
3257
+ ce(t) && e.applyConfig(t);
3102
3258
  }), n.on(t.MAPPING, (t) => {
3103
- te(t) && (e.attributes.handleMappingReceived(t), e.configuration.handleSelectionChanged(e.attributes.getSelection()), e.ui.renderModelControls(e.attributes, t.attributes), e.readyStateTracker.handleMappingReceived());
3104
- }), ur(e);
3259
+ ie(t) && (e.attributes.handleMappingReceived(t), e.configuration.handleSelectionChanged(e.attributes.getSelection()), e.ui.renderModelControls(e.attributes, t.attributes), e.readyStateTracker.handleMappingReceived());
3260
+ }), wr(e);
3105
3261
  }
3106
- function ur(e) {
3262
+ function wr(e) {
3107
3263
  let { messenger: n } = e;
3108
3264
  n.on(t.FOCUS, (t) => {
3109
- ae(t) && e.focus.handleStateReceived(t);
3265
+ le(t) && e.focus.handleStateReceived(t);
3266
+ }), n.on(t.PERSONALISED, (t) => {
3267
+ d(t) && e.personalisation.handleReplyReceived(t);
3268
+ }), n.on(t.ZONES, (t) => {
3269
+ te(t) && e.personalisation.handleZonesReceived(t);
3110
3270
  }), n.on(t.PRICING, (t) => {
3111
- oe(t) && e.configuration.handlePricingReceived(t.pricing);
3271
+ ue(t) && e.configuration.handlePricingReceived(t.pricing);
3112
3272
  }), n.on(t.SYNC, (t) => {
3113
- m(t) && e.onSync(t.connected);
3273
+ oe(t) && e.onSync(t.connected);
3114
3274
  }), n.on(t.SELECTABLE, (t) => {
3115
- re(t) && (e.selectable.handleSnapshot(t), e.ui.applySelectable(t.attributes));
3275
+ se(t) && (e.selectable.handleSnapshot(t), e.ui.applySelectable(t.attributes));
3116
3276
  }), n.on(t.APP_RESOLVED, (t) => {
3117
3277
  ee(t) && e.onAppResolved(t);
3118
3278
  });
3119
3279
  }
3120
3280
  // ../client-core/src/client/ready-state-tracker.ts
3121
- var dr = class {
3281
+ var Tr = class {
3122
3282
  ready = !1;
3123
3283
  onReady;
3124
3284
  constructor(e) {
3125
3285
  this.onReady = e;
3126
3286
  }
3127
3287
  handleMappingReceived() {
3128
- this.ready || (this.ready = !0, A.info("Mapping received from server, client is now ready"), this.onReady?.());
3288
+ this.ready || (this.ready = !0, j.info("Mapping received from server, client is now ready"), this.onReady?.());
3129
3289
  }
3130
3290
  get isReady() {
3131
3291
  return this.ready;
@@ -3135,7 +3295,7 @@ var dr = class {
3135
3295
  }
3136
3296
  };
3137
3297
  // ../client-core/src/client/base-client.ts
3138
- function fr(e) {
3298
+ function Er(e) {
3139
3299
  if (e === void 0) return;
3140
3300
  let { annotations: t, ...n } = e;
3141
3301
  return t === void 0 ? n : t === !0 ? {
@@ -3149,12 +3309,12 @@ function fr(e) {
3149
3309
  annotations: t
3150
3310
  };
3151
3311
  }
3152
- function pr(e) {
3312
+ function Dr(e) {
3153
3313
  if (!Array.isArray(e)) return {};
3154
3314
  let t = e.filter((e) => typeof e == "string");
3155
3315
  return t.length > 0 ? { features: t } : {};
3156
3316
  }
3157
- var mr = class {
3317
+ var Or = class {
3158
3318
  attributes;
3159
3319
  selectableState;
3160
3320
  readyStateTracker;
@@ -3162,6 +3322,7 @@ var mr = class {
3162
3322
  cameraApi;
3163
3323
  cameraPositionApi;
3164
3324
  focusApi;
3325
+ personalisationApi;
3165
3326
  configurationApi;
3166
3327
  snapshotApi;
3167
3328
  annotationsApi;
@@ -3182,28 +3343,28 @@ var mr = class {
3182
3343
  constructor(e, t) {
3183
3344
  this.options = e;
3184
3345
  let r = t ?? {};
3185
- this.serverHost = r.serverHost, this.iframeParams = r.iframeParams, this.initializeLogging(), this.messenger = new ce(() => this.iframe?.contentWindow ?? null, {
3186
- onHandlerError: (e, t) => A.error(`Error handling ${e.type}`, t),
3346
+ this.serverHost = r.serverHost, this.iframeParams = r.iframeParams, this.initializeLogging(), this.messenger = new fe(() => this.iframe?.contentWindow ?? null, {
3347
+ onHandlerError: (e, t) => j.error(`Error handling ${e.type}`, t),
3187
3348
  ...r.messengerOptions
3188
3349
  });
3189
3350
  let i = (e) => {
3190
3351
  this.messenger.send(e);
3191
3352
  };
3192
- this.attributes = new ct(i, n, (e, t) => {
3353
+ this.attributes = new dt(i, n, (e, t) => {
3193
3354
  this.notifyMutationFailed(e, t);
3194
- }), this.selectableState = new lt(), this.snapshotApi = new yt(i), this.annotationsApi = new ue(i, n), this.cameraApi = new ut(i), this.cameraPositionApi = new dt(), this.focusApi = new gt(i, (e) => {
3355
+ }), this.selectableState = new ft(), this.snapshotApi = new Tt(i), this.annotationsApi = new me(i, n), this.cameraApi = new pt(i), this.cameraPositionApi = new mt(), this.focusApi = new yt(i, (e) => {
3195
3356
  this.dispatchFocusChange(e);
3196
- }, n), this.configurationApi = new ht((e) => {
3357
+ }, n), this.personalisationApi = new St(i, n), this.configurationApi = new vt((e) => {
3197
3358
  this.dispatchConfigurationChange(e);
3198
3359
  }, (e) => {
3199
3360
  this.dispatchConfigurationSubmit(e);
3200
- }), this.eventBus = new bt(), this.arActivation = r.createArActivation?.(i), this.syncTracker = r.createSyncTracker?.(), this.readyStateTracker = new dr(() => {
3361
+ }), this.eventBus = new Et(), this.arActivation = r.createArActivation?.(i), this.syncTracker = r.createSyncTracker?.(), this.readyStateTracker = new Tr(() => {
3201
3362
  this.notifyReady();
3202
3363
  }), this.ui = this.createStandardInterface(), this.wireIncomingMessages(), r.registerHandlers?.(this.messenger, i), this.messenger.start(), this.mountIframe();
3203
3364
  }
3204
3365
  createStandardInterface() {
3205
3366
  let e = this.arActivation;
3206
- return new sr({
3367
+ return new xr({
3207
3368
  snapshotApi: this.snapshotApi,
3208
3369
  cameraApi: this.cameraApi,
3209
3370
  cameraPositionApi: this.cameraPositionApi,
@@ -3234,7 +3395,7 @@ var mr = class {
3234
3395
  });
3235
3396
  }
3236
3397
  wireIncomingMessages() {
3237
- lr({
3398
+ Cr({
3238
3399
  messenger: this.messenger,
3239
3400
  attributes: this.attributes,
3240
3401
  selectable: this.selectableState,
@@ -3242,6 +3403,7 @@ var mr = class {
3242
3403
  snapshot: this.snapshotApi,
3243
3404
  cameraPosition: this.cameraPositionApi,
3244
3405
  focus: this.focusApi,
3406
+ personalisation: this.personalisationApi,
3245
3407
  ui: this.ui,
3246
3408
  readyStateTracker: this.readyStateTracker,
3247
3409
  applyConfig: (e) => {
@@ -3259,7 +3421,7 @@ var mr = class {
3259
3421
  name: e.name,
3260
3422
  ...e.slug !== void 0 && { slug: e.slug },
3261
3423
  ...e.submit !== void 0 && { submit: e.submit },
3262
- ...pr(e.features)
3424
+ ...Dr(e.features)
3263
3425
  });
3264
3426
  }
3265
3427
  });
@@ -3284,25 +3446,25 @@ var mr = class {
3284
3446
  this.ui.onReady();
3285
3447
  }
3286
3448
  dispatchFocusChange(e) {
3287
- this.container?.dispatchEvent(new CustomEvent(X.FOCUS_CHANGE, {
3449
+ this.container?.dispatchEvent(new CustomEvent(Q.FOCUS_CHANGE, {
3288
3450
  detail: e,
3289
3451
  bubbles: !0
3290
3452
  }));
3291
3453
  }
3292
3454
  dispatchConfigurationChange(e) {
3293
- this.container?.dispatchEvent(new CustomEvent(X.CONFIGURATION_CHANGE, {
3455
+ this.container?.dispatchEvent(new CustomEvent(Q.CONFIGURATION_CHANGE, {
3294
3456
  detail: e ?? null,
3295
3457
  bubbles: !0
3296
3458
  }));
3297
3459
  }
3298
3460
  dispatchConfigurationSubmit(e) {
3299
- this.container?.dispatchEvent(new CustomEvent(X.CONFIGURATION_SUBMIT, {
3461
+ this.container?.dispatchEvent(new CustomEvent(Q.CONFIGURATION_SUBMIT, {
3300
3462
  detail: e,
3301
3463
  bubbles: !0
3302
3464
  }));
3303
3465
  }
3304
3466
  handleConfig(e) {
3305
- let t = e.viewerSettings, n = fr(this.options.viewerSettings);
3467
+ let t = e.viewerSettings, n = Er(this.options.viewerSettings);
3306
3468
  if (t !== void 0 || n !== void 0) {
3307
3469
  let e = n === void 0 ? t : {
3308
3470
  ...t ?? {},
@@ -3310,7 +3472,7 @@ var mr = class {
3310
3472
  };
3311
3473
  if (n !== void 0 && t !== void 0) {
3312
3474
  let e = Object.entries(n).filter(([e, n]) => t[e] !== n).map(([e, n]) => `${e} (metadata: ${t[e] ?? "undefined"}, override: ${n})`);
3313
- e.length > 0 && A.warn(`Viewer settings override active: ${e.join(", ")}`);
3475
+ e.length > 0 && j.warn(`Viewer settings override active: ${e.join(", ")}`);
3314
3476
  }
3315
3477
  this.ui.applyViewerSettings(e), this.echoAnnotationsDifference(t?.annotations, e.annotations);
3316
3478
  }
@@ -3323,15 +3485,11 @@ var mr = class {
3323
3485
  this.messenger.send({ type: t.FULLSCREEN });
3324
3486
  }
3325
3487
  initializeLogging() {
3326
- this.options.debug === !0 && ot(), A.info("Initializing Virtualdisplay client", { ...this.options.app === void 0 ? { model: this.options.model } : { app: this.options.app } });
3488
+ this.options.debug === !0 && lt(), j.info("Initializing Virtualdisplay client", { ...this.options.app === void 0 ? { model: this.options.model } : { app: this.options.app } });
3327
3489
  }
3328
3490
  mountIframe() {
3329
- let e = new cr(this.options, this.serverHost, this.iframeParams).create();
3330
- this.container = e.container, this.iframe = e.iframe, this.eventBus.attach(this.container), this.ui.attach(this.container);
3331
- try {
3332
- let e = new URL(this.iframe.src).origin;
3333
- this.messenger.setTargetOrigin(e);
3334
- } catch {}
3491
+ let e = new Sr(this.options, this.serverHost, this.iframeParams).create();
3492
+ this.container = e.container, this.iframe = e.iframe, this.eventBus.attach(this.container), this.ui.attach(this.container), this.messenger.setTargetOrigin(new URL(this.iframe.src).origin);
3335
3493
  }
3336
3494
  select(e, t) {
3337
3495
  this.attributes.select(e, t);
@@ -3381,6 +3539,9 @@ var mr = class {
3381
3539
  get focus() {
3382
3540
  return this.focusApi;
3383
3541
  }
3542
+ get personalisation() {
3543
+ return this.personalisationApi;
3544
+ }
3384
3545
  get configuration() {
3385
3546
  return this.configurationApi;
3386
3547
  }
@@ -3397,17 +3558,17 @@ var mr = class {
3397
3558
  return this.ui.viewerSettings;
3398
3559
  }
3399
3560
  destroy() {
3400
- this.readyStateTracker.clear(), this.readyCallbacks = [], this.mutationFailedCallbacks.length = 0, this.snapshotApi.clear(), this.messenger.destroy(), this.arActivation?.destroy(), this.ui.destroy(), this.container?.parentElement !== null && this.container?.parentElement !== void 0 && this.container.parentElement.removeChild(this.container), this.container = void 0, this.iframe = void 0;
3561
+ this.readyStateTracker.clear(), this.readyCallbacks = [], this.mutationFailedCallbacks.length = 0, this.snapshotApi.clear(), this.personalisationApi.destroy(), this.messenger.destroy(), this.arActivation?.destroy(), this.ui.destroy(), this.container?.parentElement !== null && this.container?.parentElement !== void 0 && this.container.parentElement.removeChild(this.container), this.container = void 0, this.iframe = void 0;
3401
3562
  }
3402
- }, hr = "ar.virtualdisplay.io";
3403
- function gr(e) {
3404
- let t = new URL(`https://${hr}/go`);
3563
+ }, kr = "ar.virtualdisplay.io";
3564
+ function Ar(e) {
3565
+ let t = new URL(`https://${kr}/go`);
3405
3566
  return e.sessionId === void 0 ? e.app === void 0 ? e.license !== void 0 && e.model !== void 0 && (t.searchParams.set("license", e.license), t.searchParams.set("model", e.model)) : t.searchParams.set("app", e.app) : t.searchParams.set("session", e.sessionId), t.toString();
3406
3567
  }
3407
3568
  // src/ar/ar-activation.ts
3408
- var _r = 1500, vr = class {
3569
+ var jr = 1500, Mr = class {
3409
3570
  options;
3410
- qrModal = new yn();
3571
+ qrModal = new In();
3411
3572
  sessionId;
3412
3573
  waiters = [];
3413
3574
  pendingTimers = /* @__PURE__ */ new Set();
@@ -3422,7 +3583,7 @@ var _r = 1500, vr = class {
3422
3583
  for (let n of t) n(e);
3423
3584
  }
3424
3585
  activate() {
3425
- tt() ? this.options.send({ type: t.AR_ACTIVATE }) : this.showQrCode();
3586
+ it() ? this.options.send({ type: t.AR_ACTIVATE }) : this.showQrCode();
3426
3587
  }
3427
3588
  destroy() {
3428
3589
  this.destroyed = !0;
@@ -3433,7 +3594,7 @@ var _r = 1500, vr = class {
3433
3594
  this.qrModal.show();
3434
3595
  let e = await this.waitForSessionId();
3435
3596
  if (this.destroyed) return;
3436
- let n = gr({
3597
+ let n = Ar({
3437
3598
  sessionId: e,
3438
3599
  app: this.options.app,
3439
3600
  license: this.options.license,
@@ -3442,7 +3603,7 @@ var _r = 1500, vr = class {
3442
3603
  try {
3443
3604
  r = await this.qrModal.update(n);
3444
3605
  } catch (e) {
3445
- A.warn("AR QR code could not be rendered", { error: e });
3606
+ j.warn("AR QR code could not be rendered", { error: e });
3446
3607
  return;
3447
3608
  }
3448
3609
  this.destroyed ? this.qrModal.hide() : r && this.options.send({ type: t.QR_SHOWN });
@@ -3451,13 +3612,13 @@ var _r = 1500, vr = class {
3451
3612
  return this.sessionId === void 0 ? new Promise((e) => {
3452
3613
  let t = setTimeout(() => {
3453
3614
  this.pendingTimers.delete(t), e(void 0);
3454
- }, _r);
3615
+ }, jr);
3455
3616
  this.pendingTimers.add(t), this.waiters.push((n) => {
3456
3617
  this.pendingTimers.delete(t), clearTimeout(t), e(n);
3457
3618
  });
3458
3619
  }) : Promise.resolve(this.sessionId);
3459
3620
  }
3460
- }, yr = class {
3621
+ }, Nr = class {
3461
3622
  callbacks = [];
3462
3623
  lastKnown;
3463
3624
  handleSync(e) {
@@ -3467,12 +3628,12 @@ var _r = 1500, vr = class {
3467
3628
  onChange(e) {
3468
3629
  this.callbacks.push(e), this.lastKnown !== void 0 && e(this.lastKnown);
3469
3630
  }
3470
- }, br = class extends mr {
3631
+ }, Pr = class extends Or {
3471
3632
  syncStatusTracker;
3472
3633
  constructor(e) {
3473
- let t = new yr();
3634
+ let t = new Nr();
3474
3635
  super(e, {
3475
- createArActivation: (t) => new vr({
3636
+ createArActivation: (t) => new Mr({
3476
3637
  app: e.app,
3477
3638
  license: e.license,
3478
3639
  model: e.model,
@@ -3485,4 +3646,4 @@ var _r = 1500, vr = class {
3485
3646
  this.syncStatusTracker.onChange(e);
3486
3647
  }
3487
3648
  };
3488
- export { a as AVAILABILITY, ue as Annotations, Le as Attribute, de as AttributeValue, ut as Camera, dt as CameraPosition, ht as Configuration, C as ERROR_CODES, gt as Focus, _t as Photo, yt as Snapshot, X as VD_EVENTS, br as VirtualdisplayClient, w as VirtualdisplayError, ot as enableDebugMode, st as isDebugMode, A as logger };
3649
+ export { a as AVAILABILITY, me as Annotations, Be as Attribute, he as AttributeValue, pt as Camera, mt as CameraPosition, vt as Configuration, w as ERROR_CODES, yt as Focus, St as Personalisation, Ct as Photo, Tt as Snapshot, Q as VD_EVENTS, Pr as VirtualdisplayClient, T as VirtualdisplayError, lt as enableDebugMode, ut as isDebugMode, j as logger };