@virtualdisplay.io/client 4.0.0-alpha.22 → 4.0.0-alpha.24
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.
- package/CHANGELOG.md +12 -0
- package/dist/index.d.ts +15 -25
- package/dist/virtualdisplay.client.cjs.js +47 -57
- package/dist/virtualdisplay.client.es.js +639 -610
- package/dist/virtualdisplay.client.umd.js +50 -60
- package/package.json +1 -1
|
@@ -15,69 +15,69 @@ const c = {
|
|
|
15
15
|
PRICING: "pricing",
|
|
16
16
|
QR_SHOWN: "qr_shown",
|
|
17
17
|
SYNC: "sync"
|
|
18
|
-
},
|
|
18
|
+
}, tt = {
|
|
19
19
|
FOCUS: "focus",
|
|
20
20
|
UNFOCUS: "unfocus"
|
|
21
|
-
},
|
|
21
|
+
}, Tt = {
|
|
22
22
|
FOCUSED: "focused"
|
|
23
|
-
},
|
|
23
|
+
}, Rt = {
|
|
24
24
|
/** Behaves exactly like an unpriced combination: no price, no button. */
|
|
25
25
|
HIDDEN: "hidden"
|
|
26
|
-
},
|
|
27
|
-
function
|
|
26
|
+
}, It = new Set(Object.values(c));
|
|
27
|
+
function Ot(n) {
|
|
28
28
|
if (typeof n != "object" || n === null)
|
|
29
29
|
return !1;
|
|
30
30
|
const t = n;
|
|
31
|
-
return typeof t.target == "string" ? !1 : typeof t.type == "string" &&
|
|
31
|
+
return typeof t.target == "string" ? !1 : typeof t.type == "string" && It.has(t.type);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
const t =
|
|
33
|
+
function Nt(n) {
|
|
34
|
+
const t = S(n);
|
|
35
35
|
return t !== null && t.type === c.HANDSHAKE;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
const t =
|
|
37
|
+
function Lt(n) {
|
|
38
|
+
const t = S(n);
|
|
39
39
|
return t !== null && t.type === c.SESSION && typeof t.sessionId == "string";
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const t =
|
|
41
|
+
function Mt(n) {
|
|
42
|
+
const t = S(n);
|
|
43
43
|
return t !== null && t.type === c.MUTATION && Array.isArray(t.results);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
const t =
|
|
45
|
+
function zt(n) {
|
|
46
|
+
const t = S(n);
|
|
47
47
|
return t !== null && t.type === c.SNAPSHOT && ("data" in t || "error" in t);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
const t =
|
|
49
|
+
function Pt(n) {
|
|
50
|
+
const t = S(n);
|
|
51
51
|
return t !== null && t.type === c.CAMERA && Array.isArray(t.transforms);
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
const t =
|
|
53
|
+
function Ft(n) {
|
|
54
|
+
const t = S(n);
|
|
55
55
|
return t !== null && t.type === c.MAPPING && Array.isArray(t.attributes);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
const t =
|
|
57
|
+
function $t(n) {
|
|
58
|
+
const t = S(n);
|
|
59
59
|
return t !== null && t.type === c.LOADING_INDICATOR && typeof t.progress == "number";
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
const t =
|
|
61
|
+
function Dt(n) {
|
|
62
|
+
const t = S(n);
|
|
63
63
|
return t !== null && t.type === c.SYNC && typeof t.connected == "boolean";
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
const t =
|
|
65
|
+
function Bt(n) {
|
|
66
|
+
const t = S(n);
|
|
67
67
|
return t !== null && t.type === c.CONFIG && typeof t.viewerSettings == "object";
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
const t =
|
|
69
|
+
function Ut(n) {
|
|
70
|
+
const t = S(n);
|
|
71
71
|
return t !== null && t.type === c.FOCUS && typeof t.state == "string";
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
const t =
|
|
73
|
+
function Vt(n) {
|
|
74
|
+
const t = S(n);
|
|
75
75
|
return t !== null && t.type === c.PRICING && typeof t.pricing == "object" && t.pricing !== null;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function S(n) {
|
|
78
78
|
return typeof n != "object" || n === null ? null : n;
|
|
79
79
|
}
|
|
80
|
-
class
|
|
80
|
+
class et {
|
|
81
81
|
constructor(t) {
|
|
82
82
|
this.processor = t;
|
|
83
83
|
}
|
|
@@ -124,15 +124,14 @@ class Y {
|
|
|
124
124
|
this.pending.length = 0;
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
class
|
|
127
|
+
class jt {
|
|
128
128
|
constructor(t, e) {
|
|
129
|
-
this.getTarget = t, this.sourceId = `vd-${Math.random().toString(36).slice(2, 8)}`, this.targetOrigin =
|
|
129
|
+
this.getTarget = t, this.sourceId = `vd-${Math.random().toString(36).slice(2, 8)}`, this.targetOrigin = "*", this.isValid = e?.isValid ?? Ot, this.publisher = new et((i) => this.post(i)), this.consumer = new et((i) => this.routeToHandler(i)), e?.bufferIncoming !== !0 && this.consumer.markReady();
|
|
130
130
|
}
|
|
131
131
|
getTarget;
|
|
132
132
|
handlers = /* @__PURE__ */ new Map();
|
|
133
133
|
publisher;
|
|
134
134
|
consumer;
|
|
135
|
-
shouldBuffer;
|
|
136
135
|
listener = null;
|
|
137
136
|
sourceId;
|
|
138
137
|
targetOrigin;
|
|
@@ -143,12 +142,6 @@ class Dt {
|
|
|
143
142
|
on(t, e) {
|
|
144
143
|
this.handlers.set(t, e);
|
|
145
144
|
}
|
|
146
|
-
/**
|
|
147
|
-
* Remove a handler for a specific message type
|
|
148
|
-
*/
|
|
149
|
-
off(t) {
|
|
150
|
-
this.handlers.delete(t);
|
|
151
|
-
}
|
|
152
145
|
/**
|
|
153
146
|
* Update the target origin for outgoing postMessage calls.
|
|
154
147
|
* Use when the target origin is discovered at runtime (e.g. from the first incoming message).
|
|
@@ -166,20 +159,14 @@ class Dt {
|
|
|
166
159
|
/**
|
|
167
160
|
* Feed a message through the same routing path as one that just arrived via
|
|
168
161
|
* postMessage, without an actual postMessage round-trip: still validated
|
|
169
|
-
* against `isValid`, and still respects the consumer queue's buffering
|
|
170
|
-
*
|
|
162
|
+
* against `isValid`, and still respects the consumer queue's buffering. For
|
|
163
|
+
* a transport that delivers messages some
|
|
171
164
|
* other way than the iframe channel this messenger already listens on (the
|
|
172
165
|
* viewer engine's SSE-sourced live sync channel, ar-session-handoff) and
|
|
173
166
|
* needs them to land exactly where a postMessage would.
|
|
174
167
|
*/
|
|
175
168
|
receive(t) {
|
|
176
|
-
|
|
177
|
-
if (this.shouldBuffer !== null && !this.shouldBuffer(t)) {
|
|
178
|
-
this.routeToHandler(t);
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
this.consumer.enqueue(t);
|
|
182
|
-
}
|
|
169
|
+
this.isValid(t) && this.consumer.enqueue(t);
|
|
183
170
|
}
|
|
184
171
|
/**
|
|
185
172
|
* Enable sending and flush queued outgoing messages
|
|
@@ -212,10 +199,6 @@ class Dt {
|
|
|
212
199
|
if (i !== null && t.source !== null && t.source !== i)
|
|
213
200
|
return;
|
|
214
201
|
const o = e;
|
|
215
|
-
if (this.shouldBuffer !== null && !this.shouldBuffer(o)) {
|
|
216
|
-
this.routeToHandler(o);
|
|
217
|
-
return;
|
|
218
|
-
}
|
|
219
202
|
this.consumer.enqueue(o);
|
|
220
203
|
}, window.addEventListener("message", this.listener));
|
|
221
204
|
}
|
|
@@ -252,7 +235,7 @@ class Dt {
|
|
|
252
235
|
});
|
|
253
236
|
}
|
|
254
237
|
}
|
|
255
|
-
class
|
|
238
|
+
class Ht {
|
|
256
239
|
constructor(t) {
|
|
257
240
|
this.send = t;
|
|
258
241
|
}
|
|
@@ -264,7 +247,7 @@ class Bt {
|
|
|
264
247
|
});
|
|
265
248
|
}
|
|
266
249
|
}
|
|
267
|
-
class
|
|
250
|
+
class qt {
|
|
268
251
|
constructor(t, e) {
|
|
269
252
|
this.value = t, this.attribute = e;
|
|
270
253
|
}
|
|
@@ -307,7 +290,7 @@ class f extends Error {
|
|
|
307
290
|
return new f(t, A.INVALID_PARAMETER);
|
|
308
291
|
}
|
|
309
292
|
}
|
|
310
|
-
class
|
|
293
|
+
class Gt {
|
|
311
294
|
name;
|
|
312
295
|
defaultValue;
|
|
313
296
|
values;
|
|
@@ -359,18 +342,18 @@ class Vt {
|
|
|
359
342
|
createValues(t) {
|
|
360
343
|
const e = /* @__PURE__ */ new Map();
|
|
361
344
|
for (const i of t) {
|
|
362
|
-
const o = new
|
|
345
|
+
const o = new qt(i, this.name);
|
|
363
346
|
i === this.defaultValue && o.setSelected(!0), e.set(i, o);
|
|
364
347
|
}
|
|
365
348
|
return e;
|
|
366
349
|
}
|
|
367
350
|
}
|
|
368
|
-
class
|
|
351
|
+
class Zt {
|
|
369
352
|
attributes = /* @__PURE__ */ new Map();
|
|
370
353
|
constructor(t, e, i) {
|
|
371
354
|
for (const o of t) {
|
|
372
355
|
const s = this.buildOptions(o, e);
|
|
373
|
-
this.attributes.set(o.name, new
|
|
356
|
+
this.attributes.set(o.name, new Gt(s));
|
|
374
357
|
}
|
|
375
358
|
this.onMutationFailed = i;
|
|
376
359
|
}
|
|
@@ -407,18 +390,55 @@ class jt {
|
|
|
407
390
|
return t.defaultValue !== void 0 ? { ...i, defaultValue: t.defaultValue } : i;
|
|
408
391
|
}
|
|
409
392
|
}
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
393
|
+
const L = 4096, F = 16384, Wt = [1024, 256, 64], Yt = 20, Y = ["timestamp", "level", "msg", "service", "trace_id", "span_id"];
|
|
394
|
+
function Qt(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}=${I(a, L).line}`).join(" ");
|
|
396
|
+
return `${t} ${e} [${i}] ${o}${s ? " " + s : ""}`;
|
|
397
|
+
}
|
|
398
|
+
function Kt(n) {
|
|
399
|
+
for (const o of [L, ...Wt]) {
|
|
400
|
+
const { line: s, truncated: r } = I(n, o);
|
|
401
|
+
if (!r) {
|
|
402
|
+
if (s.length <= F)
|
|
403
|
+
return s;
|
|
404
|
+
continue;
|
|
405
|
+
}
|
|
406
|
+
const { line: a } = I({ ...n, log_truncated: !0 }, o);
|
|
407
|
+
if (a.length <= F)
|
|
408
|
+
return a;
|
|
409
|
+
}
|
|
410
|
+
const t = Object.keys(n).filter((o) => !Y.includes(o)), e = { ...Jt(n, Y), log_truncated: !0, log_dropped_count: t.length }, i = I({ ...e, log_dropped_attrs: t.slice(0, Yt) }, L);
|
|
411
|
+
return i.line.length <= F ? i.line : I(e, L).line;
|
|
412
|
+
}
|
|
413
|
+
function I(n, t) {
|
|
414
|
+
const e = [];
|
|
415
|
+
let i = !1;
|
|
416
|
+
return { line: JSON.stringify(n, function(r, a) {
|
|
417
|
+
if (typeof a == "string")
|
|
418
|
+
return a.length > t && (i = !0), Xt(a, t);
|
|
419
|
+
if (typeof a == "bigint")
|
|
420
|
+
return a.toString();
|
|
421
|
+
if (typeof a != "object" || a === null)
|
|
422
|
+
return a;
|
|
423
|
+
for (; e.length > 0 && e.at(-1) !== this; )
|
|
424
|
+
e.pop();
|
|
425
|
+
return e.includes(a) ? "[Circular]" : (e.push(a), a);
|
|
426
|
+
}), truncated: i };
|
|
427
|
+
}
|
|
428
|
+
function Xt(n, t) {
|
|
429
|
+
return n.length <= t ? n : `${n.slice(0, t)}...[truncated ${n.length - t} chars]`;
|
|
430
|
+
}
|
|
431
|
+
function Jt(n, t) {
|
|
432
|
+
const e = {};
|
|
433
|
+
for (const i of t)
|
|
434
|
+
n[i] !== void 0 && (e[i] = n[i]);
|
|
435
|
+
return e;
|
|
436
|
+
}
|
|
437
|
+
function te(n, t) {
|
|
438
|
+
const e = t ? Qt(n) : Kt(n);
|
|
419
439
|
n.level === "error" ? console.error(e) : n.level === "warn" ? console.warn(e) : console.log(e);
|
|
420
440
|
}
|
|
421
|
-
function
|
|
441
|
+
function mt(n, t = 0) {
|
|
422
442
|
const e = {
|
|
423
443
|
name: n.name,
|
|
424
444
|
message: n.message
|
|
@@ -430,36 +450,36 @@ function lt(n, t = 0) {
|
|
|
430
450
|
const o = n[i];
|
|
431
451
|
o !== void 0 && (e[i] = o);
|
|
432
452
|
}
|
|
433
|
-
return n.cause !== void 0 && n.cause !== null && (e.cause = n.cause instanceof Error && t < 5 ?
|
|
453
|
+
return n.cause !== void 0 && n.cause !== null && (e.cause = n.cause instanceof Error && t < 5 ? mt(n.cause, t + 1) : String(n.cause)), e;
|
|
434
454
|
}
|
|
435
|
-
function
|
|
455
|
+
function ee(n) {
|
|
436
456
|
const t = {};
|
|
437
457
|
for (const [e, i] of Object.entries(n))
|
|
438
|
-
t[e] = i instanceof Error ?
|
|
458
|
+
t[e] = i instanceof Error ? mt(i) : i;
|
|
439
459
|
return t;
|
|
440
460
|
}
|
|
441
|
-
function
|
|
461
|
+
function ne() {
|
|
442
462
|
return /* @__PURE__ */ new Date();
|
|
443
463
|
}
|
|
444
|
-
function
|
|
464
|
+
function ie(n) {
|
|
445
465
|
return n.toISOString();
|
|
446
466
|
}
|
|
447
|
-
function
|
|
467
|
+
function pt() {
|
|
448
468
|
return typeof navigator > "u" ? "" : navigator.userAgent;
|
|
449
469
|
}
|
|
450
|
-
function
|
|
470
|
+
function oe() {
|
|
451
471
|
return typeof navigator > "u" ? !1 : navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
|
|
452
472
|
}
|
|
453
|
-
function
|
|
454
|
-
return /iPhone|iPad|iPod/i.test(
|
|
473
|
+
function se() {
|
|
474
|
+
return /iPhone|iPad|iPod/i.test(pt()) || oe();
|
|
455
475
|
}
|
|
456
|
-
function
|
|
457
|
-
return /Android/i.test(
|
|
476
|
+
function re() {
|
|
477
|
+
return /Android/i.test(pt());
|
|
458
478
|
}
|
|
459
|
-
function
|
|
460
|
-
return
|
|
479
|
+
function ae() {
|
|
480
|
+
return se() || re();
|
|
461
481
|
}
|
|
462
|
-
class
|
|
482
|
+
class le {
|
|
463
483
|
constructor(t) {
|
|
464
484
|
this.config = t;
|
|
465
485
|
}
|
|
@@ -469,14 +489,14 @@ class te {
|
|
|
469
489
|
*/
|
|
470
490
|
log(t, e, i = {}) {
|
|
471
491
|
const o = this.config.traceProvider?.() ?? {}, s = {
|
|
472
|
-
timestamp:
|
|
492
|
+
timestamp: ie(ne()),
|
|
473
493
|
level: t,
|
|
474
494
|
msg: e,
|
|
475
495
|
service: this.config.service,
|
|
476
496
|
...o,
|
|
477
|
-
...
|
|
497
|
+
...ee(i)
|
|
478
498
|
};
|
|
479
|
-
|
|
499
|
+
te(s, this.config.isDev);
|
|
480
500
|
}
|
|
481
501
|
/**
|
|
482
502
|
* Log at DEBUG level (development only).
|
|
@@ -503,30 +523,30 @@ class te {
|
|
|
503
523
|
this.log("error", t, e);
|
|
504
524
|
}
|
|
505
525
|
}
|
|
506
|
-
function
|
|
526
|
+
function ft(n, t) {
|
|
507
527
|
const e = t?.isDev !== void 0 ? t.isDev : typeof process < "u" ? process.env.NODE_ENV !== "production" : !0;
|
|
508
|
-
return new
|
|
528
|
+
return new le({ service: n, isDev: e, traceProvider: t?.traceProvider });
|
|
509
529
|
}
|
|
510
|
-
function
|
|
530
|
+
function N(n) {
|
|
511
531
|
if (n !== void 0)
|
|
512
532
|
return typeof n == "object" && n !== null && !Array.isArray(n) && !(n instanceof Error) ? n : n instanceof Error ? { error: n.message } : { value: n };
|
|
513
533
|
}
|
|
514
|
-
function
|
|
534
|
+
function gt(n) {
|
|
515
535
|
return {
|
|
516
|
-
debug: (t, e) => n.debug(t,
|
|
517
|
-
info: (t, e) => n.info(t,
|
|
518
|
-
warn: (t, e) => n.warn(t,
|
|
519
|
-
error: (t, e) => n.error(t,
|
|
536
|
+
debug: (t, e) => n.debug(t, N(e)),
|
|
537
|
+
info: (t, e) => n.info(t, N(e)),
|
|
538
|
+
warn: (t, e) => n.warn(t, N(e)),
|
|
539
|
+
error: (t, e) => n.error(t, N(e))
|
|
520
540
|
};
|
|
521
541
|
}
|
|
522
|
-
let
|
|
523
|
-
function
|
|
524
|
-
|
|
542
|
+
let bt = !1, _ = gt(ft("client", { isDev: !1 }));
|
|
543
|
+
function ce() {
|
|
544
|
+
bt = !0, _ = gt(ft("client", { isDev: !0 }));
|
|
525
545
|
}
|
|
526
|
-
function
|
|
527
|
-
return
|
|
546
|
+
function lo() {
|
|
547
|
+
return bt;
|
|
528
548
|
}
|
|
529
|
-
class
|
|
549
|
+
class de {
|
|
530
550
|
constructor(t, e) {
|
|
531
551
|
this.send = t, this.onMutationFailed = e;
|
|
532
552
|
}
|
|
@@ -540,7 +560,7 @@ class ne {
|
|
|
540
560
|
handleMappingReceived(t) {
|
|
541
561
|
_.debug("Initializing from server mapping", {
|
|
542
562
|
attributeCount: t.attributes.length
|
|
543
|
-
}), this.registry = new
|
|
563
|
+
}), this.registry = new Zt(
|
|
544
564
|
t.attributes,
|
|
545
565
|
(e, i) => this.sendMutation(e, i),
|
|
546
566
|
this.onMutationFailed
|
|
@@ -605,7 +625,7 @@ class ne {
|
|
|
605
625
|
this.pendingCallbacks.length = 0;
|
|
606
626
|
}
|
|
607
627
|
}
|
|
608
|
-
let
|
|
628
|
+
let ue = class {
|
|
609
629
|
constructor(t) {
|
|
610
630
|
this.send = t;
|
|
611
631
|
}
|
|
@@ -668,7 +688,7 @@ let ie = class {
|
|
|
668
688
|
this.send(t);
|
|
669
689
|
}
|
|
670
690
|
};
|
|
671
|
-
class
|
|
691
|
+
class he {
|
|
672
692
|
state;
|
|
673
693
|
limitsState;
|
|
674
694
|
changeCallbacks = [];
|
|
@@ -756,20 +776,20 @@ class oe {
|
|
|
756
776
|
}
|
|
757
777
|
}
|
|
758
778
|
}
|
|
759
|
-
function
|
|
760
|
-
const e = n.filter((s) =>
|
|
779
|
+
function me(n, t) {
|
|
780
|
+
const e = n.filter((s) => pe(s, t));
|
|
761
781
|
if (e.length === 0)
|
|
762
782
|
return;
|
|
763
|
-
const i = Math.max(...e.map(
|
|
783
|
+
const i = Math.max(...e.map(nt)), o = e.filter((s) => nt(s) === i);
|
|
764
784
|
return o.length === 1 ? o[0] : void 0;
|
|
765
785
|
}
|
|
766
|
-
function
|
|
786
|
+
function pe(n, t) {
|
|
767
787
|
return Object.entries(n.attributes).every(([e, i]) => t[e] === i);
|
|
768
788
|
}
|
|
769
|
-
function
|
|
789
|
+
function nt(n) {
|
|
770
790
|
return Object.keys(n.attributes).length;
|
|
771
791
|
}
|
|
772
|
-
class
|
|
792
|
+
class fe {
|
|
773
793
|
constructor(t, e) {
|
|
774
794
|
this.dispatchChange = t, this.dispatchSubmit = e;
|
|
775
795
|
}
|
|
@@ -879,8 +899,8 @@ class ae {
|
|
|
879
899
|
resolve() {
|
|
880
900
|
if (this.pricing === void 0)
|
|
881
901
|
return;
|
|
882
|
-
const t =
|
|
883
|
-
if (!(t === void 0 || t.availability ===
|
|
902
|
+
const t = me(this.pricing.rules, this.selection);
|
|
903
|
+
if (!(t === void 0 || t.availability === Rt.HIDDEN))
|
|
884
904
|
return {
|
|
885
905
|
attributes: { ...this.selection },
|
|
886
906
|
reference: t.reference,
|
|
@@ -890,7 +910,7 @@ class ae {
|
|
|
890
910
|
};
|
|
891
911
|
}
|
|
892
912
|
}
|
|
893
|
-
class
|
|
913
|
+
class ge {
|
|
894
914
|
constructor(t, e) {
|
|
895
915
|
this.send = t, this.dispatch = e;
|
|
896
916
|
}
|
|
@@ -912,11 +932,11 @@ class le {
|
|
|
912
932
|
throw f.invalidParameter(
|
|
913
933
|
`set() requires a non-empty component name, got ${String(t)}`
|
|
914
934
|
);
|
|
915
|
-
this.send({ type: c.FOCUS, action:
|
|
935
|
+
this.send({ type: c.FOCUS, action: tt.FOCUS, component: t });
|
|
916
936
|
}
|
|
917
937
|
/** Return to the overview — unfocus the current component. */
|
|
918
938
|
clear() {
|
|
919
|
-
this.send({ type: c.FOCUS, action:
|
|
939
|
+
this.send({ type: c.FOCUS, action: tt.UNFOCUS });
|
|
920
940
|
}
|
|
921
941
|
/**
|
|
922
942
|
* Subscribe to focus changes. The callback fires with the focus state when a
|
|
@@ -927,14 +947,14 @@ class le {
|
|
|
927
947
|
}
|
|
928
948
|
/** Called by the client when a FocusStateMessage is received from the viewer. */
|
|
929
949
|
handleStateReceived(t) {
|
|
930
|
-
t.state ===
|
|
950
|
+
t.state === Tt.FOCUSED && t.component !== void 0 ? (this.focused = t.component, this.attributes = t.attributes ?? []) : (this.focused = null, this.attributes = []);
|
|
931
951
|
const e = this.focused !== null ? { component: this.focused, attributes: this.attributes } : null;
|
|
932
952
|
for (const i of this.changeCallbacks)
|
|
933
953
|
i(e);
|
|
934
954
|
this.dispatch(e);
|
|
935
955
|
}
|
|
936
956
|
}
|
|
937
|
-
class
|
|
957
|
+
class be {
|
|
938
958
|
constructor(t) {
|
|
939
959
|
this.filename = t;
|
|
940
960
|
}
|
|
@@ -987,8 +1007,8 @@ class ce {
|
|
|
987
1007
|
}), this.developedCallbacks.clear(), this.errorCallbacks.clear());
|
|
988
1008
|
}
|
|
989
1009
|
}
|
|
990
|
-
const
|
|
991
|
-
class
|
|
1010
|
+
const it = 3e4;
|
|
1011
|
+
class ve {
|
|
992
1012
|
constructor(t) {
|
|
993
1013
|
this.send = t;
|
|
994
1014
|
}
|
|
@@ -1004,12 +1024,12 @@ class de {
|
|
|
1004
1024
|
*/
|
|
1005
1025
|
take(t) {
|
|
1006
1026
|
this.validateFilename(t), _.debug("Taking snapshot", { filename: t });
|
|
1007
|
-
const e = new
|
|
1027
|
+
const e = new be(t), i = setTimeout(() => {
|
|
1008
1028
|
this.pendingPhotos.delete(t), _.warn("Snapshot timed out", { filename: t }), e.fail(new f(
|
|
1009
|
-
`Snapshot timed out: the viewer did not respond within ${
|
|
1029
|
+
`Snapshot timed out: the viewer did not respond within ${it}ms`,
|
|
1010
1030
|
A.SNAPSHOT_FAILED
|
|
1011
1031
|
));
|
|
1012
|
-
},
|
|
1032
|
+
}, it);
|
|
1013
1033
|
return this.pendingPhotos.set(t, { photo: e, timeout: i }), this.send({
|
|
1014
1034
|
type: c.SNAPSHOT,
|
|
1015
1035
|
filename: t
|
|
@@ -1075,7 +1095,7 @@ class de {
|
|
|
1075
1095
|
);
|
|
1076
1096
|
}
|
|
1077
1097
|
}
|
|
1078
|
-
class
|
|
1098
|
+
class ye {
|
|
1079
1099
|
container = null;
|
|
1080
1100
|
attach(t) {
|
|
1081
1101
|
this.container = t;
|
|
@@ -1096,626 +1116,636 @@ class ue {
|
|
|
1096
1116
|
};
|
|
1097
1117
|
}
|
|
1098
1118
|
}
|
|
1099
|
-
const
|
|
1119
|
+
const we = {}, _e = "en", vt = (
|
|
1100
1120
|
/** @type {const} */
|
|
1101
1121
|
["en", "nl", "de"]
|
|
1102
|
-
),
|
|
1122
|
+
), K = [
|
|
1103
1123
|
"baseLocale"
|
|
1104
|
-
],
|
|
1105
|
-
let tt, et;
|
|
1106
|
-
function pe(n) {
|
|
1107
|
-
if (J.length === 0)
|
|
1108
|
-
return;
|
|
1109
|
-
const t = typeof n == "string" ? n : n.href;
|
|
1110
|
-
if (tt === t)
|
|
1111
|
-
return et;
|
|
1112
|
-
const e = new URL(t, "http://dummy.com");
|
|
1113
|
-
let i;
|
|
1114
|
-
for (const o of J)
|
|
1115
|
-
if (new he(o.match, e.href).exec(e.href)) {
|
|
1116
|
-
i = o;
|
|
1117
|
-
break;
|
|
1118
|
-
}
|
|
1119
|
-
return tt = t, et = i, i;
|
|
1120
|
-
}
|
|
1121
|
-
function pt(n) {
|
|
1122
|
-
const t = pe(n);
|
|
1123
|
-
return t && t.exclude !== !0 && Array.isArray(t.strategy) ? t.strategy : Z;
|
|
1124
|
-
}
|
|
1125
|
-
const G = typeof window > "u";
|
|
1124
|
+
], ot = [], Q = typeof window > "u";
|
|
1126
1125
|
globalThis.__paraglide = /** @type {any} */
|
|
1127
1126
|
globalThis.__paraglide ?? {};
|
|
1128
1127
|
globalThis.__paraglide.ssr = /** @type {any} */
|
|
1129
1128
|
globalThis.__paraglide.ssr ?? {};
|
|
1130
|
-
let
|
|
1131
|
-
let n =
|
|
1132
|
-
!
|
|
1133
|
-
const t =
|
|
1129
|
+
let st = !1, u = () => {
|
|
1130
|
+
let n = K;
|
|
1131
|
+
!Q && typeof window < "u" && window.location?.href && (n = wt(window.location.href));
|
|
1132
|
+
const t = Se(n);
|
|
1134
1133
|
if (t)
|
|
1135
|
-
return
|
|
1134
|
+
return st || (st = !0, yt(t, { reload: !1 })), t;
|
|
1136
1135
|
throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found");
|
|
1137
1136
|
};
|
|
1138
|
-
function
|
|
1137
|
+
function Se(n, t) {
|
|
1139
1138
|
let e;
|
|
1140
1139
|
for (const i of n) {
|
|
1141
1140
|
if (i === "baseLocale")
|
|
1142
|
-
e =
|
|
1143
|
-
else if (
|
|
1144
|
-
const s =
|
|
1141
|
+
e = _e;
|
|
1142
|
+
else if (_t(i) && M.has(i)) {
|
|
1143
|
+
const s = M.get(i);
|
|
1145
1144
|
if (s) {
|
|
1146
1145
|
const r = s.getLocale();
|
|
1147
1146
|
if (r instanceof Promise)
|
|
1148
1147
|
continue;
|
|
1149
1148
|
if (r !== void 0)
|
|
1150
|
-
return
|
|
1149
|
+
return Ae(r);
|
|
1151
1150
|
}
|
|
1152
1151
|
}
|
|
1153
|
-
const o =
|
|
1152
|
+
const o = X(e);
|
|
1154
1153
|
if (o)
|
|
1155
1154
|
return o;
|
|
1156
1155
|
}
|
|
1157
1156
|
}
|
|
1158
|
-
const
|
|
1157
|
+
const Ce = (n) => {
|
|
1159
1158
|
window.location.reload();
|
|
1160
1159
|
};
|
|
1161
|
-
let
|
|
1160
|
+
let yt = (n, t) => {
|
|
1162
1161
|
const e = {
|
|
1163
1162
|
reload: !0,
|
|
1164
1163
|
...t
|
|
1165
1164
|
};
|
|
1166
1165
|
let i;
|
|
1167
1166
|
try {
|
|
1168
|
-
i =
|
|
1167
|
+
i = u();
|
|
1169
1168
|
} catch {
|
|
1170
1169
|
}
|
|
1171
1170
|
const o = [];
|
|
1172
|
-
let s =
|
|
1173
|
-
!
|
|
1174
|
-
for (const
|
|
1175
|
-
if (
|
|
1176
|
-
const
|
|
1177
|
-
if (
|
|
1178
|
-
let d =
|
|
1171
|
+
let s = K;
|
|
1172
|
+
!Q && typeof window < "u" && window.location?.href && (s = wt(window.location.href));
|
|
1173
|
+
for (const a of s)
|
|
1174
|
+
if (a !== "baseLocale" && _t(a) && M.has(a)) {
|
|
1175
|
+
const h = M.get(a);
|
|
1176
|
+
if (h) {
|
|
1177
|
+
let d = h.setLocale(n);
|
|
1179
1178
|
d instanceof Promise && (d = d.catch((p) => {
|
|
1180
|
-
throw new Error(`Custom strategy "${
|
|
1179
|
+
throw new Error(`Custom strategy "${a}" setLocale failed.`, {
|
|
1181
1180
|
cause: p
|
|
1182
1181
|
});
|
|
1183
1182
|
}), o.push(d));
|
|
1184
1183
|
}
|
|
1185
1184
|
}
|
|
1186
1185
|
const r = () => {
|
|
1187
|
-
!
|
|
1186
|
+
!Q && e.reload && window.location && n !== i && Ce();
|
|
1188
1187
|
};
|
|
1189
1188
|
if (o.length)
|
|
1190
1189
|
return Promise.all(o).then(() => {
|
|
1191
1190
|
r();
|
|
1192
1191
|
});
|
|
1193
1192
|
r();
|
|
1194
|
-
};
|
|
1195
|
-
function
|
|
1193
|
+
}, ke = () => typeof window < "u" ? window.location.origin : "http://fallback.com";
|
|
1194
|
+
function X(n) {
|
|
1196
1195
|
if (typeof n != "string")
|
|
1197
1196
|
return;
|
|
1198
1197
|
const t = n.toLowerCase();
|
|
1199
|
-
for (const e of
|
|
1198
|
+
for (const e of vt)
|
|
1200
1199
|
if (e.toLowerCase() === t)
|
|
1201
1200
|
return e;
|
|
1202
1201
|
}
|
|
1203
|
-
function
|
|
1204
|
-
const t =
|
|
1202
|
+
function Ae(n) {
|
|
1203
|
+
const t = X(n);
|
|
1205
1204
|
if (t)
|
|
1206
1205
|
return t;
|
|
1207
|
-
throw new Error(`Invalid locale: ${n}. Expected one of: ${
|
|
1206
|
+
throw new Error(`Invalid locale: ${n}. Expected one of: ${vt.join(", ")}`);
|
|
1207
|
+
}
|
|
1208
|
+
function Ee(n) {
|
|
1209
|
+
return xe(n);
|
|
1210
|
+
}
|
|
1211
|
+
function xe(n) {
|
|
1212
|
+
const t = typeof n == "string" ? new URL(n, ke()) : new URL(n), e = t.pathname.split("/").filter(Boolean);
|
|
1213
|
+
return e.length > 0 && X(e[0]) && (t.pathname = "/" + e.slice(1).join("/")), t;
|
|
1214
|
+
}
|
|
1215
|
+
let rt, at;
|
|
1216
|
+
function Te(n) {
|
|
1217
|
+
if (ot.length === 0)
|
|
1218
|
+
return;
|
|
1219
|
+
const t = typeof n == "string" ? n : n.href;
|
|
1220
|
+
if (rt === t)
|
|
1221
|
+
return at;
|
|
1222
|
+
const e = new URL(t, "http://example.com"), i = Ee(e), o = i.href === e.href ? [e] : [e, i];
|
|
1223
|
+
let s;
|
|
1224
|
+
for (const r of o) {
|
|
1225
|
+
for (const a of ot)
|
|
1226
|
+
if (new we(a.match, r.href).exec(r.href)) {
|
|
1227
|
+
s = a;
|
|
1228
|
+
break;
|
|
1229
|
+
}
|
|
1230
|
+
if (s)
|
|
1231
|
+
break;
|
|
1232
|
+
}
|
|
1233
|
+
return rt = t, at = s, s;
|
|
1208
1234
|
}
|
|
1209
|
-
|
|
1210
|
-
|
|
1235
|
+
function wt(n) {
|
|
1236
|
+
const t = Te(n);
|
|
1237
|
+
return t && t.exclude !== !0 && Array.isArray(t.strategy) ? t.strategy : K;
|
|
1238
|
+
}
|
|
1239
|
+
const M = /* @__PURE__ */ new Map();
|
|
1240
|
+
function _t(n) {
|
|
1211
1241
|
return typeof n == "string" && /^custom-[A-Za-z0-9_-]+$/.test(n);
|
|
1212
1242
|
}
|
|
1213
|
-
const
|
|
1243
|
+
const Re = (
|
|
1214
1244
|
/** @type {(inputs: Controls_Ar_Buttonlabel1Inputs) => LocalizedString} */
|
|
1215
1245
|
() => (
|
|
1216
1246
|
/** @type {LocalizedString} */
|
|
1217
1247
|
"Activate AR"
|
|
1218
1248
|
)
|
|
1219
|
-
),
|
|
1249
|
+
), Ie = (
|
|
1220
1250
|
/** @type {(inputs: Controls_Ar_Buttonlabel1Inputs) => LocalizedString} */
|
|
1221
1251
|
() => (
|
|
1222
1252
|
/** @type {LocalizedString} */
|
|
1223
1253
|
"AR activeren"
|
|
1224
1254
|
)
|
|
1225
|
-
),
|
|
1255
|
+
), Oe = (
|
|
1226
1256
|
/** @type {(inputs: Controls_Ar_Buttonlabel1Inputs) => LocalizedString} */
|
|
1227
1257
|
() => (
|
|
1228
1258
|
/** @type {LocalizedString} */
|
|
1229
1259
|
"AR aktivieren"
|
|
1230
1260
|
)
|
|
1231
|
-
),
|
|
1261
|
+
), Ne = (
|
|
1232
1262
|
/** @type {((inputs?: Controls_Ar_Buttonlabel1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Ar_Buttonlabel1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
|
|
1233
1263
|
((n = {}, t = {}) => {
|
|
1234
|
-
const e = t.locale ??
|
|
1235
|
-
return e === "
|
|
1264
|
+
const e = t.locale ?? u();
|
|
1265
|
+
return e === "nl" ? Ie() : e === "de" ? Oe() : Re();
|
|
1236
1266
|
})
|
|
1237
|
-
),
|
|
1267
|
+
), Le = (
|
|
1238
1268
|
/** @type {(inputs: Controls_Qr_Modaltitle1Inputs) => LocalizedString} */
|
|
1239
1269
|
() => (
|
|
1240
1270
|
/** @type {LocalizedString} */
|
|
1241
1271
|
"Scan to view in AR"
|
|
1242
1272
|
)
|
|
1243
|
-
),
|
|
1273
|
+
), Me = (
|
|
1244
1274
|
/** @type {(inputs: Controls_Qr_Modaltitle1Inputs) => LocalizedString} */
|
|
1245
1275
|
() => (
|
|
1246
1276
|
/** @type {LocalizedString} */
|
|
1247
1277
|
"Scan om in AR te bekijken"
|
|
1248
1278
|
)
|
|
1249
|
-
),
|
|
1279
|
+
), ze = (
|
|
1250
1280
|
/** @type {(inputs: Controls_Qr_Modaltitle1Inputs) => LocalizedString} */
|
|
1251
1281
|
() => (
|
|
1252
1282
|
/** @type {LocalizedString} */
|
|
1253
1283
|
"Scannen für AR-Ansicht"
|
|
1254
1284
|
)
|
|
1255
|
-
),
|
|
1285
|
+
), Pe = (
|
|
1256
1286
|
/** @type {((inputs?: Controls_Qr_Modaltitle1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Qr_Modaltitle1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
|
|
1257
1287
|
((n = {}, t = {}) => {
|
|
1258
|
-
const e = t.locale ??
|
|
1259
|
-
return e === "
|
|
1288
|
+
const e = t.locale ?? u();
|
|
1289
|
+
return e === "nl" ? Me() : e === "de" ? ze() : Le();
|
|
1260
1290
|
})
|
|
1261
|
-
),
|
|
1291
|
+
), Fe = (
|
|
1262
1292
|
/** @type {(inputs: Controls_Qr_Modaldescription1Inputs) => LocalizedString} */
|
|
1263
1293
|
() => (
|
|
1264
1294
|
/** @type {LocalizedString} */
|
|
1265
1295
|
"Use your smartphone camera to scan this QR code"
|
|
1266
1296
|
)
|
|
1267
|
-
),
|
|
1297
|
+
), $e = (
|
|
1268
1298
|
/** @type {(inputs: Controls_Qr_Modaldescription1Inputs) => LocalizedString} */
|
|
1269
1299
|
() => (
|
|
1270
1300
|
/** @type {LocalizedString} */
|
|
1271
1301
|
"Gebruik de camera van je smartphone om deze QR-code te scannen"
|
|
1272
1302
|
)
|
|
1273
|
-
),
|
|
1303
|
+
), De = (
|
|
1274
1304
|
/** @type {(inputs: Controls_Qr_Modaldescription1Inputs) => LocalizedString} */
|
|
1275
1305
|
() => (
|
|
1276
1306
|
/** @type {LocalizedString} */
|
|
1277
1307
|
"Verwende die Kamera deines Smartphones, um diesen QR-Code zu scannen"
|
|
1278
1308
|
)
|
|
1279
|
-
),
|
|
1309
|
+
), Be = (
|
|
1280
1310
|
/** @type {((inputs?: Controls_Qr_Modaldescription1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Qr_Modaldescription1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
|
|
1281
1311
|
((n = {}, t = {}) => {
|
|
1282
|
-
const e = t.locale ??
|
|
1283
|
-
return e === "
|
|
1312
|
+
const e = t.locale ?? u();
|
|
1313
|
+
return e === "nl" ? $e() : e === "de" ? De() : Fe();
|
|
1284
1314
|
})
|
|
1285
|
-
),
|
|
1315
|
+
), Ue = (
|
|
1286
1316
|
/** @type {(inputs: Controls_Qr_Modalinstructions1Inputs) => LocalizedString} */
|
|
1287
1317
|
() => (
|
|
1288
1318
|
/** @type {LocalizedString} */
|
|
1289
1319
|
"Your phone will open the 3D model in AR mode."
|
|
1290
1320
|
)
|
|
1291
|
-
),
|
|
1321
|
+
), Ve = (
|
|
1292
1322
|
/** @type {(inputs: Controls_Qr_Modalinstructions1Inputs) => LocalizedString} */
|
|
1293
1323
|
() => (
|
|
1294
1324
|
/** @type {LocalizedString} */
|
|
1295
1325
|
"Je telefoon opent het 3D-model in AR-modus."
|
|
1296
1326
|
)
|
|
1297
|
-
),
|
|
1327
|
+
), je = (
|
|
1298
1328
|
/** @type {(inputs: Controls_Qr_Modalinstructions1Inputs) => LocalizedString} */
|
|
1299
1329
|
() => (
|
|
1300
1330
|
/** @type {LocalizedString} */
|
|
1301
1331
|
"Dein Telefon öffnet das 3D-Modell im AR-Modus."
|
|
1302
1332
|
)
|
|
1303
|
-
),
|
|
1333
|
+
), He = (
|
|
1304
1334
|
/** @type {((inputs?: Controls_Qr_Modalinstructions1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Qr_Modalinstructions1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
|
|
1305
1335
|
((n = {}, t = {}) => {
|
|
1306
|
-
const e = t.locale ??
|
|
1307
|
-
return e === "
|
|
1336
|
+
const e = t.locale ?? u();
|
|
1337
|
+
return e === "nl" ? Ve() : e === "de" ? je() : Ue();
|
|
1308
1338
|
})
|
|
1309
|
-
),
|
|
1339
|
+
), qe = (
|
|
1310
1340
|
/** @type {(inputs: Controls_Qr_Closebutton1Inputs) => LocalizedString} */
|
|
1311
1341
|
() => (
|
|
1312
1342
|
/** @type {LocalizedString} */
|
|
1313
1343
|
"Close"
|
|
1314
1344
|
)
|
|
1315
|
-
),
|
|
1345
|
+
), Ge = (
|
|
1316
1346
|
/** @type {(inputs: Controls_Qr_Closebutton1Inputs) => LocalizedString} */
|
|
1317
1347
|
() => (
|
|
1318
1348
|
/** @type {LocalizedString} */
|
|
1319
1349
|
"Sluiten"
|
|
1320
1350
|
)
|
|
1321
|
-
),
|
|
1351
|
+
), Ze = (
|
|
1322
1352
|
/** @type {(inputs: Controls_Qr_Closebutton1Inputs) => LocalizedString} */
|
|
1323
1353
|
() => (
|
|
1324
1354
|
/** @type {LocalizedString} */
|
|
1325
1355
|
"Schließen"
|
|
1326
1356
|
)
|
|
1327
|
-
),
|
|
1357
|
+
), We = (
|
|
1328
1358
|
/** @type {((inputs?: Controls_Qr_Closebutton1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Qr_Closebutton1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
|
|
1329
1359
|
((n = {}, t = {}) => {
|
|
1330
|
-
const e = t.locale ??
|
|
1331
|
-
return e === "
|
|
1360
|
+
const e = t.locale ?? u();
|
|
1361
|
+
return e === "nl" ? Ge() : e === "de" ? Ze() : qe();
|
|
1332
1362
|
})
|
|
1333
|
-
),
|
|
1363
|
+
), Ye = (
|
|
1334
1364
|
/** @type {(inputs: Controls_Fullscreen_Buttonlabel1Inputs) => LocalizedString} */
|
|
1335
1365
|
() => (
|
|
1336
1366
|
/** @type {LocalizedString} */
|
|
1337
1367
|
"Fullscreen"
|
|
1338
1368
|
)
|
|
1339
|
-
),
|
|
1369
|
+
), Qe = (
|
|
1340
1370
|
/** @type {(inputs: Controls_Fullscreen_Buttonlabel1Inputs) => LocalizedString} */
|
|
1341
1371
|
() => (
|
|
1342
1372
|
/** @type {LocalizedString} */
|
|
1343
1373
|
"Volledig scherm"
|
|
1344
1374
|
)
|
|
1345
|
-
),
|
|
1375
|
+
), Ke = (
|
|
1346
1376
|
/** @type {(inputs: Controls_Fullscreen_Buttonlabel1Inputs) => LocalizedString} */
|
|
1347
1377
|
() => (
|
|
1348
1378
|
/** @type {LocalizedString} */
|
|
1349
1379
|
"Vollbild"
|
|
1350
1380
|
)
|
|
1351
|
-
),
|
|
1381
|
+
), Xe = (
|
|
1352
1382
|
/** @type {((inputs?: Controls_Fullscreen_Buttonlabel1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Fullscreen_Buttonlabel1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
|
|
1353
1383
|
((n = {}, t = {}) => {
|
|
1354
|
-
const e = t.locale ??
|
|
1355
|
-
return e === "
|
|
1384
|
+
const e = t.locale ?? u();
|
|
1385
|
+
return e === "nl" ? Qe() : e === "de" ? Ke() : Ye();
|
|
1356
1386
|
})
|
|
1357
|
-
),
|
|
1387
|
+
), Je = (
|
|
1358
1388
|
/** @type {(inputs: Loading_Downloadingshort1Inputs) => LocalizedString} */
|
|
1359
1389
|
() => (
|
|
1360
1390
|
/** @type {LocalizedString} */
|
|
1361
1391
|
"Downloading"
|
|
1362
1392
|
)
|
|
1363
|
-
),
|
|
1393
|
+
), tn = (
|
|
1364
1394
|
/** @type {(inputs: Loading_Downloadingshort1Inputs) => LocalizedString} */
|
|
1365
1395
|
() => (
|
|
1366
1396
|
/** @type {LocalizedString} */
|
|
1367
1397
|
"Downloaden"
|
|
1368
1398
|
)
|
|
1369
|
-
),
|
|
1399
|
+
), en = (
|
|
1370
1400
|
/** @type {(inputs: Loading_Downloadingshort1Inputs) => LocalizedString} */
|
|
1371
1401
|
() => (
|
|
1372
1402
|
/** @type {LocalizedString} */
|
|
1373
1403
|
"Herunterladen"
|
|
1374
1404
|
)
|
|
1375
|
-
),
|
|
1405
|
+
), St = (
|
|
1376
1406
|
/** @type {((inputs?: Loading_Downloadingshort1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Loading_Downloadingshort1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
|
|
1377
1407
|
((n = {}, t = {}) => {
|
|
1378
|
-
const e = t.locale ??
|
|
1379
|
-
return e === "
|
|
1408
|
+
const e = t.locale ?? u();
|
|
1409
|
+
return e === "nl" ? tn() : e === "de" ? en() : Je();
|
|
1380
1410
|
})
|
|
1381
|
-
),
|
|
1411
|
+
), nn = (
|
|
1382
1412
|
/** @type {(inputs: Loading_RenderingInputs) => LocalizedString} */
|
|
1383
1413
|
() => (
|
|
1384
1414
|
/** @type {LocalizedString} */
|
|
1385
1415
|
"Rendering"
|
|
1386
1416
|
)
|
|
1387
|
-
),
|
|
1417
|
+
), on = (
|
|
1388
1418
|
/** @type {(inputs: Loading_RenderingInputs) => LocalizedString} */
|
|
1389
1419
|
() => (
|
|
1390
1420
|
/** @type {LocalizedString} */
|
|
1391
1421
|
"Renderen"
|
|
1392
1422
|
)
|
|
1393
|
-
),
|
|
1423
|
+
), sn = (
|
|
1394
1424
|
/** @type {(inputs: Loading_RenderingInputs) => LocalizedString} */
|
|
1395
1425
|
() => (
|
|
1396
1426
|
/** @type {LocalizedString} */
|
|
1397
1427
|
"Rendern"
|
|
1398
1428
|
)
|
|
1399
|
-
),
|
|
1429
|
+
), rn = (
|
|
1400
1430
|
/** @type {((inputs?: Loading_RenderingInputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Loading_RenderingInputs, { locale?: "en" | "nl" | "de" }, {}>} */
|
|
1401
1431
|
((n = {}, t = {}) => {
|
|
1402
|
-
const e = t.locale ??
|
|
1403
|
-
return e === "
|
|
1432
|
+
const e = t.locale ?? u();
|
|
1433
|
+
return e === "nl" ? on() : e === "de" ? sn() : nn();
|
|
1404
1434
|
})
|
|
1405
|
-
),
|
|
1435
|
+
), an = (
|
|
1406
1436
|
/** @type {(inputs: Controls_Screenshot_Buttonlabel1Inputs) => LocalizedString} */
|
|
1407
1437
|
() => (
|
|
1408
1438
|
/** @type {LocalizedString} */
|
|
1409
1439
|
"Screenshot"
|
|
1410
1440
|
)
|
|
1411
|
-
),
|
|
1441
|
+
), ln = (
|
|
1412
1442
|
/** @type {(inputs: Controls_Screenshot_Buttonlabel1Inputs) => LocalizedString} */
|
|
1413
1443
|
() => (
|
|
1414
1444
|
/** @type {LocalizedString} */
|
|
1415
1445
|
"Screenshot"
|
|
1416
1446
|
)
|
|
1417
|
-
),
|
|
1447
|
+
), cn = (
|
|
1418
1448
|
/** @type {(inputs: Controls_Screenshot_Buttonlabel1Inputs) => LocalizedString} */
|
|
1419
1449
|
() => (
|
|
1420
1450
|
/** @type {LocalizedString} */
|
|
1421
1451
|
"Screenshot"
|
|
1422
1452
|
)
|
|
1423
|
-
),
|
|
1453
|
+
), dn = (
|
|
1424
1454
|
/** @type {((inputs?: Controls_Screenshot_Buttonlabel1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Screenshot_Buttonlabel1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
|
|
1425
1455
|
((n = {}, t = {}) => {
|
|
1426
|
-
const e = t.locale ??
|
|
1427
|
-
return e === "
|
|
1456
|
+
const e = t.locale ?? u();
|
|
1457
|
+
return e === "nl" ? ln() : e === "de" ? cn() : an();
|
|
1428
1458
|
})
|
|
1429
|
-
),
|
|
1459
|
+
), un = (
|
|
1430
1460
|
/** @type {(inputs: Controls_Configurator_OpenInputs) => LocalizedString} */
|
|
1431
1461
|
() => (
|
|
1432
1462
|
/** @type {LocalizedString} */
|
|
1433
1463
|
"Configure"
|
|
1434
1464
|
)
|
|
1435
|
-
),
|
|
1465
|
+
), hn = (
|
|
1436
1466
|
/** @type {(inputs: Controls_Configurator_OpenInputs) => LocalizedString} */
|
|
1437
1467
|
() => (
|
|
1438
1468
|
/** @type {LocalizedString} */
|
|
1439
1469
|
"Configureren"
|
|
1440
1470
|
)
|
|
1441
|
-
),
|
|
1471
|
+
), mn = (
|
|
1442
1472
|
/** @type {(inputs: Controls_Configurator_OpenInputs) => LocalizedString} */
|
|
1443
1473
|
() => (
|
|
1444
1474
|
/** @type {LocalizedString} */
|
|
1445
1475
|
"Konfigurieren"
|
|
1446
1476
|
)
|
|
1447
|
-
),
|
|
1477
|
+
), pn = (
|
|
1448
1478
|
/** @type {((inputs?: Controls_Configurator_OpenInputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Configurator_OpenInputs, { locale?: "en" | "nl" | "de" }, {}>} */
|
|
1449
1479
|
((n = {}, t = {}) => {
|
|
1450
|
-
const e = t.locale ??
|
|
1451
|
-
return e === "
|
|
1480
|
+
const e = t.locale ?? u();
|
|
1481
|
+
return e === "nl" ? hn() : e === "de" ? mn() : un();
|
|
1452
1482
|
})
|
|
1453
|
-
),
|
|
1483
|
+
), fn = (
|
|
1454
1484
|
/** @type {(inputs: Controls_Configurator_CloseInputs) => LocalizedString} */
|
|
1455
1485
|
() => (
|
|
1456
1486
|
/** @type {LocalizedString} */
|
|
1457
1487
|
"Close"
|
|
1458
1488
|
)
|
|
1459
|
-
),
|
|
1489
|
+
), gn = (
|
|
1460
1490
|
/** @type {(inputs: Controls_Configurator_CloseInputs) => LocalizedString} */
|
|
1461
1491
|
() => (
|
|
1462
1492
|
/** @type {LocalizedString} */
|
|
1463
1493
|
"Sluiten"
|
|
1464
1494
|
)
|
|
1465
|
-
),
|
|
1495
|
+
), bn = (
|
|
1466
1496
|
/** @type {(inputs: Controls_Configurator_CloseInputs) => LocalizedString} */
|
|
1467
1497
|
() => (
|
|
1468
1498
|
/** @type {LocalizedString} */
|
|
1469
1499
|
"Schließen"
|
|
1470
1500
|
)
|
|
1471
|
-
),
|
|
1501
|
+
), vn = (
|
|
1472
1502
|
/** @type {((inputs?: Controls_Configurator_CloseInputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Configurator_CloseInputs, { locale?: "en" | "nl" | "de" }, {}>} */
|
|
1473
1503
|
((n = {}, t = {}) => {
|
|
1474
|
-
const e = t.locale ??
|
|
1475
|
-
return e === "
|
|
1504
|
+
const e = t.locale ?? u();
|
|
1505
|
+
return e === "nl" ? gn() : e === "de" ? bn() : fn();
|
|
1476
1506
|
})
|
|
1477
|
-
),
|
|
1507
|
+
), yn = (
|
|
1478
1508
|
/** @type {(inputs: Controls_Camera_ResetInputs) => LocalizedString} */
|
|
1479
1509
|
() => (
|
|
1480
1510
|
/** @type {LocalizedString} */
|
|
1481
1511
|
"Reset camera"
|
|
1482
1512
|
)
|
|
1483
|
-
),
|
|
1513
|
+
), wn = (
|
|
1484
1514
|
/** @type {(inputs: Controls_Camera_ResetInputs) => LocalizedString} */
|
|
1485
1515
|
() => (
|
|
1486
1516
|
/** @type {LocalizedString} */
|
|
1487
1517
|
"Camera resetten"
|
|
1488
1518
|
)
|
|
1489
|
-
),
|
|
1519
|
+
), _n = (
|
|
1490
1520
|
/** @type {(inputs: Controls_Camera_ResetInputs) => LocalizedString} */
|
|
1491
1521
|
() => (
|
|
1492
1522
|
/** @type {LocalizedString} */
|
|
1493
1523
|
"Kamera zurücksetzen"
|
|
1494
1524
|
)
|
|
1495
|
-
),
|
|
1525
|
+
), Sn = (
|
|
1496
1526
|
/** @type {((inputs?: Controls_Camera_ResetInputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_ResetInputs, { locale?: "en" | "nl" | "de" }, {}>} */
|
|
1497
1527
|
((n = {}, t = {}) => {
|
|
1498
|
-
const e = t.locale ??
|
|
1499
|
-
return e === "
|
|
1528
|
+
const e = t.locale ?? u();
|
|
1529
|
+
return e === "nl" ? wn() : e === "de" ? _n() : yn();
|
|
1500
1530
|
})
|
|
1501
|
-
),
|
|
1531
|
+
), Cn = (
|
|
1502
1532
|
/** @type {(inputs: Controls_Camera_Zoomin1Inputs) => LocalizedString} */
|
|
1503
1533
|
() => (
|
|
1504
1534
|
/** @type {LocalizedString} */
|
|
1505
1535
|
"Zoom in"
|
|
1506
1536
|
)
|
|
1507
|
-
),
|
|
1537
|
+
), kn = (
|
|
1508
1538
|
/** @type {(inputs: Controls_Camera_Zoomin1Inputs) => LocalizedString} */
|
|
1509
1539
|
() => (
|
|
1510
1540
|
/** @type {LocalizedString} */
|
|
1511
1541
|
"Inzoomen"
|
|
1512
1542
|
)
|
|
1513
|
-
),
|
|
1543
|
+
), An = (
|
|
1514
1544
|
/** @type {(inputs: Controls_Camera_Zoomin1Inputs) => LocalizedString} */
|
|
1515
1545
|
() => (
|
|
1516
1546
|
/** @type {LocalizedString} */
|
|
1517
1547
|
"Hineinzoomen"
|
|
1518
1548
|
)
|
|
1519
|
-
),
|
|
1549
|
+
), En = (
|
|
1520
1550
|
/** @type {((inputs?: Controls_Camera_Zoomin1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_Zoomin1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
|
|
1521
1551
|
((n = {}, t = {}) => {
|
|
1522
|
-
const e = t.locale ??
|
|
1523
|
-
return e === "
|
|
1552
|
+
const e = t.locale ?? u();
|
|
1553
|
+
return e === "nl" ? kn() : e === "de" ? An() : Cn();
|
|
1524
1554
|
})
|
|
1525
|
-
),
|
|
1555
|
+
), xn = (
|
|
1526
1556
|
/** @type {(inputs: Controls_Camera_Zoomout1Inputs) => LocalizedString} */
|
|
1527
1557
|
() => (
|
|
1528
1558
|
/** @type {LocalizedString} */
|
|
1529
1559
|
"Zoom out"
|
|
1530
1560
|
)
|
|
1531
|
-
),
|
|
1561
|
+
), Tn = (
|
|
1532
1562
|
/** @type {(inputs: Controls_Camera_Zoomout1Inputs) => LocalizedString} */
|
|
1533
1563
|
() => (
|
|
1534
1564
|
/** @type {LocalizedString} */
|
|
1535
1565
|
"Uitzoomen"
|
|
1536
1566
|
)
|
|
1537
|
-
),
|
|
1567
|
+
), Rn = (
|
|
1538
1568
|
/** @type {(inputs: Controls_Camera_Zoomout1Inputs) => LocalizedString} */
|
|
1539
1569
|
() => (
|
|
1540
1570
|
/** @type {LocalizedString} */
|
|
1541
1571
|
"Herauszoomen"
|
|
1542
1572
|
)
|
|
1543
|
-
),
|
|
1573
|
+
), In = (
|
|
1544
1574
|
/** @type {((inputs?: Controls_Camera_Zoomout1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_Zoomout1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
|
|
1545
1575
|
((n = {}, t = {}) => {
|
|
1546
|
-
const e = t.locale ??
|
|
1547
|
-
return e === "
|
|
1576
|
+
const e = t.locale ?? u();
|
|
1577
|
+
return e === "nl" ? Tn() : e === "de" ? Rn() : xn();
|
|
1548
1578
|
})
|
|
1549
|
-
),
|
|
1579
|
+
), On = (
|
|
1550
1580
|
/** @type {(inputs: Controls_Camera_Rotateleft1Inputs) => LocalizedString} */
|
|
1551
1581
|
() => (
|
|
1552
1582
|
/** @type {LocalizedString} */
|
|
1553
1583
|
"Rotate left"
|
|
1554
1584
|
)
|
|
1555
|
-
),
|
|
1585
|
+
), Nn = (
|
|
1556
1586
|
/** @type {(inputs: Controls_Camera_Rotateleft1Inputs) => LocalizedString} */
|
|
1557
1587
|
() => (
|
|
1558
1588
|
/** @type {LocalizedString} */
|
|
1559
1589
|
"Naar links draaien"
|
|
1560
1590
|
)
|
|
1561
|
-
),
|
|
1591
|
+
), Ln = (
|
|
1562
1592
|
/** @type {(inputs: Controls_Camera_Rotateleft1Inputs) => LocalizedString} */
|
|
1563
1593
|
() => (
|
|
1564
1594
|
/** @type {LocalizedString} */
|
|
1565
1595
|
"Nach links drehen"
|
|
1566
1596
|
)
|
|
1567
|
-
),
|
|
1597
|
+
), Mn = (
|
|
1568
1598
|
/** @type {((inputs?: Controls_Camera_Rotateleft1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_Rotateleft1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
|
|
1569
1599
|
((n = {}, t = {}) => {
|
|
1570
|
-
const e = t.locale ??
|
|
1571
|
-
return e === "
|
|
1600
|
+
const e = t.locale ?? u();
|
|
1601
|
+
return e === "nl" ? Nn() : e === "de" ? Ln() : On();
|
|
1572
1602
|
})
|
|
1573
|
-
),
|
|
1603
|
+
), zn = (
|
|
1574
1604
|
/** @type {(inputs: Controls_Camera_Rotateright1Inputs) => LocalizedString} */
|
|
1575
1605
|
() => (
|
|
1576
1606
|
/** @type {LocalizedString} */
|
|
1577
1607
|
"Rotate right"
|
|
1578
1608
|
)
|
|
1579
|
-
),
|
|
1609
|
+
), Pn = (
|
|
1580
1610
|
/** @type {(inputs: Controls_Camera_Rotateright1Inputs) => LocalizedString} */
|
|
1581
1611
|
() => (
|
|
1582
1612
|
/** @type {LocalizedString} */
|
|
1583
1613
|
"Naar rechts draaien"
|
|
1584
1614
|
)
|
|
1585
|
-
),
|
|
1615
|
+
), Fn = (
|
|
1586
1616
|
/** @type {(inputs: Controls_Camera_Rotateright1Inputs) => LocalizedString} */
|
|
1587
1617
|
() => (
|
|
1588
1618
|
/** @type {LocalizedString} */
|
|
1589
1619
|
"Nach rechts drehen"
|
|
1590
1620
|
)
|
|
1591
|
-
),
|
|
1621
|
+
), $n = (
|
|
1592
1622
|
/** @type {((inputs?: Controls_Camera_Rotateright1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_Rotateright1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
|
|
1593
1623
|
((n = {}, t = {}) => {
|
|
1594
|
-
const e = t.locale ??
|
|
1595
|
-
return e === "
|
|
1624
|
+
const e = t.locale ?? u();
|
|
1625
|
+
return e === "nl" ? Pn() : e === "de" ? Fn() : zn();
|
|
1596
1626
|
})
|
|
1597
|
-
),
|
|
1627
|
+
), Dn = (
|
|
1598
1628
|
/** @type {(inputs: Controls_Camera_Tiltup1Inputs) => LocalizedString} */
|
|
1599
1629
|
() => (
|
|
1600
1630
|
/** @type {LocalizedString} */
|
|
1601
1631
|
"Tilt up"
|
|
1602
1632
|
)
|
|
1603
|
-
),
|
|
1633
|
+
), Bn = (
|
|
1604
1634
|
/** @type {(inputs: Controls_Camera_Tiltup1Inputs) => LocalizedString} */
|
|
1605
1635
|
() => (
|
|
1606
1636
|
/** @type {LocalizedString} */
|
|
1607
1637
|
"Omhoog kantelen"
|
|
1608
1638
|
)
|
|
1609
|
-
),
|
|
1639
|
+
), Un = (
|
|
1610
1640
|
/** @type {(inputs: Controls_Camera_Tiltup1Inputs) => LocalizedString} */
|
|
1611
1641
|
() => (
|
|
1612
1642
|
/** @type {LocalizedString} */
|
|
1613
1643
|
"Nach oben kippen"
|
|
1614
1644
|
)
|
|
1615
|
-
),
|
|
1645
|
+
), Vn = (
|
|
1616
1646
|
/** @type {((inputs?: Controls_Camera_Tiltup1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_Tiltup1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
|
|
1617
1647
|
((n = {}, t = {}) => {
|
|
1618
|
-
const e = t.locale ??
|
|
1619
|
-
return e === "
|
|
1648
|
+
const e = t.locale ?? u();
|
|
1649
|
+
return e === "nl" ? Bn() : e === "de" ? Un() : Dn();
|
|
1620
1650
|
})
|
|
1621
|
-
),
|
|
1651
|
+
), jn = (
|
|
1622
1652
|
/** @type {(inputs: Controls_Camera_Tiltdown1Inputs) => LocalizedString} */
|
|
1623
1653
|
() => (
|
|
1624
1654
|
/** @type {LocalizedString} */
|
|
1625
1655
|
"Tilt down"
|
|
1626
1656
|
)
|
|
1627
|
-
),
|
|
1657
|
+
), Hn = (
|
|
1628
1658
|
/** @type {(inputs: Controls_Camera_Tiltdown1Inputs) => LocalizedString} */
|
|
1629
1659
|
() => (
|
|
1630
1660
|
/** @type {LocalizedString} */
|
|
1631
1661
|
"Omlaag kantelen"
|
|
1632
1662
|
)
|
|
1633
|
-
),
|
|
1663
|
+
), qn = (
|
|
1634
1664
|
/** @type {(inputs: Controls_Camera_Tiltdown1Inputs) => LocalizedString} */
|
|
1635
1665
|
() => (
|
|
1636
1666
|
/** @type {LocalizedString} */
|
|
1637
1667
|
"Nach unten kippen"
|
|
1638
1668
|
)
|
|
1639
|
-
),
|
|
1669
|
+
), Gn = (
|
|
1640
1670
|
/** @type {((inputs?: Controls_Camera_Tiltdown1Inputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Controls_Camera_Tiltdown1Inputs, { locale?: "en" | "nl" | "de" }, {}>} */
|
|
1641
1671
|
((n = {}, t = {}) => {
|
|
1642
|
-
const e = t.locale ??
|
|
1643
|
-
return e === "
|
|
1672
|
+
const e = t.locale ?? u();
|
|
1673
|
+
return e === "nl" ? Hn() : e === "de" ? qn() : jn();
|
|
1644
1674
|
})
|
|
1645
|
-
),
|
|
1675
|
+
), Zn = (
|
|
1646
1676
|
/** @type {(inputs: Commerce_Submit_BusyInputs) => LocalizedString} */
|
|
1647
1677
|
() => (
|
|
1648
1678
|
/** @type {LocalizedString} */
|
|
1649
1679
|
"Working…"
|
|
1650
1680
|
)
|
|
1651
|
-
),
|
|
1681
|
+
), Wn = (
|
|
1652
1682
|
/** @type {(inputs: Commerce_Submit_BusyInputs) => LocalizedString} */
|
|
1653
1683
|
() => (
|
|
1654
1684
|
/** @type {LocalizedString} */
|
|
1655
1685
|
"Bezig…"
|
|
1656
1686
|
)
|
|
1657
|
-
),
|
|
1687
|
+
), Yn = (
|
|
1658
1688
|
/** @type {(inputs: Commerce_Submit_BusyInputs) => LocalizedString} */
|
|
1659
1689
|
() => (
|
|
1660
1690
|
/** @type {LocalizedString} */
|
|
1661
1691
|
"Läuft…"
|
|
1662
1692
|
)
|
|
1663
|
-
),
|
|
1693
|
+
), Qn = (
|
|
1664
1694
|
/** @type {((inputs?: Commerce_Submit_BusyInputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Commerce_Submit_BusyInputs, { locale?: "en" | "nl" | "de" }, {}>} */
|
|
1665
1695
|
((n = {}, t = {}) => {
|
|
1666
|
-
const e = t.locale ??
|
|
1667
|
-
return e === "
|
|
1696
|
+
const e = t.locale ?? u();
|
|
1697
|
+
return e === "nl" ? Wn() : e === "de" ? Yn() : Zn();
|
|
1668
1698
|
})
|
|
1669
|
-
),
|
|
1699
|
+
), Kn = (
|
|
1670
1700
|
/** @type {(inputs: Commerce_Submit_SuccessInputs) => LocalizedString} */
|
|
1671
1701
|
() => (
|
|
1672
1702
|
/** @type {LocalizedString} */
|
|
1673
1703
|
"Done"
|
|
1674
1704
|
)
|
|
1675
|
-
),
|
|
1705
|
+
), Xn = (
|
|
1676
1706
|
/** @type {(inputs: Commerce_Submit_SuccessInputs) => LocalizedString} */
|
|
1677
1707
|
() => (
|
|
1678
1708
|
/** @type {LocalizedString} */
|
|
1679
1709
|
"Gelukt"
|
|
1680
1710
|
)
|
|
1681
|
-
),
|
|
1711
|
+
), Jn = (
|
|
1682
1712
|
/** @type {(inputs: Commerce_Submit_SuccessInputs) => LocalizedString} */
|
|
1683
1713
|
() => (
|
|
1684
1714
|
/** @type {LocalizedString} */
|
|
1685
1715
|
"Fertig"
|
|
1686
1716
|
)
|
|
1687
|
-
),
|
|
1717
|
+
), ti = (
|
|
1688
1718
|
/** @type {((inputs?: Commerce_Submit_SuccessInputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Commerce_Submit_SuccessInputs, { locale?: "en" | "nl" | "de" }, {}>} */
|
|
1689
1719
|
((n = {}, t = {}) => {
|
|
1690
|
-
const e = t.locale ??
|
|
1691
|
-
return e === "
|
|
1720
|
+
const e = t.locale ?? u();
|
|
1721
|
+
return e === "nl" ? Xn() : e === "de" ? Jn() : Kn();
|
|
1692
1722
|
})
|
|
1693
|
-
),
|
|
1723
|
+
), ei = (
|
|
1694
1724
|
/** @type {(inputs: Commerce_Submit_FailedInputs) => LocalizedString} */
|
|
1695
1725
|
() => (
|
|
1696
1726
|
/** @type {LocalizedString} */
|
|
1697
1727
|
"Failed"
|
|
1698
1728
|
)
|
|
1699
|
-
),
|
|
1729
|
+
), ni = (
|
|
1700
1730
|
/** @type {(inputs: Commerce_Submit_FailedInputs) => LocalizedString} */
|
|
1701
1731
|
() => (
|
|
1702
1732
|
/** @type {LocalizedString} */
|
|
1703
1733
|
"Mislukt"
|
|
1704
1734
|
)
|
|
1705
|
-
),
|
|
1735
|
+
), ii = (
|
|
1706
1736
|
/** @type {(inputs: Commerce_Submit_FailedInputs) => LocalizedString} */
|
|
1707
1737
|
() => (
|
|
1708
1738
|
/** @type {LocalizedString} */
|
|
1709
1739
|
"Fehlgeschlagen"
|
|
1710
1740
|
)
|
|
1711
|
-
),
|
|
1741
|
+
), oi = (
|
|
1712
1742
|
/** @type {((inputs?: Commerce_Submit_FailedInputs, options?: { locale?: "en" | "nl" | "de" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Commerce_Submit_FailedInputs, { locale?: "en" | "nl" | "de" }, {}>} */
|
|
1713
1743
|
((n = {}, t = {}) => {
|
|
1714
|
-
const e = t.locale ??
|
|
1715
|
-
return e === "
|
|
1744
|
+
const e = t.locale ?? u();
|
|
1745
|
+
return e === "nl" ? ni() : e === "de" ? ii() : ei();
|
|
1716
1746
|
})
|
|
1717
1747
|
);
|
|
1718
|
-
const
|
|
1748
|
+
const si = {
|
|
1719
1749
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1720
1750
|
width: 24,
|
|
1721
1751
|
height: 24,
|
|
@@ -1726,22 +1756,22 @@ const Wn = {
|
|
|
1726
1756
|
"stroke-linecap": "round",
|
|
1727
1757
|
"stroke-linejoin": "round"
|
|
1728
1758
|
};
|
|
1729
|
-
const
|
|
1759
|
+
const Ct = ([n, t, e]) => {
|
|
1730
1760
|
const i = document.createElementNS("http://www.w3.org/2000/svg", n);
|
|
1731
1761
|
return Object.keys(t).forEach((o) => {
|
|
1732
1762
|
i.setAttribute(o, String(t[o]));
|
|
1733
1763
|
}), e?.length && e.forEach((o) => {
|
|
1734
|
-
const s =
|
|
1764
|
+
const s = Ct(o);
|
|
1735
1765
|
i.appendChild(s);
|
|
1736
1766
|
}), i;
|
|
1737
|
-
},
|
|
1767
|
+
}, kt = (n, t = {}) => {
|
|
1738
1768
|
const i = {
|
|
1739
|
-
...
|
|
1769
|
+
...si,
|
|
1740
1770
|
...t
|
|
1741
1771
|
};
|
|
1742
|
-
return
|
|
1772
|
+
return Ct(["svg", i, n]);
|
|
1743
1773
|
};
|
|
1744
|
-
const
|
|
1774
|
+
const ri = [
|
|
1745
1775
|
[
|
|
1746
1776
|
"path",
|
|
1747
1777
|
{
|
|
@@ -1751,7 +1781,7 @@ const Qn = [
|
|
|
1751
1781
|
["path", { d: "m3.3 7 8.7 5 8.7-5" }],
|
|
1752
1782
|
["path", { d: "M12 22V12" }]
|
|
1753
1783
|
];
|
|
1754
|
-
const
|
|
1784
|
+
const ai = [
|
|
1755
1785
|
[
|
|
1756
1786
|
"path",
|
|
1757
1787
|
{
|
|
@@ -1760,27 +1790,27 @@ const Yn = [
|
|
|
1760
1790
|
],
|
|
1761
1791
|
["circle", { cx: "12", cy: "13", r: "3" }]
|
|
1762
1792
|
];
|
|
1763
|
-
const
|
|
1764
|
-
const
|
|
1765
|
-
const
|
|
1766
|
-
const
|
|
1767
|
-
const
|
|
1793
|
+
const At = [["path", { d: "m6 9 6 6 6-6" }]];
|
|
1794
|
+
const li = [["path", { d: "m15 18-6-6 6-6" }]];
|
|
1795
|
+
const ci = [["path", { d: "m9 18 6-6-6-6" }]];
|
|
1796
|
+
const di = [["path", { d: "m18 15-6-6-6 6" }]];
|
|
1797
|
+
const ui = [
|
|
1768
1798
|
["path", { d: "M15 3h6v6" }],
|
|
1769
1799
|
["path", { d: "m21 3-7 7" }],
|
|
1770
1800
|
["path", { d: "m3 21 7-7" }],
|
|
1771
1801
|
["path", { d: "M9 21H3v-6" }]
|
|
1772
1802
|
];
|
|
1773
|
-
const
|
|
1803
|
+
const hi = [
|
|
1774
1804
|
["path", { d: "m14 10 7-7" }],
|
|
1775
1805
|
["path", { d: "M20 10h-6V4" }],
|
|
1776
1806
|
["path", { d: "m3 21 7-7" }],
|
|
1777
1807
|
["path", { d: "M4 14h6v6" }]
|
|
1778
1808
|
];
|
|
1779
|
-
const
|
|
1809
|
+
const mi = [
|
|
1780
1810
|
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }],
|
|
1781
1811
|
["path", { d: "M3 3v5h5" }]
|
|
1782
1812
|
];
|
|
1783
|
-
const
|
|
1813
|
+
const pi = [
|
|
1784
1814
|
["path", { d: "M10 5H3" }],
|
|
1785
1815
|
["path", { d: "M12 19H3" }],
|
|
1786
1816
|
["path", { d: "M14 3v4" }],
|
|
@@ -1791,38 +1821,38 @@ const ii = [
|
|
|
1791
1821
|
["path", { d: "M8 10v4" }],
|
|
1792
1822
|
["path", { d: "M8 12H3" }]
|
|
1793
1823
|
];
|
|
1794
|
-
const
|
|
1824
|
+
const fi = [
|
|
1795
1825
|
["path", { d: "M18 6 6 18" }],
|
|
1796
1826
|
["path", { d: "m6 6 12 12" }]
|
|
1797
1827
|
];
|
|
1798
|
-
const
|
|
1828
|
+
const gi = [
|
|
1799
1829
|
["circle", { cx: "11", cy: "11", r: "8" }],
|
|
1800
1830
|
["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }],
|
|
1801
|
-
["line", { x1: "11", x2: "11", y1: "8", y2: "14" }],
|
|
1802
1831
|
["line", { x1: "8", x2: "14", y1: "11", y2: "11" }]
|
|
1803
1832
|
];
|
|
1804
|
-
const
|
|
1833
|
+
const bi = [
|
|
1805
1834
|
["circle", { cx: "11", cy: "11", r: "8" }],
|
|
1806
1835
|
["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }],
|
|
1836
|
+
["line", { x1: "11", x2: "11", y1: "8", y2: "14" }],
|
|
1807
1837
|
["line", { x1: "8", x2: "14", y1: "11", y2: "11" }]
|
|
1808
1838
|
];
|
|
1809
1839
|
function y(n, { size: t = 20, strokeWidth: e = 1.75 } = {}) {
|
|
1810
|
-
return
|
|
1840
|
+
return kt(n, { width: t, height: t, "stroke-width": e });
|
|
1811
1841
|
}
|
|
1812
1842
|
const g = {
|
|
1813
|
-
ar: (n) => y(
|
|
1814
|
-
fullscreen: (n) => y(
|
|
1815
|
-
exitFullscreen: (n) => y(
|
|
1816
|
-
screenshot: (n) => y(
|
|
1817
|
-
tiltUp: (n) => y(
|
|
1818
|
-
tiltDown: (n) => y(
|
|
1819
|
-
rotateLeft: (n) => y(
|
|
1820
|
-
rotateRight: (n) => y(
|
|
1821
|
-
zoomIn: (n) => y(
|
|
1822
|
-
zoomOut: (n) => y(
|
|
1823
|
-
reset: (n) => y(
|
|
1824
|
-
configurator: (n) => y(
|
|
1825
|
-
close: (n) => y(
|
|
1843
|
+
ar: (n) => y(ri, n),
|
|
1844
|
+
fullscreen: (n) => y(ui, n),
|
|
1845
|
+
exitFullscreen: (n) => y(hi, n),
|
|
1846
|
+
screenshot: (n) => y(ai, n),
|
|
1847
|
+
tiltUp: (n) => y(di, n),
|
|
1848
|
+
tiltDown: (n) => y(At, n),
|
|
1849
|
+
rotateLeft: (n) => y(li, n),
|
|
1850
|
+
rotateRight: (n) => y(ci, n),
|
|
1851
|
+
zoomIn: (n) => y(bi, n),
|
|
1852
|
+
zoomOut: (n) => y(gi, n),
|
|
1853
|
+
reset: (n) => y(mi, n),
|
|
1854
|
+
configurator: (n) => y(pi, n),
|
|
1855
|
+
close: (n) => y(fi, n)
|
|
1826
1856
|
};
|
|
1827
1857
|
class b {
|
|
1828
1858
|
element;
|
|
@@ -1846,7 +1876,7 @@ const m = {
|
|
|
1846
1876
|
},
|
|
1847
1877
|
white: "#ffffff",
|
|
1848
1878
|
black: "#000000"
|
|
1849
|
-
},
|
|
1879
|
+
}, l = {
|
|
1850
1880
|
0: "0",
|
|
1851
1881
|
0.5: "0.125rem",
|
|
1852
1882
|
// 2px
|
|
@@ -1868,22 +1898,22 @@ const m = {
|
|
|
1868
1898
|
// 32px
|
|
1869
1899
|
9: "2.25rem"
|
|
1870
1900
|
};
|
|
1871
|
-
class
|
|
1901
|
+
class vi {
|
|
1872
1902
|
element;
|
|
1873
1903
|
constructor() {
|
|
1874
1904
|
this.element = document.createElement("div"), Object.assign(this.element.style, {
|
|
1875
1905
|
background: m.white,
|
|
1876
|
-
borderRadius:
|
|
1877
|
-
padding:
|
|
1878
|
-
boxShadow: `0 ${
|
|
1906
|
+
borderRadius: l[3],
|
|
1907
|
+
padding: l[6],
|
|
1908
|
+
boxShadow: `0 ${l[2]} ${l[8]} oklch(0% 0 0 / 20%)`,
|
|
1879
1909
|
maxWidth: "20rem",
|
|
1880
1910
|
width: "100%"
|
|
1881
1911
|
});
|
|
1882
1912
|
}
|
|
1883
1913
|
}
|
|
1884
|
-
class
|
|
1914
|
+
class yi {
|
|
1885
1915
|
constructor(t = {}) {
|
|
1886
|
-
this.options = t, this.card = new
|
|
1916
|
+
this.options = t, this.card = new vi(), this.backdrop = this.createBackdrop(), this.backdrop.appendChild(this.card.element);
|
|
1887
1917
|
}
|
|
1888
1918
|
options;
|
|
1889
1919
|
card;
|
|
@@ -1901,7 +1931,7 @@ class li {
|
|
|
1901
1931
|
const t = document.createElement("div");
|
|
1902
1932
|
return Object.assign(t.style, {
|
|
1903
1933
|
position: "fixed",
|
|
1904
|
-
inset:
|
|
1934
|
+
inset: l[0],
|
|
1905
1935
|
background: "oklch(0% 0 0 / 50%)",
|
|
1906
1936
|
zIndex: "9999",
|
|
1907
1937
|
display: "flex",
|
|
@@ -1912,7 +1942,7 @@ class li {
|
|
|
1912
1942
|
}), t;
|
|
1913
1943
|
}
|
|
1914
1944
|
}
|
|
1915
|
-
class
|
|
1945
|
+
class wi {
|
|
1916
1946
|
element;
|
|
1917
1947
|
selectCallback = null;
|
|
1918
1948
|
constructor(t, e, i) {
|
|
@@ -1934,21 +1964,21 @@ class ci {
|
|
|
1934
1964
|
this.selectCallback = t;
|
|
1935
1965
|
}
|
|
1936
1966
|
}
|
|
1937
|
-
class
|
|
1967
|
+
class _i {
|
|
1938
1968
|
element;
|
|
1939
1969
|
select;
|
|
1940
1970
|
constructor(t, e, i, o, s) {
|
|
1941
1971
|
this.select = document.createElement("select"), this.select.className = "ui-native-select", this.select.dataset.name = t, this.select.setAttribute("aria-label", i);
|
|
1942
1972
|
const r = document.createElement("option");
|
|
1943
1973
|
r.value = "", r.disabled = !0, r.textContent = i, this.select.appendChild(r);
|
|
1944
|
-
let
|
|
1974
|
+
let a = !1;
|
|
1945
1975
|
for (let d = 0; d < e.length; d++) {
|
|
1946
1976
|
const p = e[d], v = document.createElement("option");
|
|
1947
|
-
v.value = p, v.textContent = s?.[d] ?? p, p === o && (v.selected = !0,
|
|
1977
|
+
v.value = p, v.textContent = s?.[d] ?? p, p === o && (v.selected = !0, a = !0), this.select.appendChild(v);
|
|
1948
1978
|
}
|
|
1949
|
-
|
|
1950
|
-
const
|
|
1951
|
-
|
|
1979
|
+
a || (r.selected = !0);
|
|
1980
|
+
const h = kt(At, { width: 16, height: 16, "stroke-width": 2 });
|
|
1981
|
+
h.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(h);
|
|
1952
1982
|
}
|
|
1953
1983
|
setSelected(t) {
|
|
1954
1984
|
this.select.value = t;
|
|
@@ -1976,7 +2006,7 @@ const w = {
|
|
|
1976
2006
|
medium: "500",
|
|
1977
2007
|
semibold: "600"
|
|
1978
2008
|
}
|
|
1979
|
-
}, x = w.fontFamily.sans.join(", "),
|
|
2009
|
+
}, x = w.fontFamily.sans.join(", "), Si = `
|
|
1980
2010
|
--primary: oklch(5% 0 0);
|
|
1981
2011
|
--primary-foreground: oklch(100% 0 0);
|
|
1982
2012
|
--secondary: oklch(92% 0 0);
|
|
@@ -1989,8 +2019,8 @@ const w = {
|
|
|
1989
2019
|
--accent: oklch(92% 0 0);
|
|
1990
2020
|
--accent-foreground: oklch(5% 0 0);
|
|
1991
2021
|
--muted-foreground: oklch(44% 0 0);
|
|
1992
|
-
`,
|
|
1993
|
-
:root { ${
|
|
2022
|
+
`, Ci = `
|
|
2023
|
+
:root { ${Si} }
|
|
1994
2024
|
|
|
1995
2025
|
/* ── Button ──────────────────────────────────────────────── */
|
|
1996
2026
|
.ui-btn {
|
|
@@ -2267,43 +2297,43 @@ const w = {
|
|
|
2267
2297
|
50% { opacity: 0.55; }
|
|
2268
2298
|
}
|
|
2269
2299
|
`;
|
|
2270
|
-
let
|
|
2271
|
-
function
|
|
2272
|
-
if (
|
|
2300
|
+
let lt = !1;
|
|
2301
|
+
function Et() {
|
|
2302
|
+
if (lt || typeof document > "u")
|
|
2273
2303
|
return;
|
|
2274
|
-
|
|
2304
|
+
lt = !0;
|
|
2275
2305
|
const n = document.createElement("style");
|
|
2276
|
-
n.id = "vd-ui-vanilla", n.textContent =
|
|
2306
|
+
n.id = "vd-ui-vanilla", n.textContent = Ci, document.head.appendChild(n);
|
|
2277
2307
|
}
|
|
2278
|
-
const
|
|
2279
|
-
class
|
|
2308
|
+
const ki = w.fontFamily.sans.join(", ");
|
|
2309
|
+
class Ai {
|
|
2280
2310
|
qrLib = null;
|
|
2281
2311
|
dialog = null;
|
|
2282
2312
|
qrSlot = null;
|
|
2283
2313
|
/** Open the modal immediately, with a loading placeholder in the QR slot. */
|
|
2284
2314
|
show() {
|
|
2285
|
-
this.hide(),
|
|
2315
|
+
this.hide(), Et(), this.dialog = new yi({ onClose: () => {
|
|
2286
2316
|
this.dialog = null, this.qrSlot = null;
|
|
2287
2317
|
} }), Object.assign(this.dialog.card.element.style, {
|
|
2288
2318
|
display: "flex",
|
|
2289
2319
|
flexDirection: "column",
|
|
2290
2320
|
alignItems: "center",
|
|
2291
|
-
gap:
|
|
2292
|
-
fontFamily:
|
|
2293
|
-
}), this.dialog.card.element.appendChild(this.createText(
|
|
2321
|
+
gap: l[3],
|
|
2322
|
+
fontFamily: ki
|
|
2323
|
+
}), this.dialog.card.element.appendChild(this.createText(Pe(), {
|
|
2294
2324
|
fontSize: w.fontSize.base,
|
|
2295
2325
|
fontWeight: w.fontWeight.semibold,
|
|
2296
2326
|
color: m.neutral[900]
|
|
2297
|
-
})), this.dialog.card.element.appendChild(this.createText(
|
|
2327
|
+
})), this.dialog.card.element.appendChild(this.createText(Be(), {
|
|
2298
2328
|
fontSize: w.fontSize.sm,
|
|
2299
2329
|
color: m.neutral[600]
|
|
2300
|
-
})), this.qrSlot = this.createQrSlot(), this.dialog.card.element.appendChild(this.qrSlot), this.dialog.card.element.appendChild(this.createText(
|
|
2330
|
+
})), this.qrSlot = this.createQrSlot(), this.dialog.card.element.appendChild(this.qrSlot), this.dialog.card.element.appendChild(this.createText(He(), {
|
|
2301
2331
|
fontSize: w.fontSize.xs,
|
|
2302
2332
|
color: m.neutral[500]
|
|
2303
2333
|
}));
|
|
2304
2334
|
const t = new b({
|
|
2305
2335
|
variant: "outline",
|
|
2306
|
-
label:
|
|
2336
|
+
label: We(),
|
|
2307
2337
|
onClick: () => {
|
|
2308
2338
|
this.hide();
|
|
2309
2339
|
}
|
|
@@ -2341,40 +2371,40 @@ class pi {
|
|
|
2341
2371
|
return e.src = t, e.alt = "QR code", e;
|
|
2342
2372
|
}
|
|
2343
2373
|
}
|
|
2344
|
-
function
|
|
2374
|
+
function ct(n) {
|
|
2345
2375
|
const t = Math.max(0, Math.min(1, n));
|
|
2346
2376
|
return t * t * (3 - 2 * t);
|
|
2347
2377
|
}
|
|
2348
|
-
function
|
|
2349
|
-
const [r,
|
|
2350
|
-
return [i + v * s *
|
|
2378
|
+
function Ei(n, t, e, i, o, s) {
|
|
2379
|
+
const [r, a, h] = n, d = Math.cos(t), p = Math.sin(t), v = d * r + p * h, E = -p * r + d * h, k = Math.cos(e), C = Math.sin(e), R = k * a - C * E, P = C * a + k * E, J = 0.55;
|
|
2380
|
+
return [i + v * s * J, o - R * s * J, P];
|
|
2351
2381
|
}
|
|
2352
|
-
function
|
|
2382
|
+
function xi(n, t, e) {
|
|
2353
2383
|
n.beginPath(), n.moveTo(t[0], t[1]), n.lineTo(e[0], e[1]), n.strokeStyle = "#000", n.lineWidth = 2, n.stroke();
|
|
2354
2384
|
}
|
|
2355
|
-
function
|
|
2356
|
-
const s = t(e), r = t(i),
|
|
2385
|
+
function Ti(n, t, e, i, o) {
|
|
2386
|
+
const s = t(e), r = t(i), a = [
|
|
2357
2387
|
s[0] + (r[0] - s[0]) * o,
|
|
2358
2388
|
s[1] + (r[1] - s[1]) * o,
|
|
2359
2389
|
s[2]
|
|
2360
2390
|
];
|
|
2361
|
-
|
|
2362
|
-
}
|
|
2363
|
-
const
|
|
2364
|
-
[
|
|
2365
|
-
[P, F],
|
|
2366
|
-
[F, $],
|
|
2367
|
-
[$, z],
|
|
2368
|
-
[z, D],
|
|
2369
|
-
[P, B],
|
|
2370
|
-
[F, U],
|
|
2371
|
-
[$, V],
|
|
2391
|
+
xi(n, s, a);
|
|
2392
|
+
}
|
|
2393
|
+
const $ = [-1, -1, 1], D = [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], dt = [
|
|
2394
|
+
[$, D],
|
|
2372
2395
|
[D, B],
|
|
2373
2396
|
[B, U],
|
|
2374
|
-
[U,
|
|
2375
|
-
[V,
|
|
2376
|
-
|
|
2377
|
-
|
|
2397
|
+
[U, $],
|
|
2398
|
+
[$, V],
|
|
2399
|
+
[D, j],
|
|
2400
|
+
[B, H],
|
|
2401
|
+
[U, q],
|
|
2402
|
+
[V, j],
|
|
2403
|
+
[j, H],
|
|
2404
|
+
[H, q],
|
|
2405
|
+
[q, V]
|
|
2406
|
+
], Ri = 400, ut = '-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif';
|
|
2407
|
+
function Ii() {
|
|
2378
2408
|
const n = document.createElement("div");
|
|
2379
2409
|
Object.assign(n.style, {
|
|
2380
2410
|
position: "absolute",
|
|
@@ -2410,16 +2440,16 @@ function yi() {
|
|
|
2410
2440
|
fontWeight: "400",
|
|
2411
2441
|
color: "#000",
|
|
2412
2442
|
fontVariantNumeric: "tabular-nums",
|
|
2413
|
-
fontFamily:
|
|
2443
|
+
fontFamily: ut
|
|
2414
2444
|
});
|
|
2415
2445
|
const o = document.createElement("span");
|
|
2416
2446
|
return Object.assign(o.style, {
|
|
2417
2447
|
fontSize: "13px",
|
|
2418
2448
|
color: "#000",
|
|
2419
|
-
fontFamily:
|
|
2420
|
-
}), o.textContent =
|
|
2449
|
+
fontFamily: ut
|
|
2450
|
+
}), o.textContent = St(), e.appendChild(i), e.appendChild(o), n.appendChild(t), n.appendChild(e), { overlay: n, canvas: t, pctEl: i, phaseEl: o };
|
|
2421
2451
|
}
|
|
2422
|
-
class
|
|
2452
|
+
class Oi {
|
|
2423
2453
|
overlay;
|
|
2424
2454
|
canvas;
|
|
2425
2455
|
ctx;
|
|
@@ -2432,17 +2462,17 @@ class wi {
|
|
|
2432
2462
|
visible = !1;
|
|
2433
2463
|
constructor(t, e = {}) {
|
|
2434
2464
|
this.startTime = performance.now();
|
|
2435
|
-
const i =
|
|
2465
|
+
const i = Ii();
|
|
2436
2466
|
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());
|
|
2437
|
-
const o = e.showDelay ??
|
|
2467
|
+
const o = e.showDelay ?? Ri;
|
|
2438
2468
|
this.showTimerId = setTimeout(() => {
|
|
2439
2469
|
this.reveal();
|
|
2440
2470
|
}, o);
|
|
2441
2471
|
}
|
|
2442
2472
|
get loadingTexts() {
|
|
2443
2473
|
return {
|
|
2444
|
-
downloading:
|
|
2445
|
-
rendering:
|
|
2474
|
+
downloading: St(),
|
|
2475
|
+
rendering: rn()
|
|
2446
2476
|
};
|
|
2447
2477
|
}
|
|
2448
2478
|
updateProgress(t, e) {
|
|
@@ -2495,20 +2525,20 @@ class wi {
|
|
|
2495
2525
|
return;
|
|
2496
2526
|
const t = this.canvas.width / Math.min(devicePixelRatio, 2), e = this.canvas.height / Math.min(devicePixelRatio, 2), i = (performance.now() - this.startTime) / 1e3;
|
|
2497
2527
|
this.ctx.fillStyle = "#fff", this.ctx.fillRect(0, 0, t, e);
|
|
2498
|
-
const o = t / 2, s = e * 0.44, r = Math.min(t, e) * 0.08,
|
|
2528
|
+
const o = t / 2, s = e * 0.44, r = Math.min(t, e) * 0.08, a = 0.785, h = 0.615, d = (C) => Ei(C, a, h, o, s, r), p = 6, v = i % p / p, E = dt.length;
|
|
2499
2529
|
let k;
|
|
2500
|
-
v < 0.35 ? k =
|
|
2501
|
-
for (let
|
|
2502
|
-
const R =
|
|
2530
|
+
v < 0.35 ? k = ct(v / 0.35) * E : v < 0.55 ? k = E : v < 0.9 ? k = (1 - ct((v - 0.55) / 0.35)) * E : k = 0, this.ctx.shadowBlur = 5, this.ctx.shadowColor = "rgba(30,30,30,0.08)";
|
|
2531
|
+
for (let C = 0; C < E && !(C >= k); C++) {
|
|
2532
|
+
const R = dt[C];
|
|
2503
2533
|
if (R === void 0)
|
|
2504
2534
|
continue;
|
|
2505
|
-
const
|
|
2506
|
-
|
|
2535
|
+
const P = Math.min(1, k - C);
|
|
2536
|
+
Ti(this.ctx, d, R[0], R[1], P);
|
|
2507
2537
|
}
|
|
2508
2538
|
this.ctx.shadowBlur = 0;
|
|
2509
2539
|
}
|
|
2510
2540
|
}
|
|
2511
|
-
class
|
|
2541
|
+
class Ni {
|
|
2512
2542
|
constructor(t) {
|
|
2513
2543
|
this.options = t, this.element = document.createElement("div"), Object.assign(this.element.style, { display: "flex", gap: "0.375rem" }), this.onFullscreenChange = () => {
|
|
2514
2544
|
this.setFullscreenIcon(document.fullscreenElement !== null);
|
|
@@ -2533,7 +2563,7 @@ class _i {
|
|
|
2533
2563
|
this.arBtn = this.syncButton(this.arBtn, t.ar !== !1 && this.options.onAr !== void 0, () => new b({
|
|
2534
2564
|
variant: "outline",
|
|
2535
2565
|
size: "icon",
|
|
2536
|
-
label:
|
|
2566
|
+
label: Ne(),
|
|
2537
2567
|
icon: g.ar(),
|
|
2538
2568
|
onClick: () => {
|
|
2539
2569
|
this.options.onAr?.();
|
|
@@ -2541,7 +2571,7 @@ class _i {
|
|
|
2541
2571
|
})), this.fullscreenBtn = this.syncButton(this.fullscreenBtn, t.fullscreen !== !1 && this.options.onFullscreen !== void 0, () => new b({
|
|
2542
2572
|
variant: "outline",
|
|
2543
2573
|
size: "icon",
|
|
2544
|
-
label:
|
|
2574
|
+
label: Xe(),
|
|
2545
2575
|
icon: g.fullscreen(),
|
|
2546
2576
|
onClick: () => {
|
|
2547
2577
|
this.options.onFullscreen?.();
|
|
@@ -2553,7 +2583,7 @@ class _i {
|
|
|
2553
2583
|
}
|
|
2554
2584
|
}
|
|
2555
2585
|
const T = 0.5;
|
|
2556
|
-
class
|
|
2586
|
+
class z {
|
|
2557
2587
|
element;
|
|
2558
2588
|
constructor(t, e) {
|
|
2559
2589
|
this.element = Object.assign(document.createElement("div"), { className: "vd-camera-controls" });
|
|
@@ -2562,10 +2592,10 @@ class L {
|
|
|
2562
2592
|
targetTilt: e.tilt,
|
|
2563
2593
|
targetZoom: e.zoom,
|
|
2564
2594
|
thetaOffset: 0
|
|
2565
|
-
}, o =
|
|
2595
|
+
}, o = Li(t, e, i);
|
|
2566
2596
|
e.onChange((s) => {
|
|
2567
|
-
i.targetRotation = s.rotation - i.thetaOffset, i.targetTilt = s.tilt, i.targetZoom = s.zoom,
|
|
2568
|
-
}), this.element.appendChild(
|
|
2597
|
+
i.targetRotation = s.rotation - i.thetaOffset, i.targetTilt = s.tilt, i.targetZoom = s.zoom, Mi(o, e, s);
|
|
2598
|
+
}), this.element.appendChild(z.buildZoom(o.zoomOut, o.zoomIn)), this.element.appendChild(z.buildDpad(o.tiltUp, o.rotateLeft, o.reset, o.rotateRight, o.tiltDown));
|
|
2569
2599
|
}
|
|
2570
2600
|
static buildZoom(t, e) {
|
|
2571
2601
|
const i = document.createElement("div");
|
|
@@ -2574,59 +2604,59 @@ class L {
|
|
|
2574
2604
|
static buildDpad(t, e, i, o, s) {
|
|
2575
2605
|
const r = document.createElement("div");
|
|
2576
2606
|
r.className = "vd-dpad";
|
|
2577
|
-
for (const [
|
|
2607
|
+
for (const [a, h] of [
|
|
2578
2608
|
[t, "up"],
|
|
2579
2609
|
[e, "left"],
|
|
2580
2610
|
[i, "center"],
|
|
2581
2611
|
[o, "right"],
|
|
2582
2612
|
[s, "down"]
|
|
2583
2613
|
])
|
|
2584
|
-
|
|
2614
|
+
a.element.classList.add(`vd-dpad-${h}`), r.appendChild(a.element);
|
|
2585
2615
|
return r;
|
|
2586
2616
|
}
|
|
2587
2617
|
}
|
|
2588
|
-
function
|
|
2618
|
+
function Li(n, t, e) {
|
|
2589
2619
|
const i = (r) => Math.max(t.limits?.minZoom ?? 1, Math.min(t.limits?.maxZoom ?? 1 / 0, r)), o = (r) => {
|
|
2590
|
-
const
|
|
2591
|
-
return
|
|
2620
|
+
const a = t.limits?.minRotate, h = t.limits?.maxRotate;
|
|
2621
|
+
return a !== void 0 || h !== void 0 ? Math.max(a ?? -1 / 0, Math.min(h ?? 1 / 0, r)) : r;
|
|
2592
2622
|
}, s = (r) => {
|
|
2593
|
-
const
|
|
2594
|
-
if (
|
|
2595
|
-
e.targetTilt = Math.max(
|
|
2623
|
+
const a = t.limits?.minTilt, h = t.limits?.maxTilt;
|
|
2624
|
+
if (a !== void 0 || h !== void 0) {
|
|
2625
|
+
e.targetTilt = Math.max(a ?? 0, Math.min(h ?? 180, e.targetTilt + r)), n.tilt(e.targetTilt).set();
|
|
2596
2626
|
return;
|
|
2597
2627
|
}
|
|
2598
2628
|
const d = e.targetTilt + r;
|
|
2599
2629
|
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());
|
|
2600
2630
|
};
|
|
2601
2631
|
return {
|
|
2602
|
-
zoomOut: new b({ variant: "outline", size: "icon", label:
|
|
2632
|
+
zoomOut: new b({ variant: "outline", size: "icon", label: In(), icon: g.zoomOut(), onClick: () => {
|
|
2603
2633
|
e.targetZoom = i(e.targetZoom - 10), n.zoom(e.targetZoom).set();
|
|
2604
2634
|
} }),
|
|
2605
|
-
zoomIn: new b({ variant: "outline", size: "icon", label:
|
|
2635
|
+
zoomIn: new b({ variant: "outline", size: "icon", label: En(), icon: g.zoomIn(), onClick: () => {
|
|
2606
2636
|
e.targetZoom = i(e.targetZoom + 10), n.zoom(e.targetZoom).set();
|
|
2607
2637
|
} }),
|
|
2608
|
-
tiltUp: new b({ variant: "outline", size: "icon", label:
|
|
2638
|
+
tiltUp: new b({ variant: "outline", size: "icon", label: Vn(), icon: g.tiltUp(), onClick: () => {
|
|
2609
2639
|
s(-15);
|
|
2610
2640
|
} }),
|
|
2611
|
-
rotateLeft: new b({ variant: "outline", size: "icon", label:
|
|
2641
|
+
rotateLeft: new b({ variant: "outline", size: "icon", label: Mn(), icon: g.rotateLeft(), onClick: () => {
|
|
2612
2642
|
e.targetRotation = o(e.targetRotation - 15), n.rotate(e.targetRotation + e.thetaOffset).set();
|
|
2613
2643
|
} }),
|
|
2614
|
-
reset: new b({ variant: "outline", size: "icon", label:
|
|
2644
|
+
reset: new b({ variant: "outline", size: "icon", label: Sn(), icon: g.reset(), onClick: () => {
|
|
2615
2645
|
e.thetaOffset = 0, n.reset();
|
|
2616
2646
|
} }),
|
|
2617
|
-
rotateRight: new b({ variant: "outline", size: "icon", label:
|
|
2647
|
+
rotateRight: new b({ variant: "outline", size: "icon", label: $n(), icon: g.rotateRight(), onClick: () => {
|
|
2618
2648
|
e.targetRotation = o(e.targetRotation + 15), n.rotate(e.targetRotation + e.thetaOffset).set();
|
|
2619
2649
|
} }),
|
|
2620
|
-
tiltDown: new b({ variant: "outline", size: "icon", label:
|
|
2650
|
+
tiltDown: new b({ variant: "outline", size: "icon", label: Gn(), icon: g.tiltDown(), onClick: () => {
|
|
2621
2651
|
s(15);
|
|
2622
2652
|
} })
|
|
2623
2653
|
};
|
|
2624
2654
|
}
|
|
2625
|
-
function
|
|
2655
|
+
function Mi(n, t, e) {
|
|
2626
2656
|
const i = t.limits;
|
|
2627
2657
|
i !== void 0 && (n.zoomOut.element.disabled = i.minZoom !== void 0 && e.zoom <= i.minZoom + T, n.zoomIn.element.disabled = i.maxZoom !== void 0 && e.zoom >= i.maxZoom - T, n.tiltUp.element.disabled = i.minTilt !== void 0 && e.tilt <= i.minTilt + T, n.tiltDown.element.disabled = i.maxTilt !== void 0 && e.tilt >= i.maxTilt - T, n.rotateLeft.element.disabled = i.minRotate !== void 0 && e.rotation <= i.minRotate + T, n.rotateRight.element.disabled = i.maxRotate !== void 0 && e.rotation >= i.maxRotate - T);
|
|
2628
2658
|
}
|
|
2629
|
-
const
|
|
2659
|
+
const O = {
|
|
2630
2660
|
/** Attribute selection requested (cancelable). `detail`: `{ attribute, value }`. */
|
|
2631
2661
|
SELECT: "ui:select",
|
|
2632
2662
|
/** Attribute selection applied. `detail`: `{ attribute, value }`. */
|
|
@@ -2637,27 +2667,27 @@ const I = {
|
|
|
2637
2667
|
CONFIGURATION_CHANGE: "vd:configuration-change",
|
|
2638
2668
|
/** Configuration submitted (bubbles). `detail`: the resolved configuration handed to the host. */
|
|
2639
2669
|
CONFIGURATION_SUBMIT: "vd:configuration-submit"
|
|
2640
|
-
},
|
|
2641
|
-
let
|
|
2642
|
-
function
|
|
2670
|
+
}, zi = 5;
|
|
2671
|
+
let Pi = 0;
|
|
2672
|
+
function G(n) {
|
|
2643
2673
|
const t = n.replace(/([A-Z])/g, " $1").trim();
|
|
2644
2674
|
return t.charAt(0).toUpperCase() + t.slice(1).toLowerCase();
|
|
2645
2675
|
}
|
|
2646
|
-
function
|
|
2676
|
+
function Fi(n, t, e, i, o) {
|
|
2647
2677
|
const s = document.createElement("div");
|
|
2648
2678
|
s.className = "vd-attribute", s.dataset.name = n.name;
|
|
2649
2679
|
const r = document.createElement("span");
|
|
2650
|
-
r.className = "vd-attribute-label", r.textContent =
|
|
2651
|
-
const
|
|
2680
|
+
r.className = "vd-attribute-label", r.textContent = G(n.name), r.id = `vd-attribute-label-${Pi++}`, s.appendChild(r), s.setAttribute("role", "group"), s.setAttribute("aria-labelledby", r.id);
|
|
2681
|
+
const a = n.values.find((p) => t.getValue(n.name, p)?.isSelected === !0), h = n.values.map(G), d = n.values.length <= zi ? new wi(n.values, a, h) : new _i(n.name, n.values, G(n.name), a, h);
|
|
2652
2682
|
return d.onSelect((p) => {
|
|
2653
|
-
e.dispatch(
|
|
2683
|
+
e.dispatch(O.SELECT, { attribute: n.name, value: p }, !0).defaultPrevented || i(n.name, p);
|
|
2654
2684
|
}), o(n.name, (p) => {
|
|
2655
|
-
d.setSelected(p.value), e.dispatch(
|
|
2685
|
+
d.setSelected(p.value), e.dispatch(O.SELECTED, { attribute: n.name, value: p.value });
|
|
2656
2686
|
}), s.appendChild(d.element), s;
|
|
2657
2687
|
}
|
|
2658
|
-
const
|
|
2659
|
-
class
|
|
2660
|
-
constructor(t, e =
|
|
2688
|
+
const $i = 80, Di = 2500;
|
|
2689
|
+
class Bi {
|
|
2690
|
+
constructor(t, e = Di) {
|
|
2661
2691
|
this.configuration = t, this.resetMs = e, this.element = document.createElement("div"), this.element.className = "vd-commerce vd-hidden";
|
|
2662
2692
|
const i = document.createElement("div");
|
|
2663
2693
|
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 b({ variant: "default", onClick: () => {
|
|
@@ -2689,19 +2719,19 @@ class Ri {
|
|
|
2689
2719
|
this.priceEl.textContent = "", this.vatEl.textContent = "";
|
|
2690
2720
|
return;
|
|
2691
2721
|
}
|
|
2692
|
-
this.priceEl.textContent =
|
|
2722
|
+
this.priceEl.textContent = Ui(t.price, t.currency), this.vatEl.textContent = ht(this.configuration.vatDisplay);
|
|
2693
2723
|
}
|
|
2694
2724
|
renderButton() {
|
|
2695
2725
|
const t = this.configuration.submitEnabled;
|
|
2696
|
-
this.button.element.classList.toggle("vd-hidden", !t), t && this.state === "idle" && this.setButtonText(
|
|
2726
|
+
this.button.element.classList.toggle("vd-hidden", !t), t && this.state === "idle" && this.setButtonText(ht(this.configuration.buttonLabel));
|
|
2697
2727
|
}
|
|
2698
2728
|
async handleSubmit() {
|
|
2699
2729
|
if (this.state !== "busy") {
|
|
2700
|
-
this.setState("busy",
|
|
2730
|
+
this.setState("busy", Qn());
|
|
2701
2731
|
try {
|
|
2702
|
-
await this.configuration.submit(), this.setState("success",
|
|
2732
|
+
await this.configuration.submit(), this.setState("success", ti());
|
|
2703
2733
|
} catch {
|
|
2704
|
-
this.setState("failed",
|
|
2734
|
+
this.setState("failed", oi());
|
|
2705
2735
|
}
|
|
2706
2736
|
this.scheduleReset();
|
|
2707
2737
|
}
|
|
@@ -2718,18 +2748,18 @@ class Ri {
|
|
|
2718
2748
|
this.button.element.textContent = t, this.button.element.setAttribute("aria-label", t);
|
|
2719
2749
|
}
|
|
2720
2750
|
}
|
|
2721
|
-
function
|
|
2722
|
-
return (n ?? "").slice(0,
|
|
2751
|
+
function ht(n) {
|
|
2752
|
+
return (n ?? "").slice(0, $i);
|
|
2723
2753
|
}
|
|
2724
|
-
function
|
|
2754
|
+
function Ui(n, t) {
|
|
2725
2755
|
try {
|
|
2726
|
-
const e = new Intl.NumberFormat(
|
|
2756
|
+
const e = new Intl.NumberFormat(u(), { style: "currency", currency: t }), i = e.resolvedOptions().maximumFractionDigits ?? 2;
|
|
2727
2757
|
return e.format(n / 10 ** i);
|
|
2728
2758
|
} catch {
|
|
2729
2759
|
return `${t} ${(n / 100).toFixed(2)}`;
|
|
2730
2760
|
}
|
|
2731
2761
|
}
|
|
2732
|
-
class
|
|
2762
|
+
class xt {
|
|
2733
2763
|
slot = null;
|
|
2734
2764
|
panel = null;
|
|
2735
2765
|
attach(t, e) {
|
|
@@ -2742,8 +2772,14 @@ class St {
|
|
|
2742
2772
|
this.slot?.remove(), this.slot = null, this.panel = null;
|
|
2743
2773
|
}
|
|
2744
2774
|
}
|
|
2745
|
-
const
|
|
2746
|
-
class
|
|
2775
|
+
const Vi = 572;
|
|
2776
|
+
class ji {
|
|
2777
|
+
/** @param actionBarSlot The shared corner slot the AR/fullscreen buttons live in — the
|
|
2778
|
+
* "open configurator" toggle joins them there instead of floating as its own overlay. */
|
|
2779
|
+
constructor(t) {
|
|
2780
|
+
this.actionBarSlot = t;
|
|
2781
|
+
}
|
|
2782
|
+
actionBarSlot;
|
|
2747
2783
|
element = null;
|
|
2748
2784
|
body = null;
|
|
2749
2785
|
openButton = null;
|
|
@@ -2757,7 +2793,7 @@ class Ni {
|
|
|
2757
2793
|
this.container = t, e.classList.add("vd-attributes-sidebar"), this.closeButton = new b({
|
|
2758
2794
|
variant: "ghost",
|
|
2759
2795
|
size: "icon-sm",
|
|
2760
|
-
label:
|
|
2796
|
+
label: vn(),
|
|
2761
2797
|
icon: g.close({ size: 18 }),
|
|
2762
2798
|
onClick: () => {
|
|
2763
2799
|
this.expanded = !1, this.render();
|
|
@@ -2766,28 +2802,24 @@ class Ni {
|
|
|
2766
2802
|
const i = document.createElement("div");
|
|
2767
2803
|
i.className = "vd-sidebar-header", i.appendChild(this.closeButton.element), this.body = document.createElement("div"), this.body.className = "vd-sidebar-body", this.body.appendChild(e), this.element = document.createElement("div"), this.element.className = "vd-sidebar vd-hidden", this.element.append(i, this.body), t.appendChild(this.element), this.openButton = new b({
|
|
2768
2804
|
variant: "outline",
|
|
2769
|
-
size: "
|
|
2770
|
-
label:
|
|
2805
|
+
size: "icon",
|
|
2806
|
+
label: pn(),
|
|
2771
2807
|
icon: g.configurator({ size: 18 }),
|
|
2772
2808
|
onClick: () => {
|
|
2773
2809
|
this.expanded = !0, this.render();
|
|
2774
2810
|
}
|
|
2775
|
-
}), this.openButton.element.classList.add("vd-configurator-toggle", "vd-hidden"),
|
|
2811
|
+
}), this.openButton.element.classList.add("vd-configurator-toggle", "vd-hidden"), this.actionBarSlot.appendChild(this.openButton.element), this.observe();
|
|
2776
2812
|
}
|
|
2777
2813
|
setVisible(t) {
|
|
2778
2814
|
this.visible = t, this.render();
|
|
2779
2815
|
}
|
|
2780
2816
|
destroy() {
|
|
2781
|
-
this.observer?.disconnect(), this.observer = null, this.openButton?.element.remove(), this.element?.remove(), this.container?.classList.remove(
|
|
2782
|
-
"vd-layout-sidebar-right",
|
|
2783
|
-
"vd-layout-sidebar-collapsed",
|
|
2784
|
-
"vd-layout-sidebar-permanent"
|
|
2785
|
-
), this.container = null;
|
|
2817
|
+
this.observer?.disconnect(), this.observer = null, this.openButton?.element.remove(), this.element?.remove(), this.container?.classList.remove("vd-layout-sidebar-right", "vd-layout-sidebar-permanent"), this.container = null;
|
|
2786
2818
|
}
|
|
2787
2819
|
observe() {
|
|
2788
2820
|
typeof ResizeObserver > "u" || this.container === null || (this.observer = new ResizeObserver((t) => {
|
|
2789
2821
|
const e = t[0]?.contentRect.width ?? 0;
|
|
2790
|
-
this.setCollapsible(e > 0 && e <
|
|
2822
|
+
this.setCollapsible(e > 0 && e < Vi);
|
|
2791
2823
|
}), this.observer.observe(this.container));
|
|
2792
2824
|
}
|
|
2793
2825
|
setCollapsible(t) {
|
|
@@ -2797,10 +2829,10 @@ class Ni {
|
|
|
2797
2829
|
if (this.element === null || this.openButton === null || this.closeButton === null || this.container === null)
|
|
2798
2830
|
return;
|
|
2799
2831
|
const t = this.visible && this.expanded, e = this.visible && !this.expanded;
|
|
2800
|
-
this.element.classList.toggle("vd-hidden", !this.visible), this.element.classList.toggle("vd-sidebar-collapsed", e), this.openButton.element.classList.toggle("vd-hidden", !e), this.closeButton.element.style.display = this.collapsible ? "" : "none", this.container.classList.toggle("vd-layout-sidebar-right", t), this.container.classList.toggle("vd-layout-sidebar-
|
|
2832
|
+
this.element.classList.toggle("vd-hidden", !this.visible), this.element.classList.toggle("vd-sidebar-collapsed", e), this.openButton.element.classList.toggle("vd-hidden", !e), this.closeButton.element.style.display = this.collapsible ? "" : "none", this.container.classList.toggle("vd-layout-sidebar-right", t), this.container.classList.toggle("vd-layout-sidebar-permanent", t && !this.collapsible);
|
|
2801
2833
|
}
|
|
2802
2834
|
}
|
|
2803
|
-
class
|
|
2835
|
+
class Hi {
|
|
2804
2836
|
attach(t, e) {
|
|
2805
2837
|
}
|
|
2806
2838
|
setVisible(t) {
|
|
@@ -2808,20 +2840,20 @@ class Li {
|
|
|
2808
2840
|
destroy() {
|
|
2809
2841
|
}
|
|
2810
2842
|
}
|
|
2811
|
-
const
|
|
2812
|
-
"inframe-bottom-left": () => new
|
|
2813
|
-
"sidebar-right": () => new
|
|
2814
|
-
hidden: () => new
|
|
2843
|
+
const qi = {
|
|
2844
|
+
"inframe-bottom-left": () => new xt(),
|
|
2845
|
+
"sidebar-right": (n) => new ji(n),
|
|
2846
|
+
hidden: () => new Hi()
|
|
2815
2847
|
};
|
|
2816
|
-
function
|
|
2817
|
-
return (
|
|
2848
|
+
function Gi(n, t) {
|
|
2849
|
+
return (qi[n ?? ""] ?? (() => new xt()))(t);
|
|
2818
2850
|
}
|
|
2819
|
-
const
|
|
2851
|
+
const Z = w.fontFamily.sans.join(", "), W = `
|
|
2820
2852
|
position: absolute;
|
|
2821
2853
|
display: flex;
|
|
2822
2854
|
z-index: 10;
|
|
2823
2855
|
transition: inset-inline-end 0.18s ease;
|
|
2824
|
-
`,
|
|
2856
|
+
`, Zi = `
|
|
2825
2857
|
/* Override browser's default black fullscreen backdrop */
|
|
2826
2858
|
.vd-container:fullscreen {
|
|
2827
2859
|
background: oklch(100% 0 0);
|
|
@@ -2829,52 +2861,52 @@ const H = w.fontFamily.sans.join(", "), q = `
|
|
|
2829
2861
|
|
|
2830
2862
|
/* Layout slots — four corners */
|
|
2831
2863
|
.vd-slot-top-right {
|
|
2832
|
-
${
|
|
2833
|
-
inset-block-start: ${
|
|
2834
|
-
inset-inline-end: ${
|
|
2864
|
+
${W}
|
|
2865
|
+
inset-block-start: ${l[3]};
|
|
2866
|
+
inset-inline-end: ${l[3]};
|
|
2835
2867
|
flex-direction: column;
|
|
2836
2868
|
align-items: flex-end;
|
|
2837
|
-
gap: ${
|
|
2869
|
+
gap: ${l[1.5]};
|
|
2838
2870
|
}
|
|
2839
2871
|
|
|
2840
2872
|
.vd-slot-bottom-left {
|
|
2841
|
-
${
|
|
2842
|
-
inset-block-end: ${
|
|
2843
|
-
inset-inline-start: ${
|
|
2873
|
+
${W}
|
|
2874
|
+
inset-block-end: ${l[3]};
|
|
2875
|
+
inset-inline-start: ${l[3]};
|
|
2844
2876
|
flex-direction: column;
|
|
2845
2877
|
align-items: flex-start;
|
|
2846
|
-
gap: ${
|
|
2878
|
+
gap: ${l[1.5]};
|
|
2847
2879
|
}
|
|
2848
2880
|
|
|
2849
2881
|
.vd-slot-bottom-right {
|
|
2850
|
-
${
|
|
2851
|
-
inset-block-end: ${
|
|
2852
|
-
inset-inline-end: ${
|
|
2882
|
+
${W}
|
|
2883
|
+
inset-block-end: ${l[3]};
|
|
2884
|
+
inset-inline-end: ${l[3]};
|
|
2853
2885
|
flex-direction: row;
|
|
2854
|
-
gap: ${
|
|
2886
|
+
gap: ${l[1.5]};
|
|
2855
2887
|
}
|
|
2856
2888
|
|
|
2857
2889
|
/* Component styles — no positioning */
|
|
2858
2890
|
.vd-camera-controls {
|
|
2859
2891
|
display: flex;
|
|
2860
2892
|
flex-direction: column;
|
|
2861
|
-
gap: ${
|
|
2893
|
+
gap: ${l[1]};
|
|
2862
2894
|
background: color-mix(in oklch, ${m.white} 85%, transparent);
|
|
2863
2895
|
backdrop-filter: blur(8px);
|
|
2864
|
-
border-radius: ${
|
|
2865
|
-
padding: ${
|
|
2896
|
+
border-radius: ${l[2]};
|
|
2897
|
+
padding: ${l[2]};
|
|
2866
2898
|
}
|
|
2867
2899
|
|
|
2868
2900
|
.vd-zoom {
|
|
2869
2901
|
display: flex;
|
|
2870
|
-
gap: ${
|
|
2902
|
+
gap: ${l[0.5]};
|
|
2871
2903
|
}
|
|
2872
2904
|
|
|
2873
2905
|
.vd-dpad {
|
|
2874
2906
|
display: grid;
|
|
2875
|
-
grid-template-columns: repeat(3, ${
|
|
2876
|
-
grid-template-rows: repeat(3, ${
|
|
2877
|
-
gap: ${
|
|
2907
|
+
grid-template-columns: repeat(3, ${l[9]});
|
|
2908
|
+
grid-template-rows: repeat(3, ${l[9]});
|
|
2909
|
+
gap: ${l[0.5]};
|
|
2878
2910
|
}
|
|
2879
2911
|
|
|
2880
2912
|
.vd-dpad-up { grid-column: 2; grid-row: 1; }
|
|
@@ -2886,20 +2918,20 @@ const H = w.fontFamily.sans.join(", "), q = `
|
|
|
2886
2918
|
.vd-attributes {
|
|
2887
2919
|
display: flex;
|
|
2888
2920
|
flex-direction: column;
|
|
2889
|
-
gap: ${
|
|
2921
|
+
gap: ${l[3]};
|
|
2890
2922
|
background: color-mix(in oklch, ${m.white} 85%, transparent);
|
|
2891
2923
|
backdrop-filter: blur(8px);
|
|
2892
2924
|
border: 1px solid color-mix(in oklch, ${m.neutral[900]} 8%, transparent);
|
|
2893
|
-
border-radius: ${
|
|
2894
|
-
padding: ${
|
|
2895
|
-
box-shadow: 0 ${
|
|
2896
|
-
font-family: ${
|
|
2925
|
+
border-radius: ${l[3]};
|
|
2926
|
+
padding: ${l[3]};
|
|
2927
|
+
box-shadow: 0 ${l[1]} ${l[4]} color-mix(in oklch, ${m.neutral[900]} 6%, transparent);
|
|
2928
|
+
font-family: ${Z};
|
|
2897
2929
|
}
|
|
2898
2930
|
|
|
2899
2931
|
.vd-attribute {
|
|
2900
2932
|
display: flex;
|
|
2901
2933
|
flex-direction: column;
|
|
2902
|
-
gap: ${
|
|
2934
|
+
gap: ${l[1.5]};
|
|
2903
2935
|
}
|
|
2904
2936
|
|
|
2905
2937
|
/* Micro-label: recedes so the controls lead. */
|
|
@@ -2909,7 +2941,7 @@ const H = w.fontFamily.sans.join(", "), q = `
|
|
|
2909
2941
|
color: ${m.neutral[500]};
|
|
2910
2942
|
text-transform: uppercase;
|
|
2911
2943
|
letter-spacing: 0.05em;
|
|
2912
|
-
font-family: ${
|
|
2944
|
+
font-family: ${Z};
|
|
2913
2945
|
}
|
|
2914
2946
|
|
|
2915
2947
|
/* sidebar-right layout — a docked, full-height right panel */
|
|
@@ -2932,6 +2964,11 @@ const H = w.fontFamily.sans.join(", "), q = `
|
|
|
2932
2964
|
|
|
2933
2965
|
.vd-hidden { display: none !important; }
|
|
2934
2966
|
|
|
2967
|
+
/* the "open configurator" toggle joins the shared bottom-right slot as a flex child;
|
|
2968
|
+
order pins it after AR/fullscreen regardless of DOM insertion order (MAPPING data,
|
|
2969
|
+
which mounts this button, always arrives before the toolbar mounts on ready). */
|
|
2970
|
+
.vd-configurator-toggle { order: 1; }
|
|
2971
|
+
|
|
2935
2972
|
.vd-sidebar {
|
|
2936
2973
|
position: absolute;
|
|
2937
2974
|
inset-block: 0;
|
|
@@ -2943,7 +2980,7 @@ const H = w.fontFamily.sans.join(", "), q = `
|
|
|
2943
2980
|
background: color-mix(in oklch, ${m.white} 90%, transparent);
|
|
2944
2981
|
backdrop-filter: blur(10px);
|
|
2945
2982
|
border-inline-start: 1px solid color-mix(in oklch, ${m.neutral[900]} 8%, transparent);
|
|
2946
|
-
box-shadow: -${
|
|
2983
|
+
box-shadow: -${l[1]} 0 ${l[4]} color-mix(in oklch, ${m.neutral[900]} 5%, transparent);
|
|
2947
2984
|
}
|
|
2948
2985
|
|
|
2949
2986
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -2955,13 +2992,13 @@ const H = w.fontFamily.sans.join(", "), q = `
|
|
|
2955
2992
|
.vd-sidebar-header {
|
|
2956
2993
|
display: flex;
|
|
2957
2994
|
justify-content: flex-end;
|
|
2958
|
-
padding: ${
|
|
2995
|
+
padding: ${l[1.5]} ${l[1.5]} 0;
|
|
2959
2996
|
}
|
|
2960
2997
|
|
|
2961
2998
|
.vd-sidebar-body {
|
|
2962
2999
|
flex: 1;
|
|
2963
3000
|
overflow-y: auto;
|
|
2964
|
-
padding: ${
|
|
3001
|
+
padding: ${l[4]};
|
|
2965
3002
|
}
|
|
2966
3003
|
|
|
2967
3004
|
/* attributes inside the sidebar: flat and full-width — the panel provides the frosting */
|
|
@@ -2972,42 +3009,27 @@ const H = w.fontFamily.sans.join(", "), q = `
|
|
|
2972
3009
|
border-radius: 0;
|
|
2973
3010
|
padding: 0;
|
|
2974
3011
|
box-shadow: none;
|
|
2975
|
-
gap: ${
|
|
2976
|
-
}
|
|
2977
|
-
|
|
2978
|
-
/* floating toggle, shown when the sidebar is collapsed on narrow embeds */
|
|
2979
|
-
.vd-configurator-toggle {
|
|
2980
|
-
position: absolute;
|
|
2981
|
-
inset-block-end: ${a[3]};
|
|
2982
|
-
inset-inline-end: ${a[3]};
|
|
2983
|
-
z-index: 12;
|
|
3012
|
+
gap: ${l[5]};
|
|
2984
3013
|
}
|
|
2985
3014
|
|
|
2986
3015
|
/* while the panel is open, keep the corner controls clear of it */
|
|
2987
|
-
.vd-layout-sidebar-right .vd-slot-top-right { inset-inline-end: calc(var(--vd-sidebar-width) + ${
|
|
2988
|
-
.vd-layout-sidebar-right .vd-slot-bottom-right { inset-inline-end: calc(var(--vd-sidebar-width) + ${
|
|
2989
|
-
|
|
2990
|
-
/* while collapsed on a narrow embed, lift the bottom-right controls above the
|
|
2991
|
-
floating toggle so the AR/fullscreen buttons aren't hidden behind the
|
|
2992
|
-
"open configurator" button (spacing[9] = the default toggle button height) */
|
|
2993
|
-
.vd-layout-sidebar-collapsed .vd-slot-bottom-right {
|
|
2994
|
-
inset-block-end: calc(${a[3]} + ${a[9]} + ${a[1.5]});
|
|
2995
|
-
}
|
|
3016
|
+
.vd-layout-sidebar-right .vd-slot-top-right { inset-inline-end: calc(var(--vd-sidebar-width) + ${l[3]}); }
|
|
3017
|
+
.vd-layout-sidebar-right .vd-slot-bottom-right { inset-inline-end: calc(var(--vd-sidebar-width) + ${l[3]}); }
|
|
2996
3018
|
|
|
2997
3019
|
/* Price + CTA — sit under the attribute controls, separated by a hairline */
|
|
2998
3020
|
.vd-commerce {
|
|
2999
3021
|
display: flex;
|
|
3000
3022
|
flex-direction: column;
|
|
3001
|
-
gap: ${
|
|
3002
|
-
padding-block-start: ${
|
|
3023
|
+
gap: ${l[2]};
|
|
3024
|
+
padding-block-start: ${l[3]};
|
|
3003
3025
|
border-block-start: 1px solid color-mix(in oklch, ${m.neutral[900]} 8%, transparent);
|
|
3004
|
-
font-family: ${
|
|
3026
|
+
font-family: ${Z};
|
|
3005
3027
|
}
|
|
3006
3028
|
|
|
3007
3029
|
.vd-commerce-price {
|
|
3008
3030
|
display: flex;
|
|
3009
3031
|
align-items: baseline;
|
|
3010
|
-
gap: ${
|
|
3032
|
+
gap: ${l[1.5]};
|
|
3011
3033
|
}
|
|
3012
3034
|
|
|
3013
3035
|
.vd-price {
|
|
@@ -3034,17 +3056,17 @@ const H = w.fontFamily.sans.join(", "), q = `
|
|
|
3034
3056
|
}
|
|
3035
3057
|
|
|
3036
3058
|
`;
|
|
3037
|
-
function
|
|
3038
|
-
if (
|
|
3059
|
+
function Wi() {
|
|
3060
|
+
if (Et(), document.getElementById("vd-styles") !== null)
|
|
3039
3061
|
return;
|
|
3040
3062
|
const n = document.createElement("style");
|
|
3041
|
-
n.id = "vd-styles", n.textContent =
|
|
3063
|
+
n.id = "vd-styles", n.textContent = Zi, document.head.appendChild(n);
|
|
3042
3064
|
}
|
|
3043
|
-
function
|
|
3065
|
+
function Yi(n, t) {
|
|
3044
3066
|
const e = document.createElement("a");
|
|
3045
3067
|
e.href = `data:image/png;base64,${n}`, e.download = t, e.click();
|
|
3046
3068
|
}
|
|
3047
|
-
class
|
|
3069
|
+
class Qi {
|
|
3048
3070
|
options;
|
|
3049
3071
|
settings = {};
|
|
3050
3072
|
container = null;
|
|
@@ -3060,7 +3082,7 @@ class Di {
|
|
|
3060
3082
|
this.options = t;
|
|
3061
3083
|
}
|
|
3062
3084
|
attach(t) {
|
|
3063
|
-
|
|
3085
|
+
Wi(), this.container = t, this.loading = new Oi(t), this.slots.topRight = this.createSlot(t, "vd-slot-top-right"), this.slots.bottomRight = this.createSlot(t, "vd-slot-bottom-right");
|
|
3064
3086
|
}
|
|
3065
3087
|
onReady() {
|
|
3066
3088
|
this.loading?.hide(), this.loading = null, this.mountToolbar(), this.cameraControls !== null && (this.cameraControls.element.style.display = "flex"), this.layout?.setVisible(!0);
|
|
@@ -3069,7 +3091,7 @@ class Di {
|
|
|
3069
3091
|
if (this.actionBar !== null || this.slots.bottomRight === null || this.container === null)
|
|
3070
3092
|
return;
|
|
3071
3093
|
const t = typeof this.container.requestFullscreen == "function";
|
|
3072
|
-
this.actionBar = new
|
|
3094
|
+
this.actionBar = new Ni({
|
|
3073
3095
|
onAr: this.options.onAr,
|
|
3074
3096
|
onFullscreen: t ? () => {
|
|
3075
3097
|
this.toggleFullscreen();
|
|
@@ -3086,20 +3108,20 @@ class Di {
|
|
|
3086
3108
|
this.loading?.showError(t);
|
|
3087
3109
|
}
|
|
3088
3110
|
applyViewerSettings(t) {
|
|
3089
|
-
this.settings = t, t.language !== void 0 &&
|
|
3111
|
+
this.settings = t, t.language !== void 0 && yt(t.language, { reload: !1 }), this.syncScreenshotButton(), this.actionBar?.applySettings(t), this.cameraControls !== null && (this.cameraControls.element.style.display = t.cameraControls === !0 ? "flex" : "none"), this.placeScreenshotButton();
|
|
3090
3112
|
}
|
|
3091
3113
|
renderAttributeControls(t, e) {
|
|
3092
|
-
if (!(this.container === null || this.slots.topRight === null) && (this.cameraControls?.element.remove(), this.cameraControls = null, this.teardownConfigurator(), this.settings.cameraControls === !0 && (this.cameraControls = new
|
|
3114
|
+
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(this.options.cameraApi, this.options.cameraPositionApi), this.cameraControls.element.style.display = "none", this.slots.topRight.appendChild(this.cameraControls.element)), this.placeScreenshotButton(), e.length !== 0)) {
|
|
3093
3115
|
this.attributes = document.createElement("div"), this.attributes.className = "vd-attributes";
|
|
3094
3116
|
for (const i of e)
|
|
3095
|
-
this.attributes.appendChild(
|
|
3117
|
+
this.attributes.appendChild(Fi(
|
|
3096
3118
|
i,
|
|
3097
3119
|
t,
|
|
3098
3120
|
this.options.eventBus,
|
|
3099
3121
|
this.options.onSelect,
|
|
3100
3122
|
this.options.onSubscribe
|
|
3101
3123
|
));
|
|
3102
|
-
this.commerce = new
|
|
3124
|
+
this.commerce = new Bi(this.options.configuration), this.attributes.appendChild(this.commerce.element), this.layout = Gi(this.settings.configuratorLayout, this.slots.bottomRight), this.layout.attach(this.container, this.attributes);
|
|
3103
3125
|
}
|
|
3104
3126
|
}
|
|
3105
3127
|
get viewerSettings() {
|
|
@@ -3124,11 +3146,11 @@ class Di {
|
|
|
3124
3146
|
t && this.screenshotBtn === null && (this.screenshotBtn = new b({
|
|
3125
3147
|
variant: "outline",
|
|
3126
3148
|
size: "icon",
|
|
3127
|
-
label:
|
|
3149
|
+
label: dn(),
|
|
3128
3150
|
icon: g.screenshot(),
|
|
3129
3151
|
onClick: () => {
|
|
3130
3152
|
this.options.snapshotApi.take("snapshot.png").onDeveloped(({ data: e, filename: i }) => {
|
|
3131
|
-
|
|
3153
|
+
Yi(e, i);
|
|
3132
3154
|
});
|
|
3133
3155
|
}
|
|
3134
3156
|
})), !t && this.screenshotBtn !== null && (this.screenshotBtn.element.remove(), this.screenshotBtn = null);
|
|
@@ -3137,13 +3159,14 @@ class Di {
|
|
|
3137
3159
|
this.screenshotBtn === null || this.slots.topRight === null || (this.cameraControls !== null ? this.cameraControls.element.appendChild(this.screenshotBtn.element) : this.slots.topRight.appendChild(this.screenshotBtn.element));
|
|
3138
3160
|
}
|
|
3139
3161
|
}
|
|
3140
|
-
const
|
|
3141
|
-
class
|
|
3162
|
+
const Ki = {};
|
|
3163
|
+
class Xi {
|
|
3142
3164
|
defaultServer = "https://server.virtualdisplay.io";
|
|
3143
3165
|
options;
|
|
3144
3166
|
serverHost;
|
|
3145
|
-
|
|
3146
|
-
|
|
3167
|
+
extraParams;
|
|
3168
|
+
constructor(t, e, i) {
|
|
3169
|
+
this.options = t, this.serverHost = e, this.extraParams = i;
|
|
3147
3170
|
}
|
|
3148
3171
|
/**
|
|
3149
3172
|
* Create container and iframe, attach to parent element
|
|
@@ -3170,12 +3193,15 @@ class Ui {
|
|
|
3170
3193
|
}
|
|
3171
3194
|
buildUrl() {
|
|
3172
3195
|
const t = this.getServerUrl(), e = new URL(t);
|
|
3173
|
-
|
|
3196
|
+
e.searchParams.set("license", this.options.license), e.searchParams.set("model", this.options.model), 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);
|
|
3197
|
+
for (const [i, o] of Object.entries(this.extraParams ?? {}))
|
|
3198
|
+
e.searchParams.set(i, o);
|
|
3199
|
+
return e.toString();
|
|
3174
3200
|
}
|
|
3175
3201
|
getServerUrl() {
|
|
3176
3202
|
if (this.serverHost !== void 0)
|
|
3177
3203
|
return this.serverHost;
|
|
3178
|
-
if (
|
|
3204
|
+
if (Ki?.VITE_VIRTUALDISPLAY_SERVER_HOST === void 0)
|
|
3179
3205
|
return this.defaultServer;
|
|
3180
3206
|
}
|
|
3181
3207
|
getParentElement() {
|
|
@@ -3187,37 +3213,37 @@ class Ui {
|
|
|
3187
3213
|
return t;
|
|
3188
3214
|
}
|
|
3189
3215
|
}
|
|
3190
|
-
function
|
|
3216
|
+
function Ji(n) {
|
|
3191
3217
|
const { messenger: t } = n;
|
|
3192
3218
|
t.on(c.HANDSHAKE, (e) => {
|
|
3193
|
-
|
|
3219
|
+
Nt(e) && (_.info("Server handshake received, flushing publisher queue"), t.markReady());
|
|
3194
3220
|
}), t.on(c.SESSION, (e) => {
|
|
3195
|
-
|
|
3221
|
+
Lt(e) && n.onSession(e.sessionId);
|
|
3196
3222
|
}), t.on(c.MUTATION, (e) => {
|
|
3197
|
-
|
|
3223
|
+
Mt(e) && (n.attributes.handleMutationResult(e), n.configuration.handleSelectionChanged(n.attributes.getSelection()));
|
|
3198
3224
|
}), t.on(c.SNAPSHOT, (e) => {
|
|
3199
|
-
|
|
3225
|
+
zt(e) && n.snapshot.handleSnapshotResult(e);
|
|
3200
3226
|
}), t.on(c.CAMERA, (e) => {
|
|
3201
|
-
|
|
3227
|
+
Pt(e) && n.cameraPosition.handlePositionUpdate(e);
|
|
3202
3228
|
}), t.on(c.LOADING_INDICATOR, (e) => {
|
|
3203
|
-
|
|
3229
|
+
$t(e) && (e.error !== void 0 ? n.ui.showError(e.error) : n.ui.updateProgress(e.progress, e.phase));
|
|
3204
3230
|
}), t.on(c.CONFIG, (e) => {
|
|
3205
|
-
|
|
3231
|
+
Bt(e) && n.applyConfig(e);
|
|
3206
3232
|
}), t.on(c.MAPPING, (e) => {
|
|
3207
|
-
|
|
3208
|
-
}),
|
|
3233
|
+
Ft(e) && (n.attributes.handleMappingReceived(e), n.configuration.handleSelectionChanged(n.attributes.getSelection()), n.ui.renderAttributeControls(n.attributes, e.attributes), n.readyStateTracker.handleMappingReceived());
|
|
3234
|
+
}), to(n);
|
|
3209
3235
|
}
|
|
3210
|
-
function
|
|
3236
|
+
function to(n) {
|
|
3211
3237
|
const { messenger: t } = n;
|
|
3212
3238
|
t.on(c.FOCUS, (e) => {
|
|
3213
|
-
|
|
3239
|
+
Ut(e) && n.focus.handleStateReceived(e);
|
|
3214
3240
|
}), t.on(c.PRICING, (e) => {
|
|
3215
|
-
|
|
3241
|
+
Vt(e) && n.configuration.handlePricingReceived(e.pricing);
|
|
3216
3242
|
}), t.on(c.SYNC, (e) => {
|
|
3217
|
-
|
|
3243
|
+
Dt(e) && n.onSync(e.connected);
|
|
3218
3244
|
});
|
|
3219
3245
|
}
|
|
3220
|
-
class
|
|
3246
|
+
class eo {
|
|
3221
3247
|
ready = !1;
|
|
3222
3248
|
onReady;
|
|
3223
3249
|
constructor(t) {
|
|
@@ -3233,7 +3259,7 @@ class Hi {
|
|
|
3233
3259
|
this.ready = !1;
|
|
3234
3260
|
}
|
|
3235
3261
|
}
|
|
3236
|
-
class
|
|
3262
|
+
class no {
|
|
3237
3263
|
attributes;
|
|
3238
3264
|
readyStateTracker;
|
|
3239
3265
|
messenger;
|
|
@@ -3247,6 +3273,7 @@ class qi {
|
|
|
3247
3273
|
ui;
|
|
3248
3274
|
options;
|
|
3249
3275
|
serverHost;
|
|
3276
|
+
iframeParams;
|
|
3250
3277
|
/** The composed AR flow, or undefined in builds without one (the studio). */
|
|
3251
3278
|
arActivation;
|
|
3252
3279
|
/** The composed sync tracker, or undefined in builds without one (the studio). */
|
|
@@ -3258,47 +3285,49 @@ class qi {
|
|
|
3258
3285
|
/** The viewer's tracking session id, once the server announces it (SESSION). */
|
|
3259
3286
|
viewerSessionId;
|
|
3260
3287
|
constructor(t, e) {
|
|
3261
|
-
this.options = t
|
|
3288
|
+
this.options = t;
|
|
3289
|
+
const i = e ?? {};
|
|
3290
|
+
this.serverHost = i.serverHost, this.iframeParams = i.iframeParams, this.initializeLogging(), this.messenger = new jt(
|
|
3262
3291
|
() => this.iframe?.contentWindow ?? null,
|
|
3263
|
-
|
|
3292
|
+
i.messengerOptions
|
|
3264
3293
|
);
|
|
3265
|
-
const
|
|
3266
|
-
this.messenger.send(
|
|
3294
|
+
const o = (r) => {
|
|
3295
|
+
this.messenger.send(r);
|
|
3267
3296
|
};
|
|
3268
|
-
this.attributes = new
|
|
3269
|
-
this.notifyMutationFailed(
|
|
3270
|
-
}), this.snapshotApi = new
|
|
3271
|
-
this.dispatchFocusChange(
|
|
3272
|
-
}), this.configurationApi = new
|
|
3273
|
-
(
|
|
3274
|
-
this.dispatchConfigurationChange(
|
|
3297
|
+
this.attributes = new de(o, (r, a) => {
|
|
3298
|
+
this.notifyMutationFailed(r, a);
|
|
3299
|
+
}), this.snapshotApi = new ve(o), this.annotationsApi = new Ht(o), this.cameraApi = new ue(o), this.cameraPositionApi = new he(), this.focusApi = new ge(o, (r) => {
|
|
3300
|
+
this.dispatchFocusChange(r);
|
|
3301
|
+
}), this.configurationApi = new fe(
|
|
3302
|
+
(r) => {
|
|
3303
|
+
this.dispatchConfigurationChange(r);
|
|
3275
3304
|
},
|
|
3276
|
-
(
|
|
3277
|
-
this.dispatchConfigurationSubmit(
|
|
3305
|
+
(r) => {
|
|
3306
|
+
this.dispatchConfigurationSubmit(r);
|
|
3278
3307
|
}
|
|
3279
|
-
), this.eventBus = new
|
|
3308
|
+
), this.eventBus = new ye(), this.arActivation = i.createArActivation?.(o), this.syncTracker = i.createSyncTracker?.(), this.readyStateTracker = new eo(() => {
|
|
3280
3309
|
this.notifyReady();
|
|
3281
3310
|
});
|
|
3282
|
-
const
|
|
3283
|
-
this.ui = new
|
|
3311
|
+
const s = this.arActivation;
|
|
3312
|
+
this.ui = new Qi({
|
|
3284
3313
|
snapshotApi: this.snapshotApi,
|
|
3285
3314
|
cameraApi: this.cameraApi,
|
|
3286
3315
|
cameraPositionApi: this.cameraPositionApi,
|
|
3287
3316
|
eventBus: this.eventBus,
|
|
3288
3317
|
configuration: this.configurationApi,
|
|
3289
|
-
onSelect: (
|
|
3290
|
-
onSubscribe: (
|
|
3291
|
-
...
|
|
3292
|
-
|
|
3318
|
+
onSelect: (r, a) => this.attributes.select(r, a),
|
|
3319
|
+
onSubscribe: (r, a) => this.attributes.onChange(r, a),
|
|
3320
|
+
...s !== void 0 && { onAr: () => {
|
|
3321
|
+
s.activate();
|
|
3293
3322
|
} },
|
|
3294
3323
|
onFullscreenEnter: () => {
|
|
3295
3324
|
this.trackFullscreen();
|
|
3296
3325
|
}
|
|
3297
|
-
}), this.wireIncomingMessages(),
|
|
3326
|
+
}), this.wireIncomingMessages(), i.registerHandlers?.(this.messenger, o), this.messenger.start(), this.createAndConnectIframe();
|
|
3298
3327
|
}
|
|
3299
3328
|
/** Wire the inbound viewer protocol to the facades. */
|
|
3300
3329
|
wireIncomingMessages() {
|
|
3301
|
-
|
|
3330
|
+
Ji({
|
|
3302
3331
|
messenger: this.messenger,
|
|
3303
3332
|
attributes: this.attributes,
|
|
3304
3333
|
configuration: this.configurationApi,
|
|
@@ -3341,7 +3370,7 @@ class qi {
|
|
|
3341
3370
|
*/
|
|
3342
3371
|
dispatchFocusChange(t) {
|
|
3343
3372
|
this.container?.dispatchEvent(
|
|
3344
|
-
new CustomEvent(
|
|
3373
|
+
new CustomEvent(O.FOCUS_CHANGE, { detail: t, bubbles: !0 })
|
|
3345
3374
|
);
|
|
3346
3375
|
}
|
|
3347
3376
|
/**
|
|
@@ -3350,13 +3379,13 @@ class qi {
|
|
|
3350
3379
|
*/
|
|
3351
3380
|
dispatchConfigurationChange(t) {
|
|
3352
3381
|
this.container?.dispatchEvent(
|
|
3353
|
-
new CustomEvent(
|
|
3382
|
+
new CustomEvent(O.CONFIGURATION_CHANGE, { detail: t ?? null, bubbles: !0 })
|
|
3354
3383
|
);
|
|
3355
3384
|
}
|
|
3356
3385
|
/** Dispatch a bubbling `vd:configuration-submit` event when the CTA is used. */
|
|
3357
3386
|
dispatchConfigurationSubmit(t) {
|
|
3358
3387
|
this.container?.dispatchEvent(
|
|
3359
|
-
new CustomEvent(
|
|
3388
|
+
new CustomEvent(O.CONFIGURATION_SUBMIT, { detail: t, bubbles: !0 })
|
|
3360
3389
|
);
|
|
3361
3390
|
}
|
|
3362
3391
|
handleConfig(t) {
|
|
@@ -3364,7 +3393,7 @@ class qi {
|
|
|
3364
3393
|
if (e !== void 0 || i !== void 0) {
|
|
3365
3394
|
const o = i !== void 0 ? { ...e ?? {}, ...i } : e;
|
|
3366
3395
|
if (i !== void 0 && e !== void 0) {
|
|
3367
|
-
const s = Object.entries(i).filter(([r,
|
|
3396
|
+
const s = Object.entries(i).filter(([r, a]) => e[r] !== a).map(([r, a]) => `${r} (metadata: ${e[r] ?? "undefined"}, override: ${a})`);
|
|
3368
3397
|
s.length > 0 && _.warn(`Viewer settings override active: ${s.join(", ")}`);
|
|
3369
3398
|
}
|
|
3370
3399
|
this.ui.applyViewerSettings(o), this.annotationsApi.setEnabled(o.annotations !== !1);
|
|
@@ -3376,10 +3405,10 @@ class qi {
|
|
|
3376
3405
|
this.messenger.send({ type: c.FULLSCREEN });
|
|
3377
3406
|
}
|
|
3378
3407
|
initializeLogging() {
|
|
3379
|
-
this.options.debug === !0 &&
|
|
3408
|
+
this.options.debug === !0 && ce(), _.info("Initializing Virtualdisplay client", { model: this.options.model });
|
|
3380
3409
|
}
|
|
3381
3410
|
createAndConnectIframe() {
|
|
3382
|
-
const e = new
|
|
3411
|
+
const e = new Xi(this.options, this.serverHost, this.iframeParams).create();
|
|
3383
3412
|
this.container = e.container, this.iframe = e.iframe, this.eventBus.attach(this.container), this.ui.attach(this.container);
|
|
3384
3413
|
try {
|
|
3385
3414
|
const i = new URL(this.iframe.src).origin;
|
|
@@ -3457,15 +3486,15 @@ class qi {
|
|
|
3457
3486
|
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;
|
|
3458
3487
|
}
|
|
3459
3488
|
}
|
|
3460
|
-
const
|
|
3461
|
-
function
|
|
3462
|
-
const t = new URL(`https://${
|
|
3489
|
+
const io = "ar.virtualdisplay.io";
|
|
3490
|
+
function oo(n) {
|
|
3491
|
+
const t = new URL(`https://${io}/go`);
|
|
3463
3492
|
return n.sessionId !== void 0 ? t.searchParams.set("session", n.sessionId) : (t.searchParams.set("license", n.license), t.searchParams.set("model", n.model)), t.toString();
|
|
3464
3493
|
}
|
|
3465
|
-
const
|
|
3466
|
-
class
|
|
3494
|
+
const so = 1500;
|
|
3495
|
+
class ro {
|
|
3467
3496
|
options;
|
|
3468
|
-
qrModal = new
|
|
3497
|
+
qrModal = new Ai();
|
|
3469
3498
|
/** The viewer's tracking session id, once the engine announces it (SESSION). */
|
|
3470
3499
|
sessionId;
|
|
3471
3500
|
/** Callbacks waiting on the SESSION message, resolved (or timed out) exactly once each. */
|
|
@@ -3487,7 +3516,7 @@ class Qi {
|
|
|
3487
3516
|
}
|
|
3488
3517
|
/** The AR button handler: mobile activates AR in the engine, desktop shows the hand-off QR. */
|
|
3489
3518
|
activate() {
|
|
3490
|
-
if (
|
|
3519
|
+
if (ae()) {
|
|
3491
3520
|
this.options.send({ type: c.AR_ACTIVATE });
|
|
3492
3521
|
return;
|
|
3493
3522
|
}
|
|
@@ -3511,7 +3540,7 @@ class Qi {
|
|
|
3511
3540
|
const t = await this.waitForSessionId();
|
|
3512
3541
|
if (this.destroyed)
|
|
3513
3542
|
return;
|
|
3514
|
-
const e =
|
|
3543
|
+
const e = oo({
|
|
3515
3544
|
sessionId: t,
|
|
3516
3545
|
license: this.options.license,
|
|
3517
3546
|
model: this.options.model
|
|
@@ -3532,14 +3561,14 @@ class Qi {
|
|
|
3532
3561
|
return this.sessionId !== void 0 ? Promise.resolve(this.sessionId) : new Promise((t) => {
|
|
3533
3562
|
const e = setTimeout(() => {
|
|
3534
3563
|
this.pendingTimers.delete(e), t(void 0);
|
|
3535
|
-
},
|
|
3564
|
+
}, so);
|
|
3536
3565
|
this.pendingTimers.add(e), this.waiters.push((i) => {
|
|
3537
3566
|
this.pendingTimers.delete(e), clearTimeout(e), t(i);
|
|
3538
3567
|
});
|
|
3539
3568
|
});
|
|
3540
3569
|
}
|
|
3541
3570
|
}
|
|
3542
|
-
class
|
|
3571
|
+
class ao {
|
|
3543
3572
|
callbacks = [];
|
|
3544
3573
|
lastKnown;
|
|
3545
3574
|
handleSync(t) {
|
|
@@ -3551,12 +3580,12 @@ class Yi {
|
|
|
3551
3580
|
this.callbacks.push(t), this.lastKnown !== void 0 && t(this.lastKnown);
|
|
3552
3581
|
}
|
|
3553
3582
|
}
|
|
3554
|
-
class
|
|
3583
|
+
class uo extends no {
|
|
3555
3584
|
syncStatusTracker;
|
|
3556
3585
|
constructor(t) {
|
|
3557
|
-
const e = new
|
|
3586
|
+
const e = new ao();
|
|
3558
3587
|
super(t, {
|
|
3559
|
-
createArActivation: (i) => new
|
|
3588
|
+
createArActivation: (i) => new ro({
|
|
3560
3589
|
license: t.license,
|
|
3561
3590
|
model: t.model,
|
|
3562
3591
|
send: i
|
|
@@ -3570,19 +3599,19 @@ class Ji extends qi {
|
|
|
3570
3599
|
}
|
|
3571
3600
|
}
|
|
3572
3601
|
export {
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3602
|
+
Ht as Annotations,
|
|
3603
|
+
Gt as Attribute,
|
|
3604
|
+
qt as AttributeValue,
|
|
3605
|
+
ue as Camera,
|
|
3606
|
+
fe as Configuration,
|
|
3578
3607
|
A as ERROR_CODES,
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3608
|
+
ge as Focus,
|
|
3609
|
+
be as Photo,
|
|
3610
|
+
ve as Snapshot,
|
|
3611
|
+
O as VD_EVENTS,
|
|
3612
|
+
uo as VirtualdisplayClient,
|
|
3584
3613
|
f as VirtualdisplayError,
|
|
3585
|
-
|
|
3586
|
-
|
|
3614
|
+
ce as enableDebugMode,
|
|
3615
|
+
lo as isDebugMode,
|
|
3587
3616
|
_ as logger
|
|
3588
3617
|
};
|