/*! For license information please see adkit.js.LICENSE.txt */
(()=>{var e={172:e=>{e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},373:e=>{e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},546:e=>{function t(n,r,o,i){var a=Object.defineProperty;try{a({},"",{})}catch(n){a=0}e.exports=t=function(e,n,r,o){function i(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?a?a(e,n,{value:r,enumerable:!o,configurable:!o,writable:!o}):e[n]=r:(i("next",0),i("throw",1),i("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,o,i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},579:(e,t,n)=>{var r=n(738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(r(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},633:(e,t,n)=>{var r=n(172),o=n(993),i=n(869),a=n(887),s=n(791),c=n(373),u=n(579);function l(){"use strict";var t=o(),n=t.m(l),d=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function p(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))}var f={throw:1,return:2,break:3,continue:3};function g(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,f[e],t)},delegateYield:function(e,o,i){return t.resultName=o,n(r.d,u(e),i)},finish:function(e){return n(r.f,e)}},n=function(e,n,o){r.p=t.prev,r.n=t.next;try{return e(n,o)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=l=function(){return{wrap:function(e,n,r,o){return t.w(g(e),n,r,o&&o.reverse())},isGeneratorFunction:p,mark:t.m,awrap:function(e,t){return new r(e,t)},AsyncIterator:s,async:function(e,t,n,r,o){return(p(t)?a:i)(g(e),t,n,r,o)},keys:c,values:u}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports},738:e=>{function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},756:(e,t,n)=>{var r=n(633)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},791:(e,t,n)=>{var r=n(172),o=n(546);e.exports=function e(t,n){function i(e,o,a,s){try{var c=t[e](o),u=c.value;return u instanceof r?n.resolve(u.v).then(function(e){i("next",e,a,s)},function(e){i("throw",e,a,s)}):n.resolve(u).then(function(e){c.value=e,a(c)},function(e){return i("throw",e,a,s)})}catch(e){s(e)}}var a;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(e,t,r){function o(){return new n(function(t,n){i(e,r,t,n)})}return a=a?a.then(o,o):o()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},869:(e,t,n)=>{var r=n(887);e.exports=function(e,t,n,o,i){var a=r(e,t,n,o,i);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},887:(e,t,n)=>{var r=n(993),o=n(791);e.exports=function(e,t,n,i,a){return new o(r().w(e,t,n,i),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},993:(e,t,n)=>{var r=n(546);function o(){var t,n,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.toStringTag||"@@toStringTag";function c(e,o,i,a){var s=o&&o.prototype instanceof l?o:l,c=Object.create(s.prototype);return r(c,"_invoke",function(e,r,o){var i,a,s,c=0,l=o||[],d=!1,p={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return i=e,a=0,s=t,p.n=n,u}};function f(e,r){for(a=e,s=r,n=0;!d&&c&&!o&&n<l.length;n++){var o,i=l[n],f=p.p,g=i[2];e>3?(o=g===r)&&(s=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=f&&((o=e<2&&f<i[1])?(a=0,p.v=r,p.n=i[1]):f<g&&(o=e<3||i[0]>r||r>g)&&(i[4]=e,i[5]=r,p.n=g,a=0))}if(o||e>1)return u;throw d=!0,r}return function(o,l,g){if(c>1)throw TypeError("Generator is already running");for(d&&1===l&&f(l,g),a=l,s=g;(n=a<2?t:s)||!d;){i||(a?a<3?(a>1&&(p.n=-1),f(a,s)):p.n=s:p.v=s);try{if(c=2,i){if(a||(o="next"),n=i[o]){if(!(n=n.call(i,s)))throw TypeError("iterator result is not an object");if(!n.done)return n;s=n.value,a<2&&(a=0)}else 1===a&&(n=i.return)&&n.call(i),a<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((n=(d=p.n<0)?s:e.call(r,p))!==u)break}catch(e){i=t,a=1,s=e}finally{c=1}}return{value:n,done:d}}}(e,i,a),!0),c}var u={};function l(){}function d(){}function p(){}n=Object.getPrototypeOf;var f=[][a]?n(n([][a]())):(r(n={},a,function(){return this}),n),g=p.prototype=l.prototype=Object.create(f);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,r(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e}return d.prototype=p,r(g,"constructor",p),r(p,"constructor",d),d.displayName="GeneratorFunction",r(p,s,"GeneratorFunction"),r(g),r(g,s,"Generator"),r(g,a,function(){return this}),r(g,"toString",function(){return"[object Generator]"}),(e.exports=o=function(){return{w:c,m:h}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function t(t){return function(){var n=this,r=arguments;return new Promise(function(o,i){var a=t.apply(n,r);function s(t){e(a,o,i,s,c,"next",t)}function c(t){e(a,o,i,s,c,"throw",t)}s(void 0)})}}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}function p(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=n(756),g=n.n(f),h={aid:"21671780509",brand:"smh",generalTimout:parseInt("2500",10),gpt:"securepubads.g.doubleclick.net/tag/js/gpt.js",gptid:"gptHeadScript",version:"2.24.0",options:{enableAdBlock:!1,enableBlockthrough:!1,enableLazyLoad:!1,enableMantis:!1,enableMagnite:!1,enablePubMatic:!1,enableSnowplow:!1},lazyload:{default:{throttleTimeoutMs:parseInt("250",10),fetchMarginPercent:parseInt("900",10),renderMarginPercent:parseInt("100",10)},mobile:{Article:{mobileScaling:parseFloat("1.5")},Homepage:{mobileScaling:parseFloat("2.5")}}},pubmatic:{brand:{DEFAULT:parseInt("3858",10),afr:parseInt("3891",10),brisbanetimes:parseInt("3858",10),essentialbaby:parseInt("3889",10),essentialkids:parseInt("3887",10),"good-food":parseInt("3886",10),smh:parseInt("3890",10),theage:parseInt("3888",10),traveller:parseInt("3885",10),watoday:parseInt("3892",10)},id:"pubMaticHeadScript-id",timeout:parseInt("2000",10),url:"ads.pubmatic.com/AdServer/js/pwt/158309/"},magnite:{id:"magniteScript-id",url:"micro.rubiconproject.com/prebid/dynamic/21460.js",timeout:parseInt("3500",10)},snowplow:{event:"trackSelfDescribingEvent:ffx",schema:"iglu:au.com.fairfaxmedia/performance/jsonschema/1-0-0"},adservingApi:{devEndpoint:"api-dev.ffx.io/graphql",prodEndpoint:"api.ffx.io/graphql"},mantis:{url:"loader.mantis-intelligence.com/nine/loader.js",id:"mantis-id"}};function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var y=function(e){return e.ABOVE="above",e.BELOW="below",e}({}),m=function(e){return e.ADOPS_TIMING_EVENT="AdopsTimingEvent",e.BRAND_SAFETY="Brand Safety",e.AD_VENDOR_SCRIPT_LOAD="Ad Vendor Script Load",e.HEADER_BIDDER="Header bidder",e}({});const w=Date.now();var S=function(e){return e.FAIRFAX="21671780509",e.NINE_PRODUCTION="133009657",e.NINE_STAGING="21681201340",e.RADIO_GAM="55984129",e}({}),I=["Magnite","Pubmatic","Mantis"],E={ads:[{id:"adSlot-1",size:[[970,50],[728,90],[970,250]],pos:1,lazy:!1,foldPosition:"above",native:!1},{id:"adSlot-2",size:[[300,50],[300,250]],pos:2,lazy:!1,foldPosition:"above",native:!1},{id:"adSlot-3",size:[[6,5]],pos:3,lazy:!1,foldPosition:"below",native:!0},{id:"adSlot-4",size:[[728,91],[728,90]],pos:4,lazy:!1,foldPosition:"below",native:!1},{id:"adSlot-5",size:[[160,600],[160,600]],pos:5,lazy:!0,foldPosition:"below",native:!1}],keywords:{nuid:"91a5ab9d661f47e8bb55646e2800a9db",hierarchy:{pagelevel01:"smh",pagelevel02:"goodfood",pagelevel03:"eating-out"},template:"Article",tags:["tag"],subscriberid:"09e819827b64b6435c956d27110c9a81",collectionId:"pv91u",live:""},pageViewId:"7404BC46-CACA-4E26-BB04-C9CC6291EB04",brand:"smh",adExclusion:["exclusion"],adSuppression:!1,breakpoint:700,additionalKeywords:{experimentname:1190}},T=(b(b({},{adserving:E,user:{memberId:"388f61b4dfca401c8da35418c97fc121",memberType:"subscriber",swgBundleId:""},page:{pageId:"p5cj05",viewID:"4497D7D0-0C47-44EC-9DFA-9F62E21C42C5",sysEnv:"desktop",deployEnv:"production"}}),{},{adserving:b(b({},E),{},{adSuppression:!0,keywords:{nuid:"91a5ab9d661f47e8bb55646e2800a9db",hierarchy:{level1:"",level2:"",level3:""},template:"Article",tags:["tag"],subscriberid:"09e819827b64b6435c956d27110c9a81"}})}),function(e){return e.BANNER="banner",e.SIDEPANEL="sidepanel",e.BILLBOARD="billboard",e.HALFPAGE="halfpage",e.MBANNER="mbanner",e.MOBILE="mobile",e.MEDIUM_MOBILE="medium",e.ATPTEST="ATPTEST",e.TAKEOVER="TAKEOVER",e.NATIVE="NATIVE",e}({})),P={banner:{above:[[728,90]],below:[[728,90],[300,250]]},sidepanel:{above:[[1,1]]},billboard:{above:[[970,250],[970,150],[1030,250],[1190,250],[728,90],[13,1],[14,1],[30,1]],below:[[970,250],[970,150],[728,90],[300,250]]},halfpage:{above:[[300,600],[300,250]]},mbanner:{above:[[320,50],[320,150],[13,1],[14,1]],below:[[320,50]]},mobile:{above:[[300,250]],below:[[300,250],[320,50]]},medium_mobile:{above:[[300,250]],below:[[300,250],[320,50]]},atptest:{above:[[99,1]]},takeover:{above:[[2,2]]},NATIVE:{below:[[6,5]]},medium:{above:[[300,250]],below:[[300,250]]}},A={banner:{above:1},sidepanel:{above:0},billboard:{above:1},halfpage:{above:2},mbanner:{above:1},mobile:{above:2},medium:{above:2}};function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function O(e,t){if(e){if("string"==typeof e)return x(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}function k(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||O(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||O(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var D=function(e){var t=document.cookie.match("(^|;) ?".concat(e,"=([^;]*)"));return t?t[2]:""},M=function(){return"visible"===document.visibilityState},R=function(){var e=new URLSearchParams(window.location.search).get("adcallkw");return e?[e]:void 0},C=function(e){return new Promise(function(t,n){setTimeout(n,e,new Error("timeout"))})},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e||!document.getElementById(e))return!1;var n=document.getElementById(e).parentElement;if(n&&/adWrapper/i.test(n.className)){var r=new RegExp("\\sad(?=\\s|$)","g"),o=k(Array.from(n.children)).filter(function(e){return"SMALL"===e.tagName});return o.length&&o.forEach(function(e){/advertisement/i.test(e.innerText)&&(e.style.display=t?"block":"none")}),t?r.test(n.className)||(n.className+=" ad"):n.className.replace(r,""),!0}return!1},B=function(e,t){return/homepage/i.test(e||t)?"home":e||t||""},z=function(e){var t=!1;return e.forEach(function(e){e.includes(300)&&e.includes(600)&&(t=!0)}),t},L=function(){return D("adkitGamId").length?D("adkitGamId"):h.aid},N=function(e,t){var n=t.filter(function(t){return e.filter(function(e){return e.adSlotId===t&&z(e.adSize)})})[0],r=document.getElementById(n).getBoundingClientRect(),o=r.bottom,i=r.left,a=r.right,s=r.top,c=window,u=c.innerHeight,l=c.innerWidth;return(s>0&&s<u||o>0&&o<u)&&(i>0&&i<l||a>0&&a<l)},G=function(e,t){var n=t.adserving.ads.filter(function(t){return t.id===e.id})[0];void 0!==n&&void 0!==n.slotKeywords&&Object.entries(n.slotKeywords).forEach(function(t){var n=j(t,2),r=n[0],o=n[1];e.slot.slot.setTargeting("".concat(r),"".concat(o))})};const q=a(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";s(this,e),p(this,"debug",function(e,t){if("true"===D("adkitDebug")){var n="".concat(Date.now()-w,"ms");console.log("ADKIT: ".concat(e," - ").concat(n," - ").concat(t))}}),p(this,"error",function(e,t){if("true"===D("adkitDebug")){var n="".concat(Date.now()-w,"ms");console.error("ADKIT: ".concat(e," - ").concat(n," - ").concat(t))}}),t.length&&n.length&&this.debug(t,n)});var F=function(){function e(t){s(this,e),p(this,"isLoaded",!1),p(this,"global",void 0),p(this,"fnInit",void 0),p(this,"src",void 0),p(this,"id",void 0);var n=t.fnInit,r=t.global,o=t.id,i=void 0===o?"":o,a=t.src;this.fnInit=n,this.global=r,this.id=i,this.isLoaded=!1,this.src=a}return a(e,[{key:"loadScript",value:function(){var e=this;return new Promise(function(t,n){e.fnInit();var r=document.location.protocol,o=document.createElement("script");o.id=e.id,o.type="text/javascript",o.async=!0,o.src="".concat(r,"//").concat(e.src);var i=document.getElementsByTagName("script")[0]||document.body.firstChild;i||n(new Error("".concat(e.src," failed to find a valid location."))),i.parentNode.insertBefore(o,i),o.addEventListener("load",function(){e.isLoaded=!0,t(o)}),o.addEventListener("error",function(){n(new Error("".concat(e.src," failed to load.")))})})}},{key:"load",value:(n=t(g().mark(function t(){var n;return g().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.isLoaded){t.next=4;break}return t.prev=1,t.next=2,this.loadScript();case 2:t.next=4;break;case 3:t.prev=3,n=t.catch(1),e.logger.error("Error","".concat(this.global," loader error: ").concat(n));case 4:return t.abrupt("return",window[this.global]);case 5:case"end":return t.stop()}},t,this,[[1,3]])})),function(){return n.apply(this,arguments)})}]);var n}();p(F,"logger",new q);const U=F;var V=encodeURIComponent("\nquery AdTypesByAdIds($input: AdTypesByAdIdsInput!) {\n  adTypesByAdIds(input: $input) {\n    error {\n      message\n    }\n    lines {\n      key\n      type\n      roadblockType\n    }\n  }\n}\n".replace(/\s+/g," ")),W=function(){var e=t(g().mark(function e(t){var n,r,o,i,a,s;return g().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=S.NINE_STAGING===L()?h.adservingApi.devEndpoint:h.adservingApi.prodEndpoint,r={input:{ids:t}},o=encodeURIComponent(JSON.stringify(r)),i=new URL("https://".concat(n,"?query=").concat(V,"&variables=").concat(o)).toString(),e.next=1,fetch(i,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}}).then(function(e){if(e.status>400)throw new Error("".concat(e.status," ").concat(e.statusText));return e.json()}).then(function(e){var t=e.data.adTypesByAdIds,n=(void 0===t?{}:t).lines;return void 0===n?[]:n}).catch(function(e){return console.log("ADKIT: Get line item id failed",e),[]});case 1:return a=e.sent,e.abrupt("return",a);case 2:return e.prev=2,s=e.catch(0),console.log(s),e.abrupt("return",[]);case 3:case"end":return e.stop()}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}(),K=function(){var e=t(g().mark(function e(t){var n,r,o;return g().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=[],t.forEach(function(e){e.lineItemId&&z(e.adSize)&&n.push(e.lineItemId.toString())}),e.next=1,W(n);case 1:return r=e.sent,o=[],r.forEach(function(e){t.filter(function(t){return z(t.adSize)&&t.lineItemId===parseInt(e.key,10)}).forEach(function(t){o.push({lineItemId:t.lineItemId,lineItemType:e.type,roadblockType:e.roadblockType,adSlotId:t.adSlotId})})}),e.abrupt("return",o);case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}();function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const X=function(){return a(function e(t){var n,r=this;s(this,e),p(this,"adSlotsLazyload",[]),p(this,"additionalAdSlots",[]),p(this,"adSlots",[]),p(this,"setCategoryExclusion",[]),p(this,"setTargeting",[]),p(this,"setSlotKeywordsTargeting",function(e){var t=[];return e.legacyAdType&&t.push(["legacyadtype","".concat(e.legacyAdType,"_").concat(e.foldPosition)]),void 0!==e.slotKeywords?[].concat(t,k(Object.entries(e.slotKeywords))):[].concat(t)}),p(this,"getNativeTargeting",function(e){var t=e.legacyAdType?P[T.NATIVE][y.BELOW]:e.size;return e.native?[["nativesz","".concat(t[0][0],"x").concat(t[0][1])]]:[]}),p(this,"mapAdSizes",function(e){return e.legacyAdType?e.native?[P[T.NATIVE][y.BELOW][0],"fluid"]:e.size&&0!==e.size.length?e.size:P[e.legacyAdType.toLowerCase()][e.foldPosition]:e.native?[e.size[0],"fluid"]:e.size}),p(this,"mapAdsData",function(e){var t=e;if(t[0].legacyAdType){var n=[];t.sort(function(e,t){return e.pos-t.pos});var r=e.reduce(function(e,t){return t.foldPosition===y.ABOVE?t.legacyAdType.match(/takeover|atptest/i)?(n.push(t),e):[].concat(k(e),[$($({},t),{},{pos:A[t.legacyAdType.toLowerCase()][y.ABOVE]})]):e},[]).sort(function(e,t){return e.pos-t.pos}),o=e.filter(function(e){return e.foldPosition===y.BELOW&&!e.native}).map(function(e,t){return $($({},e),{},{pos:r[r.length-1].pos+t+1})}),i=e.filter(function(e){return e.native});return[].concat(k(r),k(o),k(i),n)}return t.sort(function(e,t){return e.pos-t.pos})}),p(this,"removeArrayItem",function(e,t){return e.filter(function(e){return e!==t})}),p(this,"sortByRoadblocks",function(e){var t=e.slice(),n=[],o=[];return e.forEach(function(e){e.id.match(/(728x90|300x50).*-pos-?1/i)?(t=r.removeArrayItem(t,e),n.unshift(e)):e.id.match(/(728x90|300x50).*-pos-?2/i)?(t=r.removeArrayItem(t,e),n.push(e)):e.id.match(/pos-?1/i)||(t=r.removeArrayItem(t,e),o.push(e))}),n.concat(t,o.sort())}),this.setCategoryExclusion=null!==(n=t.adExclusions)&&void 0!==n?n:[],this.setTargeting=Object.entries(t.adTargets).filter(function(e){return e[1]});var o=this.mapAdsData(t.adSlots);this.setAdUnits(t.adUnitPath,o,t.gamId)},[{key:"setAdUnits",value:function(e,t,n){var r=this;(n===S.RADIO_GAM?this.sortByRoadblocks(t.sort()):t).forEach(function(t){var o,i,a,s={adSize:null!==(o=r.mapAdSizes(t))&&void 0!==o?o:[],adSlotId:t.id,adUnitPath:e,lazyload:null!==(i=t.lazy)&&void 0!==i&&i,native:null!==(a=t.native)&&void 0!==a&&a,target:[["pos",t.legacyAdType&&t.legacyAdType.match(/takeover|atptest/i)?"":"".concat(t.pos)],["foldposition","".concat(t.foldPosition)],["src_ad_id",t.id]].concat(k(r.setSlotKeywordsTargeting(t)),k(r.getNativeTargeting(t)))};n===S.RADIO_GAM&&s.target.splice(2,1),t.lazy?r.adSlotsLazyload.push(s):t.foldPosition===y.BELOW?r.additionalAdSlots.push(s):r.adSlots.push(s)})}},{key:"getAllSlots",get:function(){return{adLazyloadSlots:this.adSlotsLazyload,additionalAdSlots:this.additionalAdSlots,adSlots:this.adSlots,adExclusions:this.setCategoryExclusion,setTargeting:this.setTargeting}}}])}();function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const Q=function(){return a(function e(t){var n=this;s(this,e),p(this,"config",void 0),p(this,"dataSource",void 0),p(this,"logger",void 0),p(this,"firstLoad",void 0),p(this,"isMeasurable",void 0),p(this,"isVisible",void 0),p(this,"startTime",void 0),p(this,"definedSlotsMap",void 0),p(this,"renderedSlots",void 0),p(this,"perfEvent",void 0),p(this,"getAdCustomTargeting",function(){var e,t,r,o,i,a,s,c,u,l,d,p="na",f=n.userInfo.memberType||n.userInfo.membershipType;if(n.logger.debug("Tab Active","".concat(M())),"string"==typeof f&&/subscriber/.test(f)){var g,h=n.userInfo.swgBundleId||(null===(g=n.userInfo.profileInfo)||void 0===g?void 0:g.swgBundleId);p=void 0===h?"sub_0":"sub_".concat(h)}else"string"==typeof f&&/member/.test(f)&&(p="no");return J(J({},(i=n.config.aid,a=n.adInfo,s=n.pageInfo,c=n.userInfo,i===S.FAIRFAX||i===S.RADIO_GAM?{pageId:(null==s?void 0:s.pageId)||(null==s?void 0:s.pageID)||"",pageviewid:(null==a?void 0:a.pageViewId)||s.viewID||s.pageViewId||"",autoRefresh:"true"===s.autoRefresh?"true":"false",csub:/visitor/i.test(c.memberType)||0===c.memberType.length?"visitor":"subscriber",layout:"blue",cat:(null==a?void 0:a.keywords.hierarchy.level2)||(null==a?void 0:a.keywords.hierarchy.pagelevel02)||"",cat1:(null==a?void 0:a.keywords.hierarchy.level3)||(null==a?void 0:a.keywords.hierarchy.pagelevel03)||"",cat2:(null==a?void 0:a.keywords.hierarchy.level4)||(null==a?void 0:a.keywords.hierarchy.pagelevel04)||"",cat3:"",ctype:(null==a?void 0:a.keywords.template)||(null==a?void 0:a.keywords.pageType)||"",collection:null!==(l=null==a?void 0:a.keywords.collectionId)&&void 0!==l?l:"",live:null!==(d=null==a?void 0:a.keywords.live)&&void 0!==d?d:""}:{pagelevel01:(null==a?void 0:a.keywords.hierarchy.level1)||(null==a?void 0:a.keywords.hierarchy.pagelevel01)||"",pagelevel02:B(null==a?void 0:a.keywords.hierarchy.level2,null==a?void 0:a.keywords.hierarchy.pagelevel02),pagelevel03:(null==a?void 0:a.keywords.hierarchy.level3)||(null==a?void 0:a.keywords.hierarchy.pagelevel03)||"",pagelevel04:(null==a?void 0:a.keywords.hierarchy.pagelevel04)||"",pagetype:B(null==a?void 0:a.keywords.template,null==a?void 0:a.keywords.pageType),contentId:(null==s?void 0:s.pageId)||(null==s?void 0:s.pageID)||"",inskinviewable:window.innerWidth>=1450?"true":"false",hasFocus:Boolean(!document.hidden).toString(),collection:null!==(u=null==a?void 0:a.keywords.collectionId)&&void 0!==u?u:"",csub:/visitor/i.test(c.memberType)||0===c.memberType.length?"visitor":"subscriber"})),{},{brms:n.isMeasurable.toString(),brvs:n.isVisible.toString(),deployEnv:n.pageInfo.deployEnv||"",swgt:p,u:n.userInfo.memberId||"",adKitVersion:n.config.version,nuid:(null===(e=n.adInfo)||void 0===e?void 0:e.keywords.nuid)||D("NUID")||"",sysEnv:n.pageInfo.sysEnv||"",tag:null===(t=n.adInfo)||void 0===t?void 0:t.keywords.tags,live:null!==(r=null===(o=n.adInfo)||void 0===o?void 0:o.keywords.live)&&void 0!==r?r:""})}),p(this,"getSlotById",function(e){var t=n.getAdConfig();return[].concat(k(t.adLazyloadSlots),k(t.adSlots),k(t.additionalAdSlots)).find(function(t){return e===t.adSlotId})}),p(this,"getAdConfig",function(){var e,t,r;return new X({adExclusions:null!==(e=null===(t=n.adInfo)||void 0===t?void 0:t.adExclusion)&&void 0!==e?e:[],adSlots:(null===(r=n.adInfo)||void 0===r?void 0:r.ads)||[],adUnitPath:n.adUnitPath||"",adTargets:n.getAdCustomTargeting(),gamId:n.config.aid}).getAllSlots}),this.firstLoad=!0,this.config=h,t?this.config.options=t:t=this.config.options,this.logger=new q("Data","Initialized"),this.startTime=Date.now(),this.isMeasurable=!0,this.isVisible=!0,this.definedSlotsMap=new Map,this.renderedSlots=new Map},[{key:"setDataLayerData",value:function(e){this.dataSource=function(e){var t=e.adserving,n=e.page,r=void 0===n?{}:n,o=e.user;return{adData:t,dataSource:e||{},pageInfo:r,userInfo:void 0===o?{}:o}}(e)}},{key:"adInfo",get:function(){return this.dataSource.adData}},{key:"pageInfo",get:function(){return this.dataSource.pageInfo}},{key:"userInfo",get:function(){return this.dataSource.userInfo}},{key:"adUnitPath",get:function(){var e=(this.adInfo||{}).keywords,t=R(),n=e.hierarchy.level1||e.hierarchy.pagelevel01,r=this.config.aid===S.FAIRFAX||this.config.aid===S.RADIO_GAM?e.hierarchy.level2||e.hierarchy.pagelevel02:B(e.hierarchy.level2,e.hierarchy.pagelevel02),o=e.hierarchy.level3||e.hierarchy.pagelevel03,i=[this.config.aid,t?"adtester":n,r,o].filter(function(e){return e});return"/".concat(i.join("/"))}}])}(),Z=a(function e(){s(this,e),p(this,"init",function(){var e=document.createElement("script");return e.id="btloaderblue",e.type="text/javascript",e.src="https://btloader.com/tag?o=5196279419240448&upapi=true",document.getElementsByTagName("head")[0].appendChild(e),e}),this.init()}),ee=function(){return a(function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;s(this,e),p(this,"timer",void 0),p(this,"end",void 0),p(this,"tid",void 0),p(this,"clear",function(){return t.end=new Promise(function(e){window.clearTimeout(t.tid),t.tid=null,e("Timeout:clear")}),t.end}),p(this,"set",function(e){return new Promise(function(n){t.tid=window.setTimeout(function(){n("Timeout:".concat(e,"ms"))},e)})}),this.timer=n,this.tid=null,this.end=this.set(this.timer)},[{key:"resolved",get:function(){return this.end}}])}();var te,ne=a(function e(n){var r=this;s(this,e),p(this,"logger",void 0),p(this,"magniteConfig",void 0),p(this,"targeting",[]),p(this,"loadPromise",void 0),p(this,"pagetype",void 0),p(this,"init",function(){return r.loadPromise=new U({fnInit:function(){window.pbjs=window.pbjs||{}},global:"pbjs",id:r.magniteConfig.id,src:"".concat(r.magniteConfig.url)}).load(),r.loadPromise}),p(this,"fireMagnite",function(){var e=t(g().mark(function e(t,n,o){var i,a;return g().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r.pagetype=o,n){e.next=1;break}return e.abrupt("return","Custom Targeting - Magnite not enabled on this page");case 1:return e.prev=1,e.next=2,r.getMagniteCustomTargeting(t);case 2:i=e.sent,e.next=4;break;case 3:e.prev=3,a=e.catch(1),r.logger.error("Custom Targeting","Magnite - ".concat(a));case 4:return e.abrupt("return",i);case 5:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n,r){return e.apply(this,arguments)}}()),p(this,"getMagniteCustomTargeting",function(){var e=t(g().mark(function e(t){var n,o;return g().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,r.loadPromise;case 1:return n=new ee(r.magniteConfig.timeout),e.next=2,Promise.race([r.makeBidRequest(t),n.resolved]);case 2:if(e.sent){e.next=3;break}return e.abrupt("return","Magnite: request Bid not found");case 3:return e.next=4,r.setTargeting(t);case 4:return o=e.sent,r.logger.debug("Custom Targeting","Magnite targeting is set"),e.abrupt("return",o);case 5:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),p(this,"generateSlotMapData",function(t){return t.map(function(t){return e.slotIds.push(t.adSlotId),{name:t.adUnitPath,divId:t.adSlotId,ortb2Imp:{ext:{data:{pos:t.target[0][1],foldposition:t.target[1][1],adUnitPath:t.adUnitPath}}},sizes:t.native?[{w:t.adSize[0][0],h:t.adSize[0][1]}]:t.adSize.map(function(e){return{w:e[0],h:e[1]}})}})}),p(this,"makeBidRequest",function(){var n=t(g().mark(function t(n){var o;return g().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(window.pbjs){t.next=1;break}throw new Error("makeBidRequest: window.pbjs NotExist");case 1:return o=r.generateSlotMapData(n),t.abrupt("return",new Promise(function(t,n){window.pbjs.rp.requestBids?(window.pbjs.setConfig({ortb2:{site:{ext:{data:{pagetype:r.pagetype}}}},appnexusAuctionKeywords:{pageType:r.pagetype}}),window.pbjs.que.push(function(){window.pbjs.rp.requestBids({divPatternMatching:!0,slotMap:o,callback:function(n){return t(e.initAdserver(n))},setTargeting:!1})})):n(new Error("makeBidRequest: window.pbjs.rp.requestBids NotExist"))}));case 2:case"end":return t.stop()}},t)}));return function(e){return n.apply(this,arguments)}}()),p(this,"setTargeting",function(){var n=t(g().mark(function t(n){var o;return g().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=e.bidData,t.abrupt("return",new Promise(function(e,t){o&&!Object.keys(o).length&&t(new Error("Magnite setTargeting: magnite header bidding data not available"));try{n.forEach(function(e){var t,n=[],i=o[e.adSlotId];return i&&0!==Object.keys(i).length&&Object.entries(i).forEach(function(e){var t=j(e,2),r=t[0],o=t[1];n.push([r,o.toString()])}),r.targeting.push(p({},e.adSlotId,[].concat(n))),(t=e.target).push.apply(t,n)})}catch(e){t(new Error("Magnite setTargeting: ".concat(e)))}e({resolved:r.targeting})}));case 1:case"end":return t.stop()}},t)}));return function(e){return n.apply(this,arguments)}}()),p(this,"refreshBids",function(){var e=t(g().mark(function e(t,n){var o,i;return g().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o=r.generateSlotMapData(t),e.abrupt("return",new Promise(function(e,t){window.pbjs.rp.requestBids?window.pbjs.que.push(function(){window.pbjs.rp.requestBids({divPatternMatching:!0,slotMap:o,callback:function(){return e(window.pbjs.que.push(function(){window.pbjs.setTargetingForGPTAsync(n)}))}})}):t(new Error("makeBidRequest: window.pbjs.rp.requestBids NotExist"))}));case 1:return e.prev=1,i=e.catch(0),r.logger.error("Custom Targeting","Magnite - ".concat(i)),e.abrupt("return",void 0);case 2:case"end":return e.stop()}},e,null,[[0,1]])}));return function(t,n){return e.apply(this,arguments)}}()),this.magniteConfig=n,this.logger=new q});te=ne,p(ne,"slotIds",[]),p(ne,"bidData",{}),p(ne,"initAdserver",function(e){return 0!==Object.keys(e).length&&(te.slotIds.forEach(function(e){te.bidData[e]=window.pbjs.getAdserverTargetingForAdUnitCode([e])}),!0)});const re=ne,oe=function(){return a(function e(n,r){var o=this;s(this,e),p(this,"pubmaticConfig",void 0),p(this,"site",void 0),p(this,"logger",void 0),p(this,"pubmaticTimer",void 0),p(this,"pwtConfig",void 0),p(this,"data",{}),p(this,"targeting",[]),p(this,"loadPromise",void 0),p(this,"init",function(){return o.loadPromise=new U({fnInit:function(){window.PWT=window.PWT||{}},global:"PWT",id:o.pubmaticConfig.id,src:o.latestPubMaticVersion(o.site)}).load(),o.loadPromise}),p(this,"latestPubMaticVersion",function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=null!==(e=o.pubmaticConfig.brand[t])&&void 0!==e?e:o.pubmaticConfig.brand.DEFAULT,r="",i=window.location.href;if(i.indexOf("pwtv=")>0){var a=/pwtv=(.*?)(&|$)/g.exec(i);r=a.length>=2&&a[1].length>0?"/".concat(a[1]):""}return"".concat(o.pubmaticConfig.url+n+r,"/pwt.js")}),p(this,"firePubMatic",function(){var e=t(g().mark(function e(t,n){var r,i;return g().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=1;break}return e.abrupt("return","Custom Targeting - PubMatic Open Wrap not enabled on this page");case 1:return e.prev=1,e.next=2,o.getPubMaticCustomTargeting(t);case 2:r=e.sent,e.next=4;break;case 3:e.prev=3,i=e.catch(1),o.logger.error("Custom Targeting","PubMatic - ".concat(i));case 4:return e.abrupt("return",r);case 5:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()),p(this,"getPubMaticCustomTargeting",function(){var e=t(g().mark(function e(t){var n,r;return g().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,o.loadPromise;case 1:return o.pubmaticTimer=new ee(o.pubmaticConfig.timeout),e.next=2,Promise.race([o.makeOpenWrapRequest(t),o.pubmaticTimer.resolved]);case 2:if("Timeout:clear"===(n=e.sent)){e.next=3;break}return e.abrupt("return",n);case 3:return e.next=4,o.setTargeting(t);case 4:if(!(r=e.sent).error){e.next=5;break}throw new Error(r.error);case 5:return o.logger.debug("Custom Targeting","PubMatic targeting is set"),e.abrupt("return",r);case 6:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),p(this,"generatePWTConfig",function(e){return e.length?(void 0===o.pwtConfig&&(o.pwtConfig=[]),o.pwtConfig=e.map(function(e,t){return{adUnitId:e.adUnitPath,adUnitIndex:t.toString(),code:e.adSlotId,divId:e.adSlotId,mediaTypes:{banner:{sizes:e.adSize}},sizes:e.adSize}}),o.pwtConfig):new Error("generatePWTConfig: adSlots NoExist")}),p(this,"makeOpenWrapRequest",function(e){return new Promise(function(t,n){window.PWT&&window.PWT.requestBids||n(new Error("makeOpenWrapRequest: window.PWT NotExist"));var r=o.generatePWTConfig(e);window.PWT.requestBids(r,function(e){e.forEach(function(e){o.data[e.code]=e.bidData}),o.pubmaticTimer.clear(),t(o.pubmaticTimer.resolved)})})}),p(this,"setTargeting",function(){var e=t(g().mark(function e(t){var n;return g().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,new Promise(function(e,n){o.data&&!Object.keys(o.data).length&&n(new Error("PubMatic setTargeting: pubMaticData NotExist"));try{t.forEach(function(e){var t,n=[];if(void 0===e.adSlotId||void 0===o.data[e.adSlotId])return!1;var r=o.data[e.adSlotId].kvp;return r&&0!==Object.keys(r).length&&Object.entries(r).forEach(function(e){var t=j(e,2),r=t[0],o=t[1];n.push([r,o.toString()])}),o.targeting.push(p({},e.adSlotId,[].concat(n))),(t=e.target).push.apply(t,n)})}catch(e){n(new Error("PubMatic setTargeting: ".concat(e)))}e({resolved:o.targeting})});case 1:return e.abrupt("return",e.sent);case 2:return e.prev=2,n=e.catch(0),e.abrupt("return",n);case 3:case"end":return e.stop()}},e,null,[[0,2]])}));return function(t){return e.apply(this,arguments)}}()),this.pubmaticConfig=n,this.site=r,this.logger=new q},[{key:"clearPubMaticData",value:function(){this.targeting=[],this.data={}}}])}();var ie=a(function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;s(this,e),p(this,"dataStore",void 0),p(this,"instance",void 0),p(this,"add",function(e){var n;t.dataStore.push(e),null!==(n=t.instance)&&void 0!==n&&n.apiReady()&&t.apply()}),p(this,"apply",function(){t.dataStore.forEach(function(n){try{n.apply(t.instance)}catch(t){e.log.error("Queue","Apply Error - ".concat(n.toString()," ").concat(t))}},t),t.clear()}),p(this,"remove",function(){return t.dataStore.shift()}),p(this,"clear",function(){t.dataStore=[]}),p(this,"first",function(){return t.dataStore[0]}),p(this,"last",function(){return t.dataStore[t.dataStore.length-1]}),p(this,"size",function(){return t.dataStore.length}),p(this,"isEmpty",function(){return!t.dataStore.length}),this.dataStore=n,this.instance=r});p(ie,"log",new q);const ae=ie,se=a(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";s(this,e),p(this,"category",void 0),p(this,"action",void 0),p(this,"label",void 0),p(this,"property",void 0),p(this,"value",void 0),p(this,"creativeid",void 0),this.category=m.ADOPS_TIMING_EVENT,this.action=t,this.label=n,this.property=r,this.value=Date.now(),this.creativeid=o}),ce=function(){return a(function e(t){s(this,e),p(this,"event",void 0),p(this,"schema",void 0),this.event=t?t.event:"",this.schema=t?t.schema:""},[{key:"trackEvent",value:function(e){return!!(window.snowplow&&this.event&&this.schema)&&(window.snowplow("trackSelfDescribingEvent:ffx",{data:e,schema:this.schema}),!0)}},{key:"trackStructuredEvent",value:function(e){var t=e.action,n=e.category,r=e.label,o=e.property,i=void 0===o?"":o,a=e.value,s=void 0===a?0:a,c=[{data:{},schema:this.schema}];return!!(window.snowplow&&this.event&&this.schema)&&(window.snowplow(this.event,n,t,r,i,s,c),!0)}}])}(),ue=a(function e(t){var n=this;s(this,e),p(this,"logger",void 0),p(this,"mantisConfig",void 0),p(this,"init",function(){return new U({fnInit:function(){window.mantis=window.mantis||[]},global:"mantis",src:"".concat(n.mantisConfig.url),id:n.mantisConfig.id}).load()}),this.logger=new q,this.mantisConfig=t});function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function de(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pe=function(){return!!e})()}var fe;function ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function he(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(n),!0).forEach(function(t){p(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ge(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ve(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ve=function(){return!!e})()}var be={enableAdCentering:!0,enableSingleRequest:!0,isUpdateAd:!1,gamId:"21671780509",reInstallScripts:!1},ye=function(e){function t(){var e,n,r,o;s(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return n=this,r=t,o=[].concat(a),r=u(r),p(e=c(n,ve()?Reflect.construct(r,o||[],u(n).constructor):r.apply(n,o)),"status",void 0),p(e,"fetch",function(t){var n;if(null!==(n=window.googletag)&&void 0!==n&&n.pubads){var r=t.map(e.getSlotById);return e.getSlotAds(r)}return{render:!1,setSlots:!1}}),p(e,"init",function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:be;e.config.aid=D("adkitGamId").length?D("adkitGamId"):n.gamId,t.adserving.brand&&(e.config.brand=t.adserving.brand),t.adserving.adSuppression||(e.setDataLayerData(t),e.getPageAds(he(he(he({},e.getAdConfig()),be),n)))}),p(e,"updateAds",function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.destroy(),e.init(t,he(he({},be),{},{isUpdateAd:!0,gamId:e.config.aid,reInstallScripts:n}))}),p(e,"apiReady",function(){return!!(window.ADKIT.gptInstallPromise&&window.googletag&&window.googletag.apiReady&&e.ready)}),e}return d(t,e),a(t)}(function(e){function n(e){var r,o,i,a;return s(this,n),o=this,a=[e],i=u(i=n),p(r=c(o,pe()?Reflect.construct(i,a||[],u(o).constructor):i.apply(o,a)),"ready",!1),p(r,"queue",void 0),p(r,"blockthrough",void 0),p(r,"pubmatic",void 0),p(r,"magnite",void 0),p(r,"sp",void 0),p(r,"adSlotData",void 0),p(r,"mantis",void 0),p(r,"allSlotsRenderedFlag",!1),p(r,"count",0),p(r,"isMouseOverHalfpageAd",!1),p(r,"setupThirdPartyScripts",function(){r.config.options.enablePubMatic&&r.setupPubmatic(),r.config.options.enableMantis&&r.setupMantis()}),p(r,"isSlotSet",function(e){return r.slots.find(function(t){return t.getSlotElementId()===e})}),p(r,"setSlots",function(e){if(!e.length)return r.logger.debug("setSlots","slotsConfig is empty"),!1;try{return e.forEach(function(e){var t=window.googletag.defineSlot(e.adUnitPath,e.adSize,e.adSlotId);t?(t.setCollapseEmptyDiv(!e.lazyload,!e.lazyload),t.addService(window.googletag.pubads()),e.target.forEach(function(e){return t.setTargeting(e[0],e[1])}),r.definedSlotsMap.set(e.adSlotId,t),r.logger.debug("Request Ad","".concat(e.adSlotId))):r.isSlotSet(e.adSlotId)?r.logger.debug("Request Ad","".concat(e.adSlotId," has been set")):r.logger.error("Error","GPT setSlots Error - definedSlot ".concat(e.adSlotId," is null"))},r),!0}catch(e){return r.logger.error("Error","GPT setSlots Error - ".concat(e)),!1}}),p(r,"render",function(e){try{return e.forEach(function(e){return window.googletag.display(e)}),!0}catch(e){return r.logger.error("Error","GPT Display Error - ".concat(e)),!1}}),p(r,"getSlotAds",function(e){var t=r.setSlots(e);return{render:r.render(e.map(function(e){return e.adSlotId})),setSlots:t}}),p(r,"getSlotAdsSequence",function(){var e=t(g().mark(function e(t){var n,o,i;return g().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=t.adLazyloadSlots,o=t.adSlots,i=t.additionalAdSlots,r.ready=!0,o.length&&r.getSlotAds(o),r.queue=new ae(window.ADKIT.queue.dataStore,r),window.ADKIT.queue=r.queue,r.queue.apply(),i.length&&r.getSlotAds(i),n.length&&(window.googletag.pubads().enableLazyLoad({fetchMarginPercent:50,renderMarginPercent:20,mobileScaling:2}),r.getSlotAds(n)),r.slots.length===r.renderedSlots.size&&(r.perfEvent=new se("AD_CALL_TRIGGER","stop","All"),new ce(r.config.snowplow).trackEvent({"adops.batch":[r.perfEvent],"client.deviceType":r.pageInfo.sysEnv,"page.type":r.adInfo.keywords.pageType,"page.viewID":r.pageInfo.viewID||r.pageInfo.pageViewId,"performance.pageReady":0}));case 1:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),p(r,"setPubAdsServicConfiguration",function(e){var t=window.googletag.pubads();r.logger.debug("GPT","Set PubAds Service Configuration"),t.updateCorrelator(),e.enableAdCentering&&t.setCentering(!0),e.enableSingleRequest&&t.enableSingleRequest(),e.adExclusions.length&&(t.clearCategoryExclusions(),e.adExclusions.forEach(function(e){return t.setCategoryExclusion(e)})),e.setTargeting.length&&e.setTargeting.forEach(function(e){t.setTargeting(e[0],e[1]),"nuid"===e[0]&&t.setPublisherProvidedId(e[1])});var n=R();n&&t.setTargeting("adcallkw",n),e.isUpdateAd||t.addEventListener("slotRenderEnded",r.slotRendered.bind(r))}),p(r,"getPageAds",function(e){var t={adLazyloadSlots:e.adLazyloadSlots,adSlots:e.adSlots,additionalAdSlots:e.additionalAdSlots};if(/desktop/i.test(r.pageInfo.sysEnv)&&r.config.aid!==S.FAIRFAX){var n=t.adSlots.findIndex(function(e){return void 0!==e.target[3]&&/above/i.test(e.target[1][1])&&/billboard/i.test(e.target[3][1])});n>-1&&(t.adSlots[0]=t.adSlots.splice(n,1,t.adSlots[0])[0])}r.adSlotData=[].concat(k(t.adSlots),k(t.adLazyloadSlots),k(t.additionalAdSlots)),e.isUpdateAd&&r.config.options.enablePubMatic&&r.pubmatic.data&&r.pubmatic.clearPubMaticData(),e.isUpdateAd&&!e.reInstallScripts||(r.logger.debug("Requester - getPageAds","Setting third party scripts starting"),r.setupThirdPartyScripts(),r.logger.debug("Requester - getPageAds","Setting third party scripts finished")),window.googletag=window.googletag||{cmd:[]},window.googletag.cmd.push(function(){if(!r.adSlotData.length)return r.logger.debug("Requester - getPageAds","adSlots is invalid - length: ".concat(e.adSlots.length)),!1;r.logger.debug("GPT","Ad Call Start"),r.setPubAdsServicConfiguration(e),window.googletag.enableServices();try{return r.getCustomTargeting(r.adSlotData).then(function(e){e.forEach(function(e,t){var n;void 0===e.value?r.logger.debug("Custom Targeting","".concat(I[t]," is not available")):null!==(n=e.value)&&void 0!==n&&null!==(n=n.resolved)&&void 0!==n&&n.length?r.logger.debug("Custom Targeting","".concat(I[t]," is responsed")):r.logger.debug("Custom Targeting",JSON.stringify(e.value))}),r.logger.debug("Custom Targeting","Done")},function(e){r.logger.error("Custom Targeting","".concat(e))}).finally(function(){r.getSlotAdsSequence(t)}),!0}catch(e){return r.logger.error("Custom Targeting","".concat(e)),r.getSlotAdsSequence(t),!1}})}),p(r,"setupPubmatic",function(){var e;r.pubmatic=new oe(r.config.pubmatic,null===(e=r.adInfo)||void 0===e?void 0:e.brand),r.pubmatic.init().then(function(){r.perfEvent=new se(m.HEADER_BIDDER,"start","PubMatic"),r.logger.debug("PubMatic","Loaded")},function(){r.perfEvent=new se(m.HEADER_BIDDER,"failed","PubMatic"),r.logger.error("PubMatic","Failed to load")})}),p(r,"setupMagnite",function(){r.magnite=new re(r.config.magnite),r.magnite.init().then(function(){r.perfEvent=new se(m.HEADER_BIDDER,"start","MAGNITE"),r.logger.debug("Magnite","Loaded")},function(){r.perfEvent=new se(m.HEADER_BIDDER,"failed","MAGNITE"),r.logger.error("Magnite","Failed to load")})}),p(r,"getSlotsById",function(){try{var e=[];return r.slots.forEach(function(t){var n=r.definedSlotsMap.get(t.getSlotElementId());e.push(n)}),e}catch(e){return r.logger.error("Error","GPT getSlotsById Error - ".concat(e)),[]}}),p(r,"destroy",function(){try{var e=Array.from(r.renderedSlots.keys()),t=window.googletag.destroySlots(e)||window.googletag.destroySlots();return r.slots&&r.slots.length?r.slots.forEach(function(e){r.definedSlotsMap.delete(e.getSlotElementId()),r.renderedSlots.delete(e.getSlotElementId())}):(r.definedSlotsMap.clear(),r.renderedSlots.clear()),t}catch(e){return r.logger.debug("Error","GPT Destroy Error - ".concat(e)),!1}}),p(r,"setupMantis",function(){var e,t,n,o=(null===(e=r.adInfo)||void 0===e?void 0:e.keywords.pageType)||(null===(t=r.adInfo)||void 0===t?void 0:t.keywords.template);return/Nine/i.test(null===(n=r.adInfo)||void 0===n?void 0:n.brand)&&/home/i.test(o)||!function(e){return/article|tag|section|featuredarticle|featured_article|recipe|collection|topic|index|post|competition/i.test(e)}(o)||new RegExp("ignorePublicState=true","i").test(window.location.search)?(r.logger.debug("Mantis","No call made"),!1):document.getElementById(r.config.mantis.id)?(r.logger.debug("Mantis - Script already exists: ","Do not install"),!0):(r.perfEvent=new se(m.BRAND_SAFETY,"start","MANTIS"),r.mantis=new ue(r.config.mantis),r.mantis.init().then(function(){r.perfEvent=new se(m.BRAND_SAFETY,"stop","MANTIS"),r.logger.debug("MANTIS","Loaded")},function(){r.perfEvent=new se(m.BRAND_SAFETY,"failed","MANTIS"),r.logger.error("MANTIS","Failed to load")}),!0)}),r.logger.debug("Requester","Initialized"),r.config.options.enableMagnite&&r.setupMagnite(),r.config.options.enableBlockthrough&&(r.blockthrough=new Z,r.logger.debug("Blockthrough","loaded")),r.config.options.enableSnowplow&&(r.sp=new ce(r.config.snowplow)),r}return d(n,e),a(n,[{key:"slots",get:function(){try{return window.googletag.pubads().getSlots()}catch(e){return this.logger.error("Error","GPT slots Error - ".concat(e)),[]}}},{key:"getHalfpageLineItemData",value:(i=t(g().mark(function e(){var t,n,r=this;return g().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,K(this.adSlotData);case 1:t=e.sent,this.logger.debug("Request Lineitem data","Received for halfpage ad"),t.forEach(function(e){r.adSlotData=r.adSlotData.map(function(t){return t.adSlotId===e.adSlotId?de(de({},t),{},{lineItemType:e.lineItemType,roadBlockType:e.roadblockType}):de({},t)})}),this.logger.debug("Request Lineitem data","Data updated for halfpage ad"),e.next=3;break;case 2:e.prev=2,n=e.catch(0),this.logger.error("Error","Failed to get line item data for halfpage ad ".concat(n));case 3:case"end":return e.stop()}},e,this,[[0,2]])})),function(){return i.apply(this,arguments)})},{key:"slotRendered",value:function(e){var t=this,n=e.slot.getSlotElementId(),r=document.getElementById(n);!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=document.getElementById(e);if(n){var r=n.parentElement&&n.parentElement.classList&&n.parentElement.classList.contains("adWrapper")?n.parentElement.classList:n.classList;r.value&&(r.value=r.value.replace(/(adSize-\d\w+\d)|(noAd)/gim,"")),t?n.style&&(n.style.display="block"):n.style&&(n.style.display="none"),t&&void 0!==t[0]&&void 0!==t[1]?r.add("adSize-".concat(t[0],"x").concat(t[1])):r.add("noAd")}}(n,e.size),this.definedSlotsMap.set(n,e);var o=!1;r&&r.id&&(o=/^(?=.*\b(?:pos1|-1|pos-1)\b)(?!.*(?:N|native)).*$/.test(r.id),/halfpage/i.test(r.id)&&(r.addEventListener("mouseover",function(){t.isMouseOverHalfpageAd=!0}),r.addEventListener("mouseleave",function(){t.isMouseOverHalfpageAd=!1}))),e.isEmpty?this.logger.debug("slotRendered","".concat(n," returned but nothing to render")):(this.renderedSlots.set(n,e),null!==e.slot.getResponseInformation()&&this.config.aid!==S.FAIRFAX&&this.adSlotData.forEach(function(r,o){r.adSlotId===n&&(t.adSlotData[o].lineItemId=e.slot.getResponseInformation().lineItemId)}),this.logger.debug("slotRendered","".concat(n)));var i=this.adSlotData.find(function(e){return e.adSlotId===n});if(i&&z(i.adSize)&&(this.logger.debug("slotRendered","Halfpage ad detected: ".concat(n,", getting line item data immediately")),this.getHalfpageLineItemData().catch(function(e){t.logger.error("Error","Failed to get halfpage line item data: ".concat(e))})),!e.isEmpty&&e.size&&e.size.length&&o){var a=function(e,t,n){var r,o,i,a,s=new RegExp("smh|theage|brisbanetimes|watoday").test(null==e?void 0:e.brand),c=new RegExp("afr").test(null==e?void 0:e.brand),u="homepage"===(null===(r=e.keywords)||void 0===r?void 0:r.pageType),l="mobile"===t.sysEnv;return c?l&&50===n.size[1]?(o=!1,i=!0,a="on"):(o=!1,i=!1,a="off"):s&&970===n.size[0]?(o=!0,i=!1,a="on"):90===n.size[1]||50===n.size[1]||120===n.size[1]||s&&u&&l?(o=!1,i=!0,a="on"):300===n.size[0]||250!==n.size[1]||(u||!s)&&s||(o=!1,i=!1,a="off"),{isBillboard:o,isLeaderboard:i,state:a}}(this.adInfo,this.pageInfo,e);void 0!==a.isBillboard&&void 0!==a.isLeaderboard&&void 0!==a.state&&(document.dispatchEvent(new window.CustomEvent("stickyAd",{detail:de({},a)})),this.logger.debug("slotRendered","stickyAdEvent size:".concat(e.size[0],"x").concat(e.size[1],", status:").concat(a.state,", isLeaderboard:").concat(a.isLeaderboard,", isBillboard:").concat(a.isBillboard)))}this.count++,this.count===this.slots.length&&(this.allSlotsRenderedFlag=!0),_(n)}},{key:"getCustomTargeting",value:(o=t(g().mark(function e(t){var n;return g().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Promise.race([Promise.allSettled([this.magnite?this.magnite.fireMagnite(t,this.config.options.enableMagnite,this.dataSource.adData.keywords.template||this.dataSource.adData.keywords.pageType):Promise.resolve("Magnite is undefined"),this.pubmatic?this.pubmatic.firePubMatic(t,this.config.options.enablePubMatic):Promise.resolve("Pubmatic is undefined")]),C(2e3)]);case 1:return n=e.sent,e.abrupt("return",n);case 2:case"end":return e.stop()}},e,this)})),function(e){return o.apply(this,arguments)})},{key:"refresh",value:(r=t(g().mark(function e(){var t,n,r,o,i,a,s,c,u,l,d=this,p=arguments;return g().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=p.length>0&&void 0!==p[0]?p[0]:[],n=p.length>1?p[1]:void 0,r=M(),0!==t.length&&r){e.next=1;break}return e.abrupt("return",!1);case 1:if(o=N(this.adSlotData,t),0!==(i=t.filter(function(e){return 0===d.adSlotData.filter(function(t){return t.adSlotId===e&&z(t.adSize)&&(/sponsorship/i.test(t.lineItemType)||/creative_set/i.test(t.roadblockType)||d.isMouseOverHalfpageAd||!o)}).length})).length){e.next=2;break}return e.abrupt("return",!1);case 2:if(e.prev=2,a=i.map(function(e){return{id:e,slot:d.definedSlotsMap.get(e)}}),s=[],a.length>0&&a.forEach(function(e){var t=e.slot.slot;t.setTargeting("refresh","true"),void 0!==n&&G(e,n),s.push(t),_(t.getSlotElementId(),!1)}),!(this.config.options.enablePubMatic&&a.length>0)){e.next=3;break}return this.pubmatic.pwtConfig=void 0,c=[],window.PWT.removeKeyValuePairsFromGPTSlots(s),s.forEach(function(e){var t=e.getSlotElementId(),n=d.definedSlotsMap.get(t),r=e.getSizes();r.forEach(function(e,t){r[t]=Object.values(e)}),c.push(de(de({},e),{},{adSlotId:t,adUnitPath:n.slot.getAdUnitPath(),size:r,target:[]}))}),e.next=3,this.pubmatic.firePubMatic(c,!0).catch(function(e){d.logger.error("Error ","Pubmatic Refresh Error - ".concat(e))});case 3:if(!(this.config.options.enableMagnite&&a.length>0)){e.next=4;break}return u=[],i.forEach(function(e){u.push.apply(u,k(d.adSlotData.filter(function(t){return e===t.adSlotId})))}),e.next=4,this.magnite.refreshBids(u,i).catch(function(e){d.logger.error("Error ","Magnite Refresh Error - ".concat(e))});case 4:return window.googletag.pubads().refresh(s),e.abrupt("return",!0);case 5:return e.prev=5,l=e.catch(2),this.logger.error("Error","GPT Refresh Error - ".concat(l)),e.abrupt("return",!1);case 6:case"end":return e.stop()}},e,this,[[2,5]])})),function(){return r.apply(this,arguments)})}]);var r,o,i}(Q));fe=ye,p(ye,"logCurrentTimestamp",Date.now()),p(ye,"log",new q),p(ye,"installGPT",t(g().mark(function e(){var t,n;return g().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(fe.log.debug("GPT","Initialized"),!document.getElementById(h.gptid)){e.next=1;break}return fe.log.debug("GPT","Loaded"),fe.prototype.status=!0,e.abrupt("return",window.googletag);case 1:return t=new U({fnInit:function(){return fe.bootstrap()},global:"googletag",id:h.gptid,src:h.gpt}),e.next=2,t.load();case 2:return n=e.sent,fe.log.debug("GPT","Loaded"),fe.prototype.status=!0,e.abrupt("return",n);case 3:case"end":return e.stop()}},e)}))),p(ye,"bootstrap",function(){window.googletag=window.googletag||{cmd:[]},fe.log.debug("GPT","Start to load")}),window.ADKIT={gptInstallPromise:ye.installGPT(),queue:new ae};const me=ye;window.Adkit=me})()})();