powered-ad-config 0.0.96 → 0.0.97

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.
@@ -144,7 +144,7 @@ const F = (S) => {
144
144
  { site: "https://creative-preview-an.com", config: a }
145
145
  ], x = () => {
146
146
  const o = window.document.getElementById("nineContent");
147
- o && (o.style.backgroundColor = k.siteBackgroundColor), T(), C(), p.addEventListener("scroll", M), h = setTimeout(M, 50);
147
+ o && (o.style.backgroundColor = k.siteBackgroundColor), N(), C(), p.addEventListener("scroll", M), h = setTimeout(M, 50);
148
148
  }, E = () => {
149
149
  let o = null;
150
150
  return o = c.querySelector('div[id*="billboard"][id*="above"]'), o;
@@ -157,7 +157,7 @@ const F = (S) => {
157
157
  if (!i) return;
158
158
  const o = i.style;
159
159
  o.width = "100%", o.height = "1000px", o.position = "fixed", o.left = "50%", o.transform = "translate(-50%, 0)";
160
- }, T = () => {
160
+ }, N = () => {
161
161
  if (!I) return;
162
162
  const o = I.style;
163
163
  I.className = "", o.minHeight = "250px", o.marginTop = k.adNodeMarginTop + "px", o.marginBottom = k.adNodeMarginBottom + "px", o.position = "static", o.display = "block", k.zIndex && k.zIndex();
@@ -199,7 +199,7 @@ const F = (S) => {
199
199
  stickyMargin: { offset: 160, isSticky: !0 },
200
200
  maskOffset: 298,
201
201
  zIndex: function() {
202
- const e = window.parent.document, l = (u, N) => u.forEach((P) => N.forEach(([D, H]) => P.style[D] = H));
202
+ const e = window.parent.document, l = (u, T) => u.forEach((L) => T.forEach(([D, H]) => L.style[D] = H));
203
203
  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"), l(e.querySelectorAll(".column"), [["position", "relative"]]), l(e.querySelectorAll(".advert"), [["position", "relative"]]), l(e.querySelectorAll("blockquote"), [["zIndex", "1"]]), e.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), e.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none");
204
204
  }
205
205
  }, A = {
@@ -213,7 +213,7 @@ const F = (S) => {
213
213
  stickyMargin: { offset: 160, isSticky: !0 },
214
214
  maskOffset: window.parent.document.querySelector('div[class*="video-index__MyContainer"]') ? 248 : 298,
215
215
  zIndex: function() {
216
- const e = window.parent.document, l = (u, N) => u.forEach((P) => N.forEach(([D, H]) => P.style[D] = H));
216
+ const e = window.parent.document, l = (u, T) => u.forEach((L) => T.forEach(([D, H]) => L.style[D] = H));
217
217
  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"), l(e.querySelectorAll(".column"), [["position", "relative"]]), l(e.querySelectorAll(".advert"), [["position", "relative"]]), l(e.querySelectorAll("blockquote"), [["zIndex", "1"]]), e.querySelector('div[class^="component__StrapContainer"]')?.setAttribute("style", "position:relative"), e.querySelector('div[class*="ArticleContainer"]')?.setAttribute("style", "max-width:1190px;margin-top:24px"), e.querySelector('div[class*="MyContainer"]')?.setAttribute("style", "max-width:1190px;margin-top:24px");
218
218
  }
219
219
  }, w = {
@@ -250,12 +250,12 @@ const F = (S) => {
250
250
  zIndex: function() {
251
251
  const e = window.parent.document, u = e.querySelector("footer").previousElementSibling;
252
252
  if (u && u.tagName.toLowerCase() === "div" && (u.style.position = "relative"), e.querySelector('div[id*="tablet"][id*="takeover"]')) {
253
- let P = e.createElement("style");
254
- P.innerHTML = `
253
+ let L = e.createElement("style");
254
+ L.innerHTML = `
255
255
  div:has(#adspot-tablet-takeover-2-above) {
256
256
  position: static;
257
257
  }
258
- `, e.head.appendChild(P);
258
+ `, e.head.appendChild(L);
259
259
  }
260
260
  }
261
261
  }, x = {
@@ -269,14 +269,14 @@ const F = (S) => {
269
269
  stickyMargin: { offset: 175, isSticky: !0 },
270
270
  maskOffset: 274,
271
271
  zIndex: function() {
272
- const e = window.parent.document, l = (N, P) => N.forEach((D) => P.forEach(([H, z]) => D.style[H] = z));
272
+ const e = window.parent.document, l = (T, L) => T.forEach((D) => L.forEach(([H, z]) => D.style[H] = z));
273
273
  if (e.querySelector(".container--padded")?.setAttribute("style", "position:relative"), l(e.querySelectorAll(".advert"), [["position", "relative"]]), e.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), e.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none"), e.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style", "display:none"), e.querySelector(".score-strip")?.setAttribute("style", "display:none"), e.querySelector(".feed-header__breadcrumbs")?.setAttribute("style", "display:none"), e.querySelector(".layout.container")?.setAttribute("style", "padding:0"), e.querySelector(".empty-div")?.setAttribute("style", "display:none"), e.querySelector('div[id*="tablet"][id*="takeover"]')) {
274
- let N = e.createElement("style");
275
- N.innerHTML = `
274
+ let T = e.createElement("style");
275
+ T.innerHTML = `
276
276
  div:has(#adspot-tablet-takeover-2-above) {
277
277
  position: static;
278
278
  }
279
- `, e.head.appendChild(N);
279
+ `, e.head.appendChild(T);
280
280
  }
281
281
  }
282
282
  }, E = {
@@ -329,7 +329,7 @@ const F = (S) => {
329
329
  ], C = () => {
330
330
  const e = window.document.getElementById("nineContent");
331
331
  e && (e.style.backgroundColor = t.siteBackgroundColor), a && (q.setProperty("--masthead-height", "250px"), q.height = "var(--masthead-height)"), h(), k(), M(), g(), p.addEventListener("scroll", f, { passive: !0 }), r = setTimeout(f, 50);
332
- }, T = () => {
332
+ }, N = () => {
333
333
  let e = null;
334
334
  return e = c.querySelector('div[id*="billboard"][id*="above"]'), e;
335
335
  }, M = () => {
@@ -360,18 +360,18 @@ const F = (S) => {
360
360
  };
361
361
  let b = 0, o = 0;
362
362
  const f = () => {
363
- const e = p.scrollY, l = e > b, u = e > v ? e - t.maskOffset : 0, N = Math.abs(u - o);
363
+ const e = p.scrollY, l = e > b, u = e > v ? e - t.maskOffset : 0, T = Math.abs(u - o);
364
364
  if (n)
365
365
  if (l && u > o)
366
- if (N > 100) {
367
- const P = Math.max(0, u - 100);
368
- n.style.transition = "none", n.style.setProperty("--mask-inset", `${P}px`), n.offsetHeight, n.style.transition = "clip-path 0.3s ease-out", n.style.setProperty("--mask-inset", `${u}px`);
366
+ if (T > 100) {
367
+ const L = Math.max(0, u - 100);
368
+ n.style.transition = "none", n.style.setProperty("--mask-inset", `${L}px`), n.offsetHeight, n.style.transition = "clip-path 0.3s ease-out", n.style.setProperty("--mask-inset", `${u}px`);
369
369
  } else
370
370
  n.style.transition = "clip-path 0.3s ease-out", n.style.setProperty("--mask-inset", `${u}px`);
371
371
  else
372
372
  n.style.transition = "none", n.style.setProperty("--mask-inset", `${u}px`);
373
373
  b = e, o = u, e > v ? (i.style.setProperty("--transform-y", `${-m}px`), q.setProperty("--masthead-height", "100px"), window.CollantOn || window.goCollant()) : e > m && e <= v ? (i.style.setProperty("--transform-y", `${-m}px`), q.setProperty("--masthead-height", `${250 + m - e}px`), window.CollantOn && window.goBillboard()) : e >= 0 && e <= m && (i.style.setProperty("--transform-y", `${-e}px`), q.setProperty("--masthead-height", "250px"), window.CollantOn && window.goBillboard());
374
- }, s = T(), t = I();
374
+ }, s = N(), t = I();
375
375
  if (!t) return () => {
376
376
  };
377
377
  let r = null;
@@ -502,7 +502,7 @@ const F = (S) => {
502
502
  }, C = () => {
503
503
  let t = null;
504
504
  return t = q.querySelector('div[id*="desktop"][id*="takeover"][id*="above"]'), t;
505
- }, T = () => {
505
+ }, N = () => {
506
506
  const t = a.location.href;
507
507
  for (let r = 0; r < E.length; r += 1)
508
508
  if (t.indexOf(E[r].site) >= 0)
@@ -522,7 +522,7 @@ const F = (S) => {
522
522
  }, h = () => {
523
523
  const t = a.scrollY;
524
524
  c.style, t >= 0 && t <= f ? k("big") : t > f && (t > s ? k("small") : k("big"), s = t <= 0 ? 0 : t);
525
- }, g = C(), b = T();
525
+ }, g = C(), b = N();
526
526
  if (!b) return () => {
527
527
  };
528
528
  let o = null;
@@ -700,25 +700,25 @@ const F = (S) => {
700
700
  }
701
701
  n.after(v);
702
702
  })();
703
- const x = a.querySelector("#interscroller-top-band"), E = a.querySelector("#interscroller-top-band-wrapper"), d = a.querySelector("#interscroller-bottom-band"), C = a.querySelector("#interscroller-bottom-label"), T = a.querySelector("#interscroller-bottom-progress"), M = i.bandHeight, I = i.snapPx;
703
+ const x = a.querySelector("#interscroller-top-band"), E = a.querySelector("#interscroller-top-band-wrapper"), d = a.querySelector("#interscroller-bottom-band"), C = a.querySelector("#interscroller-bottom-label"), N = a.querySelector("#interscroller-bottom-progress"), M = i.bandHeight, I = i.snapPx;
704
704
  let k = !1, h = !1, g = !1, b = !1;
705
705
  const o = (i.thresholds || []).map(() => !1), f = () => {
706
706
  if (!d) return;
707
- const s = n.getBoundingClientRect(), t = c.innerHeight, r = s.top <= t, m = s.bottom <= t - M, v = b ? s.top <= t - i.bottomBandHideAt : s.top <= t - i.bottomBandShowAt, e = n.offsetHeight, l = Math.min(1, Math.max(0, (t - s.top) / (e + t))), u = Math.min(1, Math.max(0, (t - s.top) / (e + M))), N = Math.min(1, Math.max(0, (t - s.top) / e)), P = Math.min(s.bottom, t) - Math.max(s.top - M, 0), D = Math.min(1, Math.max(0, P / t)), H = Math.max(0, Math.round(s.bottom - t));
708
- !h && r && i.onEnter && i.onEnter(), !g && m && i.onExit && i.onExit(), h = r, g = m, b = v, i.onProgress && i.onProgress({ scrollProgress: l, adExposure: N, viewportCoverage: D, pxRemaining: H }), (i.thresholds || []).forEach((L, O) => {
709
- const _ = o[O], $ = l >= L.at;
710
- !_ && $ ? (o[O] = !0, L.onEnter && L.onEnter(l)) : _ && !$ && (o[O] = !1, L.onLeave && L.onLeave(l));
707
+ const s = n.getBoundingClientRect(), t = c.innerHeight, r = s.top <= t, m = s.bottom <= t - M, v = b ? s.top <= t - i.bottomBandHideAt : s.top <= t - i.bottomBandShowAt, e = n.offsetHeight, l = Math.min(1, Math.max(0, (t - s.top) / (e + t))), u = Math.min(1, Math.max(0, (t - s.top) / (e + M))), T = Math.min(1, Math.max(0, (t - s.top) / e)), L = Math.min(s.bottom, t) - Math.max(s.top - M, 0), D = Math.min(1, Math.max(0, L / t)), H = Math.max(0, Math.round(s.bottom - t));
708
+ !h && r && i.onEnter && i.onEnter(), !g && m && i.onExit && i.onExit(), h = r, g = m, b = v, i.onProgress && i.onProgress({ scrollProgress: l, adExposure: T, viewportCoverage: D, pxRemaining: H }), (i.thresholds || []).forEach((P, R) => {
709
+ const _ = o[R], $ = l >= P.at;
710
+ !_ && $ ? (o[R] = !0, P.onEnter && P.onEnter(l)) : _ && !$ && (o[R] = !1, P.onLeave && P.onLeave(l));
711
711
  });
712
712
  const z = t;
713
713
  if (x && s.top <= z + i.stretchOverlap && !m) {
714
- const L = z - s.top;
715
- if (!k && L <= I - i.snapOverlap) {
716
- const O = 1 + Math.max(0, L + i.stretchOverlap) / M;
717
- x.style.transition = "none", x.style.transform = `scaleY(${O})`;
718
- } else !k && L > I - i.snapOverlap && (k = !0, x.style.transition = `transform ${i.snapDuration}s ${i.snapEase}`, x.style.transform = "scaleY(1)");
714
+ const P = z - s.top;
715
+ if (!k && P <= I - i.snapOverlap) {
716
+ const R = 1 + Math.max(0, P + i.stretchOverlap) / M;
717
+ x.style.transition = "none", x.style.transform = `scaleY(${R})`;
718
+ } else !k && P > I - i.snapOverlap && (k = !0, x.style.transition = `transform ${i.snapDuration}s ${i.snapEase}`, x.style.transform = "scaleY(1)");
719
719
  } else x && s.top > z + i.stretchOverlap && (k = !1, x.style.transition = "none", x.style.transform = "scaleY(1)");
720
- const W = c.visualViewport ? Math.round(c.innerHeight - (c.visualViewport.offsetTop + c.visualViewport.height)) : 0;
721
- m ? (d.style.transition = "none", d.style.transform = "none", d.style.position = "sticky", d.style.top = "0", d.style.bottom = "", d.style.left = "", d.style.marginLeft = "calc(50% - 50vw)", d.style.width = "100vw", C && (C.textContent = i.labelBottomNow), T && (T.style.width = "100%")) : v ? (C && (C.textContent = H > 0 ? u < 0.2 ? i.labelBottomResume : u < 0.75 ? i.labelBottomMid : i.labelBottomLate : i.labelBottomNow), T && (T.style.width = `${Math.round(u * 100)}%`), d.style.transition = "transform 0.3s ease", d.style.transform = "translateY(0)", d.style.position = "fixed", d.style.bottom = `${W}px`, d.style.top = "", d.style.left = "0", d.style.marginLeft = "0", d.style.width = "100vw") : (d.style.transition = "transform 0.3s ease", d.style.transform = "translateY(100%)", d.style.position = "fixed", d.style.bottom = `${W}px`, d.style.left = "0", d.style.marginLeft = "0", d.style.width = "100vw");
720
+ const O = c.visualViewport ? Math.round(c.innerHeight - (c.visualViewport.offsetTop + c.visualViewport.height)) : 0;
721
+ m ? (d.style.transition = "none", d.style.transform = "none", d.style.position = "sticky", d.style.top = "0", d.style.bottom = "", d.style.left = "", d.style.marginLeft = "calc(50% - 50vw)", d.style.width = "100vw", C && (C.textContent = i.labelBottomNow), N && (N.style.width = "100%")) : v ? (C && (C.textContent = H > 0 ? u < 0.2 ? i.labelBottomResume : u < 0.75 ? i.labelBottomMid : i.labelBottomLate : i.labelBottomNow), N && (N.style.width = `${Math.round(u * 100)}%`), d.style.transition = "transform 0.3s ease", d.style.transform = "translateY(0)", d.style.position = "fixed", d.style.bottom = `${O}px`, d.style.top = "", d.style.left = "0", d.style.marginLeft = "0", d.style.width = "100vw") : (d.style.transition = "transform 0.3s ease", d.style.transform = "translateY(100%)", d.style.position = "fixed", d.style.bottom = `${O}px`, d.style.left = "0", d.style.marginLeft = "0", d.style.width = "100vw");
722
722
  };
723
723
  return f(), c.addEventListener("scroll", f, { passive: !0 }), c.visualViewport?.addEventListener("resize", f, { passive: !0 }), () => {
724
724
  c.removeEventListener("scroll", f), c.visualViewport?.removeEventListener("resize", f), E ? E.remove() : x && x.remove(), d && d.remove(), y ? n.setAttribute("style", y) : n.removeAttribute("style"), A ? p.setAttribute("style", A) : p.removeAttribute("style");
@@ -770,7 +770,7 @@ const F = (S) => {
770
770
  };
771
771
  const y = n.getAttribute("style"), A = p.getAttribute("style"), w = p.parentElement !== n ? p.parentElement : null, B = w ? w.getAttribute("style") : null, x = n.parentElement, E = x ? c.getComputedStyle(x).paddingTop : null;
772
772
  let d = null;
773
- const C = parseInt(p.getAttribute("width"), 10) || 320, T = parseInt(p.getAttribute("height"), 10) || 50, M = () => {
773
+ const C = parseInt(p.getAttribute("width"), 10) || 320, N = parseInt(p.getAttribute("height"), 10) || 50, M = () => {
774
774
  const h = n.style;
775
775
  if (h.position = "relative", h.overflow = "visible", h.boxSizing = "border-box", n.setAttribute("poweredAC", "0.0.96"), w) {
776
776
  const b = w.style;
@@ -780,8 +780,8 @@ const F = (S) => {
780
780
  g.display = "block", g.width = "100%", g.height = "100%", g.border = "none", g.margin = "0", g.padding = "0";
781
781
  }, I = () => {
782
782
  const h = n.style;
783
- h.zIndex = String(i.zIndex), i.adaptToWidth && (h.width = i.adaptToWidth, h.maxWidth = i.maxWidth || i.adaptToWidth, (i.adaptToWidth === "100vw" || i.adaptToWidth.endsWith("vw")) && (h.marginLeft = "calc(50% - 50vw)", h.marginRight = "0")), x && E && E !== "0px" && (x.style.paddingTop = "0"), i.maintainAspectRatio ? c.requestAnimationFrame(() => {
784
- const b = n.offsetWidth || C, f = Math.round(b * (T / C));
783
+ h.zIndex = String(i.zIndex), i.adaptToWidth && (h.width = i.adaptToWidth, h.maxWidth = i.maxWidth || i.adaptToWidth, i.maxWidth && i.adaptToWidth !== "100vw" && !i.adaptToWidth.endsWith("vw") ? (h.marginLeft = "auto", h.marginRight = "auto") : (i.adaptToWidth === "100vw" || i.adaptToWidth.endsWith("vw")) && (h.marginLeft = "calc(50% - 50vw)", h.marginRight = "0")), x && E && E !== "0px" && (x.style.paddingTop = "0"), i.maintainAspectRatio ? c.requestAnimationFrame(() => {
784
+ const b = n.offsetWidth || C, f = Math.round(b * (N / C));
785
785
  n.style.height = f + "px", w && (w.style.height = f + "px"), p.style.height = f + "px", i.onAdapt && i.onAdapt();
786
786
  }) : (i.adaptToHeight && (h.height = i.adaptToHeight), i.onAdapt && i.onAdapt());
787
787
  };
@@ -799,14 +799,14 @@ const F = (S) => {
799
799
  d && (d.disconnect(), d = null), y ? n.setAttribute("style", y) : n.removeAttribute("style"), A ? p.setAttribute("style", A) : p.removeAttribute("style"), w && (B ? w.setAttribute("style", B) : w.removeAttribute("style")), x && E && E !== "0px" && (x.style.paddingTop = E);
800
800
  };
801
801
  };
802
- let R = () => {
802
+ let W = () => {
803
803
  };
804
804
  function J({ adFormat: S = "", stickyOffset: i = 0, logoPosX: p = 0, logoHeight: c = 0, logoSmallHeight: a = 0, ...q } = {}) {
805
- typeof R == "function" && R();
805
+ typeof W == "function" && W();
806
806
  let n = () => {
807
807
  };
808
- return S === "fireplace" ? n = F(i) : S === "fireplace-collant" ? n = V(i) : S === "logomorph" ? n = X(p, c, a) : S === "interscroller" ? n = G(q) : S === "liquidframe" ? n = K(q) : console.warn("[powered-ad-config] Unknown ad format:", S), R = typeof n == "function" ? n : () => {
809
- }, R;
808
+ return S === "fireplace" ? n = F(i) : S === "fireplace-collant" ? n = V(i) : S === "logomorph" ? n = X(p, c, a) : S === "interscroller" ? n = G(q) : S === "liquidframe" ? n = K(q) : console.warn("[powered-ad-config] Unknown ad format:", S), W = typeof n == "function" ? n : () => {
809
+ }, W;
810
810
  }
811
811
  export {
812
812
  J as default
@@ -22,4 +22,4 @@
22
22
  div:has(#adspot-tablet-takeover-2-above) {
23
23
  position: static;
24
24
  }
25
- `,e.head.appendChild(T)}}},k={siteBackgroundColor:"#ffffff",fireplaceLeftMargin:0,adNodeMarginTop:-32,adNodeMarginBottom:8,responsiveScroll:-124,xPosHalfpage:720,yPosHalfpage:16,stickyMargin:{offset:160,isSticky:!0},maskOffset:window.parent.document.querySelector('div[class*="VideoIndexComponent"]')?324:292,zIndex:function(){const e=window.parent.document;e.querySelector(".header-wrapper")?.setAttribute("style","height:124px"),e.querySelector(".weather-widget-wrapper")?.setAttribute("style","bottom:0px"),e.querySelector(".content")?.setAttribute("style","padding-top:32px"),e.querySelector(".layout")?.setAttribute("style","position:relative;background-color:transparent;"),e.querySelector(".footer-ad")?.setAttribute("style","position:relative"),e.querySelector(".footer-netkit")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);");const l=e.querySelector('[class*="VideoIndexComponent"]');l&&(e.querySelector(".breadcrumbs")?.setAttribute("style","display:none"),l.style.maxWidth="1190px",l.style.margin="auto",l.style.position="relative")}},d=[{site:"https://www.nine.com.au/sport",config:B},{site:"https://www.nine.com.au/product-reviews",config:A},{site:"https://www.nine.com.au/property",config:A},{site:"https://www.nine.com.au/entertainment",config:A},{site:"https://staging.nine.com.au/sport",config:B},{site:"https://staging.nine.com.au/product-reviews",config:A},{site:"https://staging.nine.com.au/property",config:A},{site:"https://staging.nine.com.au/entertainment",config:A},{site:"https://render-web-nine-staging-v1.ffxblue.com.au",config:w},{site:"https://render-web-nine-production-v1.ffxblue.com.au",config:w},{site:"https://preview.nine.com.au/",config:w},{site:"https://www.nine",config:w},{site:"https://staging.nine",config:w},{site:"https://entertainment",config:y},{site:"https://celebrity",config:y},{site:"https://homes",config:y},{site:"https://travel",config:y},{site:"https://honey",config:y},{site:"https://style",config:y},{site:"https://coach",config:y},{site:"https://kitchen",config:y},{site:"https://finance",config:y},{site:"https://wwos",config:x},{site:"https://staging.wwos",config:B},{site:"https://www.9news",config:k},{site:"https://staging.9news",config:k},{site:"https://www.yourtv",config:y},{site:"https://staging.yourtv",config:y},{site:"https://9now",config:A},{site:"https://creative-preview-an.com",config:y}],M=()=>{const e=window.document.getElementById("nineContent");e&&(e.style.backgroundColor=t.siteBackgroundColor),a&&(q.setProperty("--masthead-height","250px"),q.height="var(--masthead-height)"),h(),E(),C(),g(),p.addEventListener("scroll",f,{passive:!0}),r=setTimeout(f,50)},N=()=>{let e=null;return e=c.querySelector('div[id*="billboard"][id*="above"]'),e},C=()=>{let e=null;if(!window.parent)return e;if(e=c.querySelector('div[id*="halfpage"][id*="above"]'),!e)return;let l=e;for(let u=0;u<3;u++)if(l=l.parentNode,l&&getComputedStyle(l).position==="sticky"){l.setAttribute("style",`top: ${t.stickyMargin.offset}px`);break}},I=()=>{const e=p.location.href;for(let l=0;l<d.length;l+=1)if(e.indexOf(d[l].site)>=0)return d[l].config},E=()=>{if(!i)return;const e=i.style;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)"},h=()=>{if(!s)return;const e=s.style;s.className="",e.minHeight="250px",e.marginTop=t.adNodeMarginTop+"px",e.marginBottom=t.adNodeMarginBottom+"px",e.position="static",e.display="block",t.zIndex&&t.zIndex()},g=()=>{n=c.querySelector('div[data-contentunit-id="stan"]')?.parentNode||c.querySelector('div[data-ui-testid="header-score-strip"]')?.parentNode||c.querySelector('div[class*="__MyContainer"]')||c.querySelector('div[class*="__ArticleContainer"]')||c.querySelector('div[class*="__VideoIndexComponent"]')||c.querySelector("div.container.layout")||c.querySelector("main.container.layout"),n&&(n.style.willChange="clip-path",n.style.transition="none",n.style.webkitBackfaceVisibility="hidden",n.style.backfaceVisibility="hidden",n.style.transform="translate3d(0,0,0)",n.style.backgroundColor=t.siteBackgroundColor,n.style.setProperty("--mask-inset","0px"),n.style.clipPath="inset(var(--mask-inset, 0px) 0 0 0)")};let b=0,o=0;const f=()=>{const e=p.scrollY,l=e>b,u=e>v?e-t.maskOffset:0,T=Math.abs(u-o);if(n)if(l&&u>o)if(T>100){const L=Math.max(0,u-100);n.style.transition="none",n.style.setProperty("--mask-inset",`${L}px`),n.offsetHeight,n.style.transition="clip-path 0.3s ease-out",n.style.setProperty("--mask-inset",`${u}px`)}else n.style.transition="clip-path 0.3s ease-out",n.style.setProperty("--mask-inset",`${u}px`);else n.style.transition="none",n.style.setProperty("--mask-inset",`${u}px`);b=e,o=u,e>v?(i.style.setProperty("--transform-y",`${-m}px`),q.setProperty("--masthead-height","100px"),window.CollantOn||window.goCollant()):e>m&&e<=v?(i.style.setProperty("--transform-y",`${-m}px`),q.setProperty("--masthead-height",`${250+m-e}px`),window.CollantOn&&window.goBillboard()):e>=0&&e<=m&&(i.style.setProperty("--transform-y",`${-e}px`),q.setProperty("--masthead-height","250px"),window.CollantOn&&window.goBillboard())},s=N(),t=I();if(!t)return()=>{};let r=null;const m=-t.responsiveScroll+S,v=m+150;return M(),()=>{p.removeEventListener("scroll",f),r&&(clearTimeout(r),r=null)}},X=(S,i,p)=>{const c=window.frameElement?window.frameElement:null;if(!c)return()=>{};const a=window.parent;if(!a||a===window)return()=>{};let q=null;try{q=a.document,a.location.href}catch{return()=>{}}const n={siteBackgroundColor:"#ffffff",logoTop:"44px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"250px",logoSmallTransform:"translateX(0px)",logoSmallFilter:"none",zIndex:function(){const t=window.parent.document,r=(m,v)=>m.forEach(e=>v.forEach(([l,u])=>e.style[l]=u));t.querySelector(".container--padded")?.setAttribute("style","position:relative"),r(t.querySelectorAll(".advert"),[["position","relative"]]),t.querySelector(".footer-netkit")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},y={siteBackgroundColor:"#ffffff",logoTop:"44px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"50%",logoSmallTransform:"translateX(-50%)",logoSmallFilter:"none",zIndex:function(){const t=window.parent.document,r=(m,v)=>m.forEach(e=>v.forEach(([l,u])=>e.style[l]=u));t.querySelector(".nk-demographics")?.setAttribute("style","max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector(".nk-footer")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector("article")?.setAttribute("style","position:relative"),t.querySelector("#article")?.setAttribute("style","position:relative"),t.querySelector("#VideoIndex")?.setAttribute("style","position:relative"),t.querySelector("#Index")?.setAttribute("style","position:relative"),t.querySelector(".show")?.setAttribute("style","position:relative"),r(t.querySelectorAll(".column"),[["position","relative"]]),r(t.querySelectorAll(".advert"),[["position","relative"]]),r(t.querySelectorAll("blockquote"),[["zIndex","1"]]),t.querySelector('div[class*="article__MyContainer"]')?.setAttribute("style","max-width:1190px;margin-top:-24px"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},A={siteBackgroundColor:"#ffffff",logoTop:"44px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"50%",logoSmallTransform:"translateX(-50%)",logoSmallFilter:"none",zIndex:function(){const t=window.parent.document,r=(m,v)=>m.forEach(e=>v.forEach(([l,u])=>e.style[l]=u));t.querySelector(".nk-demographics")?.setAttribute("style","max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector(".nk-footer")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector("article")?.setAttribute("style","position:relative"),t.querySelector("#article")?.setAttribute("style","position:relative"),t.querySelector("#VideoIndex")?.setAttribute("style","position:relative"),t.querySelector("#Index")?.setAttribute("style","position:relative"),t.querySelector(".show")?.setAttribute("style","position:relative"),r(t.querySelectorAll(".column"),[["position","relative"]]),r(t.querySelectorAll(".advert"),[["position","relative"]]),r(t.querySelectorAll("blockquote"),[["zIndex","1"]]),t.querySelector('div[class^="component__StrapContainer"]')?.setAttribute("style","position:relative"),t.querySelector('section[class^="WatchNow__Container"]')?.setAttribute("style","margin-left:calc(50% - 49vw);margin-right:calc(50% - 49vw + 10px);"),t.querySelector('div[class*="ArticleContainer"]')?.setAttribute("style","max-width:1190px;margin-top:0px"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},w={siteBackgroundColor:"#ffffff",logoTop:"44px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"50%",logoSmallTransform:"translateX(-50%)",logoSmallFilter:"none",zIndex:function(){const t=window.parent.document,r=(m,v)=>m.forEach(e=>v.forEach(([l,u])=>e.style[l]=u));t.querySelector('section[data-section="marketing-banner"]')?.setAttribute("style","position:relative"),t.querySelector(".container--ads")?.setAttribute("style","min-height:0"),t.getElementById("mastheadAnchorToggle")?.setAttribute("style","display:none"),r(t.querySelectorAll(".advert"),[["position","relative"]]),r(t.querySelectorAll("iframe"),[["position","relative"]]),t.querySelector('div[data-testid="live-tv"]')?.parentNode?.setAttribute("style","position:relative"),t.querySelector('div[data-contentunit-id="stan"]')?.parentNode?.setAttribute("style","position:relative"),r(t.querySelectorAll("small"),[["position","relative"]]),t.querySelector("small")?.setAttribute("style","position:inherit"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},B={siteBackgroundColor:"#ffffff",logoTop:"-148px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"50%",logoSmallTransform:"translateX(-50%)",logoSmallFilter:"none",zIndex:function(){const t=window.parent.document,r=(m,v)=>m.forEach(e=>v.forEach(([l,u])=>e.style[l]=u));t.querySelector(".container--padded")?.setAttribute("style","position:relative"),r(t.querySelectorAll(".advert"),[["position","relative"]]),t.querySelector(".footer-netkit")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},x={siteBackgroundColor:"#ffffff",logoTop:"44px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"50%",logoSmallTransform:"translateX(-50%)",logoSmallFilter:"invert(1)",zIndex:function(){const t=window.parent.document;t.querySelector(".header-wrapper")?.setAttribute("style","height:124px"),t.querySelector(".weather-widget-wrapper")?.setAttribute("style","bottom:0px"),t.querySelector(".content")?.setAttribute("style","padding-top:32px"),t.querySelector(".layout")?.setAttribute("style","position:relative;background-color:transparent;"),t.querySelector(".footer-ad")?.setAttribute("style","position:relative"),t.querySelector(".footer-netkit")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},k=[{site:"https://www.nine.com.au/sport",config:n},{site:"https://www.nine.com.au/product-reviews",config:A},{site:"https://www.nine.com.au/property",config:A},{site:"https://www.nine.com.au/entertainment",config:A},{site:"https://staging.nine.com.au/sport",config:n},{site:"https://staging.nine.com.au/product-reviews",config:A},{site:"https://staging.nine.com.au/property",config:A},{site:"https://staging.nine.com.au/entertainment",config:A},{site:"https://render-web-nine-staging-v1.ffxblue.com.au",config:w},{site:"https://render-web-nine-production-v1.ffxblue.com.au",config:w},{site:"https://preview.nine.com.au/",config:w},{site:"https://www.nine",config:w},{site:"https://staging.nine",config:w},{site:"https://entertainment",config:y},{site:"https://celebrity",config:y},{site:"https://homes",config:y},{site:"https://travel",config:y},{site:"https://honey",config:y},{site:"https://style",config:y},{site:"https://coach",config:y},{site:"https://kitchen",config:y},{site:"https://finance",config:y},{site:"https://wwos",config:B},{site:"https://staging.wwos",config:B},{site:"https://www.9news",config:x},{site:"https://staging.9news",config:x},{site:"https://www.yourtv",config:y},{site:"https://staging.yourtv",config:y},{site:"https://9now",config:A},{site:"https://creative-preview-an.com",config:y}],d=()=>{const t=window.document.getElementById("logo-small");t&&(t.style.left=b.logoSmallLeft,t.style.transform=b.logoSmallTransform,t.style.filter=b.logoSmallFilter),I(),C(),a.addEventListener("scroll",h),o=setTimeout(h,50)},M=()=>{let t=null;return t=q.querySelector('div[id*="desktop"][id*="takeover"][id*="above"]'),t},N=()=>{const t=a.location.href;for(let r=0;r<k.length;r+=1)if(t.indexOf(k[r].site)>=0)return k[r].config},C=()=>{if(!c)return;const t=c.style;t.width="100%",t.height=`${i}px`,t.position="relative"},I=()=>{if(!g)return;const t=g.style;t.maxHeight=`${i}px`,t.minHeight=`${i}px`,t.marginTop="0px",t.marginBottom="0px",t.position="absolute",t.width="1900px",t.top=b.logoTop,t.left=b.logoLeft,t.transform=b.logoTransform,t.zIndex="10000",t.pointerEvents="none",b.zIndex&&b.zIndex()},E=t=>{if(!g)return;const r=g.style;t==="big"&&!window.bigActive?(r.maxHeight=`${i}px`,r.minHeight=`${i}px`,r.position="absolute",r.top=b.logoTop,r.zIndex="10000",window.loadBig()):t==="small"&&!window.smallActive&&(r.maxHeight=`${p}px`,r.minHeight=`${p}px`,r.position="fixed",r.top="0px",r.zIndex="100000",window.loadSmall())},h=()=>{const t=a.scrollY;c.style,t>=0&&t<=f?E("big"):t>f&&(t>s?E("small"):E("big"),s=t<=0?0:t)},g=M(),b=N();if(!b)return()=>{};let o=null;const f=S;let s=0;return d(),()=>{a.removeEventListener("scroll",h),o&&(clearTimeout(o),o=null)}},Y=((S,i=50)=>`linear(${Array.from({length:i+1},(c,a)=>S(a/i)).map(c=>+c.toFixed(4)).join(", ")})`)(S=>{if(S===0||S===1)return S;const i=2*Math.PI/3;return Math.pow(2,-10*S)*Math.sin((S*10-.75)*i)+1}),U=(S={})=>{const i={adScrollHeight:"300vh",bandHeight:24,bandBg:"#222",bandColor:"#fff",bandFontSize:"10px",bandFontFamily:"Arial, Helvetica, sans-serif",bandLetterSpacing:"1px",labelTop:"Advertisement",labelBottomResume:"Scroll to continue",labelBottomMid:"Keep scrolling",labelBottomLate:"Almost there",labelBottomNow:"Content now ↓",progressBarColor:"rgba(255,255,255,0.35)",zIndexTop:9,zIndexBottom:8,bottomBandShowAt:400,bottomBandHideAt:300,snapPx:50,snapOverlap:2,stretchOverlap:20,snapDuration:.9,snapEase:Y,onEnter:null,onExit:null,onProgress:null,thresholds:[],...S},p=window.frameElement?window.frameElement:null;if(!p)return()=>{};const c=window.parent;if(!c||c===window)return()=>{};let a=null;try{a=c.document,c.location.href}catch{return()=>{}}const n=(()=>{const s=a.querySelector("#adspot-mobile-mobile-3-above");if(s)return s;let t=p.parentElement;for(;t&&t!==a.body;){if(t.id&&t.id.includes("adspot"))return t;t=t.parentElement}return p.parentElement})();if(!n)return()=>{};const y=n.getAttribute("style"),A=p.getAttribute("style"),w={width:"100vw",marginLeft:"calc(50% - 50vw)",height:i.bandHeight+"px",backgroundColor:i.bandBg,color:i.bandColor,fontSize:i.bandFontSize,fontFamily:i.bandFontFamily,textTransform:"uppercase",letterSpacing:i.bandLetterSpacing,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"};(()=>{const s=n.style;s.height=i.adScrollHeight,s.position="relative",n.setAttribute("poweredAC","0.0.96"),s.clipPath=`inset(-${i.bandHeight-1}px 0 0 0)`,s.overflow="visible",s.width="100vw",s.maxWidth="100vw",s.marginLeft="calc(50% - 50vw)",s.marginRight="0",s.marginTop="0",s.marginBottom="0",s.padding="0";const t=p.style;t.position="fixed",t.top="0",t.left="0",t.width="100vw",t.height="100vh",t.maxWidth="100vw",t.margin="0",t.padding="0",t.border="none",t.zIndex="1";const r=a.createElement("div");r.id="interscroller-top-band-wrapper",Object.assign(r.style,{position:"sticky",bottom:"0",width:"100vw",marginLeft:"calc(50% - 50vw)",zIndex:i.zIndexTop,pointerEvents:"none"});const m=a.createElement("div");m.id="interscroller-top-band",m.textContent=i.labelTop,Object.assign(m.style,w,{position:"relative",width:"100%",marginLeft:"0",transformOrigin:"top center"}),r.appendChild(m),n.insertAdjacentElement("beforebegin",r);const v=a.createElement("div");v.id="interscroller-bottom-band",Object.assign(v.style,w,{position:"fixed",bottom:"0",left:"0",zIndex:i.zIndexBottom,display:"flex",overflow:"hidden",transform:"translateY(100%)",transition:"none"});const e=a.createElement("span");if(e.id="interscroller-bottom-label",e.textContent=i.labelBottomResume,e.style.cssText="position:relative;z-index:1;pointer-events:none;",v.appendChild(e),i.progressBarColor){const l=a.createElement("span");l.id="interscroller-bottom-progress",l.style.cssText=["position:absolute","inset:0","width:0%",`background:${i.progressBarColor}`,"transition:none","z-index:0","pointer-events:none"].join(";"),v.appendChild(l)}n.after(v)})();const x=a.querySelector("#interscroller-top-band"),k=a.querySelector("#interscroller-top-band-wrapper"),d=a.querySelector("#interscroller-bottom-band"),M=a.querySelector("#interscroller-bottom-label"),N=a.querySelector("#interscroller-bottom-progress"),C=i.bandHeight,I=i.snapPx;let E=!1,h=!1,g=!1,b=!1;const o=(i.thresholds||[]).map(()=>!1),f=()=>{if(!d)return;const s=n.getBoundingClientRect(),t=c.innerHeight,r=s.top<=t,m=s.bottom<=t-C,v=b?s.top<=t-i.bottomBandHideAt:s.top<=t-i.bottomBandShowAt,e=n.offsetHeight,l=Math.min(1,Math.max(0,(t-s.top)/(e+t))),u=Math.min(1,Math.max(0,(t-s.top)/(e+C))),T=Math.min(1,Math.max(0,(t-s.top)/e)),L=Math.min(s.bottom,t)-Math.max(s.top-C,0),D=Math.min(1,Math.max(0,L/t)),H=Math.max(0,Math.round(s.bottom-t));!h&&r&&i.onEnter&&i.onEnter(),!g&&m&&i.onExit&&i.onExit(),h=r,g=m,b=v,i.onProgress&&i.onProgress({scrollProgress:l,adExposure:T,viewportCoverage:D,pxRemaining:H}),(i.thresholds||[]).forEach((P,_)=>{const F=o[_],V=l>=P.at;!F&&V?(o[_]=!0,P.onEnter&&P.onEnter(l)):F&&!V&&(o[_]=!1,P.onLeave&&P.onLeave(l))});const R=t;if(x&&s.top<=R+i.stretchOverlap&&!m){const P=R-s.top;if(!E&&P<=I-i.snapOverlap){const _=1+Math.max(0,P+i.stretchOverlap)/C;x.style.transition="none",x.style.transform=`scaleY(${_})`}else!E&&P>I-i.snapOverlap&&(E=!0,x.style.transition=`transform ${i.snapDuration}s ${i.snapEase}`,x.style.transform="scaleY(1)")}else x&&s.top>R+i.stretchOverlap&&(E=!1,x.style.transition="none",x.style.transform="scaleY(1)");const $=c.visualViewport?Math.round(c.innerHeight-(c.visualViewport.offsetTop+c.visualViewport.height)):0;m?(d.style.transition="none",d.style.transform="none",d.style.position="sticky",d.style.top="0",d.style.bottom="",d.style.left="",d.style.marginLeft="calc(50% - 50vw)",d.style.width="100vw",M&&(M.textContent=i.labelBottomNow),N&&(N.style.width="100%")):v?(M&&(M.textContent=H>0?u<.2?i.labelBottomResume:u<.75?i.labelBottomMid:i.labelBottomLate:i.labelBottomNow),N&&(N.style.width=`${Math.round(u*100)}%`),d.style.transition="transform 0.3s ease",d.style.transform="translateY(0)",d.style.position="fixed",d.style.bottom=`${$}px`,d.style.top="",d.style.left="0",d.style.marginLeft="0",d.style.width="100vw"):(d.style.transition="transform 0.3s ease",d.style.transform="translateY(100%)",d.style.position="fixed",d.style.bottom=`${$}px`,d.style.left="0",d.style.marginLeft="0",d.style.width="100vw")};return f(),c.addEventListener("scroll",f,{passive:!0}),c.visualViewport?.addEventListener("resize",f,{passive:!0}),()=>{c.removeEventListener("scroll",f),c.visualViewport?.removeEventListener("resize",f),k?k.remove():x&&x.remove(),d&&d.remove(),y?n.setAttribute("style",y):n.removeAttribute("style"),A?p.setAttribute("style",A):p.removeAttribute("style")}},j=(S={})=>{const i={adaptToWidth:"100%",maxWidth:"400px",maintainAspectRatio:!0,adaptToHeight:!1,zIndex:10,adaptThreshold:.5,onAdapt:null,...S},p=window.frameElement??null;if(!p)return()=>{};const c=window.parent;if(!c||c===window)return()=>{};let a=null;try{a=c.document,c.location.href}catch{return()=>{}}const n=(()=>{const h=a.querySelector("#adspot-mobile-mbanner-2-above");if(h)return h;let g=p.parentElement;for(;g&&g!==a.body;){if(g.id&&g.id.includes("adspot"))return g;g=g.parentElement}return p.parentElement})();if(!n)return()=>{};const y=n.getAttribute("style"),A=p.getAttribute("style"),w=p.parentElement!==n?p.parentElement:null,B=w?w.getAttribute("style"):null,x=n.parentElement,k=x?c.getComputedStyle(x).paddingTop:null;let d=null;const M=parseInt(p.getAttribute("width"),10)||320,N=parseInt(p.getAttribute("height"),10)||50,C=()=>{const h=n.style;if(h.position="relative",h.overflow="visible",h.boxSizing="border-box",n.setAttribute("poweredAC","0.0.96"),w){const b=w.style;b.width="100%",b.height="100%",b.margin="0",b.textAlign="left"}const g=p.style;g.display="block",g.width="100%",g.height="100%",g.border="none",g.margin="0",g.padding="0"},I=()=>{const h=n.style;h.zIndex=String(i.zIndex),i.adaptToWidth&&(h.width=i.adaptToWidth,h.maxWidth=i.maxWidth||i.adaptToWidth,(i.adaptToWidth==="100vw"||i.adaptToWidth.endsWith("vw"))&&(h.marginLeft="calc(50% - 50vw)",h.marginRight="0")),x&&k&&k!=="0px"&&(x.style.paddingTop="0"),i.maintainAspectRatio?c.requestAnimationFrame(()=>{const b=n.offsetWidth||M,f=Math.round(b*(N/M));n.style.height=f+"px",w&&(w.style.height=f+"px"),p.style.height=f+"px",i.onAdapt&&i.onAdapt()}):(i.adaptToHeight&&(h.height=i.adaptToHeight),i.onAdapt&&i.onAdapt())};return C(),d=new c.IntersectionObserver(h=>{h.forEach(g=>{g.isIntersecting&&(I(),d.disconnect(),d=null)})},{root:null,threshold:i.adaptThreshold}),d.observe(n),()=>{d&&(d.disconnect(),d=null),y?n.setAttribute("style",y):n.removeAttribute("style"),A?p.setAttribute("style",A):p.removeAttribute("style"),w&&(B?w.setAttribute("style",B):w.removeAttribute("style")),x&&k&&k!=="0px"&&(x.style.paddingTop=k)}};let W=()=>{};function G({adFormat:S="",stickyOffset:i=0,logoPosX:p=0,logoHeight:c=0,logoSmallHeight:a=0,...q}={}){typeof W=="function"&&W();let n=()=>{};return S==="fireplace"?n=z(i):S==="fireplace-collant"?n=O(i):S==="logomorph"?n=X(p,c,a):S==="interscroller"?n=U(q):S==="liquidframe"?n=j(q):console.warn("[powered-ad-config] Unknown ad format:",S),W=typeof n=="function"?n:()=>{},W}return G}));
25
+ `,e.head.appendChild(T)}}},k={siteBackgroundColor:"#ffffff",fireplaceLeftMargin:0,adNodeMarginTop:-32,adNodeMarginBottom:8,responsiveScroll:-124,xPosHalfpage:720,yPosHalfpage:16,stickyMargin:{offset:160,isSticky:!0},maskOffset:window.parent.document.querySelector('div[class*="VideoIndexComponent"]')?324:292,zIndex:function(){const e=window.parent.document;e.querySelector(".header-wrapper")?.setAttribute("style","height:124px"),e.querySelector(".weather-widget-wrapper")?.setAttribute("style","bottom:0px"),e.querySelector(".content")?.setAttribute("style","padding-top:32px"),e.querySelector(".layout")?.setAttribute("style","position:relative;background-color:transparent;"),e.querySelector(".footer-ad")?.setAttribute("style","position:relative"),e.querySelector(".footer-netkit")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);");const l=e.querySelector('[class*="VideoIndexComponent"]');l&&(e.querySelector(".breadcrumbs")?.setAttribute("style","display:none"),l.style.maxWidth="1190px",l.style.margin="auto",l.style.position="relative")}},d=[{site:"https://www.nine.com.au/sport",config:B},{site:"https://www.nine.com.au/product-reviews",config:A},{site:"https://www.nine.com.au/property",config:A},{site:"https://www.nine.com.au/entertainment",config:A},{site:"https://staging.nine.com.au/sport",config:B},{site:"https://staging.nine.com.au/product-reviews",config:A},{site:"https://staging.nine.com.au/property",config:A},{site:"https://staging.nine.com.au/entertainment",config:A},{site:"https://render-web-nine-staging-v1.ffxblue.com.au",config:w},{site:"https://render-web-nine-production-v1.ffxblue.com.au",config:w},{site:"https://preview.nine.com.au/",config:w},{site:"https://www.nine",config:w},{site:"https://staging.nine",config:w},{site:"https://entertainment",config:y},{site:"https://celebrity",config:y},{site:"https://homes",config:y},{site:"https://travel",config:y},{site:"https://honey",config:y},{site:"https://style",config:y},{site:"https://coach",config:y},{site:"https://kitchen",config:y},{site:"https://finance",config:y},{site:"https://wwos",config:x},{site:"https://staging.wwos",config:B},{site:"https://www.9news",config:k},{site:"https://staging.9news",config:k},{site:"https://www.yourtv",config:y},{site:"https://staging.yourtv",config:y},{site:"https://9now",config:A},{site:"https://creative-preview-an.com",config:y}],M=()=>{const e=window.document.getElementById("nineContent");e&&(e.style.backgroundColor=t.siteBackgroundColor),a&&(q.setProperty("--masthead-height","250px"),q.height="var(--masthead-height)"),h(),E(),C(),g(),p.addEventListener("scroll",f,{passive:!0}),r=setTimeout(f,50)},N=()=>{let e=null;return e=c.querySelector('div[id*="billboard"][id*="above"]'),e},C=()=>{let e=null;if(!window.parent)return e;if(e=c.querySelector('div[id*="halfpage"][id*="above"]'),!e)return;let l=e;for(let u=0;u<3;u++)if(l=l.parentNode,l&&getComputedStyle(l).position==="sticky"){l.setAttribute("style",`top: ${t.stickyMargin.offset}px`);break}},I=()=>{const e=p.location.href;for(let l=0;l<d.length;l+=1)if(e.indexOf(d[l].site)>=0)return d[l].config},E=()=>{if(!i)return;const e=i.style;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)"},h=()=>{if(!s)return;const e=s.style;s.className="",e.minHeight="250px",e.marginTop=t.adNodeMarginTop+"px",e.marginBottom=t.adNodeMarginBottom+"px",e.position="static",e.display="block",t.zIndex&&t.zIndex()},g=()=>{n=c.querySelector('div[data-contentunit-id="stan"]')?.parentNode||c.querySelector('div[data-ui-testid="header-score-strip"]')?.parentNode||c.querySelector('div[class*="__MyContainer"]')||c.querySelector('div[class*="__ArticleContainer"]')||c.querySelector('div[class*="__VideoIndexComponent"]')||c.querySelector("div.container.layout")||c.querySelector("main.container.layout"),n&&(n.style.willChange="clip-path",n.style.transition="none",n.style.webkitBackfaceVisibility="hidden",n.style.backfaceVisibility="hidden",n.style.transform="translate3d(0,0,0)",n.style.backgroundColor=t.siteBackgroundColor,n.style.setProperty("--mask-inset","0px"),n.style.clipPath="inset(var(--mask-inset, 0px) 0 0 0)")};let b=0,o=0;const f=()=>{const e=p.scrollY,l=e>b,u=e>v?e-t.maskOffset:0,T=Math.abs(u-o);if(n)if(l&&u>o)if(T>100){const L=Math.max(0,u-100);n.style.transition="none",n.style.setProperty("--mask-inset",`${L}px`),n.offsetHeight,n.style.transition="clip-path 0.3s ease-out",n.style.setProperty("--mask-inset",`${u}px`)}else n.style.transition="clip-path 0.3s ease-out",n.style.setProperty("--mask-inset",`${u}px`);else n.style.transition="none",n.style.setProperty("--mask-inset",`${u}px`);b=e,o=u,e>v?(i.style.setProperty("--transform-y",`${-m}px`),q.setProperty("--masthead-height","100px"),window.CollantOn||window.goCollant()):e>m&&e<=v?(i.style.setProperty("--transform-y",`${-m}px`),q.setProperty("--masthead-height",`${250+m-e}px`),window.CollantOn&&window.goBillboard()):e>=0&&e<=m&&(i.style.setProperty("--transform-y",`${-e}px`),q.setProperty("--masthead-height","250px"),window.CollantOn&&window.goBillboard())},s=N(),t=I();if(!t)return()=>{};let r=null;const m=-t.responsiveScroll+S,v=m+150;return M(),()=>{p.removeEventListener("scroll",f),r&&(clearTimeout(r),r=null)}},X=(S,i,p)=>{const c=window.frameElement?window.frameElement:null;if(!c)return()=>{};const a=window.parent;if(!a||a===window)return()=>{};let q=null;try{q=a.document,a.location.href}catch{return()=>{}}const n={siteBackgroundColor:"#ffffff",logoTop:"44px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"250px",logoSmallTransform:"translateX(0px)",logoSmallFilter:"none",zIndex:function(){const t=window.parent.document,r=(m,v)=>m.forEach(e=>v.forEach(([l,u])=>e.style[l]=u));t.querySelector(".container--padded")?.setAttribute("style","position:relative"),r(t.querySelectorAll(".advert"),[["position","relative"]]),t.querySelector(".footer-netkit")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},y={siteBackgroundColor:"#ffffff",logoTop:"44px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"50%",logoSmallTransform:"translateX(-50%)",logoSmallFilter:"none",zIndex:function(){const t=window.parent.document,r=(m,v)=>m.forEach(e=>v.forEach(([l,u])=>e.style[l]=u));t.querySelector(".nk-demographics")?.setAttribute("style","max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector(".nk-footer")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector("article")?.setAttribute("style","position:relative"),t.querySelector("#article")?.setAttribute("style","position:relative"),t.querySelector("#VideoIndex")?.setAttribute("style","position:relative"),t.querySelector("#Index")?.setAttribute("style","position:relative"),t.querySelector(".show")?.setAttribute("style","position:relative"),r(t.querySelectorAll(".column"),[["position","relative"]]),r(t.querySelectorAll(".advert"),[["position","relative"]]),r(t.querySelectorAll("blockquote"),[["zIndex","1"]]),t.querySelector('div[class*="article__MyContainer"]')?.setAttribute("style","max-width:1190px;margin-top:-24px"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},A={siteBackgroundColor:"#ffffff",logoTop:"44px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"50%",logoSmallTransform:"translateX(-50%)",logoSmallFilter:"none",zIndex:function(){const t=window.parent.document,r=(m,v)=>m.forEach(e=>v.forEach(([l,u])=>e.style[l]=u));t.querySelector(".nk-demographics")?.setAttribute("style","max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector(".nk-footer")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector("article")?.setAttribute("style","position:relative"),t.querySelector("#article")?.setAttribute("style","position:relative"),t.querySelector("#VideoIndex")?.setAttribute("style","position:relative"),t.querySelector("#Index")?.setAttribute("style","position:relative"),t.querySelector(".show")?.setAttribute("style","position:relative"),r(t.querySelectorAll(".column"),[["position","relative"]]),r(t.querySelectorAll(".advert"),[["position","relative"]]),r(t.querySelectorAll("blockquote"),[["zIndex","1"]]),t.querySelector('div[class^="component__StrapContainer"]')?.setAttribute("style","position:relative"),t.querySelector('section[class^="WatchNow__Container"]')?.setAttribute("style","margin-left:calc(50% - 49vw);margin-right:calc(50% - 49vw + 10px);"),t.querySelector('div[class*="ArticleContainer"]')?.setAttribute("style","max-width:1190px;margin-top:0px"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},w={siteBackgroundColor:"#ffffff",logoTop:"44px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"50%",logoSmallTransform:"translateX(-50%)",logoSmallFilter:"none",zIndex:function(){const t=window.parent.document,r=(m,v)=>m.forEach(e=>v.forEach(([l,u])=>e.style[l]=u));t.querySelector('section[data-section="marketing-banner"]')?.setAttribute("style","position:relative"),t.querySelector(".container--ads")?.setAttribute("style","min-height:0"),t.getElementById("mastheadAnchorToggle")?.setAttribute("style","display:none"),r(t.querySelectorAll(".advert"),[["position","relative"]]),r(t.querySelectorAll("iframe"),[["position","relative"]]),t.querySelector('div[data-testid="live-tv"]')?.parentNode?.setAttribute("style","position:relative"),t.querySelector('div[data-contentunit-id="stan"]')?.parentNode?.setAttribute("style","position:relative"),r(t.querySelectorAll("small"),[["position","relative"]]),t.querySelector("small")?.setAttribute("style","position:inherit"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},B={siteBackgroundColor:"#ffffff",logoTop:"-148px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"50%",logoSmallTransform:"translateX(-50%)",logoSmallFilter:"none",zIndex:function(){const t=window.parent.document,r=(m,v)=>m.forEach(e=>v.forEach(([l,u])=>e.style[l]=u));t.querySelector(".container--padded")?.setAttribute("style","position:relative"),r(t.querySelectorAll(".advert"),[["position","relative"]]),t.querySelector(".footer-netkit")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},x={siteBackgroundColor:"#ffffff",logoTop:"44px",logoLeft:"50%",logoTransform:"translateX(-50%)",logoSmallLeft:"50%",logoSmallTransform:"translateX(-50%)",logoSmallFilter:"invert(1)",zIndex:function(){const t=window.parent.document;t.querySelector(".header-wrapper")?.setAttribute("style","height:124px"),t.querySelector(".weather-widget-wrapper")?.setAttribute("style","bottom:0px"),t.querySelector(".content")?.setAttribute("style","padding-top:32px"),t.querySelector(".layout")?.setAttribute("style","position:relative;background-color:transparent;"),t.querySelector(".footer-ad")?.setAttribute("style","position:relative"),t.querySelector(".footer-netkit")?.setAttribute("style","position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"),t.querySelector('div[type="BANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[type="MBANNER"]')?.setAttribute("style","display:none"),t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style","display:none")}},k=[{site:"https://www.nine.com.au/sport",config:n},{site:"https://www.nine.com.au/product-reviews",config:A},{site:"https://www.nine.com.au/property",config:A},{site:"https://www.nine.com.au/entertainment",config:A},{site:"https://staging.nine.com.au/sport",config:n},{site:"https://staging.nine.com.au/product-reviews",config:A},{site:"https://staging.nine.com.au/property",config:A},{site:"https://staging.nine.com.au/entertainment",config:A},{site:"https://render-web-nine-staging-v1.ffxblue.com.au",config:w},{site:"https://render-web-nine-production-v1.ffxblue.com.au",config:w},{site:"https://preview.nine.com.au/",config:w},{site:"https://www.nine",config:w},{site:"https://staging.nine",config:w},{site:"https://entertainment",config:y},{site:"https://celebrity",config:y},{site:"https://homes",config:y},{site:"https://travel",config:y},{site:"https://honey",config:y},{site:"https://style",config:y},{site:"https://coach",config:y},{site:"https://kitchen",config:y},{site:"https://finance",config:y},{site:"https://wwos",config:B},{site:"https://staging.wwos",config:B},{site:"https://www.9news",config:x},{site:"https://staging.9news",config:x},{site:"https://www.yourtv",config:y},{site:"https://staging.yourtv",config:y},{site:"https://9now",config:A},{site:"https://creative-preview-an.com",config:y}],d=()=>{const t=window.document.getElementById("logo-small");t&&(t.style.left=b.logoSmallLeft,t.style.transform=b.logoSmallTransform,t.style.filter=b.logoSmallFilter),I(),C(),a.addEventListener("scroll",h),o=setTimeout(h,50)},M=()=>{let t=null;return t=q.querySelector('div[id*="desktop"][id*="takeover"][id*="above"]'),t},N=()=>{const t=a.location.href;for(let r=0;r<k.length;r+=1)if(t.indexOf(k[r].site)>=0)return k[r].config},C=()=>{if(!c)return;const t=c.style;t.width="100%",t.height=`${i}px`,t.position="relative"},I=()=>{if(!g)return;const t=g.style;t.maxHeight=`${i}px`,t.minHeight=`${i}px`,t.marginTop="0px",t.marginBottom="0px",t.position="absolute",t.width="1900px",t.top=b.logoTop,t.left=b.logoLeft,t.transform=b.logoTransform,t.zIndex="10000",t.pointerEvents="none",b.zIndex&&b.zIndex()},E=t=>{if(!g)return;const r=g.style;t==="big"&&!window.bigActive?(r.maxHeight=`${i}px`,r.minHeight=`${i}px`,r.position="absolute",r.top=b.logoTop,r.zIndex="10000",window.loadBig()):t==="small"&&!window.smallActive&&(r.maxHeight=`${p}px`,r.minHeight=`${p}px`,r.position="fixed",r.top="0px",r.zIndex="100000",window.loadSmall())},h=()=>{const t=a.scrollY;c.style,t>=0&&t<=f?E("big"):t>f&&(t>s?E("small"):E("big"),s=t<=0?0:t)},g=M(),b=N();if(!b)return()=>{};let o=null;const f=S;let s=0;return d(),()=>{a.removeEventListener("scroll",h),o&&(clearTimeout(o),o=null)}},Y=((S,i=50)=>`linear(${Array.from({length:i+1},(c,a)=>S(a/i)).map(c=>+c.toFixed(4)).join(", ")})`)(S=>{if(S===0||S===1)return S;const i=2*Math.PI/3;return Math.pow(2,-10*S)*Math.sin((S*10-.75)*i)+1}),U=(S={})=>{const i={adScrollHeight:"300vh",bandHeight:24,bandBg:"#222",bandColor:"#fff",bandFontSize:"10px",bandFontFamily:"Arial, Helvetica, sans-serif",bandLetterSpacing:"1px",labelTop:"Advertisement",labelBottomResume:"Scroll to continue",labelBottomMid:"Keep scrolling",labelBottomLate:"Almost there",labelBottomNow:"Content now ↓",progressBarColor:"rgba(255,255,255,0.35)",zIndexTop:9,zIndexBottom:8,bottomBandShowAt:400,bottomBandHideAt:300,snapPx:50,snapOverlap:2,stretchOverlap:20,snapDuration:.9,snapEase:Y,onEnter:null,onExit:null,onProgress:null,thresholds:[],...S},p=window.frameElement?window.frameElement:null;if(!p)return()=>{};const c=window.parent;if(!c||c===window)return()=>{};let a=null;try{a=c.document,c.location.href}catch{return()=>{}}const n=(()=>{const s=a.querySelector("#adspot-mobile-mobile-3-above");if(s)return s;let t=p.parentElement;for(;t&&t!==a.body;){if(t.id&&t.id.includes("adspot"))return t;t=t.parentElement}return p.parentElement})();if(!n)return()=>{};const y=n.getAttribute("style"),A=p.getAttribute("style"),w={width:"100vw",marginLeft:"calc(50% - 50vw)",height:i.bandHeight+"px",backgroundColor:i.bandBg,color:i.bandColor,fontSize:i.bandFontSize,fontFamily:i.bandFontFamily,textTransform:"uppercase",letterSpacing:i.bandLetterSpacing,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"};(()=>{const s=n.style;s.height=i.adScrollHeight,s.position="relative",n.setAttribute("poweredAC","0.0.96"),s.clipPath=`inset(-${i.bandHeight-1}px 0 0 0)`,s.overflow="visible",s.width="100vw",s.maxWidth="100vw",s.marginLeft="calc(50% - 50vw)",s.marginRight="0",s.marginTop="0",s.marginBottom="0",s.padding="0";const t=p.style;t.position="fixed",t.top="0",t.left="0",t.width="100vw",t.height="100vh",t.maxWidth="100vw",t.margin="0",t.padding="0",t.border="none",t.zIndex="1";const r=a.createElement("div");r.id="interscroller-top-band-wrapper",Object.assign(r.style,{position:"sticky",bottom:"0",width:"100vw",marginLeft:"calc(50% - 50vw)",zIndex:i.zIndexTop,pointerEvents:"none"});const m=a.createElement("div");m.id="interscroller-top-band",m.textContent=i.labelTop,Object.assign(m.style,w,{position:"relative",width:"100%",marginLeft:"0",transformOrigin:"top center"}),r.appendChild(m),n.insertAdjacentElement("beforebegin",r);const v=a.createElement("div");v.id="interscroller-bottom-band",Object.assign(v.style,w,{position:"fixed",bottom:"0",left:"0",zIndex:i.zIndexBottom,display:"flex",overflow:"hidden",transform:"translateY(100%)",transition:"none"});const e=a.createElement("span");if(e.id="interscroller-bottom-label",e.textContent=i.labelBottomResume,e.style.cssText="position:relative;z-index:1;pointer-events:none;",v.appendChild(e),i.progressBarColor){const l=a.createElement("span");l.id="interscroller-bottom-progress",l.style.cssText=["position:absolute","inset:0","width:0%",`background:${i.progressBarColor}`,"transition:none","z-index:0","pointer-events:none"].join(";"),v.appendChild(l)}n.after(v)})();const x=a.querySelector("#interscroller-top-band"),k=a.querySelector("#interscroller-top-band-wrapper"),d=a.querySelector("#interscroller-bottom-band"),M=a.querySelector("#interscroller-bottom-label"),N=a.querySelector("#interscroller-bottom-progress"),C=i.bandHeight,I=i.snapPx;let E=!1,h=!1,g=!1,b=!1;const o=(i.thresholds||[]).map(()=>!1),f=()=>{if(!d)return;const s=n.getBoundingClientRect(),t=c.innerHeight,r=s.top<=t,m=s.bottom<=t-C,v=b?s.top<=t-i.bottomBandHideAt:s.top<=t-i.bottomBandShowAt,e=n.offsetHeight,l=Math.min(1,Math.max(0,(t-s.top)/(e+t))),u=Math.min(1,Math.max(0,(t-s.top)/(e+C))),T=Math.min(1,Math.max(0,(t-s.top)/e)),L=Math.min(s.bottom,t)-Math.max(s.top-C,0),D=Math.min(1,Math.max(0,L/t)),H=Math.max(0,Math.round(s.bottom-t));!h&&r&&i.onEnter&&i.onEnter(),!g&&m&&i.onExit&&i.onExit(),h=r,g=m,b=v,i.onProgress&&i.onProgress({scrollProgress:l,adExposure:T,viewportCoverage:D,pxRemaining:H}),(i.thresholds||[]).forEach((P,W)=>{const F=o[W],V=l>=P.at;!F&&V?(o[W]=!0,P.onEnter&&P.onEnter(l)):F&&!V&&(o[W]=!1,P.onLeave&&P.onLeave(l))});const R=t;if(x&&s.top<=R+i.stretchOverlap&&!m){const P=R-s.top;if(!E&&P<=I-i.snapOverlap){const W=1+Math.max(0,P+i.stretchOverlap)/C;x.style.transition="none",x.style.transform=`scaleY(${W})`}else!E&&P>I-i.snapOverlap&&(E=!0,x.style.transition=`transform ${i.snapDuration}s ${i.snapEase}`,x.style.transform="scaleY(1)")}else x&&s.top>R+i.stretchOverlap&&(E=!1,x.style.transition="none",x.style.transform="scaleY(1)");const $=c.visualViewport?Math.round(c.innerHeight-(c.visualViewport.offsetTop+c.visualViewport.height)):0;m?(d.style.transition="none",d.style.transform="none",d.style.position="sticky",d.style.top="0",d.style.bottom="",d.style.left="",d.style.marginLeft="calc(50% - 50vw)",d.style.width="100vw",M&&(M.textContent=i.labelBottomNow),N&&(N.style.width="100%")):v?(M&&(M.textContent=H>0?u<.2?i.labelBottomResume:u<.75?i.labelBottomMid:i.labelBottomLate:i.labelBottomNow),N&&(N.style.width=`${Math.round(u*100)}%`),d.style.transition="transform 0.3s ease",d.style.transform="translateY(0)",d.style.position="fixed",d.style.bottom=`${$}px`,d.style.top="",d.style.left="0",d.style.marginLeft="0",d.style.width="100vw"):(d.style.transition="transform 0.3s ease",d.style.transform="translateY(100%)",d.style.position="fixed",d.style.bottom=`${$}px`,d.style.left="0",d.style.marginLeft="0",d.style.width="100vw")};return f(),c.addEventListener("scroll",f,{passive:!0}),c.visualViewport?.addEventListener("resize",f,{passive:!0}),()=>{c.removeEventListener("scroll",f),c.visualViewport?.removeEventListener("resize",f),k?k.remove():x&&x.remove(),d&&d.remove(),y?n.setAttribute("style",y):n.removeAttribute("style"),A?p.setAttribute("style",A):p.removeAttribute("style")}},j=(S={})=>{const i={adaptToWidth:"100%",maxWidth:"400px",maintainAspectRatio:!0,adaptToHeight:!1,zIndex:10,adaptThreshold:.5,onAdapt:null,...S},p=window.frameElement??null;if(!p)return()=>{};const c=window.parent;if(!c||c===window)return()=>{};let a=null;try{a=c.document,c.location.href}catch{return()=>{}}const n=(()=>{const h=a.querySelector("#adspot-mobile-mbanner-2-above");if(h)return h;let g=p.parentElement;for(;g&&g!==a.body;){if(g.id&&g.id.includes("adspot"))return g;g=g.parentElement}return p.parentElement})();if(!n)return()=>{};const y=n.getAttribute("style"),A=p.getAttribute("style"),w=p.parentElement!==n?p.parentElement:null,B=w?w.getAttribute("style"):null,x=n.parentElement,k=x?c.getComputedStyle(x).paddingTop:null;let d=null;const M=parseInt(p.getAttribute("width"),10)||320,N=parseInt(p.getAttribute("height"),10)||50,C=()=>{const h=n.style;if(h.position="relative",h.overflow="visible",h.boxSizing="border-box",n.setAttribute("poweredAC","0.0.96"),w){const b=w.style;b.width="100%",b.height="100%",b.margin="0",b.textAlign="left"}const g=p.style;g.display="block",g.width="100%",g.height="100%",g.border="none",g.margin="0",g.padding="0"},I=()=>{const h=n.style;h.zIndex=String(i.zIndex),i.adaptToWidth&&(h.width=i.adaptToWidth,h.maxWidth=i.maxWidth||i.adaptToWidth,i.maxWidth&&i.adaptToWidth!=="100vw"&&!i.adaptToWidth.endsWith("vw")?(h.marginLeft="auto",h.marginRight="auto"):(i.adaptToWidth==="100vw"||i.adaptToWidth.endsWith("vw"))&&(h.marginLeft="calc(50% - 50vw)",h.marginRight="0")),x&&k&&k!=="0px"&&(x.style.paddingTop="0"),i.maintainAspectRatio?c.requestAnimationFrame(()=>{const b=n.offsetWidth||M,f=Math.round(b*(N/M));n.style.height=f+"px",w&&(w.style.height=f+"px"),p.style.height=f+"px",i.onAdapt&&i.onAdapt()}):(i.adaptToHeight&&(h.height=i.adaptToHeight),i.onAdapt&&i.onAdapt())};return C(),d=new c.IntersectionObserver(h=>{h.forEach(g=>{g.isIntersecting&&(I(),d.disconnect(),d=null)})},{root:null,threshold:i.adaptThreshold}),d.observe(n),()=>{d&&(d.disconnect(),d=null),y?n.setAttribute("style",y):n.removeAttribute("style"),A?p.setAttribute("style",A):p.removeAttribute("style"),w&&(B?w.setAttribute("style",B):w.removeAttribute("style")),x&&k&&k!=="0px"&&(x.style.paddingTop=k)}};let _=()=>{};function G({adFormat:S="",stickyOffset:i=0,logoPosX:p=0,logoHeight:c=0,logoSmallHeight:a=0,...q}={}){typeof _=="function"&&_();let n=()=>{};return S==="fireplace"?n=z(i):S==="fireplace-collant"?n=O(i):S==="logomorph"?n=X(p,c,a):S==="interscroller"?n=U(q):S==="liquidframe"?n=j(q):console.warn("[powered-ad-config] Unknown ad format:",S),_=typeof n=="function"?n:()=>{},_}return G}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "powered-ad-config",
3
- "version": "0.0.96",
3
+ "version": "0.0.97",
4
4
  "description": "Configure Ads to load smoothly and at the right position on All Nine's websites",
5
5
  "main": "dist/powered-ad-config.umd.js",
6
6
  "module": "dist/powered-ad-config.es.js",