powered-ad-config 0.1.90 → 0.1.92
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/powered-ad-config.es.js +305 -299
- package/dist/powered-ad-config.umd.js +8 -67
- package/package.json +1 -1
|
@@ -56,10 +56,10 @@ var e = (e, t, n) => {
|
|
|
56
56
|
let e = window.parent.document, t = (e, t) => e.forEach((e) => t.forEach(([t, n]) => e.style[t] = n));
|
|
57
57
|
e.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector("article")?.setAttribute("style", "position:relative"), e.querySelector("#article")?.setAttribute("style", "position:relative"), e.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), e.querySelector("#Index")?.setAttribute("style", "position:relative"), e.querySelector(".show")?.setAttribute("style", "position:relative"), e.querySelector("#adspot-desktop-banner-7-below")?.setAttribute("style", "position:relative"), t(e.querySelectorAll(".column"), [["position", "relative"]]), t(e.querySelectorAll(".advert"), [["position", "relative"]]), t(e.querySelectorAll("blockquote"), [["zIndex", "1"]]), e.querySelector("div[class*=\"article__MyContainer\"]")?.setAttribute("style", "max-width:1190px;margin-top:-24px"), e.querySelector("div[type=\"BANNER\"]")?.setAttribute("style", "display:none"), e.querySelector("div[type=\"MBANNER\"]")?.setAttribute("style", "display:none");
|
|
58
58
|
}
|
|
59
|
-
}, v = (e, t = m) => r(t, e), y = (e, t = m) => i(t, e), b = () => v("app") || m.querySelector("#app.nine, #app"), x = () => {
|
|
59
|
+
}, v = (e, t = m) => r(t, e), y = (e, t = m) => i(t, e), b = () => v("app") || m.querySelector("#app.nine, #app.wwos, #app"), x = () => {
|
|
60
60
|
let e = b();
|
|
61
61
|
if (!e) return null;
|
|
62
|
-
let t = v("header-ad-desktop", e) || m.querySelector("#desktop-header-ads"), n = v("header", e) || v("tv-show-banner", e) || e.querySelector(":scope > header"), r = o(e, t) || o(e,
|
|
62
|
+
let t = v("header-ad-desktop", e) || m.querySelector("#desktop-header-ads"), n = v("header", e) || v("tv-show-banner", e) || e.querySelector(":scope > header"), r = o(e, t) || o(e, k()) || t;
|
|
63
63
|
return t && r && n ? {
|
|
64
64
|
appRoot: e,
|
|
65
65
|
headerShell: n,
|
|
@@ -71,7 +71,24 @@ var e = (e, t, n) => {
|
|
|
71
71
|
if (!e.querySelector("div[id*=\"tablet\"][id*=\"takeover\"]")) return;
|
|
72
72
|
let t = e.getElementById("powered-ac-tablet-takeover-static-fix");
|
|
73
73
|
t || (t = e.createElement("style"), t.id = "powered-ac-tablet-takeover-static-fix", e.head.appendChild(t)), t.textContent = "\n div:has(#adspot-tablet-takeover-2-above) {\n position: static;\n }\n ";
|
|
74
|
-
}, w = {
|
|
74
|
+
}, w = () => {
|
|
75
|
+
let r = window.parent.document, i = e, o = t, s = (e) => e ? Array.from(e.querySelectorAll(":scope > main, :scope > aside, :scope > footer")) : [], c = (e) => a([v("page-container", e), v("container", e)]), l = (e) => a([
|
|
76
|
+
...y("main", e),
|
|
77
|
+
...y("sidebar", e),
|
|
78
|
+
...y("footer", e)
|
|
79
|
+
]), u = (e, t) => {
|
|
80
|
+
n(r, e, t);
|
|
81
|
+
}, d = (e) => {
|
|
82
|
+
o(Array.from(e.querySelectorAll("*")).filter((e) => e.children.length > 0 ? !1 : e.textContent?.trim().toLowerCase() === "advertisement"), [["display", "none"]]);
|
|
83
|
+
};
|
|
84
|
+
i(r.querySelector("section[data-section=\"marketing-banner\"]"), "position", "relative"), i(r.querySelector("div[data-testid=\"live-tv\"]")?.parentNode, "position", "relative"), i(r.querySelector("div[data-contentunit-id=\"stan\"]")?.parentNode, "position", "relative"), i(r.querySelector("small"), "position", "inherit");
|
|
85
|
+
let f = x(), p = f?.appRoot, m = f?.desktopHeaderAds, h = f?.billboardContainer;
|
|
86
|
+
if (p) {
|
|
87
|
+
let e = f.headerShell, t = v("header-nav", p), n = c(p), r = l(p), g = y("sidebar-sticky", p), _ = Array.from(p.children).filter((e) => e.tagName !== "SCRIPT"), b = h ? _.indexOf(h) : -1, x = _.filter((e, t) => t < b), S = n.length > 0 ? n : b >= 0 ? _.filter((t, n) => n > b && t !== e) : _.filter((t) => t !== m && t !== e);
|
|
88
|
+
i(m, "height", "250px"), i(m, "padding", "0px"), m && d(m), o(x, [["position", "relative"], ["zIndex", "1085"]]), i(e, "zIndex", "1085"), i(t, "position", "relative"), i(t, "zIndex", "1086"), u("powered-ac-nine-new-header-overrides", "\n #app > [data-ad-target=\"header\"] {\n width: min(1190px, calc(100vw - 32px)) !important;\n max-width: min(1190px, calc(100vw - 32px)) !important;\n left: 50% !important;\n right: auto !important;\n transform: translateX(-50%) !important;\n margin-left: 0 !important;\n margin-right: 0 !important;\n z-index: 1090 !important;\n }\n\n #app > [data-ad-target=\"tv-show-banner\"],\n #app > header[data-tv-show] {\n width: min(1190px, calc(100vw - 32px)) !important;\n max-width: min(1190px, calc(100vw - 32px)) !important;\n left: auto !important;\n right: auto !important;\n transform: none !important;\n margin-left: auto !important;\n margin-right: auto !important;\n z-index: 1085 !important;\n }\n\n #app > [data-ad-target=\"header\"] > div:not(header),\n #app > header[data-tv-show] > div:not(header) {\n z-index: 1088 !important;\n position: relative !important;\n }\n\n #app [data-ad-target=\"header\"] header {\n position: relative;\n }\n\n #app [data-ad-target=\"header-nav\"] {\n width: 100%;\n max-width: 100%;\n margin-left: 0;\n margin-right: 0;\n left: auto !important;\n right: auto !important;\n transform: none !important;\n position: relative !important;\n overflow: visible !important;\n z-index: 1086 !important;\n }\n\n #app [data-ad-target=\"header-nav\"] nav {\n width: 100% !important;\n max-width: 100% !important;\n overflow: visible !important;\n }\n\n #app [data-ad-target=\"nav-dropdown\"] {\n position: absolute !important;\n top: 100% !important;\n left: 50% !important;\n right: auto !important;\n width: min(1190px, calc(100vw - 32px)) !important;\n max-width: min(1190px, calc(100vw - 32px)) !important;\n transform: translateX(-50%) !important;\n z-index: 1089 !important;\n }\n "), o(S, [["position", "relative"], ["zIndex", "1071"]]), o(a([...r, ...S.flatMap((e) => s(e))]), [["position", "relative"], ["zIndex", "1072"]]), o(g, [["zIndex", "1072"]]);
|
|
89
|
+
}
|
|
90
|
+
C(r);
|
|
91
|
+
}, T = {
|
|
75
92
|
siteBackgroundColor: "#ffffff",
|
|
76
93
|
fireplaceLeftMargin: 0,
|
|
77
94
|
adNodeMarginTop: 0,
|
|
@@ -86,25 +103,8 @@ var e = (e, t, n) => {
|
|
|
86
103
|
offset: 74,
|
|
87
104
|
isSticky: !0
|
|
88
105
|
},
|
|
89
|
-
zIndex:
|
|
90
|
-
|
|
91
|
-
...y("main", e),
|
|
92
|
-
...y("sidebar", e),
|
|
93
|
-
...y("footer", e)
|
|
94
|
-
]), u = (e, t) => {
|
|
95
|
-
n(r, e, t);
|
|
96
|
-
}, d = (e) => {
|
|
97
|
-
o(Array.from(e.querySelectorAll("*")).filter((e) => e.children.length > 0 ? !1 : e.textContent?.trim().toLowerCase() === "advertisement"), [["display", "none"]]);
|
|
98
|
-
};
|
|
99
|
-
i(r.querySelector("section[data-section=\"marketing-banner\"]"), "position", "relative"), i(r.querySelector("div[data-testid=\"live-tv\"]")?.parentNode, "position", "relative"), i(r.querySelector("div[data-contentunit-id=\"stan\"]")?.parentNode, "position", "relative"), i(r.querySelector("small"), "position", "inherit");
|
|
100
|
-
let f = x(), p = f?.appRoot, m = f?.desktopHeaderAds, h = f?.billboardContainer;
|
|
101
|
-
if (p) {
|
|
102
|
-
let e = f.headerShell, t = v("header-nav", p), n = c(p), r = l(p), g = y("sidebar-sticky", p), _ = Array.from(p.children).filter((e) => e.tagName !== "SCRIPT"), b = h ? _.indexOf(h) : -1, x = _.filter((e, t) => t < b), S = n.length > 0 ? n : b >= 0 ? _.filter((t, n) => n > b && t !== e) : _.filter((t) => t !== m && t !== e);
|
|
103
|
-
i(m, "height", "250px"), i(m, "padding", "0px"), m && d(m), o(x, [["position", "relative"], ["zIndex", "1085"]]), i(e, "zIndex", "1085"), i(t, "position", "relative"), i(t, "zIndex", "1086"), u("powered-ac-nine-new-header-overrides", "\n #app > [data-ad-target=\"header\"] {\n width: min(1190px, calc(100vw - 32px)) !important;\n max-width: min(1190px, calc(100vw - 32px)) !important;\n left: 50% !important;\n right: auto !important;\n transform: translateX(-50%) !important;\n margin-left: 0 !important;\n margin-right: 0 !important;\n z-index: 1090 !important;\n }\n\n #app > [data-ad-target=\"tv-show-banner\"],\n #app > header[data-tv-show] {\n width: min(1190px, calc(100vw - 32px)) !important;\n max-width: min(1190px, calc(100vw - 32px)) !important;\n left: auto !important;\n right: auto !important;\n transform: none !important;\n margin-left: auto !important;\n margin-right: auto !important;\n z-index: 1085 !important;\n }\n\n #app > [data-ad-target=\"header\"] > div:not(header),\n #app > header[data-tv-show] > div:not(header) {\n z-index: 1088 !important;\n position: relative !important;\n }\n\n #app [data-ad-target=\"header\"] header {\n position: relative;\n }\n\n #app [data-ad-target=\"header-nav\"] {\n width: 100%;\n max-width: 100%;\n margin-left: 0;\n margin-right: 0;\n left: auto !important;\n right: auto !important;\n transform: none !important;\n position: relative !important;\n overflow: visible !important;\n z-index: 1086 !important;\n }\n\n #app [data-ad-target=\"header-nav\"] nav {\n width: 100% !important;\n max-width: 100% !important;\n overflow: visible !important;\n }\n\n #app [data-ad-target=\"nav-dropdown\"] {\n position: absolute !important;\n top: 100% !important;\n left: 50% !important;\n right: auto !important;\n width: min(1190px, calc(100vw - 32px)) !important;\n max-width: min(1190px, calc(100vw - 32px)) !important;\n transform: translateX(-50%) !important;\n z-index: 1089 !important;\n }\n "), o(S, [["position", "relative"], ["zIndex", "1071"]]), o(a([...r, ...S.flatMap((e) => s(e))]), [["position", "relative"], ["zIndex", "1072"]]), o(g, [["zIndex", "1072"]]);
|
|
104
|
-
}
|
|
105
|
-
C(r);
|
|
106
|
-
}
|
|
107
|
-
}, T = {
|
|
106
|
+
zIndex: w
|
|
107
|
+
}, E = {
|
|
108
108
|
siteBackgroundColor: "#ffffff",
|
|
109
109
|
fireplaceLeftMargin: 0,
|
|
110
110
|
adNodeMarginTop: 0,
|
|
@@ -119,45 +119,40 @@ var e = (e, t, n) => {
|
|
|
119
119
|
isSticky: !0
|
|
120
120
|
},
|
|
121
121
|
zIndex: function() {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
...y("footer", u || r)
|
|
128
|
-
]), _ = y("sidebar-sticky", u || r);
|
|
129
|
-
d && (i(d, "height", "250px"), i(d, "padding", "0px"), l(d)), i(p, "zIndex", "1085"), i(m, "position", "relative"), i(m, "zIndex", "1086"), c("powered-ac-nine-sport-header-overrides", "\n #app.wwos > [data-ad-target=\"header\"] {\n width: min(1190px, calc(100vw - 32px)) !important;\n max-width: min(1190px, calc(100vw - 32px)) !important;\n left: 50% !important;\n right: auto !important;\n transform: translateX(-50%) !important;\n margin-left: 0 !important;\n margin-right: 0 !important;\n z-index: 1090 !important;\n }\n\n #app.wwos > [data-ad-target=\"tv-show-banner\"],\n #app.wwos > header[data-tv-show] {\n width: min(1190px, calc(100vw - 32px)) !important;\n max-width: min(1190px, calc(100vw - 32px)) !important;\n left: auto !important;\n right: auto !important;\n transform: none !important;\n margin-left: auto !important;\n margin-right: auto !important;\n z-index: 1085 !important;\n }\n\n #app.wwos > [data-ad-target=\"header\"] > div:not(header),\n #app.wwos > header[data-tv-show] > div:not(header) {\n z-index: 1088 !important;\n position: relative !important;\n }\n\n #app.wwos [data-ad-target=\"header-nav\"] [role=\"menuitem\"][aria-haspopup=\"menu\"] {\n position: static;\n }\n\n #app.wwos [data-ad-target=\"nav-dropdown\"] {\n position: absolute !important;\n top: 100% !important;\n left: 50% !important;\n right: auto !important;\n width: min(1190px, calc(100vw - 32px)) !important;\n max-width: min(1190px, calc(100vw - 32px)) !important;\n transform: translateX(-50%) !important;\n z-index: 1088 !important;\n }\n\n #app.wwos [data-ad-target=\"header-nav\"] {\n width: 100%;\n max-width: 100%;\n margin-left: 0;\n margin-right: 0;\n left: auto !important;\n right: auto !important;\n transform: none !important;\n position: relative !important;\n overflow: visible !important;\n z-index: 1086 !important;\n }\n\n #app.wwos [data-ad-target=\"header-nav\"] nav {\n width: 100% !important;\n max-width: 100% !important;\n overflow: visible !important;\n }\n "), o(h.length > 0 ? h : f.filter((e) => e !== d && e !== p), [["position", "relative"], ["zIndex", "1071"]]), o(a([...g, ...Array.from(r.querySelectorAll("main, aside, article, footer, [id*=\"adspot-desktop-banner-\"]"))]), [["position", "relative"], ["zIndex", "1072"]]), o(_, [["zIndex", "1072"]]);
|
|
130
|
-
let b = s(r.querySelector("footer"), "div");
|
|
131
|
-
b && (b.style.position = "relative"), C(r);
|
|
122
|
+
w();
|
|
123
|
+
let r = window.parent.document, i = e, a = t, o = (e, t) => n(r, e, t), c = b();
|
|
124
|
+
o("powered-ac-nine-sport-header-overrides", "\n #app [data-ad-target=\"header-nav\"] [role=\"menuitem\"][aria-haspopup=\"menu\"] {\n position: static;\n }\n "), a(Array.from(r.querySelectorAll("main, aside, article, footer, [id*=\"adspot-desktop-banner-\"]")), [["position", "relative"], ["zIndex", "1072"]]), a(y("sidebar-sticky", c || r), [["zIndex", "1072"]]);
|
|
125
|
+
let l = s(r.querySelector("footer"), "div");
|
|
126
|
+
l && i(l, "position", "relative");
|
|
132
127
|
}
|
|
133
|
-
},
|
|
128
|
+
}, D = [
|
|
134
129
|
{
|
|
135
130
|
site: "https://www.nine.com.au/sport",
|
|
136
|
-
config:
|
|
131
|
+
config: E
|
|
137
132
|
},
|
|
138
133
|
{
|
|
139
134
|
site: "https://www.nine.com.au/entertainment",
|
|
140
|
-
config:
|
|
135
|
+
config: T
|
|
141
136
|
},
|
|
142
137
|
{
|
|
143
138
|
site: "https://staging.nine.com.au/sport",
|
|
144
|
-
config:
|
|
139
|
+
config: E
|
|
145
140
|
},
|
|
146
141
|
{
|
|
147
142
|
site: "https://staging.nine.com.au/entertainment",
|
|
148
|
-
config:
|
|
143
|
+
config: T
|
|
149
144
|
},
|
|
150
145
|
{
|
|
151
146
|
site: "https://www.nine.com.au",
|
|
152
|
-
config:
|
|
147
|
+
config: T
|
|
153
148
|
},
|
|
154
149
|
{
|
|
155
150
|
site: "https://www.nine",
|
|
156
|
-
config:
|
|
151
|
+
config: T
|
|
157
152
|
},
|
|
158
153
|
{
|
|
159
154
|
site: "https://staging.nine",
|
|
160
|
-
config:
|
|
155
|
+
config: T
|
|
161
156
|
},
|
|
162
157
|
{
|
|
163
158
|
site: "https://www.yourtv",
|
|
@@ -167,12 +162,12 @@ var e = (e, t, n) => {
|
|
|
167
162
|
site: "https://staging.yourtv",
|
|
168
163
|
config: _
|
|
169
164
|
}
|
|
170
|
-
],
|
|
165
|
+
], O = () => {
|
|
171
166
|
let e = window.document.getElementById("nineContent");
|
|
172
|
-
if (e && (e.style.backgroundColor =
|
|
173
|
-
let e =
|
|
167
|
+
if (e && (e.style.backgroundColor = L.siteBackgroundColor), N(), M(), j(), p.addEventListener("scroll", I), R = setTimeout(I, 50), L === T || L === E) {
|
|
168
|
+
let e = L === T || L === E ? x() : null, t = e?.appRoot || S() || m.body, n = e?.desktopHeaderAds || m.querySelector("#desktop-header-ads");
|
|
174
169
|
t && p.MutationObserver && (g = new p.MutationObserver(() => {
|
|
175
|
-
|
|
170
|
+
F();
|
|
176
171
|
}), g.observe(t, {
|
|
177
172
|
childList: !0,
|
|
178
173
|
subtree: !0
|
|
@@ -181,62 +176,62 @@ var e = (e, t, n) => {
|
|
|
181
176
|
subtree: !0,
|
|
182
177
|
attributes: !0,
|
|
183
178
|
attributeFilter: ["class"]
|
|
184
|
-
})), p.addEventListener("resize",
|
|
179
|
+
})), p.addEventListener("resize", F), F();
|
|
185
180
|
}
|
|
186
|
-
},
|
|
181
|
+
}, k = () => {
|
|
187
182
|
let e = null;
|
|
188
183
|
return e = m.querySelector("div[id*=\"billboard\"][id*=\"above\"]"), e;
|
|
189
|
-
},
|
|
184
|
+
}, A = () => {
|
|
190
185
|
let e = p.location.href;
|
|
191
|
-
for (let t = 0; t <
|
|
186
|
+
for (let t = 0; t < D.length; t += 1) if (e.indexOf(D[t].site) >= 0) return D[t].config;
|
|
192
187
|
try {
|
|
193
188
|
let t = new URL(e), n = t.hostname.toLowerCase(), r = t.pathname.toLowerCase();
|
|
194
189
|
if (n.includes("yourtv")) return _;
|
|
195
|
-
if (r.startsWith("/sport")) return
|
|
190
|
+
if (r.startsWith("/sport")) return E;
|
|
196
191
|
} catch {
|
|
197
|
-
return
|
|
192
|
+
return T;
|
|
198
193
|
}
|
|
199
|
-
return
|
|
200
|
-
},
|
|
194
|
+
return T;
|
|
195
|
+
}, j = () => {
|
|
201
196
|
if (!window.parent) return;
|
|
202
197
|
let e = m.querySelector("div[id*=\"halfpage\"][id*=\"above\"]");
|
|
203
198
|
if (!e) return;
|
|
204
199
|
let t = e;
|
|
205
200
|
for (let e = 0; e < 6; e++) if (t = t.parentNode, t && p.getComputedStyle(t).position === "sticky") {
|
|
206
|
-
t.style.top = `${
|
|
201
|
+
t.style.top = `${L.stickyMargin.offset}px`;
|
|
207
202
|
break;
|
|
208
203
|
}
|
|
209
|
-
},
|
|
204
|
+
}, M = () => {
|
|
210
205
|
if (!f) return;
|
|
211
206
|
let e = f.style;
|
|
212
|
-
e.width =
|
|
207
|
+
e.width = L.iframeWidth || "100%", e.height = L.iframeHeight || l, e.backgroundColor = L.iframeBackgroundColor || u, e.position = "fixed", L.iframeTop == null ? e.removeProperty("top") : e.top = L.iframeTop, e.left = "50%", e.transform = "translate(-50%, 0)";
|
|
213
208
|
let t = f.parentElement;
|
|
214
209
|
for (; t && t !== m.body && t !== m.documentElement;) {
|
|
215
210
|
let e = p.getComputedStyle(t);
|
|
216
211
|
e.transform && e.transform !== "none" && (t.style.transform = "none"), e.willChange && e.willChange !== "auto" && (t.style.willChange = "auto"), e.contain && e.contain !== "none" && (t.style.contain = "none"), e.filter && e.filter !== "none" && (t.style.filter = "none"), e.perspective && e.perspective !== "none" && (t.style.perspective = "none"), e.overflow !== "visible" && (t.style.overflow = "visible"), t = t.parentElement;
|
|
217
212
|
}
|
|
218
|
-
},
|
|
219
|
-
let e =
|
|
213
|
+
}, N = () => {
|
|
214
|
+
let e = k();
|
|
220
215
|
if (!e) return;
|
|
221
|
-
c(e, "0.1.
|
|
216
|
+
c(e, "0.1.92");
|
|
222
217
|
let t = e.style;
|
|
223
|
-
e.className &&= "", t.minHeight = "250px", t.marginTop =
|
|
224
|
-
},
|
|
218
|
+
e.className &&= "", t.minHeight = "250px", t.marginTop = L.adNodeMarginTop + "px", t.marginBottom = L.adNodeMarginBottom + "px", t.position = "static", t.display = "block", L.zIndex && L.zIndex();
|
|
219
|
+
}, P = () => {
|
|
225
220
|
let e = p.scrollY, t = f.style, n = document.getElementById("siteContent") ? document.getElementById("siteContent").style : {};
|
|
226
|
-
e >= 0 && e <=
|
|
227
|
-
},
|
|
228
|
-
|
|
229
|
-
h = null,
|
|
221
|
+
e >= 0 && e <= z ? (t.transform = `translate(-50%, ${-e}px)`, n.transform = "translateY(0)") : e > z && e <= B ? (t.transform = `translate(-50%, ${-z}px)`, n.transform = `translateY(${z - e}px)`) : e > B && (t.transform = `translate(-50%, ${-z}px)`, n.transform = "translateY(-250px)");
|
|
222
|
+
}, F = () => {
|
|
223
|
+
L !== T && L !== E || h || (h = p.requestAnimationFrame(() => {
|
|
224
|
+
h = null, M(), N(), j(), P();
|
|
230
225
|
}));
|
|
231
|
-
},
|
|
232
|
-
|
|
226
|
+
}, I = () => {
|
|
227
|
+
P();
|
|
233
228
|
};
|
|
234
|
-
|
|
235
|
-
let
|
|
236
|
-
if (!
|
|
237
|
-
let
|
|
238
|
-
return
|
|
239
|
-
p.removeEventListener("scroll",
|
|
229
|
+
k();
|
|
230
|
+
let L = A();
|
|
231
|
+
if (!L) return () => {};
|
|
232
|
+
let R = null, z = d, B = z + 250;
|
|
233
|
+
return O(), () => {
|
|
234
|
+
p.removeEventListener("scroll", I), p.removeEventListener("resize", F), g &&= (g.disconnect(), null), h &&= (p.cancelAnimationFrame(h), null), R &&= (clearTimeout(R), null);
|
|
240
235
|
};
|
|
241
236
|
}, f = (o) => {
|
|
242
237
|
let c = window.frameElement ? window.frameElement : null;
|
|
@@ -354,7 +349,7 @@ var e = (e, t, n) => {
|
|
|
354
349
|
}
|
|
355
350
|
], C = () => {
|
|
356
351
|
let e = window.document.getElementById("nineContent");
|
|
357
|
-
e && (e.style.backgroundColor =
|
|
352
|
+
e && (e.style.backgroundColor = F.siteBackgroundColor), d && (f.setProperty("--masthead-height", "250px"), f.height = "var(--masthead-height)"), k(), O(), E(), A(), l.addEventListener("scroll", N, { passive: !0 }), I = setTimeout(N, 50);
|
|
358
353
|
}, w = () => {
|
|
359
354
|
let e = null;
|
|
360
355
|
return e = u.querySelector("div[id*=\"billboard\"][id*=\"above\"]"), e;
|
|
@@ -371,7 +366,7 @@ var e = (e, t, n) => {
|
|
|
371
366
|
if (e = u.querySelector("div[id*=\"halfpage\"][id*=\"above\"]"), !e) return;
|
|
372
367
|
let t = e;
|
|
373
368
|
for (let e = 0; e < 6; e++) if (t = t.parentNode, t && l.getComputedStyle(t).position === "sticky") {
|
|
374
|
-
t.style.top = `${
|
|
369
|
+
t.style.top = `${F.stickyMargin.offset}px`;
|
|
375
370
|
break;
|
|
376
371
|
}
|
|
377
372
|
}, D = () => {
|
|
@@ -381,25 +376,25 @@ var e = (e, t, n) => {
|
|
|
381
376
|
if (!c) return;
|
|
382
377
|
let e = c.style;
|
|
383
378
|
e.width = "100%", e.height = "1000px", e.position = "fixed", e.left = "50%", e.setProperty("--transform-y", "0px"), e.transform = "translate3d(-50%, var(--transform-y), 0)";
|
|
384
|
-
}, ee = () => {
|
|
385
|
-
if (!N) return;
|
|
386
|
-
let e = N.style;
|
|
387
|
-
N.className = "", e.minHeight = "250px", e.marginTop = P.adNodeMarginTop + "px", e.marginBottom = P.adNodeMarginBottom + "px", e.position = "static", e.display = "block", P.zIndex && P.zIndex();
|
|
388
379
|
}, k = () => {
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
380
|
+
if (!P) return;
|
|
381
|
+
let e = P.style;
|
|
382
|
+
P.className = "", e.minHeight = "250px", e.marginTop = F.adNodeMarginTop + "px", e.marginBottom = F.adNodeMarginBottom + "px", e.position = "static", e.display = "block", F.zIndex && F.zIndex();
|
|
383
|
+
}, A = () => {
|
|
384
|
+
p = u.querySelector("div[data-contentunit-id=\"stan\"]")?.parentNode || u.querySelector("div[data-ui-testid=\"header-score-strip\"]")?.parentNode || h("main") || h("container") || h("page-container") || u.querySelector("div[class*=\"__MyContainer\"]") || u.querySelector("div[class*=\"__ArticleContainer\"]") || u.querySelector("div[class*=\"__VideoIndexComponent\"]") || u.querySelector("div.container.layout") || u.querySelector("main.container.layout"), p && (p.style.willChange = "clip-path", p.style.transition = "none", p.style.webkitBackfaceVisibility = "hidden", p.style.backfaceVisibility = "hidden", p.style.transform = "translate3d(0,0,0)", p.style.backgroundColor = F.siteBackgroundColor, p.style.setProperty("--mask-inset", "0px"), p.style.clipPath = "inset(var(--mask-inset, 0px) 0 0 0)");
|
|
385
|
+
}, j = 0, M = 0, N = () => {
|
|
386
|
+
let e = l.scrollY, t = e > j, n = e > R ? e - F.maskOffset : 0, r = Math.abs(n - M);
|
|
387
|
+
if (p) if (t && n > M) if (r > 100) {
|
|
393
388
|
let e = Math.max(0, n - 100);
|
|
394
389
|
p.style.transition = "none", p.style.setProperty("--mask-inset", `${e}px`), p.offsetHeight, p.style.transition = "clip-path 0.3s ease-out", p.style.setProperty("--mask-inset", `${n}px`);
|
|
395
390
|
} else p.style.transition = "clip-path 0.3s ease-out", p.style.setProperty("--mask-inset", `${n}px`);
|
|
396
391
|
else p.style.transition = "none", p.style.setProperty("--mask-inset", `${n}px`);
|
|
397
|
-
|
|
398
|
-
},
|
|
399
|
-
if (!
|
|
400
|
-
let
|
|
392
|
+
j = e, M = n, e > R ? (c.style.setProperty("--transform-y", `${-L}px`), f.setProperty("--masthead-height", "100px"), window.CollantOn || window.goCollant()) : e > L && e <= R ? (c.style.setProperty("--transform-y", `${-L}px`), f.setProperty("--masthead-height", `${250 + L - e}px`), window.CollantOn && window.goBillboard()) : e >= 0 && e <= L && (c.style.setProperty("--transform-y", `${-e}px`), f.setProperty("--masthead-height", "250px"), window.CollantOn && window.goBillboard());
|
|
393
|
+
}, P = w(), F = D();
|
|
394
|
+
if (!F) return () => {};
|
|
395
|
+
let I = null, L = -F.responsiveScroll + o + T(), R = L + 150;
|
|
401
396
|
return C(), () => {
|
|
402
|
-
l.removeEventListener("scroll",
|
|
397
|
+
l.removeEventListener("scroll", N), I &&= (clearTimeout(I), null);
|
|
403
398
|
};
|
|
404
399
|
}, p = 866, m = 68, h = 16, g = ":scope > header h1, :scope > header h2, :scope > header h3", _ = "h1, h2, h3", v = "#app main header h1, #app main header h2, #app main header h3, #app h1, #app h2, #app h3", y = "adspot-desktop-takeover-2-above", b = -24, x = -24, S = [
|
|
405
400
|
"www.nine.com.au",
|
|
@@ -419,7 +414,7 @@ var e = (e, t, n) => {
|
|
|
419
414
|
return n ? /^-?\d+(\.\d+)?$/.test(n) ? `${n}px` : n : `${t}px`;
|
|
420
415
|
}
|
|
421
416
|
return `${t}px`;
|
|
422
|
-
},
|
|
417
|
+
}, k = (e) => {
|
|
423
418
|
if (!e || typeof e != "object") return null;
|
|
424
419
|
let t = typeof e.headingText == "string" ? e.headingText.trim() : "", n = typeof e.path == "string" ? e.path.trim().toLowerCase() : "", r = typeof e.pathPrefix == "string" ? e.pathPrefix.trim().toLowerCase() : "", i = Array.isArray(e.hostnames) ? e.hostnames.map((e) => String(e).trim().toLowerCase()).filter(Boolean) : [];
|
|
425
420
|
return !t || !n && !r ? null : {
|
|
@@ -429,11 +424,11 @@ var e = (e, t, n) => {
|
|
|
429
424
|
slotId: typeof e.slotId == "string" && e.slotId.trim() ? e.slotId.trim() : y,
|
|
430
425
|
hostnames: i.length ? i : S
|
|
431
426
|
};
|
|
432
|
-
},
|
|
427
|
+
}, A = (e) => {
|
|
433
428
|
if (!Array.isArray(e) || e.length === 0) return C;
|
|
434
|
-
let t = e.map(
|
|
429
|
+
let t = e.map(k).filter(Boolean);
|
|
435
430
|
return t.length ? t : C;
|
|
436
|
-
},
|
|
431
|
+
}, j = ({ offsetTop: e = b, offsetLeft: t = x, width: n = p, height: i = m, pageTargets: a = C } = {}) => {
|
|
437
432
|
let o = window.frameElement || null;
|
|
438
433
|
if (!o) return () => {};
|
|
439
434
|
let s = window.parent;
|
|
@@ -468,7 +463,7 @@ var e = (e, t, n) => {
|
|
|
468
463
|
}, S = () => {
|
|
469
464
|
try {
|
|
470
465
|
let e = new URL(s.location.href), t = e.hostname.toLowerCase(), n = e.pathname.toLowerCase();
|
|
471
|
-
return
|
|
466
|
+
return B.find((e) => {
|
|
472
467
|
let r = e.hostnames.includes(t), i = e.path ? n === e.path : n.startsWith(e.pathPrefix);
|
|
473
468
|
return r && i;
|
|
474
469
|
}) || null;
|
|
@@ -476,20 +471,20 @@ var e = (e, t, n) => {
|
|
|
476
471
|
return null;
|
|
477
472
|
}
|
|
478
473
|
return null;
|
|
479
|
-
},
|
|
474
|
+
}, k = () => {
|
|
480
475
|
let e = r(c, "app") || c.getElementById("app") || c, t = r(e, "page-container") || e;
|
|
481
476
|
return r(r(t, "container") || t, "main") || r(e, "main") || c.querySelector("#app main") || null;
|
|
482
|
-
},
|
|
477
|
+
}, j = (e) => {
|
|
483
478
|
if (!e || !e.isConnected) return !1;
|
|
484
479
|
let t = e.getBoundingClientRect();
|
|
485
480
|
if (t.width <= 0 || t.height <= 0) return !1;
|
|
486
481
|
let n = s.getComputedStyle(e);
|
|
487
482
|
return n.display !== "none" && n.visibility !== "hidden";
|
|
488
|
-
},
|
|
489
|
-
let e =
|
|
490
|
-
return Array.from(new Set([...t, ...n])).filter(
|
|
491
|
-
},
|
|
492
|
-
let t =
|
|
483
|
+
}, M = () => {
|
|
484
|
+
let e = k(), t = e ? [...e.querySelectorAll(g), ...e.querySelectorAll(_)] : [], n = t.length ? [] : Array.from(c.querySelectorAll(v));
|
|
485
|
+
return Array.from(new Set([...t, ...n])).filter(j);
|
|
486
|
+
}, N = (e) => {
|
|
487
|
+
let t = M();
|
|
493
488
|
if (!t.length) return null;
|
|
494
489
|
let n = typeof e == "string" ? e.trim().toLowerCase() : "";
|
|
495
490
|
if (n) {
|
|
@@ -497,56 +492,56 @@ var e = (e, t, n) => {
|
|
|
497
492
|
if (e) return e;
|
|
498
493
|
}
|
|
499
494
|
return t.find((e) => e.tagName === "H1") || t[0] || null;
|
|
500
|
-
},
|
|
495
|
+
}, P = null, F = null;
|
|
501
496
|
f();
|
|
502
|
-
let
|
|
503
|
-
if (!B) return () => {};
|
|
504
|
-
let V = y((B.slotId ? c.getElementById(B.slotId) : null) || o.parentElement);
|
|
497
|
+
let I = O(e, b), L = O(t, x), R = O(n, p), z = O(i, m), B = A(a), V = S();
|
|
505
498
|
if (!V) return () => {};
|
|
506
|
-
let
|
|
507
|
-
if (
|
|
508
|
-
let
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
499
|
+
let H = y((V.slotId ? c.getElementById(V.slotId) : null) || o.parentElement);
|
|
500
|
+
if (!H) return () => {};
|
|
501
|
+
let ee = H.getAttribute(E);
|
|
502
|
+
if (ee && ee !== u) return () => {};
|
|
503
|
+
let te = {
|
|
504
|
+
width: H.style.width,
|
|
505
|
+
maxWidth: H.style.maxWidth,
|
|
506
|
+
minWidth: H.style.minWidth,
|
|
507
|
+
height: H.style.height,
|
|
508
|
+
minHeight: H.style.minHeight,
|
|
509
|
+
marginTop: H.style.marginTop,
|
|
510
|
+
marginBottom: H.style.marginBottom,
|
|
511
|
+
marginLeft: H.style.marginLeft,
|
|
512
|
+
marginRight: H.style.marginRight,
|
|
513
|
+
position: H.style.position,
|
|
514
|
+
top: H.style.top,
|
|
515
|
+
left: H.style.left,
|
|
516
|
+
right: H.style.right,
|
|
517
|
+
transform: H.style.transform,
|
|
518
|
+
display: H.style.display,
|
|
519
|
+
opacity: H.style.opacity,
|
|
520
|
+
transition: H.style.transition,
|
|
521
|
+
pointerEvents: H.style.pointerEvents,
|
|
522
|
+
zIndex: H.style.zIndex,
|
|
523
|
+
overflow: H.style.overflow
|
|
524
|
+
}, ne = {
|
|
530
525
|
width: o.style.width,
|
|
531
526
|
height: o.style.height,
|
|
532
527
|
display: o.style.display,
|
|
533
528
|
border: o.style.border,
|
|
534
529
|
position: o.style.position,
|
|
535
530
|
pointerEvents: o.style.pointerEvents
|
|
536
|
-
},
|
|
537
|
-
let e =
|
|
538
|
-
for (; e && e !== c.body;)
|
|
531
|
+
}, re = [], U = parseFloat(z) || m, ie = parseFloat(I) || 0, ae = parseFloat(L) || 0, W = () => {
|
|
532
|
+
let e = H.parentElement;
|
|
533
|
+
for (; e && e !== c.body;) re.push({
|
|
539
534
|
element: e,
|
|
540
535
|
overflow: e.style.overflow
|
|
541
536
|
}), d(e, "overflow", "visible"), e = e.parentElement;
|
|
542
537
|
}, oe = () => {
|
|
543
|
-
d(
|
|
538
|
+
d(H, "width", R), d(H, "maxWidth", R), d(H, "minWidth", R), d(H, "height", z), d(H, "minHeight", z), d(H, "display", "block"), d(H, "overflow", "hidden"), d(H, "pointerEvents", "none"), d(H, "zIndex", "1080"), H.setAttribute(E, u), d(o, "width", R), d(o, "height", z), d(o, "display", "block"), d(o, "border", "0"), d(o, "position", "relative"), d(o, "pointerEvents", "auto");
|
|
544
539
|
}, se = {
|
|
545
540
|
element: null,
|
|
546
541
|
position: ""
|
|
547
542
|
}, G = () => {
|
|
548
|
-
let e =
|
|
549
|
-
e && s.getComputedStyle(e).position === "static" && (se.element = e, se.position = e.style.position, d(e, "position", "relative")), d(
|
|
543
|
+
let e = H.parentElement;
|
|
544
|
+
e && s.getComputedStyle(e).position === "static" && (se.element = e, se.position = e.style.position, d(e, "position", "relative")), d(H, "position", "absolute"), d(H, "top", `${ie}px`), d(H, "left", `${ae}px`), d(H, "right", "auto"), d(H, "marginTop", "0px"), d(H, "marginBottom", `${h}px`), d(H, "marginLeft", "0px"), d(H, "marginRight", "0px"), d(H, "transform", "");
|
|
550
545
|
}, ce = (e) => {
|
|
551
546
|
let t = null;
|
|
552
547
|
try {
|
|
@@ -565,7 +560,7 @@ var e = (e, t, n) => {
|
|
|
565
560
|
if (!t) return !1;
|
|
566
561
|
o.setAttribute(D, "1");
|
|
567
562
|
try {
|
|
568
|
-
e.parentNode?.insertBefore(
|
|
563
|
+
e.parentNode?.insertBefore(H, e);
|
|
569
564
|
} catch {
|
|
570
565
|
return o.removeAttribute(D), !1;
|
|
571
566
|
}
|
|
@@ -577,40 +572,40 @@ var e = (e, t, n) => {
|
|
|
577
572
|
}
|
|
578
573
|
return !0;
|
|
579
574
|
}, le = () => {
|
|
580
|
-
d(
|
|
575
|
+
d(H, "position", "fixed"), d(H, "marginTop", "0px"), d(H, "marginBottom", "0px"), d(H, "marginLeft", "0px"), d(H, "marginRight", "0px"), d(H, "transform", "");
|
|
581
576
|
}, ue = () => {
|
|
582
|
-
d(
|
|
577
|
+
d(H, "display", "none");
|
|
583
578
|
}, de = () => {
|
|
584
|
-
d(
|
|
579
|
+
d(H, "display", "block"), d(H, "overflow", "hidden");
|
|
585
580
|
}, K = null, q = () => {
|
|
586
|
-
if ((!K || !K.isConnected) && (K =
|
|
587
|
-
let e = K.getBoundingClientRect(), t = e.top -
|
|
588
|
-
d(
|
|
589
|
-
}, J = null, Y = null,
|
|
590
|
-
if (K =
|
|
591
|
-
e > 1 && (
|
|
581
|
+
if ((!K || !K.isConnected) && (K = N(V.headingText)), !K) return;
|
|
582
|
+
let e = K.getBoundingClientRect(), t = e.top - U - h + ie, n = e.left + ae;
|
|
583
|
+
d(H, "top", `${t}px`), d(H, "left", `${n}px`), d(H, "right", "auto");
|
|
584
|
+
}, J = null, Y = null, X = !1, fe = (e = 12) => {
|
|
585
|
+
if (K = N(V.headingText), !K) {
|
|
586
|
+
e > 1 && (F = s.setTimeout(() => fe(e - 1), 250));
|
|
592
587
|
return;
|
|
593
588
|
}
|
|
594
|
-
ce(K) || (
|
|
589
|
+
ce(K) || (X = !0, W(), oe(), le(), q(), J = () => q(), Y = () => q(), s.addEventListener("scroll", J, { passive: !0 }), s.addEventListener("resize", Y));
|
|
595
590
|
};
|
|
596
|
-
|
|
597
|
-
let
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
}), Object.entries(
|
|
591
|
+
fe();
|
|
592
|
+
let Z = () => {
|
|
593
|
+
F &&= (s.clearTimeout(F), null), P &&= (s.clearTimeout(P), null), J &&= (s.removeEventListener("scroll", J), null), Y &&= (s.removeEventListener("resize", Y), null), H.getAttribute(E) === u && H.removeAttribute(E), X && (Object.entries(te).forEach(([e, t]) => {
|
|
594
|
+
H.style[e] = t;
|
|
595
|
+
}), Object.entries(ne).forEach(([e, t]) => {
|
|
601
596
|
o.style[e] = t;
|
|
602
|
-
}),
|
|
597
|
+
}), re.forEach(({ element: e, overflow: t }) => {
|
|
603
598
|
e.style.overflow = t;
|
|
604
599
|
})), s[T]?.instanceId === u && delete s[T];
|
|
605
600
|
};
|
|
606
601
|
return s[T] = {
|
|
607
602
|
instanceId: u,
|
|
608
603
|
iframe: o,
|
|
609
|
-
cleanup:
|
|
604
|
+
cleanup: Z,
|
|
610
605
|
show: de,
|
|
611
606
|
hide: ue
|
|
612
|
-
},
|
|
613
|
-
},
|
|
607
|
+
}, Z;
|
|
608
|
+
}, M = (e, t, n) => {
|
|
614
609
|
let r = window.frameElement ? window.frameElement : null;
|
|
615
610
|
if (!r) return () => {};
|
|
616
611
|
let i = window.parent;
|
|
@@ -855,11 +850,11 @@ var e = (e, t, n) => {
|
|
|
855
850
|
return p(), () => {
|
|
856
851
|
i.removeEventListener("scroll", y), w &&= (clearTimeout(w), null);
|
|
857
852
|
};
|
|
858
|
-
},
|
|
853
|
+
}, N = ((e, t = 50) => `linear(${Array.from({ length: t + 1 }, (n, r) => e(r / t)).map((e) => +e.toFixed(4)).join(", ")})`)((e) => {
|
|
859
854
|
if (e === 0 || e === 1) return e;
|
|
860
855
|
let t = 2 * Math.PI / 3;
|
|
861
856
|
return 2 ** (-10 * e) * Math.sin((e * 10 - .75) * t) + 1;
|
|
862
|
-
}),
|
|
857
|
+
}), P = (e = {}) => {
|
|
863
858
|
let t = {
|
|
864
859
|
adScrollHeight: "300vh",
|
|
865
860
|
bandHeight: 24,
|
|
@@ -882,7 +877,7 @@ var e = (e, t, n) => {
|
|
|
882
877
|
snapOverlap: 2,
|
|
883
878
|
stretchOverlap: 20,
|
|
884
879
|
snapDuration: .9,
|
|
885
|
-
snapEase:
|
|
880
|
+
snapEase: N,
|
|
886
881
|
onEnter: null,
|
|
887
882
|
onExit: null,
|
|
888
883
|
onProgress: null,
|
|
@@ -926,7 +921,7 @@ var e = (e, t, n) => {
|
|
|
926
921
|
};
|
|
927
922
|
(() => {
|
|
928
923
|
let e = a.style;
|
|
929
|
-
e.height = t.adScrollHeight, e.maxHeight = t.adScrollHeight, e.position = "relative", a.setAttribute("poweredAC", "0.1.
|
|
924
|
+
e.height = t.adScrollHeight, e.maxHeight = t.adScrollHeight, e.position = "relative", a.setAttribute("poweredAC", "0.1.92"), e.clipPath = `inset(-${t.bandHeight - 1}px 0 0 0)`, e.overflow = "visible", e.width = "100vw", e.maxWidth = "100vw", e.marginLeft = "calc(50% - 50vw)", e.marginRight = "0", e.marginTop = "0", e.marginBottom = "0", e.padding = "0";
|
|
930
925
|
let o = a.parentElement;
|
|
931
926
|
for (let e = 0; e < 6 && o && o !== i.body; e++) {
|
|
932
927
|
let t = r.getComputedStyle(o), n = !1;
|
|
@@ -1031,7 +1026,7 @@ var e = (e, t, n) => {
|
|
|
1031
1026
|
e.style[t] = n || "";
|
|
1032
1027
|
});
|
|
1033
1028
|
};
|
|
1034
|
-
},
|
|
1029
|
+
}, F = (e = {}) => {
|
|
1035
1030
|
let t = {
|
|
1036
1031
|
adaptToWidth: "100%",
|
|
1037
1032
|
maxWidth: "400px",
|
|
@@ -1064,7 +1059,7 @@ var e = (e, t, n) => {
|
|
|
1064
1059
|
let o = a.getAttribute("style"), s = n.getAttribute("style"), c = n.parentElement === a ? null : n.parentElement, l = c ? c.getAttribute("style") : null, u = a.parentElement, d = u ? r.getComputedStyle(u).paddingTop : null, f = null, p = parseInt(n.getAttribute("width"), 10) || 320, m = parseInt(n.getAttribute("height"), 10) || 50;
|
|
1065
1060
|
return (() => {
|
|
1066
1061
|
let e = a.style;
|
|
1067
|
-
if (e.position = "relative", e.overflow = "visible", e.boxSizing = "border-box", a.setAttribute("poweredAC", "0.1.
|
|
1062
|
+
if (e.position = "relative", e.overflow = "visible", e.boxSizing = "border-box", a.setAttribute("poweredAC", "0.1.92"), c) {
|
|
1068
1063
|
let e = c.style;
|
|
1069
1064
|
e.width = "100%", e.height = "100%", e.margin = "0", e.textAlign = "left";
|
|
1070
1065
|
}
|
|
@@ -1079,7 +1074,7 @@ var e = (e, t, n) => {
|
|
|
1079
1074
|
})(), () => {
|
|
1080
1075
|
f &&= (f.disconnect(), null), o ? a.setAttribute("style", o) : a.removeAttribute("style"), s ? n.setAttribute("style", s) : n.removeAttribute("style"), c && (l ? c.setAttribute("style", l) : c.removeAttribute("style")), u && d && d !== "0px" && (u.style.paddingTop = d);
|
|
1081
1076
|
};
|
|
1082
|
-
},
|
|
1077
|
+
}, I = (e = {}) => {
|
|
1083
1078
|
let t = {
|
|
1084
1079
|
billboardHeight: 150,
|
|
1085
1080
|
sideStripWidth: 10,
|
|
@@ -1254,39 +1249,39 @@ var e = (e, t, n) => {
|
|
|
1254
1249
|
let e = r.location.href;
|
|
1255
1250
|
for (let t of d) if (e.indexOf(t.site) >= 0) return t.config;
|
|
1256
1251
|
return u.nine;
|
|
1257
|
-
})(), p = f === u.smh || f === u.theage, m = n.getAttribute("style"), h = n.hasAttribute("data-mf-wallpaper-iframe"), g = a.getAttribute("style"), _ = n.parentElement === a ? null : n.parentElement, v = _ ? _.getAttribute("style") : null, y = a.parentElement, b = a.closest("[data-ad-target=\"header-ad-mobile\"]"), x = !!(y && b && y === b), S = x ? r.getComputedStyle(y).marginTop : "", C = y ? y.getAttribute("style") : null, w = s ? s.getAttribute("style") : null, T = o ? o.getAttribute("style") : null, E = o ? o.querySelector("header") : null, D = E ? E.getAttribute("style") : null, O = E ? E.querySelector(".sc-5cbbddda-1") : null,
|
|
1252
|
+
})(), p = f === u.smh || f === u.theage, m = n.getAttribute("style"), h = n.hasAttribute("data-mf-wallpaper-iframe"), g = a.getAttribute("style"), _ = n.parentElement === a ? null : n.parentElement, v = _ ? _.getAttribute("style") : null, y = a.parentElement, b = a.closest("[data-ad-target=\"header-ad-mobile\"]"), x = !!(y && b && y === b), S = x ? r.getComputedStyle(y).marginTop : "", C = y ? y.getAttribute("style") : null, w = s ? s.getAttribute("style") : null, T = o ? o.getAttribute("style") : null, E = o ? o.querySelector("header") : null, D = E ? E.getAttribute("style") : null, O = E ? E.querySelector(".sc-5cbbddda-1") : null, k = O ? O.getAttribute("style") : null, A = i.querySelector("footer"), j = A ? A.getAttribute("style") : null, M = o ? Array.from(o.children).map((e) => ({
|
|
1258
1253
|
el: e,
|
|
1259
1254
|
orig: e.getAttribute("style")
|
|
1260
|
-
})) : [],
|
|
1261
|
-
if (!e || e ===
|
|
1255
|
+
})) : [], N = null, P = null, F = null, I = null, L = null, R = null, z = null, B = null, V = [], H = null, ee = null, te = null, ne = null, re = null, U = null, ie = null, ae = [], W = Number.isFinite(t.stickyDurationMs) && t.stickyDurationMs > 0, oe = Number.isFinite(t.stickyScrollDistance) && t.stickyScrollDistance > 0, se = !!(t.sticky && (W || oe)), G = "pending", ce = 0, le = 0, ue = null, de = null, K = null, q = null, J = null, Y = null, X = [], fe = Number.isFinite(t.stickyHeaderFallbackHeight) ? Math.max(0, t.stickyHeaderFallbackHeight) : null, Z = f === u.afr, pe = Z, Q = null, me = null, he = (e) => {
|
|
1256
|
+
if (!e || e === te || e === y || e === a) return !1;
|
|
1262
1257
|
let t = e.firstElementChild;
|
|
1263
1258
|
if (!t || t !== e.lastElementChild || !t.classList.contains("container") || t.children.length > 0 || t.textContent && t.textContent.trim() || e.querySelector("[id^=\"adspot-mobile-mbanner-\"], iframe, [data-mf-slot], .adWrapper")) return !1;
|
|
1264
1259
|
let n = r.getComputedStyle(e);
|
|
1265
1260
|
return n.position === "fixed" || n.position === "sticky";
|
|
1266
|
-
},
|
|
1267
|
-
!e?.parentElement ||
|
|
1261
|
+
}, ge = (e) => {
|
|
1262
|
+
!e?.parentElement || ae.some((t) => t.shell === e) || (ae.push({
|
|
1268
1263
|
shell: e,
|
|
1269
1264
|
parent: e.parentElement,
|
|
1270
1265
|
nextSibling: e.nextSibling
|
|
1271
1266
|
}), e.remove());
|
|
1272
|
-
},
|
|
1267
|
+
}, _e = () => {
|
|
1273
1268
|
for (let e of i.querySelectorAll(".container")) {
|
|
1274
1269
|
let t = e.parentElement;
|
|
1275
|
-
|
|
1270
|
+
he(t) && ge(t);
|
|
1276
1271
|
}
|
|
1277
|
-
},
|
|
1272
|
+
}, ve = (e) => {
|
|
1278
1273
|
let t = e?.parentElement;
|
|
1279
1274
|
for (; t && t !== i.body && t !== i.documentElement;) {
|
|
1280
1275
|
let e = r.getComputedStyle(t);
|
|
1281
|
-
(e.transform && e.transform !== "none" || e.willChange && e.willChange !== "auto" || e.contain && e.contain !== "none" || e.filter && e.filter !== "none" || e.perspective && e.perspective !== "none") && (
|
|
1276
|
+
(e.transform && e.transform !== "none" || e.willChange && e.willChange !== "auto" || e.contain && e.contain !== "none" || e.filter && e.filter !== "none" || e.perspective && e.perspective !== "none") && (V.find((e) => e.el === t) || V.push({
|
|
1282
1277
|
el: t,
|
|
1283
1278
|
orig: t.getAttribute("style")
|
|
1284
1279
|
}), t.style.transform = "none", t.style.willChange = "auto", t.style.contain = "none", t.style.filter = "none", t.style.perspective = "none"), t = t.parentElement;
|
|
1285
1280
|
}
|
|
1286
|
-
},
|
|
1281
|
+
}, ye = () => {
|
|
1287
1282
|
let e = i.createElement("div");
|
|
1288
1283
|
return e.setAttribute("data-mf-billboard-mount", ""), e.style.height = `${t.billboardHeight}px`, e.style.minHeight = `${t.billboardHeight}px`, e.style.maxHeight = `${t.billboardHeight}px`, e.style.background = "transparent", e.style.overflow = "visible", e.style.position = "relative", e.style.width = "100%", e.style.padding = "0", e.style.margin = "0", e;
|
|
1289
|
-
},
|
|
1284
|
+
}, be = () => {
|
|
1290
1285
|
if (!s || f !== u.wwos) return null;
|
|
1291
1286
|
let e = a.getBoundingClientRect().bottom, t = Array.from(s.querySelectorAll("div")).map((e) => {
|
|
1292
1287
|
let t = e.getBoundingClientRect(), n = r.getComputedStyle(e), i = e.querySelector("ul");
|
|
@@ -1299,7 +1294,7 @@ var e = (e, t, n) => {
|
|
|
1299
1294
|
};
|
|
1300
1295
|
}).filter(({ rect: t, styles: n, list: r, listStyles: i }) => !r || !i || t.top < e - 4 || t.top > e + 120 || n.overflow !== "hidden" || parseFloat(n.borderTopLeftRadius) < 4 ? !1 : i.overflow === "auto" || i.overflowX === "auto");
|
|
1301
1296
|
return t.length ? (t.sort((t, n) => Math.abs(t.rect.top - e) - Math.abs(n.rect.top - e)), t[0]) : null;
|
|
1302
|
-
}, $ = () =>
|
|
1297
|
+
}, $ = () => B || a, xe = () => !t.stickyRespectHeader || !t.stickyHeaderSelector ? [] : Array.from(i.querySelectorAll(t.stickyHeaderSelector)).map((e) => {
|
|
1303
1298
|
let t = e.getBoundingClientRect(), n = r.getComputedStyle(e), i = Number.parseInt(n.zIndex, 10);
|
|
1304
1299
|
return {
|
|
1305
1300
|
el: e,
|
|
@@ -1307,31 +1302,31 @@ var e = (e, t, n) => {
|
|
|
1307
1302
|
styles: n,
|
|
1308
1303
|
zIndex: Number.isFinite(i) ? i : null
|
|
1309
1304
|
};
|
|
1310
|
-
}).filter(({ rect: e, styles: t }) => e.width <= r.innerWidth * .5 || e.height <= 0 ? !1 : t.display !== "none" && t.visibility !== "hidden"),
|
|
1311
|
-
let e =
|
|
1305
|
+
}).filter(({ rect: e, styles: t }) => e.width <= r.innerWidth * .5 || e.height <= 0 ? !1 : t.display !== "none" && t.visibility !== "hidden"), Se = () => {
|
|
1306
|
+
let e = xe().filter(({ rect: e, styles: n }) => n.position !== "fixed" && n.position !== "sticky" ? !1 : e.top <= t.stickyTop + 1 && e.bottom > t.stickyTop + 1);
|
|
1312
1307
|
return e.length ? (e.sort((e, t) => t.rect.bottom - e.rect.bottom), e[0]) : null;
|
|
1313
|
-
}, Se = () => {
|
|
1314
|
-
let e = xe();
|
|
1315
|
-
return e ? Math.max(t.stickyTop, Math.round(e.rect.bottom)) : Math.max(t.stickyTop, fe || t.stickyTop);
|
|
1316
1308
|
}, Ce = () => {
|
|
1317
|
-
let e =
|
|
1309
|
+
let e = Se();
|
|
1310
|
+
return e ? Math.max(t.stickyTop, Math.round(e.rect.bottom)) : Math.max(t.stickyTop, fe || t.stickyTop);
|
|
1311
|
+
}, we = () => {
|
|
1312
|
+
let e = Se();
|
|
1318
1313
|
return e?.zIndex && e.zIndex > 2 ? Math.max(1, Math.min(t.stickyZIndex, e.zIndex - 1)) : t.stickyZIndex;
|
|
1319
|
-
},
|
|
1320
|
-
|
|
1314
|
+
}, Te = ({ active: e, progress: t = 0, remainingMs: n = 0 }) => {
|
|
1315
|
+
R?.contentWindow && R.contentWindow.postMessage({
|
|
1321
1316
|
type: "mobilefireplace:sticky",
|
|
1322
1317
|
active: e,
|
|
1323
1318
|
progress: Math.max(0, Math.min(1, t)),
|
|
1324
1319
|
remainingMs: Math.max(0, Math.round(n))
|
|
1325
1320
|
}, "*");
|
|
1326
|
-
},
|
|
1327
|
-
!e ||
|
|
1321
|
+
}, Ee = (e) => {
|
|
1322
|
+
!e || X.some((t) => t.el === e) || X.push({
|
|
1328
1323
|
el: e,
|
|
1329
1324
|
value: e.style.getPropertyValue("z-index"),
|
|
1330
1325
|
priority: e.style.getPropertyPriority("z-index")
|
|
1331
1326
|
});
|
|
1332
|
-
},
|
|
1327
|
+
}, De = (e) => {
|
|
1333
1328
|
let t = new Set([$()].filter(Boolean));
|
|
1334
|
-
if (f === u.afr ||
|
|
1329
|
+
if (f === u.afr || U || p) {
|
|
1335
1330
|
[
|
|
1336
1331
|
a,
|
|
1337
1332
|
y,
|
|
@@ -1340,108 +1335,119 @@ var e = (e, t, n) => {
|
|
|
1340
1335
|
let e = $()?.parentElement;
|
|
1341
1336
|
for (; e && e !== i.body && e !== i.documentElement && (t.add(e), e.id !== "stickyLeaderboard");) e = e.parentElement;
|
|
1342
1337
|
}
|
|
1343
|
-
for (let n of t)
|
|
1344
|
-
},
|
|
1345
|
-
if (!
|
|
1346
|
-
let e =
|
|
1338
|
+
for (let n of t) Ee(n), n.style.setProperty("z-index", String(e), "important");
|
|
1339
|
+
}, Oe = () => Z && (a.closest("#stickyLeaderboard") || i.querySelector("#stickyLeaderboard")) || $(), ke = () => {
|
|
1340
|
+
if (!Z || !R) return;
|
|
1341
|
+
let e = R.style;
|
|
1347
1342
|
e.left = "0px", e.width = "100vw";
|
|
1348
|
-
}, ke = () => {
|
|
1349
|
-
if (!X || !L || G === "active") return;
|
|
1350
|
-
let e = De();
|
|
1351
|
-
if (!e) return;
|
|
1352
|
-
let t = e.getBoundingClientRect(), n = L.style;
|
|
1353
|
-
n.position = "absolute", n.top = `${Math.round(r.scrollY + t.top)}px`, Oe(), n.setProperty("z-index", "6", "important"), L.removeAttribute("data-mf-sticky-active");
|
|
1354
1343
|
}, Ae = () => {
|
|
1355
|
-
|
|
1356
|
-
|
|
1344
|
+
if (!Z || !R || G === "active") return;
|
|
1345
|
+
let e = Oe();
|
|
1346
|
+
if (!e) return;
|
|
1347
|
+
let t = e.getBoundingClientRect(), n = R.style;
|
|
1348
|
+
n.position = "absolute", n.top = `${Math.round(r.scrollY + t.top)}px`, ke(), n.setProperty("z-index", "6", "important"), R.removeAttribute("data-mf-sticky-active");
|
|
1349
|
+
}, je = () => {
|
|
1350
|
+
Z && (Ae(), K && r.cancelAnimationFrame(K), K = r.requestAnimationFrame(() => {
|
|
1351
|
+
K = null, Ae();
|
|
1357
1352
|
}), q && r.clearTimeout(q), q = r.setTimeout(() => {
|
|
1358
|
-
q = null,
|
|
1353
|
+
q = null, Ae();
|
|
1359
1354
|
}, 350));
|
|
1360
|
-
}, je = () => {
|
|
1361
|
-
!pe || !L || L.parentElement === i.body || (Z = L.parentElement, Q = L.nextSibling, i.body.appendChild(L));
|
|
1362
1355
|
}, Me = () => {
|
|
1363
|
-
|
|
1364
|
-
|
|
1356
|
+
!pe || !R || R.parentElement === i.body || (Q = R.parentElement, me = R.nextSibling, i.body.appendChild(R));
|
|
1357
|
+
}, Ne = () => {
|
|
1358
|
+
if (!Q || !R) {
|
|
1359
|
+
Q = null, me = null;
|
|
1365
1360
|
return;
|
|
1366
1361
|
}
|
|
1367
|
-
|
|
1368
|
-
},
|
|
1369
|
-
for (let e =
|
|
1370
|
-
let { el: t, value: n, priority: r } =
|
|
1362
|
+
me && me.parentNode === Q ? Q.insertBefore(R, me) : Q.appendChild(R), Q = null, me = null;
|
|
1363
|
+
}, Pe = () => {
|
|
1364
|
+
for (let e = X.length - 1; e >= 0; --e) {
|
|
1365
|
+
let { el: t, value: n, priority: r } = X[e];
|
|
1371
1366
|
n ? t.style.setProperty("z-index", n, r) : t.style.removeProperty("z-index");
|
|
1372
1367
|
}
|
|
1373
|
-
|
|
1374
|
-
}, Pe = () => {
|
|
1375
|
-
if (!L) return;
|
|
1376
|
-
_e($());
|
|
1377
|
-
let e = $().getBoundingClientRect(), t = Ce();
|
|
1378
|
-
Ee(t), je();
|
|
1379
|
-
let n = L.style;
|
|
1380
|
-
n.position = "fixed", n.top = `${Se()}px`, X ? Oe() : x ? (n.left = "0px", n.width = "100vw", n.setProperty("max-width", "100vw", "important")) : (n.left = `${Math.round(e.left)}px`, n.width = `${Math.round(e.width)}px`), n.setProperty("z-index", String(t), "important"), L.setAttribute("data-mf-sticky-active", "");
|
|
1368
|
+
X.length = 0;
|
|
1381
1369
|
}, Fe = () => {
|
|
1382
|
-
if (!
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1370
|
+
if (!R) return;
|
|
1371
|
+
ve($());
|
|
1372
|
+
let e = $().getBoundingClientRect(), t = we();
|
|
1373
|
+
if (De(t), Me(), x && B && !pe) {
|
|
1374
|
+
let e = B.style;
|
|
1375
|
+
e.setProperty("position", "fixed", "important"), e.setProperty("top", `${Ce()}px`, "important"), e.setProperty("left", "0px", "important"), e.setProperty("width", "100vw", "important"), e.setProperty("max-width", "100vw", "important"), e.setProperty("z-index", String(t), "important");
|
|
1386
1376
|
}
|
|
1387
|
-
let
|
|
1388
|
-
|
|
1377
|
+
let n = R.style;
|
|
1378
|
+
x && !pe ? (n.position = "relative", n.top = "0px", n.left = "0px", n.width = "100vw", n.setProperty("max-width", "100vw", "important")) : (n.position = "fixed", n.top = `${Ce()}px`), Z ? ke() : x ? (n.left = "0px", n.width = "100vw", n.setProperty("max-width", "100vw", "important")) : (n.left = `${Math.round(e.left)}px`, n.width = `${Math.round(e.width)}px`), n.setProperty("z-index", String(t), "important"), R.setAttribute("data-mf-sticky-active", "");
|
|
1389
1379
|
}, Ie = () => {
|
|
1390
|
-
|
|
1380
|
+
if (!R) return;
|
|
1381
|
+
if (Ne(), Z) {
|
|
1382
|
+
je(), Pe();
|
|
1383
|
+
return;
|
|
1384
|
+
}
|
|
1385
|
+
let e = R.style;
|
|
1386
|
+
if (e.position = "relative", e.top = "", e.left = "", e.width = "100%", e.setProperty("z-index", "1"), x && B && !pe) {
|
|
1387
|
+
let e = B.style;
|
|
1388
|
+
e.setProperty("position", "relative"), e.removeProperty("top"), e.removeProperty("left"), e.setProperty("width", "100%"), e.removeProperty("max-width");
|
|
1389
|
+
}
|
|
1390
|
+
Pe(), R.removeAttribute("data-mf-sticky-active");
|
|
1391
1391
|
}, Le = () => {
|
|
1392
|
+
de &&= (r.cancelAnimationFrame(de), null);
|
|
1393
|
+
}, Re = () => {
|
|
1392
1394
|
if (ue === null) {
|
|
1393
1395
|
let e = $().getBoundingClientRect();
|
|
1394
|
-
ue = Math.max(0, r.scrollY + e.top -
|
|
1396
|
+
ue = Math.max(0, r.scrollY + e.top - Ce());
|
|
1395
1397
|
}
|
|
1396
1398
|
return ue;
|
|
1397
|
-
},
|
|
1398
|
-
let e = W ?
|
|
1399
|
+
}, ze = () => le + (G === "active" ? Math.max(0, r.performance.now() - ce) : 0), Be = () => Math.max(0, r.scrollY - Re()), Ve = () => {
|
|
1400
|
+
let e = W ? ze() / t.stickyDurationMs : 0, n = oe ? Be() / t.stickyScrollDistance : 0;
|
|
1399
1401
|
return Math.max(e, n);
|
|
1400
|
-
},
|
|
1401
|
-
G === "active" && (le =
|
|
1402
|
+
}, He = () => W ? t.stickyDurationMs - ze() : 0, Ue = () => r.scrollY < Re() - 1, We = () => {
|
|
1403
|
+
G === "active" && (le = ze(), G = "paused", Le(), Ie(), Te({
|
|
1402
1404
|
active: !1,
|
|
1403
|
-
progress:
|
|
1404
|
-
remainingMs:
|
|
1405
|
+
progress: Ve(),
|
|
1406
|
+
remainingMs: He()
|
|
1405
1407
|
}));
|
|
1406
|
-
}, We = () => {
|
|
1407
|
-
G !== "paused" || He() || (G = "active", ce = r.performance.now(), Pe(), Ke());
|
|
1408
1408
|
}, Ge = () => {
|
|
1409
|
-
G !== "
|
|
1409
|
+
G !== "paused" || Ue() || (G = "active", ce = r.performance.now(), Fe(), qe());
|
|
1410
|
+
}, Ke = () => {
|
|
1411
|
+
G !== "active" && G !== "paused" || (G === "active" && (le = ze()), G = "released", Le(), Ie(), Te({
|
|
1410
1412
|
active: !1,
|
|
1411
1413
|
progress: 1,
|
|
1412
1414
|
remainingMs: 0
|
|
1413
1415
|
}));
|
|
1414
|
-
},
|
|
1416
|
+
}, qe = () => {
|
|
1415
1417
|
if (G !== "active") return;
|
|
1416
|
-
if (
|
|
1417
|
-
|
|
1418
|
+
if (Ue()) {
|
|
1419
|
+
We();
|
|
1418
1420
|
return;
|
|
1419
1421
|
}
|
|
1420
|
-
let e =
|
|
1421
|
-
if (
|
|
1422
|
+
let e = ze(), n = Be(), i = W ? e / t.stickyDurationMs : 0, a = oe ? n / t.stickyScrollDistance : 0, o = Math.max(i, a), s = W ? t.stickyDurationMs - e : 0;
|
|
1423
|
+
if (Fe(), Te({
|
|
1422
1424
|
active: !0,
|
|
1423
1425
|
progress: o,
|
|
1424
1426
|
remainingMs: s
|
|
1425
1427
|
}), i >= 1 || a >= 1) {
|
|
1426
|
-
|
|
1428
|
+
Ke();
|
|
1427
1429
|
return;
|
|
1428
1430
|
}
|
|
1429
|
-
de = r.requestAnimationFrame(
|
|
1430
|
-
}, qe = () => {
|
|
1431
|
-
if (!se || G !== "pending" || !L) return;
|
|
1432
|
-
let e = $().getBoundingClientRect();
|
|
1433
|
-
ue = Math.max(0, r.scrollY + e.top - Se()), le = 0, G = "active", ce = r.performance.now(), Pe(), Ke();
|
|
1431
|
+
de = r.requestAnimationFrame(qe);
|
|
1434
1432
|
}, Je = () => {
|
|
1435
|
-
!se || G !== "pending" || !
|
|
1433
|
+
if (!se || G !== "pending" || !R) return;
|
|
1434
|
+
let e = $().getBoundingClientRect();
|
|
1435
|
+
ue = Math.max(0, r.scrollY + e.top - Ce()), le = 0, G = "active", ce = r.performance.now(), Fe(), qe();
|
|
1436
1436
|
}, Ye = () => {
|
|
1437
|
-
G
|
|
1437
|
+
!se || G !== "pending" || !R || r.scrollY <= 0 || $().getBoundingClientRect().top <= Ce() && Je();
|
|
1438
1438
|
}, Xe = () => {
|
|
1439
|
-
|
|
1439
|
+
G === "pending" ? Ye() : G === "active" && Ue() ? We() : G === "paused" && Ge(), G !== "active" && je();
|
|
1440
|
+
}, Ze = () => {
|
|
1441
|
+
Xe(), Y && r.cancelAnimationFrame(Y), Y = r.requestAnimationFrame(() => {
|
|
1442
|
+
Y = null, Xe();
|
|
1443
|
+
});
|
|
1444
|
+
}, Qe = () => {
|
|
1445
|
+
_e();
|
|
1440
1446
|
let e = n.parentElement;
|
|
1441
1447
|
for (; e && e !== i.body && e !== i.documentElement;) {
|
|
1442
1448
|
let t = r.getComputedStyle(e);
|
|
1443
1449
|
if (t.position === "fixed" || t.position === "sticky") {
|
|
1444
|
-
|
|
1450
|
+
U = e, ie = e.getAttribute("style");
|
|
1445
1451
|
break;
|
|
1446
1452
|
}
|
|
1447
1453
|
e = e.parentElement;
|
|
@@ -1449,10 +1455,10 @@ var e = (e, t, n) => {
|
|
|
1449
1455
|
let d = n.parentElement;
|
|
1450
1456
|
for (; d && d !== i.body && d !== i.documentElement;) {
|
|
1451
1457
|
let e = r.getComputedStyle(d);
|
|
1452
|
-
(e.transform && e.transform !== "none" || e.willChange && e.willChange !== "auto" || e.contain && e.contain !== "none" || e.filter && e.filter !== "none" || e.perspective && e.perspective !== "none") && (
|
|
1458
|
+
(e.transform && e.transform !== "none" || e.willChange && e.willChange !== "auto" || e.contain && e.contain !== "none" || e.filter && e.filter !== "none" || e.perspective && e.perspective !== "none") && (V.push({
|
|
1453
1459
|
el: d,
|
|
1454
1460
|
orig: d.getAttribute("style")
|
|
1455
|
-
}), d.style.transform = "none", d.style.willChange = "auto", d.style.contain = "none", d.style.filter = "none", d.style.perspective = "none"), e.overflow !== "visible" && (
|
|
1461
|
+
}), d.style.transform = "none", d.style.willChange = "auto", d.style.contain = "none", d.style.filter = "none", d.style.perspective = "none"), e.overflow !== "visible" && (V.find((e) => e.el === d) || V.push({
|
|
1456
1462
|
el: d,
|
|
1457
1463
|
orig: d.getAttribute("style")
|
|
1458
1464
|
}), d.style.overflow = "visible"), d = d.parentElement;
|
|
@@ -1460,20 +1466,20 @@ var e = (e, t, n) => {
|
|
|
1460
1466
|
let m = n.style;
|
|
1461
1467
|
if (m.setProperty("position", f === u.afr ? "absolute" : "fixed", f === u.afr ? "important" : ""), m.setProperty("top", "0", f === u.afr ? "important" : ""), m.setProperty("left", "0", f === u.afr ? "important" : ""), m.setProperty("width", f === u.afr ? "0" : "100vw", f === u.afr ? "important" : ""), m.setProperty("height", f === u.afr ? "0" : "100dvh", f === u.afr ? "important" : ""), m.setProperty("z-index", f === u.afr ? "0" : String(t.zIndex), f === u.afr ? "important" : ""), m.setProperty("border", "none", f === u.afr ? "important" : ""), m.setProperty("margin", "0", f === u.afr ? "important" : ""), m.setProperty("padding", "0", f === u.afr ? "important" : ""), m.setProperty("display", "block", f === u.afr ? "important" : ""), m.setProperty("opacity", f === u.afr ? "0" : "1", f === u.afr ? "important" : ""), m.setProperty("pointer-events", "none", f === u.afr ? "important" : ""), f === u.afr && l && l !== "about:blank") try {
|
|
1462
1468
|
let e = new URL(l);
|
|
1463
|
-
e.searchParams.set("mfRole", "wallpaper"),
|
|
1464
|
-
let t =
|
|
1465
|
-
t.setProperty("position", "fixed", "important"), t.setProperty("top", "0", "important"), t.setProperty("left", "0", "important"), t.setProperty("width", "100vw", "important"), t.setProperty("height", "100dvh", "important"), t.setProperty("border", "none", "important"), t.setProperty("margin", "0", "important"), t.setProperty("padding", "0", "important"), t.setProperty("display", "block", "important"), t.setProperty("background", "transparent", "important"), t.setProperty("z-index", "0", "important"), t.setProperty("pointer-events", "none", "important"), i.body.insertBefore(
|
|
1469
|
+
e.searchParams.set("mfRole", "wallpaper"), z = i.createElement("iframe"), z.src = e.href, z.setAttribute("data-mf-wallpaper-iframe", ""), z.setAttribute("scrolling", "no"), z.setAttribute("frameborder", "0");
|
|
1470
|
+
let t = z.style;
|
|
1471
|
+
t.setProperty("position", "fixed", "important"), t.setProperty("top", "0", "important"), t.setProperty("left", "0", "important"), t.setProperty("width", "100vw", "important"), t.setProperty("height", "100dvh", "important"), t.setProperty("border", "none", "important"), t.setProperty("margin", "0", "important"), t.setProperty("padding", "0", "important"), t.setProperty("display", "block", "important"), t.setProperty("background", "transparent", "important"), t.setProperty("z-index", "0", "important"), t.setProperty("pointer-events", "none", "important"), i.body.insertBefore(z, i.body.firstChild);
|
|
1466
1472
|
} catch (e) {
|
|
1467
1473
|
console.warn("[mobilefireplace] Could not create AFR wallpaper iframe:", e);
|
|
1468
1474
|
}
|
|
1469
|
-
if (a.setAttribute("poweredAC", "0.1.
|
|
1475
|
+
if (a.setAttribute("poweredAC", "0.1.92"), _) {
|
|
1470
1476
|
let e = _.style;
|
|
1471
1477
|
e.width = "100%", e.height = "0", e.overflow = "visible", e.position = "static", e.margin = "0";
|
|
1472
1478
|
}
|
|
1473
1479
|
let h = a.style;
|
|
1474
1480
|
h.height = t.billboardHeight + "px", h.minHeight = t.billboardHeight + "px", h.background = "transparent", h.overflow = "visible", h.position = "relative", h.width = "100%", h.padding = "0", h.margin = "0", y && (y.style.overflow = "visible", y.style.position = "relative", y.style.backgroundColor = "transparent", y.style.height = t.billboardHeight + "px", y.style.minHeight = t.billboardHeight + "px", y.style.maxHeight = t.billboardHeight + "px", y.style.padding = "0", y.style.margin = "0", x && S && S !== "0px" && (y.style.marginTop = S), y.setAttribute("data-mf-slot", ""));
|
|
1475
1481
|
let g = `max(${t.sideStripWidth}px, env(safe-area-inset-left))`, v = `max(${t.sideStripWidth}px, env(safe-area-inset-right))`;
|
|
1476
|
-
if (
|
|
1482
|
+
if (L = i.createElement("style"), L.id = "mobilefireplace-pac", L.textContent = `
|
|
1477
1483
|
/* Mobile Fireplace — powered-ad-config */
|
|
1478
1484
|
html, body {
|
|
1479
1485
|
background-color: transparent !important;
|
|
@@ -1726,84 +1732,84 @@ var e = (e, t, n) => {
|
|
|
1726
1732
|
margin: 0 !important;
|
|
1727
1733
|
padding: 0 !important;
|
|
1728
1734
|
}
|
|
1729
|
-
`, i.head.appendChild(
|
|
1730
|
-
let e =
|
|
1731
|
-
e && (
|
|
1735
|
+
`, i.head.appendChild(L), f.setup && f.setup(i, a), f === u.wwos) {
|
|
1736
|
+
let e = be();
|
|
1737
|
+
e && (N = e.el, P = N.getAttribute("style"), F = e.list, I = F ? F.getAttribute("style") : null, N.style.marginLeft = "10px", N.style.marginRight = "10px", N.style.width = "calc(100% - 20px)", F && (F.style.width = "100%"));
|
|
1732
1738
|
}
|
|
1733
|
-
if (o && f !== u.afr && (
|
|
1734
|
-
if (
|
|
1739
|
+
if (o && f !== u.afr && (U || p)) {
|
|
1740
|
+
if (U && (te = c || y), l && l !== "about:blank") {
|
|
1735
1741
|
let e = new URL(l);
|
|
1736
|
-
e.searchParams.set("mfRole", "wallpaper"),
|
|
1737
|
-
let n =
|
|
1738
|
-
n.position = "fixed", n.top = "0", n.left = "0", n.width = "100vw", n.height = "100dvh", n.border = "none", n.margin = "0", n.padding = "0", n.display = "block", n.background = "transparent", n.zIndex = String(t.zIndex), n.pointerEvents = "none", i.body.insertBefore(
|
|
1742
|
+
e.searchParams.set("mfRole", "wallpaper"), z = i.createElement("iframe"), z.src = e.href, z.setAttribute("data-mf-wallpaper-iframe", ""), z.setAttribute("scrolling", "no"), z.setAttribute("frameborder", "0");
|
|
1743
|
+
let n = z.style;
|
|
1744
|
+
n.position = "fixed", n.top = "0", n.left = "0", n.width = "100vw", n.height = "100dvh", n.border = "none", n.margin = "0", n.padding = "0", n.display = "block", n.background = "transparent", n.zIndex = String(t.zIndex), n.pointerEvents = "none", i.body.insertBefore(z, i.body.firstChild);
|
|
1739
1745
|
}
|
|
1740
|
-
n.style.position = "absolute", n.style.top = "0", n.style.left = "0", n.style.width = "0", n.style.height = "0", n.style.opacity = "0", n.style.pointerEvents = "none", n.style.zIndex = "-1",
|
|
1741
|
-
for (let { el: e } of
|
|
1742
|
-
E && (E.style.borderTop = "0", E.style.outline = "0", E.style.boxShadow = "none"), O && (O.style.borderBottom = "0"),
|
|
1746
|
+
n.style.position = "absolute", n.style.top = "0", n.style.left = "0", n.style.width = "0", n.style.height = "0", n.style.opacity = "0", n.style.pointerEvents = "none", n.style.zIndex = "-1", B = ye(), o.parentElement.insertBefore(B, o), U ? (U.style.position = "static", U.style.inset = "auto", U.style.height = "0", U.style.minHeight = "0", U.style.maxHeight = "0", U.style.overflow = "hidden", U.style.backgroundColor = "transparent", U.style.boxShadow = "none", U.style.border = "0", U.style.outline = "0", U.style.pointerEvents = "none") : y && (y.style.height = "0", y.style.minHeight = "0", y.style.maxHeight = "0", y.style.overflow = "hidden", y.style.backgroundColor = "transparent", y.style.border = "0", y.style.outline = "0"), h.height = "0", h.minHeight = "0", h.width = "0", h.overflow = "hidden", s && (s.style.backgroundColor = "transparent", s.style.backgroundImage = "none", s.style.position = "relative", s.style.zIndex = "1"), o.style.marginLeft = "14px", o.style.marginRight = "14px", o.style.backgroundColor = "#ffffff", o.style.position = "relative", o.style.zIndex = "2", o.style.overflowX = "clip", o.style.isolation = "isolate";
|
|
1747
|
+
for (let { el: e } of M) e.style.backgroundColor = "transparent", e.style.boxShadow = "none", e.style.paddingLeft = "10px", e.style.paddingRight = "10px";
|
|
1748
|
+
E && (E.style.borderTop = "0", E.style.outline = "0", E.style.boxShadow = "none"), O && (O.style.borderBottom = "0"), A && (A.style.marginLeft = "14px", A.style.marginRight = "14px", A.style.position = "relative", A.style.zIndex = "2"), _e();
|
|
1743
1749
|
}
|
|
1744
|
-
|
|
1745
|
-
},
|
|
1750
|
+
B || (B = ye(), a.appendChild(B));
|
|
1751
|
+
}, $e = null, et = null, tt = !1, nt = () => {
|
|
1746
1752
|
let e = r.innerWidth, n = r.innerHeight;
|
|
1747
1753
|
if (e > n) {
|
|
1748
1754
|
let r = n / e, i = Math.round(t.billboardHeight * r);
|
|
1749
|
-
a.style.height = i + "px", a.style.minHeight = i + "px",
|
|
1750
|
-
} else a.style.height = t.billboardHeight + "px", a.style.minHeight = t.billboardHeight + "px",
|
|
1751
|
-
G === "active" ?
|
|
1755
|
+
a.style.height = i + "px", a.style.minHeight = i + "px", B && (B.style.height = i + "px", B.style.minHeight = i + "px", B.style.maxHeight = i + "px"), R && (R.style.height = i + "px");
|
|
1756
|
+
} else a.style.height = t.billboardHeight + "px", a.style.minHeight = t.billboardHeight + "px", B && (B.style.height = t.billboardHeight + "px", B.style.minHeight = t.billboardHeight + "px", B.style.maxHeight = t.billboardHeight + "px"), R && (R.style.height = t.billboardHeight + "px");
|
|
1757
|
+
G === "active" ? Fe() : je();
|
|
1752
1758
|
};
|
|
1753
|
-
if (
|
|
1759
|
+
if (Qe(), l && l !== "about:blank") try {
|
|
1754
1760
|
let e = new URL(l);
|
|
1755
|
-
e.searchParams.set("mfRole", "billboard"),
|
|
1756
|
-
let n =
|
|
1757
|
-
n.position =
|
|
1761
|
+
e.searchParams.set("mfRole", "billboard"), R = i.createElement("iframe"), R.src = e.href, R.setAttribute("data-mf-billboard-iframe", ""), R.setAttribute("scrolling", "no"), R.setAttribute("frameborder", "0");
|
|
1762
|
+
let n = R.style;
|
|
1763
|
+
n.position = Z ? "absolute" : "relative", n.width = "100%", n.height = t.billboardHeight + "px", n.border = "none", n.margin = "0", n.padding = "0", n.display = "block", n.overflow = "hidden", n.background = "transparent", n.zIndex = Z ? "6" : "1", Z ? (R.setAttribute("data-mf-body-billboard", ""), i.body.appendChild(R), Ae()) : (B || a).appendChild(R), se && (J = Ze, r.addEventListener("scroll", J, { passive: !0 }), i.addEventListener("scroll", J, { passive: !0 }), i.scrollingElement?.addEventListener("scroll", J, { passive: !0 }));
|
|
1758
1764
|
} catch (e) {
|
|
1759
1765
|
console.warn("[mobilefireplace] Could not create billboard iframe:", e);
|
|
1760
1766
|
}
|
|
1761
1767
|
r.__mfBridge = {
|
|
1762
1768
|
adapted: !1,
|
|
1763
|
-
wallpaperWindow:
|
|
1764
|
-
billboardIframe:
|
|
1769
|
+
wallpaperWindow: z?.contentWindow || n.contentWindow,
|
|
1770
|
+
billboardIframe: R,
|
|
1765
1771
|
billboardWindow: null
|
|
1766
|
-
},
|
|
1772
|
+
}, z && z.addEventListener("load", () => {
|
|
1767
1773
|
try {
|
|
1768
|
-
r.__mfBridge && (r.__mfBridge.wallpaperWindow =
|
|
1774
|
+
r.__mfBridge && (r.__mfBridge.wallpaperWindow = z.contentWindow);
|
|
1769
1775
|
} catch {}
|
|
1770
|
-
}),
|
|
1776
|
+
}), R && R.addEventListener("load", () => {
|
|
1771
1777
|
try {
|
|
1772
|
-
r.__mfBridge.billboardWindow =
|
|
1778
|
+
r.__mfBridge.billboardWindow = R.contentWindow;
|
|
1773
1779
|
} catch {}
|
|
1774
|
-
}),
|
|
1775
|
-
|
|
1776
|
-
}, window.addEventListener("pagehide",
|
|
1780
|
+
}), $e = nt, r.addEventListener("resize", $e), nt(), et = () => {
|
|
1781
|
+
rt();
|
|
1782
|
+
}, window.addEventListener("pagehide", et), window.addEventListener("beforeunload", et), t.onAdapt && r.requestAnimationFrame(() => {
|
|
1777
1783
|
r.__mfBridge.adapted = !0, t.onAdapt();
|
|
1778
1784
|
});
|
|
1779
|
-
let
|
|
1780
|
-
if (
|
|
1781
|
-
|
|
1785
|
+
let rt = () => {
|
|
1786
|
+
if (!tt) {
|
|
1787
|
+
tt = !0, et &&= (window.removeEventListener("pagehide", et), window.removeEventListener("beforeunload", et), null), $e &&= (r.removeEventListener("resize", $e), null), J &&= (r.removeEventListener("scroll", J), i.removeEventListener("scroll", J), i.scrollingElement?.removeEventListener("scroll", J), null), Y &&= (r.cancelAnimationFrame(Y), null), Le(), K &&= (r.cancelAnimationFrame(K), null), q &&= (r.clearTimeout(q), null), Te({
|
|
1782
1788
|
active: !1,
|
|
1783
1789
|
progress: 1,
|
|
1784
1790
|
remainingMs: 0
|
|
1785
|
-
}),
|
|
1791
|
+
}), L && L.parentNode && (L.parentNode.removeChild(L), L = null), R && R.parentNode && (R.parentNode.removeChild(R), R = null), Q = null, me = null, B && B.parentNode && (B.parentNode.removeChild(B), B = null), z && z.parentNode && (z.parentNode.removeChild(z), z = null);
|
|
1786
1792
|
try {
|
|
1787
1793
|
delete r.__mfBridge;
|
|
1788
1794
|
} catch {}
|
|
1789
|
-
for (let e =
|
|
1790
|
-
let { shell: t, parent: n, nextSibling: r } =
|
|
1795
|
+
for (let e = ae.length - 1; e >= 0; --e) {
|
|
1796
|
+
let { shell: t, parent: n, nextSibling: r } = ae[e];
|
|
1791
1797
|
!t || !n || (r && r.parentNode === n ? n.insertBefore(t, r) : n.appendChild(t));
|
|
1792
1798
|
}
|
|
1793
|
-
|
|
1794
|
-
for (let { el: e, orig: t } of
|
|
1795
|
-
|
|
1796
|
-
for (let { el: e, orig: t } of
|
|
1797
|
-
|
|
1799
|
+
ae.length = 0, H && (ee && ee.parentNode === H ? H.insertBefore(n, ee) : H.appendChild(n), H = null, ee = null), m ? n.setAttribute("style", m) : n.removeAttribute("style"), h || n.removeAttribute("data-mf-wallpaper-iframe");
|
|
1800
|
+
for (let { el: e, orig: t } of V) t ? e.setAttribute("style", t) : e.removeAttribute("style");
|
|
1801
|
+
V.length = 0, g ? a.setAttribute("style", g) : a.removeAttribute("style"), _ && (v ? _.setAttribute("style", v) : _.removeAttribute("style")), te &&= (ne && (re && re.parentNode === ne ? ne.insertBefore(te, re) : ne.appendChild(te), ne = null, re = null), null), y && (y.removeAttribute("data-mf-slot"), C ? y.setAttribute("style", C) : y.removeAttribute("style")), U && (ie ? U.setAttribute("style", ie) : U.removeAttribute("style"), U = null, ie = null);
|
|
1802
|
+
for (let { el: e, orig: t } of M) t ? e.setAttribute("style", t) : e.removeAttribute("style");
|
|
1803
|
+
F && (I ? F.setAttribute("style", I) : F.removeAttribute("style"), F = null, I = null), N && (P ? N.setAttribute("style", P) : N.removeAttribute("style"), N = null, P = null), o && (T ? o.setAttribute("style", T) : o.removeAttribute("style")), E && (D ? E.setAttribute("style", D) : E.removeAttribute("style")), O && (k ? O.setAttribute("style", k) : O.removeAttribute("style")), A && (j ? A.setAttribute("style", j) : A.removeAttribute("style")), s && (w ? s.setAttribute("style", w) : s.removeAttribute("style"));
|
|
1798
1804
|
}
|
|
1799
1805
|
};
|
|
1800
|
-
return
|
|
1801
|
-
},
|
|
1802
|
-
function
|
|
1803
|
-
typeof
|
|
1806
|
+
return rt;
|
|
1807
|
+
}, L = () => {};
|
|
1808
|
+
function R({ adFormat: e = "", stickyOffset: t = 0, logoPosX: n = 0, logoHeight: r = 0, logoSmallHeight: i = 0, ...a } = {}) {
|
|
1809
|
+
typeof L == "function" && L();
|
|
1804
1810
|
let o = () => {};
|
|
1805
|
-
return e === "fireplace" ? o = d(t) : e === "fireplace-collant" ? o = f(t) : e === "logomorph" ? o =
|
|
1811
|
+
return e === "fireplace" ? o = d(t) : e === "fireplace-collant" ? o = f(t) : e === "logomorph" ? o = M(n, r, i) : e === "dynamicheading" ? o = j(a) : e === "interscroller" ? o = P(a) : e === "liquidframe" ? o = F(a) : e === "mobilefireplace" ? o = I(a) : console.warn("[powered-ad-config] Unknown ad format:", e), L = typeof o == "function" ? o : () => {}, L;
|
|
1806
1812
|
}
|
|
1807
|
-
|
|
1813
|
+
R.version = "0.1.92";
|
|
1808
1814
|
//#endregion
|
|
1809
|
-
export {
|
|
1815
|
+
export { R as default };
|