@virtualdisplay.io/client 4.0.0-alpha.27 → 4.0.0-alpha.28

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.
@@ -17,79 +17,79 @@ const c = {
17
17
  SYNC: "sync",
18
18
  SELECTABLE: "selectable",
19
19
  APP_RESOLVED: "app_resolved"
20
- }, F = "main", te = {
20
+ }, L = "main", et = {
21
21
  FOCUS: "focus",
22
22
  UNFOCUS: "unfocus"
23
- }, Ie = {
23
+ }, It = {
24
24
  FOCUSED: "focused"
25
- }, Le = {
25
+ }, Ot = {
26
26
  /** Behaves exactly like an unpriced combination: no price, no button. */
27
27
  HIDDEN: "hidden"
28
- }, Oe = new Set(Object.values(c));
29
- function Ne(n) {
28
+ }, Lt = new Set(Object.values(c));
29
+ function Mt(n) {
30
30
  if (typeof n != "object" || n === null)
31
31
  return !1;
32
- const e = n;
33
- return typeof e.target == "string" ? !1 : typeof e.type == "string" && Oe.has(e.type);
32
+ const t = n;
33
+ return typeof t.target == "string" ? !1 : typeof t.type == "string" && Lt.has(t.type);
34
34
  }
35
- function Me(n) {
36
- const e = S(n);
37
- return e !== null && e.type === c.HANDSHAKE;
35
+ function Nt(n) {
36
+ const t = S(n);
37
+ return t !== null && t.type === c.HANDSHAKE;
38
38
  }
39
- function ze(n) {
40
- const e = S(n);
41
- return e !== null && e.type === c.SESSION && typeof e.sessionId == "string";
39
+ function zt(n) {
40
+ const t = S(n);
41
+ return t !== null && t.type === c.SESSION && typeof t.sessionId == "string";
42
42
  }
43
- function Pe(n) {
44
- const e = S(n);
45
- return e !== null && e.type === c.APP_RESOLVED && typeof e.appType == "string" && e.appType !== "" && typeof e.name == "string";
43
+ function Pt(n) {
44
+ const t = S(n);
45
+ return t !== null && t.type === c.APP_RESOLVED && typeof t.appType == "string" && t.appType !== "" && typeof t.name == "string";
46
46
  }
47
- function Fe(n) {
48
- const e = S(n);
49
- return e !== null && e.type === c.MUTATION && typeof e.instance == "string" && e.instance !== "" && Array.isArray(e.results);
47
+ function Ft(n) {
48
+ const t = S(n);
49
+ return t !== null && t.type === c.MUTATION && typeof t.instance == "string" && t.instance !== "" && Array.isArray(t.results);
50
50
  }
51
- function De(n) {
52
- const e = S(n);
53
- return e !== null && e.type === c.SNAPSHOT && ("data" in e || "error" in e);
51
+ function Dt(n) {
52
+ const t = S(n);
53
+ return t !== null && t.type === c.SNAPSHOT && ("data" in t || "error" in t);
54
54
  }
55
- function $e(n) {
56
- const e = S(n);
57
- return e !== null && e.type === c.CAMERA && Array.isArray(e.transforms);
55
+ function $t(n) {
56
+ const t = S(n);
57
+ return t !== null && t.type === c.CAMERA && Array.isArray(t.transforms);
58
58
  }
59
- function Ue(n) {
60
- const e = S(n);
61
- return e !== null && e.type === c.MAPPING && typeof e.instance == "string" && e.instance !== "" && Array.isArray(e.attributes);
59
+ function Bt(n) {
60
+ const t = S(n);
61
+ return t !== null && t.type === c.MAPPING && typeof t.instance == "string" && t.instance !== "" && Array.isArray(t.attributes);
62
62
  }
63
- function Be(n) {
64
- const e = S(n);
65
- return e !== null && e.type === c.LOADING_INDICATOR && typeof e.progress == "number";
63
+ function Ut(n) {
64
+ const t = S(n);
65
+ return t !== null && t.type === c.LOADING_INDICATOR && typeof t.progress == "number";
66
66
  }
67
- function Ve(n) {
68
- const e = S(n);
69
- return e !== null && e.type === c.SYNC && typeof e.connected == "boolean";
67
+ function Vt(n) {
68
+ const t = S(n);
69
+ return t !== null && t.type === c.SYNC && typeof t.connected == "boolean";
70
70
  }
71
- function je(n) {
72
- const e = S(n);
73
- return e !== null && e.type === c.SELECTABLE && typeof e.instance == "string" && e.instance !== "" && Array.isArray(e.attributes);
71
+ function jt(n) {
72
+ const t = S(n);
73
+ return t !== null && t.type === c.SELECTABLE && typeof t.instance == "string" && t.instance !== "" && Array.isArray(t.attributes);
74
74
  }
75
- function He(n) {
76
- const e = S(n);
77
- return e !== null && e.type === c.CONFIG && typeof e.viewerSettings == "object";
75
+ function Ht(n) {
76
+ const t = S(n);
77
+ return t !== null && t.type === c.CONFIG && typeof t.viewerSettings == "object";
78
78
  }
79
- function qe(n) {
80
- const e = S(n);
81
- return e !== null && e.type === c.FOCUS && typeof e.instance == "string" && e.instance !== "" && typeof e.state == "string";
79
+ function qt(n) {
80
+ const t = S(n);
81
+ return t !== null && t.type === c.FOCUS && typeof t.instance == "string" && t.instance !== "" && typeof t.state == "string";
82
82
  }
83
- function Ge(n) {
84
- const e = S(n);
85
- return e !== null && e.type === c.PRICING && typeof e.instance == "string" && e.instance !== "" && typeof e.pricing == "object" && e.pricing !== null;
83
+ function Gt(n) {
84
+ const t = S(n);
85
+ return t !== null && t.type === c.PRICING && typeof t.instance == "string" && t.instance !== "" && typeof t.pricing == "object" && t.pricing !== null;
86
86
  }
87
87
  function S(n) {
88
88
  return typeof n != "object" || n === null ? null : n;
89
89
  }
90
- class ne {
91
- constructor(e) {
92
- this.processor = e;
90
+ class nt {
91
+ constructor(t) {
92
+ this.processor = t;
93
93
  }
94
94
  processor;
95
95
  pending = [];
@@ -97,12 +97,12 @@ class ne {
97
97
  /**
98
98
  * Add a message — processed immediately if ready, queued otherwise
99
99
  */
100
- enqueue(e) {
100
+ enqueue(t) {
101
101
  if (this.isReady) {
102
- this.processor(e);
102
+ this.processor(t);
103
103
  return;
104
104
  }
105
- this.pending.push(e);
105
+ this.pending.push(t);
106
106
  }
107
107
  /**
108
108
  * Mark as ready and flush all pending messages
@@ -110,10 +110,10 @@ class ne {
110
110
  markReady() {
111
111
  if (this.isReady || (this.isReady = !0, this.pending.length === 0))
112
112
  return;
113
- const e = [...this.pending];
113
+ const t = [...this.pending];
114
114
  this.pending.length = 0;
115
- for (const t of e)
116
- this.processor(t);
115
+ for (const e of t)
116
+ this.processor(e);
117
117
  }
118
118
  get ready() {
119
119
  return this.isReady;
@@ -124,8 +124,8 @@ class ne {
124
124
  /**
125
125
  * Check if a message of a specific type is pending
126
126
  */
127
- hasPending(e) {
128
- return this.pending.some((t) => t.type === e);
127
+ hasPending(t) {
128
+ return this.pending.some((e) => e.type === t);
129
129
  }
130
130
  /**
131
131
  * Clear all pending messages
@@ -134,9 +134,9 @@ class ne {
134
134
  this.pending.length = 0;
135
135
  }
136
136
  }
137
- class Ze {
138
- constructor(e, t) {
139
- this.getTarget = e, this.sourceId = `vd-${Math.random().toString(36).slice(2, 8)}`, this.targetOrigin = "*", this.isValid = t?.isValid ?? Ne, this.publisher = new ne((i) => this.post(i)), this.consumer = new ne((i) => this.routeToHandler(i)), t?.bufferIncoming !== !0 && this.consumer.markReady();
137
+ class Zt {
138
+ constructor(t, e) {
139
+ this.getTarget = t, this.sourceId = `vd-${Math.random().toString(36).slice(2, 8)}`, this.targetOrigin = "*", this.isValid = e?.isValid ?? Mt, this.publisher = new nt((i) => this.post(i)), this.consumer = new nt((i) => this.routeToHandler(i)), e?.bufferIncoming !== !0 && this.consumer.markReady();
140
140
  }
141
141
  getTarget;
142
142
  handlers = /* @__PURE__ */ new Map();
@@ -149,22 +149,22 @@ class Ze {
149
149
  /**
150
150
  * Register a handler for a specific message type
151
151
  */
152
- on(e, t) {
153
- this.handlers.set(e, t);
152
+ on(t, e) {
153
+ this.handlers.set(t, e);
154
154
  }
155
155
  /**
156
156
  * Update the target origin for outgoing postMessage calls.
157
157
  * Use when the target origin is discovered at runtime (e.g. from the first incoming message).
158
158
  */
159
- setTargetOrigin(e) {
160
- this.targetOrigin = e;
159
+ setTargetOrigin(t) {
160
+ this.targetOrigin = t;
161
161
  }
162
162
  /**
163
163
  * Send a message to the target window
164
164
  * Queued until markReady() is called
165
165
  */
166
- send(e) {
167
- this.publisher.enqueue(e);
166
+ send(t) {
167
+ this.publisher.enqueue(t);
168
168
  }
169
169
  /**
170
170
  * Feed a message through the same routing path as one that just arrived via
@@ -175,8 +175,8 @@ class Ze {
175
175
  * viewer engine's SSE-sourced live sync channel, ar-session-handoff) and
176
176
  * needs them to land exactly where a postMessage would.
177
177
  */
178
- receive(e) {
179
- this.isValid(e) && this.consumer.enqueue(e);
178
+ receive(t) {
179
+ this.isValid(t) && this.consumer.enqueue(t);
180
180
  }
181
181
  /**
182
182
  * Enable sending and flush queued outgoing messages
@@ -194,22 +194,22 @@ class Ze {
194
194
  /**
195
195
  * Check if an incoming message of a specific type is pending in the consumer buffer
196
196
  */
197
- consumerHasPending(e) {
198
- return this.consumer.hasPending(e);
197
+ consumerHasPending(t) {
198
+ return this.consumer.hasPending(t);
199
199
  }
200
200
  /**
201
201
  * Start listening for incoming messages
202
202
  */
203
203
  start() {
204
- this.listener === null && (this.listener = (e) => {
205
- const { data: t } = e;
206
- if (!this.isValid(t) || t._source === this.sourceId)
204
+ this.listener === null && (this.listener = (t) => {
205
+ const { data: e } = t;
206
+ if (!this.isValid(e) || e._source === this.sourceId)
207
207
  return;
208
208
  const i = this.getTarget();
209
- if (i !== null && e.source !== null && e.source !== i)
209
+ if (i !== null && t.source !== null && t.source !== i)
210
210
  return;
211
- const s = t;
212
- this.consumer.enqueue(s);
211
+ const o = e;
212
+ this.consumer.enqueue(o);
213
213
  }, window.addEventListener("message", this.listener));
214
214
  }
215
215
  /**
@@ -218,38 +218,38 @@ class Ze {
218
218
  destroy() {
219
219
  this.listener !== null && (window.removeEventListener("message", this.listener), this.listener = null), this.publisher.clear(), this.consumer.clear(), this.handlers.clear();
220
220
  }
221
- post(e) {
222
- const t = this.getTarget();
223
- t !== null && t.postMessage({ ...e, _source: this.sourceId }, this.targetOrigin);
221
+ post(t) {
222
+ const e = this.getTarget();
223
+ e !== null && e.postMessage({ ...t, _source: this.sourceId }, this.targetOrigin);
224
224
  }
225
- routeToHandler(e) {
226
- const t = this.handlers.get(e.type);
227
- if (t === void 0)
225
+ routeToHandler(t) {
226
+ const e = this.handlers.get(t.type);
227
+ if (e === void 0)
228
228
  return;
229
- const i = t(e);
230
- i instanceof Promise && i.catch((s) => {
231
- const o = s instanceof Error ? s.message : String(s);
232
- console.error(`Virtualdisplay: error handling ${e.type}: ${o}`);
229
+ const i = e(t);
230
+ i instanceof Promise && i.catch((o) => {
231
+ const s = o instanceof Error ? o.message : String(o);
232
+ console.error(`Virtualdisplay: error handling ${t.type}: ${s}`);
233
233
  });
234
234
  }
235
235
  }
236
- class We {
237
- constructor(e, t) {
238
- this.send = e, this.instance = t;
236
+ class Wt {
237
+ constructor(t, e) {
238
+ this.send = t, this.instance = e;
239
239
  }
240
240
  send;
241
241
  instance;
242
- setEnabled(e) {
242
+ setEnabled(t) {
243
243
  this.send({
244
244
  type: c.ANNOTATION_TOGGLE,
245
245
  instance: this.instance,
246
- enabled: e
246
+ enabled: t
247
247
  });
248
248
  }
249
249
  }
250
- class Ye {
251
- constructor(e, t) {
252
- this.value = e, this.attribute = t;
250
+ class Yt {
251
+ constructor(t, e) {
252
+ this.value = t, this.attribute = e;
253
253
  }
254
254
  value;
255
255
  attribute;
@@ -257,8 +257,8 @@ class Ye {
257
257
  get isSelected() {
258
258
  return this.isSelectedValue;
259
259
  }
260
- setSelected(e) {
261
- this.isSelectedValue = e;
260
+ setSelected(t) {
261
+ this.isSelectedValue = t;
262
262
  }
263
263
  }
264
264
  const A = {
@@ -269,286 +269,286 @@ const A = {
269
269
  INVALID_PARAMETER: "INVALID_PARAMETER",
270
270
  SNAPSHOT_FAILED: "SNAPSHOT_FAILED"
271
271
  };
272
- class g extends Error {
272
+ class y extends Error {
273
273
  code;
274
- constructor(e, t) {
275
- super(e), this.name = "VirtualdisplayError", this.code = t;
274
+ constructor(t, e) {
275
+ super(t), this.name = "VirtualdisplayError", this.code = e;
276
276
  }
277
- static valueNotFound(e, t) {
278
- return new g(
279
- `Value "${t}" not found for attribute "${e}"`,
277
+ static valueNotFound(t, e) {
278
+ return new y(
279
+ `Value "${e}" not found for attribute "${t}"`,
280
280
  A.VALUE_NOT_FOUND
281
281
  );
282
282
  }
283
- static parentNotFound(e) {
284
- return new g(
285
- `Parent element not found: ${e}`,
283
+ static parentNotFound(t) {
284
+ return new y(
285
+ `Parent element not found: ${t}`,
286
286
  A.PARENT_NOT_FOUND
287
287
  );
288
288
  }
289
- static invalidParameter(e) {
290
- return new g(e, A.INVALID_PARAMETER);
289
+ static invalidParameter(t) {
290
+ return new y(t, A.INVALID_PARAMETER);
291
291
  }
292
292
  }
293
- class Qe {
293
+ class Qt {
294
294
  name;
295
295
  defaultValue;
296
296
  values;
297
297
  onSelect;
298
298
  onChangeCallback;
299
- constructor(e) {
300
- this.name = e.name, this.defaultValue = e.defaultValue, this.onSelect = e.onSelect, this.values = this.createValues(e.values);
299
+ constructor(t) {
300
+ this.name = t.name, this.defaultValue = t.defaultValue, this.onSelect = t.onSelect, this.values = this.createValues(t.values);
301
301
  }
302
302
  /**
303
303
  * Select a value for this attribute
304
304
  * @throws {VirtualdisplayError} When value not found
305
305
  */
306
- select(e) {
307
- if (!this.values.has(e))
308
- throw g.valueNotFound(this.name, e);
309
- this.onSelect(this.name, e);
306
+ select(t) {
307
+ if (!this.values.has(t))
308
+ throw y.valueNotFound(this.name, t);
309
+ this.onSelect(this.name, t);
310
310
  }
311
311
  getValues() {
312
312
  return Array.from(this.values.values());
313
313
  }
314
- getValue(e) {
315
- return this.values.get(e);
314
+ getValue(t) {
315
+ return this.values.get(t);
316
316
  }
317
317
  /** The currently selected value, or undefined before any selection lands. */
318
318
  get selected() {
319
- for (const e of this.values.values())
320
- if (e.isSelected)
321
- return e.value;
319
+ for (const t of this.values.values())
320
+ if (t.isSelected)
321
+ return t.value;
322
322
  }
323
323
  /**
324
324
  * Register callback that fires when selection changes
325
325
  * Receives the newly selected AttributeValue
326
326
  */
327
- onChange(e) {
328
- this.onChangeCallback = e;
327
+ onChange(t) {
328
+ this.onChangeCallback = t;
329
329
  }
330
330
  /**
331
331
  * Update selection state from server mutation result
332
332
  * Direct value comparison - no source/target translation
333
333
  */
334
- handleResult(e) {
335
- let t;
334
+ handleResult(t) {
335
+ let e;
336
336
  for (const i of this.values.values()) {
337
- const s = i.value === e;
338
- i.setSelected(s), s && (t = i);
337
+ const o = i.value === t;
338
+ i.setSelected(o), o && (e = i);
339
339
  }
340
- t !== void 0 && this.onChangeCallback !== void 0 && this.onChangeCallback(t);
340
+ e !== void 0 && this.onChangeCallback !== void 0 && this.onChangeCallback(e);
341
341
  }
342
- createValues(e) {
343
- const t = /* @__PURE__ */ new Map();
344
- for (const i of e) {
345
- const s = new Ye(i, this.name);
346
- i === this.defaultValue && s.setSelected(!0), t.set(i, s);
342
+ createValues(t) {
343
+ const e = /* @__PURE__ */ new Map();
344
+ for (const i of t) {
345
+ const o = new Yt(i, this.name);
346
+ i === this.defaultValue && o.setSelected(!0), e.set(i, o);
347
347
  }
348
- return t;
348
+ return e;
349
349
  }
350
350
  }
351
- class Ke {
351
+ class Kt {
352
352
  attributes = /* @__PURE__ */ new Map();
353
- constructor(e, t, i) {
354
- for (const s of e) {
355
- const o = this.buildOptions(s, t);
356
- this.attributes.set(s.name, new Qe(o));
353
+ constructor(t, e, i) {
354
+ for (const o of t) {
355
+ const s = this.buildOptions(o, e);
356
+ this.attributes.set(o.name, new Qt(s));
357
357
  }
358
358
  this.onMutationFailed = i;
359
359
  }
360
360
  onMutationFailed;
361
- get(e) {
362
- return this.attributes.get(e);
361
+ get(t) {
362
+ return this.attributes.get(t);
363
363
  }
364
364
  /** The current selection as attribute name→value pairs, skipping unset attributes. */
365
365
  getSelection() {
366
- const e = {};
367
- for (const [t, i] of this.attributes) {
368
- const s = i.selected;
369
- s !== void 0 && (e[t] = s);
366
+ const t = {};
367
+ for (const [e, i] of this.attributes) {
368
+ const o = i.selected;
369
+ o !== void 0 && (t[e] = o);
370
370
  }
371
- return e;
371
+ return t;
372
372
  }
373
- handleResults(e) {
374
- for (const t of e) {
375
- if (!t.success) {
376
- this.onMutationFailed?.(t.name, t.value);
373
+ handleResults(t) {
374
+ for (const e of t) {
375
+ if (!e.success) {
376
+ this.onMutationFailed?.(e.name, e.value);
377
377
  continue;
378
378
  }
379
- this.get(t.name)?.handleResult(t.value);
379
+ this.get(e.name)?.handleResult(e.value);
380
380
  }
381
381
  }
382
- buildOptions(e, t) {
382
+ buildOptions(t, e) {
383
383
  const i = {
384
- name: e.name,
385
- values: e.values,
386
- onSelect: (s, o) => {
387
- t([{ name: s, value: o }], !1);
384
+ name: t.name,
385
+ values: t.values,
386
+ onSelect: (o, s) => {
387
+ e([{ name: o, value: s }], !1);
388
388
  }
389
389
  };
390
- return e.defaultValue !== void 0 ? { ...i, defaultValue: e.defaultValue } : i;
390
+ return t.defaultValue !== void 0 ? { ...i, defaultValue: t.defaultValue } : i;
391
391
  }
392
392
  }
393
- const N = 4096, D = 16384, Xe = [1024, 256, 64], Je = 20, Y = ["timestamp", "level", "msg", "service", "trace_id", "span_id"];
394
- function et(n) {
395
- const e = new Date(n.timestamp).toLocaleTimeString("en-GB", { hour12: !1 }), t = n.level.toUpperCase().padEnd(5), i = n.trace_id?.slice(0, 8) ?? "--------", s = n.msg, o = Object.entries(n).filter(([r]) => !Y.includes(r)).map(([r, a]) => `${r}=${L(a, N).line}`).join(" ");
396
- return `${e} ${t} [${i}] ${s}${o ? " " + o : ""}`;
393
+ const N = 4096, D = 16384, Xt = [1024, 256, 64], Jt = 20, Y = ["timestamp", "level", "msg", "service", "trace_id", "span_id"];
394
+ function te(n) {
395
+ const t = new Date(n.timestamp).toLocaleTimeString("en-GB", { hour12: !1 }), e = n.level.toUpperCase().padEnd(5), i = n.trace_id?.slice(0, 8) ?? "--------", o = n.msg, s = Object.entries(n).filter(([r]) => !Y.includes(r)).map(([r, a]) => `${r}=${O(a, N).line}`).join(" ");
396
+ return `${t} ${e} [${i}] ${o}${s ? " " + s : ""}`;
397
397
  }
398
- function tt(n) {
399
- for (const s of [N, ...Xe]) {
400
- const { line: o, truncated: r } = L(n, s);
398
+ function ee(n) {
399
+ for (const o of [N, ...Xt]) {
400
+ const { line: s, truncated: r } = O(n, o);
401
401
  if (!r) {
402
- if (o.length <= D)
403
- return o;
402
+ if (s.length <= D)
403
+ return s;
404
404
  continue;
405
405
  }
406
- const { line: a } = L({ ...n, log_truncated: !0 }, s);
406
+ const { line: a } = O({ ...n, log_truncated: !0 }, o);
407
407
  if (a.length <= D)
408
408
  return a;
409
409
  }
410
- const e = Object.keys(n).filter((s) => !Y.includes(s)), t = { ...it(n, Y), log_truncated: !0, log_dropped_count: e.length }, i = L({ ...t, log_dropped_attrs: e.slice(0, Je) }, N);
411
- return i.line.length <= D ? i.line : L(t, N).line;
410
+ const t = Object.keys(n).filter((o) => !Y.includes(o)), e = { ...ie(n, Y), log_truncated: !0, log_dropped_count: t.length }, i = O({ ...e, log_dropped_attrs: t.slice(0, Jt) }, N);
411
+ return i.line.length <= D ? i.line : O(e, N).line;
412
412
  }
413
- function L(n, e) {
414
- const t = [];
413
+ function O(n, t) {
414
+ const e = [];
415
415
  let i = !1;
416
416
  return { line: JSON.stringify(n, function(r, a) {
417
417
  if (typeof a == "string")
418
- return a.length > e && (i = !0), nt(a, e);
418
+ return a.length > t && (i = !0), ne(a, t);
419
419
  if (typeof a == "bigint")
420
420
  return a.toString();
421
421
  if (typeof a != "object" || a === null)
422
422
  return a;
423
- for (; t.length > 0 && t.at(-1) !== this; )
424
- t.pop();
425
- return t.includes(a) ? "[Circular]" : (t.push(a), a);
423
+ for (; e.length > 0 && e.at(-1) !== this; )
424
+ e.pop();
425
+ return e.includes(a) ? "[Circular]" : (e.push(a), a);
426
426
  }), truncated: i };
427
427
  }
428
- function nt(n, e) {
429
- return n.length <= e ? n : `${n.slice(0, e)}...[truncated ${n.length - e} chars]`;
428
+ function ne(n, t) {
429
+ return n.length <= t ? n : `${n.slice(0, t)}...[truncated ${n.length - t} chars]`;
430
430
  }
431
- function it(n, e) {
432
- const t = {};
433
- for (const i of e)
434
- n[i] !== void 0 && (t[i] = n[i]);
435
- return t;
431
+ function ie(n, t) {
432
+ const e = {};
433
+ for (const i of t)
434
+ n[i] !== void 0 && (e[i] = n[i]);
435
+ return e;
436
436
  }
437
- function st(n, e) {
438
- const t = e ? et(n) : tt(n);
439
- n.level === "error" ? console.error(t) : n.level === "warn" ? console.warn(t) : console.log(t);
437
+ function oe(n, t) {
438
+ const e = t ? te(n) : ee(n);
439
+ n.level === "error" ? console.error(e) : n.level === "warn" ? console.warn(e) : console.log(e);
440
440
  }
441
- function fe(n, e = 0) {
442
- const t = {
441
+ function ft(n, t = 0) {
442
+ const e = {
443
443
  name: n.name,
444
444
  message: n.message
445
445
  };
446
- n.stack !== void 0 && (t.stack = n.stack);
446
+ n.stack !== void 0 && (e.stack = n.stack);
447
447
  for (const i of Object.getOwnPropertyNames(n)) {
448
448
  if (i === "name" || i === "message" || i === "stack" || i === "cause")
449
449
  continue;
450
- const s = n[i];
451
- s !== void 0 && (t[i] = s);
450
+ const o = n[i];
451
+ o !== void 0 && (e[i] = o);
452
452
  }
453
- return n.cause !== void 0 && n.cause !== null && (t.cause = n.cause instanceof Error && e < 5 ? fe(n.cause, e + 1) : String(n.cause)), t;
453
+ return n.cause !== void 0 && n.cause !== null && (e.cause = n.cause instanceof Error && t < 5 ? ft(n.cause, t + 1) : String(n.cause)), e;
454
454
  }
455
- function ot(n) {
456
- const e = {};
457
- for (const [t, i] of Object.entries(n))
458
- e[t] = i instanceof Error ? fe(i) : i;
459
- return e;
455
+ function se(n) {
456
+ const t = {};
457
+ for (const [e, i] of Object.entries(n))
458
+ t[e] = i instanceof Error ? ft(i) : i;
459
+ return t;
460
460
  }
461
- function rt() {
461
+ function re() {
462
462
  return /* @__PURE__ */ new Date();
463
463
  }
464
- function at(n) {
464
+ function ae(n) {
465
465
  return n.toISOString();
466
466
  }
467
- function ge() {
467
+ function gt() {
468
468
  return typeof navigator > "u" ? "" : navigator.userAgent;
469
469
  }
470
- function lt() {
470
+ function le() {
471
471
  return typeof navigator > "u" ? !1 : navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
472
472
  }
473
- function ct() {
474
- return /iPhone|iPad|iPod/i.test(ge()) || lt();
473
+ function ce() {
474
+ return /iPhone|iPad|iPod/i.test(gt()) || le();
475
475
  }
476
- function ut() {
477
- return /Android/i.test(ge());
476
+ function ue() {
477
+ return /Android/i.test(gt());
478
478
  }
479
- function dt() {
480
- return ct() || ut();
479
+ function de() {
480
+ return ce() || ue();
481
481
  }
482
- class ht {
483
- constructor(e) {
484
- this.config = e;
482
+ class he {
483
+ constructor(t) {
484
+ this.config = t;
485
485
  }
486
486
  config;
487
487
  /**
488
488
  * Log at specified level with optional attributes.
489
489
  */
490
- log(e, t, i = {}) {
491
- const s = this.config.traceProvider?.() ?? {}, o = {
492
- timestamp: at(rt()),
493
- level: e,
494
- msg: t,
490
+ log(t, e, i = {}) {
491
+ const o = this.config.traceProvider?.() ?? {}, s = {
492
+ timestamp: ae(re()),
493
+ level: t,
494
+ msg: e,
495
495
  service: this.config.service,
496
- ...s,
497
- ...ot(i)
496
+ ...o,
497
+ ...se(i)
498
498
  };
499
- st(o, this.config.isDev);
499
+ oe(s, this.config.isDev);
500
500
  }
501
501
  /**
502
502
  * Log at DEBUG level (development only).
503
503
  */
504
- debug(e, t) {
505
- this.config.isDev && this.log("debug", e, t);
504
+ debug(t, e) {
505
+ this.config.isDev && this.log("debug", t, e);
506
506
  }
507
507
  /**
508
508
  * Log at INFO level.
509
509
  */
510
- info(e, t) {
511
- this.log("info", e, t);
510
+ info(t, e) {
511
+ this.log("info", t, e);
512
512
  }
513
513
  /**
514
514
  * Log at WARN level.
515
515
  */
516
- warn(e, t) {
517
- this.log("warn", e, t);
516
+ warn(t, e) {
517
+ this.log("warn", t, e);
518
518
  }
519
519
  /**
520
520
  * Log at ERROR level.
521
521
  */
522
- error(e, t) {
523
- this.log("error", e, t);
522
+ error(t, e) {
523
+ this.log("error", t, e);
524
524
  }
525
525
  }
526
- function be(n, e) {
527
- const t = e?.isDev !== void 0 ? e.isDev : typeof process < "u" ? process.env.NODE_ENV !== "production" : !0;
528
- return new ht({ service: n, isDev: t, traceProvider: e?.traceProvider });
526
+ function bt(n, t) {
527
+ const e = t?.isDev !== void 0 ? t.isDev : typeof process < "u" ? process.env.NODE_ENV !== "production" : !0;
528
+ return new he({ service: n, isDev: e, traceProvider: t?.traceProvider });
529
529
  }
530
- function O(n) {
530
+ function M(n) {
531
531
  if (n !== void 0)
532
532
  return typeof n == "object" && n !== null && !Array.isArray(n) && !(n instanceof Error) ? n : n instanceof Error ? { error: n.message } : { value: n };
533
533
  }
534
- function ve(n) {
534
+ function vt(n) {
535
535
  return {
536
- debug: (e, t) => n.debug(e, O(t)),
537
- info: (e, t) => n.info(e, O(t)),
538
- warn: (e, t) => n.warn(e, O(t)),
539
- error: (e, t) => n.error(e, O(t))
536
+ debug: (t, e) => n.debug(t, M(e)),
537
+ info: (t, e) => n.info(t, M(e)),
538
+ warn: (t, e) => n.warn(t, M(e)),
539
+ error: (t, e) => n.error(t, M(e))
540
540
  };
541
541
  }
542
- let ye = !1, C = ve(be("client", { isDev: !1 }));
543
- function mt() {
544
- ye = !0, C = ve(be("client", { isDev: !0 }));
542
+ let yt = !1, C = vt(bt("client", { isDev: !1 }));
543
+ function pe() {
544
+ yt = !0, C = vt(bt("client", { isDev: !0 }));
545
545
  }
546
- function gs() {
547
- return ye;
546
+ function _o() {
547
+ return yt;
548
548
  }
549
- class pt {
550
- constructor(e, t, i) {
551
- this.send = e, this.instance = t, this.onMutationFailed = i;
549
+ class me {
550
+ constructor(t, e, i) {
551
+ this.send = t, this.instance = e, this.onMutationFailed = i;
552
552
  }
553
553
  send;
554
554
  instance;
@@ -558,25 +558,25 @@ class pt {
558
558
  /**
559
559
  * Handle incoming MAPPING message from server
560
560
  */
561
- handleMappingReceived(e) {
561
+ handleMappingReceived(t) {
562
562
  C.debug("Initializing from server mapping", {
563
- attributeCount: e.attributes.length
564
- }), this.registry = new Ke(
565
- e.attributes,
566
- (t, i) => this.sendMutation(t, i),
563
+ attributeCount: t.attributes.length
564
+ }), this.registry = new Kt(
565
+ t.attributes,
566
+ (e, i) => this.sendMutation(e, i),
567
567
  this.onMutationFailed
568
568
  ), this.replayPendingCallbacks();
569
569
  }
570
- handleMutationResult(e) {
571
- this.registry?.handleResults(e.results);
570
+ handleMutationResult(t) {
571
+ this.registry?.handleResults(t.results);
572
572
  }
573
573
  /**
574
574
  * Select a value for an attribute - sends mutation to server.
575
575
  * Can be called before the mapping arrives — the mutation is sent immediately
576
576
  * and the messenger's publisher queue holds it until the iframe is ready.
577
577
  */
578
- select(e, t) {
579
- this.sendMutation([{ name: e, value: t }], !1);
578
+ select(t, e) {
579
+ this.sendMutation([{ name: t, value: e }], !1);
580
580
  }
581
581
  /**
582
582
  * A drag's intermediate step (parametric dimensions): the viewer applies it
@@ -586,79 +586,79 @@ class pt {
586
586
  * `select()` staying the whole choice API is the spec's own evidence the
587
587
  * shape is right, and no integrator has asked for live-follow yet.
588
588
  */
589
- selectTransient(e, t) {
590
- this.sendMutation([{ name: e, value: t }], !1, !0);
589
+ selectTransient(t, e) {
590
+ this.sendMutation([{ name: t, value: e }], !1, !0);
591
591
  }
592
- getValues(e) {
593
- return this.registry?.get(e)?.getValues() ?? [];
592
+ getValues(t) {
593
+ return this.registry?.get(t)?.getValues() ?? [];
594
594
  }
595
- getValue(e, t) {
596
- return this.registry?.get(e)?.getValue(t);
595
+ getValue(t, e) {
596
+ return this.registry?.get(t)?.getValue(e);
597
597
  }
598
598
  /**
599
599
  * Register onChange callback for an attribute.
600
600
  * Buffers the callback if the mapping hasn't arrived yet.
601
601
  */
602
- onChange(e, t) {
602
+ onChange(t, e) {
603
603
  if (this.registry === void 0) {
604
- this.pendingCallbacks.push({ name: e, callback: t });
604
+ this.pendingCallbacks.push({ name: t, callback: e });
605
605
  return;
606
606
  }
607
- const i = this.registry.get(e);
607
+ const i = this.registry.get(t);
608
608
  if (i === void 0) {
609
- C.warn(`onChange: attribute "${e}" not found — callback will not fire`);
609
+ C.warn(`onChange: attribute "${t}" not found — callback will not fire`);
610
610
  return;
611
611
  }
612
- i.onChange(t);
612
+ i.onChange(e);
613
613
  }
614
- getAttribute(e) {
615
- return this.registry?.get(e);
614
+ getAttribute(t) {
615
+ return this.registry?.get(t);
616
616
  }
617
617
  /** The current selection as attribute name→value pairs, empty before the mapping arrives. */
618
618
  getSelection() {
619
619
  return this.registry?.getSelection() ?? {};
620
620
  }
621
- sendMutation(e, t, i = !1) {
622
- const s = {
621
+ sendMutation(t, e, i = !1) {
622
+ const o = {
623
623
  type: c.MUTATION,
624
624
  instance: this.instance,
625
- mutations: e,
626
- isInitial: t,
625
+ mutations: t,
626
+ isInitial: e,
627
627
  ...i && { transient: !0 }
628
628
  };
629
- this.send(s);
629
+ this.send(o);
630
630
  }
631
631
  replayPendingCallbacks() {
632
- for (const { name: e, callback: t } of this.pendingCallbacks) {
633
- const i = this.registry?.get(e);
634
- i === void 0 && C.warn(`onChange: attribute "${e}" not found — buffered callback will not fire`), i?.onChange(t);
632
+ for (const { name: t, callback: e } of this.pendingCallbacks) {
633
+ const i = this.registry?.get(t);
634
+ i === void 0 && C.warn(`onChange: attribute "${t}" not found — buffered callback will not fire`), i?.onChange(e);
635
635
  }
636
636
  this.pendingCallbacks.length = 0;
637
637
  }
638
638
  }
639
- class ft {
639
+ class fe {
640
640
  snapshot;
641
641
  callbacks = [];
642
- handleSnapshot(e) {
643
- this.snapshot = e.attributes;
644
- for (const t of this.callbacks)
645
- t(e.attributes);
642
+ handleSnapshot(t) {
643
+ this.snapshot = t.attributes;
644
+ for (const e of this.callbacks)
645
+ e(t.attributes);
646
646
  }
647
- onChange(e) {
648
- this.callbacks.push(e), this.snapshot !== void 0 && e(this.snapshot);
647
+ onChange(t) {
648
+ this.callbacks.push(t), this.snapshot !== void 0 && t(this.snapshot);
649
649
  }
650
650
  /** The selectable values for one attribute, or null when unrestricted. */
651
- selectableFor(e) {
652
- return this.snapshot?.find((i) => i.name === e)?.selectable ?? null;
651
+ selectableFor(t) {
652
+ return this.snapshot?.find((i) => i.name === t)?.selectable ?? null;
653
653
  }
654
654
  /** The latest snapshot; empty before the viewer has reported anything. */
655
655
  get current() {
656
656
  return this.snapshot ?? [];
657
657
  }
658
658
  }
659
- let gt = class {
660
- constructor(e) {
661
- this.send = e;
659
+ let ge = class {
660
+ constructor(t) {
661
+ this.send = t;
662
662
  }
663
663
  send;
664
664
  commands = [];
@@ -667,24 +667,24 @@ let gt = class {
667
667
  * @param degrees - Absolute rotation in degrees (0 = front view)
668
668
  * @throws VirtualdisplayError if value is not a finite number
669
669
  */
670
- rotate(e) {
671
- return this.validateFiniteNumber(e, "rotate"), this.commands.push({ action: "rotate", value: e }), this;
670
+ rotate(t) {
671
+ return this.validateFiniteNumber(t, "rotate"), this.commands.push({ action: "rotate", value: t }), this;
672
672
  }
673
673
  /**
674
674
  * Tilt camera vertically
675
675
  * @param degrees - Absolute tilt in degrees (0 = top view, 90 = horizontal)
676
676
  * @throws VirtualdisplayError if value is not a finite number
677
677
  */
678
- tilt(e) {
679
- return this.validateFiniteNumber(e, "tilt"), this.commands.push({ action: "tilt", value: e }), this;
678
+ tilt(t) {
679
+ return this.validateFiniteNumber(t, "tilt"), this.commands.push({ action: "tilt", value: t }), this;
680
680
  }
681
681
  /**
682
682
  * Zoom camera
683
683
  * @param percentage - Zoom percentage (100 = normal, >100 = zoom in, <100 = zoom out)
684
684
  * @throws VirtualdisplayError if value is not a finite number
685
685
  */
686
- zoom(e) {
687
- return this.validateFiniteNumber(e, "zoom"), this.commands.push({ action: "zoom", value: e }), this;
686
+ zoom(t) {
687
+ return this.validateFiniteNumber(t, "zoom"), this.commands.push({ action: "zoom", value: t }), this;
688
688
  }
689
689
  /**
690
690
  * Execute accumulated camera commands
@@ -692,19 +692,19 @@ let gt = class {
692
692
  */
693
693
  set() {
694
694
  if (this.commands.length === 0)
695
- throw g.invalidParameter(
695
+ throw y.invalidParameter(
696
696
  "No camera commands to execute. Call rotate(), tilt(), or zoom() before set()."
697
697
  );
698
- const e = {
698
+ const t = {
699
699
  type: c.CAMERA,
700
700
  commands: this.commands
701
701
  };
702
- this.send(e), this.commands = [];
702
+ this.send(t), this.commands = [];
703
703
  }
704
- validateFiniteNumber(e, t) {
705
- if (!Number.isFinite(e))
706
- throw g.invalidParameter(
707
- `${t}() requires a finite number, got ${String(e)}`
704
+ validateFiniteNumber(t, e) {
705
+ if (!Number.isFinite(t))
706
+ throw y.invalidParameter(
707
+ `${e}() requires a finite number, got ${String(t)}`
708
708
  );
709
709
  }
710
710
  /**
@@ -712,14 +712,14 @@ let gt = class {
712
712
  * This is not chainable and executes immediately
713
713
  */
714
714
  reset() {
715
- const e = {
715
+ const t = {
716
716
  type: c.CAMERA,
717
717
  commands: [{ action: "reset" }]
718
718
  };
719
- this.send(e);
719
+ this.send(t);
720
720
  }
721
721
  };
722
- class bt {
722
+ class be {
723
723
  state;
724
724
  limitsState;
725
725
  changeCallbacks = [];
@@ -753,8 +753,8 @@ class bt {
753
753
  * Also fires when limits are applied via applyLimits() so components
754
754
  * can re-evaluate disabled states without a separate callback.
755
755
  */
756
- onChange(e) {
757
- this.changeCallbacks.push(e);
756
+ onChange(t) {
757
+ this.changeCallbacks.push(t);
758
758
  }
759
759
  /**
760
760
  * Current camera movement limits (set from CONFIG message).
@@ -767,62 +767,62 @@ class bt {
767
767
  * Apply camera limits received from the server CONFIG message.
768
768
  * Fires onChange callbacks so button disabled states update immediately.
769
769
  */
770
- applyLimits(e) {
771
- this.limitsState = e;
772
- const t = { rotation: this.rotation, tilt: this.tilt, zoom: this.zoom };
770
+ applyLimits(t) {
771
+ this.limitsState = t;
772
+ const e = { rotation: this.rotation, tilt: this.tilt, zoom: this.zoom };
773
773
  for (const i of this.changeCallbacks)
774
- i(t);
774
+ i(e);
775
775
  }
776
776
  /**
777
777
  * Handle incoming camera position message from server
778
778
  */
779
- handlePositionUpdate(e) {
780
- this.update(e.transforms);
779
+ handlePositionUpdate(t) {
780
+ this.update(t.transforms);
781
781
  }
782
782
  /**
783
783
  * Update camera position from server transforms
784
784
  */
785
- update(e) {
786
- let t = !1;
787
- for (const i of e)
785
+ update(t) {
786
+ let e = !1;
787
+ for (const i of t)
788
788
  switch (i.type) {
789
789
  case "rotation":
790
- this.state.rotation = i.value, t = !0;
790
+ this.state.rotation = i.value, e = !0;
791
791
  break;
792
792
  case "tilt":
793
- this.state.tilt = i.value, t = !0;
793
+ this.state.tilt = i.value, e = !0;
794
794
  break;
795
795
  case "zoom":
796
- this.state.zoom = i.value, t = !0;
796
+ this.state.zoom = i.value, e = !0;
797
797
  break;
798
798
  }
799
- if (t) {
799
+ if (e) {
800
800
  const i = {
801
801
  rotation: this.rotation,
802
802
  tilt: this.tilt,
803
803
  zoom: this.zoom
804
804
  };
805
- for (const s of this.changeCallbacks)
806
- s(i);
805
+ for (const o of this.changeCallbacks)
806
+ o(i);
807
807
  }
808
808
  }
809
809
  }
810
- function vt(n, e) {
811
- const t = n.filter((o) => yt(o, e));
812
- if (t.length === 0)
810
+ function ve(n, t) {
811
+ const e = n.filter((s) => ye(s, t));
812
+ if (e.length === 0)
813
813
  return;
814
- const i = Math.max(...t.map(ie)), s = t.filter((o) => ie(o) === i);
815
- return s.length === 1 ? s[0] : void 0;
814
+ const i = Math.max(...e.map(it)), o = e.filter((s) => it(s) === i);
815
+ return o.length === 1 ? o[0] : void 0;
816
816
  }
817
- function yt(n, e) {
818
- return Object.entries(n.attributes).every(([t, i]) => e[t] === i);
817
+ function ye(n, t) {
818
+ return Object.entries(n.attributes).every(([e, i]) => t[e] === i);
819
819
  }
820
- function ie(n) {
820
+ function it(n) {
821
821
  return Object.keys(n.attributes).length;
822
822
  }
823
- class St {
824
- constructor(e, t) {
825
- this.dispatchChange = e, this.dispatchSubmit = t;
823
+ class Se {
824
+ constructor(t, e) {
825
+ this.dispatchChange = t, this.dispatchSubmit = e;
826
826
  }
827
827
  dispatchChange;
828
828
  dispatchSubmit;
@@ -847,9 +847,9 @@ class St {
847
847
  * it says, so the CTA does not render.
848
848
  */
849
849
  get buttonLabel() {
850
- const e = this.pricing?.buttonLabel;
851
- if (e != null && e !== "")
852
- return e;
850
+ const t = this.pricing?.buttonLabel;
851
+ if (t != null && t !== "")
852
+ return t;
853
853
  if (this.submitDefaultLabel !== void 0 && this.submitDefaultLabel !== "")
854
854
  return this.submitDefaultLabel;
855
855
  }
@@ -874,16 +874,16 @@ class St {
874
874
  * Subscribe to configuration changes. Fires after every selection change with
875
875
  * the resolved configuration, including undefined when nothing matches.
876
876
  */
877
- onChange(e) {
878
- this.changeCallbacks.push(e);
877
+ onChange(t) {
878
+ this.changeCallbacks.push(t);
879
879
  }
880
880
  /**
881
881
  * Register the submit handler the CTA hands the configuration to. Registering
882
882
  * one is what switches the button on (capability driven). `defaultLabel` fills
883
883
  * in when the customer authored no button label.
884
884
  */
885
- onSubmit(e, t) {
886
- this.submitCallback = e, this.submitDefaultLabel = t?.defaultLabel, this.notifyRender();
885
+ onSubmit(t, e) {
886
+ this.submitCallback = t, this.submitDefaultLabel = e?.defaultLabel, this.notifyRender();
887
887
  }
888
888
  /**
889
889
  * Subscribe the built-in UI to re-render the price + CTA. Fires on every
@@ -891,10 +891,10 @@ class St {
891
891
  * on without a configuration change). Separate from `onChange`, which stays the
892
892
  * host-facing, mutation-driven contract. Returns a disposer.
893
893
  */
894
- onRender(e) {
895
- return this.renderCallbacks.push(e), () => {
896
- const t = this.renderCallbacks.indexOf(e);
897
- t !== -1 && this.renderCallbacks.splice(t, 1);
894
+ onRender(t) {
895
+ return this.renderCallbacks.push(t), () => {
896
+ const e = this.renderCallbacks.indexOf(t);
897
+ e !== -1 && this.renderCallbacks.splice(e, 1);
898
898
  };
899
899
  }
900
900
  /**
@@ -906,44 +906,44 @@ class St {
906
906
  async submit() {
907
907
  if (!this.submittable)
908
908
  return;
909
- const e = this.resolved !== void 0 ? { attributes: this.resolved.attributes, reference: this.resolved.reference } : { attributes: { ...this.selection }, reference: "" };
910
- this.dispatchSubmit(e), await this.submitCallback?.(e);
909
+ const t = this.resolved !== void 0 ? { attributes: this.resolved.attributes, reference: this.resolved.reference } : { attributes: { ...this.selection }, reference: "" };
910
+ this.dispatchSubmit(t), await this.submitCallback?.(t);
911
911
  }
912
912
  /** Called by the client when a PRICING message arrives from the viewer. */
913
- handlePricingReceived(e) {
914
- this.pricing = e, this.recompute();
913
+ handlePricingReceived(t) {
914
+ this.pricing = t, this.recompute();
915
915
  }
916
916
  /** Called by the client after every mutation result, with the full selection. */
917
- handleSelectionChanged(e) {
918
- this.selection = e, this.recompute();
917
+ handleSelectionChanged(t) {
918
+ this.selection = t, this.recompute();
919
919
  }
920
920
  recompute() {
921
921
  this.resolved = this.resolve();
922
- for (const e of this.changeCallbacks)
923
- e(this.resolved);
922
+ for (const t of this.changeCallbacks)
923
+ t(this.resolved);
924
924
  this.dispatchChange(this.resolved), this.notifyRender();
925
925
  }
926
926
  notifyRender() {
927
- for (const e of this.renderCallbacks)
928
- e();
927
+ for (const t of this.renderCallbacks)
928
+ t();
929
929
  }
930
930
  resolve() {
931
931
  if (this.pricing === void 0)
932
932
  return;
933
- const e = vt(this.pricing.rules, this.selection);
934
- if (!(e === void 0 || e.availability === Le.HIDDEN))
933
+ const t = ve(this.pricing.rules, this.selection);
934
+ if (!(t === void 0 || t.availability === Ot.HIDDEN))
935
935
  return {
936
936
  attributes: { ...this.selection },
937
- reference: e.reference,
938
- price: e.priceCents,
937
+ reference: t.reference,
938
+ price: t.priceCents,
939
939
  currency: this.pricing.currency,
940
- availability: e.availability
940
+ availability: t.availability
941
941
  };
942
942
  }
943
943
  }
944
- class wt {
945
- constructor(e, t, i) {
946
- this.send = e, this.dispatch = t, this.instance = i;
944
+ class we {
945
+ constructor(t, e, i) {
946
+ this.send = t, this.dispatch = e, this.instance = i;
947
947
  }
948
948
  send;
949
949
  dispatch;
@@ -959,41 +959,41 @@ class wt {
959
959
  * Focus a component by name. Sends a focus message to the viewer.
960
960
  * @throws VirtualdisplayError if component is not a non-empty string
961
961
  */
962
- set(e) {
963
- if (typeof e != "string" || e.length === 0)
964
- throw g.invalidParameter(
965
- `set() requires a non-empty component name, got ${String(e)}`
962
+ set(t) {
963
+ if (typeof t != "string" || t.length === 0)
964
+ throw y.invalidParameter(
965
+ `set() requires a non-empty component name, got ${String(t)}`
966
966
  );
967
967
  this.send({
968
968
  type: c.FOCUS,
969
969
  instance: this.instance,
970
- action: te.FOCUS,
971
- component: e
970
+ action: et.FOCUS,
971
+ component: t
972
972
  });
973
973
  }
974
974
  /** Return to the overview — unfocus the current component. */
975
975
  clear() {
976
- this.send({ type: c.FOCUS, instance: this.instance, action: te.UNFOCUS });
976
+ this.send({ type: c.FOCUS, instance: this.instance, action: et.UNFOCUS });
977
977
  }
978
978
  /**
979
979
  * Subscribe to focus changes. The callback fires with the focus state when a
980
980
  * component is focused, and with null when returning to overview.
981
981
  */
982
- onChange(e) {
983
- this.changeCallbacks.push(e);
982
+ onChange(t) {
983
+ this.changeCallbacks.push(t);
984
984
  }
985
985
  /** Called by the client when a FocusStateMessage is received from the viewer. */
986
- handleStateReceived(e) {
987
- e.state === Ie.FOCUSED && e.component !== void 0 ? (this.focused = e.component, this.attributes = e.attributes ?? []) : (this.focused = null, this.attributes = []);
988
- const t = this.focused !== null ? { component: this.focused, attributes: this.attributes } : null;
986
+ handleStateReceived(t) {
987
+ t.state === It.FOCUSED && t.component !== void 0 ? (this.focused = t.component, this.attributes = t.attributes ?? []) : (this.focused = null, this.attributes = []);
988
+ const e = this.focused !== null ? { component: this.focused, attributes: this.attributes } : null;
989
989
  for (const i of this.changeCallbacks)
990
- i(t);
991
- this.dispatch(t);
990
+ i(e);
991
+ this.dispatch(e);
992
992
  }
993
993
  }
994
- class Ct {
995
- constructor(e) {
996
- this.filename = e;
994
+ class Ce {
995
+ constructor(t) {
996
+ this.filename = t;
997
997
  }
998
998
  filename;
999
999
  developedCallbacks = /* @__PURE__ */ new Set();
@@ -1008,8 +1008,8 @@ class Ct {
1008
1008
  * @param callback Function to call with photo data
1009
1009
  * @returns This Photo instance for chaining
1010
1010
  */
1011
- onDeveloped(e) {
1012
- return this.developed && this.photoData !== null ? (e(this.photoData), this) : (this.developedCallbacks.add(e), this);
1011
+ onDeveloped(t) {
1012
+ return this.developed && this.photoData !== null ? (t(this.photoData), this) : (this.developedCallbacks.add(t), this);
1013
1013
  }
1014
1014
  /**
1015
1015
  * Register a callback for when the photo capture fails
@@ -1017,8 +1017,8 @@ class Ct {
1017
1017
  * @param callback Function to call with error
1018
1018
  * @returns This Photo instance for chaining
1019
1019
  */
1020
- onError(e) {
1021
- return this.errorCallbacks.add(e), this;
1020
+ onError(t) {
1021
+ return this.errorCallbacks.add(t), this;
1022
1022
  }
1023
1023
  /**
1024
1024
  * Get the filename for this photo
@@ -1030,24 +1030,24 @@ class Ct {
1030
1030
  * Mark the photo as developed and notify all callbacks
1031
1031
  * This method is called by Snapshot when the photo data arrives from the server
1032
1032
  */
1033
- develop(e) {
1034
- this.developed || this.failed || (this.photoData = e, this.developed = !0, this.developedCallbacks.forEach((t) => {
1035
- t(this.photoData);
1033
+ develop(t) {
1034
+ this.developed || this.failed || (this.photoData = t, this.developed = !0, this.developedCallbacks.forEach((e) => {
1035
+ e(this.photoData);
1036
1036
  }), this.developedCallbacks.clear(), this.errorCallbacks.clear());
1037
1037
  }
1038
1038
  /**
1039
1039
  * Mark the photo as failed and notify error callbacks
1040
1040
  */
1041
- fail(e) {
1042
- this.developed || this.failed || (this.failed = !0, this.errorCallbacks.forEach((t) => {
1043
- t(e);
1041
+ fail(t) {
1042
+ this.developed || this.failed || (this.failed = !0, this.errorCallbacks.forEach((e) => {
1043
+ e(t);
1044
1044
  }), this.developedCallbacks.clear(), this.errorCallbacks.clear());
1045
1045
  }
1046
1046
  }
1047
- const se = 3e4;
1048
- class kt {
1049
- constructor(e) {
1050
- this.send = e;
1047
+ const ot = 3e4;
1048
+ class _e {
1049
+ constructor(t) {
1050
+ this.send = t;
1051
1051
  }
1052
1052
  send;
1053
1053
  validExtensions = [".png"];
@@ -1059,39 +1059,39 @@ class kt {
1059
1059
  * @returns Photo object for registering callbacks
1060
1060
  * @throws VirtualdisplayError if filename is invalid
1061
1061
  */
1062
- take(e) {
1063
- this.validateFilename(e), C.debug("Taking snapshot", { filename: e });
1064
- const t = new Ct(e), i = setTimeout(() => {
1065
- this.pendingPhotos.delete(e), C.warn("Snapshot timed out", { filename: e }), t.fail(new g(
1066
- `Snapshot timed out: the viewer did not respond within ${se}ms`,
1062
+ take(t) {
1063
+ this.validateFilename(t), C.debug("Taking snapshot", { filename: t });
1064
+ const e = new Ce(t), i = setTimeout(() => {
1065
+ this.pendingPhotos.delete(t), C.warn("Snapshot timed out", { filename: t }), e.fail(new y(
1066
+ `Snapshot timed out: the viewer did not respond within ${ot}ms`,
1067
1067
  A.SNAPSHOT_FAILED
1068
1068
  ));
1069
- }, se);
1070
- return this.pendingPhotos.set(e, { photo: t, timeout: i }), this.send({
1069
+ }, ot);
1070
+ return this.pendingPhotos.set(t, { photo: e, timeout: i }), this.send({
1071
1071
  type: c.SNAPSHOT,
1072
- filename: e
1073
- }), t;
1072
+ filename: t
1073
+ }), e;
1074
1074
  }
1075
1075
  /**
1076
1076
  * Handle incoming snapshot result from server
1077
1077
  * Matches the message to a pending photo by filename, then develops or fails it
1078
1078
  */
1079
- handleSnapshotResult(e) {
1080
- const t = this.pendingPhotos.get(e.filename);
1081
- if (t === void 0) {
1079
+ handleSnapshotResult(t) {
1080
+ const e = this.pendingPhotos.get(t.filename);
1081
+ if (e === void 0) {
1082
1082
  C.warn("No pending photo found for filename", {
1083
- filename: e.filename,
1083
+ filename: t.filename,
1084
1084
  pendingFilenames: Array.from(this.pendingPhotos.keys())
1085
1085
  });
1086
1086
  return;
1087
1087
  }
1088
- clearTimeout(t.timeout), this.pendingPhotos.delete(e.filename);
1089
- const { photo: i } = t;
1090
- if (e.error !== void 0) {
1091
- i.fail(new g(e.error, A.SNAPSHOT_FAILED));
1088
+ clearTimeout(e.timeout), this.pendingPhotos.delete(t.filename);
1089
+ const { photo: i } = e;
1090
+ if (t.error !== void 0) {
1091
+ i.fail(new y(t.error, A.SNAPSHOT_FAILED));
1092
1092
  return;
1093
1093
  }
1094
- e.data !== void 0 && i.develop({ filename: e.filename, data: e.data });
1094
+ t.data !== void 0 && i.develop({ filename: t.filename, data: t.data });
1095
1095
  }
1096
1096
  /**
1097
1097
  * Fail any pending photos and forget them. Called from client destroy
@@ -1101,664 +1101,688 @@ class kt {
1101
1101
  clear() {
1102
1102
  if (this.pendingPhotos.size === 0)
1103
1103
  return;
1104
- const e = new g(
1104
+ const t = new y(
1105
1105
  "Client destroyed before snapshot completed",
1106
1106
  A.SNAPSHOT_FAILED
1107
1107
  );
1108
- for (const { photo: t, timeout: i } of this.pendingPhotos.values())
1109
- clearTimeout(i), t.fail(e);
1108
+ for (const { photo: e, timeout: i } of this.pendingPhotos.values())
1109
+ clearTimeout(i), e.fail(t);
1110
1110
  this.pendingPhotos.clear();
1111
1111
  }
1112
1112
  /**
1113
1113
  * Validate filename has a valid image extension
1114
1114
  */
1115
- validateFilename(e) {
1116
- if (e === "" || typeof e != "string")
1117
- throw new g(
1115
+ validateFilename(t) {
1116
+ if (t === "" || typeof t != "string")
1117
+ throw new y(
1118
1118
  "Filename must be a non-empty string",
1119
1119
  A.INVALID_PARAMETER
1120
1120
  );
1121
1121
  if (!this.validExtensions.some(
1122
- (i) => e.toLowerCase().endsWith(i)
1122
+ (i) => t.toLowerCase().endsWith(i)
1123
1123
  ))
1124
- throw new g(
1125
- `Invalid filename: "${e}". Filename must end with one of: ${this.validExtensions.join(", ")}`,
1124
+ throw new y(
1125
+ `Invalid filename: "${t}". Filename must end with one of: ${this.validExtensions.join(", ")}`,
1126
1126
  A.INVALID_PARAMETER
1127
1127
  );
1128
- if (e.includes("..") || e.includes("/") || e.includes("\\"))
1129
- throw new g(
1128
+ if (t.includes("..") || t.includes("/") || t.includes("\\"))
1129
+ throw new y(
1130
1130
  'Filename cannot contain path separators or ".."',
1131
1131
  A.INVALID_PARAMETER
1132
1132
  );
1133
1133
  }
1134
1134
  }
1135
- class _t {
1135
+ class ke {
1136
1136
  container = null;
1137
- attach(e) {
1138
- this.container = e;
1137
+ attach(t) {
1138
+ this.container = t;
1139
1139
  }
1140
- dispatch(e, t, i = !1) {
1141
- const s = new CustomEvent(e, { detail: t, cancelable: i });
1142
- return this.container?.dispatchEvent(s), s;
1140
+ dispatch(t, e, i = !1) {
1141
+ const o = new CustomEvent(t, { detail: e, cancelable: i });
1142
+ return this.container?.dispatchEvent(o), o;
1143
1143
  }
1144
- on(e, t) {
1145
- const i = (s) => {
1146
- const o = s, r = { ...o.detail, preventDefault: () => {
1147
- o.preventDefault();
1144
+ on(t, e) {
1145
+ const i = (o) => {
1146
+ const s = o, r = { ...s.detail, preventDefault: () => {
1147
+ s.preventDefault();
1148
1148
  } };
1149
- t(r);
1149
+ e(r);
1150
1150
  };
1151
- return this.container?.addEventListener(e, i), () => {
1152
- this.container?.removeEventListener(e, i);
1151
+ return this.container?.addEventListener(t, i), () => {
1152
+ this.container?.removeEventListener(t, i);
1153
1153
  };
1154
1154
  }
1155
1155
  }
1156
- const At = {}, Et = "en", Se = (
1156
+ const Ae = {}, Ee = "en", St = (
1157
1157
  /** @type {const} */
1158
1158
  ["en", "nl", "de"]
1159
1159
  ), X = [
1160
1160
  "baseLocale"
1161
- ], oe = [], Q = typeof window > "u";
1161
+ ], st = [], Q = typeof window > "u";
1162
1162
  globalThis.__paraglide = /** @type {any} */
1163
1163
  globalThis.__paraglide ?? {};
1164
1164
  globalThis.__paraglide.ssr = /** @type {any} */
1165
1165
  globalThis.__paraglide.ssr ?? {};
1166
- let re = !1, m = () => {
1166
+ let rt = !1, p = () => {
1167
1167
  let n = X;
1168
- !Q && typeof window < "u" && window.location?.href && (n = Ce(window.location.href));
1169
- const e = xt(n);
1170
- if (e)
1171
- return re || (re = !0, we(e, { reload: !1 })), e;
1168
+ !Q && typeof window < "u" && window.location?.href && (n = Ct(window.location.href));
1169
+ const t = xe(n);
1170
+ if (t)
1171
+ return rt || (rt = !0, wt(t, { reload: !1 })), t;
1172
1172
  throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found");
1173
1173
  };
1174
- function xt(n, e) {
1175
- let t;
1174
+ function xe(n, t) {
1175
+ let e;
1176
1176
  for (const i of n) {
1177
1177
  if (i === "baseLocale")
1178
- t = Et;
1179
- else if (ke(i) && M.has(i)) {
1180
- const o = M.get(i);
1181
- if (o) {
1182
- const r = o.getLocale();
1178
+ e = Ee;
1179
+ else if (_t(i) && z.has(i)) {
1180
+ const s = z.get(i);
1181
+ if (s) {
1182
+ const r = s.getLocale();
1183
1183
  if (r instanceof Promise)
1184
1184
  continue;
1185
1185
  if (r !== void 0)
1186
- return It(r);
1186
+ return Ie(r);
1187
1187
  }
1188
1188
  }
1189
- const s = J(t);
1190
- if (s)
1191
- return s;
1189
+ const o = J(e);
1190
+ if (o)
1191
+ return o;
1192
1192
  }
1193
1193
  }
1194
- const Tt = (n) => {
1194
+ const Te = (n) => {
1195
1195
  window.location.reload();
1196
1196
  };
1197
- let we = (n, e) => {
1198
- const t = {
1197
+ let wt = (n, t) => {
1198
+ const e = {
1199
1199
  reload: !0,
1200
- ...e
1200
+ ...t
1201
1201
  };
1202
1202
  let i;
1203
1203
  try {
1204
- i = m();
1204
+ i = p();
1205
1205
  } catch {
1206
1206
  }
1207
- const s = [];
1208
- let o = X;
1209
- !Q && typeof window < "u" && window.location?.href && (o = Ce(window.location.href));
1210
- for (const a of o)
1211
- if (a !== "baseLocale" && ke(a) && M.has(a)) {
1212
- const u = M.get(a);
1207
+ const o = [];
1208
+ let s = X;
1209
+ !Q && typeof window < "u" && window.location?.href && (s = Ct(window.location.href));
1210
+ for (const a of s)
1211
+ if (a !== "baseLocale" && _t(a) && z.has(a)) {
1212
+ const u = z.get(a);
1213
1213
  if (u) {
1214
1214
  let d = u.setLocale(n);
1215
1215
  d instanceof Promise && (d = d.catch((f) => {
1216
1216
  throw new Error(`Custom strategy "${a}" setLocale failed.`, {
1217
1217
  cause: f
1218
1218
  });
1219
- }), s.push(d));
1219
+ }), o.push(d));
1220
1220
  }
1221
1221
  }
1222
1222
  const r = () => {
1223
- !Q && t.reload && window.location && n !== i && Tt();
1223
+ !Q && e.reload && window.location && n !== i && Te();
1224
1224
  };
1225
- if (s.length)
1226
- return Promise.all(s).then(() => {
1225
+ if (o.length)
1226
+ return Promise.all(o).then(() => {
1227
1227
  r();
1228
1228
  });
1229
1229
  r();
1230
- }, Rt = () => typeof window < "u" ? window.location.origin : "http://fallback.com";
1230
+ }, Re = () => typeof window < "u" ? window.location.origin : "http://fallback.com";
1231
1231
  function J(n) {
1232
1232
  if (typeof n != "string")
1233
1233
  return;
1234
- const e = n.toLowerCase();
1235
- for (const t of Se)
1236
- if (t.toLowerCase() === e)
1237
- return t;
1234
+ const t = n.toLowerCase();
1235
+ for (const e of St)
1236
+ if (e.toLowerCase() === t)
1237
+ return e;
1238
1238
  }
1239
- function It(n) {
1240
- const e = J(n);
1241
- if (e)
1242
- return e;
1243
- throw new Error(`Invalid locale: ${n}. Expected one of: ${Se.join(", ")}`);
1239
+ function Ie(n) {
1240
+ const t = J(n);
1241
+ if (t)
1242
+ return t;
1243
+ throw new Error(`Invalid locale: ${n}. Expected one of: ${St.join(", ")}`);
1244
1244
  }
1245
- function Lt(n) {
1246
- return Ot(n);
1245
+ function Oe(n) {
1246
+ return Le(n);
1247
1247
  }
1248
- function Ot(n) {
1249
- const e = typeof n == "string" ? new URL(n, Rt()) : new URL(n), t = e.pathname.split("/").filter(Boolean);
1250
- return t.length > 0 && J(t[0]) && (e.pathname = "/" + t.slice(1).join("/")), e;
1248
+ function Le(n) {
1249
+ const t = typeof n == "string" ? new URL(n, Re()) : new URL(n), e = t.pathname.split("/").filter(Boolean);
1250
+ return e.length > 0 && J(e[0]) && (t.pathname = "/" + e.slice(1).join("/")), t;
1251
1251
  }
1252
- let ae, le;
1253
- function Nt(n) {
1254
- if (oe.length === 0)
1252
+ let at, lt;
1253
+ function Me(n) {
1254
+ if (st.length === 0)
1255
1255
  return;
1256
- const e = typeof n == "string" ? n : n.href;
1257
- if (ae === e)
1258
- return le;
1259
- const t = new URL(e, "http://example.com"), i = Lt(t), s = i.href === t.href ? [t] : [t, i];
1260
- let o;
1261
- for (const r of s) {
1262
- for (const a of oe)
1263
- if (new At(a.match, r.href).exec(r.href)) {
1264
- o = a;
1256
+ const t = typeof n == "string" ? n : n.href;
1257
+ if (at === t)
1258
+ return lt;
1259
+ const e = new URL(t, "http://example.com"), i = Oe(e), o = i.href === e.href ? [e] : [e, i];
1260
+ let s;
1261
+ for (const r of o) {
1262
+ for (const a of st)
1263
+ if (new Ae(a.match, r.href).exec(r.href)) {
1264
+ s = a;
1265
1265
  break;
1266
1266
  }
1267
- if (o)
1267
+ if (s)
1268
1268
  break;
1269
1269
  }
1270
- return ae = e, le = o, o;
1270
+ return at = t, lt = s, s;
1271
1271
  }
1272
- function Ce(n) {
1273
- const e = Nt(n);
1274
- return e && e.exclude !== !0 && Array.isArray(e.strategy) ? e.strategy : X;
1272
+ function Ct(n) {
1273
+ const t = Me(n);
1274
+ return t && t.exclude !== !0 && Array.isArray(t.strategy) ? t.strategy : X;
1275
1275
  }
1276
- const M = /* @__PURE__ */ new Map();
1277
- function ke(n) {
1276
+ const z = /* @__PURE__ */ new Map();
1277
+ function _t(n) {
1278
1278
  return typeof n == "string" && /^custom-[A-Za-z0-9_-]+$/.test(n);
1279
1279
  }
1280
- const Mt = (
1280
+ const Ne = (
1281
1281
  /** @type {(inputs: Controls_Ar_Buttonlabel1Inputs) => LocalizedString} */
1282
1282
  () => (
1283
1283
  /** @type {LocalizedString} */
1284
1284
  "Activate AR"
1285
1285
  )
1286
- ), zt = (
1286
+ ), ze = (
1287
1287
  /** @type {(inputs: Controls_Ar_Buttonlabel1Inputs) => LocalizedString} */
1288
1288
  () => (
1289
1289
  /** @type {LocalizedString} */
1290
1290
  "AR activeren"
1291
1291
  )
1292
- ), Pt = (
1292
+ ), Pe = (
1293
1293
  /** @type {(inputs: Controls_Ar_Buttonlabel1Inputs) => LocalizedString} */
1294
1294
  () => (
1295
1295
  /** @type {LocalizedString} */
1296
1296
  "AR aktivieren"
1297
1297
  )
1298
- ), Ft = (
1298
+ ), Fe = (
1299
1299
  /** @type {((inputs?: Controls_Ar_Buttonlabel1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Ar_Buttonlabel1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1300
- ((n = {}, e = {}) => {
1301
- const t = e.locale ?? m();
1302
- return t === "nl" ? zt() : t === "de" ? Pt() : Mt();
1300
+ ((n = {}, t = {}) => {
1301
+ const e = t.locale ?? p();
1302
+ return e === "nl" ? ze() : e === "de" ? Pe() : Ne();
1303
1303
  })
1304
- ), Dt = (
1304
+ ), De = (
1305
1305
  /** @type {(inputs: Controls_Qr_Modaltitle1Inputs) => LocalizedString} */
1306
1306
  () => (
1307
1307
  /** @type {LocalizedString} */
1308
1308
  "Scan to view in AR"
1309
1309
  )
1310
- ), $t = (
1310
+ ), $e = (
1311
1311
  /** @type {(inputs: Controls_Qr_Modaltitle1Inputs) => LocalizedString} */
1312
1312
  () => (
1313
1313
  /** @type {LocalizedString} */
1314
1314
  "Scan om in AR te bekijken"
1315
1315
  )
1316
- ), Ut = (
1316
+ ), Be = (
1317
1317
  /** @type {(inputs: Controls_Qr_Modaltitle1Inputs) => LocalizedString} */
1318
1318
  () => (
1319
1319
  /** @type {LocalizedString} */
1320
1320
  "Scannen für AR-Ansicht"
1321
1321
  )
1322
- ), Bt = (
1322
+ ), Ue = (
1323
1323
  /** @type {((inputs?: Controls_Qr_Modaltitle1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Qr_Modaltitle1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1324
- ((n = {}, e = {}) => {
1325
- const t = e.locale ?? m();
1326
- return t === "nl" ? $t() : t === "de" ? Ut() : Dt();
1324
+ ((n = {}, t = {}) => {
1325
+ const e = t.locale ?? p();
1326
+ return e === "nl" ? $e() : e === "de" ? Be() : De();
1327
1327
  })
1328
- ), Vt = (
1328
+ ), Ve = (
1329
1329
  /** @type {(inputs: Controls_Qr_Modaldescription1Inputs) => LocalizedString} */
1330
1330
  () => (
1331
1331
  /** @type {LocalizedString} */
1332
1332
  "Use your smartphone camera to scan this QR code"
1333
1333
  )
1334
- ), jt = (
1334
+ ), je = (
1335
1335
  /** @type {(inputs: Controls_Qr_Modaldescription1Inputs) => LocalizedString} */
1336
1336
  () => (
1337
1337
  /** @type {LocalizedString} */
1338
1338
  "Gebruik de camera van je smartphone om deze QR-code te scannen"
1339
1339
  )
1340
- ), Ht = (
1340
+ ), He = (
1341
1341
  /** @type {(inputs: Controls_Qr_Modaldescription1Inputs) => LocalizedString} */
1342
1342
  () => (
1343
1343
  /** @type {LocalizedString} */
1344
1344
  "Verwende die Kamera deines Smartphones, um diesen QR-Code zu scannen"
1345
1345
  )
1346
- ), qt = (
1346
+ ), qe = (
1347
1347
  /** @type {((inputs?: Controls_Qr_Modaldescription1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Qr_Modaldescription1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1348
- ((n = {}, e = {}) => {
1349
- const t = e.locale ?? m();
1350
- return t === "nl" ? jt() : t === "de" ? Ht() : Vt();
1348
+ ((n = {}, t = {}) => {
1349
+ const e = t.locale ?? p();
1350
+ return e === "nl" ? je() : e === "de" ? He() : Ve();
1351
1351
  })
1352
- ), Gt = (
1352
+ ), Ge = (
1353
1353
  /** @type {(inputs: Controls_Qr_Modalinstructions1Inputs) => LocalizedString} */
1354
1354
  () => (
1355
1355
  /** @type {LocalizedString} */
1356
1356
  "Your phone will open the 3D model in AR mode."
1357
1357
  )
1358
- ), Zt = (
1358
+ ), Ze = (
1359
1359
  /** @type {(inputs: Controls_Qr_Modalinstructions1Inputs) => LocalizedString} */
1360
1360
  () => (
1361
1361
  /** @type {LocalizedString} */
1362
1362
  "Je telefoon opent het 3D-model in AR-modus."
1363
1363
  )
1364
- ), Wt = (
1364
+ ), We = (
1365
1365
  /** @type {(inputs: Controls_Qr_Modalinstructions1Inputs) => LocalizedString} */
1366
1366
  () => (
1367
1367
  /** @type {LocalizedString} */
1368
1368
  "Dein Telefon öffnet das 3D-Modell im AR-Modus."
1369
1369
  )
1370
- ), Yt = (
1370
+ ), Ye = (
1371
1371
  /** @type {((inputs?: Controls_Qr_Modalinstructions1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Qr_Modalinstructions1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1372
- ((n = {}, e = {}) => {
1373
- const t = e.locale ?? m();
1374
- return t === "nl" ? Zt() : t === "de" ? Wt() : Gt();
1372
+ ((n = {}, t = {}) => {
1373
+ const e = t.locale ?? p();
1374
+ return e === "nl" ? Ze() : e === "de" ? We() : Ge();
1375
1375
  })
1376
- ), Qt = (
1376
+ ), Qe = (
1377
1377
  /** @type {(inputs: Controls_Qr_Closebutton1Inputs) => LocalizedString} */
1378
1378
  () => (
1379
1379
  /** @type {LocalizedString} */
1380
1380
  "Close"
1381
1381
  )
1382
- ), Kt = (
1382
+ ), Ke = (
1383
1383
  /** @type {(inputs: Controls_Qr_Closebutton1Inputs) => LocalizedString} */
1384
1384
  () => (
1385
1385
  /** @type {LocalizedString} */
1386
1386
  "Sluiten"
1387
1387
  )
1388
- ), Xt = (
1388
+ ), Xe = (
1389
1389
  /** @type {(inputs: Controls_Qr_Closebutton1Inputs) => LocalizedString} */
1390
1390
  () => (
1391
1391
  /** @type {LocalizedString} */
1392
1392
  "Schließen"
1393
1393
  )
1394
- ), Jt = (
1394
+ ), Je = (
1395
1395
  /** @type {((inputs?: Controls_Qr_Closebutton1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Qr_Closebutton1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1396
- ((n = {}, e = {}) => {
1397
- const t = e.locale ?? m();
1398
- return t === "nl" ? Kt() : t === "de" ? Xt() : Qt();
1396
+ ((n = {}, t = {}) => {
1397
+ const e = t.locale ?? p();
1398
+ return e === "nl" ? Ke() : e === "de" ? Xe() : Qe();
1399
1399
  })
1400
+ ), tn = (
1401
+ /** @type {(inputs: Controls_Annotations_Buttonlabel1Inputs) => LocalizedString} */
1402
+ () => (
1403
+ /** @type {LocalizedString} */
1404
+ "Annotations"
1405
+ )
1400
1406
  ), en = (
1407
+ /** @type {(inputs: Controls_Annotations_Buttonlabel1Inputs) => LocalizedString} */
1408
+ () => (
1409
+ /** @type {LocalizedString} */
1410
+ "Annotaties"
1411
+ )
1412
+ ), nn = (
1413
+ /** @type {(inputs: Controls_Annotations_Buttonlabel1Inputs) => LocalizedString} */
1414
+ () => (
1415
+ /** @type {LocalizedString} */
1416
+ "Anmerkungen"
1417
+ )
1418
+ ), on = (
1419
+ /** @type {((inputs?: Controls_Annotations_Buttonlabel1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Annotations_Buttonlabel1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1420
+ ((n = {}, t = {}) => {
1421
+ const e = t.locale ?? p();
1422
+ return e === "nl" ? en() : e === "de" ? nn() : tn();
1423
+ })
1424
+ ), sn = (
1401
1425
  /** @type {(inputs: Controls_Fullscreen_Buttonlabel1Inputs) => LocalizedString} */
1402
1426
  () => (
1403
1427
  /** @type {LocalizedString} */
1404
1428
  "Fullscreen"
1405
1429
  )
1406
- ), tn = (
1430
+ ), rn = (
1407
1431
  /** @type {(inputs: Controls_Fullscreen_Buttonlabel1Inputs) => LocalizedString} */
1408
1432
  () => (
1409
1433
  /** @type {LocalizedString} */
1410
1434
  "Volledig scherm"
1411
1435
  )
1412
- ), nn = (
1436
+ ), an = (
1413
1437
  /** @type {(inputs: Controls_Fullscreen_Buttonlabel1Inputs) => LocalizedString} */
1414
1438
  () => (
1415
1439
  /** @type {LocalizedString} */
1416
1440
  "Vollbild"
1417
1441
  )
1418
- ), sn = (
1442
+ ), ln = (
1419
1443
  /** @type {((inputs?: Controls_Fullscreen_Buttonlabel1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Fullscreen_Buttonlabel1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1420
- ((n = {}, e = {}) => {
1421
- const t = e.locale ?? m();
1422
- return t === "nl" ? tn() : t === "de" ? nn() : en();
1444
+ ((n = {}, t = {}) => {
1445
+ const e = t.locale ?? p();
1446
+ return e === "nl" ? rn() : e === "de" ? an() : sn();
1423
1447
  })
1424
- ), on = (
1448
+ ), cn = (
1425
1449
  /** @type {(inputs: Loading_Downloadingshort1Inputs) => LocalizedString} */
1426
1450
  () => (
1427
1451
  /** @type {LocalizedString} */
1428
1452
  "Downloading"
1429
1453
  )
1430
- ), rn = (
1454
+ ), un = (
1431
1455
  /** @type {(inputs: Loading_Downloadingshort1Inputs) => LocalizedString} */
1432
1456
  () => (
1433
1457
  /** @type {LocalizedString} */
1434
1458
  "Downloaden"
1435
1459
  )
1436
- ), an = (
1460
+ ), dn = (
1437
1461
  /** @type {(inputs: Loading_Downloadingshort1Inputs) => LocalizedString} */
1438
1462
  () => (
1439
1463
  /** @type {LocalizedString} */
1440
1464
  "Herunterladen"
1441
1465
  )
1442
- ), ln = (
1466
+ ), hn = (
1443
1467
  /** @type {((inputs?: Loading_Downloadingshort1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Loading_Downloadingshort1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1444
- ((n = {}, e = {}) => {
1445
- const t = e.locale ?? m();
1446
- return t === "nl" ? rn() : t === "de" ? an() : on();
1468
+ ((n = {}, t = {}) => {
1469
+ const e = t.locale ?? p();
1470
+ return e === "nl" ? un() : e === "de" ? dn() : cn();
1447
1471
  })
1448
- ), cn = (
1472
+ ), pn = (
1449
1473
  /** @type {(inputs: Controls_Screenshot_Buttonlabel1Inputs) => LocalizedString} */
1450
1474
  () => (
1451
1475
  /** @type {LocalizedString} */
1452
1476
  "Screenshot"
1453
1477
  )
1454
- ), un = (
1478
+ ), mn = (
1455
1479
  /** @type {(inputs: Controls_Screenshot_Buttonlabel1Inputs) => LocalizedString} */
1456
1480
  () => (
1457
1481
  /** @type {LocalizedString} */
1458
1482
  "Screenshot"
1459
1483
  )
1460
- ), dn = (
1484
+ ), fn = (
1461
1485
  /** @type {(inputs: Controls_Screenshot_Buttonlabel1Inputs) => LocalizedString} */
1462
1486
  () => (
1463
1487
  /** @type {LocalizedString} */
1464
1488
  "Screenshot"
1465
1489
  )
1466
- ), hn = (
1490
+ ), gn = (
1467
1491
  /** @type {((inputs?: Controls_Screenshot_Buttonlabel1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Screenshot_Buttonlabel1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1468
- ((n = {}, e = {}) => {
1469
- const t = e.locale ?? m();
1470
- return t === "nl" ? un() : t === "de" ? dn() : cn();
1492
+ ((n = {}, t = {}) => {
1493
+ const e = t.locale ?? p();
1494
+ return e === "nl" ? mn() : e === "de" ? fn() : pn();
1471
1495
  })
1472
- ), mn = (
1496
+ ), bn = (
1473
1497
  /** @type {(inputs: Controls_Configurator_OpenInputs) => LocalizedString} */
1474
1498
  () => (
1475
1499
  /** @type {LocalizedString} */
1476
1500
  "Configure"
1477
1501
  )
1478
- ), pn = (
1502
+ ), vn = (
1479
1503
  /** @type {(inputs: Controls_Configurator_OpenInputs) => LocalizedString} */
1480
1504
  () => (
1481
1505
  /** @type {LocalizedString} */
1482
1506
  "Configureren"
1483
1507
  )
1484
- ), fn = (
1508
+ ), yn = (
1485
1509
  /** @type {(inputs: Controls_Configurator_OpenInputs) => LocalizedString} */
1486
1510
  () => (
1487
1511
  /** @type {LocalizedString} */
1488
1512
  "Konfigurieren"
1489
1513
  )
1490
- ), gn = (
1514
+ ), Sn = (
1491
1515
  /** @type {((inputs?: Controls_Configurator_OpenInputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Configurator_OpenInputs, { locale?: "en" | "nl" | "de" }, {}>} */
1492
- ((n = {}, e = {}) => {
1493
- const t = e.locale ?? m();
1494
- return t === "nl" ? pn() : t === "de" ? fn() : mn();
1516
+ ((n = {}, t = {}) => {
1517
+ const e = t.locale ?? p();
1518
+ return e === "nl" ? vn() : e === "de" ? yn() : bn();
1495
1519
  })
1496
- ), bn = (
1520
+ ), wn = (
1497
1521
  /** @type {(inputs: Controls_Configurator_CloseInputs) => LocalizedString} */
1498
1522
  () => (
1499
1523
  /** @type {LocalizedString} */
1500
1524
  "Close"
1501
1525
  )
1502
- ), vn = (
1526
+ ), Cn = (
1503
1527
  /** @type {(inputs: Controls_Configurator_CloseInputs) => LocalizedString} */
1504
1528
  () => (
1505
1529
  /** @type {LocalizedString} */
1506
1530
  "Sluiten"
1507
1531
  )
1508
- ), yn = (
1532
+ ), _n = (
1509
1533
  /** @type {(inputs: Controls_Configurator_CloseInputs) => LocalizedString} */
1510
1534
  () => (
1511
1535
  /** @type {LocalizedString} */
1512
1536
  "Schließen"
1513
1537
  )
1514
- ), Sn = (
1538
+ ), kn = (
1515
1539
  /** @type {((inputs?: Controls_Configurator_CloseInputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Configurator_CloseInputs, { locale?: "en" | "nl" | "de" }, {}>} */
1516
- ((n = {}, e = {}) => {
1517
- const t = e.locale ?? m();
1518
- return t === "nl" ? vn() : t === "de" ? yn() : bn();
1540
+ ((n = {}, t = {}) => {
1541
+ const e = t.locale ?? p();
1542
+ return e === "nl" ? Cn() : e === "de" ? _n() : wn();
1519
1543
  })
1520
- ), wn = (
1544
+ ), An = (
1521
1545
  /** @type {(inputs: Controls_Camera_ResetInputs) => LocalizedString} */
1522
1546
  () => (
1523
1547
  /** @type {LocalizedString} */
1524
1548
  "Reset camera"
1525
1549
  )
1526
- ), Cn = (
1550
+ ), En = (
1527
1551
  /** @type {(inputs: Controls_Camera_ResetInputs) => LocalizedString} */
1528
1552
  () => (
1529
1553
  /** @type {LocalizedString} */
1530
1554
  "Camera resetten"
1531
1555
  )
1532
- ), kn = (
1556
+ ), xn = (
1533
1557
  /** @type {(inputs: Controls_Camera_ResetInputs) => LocalizedString} */
1534
1558
  () => (
1535
1559
  /** @type {LocalizedString} */
1536
1560
  "Kamera zurücksetzen"
1537
1561
  )
1538
- ), _n = (
1562
+ ), Tn = (
1539
1563
  /** @type {((inputs?: Controls_Camera_ResetInputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_ResetInputs, { locale?: "en" | "nl" | "de" }, {}>} */
1540
- ((n = {}, e = {}) => {
1541
- const t = e.locale ?? m();
1542
- return t === "nl" ? Cn() : t === "de" ? kn() : wn();
1564
+ ((n = {}, t = {}) => {
1565
+ const e = t.locale ?? p();
1566
+ return e === "nl" ? En() : e === "de" ? xn() : An();
1543
1567
  })
1544
- ), An = (
1568
+ ), Rn = (
1545
1569
  /** @type {(inputs: Controls_Camera_Zoomin1Inputs) => LocalizedString} */
1546
1570
  () => (
1547
1571
  /** @type {LocalizedString} */
1548
1572
  "Zoom in"
1549
1573
  )
1550
- ), En = (
1574
+ ), In = (
1551
1575
  /** @type {(inputs: Controls_Camera_Zoomin1Inputs) => LocalizedString} */
1552
1576
  () => (
1553
1577
  /** @type {LocalizedString} */
1554
1578
  "Inzoomen"
1555
1579
  )
1556
- ), xn = (
1580
+ ), On = (
1557
1581
  /** @type {(inputs: Controls_Camera_Zoomin1Inputs) => LocalizedString} */
1558
1582
  () => (
1559
1583
  /** @type {LocalizedString} */
1560
1584
  "Hineinzoomen"
1561
1585
  )
1562
- ), Tn = (
1586
+ ), Ln = (
1563
1587
  /** @type {((inputs?: Controls_Camera_Zoomin1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_Zoomin1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1564
- ((n = {}, e = {}) => {
1565
- const t = e.locale ?? m();
1566
- return t === "nl" ? En() : t === "de" ? xn() : An();
1588
+ ((n = {}, t = {}) => {
1589
+ const e = t.locale ?? p();
1590
+ return e === "nl" ? In() : e === "de" ? On() : Rn();
1567
1591
  })
1568
- ), Rn = (
1592
+ ), Mn = (
1569
1593
  /** @type {(inputs: Controls_Camera_Zoomout1Inputs) => LocalizedString} */
1570
1594
  () => (
1571
1595
  /** @type {LocalizedString} */
1572
1596
  "Zoom out"
1573
1597
  )
1574
- ), In = (
1598
+ ), Nn = (
1575
1599
  /** @type {(inputs: Controls_Camera_Zoomout1Inputs) => LocalizedString} */
1576
1600
  () => (
1577
1601
  /** @type {LocalizedString} */
1578
1602
  "Uitzoomen"
1579
1603
  )
1580
- ), Ln = (
1604
+ ), zn = (
1581
1605
  /** @type {(inputs: Controls_Camera_Zoomout1Inputs) => LocalizedString} */
1582
1606
  () => (
1583
1607
  /** @type {LocalizedString} */
1584
1608
  "Herauszoomen"
1585
1609
  )
1586
- ), On = (
1610
+ ), Pn = (
1587
1611
  /** @type {((inputs?: Controls_Camera_Zoomout1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_Zoomout1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1588
- ((n = {}, e = {}) => {
1589
- const t = e.locale ?? m();
1590
- return t === "nl" ? In() : t === "de" ? Ln() : Rn();
1612
+ ((n = {}, t = {}) => {
1613
+ const e = t.locale ?? p();
1614
+ return e === "nl" ? Nn() : e === "de" ? zn() : Mn();
1591
1615
  })
1592
- ), Nn = (
1616
+ ), Fn = (
1593
1617
  /** @type {(inputs: Controls_Camera_Rotateleft1Inputs) => LocalizedString} */
1594
1618
  () => (
1595
1619
  /** @type {LocalizedString} */
1596
1620
  "Rotate left"
1597
1621
  )
1598
- ), Mn = (
1622
+ ), Dn = (
1599
1623
  /** @type {(inputs: Controls_Camera_Rotateleft1Inputs) => LocalizedString} */
1600
1624
  () => (
1601
1625
  /** @type {LocalizedString} */
1602
1626
  "Naar links draaien"
1603
1627
  )
1604
- ), zn = (
1628
+ ), $n = (
1605
1629
  /** @type {(inputs: Controls_Camera_Rotateleft1Inputs) => LocalizedString} */
1606
1630
  () => (
1607
1631
  /** @type {LocalizedString} */
1608
1632
  "Nach links drehen"
1609
1633
  )
1610
- ), Pn = (
1634
+ ), Bn = (
1611
1635
  /** @type {((inputs?: Controls_Camera_Rotateleft1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_Rotateleft1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1612
- ((n = {}, e = {}) => {
1613
- const t = e.locale ?? m();
1614
- return t === "nl" ? Mn() : t === "de" ? zn() : Nn();
1636
+ ((n = {}, t = {}) => {
1637
+ const e = t.locale ?? p();
1638
+ return e === "nl" ? Dn() : e === "de" ? $n() : Fn();
1615
1639
  })
1616
- ), Fn = (
1640
+ ), Un = (
1617
1641
  /** @type {(inputs: Controls_Camera_Rotateright1Inputs) => LocalizedString} */
1618
1642
  () => (
1619
1643
  /** @type {LocalizedString} */
1620
1644
  "Rotate right"
1621
1645
  )
1622
- ), Dn = (
1646
+ ), Vn = (
1623
1647
  /** @type {(inputs: Controls_Camera_Rotateright1Inputs) => LocalizedString} */
1624
1648
  () => (
1625
1649
  /** @type {LocalizedString} */
1626
1650
  "Naar rechts draaien"
1627
1651
  )
1628
- ), $n = (
1652
+ ), jn = (
1629
1653
  /** @type {(inputs: Controls_Camera_Rotateright1Inputs) => LocalizedString} */
1630
1654
  () => (
1631
1655
  /** @type {LocalizedString} */
1632
1656
  "Nach rechts drehen"
1633
1657
  )
1634
- ), Un = (
1658
+ ), Hn = (
1635
1659
  /** @type {((inputs?: Controls_Camera_Rotateright1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_Rotateright1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1636
- ((n = {}, e = {}) => {
1637
- const t = e.locale ?? m();
1638
- return t === "nl" ? Dn() : t === "de" ? $n() : Fn();
1660
+ ((n = {}, t = {}) => {
1661
+ const e = t.locale ?? p();
1662
+ return e === "nl" ? Vn() : e === "de" ? jn() : Un();
1639
1663
  })
1640
- ), Bn = (
1664
+ ), qn = (
1641
1665
  /** @type {(inputs: Controls_Camera_Tiltup1Inputs) => LocalizedString} */
1642
1666
  () => (
1643
1667
  /** @type {LocalizedString} */
1644
1668
  "Tilt up"
1645
1669
  )
1646
- ), Vn = (
1670
+ ), Gn = (
1647
1671
  /** @type {(inputs: Controls_Camera_Tiltup1Inputs) => LocalizedString} */
1648
1672
  () => (
1649
1673
  /** @type {LocalizedString} */
1650
1674
  "Omhoog kantelen"
1651
1675
  )
1652
- ), jn = (
1676
+ ), Zn = (
1653
1677
  /** @type {(inputs: Controls_Camera_Tiltup1Inputs) => LocalizedString} */
1654
1678
  () => (
1655
1679
  /** @type {LocalizedString} */
1656
1680
  "Nach oben kippen"
1657
1681
  )
1658
- ), Hn = (
1682
+ ), Wn = (
1659
1683
  /** @type {((inputs?: Controls_Camera_Tiltup1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_Tiltup1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1660
- ((n = {}, e = {}) => {
1661
- const t = e.locale ?? m();
1662
- return t === "nl" ? Vn() : t === "de" ? jn() : Bn();
1684
+ ((n = {}, t = {}) => {
1685
+ const e = t.locale ?? p();
1686
+ return e === "nl" ? Gn() : e === "de" ? Zn() : qn();
1663
1687
  })
1664
- ), qn = (
1688
+ ), Yn = (
1665
1689
  /** @type {(inputs: Controls_Camera_Tiltdown1Inputs) => LocalizedString} */
1666
1690
  () => (
1667
1691
  /** @type {LocalizedString} */
1668
1692
  "Tilt down"
1669
1693
  )
1670
- ), Gn = (
1694
+ ), Qn = (
1671
1695
  /** @type {(inputs: Controls_Camera_Tiltdown1Inputs) => LocalizedString} */
1672
1696
  () => (
1673
1697
  /** @type {LocalizedString} */
1674
1698
  "Omlaag kantelen"
1675
1699
  )
1676
- ), Zn = (
1700
+ ), Kn = (
1677
1701
  /** @type {(inputs: Controls_Camera_Tiltdown1Inputs) => LocalizedString} */
1678
1702
  () => (
1679
1703
  /** @type {LocalizedString} */
1680
1704
  "Nach unten kippen"
1681
1705
  )
1682
- ), Wn = (
1706
+ ), Xn = (
1683
1707
  /** @type {((inputs?: Controls_Camera_Tiltdown1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_Tiltdown1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
1684
- ((n = {}, e = {}) => {
1685
- const t = e.locale ?? m();
1686
- return t === "nl" ? Gn() : t === "de" ? Zn() : qn();
1708
+ ((n = {}, t = {}) => {
1709
+ const e = t.locale ?? p();
1710
+ return e === "nl" ? Qn() : e === "de" ? Kn() : Yn();
1687
1711
  })
1688
- ), Yn = (
1712
+ ), Jn = (
1689
1713
  /** @type {(inputs: Commerce_Submit_BusyInputs) => LocalizedString} */
1690
1714
  () => (
1691
1715
  /** @type {LocalizedString} */
1692
1716
  "Working…"
1693
1717
  )
1694
- ), Qn = (
1718
+ ), ti = (
1695
1719
  /** @type {(inputs: Commerce_Submit_BusyInputs) => LocalizedString} */
1696
1720
  () => (
1697
1721
  /** @type {LocalizedString} */
1698
1722
  "Bezig…"
1699
1723
  )
1700
- ), Kn = (
1724
+ ), ei = (
1701
1725
  /** @type {(inputs: Commerce_Submit_BusyInputs) => LocalizedString} */
1702
1726
  () => (
1703
1727
  /** @type {LocalizedString} */
1704
1728
  "Läuft…"
1705
1729
  )
1706
- ), Xn = (
1730
+ ), ni = (
1707
1731
  /** @type {((inputs?: Commerce_Submit_BusyInputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Commerce_Submit_BusyInputs, { locale?: "en" | "nl" | "de" }, {}>} */
1708
- ((n = {}, e = {}) => {
1709
- const t = e.locale ?? m();
1710
- return t === "nl" ? Qn() : t === "de" ? Kn() : Yn();
1732
+ ((n = {}, t = {}) => {
1733
+ const e = t.locale ?? p();
1734
+ return e === "nl" ? ti() : e === "de" ? ei() : Jn();
1711
1735
  })
1712
- ), Jn = (
1736
+ ), ii = (
1713
1737
  /** @type {(inputs: Commerce_Submit_SuccessInputs) => LocalizedString} */
1714
1738
  () => (
1715
1739
  /** @type {LocalizedString} */
1716
1740
  "Done"
1717
1741
  )
1718
- ), ei = (
1742
+ ), oi = (
1719
1743
  /** @type {(inputs: Commerce_Submit_SuccessInputs) => LocalizedString} */
1720
1744
  () => (
1721
1745
  /** @type {LocalizedString} */
1722
1746
  "Gelukt"
1723
1747
  )
1724
- ), ti = (
1748
+ ), si = (
1725
1749
  /** @type {(inputs: Commerce_Submit_SuccessInputs) => LocalizedString} */
1726
1750
  () => (
1727
1751
  /** @type {LocalizedString} */
1728
1752
  "Fertig"
1729
1753
  )
1730
- ), ni = (
1754
+ ), ri = (
1731
1755
  /** @type {((inputs?: Commerce_Submit_SuccessInputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Commerce_Submit_SuccessInputs, { locale?: "en" | "nl" | "de" }, {}>} */
1732
- ((n = {}, e = {}) => {
1733
- const t = e.locale ?? m();
1734
- return t === "nl" ? ei() : t === "de" ? ti() : Jn();
1756
+ ((n = {}, t = {}) => {
1757
+ const e = t.locale ?? p();
1758
+ return e === "nl" ? oi() : e === "de" ? si() : ii();
1735
1759
  })
1736
- ), ii = (
1760
+ ), ai = (
1737
1761
  /** @type {(inputs: Commerce_Submit_FailedInputs) => LocalizedString} */
1738
1762
  () => (
1739
1763
  /** @type {LocalizedString} */
1740
1764
  "Failed"
1741
1765
  )
1742
- ), si = (
1766
+ ), li = (
1743
1767
  /** @type {(inputs: Commerce_Submit_FailedInputs) => LocalizedString} */
1744
1768
  () => (
1745
1769
  /** @type {LocalizedString} */
1746
1770
  "Mislukt"
1747
1771
  )
1748
- ), oi = (
1772
+ ), ci = (
1749
1773
  /** @type {(inputs: Commerce_Submit_FailedInputs) => LocalizedString} */
1750
1774
  () => (
1751
1775
  /** @type {LocalizedString} */
1752
1776
  "Fehlgeschlagen"
1753
1777
  )
1754
- ), ri = (
1778
+ ), ui = (
1755
1779
  /** @type {((inputs?: Commerce_Submit_FailedInputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Commerce_Submit_FailedInputs, { locale?: "en" | "nl" | "de" }, {}>} */
1756
- ((n = {}, e = {}) => {
1757
- const t = e.locale ?? m();
1758
- return t === "nl" ? si() : t === "de" ? oi() : ii();
1780
+ ((n = {}, t = {}) => {
1781
+ const e = t.locale ?? p();
1782
+ return e === "nl" ? li() : e === "de" ? ci() : ai();
1759
1783
  })
1760
1784
  );
1761
- const ai = {
1785
+ const di = {
1762
1786
  xmlns: "http://www.w3.org/2000/svg",
1763
1787
  width: 24,
1764
1788
  height: 24,
@@ -1769,22 +1793,22 @@ const ai = {
1769
1793
  "stroke-linecap": "round",
1770
1794
  "stroke-linejoin": "round"
1771
1795
  };
1772
- const _e = ([n, e, t]) => {
1796
+ const kt = ([n, t, e]) => {
1773
1797
  const i = document.createElementNS("http://www.w3.org/2000/svg", n);
1774
- return Object.keys(e).forEach((s) => {
1775
- i.setAttribute(s, String(e[s]));
1776
- }), t?.length && t.forEach((s) => {
1777
- const o = _e(s);
1778
- i.appendChild(o);
1798
+ return Object.keys(t).forEach((o) => {
1799
+ i.setAttribute(o, String(t[o]));
1800
+ }), e?.length && e.forEach((o) => {
1801
+ const s = kt(o);
1802
+ i.appendChild(s);
1779
1803
  }), i;
1780
- }, Ae = (n, e = {}) => {
1804
+ }, At = (n, t = {}) => {
1781
1805
  const i = {
1782
- ...ai,
1783
- ...e
1806
+ ...di,
1807
+ ...t
1784
1808
  };
1785
- return _e(["svg", i, n]);
1809
+ return kt(["svg", i, n]);
1786
1810
  };
1787
- const li = [
1811
+ const hi = [
1788
1812
  [
1789
1813
  "path",
1790
1814
  {
@@ -1794,7 +1818,7 @@ const li = [
1794
1818
  ["path", { d: "m3.3 7 8.7 5 8.7-5" }],
1795
1819
  ["path", { d: "M12 22V12" }]
1796
1820
  ];
1797
- const ci = [
1821
+ const pi = [
1798
1822
  [
1799
1823
  "path",
1800
1824
  {
@@ -1803,27 +1827,48 @@ const ci = [
1803
1827
  ],
1804
1828
  ["circle", { cx: "12", cy: "13", r: "3" }]
1805
1829
  ];
1806
- const Ee = [["path", { d: "m6 9 6 6 6-6" }]];
1807
- const ui = [["path", { d: "m15 18-6-6 6-6" }]];
1808
- const di = [["path", { d: "m9 18 6-6-6-6" }]];
1809
- const hi = [["path", { d: "m18 15-6-6-6 6" }]];
1810
- const mi = [
1830
+ const Et = [["path", { d: "m6 9 6 6 6-6" }]];
1831
+ const mi = [["path", { d: "m15 18-6-6 6-6" }]];
1832
+ const fi = [["path", { d: "m9 18 6-6-6-6" }]];
1833
+ const gi = [["path", { d: "m18 15-6-6-6 6" }]];
1834
+ const bi = [
1835
+ ["path", { d: "M12.75 7.09a3 3 0 0 1 2.16 2.16" }],
1836
+ [
1837
+ "path",
1838
+ {
1839
+ 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"
1840
+ }
1841
+ ],
1842
+ ["path", { d: "m2 2 20 20" }],
1843
+ ["path", { d: "M8.475 2.818A8 8 0 0 1 20 10c0 1.183-.31 2.377-.81 3.533" }],
1844
+ ["path", { d: "M9.13 9.13a3 3 0 0 0 3.74 3.74" }]
1845
+ ];
1846
+ const vi = [
1847
+ [
1848
+ "path",
1849
+ {
1850
+ 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"
1851
+ }
1852
+ ],
1853
+ ["circle", { cx: "12", cy: "10", r: "3" }]
1854
+ ];
1855
+ const yi = [
1811
1856
  ["path", { d: "M15 3h6v6" }],
1812
1857
  ["path", { d: "m21 3-7 7" }],
1813
1858
  ["path", { d: "m3 21 7-7" }],
1814
1859
  ["path", { d: "M9 21H3v-6" }]
1815
1860
  ];
1816
- const pi = [
1861
+ const Si = [
1817
1862
  ["path", { d: "m14 10 7-7" }],
1818
1863
  ["path", { d: "M20 10h-6V4" }],
1819
1864
  ["path", { d: "m3 21 7-7" }],
1820
1865
  ["path", { d: "M4 14h6v6" }]
1821
1866
  ];
1822
- const fi = [
1867
+ const wi = [
1823
1868
  ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }],
1824
1869
  ["path", { d: "M3 3v5h5" }]
1825
1870
  ];
1826
- const gi = [
1871
+ const Ci = [
1827
1872
  ["path", { d: "M10 5H3" }],
1828
1873
  ["path", { d: "M12 19H3" }],
1829
1874
  ["path", { d: "M14 3v4" }],
@@ -1834,50 +1879,52 @@ const gi = [
1834
1879
  ["path", { d: "M8 10v4" }],
1835
1880
  ["path", { d: "M8 12H3" }]
1836
1881
  ];
1837
- const bi = [
1882
+ const _i = [
1838
1883
  ["path", { d: "M18 6 6 18" }],
1839
1884
  ["path", { d: "m6 6 12 12" }]
1840
1885
  ];
1841
- const vi = [
1886
+ const ki = [
1842
1887
  ["circle", { cx: "11", cy: "11", r: "8" }],
1843
1888
  ["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }],
1844
1889
  ["line", { x1: "11", x2: "11", y1: "8", y2: "14" }],
1845
1890
  ["line", { x1: "8", x2: "14", y1: "11", y2: "11" }]
1846
1891
  ];
1847
- const yi = [
1892
+ const Ai = [
1848
1893
  ["circle", { cx: "11", cy: "11", r: "8" }],
1849
1894
  ["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }],
1850
1895
  ["line", { x1: "8", x2: "14", y1: "11", y2: "11" }]
1851
1896
  ];
1852
- function y(n, { size: e = 20, strokeWidth: t = 1.75 } = {}) {
1853
- return Ae(n, { width: e, height: e, "stroke-width": t });
1854
- }
1855
- const b = {
1856
- ar: (n) => y(li, n),
1857
- fullscreen: (n) => y(mi, n),
1858
- exitFullscreen: (n) => y(pi, n),
1859
- screenshot: (n) => y(ci, n),
1860
- tiltUp: (n) => y(hi, n),
1861
- tiltDown: (n) => y(Ee, n),
1862
- rotateLeft: (n) => y(ui, n),
1863
- rotateRight: (n) => y(di, n),
1864
- zoomIn: (n) => y(vi, n),
1865
- zoomOut: (n) => y(yi, n),
1866
- reset: (n) => y(fi, n),
1867
- configurator: (n) => y(gi, n),
1868
- close: (n) => y(bi, n)
1897
+ function b(n, { size: t = 20, strokeWidth: e = 1.75 } = {}) {
1898
+ return At(n, { width: t, height: t, "stroke-width": e });
1899
+ }
1900
+ const g = {
1901
+ ar: (n) => b(hi, n),
1902
+ annotations: (n) => b(vi, n),
1903
+ annotationsOff: (n) => b(bi, n),
1904
+ fullscreen: (n) => b(yi, n),
1905
+ exitFullscreen: (n) => b(Si, n),
1906
+ screenshot: (n) => b(pi, n),
1907
+ tiltUp: (n) => b(gi, n),
1908
+ tiltDown: (n) => b(Et, n),
1909
+ rotateLeft: (n) => b(mi, n),
1910
+ rotateRight: (n) => b(fi, n),
1911
+ zoomIn: (n) => b(ki, n),
1912
+ zoomOut: (n) => b(Ai, n),
1913
+ reset: (n) => b(wi, n),
1914
+ configurator: (n) => b(Ci, n),
1915
+ close: (n) => b(_i, n)
1869
1916
  };
1870
1917
  class v {
1871
1918
  element;
1872
- constructor({ variant: e = "default", size: t = "default", label: i, icon: s, onClick: o, disabled: r = !1 } = {}) {
1873
- this.element = document.createElement("button"), this.element.className = `ui-btn ui-btn--${e} ui-btn--size-${t}`, i !== void 0 && (this.element.setAttribute("aria-label", i), this.element.title = i), s !== void 0 ? this.element.appendChild(s) : i !== void 0 && (this.element.textContent = i), o && this.element.addEventListener("click", o), this.element.disabled = r;
1919
+ constructor({ variant: t = "default", size: e = "default", label: i, icon: o, onClick: s, disabled: r = !1 } = {}) {
1920
+ this.element = document.createElement("button"), this.element.className = `ui-btn ui-btn--${t} ui-btn--size-${e}`, i !== void 0 && (this.element.setAttribute("aria-label", i), this.element.title = i), o !== void 0 ? this.element.appendChild(o) : i !== void 0 && (this.element.textContent = i), s && this.element.addEventListener("click", s), this.element.disabled = r;
1874
1921
  }
1875
- setIcon(e) {
1876
- const t = this.element.querySelector("svg");
1877
- t !== null ? t.replaceWith(e) : this.element.appendChild(e);
1922
+ setIcon(t) {
1923
+ const e = this.element.querySelector("svg");
1924
+ e !== null ? e.replaceWith(t) : this.element.appendChild(t);
1878
1925
  }
1879
1926
  }
1880
- const p = {
1927
+ const m = {
1881
1928
  semantic: {
1882
1929
  // eslint-disable-next-line vd-custom/enforce-error-codes -- This is a hex color, not an error code
1883
1930
  error: "#dc2626"
@@ -1911,11 +1958,11 @@ const p = {
1911
1958
  // 32px
1912
1959
  9: "2.25rem"
1913
1960
  };
1914
- class Si {
1961
+ class Ei {
1915
1962
  element;
1916
1963
  constructor() {
1917
1964
  this.element = document.createElement("div"), Object.assign(this.element.style, {
1918
- background: p.white,
1965
+ background: m.white,
1919
1966
  borderRadius: l[3],
1920
1967
  padding: l[6],
1921
1968
  boxShadow: `0 ${l[2]} ${l[8]} oklch(0% 0 0 / 20%)`,
@@ -1924,25 +1971,25 @@ class Si {
1924
1971
  });
1925
1972
  }
1926
1973
  }
1927
- class wi {
1928
- constructor(e = {}) {
1929
- this.options = e, this.card = new Si(), this.backdrop = this.createBackdrop(), this.backdrop.appendChild(this.card.element);
1974
+ class xi {
1975
+ constructor(t = {}) {
1976
+ this.options = t, this.card = new Ei(), this.backdrop = this.createBackdrop(), this.backdrop.appendChild(this.card.element);
1930
1977
  }
1931
1978
  options;
1932
1979
  card;
1933
1980
  backdrop;
1934
1981
  keyHandler = null;
1935
1982
  open() {
1936
- document.body.appendChild(this.backdrop), this.keyHandler = (e) => {
1937
- e.key === "Escape" && this.close();
1983
+ document.body.appendChild(this.backdrop), this.keyHandler = (t) => {
1984
+ t.key === "Escape" && this.close();
1938
1985
  }, document.addEventListener("keydown", this.keyHandler);
1939
1986
  }
1940
1987
  close() {
1941
1988
  this.backdrop.remove(), this.keyHandler !== null && (document.removeEventListener("keydown", this.keyHandler), this.keyHandler = null), this.options.onClose?.();
1942
1989
  }
1943
1990
  createBackdrop() {
1944
- const e = document.createElement("div");
1945
- return Object.assign(e.style, {
1991
+ const t = document.createElement("div");
1992
+ return Object.assign(t.style, {
1946
1993
  position: "fixed",
1947
1994
  inset: l[0],
1948
1995
  background: "oklch(0% 0 0 / 50%)",
@@ -1950,75 +1997,75 @@ class wi {
1950
1997
  display: "flex",
1951
1998
  alignItems: "center",
1952
1999
  justifyContent: "center"
1953
- }), e.addEventListener("click", (t) => {
1954
- t.target === e && this.close();
1955
- }), e;
2000
+ }), t.addEventListener("click", (e) => {
2001
+ e.target === t && this.close();
2002
+ }), t;
1956
2003
  }
1957
2004
  }
1958
- class Ci {
2005
+ class Ti {
1959
2006
  element;
1960
2007
  selectCallback = null;
1961
- constructor(e, t, i) {
2008
+ constructor(t, e, i) {
1962
2009
  this.element = document.createElement("div"), this.element.className = "ui-toggle-group";
1963
- for (let s = 0; s < e.length; s++) {
1964
- const o = e[s], r = document.createElement("button");
1965
- r.className = "ui-toggle-group-item", r.dataset.value = o, r.textContent = i?.[s] ?? o, r.dataset.state = o === t ? "on" : "off", r.setAttribute("aria-pressed", o === t ? "true" : "false"), r.addEventListener("click", () => {
1966
- this.selectCallback?.(o);
2010
+ for (let o = 0; o < t.length; o++) {
2011
+ const s = t[o], r = document.createElement("button");
2012
+ r.className = "ui-toggle-group-item", r.dataset.value = s, r.textContent = i?.[o] ?? s, r.dataset.state = s === e ? "on" : "off", r.setAttribute("aria-pressed", s === e ? "true" : "false"), r.addEventListener("click", () => {
2013
+ this.selectCallback?.(s);
1967
2014
  }), this.element.appendChild(r);
1968
2015
  }
1969
2016
  }
1970
- setSelected(e) {
1971
- for (const t of this.element.querySelectorAll(".ui-toggle-group-item")) {
1972
- const i = t.dataset.value === e;
1973
- t.dataset.state = i ? "on" : "off", t.setAttribute("aria-pressed", i ? "true" : "false");
2017
+ setSelected(t) {
2018
+ for (const e of this.element.querySelectorAll(".ui-toggle-group-item")) {
2019
+ const i = e.dataset.value === t;
2020
+ e.dataset.state = i ? "on" : "off", e.setAttribute("aria-pressed", i ? "true" : "false");
1974
2021
  }
1975
2022
  }
1976
- onSelect(e) {
1977
- this.selectCallback = e;
2023
+ onSelect(t) {
2024
+ this.selectCallback = t;
1978
2025
  }
1979
2026
  /**
1980
2027
  * Enable only the given values; null lifts every restriction. A disabled
1981
2028
  * value stays visible (the buyer sees the option exists) but cannot be
1982
2029
  * picked: the selectable snapshot's "not in the list = grey".
1983
2030
  */
1984
- setEnabled(e) {
1985
- for (const t of this.element.querySelectorAll(".ui-toggle-group-item")) {
1986
- const i = e === null || e.includes(t.dataset.value ?? "");
1987
- t.disabled = !i, t.setAttribute("aria-disabled", i ? "false" : "true");
2031
+ setEnabled(t) {
2032
+ for (const e of this.element.querySelectorAll(".ui-toggle-group-item")) {
2033
+ const i = t === null || t.includes(e.dataset.value ?? "");
2034
+ e.disabled = !i, e.setAttribute("aria-disabled", i ? "false" : "true");
1988
2035
  }
1989
2036
  }
1990
2037
  }
1991
- class ki {
2038
+ class Ri {
1992
2039
  element;
1993
2040
  select;
1994
- constructor(e, t, i, s, o) {
1995
- this.select = document.createElement("select"), this.select.className = "ui-native-select", this.select.dataset.name = e, this.select.setAttribute("aria-label", i);
2041
+ constructor(t, e, i, o, s) {
2042
+ this.select = document.createElement("select"), this.select.className = "ui-native-select", this.select.dataset.name = t, this.select.setAttribute("aria-label", i);
1996
2043
  const r = document.createElement("option");
1997
2044
  r.value = "", r.disabled = !0, r.textContent = i, this.select.appendChild(r);
1998
2045
  let a = !1;
1999
- for (let d = 0; d < t.length; d++) {
2000
- const f = t[d], h = document.createElement("option");
2001
- h.value = f, h.textContent = o?.[d] ?? f, f === s && (h.selected = !0, a = !0), this.select.appendChild(h);
2046
+ for (let d = 0; d < e.length; d++) {
2047
+ const f = e[d], h = document.createElement("option");
2048
+ h.value = f, h.textContent = s?.[d] ?? f, f === o && (h.selected = !0, a = !0), this.select.appendChild(h);
2002
2049
  }
2003
2050
  a || (r.selected = !0);
2004
- const u = Ae(Ee, { width: 16, height: 16, "stroke-width": 2 });
2051
+ const u = At(Et, { width: 16, height: 16, "stroke-width": 2 });
2005
2052
  u.classList.add("ui-native-select-icon"), this.element = document.createElement("div"), this.element.className = "ui-native-select-wrap", this.element.appendChild(this.select), this.element.appendChild(u);
2006
2053
  }
2007
- setSelected(e) {
2008
- this.select.value = e;
2054
+ setSelected(t) {
2055
+ this.select.value = t;
2009
2056
  }
2010
- onSelect(e) {
2057
+ onSelect(t) {
2011
2058
  this.select.addEventListener("change", () => {
2012
- e(this.select.value);
2059
+ t(this.select.value);
2013
2060
  });
2014
2061
  }
2015
2062
  /** Enable only the given values; null lifts every restriction (see ToggleGroup.setEnabled). */
2016
- setEnabled(e) {
2017
- for (const t of this.select.options)
2018
- t.value !== "" && (t.disabled = e !== null && !e.includes(t.value));
2063
+ setEnabled(t) {
2064
+ for (const e of this.select.options)
2065
+ e.value !== "" && (e.disabled = t !== null && !t.includes(e.value));
2019
2066
  }
2020
2067
  }
2021
- class _i {
2068
+ class Ii {
2022
2069
  element;
2023
2070
  input;
2024
2071
  valueText;
@@ -2026,61 +2073,61 @@ class _i {
2026
2073
  options;
2027
2074
  selectCallback = null;
2028
2075
  settleCallback = null;
2029
- constructor(e, t) {
2030
- if (e.length === 0)
2076
+ constructor(t, e) {
2077
+ if (t.length === 0)
2031
2078
  throw new Error("Virtualdisplay: Slider needs at least one value");
2032
- this.values = e, this.options = t, this.input = document.createElement("input"), this.input.type = "range", this.input.className = "ui-slider-input", this.input.min = "0", this.input.max = String(e.length - 1), this.input.step = "1", this.input.setAttribute("aria-label", t.label), this.valueText = document.createElement("span"), this.valueText.className = "ui-slider-value", this.valueText.setAttribute("aria-hidden", "true");
2079
+ this.values = t, this.options = e, this.input = document.createElement("input"), this.input.type = "range", this.input.className = "ui-slider-input", this.input.min = "0", this.input.max = String(t.length - 1), this.input.step = "1", this.input.setAttribute("aria-label", e.label), this.valueText = document.createElement("span"), this.valueText.className = "ui-slider-value", this.valueText.setAttribute("aria-hidden", "true");
2033
2080
  const i = document.createElement("div");
2034
2081
  i.className = "ui-slider-track", i.appendChild(this.input), i.appendChild(this.buildEnds()), this.element = document.createElement("div"), this.element.className = "ui-slider", this.element.appendChild(i), this.element.appendChild(this.valueText);
2035
- const s = t.initialSelected === void 0 ? 0 : e.indexOf(t.initialSelected);
2036
- this.applyIndex(s === -1 ? 0 : s), this.listen();
2082
+ const o = e.initialSelected === void 0 ? 0 : t.indexOf(e.initialSelected);
2083
+ this.applyIndex(o === -1 ? 0 : o), this.listen();
2037
2084
  }
2038
- setSelected(e) {
2039
- const t = this.values.indexOf(e);
2040
- t !== -1 && this.applyIndex(t);
2085
+ setSelected(t) {
2086
+ const e = this.values.indexOf(t);
2087
+ e !== -1 && this.applyIndex(e);
2041
2088
  }
2042
2089
  /** Fires on every step a drag or keypress crosses, with the value it lands on. */
2043
- onSelect(e) {
2044
- this.selectCallback = e;
2090
+ onSelect(t) {
2091
+ this.selectCallback = t;
2045
2092
  }
2046
2093
  /** Fires once per interaction, when the value commits (drag released, key released). */
2047
- onSettle(e) {
2048
- this.settleCallback = e;
2094
+ onSettle(t) {
2095
+ this.settleCallback = t;
2049
2096
  }
2050
2097
  listen() {
2051
2098
  this.input.addEventListener("input", () => {
2052
- const e = this.values[this.currentIndex];
2053
- e !== void 0 && (this.applyIndex(this.currentIndex), this.selectCallback?.(e));
2099
+ const t = this.values[this.currentIndex];
2100
+ t !== void 0 && (this.applyIndex(this.currentIndex), this.selectCallback?.(t));
2054
2101
  }), this.input.addEventListener("change", () => {
2055
- const e = this.values[this.currentIndex];
2056
- e !== void 0 && this.settleCallback?.(e);
2102
+ const t = this.values[this.currentIndex];
2103
+ t !== void 0 && this.settleCallback?.(t);
2057
2104
  });
2058
2105
  }
2059
2106
  get currentIndex() {
2060
2107
  return Number(this.input.value);
2061
2108
  }
2062
- applyIndex(e) {
2063
- this.input.value = String(e);
2064
- const t = this.displayAt(e);
2065
- this.valueText.textContent = t, this.input.setAttribute("aria-valuetext", t);
2066
- const i = this.values.length === 1 ? 100 : e / (this.values.length - 1) * 100;
2109
+ applyIndex(t) {
2110
+ this.input.value = String(t);
2111
+ const e = this.displayAt(t);
2112
+ this.valueText.textContent = e, this.input.setAttribute("aria-valuetext", e);
2113
+ const i = this.values.length === 1 ? 100 : t / (this.values.length - 1) * 100;
2067
2114
  this.element.style.setProperty("--ui-slider-pct", `${i}%`);
2068
2115
  }
2069
2116
  buildEnds() {
2070
- const e = document.createElement("div");
2071
- e.className = "ui-slider-ends", e.setAttribute("aria-hidden", "true");
2072
- for (const t of [0, this.values.length - 1]) {
2117
+ const t = document.createElement("div");
2118
+ t.className = "ui-slider-ends", t.setAttribute("aria-hidden", "true");
2119
+ for (const e of [0, this.values.length - 1]) {
2073
2120
  const i = document.createElement("span");
2074
- i.textContent = this.labelAt(t), e.appendChild(i);
2121
+ i.textContent = this.labelAt(e), t.appendChild(i);
2075
2122
  }
2076
- return e;
2123
+ return t;
2077
2124
  }
2078
- labelAt(e) {
2079
- return this.options.labels?.[e] ?? this.values[e] ?? "";
2125
+ labelAt(t) {
2126
+ return this.options.labels?.[t] ?? this.values[t] ?? "";
2080
2127
  }
2081
- displayAt(e) {
2082
- const t = this.labelAt(e);
2083
- return this.options.unit === void 0 ? t : `${t} ${this.options.unit}`;
2128
+ displayAt(t) {
2129
+ const e = this.labelAt(t);
2130
+ return this.options.unit === void 0 ? e : `${e} ${this.options.unit}`;
2084
2131
  }
2085
2132
  }
2086
2133
  const w = {
@@ -2100,7 +2147,7 @@ const w = {
2100
2147
  medium: "500",
2101
2148
  semibold: "600"
2102
2149
  }
2103
- }, x = w.fontFamily.sans.join(", "), Ai = `
2150
+ }, x = w.fontFamily.sans.join(", "), Oi = `
2104
2151
  --primary: oklch(5% 0 0);
2105
2152
  --primary-foreground: oklch(100% 0 0);
2106
2153
  --secondary: oklch(92% 0 0);
@@ -2113,8 +2160,8 @@ const w = {
2113
2160
  --accent: oklch(92% 0 0);
2114
2161
  --accent-foreground: oklch(5% 0 0);
2115
2162
  --muted-foreground: oklch(44% 0 0);
2116
- `, Ei = `
2117
- :root { ${Ai} }
2163
+ `, Li = `
2164
+ :root { ${Oi} }
2118
2165
 
2119
2166
  /* ── Button ──────────────────────────────────────────────── */
2120
2167
  .ui-btn {
@@ -2484,114 +2531,114 @@ const w = {
2484
2531
  50% { opacity: 0.55; }
2485
2532
  }
2486
2533
  `;
2487
- let ce = !1;
2488
- function xe() {
2489
- if (ce || typeof document > "u")
2534
+ let ct = !1;
2535
+ function xt() {
2536
+ if (ct || typeof document > "u")
2490
2537
  return;
2491
- ce = !0;
2538
+ ct = !0;
2492
2539
  const n = document.createElement("style");
2493
- n.id = "vd-ui-vanilla", n.textContent = Ei, document.head.appendChild(n);
2540
+ n.id = "vd-ui-vanilla", n.textContent = Li, document.head.appendChild(n);
2494
2541
  }
2495
- const xi = w.fontFamily.sans.join(", ");
2496
- class Ti {
2542
+ const Mi = w.fontFamily.sans.join(", ");
2543
+ class Ni {
2497
2544
  qrLib = null;
2498
2545
  dialog = null;
2499
2546
  qrSlot = null;
2500
2547
  /** Open the modal immediately, with a loading placeholder in the QR slot. */
2501
2548
  show() {
2502
- this.hide(), xe(), this.dialog = new wi({ onClose: () => {
2549
+ this.hide(), xt(), this.dialog = new xi({ onClose: () => {
2503
2550
  this.dialog = null, this.qrSlot = null;
2504
2551
  } }), Object.assign(this.dialog.card.element.style, {
2505
2552
  display: "flex",
2506
2553
  flexDirection: "column",
2507
2554
  alignItems: "center",
2508
2555
  gap: l[3],
2509
- fontFamily: xi
2510
- }), this.dialog.card.element.appendChild(this.createText(Bt(), {
2556
+ fontFamily: Mi
2557
+ }), this.dialog.card.element.appendChild(this.createText(Ue(), {
2511
2558
  fontSize: w.fontSize.base,
2512
2559
  fontWeight: w.fontWeight.semibold,
2513
- color: p.neutral[900]
2514
- })), this.dialog.card.element.appendChild(this.createText(qt(), {
2560
+ color: m.neutral[900]
2561
+ })), this.dialog.card.element.appendChild(this.createText(qe(), {
2515
2562
  fontSize: w.fontSize.sm,
2516
- color: p.neutral[600]
2517
- })), this.qrSlot = this.createQrSlot(), this.dialog.card.element.appendChild(this.qrSlot), this.dialog.card.element.appendChild(this.createText(Yt(), {
2563
+ color: m.neutral[600]
2564
+ })), this.qrSlot = this.createQrSlot(), this.dialog.card.element.appendChild(this.qrSlot), this.dialog.card.element.appendChild(this.createText(Ye(), {
2518
2565
  fontSize: w.fontSize.xs,
2519
- color: p.neutral[500]
2566
+ color: m.neutral[500]
2520
2567
  }));
2521
- const e = new v({
2568
+ const t = new v({
2522
2569
  variant: "outline",
2523
- label: Jt(),
2570
+ label: Je(),
2524
2571
  onClick: () => {
2525
2572
  this.hide();
2526
2573
  }
2527
2574
  });
2528
- this.dialog.card.element.appendChild(e.element), this.dialog.open();
2575
+ this.dialog.card.element.appendChild(t.element), this.dialog.open();
2529
2576
  }
2530
2577
  /**
2531
2578
  * Render the QR for `url` into the open modal's slot, replacing the loading
2532
2579
  * placeholder. Resolves `true` once the QR is actually on screen; `false`
2533
2580
  * when the modal was closed before it could render (nothing reopens).
2534
2581
  */
2535
- async update(e) {
2582
+ async update(t) {
2536
2583
  this.qrLib ??= await import("./browser-ey6Iih3j.js").then((i) => i.b);
2537
- const t = await this.qrLib.toDataURL(e, {
2584
+ const e = await this.qrLib.toDataURL(t, {
2538
2585
  width: 256,
2539
2586
  margin: 4,
2540
2587
  errorCorrectionLevel: "M",
2541
- color: { dark: p.black, light: p.white }
2588
+ color: { dark: m.black, light: m.white }
2542
2589
  });
2543
- return this.qrSlot === null ? !1 : (this.qrSlot.classList.remove("ui-qr-slot--loading"), this.qrSlot.replaceChildren(this.createQrImage(t)), !0);
2590
+ return this.qrSlot === null ? !1 : (this.qrSlot.classList.remove("ui-qr-slot--loading"), this.qrSlot.replaceChildren(this.createQrImage(e)), !0);
2544
2591
  }
2545
2592
  hide() {
2546
2593
  this.dialog?.close(), this.dialog = null, this.qrSlot = null;
2547
2594
  }
2548
- createText(e, t) {
2595
+ createText(t, e) {
2549
2596
  const i = document.createElement("p");
2550
- return i.textContent = e, Object.assign(i.style, { margin: "0", textAlign: "center", ...t }), i;
2597
+ return i.textContent = t, Object.assign(i.style, { margin: "0", textAlign: "center", ...e }), i;
2551
2598
  }
2552
2599
  createQrSlot() {
2553
- const e = document.createElement("div");
2554
- return e.className = "ui-qr-slot ui-qr-slot--loading", e;
2600
+ const t = document.createElement("div");
2601
+ return t.className = "ui-qr-slot ui-qr-slot--loading", t;
2555
2602
  }
2556
- createQrImage(e) {
2557
- const t = document.createElement("img");
2558
- return t.src = e, t.alt = "QR code", t;
2603
+ createQrImage(t) {
2604
+ const e = document.createElement("img");
2605
+ return e.src = t, e.alt = "QR code", e;
2559
2606
  }
2560
2607
  }
2561
- function ue(n) {
2562
- const e = Math.max(0, Math.min(1, n));
2563
- return e * e * (3 - 2 * e);
2608
+ function ut(n) {
2609
+ const t = Math.max(0, Math.min(1, n));
2610
+ return t * t * (3 - 2 * t);
2564
2611
  }
2565
- function Ri(n, e, t, i, s, o) {
2566
- const [r, a, u] = n, d = Math.cos(e), f = Math.sin(e), h = d * r + f * u, E = -f * r + d * u, _ = Math.cos(t), k = Math.sin(t), I = _ * a - k * E, P = k * a + _ * E, ee = 0.55;
2567
- return [i + h * o * ee, s - I * o * ee, P];
2612
+ function zi(n, t, e, i, o, s) {
2613
+ const [r, a, u] = n, d = Math.cos(t), f = Math.sin(t), h = d * r + f * u, E = -f * r + d * u, k = Math.cos(e), _ = Math.sin(e), I = k * a - _ * E, F = _ * a + k * E, tt = 0.55;
2614
+ return [i + h * s * tt, o - I * s * tt, F];
2568
2615
  }
2569
- function Ii(n, e, t) {
2570
- n.beginPath(), n.moveTo(e[0], e[1]), n.lineTo(t[0], t[1]), n.strokeStyle = "#000", n.lineWidth = 2, n.stroke();
2616
+ function Pi(n, t, e) {
2617
+ n.beginPath(), n.moveTo(t[0], t[1]), n.lineTo(e[0], e[1]), n.strokeStyle = "#000", n.lineWidth = 2, n.stroke();
2571
2618
  }
2572
- function Li(n, e, t, i, s) {
2573
- const o = e(t), r = e(i), a = [
2574
- o[0] + (r[0] - o[0]) * s,
2575
- o[1] + (r[1] - o[1]) * s,
2576
- o[2]
2619
+ function Fi(n, t, e, i, o) {
2620
+ const s = t(e), r = t(i), a = [
2621
+ s[0] + (r[0] - s[0]) * o,
2622
+ s[1] + (r[1] - s[1]) * o,
2623
+ s[2]
2577
2624
  ];
2578
- Ii(n, o, a);
2625
+ Pi(n, s, a);
2579
2626
  }
2580
- const $ = [-1, -1, 1], U = [1, -1, 1], B = [1, -1, -1], V = [-1, -1, -1], j = [-1, 1, 1], H = [1, 1, 1], q = [1, 1, -1], G = [-1, 1, -1], de = [
2581
- [$, U],
2582
- [U, B],
2583
- [B, V],
2627
+ const $ = [-1, -1, 1], B = [1, -1, 1], U = [1, -1, -1], V = [-1, -1, -1], j = [-1, 1, 1], H = [1, 1, 1], q = [1, 1, -1], G = [-1, 1, -1], dt = [
2628
+ [$, B],
2629
+ [B, U],
2630
+ [U, V],
2584
2631
  [V, $],
2585
2632
  [$, j],
2586
- [U, H],
2587
- [B, q],
2633
+ [B, H],
2634
+ [U, q],
2588
2635
  [V, G],
2589
2636
  [j, H],
2590
2637
  [H, q],
2591
2638
  [q, G],
2592
2639
  [G, j]
2593
- ], Oi = 400, he = '-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif';
2594
- function Ni() {
2640
+ ], Di = 400, ht = '-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif';
2641
+ function $i() {
2595
2642
  const n = document.createElement("div");
2596
2643
  Object.assign(n.style, {
2597
2644
  position: "absolute",
@@ -2605,15 +2652,15 @@ function Ni() {
2605
2652
  opacity: "0",
2606
2653
  transition: "opacity 0.3s ease-in-out"
2607
2654
  });
2608
- const e = document.createElement("canvas");
2609
- Object.assign(e.style, {
2655
+ const t = document.createElement("canvas");
2656
+ Object.assign(t.style, {
2610
2657
  width: "100%",
2611
2658
  height: "100%",
2612
2659
  position: "absolute",
2613
2660
  inset: "0"
2614
2661
  });
2615
- const t = document.createElement("div");
2616
- Object.assign(t.style, {
2662
+ const e = document.createElement("div");
2663
+ Object.assign(e.style, {
2617
2664
  position: "absolute",
2618
2665
  top: "56%",
2619
2666
  left: "0",
@@ -2627,16 +2674,16 @@ function Ni() {
2627
2674
  fontWeight: "400",
2628
2675
  color: "#000",
2629
2676
  fontVariantNumeric: "tabular-nums",
2630
- fontFamily: he
2677
+ fontFamily: ht
2631
2678
  });
2632
- const s = document.createElement("span");
2633
- return Object.assign(s.style, {
2679
+ const o = document.createElement("span");
2680
+ return Object.assign(o.style, {
2634
2681
  fontSize: "13px",
2635
2682
  color: "#000",
2636
- fontFamily: he
2637
- }), s.textContent = ln(), t.appendChild(i), t.appendChild(s), n.appendChild(e), n.appendChild(t), { overlay: n, canvas: e, pctEl: i, phaseEl: s };
2683
+ fontFamily: ht
2684
+ }), o.textContent = hn(), e.appendChild(i), e.appendChild(o), n.appendChild(t), n.appendChild(e), { overlay: n, canvas: t, pctEl: i, phaseEl: o };
2638
2685
  }
2639
- class Mi {
2686
+ class Bi {
2640
2687
  overlay;
2641
2688
  canvas;
2642
2689
  ctx;
@@ -2647,28 +2694,28 @@ class Mi {
2647
2694
  startTime;
2648
2695
  hidden = !1;
2649
2696
  visible = !1;
2650
- constructor(e, t = {}) {
2697
+ constructor(t, e = {}) {
2651
2698
  this.startTime = performance.now();
2652
- const i = Ni();
2653
- this.overlay = i.overlay, this.canvas = i.canvas, this.pctEl = i.pctEl, this.phaseEl = i.phaseEl, e.appendChild(this.overlay), this.ctx = this.canvas.getContext("2d"), this.ctx !== null && (this.sizeCanvas(), this.tick());
2654
- const s = t.showDelay ?? Oi;
2699
+ const i = $i();
2700
+ this.overlay = i.overlay, this.canvas = i.canvas, this.pctEl = i.pctEl, this.phaseEl = i.phaseEl, t.appendChild(this.overlay), this.ctx = this.canvas.getContext("2d"), this.ctx !== null && (this.sizeCanvas(), this.tick());
2701
+ const o = e.showDelay ?? Di;
2655
2702
  this.showTimerId = setTimeout(() => {
2656
2703
  this.reveal();
2657
- }, s);
2704
+ }, o);
2658
2705
  }
2659
- updateProgress(e, t) {
2660
- this.hidden || (this.pctEl.textContent = `${Math.round(e)}%`, this.phaseEl.textContent = t !== "" ? ` · ${t}` : "");
2706
+ updateProgress(t, e) {
2707
+ this.hidden || (this.pctEl.textContent = `${Math.round(t)}%`, this.phaseEl.textContent = e !== "" ? ` · ${e}` : "");
2661
2708
  }
2662
2709
  /**
2663
2710
  * Show an error state — stops animation and displays the error message.
2664
2711
  * The overlay stays visible so the user knows something went wrong.
2665
2712
  */
2666
- showError(e) {
2713
+ showError(t) {
2667
2714
  if (this.hidden = !1, this.animationId !== null && (cancelAnimationFrame(this.animationId), this.animationId = null), this.ctx !== null) {
2668
- const t = Math.min(devicePixelRatio, 2), i = this.canvas.width / t, s = this.canvas.height / t;
2669
- this.ctx.fillStyle = "#fff", this.ctx.fillRect(0, 0, i * t, s * t);
2715
+ const e = Math.min(devicePixelRatio, 2), i = this.canvas.width / e, o = this.canvas.height / e;
2716
+ this.ctx.fillStyle = "#fff", this.ctx.fillRect(0, 0, i * e, o * e);
2670
2717
  }
2671
- this.pctEl.textContent = "", this.phaseEl.textContent = e, this.phaseEl.style.color = "#b91c1c", this.reveal();
2718
+ this.pctEl.textContent = "", this.phaseEl.textContent = t, this.phaseEl.style.color = "#b91c1c", this.reveal();
2672
2719
  }
2673
2720
  hide() {
2674
2721
  if (!this.hidden) {
@@ -2695,8 +2742,8 @@ class Mi {
2695
2742
  sizeCanvas() {
2696
2743
  if (this.ctx === null)
2697
2744
  return;
2698
- const e = Math.min(devicePixelRatio, 2), t = this.overlay.clientWidth || 440, i = this.overlay.clientHeight || 360;
2699
- this.canvas.width = t * e, this.canvas.height = i * e, this.ctx.scale(e, e), this.ctx.lineCap = "round", this.ctx.lineJoin = "round";
2745
+ const t = Math.min(devicePixelRatio, 2), e = this.overlay.clientWidth || 440, i = this.overlay.clientHeight || 360;
2746
+ this.canvas.width = e * t, this.canvas.height = i * t, this.ctx.scale(t, t), this.ctx.lineCap = "round", this.ctx.lineJoin = "round";
2700
2747
  }
2701
2748
  tick = () => {
2702
2749
  this.hidden || (this.drawFrame(), this.animationId = requestAnimationFrame(this.tick));
@@ -2704,24 +2751,24 @@ class Mi {
2704
2751
  drawFrame() {
2705
2752
  if (this.ctx === null)
2706
2753
  return;
2707
- const e = this.canvas.width / Math.min(devicePixelRatio, 2), t = this.canvas.height / Math.min(devicePixelRatio, 2), i = (performance.now() - this.startTime) / 1e3;
2708
- this.ctx.fillStyle = "#fff", this.ctx.fillRect(0, 0, e, t);
2709
- const s = e / 2, o = t * 0.44, r = Math.min(e, t) * 0.08, a = 0.785, u = 0.615, d = (k) => Ri(k, a, u, s, o, r), f = 6, h = i % f / f, E = de.length;
2710
- let _;
2711
- h < 0.35 ? _ = ue(h / 0.35) * E : h < 0.55 ? _ = E : h < 0.9 ? _ = (1 - ue((h - 0.55) / 0.35)) * E : _ = 0, this.ctx.shadowBlur = 5, this.ctx.shadowColor = "rgba(30,30,30,0.08)";
2712
- for (let k = 0; k < E && !(k >= _); k++) {
2713
- const I = de[k];
2754
+ const t = this.canvas.width / Math.min(devicePixelRatio, 2), e = this.canvas.height / Math.min(devicePixelRatio, 2), i = (performance.now() - this.startTime) / 1e3;
2755
+ this.ctx.fillStyle = "#fff", this.ctx.fillRect(0, 0, t, e);
2756
+ const o = t / 2, s = e * 0.44, r = Math.min(t, e) * 0.08, a = 0.785, u = 0.615, d = (_) => zi(_, a, u, o, s, r), f = 6, h = i % f / f, E = dt.length;
2757
+ let k;
2758
+ h < 0.35 ? k = ut(h / 0.35) * E : h < 0.55 ? k = E : h < 0.9 ? k = (1 - ut((h - 0.55) / 0.35)) * E : k = 0, this.ctx.shadowBlur = 5, this.ctx.shadowColor = "rgba(30,30,30,0.08)";
2759
+ for (let _ = 0; _ < E && !(_ >= k); _++) {
2760
+ const I = dt[_];
2714
2761
  if (I === void 0)
2715
2762
  continue;
2716
- const P = Math.min(1, _ - k);
2717
- Li(this.ctx, d, I[0], I[1], P);
2763
+ const F = Math.min(1, k - _);
2764
+ Fi(this.ctx, d, I[0], I[1], F);
2718
2765
  }
2719
2766
  this.ctx.shadowBlur = 0;
2720
2767
  }
2721
2768
  }
2722
- class zi {
2723
- constructor(e) {
2724
- this.options = e, this.element = document.createElement("div"), Object.assign(this.element.style, { display: "flex", gap: "0.375rem" }), this.onFullscreenChange = () => {
2769
+ class Ui {
2770
+ constructor(t) {
2771
+ this.options = t, this.element = document.createElement("div"), Object.assign(this.element.style, { display: "flex", gap: "0.375rem" }), this.onFullscreenChange = () => {
2725
2772
  this.setFullscreenIcon(document.fullscreenElement !== null);
2726
2773
  }, document.addEventListener("fullscreenchange", this.onFullscreenChange);
2727
2774
  }
@@ -2729,113 +2776,137 @@ class zi {
2729
2776
  element;
2730
2777
  arBtn = null;
2731
2778
  fullscreenBtn = null;
2779
+ annotationsBtn = null;
2780
+ /**
2781
+ * Whether markers are currently shown, as this control believes it. Seeded
2782
+ * from the mode when the button first renders, then owned by the clicks:
2783
+ * the toggle channel has no return leg, so the button is the state holder.
2784
+ */
2785
+ annotationsShown = !1;
2732
2786
  onFullscreenChange;
2733
- setFullscreenIcon(e) {
2734
- this.fullscreenBtn !== null && this.fullscreenBtn.setIcon(e ? b.exitFullscreen() : b.fullscreen());
2787
+ setFullscreenIcon(t) {
2788
+ this.fullscreenBtn !== null && this.fullscreenBtn.setIcon(t ? g.exitFullscreen() : g.fullscreen());
2735
2789
  }
2736
- syncButton(e, t, i) {
2737
- if (t && e === null) {
2738
- const s = i();
2739
- return this.element.appendChild(s.element), s;
2790
+ syncButton(t, e, i) {
2791
+ if (e && t === null) {
2792
+ const o = i();
2793
+ return this.element.appendChild(o.element), o;
2740
2794
  }
2741
- return !t && e !== null ? (e.element.remove(), null) : e;
2795
+ return !e && t !== null ? (t.element.remove(), null) : t;
2742
2796
  }
2743
- applySettings(e) {
2744
- this.arBtn = this.syncButton(this.arBtn, e.ar !== !1 && this.options.onAr !== void 0, () => new v({
2797
+ applySettings(t) {
2798
+ this.arBtn = this.syncButton(this.arBtn, t.ar !== !1 && this.options.onAr !== void 0, () => new v({
2745
2799
  variant: "outline",
2746
2800
  size: "icon",
2747
- label: Ft(),
2748
- icon: b.ar(),
2801
+ label: Fe(),
2802
+ icon: g.ar(),
2749
2803
  onClick: () => {
2750
2804
  this.options.onAr?.();
2751
2805
  }
2752
- })), this.fullscreenBtn = this.syncButton(this.fullscreenBtn, e.fullscreen !== !1 && this.options.onFullscreen !== void 0, () => new v({
2806
+ })), this.fullscreenBtn = this.syncButton(this.fullscreenBtn, t.fullscreen !== !1 && this.options.onFullscreen !== void 0, () => new v({
2753
2807
  variant: "outline",
2754
2808
  size: "icon",
2755
- label: sn(),
2756
- icon: b.fullscreen(),
2809
+ label: ln(),
2810
+ icon: g.fullscreen(),
2757
2811
  onClick: () => {
2758
2812
  this.options.onFullscreen?.();
2759
2813
  }
2760
2814
  }));
2815
+ const e = t.annotations === "toggle-shown" || t.annotations === "toggle-hidden";
2816
+ this.annotationsBtn = this.syncButton(this.annotationsBtn, e && this.options.onAnnotationsToggle !== void 0, () => {
2817
+ this.annotationsShown = t.annotations === "toggle-shown";
2818
+ const i = new v({
2819
+ variant: "outline",
2820
+ size: "icon",
2821
+ label: on(),
2822
+ icon: this.annotationsShown ? g.annotations() : g.annotationsOff(),
2823
+ onClick: () => {
2824
+ this.flipAnnotations();
2825
+ }
2826
+ });
2827
+ return i.element.setAttribute("aria-pressed", String(this.annotationsShown)), i;
2828
+ });
2829
+ }
2830
+ flipAnnotations() {
2831
+ this.annotationsShown = !this.annotationsShown, this.annotationsBtn?.element.setAttribute("aria-pressed", String(this.annotationsShown)), this.annotationsBtn?.setIcon(this.annotationsShown ? g.annotations() : g.annotationsOff()), this.options.onAnnotationsToggle?.(this.annotationsShown);
2761
2832
  }
2762
2833
  destroy() {
2763
2834
  document.removeEventListener("fullscreenchange", this.onFullscreenChange);
2764
2835
  }
2765
2836
  }
2766
2837
  const R = 0.5;
2767
- class z {
2838
+ class P {
2768
2839
  element;
2769
- constructor(e, t) {
2840
+ constructor(t, e) {
2770
2841
  this.element = Object.assign(document.createElement("div"), { className: "vd-camera-controls" });
2771
2842
  const i = {
2772
- targetRotation: t.rotation,
2773
- targetTilt: t.tilt,
2774
- targetZoom: t.zoom,
2843
+ targetRotation: e.rotation,
2844
+ targetTilt: e.tilt,
2845
+ targetZoom: e.zoom,
2775
2846
  thetaOffset: 0
2776
- }, s = Pi(e, t, i);
2777
- t.onChange((o) => {
2778
- i.targetRotation = o.rotation - i.thetaOffset, i.targetTilt = o.tilt, i.targetZoom = o.zoom, Fi(s, t, o);
2779
- }), this.element.appendChild(z.buildZoom(s.zoomOut, s.zoomIn)), this.element.appendChild(z.buildDpad(s.tiltUp, s.rotateLeft, s.reset, s.rotateRight, s.tiltDown));
2847
+ }, o = Vi(t, e, i);
2848
+ e.onChange((s) => {
2849
+ i.targetRotation = s.rotation - i.thetaOffset, i.targetTilt = s.tilt, i.targetZoom = s.zoom, ji(o, e, s);
2850
+ }), this.element.appendChild(P.buildZoom(o.zoomOut, o.zoomIn)), this.element.appendChild(P.buildDpad(o.tiltUp, o.rotateLeft, o.reset, o.rotateRight, o.tiltDown));
2780
2851
  }
2781
- static buildZoom(e, t) {
2852
+ static buildZoom(t, e) {
2782
2853
  const i = document.createElement("div");
2783
- return i.className = "vd-zoom", i.appendChild(e.element), i.appendChild(t.element), i;
2854
+ return i.className = "vd-zoom", i.appendChild(t.element), i.appendChild(e.element), i;
2784
2855
  }
2785
- static buildDpad(e, t, i, s, o) {
2856
+ static buildDpad(t, e, i, o, s) {
2786
2857
  const r = document.createElement("div");
2787
2858
  r.className = "vd-dpad";
2788
2859
  for (const [a, u] of [
2789
- [e, "up"],
2790
- [t, "left"],
2860
+ [t, "up"],
2861
+ [e, "left"],
2791
2862
  [i, "center"],
2792
- [s, "right"],
2793
- [o, "down"]
2863
+ [o, "right"],
2864
+ [s, "down"]
2794
2865
  ])
2795
2866
  a.element.classList.add(`vd-dpad-${u}`), r.appendChild(a.element);
2796
2867
  return r;
2797
2868
  }
2798
2869
  }
2799
- function Pi(n, e, t) {
2800
- const i = (r) => Math.max(e.limits?.minZoom ?? 1, Math.min(e.limits?.maxZoom ?? 1 / 0, r)), s = (r) => {
2801
- const a = e.limits?.minRotate, u = e.limits?.maxRotate;
2870
+ function Vi(n, t, e) {
2871
+ const i = (r) => Math.max(t.limits?.minZoom ?? 1, Math.min(t.limits?.maxZoom ?? 1 / 0, r)), o = (r) => {
2872
+ const a = t.limits?.minRotate, u = t.limits?.maxRotate;
2802
2873
  return a !== void 0 || u !== void 0 ? Math.max(a ?? -1 / 0, Math.min(u ?? 1 / 0, r)) : r;
2803
- }, o = (r) => {
2804
- const a = e.limits?.minTilt, u = e.limits?.maxTilt;
2874
+ }, s = (r) => {
2875
+ const a = t.limits?.minTilt, u = t.limits?.maxTilt;
2805
2876
  if (a !== void 0 || u !== void 0) {
2806
- t.targetTilt = Math.max(a ?? 0, Math.min(u ?? 180, t.targetTilt + r)), n.tilt(t.targetTilt).set();
2877
+ e.targetTilt = Math.max(a ?? 0, Math.min(u ?? 180, e.targetTilt + r)), n.tilt(e.targetTilt).set();
2807
2878
  return;
2808
2879
  }
2809
- const d = t.targetTilt + r;
2810
- d > 180 || d < 0 ? (t.targetTilt = d > 180 ? 360 - d : -d, t.thetaOffset = (t.thetaOffset + 180) % 360, n.tilt(t.targetTilt).rotate(t.targetRotation + t.thetaOffset).set()) : (t.targetTilt = d, n.tilt(t.targetTilt).set());
2880
+ const d = e.targetTilt + r;
2881
+ d > 180 || d < 0 ? (e.targetTilt = d > 180 ? 360 - d : -d, e.thetaOffset = (e.thetaOffset + 180) % 360, n.tilt(e.targetTilt).rotate(e.targetRotation + e.thetaOffset).set()) : (e.targetTilt = d, n.tilt(e.targetTilt).set());
2811
2882
  };
2812
2883
  return {
2813
- zoomOut: new v({ variant: "outline", size: "icon", label: On(), icon: b.zoomOut(), onClick: () => {
2814
- t.targetZoom = i(t.targetZoom - 10), n.zoom(t.targetZoom).set();
2884
+ zoomOut: new v({ variant: "outline", size: "icon", label: Pn(), icon: g.zoomOut(), onClick: () => {
2885
+ e.targetZoom = i(e.targetZoom - 10), n.zoom(e.targetZoom).set();
2815
2886
  } }),
2816
- zoomIn: new v({ variant: "outline", size: "icon", label: Tn(), icon: b.zoomIn(), onClick: () => {
2817
- t.targetZoom = i(t.targetZoom + 10), n.zoom(t.targetZoom).set();
2887
+ zoomIn: new v({ variant: "outline", size: "icon", label: Ln(), icon: g.zoomIn(), onClick: () => {
2888
+ e.targetZoom = i(e.targetZoom + 10), n.zoom(e.targetZoom).set();
2818
2889
  } }),
2819
- tiltUp: new v({ variant: "outline", size: "icon", label: Hn(), icon: b.tiltUp(), onClick: () => {
2820
- o(-15);
2890
+ tiltUp: new v({ variant: "outline", size: "icon", label: Wn(), icon: g.tiltUp(), onClick: () => {
2891
+ s(-15);
2821
2892
  } }),
2822
- rotateLeft: new v({ variant: "outline", size: "icon", label: Pn(), icon: b.rotateLeft(), onClick: () => {
2823
- t.targetRotation = s(t.targetRotation - 15), n.rotate(t.targetRotation + t.thetaOffset).set();
2893
+ rotateLeft: new v({ variant: "outline", size: "icon", label: Bn(), icon: g.rotateLeft(), onClick: () => {
2894
+ e.targetRotation = o(e.targetRotation - 15), n.rotate(e.targetRotation + e.thetaOffset).set();
2824
2895
  } }),
2825
- reset: new v({ variant: "outline", size: "icon", label: _n(), icon: b.reset(), onClick: () => {
2826
- t.thetaOffset = 0, n.reset();
2896
+ reset: new v({ variant: "outline", size: "icon", label: Tn(), icon: g.reset(), onClick: () => {
2897
+ e.thetaOffset = 0, n.reset();
2827
2898
  } }),
2828
- rotateRight: new v({ variant: "outline", size: "icon", label: Un(), icon: b.rotateRight(), onClick: () => {
2829
- t.targetRotation = s(t.targetRotation + 15), n.rotate(t.targetRotation + t.thetaOffset).set();
2899
+ rotateRight: new v({ variant: "outline", size: "icon", label: Hn(), icon: g.rotateRight(), onClick: () => {
2900
+ e.targetRotation = o(e.targetRotation + 15), n.rotate(e.targetRotation + e.thetaOffset).set();
2830
2901
  } }),
2831
- tiltDown: new v({ variant: "outline", size: "icon", label: Wn(), icon: b.tiltDown(), onClick: () => {
2832
- o(15);
2902
+ tiltDown: new v({ variant: "outline", size: "icon", label: Xn(), icon: g.tiltDown(), onClick: () => {
2903
+ s(15);
2833
2904
  } })
2834
2905
  };
2835
2906
  }
2836
- function Fi(n, e, t) {
2837
- const i = e.limits;
2838
- i !== void 0 && (n.zoomOut.element.disabled = i.minZoom !== void 0 && t.zoom <= i.minZoom + R, n.zoomIn.element.disabled = i.maxZoom !== void 0 && t.zoom >= i.maxZoom - R, n.tiltUp.element.disabled = i.minTilt !== void 0 && t.tilt <= i.minTilt + R, n.tiltDown.element.disabled = i.maxTilt !== void 0 && t.tilt >= i.maxTilt - R, n.rotateLeft.element.disabled = i.minRotate !== void 0 && t.rotation <= i.minRotate + R, n.rotateRight.element.disabled = i.maxRotate !== void 0 && t.rotation >= i.maxRotate - R);
2907
+ function ji(n, t, e) {
2908
+ const i = t.limits;
2909
+ i !== void 0 && (n.zoomOut.element.disabled = i.minZoom !== void 0 && e.zoom <= i.minZoom + R, n.zoomIn.element.disabled = i.maxZoom !== void 0 && e.zoom >= i.maxZoom - R, n.tiltUp.element.disabled = i.minTilt !== void 0 && e.tilt <= i.minTilt + R, n.tiltDown.element.disabled = i.maxTilt !== void 0 && e.tilt >= i.maxTilt - R, n.rotateLeft.element.disabled = i.minRotate !== void 0 && e.rotation <= i.minRotate + R, n.rotateRight.element.disabled = i.maxRotate !== void 0 && e.rotation >= i.maxRotate - R);
2839
2910
  }
2840
2911
  const T = {
2841
2912
  /** Attribute selection requested (cancelable). `detail`: `{ attribute, value }`. */
@@ -2848,39 +2919,39 @@ const T = {
2848
2919
  CONFIGURATION_CHANGE: "vd:configuration-change",
2849
2920
  /** Configuration submitted (bubbles). `detail`: the resolved configuration handed to the host. */
2850
2921
  CONFIGURATION_SUBMIT: "vd:configuration-submit"
2851
- }, Te = {
2922
+ }, Tt = {
2852
2923
  mm: 1,
2853
2924
  cm: 10,
2854
2925
  m: 1e3,
2855
2926
  in: 25.4
2856
- }, me = 3;
2857
- function Di(n) {
2858
- const e = n.stepMm / Te[n.displayUnit];
2859
- for (let t = 0; t <= me; t++) {
2860
- const i = e * 10 ** t;
2927
+ }, pt = 3;
2928
+ function Hi(n) {
2929
+ const t = n.stepMm / Tt[n.displayUnit];
2930
+ for (let e = 0; e <= pt; e++) {
2931
+ const i = t * 10 ** e;
2861
2932
  if (Math.abs(i - Math.round(i)) < 1e-9)
2862
- return t;
2933
+ return e;
2863
2934
  }
2864
- return me;
2935
+ return pt;
2865
2936
  }
2866
- function $i(n, e, t) {
2867
- const i = Di(e), s = n / Te[e.displayUnit];
2868
- return new Intl.NumberFormat(t, {
2937
+ function qi(n, t, e) {
2938
+ const i = Hi(t), o = n / Tt[t.displayUnit];
2939
+ return new Intl.NumberFormat(e, {
2869
2940
  minimumFractionDigits: i,
2870
2941
  maximumFractionDigits: i
2871
- }).format(s);
2942
+ }).format(o);
2872
2943
  }
2873
- function Ui(n, e, t, i, s, o, r) {
2874
- const a = m(), u = n.values.map((h) => $i(Number(h), e, a)), d = n.values.find((h) => t.getValue(n.name, h)?.isSelected === !0) ?? n.defaultValue, f = new _i(n.values, {
2944
+ function Gi(n, t, e, i, o, s, r) {
2945
+ const a = p(), u = n.values.map((h) => qi(Number(h), t, a)), d = n.values.find((h) => e.getValue(n.name, h)?.isSelected === !0) ?? n.defaultValue, f = new Ii(n.values, {
2875
2946
  label: n.name,
2876
2947
  labels: u,
2877
- unit: e.displayUnit,
2948
+ unit: t.displayUnit,
2878
2949
  ...d !== void 0 && { initialSelected: d }
2879
2950
  });
2880
2951
  return f.onSelect((h) => {
2881
- s(n.name, h);
2952
+ o(n.name, h);
2882
2953
  }), f.onSettle((h) => {
2883
- i.dispatch(T.SELECT, { attribute: n.name, value: h }, !0).defaultPrevented || o(n.name, h);
2954
+ i.dispatch(T.SELECT, { attribute: n.name, value: h }, !0).defaultPrevented || s(n.name, h);
2884
2955
  }), r(n.name, (h) => {
2885
2956
  f.setSelected(h.value), i.dispatch(T.SELECTED, { attribute: n.name, value: h.value });
2886
2957
  }), {
@@ -2894,38 +2965,38 @@ function Ui(n, e, t, i, s, o, r) {
2894
2965
  }
2895
2966
  };
2896
2967
  }
2897
- const Bi = 5;
2898
- let Vi = 0;
2968
+ const Zi = 5;
2969
+ let Wi = 0;
2899
2970
  function K(n) {
2900
- const e = n.replace(/([A-Z])/g, " $1").trim();
2901
- return e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
2971
+ const t = n.replace(/([A-Z])/g, " $1").trim();
2972
+ return t.charAt(0).toUpperCase() + t.slice(1).toLowerCase();
2902
2973
  }
2903
- function ji(n, e, t, i, s, o) {
2974
+ function Yi(n, t, e, i, o, s) {
2904
2975
  const r = document.createElement("div");
2905
2976
  r.className = "vd-attribute", r.dataset.name = n.name;
2906
2977
  const a = document.createElement("span");
2907
- a.className = "vd-attribute-label", a.textContent = K(n.name), a.id = `vd-attribute-label-${Vi++}`, r.appendChild(a), r.setAttribute("role", "group"), r.setAttribute("aria-labelledby", a.id);
2978
+ a.className = "vd-attribute-label", a.textContent = K(n.name), a.id = `vd-attribute-label-${Wi++}`, r.appendChild(a), r.setAttribute("role", "group"), r.setAttribute("aria-labelledby", a.id);
2908
2979
  const u = (f) => {
2909
2980
  r.style.display = f ? "none" : "";
2910
- }, d = n.dimension !== void 0 ? Ui(
2981
+ }, d = n.dimension !== void 0 ? Gi(
2911
2982
  n,
2912
2983
  n.dimension,
2913
- e,
2914
2984
  t,
2915
- s,
2985
+ e,
2986
+ o,
2916
2987
  i,
2917
- o
2918
- ) : Hi(n, e, t, i, o);
2988
+ s
2989
+ ) : Qi(n, t, e, i, s);
2919
2990
  return r.appendChild(d.element), { element: r, setSelectable: d.setSelectable, setHidden: u };
2920
2991
  }
2921
- function Hi(n, e, t, i, s) {
2922
- const o = n.values.find(
2923
- (u) => e.getValue(n.name, u)?.isSelected === !0
2924
- ), r = n.values.map(K), a = n.values.length <= Bi ? new Ci(n.values, o, r) : new ki(n.name, n.values, K(n.name), o, r);
2992
+ function Qi(n, t, e, i, o) {
2993
+ const s = n.values.find(
2994
+ (u) => t.getValue(n.name, u)?.isSelected === !0
2995
+ ), r = n.values.map(K), a = n.values.length <= Zi ? new Ti(n.values, s, r) : new Ri(n.name, n.values, K(n.name), s, r);
2925
2996
  return a.onSelect((u) => {
2926
- t.dispatch(T.SELECT, { attribute: n.name, value: u }, !0).defaultPrevented || i(n.name, u);
2927
- }), s(n.name, (u) => {
2928
- a.setSelected(u.value), t.dispatch(T.SELECTED, { attribute: n.name, value: u.value });
2997
+ e.dispatch(T.SELECT, { attribute: n.name, value: u }, !0).defaultPrevented || i(n.name, u);
2998
+ }), o(n.name, (u) => {
2999
+ a.setSelected(u.value), e.dispatch(T.SELECTED, { attribute: n.name, value: u.value });
2929
3000
  }), {
2930
3001
  element: a.element,
2931
3002
  setSelectable: (u) => {
@@ -2933,10 +3004,10 @@ function Hi(n, e, t, i, s) {
2933
3004
  }
2934
3005
  };
2935
3006
  }
2936
- const qi = 80, Gi = 2500;
2937
- class Zi {
2938
- constructor(e, t = Gi) {
2939
- this.configuration = e, this.resetMs = t, this.element = document.createElement("div"), this.element.className = "vd-commerce vd-hidden";
3007
+ const Ki = 80, Xi = 2500;
3008
+ class Ji {
3009
+ constructor(t, e = Xi) {
3010
+ this.configuration = t, this.resetMs = e, this.element = document.createElement("div"), this.element.className = "vd-commerce vd-hidden";
2940
3011
  const i = document.createElement("div");
2941
3012
  i.className = "vd-commerce-price", this.priceEl = document.createElement("span"), this.priceEl.className = "vd-price", this.vatEl = document.createElement("span"), this.vatEl.className = "vd-vat", i.append(this.priceEl, this.vatEl), this.button = new v({ variant: "default", onClick: () => {
2942
3013
  this.handleSubmit();
@@ -2956,30 +3027,30 @@ class Zi {
2956
3027
  /** Re-render from the facade. Called on every resolve and on submit-handler registration. */
2957
3028
  update() {
2958
3029
  this.renderPrice(this.configuration.current), this.renderButton();
2959
- const e = this.configuration.current !== void 0 || this.configuration.submitEnabled;
2960
- this.element.classList.toggle("vd-hidden", !e);
3030
+ const t = this.configuration.current !== void 0 || this.configuration.submitEnabled;
3031
+ this.element.classList.toggle("vd-hidden", !t);
2961
3032
  }
2962
3033
  destroy() {
2963
3034
  this.unsubscribe(), this.resetTimer !== void 0 && clearTimeout(this.resetTimer), this.element.remove();
2964
3035
  }
2965
- renderPrice(e) {
2966
- if (e === void 0) {
3036
+ renderPrice(t) {
3037
+ if (t === void 0) {
2967
3038
  this.priceEl.textContent = "", this.vatEl.textContent = "";
2968
3039
  return;
2969
3040
  }
2970
- this.priceEl.textContent = Wi(e.price, e.currency), this.vatEl.textContent = pe(this.configuration.vatDisplay);
3041
+ this.priceEl.textContent = to(t.price, t.currency), this.vatEl.textContent = mt(this.configuration.vatDisplay);
2971
3042
  }
2972
3043
  renderButton() {
2973
- const e = this.configuration.submitEnabled;
2974
- this.button.element.classList.toggle("vd-hidden", !e), e && this.state === "idle" && this.setButtonText(pe(this.configuration.buttonLabel));
3044
+ const t = this.configuration.submitEnabled;
3045
+ this.button.element.classList.toggle("vd-hidden", !t), t && this.state === "idle" && this.setButtonText(mt(this.configuration.buttonLabel));
2975
3046
  }
2976
3047
  async handleSubmit() {
2977
3048
  if (this.state !== "busy") {
2978
- this.setState("busy", Xn());
3049
+ this.setState("busy", ni());
2979
3050
  try {
2980
- await this.configuration.submit(), this.setState("success", ni());
3051
+ await this.configuration.submit(), this.setState("success", ri());
2981
3052
  } catch {
2982
- this.setState("failed", ri());
3053
+ this.setState("failed", ui());
2983
3054
  }
2984
3055
  this.scheduleReset();
2985
3056
  }
@@ -2989,43 +3060,43 @@ class Zi {
2989
3060
  this.state = "idle", this.update();
2990
3061
  }, this.resetMs);
2991
3062
  }
2992
- setState(e, t) {
2993
- this.state = e, this.element.dataset.submit = e, this.button.element.disabled = e === "busy", this.setButtonText(t);
3063
+ setState(t, e) {
3064
+ this.state = t, this.element.dataset.submit = t, this.button.element.disabled = t === "busy", this.setButtonText(e);
2994
3065
  }
2995
- setButtonText(e) {
2996
- this.button.element.textContent = e, this.button.element.setAttribute("aria-label", e);
3066
+ setButtonText(t) {
3067
+ this.button.element.textContent = t, this.button.element.setAttribute("aria-label", t);
2997
3068
  }
2998
3069
  }
2999
- function pe(n) {
3000
- return (n ?? "").slice(0, qi);
3070
+ function mt(n) {
3071
+ return (n ?? "").slice(0, Ki);
3001
3072
  }
3002
- function Wi(n, e) {
3073
+ function to(n, t) {
3003
3074
  try {
3004
- const t = new Intl.NumberFormat(m(), { style: "currency", currency: e }), i = t.resolvedOptions().maximumFractionDigits ?? 2;
3005
- return t.format(n / 10 ** i);
3075
+ const e = new Intl.NumberFormat(p(), { style: "currency", currency: t }), i = e.resolvedOptions().maximumFractionDigits ?? 2;
3076
+ return e.format(n / 10 ** i);
3006
3077
  } catch {
3007
- return `${e} ${(n / 100).toFixed(2)}`;
3078
+ return `${t} ${(n / 100).toFixed(2)}`;
3008
3079
  }
3009
3080
  }
3010
- class Re {
3081
+ class Rt {
3011
3082
  slot = null;
3012
3083
  panel = null;
3013
- attach(e, t) {
3014
- this.panel = t, t.style.display = "none", this.slot = document.createElement("div"), this.slot.className = "vd-slot-bottom-left", this.slot.appendChild(t), e.appendChild(this.slot);
3084
+ attach(t, e) {
3085
+ this.panel = e, e.style.display = "none", this.slot = document.createElement("div"), this.slot.className = "vd-slot-bottom-left", this.slot.appendChild(e), t.appendChild(this.slot);
3015
3086
  }
3016
- setVisible(e) {
3017
- this.panel !== null && (this.panel.style.display = e ? "flex" : "none");
3087
+ setVisible(t) {
3088
+ this.panel !== null && (this.panel.style.display = t ? "flex" : "none");
3018
3089
  }
3019
3090
  destroy() {
3020
3091
  this.slot?.remove(), this.slot = null, this.panel = null;
3021
3092
  }
3022
3093
  }
3023
- const Yi = 572;
3024
- class Qi {
3094
+ const eo = 572;
3095
+ class no {
3025
3096
  /** @param actionBarSlot The shared corner slot the AR/fullscreen buttons live in — the
3026
3097
  * "open configurator" toggle joins them there instead of floating as its own overlay. */
3027
- constructor(e) {
3028
- this.actionBarSlot = e;
3098
+ constructor(t) {
3099
+ this.actionBarSlot = t;
3029
3100
  }
3030
3101
  actionBarSlot;
3031
3102
  element = null;
@@ -3037,71 +3108,71 @@ class Qi {
3037
3108
  collapsible = !1;
3038
3109
  expanded = !0;
3039
3110
  visible = !1;
3040
- attach(e, t) {
3041
- this.container = e, t.classList.add("vd-attributes-sidebar"), this.closeButton = new v({
3111
+ attach(t, e) {
3112
+ this.container = t, e.classList.add("vd-attributes-sidebar"), this.closeButton = new v({
3042
3113
  variant: "ghost",
3043
3114
  size: "icon-sm",
3044
- label: Sn(),
3045
- icon: b.close({ size: 18 }),
3115
+ label: kn(),
3116
+ icon: g.close({ size: 18 }),
3046
3117
  onClick: () => {
3047
3118
  this.expanded = !1, this.render();
3048
3119
  }
3049
3120
  });
3050
3121
  const i = document.createElement("div");
3051
- i.className = "vd-sidebar-header", i.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(i, this.body), e.appendChild(this.element), this.openButton = new v({
3122
+ i.className = "vd-sidebar-header", i.appendChild(this.closeButton.element), this.body = document.createElement("div"), this.body.className = "vd-sidebar-body", this.body.appendChild(e), this.element = document.createElement("div"), this.element.className = "vd-sidebar vd-hidden", this.element.append(i, this.body), t.appendChild(this.element), this.openButton = new v({
3052
3123
  variant: "outline",
3053
3124
  size: "icon",
3054
- label: gn(),
3055
- icon: b.configurator({ size: 18 }),
3125
+ label: Sn(),
3126
+ icon: g.configurator({ size: 18 }),
3056
3127
  onClick: () => {
3057
3128
  this.expanded = !0, this.render();
3058
3129
  }
3059
3130
  }), this.openButton.element.classList.add("vd-configurator-toggle", "vd-hidden"), this.actionBarSlot.appendChild(this.openButton.element), this.observe();
3060
3131
  }
3061
- setVisible(e) {
3062
- this.visible = e, this.render();
3132
+ setVisible(t) {
3133
+ this.visible = t, this.render();
3063
3134
  }
3064
3135
  destroy() {
3065
3136
  this.observer?.disconnect(), this.observer = null, this.openButton?.element.remove(), this.element?.remove(), this.container?.classList.remove("vd-layout-sidebar-right", "vd-layout-sidebar-permanent"), this.container = null;
3066
3137
  }
3067
3138
  observe() {
3068
- typeof ResizeObserver > "u" || this.container === null || (this.observer = new ResizeObserver((e) => {
3069
- const t = e[0]?.contentRect.width ?? 0;
3070
- this.setCollapsible(t > 0 && t < Yi);
3139
+ typeof ResizeObserver > "u" || this.container === null || (this.observer = new ResizeObserver((t) => {
3140
+ const e = t[0]?.contentRect.width ?? 0;
3141
+ this.setCollapsible(e > 0 && e < eo);
3071
3142
  }), this.observer.observe(this.container));
3072
3143
  }
3073
- setCollapsible(e) {
3074
- e !== this.collapsible && (this.collapsible = e, this.expanded = !e, this.render());
3144
+ setCollapsible(t) {
3145
+ t !== this.collapsible && (this.collapsible = t, this.expanded = !t, this.render());
3075
3146
  }
3076
3147
  render() {
3077
3148
  if (this.element === null || this.openButton === null || this.closeButton === null || this.container === null)
3078
3149
  return;
3079
- const e = this.visible && this.expanded, t = this.visible && !this.expanded;
3080
- 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);
3150
+ const t = this.visible && this.expanded, e = this.visible && !this.expanded;
3151
+ this.element.classList.toggle("vd-hidden", !this.visible), this.element.classList.toggle("vd-sidebar-collapsed", e), this.openButton.element.classList.toggle("vd-hidden", !e), this.closeButton.element.style.display = this.collapsible ? "" : "none", this.container.classList.toggle("vd-layout-sidebar-right", t), this.container.classList.toggle("vd-layout-sidebar-permanent", t && !this.collapsible);
3081
3152
  }
3082
3153
  }
3083
- class Ki {
3084
- attach(e, t) {
3154
+ class io {
3155
+ attach(t, e) {
3085
3156
  }
3086
- setVisible(e) {
3157
+ setVisible(t) {
3087
3158
  }
3088
3159
  destroy() {
3089
3160
  }
3090
3161
  }
3091
- const Xi = {
3092
- "inframe-bottom-left": () => new Re(),
3093
- "sidebar-right": (n) => new Qi(n),
3094
- hidden: () => new Ki()
3162
+ const oo = {
3163
+ "inframe-bottom-left": () => new Rt(),
3164
+ "sidebar-right": (n) => new no(n),
3165
+ hidden: () => new io()
3095
3166
  };
3096
- function Ji(n, e) {
3097
- return (Xi[n ?? ""] ?? (() => new Re()))(e);
3167
+ function so(n, t) {
3168
+ return (oo[n ?? ""] ?? (() => new Rt()))(t);
3098
3169
  }
3099
3170
  const Z = w.fontFamily.sans.join(", "), W = `
3100
3171
  position: absolute;
3101
3172
  display: flex;
3102
3173
  z-index: 10;
3103
3174
  transition: inset-inline-end 0.18s ease;
3104
- `, es = `
3175
+ `, ro = `
3105
3176
  /* Override browser's default black fullscreen backdrop */
3106
3177
  .vd-container:fullscreen {
3107
3178
  background: oklch(100% 0 0);
@@ -3139,7 +3210,7 @@ const Z = w.fontFamily.sans.join(", "), W = `
3139
3210
  display: flex;
3140
3211
  flex-direction: column;
3141
3212
  gap: ${l[1]};
3142
- background: color-mix(in oklch, ${p.white} 85%, transparent);
3213
+ background: color-mix(in oklch, ${m.white} 85%, transparent);
3143
3214
  backdrop-filter: blur(8px);
3144
3215
  border-radius: ${l[2]};
3145
3216
  padding: ${l[2]};
@@ -3167,12 +3238,12 @@ const Z = w.fontFamily.sans.join(", "), W = `
3167
3238
  display: flex;
3168
3239
  flex-direction: column;
3169
3240
  gap: ${l[3]};
3170
- background: color-mix(in oklch, ${p.white} 85%, transparent);
3241
+ background: color-mix(in oklch, ${m.white} 85%, transparent);
3171
3242
  backdrop-filter: blur(8px);
3172
- border: 1px solid color-mix(in oklch, ${p.neutral[900]} 8%, transparent);
3243
+ border: 1px solid color-mix(in oklch, ${m.neutral[900]} 8%, transparent);
3173
3244
  border-radius: ${l[3]};
3174
3245
  padding: ${l[3]};
3175
- box-shadow: 0 ${l[1]} ${l[4]} color-mix(in oklch, ${p.neutral[900]} 6%, transparent);
3246
+ box-shadow: 0 ${l[1]} ${l[4]} color-mix(in oklch, ${m.neutral[900]} 6%, transparent);
3176
3247
  font-family: ${Z};
3177
3248
  }
3178
3249
 
@@ -3186,7 +3257,7 @@ const Z = w.fontFamily.sans.join(", "), W = `
3186
3257
  .vd-attribute-label {
3187
3258
  font-size: ${w.fontSize.xs};
3188
3259
  font-weight: ${w.fontWeight.medium};
3189
- color: ${p.neutral[500]};
3260
+ color: ${m.neutral[500]};
3190
3261
  text-transform: uppercase;
3191
3262
  letter-spacing: 0.05em;
3192
3263
  font-family: ${Z};
@@ -3225,10 +3296,10 @@ const Z = w.fontFamily.sans.join(", "), W = `
3225
3296
  z-index: 11;
3226
3297
  display: flex;
3227
3298
  flex-direction: column;
3228
- background: color-mix(in oklch, ${p.white} 90%, transparent);
3299
+ background: color-mix(in oklch, ${m.white} 90%, transparent);
3229
3300
  backdrop-filter: blur(10px);
3230
- border-inline-start: 1px solid color-mix(in oklch, ${p.neutral[900]} 8%, transparent);
3231
- box-shadow: -${l[1]} 0 ${l[4]} color-mix(in oklch, ${p.neutral[900]} 5%, transparent);
3301
+ border-inline-start: 1px solid color-mix(in oklch, ${m.neutral[900]} 8%, transparent);
3302
+ box-shadow: -${l[1]} 0 ${l[4]} color-mix(in oklch, ${m.neutral[900]} 5%, transparent);
3232
3303
  }
3233
3304
 
3234
3305
  @media (prefers-reduced-motion: no-preference) {
@@ -3270,7 +3341,7 @@ const Z = w.fontFamily.sans.join(", "), W = `
3270
3341
  flex-direction: column;
3271
3342
  gap: ${l[2]};
3272
3343
  padding-block-start: ${l[3]};
3273
- border-block-start: 1px solid color-mix(in oklch, ${p.neutral[900]} 8%, transparent);
3344
+ border-block-start: 1px solid color-mix(in oklch, ${m.neutral[900]} 8%, transparent);
3274
3345
  font-family: ${Z};
3275
3346
  }
3276
3347
 
@@ -3283,12 +3354,12 @@ const Z = w.fontFamily.sans.join(", "), W = `
3283
3354
  .vd-price {
3284
3355
  font-size: ${w.fontSize.lg};
3285
3356
  font-weight: ${w.fontWeight.semibold};
3286
- color: ${p.neutral[900]};
3357
+ color: ${m.neutral[900]};
3287
3358
  }
3288
3359
 
3289
3360
  .vd-vat {
3290
3361
  font-size: ${w.fontSize.xs};
3291
- color: ${p.neutral[500]};
3362
+ color: ${m.neutral[500]};
3292
3363
  }
3293
3364
 
3294
3365
  .vd-cta {
@@ -3298,23 +3369,23 @@ const Z = w.fontFamily.sans.join(", "), W = `
3298
3369
 
3299
3370
  /* Failed submit is the one place red belongs: a clear, recoverable error state. */
3300
3371
  .vd-commerce[data-submit="failed"] .vd-cta {
3301
- background: ${p.semantic.error};
3302
- border-color: ${p.semantic.error};
3303
- color: ${p.white};
3372
+ background: ${m.semantic.error};
3373
+ border-color: ${m.semantic.error};
3374
+ color: ${m.white};
3304
3375
  }
3305
3376
 
3306
3377
  `;
3307
- function ts() {
3308
- if (xe(), document.getElementById("vd-styles") !== null)
3378
+ function ao() {
3379
+ if (xt(), document.getElementById("vd-styles") !== null)
3309
3380
  return;
3310
3381
  const n = document.createElement("style");
3311
- n.id = "vd-styles", n.textContent = es, document.head.appendChild(n);
3382
+ n.id = "vd-styles", n.textContent = ro, document.head.appendChild(n);
3312
3383
  }
3313
- function ns(n, e) {
3314
- const t = document.createElement("a");
3315
- t.href = `data:image/png;base64,${n}`, t.download = e, t.click();
3384
+ function lo(n, t) {
3385
+ const e = document.createElement("a");
3386
+ e.href = `data:image/png;base64,${n}`, e.download = t, e.click();
3316
3387
  }
3317
- class is {
3388
+ class co {
3318
3389
  options;
3319
3390
  settings = {};
3320
3391
  container = null;
@@ -3330,11 +3401,11 @@ class is {
3330
3401
  lastSelectable = null;
3331
3402
  layout = null;
3332
3403
  commerce = null;
3333
- constructor(e) {
3334
- this.options = e;
3404
+ constructor(t) {
3405
+ this.options = t;
3335
3406
  }
3336
- attach(e) {
3337
- ts(), this.container = e, this.loading = new Mi(e), this.slots.topRight = this.createSlot(e, "vd-slot-top-right"), this.slots.bottomRight = this.createSlot(e, "vd-slot-bottom-right");
3407
+ attach(t) {
3408
+ ao(), this.container = t, this.loading = new Bi(t), this.slots.topRight = this.createSlot(t, "vd-slot-top-right"), this.slots.bottomRight = this.createSlot(t, "vd-slot-bottom-right");
3338
3409
  }
3339
3410
  onReady() {
3340
3411
  this.loading?.hide(), this.loading = null, this.mountToolbar(), this.cameraControls !== null && (this.cameraControls.element.style.display = "flex"), this.layout?.setVisible(!0);
@@ -3342,44 +3413,45 @@ class is {
3342
3413
  mountToolbar() {
3343
3414
  if (this.actionBar !== null || this.slots.bottomRight === null || this.container === null)
3344
3415
  return;
3345
- const e = typeof this.container.requestFullscreen == "function";
3346
- this.actionBar = new zi({
3416
+ const t = typeof this.container.requestFullscreen == "function";
3417
+ this.actionBar = new Ui({
3347
3418
  onAr: this.options.onAr,
3348
- onFullscreen: e ? () => {
3419
+ onFullscreen: t ? () => {
3349
3420
  this.toggleFullscreen();
3350
- } : void 0
3421
+ } : void 0,
3422
+ onAnnotationsToggle: this.options.onAnnotationsToggle
3351
3423
  }), this.actionBar.applySettings(this.settings), this.slots.bottomRight.appendChild(this.actionBar.element), this.syncScreenshotButton(), this.placeScreenshotButton();
3352
3424
  }
3353
3425
  toggleFullscreen() {
3354
3426
  this.container !== null && (document.fullscreenElement !== null ? document.exitFullscreen() : (this.options.onFullscreenEnter?.(), this.container.requestFullscreen()));
3355
3427
  }
3356
- updateProgress(e, t) {
3357
- this.loading?.updateProgress(e, t);
3428
+ updateProgress(t, e) {
3429
+ this.loading?.updateProgress(t, e);
3358
3430
  }
3359
- showError(e) {
3360
- this.loading?.showError(e);
3431
+ showError(t) {
3432
+ this.loading?.showError(t);
3361
3433
  }
3362
- applyViewerSettings(e) {
3363
- this.settings = e, e.language !== void 0 && we(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();
3434
+ applyViewerSettings(t) {
3435
+ this.settings = t, t.language !== void 0 && wt(t.language, { reload: !1 }), this.syncScreenshotButton(), this.actionBar?.applySettings(t), this.cameraControls !== null && (this.cameraControls.element.style.display = t.cameraControls === !0 ? "flex" : "none"), this.placeScreenshotButton();
3364
3436
  }
3365
- renderAttributeControls(e, t) {
3366
- if (!(this.container === null || this.slots.topRight === null || this.slots.bottomRight === null) && (this.cameraControls?.element.remove(), this.cameraControls = null, this.teardownConfigurator(), this.settings.cameraControls === !0 && (this.cameraControls = new z(
3437
+ renderAttributeControls(t, e) {
3438
+ if (!(this.container === null || this.slots.topRight === null || this.slots.bottomRight === null) && (this.cameraControls?.element.remove(), this.cameraControls = null, this.teardownConfigurator(), this.settings.cameraControls === !0 && (this.cameraControls = new P(
3367
3439
  this.options.cameraApi,
3368
3440
  this.options.cameraPositionApi
3369
- ), this.cameraControls.element.style.display = "none", this.slots.topRight.appendChild(this.cameraControls.element)), this.placeScreenshotButton(), t.length !== 0)) {
3441
+ ), this.cameraControls.element.style.display = "none", this.slots.topRight.appendChild(this.cameraControls.element)), this.placeScreenshotButton(), e.length !== 0)) {
3370
3442
  this.attributes = document.createElement("div"), this.attributes.className = "vd-attributes", this.groupHandles = /* @__PURE__ */ new Map();
3371
- for (const i of t) {
3372
- const s = ji(
3443
+ for (const i of e) {
3444
+ const o = Yi(
3373
3445
  i,
3374
- e,
3446
+ t,
3375
3447
  this.options.eventBus,
3376
3448
  this.options.onSelect,
3377
3449
  this.options.onSelectTransient,
3378
3450
  this.options.onSubscribe
3379
3451
  );
3380
- this.groupHandles.set(i.name, s), this.attributes.appendChild(s.element);
3452
+ this.groupHandles.set(i.name, o), this.attributes.appendChild(o.element);
3381
3453
  }
3382
- this.commerce = new Zi(this.options.configuration), this.attributes.appendChild(this.commerce.element), this.layout = Ji(
3454
+ this.commerce = new Ji(this.options.configuration), this.attributes.appendChild(this.commerce.element), this.layout = so(
3383
3455
  this.settings.configuratorLayout,
3384
3456
  this.slots.bottomRight
3385
3457
  ), this.layout.attach(this.container, this.attributes), this.lastSelectable !== null && this.applySelectable(this.lastSelectable);
@@ -3391,11 +3463,11 @@ class is {
3391
3463
  * does not name are unrestricted. The interface renders, it never knows
3392
3464
  * the exclusion rules (kiesbaarheid live, binding-studio task 17).
3393
3465
  */
3394
- applySelectable(e) {
3395
- this.lastSelectable = e;
3396
- for (const [t, i] of this.groupHandles) {
3397
- const s = e.find((o) => o.name === t);
3398
- i.setSelectable(s?.selectable ?? null), i.setHidden(s?.hidden === !0);
3466
+ applySelectable(t) {
3467
+ this.lastSelectable = t;
3468
+ for (const [e, i] of this.groupHandles) {
3469
+ const o = t.find((s) => s.name === e);
3470
+ i.setSelectable(o?.selectable ?? null), i.setHidden(o?.hidden === !0);
3399
3471
  }
3400
3472
  }
3401
3473
  get viewerSettings() {
@@ -3407,70 +3479,70 @@ class is {
3407
3479
  }
3408
3480
  destroy() {
3409
3481
  this.loading?.destroy(), this.screenshotBtn?.element.remove(), this.actionBar?.destroy(), this.actionBar?.element.remove(), this.cameraControls?.element.remove(), this.teardownConfigurator();
3410
- for (const e of Object.values(this.slots))
3411
- e?.remove();
3482
+ for (const t of Object.values(this.slots))
3483
+ t?.remove();
3412
3484
  this.container = null;
3413
3485
  }
3414
- createSlot(e, t) {
3486
+ createSlot(t, e) {
3415
3487
  const i = document.createElement("div");
3416
- return i.className = t, e.appendChild(i), i;
3488
+ return i.className = e, t.appendChild(i), i;
3417
3489
  }
3418
3490
  syncScreenshotButton() {
3419
- const e = this.settings.screenshot === !0;
3420
- e && this.screenshotBtn === null && (this.screenshotBtn = new v({
3491
+ const t = this.settings.screenshot === !0;
3492
+ t && this.screenshotBtn === null && (this.screenshotBtn = new v({
3421
3493
  variant: "outline",
3422
3494
  size: "icon",
3423
- label: hn(),
3424
- icon: b.screenshot(),
3495
+ label: gn(),
3496
+ icon: g.screenshot(),
3425
3497
  onClick: () => {
3426
- this.options.snapshotApi.take("snapshot.png").onDeveloped(({ data: t, filename: i }) => {
3427
- ns(t, i);
3498
+ this.options.snapshotApi.take("snapshot.png").onDeveloped(({ data: e, filename: i }) => {
3499
+ lo(e, i);
3428
3500
  });
3429
3501
  }
3430
- })), !e && this.screenshotBtn !== null && (this.screenshotBtn.element.remove(), this.screenshotBtn = null);
3502
+ })), !t && this.screenshotBtn !== null && (this.screenshotBtn.element.remove(), this.screenshotBtn = null);
3431
3503
  }
3432
3504
  placeScreenshotButton() {
3433
3505
  this.screenshotBtn === null || this.slots.topRight === null || (this.cameraControls !== null ? this.cameraControls.element.appendChild(this.screenshotBtn.element) : this.slots.topRight.appendChild(this.screenshotBtn.element));
3434
3506
  }
3435
3507
  }
3436
- const ss = {};
3437
- class os {
3508
+ const uo = {};
3509
+ class ho {
3438
3510
  defaultServer = "https://server.virtualdisplay.io";
3439
3511
  options;
3440
3512
  serverHost;
3441
3513
  extraParams;
3442
- constructor(e, t, i) {
3443
- this.options = e, this.serverHost = t, this.extraParams = i;
3514
+ constructor(t, e, i) {
3515
+ this.options = t, this.serverHost = e, this.extraParams = i;
3444
3516
  }
3445
3517
  /**
3446
3518
  * Create container and iframe, attach to parent element
3447
3519
  */
3448
3520
  create() {
3449
- const e = this.createContainer(), t = this.createIframe();
3450
- return e.appendChild(t), this.attachToParent(e), { container: e, iframe: t };
3521
+ const t = this.createContainer(), e = this.createIframe();
3522
+ return t.appendChild(e), this.attachToParent(t), { container: t, iframe: e };
3451
3523
  }
3452
3524
  createContainer() {
3453
- const e = document.createElement("div");
3454
- return e.className = "vd-container", Object.assign(e.style, {
3525
+ const t = document.createElement("div");
3526
+ return t.className = "vd-container", Object.assign(t.style, {
3455
3527
  position: "relative",
3456
3528
  width: "100%",
3457
3529
  height: "100%",
3458
3530
  overflow: "hidden"
3459
- }), e;
3531
+ }), t;
3460
3532
  }
3461
3533
  createIframe() {
3462
- const e = document.createElement("iframe");
3463
- return e.src = this.buildUrl(), e.setAttribute("allow", "xr-spatial-tracking; fullscreen"), e;
3534
+ const t = document.createElement("iframe");
3535
+ return t.src = this.buildUrl(), t.setAttribute("allow", "xr-spatial-tracking; fullscreen"), t;
3464
3536
  }
3465
- attachToParent(e) {
3466
- this.getParentElement().appendChild(e);
3537
+ attachToParent(t) {
3538
+ this.getParentElement().appendChild(t);
3467
3539
  }
3468
3540
  buildUrl() {
3469
- const e = this.getServerUrl(), t = new URL(e);
3470
- this.setAddressParams(t), this.options.language !== void 0 && t.searchParams.set("language", this.options.language), this.options.session !== void 0 && t.searchParams.set("session", this.options.session), this.options.debug === !0 && t.searchParams.set("debug", "true"), this.options.traceparent !== void 0 && t.searchParams.set("traceparent", this.options.traceparent);
3471
- for (const [i, s] of Object.entries(this.extraParams ?? {}))
3472
- t.searchParams.set(i, s);
3473
- return t.toString();
3541
+ const t = this.getServerUrl(), e = new URL(t);
3542
+ this.setAddressParams(e), this.options.language !== void 0 && e.searchParams.set("language", this.options.language), this.options.session !== void 0 && e.searchParams.set("session", this.options.session), this.options.debug === !0 && e.searchParams.set("debug", "true"), this.options.traceparent !== void 0 && e.searchParams.set("traceparent", this.options.traceparent);
3543
+ for (const [i, o] of Object.entries(this.extraParams ?? {}))
3544
+ e.searchParams.set(i, o);
3545
+ return e.toString();
3474
3546
  }
3475
3547
  /**
3476
3548
  * Put the address form on the URL. `app` names an app row; the
@@ -3478,67 +3550,67 @@ class os {
3478
3550
  * given, `app` wins and the pair is ignored with a warning, so adding `app`
3479
3551
  * to an existing integration is additive rather than a swap.
3480
3552
  */
3481
- setAddressParams(e) {
3553
+ setAddressParams(t) {
3482
3554
  if (this.options.app === void 0) {
3483
- e.searchParams.set("license", this.options.license), e.searchParams.set("model", this.options.model);
3555
+ t.searchParams.set("license", this.options.license), t.searchParams.set("model", this.options.model);
3484
3556
  return;
3485
3557
  }
3486
- e.searchParams.set("app", this.options.app), (this.options.license !== void 0 || this.options.model !== void 0) && C.warn("Both `app` and `license`/`model` were supplied: `app` wins, the pair was ignored");
3558
+ t.searchParams.set("app", this.options.app), (this.options.license !== void 0 || this.options.model !== void 0) && C.warn("Both `app` and `license`/`model` were supplied: `app` wins, the pair was ignored");
3487
3559
  }
3488
3560
  getServerUrl() {
3489
3561
  if (this.serverHost !== void 0)
3490
3562
  return this.serverHost;
3491
- if (ss?.VITE_VIRTUALDISPLAY_SERVER_HOST === void 0)
3563
+ if (uo?.VITE_VIRTUALDISPLAY_SERVER_HOST === void 0)
3492
3564
  return this.defaultServer;
3493
3565
  }
3494
3566
  getParentElement() {
3495
3567
  if (typeof this.options.parent != "string")
3496
3568
  return this.options.parent;
3497
- const e = document.querySelector(this.options.parent);
3498
- if (e === null)
3499
- throw g.parentNotFound(this.options.parent);
3500
- return e;
3569
+ const t = document.querySelector(this.options.parent);
3570
+ if (t === null)
3571
+ throw y.parentNotFound(this.options.parent);
3572
+ return t;
3501
3573
  }
3502
3574
  }
3503
- function rs(n) {
3504
- const { messenger: e } = n;
3505
- e.on(c.HANDSHAKE, (t) => {
3506
- Me(t) && (C.info("Server handshake received, flushing publisher queue"), e.markReady());
3507
- }), e.on(c.SESSION, (t) => {
3508
- ze(t) && n.onSession(t.sessionId);
3509
- }), e.on(c.MUTATION, (t) => {
3510
- Fe(t) && (n.attributes.handleMutationResult(t), n.configuration.handleSelectionChanged(n.attributes.getSelection()));
3511
- }), e.on(c.SNAPSHOT, (t) => {
3512
- De(t) && n.snapshot.handleSnapshotResult(t);
3513
- }), e.on(c.CAMERA, (t) => {
3514
- $e(t) && n.cameraPosition.handlePositionUpdate(t);
3515
- }), e.on(c.LOADING_INDICATOR, (t) => {
3516
- Be(t) && (t.error !== void 0 ? n.ui.showError(t.error) : n.ui.updateProgress(t.progress, t.phase));
3517
- }), e.on(c.CONFIG, (t) => {
3518
- He(t) && n.applyConfig(t);
3519
- }), e.on(c.MAPPING, (t) => {
3520
- Ue(t) && (n.attributes.handleMappingReceived(t), n.configuration.handleSelectionChanged(n.attributes.getSelection()), n.ui.renderAttributeControls(n.attributes, t.attributes), n.readyStateTracker.handleMappingReceived());
3521
- }), as(n);
3522
- }
3523
- function as(n) {
3524
- const { messenger: e } = n;
3525
- e.on(c.FOCUS, (t) => {
3526
- qe(t) && n.focus.handleStateReceived(t);
3527
- }), e.on(c.PRICING, (t) => {
3528
- Ge(t) && n.configuration.handlePricingReceived(t.pricing);
3529
- }), e.on(c.SYNC, (t) => {
3530
- Ve(t) && n.onSync(t.connected);
3531
- }), e.on(c.SELECTABLE, (t) => {
3532
- je(t) && (n.selectable.handleSnapshot(t), n.ui.applySelectable(t.attributes));
3533
- }), e.on(c.APP_RESOLVED, (t) => {
3534
- Pe(t) && n.onAppResolved(t);
3575
+ function po(n) {
3576
+ const { messenger: t } = n;
3577
+ t.on(c.HANDSHAKE, (e) => {
3578
+ Nt(e) && (C.info("Server handshake received, flushing publisher queue"), t.markReady());
3579
+ }), t.on(c.SESSION, (e) => {
3580
+ zt(e) && n.onSession(e.sessionId);
3581
+ }), t.on(c.MUTATION, (e) => {
3582
+ Ft(e) && (n.attributes.handleMutationResult(e), n.configuration.handleSelectionChanged(n.attributes.getSelection()));
3583
+ }), t.on(c.SNAPSHOT, (e) => {
3584
+ Dt(e) && n.snapshot.handleSnapshotResult(e);
3585
+ }), t.on(c.CAMERA, (e) => {
3586
+ $t(e) && n.cameraPosition.handlePositionUpdate(e);
3587
+ }), t.on(c.LOADING_INDICATOR, (e) => {
3588
+ Ut(e) && (e.error !== void 0 ? n.ui.showError(e.error) : n.ui.updateProgress(e.progress, e.phase));
3589
+ }), t.on(c.CONFIG, (e) => {
3590
+ Ht(e) && n.applyConfig(e);
3591
+ }), t.on(c.MAPPING, (e) => {
3592
+ Bt(e) && (n.attributes.handleMappingReceived(e), n.configuration.handleSelectionChanged(n.attributes.getSelection()), n.ui.renderAttributeControls(n.attributes, e.attributes), n.readyStateTracker.handleMappingReceived());
3593
+ }), mo(n);
3594
+ }
3595
+ function mo(n) {
3596
+ const { messenger: t } = n;
3597
+ t.on(c.FOCUS, (e) => {
3598
+ qt(e) && n.focus.handleStateReceived(e);
3599
+ }), t.on(c.PRICING, (e) => {
3600
+ Gt(e) && n.configuration.handlePricingReceived(e.pricing);
3601
+ }), t.on(c.SYNC, (e) => {
3602
+ Vt(e) && n.onSync(e.connected);
3603
+ }), t.on(c.SELECTABLE, (e) => {
3604
+ jt(e) && (n.selectable.handleSnapshot(e), n.ui.applySelectable(e.attributes));
3605
+ }), t.on(c.APP_RESOLVED, (e) => {
3606
+ Pt(e) && n.onAppResolved(e);
3535
3607
  });
3536
3608
  }
3537
- class ls {
3609
+ class fo {
3538
3610
  ready = !1;
3539
3611
  onReady;
3540
- constructor(e) {
3541
- this.onReady = e;
3612
+ constructor(t) {
3613
+ this.onReady = t;
3542
3614
  }
3543
3615
  handleMappingReceived() {
3544
3616
  this.ready || (this.ready = !0, C.info("Mapping received from server, client is now ready"), this.onReady?.());
@@ -3550,13 +3622,13 @@ class ls {
3550
3622
  this.ready = !1;
3551
3623
  }
3552
3624
  }
3553
- function cs(n) {
3625
+ function go(n) {
3554
3626
  if (n === void 0)
3555
3627
  return;
3556
- const { annotations: e, ...t } = n;
3557
- return e === void 0 ? t : e === !0 ? { ...t, annotations: "show" } : e === !1 ? { ...t, annotations: "hide" } : { ...t, annotations: e };
3628
+ const { annotations: t, ...e } = n;
3629
+ return t === void 0 ? e : t === !0 ? { ...e, annotations: "show" } : t === !1 ? { ...e, annotations: "hide" } : { ...e, annotations: t };
3558
3630
  }
3559
- class us {
3631
+ class bo {
3560
3632
  attributes;
3561
3633
  selectableState;
3562
3634
  readyStateTracker;
@@ -3585,56 +3657,74 @@ class us {
3585
3657
  /** Which app the viewer resolved, once reported (APP_RESOLVED). */
3586
3658
  resolvedApp;
3587
3659
  appResolvedCallbacks = [];
3588
- constructor(e, t) {
3589
- this.options = e;
3590
- const i = t ?? {};
3591
- this.serverHost = i.serverHost, this.iframeParams = i.iframeParams, this.initializeLogging(), this.messenger = new Ze(
3660
+ constructor(t, e) {
3661
+ this.options = t;
3662
+ const i = e ?? {};
3663
+ this.serverHost = i.serverHost, this.iframeParams = i.iframeParams, this.initializeLogging(), this.messenger = new Zt(
3592
3664
  () => this.iframe?.contentWindow ?? null,
3593
3665
  i.messengerOptions
3594
3666
  );
3595
- const s = (o) => {
3596
- this.messenger.send(o);
3667
+ const o = (s) => {
3668
+ this.messenger.send(s);
3597
3669
  };
3598
- this.attributes = new pt(s, F, (o, r) => {
3599
- this.notifyMutationFailed(o, r);
3600
- }), this.selectableState = new ft(), this.snapshotApi = new kt(s), this.annotationsApi = new We(s, F), this.cameraApi = new gt(s), this.cameraPositionApi = new bt(), this.focusApi = new wt(s, (o) => {
3601
- this.dispatchFocusChange(o);
3602
- }, F), this.configurationApi = new St(
3603
- (o) => {
3604
- this.dispatchConfigurationChange(o);
3670
+ this.attributes = new me(o, L, (s, r) => {
3671
+ this.notifyMutationFailed(s, r);
3672
+ }), this.selectableState = new fe(), this.snapshotApi = new _e(o), this.annotationsApi = new Wt(o, L), this.cameraApi = new ge(o), this.cameraPositionApi = new be(), this.focusApi = new we(o, (s) => {
3673
+ this.dispatchFocusChange(s);
3674
+ }, L), this.configurationApi = new Se(
3675
+ (s) => {
3676
+ this.dispatchConfigurationChange(s);
3605
3677
  },
3606
- (o) => {
3607
- this.dispatchConfigurationSubmit(o);
3678
+ (s) => {
3679
+ this.dispatchConfigurationSubmit(s);
3608
3680
  }
3609
- ), this.eventBus = new _t(), this.arActivation = i.createArActivation?.(s), this.syncTracker = i.createSyncTracker?.(), this.readyStateTracker = new ls(() => {
3681
+ ), this.eventBus = new ke(), this.arActivation = i.createArActivation?.(o), this.syncTracker = i.createSyncTracker?.(), this.readyStateTracker = new fo(() => {
3610
3682
  this.notifyReady();
3611
- }), this.ui = this.createStandardInterface(), this.wireIncomingMessages(), i.registerHandlers?.(this.messenger, s), this.messenger.start(), this.createAndConnectIframe();
3683
+ }), this.ui = this.createStandardInterface(), this.wireIncomingMessages(), i.registerHandlers?.(this.messenger, o), this.messenger.start(), this.createAndConnectIframe();
3612
3684
  }
3613
3685
  /** The configurator UI, every callback bridging it to the facade that owns the action. */
3614
3686
  createStandardInterface() {
3615
- const e = this.arActivation;
3616
- return new is({
3687
+ const t = this.arActivation;
3688
+ return new co({
3617
3689
  snapshotApi: this.snapshotApi,
3618
3690
  cameraApi: this.cameraApi,
3619
3691
  cameraPositionApi: this.cameraPositionApi,
3620
3692
  eventBus: this.eventBus,
3621
3693
  configuration: this.configurationApi,
3622
- onSelect: (t, i) => this.attributes.select(t, i),
3623
- onSelectTransient: (t, i) => this.attributes.selectTransient(t, i),
3624
- onSubscribe: (t, i) => this.attributes.onChange(t, i),
3625
- ...e !== void 0 && {
3694
+ onSelect: (e, i) => this.attributes.select(e, i),
3695
+ onSelectTransient: (e, i) => this.attributes.selectTransient(e, i),
3696
+ onSubscribe: (e, i) => this.attributes.onChange(e, i),
3697
+ ...t !== void 0 && {
3626
3698
  onAr: () => {
3627
- e.activate();
3699
+ t.activate();
3628
3700
  }
3629
3701
  },
3630
3702
  onFullscreenEnter: () => {
3631
3703
  this.trackFullscreen();
3704
+ },
3705
+ onAnnotationsToggle: (e) => {
3706
+ this.sendControlAnnotationToggle(e);
3632
3707
  }
3633
3708
  });
3634
3709
  }
3710
+ /**
3711
+ * The visible toggle composes its message here, on the internal transport,
3712
+ * because it is the one sender allowed to stamp `origin: 'control'`: the
3713
+ * viewer only counts control-originated flips as Shopper use. The public
3714
+ * `client.annotations` facade stays origin-less on purpose. One send per
3715
+ * member instance once composition lands; today the host is the only one.
3716
+ */
3717
+ sendControlAnnotationToggle(t) {
3718
+ this.messenger.send({
3719
+ type: c.ANNOTATION_TOGGLE,
3720
+ instance: L,
3721
+ enabled: t,
3722
+ origin: "control"
3723
+ });
3724
+ }
3635
3725
  /** Wire the inbound viewer protocol to the facades. */
3636
3726
  wireIncomingMessages() {
3637
- rs({
3727
+ po({
3638
3728
  messenger: this.messenger,
3639
3729
  attributes: this.attributes,
3640
3730
  selectable: this.selectableState,
@@ -3644,85 +3734,85 @@ class us {
3644
3734
  focus: this.focusApi,
3645
3735
  ui: this.ui,
3646
3736
  readyStateTracker: this.readyStateTracker,
3647
- applyConfig: (e) => {
3648
- this.handleConfig(e);
3737
+ applyConfig: (t) => {
3738
+ this.handleConfig(t);
3649
3739
  },
3650
- onSession: (e) => {
3651
- this.handleSession(e);
3740
+ onSession: (t) => {
3741
+ this.handleSession(t);
3652
3742
  },
3653
- onSync: (e) => {
3654
- this.syncTracker?.handleSync(e);
3743
+ onSync: (t) => {
3744
+ this.syncTracker?.handleSync(t);
3655
3745
  },
3656
- onAppResolved: (e) => {
3746
+ onAppResolved: (t) => {
3657
3747
  this.handleAppResolved({
3658
- appType: e.appType,
3659
- name: e.name,
3660
- ...e.slug !== void 0 && { slug: e.slug },
3661
- ...e.submit !== void 0 && { submit: e.submit }
3748
+ appType: t.appType,
3749
+ name: t.name,
3750
+ ...t.slug !== void 0 && { slug: t.slug },
3751
+ ...t.submit !== void 0 && { submit: t.submit }
3662
3752
  });
3663
3753
  }
3664
3754
  });
3665
3755
  }
3666
3756
  /** Store the resolved app and notify every registered `onAppResolved` callback. */
3667
- handleAppResolved(e) {
3668
- this.resolvedApp = e;
3669
- for (const t of this.appResolvedCallbacks)
3670
- t(e);
3757
+ handleAppResolved(t) {
3758
+ this.resolvedApp = t;
3759
+ for (const e of this.appResolvedCallbacks)
3760
+ e(t);
3671
3761
  }
3672
3762
  /** Store the tracking session id and hand it to the AR flow, which waits on it for the QR. */
3673
- handleSession(e) {
3674
- this.viewerSessionId = e, this.arActivation?.onSession(e);
3763
+ handleSession(t) {
3764
+ this.viewerSessionId = t, this.arActivation?.onSession(t);
3675
3765
  }
3676
3766
  /** Forward a failed mutation to every registered `onMutationFailed` callback. */
3677
- notifyMutationFailed(e, t) {
3767
+ notifyMutationFailed(t, e) {
3678
3768
  for (const i of this.mutationFailedCallbacks)
3679
- i({ attribute: e, value: t });
3769
+ i({ attribute: t, value: e });
3680
3770
  }
3681
3771
  /** Flush the queued `onReady` callbacks once, then let the standard interface know. */
3682
3772
  notifyReady() {
3683
- const e = this.readyCallbacks;
3773
+ const t = this.readyCallbacks;
3684
3774
  this.readyCallbacks = [];
3685
- for (const t of e)
3686
- t(this);
3775
+ for (const e of t)
3776
+ e(this);
3687
3777
  this.ui.onReady();
3688
3778
  }
3689
3779
  /**
3690
3780
  * Dispatch a bubbling `vd:focus-change` event on the container so a page can
3691
3781
  * react to focus without registering an `onChange` callback.
3692
3782
  */
3693
- dispatchFocusChange(e) {
3783
+ dispatchFocusChange(t) {
3694
3784
  this.container?.dispatchEvent(
3695
- new CustomEvent(T.FOCUS_CHANGE, { detail: e, bubbles: !0 })
3785
+ new CustomEvent(T.FOCUS_CHANGE, { detail: t, bubbles: !0 })
3696
3786
  );
3697
3787
  }
3698
3788
  /**
3699
3789
  * Dispatch a bubbling `vd:configuration-change` event on the container so a
3700
3790
  * page or tag manager can react to price changes without a client callback.
3701
3791
  */
3702
- dispatchConfigurationChange(e) {
3792
+ dispatchConfigurationChange(t) {
3703
3793
  this.container?.dispatchEvent(
3704
- new CustomEvent(T.CONFIGURATION_CHANGE, { detail: e ?? null, bubbles: !0 })
3794
+ new CustomEvent(T.CONFIGURATION_CHANGE, { detail: t ?? null, bubbles: !0 })
3705
3795
  );
3706
3796
  }
3707
3797
  /** Dispatch a bubbling `vd:configuration-submit` event when the CTA is used. */
3708
- dispatchConfigurationSubmit(e) {
3798
+ dispatchConfigurationSubmit(t) {
3709
3799
  this.container?.dispatchEvent(
3710
- new CustomEvent(T.CONFIGURATION_SUBMIT, { detail: e, bubbles: !0 })
3800
+ new CustomEvent(T.CONFIGURATION_SUBMIT, { detail: t, bubbles: !0 })
3711
3801
  );
3712
3802
  }
3713
- handleConfig(e) {
3714
- const t = e.viewerSettings, i = cs(this.options.viewerSettings);
3715
- if (t !== void 0 || i !== void 0) {
3716
- const s = i !== void 0 ? { ...t ?? {}, ...i } : t;
3717
- if (i !== void 0 && t !== void 0) {
3718
- const o = Object.entries(i).filter(([r, a]) => t[r] !== a).map(
3719
- ([r, a]) => `${r} (metadata: ${t[r] ?? "undefined"}, override: ${a})`
3803
+ handleConfig(t) {
3804
+ const e = t.viewerSettings, i = go(this.options.viewerSettings);
3805
+ if (e !== void 0 || i !== void 0) {
3806
+ const o = i !== void 0 ? { ...e ?? {}, ...i } : e;
3807
+ if (i !== void 0 && e !== void 0) {
3808
+ const s = Object.entries(i).filter(([r, a]) => e[r] !== a).map(
3809
+ ([r, a]) => `${r} (metadata: ${e[r] ?? "undefined"}, override: ${a})`
3720
3810
  );
3721
- o.length > 0 && C.warn(`Viewer settings override active: ${o.join(", ")}`);
3811
+ s.length > 0 && C.warn(`Viewer settings override active: ${s.join(", ")}`);
3722
3812
  }
3723
- this.ui.applyViewerSettings(s), this.echoAnnotationsDifference(t?.annotations, s.annotations);
3813
+ this.ui.applyViewerSettings(o), this.echoAnnotationsDifference(e?.annotations, o.annotations);
3724
3814
  }
3725
- this.cameraPositionApi.applyLimits(e.cameraLimits);
3815
+ this.cameraPositionApi.applyLimits(t.cameraLimits);
3726
3816
  }
3727
3817
  /**
3728
3818
  * The difference echo: the viewer already applied the app-config mode
@@ -3731,54 +3821,54 @@ class us {
3731
3821
  * direction. Equal modes echo nothing, so a boot without overrides sends
3732
3822
  * no toggle at all.
3733
3823
  */
3734
- echoAnnotationsDifference(e, t) {
3735
- t === void 0 || t === e || this.annotationsApi.setEnabled(t === "show" || t === "toggle-shown");
3824
+ echoAnnotationsDifference(t, e) {
3825
+ e === void 0 || e === t || this.annotationsApi.setEnabled(e === "show" || e === "toggle-shown");
3736
3826
  }
3737
3827
  /** Tell the viewer the user entered fullscreen, so it records the engagement. */
3738
3828
  trackFullscreen() {
3739
3829
  this.messenger.send({ type: c.FULLSCREEN });
3740
3830
  }
3741
3831
  initializeLogging() {
3742
- this.options.debug === !0 && mt(), C.info("Initializing Virtualdisplay client", {
3832
+ this.options.debug === !0 && pe(), C.info("Initializing Virtualdisplay client", {
3743
3833
  ...this.options.app === void 0 ? { model: this.options.model } : { app: this.options.app }
3744
3834
  });
3745
3835
  }
3746
3836
  createAndConnectIframe() {
3747
- const t = new os(this.options, this.serverHost, this.iframeParams).create();
3748
- this.container = t.container, this.iframe = t.iframe, this.eventBus.attach(this.container), this.ui.attach(this.container);
3837
+ const e = new ho(this.options, this.serverHost, this.iframeParams).create();
3838
+ this.container = e.container, this.iframe = e.iframe, this.eventBus.attach(this.container), this.ui.attach(this.container);
3749
3839
  try {
3750
3840
  const i = new URL(this.iframe.src).origin;
3751
3841
  this.messenger.setTargetOrigin(i);
3752
3842
  } catch {
3753
3843
  }
3754
3844
  }
3755
- select(e, t) {
3756
- this.attributes.select(e, t);
3845
+ select(t, e) {
3846
+ this.attributes.select(t, e);
3757
3847
  }
3758
- getValues(e) {
3759
- return this.attributes.getValues(e);
3848
+ getValues(t) {
3849
+ return this.attributes.getValues(t);
3760
3850
  }
3761
- getValue(e, t) {
3762
- return this.attributes.getValue(e, t);
3851
+ getValue(t, e) {
3852
+ return this.attributes.getValue(t, e);
3763
3853
  }
3764
- onChange(e, t) {
3765
- this.attributes.onChange(e, t);
3854
+ onChange(t, e) {
3855
+ this.attributes.onChange(t, e);
3766
3856
  }
3767
- getAttribute(e) {
3768
- return this.attributes.getAttribute(e);
3857
+ getAttribute(t) {
3858
+ return this.attributes.getAttribute(t);
3769
3859
  }
3770
3860
  get isReady() {
3771
3861
  return this.readyStateTracker.isReady;
3772
3862
  }
3773
- onReady(e) {
3863
+ onReady(t) {
3774
3864
  if (this.readyStateTracker.isReady) {
3775
- e(this);
3865
+ t(this);
3776
3866
  return;
3777
3867
  }
3778
- this.readyCallbacks.push(e);
3868
+ this.readyCallbacks.push(t);
3779
3869
  }
3780
- onMutationFailed(e) {
3781
- this.mutationFailedCallbacks.push(e);
3870
+ onMutationFailed(t) {
3871
+ this.mutationFailedCallbacks.push(t);
3782
3872
  }
3783
3873
  /**
3784
3874
  * Subscribe to the viewer's selectability snapshots (kiesbaarheid live):
@@ -3787,20 +3877,20 @@ class us {
3787
3877
  * exclusions never sends one: everything stays selectable and this never
3788
3878
  * fires.
3789
3879
  */
3790
- onSelectableChange(e) {
3791
- this.selectableState.onChange(e);
3880
+ onSelectableChange(t) {
3881
+ this.selectableState.onChange(t);
3792
3882
  }
3793
3883
  /**
3794
3884
  * Subscribe to which app this viewer resolved (type, name, public submit
3795
3885
  * settings). Reported once by the viewer after its resolve; fires immediately
3796
3886
  * when the report already arrived, so registration order does not matter.
3797
3887
  */
3798
- onAppResolved(e) {
3799
- this.appResolvedCallbacks.push(e), this.resolvedApp !== void 0 && e(this.resolvedApp);
3888
+ onAppResolved(t) {
3889
+ this.appResolvedCallbacks.push(t), this.resolvedApp !== void 0 && t(this.resolvedApp);
3800
3890
  }
3801
3891
  /** The selectable values for one attribute right now, or null when unrestricted. */
3802
- getSelectable(e) {
3803
- return this.selectableState.selectableFor(e);
3892
+ getSelectable(t) {
3893
+ return this.selectableState.selectableFor(t);
3804
3894
  }
3805
3895
  /**
3806
3896
  * Trigger the composed AR flow directly (ar-session-handoff task 035): a host
@@ -3812,8 +3902,8 @@ class us {
3812
3902
  activateAr() {
3813
3903
  this.arActivation?.activate();
3814
3904
  }
3815
- on(e, t) {
3816
- this.eventBus.on(e, t);
3905
+ on(t, e) {
3906
+ this.eventBus.on(t, e);
3817
3907
  }
3818
3908
  get annotations() {
3819
3909
  return this.annotationsApi;
@@ -3844,15 +3934,15 @@ class us {
3844
3934
  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;
3845
3935
  }
3846
3936
  }
3847
- const ds = "ar.virtualdisplay.io";
3848
- function hs(n) {
3849
- const e = new URL(`https://${ds}/go`);
3850
- return n.sessionId !== void 0 ? e.searchParams.set("session", n.sessionId) : n.app !== void 0 ? e.searchParams.set("app", n.app) : n.license !== void 0 && n.model !== void 0 && (e.searchParams.set("license", n.license), e.searchParams.set("model", n.model)), e.toString();
3937
+ const vo = "ar.virtualdisplay.io";
3938
+ function yo(n) {
3939
+ const t = new URL(`https://${vo}/go`);
3940
+ return n.sessionId !== void 0 ? t.searchParams.set("session", n.sessionId) : n.app !== void 0 ? t.searchParams.set("app", n.app) : n.license !== void 0 && n.model !== void 0 && (t.searchParams.set("license", n.license), t.searchParams.set("model", n.model)), t.toString();
3851
3941
  }
3852
- const ms = 1500;
3853
- class ps {
3942
+ const So = 1500;
3943
+ class wo {
3854
3944
  options;
3855
- qrModal = new Ti();
3945
+ qrModal = new Ni();
3856
3946
  /** The viewer's tracking session id, once the engine announces it (SESSION). */
3857
3947
  sessionId;
3858
3948
  /** Callbacks waiting on the SESSION message, resolved (or timed out) exactly once each. */
@@ -3861,20 +3951,20 @@ class ps {
3861
3951
  pendingTimers = /* @__PURE__ */ new Set();
3862
3952
  /** Set on destroy: an in-flight hand-off must not re-mount the modal or send QR_SHOWN. */
3863
3953
  destroyed = !1;
3864
- constructor(e) {
3865
- this.options = e;
3954
+ constructor(t) {
3955
+ this.options = t;
3866
3956
  }
3867
3957
  /** Store the engine-announced tracking session id and resolve anyone waiting on it. */
3868
- onSession(e) {
3869
- this.sessionId = e;
3870
- const t = this.waiters;
3958
+ onSession(t) {
3959
+ this.sessionId = t;
3960
+ const e = this.waiters;
3871
3961
  this.waiters = [];
3872
- for (const i of t)
3873
- i(e);
3962
+ for (const i of e)
3963
+ i(t);
3874
3964
  }
3875
3965
  /** The AR button handler: mobile activates AR in the engine, desktop shows the hand-off QR. */
3876
3966
  activate() {
3877
- if (dt()) {
3967
+ if (de()) {
3878
3968
  this.options.send({ type: c.AR_ACTIVATE });
3879
3969
  return;
3880
3970
  }
@@ -3882,8 +3972,8 @@ class ps {
3882
3972
  }
3883
3973
  destroy() {
3884
3974
  this.destroyed = !0;
3885
- for (const e of this.pendingTimers)
3886
- clearTimeout(e);
3975
+ for (const t of this.pendingTimers)
3976
+ clearTimeout(t);
3887
3977
  this.pendingTimers.clear(), this.waiters = [], this.qrModal.hide();
3888
3978
  }
3889
3979
  /**
@@ -3895,15 +3985,15 @@ class ps {
3895
3985
  */
3896
3986
  async showQrCode() {
3897
3987
  this.qrModal.show();
3898
- const e = await this.waitForSessionId();
3988
+ const t = await this.waitForSessionId();
3899
3989
  if (this.destroyed)
3900
3990
  return;
3901
- const t = hs({
3902
- sessionId: e,
3991
+ const e = yo({
3992
+ sessionId: t,
3903
3993
  app: this.options.app,
3904
3994
  license: this.options.license,
3905
3995
  model: this.options.model
3906
- }), i = await this.qrModal.update(t);
3996
+ }), i = await this.qrModal.update(e);
3907
3997
  if (this.destroyed) {
3908
3998
  this.qrModal.hide();
3909
3999
  return;
@@ -3917,61 +4007,61 @@ class ps {
3917
4007
  * rather than encoding a wrong one.
3918
4008
  */
3919
4009
  waitForSessionId() {
3920
- return this.sessionId !== void 0 ? Promise.resolve(this.sessionId) : new Promise((e) => {
3921
- const t = setTimeout(() => {
3922
- this.pendingTimers.delete(t), e(void 0);
3923
- }, ms);
3924
- this.pendingTimers.add(t), this.waiters.push((i) => {
3925
- this.pendingTimers.delete(t), clearTimeout(t), e(i);
4010
+ return this.sessionId !== void 0 ? Promise.resolve(this.sessionId) : new Promise((t) => {
4011
+ const e = setTimeout(() => {
4012
+ this.pendingTimers.delete(e), t(void 0);
4013
+ }, So);
4014
+ this.pendingTimers.add(e), this.waiters.push((i) => {
4015
+ this.pendingTimers.delete(e), clearTimeout(e), t(i);
3926
4016
  });
3927
4017
  });
3928
4018
  }
3929
4019
  }
3930
- class fs {
4020
+ class Co {
3931
4021
  callbacks = [];
3932
4022
  lastKnown;
3933
- handleSync(e) {
3934
- this.lastKnown = e;
3935
- for (const t of this.callbacks)
3936
- t(e);
4023
+ handleSync(t) {
4024
+ this.lastKnown = t;
4025
+ for (const e of this.callbacks)
4026
+ e(t);
3937
4027
  }
3938
- onChange(e) {
3939
- this.callbacks.push(e), this.lastKnown !== void 0 && e(this.lastKnown);
4028
+ onChange(t) {
4029
+ this.callbacks.push(t), this.lastKnown !== void 0 && t(this.lastKnown);
3940
4030
  }
3941
4031
  }
3942
- class vs extends us {
4032
+ class Ao extends bo {
3943
4033
  syncStatusTracker;
3944
- constructor(e) {
3945
- const t = new fs();
3946
- super(e, {
3947
- createArActivation: (i) => new ps({
3948
- app: e.app,
3949
- license: e.license,
3950
- model: e.model,
4034
+ constructor(t) {
4035
+ const e = new Co();
4036
+ super(t, {
4037
+ createArActivation: (i) => new wo({
4038
+ app: t.app,
4039
+ license: t.license,
4040
+ model: t.model,
3951
4041
  send: i
3952
4042
  }),
3953
- createSyncTracker: () => t
3954
- }), this.syncStatusTracker = t;
4043
+ createSyncTracker: () => e
4044
+ }), this.syncStatusTracker = e;
3955
4045
  }
3956
4046
  /** Subscribe to the live sync channel's connection state (ar-session-handoff). Latest-wins, no buffering. */
3957
- onSyncChange(e) {
3958
- this.syncStatusTracker.onChange(e);
4047
+ onSyncChange(t) {
4048
+ this.syncStatusTracker.onChange(t);
3959
4049
  }
3960
4050
  }
3961
4051
  export {
3962
- We as Annotations,
3963
- Qe as Attribute,
3964
- Ye as AttributeValue,
3965
- gt as Camera,
3966
- St as Configuration,
4052
+ Wt as Annotations,
4053
+ Qt as Attribute,
4054
+ Yt as AttributeValue,
4055
+ ge as Camera,
4056
+ Se as Configuration,
3967
4057
  A as ERROR_CODES,
3968
- wt as Focus,
3969
- Ct as Photo,
3970
- kt as Snapshot,
4058
+ we as Focus,
4059
+ Ce as Photo,
4060
+ _e as Snapshot,
3971
4061
  T as VD_EVENTS,
3972
- vs as VirtualdisplayClient,
3973
- g as VirtualdisplayError,
3974
- mt as enableDebugMode,
3975
- gs as isDebugMode,
4062
+ Ao as VirtualdisplayClient,
4063
+ y as VirtualdisplayError,
4064
+ pe as enableDebugMode,
4065
+ _o as isDebugMode,
3976
4066
  C as logger
3977
4067
  };