/*! * SDK version: 5.8.16 * Commit: 3ec894bd */ (()=>{"use strict";var e={902:(e,t,i)=>{i.r(t),i.d(t,{AbstractSearchStrategyAuto:()=>Xe,ActiveEventHandler:()=>v,ActivityHolder:()=>w,ActivityTracker:()=>A,ActivityTrackerImpl:()=>_,ActivityTrackerImplGecko:()=>N,ActivityTrackerImplIEEdge:()=>f,ActivityTrackerImplSafari:()=>S,AnxVVApi:()=>_t,AppNexusDisplayTag:()=>tt,AppNexusRequestFormatter:()=>Ze,AppNexusSDKMraidContainer:()=>me,AppNexusVideoRequestFormatter:()=>et,AppNexusVideoTag:()=>Qe,AppNexusVideoTriggerManager:()=>lt,BrowserSpecificGecko:()=>X,BrowserSpecificIE:()=>L,BrowserSpecificWebkit:()=>V,BrowserWindow:()=>c,Clearing100Pv1STrigger:()=>pt,Clearing50Pv2STrigger:()=>mt,ClearingEventVideoTriggerManager:()=>Tt,ClearingEventsManager:()=>Et,ContainerImpl:()=>oe,ContainerUtils:()=>I,CustomTrigger:()=>st,CustomViewResult:()=>gt,DOM:()=>ae,DOMImpl:()=>Z,DOMImplStandard:()=>ee,DebugTools:()=>l,DeletedTrackedObjectData:()=>Je,ElementVisibilityCalculator:()=>we,EventListenerWrapper:()=>O,ExceptionManager:()=>C,ExceptionSafeCommand:()=>d,FocusOutEventHandler:()=>y,FrameTools:()=>M,FullscreenVisibilityCalculator:()=>Re,HundredPercentOneSecondTrigger:()=>ct,HybridAppContainer:()=>Te,HybridAppHelper:()=>Ie,IABTrigger:()=>nt,IABViewResult:()=>ut,IntersectionObserverVisibilityCalculator:()=>Ve,LimitedVisibilityCalculator:()=>Me,LoaderHelper:()=>Ge,MetricsAggregator:()=>Ke,MicrosoftMapleContainer:()=>Ee,ModuleManager:()=>m,MopubSDKContainer:()=>ge,MousePositionTracker:()=>D,MraidContainerUtil:()=>ue,NativeEvent:()=>Ae,NativeEventList:()=>Ne,NativeEventsTriggerManager:()=>dt,NotInitializedContainer:()=>le,NotSupportedContainer:()=>ce,OmidVideo:()=>St,OpenMeasurementSdkContainer:()=>he,PageShowEventHandler:()=>b,Point:()=>T,Position:()=>re,PositionImpl:()=>te,PositionImplMozilla:()=>se,PositionImplSafari:()=>ie,ReferrerDetection:()=>Ce,RequestSender:()=>_e,SearchStrategy:()=>Le,SearchStrategyAutoAnchor:()=>je,SearchStrategyCssSelector:()=>ze,SearchStrategyDomEltVar:()=>He,SearchStrategyLimitedOmid:()=>Be,SearchStrategyNode:()=>xe,SearchStrategyNodeId:()=>Ue,SearchStrategyNodeIdChildren:()=>We,SearchStrategyPrebidNative:()=>Fe,SearchStrategyVideo:()=>ke,SessionStartOmidEvent:()=>Oe,Settings:()=>g,SharedSession:()=>E,SmaatoSDKNotSupportedContainer:()=>de,Tag:()=>ye,TagManager:()=>De,TagMetricsAggregator:()=>$e,TagURL:()=>Se,Timer:()=>u,TrackDisplay:()=>W,TrackDisplayIE11XD:()=>j,TrackedObject:()=>qe,Tracking:()=>bt,TrackingImpl:()=>k,TrackingImplEdge:()=>z,TrackingImplGecko40:()=>H,TrackingImplIE11:()=>B,TrackingImplStandard:()=>F,TrackingImplWebkit:()=>x,TrackingLoader:()=>U,TrackingLoaderEdgeXD:()=>Y,TrackingLoaderGecko40XD:()=>K,TrackingLoaderIE11XD:()=>G,TrackingLoaderWebkitXD:()=>q,TriggerManager:()=>ot,UtilsMisc:()=>h,Video100Pv50PercentDurationOr15SecondsTrigger:()=>at,VideoAppNexusTagURL:()=>fe,VideoIABTrigger:()=>rt,VideoMetricsAggregator:()=>Ye,VideoOmidEvent:()=>pe,VideoTrackedObject:()=>it,ViewPort:()=>Pe,ViewPortTop:()=>be,ViewType:()=>ht,VisibilityChangeEventHandler:()=>P,VisibleElementSeeker:()=>ve,WindowHierarchy:()=>R,XDOM:()=>ne,XDOMImpl:()=>$,XDOMImplIE11:()=>Q,XDOMImplStandard:()=>J,XTEEngine:()=>Pt,XTEImpl:()=>Ot,XTEImplAppNexusDisplay:()=>ft,XTEImplAppNexusDisplayApp:()=>Nt,XTEImplOMSDKVideo:()=>vt,XTEImplVPAIDWrapper:()=>At,XdrDisplayApi:()=>It,XdrViewApi:()=>Ct,getParentElement:()=>n,getUserAgent:()=>p,hashCode:()=>s,isJSContext:()=>r});const s=e=>{let t=0;for(let i=0;i{let t=e.parentNode;return t&&1===t.nodeType||(t=null),t},r=()=>"undefined"==typeof window;var a,o;class c{static getWindowOuterSize(e){const t=e.outerWidth,i=e.outerHeight;return new T(t,i)}static initVisibilityAPI(){const e=a.getWindow().document;let t=null,i=null;void 0!==e.hidden?(t="hidden",i="visibilitychange"):void 0!==e.mozHidden?(t="mozHidden",i="mozvisibilitychange"):void 0!==e.msHidden?(t="msHidden",i="msvisibilitychange"):void 0!==e.webkitHidden&&(t="webkitHidden",i="webkitvisibilitychange"),a.documentHiddenVarName=t,a.visibilityChangeEventName=i}static getPageSize(e){const t=e.document,i=t.body,s=t.documentElement,n=s?s.scrollHeight:0,r=s?s.offsetHeight:0,a=s?s.scrollWidth:0,o=s?s.offsetWidth:0,c=i?i.scrollHeight:0,l=i?i.offsetHeight:0,d=i?i.scrollWidth:0,h=i?i.offsetWidth:0,u=Math.max(n,r,c,l),g=Math.max(a,o,d,h);return new T(Math.round(g),Math.round(u))}static getWindowScroll(e){const t=e.pageXOffset||e.document.documentElement.scrollLeft||e.document.body.scrollLeft,i=e.pageYOffset||e.document.documentElement.scrollTop||e.document.body.scrollTop;return new T(t,i)}static getClientSize(e){const t=e.document.documentElement.clientWidth,i=e.document.documentElement.clientHeight;return new T(t,i)}static getBodyElement(e){return e.document.body}static getBodyElementTagNameChecked(e){const t=this.getBodyElement(e);return t&&"BODY"===ne.getAttribute(t,"tagName")?t:null}static getLocation(e){return e.location.href}static getScreenWidth(){return screen.width}static getScreenHeight(){return screen.height}static getScreenSize(){return r()?T.minusOne:new T(this.getScreenWidth(),this.getScreenHeight())}static hasFocus(e){return!e.document.hasFocus||e.document.hasFocus()}static isHiddenWithWindow(e){return this.documentHiddenVarName&&e.document[this.documentHiddenVarName]}static isHidden(){return this.isHiddenWithWindow(this.getTopAccessibleWindow())}static isDisplayNoneFrame(e){try{let t=e.frameElement;for(;t;){if("none"===t.style.display)return!0;t=t.parent}}catch(e){C.notify(C.EXCEPTION_40)}return!1}static isCompatMode(e){return"CSS1Compat"!==e.document.compatMode}static getDocument(e){return e.document}shouldFlushOnPageHide(){return!1}getSingleFlushSpecificDelay(){return 0}static getScreenX(){return screenX}static getScreenY(){return screenY}static getWindowSize(e){const t=e.innerWidth,i=e.innerHeight;return new T(t,i)}static getScreenPosition(){return new T(this.getScreenX(),this.getScreenY())}static getWindow(){return a.getNamespace().$wnd}static getJSNaminglnt(){return"_lntv"}static getNamespace(){return window[a.getJSNaminglnt()]}static getTopAccessibleWindow(){return this.topAccessibleWindow}static setTopAccessibleWindow(e){this.topAccessibleWindow=e}static getVisibilityChangeEventName(){return this.visibilityChangeEventName}static isAppUserAgent(){const e=this.isSpotify();return e&&C.notify(C.EXCEPTION_1312),e}static isSpotify(){return-1!==navigator.userAgent.toLowerCase().indexOf("spotify")}}a=c,r()||a.initVisibilityAPI();class l{static debug(e){l.debugNative(this.getTimeStamp(g.getCurrentTime())+" "+e)}static debugNative(e){const t=c.getNamespace();t.debug?t.debug+="\n":t.debug="",t.debug+=e,"undefined"!=typeof console&&console.log(e)}static getTimeStamp(e){const t=c.getWindow();if(t.performance&&t.performance.now){let e="["+t.performance.now();return e=e.substring(0,e.indexOf(".")+4),e+"]"}const i=new Date(e);let s="[";const n=i.getHours(),r=i.getMinutes(),a=i.getSeconds(),o=i.getMilliseconds();return s+=(n<10?"0":"")+n+":",s+=(r<10?"0":"")+r+":",s+=(a<10?"0":"")+a+".",s+=(o<10?"00":o<100?"0":"")+o+"]",s}static debugDelayed(e){l.delayedDebug||(l.delayedDebug=[]),l.delayedDebug.push(e)}static flushDelayedDebug(){for(let e=0;ee?h.parseInt(i[e]):0,n=s.length>e?h.parseInt(s[e]):0;if(t>n)return!0;if(t=i.length}static isStrictlyInferiorVersion(e,t){return!h.isSupOrEqualVersion(e,t)}}class u{constructor(e,t){this.isRepeating=!1,this.timerId=0,this.millis=0,this.timerCallback=e,this.exceptionCode=t}static getDefaultTimerNamespace(){return c.getWindow()}static setTimerNamespace(e){u.timerNamespace=e,u.recreateTimers()}static clearInterval(e){u.timerNamespace.clearInterval(e)}static clearTimeout(e){u.timerNamespace.clearTimeout(e)}static createInterval(e,t){return u.timerNamespace.setInterval((()=>{e.fire()}),t)}static createTimeout(e,t){return u.timerNamespace.setTimeout((()=>{e.fire()}),t)}cancel(){this.isRepeating?u.clearInterval(this.timerId):u.clearTimeout(this.timerId),u.timers=u.timers.filter((e=>e!==this))}schedule(e){if(e<=0)throw new Error("Cannot schedule a repeating timer with a period of zero or less.");this.cancel(),this.millis=e,this.isRepeating=!1,this.timerId=u.createTimeout(this,e),u.timers.push(this)}scheduleRepeating(e){if(e<=0)throw new Error("Cannot schedule a repeating timer with a period of zero or less.");this.cancel(),this.millis=e,this.isRepeating=!0,this.timerId=u.createInterval(this,e),u.timers.push(this)}fire(){this.isRepeating||(u.timers=u.timers.filter((e=>e!==this)));try{this.timerCallback()}catch(e){this.exceptionCode&&C.notify(this.exceptionCode)}}static closeRemainingTimers(){for(;u.timers.length>0;)u.timers[0].cancel()}static recreateTimers(){for(let e=0;ee.x?this.x:e.x,this.y>e.y?this.y:e.y)}min(e){return new T(this.x0?C.exceptions.join("|"):""}static notifyWithException(e,t){C.notify(e)}}C.EXCEPTION_2=2,C.EXCEPTION_3=3,C.EXCEPTION_4=4,C.EXCEPTION_5=5,C.EXCEPTION_6=6,C.EXCEPTION_9=9,C.EXCEPTION_11=11,C.EXCEPTION_13=13,C.EXCEPTION_16=16,C.EXCEPTION_19=19,C.EXCEPTION_21=21,C.EXCEPTION_23=23,C.EXCEPTION_24=24,C.EXCEPTION_28=28,C.EXCEPTION_32=32,C.EXCEPTION_33=33,C.EXCEPTION_36=36,C.EXCEPTION_37=37,C.EXCEPTION_38=38,C.EXCEPTION_39=39,C.EXCEPTION_40=40,C.EXCEPTION_41=41,C.EXCEPTION_53=53,C.EXCEPTION_57=57,C.EXCEPTION_61=61,C.EXCEPTION_72=72,C.EXCEPTION_73=73,C.EXCEPTION_75=75,C.EXCEPTION_76=76,C.EXCEPTION_79=79,C.EXCEPTION_80=80,C.EXCEPTION_81=81,C.EXCEPTION_82=82,C.EXCEPTION_83=83,C.EXCEPTION_84=84,C.EXCEPTION_85=85,C.EXCEPTION_86=86,C.EXCEPTION_88=88,C.EXCEPTION_90=90,C.EXCEPTION_93=93,C.EXCEPTION_95=95,C.EXCEPTION_99=99,C.EXCEPTION_100=100,C.EXCEPTION_103=103,C.EXCEPTION_104=104,C.EXCEPTION_107=107,C.EXCEPTION_109=109,C.EXCEPTION_110=110,C.EXCEPTION_111=111,C.EXCEPTION_112=112,C.EXCEPTION_113=113,C.EXCEPTION_114=114,C.EXCEPTION_120=120,C.EXCEPTION_121=121,C.EXCEPTION_122=122,C.EXCEPTION_124=124,C.EXCEPTION_125=125,C.EXCEPTION_126=126,C.EXCEPTION_127=127,C.EXCEPTION_128=128,C.EXCEPTION_129=129,C.EXCEPTION_142=142,C.EXCEPTION_147=147,C.EXCEPTION_148=148,C.EXCEPTION_152=152,C.EXCEPTION_153=153,C.EXCEPTION_154=154,C.EXCEPTION_155=155,C.EXCEPTION_161=161,C.EXCEPTION_162=162,C.EXCEPTION_163=163,C.EXCEPTION_166=166,C.EXCEPTION_167=167,C.EXCEPTION_168=168,C.EXCEPTION_169=169,C.EXCEPTION_171=171,C.EXCEPTION_172=172,C.EXCEPTION_173=173,C.EXCEPTION_174=174,C.EXCEPTION_175=175,C.EXCEPTION_176=176,C.EXCEPTION_180=180,C.EXCEPTION_181=181,C.EXCEPTION_182=182,C.EXCEPTION_183=183,C.EXCEPTION_185=185,C.EXCEPTION_186=186,C.EXCEPTION_187=187,C.EXCEPTION_188=188,C.EXCEPTION_189=189,C.EXCEPTION_190=190,C.EXCEPTION_191=191,C.EXCEPTION_192=192,C.EXCEPTION_200=200,C.EXCEPTION_201=201,C.EXCEPTION_202=202,C.EXCEPTION_401=401,C.EXCEPTION_402=402,C.EXCEPTION_403=403,C.EXCEPTION_404=404,C.EXCEPTION_405=405,C.EXCEPTION_406=406,C.EXCEPTION_407=407,C.EXCEPTION_408=408,C.EXCEPTION_409=409,C.EXCEPTION_204=204,C.EXCEPTION_205=205,C.EXCEPTION_206=206,C.EXCEPTION_207=207,C.EXCEPTION_1001=1001,C.EXCEPTION_1003=1003,C.EXCEPTION_1005=1005,C.EXCEPTION_1006=1006,C.EXCEPTION_1008=1008,C.EXCEPTION_1009=1009,C.EXCEPTION_1010=1010,C.EXCEPTION_1012=1012,C.EXCEPTION_1013=1013,C.EXCEPTION_1014=1014,C.EXCEPTION_1015=1015,C.EXCEPTION_1016=1016,C.EXCEPTION_1017=1017,C.EXCEPTION_1018=1018,C.EXCEPTION_1019=1019,C.EXCEPTION_1020=1020,C.EXCEPTION_1021=1021,C.EXCEPTION_1022=1022,C.EXCEPTION_1035=1035,C.EXCEPTION_1030=1030,C.EXCEPTION_1097=1097,C.EXCEPTION_1135=1135,C.EXCEPTION_1134=1134,C.EXCEPTION_1140=1140,C.EXCEPTION_1141=1141,C.EXCEPTION_1143=1143,C.EXCEPTION_1144=1144,C.EXCEPTION_1145=1145,C.EXCEPTION_1146=1146,C.EXCEPTION_1150=1150,C.EXCEPTION_1151=1151,C.EXCEPTION_1160=1160,C.EXCEPTION_1161=1161,C.EXCEPTION_1162=1162,C.EXCEPTION_1165=1165,C.EXCEPTION_1170=1170,C.EXCEPTION_1171=1171,C.EXCEPTION_1172=1172,C.EXCEPTION_1173=1173,C.EXCEPTION_1174=1174,C.EXCEPTION_1175=1175,C.EXCEPTION_1179=1179,C.EXCEPTION_1180=1180,C.EXCEPTION_1181=1181,C.EXCEPTION_1182=1182,C.EXCEPTION_1184=1184,C.EXCEPTION_1185=1185,C.EXCEPTION_1186=1186,C.EXCEPTION_1187=1187,C.EXCEPTION_1190=1190,C.EXCEPTION_1201=1201,C.EXCEPTION_1202=1202,C.EXCEPTION_1203=1203,C.EXCEPTION_1205=1205,C.EXCEPTION_1206=1206,C.EXCEPTION_1207=1207,C.EXCEPTION_1208=1208,C.EXCEPTION_1209=1209,C.EXCEPTION_1210=1210,C.EXCEPTION_1211=1211,C.EXCEPTION_1212=1212,C.EXCEPTION_1213=1213,C.EXCEPTION_1214=1214,C.EXCEPTION_1215=1215,C.EXCEPTION_1300=1300,C.EXCEPTION_1304=1304,C.EXCEPTION_1305=1305,C.EXCEPTION_1306=1306,C.EXCEPTION_1307=1307,C.EXCEPTION_1308=1308,C.EXCEPTION_1309=1309,C.EXCEPTION_1310=1310,C.EXCEPTION_1311=1311,C.EXCEPTION_1312=1312,C.EXCEPTION_1313=1313,C.EXCEPTION_1314=1314,C.EXCEPTION_1315=1315,C.EXCEPTION_1316=1316,C.EXCEPTION_1317=1317,C.EXCEPTION_1318=1318,C.EXCEPTION_1320=1320,C.EXCEPTION_1330=1330,C.EXCEPTION_1340=1340,C.EXCEPTION_1341=1341,C.EXCEPTION_1400=1400,C.EXCEPTION_1420=1420,C.EXCEPTION_1421=1421,C.EXCEPTION_1422=1422,C.EXCEPTION_1423=1423,C.EXCEPTION_1500=1500,C.EXCEPTION_1501=1501,C.EXCEPTION_1502=1502;class _{registerActivity(e){this.scanNregisterFocusHandlerOnWindows(e);const t=c.getDocument(e),i=c.getVisibilityChangeEventName();i&&ne.addEventListenerWithExceptionSafeCommand(t,i,new P(e)),M.isInIframe()||ne.addEventListenerWithEventListenerWrapper(e,t,"keydown",new O(C.EXCEPTION_80,(e=>{this.isKeyCodeFromHuman(e)&&A.onActiveEvent()})))}scanNregisterFocusHandlerOnWindows(e){if(M.isWindowDocumentAccessible(e))if(c.getBodyElementTagNameChecked(e))this.registerHandlerOnWindow(e);else{const t=new u((()=>{const i=c.getBodyElement(e);i&&(t.cancel(),"BODY"===ne.getAttribute(i,"nodeName")&&this.registerHandlerOnWindow(e))}),C.EXCEPTION_84);t.scheduleRepeating(80)}try{this.scanFrames(e)}catch(e){C.notify(C.EXCEPTION_167)}}scanFrames(e){const t=e.frames;for(let e=0;e{A.isUnloadEventCatched()||(A.setUnloadEventCatched(!0),U.trkFinalize(Ze.RR_BEFORE_UNLOAD_REQUEST))}));I.canUseBeforeUnloadCallback()&&ne.addEventListenerWithExceptionSafeCommand(e,"beforeunload",t);const i=new d(C.EXCEPTION_93,(()=>{A.isUnloadEventCatched()||(A.setUnloadEventCatched(!0),U.trkFinalize(Ze.RR_UNLOAD_REQUEST))}));ne.addEventListenerWithExceptionSafeCommand(e,"unload",i);const s=new d(C.EXCEPTION_93,(()=>{A.isUnloadEventCatched()||(A.setUnloadEventCatched(!0),U.trkFinalize(Ze.RR_PAGE_HIDE_REQUEST))}));ne.addEventListenerWithExceptionSafeCommand(e,"pagehide",s)}registerHandlerOnWindow(e){try{const t=c.getDocument(e),i=new v,s=U.trackingLoader.getMousePositionTracker();ne.addEventListenerWithEventListenerWrapper(e,t,"mousemove",s),ne.addEventListenerWithExceptionSafeCommand(t,"click",i),ne.addEventListenerWithExceptionSafeCommand(e,"scroll",i),ne.addEventListenerWithExceptionSafeCommand(e,"focus",new b)}catch(e){C.notify(C.EXCEPTION_168)}}isKeyCodeFromHuman(e){const t=e;return(t.charCode||t.keyCode)>31}}class S extends _{registerHandlerOnWindow(e){super.registerHandlerOnWindow(e),this.addBlurEventHandler(e,new y)}addBlurEventHandler(e,t){e.addEventListener("blur",(e=>{"object"==typeof e.target&&t.execute()}),!1)}}class f extends _{registerActivity(e){super.registerActivity(e),this.registerFocusEvents(e)}registerFocusEvents(e){ne.addEventListenerWithExceptionSafeCommand(e,"focus",new d(C.EXCEPTION_95,(()=>{c.hasFocus(c.getTopAccessibleWindow())&&A.onPageShowEvent()})));const t=c.getDocument(e);ne.addEventListenerWithExceptionSafeCommand(t,"focusout",new y)}}class N extends _{registerHandlerOnWindow(e){super.registerHandlerOnWindow(e);const t=c.getDocument(e);this.addBlurEventHandler(t,new y)}addBlurEventHandler(e,t){e.addEventListener("blur",(e=>{"object"==typeof e.target&&t.execute()}),!1)}}class A{constructor(){const e=p();A.impl="ie11"===e||"edge15"===e?new f:"gecko40"===e?new N:new S,A.registerActivity(c.getTopAccessibleWindow()),r()||A.impl.registerWindowUnloadHandler()}static registerActivity(e){try{r()||A.impl.registerActivity(e)}catch(e){C.notify(C.EXCEPTION_82)}}static registerHandlers(){try{new A}catch(e){C.notify(C.EXCEPTION_83)}}static isUnloadEventCatched(){return A.unloadEventCatched}static setUnloadEventCatched(e){A.unloadEventCatched=e}static onActiveEvent(){A.focusOutDelayTimer.cancel(),U.trackingLoader.onBrowserActiveEvent()}static onPageShowEvent(){A.focusOutDelayTimer.cancel(),U.trackingLoader.onBrowserActiveEvent()}static onFocusoutEvent(){A.focusOutDelayTimer.schedule(A.INACTIVITY_THREADHOLD)}static onPageHideEvent(){A.focusOutDelayTimer.cancel(),A.unloadEventCatched||U.trackingLoader.onBrowserInactiveEvent()}}A.unloadEventCatched=!1,A.INACTIVITY_THREADHOLD=100,A.focusOutDelayTimer=new u((()=>{U.trackingLoader&&U.trackingLoader.onBrowserInactiveEvent()}),C.EXCEPTION_86);class v extends d{constructor(){super(C.EXCEPTION_88)}callback(){A.onActiveEvent()}}class P extends d{constructor(e){super(C.EXCEPTION_99),this.window=e}callback(){c.isHiddenWithWindow(this.window)?(A.onPageHideEvent(),h.isMobile()&&U.sendIntermediateRequest()):A.onPageShowEvent()}}class b extends d{constructor(){super(C.EXCEPTION_104)}callback(){A.onPageShowEvent()}}class D extends O{constructor(){super(C.EXCEPTION_75),this.lastMousePosition=null,this.lastMousePositionOnScreen=null}handleEvent(e){if(e){let t,i,s=0,n=0,r=null,a=null;try{const o=e;t=o.screenX,i=o.screenY,s=o.clientX,n=o.clientY,r=o.target,r||(r=o.srcElement),a=o.view}catch(e){t=0,i=0}!this.lastMousePositionOnScreen||this.lastMousePositionOnScreen.getX()===t&&this.lastMousePositionOnScreen.getY()===i||A.onActiveEvent(),this.lastMousePositionOnScreen=new T(t,i),M.isCrossDomain()||(!a&&r&&r.ownerDocument&&(a=ne.getElementWindow(r)),a&&(this.lastMousePosition=new T(s,n),this.lastMousePosition=M.getPositionRelativeToViewport(this.lastMousePosition,a)))}}}class y extends d{constructor(){super(C.EXCEPTION_103)}callback(){c.hasFocus(c.getTopAccessibleWindow())||A.onFocusoutEvent()}}class w{constructor(e){this.active=!c.isHidden()&&w.hasFocus(),this.lastShotTime=g.getInitializationTime(),this.lastEventTime=g.getInitializationTime()}static hasFocus(){return!(!M.isCrossDomain()&&!U.getContainer())||c.hasFocus(c.getTopAccessibleWindow())}onActiveEvent(){this.setLastEventTime(g.getCurrentTime()),this.active||(this.setActive(!0),this.setLastShotTime(this.lastEventTime))}setLastShotTime(e){this.lastShotTime=e}setLastEventTime(e){this.lastEventTime=e}setActive(e){this.active=e}onInactiveEvent(){this.isActive()&&this._onInactiveEvent(g.getCurrentTime())}_onInactiveEvent(e){this.setActive(!1),this.setLastEventTime(e)}isActive(){return I.isOMIDContextWithoutCreativeAccess()||this.active}updateActivity(){const e=g.getCurrentTime();this.setLastShotTime(e)}getLastEventTime(){return this.lastEventTime}getLastShotTime(){return this.lastShotTime}}class R{static init(e){R.windows=e;for(let e=0;e=0?R.windows[t]:null}static getFrameElement(e,t){return R.getFrameElementNative(e,t)}static getFrameElementNative(e,t){if(t.parent===e)return t.frameElement;const i=e.document.getElementsByTagName("IFRAME");for(let e=0;e0?s:M.recursiveDomIdSearch(t,i)}static recursiveDomIdSearch(e,t){const i=ae.getWindowElementsById(e,t);return i.length>0?i:M.scanFrames(e,t)}static scanFrames(e,t){const i=e.frames;for(let e=0;e0)return s}return[]}static searchByCssSelectorInAllFrames(e,t,i){return ae.querySelector(e,i)||M.recursiveCssSelectorSearch(t,i)}static recursiveCssSelectorSearch(e,t){return ae.querySelector(e,t)||M.scanFramesCssSelector(e,t)}static scanFramesCssSelector(e,t){const i=e.frames;for(let e=0;e10)return C.notify(C.EXCEPTION_61),null}return e}}M.SIMPLE_PAGE=0,M.FRAME_WITH_PARENT_ACCESS=1,M.IFRAME_WITH_PARENT_ACCESS=2,M.FRAME_OR_IFRAME_WITH_NO_PARENT_ACCESS=3,M.frameType=0;class V{static getCurrentScroll(e){const t=e.document.createEvent("MouseEvents"),i=e.top;return t.initMouseEvent("mouseover",!0,!0,i),new T(t.pageX,t.pageY)}}class L{static getScreenLeft(){return c.getWindow().screenLeft}static hasScreenLeft(){const e=c.getWindow().screenLeft;return void 0!==e&&"unknown"!=typeof e}static getScreenTop(){return c.getWindow().screenTop}static hasScreenTop(){const e=c.getWindow().screenTop;return void 0!==e&&"unknown"!=typeof e}static getScreenX(){return c.getWindow().screenX}static getScreenY(){return c.getWindow().screenY}}class X{static getIframePosition(e){const t=Math.round(e.mozInnerScreenX-e.screen.left),i=Math.round(e.mozInnerScreenY-e.screen.top);return new T(t,i)}}class k{createTrackingLoader(){return new U}createTrackingLoaderXD(){return this.createTrackingLoader()}}class F extends k{}class W{constructor(){this.durationDelayed=0}createViewPortFromTop(e){return null}getPercentVisible(){const e=U.getContainer();return e?e.getVisibleRatio():1}static isRealEvent(){return W._isRealEvent}beforeShotCheck(e){return e+=this.durationDelayed,this.isTrackingInitialized()?this.durationDelayed=0:(this.durationDelayed=e,e=0),e}afterCheckDuration(){}isTrackingInitialized(){const e=U.getContainer();return!e||e.isTrackingInitialized()}isTrackingSupported(){return!0}}W._isRealEvent=!0;class U{getContentPanel(){return this.contentPanel}constructor(){this.contentPanel=null,this.shotTimer=new u((()=>{this.checkDurationAfterShot()}),C.EXCEPTION_2),this.shotTimerInterval=bt.getUseIntersectionObserver()?U.SHOT_TIMER_INTERVAL:U.SHOT_TIMER_INTERVAL_FAST,this._isActiveAtLeastOne=!1,this.mousePositionTracker=new D,U.trackingLoader=this}start(){E.registerOrUpdateSessionId(),this.initInAppContext(),this.activityHolder=new w(c.getTopAccessibleWindow()),A.registerHandlers(),this.initTrackDisplay(),Pt.processTags(),this.checkDuration(),this.shotTimer.scheduleRepeating(this.shotTimerInterval);const e=c.getWindow();Ge.registerNewScript(),Ge.registerScriptStatusFunction(e),Ge.registerActivityStatusFunction(e),Ge.registerTrkFinalize(),Ge.registerTrkForceIntermediateRequest(),r()?C.notify(C.EXCEPTION_1309):Ge.checkJsSignals()}initTrackDisplay(){this.trackDisplay=new W}checkDurationAfterShot(){Pt.refreshContent(),this.searchElements(),this.checkDuration()}searchElements(){for(let e=0;e=0;e--)De.getTagAtIndex(e).sendIntermediateRequest(Ze.RR_MOBILE_INTERMEDIATE_REQUEST)}}static sendNonMeasurableWebviewRequest(){U.trackingLoader.checkDuration();for(let e=De.getTagCount()-1;e>=0;e--)De.getTagAtIndex(e).sendIntermediateRequest(Ze.RR_NM_REQUEST)}static trkFinalize(e){U.trackingLoader.checkDuration();for(let t=De.getTagCount()-1;t>=0;t--)De.getTagAtIndex(t).shutdown(e);try{u.closeRemainingTimers()}catch(e){C.notify(C.EXCEPTION_11)}}getLastShotTime(){return this.activityHolder.getLastShotTime()}refreshActivity(){c.isHiddenWithWindow(c.getWindow())||this.onBrowserActiveEvent()}static isActive(){return U.trackingLoader.activityHolder.isActive()}static inactiveEvent(){U.trackingLoader.onBrowserInactiveEvent()}isTrackingSupported(){return(!U.container||U.container.isAppSupported())&&(!this.trackDisplay||this.trackDisplay.isTrackingSupported())}isActiveAtLeastOne(){return this._isActiveAtLeastOne}getCrossDomainIframePosition(){return T.minusOne}getMousePositionTracker(){return this.mousePositionTracker}static getContainer(){return U.container}static setContainer(e){U.container=e}static checkDurationStatic(){U.trackingLoader.checkDurationUnplanned()}checkDurationUnplanned(){this.shotTimer.cancel(),this.shotTimer.scheduleRepeating(this.shotTimerInterval),this.checkDuration()}initInAppContext(){try{const e=c.getTopAccessibleWindow();if(Ee.isMicrosoftSDK(e)){const e=new Ee;e.init(),U.setContainer(e)}else if(he.isOmidSupported()){const e=new he;U.setContainer(e),e.init()}else if(me.hasAnjamNamespaceNative(e))me.initAppNexusSDKMraidContainer();else if(de.isAvailable(e))U.setContainer(new de);else if(ge.isAvailable(e)){const e=new ge;e.init(),U.setContainer(e)}else if(Se.isInAppSupplyType()||c.isAppUserAgent()){const e=Ie.getHybridAppContainerIfAvailable();if(e)U.setContainer(e);else if(M.isCrossDomain()&&this.isTrackingSupported())me.checkAppNexusSDKContext();else{const e=new ce;U.setContainer(e)}}}catch(e){C.notify(C.EXCEPTION_176)}}static getLastReferenceElement(){return U.lastReferenceElement}static setLastReferenceElement(e){U.lastReferenceElement=e}}U.softRequestSent=!1,U.SHOT_TIMER_INTERVAL=1e3,U.SHOT_TIMER_INTERVAL_FAST=100,U.lastReferenceElement=null,U.container=null;class x extends k{createTrackingLoaderXD(){return new q}}class B extends k{createTrackingLoaderXD(){return new G}}class H extends k{createTrackingLoaderXD(){return new K}}class z extends k{createTrackingLoaderXD(){return new Y}}class j extends W{constructor(){super(),this.lastScroll=T.zero,this.hasReceivedOneEventAtLeast=!1;const e=c.getTopAccessibleWindow();this.divElement=this.getOrCreateReferenceElement(e),ne.addEventListenerWithEventListenerWrapper(e,this.divElement,"click",new O(C.EXCEPTION_180,(e=>{e&&this.refreshScrollPosition(e)})));try{this.doClick(this.divElement)}catch(e){C.notify(C.EXCEPTION_181)}}getOrCreateReferenceElement(e){let t=U.getLastReferenceElement();return t||(t=ye.createFakeImageElementNative(e,null,!0)),t}getAvailableScreenSize(e){return new T(e.outerWidth,e.outerHeight)}refreshScrollPosition(e){let t=null;L.hasScreenLeft()&&L.hasScreenTop()&&(t=new T(e.x+L.getScreenLeft(),e.y+L.getScreenTop()),t.equals(this.lastScroll)||(A.onActiveEvent(),this.lastScroll=t)),e.stopPropagation(),e.preventDefault(),this.hasReceivedOneEventAtLeast=!0}doClick(e){e.click()}getPercentVisible(){try{this.doClick(this.divElement)}catch(e){C.notify(C.EXCEPTION_181)}let e=this.getAvailableScreenSize(c.getTopAccessibleWindow());e=e.minus(new T(j.SCREEN_MARGIN_RIGHT,j.SCREEN_MARGIN_BOTTOM));const t=c.getWindowSize(c.getTopAccessibleWindow());let i=null;if(!L.hasScreenLeft()||!L.hasScreenTop())return 0;i=new T(L.getScreenLeft()-j.IFRAME_MARGIN_LEFT-L.getScreenX(),L.getScreenTop()-j.IFRAME_MARGIN_TOP-L.getScreenY());const s=T.zero.max(i.plus(t).min(e.plus(this.lastScroll)).minus(i.max(this.lastScroll))),n=t.getX()*t.getY(),r=n>0?s.getX()*s.getY()/n:0;return super.getPercentVisible()*r}isTrackingInitialized(){return this.hasReceivedOneEventAtLeast&&super.isTrackingInitialized()}}j.IFRAME_MARGIN_LEFT=8,j.IFRAME_MARGIN_TOP=92,j.SCREEN_MARGIN_RIGHT=33,j.SCREEN_MARGIN_BOTTOM=102;class q extends U{constructor(){super(...arguments),this.scrollPosition=T.zero}checkDuration(){try{const e=V.getCurrentScroll(c.getTopAccessibleWindow());e.equals(this.scrollPosition)||(this.scrollPosition=e,A.onActiveEvent())}catch(e){C.notify(C.EXCEPTION_109)}super.checkDuration()}}class G extends U{initTrackDisplay(){this.trackDisplay=new j}getCrossDomainIframePosition(){if(L.hasScreenLeft()&&L.hasScreenTop()){const e=L.getScreenTop(),t=L.getScreenLeft();return new T(t,e)}return T.minusOne}}class K extends U{constructor(){super(...arguments),this.iframePosition=X.getIframePosition(c.getTopAccessibleWindow())}initTrackDisplay(){super.initTrackDisplay(),this.originalIframePosition=X.getIframePosition(c.getTopAccessibleWindow()),this.iframePosition=this.originalIframePosition}getCrossDomainIframePosition(){return this.originalIframePosition}checkDuration(){const e=X.getIframePosition(c.getTopAccessibleWindow());this.iframePosition.equals(e)||(this.iframePosition=e,A.onActiveEvent()),super.checkDuration()}}class Y extends U{getCrossDomainIframePosition(){const e=L.getScreenTop(),t=L.getScreenLeft();return new T(t,e)}}class ${isCSSvisible(e,t){try{const i=e.getComputedStyle;if(ne.isFunctionNative(i)){const e=i(t,"");return!(!e||!e.visibility)&&"visible"===e.visibility}C.notify(C.EXCEPTION_1035)}catch(e){return C.notify(C.EXCEPTION_23),!1}return!0}getElementWindow(e){return e.ownerDocument.defaultView}addEventListenerActive(e,t,i){e.addEventListener(t,(e=>{i.setEvent(e),i.execute()}))}addEventListenerWithEventListenerWrapper(e,t,i,s){t.addEventListener(i,(e=>{s.setEvent(e),s.execute()}),{passive:!0})}addEventListenerWithExceptionSafeCommand(e,t,i){e.addEventListener(t,(e=>{i.execute()}),{passive:!0})}}class J extends ${}class Q extends J{addEventListenerWithEventListenerWrapper(e,t,i,s){t.addEventListener(i,(e=>{s.setEvent(e),s.execute()}))}addEventListenerWithExceptionSafeCommand(e,t,i){e.addEventListener(t,(()=>{i.execute()}))}}class Z{getElementAttribute(e,t){return e.getAttribute(t)||null}getWindowElementsById(e,t){const i=[],s=e.document.getElementsByTagName("*");for(let e=0;e{const e=p();ne.impl="ie11"===e?new Q:new J})();class re{static getWindowAbsolutePosition(e,t){return re.impl.getWindowAbsolutePosition(e,t)}}(()=>{const e=p();re.impl="gecko40"===e||"ie11"===e?new se:new ie})();class ae{static getElementAttribute(e,t){return ae.impl.getElementAttribute(e,t)}static getWindowElementById(e,t){return ae.impl.getWindowElementById(e,t)}static getWindowElementsById(e,t){return ae.impl.getWindowElementsById(e,t)}static getElementProperty(e,t){return ae.impl.getElementProperty(e,t)}static getFirstChild(e){return ae.impl.getFirstChild(e)}static getLastChild(e){return ae.impl.getLastChild(e)}static getNextSibling(e){return ae.impl.getNextSibling(e)}static getPreviousSibling(e){return ae.impl.getPreviousSibling(e)}static getParent(e){return ae.impl.getParent(e)}static querySelector(e,t){return ae.impl.querySelector(e,t)}}ae.impl=new ee;class oe{constructor(){this.partnerName=null,this.adSize=T.minusOne,this.adPosition=T.minusOne,this.isSdkContainerUsableCache=!1,this.visibleRatio=0}isTrackingInitialized(){return this.isSdkContainerUsableCache}getVisibleRatio(){return this.visibleRatio}shutDown(){this.isAppSupported()&&!this.isTrackingInitialized()&&C.notify(C.EXCEPTION_1160)}static hasMraidNamespace(e){return void 0!==e.mraid&&"function"==typeof e.mraid.getState}getPartnerName(){return this.partnerName}getAdSize(){return this.adSize}getAdPosition(){return this.adPosition}getDebugGeometricInfo(e){return[]}}class ce extends oe{init(){}isAppSupported(){return!1}isTrackingInitialized(){return!1}getContainerType(){return I.NOT_SUPPORTED_SDK}isUsable(){return!1}getVisibleRatioRefreshed(){return 0}refreshSdkStatus(){}}class le extends oe{init(){}isAppSupported(){return!0}isTrackingInitialized(){return!1}getContainerType(){return I.NOT_INITIALIZED_SDK}isUsable(){return!1}getVisibleRatioRefreshed(){return 0}refreshSdkStatus(){}}class de extends ce{getContainerType(){return I.SMAATO_SDK}static isAvailable(e){return h.elementHasDefined(e,"smaato_bridge")}}class he extends oe{constructor(){super(...arguments),this.hasReceivedGeometryChangeEventAtLeastOnce=!1,this.sessionStart=null,this.verificationClient=null,this.hasRegisteredNewTag=!1,this.adLastObstructionSize=T.minusOne,this.adLastObstructionPosition=T.minusOne,this.nbObstruction=0,this.nonVisibleReasons="",this.callBackGeometryChange=new O(C.EXCEPTION_201,(e=>{if(this.hasEventTimestamp(e)){const t=this.extractEventTimestamp(e);this.isPastEvent(t)||U.checkDurationStatic()}this.hasReceivedGeometryChangeEventAtLeastOnce=!0,this.sessionStart&&this.sessionStart.isOMSDKForWeb()&&this.sessionStart.getCreativeElement()?(this.visibleRatio=1,C.notify(C.EXCEPTION_1341)):this.hasPercentageInView(e)&&(this.visibleRatio=this.extractPercentageInView(e)),this.refreshAdSizeAndPosition(e),this.refreshObstruction(e),this.refreshReasons(e)})),this.sessionObserverCallback=new O(C.EXCEPTION_202,(e=>{const t=this.getEventType(e);if("sessionStart"===t){if(this.sessionStart=new Oe(e),this.sessionStart.getOmidParameters().length>0){const e=this.sessionStart.getOmidParameters().replace(g.getScriptId(),"");Pt.handleNewTagURL(this.sessionStart.getCreativeElement(),e)}if(De.getTagCount()>0)for(let e=0;e{t.setEvent(e),t.execute()}),i)}static getOmidVerificationClientModule(){return m.getJsModule("OmidVerificationClient")}initVerificationClient(e){const t=Object.keys(e)[0],i=c.getNamespace();return i.omc=new e[t],i.omc}hasPercentageInView(e){return void 0!==e&&void 0!==e.data&&void 0!==e.data.adView&&void 0!==e.data.adView.percentageInView}hasEventTimestamp(e){return void 0!==e&&void 0!==e.timestamp}extractEventTimestamp(e){return e.timestamp}isPastEvent(e){return(new Date).valueOf()-e>100}extractPercentageInView(e){return.01*e.data.adView.percentageInView}refreshAdSizeAndPosition(e){if(void 0!==e&&void 0!==e.data&&void 0!==e.data.adView){const t=e.data.adView.geometry;if(void 0!==t){const e=t.width,i=t.height,s=t.x,n=t.y;void 0!==e&&void 0!==i&&(this.adSize=new T(Math.round(e),Math.round(i))),void 0!==s&&void 0!==n&&(this.adPosition=new T(Math.round(s),Math.round(n)))}}}refreshReasons(e){if(void 0!==e&&void 0!==e.data&&void 0!==e.data.adView){const t=e.data.adView.reasons;if(void 0!==t&&t.length>0){let e="";for(let i=0;i0){const t=e[i-1],s=t.width,n=t.height,r=t.x,a=t.y;void 0!==s&&void 0!==n&&(this.adLastObstructionSize=new T(Math.round(s),Math.round(n))),void 0!==r&&void 0!==a&&(this.adLastObstructionPosition=new T(Math.round(r),Math.round(a))),this.nbObstruction=i}}}}isAppSupported(){return!this.sessionStart||this.sessionStart.isSupportedPartner()}static isOmidSupported(){return!!he.getOmidVerificationClientModule()&&(r()?he.isOmidSupportedNativeJSContext():!(Ct.isXdrViewApiHasBeenUsedAlready()&&!Pt.isBannerOrNativeCreative())&&(!!Pt.isOmidByDefault()||!!he.isOmidAvailableNative(c.getTopAccessibleWindow())&&Pt.canHandleOmsdk()))}static isOmidSupportedNativeJSContext(){return void 0!==window.omid}static isOmidAvailableNative(e){return void 0!==e.omid||void 0!==window.omidVerificationProperties}isUsable(){return!0}getPartnerName(){return this.sessionStart?this.sessionStart.getPartnerName():null}getContainerType(){return this.sessionStart?this.sessionStart.isOMIDContextWithoutCreativeAccess()?I.OM_SDK_LIMITED:I.OM_SDK_FULL:I.OM_SDK_UNKNOWN}getVisibleRatioRefreshed(){return this.visibleRatio}shutDown(){super.shutDown(),this.sessionStart||C.notify(C.EXCEPTION_1304),this.hasReceivedGeometryChangeEventAtLeastOnce||C.notify(C.EXCEPTION_1305)}isAppnexusPartner(){return!!this.sessionStart&&this.sessionStart.isAppnexusPartner()}setVideoListener(e){ne.addEventListenerActive(this.verificationClient,"video",e)}isAsync(e){return!!this.sessionStart&&this.sessionStart.isAsync(e)}getLastAdObstructionSize(){return this.adLastObstructionSize}getLastAdObstructionPosition(){return this.adLastObstructionPosition}getNbObstruction(){return this.nbObstruction}getNonVisibleOmsdkReason(){return this.nonVisibleReasons}getDebugGeometricInfo(e){const t=[];return t.push("obsn"+e+this.nbObstruction),this.nbObstruction>0&&(t.push("obsx"+e+this.adLastObstructionPosition.getX()),t.push("obsy"+e+this.adLastObstructionPosition.getY()),t.push("obsw"+e+this.adLastObstructionSize.getX()),t.push("obsh"+e+this.adLastObstructionSize.getY())),t.push("adx"+e+this.adPosition.getX()),t.push("ady"+e+this.adPosition.getY()),t.push("adw"+e+this.adSize.getY()),t.push("adh"+e+this.adSize.getY()),""!==this.getNonVisibleOmsdkReason()&&t.push("nvomr"+e+this.getNonVisibleOmsdkReason()),t}}he.VENDOR_KEY="appnexus.com-omid";class ue{static addMraidEventListenerNative(e,t,i){const s=e=>{i.execute()};return e.mraid.addEventListener(t,s),s}static addMraidEventListenerNativeWithEvent(e,t,i){const s=e=>{i.setEvent(e),i.execute()};return e.mraid.addEventListener(t,s),s}static isLoadingState(e){return"loading"===e.mraid.getState()}static hasPositionUsableNative(e){if(!ue.isUsableNative(e))return!1;const t=e.mraid.getCurrentPosition(),i=e.mraid.getScreenSize();return!!t&&!!i&&void 0!==t.x&&void 0!==t.y&&void 0!==t.width&&void 0!==t.height&&void 0!==i.width&&void 0!==i.height}static isUsableNative(e){return void 0!==e.mraid&&"function"==typeof e.mraid.getState&&"function"==typeof e.mraid.getCurrentPosition&&"function"==typeof e.mraid.getScreenSize&&"function"==typeof e.mraid.isViewable&&!ue.isLoadingState(e)}static isMraidViewable(e){return e.mraid.isViewable()}static getVisibleRatioRefreshed(){const e=c.getTopAccessibleWindow();if("hidden"===e.mraid.getState())return 0;if(!ue.isMraidViewable(e))return 0;if(!ue.hasPositionUsableNative(e))return 0;const t=e.mraid.getCurrentPosition(),i=e.mraid.getScreenSize();return Math.max(0,Math.min(t.x+t.width,i.width)-Math.max(t.x,0))*Math.max(0,Math.min(t.y+t.height,i.height)-Math.max(t.y,0))/(t.width*t.height)}}class ge extends oe{constructor(){super(...arguments),this.callBackMraidReady=new d(C.EXCEPTION_169,(()=>{this.onReadyEvent()})),this.callBackViewableDataChange=new d(C.EXCEPTION_174,(()=>{this.refreshSdkStatus(),U.checkDurationStatic()}))}init(){if(this.isAppSupported()){const e=c.getTopAccessibleWindow();ue.isLoadingState(e)?ue.addMraidEventListenerNative(e,"ready",this.callBackMraidReady):ue.addMraidEventListenerNative(e,"viewableDataChange",this.callBackViewableDataChange)}}onReadyEvent(){ue.addMraidEventListenerNative(c.getTopAccessibleWindow(),"viewableDataChange",this.callBackViewableDataChange)}getContainerType(){return I.MOPUB_SDK}isAppSupported(){return h.isSafariMobile()&&ge.hasMraidNamespace(c.getTopAccessibleWindow())}static isAvailable(e){return!!h.elementHasDefined(e,"mopubFinishLoad")||!M.isCrossDomain()&&-1!==e.location.href.indexOf("//ads.mopub.com/")}refreshSdkStatus(){if(this.isSdkContainerUsableCache||this.isAppSupported()&&(M.isCrossDomain()||this.isUsable()&&(this.isSdkContainerUsableCache=!0)),this.isSdkContainerUsableCache)try{this.visibleRatio=this.getVisibleRatioRefreshed()}catch(e){C.notify(C.EXCEPTION_161),this.visibleRatio=0}}isUsable(){return ue.isUsableNative(c.getTopAccessibleWindow())}getVisibleRatioRefreshed(){return ue.getVisibleRatioRefreshed()}}class Ee extends oe{constructor(){super(...arguments),this.appHasFocus=!1,this.adOccluded=!1,this.adOnScreenPercentage=0,this.adOpacity=0,this.hasBeenVisibleOnce=!1,this.hasBeenInFocusOnce=!1,this.hasReceivedViewableDataChangeEventOnce=!1,this.callBackOnReady=new d(C.EXCEPTION_173,(()=>{this.onReadyEvent()})),this.callBackViewableDataChange=new O(C.EXCEPTION_175,(e=>{C.notify(C.EXCEPTION_1174),this.hasReceivedViewableDataChangeEventOnce=!0,this.refreshMicrosoftMraidStatus(e,c.getTopAccessibleWindow())}))}init(){if(this.isAppSupported()){const e=c.getTopAccessibleWindow();if(ue.isLoadingState(e))try{ue.addMraidEventListenerNative(e,"ready",this.callBackOnReady)}catch(e){C.notify(C.EXCEPTION_169)}else this.onReadyEvent()}}refreshSdkStatus(){if(!this.isSdkContainerUsableCache&&this.isAppSupported()&&(this.isSdkContainerUsableCache=!0),this.isSdkContainerUsableCache)try{!this.hasBeenVisibleOnce&&this.adOnScreenPercentage>0&&(this.hasBeenVisibleOnce=!0,C.notify(C.EXCEPTION_1172)),!this.hasBeenInFocusOnce&&this.appHasFocus&&(this.hasBeenInFocusOnce=!0,C.notify(C.EXCEPTION_1173)),this.visibleRatio=this.getVisibleRatioRefreshed()}catch(e){C.notify(C.EXCEPTION_161),this.visibleRatio=0}}onReadyEvent(){if(this.isSdkVersionSupported(c.getTopAccessibleWindow()))try{ue.addMraidEventListenerNativeWithEvent(c.getTopAccessibleWindow(),"viewableDataChange",this.callBackViewableDataChange)}catch(e){C.notify(C.EXCEPTION_174)}else U.sendNonMeasurableWebviewRequest()}getMapleDataForDebug(){return`appHasFocus=${this.appHasFocus}&adOccluded=${this.adOccluded}&adOnScreenPercentage=${this.adOnScreenPercentage}&adOpacity=${this.adOpacity}&is_basic_visi=${this.isMraidBasicVisible(c.getTopAccessibleWindow())}&get_perc=${this.getVisibleRatio()}`}refreshMicrosoftMraidStatus(e,t){const i=JSON.parse(e);this.appHasFocus=i.appHasFocus,this.adOccluded=i.adOccluded,this.adOnScreenPercentage=i.adOnScreenPercentage,this.adOpacity=i.adOpacity,this.visibleRatio=this.getVisibleRatioRefreshed(),U.checkDurationStatic()}isAppSupported(){const e=c.getTopAccessibleWindow();return!this.hasSdkVersionAvailable(e)||this.isSdkVersionSupported(e)}hasSdkVersionAvailable(e){try{return void 0!==e.maple.getSdkVersion()}catch(e){return!1}}isSdkVersionSupported(e){try{return void 0!==e.maple.getSdkVersion()&&e.maple.getSdkVersion().sdkVersion.split(".")[0]>=8}catch(e){return!1}}static isMicrosoftSDK(e){return void 0!==e.maple&&"function"==typeof e.maple.getSdkVersion&&void 0!==e.mraid&&"function"==typeof e.mraid.getState&&"function"==typeof e.mraid.addEventListener}getVisibleRatioRefreshed(){return!this.adOccluded&&this.appHasFocus&&0!==this.adOpacity&&this.isMraidBasicVisible(c.getTopAccessibleWindow())?this.adOnScreenPercentage:0}isMraidBasicVisible(e){return"hidden"!==e.mraid.getState()}isUsable(){return!0}getContainerType(){return I.MICROSOFT_SDK}shutDown(){super.shutDown(),this.isAppSupported()&&this.isTrackingInitialized()&&!this.hasReceivedViewableDataChangeEventOnce&&C.notify(C.EXCEPTION_1175)}}class Te extends oe{init(){this.visibleRatio=1}isAppSupported(){return!0}isTrackingInitialized(){return!0}getContainerType(){return I.HYBRID_APP}isUsable(){return!0}refreshSdkStatus(){}getVisibleRatioRefreshed(){return 1}}class me extends oe{constructor(){super(...arguments),this.callBackInitWithMraidFrequencyUpdate=new d(C.EXCEPTION_186,(()=>{this.refreshSdkStatus(),this.updateMraidRefreshFrequency(c.getTopAccessibleWindow(),me.mraidRefreshFrequency)})),this.callBackInitWithoutMraidFrequencyUpdate=new d(C.EXCEPTION_186,(()=>{this.refreshSdkStatus()})),this.callbackReadyEvent=null,this.callbackStateChangedEvent=null}static initAppNexusSDKMraidContainer(){me.setMraidRefreshFrequency(me.DEFAULT_MRAID_REFRESH_FREQUENCY);const e=new me;e.init(),U.setContainer(e)}init(){M.isCrossDomain()||this.insertMraid();const e=c.getTopAccessibleWindow(),t=me.hasMraidNamespace(e)&&ue.isLoadingState(e);0!==me.mraidRefreshFrequency&&h.isSafariMobile()?t?(this.callbackReadyEvent=ue.addMraidEventListenerNative(e,"ready",this.callBackInitWithMraidFrequencyUpdate),this.callbackStateChangedEvent=ue.addMraidEventListenerNative(e,"stateChange",this.callBackInitWithoutMraidFrequencyUpdate)):me.hasMraidNamespace(e)&&(this.updateMraidRefreshFrequency(e,me.mraidRefreshFrequency),this.callbackStateChangedEvent=ue.addMraidEventListenerNative(e,"stateChange",this.callBackInitWithoutMraidFrequencyUpdate)):t&&(this.callbackReadyEvent=ue.addMraidEventListenerNative(e,"ready",this.callBackInitWithoutMraidFrequencyUpdate),this.callbackStateChangedEvent=ue.addMraidEventListenerNative(e,"stateChange",this.callBackInitWithoutMraidFrequencyUpdate))}refreshSdkStatus(){if(this.isSdkContainerUsableCache||this.isAppSupported()&&this.isUsable()&&(this.isSdkContainerUsableCache=!0),this.isSdkContainerUsableCache)try{this.visibleRatio=this.getVisibleRatioRefreshed()}catch(e){C.notify(C.EXCEPTION_161),this.visibleRatio=0}}static checkAppNexusSDKContext(){const e=new le;U.setContainer(e),me.randomKey=h.getRandomId();const t=new O(C.EXCEPTION_172,(e=>{if(e){const t=e;me.processAppNexusSdkPostMessage(t)}})),i=c.getWindow();ne.addEventListenerWithEventListenerWrapper(i,i,"message",t);try{i.top.postMessage(`anjam:Ping?cb=${me.randomKey}`,"*")}catch(e){C.notify(C.EXCEPTION_171)}new u((()=>{if(!me.hasInsertedAnjam()){const e=new ce;U.setContainer(e),U.sendNonMeasurableWebviewRequest()}}),C.EXCEPTION_172).schedule(me.MAXIMUM_INIT_TIME_FOR_ANJAM)}insertMraid(){try{this.isAppSupported()&&this.shouldInsertMraid(c.getTopAccessibleWindow())&&(this.insertMraidNative(c.getTopAccessibleWindow()),C.notify(C.EXCEPTION_1165))}catch(e){C.notify(C.EXCEPTION_162)}}insertMraidNative(e){const t=document.createElement("script");t.setAttribute("src",this.getMraidUrl()),t.async=!0,(e.document.head||e.document.documentElement.childNodes[0]).appendChild(t)}shouldInsertMraid(e){return void 0===e.mraid||void 0===e.mraid.getState||"loading"===e.mraid.getState()}isAppSupported(){const e=me.hasAnjamNamespaceNative(c.getTopAccessibleWindow()),t=M.isCrossDomain()&&g.getCurrentTime()-g.getInitializationTime()0}catch(e){C.notify(C.EXCEPTION_73)}e&&(C.notify(C.EXCEPTION_1214),Ie.outerWindowMetricsAreNotSetOnLoad=!1)}}static getHybridAppContainerIfAvailable(){let e=0;try{e=Ie.getBrowserSurface()}catch(e){C.notify(C.EXCEPTION_79)}if(e>=.7&&e<=1.15){e>1?C.notify(C.EXCEPTION_1212):C.notify(C.EXCEPTION_1202);const t=new Te;return t.init(),t}return 0===e?C.notify(C.EXCEPTION_1201):e>1.15?C.notify(C.EXCEPTION_1211):C.notify(C.EXCEPTION_1203),null}static getBrowserSurface(){const e=c.getScreenSize().surface();if(e<=0)return C.notify(C.EXCEPTION_1215),0;const t=c.getWindowOuterSize(c.getTopAccessibleWindow());if(t.surface()>0)return C.notify(C.EXCEPTION_1205),t.surface()/e;if(!M.isCrossDomain()){Ie.outerWindowMetricsAreNotSetOnLoad=!0;const t=Ie.needInitialScaleMultiplication();if(Ie.getMetaViewportContent()){const i=Ie.getViewportWidth(),s=Ie.getViewportInitialScale();if(""!==i&&"device-width"===i||-1===s){if(s>0){const i=c.getClientSize(c.getTopAccessibleWindow()).surface()/e;return s>=1?(C.notify(C.EXCEPTION_1208),i):(C.notify(C.EXCEPTION_1209),t?i*s*s:i)}return C.notify(C.EXCEPTION_1207),0}{C.notify(C.EXCEPTION_1210);const i=c.getWindowSize(c.getTopAccessibleWindow());return t?i.surface()*s*s/e:i.surface()/e}}return C.notify(C.EXCEPTION_1206),0}return 0}static needInitialScaleMultiplication(){try{const e=c.getWindow(),t=void 0!==e.statusbar&&!e.statusbar.visible&&void 0===e.PerformanceMeasure;return t&&C.notify(C.EXCEPTION_1213),!t}catch(e){return!0}}static getMetaViewportContent(){const e=c.getTopAccessibleWindow().document.getElementsByTagName("meta");for(let t=0;t1)return e[1]}return""}static getViewportWidth(){return Ie.getViewportMeta("width")}static getViewportInitialScale(){const e=Ie.getViewportMeta("initial-scale");return""===e?-1:h.isNumeric(e)?h.parseFloat(e):-1}}Ie.outerWindowMetricsAreNotSetOnLoad=!1;class Ce{static manageReferrerDetection(e){try{const t=Ce.injectReferrerDetection(),i=e.getParameter("rdcb");i?(C.notify(C.EXCEPTION_1320),_e.sendRequestWithoutCookieAndReplaceSessionId(i+"&"+t,!1)):C.notify(C.EXCEPTION_126)}catch(e){C.notify(C.EXCEPTION_127)}}static injectReferrerDetection(){const e=function(e){this.rdParams=e};return e.prototype={constructor:e,walkAncestors:function(e){try{if(!window.location.ancestorOrigins)return;for(let t=0,i=window.location.ancestorOrigins.length;t=0;c--){try{s=e[c].location}catch(e){C.notify(C.EXCEPTION_121)}if(s)i=encodeURIComponent(s),t.push(i),o||(o=i);else if(0!==c){n=e[c-1];try{r=n.referrer,a=n.ancestor}catch(e){C.notify(C.EXCEPTION_122)}r?(i=encodeURIComponent(r),t.push(i),o||(o=i)):a?(i=encodeURIComponent(a),t.push(i),o||(o=i)):t.push(null)}else t.push(null)}return{stack:t,detectUrl:o}},getLevels:function(){const e=this.walkUpWindows((function(e,t){try{t.push({referrer:e.document.referrer||null,location:e.location.href||null,isTop:e===window.top})}catch(i){t.push({referrer:null,location:null,isTop:e===window.top})}}));return this.walkAncestors((function(t,i){e[i].ancestor=t})),e},getRefererInfo:function(){let e="";try{const t=this.getLevels(),i=t.length-1,s=!!t[i].location||i>0&&!!t[i-1].referrer,n=this.getPubUrlStack(t);e=this.rdParams.rdRef+"="+n.detectUrl+"&"+this.rdParams.rdTop+"="+s+"&"+this.rdParams.rdIfs+"="+i+"&"+this.rdParams.rdStk+"="+n.stack}catch(t){e="",C.notify(C.EXCEPTION_124)}return e}},function(t){let i="";try{return new e({rdRef:"bdref",rdTop:"bdtop",rdIfs:"bdifs",rdStk:"bstk"}).getRefererInfo()}catch(e){i="",C.notify(C.EXCEPTION_125)}return i}()}}class _e{static sendRequestWithoutCookieAndReplaceSessionId(e,t){e=e.replace("[alenty_sessionid]",E.getSessionId()),_e.sendRequestWithoutCookie(e,t)}static useOmidToSendRequest(){return r()||I.isOmidSdk()&&Se.hasConfigToSendRequestWithOmidApi()}static sendRequestWithoutCookie(e,t){try{_e.useOmidToSendRequest()?_e.sendRequestWithOMSDK(e):_e.sendWithBeaconAPI(e)||_e.sendRequestWithoutCookieNative(c.getTopAccessibleWindow(),e,t)}catch(e){C.notify(C.EXCEPTION_37)}g.getRequestSentList().push(e)}static sendWithBeaconAPI(e){return!!navigator.sendBeacon&&navigator.sendBeacon(e)}static sendRequestWithOMSDK(e){const t=e.replace(/\|/g,"%7C");c.getNamespace().omc.sendUrl(t)}static sendRequestWithoutCookieNative(e,t,i){const s=new XMLHttpRequest;try{s.open("GET",t,!i)}catch(i){return void _e.sendRequestNative(e,t)}try{s.send(null)}catch(e){C.notify(C.EXCEPTION_76)}}static sendRequestNative(e,t){e.document.createElement("img").src=t}static sendRequestJavascript(e,t){const i=e.document.createElement("script");i.type="text/javascript",i.src=t,e.document.head.appendChild(i)}}class Se{constructor(e,t){if(this.parameters=new Map,this.impressionId=g.getCurrentTime(),this.tagIdentifier=++Se.globalTagCount,this.auctionTimestampSecond=0,this.splitSeparator=";",this.partnerName=null,this.referenceElement=null,this.executeViewCb=!1,this.referenceElement=t,this.readParametersOnQueryString(e),this.initABTesting(),this.hasParameter("st")&&(Se.supplyTypeParameter=this.getParameter("st")),this.hasParameter("ts")&&(this.auctionTimestampSecond=this.getParameterInt("ts")),this.hasParameter("omrqs")&&(Se._hasConfigToSendRequestWithOmidApi="1"===this.getParameter("omrqs")),this.hasParameter("native_event")&&"${VIEW_NATIVE_EVENTS}"!==this.getParameter("native_event")){C.notify(C.EXCEPTION_1400);try{Se.viewNativeEvents=new Ne(this.getParameter("native_event"))}catch(e){C.notify(C.EXCEPTION_405)}}this.hasParameter("fire_vcb")&&(this.executeViewCb=!0)}readParametersOnQueryString(e){const t=h.splitStringByRegexp(e,this.splitRegexp());for(let e=0;e1){if(r=s[1],0===r.length)continue}else r="1";this.addParameter(n,r)}}splitRegexp(){return";"}addParameter(e,t){let i=this.parameters.get(e);if(i||(i=[],this.parameters.set(e,i)),t){let e;try{e=h.decodeURIComponent(t)}catch(i){e=t,"%native_dom_id%"!==t||I.isOMIDContextWithoutCreativeAccess()||C.notify(C.EXCEPTION_113)}i.push(e)}}getParameter(e){const t=this.parameters.get(e);return t?t[t.length-1]:null}getParameters(e){return this.parameters.get(e)}getReferenceElement(){return this.referenceElement}getCommonId(){return this.tagIdentifier+"_"+this.impressionId}getParameterInt(e){const t=this.getParameter(e);return t?h.parseInt(t):0}hasParameter(e){return this.parameters.has(e)}setParameter(e,t){this.parameters.delete(e);const i=[];this.parameters.set(e,i),t&&i.push(t)}getDeclaredCreativeSize(){let e=T.minusOne;const t=this.getParameter("d");if(t&&-1!==t.indexOf("x"))try{const i=t.split("x");2===i.length?e=new T(parseInt(i[0],10),parseInt(i[1],10)):C.notify(C.EXCEPTION_1186)}catch(e){C.notify(C.EXCEPTION_1185)}return e}initABTesting(){if(!Se.isABTestingInitialized&&(Se.isABTestingInitialized=!0,this.hasParameter("ab"))){const e=this.getParameterInt("ab"),t=100*h.getRandom();t<2*e&&(Se._isABTestingCaseA=t-1){const i=e.indexOf(";");(-1===i||t2?(r=s[1],a=s[2],0!==r.length?0!==a.length?this.addNativeEvent(n,r,a):C.notify(C.EXCEPTION_403):C.notify(C.EXCEPTION_402)):C.notify(C.EXCEPTION_404)}}addNativeEvent(e,t,i){const s=new Ae(t,e,i);this.nativeEventList.push(s)}postShot(e){for(let t=0;t0&&null!==this.callback}postShot(e){this.triggered||this.isDefinitionReached(e)&&(this.sendUrl(),this.jsSignalWhenReachDefinition>0&&C.notify(this.jsSignalWhenReachDefinition))}sendUrl(){if(this.triggered)return;const e=this.callback.replace("[alenty_sessionid]",E.getSessionId());if(r())return _e.useOmidToSendRequest()?(C.notify(C.EXCEPTION_409),_e.sendRequestWithoutCookie(e,!1),void(this.triggered=!0)):void C.notify(C.EXCEPTION_408);this.triggered=!0,this.method===o.JAVASCRIPT?_e.sendRequestJavascript(c.getTopAccessibleWindow(),e):this.method===o.IMAGE&&_e.sendRequestNative(c.getTopAccessibleWindow(),e)}isDefinitionReached(e){if(!this.trigger)return!0;if(!e)return!1;if(e.isMeasurementInitialized()){let t=null,i=-1;const s=e.getTag();for(let e=0;e=i&&a>=r&&r>0&&(i=a,t=n)}if(t)return!0}return!1}}class ve{constructor(){this.highPriorityElements=[],this.declaredCreativeSize=T.zero}searchVisibleElementsInSiblingAndChildren(e,t){const i=n(e),s=i&&i.getAttribute("class")||"";i&&-1!==s.indexOf("anx_cr_loc")&&(this.highPriorityElements.push(i),C.notify(C.EXCEPTION_1190));let r=this.getMeasurableChildren(e,t);return r=r.concat(this.searchVisibleElementsInSibling(e,t)),r}searchVisibleElementsInSibling(e,t){const i=this.lookAllNodes(e,ve.DIR_BACKWARD,t),s=this.lookAllNodes(e,ve.DIR_FORWARD,t);return i.concat(s)}searchVisibleElementsVisuallyNear(e){const t=ne.getElementWindow(e),i=[];let s=ne.getElementsByTagName(t,"img");s=s.concat(ne.getElementsByTagName(t,"iframe")),s=s.concat(ne.getElementsByTagName(t,"video")),s=s.concat(ne.getElementsByTagName(t,"canvas")),s=s.concat(ne.getElementsByTagName(t,"object")),s=s.concat(ne.getElementsByTagName(t,"embed")),s=s.concat(ne.getElementsByTagName(t,"ft-carousel"));const n=ne.getOffsetSize(e),r=re.getWindowAbsolutePosition(t,e).minus(ve.VISUAL_TOLERANCE),a=r.plus(n).plus(ve.VISUAL_TOLERANCE).plus(ve.VISUAL_TOLERANCE);for(let n=0;ni.getX()&&t+s.getY()>i.getY())return!0}}return!1}getMeasurableChildren(e,t){return this.getMeasurableChildrenInternal(e,ve.DIR_BACKWARD,t)}getMeasurableChildrenInternal(e,t,i){let s=[],n=ne.getAttribute(e,"nodeName").toUpperCase();const r=e.getAttribute("class")||"";if("IMG"===n){if(""!==ne.getAttribute(e,"lntfi"))return s;this.isElementSizeRelevant(e)&&s.push(e)}else if(-1!==["EMBED","OBJECT","IFRAME","VIDEO","CANVAS","FT-CAROUSEL"].indexOf(n))this.isElementSizeRelevant(e)&&s.push(e);else if(-1!==r.indexOf("anx_cr_loc"))C.notify(C.EXCEPTION_1097),this.highPriorityElements.push(e);else if(-1!==r.indexOf("celtra-ad-v3")||-1!==r.indexOf("celtra-ad-v4")){C.notify(C.EXCEPTION_1181);const t=this.getCeltraObservee(e);if(t)C.notify(C.EXCEPTION_1182),s.push(t);else if(i&&!e["anxceltralistener-"+i.getControlKey()]){const t=i,s=new O(C.EXCEPTION_188,(()=>{t.doSearchElements(),U.checkDurationStatic()})),n=c.getWindow();ne.addEventListenerWithEventListenerWrapper(n,e,"celtraLoaded",s),e["anxceltralistener-"+i.getControlKey()]=!0}}else{let r=t?ae.getFirstChild(e):ae.getLastChild(e);if(!r&&this.getShadowRootNode(e)){C.notify(C.EXCEPTION_1187);const i=this.getShadowRootNode(e);r=t?this.findFirstShadowChild(i):this.findLastShadowChild(i)}for(;r;){if(n=ne.getAttribute(r,"nodeName").toUpperCase(),this.isNodeRelevant(n)){const e=this.getMeasurableChildrenInternal(r,t,i);s=s.concat(e)}r=t?ae.getNextSibling(r):ae.getPreviousSibling(r)}}return s}getShadowRootNode(e){return e.shadowRoot}findFirstShadowChild(e){return e.firstElementChild}findLastShadowChild(e){return e.lastElementChild}lookAllNodes(e,t,i){let s=[],n=e;for(;n&&s.lengthn.surface())n=i,s=e;else if("A"===t){let r=ae.getFirstChild(e);for(;r;)t=ne.getAttribute(r,"nodeName").toUpperCase(),this.isNodeRelevant(t)&&(i=ne.getMaxSize(r),i.surface()>n.surface()&&(n=i,s=r)),r=ae.getNextSibling(r)}}e=ae.getNextSibling(e)}}return s&&this.isElementSizeRelevant(s)&&t.push(s),t}isNodeRelevant(e){return-1===["SCRIPT","NOSCRIPT","LINK","BR","STYLE"].indexOf(e)}isElementSizeRelevant(e){const t=ne.getMaxSize(e);let i=ve.MIN_HEIGHT;const s=this.declaredCreativeSize.getY();return s=ve.CRITICAL_MIN_HEIGHT&&(i=s-2),t.getX()>ve.MIN_WIDTH&&t.getY()>i}clean(){this.highPriorityElements=[]}getHighPriorityElements(){return this.highPriorityElements}getCeltraObservee(e){return e.celtra&&e.celtra.loaded?e.celtra.viewabilityObservee:null}setDeclaredCreativeSize(e){this.declaredCreativeSize=e}}ve.MIN_HEIGHT=25,ve.CRITICAL_MIN_HEIGHT=10,ve.MIN_WIDTH=50,ve.MAX_NODES_PARSED=10,ve.DIR_FORWARD=!0,ve.DIR_BACKWARD=!1,ve.VISUAL_TOLERANCE=new T(5,5);class Pe{constructor(){this.topLeftCorner=T.zero,this.bottomRightCorner=T.zero,this.topOffset=T.zero,this.window=null,this.child=null}refresh(e){try{if(this.window&&this.window===e)return}catch(e){C.notify(C.EXCEPTION_24)}this.window=e,this.calculateVisibleViewportPart()}initParentViewPort(e){this.window=ne.getAccessibleParentWindow(e);const t=M.getWindowFrameOffset(this.window,e),i=c.getWindowScroll(e);return this.topOffset=t.minus(i),this.calculateVisibleViewportPart(),this}calculateVisibleViewportPart(){const e=c.getWindowScroll(this.window);this.topLeftCorner=e.minus(this.topOffset);const t=c.getWindowSize(this.window);this.bottomRightCorner=this.topLeftCorner.plus(t)}createExtendedViewPort(e){const t=new Pe;return t.setChild(this),t.initParentViewPort(e)}debug(){l.debug("x1:y1 x2:y2 - "+this.topLeftCorner+":"+this.bottomRightCorner)}getX1(){return this.topLeftCorner.getX()}getY1(){return this.topLeftCorner.getY()}getX2(){return this.bottomRightCorner.getX()}getY2(){return this.bottomRightCorner.getY()}clearCache(){this.window=null}getIframeOffset(){return this.topOffset}getChildIframeOffset(){return this.child?this.child.getIframeOffset():T.zero}setChild(e){this.child=e}getWindow(){return this.window}}class be extends Pe{initParentViewPort(e){const t=c.getScreenPosition();this.topOffset=t,this.topLeftCorner=this.topOffset.opposite();const i=c.getScreenSize();return this.bottomRightCorner=this.topLeftCorner.plus(i),this}}class De{static addTag(e){this.tags.push(e),e.start()}static getTagCount(){return this.tags.length}static removeTag(e){this.tags=this.tags.filter((t=>t!==e))}static postFlushCleanup(){for(let e=this.tags.length-1;e>=0;e--){const t=this.tags[e];if(0===t.getTrackedObjectCount()){const e=t.getTagURL().getReferenceElement();!e||ne.isNullOrParentNull(e)?t.shutdown(Ze.RR_DELETE):(C.notify(C.EXCEPTION_1008),t.start())}}}static getTagAtIndex(e){return this.tags[e]}}De.tags=[];class ye{constructor(e,t){this.fakeImageElement=null,this.trackedObjectList=[],this.tagCreationTime=0,this.flushed=!1,this.creationTime=g.getCurrentTime(),this.timeoutShutdown=new u((()=>{this.shutdown(Ze.RR_TIMEOUT)})),this.atLeastOneObjectInitialized=!1,this.timerFirstObjectInitialized=0,this.trackedElements=[],this.requestTimedToSend=[],this.viewCbFired=!1,this.tagURL=e,this.searchStrategy=t,this.scriptElement=e.getReferenceElement(),this.triggerManager=this.createTriggerManager(),this.initialize(),this.tagCreationTime=g.getCurrentTime(),this.requestFormatter=this.createRequestFormatter(),this.initTimeoutShutdown(),this.tagMetricAgregator=new $e(this),this.trackedElements=[];const i=this.tagURL.getParameter("cb");i&&(g.getTagList()[i]=this.trackedElements),this.triggerManager.init(this,this.createIABTrigger()),h.isSafari()&&(this.requestTimedToSend=this.createListOfRequestTimedToSend()),I.registerNewTag(this)}createListOfRequestTimedToSend(){return[3,20,60,120]}createTriggerManager(){return new ot}initialize(){ye.warnExtenalScriptTagCreated(c.getWindow())}initTimeoutShutdown(){let e=ye.MAX_EXECUTION_TIME_MILLIS;const t=this.tagURL.getAuctionTimestampSecond();0!==t&&(e-=g.getInitializationTime()-1e3*t,(e>ye.MAX_EXECUTION_TIME_MILLIS||e<1e4)&&(e=ye.MAX_EXECUTION_TIME_MILLIS)),this.timeoutShutdown.schedule(e)}static warnExtenalScriptTagCreated(e){"function"==typeof e.lnttr&&e.lnttr()}getTrackedObjectCount(){return this.trackedObjectList.length}getTrackedObject(e){return this.trackedObjectList[e]}addTrackedObject(e){this.trackedObjectList.push(e);try{let t;t=I.isOMIDContextWithoutCreativeAccess()?new Me:bt.getUseIntersectionObserver()?new Ve:new we,e.setVisibilityCalculator(t),e.applyInitialization();const i=U.trackingLoader.getContentPanel();i&&i.addContent(e)}catch(e){C.notify(C.EXCEPTION_41)}}addTrackedObjectAndInitialize(e,t){this.trackedObjectList.length0&&this.setFlushed(!1);for(let t=0;t=0;e--){const t=this.requestTimedToSend[e],i=g.getCurrentTime()-this.tagCreationTime;if((!U.trackingLoader.isTrackingSupported()||U.trackingLoader.trackDisplay.isTrackingInitialized())&&i>1e3*t){let i=Ze.RR_XX_SECONDS_UPDATE+t;i>Ze.MAX_RR_XX_SECONDS_UPDATE?i=Ze.MAX_RR_XX_SECONDS_UPDATE:i=0;e--){const t=this.trackedObjectList[e];t.postFlushCleanup(),t.hasDeleteAfterFlush()&&(this.getTagMetricsAggregator().setLastDeletedTrackedObjectData(new Je(t)),this.trackedObjectList.splice(e,1))}}getSearchStrategy(){return this.searchStrategy}getDetectionMethod(){return this.searchStrategy.getDetectionMethodCode()}isAlreadyTrackedForThisTag(e){return!!e&&""!==ne.getAttribute(e,this.getControlKey())}getControlKey(){return ye.LNT_CONTROL_KEY+"#"+s(this.tagURL.getCommonId())}start(){this.atLeastOneObjectInitialized=!1,this.addTrackedObject(this.createTrackedObject()),this.searchElements(),this.triggerManager.start()}sendIntermediateRequest(e){this.updateMetrics(),U.trackingLoader.isTrackingSupported()&&!U.trackingLoader.trackDisplay.isTrackingInitialized()||(this.requestFormatter.requestFlushWithFullData(e),this.hasAtLeastOneObjectInitialized()&&this.flushContentIfNeeded())}updateMetrics(){this.triggerManager.postShot()}shutdown(e){this.updateMetrics(),this.triggerManager.shutDown();const t=U.getContainer();t&&t.shutDown(),this.requestFormatter.requestFlushWithFullData(e),this.flushContentIfNeeded(),this.trackedObjectList.length=0,De.removeTag(this),this.timeoutShutdown.cancel()}createRequestFormatter(){return new Ze(this)}getFirstObject(){return this.getTrackedObjectCount()>0?this.getTrackedObject(0):null}getRequestFormatter(){return this.requestFormatter}getTagMetricsAggregator(){return this.tagMetricAgregator}getTimeFromCreation(){return g.getCurrentTime()-this.creationTime}isUnderUltimateTimeoutLimit(){return this.getTimeFromCreation()<=ye.MAX_LAST_REQUEST_TIME_MILLIS}hasAtLeastOneObjectInitialized(){return this.atLeastOneObjectInitialized}getTimeToHaveAtLeastOneObjectInitialized(){return this.timerFirstObjectInitialized-this.tagCreationTime}getTagCreationTime(){return this.tagCreationTime}getTrackedElements(){return this.trackedElements}getDeclaredCreativeSize(){return this.tagURL.getDeclaredCreativeSize()}hasViewCbFired(){return this.viewCbFired}setViewCbFired(e){this.viewCbFired=e}}ye.LNT_CONTROL_KEY=c.getJSNaminglnt()+"Control",ye.MAX_TRACKED_OBJECTS_NUMBER=10,ye.MAX_EXECUTION_TIME_MILLIS=29e4,ye.MAX_LAST_REQUEST_TIME_MILLIS=42e4;class we{constructor(){this.percentVisible=0,this.isHiddenOnScreen=!1,this._isOutOfViewport=!1,this.position=T.minusOne,this.relativePositionTopLeft=T.zero,this.relativePositionBottomRight=T.zero,this.bannerSize=T.minusOne,this.visibleBannerSize=T.zero,this._isElementRemoved=!1,this.totalSurface=0}startMeasurement(e){this.element=e,this._isElementRemoved=!1,this.refreshBannerSize()}refresh(){if(this.percentVisible=1,this.isHiddenOnScreen=!1,this._isOutOfViewport=!1,!R.isReliable()||ne.isNullOrParentNull(this.element))return C.notify(C.EXCEPTION_1021),this._isElementRemoved=!0,this.percentVisible=0,void(this.isHiddenOnScreen=!0);let e=ne.getElementWindow(this.element);if(this.isDocumentElementNotAvailable(e))return this.percentVisible=0,void(this.isHiddenOnScreen=!0);if(!ne.isCSSvisible(e,this.element))return this.percentVisible=0,void(this.isHiddenOnScreen=!0);if(this.refreshBannerSize(),this.relativePositionTopLeft=this.calcBannerPosition(e,this.element),this.relativePositionBottomRight=this.relativePositionTopLeft.plus(this.visibleBannerSize),this.totalSurface=this.visibleBannerSize.surface(),1===this.totalSurface&&(this.totalSurface=0),this.position=this.relativePositionTopLeft,0===this.totalSurface)return this.percentVisible=0,void(this.isHiddenOnScreen=!0);let t=new Pe;for(t.refresh(e),this.theEyeOfAlenty(t);this.percentVisible>0&&!R.isTop(e);)t=t.createExtendedViewPort(e),this.theEyeOfAlenty(t),e=t.getWindow();this.percentVisible>0&&R.isTop(e)&&(t=U.trackingLoader.trackDisplay.createViewPortFromTop(t),t&&this.theEyeOfAlenty(t)),this.percentVisible*=U.trackingLoader.trackDisplay.getPercentVisible(),this.percentVisible<=0&&(this._isOutOfViewport=!0)}calcBannerPosition(e,t){return re.getWindowAbsolutePosition(e,t)}theEyeOfAlenty(e){this.position=this.position.plus(e.getIframeOffset()),this.relativePositionTopLeft=this.relativePositionTopLeft.plus(e.getChildIframeOffset()),this.relativePositionBottomRight=this.relativePositionBottomRight.plus(e.getChildIframeOffset());let t=this.relativePositionTopLeft.getX(),i=this.relativePositionTopLeft.getY(),s=this.relativePositionBottomRight.getX(),n=this.relativePositionBottomRight.getY();s<=e.getX1()||t>=e.getX2()||n<=e.getY1()||i>=e.getY2()?(this.percentVisible=0,this._isOutOfViewport=!0):(t=te.getX2()?e.getX2():s,i=ie.getY2()?e.getY2():n,this.relativePositionTopLeft=new T(t,i),this.relativePositionBottomRight=new T(s,n),this.percentVisible=(s-t)*(n-i)/this.totalSurface)}getPercentVisible(){return this.percentVisible}getPosition(){const e=U.trackingLoader.getCrossDomainIframePosition();let t;return t=M.isCrossDomain()&&!T.minusOne.equals(e)?this.position.equals(T.minusOne)?e:e.plus(this.position):this.position,t}isDocumentElementNotAvailable(e){return!e.document}isElementRemoved(){return this._isElementRemoved}refreshBannerSize(){this.bannerSize=ne.getMaxSize(this.element),this.visibleBannerSize=ne.getOffsetSize(this.element),this.visibleBannerSize.equals(T.zero)&&(this.isHiddenOnScreen=!0)}getBannerSize(){return this.bannerSize}isIABVisible(){return this.getPercentVisible()>=this.getIABThreshold()}getIABThreshold(){return this.bannerSize.surface()>=we.IAB_LARGE_FORMAT_SURFACE?.3:.5}isInitialized(){return!0}isHiddenCreative(){return this.isHiddenOnScreen}isOutOfViewport(){return this._isOutOfViewport}}we.IAB_LARGE_FORMAT_SURFACE=242500;class Re extends we{refresh(){}getPercentVisible(){return 1}isInitialized(){return!0}}class Me extends we{refresh(){const e=U.getContainer();e&&(this.percentVisible=e.getVisibleRatio(),this.position=e.getAdPosition()),this.refreshBannerSize(),this._isOutOfViewport=this.percentVisible<=0}refreshBannerSize(){this.bannerSize=U.getContainer().getAdSize(),this.isHiddenOnScreen=this.bannerSize.equals(T.zero)}getPercentVisible(){return this.percentVisible}getPosition(){return this.position}isInitialized(){return!0}}class Ve extends we{constructor(){super(),this.intersectionObserverViewabilityRate=0,this.intersectionObserver=null,this._isInitialized=!0,this.initTimeout=new u((()=>{this._isInitialized=!0,this.intersectionObserverViewabilityRate=0,this._isOutOfViewport=!0,U.checkDurationStatic()}),C.EXCEPTION_109),C.notify(C.EXCEPTION_1003)}startMeasurement(e){if(this.intersectionObserver)this.unobserve(this.intersectionObserver,this.element);else{const t=ne.getElementWindow(e);this.intersectionObserver=this.setupNative(t)}this.element=e,this._isElementRemoved=!1,super.refresh(),this.percentVisible=0,this._isInitialized=!1,this.observe(this.intersectionObserver,e),-1!==g.getUserAgent().indexOf("gecko")&&this.requestAnimationFrame(),this.initTimeout.schedule(100)}requestAnimationFrame(){window.requestAnimationFrame((()=>{}))}observe(e,t){e.observe(t)}unobserve(e,t){e.unobserve(t)}refresh(){if(this.isHiddenOnScreen=!1,this._isOutOfViewport=!1,!R.isReliable()||ne.isNullOrParentNull(this.element))return C.notify(C.EXCEPTION_1018),this._isElementRemoved=!0,this.isHiddenOnScreen=!0,void(this.percentVisible=0);const e=ne.getElementWindow(this.element);return this.isDocumentElementNotAvailable(e)?(this.percentVisible=0,void(this.isHiddenOnScreen=!0)):ne.isCSSvisible(e,this.element)?(this.refreshBannerSize(),this.percentVisible=this.intersectionObserverViewabilityRate*U.trackingLoader.trackDisplay.getPercentVisible(),void(this._isOutOfViewport=this.percentVisible<=0)):(this.percentVisible=0,void(this.isHiddenOnScreen=!0))}static initOptions(){const e=[];let t=101;for(;t--;)e[t]=t/100;return{threshold:e}}setupNative(e){return new e.IntersectionObserver((e=>{try{e.forEach((e=>{this.processChange(e.intersectionRatio+0)})),U.checkDurationStatic()}catch(e){C.notify(C.EXCEPTION_21)}}),Ve.options)}processChange(e){this.initTimeout.cancel(),this._isInitialized=!0,e>.99?e=1:e<.01&&(e=0),this.intersectionObserverViewabilityRate=e}isInitialized(){return this._isInitialized}}Ve.options=Ve.initOptions();class Le{constructor(){this.detectionMethodAdvanced=Le.DETECTION_METHOD_ADVANCED_NOTFOUND}searchNewVisibleElements(e){const t=this.searchNewVisibleElementsImpl(e);return this.detectionMethodAdvanced===Le.DETECTION_METHOD_ADVANCED_NOTFOUND&&t.length>0&&(this.detectionMethodAdvanced=Le.DETECTION_METHOD_ADVANCED_DEFAULT),t}ensureValidity(e){try{const t=e.getVisibleElement();if(t){const i=this.pointRollHack(c.getWindow(),c.getTopAccessibleWindow(),t);i&&(e.initVisibleElement(i),C.notify(C.EXCEPTION_28))}}catch(e){C.notifyWithException(C.EXCEPTION_13,e)}}pointRollHack(e,t,i){const s=i.id;if(s&&0===s.indexOf("pradi")){const i="prf"+s.substr(5);let n=e.document.getElementById(i);if(n||(n=t.document.getElementById(i)),n){const e=n.getElementsByClassName("prWrapper");if(e.length>0)return e[0]}}return null}setDetectionMethodAdvanced(e){this.detectionMethodAdvanced=e}getDetectionMethodCode(){return(this.detectionMethodAdvanced!==Le.DETECTION_METHOD_ADVANCED_NOTFOUND?""+this.detectionMethodAdvanced:"")+this.getDetectionMethod()}isWorking(){return!0}}Le.DETECTION_METHOD_ADVANCED_NOTFOUND=0,Le.DETECTION_METHOD_ADVANCED_DOUBLE_PARENTS=1,Le.DETECTION_METHOD_ADVANCED_PARENT_IFRAME=4,Le.DETECTION_METHOD_ADVANCED_VISUAL=5,Le.DETECTION_METHOD_ADVANCED_VISUAL_PARENT_IFRAME=6,Le.DETECTION_METHOD_ADVANCED_HTML_SIBLING=8,Le.DETECTION_METHOD_ADVANCED_DEFAULT=9,Le.DETECTION_METHOD_AUTO=0,Le.DETECTION_METHOD_NODEID=1,Le.DETECTION_METHOD_NODEIDCHILDREN=2,Le.DETECTION_METHOD_NODE=3,Le.DETECTION_METHOD_VIDEO=5,Le.DETECTION_METHOD_CSS_SELECTOR=6,Le.DETECTION_METHOD_OMID_LIMITED=7,Le.DETECTION_METHOD_PREBID_NATIVE=8,Le.DETECTION_METHOD_DOM_ELT_VAR=9,Le.visibleElementSeeker=new ve;class Xe extends Le{searchNewVisibleElementsImpl(e){const t=this.getReferenceElement(e);let i=[];for(let s=0;s?@[\\\]^`{|}~])/g,"\\$1")}searchNewVisibleElementsImpl(e){const t=[];let i=null;const s=c.getWindow(),n=c.getTopAccessibleWindow();if(this.adIdParam&&""!==this.adIdParam)try{const e=`.${Fe.AD_ANCHOR_CLASS_NAME}[${Fe.AD_DATA_ADID_ATTRIBUTE}='${this.adIdParam}']`;i=M.searchByCssSelectorInAllFrames(s,n,e)}catch(e){C.notify(C.EXCEPTION_191)}if(this.adUnitCodeParam&&""!==this.adUnitCodeParam&&!i)try{if(i=M.searchByIdInAllFrames(s,n,this.adUnitCodeParam)[0],i)C.notify(C.EXCEPTION_1314);else{const e=Fe.escapeCssSelector(this.adUnitCodeParam),t=`iframe#${Fe.GPT_ID_PREFIX}${e}${Fe.GPT_ID_SUFFIX}`;i=M.searchByCssSelectorInAllFrames(s,n,t),i&&C.notify(C.EXCEPTION_1315)}}catch(e){C.notify(C.EXCEPTION_192)}return i&&t.push(i),t}getDetectionMethod(){return Le.DETECTION_METHOD_PREBID_NATIVE}mayFindManyElements(){return!1}}Fe.AD_ANCHOR_CLASS_NAME="pb-click",Fe.AD_DATA_ADID_ATTRIBUTE="pbadid",Fe.GPT_ID_PREFIX="google_ads_iframe_",Fe.GPT_ID_SUFFIX="_0";class We extends Xe{constructor(e){super(),this.domId=e}getDetectionMethod(){return We.DETECTION_METHOD_NODEIDCHILDREN}searchElementsImpl(e,t){We.visibleElementSeeker.setDeclaredCreativeSize(e.getDeclaredCreativeSize());let i=We.visibleElementSeeker.getMeasurableChildren(t,e);const s=We.visibleElementSeeker.getHighPriorityElements();return s.length>0&&(i=[].concat(s)),We.visibleElementSeeker.clean(),i}getReferenceElement(e){const t=c.getWindow(),i=c.getTopAccessibleWindow();return M.searchByIdInAllFrames(t,i,this.domId)}mayFindManyElements(){return!1}}class Ue extends Le{constructor(e){super(),this.nativeDomIdWasReplaced=!1,this.domId=e,this.nativeDomIdWasReplaced=-1===this.domId.indexOf("native_dom_id")}isWorking(){return this.nativeDomIdWasReplaced}searchNewVisibleElementsImpl(e){if(this.nativeDomIdWasReplaced){const t=c.getWindow(),i=c.getTopAccessibleWindow();Ue.visibleElementSeeker.setDeclaredCreativeSize(e.getDeclaredCreativeSize());const s=M.searchByIdInAllFrames(t,i,this.domId),n=[];for(let e=0;e0&&(e=t[0])}e&&(t=e)}t&&(C.notify(C.EXCEPTION_1020),e.initVisibleElement(t))}}}}class Be extends Le{constructor(){super(),this.hasAlreadyFindElement=!1}searchNewVisibleElementsImpl(e){this.setDetectionMethodAdvanced(Be.DETECTION_METHOD_ADVANCED_DEFAULT);const t=[];return this.hasAlreadyFindElement||(t.push(null),this.hasAlreadyFindElement=!0),t}mayFindManyElements(){return!1}getDetectionMethod(){return Be.DETECTION_METHOD_OMID_LIMITED}}class He extends Le{constructor(e){super(),this.varName=e}searchNewVisibleElementsImpl(e){const t=[],i=this.getElementFromVarName();return i?t.push(i):C.notify(C.EXCEPTION_1318),t}getElementFromVarName(){let e=null,t=c.getWindow();for(;!e&&t;)e=this.getNativeElementFromVarName(t,this.varName),t=R.getAccessibleParentWindow(t);return e}getNativeElementFromVarName(e,t){return void 0!==e&&void 0!==e[t]?e[t]:null}getDetectionMethod(){return Le.DETECTION_METHOD_DOM_ELT_VAR}mayFindManyElements(){return!1}ensureValidity(e){if(ne.isNullOrParentNull(e.getVisibleElement())){const t=this.getElementFromVarName();t&&(C.notify(C.EXCEPTION_1019),e.initVisibleElement(t))}}}class ze extends Le{constructor(e){super(),this.cssSelectorParam=e}searchNewVisibleElementsImpl(e){let t=null;const i=c.getWindow(),s=c.getTopAccessibleWindow();try{t=M.searchByCssSelectorInAllFrames(i,s,this.cssSelectorParam)}catch(e){C.notify(C.EXCEPTION_190)}if(t){const e=[];return e.push(t),e}return[]}getDetectionMethod(){return Le.DETECTION_METHOD_CSS_SELECTOR}mayFindManyElements(){return!1}}class je extends Xe{getDetectionMethod(){return je.DETECTION_METHOD_AUTO}searchElementsImpl(e,t){const i=c.getWindow();je.visibleElementSeeker.setDeclaredCreativeSize(e.getDeclaredCreativeSize());let s=je.visibleElementSeeker.searchVisibleElementsInSiblingAndChildren(t,e);const n=je.visibleElementSeeker.getHighPriorityElements();n.length>0?(s=[].concat(n),this.setDetectionMethodAdvanced(je.DETECTION_METHOD_ADVANCED_DEFAULT)):s.length>0&&this.setDetectionMethodAdvanced(je.DETECTION_METHOD_ADVANCED_DEFAULT),0===s.length&&(M.isInIframe()||U.getContainer())&&(s=je.visibleElementSeeker.lookForHtmlOnlyCreativeInIframeBody(i),s.length>0&&this.setDetectionMethodAdvanced(je.DETECTION_METHOD_ADVANCED_HTML_SIBLING));const r=e.getFakeImageElement();if(0===s.length&&r&&(s=je.visibleElementSeeker.searchVisibleElementsVisuallyNear(r),s.length>0&&this.setDetectionMethodAdvanced(je.DETECTION_METHOD_ADVANCED_VISUAL)),t&&!M.isInHead(t)&&0===s.length){if(s=je.visibleElementSeeker.searchVisibleElementsInSiblingAndChildren(ae.getParent(t),e),s.length>ye.MAX_TRACKED_OBJECTS_NUMBER/2)return C.notify(C.EXCEPTION_16),s=[],s;s.length>0&&this.setDetectionMethodAdvanced(je.DETECTION_METHOD_ADVANCED_DOUBLE_PARENTS)}if(0===s.length&&M.isInIframeSameDomain()){const t=R.getAccessibleParentWindow(i);if(t){const n=R.getFrameElement(t,i);n&&(s=je.visibleElementSeeker.searchVisibleElementsInSibling(n,e),s.length>0?this.setDetectionMethodAdvanced(je.DETECTION_METHOD_ADVANCED_PARENT_IFRAME):(s=je.visibleElementSeeker.searchVisibleElementsVisuallyNear(n),s.length>0&&this.setDetectionMethodAdvanced(je.DETECTION_METHOD_ADVANCED_VISUAL_PARENT_IFRAME)))}}return je.visibleElementSeeker.clean(),s}getReferenceElement(e){const t=e.getScriptElement(),i=[];return ne.isNullOrParentNull(t)?i.push(e.getFakeImageElement()):i.push(t),i}}class qe{constructor(e){this.visibleElement=null,this.visibleElementInitialized=!1,this._deleteAfterFlush=!1,this.lastShotVisiblePercent=0,this._isOutOfViewportLastShot=!1,this._isHiddenCreativeLastShot=!1,this._isFirstInitializedFlushDone=!1,this.metricsAggregator=new Ke(this),this.commitedDurationCache=0,this.tag=e}getIABDurationThreshold(){return 1e3}applyInitialization(){}shot(){this.visibleElementInitialized&&(this.setLastShotVisiblePercent(this.getPercentVisible()),this.setLastShotIsOutOfViewport(this.getVisibilityCalculator().isOutOfViewport()),this.setIsHiddenCreativeLastShot(this.getVisibilityCalculator().isHiddenCreative()),this.tag.getSearchStrategy().ensureValidity(this),this.visibilityCalculator.refresh(),this.visibilityCalculator.isElementRemoved()&&this.deleteAfterFlush())}calculateAdvertising(e){e<0&&(C.notify(C.EXCEPTION_9),e=0),this.visibilityCalculator.isInitialized()?(e+=this.commitedDurationCache,this.commitedDurationCache=0):(this.commitedDurationCache+=e,e=0),this.getMetricsAggregator().calculateAdvertising(e)}initVisibleElement(e){this.visibleElementInitialized=!0,this._isFirstInitializedFlushDone=!1,this.visibleElement=e,this.tag.getTrackedElements().push(e),e&&ne.setAttribute(e,this.tag.getControlKey(),"y"),this.visibilityCalculator.startMeasurement(e),this.tag.setFlushed(!1)}postFlushCleanup(){this.visibleElementInitialized&&(this._isFirstInitializedFlushDone=!0)}hasDeleteAfterFlush(){return this._deleteAfterFlush}deleteAfterFlush(){this._deleteAfterFlush=!0;const e=this.tag.getTrackedElements().indexOf(this.visibleElement);e>-1&&this.tag.getTrackedElements().splice(e,1)}getVisibleElement(){return this.visibleElement}getTag(){return this.tag}isFirstInitializedFlushDone(){return this._isFirstInitializedFlushDone}getPercentVisible(){return this.visibilityCalculator.getPercentVisible()}isInitialized(){return this.visibleElementInitialized}getMetricsAggregator(){return this.metricsAggregator}getVisibilityCalculator(){return this.visibilityCalculator}setVisibilityCalculator(e){this.visibilityCalculator=e}isIabVisible(){return this.visibilityCalculator.isIABVisible()}getLastShotVisiblePercent(){return this.lastShotVisiblePercent}setLastShotVisiblePercent(e){this.lastShotVisiblePercent=e}isOutOfViewportLastShot(){return this._isOutOfViewportLastShot}setLastShotIsOutOfViewport(e){this._isOutOfViewportLastShot=e}isHiddenCreativeLastShot(){return this._isHiddenCreativeLastShot}setIsHiddenCreativeLastShot(e){this._isHiddenCreativeLastShot=e}}class Ge{static checkSafeframeSignals(){try{Ge.checkSafeFrameSupport()}catch(e){C.notify(C.EXCEPTION_142)}}static checkJsSignals(){Ge.checkGoogleDataAvailability(),Ge.checkMetaRefreshTag(),ne.isFunctionNative(Ge.getDocumentWriteFunctionNative())||C.notify(C.EXCEPTION_1030);const e=c.getTopAccessibleWindow();Ge.checkAmp(e),Ge.hasMraid3Env(e)&&C.notify(C.EXCEPTION_1010),h.elementHasDefined(e,"ADMARVEL")&&C.notify(C.EXCEPTION_1012),h.elementHasDefined(e,"InmobiObj")&&C.notify(C.EXCEPTION_1013),h.elementHasDefined(e,"PandoraApp")&&C.notify(C.EXCEPTION_1014),h.elementHasDefined(e,"Adform")&&C.notify(C.EXCEPTION_1015),h.elementHasDefined(c.getWindow(),"omid3p")&&C.notify(C.EXCEPTION_1016),h.elementHasDefined(c.getWindow(),"omidVerificationProperties")&&C.notify(C.EXCEPTION_1017),h.elementHasDefined(c.getWindow(),"ADNXSMediation")&&C.notify(C.EXCEPTION_1161),M.isInIframeSameDomain()&&new u((()=>{this.isProbablyCollapsedAstAd()&&C.notify(C.EXCEPTION_1162)}),C.EXCEPTION_5).schedule(700)}static isProbablyCollapsedAstAd(){try{return"none"===window.frameElement.parentElement.style.display}catch(e){return!1}}static checkAmp(e){(void 0!==e.location.host&&-1!==e.location.host.indexOf("ampproject.net")||void 0!==e.document.referrer&&-1!==e.document.referrer.indexOf("ampproject.net"))&&C.notify(C.EXCEPTION_1001)}static hasMraid3Env(e){return"object"==typeof e.MRAID_ENV&&"string"==typeof e.MRAID_ENV.version&&"3"===e.MRAID_ENV.version.charAt(0)&&"."===e.MRAID_ENV.version.charAt(1)}static registerScriptStatusFunction(e){const t=e.document.lntIsScriptStatusOK;e.document.lntIsScriptStatusOK=function(){return(void 0===t||t())&&Ge.isScriptStatusOk()};const i=c.getNamespace();i.ss=Ge.isScriptStatusOk,i.st=Ge.getTimeToFindOneObjectAtLeast}static registerNewScript(){c.getNamespace().n=Pt.refreshContent}static registerActivityStatusFunction(e){e.document.lntActive=U.isActive,e.document.lntInactiveEvent=U.inactiveEvent}static registerTrkFinalize(){c.getNamespace().ff=function(){U.trkFinalize(Ze.RR_API_FINALIZE)}}static registerTrkForceIntermediateRequest(){c.getNamespace().fir=U.sendIntermediateRequest}static getDocumentWriteFunctionNative(){return window.document.write}static isScriptStatusOk(){for(let e=0;ee[3].length)}catch(e){return!1}}static checkGoogleEvent(e){if(!Ge.hasGoogleSafeframeWithGeometry){const t=e.data.toString();if(t&&-1!==t.indexOf("goog_update_data")){C.notify(C.EXCEPTION_1145);let e=t.indexOf("\n7=");if(-1!==e){e+=3;const i=t.substring(e).indexOf("\n");if(-1!==i){const s=t.substring(e,e+i);try{parseFloat(s),C.notify(C.EXCEPTION_1146),Ge.hasGoogleSafeframeWithGeometry=!0}catch(e){}}}}}}static checkGoogleDataAvailability(){try{Ge.hasGoogleContainer()&&C.notify(C.EXCEPTION_1144);const e=c.getTopAccessibleWindow();ne.addEventListenerWithEventListenerWrapper(e,e,"message",new O(C.EXCEPTION_147,(e=>{if(e){const t=e;Ge.checkGoogleEvent(t)}})))}catch(e){C.notify(C.EXCEPTION_148)}}static hasSafeFrameApi(){return void 0!==window.$sf}static getSafeFrameApi(){return window.$sf.ext}static checkGeom(e){return void 0===e.geom||void 0===e.geom().self}static checkHasWinHasFocus(e){return void 0===e.winHasFocus}static checkIsAst(){return window.$sf.ast}static checkSafeFrameSupport(){if(Ge.hasSafeFrameApi()){const e=Ge.getSafeFrameApi();if(!e)return;if(C.notify(C.EXCEPTION_1140),Ge.checkGeom(e))return;if(C.notify(C.EXCEPTION_1141),Ge.checkHasWinHasFocus(e))return;if(C.notify(C.EXCEPTION_1143),!Ge.checkIsAst())return;C.notify(C.EXCEPTION_1006)}}static getMetaRefreshContentTag(){const e=[];let t=c.getWindow();if(!t)return e;if(!M.isWindowDocumentAccessible(t))return e;Ge.findMetaRefreshTags(t,e);let i=t.parent,s=0;for(;i&&i!==t;){if(t=i,i=t.parent,!M.isWindowDocumentAccessible(t))return e;if(Ge.findMetaRefreshTags(t,e),s++,s>10)return C.notify(C.EXCEPTION_153),e}return e}static findMetaRefreshTags(e,t){const i=ne.getElementsByTagName(e,"meta");for(let e=0;e0){C.notify(C.EXCEPTION_1150);for(let t=0;t=2?t[2]:null}}Ge.hasGoogleSafeframeWithGeometry=!1,Ge.hasFoundMetaRefreshTagLess60s=!1;class Ke{constructor(e){this.pageDuration=0,this.time000PercentVisible=0,this.time025PercentVisible=0,this.time050PercentVisible=0,this.time075PercentVisible=0,this.time100PercentVisible=0,this.iabDuration=0,this.iabConsecutiveDuration=0,this.iabDurationSinceLastIAB=0,this.iabInviewCount=0,this.hasBeenIABViewable=!1,this.maxBannerSize=T.minusOne,this.maxVisibleSurface=-1,this.maxPosition=null,this.trackedObject=e}calculateAdvertising(e){if(!this.trackedObject.isInitialized())return;if(e>0){const t=this.trackedObject.getPercentVisible();t>this.maxVisibleSurface&&(this.maxVisibleSurface=t),this.pageDuration+=e,t>0&&(this.time000PercentVisible+=e,t>=.25&&(this.time025PercentVisible+=e,t>=.5&&(this.time050PercentVisible+=e,t>=.75&&(this.time075PercentVisible+=e,t>=1&&(this.time100PercentVisible+=e))))),this.trackedObject.isIabVisible()&&(this.iabDuration+=e),this.computedConsecutiveIABViewability(e)}const t=this.trackedObject.getVisibilityCalculator(),i=t.getBannerSize();this.maxBannerSize=this.maxBannerSize.max(i);const s=this.maxPosition;this.maxPosition=s?s.max(t.getPosition()):t.getPosition()}getIABVisible(){return this.iabDuration>0}computedConsecutiveIABViewability(e){this.trackedObject.isIabVisible()?this.iabDurationSinceLastIAB+=e:(this.iabDurationSinceLastIAB=0,this.hasBeenIABViewable=!1),this.iabDurationSinceLastIAB>=this.trackedObject.getIABDurationThreshold()&&(this.hasBeenIABViewable?this.iabConsecutiveDuration+=e:(this.iabInviewCount++,this.iabConsecutiveDuration+=this.iabDurationSinceLastIAB),this.hasBeenIABViewable=!0)}getPageDuration(){return this.pageDuration}getTime000PercentVisible(){return this.time000PercentVisible}getTime025PercentVisible(){return this.time025PercentVisible}getTime050PercentVisible(){return this.time050PercentVisible}getTime075PercentVisible(){return this.time075PercentVisible}getTime100PercentVisible(){return this.time100PercentVisible}getIABDuration(){return this.iabDuration}getConsecutiveIABDuration(){return this.iabConsecutiveDuration}getIABInviewCount(){return this.iabInviewCount}getMaxBannerSize(){return this.maxBannerSize}getMaxVisibleSurface(){return this.maxVisibleSurface}getPosition(){return this.maxPosition}}class Ye extends Ke{constructor(e){super(e),this.videoGroupMVisibleDuration=0,this.audio100PercentDuration=0}calculateAdvertising(e){super.calculateAdvertising(e),at.isGroupMVisible(this.getVideoTrackedObject())&&(this.videoGroupMVisibleDuration+=e),this.trackedObject.getPercentVisible()>=1&&1===this.getVideoTrackedObject().getTag().getSoundState()&&(this.audio100PercentDuration+=e)}getVideoTrackedObject(){return this.trackedObject}getVideoGroupMVisibleDuration(){return this.videoGroupMVisibleDuration}getAudio100PercentDuration(){return this.audio100PercentDuration}}class $e{constructor(e){this.pageDuration=0,this.lastDeletedTrackedObjectData=null,this.tag=e}calculateAdvertising(e){e<0&&(C.notify(C.EXCEPTION_129),e=0),this.pageDuration+=e}getPageDuration(){return this.pageDuration}getTrackingDuration(){let e=g.getCurrentTime()-this.tag.getTagCreationTime();return e<0&&(C.notify(C.EXCEPTION_128),e=0),e}getLastDeletedTrackedObjectData(){return this.lastDeletedTrackedObjectData}setLastDeletedTrackedObjectData(e){this.lastDeletedTrackedObjectData=e}}class Je{constructor(e){this._isHiddenCreative=e.isHiddenCreativeLastShot(),this._isOutOfViewport=e.isOutOfViewportLastShot();const t=e.getMetricsAggregator(),i=e.getTag().getTriggerManager().getIabTrigger(),s=i.getDurationThreshold(e),n=i.getTrackedObjectDuration(e),r=t.getTime000PercentVisible(),a=e.getLastShotVisiblePercent();this._isIABVisibleWithoutDurationThreshold=n>0&&n0,this._isVisibleWithoutIABSurfaceThreshold=0===n&&r>0&&a>0&&a0){const e=this.searchStrategy.searchNewVisibleElements(this);if(e.length>0){const t=e[0];this.isAlreadyTrackedForThisTag(t)||(this.getFirstObject().initVisibleElement(t),this.atLeastOneObjectInitialized=!0,this.timerFirstObjectInitialized=g.getCurrentTime())}}}getAdUID(){return this.adUID}createIABTrigger(){return new rt}getTagURL(){return this.tagURL}onSoundOnEvent(){this.soundState=1}onSoundOffEvent(){this.soundState=0}getSoundState(){return this.soundState}hasReceivedSoundState(){return-1!==this.soundState}onDurationReceived(e){this.creativeDuration=e}hasCreativeDuration(){return this.creativeDuration>0}getCreativeDuration(){return this.creativeDuration}getCreativeDurationMilliseconds(){return 1e3*this.creativeDuration}}class Ze{constructor(e){this.shouldFlush=!1,this._isFirstRequest=!0,this.shouldIncludeFullData=!1,this.trackedObject=null,this.lastTrackedObject=null,this.requestReason=-1,this.tag=e,this.callbackUrl=e.getTagURL().getParameter("cb")||""}getDimensionParameters(){const e=c.getTopAccessibleWindow(),t=c.getScreenSize(),i=c.getPageSize(e),s=c.getWindowSize(e);return`&sw=${t.getX()}&sh=${t.getY()}&pw=${i.getX()}&ph=${i.getY()}&ww=${s.getX()}&wh=${s.getY()}`}getContextParameters(){const e=g.getScriptVersion(),t=g.getUserAgent(),i=this.tag.getTagURL();let s=`&sv=${e}&tv=${i.getParameter("tv")||""}&ua=${t}&pl=${g.getPlatform()}&x=${g.getScriptId()}`;const n=i.getParameter("tag_id");return n&&(s+=`&tag_id=${n}`),s}formatDimensionParameters(e){const t=e.getMetricsAggregator();let i="";const s=t.getPosition();s&&!s.equals(T.minusOne)&&(i+=`&px=${s.getX()}&py=${s.getY()}`);const n=t.getMaxBannerSize();if(n.equals(T.minusOne)||(i+=`&bw=${n.getX()}&bh=${n.getY()}`),U.trackingLoader.isTrackingSupported()){const e=h.rounded2Decimals(t.getMaxVisibleSurface());e>=0&&(i+=`&sf=${e}`)}return i}getDurationParameters(){const e=this.tag.getTagMetricsAggregator(),t=e.getPageDuration(),i=e.getTrackingDuration(),s=this.trackedObject.getMetricsAggregator();let n=`&pd=${h.getSecondsFromMillisWith2Decimal(t)}&d=${h.getSecondsFromMillisWith2Decimal(i)}`;return this.tag.getTriggerManager().isMeasurementInitialized()&&(n+=`&id=${h.getSecondsFromMillisWith2Decimal(s.getConsecutiveIABDuration())}&ic=${s.getIABInviewCount().toString()}&d0=${h.getSecondsFromMillisWith2Decimal(s.getTime000PercentVisible())}&d25=${h.getSecondsFromMillisWith2Decimal(s.getTime025PercentVisible())}&d50=${h.getSecondsFromMillisWith2Decimal(s.getTime050PercentVisible())}&d75=${h.getSecondsFromMillisWith2Decimal(s.getTime075PercentVisible())}&d100=${h.getSecondsFromMillisWith2Decimal(s.getTime100PercentVisible())}`),n}shouldExecuteViewCb(e){return this.tag.getTagURL().shouldExecuteViewCb()&&!this.tag.hasViewCbFired()&&e!==Ze.RR_FIRST_REQUEST}static triggerViewStateChange(e,t,i,s){if("function"==typeof e._lntViewStateChange)try{let n,r;if(-1!==i.indexOf("&")){const e=i.split("&");n=e[0],r=e[1].split("=")[1]}else n=i,r=null;const a={tagId:t,viewState:n,type:r,exceptions:c.getNamespace().e,requestReason:s};e._lntViewStateChange(a),C.notify(C.EXCEPTION_1500)}catch(e){C.notify(C.EXCEPTION_1501)}else C.notify(C.EXCEPTION_1502)}sendRequest(){let e="";this.trackedObject||(this.trackedObject=this.tag.getFirstObject());const t=C.getRequestPart();""!==t&&(e+=`&jm=${t}`),this.trackedObject&&(e+=this.formatDimensionParameters(this.trackedObject)),e+=`&sid=${E.getSessionId()}${this.getViewabilityDataParameter()}${this.getContextParameters()}`;const i=this.tag.getTriggerManager(),s=i.getViewResult(),n=i.getCustomViewResult();if(n&&(e+=`&cid=${i.getCustomTrigger().getId()}&cr=${n}`),this._isFirstRequest&&(this._isFirstRequest=!1,this.requestReason=Ze.RR_FIRST_REQUEST,r()||(e+=this.getDimensionParameters())),e+=this.getAllRequestsExtraParameters(),this.shouldIncludeFullData&&(h.isMobile()&&(this.lastTrackedObject?this.trackedObject=this.lastTrackedObject:this.lastTrackedObject=this.trackedObject),e+=this.getDurationParameters()),""===this.callbackUrl)C.notify(C.EXCEPTION_111);else{const t=M.getFrameType().toString();_e.sendRequestWithoutCookie(`${this.callbackUrl}&type=${s}${e}&ft=${t}`,this.shouldIncludeFullData)}this.shouldExecuteViewCb(this.requestReason)&&(Ze.triggerViewStateChange(c.getWindow(),this.tag.getTagURL().getParameter("tag_id")||"",s,this.requestReason),this.tag.setViewCbFired(!0)),this.shouldFlush=!1,this.requestReason=-1}getAllRequestsExtraParameters(){return""}getViewabilityDataParameter(){const e=[],t=this.tag.getTagURL();Se.isABTestingCaseA()?e.push("ab~1"):Se.isABTestingCaseB()&&e.push("ab~2"),e.push(`ct~${I.getContainerType()}`);let i="";const s=U.getContainer();if(s){const e=s.getDebugGeometricInfo("~");e.length>0&&(i=`|${e.join("|")}`)}const n=t.getPartnerName();if(n)try{e.push(`pn~${I.cleanPartnerNameCharacters(n)}`)}catch(e){C.notify(C.EXCEPTION_205)}return e.push(`rr~${this.requestReason}`),this.shouldIncludeFullData&&e.push(`dm~${this.tag.getDetectionMethod()}`),`&vd=${e.join("|")}${i}`}requestFlushWithFullData(e){this.shouldIncludeFullData=!0,this.requestFlush(e)}setTrackedObject(e){this.trackedObject=e}flushIfNecessary(){this.shouldFlush&&this.tag.isUnderUltimateTimeoutLimit()&&this.sendRequest()}requestFlush(e){this.requestReason=e,this.shouldFlush=!0}isFirstRequest(){return this._isFirstRequest}}Ze.RR_FIRST_REQUEST=0,Ze.RR_NM_REQUEST=2,Ze.RR_CUSTOM_NM_REQUEST=3,Ze.RR_PV_REQUEST=5,Ze.RR_CUSTOM_PV_REQUEST=6,Ze.RR_MOBILE_INTERMEDIATE_REQUEST=8,Ze.RR_XX_SECONDS_UPDATE=100,Ze.MAX_RR_XX_SECONDS_UPDATE=299,Ze.RR_DELETE=314,Ze.RR_API_FINALIZE=316,Ze.RR_CLIP_INTERRUPT=317,Ze.RR_CLIP_STOP=318,Ze.RR_PAGE_HIDE_REQUEST=319,Ze.RR_BEFORE_UNLOAD_REQUEST=320,Ze.RR_UNLOAD_REQUEST=321,Ze.RR_TIMEOUT=322,Ze.RR_OMID_SESSION_FINISH=323;class et extends Ze{constructor(e){super(e)}getAllRequestsExtraParameters(){let e=super.getAllRequestsExtraParameters();const t=this.tag;return t.hasCreativeDuration()&&(e+="&cd="+h.getSecondsFromMillisWith2Decimal(t.getCreativeDurationMilliseconds())),e}getDurationParameters(){let e=super.getDurationParameters();if(this.trackedObject&&this.trackedObject.isInitialized()&&U.trackingLoader.isTrackingSupported()&&this.tag.hasReceivedSoundState()){const t=this.trackedObject.getMetricsAggregator().getAudio100PercentDuration();e+="&a100="+h.getSecondsFromMillisWith2Decimal(t)}return e}}class tt extends ye{constructor(e,t){super(e,t),this.lastSearchTime=0,this.searchCount=0}searchElements(){const e=this.hasAtLeastOneObjectInitialized()?950:450;g.getCurrentTime()-this.lastSearchTime>e&&this.doSearchElements(),1!==this.searchCount||this.hasAtLeastOneObjectInitialized()||c.isHiddenWithWindow(c.getTopAccessibleWindow())||new u((()=>{this.doSearchElements(),U.checkDurationStatic()}),C.EXCEPTION_39).schedule(1)}doSearchElements(){if(this.lastSearchTime=g.getCurrentTime(),this.searchCount++,!R.isReliable())return;if(this.hasAtLeastOneObjectInitialized()&&(!this.searchStrategy.mayFindManyElements()||this.lastSearchTime-this.getTagCreationTime()>=5e3))return;const e=this.searchStrategy.searchNewVisibleElements(this);if(0!==e.length){if(this.getTrackedObjectCount()>0)for(;!this.hasAtLeastOneObjectInitialized()&&e.length>0;){const t=e.shift();this.isAlreadyTrackedForThisTag(t)||(this.getFirstObject().initVisibleElement(t),this.atLeastOneObjectInitialized=!0,this.timerFirstObjectInitialized=g.getCurrentTime())}this.createTrackedObjects(e)}}createTrackedObjects(e){for(;e.length>0;){const t=e.shift();this.isAlreadyTrackedForThisTag(t)||this.addTrackedObjectAndInitialize(this.createTrackedObject(),t)}}createTrackedObject(){return new qe(this)}createIABTrigger(){return new nt}commitDuration(e){super.commitDuration(e),this.tagMetricAgregator.calculateAdvertising(e)}}class it extends qe{constructor(e){super(e),this.lastPlayDate=0,this.userActive=!0,this.playing=!1,this.durationPart=0,this.lastDurationAddedDate=0,this.oldVisibilityCalculator=null,this.metricsAggregator=new Ye(this),this.firstShot=!0,it.instreamAPITrackedObjectList.push(this),U.trackingLoader.refreshActivity()}onClipPlayEvent(e){this.playing||(this.tag.getTriggerManager().onPlay(),this.playing=!0,this.lastPlayDate=e,this.userActive=U.isActive(),this.lastDurationAddedDate=0)}onClipResumeEvent(e){this.playing||(this.playing=!0,this.lastPlayDate=e,this.userActive=U.isActive(),this.lastDurationAddedDate=0)}getVideoGroupMTrigger(){return this.tag.getTriggerManager().getVideoGroupMTrigger()}onClipPauseEvent(e){this.playing&&(this.playing=!1,this.manageStopPlaying(e))}onClipStopEvent(e,t){this.playing&&(this.playing=!1,this.manageStopPlaying(e),this.deleteAfterFlush(),t||this.tag.shutdown(Ze.RR_CLIP_STOP))}onClipInterruptEvent(e,t){this.playing&&(this.playing=!1,this.manageStopPlaying(e),this.deleteAfterFlush(),t||this.tag.shutdown(Ze.RR_CLIP_INTERRUPT))}manageStopPlaying(e){0===this.lastDurationAddedDate?this.lastPlayDate>0&&(this.durationPart+=e-this.lastPlayDate):this.durationPart+=e-this.lastDurationAddedDate}calculateAdvertising(e){let t=e;this.playing?(this.lastPlayDate>0&&(t=this.durationPart+g.getCurrentTime()-this.lastPlayDate,this.lastPlayDate=0,this.durationPart=0),this.firstShot&&!this.userActive&&(t=0)):this.durationPart>0?(t=this.durationPart,this.durationPart=0):t=0,this.getTag().getTagMetricsAggregator().calculateAdvertising(t),super.calculateAdvertising(t),t>0&&(this.firstShot=!1,this.lastDurationAddedDate=U.trackingLoader.getLastShotTime())}onFullscreenOn(){this.oldVisibilityCalculator=this.getVisibilityCalculator(),this.setVisibilityCalculator(new Re),this.userActive=!0,A.onActiveEvent()}onFullscreenOff(){this.oldVisibilityCalculator&&(this.setVisibilityCalculator(this.oldVisibilityCalculator),this.userActive=U.isActive())}getTag(){return this.tag}static getInstreamAPITrackedObjectList(){return it.instreamAPITrackedObjectList}deleteAfterFlush(){super.deleteAfterFlush();const e=it.instreamAPITrackedObjectList.indexOf(this);e>-1&&it.instreamAPITrackedObjectList.splice(e,1)}getIABDurationThreshold(){return 2e3}getMetricsAggregator(){return this.metricsAggregator}}it.instreamAPITrackedObjectList=[];class st{constructor(e){this.id=e}getTrackedObjectDuration(e){throw new Error("Method not implemented.")}getDurationThreshold(e){throw new Error("Method not implemented.")}getId(){return this.id}isMeasurable(e){return!0}}class nt{getDurationThreshold(e){return nt.DURATION_THRESHOLD}getTrackedObjectDuration(e){return e.getMetricsAggregator().getIABDuration()}}nt.DURATION_THRESHOLD=1e3;class rt extends nt{getDurationThreshold(e){return rt.DURATION_THRESHOLD_VIDEO}}rt.DURATION_THRESHOLD_VIDEO=2e3;class at extends st{constructor(e){super(e)}getDurationThreshold(e){const t=e;if(t.getTag().hasCreativeDuration()){const e=at.SPOT_DURATION_FRACTION_REQUIRED*t.getTag().getCreativeDurationMilliseconds();return e>at.FIFTEEN_SECONDS_IN_MILLI?at.FIFTEEN_SECONDS_IN_MILLI:e}return 0}getTrackedObjectDuration(e){return e.getMetricsAggregator().getVideoGroupMVisibleDuration()}isMeasurable(e){const t=e;return!at.isInstreamOrUnknownContext(t)||t.hasReceivedSoundState()}static isGroupMVisible(e){const t=e.getTag().hasCreativeDuration(),i=e.getPercentVisible(),s=e.getTag();let n=at.SURFACE_FRACTION_REQUIRED;if(e.getVisibilityCalculator().getBannerSize().surface()>=at.GROUPM_LARGE_FORMAT_SURFACE&&!h.isMobile()&&(n=at.SURFACE_FRACTION_REQUIRED_LARGE_FORMAT),at.isInstreamOrUnknownContext(s)){const s=1===e.getTag().getSoundState();return i>=n&&t&&s}return i>=n&&t}static isInstreamOrUnknownContext(e){if(e.getTagURL().hasParameter("vctx")){const t=e.getTagURL().getParameterInt("vctx");return-1!==[at.PREROLL_METHOD_ID_VIDEO_CONTEXT,at.MIDROLL_METHOD_ID_VIDEO_CONTEXT,at.POSTROLL_METHOD_ID_VIDEO_CONTEXT,at.UNKNOWN_METHOD_ID_VIDEO_CONTEXT].indexOf(t)}return!1}isPreRollContext(e){return e.getTagURL().hasParameter("vctx")&&e.getTagURL().getParameterInt("vctx")===at.PREROLL_METHOD_ID_VIDEO_CONTEXT}}at.SPOT_DURATION_FRACTION_REQUIRED=.5,at.FIFTEEN_SECONDS_IN_MILLI=15e3,at.GROUPM_LARGE_FORMAT_SURFACE=3e5,at.SURFACE_FRACTION_REQUIRED=1,at.SURFACE_FRACTION_REQUIRED_LARGE_FORMAT=.8,at.UNKNOWN_METHOD_ID_VIDEO_CONTEXT=0,at.PREROLL_METHOD_ID_VIDEO_CONTEXT=1,at.MIDROLL_METHOD_ID_VIDEO_CONTEXT=2,at.POSTROLL_METHOD_ID_VIDEO_CONTEXT=3;class ot{constructor(){this.iabTrigger=null,this.iabState=new ut(this),this.customTrigger=null,this.customViewResult=new gt(this),this.clearingEventsManager=null,this.nativeEventsManager=null}init(e,t){this.tag=e,this.requestFormatter=this.tag.getRequestFormatter(),this.iabTrigger=t,this.createCustomTrigger(e),this.initClearingEventManager(),this.nativeEventsManager=new dt(this)}start(){this.updateIABViewResult(),this.updateCustomViewResult(),this.requestFormatter.requestFlush(Ze.RR_FIRST_REQUEST)}initClearingEventManager(){Et.hasClearingEvent(this)&&(this.clearingEventsManager=new Et(this))}createCustomTrigger(e){const t=e.getTagURL().getParameter("cid");t&&"3"===t&&this.setCustomTrigger(new ct(t))}postShot(){this.clearingEventsManager&&this.clearingEventsManager.postShot(),this.nativeEventsManager?.postShot(this),this.updateIABViewResult(),this.updateCustomViewResult(),ot.postShotCheckJsSignals()}isMeasurementInitialized(){const e=this.tag.getSearchStrategy().isWorking(),t=U.trackingLoader.isTrackingSupported(),i=U.trackingLoader.trackDisplay.isTrackingInitialized(),s=this.tag.getTimeFromCreation()<=ot.MIN_ACCEPTABLE_TIME_FOR_ADS_TO_LOAD;return!!(e&&t&&i)&&(this.tag.hasAtLeastOneObjectInitialized()||s||!!this.tag.getTagMetricsAggregator().getLastDeletedTrackedObjectData())}setCustomTrigger(e){this.customTrigger=e}updateIABViewResult(){const e=this.iabState.updateIABViewResultAndReturnTrackedObjectWhenItBecomesVisible();e&&(this.requestFormatter.setTrackedObject(e),this.requestFormatter.requestFlush(Ze.RR_PV_REQUEST))}updateCustomViewResult(){this.customTrigger&&this.customViewResult.updateCustomViewResultAndReturnTrackedObjectWhenItBecomesVisible()&&this.requestFormatter.requestFlush(Ze.RR_CUSTOM_PV_REQUEST)}shutDown(){}isFirstRequest(){return this.requestFormatter.isFirstRequest()}getCustomViewResult(){return this.customTrigger?this.customViewResult.getViewResult():null}getViewResult(){return this.iabState.getViewResult()}getCustomTrigger(){return this.customTrigger}static postShotCheckJsSignals(){const e=c.getTopAccessibleWindow();oe.hasMraidNamespace(e)&&C.notify(C.EXCEPTION_1005),Se.isInAppSupplyType()&&Ie.checkOuterMetrics(),h.elementHasDefined(e,"omid")&&C.notify(C.EXCEPTION_1300),_e.useOmidToSendRequest()&&C.notify(C.EXCEPTION_1340)}getTag(){return this.tag}getIabTrigger(){return this.iabTrigger}}ot.MIN_ACCEPTABLE_TIME_FOR_ADS_TO_LOAD=5e3;class ct extends st{constructor(e){super(e)}getDurationThreshold(e){return ct.DURATION_THRESHOLD}getTrackedObjectDuration(e){return e.getMetricsAggregator().getTime100PercentVisible()}}ct.DURATION_THRESHOLD=1e3;class lt extends ot{constructor(){super(...arguments),this.videoGroupMTrigger=null,this.hasPlayedAtLeastOnce=!1}initClearingEventManager(){Tt.hasClearingEvent(this)&&(this.clearingEventsManager=new Tt(this))}createCustomTrigger(e){const t=e.getTagURL().getParameter("cid");t&&("1"!==t&&"2"!==t&&"3"!==t||this.setCustomTrigger(new at(t)))}isMeasurementInitialized(){return U.trackingLoader.trackDisplay.isTrackingInitialized()&&this.tag.hasAtLeastOneObjectInitialized()}setCustomTrigger(e){super.setCustomTrigger(e),this.videoGroupMTrigger=e}getVideoGroupMTrigger(){return this.videoGroupMTrigger}getTag(){return this.tag}onPlay(){this.videoGroupMTrigger&&(this.customViewResult.isFinalState()||this.getTag().hasCreativeDuration()||(C.notify(C.EXCEPTION_1135),this.customViewResult.setNonMeasurableFinal(),this.requestFormatter.requestFlush(Ze.RR_CUSTOM_NM_REQUEST))),this.hasPlayedAtLeastOnce=!0}shutDown(){this.videoGroupMTrigger&&at.isInstreamOrUnknownContext(this.getTag())&&this.hasPlayedAtLeastOnce&&!this.getTag().hasReceivedSoundState()&&C.notify(C.EXCEPTION_1134)}}class dt{constructor(e){this.triggerManager=null,this.triggerManager=e,this.nativeEventList=this.triggerManager.getTag().getTagURL().getViewNativeEvents(),this.hasNativeEvent()&&this.nativeEventList.postShot(e)}hasNativeEvent(){return this.nativeEventList&&this.nativeEventList.getNbEvents()>0}postShot(e){this.hasNativeEvent()&&this.nativeEventList.postShot(e)}}class ht{}ht.NOT_VISIBLE="nv",ht.VISIBLE="pv",ht.NOT_MEASURABLE="nm";class ut{constructor(e){this._isFinalState=!1,this.currentState=ht.NOT_VISIBLE,this.nonViewableType=ut.NOT_VIEWABLE_REASON_TRACKING_ON,this.nonMeasurableType=-1,this.triggerManager=e}setNonVisible(){this._isFinalState||(this.currentState=ht.NOT_VISIBLE,this.updateIABNonViewableType())}setViewable(){this._isFinalState||(this.currentState=ht.VISIBLE,this._isFinalState=!0)}setNonMeasurableTemporary(e){this._isFinalState||(this.currentState=ht.NOT_MEASURABLE,this.nonMeasurableType=e)}setNonMeasurableFinal(e){this._isFinalState||(this.currentState=ht.NOT_MEASURABLE,this.nonMeasurableType=e,this._isFinalState=!0)}isFinalState(){return this._isFinalState}isViewable(){return this.currentState===ht.VISIBLE}isNonMeasurable(){return this.currentState===ht.NOT_MEASURABLE}getViewResult(){return this.isViewable()?ht.VISIBLE:this.isNonMeasurable()?`${ht.NOT_MEASURABLE}&nmt=${this.nonMeasurableType}`:`${this.currentState}&nvt=${this.nonViewableType}`}hasChangedStateToVisible(){if(this._isFinalState)return null;let e=null,t=-1;const i=this.triggerManager.getTag();for(let s=0;s=t&&a>=r&&(t=a,e=n)}return e?(this.setViewable(),e):null}updateIABViewResultAndReturnTrackedObjectWhenItBecomesVisible(){if(this._isFinalState)return null;return this.hasChangedStateToVisible()||(U.getContainer()&&!U.getContainer().isAppSupported()?this.setNonMeasurableFinal(ut.NOT_MEASURABLE_WEBVIEW):this.triggerManager.getTag().getSearchStrategy().isWorking()?this.triggerManager.isFirstRequest()?U.trackingLoader.isTrackingSupported()||this.setNonMeasurableFinal(ut.NOT_MEASURABLE_XD):U.trackingLoader.isTrackingSupported()?this.triggerManager.isMeasurementInitialized()?this.setNonVisible():U.trackingLoader.trackDisplay.isTrackingInitialized()&&!this.triggerManager.getTag().hasAtLeastOneObjectInitialized()?this.setNonMeasurableTemporary(ut.NOT_MEASURABLE_NO_OBJECT):this.setNonMeasurableTemporary(ut.NOT_MEASURABLE_NOT_INITIALIZED):this.setNonMeasurableTemporary(ut.NOT_MEASURABLE_XD):this.setNonMeasurableTemporary(ut.NOT_MEASURABLE_NATIVE_MACRO_NOT_REPLACED),null)}isIABVisibleWithoutDurationThreshold(){const e=this.triggerManager.getTag(),t=e.getTagMetricsAggregator().getLastDeletedTrackedObjectData();if(0===e.getTrackedObjectCount()&&t)return t.isIABVisibleWithoutDurationThreshold();for(let t=0;t=0&&n0)return!0}return!1}isVisibleWithoutIABSurfaceThreshold(){const e=this.triggerManager.getTag(),t=e.getTagMetricsAggregator().getLastDeletedTrackedObjectData();if(t)return t.isVisibleWithoutIABSurfaceThreshold();for(let t=0;t0&&n>0&&n0?e.getFirstObject().getVisibilityCalculator():null,s=t.getLastDeletedTrackedObjectData();this.triggerManager.isFirstRequest()?this.nonViewableType=ut.NOT_VIEWABLE_REASON_TRACKING_ON:e.getTimeFromCreation()<=ot.MIN_ACCEPTABLE_TIME_FOR_ADS_TO_LOAD&&!e.hasAtLeastOneObjectInitialized()?this.nonViewableType=ut.NOT_VIEWABLE_REASON_SHORT_SESSION_NO_CREATIVE_FOUND:U.getContainer()&&i&&U.getContainer().getVisibleRatio()<=i.getIABThreshold()?this.nonViewableType=ut.NOT_VIEWABLE_REASON_SDK_SAY_NOT_VISIBLE:U.isActive()?i&&i.isHiddenCreative()||s&&s.isHiddenCreative()?this.nonViewableType=ut.NOT_VIEWABLE_REASON_HIDDEN_CREATIVE:i&&i.isOutOfViewport()||s&&s.isOutOfViewport()?this.nonViewableType=ut.NOT_VIEWABLE_REASON_OUT_OF_VIEWPORT:this.isVisibleWithoutIABSurfaceThreshold()?this.nonViewableType=ut.NOT_VIEWABLE_REASON_SMALL_SURFACE_EXPOSITION:(this.nonViewableType=ut.NOT_VIEWABLE_REASON_SHORT_DURATION_EXPOSTION,this.isIABVisibleWithoutDurationThreshold()||C.notify(C.EXCEPTION_187)):c.isHidden()?this.nonViewableType=ut.NOT_VIEWABLE_REASON_PAGE_HIDDEN:w.hasFocus()?(C.notify(C.EXCEPTION_90),this.nonViewableType=ut.NOT_VIEWABLE_REASON_INACTIVE_60S):this.nonViewableType=ut.NOT_VIEWABLE_REASON_NO_FOCUS}}ut.NOT_VIEWABLE_REASON_TRACKING_ON=5,ut.NOT_VIEWABLE_REASON_SHORT_SESSION_NO_CREATIVE_FOUND=7,ut.NOT_VIEWABLE_REASON_SDK_SAY_NOT_VISIBLE=8,ut.NOT_VIEWABLE_REASON_PAGE_HIDDEN=9,ut.NOT_VIEWABLE_REASON_NO_FOCUS=10,ut.NOT_VIEWABLE_REASON_INACTIVE_60S=11,ut.NOT_VIEWABLE_REASON_HIDDEN_CREATIVE=12,ut.NOT_VIEWABLE_REASON_OUT_OF_VIEWPORT=13,ut.NOT_VIEWABLE_REASON_SMALL_SURFACE_EXPOSITION=14,ut.NOT_VIEWABLE_REASON_SHORT_DURATION_EXPOSTION=15,ut.NOT_MEASURABLE_XD=2,ut.NOT_MEASURABLE_NO_OBJECT=3,ut.NOT_MEASURABLE_NOT_INITIALIZED=4,ut.NOT_MEASURABLE_WEBVIEW=5,ut.NOT_MEASURABLE_NATIVE_MACRO_NOT_REPLACED=6;class gt{constructor(e){this._isFinalState=!1,this.currentState=ht.NOT_VISIBLE,this.triggerManager=e}setNonVisible(){this._isFinalState||(this.currentState=ht.NOT_VISIBLE)}setViewable(){this._isFinalState||(this.currentState=ht.VISIBLE,this._isFinalState=!0)}setNonMeasurableTemporary(){this._isFinalState||(this.currentState=ht.NOT_MEASURABLE)}setNonMeasurableFinal(){this._isFinalState||(this.currentState=ht.NOT_MEASURABLE,this._isFinalState=!0)}isFinalState(){return this._isFinalState}getViewResult(){return this.currentState}updateCustomViewResultAndReturnTrackedObjectWhenItBecomesVisible(){if(this._isFinalState)return null;if(this.triggerManager.isFirstRequest())this.triggerManager.getTag().getSearchStrategy().isWorking()&&U.trackingLoader.isTrackingSupported()||this.setNonMeasurableFinal();else if(this.triggerManager.isMeasurementInitialized()){this.setNonVisible();const e=this.triggerManager.getTag(),t=this.triggerManager.getCustomTrigger();let i=null,s=-1;for(let n=0;n=s&&o>=a&&a>0&&(s=o,i=r)}if(i)return this.setViewable(),i}else this.setNonMeasurableTemporary();return null}}class Et{constructor(e){this.triggerManager=null,this.clearingTrigger=null,this.clearingEventSent=!1,this.triggerManager=e,this.clearingTrigger=this.getTriggerFromClearingEventType(),this.clearingTrigger?C.notify(C.EXCEPTION_1180):C.notify(C.EXCEPTION_183)}getTriggerFromClearingEventType(){const e=this.triggerManager?.getTag().getTagURL().getParameter("cet");return Et.CLEARING_EVENT_TYPE_50PV1S===e?new nt:Et.CLEARING_EVENT_TYPE_100PV1S===e?new pt(e):null}static isValidClearingEventCallback(e){const t=e.getTag().getTagURL().getParameter("cecb");return!(!t||-1!==t.indexOf("AUCTION_EVENT_TYPE_CB"))}static hasClearingEvent(e){const t=e.getTag().getTagURL();return t.hasParameter("cet")&&"0"!==t.getParameter("cet")&&Et.isValidClearingEventCallback(e)}postShot(){if(this.clearingTrigger&&!this.clearingEventSent&&this.triggerManager?.isMeasurementInitialized()){let e=null,t=-1;const i=this.triggerManager.getTag();for(let s=0;s=t&&a>=r&&r>0&&(t=a,e=n)}e&&(this.sendClearingEvent(),this.clearingEventSent=!0)}}sendClearingEvent(){try{const e=this.triggerManager?.getTag().getTagURL().getParameter("cecb")+"";_e.sendRequestWithoutCookieAndReplaceSessionId(e,!1),C.notify(C.EXCEPTION_1179)}catch(e){C.notify(C.EXCEPTION_182)}}}Et.CLEARING_EVENT_TYPE_50PV1S="2",Et.CLEARING_EVENT_TYPE_100PV1S="6";class Tt extends Et{constructor(e){super(e)}getTriggerFromClearingEventType(){let e=super.getTriggerFromClearingEventType();if(!e){const t=this.triggerManager.getTag().getTagURL().getParameter("cet");Tt.CLEARING_EVENT_TYPE_50PV2S===t?e=new mt:Tt.CLEARING_EVENT_TYPE_100PV50PD===t&&(e=new at(t))}return e}postShot(){if(this.clearingTrigger&&!this.clearingEventSent&&this.triggerManager.isMeasurementInitialized()){let e=null,t=-1;const i=this.triggerManager.getTag();for(let s=0;s=t&&a>=r&&r>0&&(t=a,e=n)}e&&(this.sendClearingEvent(),this.clearingEventSent=!0)}}}Tt.CLEARING_EVENT_TYPE_50PV2S="8",Tt.CLEARING_EVENT_TYPE_100PV50PD="9";class mt{getDurationThreshold(e){return mt.DURATION_THRESHOLD}getTrackedObjectDuration(e){return e.getMetricsAggregator().getIABDuration()}}mt.DURATION_THRESHOLD=2e3;class pt extends st{constructor(e){super(e)}getDurationThreshold(e){return pt.DURATION_THRESHOLD}getTrackedObjectDuration(e){return e.getMetricsAggregator().getTime100PercentVisible()}}pt.DURATION_THRESHOLD=1e3;class Ot{refreshContent(){this.readTags(),this.processTags()}getScriptListLength(){return c.getNamespace().scs.length}getAndRemoveFirstScript(){return c.getNamespace().scs.shift()||null}loadIframe(e){}handleNewTagURL(e,t){}isOmidByDefault(){return!1}canHandleOmsdk(){return!0}initXDRDisplayApi(){}}class It{init(){It.initializeApiNative(c.getWindow()),It.readInits()}readTags(){It.synchronous||(It.readInits(),It.synchronous=!0)}static initializeApiNative(e){let t=e.xdrViewDisplay;t||(t={inits:[]},e.xdrViewDisplay=t),It.inits=t.inits,t.inits.push=function(e){Array.prototype.push.call(this,e),It.readInits()}}static readInits(){let e;for(;e=It.inits.shift();){C.notify(C.EXCEPTION_1316);const t=e.p;Pt.handleNewTagURL(null,t)}}}It.inits=[],It.synchronous=!1;class Ct{init(){Ct.isXdrViewApiCreatedBefore=Ct.hasXdrViewApi(),Ct.initializeApiNative(c.getWindow()),Ct.readInits()}processTags(){Ct.synchronous||(Ct.processNewVideoTagUrls(),Ct.readEvents(),Ct.synchronous=!0)}static hasXdrViewApi(){let e=!1,t=c.getWindow();for(;!e&&t;)e=Ct.hasXdrViewApiNative(t),t=R.getAccessibleParentWindow(t);return e}static hasXdrViewApiNative(e){return void 0!==e.xdrViewApi}static initializeApiNative(e){let t=e.xdrViewApi;t||(t={inits:[],events:[]}),Ct.inits=t.inits,Ct.events=t.events,t.inits.push=function(e){Array.prototype.push.call(this,e),Ct.readInits(),Ct.processNewVideoTagUrls()},t.events.push=function(e){Array.prototype.push.call(this,e),Ct.readEvents()}}static onClipEvent(e,t,i,s){t===Ct.START?(e.onClipPlayEvent(i),e.getTag().getTagURL().isFullscreen()&&e.onFullscreenOn()):t===Ct.RESUME?e.onClipResumeEvent(i):t===Ct.PAUSE?e.onClipPauseEvent(i):t===Ct.COMPLETE?e.onClipStopEvent(i,s):t===Ct.SKIP?e.onClipInterruptEvent(i,s):t===Ct.FULLSCREEN_ON?e.onFullscreenOn():t===Ct.FULLSCREEN_OFF?e.onFullscreenOff():t===Ct.SOUND_ON?e.getTag().onSoundOnEvent():t===Ct.SOUND_OFF&&e.getTag().onSoundOffEvent()}static readEvents(){let e;for(;e=Ct.events.shift();){Ct.synchronous&&U.checkDurationStatic();const t=it.getInstreamAPITrackedObjectList();for(let i=t.length-1;i>=0;i--){const s=t[i];s.getTag().getAdUID()===e.a&&Ct.onClipEvent(s,e.c,e.d,!Ct.synchronous)}}}static readInits(){let e;for(;e=Ct.inits.shift();)Ct.videoTagUrlCache.push(new fe("",e))}static processNewTagVideoUrl(e){let t;Ct._hasProcessedOneTagAtLeast=!0,C.notify(C.EXCEPTION_1330),t=e.getAdNode()?new xe(e.getAdNode()):new ke(e.getDomID()),De.addTag(new Qe(e,t))}static processNewVideoTagUrls(){let e=Ct.videoTagUrlCache.shift();for(;e;)Ct.processNewTagVideoUrl(e),e=Ct.videoTagUrlCache.shift()}static hasProcessedOneTagAtLeast(){return Ct._hasProcessedOneTagAtLeast}static isXdrViewApiHasBeenUsedAlready(){return Ct.hasProcessedOneTagAtLeast()||Ct.isXdrViewApiCreatedBefore}}Ct.START="start",Ct.PAUSE="pause",Ct.RESUME="resume",Ct.COMPLETE="complete",Ct.SKIP="skip",Ct.SOUND_ON="sound_on",Ct.SOUND_OFF="sound_off",Ct.FULLSCREEN_ON="fullscreen_on",Ct.FULLSCREEN_OFF="fullscreen_off",Ct.videoTagUrlCache=[],Ct._hasProcessedOneTagAtLeast=!1,Ct.isXdrViewApiCreatedBefore=!1,Ct.synchronous=!1;class _t{init(){_t.readTagsNative(c.getWindow())}processTags(){_t.processNewVideoTagUrls(),this.readCachedEvents(c.getWindow())}static readTagsNative(e){e.anxVVAPI={initializeFromParams:function(e,t,i,s,n,r,a,o,c,l){_t.readTagsFromParamsNative(e,t,i,s,l,n,r,a,o,c),_t.processNewVideoTagUrls()},notifyEvent:function(e,t){const i=g.getCurrentTime();_t.notifyEvent(e,t,i,!1)}};const t=e.anxVVAPICache;if(t){const e=t.init;if(e){let t;for(;t=e.shift();)_t.readTagsFromParamsNative(t.params,t.id,t.a,t.v,t.vb,t.dur,t.w,t.h,t.x,t.y)}}}static onClipEvent(e,t,i,s){t===_t.START?e.onClipPlayEvent(i):t===_t.RESUME?e.onClipResumeEvent(i):t===_t.PAUSE?e.onClipPauseEvent(i):t===_t.STOP?e.onClipStopEvent(i,s):t===_t.INTERRUPT?e.onClipInterruptEvent(i,s):t===_t.EXPAND?e.onFullscreenOn():t===_t.SOUND_ON?e.getTag().onSoundOnEvent():t===_t.SOUND_OFF?e.getTag().onSoundOffEvent():t===_t.COLLAPSE&&e.onFullscreenOff()}static readTagsFromParamsNative(e,t,i,s,n,r,a,o,c,l){r||(r=0),a||(a=-1),o||(o=-1),c||(c=0),l||(l=0),_t.readTagsFromParams(e,t,i,s,n,r,a,o,c,l)}static readTagsFromParams(e,t,i,s,n,r,a,o,c,l){n&&(e=e.concat("&native_event="+n)),_t.tagsVideoUrlCache.push(new fe(e,t,i,s,r))}readCachedEvents(e){const t=e.anxVVAPICache;if(t){const e=t.events;if(e){let t;for(;t=e.shift();)_t.notifyEvent(t.a,t.c,t.d,!0)}}}static processNewVideoTagUrls(){let e=_t.tagsVideoUrlCache.shift();for(;e;)_t.processNewTagVideoUrl(e),e=_t.tagsVideoUrlCache.shift()}static processNewTagVideoUrl(e){const t=new ke(e.getDomID());De.addTag(new Qe(e,t))}static notifyEvent(e,t,i,s){s||U.checkDurationStatic();const n=it.getInstreamAPITrackedObjectList();for(let r=n.length-1;r>=0;r--){const a=n[r];a.getTag().getAdUID()===e&&_t.onClipEvent(a,t,i,s)}}}_t.START="start",_t.PAUSE="pause",_t.RESUME="resume",_t.STOP="stop",_t.CLICK="click",_t.INTERRUPT="interrupt",_t.SOUND_ON="sound_on",_t.SOUND_OFF="sound_off",_t.EXPAND="expand",_t.COLLAPSE="collapse",_t.tagsVideoUrlCache=[];class St{constructor(){this.videoEventListener=new O(C.EXCEPTION_206,(e=>{const t=new pe(e),i=I.isAsync(t.getTimestamp());i||U.checkDurationStatic();const s=it.getInstreamAPITrackedObjectList();for(let e=s.length-1;e>=0;e--){const n=s[e],r=t.getTimestamp(),a=t.getType();if(a===St.START)n.getTag().onDurationReceived(t.getDuration()),n.onClipPlayEvent(r),t.getVolume()>0?n.getTag().onSoundOnEvent():n.getTag().onSoundOffEvent();else if(a===St.RESUME)n.onClipResumeEvent(r);else if(a===St.PAUSE)n.onClipPauseEvent(r);else if(a===St.COMPLETE)n.onClipStopEvent(r,i);else if(a===St.SKIPPED)n.onClipInterruptEvent(r,i);else if(a===St.SOUND_CHANGE)t.getVolume()>0?n.getTag().onSoundOnEvent():n.getTag().onSoundOffEvent();else if(a===St.PLAYER_STATE_CHANGE){const e=t.getPlayerStateChange();e===St.PLAYER_STATE_MINIMIZED||e===St.PLAYER_STATE_COLLAPSED?n.onFullscreenOff():e===St.PLAYER_STATE_EXPANDED||e===St.PLAYER_STATE_FULLSCREEN?n.onFullscreenOn():n.onFullscreenOff()}}}))}processTags(){let e=St.tagsVideoUrlCache.shift();for(;e;)this.processNewTagUrl(e),e=St.tagsVideoUrlCache.shift()}handleNewTagURL(e,t){const i=new fe(t,e);St.tagsVideoUrlCache.push(i),U.setLastReferenceElement(e)}processNewTagUrl(e){let t=null;t=I.isOMIDContextWithoutCreativeAccess()?new Be:e.getAdNode()?new xe(e.getAdNode()):new je,De.addTag(new Qe(e,t)),U.getContainer().setVideoListener(this.videoEventListener)}}St.tagsVideoUrlCache=[],St.START="start",St.PAUSE="pause",St.RESUME="resume",St.COMPLETE="complete",St.SKIPPED="skipped",St.SOUND_CHANGE="volumeChange",St.PLAYER_STATE_CHANGE="playerStateChange",St.PLAYER_STATE_MINIMIZED="minimized",St.PLAYER_STATE_COLLAPSED="collapsed",St.PLAYER_STATE_EXPANDED="expanded",St.PLAYER_STATE_FULLSCREEN="fullscreen";class ft extends Ot{constructor(){super(...arguments),this.scriptFound=!1,this.xdrDisplayApi=new It}initXDRDisplayApi(){this.xdrDisplayApi.init()}readTags(){const e=this.getScriptListLength();for(;!r()&&0!==this.getScriptListLength();){let e=!1;const t=this.getAndRemoveFirstScript();if(t){const i=t.getAttribute("src")||"";if(-1!==i.indexOf("#")){const s=i.substring(i.indexOf("#")+1);e=this.addScriptAddon(s,t)}if(!e){const i=n(t);e=this.readParametersOnDivElement(i)}}e||(e=this.searchForDivTagInTheWholeWindow(c.getWindow()))}this.xdrDisplayApi.readTags(),e!==ft.tagsUrlCache.length&&(he.isOmidSupported()||C.notify(C.EXCEPTION_110))}readParametersOnDivElement(e){const t=e.getAttribute(ft.TAG_ATTRIBUTE_NAME);if(t&&t.startsWith(g.getScriptId())){const i=t.replace(g.getScriptId(),"");return e.setAttribute(ft.TAG_ATTRIBUTE_NAME,i),this.handleNewTagURL(e,i),!0}return!1}addScriptAddon(e,t){if(!ae.getElementProperty(t,ft.TAG_ATTRIBUTE_NAME)){t.setAttribute(ft.TAG_ATTRIBUTE_NAME,"1");const i=e.replace(g.getScriptId(),"");return this.handleNewTagURL(t,i),!0}return!1}searchForDivTagInTheWholeWindow(e){const t=ne.getElementsByTagName(e,"div");for(let e=0;e{if(!c.getBodyElement(c.getWindow())){if(5!==e)return void(e+=1);C.notify(C.EXCEPTION_1184)}t.cancel(),this.initializeTracking()}),C.EXCEPTION_85);t.scheduleRepeating(80)}static getUseIntersectionObserver(){return bt.useIntersectionObserver}}bt.useIntersectionObserver=!1},242:(e,t)=>{}},t={};function i(s){var n=t[s];if(void 0!==n)return n.exports;var r=t[s]={exports:{}};return e[s](r,r.exports,i),r.exports}i.d=(e,t)=>{for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};let s={scriptHostBaseURI:"//adsdkdevstand.azureedge.net/viewability",scriptHostBaseURIConsentLess:"//adsdkdevstand.azureedge.net/viewability"};i(242),function(e,t){void 0===window[e]&&(window[e]={});const i=window[e],{scriptHostBaseURI:n,scriptHostBaseURIConsentLess:r}=s;i[t]=function(){const e=n,s=r;let a,o,c;"undefined"==typeof window?(i.isJsContext=!0,o={},a={parent:null,body:{},document:o,setTimeout:window.omidNative.setTimeout,setInterval:window.omidNative.setInterval,clearTimeout:window.omidNative.clearTimeout,clearInterval:window.omidNative.clearInterval,location:{href:""},navigator:{userAgent:"iPhone"},Error:{}},a.top=a,a.parent=a):(a=window,o=document),i.$wnd=a,i.base=e,i.scs||(i.scs=[],i.si="v",i.it=(new Date).getTime(),i.rqs=[],i.ts={},i.myo={});let l=o.currentScript;if(!i.isJsContext&&!l){const t=document.getElementsByTagName("script");for(let i=t.length-1;i>=0;i--){const n=t[i];if(!n.fnd&&n.src&&(-1!==n.src.indexOf(e)||-1!==n.src.indexOf(s))){l=n,n.fnd=!0;break}}}l&&(i.it=(new Date).getTime()),i.scs.push(l),i[t].onScriptLoad=function(e){i[t]=null,c=e,c&&(i.n?i.n():c(void 0,t,"",void 0))}};try{i[t]()}catch(e){}return i[t].onScriptLoad}("_lntv","s")((()=>{Promise.resolve().then(i.bind(i,902)).then((({Tracking:e})=>{(new e).onModuleLoad()})).catch((e=>{console.log("Error loading tracking module",e)}))}))})();