@vouchfor/embeds 0.0.0-experiment.bdda3d0 → 0.0.0-experiment.d900f80

Sign up to get free protection for your applications and to get access to all the features.
package/dist/es/embeds.js CHANGED
@@ -1,17 +1,17 @@
1
- import { property as y, customElement as Yt } from "lit/decorators.js";
1
+ import { property as y, state as Lt, customElement as Qt } from "lit/decorators.js";
2
2
  import { ifDefined as mt } from "lit/directives/if-defined.js";
3
- import { createRef as Lt, ref as kt } from "lit/directives/ref.js";
4
- import { Task as Qt } from "@lit/task";
3
+ import { createRef as kt, ref as Dt } from "lit/directives/ref.js";
4
+ import { Task as te } from "@lit/task";
5
5
  import "@vouchfor/media-player";
6
6
  /**
7
7
  * @license
8
8
  * Copyright 2019 Google LLC
9
9
  * SPDX-License-Identifier: BSD-3-Clause
10
10
  */
11
- const F = window, _t = F.ShadowRoot && (F.ShadyCSS === void 0 || F.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Dt = Symbol(), gt = /* @__PURE__ */ new WeakMap();
12
- let te = class {
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
+ let ee = class {
13
13
  constructor(t, e, i) {
14
- if (this._$cssResult$ = !0, i !== Dt)
14
+ if (this._$cssResult$ = !0, i !== jt)
15
15
  throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
16
16
  this.cssText = t, this.t = e;
17
17
  }
@@ -28,7 +28,7 @@ let te = class {
28
28
  return this.cssText;
29
29
  }
30
30
  };
31
- const ee = (n) => new te(typeof n == "string" ? n : n + "", void 0, Dt), ie = (n, t) => {
31
+ const ie = (n) => new ee(typeof n == "string" ? n : n + "", void 0, jt), se = (n, t) => {
32
32
  _t ? n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
33
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);
@@ -37,7 +37,7 @@ const ee = (n) => new te(typeof n == "string" ? n : n + "", void 0, Dt), ie = (n
37
37
  let e = "";
38
38
  for (const i of t.cssRules)
39
39
  e += i.cssText;
40
- return ee(e);
40
+ return ie(e);
41
41
  })(n) : n;
42
42
  /**
43
43
  * @license
@@ -45,10 +45,10 @@ const ee = (n) => new te(typeof n == "string" ? n : n + "", void 0, Dt), ie = (n
45
45
  * SPDX-License-Identifier: BSD-3-Clause
46
46
  */
47
47
  var et;
48
- const K = window, At = K.trustedTypes, se = At ? At.emptyScript : "", yt = K.reactiveElementPolyfillSupport, dt = { toAttribute(n, t) {
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
- n = n ? se : null;
51
+ n = n ? ne : null;
52
52
  break;
53
53
  case Object:
54
54
  case Array:
@@ -73,7 +73,7 @@ const K = window, At = K.trustedTypes, se = At ? At.emptyScript : "", yt = K.rea
73
73
  }
74
74
  }
75
75
  return e;
76
- } }, jt = (n, t) => t !== n && (t == t || n == n), it = { attribute: !0, type: String, converter: dt, reflect: !1, hasChanged: jt }, ct = "finalized";
76
+ } }, Bt = (n, t) => t !== n && (t == t || n == n), it = { attribute: !0, type: String, converter: dt, reflect: !1, hasChanged: Bt }, ct = "finalized";
77
77
  let T = class extends HTMLElement {
78
78
  constructor() {
79
79
  super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
@@ -153,7 +153,7 @@ let T = class extends HTMLElement {
153
153
  createRenderRoot() {
154
154
  var t;
155
155
  const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
156
- return ie(e, this.constructor.elementStyles), e;
156
+ return se(e, this.constructor.elementStyles), e;
157
157
  }
158
158
  connectedCallback() {
159
159
  var t;
@@ -192,7 +192,7 @@ let T = class extends HTMLElement {
192
192
  }
193
193
  requestUpdate(t, e, i) {
194
194
  let s = !0;
195
- t !== void 0 && (((i = i || this.constructor.getPropertyOptions(t)).hasChanged || jt)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, i))) : s = !1), !this.isUpdatePending && s && (this._$E_ = this._$Ej());
195
+ t !== void 0 && (((i = i || this.constructor.getPropertyOptions(t)).hasChanged || Bt)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, i))) : s = !1), !this.isUpdatePending && s && (this._$E_ = this._$Ej());
196
196
  }
