@dreamsengine/dreams-ad-engine 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -0
- package/dist/dreams-ad-engine.js +1361 -436
- package/package.json +1 -1
- package/types/features/adblock/adblock.service.d.ts +45 -0
- package/types/features/adblock/adblock.types.d.ts +14 -0
- package/types/features/adblock/index.d.ts +2 -0
- package/types/features/config/config.types.d.ts +3 -1
- package/types/features/dreamsAdEngine/components/ad.component.d.ts +17 -0
- package/types/features/dreamsAdEngine/index.d.ts +1 -1
- package/types/features/dreamsAdEngine/types/interfaces.d.ts +5 -1
- package/types/features/index.d.ts +6 -0
- package/types/features/logging/index.d.ts +2 -0
- package/types/features/logging/logger.d.ts +56 -0
- package/types/features/refresh/index.d.ts +2 -0
- package/types/features/refresh/refresh.service.d.ts +46 -0
- package/types/features/refresh/refresh.types.d.ts +18 -0
- package/types/features/skeleton/index.d.ts +1 -0
- package/types/features/skeleton/skeleton.component.d.ts +20 -0
- package/types/features/sticky/index.d.ts +2 -0
- package/types/features/sticky/sticky.service.d.ts +38 -0
- package/types/features/sticky/sticky.types.d.ts +23 -0
- package/types/features/viewability/index.d.ts +2 -0
- package/types/features/viewability/viewability.service.d.ts +38 -0
- package/types/features/viewability/viewability.types.d.ts +22 -0
package/dist/dreams-ad-engine.js
CHANGED
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const
|
|
7
|
-
let
|
|
6
|
+
const W = globalThis, nt = W.ShadowRoot && (W.ShadyCSS === void 0 || W.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ot = Symbol(), ct = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
let It = class {
|
|
8
8
|
constructor(t, e, i) {
|
|
9
|
-
if (this._$cssResult$ = !0, i !==
|
|
9
|
+
if (this._$cssResult$ = !0, i !== ot) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
10
10
|
this.cssText = t, this.t = e;
|
|
11
11
|
}
|
|
12
12
|
get styleSheet() {
|
|
13
13
|
let t = this.o;
|
|
14
14
|
const e = this.t;
|
|
15
|
-
if (
|
|
15
|
+
if (nt && t === void 0) {
|
|
16
16
|
const i = e !== void 0 && e.length === 1;
|
|
17
|
-
i && (t =
|
|
17
|
+
i && (t = ct.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && ct.set(e, t));
|
|
18
18
|
}
|
|
19
19
|
return t;
|
|
20
20
|
}
|
|
@@ -22,26 +22,33 @@ let zt = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const
|
|
26
|
-
|
|
25
|
+
const Ut = (n) => new It(typeof n == "string" ? n : n + "", void 0, ot), qt = (n, ...t) => {
|
|
26
|
+
const e = n.length === 1 ? n[0] : t.reduce((i, s, r) => i + ((o) => {
|
|
27
|
+
if (o._$cssResult$ === !0) return o.cssText;
|
|
28
|
+
if (typeof o == "number") return o;
|
|
29
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
|
+
})(s) + n[r + 1], n[0]);
|
|
31
|
+
return new It(e, n, ot);
|
|
32
|
+
}, Wt = (n, t) => {
|
|
33
|
+
if (nt) n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
27
34
|
else for (const e of t) {
|
|
28
|
-
const i = document.createElement("style"), s =
|
|
35
|
+
const i = document.createElement("style"), s = W.litNonce;
|
|
29
36
|
s !== void 0 && i.setAttribute("nonce", s), i.textContent = e.cssText, n.appendChild(i);
|
|
30
37
|
}
|
|
31
|
-
},
|
|
38
|
+
}, ht = nt ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
|
|
32
39
|
let e = "";
|
|
33
40
|
for (const i of t.cssRules) e += i.cssText;
|
|
34
|
-
return
|
|
41
|
+
return Ut(e);
|
|
35
42
|
})(n) : n;
|
|
36
43
|
/**
|
|
37
44
|
* @license
|
|
38
45
|
* Copyright 2017 Google LLC
|
|
39
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
40
47
|
*/
|
|
41
|
-
const { is:
|
|
48
|
+
const { is: Gt, defineProperty: Jt, getOwnPropertyDescriptor: Kt, getOwnPropertyNames: Zt, getOwnPropertySymbols: Xt, getPrototypeOf: Yt } = Object, b = globalThis, pt = b.trustedTypes, Qt = pt ? pt.emptyScript : "", Q = b.reactiveElementPolyfillSupport, I = (n, t) => n, G = { toAttribute(n, t) {
|
|
42
49
|
switch (t) {
|
|
43
50
|
case Boolean:
|
|
44
|
-
n = n ?
|
|
51
|
+
n = n ? Qt : null;
|
|
45
52
|
break;
|
|
46
53
|
case Object:
|
|
47
54
|
case Array:
|
|
@@ -66,44 +73,44 @@ const { is: xt, defineProperty: It, getOwnPropertyDescriptor: Pt, getOwnProperty
|
|
|
66
73
|
}
|
|
67
74
|
}
|
|
68
75
|
return e;
|
|
69
|
-
} },
|
|
70
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
71
|
-
let
|
|
76
|
+
} }, rt = (n, t) => !Gt(n, t), ut = { attribute: !0, type: String, converter: G, reflect: !1, useDefault: !1, hasChanged: rt };
|
|
77
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), b.litPropertyMetadata ?? (b.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
|
+
let T = class extends HTMLElement {
|
|
72
79
|
static addInitializer(t) {
|
|
73
80
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
74
81
|
}
|
|
75
82
|
static get observedAttributes() {
|
|
76
83
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
77
84
|
}
|
|
78
|
-
static createProperty(t, e =
|
|
85
|
+
static createProperty(t, e = ut) {
|
|
79
86
|
if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
80
87
|
const i = Symbol(), s = this.getPropertyDescriptor(t, i, e);
|
|
81
|
-
s !== void 0 &&
|
|
88
|
+
s !== void 0 && Jt(this.prototype, t, s);
|
|
82
89
|
}
|
|
83
90
|
}
|
|
84
91
|
static getPropertyDescriptor(t, e, i) {
|
|
85
|
-
const { get: s, set:
|
|
92
|
+
const { get: s, set: r } = Kt(this.prototype, t) ?? { get() {
|
|
86
93
|
return this[e];
|
|
87
|
-
}, set(
|
|
88
|
-
this[e] =
|
|
94
|
+
}, set(o) {
|
|
95
|
+
this[e] = o;
|
|
89
96
|
} };
|
|
90
|
-
return { get: s, set(
|
|
91
|
-
const
|
|
92
|
-
|
|
97
|
+
return { get: s, set(o) {
|
|
98
|
+
const l = s == null ? void 0 : s.call(this);
|
|
99
|
+
r == null || r.call(this, o), this.requestUpdate(t, l, i);
|
|
93
100
|
}, configurable: !0, enumerable: !0 };
|
|
94
101
|
}
|
|
95
102
|
static getPropertyOptions(t) {
|
|
96
|
-
return this.elementProperties.get(t) ??
|
|
103
|
+
return this.elementProperties.get(t) ?? ut;
|
|
97
104
|
}
|
|
98
105
|
static _$Ei() {
|
|
99
|
-
if (this.hasOwnProperty(
|
|
100
|
-
const t =
|
|
106
|
+
if (this.hasOwnProperty(I("elementProperties"))) return;
|
|
107
|
+
const t = Yt(this);
|
|
101
108
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
102
109
|
}
|
|
103
110
|
static finalize() {
|
|
104
|
-
if (this.hasOwnProperty(
|
|
105
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
106
|
-
const e = this.properties, i = [...
|
|
111
|
+
if (this.hasOwnProperty(I("finalized"))) return;
|
|
112
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(I("properties"))) {
|
|
113
|
+
const e = this.properties, i = [...Zt(e), ...Xt(e)];
|
|
107
114
|
for (const s of i) this.createProperty(s, e[s]);
|
|
108
115
|
}
|
|
109
116
|
const t = this[Symbol.metadata];
|
|
@@ -122,8 +129,8 @@ let z = class extends HTMLElement {
|
|
|
122
129
|
const e = [];
|
|
123
130
|
if (Array.isArray(t)) {
|
|
124
131
|
const i = new Set(t.flat(1 / 0).reverse());
|
|
125
|
-
for (const s of i) e.unshift(
|
|
126
|
-
} else t !== void 0 && e.push(
|
|
132
|
+
for (const s of i) e.unshift(ht(s));
|
|
133
|
+
} else t !== void 0 && e.push(ht(t));
|
|
127
134
|
return e;
|
|
128
135
|
}
|
|
129
136
|
static _$Eu(t, e) {
|
|
@@ -152,7 +159,7 @@ let z = class extends HTMLElement {
|
|
|
152
159
|
}
|
|
153
160
|
createRenderRoot() {
|
|
154
161
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
155
|
-
return
|
|
162
|
+
return Wt(t, this.constructor.elementStyles), t;
|
|
156
163
|
}
|
|
157
164
|
connectedCallback() {
|
|
158
165
|
var t;
|
|
@@ -174,34 +181,34 @@ let z = class extends HTMLElement {
|
|
|
174
181
|
this._$AK(t, i);
|
|
175
182
|
}
|
|
176
183
|
_$ET(t, e) {
|
|
177
|
-
var
|
|
184
|
+
var r;
|
|
178
185
|
const i = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, i);
|
|
179
186
|
if (s !== void 0 && i.reflect === !0) {
|
|
180
|
-
const
|
|
181
|
-
this._$Em = t,
|
|
187
|
+
const o = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter : G).toAttribute(e, i.type);
|
|
188
|
+
this._$Em = t, o == null ? this.removeAttribute(s) : this.setAttribute(s, o), this._$Em = null;
|
|
182
189
|
}
|
|
183
190
|
}
|
|
184
191
|
_$AK(t, e) {
|
|
185
|
-
var
|
|
192
|
+
var r, o;
|
|
186
193
|
const i = this.constructor, s = i._$Eh.get(t);
|
|
187
194
|
if (s !== void 0 && this._$Em !== s) {
|
|
188
|
-
const
|
|
195
|
+
const l = i.getPropertyOptions(s), a = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((r = l.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? l.converter : G;
|
|
189
196
|
this._$Em = s;
|
|
190
|
-
const
|
|
191
|
-
this[s] =
|
|
197
|
+
const c = a.fromAttribute(e, l.type);
|
|
198
|
+
this[s] = c ?? ((o = this._$Ej) == null ? void 0 : o.get(s)) ?? c, this._$Em = null;
|
|
192
199
|
}
|
|
193
200
|
}
|
|
194
|
-
requestUpdate(t, e, i, s = !1,
|
|
195
|
-
var
|
|
201
|
+
requestUpdate(t, e, i, s = !1, r) {
|
|
202
|
+
var o;
|
|
196
203
|
if (t !== void 0) {
|
|
197
|
-
const
|
|
198
|
-
if (s === !1 && (
|
|
204
|
+
const l = this.constructor;
|
|
205
|
+
if (s === !1 && (r = this[t]), i ?? (i = l.getPropertyOptions(t)), !((i.hasChanged ?? rt)(r, e) || i.useDefault && i.reflect && r === ((o = this._$Ej) == null ? void 0 : o.get(t)) && !this.hasAttribute(l._$Eu(t, i)))) return;
|
|
199
206
|
this.C(t, e, i);
|
|
200
207
|
}
|
|
201
208
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
202
209
|
}
|
|
203
|
-
C(t, e, { useDefault: i, reflect: s, wrapped:
|
|
204
|
-
i && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t,
|
|
210
|
+
C(t, e, { useDefault: i, reflect: s, wrapped: r }, o) {
|
|
211
|
+
i && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t, o ?? e ?? this[t]), r !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (e = void 0), this._$AL.set(t, e)), s === !0 && this._$Em !== t && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t));
|
|
205
212
|
}
|
|
206
213
|
async _$EP() {
|
|
207
214
|
this.isUpdatePending = !0;
|
|
@@ -221,21 +228,21 @@ let z = class extends HTMLElement {
|
|
|
221
228
|
if (!this.isUpdatePending) return;
|
|
222
229
|
if (!this.hasUpdated) {
|
|
223
230
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
224
|
-
for (const [
|
|
231
|
+
for (const [r, o] of this._$Ep) this[r] = o;
|
|
225
232
|
this._$Ep = void 0;
|
|
226
233
|
}
|
|
227
234
|
const s = this.constructor.elementProperties;
|
|
228
|
-
if (s.size > 0) for (const [
|
|
229
|
-
const { wrapped:
|
|
230
|
-
|
|
235
|
+
if (s.size > 0) for (const [r, o] of s) {
|
|
236
|
+
const { wrapped: l } = o, a = this[r];
|
|
237
|
+
l !== !0 || this._$AL.has(r) || a === void 0 || this.C(r, void 0, o, a);
|
|
231
238
|
}
|
|
232
239
|
}
|
|
233
240
|
let t = !1;
|
|
234
241
|
const e = this._$AL;
|
|
235
242
|
try {
|
|
236
243
|
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$EO) == null || i.forEach((s) => {
|
|
237
|
-
var
|
|
238
|
-
return (
|
|
244
|
+
var r;
|
|
245
|
+
return (r = s.hostUpdate) == null ? void 0 : r.call(s);
|
|
239
246
|
}), this.update(e)) : this._$EM();
|
|
240
247
|
} catch (s) {
|
|
241
248
|
throw t = !1, this._$EM(), s;
|
|
@@ -271,76 +278,76 @@ let z = class extends HTMLElement {
|
|
|
271
278
|
firstUpdated(t) {
|
|
272
279
|
}
|
|
273
280
|
};
|
|
274
|
-
|
|
281
|
+
T.elementStyles = [], T.shadowRootOptions = { mode: "open" }, T[I("elementProperties")] = /* @__PURE__ */ new Map(), T[I("finalized")] = /* @__PURE__ */ new Map(), Q == null || Q({ ReactiveElement: T }), (b.reactiveElementVersions ?? (b.reactiveElementVersions = [])).push("2.1.2");
|
|
275
282
|
/**
|
|
276
283
|
* @license
|
|
277
284
|
* Copyright 2017 Google LLC
|
|
278
285
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
279
286
|
*/
|
|
280
|
-
const
|
|
281
|
-
\f\r]`,
|
|
282
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
283
|
-
function
|
|
284
|
-
if (!
|
|
285
|
-
return
|
|
287
|
+
const U = globalThis, gt = (n) => n, J = U.trustedTypes, ft = J ? J.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Ot = "$lit$", v = `lit$${Math.random().toFixed(9).slice(2)}$`, Dt = "?" + v, te = `<${Dt}>`, k = document, M = () => k.createComment(""), H = (n) => n === null || typeof n != "object" && typeof n != "function", at = Array.isArray, ee = (n) => at(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", tt = `[
|
|
288
|
+
\f\r]`, L = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, mt = /-->/g, wt = />/g, $ = RegExp(`>|${tt}(?:([^\\s"'>=/]+)(${tt}*=${tt}*(?:[^
|
|
289
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), yt = /'/g, vt = /"/g, Nt = /^(?:script|style|textarea|title)$/i, ie = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), y = ie(1), C = Symbol.for("lit-noChange"), f = Symbol.for("lit-nothing"), bt = /* @__PURE__ */ new WeakMap(), A = k.createTreeWalker(k, 129);
|
|
290
|
+
function Rt(n, t) {
|
|
291
|
+
if (!at(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
292
|
+
return ft !== void 0 ? ft.createHTML(t) : t;
|
|
286
293
|
}
|
|
287
|
-
const
|
|
294
|
+
const se = (n, t) => {
|
|
288
295
|
const e = n.length - 1, i = [];
|
|
289
|
-
let s,
|
|
290
|
-
for (let
|
|
291
|
-
const
|
|
292
|
-
let
|
|
293
|
-
for (;
|
|
294
|
-
const
|
|
295
|
-
|
|
296
|
-
}
|
|
297
|
-
return [
|
|
296
|
+
let s, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = L;
|
|
297
|
+
for (let l = 0; l < e; l++) {
|
|
298
|
+
const a = n[l];
|
|
299
|
+
let c, p, h = -1, m = 0;
|
|
300
|
+
for (; m < a.length && (o.lastIndex = m, p = o.exec(a), p !== null); ) m = o.lastIndex, o === L ? p[1] === "!--" ? o = mt : p[1] !== void 0 ? o = wt : p[2] !== void 0 ? (Nt.test(p[2]) && (s = RegExp("</" + p[2], "g")), o = $) : p[3] !== void 0 && (o = $) : o === $ ? p[0] === ">" ? (o = s ?? L, h = -1) : p[1] === void 0 ? h = -2 : (h = o.lastIndex - p[2].length, c = p[1], o = p[3] === void 0 ? $ : p[3] === '"' ? vt : yt) : o === vt || o === yt ? o = $ : o === mt || o === wt ? o = L : (o = $, s = void 0);
|
|
301
|
+
const w = o === $ && n[l + 1].startsWith("/>") ? " " : "";
|
|
302
|
+
r += o === L ? a + te : h >= 0 ? (i.push(c), a.slice(0, h) + Ot + a.slice(h) + v + w) : a + v + (h === -2 ? l : w);
|
|
303
|
+
}
|
|
304
|
+
return [Rt(n, r + (n[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
|
298
305
|
};
|
|
299
|
-
class
|
|
306
|
+
class V {
|
|
300
307
|
constructor({ strings: t, _$litType$: e }, i) {
|
|
301
308
|
let s;
|
|
302
309
|
this.parts = [];
|
|
303
|
-
let
|
|
304
|
-
const
|
|
305
|
-
if (this.el =
|
|
306
|
-
const
|
|
307
|
-
|
|
310
|
+
let r = 0, o = 0;
|
|
311
|
+
const l = t.length - 1, a = this.parts, [c, p] = se(t, e);
|
|
312
|
+
if (this.el = V.createElement(c, i), A.currentNode = this.el.content, e === 2 || e === 3) {
|
|
313
|
+
const h = this.el.content.firstChild;
|
|
314
|
+
h.replaceWith(...h.childNodes);
|
|
308
315
|
}
|
|
309
|
-
for (; (s =
|
|
316
|
+
for (; (s = A.nextNode()) !== null && a.length < l; ) {
|
|
310
317
|
if (s.nodeType === 1) {
|
|
311
|
-
if (s.hasAttributes()) for (const
|
|
312
|
-
const
|
|
313
|
-
|
|
314
|
-
} else
|
|
315
|
-
if (
|
|
316
|
-
const
|
|
317
|
-
if (
|
|
318
|
-
s.textContent =
|
|
319
|
-
for (let
|
|
320
|
-
s.append(
|
|
318
|
+
if (s.hasAttributes()) for (const h of s.getAttributeNames()) if (h.endsWith(Ot)) {
|
|
319
|
+
const m = p[o++], w = s.getAttribute(h).split(v), j = /([.?@])?(.*)/.exec(m);
|
|
320
|
+
a.push({ type: 1, index: r, name: j[2], strings: w, ctor: j[1] === "." ? oe : j[1] === "?" ? re : j[1] === "@" ? ae : Y }), s.removeAttribute(h);
|
|
321
|
+
} else h.startsWith(v) && (a.push({ type: 6, index: r }), s.removeAttribute(h));
|
|
322
|
+
if (Nt.test(s.tagName)) {
|
|
323
|
+
const h = s.textContent.split(v), m = h.length - 1;
|
|
324
|
+
if (m > 0) {
|
|
325
|
+
s.textContent = J ? J.emptyScript : "";
|
|
326
|
+
for (let w = 0; w < m; w++) s.append(h[w], M()), A.nextNode(), a.push({ type: 2, index: ++r });
|
|
327
|
+
s.append(h[m], M());
|
|
321
328
|
}
|
|
322
329
|
}
|
|
323
|
-
} else if (s.nodeType === 8) if (s.data ===
|
|
330
|
+
} else if (s.nodeType === 8) if (s.data === Dt) a.push({ type: 2, index: r });
|
|
324
331
|
else {
|
|
325
|
-
let
|
|
326
|
-
for (; (
|
|
332
|
+
let h = -1;
|
|
333
|
+
for (; (h = s.data.indexOf(v, h + 1)) !== -1; ) a.push({ type: 7, index: r }), h += v.length - 1;
|
|
327
334
|
}
|
|
328
|
-
|
|
335
|
+
r++;
|
|
329
336
|
}
|
|
330
337
|
}
|
|
331
338
|
static createElement(t, e) {
|
|
332
|
-
const i =
|
|
339
|
+
const i = k.createElement("template");
|
|
333
340
|
return i.innerHTML = t, i;
|
|
334
341
|
}
|
|
335
342
|
}
|
|
336
|
-
function
|
|
337
|
-
var
|
|
338
|
-
if (t ===
|
|
339
|
-
let s = i !== void 0 ? (
|
|
340
|
-
const
|
|
341
|
-
return (s == null ? void 0 : s.constructor) !==
|
|
343
|
+
function P(n, t, e = n, i) {
|
|
344
|
+
var o, l;
|
|
345
|
+
if (t === C) return t;
|
|
346
|
+
let s = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
|
|
347
|
+
const r = H(t) ? void 0 : t._$litDirective$;
|
|
348
|
+
return (s == null ? void 0 : s.constructor) !== r && ((l = s == null ? void 0 : s._$AO) == null || l.call(s, !1), r === void 0 ? s = void 0 : (s = new r(n), s._$AT(n, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = s : e._$Cl = s), s !== void 0 && (t = P(n, s._$AS(n, t.values), s, i)), t;
|
|
342
349
|
}
|
|
343
|
-
class
|
|
350
|
+
class ne {
|
|
344
351
|
constructor(t, e) {
|
|
345
352
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
346
353
|
}
|
|
@@ -351,30 +358,30 @@ class Ht {
|
|
|
351
358
|
return this._$AM._$AU;
|
|
352
359
|
}
|
|
353
360
|
u(t) {
|
|
354
|
-
const { el: { content: e }, parts: i } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ??
|
|
355
|
-
|
|
356
|
-
let
|
|
357
|
-
for (;
|
|
358
|
-
if (
|
|
359
|
-
let
|
|
360
|
-
|
|
361
|
+
const { el: { content: e }, parts: i } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? k).importNode(e, !0);
|
|
362
|
+
A.currentNode = s;
|
|
363
|
+
let r = A.nextNode(), o = 0, l = 0, a = i[0];
|
|
364
|
+
for (; a !== void 0; ) {
|
|
365
|
+
if (o === a.index) {
|
|
366
|
+
let c;
|
|
367
|
+
a.type === 2 ? c = new B(r, r.nextSibling, this, t) : a.type === 1 ? c = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (c = new le(r, this, t)), this._$AV.push(c), a = i[++l];
|
|
361
368
|
}
|
|
362
|
-
|
|
369
|
+
o !== (a == null ? void 0 : a.index) && (r = A.nextNode(), o++);
|
|
363
370
|
}
|
|
364
|
-
return
|
|
371
|
+
return A.currentNode = k, s;
|
|
365
372
|
}
|
|
366
373
|
p(t) {
|
|
367
374
|
let e = 0;
|
|
368
375
|
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
|
369
376
|
}
|
|
370
377
|
}
|
|
371
|
-
class
|
|
378
|
+
class B {
|
|
372
379
|
get _$AU() {
|
|
373
380
|
var t;
|
|
374
381
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
375
382
|
}
|
|
376
383
|
constructor(t, e, i, s) {
|
|
377
|
-
this.type = 2, this._$AH =
|
|
384
|
+
this.type = 2, this._$AH = f, 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;
|
|
378
385
|
}
|
|
379
386
|
get parentNode() {
|
|
380
387
|
let t = this._$AA.parentNode;
|
|
@@ -388,7 +395,7 @@ class H {
|
|
|
388
395
|
return this._$AB;
|
|
389
396
|
}
|
|
390
397
|
_$AI(t, e = this) {
|
|
391
|
-
t =
|
|
398
|
+
t = P(this, t, e), H(t) ? t === f || t == null || t === "" ? (this._$AH !== f && this._$AR(), this._$AH = f) : t !== this._$AH && t !== C && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : ee(t) ? this.k(t) : this._(t);
|
|
392
399
|
}
|
|
393
400
|
O(t) {
|
|
394
401
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -397,33 +404,33 @@ class H {
|
|
|
397
404
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
398
405
|
}
|
|
399
406
|
_(t) {
|
|
400
|
-
this._$AH !==
|
|
407
|
+
this._$AH !== f && H(this._$AH) ? this._$AA.nextSibling.data = t : this.T(k.createTextNode(t)), this._$AH = t;
|
|
401
408
|
}
|
|
402
409
|
$(t) {
|
|
403
|
-
var
|
|
404
|
-
const { values: e, _$litType$: i } = t, s = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el =
|
|
405
|
-
if (((
|
|
410
|
+
var r;
|
|
411
|
+
const { values: e, _$litType$: i } = t, s = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = V.createElement(Rt(i.h, i.h[0]), this.options)), i);
|
|
412
|
+
if (((r = this._$AH) == null ? void 0 : r._$AD) === s) this._$AH.p(e);
|
|
406
413
|
else {
|
|
407
|
-
const
|
|
408
|
-
|
|
414
|
+
const o = new ne(s, this), l = o.u(this.options);
|
|
415
|
+
o.p(e), this.T(l), this._$AH = o;
|
|
409
416
|
}
|
|
410
417
|
}
|
|
411
418
|
_$AC(t) {
|
|
412
|
-
let e =
|
|
413
|
-
return e === void 0 &&
|
|
419
|
+
let e = bt.get(t.strings);
|
|
420
|
+
return e === void 0 && bt.set(t.strings, e = new V(t)), e;
|
|
414
421
|
}
|
|
415
422
|
k(t) {
|
|
416
|
-
|
|
423
|
+
at(this._$AH) || (this._$AH = [], this._$AR());
|
|
417
424
|
const e = this._$AH;
|
|
418
425
|
let i, s = 0;
|
|
419
|
-
for (const
|
|
426
|
+
for (const r of t) s === e.length ? e.push(i = new B(this.O(M()), this.O(M()), this, this.options)) : i = e[s], i._$AI(r), s++;
|
|
420
427
|
s < e.length && (this._$AR(i && i._$AB.nextSibling, s), e.length = s);
|
|
421
428
|
}
|
|
422
429
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
423
430
|
var i;
|
|
424
431
|
for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, e); t !== this._$AB; ) {
|
|
425
|
-
const s =
|
|
426
|
-
|
|
432
|
+
const s = gt(t).nextSibling;
|
|
433
|
+
gt(t).remove(), t = s;
|
|
427
434
|
}
|
|
428
435
|
}
|
|
429
436
|
setConnected(t) {
|
|
@@ -431,62 +438,62 @@ class H {
|
|
|
431
438
|
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
|
432
439
|
}
|
|
433
440
|
}
|
|
434
|
-
class
|
|
441
|
+
class Y {
|
|
435
442
|
get tagName() {
|
|
436
443
|
return this.element.tagName;
|
|
437
444
|
}
|
|
438
445
|
get _$AU() {
|
|
439
446
|
return this._$AM._$AU;
|
|
440
447
|
}
|
|
441
|
-
constructor(t, e, i, s,
|
|
442
|
-
this.type = 1, this._$AH =
|
|
448
|
+
constructor(t, e, i, s, r) {
|
|
449
|
+
this.type = 1, this._$AH = f, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = f;
|
|
443
450
|
}
|
|
444
451
|
_$AI(t, e = this, i, s) {
|
|
445
|
-
const
|
|
446
|
-
let
|
|
447
|
-
if (
|
|
452
|
+
const r = this.strings;
|
|
453
|
+
let o = !1;
|
|
454
|
+
if (r === void 0) t = P(this, t, e, 0), o = !H(t) || t !== this._$AH && t !== C, o && (this._$AH = t);
|
|
448
455
|
else {
|
|
449
|
-
const
|
|
450
|
-
let
|
|
451
|
-
for (t =
|
|
456
|
+
const l = t;
|
|
457
|
+
let a, c;
|
|
458
|
+
for (t = r[0], a = 0; a < r.length - 1; a++) c = P(this, l[i + a], e, a), c === C && (c = this._$AH[a]), o || (o = !H(c) || c !== this._$AH[a]), c === f ? t = f : t !== f && (t += (c ?? "") + r[a + 1]), this._$AH[a] = c;
|
|
452
459
|
}
|
|
453
|
-
|
|
460
|
+
o && !s && this.j(t);
|
|
454
461
|
}
|
|
455
462
|
j(t) {
|
|
456
|
-
t ===
|
|
463
|
+
t === f ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
457
464
|
}
|
|
458
465
|
}
|
|
459
|
-
class
|
|
466
|
+
class oe extends Y {
|
|
460
467
|
constructor() {
|
|
461
468
|
super(...arguments), this.type = 3;
|
|
462
469
|
}
|
|
463
470
|
j(t) {
|
|
464
|
-
this.element[this.name] = t ===
|
|
471
|
+
this.element[this.name] = t === f ? void 0 : t;
|
|
465
472
|
}
|
|
466
473
|
}
|
|
467
|
-
class
|
|
474
|
+
class re extends Y {
|
|
468
475
|
constructor() {
|
|
469
476
|
super(...arguments), this.type = 4;
|
|
470
477
|
}
|
|
471
478
|
j(t) {
|
|
472
|
-
this.element.toggleAttribute(this.name, !!t && t !==
|
|
479
|
+
this.element.toggleAttribute(this.name, !!t && t !== f);
|
|
473
480
|
}
|
|
474
481
|
}
|
|
475
|
-
class
|
|
476
|
-
constructor(t, e, i, s,
|
|
477
|
-
super(t, e, i, s,
|
|
482
|
+
class ae extends Y {
|
|
483
|
+
constructor(t, e, i, s, r) {
|
|
484
|
+
super(t, e, i, s, r), this.type = 5;
|
|
478
485
|
}
|
|
479
486
|
_$AI(t, e = this) {
|
|
480
|
-
if ((t =
|
|
481
|
-
const i = this._$AH, s = t ===
|
|
482
|
-
s && this.element.removeEventListener(this.name, this, i),
|
|
487
|
+
if ((t = P(this, t, e, 0) ?? f) === C) return;
|
|
488
|
+
const i = this._$AH, s = t === f && i !== f || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, r = t !== f && (i === f || s);
|
|
489
|
+
s && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
483
490
|
}
|
|
484
491
|
handleEvent(t) {
|
|
485
492
|
var e;
|
|
486
493
|
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
487
494
|
}
|
|
488
495
|
}
|
|
489
|
-
class
|
|
496
|
+
class le {
|
|
490
497
|
constructor(t, e, i) {
|
|
491
498
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
|
492
499
|
}
|
|
@@ -494,17 +501,17 @@ class Bt {
|
|
|
494
501
|
return this._$AM._$AU;
|
|
495
502
|
}
|
|
496
503
|
_$AI(t) {
|
|
497
|
-
|
|
504
|
+
P(this, t);
|
|
498
505
|
}
|
|
499
506
|
}
|
|
500
|
-
const
|
|
501
|
-
|
|
502
|
-
const
|
|
507
|
+
const et = U.litHtmlPolyfillSupport;
|
|
508
|
+
et == null || et(V, B), (U.litHtmlVersions ?? (U.litHtmlVersions = [])).push("3.3.2");
|
|
509
|
+
const de = (n, t, e) => {
|
|
503
510
|
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
504
511
|
let s = i._$litPart$;
|
|
505
512
|
if (s === void 0) {
|
|
506
|
-
const
|
|
507
|
-
i._$litPart$ = s = new
|
|
513
|
+
const r = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
514
|
+
i._$litPart$ = s = new B(t.insertBefore(M(), r), r, void 0, e ?? {});
|
|
508
515
|
}
|
|
509
516
|
return s._$AI(n), s;
|
|
510
517
|
};
|
|
@@ -513,8 +520,8 @@ const Ft = (n, t, e) => {
|
|
|
513
520
|
* Copyright 2017 Google LLC
|
|
514
521
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
515
522
|
*/
|
|
516
|
-
const
|
|
517
|
-
class
|
|
523
|
+
const S = globalThis;
|
|
524
|
+
class z extends T {
|
|
518
525
|
constructor() {
|
|
519
526
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
520
527
|
}
|
|
@@ -525,7 +532,7 @@ class k extends z {
|
|
|
525
532
|
}
|
|
526
533
|
update(t) {
|
|
527
534
|
const e = this.render();
|
|
528
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
535
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = de(e, this.renderRoot, this.renderOptions);
|
|
529
536
|
}
|
|
530
537
|
connectedCallback() {
|
|
531
538
|
var t;
|
|
@@ -536,20 +543,20 @@ class k extends z {
|
|
|
536
543
|
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
537
544
|
}
|
|
538
545
|
render() {
|
|
539
|
-
return
|
|
546
|
+
return C;
|
|
540
547
|
}
|
|
541
548
|
}
|
|
542
|
-
var
|
|
543
|
-
|
|
544
|
-
const
|
|
545
|
-
|
|
546
|
-
(
|
|
549
|
+
var Lt;
|
|
550
|
+
z._$litElement$ = !0, z.finalized = !0, (Lt = S.litElementHydrateSupport) == null || Lt.call(S, { LitElement: z });
|
|
551
|
+
const it = S.litElementPolyfillSupport;
|
|
552
|
+
it == null || it({ LitElement: z });
|
|
553
|
+
(S.litElementVersions ?? (S.litElementVersions = [])).push("4.2.2");
|
|
547
554
|
/**
|
|
548
555
|
* @license
|
|
549
556
|
* Copyright 2017 Google LLC
|
|
550
557
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
551
558
|
*/
|
|
552
|
-
const
|
|
559
|
+
const Mt = (n) => (t, e) => {
|
|
553
560
|
e !== void 0 ? e.addInitializer(() => {
|
|
554
561
|
customElements.define(n, t);
|
|
555
562
|
}) : customElements.define(n, t);
|
|
@@ -559,31 +566,31 @@ const Wt = (n) => (t, e) => {
|
|
|
559
566
|
* Copyright 2017 Google LLC
|
|
560
567
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
561
568
|
*/
|
|
562
|
-
const
|
|
569
|
+
const ce = { attribute: !0, type: String, converter: G, reflect: !1, hasChanged: rt }, he = (n = ce, t, e) => {
|
|
563
570
|
const { kind: i, metadata: s } = e;
|
|
564
|
-
let
|
|
565
|
-
if (
|
|
566
|
-
const { name:
|
|
567
|
-
return { set(
|
|
568
|
-
const
|
|
569
|
-
t.set.call(this,
|
|
570
|
-
}, init(
|
|
571
|
-
return
|
|
571
|
+
let r = globalThis.litPropertyMetadata.get(s);
|
|
572
|
+
if (r === void 0 && globalThis.litPropertyMetadata.set(s, r = /* @__PURE__ */ new Map()), i === "setter" && ((n = Object.create(n)).wrapped = !0), r.set(e.name, n), i === "accessor") {
|
|
573
|
+
const { name: o } = e;
|
|
574
|
+
return { set(l) {
|
|
575
|
+
const a = t.get.call(this);
|
|
576
|
+
t.set.call(this, l), this.requestUpdate(o, a, n, !0, l);
|
|
577
|
+
}, init(l) {
|
|
578
|
+
return l !== void 0 && this.C(o, void 0, n, l), l;
|
|
572
579
|
} };
|
|
573
580
|
}
|
|
574
581
|
if (i === "setter") {
|
|
575
|
-
const { name:
|
|
576
|
-
return function(
|
|
577
|
-
const
|
|
578
|
-
t.call(this,
|
|
582
|
+
const { name: o } = e;
|
|
583
|
+
return function(l) {
|
|
584
|
+
const a = this[o];
|
|
585
|
+
t.call(this, l), this.requestUpdate(o, a, n, !0, l);
|
|
579
586
|
};
|
|
580
587
|
}
|
|
581
588
|
throw Error("Unsupported decorator location: " + i);
|
|
582
589
|
};
|
|
583
|
-
function
|
|
584
|
-
return (t, e) => typeof e == "object" ?
|
|
585
|
-
const
|
|
586
|
-
return s.constructor.createProperty(
|
|
590
|
+
function u(n) {
|
|
591
|
+
return (t, e) => typeof e == "object" ? he(n, t, e) : ((i, s, r) => {
|
|
592
|
+
const o = s.hasOwnProperty(r);
|
|
593
|
+
return s.constructor.createProperty(r, i), o ? Object.getOwnPropertyDescriptor(s, r) : void 0;
|
|
587
594
|
})(n, t, e);
|
|
588
595
|
}
|
|
589
596
|
/**
|
|
@@ -591,145 +598,224 @@ function g(n) {
|
|
|
591
598
|
* Copyright 2017 Google LLC
|
|
592
599
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
593
600
|
*/
|
|
594
|
-
function
|
|
595
|
-
return
|
|
601
|
+
function pe(n) {
|
|
602
|
+
return u({ ...n, state: !0, attribute: !1 });
|
|
596
603
|
}
|
|
597
604
|
/**
|
|
598
605
|
* @license
|
|
599
606
|
* Copyright 2021 Google LLC
|
|
600
607
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
601
608
|
*/
|
|
602
|
-
function
|
|
609
|
+
function $t(n, t, e) {
|
|
603
610
|
return n ? t(n) : e == null ? void 0 : e(n);
|
|
604
611
|
}
|
|
605
|
-
const
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
612
|
+
const ue = `:host {
|
|
613
|
+
display: var(--dae-display, block);
|
|
614
|
+
contain: var(--dae-contain, content);
|
|
615
|
+
min-height: var(--dae-min-heigh, 100px);
|
|
609
616
|
}
|
|
610
617
|
::slotted(*) {
|
|
611
|
-
|
|
612
|
-
|
|
618
|
+
display: var(--dae-slotted-display, block);
|
|
619
|
+
z-index: var(--dae-slotted-z-index, 9);
|
|
613
620
|
}
|
|
614
621
|
|
|
615
622
|
.ad-serving-rendered {
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
623
|
+
position: var(--dae-ad-serving-rendered-position, sticky);
|
|
624
|
+
z-index: var(--dae-ad-serving-rendered-z-index, 2);
|
|
625
|
+
top: var(--dae-ad-serving-rendered-top, 1rem);
|
|
619
626
|
}
|
|
620
627
|
|
|
621
628
|
.ad-container {
|
|
622
|
-
|
|
629
|
+
position: var(--dae-ad-container-position, relative);
|
|
623
630
|
}
|
|
624
631
|
.pinno-ad-container {
|
|
625
|
-
|
|
632
|
+
position: var(--dae-pinno-ad-container-position, relative);
|
|
626
633
|
}
|
|
627
634
|
.ad-label {
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
635
|
+
display: var(--dae-ad-label-display, block);
|
|
636
|
+
font-size: var(--dae-ad-label-font-size, 9px);
|
|
637
|
+
font-weight: var(--dae-ad-label-font-weight, 400);
|
|
638
|
+
letter-spacing: var(--dae-ad-label-letter-spacing, 0.2em);
|
|
639
|
+
margin-bottom: var(--dae-ad-label-margin-bottom, 4px);
|
|
640
|
+
line-height: var(--dae-ad-label-line-height, 1);
|
|
641
|
+
position: var(--dae-ad-label-position, relative);
|
|
642
|
+
text-align: var(--dae-ad-label-text-align, center);
|
|
643
|
+
text-transform: var(--dae-ad-label-text-transform, uppercase);
|
|
644
|
+
color: var(--dae-ad-label-color, #999999);
|
|
638
645
|
}
|
|
639
646
|
.ad-label + .ad-loader {
|
|
640
|
-
|
|
641
|
-
|
|
647
|
+
top: var(--dae-ad-loader-top, 13px);
|
|
648
|
+
height: var(--dae-ad-loader-height, calc(100% - 13px));
|
|
642
649
|
}
|
|
643
650
|
.ad-loader {
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
651
|
+
position: var(--dae-ad-loader-position, absolute);
|
|
652
|
+
top: var(--dae-ad-loader-top, 0);
|
|
653
|
+
left: var(--dae-ad-loader-left, 0);
|
|
654
|
+
width: var(--dae-ad-loader-width, 100%);
|
|
655
|
+
height: var(--dae-ad-loader-height, 100%);
|
|
656
|
+
background-color: var(--dae-ad-loader-background-color, #eee);
|
|
657
|
+
background-image: var(
|
|
658
|
+
--dae-ad-loader-background-image,
|
|
659
|
+
linear-gradient(
|
|
660
|
+
90deg,
|
|
661
|
+
rgba(255, 255, 255, 0),
|
|
662
|
+
rgba(255, 255, 255, 0.5),
|
|
663
|
+
rgba(255, 255, 255, 0)
|
|
664
|
+
)
|
|
665
|
+
);
|
|
666
|
+
background-size: var(--dae-ad-loader-background-size, 40px 100%);
|
|
667
|
+
background-repeat: var(--dae-ad-loader-background-repeat, no-repeat);
|
|
668
|
+
background-position: var(
|
|
669
|
+
--dae-ad-loader-background-position,
|
|
670
|
+
left -40px top 0
|
|
671
|
+
);
|
|
672
|
+
animation: var(--dae-ad-loader-animation, ad-skeleton 2s ease infinite);
|
|
673
|
+
z-index: var(--dae-ad-loader-z-index, 2);
|
|
667
674
|
}
|
|
668
675
|
.ad-serving {
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
676
|
+
position: var(--dae-ad-serving-position, relative);
|
|
677
|
+
display: var(--dae-ad-serving-display, flex);
|
|
678
|
+
flex-wrap: var(--dae-ad-serving-flex-wrap, wrap);
|
|
679
|
+
align-items: var(--dae-ad-serving-align-items, flex-start);
|
|
680
|
+
justify-content: var(--dae-ad-serving-justify-content, center);
|
|
681
|
+
padding-block: var(--dae-ad-serving-padding-block, 1rem);
|
|
682
|
+
margin-block: var(--dae-ad-serving-margin-block, 1rem);
|
|
683
|
+
min-height: var(--dae-ad-serving-min-height, 100px);
|
|
677
684
|
}
|
|
678
685
|
.ad-serving::before {
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
686
|
+
content: var(--dae-ad-serving-before-content, "[AD]");
|
|
687
|
+
position: var(--dae-ad-serving-before-position, absolute);
|
|
688
|
+
top: var(--dae-ad-serving-before-top, 0);
|
|
689
|
+
left: var(--dae-ad-serving-before-left, 0);
|
|
690
|
+
width: var(--dae-ad-serving-before-width, 100%);
|
|
691
|
+
height: var(--dae-ad-serving-before-height, 100%);
|
|
692
|
+
display: var(--dae-ad-serving-before-display, flex);
|
|
693
|
+
align-items: var(--dae-ad-serving-before-align-items, center);
|
|
694
|
+
justify-content: var(--dae-ad-serving-before-justify-content, center);
|
|
695
|
+
color: var(--dae-ad-serving-before-color, #ccc);
|
|
696
|
+
z-index: var(--dae-ad-serving-before-z-index, 1);
|
|
690
697
|
}
|
|
691
698
|
|
|
692
699
|
@keyframes ad-skeleton {
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
700
|
+
to {
|
|
701
|
+
background-position: right -40px top 0;
|
|
702
|
+
}
|
|
696
703
|
}
|
|
697
|
-
`,
|
|
704
|
+
`, ge = {
|
|
698
705
|
"top-1": {
|
|
699
706
|
mapping: [
|
|
700
|
-
{
|
|
707
|
+
{
|
|
708
|
+
viewport: [320, 0],
|
|
709
|
+
sizing: [
|
|
710
|
+
[320, 50],
|
|
711
|
+
[320, 100]
|
|
712
|
+
]
|
|
713
|
+
},
|
|
701
714
|
{ viewport: [720, 0], sizing: [[728, 90]] },
|
|
702
|
-
{
|
|
703
|
-
|
|
715
|
+
{
|
|
716
|
+
viewport: [970, 0],
|
|
717
|
+
sizing: [
|
|
718
|
+
[920, 250],
|
|
719
|
+
[970, 90],
|
|
720
|
+
[728, 90]
|
|
721
|
+
]
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
viewport: [1280, 0],
|
|
725
|
+
sizing: [
|
|
726
|
+
[920, 250],
|
|
727
|
+
[970, 250],
|
|
728
|
+
[970, 90],
|
|
729
|
+
[728, 90]
|
|
730
|
+
]
|
|
731
|
+
}
|
|
732
|
+
],
|
|
733
|
+
sizing: [
|
|
734
|
+
[320, 50],
|
|
735
|
+
[320, 100],
|
|
736
|
+
[728, 90],
|
|
737
|
+
[970, 90],
|
|
738
|
+
[920, 250],
|
|
739
|
+
[970, 250]
|
|
704
740
|
],
|
|
705
|
-
sizing: [[320, 50], [320, 100], [728, 90], [970, 90], [920, 250], [970, 250]],
|
|
706
741
|
position: "top"
|
|
707
742
|
},
|
|
708
743
|
"top-2": {
|
|
709
744
|
mapping: [
|
|
710
|
-
{
|
|
745
|
+
{
|
|
746
|
+
viewport: [320, 0],
|
|
747
|
+
sizing: [
|
|
748
|
+
[300, 250],
|
|
749
|
+
[320, 50]
|
|
750
|
+
]
|
|
751
|
+
},
|
|
711
752
|
{ viewport: [760, 0], sizing: [[728, 90]] },
|
|
712
|
-
{
|
|
753
|
+
{
|
|
754
|
+
viewport: [970, 90],
|
|
755
|
+
sizing: [
|
|
756
|
+
[970, 90],
|
|
757
|
+
[728, 90]
|
|
758
|
+
]
|
|
759
|
+
}
|
|
760
|
+
],
|
|
761
|
+
sizing: [
|
|
762
|
+
[300, 250],
|
|
763
|
+
[320, 50],
|
|
764
|
+
[728, 90],
|
|
765
|
+
[970, 90]
|
|
713
766
|
],
|
|
714
|
-
sizing: [[300, 250], [320, 50], [728, 90], [970, 90]],
|
|
715
767
|
position: "top"
|
|
716
768
|
},
|
|
717
769
|
"top-3": {
|
|
718
770
|
mapping: [
|
|
719
|
-
{
|
|
771
|
+
{
|
|
772
|
+
viewport: [320, 0],
|
|
773
|
+
sizing: [
|
|
774
|
+
[300, 250],
|
|
775
|
+
[320, 50]
|
|
776
|
+
]
|
|
777
|
+
},
|
|
720
778
|
{ viewport: [760, 0], sizing: [[728, 90]] },
|
|
721
|
-
{
|
|
779
|
+
{
|
|
780
|
+
viewport: [970, 90],
|
|
781
|
+
sizing: [
|
|
782
|
+
[970, 90],
|
|
783
|
+
[728, 90]
|
|
784
|
+
]
|
|
785
|
+
}
|
|
786
|
+
],
|
|
787
|
+
sizing: [
|
|
788
|
+
[300, 250],
|
|
789
|
+
[320, 50],
|
|
790
|
+
[728, 90],
|
|
791
|
+
[970, 90]
|
|
722
792
|
],
|
|
723
|
-
sizing: [[300, 250], [320, 50], [728, 90], [970, 90]],
|
|
724
793
|
position: "top"
|
|
725
794
|
},
|
|
726
795
|
"top-4": {
|
|
727
796
|
mapping: [
|
|
728
|
-
{
|
|
797
|
+
{
|
|
798
|
+
viewport: [320, 0],
|
|
799
|
+
sizing: [
|
|
800
|
+
[300, 250],
|
|
801
|
+
[320, 50]
|
|
802
|
+
]
|
|
803
|
+
},
|
|
729
804
|
{ viewport: [760, 0], sizing: [[728, 90]] },
|
|
730
|
-
{
|
|
805
|
+
{
|
|
806
|
+
viewport: [970, 90],
|
|
807
|
+
sizing: [
|
|
808
|
+
[970, 90],
|
|
809
|
+
[728, 90]
|
|
810
|
+
]
|
|
811
|
+
}
|
|
812
|
+
],
|
|
813
|
+
sizing: [
|
|
814
|
+
[300, 250],
|
|
815
|
+
[320, 50],
|
|
816
|
+
[728, 90],
|
|
817
|
+
[970, 90]
|
|
731
818
|
],
|
|
732
|
-
sizing: [[300, 250], [320, 50], [728, 90], [970, 90]],
|
|
733
819
|
position: "top"
|
|
734
820
|
},
|
|
735
821
|
"top-5": {
|
|
@@ -737,37 +823,107 @@ const Kt = `:host {
|
|
|
737
823
|
{ viewport: [320, 0], sizing: [[300, 250]] },
|
|
738
824
|
{ viewport: [760, 0], sizing: [[728, 90]] }
|
|
739
825
|
],
|
|
740
|
-
sizing: [
|
|
826
|
+
sizing: [
|
|
827
|
+
[300, 250],
|
|
828
|
+
[320, 50],
|
|
829
|
+
[728, 90]
|
|
830
|
+
],
|
|
741
831
|
position: "top"
|
|
742
832
|
},
|
|
743
833
|
"box-1": {
|
|
744
834
|
mapping: [{ viewport: [320, 0], sizing: [[300, 250]] }],
|
|
745
|
-
sizing: [
|
|
835
|
+
sizing: [
|
|
836
|
+
[300, 250],
|
|
837
|
+
[300, 600]
|
|
838
|
+
],
|
|
746
839
|
position: "box"
|
|
747
840
|
},
|
|
748
841
|
"box-2": {
|
|
749
|
-
mapping: [
|
|
750
|
-
|
|
842
|
+
mapping: [
|
|
843
|
+
{
|
|
844
|
+
viewport: [320, 0],
|
|
845
|
+
sizing: [
|
|
846
|
+
[1, 1],
|
|
847
|
+
[300, 250],
|
|
848
|
+
[300, 600]
|
|
849
|
+
]
|
|
850
|
+
}
|
|
851
|
+
],
|
|
852
|
+
sizing: [
|
|
853
|
+
[300, 250],
|
|
854
|
+
[300, 600],
|
|
855
|
+
[1, 1]
|
|
856
|
+
],
|
|
751
857
|
position: "box"
|
|
752
858
|
},
|
|
753
859
|
"box-3": {
|
|
754
|
-
mapping: [
|
|
755
|
-
|
|
860
|
+
mapping: [
|
|
861
|
+
{
|
|
862
|
+
viewport: [320, 0],
|
|
863
|
+
sizing: [
|
|
864
|
+
[1, 1],
|
|
865
|
+
[300, 250],
|
|
866
|
+
[300, 600]
|
|
867
|
+
]
|
|
868
|
+
}
|
|
869
|
+
],
|
|
870
|
+
sizing: [
|
|
871
|
+
[300, 250],
|
|
872
|
+
[300, 600],
|
|
873
|
+
[1, 1]
|
|
874
|
+
],
|
|
756
875
|
position: "box"
|
|
757
876
|
},
|
|
758
877
|
"box-4": {
|
|
759
|
-
mapping: [
|
|
760
|
-
|
|
878
|
+
mapping: [
|
|
879
|
+
{
|
|
880
|
+
viewport: [320, 0],
|
|
881
|
+
sizing: [
|
|
882
|
+
[1, 1],
|
|
883
|
+
[300, 250],
|
|
884
|
+
[300, 600]
|
|
885
|
+
]
|
|
886
|
+
}
|
|
887
|
+
],
|
|
888
|
+
sizing: [
|
|
889
|
+
[300, 250],
|
|
890
|
+
[300, 600],
|
|
891
|
+
[1, 1]
|
|
892
|
+
],
|
|
761
893
|
position: "box"
|
|
762
894
|
},
|
|
763
895
|
"box-5": {
|
|
764
|
-
mapping: [
|
|
765
|
-
|
|
896
|
+
mapping: [
|
|
897
|
+
{
|
|
898
|
+
viewport: [320, 0],
|
|
899
|
+
sizing: [
|
|
900
|
+
[1, 1],
|
|
901
|
+
[300, 250],
|
|
902
|
+
[300, 600]
|
|
903
|
+
]
|
|
904
|
+
}
|
|
905
|
+
],
|
|
906
|
+
sizing: [
|
|
907
|
+
[1, 1],
|
|
908
|
+
[300, 250],
|
|
909
|
+
[300, 600]
|
|
910
|
+
],
|
|
766
911
|
position: "box"
|
|
767
912
|
},
|
|
768
913
|
footer: {
|
|
769
|
-
mapping: [
|
|
770
|
-
|
|
914
|
+
mapping: [
|
|
915
|
+
{
|
|
916
|
+
viewport: [0, 0],
|
|
917
|
+
sizing: [
|
|
918
|
+
[320, 50],
|
|
919
|
+
[320, 100]
|
|
920
|
+
]
|
|
921
|
+
}
|
|
922
|
+
],
|
|
923
|
+
sizing: [
|
|
924
|
+
[320, 50],
|
|
925
|
+
[320, 100]
|
|
926
|
+
],
|
|
771
927
|
position: "footer"
|
|
772
928
|
},
|
|
773
929
|
interstitial: {
|
|
@@ -775,20 +931,26 @@ const Kt = `:host {
|
|
|
775
931
|
sizing: [[1, 1]],
|
|
776
932
|
position: "interstitial"
|
|
777
933
|
}
|
|
778
|
-
},
|
|
934
|
+
}, fe = {
|
|
779
935
|
fetchMarginPercent: 500,
|
|
780
936
|
renderMarginPercent: 200,
|
|
781
937
|
mobileScaling: 2
|
|
782
|
-
},
|
|
938
|
+
}, lt = class lt {
|
|
783
939
|
static init(t) {
|
|
940
|
+
if (this.instance && !t.force) {
|
|
941
|
+
console.warn(
|
|
942
|
+
"[DreamsAdConfig] Already initialized. Use { force: true } to override."
|
|
943
|
+
);
|
|
944
|
+
return;
|
|
945
|
+
}
|
|
784
946
|
this.instance = {
|
|
785
947
|
networkId: t.networkId,
|
|
786
948
|
sitePrefix: t.sitePrefix,
|
|
787
949
|
pubId: t.pubId || "",
|
|
788
950
|
bidTimeout: t.bidTimeout || 2e3,
|
|
789
|
-
defaultLazyLoad: t.defaultLazyLoad ||
|
|
951
|
+
defaultLazyLoad: t.defaultLazyLoad || fe,
|
|
790
952
|
slots: {
|
|
791
|
-
...
|
|
953
|
+
...ge,
|
|
792
954
|
...t.slots
|
|
793
955
|
}
|
|
794
956
|
};
|
|
@@ -861,53 +1023,64 @@ const Kt = `:host {
|
|
|
861
1023
|
);
|
|
862
1024
|
}
|
|
863
1025
|
};
|
|
864
|
-
|
|
865
|
-
let
|
|
866
|
-
const
|
|
1026
|
+
lt.instance = null;
|
|
1027
|
+
let _ = lt;
|
|
1028
|
+
const _t = {
|
|
867
1029
|
contextKey: "@context",
|
|
868
1030
|
maxRetries: 20,
|
|
869
1031
|
retryInterval: 100,
|
|
870
1032
|
includeUrl: !0,
|
|
871
1033
|
customSegmentFn: "_rl_gen_sg"
|
|
872
|
-
},
|
|
1034
|
+
}, O = class O {
|
|
873
1035
|
static async getTargeting(t) {
|
|
874
|
-
const e = { ...
|
|
1036
|
+
const e = { ..._t, ...t }, i = typeof window < "u" ? window.location.href : "";
|
|
875
1037
|
if (this.cache && this.cacheUrl === i)
|
|
876
1038
|
return { targeting: this.cache, source: "cache" };
|
|
877
1039
|
if (this.pendingPromise)
|
|
878
1040
|
return this.pendingPromise;
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
1041
|
+
try {
|
|
1042
|
+
return this.pendingPromise = this.pollForContext(e, i), await this.pendingPromise;
|
|
1043
|
+
} finally {
|
|
1044
|
+
this.pendingPromise = null;
|
|
1045
|
+
}
|
|
882
1046
|
}
|
|
883
1047
|
static pollForContext(t, e) {
|
|
884
|
-
return new Promise((i) => {
|
|
885
|
-
let
|
|
886
|
-
const
|
|
887
|
-
if (typeof window > "u") return
|
|
888
|
-
const
|
|
889
|
-
if (!(
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
1048
|
+
return new Promise((i, s) => {
|
|
1049
|
+
let r = 0, o = null;
|
|
1050
|
+
const l = () => {
|
|
1051
|
+
if (typeof window > "u") return null;
|
|
1052
|
+
const c = window.dfp;
|
|
1053
|
+
if (!(c != null && c[t.contextKey])) return null;
|
|
1054
|
+
try {
|
|
1055
|
+
const p = c[t.contextKey], h = this.buildFromContext(p, t);
|
|
1056
|
+
return this.cache = h, this.cacheUrl = e, { targeting: h, source: "context" };
|
|
1057
|
+
} catch (p) {
|
|
1058
|
+
return s(p), null;
|
|
1059
|
+
}
|
|
1060
|
+
}, a = l();
|
|
1061
|
+
if (a) {
|
|
1062
|
+
i(a);
|
|
1063
|
+
return;
|
|
1064
|
+
}
|
|
1065
|
+
o = setInterval(() => {
|
|
1066
|
+
r++;
|
|
1067
|
+
const c = l();
|
|
1068
|
+
if (c) {
|
|
1069
|
+
o && clearInterval(o), i(c);
|
|
897
1070
|
return;
|
|
898
1071
|
}
|
|
899
|
-
|
|
1072
|
+
r >= t.maxRetries && (o && clearInterval(o), i({ targeting: [], source: "timeout" }));
|
|
900
1073
|
}, t.retryInterval);
|
|
901
1074
|
});
|
|
902
1075
|
}
|
|
903
1076
|
static buildFromContext(t, e) {
|
|
904
|
-
var
|
|
905
|
-
const i = { ...
|
|
906
|
-
if (i.includeUrl && typeof window < "u" && s.push({ key: "url", value: window.location.pathname }), (
|
|
907
|
-
const
|
|
908
|
-
if (typeof
|
|
909
|
-
const
|
|
910
|
-
|
|
1077
|
+
var r, o;
|
|
1078
|
+
const i = { ..._t, ...e }, s = [];
|
|
1079
|
+
if (i.includeUrl && typeof window < "u" && s.push({ key: "url", value: window.location.pathname }), (r = t.dataSection) != null && r.catName && s.push({ key: "catName", value: t.dataSection.catName }), t.postId && s.push({ key: "postId", value: t.postId }), t.catId && s.push({ key: "catId", value: t.catId }), t.tagId && s.push({ key: "tag", value: t.tagId }), t.typeId && s.push({ key: "type", value: t.typeId }), t.taxId && s.push({ key: "taxId", value: t.taxId }), (o = t.dataSection) != null && o.author && s.push({ key: "author", value: t.dataSection.author }), typeof window < "u" && i.customSegmentFn) {
|
|
1080
|
+
const l = window[i.customSegmentFn];
|
|
1081
|
+
if (typeof l == "function") {
|
|
1082
|
+
const a = l();
|
|
1083
|
+
a && s.push({ key: "_rl", value: a });
|
|
911
1084
|
}
|
|
912
1085
|
}
|
|
913
1086
|
return s;
|
|
@@ -920,59 +1093,332 @@ const ct = {
|
|
|
920
1093
|
return this.cache && this.cacheUrl === t ? this.cache : null;
|
|
921
1094
|
}
|
|
922
1095
|
};
|
|
923
|
-
|
|
924
|
-
let
|
|
925
|
-
|
|
1096
|
+
O.cache = null, O.cacheUrl = "", O.pendingPromise = null;
|
|
1097
|
+
let K = O;
|
|
1098
|
+
const At = {
|
|
1099
|
+
threshold: 0.5,
|
|
1100
|
+
// IAB: 50% visible
|
|
1101
|
+
duration: 2e3,
|
|
1102
|
+
// IAB: 2 seconds
|
|
1103
|
+
debug: !1
|
|
1104
|
+
}, X = class X {
|
|
1105
|
+
/**
|
|
1106
|
+
* Configure the viewability service
|
|
1107
|
+
*/
|
|
1108
|
+
static configure(t) {
|
|
1109
|
+
this.config = { ...At, ...t };
|
|
1110
|
+
}
|
|
1111
|
+
/**
|
|
1112
|
+
* Start tracking an ad element for viewability
|
|
1113
|
+
*/
|
|
1114
|
+
static track(t, e, i) {
|
|
1115
|
+
if (this.trackedAds.has(e))
|
|
1116
|
+
return;
|
|
1117
|
+
const s = {
|
|
1118
|
+
adId: e,
|
|
1119
|
+
position: i,
|
|
1120
|
+
isViewable: !1,
|
|
1121
|
+
viewableTime: 0,
|
|
1122
|
+
totalTime: 0,
|
|
1123
|
+
viewabilityRate: 0
|
|
1124
|
+
}, r = new IntersectionObserver(
|
|
1125
|
+
(l) => this.handleIntersection(l, e),
|
|
1126
|
+
{
|
|
1127
|
+
threshold: [0, 0.25, 0.5, 0.75, 1],
|
|
1128
|
+
rootMargin: "0px"
|
|
1129
|
+
}
|
|
1130
|
+
), o = {
|
|
1131
|
+
element: t,
|
|
1132
|
+
metrics: s,
|
|
1133
|
+
observer: r,
|
|
1134
|
+
viewabilityTimer: null,
|
|
1135
|
+
trackingInterval: null,
|
|
1136
|
+
startTime: Date.now(),
|
|
1137
|
+
isCurrentlyVisible: !1
|
|
1138
|
+
};
|
|
1139
|
+
this.trackedAds.set(e, o), r.observe(t), this.dispatchEvent("impression", e, s), this.config.debug && console.log(`[Viewability] Tracking started: ${e}`);
|
|
1140
|
+
}
|
|
1141
|
+
/**
|
|
1142
|
+
* Stop tracking an ad element
|
|
1143
|
+
*/
|
|
1144
|
+
static untrack(t) {
|
|
1145
|
+
const e = this.trackedAds.get(t);
|
|
1146
|
+
e && (e.observer.disconnect(), e.viewabilityTimer && clearTimeout(e.viewabilityTimer), e.trackingInterval && clearInterval(e.trackingInterval), this.trackedAds.delete(t), this.config.debug && console.log(`[Viewability] Tracking stopped: ${t}`));
|
|
1147
|
+
}
|
|
1148
|
+
/**
|
|
1149
|
+
* Get metrics for a specific ad
|
|
1150
|
+
*/
|
|
1151
|
+
static getMetrics(t) {
|
|
1152
|
+
const e = this.trackedAds.get(t);
|
|
1153
|
+
return e ? { ...e.metrics } : null;
|
|
1154
|
+
}
|
|
1155
|
+
/**
|
|
1156
|
+
* Get all tracked metrics
|
|
1157
|
+
*/
|
|
1158
|
+
static getAllMetrics() {
|
|
1159
|
+
return Array.from(this.trackedAds.values()).map((t) => ({ ...t.metrics }));
|
|
1160
|
+
}
|
|
1161
|
+
/**
|
|
1162
|
+
* Show metrics summary in console
|
|
1163
|
+
*/
|
|
1164
|
+
static showMetrics() {
|
|
1165
|
+
const t = this.getAllMetrics();
|
|
1166
|
+
if (t.length === 0) {
|
|
1167
|
+
console.log("[Viewability] No ads being tracked");
|
|
1168
|
+
return;
|
|
1169
|
+
}
|
|
1170
|
+
console.table(
|
|
1171
|
+
t.map((e) => ({
|
|
1172
|
+
"Ad ID": e.adId,
|
|
1173
|
+
Position: e.position,
|
|
1174
|
+
Viewable: e.isViewable ? "✓" : "✗",
|
|
1175
|
+
"Viewable Time": `${(e.viewableTime / 1e3).toFixed(1)}s`,
|
|
1176
|
+
"Total Time": `${(e.totalTime / 1e3).toFixed(1)}s`,
|
|
1177
|
+
"Viewability %": `${e.viewabilityRate.toFixed(1)}%`
|
|
1178
|
+
}))
|
|
1179
|
+
);
|
|
1180
|
+
}
|
|
1181
|
+
/**
|
|
1182
|
+
* Clear all tracking
|
|
1183
|
+
*/
|
|
1184
|
+
static reset() {
|
|
1185
|
+
for (const t of this.trackedAds.keys())
|
|
1186
|
+
this.untrack(t);
|
|
1187
|
+
}
|
|
1188
|
+
static handleIntersection(t, e) {
|
|
1189
|
+
const i = this.trackedAds.get(e);
|
|
1190
|
+
if (i)
|
|
1191
|
+
for (const s of t) {
|
|
1192
|
+
const r = s.intersectionRatio >= this.config.threshold;
|
|
1193
|
+
r && !i.isCurrentlyVisible ? (i.isCurrentlyVisible = !0, this.startViewabilityTimer(e)) : !r && i.isCurrentlyVisible && (i.isCurrentlyVisible = !1, this.stopViewabilityTimer(e), this.dispatchEvent("hidden", e, i.metrics));
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
static startViewabilityTimer(t) {
|
|
1197
|
+
const e = this.trackedAds.get(t);
|
|
1198
|
+
e && (e.viewabilityTimer = setTimeout(() => {
|
|
1199
|
+
e.metrics.isViewable || (e.metrics.isViewable = !0, this.dispatchEvent("viewable", t, e.metrics), this.config.debug && console.log(`[Viewability] Ad viewable: ${t}`));
|
|
1200
|
+
}, this.config.duration), e.trackingInterval = setInterval(() => {
|
|
1201
|
+
this.updateMetrics(t);
|
|
1202
|
+
}, 500));
|
|
1203
|
+
}
|
|
1204
|
+
static stopViewabilityTimer(t) {
|
|
1205
|
+
const e = this.trackedAds.get(t);
|
|
1206
|
+
e && (e.viewabilityTimer && (clearTimeout(e.viewabilityTimer), e.viewabilityTimer = null), e.trackingInterval && (clearInterval(e.trackingInterval), e.trackingInterval = null));
|
|
1207
|
+
}
|
|
1208
|
+
static updateMetrics(t) {
|
|
1209
|
+
const e = this.trackedAds.get(t);
|
|
1210
|
+
if (!e) return;
|
|
1211
|
+
const i = Date.now();
|
|
1212
|
+
e.metrics.totalTime = i - e.startTime, e.isCurrentlyVisible && (e.metrics.viewableTime += 500), e.metrics.totalTime > 0 && (e.metrics.viewabilityRate = e.metrics.viewableTime / e.metrics.totalTime * 100);
|
|
1213
|
+
}
|
|
1214
|
+
static dispatchEvent(t, e, i) {
|
|
1215
|
+
const s = new CustomEvent("ad:viewability", {
|
|
1216
|
+
detail: {
|
|
1217
|
+
type: t,
|
|
1218
|
+
adId: e,
|
|
1219
|
+
metrics: { ...i },
|
|
1220
|
+
timestamp: Date.now()
|
|
1221
|
+
}
|
|
1222
|
+
});
|
|
1223
|
+
window.dispatchEvent(s);
|
|
1224
|
+
}
|
|
1225
|
+
};
|
|
1226
|
+
X.config = At, X.trackedAds = /* @__PURE__ */ new Map();
|
|
1227
|
+
let Z = X;
|
|
1228
|
+
var me = Object.defineProperty, we = Object.getOwnPropertyDescriptor, F = (n, t, e, i) => {
|
|
1229
|
+
for (var s = i > 1 ? void 0 : i ? we(t, e) : t, r = n.length - 1, o; r >= 0; r--)
|
|
1230
|
+
(o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s);
|
|
1231
|
+
return i && s && me(t, e, s), s;
|
|
1232
|
+
};
|
|
1233
|
+
let E = class extends z {
|
|
1234
|
+
constructor() {
|
|
1235
|
+
super(...arguments), this.width = 300, this.height = 250, this.showLabel = !1, this.label = "Ad";
|
|
1236
|
+
}
|
|
1237
|
+
render() {
|
|
1238
|
+
return y`
|
|
1239
|
+
<div
|
|
1240
|
+
class="skeleton"
|
|
1241
|
+
style="width: ${this.width}px; height: ${this.height}px;"
|
|
1242
|
+
>
|
|
1243
|
+
${this.showLabel ? y`<span class="skeleton-label">${this.label}</span>` : ""}
|
|
1244
|
+
</div>
|
|
1245
|
+
`;
|
|
1246
|
+
}
|
|
1247
|
+
};
|
|
1248
|
+
E.styles = qt`
|
|
1249
|
+
:host {
|
|
1250
|
+
display: block;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
.skeleton {
|
|
1254
|
+
position: relative;
|
|
1255
|
+
overflow: hidden;
|
|
1256
|
+
background: var(--dreams-skeleton-bg, #f0f0f0);
|
|
1257
|
+
border-radius: var(--dreams-skeleton-radius, 4px);
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
.skeleton::after {
|
|
1261
|
+
content: "";
|
|
1262
|
+
position: absolute;
|
|
1263
|
+
top: 0;
|
|
1264
|
+
left: 0;
|
|
1265
|
+
right: 0;
|
|
1266
|
+
bottom: 0;
|
|
1267
|
+
background: linear-gradient(
|
|
1268
|
+
90deg,
|
|
1269
|
+
transparent 0%,
|
|
1270
|
+
var(--dreams-skeleton-shine, rgba(255, 255, 255, 0.6)) 50%,
|
|
1271
|
+
transparent 100%
|
|
1272
|
+
);
|
|
1273
|
+
animation: shimmer 1.5s infinite;
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
@keyframes shimmer {
|
|
1277
|
+
0% {
|
|
1278
|
+
transform: translateX(-100%);
|
|
1279
|
+
}
|
|
1280
|
+
100% {
|
|
1281
|
+
transform: translateX(100%);
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
.skeleton-label {
|
|
1286
|
+
position: absolute;
|
|
1287
|
+
bottom: 8px;
|
|
1288
|
+
left: 50%;
|
|
1289
|
+
transform: translateX(-50%);
|
|
1290
|
+
font-size: 10px;
|
|
1291
|
+
color: var(--dreams-skeleton-label-color, #999);
|
|
1292
|
+
font-family: system-ui, -apple-system, sans-serif;
|
|
1293
|
+
}
|
|
1294
|
+
`;
|
|
1295
|
+
F([
|
|
1296
|
+
u({ type: Number })
|
|
1297
|
+
], E.prototype, "width", 2);
|
|
1298
|
+
F([
|
|
1299
|
+
u({ type: Number })
|
|
1300
|
+
], E.prototype, "height", 2);
|
|
1301
|
+
F([
|
|
1302
|
+
u({ type: Boolean })
|
|
1303
|
+
], E.prototype, "showLabel", 2);
|
|
1304
|
+
F([
|
|
1305
|
+
u({ type: String })
|
|
1306
|
+
], E.prototype, "label", 2);
|
|
1307
|
+
E = F([
|
|
1308
|
+
Mt("dreams-ad-skeleton")
|
|
1309
|
+
], E);
|
|
1310
|
+
function ye(n, t) {
|
|
1311
|
+
const e = t >= 1280, i = t >= 728;
|
|
1312
|
+
switch (n) {
|
|
1313
|
+
case "top-1":
|
|
1314
|
+
return e ? { width: 970, height: 250 } : i ? { width: 728, height: 90 } : { width: 320, height: 100 };
|
|
1315
|
+
case "top-2":
|
|
1316
|
+
case "top-3":
|
|
1317
|
+
case "top-4":
|
|
1318
|
+
case "top-5":
|
|
1319
|
+
return e ? { width: 970, height: 90 } : i ? { width: 728, height: 90 } : { width: 320, height: 50 };
|
|
1320
|
+
case "box-1":
|
|
1321
|
+
case "box-2":
|
|
1322
|
+
case "box-3":
|
|
1323
|
+
case "box-4":
|
|
1324
|
+
case "box-5":
|
|
1325
|
+
return { width: 300, height: 250 };
|
|
1326
|
+
case "footer":
|
|
1327
|
+
return { width: 320, height: 50 };
|
|
1328
|
+
case "interstitial":
|
|
1329
|
+
return { width: 1, height: 1 };
|
|
1330
|
+
default:
|
|
1331
|
+
return { width: 300, height: 250 };
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
var ve = Object.defineProperty, be = Object.getOwnPropertyDescriptor, Ht = (n) => {
|
|
926
1335
|
throw TypeError(n);
|
|
927
|
-
},
|
|
928
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
929
|
-
(
|
|
930
|
-
return i && s &&
|
|
931
|
-
},
|
|
932
|
-
let
|
|
1336
|
+
}, g = (n, t, e, i) => {
|
|
1337
|
+
for (var s = i > 1 ? void 0 : i ? be(t, e) : t, r = n.length - 1, o; r >= 0; r--)
|
|
1338
|
+
(o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s);
|
|
1339
|
+
return i && s && ve(t, e, s), s;
|
|
1340
|
+
}, $e = (n, t, e) => t.has(n) || Ht("Cannot " + e), _e = (n, t, e) => t.has(n) ? Ht("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), q = (n, t, e) => ($e(n, t, "access private method"), e), x, Vt, Bt, Ft, jt;
|
|
1341
|
+
let d = class extends z {
|
|
933
1342
|
constructor() {
|
|
934
|
-
super(...arguments),
|
|
1343
|
+
super(...arguments), _e(this, x), this.adSlot = null, this.slotRenderHandler = null, this.networkId = "", this.adUnit = "", this.divId = "", this.slot = "", this.mapping = [], this.sizing = [], this.targeting = [], this.autoTargeting = !1, this.resolvedTargeting = [], this.setCentering = !1, this.enableLazyLoad = !1, this.configLazyLoad = {
|
|
935
1344
|
fetchMarginPercent: 500,
|
|
936
1345
|
renderMarginPercent: 200,
|
|
937
1346
|
mobileScaling: 2
|
|
938
|
-
}, this.refresh = !1, this.enableTitle = !1, this.apstag = !1, this.pubId = "", this.bidTimeout = 2e3, this.title = "Publicidad", this.adLoaded = !1;
|
|
1347
|
+
}, this.refresh = !1, this.enableTitle = !1, this.apstag = !1, this.pubId = "", this.bidTimeout = 2e3, this.title = "Publicidad", this.adLoaded = !1, this.trackViewability = !1, this.showSkeleton = !1;
|
|
1348
|
+
}
|
|
1349
|
+
/**
|
|
1350
|
+
* Set up global navigation listeners for SPA support
|
|
1351
|
+
*/
|
|
1352
|
+
static _setupNavigationListeners() {
|
|
1353
|
+
if (d.navigationListenersAttached || typeof window > "u") return;
|
|
1354
|
+
window.addEventListener("popstate", d._handleNavigation), window.addEventListener("hashchange", d._handleNavigation);
|
|
1355
|
+
const n = history.pushState.bind(history), t = history.replaceState.bind(history);
|
|
1356
|
+
history.pushState = (...e) => {
|
|
1357
|
+
n(...e), d._handleNavigation();
|
|
1358
|
+
}, history.replaceState = (...e) => {
|
|
1359
|
+
t(...e), d._handleNavigation();
|
|
1360
|
+
}, d.navigationListenersAttached = !0;
|
|
939
1361
|
}
|
|
940
1362
|
connectedCallback() {
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
1363
|
+
super.connectedCallback(), d.initialized ? d._handleNavigation() : (q(this, x, Vt).call(this), d.initialized = !0, d.old_url = location.href);
|
|
1364
|
+
}
|
|
1365
|
+
disconnectedCallback() {
|
|
1366
|
+
var n, t;
|
|
1367
|
+
if (super.disconnectedCallback(), this.trackViewability && this.divId && Z.untrack(this.divId), this.slotRenderHandler && ((n = window.googletag) != null && n.pubads) && (window.googletag.pubads().removeEventListener("slotRenderEnded", this.slotRenderHandler), this.slotRenderHandler = null), this.adSlot) {
|
|
1368
|
+
if (window.dreamsAllSlots) {
|
|
1369
|
+
const e = window.dreamsAllSlots.indexOf(this.adSlot);
|
|
1370
|
+
e > -1 && window.dreamsAllSlots.splice(e, 1);
|
|
1371
|
+
}
|
|
1372
|
+
if (window.dreamsSlotsToUpdate) {
|
|
1373
|
+
const e = window.dreamsSlotsToUpdate.indexOf(this.adSlot);
|
|
1374
|
+
e > -1 && window.dreamsSlotsToUpdate.splice(e, 1);
|
|
1375
|
+
}
|
|
1376
|
+
(t = window.googletag) != null && t.destroySlots && window.googletag.destroySlots([this.adSlot]), this.adSlot = null;
|
|
946
1377
|
}
|
|
947
1378
|
}
|
|
948
1379
|
async firstUpdated() {
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
1380
|
+
var n;
|
|
1381
|
+
if (await q(this, x, Bt).call(this), await q(this, x, Ft).call(this), this.divId = `div-gpt-ad-${this.adUnit}-${crypto.randomUUID()}`, this.apstag && this.pubId && !d.initialized_aps)
|
|
1382
|
+
if (typeof ((n = window.apstag) == null ? void 0 : n.init) == "function")
|
|
1383
|
+
try {
|
|
1384
|
+
window.apstag.init({
|
|
1385
|
+
pubID: this.pubId,
|
|
1386
|
+
adServer: "googletag",
|
|
1387
|
+
bidTimeout: this.bidTimeout
|
|
1388
|
+
}), d.initialized_aps = !0;
|
|
1389
|
+
} catch {
|
|
1390
|
+
this.apstag = !1;
|
|
1391
|
+
}
|
|
1392
|
+
else
|
|
1393
|
+
this.apstag = !1;
|
|
1394
|
+
q(this, x, jt).call(this);
|
|
954
1395
|
}
|
|
955
1396
|
render() {
|
|
956
|
-
|
|
1397
|
+
const n = this.showSkeleton ? ye(this.slot || "box-1", window.innerWidth) : { width: 0, height: 0 };
|
|
1398
|
+
return y`
|
|
957
1399
|
<div class="ad-container">
|
|
958
|
-
${
|
|
1400
|
+
${$t(
|
|
959
1401
|
this.enableTitle,
|
|
960
|
-
() =>
|
|
961
|
-
() =>
|
|
1402
|
+
() => y`<span class="ad-label">${this.title}</span>`,
|
|
1403
|
+
() => y``
|
|
962
1404
|
)}
|
|
963
|
-
${
|
|
1405
|
+
${$t(
|
|
964
1406
|
!this.adLoaded,
|
|
965
|
-
() =>
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
1407
|
+
() => this.showSkeleton ? y`<dreams-ad-skeleton
|
|
1408
|
+
width="${n.width}"
|
|
1409
|
+
height="${n.height}"
|
|
1410
|
+
></dreams-ad-skeleton>` : y`<div
|
|
1411
|
+
class="ad-loader"
|
|
1412
|
+
data-ad-loader="${this.divId}"
|
|
1413
|
+
></div>`,
|
|
1414
|
+
() => y``
|
|
970
1415
|
)}
|
|
971
1416
|
<div
|
|
972
1417
|
class="ad-serving"
|
|
973
1418
|
data-post-id="${this.divId}"
|
|
974
1419
|
data-tag="${this.adUnit}"
|
|
975
1420
|
data-refresh="${this.refresh ? "true" : "false"}"
|
|
1421
|
+
style="${!this.adLoaded && this.showSkeleton ? "opacity: 0;" : ""}"
|
|
976
1422
|
>
|
|
977
1423
|
<slot name="ad-slot"></slot>
|
|
978
1424
|
</div>
|
|
@@ -980,122 +1426,601 @@ let l = class extends k {
|
|
|
980
1426
|
`;
|
|
981
1427
|
}
|
|
982
1428
|
};
|
|
983
|
-
|
|
984
|
-
|
|
1429
|
+
x = /* @__PURE__ */ new WeakSet();
|
|
1430
|
+
Vt = function() {
|
|
985
1431
|
window.googletag = window.googletag || { cmd: [] }, window.googletag.cmd.push(() => {
|
|
986
|
-
window.dreamsAllSlots = window.dreamsAllSlots || [], window.dreamsSlotsToUpdate = window.dreamsSlotsToUpdate || []
|
|
987
|
-
|
|
1432
|
+
window.dreamsAllSlots = window.dreamsAllSlots || [], window.dreamsSlotsToUpdate = window.dreamsSlotsToUpdate || [];
|
|
1433
|
+
const n = window.googletag.pubadsReady === !0;
|
|
1434
|
+
d.servicesWereAlreadyEnabled = n, n || window.googletag.enableServices();
|
|
1435
|
+
}), d._setupNavigationListeners();
|
|
988
1436
|
};
|
|
989
|
-
|
|
990
|
-
if (this.slot &&
|
|
991
|
-
const n =
|
|
992
|
-
n && (this.networkId || (this.networkId =
|
|
1437
|
+
Bt = async function() {
|
|
1438
|
+
if (this.slot && _.isInitialized()) {
|
|
1439
|
+
const n = _.getSlot(this.slot);
|
|
1440
|
+
n && (this.networkId || (this.networkId = _.getNetworkId()), this.adUnit || (this.adUnit = _.buildAdUnit(this.slot)), (!this.mapping || this.mapping.length === 0) && (this.mapping = n.mapping), (!this.sizing || this.sizing.length === 0) && (this.sizing = n.sizing), this.pubId || (this.pubId = _.getPubId() || ""), this.pubId && (this.apstag = !0));
|
|
993
1441
|
}
|
|
994
|
-
|
|
1442
|
+
if (typeof this.mapping == "string")
|
|
1443
|
+
try {
|
|
1444
|
+
this.mapping = JSON.parse(this.mapping);
|
|
1445
|
+
} catch {
|
|
1446
|
+
this.mapping = [];
|
|
1447
|
+
}
|
|
1448
|
+
if (typeof this.sizing == "string")
|
|
1449
|
+
try {
|
|
1450
|
+
this.sizing = JSON.parse(this.sizing);
|
|
1451
|
+
} catch {
|
|
1452
|
+
this.sizing = [];
|
|
1453
|
+
}
|
|
1454
|
+
if (this.targeting && typeof this.targeting == "string")
|
|
1455
|
+
try {
|
|
1456
|
+
this.targeting = JSON.parse(this.targeting);
|
|
1457
|
+
} catch {
|
|
1458
|
+
this.targeting = [];
|
|
1459
|
+
}
|
|
1460
|
+
if (this.configLazyLoad && typeof this.configLazyLoad == "string")
|
|
1461
|
+
try {
|
|
1462
|
+
this.configLazyLoad = JSON.parse(this.configLazyLoad);
|
|
1463
|
+
} catch {
|
|
1464
|
+
this.configLazyLoad = {
|
|
1465
|
+
fetchMarginPercent: 500,
|
|
1466
|
+
renderMarginPercent: 200,
|
|
1467
|
+
mobileScaling: 2
|
|
1468
|
+
};
|
|
1469
|
+
}
|
|
995
1470
|
};
|
|
996
|
-
|
|
1471
|
+
Ft = async function() {
|
|
997
1472
|
if (this.autoTargeting) {
|
|
998
|
-
const n = await
|
|
1473
|
+
const n = await K.getTargeting();
|
|
999
1474
|
this.resolvedTargeting = n.targeting;
|
|
1000
1475
|
} else this.targeting && this.targeting.length > 0 && (this.resolvedTargeting = this.targeting);
|
|
1001
1476
|
};
|
|
1002
|
-
|
|
1477
|
+
jt = function() {
|
|
1003
1478
|
const n = `/${this.networkId}/${this.adUnit}`, t = this.divId, e = document.createElement("div");
|
|
1004
1479
|
e.id = t, e.setAttribute("data-ad", this.divId), e.setAttribute("slot", "ad-slot"), e.classList.add("ad-serving-rendered"), e.parentElement || this.appendChild(e), window.googletag.cmd.push(() => {
|
|
1005
|
-
|
|
1480
|
+
var a;
|
|
1481
|
+
window.googletag.pubads().setCentering(this.setCentering), this.enableLazyLoad && !d.lazyLoadConfigured && (window.googletag.pubads().enableLazyLoad(this.configLazyLoad), d.lazyLoadConfigured = !0);
|
|
1006
1482
|
const i = window.googletag.defineSlot(n, this.sizing, t).addService(window.googletag.pubads());
|
|
1007
|
-
this.resolvedTargeting.forEach((
|
|
1008
|
-
i.setTargeting(
|
|
1009
|
-
}),
|
|
1010
|
-
|
|
1011
|
-
|
|
1483
|
+
this.resolvedTargeting.forEach((c) => {
|
|
1484
|
+
i.setTargeting(c.key, c.value);
|
|
1485
|
+
}), this.slotRenderHandler = (c) => {
|
|
1486
|
+
if (c.slot.getSlotElementId() === t && (this.adLoaded = !0, this.trackViewability)) {
|
|
1487
|
+
const p = this.querySelector(`#${t}`);
|
|
1488
|
+
p instanceof HTMLElement && Z.track(
|
|
1489
|
+
p,
|
|
1490
|
+
t,
|
|
1491
|
+
this.slot || this.adUnit
|
|
1492
|
+
);
|
|
1493
|
+
}
|
|
1494
|
+
}, window.googletag.pubads().addEventListener("slotRenderEnded", this.slotRenderHandler);
|
|
1012
1495
|
const s = window.googletag.sizeMapping();
|
|
1013
|
-
this.mapping.forEach((
|
|
1014
|
-
s.addSize(
|
|
1496
|
+
this.mapping.forEach((c) => {
|
|
1497
|
+
s.addSize(c.viewport, c.sizing);
|
|
1015
1498
|
});
|
|
1016
|
-
const
|
|
1017
|
-
this.refresh && window.dreamsSlotsToUpdate.push(
|
|
1018
|
-
|
|
1499
|
+
const r = s.build(), o = i.defineSizeMapping(r).addService(window.googletag.pubads());
|
|
1500
|
+
if (this.adSlot = o, this.refresh && window.dreamsSlotsToUpdate.push(o), window.dreamsAllSlots.push(o), !(this.apstag && this.pubId))
|
|
1501
|
+
window.googletag.display(t), d.servicesWereAlreadyEnabled && window.googletag.pubads().refresh([o]);
|
|
1502
|
+
else {
|
|
1503
|
+
if (typeof ((a = window.apstag) == null ? void 0 : a.fetchBids) != "function") {
|
|
1504
|
+
window.googletag.display(t), d.servicesWereAlreadyEnabled && window.googletag.pubads().refresh([o]);
|
|
1505
|
+
return;
|
|
1506
|
+
}
|
|
1507
|
+
let c = !1;
|
|
1508
|
+
const p = this.bidTimeout || 2e3, h = setTimeout(() => {
|
|
1509
|
+
c || (c = !0, window.googletag.cmd.push(() => {
|
|
1510
|
+
window.googletag.pubads().refresh([o]);
|
|
1511
|
+
}));
|
|
1512
|
+
}, p + 500);
|
|
1513
|
+
window.apstag.fetchBids(
|
|
1019
1514
|
{
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1515
|
+
slots: [
|
|
1516
|
+
{
|
|
1517
|
+
slotID: t,
|
|
1518
|
+
slotName: n,
|
|
1519
|
+
sizes: this.sizing
|
|
1520
|
+
}
|
|
1521
|
+
]
|
|
1522
|
+
},
|
|
1523
|
+
() => {
|
|
1524
|
+
c || (c = !0, clearTimeout(h), window.googletag.cmd.push(() => {
|
|
1525
|
+
window.apstag.setDisplayBids(), window.googletag.pubads().refresh([o]);
|
|
1526
|
+
}));
|
|
1023
1527
|
}
|
|
1024
|
-
|
|
1025
|
-
}
|
|
1026
|
-
|
|
1027
|
-
|
|
1528
|
+
);
|
|
1529
|
+
}
|
|
1530
|
+
});
|
|
1531
|
+
};
|
|
1532
|
+
d.styles = Ut(ue);
|
|
1533
|
+
d.initialized = !1;
|
|
1534
|
+
d.old_url = "";
|
|
1535
|
+
d.initialized_aps = !1;
|
|
1536
|
+
d.navigationListenersAttached = !1;
|
|
1537
|
+
d.servicesWereAlreadyEnabled = !1;
|
|
1538
|
+
d.lazyLoadConfigured = !1;
|
|
1539
|
+
d._handleNavigation = () => {
|
|
1540
|
+
var t, e;
|
|
1541
|
+
const n = location.href;
|
|
1542
|
+
d.old_url !== n && ((t = window.googletag) != null && t.destroySlots && ((e = window.dreamsAllSlots) == null ? void 0 : e.length) > 0 && window.googletag.destroySlots(window.dreamsAllSlots), d.old_url = n, window.dreamsAllSlots = [], window.dreamsSlotsToUpdate = [], K.clearCache());
|
|
1543
|
+
};
|
|
1544
|
+
g([
|
|
1545
|
+
u({ type: String })
|
|
1546
|
+
], d.prototype, "networkId", 2);
|
|
1547
|
+
g([
|
|
1548
|
+
u({ type: String })
|
|
1549
|
+
], d.prototype, "adUnit", 2);
|
|
1550
|
+
g([
|
|
1551
|
+
u({ type: String })
|
|
1552
|
+
], d.prototype, "divId", 2);
|
|
1553
|
+
g([
|
|
1554
|
+
u({ type: String })
|
|
1555
|
+
], d.prototype, "slot", 2);
|
|
1556
|
+
g([
|
|
1557
|
+
u({ type: Array })
|
|
1558
|
+
], d.prototype, "mapping", 2);
|
|
1559
|
+
g([
|
|
1560
|
+
u({ type: Array })
|
|
1561
|
+
], d.prototype, "sizing", 2);
|
|
1562
|
+
g([
|
|
1563
|
+
u({ type: Array })
|
|
1564
|
+
], d.prototype, "targeting", 2);
|
|
1565
|
+
g([
|
|
1566
|
+
u({ type: Boolean, reflect: !0 })
|
|
1567
|
+
], d.prototype, "autoTargeting", 2);
|
|
1568
|
+
g([
|
|
1569
|
+
pe()
|
|
1570
|
+
], d.prototype, "resolvedTargeting", 2);
|
|
1571
|
+
g([
|
|
1572
|
+
u({ type: Boolean, reflect: !0 })
|
|
1573
|
+
], d.prototype, "setCentering", 2);
|
|
1574
|
+
g([
|
|
1575
|
+
u({ type: Boolean, reflect: !0 })
|
|
1576
|
+
], d.prototype, "enableLazyLoad", 2);
|
|
1577
|
+
g([
|
|
1578
|
+
u({ type: Object })
|
|
1579
|
+
], d.prototype, "configLazyLoad", 2);
|
|
1580
|
+
g([
|
|
1581
|
+
u({ type: Boolean, reflect: !0 })
|
|
1582
|
+
], d.prototype, "refresh", 2);
|
|
1583
|
+
g([
|
|
1584
|
+
u({ type: Boolean, reflect: !0 })
|
|
1585
|
+
], d.prototype, "enableTitle", 2);
|
|
1586
|
+
g([
|
|
1587
|
+
u({ type: Boolean, reflect: !0 })
|
|
1588
|
+
], d.prototype, "apstag", 2);
|
|
1589
|
+
g([
|
|
1590
|
+
u({ type: String })
|
|
1591
|
+
], d.prototype, "pubId", 2);
|
|
1592
|
+
g([
|
|
1593
|
+
u({ type: Number })
|
|
1594
|
+
], d.prototype, "bidTimeout", 2);
|
|
1595
|
+
g([
|
|
1596
|
+
u({ type: String })
|
|
1597
|
+
], d.prototype, "title", 2);
|
|
1598
|
+
g([
|
|
1599
|
+
u({ type: Boolean })
|
|
1600
|
+
], d.prototype, "adLoaded", 2);
|
|
1601
|
+
g([
|
|
1602
|
+
u({ type: Boolean, reflect: !0 })
|
|
1603
|
+
], d.prototype, "trackViewability", 2);
|
|
1604
|
+
g([
|
|
1605
|
+
u({ type: Boolean, reflect: !0 })
|
|
1606
|
+
], d.prototype, "showSkeleton", 2);
|
|
1607
|
+
d = g([
|
|
1608
|
+
Mt("dreams-ad-engine")
|
|
1609
|
+
], d);
|
|
1610
|
+
const St = {
|
|
1611
|
+
enabled: !0,
|
|
1612
|
+
addBodyClass: !0,
|
|
1613
|
+
bodyClass: "ad-blocker-detected",
|
|
1614
|
+
timeout: 1e3
|
|
1615
|
+
}, D = class D {
|
|
1616
|
+
/**
|
|
1617
|
+
* Configure the ad block detector
|
|
1618
|
+
*/
|
|
1619
|
+
static configure(t) {
|
|
1620
|
+
this.config = { ...St, ...t };
|
|
1621
|
+
}
|
|
1622
|
+
/**
|
|
1623
|
+
* Check if ad blocker is detected (cached result)
|
|
1624
|
+
*/
|
|
1625
|
+
static isBlocked() {
|
|
1626
|
+
return this.detected === !0;
|
|
1627
|
+
}
|
|
1628
|
+
/**
|
|
1629
|
+
* Run ad blocker detection
|
|
1630
|
+
*/
|
|
1631
|
+
static async detect() {
|
|
1632
|
+
if (this.detected !== null)
|
|
1633
|
+
return {
|
|
1634
|
+
blocked: this.detected,
|
|
1635
|
+
method: this.detected ? "googletag" : "none"
|
|
1636
|
+
};
|
|
1637
|
+
if (this.detecting)
|
|
1638
|
+
return this.detecting;
|
|
1639
|
+
this.detecting = this.runDetection();
|
|
1640
|
+
const t = await this.detecting;
|
|
1641
|
+
return this.detecting = null, t;
|
|
1642
|
+
}
|
|
1643
|
+
/**
|
|
1644
|
+
* Initialize detection and apply body class if blocked
|
|
1645
|
+
*/
|
|
1646
|
+
static async init() {
|
|
1647
|
+
if (!this.config.enabled)
|
|
1648
|
+
return !1;
|
|
1649
|
+
const t = await this.detect();
|
|
1650
|
+
return t.blocked && this.config.addBodyClass && document.body.classList.add(this.config.bodyClass), window.dispatchEvent(
|
|
1651
|
+
new CustomEvent("adblock:detected", {
|
|
1652
|
+
detail: t
|
|
1653
|
+
})
|
|
1654
|
+
), t.blocked;
|
|
1655
|
+
}
|
|
1656
|
+
/**
|
|
1657
|
+
* Reset detection state
|
|
1658
|
+
*/
|
|
1659
|
+
static reset() {
|
|
1660
|
+
this.detected = null, this.detecting = null, window.adBlockDetected = void 0, this.config.addBodyClass && document.body.classList.remove(this.config.bodyClass);
|
|
1661
|
+
}
|
|
1662
|
+
static async runDetection() {
|
|
1663
|
+
const t = [
|
|
1664
|
+
() => this.testGoogleTag(),
|
|
1665
|
+
() => this.testBaitElement(),
|
|
1666
|
+
() => this.testFetch()
|
|
1667
|
+
];
|
|
1668
|
+
for (const e of t)
|
|
1669
|
+
try {
|
|
1670
|
+
const i = await e();
|
|
1671
|
+
if (i != null && i.blocked)
|
|
1672
|
+
return this.detected = !0, window.adBlockDetected = !0, i;
|
|
1673
|
+
} catch {
|
|
1674
|
+
}
|
|
1675
|
+
return this.detected = !1, window.adBlockDetected = !1, { blocked: !1, method: "none" };
|
|
1676
|
+
}
|
|
1677
|
+
/**
|
|
1678
|
+
* Method 1: Check if googletag loaded properly
|
|
1679
|
+
*/
|
|
1680
|
+
static testGoogleTag() {
|
|
1681
|
+
return new Promise((t) => {
|
|
1682
|
+
setTimeout(() => {
|
|
1683
|
+
const e = typeof window.googletag > "u" || typeof window.googletag.pubads != "function";
|
|
1684
|
+
t(e ? { blocked: !0, method: "googletag" } : null);
|
|
1685
|
+
}, 100);
|
|
1686
|
+
});
|
|
1687
|
+
}
|
|
1688
|
+
/**
|
|
1689
|
+
* Method 2: Bait element detection
|
|
1690
|
+
* Ad blockers often hide elements with common ad class names
|
|
1691
|
+
*/
|
|
1692
|
+
static testBaitElement() {
|
|
1693
|
+
return new Promise((t) => {
|
|
1694
|
+
const e = document.createElement("div");
|
|
1695
|
+
e.className = "adsbox ad-placement pub_300x250 pub_728x90 text-ad textAd text_ad", e.style.cssText = "position: absolute; top: -10px; left: -10px; width: 1px; height: 1px;", e.innerHTML = " ", document.body.appendChild(e), requestAnimationFrame(() => {
|
|
1696
|
+
const i = e.offsetHeight === 0 || e.offsetParent === null || window.getComputedStyle(e).display === "none" || window.getComputedStyle(e).visibility === "hidden";
|
|
1697
|
+
e.remove(), t(i ? { blocked: !0, method: "bait" } : null);
|
|
1028
1698
|
});
|
|
1029
1699
|
});
|
|
1030
|
-
}
|
|
1700
|
+
}
|
|
1701
|
+
/**
|
|
1702
|
+
* Method 3: Fetch a known ad resource
|
|
1703
|
+
*/
|
|
1704
|
+
static testFetch() {
|
|
1705
|
+
return new Promise((t) => {
|
|
1706
|
+
const e = new AbortController(), i = setTimeout(
|
|
1707
|
+
() => e.abort(),
|
|
1708
|
+
this.config.timeout
|
|
1709
|
+
);
|
|
1710
|
+
fetch("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js", {
|
|
1711
|
+
method: "HEAD",
|
|
1712
|
+
mode: "no-cors",
|
|
1713
|
+
signal: e.signal
|
|
1714
|
+
}).then(() => {
|
|
1715
|
+
clearTimeout(i), t(null);
|
|
1716
|
+
}).catch(() => {
|
|
1717
|
+
clearTimeout(i), t({ blocked: !0, method: "fetch" });
|
|
1718
|
+
});
|
|
1719
|
+
});
|
|
1720
|
+
}
|
|
1721
|
+
};
|
|
1722
|
+
D.config = St, D.detected = null, D.detecting = null;
|
|
1723
|
+
let kt = D;
|
|
1724
|
+
const st = 3e4, Et = {
|
|
1725
|
+
enabled: !1,
|
|
1726
|
+
interval: 6e4,
|
|
1727
|
+
checkVisibility: !0,
|
|
1728
|
+
disableOnSinglePost: !0,
|
|
1729
|
+
singlePostSelector: "body.single"
|
|
1730
|
+
}, N = class N {
|
|
1731
|
+
/**
|
|
1732
|
+
* Configure the refresh manager
|
|
1733
|
+
*/
|
|
1734
|
+
static configure(t) {
|
|
1735
|
+
this.config = { ...Et, ...t }, this.config.interval < st && (this.config.interval = st);
|
|
1736
|
+
}
|
|
1737
|
+
/**
|
|
1738
|
+
* Start auto-refresh loop
|
|
1739
|
+
*/
|
|
1740
|
+
static start() {
|
|
1741
|
+
!this.config.enabled || this.running || this.config.disableOnSinglePost && document.querySelector(this.config.singlePostSelector) || (this.running = !0, this.setupVisibilityTracking(), this.scheduleRefresh());
|
|
1742
|
+
}
|
|
1743
|
+
/**
|
|
1744
|
+
* Stop auto-refresh loop
|
|
1745
|
+
*/
|
|
1746
|
+
static stop() {
|
|
1747
|
+
this.running = !1, this.refreshTimer && (clearTimeout(this.refreshTimer), this.refreshTimer = null);
|
|
1748
|
+
}
|
|
1749
|
+
/**
|
|
1750
|
+
* Manually trigger a refresh (respects safeguards)
|
|
1751
|
+
*/
|
|
1752
|
+
static refresh(t) {
|
|
1753
|
+
return this.safeRefresh(t);
|
|
1754
|
+
}
|
|
1755
|
+
/**
|
|
1756
|
+
* Block refresh (e.g., during user interaction)
|
|
1757
|
+
*/
|
|
1758
|
+
static block() {
|
|
1759
|
+
window.DreamsBlockedRefresh = !0;
|
|
1760
|
+
}
|
|
1761
|
+
/**
|
|
1762
|
+
* Unblock refresh
|
|
1763
|
+
*/
|
|
1764
|
+
static unblock() {
|
|
1765
|
+
window.DreamsBlockedRefresh = !1;
|
|
1766
|
+
}
|
|
1767
|
+
/**
|
|
1768
|
+
* Check if refresh is currently blocked
|
|
1769
|
+
*/
|
|
1770
|
+
static isBlocked() {
|
|
1771
|
+
return window.DreamsBlockedRefresh === !0;
|
|
1772
|
+
}
|
|
1773
|
+
static setupVisibilityTracking() {
|
|
1774
|
+
typeof window > "u" || (window.isTabVisible = !document.hidden, document.addEventListener("visibilitychange", () => {
|
|
1775
|
+
window.isTabVisible = !document.hidden;
|
|
1776
|
+
}));
|
|
1777
|
+
}
|
|
1778
|
+
static scheduleRefresh() {
|
|
1779
|
+
this.running && (this.refreshTimer = setTimeout(() => {
|
|
1780
|
+
this.executeRefresh(), this.scheduleRefresh();
|
|
1781
|
+
}, this.config.interval));
|
|
1782
|
+
}
|
|
1783
|
+
static executeRefresh() {
|
|
1784
|
+
if (this.config.checkVisibility && !window.isTabVisible) {
|
|
1785
|
+
this.dispatchEvent("skipped", "hidden");
|
|
1786
|
+
return;
|
|
1787
|
+
}
|
|
1788
|
+
if (window.DreamsBlockedRefresh) {
|
|
1789
|
+
this.dispatchEvent("skipped", "blocked");
|
|
1790
|
+
return;
|
|
1791
|
+
}
|
|
1792
|
+
this.safeRefresh() || this.dispatchEvent("skipped", "throttled");
|
|
1793
|
+
}
|
|
1794
|
+
static safeRefresh(t) {
|
|
1795
|
+
var l;
|
|
1796
|
+
if (!((l = window.googletag) != null && l.pubads))
|
|
1797
|
+
return !1;
|
|
1798
|
+
const e = Date.now(), i = window.lastAdRefresh || 0;
|
|
1799
|
+
if (e - i < st)
|
|
1800
|
+
return !1;
|
|
1801
|
+
window.lastAdRefresh = e;
|
|
1802
|
+
const r = t || window.dreamsSlotsToUpdate || [], o = r.length;
|
|
1803
|
+
if (o === 0)
|
|
1804
|
+
return !1;
|
|
1805
|
+
try {
|
|
1806
|
+
return window.googletag.pubads().refresh(r, {
|
|
1807
|
+
changeCorrelator: !1
|
|
1808
|
+
}), this.dispatchEvent("refresh", void 0, o), !0;
|
|
1809
|
+
} catch {
|
|
1810
|
+
return !1;
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
static dispatchEvent(t, e, i = 0) {
|
|
1814
|
+
window.dispatchEvent(
|
|
1815
|
+
new CustomEvent("ad:refresh", {
|
|
1816
|
+
detail: {
|
|
1817
|
+
type: t,
|
|
1818
|
+
reason: e,
|
|
1819
|
+
slots: i,
|
|
1820
|
+
timestamp: Date.now()
|
|
1821
|
+
}
|
|
1822
|
+
})
|
|
1823
|
+
);
|
|
1824
|
+
}
|
|
1825
|
+
};
|
|
1826
|
+
N.config = Et, N.refreshTimer = null, N.running = !1;
|
|
1827
|
+
let Tt = N;
|
|
1828
|
+
const xt = {
|
|
1829
|
+
enabled: "auto",
|
|
1830
|
+
prefix: "[DreamsAdEngine]",
|
|
1831
|
+
verbose: !1
|
|
1832
|
+
}, dt = class dt {
|
|
1833
|
+
/**
|
|
1834
|
+
* Configure the logger
|
|
1835
|
+
*/
|
|
1836
|
+
static configure(t) {
|
|
1837
|
+
this.config = { ...xt, ...t };
|
|
1838
|
+
}
|
|
1839
|
+
/**
|
|
1840
|
+
* Log info message
|
|
1841
|
+
*/
|
|
1842
|
+
static log(t, ...e) {
|
|
1843
|
+
this.shouldLog() && console.log(`${this.config.prefix} ${t}`, ...e);
|
|
1844
|
+
}
|
|
1845
|
+
/**
|
|
1846
|
+
* Log warning message
|
|
1847
|
+
*/
|
|
1848
|
+
static warn(t, ...e) {
|
|
1849
|
+
this.shouldLog() && console.warn(`${this.config.prefix} ${t}`, ...e);
|
|
1850
|
+
}
|
|
1851
|
+
/**
|
|
1852
|
+
* Log error message (always logs in production, but less verbose)
|
|
1853
|
+
*/
|
|
1854
|
+
static error(t, ...e) {
|
|
1855
|
+
this.isProduction() ? console.error(`${this.config.prefix} Error: ${t}`) : console.error(`${this.config.prefix} ${t}`, ...e);
|
|
1856
|
+
}
|
|
1857
|
+
/**
|
|
1858
|
+
* Log verbose/debug message (only when verbose is enabled)
|
|
1859
|
+
*/
|
|
1860
|
+
static debug(t, ...e) {
|
|
1861
|
+
!this.shouldLog() || !this.config.verbose || console.debug(`${this.config.prefix} ${t}`, ...e);
|
|
1862
|
+
}
|
|
1863
|
+
/**
|
|
1864
|
+
* Log a table (useful for metrics)
|
|
1865
|
+
*/
|
|
1866
|
+
static table(t) {
|
|
1867
|
+
this.shouldLog() && console.table(t);
|
|
1868
|
+
}
|
|
1869
|
+
/**
|
|
1870
|
+
* Group logs together
|
|
1871
|
+
*/
|
|
1872
|
+
static group(t) {
|
|
1873
|
+
this.shouldLog() && console.group(`${this.config.prefix} ${t}`);
|
|
1874
|
+
}
|
|
1875
|
+
/**
|
|
1876
|
+
* End log group
|
|
1877
|
+
*/
|
|
1878
|
+
static groupEnd() {
|
|
1879
|
+
this.shouldLog() && console.groupEnd();
|
|
1880
|
+
}
|
|
1881
|
+
/**
|
|
1882
|
+
* Time a operation
|
|
1883
|
+
*/
|
|
1884
|
+
static time(t) {
|
|
1885
|
+
this.shouldLog() && console.time(`${this.config.prefix} ${t}`);
|
|
1886
|
+
}
|
|
1887
|
+
/**
|
|
1888
|
+
* End timing
|
|
1889
|
+
*/
|
|
1890
|
+
static timeEnd(t) {
|
|
1891
|
+
this.shouldLog() && console.timeEnd(`${this.config.prefix} ${t}`);
|
|
1892
|
+
}
|
|
1893
|
+
static shouldLog() {
|
|
1894
|
+
return this.config.enabled === !0 ? !0 : this.config.enabled === !1 ? !1 : !this.isProduction();
|
|
1895
|
+
}
|
|
1896
|
+
static isProduction() {
|
|
1897
|
+
if (typeof window > "u") return !0;
|
|
1898
|
+
const t = window.location.hostname;
|
|
1899
|
+
return t !== "localhost" && !t.includes(".local") && !t.includes("127.0.0.1") && !t.includes("192.168.") && !t.includes("0.0.0.0");
|
|
1900
|
+
}
|
|
1901
|
+
};
|
|
1902
|
+
dt.config = xt;
|
|
1903
|
+
let zt = dt;
|
|
1904
|
+
const Ct = {
|
|
1905
|
+
enabled: !1,
|
|
1906
|
+
positions: [],
|
|
1907
|
+
minViewportHeight: 768,
|
|
1908
|
+
topOffset: 80,
|
|
1909
|
+
headerSelector: null,
|
|
1910
|
+
smoothTransition: !0,
|
|
1911
|
+
transitionDuration: 150
|
|
1912
|
+
}, R = class R {
|
|
1913
|
+
/**
|
|
1914
|
+
* Configure the sticky manager
|
|
1915
|
+
*/
|
|
1916
|
+
static configure(t) {
|
|
1917
|
+
this.config = { ...Ct, ...t };
|
|
1918
|
+
}
|
|
1919
|
+
/**
|
|
1920
|
+
* Check if a position supports sticky
|
|
1921
|
+
*/
|
|
1922
|
+
static isStickyPosition(t) {
|
|
1923
|
+
return this.config.positions.includes(t);
|
|
1924
|
+
}
|
|
1925
|
+
/**
|
|
1926
|
+
* Enable sticky behavior for an ad element
|
|
1927
|
+
*/
|
|
1928
|
+
static enable(t, e, i) {
|
|
1929
|
+
if (!this.config.enabled || !this.isStickyPosition(i) || this.stickyAds.has(e) || window.innerHeight < this.config.minViewportHeight)
|
|
1930
|
+
return !1;
|
|
1931
|
+
const s = t.querySelector(
|
|
1932
|
+
'[class*="ad-serving"]'
|
|
1933
|
+
);
|
|
1934
|
+
if (!s) return !1;
|
|
1935
|
+
const r = this.getTopOffset();
|
|
1936
|
+
this.config.smoothTransition && (s.style.transition = `top ${this.config.transitionDuration}ms ease-out`), s.style.position = "sticky", s.style.top = `${r}px`, s.style.alignSelf = "flex-start", s.style.zIndex = "10";
|
|
1937
|
+
const o = {
|
|
1938
|
+
adId: e,
|
|
1939
|
+
position: i,
|
|
1940
|
+
stickyTime: 0,
|
|
1941
|
+
totalTime: 0,
|
|
1942
|
+
isCurrentlySticky: !1
|
|
1943
|
+
}, l = () => this.handleScroll(e, r), a = {
|
|
1944
|
+
element: s,
|
|
1945
|
+
container: t,
|
|
1946
|
+
metrics: o,
|
|
1947
|
+
startTime: Date.now(),
|
|
1948
|
+
stickyStartTime: null,
|
|
1949
|
+
scrollHandler: l
|
|
1950
|
+
};
|
|
1951
|
+
return this.stickyAds.set(e, a), window.addEventListener("scroll", l, { passive: !0 }), !0;
|
|
1952
|
+
}
|
|
1953
|
+
/**
|
|
1954
|
+
* Disable sticky behavior for an ad
|
|
1955
|
+
*/
|
|
1956
|
+
static disable(t) {
|
|
1957
|
+
const e = this.stickyAds.get(t);
|
|
1958
|
+
e && (e.element.style.position = "", e.element.style.top = "", e.element.style.alignSelf = "", e.element.style.zIndex = "", e.element.style.transition = "", window.removeEventListener("scroll", e.scrollHandler), this.stickyAds.delete(t));
|
|
1959
|
+
}
|
|
1960
|
+
/**
|
|
1961
|
+
* Get metrics for a sticky ad
|
|
1962
|
+
*/
|
|
1963
|
+
static getMetrics(t) {
|
|
1964
|
+
const e = this.stickyAds.get(t);
|
|
1965
|
+
return e ? (e.metrics.totalTime = Date.now() - e.startTime, { ...e.metrics }) : null;
|
|
1966
|
+
}
|
|
1967
|
+
/**
|
|
1968
|
+
* Get all sticky metrics
|
|
1969
|
+
*/
|
|
1970
|
+
static getAllMetrics() {
|
|
1971
|
+
return Array.from(this.stickyAds.values()).map((t) => (t.metrics.totalTime = Date.now() - t.startTime, { ...t.metrics }));
|
|
1972
|
+
}
|
|
1973
|
+
/**
|
|
1974
|
+
* Reset all sticky ads
|
|
1975
|
+
*/
|
|
1976
|
+
static reset() {
|
|
1977
|
+
for (const t of this.stickyAds.keys())
|
|
1978
|
+
this.disable(t);
|
|
1979
|
+
}
|
|
1980
|
+
static getTopOffset() {
|
|
1981
|
+
if (this.config.headerSelector) {
|
|
1982
|
+
const t = document.querySelector(
|
|
1983
|
+
this.config.headerSelector
|
|
1984
|
+
);
|
|
1985
|
+
if (t)
|
|
1986
|
+
return t.offsetHeight + 10;
|
|
1987
|
+
}
|
|
1988
|
+
return this.config.topOffset;
|
|
1989
|
+
}
|
|
1990
|
+
static handleScroll(t, e) {
|
|
1991
|
+
const i = Date.now();
|
|
1992
|
+
i - this.lastScrollTime < 100 || (this.lastScrollTime = i, requestAnimationFrame(() => this.checkSticky(t, e)));
|
|
1993
|
+
}
|
|
1994
|
+
static checkSticky(t, e) {
|
|
1995
|
+
const i = this.stickyAds.get(t);
|
|
1996
|
+
if (!i) return;
|
|
1997
|
+
const r = i.element.getBoundingClientRect().top <= e + 5;
|
|
1998
|
+
r && !i.stickyStartTime ? (i.stickyStartTime = Date.now(), i.metrics.isCurrentlySticky = !0, this.dispatchEvent("sticky:start", t, i.metrics)) : !r && i.stickyStartTime && (i.metrics.stickyTime += Date.now() - i.stickyStartTime, i.stickyStartTime = null, i.metrics.isCurrentlySticky = !1, this.dispatchEvent("sticky:end", t, i.metrics));
|
|
1999
|
+
}
|
|
2000
|
+
static dispatchEvent(t, e, i) {
|
|
2001
|
+
window.dispatchEvent(
|
|
2002
|
+
new CustomEvent(t, {
|
|
2003
|
+
detail: {
|
|
2004
|
+
adId: e,
|
|
2005
|
+
metrics: { ...i },
|
|
2006
|
+
timestamp: Date.now()
|
|
2007
|
+
}
|
|
2008
|
+
})
|
|
2009
|
+
);
|
|
2010
|
+
}
|
|
1031
2011
|
};
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
l.old_url = "";
|
|
1035
|
-
l.initialized_aps = !1;
|
|
1036
|
-
c([
|
|
1037
|
-
g({ type: String })
|
|
1038
|
-
], l.prototype, "networkId", 2);
|
|
1039
|
-
c([
|
|
1040
|
-
g({ type: String })
|
|
1041
|
-
], l.prototype, "adUnit", 2);
|
|
1042
|
-
c([
|
|
1043
|
-
g({ type: String })
|
|
1044
|
-
], l.prototype, "divId", 2);
|
|
1045
|
-
c([
|
|
1046
|
-
g({ type: String })
|
|
1047
|
-
], l.prototype, "slot", 2);
|
|
1048
|
-
c([
|
|
1049
|
-
g({ type: Array })
|
|
1050
|
-
], l.prototype, "mapping", 2);
|
|
1051
|
-
c([
|
|
1052
|
-
g({ type: Array })
|
|
1053
|
-
], l.prototype, "sizing", 2);
|
|
1054
|
-
c([
|
|
1055
|
-
g({ type: Array })
|
|
1056
|
-
], l.prototype, "targeting", 2);
|
|
1057
|
-
c([
|
|
1058
|
-
g({ type: Boolean, reflect: !0 })
|
|
1059
|
-
], l.prototype, "autoTargeting", 2);
|
|
1060
|
-
c([
|
|
1061
|
-
Jt()
|
|
1062
|
-
], l.prototype, "resolvedTargeting", 2);
|
|
1063
|
-
c([
|
|
1064
|
-
g({ type: Boolean, reflect: !0 })
|
|
1065
|
-
], l.prototype, "setCentering", 2);
|
|
1066
|
-
c([
|
|
1067
|
-
g({ type: Boolean, reflect: !0 })
|
|
1068
|
-
], l.prototype, "enableLazyLoad", 2);
|
|
1069
|
-
c([
|
|
1070
|
-
g({ type: Object })
|
|
1071
|
-
], l.prototype, "configLazyLoad", 2);
|
|
1072
|
-
c([
|
|
1073
|
-
g({ type: Boolean, reflect: !0 })
|
|
1074
|
-
], l.prototype, "refresh", 2);
|
|
1075
|
-
c([
|
|
1076
|
-
g({ type: Boolean, reflect: !0 })
|
|
1077
|
-
], l.prototype, "enableTitle", 2);
|
|
1078
|
-
c([
|
|
1079
|
-
g({ type: Boolean, reflect: !0 })
|
|
1080
|
-
], l.prototype, "apstag", 2);
|
|
1081
|
-
c([
|
|
1082
|
-
g({ type: String })
|
|
1083
|
-
], l.prototype, "pubId", 2);
|
|
1084
|
-
c([
|
|
1085
|
-
g({ type: Number })
|
|
1086
|
-
], l.prototype, "bidTimeout", 2);
|
|
1087
|
-
c([
|
|
1088
|
-
g({ type: String })
|
|
1089
|
-
], l.prototype, "title", 2);
|
|
1090
|
-
c([
|
|
1091
|
-
g({ type: Boolean })
|
|
1092
|
-
], l.prototype, "adLoaded", 2);
|
|
1093
|
-
l = c([
|
|
1094
|
-
Wt("dreams-ad-engine")
|
|
1095
|
-
], l);
|
|
2012
|
+
R.config = Ct, R.stickyAds = /* @__PURE__ */ new Map(), R.lastScrollTime = 0;
|
|
2013
|
+
let Pt = R;
|
|
1096
2014
|
export {
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
2015
|
+
kt as AdBlockDetector,
|
|
2016
|
+
ge as DEFAULT_SLOTS,
|
|
2017
|
+
d as DreamsAdComponent,
|
|
2018
|
+
_ as DreamsAdConfig,
|
|
2019
|
+
E as DreamsAdSkeleton,
|
|
2020
|
+
K as DreamsTargetingService,
|
|
2021
|
+
zt as Logger,
|
|
2022
|
+
Tt as RefreshManager,
|
|
2023
|
+
Pt as StickyManager,
|
|
2024
|
+
Z as ViewabilityService,
|
|
2025
|
+
ye as getSkeletonDimensions
|
|
1101
2026
|
};
|