@vouchfor/embeds 0.0.0-experiment.899f364 → 0.0.0-experiment.8a05fac
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/tracking.d.ts +1 -1
- package/dist/es/components/Embed/index.d.ts +2 -2
- package/dist/es/embeds.js +344 -346
- package/dist/es/embeds.js.map +1 -1
- package/dist/iife/embeds.iife.js +60 -56
- package/dist/iife/embeds.iife.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Embed/controllers/tracking.ts +44 -34
- package/src/components/Embed/index.ts +3 -2
package/dist/es/embeds.js
CHANGED
@@ -11,8 +11,8 @@ import "@vouchfor/media-player";
|
|
11
11
|
*/
|
12
12
|
const G = globalThis, _t = G.ShadowRoot && (G.ShadyCSS === void 0 || G.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Wt = Symbol(), gt = /* @__PURE__ */ new WeakMap();
|
13
13
|
let le = class {
|
14
|
-
constructor(t, e,
|
15
|
-
if (this._$cssResult$ = !0,
|
14
|
+
constructor(t, e, i) {
|
15
|
+
if (this._$cssResult$ = !0, i !== Wt)
|
16
16
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
17
17
|
this.cssText = t, this.t = e;
|
18
18
|
}
|
@@ -20,8 +20,8 @@ let le = class {
|
|
20
20
|
let t = this.o;
|
21
21
|
const e = this.t;
|
22
22
|
if (_t && t === void 0) {
|
23
|
-
const
|
24
|
-
|
23
|
+
const i = e !== void 0 && e.length === 1;
|
24
|
+
i && (t = gt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && gt.set(e, t));
|
25
25
|
}
|
26
26
|
return t;
|
27
27
|
}
|
@@ -34,13 +34,13 @@ const ce = (r) => new le(typeof r == "string" ? r : r + "", void 0, Wt), de = (r
|
|
34
34
|
r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
35
35
|
else
|
36
36
|
for (const e of t) {
|
37
|
-
const
|
38
|
-
|
37
|
+
const i = document.createElement("style"), s = G.litNonce;
|
38
|
+
s !== void 0 && i.setAttribute("nonce", s), i.textContent = e.cssText, r.appendChild(i);
|
39
39
|
}
|
40
40
|
}, vt = _t ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
|
41
41
|
let e = "";
|
42
|
-
for (const
|
43
|
-
e +=
|
42
|
+
for (const i of t.cssRules)
|
43
|
+
e += i.cssText;
|
44
44
|
return ce(e);
|
45
45
|
})(r) : r;
|
46
46
|
/**
|
@@ -48,7 +48,7 @@ const ce = (r) => new le(typeof r == "string" ? r : r + "", void 0, Wt), de = (r
|
|
48
48
|
* Copyright 2017 Google LLC
|
49
49
|
* SPDX-License-Identifier: BSD-3-Clause
|
50
50
|
*/
|
51
|
-
const { is: pe, defineProperty: ue, getOwnPropertyDescriptor: _e, getOwnPropertyNames: $e, getOwnPropertySymbols: me, getPrototypeOf: fe } = Object, E = globalThis, yt = E.trustedTypes, ge = yt ? yt.emptyScript : "", rt = E.reactiveElementPolyfillSupport,
|
51
|
+
const { is: pe, defineProperty: ue, getOwnPropertyDescriptor: _e, getOwnPropertyNames: $e, getOwnPropertySymbols: me, getPrototypeOf: fe } = Object, E = globalThis, yt = E.trustedTypes, ge = yt ? yt.emptyScript : "", rt = E.reactiveElementPolyfillSupport, I = (r, t) => r, dt = { toAttribute(r, t) {
|
52
52
|
switch (t) {
|
53
53
|
case Boolean:
|
54
54
|
r = r ? ge : null;
|
@@ -78,7 +78,7 @@ const { is: pe, defineProperty: ue, getOwnPropertyDescriptor: _e, getOwnProperty
|
|
78
78
|
return e;
|
79
79
|
} }, qt = (r, t) => !pe(r, t), At = { attribute: !0, type: String, converter: dt, reflect: !1, hasChanged: qt };
|
80
80
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), E.litPropertyMetadata ?? (E.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
81
|
-
let
|
81
|
+
let M = class extends HTMLElement {
|
82
82
|
static addInitializer(t) {
|
83
83
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
84
84
|
}
|
@@ -87,67 +87,67 @@ let k = class extends HTMLElement {
|
|
87
87
|
}
|
88
88
|
static createProperty(t, e = At) {
|
89
89
|
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
90
|
-
const
|
91
|
-
|
90
|
+
const i = Symbol(), s = this.getPropertyDescriptor(t, i, e);
|
91
|
+
s !== void 0 && ue(this.prototype, t, s);
|
92
92
|
}
|
93
93
|
}
|
94
|
-
static getPropertyDescriptor(t, e,
|
95
|
-
const { get:
|
94
|
+
static getPropertyDescriptor(t, e, i) {
|
95
|
+
const { get: s, set: n } = _e(this.prototype, t) ?? { get() {
|
96
96
|
return this[e];
|
97
97
|
}, set(o) {
|
98
98
|
this[e] = o;
|
99
99
|
} };
|
100
100
|
return { get() {
|
101
|
-
return
|
101
|
+
return s == null ? void 0 : s.call(this);
|
102
102
|
}, set(o) {
|
103
|
-
const a =
|
104
|
-
n.call(this, o), this.requestUpdate(t, a,
|
103
|
+
const a = s == null ? void 0 : s.call(this);
|
104
|
+
n.call(this, o), this.requestUpdate(t, a, i);
|
105
105
|
}, configurable: !0, enumerable: !0 };
|
106
106
|
}
|
107
107
|
static getPropertyOptions(t) {
|
108
108
|
return this.elementProperties.get(t) ?? At;
|
109
109
|
}
|
110
110
|
static _$Ei() {
|
111
|
-
if (this.hasOwnProperty(
|
111
|
+
if (this.hasOwnProperty(I("elementProperties")))
|
112
112
|
return;
|
113
113
|
const t = fe(this);
|
114
114
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
115
115
|
}
|
116
116
|
static finalize() {
|
117
|
-
if (this.hasOwnProperty(
|
117
|
+
if (this.hasOwnProperty(I("finalized")))
|
118
118
|
return;
|
119
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
120
|
-
const e = this.properties,
|
121
|
-
for (const
|
122
|
-
this.createProperty(
|
119
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(I("properties"))) {
|
120
|
+
const e = this.properties, i = [...$e(e), ...me(e)];
|
121
|
+
for (const s of i)
|
122
|
+
this.createProperty(s, e[s]);
|
123
123
|
}
|
124
124
|
const t = this[Symbol.metadata];
|
125
125
|
if (t !== null) {
|
126
126
|
const e = litPropertyMetadata.get(t);
|
127
127
|
if (e !== void 0)
|
128
|
-
for (const [
|
129
|
-
this.elementProperties.set(
|
128
|
+
for (const [i, s] of e)
|
129
|
+
this.elementProperties.set(i, s);
|
130
130
|
}
|
131
131
|
this._$Eh = /* @__PURE__ */ new Map();
|
132
|
-
for (const [e,
|
133
|
-
const
|
134
|
-
|
132
|
+
for (const [e, i] of this.elementProperties) {
|
133
|
+
const s = this._$Eu(e, i);
|
134
|
+
s !== void 0 && this._$Eh.set(s, e);
|
135
135
|
}
|
136
136
|
this.elementStyles = this.finalizeStyles(this.styles);
|
137
137
|
}
|
138
138
|
static finalizeStyles(t) {
|
139
139
|
const e = [];
|
140
140
|
if (Array.isArray(t)) {
|
141
|
-
const
|
142
|
-
for (const
|
143
|
-
e.unshift(vt(
|
141
|
+
const i = new Set(t.flat(1 / 0).reverse());
|
142
|
+
for (const s of i)
|
143
|
+
e.unshift(vt(s));
|
144
144
|
} else
|
145
145
|
t !== void 0 && e.push(vt(t));
|
146
146
|
return e;
|
147
147
|
}
|
148
148
|
static _$Eu(t, e) {
|
149
|
-
const
|
150
|
-
return
|
149
|
+
const i = e.attribute;
|
150
|
+
return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
|
151
151
|
}
|
152
152
|
constructor() {
|
153
153
|
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
@@ -166,8 +166,8 @@ let k = class extends HTMLElement {
|
|
166
166
|
}
|
167
167
|
_$ES() {
|
168
168
|
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
169
|
-
for (const
|
170
|
-
this.hasOwnProperty(
|
169
|
+
for (const i of e.keys())
|
170
|
+
this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
|
171
171
|
t.size > 0 && (this._$Ep = t);
|
172
172
|
}
|
173
173
|
createRenderRoot() {
|
@@ -177,8 +177,8 @@ let k = class extends HTMLElement {
|
|
177
177
|
connectedCallback() {
|
178
178
|
var t;
|
179
179
|
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$E_) == null || t.forEach((e) => {
|
180
|
-
var
|
181
|
-
return (
|
180
|
+
var i;
|
181
|
+
return (i = e.hostConnected) == null ? void 0 : i.call(e);
|
182
182
|
});
|
183
183
|
}
|
184
184
|
enableUpdating(t) {
|
@@ -186,39 +186,39 @@ let k = class extends HTMLElement {
|
|
186
186
|
disconnectedCallback() {
|
187
187
|
var t;
|
188
188
|
(t = this._$E_) == null || t.forEach((e) => {
|
189
|
-
var
|
190
|
-
return (
|
189
|
+
var i;
|
190
|
+
return (i = e.hostDisconnected) == null ? void 0 : i.call(e);
|
191
191
|
});
|
192
192
|
}
|
193
|
-
attributeChangedCallback(t, e,
|
194
|
-
this._$AK(t,
|
193
|
+
attributeChangedCallback(t, e, i) {
|
194
|
+
this._$AK(t, i);
|
195
195
|
}
|
196
196
|
_$EO(t, e) {
|
197
197
|
var n;
|
198
|
-
const
|
199
|
-
if (
|
200
|
-
const o = (((n =
|
201
|
-
this._$Em = t, o == null ? this.removeAttribute(
|
198
|
+
const i = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, i);
|
199
|
+
if (s !== void 0 && i.reflect === !0) {
|
200
|
+
const o = (((n = i.converter) == null ? void 0 : n.toAttribute) !== void 0 ? i.converter : dt).toAttribute(e, i.type);
|
201
|
+
this._$Em = t, o == null ? this.removeAttribute(s) : this.setAttribute(s, o), this._$Em = null;
|
202
202
|
}
|
203
203
|
}
|
204
204
|
_$AK(t, e) {
|
205
205
|
var n;
|
206
|
-
const
|
207
|
-
if (
|
208
|
-
const o =
|
209
|
-
this._$Em =
|
206
|
+
const i = this.constructor, s = i._$Eh.get(t);
|
207
|
+
if (s !== void 0 && this._$Em !== s) {
|
208
|
+
const o = i.getPropertyOptions(s), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : dt;
|
209
|
+
this._$Em = s, this[s] = a.fromAttribute(e, o.type), this._$Em = null;
|
210
210
|
}
|
211
211
|
}
|
212
|
-
requestUpdate(t, e,
|
212
|
+
requestUpdate(t, e, i, s = !1, n) {
|
213
213
|
if (t !== void 0) {
|
214
|
-
if (
|
214
|
+
if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? qt)(s ? n : this[t], e))
|
215
215
|
return;
|
216
|
-
this.C(t, e,
|
216
|
+
this.C(t, e, i);
|
217
217
|
}
|
218
218
|
this.isUpdatePending === !1 && (this._$Eg = this._$EP());
|
219
219
|
}
|
220
|
-
C(t, e,
|
221
|
-
this._$AL.has(t) || this._$AL.set(t, e),
|
220
|
+
C(t, e, i) {
|
221
|
+
this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
|
222
222
|
}
|
223
223
|
async _$EP() {
|
224
224
|
this.isUpdatePending = !0;
|
@@ -234,7 +234,7 @@ let k = class extends HTMLElement {
|
|
234
234
|
return this.performUpdate();
|
235
235
|
}
|
236
236
|
performUpdate() {
|
237
|
-
var
|
237
|
+
var i;
|
238
238
|
if (!this.isUpdatePending)
|
239
239
|
return;
|
240
240
|
if (!this.hasUpdated) {
|
@@ -243,20 +243,20 @@ let k = class extends HTMLElement {
|
|
243
243
|
this[n] = o;
|
244
244
|
this._$Ep = void 0;
|
245
245
|
}
|
246
|
-
const
|
247
|
-
if (
|
248
|
-
for (const [n, o] of
|
246
|
+
const s = this.constructor.elementProperties;
|
247
|
+
if (s.size > 0)
|
248
|
+
for (const [n, o] of s)
|
249
249
|
o.wrapped !== !0 || this._$AL.has(n) || this[n] === void 0 || this.C(n, this[n], o);
|
250
250
|
}
|
251
251
|
let t = !1;
|
252
252
|
const e = this._$AL;
|
253
253
|
try {
|
254
|
-
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (
|
254
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$E_) == null || i.forEach((s) => {
|
255
255
|
var n;
|
256
|
-
return (n =
|
256
|
+
return (n = s.hostUpdate) == null ? void 0 : n.call(s);
|
257
257
|
}), this.update(e)) : this._$ET();
|
258
|
-
} catch (
|
259
|
-
throw t = !1, this._$ET(),
|
258
|
+
} catch (s) {
|
259
|
+
throw t = !1, this._$ET(), s;
|
260
260
|
}
|
261
261
|
t && this._$AE(e);
|
262
262
|
}
|
@@ -264,9 +264,9 @@ let k = class extends HTMLElement {
|
|
264
264
|
}
|
265
265
|
_$AE(t) {
|
266
266
|
var e;
|
267
|
-
(e = this._$E_) == null || e.forEach((
|
268
|
-
var
|
269
|
-
return (
|
267
|
+
(e = this._$E_) == null || e.forEach((i) => {
|
268
|
+
var s;
|
269
|
+
return (s = i.hostUpdated) == null ? void 0 : s.call(i);
|
270
270
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
271
271
|
}
|
272
272
|
_$ET() {
|
@@ -289,14 +289,14 @@ let k = class extends HTMLElement {
|
|
289
289
|
firstUpdated(t) {
|
290
290
|
}
|
291
291
|
};
|
292
|
-
|
292
|
+
M.elementStyles = [], M.shadowRootOptions = { mode: "open" }, M[I("elementProperties")] = /* @__PURE__ */ new Map(), M[I("finalized")] = /* @__PURE__ */ new Map(), rt == null || rt({ ReactiveElement: M }), (E.reactiveElementVersions ?? (E.reactiveElementVersions = [])).push("2.0.2");
|
293
293
|
/**
|
294
294
|
* @license
|
295
295
|
* Copyright 2017 Google LLC
|
296
296
|
* SPDX-License-Identifier: BSD-3-Clause
|
297
297
|
*/
|
298
298
|
const V = globalThis, Y = V.trustedTypes, Et = Y ? Y.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, Xt = "$lit$", y = `lit$${(Math.random() + "").slice(9)}$`, Kt = "?" + y, ve = `<${Kt}>`, U = document, Q = () => U.createComment(""), B = (r) => r === null || typeof r != "object" && typeof r != "function", Jt = Array.isArray, ye = (r) => Jt(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", nt = `[
|
299
|
-
\f\r]`,
|
299
|
+
\f\r]`, L = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, bt = /-->/g, St = />/g, S = RegExp(`>|${nt}(?:([^\\s"'>=/]+)(${nt}*=${nt}*(?:[^
|
300
300
|
\f\r"'\`<>=]|("|')|))|$)`, "g"), wt = /'/g, Pt = /"/g, Ft = /^(?:script|style|textarea|title)$/i, W = Symbol.for("lit-noChange"), _ = Symbol.for("lit-nothing"), Ct = /* @__PURE__ */ new WeakMap(), C = U.createTreeWalker(U, 129);
|
301
301
|
function Gt(r, t) {
|
302
302
|
if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
|
@@ -304,69 +304,69 @@ function Gt(r, t) {
|
|
304
304
|
return Et !== void 0 ? Et.createHTML(t) : t;
|
305
305
|
}
|
306
306
|
const Ae = (r, t) => {
|
307
|
-
const e = r.length - 1,
|
308
|
-
let
|
307
|
+
const e = r.length - 1, i = [];
|
308
|
+
let s, n = t === 2 ? "<svg>" : "", o = L;
|
309
309
|
for (let a = 0; a < e; a++) {
|
310
310
|
const h = r[a];
|
311
311
|
let c, d, l = -1, p = 0;
|
312
312
|
for (; p < h.length && (o.lastIndex = p, d = o.exec(h), d !== null); )
|
313
|
-
p = o.lastIndex, o ===
|
313
|
+
p = o.lastIndex, o === L ? d[1] === "!--" ? o = bt : d[1] !== void 0 ? o = St : d[2] !== void 0 ? (Ft.test(d[2]) && (s = RegExp("</" + d[2], "g")), o = S) : d[3] !== void 0 && (o = S) : o === S ? d[0] === ">" ? (o = s ?? L, l = -1) : d[1] === void 0 ? l = -2 : (l = o.lastIndex - d[2].length, c = d[1], o = d[3] === void 0 ? S : d[3] === '"' ? Pt : wt) : o === Pt || o === wt ? o = S : o === bt || o === St ? o = L : (o = S, s = void 0);
|
314
314
|
const u = o === S && r[a + 1].startsWith("/>") ? " " : "";
|
315
|
-
n += o ===
|
315
|
+
n += o === L ? h + ve : l >= 0 ? (i.push(c), h.slice(0, l) + Xt + h.slice(l) + y + u) : h + y + (l === -2 ? a : u);
|
316
316
|
}
|
317
|
-
return [Gt(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")),
|
317
|
+
return [Gt(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
|
318
318
|
};
|
319
319
|
let pt = class Zt {
|
320
|
-
constructor({ strings: t, _$litType$: e },
|
321
|
-
let
|
320
|
+
constructor({ strings: t, _$litType$: e }, i) {
|
321
|
+
let s;
|
322
322
|
this.parts = [];
|
323
323
|
let n = 0, o = 0;
|
324
324
|
const a = t.length - 1, h = this.parts, [c, d] = Ae(t, e);
|
325
|
-
if (this.el = Zt.createElement(c,
|
325
|
+
if (this.el = Zt.createElement(c, i), C.currentNode = this.el.content, e === 2) {
|
326
326
|
const l = this.el.content.firstChild;
|
327
327
|
l.replaceWith(...l.childNodes);
|
328
328
|
}
|
329
|
-
for (; (
|
330
|
-
if (
|
331
|
-
if (
|
332
|
-
for (const l of
|
329
|
+
for (; (s = C.nextNode()) !== null && h.length < a; ) {
|
330
|
+
if (s.nodeType === 1) {
|
331
|
+
if (s.hasAttributes())
|
332
|
+
for (const l of s.getAttributeNames())
|
333
333
|
if (l.endsWith(Xt)) {
|
334
|
-
const p = d[o++], u =
|
335
|
-
h.push({ type: 1, index: n, name: g[2], strings: u, ctor: g[1] === "." ? be : g[1] === "?" ? Se : g[1] === "@" ? we :
|
334
|
+
const p = d[o++], u = s.getAttribute(l).split(y), g = /([.?@])?(.*)/.exec(p);
|
335
|
+
h.push({ type: 1, index: n, name: g[2], strings: u, ctor: g[1] === "." ? be : g[1] === "?" ? Se : g[1] === "@" ? we : it }), s.removeAttribute(l);
|
336
336
|
} else
|
337
|
-
l.startsWith(y) && (h.push({ type: 6, index: n }),
|
338
|
-
if (Ft.test(
|
339
|
-
const l =
|
337
|
+
l.startsWith(y) && (h.push({ type: 6, index: n }), s.removeAttribute(l));
|
338
|
+
if (Ft.test(s.tagName)) {
|
339
|
+
const l = s.textContent.split(y), p = l.length - 1;
|
340
340
|
if (p > 0) {
|
341
|
-
|
341
|
+
s.textContent = Y ? Y.emptyScript : "";
|
342
342
|
for (let u = 0; u < p; u++)
|
343
|
-
|
344
|
-
|
343
|
+
s.append(l[u], Q()), C.nextNode(), h.push({ type: 2, index: ++n });
|
344
|
+
s.append(l[p], Q());
|
345
345
|
}
|
346
346
|
}
|
347
|
-
} else if (
|
348
|
-
if (
|
347
|
+
} else if (s.nodeType === 8)
|
348
|
+
if (s.data === Kt)
|
349
349
|
h.push({ type: 2, index: n });
|
350
350
|
else {
|
351
351
|
let l = -1;
|
352
|
-
for (; (l =
|
352
|
+
for (; (l = s.data.indexOf(y, l + 1)) !== -1; )
|
353
353
|
h.push({ type: 7, index: n }), l += y.length - 1;
|
354
354
|
}
|
355
355
|
n++;
|
356
356
|
}
|
357
357
|
}
|
358
358
|
static createElement(t, e) {
|
359
|
-
const
|
360
|
-
return
|
359
|
+
const i = U.createElement("template");
|
360
|
+
return i.innerHTML = t, i;
|
361
361
|
}
|
362
362
|
};
|
363
|
-
function H(r, t, e = r,
|
363
|
+
function H(r, t, e = r, i) {
|
364
364
|
var o, a;
|
365
365
|
if (t === W)
|
366
366
|
return t;
|
367
|
-
let
|
367
|
+
let s = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
|
368
368
|
const n = B(t) ? void 0 : t._$litDirective$;
|
369
|
-
return (
|
369
|
+
return (s == null ? void 0 : s.constructor) !== n && ((a = s == null ? void 0 : s._$AO) == null || a.call(s, !1), n === void 0 ? s = void 0 : (s = new n(r), s._$AT(r, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = s : e._$Cl = s), s !== void 0 && (t = H(r, s._$AS(r, t.values), s, i)), t;
|
370
370
|
}
|
371
371
|
let Ee = class {
|
372
372
|
constructor(t, e) {
|
@@ -379,30 +379,30 @@ let Ee = class {
|
|
379
379
|
return this._$AM._$AU;
|
380
380
|
}
|
381
381
|
u(t) {
|
382
|
-
const { el: { content: e }, parts:
|
383
|
-
C.currentNode =
|
384
|
-
let n = C.nextNode(), o = 0, a = 0, h =
|
382
|
+
const { el: { content: e }, parts: i } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? U).importNode(e, !0);
|
383
|
+
C.currentNode = s;
|
384
|
+
let n = C.nextNode(), o = 0, a = 0, h = i[0];
|
385
385
|
for (; h !== void 0; ) {
|
386
386
|
if (o === h.index) {
|
387
387
|
let c;
|
388
|
-
h.type === 2 ? c = new Yt(n, n.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(n, h.name, h.strings, this, t) : h.type === 6 && (c = new Pe(n, this, t)), this._$AV.push(c), h =
|
388
|
+
h.type === 2 ? c = new Yt(n, n.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(n, h.name, h.strings, this, t) : h.type === 6 && (c = new Pe(n, this, t)), this._$AV.push(c), h = i[++a];
|
389
389
|
}
|
390
390
|
o !== (h == null ? void 0 : h.index) && (n = C.nextNode(), o++);
|
391
391
|
}
|
392
|
-
return C.currentNode = U,
|
392
|
+
return C.currentNode = U, s;
|
393
393
|
}
|
394
394
|
p(t) {
|
395
395
|
let e = 0;
|
396
|
-
for (const
|
397
|
-
|
396
|
+
for (const i of this._$AV)
|
397
|
+
i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
398
398
|
}
|
399
399
|
}, Yt = class Qt {
|
400
400
|
get _$AU() {
|
401
401
|
var t;
|
402
402
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
403
403
|
}
|
404
|
-
constructor(t, e,
|
405
|
-
this.type = 2, this._$AH = _, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM =
|
404
|
+
constructor(t, e, i, s) {
|
405
|
+
this.type = 2, this._$AH = _, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = s, this._$Cv = (s == null ? void 0 : s.isConnected) ?? !0;
|
406
406
|
}
|
407
407
|
get parentNode() {
|
408
408
|
let t = this._$AA.parentNode;
|
@@ -429,11 +429,11 @@ let Ee = class {
|
|
429
429
|
}
|
430
430
|
g(t) {
|
431
431
|
var n;
|
432
|
-
const { values: e, _$litType$:
|
433
|
-
if (((n = this._$AH) == null ? void 0 : n._$AD) ===
|
432
|
+
const { values: e, _$litType$: i } = t, s = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = pt.createElement(Gt(i.h, i.h[0]), this.options)), i);
|
433
|
+
if (((n = this._$AH) == null ? void 0 : n._$AD) === s)
|
434
434
|
this._$AH.p(e);
|
435
435
|
else {
|
436
|
-
const o = new Ee(
|
436
|
+
const o = new Ee(s, this), a = o.u(this.options);
|
437
437
|
o.p(e), this.$(a), this._$AH = o;
|
438
438
|
}
|
439
439
|
}
|
@@ -444,33 +444,33 @@ let Ee = class {
|
|
444
444
|
T(t) {
|
445
445
|
Jt(this._$AH) || (this._$AH = [], this._$AR());
|
446
446
|
const e = this._$AH;
|
447
|
-
let
|
447
|
+
let i, s = 0;
|
448
448
|
for (const n of t)
|
449
|
-
|
450
|
-
|
449
|
+
s === e.length ? e.push(i = new Qt(this.k(Q()), this.k(Q()), this, this.options)) : i = e[s], i._$AI(n), s++;
|
450
|
+
s < e.length && (this._$AR(i && i._$AB.nextSibling, s), e.length = s);
|
451
451
|
}
|
452
452
|
_$AR(t = this._$AA.nextSibling, e) {
|
453
|
-
var
|
454
|
-
for ((
|
455
|
-
const
|
456
|
-
t.remove(), t =
|
453
|
+
var i;
|
454
|
+
for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
455
|
+
const s = t.nextSibling;
|
456
|
+
t.remove(), t = s;
|
457
457
|
}
|
458
458
|
}
|
459
459
|
setConnected(t) {
|
460
460
|
var e;
|
461
461
|
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
462
462
|
}
|
463
|
-
},
|
463
|
+
}, it = class {
|
464
464
|
get tagName() {
|
465
465
|
return this.element.tagName;
|
466
466
|
}
|
467
467
|
get _$AU() {
|
468
468
|
return this._$AM._$AU;
|
469
469
|
}
|
470
|
-
constructor(t, e,
|
471
|
-
this.type = 1, this._$AH = _, this._$AN = void 0, this.element = t, this.name = e, this._$AM =
|
470
|
+
constructor(t, e, i, s, n) {
|
471
|
+
this.type = 1, this._$AH = _, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = n, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = _;
|
472
472
|
}
|
473
|
-
_$AI(t, e = this,
|
473
|
+
_$AI(t, e = this, i, s) {
|
474
474
|
const n = this.strings;
|
475
475
|
let o = !1;
|
476
476
|
if (n === void 0)
|
@@ -479,44 +479,44 @@ let Ee = class {
|
|
479
479
|
const a = t;
|
480
480
|
let h, c;
|
481
481
|
for (t = n[0], h = 0; h < n.length - 1; h++)
|
482
|
-
c = H(this, a[
|
482
|
+
c = H(this, a[i + h], e, h), c === W && (c = this._$AH[h]), o || (o = !B(c) || c !== this._$AH[h]), c === _ ? t = _ : t !== _ && (t += (c ?? "") + n[h + 1]), this._$AH[h] = c;
|
483
483
|
}
|
484
|
-
o && !
|
484
|
+
o && !s && this.O(t);
|
485
485
|
}
|
486
486
|
O(t) {
|
487
487
|
t === _ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
488
488
|
}
|
489
|
-
}, be = class extends
|
489
|
+
}, be = class extends it {
|
490
490
|
constructor() {
|
491
491
|
super(...arguments), this.type = 3;
|
492
492
|
}
|
493
493
|
O(t) {
|
494
494
|
this.element[this.name] = t === _ ? void 0 : t;
|
495
495
|
}
|
496
|
-
}, Se = class extends
|
496
|
+
}, Se = class extends it {
|
497
497
|
constructor() {
|
498
498
|
super(...arguments), this.type = 4;
|
499
499
|
}
|
500
500
|
O(t) {
|
501
501
|
this.element.toggleAttribute(this.name, !!t && t !== _);
|
502
502
|
}
|
503
|
-
}, we = class extends
|
504
|
-
constructor(t, e,
|
505
|
-
super(t, e,
|
503
|
+
}, we = class extends it {
|
504
|
+
constructor(t, e, i, s, n) {
|
505
|
+
super(t, e, i, s, n), this.type = 5;
|
506
506
|
}
|
507
507
|
_$AI(t, e = this) {
|
508
508
|
if ((t = H(this, t, e, 0) ?? _) === W)
|
509
509
|
return;
|
510
|
-
const
|
511
|
-
|
510
|
+
const i = this._$AH, s = t === _ && i !== _ || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, n = t !== _ && (i === _ || s);
|
511
|
+
s && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
512
512
|
}
|
513
513
|
handleEvent(t) {
|
514
514
|
var e;
|
515
515
|
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
516
516
|
}
|
517
517
|
}, Pe = class {
|
518
|
-
constructor(t, e,
|
519
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options =
|
518
|
+
constructor(t, e, i) {
|
519
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
520
520
|
}
|
521
521
|
get _$AU() {
|
522
522
|
return this._$AM._$AU;
|
@@ -534,8 +534,8 @@ ot == null || ot(pt, Yt), (V.litHtmlVersions ?? (V.litHtmlVersions = [])).push("
|
|
534
534
|
*/
|
535
535
|
const Z = globalThis, $t = Z.ShadowRoot && (Z.ShadyCSS === void 0 || Z.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, te = Symbol(), Tt = /* @__PURE__ */ new WeakMap();
|
536
536
|
let Ce = class {
|
537
|
-
constructor(t, e,
|
538
|
-
if (this._$cssResult$ = !0,
|
537
|
+
constructor(t, e, i) {
|
538
|
+
if (this._$cssResult$ = !0, i !== te)
|
539
539
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
540
540
|
this.cssText = t, this.t = e;
|
541
541
|
}
|
@@ -543,8 +543,8 @@ let Ce = class {
|
|
543
543
|
let t = this.o;
|
544
544
|
const e = this.t;
|
545
545
|
if ($t && t === void 0) {
|
546
|
-
const
|
547
|
-
|
546
|
+
const i = e !== void 0 && e.length === 1;
|
547
|
+
i && (t = Tt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Tt.set(e, t));
|
548
548
|
}
|
549
549
|
return t;
|
550
550
|
}
|
@@ -557,13 +557,13 @@ const Te = (r) => new Ce(typeof r == "string" ? r : r + "", void 0, te), Ue = (r
|
|
557
557
|
r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
558
558
|
else
|
559
559
|
for (const e of t) {
|
560
|
-
const
|
561
|
-
|
560
|
+
const i = document.createElement("style"), s = Z.litNonce;
|
561
|
+
s !== void 0 && i.setAttribute("nonce", s), i.textContent = e.cssText, r.appendChild(i);
|
562
562
|
}
|
563
563
|
}, Ut = $t ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
|
564
564
|
let e = "";
|
565
|
-
for (const
|
566
|
-
e +=
|
565
|
+
for (const i of t.cssRules)
|
566
|
+
e += i.cssText;
|
567
567
|
return Te(e);
|
568
568
|
})(r) : r;
|
569
569
|
/**
|
@@ -571,10 +571,10 @@ const Te = (r) => new Ce(typeof r == "string" ? r : r + "", void 0, te), Ue = (r
|
|
571
571
|
* Copyright 2017 Google LLC
|
572
572
|
* SPDX-License-Identifier: BSD-3-Clause
|
573
573
|
*/
|
574
|
-
const { is: Re, defineProperty: xe, getOwnPropertyDescriptor: He, getOwnPropertyNames: Oe, getOwnPropertySymbols: Ne, getPrototypeOf:
|
574
|
+
const { is: Re, defineProperty: xe, getOwnPropertyDescriptor: He, getOwnPropertyNames: Oe, getOwnPropertySymbols: Ne, getPrototypeOf: Me } = Object, b = globalThis, Rt = b.trustedTypes, Le = Rt ? Rt.emptyScript : "", ht = b.reactiveElementPolyfillSupport, D = (r, t) => r, ut = { toAttribute(r, t) {
|
575
575
|
switch (t) {
|
576
576
|
case Boolean:
|
577
|
-
r = r ?
|
577
|
+
r = r ? Le : null;
|
578
578
|
break;
|
579
579
|
case Object:
|
580
580
|
case Array:
|
@@ -610,21 +610,21 @@ class x extends HTMLElement {
|
|
610
610
|
}
|
611
611
|
static createProperty(t, e = xt) {
|
612
612
|
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
613
|
-
const
|
614
|
-
|
613
|
+
const i = Symbol(), s = this.getPropertyDescriptor(t, i, e);
|
614
|
+
s !== void 0 && xe(this.prototype, t, s);
|
615
615
|
}
|
616
616
|
}
|
617
|
-
static getPropertyDescriptor(t, e,
|
618
|
-
const { get:
|
617
|
+
static getPropertyDescriptor(t, e, i) {
|
618
|
+
const { get: s, set: n } = He(this.prototype, t) ?? { get() {
|
619
619
|
return this[e];
|
620
620
|
}, set(o) {
|
621
621
|
this[e] = o;
|
622
622
|
} };
|
623
623
|
return { get() {
|
624
|
-
return
|
624
|
+
return s == null ? void 0 : s.call(this);
|
625
625
|
}, set(o) {
|
626
|
-
const a =
|
627
|
-
n.call(this, o), this.requestUpdate(t, a,
|
626
|
+
const a = s == null ? void 0 : s.call(this);
|
627
|
+
n.call(this, o), this.requestUpdate(t, a, i);
|
628
628
|
}, configurable: !0, enumerable: !0 };
|
629
629
|
}
|
630
630
|
static getPropertyOptions(t) {
|
@@ -633,44 +633,44 @@ class x extends HTMLElement {
|
|
633
633
|
static _$Ei() {
|
634
634
|
if (this.hasOwnProperty(D("elementProperties")))
|
635
635
|
return;
|
636
|
-
const t =
|
636
|
+
const t = Me(this);
|
637
637
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
638
638
|
}
|
639
639
|
static finalize() {
|
640
640
|
if (this.hasOwnProperty(D("finalized")))
|
641
641
|
return;
|
642
642
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(D("properties"))) {
|
643
|
-
const e = this.properties,
|
644
|
-
for (const
|
645
|
-
this.createProperty(
|
643
|
+
const e = this.properties, i = [...Oe(e), ...Ne(e)];
|
644
|
+
for (const s of i)
|
645
|
+
this.createProperty(s, e[s]);
|
646
646
|
}
|
647
647
|
const t = this[Symbol.metadata];
|
648
648
|
if (t !== null) {
|
649
649
|
const e = litPropertyMetadata.get(t);
|
650
650
|
if (e !== void 0)
|
651
|
-
for (const [
|
652
|
-
this.elementProperties.set(
|
651
|
+
for (const [i, s] of e)
|
652
|
+
this.elementProperties.set(i, s);
|
653
653
|
}
|
654
654
|
this._$Eh = /* @__PURE__ */ new Map();
|
655
|
-
for (const [e,
|
656
|
-
const
|
657
|
-
|
655
|
+
for (const [e, i] of this.elementProperties) {
|
656
|
+
const s = this._$Eu(e, i);
|
657
|
+
s !== void 0 && this._$Eh.set(s, e);
|
658
658
|
}
|
659
659
|
this.elementStyles = this.finalizeStyles(this.styles);
|
660
660
|
}
|
661
661
|
static finalizeStyles(t) {
|
662
662
|
const e = [];
|
663
663
|
if (Array.isArray(t)) {
|
664
|
-
const
|
665
|
-
for (const
|
666
|
-
e.unshift(Ut(
|
664
|
+
const i = new Set(t.flat(1 / 0).reverse());
|
665
|
+
for (const s of i)
|
666
|
+
e.unshift(Ut(s));
|
667
667
|
} else
|
668
668
|
t !== void 0 && e.push(Ut(t));
|
669
669
|
return e;
|
670
670
|
}
|
671
671
|
static _$Eu(t, e) {
|
672
|
-
const
|
673
|
-
return
|
672
|
+
const i = e.attribute;
|
673
|
+
return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
|
674
674
|
}
|
675
675
|
constructor() {
|
676
676
|
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
@@ -689,8 +689,8 @@ class x extends HTMLElement {
|
|
689
689
|
}
|
690
690
|
_$ES() {
|
691
691
|
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
692
|
-
for (const
|
693
|
-
this.hasOwnProperty(
|
692
|
+
for (const i of e.keys())
|
693
|
+
this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
|
694
694
|
t.size > 0 && (this._$Ep = t);
|
695
695
|
}
|
696
696
|
createRenderRoot() {
|
@@ -700,8 +700,8 @@ class x extends HTMLElement {
|
|
700
700
|
connectedCallback() {
|
701
701
|
var t;
|
702
702
|
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$E_) == null || t.forEach((e) => {
|
703
|
-
var
|
704
|
-
return (
|
703
|
+
var i;
|
704
|
+
return (i = e.hostConnected) == null ? void 0 : i.call(e);
|
705
705
|
});
|
706
706
|
}
|
707
707
|
enableUpdating(t) {
|
@@ -709,39 +709,39 @@ class x extends HTMLElement {
|
|
709
709
|
disconnectedCallback() {
|
710
710
|
var t;
|
711
711
|
(t = this._$E_) == null || t.forEach((e) => {
|
712
|
-
var
|
713
|
-
return (
|
712
|
+
var i;
|
713
|
+
return (i = e.hostDisconnected) == null ? void 0 : i.call(e);
|
714
714
|
});
|
715
715
|
}
|
716
|
-
attributeChangedCallback(t, e,
|
717
|
-
this._$AK(t,
|
716
|
+
attributeChangedCallback(t, e, i) {
|
717
|
+
this._$AK(t, i);
|
718
718
|
}
|
719
719
|
_$EO(t, e) {
|
720
720
|
var n;
|
721
|
-
const
|
722
|
-
if (
|
723
|
-
const o = (((n =
|
724
|
-
this._$Em = t, o == null ? this.removeAttribute(
|
721
|
+
const i = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, i);
|
722
|
+
if (s !== void 0 && i.reflect === !0) {
|
723
|
+
const o = (((n = i.converter) == null ? void 0 : n.toAttribute) !== void 0 ? i.converter : ut).toAttribute(e, i.type);
|
724
|
+
this._$Em = t, o == null ? this.removeAttribute(s) : this.setAttribute(s, o), this._$Em = null;
|
725
725
|
}
|
726
726
|
}
|
727
727
|
_$AK(t, e) {
|
728
728
|
var n;
|
729
|
-
const
|
730
|
-
if (
|
731
|
-
const o =
|
732
|
-
this._$Em =
|
729
|
+
const i = this.constructor, s = i._$Eh.get(t);
|
730
|
+
if (s !== void 0 && this._$Em !== s) {
|
731
|
+
const o = i.getPropertyOptions(s), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : ut;
|
732
|
+
this._$Em = s, this[s] = a.fromAttribute(e, o.type), this._$Em = null;
|
733
733
|
}
|
734
734
|
}
|
735
|
-
requestUpdate(t, e,
|
735
|
+
requestUpdate(t, e, i, s = !1, n) {
|
736
736
|
if (t !== void 0) {
|
737
|
-
if (
|
737
|
+
if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? ee)(s ? n : this[t], e))
|
738
738
|
return;
|
739
|
-
this.C(t, e,
|
739
|
+
this.C(t, e, i);
|
740
740
|
}
|
741
741
|
this.isUpdatePending === !1 && (this._$Eg = this._$EP());
|
742
742
|
}
|
743
|
-
C(t, e,
|
744
|
-
this._$AL.has(t) || this._$AL.set(t, e),
|
743
|
+
C(t, e, i) {
|
744
|
+
this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
|
745
745
|
}
|
746
746
|
async _$EP() {
|
747
747
|
this.isUpdatePending = !0;
|
@@ -757,7 +757,7 @@ class x extends HTMLElement {
|
|
757
757
|
return this.performUpdate();
|
758
758
|
}
|
759
759
|
performUpdate() {
|
760
|
-
var
|
760
|
+
var i;
|
761
761
|
if (!this.isUpdatePending)
|
762
762
|
return;
|
763
763
|
if (!this.hasUpdated) {
|
@@ -766,20 +766,20 @@ class x extends HTMLElement {
|
|
766
766
|
this[n] = o;
|
767
767
|
this._$Ep = void 0;
|
768
768
|
}
|
769
|
-
const
|
770
|
-
if (
|
771
|
-
for (const [n, o] of
|
769
|
+
const s = this.constructor.elementProperties;
|
770
|
+
if (s.size > 0)
|
771
|
+
for (const [n, o] of s)
|
772
772
|
o.wrapped !== !0 || this._$AL.has(n) || this[n] === void 0 || this.C(n, this[n], o);
|
773
773
|
}
|
774
774
|
let t = !1;
|
775
775
|
const e = this._$AL;
|
776
776
|
try {
|
777
|
-
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (
|
777
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$E_) == null || i.forEach((s) => {
|
778
778
|
var n;
|
779
|
-
return (n =
|
779
|
+
return (n = s.hostUpdate) == null ? void 0 : n.call(s);
|
780
780
|
}), this.update(e)) : this._$ET();
|
781
|
-
} catch (
|
782
|
-
throw t = !1, this._$ET(),
|
781
|
+
} catch (s) {
|
782
|
+
throw t = !1, this._$ET(), s;
|
783
783
|
}
|
784
784
|
t && this._$AE(e);
|
785
785
|
}
|
@@ -787,9 +787,9 @@ class x extends HTMLElement {
|
|
787
787
|
}
|
788
788
|
_$AE(t) {
|
789
789
|
var e;
|
790
|
-
(e = this._$E_) == null || e.forEach((
|
791
|
-
var
|
792
|
-
return (
|
790
|
+
(e = this._$E_) == null || e.forEach((i) => {
|
791
|
+
var s;
|
792
|
+
return (s = i.hostUpdated) == null ? void 0 : s.call(i);
|
793
793
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
794
794
|
}
|
795
795
|
_$ET() {
|
@@ -818,78 +818,78 @@ x.elementStyles = [], x.shadowRootOptions = { mode: "open" }, x[D("elementProper
|
|
818
818
|
* Copyright 2017 Google LLC
|
819
819
|
* SPDX-License-Identifier: BSD-3-Clause
|
820
820
|
*/
|
821
|
-
const z = globalThis, tt = z.trustedTypes, Ht = tt ? tt.createPolicy("lit-html", { createHTML: (r) => r }) : void 0,
|
822
|
-
\f\r]`,
|
823
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
821
|
+
const z = globalThis, tt = z.trustedTypes, Ht = tt ? tt.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, ie = "$lit$", A = `lit$${(Math.random() + "").slice(9)}$`, se = "?" + A, ke = `<${se}>`, R = document, q = () => R.createComment(""), X = (r) => r === null || typeof r != "object" && typeof r != "function", re = Array.isArray, Ie = (r) => re(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", at = `[
|
822
|
+
\f\r]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ot = /-->/g, Nt = />/g, w = RegExp(`>|${at}(?:([^\\s"'>=/]+)(${at}*=${at}*(?:[^
|
823
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Mt = /'/g, Lt = /"/g, ne = /^(?:script|style|textarea|title)$/i, Ve = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), De = Ve(1), O = Symbol.for("lit-noChange"), $ = Symbol.for("lit-nothing"), kt = /* @__PURE__ */ new WeakMap(), T = R.createTreeWalker(R, 129);
|
824
824
|
function oe(r, t) {
|
825
825
|
if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
|
826
826
|
throw Error("invalid template strings array");
|
827
827
|
return Ht !== void 0 ? Ht.createHTML(t) : t;
|
828
828
|
}
|
829
829
|
const ze = (r, t) => {
|
830
|
-
const e = r.length - 1,
|
831
|
-
let
|
830
|
+
const e = r.length - 1, i = [];
|
831
|
+
let s, n = t === 2 ? "<svg>" : "", o = k;
|
832
832
|
for (let a = 0; a < e; a++) {
|
833
833
|
const h = r[a];
|
834
834
|
let c, d, l = -1, p = 0;
|
835
835
|
for (; p < h.length && (o.lastIndex = p, d = o.exec(h), d !== null); )
|
836
|
-
p = o.lastIndex, o ===
|
836
|
+
p = o.lastIndex, o === k ? d[1] === "!--" ? o = Ot : d[1] !== void 0 ? o = Nt : d[2] !== void 0 ? (ne.test(d[2]) && (s = RegExp("</" + d[2], "g")), o = w) : d[3] !== void 0 && (o = w) : o === w ? d[0] === ">" ? (o = s ?? k, l = -1) : d[1] === void 0 ? l = -2 : (l = o.lastIndex - d[2].length, c = d[1], o = d[3] === void 0 ? w : d[3] === '"' ? Lt : Mt) : o === Lt || o === Mt ? o = w : o === Ot || o === Nt ? o = k : (o = w, s = void 0);
|
837
837
|
const u = o === w && r[a + 1].startsWith("/>") ? " " : "";
|
838
|
-
n += o ===
|
838
|
+
n += o === k ? h + ke : l >= 0 ? (i.push(c), h.slice(0, l) + ie + h.slice(l) + A + u) : h + A + (l === -2 ? a : u);
|
839
839
|
}
|
840
|
-
return [oe(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")),
|
840
|
+
return [oe(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
|
841
841
|
};
|
842
842
|
class K {
|
843
|
-
constructor({ strings: t, _$litType$: e },
|
844
|
-
let
|
843
|
+
constructor({ strings: t, _$litType$: e }, i) {
|
844
|
+
let s;
|
845
845
|
this.parts = [];
|
846
846
|
let n = 0, o = 0;
|
847
847
|
const a = t.length - 1, h = this.parts, [c, d] = ze(t, e);
|
848
|
-
if (this.el = K.createElement(c,
|
848
|
+
if (this.el = K.createElement(c, i), T.currentNode = this.el.content, e === 2) {
|
849
849
|
const l = this.el.content.firstChild;
|
850
850
|
l.replaceWith(...l.childNodes);
|
851
851
|
}
|
852
|
-
for (; (
|
853
|
-
if (
|
854
|
-
if (
|
855
|
-
for (const l of
|
856
|
-
if (l.endsWith(
|
857
|
-
const p = d[o++], u =
|
858
|
-
h.push({ type: 1, index: n, name: g[2], strings: u, ctor: g[1] === "." ? Be : g[1] === "?" ? We : g[1] === "@" ? qe :
|
852
|
+
for (; (s = T.nextNode()) !== null && h.length < a; ) {
|
853
|
+
if (s.nodeType === 1) {
|
854
|
+
if (s.hasAttributes())
|
855
|
+
for (const l of s.getAttributeNames())
|
856
|
+
if (l.endsWith(ie)) {
|
857
|
+
const p = d[o++], u = s.getAttribute(l).split(A), g = /([.?@])?(.*)/.exec(p);
|
858
|
+
h.push({ type: 1, index: n, name: g[2], strings: u, ctor: g[1] === "." ? Be : g[1] === "?" ? We : g[1] === "@" ? qe : st }), s.removeAttribute(l);
|
859
859
|
} else
|
860
|
-
l.startsWith(A) && (h.push({ type: 6, index: n }),
|
861
|
-
if (ne.test(
|
862
|
-
const l =
|
860
|
+
l.startsWith(A) && (h.push({ type: 6, index: n }), s.removeAttribute(l));
|
861
|
+
if (ne.test(s.tagName)) {
|
862
|
+
const l = s.textContent.split(A), p = l.length - 1;
|
863
863
|
if (p > 0) {
|
864
|
-
|
864
|
+
s.textContent = tt ? tt.emptyScript : "";
|
865
865
|
for (let u = 0; u < p; u++)
|
866
|
-
|
867
|
-
|
866
|
+
s.append(l[u], q()), T.nextNode(), h.push({ type: 2, index: ++n });
|
867
|
+
s.append(l[p], q());
|
868
868
|
}
|
869
869
|
}
|
870
|
-
} else if (
|
871
|
-
if (
|
870
|
+
} else if (s.nodeType === 8)
|
871
|
+
if (s.data === se)
|
872
872
|
h.push({ type: 2, index: n });
|
873
873
|
else {
|
874
874
|
let l = -1;
|
875
|
-
for (; (l =
|
875
|
+
for (; (l = s.data.indexOf(A, l + 1)) !== -1; )
|
876
876
|
h.push({ type: 7, index: n }), l += A.length - 1;
|
877
877
|
}
|
878
878
|
n++;
|
879
879
|
}
|
880
880
|
}
|
881
881
|
static createElement(t, e) {
|
882
|
-
const
|
883
|
-
return
|
882
|
+
const i = R.createElement("template");
|
883
|
+
return i.innerHTML = t, i;
|
884
884
|
}
|
885
885
|
}
|
886
|
-
function N(r, t, e = r,
|
886
|
+
function N(r, t, e = r, i) {
|
887
887
|
var o, a;
|
888
888
|
if (t === O)
|
889
889
|
return t;
|
890
|
-
let
|
890
|
+
let s = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
|
891
891
|
const n = X(t) ? void 0 : t._$litDirective$;
|
892
|
-
return (
|
892
|
+
return (s == null ? void 0 : s.constructor) !== n && ((a = s == null ? void 0 : s._$AO) == null || a.call(s, !1), n === void 0 ? s = void 0 : (s = new n(r), s._$AT(r, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = s : e._$Cl = s), s !== void 0 && (t = N(r, s._$AS(r, t.values), s, i)), t;
|
893
893
|
}
|
894
894
|
class je {
|
895
895
|
constructor(t, e) {
|
@@ -902,22 +902,22 @@ class je {
|
|
902
902
|
return this._$AM._$AU;
|
903
903
|
}
|
904
904
|
u(t) {
|
905
|
-
const { el: { content: e }, parts:
|
906
|
-
T.currentNode =
|
907
|
-
let n = T.nextNode(), o = 0, a = 0, h =
|
905
|
+
const { el: { content: e }, parts: i } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? R).importNode(e, !0);
|
906
|
+
T.currentNode = s;
|
907
|
+
let n = T.nextNode(), o = 0, a = 0, h = i[0];
|
908
908
|
for (; h !== void 0; ) {
|
909
909
|
if (o === h.index) {
|
910
910
|
let c;
|
911
|
-
h.type === 2 ? c = new J(n, n.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(n, h.name, h.strings, this, t) : h.type === 6 && (c = new Xe(n, this, t)), this._$AV.push(c), h =
|
911
|
+
h.type === 2 ? c = new J(n, n.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(n, h.name, h.strings, this, t) : h.type === 6 && (c = new Xe(n, this, t)), this._$AV.push(c), h = i[++a];
|
912
912
|
}
|
913
913
|
o !== (h == null ? void 0 : h.index) && (n = T.nextNode(), o++);
|
914
914
|
}
|
915
|
-
return T.currentNode = R,
|
915
|
+
return T.currentNode = R, s;
|
916
916
|
}
|
917
917
|
p(t) {
|
918
918
|
let e = 0;
|
919
|
-
for (const
|
920
|
-
|
919
|
+
for (const i of this._$AV)
|
920
|
+
i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
921
921
|
}
|
922
922
|
}
|
923
923
|
class J {
|
@@ -925,8 +925,8 @@ class J {
|
|
925
925
|
var t;
|
926
926
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
927
927
|
}
|
928
|
-
constructor(t, e,
|
929
|
-
this.type = 2, this._$AH = $, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM =
|
928
|
+
constructor(t, e, i, s) {
|
929
|
+
this.type = 2, this._$AH = $, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = s, this._$Cv = (s == null ? void 0 : s.isConnected) ?? !0;
|
930
930
|
}
|
931
931
|
get parentNode() {
|
932
932
|
let t = this._$AA.parentNode;
|
@@ -940,7 +940,7 @@ class J {
|
|
940
940
|
return this._$AB;
|
941
941
|
}
|
942
942
|
_$AI(t, e = this) {
|
943
|
-
t = N(this, t, e), X(t) ? t === $ || t == null || t === "" ? (this._$AH !== $ && this._$AR(), this._$AH = $) : t !== this._$AH && t !== O && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) :
|
943
|
+
t = N(this, t, e), X(t) ? t === $ || t == null || t === "" ? (this._$AH !== $ && this._$AR(), this._$AH = $) : t !== this._$AH && t !== O && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : Ie(t) ? this.T(t) : this._(t);
|
944
944
|
}
|
945
945
|
k(t) {
|
946
946
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
@@ -953,31 +953,31 @@ class J {
|
|
953
953
|
}
|
954
954
|
g(t) {
|
955
955
|
var n;
|
956
|
-
const { values: e, _$litType$:
|
957
|
-
if (((n = this._$AH) == null ? void 0 : n._$AD) ===
|
956
|
+
const { values: e, _$litType$: i } = t, s = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = K.createElement(oe(i.h, i.h[0]), this.options)), i);
|
957
|
+
if (((n = this._$AH) == null ? void 0 : n._$AD) === s)
|
958
958
|
this._$AH.p(e);
|
959
959
|
else {
|
960
|
-
const o = new je(
|
960
|
+
const o = new je(s, this), a = o.u(this.options);
|
961
961
|
o.p(e), this.$(a), this._$AH = o;
|
962
962
|
}
|
963
963
|
}
|
964
964
|
_$AC(t) {
|
965
|
-
let e =
|
966
|
-
return e === void 0 &&
|
965
|
+
let e = kt.get(t.strings);
|
966
|
+
return e === void 0 && kt.set(t.strings, e = new K(t)), e;
|
967
967
|
}
|
968
968
|
T(t) {
|
969
969
|
re(this._$AH) || (this._$AH = [], this._$AR());
|
970
970
|
const e = this._$AH;
|
971
|
-
let
|
971
|
+
let i, s = 0;
|
972
972
|
for (const n of t)
|
973
|
-
|
974
|
-
|
973
|
+
s === e.length ? e.push(i = new J(this.k(q()), this.k(q()), this, this.options)) : i = e[s], i._$AI(n), s++;
|
974
|
+
s < e.length && (this._$AR(i && i._$AB.nextSibling, s), e.length = s);
|
975
975
|
}
|
976
976
|
_$AR(t = this._$AA.nextSibling, e) {
|
977
|
-
var
|
978
|
-
for ((
|
979
|
-
const
|
980
|
-
t.remove(), t =
|
977
|
+
var i;
|
978
|
+
for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
979
|
+
const s = t.nextSibling;
|
980
|
+
t.remove(), t = s;
|
981
981
|
}
|
982
982
|
}
|
983
983
|
setConnected(t) {
|
@@ -985,17 +985,17 @@ class J {
|
|
985
985
|
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
986
986
|
}
|
987
987
|
}
|
988
|
-
class
|
988
|
+
class st {
|
989
989
|
get tagName() {
|
990
990
|
return this.element.tagName;
|
991
991
|
}
|
992
992
|
get _$AU() {
|
993
993
|
return this._$AM._$AU;
|
994
994
|
}
|
995
|
-
constructor(t, e,
|
996
|
-
this.type = 1, this._$AH = $, this._$AN = void 0, this.element = t, this.name = e, this._$AM =
|
995
|
+
constructor(t, e, i, s, n) {
|
996
|
+
this.type = 1, this._$AH = $, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = n, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = $;
|
997
997
|
}
|
998
|
-
_$AI(t, e = this,
|
998
|
+
_$AI(t, e = this, i, s) {
|
999
999
|
const n = this.strings;
|
1000
1000
|
let o = !1;
|
1001
1001
|
if (n === void 0)
|
@@ -1004,15 +1004,15 @@ class it {
|
|
1004
1004
|
const a = t;
|
1005
1005
|
let h, c;
|
1006
1006
|
for (t = n[0], h = 0; h < n.length - 1; h++)
|
1007
|
-
c = N(this, a[
|
1007
|
+
c = N(this, a[i + h], e, h), c === O && (c = this._$AH[h]), o || (o = !X(c) || c !== this._$AH[h]), c === $ ? t = $ : t !== $ && (t += (c ?? "") + n[h + 1]), this._$AH[h] = c;
|
1008
1008
|
}
|
1009
|
-
o && !
|
1009
|
+
o && !s && this.O(t);
|
1010
1010
|
}
|
1011
1011
|
O(t) {
|
1012
1012
|
t === $ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
1013
1013
|
}
|
1014
1014
|
}
|
1015
|
-
class Be extends
|
1015
|
+
class Be extends st {
|
1016
1016
|
constructor() {
|
1017
1017
|
super(...arguments), this.type = 3;
|
1018
1018
|
}
|
@@ -1020,7 +1020,7 @@ class Be extends it {
|
|
1020
1020
|
this.element[this.name] = t === $ ? void 0 : t;
|
1021
1021
|
}
|
1022
1022
|
}
|
1023
|
-
class We extends
|
1023
|
+
class We extends st {
|
1024
1024
|
constructor() {
|
1025
1025
|
super(...arguments), this.type = 4;
|
1026
1026
|
}
|
@@ -1028,15 +1028,15 @@ class We extends it {
|
|
1028
1028
|
this.element.toggleAttribute(this.name, !!t && t !== $);
|
1029
1029
|
}
|
1030
1030
|
}
|
1031
|
-
class qe extends
|
1032
|
-
constructor(t, e,
|
1033
|
-
super(t, e,
|
1031
|
+
class qe extends st {
|
1032
|
+
constructor(t, e, i, s, n) {
|
1033
|
+
super(t, e, i, s, n), this.type = 5;
|
1034
1034
|
}
|
1035
1035
|
_$AI(t, e = this) {
|
1036
1036
|
if ((t = N(this, t, e, 0) ?? $) === O)
|
1037
1037
|
return;
|
1038
|
-
const
|
1039
|
-
|
1038
|
+
const i = this._$AH, s = t === $ && i !== $ || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, n = t !== $ && (i === $ || s);
|
1039
|
+
s && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
1040
1040
|
}
|
1041
1041
|
handleEvent(t) {
|
1042
1042
|
var e;
|
@@ -1044,8 +1044,8 @@ class qe extends it {
|
|
1044
1044
|
}
|
1045
1045
|
}
|
1046
1046
|
class Xe {
|
1047
|
-
constructor(t, e,
|
1048
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options =
|
1047
|
+
constructor(t, e, i) {
|
1048
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
1049
1049
|
}
|
1050
1050
|
get _$AU() {
|
1051
1051
|
return this._$AM._$AU;
|
@@ -1057,13 +1057,13 @@ class Xe {
|
|
1057
1057
|
const lt = z.litHtmlPolyfillSupport;
|
1058
1058
|
lt == null || lt(K, J), (z.litHtmlVersions ?? (z.litHtmlVersions = [])).push("3.1.0");
|
1059
1059
|
const Ke = (r, t, e) => {
|
1060
|
-
const
|
1061
|
-
let
|
1062
|
-
if (
|
1060
|
+
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
1061
|
+
let s = i._$litPart$;
|
1062
|
+
if (s === void 0) {
|
1063
1063
|
const n = (e == null ? void 0 : e.renderBefore) ?? null;
|
1064
|
-
|
1064
|
+
i._$litPart$ = s = new J(t.insertBefore(q(), n), n, void 0, e ?? {});
|
1065
1065
|
}
|
1066
|
-
return
|
1066
|
+
return s._$AI(r), s;
|
1067
1067
|
};
|
1068
1068
|
/**
|
1069
1069
|
* @license
|
@@ -1101,11 +1101,11 @@ const ct = globalThis.litElementPolyfillSupport;
|
|
1101
1101
|
ct == null || ct({ LitElement: j });
|
1102
1102
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.2");
|
1103
1103
|
function Je(r, t, e) {
|
1104
|
-
function s
|
1105
|
-
e.dispatchEvent(new CustomEvent(
|
1104
|
+
function i(s) {
|
1105
|
+
e.dispatchEvent(new CustomEvent(s.type, s));
|
1106
1106
|
}
|
1107
|
-
return t.addEventListener(r,
|
1108
|
-
t.removeEventListener(r,
|
1107
|
+
return t.addEventListener(r, i), () => {
|
1108
|
+
t.removeEventListener(r, i);
|
1109
1109
|
};
|
1110
1110
|
}
|
1111
1111
|
class Fe {
|
@@ -1128,84 +1128,84 @@ class Fe {
|
|
1128
1128
|
}), this._cleanup = [];
|
1129
1129
|
}
|
1130
1130
|
}
|
1131
|
-
const
|
1131
|
+
const It = "https://d2rxhdlm2q91uk.cloudfront.net", Ge = "https://d1ix11aj5kfygl.cloudfront.net", Ze = "https://d157jlwnudd93d.cloudfront.net", Vt = "https://bshyfw4h5a.execute-api.ap-southeast-2.amazonaws.com/dev", Ye = "https://gyzw7rpbq3.execute-api.ap-southeast-2.amazonaws.com/staging", Qe = "https://vfcjuim1l3.execute-api.ap-southeast-2.amazonaws.com/prod", ti = "http://localhost:6060/v2", ei = "https://embed-dev.vouchfor.com/v2", ii = "https://embed-staging.vouchfor.com/v2", si = "https://embed.vouchfor.com/v2";
|
1132
1132
|
function et(r) {
|
1133
1133
|
if (!["local", "dev", "staging", "prod"].includes(r))
|
1134
1134
|
throw new Error(`Unknown environment: ${r}`);
|
1135
1135
|
if (r === "local")
|
1136
1136
|
return {
|
1137
|
-
videoUrl:
|
1137
|
+
videoUrl: It,
|
1138
1138
|
publicApiUrl: Vt,
|
1139
|
-
embedApiUrl:
|
1139
|
+
embedApiUrl: ti
|
1140
1140
|
};
|
1141
1141
|
if (r === "dev")
|
1142
1142
|
return {
|
1143
|
-
videoUrl:
|
1143
|
+
videoUrl: It,
|
1144
1144
|
publicApiUrl: Vt,
|
1145
|
-
embedApiUrl:
|
1145
|
+
embedApiUrl: ei
|
1146
1146
|
};
|
1147
1147
|
if (r === "staging")
|
1148
1148
|
return {
|
1149
1149
|
videoUrl: Ge,
|
1150
1150
|
publicApiUrl: Ye,
|
1151
|
-
embedApiUrl:
|
1151
|
+
embedApiUrl: ii
|
1152
1152
|
};
|
1153
1153
|
if (r === "prod")
|
1154
1154
|
return {
|
1155
1155
|
videoUrl: Ze,
|
1156
1156
|
publicApiUrl: Qe,
|
1157
|
-
embedApiUrl:
|
1157
|
+
embedApiUrl: si
|
1158
1158
|
};
|
1159
1159
|
}
|
1160
|
-
class
|
1160
|
+
class ri {
|
1161
1161
|
constructor(t) {
|
1162
|
-
this._fetching = !1, this.getVouch = async (e,
|
1162
|
+
this._fetching = !1, this.getVouch = async (e, i, s) => {
|
1163
1163
|
var d;
|
1164
|
-
const { embedApiUrl: n } = et(e), o = P(), a = await fetch(`${n}/vouches/${
|
1164
|
+
const { embedApiUrl: n } = et(e), o = P(), a = await fetch(`${n}/vouches/${s}`, {
|
1165
1165
|
method: "GET",
|
1166
1166
|
headers: [
|
1167
|
-
["X-Api-Key",
|
1167
|
+
["X-Api-Key", i],
|
1168
1168
|
["X-Cache-Check", o]
|
1169
1169
|
]
|
1170
1170
|
}), h = await a.json();
|
1171
|
-
this.host.dispatchEvent(new CustomEvent("vouch:loaded", { detail:
|
1171
|
+
this.host.dispatchEvent(new CustomEvent("vouch:loaded", { detail: s }));
|
1172
1172
|
const c = (d = a == null ? void 0 : a.headers) == null ? void 0 : d.get("X-Cache-Check");
|
1173
|
-
return c && c !== o && fetch(`${n}/vouches/${
|
1173
|
+
return c && c !== o && fetch(`${n}/vouches/${s}`, {
|
1174
1174
|
method: "GET",
|
1175
1175
|
headers: [
|
1176
|
-
["X-Api-Key",
|
1176
|
+
["X-Api-Key", i],
|
1177
1177
|
["Cache-Control", "max-age=0"]
|
1178
1178
|
]
|
1179
1179
|
}), h;
|
1180
|
-
}, this.getTemplate = async (e,
|
1180
|
+
}, this.getTemplate = async (e, i, s) => {
|
1181
1181
|
var d;
|
1182
|
-
const { embedApiUrl: n } = et(e), o = P(), a = await fetch(`${n}/templates/${
|
1182
|
+
const { embedApiUrl: n } = et(e), o = P(), a = await fetch(`${n}/templates/${s}`, {
|
1183
1183
|
method: "GET",
|
1184
1184
|
headers: [
|
1185
|
-
["X-Api-Key",
|
1185
|
+
["X-Api-Key", i],
|
1186
1186
|
["X-Cache-Check", o]
|
1187
1187
|
]
|
1188
1188
|
}), h = await a.json(), c = (d = a == null ? void 0 : a.headers) == null ? void 0 : d.get("X-Cache-Check");
|
1189
|
-
return c && c !== o && fetch(`${n}/templates/${
|
1189
|
+
return c && c !== o && fetch(`${n}/templates/${s}`, {
|
1190
1190
|
method: "GET",
|
1191
1191
|
headers: [
|
1192
|
-
["X-Api-Key",
|
1192
|
+
["X-Api-Key", i],
|
1193
1193
|
["Cache-Control", "max-age=0"]
|
1194
1194
|
]
|
1195
1195
|
}), h;
|
1196
1196
|
}, this.host = t, new ae(
|
1197
1197
|
this.host,
|
1198
|
-
async ([e,
|
1198
|
+
async ([e, i, s, n, o]) => {
|
1199
1199
|
var a, h, c, d;
|
1200
1200
|
try {
|
1201
|
-
if (t.vouch = void 0, t.template = void 0,
|
1201
|
+
if (t.vouch = void 0, t.template = void 0, s) {
|
1202
1202
|
let l;
|
1203
|
-
o && (this.fetching = !0, l = await this.getTemplate(e,
|
1203
|
+
o && (this.fetching = !0, l = await this.getTemplate(e, i, o)), t.vouch = s, t.template = l ?? ((h = (a = s == null ? void 0 : s.settings) == null ? void 0 : a.template) == null ? void 0 : h.instance);
|
1204
1204
|
} else if (n) {
|
1205
1205
|
this.fetching = !0;
|
1206
1206
|
const [l, p] = await Promise.all([
|
1207
|
-
this.getVouch(e,
|
1208
|
-
o ? this.getTemplate(e,
|
1207
|
+
this.getVouch(e, i, n),
|
1208
|
+
o ? this.getTemplate(e, i, o) : null
|
1209
1209
|
]);
|
1210
1210
|
t.vouch = l, t.template = p ?? ((d = (c = l == null ? void 0 : l.settings) == null ? void 0 : c.template) == null ? void 0 : d.instance);
|
1211
1211
|
}
|
@@ -1223,39 +1223,39 @@ class rs {
|
|
1223
1223
|
return this._fetching;
|
1224
1224
|
}
|
1225
1225
|
}
|
1226
|
-
const
|
1227
|
-
class
|
1226
|
+
const ni = 10;
|
1227
|
+
class oi {
|
1228
1228
|
constructor(t) {
|
1229
|
-
this._tabId = void 0, this._clientId = void 0, this._visitorId = void 0, this._hasPlayed = !1, this._hasLoaded = {}, this._answersViewed = {}, this._streamedTime = {}, this.
|
1230
|
-
var
|
1231
|
-
const { publicApiUrl:
|
1232
|
-
return (n = (
|
1229
|
+
this._tabId = void 0, this._clientId = void 0, this._visitorId = void 0, this._hasPlayed = !1, this._hasLoaded = {}, this._answersViewed = {}, this._streamedTime = {}, this._streamLatestTime = {}, this._createVisitor = (e) => {
|
1230
|
+
var s, n;
|
1231
|
+
const { publicApiUrl: i } = et(this.host.env);
|
1232
|
+
return (n = (s = window.localStorage) == null ? void 0 : s.setItem) == null || n.call(s, "vouch-uid-visitor", e), navigator.sendBeacon(`${i}/api/visitor`, JSON.stringify({ visitorId: e })), e;
|
1233
1233
|
}, this._getReportingMetadata = () => {
|
1234
1234
|
var n, o;
|
1235
|
-
const [e,
|
1235
|
+
const [e, i] = ((o = (n = Intl.DateTimeFormat().resolvedOptions().timeZone) == null ? void 0 : n.split) == null ? void 0 : o.call(n, "/")) ?? [], s = {};
|
1236
1236
|
return [...new URLSearchParams(location.search).entries()].forEach(([a, h]) => {
|
1237
1237
|
if (/utm/.test(a)) {
|
1238
1238
|
const c = a.toLowerCase().replace(/[-_][a-z0-9]/g, (d) => d.slice(-1).toUpperCase());
|
1239
|
-
|
1239
|
+
s[c] = h;
|
1240
1240
|
}
|
1241
1241
|
}), {
|
1242
1242
|
source: this.host.trackingSource,
|
1243
1243
|
time: /* @__PURE__ */ new Date(),
|
1244
|
-
region:
|
1244
|
+
region: i,
|
1245
1245
|
country: e,
|
1246
1246
|
screenHeight: window.screen.height,
|
1247
1247
|
screenWidth: window.screen.width,
|
1248
1248
|
referrer: document.referrer,
|
1249
1249
|
currentUrl: location.href,
|
1250
|
-
...
|
1250
|
+
...s
|
1251
1251
|
};
|
1252
|
-
}, this._sendTrackingEvent = (e,
|
1253
|
-
const { publicApiUrl:
|
1254
|
-
this.host.
|
1255
|
-
`${
|
1252
|
+
}, this._sendTrackingEvent = (e, i) => {
|
1253
|
+
const { publicApiUrl: s } = et(this.host.env), { client: n, tab: o, request: a, visitor: h } = this._getUids();
|
1254
|
+
this.host.disableTracking || navigator.sendBeacon(
|
1255
|
+
`${s}/api/events`,
|
1256
1256
|
JSON.stringify({
|
1257
1257
|
event: e,
|
1258
|
-
payload:
|
1258
|
+
payload: i,
|
1259
1259
|
context: {
|
1260
1260
|
"x-uid-client": n,
|
1261
1261
|
"x-uid-tab": o,
|
@@ -1275,34 +1275,31 @@ class os {
|
|
1275
1275
|
vouchId: e,
|
1276
1276
|
streamStart: this.host.currentTime
|
1277
1277
|
}), this._hasPlayed = !0));
|
1278
|
-
}, this._handleVideoPlay = ({ detail: { id: e, node: s } }) => {
|
1279
|
-
const
|
1280
|
-
|
1281
|
-
vouchId:
|
1278
|
+
}, this._handleVideoPlay = ({ detail: { id: e, key: i, node: s } }) => {
|
1279
|
+
const n = this._findVouchId();
|
1280
|
+
n && (this._answersViewed[i] || (this._sendTrackingEvent("VOUCH_RESPONSE_VIEWED", {
|
1281
|
+
vouchId: n,
|
1282
1282
|
answerId: e
|
1283
|
-
}), this._answersViewed[
|
1284
|
-
}, this._handleVideoTimeUpdate = ({ detail: { id: e, node: s } }) => {
|
1283
|
+
}), this._answersViewed[i] = !0), this._streamedTime[i] = s.currentTime, this._streamLatestTime[i] = s.currentTime);
|
1284
|
+
}, this._handleVideoTimeUpdate = ({ detail: { id: e, key: i, node: s } }) => {
|
1285
1285
|
var o, a;
|
1286
|
-
const
|
1287
|
-
|
1288
|
-
return;
|
1289
|
-
const n = Date.now();
|
1290
|
-
s.currentTime && !s.paused && !this.host.paused && // Only fire the video seeked event when this video is the active one
|
1286
|
+
const n = this._findVouchId();
|
1287
|
+
n && (s.currentTime && !s.paused && !this.host.paused && // Only fire the video seeked event when this video is the active one
|
1291
1288
|
e === ((a = (o = this.host.scene) == null ? void 0 : o.video) == null ? void 0 : a.id) && // Throttle the frequency that we send streamed events while playing
|
1292
|
-
|
1293
|
-
vouchId:
|
1289
|
+
s.currentTime - this._streamedTime[i] > ni && (this._sendTrackingEvent("VIDEO_STREAMED", {
|
1290
|
+
vouchId: n,
|
1294
1291
|
answerId: e,
|
1295
|
-
streamStart: this._streamedTime[
|
1292
|
+
streamStart: this._streamedTime[i],
|
1296
1293
|
streamEnd: s.currentTime
|
1297
|
-
}), this._streamedTime[
|
1298
|
-
}, this._handleVideoPause = ({ detail: { id: e,
|
1299
|
-
const
|
1300
|
-
|
1301
|
-
vouchId:
|
1294
|
+
}), this._streamedTime[i] = s.currentTime), this.host.paused || (this._streamLatestTime[i] = s.currentTime));
|
1295
|
+
}, this._handleVideoPause = ({ detail: { id: e, key: i } }) => {
|
1296
|
+
const s = this._findVouchId();
|
1297
|
+
s && (this._streamLatestTime[i] > this._streamedTime[i] + 0.5 && this._sendTrackingEvent("VIDEO_STREAMED", {
|
1298
|
+
vouchId: s,
|
1302
1299
|
answerId: e,
|
1303
|
-
streamStart: this._streamedTime[
|
1304
|
-
streamEnd:
|
1305
|
-
}), delete this._streamedTime[
|
1300
|
+
streamStart: this._streamedTime[i],
|
1301
|
+
streamEnd: this._streamLatestTime[i]
|
1302
|
+
}), delete this._streamedTime[i], delete this._streamLatestTime[i]);
|
1306
1303
|
}, this.host = t, t.addController(this);
|
1307
1304
|
}
|
1308
1305
|
_findVouchId() {
|
@@ -1317,33 +1314,33 @@ class os {
|
|
1317
1314
|
tab: null,
|
1318
1315
|
request: P()
|
1319
1316
|
};
|
1320
|
-
const t = this._visitorId || ((o = (n = window.localStorage) == null ? void 0 : n.getItem) == null ? void 0 : o.call(n, "vouch-uid-visitor")) || this._createVisitor(P()), e = this._clientId || ((h = (a = window.localStorage) == null ? void 0 : a.getItem) == null ? void 0 : h.call(a, "vouch-uid-client")) || P(),
|
1321
|
-
return t !== this._visitorId && (this._visitorId = t, (p = (l = window.localStorage) == null ? void 0 : l.setItem) == null || p.call(l, "vouch-uid-visitor", t)), e !== this._clientId && (this._clientId = e, (g = (u = window.localStorage) == null ? void 0 : u.setItem) == null || g.call(u, "vouch-uid-client", e)),
|
1317
|
+
const t = this._visitorId || ((o = (n = window.localStorage) == null ? void 0 : n.getItem) == null ? void 0 : o.call(n, "vouch-uid-visitor")) || this._createVisitor(P()), e = this._clientId || ((h = (a = window.localStorage) == null ? void 0 : a.getItem) == null ? void 0 : h.call(a, "vouch-uid-client")) || P(), i = this._tabId || ((d = (c = window.sessionStorage) == null ? void 0 : c.getItem) == null ? void 0 : d.call(c, "vouch-uid-tab")) || P(), s = P();
|
1318
|
+
return t !== this._visitorId && (this._visitorId = t, (p = (l = window.localStorage) == null ? void 0 : l.setItem) == null || p.call(l, "vouch-uid-visitor", t)), e !== this._clientId && (this._clientId = e, (g = (u = window.localStorage) == null ? void 0 : u.setItem) == null || g.call(u, "vouch-uid-client", e)), i !== this._tabId && (this._tabId = i, (mt = (F = window.sessionStorage) == null ? void 0 : F.setItem) == null || mt.call(F, "vouch-uid-tab", i)), {
|
1322
1319
|
client: e,
|
1323
|
-
tab:
|
1324
|
-
request:
|
1320
|
+
tab: i,
|
1321
|
+
request: s,
|
1325
1322
|
visitor: t
|
1326
1323
|
};
|
1327
1324
|
}
|
1328
1325
|
hostConnected() {
|
1329
1326
|
requestAnimationFrame(() => {
|
1330
|
-
var t, e,
|
1331
|
-
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), (
|
1327
|
+
var t, e, i, s;
|
1328
|
+
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);
|
1332
1329
|
});
|
1333
1330
|
}
|
1334
1331
|
hostDisconnected() {
|
1335
|
-
var t, e,
|
1336
|
-
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), (
|
1332
|
+
var t, e, i, s;
|
1333
|
+
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);
|
1337
1334
|
}
|
1338
1335
|
}
|
1339
|
-
var
|
1340
|
-
for (var
|
1341
|
-
(o = r[n]) && (
|
1342
|
-
return
|
1336
|
+
var hi = Object.defineProperty, ai = Object.getOwnPropertyDescriptor, f = (r, t, e, i) => {
|
1337
|
+
for (var s = i > 1 ? void 0 : i ? ai(t, e) : t, n = r.length - 1, o; n >= 0; n--)
|
1338
|
+
(o = r[n]) && (s = (i ? o(t, e, s) : o(s)) || s);
|
1339
|
+
return i && s && hi(t, e, s), s;
|
1343
1340
|
};
|
1344
1341
|
let m = class extends j {
|
1345
1342
|
constructor() {
|
1346
|
-
super(...arguments), this._mediaPlayerRef = jt(), this.env = "prod", this.apiKey = "", this.
|
1343
|
+
super(...arguments), this._mediaPlayerRef = jt(), this.env = "prod", this.apiKey = "", this.disableTracking = !1, this.trackingSource = "embed", this.preload = "auto", this.autoplay = !1, this.aspectRatio = 0, this.eventController = new Fe(this, [
|
1347
1344
|
"durationchange",
|
1348
1345
|
"ended",
|
1349
1346
|
"error",
|
@@ -1360,6 +1357,7 @@ let m = class extends j {
|
|
1360
1357
|
"volumechange",
|
1361
1358
|
"waiting",
|
1362
1359
|
"video:loadeddata",
|
1360
|
+
"video:seeking",
|
1363
1361
|
"video:seeked",
|
1364
1362
|
"video:play",
|
1365
1363
|
"video:playing",
|
@@ -1368,7 +1366,7 @@ let m = class extends j {
|
|
1368
1366
|
"video:timeupdate",
|
1369
1367
|
"video:ended",
|
1370
1368
|
"video:error"
|
1371
|
-
]), this._fetcherController = new
|
1369
|
+
]), this._fetcherController = new ri(this), this._trackingController = new oi(this);
|
1372
1370
|
}
|
1373
1371
|
get fetching() {
|
1374
1372
|
return this._fetcherController.fetching;
|
@@ -1485,7 +1483,7 @@ f([
|
|
1485
1483
|
], m.prototype, "apiKey", 2);
|
1486
1484
|
f([
|
1487
1485
|
v({ type: Boolean })
|
1488
|
-
], m.prototype, "
|
1486
|
+
], m.prototype, "disableTracking", 2);
|
1489
1487
|
f([
|
1490
1488
|
v({ type: String })
|
1491
1489
|
], m.prototype, "trackingSource", 2);
|