1!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).VmaxGoogleAdDisplay=t()}(this,function(){"use strict";function e(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{d(n.next(e))}catch(e){s(e)}}function r(e){try{d(n.throw(e))}catch(e){s(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(a,r)}d((n=n.apply(e,t||[])).next())})}function t(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)}function i(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,i):o?o.value=i:t.set(e,i),i}var n;"function"==typeof SuppressedError&&SuppressedError,function(e){e.ERROR="error",e.WARN="warn",e.INFO="info",e.DEBUG="debug"}(n||(n={}));const o=new class{constructor(){this.logLevel=n.DEBUG,this.isLoggingEnabled=!1}setLogLevel(e){this.logLevel=e}enableLogging(e){this.isLoggingEnabled=e||!1}shouldLog(e){if(!this.isLoggingEnabled)return!1;const t=[n.ERROR,n.WARN,n.INFO,n.DEBUG];return t.indexOf(e)<=t.indexOf(this.logLevel)}debug(...e){this.shouldLog(n.DEBUG)&&console.warn("[VmaxSDK DEBUG]",...e)}info(...e){this.shouldLog(n.INFO)&&console.info("[VmaxSDK INFO]",...e)}warn(...e){this.shouldLog(n.WARN)&&console.warn("[VmaxSDK WARN]",...e)}error(...e){this.shouldLog(n.ERROR)&&console.error("[VmaxSDK ERROR]",...e)}},s=Object.freeze({setLogLevel:e=>o.setLogLevel(e),enableLogging:e=>o.enableLogging(e),debug:(...e)=>o.debug(...e),log:(...e)=>o.info(...e),warn:(...e)=>o.warn(...e),error:(...e)=>o.error(...e)});function a(...e){s.error.apply(console,e)}var r,d,l,c,u,h,f,p,g,v,E,w,m,A,I,D,S,_,b,R,O,T,k,y,C;class L{constructor(e){var n;(r.add(this),d.set(this,void 0),l.set(this,void 0),c.set(this,[]),u.set(this,[]),h.set(this,[]),f.set(this,[]),p.set(this,"hidden"),g.set(this,null),v.set(this,null),E.set(this,!0),w.set(this,null),e instanceof HTMLElement)?(i(this,d,(n=t(this,r,"m",m).bind(this),new IntersectionObserver(n,{root:null,rootMargin:"0px",threshold:.5})),"f"),i(this,l,e,"f"),t(this,d,"f").observe(e),i(this,p,function(e){let t="hidden",i="visibilitychange";const n=window.document;return void 0!==n[t]?(t="hidden",i="visibilitychange"):void 0!==n.msHidden?(t="msHidden",i="msvisibilitychange"):void 0!==n.webkitHidden?(t="webkitHidden",i="webkitvisibilitychange"):void 0!==n.oHidden?(t="oHidden",i="ovisibilitychange"):void 0!==n.mozHidden?(t="mozHidden",i="mozvisibilitychange"):void 0!==n.khtmlHidden&&(t="khtmlHidden",i="khtmlvisibilitychange"),n.addEventListener(i,e,!0),t}(t(this,r,"m",A).bind(this)),"f"),function(e){window.addEventListener("focus",e),window.addEventListener("pageshow",e)}(t(this,r,"m",I).bind(this)),function(e){window.addEventListener("blur",e),window.addEventListener("pagehide",e)}(t(this,r,"m",D).bind(this)),this.check()):function(...e){s.warn.apply(console,e)}("Container must be a valid HTMLElement")}destroy(){var e;null===(e=t(this,d,"f"))||void 0===e||e.unobserve(t(this,l,"f")),i(this,c,[],"f"),i(this,u,[],"f"),i(this,h,[],"f"),i(this,f,[],"f"),i(this,g,null,"f"),i(this,v,null,"f"),i(this,E,null,"f"),clearInterval(t(this,w,"f"))}check(){t(this,r,"m",A).call(this)}enter(e){if("function"!=typeof e)throw new Error("Callback must be a function");return t(this,c,"f").push(e),this}exit(e){if("function"!=typeof e)throw new Error("Callback must be a function");return t(this,u,"f").push(e),this}enterOnce(e){if("function"!=typeof e)throw new Error("Callback must be a function");return t(this,h,"f").push(e),this}exitOnce(e){if("function"!=typeof e)throw new Error("Callback must be a function");return t(this,f,"f").push(e),this}}function N(e,t){const i=function(e,t){const i=navigator.userAgent.match(/Android/i),n=navigator.userAgent.match(/Chrome/i),o=e&&i&&n;if(!o)return!1;const s=function(e,t){try{const i=e.split("://"),n=i[0];return`intent://${i[1]}/#Intent;scheme=${n};S.browser_fallback_url=${t||""};end`}catch(e){return!1}}(e,t);return s||!1}(e,t);return i||t}function P(e){if("number"==typeof e)return e;try{const[t,i,n]=e.split(":"),o=60*parseInt(t)*60,s=60*parseInt(i);return o+s+parseInt(n)}catch(e){return function(...e){s.debug.apply(console,e)}("videoInstreamVmaxAd: Wrong time specified in vast parser",e),0}}function M(e){var t,i,n,o,s,a;const{bid:r,vast:d,hasVideoAdElement:l=!1,imaCompanions:c={companions:[],companionResourceUrls:[]}}=e,{ext:u={},w:h=null,h:f=null}=r||{},p=null!==(t=null==u?void 0:u["ad-meta"])&&void 0!==t?t:{},{id:g=null,name:v=null,"campaign-meta":E={}}=p,{id:w=null,name:m=null,marketer:A={},order:I={}}=E,{id:D=null,name:S=null,agency:_=null,brand:b=null}=A||{},{id:R=null,name:O=null}=I,T=e=>"number"==typeof e&&e>=0?e:-1,k=function(e){try{return JSON.parse(e)}catch(e){return{}}}((null==r?void 0:r.adm)||"{}"),y=(null==k?void 0:k.title)||"",C=(null==k?void 0:k.ctaText)||"",L=(null==k?void 0:k.desc2)||(null==k?void 0:k.desc),M=!!(null==k?void 0:k.linkUrl)||!!(null==k?void 0:k.linkFallback),U=N((null==k?void 0:k.linkUrl)||"",(null==k?void 0:k.linkFallback)||""),W=(null==d?void 0:d.adSystem)||"",F=(null==d?void 0:d.adTitle)||"",V=(null==d?void 0:d.description)||L||"",x=(null===(i=null==d?void 0:d.linear)||void 0===i?void 0:i.skipoffset)||(null==d?void 0:d.skipOffset)?T(P((null===(n=null==d?void 0:d.linear)||void 0===n?void 0:n.skipoffset)||(null==d?void 0:d.skipOffset)||"")):"",K=(null==d?void 0:d.duration)?T(P(null==d?void 0:d.duration)):"",H=!!(null==d?void 0:d.deepLinkUrl)||!!(null==d?void 0:d.clickThrough);let G=(null==d?void 0:d.companions)||[],j=(null==d?void 0:d.companionResourceUrls)||[];const Y=N((null==d?void 0:d.deepLinkUrl)||"",(null==d?void 0:d.clickThrough)||""),{companions:B=[],companionResourceUrls:X=[]}=c;B.length&&(G=[...B],j=[...X]);return{adId:g,adName:v,campaignId:w,campaignName:m,marketerId:D,marketerName:S,brand:b,agency:_,orderId:R,orderName:O,qualifiedSignature:(null===(a=null===(s=null===(o=null==r?void 0:r.ext)||void 0===o?void 0:o.modules)||void 0===s?void 0:s.render)||void 0===a?void 0:a.signature)||"",width:h,height:f,adSystem:W,adTitle:y||F,adDescription:V,ctaText:C,skipOffset:x,ad
1Duration:K,isCTAAvailable:M||H,adClickUrl:U||Y,companionResourceUrls:j,hasVideoAdElement:l,companions:G}}d=new WeakMap,l=new WeakMap,c=new WeakMap,u=new WeakMap,h=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap,v=new WeakMap,E=new WeakMap,w=new WeakMap,r=new WeakSet,m=function(e){var n;const o=null===(n=null==e?void 0:e[0])||void 0===n?void 0:n.isIntersecting;"boolean"==typeof o&&(i(this,g,!0===o,"f"),t(this,r,"m",S).call(this))},A=function(){const e=window.document;i(this,v,!1===(null==e?void 0:e[t(this,p,"f")])||"visible"===(null==e?void 0:e.visibilityState),"f"),t(this,r,"m",S).call(this)},I=function(){i(this,v,!0,"f"),t(this,r,"m",S).call(this)},D=function(){const e=window.document;clearInterval(t(this,w,"f")),i(this,w,setTimeout(()=>{!1===(!1===(null==e?void 0:e[t(this,p,"f")])||"visible"===(null==e?void 0:e.visibilityState))&&(i(this,v,!1,"f"),t(this,r,"m",S).call(this))},1),"f")},S=function(){const e=t(this,g,"f")&&t(this,v,"f");if(t(this,E,"f")===e)return;const n=t(this,g,"f")&&t(this,v,"f"),o=t(this,n?c:u,"f"),s=t(this,n?h:f,"f");o.forEach(e=>e()),s.forEach(e=>e()),i(this,n?h:f,[],"f"),i(this,E,e,"f")},function(e){e.AD_COMPLETE="ad_complete",e.AD_COMPLETE_UNKNOWN="ad_complete_unknown"}(_||(_={})),function(e){e.AD_READY="adReady",e.AD_IMPRESSION="adImpression",e.AD_RENDERED="adRendered",e.AD_REFRESHED="adRefreshed",e.AD_ERROR="adError",e.AD_CLOSED="adClosed",e.AD_CLICKED="adClicked",e.AD_SKIPPED="adSkipped",e.AD_SKIPPABLE_STATE_CHANGE="adSkippableStateChange",e.AD_PAUSED="adPaused",e.AD_RESUMED="adResumed",e.AD_VIDEO_START="adVideoStart",e.AD_VIDEO_FIRST_QUARTILE="adVideoFirstQuartile",e.AD_VIDEO_MIDPOINT="adVideoMidpoint",e.AD_VIDEO_THIRD_QUARTILE="adVideoThirdQuartile",e.AD_VIDEO_COMPLETE="adVideoComplete",e.AD_VOLUME_CHANGED="adVolumeChanged",e.AD_MUTED="adMuted",e.AD_UNMUTED="adUnmuted",e.AD_PROGRESS="adProgress",e.AD_USER_CLOSE="adUserClose",e.AD_INSERTION_START="adInsertionStart",e.AD_INSERTION_END="adInsertionEnd",e.AD_MEDIA_EXPAND="onFullScreen",e.AD_MEDIA_COLLAPSE="onExitFullScreen",e.AD_REWARDED="adRewarded"}(b||(b={})),function(e){e.PERSONAL_COMPUTER="2",e.CONNECTED_TV="3",e.PHONE="4",e.TABLET="5",e.CONNECTED_DEVICE="6",e.SET_TOP_BOX="7"}(R||(R={})),function(e){e.GEO_PROFILE="geoProfile",e.USER_PROFILE="userProfile"}(O||(O={})),function(e){e.APP_ID="appId",e.ACCOUNT_KEY="accountKey",e.SECRET_KEY="secretKey",e.SDK_INITIALIZED="sdkInitialized",e.GEO_PROFILE="geoProfile",e.USER_PROFILE="userProfile",e.IS_APP="isApp",e.SOURCE_CONFIG_DATA="sourceConfig",e.ABORT="abort",e.PRIVATE_KEY="privateKey",e.KEY_ID="keyId",e.UPS_ENDPOINT="upsEndpoint",e.UPS_XAUTH="upsXAuth",e.DGS_ENDPOINT="dgsEndpoint",e.DGS_XAUTH="dgsXAuth",e.AS_ENDPOINT="adspotEndpoint",e.AS_XAUTH="adspotXAuth",e.UPS_FIRST_FETCH_DONE="upsFirstFetchDone",e.UPS_SERVICE_CALL="UPSServiceCall",e.DGS_SERVICE_CALL="DGSServiceCall"}(T||(T={})),function(e){e.UID="uid",e.GENDER="gender",e.AGE="age",e.COUNTRY="country",e.REGION="region",e.CITY="city",e.ZIPCODE="zip",e.KEYWORDS="keywords"}(k||(k={})),function(e){e.PLAY_ONCE="play_once",e.REPEAT="repeat"}(y||(y={}));class U{constructor(){C.set(this,new Map)}static getInstance(){return U.instance}set(e,i){"object"!=typeof e?t(this,C,"f").set(e,i):Object.entries(e).forEach(([e,i])=>{t(this,C,"f").set(e,i)})}get(e){var i;return"string"!=typeof e||0==e.length?t(this,C,"f"):null!==(i=t(this,C,"f").get(e))&&void 0!==i?i:null}get isSDKInitialized(){return Boolean(t(this,C,"f").get(T.SDK_INITIALIZED))}}C=new WeakMap,U.instance=new U;const W=U.getInstance();var F,V,x,K,H;!function(e){e.errorCode="{errorcode}",e.noFill="<NOFILL>",e.noFillError="[nofill.error]",e.demandPartnerSDKVersion="[demand.partner.sdkversion]",e.eventName="[event.name]",e.vastErrorCode="[vast.error]",e.OmidSDKVersion="[omid.partner.sdkversion]",e.eventAttribute1="[event.attribute1]",e.eventAttribute2="[event.attribute2]",e.eventAttribute3="[event.attribute3]",e.randomCcb="[random.ccb]",e.deviceIFA="[device.ifa]"}(F||(F={}));class G{static post(t){return e(this,void 0,void 0,function*(){const{url:e,payload:i,headers:n={},credentials:o}=t||{};let r={method:"POST",body:JSON.stringify(i)};o&&(r.credentials=o),n&&(r.headers=n);const d=new AbortController;r.signal=d.signal;return[fetch(e,r).then(e=>e.ok?e.json().catch(()=>Promise.reject(a("Invalid JSON response"))):e.text().then(t=>Promise.reject({message:`Error: ${e.status}`,status:e.status,body:t}))).catch(e=>(function(...e){s.log.apply(console,e)}("Error in Fetch.post",e),Promise.reject(e))),d]})}static postQuery(t,i){return e(this,void 0,void 0,function*(){return V.post({url:t,headers:{"Content-Type":"application/json"},payload:i})})}static get(t){return e(this,arguments,void 0,function*(e,t={}){return fetch(e,t).then(e=>e.json())})}static getPlainResponse(t){return e(this,arguments,void 0,function*(e,t={}){return fetch(e,t)})}static DeviceGeoService(){const e=W.get(T.ACCOUNT_KEY),t=W.get(T.DGS_ENDPOINT);W.get(T.DGS_XAUTH);const i=(t||"").replace("ACCOUNT_KEY",e);return V.get(i)}static UserProfileService(t){return e(this,void 0,void 0,function*(){const e=W.get(T.ACCOUNT_KEY),i=W.get(T.UPS_ENDPOINT),n=W.get(T.UPS_XAUTH),o=(i||"").replace("ACCOUNT_KEY",e),[s]=yield V.post({url:o,headers:{"X-AUTH":n},payload:t});return s})}static AdQuery(e){const{ACCOUNT_KEY:t,AS_ENDPOINT:i}=T,n=W.get(t)||"",o=W.get(i);return V.post({url:o.replace("ACCOUNT_KEY",n),payload:e,credentials:"include"})}static replaceAllMacros(e,t){const i=Object.keys(F);if(0===i.length)return e;const{ifa:n=""}=window.VmaxAdManager.getDevice().getPayload();
1return i.forEach(i=>{var o;const s=F[i];let a;a=s===F.randomCcb?Date.now().toString():s===F.deviceIFA?n:t&&(null===(o=t[s])||void 0===o?void 0:o.toString())||"";const r=new RegExp(this.escapeRegExp(s),"g");e=e.replace(r,a)}),t||i.forEach(t=>{const i=F[t],n=new RegExp(this.escapeRegExp(i),"g");e=e.replace(n,"")}),e}static escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}static FireTracker(i,n){return e(this,void 0,void 0,function*(){return new Promise((o,s)=>{if(!(a=i,"string"==typeof a&&a.length>0||(e=>Array.isArray(e))(i)))return s("No url to fire tracker");var a;Promise.all((Array.isArray(i)?i:[]).map(i=>e(this,void 0,void 0,function*(){i=this.replaceAllMacros(i,n),yield t(V,V,"m",x).call(V,i)}))).then(()=>o()).catch(()=>{s()})})})}}V=G,x=function(t){return e(this,void 0,void 0,function*(){return new Promise((i,n)=>e(this,void 0,void 0,function*(){try{const e=window.VmaxAdManager.getSite().getPayload(),{pageUrl:n,referrerUrl:o}=e,s=yield fetch(t,{method:"GET",headers:{Connection:"keep-alive","X-Requested-with":`${n}`},credentials:"include"});
1s.ok?i():a("Tracker request failed:",s.status,s.statusText)}catch(e){a("Error while firing the tracker:",e),n(e)}}))})};class j{constructor(e=new Map){K.set(this,new Map),i(this,K,e,"f")}fireTracker(i,n){return e(this,void 0,void 0,function*(){const e=t(this,K,"f").get(i);e&&(yield G.FireTracker(e,n))})}}K=new WeakMap,function(e){e.IMPRESSION="impressionViewable",e.REWARD_SLOT_CLOSED="rewardedSlotClosed",e.REWARD_SLOT_GRANTED="rewardedSlotGranted",e.SLOT_ONLOAD="slotOnload",e.SLOT_RENDER_ENDED="slotRenderEnded",e.SLOT_RENDER_RECIEVED="slotResponseReceived",e.SLOT_VISIBILTY_CHANGED="slotVisibilityChanged"}(H||(H={}));var Y,B=H;!function(e){e.IMPRESSION="impression",e.NO_FILL="nofill",e.FILL="fill",e.CLICK="click",e.ERROR="error",e.START="start",e.FIRST_QUARTILE="firstQuartile",e.MIDPOINT="midpoint",e.THIRD_QUARTILE="thirdQuartile",e.COMPLETE="complete",e.PAUSE="pause",e.RESUME="resume",e.SKIP="skip",e.MUTE="mute",e.UNMUTE="unmute",e.SKIPPABLE_STATE_CHANGE="skippableStateChange"}(Y||(Y={}));var X,Q,z,$,q,J,Z,ee,te,ie,ne,oe,se,ae,re,de,le,ce,ue,he,fe,pe,ge,ve,Ee,we,me,Ae,Ie,De,Se,_e,be,Re=Y;return Q=new WeakMap,z=new WeakMap,$=new WeakMap,q=new WeakMap,J=new WeakMap,Z=new WeakMap,ee=new WeakMap,te=new WeakMap,ie=new WeakMap,ne=new WeakMap,oe=new WeakMap,se=new WeakMap,ae=new WeakMap,re=new WeakMap,de=new WeakMap,le=new WeakMap,ce=new WeakMap,ue=new WeakMap,he=new WeakMap,fe=new WeakMap,pe=new WeakMap,ge=new WeakMap,ve=new WeakMap,Ee=new WeakMap,we=new WeakMap,X=new WeakSet,me=function(e){},Ae=function(){const{IMPRESSION:e,NO_FILL:n,FILL:o}=Re,{burl:s="",nurl:a="",lurl:r=""}=t(this,Q,"f")||{};s&&t(this,ae,"f").set(e,[s]),r&&t(this,ae,"f").set(n,[r]),a&&t(this,ae,"f").set(o,[a]),i(this,J,new j(t(this,ae,"f")),"f")},Ie=function(){i(this,ee,new L(t(this,z,"f")),"f"),t(this,ee,"f").enter(t(this,ie,"f")),t(this,ee,"f").exit(t(this,ne,"f"))},De=function(){var e;null===(e=t(this,Z,"f"))||void 0===e||e.AdImpression()},Se=function(n){return e(this,void 0,void 0,function*(){var e,o;window.googletag=window.googletag||{cmd:[]},window.googletag.cmd.push(()=>{var e;i(this,le,(null===(e=window.googletag.defineSlot(t(this,re,"f"),t(this,de,"f"),t(this,q,"f")))||void 0===e?void 0:e.addService(window.googletag.pubads()))||null,"f"),window.googletag.pubads().addEventListener("slotRequested",e=>{}),window.googletag.pubads().addEventListener("slotRequested",e=>{}),window.googletag.pubads().collapseEmptyDivs(),window.googletag.enableServices(),window.googletag.pubads().disableInitialLoad(),window.googletag.display(t(this,q,"f")),n({isFilled:!1})}),i(this,ce,{[F.demandPartnerSDKVersion]:(null===(o=null===(e=window.googletag)||void 0===e?void 0:e.getVersion)||void 0===o?void 0:o.call(e))||""},"f"),t(this,X,"m",_e).call(this)})},_e=function(){window.googletag.cmd.push(()=>{window.googletag.pubads().addEventListener(B.SLOT_RENDER_RECIEVED,e=>{e.slot.getSlotElementId(),t(this,q,"f")}),window.googletag.pubads().addEventListener(B.IMPRESSION,e=>{if(e.slot.getSlotElementId()===t(this,q,"f")){const{advertiserId:n="",campaignId:o=""}=e.slot.getResponseInformation();i(this,ue,{adId:n,campaignId:o},"f"),t(this,X,"m",De).call(this)}}),window.googletag.pubads().addEventListener(B.SLOT_ONLOAD,e=>{e.slot.getSlotElementId(),s.debug("Google Ad Display(Slot loaded):",e.slot.getResponseInformation())})})},be=function(e){return e.map(e=>e.split("x").map(e=>parseInt(e,10)))},class{constructor(){X.add(this),Q.set(this,void 0),this.isContainerRequiredForCache=!0,z.set(this,void 0),$.set(this,void 0),q.set(this,""),J.set(this,void 0),Z.set(this,void 0),ee.set(this,void 0),te.set(this,""),ie.set(this,()=>{}),ne.set(this,()=>{}),oe.set(this,()=>{}),se.set(this,()=>{}),ae.set(this,new Map),re.set(this,""),de.set(this,void 0),le.set(this,void 0),this.canRefresh=!0,this.shouldProcessRefresh=!0,ce.set(this,void 0),ue.set(this,void 0),this.isAdLoaded=!1,this.isAdDisplayedInCarousel=!1,he.set(this,!0),fe.set(this,!1),pe.set(this,!1),ge.set(this,void 0),ve.set(this,void 0),Ee.set(this,void 0),we.set(this,void 0),this.onAdCompleteCallbacks=[]}getAllSignatures(){return["nw.gambanner","nw.gambannerphoneandtablet","nw.gamlargebanner","nw.gammediumrectangle","nw.gamfullsizebanner","nw.gamleaderboard"]}prepare(e){return new Promise((n,o)=>{var a;try{const{bid:s,container:r,listeners:d}=e||{};
1if(i(this,z,r,"f"),!window.googletag||!window.googletag.cmd)return o("No googletag found");i(this,$,document.createElement("div"),"f"),i(this,q,`gpt-slot-${Date.now()}-${Math.floor(1e4*Math.random())}`,"f"),t(this,$,"f").id=t(this,q,"f"),document.body.appendChild(t(this,$,"f")),t(this,$,"f").style.display="none",i(this,Q,s,"f");const l=(null===(a=t(this,Q,"f"))||void 0===a?void 0:a.adm)||"";if(!l||""===l)return Promise.reject("No ad object found");t(this,X,"m",Ae).call(this);const c=JSON.parse(l),{adnetwork_params:u}=c,{adsizes:h,adunitid:f}=u;i(this,re,f,"f"),i(this,de,t(this,X,"m",be).call(this,h),"f");const{AdPaused:p,AdResumed:g,AdClicked:v}=d||{};"function"==typeof p&&i(this,ne,p,"f"),"function"==typeof g&&i(this,ie,g,"f"),"function"==typeof v&&i(this,oe,v,"f"),i(this,Z,d,"f"),t(this,X,"m",Se).call(this,n)}catch(e){return s.warn(e),t(this,X,"m",me).call(this,"6"),o(e)}})}render(e){return new Promise((n,o)=>{const{container:a}=e||{};t(this,$,"f").style.display="block",a?(a.appendChild(t(this,$,"f")),window.googletag.cmd.push(()=>{t(this,le,"f")&&window.googletag.pubads().refresh([t(this,le,"f")]),window.googletag.pubads().addEventListener(B.SLOT_RENDER_ENDED,e=>{if(e.slot.getSlotElementId()===t(this,q,"f")){if(s.log("google display",e),e.isEmpty)return void o(new Error("Ad Empty!"));i(this,ue,{adId:(null==e?void 0:e.advertiserId)||"",campaignId:(null==e?void 0:e.campaignId)||""},"f"),t(this,X,"m",Ie).call(this),n({isFilled:!0})}})})):o(new Error("Container not found"))})}destroy(){var e,n,o;t(this,le,"f")&&window.googletag.destroySlots([t(this,le,"f")]),null===(n=null===(e=t(this,$,"f"))||void 0===e?void 0:e.parentNode)||void 0===n||n.removeChild(t(this,$,"f")),null===(o=t(this,ee,"f"))||void 0===o||o.destroy(),i(this,ee,null,"f"),i(this,Q,{},"f"),i(this,ie,()=>{},"f"),i(this,ne,()=>{},"f"),i(this,oe,()=>{},"f"),i(this,J,{},"f"),i(this,ae,new Map,"f")}closeAd(){var e;return null===(e=t(this,Z,"f"))||void 0===e||e.AdClosed(),this.canRefresh=!1,this.destroy(),Promise.resolve()}getVmaxAdInfo(){const e=M({bid:Object.assign(Object.assign({},t(this,Q,"f")),t(this,ue,"f"))});return Object.assign({},e)}getAdMarkup(){var e;return(null===(e=t(this,Q,"f"))||void 0===e?void 0:e.adm)||""}get adHeight(){var e;return null===(e=t(this,Q,"f"))||void 0===e?void 0:e.h}get adWidth(){var e;return t(this,de,"f")[0][0]||(null===(e=t(this,Q,"f"))||void 0===e?void 0:e.w)}onAdComplete(e){return"function"!=typeof e?(s.warn("onAdComplete: Invalid callback"),this):(this.onAdCompleteCallbacks.push(e),this)}setBorderRadius(e){if(!e)return this;i(this,ge,e,"f")}setCardElevation(e){if(!e)return this;i(this,ve,e,"f")}onAdLoaded(e){return"function"!=typeof e?(s.warn("onAdLoaded: Invalid callback"),this):(this.onAdLoadedCallbacks.push(e),this)}setAdHeight(e){return e?(i(this,Ee,e,"f"),this):this}setAdIsDisplayedInCarousel(e){return this.isAdDisplayedInCarousel=e,this}setAdFocus(){return this.onAdCompleteCallbacks.forEach(e=>e(_.AD_COMPLETE_UNKNOWN)),this}setAdWidth(){return this}}});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.