197
197
  async _$Ej() {
198
198
  this.isUpdatePending = !0;
@@ -260,69 +260,69 @@ T[ct] = !0, T.elementProperties = /* @__PURE__ */ new Map(), T.elementStyles = [
260
260
  * SPDX-License-Identifier: BSD-3-Clause
261
261
  */
262
262
  var st;
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)}$`, Bt = "?" + E, ne = `<${Bt}>`, C = document, G = () => C.createComment(""), D = (n) => n === null || typeof n != "object" && typeof n != "function", zt = Array.isArray, re = (n) => zt(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", nt = `[
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
264
  \f\r]`, O = /<(?:(!--|\/[^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, qt = /^(?: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 Wt(n, t) {
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
269
  return Et !== void 0 ? Et.createHTML(t) : t;
270
270
  }
271
- const oe = (n, t) => {
271
+ const le = (n, t) => {
272
272
  const e = n.length - 1, i = [];
273
273
  let s, r = t === 2 ? "<svg>" : "", o = O;
274
274
  for (let d = 0; d < e; d++) {
275
275
  const l = n[d];
276
- let h, u, a = -1, c = 0;
276
+ let a, u, h = -1, c = 0;
277
277
  for (; c < l.length && (o.lastIndex = c, u = o.exec(l), u !== null); )
278
- c = o.lastIndex, o === O ? u[1] === "!--" ? o = wt : u[1] !== void 0 ? o = bt : u[2] !== void 0 ? (qt.test(u[2]) && (s = RegExp("</" + u[2], "g")), o = b) : u[3] !== void 0 && (o = b) : o === b ? u[0] === ">" ? (o = s ?? O, a = -1) : u[1] === void 0 ? a = -2 : (a = o.lastIndex - u[2].length, h = u[1], o = u[3] === void 0 ? b : u[3] === '"' ? Pt : St) : o === Pt || o === St ? o = b : o === wt || o === bt ? o = O : (o = b, s = void 0);
278
+ c = o.lastIndex, o === O ? u[1] === "!--" ? o = wt : u[1] !== void 0 ? o = bt : u[2] !== void 0 ? (Wt.test(u[2]) && (s = RegExp("</" + u[2], "g")), o = b) : u[3] !== void 0 && (o = b) : o === b ? u[0] === ">" ? (o = s ?? O, h = -1) : u[1] === void 0 ? h = -2 : (h = o.lastIndex - u[2].length, a = u[1], o = u[3] === void 0 ? b : u[3] === '"' ? Pt : St) : o === Pt || o === St ? o = b : o === wt || o === bt ? o = O : (o = b, s = void 0);
279
279
  const p = o === b && n[d + 1].startsWith("/>") ? " " : "";
280
- r += o === O ? l + ne : a >= 0 ? (i.push(h), l.slice(0, a) + ut + l.slice(a) + E + p) : l + E + (a === -2 ? (i.push(void 0), d) : p);
280
+ r += o === O ? 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 [Wt(n, r + (n[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
282
+ return [Zt(n, r + (n[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
283
283
  };
284
- let pt = class Zt {
284
+ let pt = class Ft {
285
285
  constructor({ strings: t, _$litType$: e }, i) {
286
286
  let s;
287
287
  this.parts = [];
288
288
  let r = 0, o = 0;
289
- const d = t.length - 1, l = this.parts, [h, u] = oe(t, e);
290
- if (this.el = Zt.createElement(h, i), P.currentNode = this.el.content, e === 2) {
291
- const a = this.el.content, c = a.firstChild;
292
- c.remove(), a.append(...c.childNodes);
289
+ const d = t.length - 1, l = this.parts, [a, u] = le(t, e);
290
+ if (this.el = Ft.createElement(a, i), P.currentNode = this.el.content, e === 2) {
291
+ const h = this.el.content, c = h.firstChild;
292
+ c.remove(), h.append(...c.childNodes);
293
293
  }
294
294
  for (; (s = P.nextNode()) !== null && l.length < d; ) {
295
295
  if (s.nodeType === 1) {
296
296
  if (s.hasAttributes()) {
297
- const a = [];
297
+ const h = [];
298
298
  for (const c of s.getAttributeNames())
299
299
  if (c.endsWith(ut) || c.startsWith(E)) {
300
300
  const p = u[o++];
301
- if (a.push(c), p !== void 0) {
301
+ if (h.push(c), p !== void 0) {
302
302
  const A = s.getAttribute(p.toLowerCase() + ut).split(E), m = /([.?@])?(.*)/.exec(p);
303
- l.push({ type: 1, index: r, name: m[2], strings: A, ctor: m[1] === "." ? he : m[1] === "?" ? de : m[1] === "@" ? ce : Q });
303
+ l.push({ type: 1, index: r, name: m[2], strings: A, ctor: m[1] === "." ? he : m[1] === "?" ? ce : m[1] === "@" ? ue : Q });
304
304
  } else
305
305
  l.push({ type: 6, index: r });
306
306
  }
307
- for (const c of a)
307
+ for (const c of h)
308
308
  s.removeAttribute(c);
309
309
  }
310
- if (qt.test(s.tagName)) {
311
- const a = s.textContent.split(E), c = a.length - 1;
310
+ if (Wt.test(s.tagName)) {
311
+ const h = s.textContent.split(E), c = h.length - 1;
312
312
  if (c > 0) {
313
313
  s.textContent = x ? x.emptyScript : "";
314
314
  for (let p = 0; p < c; p++)
315
- s.append(a[p], G()), P.nextNode(), l.push({ type: 2, index: ++r });
316
- s.append(a[c], G());
315
+ s.append(h[p], G()), P.nextNode(), l.push({ type: 2, index: ++r });
316
+ s.append(h[c], G());
317
317
  }
318
318
  }
319
319
  } else if (s.nodeType === 8)
320
- if (s.data === Bt)
320
+ if (s.data === zt)
321
321
  l.push({ type: 2, index: r });
322
322
  else {
323
- let a = -1;
324
- for (; (a = s.data.indexOf(E, a + 1)) !== -1; )
325
- l.push({ type: 7, index: r }), a += E.length - 1;
323
+ let h = -1;
324
+ for (; (h = s.data.indexOf(E, h + 1)) !== -1; )
325
+ l.push({ type: 7, index: r }), h += E.length - 1;
326
326
  }
327
327
  r++;
328
328
  }
@@ -337,10 +337,10 @@ function H(n, t, e = n, i) {
337
337
  if (t === j)
338
338
  return t;
339
339
  let l = i !== void 0 ? (s = e._$Co) === null || s === void 0 ? void 0 : s[i] : e._$Cl;
340
- const h = D(t) ? void 0 : t._$litDirective$;
341
- return (l == null ? void 0 : l.constructor) !== h && ((r = l == null ? void 0 : l._$AO) === null || r === void 0 || r.call(l, !1), h === void 0 ? l = void 0 : (l = new h(n), l._$AT(n, e, i)), i !== void 0 ? ((o = (d = e)._$Co) !== null && o !== void 0 ? o : d._$Co = [])[i] = l : e._$Cl = l), l !== void 0 && (t = H(n, l._$AS(n, t.values), l, i)), t;
340
+ const a = D(t) ? void 0 : t._$litDirective$;
341
+ return (l == null ? void 0 : l.constructor) !== a && ((r = l == null ? void 0 : l._$AO) === null || r === void 0 || r.call(l, !1), a === void 0 ? l = void 0 : (l = new a(n), l._$AT(n, e, i)), i !== void 0 ? ((o = (d = e)._$Co) !== null && o !== void 0 ? o : d._$Co = [])[i] = l : e._$Cl = l), l !== void 0 && (t = H(n, l._$AS(n, t.values), l, i)), t;
342
342
  }
343
- let le = class {
343
+ let ae = class {
344
344
  constructor(t, e) {
345
345
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
346
346
  }
@@ -354,13 +354,13 @@ let le = class {
354
354
  var e;
355
355
  const { el: { content: i }, parts: s } = this._$AD, r = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : C).importNode(i, !0);
356
356
  P.currentNode = r;
357
- let o = P.nextNode(), d = 0, l = 0, h = s[0];
358
- for (; h !== void 0; ) {
359
- if (d === h.index) {
357
+ let o = P.nextNode(), d = 0, l = 0, a = s[0];
358
+ for (; a !== void 0; ) {
359
+ if (d === a.index) {
360
360
  let u;
361
- h.type === 2 ? u = new Ft(o, o.nextSibling, this, t) : h.type === 1 ? u = new h.ctor(o, h.name, h.strings, this, t) : h.type === 6 && (u = new ue(o, this, t)), this._$AV.push(u), h = s[++l];
361
+ a.type === 2 ? u = new Kt(o, o.nextSibling, this, t) : a.type === 1 ? u = new a.ctor(o, a.name, a.strings, this, t) : a.type === 6 && (u = new pe(o, this, t)), this._$AV.push(u), a = s[++l];
362
362
  }
363
- d !== (h == null ? void 0 : h.index) && (o = P.nextNode(), d++);
363
+ d !== (a == null ? void 0 : a.index) && (o = P.nextNode(), d++);
364
364
  }
365
365
  return P.currentNode = C, r;
366
366
  }
@@ -369,7 +369,7 @@ let le = 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
- }, Ft = class Kt {
372
+ }, Kt = class Jt {
373
373
  constructor(t, e, i, s) {
374
374
  var r;
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 = (r = s == null ? void 0 : s.isConnected) === null || r === void 0 || r;
@@ -390,7 +390,7 @@ let le = class {
390
390
  return this._$AB;
391
391
  }
392
392
  _$AI(t, e = this) {
393
- t = H(this, t, e), D(t) ? t === v || t == null || t === "" ? (this._$AH !== v && this._$AR(), this._$AH = v) : t !== this._$AH && t !== j && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : re(t) ? this.T(t) : this._(t);
393
+ t = H(this, t, e), D(t) ? t === v || t == null || t === "" ? (this._$AH !== v && this._$AR(), this._$AH = v) : t !== this._$AH && t !== j && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : oe(t) ? this.T(t) : this._(t);
394
394
  }
395
395
  k(t) {
396
396
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -403,11 +403,11 @@ let le = class {
403
403
  }
404
404
  g(t) {
405
405
  var e;
406
- const { values: i, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = pt.createElement(Wt(s.h, s.h[0]), this.options)), s);
406
+ const { values: i, _$litType$: s } = t, r = 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) === r)
408
408
  this._$AH.v(i);
409
409
  else {
410
- const o = new le(r, this), d = o.u(this.options);
410
+ const o = new ae(r, this), d = o.u(this.options);
411
411
  o.v(i), this.$(d), this._$AH = o;
412
412
  }
413
413
  }
@@ -416,11 +416,11 @@ let le = class {
416
416
  return e === void 0 && Ut.set(t.strings, e = new pt(t)), e;
417
417
  }
418
418
  T(t) {
419
- zt(this._$AH) || (this._$AH = [], this._$AR());
419
+ qt(this._$AH) || (this._$AH = [], this._$AR());
420
420
  const e = this._$AH;
421
421
  let i, s = 0;
422
422
  for (const r of t)
423
- s === e.length ? e.push(i = new Kt(this.k(G()), this.k(G()), this, this.options)) : i = e[s], i._$AI(r), s++;
423
+ s === e.length ? e.push(i = new Jt(this.k(G()), this.k(G()), this, this.options)) : i = e[s], i._$AI(r), s++;
424
424
  s < e.length && (this._$AR(i && i._$AB.nextSibling, s), e.length = s);
425
425
  }
426
426
  _$AR(t = this._$AA.nextSibling, e) {
@@ -451,9 +451,9 @@ let le = class {
451
451
  t = H(this, t, e, 0), o = !D(t) || t !== this._$AH && t !== j, o && (this._$AH = t);
452
452
  else {
453
453
  const d = t;
454
- let l, h;
454
+ let l, a;
455
455
  for (t = r[0], l = 0; l < r.length - 1; l++)
456
- h = H(this, d[i + l], e, l), h === j && (h = this._$AH[l]), o || (o = !D(h) || h !== this._$AH[l]), h === v ? t = v : t !== v && (t += (h ?? "") + r[l + 1]), this._$AH[l] = h;
456
+ a = H(this, d[i + l], e, l), a === j && (a = this._$AH[l]), o || (o = !D(a) || a !== this._$AH[l]), a === v ? t = v : t !== v && (t += (a ?? "") + r[l + 1]), this._$AH[l] = a;
457
457
  }
458
458
  o && !s && this.j(t);
459
459
  }
@@ -468,15 +468,15 @@ let le = class {
468
468
  this.element[this.name] = t === v ? void 0 : t;
469
469
  }
470
470
  };
471
- const ae = x ? x.emptyScript : "";
472
- let de = class extends Q {
471
+ const de = x ? x.emptyScript : "";
472
+ let ce = class extends Q {
473
473
  constructor() {
474
474
  super(...arguments), this.type = 4;
475
475
  }
476
476
  j(t) {
477
- t && t !== v ? this.element.setAttribute(this.name, ae) : this.element.removeAttribute(this.name);
477
+ t && t !== v ? this.element.setAttribute(this.name, de) : this.element.removeAttribute(this.name);
478
478
  }
479
- }, ce = class extends Q {
479
+ }, ue = class extends Q {
480
480
  constructor(t, e, i, s, r) {
481
481
  super(t, e, i, s, r), this.type = 5;
482
482
  }
@@ -492,7 +492,7 @@ let de = class extends Q {
492
492
  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);
493
493
  }
494
494
  };
495
- class ue {
495
+ class pe {
496
496
  constructor(t, e, i) {
497
497
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
498
498
  }
@@ -504,25 +504,25 @@ class ue {
504
504
  }
505
505
  }
506
506
  const Ct = J.litHtmlPolyfillSupport;
507
- Ct == null || Ct(pt, Ft), ((st = J.litHtmlVersions) !== null && st !== void 0 ? st : J.litHtmlVersions = []).push("2.8.0");
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, Rt = N ? N.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, vt = "$lit$", w = `lit$${(Math.random() + "").slice(9)}$`, Jt = "?" + w, pe = `<${Jt}>`, R = document, B = () => R.createComment(""), z = (n) => n === null || typeof n != "object" && typeof n != "function", Gt = Array.isArray, ve = (n) => Gt(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", ot = `[
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
515
  \f\r]`, M = /<(?:(!--|\/[^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, Xt = /^(?:script|style|textarea|title)$/i, _e = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), $e = _e(1), I = Symbol.for("lit-noChange"), _ = Symbol.for("lit-nothing"), It = /* @__PURE__ */ new WeakMap(), U = R.createTreeWalker(R, 129, null, !1), me = (n, t) => {
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, r = t === 2 ? "<svg>" : "", o = M;
519
519
  for (let l = 0; l < e; l++) {
520
- const h = n[l];
521
- let u, a, c = -1, p = 0;
522
- for (; p < h.length && (o.lastIndex = p, a = o.exec(h), a !== null); )
523
- p = o.lastIndex, o === M ? a[1] === "!--" ? o = Tt : a[1] !== void 0 ? o = xt : a[2] !== void 0 ? (Xt.test(a[2]) && (s = RegExp("</" + a[2], "g")), o = S) : a[3] !== void 0 && (o = S) : o === S ? a[0] === ">" ? (o = s ?? M, c = -1) : a[1] === void 0 ? c = -2 : (c = o.lastIndex - a[2].length, u = a[1], o = a[3] === void 0 ? S : a[3] === '"' ? Nt : Ht) : o === Nt || o === Ht ? o = S : o === Tt || o === xt ? o = M : (o = S, s = void 0);
520
+ const a = n[l];
521
+ let u, h, c = -1, p = 0;
522
+ for (; p < a.length && (o.lastIndex = p, h = o.exec(a), h !== null); )
523
+ p = o.lastIndex, o === M ? h[1] === "!--" ? o = Tt : h[1] !== void 0 ? o = xt : h[2] !== void 0 ? (Yt.test(h[2]) && (s = RegExp("</" + h[2], "g")), o = S) : h[3] !== void 0 && (o = S) : o === S ? h[0] === ">" ? (o = s ?? M, c = -1) : h[1] === void 0 ? c = -2 : (c = o.lastIndex - h[2].length, u = h[1], o = h[3] === void 0 ? S : h[3] === '"' ? Nt : Ht) : o === Nt || o === Ht ? o = S : o === Tt || o === xt ? o = M : (o = S, s = void 0);
524
524
  const A = o === S && n[l + 1].startsWith("/>") ? " " : "";
525
- r += o === M ? h + pe : c >= 0 ? (i.push(u), h.slice(0, c) + vt + h.slice(c) + w + A) : h + w + (c === -2 ? (i.push(void 0), l) : A);
525
+ r += o === M ? a + ve : c >= 0 ? (i.push(u), a.slice(0, c) + vt + a.slice(c) + w + A) : a + w + (c === -2 ? (i.push(void 0), l) : A);
526
526
  }
527
527
  const d = r + (n[e] || "<?>") + (t === 2 ? "</svg>" : "");
528
528
  if (!Array.isArray(n) || !n.hasOwnProperty("raw"))
@@ -534,43 +534,43 @@ class q {
534
534
  let s;
535
535
  this.parts = [];
536
536
  let r = 0, o = 0;
537
- const d = t.length - 1, l = this.parts, [h, u] = me(t, e);
538
- if (this.el = q.createElement(h, i), U.currentNode = this.el.content, e === 2) {
539
- const a = this.el.content, c = a.firstChild;
540
- c.remove(), a.append(...c.childNodes);
537
+ const d = t.length - 1, l = this.parts, [a, u] = ge(t, e);
538
+ if (this.el = q.createElement(a, i), U.currentNode = this.el.content, e === 2) {
539
+ const h = this.el.content, c = h.firstChild;
540
+ c.remove(), h.append(...c.childNodes);
541
541
  }
542
542
  for (; (s = U.nextNode()) !== null && l.length < d; ) {
543
543
  if (s.nodeType === 1) {
544
544
  if (s.hasAttributes()) {
545
- const a = [];
545
+ const h = [];
546
546
  for (const c of s.getAttributeNames())
547
547
  if (c.endsWith(vt) || c.startsWith(w)) {
548
548
  const p = u[o++];
549
- if (a.push(c), p !== void 0) {
549
+ if (h.push(c), p !== void 0) {
550
550
  const A = s.getAttribute(p.toLowerCase() + vt).split(w), m = /([.?@])?(.*)/.exec(p);
551
- l.push({ type: 1, index: r, name: m[2], strings: A, ctor: m[1] === "." ? fe : m[1] === "?" ? ye : m[1] === "@" ? Ee : tt });
551
+ l.push({ type: 1, index: r, name: m[2], strings: A, ctor: m[1] === "." ? Ae : m[1] === "?" ? Ee : m[1] === "@" ? we : tt });
552
552
  } else
553
553
  l.push({ type: 6, index: r });
554
554
  }
555
- for (const c of a)
555
+ for (const c of h)
556
556
  s.removeAttribute(c);
557
557
  }
558
- if (Xt.test(s.tagName)) {
559
- const a = s.textContent.split(w), c = a.length - 1;
558
+ if (Yt.test(s.tagName)) {
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++)
563
- s.append(a[p], B()), U.nextNode(), l.push({ type: 2, index: ++r });
564
- s.append(a[c], B());
563
+ s.append(h[p], B()), U.nextNode(), l.push({ type: 2, index: ++r });
564
+ s.append(h[c], B());
565
565
  }
566
566
  }
567
567
  } else if (s.nodeType === 8)
568
- if (s.data === Jt)
568
+ if (s.data === Gt)
569
569
  l.push({ type: 2, index: r });
570
570
  else {
571
- let a = -1;
572
- for (; (a = s.data.indexOf(w, a + 1)) !== -1; )
573
- l.push({ type: 7, index: r }), a += w.length - 1;
571
+ let h = -1;
572
+ for (; (h = s.data.indexOf(w, h + 1)) !== -1; )
573
+ l.push({ type: 7, index: r }), h += w.length - 1;
574
574
  }
575
575
  r++;
576
576
  }
@@ -585,10 +585,10 @@ function V(n, t, e = n, i) {
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
- const h = z(t) ? void 0 : t._$litDirective$;
589
- return (l == null ? void 0 : l.constructor) !== h && ((r = l == null ? void 0 : l._$AO) === null || r === void 0 || r.call(l, !1), h === void 0 ? l = void 0 : (l = new h(n), l._$AT(n, e, i)), i !== void 0 ? ((o = (d = e)._$Co) !== null && o !== void 0 ? o : d._$Co = [])[i] = l : e._$Cl = l), l !== void 0 && (t = V(n, l._$AS(n, t.values), l, i)), t;
588
+ const a = z(t) ? void 0 : t._$litDirective$;
589
+ return (l == null ? void 0 : l.constructor) !== a && ((r = l == null ? void 0 : l._$AO) === null || r === void 0 || r.call(l, !1), a === void 0 ? l = void 0 : (l = new a(n), l._$AT(n, e, i)), i !== void 0 ? ((o = (d = e)._$Co) !== null && o !== void 0 ? o : d._$Co = [])[i] = l : e._$Cl = l), l !== void 0 && (t = V(n, l._$AS(n, t.values), l, i)), t;
590
590
  }
591
- class ge {
591
+ class fe {
592
592
  constructor(t, e) {
593
593
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
594
594
  }
@@ -602,13 +602,13 @@ class ge {
602
602
  var e;
603
603
  const { el: { content: i }, parts: s } = this._$AD, r = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : R).importNode(i, !0);
604
604
  U.currentNode = r;
605
- let o = U.nextNode(), d = 0, l = 0, h = s[0];
606
- for (; h !== void 0; ) {
607
- if (d === h.index) {
605
+ let o = U.nextNode(), d = 0, l = 0, a = s[0];
606
+ for (; a !== void 0; ) {
607
+ if (d === a.index) {
608
608
  let u;
609
- h.type === 2 ? u = new W(o, o.nextSibling, this, t) : h.type === 1 ? u = new h.ctor(o, h.name, h.strings, this, t) : h.type === 6 && (u = new we(o, this, t)), this._$AV.push(u), h = s[++l];
609
+ a.type === 2 ? u = new W(o, o.nextSibling, this, t) : a.type === 1 ? u = new a.ctor(o, a.name, a.strings, this, t) : a.type === 6 && (u = new be(o, this, t)), this._$AV.push(u), a = s[++l];
610
610
  }
611
- d !== (h == null ? void 0 : h.index) && (o = U.nextNode(), d++);
611
+ d !== (a == null ? void 0 : a.index) && (o = U.nextNode(), d++);
612
612
  }
613
613
  return U.currentNode = R, r;
614
614
  }
@@ -639,7 +639,7 @@ class W {
639
639
  return this._$AB;
640
640
  }
641
641
  _$AI(t, e = this) {
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) : ve(t) ? this.T(t) : this._(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);
@@ -656,7 +656,7 @@ class W {
656
656
  if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === r)
657
657
  this._$AH.v(i);
658
658
  else {
659
- const o = new ge(r, this), d = o.u(this.options);
659
+ const o = new fe(r, this), d = o.u(this.options);
660
660
  o.v(i), this.$(d), this._$AH = o;
661
661
  }
662
662
  }
@@ -665,7 +665,7 @@ class W {
665
665
  return e === void 0 && It.set(t.strings, e = new q(t)), e;
666
666
  }
667
667
  T(t) {
668
- Gt(this._$AH) || (this._$AH = [], this._$AR());
668
+ Xt(this._$AH) || (this._$AH = [], this._$AR());
669
669
  const e = this._$AH;
670
670
  let i, s = 0;
671
671
  for (const r of t)
@@ -701,9 +701,9 @@ class tt {
701
701
  t = V(this, t, e, 0), o = !z(t) || t !== this._$AH && t !== I, o && (this._$AH = t);
702
702
  else {
703
703
  const d = t;
704
- let l, h;
704
+ let l, a;
705
705
  for (t = r[0], l = 0; l < r.length - 1; l++)
706
- h = V(this, d[i + l], e, l), h === I && (h = this._$AH[l]), o || (o = !z(h) || h !== this._$AH[l]), h === _ ? t = _ : t !== _ && (t += (h ?? "") + r[l + 1]), this._$AH[l] = h;
706
+ a = V(this, d[i + l], e, l), a === I && (a = this._$AH[l]), o || (o = !z(a) || a !== this._$AH[l]), a === _ ? t = _ : t !== _ && (t += (a ?? "") + r[l + 1]), this._$AH[l] = a;
707
707
  }
708
708
  o && !s && this.j(t);
709
709
  }
@@ -711,7 +711,7 @@ class tt {
711
711
  t === _ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
712
712
  }
713
713
  }
714
- class fe extends tt {
714
+ class Ae extends tt {
715
715
  constructor() {
716
716
  super(...arguments), this.type = 3;
717
717
  }
@@ -719,16 +719,16 @@ class fe extends tt {
719
719
  this.element[this.name] = t === _ ? void 0 : t;
720
720
  }
721
721
  }
722
- const Ae = N ? N.emptyScript : "";
723
- class ye extends tt {
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, Ae) : this.element.removeAttribute(this.name);
728
+ t && t !== _ ? this.element.setAttribute(this.name, ye) : this.element.removeAttribute(this.name);
729
729
  }
730
730
  }
731
- class Ee extends tt {
731
+ class we extends tt {
732
732
  constructor(t, e, i, s, r) {
733
733
  super(t, e, i, s, r), this.type = 5;
734
734
  }
@@ -744,7 +744,7 @@ class Ee extends tt {
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 we {
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
  }
@@ -757,7 +757,7 @@ class we {
757
757
  }
758
758
  const Vt = X.litHtmlPolyfillSupport;
759
759
  Vt == null || Vt(q, W), ((rt = X.litHtmlVersions) !== null && rt !== void 0 ? rt : X.litHtmlVersions = []).push("2.7.4");
760
- const be = (n, t, e) => {
760
+ const Se = (n, t, e) => {
761
761
  var i, s;
762
762
  const r = (i = e == null ? void 0 : e.renderBefore) !== null && i !== void 0 ? i : t;
763
763
  let o = r._$litPart$;
@@ -772,7 +772,7 @@ const be = (n, t, e) => {
772
772
  * Copyright 2017 Google LLC
773
773
  * SPDX-License-Identifier: BSD-3-Clause
774
774
  */
775
- var lt, ht;
775
+ var lt, at;
776
776
  class k extends T {
777
777
  constructor() {
778
778
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
@@ -784,7 +784,7 @@ class k extends T {
784
784
  }
785
785
  update(t) {
786
786
  const e = this.render();
787
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = be(e, this.renderRoot, this.renderOptions);
787
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Se(e, this.renderRoot, this.renderOptions);
788
788
  }
789
789
  connectedCallback() {
790
790
  var t;
@@ -801,8 +801,8 @@ class k extends T {
801
801
  k.finalized = !0, k._$litElement$ = !0, (lt = globalThis.litElementHydrateSupport) === null || lt === void 0 || lt.call(globalThis, { LitElement: k });
802
802
  const Ot = globalThis.litElementPolyfillSupport;
803
803
  Ot == null || Ot({ LitElement: k });
804
- ((ht = globalThis.litElementVersions) !== null && ht !== void 0 ? ht : globalThis.litElementVersions = []).push("3.3.2");
805
- function Se(n, t, e) {
804
+ ((at = globalThis.litElementVersions) !== null && at !== void 0 ? at : globalThis.litElementVersions = []).push("3.3.2");
805
+ function Pe(n, t, e) {
806
806
  function i(s) {
807
807
  e.dispatchEvent(new CustomEvent(s.type, s));
808
808
  }
@@ -810,17 +810,17 @@ function Se(n, t, e) {
810
810
  t.removeEventListener(n, i);
811
811
  };
812
812
  }
813
- class Pe {
813
+ class Ue {
814
814
  constructor(t, e) {
815
- this._events = [], this._cleanup = [], this._forwardElementRef = Lt(), this.host = t, this._events = e, t.addController(this);
815
+ this._events = [], this._cleanup = [], this._forwardElementRef = kt(), this.host = t, this._events = e, t.addController(this);
816
816
  }
817
817
  register() {
818
- return kt(this._forwardElementRef);
818
+ return Dt(this._forwardElementRef);
819
819
  }
820
820
  hostConnected() {
821
821
  requestAnimationFrame(() => {
822
822
  this._events.forEach((t) => {
823
- this._forwardElementRef.value && this._cleanup.push(Se(t, this._forwardElementRef.value, this.host));
823
+ this._forwardElementRef.value && this._cleanup.push(Pe(t, this._forwardElementRef.value, this.host));
824
824
  });
825
825
  });
826
826
  }
@@ -830,52 +830,52 @@ class Pe {
830
830
  }), this._cleanup = [];
831
831
  }
832
832
  }
833
- const at = "https://vouchfor.com", Ue = "https://d2rxhdlm2q91uk.cloudfront.net", Ce = "https://d1ix11aj5kfygl.cloudfront.net", Re = "https://d157jlwnudd93d.cloudfront.net", Te = "https://bshyfw4h5a.execute-api.ap-southeast-2.amazonaws.com/dev", xe = "https://gyzw7rpbq3.execute-api.ap-southeast-2.amazonaws.com/staging", He = "https://vfcjuim1l3.execute-api.ap-southeast-2.amazonaws.com/prod", Ne = "http://localhost:6060/v1", Ie = "https://embed-staging.vouchfor.com/v1", Ve = "https://embed.vouchfor.com/v1", Oe = "https://dev.vouchfor.com", Me = "https://staging.vouchfor.com", Le = "https://app.vouchfor.com";
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 = "http://localhost:6060/v1", Ve = "https://embed-staging.vouchfor.com/v1", Oe = "https://embed.vouchfor.com/v1", Me = "https://dev.vouchfor.com", Le = "https://staging.vouchfor.com", ke = "https://app.vouchfor.com";
834
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")
838
838
  return {
839
- marketingUrl: at,
840
- videoUrl: Ue,
841
- publicApiUrl: Te,
842
- embedApiUrl: Ne,
843
- publicRecorderUrl: Oe
844
- };
845
- if (n === "staging")
846
- return {
847
- marketingUrl: at,
839
+ marketingUrl: ht,
848
840
  videoUrl: Ce,
849
841
  publicApiUrl: xe,
850
842
  embedApiUrl: Ie,
851
843
  publicRecorderUrl: Me
852
844
  };
853
- if (n === "prod")
845
+ if (n === "staging")
854
846
  return {
855
- marketingUrl: at,
847
+ marketingUrl: ht,
856
848
  videoUrl: Re,
857
849
  publicApiUrl: He,
858
850
  embedApiUrl: Ve,
859
851
  publicRecorderUrl: Le
860
852
  };
853
+ if (n === "prod")
854
+ return {
855
+ marketingUrl: ht,
856
+ videoUrl: Te,
857
+ publicApiUrl: Ne,
858
+ embedApiUrl: Oe,
859
+ publicRecorderUrl: ke
860
+ };
861
861
  }
862
- class ke {
862
+ class De {
863
863
  constructor(t) {
864
- this._fetching = !1, this.host = t, new Qt(
864
+ this._fetching = !1, this.host = t, new te(
865
865
  this.host,
866
866
  async ([e, i, s, r, o]) => {
867
- var d, l, h, u;
867
+ var d, l, a, u;
868
868
  try {
869
- if (this.vouch = void 0, this.template = void 0, s) {
870
- const a = await this.getTemplate(e, i, o);
871
- this.vouch = s, this.template = ((l = (d = s == null ? void 0 : s.settings) == null ? void 0 : d.template) == null ? void 0 : l.instance) ?? a;
869
+ if (t.vouch = void 0, t.template = void 0, s) {
870
+ let h;
871
+ o && (this.fetching = !0, h = await this.getTemplate(e, i, o)), t.vouch = s, t.template = h ?? ((l = (d = s == null ? void 0 : s.settings) == null ? void 0 : d.template) == null ? void 0 : l.instance);
872
872
  } else if (r) {
873
873
  this.fetching = !0;
874
- const [a, c] = await Promise.all([
874
+ const [h, c] = await Promise.all([
875
875
  this.getVouch(e, i, r),
876
- this.getTemplate(e, i, o)
876
+ o ? this.getTemplate(e, i, o) : null
877
877
  ]);
878
- this.vouch = a, this.template = ((u = (h = a == null ? void 0 : a.settings) == null ? void 0 : h.template) == null ? void 0 : u.instance) ?? c;
878
+ t.vouch = h, t.template = c ?? ((u = (a = h == null ? void 0 : h.settings) == null ? void 0 : a.template) == null ? void 0 : u.instance);
879
879
  }
880
880
  } finally {
881
881
  this.fetching = !1;
@@ -890,64 +890,52 @@ class ke {
890
890
  get fetching() {
891
891
  return this._fetching;
892
892
  }
893
- set vouch(t) {
894
- this._vouch !== t && (this._vouch = t, this.host.requestUpdate());
895
- }
896
- get vouch() {
897
- return this._vouch;
898
- }
899
- set template(t) {
900
- this._template !== t && (this._template = t, this.host.requestUpdate());
901
- }
902
- get template() {
903
- return this._template;
904
- }
905
893
  async getVouch(t, e, i) {
906
894
  const { embedApiUrl: s } = Y(t);
907
- return i ? fetch(`${s}/vouches/${i}`, {
895
+ return fetch(`${s}/vouches/${i}`, {
908
896
  method: "GET",
909
897
  headers: [["X-Api-Key", e]]
910
- }).then((r) => r.json()) : null;
898
+ }).then((r) => r.json());
911
899
  }
912
900
  async getTemplate(t, e, i) {
913
901
  const { embedApiUrl: s } = Y(t);
914
- return i ? fetch(`${s}/templates/${i}`, {
902
+ return fetch(`${s}/templates/${i}`, {
915
903
  method: "GET",
916
904
  headers: [["X-Api-Key", e]]
917
- }).then((r) => r.json()) : null;
905
+ }).then((r) => r.json());
918
906
  }
919
907
  }
920
908
  let Z;
921
- const De = new Uint8Array(16);
922
- function je() {
909
+ const je = new Uint8Array(16);
910
+ function Be() {
923
911
  if (!Z && (Z = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Z))
924
912
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
925
- return Z(De);
913
+ return Z(je);
926
914
  }
927
915
  const $ = [];
928
916
  for (let n = 0; n < 256; ++n)
929
917
  $.push((n + 256).toString(16).slice(1));
930
- function Be(n, t = 0) {
918
+ function ze(n, t = 0) {
931
919
  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]];
932
920
  }
933
- const ze = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Mt = {
934
- randomUUID: ze
921
+ const qe = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Mt = {
922
+ randomUUID: qe
935
923
  };
936
924
  function L(n, t, e) {
937
925
  if (Mt.randomUUID && !t && !n)
938
926
  return Mt.randomUUID();
939
927
  n = n || {};
940
- const i = n.random || (n.rng || je)();
928
+ const i = n.random || (n.rng || Be)();
941
929
  if (i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, t) {
942
930
  e = e || 0;
943
931
  for (let s = 0; s < 16; ++s)
944
932
  t[e + s] = i[s];
945
933
  return t;
946
934
  }
947
- return Be(i);
935
+ return ze(i);
948
936
  }
949
- const qe = 2e3;
950
- class We {
937
+ const We = 2e3;
938
+ class Ze {
951
939
  constructor(t) {
952
940
  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) => {
953
941
  var s, r;
@@ -958,8 +946,8 @@ class We {
958
946
  const [e, i] = ((o = (r = Intl.DateTimeFormat().resolvedOptions().timeZone) == null ? void 0 : r.split) == null ? void 0 : o.call(r, "/")) ?? [], s = {};
959
947
  return [...new URLSearchParams(location.search).entries()].forEach(([d, l]) => {
960
948
  if (/utm/.test(d)) {
961
- const h = d.toLowerCase().replace(/[-_][a-z0-9]/g, (u) => u.slice(-1).toUpperCase());
962
- s[h] = l;
949
+ const a = d.toLowerCase().replace(/[-_][a-z0-9]/g, (u) => u.slice(-1).toUpperCase());
950
+ s[a] = l;
963
951
  }
964
952
  }), {
965
953
  source: "media_player",
@@ -1012,7 +1000,7 @@ class We {
1012
1000
  const r = Date.now();
1013
1001
  !this.host.paused && // Only fire the video seeked event when this video is the active one
1014
1002
  e === ((d = (o = this.host.scene) == null ? void 0 : o.video) == null ? void 0 : d.id) && // Throttle the frequency that we send streamed events while playing
1015
- r - this._streamedPrevTimestamp[e] > qe && (this._sendTrackingEvent("VIDEO_STREAMED", {
1003
+ r - this._streamedPrevTimestamp[e] > We && (this._sendTrackingEvent("VIDEO_STREAMED", {
1016
1004
  vouchId: s,
1017
1005
  answerId: e,
1018
1006
  streamStart: this._streamedTime[e],
@@ -1033,15 +1021,15 @@ class We {
1033
1021
  return "uuid" in this.host.data ? this.host.data.uuid : this.host.data.id;
1034
1022
  }
1035
1023
  _getUids() {
1036
- var r, o, d, l, h, u, a, c, p, A, m, $t;
1024
+ var r, o, d, l, a, u, h, c, p, A, m, $t;
1037
1025
  if (typeof window > "u")
1038
1026
  return {
1039
1027
  client: null,
1040
1028
  tab: null,
1041
1029
  request: L()
1042
1030
  };
1043
- const t = this._visitorId || ((o = (r = window.localStorage) == null ? void 0 : r.getItem) == null ? void 0 : o.call(r, "vouch-uid-visitor")) || this._createVisitor(L()), e = this._clientId || ((l = (d = window.localStorage) == null ? void 0 : d.getItem) == null ? void 0 : l.call(d, "vouch-uid-client")) || L(), i = this._tabId || ((u = (h = window.sessionStorage) == null ? void 0 : h.getItem) == null ? void 0 : u.call(h, "vouch-uid-tab")) || L(), s = L();
1044
- return t !== this._visitorId && (this._visitorId = t, (c = (a = window.localStorage) == null ? void 0 : a.setItem) == null || c.call(a, "vouch-uid-visitor", t)), e !== this._clientId && (this._clientId = e, (A = (p = window.localStorage) == null ? void 0 : p.setItem) == null || A.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)), {
1031
+ const t = this._visitorId || ((o = (r = window.localStorage) == null ? void 0 : r.getItem) == null ? void 0 : o.call(r, "vouch-uid-visitor")) || this._createVisitor(L()), e = this._clientId || ((l = (d = window.localStorage) == null ? void 0 : d.getItem) == null ? void 0 : l.call(d, "vouch-uid-client")) || L(), i = this._tabId || ((u = (a = window.sessionStorage) == null ? void 0 : a.getItem) == null ? void 0 : u.call(a, "vouch-uid-tab")) || L(), s = L();
1032
+ 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, (A = (p = window.localStorage) == null ? void 0 : p.setItem) == null || A.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)), {
1045
1033
  client: e,
1046
1034
  tab: i,
1047
1035
  request: s,
@@ -1059,14 +1047,14 @@ class We {
1059
1047
  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);
1060
1048
  }
1061
1049
  }
1062
- var Ze = Object.defineProperty, Fe = Object.getOwnPropertyDescriptor, f = (n, t, e, i) => {
1063
- for (var s = i > 1 ? void 0 : i ? Fe(t, e) : t, r = n.length - 1, o; r >= 0; r--)
1050
+ var Fe = Object.defineProperty, Ke = Object.getOwnPropertyDescriptor, f = (n, t, e, i) => {
1051
+ for (var s = i > 1 ? void 0 : i ? Ke(t, e) : t, r = n.length - 1, o; r >= 0; r--)
1064
1052
  (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s);
1065
- return i && s && Ze(t, e, s), s;
1053
+ return i && s && Fe(t, e, s), s;
1066
1054
  };
1067
1055
  let g = class extends k {
1068
1056
  constructor() {
1069
- super(...arguments), this._mediaPlayerRef = Lt(), this.env = "prod", this.apiKey = "", this.preload = "auto", this.autoplay = !1, this.aspectRatio = 0, this.eventController = new Pe(this, [
1057
+ super(...arguments), this._mediaPlayerRef = kt(), this.env = "prod", this.apiKey = "", this.preload = "auto", this.autoplay = !1, this.aspectRatio = 0, this.eventController = new Ue(this, [
1070
1058
  "durationchange",
1071
1059
  "ended",
1072
1060
  "error",
@@ -1091,13 +1079,7 @@ let g = class extends k {
1091
1079
  "video:timeupdate",
1092
1080
  "video:ended",
1093
1081
  "video:error"
1094
- ]), this._fetcherController = new ke(this), this._trackingController = new We(this);
1095
- }
1096
- get vouch() {
1097
- return this._fetcherController.vouch;
1098
- }
1099
- get template() {
1100
- return this._fetcherController.template;
1082
+ ]), this._fetcherController = new De(this), this._trackingController = new Ze(this);
1101
1083
  }
1102
1084
  get fetching() {
1103
1085
  return this._fetcherController.fetching;
@@ -1182,9 +1164,9 @@ let g = class extends k {
1182
1164
  (t = this._mediaPlayerRef.value) == null || t.setScene(n);
1183
1165
  }
1184
1166
  render() {
1185
- return $e`
1167
+ return me`
1186
1168
  <vmp-new-media-player
1187
- ${kt(this._mediaPlayerRef)}
1169
+ ${Dt(this._mediaPlayerRef)}
1188
1170
  ${this.eventController.register()}
1189
1171
  ?autoplay=${this.autoplay}
1190
1172
  ?loading=${this.fetching}
@@ -1224,8 +1206,14 @@ f([
1224
1206
  f([
1225
1207
  y({ type: Number })
1226
1208
  ], g.prototype, "aspectRatio", 2);
1209
+ f([
1210
+ Lt()
1211
+ ], g.prototype, "vouch", 2);
1212
+ f([
1213
+ Lt()
1214
+ ], g.prototype, "template", 2);
1227
1215
  g = f([
1228
- Yt("vouch-embed")
1216
+ Qt("vouch-embed")
1229
1217
  ], g);
1230
1218
  export {
1231
1219
  g as Embed