@vouchfor/embeds 0.0.0-experiment.b40b077 → 0.0.0-experiment.b77073f
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/dist/es/components/Embed/controllers/fetcher.d.ts +5 -0
- package/dist/es/components/Embed/index.d.ts +14 -15
- package/dist/es/embeds.js +187 -170
- package/dist/es/embeds.js.map +1 -1
- package/dist/es/utils/env.d.ts +3 -3
- package/dist/iife/embeds.iife.js +311 -370
- package/dist/iife/embeds.iife.js.map +1 -1
- package/package.json +4 -4
- package/src/components/Embed/Embed.stories.ts +8 -24
- package/src/components/Embed/controllers/fetcher.ts +62 -14
- package/src/components/Embed/controllers/tracking.ts +26 -33
- package/src/components/Embed/index.ts +23 -28
- package/src/utils/env.ts +3 -3
package/dist/es/embeds.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { property as
|
2
|
-
import { ifDefined as
|
1
|
+
import { property as A, state as Mt, customElement as Qt } from "lit/decorators.js";
|
2
|
+
import { ifDefined as mt } from "lit/directives/if-defined.js";
|
3
3
|
import { createRef as Lt, ref as Dt } from "lit/directives/ref.js";
|
4
4
|
import { Task as te } from "@lit/task";
|
5
5
|
import "@vouchfor/media-player";
|
@@ -8,7 +8,7 @@ import "@vouchfor/media-player";
|
|
8
8
|
* Copyright 2019 Google LLC
|
9
9
|
* SPDX-License-Identifier: BSD-3-Clause
|
10
10
|
*/
|
11
|
-
const
|
11
|
+
const F = window, _t = F.ShadowRoot && (F.ShadyCSS === void 0 || F.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, jt = Symbol(), gt = /* @__PURE__ */ new WeakMap();
|
12
12
|
let ee = class {
|
13
13
|
constructor(t, e, i) {
|
14
14
|
if (this._$cssResult$ = !0, i !== jt)
|
@@ -18,9 +18,9 @@ let ee = class {
|
|
18
18
|
get styleSheet() {
|
19
19
|
let t = this.o;
|
20
20
|
const e = this.t;
|
21
|
-
if (
|
21
|
+
if (_t && t === void 0) {
|
22
22
|
const i = e !== void 0 && e.length === 1;
|
23
|
-
i && (t =
|
23
|
+
i && (t = gt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && gt.set(e, t));
|
24
24
|
}
|
25
25
|
return t;
|
26
26
|
}
|
@@ -29,11 +29,11 @@ let ee = class {
|
|
29
29
|
}
|
30
30
|
};
|
31
31
|
const ie = (n) => new ee(typeof n == "string" ? n : n + "", void 0, jt), se = (n, t) => {
|
32
|
-
|
33
|
-
const i = document.createElement("style"), s =
|
32
|
+
_t ? n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
|
33
|
+
const i = document.createElement("style"), s = F.litNonce;
|
34
34
|
s !== void 0 && i.setAttribute("nonce", s), i.textContent = e.cssText, n.appendChild(i);
|
35
35
|
});
|
36
|
-
},
|
36
|
+
}, ft = _t ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
|
37
37
|
let e = "";
|
38
38
|
for (const i of t.cssRules)
|
39
39
|
e += i.cssText;
|
@@ -45,7 +45,7 @@ const ie = (n) => new ee(typeof n == "string" ? n : n + "", void 0, jt), se = (n
|
|
45
45
|
* SPDX-License-Identifier: BSD-3-Clause
|
46
46
|
*/
|
47
47
|
var et;
|
48
|
-
const
|
48
|
+
const K = window, At = K.trustedTypes, ne = At ? At.emptyScript : "", yt = K.reactiveElementPolyfillSupport, dt = { toAttribute(n, t) {
|
49
49
|
switch (t) {
|
50
50
|
case Boolean:
|
51
51
|
n = n ? ne : null;
|
@@ -124,9 +124,9 @@ let T = class extends HTMLElement {
|
|
124
124
|
if (Array.isArray(t)) {
|
125
125
|
const i = new Set(t.flat(1 / 0).reverse());
|
126
126
|
for (const s of i)
|
127
|
-
e.unshift(
|
127
|
+
e.unshift(ft(s));
|
128
128
|
} else
|
129
|
-
t !== void 0 && e.push(
|
129
|
+
t !== void 0 && e.push(ft(t));
|
130
130
|
return e;
|
131
131
|
}
|
132
132
|
static _$Ep(t, e) {
|
@@ -253,41 +253,41 @@ let T = class extends HTMLElement {
|
|
253
253
|
firstUpdated(t) {
|
254
254
|
}
|
255
255
|
};
|
256
|
-
T[ct] = !0, T.elementProperties = /* @__PURE__ */ new Map(), T.elementStyles = [], T.shadowRootOptions = { mode: "open" },
|
256
|
+
T[ct] = !0, T.elementProperties = /* @__PURE__ */ new Map(), T.elementStyles = [], T.shadowRootOptions = { mode: "open" }, yt == null || yt({ ReactiveElement: T }), ((et = K.reactiveElementVersions) !== null && et !== void 0 ? et : K.reactiveElementVersions = []).push("1.6.2");
|
257
257
|
/**
|
258
258
|
* @license
|
259
259
|
* Copyright 2017 Google LLC
|
260
260
|
* SPDX-License-Identifier: BSD-3-Clause
|
261
261
|
*/
|
262
262
|
var st;
|
263
|
-
const J = window, x = J.trustedTypes,
|
264
|
-
\f\r]`,
|
265
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
266
|
-
function
|
263
|
+
const J = window, x = J.trustedTypes, Et = x ? x.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, ut = "$lit$", E = `lit$${(Math.random() + "").slice(9)}$`, zt = "?" + E, re = `<${zt}>`, C = document, G = () => C.createComment(""), D = (n) => n === null || typeof n != "object" && typeof n != "function", qt = Array.isArray, oe = (n) => qt(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", nt = `[
|
264
|
+
\f\r]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, wt = /-->/g, bt = />/g, b = RegExp(`>|${nt}(?:([^\\s"'>=/]+)(${nt}*=${nt}*(?:[^
|
265
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), St = /'/g, Pt = /"/g, Wt = /^(?:script|style|textarea|title)$/i, j = Symbol.for("lit-noChange"), v = Symbol.for("lit-nothing"), Ut = /* @__PURE__ */ new WeakMap(), P = C.createTreeWalker(C, 129, null, !1);
|
266
|
+
function Zt(n, t) {
|
267
267
|
if (!Array.isArray(n) || !n.hasOwnProperty("raw"))
|
268
268
|
throw Error("invalid template strings array");
|
269
|
-
return
|
269
|
+
return Et !== void 0 ? Et.createHTML(t) : t;
|
270
270
|
}
|
271
271
|
const le = (n, t) => {
|
272
272
|
const e = n.length - 1, i = [];
|
273
|
-
let s, o = t === 2 ? "<svg>" : "", r =
|
273
|
+
let s, o = t === 2 ? "<svg>" : "", r = k;
|
274
274
|
for (let d = 0; d < e; d++) {
|
275
275
|
const l = n[d];
|
276
276
|
let a, u, h = -1, c = 0;
|
277
277
|
for (; c < l.length && (r.lastIndex = c, u = r.exec(l), u !== null); )
|
278
|
-
c = r.lastIndex, r ===
|
279
|
-
const p = r ===
|
280
|
-
o += r ===
|
278
|
+
c = r.lastIndex, r === k ? u[1] === "!--" ? r = wt : u[1] !== void 0 ? r = bt : u[2] !== void 0 ? (Wt.test(u[2]) && (s = RegExp("</" + u[2], "g")), r = b) : u[3] !== void 0 && (r = b) : r === b ? u[0] === ">" ? (r = s ?? k, h = -1) : u[1] === void 0 ? h = -2 : (h = r.lastIndex - u[2].length, a = u[1], r = u[3] === void 0 ? b : u[3] === '"' ? Pt : St) : r === Pt || r === St ? r = b : r === wt || r === bt ? r = k : (r = b, s = void 0);
|
279
|
+
const p = r === b && n[d + 1].startsWith("/>") ? " " : "";
|
280
|
+
o += r === k ? l + re : h >= 0 ? (i.push(a), l.slice(0, h) + ut + l.slice(h) + E + p) : l + E + (h === -2 ? (i.push(void 0), d) : p);
|
281
281
|
}
|
282
|
-
return [
|
282
|
+
return [Zt(n, o + (n[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
|
283
283
|
};
|
284
|
-
let pt = class
|
284
|
+
let pt = class Ft {
|
285
285
|
constructor({ strings: t, _$litType$: e }, i) {
|
286
286
|
let s;
|
287
287
|
this.parts = [];
|
288
288
|
let o = 0, r = 0;
|
289
289
|
const d = t.length - 1, l = this.parts, [a, u] = le(t, e);
|
290
|
-
if (this.el =
|
290
|
+
if (this.el = Ft.createElement(a, i), P.currentNode = this.el.content, e === 2) {
|
291
291
|
const h = this.el.content, c = h.firstChild;
|
292
292
|
c.remove(), h.append(...c.childNodes);
|
293
293
|
}
|
@@ -299,15 +299,15 @@ let pt = class Zt {
|
|
299
299
|
if (c.endsWith(ut) || c.startsWith(E)) {
|
300
300
|
const p = u[r++];
|
301
301
|
if (h.push(c), p !== void 0) {
|
302
|
-
const
|
303
|
-
l.push({ type: 1, index: o, name:
|
302
|
+
const y = s.getAttribute(p.toLowerCase() + ut).split(E), m = /([.?@])?(.*)/.exec(p);
|
303
|
+
l.push({ type: 1, index: o, name: m[2], strings: y, ctor: m[1] === "." ? he : m[1] === "?" ? ce : m[1] === "@" ? ue : Q });
|
304
304
|
} else
|
305
305
|
l.push({ type: 6, index: o });
|
306
306
|
}
|
307
307
|
for (const c of h)
|
308
308
|
s.removeAttribute(c);
|
309
309
|
}
|
310
|
-
if (
|
310
|
+
if (Wt.test(s.tagName)) {
|
311
311
|
const h = s.textContent.split(E), c = h.length - 1;
|
312
312
|
if (c > 0) {
|
313
313
|
s.textContent = x ? x.emptyScript : "";
|
@@ -358,7 +358,7 @@ let ae = class {
|
|
358
358
|
for (; a !== void 0; ) {
|
359
359
|
if (d === a.index) {
|
360
360
|
let u;
|
361
|
-
a.type === 2 ? u = new
|
361
|
+
a.type === 2 ? u = new Kt(r, r.nextSibling, this, t) : a.type === 1 ? u = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (u = new pe(r, this, t)), this._$AV.push(u), a = s[++l];
|
362
362
|
}
|
363
363
|
d !== (a == null ? void 0 : a.index) && (r = P.nextNode(), d++);
|
364
364
|
}
|
@@ -369,7 +369,7 @@ let ae = class {
|
|
369
369
|
for (const i of this._$AV)
|
370
370
|
i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
371
371
|
}
|
372
|
-
},
|
372
|
+
}, Kt = class Jt {
|
373
373
|
constructor(t, e, i, s) {
|
374
374
|
var o;
|
375
375
|
this.type = 2, this._$AH = v, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = s, this._$Cp = (o = s == null ? void 0 : s.isConnected) === null || o === void 0 || o;
|
@@ -403,7 +403,7 @@ let ae = class {
|
|
403
403
|
}
|
404
404
|
g(t) {
|
405
405
|
var e;
|
406
|
-
const { values: i, _$litType$: s } = t, o = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = pt.createElement(
|
406
|
+
const { values: i, _$litType$: s } = t, o = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = pt.createElement(Zt(s.h, s.h[0]), this.options)), s);
|
407
407
|
if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === o)
|
408
408
|
this._$AH.v(i);
|
409
409
|
else {
|
@@ -412,11 +412,11 @@ let ae = class {
|
|
412
412
|
}
|
413
413
|
}
|
414
414
|
_$AC(t) {
|
415
|
-
let e =
|
416
|
-
return e === void 0 &&
|
415
|
+
let e = Ut.get(t.strings);
|
416
|
+
return e === void 0 && Ut.set(t.strings, e = new pt(t)), e;
|
417
417
|
}
|
418
418
|
T(t) {
|
419
|
-
|
419
|
+
qt(this._$AH) || (this._$AH = [], this._$AR());
|
420
420
|
const e = this._$AH;
|
421
421
|
let i, s = 0;
|
422
422
|
for (const o of t)
|
@@ -434,7 +434,7 @@ let ae = class {
|
|
434
434
|
var e;
|
435
435
|
this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
|
436
436
|
}
|
437
|
-
},
|
437
|
+
}, Q = class {
|
438
438
|
constructor(t, e, i, s, o) {
|
439
439
|
this.type = 1, this._$AH = v, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = v;
|
440
440
|
}
|
@@ -460,7 +460,7 @@ let ae = class {
|
|
460
460
|
j(t) {
|
461
461
|
t === v ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
462
462
|
}
|
463
|
-
}, he = class extends
|
463
|
+
}, he = class extends Q {
|
464
464
|
constructor() {
|
465
465
|
super(...arguments), this.type = 3;
|
466
466
|
}
|
@@ -469,14 +469,14 @@ let ae = class {
|
|
469
469
|
}
|
470
470
|
};
|
471
471
|
const de = x ? x.emptyScript : "";
|
472
|
-
let ce = class extends
|
472
|
+
let ce = class extends Q {
|
473
473
|
constructor() {
|
474
474
|
super(...arguments), this.type = 4;
|
475
475
|
}
|
476
476
|
j(t) {
|
477
477
|
t && t !== v ? this.element.setAttribute(this.name, de) : this.element.removeAttribute(this.name);
|
478
478
|
}
|
479
|
-
}, ue = class extends
|
479
|
+
}, ue = class extends Q {
|
480
480
|
constructor(t, e, i, s, o) {
|
481
481
|
super(t, e, i, s, o), this.type = 5;
|
482
482
|
}
|
@@ -503,39 +503,39 @@ class pe {
|
|
503
503
|
H(this, t);
|
504
504
|
}
|
505
505
|
}
|
506
|
-
const
|
507
|
-
|
506
|
+
const Ct = J.litHtmlPolyfillSupport;
|
507
|
+
Ct == null || Ct(pt, Kt), ((st = J.litHtmlVersions) !== null && st !== void 0 ? st : J.litHtmlVersions = []).push("2.8.0");
|
508
508
|
/**
|
509
509
|
* @license
|
510
510
|
* Copyright 2017 Google LLC
|
511
511
|
* SPDX-License-Identifier: BSD-3-Clause
|
512
512
|
*/
|
513
513
|
var rt;
|
514
|
-
const X = window, N = X.trustedTypes,
|
515
|
-
\f\r]`, O = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
516
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
514
|
+
const X = window, N = X.trustedTypes, Rt = N ? N.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, vt = "$lit$", w = `lit$${(Math.random() + "").slice(9)}$`, Gt = "?" + w, ve = `<${Gt}>`, R = document, B = () => R.createComment(""), z = (n) => n === null || typeof n != "object" && typeof n != "function", Xt = Array.isArray, _e = (n) => Xt(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", ot = `[
|
515
|
+
\f\r]`, O = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Tt = /-->/g, xt = />/g, S = RegExp(`>|${ot}(?:([^\\s"'>=/]+)(${ot}*=${ot}*(?:[^
|
516
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Ht = /'/g, Nt = /"/g, Yt = /^(?:script|style|textarea|title)$/i, $e = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), me = $e(1), I = Symbol.for("lit-noChange"), _ = Symbol.for("lit-nothing"), It = /* @__PURE__ */ new WeakMap(), U = R.createTreeWalker(R, 129, null, !1), ge = (n, t) => {
|
517
517
|
const e = n.length - 1, i = [];
|
518
518
|
let s, o = t === 2 ? "<svg>" : "", r = O;
|
519
519
|
for (let l = 0; l < e; l++) {
|
520
520
|
const a = n[l];
|
521
521
|
let u, h, c = -1, p = 0;
|
522
522
|
for (; p < a.length && (r.lastIndex = p, h = r.exec(a), h !== null); )
|
523
|
-
p = r.lastIndex, r === O ? h[1] === "!--" ? r =
|
524
|
-
const
|
525
|
-
o += r === O ? a + ve : c >= 0 ? (i.push(u), a.slice(0, c) + vt + a.slice(c) +
|
523
|
+
p = r.lastIndex, r === O ? h[1] === "!--" ? r = Tt : h[1] !== void 0 ? r = xt : h[2] !== void 0 ? (Yt.test(h[2]) && (s = RegExp("</" + h[2], "g")), r = S) : h[3] !== void 0 && (r = S) : r === S ? h[0] === ">" ? (r = s ?? O, c = -1) : h[1] === void 0 ? c = -2 : (c = r.lastIndex - h[2].length, u = h[1], r = h[3] === void 0 ? S : h[3] === '"' ? Nt : Ht) : r === Nt || r === Ht ? r = S : r === Tt || r === xt ? r = O : (r = S, s = void 0);
|
524
|
+
const y = r === S && n[l + 1].startsWith("/>") ? " " : "";
|
525
|
+
o += r === O ? a + ve : c >= 0 ? (i.push(u), a.slice(0, c) + vt + a.slice(c) + w + y) : a + w + (c === -2 ? (i.push(void 0), l) : y);
|
526
526
|
}
|
527
527
|
const d = o + (n[e] || "<?>") + (t === 2 ? "</svg>" : "");
|
528
528
|
if (!Array.isArray(n) || !n.hasOwnProperty("raw"))
|
529
529
|
throw Error("invalid template strings array");
|
530
|
-
return [
|
530
|
+
return [Rt !== void 0 ? Rt.createHTML(d) : d, i];
|
531
531
|
};
|
532
|
-
class
|
532
|
+
class q {
|
533
533
|
constructor({ strings: t, _$litType$: e }, i) {
|
534
534
|
let s;
|
535
535
|
this.parts = [];
|
536
536
|
let o = 0, r = 0;
|
537
537
|
const d = t.length - 1, l = this.parts, [a, u] = ge(t, e);
|
538
|
-
if (this.el =
|
538
|
+
if (this.el = q.createElement(a, i), U.currentNode = this.el.content, e === 2) {
|
539
539
|
const h = this.el.content, c = h.firstChild;
|
540
540
|
c.remove(), h.append(...c.childNodes);
|
541
541
|
}
|
@@ -544,11 +544,11 @@ class W {
|
|
544
544
|
if (s.hasAttributes()) {
|
545
545
|
const h = [];
|
546
546
|
for (const c of s.getAttributeNames())
|
547
|
-
if (c.endsWith(vt) || c.startsWith(
|
547
|
+
if (c.endsWith(vt) || c.startsWith(w)) {
|
548
548
|
const p = u[r++];
|
549
549
|
if (h.push(c), p !== void 0) {
|
550
|
-
const
|
551
|
-
l.push({ type: 1, index: o, name:
|
550
|
+
const y = s.getAttribute(p.toLowerCase() + vt).split(w), m = /([.?@])?(.*)/.exec(p);
|
551
|
+
l.push({ type: 1, index: o, name: m[2], strings: y, ctor: m[1] === "." ? Ae : m[1] === "?" ? Ee : m[1] === "@" ? we : tt });
|
552
552
|
} else
|
553
553
|
l.push({ type: 6, index: o });
|
554
554
|
}
|
@@ -556,7 +556,7 @@ class W {
|
|
556
556
|
s.removeAttribute(c);
|
557
557
|
}
|
558
558
|
if (Yt.test(s.tagName)) {
|
559
|
-
const h = s.textContent.split(
|
559
|
+
const h = s.textContent.split(w), c = h.length - 1;
|
560
560
|
if (c > 0) {
|
561
561
|
s.textContent = N ? N.emptyScript : "";
|
562
562
|
for (let p = 0; p < c; p++)
|
@@ -569,8 +569,8 @@ class W {
|
|
569
569
|
l.push({ type: 2, index: o });
|
570
570
|
else {
|
571
571
|
let h = -1;
|
572
|
-
for (; (h = s.data.indexOf(
|
573
|
-
l.push({ type: 7, index: o }), h +=
|
572
|
+
for (; (h = s.data.indexOf(w, h + 1)) !== -1; )
|
573
|
+
l.push({ type: 7, index: o }), h += w.length - 1;
|
574
574
|
}
|
575
575
|
o++;
|
576
576
|
}
|
@@ -580,13 +580,13 @@ class W {
|
|
580
580
|
return i.innerHTML = t, i;
|
581
581
|
}
|
582
582
|
}
|
583
|
-
function
|
583
|
+
function V(n, t, e = n, i) {
|
584
584
|
var s, o, r, d;
|
585
585
|
if (t === I)
|
586
586
|
return t;
|
587
587
|
let l = i !== void 0 ? (s = e._$Co) === null || s === void 0 ? void 0 : s[i] : e._$Cl;
|
588
588
|
const a = z(t) ? void 0 : t._$litDirective$;
|
589
|
-
return (l == null ? void 0 : l.constructor) !== a && ((o = l == null ? void 0 : l._$AO) === null || o === void 0 || o.call(l, !1), a === void 0 ? l = void 0 : (l = new a(n), l._$AT(n, e, i)), i !== void 0 ? ((r = (d = e)._$Co) !== null && r !== void 0 ? r : d._$Co = [])[i] = l : e._$Cl = l), l !== void 0 && (t =
|
589
|
+
return (l == null ? void 0 : l.constructor) !== a && ((o = l == null ? void 0 : l._$AO) === null || o === void 0 || o.call(l, !1), a === void 0 ? l = void 0 : (l = new a(n), l._$AT(n, e, i)), i !== void 0 ? ((r = (d = e)._$Co) !== null && r !== void 0 ? r : d._$Co = [])[i] = l : e._$Cl = l), l !== void 0 && (t = V(n, l._$AS(n, t.values), l, i)), t;
|
590
590
|
}
|
591
591
|
class fe {
|
592
592
|
constructor(t, e) {
|
@@ -606,7 +606,7 @@ class fe {
|
|
606
606
|
for (; a !== void 0; ) {
|
607
607
|
if (d === a.index) {
|
608
608
|
let u;
|
609
|
-
a.type === 2 ? u = new
|
609
|
+
a.type === 2 ? u = new W(r, r.nextSibling, this, t) : a.type === 1 ? u = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (u = new be(r, this, t)), this._$AV.push(u), a = s[++l];
|
610
610
|
}
|
611
611
|
d !== (a == null ? void 0 : a.index) && (r = U.nextNode(), d++);
|
612
612
|
}
|
@@ -618,7 +618,7 @@ class fe {
|
|
618
618
|
i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
619
619
|
}
|
620
620
|
}
|
621
|
-
class
|
621
|
+
class W {
|
622
622
|
constructor(t, e, i, s) {
|
623
623
|
var o;
|
624
624
|
this.type = 2, this._$AH = _, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = s, this._$Cp = (o = s == null ? void 0 : s.isConnected) === null || o === void 0 || o;
|
@@ -639,7 +639,7 @@ class q {
|
|
639
639
|
return this._$AB;
|
640
640
|
}
|
641
641
|
_$AI(t, e = this) {
|
642
|
-
t =
|
642
|
+
t = V(this, t, e), z(t) ? t === _ || t == null || t === "" ? (this._$AH !== _ && this._$AR(), this._$AH = _) : t !== this._$AH && t !== I && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : _e(t) ? this.T(t) : this._(t);
|
643
643
|
}
|
644
644
|
k(t) {
|
645
645
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
@@ -652,7 +652,7 @@ class q {
|
|
652
652
|
}
|
653
653
|
g(t) {
|
654
654
|
var e;
|
655
|
-
const { values: i, _$litType$: s } = t, o = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el =
|
655
|
+
const { values: i, _$litType$: s } = t, o = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = q.createElement(s.h, this.options)), s);
|
656
656
|
if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === o)
|
657
657
|
this._$AH.v(i);
|
658
658
|
else {
|
@@ -661,15 +661,15 @@ class q {
|
|
661
661
|
}
|
662
662
|
}
|
663
663
|
_$AC(t) {
|
664
|
-
let e =
|
665
|
-
return e === void 0 &&
|
664
|
+
let e = It.get(t.strings);
|
665
|
+
return e === void 0 && It.set(t.strings, e = new q(t)), e;
|
666
666
|
}
|
667
667
|
T(t) {
|
668
668
|
Xt(this._$AH) || (this._$AH = [], this._$AR());
|
669
669
|
const e = this._$AH;
|
670
670
|
let i, s = 0;
|
671
671
|
for (const o of t)
|
672
|
-
s === e.length ? e.push(i = new
|
672
|
+
s === e.length ? e.push(i = new W(this.k(B()), this.k(B()), this, this.options)) : i = e[s], i._$AI(o), s++;
|
673
673
|
s < e.length && (this._$AR(i && i._$AB.nextSibling, s), e.length = s);
|
674
674
|
}
|
675
675
|
_$AR(t = this._$AA.nextSibling, e) {
|
@@ -684,7 +684,7 @@ class q {
|
|
684
684
|
this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
|
685
685
|
}
|
686
686
|
}
|
687
|
-
class
|
687
|
+
class tt {
|
688
688
|
constructor(t, e, i, s, o) {
|
689
689
|
this.type = 1, this._$AH = _, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = _;
|
690
690
|
}
|
@@ -698,12 +698,12 @@ class Q {
|
|
698
698
|
const o = this.strings;
|
699
699
|
let r = !1;
|
700
700
|
if (o === void 0)
|
701
|
-
t =
|
701
|
+
t = V(this, t, e, 0), r = !z(t) || t !== this._$AH && t !== I, r && (this._$AH = t);
|
702
702
|
else {
|
703
703
|
const d = t;
|
704
704
|
let l, a;
|
705
705
|
for (t = o[0], l = 0; l < o.length - 1; l++)
|
706
|
-
a =
|
706
|
+
a = V(this, d[i + l], e, l), a === I && (a = this._$AH[l]), r || (r = !z(a) || a !== this._$AH[l]), a === _ ? t = _ : t !== _ && (t += (a ?? "") + o[l + 1]), this._$AH[l] = a;
|
707
707
|
}
|
708
708
|
r && !s && this.j(t);
|
709
709
|
}
|
@@ -711,7 +711,7 @@ class Q {
|
|
711
711
|
t === _ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
712
712
|
}
|
713
713
|
}
|
714
|
-
class
|
714
|
+
class Ae extends tt {
|
715
715
|
constructor() {
|
716
716
|
super(...arguments), this.type = 3;
|
717
717
|
}
|
@@ -719,22 +719,22 @@ class ye extends Q {
|
|
719
719
|
this.element[this.name] = t === _ ? void 0 : t;
|
720
720
|
}
|
721
721
|
}
|
722
|
-
const
|
723
|
-
class Ee extends
|
722
|
+
const ye = N ? N.emptyScript : "";
|
723
|
+
class Ee extends tt {
|
724
724
|
constructor() {
|
725
725
|
super(...arguments), this.type = 4;
|
726
726
|
}
|
727
727
|
j(t) {
|
728
|
-
t && t !== _ ? this.element.setAttribute(this.name,
|
728
|
+
t && t !== _ ? this.element.setAttribute(this.name, ye) : this.element.removeAttribute(this.name);
|
729
729
|
}
|
730
730
|
}
|
731
|
-
class
|
731
|
+
class we extends tt {
|
732
732
|
constructor(t, e, i, s, o) {
|
733
733
|
super(t, e, i, s, o), this.type = 5;
|
734
734
|
}
|
735
735
|
_$AI(t, e = this) {
|
736
736
|
var i;
|
737
|
-
if ((t = (i =
|
737
|
+
if ((t = (i = V(this, t, e, 0)) !== null && i !== void 0 ? i : _) === I)
|
738
738
|
return;
|
739
739
|
const s = this._$AH, o = t === _ && s !== _ || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, r = t !== _ && (s === _ || o);
|
740
740
|
o && this.element.removeEventListener(this.name, this, s), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
@@ -744,7 +744,7 @@ class be extends Q {
|
|
744
744
|
typeof this._$AH == "function" ? this._$AH.call((i = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && i !== void 0 ? i : this.element, t) : this._$AH.handleEvent(t);
|
745
745
|
}
|
746
746
|
}
|
747
|
-
class
|
747
|
+
class be {
|
748
748
|
constructor(t, e, i) {
|
749
749
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
750
750
|
}
|
@@ -752,18 +752,18 @@ class we {
|
|
752
752
|
return this._$AM._$AU;
|
753
753
|
}
|
754
754
|
_$AI(t) {
|
755
|
-
|
755
|
+
V(this, t);
|
756
756
|
}
|
757
757
|
}
|
758
758
|
const Vt = X.litHtmlPolyfillSupport;
|
759
|
-
Vt == null || Vt(
|
759
|
+
Vt == null || Vt(q, W), ((rt = X.litHtmlVersions) !== null && rt !== void 0 ? rt : X.litHtmlVersions = []).push("2.7.4");
|
760
760
|
const Se = (n, t, e) => {
|
761
761
|
var i, s;
|
762
762
|
const o = (i = e == null ? void 0 : e.renderBefore) !== null && i !== void 0 ? i : t;
|
763
763
|
let r = o._$litPart$;
|
764
764
|
if (r === void 0) {
|
765
765
|
const d = (s = e == null ? void 0 : e.renderBefore) !== null && s !== void 0 ? s : null;
|
766
|
-
o._$litPart$ = r = new
|
766
|
+
o._$litPart$ = r = new W(t.insertBefore(B(), d), d, void 0, e ?? {});
|
767
767
|
}
|
768
768
|
return r._$AI(n), r;
|
769
769
|
};
|
@@ -799,8 +799,8 @@ class L extends T {
|
|
799
799
|
}
|
800
800
|
}
|
801
801
|
L.finalized = !0, L._$litElement$ = !0, (lt = globalThis.litElementHydrateSupport) === null || lt === void 0 || lt.call(globalThis, { LitElement: L });
|
802
|
-
const
|
803
|
-
|
802
|
+
const kt = globalThis.litElementPolyfillSupport;
|
803
|
+
kt == null || kt({ LitElement: L });
|
804
804
|
((at = globalThis.litElementVersions) !== null && at !== void 0 ? at : globalThis.litElementVersions = []).push("3.3.2");
|
805
805
|
function Pe(n, t, e) {
|
806
806
|
function i(s) {
|
@@ -830,8 +830,8 @@ class Ue {
|
|
830
830
|
}), this._cleanup = [];
|
831
831
|
}
|
832
832
|
}
|
833
|
-
const ht = "https://vouchfor.com", Ce = "https://d2rxhdlm2q91uk.cloudfront.net", Re = "https://d1ix11aj5kfygl.cloudfront.net", Te = "https://d157jlwnudd93d.cloudfront.net", xe = "https://bshyfw4h5a.execute-api.ap-southeast-2.amazonaws.com/dev", He = "https://gyzw7rpbq3.execute-api.ap-southeast-2.amazonaws.com/staging", Ne = "https://vfcjuim1l3.execute-api.ap-southeast-2.amazonaws.com/prod", Ie = "
|
834
|
-
function
|
833
|
+
const ht = "https://vouchfor.com", Ce = "https://d2rxhdlm2q91uk.cloudfront.net", Re = "https://d1ix11aj5kfygl.cloudfront.net", Te = "https://d157jlwnudd93d.cloudfront.net", xe = "https://bshyfw4h5a.execute-api.ap-southeast-2.amazonaws.com/dev", He = "https://gyzw7rpbq3.execute-api.ap-southeast-2.amazonaws.com/staging", Ne = "https://vfcjuim1l3.execute-api.ap-southeast-2.amazonaws.com/prod", Ie = "https://embed-dev.vouchfor.com/v2", Ve = "https://embed-staging.vouchfor.com/v2", ke = "https://embed.vouchfor.com/v2", Oe = "https://dev.vouchfor.com", Me = "https://staging.vouchfor.com", Le = "https://app.vouchfor.com";
|
834
|
+
function Y(n) {
|
835
835
|
if (!["dev", "staging", "prod"].includes(n))
|
836
836
|
throw new Error(`Unknown environment: ${n}`);
|
837
837
|
if (n === "dev")
|
@@ -847,7 +847,7 @@ function _t(n) {
|
|
847
847
|
marketingUrl: ht,
|
848
848
|
videoUrl: Re,
|
849
849
|
publicApiUrl: He,
|
850
|
-
embedApiUrl:
|
850
|
+
embedApiUrl: Ve,
|
851
851
|
publicRecorderUrl: Me
|
852
852
|
};
|
853
853
|
if (n === "prod")
|
@@ -855,39 +855,61 @@ function _t(n) {
|
|
855
855
|
marketingUrl: ht,
|
856
856
|
videoUrl: Te,
|
857
857
|
publicApiUrl: Ne,
|
858
|
-
embedApiUrl:
|
858
|
+
embedApiUrl: ke,
|
859
859
|
publicRecorderUrl: Le
|
860
860
|
};
|
861
861
|
}
|
862
862
|
class De {
|
863
863
|
constructor(t) {
|
864
|
-
this.
|
864
|
+
this._fetching = !1, this.getVouch = (e, i, s) => {
|
865
|
+
const { embedApiUrl: o } = Y(e);
|
866
|
+
return fetch(`${o}/vouches/${s}`, {
|
867
|
+
method: "GET",
|
868
|
+
headers: [["X-Api-Key", i]]
|
869
|
+
}).then((r) => (this.host.dispatchEvent(new CustomEvent("vouch:loaded", { detail: s })), r.json()));
|
870
|
+
}, this.host = t, new te(
|
865
871
|
this.host,
|
866
|
-
async ([e, i, s]) => {
|
867
|
-
var
|
872
|
+
async ([e, i, s, o, r]) => {
|
873
|
+
var d, l, a, u;
|
868
874
|
try {
|
869
|
-
if (s) {
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
875
|
+
if (t.vouch = void 0, t.template = void 0, s) {
|
876
|
+
let h;
|
877
|
+
r && (this.fetching = !0, h = await this.getTemplate(e, i, r)), t.vouch = s, t.template = h ?? ((l = (d = s == null ? void 0 : s.settings) == null ? void 0 : d.template) == null ? void 0 : l.instance);
|
878
|
+
} else if (o) {
|
879
|
+
this.fetching = !0;
|
880
|
+
const [h, c] = await Promise.all([
|
881
|
+
this.getVouch(e, i, o),
|
882
|
+
r ? this.getTemplate(e, i, r) : null
|
883
|
+
]);
|
884
|
+
t.vouch = h, t.template = c ?? ((u = (a = h == null ? void 0 : h.settings) == null ? void 0 : a.template) == null ? void 0 : u.instance);
|
876
885
|
}
|
877
886
|
} finally {
|
878
|
-
|
887
|
+
this.fetching = !1;
|
879
888
|
}
|
880
889
|
},
|
881
|
-
() => [t.env, t.apiKey, t.
|
890
|
+
() => [t.env, t.apiKey, t.data, t.vouchId, t.templateId]
|
882
891
|
);
|
883
892
|
}
|
893
|
+
set fetching(t) {
|
894
|
+
this._fetching !== t && (this._fetching = t, this.host.requestUpdate());
|
895
|
+
}
|
896
|
+
get fetching() {
|
897
|
+
return this._fetching;
|
898
|
+
}
|
899
|
+
async getTemplate(t, e, i) {
|
900
|
+
const { embedApiUrl: s } = Y(t);
|
901
|
+
return fetch(`${s}/templates/${i}`, {
|
902
|
+
method: "GET",
|
903
|
+
headers: [["X-Api-Key", e]]
|
904
|
+
}).then((o) => o.json());
|
905
|
+
}
|
884
906
|
}
|
885
|
-
let
|
907
|
+
let Z;
|
886
908
|
const je = new Uint8Array(16);
|
887
909
|
function Be() {
|
888
|
-
if (!
|
910
|
+
if (!Z && (Z = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Z))
|
889
911
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
890
|
-
return
|
912
|
+
return Z(je);
|
891
913
|
}
|
892
914
|
const $ = [];
|
893
915
|
for (let n = 0; n < 256; ++n)
|
@@ -895,12 +917,12 @@ for (let n = 0; n < 256; ++n)
|
|
895
917
|
function ze(n, t = 0) {
|
896
918
|
return $[n[t + 0]] + $[n[t + 1]] + $[n[t + 2]] + $[n[t + 3]] + "-" + $[n[t + 4]] + $[n[t + 5]] + "-" + $[n[t + 6]] + $[n[t + 7]] + "-" + $[n[t + 8]] + $[n[t + 9]] + "-" + $[n[t + 10]] + $[n[t + 11]] + $[n[t + 12]] + $[n[t + 13]] + $[n[t + 14]] + $[n[t + 15]];
|
897
919
|
}
|
898
|
-
const
|
899
|
-
randomUUID:
|
920
|
+
const qe = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ot = {
|
921
|
+
randomUUID: qe
|
900
922
|
};
|
901
923
|
function M(n, t, e) {
|
902
|
-
if (
|
903
|
-
return
|
924
|
+
if (Ot.randomUUID && !t && !n)
|
925
|
+
return Ot.randomUUID();
|
904
926
|
n = n || {};
|
905
927
|
const i = n.random || (n.rng || Be)();
|
906
928
|
if (i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, t) {
|
@@ -911,12 +933,12 @@ function M(n, t, e) {
|
|
911
933
|
}
|
912
934
|
return ze(i);
|
913
935
|
}
|
914
|
-
const
|
915
|
-
class
|
936
|
+
const We = 2e3;
|
937
|
+
class Ze {
|
916
938
|
constructor(t) {
|
917
939
|
this._tabId = void 0, this._clientId = void 0, this._visitorId = void 0, this._hasPlayed = !1, this._hasLoaded = {}, this._answersViewed = {}, this._streamedTime = {}, this._streamedPrevTimestamp = {}, this._createVisitor = (e) => {
|
918
940
|
var s, o;
|
919
|
-
const { publicApiUrl: i } =
|
941
|
+
const { publicApiUrl: i } = Y(this.host.env);
|
920
942
|
return (o = (s = window.localStorage) == null ? void 0 : s.setItem) == null || o.call(s, "vouch-uid-visitor", e), navigator.sendBeacon(`${i}/api/visitor`, JSON.stringify({ visitorId: e })), e;
|
921
943
|
}, this._getReportingMetadata = () => {
|
922
944
|
var o, r;
|
@@ -927,7 +949,6 @@ class Ke {
|
|
927
949
|
s[a] = l;
|
928
950
|
}
|
929
951
|
}), {
|
930
|
-
// Source might be embeds, could be playlink etc.
|
931
952
|
source: this.host.trackingSource,
|
932
953
|
time: /* @__PURE__ */ new Date(),
|
933
954
|
region: i,
|
@@ -939,8 +960,8 @@ class Ke {
|
|
939
960
|
...s
|
940
961
|
};
|
941
962
|
}, this._sendTrackingEvent = (e, i) => {
|
942
|
-
const { publicApiUrl: s } =
|
943
|
-
|
963
|
+
const { publicApiUrl: s } = Y(this.host.env), { client: o, tab: r, request: d, visitor: l } = this._getUids();
|
964
|
+
navigator.sendBeacon(
|
944
965
|
`${s}/api/events`,
|
945
966
|
JSON.stringify({
|
946
967
|
event: e,
|
@@ -978,7 +999,7 @@ class Ke {
|
|
978
999
|
const o = Date.now();
|
979
1000
|
!this.host.paused && // Only fire the video seeked event when this video is the active one
|
980
1001
|
e === ((d = (r = this.host.scene) == null ? void 0 : r.video) == null ? void 0 : d.id) && // Throttle the frequency that we send streamed events while playing
|
981
|
-
o - this._streamedPrevTimestamp[e] >
|
1002
|
+
o - this._streamedPrevTimestamp[e] > We && (this._sendTrackingEvent("VIDEO_STREAMED", {
|
982
1003
|
vouchId: s,
|
983
1004
|
answerId: e,
|
984
1005
|
streamStart: this._streamedTime[e],
|
@@ -999,7 +1020,7 @@ class Ke {
|
|
999
1020
|
return "uuid" in this.host.data ? this.host.data.uuid : this.host.data.id;
|
1000
1021
|
}
|
1001
1022
|
_getUids() {
|
1002
|
-
var o, r, d, l, a, u, h, c, p,
|
1023
|
+
var o, r, d, l, a, u, h, c, p, y, m, $t;
|
1003
1024
|
if (typeof window > "u")
|
1004
1025
|
return {
|
1005
1026
|
client: null,
|
@@ -1007,7 +1028,7 @@ class Ke {
|
|
1007
1028
|
request: M()
|
1008
1029
|
};
|
1009
1030
|
const t = this._visitorId || ((r = (o = window.localStorage) == null ? void 0 : o.getItem) == null ? void 0 : r.call(o, "vouch-uid-visitor")) || this._createVisitor(M()), e = this._clientId || ((l = (d = window.localStorage) == null ? void 0 : d.getItem) == null ? void 0 : l.call(d, "vouch-uid-client")) || M(), i = this._tabId || ((u = (a = window.sessionStorage) == null ? void 0 : a.getItem) == null ? void 0 : u.call(a, "vouch-uid-tab")) || M(), s = M();
|
1010
|
-
return t !== this._visitorId && (this._visitorId = t, (c = (h = window.localStorage) == null ? void 0 : h.setItem) == null || c.call(h, "vouch-uid-visitor", t)), e !== this._clientId && (this._clientId = e, (
|
1031
|
+
return t !== this._visitorId && (this._visitorId = t, (c = (h = window.localStorage) == null ? void 0 : h.setItem) == null || c.call(h, "vouch-uid-visitor", t)), e !== this._clientId && (this._clientId = e, (y = (p = window.localStorage) == null ? void 0 : p.setItem) == null || y.call(p, "vouch-uid-client", e)), i !== this._tabId && (this._tabId = i, ($t = (m = window.sessionStorage) == null ? void 0 : m.setItem) == null || $t.call(m, "vouch-uid-tab", i)), {
|
1011
1032
|
client: e,
|
1012
1033
|
tab: i,
|
1013
1034
|
request: s,
|
@@ -1015,24 +1036,24 @@ class Ke {
|
|
1015
1036
|
};
|
1016
1037
|
}
|
1017
1038
|
hostConnected() {
|
1018
|
-
|
1039
|
+
requestAnimationFrame(() => {
|
1019
1040
|
var t, e, i, s;
|
1020
1041
|
this.host.addEventListener("vouch:loaded", this._handleVouchLoaded), (t = this.host.mediaPlayer) == null || t.addEventListener("play", this._handlePlay), (e = this.host.mediaPlayer) == null || e.addEventListener("video:play", this._handleVideoPlay), (i = this.host.mediaPlayer) == null || i.addEventListener("video:pause", this._handleVideoPause), (s = this.host.mediaPlayer) == null || s.addEventListener("video:timeupdate", this._handleVideoTimeUpdate);
|
1021
1042
|
});
|
1022
1043
|
}
|
1023
1044
|
hostDisconnected() {
|
1024
1045
|
var t, e, i, s;
|
1025
|
-
this.host.
|
1046
|
+
this.host.removeEventListener("vouch:loaded", this._handleVouchLoaded), (t = this.host.mediaPlayer) == null || t.removeEventListener("play", this._handlePlay), (e = this.host.mediaPlayer) == null || e.removeEventListener("video:play", this._handleVideoPlay), (i = this.host.mediaPlayer) == null || i.removeEventListener("video:pause", this._handleVideoPause), (s = this.host.mediaPlayer) == null || s.removeEventListener("video:timeupdate", this._handleVideoTimeUpdate);
|
1026
1047
|
}
|
1027
1048
|
}
|
1028
|
-
var
|
1029
|
-
for (var s = i > 1 ? void 0 : i ?
|
1049
|
+
var Fe = Object.defineProperty, Ke = Object.getOwnPropertyDescriptor, f = (n, t, e, i) => {
|
1050
|
+
for (var s = i > 1 ? void 0 : i ? Ke(t, e) : t, o = n.length - 1, r; o >= 0; o--)
|
1030
1051
|
(r = n[o]) && (s = (i ? r(t, e, s) : r(s)) || s);
|
1031
|
-
return i && s &&
|
1052
|
+
return i && s && Fe(t, e, s), s;
|
1032
1053
|
};
|
1033
|
-
let
|
1054
|
+
let g = class extends L {
|
1034
1055
|
constructor() {
|
1035
|
-
super(...arguments), this._mediaPlayerRef = Lt(), this.env = "prod", this.apiKey = "", this.
|
1056
|
+
super(...arguments), this._mediaPlayerRef = Lt(), this.env = "prod", this.apiKey = "", this.trackingSource = "embed", this.preload = "auto", this.autoplay = !1, this.aspectRatio = 0, this.eventController = new Ue(this, [
|
1036
1057
|
"durationchange",
|
1037
1058
|
"ended",
|
1038
1059
|
"error",
|
@@ -1057,7 +1078,10 @@ let m = class extends L {
|
|
1057
1078
|
"video:timeupdate",
|
1058
1079
|
"video:ended",
|
1059
1080
|
"video:error"
|
1060
|
-
]), this.
|
1081
|
+
]), this._fetcherController = new De(this), this._trackingController = new Ze(this);
|
1082
|
+
}
|
1083
|
+
get fetching() {
|
1084
|
+
return this._fetcherController.fetching;
|
1061
1085
|
}
|
1062
1086
|
get waiting() {
|
1063
1087
|
var n;
|
@@ -1140,67 +1164,60 @@ let m = class extends L {
|
|
1140
1164
|
}
|
1141
1165
|
render() {
|
1142
1166
|
return me`
|
1143
|
-
<vmp-media-player
|
1167
|
+
<vmp-new-media-player
|
1144
1168
|
${Dt(this._mediaPlayerRef)}
|
1145
1169
|
${this.eventController.register()}
|
1146
1170
|
?autoplay=${this.autoplay}
|
1147
1171
|
?loading=${this.fetching}
|
1148
|
-
.data=${this.
|
1149
|
-
.
|
1150
|
-
|
1151
|
-
|
1152
|
-
preload=${tt(this.preload)}
|
1172
|
+
.data=${this.vouch}
|
1173
|
+
.template=${this.template}
|
1174
|
+
aspectRatio=${mt(this.aspectRatio)}
|
1175
|
+
preload=${mt(this.preload)}
|
1153
1176
|
.controls=${this.controls}
|
1154
|
-
></vmp-media-player>
|
1177
|
+
></vmp-new-media-player>
|
1155
1178
|
`;
|
1156
1179
|
}
|
1157
1180
|
};
|
1158
|
-
|
1159
|
-
|
1160
|
-
],
|
1161
|
-
|
1162
|
-
|
1163
|
-
],
|
1164
|
-
|
1165
|
-
|
1166
|
-
],
|
1167
|
-
|
1168
|
-
|
1169
|
-
],
|
1170
|
-
|
1171
|
-
|
1172
|
-
],
|
1173
|
-
|
1174
|
-
|
1175
|
-
],
|
1176
|
-
|
1177
|
-
|
1178
|
-
],
|
1179
|
-
|
1180
|
-
|
1181
|
-
],
|
1182
|
-
|
1183
|
-
|
1184
|
-
],
|
1185
|
-
|
1186
|
-
|
1187
|
-
],
|
1188
|
-
|
1189
|
-
|
1190
|
-
],
|
1191
|
-
|
1192
|
-
|
1193
|
-
],
|
1194
|
-
g([
|
1195
|
-
$t()
|
1196
|
-
], m.prototype, "instance", 2);
|
1197
|
-
g([
|
1198
|
-
$t()
|
1199
|
-
], m.prototype, "fetching", 2);
|
1200
|
-
m = g([
|
1181
|
+
f([
|
1182
|
+
A({ type: Object, attribute: "data" })
|
1183
|
+
], g.prototype, "data", 2);
|
1184
|
+
f([
|
1185
|
+
A({ type: String })
|
1186
|
+
], g.prototype, "vouchId", 2);
|
1187
|
+
f([
|
1188
|
+
A({ type: String })
|
1189
|
+
], g.prototype, "templateId", 2);
|
1190
|
+
f([
|
1191
|
+
A({ type: String })
|
1192
|
+
], g.prototype, "env", 2);
|
1193
|
+
f([
|
1194
|
+
A({ type: String })
|
1195
|
+
], g.prototype, "apiKey", 2);
|
1196
|
+
f([
|
1197
|
+
A({ type: String })
|
1198
|
+
], g.prototype, "trackingSource", 2);
|
1199
|
+
f([
|
1200
|
+
A({ type: Array })
|
1201
|
+
], g.prototype, "controls", 2);
|
1202
|
+
f([
|
1203
|
+
A({ type: String })
|
1204
|
+
], g.prototype, "preload", 2);
|
1205
|
+
f([
|
1206
|
+
A({ type: Boolean })
|
1207
|
+
], g.prototype, "autoplay", 2);
|
1208
|
+
f([
|
1209
|
+
A({ type: Number })
|
1210
|
+
], g.prototype, "aspectRatio", 2);
|
1211
|
+
f([
|
1212
|
+
Mt()
|
1213
|
+
], g.prototype, "vouch", 2);
|
1214
|
+
f([
|
1215
|
+
Mt()
|
1216
|
+
], g.prototype, "template", 2);
|
1217
|
+
g = f([
|
1201
1218
|
Qt("vouch-embed")
|
1202
|
-
],
|
1219
|
+
], g);
|
1203
1220
|
export {
|
1204
|
-
|
1221
|
+
g as Embed
|
1205
1222
|
};
|
1206
1223
|
//# sourceMappingURL=embeds.js.map
|