@bygd/gd-sdk-pes 1.43.35 → 1.43.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/newArrowCheck"),n=require("@babel/runtime/helpers/typeof"),r=require("@babel/runtime/regenerator"),a=require("@bygd/gd-sdk-era/dist/default"),i=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/classCallCheck"),o=require("@babel/runtime/helpers/defineProperty"),d=require("url-parse"),u=require("js-base64"),c=require("validator"),l=require("is-valid-domain"),h=require("get-value"),f=require("set-value"),p=require("lodash.clonedeep"),m=require("events"),v=require("@fnet/inter-service-js"),g=require("ua-parser-js"),A=require("@babel/runtime/helpers/toConsumableArray"),b=require("can-autoplay"),y=require("is-plain-object"),_=require("querystringify"),w=require("lodash.merge"),k=require("uuid"),x=require("@flownet/lib-connect-to-tcf");function E(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var D=E(e),S=E(t),R=E(n),T=E(r),I=E(i),C=E(s),O=E(o),P=E(d),L=E(c),B=E(l),U=E(h),M=E(f),F=E(p),j=E(v),G=E(g),N=E(A),q=E(b),H=E(_),V=E(w),Q=E(x),z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},W=function(e){return e&&e.Math==Math&&e},K=W("object"==typeof globalThis&&globalThis)||W("object"==typeof window&&window)||W("object"==typeof self&&self)||W("object"==typeof z&&z)||function(){return this}()||Function("return this")(),Y={exports:{}},J=K,X=Object.defineProperty,Z=function(e,t){try{X(J,e,{value:t,configurable:!0,writable:!0})}catch(n){J[e]=t}return t},$=Z,ee="__core-js_shared__",te=K[ee]||$(ee,{}),ne=te;(Y.exports=function(e,t){return ne[e]||(ne[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE",source:"https://github.com/zloirock/core-js"});var re,ae,ie=function(e){try{return!!e()}catch(e){return!0}},se=!ie((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),oe=se,de=Function.prototype,ue=de.call,ce=oe&&de.bind.bind(ue,ue),le=oe?ce:function(e){return function(){return ue.apply(e,arguments)}},he=function(e){return null==e},fe=he,pe=TypeError,me=function(e){if(fe(e))throw pe("Can't call method on "+e);return e},ve=me,ge=Object,Ae=function(e){return ge(ve(e))},be=Ae,ye=le({}.hasOwnProperty),_e=Object.hasOwn||function(e,t){return ye(be(e),t)},we=le,ke=0,xe=Math.random(),Ee=we(1..toString),De=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Ee(++ke+xe,36)},Se="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Re=K,Te=Se,Ie=Re.process,Ce=Re.Deno,Oe=Ie&&Ie.versions||Ce&&Ce.version,Pe=Oe&&Oe.v8;Pe&&(ae=(re=Pe.split("."))[0]>0&&re[0]<4?1:+(re[0]+re[1])),!ae&&Te&&(!(re=Te.match(/Edge\/(\d+)/))||re[1]>=74)&&(re=Te.match(/Chrome\/(\d+)/))&&(ae=+re[1]);var Le=ae,Be=Le,Ue=ie,Me=!!Object.getOwnPropertySymbols&&!Ue((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Be&&Be<41})),Fe=Me&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,je=K,Ge=Y.exports,Ne=_e,qe=De,He=Me,Ve=Fe,Qe=je.Symbol,ze=Ge("wks"),We=Ve?Qe.for||Qe:Qe&&Qe.withoutSetter||qe,Ke=function(e){return Ne(ze,e)||(ze[e]=He&&Ne(Qe,e)?Qe[e]:We("Symbol."+e)),ze[e]},Ye={};Ye[Ke("toStringTag")]="z";var Je="[object z]"===String(Ye),Xe="object"==typeof document&&document.all,Ze={all:Xe,IS_HTMLDDA:void 0===Xe&&void 0!==Xe},$e=Ze.all,et=Ze.IS_HTMLDDA?function(e){return"function"==typeof e||e===$e}:function(e){return"function"==typeof e},tt={},nt=!ie((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),rt=et,at=Ze.all,it=Ze.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:rt(e)||e===at}:function(e){return"object"==typeof e?null!==e:rt(e)},st=it,ot=K.document,dt=st(ot)&&st(ot.createElement),ut=function(e){return dt?ot.createElement(e):{}},ct=ut,lt=!nt&&!ie((function(){return 7!=Object.defineProperty(ct("div"),"a",{get:function(){return 7}}).a})),ht=nt&&ie((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ft=it,pt=String,mt=TypeError,vt=function(e){if(ft(e))return e;throw mt(pt(e)+" is not an object")},gt=se,At=Function.prototype.call,bt=gt?At.bind(At):function(){return At.apply(At,arguments)},yt=K,_t=et,wt=function(e,t){return arguments.length<2?(n=yt[e],_t(n)?n:void 0):yt[e]&&yt[e][t];var n},kt=le({}.isPrototypeOf),xt=wt,Et=et,Dt=kt,St=Object,Rt=Fe?function(e){return"symbol"==typeof e}:function(e){var t=xt("Symbol");return Et(t)&&Dt(t.prototype,St(e))},Tt=String,It=function(e){try{return Tt(e)}catch(e){return"Object"}},Ct=et,Ot=It,Pt=TypeError,Lt=function(e){if(Ct(e))return e;throw Pt(Ot(e)+" is not a function")},Bt=Lt,Ut=he,Mt=function(e,t){var n=e[t];return Ut(n)?void 0:Bt(n)},Ft=bt,jt=et,Gt=it,Nt=TypeError,qt=bt,Ht=it,Vt=Rt,Qt=Mt,zt=function(e,t){var n,r;if("string"===t&&jt(n=e.toString)&&!Gt(r=Ft(n,e)))return r;if(jt(n=e.valueOf)&&!Gt(r=Ft(n,e)))return r;if("string"!==t&&jt(n=e.toString)&&!Gt(r=Ft(n,e)))return r;throw Nt("Can't convert object to primitive value")},Wt=TypeError,Kt=Ke("toPrimitive"),Yt=function(e,t){if(!Ht(e)||Vt(e))return e;var n,r=Qt(e,Kt);if(r){if(void 0===t&&(t="default"),n=qt(r,e,t),!Ht(n)||Vt(n))return n;throw Wt("Can't convert object to primitive value")}return void 0===t&&(t="number"),zt(e,t)},Jt=Rt,Xt=function(e){var t=Yt(e,"string");return Jt(t)?t:t+""},Zt=nt,$t=lt,en=ht,tn=vt,nn=Xt,rn=TypeError,an=Object.defineProperty,sn=Object.getOwnPropertyDescriptor,on="enumerable",dn="configurable",un="writable";tt.f=Zt?en?function(e,t,n){if(tn(e),t=nn(t),tn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&un in n&&!n[un]){var r=sn(e,t);r&&r[un]&&(e[t]=n.value,n={configurable:dn in n?n[dn]:r[dn],enumerable:on in n?n[on]:r[on],writable:!1})}return an(e,t,n)}:an:function(e,t,n){if(tn(e),t=nn(t),tn(n),$t)try{return an(e,t,n)}catch(e){}if("get"in n||"set"in n)throw rn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var cn={exports:{}},ln=nt,hn=_e,fn=Function.prototype,pn=ln&&Object.getOwnPropertyDescriptor,mn=hn(fn,"name"),vn={EXISTS:mn,PROPER:mn&&"something"===function(){}.name,CONFIGURABLE:mn&&(!ln||ln&&pn(fn,"name").configurable)},gn=et,An=te,bn=le(Function.toString);gn(An.inspectSource)||(An.inspectSource=function(e){return bn(e)});var yn,_n,wn,kn=An.inspectSource,xn=et,En=K.WeakMap,Dn=xn(En)&&/native code/.test(String(En)),Sn=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Rn=tt,Tn=Sn,In=nt?function(e,t,n){return Rn.f(e,t,Tn(1,n))}:function(e,t,n){return e[t]=n,e},Cn=Y.exports,On=De,Pn=Cn("keys"),Ln=function(e){return Pn[e]||(Pn[e]=On(e))},Bn={},Un=Dn,Mn=K,Fn=it,jn=In,Gn=_e,Nn=te,qn=Ln,Hn=Bn,Vn="Object already initialized",Qn=Mn.TypeError,zn=Mn.WeakMap;if(Un||Nn.state){var Wn=Nn.state||(Nn.state=new zn);Wn.get=Wn.get,Wn.has=Wn.has,Wn.set=Wn.set,yn=function(e,t){if(Wn.has(e))throw Qn(Vn);return t.facade=e,Wn.set(e,t),t},_n=function(e){return Wn.get(e)||{}},wn=function(e){return Wn.has(e)}}else{var Kn=qn("state");Hn[Kn]=!0,yn=function(e,t){if(Gn(e,Kn))throw Qn(Vn);return t.facade=e,jn(e,Kn,t),t},_n=function(e){return Gn(e,Kn)?e[Kn]:{}},wn=function(e){return Gn(e,Kn)}}var Yn={set:yn,get:_n,has:wn,enforce:function(e){return wn(e)?_n(e):yn(e,{})},getterFor:function(e){return function(t){var n;if(!Fn(t)||(n=_n(t)).type!==e)throw Qn("Incompatible receiver, "+e+" required");return n}}},Jn=le,Xn=ie,Zn=et,$n=_e,er=nt,tr=vn.CONFIGURABLE,nr=kn,rr=Yn.enforce,ar=Yn.get,ir=String,sr=Object.defineProperty,or=Jn("".slice),dr=Jn("".replace),ur=Jn([].join),cr=er&&!Xn((function(){return 8!==sr((function(){}),"length",{value:8}).length})),lr=String(String).split("String"),hr=cn.exports=function(e,t,n){"Symbol("===or(ir(t),0,7)&&(t="["+dr(ir(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!$n(e,"name")||tr&&e.name!==t)&&(er?sr(e,"name",{value:t,configurable:!0}):e.name=t),cr&&n&&$n(n,"arity")&&e.length!==n.arity&&sr(e,"length",{value:n.arity});try{n&&$n(n,"constructor")&&n.constructor?er&&sr(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=rr(e);return $n(r,"source")||(r.source=ur(lr,"string"==typeof t?t:"")),e};Function.prototype.toString=hr((function(){return Zn(this)&&ar(this).source||nr(this)}),"toString");var fr=et,pr=tt,mr=cn.exports,vr=Z,gr=function(e,t,n,r){r||(r={});var a=r.enumerable,i=void 0!==r.name?r.name:t;if(fr(n)&&mr(n,i,r),r.global)a?e[t]=n:vr(t,n);else{try{r.unsafe?e[t]&&(a=!0):delete e[t]}catch(e){}a?e[t]=n:pr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},Ar=le,br=Ar({}.toString),yr=Ar("".slice),_r=function(e){return yr(br(e),8,-1)},wr=Je,kr=et,xr=_r,Er=Ke("toStringTag"),Dr=Object,Sr="Arguments"==xr(function(){return arguments}()),Rr=wr?xr:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Dr(e),Er))?n:Sr?xr(t):"Object"==(r=xr(t))&&kr(t.callee)?"Arguments":r},Tr=Rr,Ir=Je?{}.toString:function(){return"[object "+Tr(this)+"]"};Je||gr(Object.prototype,"toString",Ir,{unsafe:!0});var Cr={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Or=ut("span").classList,Pr=Or&&Or.constructor&&Or.constructor.prototype,Lr=Pr===Object.prototype?void 0:Pr,Br=_r,Ur=le,Mr=function(e){if("Function"===Br(e))return Ur(e)},Fr=Lt,jr=se,Gr=Mr(Mr.bind),Nr=function(e,t){return Fr(e),void 0===t?e:jr?Gr(e,t):function(){return e.apply(t,arguments)}},qr=ie,Hr=_r,Vr=Object,Qr=le("".split),zr=qr((function(){return!Vr("z").propertyIsEnumerable(0)}))?function(e){return"String"==Hr(e)?Qr(e,""):Vr(e)}:Vr,Wr=Math.ceil,Kr=Math.floor,Yr=Math.trunc||function(e){var t=+e;return(t>0?Kr:Wr)(t)},Jr=function(e){var t=+e;return t!=t||0===t?0:Yr(t)},Xr=Jr,Zr=Math.min,$r=function(e){return e>0?Zr(Xr(e),9007199254740991):0},ea=$r,ta=function(e){return ea(e.length)},na=_r,ra=Array.isArray||function(e){return"Array"==na(e)},aa=le,ia=ie,sa=et,oa=Rr,da=kn,ua=function(){},ca=[],la=wt("Reflect","construct"),ha=/^\s*(?:class|function)\b/,fa=aa(ha.exec),pa=!ha.exec(ua),ma=function(e){if(!sa(e))return!1;try{return la(ua,ca,e),!0}catch(e){return!1}},va=function(e){if(!sa(e))return!1;switch(oa(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return pa||!!fa(ha,da(e))}catch(e){return!0}};va.sham=!0;var ga=!la||ia((function(){var e;return ma(ma.call)||!ma(Object)||!ma((function(){e=!0}))||e}))?va:ma,Aa=ra,ba=ga,ya=it,_a=Ke("species"),wa=Array,ka=function(e){var t;return Aa(e)&&(t=e.constructor,(ba(t)&&(t===wa||Aa(t.prototype))||ya(t)&&null===(t=t[_a]))&&(t=void 0)),void 0===t?wa:t},xa=function(e,t){return new(ka(e))(0===t?0:t)},Ea=Nr,Da=zr,Sa=Ae,Ra=ta,Ta=xa,Ia=le([].push),Ca=function(e){var t=1==e,n=2==e,r=3==e,a=4==e,i=6==e,s=7==e,o=5==e||i;return function(d,u,c,l){for(var h,f,p=Sa(d),m=Da(p),v=Ea(u,c),g=Ra(m),A=0,b=l||Ta,y=t?b(d,g):n||s?b(d,0):void 0;g>A;A++)if((o||A in m)&&(f=v(h=m[A],A,p),e))if(t)y[A]=f;else if(f)switch(e){case 3:return!0;case 5:return h;case 6:return A;case 2:Ia(y,h)}else switch(e){case 4:return!1;case 7:Ia(y,h)}return i?-1:r||a?a:y}},Oa={forEach:Ca(0),map:Ca(1),filter:Ca(2),some:Ca(3),every:Ca(4),find:Ca(5),findIndex:Ca(6),filterReject:Ca(7)},Pa=ie,La=function(e,t){var n=[][e];return!!n&&Pa((function(){n.call(null,t||function(){return 1},1)}))},Ba=Oa.forEach,Ua=K,Ma=Cr,Fa=Lr,ja=La("forEach")?[].forEach:function(e){return Ba(this,e,arguments.length>1?arguments[1]:void 0)},Ga=In,Na=function(e){if(e&&e.forEach!==ja)try{Ga(e,"forEach",ja)}catch(t){e.forEach=ja}};for(var qa in Ma)Ma[qa]&&Na(Ua[qa]&&Ua[qa].prototype);Na(Fa);var Ha={},Va={},Qa={}.propertyIsEnumerable,za=Object.getOwnPropertyDescriptor,Wa=za&&!Qa.call({1:2},1);Va.f=Wa?function(e){var t=za(this,e);return!!t&&t.enumerable}:Qa;var Ka=zr,Ya=me,Ja=function(e){return Ka(Ya(e))},Xa=nt,Za=bt,$a=Va,ei=Sn,ti=Ja,ni=Xt,ri=_e,ai=lt,ii=Object.getOwnPropertyDescriptor;Ha.f=Xa?ii:function(e,t){if(e=ti(e),t=ni(t),ai)try{return ii(e,t)}catch(e){}if(ri(e,t))return ei(!Za($a.f,e,t),e[t])};var si={},oi=Jr,di=Math.max,ui=Math.min,ci=function(e,t){var n=oi(e);return n<0?di(n+t,0):ui(n,t)},li=Ja,hi=ci,fi=ta,pi=function(e){return function(t,n,r){var a,i=li(t),s=fi(i),o=hi(r,s);if(e&&n!=n){for(;s>o;)if((a=i[o++])!=a)return!0}else for(;s>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},mi={includes:pi(!0),indexOf:pi(!1)},vi=_e,gi=Ja,Ai=mi.indexOf,bi=Bn,yi=le([].push),_i=function(e,t){var n,r=gi(e),a=0,i=[];for(n in r)!vi(bi,n)&&vi(r,n)&&yi(i,n);for(;t.length>a;)vi(r,n=t[a++])&&(~Ai(i,n)||yi(i,n));return i},wi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ki=_i,xi=wi.concat("length","prototype");si.f=Object.getOwnPropertyNames||function(e){return ki(e,xi)};var Ei={};Ei.f=Object.getOwnPropertySymbols;var Di=wt,Si=si,Ri=Ei,Ti=vt,Ii=le([].concat),Ci=Di("Reflect","ownKeys")||function(e){var t=Si.f(Ti(e)),n=Ri.f;return n?Ii(t,n(e)):t},Oi=_e,Pi=Ci,Li=Ha,Bi=tt,Ui=function(e,t,n){for(var r=Pi(t),a=Bi.f,i=Li.f,s=0;s<r.length;s++){var o=r[s];Oi(e,o)||n&&Oi(n,o)||a(e,o,i(t,o))}},Mi=ie,Fi=et,ji=/#|\.prototype\./,Gi=function(e,t){var n=qi[Ni(e)];return n==Vi||n!=Hi&&(Fi(t)?Mi(t):!!t)},Ni=Gi.normalize=function(e){return String(e).replace(ji,".").toLowerCase()},qi=Gi.data={},Hi=Gi.NATIVE="N",Vi=Gi.POLYFILL="P",Qi=Gi,zi=K,Wi=Ha.f,Ki=In,Yi=gr,Ji=Z,Xi=Ui,Zi=Qi,$i=function(e,t){var n,r,a,i,s,o=e.target,d=e.global,u=e.stat;if(n=d?zi:u?zi[o]||Ji(o,{}):(zi[o]||{}).prototype)for(r in t){if(i=t[r],a=e.dontCallGetSet?(s=Wi(n,r))&&s.value:n[r],!Zi(d?r:o+(u?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;Xi(i,a)}(e.sham||a&&a.sham)&&Ki(i,"sham",!0),Yi(n,r,i,e)}},es=_i,ts=wi,ns=Object.keys||function(e){return es(e,ts)},rs=Ae,as=ns;$i({target:"Object",stat:!0,forced:ie((function(){as(1)}))},{keys:function(e){return as(rs(e))}});var is=Rr,ss=String,os=function(e){if("Symbol"===is(e))throw TypeError("Cannot convert a Symbol value to a string");return ss(e)},ds=vt,us=function(){var e=ds(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},cs=ie,ls=K.RegExp,hs=cs((function(){var e=ls("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),fs=hs||cs((function(){return!ls("a","y").sticky})),ps={BROKEN_CARET:hs||cs((function(){var e=ls("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:fs,UNSUPPORTED_Y:hs},ms={},vs=nt,gs=ht,As=tt,bs=vt,ys=Ja,_s=ns;ms.f=vs&&!gs?Object.defineProperties:function(e,t){bs(e);for(var n,r=ys(t),a=_s(t),i=a.length,s=0;i>s;)As.f(e,n=a[s++],r[n]);return e};var ws,ks=wt("document","documentElement"),xs=vt,Es=ms,Ds=wi,Ss=Bn,Rs=ks,Ts=ut,Is="prototype",Cs="script",Os=Ln("IE_PROTO"),Ps=function(){},Ls=function(e){return"<"+Cs+">"+e+"</"+Cs+">"},Bs=function(e){e.write(Ls("")),e.close();var t=e.parentWindow.Object;return e=null,t},Us=function(){try{ws=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Us="undefined"!=typeof document?document.domain&&ws?Bs(ws):(t=Ts("iframe"),n="java"+Cs+":",t.style.display="none",Rs.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Ls("document.F=Object")),e.close(),e.F):Bs(ws);for(var r=Ds.length;r--;)delete Us[Is][Ds[r]];return Us()};Ss[Os]=!0;var Ms=Object.create||function(e,t){var n;return null!==e?(Ps[Is]=xs(e),n=new Ps,Ps[Is]=null,n[Os]=e):n=Us(),void 0===t?n:Es.f(n,t)},Fs=ie,js=K.RegExp,Gs=Fs((function(){var e=js(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Ns=ie,Hs=K.RegExp,Vs=Ns((function(){var e=Hs("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Qs=bt,zs=le,Ws=os,Ks=us,Ys=ps,Js=Y.exports,Xs=Ms,Zs=Yn.get,$s=Gs,eo=Vs,to=Js("native-string-replace",String.prototype.replace),no=RegExp.prototype.exec,ro=no,ao=zs("".charAt),so=zs("".indexOf),oo=zs("".replace),uo=zs("".slice),co=function(){var e=/a/,t=/b*/g;return Qs(no,e,"a"),Qs(no,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),lo=Ys.BROKEN_CARET,ho=void 0!==/()??/.exec("")[1];(co||ho||lo||$s||eo)&&(ro=function(e){var t,n,r,a,i,s,o,d=this,u=Zs(d),c=Ws(e),l=u.raw;if(l)return l.lastIndex=d.lastIndex,t=Qs(ro,l,c),d.lastIndex=l.lastIndex,t;var h=u.groups,f=lo&&d.sticky,p=Qs(Ks,d),m=d.source,v=0,g=c;if(f&&(p=oo(p,"y",""),-1===so(p,"g")&&(p+="g"),g=uo(c,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==ao(c,d.lastIndex-1))&&(m="(?: "+m+")",g=" "+g,v++),n=new RegExp("^(?:"+m+")",p)),ho&&(n=new RegExp("^"+m+"$(?!\\s)",p)),co&&(r=d.lastIndex),a=Qs(no,f?n:d,g),f?a?(a.input=uo(a.input,v),a[0]=uo(a[0],v),a.index=d.lastIndex,d.lastIndex+=a[0].length):d.lastIndex=0:co&&a&&(d.lastIndex=d.global?a.index+a[0].length:r),ho&&a&&a.length>1&&Qs(to,a[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(a[i]=void 0)})),a&&h)for(a.groups=s=Xs(null),i=0;i<h.length;i++)s[(o=h[i])[0]]=a[o[1]];return a});var fo=ro;$i({target:"RegExp",proto:!0,forced:/./.exec!==fo},{exec:fo});var po=Array.isArray,mo=Object.prototype.toString,vo=po||function(e){return!!e&&"[object Array]"==mo.call(e)},go={name:"@bygd/gd-sdk-pes",version:"1.43.35",files:["dist/*"],scripts:{build:"NODE_ENV=production rollup --config",watch:"rollup --config --watch --sourcemap inline --environment DEVELOPMENT","deploy-base":"npm install && npm run build && npm publish --access public",deploy:"npm run deploy-base && gdtool pm-upload"},repository:{type:"git",url:"git@gitlab.azerdev.com:gamedistribution/gd-sdk-pes.git"},author:"",license:"ISC",devDependencies:{"@babel/core":"^7.14.6","@babel/plugin-transform-runtime":"^7.14.5","@babel/preset-env":"^7.14.7","@rollup/plugin-babel":"^5.2.3","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-replace":"^3.0.0",postcss:"^8.3.5",rollup:"^2.52.8","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-browsersync":"^1.3.3","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-polyfills":"^0.2.1","rollup-plugin-peer-deps-external":"^2.2.4","rollup-plugin-postcss":"^4.0.0","rollup-plugin-terser":"^7.0.2"},dependencies:{"@babel/runtime":"^7.14.6","@bygd/gd-sdk-era":"^0.3.6","@flownet/lib-connect-to-tcf":"^0.2.10","@fnet/inter-service-js":"^0.9.4",axios:"^0.26.1","can-autoplay":"^3.0.2",events:"^3.3.0","get-value":"^3.0.1","is-plain-object":"^5.0.0","is-valid-domain":"^0.1.2","js-base64":"^3.6.1","leaderboard-lib":"0.1.11","lodash.clonedeep":"^4.5.0","lodash.merge":"^4.6.2",querystringify:"^2.2.0","set-value":"^4.1.0","url-parse":"^1.4.7",uuid:"^8.3.2",validator:"^13.6.0","ua-parser-js":"^0.7.21"}},Ao=function(e){var t=bo("object"===R.default(e)?e:a.parseJSON(e));return t&&t.version?go.version>=t.version?t:void 0:t},bo=function(e){var t=this;if(!vo(e)||0===e.length)return e;if(1===e.length)return e[0];var n=0;e.forEach(function(e){S.default(this,t),e.weight=e.weight||1,n+=e.weight}.bind(this));var r=Math.floor(Math.random()*Math.floor(n));n=0;for(var a=0;a<e.length;a++){var i=e[a];if(r<(n+=i.weight))return i}};var yo=function(){},_o=function(){var e;(e=console).log.apply(e,arguments)},wo=function(){var e;(e=console).log.apply(e,arguments)};JSON.stringify({adapters:{default:["ima","adsense","ima","adsense"],preroll:["ima","adsense","ima","adsense"],midroll:["ima","adsense","ima","adsense"],rewarded:["ima","adsense","ima","adsense"]}}),JSON.stringify({adapters:{default:["ima","adsense","ima","adsense"],preroll:["ima","adsense","ima"],midroll:["ima","adsense","ima"],rewarded:["ima","adsense","ima","adsense"]}});var ko={},xo={},Eo=Xt,Do=tt,So=Sn,Ro=function(e,t,n){var r=Eo(t);r in e?Do.f(e,r,So(0,n)):e[r]=n},To=ci,Io=ta,Co=Ro,Oo=Array,Po=Math.max,Lo=function(e,t,n){for(var r=Io(e),a=To(t,r),i=To(void 0===n?r:n,r),s=Oo(Po(i-a,0)),o=0;a<i;a++,o++)Co(s,o,e[a]);return s.length=o,s},Bo=_r,Uo=Ja,Mo=si.f,Fo=Lo,jo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];xo.f=function(e){return jo&&"Window"==Bo(e)?function(e){try{return Mo(e)}catch(e){return Fo(jo)}}(e):Mo(Uo(e))};var Go=cn.exports,No=tt,qo=function(e,t,n){return n.get&&Go(n.get,t,{getter:!0}),n.set&&Go(n.set,t,{setter:!0}),No.f(e,t,n)},Ho={},Vo=Ke;Ho.f=Vo;var Qo=K,zo=_e,Wo=Ho,Ko=tt.f,Yo=function(e){var t=Qo.Symbol||(Qo.Symbol={});zo(t,e)||Ko(t,e,{value:Wo.f(e)})},Jo=bt,Xo=wt,Zo=Ke,$o=gr,ed=tt.f,td=_e,nd=Ke("toStringTag"),rd=function(e,t,n){e&&!n&&(e=e.prototype),e&&!td(e,nd)&&ed(e,nd,{configurable:!0,value:t})},ad=$i,id=K,sd=bt,od=le,dd=nt,ud=Me,cd=ie,ld=_e,hd=kt,fd=vt,pd=Ja,md=Xt,vd=os,gd=Sn,Ad=Ms,bd=ns,yd=si,_d=xo,wd=Ei,kd=Ha,xd=tt,Ed=ms,Dd=Va,Sd=gr,Rd=qo,Td=Y.exports,Id=Bn,Cd=De,Od=Ke,Pd=Ho,Ld=Yo,Bd=function(){var e=Xo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=Zo("toPrimitive");t&&!t[r]&&$o(t,r,(function(e){return Jo(n,this)}),{arity:1})},Ud=rd,Md=Yn,Fd=Oa.forEach,jd=Ln("hidden"),Gd="Symbol",Nd="prototype",qd=Md.set,Hd=Md.getterFor(Gd),Vd=Object[Nd],Qd=id.Symbol,zd=Qd&&Qd[Nd],Wd=id.TypeError,Kd=id.QObject,Yd=kd.f,Jd=xd.f,Xd=_d.f,Zd=Dd.f,$d=od([].push),eu=Td("symbols"),tu=Td("op-symbols"),nu=Td("wks"),ru=!Kd||!Kd[Nd]||!Kd[Nd].findChild,au=dd&&cd((function(){return 7!=Ad(Jd({},"a",{get:function(){return Jd(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Yd(Vd,t);r&&delete Vd[t],Jd(e,t,n),r&&e!==Vd&&Jd(Vd,t,r)}:Jd,iu=function(e,t){var n=eu[e]=Ad(zd);return qd(n,{type:Gd,tag:e,description:t}),dd||(n.description=t),n},su=function(e,t,n){e===Vd&&su(tu,t,n),fd(e);var r=md(t);return fd(n),ld(eu,r)?(n.enumerable?(ld(e,jd)&&e[jd][r]&&(e[jd][r]=!1),n=Ad(n,{enumerable:gd(0,!1)})):(ld(e,jd)||Jd(e,jd,gd(1,{})),e[jd][r]=!0),au(e,r,n)):Jd(e,r,n)},ou=function(e,t){fd(e);var n=pd(t),r=bd(n).concat(lu(n));return Fd(r,(function(t){dd&&!sd(du,n,t)||su(e,t,n[t])})),e},du=function(e){var t=md(e),n=sd(Zd,this,t);return!(this===Vd&&ld(eu,t)&&!ld(tu,t))&&(!(n||!ld(this,t)||!ld(eu,t)||ld(this,jd)&&this[jd][t])||n)},uu=function(e,t){var n=pd(e),r=md(t);if(n!==Vd||!ld(eu,r)||ld(tu,r)){var a=Yd(n,r);return!a||!ld(eu,r)||ld(n,jd)&&n[jd][r]||(a.enumerable=!0),a}},cu=function(e){var t=Xd(pd(e)),n=[];return Fd(t,(function(e){ld(eu,e)||ld(Id,e)||$d(n,e)})),n},lu=function(e){var t=e===Vd,n=Xd(t?tu:pd(e)),r=[];return Fd(n,(function(e){!ld(eu,e)||t&&!ld(Vd,e)||$d(r,eu[e])})),r};ud||(Sd(zd=(Qd=function(){if(hd(zd,this))throw Wd("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?vd(arguments[0]):void 0,t=Cd(e),n=function(e){this===Vd&&sd(n,tu,e),ld(this,jd)&&ld(this[jd],t)&&(this[jd][t]=!1),au(this,t,gd(1,e))};return dd&&ru&&au(Vd,t,{configurable:!0,set:n}),iu(t,e)})[Nd],"toString",(function(){return Hd(this).tag})),Sd(Qd,"withoutSetter",(function(e){return iu(Cd(e),e)})),Dd.f=du,xd.f=su,Ed.f=ou,kd.f=uu,yd.f=_d.f=cu,wd.f=lu,Pd.f=function(e){return iu(Od(e),e)},dd&&(Rd(zd,"description",{configurable:!0,get:function(){return Hd(this).description}}),Sd(Vd,"propertyIsEnumerable",du,{unsafe:!0}))),ad({global:!0,constructor:!0,wrap:!0,forced:!ud,sham:!ud},{Symbol:Qd}),Fd(bd(nu),(function(e){Ld(e)})),ad({target:Gd,stat:!0,forced:!ud},{useSetter:function(){ru=!0},useSimple:function(){ru=!1}}),ad({target:"Object",stat:!0,forced:!ud,sham:!dd},{create:function(e,t){return void 0===t?Ad(e):ou(Ad(e),t)},defineProperty:su,defineProperties:ou,getOwnPropertyDescriptor:uu}),ad({target:"Object",stat:!0,forced:!ud},{getOwnPropertyNames:cu}),Bd(),Ud(Qd,Gd),Id[jd]=!0;var hu=Me&&!!Symbol.for&&!!Symbol.keyFor,fu=$i,pu=wt,mu=_e,vu=os,gu=Y.exports,Au=hu,bu=gu("string-to-symbol-registry"),yu=gu("symbol-to-string-registry");fu({target:"Symbol",stat:!0,forced:!Au},{for:function(e){var t=vu(e);if(mu(bu,t))return bu[t];var n=pu("Symbol")(t);return bu[t]=n,yu[n]=t,n}});var _u=$i,wu=_e,ku=Rt,xu=It,Eu=hu,Du=(0,Y.exports)("symbol-to-string-registry");_u({target:"Symbol",stat:!0,forced:!Eu},{keyFor:function(e){if(!ku(e))throw TypeError(xu(e)+" is not a symbol");if(wu(Du,e))return Du[e]}});var Su=se,Ru=Function.prototype,Tu=Ru.apply,Iu=Ru.call,Cu="object"==typeof Reflect&&Reflect.apply||(Su?Iu.bind(Tu):function(){return Iu.apply(Tu,arguments)}),Ou=le([].slice),Pu=ra,Lu=et,Bu=_r,Uu=os,Mu=le([].push),Fu=$i,ju=wt,Gu=Cu,Nu=bt,qu=le,Hu=ie,Vu=et,Qu=Rt,zu=Ou,Wu=function(e){if(Lu(e))return e;if(Pu(e)){for(var t=e.length,n=[],r=0;r<t;r++){var a=e[r];"string"==typeof a?Mu(n,a):"number"!=typeof a&&"Number"!=Bu(a)&&"String"!=Bu(a)||Mu(n,Uu(a))}var i=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if(Pu(this))return t;for(var r=0;r<i;r++)if(n[r]===e)return t}}},Ku=Me,Yu=String,Ju=ju("JSON","stringify"),Xu=qu(/./.exec),Zu=qu("".charAt),$u=qu("".charCodeAt),ec=qu("".replace),tc=qu(1..toString),nc=/[\uD800-\uDFFF]/g,rc=/^[\uD800-\uDBFF]$/,ac=/^[\uDC00-\uDFFF]$/,ic=!Ku||Hu((function(){var e=ju("Symbol")();return"[null]"!=Ju([e])||"{}"!=Ju({a:e})||"{}"!=Ju(Object(e))})),sc=Hu((function(){return'"\\udf06\\ud834"'!==Ju("\udf06\ud834")||'"\\udead"'!==Ju("\udead")})),oc=function(e,t){var n=zu(arguments),r=Wu(t);if(Vu(r)||void 0!==e&&!Qu(e))return n[1]=function(e,t){if(Vu(r)&&(t=Nu(r,this,Yu(e),t)),!Qu(t))return t},Gu(Ju,null,n)},dc=function(e,t,n){var r=Zu(n,t-1),a=Zu(n,t+1);return Xu(rc,e)&&!Xu(ac,a)||Xu(ac,e)&&!Xu(rc,r)?"\\u"+tc($u(e,0),16):e};Ju&&Fu({target:"JSON",stat:!0,arity:3,forced:ic||sc},{stringify:function(e,t,n){var r=zu(arguments),a=Gu(ic?oc:Ju,null,r);return sc&&"string"==typeof a?ec(a,nc,dc):a}});var uc=Ei,cc=Ae;$i({target:"Object",stat:!0,forced:!Me||ie((function(){uc.f(1)}))},{getOwnPropertySymbols:function(e){var t=uc.f;return t?t(cc(e)):[]}});var lc=ie,hc=Le,fc=Ke("species"),pc=function(e){return hc>=51||!lc((function(){var t=[];return(t.constructor={})[fc]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},mc=Oa.filter;$i({target:"Array",proto:!0,forced:!pc("filter")},{filter:function(e){return mc(this,e,arguments.length>1?arguments[1]:void 0)}});var vc=$i,gc=ie,Ac=Ja,bc=Ha.f,yc=nt;vc({target:"Object",stat:!0,forced:!yc||gc((function(){bc(1)})),sham:!yc},{getOwnPropertyDescriptor:function(e,t){return bc(Ac(e),t)}});var _c=Ci,wc=Ja,kc=Ha,xc=Ro;$i({target:"Object",stat:!0,sham:!nt},{getOwnPropertyDescriptors:function(e){for(var t,n,r=wc(e),a=kc.f,i=_c(r),s={},o=0;i.length>o;)void 0!==(n=a(r,t=i[o++]))&&xc(s,t,n);return s}});var Ec=$i,Dc=ra,Sc=ga,Rc=it,Tc=ci,Ic=ta,Cc=Ja,Oc=Ro,Pc=Ke,Lc=Ou,Bc=pc("slice"),Uc=Pc("species"),Mc=Array,Fc=Math.max;Ec({target:"Array",proto:!0,forced:!Bc},{slice:function(e,t){var n,r,a,i=Cc(this),s=Ic(i),o=Tc(e,s),d=Tc(void 0===t?s:t,s);if(Dc(i)&&(n=i.constructor,(Sc(n)&&(n===Mc||Dc(n.prototype))||Rc(n)&&null===(n=n[Uc]))&&(n=void 0),n===Mc||void 0===n))return Lc(i,o,d);for(r=new(void 0===n?Mc:n)(Fc(d-o,0)),a=0;o<d;o++,a++)o in i&&Oc(r,a,i[o]);return r.length=a,r}});var jc=bt,Gc=vt,Nc=Mt,qc=function(e,t,n){var r,a;Gc(e);try{if(!(r=Nc(e,"return"))){if("throw"===t)throw n;return n}r=jc(r,e)}catch(e){a=!0,r=e}if("throw"===t)throw n;if(a)throw r;return Gc(r),n},Hc=vt,Vc=qc,Qc={},zc=Qc,Wc=Ke("iterator"),Kc=Array.prototype,Yc=function(e){return void 0!==e&&(zc.Array===e||Kc[Wc]===e)},Jc=Rr,Xc=Mt,Zc=he,$c=Qc,el=Ke("iterator"),tl=function(e){if(!Zc(e))return Xc(e,el)||Xc(e,"@@iterator")||$c[Jc(e)]},nl=bt,rl=Lt,al=vt,il=It,sl=tl,ol=TypeError,dl=function(e,t){var n=arguments.length<2?sl(e):t;if(rl(n))return al(nl(n,e));throw ol(il(e)+" is not iterable")},ul=Nr,cl=bt,ll=Ae,hl=function(e,t,n,r){try{return r?t(Hc(n)[0],n[1]):t(n)}catch(t){Vc(e,"throw",t)}},fl=Yc,pl=ga,ml=ta,vl=Ro,gl=dl,Al=tl,bl=Array,yl=function(e){var t=ll(e),n=pl(this),r=arguments.length,a=r>1?arguments[1]:void 0,i=void 0!==a;i&&(a=ul(a,r>2?arguments[2]:void 0));var s,o,d,u,c,l,h=Al(t),f=0;if(!h||this===bl&&fl(h))for(s=ml(t),o=n?new this(s):bl(s);s>f;f++)l=i?a(t[f],f):t[f],vl(o,f,l);else for(c=(u=gl(t,h)).next,o=n?new this:[];!(d=cl(c,u)).done;f++)l=i?hl(u,a,[d.value,f],!0):d.value,vl(o,f,l);return o.length=f,o},_l=Ke("iterator"),wl=!1;try{var kl=0,xl={next:function(){return{done:!!kl++}},return:function(){wl=!0}};xl[_l]=function(){return this},Array.from(xl,(function(){throw 2}))}catch(e){}var El=function(e,t){if(!t&&!wl)return!1;var n=!1;try{var r={};r[_l]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Dl=yl;$i({target:"Array",stat:!0,forced:!El((function(e){Array.from(e)}))},{from:Dl});var Sl,Rl,Tl,Il=le,Cl=Jr,Ol=os,Pl=me,Ll=Il("".charAt),Bl=Il("".charCodeAt),Ul=Il("".slice),Ml=function(e){return function(t,n){var r,a,i=Ol(Pl(t)),s=Cl(n),o=i.length;return s<0||s>=o?e?"":void 0:(r=Bl(i,s))<55296||r>56319||s+1===o||(a=Bl(i,s+1))<56320||a>57343?e?Ll(i,s):r:e?Ul(i,s,s+2):a-56320+(r-55296<<10)+65536}},Fl={codeAt:Ml(!1),charAt:Ml(!0)},jl=!ie((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Gl=_e,Nl=et,ql=Ae,Hl=jl,Vl=Ln("IE_PROTO"),Ql=Object,zl=Ql.prototype,Wl=Hl?Ql.getPrototypeOf:function(e){var t=ql(e);if(Gl(t,Vl))return t[Vl];var n=t.constructor;return Nl(n)&&t instanceof n?n.prototype:t instanceof Ql?zl:null},Kl=ie,Yl=et,Jl=it,Xl=Wl,Zl=gr,$l=Ke("iterator"),eh=!1;[].keys&&("next"in(Tl=[].keys())?(Rl=Xl(Xl(Tl)))!==Object.prototype&&(Sl=Rl):eh=!0);var th=!Jl(Sl)||Kl((function(){var e={};return Sl[$l].call(e)!==e}));th&&(Sl={}),Yl(Sl[$l])||Zl(Sl,$l,(function(){return this}));var nh={IteratorPrototype:Sl,BUGGY_SAFARI_ITERATORS:eh},rh=nh.IteratorPrototype,ah=Ms,ih=Sn,sh=rd,oh=Qc,dh=function(){return this},uh=function(e,t,n,r){var a=t+" Iterator";return e.prototype=ah(rh,{next:ih(+!r,n)}),sh(e,a,!1),oh[a]=dh,e},ch=le,lh=Lt,hh=et,fh=String,ph=TypeError,mh=function(e,t,n){try{return ch(lh(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},vh=vt,gh=function(e){if("object"==typeof e||hh(e))return e;throw ph("Can't set "+fh(e)+" as a prototype")},Ah=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=mh(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return vh(n),gh(r),t?e(n,r):n.__proto__=r,n}}():void 0),bh=$i,yh=bt,_h=et,wh=uh,kh=Wl,xh=Ah,Eh=rd,Dh=In,Sh=gr,Rh=Qc,Th=vn.PROPER,Ih=vn.CONFIGURABLE,Ch=nh.IteratorPrototype,Oh=nh.BUGGY_SAFARI_ITERATORS,Ph=Ke("iterator"),Lh="keys",Bh="values",Uh="entries",Mh=function(){return this},Fh=function(e,t,n,r,a,i,s){wh(n,t,r);var o,d,u,c=function(e){if(e===a&&m)return m;if(!Oh&&e in f)return f[e];switch(e){case Lh:case Bh:case Uh:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,f=e.prototype,p=f[Ph]||f["@@iterator"]||a&&f[a],m=!Oh&&p||c(a),v="Array"==t&&f.entries||p;if(v&&(o=kh(v.call(new e)))!==Object.prototype&&o.next&&(kh(o)!==Ch&&(xh?xh(o,Ch):_h(o[Ph])||Sh(o,Ph,Mh)),Eh(o,l,!0)),Th&&a==Bh&&p&&p.name!==Bh&&(Ih?Dh(f,"name",Bh):(h=!0,m=function(){return yh(p,this)})),a)if(d={values:c(Bh),keys:i?m:c(Lh),entries:c(Uh)},s)for(u in d)(Oh||h||!(u in f))&&Sh(f,u,d[u]);else bh({target:t,proto:!0,forced:Oh||h},d);return f[Ph]!==m&&Sh(f,Ph,m,{name:a}),Rh[t]=m,d},jh=function(e,t){return{value:e,done:t}},Gh=Fl.charAt,Nh=os,qh=Yn,Hh=Fh,Vh=jh,Qh="String Iterator",zh=qh.set,Wh=qh.getterFor(Qh);Hh(String,"String",(function(e){zh(this,{type:Qh,string:Nh(e),index:0})}),(function(){var e,t=Wh(this),n=t.string,r=t.index;return r>=n.length?Vh(void 0,!0):(e=Gh(n,r),t.index+=e.length,Vh(e,!1))}));var Kh=$i,Yh=nt,Jh=le,Xh=_e,Zh=et,$h=kt,ef=os,tf=qo,nf=Ui,rf=K.Symbol,af=rf&&rf.prototype;if(Yh&&Zh(rf)&&(!("description"in af)||void 0!==rf().description)){var sf={},of=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:ef(arguments[0]),t=$h(af,this)?new rf(e):void 0===e?rf():rf(e);return""===e&&(sf[t]=!0),t};nf(of,rf),of.prototype=af,af.constructor=of;var df="Symbol(test)"==String(rf("test")),uf=Jh(af.valueOf),cf=Jh(af.toString),lf=/^Symbol\((.*)\)[^)]+$/,hf=Jh("".replace),ff=Jh("".slice);tf(af,"description",{configurable:!0,get:function(){var e=uf(this);if(Xh(sf,e))return"";var t=cf(e),n=df?ff(t,7,-1):hf(t,lf,"$1");return""===n?void 0:n}}),Kh({global:!0,constructor:!0,forced:!0},{Symbol:of})}Yo("iterator");var pf=Ke,mf=Ms,vf=tt.f,gf=pf("unscopables"),Af=Array.prototype;null==Af[gf]&&vf(Af,gf,{configurable:!0,value:mf(null)});var bf=function(e){Af[gf][e]=!0},yf=Ja,_f=bf,wf=Qc,kf=Yn,xf=tt.f,Ef=Fh,Df=jh,Sf=nt,Rf="Array Iterator",Tf=kf.set,If=kf.getterFor(Rf),Cf=Ef(Array,"Array",(function(e,t){Tf(this,{type:Rf,target:yf(e),index:0,kind:t})}),(function(){var e=If(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,Df(void 0,!0)):Df("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),Of=wf.Arguments=wf.Array;if(_f("keys"),_f("values"),_f("entries"),Sf&&"values"!==Of.name)try{xf(Of,"name",{value:"values"})}catch(e){}var Pf=K,Lf=Cr,Bf=Lr,Uf=Cf,Mf=In,Ff=Ke,jf=Ff("iterator"),Gf=Ff("toStringTag"),Nf=Uf.values,qf=function(e,t){if(e){if(e[jf]!==Nf)try{Mf(e,jf,Nf)}catch(t){e[jf]=Nf}if(e[Gf]||Mf(e,Gf,t),Lf[t])for(var n in Uf)if(e[n]!==Uf[n])try{Mf(e,n,Uf[n])}catch(t){e[n]=Uf[n]}}};for(var Hf in Lf)qf(Pf[Hf]&&Pf[Hf].prototype,Hf);qf(Bf,"DOMTokenList");var Vf,Qf,zf,Wf,Kf="undefined"!=typeof process&&"process"==_r(process),Yf=wt,Jf=qo,Xf=nt,Zf=Ke("species"),$f=function(e){var t=Yf(e);Xf&&t&&!t[Zf]&&Jf(t,Zf,{configurable:!0,get:function(){return this}})},ep=kt,tp=TypeError,np=function(e,t){if(ep(t,e))return e;throw tp("Incorrect invocation")},rp=ga,ap=It,ip=TypeError,sp=vt,op=function(e){if(rp(e))return e;throw ip(ap(e)+" is not a constructor")},dp=he,up=Ke("species"),cp=function(e,t){var n,r=sp(e).constructor;return void 0===r||dp(n=sp(r)[up])?t:op(n)},lp=TypeError,hp=function(e,t){if(e<t)throw lp("Not enough arguments");return e},fp=/(?:ipad|iphone|ipod).*applewebkit/i.test(Se),pp=K,mp=Cu,vp=Nr,gp=et,Ap=_e,bp=ie,yp=ks,_p=Ou,wp=ut,kp=hp,xp=fp,Ep=Kf,Dp=pp.setImmediate,Sp=pp.clearImmediate,Rp=pp.process,Tp=pp.Dispatch,Ip=pp.Function,Cp=pp.MessageChannel,Op=pp.String,Pp=0,Lp={},Bp="onreadystatechange";bp((function(){Vf=pp.location}));var Up=function(e){if(Ap(Lp,e)){var t=Lp[e];delete Lp[e],t()}},Mp=function(e){return function(){Up(e)}},Fp=function(e){Up(e.data)},jp=function(e){pp.postMessage(Op(e),Vf.protocol+"//"+Vf.host)};Dp&&Sp||(Dp=function(e){kp(arguments.length,1);var t=gp(e)?e:Ip(e),n=_p(arguments,1);return Lp[++Pp]=function(){mp(t,void 0,n)},Qf(Pp),Pp},Sp=function(e){delete Lp[e]},Ep?Qf=function(e){Rp.nextTick(Mp(e))}:Tp&&Tp.now?Qf=function(e){Tp.now(Mp(e))}:Cp&&!xp?(Wf=(zf=new Cp).port2,zf.port1.onmessage=Fp,Qf=vp(Wf.postMessage,Wf)):pp.addEventListener&&gp(pp.postMessage)&&!pp.importScripts&&Vf&&"file:"!==Vf.protocol&&!bp(jp)?(Qf=jp,pp.addEventListener("message",Fp,!1)):Qf=Bp in wp("script")?function(e){yp.appendChild(wp("script"))[Bp]=function(){yp.removeChild(this),Up(e)}}:function(e){setTimeout(Mp(e),0)});var Gp={set:Dp,clear:Sp},Np=function(){this.head=null,this.tail=null};Np.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var qp,Hp,Vp,Qp,zp,Wp=Np,Kp=/ipad|iphone|ipod/i.test(Se)&&"undefined"!=typeof Pebble,Yp=/web0s(?!.*chrome)/i.test(Se),Jp=K,Xp=Nr,Zp=Ha.f,$p=Gp.set,em=Wp,tm=fp,nm=Kp,rm=Yp,am=Kf,im=Jp.MutationObserver||Jp.WebKitMutationObserver,sm=Jp.document,om=Jp.process,dm=Jp.Promise,um=Zp(Jp,"queueMicrotask"),cm=um&&um.value;if(!cm){var lm=new em,hm=function(){var e,t;for(am&&(e=om.domain)&&e.exit();t=lm.get();)try{t()}catch(e){throw lm.head&&qp(),e}e&&e.enter()};tm||am||rm||!im||!sm?!nm&&dm&&dm.resolve?((Qp=dm.resolve(void 0)).constructor=dm,zp=Xp(Qp.then,Qp),qp=function(){zp(hm)}):am?qp=function(){om.nextTick(hm)}:($p=Xp($p,Jp),qp=function(){$p(hm)}):(Hp=!0,Vp=sm.createTextNode(""),new im(hm).observe(Vp,{characterData:!0}),qp=function(){Vp.data=Hp=!Hp}),cm=function(e){lm.head||qp(),lm.add(e)}}var fm=cm,pm=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},mm=K.Promise,vm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,gm=!vm&&!Kf&&"object"==typeof window&&"object"==typeof document,Am=K,bm=mm,ym=et,_m=Qi,wm=kn,km=Ke,xm=gm,Em=vm,Dm=Le;bm&&bm.prototype;var Sm=km("species"),Rm=!1,Tm=ym(Am.PromiseRejectionEvent),Im=_m("Promise",(function(){var e=wm(bm),t=e!==String(bm);if(!t&&66===Dm)return!0;if(!Dm||Dm<51||!/native code/.test(e)){var n=new bm((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Sm]=r,!(Rm=n.then((function(){}))instanceof r))return!0}return!t&&(xm||Em)&&!Tm})),Cm={CONSTRUCTOR:Im,REJECTION_EVENT:Tm,SUBCLASSING:Rm},Om={},Pm=Lt,Lm=TypeError,Bm=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Lm("Bad Promise constructor");t=e,n=r})),this.resolve=Pm(t),this.reject=Pm(n)};Om.f=function(e){return new Bm(e)};var Um,Mm,Fm,jm=$i,Gm=Kf,Nm=K,qm=bt,Hm=gr,Vm=Ah,Qm=rd,zm=$f,Wm=Lt,Km=et,Ym=it,Jm=np,Xm=cp,Zm=Gp.set,$m=fm,ev=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},tv=pm,nv=Wp,rv=Yn,av=mm,iv=Om,sv="Promise",ov=Cm.CONSTRUCTOR,dv=Cm.REJECTION_EVENT,uv=Cm.SUBCLASSING,cv=rv.getterFor(sv),lv=rv.set,hv=av&&av.prototype,fv=av,pv=hv,mv=Nm.TypeError,vv=Nm.document,gv=Nm.process,Av=iv.f,bv=Av,yv=!!(vv&&vv.createEvent&&Nm.dispatchEvent),_v="unhandledrejection",wv=function(e){var t;return!(!Ym(e)||!Km(t=e.then))&&t},kv=function(e,t){var n,r,a,i=t.value,s=1==t.state,o=s?e.ok:e.fail,d=e.resolve,u=e.reject,c=e.domain;try{o?(s||(2===t.rejection&&Rv(t),t.rejection=1),!0===o?n=i:(c&&c.enter(),n=o(i),c&&(c.exit(),a=!0)),n===e.promise?u(mv("Promise-chain cycle")):(r=wv(n))?qm(r,n,d,u):d(n)):u(i)}catch(e){c&&!a&&c.exit(),u(e)}},xv=function(e,t){e.notified||(e.notified=!0,$m((function(){for(var n,r=e.reactions;n=r.get();)kv(n,e);e.notified=!1,t&&!e.rejection&&Dv(e)})))},Ev=function(e,t,n){var r,a;yv?((r=vv.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Nm.dispatchEvent(r)):r={promise:t,reason:n},!dv&&(a=Nm["on"+e])?a(r):e===_v&&ev("Unhandled promise rejection",n)},Dv=function(e){qm(Zm,Nm,(function(){var t,n=e.facade,r=e.value;if(Sv(e)&&(t=tv((function(){Gm?gv.emit("unhandledRejection",r,n):Ev(_v,n,r)})),e.rejection=Gm||Sv(e)?2:1,t.error))throw t.value}))},Sv=function(e){return 1!==e.rejection&&!e.parent},Rv=function(e){qm(Zm,Nm,(function(){var t=e.facade;Gm?gv.emit("rejectionHandled",t):Ev("rejectionhandled",t,e.value)}))},Tv=function(e,t,n){return function(r){e(t,r,n)}},Iv=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,xv(e,!0))},Cv=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw mv("Promise can't be resolved itself");var r=wv(t);r?$m((function(){var n={done:!1};try{qm(r,t,Tv(Cv,n,e),Tv(Iv,n,e))}catch(t){Iv(n,t,e)}})):(e.value=t,e.state=1,xv(e,!1))}catch(t){Iv({done:!1},t,e)}}};if(ov&&(pv=(fv=function(e){Jm(this,pv),Wm(e),qm(Um,this);var t=cv(this);try{e(Tv(Cv,t),Tv(Iv,t))}catch(e){Iv(t,e)}}).prototype,(Um=function(e){lv(this,{type:sv,done:!1,notified:!1,parent:!1,reactions:new nv,rejection:!1,state:0,value:void 0})}).prototype=Hm(pv,"then",(function(e,t){var n=cv(this),r=Av(Xm(this,fv));return n.parent=!0,r.ok=!Km(e)||e,r.fail=Km(t)&&t,r.domain=Gm?gv.domain:void 0,0==n.state?n.reactions.add(r):$m((function(){kv(r,n)})),r.promise})),Mm=function(){var e=new Um,t=cv(e);this.promise=e,this.resolve=Tv(Cv,t),this.reject=Tv(Iv,t)},iv.f=Av=function(e){return e===fv||undefined===e?new Mm(e):bv(e)},Km(av)&&hv!==Object.prototype)){Fm=hv.then,uv||Hm(hv,"then",(function(e,t){var n=this;return new fv((function(e,t){qm(Fm,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete hv.constructor}catch(e){}Vm&&Vm(hv,pv)}jm({global:!0,constructor:!0,wrap:!0,forced:ov},{Promise:fv}),Qm(fv,sv,!1),zm(sv);var Ov=Nr,Pv=bt,Lv=vt,Bv=It,Uv=Yc,Mv=ta,Fv=kt,jv=dl,Gv=tl,Nv=qc,qv=TypeError,Hv=function(e,t){this.stopped=e,this.result=t},Vv=Hv.prototype,Qv=function(e,t,n){var r,a,i,s,o,d,u,c=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),f=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),m=Ov(t,c),v=function(e){return r&&Nv(r,"normal",e),new Hv(!0,e)},g=function(e){return l?(Lv(e),p?m(e[0],e[1],v):m(e[0],e[1])):p?m(e,v):m(e)};if(h)r=e.iterator;else if(f)r=e;else{if(!(a=Gv(e)))throw qv(Bv(e)+" is not iterable");if(Uv(a)){for(i=0,s=Mv(e);s>i;i++)if((o=g(e[i]))&&Fv(Vv,o))return o;return new Hv(!1)}r=jv(e,a)}for(d=h?e.next:r.next;!(u=Pv(d,r)).done;){try{o=g(u.value)}catch(e){Nv(r,"throw",e)}if("object"==typeof o&&o&&Fv(Vv,o))return o}return new Hv(!1)},zv=mm,Wv=Cm.CONSTRUCTOR||!El((function(e){zv.all(e).then(void 0,(function(){}))})),Kv=bt,Yv=Lt,Jv=Om,Xv=pm,Zv=Qv;$i({target:"Promise",stat:!0,forced:Wv},{all:function(e){var t=this,n=Jv.f(t),r=n.resolve,a=n.reject,i=Xv((function(){var n=Yv(t.resolve),i=[],s=0,o=1;Zv(e,(function(e){var d=s++,u=!1;o++,Kv(n,t,e).then((function(e){u||(u=!0,i[d]=e,--o||r(i))}),a)})),--o||r(i)}));return i.error&&a(i.value),n.promise}});var $v=$i,eg=Cm.CONSTRUCTOR,tg=mm,ng=wt,rg=et,ag=gr,ig=tg&&tg.prototype;if($v({target:"Promise",proto:!0,forced:eg,real:!0},{catch:function(e){return this.then(void 0,e)}}),rg(tg)){var sg=ng("Promise").prototype.catch;ig.catch!==sg&&ag(ig,"catch",sg,{unsafe:!0})}var og=bt,dg=Lt,ug=Om,cg=pm,lg=Qv;$i({target:"Promise",stat:!0,forced:Wv},{race:function(e){var t=this,n=ug.f(t),r=n.reject,a=cg((function(){var a=dg(t.resolve);lg(e,(function(e){og(a,t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}});var hg=bt,fg=Om;$i({target:"Promise",stat:!0,forced:Cm.CONSTRUCTOR},{reject:function(e){var t=fg.f(this);return hg(t.reject,void 0,e),t.promise}});var pg=vt,mg=it,vg=Om,gg=function(e,t){if(pg(e),mg(t)&&t.constructor===e)return t;var n=vg.f(e);return(0,n.resolve)(t),n.promise},Ag=$i,bg=Cm.CONSTRUCTOR,yg=gg;wt("Promise"),Ag({target:"Promise",stat:!0,forced:bg},{resolve:function(e){return yg(this,e)}});var _g=TypeError,wg=$i,kg=ie,xg=ra,Eg=it,Dg=Ae,Sg=ta,Rg=function(e){if(e>9007199254740991)throw _g("Maximum allowed index exceeded");return e},Tg=Ro,Ig=xa,Cg=pc,Og=Le,Pg=Ke("isConcatSpreadable"),Lg=Og>=51||!kg((function(){var e=[];return e[Pg]=!1,e.concat()[0]!==e})),Bg=function(e){if(!Eg(e))return!1;var t=e[Pg];return void 0!==t?!!t:xg(e)};wg({target:"Array",proto:!0,arity:1,forced:!Lg||!Cg("concat")},{concat:function(e){var t,n,r,a,i,s=Dg(this),o=Ig(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(Bg(i=-1===t?s:arguments[t]))for(a=Sg(i),Rg(d+a),n=0;n<a;n++,d++)n in i&&Tg(o,d,i[n]);else Rg(d+1),Tg(o,d++,i);return o.length=d,o}});var Ug=nt,Mg=vn.EXISTS,Fg=le,jg=qo,Gg=Function.prototype,Ng=Fg(Gg.toString),qg=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Hg=Fg(qg.exec);function Vg(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Qg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qg(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function Qg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zg(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Ug&&!Mg&&jg(Gg,"name",{configurable:!0,get:function(){try{return Hg(qg,Ng(this))[1]}catch(e){return""}}});var Kg,Yg={react:{src:"https://pm.azerioncircle.com/react/16.14.0/umd/react.production.min.js",name:"React"},"react-dom":{src:"https://pm.azerioncircle.com/react-dom/16.14.0/umd/react-dom.production.min.js",name:"ReactDOM"},redux:{src:"https://pm.azerioncircle.com/redux/4.0.5/dist/redux.min.js",name:"Redux"},"react-redux":{src:"https://pm.azerioncircle.com/react-redux/7.2.1/dist/react-redux.min.js",name:"ReactRedux"},"material-ui-core":{src:"https://pm.azerioncircle.com/@material-ui/core/4.11.3/umd/material-ui.production.min.js",name:"MaterialUI"}},Jg={},Xg=function(e,t){Jg[e]=Wg(Wg({},t),{},{isLoading:!1})},Zg=function(e){var t=this,n=e.id,r=e.src;return new Promise(function(e,a){if(S.default(this,t),document.getElementById(n))e();else{var i=document.createElement("script");i.onload=function(){e()},i.id=n,i.setAttribute("crossorigin",!0),i.src=r,document.head.appendChild(i)}}.bind(this))},$g=function(){var e=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=window[t])){e.next=3;break}return e.abrupt("return",n);case 3:if(!(r=Jg[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:r.isLoading=!0,a=Vg(r.dependencies),e.prev=8,a.s();case 10:if((i=a.n()).done){e.next=26;break}if(s=i.value,e.prev=12,o=Yg[s].name,!window[o]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,Zg({id:s,src:Yg[s].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),d=s.id,u=s.src,console.log("Could not load external script ".concat(d," ").concat(u),e.t0);case 24:e.next=10;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(8),a.e(e.t1);case 31:return e.prev=31,a.f(),e.finish(31);case 34:return e.prev=34,e.next=37,Zg({id:t,src:r.source});case 37:n=window[t],e.next=43;break;case 40:e.prev=40,e.t2=e.catch(34),console.log("Could not load module ".concat(t," ").concat(r.source,"."),e.t2);case 43:return r.isLoading=!1,e.abrupt("return",n);case 45:case"end":return e.stop()}}),e,null,[[8,28,31,34],[12,20],[34,40]])})));return function(t){return e.apply(this,arguments)}}(),eA=I.default((function e(){var t=this;C.default(this,e),O.default(this,"load",D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$g("Leaderboard");case 2:t.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),O.default(this,"showLeaderboard",function(){var e=D.default(T.default.mark((function e(n){var r;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=window.GD_OPTIONS.gameId,t.leaderboard){e.next=4;break}return e.next=4,t.load();case 4:t.leaderboard.showLeaderBoard(r,n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),O.default(this,"addScore",function(){var e=D.default(T.default.mark((function e(n){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.leaderboard){e.next=3;break}return e.next=3,t.load();case 3:t.leaderboard.addScore(n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),this.moduleName="Leaderboard",this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/gd-sdk-leaderboard/0.1.43/dist/default/iife/index.js",dependencies:["react","react-dom","redux","react-redux","material-ui-core"]},Xg(this.moduleName,this.moduleConfig)})),tA=new eA,nA=it,rA=_r,aA=Ke("match"),iA=function(e){var t;return nA(e)&&(void 0!==(t=e[aA])?!!t:"RegExp"==rA(e))},sA=iA,oA=TypeError,dA=function(e){if(sA(e))throw oA("The method doesn't accept regular expressions");return e},uA=Ke("match"),cA=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[uA]=!1,"/./"[e](t)}catch(e){}}return!1},lA=$i,hA=Mr,fA=Ha.f,pA=$r,mA=os,vA=dA,gA=me,AA=cA,bA=hA("".startsWith),yA=hA("".slice),_A=Math.min,wA=AA("startsWith");lA({target:"String",proto:!0,forced:!!(wA||(Kg=fA(String.prototype,"startsWith"),!Kg||Kg.writable))&&!wA},{startsWith:function(e){var t=mA(gA(this));vA(e);var n=pA(_A(arguments.length>1?arguments[1]:void 0,t.length)),r=mA(e);return bA?bA(t,r,n):yA(t,n,n+r.length)===r}});var kA=bt,xA=_e,EA=kt,DA=us,SA=RegExp.prototype,RA=function(e){var t=e.flags;return void 0!==t||"flags"in SA||xA(e,"flags")||!EA(SA,e)?t:kA(DA,e)},TA=vn.PROPER,IA=gr,CA=vt,OA=os,PA=ie,LA=RA,BA="toString",UA=RegExp.prototype[BA],MA=PA((function(){return"/a/b"!=UA.call({source:"a",flags:"b"})})),FA=TA&&UA.name!=BA;(MA||FA)&&IA(RegExp.prototype,BA,(function(){var e=CA(this);return"/"+OA(e.source)+"/"+OA(LA(e))}),{unsafe:!0});var jA=Mr,GA=gr,NA=fo,qA=ie,HA=Ke,VA=In,QA=HA("species"),zA=RegExp.prototype,WA=function(e,t,n,r){var a=HA(e),i=!qA((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=i&&!qA((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[QA]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!i||!s||n){var o=jA(/./[a]),d=t(a,""[e],(function(e,t,n,r,a){var s=jA(e),d=t.exec;return d===NA||d===zA.exec?i&&!a?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));GA(String.prototype,e,d[0]),GA(zA,a,d[1])}r&&VA(zA[a],"sham",!0)},KA=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},YA=bt,JA=vt,XA=et,ZA=_r,$A=fo,eb=TypeError,tb=function(e,t){var n=e.exec;if(XA(n)){var r=YA(n,e,t);return null!==r&&JA(r),r}if("RegExp"===ZA(e))return YA($A,e,t);throw eb("RegExp#exec called on incompatible receiver")},nb=bt,rb=vt,ab=he,ib=me,sb=KA,ob=os,db=Mt,ub=tb;function cb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cb(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}WA("search",(function(e,t,n){return[function(t){var n=ib(this),r=ab(t)?void 0:db(t,e);return r?nb(r,t,n):new RegExp(t)[e](ob(n))},function(e){var r=rb(this),a=ob(e),i=n(t,r,a);if(i.done)return i.value;var s=r.lastIndex;sb(s,0)||(r.lastIndex=0);var o=ub(r,a);return sb(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var hb,fb,pb=function(){function e(){C.default(this,e)}return I.default(e,[{key:"getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),d=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",p);var m=(e||n)&&r.loaderEnabled,v=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:d,noLoadedEvent:u,noBlockerEvent:c,noPreroll:m,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:l,noLotamePageView:h,noGamedockSDK:f,noMinijuegosSDK:p,version:r.version,pauseGameOnStartup:v,depth:a.getIframeDepth(),domainMatched:s===o,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_isTokenGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isLoaderGameURL",value:function(){return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)&&location.href.startsWith("https://html5.gamedistribution.com")}},{key:"_getTokenGameURLConfig",value:function(){try{var e,t=/http[s]?:\/\/html5\.gamedistribution\.com\/[A-Za-z0-9]{8}\/[A-Fa-f0-9]{32}\/.*/i;if(t.test(location.href)){var n=new P.default(location.href,!0);if(!n.query.gd_zone_config)return;e=n.query.gd_zone_config}else if(t.test(document.referrer)){var r=new P.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new P.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(u.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(u.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new P.default(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(qs.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new P.default(e,!0);return n.query=lb(lb({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return u.Base64.encode(JSON.stringify(e))}}]),e}(),mb=function(){try{return(new pb).getBridgeContext()}catch(e){return{}}}(),vb={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(hb=!1,(fb=a.getQueryParams("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===fb.xanthophyll&&(hb=!0),hb)},gb=Fl.charAt,Ab=le,bb=Ae,yb=Math.floor,_b=Ab("".charAt),wb=Ab("".replace),kb=Ab("".slice),xb=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Eb=/\$([$&'`]|\d{1,2})/g,Db=Cu,Sb=bt,Rb=le,Tb=WA,Ib=ie,Cb=vt,Ob=et,Pb=he,Lb=Jr,Bb=$r,Ub=os,Mb=me,Fb=function(e,t,n){return t+(n?gb(e,t).length:1)},jb=Mt,Gb=function(e,t,n,r,a,i){var s=n+e.length,o=r.length,d=Eb;return void 0!==a&&(a=bb(a),d=xb),wb(i,d,(function(i,d){var u;switch(_b(d,0)){case"$":return"$";case"&":return e;case"`":return kb(t,0,n);case"'":return kb(t,s);case"<":u=a[kb(d,1,-1)];break;default:var c=+d;if(0===c)return i;if(c>o){var l=yb(c/10);return 0===l?i:l<=o?void 0===r[l-1]?_b(d,1):r[l-1]+_b(d,1):i}u=r[c-1]}return void 0===u?"":u}))},Nb=tb,qb=Ke("replace"),Hb=Math.max,Vb=Math.min,Qb=Rb([].concat),zb=Rb([].push),Wb=Rb("".indexOf),Kb=Rb("".slice),Yb="$0"==="a".replace(/./,"$0"),Jb=!!/./[qb]&&""===/./[qb]("a","$0");Tb("replace",(function(e,t,n){var r=Jb?"$":"$0";return[function(e,n){var r=Mb(this),a=Pb(e)?void 0:jb(e,qb);return a?Sb(a,e,r,n):Sb(t,Ub(r),e,n)},function(e,a){var i=Cb(this),s=Ub(e);if("string"==typeof a&&-1===Wb(a,r)&&-1===Wb(a,"$<")){var o=n(t,i,s,a);if(o.done)return o.value}var d=Ob(a);d||(a=Ub(a));var u=i.global;if(u){var c=i.unicode;i.lastIndex=0}for(var l=[];;){var h=Nb(i,s);if(null===h)break;if(zb(l,h),!u)break;""===Ub(h[0])&&(i.lastIndex=Fb(s,Bb(i.lastIndex),c))}for(var f,p="",m=0,v=0;v<l.length;v++){for(var g=Ub((h=l[v])[0]),A=Hb(Vb(Lb(h.index),s.length),0),b=[],y=1;y<h.length;y++)zb(b,void 0===(f=h[y])?f:String(f));var _=h.groups;if(d){var w=Qb([g],b,A,s);void 0!==_&&zb(w,_);var k=Ub(Db(a,void 0,w))}else k=Gb(g,s,A,b,_,a);A>=m&&(p+=Kb(s,m,A)+k,m=A+g.length)}return p+Kb(s,m)}]}),!!Ib((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Yb||Jb);var Xb=ie,Zb=nt,$b=Ke("iterator"),ey=!Xb((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.size&&!Zb||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[$b]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),ty=gr,ny=Lo,ry=Math.floor,ay=function(e,t){var n=e.length,r=ry(n/2);return n<8?iy(e,t):sy(e,ay(ny(e,0,r),t),ay(ny(e,r),t),t)},iy=function(e,t){for(var n,r,a=e.length,i=1;i<a;){for(r=i,n=e[i];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},sy=function(e,t,n,r){for(var a=t.length,i=n.length,s=0,o=0;s<a||o<i;)e[s+o]=s<a&&o<i?r(t[s],n[o])<=0?t[s++]:n[o++]:s<a?t[s++]:n[o++];return e},oy=$i,dy=K,uy=bt,cy=le,ly=nt,hy=ey,fy=gr,py=qo,my=function(e,t,n){for(var r in t)ty(e,r,t[r],n);return e},vy=rd,gy=uh,Ay=Yn,by=np,yy=et,_y=_e,wy=Nr,ky=Rr,xy=vt,Ey=it,Dy=os,Sy=Ms,Ry=Sn,Ty=dl,Iy=tl,Cy=hp,Oy=ay,Py=Ke("iterator"),Ly="URLSearchParams",By=Ly+"Iterator",Uy=Ay.set,My=Ay.getterFor(Ly),Fy=Ay.getterFor(By),jy=Object.getOwnPropertyDescriptor,Gy=function(e){if(!ly)return dy[e];var t=jy(dy,e);return t&&t.value},Ny=Gy("fetch"),qy=Gy("Request"),Hy=Gy("Headers"),Vy=qy&&qy.prototype,Qy=Hy&&Hy.prototype,zy=dy.RegExp,Wy=dy.TypeError,Ky=dy.decodeURIComponent,Yy=dy.encodeURIComponent,Jy=cy("".charAt),Xy=cy([].join),Zy=cy([].push),$y=cy("".replace),e_=cy([].shift),t_=cy([].splice),n_=cy("".split),r_=cy("".slice),a_=/\+/g,i_=Array(4),s_=function(e){return i_[e-1]||(i_[e-1]=zy("((?:%[\\da-f]{2}){"+e+"})","gi"))},o_=function(e){try{return Ky(e)}catch(t){return e}},d_=function(e){var t=$y(e,a_," "),n=4;try{return Ky(t)}catch(e){for(;n;)t=$y(t,s_(n--),o_);return t}},u_=/[!'()~]|%20/g,c_={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},l_=function(e){return c_[e]},h_=function(e){return $y(Yy(e),u_,l_)},f_=gy((function(e,t){Uy(this,{type:By,iterator:Ty(My(e).entries),kind:t})}),"Iterator",(function(){var e=Fy(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),p_=function(e){this.entries=[],this.url=null,void 0!==e&&(Ey(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Jy(e,0)?r_(e,1):e:Dy(e)))};p_.prototype={type:Ly,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,a,i,s,o,d=Iy(e);if(d)for(n=(t=Ty(e,d)).next;!(r=uy(n,t)).done;){if(i=(a=Ty(xy(r.value))).next,(s=uy(i,a)).done||(o=uy(i,a)).done||!uy(i,a).done)throw Wy("Expected sequence with length 2");Zy(this.entries,{key:Dy(s.value),value:Dy(o.value)})}else for(var u in e)_y(e,u)&&Zy(this.entries,{key:u,value:Dy(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=n_(e,"&"),a=0;a<r.length;)(t=r[a++]).length&&(n=n_(t,"="),Zy(this.entries,{key:d_(e_(n)),value:d_(Xy(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Zy(n,h_(e.key)+"="+h_(e.value));return Xy(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var m_=function(){by(this,v_);var e=Uy(this,new p_(arguments.length>0?arguments[0]:void 0));ly||(this.length=e.entries.length)},v_=m_.prototype;if(my(v_,{append:function(e,t){Cy(arguments.length,2);var n=My(this);Zy(n.entries,{key:Dy(e),value:Dy(t)}),ly||this.length++,n.updateURL()},delete:function(e){Cy(arguments.length,1);for(var t=My(this),n=t.entries,r=Dy(e),a=0;a<n.length;)n[a].key===r?t_(n,a,1):a++;ly||(this.length=n.length),t.updateURL()},get:function(e){Cy(arguments.length,1);for(var t=My(this).entries,n=Dy(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){Cy(arguments.length,1);for(var t=My(this).entries,n=Dy(e),r=[],a=0;a<t.length;a++)t[a].key===n&&Zy(r,t[a].value);return r},has:function(e){Cy(arguments.length,1);for(var t=My(this).entries,n=Dy(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){Cy(arguments.length,1);for(var n,r=My(this),a=r.entries,i=!1,s=Dy(e),o=Dy(t),d=0;d<a.length;d++)(n=a[d]).key===s&&(i?t_(a,d--,1):(i=!0,n.value=o));i||Zy(a,{key:s,value:o}),ly||(this.length=a.length),r.updateURL()},sort:function(){var e=My(this);Oy(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=My(this).entries,r=wy(e,arguments.length>1?arguments[1]:void 0),a=0;a<n.length;)r((t=n[a++]).value,t.key,this)},keys:function(){return new f_(this,"keys")},values:function(){return new f_(this,"values")},entries:function(){return new f_(this,"entries")}},{enumerable:!0}),fy(v_,Py,v_.entries,{name:"entries"}),fy(v_,"toString",(function(){return My(this).serialize()}),{enumerable:!0}),ly&&py(v_,"size",{get:function(){return My(this).entries.length},configurable:!0,enumerable:!0}),vy(m_,Ly),oy({global:!0,constructor:!0,forced:!hy},{URLSearchParams:m_}),!hy&&yy(Hy)){var g_=cy(Qy.has),A_=cy(Qy.set),b_=function(e){if(Ey(e)){var t,n=e.body;if(ky(n)===Ly)return t=e.headers?new Hy(e.headers):new Hy,g_(t,"content-type")||A_(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Sy(e,{body:Ry(0,Dy(n)),headers:Ry(0,t)})}return e};if(yy(Ny)&&oy({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Ny(e,arguments.length>1?b_(arguments[1]):{})}}),yy(qy)){var y_=function(e){return by(this,Vy),new qy(e,arguments.length>1?b_(arguments[1]):{})};Vy.constructor=y_,y_.prototype=Vy,oy({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:y_})}}var __={URLSearchParams:m_,getState:My},w_=mi.includes,k_=bf;$i({target:"Array",proto:!0,forced:ie((function(){return!Array(1).includes()}))},{includes:function(e){return w_(this,e,arguments.length>1?arguments[1]:void 0)}}),k_("includes");var x_=$i,E_=dA,D_=me,S_=os,R_=cA,T_=le("".indexOf);function I_(e){var t=this,n={},r=(null==e?void 0:e._ancestor_origins)||window.location.ancestorOrigins,a=(null==e?void 0:e.self_url)||window.location.href,i=(null==e?void 0:e.self_origin)||window.location.origin,s=(null==e?void 0:e.referrer_url)||document.referrer;function o(e){return U.default(n,e)}function d(e,t){return M.default(n,e,t)}function u(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new P.default(e,t)}catch(e){console.log(e)}}function c(){for(var t=(null==e?void 0:e.urls)||[a,s],n=0;n<t.length;n++){var r,i=u(t[n]);if(i){var o=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(o&&(o=(o=decodeURIComponent(o)).startsWith("https://")||o.startsWith("http://")?o:"https://".concat(o),L.default.isURL(o)))return o}}}return function(){var e;S.default(this,t),function(){var e=0,t=window;try{for(;t!=t.parent;)e++,t=t.parent}catch(e){d("depth.error",e.message)}d("depth.value",e)}(),function(){var e=r,t=n.depth.value,a=i;if(d("top.domain.from","fallback"),e&&e.length>0)a=e[e.length-1],d("top.domain.from","origins");else if(0===t)a=i,d("top.domain.from","self-top");else if(1===t){var o=u(s);o&&(a=o.origin,d("top.domain.from","referrer"))}d("top.domain.value",a.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=c();if(e)if(B.default(e))d("partner.domain.value",e),d("partner.domain.from","partner-domain");else{var t=u(e,!1);if(t)d("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),d("partner.domain.from","partner-url");else d("partner.domain.value",n.top.domain.value),d("partner.domain.from","partner-fallback")}else d("partner.domain.value",n.top.domain.value),d("partner.domain.from","fallback")}(),e=c(),0===n.depth.value?(d("partner.url.value",a),d("partner.url.from","self-top")):e?B.default(e)?(d("partner.url.value",a),d("partner.url.from","partner-domain")):(d("partner.url.value",e),d("partner.url.from","partner-url")):(d("partner.url.value",s),d("partner.url.from","fallback"))}.bind(this)(),{get:o,print:function(e){console.log(o(e))}}}x_({target:"String",proto:!0,forced:!R_("includes")},{includes:function(e){return!!~T_(S_(D_(this)),S_(E_(e)),arguments.length>1?arguments[1]:void 0)}});var C_="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==C_&&C_,O_={searchParams:"URLSearchParams"in C_,iterable:"Symbol"in C_&&"iterator"in Symbol,blob:"FileReader"in C_&&"Blob"in C_&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in C_,arrayBuffer:"ArrayBuffer"in C_};if(O_.arrayBuffer)var P_=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],L_=ArrayBuffer.isView||function(e){return e&&P_.indexOf(Object.prototype.toString.call(e))>-1};function B_(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function U_(e){return"string"!=typeof e&&(e=String(e)),e}function M_(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return O_.iterable&&(t[Symbol.iterator]=function(){return t}),t}function F_(e){this.map={},e instanceof F_?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function j_(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function G_(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function N_(e){var t=new FileReader,n=G_(t);return t.readAsArrayBuffer(e),n}function q_(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function H_(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:O_.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:O_.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:O_.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():O_.arrayBuffer&&O_.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=q_(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):O_.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||L_(e))?this._bodyArrayBuffer=q_(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):O_.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},O_.blob&&(this.blob=function(){var e=j_(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=j_(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(N_)}),this.text=function(){var e=j_(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=G_(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},O_.formData&&(this.formData=function(){return this.text().then(z_)}),this.json=function(){return this.text().then(JSON.parse)},this}F_.prototype.append=function(e,t){e=B_(e),t=U_(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},F_.prototype.delete=function(e){delete this.map[B_(e)]},F_.prototype.get=function(e){return e=B_(e),this.has(e)?this.map[e]:null},F_.prototype.has=function(e){return this.map.hasOwnProperty(B_(e))},F_.prototype.set=function(e,t){this.map[B_(e)]=U_(t)},F_.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},F_.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),M_(e)},F_.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),M_(e)},F_.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),M_(e)},O_.iterable&&(F_.prototype[Symbol.iterator]=F_.prototype.entries);var V_=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Q_(e,t){if(!(this instanceof Q_))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n=(t=t||{}).body;if(e instanceof Q_){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new F_(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new F_(t.headers)),this.method=function(e){var t=e.toUpperCase();return V_.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function z_(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),a=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(a))}})),t}function W_(e,t){if(!(this instanceof W_))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new F_(t.headers),this.url=t.url||"",this._initBody(e)}Q_.prototype.clone=function(){return new Q_(this,{body:this._bodyInit})},H_.call(Q_.prototype),H_.call(W_.prototype),W_.prototype.clone=function(){return new W_(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new F_(this.headers),url:this.url})},W_.error=function(){var e=new W_(null,{status:0,statusText:""});return e.type="error",e};var K_=[301,302,303,307,308];W_.redirect=function(e,t){if(-1===K_.indexOf(t))throw new RangeError("Invalid status code");return new W_(null,{status:t,headers:{location:e}})};var Y_,J_=C_.DOMException;try{new J_}catch(e){J_=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},J_.prototype=Object.create(Error.prototype),J_.prototype.constructor=J_}function X_(e,t){return new Promise((function(n,r){var a=new Q_(e,t);if(a.signal&&a.signal.aborted)return r(new J_("Aborted","AbortError"));var i=new XMLHttpRequest;function s(){i.abort()}i.onload=function(){var e,t,r={status:i.status,statusText:i.statusText,headers:(e=i.getAllResponseHeaders()||"",t=new F_,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var a=n.join(":").trim();t.append(r,a)}})),t)};r.url="responseURL"in i?i.responseURL:r.headers.get("X-Request-URL");var a="response"in i?i.response:i.responseText;setTimeout((function(){n(new W_(a,r))}),0)},i.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},i.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},i.onabort=function(){setTimeout((function(){r(new J_("Aborted","AbortError"))}),0)},i.open(a.method,function(e){try{return""===e&&C_.location.href?C_.location.href:e}catch(t){return e}}(a.url),!0),"include"===a.credentials?i.withCredentials=!0:"omit"===a.credentials&&(i.withCredentials=!1),"responseType"in i&&(O_.blob?i.responseType="blob":O_.arrayBuffer&&a.headers.get("Content-Type")&&-1!==a.headers.get("Content-Type").indexOf("application/octet-stream")&&(i.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof F_?a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,U_(t.headers[e]))})),a.signal&&(a.signal.addEventListener("abort",s),i.onreadystatechange=function(){4===i.readyState&&a.signal.removeEventListener("abort",s)}),i.send(void 0===a._bodyInit?null:a._bodyInit)}))}X_.polyfill=!0,C_.fetch||(C_.fetch=X_,C_.Headers=F_,C_.Request=Q_,C_.Response=W_);var Z_=function(e){var t=this;if(!Y_){var n={gameId:e.gameId,hours:(new Date).getHours(),topDomain:mb.topDomain,domain:mb.parentDomain,referrer:mb.parentURL,depth:a.getIframeDepth(),version:go.version,byloader:mb.isTokenGameURL,isTokenGameURL:mb.isTokenGameURL,isMasterGameURL:mb.isMasterGameURL,isExtHostedGameURL:mb.isExtHostedGameURL,byloaderVersion:mb.version,tracking:vb.userDeclinedTracking,whitelabel:vb.whitelabelPartner,platform:a.getMobilePlatform()};Y_=new a.MessageRouter(n)}return Y_||{send:function(){S.default(this,t)}.bind(this)}},$_={getGameData:function(e){var t=this;try{var n=e.replace("game.api.gamedistribution.com","game-api.gamedistribution.com");fetch(n).then(function(e){S.default(this,t)}.bind(this)).catch(function(e){S.default(this,t)}.bind(this))}catch(e){}},getGameLoaderIndex:function(e){var t=this;try{var n="https://html5-prod-aws.gamedistribution.com/".concat(e,"/");fetch(n).then(function(e){S.default(this,t)}.bind(this)).catch(function(e){S.default(this,t)}.bind(this))}catch(e){}}},ew={getGameData:function(e){var t=this;try{var n=e.replace("game.api.gamedistribution.com","game-api-acc-real-hwp.gamedistribution.com");fetch(n).then(function(e){S.default(this,t)}.bind(this)).catch(function(e){S.default(this,t)}.bind(this))}catch(e){}}},tw={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},nw={gameAPI:"game.api.gamedistribution.com"},rw={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},aw=function(){var e=this,t=tw.acc.some(function(t){var n;return S.default(this,e),t===(null===(n=window.location.host)||void 0===n?void 0:n.toLowerCase())}.bind(this));return{env:t?"acc":"prod",config:t?rw:nw}},iw=function(e){var t=this,n=e.url;return new Promise(function(e,r){S.default(this,t);var a=new XMLHttpRequest;a.open("GET",n,!0),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var t=JSON.parse(a.responseText);e(t)}else r(Error("Error occured on request: ".concat(a.status,", ").concat(a.statusText)))},a.onerror=function(e){r(e)},a.send()}.bind(this))},sw=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"GD",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ObjectStore";C.default(this,e),this.dbName=t,this.storeName=n,this.db=null,this.init()}var t,n,r,a;return I.default(e,[{key:"init",value:function(){var e=this;return new Promise(function(t,n){var r=this;S.default(this,e);var a=indexedDB.open(this.dbName,1);a.onerror=function(e){S.default(this,r),console.error("Database error:",e.target.error),n(e.target.error)}.bind(this),a.onsuccess=function(e){S.default(this,r),this.db=e.target.result,t(this.db)}.bind(this),a.onupgradeneeded=function(e){S.default(this,r);var t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName,{keyPath:"key"})}.bind(this)}.bind(this))}},{key:"getItem",value:(a=D.default(T.default.mark((function e(t){var n=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var a=this;S.default(this,n);var i=this.db.transaction([this.storeName],"readonly").objectStore(this.storeName).get(t);i.onerror=function(e){S.default(this,a),console.error("Get item error:",e.target.error),r(e.target.error)}.bind(this),i.onsuccess=function(t){S.default(this,a),i.result?e(i.result.value):e(null)}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"setItem",value:(r=D.default(T.default.mark((function e(t,n){var r=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,a){var i=this;S.default(this,r);var s=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).put({key:t,value:n});s.onerror=function(e){S.default(this,i),console.error("Set item error:",e.target.error),a(e.target.error)}.bind(this),s.onsuccess=function(t){S.default(this,i),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"removeItem",value:(n=D.default(T.default.mark((function e(t){var n=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var a=this;S.default(this,n);var i=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).delete(t);i.onerror=function(e){S.default(this,a),console.error("Remove item error:",e.target.error),r(e.target.error)}.bind(this),i.onsuccess=function(t){S.default(this,a),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"clear",value:(t=D.default(T.default.mark((function e(){var t=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,n){var r=this;S.default(this,t);var a=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).clear();a.onerror=function(e){S.default(this,r),console.error("Clear store error:",e.target.error),n(e.target.error)}.bind(this),a.onsuccess=function(t){S.default(this,r),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),ow=function(){function e(t){var n=t.mode;C.default(this,e),this.setItem=function(){var e=D.default(T.default.mark((function e(t,n){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),this.getItem=function(){var e=D.default(T.default.mark((function e(t){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),"indexed-db"===n?(this.indexedStore=new sw,this.setItem=this.indexedStore.setItem.bind(this.indexedStore),this.getItem=this.indexedStore.getItem.bind(this.indexedStore)):"local-storage"===n&&(this.setItem=function(){var e=D.default(T.default.mark((function e(t,n){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",a.Ls.set(t,n));case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),this.getItem=function(){var e=D.default(T.default.mark((function e(t){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",a.Ls.getString(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}var t,n;return I.default(e,[{key:"set",value:(n=D.default(T.default.mark((function e(t,n){var r;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=JSON.stringify(n),e.next=3,this.setItem(t,r);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"get",value:(t=D.default(T.default.mark((function e(t){var n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getItem(t);case 2:return n=e.sent,e.abrupt("return",n?JSON.parse(n):null);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}();function dw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dw(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var cw="_gd_vs";function lw(e){return hw.apply(this,arguments)}function hw(){return(hw=D.default(T.default.mark((function e(t){var n,r,i;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.gameId,i=[],!window.indexedDB){e.next=13;break}return e.prev=3,e.next=6,bw({gameId:n});case 6:r=e.sent,e.next=13;break;case 9:e.prev=9,e.t0=e.catch(3),wo("visit-get error, indexedDb",e.t0.message),i.push(e.t0.message);case 13:if(r||!a.Ls.available){e.next=24;break}return e.prev=14,e.next=17,_w({gameId:n});case 17:r=e.sent,e.next=24;break;case 20:e.prev=20,e.t1=e.catch(14),wo("visit-get error, Ls",e.t1.message),i.push(e.t1.message);case 24:return e.abrupt("return",uw(uw({},r),{},{errors:i}));case 25:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])})))).apply(this,arguments)}function fw(e){return pw.apply(this,arguments)}function pw(){return pw=D.default(T.default.mark((function e(t){var n,r,i,s;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.gameId,r=t.serverDate,s=[],!window.indexedDB){e.next=13;break}return e.prev=3,e.next=6,gw({gameId:n,serverDate:r});case 6:i=e.sent,e.next=13;break;case 9:e.prev=9,e.t0=e.catch(3),wo("visit-update error, indexedDb",e.t0.message),s.push(e.t0.message);case 13:if(i||!a.Ls.available){e.next=24;break}return e.prev=14,e.next=17,mw({gameId:n,serverDate:r});case 17:i=e.sent,e.next=24;break;case 20:e.prev=20,e.t1=e.catch(14),wo("visit-update error, Ls",e.t1.message),s.push(e.t1.message);case 24:return e.abrupt("return",uw(uw({},i),{},{errors:s}));case 25:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])}))),pw.apply(this,arguments)}function mw(e){return vw.apply(this,arguments)}function vw(){return vw=D.default(T.default.mark((function e(t){var n,r,a,i,s,o;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,r=t.serverDate,i=new ow({mode:a="local-storage"}),e.next=5,i.get(cw);case 5:return(s=e.sent)||(s={gids:{}}),s.gids[n]||(s.gids[n]={fv:r,vc:0}),(o=s.gids[n]).vc++,o.lv=r,e.next=13,i.set(cw,s);case 13:return e.abrupt("return",{visit:o,mode:a});case 14:case"end":return e.stop()}}),e)}))),vw.apply(this,arguments)}function gw(e){return Aw.apply(this,arguments)}function Aw(){return Aw=D.default(T.default.mark((function e(t){var n,r,a,i,s;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,r=t.serverDate,i=new ow({mode:a="indexed-db"}),e.next=5,i.get(n);case 5:return(s=e.sent)||(s={fv:r,vc:0}),s.vc++,s.lv=r,e.next=11,i.set(n,s);case 11:return e.abrupt("return",{visit:s,mode:a});case 12:case"end":return e.stop()}}),e)}))),Aw.apply(this,arguments)}function bw(e){return yw.apply(this,arguments)}function yw(){return yw=D.default(T.default.mark((function e(t){var n,r,a;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,"indexed-db",r=new ow({mode:"indexed-db"}),e.next=5,r.get(n);case 5:return(a=e.sent)||(a={fv:null,vc:0}),e.abrupt("return",a);case 8:case"end":return e.stop()}}),e)}))),yw.apply(this,arguments)}function _w(e){return ww.apply(this,arguments)}function ww(){return ww=D.default(T.default.mark((function e(t){var n,r,a,i;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,"local-storage",r=new ow({mode:"local-storage"}),e.next=5,r.get(cw);case 5:return(a=e.sent)||(a={gids:{}}),a.gids[n]||(a.gids[n]={fv:null,vc:0}),i=a.gids[n],e.abrupt("return",i);case 10:case"end":return e.stop()}}),e)}))),ww.apply(this,arguments)}function kw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kw(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ew,Dw,Sw,Rw,Tw=new m.EventEmitter,Iw=[],Cw=function(e){Iw.push(e)},Ow=function(e){Ew=Z_(Sw=e)},Pw=function(){var e=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Dw){e.next=7;break}return e.next=3,jw(Sw);case 3:Dw=e.sent,Tw.emit("game-data-ready",Dw),Lw(),Bw();case 7:return e.abrupt("return",Dw);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Lw=function(){var e,t;if(null!==(e=Dw)&&void 0!==e&&null!==(t=e.aws_tst)&&void 0!==t&&t.enabled){var n,r,a,i,s;if(Mw(),null!==(n=Dw)&&void 0!==n&&null!==(r=n.aws_tst)&&void 0!==r&&null!==(a=r.ep)&&void 0!==a&&a.api&&null!==(i=Dw)&&void 0!==i&&i.url)$_.getGameData(null===(s=Dw)||void 0===s?void 0:s.url);setInterval(D.default(T.default.mark((function e(){var t;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,jw(Sw);case 3:Dw=e.sent,yo("gd-aws-test, new game data received",null===(t=Dw)||void 0===t?void 0:t.aws_tst),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])}))),3e5)}},Bw=function(){var e,t;if(null!==(e=Dw)&&void 0!==e&&null!==(t=e.hwei)&&void 0!==t&&t.enabled){var n,r,a;if(Mw(),null!==(n=Dw)&&void 0!==n&&null!==(r=n.hwei)&&void 0!==r&&r.gameApi.enabled)ew.getGameData(null===(a=Dw)||void 0===a?void 0:a.url);setInterval(D.default(T.default.mark((function e(){var t;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,jw(Sw);case 3:Dw=e.sent,yo("gd-aws-test, new game data received",null===(t=Dw)||void 0===t?void 0:t.aws_tst),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])}))),3e5)}},Uw=!1,Mw=function(){if(!Uw){Uw=!0;var e=window.fetch;window.fetch=D.default(T.default.mark((function t(){var n,r,a,i,s,o,d,u,c,l,h,f,p,m,v,g,A,b,y,_,w,k,x,E,D,R,I,C,O,P,L,B,U,M=this,F=arguments;return T.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(v=F.length,g=new Array(v),A=0;A<v;A++)g[A]=F[A];b=g[0],y=g[1],_=null===(n=Dw)||void 0===n||null===(r=n.aws_tst)||void 0===r||null===(a=r.ep)||void 0===a?void 0:a.atm,w=null===(i=Dw)||void 0===i||null===(s=i.aws_tst)||void 0===s||null===(o=s.ep)||void 0===o?void 0:o.msgrt,k=(null===(d=Dw)||void 0===d||null===(u=d.hwei)||void 0===u?void 0:u.enabled)&&(null===(c=Dw)||void 0===c||null===(l=c.hwei)||void 0===l?void 0:l.atom.enabled),x=(null===(h=Dw)||void 0===h||null===(f=h.hwei)||void 0===f?void 0:f.enabled)&&(null===(p=Dw)||void 0===p||null===(m=p.hwei)||void 0===m?void 0:m.msgrt.enabled),E=function(t,n){var r=this;S.default(this,M);var a=b.replace(t,n);e(a,y).then(function(){S.default(this,r)}.bind(this))}.bind(this);try{_&&b.indexOf("tag.atom")>0&&E("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),w&&b.indexOf("msgrt.gamedistribution.com")>0&&(yo("gd-aws-test hook",null===(D=Dw)||void 0===D?void 0:D.aws_tst,null===(R=Dw)||void 0===R||null===(I=R.aws_tst)||void 0===I||null===(C=I.ep)||void 0===C?void 0:C.msgrt),E("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"),null!==(O=Dw)&&void 0!==O&&null!==(P=O.hwei)&&void 0!==P&&null!==(L=P.msgrt)&&void 0!==L&&L.enabled&&null!==(B=Dw)&&void 0!==B&&B.url&&E("msgrt.gamedistribution.com","msgrt-hwp.gamedistribution.com")),k&&b.indexOf("tag.atom")>0&&E("tag.atom.gamedistribution.com","atom-tag-acc-real-hwp.gamedistribution.com"),x&&b.indexOf("msgrt.gamedistribution.com")>0&&E("msgrt.gamedistribution.com","msgrt-hwp.gamedistribution.com")}catch(e){}return t.next=11,e(b,y);case 11:return U=t.sent,t.abrupt("return",U);case 13:case"end":return t.stop()}}),t,this)})))}},Fw=["gamedistribution.com","html5.gamedistribution.com"],jw=function(e){var t=this;Ew.send("gdfw.loading",{message:"loading"}),Iw=[],Cw("1"),Cw("2"),new I_,Cw("3");var n=function(){var e=this,t=new I_,n=t.get("top.domain.value"),r=t.get("partner.domain.value"),i=Fw.some(function(t){return S.default(this,e),t===(null==r?void 0:r.toLowerCase())}.bind(this)),s=a.getParentDomain();return(i||s!==r)&&n||r}();Cw("4");var r=function(){return S.default(this,t),{gameId:e.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{},gs_trc:{enabled:!0}}}.bind(this);Cw("5");var i=function(){S.default(this,t);var r=o(),a=r?"&mode=".concat(r):"",i=aw().config,d="https://".concat(i.gameAPI),u=s();return"".concat(d,"/game/v4/get/").concat(e.gameId.replace(/-/g,""),"/?domain=").concat(n).concat(a,"&v=").concat(go.version,"&engn=").concat(u.os,"&localTime=").concat((new Date).getHours())}.bind(this),s=function(){S.default(this,t);var e=navigator.userAgent,n="unknown";return/Windows/i.test(e)?n="Windows":/Mac OS X/i.test(e)&&!/Mobile/i.test(e)?n="macOS":/iPhone|iPad|iPod/i.test(e)?n="iOS":/Android/i.test(e)?n="Android":/Linux/i.test(e)&&(n="Linux"),/Mobi|Tablet/i.test(e),{os:n}}.bind(this);Cw("6");var o=function(){var e=this;S.default(this,t);var n=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return S.default(this,e),t.get(n)}.bind(this)});return!n.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:n.gd_mode}.bind(this);Cw("7");var d=function(e){var t=this,n=(null==e?void 0:e.vmap_by_tags)||{},r=n.enabled,a=n.tags;if(r){var i,s,o=a||["co-op","multiplayer","IAPs"];if(e.tags.some(function(e){var n=this;return S.default(this,t),o.some(function(t){return S.default(this,n),t===e.title}.bind(this))}.bind(this)))((null===(i=e.adsc)||void 0===i||null===(s=i.t)||void 0===s?void 0:s.rspdur)||0)<1&&(e.mAds=xw(xw({},e.mAds||{}),{vmap:{enabled:!0}}),e.pAds=xw(xw({},e.pAds||{}),{vmap:{enabled:!0}}),e.rAds=xw(xw({},e.rAds||{}),{vmap:{enabled:!0}}),e.vmapByTagsApplied=!0)}},u=function(){var e=D.default(T.default.mark((function e(t){var n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lw({gameId:t.gameId});case 2:return n=e.sent,t.visit=n,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),c=function(){var e=D.default(T.default.mark((function e(t){var n,r,a,i,s,o;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(r=t.visit)&&0===(null===(n=r.errors)||void 0===n?void 0:n.length)&&0===r.vc&&((null==t||null===(a=t.pAds)||void 0===a||null===(i=a.vmap)||void 0===i?void 0:i.enabled)&&(null==t||null===(s=t.pAds)||void 0===s||null===(o=s.vmap)||void 0===o?void 0:o.adtr))&&(t.pAds.vmap.enabled=!1);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return new Promise(function(e){var n=this;S.default(this,t),Cw("7.1");var s=r();try{Cw("7.2");var o=i();Cw("7.3"),fetch(o).then(function(){var e=D.default(T.default.mark((function e(t){var n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Cw("7.4"),e.prev=1,e.next=4,t.json();case 4:n=e.sent,e.next=13;break;case 7:return e.prev=7,e.t0=e.catch(1),yo("gameData fetch error, fallback to other ajax api",e.t0),e.next=12,iw({url:o});case 12:n=e.sent;case 13:return e.abrupt("return",n);case 14:case"end":return e.stop()}}),e,null,[[1,7]])})));return function(t){return e.apply(this,arguments)}}()).then(function(){var t=D.default(T.default.mark((function t(n){var r,i,l,h,f,p,m,v=this;return T.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Cw("7.5"),!n.success){t.next=23;break}return h=n.result.game,Cw("7.6"),f={company:h.company,gameId:h.gameMd5,slug:h.slug,pname:h.pname,dname:h.dname,status:h.status,activeStatus:h.activeStatus,description:h.description,disableAds:h.enableAds,preroll:h.preRoll,midroll:6e4*h.timeAds,rewardedAds:h.rewardedAds,title:h.title,publishedAt:h.publishedAt,tags:h.tags,category:h.category,assets:h.assets,disp_2nd_prer:h.disp_2nd_prer,ctry_vst:h.ctry_vst,ctry:h.ctry,crtv:h.crtv,dmain:h.dmain,dmn:h.dmn,aws_tst:h.aws_tst,meta:h.meta,adsc:h.adsc,igs:h.igs,adspn:Ao(h.adspn)||{},__t4r:Ao(h.__t4r)||{},block_exts:Ao(h.push_cuda),bloc_gard:Ao(h.bloc_gard),cookie:Ao(h.cookie),gdpr:Ao(h.gdpr),diagnostic:Ao(h.diagnostic),cmp:Ao(h.cmp),gft:Ao(h.gft)||{},sdk:Ao(h.sdk)||{},sdkfw:Ao(h.sdkfw)||{},loader:Ao(h.loader)||{},splash:Ao(h.splash)||{},promo:Ao(h.promo)||{},dAds:Ao(h.dads)||{},pAds:Ao(h.pads)||{},mAds:Ao(h.mads)||{},rAds:Ao(h.rads)||{},lp:Ao(h.lp)||{},extsc:Ao(h.extsc)||{},evnts:Ao(h.evnts)||{},dp:Ao(h.dp)||{},adflw:Ao(h.adflw)||{},afgszf:Ao(h.afgszf)||{},fllc:Ao(h.fllc)||{},lotm:Ao(h.lotm)||{},t4rc:Ao(h.t4rc)||{},midroll_plus:Ao(h.midroll_plus)||{},gmky:Ao(h.gmky)||{},urlBlockExc:Ao(h.url_blck_exc)||{},sdk_wrp:Ao(h.sdk_wrp)||{},dbglg:Ao(h.dbglg)||{},extHosting:Ao(h.ext_hosting)||{},directTokenUse:Ao(h.dtu)||{},aeria:Ao(h.aeria)||{},advlm:Ao(h.advlm)||{},ad_blcks:Ao(h.ad_blcks)||{},rmblck:Ao(h.rmblck)||{},gs_trc:Ao(h.gs_trc)||{},rwskp:Ao(h.rwskp)||{},isv_fw:Ao(h.isv_fw)||{},ext_vst:Ao(h.ext_vst)||{},fix_score:Ao(h.fix_score)||{},compensation:Ao(h.comps)||{},adTimer:Ao(h.adtr)||{},cust_vast:Ao(h.cust_vast)||{},console_logs:Ao(h.c_logs)||{},disable_ads_by_cmp:Ao(h.dads_by_cmp)||{},ad_skip:Ao(h.adskp)||{},__t4rac:Ao(h.__t4rac)||{},vmap_by_tags:Ao(h.vmap_by_tags)||{},hwei:Ao(h.hwei)||{},_apOps:Ao(h._apOps)||{}},Cw("7.7"),p=a.extendDefaults(F.default(s),f),Cw("7.8"),d(p),t.next=11,u(p);case 11:return t.next=13,c(p);case 13:p.afg_disabled=!1===(null===(r=p.sdk)||void 0===r||null===(i=r.afg)||void 0===i?void 0:i.enabled),p.url=o,function(){S.default(this,v),void 0!==ko.afgEnabled&&(p.afg_disabled=!ko.afgEnabled),void 0!==ko.promoEnabled&&(p.promo=p.promo||{},p.promo=xw(xw({},p.promo),{},{rainbow:{enabled:ko.promoEnabled}}))}.bind(this),Cw("7.9"),null!==(l=p.pAds)&&void 0!==l&&l.enabled&&(p.preroll=!0),Cw("7.10"),Ew.send("gdfw.success",{message:"success"}),e(p),t.next=27;break;case 23:s.failed=!0,m=Iw[Iw.length-1],Ew.send("gdfw.err",{message:"".concat(m,": json error")}),e(s);case 27:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()).catch(function(t){S.default(this,n);var r=Iw[Iw.length-1];Ew.send("gdfw.err",{message:"".concat(r,": ").concat(t.message?t.message:t)}),s.failed=!0,e(s)}.bind(this))}catch(t){var l=Iw[Iw.length-1];Ew.send("gdfw.err",{message:"".concat(l,": global ").concat(t.message?t.message:t)}),s.failed=!0,e(s)}}.bind(this))},Gw=function(){var e=D.default(T.default.mark((function e(){var t,n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pw();case 2:return n=e.sent,e.abrupt("return",!(null==n||null===(t=n.sdkfw)||void 0===t||!t.enabled));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Nw=function(){var e=D.default(T.default.mark((function e(){var t,n,r;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pw();case 2:return n=e.sent,r=null==n||null===(t=n.diagnostic)||void 0===t||!t.close_ga,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),qw=function(){var e=D.default(T.default.mark((function e(){var t,n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pw();case 2:return n=e.sent,e.next=5,Gw();case 5:if(e.t0=e.sent,!e.t0){e.next=8;break}e.t0=!(null==n||null===(t=n.sdkfw)||void 0===t||!t.handshake);case 8:return e.abrupt("return",e.t0);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Hw=function(){var e=D.default(T.default.mark((function e(){var t,n,r,a,i,s,o,d;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pw();case 2:return o=e.sent,d=!(null==o||null===(t=o.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:d,path:d?null==o||null===(n=o.extsc)||void 0===n?void 0:n.path:"",name:d?null==o||null===(r=o.extsc)||void 0===r?void 0:r.name:"",ref:d?null==o||null===(a=o.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:d?null==o||null===(i=o.extsc)||void 0===i?void 0:i.loadedFlag:void 0,loadedFlagCheck:!!d&&!(null==o||null===(s=o.extsc)||void 0===s||!s.loadedFlagCheck)});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Vw=function(){var e=D.default(T.default.mark((function e(){var t,n,r,i,s,o=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Hw();case 2:if((t=e.sent).enabled){e.next=5;break}return e.abrupt("return");case 5:return n=t.path,r=t.name,i=t.ref,e.prev=6,s={},e.next=10,a.getScript(n,r,{error_prefix:"Blocked:",exists:function(){return S.default(this,o),!!i&&!!window[i]}.bind(this),attrs:s});case 10:e.next=16;break;case 12:e.prev=12,e.t0=e.catch(6),console.log("extsc: error on external partner script load",r,e.t0),a.dankLog("DEVELOPER_ERROR",e.t0,"warning");case 16:case"end":return e.stop()}}),e,this,[[6,12]])})));return function(){return e.apply(this,arguments)}}(),Qw=!1,zw=!1,Ww=function(){return new Promise(function(){var e=D.default(T.default.mark((function e(t,n){var r,a,i,s,o,d=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Qw){e.next=4;break}return e.abrupt("return",t(zw));case 4:Qw=!0;case 5:return e.next=7,Hw();case 7:if((r=e.sent).enabled){e.next=10;break}return e.abrupt("return",t(!1));case 10:if(a=r.loadedFlag,!(i=r.loadedFlagCheck)||a){e.next=13;break}return e.abrupt("return",t(!1));case 13:if(i){e.next=16;break}return zw=!0,e.abrupt("return",t(!0));case 16:s=!0,setTimeout(function(){S.default(this,d),s&&(s=!1,Qw=!0,t(!1))}.bind(this),5e3),o=setInterval(function(){S.default(this,d),s&&i&&window[a]?(s=!1,Qw=!0,zw=!0,clearInterval(o),t(!0)):s||clearInterval(o)}.bind(this),100);case 19:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}())};function Kw(e){return Yw.apply(this,arguments)}function Yw(){return Yw=D.default(T.default.mark((function e(t){var n,r,a,i;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.whichFrame,r=t.options,e.prev=1,a="gd-".concat(n),i=!1,!("loader-frame"===n)){e.next=12;break}return e.next=9,Jw({id:a,verbose:i,options:r});case 9:Rw=e.sent,e.next=15;break;case 12:return e.next=14,Zw({id:a,verbose:i,options:r});case 14:Rw=e.sent;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(1),yo("[GD-IS] GD interservice create error",e.t0);case 20:case"end":return e.stop()}}),e,null,[[1,17]])}))),Yw.apply(this,arguments)}function Jw(e){return Xw.apply(this,arguments)}function Xw(){return Xw=D.default(T.default.mark((function e(t){var n,r,a,i,s=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.id,r=t.verbose,a=t.options,e.next=4,j.default({id:n,verbose:r,router:!0});case 4:return(i=e.sent).on("connected",function(e){S.default(this,s),"gd-game-frame"===e.service&&i.registerProxy({alias:"isStoreVisible",method:"isStoreVisible",service:"gd-game-frame"})}.bind(this)),i.register({method:"whoami",handler:function(){return S.default(this,s),"[GD-IS] I am ".concat(n)}.bind(this)}),i.register({method:"isLoader",handler:function(){return S.default(this,s),!0}.bind(this)}),i.register({method:"hasRouter",handler:function(){return S.default(this,s),!1}.bind(this)}),i.register({method:"showAd",handler:function(){var e=D.default(T.default.mark((function e(t){var n,r,i;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.showAd?a.showAd:function(){var e=D.default(T.default.mark((function e(t){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!0);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),r=t.adType,i=t.params,e.next=4,n(r,i);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),i.register({method:"getLoaderInfo",handler:function(){return S.default(this,s),{url:window.location.href}}.bind(this)}),i.register({method:"registerOnEvents",handler:function(){var e=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.registerProxy({alias:"onEvent",method:"onEvent",service:"gd-game-frame"}),e.abrupt("return","[GD-IS] gd-game-frame registered for onEvents");case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.next=14,i.whoami();case 14:return e.sent,e.abrupt("return",i);case 17:case"end":return e.stop()}}),e,this)}))),Xw.apply(this,arguments)}function Zw(e){return $w.apply(this,arguments)}function $w(){return $w=D.default(T.default.mark((function e(t){var n,r,a,i,s,o=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.id,r=t.verbose,a=t.options,e.next=4,j.default({id:n,verbose:r,router:!1});case 4:return i=e.sent,"gd-loader-frame",e.next=8,i.findRouter({where:{id:"gd-loader-frame"}}).catch(function(e){S.default(this,o)}.bind(this));case 8:if(s=e.sent,e.t0=!!s,!e.t0){e.next=15;break}return e.next=14,i.connect(s).catch(function(e){S.default(this,o),yo("[GD-IS] Failed to connect to router",(null==e?void 0:e.message)||e)}.bind(this));case 14:e.t0=e.sent;case 15:return e.t0,i.register({method:"whoami",handler:function(){return S.default(this,o),"[GD-IS] I am ".concat(n)}.bind(this)}),i.register({method:"onEvent",handler:function(e){var t=this;S.default(this,o);var n=e.event;(a.onEvent||function(e){S.default(this,t)}.bind(this))(n)}.bind(this)}),i.register({method:"isLoader",handler:function(){return S.default(this,o),!1}.bind(this)}),i.register({method:"hasRouter",handler:function(){return S.default(this,o),!!s}.bind(this)}),i.register({method:"isStoreVisible",handler:function(){var e;return S.default(this,o),(null===(e=window.gdsdk.store)||void 0===e?void 0:e.isVisible)&&window.gdsdk.store.isVisible()}.bind(this)}),s&&(i.registerProxy({alias:"whoIsLoader",method:"whoami"}),i.registerProxy({alias:"registerOnEvents",method:"registerOnEvents"}),i.registerProxy({alias:"showAd",method:"showAd"}),i.registerProxy({alias:"getLoaderInfo",method:"getLoaderInfo"})),e.next=25,i.whoami();case 25:if(e.sent,!s){e.next=36;break}return e.next=30,i.whoIsLoader();case 30:return e.sent,e.next=33,i.registerOnEvents();case 33:e.sent;case 36:return e.abrupt("return",i);case 37:case"end":return e.stop()}}),e,this)}))),$w.apply(this,arguments)}var ek=!1;function tk(){var e=this;return new Promise(function(t,n){var r=this;if(S.default(this,e),Rw||ek)t(Rw);else{var a=setInterval(function(){S.default(this,r),Rw&&(ek=!0,clearInterval(a),t(Rw))}.bind(this),100);setTimeout(function(){S.default(this,r),clearInterval(a),Rw||(ek=!0,t(Rw))}.bind(this),5e3)}}.bind(this))}var nk,rk=function(){var e=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Rw){e.next=2;break}return e.abrupt("return",!1);case 2:if(e.t0=Rw.isStoreVisible,!e.t0){e.next=7;break}return e.next=6,Rw.isStoreVisible();case 6:e.t0=e.sent;case 7:return e.abrupt("return",e.t0);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ak=function(){var e=D.default(T.default.mark((function e(){var t,n,r,a;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(nk){e.next=8;break}return t=(new I_).get(),n=(new G.default).getResult(),e.next=5,Pw();case 5:r=e.sent,i=void 0,s=void 0,i=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,a={w:i-=i%64,h:s-=s%64},nk={gameData:r,loc:t,ua:n,layout:a};case 8:return e.abrupt("return",nk);case 9:case"end":return e.stop()}var i,s}),e)})));return function(){return e.apply(this,arguments)}}(),ik=function(){var e=this,t=P.default(window.location.href,!0),n=t.host,r=t.query,a=function(t){return S.default(this,e),"revision.gamedistribution.com"===t||"uncached-html5.gamedistribution.com"===t}.bind(this),i=a(n);null!=r&&r.gd_sdk_referrer_url&&(i=a(P.default(r.gd_sdk_referrer_url).host));return i},sk=function(){var e=D.default(T.default.mark((function e(){var t;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!window.isForwarderFrame,!!window.isForwarderFrame){e.next=17;break}if(!ik()){e.next=8;break}return e.abrupt("return",!0);case 8:return e.next=10,tk();case 10:if(t=e.sent,!((null==t?void 0:t.isLoader())||!1)){e.next=15;break}return e.abrupt("return",!1);case 15:e.next=18;break;case 17:case 18:return e.abrupt("return",!0);case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ok=function(){var e=D.default(T.default.mark((function e(){var t;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pw();case 2:if(t=e.sent,null==t?void 0:t.igs){e.next=6;break}return e.abrupt("return",!1);case 6:return _o("[GD-IGS] store config available"),e.next=9,sk();case 9:if(e.sent){e.next=12;break}return e.abrupt("return",!1);case 12:return e.abrupt("return",!0);case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();function dk(e,t){var n=this,r=!1,a=null;if(e){var i=e,s=P.default(i,!0),o=s.query;if(Object.keys(o).some(function(e){return S.default(this,n),e.toLowerCase()===t}.bind(this)))r=!0,a=o[t.toLowerCase()];else if(i=null==o?void 0:o.gd_sdk_referrer_url){var d=(s=P.default(i,!0)).query;Object.keys(d).some(function(e){return S.default(this,n),e.toLowerCase()===t}.bind(this))&&(r=!0,a=d[t.toLowerCase()])}}return{exists:r,value:a}}var uk=function(){var e=D.default(T.default.mark((function e(){var t,n,r,a,i,s,o;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=!1,e.next=3,tk();case 3:if(n=e.sent,e.t1=n,!e.t1){e.next=9;break}return e.next=8,n.getLoaderInfo();case 8:e.t1=e.sent;case 9:if(e.t0=e.t1,e.t0){e.next=12;break}e.t0={};case 12:return r=e.t0,a=r.url,i=dk(a,"sandbox"),s=i.exists,o=i.value,s&&(t=!0===o||"true"===o||1===o),e.abrupt("return",t);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ck=function(){var e=D.default(T.default.mark((function e(){var t,n,r,a,i;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,tk();case 2:if(t=e.sent,e.t1=t,!e.t1){e.next=8;break}return e.next=7,t.getLoaderInfo();case 7:e.t1=e.sent;case 8:if(e.t0=e.t1,e.t0){e.next=11;break}e.t0={};case 11:return n=e.t0,r=n.url,a=dk(r,"igs"),i=a.exists,a.value,e.abrupt("return",i);case 15:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),lk=function(){var e=D.default(T.default.mark((function e(t){var n,r,i,s,o,d,u,c,l,h,f,p,m=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.onEvent,e.next=3,Pw();case 3:return i=e.sent,s=null==i?void 0:i.igs,e.next=7,ok();case 7:if(e.sent){e.next=10;break}return e.abrupt("return");case 10:return _o("[GD-IGS] store will initalize for frame",{loc:window.location.href}),"https://pm.azerioncircle.com/p/gd-sdk-igs-proxy",e.next=14,a.getScript("https://pm.azerioncircle.com/p/gd-sdk-igs-proxy","gd-sdk-igs-proxy",{});case 14:if(!(o=null===(n=window.GD_SDK_IGS_PROXY)||void 0===n?void 0:n.create)){e.next=40;break}return _o("[GD-IGS] store proxy created"),u="https://html5.gamedistribution.com/igs/index.html",e.next=20,ck();case 20:return c=e.sent,e.next=23,uk();case 23:return l=e.sent,_o("[GD-IS-IGS] sandbox",l),e.next=27,ak();case 27:return h=e.sent,e.next=30,o({igs:s,storeFrameUrl:u,showStoreOpener:c,sandbox:l,ctx:h});case 30:if(f=e.sent){e.next=33;break}return e.abrupt("return");case 33:p=!1,(null===(d=f.events)||void 0===d?void 0:d.onAny)&&f.events.onAny(function(e){var t;(S.default(this,m),"STORE_UI_VISIBILITY_CHANGED"===(null==e?void 0:e.name))&&(p=(null===(t=e.data)||void 0===t?void 0:t.visible)||!1);r&&r(e)}.bind(this)),f.isVisible=function(){return p},window.gdsdk.store=f,window.gdsdk.executeStoreAction=f.executeStoreAction.bind(f),r({name:"STORE_READY",data:{}}),_o("[GD-IGS] store ready");case 40:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),hk=$i,fk=mm,pk=ie,mk=wt,vk=et,gk=cp,Ak=gg,bk=gr,yk=fk&&fk.prototype;if(hk({target:"Promise",proto:!0,real:!0,forced:!!fk&&pk((function(){yk.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=gk(this,mk("Promise")),n=vk(e);return this.then(n?function(n){return Ak(t,e()).then((function(){return n}))}:e,n?function(n){return Ak(t,e()).then((function(){throw n}))}:e)}}),vk(fk)){var _k=mk("Promise").prototype.finally;yk.finally!==_k&&bk(yk,"finally",_k,{unsafe:!0})}var wk="\t\n\v\f\r                 \u2028\u2029\ufeff",kk=me,xk=os,Ek=wk,Dk=le("".replace),Sk=RegExp("^["+Ek+"]+"),Rk=RegExp("(^|[^"+Ek+"])["+Ek+"]+$"),Tk=function(e){return function(t){var n=xk(kk(t));return 1&e&&(n=Dk(n,Sk,"")),2&e&&(n=Dk(n,Rk,"$1")),n}},Ik={start:Tk(1),end:Tk(2),trim:Tk(3)},Ck=vn.PROPER,Ok=ie,Pk=wk,Lk=Ik.trim;$i({target:"String",proto:!0,forced:function(e){return Ok((function(){return!!Pk[e]()||"​…᠎"!=="​…᠎"[e]()||Ck&&Pk[e].name!==e}))}("trim")},{trim:function(){return Lk(this)}});var Bk=$i,Uk=Oa.find,Mk=bf,Fk="find",jk=!0;Fk in[]&&Array(1)[Fk]((function(){jk=!1})),Bk({target:"Array",proto:!0,forced:jk},{find:function(e){return Uk(this,e,arguments.length>1?arguments[1]:void 0)}}),Mk(Fk);var Gk=et,Nk=it,qk=Ah,Hk=tt.f,Vk=nt,Qk=K,zk=le,Wk=Qi,Kk=function(e,t,n){var r,a;return qk&&Gk(r=t.constructor)&&r!==n&&Nk(a=r.prototype)&&a!==n.prototype&&qk(e,a),e},Yk=In,Jk=si.f,Xk=kt,Zk=iA,$k=os,ex=RA,tx=ps,nx=function(e,t,n){n in e||Hk(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},rx=gr,ax=ie,ix=_e,sx=Yn.enforce,ox=$f,dx=Gs,ux=Vs,cx=Ke("match"),lx=Qk.RegExp,hx=lx.prototype,fx=Qk.SyntaxError,px=zk(hx.exec),mx=zk("".charAt),vx=zk("".replace),gx=zk("".indexOf),Ax=zk("".slice),bx=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,yx=/a/g,_x=/a/g,wx=new lx(yx)!==yx,kx=tx.MISSED_STICKY,xx=tx.UNSUPPORTED_Y,Ex=Vk&&(!wx||kx||dx||ux||ax((function(){return _x[cx]=!1,lx(yx)!=yx||lx(_x)==_x||"/a/i"!=lx(yx,"i")})));if(Wk("RegExp",Ex)){for(var Dx=function(e,t){var n,r,a,i,s,o,d=Xk(hx,this),u=Zk(e),c=void 0===t,l=[],h=e;if(!d&&u&&c&&e.constructor===Dx)return e;if((u||Xk(hx,e))&&(e=e.source,c&&(t=ex(h))),e=void 0===e?"":$k(e),t=void 0===t?"":$k(t),h=e,dx&&"dotAll"in yx&&(r=!!t&&gx(t,"s")>-1)&&(t=vx(t,/s/g,"")),n=t,kx&&"sticky"in yx&&(a=!!t&&gx(t,"y")>-1)&&xx&&(t=vx(t,/y/g,"")),ux&&(i=function(e){for(var t,n=e.length,r=0,a="",i=[],s={},o=!1,d=!1,u=0,c="";r<=n;r++){if("\\"===(t=mx(e,r)))t+=mx(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:px(bx,Ax(e,r+1))&&(r+=2,d=!0),a+=t,u++;continue;case">"===t&&d:if(""===c||ix(s,c))throw new fx("Invalid capture group name");s[c]=!0,i[i.length]=[c,u],d=!1,c="";continue}d?c+=t:a+=t}return[a,i]}(e),e=i[0],l=i[1]),s=Kk(lx(e,t),d?this:hx,Dx),(r||a||l.length)&&(o=sx(s),r&&(o.dotAll=!0,o.raw=Dx(function(e){for(var t,n=e.length,r=0,a="",i=!1;r<=n;r++)"\\"!==(t=mx(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),a+=t):a+="[\\s\\S]":a+=t+mx(e,++r);return a}(e),n)),a&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{Yk(s,"source",""===h?"(?:)":h)}catch(e){}return s},Sx=Jk(lx),Rx=0;Sx.length>Rx;)nx(Dx,lx,Sx[Rx++]);hx.constructor=Dx,Dx.prototype=hx,rx(Qk,"RegExp",Dx,{constructor:!0})}ox("RegExp");var Tx=nt,Ix=le,Cx=ns,Ox=Ja,Px=Ix(Va.f),Lx=Ix([].push),Bx=function(e){return function(t){for(var n,r=Ox(t),a=Cx(r),i=a.length,s=0,o=[];i>s;)n=a[s++],Tx&&!Px(r,n)||Lx(o,e?[n,r[n]]:r[n]);return o}},Ux={entries:Bx(!0),values:Bx(!1)}.values;$i({target:"Object",stat:!0},{values:function(e){return Ux(e)}});var Mx=$i,Fx=zr,jx=Ja,Gx=La,Nx=le([].join);Mx({target:"Array",proto:!0,forced:Fx!=Object||!Gx("join",",")},{join:function(e){return Nx(jx(this),void 0===e?",":e)}});var qx=Oa.map;$i({target:"Array",proto:!0,forced:!pc("map")},{map:function(e){return qx(this,e,arguments.length>1?arguments[1]:void 0)}});var Hx=nt,Vx=le,Qx=bt,zx=ie,Wx=ns,Kx=Ei,Yx=Va,Jx=Ae,Xx=zr,Zx=Object.assign,$x=Object.defineProperty,eE=Vx([].concat),tE=!Zx||zx((function(){if(Hx&&1!==Zx({b:1},Zx($x({},"a",{enumerable:!0,get:function(){$x(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=Zx({},e)[n]||Wx(Zx({},t)).join("")!=r}))?function(e,t){for(var n=Jx(e),r=arguments.length,a=1,i=Kx.f,s=Yx.f;r>a;)for(var o,d=Xx(arguments[a++]),u=i?eE(Wx(d),i(d)):Wx(d),c=u.length,l=0;c>l;)o=u[l++],Hx&&!Qx(s,d,o)||(n[o]=d[o]);return n}:Zx,nE=tE;$i({target:"Object",stat:!0,arity:2,forced:Object.assign!==nE},{assign:nE});var rE,aE=le,iE=2147483647,sE=/[^\0-\u007E]/,oE=/[.\u3002\uFF0E\uFF61]/g,dE="Overflow: input needs wider integers to process",uE=RangeError,cE=aE(oE.exec),lE=Math.floor,hE=String.fromCharCode,fE=aE("".charCodeAt),pE=aE([].join),mE=aE([].push),vE=aE("".replace),gE=aE("".split),AE=aE("".toLowerCase),bE=function(e){return e+22+75*(e<26)},yE=function(e,t,n){var r=0;for(e=n?lE(e/700):e>>1,e+=lE(e/t);e>455;)e=lE(e/35),r+=36;return lE(r+36*e/(e+38))},_E=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var a=fE(e,n++);if(a>=55296&&a<=56319&&n<r){var i=fE(e,n++);56320==(64512&i)?mE(t,((1023&a)<<10)+(1023&i)+65536):(mE(t,a),n--)}else mE(t,a)}return t}(e);var n,r,a=e.length,i=128,s=0,o=72;for(n=0;n<e.length;n++)(r=e[n])<128&&mE(t,hE(r));var d=t.length,u=d;for(d&&mE(t,"-");u<a;){var c=iE;for(n=0;n<e.length;n++)(r=e[n])>=i&&r<c&&(c=r);var l=u+1;if(c-i>lE((iE-s)/l))throw uE(dE);for(s+=(c-i)*l,i=c,n=0;n<e.length;n++){if((r=e[n])<i&&++s>iE)throw uE(dE);if(r==i){for(var h=s,f=36;;){var p=f<=o?1:f>=o+26?26:f-o;if(h<p)break;var m=h-p,v=36-p;mE(t,hE(bE(p+m%v))),h=lE(m/v),f+=36}mE(t,hE(bE(h))),o=yE(s,l,u==d),s=0,u++}}s++,i++}return pE(t,"")},wE=$i,kE=nt,xE=ey,EE=K,DE=Nr,SE=le,RE=gr,TE=qo,IE=np,CE=_e,OE=tE,PE=yl,LE=Lo,BE=Fl.codeAt,UE=function(e){var t,n,r=[],a=gE(vE(AE(e),oE,"."),".");for(t=0;t<a.length;t++)n=a[t],mE(r,cE(sE,n)?"xn--"+_E(n):n);return pE(r,".")},ME=os,FE=rd,jE=hp,GE=__,NE=Yn,qE=NE.set,HE=NE.getterFor("URL"),VE=GE.URLSearchParams,QE=GE.getState,zE=EE.URL,WE=EE.TypeError,KE=EE.parseInt,YE=Math.floor,JE=Math.pow,XE=SE("".charAt),ZE=SE(/./.exec),$E=SE([].join),eD=SE(1..toString),tD=SE([].pop),nD=SE([].push),rD=SE("".replace),aD=SE([].shift),iD=SE("".split),sD=SE("".slice),oD=SE("".toLowerCase),dD=SE([].unshift),uD="Invalid scheme",cD="Invalid host",lD="Invalid port",hD=/[a-z]/i,fD=/[\d+-.a-z]/i,pD=/\d/,mD=/^0x/i,vD=/^[0-7]+$/,gD=/^\d+$/,AD=/^[\da-f]+$/i,bD=/[\0\t\n\r #%/:<>?@[\\\]^|]/,yD=/[\0\t\n\r #/:<>?@[\\\]^|]/,_D=/^[\u0000-\u0020]+/,wD=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,kD=/[\t\n\r]/g,xD=function(e){var t,n,r,a;if("number"==typeof e){for(t=[],n=0;n<4;n++)dD(t,e%256),e=YE(e/256);return $E(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,a=0,i=0;i<8;i++)0!==e[i]?(a>n&&(t=r,n=a),r=null,a=0):(null===r&&(r=i),++a);return a>n&&(t=r,n=a),t}(e),n=0;n<8;n++)a&&0===e[n]||(a&&(a=!1),r===n?(t+=n?":":"::",a=!0):(t+=eD(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},ED={},DD=OE({},ED,{" ":1,'"':1,"<":1,">":1,"`":1}),SD=OE({},DD,{"#":1,"?":1,"{":1,"}":1}),RD=OE({},SD,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),TD=function(e,t){var n=BE(e,0);return n>32&&n<127&&!CE(t,e)?e:encodeURIComponent(e)},ID={ftp:21,file:null,http:80,https:443,ws:80,wss:443},CD=function(e,t){var n;return 2==e.length&&ZE(hD,XE(e,0))&&(":"==(n=XE(e,1))||!t&&"|"==n)},OD=function(e){var t;return e.length>1&&CD(sD(e,0,2))&&(2==e.length||"/"===(t=XE(e,2))||"\\"===t||"?"===t||"#"===t)},PD=function(e){return"."===e||"%2e"===oD(e)},LD={},BD={},UD={},MD={},FD={},jD={},GD={},ND={},qD={},HD={},VD={},QD={},zD={},WD={},KD={},YD={},JD={},XD={},ZD={},$D={},eS={},tS=function(e,t,n){var r,a,i,s=ME(e);if(t){if(a=this.parse(s))throw WE(a);this.searchParams=null}else{if(void 0!==n&&(r=new tS(n,!0)),a=this.parse(s,null,r))throw WE(a);(i=QE(new VE)).bindURL(this),this.searchParams=i}};tS.prototype={type:"URL",parse:function(e,t,n){var r,a,i,s,o,d=this,u=t||LD,c=0,l="",h=!1,f=!1,p=!1;for(e=ME(e),t||(d.scheme="",d.username="",d.password="",d.host=null,d.port=null,d.path=[],d.query=null,d.fragment=null,d.cannotBeABaseURL=!1,e=rD(e,_D,""),e=rD(e,wD,"$1")),e=rD(e,kD,""),r=PE(e);c<=r.length;){switch(a=r[c],u){case LD:if(!a||!ZE(hD,a)){if(t)return uD;u=UD;continue}l+=oD(a),u=BD;break;case BD:if(a&&(ZE(fD,a)||"+"==a||"-"==a||"."==a))l+=oD(a);else{if(":"!=a){if(t)return uD;l="",u=UD,c=0;continue}if(t&&(d.isSpecial()!=CE(ID,l)||"file"==l&&(d.includesCredentials()||null!==d.port)||"file"==d.scheme&&!d.host))return;if(d.scheme=l,t)return void(d.isSpecial()&&ID[d.scheme]==d.port&&(d.port=null));l="","file"==d.scheme?u=WD:d.isSpecial()&&n&&n.scheme==d.scheme?u=MD:d.isSpecial()?u=ND:"/"==r[c+1]?(u=FD,c++):(d.cannotBeABaseURL=!0,nD(d.path,""),u=ZD)}break;case UD:if(!n||n.cannotBeABaseURL&&"#"!=a)return uD;if(n.cannotBeABaseURL&&"#"==a){d.scheme=n.scheme,d.path=LE(n.path),d.query=n.query,d.fragment="",d.cannotBeABaseURL=!0,u=eS;break}u="file"==n.scheme?WD:jD;continue;case MD:if("/"!=a||"/"!=r[c+1]){u=jD;continue}u=qD,c++;break;case FD:if("/"==a){u=HD;break}u=XD;continue;case jD:if(d.scheme=n.scheme,a==rE)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=LE(n.path),d.query=n.query;else if("/"==a||"\\"==a&&d.isSpecial())u=GD;else if("?"==a)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=LE(n.path),d.query="",u=$D;else{if("#"!=a){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=LE(n.path),d.path.length--,u=XD;continue}d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=LE(n.path),d.query=n.query,d.fragment="",u=eS}break;case GD:if(!d.isSpecial()||"/"!=a&&"\\"!=a){if("/"!=a){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,u=XD;continue}u=HD}else u=qD;break;case ND:if(u=qD,"/"!=a||"/"!=XE(l,c+1))continue;c++;break;case qD:if("/"!=a&&"\\"!=a){u=HD;continue}break;case HD:if("@"==a){h&&(l="%40"+l),h=!0,i=PE(l);for(var m=0;m<i.length;m++){var v=i[m];if(":"!=v||p){var g=TD(v,RD);p?d.password+=g:d.username+=g}else p=!0}l=""}else if(a==rE||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()){if(h&&""==l)return"Invalid authority";c-=PE(l).length+1,l="",u=VD}else l+=a;break;case VD:case QD:if(t&&"file"==d.scheme){u=YD;continue}if(":"!=a||f){if(a==rE||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()){if(d.isSpecial()&&""==l)return cD;if(t&&""==l&&(d.includesCredentials()||null!==d.port))return;if(s=d.parseHost(l))return s;if(l="",u=JD,t)return;continue}"["==a?f=!0:"]"==a&&(f=!1),l+=a}else{if(""==l)return cD;if(s=d.parseHost(l))return s;if(l="",u=zD,t==QD)return}break;case zD:if(!ZE(pD,a)){if(a==rE||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()||t){if(""!=l){var A=KE(l,10);if(A>65535)return lD;d.port=d.isSpecial()&&A===ID[d.scheme]?null:A,l=""}if(t)return;u=JD;continue}return lD}l+=a;break;case WD:if(d.scheme="file","/"==a||"\\"==a)u=KD;else{if(!n||"file"!=n.scheme){u=XD;continue}if(a==rE)d.host=n.host,d.path=LE(n.path),d.query=n.query;else if("?"==a)d.host=n.host,d.path=LE(n.path),d.query="",u=$D;else{if("#"!=a){OD($E(LE(r,c),""))||(d.host=n.host,d.path=LE(n.path),d.shortenPath()),u=XD;continue}d.host=n.host,d.path=LE(n.path),d.query=n.query,d.fragment="",u=eS}}break;case KD:if("/"==a||"\\"==a){u=YD;break}n&&"file"==n.scheme&&!OD($E(LE(r,c),""))&&(CD(n.path[0],!0)?nD(d.path,n.path[0]):d.host=n.host),u=XD;continue;case YD:if(a==rE||"/"==a||"\\"==a||"?"==a||"#"==a){if(!t&&CD(l))u=XD;else if(""==l){if(d.host="",t)return;u=JD}else{if(s=d.parseHost(l))return s;if("localhost"==d.host&&(d.host=""),t)return;l="",u=JD}continue}l+=a;break;case JD:if(d.isSpecial()){if(u=XD,"/"!=a&&"\\"!=a)continue}else if(t||"?"!=a)if(t||"#"!=a){if(a!=rE&&(u=XD,"/"!=a))continue}else d.fragment="",u=eS;else d.query="",u=$D;break;case XD:if(a==rE||"/"==a||"\\"==a&&d.isSpecial()||!t&&("?"==a||"#"==a)){if(".."===(o=oD(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(d.shortenPath(),"/"==a||"\\"==a&&d.isSpecial()||nD(d.path,"")):PD(l)?"/"==a||"\\"==a&&d.isSpecial()||nD(d.path,""):("file"==d.scheme&&!d.path.length&&CD(l)&&(d.host&&(d.host=""),l=XE(l,0)+":"),nD(d.path,l)),l="","file"==d.scheme&&(a==rE||"?"==a||"#"==a))for(;d.path.length>1&&""===d.path[0];)aD(d.path);"?"==a?(d.query="",u=$D):"#"==a&&(d.fragment="",u=eS)}else l+=TD(a,SD);break;case ZD:"?"==a?(d.query="",u=$D):"#"==a?(d.fragment="",u=eS):a!=rE&&(d.path[0]+=TD(a,ED));break;case $D:t||"#"!=a?a!=rE&&("'"==a&&d.isSpecial()?d.query+="%27":d.query+="#"==a?"%23":TD(a,ED)):(d.fragment="",u=eS);break;case eS:a!=rE&&(d.fragment+=TD(a,DD))}c++}},parseHost:function(e){var t,n,r;if("["==XE(e,0)){if("]"!=XE(e,e.length-1))return cD;if(t=function(e){var t,n,r,a,i,s,o,d=[0,0,0,0,0,0,0,0],u=0,c=null,l=0,h=function(){return XE(e,l)};if(":"==h()){if(":"!=XE(e,1))return;l+=2,c=++u}for(;h();){if(8==u)return;if(":"!=h()){for(t=n=0;n<4&&ZE(AD,h());)t=16*t+KE(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,u>6)return;for(r=0;h();){if(a=null,r>0){if(!("."==h()&&r<4))return;l++}if(!ZE(pD,h()))return;for(;ZE(pD,h());){if(i=KE(h(),10),null===a)a=i;else{if(0==a)return;a=10*a+i}if(a>255)return;l++}d[u]=256*d[u]+a,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;d[u++]=t}else{if(null!==c)return;l++,c=++u}}if(null!==c)for(s=u-c,u=7;0!=u&&s>0;)o=d[u],d[u--]=d[c+s-1],d[c+--s]=o;else if(8!=u)return;return d}(sD(e,1,-1)),!t)return cD;this.host=t}else if(this.isSpecial()){if(e=UE(e),ZE(bD,e))return cD;if(t=function(e){var t,n,r,a,i,s,o,d=iD(e,".");if(d.length&&""==d[d.length-1]&&d.length--,(t=d.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(a=d[r]))return e;if(i=10,a.length>1&&"0"==XE(a,0)&&(i=ZE(mD,a)?16:8,a=sD(a,8==i?1:2)),""===a)s=0;else{if(!ZE(10==i?gD:8==i?vD:AD,a))return e;s=KE(a,i)}nD(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=JE(256,5-t))return null}else if(s>255)return null;for(o=tD(n),r=0;r<n.length;r++)o+=n[r]*JE(256,3-r);return o}(e),null===t)return cD;this.host=t}else{if(ZE(yD,e))return cD;for(t="",n=PE(e),r=0;r<n.length;r++)t+=TD(n[r],ED);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return CE(ID,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&CD(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,a=e.host,i=e.port,s=e.path,o=e.query,d=e.fragment,u=t+":";return null!==a?(u+="//",e.includesCredentials()&&(u+=n+(r?":"+r:"")+"@"),u+=xD(a),null!==i&&(u+=":"+i)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?s[0]:s.length?"/"+$E(s,"/"):"",null!==o&&(u+="?"+o),null!==d&&(u+="#"+d),u},setHref:function(e){var t=this.parse(e);if(t)throw WE(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new nS(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+xD(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(ME(e)+":",LD)},getUsername:function(){return this.username},setUsername:function(e){var t=PE(ME(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=TD(t[n],RD)}},getPassword:function(){return this.password},setPassword:function(e){var t=PE(ME(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=TD(t[n],RD)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?xD(e):xD(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,VD)},getHostname:function(){var e=this.host;return null===e?"":xD(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,QD)},getPort:function(){var e=this.port;return null===e?"":ME(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=ME(e))?this.port=null:this.parse(e,zD))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+$E(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,JD))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=ME(e))?this.query=null:("?"==XE(e,0)&&(e=sD(e,1)),this.query="",this.parse(e,$D)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=ME(e))?("#"==XE(e,0)&&(e=sD(e,1)),this.fragment="",this.parse(e,eS)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var nS=function(e){var t=IE(this,rS),n=jE(arguments.length,1)>1?arguments[1]:void 0,r=qE(t,new tS(e,!1,n));kE||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},rS=nS.prototype,aS=function(e,t){return{get:function(){return HE(this)[e]()},set:t&&function(e){return HE(this)[t](e)},configurable:!0,enumerable:!0}};if(kE&&(TE(rS,"href",aS("serialize","setHref")),TE(rS,"origin",aS("getOrigin")),TE(rS,"protocol",aS("getProtocol","setProtocol")),TE(rS,"username",aS("getUsername","setUsername")),TE(rS,"password",aS("getPassword","setPassword")),TE(rS,"host",aS("getHost","setHost")),TE(rS,"hostname",aS("getHostname","setHostname")),TE(rS,"port",aS("getPort","setPort")),TE(rS,"pathname",aS("getPathname","setPathname")),TE(rS,"search",aS("getSearch","setSearch")),TE(rS,"searchParams",aS("getSearchParams")),TE(rS,"hash",aS("getHash","setHash"))),RE(rS,"toJSON",(function(){return HE(this).serialize()}),{enumerable:!0}),RE(rS,"toString",(function(){return HE(this).serialize()}),{enumerable:!0}),zE){var iS=zE.createObjectURL,sS=zE.revokeObjectURL;iS&&RE(nS,"createObjectURL",DE(iS,zE)),sS&&RE(nS,"revokeObjectURL",DE(sS,zE))}FE(nS,"URL"),wE({global:!0,constructor:!0,forced:!xE,sham:!kE},{URL:nS});var oS=function(){function e(t){C.default(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return I.default(e,[{key:"_getFakeCustomParams",value:function(){var e={_vid:["bla_bla1","bla_bla2","bla_bla3"],_1ld:["1ld_1","1ld_2","1ld_3","1ld_4"],_1lp:["1lp_1","1lp_2"]},t={};for(var n in e){var r=e[n];t[n]=r[Math.floor(Math.random()*r.length)]}return t}},{key:"checkCustomParams",value:function(){var e=this;try{var t={},n=this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled,r=new P.default(location.href,!0);for(var a in r.query)t[a]=r.query[a];return Object.keys(t).filter(function(t){var n=this;return S.default(this,e),this.customParamKeys.some(function(e){return S.default(this,n),e===t}.bind(this))}.bind(this)).length>0||n?(console.log("custom-params",t,n),t):void console.log("custom-params, none")}catch(e){console.log("_checkCustomParams.Error",e)}}}]),e}(),dS=function(){function e(t,n){C.default(this,e),this.adContainer=t,this.onResume=n}return I.default(e,[{key:"show",value:function(){this.adResumeButton.style.display="block",this.adResumeButtonOverlay.style.display="block"}},{key:"hide",value:function(){this.adResumeButton.style.display="none",this.adResumeButtonOverlay.style.display="none"}},{key:"add",value:function(){var e=this;try{var t=document.createElement("div");this.adResumeButton=t,t.id="gd__resume__button",t.setAttribute("title","Resume"),this.addStyles(),t.classList.add("gd__resume__button"),t.addEventListener("click",function(){S.default(this,e),this.onResume()}.bind(this)),this.adContainer.appendChild(t);var n=document.createElement("div");this.adResumeButtonOverlay=n,n.id="gd__resume__button__overlay",n.classList.add("gd__resume__button__overlay"),this.adContainer.appendChild(n)}catch(e){console.log("Resume button add error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__resume__button__style",e,'\n .gd__resume__button{\n background-image: url("https://img.gamedistribution.com/play-black.svg");\n background-color:white; \n width: 120px;\n height: 120px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(50% - 60px);\n left: calc(50% - 60px);\n margin: 0;\n border-radius: 50%;\n border: 2px solid white;\n animation: play-button 1s ease-in-out infinite alternate;\n -webkit-animation: play-button 1s ease-in-out infinite alternate;\n }\n \n .gd__resume__button__overlay {\n position: fixed;\n display: none;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0,0,0,0.5);\n z-index: 1999;\n cursor: pointer;\n }\n @keyframes play-button {\n 0% {\n transform: scale(1.0);\n -webkit-transform: scale(1.0);\n }\n 100% {\n transform: scale(1.1);\n -webkit-transform: scale(1.1);\n }\n }\n .gd__resume__button:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n ')}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),uS=function(){function e(t,n){C.default(this,e),this.adContainer=t,this.onResume=n}return I.default(e,[{key:"show",value:function(){this.rewardLabel.style.display="block"}},{key:"hide",value:function(){this.rewardLabel.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div");this.rewardLabel=e;var t=document.createElement("span");t.innerText="To receive the reward, please do not skip the ad",this.addStyles(),e.classList.add("gd__reward__label"),t.classList.add("gd__reward__span"),this.rewardLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__reward__label__style",e,"\n .gd__reward__label{\n background-color:black; \n width: 160px;\n // height: 35px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: 40px;\n left: 10px;\n margin: 0;\n border-radius: 5px;\n border: .5px solid gray;\n text-align: center;\n }\n .gd__reward__label:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n .gd__reward__span{\n color: white;\n font-size: 12px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),cS=function(){function e(t,n,r){C.default(this,e),this.adContainer=t,this.onResume=n,this.OnSkip=r}return I.default(e,[{key:"show",value:function(){this.skipAd.style.display="block"}},{key:"hide",value:function(){this.skipAd.style.display="none"}},{key:"add",value:function(){var e=this;try{var t=document.createElement("div");this.skipAd=t;var n=document.createElement("span");n.innerText="Skip Ad >>",this.addStyles(),t.classList.add("gd__skip__ad"),n.classList.add("gd__skip__span"),this.skipAd.appendChild(n),this.adContainer.appendChild(t),this.skipAd.addEventListener("click",function(){S.default(this,e),this.OnSkip()}.bind(this))}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__skip__ad__style",e,"\n .gd__skip__ad{\n background-color:black; \n width: 260px;\n // height: 35px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: 40px;\n right: 0px;\n margin: 0;\n border-radius: 5px;\n border: .5px solid gray;\n text-align: center;\n padding: 10px;\n }\n .gd__skip__ad:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n .gd__skip__span{\n color: white;\n font-size: 22px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),lS=function(){function e(t){C.default(this,e),this.adContainer=t}return I.default(e,[{key:"show",value:function(){this.audioLabel.style.display="block"}},{key:"hide",value:function(){this.audioLabel.style.display="none"}},{key:"mute",value:function(){document.getElementById("game").contentWindow.postMessage("mute","*")}},{key:"unmute",value:function(){document.getElementById("game").contentWindow.postMessage("unmute","*")}},{key:"add",value:function(){try{var e=document.createElement("div");this.audioLabel=e;var t=document.createElement("span");t.innerText="Audio Ad is Playing";var n=document.createElement("span");n.innerHTML="&#9432;",this.addStyles(),e.classList.add("gd__audio__label"),t.classList.add("gd__audio__span"),n.classList.add("gd__audio__span"),this.audioLabel.appendChild(n),this.audioLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__audio__label__style",e,"\n .gd__audio__label{\n background-color: #ffca00; \n width: 200px;\n position: relative;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: 0px;\n margin: 0 auto;\n border-radius: 0px;\n border: 0px;\n text-align: center;\n height: 30px;\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n padding: 5px;\n }\n .gd__audio__span{\n color: black;\n font-size: 14px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),hS=function(){function e(t){C.default(this,e),this.adContainer=t,this.counterLabel=null,this.countdownInterval=null}return I.default(e,[{key:"show",value:function(){this.counterLabel&&(this.counterLabel.style.display="block",this.startCountdown(this.counterSpan,5))}},{key:"hide",value:function(){this.counterLabel&&(this.counterLabel.style.display="none"),this.countdownInterval&&(clearInterval(this.countdownInterval),this.countdownInterval=null)}},{key:"add",value:function(){try{var e=document.createElement("div");this.counterLabel=e;var t=document.createElement("span");this.counterSpan=t,t.innerText="Ad showing in 5...",t.classList.add("gd__counter__span"),this.addStyles(),e.classList.add("gd__counter__label"),e.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"startCountdown",value:function(e,t){var n=this,r=t;e.innerText="Ad showing in ".concat(r,"..."),this.countdownInterval=setInterval(function(){S.default(this,n),(r-=1)>0?e.innerText="Ad showing in ".concat(r,"..."):(clearInterval(this.countdownInterval),e.innerText="Ad is now showing!",this.hide())}.bind(this),1e3)}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__counter__label__style",e,"\n .gd__counter__label {\n position: absolute;\n background-color: rgba(0, 0, 0, 0.5);\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: 0px;\n margin: 0 auto;\n width: 200px;\n height: 40px;\n border-radius: 0px;\n text-align: center;\n padding: 8px;\n top: 87%;\n right: -1px;\n border: 1px solid white;\n }\n .gd__counter__span {\n font-size: 15px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),fS=function(){function e(t,n){C.default(this,e),this.adContainer=n,this.infoLabel=null,this.info=t}return I.default(e,[{key:"show",value:function(){this.infoLabel&&(this.infoLabel.style.display="block")}},{key:"hide",value:function(){this.infoLabel&&(this.infoLabel.style.display="none")}},{key:"add",value:function(){try{var e=document.createElement("div");this.infoLabel=e;var t=document.createElement("span");this.counterSpan=t,t.innerText="".concat(this.info),t.classList.add("gd__ad_info__span"),this.addStyles(),e.classList.add("gd__ad_info__label"),e.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__ad_info__label__style",e,"\n .gd__ad_info__label {\n position: absolute;\n background-color: rgba(0, 0, 0, 0.5);\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: 8px;\n left: 8px;\n margin: 0 auto;\n width: 200px;\n border-radius: 0px;\n text-align: center;\n padding: 8px;\n border: 1px solid white;\n }\n .gd__ad_info__span {\n font-size: 15px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),pS=function(){function e(t){C.default(this,e),this.adContainer=t}return I.default(e,[{key:"show",value:function(){this.t4rButton.style.display="block"}},{key:"hide",value:function(){this.t4rButton.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div"),t=document.createElement("p");this.addStyles(),t.innerText="x",e.appendChild(t),e.id="gd__exit__button",e.setAttribute("title","Exit"),e.classList.add("gd__exit__button"),this.t4rButton=e,document.body.appendChild(e)}catch(e){console.log("Exit button add error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__exit__button__style",e,"\n .gd__exit__button{\n background-color: transparent; \n width: 50px;\n height: 50px;\n position: absolute;\n pointer-events:none; \n z-index: 2000;\n top: 17px;\n right: 17px;\n margin: 0;\n border-radius: 50px;\n border: 1px solid white;\n text-align: center; \n font-size: 16px;\n line-height: normal;\n font-family: 'Arial';\n font-weight: bolder;\n }\n .gd__exit__button:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),mS=!ie((function(){return Object.isExtensible(Object.preventExtensions({}))})),vS={exports:{}},gS=ie((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),AS=ie,bS=it,yS=_r,_S=gS,wS=Object.isExtensible,kS=AS((function(){wS(1)}))||_S?function(e){return!!bS(e)&&((!_S||"ArrayBuffer"!=yS(e))&&(!wS||wS(e)))}:wS,xS=$i,ES=le,DS=Bn,SS=it,RS=_e,TS=tt.f,IS=si,CS=xo,OS=kS,PS=mS,LS=!1,BS=De("meta"),US=0,MS=function(e){TS(e,BS,{value:{objectID:"O"+US++,weakData:{}}})},FS=vS.exports={enable:function(){FS.enable=function(){},LS=!0;var e=IS.f,t=ES([].splice),n={};n[BS]=1,e(n).length&&(IS.f=function(n){for(var r=e(n),a=0,i=r.length;a<i;a++)if(r[a]===BS){t(r,a,1);break}return r},xS({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:CS.f}))},fastKey:function(e,t){if(!SS(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!RS(e,BS)){if(!OS(e))return"F";if(!t)return"E";MS(e)}return e[BS].objectID},getWeakData:function(e,t){if(!RS(e,BS)){if(!OS(e))return!0;if(!t)return!1;MS(e)}return e[BS].weakData},onFreeze:function(e){return PS&&LS&&OS(e)&&!RS(e,BS)&&MS(e),e}};DS[BS]=!0;var jS=$i,GS=mS,NS=ie,qS=it,HS=vS.exports.onFreeze,VS=Object.freeze;jS({target:"Object",stat:!0,forced:NS((function(){VS(1)})),sham:!GS},{freeze:function(e){return VS&&qS(e)?VS(HS(e)):e}});var QS=function(){function e(){C.default(this,e),this.container=null,this.ensureContainer()}return I.default(e,[{key:"ensureContainer",value:function(){this.container||(this.container=document.createElement("div"),this.container.classList.add("gd__toaster__container"),this.type=Object.freeze({ERROR:"error",SUCCESS:"success",SKIP:"skip"}),document.body.appendChild(this.container),this.addStyles())}},{key:"show",value:function(e,t){var n=this;if(this.isRunningOnRevision()&&this.isToastEnabled()){var r=document.createElement("div");r.classList.add("gd__toaster"),t===this.type.ERROR?r.style.background="rgb(244, 67, 54)":t===this.type.SKIP&&(r.style.background="rgb(255, 165, 0)");var a=document.createElement("img");a.src="https://gamedistribution.com/assets/logos/logo-mark.svg",a.classList.add("gd__toaster__icon");var i=document.createElement("div");i.classList.add("gd__toaster__msg"),i.innerText=e,r.appendChild(a),r.appendChild(i),this.container.appendChild(r),requestAnimationFrame(function(){S.default(this,n),r.style.opacity="1",r.style.transform="translateY(0)"}.bind(this)),setTimeout(function(){var e=this;S.default(this,n),r.style.opacity="0",r.style.transform="translateY(20px)",setTimeout(function(){return S.default(this,e),r.remove()}.bind(this),300)}.bind(this),4e3)}}},{key:"addStyles",value:function(){if(!document.getElementById("gd__toaster__style")){var e=document.createElement("style");e.id="gd__toaster__style",e.appendChild(document.createTextNode("\n .gd__toaster__container {\n position: fixed;\n bottom: 20px;\n right: 20px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n z-index: 3000;\n }\n\n .gd__toaster {\n background: rgb(76, 175, 80);\n border-radius: 8px;\n padding: 12px 16px;\n color: white;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n display: flex;\n align-items: center;\n gap: 10px;\n box-shadow: 0px 0px 10px rgba(0,0,0,0.5);\n min-width: 250px;\n max-width: 300px;\n opacity: 0;\n transform: translateY(20px);\n transition: opacity 0.25s ease, transform 0.25s ease;\n }\n\n .gd__toaster__icon {\n width: 22px;\n height: 22px;\n }\n\n .gd__toaster__msg {\n font-size: 14px;\n line-height: 1.3;\n }\n ")),document.body.appendChild(e)}}},{key:"isRunningOnRevision",value:function(){try{return"revision.gamedistribution.com"===document.location.host}catch(e){return!1}}},{key:"isToastEnabled",value:function(){try{return"true"===new URLSearchParams(window.location.search).get("enableToast")}catch(e){return!1}}}]),e}(),zS=function(e){if(!e)return!1;var t=WS.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},WS=Object.prototype.toString;function KS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function YS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KS(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function JS(e){return null!=e&&e.error_url?"<vmap:VASTAdData>".concat(function(e){return e.promo_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),"</vmap:VASTAdData>"):'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>")}var XS,ZS="13998",$S="_cc".concat(ZS),eR=["https://tags.crwdcntrl.net/c/".concat(ZS,"/cc.js?ns=").concat($S)],tR=function(){return!!XS&&"function"==typeof XS.bcpf&&"function"==typeof XS.add},nR=function(e,t){try{if(!tR())return;XS.add(e,t),yo("lotame add success ".concat(e," ").concat(t))}catch(e){yo("lotame add error",err)}},rR=function(e,t){try{if(!tR())return;XS.bcpw(e,t),yo("lotame send success ".concat(e," ").concat(t))}catch(e){}},aR=function(e){var t=this;try{nR("act","play"),nR("med","game"),"complete"===document.readyState?XS.bcpf():XS.bcp(),e.tags.forEach(function(e){S.default(this,t),rR("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),rR("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},iR=function(){window.addEventListener("load",(function(){Tw.once("game-data-ready",function(){var e=D.default(T.default.mark((function e(t){var n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,e.t0=null!=mb&&mb.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,Gw();case 6:e.t0=e.sent;case 7:if(!e.t0){e.next=10;break}return e.abrupt("return");case 10:if(null!==(n=t.lotm)&&void 0!==n&&n.enabled){e.next=13;break}return e.abrupt("return");case 13:return e.next=16,a.getScript(eR[0],"LOTCC_".concat(ZS),{alternates:eR});case 16:"object"===R.default(window[$S])&&(XS=window[$S]),tR()&&aR(t),e.next=23;break;case 20:e.prev=20,e.t1=e.catch(1),yo("lotame init error",e.t1);case 23:case"end":return e.stop()}}),e,null,[[1,20]])})));return function(t){return e.apply(this,arguments)}}())}))},sR=function(){rR("genp","ad video"),rR("act","ad impression")},oR=function(){rR("act","ad skipped")},dR=function(){rR("act","ad click")},uR=function(){rR("act","ad complete")},cR=function(){var e=(new I_).get("partner.url.value"),t=new P.default(e,!0),n={isRevisionTest:!1,useTestAds:!1,disableMidrolltimer:!1};if("revision.gamedistribution.com"===t.host){var r=t.query.test,a="1"===r||"2"===r,i="1"===r;n={useTestAds:a,disableMidrolltimer:i,isRevisionTest:i||a}}return n},lR=function(){function e(){C.default(this,e),this.adContainer=window.document.body}return I.default(e,[{key:"show",value:function(e){this.adSpinner.style.display="block",this.adSpinnerOverlay.style.display="block",e?(this.adSpinner.style.display="block",this.adSpinnerFail.style.display="none",this.adSpinnerButton.style.display="none"):(this.adSpinner.style.display="none",this.adSpinnerFail.style.display="block",this.adSpinnerButton.style.display="block")}},{key:"hide",value:function(){this.adSpinner.style.display="none",this.adSpinnerOverlay.style.display="none"}},{key:"add",value:function(){var e=this;try{this.addStyles();var t=document.createElement("div");t.id="gd__spinner",t.setAttribute("title","Spinner"),t.classList.add("gd__spinner"),this.adSpinner=t;var n=document.createElement("div");n.id="gd__spinner__fail",n.setAttribute("title","Spinner"),n.classList.add("gd__spinner__fail"),n.innerHTML="No Ads Available!",this.adSpinnerFail=n;var r=document.createElement("div");r.id="gd__spinner__button",r.setAttribute("title","Spinner"),r.classList.add("gd__spinner__button"),r.onclick=function(){S.default(this,e),this.hide()}.bind(this);var a=document.createElement("p");a.innerText="OK!",r.appendChild(a),this.adSpinnerButton=r;var i=document.createElement("div");i.id="gd__spinner__logo",i.setAttribute("title","Spinner"),i.classList.add("gd__spinner__logo"),this.adSpinnerLogo=i;var s=document.createElement("div");s.id="gd__spinner__container",s.classList.add("gd__spinner__container"),s.appendChild(this.adSpinner),s.appendChild(this.adSpinnerFail),s.appendChild(this.adSpinnerButton),s.appendChild(this.adSpinnerLogo),this.adSpinnerContainer=s;var o=document.createElement("div");o.id="gd__spinner__overlay",o.classList.add("gd__spinner__overlay"),o.appendChild(this.adSpinnerContainer),this.adSpinnerOverlay=o,this.adContainer.appendChild(this.adSpinnerOverlay)}catch(e){console.log("Spinner error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__spinner__style",e,'\n .gd__spinner__button{ \n text-align: center; \n width: 150px;\n height: 50px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(80% - 25px);\n left: calc(50% - 75px);\n margin: 0;\n font-size: large;\n font-family: monospace;\n background-color: #ff8c1c;\n border-radius: 50px;\n color: white;\n }\n\n .gd__spinner__fail{\n text-align: center; \n width: 300px;\n height: 50px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(65% - 25px);\n left: calc(50% - 150px);\n margin: 0;\n font-size: large;\n font-family: monospace;\n color: #ff8c1c;\n }\n\n .gd__spinner__logo{\n background: url("https://static.gamedistribution.com/android-chrome-192x192.png") no-repeat;\n background-size: cover; \n width: 100px;\n height: 100px;\n position: absolute;\n display: block;\n z-index: 2000;\n cursor: pointer;\n top: calc(30% - 50px);\n left: calc(50% - 50px);\n margin: 0;\n border-radius: 50%;\n }\n\n .gd__spinner__container{ \n background-color: black; \n width: 300px;\n height: 300px;\n position: absolute;\n z-index: 2000;\n cursor: pointer;\n top: calc(50% - 150px);\n left: calc(50% - 150px);\n margin: 0;\n border-radius: 20px;\n border: 2px solid #06b8a2;\n }\n\n\n .gd__spinner{\n background: url("https://static.gamedistribution.com/assets/loader.gif") no-repeat;\n background-size: cover; \n width: 50px;\n height: 50px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(80% - 25px);\n left: calc(50% - 25px);\n margin: 0;\n border-radius: 50%;\n }\n \n .gd__spinner__overlay {\n position: fixed;\n display: none;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0,0,0,0.5);\n z-index: 1999;\n cursor: pointer;\n }\n ')}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}();function hR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hR(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pR(e){var t=e.gameData,n=e.msgrt,r=e.topDomain,a=e.parentDomain,i=e.parentURL;return{send_atom_event:function(e,s){if(function(e){var n=this,r=t.dbglg;return(null==r?void 0:r.enabled)&&r.topics&&r.topics.some(function(t){return S.default(this,n),t===e}.bind(this))}(e)){var o={gid:t.slug,md5:t.gameId,pid:0,pnm:t.pname,ctry:t.ctry,lcl:"en",hle:1,ads:1,args:s,href:window.location.href},d=(new I_).get();return o=fR(fR({},o),d),function(e,t){try{var s=n._layout,o=n._ua,d={tp:e,ct:0,vrs:go.version,url:i,rfr:document.referrer,tdmn:r||a,dpth:0,args:t,ua:{brnm:o.browser.name,brvs:o.browser.version,osnm:o.os.name,osvs:o.os.version,dvmd:o.device.model,w:s.w,h:s.h}};return fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(u.Base64.encode(JSON.stringify(d)))))}catch(e){}}(e,o=s?fR(fR({},o),s):o)}}}}function mR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mR(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var gR=new m.EventEmitter,AR=null,bR=function(){function e(t,n,r){var i=this;if(C.default(this,e),AR)return AR;AR=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=n?a.extendDefaults(s,n):s,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new a.EventBus,this.safetyTimer=null,this.containerTransitionSpeed=0,this.adCounter={},this.adPrerollCount=0,this.adMidrollCount=0,this.adRewardedCount=0,this.preloadedAdType=null,this.requestRunning=!1,this.parentDomain=r.parentDomain,this.topDomain=r.topDomain,this.parentURL=r.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=a.getIMASampleTags(),this.atom_display,this.adType_="",this.rewardGuarantied=!1,this.imaEventList=[],this.clickCount={midroll:0,preroll:0,rewarded:0},this.userAllowedPersonalizedAds=document.location.search.indexOf("gdpr-targeting=0")>=0||document.cookie.indexOf("ogdpr_advertisement=0")>=0?"0":"1",this.parentDomain.includes("girlsgogames")&&(this.userAllowedPersonalizedAds=!1),this.thirdPartyContainer=""!==t?document.getElementById(t):null,this.options.width="number"==typeof this.options.width?this.options.width:"100%"===this.options.width?640:this.options.width.replace(/[^0-9]/g,""),this.options.height="number"==typeof this.options.height?this.options.height:"100%"===this.options.height?360:this.options.height.replace(/[^0-9]/g,"");var o=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,d=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:o,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:d,this.category="",this.tags=[],this.eventCategory="AD",this.adToaster=new QS(window.document.body),this.adToaster.show("GD SDK Loaded Successfully 👍"),this.eventBus.subscribe("LOADED",function(){S.default(this,i),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){S.default(this,i),this._clearSafetyTimer("STARTED")}.bind(this),"ima"),this.eventBus.subscribe("AD_SUCCESS",function(){S.default(this,i),this.adToaster.show("".concat(this.adType_.toUpperCase()," shown successfully!"))}.bind(this)),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){S.default(this,i),this.adToaster.show("Preparing to show ".concat(this.adType_.toUpperCase()," ad. ==> pause everything!!"))}.bind(this)),this.eventBus.subscribe("AD_ERROR",function(){S.default(this,i),this.adToaster.show("Failed to show ".concat(this.adType_," Ad"),"error")}.bind(this)),this.eventBus.subscribe("SDK_REWARDED_WATCH_COMPLETE",function(){S.default(this,i),this.adToaster.show("Grant reward to the user!")}.bind(this))}var t,n,r,i,s,o,d,c,l,h,f,p,m,v,g,A,b,_,w,k,x,E,R,L,B,U,M;return I.default(e,[{key:"start",value:(M=D.default(T.default.mark((function e(){var t,n,r,a=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.adSystemInitialize(D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a._init_afg_script({});case 2:case"end":return e.stop()}}),e)}))));case 3:return t=e.sent,this.afgInitSuccess=t.success,e.next=7,this.adSystemInitialize(D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a._init_hl_script();case 2:return e.next=4,a._init_ima_script();case 4:a._createPlayer(),a._setUpIMA();case 6:case"end":return e.stop()}}),e)}))));case 7:if(n=e.sent,this.imaInitSuccess=n.success,r=[],this.afgInitSuccess||r.push(t.error),this.imaInitSuccess||r.push(n.error),!(r.length>0)){e.next=14;break}throw r[0];case 14:window.eventTest=function(e){S.default(this,a),this._broadcast(e,{message:"",status:"success"})}.bind(this),e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(0),wo("gd-adflow error on ads.start",e.t0),new Error(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,17]])}))),function(){return M.apply(this,arguments)})},{key:"adSystemInitialize",value:(U=D.default(T.default.mark((function e(t){var n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={success:!1},e.prev=1,e.next=4,t();case 4:n.success=!0,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),n.error=e.t0;case 10:return e.abrupt("return",n);case 12:case"end":return e.stop()}}),e,null,[[1,7]])}))),function(e){return U.apply(this,arguments)})},{key:"_getDefaultSpilAdapterConfig",value:function(){return{vast:null,url:"https://pubads.g.doubleclick.net/gampad/ads",query:{correlator:"{{CACHEBUSTER}}",description_url:"{{PAGE_URL}}",env:"vp",gdfp_req:1,impl:"s",iu:"/59392726/gd_instream",npa:0,output:"vast",sz:"640x480|400x300",tfcd:0,unviewed_position_start:1}}}},{key:"_getSpilUrl",value:(B=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h,f;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.adType,r=t.options,e.prev=1,s=null===(a=this.gameData.adflw)||void 0===a||null===(i=a.adapterConfig)||void 0===i?void 0:i.spil,o=this.nextAdPosition(n),e.next=6,this._create_dp_context(o,r);case 6:return d=e.sent,s?(yo("spil-adaptor: in _getSpilUrl, adType, adPosition, gamedata",n,o,this.gameData),u=s[o]||s.default||this._getDefaultSpilAdapterConfig()):u=this._getDefaultSpilAdapterConfig(),c=100*d.floor_price,yo("spil-adaptor: fp",d.floor_price),l=this._createCustomAdVastUrl(u,{tnl_keys:{floor_price:c}}),h=l.url,f={url:h,dp:d,hl:{bidFloorApplied:!0}},e.abrupt("return",f);case 17:e.prev=17,e.t0=e.catch(1),console.log("spil-adaptor: Error on getting spil",e.t0);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return B.apply(this,arguments)})},{key:"checkIfTestAdsExist",value:function(){return a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&a.Ls.getBoolean("gd_tag")||cR().useTestAds}},{key:"_getAdVast",value:function(e,t){var n=this;return new Promise(function(){var r=D.default(T.default.mark((function r(i){var s,o,d,u,c,l,h,f,p=this;return T.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&a.Ls.getBoolean("gd_tag")||cR().useTestAds)){r.next=6;break}return s=n.IMASampleTags[e].filter(function(e){return S.default(this,p),e.indexOf("redirecterror")<0}.bind(this)),o=Math.floor(Math.random()*s.length),d=s[o],i({url:d,tnl_keys:{tnl_ad_pos:null==t?void 0:t.adTypeFound}}),r.abrupt("return");case 6:if("spil"!==t.adapter){r.next=8;break}return r.abrupt("return",i(n._getSpilUrl({adType:e,options:t})));case 8:if(void 0!==window.idhb.requestAds){r.next=10;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 10:return r.prev=10,u=n.nextAdPosition(e),null!=t&&t.adTypeFound&&(u=null==t?void 0:t.adTypeFound),n._broadcast("AD_REQUEST",{message:u}),c=n.options,"preroll"===u&&y.isPlainObject(c.preroll)?c=c.preroll:"midroll"===u&&y.isPlainObject(c.midroll)?c=c.midroll:"rewarded"===u&&y.isPlainObject(c.rewarded)&&(c=c.rewarded),l="","audio"===t.adapter||"audio"===t.giftType?(n.isAudioAd=!0,l="midrollaudio"):(n.isAudioAd=!1,l="rewarded"===u?"rewardedVideo":"gdbanner"===u?"gd__banner":"midroll"===u?"midroll":"video1"),r.next=20,window.idhb.isLoaded();case 20:return r.next=22,n._create_dp_context(u,t);case 22:h=r.sent,_o("gd-adflow, before idhb",u,l),f=window.idhb.getAdserverTargetingForAdSlot(l),window.idhb.setAdserverTargeting(vR(vR({},f),{},{adaptor_order:t.adapterIndex})),yo("hl-order 2",window.idhb.getAdserverTargetingForAdSlot(l)),window.idhb.requestAds({slots:O.default({},l,{bidFloor:(null==h?void 0:h.floor_price)||void 0}),callback:function(e,t){var r=this;S.default(this,p),"Missing configuration"===(null==e?void 0:e.error)&&n._broadcast("HL_CONFIG_ERROR",{status:"warning"}),!h||null!=t&&t.bidFloorApplied||fetch(h.skip_url).catch(function(e){S.default(this,r)}.bind(this));var a={src:"hl",tnl_keys:vR(vR({},window.idhb.getAdserverTargetingForAdSlot(l)),{},{tnl_ad_pos:u,tnl_asset_id:n.gameData.gameId}),url:e,dp:h,hl:t};n._extend_hl_url(a),i(a)}.bind(this)}),r.next=34;break;case 31:throw r.prev=31,r.t0=r.catch(10),new Error(r.t0);case 34:case"end":return r.stop()}}),r,this,[[10,31]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===a.AdType.Rewarded)return this.adRewardedCount++,"rewarded";if(e===a.AdType.Interstitial){var t=!1===this.gameData.preroll||1===this.adPrerollCount;return t?this.adMidrollCount++:this.adPrerollCount++,t||this.adMidrollCount>0?"midroll":"preroll"}return"midroll"}},{key:"getAdPosition",value:function(e){return e===a.AdType.Rewarded?"rewarded":e===a.AdType.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"getCurrentAdPosition",value:function(e){return e===a.AdType.Interstitial?1===this.adPrerollCount&&0===this.adMidrollCount?"preroll":"midroll":e===a.AdType.Rewarded?"rewarded":void 0}},{key:"_requestPromo",value:function(e,t){var n=new google.ima.AdsRequest;return n.adsResponse=function(e){return'<VAST version="3.0"> \n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA['.concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,"]]></VASTAdTagURI> \n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),n.linearAdSlotWidth=this.options.width,n.linearAdSlotHeight=this.options.height,n.nonLinearAdSlotWidth=this.options.width,n.nonLinearAdSlotHeight=this.options.height,n.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(n.vastLoadTimeout=this.options.vast_load_timeout),n.setAdWillAutoPlay(t.autoplayAllowed),n.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(n),n}},{key:"_requestAd",value:function(e,t){var n=this;return t=t||{},new Promise(function(r){var a=this;if(S.default(this,n),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var i,s,o=null==e||null===(i=e.tnl_keys)||void 0===i?void 0:i.tnl_ad_pos;this.adSuccess=!1,this.contentPaused=!1;var d=new google.ima.AdsRequest,u=this._transformVast(e,t),c=vR(vR({},t),{},{adTag:u,tnl_ad_pos:o});this.adCounter[o]=this.adCounter[o]||0,this.adCounter[o]++;var l=e.dp,h=e.hl;this.current_dp=l,l&&!u.bidder&&(l.adtag_url=u.url);var f=this._isVMAP(o);this.adContext.isVMAP=f,function(){S.default(this,a),t.shouldFail&&(l?(l.adtag_url="dp_original_broken",l.fallback_url="dp_fallback_broken"):u.url="original_broken",yo("gd-adflow, _requestAd, dp.adtag_url",null==l?void 0:l.adtag_url),yo("gd-adflow, _requestAd, dp.fallback_url",null==l?void 0:l.fallback_url),yo("gd-adflow, _requestAd, adTag.url",u.url))}.bind(this);var p=this._getExternalVast(null===(s=t)||void 0===s?void 0:s.adType);if(p)d.adTagUrl=p;else if(f){_o("gd-adflow, _isVMAP");var m=function(e){for(var t=[],n="",r=Date.now(),a={ppos:1,lip:!0,vad_type:"linear"},i=0;i<e.length;i++){var s=new P.default(e[i].adtag.url,!0);s.query=YS(YS({},s.query),{},{ad_rule:0,vpos:e[i].position,pod:1,correlator:0===i?r:++r,output:"xml_vast3"}),i<e.length-1&&(s.query=YS(YS({},s.query),a)),t.push(s.toString())}for(var o=Date.now(),d=1;d<=t.length;d++){var u,c,l,h;n+='<vmap:AdBreak timeOffset="start" breakType="linear" breakId="break-'.concat(d,'">\n <vmap:AdSource id="').concat(o++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(JS({id:o++,adtag_url:t[d-1],error_url:null===(u=e[d-1].dp)||void 0===u?void 0:u.error_url,impression_url:null===(c=e[d-1].dp)||void 0===c?void 0:c.impression_url,fallback_url:null===(l=e[d-1].dp)||void 0===l?void 0:l.fallback_url,fallback_imp_url:null===(h=e[d-1].dp)||void 0===h?void 0:h.fallback_imp_url}),"</vmap:AdSource>\n </vmap:AdBreak>")}return'<?xml version="1.0" encoding="UTF-8"?>\n <vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">\n '.concat(n,"\n </vmap:VMAP>").trim()}(this._get_vmap_context({dp:l,adtag:u,position:"preroll"===c.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(o)}));d.adsResponse=m}else if(l&&h.bidFloorApplied){yo("gd-adflow, vast wrapper"),l.adtag_url||(l.adtag_url=u.url);var v=function(e){return e.promo_url?e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="2" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(l);d.adsResponse=v}else if(l&&l.fallback_url){yo("gd-adflow, vast wrapper 2");var g=function(e){return'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim()}(l);d.adsResponse=g}else yo("gd-adflow, without dp"),d.adTagUrl=u.url;d.linearAdSlotWidth=this.options.width,d.linearAdSlotHeight=this.options.height,d.nonLinearAdSlotWidth=this.options.width,d.nonLinearAdSlotHeight=this.options.height,d.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(d.vastLoadTimeout=this.options.vast_load_timeout),d.setAdWillAutoPlay(t.autoplayAllowed);var A=t.opusSuccess||t.autoplayRequiresMute;d.setAdWillPlayMuted(A),this.adsLoader.requestAds(d,c);try{this._broadcast("AD_SDK_REQUEST",{message:c})}catch(e){}r(d)}catch(e){throw new Error(e)}}.bind(this))}},{key:"_getExternalVast",value:function(e){var t;try{var n,r,a,i,s,o,d=this.getCurrentAdPosition(e),u=null===(n=this.gameData)||void 0===n?void 0:n.cust_vast,c=(null==u?void 0:u[d])||(null==u?void 0:u.default);if(!c)return yo("[ext-vast] no custom vast config"),null;yo("[ext-vast] has custom vast config",u);var l=null==c||null===(r=c.maps)||void 0===r||null===(a=r.position)||void 0===a?void 0:a[d],h=function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),!1===t&&window.orientation>-1&&(t=!0),t}();yo("[ext-vast] is-mobile",h);var f=h?"mobile":"desktop",p=null==c||null===(i=c.maps)||void 0===i||null===(s=i.env)||void 0===s?void 0:s[f],m=this._createCustomAdVastUrl(c,{tnl_keys:{slug:null===(o=this.gameData)||void 0===o?void 0:o.slug,mapped_position:l,mapped_env:p}});t=null==m?void 0:m.url,yo("[ext-vast] check result",t)}catch(e){wo("[ext-vast] check err",e)}return t}},{key:"cancel",value:function(e){var t,n;if(!1!==this.requestRunning){this.requestRunning=!1,this._resetAdsLoader(),this._hide("cancel"),this.activeAdContainer&&(this.activeAdContainer.style.opacity=1),this.adsManager&&this.adsManager.setVolume(null!==(t=this.adContext)&&void 0!==t&&t.muteRequested?0:1),this.t4rButton&&this.t4rButton.hide();var r=(null==e||null===(n=e.message)||void 0===n?void 0:n.indexOf("NO_VAST_URL"))>=0,a="AD_SDK_CANCELED";this._broadcast(a,{name:a,message:"Advertisement has been canceled.",status:"warning",noVast:r,analytics:{category:this.eventCategory,action:a,label:this.gameData.gameId}})}}},{key:"_checkAutoPlay",value:(L=D.default(T.default.mark((function e(){var t=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r,a=this;S.default(this,t);var i=navigator.userAgent.toLowerCase();i.indexOf("safari")>-1&&i.indexOf("chrome");var s=(null===(r=this.gameData)||void 0===r?void 0:r._apOps)||!0;q.default.video({inline:!0,muted:!1}).then(function(t){S.default(this,a);var n=t.result;t.error,e(!0===n?{autoplayAllowed:s,autoplayRequiresMute:!1}:{autoplayAllowed:s,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return L.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(R=D.default(T.default.mark((function e(){var t;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._checkAutoPlay(!1);case 2:return t=e.sent,this._autoplay=t,this.video_ad_player.autoplay=t.autoplayAllowed,this.video_ad_player.volume=t.autoplayRequiresMute?0:1,this.video_ad_player.muted=!!t.autoplayRequiresMute,t.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0),e.abrupt("return",t);case 9:case"end":return e.stop()}}),e,this)}))),function(){return R.apply(this,arguments)})},{key:"startAd",value:(E=D.default(T.default.mark((function e(t){var n,r,i,s=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.adType,i=t.params,this.adType_=r,this.isAudioAd=!1,this.adContext=vR(vR({},i),{},{adType:r}),null!==(n=this.gameData.adspn)&&void 0!==n&&n.enabled&&(this.adFlowProcessSpinner||(this.adFlowProcessSpinner=new lR,this.adFlowProcessSpinner.add()),this.adFlowProcessSpinner.show(!0)),"promo"!==(null==i?void 0:i.adapter)){e.next=7;break}return e.abrupt("return",this._startPromo(i,r));case 7:if("adsense"!==(null==i?void 0:i.adapter)){e.next=31;break}if(r!==a.AdType.Interstitial){e.next=24;break}if("preroll"!==(null==i?void 0:i.position)){e.next=13;break}return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 13:if("start"!==(null==i?void 0:i.position)){e.next=17;break}return e.abrupt("return",this._startAdsensePlacementStart(t));case 17:if("next"!==(null==i?void 0:i.position)){e.next=21;break}return e.abrupt("return",this._startAdsensePlacementNext(t));case 21:return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 22:e.next=29;break;case 24:if(r!==a.AdType.Rewarded){e.next=28;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(t));case 28:throw new Error("Unsupported ad type");case 29:e.next=44;break;case 31:if(!["ima","spil","audio"].some(function(e){return S.default(this,s),e===(null==i?void 0:i.adapter)}.bind(this))){e.next=42;break}if(r!==a.AdType.Interstitial){e.next=37;break}return e.abrupt("return",this._startInterstitialAd(i));case 37:if(r!==a.AdType.Rewarded){e.next=41;break}return e.abrupt("return",this._startRewardedAd(i));case 41:throw new Error("Unsupported ad type");case 42:["opus"].some(function(e){return S.default(this,s),e===(null==i?void 0:i.adapter)}.bind(this))&&this._startOpusAd(i);case 44:case"end":return e.stop()}}),e,this)}))),function(e){return E.apply(this,arguments)})},{key:"_startOpusAd",value:(x=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h,f,p,m,v,g=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r="rewarded"===t.adTypeFound?"reward":t.adTypeFound,this._send_atom_event("opus-ad.start"),!this.requestRunning){e.next=8;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),this._broadcast("AD_ERROR",{message:"Ad is already running",status:"error",reason:"request-running"}),this._send_atom_event("opus-ad.already-running"),e.abrupt("return");case 8:if(a=null===(n=window.gdlocus)||void 0===n?void 0:n.adBreak){e.next=13;break}return this._send_atom_event("opus-ad.not-initialized"),this._broadcast("AD_ERROR",{message:"Locus adBreak not found",status:"error",reason:"opus-not-found"}),e.abrupt("return");case 13:this._send_atom_event("opus-ad.ready"),i=void function(){return S.default(this,g),!0}.bind(this),this.requestRunning=!0,s=this.gameData,o=s.gameId,d=s.slug,u=s.title,c={assetId:o,slug:d,title:u,debug:i},l=function(e){S.default(this,g),this.opusEventReceived=!0,this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),h=function(e){S.default(this,g),this.opusEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),f=function(){S.default(this,g),this.opusEventReceived=!0}.bind(this),p=function(){S.default(this,g),this.opusEventReceived=!0,this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),m=function(e){S.default(this,g),this.opusEventReceived=!0,this.resetForNext();var t="".concat(r);this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):this._broadcast("AD_ERROR",{message:e.errorMessage,errorType:e.errorType,status:e.breakStatus,reason:"opus-error"})}.bind(this),console.log("opus-ad meta",c),v={type:r,meta:c,beforeAd:l,afterAd:h,adBreakDone:m},"reward"===r&&(v=vR(vR({},v),{},{adDismissed:f,adViewed:p})),this.opusEventReceived=!1,this._startTimeoutForOpus(),a&&a(v);case 30:case"end":return e.stop()}}),e,this)}))),function(e){return x.apply(this,arguments)})},{key:"preloadAd",value:(k=D.default(T.default.mark((function e(t){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==a.AdType.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==a.AdType.Rewarded){e.next=8;break}return e.abrupt("return","gdsdk://preloaded");case 8:throw new Error("Unsupported ad type");case 9:case"end":return e.stop()}}),e)}))),function(e){return k.apply(this,arguments)})},{key:"addAdComponents",value:function(){var e=this,t=function(){S.default(this,e),this.adsManager.resume()}.bind(this),n=function(){S.default(this,e),this.rewardGuarantied||(this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!1),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this._hideSkipButton(),this.cancel()}.bind(this);try{this.adResume=new dS(this.adContainer,t),this.adResume.add(),this.rewardedLabel=new uS(this.adContainer,t),this.rewardedLabel.add(),this.skipAdButton=new cS(this.adContainer,t,n),this.skipAdButton.add(),this.audioAdLabel=new lS(window.document.body),this.audioAdLabel.add(),this.audioAdLabel.hide(),this.adCounterLabel=new hS(window.document.body),this.adCounterLabel.add(),this.adCounterLabel.hide(),this.adInfoLabel=new fS("Watching multiple ads now will reduce adbreaks later",window.document.body),this.adInfoLabel.add(),this.adInfoLabel.hide()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(w=D.default(T.default.mark((function e(t){var n=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=D.default(T.default.mark((function e(r,i){var s,o,d,u,c,l,h,f,p,m=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{yo("display_test load",t),(o=t?t.containerId:null)||i("Container id is not specified"),d=document.getElementById(o),document.getElementById(o)||i("No container is found with this id - ".concat(o)),void 0===window.idhb.requestAds&&i("Prebid.js wrapper script hit an error or didn't exist!"),u=t.slotId?t.slotId:"gd__banner@".concat(o),document.getElementById(u)||(c="\n .gd__banner{\n z-index: ".concat(a.Layers.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n }"),document.getElementById("gd__banner__style")||((l=document.createElement("style")).type="text/css",l.id="gd__banner__style",l.styleSheet?l.styleSheet.cssText=c:l.appendChild(document.createTextNode(c)),d.appendChild(l)),(h=document.createElement("div")).id=u,h.classList.add("gd__banner"),d.appendChild(h)),n.atom_display=null,null!==(s=n.atom_display)&&void 0!==s&&s.params&&window.idhb.setAdserverTargeting(null===(f=n.atom_display)||void 0===f?void 0:f.params),(p={})[u]={maxSize:[d.offsetWidth,d.offsetHeight]},yo("display_test slots",p),window.idhb.requestAds({slots:p,callback:function(e){S.default(this,m),yo("display_test callback",JSON.stringify(e,null,2))}.bind(this)}),r()}catch(e){console.log("display_test error",e),i(e.message||e)}case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return w.apply(this,arguments)})},{key:"_startInterstitialAd",value:(_=D.default(T.default.mark((function e(t){var n,r,a,i,s,o=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:if(!void function(){if(S.default(this,o),ko.fictionalIMAError)return this._broadcast("AD_ERROR",{message:"fictional IMA error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return r=e.sent,e.next=13,this._loadInterstitialAd(vR(vR({},r),t));case 13:if(a=e.sent,i=a.success,a.args,i){e.next=18;break}return e.abrupt("return");case 18:null!==(n=this.adContext)&&void 0!==n&&n.muteRequested?this.adsManager.setVolume(0):(r.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(s=this.gameData.advlm)||void 0===s?void 0:s.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=28;break;case 23:throw e.prev=23,e.t0=e.catch(0),yo("VAST_URL_2 error",e.t0),this._onError(e.t0),e.t0;case 28:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return _.apply(this,arguments)})},{key:"_startPromo",value:(b=D.default(T.default.mark((function e(t,n){var r,a,i,s,o;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:return this.requestRunning=!0,this.adSuccess=!1,e.next=8,this._initDisplayContainerWithAutoPlay();case 8:return a=e.sent,e.next=11,this._loadPromo(vR(vR({},a),t),n);case 11:if(i=e.sent,s=i.success,i.args,s){e.next=16;break}return e.abrupt("return");case 16:null!==(r=this.adContext)&&void 0!==r&&r.muteRequested?this.adsManager.setVolume(0):(a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(o=this.gameData.advlm)||void 0===o?void 0:o.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),this.msgrt.send("promo.adsense",{message:"".concat(t.position," success")}),e.next=27;break;case 22:throw e.prev=22,e.t0=e.catch(0),this.msgrt.send("promo.adsense.err",{message:"".concat(t.position," failure,").concat(e.t0.message?e.t0.message:e.t0,", [").concat(this.parentURL,"]")}),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,22]])}))),function(e,t){return b.apply(this,arguments)})},{key:"_loadPromo",value:(A=D.default(T.default.mark((function e(t,n){var r,i;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._resetAdsLoader(),e.prev=1,r=this.nextAdPosition(n),i=this._create_promo_context(r),this._requestPromo(i,vR({adType:a.AdType.Interstitial},t)),e.next=7,this._waitOnAdLoad();case 7:return e.abrupt("return",e.sent);case 10:throw e.prev=10,e.t0=e.catch(1),new Error(e.t0);case 13:case"end":return e.stop()}}),e,this,[[1,10]])}))),function(e,t){return A.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(g=D.default(T.default.mark((function e(t){var n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(a.AdType.Interstitial,t);case 6:e.t0=e.sent;case 7:if(n=e.t0,delete this.preloadedInterstitialAdVast,n.url){e.next=12;break}throw new Error("NO_VAST_URL");case 12:return e.next=14,this._requestAd(n,vR({adType:a.AdType.Interstitial},t));case 14:return e.sent,e.next=17,this._waitOnAdLoad();case 17:return e.abrupt("return",e.sent);case 20:throw e.prev=20,e.t1=e.catch(1),console.log("VAST_URL error",e.t1),new Error(e.t1);case 24:case"end":return e.stop()}}),e,this,[[1,20]])}))),function(e){return g.apply(this,arguments)})},{key:"_waitOnAdLoad",value:function(){var e=this;return new Promise(function(t,n){var r=this;S.default(this,e);var a="videoad.preloadad";this.eventBus.unsubscribeScope(a);var i=function(e){var n=this;S.default(this,r),setTimeout(function(){S.default(this,n),this.eventBus.unsubscribeScope(a),t({success:!0,args:e})}.bind(this),1)}.bind(this),s=function(e){var n=this;S.default(this,r),setTimeout(function(){S.default(this,n),this.eventBus.unsubscribeScope(a),t({success:!1,args:e})}.bind(this),1)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",i,a),this.eventBus.subscribe("AD_SDK_CANCELED",s,a),this.eventBus.subscribe("AD_ERROR",s,a)}.bind(this))}},{key:"_startRewardedAd",value:(v=D.default(T.default.mark((function e(t){var n,r,a,i,s,o=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:if(!void function(){if(S.default(this,o),ko.fictionalIMAError)return this._broadcast("AD_ERROR",{message:"fictional IMA error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return r=e.sent,e.next=13,this._loadRewardedAd(vR(vR({},r),t));case 13:if(a=e.sent,i=a.success,a.args,i){e.next=18;break}return e.abrupt("return");case 18:null!==(n=this.adContext)&&void 0!==n&&n.muteRequested?this.adsManager.setVolume(0):(r.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(s=this.gameData.advlm)||void 0===s?void 0:s.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=27;break;case 23:throw e.prev=23,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return v.apply(this,arguments)})},{key:"_loadRewardedAd",value:(m=D.default(T.default.mark((function e(t){var n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(a.AdType.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,vR({adType:a.AdType.Rewarded},t));case 11:return e.sent,e.next=14,this._waitOnAdLoad();case 14:return e.abrupt("return",e.sent);case 17:throw e.prev=17,e.t1=e.catch(1),new Error(e.t1);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return m.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(p=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(a.AdType.Interstitial);case 5:e.t0=e.sent;case 6:return this.preloadedInterstitialAdVast=e.t0,e.abrupt("return",this.preloadedInterstitialAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return p.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(f=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(a.AdType.Rewarded);case 5:e.t0=e.sent;case 6:return this.preloadedRewardedAdVast=e.t0,e.abrupt("return",this.preloadedRewardedAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return f.apply(this,arguments)})},{key:"_onError",value:function(e){this.cancel(e),this._clearSafetyTimer("ERROR")}},{key:"_hide",value:function(e){this.video_ad_player&&(this.video_ad_player.src=""),this.activeAdContainer&&(this.activeAdContainer.style.visibility="hidden")}},{key:"_show",value:function(e){var t=this;if(this.activeAdContainer){this.isAudioAd||(this.activeAdContainer.style.visibility="visible");var n=null==e?void 0:e.mode;e.t4r=this.gameData.__t4r,e.t4rac=this.gameData.__t4rac;var r=this._adrequest_user_context.t4RResult?this._adrequest_user_context.t4RResult:this._isT4R(e);this._adrequest_user_context.t4RResult=r;var a=r.success,i=r.reason,s=this._getT4ROptions(e);if("loaded"===n){var o,d,u=(null===(o=this._adrequest_user_context)||void 0===o||null===(d=o.adTag)||void 0===d?void 0:d.bidder)||"adx";this._broadcast("AD_BIDDER",{bidder:u}),a||this._broadcast("AD_T4R_NONE",{reason:i}),this.activeAdContainer.style.opacity=a?.001:1,a&&null!=e&&e.contentType.startsWith("video/")&&(this.t4rButton=new pS(this.adContainer),this.t4rButton.add(),this._broadcast("AD_T4R_VIDEO")),a&&this.adsManager.setVolume(0),a&&this._broadcast("AD_T4R"),a&&setTimeout(function(){var e;S.default(this,t),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(null!==(e=this.adContext)&&void 0!==e&&e.muteRequested?0:1),this.t4rButton&&this.t4rButton.hide()}.bind(this),((null==s?void 0:s.min)||1234)+Math.random()*((null==s?void 0:s.max)||3210))}else if("click"===n||"first_quartile"===n){var c;if(a&&"click"===n){var l,h=null===(l=this._adrequest_user_context)||void 0===l?void 0:l.tnl_ad_pos;this.clickCount[h]++,this._broadcast("AD_T4R_CLICK")}a||"click"!==n||this._broadcast("AD_CLICK"),this.t4rButton&&this.t4rButton.hide(),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(null!==(c=this.adContext)&&void 0!==c&&c.muteRequested?0:1)}}}},{key:"_createPlayer",value:function(){var e=this,t=document.body||document.getElementsByTagName("body")[0];this.adContainer=document.createElement("div"),this.adContainer.id="".concat(this.prefix,"advertisement"),this.adContainer.style.position=this.thirdPartyContainer?"absolute":"fixed",this.adContainer.style.zIndex=a.Layers.AdsContainer.zIndex,this.adContainer.style.top="0",this.adContainer.style.left="0",this.adContainer.style.width="100%",this.adContainer.style.height="100%",this.thirdPartyContainer&&(this.thirdPartyContainer.style.transform=null);var n=document.createElement("video");n.setAttribute("playsinline",!0),n.setAttribute("webkit-playsinline",!0),n.id="".concat(this.prefix,"advertisement_video"),n.style.position="absolute",n.style.backgroundColor="#000000",n.style.top="0",n.style.left="0",n.style.width=this.options.width+"px",n.style.height=this.options.height+"px",this.video_ad_player=n,this.adContainer.appendChild(n);var r=document.createElement("div");r.id="".concat(this.prefix,"advertisement_slot"),r.style.position="absolute",r.style.top="0",r.style.left="0",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",this.adContainerInner=r,this.activeAdContainer=this.adContainer,window.activeAdContainer=this.activeAdContainer,this.thirdPartyContainer?(this.adContainer.appendChild(r),this.thirdPartyContainer.appendChild(this.adContainer),this.activeAdContainer=this.thirdPartyContainer):(this.adContainer.appendChild(r),t.appendChild(this.adContainer)),this.addAdComponents(),this.activeAdContainer.style.visibility="hidden";var i=function(){S.default(this,e);var t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:t,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:a,r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",n.style.width=this.options.width+"px",n.style.height=this.options.height+"px"}.bind(this);window.addEventListener("resize",i),window.document.addEventListener("DOMContentLoaded",i)}},{key:"_setUpIMA",value:function(){this.adDisplayContainer=new google.ima.AdDisplayContainer(this.adContainerInner,this.video_ad_player),this.adsLoader=new google.ima.AdsLoader(this.adDisplayContainer),this.adsLoader.getSettings().setDisableCustomPlaybackForIOS10Plus(!0),this.adsLoader.getSettings().setLocale(this.options.locale),this.adsLoader.getSettings().setVpaidMode(this._getVPAIDMode()),this.adsLoader.getSettings().setAutoPlayAdBreaks(!0);var e=this.adsLoader.getSettings().getNumRedirects();this.adsLoader.getSettings().setNumRedirects(2*e),this.adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this._onAdsManagerLoaded,!1,this),this.adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdError,!1,this)}},{key:"_onAdsManagerLoaded",value:function(e){var t=this,n=new google.ima.AdsRenderingSettings;n.autoAlign=!1,n.enablePreloading=!1,n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.useStyledNonLinearAds=!0,n.uiElements=[google.ima.UiElements.AD_ATTRIBUTION,google.ima.UiElements.COUNTDOWN],this.adsManager=e.getAdsManager(this.video_ad_player,n),this.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdError.bind(this),!1,this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_METADATA,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CLICK,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.DURATION_CHANGE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.FIRST_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.IMPRESSION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.INTERACTION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LINEAR_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOADED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOG,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.MIDPOINT,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.RESUMED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.THIRD_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.USER_CLOSE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_MUTED,this._onAdEvent.bind(this),this),window.addEventListener("resize",function(){S.default(this,t),this.adsManager&&this.adsManager.resize(this.options.width,this.options.height,google.ima.ViewMode.NORMAL)}.bind(this)),this.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0);var r=new Date,a=r.getHours(),i=r.getDate(),s=r.getMonth(),o=r.getFullYear(),d="AD_SDK_MANAGER_READY";this._broadcast(d,{name:d,message:"AD SDK is ready",status:"success",analytics:{category:d,action:this.parentDomain,label:"h".concat(a," d").concat(i," m").concat(s," y").concat(o)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var t,n,r,i,s=this,o=new Date,d=o.getHours(),u=o.getDate(),c=o.getMonth(),l=o.getFullYear(),h=a.getKeyByValue(google.ima.AdEvent.Type,e.type),f=!1,p=(null==e||null===(t=e.getAd())||void 0===t?void 0:t.getContentType())||"",m=!p.startsWith("image")&&!p.startsWith("text"),v=null==e||null===(n=e.ad)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.title,g=null==e||null===(i=e.getAd())||void 0===i?void 0:i.data.skippable;this._sendIMAEventsToHB(e);var A=document.getElementById("game"),b="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:b="Fired when an ad rule or a VMAP ad break would have played if autoPlayAdBreaks is false.";break;case google.ima.AdEvent.Type.AD_METADATA:b="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.contentPaused&&(f=!0),this.isAudioAd&&(this.audioAdLabel.hide(),this.isAudioAd=!1),this.rewardGuarantied=!1,b="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:b="Fired when the ad is clicked.";var y=e.getAd().getContentType();this._show({mode:"click",contentType:y}),dR();break;case google.ima.AdEvent.Type.COMPLETE:yo("gd-adflow ON COMPLETE!",e.getAd()),f=this._is_completed(e.getAd()),b="Fired when the ad completes playing.",this.adType_!==a.AdType.Rewarded||this.rewardGuarantied||(this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!0);break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.gameData.fllc.enabled&&(A.style.display="none"),this.contentPaused=!0,b="Fired when content should be paused. This usually happens right before an ad is about to cover the content.";break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.gameData.fllc.enabled&&(A.style.display="block"),b="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",this.contentPaused?f=!0:(this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"got resume without pause, possibly with VMAP",status:"error",skipForward:!0})),this._hideAddResume(),this._hideRewardedLabel(),this._hideSkipButton(),this.t4rButton&&this.t4rButton.hide(),this._clearTimeoutForSkipAddButton();break;case google.ima.AdEvent.Type.DURATION_CHANGE:b="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:b="Fired when the ad playhead crosses first quartile.";var _=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:_});break;case google.ima.AdEvent.Type.IMPRESSION:var w,k,x,E,D,R;if(b="Fired when the impression URL has been pinged.",e.getAd(),console.log("gdsdk: eventname IMPRESSION",this.isAudioAd),this._hideAdSpinner(),this.isAudioAd&&this.audioAdLabel.show(),"preroll"===this.adContext.adTypeFound)(null===(w=this.gameData)||void 0===w||null===(k=w.pAds)||void 0===k||null===(x=k.vmap)||void 0===x?void 0:x.enabled)&&(null===(E=this.gameData)||void 0===E||null===(D=E.pAds)||void 0===D||null===(R=D.vmap)||void 0===R?void 0:R.adtr)&&this.adInfoLabel.show();break;case google.ima.AdEvent.Type.INTERACTION:b="Fired when an ad triggers the interaction callback. Ad interactions contain an interaction ID string in the ad data.";break;case google.ima.AdEvent.Type.LINEAR_CHANGED:b="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var T=e.getAd().getContentType();b=T,this._show({mode:"loaded",contentType:T});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(b=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:b="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:m&&"VPAID"!==v&&this.adResume.show(),b="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:b="Fired when the ad is resumed.",m&&(this.adResume.hide(),this.rewardedLabel.hide());break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:b="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:var I;f=!(null!==(I=this.adContext)&&void 0!==I&&I.isVMAP)&&this._is_completed(e.getAd()),this.adToaster.show("⚠️ Ad was skipped ⚠️","skip"),b="Fired when the ad is skipped by the user.",oR(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:var C;if(this.skipAdButton&&this.skipAdButton.hide(),this.rewardGuarantied=!1,this.adType_===a.AdType.Rewarded)!g&&null!==(C=this.gameData.rwskp)&&void 0!==C&&C.enabled&&(this._skipAdButtonTimeout=setTimeout(function(){S.default(this,s),this.skipAdButton.show(),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!0}.bind(this),3e4)),this.rewardedLabel.show();this._hideAddResume(),b="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:b="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:f=this._is_completed(e.getAd()),b="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:b="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:b="Fired when the ad volume has been muted."}if(""!==h&&""!==b){var O=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,P=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED,L=O||P;"VPAID"===v&&this.imaEventList.push(h),L||this.isAudioAd||this._broadcast(h,{name:h,message:b,status:"success",analytics:{category:h,action:this.parentDomain,label:"h".concat(d," d").concat(u," m").concat(c," y").concat(l)}})}if(f&&!this.adSuccess){this.adSuccess=!0;var B=e.getAd();"VPAID"===v&&this._setAtomEvent();var U="Rainbow"===(null==B?void 0:B.getAdSystem())&&(null==B?void 0:B.getWrapperAdIds().some(function(e){return S.default(this,s),"promo"===e}.bind(this)));yo("gd-adflow isPromoSuccess",U,null==B?void 0:B.getAdSystem(),null==B?void 0:B.getWrapperAdIds()),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:U}),this.resetForNext(e)}}},{key:"_setAtomEvent",value:function(){this.dumper||(this.dumper=new pR({msgrt:this.msgrt,gameData:this.gameData,parentDomain:this.parentDomain,parentURL:this.parentURL,topDomain:this.parentURL}),this.dumper);var e={eventList:this.imaEventList};this.dumper.send_atom_event("vpaid",e),this.imaEventList=[]}},{key:"_clearTimeoutForSkipAddButton",value:function(){this._skipAdButtonTimeout&&(clearTimeout(this._skipAdButtonTimeout),this._skipAdButtonTimeout=null)}},{key:"_run_atom_tag_aws_test",value:function(e){var t=this;try{var n,r,a,i,s;if(!((null===(n=this.gameData)||void 0===n||null===(r=n.aws_tst)||void 0===r?void 0:r.enabled)&&(null===(a=this.gameData)||void 0===a||null===(i=a.aws_tst)||void 0===i||null===(s=i.ep)||void 0===s?void 0:s.atm)))return;var o=e.type,d=e.url;if("none"===o||!d)return;d=d.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(d).then(function(){S.default(this,t)}.bind(this))}catch(e){}}},{key:"_findAtomTagUrl",value:function(e,t){var n=this,r={type:"none"};try{var a=this.current_dp,i=a.id,s=a.error_url,o=a.impression_url,d=a.fallback_imp_url,u=a.promo_imp_green_url;if(!e&&!t)return r={type:"imp_err",url:s};var c=e.getWrapperAdIds().some(function(e){return S.default(this,n),e==="".concat(i)}.bind(this)),l=e.getWrapperAdIds().some(function(e){return S.default(this,n),"fallback"===e}.bind(this)),h=e.getWrapperAdIds().some(function(e){return S.default(this,n),"promo"===e}.bind(this));c&&t?r={type:"normal_imp",url:o}:c&&!t?r={type:"normal_err",url:s}:h&&t?r={type:"promo_imp",url:u}:l&&t&&(r={type:"fallbacj_imp",url:d})}catch(e){}return r}},{key:"_onAdError",value:function(e){this.requestRunning=!1,this._resetAdsLoader(),this._clearSafetyTimer("ERROR"),this._hide("_onAdError"),this._sendIMAEventsToHB(e);try{var t="AD_ERROR",n=e.getError(),r=n.getErrorCode().toString()||n.getVastErrorCode().toString(),a=this._getInnerErrorCode(n);gR.emit("AD_ERROR",r),this._broadcast(t,{message:r,details:a,status:"warning",analytics:{category:t,action:a,label:r}}),this._hideAddResume(),this._clearTimeoutForSkipAddButton()}catch(e){}}},{key:"_hideAddResume",value:function(){try{this.adResume&&this.adResume.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_hideAdSpinner",value:function(){try{var e;null!==(e=this.gameData.adspn)&&void 0!==e&&e.enabled&&this.adFlowProcessSpinner&&this.adFlowProcessSpinner.hide()}catch(e){console.log("Error on hide adSpinner",e)}}},{key:"_hideRewardedLabel",value:function(){try{this.adType_===a.AdType.Rewarded&&this.rewardedLabel&&this.rewardedLabel.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_hideSkipButton",value:function(){try{this.adType_===a.AdType.Rewarded&&this.skipAdButton&&this.skipAdButton.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_sendIMAEventsToHB",value:function(e){if(window.idhb&&"function"==typeof window.idhb.onImaEvent)try{window.idhb.onImaEvent({event:e})}catch(e){}}},{key:"_resetAdsLoader",value:function(){this.adsManager&&(this.adsManager.destroy(),this.adsManager=null,this._adrequest_user_context=null),this.adsLoader&&this.adsLoader.contentComplete()}},{key:"_startSafetyTimer",value:function(e,t){var n=this;this.safetyTimer&&clearTimeout(this.safetyTimer),this.safetyTimer=window.setTimeout(function(){S.default(this,n),this.cancel(),this._clearSafetyTimer(t)}.bind(this),e)}},{key:"_clearSafetyTimer",value:function(e){void 0!==this.safetyTimer&&null!==this.safetyTimer&&(clearTimeout(this.safetyTimer),this.safetyTimer=void 0)}},{key:"_getVPAIDMode",value:function(){return google.ima.ImaSdkSettings.VpaidMode.ENABLED}},{key:"_getPrebidScripts",value:function(){var e=["https://hb.improvedigital.com/pbw/headerlift.min.js","http://hb.improvedigital.com/pbw/headerlift.min.js"];return this.options.hb_script?[this.options.hb_script].concat(e):e}},{key:"_getInnerErrorCode",value:function(e){if(zS(e.getInnerError)){var t=e.getInnerError();if(t)return zS(t.getErrorCode)&&zS(t.getVastErrorCode)?t.getErrorCode().toString()||t.getVastErrorCode().toString():t.message}}},{key:"resetForNext",value:function(){this.requestRunning=!1,this._hide("resetForNext")}},{key:"_createCustomAdVastUrl",value:function(e,t){var n=this;if(e){var r=this.macros.transform(e,{get:function(e){if(S.default(this,n),t&&t.tnl_keys)return t.tnl_keys[e.toLowerCase()]}.bind(this)});for(var a in r.query||{}){var i=r.query[a];y.isPlainObject(i)&&(r.query[a]=H.default.stringify(i))}var s=new P.default(r.url,!0);return V.default(s.query,r.query||{}),vR({url:s.toString()},t)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new P.default(e.url,!0),a=this._transformQuery(e,t,r);a&&(n.url=r.toString());var i=a?r:new P.default(e.url,!0);if(i.query.cust_params){var s=H.default.parse(i.query.cust_params);n.bidder=s.hb_bidder,n.cust_params=s}n.url_parsed=i}catch(e){n.hasError=!0,n.message=e.message,n.bidder="error",console.log(e.message)}return n}},{key:"_transformQuery",value:function(e,t,n){var r=this;if(e&&t&&e.tnl_keys){var a=this.options.vast_query;if(t.retry_on_success&&this.options.retry_on_success&&y.isPlainObject(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:t.retry_on_failure&&this.options.retry_on_failure&&y.isPlainObject(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=F.default(a),y.isPlainObject(a)){var i=n.query;if(a.$$remove){for(var s in i){new RegExp(a.$$remove,"i").test(s)&&delete i[s]}delete a.$$remove}var o=H.default.parse(i.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var d in o){new RegExp(a.cust_params.$$remove,"i").test(d)&&delete o[d]}delete a.cust_params.$$remove}var u=this.macros.transform(a,{get:function(t){return S.default(this,r),e.tnl_keys[t.toLowerCase()]}.bind(this)});return i.cust_params=o,V.default(i,u),i.cust_params=H.default.stringify(i.cust_params),!0}}}},{key:"_isExcludedBidderForT4R",value:function(){var e=this;try{var t,n,r,a,i=(null===(t=this._adrequest_user_context)||void 0===t||null===(n=t.adTag)||void 0===n?void 0:n.bidder)||"adx";this.msgrt.send("bidder",{message:i}),yo("ex_bidder ad request context",this._adrequest_user_context,'bidder:"'.concat(i,'"'));var s=(null===(r=this.gameData.t4rc)||void 0===r?void 0:r.bidder_exc)||[],o=(null===(a=this.gameData.t4rc)||void 0===a?void 0:a.bidder_inc)||[],d=!1;return o.length>0?d=!o.some(function(t){return S.default(this,e),t===i}.bind(this)):s.length>0&&(d=s.some(function(t){return S.default(this,e),t===i}.bind(this))),yo("ex_bidder_result",i,d),d}catch(e){console.log("ex_bidder ERR",e)}}},{key:"_isExcludedBidderForT4RWithBidderExcRate",value:function(){var e,t,n=this._isExcludedBidderForT4R(),r=null===(e=this.gameData)||void 0===e||null===(t=e.t4rc)||void 0===t?void 0:t.bidder_exc_rate,a=null!=r&&r.enabled?(null==r?void 0:r.rate)||.8:0,i=Math.random();return n||i<a}},{key:"_isT4R",value:function(e){var t=null==e?void 0:e.contentType,n={isImage:null==t?void 0:t.startsWith("image/"),isText:"text"===t,isVideo:null==t?void 0:t.startsWith("video/")},r=Object.values(this._getT4RValidators(e)||{}),a={success:!0};try{for(var i=0,s=r;i<s.length;i++){var o=(0,s[i])(n);if(!o.success){a=o;break}}}catch(e){a={success:!1,reason:"internal-error"}}return a}},{key:"_getT4RValidators",value:function(e){var t=this,n=function(n){return S.default(this,t),e.t4rac.enabled?{success:!0,name:"ddate"}:{success:!1,reason:"ddate",name:"ddate"}}.bind(this),r=function(e){if(S.default(this,t),this.gameData.publishedAt){var n=new Date(this.gameData.publishedAt);return((new Date).getTime()-n.getTime())/864e5<=10?{success:!1,reason:"pdate-1",name:"pdate"}:{success:!0,name:"pdate"}}return{success:!1,reason:"pdate-2",name:"pdate"}}.bind(this),a=function(n){var r,a,i,s;S.default(this,t);var o=this.gameData.meta,d=e.t4r.meta;return(null==o||null===(r=o.ast)||void 0===r?void 0:r.c)>=(null==d||null===(a=d.ast)||void 0===a?void 0:a.c)&&(null==o||null===(i=o.sit)||void 0===i?void 0:i.c)>=(null==d||null===(s=d.sit)||void 0===s?void 0:s.c)?{success:!1,reason:"meta",name:"meta"}:{success:!0,name:"meta"}}.bind(this),i=function(e){S.default(this,t);var n=this._isExcludedBidderForT4RWithBidderExcRate();return this.msgrt.send("bidder.ex",{message:n?"true":"false"}),{success:!n,reason:n?"bidder":null,name:"bidder"}}.bind(this),s=function(n){var r,a;S.default(this,t);var i=null===(r=this._adrequest_user_context)||void 0===r?void 0:r.tnl_ad_pos,s=i&&this.clickCount[i]>=(null===(a=e.t4r[i])||void 0===a?void 0:a.count);return{success:!s,reason:s?"click-count":null,name:"click-count"}}.bind(this),o=function(n){var r,a;S.default(this,t);var i=null===(r=this._adrequest_user_context)||void 0===r?void 0:r.tnl_ad_pos,s=i&&(null===(a=e.t4r[i])||void 0===a?void 0:a.enabled);return{success:s,reason:s?null:"rule-check",name:"rule-check"}}.bind(this),d=function(n){var r,a;if(S.default(this,t),!n.isVideo)return{success:!0,name:"viper-check"};var i=null===(r=this._adrequest_user_context)||void 0===r?void 0:r.tnl_ad_pos,s=(null===(a=e.t4r[i])||void 0===a?void 0:a.viper)||0;if(s>0){var o,d=Math.random()<s,u=i&&d&&(null===(o=e.t4r[i])||void 0===o?void 0:o.enabled);return{success:u,reason:u?null:"viper-check",name:"viper-check"}}return{success:!1,reason:"rule-check-viper",name:"viper-check"}}.bind(this),u=function(e){S.default(this,t);var n=e.isImage,r=e.isText,a=e.isVideo,i=n||r||a;return{success:i,reason:i?null:"media-format",name:"media-format"}}.bind(this);return{checkRule:o,checkMediaFormat:u,checkPublishDate:r,checkMeta:a,checkClickCount:s,checkViper:d,checkExcludedBidder:i,checkT4rActivation:n}}},{key:"_isVMAP",value:function(e){var t,n,r,a,i,s,o,d,u,c,l,h,f,p,m;if(!e)return!1;var v="preroll"===e&&(!0===(null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap)||!0===(null===(r=this.gameData)||void 0===r||null===(a=r.pAds)||void 0===a||null===(i=a.vmap)||void 0===i?void 0:i.enabled))||"midroll"===e&&(!0===(null===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o?void 0:o.vmap)||!0===(null===(d=this.gameData)||void 0===d||null===(u=d.mAds)||void 0===u||null===(c=u.vmap)||void 0===c?void 0:c.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(f=this.gameData)||void 0===f||null===(p=f.rAds)||void 0===p||null===(m=p.vmap)||void 0===m?void 0:m.enabled));if(!v)return!1;var g=this._get_vmap_config(e),A=this.adCounter[e];return void 0!==(null==g?void 0:g.start)?A>=(null==g?void 0:g.start):v}},{key:"_getT4ROptions",value:function(e){var t,n=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;switch(n){case"preroll":case"midroll":case"rewarded":return e.t4r[n]}}},{key:"_is_completed",value:function(e){var t=e.getContentType(),n=e.getAdPodInfo();return!(!t.startsWith("image/")&&"text"!==t&&1!==n.getTotalAds())}},{key:"_get_vmap_context",value:function(e){for(var t=e.adtag,n=e.position,r=e.config,a=e.dp,i=r.count||2,s=[],o=1;o<=i;o++){var d={};d.adtag=this._createCustomAdVastUrl(r["vast_"+o])||t,d.position=n,d.dp=r["vast_"+o]?void 0:a,s.push(d)}return s}},{key:"_get_vmap_config",value:function(e){var t,n,r,a,i,s,o,d;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap;case"midroll":return null===(r=this.gameData)||void 0===r||null===(a=r.mAds)||void 0===a?void 0:a.vmap;case"rewarded":return null===(i=this.gameData)||void 0===i||null===(s=i.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(d=o.pAds)||void 0===d?void 0:d.vmap}}},{key:"_isDP",value:function(e){var t,n,r;return!!e&&!0===(null===(t=this.gameData)||void 0===t||null===(n=t.dp)||void 0===n||null===(r=n[e])||void 0===r?void 0:r.enabled)}},{key:"_create_dp_display_context",value:function(){var e=this;return new Promise(function(t){var n=this;S.default(this,e);try{var r={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new oS(this.gameData).checkCustomParams();a&&(r.cp=a);var i=encodeURIComponent(u.Base64.encode(JSON.stringify(r)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(i)).then(function(e){return S.default(this,n),e.json()}.bind(this)).then(function(e){if(S.default(this,n),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),t();var r=e.p/100;this.msgrt.send("dp.fp",{message:r}),t({params:{fp:r},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(i),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(i)})}.bind(this)).catch(function(e){S.default(this,n),this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),t()}.bind(this))}catch(e){this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),t()}}.bind(this))}},{key:"_create_promo_context",value:function(e){var t,n=this,r={id:this.topDomain||this.parentDomain,au:e||"unknown",ty:"video",aid:this.gameData.gameId,pgu:this.parentURL},a=Object.keys(r).map(function(e){return S.default(this,n),"".concat(e,"=").concat(encodeURIComponent(r[e]))}.bind(this)).join("&");encodeURIComponent(u.Base64.encode(JSON.stringify(r)));var i=null===(t=this.gameData.promo)||void 0===t?void 0:t.rainbow,s=null==i?void 0:i.enabled,o="https://tag.atom.gamedistribution.com/v1/rainbow/?".concat(a),d=s?o:void 0;return function(){S.default(this,n),ko.promoError&&(console.log("promo-test fictional promo error"),d=void 0)}.bind(this),{promo_url:d,promo_imp_blue_url:s?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:s?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0}}},{key:"_create_dp_context",value:function(e,t){var n=this;return new Promise(function(){var r=D.default(T.default.mark((function r(a){var i,s,o,d,c,l=this;return T.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,n._isDP(e)){r.next=5;break}return n.msgrt.send("dp.na",{message:"rule"}),r.abrupt("return",a());case 5:s={id:n.topDomain||n.parentDomain,au:e||"unknown",ty:"video",aid:n.gameData.gameId,pgu:n.parentURL},(o=new oS(n.gameData).checkCustomParams())&&(s.cp=o),d=encodeURIComponent(u.Base64.encode(JSON.stringify(s))),yo("gd-adflow isLastAdapter",null==t?void 0:t.adapterIndex,null==t?void 0:t.isLastAdapter),c=null===(i=n.gameData.promo)||void 0===i?void 0:i.rainbow,yo("gd-adflow promo_enabled",!1,null==c?void 0:c.enabled,null==t?void 0:t.isLastAdapter),fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(d)).then(function(e){return S.default(this,l),e.json()}.bind(this)).then(function(e){if(S.default(this,l),!e||!e.p)return n.msgrt.send("dp.na",{message:"atom"}),a();var t=e.p/100;n.msgrt.send("dp.fp",{message:t}),a({id:Date.now(),floor_price:t,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(d,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(d),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(d),promo_url:void 0,promo_imp_blue_url:void 0,promo_imp_green_url:void 0})}.bind(this)).catch(function(e){S.default(this,l),n.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),a()}.bind(this)),r.next=20;break;case 16:r.prev=16,r.t0=r.catch(0),n.msgrt.send("dp.err",{message:(null===r.t0||void 0===r.t0?void 0:r.t0.message)||r.t0}),a();case 20:case"end":return r.stop()}}),r,this,[[0,16]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"_extend_dp_with_adsense",value:function(e,t){if(e&&t)try{var n,r=new P.default(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var a=H.default.parse(r.query.cust_params);if(!a.tnl_asset_id)return;a.adsense=1,r.query.cust_params=H.default.stringify(a,!1),e.fallback_url=r.toString(),e.fallback_imp_url="https://tag.atom.gamedistribution.com/v1/rainbow/green"}catch(e){}}},{key:"_extend_hl_url",value:function(e){e.dp;var t=e.hl;e.src;var n=e.tnl_keys,r=!0!==(null==t?void 0:t.bidFloorApplied)?0:1;0===r&&null!=n&&n.hasOwnProperty("fp")?r=2:1!==r||null!=n&&n.hasOwnProperty("fp")||(r=3),n.bfa=r;try{var a,i=new P.default(e.url,!0);if(null===(a=i.query)||void 0===a||!a.cust_params)return;var s=H.default.parse(i.query.cust_params);s.bfa=r,s.adsense=0,i.query.cust_params=H.default.stringify(s,!1),e.url=i.toString(),t.vastUrl=e.url}catch(e){}finally{this.msgrt.send("bfa",{message:r})}}},{key:"_init_hl_script",value:(h=D.default(T.default.mark((function e(t){var n,r,i,s,o,d,u,c,l,h,f,p,m=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=this._getPrebidScripts(),o=s[0],d=function(){return S.default(this,m),!1}.bind(this),window.idhb=window.idhb||{iabCmpExists:d},window.idhb.options=window.idhb.options||{},Object.assign(window.idhb.options,{assetId:this.gameData.gameId,configUrl:this.topDomain||this.parentDomain,parentUrl:this.parentURL,pageType:"gd"}),"undefined"===window.idhb.options.configUrl&&(window.idhb.options.configUrl=null),window.idhb.que=window.idhb.que||[],(u=new URL(o)).searchParams.append("referer",window.idhb.options.configUrl),o=u.href,e.next=13,a.getScript(o,"gdsdk_prebid",{alternates:s,error_prefix:"Blocked:",exists:function(){return S.default(this,m),window.idhb.requestAds}.bind(this)});case 13:return e.next=15,this.checkOpphbPath();case 15:c=a.getQueryString("ch",window.location.href),l=a.getQueryString("ch_date",window.location.href),h={tnl_content_category:this.category.toLowerCase()},c&&(h.channel=c),l&&(h.ch_date=l),(f=a.getQueryString("hl_label",this.parentURL)||a.getQueryString("hl_label",window.location.href))&&(h.label=f),window.idhb.setAdserverTargeting(h),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),null!=(p=window.idhb.getConfig())&&null!==(n=p.hbw)&&void 0!==n&&null!==(r=n.slots)&&void 0!==r&&null!==(i=r.gd__banner)&&void 0!==i&&i.sizes&&(p.hbw.slots.gd__banner.sizes=[[120,600],[160,600],[250,250],[300,50],[300,100],[300,250],[300,600],[320,50],[320,480],[336,280],[728,90]],window.idhb.setConfig(p)),window.idhb.addEventListener("slotRenderEnded",function(e){var t=this;S.default(this,m);try{var n,r,a=e.slotId.split("@");a=1===a.length?a[0]:a[1],e.isEmpty?(null!==(n=this.atom_display)&&void 0!==n&&n.error_url&&(fetch(this.atom_display.error_url).catch(function(e){S.default(this,t)}.bind(this)),delete this.atom_display),yo("display_test DISPLAYAD_ERR",e),this._broadcast("DISPLAYAD_ERROR",{message:a,status:"warning"})):(null!==(r=this.atom_display)&&void 0!==r&&r.impression_url&&(fetch(this.atom_display.impression_url).catch(function(e){S.default(this,t)}.bind(this)),delete this.atom_display),yo("display_test DISPLAYAD_IMPRESSION"),this._broadcast("DISPLAYAD_IMPRESSION",{message:a,status:"success"}))}catch(e){}}.bind(this));case 27:case"end":return e.stop()}}),e,this)}))),function(e){return h.apply(this,arguments)})},{key:"checkOpphbPath",value:(l=D.default(T.default.mark((function e(){var t,n,r,a,i,s;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=this.topDomain||this.parentDomain||"",a=(null===(t=this.gameData)||void 0===t?void 0:t.gameId)||"",i=(null===(n=this.options)||void 0===n?void 0:n.width)||640,e.next=6,fetch("https://pub.headerlift.com/opphb?page_url=".concat(r,"&page_type=gd&page_width=").concat(i,"&aid=").concat(a));case 6:s=e.sent,_o("opphb load success",s),e.next=13;break;case 10:throw e.prev=10,e.t0=e.catch(0),new Error("Blocked: https://pub.headerlift.com/opphb");case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return l.apply(this,arguments)})},{key:"_init_ima_script",value:(c=D.default(T.default.mark((function e(t){var n,r,i=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=["https://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","https://imasdk.googleapis.com/js/sdkloader/ima3.js","http://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","http://imasdk.googleapis.com/js/sdkloader/ima3.js"],r=this.options.debug?n[0]:n[1],e.next=4,a.getScript(r,"gdsdk_ima",{alternates:n,error_prefix:"Blocked:",exists:function(){return S.default(this,i),window.google&&window.google.ima}.bind(this)});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"_init_afg_script",value:(d=D.default(T.default.mark((function e(t){var n,r,i,s,o,d,u=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.gameData.afg_disabled){e.next=3;break}return e.abrupt("return");case 3:return(d={}).crossorigin="anonymous",d["data-ad-client"]=(null==t||null===(n=t.adsense_client)||void 0===n?void 0:n.length)>0?t.adsense_client:"ca-pub-2316275586951220",d["data-ad-frequency-hint"]="30s",d.allow="autoplay",(null==t||null===(r=t.adsense_channel)||void 0===r?void 0:r.length)>0&&(d["data-ad-channel"]=t.adsense_channel),(null==t||null===(i=t.adsense_host)||void 0===i?void 0:i.length)>0&&(d["data-ad-host"]=t.adsense_host),!0===(null==t?void 0:t.adsense_adbreak_test)&&(d["data-adbreak-test"]="on"),null!==(s=this.gameData.sdk.afg)&&void 0!==s&&s.enabled&&null!==(o=this.gameData.sdk.afg)&&void 0!==o&&o.use_own&&(d["data-ad-client"]=this.gameData.sdk.afg.adsense_client,d["data-ad-slot"]=this.gameData.sdk.afg.adsense_ad_slot,d["data-ad-format"]="auto"),e.next=16,a.getScript("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return S.default(this,u),!!window.adsbygoogle}.bind(this),attrs:d});case 16:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 18:case"end":return e.stop()}}),e,this)}))),function(e){return d.apply(this,arguments)})},{key:"fixOutOfBounds",value:function(){try{if(!(this.gameData.afgszf&&this.gameData.afgszf.enabled))return;for(var e=this.gameData.afgszf,t=e.height,n=e.scrolls,r=t||"120vh",a=n||!0,i=document.getElementsByClassName("adsbygoogle"),s=0;s<i.length;s++){var o,d=i[s],u=d&&(null===(o=d.children[0])||void 0===o?void 0:o.children[0]);u&&"IFRAME"===u.tagName&&u.style.height!==r&&(yo("out-of-bounds fix apply"),u.style.height=r,a&&(u.parentElement.style.overflow="auto"))}}catch(e){yo("out-of-bounds error: ".concat(e.message))}}},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(o=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u,c=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(S.default(this,c),ko.fictionalAdSenseError||t.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense rewarded error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.rw.requested"),n=!1,r=function(){S.default(this,c),n=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){S.default(this,c),n=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),i=function(){S.default(this,c),n=!0,this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),s=function(){S.default(this,c),n=!0,this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),o=function(e){S.default(this,c),n=!0,e()}.bind(this),d=function(e){S.default(this,c),n=!0,this.resetForNext();var t="rewarded";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error",skipForward:!0}),"dismissed"!==e.breakStatus&&this._send_atom_event("sg.dbg.rw",e))}.bind(this),u=function(e){window.adsbygoogle.push(e)},setTimeout(function(){S.default(this,c),n||(_o("gd-adflow adsense.reward timeout happened!"),this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"timeout",status:"error",skipForward:!0}),this._send_atom_event("sg.dbg.rw",{breakStatus:"timeout"}))}.bind(this),1e3),u({type:"reward",name:"reward-in-game",beforeAd:r,afterAd:a,adDismissed:i,adViewed:s,beforeReward:o,adBreakDone:d}),e.next=26;break;case 22:throw e.prev=22,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 26:case"end":return e.stop()}}),e,this,[[1,22]])}))),function(e){return o.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(s=D.default(T.default.mark((function e(t){var n,r,a=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(S.default(this,a),ko.fictionalAdSenseError||t.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense preroll error",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),this.adPlacementEventReceived=!1,n=function(){S.default(this,a),this.adPlacementEventReceived=!0}.bind(this),r=function(e){S.default(this,a),this.adPlacementEventReceived=!0,this.resetForNext();var t="preroll";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"}),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"preroll"}),i={type:"preroll",beforeAd:n,adBreakDone:r},window.adsbygoogle.push(i),e.next=22;break;case 18:throw e.prev=18,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 22:case"end":return e.stop()}var i}),e,this,[[1,18]])}))),function(e){return s.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(i=D.default(T.default.mark((function e(t){var n,r,a,i=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(S.default(this,i),ko.fictionalAdSenseError||t.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense preroll error 2",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),n=function(){S.default(this,i),this.adPlacementEventReceived=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){S.default(this,i),this.adPlacementEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),this.adPlacementEventReceived=!1,a=function(e){S.default(this,i),this.adPlacementEventReceived=!0,this.resetForNext();var t="preroll";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"preroll"}),s={type:"start",name:"start-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(s),e.next=23;break;case 19:throw e.prev=19,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 23:case"end":return e.stop()}var s}),e,this,[[1,19]])}))),function(e){return i.apply(this,arguments)})},{key:"_startTimeoutForAdBreak",value:function(e){var t,n,r,a,i,s,o=this;if(null===(t=this.gameData)||void 0===t||null===(n=t.ad_blcks)||void 0===n||null===(r=n.adsenseTimeout)||void 0===r?void 0:r.enabled){null==e||e.adType,null===(a=this.gameData)||void 0===a||null===(i=a.ad_blcks)||void 0===i||null===(s=i.adsenseTimeout)||void 0===s||s.timeout;var d=setTimeout(function(){S.default(this,o),this.adPlacementEventReceived||(this._broadcast("AD_ERROR",{message:"timeout-_startTimeoutForAdBreak",status:"error"}),this.adPlacementEventReceived=!1,this.requestRunning=!1),clearTimeout(d)}.bind(this),5e3)}}},{key:"_startTimeoutForOpus",value:function(){var e=this,t=setTimeout(function(){S.default(this,e),this.opusEventReceived||(this._broadcast("AD_ERROR",{message:"opus-sdk-timeout",status:"error",reason:"forced-sdk-timeout"}),this.opusEventReceived=!1,this.requestRunning=!1),clearTimeout(t)}.bind(this),8e3)}},{key:"_startAdsensePlacementNext",value:(r=D.default(T.default.mark((function e(t){var n,r,a,i=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(S.default(this,i),ko.fictionalAdSenseError||t.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense midroll error",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.mr.requested"),n=function(){S.default(this,i),this.adPlacementEventReceived=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){S.default(this,i),this.adPlacementEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),this.adPlacementEventReceived=!1,a=function(e){S.default(this,i),this.adPlacementEventReceived=!0,this.resetForNext();var t="midroll";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.mr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.mr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"midroll"}),s={type:"next",name:"next-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(s),e.next=23;break;case 19:throw e.prev=19,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 23:case"end":return e.stop()}var s}),e,this,[[1,19]])}))),function(e){return r.apply(this,arguments)})},{key:"_send",value:function(e,t){try{var n=this.msgrt,r=n._layout,a=n._ua,i={tp:e,ct:0,vrs:this.PackageJSON.version,url:this.parentURL,rfr:document.referrer,tdmn:this.topDomain||this.parentDomain,dpth:0,args:t,ua:{brnm:a.browser.name,brvs:a.browser.version,osnm:a.os.name,osvs:a.os.version,dvmd:a.device.model,w:r.w,h:r.h}};return fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(u.Base64.encode(JSON.stringify(i)))))}catch(e){}}},{key:"_send_atom_event",value:function(e,t){var n={gid:this.gameData.slug,md5:this.gameData.gameId,pid:0,pnm:this.gameData.pname,ctry:this.gameData.ctry,lcl:"en",hle:1,ads:1,args:t,href:window.location.href},r=(new I_).get();return n=vR(vR({},n),r),n=t?vR(vR({},n),t):n,this._send(e,n)}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;var t="preroll";return this.adCounter[t]=this.adCounter[t]||0,0===this.adCounter[t]}},{key:"attachAfgPosition",value:function(e){var t=e.params.position;switch(t){case"preroll":case"start":case"pause":case"next":case"browse":case"reward":return}var n=e.adType;if(n===a.AdType.Rewarded)t="reward";else if(n===a.AdType.Interstitial){var r,i;if(this._isAfgPositionStart(e))t=null===(r=this.gameData.pAds)||void 0===r||!r.enabled||null!==(i=this.gameData.loader)&&void 0!==i&&i.enabled?"start":"next";else this._isAfgPositionNext(e)&&(t="next")}t||(t="preroll"),e.params.position=t}},{key:"_broadcast",value:function(e,t){var n=this,r=!1;["AD_ERROR"].some(function(t){return S.default(this,n),t===e}.bind(this))&&(r=!this.adContext.isLastAdapter||this.adContext.extraPromoRunOnFail);var a=this.getCurrentAdPosition(this.adContext.adType);this.eventBus.broadcast(e,vR(vR({},t),{},{skipForward:r,adPosition:a}))}},{key:"_findAdPosition",value:function(){var e;return this.getCurrentAdPosition(null===(e=this.adContext)||void 0===e?void 0:e.adType)}},{key:"mute",value:(n=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.adContext&&(this.adContext.muteRequested=!0),this.adsManager&&this.adsManager.setVolume(0);case 2:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"terminate",value:(t=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.cancel();case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),yR=I.default((function e(t){var n=this;C.default(this,e),O.default(this,"load",D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$g(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),O.default(this,"promo",D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.module){e.next=3;break}return e.next=3,n.load();case 3:return e.abrupt("return",n.module[n.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var r=t.package||"gd-sdk-stone-dynamic",a=t.package_version||"1.1.1",i=t.template||"puzzle",s=t.dependencies||[];this.moduleName="GDPromoByOrbit",this.moduleDefault=i.charAt(0).toUpperCase()+i.slice(1),this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},Xg(this.moduleName,this.moduleConfig)})),_R=I.default((function e(t){var n=this;C.default(this,e),O.default(this,"load",D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$g(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),O.default(this,"splash",D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.module){e.next=3;break}return e.next=3,n.load();case 3:return e.abrupt("return",n.module[n.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var r=t.package||"gd-sdk-air-dynamic",a=t.package_version||"1.2.0",i=t.template||"pluto",s=t.dependencies||[];this.moduleName=t.module_name||"GDSplashDynamic",this.moduleDefault=t.module_instance||i.charAt(0).toUpperCase()+i.slice(1),this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},Xg(this.moduleName,this.moduleConfig)})),wR=function(e,t){console.log(e,t)},kR={},xR={},ER=null;function DR(){for(var e,t=window,n=null,r=null;!e;){try{if("function"==typeof t.__tcfapi||"function"==typeof t.__cmp){"function"==typeof t.__tcfapi?(r=2,n=t.__tcfapi):(r=1,n=t.__cmp),e=t;break}}catch(e){}try{if(t.frames.__tcfapiLocator){r=2,e=t;break}}catch(e){}try{if(t.frames.__cmpLocator){r=1,e=t;break}}catch(e){}if(t===window.top)break;t=t.parent}return kR.version=r,kR.frame=e,kR.function=n,kR.version}function SR(e){var t=this;return ER||(ER=new Promise(function(n){function r(t,r){if(wR("Received a response from CMP",t),r){var a,i;if(!1!==t.gdprApplies)return"tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus?(("boolean"!=typeof(i=(a=t)&&"boolean"==typeof a.gdprApplies?a.gdprApplies:e.defaultGdprScope)||!0===i&&"string"!=typeof a.tcString)&&n({result:"cmpUnexpectedResponse",cmp:kR,consentData:a}),void n({result:"ok",consentData:t})):void 0;n({result:"ok",consentData:t})}else n({result:"cmpCallFailed"})}S.default(this,t),DR(),kR.frame?2===kR.version?(wR("TCF v2 CMP found. Fetching the consent."),kR.function?(wR("CMP API is directly accessible, calling it now..."),kR.function("addEventListener",kR.version,r)):(wR("CMP API is outside the current iframe, calling it now..."),function(e,t,n){var r=this,a="__tcfapi";function i(e){var t="".concat(a,"Return"),n="string"==typeof e.data&&e.data.indexOf(t)>=0?JSON.parse(e.data):e.data;if(n[t]&&n[t].callId){var r=n[t];void 0!==xR[r.callId]&&xR[r.callId](r.returnValue,r.success)}}window[a]=function(e,n,i,s){S.default(this,r);var o=Math.random()+"",d="".concat(a,"Call"),u=O.default({},d,{command:e,parameter:s,callId:o,version:n});xR[o]=i,t.postMessage(u,"*")}.bind(this),window.addEventListener("message",i,!1),window[a](e,kR.version,n)}("addEventListener",kR.frame,r))):n({result:"cmpVersionNotV2",cmp:kR}):n({result:"cmpNotFound"})}.bind(this)),ER)}var RR=new(function(){function e(){C.default(this,e),this.productName="Game Distribution"}var t;return I.default(e,[{key:"checkIfExcluded",value:function(e){try{var t,n;return!(null===(t=e.diagnostic)||void 0===t||null===(n=t.gameDock)||void 0===n||!n.excluded)}catch(e){return console.log("Error on checkIfExclude check",e),!1}}},{key:"track",value:(t=D.default(T.default.mark((function e(t,n){var r,a,i,s,o,d,u;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.checkIfExcluded(n)){e.next=3;break}return e.abrupt("return");case 3:if(i=null==t||null===(r=t.visitor)||void 0===r||null===(a=r.visitorData)||void 0===a?void 0:a.visitorId){e.next=6;break}return e.abrupt("return");case 6:return s=encodeURIComponent(this.productName),o=encodeURIComponent(i),e.prev=8,d="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),e.next=12,fetch(d,{method:"POST"});case 12:e.sent,e.next=28;break;case 15:return e.prev=15,e.t0=e.catch(8),console.log("GAME_DOCK. fail v4",e.t0),e.prev=18,u="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),e.next=22,fetch(u,{method:"POST"});case 22:e.sent,e.next=28;break;case 25:e.prev=25,e.t1=e.catch(18),console.log("GAME_DOCK. fail v6",e.t1);case 28:case"end":return e.stop()}}),e,this,[[8,15],[18,25]])}))),function(e,n){return t.apply(this,arguments)})}]),e}());function TR(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return IR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IR(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function IR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var CR=function(e){var t=this,n=e.src,r=e.attributes,a=e.target,i=e.isAsync;return new Promise(function(e,s){var o=this;S.default(this,t);try{var d=document.createElement("script");if(d.async=null==i||i,d.type="text/javascript",d.onload=function(){S.default(this,o),e()}.bind(this),d.onerror=function(){S.default(this,o);var e="Error on script load, Error: ".concat(n);console.log(e),s(e)}.bind(this),d.src=n,r){var u,c=TR(r);try{for(c.s();!(u=c.n()).done;){var l=u.value,h=l.key,f=l.value;d.setAttribute(h,f)}}catch(e){c.e(e)}finally{c.f()}}a||(a=document.head),a.appendChild(d)}catch(e){var p="Error on script load catch, Error: ".concat(n);console.log(p,e),s(p)}}.bind(this))},OR="ffd4774b-99ae-4464-8f40-3afa12b4692e",PR=function(){var e=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,CR({src:"https://cdn.cookielaw.org/consent/tcf.stub.js",attributes:[{key:"id",value:"gd-cookie-pro-tcf-stub"},{key:"charset",value:"UTF-8"}],isAsync:!1});case 3:return e.next=5,CR({src:"https://cdn.cookielaw.org/consent/".concat(OR,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,CR({src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",attributes:[{key:"id",value:"gd-cookie-pro-stub"},{key:"charset",value:"UTF-8"},{key:"data-domain-script",value:OR}],isAsync:!1});case 7:n=void 0,r=void 0,a=void 0,n=(t={inlineScript:"function OptanonWrapper() { }"}).inlineScript,r=t.target,(a=document.createElement("script")).text=n,r||(r=document.head),r.appendChild(a),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("GD: CMP error on load",e.t0);case 13:case"end":return e.stop()}var t,n,r,a}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),LR=new m.EventEmitter,BR={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},UR=!1,MR="CONTENT_PAUSE_REQUESTED",FR="CONTENT_RESUME_REQUESTED",jR="SDK_GAME_START",GR=function(e){if("gd-sdk-on-event"===(null==e?void 0:e.type)){var t,n,r,a;if(!("midroll"===(null==e||null===(t=e.event)||void 0===t?void 0:t.adPosition)))return;var i=(null===(n=e.event)||void 0===n?void 0:n.name)===FR||(null===(r=e.event)||void 0===r?void 0:r.name)===jR;if((null===(a=e.event)||void 0===a?void 0:a.name)===MR&&(UR=!0),i&&UR){UR=!1;window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*")}}};function NR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}window.addEventListener("message",(function(e){var t=this,n=e.data,r=e.origin,a=n.type;if(Object.keys(BR).some(function(e){return S.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)){var i=!n.type||!n.type.startsWith("gd-sdk")&&!("parent-data-response"===n.type)||"sg-game-event"===n.type;GR(n);var s=function(){S.default(this,t);try{var n,r;return null==e||null===(n=e.source)||void 0===n||null===(r=n.location)||void 0===r?void 0:r.href}catch(e){}}.bind(this);if(window.parent&&i){if("https://html5.gamedistribution.com"===r){var o=s();if(!o)return;var d=o&&["9555f04e1900482aaaef710cd2f8c440"].some(function(e){return S.default(this,t),o.indexOf(e)>0}.bind(this)),u=["sg-game-event"].some(function(e){return S.default(this,t),e===(null==n?void 0:n.type)}.bind(this));if(!d&&!u)return}var c=n.eventName,l=n.data;window.mpHelper&&("levelStart"!==c&&"levelFinish"!==c||window.mpHelper.sendStat("level",l.level),"levelFinish"===c&&window.mpHelper.sendStat("score",l.score)),window.parent.postMessage(n,"*")}if(a){var h=BR[r][a];h&&LR.emit(h,n)}}}),!1),function(){for(var e=new a.EventBus,t=0,n=[MR,FR,jR];t<n.length;t++){var r=n[t];e.subscribe(r,(function(e){GR({type:"gd-sdk-on-event",event:e})}))}}();var qR="__msgr",HR=k.v4(),VR=function(e){try{var t=zR(e,e.event),n=YR(window);n&&n!==window.top&&n.postMessage(t,"https://html5.gamedistribution.com")}catch(e){console.error("Error sending event message:",e)}},QR=function(e,t){var n=document.createElement("iframe");return n.src=e,n.style.display="none",n.name=t,n},zR=function(e,t){var n;return{gameId:e.gameId||e.game.gameId,target:(null===(n=e.evnts)||void 0===n?void 0:n.domain)||e.game.evnts.domain,type:"gd-system",token:HR,event_name:t,timestamp:Date.now()}},WR=function(e){var t=this;setInterval(function(){S.default(this,t);var n=zR(e,"Heartbeat");JR(n)}.bind(this),1e3*e.evnts.heartbeatDuration)},KR=function(e){try{var t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NR(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!t.event_name)return;t.token=HR,JR(t)}catch(e){console.error("GD Messager Error:",e.message)}},YR=function e(t){try{var n,r,a=null==t?void 0:t.parent;return"game"===(null==a||null===(n=a.document)||void 0===n||null===(r=n.activeElement)||void 0===r?void 0:r.id)?a:e(a)}catch(e){return t}},JR=function(e){try{window[qR]&&window[qR].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},XR=function(){function e(t){C.default(this,e),this.adContainer=document.getElementById("gdsdk__advertisement"),this.adContainerInner=document.getElementById("gdsdk__advertisement_slot"),this._adRequest=t.adRequest,this._gameData=t._gameData,this._msgrt=t._msgrt,this._adInstance=t._adInstance,this._eventBus=t._eventBus,this.blockedAdsMap=t._blockedAdsMap,this._parentURL=t._parentURL,this._parentDomain=t._parentDomain,this._onResumeGame=t._onResumeGame.bind(t),this._onPauseGame=t._onPauseGame.bind(t),this._onRewardedWatchComplete=t._onRewardedWatchComplete.bind(t),this._onAdError=t._onAdError.bind(t),this._promoShowSuccess=!1}var t,n,r;return I.default(e,[{key:"run",value:function(e){var t=e.duration,n=this;return new Promise(function(){var e=D.default(T.default.mark((function e(r,a){var i,s=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.add();case 3:i=n.show(),setTimeout(function(){S.default(this,s);try{n.hide(),r({success:i})}catch(e){a(e)}}.bind(this),1e3*t),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),a(e.t0);case 10:case"end":return e.stop()}}),e,this,[[0,7]])})));return function(t,n){return e.apply(this,arguments)}}())}},{key:"show",value:function(){return this.promo_data.game?(this.adContainer.style.visibility="visible",this.promo.style.display="block",this._onPauseGame("Pause the game for the promo","success"),this._promoShowSuccess=!0):this._onAdError("Promo not found"),this._promoShowSuccess}},{key:"hide",value:function(){var e;(this.promo.remove(),this.adContainer.style.visibility="hidden",this._promoShowSuccess)&&("reward"===(null===(e=this._adRequest.params)||void 0===e?void 0:e.position)&&this._onRewardedWatchComplete());this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success")}},{key:"add",value:(r=D.default(T.default.mark((function e(){var t,n,r,a=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.fetch_promo();case 3:this.promo_data=e.sent,t=document.createElement("div"),this.promo=t,n=this.promo_data,this.promo.addEventListener("click",function(){var e=D.default(T.default.mark((function e(t){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),console.log(n),a.track_click(n.click_tracking),window.open(n.click_through,"_blank");case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(r=document.createElement("iframe")).src=this.promo_data.renderer_url,r.setAttribute("frameborder",0),this.addStyles(),this.promo.classList.add("gd__promo"),r.classList.add("gd__promo__iframe"),this.promo.appendChild(r),this.adContainer.appendChild(this.promo),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),console.log(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(){return r.apply(this,arguments)})},{key:"addStyles",value:function(){var e="\n .gd__promo{\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: transparent;\n z-index: 1;\n cursor: pointer;\n }\n .gd__promo__iframe{\n position: relative;\n z-index: -1;\n width:".concat(this.adContainerInner.style.width,";\n height:").concat(this.adContainerInner.style.height,";\n }\n "),t=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__promo__style",t,e)}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}},{key:"fetch_promo",value:(n=D.default(T.default.mark((function e(){var t,n=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://tag.atom.gamedistribution.com/v1/rainbow/pick?id=".concat(this._parentDomain,"&aid=").concat(this._gameData.gameId)).then(function(e){return S.default(this,n),e.json()}.bind(this));case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"track_click",value:(t=D.default(T.default.mark((function e(t){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),e}();function ZR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZR(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var eT,tT,nT=function(){var e=D.default(T.default.mark((function e(){var t;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.3.1/socket.io.js",t=["https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.3.1/socket.io.js"],e.next=4,a.getScript(t[0],"soecket.io.js",{alternates:t});case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),rT=[],aT=0,iT=!1,sT=function(){var e=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u,c=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.args,r=t.onError,e.prev=1,!window.isForwarderFrame){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,tk();case 7:if(!(a=e.sent)){e.next=18;break}return e.next=11,a.isLoader();case 11:if(!(i=e.sent)&&(i||a.hasRouter())){e.next=16;break}a.register({method:"sendSocketEvent",handler:function(e){S.default(this,c),uT(e.topic,e.args)}.bind(this)}),e.next=18;break;case 16:return a.registerProxy({alias:"sendSocketEvent",method:"sendSocketEvent"}),e.abrupt("return");case 18:if(s=new P.default(window.location.href),!((o=!["html5.gamedistribution.com","revision.gamedistribution.com"].some(function(e){return S.default(this,c),e.toLowerCase()===s.host.toLowerCase()}.bind(this)))&&a&&a.hasRouter())){e.next=24;break}return e.abrupt("return");case 24:return o&&a&&a.hasRouter(),e.next=27,nT();case 27:eT=k.v4(),d={json:JSON.stringify(n)},u=["wss://ws.gamedistribution.com"],n.isHwp&&u.push("wss://ws-acc-hwp.gamedistribution.com"),rT=u.map(function(e){var t=this;S.default(this,c);var r=io(e,{query:d,upgrade:!1,transports:["websocket"],reconnectionDelay:6e4,autoConnect:!1});return r.on("connect",function(){S.default(this,t)}.bind(this)),r.on("after-connect",function(){var e=D.default(T.default.mark((function e(t){var a,i,s,o,d,u,c;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return tT=tT||(null==t?void 0:t.serverDate),a=n.gameId,i=n.failed,e.next=4,fw({gameId:a,serverDate:tT});case 4:s=e.sent,o=s.visit,d=s.mode,u=s.errors,n.visit=$R($R({},o),{},{stm:d,errors:u}),i&&(n.gameId=a?"failed:wrong":"failed:empty"),c={json:JSON.stringify(n)},r.emit("client-info",{clientId:eT,counter:aT++,serverDate:tT,query:c}),iT=!0;case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),r.on("disconnect",function(){S.default(this,t)}.bind(this)),r.connect(),r}.bind(this)),e.next=37;break;case 34:e.prev=34,e.t0=e.catch(1),r&&r(e.t0);case 37:case"end":return e.stop()}}),e,this,[[1,34]])})));return function(t){return e.apply(this,arguments)}}(),oT=!1,dT=[];function uT(e,t){return cT.apply(this,arguments)}function cT(){return cT=D.default(T.default.mark((function e(t,n){var r,a,i,s=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,tk();case 2:if(!(r=e.sent)){e.next=11;break}return e.next=6,r.isLoader();case 6:if(e.sent||!r.hasRouter()){e.next=11;break}return e.next=10,r.sendSocketEvent({topic:t,args:n});case 10:return e.abrupt("return");case 11:if("play"!==t){e.next=15;break}if(!oT){e.next=14;break}return e.abrupt("return");case 14:oT=!0;case 15:a=function(e,t){var n=this;S.default(this,s);try{var r={json:JSON.stringify(t||{})};rT.forEach(function(t){S.default(this,n),t.emit("socket-event",{topic:e,clientId:eT,counter:aT,serverDate:tT,query:r})}.bind(this))}catch(e){wo("game-session: Error on sending socket-event",e.message)}}.bind(this),i=function(){S.default(this,s),a(t,n)}.bind(this),dT.push(i);case 19:case"end":return e.stop()}}),e,this)}))),cT.apply(this,arguments)}function lT(e){var t=this,n={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},r=Object.keys(n).find(function(r){var a=this;return S.default(this,t),n[r].some(function(t){return S.default(this,a),t===e.params.position}.bind(this))}.bind(this));return r||"midroll"}function hT(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return fT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fT(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function fT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}setInterval((function(){if(0!==dT.length&&rT.length>0&&iT){for(var e=function(){var e=this,r=n[t];r(),dT=dT.filter(function(t){return S.default(this,e),t!==r}.bind(this))},t=0,n=N.default(dT);t<n.length;t++)e();yo("game-session: commands length",dT.length)}}),100);var mT=3,vT=1,gT=5,AT={lastImpressionDate:null,lastInterstitialImpressionDate:null,firstInterstitialImpressionDate:null,imps:0};var bT=new function(){var e={};return{count:function(t){e[t]=e[t]||0,e[t]++},get:function(t){return e[t]=e[t]||0,e[t]},getAll:function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pT(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e)}}};function yT(){return _T.apply(this,arguments)}function _T(){return(_T=D.default(T.default.mark((function e(){var t,n,r,a,i,s,o,d,u,c,l;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},e.next=3,Pw();case 3:if(r=e.sent,a=r.compensation||{enabled:!1},i=null==r||null===(t=r.adTimer)||void 0===t?void 0:t.enabled,n.ruleEnabled=(null==a?void 0:a.enabled)&&i,!(void 0===(null==a?void 0:a.exctg)||(null==a?void 0:a.exctg))){e.next=29;break}s=["co-op","multiplayer","IAPs"],o=(null==r?void 0:r.tags)||[],d=!1,u=hT(o),e.prev=13,l=T.default.mark((function e(){var t,n=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=c.value,s.some(function(e){return S.default(this,n),e===t.title}.bind(this))&&(d=!0);case 2:case"end":return e.stop()}}),e,this)})),u.s();case 16:if((c=u.n()).done){e.next=20;break}return e.delegateYield(l(),"t0",18);case 18:e.next=16;break;case 20:e.next=25;break;case 22:e.prev=22,e.t1=e.catch(13),u.e(e.t1);case 25:return e.prev=25,u.f(),e.finish(25);case 28:n.disabledByTag=d;case 29:return n.isLowScoreGame=wT(r),n.enabled=n.ruleEnabled&&!n.disabledByTag&&n.isLowScoreGame,r.hasActiveCompensations=n.enabled,e.abrupt("return",n);case 33:case"end":return e.stop()}}),e,null,[[13,22,25,28]])})))).apply(this,arguments)}function wT(e){var t=!1,n=e.compensation||{enabled:!1},r=null==e?void 0:e.adsc;if(1===(null==r?void 0:r.s)&&null!=r&&r.t){var a=null==r?void 0:r.t,i=(null==n?void 0:n.esc)||vT,s=(null==n?void 0:n.ascl)||gT,o=a||{},d=o.adsc,u=o.reqsc,c=o.pdur,l=o.rspdur;o.aspdur,t=(l||u/(c/mT))<=i&&d<s}return t}var kT=!1;function xT(){return ET.apply(this,arguments)}function ET(){return(ET=D.default(T.default.mark((function e(){var t;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!kT){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,yT();case 4:(t=e.sent).enabled,t.override,t.giftEnabled,t.midrollPlusEnabled,kT=!0;case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function DT(e){var t=e.rateType,n=e.gameData,r=!1;if(n.hasActiveCompensations){var a=n.compensation,i="gift"===t?null==a?void 0:a.gftr:null==a?void 0:a.mpr;i=void 0===i?1:i,r=Math.random()<=i}else r=!0;return r}function ST(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return RT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return RT(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function RT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var TT=!1,IT=3,CT=5,OT=1,PT=60,LT=10;function BT(){return UT.apply(this,arguments)}function UT(){return(UT=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return AT.imps++,AT.lastImpressionDate=new Date,AT.lastInterstitialImpressionDate=new Date,AT.firstInterstitialImpressionDate||(AT.firstInterstitialImpressionDate=AT.lastInterstitialImpressionDate),e.abrupt("return",!0);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function MT(e){return FT.apply(this,arguments)}function FT(){return FT=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h,f,p,m,v,g,A,b,y,_,w,k,x,E,R,I,C,O,P,L,B,U,M,F,j,G,N,q,H,V,Q,z,W,K,Y,J,X,Z,$,ee,te,ne,re,ae,ie,se,oe,de,ue,ce,le,he,fe,pe,me,ve,ge=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(w=t.gameData,k=t.executeCompensation,x=function(){var e=D.default(T.default.mark((function e(t){var n,r,a;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=(null==t?void 0:t.whenAvailable)||!1,!k){e.next=8;break}return e.next=5,k({whenAvailable:n});case 5:e.t0=e.sent,e.next=11;break;case 8:return e.next=10,BT();case 10:e.t0=e.sent;case 11:return r=e.t0,a=r.args,e.abrupt("return",null==a?void 0:a.success);case 16:return e.prev=16,e.t1=e.catch(0),e.next=20,BT();case 20:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t){return e.apply(this,arguments)}}(),E=!TT,!TT){e.next=5;break}return e.abrupt("return");case 5:if(TT=!0,R=w.adsc){e.next=10;break}return e.abrupt("return");case 10:if(I=R.s,C=R.t,1===I){e.next=13;break}return e.abrupt("return");case 13:if(O=w.compensation||{enabled:!1},P=null==O?void 0:O.enabled,L=null==w||null===(n=w.adTimer)||void 0===n?void 0:n.enabled,B=null==w||null===(r=w.adTimer)||void 0===r?void 0:r.tl,(U=(null==w||null===(a=w.pAds)||void 0===a||null===(i=a.vmap)||void 0===i?void 0:i.enabled)&&(null==w||null===(s=w.pAds)||void 0===s||null===(o=s.vmap)||void 0===o||null===(d=o.adtr)||void 0===d?void 0:d.disabled)||!1)&&yo("[compensation] disabled by preroll vmap",{pAds:null==w?void 0:w.pAds}),P&&L&&!U){e.next=23;break}return e.abrupt("return");case 23:if(!((M=null!=w&&null!==(u=w.pAds)&&void 0!==u&&null!==(c=u.vmap)&&void 0!==c&&c.enabled&&null!=w&&null!==(l=w.pAds)&&void 0!==l&&null!==(h=l.vmap)&&void 0!==h&&null!==(f=h.adtr)&&void 0!==f&&f.delay?null==w||null===(p=w.pAds)||void 0===p||null===(m=p.vmap)||void 0===m||null===(v=m.adtr)||void 0===v?void 0:v.delay:0)>0)){e.next=30;break}return e.next=29,new Promise(function(e){var t=this;S.default(this,ge),setTimeout(function(){S.default(this,t),e()}.bind(this),1e3*M)}.bind(this));case 29:case 30:if(!(void 0===(null==O?void 0:O.exctg)||(null==O?void 0:O.exctg))){e.next=54;break}F=["co-op","multiplayer","IAPs"],j=(null==w?void 0:w.tags)||[],G=!1,N=ST(j),e.prev=36,H=T.default.mark((function e(){var t,n=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=q.value,F.some(function(e){return S.default(this,n),e===t.title}.bind(this))&&(G=!0);case 2:case"end":return e.stop()}}),e,this)})),N.s();case 39:if((q=N.n()).done){e.next=43;break}return e.delegateYield(H(),"t0",41);case 41:e.next=39;break;case 43:e.next=48;break;case 45:e.prev=45,e.t1=e.catch(36),N.e(e.t1);case 48:return e.prev=48,N.f(),e.finish(48);case 51:if(!G){e.next=54;break}return e.abrupt("return");case 54:if(V=(null==w||null===(g=w.adTimer)||void 0===g?void 0:g.resetOnRewarded)||!1,Q=(null==w||null===(A=w.adTimer)||void 0===A?void 0:A.delayAfterRewarded)||0,z=(null==O?void 0:O.esc)||OT,W=void 0===(null==O?void 0:O.depgft)||(null==O?void 0:O.depgft),K=null!=O&&O.depgftr?null==O?void 0:O.depgftr:1,Y=(null==O?void 0:O.onst)||!1,J=(null==O?void 0:O.sl)||3,X=B||(null==O?void 0:O.tl)||180,Z=(null==w||null===(b=w.gft)||void 0===b?void 0:b.midroll.enabled)||!1,$=(null==w||null===(y=w.midroll_plus)||void 0===y?void 0:y.enabled)||!1,(!Z||!$)&&(X/=K),ee=void 0===(null==O?void 0:O.tc)||(null==O?void 0:O.tc),te=(null==O?void 0:O.ascl)||CT,!W){e.next=76;break}if(ae=(null==w||null===(ne=w.gft)||void 0===ne?void 0:ne.midroll.enabled)||!1,ie=(null==w||null===(re=w.midroll_plus)||void 0===re?void 0:re.enabled)||!1,ae&&ie){e.next=76;break}return e.abrupt("return");case 76:if(oe=(se=C||{}).adsc,de=se.reqsc,ue=se.pdur,ce=se.rspdur,se.aspdur,(ce||de/(ue/IT))<=z&&oe<te){e.next=83;break}return e.abrupt("return");case 83:if(le=Math.ceil(ue/IT),!Y||!E){e.next=90;break}return e.next=90,x({whenAvailable:!0});case 90:return he=0,fe=1,pe=function(){S.default(this,ge),he=0,fe=1}.bind(this),null===(_=w.sdkfw)||void 0===_||_.enabled,e.next=96,tk();case 96:if(me=e.sent,e.t2=me,!e.t2){e.next=102;break}return e.next=101,me.isLoader();case 101:e.t2=e.sent;case 102:e.t2,ve=setInterval(D.default(T.default.mark((function e(){var t,n,r,a,i,s,o=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(ee&&AT.imps>=le)){e.next=4;break}return clearInterval(ve),e.abrupt("return");case 4:if(t=new Date,n=V?AT.lastImpressionDate:AT.lastInterstitialImpressionDate,r=n?jT(n,t):X+1,!((a=X-r)>0)){e.next=21;break}if(!(a<=PT-LT)){e.next=18;break}return e.next=16,new Promise(function(e){var t=this;S.default(this,o),setTimeout(function(){S.default(this,t),e()}.bind(this),1e3*a)}.bind(this));case 16:e.next=21;break;case 18:return pe(),e.abrupt("return");case 21:if(++he%fe==0){e.next=25;break}return e.abrupt("return");case 25:if(V){e.next=35;break}if(i=AT.lastImpressionDate?jT(AT.lastImpressionDate,new Date):X+1,!((s=Q-i)>0)){e.next=32;break}return e.next=32,new Promise(function(e){var t=this;S.default(this,o),setTimeout(function(){S.default(this,t),e()}.bind(this),1e3*s)}.bind(this));case 32:e.next=36;break;case 35:case 36:return e.next=38,x({});case 38:e.sent?pe():(he=0,fe=fe+1>J?J:fe+1);case 40:case"end":return e.stop()}}),e,this)}))),1e3*PT);case 105:case"end":return e.stop()}}),e,this,[[36,45,48,51]])}))),FT.apply(this,arguments)}function jT(e,t){var n=e.getTime();return(t.getTime()-n)/1e3}function GT(e){return NT.apply(this,arguments)}function NT(){return(NT=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.gameId,a=t.adTypeFound,i=t.ad_skip_rule,s=bT.get(a),(o=null==i?void 0:i[a])&&o.enabled){e.next=7;break}return e.abrupt("return",!1);case 7:if((d=(null==o?void 0:o.skip_sessions)||0)&&0!==d){e.next=11;break}return e.abrupt("return",!1);case 11:if((u=(null==o?void 0:o.skips)||0)&&0!==u){e.next=15;break}return e.abrupt("return",!1);case 15:return e.next=17,lw({gameId:r});case 17:if((c=e.sent)&&!((null===(n=c.errors)||void 0===n?void 0:n.length)>0)){e.next=21;break}return e.abrupt("return",!1);case 21:return c.fv,c.lv,l=c.vc,h=l<=d&&("preroll"===a||s<=u),e.abrupt("return",h);case 25:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function HT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qT(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function VT(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return QT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QT(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function QT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var zT,WT=function(){function e(t){var n=this;C.default(this,e),this._gameData=t._gameData,this._msgrt=t.msgrt,this._adInstance=t.adInstance,this._eventBus=t.eventBus,this.blockedAdsMap=t.blockedAdsMap,this._parentURL=t._parentURL,this._parentDomain=t._parentDomain,this._onResumeGame=t.onResumeGame.bind(t),this._onPauseGame=t.onPauseGame.bind(t),this._onRewardedWatchComplete=t.onRewardedWatchComplete.bind(t),this._onAdError=t.onAdError.bind(t),this._setAdRequestTimer=t._setAdRequestTimer.bind(t),this._giveGift=t._giveGift.bind(t),this._executeMidrollPlus=t._executeMidrollPlus.bind(t),this.executeCompensation=t.executeCompensation.bind(t),this._runAutoResume=t._runAutoResume.bind(t),this.send_atom_event=t.send_atom_event.bind(t),this.get_session_id=t.get_session_id.bind(t),this.get_ad_system_init_result=t.get_ad_system_init_result.bind(t),this.eventBus=new a.EventBus,this.isOpusReady=function(){return S.default(this,n),t.isOpusReady}.bind(this),this._adCounterLabel=t.adInstance.adCounterLabel,this._adInfoLabel=t.adInstance.adInfoLabel,this._muteRequested=!1,this._terminateRequested=!1,this._adSession=null,this._registerForEvents(),document.addEventListener("visibilitychange",function(){S.default(this,n),"visible"===document.visibilityState?this._sendTabChange("tab-visible"):this._sendTabChange("tab-invisible")}.bind(this))}var t,n,r;return I.default(e,[{key:"_registerForEvents",value:function(){var e=this;this.eventBus.subscribe("HL_CONFIG_ERROR",function(t){S.default(this,e),this.hasHLConfigError=!0}.bind(this))}},{key:"getTimeDiff",value:function(e,t){var n=e.getTime();return(t.getTime()-n)/1e3}},{key:"skipMidrollOnLongVMAP",value:(r=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h,f,p,m,v,g,A,b,y,_;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("midroll"===t){e.next=2;break}return e.abrupt("return",!1);case 2:if((null===(n=this._gameData)||void 0===n||null===(r=n.pAds)||void 0===r?void 0:r.vmap.enabled)&&(null===(a=this._gameData)||void 0===a||null===(i=a.pAds)||void 0===i||null===(s=i.vmap)||void 0===s?void 0:s.adtr)){e.next=5;break}return e.abrupt("return",!1);case 5:if(null!==(o=this._gameData)&&void 0!==o&&null!==(d=o.visit)&&void 0!==d&&d.vc&&0!==(null===(u=this._gameData)||void 0===u||null===(c=u.visit)||void 0===c?void 0:c.vc)){e.next=7;break}return e.abrupt("return",!1);case 7:if(b=(null===(l=this._gameData)||void 0===l||null===(h=l.pAds)||void 0===h||null===(f=h.vmap)||void 0===f||null===(p=f.adtr)||void 0===p?void 0:p.skipDuration)||(null===(m=this._gameData)||void 0===m||null===(v=m.pAds)||void 0===v||null===(g=v.vmap)||void 0===g||null===(A=g.adtr)||void 0===A?void 0:A.delay)||360,AT.firstInterstitialImpressionDate){e.next=10;break}return e.abrupt("return",!1);case 10:return y=this.getTimeDiff(AT.firstInterstitialImpressionDate,new Date),(_=y<b)&&_o("gd-adflow skipped by long vmap",{elapsed:y}),e.abrupt("return",_);case 15:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"runAdFlow",value:(n=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h,f,p,m,v,g,A,b,y,_,w,k,x,E,D,R,I,C,P,L,B,U,M,F,j,G,N,q,H,V,Q,z,W,K,Y,J,X,Z,$,ee,te,ne,re,ae,ie,se,oe,de,ue,ce,le,he,fe,pe,me,ve,ge,Ae,be=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._adInstance.adCounter,null===(n=t.params)||void 0===n||!n.isCompensation||!this._gameData.compensation.clbl){e.next=7;break}return this._adCounterLabel.show(),l=function(e){var t=this;return S.default(this,be),new Promise(function(n){return S.default(this,t),setTimeout(n,e)}.bind(this))}.bind(this),e.next=7,l(1e3*this._gameData.compensation.ctl);case 7:return e.next=9,tk();case 9:return!(h=e.sent)||h.isLoader(),this.adRequest=t,f=lT(t),t.params.adTypeFound=f,yo("gd-adflow, adTypeFound",f,t.params.position),bT.count(f),yo("gd-adflow, counters",{counters:bT.getAll()}),p=this._gameData,m=p.gameId,v=p.ad_skip,e.next=21,GT({gameId:m,ad_skip_rule:v,adTypeFound:f});case 21:if(!e.sent){e.next=28;break}return this._adInstance.adCounter[f]=this._adInstance.adCounter[f]||0,this._adInstance.adCounter[f]++,this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),MT({gameData:this._gameData,executeCompensation:this.executeCompensation}),e.abrupt("return");case 28:return e.next=30,this.skipMidrollOnLongVMAP(f);case 30:if(!e.sent){e.next=34;break}return this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),e.abrupt("return");case 34:(g=this._getAdFlow(f)).find(function(e){return S.default(this,be),"opus"===e}.bind(this))&&!this.isOpusReady()&&(g=g.filter(function(e){return S.default(this,be),"opus"!==e}.bind(this)),this._msgrt.send("opus.sdk",{message:"Not ready"})),A=this._gameData,b=A.afg_disabled,y=null===(r=t.params)||void 0===r?void 0:r.isGift,_=null===(a=t.params)||void 0===a?void 0:a.isMidrollPlus,w=null===(i=t.params)||void 0===i?void 0:i.isCompensation,null===(s=t.params)||void 0===s||s.position,k=null===(o=A.promo)||void 0===o?void 0:o.rainbow,x=(null==k?void 0:k.enabled)&&(null===(d=k.position)||void 0===d?void 0:d[f]),E=null==k?void 0:k.gift,D=x&&null!=k&&k.duration?null==k?void 0:k.duration:5,R=b?g.filter(function(e){return S.default(this,be),"adsense"!==e}.bind(this)):g,I=this.get_ad_system_init_result(),C=I.afg,P=I.ima,L=null==A||null===(u=A.ad_blcks)||void 0===u||null===(c=u.removeOtherAdaptors)||void 0===c?void 0:c.enabled,this.anyAdBlocking=!C||!P,this.bothAdBlocking=!C&&!P,this.adsBlocked=L&&this.anyAdBlocking||this.bothAdBlocking,this.adsBlocked?(_o("gd-adflow adsBlocked so changing the flow"),R=[]):(C||(R=R.filter(function(e){return S.default(this,be),"adsense"!==e}.bind(this))),P||(R=R.filter(function(e){return S.default(this,be),"ima"!==e}.bind(this)))),B=!1,U=!1,M=[],F=0,j=!1,N=!1,q={reqs:0,imps:0},H={},V=!1,Q=!1,z=VT(R),e.prev=68,z.s();case 70:if((W=z.n()).done){e.next=124;break}if(K=W.value,!this._terminateRequested){e.next=74;break}return e.abrupt("break",124);case 74:if(t.params.adapter=K,Y=F===R.length-1,J=y&&E||!y,X=Y&&x&&J,t.params=HT(HT({},t.params),{},{adapterIndex:F,isLastAdapter:Y,shouldFail:!1,extraPromoRunOnFail:X,muteRequested:this._muteRequested}),!this._muteRequested||"adsense"!==K){e.next=81;break}return e.abrupt("continue",122);case 81:return function(){S.default(this,be),ko.firstSuccessOrder&&!isNaN(ko.firstSuccessOrder)&&(t.params.shouldFail=F<ko.firstSuccessOrder)}.bind(this),_o("gd-adflow, before adInvoke",F,K,t.params.shouldFail),e.next=85,this.adInvoke(t);case 85:if(Z=e.sent,$=Z.success,ee=Z.args,te=Z.isSkipped,ne=Z.noVast,re=Z.t4r,ae=Z.adContext,ie=Z.isCanceled,(se=(null==ae?void 0:ae.isVMAP)||!1)&&q.reqs++,se&&($||ie)&&q.imps++,oe=null==ee?void 0:ee.reason,de=null==ee?void 0:ee.message,ue=null==ee?void 0:ee.errorType,H[K]=H[K]||{req:0,imp:0,fail:0},H[K].req++,$?H[K].imp++:(H[K].fail++,H[K].failReason=oe,H[K].failMessage=de,H[K].failType=ue),!$){e.next=111;break}return _o("gd-adflow, adapter-result-success",F,K,ee),B=!0,N=se,U=!(null==ee||!ee.isPromoSuccess),G=re,e.abrupt("break",124);case 111:if(_o("gd-adflow, adapter-result-failure",F,K,ee.message),"opus"===K&&"[FC] No ad available"===(null==ee?void 0:ee.message)&&(t.params.opusSuccess=!0,V=!0),ie&&!Q&&(Q=!0),F++,M.push(ee.message),!te){e.next=118;break}return e.abrupt("break",124);case 118:if(!ne){e.next=121;break}return this._runAutoResume(),e.abrupt("break",124);case 121:j=X;case 122:e.next=70;break;case 124:e.next=129;break;case 126:e.prev=126,e.t0=e.catch(68),z.e(e.t0);case 129:return e.prev=129,z.f(),e.finish(129);case 132:if(this._adInfoLabel&&this._adInfoLabel.hide(),!j){e.next=139;break}return e.next=136,new XR(this).run({duration:D});case 136:e.sent.success&&(U=!0);case 139:return function(){var e;S.default(this,be),ko.disableGift&&null!==(e=A.gft)&&void 0!==e&&e[f].enabled&&(A.gft[f].enabled=!1)}.bind(this),ce=M.join(" /n"),B||V?(AT.imps++,AT.lastImpressionDate=new Date,"rewarded"!==f&&(AT.lastInterstitialImpressionDate=new Date,AT.firstInterstitialImpressionDate||(AT.firstInterstitialImpressionDate=AT.lastInterstitialImpressionDate)),this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(f),"midroll"===f&&this._executeMidrollPlus()):(this._onResumeGame(ce,"warning"),this._giveGift(f),"midroll"===f&&this._executeMidrollPlus()),MT({gameData:A,executeCompensation:this.executeCompensation}),le="-1",he="none",B?(le="index_".concat(F),he=R[F]):U?(le="promo",he="promo"):V&&(le="opus",he="opus"),fe=this.get_session_id(),this.anyAdBlocking&&"-1"===le?(pe="rewarded"===f?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[pe]=this.blockedAdsMap[pe]?this.blockedAdsMap[pe]+1:1,yo("gd-adflow, blocked-ad",JSON.stringify(this.blockedAdsMap)),this._msgrt.send("adflow.blocked.pos",{message:"".concat(pe)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!C,imaBlocked:!P,isGift:y,isMidrollPlus:_,adType:pe,sessionId:fe,successAdapter:"none",adFlowIndex:le,adapterResults:H,ctry:A.ctry})):(me={},O.default(me,"adflow.all.index",{message:"".concat(le)}),O.default(me,"adflow.all.success_adapter",{message:"".concat(he)}),O.default(me,"adflow.".concat(f,".index"),{message:"".concat(le)}),O.default(me,"adflow.".concat(f,".success_adapter"),{message:"".concat(he)}),ve=me,Object.keys(ve).forEach(function(e){S.default(this,be);var t=ve[e];this._msgrt.send(e,t)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:le,successAdapter:he,adBlocker:!1,afgBlocked:!C,imaBlocked:!P,isGift:y,isMidrollPlus:_,isCompensation:w,adType:f,sessionId:fe,t4r:G,adapterResults:H,ctry:A.ctry})),ge={adType:f,imp:"-1"!==le&&"promo"!==le||V,promo:"promo"===le,opus:V,blocked:this.anyAdBlocking&&"-1"===le,hasHLConfigError:this.hasHLConfigError,isGift:y,isMidrollPlus:_,isCompensation:w,isVMAP:!V&&N,isAppliedVMAP:!V&&N&&(null==A?void 0:A.vmapByTagsApplied),VMAPs:q},this._adSession=ge,uT("ad-session",{adSession:ge}),V&&Q&&uT("ad-session",{adSession:HT(HT({},ge),{},{opus:!1,cancel:!0,isVMAP:N,isAppliedVMAP:N&&(null==A?void 0:A.vmapByTagsApplied)})}),Ae={adType:f},this.eventBus.broadcast("AD_FLOW_COMPLETE",Ae),e.abrupt("return",HT(HT({},Ae),{},{args:{success:B,isGift:y,isMidrollPlus:_}}));case 159:case"end":return e.stop()}}),e,this,[[68,126,129,132]])}))),function(e){return n.apply(this,arguments)})},{key:"adInvoke",value:(t=D.default(T.default.mark((function e(t){var n=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=D.default(T.default.mark((function e(r,a){var i,s,o,d,u=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i="main.showad.".concat(t.params.adapter,".").concat(t.params.adapterIndex),yo("adInvoke.start",{scopeName:i,adRequest:JSON.stringify(t)}),s={},o=function(e){S.default(this,u);var a=n._adInstance.adContext;yo("adInvoke.failure",{args:e,adRequest:JSON.stringify(t),adContext:a}),n._eventBus.unsubscribeScope(i);var s="dismissed"===(null==e?void 0:e.message),o="AD_SDK_CANCELED"===(null==e?void 0:e.name);r({success:!1,args:e,isSkipped:s,isCanceled:o,noVast:e.noVast,adContext:a})}.bind(this),d=function(e){S.default(this,u);var a=n._adInstance.adContext;yo("adInvoke.success",{args:e,adRequest:JSON.stringify(t),adContext:a}),n._eventBus.unsubscribeScope(i),r({success:!0,args:e,t4r:s,adContext:a})}.bind(this),n._eventBus.subscribe("AD_ERROR",o,i),n._eventBus.subscribe("AD_SDK_CANCELED",o,i),n._eventBus.subscribe("AD_SUCCESS",d,i),n._eventBus.subscribe("AD_T4R",function(){S.default(this,u),s.loaded=!0}.bind(this),i),n._eventBus.subscribe("AD_T4R_CLICK",function(){S.default(this,u),s.t4rClick=!0}.bind(this),i),n._eventBus.subscribe("AD_T4R_VIDEO",function(){S.default(this,u),s.t4rVideo=!0}.bind(this),i),n._eventBus.subscribe("AD_CLICK",function(){S.default(this,u),s.click=!0}.bind(this),i),n._eventBus.subscribe("AD_BIDDER",function(e){S.default(this,u),s.bidder=null==e?void 0:e.bidder}.bind(this),i),n._eventBus.subscribe("AD_T4R_NONE",function(e){S.default(this,u),s.fail_reason=null==e?void 0:e.reason}.bind(this),i),e.prev=14,e.next=17,n._adInstance.startAd(t);case 17:e.next=23;break;case 19:e.prev=19,e.t0=e.catch(14),wo("gd-adflow startAd error",e.t0),r({success:!1,err:e.t0});case 23:case"end":return e.stop()}}),e,this,[[14,19]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"_getAdFlow",value:function(e){var t,n,r,a,i,s,o,d,u=this,c=void function(){if(S.default(this,u),ko.customAdFlow)return JSON.parse(ko.customAdFlow)}.bind(this),l=this._gameData.adflw;c&&(l=c);var h=null!==(t=l)&&void 0!==t&&null!==(n=t.adapters)&&void 0!==n&&n.default?null===(r=l)||void 0===r||null===(a=r.adapters)||void 0===a?void 0:a.default:["ima","adsense"];return h=null!==(i=l)&&void 0!==i&&null!==(s=i.adapters)&&void 0!==s&&s[e]?null===(o=l)||void 0===o||null===(d=o.adapters)||void 0===d?void 0:d[e]:h}},{key:"_sendTabChange",value:function(e){var t=this;if("tab-invisible"===e&&this._adSession){var n=this._adSession;n.tabState=e,this.eventBus.subscribe("STARTED",function(){S.default(this,t),"hidden"===document.visibilityState&&(n.tabState=n.tabState+"-STARTED",uT("ad-session-tab",{adSession:n}))}.bind(this)),this.eventBus.subscribe("IMPRESSION",function(){S.default(this,t),"hidden"===document.visibilityState&&(n.tabState=n.tabState+"-IMPRESSION",uT("ad-session-tab",{adSession:n}))}.bind(this))}}},{key:"mute",value:function(){var e=this;this._muteRequested=!0,this._adInstance.mute().catch(function(t){S.default(this,e)}.bind(this))}},{key:"terminate",value:function(){var e=this;this._terminateRequested=!0,this._adInstance.terminate().catch(function(t){S.default(this,e)}.bind(this)),this._setAdRequestTimer()}}]),e}(),KT=new m.EventEmitter,YT=["https://games.softgames.com","https://sg.gamedistribution.com","https://minigame-stg.aeriagames.jp","https://minigame.aeriagames.jp","https://html5.gamedistribution.com","http://localhost:3005","https://yjgames.gamedistribution.com","https://portal-staging-sgweb.gamedistribution.com/"];window.addEventListener("message",(function(e){var t=this,n=e.data,r=e.origin,a=e.source;if(YT.some(function(e){return S.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)){var i=n.system;n.action;var s="aeriaExternalHostsConnector"===i;if("Softgames"===i)zT=a,(window.parent||window).postMessage(n,"*"),KT.emit("aeria-event",n);else if(s){zT&&zT.postMessage(n,"*");var o=window.parent||window;o&&o.postMessage(n,"*")}}}),!1);var JT="https://html5.gamedistribution.com",XT="parent-data-request",ZT="parent-data-response",$T=function(){function e(){C.default(this,e)}var t;return I.default(e,[{key:"init",value:function(e){var t=this;this._registerForDataRequests(e),this._askForParentFrameData().then(function(n){if(S.default(this,t),n){var r=n.adRequestTimer;e.adRequestTimer=r,yo("gd-frame-data-bridge, adRequestTimer on init ",e.adRequestTimer)}}.bind(this))}},{key:"_registerForDataRequests",value:function(e){var t=this;window.addEventListener("message",function(n){S.default(this,t);var r=n.data,a=n.origin,i=n.source,s=r.type;if(r.value,a===JT&&s===XT){var o={adRequestTimer:e.adRequestTimer};i.postMessage({type:ZT,value:o})}}.bind(this))}},{key:"_askForParentFrameData",value:(t=D.default(T.default.mark((function e(){var t=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;S.default(this,t);var a=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin;t.source;var i=n.type,s=n.value;r===JT&&i===ZT&&(e(s),a=!0)})),setTimeout(function(){S.default(this,r),a||e()}.bind(this),1e3);var i={type:XT};window.parent.postMessage(i,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),eI=new $T,tI={SDKExistsOnUpperFrame:!1};function nI(){return rI.apply(this,arguments)}function rI(){return(rI=D.default(T.default.mark((function e(){var t,n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=["https://pm.azerioncircle.com/p/gd-blck-rmv/"],e.next=4,a.getScript(t[0],"blckrmv",{alternates:t});case 4:return n=window.GD_BLCK_RMV||{},console.log("new blocker",n),e.abrupt("return",n.AdBlockerPage);case 9:e.prev=9,e.t0=e.catch(0),console.log("new blcoker error => ",e.t0.message);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}function aI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aI(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var sI=function(){_o("gtag: GA not initialized",arguments)};function oI(e){return dI.apply(this,arguments)}function dI(){return dI=D.default(T.default.mark((function e(t){var n,r,i,s,o,d,u,c,l,h,f,p,m=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.onError,r=t.args,s="gdSDKDataLayer",o="https://www.googletagmanager.com/gtag/js?id=".concat(i="G-PLRTBHGSEL","&l=").concat(s),d=[o],e.prev=5,e.next=8,a.getScript(d[0],"gdsdk_google_analytics",{alternates:d,error_prefix:"Blocked:",exists:function(){return S.default(this,m),window[s]}.bind(this)});case 8:return window[s]=window[s]||[],sI=function(){window[s].push(arguments)},sI("js",new Date),e.next=14,Q.default();case 14:return u=e.sent,c=u.lookupIabConsent,l=u.getGoogleAdType,e.next=19,c();case 19:h=e.sent,f=l(h.consentData),p=iI(iI({},p=r||{}),{},{cookie_flags:"SameSite=None;Secure",cmp:h.result,gdpr:"ok"===h.result?"object"===R.default(h.consentData)?!0===h.consentData.gdprApplies:"N/A":h.result,google_ads:null==f?void 0:f.type}),sI("config",i,p),e.next=31;break;case 27:e.prev=27,e.t0=e.catch(5),wo("gtag: load GA error",e.t0),n&&n(e.t0);case 31:case"end":return e.stop()}}),e,this,[[5,27]])}))),dI.apply(this,arguments)}new P.default("https://securepubads.g.doubleclick.net/gampad/ads?env=vp&gdfp_req=1&output=xml_vast4&unviewed_position_start=1&correlator=3792570314314042&sz=640x480&url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&iu=%2F1015413%2FTNL_NS-18101700058%2FTNL_T-17110972893&description_url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&max_ad_duration=300000&cust_params=hb_uuid%3Dcefbef16-53a9-4f49-9d3b-13e47e1066ad%26hb_cache_id%3Dundefined%26tnl_paid%3D866%26tnl_pid%3DP-17110700559%26tnl_system%3D1%26tid%3DTNL_T-17110972893%26tnl_ad_type%3Dvideo_image%26tnl_asset_id%3Daeac8455b2024f25abfa943ec96aa749%26tnl_ad_pos%3Dpreroll%26nsid%3DTNL_NS-18101700058%26tnl_pt%3D22%26hb_cache_host%3Dprebid.adnxs.com%26hb_format%3Dvideo%26hb_size%3D0x0%26hb_pb%3D1.15%26hb_adid%3D259407b5792767%26hb_bidder%3Dimprovedigital%26hb_cache_host_improv%3Dprebid.adnxs.com%26hb_uuid_improvedigit%3Dcefbef16-53a9-4f49-9d3b-13e47e1066ad%26hb_format_improvedig%3Dvideo%26hb_size_improvedigit%3D0x0%26hb_pb_improvedigital%3D1.15%26hb_adid_improvedigit%3D259407b5792767%26hb_bidder_improvedig%3Dimprovedigital%26tnl_wog%3D0%26gdGameId%3Daeac8455b2024f25abfa943ec96aa749%26tnl_content_category%3Dpuzzle%26adaptor_order%3D0%26pbct%3D2%26tnl_test%3Da%26fp%3D0.9%26fpt%3D99%26bfa%3D1%26adsense%3D0&gdpr=1&gdpr_consent=CP6lKcgP6lKcgAcABBENApEsAP_gAEPgAAYgg1NV_H__bX9j8Xr1aft0eY1H99j7rsQxBhfJk-4FyDvW_JwXn2EyNA26pqYKmRIEuzZBIQFkHIDURUigSogVrSDMYkGMgTNIJ6BkgFMRY2dYCFxvmQlDMQIY5vp9d3d52D-9_dv83dziz8FHvzU5PmckcICdA58tDfl9bRCb-5IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHs87_XU-9_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQaoJIACgAHgAkABcADUAHAAUwAtgBmAD4AH4AYAAygBmgDkAHcAP8Ag4BHQCRAElAKiAXMAvQBfQDPgHUAPaAfYBEwCVQExAJnAUgApoBUgCuQFswLcAt0Bf4DBIGRgZIAywBmYDRgGrgNvAboA3wBywDtgHcgPFgfaB90EqASpAlhBLMEtIJbglxBLoEuwJfQTABMECYYExQJjgTJgmYCZwE0gJqATYgm2CbkE3gTfCCgEGoA8EADAFyAMEAtIQCAAAEAA0ADgAPAAyACwAI4AUAArgBbAEWAJcAX0A1ADVAHOAPIAfIBAwCDgEcAJ2AT-AoYCigF2AM4AbwA9AB8gENgIvAR6AkUBJYCVgEywJsAm0BS4CnwFhQLEAsUBdQC7gF5AMCgYeBiADFoGQgZGAyYBlwDPwGhANGAaYA1MBroDaAG3AN0AcEA6gB2ADuoHkgeUA96B8gHyhIG4ACAAFwAUABUADgAHgAQAAwgBkAGoAPAAiABMACqAG8APQAhIBDAESAI4ASwAmgBhgDLAGyAO-AewB8QD7AP0AgEBFwEYAI0AUEAqABVwC5gGKANoAbgA4gCRAE7AKHAUeApEBbAC5AF3gLzAYMAw0BkgDJwGcwNYA1kBuoDkwHLgPHDAUAAAgAGAAcABQAEUAJwAsABhADwAPYAhACIAEcAJgAVAArwBbAFyAOYA8ACGAESAIsAS4ApABWgDOAGpANkA4ABxgDnAHkAPwAgABGACTAE6AKKAUuArwCvgF2AL8AZwA2wBvADjgHNAOoAdkA9QB-wEJAIbARUAi8BHUCRAJFASXAloCXgE2AJ2AUJApECkgFigLRAXIAugBdwC9AGBAMPAYyAx6BkYGSAMnAZyAzwBoQDTAGtANdAboA6gB3AD3hAE8AAIABgAHAAUABFACcALAAYQA8AD2AIQAiABHACYAFcALcAcwB3AEMAIkARYAlwBSACtAGcANSAbIBwADjAHOAPIAfIA_ACAAEYAJNAToBOwCigFLgK8Ar4BdgC_AGcANQAbYA3gBxwDmgHZAPUAfIA_YCEgENgIvAR3AkQCRQElwJaAl4BNgCdgFCAKSgWIBYoC0QFyALoAXcAvQBgQDDwGMgMeAZIAycBnIDQgGmANaAa6A3QB1ADuAHvCgEYAIoAVABYAEIAJgAXAA8ACOAFIANQAcABHACiwFeAV8AuwBnADeAHNAOyAfsBHoCRQEvAJsAWKAtEBbAC7gF6AMPAZyAzwBoQDWoGuga8A94YAgABFACoALAAhABMAEcAKQAagA4ACOAFFgK8Ar4BdgDOAG8AOaAdkA_YCPQEvAJsAWiAtgBdwC9AGHgM5AZ4A0IBrQDXQHvAPiHAXoADAARAA4ADwALgAZABYADmAHwAfgBHACaAFAAKYAVwAtgBfADQAIQARYAjgBLgCkAFkAL4AYUAzQDOAGoAOcAdwA8gB8wEAAQOAg4CEAERAI4ATgAncBPgE_AKKAUsAqABWQC7AF6AM4AbwA44B0gD0AHyAQ2AiIBFQCPQEigJLASsAmIBMsCbAJtAUgApMBS4CqgFiALUAWzAugC6gF3AL6AYFAxADEwGLAMhAZNAy4DLwGfgNCAaNA0wDTQGpwNdA2ABtADbgHHgOWAc-A7AB3EDyQPKAekA94B8QD5QH2gPxHQRQAFwAUABUADgAIAAXQAwADUAHgARAAmABVgC4ALoAYgAzABvAD1AIYAiQBLACaAFGAMMAZQA0QBsgDvAHtAPsA_QB_wEWARgAoIBVwCxAFzALyAYoA2gBuADiAHUAReAkQBMgCdgFDgKPAU0AsUBbAC4AFyALtAXeAvMBgwDDQGPAMkAZOAyoBlgDOQGiANVAawA3UBxYDkwHLgPHAfWQAXAAIAAyACwAJoAXwA0ACkAFlALkAvgBnADUAHOARwAnABPoChgKKAUsArIBYgC0gF2AN4Ac0A7IB6AEewJsAm0BSYCxAFtALuAXkAwIBiUDPAM_AaEA1MBroDYAG3AOfAdGA7CB5IHlAPeAfEQgPAALAAoAC4AGIATAAqgBcADEAG8APQAjgB3gD_AJSAUEAq4BcwDFAG0AOoApoBYoC0QFwALkAZOAzkBogDVQHjkgF4ABgAHAAXAAyACwAHIARwAmgBUAC-AGQANoAeABCACkAFkAM6AagBqgDuAIAARyApoCoAFZALSAXYA3gB8gEVAI6AR6AkUBKwCWoE2ATaApMBVICxAF3AMWAZZAzwDPwGhANdAbAA7AB5QD3iUB0ABAACwAKAAcgBgAGIAPAAiABMACqAFwAMUAhgCJAEcAKMAbIA7wB-AFXAMUAdQBF4CRAFHgLFAWwAvMBk4DOQGsFIFwAC4AKAAqABwAEEAMAA1AB4AEQAJgAUgAqgBiADNAIYAiQBRgDKAGiANkAd8A_AD9AIsARgAoIBVwC5gF5AMUAbQA3ACLwEiAJ2AUOAsUBbAC4AFyALtAXmAw0BkgDJwGcwNYA1kBuoDkwHjlAIgAFwAMgAsAByAEcAJoAVAAvgBkADaAHgAQgAiwBHACZAFIALIAXwAwgBnQDUANUAc4A7oB8gH2AQAAjgBIgCdgFDAKXAVkBWwCxQF1AXYA14BvADtgHoAP-AjoBHoCRQElgJigTYBNoCkAFPgLEAXQAu4BeQC-gGBAMWAZMAy6BngGfgNCAaJA1IDU4GugbAA4IB0wDsAHcAPKAe8A-IB8oA.f_wACHwAAAAA&plcmt=1&vpmute=1&vpa=auto&sdkv=h.3.633.0&osd=2&frm=2&vis=1&sdr=1&hl=en&afvsz=200x200%2C250x250%2C300x250%2C336x280%2C450x50%2C468x60%2C480x70&is_amp=1&uach=WyJtYWNPUyIsIjE0LjQuMSIsImFybSIsIiIsIjEyMy4wLjYzMTIuMTIyIixudWxsLDAsbnVsbCwiNjQiLFtbIkdvb2dsZSBDaHJvbWUiLCIxMjMuMC42MzEyLjEyMiJdLFsiTm90OkEtQnJhbmQiLCI4LjAuMC4wIl0sWyJDaHJvbWl1bSIsIjEyMy4wLjYzMTIuMTIyIl1dLDBd&u_so=p&ctv=0&sdki=445&ptt=20&adk=2541783110&sdk_apis=2%2C7%2C8&omid_p=Google1%2Fh.3.633.0&sid=E657451B-8F2F-4921-A55A-21D1A6F3C39E&nel=1&eid=44777649%2C44781409%2C44785452%2C95321947%2C95322027%2C95323893%2C95324128%2C95324210%2C95326337&ref=https%3A%2F%2Fwww.gry.pl%2F&top=https%3A%2F%2Fwww.gry.pl%2F&loc=https%3A%2F%2Fhtml5.gamedistribution.com%2Faeac8455b2024f25abfa943ec96aa749%2F%3Ftimestamp%3D1713336375%26countryCode%3Dpl%26siteid%3D88%26channelid%3D1%26siteLocale%3Dpl%26locale%3Dpl%26gd_sdk_referrer_url%3Dhttps%253A%252F%252Fwww.gry.pl%252Fgra%252Fkings-and-queens-match&dlt=1713336379046&idt=2621&dt=1713336390920&scor=3473667703821297&ged=ve4_td12_tt10_pd12_la2000_er0.0.156.300_vi0.0.600.510_vp100_eb24427",!0),new P.default("https://securepubads.g.doubleclick.net/gampad/ads?env=vp&gdfp_req=1&output=xml_vast4&unviewed_position_start=1&correlator=2275053868608838&sz=640x480&url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&iu=%2F1015413%2FTNL_NS-18101700058%2FTNL_T-17110972893&description_url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&max_ad_duration=300000&vpa=auto&vpmute=0&plcmt=1&cust_params=tnl_paid%3D866%26tnl_pid%3DP-17110700559%26tnl_system%3D1%26tid%3DTNL_T-17110972893%26tnl_ad_type%3Dvideo_image%26tnl_asset_id%3Daeac8455b2024f25abfa943ec96aa749%26tnl_ad_pos%3Dpreroll%26nsid%3DTNL_NS-18101700058%26tnl_pt%3D22%26gd_opus%3D1%26fp%3D0.9%26gd_np%3D1%26bfa%3D1%26fpt%3D99%26tnl_wog%3D0&sdkv=h.3.633.0&osd=2&frm=0&vis=1&sdr=1&hl=en&afvsz=200x200%2C250x250%2C300x250%2C336x280%2C450x50%2C468x60%2C480x70&is_amp=0&uach=WyJtYWNPUyIsIjE0LjQuMSIsImFybSIsIiIsIjEyMy4wLjYzMTIuMTIyIixudWxsLDAsbnVsbCwiNjQiLFtbIkdvb2dsZSBDaHJvbWUiLCIxMjMuMC42MzEyLjEyMiJdLFsiTm90OkEtQnJhbmQiLCI4LjAuMC4wIl0sWyJDaHJvbWl1bSIsIjEyMy4wLjYzMTIuMTIyIl1dLDBd&u_so=p&ctv=0&gdpr=1&gdpr_consent=CP6lKcgP6lKcgAcABBENApEsAP_gAEPgAAYgg1NV_H__bX9j8Xr1aft0eY1H99j7rsQxBhfJk-4FyDvW_JwXn2EyNA26pqYKmRIEuzZBIQFkHIDURUigSogVrSDMYkGMgTNIJ6BkgFMRY2dYCFxvmQlDMQIY5vp9d3d52D-9_dv83dziz8FHvzU5PmckcICdA58tDfl9bRCb-5IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHs87_XU-9_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQaoJIACgAHgAkABcADUAHAAUwAtgBmAD4AH4AYAAygBmgDkAHcAP8Ag4BHQCRAElAKiAXMAvQBfQDPgHUAPaAfYBEwCVQExAJnAUgApoBUgCuQFswLcAt0Bf4DBIGRgZIAywBmYDRgGrgNvAboA3wBywDtgHcgPFgfaB90EqASpAlhBLMEtIJbglxBLoEuwJfQTABMECYYExQJjgTJgmYCZwE0gJqATYgm2CbkE3gTfCCgEGoA8EADAFyAMEAtIQCAAAEAA0ADgAPAAyACwAI4AUAArgBbAEWAJcAX0A1ADVAHOAPIAfIBAwCDgEcAJ2AT-AoYCigF2AM4AbwA9AB8gENgIvAR6AkUBJYCVgEywJsAm0BS4CnwFhQLEAsUBdQC7gF5AMCgYeBiADFoGQgZGAyYBlwDPwGhANGAaYA1MBroDaAG3AN0AcEA6gB2ADuoHkgeUA96B8gHyhIG4ACAAFwAUABUADgAHgAQAAwgBkAGoAPAAiABMACqAG8APQAhIBDAESAI4ASwAmgBhgDLAGyAO-AewB8QD7AP0AgEBFwEYAI0AUEAqABVwC5gGKANoAbgA4gCRAE7AKHAUeApEBbAC5AF3gLzAYMAw0BkgDJwGcwNYA1kBuoDkwHLgPHDAUAAAgAGAAcABQAEUAJwAsABhADwAPYAhACIAEcAJgAVAArwBbAFyAOYA8ACGAESAIsAS4ApABWgDOAGpANkA4ABxgDnAHkAPwAgABGACTAE6AKKAUuArwCvgF2AL8AZwA2wBvADjgHNAOoAdkA9QB-wEJAIbARUAi8BHUCRAJFASXAloCXgE2AJ2AUJApECkgFigLRAXIAugBdwC9AGBAMPAYyAx6BkYGSAMnAZyAzwBoQDTAGtANdAboA6gB3AD3hAE8AAIABgAHAAUABFACcALAAYQA8AD2AIQAiABHACYAFcALcAcwB3AEMAIkARYAlwBSACtAGcANSAbIBwADjAHOAPIAfIA_ACAAEYAJNAToBOwCigFLgK8Ar4BdgC_AGcANQAbYA3gBxwDmgHZAPUAfIA_YCEgENgIvAR3AkQCRQElwJaAl4BNgCdgFCAKSgWIBYoC0QFyALoAXcAvQBgQDDwGMgMeAZIAycBnIDQgGmANaAa6A3QB1ADuAHvCgEYAIoAVABYAEIAJgAXAA8ACOAFIANQAcABHACiwFeAV8AuwBnADeAHNAOyAfsBHoCRQEvAJsAWKAtEBbAC7gF6AMPAZyAzwBoQDWoGuga8A94YAgABFACoALAAhABMAEcAKQAagA4ACOAFFgK8Ar4BdgDOAG8AOaAdkA_YCPQEvAJsAWiAtgBdwC9AGHgM5AZ4A0IBrQDXQHvAPiHAXoADAARAA4ADwALgAZABYADmAHwAfgBHACaAFAAKYAVwAtgBfADQAIQARYAjgBLgCkAFkAL4AYUAzQDOAGoAOcAdwA8gB8wEAAQOAg4CEAERAI4ATgAncBPgE_AKKAUsAqABWQC7AF6AM4AbwA44B0gD0AHyAQ2AiIBFQCPQEigJLASsAmIBMsCbAJtAUgApMBS4CqgFiALUAWzAugC6gF3AL6AYFAxADEwGLAMhAZNAy4DLwGfgNCAaNA0wDTQGpwNdA2ABtADbgHHgOWAc-A7AB3EDyQPKAekA94B8QD5QH2gPxHQRQAFwAUABUADgAIAAXQAwADUAHgARAAmABVgC4ALoAYgAzABvAD1AIYAiQBLACaAFGAMMAZQA0QBsgDvAHtAPsA_QB_wEWARgAoIBVwCxAFzALyAYoA2gBuADiAHUAReAkQBMgCdgFDgKPAU0AsUBbAC4AFyALtAXeAvMBgwDDQGPAMkAZOAyoBlgDOQGiANVAawA3UBxYDkwHLgPHAfWQAXAAIAAyACwAJoAXwA0ACkAFlALkAvgBnADUAHOARwAnABPoChgKKAUsArIBYgC0gF2AN4Ac0A7IB6AEewJsAm0BSYCxAFtALuAXkAwIBiUDPAM_AaEA1MBroDYAG3AOfAdGA7CB5IHlAPeAfEQgPAALAAoAC4AGIATAAqgBcADEAG8APQAjgB3gD_AJSAUEAq4BcwDFAG0AOoApoBYoC0QFwALkAZOAzkBogDVQHjkgF4ABgAHAAXAAyACwAHIARwAmgBUAC-AGQANoAeABCACkAFkAM6AagBqgDuAIAARyApoCoAFZALSAXYA3gB8gEVAI6AR6AkUBKwCWoE2ATaApMBVICxAF3AMWAZZAzwDPwGhANdAbAA7AB5QD3iUB0ABAACwAKAAcgBgAGIAPAAiABMACqAFwAMUAhgCJAEcAKMAbIA7wB-AFXAMUAdQBF4CRAFHgLFAWwAvMBk4DOQGsFIFwAC4AKAAqABwAEEAMAA1AB4AEQAJgAUgAqgBiADNAIYAiQBRgDKAGiANkAd8A_AD9AIsARgAoIBVwC5gF5AMUAbQA3ACLwEiAJ2AUOAsUBbAC4AFyALtAXmAw0BkgDJwGcwNYA1kBuoDkwHjlAIgAFwAMgAsAByAEcAJoAVAAvgBkADaAHgAQgAiwBHACZAFIALIAXwAwgBnQDUANUAc4A7oB8gH2AQAAjgBIgCdgFDAKXAVkBWwCxQF1AXYA14BvADtgHoAP-AjoBHoCRQElgJigTYBNoCkAFPgLEAXQAu4BeQC-gGBAMWAZMAy6BngGfgNCAaJA1IDU4GugbAA4IB0wDsAHcAPKAe8A-IB8oA.f_wACHwAAAAA&sdki=445&ptt=20&adk=1748861338&sdk_apis=2%2C7%2C8&omid_p=Google1%2Fh.3.633.0&media_url=blob%3Ahttps%253a%2F%2Fwww.gry.pl%2Ffa4fae4b-f435-43b4-9cee-af65696fe59e&sid=D3F4C4E1-4002-4BEE-A1F2-2638CD3B9197&a3p=EloKDWNyd2RjbnRybC5uZXQSQGE0MmZkMWJkNGI5MjgyOTY5NzUxNDUyYzVlNmUxNmQ1MzkzODYxY2E5Y2U2MGUzNjk3Y2ZlNTExMTQxYjFhZjgYucX8se4xSAASxgEKCHJ0YmhvdXNlEqwBWVNmZ3hFVno0OXBMOFI2c3ltSWtSdUFNdFg4d2Y0clBkdVMwTlVuLzZpUnhJZWh0cnRjVUtLSjFraHJDQWZERmp1N1pDNHJEc1lxMkduKzJFTFMxRmgzWlEzTUxaK0owbXZoTDR4UFlNc2JUbmlGNkczTWRaZjZQK3hEVVkwTU1FUlpkZzlKMjArcjlQNUtQOFBmWVhMaEkwRitGMUNhYUNwQS9aRVNNMVNnPRjBxfyx7jFIAFICCGoSGQoKdWlkYXBpLmNvbRjDz9ay7jFIAFICCGQSPgoFb3BlbngSLGV5SnBJam9pZEZoNU5XbDNSakZUT0ZjNVoxTlZRbFl5YWtRemR6MDlJbjA9GJ3I_LHuMUgA&nel=1&eid=44776494%2C44777649%2C44781409%2C95321947%2C95322027%2C95323893%2C95324128%2C95324210%2C95326337&top=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&loc=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&dt=1713336184147&cookie=ID%3Da17ef48e823e6627%3AT%3D1709727355%3ART%3D1713335981%3AS%3DALNI_MY20KDMmAY5MP3sMYIZndoHFyvxhg&gpic=UID%3D00000d6b0028013d%3AT%3D1709727355%3ART%3D1713335981%3AS%3DALNI_MZ7af9EvfEMcTpwOjK9LSfd-RfFCQ&scor=3968881391553945&ged=ve4_td21_tt0_pd21_la21000_er271.162.427.462_vi0.0.873.1064_vp100_eb24171",!0);var uI,cI=function(e){var t=this,n=e.handler,r=e.timeout,a=e.interval,i=n||function(){return S.default(this,t),!0}.bind(this),s=r||1e3,o=a||10;return new Promise(function(e,r){var a=this;if(S.default(this,t),n())e(!0);else{var d=!1,u=setInterval(function(){S.default(this,a);try{i()&&(clearInterval(u),d=!0,e(!0))}catch(t){clearInterval(u),e(!1)}}.bind(this),o);setTimeout(function(){S.default(this,a),clearInterval(u),d||e(!1)}.bind(this),s)}}.bind(this))},lI=function(){var e=D.default(T.default.mark((function e(t){var n,r,a,i,s=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.topic,r=t.args,e.next=3,Pw();case 3:if(a=e.sent,i=a.console_logs,i&&i.allowed.some(function(e){return S.default(this,s),e===n}.bind(this))){e.next=8;break}return e.abrupt("return");case 8:console.log({topic:n,args:r});case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}();function hI(){return fI.apply(this,arguments)}function fI(){return fI=D.default(T.default.mark((function e(){var t,n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!uI){e.next=2;break}return e.abrupt("return",uI);case 2:return e.next=4,Q.default();case 4:return t=e.sent,n=t.lookupIabConsent,t.getGoogleAdType,e.next=9,n();case 9:return uI=e.sent,e.next=12,lI({topic:"cmp-decoded",args:{key:"[consent-check] cmp-decoded",cmp:uI}});case 12:return e.abrupt("return",uI);case 13:case"end":return e.stop()}}),e)}))),fI.apply(this,arguments)}function pI(){return mI.apply(this,arguments)}function mI(){return mI=D.default(T.default.mark((function e(){var t,n,r,a,i,s,o,d,u,c,l,h,f,p=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,hI();case 2:if(a=e.sent,(i=(null==a?void 0:a.consentData)||{}).gdprApplies){e.next=7;break}return _o("[consent-check] gdprApplies=false"),e.abrupt("return",!1);case 7:return s=(null===(t=i.purpose)||void 0===t?void 0:t.consents)||{},o=(null===(n=i.vendor)||void 0===n?void 0:n.consents)||{},d=(null===(r=i.publisher)||void 0===r?void 0:r.consents)||{},u=function(e){return S.default(this,p),0===Object.keys(e).length}.bind(this),c=u(s),l=u(o),h=u(d),_o("[consent-check]",{fullyRejected:f=c&&l&&h,emptyPurpose:c,emptyVendor:l,emptyPublisher:h}),e.abrupt("return",f);case 17:case"end":return e.stop()}}),e,this)}))),mI.apply(this,arguments)}function vI(){return gI.apply(this,arguments)}function gI(){return gI=D.default(T.default.mark((function e(){var t,n,r,a,i;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,hI();case 2:if(a=e.sent,(i=(null==a?void 0:a.consentData)||{}).gdprApplies){e.next=6;break}return e.abrupt("return",!1);case 6:return null===(t=i.purpose)||void 0===t||t.consents,null===(n=i.vendor)||void 0===n||n.consents,null===(r=i.publisher)||void 0===r||r.consents,e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)}))),gI.apply(this,arguments)}function AI(){return bI.apply(this,arguments)}function bI(){return(bI=D.default(T.default.mark((function e(){var t,n,r,a;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Pw();case 3:if(t=e.sent,null!=(n=t.disable_ads_by_cmp)&&n.enabled){e.next=8;break}return _o("[consent-check] returned by no rule",n),e.abrupt("return",!1);case 8:if(r="all-rejected"===(null==n?void 0:n.mode),e.t0=r,!e.t0){e.next=14;break}return e.next=13,pI();case 13:e.t0=e.sent;case 14:if(!e.t0){e.next=17;break}return _o("[consent-check] fully rejected"),e.abrupt("return",!0);case 17:if(a="some-rejected"===(null==n?void 0:n.mode),e.t1=a,!e.t1){e.next=23;break}return e.next=22,vI();case 22:e.t1=e.sent;case 23:if(!e.t1){e.next=26;break}return _o("[consent-check] partially rejected"),e.abrupt("return",!0);case 26:e.next=31;break;case 28:e.prev=28,e.t2=e.catch(0),wo("[consent-check] error on checkIfAdsDisabledByConsent",e.t2.message);case 31:return e.abrupt("return",!1);case 32:case"end":return e.stop()}}),e,null,[[0,28]])})))).apply(this,arguments)}function yI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yI(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var wI=k.v4(),kI=null,xI=null,EI=function(){function e(t){var n,r,a,i,s=this;if(C.default(this,e),O.default(this,"_whichFrameV2",function(){var e=this;S.default(this,s);var t=P.default(window.location.href,!0),n=t.host,r=t.query,a="html5.gamedistribution.com"!==n,i=function(t){return S.default(this,e),"revision.gamedistribution.com"===t||"uncached-html5.gamedistribution.com"===t}.bind(this),o=i(n);null!=r&&r.gd_sdk_referrer_url&&(o=i(P.default(r.gd_sdk_referrer_url).host));return this._isMasterGameURL()&&!(this._isTokenGameURL()||a)||o?"loader-frame":"game-frame"}.bind(this)),kI)return kI;kI=this,this.isOpusReady=!1,this.isMidrollPlusExecuted=!1,this.blockedAdsMap={},this.blockingDetectedKey="d8d9b9b63e704668a29559970c1818be",this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,t),this._version=t.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new I_,this._location.print();var o=this._location.get(),d=(null==o||null===(n=o.top)||void 0===n||null===(r=n.domain)||void 0===r?void 0:r.value)||(null==o||null===(a=o.partner.domain)||void 0===a?void 0:a.value),u=null==o||null===(i=o.partner.url)||void 0===i?void 0:i.value;this._parentURL=0===this._bridge.depth?encodeURIComponent(this._bridge.parentURL):this._bridge.parentURL,this._parentURL=this._parentURL||u,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._topDomain=this._topDomain||d,yo("locs found:",this._topDomain,this._parentURL),this._isFullScreen=!1,this._giftCount={preroll:0,midroll:0,rewarded:0},this._mplus_count=0,Kw({whichFrame:this._whichFrameV2(),options:{showAd:this.showAd.bind(this),onEvent:this._onEvent.bind(this)}}),this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){S.default(this,s),this._sdk_ready=!0}.bind(this)).catch(function(e){S.default(this,s),this._sdk_ready=!1}.bind(this)).finally(function(){var e,t,n,r,a=this;if((S.default(this,s),null===(e=this._gameData)||void 0===e||null===(t=e.directTokenUse)||void 0===t?void 0:t.enabled)&&this._blockDirectTokenURLEmbedding().blocked)return;this.dumper=new pR({msgrt:this.msgrt,gameData:this._gameData,parentDomain:this._parentDomain,parentURL:this._parentURL,topDomain:this._parentURL}),this.dumper,this._initGameSessionTracking(),this._sendLoadedEvent(2),!0===(null===(n=this._gameData.lp)||void 0===n?void 0:n.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(r=this._gameData.evnts)&&void 0!==r&&r.enabled&&this._isLoaderGameURL()&&(!function(e){var t=this;if(!window[qR]){var n=QR("https://static.gamedistribution.com/message/index.html",qR);if(document.body.appendChild(n),window!==window.top){var r=[zR(e,"TokenGenerated"),zR(e,"PageLoaded")];n.onload=function(){var e=this;return S.default(this,t),r.forEach(function(t){return S.default(this,e),JR(t)}.bind(this))}.bind(this),WR(e)}window.addEventListener("message",function(e){return S.default(this,t),KR(e)}.bind(this),!1)}}(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){S.default(this,a),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),eI.init(this),this._send_gametag_data("sdk_init"),this.fixScore(),this._stableAdFlowForTest(),lk({onEvent:function(e){S.default(this,a);var t=e.name,n=e.data;(this._onEvent({name:t,message:"In Game Store : ".concat(t),status:"success",data:n,isStoreEvent:!0}),"STORE_UI_VISIBILITY_CHANGED"===t)&&(n.visible?this.onPauseGame("In game store opened","success"):this.onResumeGame("In game store closed","success"))}.bind(this)})}.bind(this)),this._registerSGBridge(),yo("which-frame",this._whichFrame()),this._loadLocus()}var t,n,r,i,s,o,d,c,l,h,f,p,m,v,g,A,b,y,_,w,k,x;return I.default(e,[{key:"_stableAdFlowForTest",value:function(){try{(a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&a.Ls.getBoolean("gd_tag")||cR().useTestAds)&&(this._gameData.adflw.adapters={default:["ima"],preroll:["ima"],midroll:["ima"],rewarded:["ima"]},console.log(this._gameData))}catch(e){console.log(e.message)}}},{key:"_getVisitorId",value:(x=D.default(T.default.mark((function e(){var t,n,r,a,i,s=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,cI({handler:function(){return S.default(this,s),!!xI}.bind(this),timeout:1e3,interval:10});case 2:return a=e.sent,i=a?null===(t=xI)||void 0===t||null===(n=t.visitor)||void 0===n||null===(r=n.visitorData)||void 0===r?void 0:r.visitorId:"noVisitorId",e.abrupt("return",i);case 5:case"end":return e.stop()}}),e,this)}))),function(){return x.apply(this,arguments)})},{key:"_initGameSessionTracking",value:(k=D.default(T.default.mark((function e(){var t,n,r,a,i,s,o,d,u,c,l,h,f,p,m,v,g,A,b,y,_,w,k,x,E,D,R,I,C,O,P,L=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(t=this._gameData)||void 0===t||null===(n=t.gs_trc)||void 0===n?void 0:n.enabled){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this._getVisitorId();case 5:l=e.sent,h=this._gameData,f=h.category,p=h.dname,m=h.pname,v=h.gameId,g=h.slug,A=h.title,b=h.ctry,y=h.failed,_=this._topDomain||this._parentDomain,w=new I_,k=w.get(),x=this.msgrt._ua,E=document.referrer,D=this.msgrt._layout,R=go.version,I=(null===(r=this._gameData)||void 0===r||null===(a=r.hwei)||void 0===a?void 0:a.enabled)&&(null===(i=this._gameData)||void 0===i||null===(s=i.hwei)||void 0===s?void 0:s.gs.enabled),C=(null===(o=this._gameData)||void 0===o||null===(d=o.gft)||void 0===d?void 0:d.midroll.enabled)||!1,O=(null===(u=this._gameData)||void 0===u||null===(c=u.midroll_plus)||void 0===c?void 0:c.enabled)||!1,P={args:{rfr:E,category:f,dname:p,pname:m,gameId:v,slug:g,title:A,ctry:b,domain:_,loc:k,ua:x,layout:D,version:R,visitorId:l,hasGft:C,hasMp:O,failed:y,isHwp:I},onError:function(e){S.default(this,L),this._sendSDKError(e)}.bind(this)},sT(P);case 21:case"end":return e.stop()}}),e,this)}))),function(){return k.apply(this,arguments)})},{key:"_initUnityHandler",value:function(){var e=this;window.addEventListener("DOMNodeInserted",function(){if(S.default(this,e),this._gameData.block_exts&&this._removeExternalsInHtml({enabled:!1}),document.getElementsByClassName("webgl-content")[0]){var t=document.getElementsByClassName("webgl-content")[0].getElementsByClassName("footer")[0];t&&t.setAttribute("style","display:none")}}.bind(this))}},{key:"_send_gametag_data",value:(w=D.default(T.default.mark((function e(t){var n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._getGdModeIfExist()&&(n=a.getMobilePlatform()||"web",this.adInstance._send("tg.created",{gmid:this.options.gameId,dvc:n,qint:t}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return w.apply(this,arguments)})},{key:"_loadCMP",value:(_=D.default(T.default.mark((function e(){var t,n,r,a,i,s;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=12;break}if(r=new I_,0!==(null==(a=r.get("depth"))?void 0:a.value)||null===(t=this._gameData)||void 0===t||null===(n=t.cmp)||void 0===n||!n.enabled){e.next=12;break}if(null===(i=this._gameData)||void 0===i||null===(s=i.cmp)||void 0===s||!s.checkDepthOnly){e.next=9;break}return e.next=7,PR();case 7:e.next=12;break;case 9:if("html5.gamedistribution.com"!==this._topDomain){e.next=12;break}return e.next=12,PR();case 12:case"end":return e.stop()}}),e,this)}))),function(){return _.apply(this,arguments)})},{key:"testConsent",value:function(){try{DR();D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,SR({});case 2:e.sent;case 3:case"end":return e.stop()}}),e)})))()}catch(e){console.log("find CMP error",e)}}},{key:"_sendLoaderDataEvent",value:function(){try{this.options.onLoaderEvent&&this.options.onLoaderEvent({name:"LOADER_DATA",message:{game:this._gameData,bridge:this._bridge},status:this._sdk_ready?"success":"error"})}catch(e){}}},{key:"_registerSGBridge",value:function(){var e=this;LR.on("splash-hidden",function(t){S.default(this,e),this._hideCMPButton()}.bind(this))}},{key:"_hideCMPButton",value:function(){var e=document.getElementById("ot-sdk-btn-floating");e&&(e.style.display="none")}},{key:"_sendLoadedEvent",value:function(e){if(this._isLoaded||(this._isLoaded={}),!this._isLoaded[e]){this._isLoaded[e]=!0;var t="loader-frame"===this._whichFrame()&&(this._isHostHTML5Domain()||this._isExternalHoster());P.default(location.href,!0);if(this._whichFrame(),this._isMasterGameURL(),this._isExtHostedGameURL(),this._isTokenGameURL(),this._isHostHTML5Domain(),this._isExternalHoster(),location.href,document.referrer,t)try{yo("which-frame, sending tunnel event",this._whichFrame()),this._sendTunnlEvent(e),this.msgrt.send("loaded",{message:this._hasBlocker?"Has Blocker":"No Blocker"})}catch(e){}}}},{key:"_sendGamedockGamePlay",value:function(){var e=this._isTokenGameURL();if(!(this._gameData.loader.enabled&&e||this._gameDockGamePlaySent))try{this._sendGamedockEvent("gameplay"),this._gameDockGamePlaySent=!0}catch(e){}}},{key:"_safeInit",value:function(){this._checkUserDeclinedTracking(),this._checkWhitelabelPartner();var e=this._gameData.diagnostic;void 0!==e&&void 0!==e.close_ga&&!1!==e.close_ga||this._loadGoogleAnalytics(),void 0!==e&&void 0!==e.close_gamedock&&!1!==e.close_gamedock||!this._bridge.isCoreSDKMode&&!this._bridge.noGamedockSDK&&this._loadGamedockTracker(),void 0!==e&&void 0!==e.close_minijuegos&&!1!==e.close_minijuegos||(console.log("noMinijuegosSDK",!this._bridge.isCoreSDKMode,!this._bridge.noMinijuegosSDK,document.location.search.indexOf("mp_game_id")>=0),!this._bridge.isCoreSDKMode&&!this._bridge.noMinijuegosSDK&&document.location.search.indexOf("mp_game_id")>=0&&this._loadMiniJuegosGratisTracker())}},{key:"_initializeSDKWithGameData",value:(y=D.default(T.default.mark((function e(t,n){var r,a,i,s,o,d,u=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._getGameData();case 3:return this._gameData=e.sent,e.next=6,this._loadCMP();case 6:return this._bridge.isCoreSDKMode=(null===(r=this._gameData.disableAds)||void 0===r?void 0:r.default)||!1,this._safeInit(),this._checkGameId(),this._checkGameDeleted(),this._checkBlocking(),this._changeMidrollInDebugMode(),s=void 0===this._gameData.diagnostic||void 0===(null===(a=this._gameData.diagnostic)||void 0===a?void 0:a.close_ads)||!1===(null===(i=this._gameData.diagnostic)||void 0===i?void 0:i.close_ads),e.next=15,AI();case 15:return o=e.sent,_o("[ad-system-init] allowed",{adSystemInitAllowed:d=s&&!o,notDisabledByModuleClose:s,disabledByConsent:o}),d&&(this.videoAdReady=this._initializeVideoAd().then(function(){S.default(this,u),(this._isMasterGameURL()||this._isExtHostedGameURL())&&(this.msgrt.send("adblocker.flw",{message:"ok"}),this.msgrt.send("adblocker.adapters",{message:"none"})),this._checkAdBlockerRemoval()}.bind(this)).catch(function(e){S.default(this,u);var t="".concat(e).startsWith("Error: Blocked:");_o("gd-adflow adsBlocked",t,e);var n=this.get_ad_system_init_result(),r=n.ima,a=n.afg;if(this.adsBlocked=!r&&!a,this._isMasterGameURL()||this._isExtHostedGameURL()){this.msgrt.send("adblocker.flw",{message:"".concat(this.adsBlocked?"blocked":"ok")});var i=r||a?r?a?"none":"adsense":"ima":"all";this.msgrt.send("adblocker.adapters",{message:"".concat(i)})}this._sendSDKError(e),this._checkAdBlocker(),console.error(e.message||e)}.bind(this))),e.next=21,xT();case 21:t(this._gameData),e.next=29;break;case 24:e.prev=24,e.t0=e.catch(0),this._sendSDKError(e.t0),this.onResumeGame(e.t0.message,"warning"),n(e.t0);case 29:case"end":return e.stop()}}),e,this,[[0,24]])}))),function(e,t){return y.apply(this,arguments)})},{key:"_getDefaultOptions",value:function(){return{debug:!1,testing:!1,gameId:"4f3d7d38d24b740c95da2b03dc3a2333",prefix:"gdsdk__",onEvent:function(e){},onLoaderEvent:function(e){},flashSettings:{adContainerId:"",splashContainerId:""},advertisementSettings:{},resumeGame:function(){},pauseGame:function(){},onInit:function(e){},onError:function(e){},loader:{}}}},{key:"_checkAdBlockerRemoval",value:function(){a.Ls.getBoolean(this.blockingDetectedKey)&&(a.Ls.set(this.blockingDetectedKey,!1),this.send_atom_event("ad-blocker-removed"))}},{key:"_checkAdBlocker",value:(b=D.default(T.default.mark((function e(){var t,n,r,i,s;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t=this.get_ad_system_init_result(),n=t.ima,r=t.afg,n&&r){e.next=12;break}if(a.Ls.set(this.blockingDetectedKey,!0),null===(i=this._gameData.rmblck)||void 0===i||!i.enabled){e.next=12;break}if(this.adBlockerPage){e.next=12;break}return e.next=9,nI();case 9:s=e.sent,this.adBlockerPage=new s(this._gameData),this.adBlockerPage.add();case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),console.log(e.t0.message);case 17:case"end":return e.stop()}}),e,this,[[0,14]])}))),function(){return b.apply(this,arguments)})},{key:"_extendDefaultOptions",value:function(e,t){var n=F.default(e);this.options=t?a.extendDefaults(n,t):n,this.options.gameId=this.options.gameId.trim()}},{key:"_setConsoleBanner",value:function(){if(!this._bridge.noConsoleBanner){var e=go.version,t=console.log("%c %c %c GameDistribution.com HTML5 SDK | Version: "+e+" %c %c %c","background: #9854d8","background: #6c2ca7","color: #fff; background: #450f78;","background: #6c2ca7","background: #9854d8","background: #ffffff");console.log.apply(console,t)}}},{key:"_shouldSendTunnlEvent",value:function(e){return this.tunnlEventCounts||(this.tunnlEventCounts={}),this.tunnlEventCounts[e]||(this.tunnlEventCounts[e]=0),this.tunnlEventCounts[e]++,1===this.tunnlEventCounts[e]}},{key:"_sendTunnlEvent",value:function(e){var t=this;D.default(T.default.mark((function n(){var r,a,i,s,o,d=this;return T.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,tk();case 2:if(!(r=n.sent)){n.next=9;break}return n.next=6,r.isLoader();case 6:n.t0=n.sent,n.next=10;break;case 9:n.t0=!0;case 10:if(a=n.t0,i=r.hasRouter(),a||!i){n.next=15;break}return n.abrupt("return");case 15:if(t._shouldSendTunnlEvent(e)){n.next=17;break}return n.abrupt("return");case 17:void 0!==t._topDomain&&"undefined"!==t._topDomain||(t._topDomain=void 0),s=t._topDomain||t._parentDomain,o={page_url:s,game_id:t.options.gameId,eventtype:e,ts:Date.now()},fetch("https://hlana.gamedistribution.com/event?".concat(H.default.stringify(o))).catch(function(n){S.default(this,d),t._sendHLAnalyicsLog({query:_I(_I({},o),{},{error:null==n?void 0:n.message}),eventType:-e})}.bind(this)),t._sendHLAnalyicsLog({query:o,eventType:e}),t.adInstance._send_atom_event("hl.config",o),t._send_gametag_data("sdk_gameplay");case 24:case"end":return n.stop()}}),n,this)})))()}},{key:"_sendHLAnalyicsLog",value:function(e){var t,n=e.query,r=e.eventType;if(1===r?t="hl.gameplay":2===r?t="hl.gameload":3===r?t="hl.adblock":-1===r?t="hl.gameplay.error":-2===r?t="hl.gameload.error":-3===r&&(t="hl.adblock.error"),t)try{this.dumper.send_atom_event(t,n)}catch(e){console.log("Error on sending dump!",e)}}},{key:"_sendAdRequestContext",value:function(e){this.msgrt.send("adctx",{message:e.adTag.bidder})}},{key:"_checkWhitelabelPartner",value:function(){this._whitelabelPartner=!1;var e=a.getQueryParams("xanthophyll");e.hasOwnProperty("xanthophyll")&&"true"===e.xanthophyll&&(this._whitelabelPartner=!0,a.dankLog("White label publisher","".concat(this._whitelabelPartner),"success"))}},{key:"_checkRevisionOrigin",value:function(){var e=this;return[document.location.origin].concat(N.default(document.location.ancestorOrigins)).find(function(t){return S.default(this,e),"revision.gamedistribution.com"===P.default(t,!0).hostname}.bind(this))}},{key:"_checkConsole",value:function(){try{if(!a.Ls.available)return;if("developer.gamedistribution.com"===this._parentDomain||"developer.gamedistribution.com"===this._topDomain||"developer-acc.gamedistribution.com"===this._parentDomain||"developer-acc.gamedistribution.com"===this._topDomain)this._checkRevisionOrigin()&&(a.Ls.set("gd_debug_ex",!0),a.Ls.set("gd_disable_midroll_timer",!0),a.Ls.set("gd_tag",!0));else"localhost:3000"===this._parentDomain&&(a.Ls.set("gd_debug_ex",!0),a.Ls.set("gd_disable_midroll_timer",!0));a.Ls.getBoolean("gd_debug_ex")&&(this.openConsole(),this.msgrt.send("dev.console",{message:this._parentDomain}))}catch(e){}}},{key:"_checkUserDeclinedTracking",value:function(){this._userDeclinedTracking=this._bridge.isCoreSDKMode||document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0}},{key:"_initializeMessageRouter",value:function(){this.msgrt=new a.MessageRouter({gameId:this.options.gameId,hours:(new Date).getHours(),topDomain:this._topDomain,domain:this._parentDomain,referrer:this._parentURL,depth:a.getIframeDepth(),version:go.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:a.getMobilePlatform(),byloader:this._bridge.isTokenGameURL,isTokenGameURL:this._bridge.isTokenGameURL,isMasterGameURL:this._bridge.isMasterGameURL,isExtHostedGameURL:this._bridge.isExtHostedGameURL,byloaderVersion:this._bridge.version})}},{key:"_loadGamedockTracker",value:function(){var e=this;try{var t=[this._gameData.gmky.url];a.getScript(t[0],"GamedockSDK",{alternates:t}).then(function(){var t,n,r,a;(S.default(this,e),xI=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(t=this._gameData.diagnostic)&&void 0!==t&&null!==(n=t.gameDock)&&void 0!==n&&n.adViewEvent)&&(null!==(r=this._gameData.diagnostic)&&void 0!==r&&null!==(a=r.gameDock)&&void 0!==a&&a.heartbeatEnable&&xI.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig));RR.track(xI,this._gameData)}.bind(this)).catch(function(t){S.default(this,e),this._sendSDKError(t)}.bind(this))}catch(e){}}},{key:"_initGamedockTracker",value:function(e){if(!this._bridge.isCoreSDKMode)return e.initialize("gd",this._parentDomain)}},{key:"_sendGamedockEvent",value:function(e){var t,n;null===(t=xI)||void 0===t||null===(n=t.tracking)||void 0===n||n.trackEvent(e,{pageId:this.options.gameId,pageType:"game"})}},{key:"_loadMiniJuegosGratisTracker",value:function(){var e=this;window.mpConfig={game:this.options.gameId,partner:"game-distribution"};var t=["https://ext.minijuegosgratis.com/external-host/main.js"];console.log("noMinijuegosSDK loading"),a.getScript(t[0],"MinijuegosSDK",{alternates:t}).catch(function(t){S.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_loadLocus",value:function(){var e=D.default(T.default.mark((function e(){var t,n=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Nw();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled"),e.abrupt("return");case 6:t=["https://pm.azerioncircle.com/p/locus/"],window.gdlocus=window.gdlocus||{cmd:[]},window.gdlocus.cmd.push(function(){S.default(this,n),this.isOpusReady=!0,window.gdlocus.iservice.register({method:"muteAdFlow",handler:this._muteFlowSound.bind(this)}),window.gdlocus.iservice.register({method:"terminateAdFlow",handler:this._terminateFlow.bind(this)})}.bind(this)),a.getScript(t[0],"locus",{alternates:t}).catch(function(e){S.default(this,n),this._sendSDKError(e)}.bind(this)).then(function(){S.default(this,n)}.bind(this));case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_muteFlowSound",value:(A=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._adFlow){e.next=2;break}return e.abrupt("return");case 2:this._adFlow.mute();case 3:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"_terminateFlow",value:(g=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._adFlow){e.next=2;break}return e.abrupt("return");case 2:this._adFlow.terminate();case 3:case"end":return e.stop()}}),e,this)}))),function(){return g.apply(this,arguments)})},{key:"_loadGoogleAnalytics",value:function(){var e=this;if(!this._bridge.isCoreSDKMode){var t=this._gameData,n=t.gameId,r=t.slug,a=t.title,i=new I_,s={provider:"gd-sdk",page_depth:i.get("depth.value"),partner_domain_from:i.get("partner.domain.from"),top_domain_from:i.get("top.domain.from"),top_domain:this._topDomain,parent_domain:this._parentDomain,parent_url:this._parentURL,game_id:n,game_slug:r,game_title:a};oI({onError:function(t){S.default(this,e),this._sendSDKError(t)}.bind(this),args:s})}}},{key:"_getCleanUrl",value:function(e){var t=e;try{var n=new P.default(e,!0);t="".concat(n.protocol,"//").concat(n.hostname,"/").concat(n.pathname)}catch(e){}return t}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new a.EventBus,a.SDKEvents.forEach(function(t){var n=this;return S.default(this,e),this.eventBus.subscribe(t,function(e){return S.default(this,n),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),a.IMAEvents.forEach(function(t){var n=this;return S.default(this,e),this.eventBus.subscribe(t,function(e){return S.default(this,n),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){S.default(this,e);var t=this._getDeveloperDomains(),n=t.developerDomain,r=t.gameApiDomain;if(n){fetch("https://".concat(r,"/game/v2/hasapi/").concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var a=JSON.stringify({type:"GD_SDK_IMPLEMENTED",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(a,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(a,"*")}catch(e){}}uR()}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return S.default(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(t){var n,r;S.default(this,e),this.msgrt.send("ad.impression"),sR(),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&RR.track(xI,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(t){S.default(this,e),this.msgrt.send("ad.error",{message:t.message,details:t.details})}.bind(this),"ima"),this.eventBus.subscribe("AD_SDK_REQUEST",function(t){S.default(this,e),this._sendAdRequestContext(t.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(t){if(S.default(this,e),t.message.startsWith("Blocked:")){var n=t.message.replace("Blocked:","").trim(),r=this._getCleanUrl(n),a="Blocked: ".concat(r);if(!this._bridge.noBlockerEvent&&(this.msgrt.send("error",{message:a}),!this._hasBlocker)){this._hasBlocker=!0;this.msgrt.send("adblck.src",{message:a});var i=this.get_ad_system_init_result(),s=i.ima,o=i.afg;(!s||!o)&&this._sendTunnlEvent(3)}}else this.msgrt.send("error",{message:t.message})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_EMPTY",function(t){S.default(this,e),this.msgrt.send("tunnl.keys.empty",{message:t.message,details:t.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_FALLBACK",function(t){S.default(this,e),this.msgrt.send("tunnl.keys.fallback",{message:t.message,details:t.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_T4R",function(t){return S.default(this,e),this.msgrt.send("adt4r")}.bind(this),"sdk")}},{key:"_checkGameId",value:function(){this.options.gameId===this._defaults.gameId&&this._sendSDKError("Please check if your GAME ID is correct. Otherwise, no revenue will be reported.")}},{key:"_getDefaultGameData",value:function(){return{gameId:this.options.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}},{key:"_getGameDataUrl",value:function(){var e=void 0!==this._topDomain&&"undefined"!==this._topDomain?this._topDomain:this._parentDomain,t=aw().config;return"https://".concat(t.gameAPI,"/game/v4/get/").concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(go.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(v=D.default(T.default.mark((function e(){var t,n,r;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=!0,n=this._gameData,r=this._topDomain.indexOf("gamedistribution.com")>=0,t=(t=void 0===this._gameData.dmain||this._gameData.dmain)||r,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&this._redirectToBlocking(!1,!t);case 7:case"end":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)})},{key:"_blockDirectTokenURLEmbedding",value:function(){var e,t,n=this._checkTokenGameUrl(),r=new I_,a="html5.gamedistribution.com"!==P.default(document.referrer).host,i=n&&!tI.SDKExistsOnUpperFrame&&r.get("depth.value")>0&&a;if(i&&(null===(e=this._gameData)||void 0===e||null===(t=e.directTokenUse)||void 0===t?void 0:t.enabled)){var s,o,d=null===(s=this._gameData)||void 0===s||null===(o=s.directTokenUse)||void 0===o?void 0:o.behavior;"to-loader"===d?this._redirectToLoaderFrame():"to-blocked-page"===d&&this._redirectToBlocking(!0)}return{blocked:i}}},{key:"_redirectToBlocking",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.msgrt.send("blocked");var r=this._gameData;setTimeout(D.default(T.default.mark((function a(){return T.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!e){a.next=9;break}return a.prev=1,a.next=4,t.adInstance._send_atom_event("token-blocked");case 4:a.next=9;break;case 6:a.prev=6,a.t0=a.catch(1),console.log("Could not send dump.token-blocked",a.t0);case 9:window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(H.default.stringify({domain:t._parentDomain,id:r.gameId,img:t._get_game_thumbnail_url(),title:r.title,unregistered:n,utm_source:t._parentDomain,utm_medium:(null==r?void 0:r.slug)||(null==r?void 0:r.title)||(null==r?void 0:r.gameId)||"unknown",utm_campaign:"block-and-redirect"}));case 10:case"end":return a.stop()}}),a,null,[[1,6]])}))),100)}},{key:"_redirectToLoaderFrame",value:function(){var e=this,t=this._gameData;setTimeout(D.default(T.default.mark((function n(){var r,a,i,s;return T.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.adInstance._send_atom_event("loader-redirect");case 3:n.next=8;break;case 5:n.prev=5,n.t0=n.catch(0),console.log("Could not send dump.loader-redirect",n.t0);case 8:r=P.default(location.href,!0),a=_I(_I({},r.query),{},{rd:"1"}),i=H.default.stringify(a),s="https://html5.gamedistribution.com/".concat(t.gameId,"/?").concat(i),window.location.href=s;case 13:case"end":return n.stop()}}),n,null,[[0,5]])}))),100)}},{key:"_checkGameDeleted",value:function(){var e=this;6!==this._gameData.status&&4!==this._gameData.activeStatus||(console.log("%c %c %c This game was deleted, please remove it in your website... ","background: #F2181A","background: #F23818","color: #fff; background: #F23818;","background: #F55E60","background: #F55E60","background: #c4161e; color: #fff;"),setTimeout(function(){S.default(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;cR().disableMidrolltimer?e.midroll=0:a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&(a.Ls.getBoolean("gd_disable_midroll_timer")?e.midroll=0:e.midroll=this._getDefaultGameData().midroll)}},{key:"_checkSplashAndPromoScreens",value:function(){var e,t,n,r;!1===(null===(e=this._gameData.loader)||void 0===e?void 0:e.mobile)&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var a,i=this._gameData,s=i.gdpr&&!0===i.gdpr.consent,o=i.loader,d=null===(t=i.promo)||void 0===t?void 0:t[null===(n=i.promo)||void 0===n||null===(r=n.template)||void 0===r?void 0:r.preroll];(i.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=d&&d.enabled?this._createPromoBeforeSplash(i,s):o.enabled&&!0!==(null===(a=o.splash)||void 0===a?void 0:a.skip)?this._createSplash(i,s):this.onResumeGame("Skipped splash.","success"):o.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||s?null!=d&&d.enabled?this._createPromoBeforeSplash(i,s):!1!==o.enabled&&this._createSplash(i,s):null!=d&&d.enabled&&this._createPromo(i,s))}},{key:"_initializeVideoAd",value:(m=D.default(T.default.mark((function e(){var t;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._bridge.isCoreSDKMode){e.next=2;break}return e.abrupt("return");case 2:return(t=this._gameData).sdk.enabled&&(this.options.advertisementSettings=a.extendDefaults(this.options.advertisementSettings,t.sdk)),this.macros=new a.Macros({game:t,bridge:this._bridge}),this.adInstance=new bR(this.options.flashSettings.adContainerId,this.options.advertisementSettings,{parentURL:this._parentURL,parentDomain:this._parentDomain,topDomain:this._topDomain}),this.adInstance.gameId=t.gameId,this.adInstance.category=t.category,this.adInstance.tags=t.tags,this.adInstance.noPreroll=this._bridge.noPreroll,this.adInstance.macros=this.macros,this.adInstance.gameData=t,this.adInstance.msgrt=this.msgrt,this.adInstance.PackageJSON=go,this.adInstance._send_atom_event("gd.location"),e.next=17,this.adInstance.start();case 17:case"end":return e.stop()}}),e,this)}))),function(){return m.apply(this,arguments)})},{key:"_sendSDKReady",value:function(){var e="Everything is ready.";this.eventBus.broadcast("SDK_READY",{message:e,status:"success"});try{this.options.onInit(e)}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_sendSDKError",value:function(e){e=e.message?e:{message:e};this.eventBus.broadcast("SDK_ERROR",{message:e.message,status:"error"});try{this.options.onError(e)}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"IscForwardOnEvent",value:(p=D.default(T.default.mark((function e(t){var n,r,a,i,s;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=!1,e.prev=1,e.next=4,tk();case 4:if(!(r=e.sent)){e.next=14;break}return e.next=8,r.isLoader();case 8:if(s=e.sent,!((null===(a=this._gameData)||void 0===a||null===(i=a.isv_fw)||void 0===i?void 0:i.enabled)&&s&&r.onEvent)){e.next=14;break}return n=!0,r.onEvent({event:t}),e.abrupt("return",n);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),yo("[GD-IS] error on onEvent forward",e.t0);case 19:return e.abrupt("return",n);case 20:case"end":return e.stop()}}),e,this,[[1,16]])}))),function(e){return p.apply(this,arguments)})},{key:"_onEvent",value:(f=D.default(T.default.mark((function e(t){var n,r;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.IscForwardOnEvent(t);case 2:if(!e.sent){e.next=5;break}return e.abrupt("return");case 5:if(yo("[GD-IS] onEvent executing",{event:null==t?void 0:t.name,e:t,location:window.location.href}),a.dankLog(t.name,t.message,t.status),!t.skipForward){e.next=9;break}return e.abrupt("return");case 9:_o("[developer-event]".concat(t.isStoreEvent?"[store]":""),{name:t.name,data:t.data||{},source:"core"}),null!==(n=this._gameData)&&void 0!==n&&null!==(r=n.evnts)&&void 0!==r&&r.enabled&&VR({event:t.name,game:this._gameData});try{this.options.onEvent({name:t.name,message:t.message,status:t.status,data:t.data||{},isStoreEvent:t.isStoreEvent||!1,skipForward:t.skipForward,adPosition:t.adPosition})}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}case 12:case"end":return e.stop()}}),e,this)}))),function(e){return f.apply(this,arguments)})},{key:"_getGameData",value:(h=D.default(T.default.mark((function e(){var t;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pw();case 2:return t=e.sent,this.msgrt.setGameData(t),a.setDankLog(t.diagnostic),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"_createSplash",value:(l=D.default(T.default.mark((function e(t,n){var r,i,s,o,d=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getSplashTemplate(t);case 2:return r=e.sent,i=new r(_I(_I({},this.options),{},{isConsentDomain:n,version:go.version}),t,this._parentDomain),e.next=6,Hw();case 6:s=e.sent,o=s.enabled,i.on("playClick",function(){var e,r,s,u=this;if(S.default(this,d),((null===(e=window.gdlocus)||void 0===e?void 0:e.firstUserAction)||D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log("gd-adflow locus-first-user-action is not defined");case 1:case"end":return e.stop()}}),e)}))))({game_id:t.gameId}).catch(function(e){S.default(this,u),console.log("gd-adflow locus-first-user-action error",e)}.bind(this)),n){var c=new Date;c.setDate(c.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(c.toUTCString(),"; path=/")}if(this._hideCMPButton(),uT("play"),o)window.gdsdk.showAd(a.AdType.Interstitial,{position:"preroll"}).catch(function(e){S.default(this,u),i.hide()}.bind(this));else{var l={position:"preroll"};(function(){S.default(this,u),ko.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 1"),l.adapter="adsense")}).bind(this),this.showAd(a.AdType.Interstitial,l).catch(function(e){S.default(this,u)}.bind(this))}null!==(r=this._gameData)&&void 0!==r&&null!==(s=r.evnts)&&void 0!==s&&s.enabled&&(VR({event:"FirstInteraction",game:this._gameData}),this._send_gametag_data("first_interaction"))}.bind(this)),this.onPauseGame("Pause the game and wait for a user gesture","success"),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){S.default(this,d),i.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){S.default(this,d),i.hide()}.bind(this));case 12:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(c=D.default(T.default.mark((function e(t,n){var r,a,i,s,o=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(t);case 3:i=e.sent,(s=new i(_I(_I({},this.options),{},{isConsentDomain:n,version:go.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){S.default(this,o),s.hide(),this._createSplash(t,n)}.bind(this)),s.on("promoButtonClicked",function(){S.default(this,o),s.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0),this._createSplash(t,n);case 13:case"end":return e.stop()}}),e,this,[[0,9]])}))),function(e,t){return c.apply(this,arguments)})},{key:"_createPromo",value:(d=D.default(T.default.mark((function e(t,n){var r,a,i,s,o=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(t);case 3:i=e.sent,(s=new i(_I(_I({},this.options),{},{isConsentDomain:n,version:go.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){S.default(this,o),s.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),s.on("promoButtonClicked",function(){S.default(this,o),s.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),this.onPauseGame("Pause the game for the promo","success"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),this.onResumeGame("Resumed after the promo","warning");case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(e,t){return d.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(a.AdType.Interstitial).catch(function(){S.default(this,e)}.bind(this))}},{key:"IscForwardShowAd",value:(o=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l=arguments;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=l.length>1&&void 0!==l[1]?l[1]:{},i={forwarded:r=!1,result:a},e.prev=3,null===(s=this._gameData)||void 0===s||null===(o=s.isv_fw)||void 0===o?void 0:o.enabled){e.next=7;break}return e.abrupt("return",i);case 7:return e.next=10,tk();case 10:if(d=e.sent){e.next=13;break}return e.abrupt("return",i);case 13:return e.next=16,d.isLoader();case 16:if(u=e.sent,c=d.hasRouter(),u||!c){e.next=26;break}return _o("[GD-IS] forwarding ad call",{location:window.location.href}),r=!0,e.next=25,d.showAd({adType:t,params:n});case 25:a=e.sent;case 26:e.next=32;break;case 29:e.prev=29,e.t0=e.catch(3),yo("[GD-IS] error on showAd forward",e.t0);case 32:return e.abrupt("return",{forwarded:r,result:a});case 33:case"end":return e.stop()}}),e,this,[[3,29]])}))),function(e){return o.apply(this,arguments)})},{key:"showAd",value:(s=D.default(T.default.mark((function e(t){var n,r=this,a=arguments;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},e.abrupt("return",new Promise(function(){var e=D.default(T.default.mark((function e(a,i){var s,o,d,u,c,l,h,f,p;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=null===(s=r._gameData)||void 0===s?void 0:s.igs,!e.t0){e.next=6;break}return e.next=5,rk();case 5:e.t0=e.sent;case 6:if(!e.t0){e.next=10;break}return _o("[GD-IS-IGS] store-visible so ad was skipped",{loc:window.location.href}),e.abrupt("return");case 10:return e.next=12,r.IscForwardShowAd(t,n);case 12:if(d=e.sent,u=d.forwarded,c=d.result,!u){e.next=18;break}return a(c),e.abrupt("return");case 18:return uT("play"),l={adType:t||"interstitial",params:n,adTimestamp:r.adRequestTimer},e.next=24,r.sdkReady;case 24:return h=e.sent,e.next=27,r.videoAdReady;case 27:if(null!==(o=r._gameData.lp)&&void 0!==o&&o.load||r._sendLoadedEvent(1),r._sendGamedockGamePlay(),r._rejectAdIfGameBlocked({gameData:h,adRequest:l}),r._rejectAdIfUnsupportedType({adRequest:l}),"rewarded"===t&&r._setGameRewardedFlag(),null!=n&&n.isGift||null!=n&&n.isCompensation||r._rejectAdIfAdRateHits({gameData:h,adRequest:l}),n&&(n.isGift||n.isMidrollPlus||n.isCompensation)||!r.adBlockerPage||(r._setAdRequestTimer(),r.adBlockerPage.show()),r.adInstance.attachAfgPosition(l),!r._autoResumeIfAdsAreDisabled(lT(l))){e.next=39;break}return e.abrupt("return",a());case 39:if(r._rejectAdIfAdDisabled({gameData:h,adRequest:l}),!r.adFlowRunning){e.next=42;break}return e.abrupt("return",a());case 42:return r.adFlowRunning=!0,f=new WT(r),r._adFlow=f,e.next=47,f.runAdFlow(l);case 47:p=e.sent,r.adFlowRunning=!1,r._adFlow=null,a(p),r._post_message({topic:"adrequest.instream"}),e.next=61;break;case 54:e.prev=54,e.t1=e.catch(0),r.adFlowRunning=!1,r._adFlow=null,r.onAdError(e.t1.message),r.onResumeGame(e.t1.message,"warning"),i(e.t1.message);case 61:case"end":return e.stop()}}),e,null,[[0,54]])})));return function(t,n){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e)}))),function(e){return s.apply(this,arguments)})},{key:"_autoResumeIfAdsAreDisabled",value:function(e){var t,n=!1,r=null===(t=this._gameData.diagnostic)||void 0===t?void 0:t.close_ads,a=this._gameData.disableAds[e],i=r||a;return yo("gd-adflow autoresume result: adModuleDisabled,adDisabled",r,a,e,this._gameData.diagnostic,this._gameData.disableAds),i&&(this._runAutoResume(),n=!0),n}},{key:"_runAutoResume",value:function(){var e=this,t="CONTENT_PAUSE_REQUESTED",n="CONTENT_RESUME_REQUESTED";this.eventBus.broadcast(t,{name:t,message:"Auto pause when ads are disabled"}),setTimeout(function(){S.default(this,e),this.eventBus.broadcast(n,{name:n,message:"Auto resume when ads are disabled"}),this.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success")}.bind(this),3e3)}},{key:"_giveGift",value:function(e){var t,n,r,a,i,s,o,d,u,c,l,h,f,p,m;switch(e){case"preroll":null!==(t=this._gameData)&&void 0!==t&&null!==(n=t.gft)&&void 0!==n&&n[e].enabled&&(null===(r=this._gameData)||void 0===r||null===(a=r.gft)||void 0===a||null===(i=a[e].durations[this._giftCount[e]])||void 0===i?void 0:i.after)===this.adInstance.adPrerollCount&&this.decideToGiveAGift(e);break;case"midroll":null!==(s=this._gameData)&&void 0!==s&&null!==(o=s.gft)&&void 0!==o&&o[e].enabled&&(null===(d=this._gameData)||void 0===d||null===(u=d.gft)||void 0===u||null===(c=u[e].durations[this._giftCount[e]])||void 0===c?void 0:c.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift(e);break;case"rewarded":null!==(l=this._gameData)&&void 0!==l&&null!==(h=l.gft)&&void 0!==h&&h[e].enabled&&(null===(f=this._gameData)||void 0===f||null===(p=f.gft)||void 0===p||null===(m=p[e].durations[this._giftCount[e]])||void 0===m?void 0:m.after)===this.adInstance.adRewardedCount&&this.decideToGiveAGift(e)}}},{key:"_setAdRequestTimer",value:function(){this.adRequestTimer=Date.now()}},{key:"clearSession",value:function(){this.adInstance.clearSession()}},{key:"_attachAfgFallback",value:function(e){var t=e.gameData,n=e.adRequest;if(!t.afg_disabled&&!n.params.hasOwnProperty("fallback_adsense"))switch(n.params.position){case"preroll":case"start":case"next":n.params.fallback_adsense=!0}}},{key:"_rejectAdIfGameBlocked",value:function(e){var t=e.gameData;if(t.bloc_gard&&!0===t.bloc_gard.enabled)throw new Error("Game or domain is blocked.")}},{key:"_rejectAdIfAdDisabled",value:function(e){var t=e.gameData,n=lT(e.adRequest);if(t.disableAds[n]||this._whitelabelPartner)throw new Error("Advertisements are disabled.")}},{key:"_rejectAdIfUnsupportedType",value:function(e){var t=e.adRequest;if(t.adType){if(t.adType!==a.AdType.Interstitial&&t.adType!==a.AdType.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=a.AdType.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===a.AdType.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i,s,o,d=e.gameData,u=e.adRequest,c=null;u.adType===a.AdType.Interstitial&&null!==(t=d.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=d.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(c=6e4*(null===(s=d.diagnostic)||void 0===s||null===(o=s.useMidrollIndex)||void 0===o?void 0:o.indexes[this.adInstance.adMidrollCount])):c=d.midroll;if(u.adType===a.AdType.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<c)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(i=D.default(T.default.mark((function e(t){var n=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=D.default(T.default.mark((function e(r,i){var s,o;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.sdkReady;case 3:return s=e.sent,e.next=6,n.videoAdReady;case 6:if(!s.bloc_gard||!0!==s.bloc_gard.enabled){e.next=8;break}throw new Error("Game or domain is blocked.");case 8:if(!s.disableAds[t]&&!n._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled for this ad type => ".concat(t,"..."));case 10:if(t){e.next=14;break}t=a.AdType.Rewarded,e.next=16;break;case 14:if(t===a.AdType.Interstitial||t===a.AdType.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+t);case 16:if(!n.adInstance){e.next=22;break}return e.next=19,n.adInstance.preloadAd(t);case 19:e.t0=e.sent,e.next=23;break;case 22:e.t0="gdsdk://preloaded";case 23:o=e.t0,r(o),e.next=30;break;case 27:e.prev=27,e.t1=e.catch(0),i(e.t1);case 30:case"end":return e.stop()}}),e,null,[[0,27]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"cancelAd",value:(r=D.default(T.default.mark((function e(){var t=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=D.default(T.default.mark((function e(n,r){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{t.adInstance.cancel(),t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),r()}catch(e){t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),n(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)})},{key:"showDisplayAd",value:function(e){var t=this;return new Promise(function(){var n=D.default(T.default.mark((function n(r,a){var i;return T.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t.sdkReady;case 3:return i=n.sent,n.next=6,t.videoAdReady;case 6:if(!i.dAds.enabled){n.next=13;break}return n.next=9,t.adInstance.loadDisplayAd(e);case 9:t._post_message({topic:"adrequest.display"}),r(),n.next=14;break;case 13:a("Display-Ads are disabled.");case 14:n.next=19;break;case 16:n.prev=16,n.t0=n.catch(0),a(n.t0.message||n.t0);case 19:case"end":return n.stop()}}),n,null,[[0,16]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"onResumeGame",value:function(e,t){var n,r;try{this._allowExternals({enabled:!1}),this.options.resumeGame()}catch(e){console.log("gd-adflow error onResumeGame",e),a.dankLog("DEVELOPER_ERROR",e.message,"warning")}var i="SDK_GAME_START";this.eventBus.broadcast(i,{name:i,message:e,status:t,analytics:{category:"SDK",action:i,label:this.options.gameId+""},adPosition:null===(n=this.adInstance)||void 0===n?void 0:n._findAdPosition()}),this.adInstance&&this.adInstance._hideAddResume(),this.adInstance&&this.adInstance._hideAdSpinner(),this.adInstance&&this.adInstance._clearTimeoutForSkipAddButton(),null===(r=this._gameData.evnts)||void 0===r||!r.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(VR({event:"GameStarted",game:this._gameData}),this._send_gametag_data("game_started"))}},{key:"onPauseGame",value:function(e,t){var n;this._allowExternals({enabled:!0});try{this.options.pauseGame()}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_PAUSE";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(VR({event:"GamePaused",game:this._gameData}),this._send_gametag_data("game_paused"))}},{key:"onRewardedWatchComplete",value:function(){this.eventBus.broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"})}},{key:"onAdError",value:function(e){this.eventBus.broadcast("AD_ERROR",{message:e,status:"error"})}},{key:"openConsole",value:function(){try{new a.ImplementationTest(this).start(),a.Ls.set("gd_debug_ex",!0)}catch(e){console.log(e)}}},{key:"_initBlockingExternals",value:function(){var e=this._gameData;(e.failed||e.block_exts&&e.block_exts.enabled)&&(this.window_open=window.open,this._allowExternals({enabled:!1}),this._removeExternalsInHtml({enabled:!1}))}},{key:"_checkFullscreen",value:function(){var e=this;try{var t=this._gameData;t.sdk.fullscreen&&"auto"===t.sdk.fullscreen&&document.addEventListener("click",function(){if(S.default(this,e),!this._isFullScreen){var t=document.body,n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullscreen;if(n)n.call(t);else if(void 0!==window.ActiveXObject){var r=new ActiveXObject("WScript.Shell");null!==r&&r.SendKeys("{F11}")}this._isFullScreen=!0}}.bind(this))}catch(e){console.log("Fullscreen error handled...",e)}}},{key:"_allowExternals",value:function(e){var t=this;void 0!==this.window_open&&(!1===e.enabled?window.open=function(e){S.default(this,t),this.msgrt.send("external",{message:"C> ".concat(e)}),(e.startsWith("https://play.google.com")||e.startsWith("https://itunes.apple.com"))&&this.window_open.call(null,e)}.bind(this):window.open=this.window_open)}},{key:"_shouldAllowExternalUrl",value:function(e){var t,n=this,r=new P.default(e),a=r.host;return r.href,((null===(t=this._gameData.urlBlockExc)||void 0===t?void 0:t.hosts)||[]).some(function(e){return S.default(this,n),e===a}.bind(this))}},{key:"_removeExternalsInHtml",value:function(e){var t=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var n=this;S.default(this,t);var r=!!(e.innerText.toLowerCase().includes("start")||e.innerText.toLowerCase().includes("play")||e.innerText.toLowerCase().includes("continue")),a=e.getAttribute("href");if(!this._shouldAllowExternalUrl(a)){var i=e.getAttribute("href");e.removeAttribute("href"),r||(e.onclick=function(e){return S.default(this,n),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(i)}),!1}.bind(this))}}.bind(this))}},{key:"_getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),d=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,v=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:d,noLoadedEvent:u,noBlockerEvent:c,noPreroll:m,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:l,noLotamePageView:h,noGamedockSDK:f,noMinijuegosSDK:p,version:r.version,pauseGameOnStartup:v,depth:a.getIframeDepth(),domainMatched:s===o,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isHostHTML5Domain",value:function(){var e=new P.default(location.href);return"html5.gamedistribution.com"===(null==e?void 0:e.host.toLowerCase())}},{key:"_isExternalHoster",value:function(){var e,t;return null===(e=this._gameData)||void 0===e||null===(t=e.extHosting)||void 0===t?void 0:t.enabled}},{key:"_whichFrame",value:function(){return(this._isMasterGameURL()||this._isExtHostedGameURL())&&!this._isTokenGameURL()?"loader-frame":"game-frame"}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_checkTokenGameUrl",value:function(){var e=P.default(location.href),t=e.origin,n=e.pathname,r="".concat(t).concat(n);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(r)}},{key:"_isTokenGameURL",value:function(){var e,t=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i,n="1"===(null===(e=P.default(location.href,!0).query)||void 0===e?void 0:e.rd);return t.test(location.href)||!n&&t.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isLoaderGameURL",value:function(){return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)&&location.href.startsWith("https://html5.gamedistribution.com")}},{key:"_getTokenGameURLConfig",value:function(){try{var e,t=/http[s]?:\/\/html5\.gamedistribution\.com\/[A-Za-z0-9]{8}\/[A-Fa-f0-9]{32}\/.*/i;if(t.test(location.href)){var n=new P.default(location.href,!0);if(!n.query.gd_zone_config)return;e=n.query.gd_zone_config}else if(t.test(document.referrer)){var r=new P.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new P.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(u.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new _R(t).splash()}},{key:"_createPrerollPromoTemplate",value:(n=D.default(T.default.mark((function e(t){var n,r,a,i,s;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null===(n=t.promo)||void 0===n?void 0:n[null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll],s=new yR(i),e.abrupt("return",s.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(u.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new P.default(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(H.default.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new P.default(e,!0);return n.query=_I(_I({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return u.Base64.encode(JSON.stringify(e))}},{key:"session",value:function(){var e=this;return new Promise(function(){var t=D.default(T.default.mark((function t(n,r){var a;return T.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.sdkReady;case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:a=e._gameData,n({ads:{display:{enabled:a.dAds.enabled},rewarded:{enabled:a.rewardedAds}},location:{parentDomain:e._bridge.parentDomain,topDomain:e._bridge.topDomain,parentURL:e._bridge.parentURL,depth:e._bridge.depth,loadedByGameZone:e._bridge.isTokenGameURL}});case 9:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e,n){return t.apply(this,arguments)}}())}},{key:"sendGenericEvent",value:function(e){console.log("Received generic event",e,this._isMasterGameURL());try{var t,n;if("track-milestone"==e.eventName)xI.tracking.trackEvent("milestoneAchieved",{pageId:this.options.gameId,pageType:"game",isAuthorized:null===(t=e.data)||void 0===t?void 0:t.isAuthorized,milestoneDescription:null===(n=e.data)||void 0===n?void 0:n.milestoneDescription});else if("game_event"==e.eventName)return this._gameEventPostMessage(e)}catch(e){console.log(e.message)}}},{key:"_gameEventPostMessage",value:function(e){if(void 0!==e.data.level&&this._numberValidator(e.data.level))if(void 0!==e.data.score&&this._numberValidator(e.data.score)){var t={type:e.eventName,data:e.data};window.location!==window.top.location&&window.top.postMessage(t,"*")}else console.log("Level data type should be number!");else console.log("Level data type should be number!")}},{key:"_numberValidator",value:function(e){return"number"==typeof e&&/^\d*$/.test(e)}},{key:"_getisMobile",value:function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),!1===t&&window.orientation>-1&&(t=!0),t}},{key:"_get_game_thumbnail_url",value:function(){var e=this,t=this._gameData,n=t.assets.find(function(t){return S.default(this,e),t.hasOwnProperty("name")&&512===t.width&&512===t.height}.bind(this));return n||(n=t.assets.length>0?t.assets[0]:{name:"logo.svg"}),"https://img.gamedistribution.com/".concat(n.name)}},{key:"_post_message",value:function(e){var t,n=e.topic,r=e.data,a=null!==(t=location.ancestorOrigins)&&void 0!==t&&t.length?location.ancestorOrigins[location.ancestorOrigins.length-1]:"*";try{var i=window.top||window.parent;i&&i.postMessage({source:"gdsdk",topic:n,data:r},a)}catch(e){console.error((null==e?void 0:e.message)||e)}}},{key:"fixScore",value:function(){var e,t,n,r,i=this;if(null===(e=this._gameData)||void 0===e||null===(t=e.fix_score)||void 0===t?void 0:t.enabled){var s=(null===(n=this._gameData)||void 0===n||null===(r=n.fix_score)||void 0===r?void 0:r.wait)||10;setTimeout(function(){var e=this;S.default(this,i),this.showAd(a.AdType.Interstitial,{position:"midroll"}).catch(function(t){S.default(this,e)}.bind(this))}.bind(this),1e3*s)}}},{key:"executeCompensation",value:(t=D.default(T.default.mark((function e(t){var n,r,i,s,o,d,u=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.whenAvailable)||!1,r=!this.adInstance.requestRunning&&!this.adFlowRunning,i=function(){var e=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.showAd(a.AdType.Interstitial,{position:"midroll",isCompensation:!0});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),!r){e.next=10;break}return e.next=7,i();case 7:return s=e.sent,e.abrupt("return",s);case 10:if(!n){e.next=17;break}return o=!1,e.next=15,new Promise(function(e,t){var n=this;S.default(this,u);var r=!1,a=setInterval(D.default(T.default.mark((function t(){var s;return T.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.adInstance.requestRunning||n.adFlowRunning){t.next=19;break}return clearInterval(a),t.prev=4,t.next=7,i();case 7:s=t.sent,r=!0,e(s),o=!0,t.next=19;break;case 14:t.prev=14,t.t0=t.catch(4),yo("[compensation] execution error after became available",t.t0),e({err:t.t0,success:!1}),o=!0;case 19:case"end":return t.stop()}}),t,null,[[4,14]])}))),1e3);setTimeout(function(){S.default(this,n),r||o||e({success:!1})}.bind(this),6e4)}.bind(this));case 15:return d=e.sent,e.abrupt("return",d);case 17:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"decideToGiveAGift",value:function(e){var t=this;try{var n,r=null===(n=this._gameData)||void 0===n?void 0:n.gft[e],i="gift";if(!DT({rateType:i,gameData:this._gameData}))return void yo("[compensation] rate check did not pass for ".concat(i));yo("[compensation] rate check passed for ".concat(i));var s=setInterval(D.default(T.default.mark((function n(){var r=this;return T.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:t.adInstance.requestRunning||t.adFlowRunning?console.log("Advertisement already running..."):(yo("gd-adflow WILL GIVE GIFT!!!"),t.showAd(a.AdType.Interstitial,{position:e,isGift:!0}).catch(function(e){S.default(this,r)}.bind(this)),clearInterval(s),t._giftCount[e]++);case 1:case"end":return n.stop()}}),n,this)}))),1e3*r.durations[this._giftCount[e]].wait)}catch(e){console.log("Advertisement Error...")}}},{key:"send_atom_event",value:function(e,t){this.adInstance._send_atom_event(e,t)}},{key:"get_session_id",value:function(){return wI}},{key:"get_ad_system_init_result",value:function(){return{afg:this.adInstance.afgInitSuccess,ima:this.adInstance.imaInitSuccess}}},{key:"_getDeveloperDomains",value:function(){var e,t;return"developer.gamedistribution.com"===this._topDomain||"developer-acc.gamedistribution.com"===this._topDomain?e=this._topDomain:!0===new RegExp("^localhost").test(this._parentDomain)&&(e="localhost"),e&&(t={"developer-acc.gamedistribution.com":"game-api-acc-real-aws.gamedistribution.com","developer.gamedistribution.com":"game.api.gamedistribution.com",localhost:"game-api-acc-real-aws.gamedistribution.com"}[e]),{developerDomain:e,gameApiDomain:t}}},{key:"_setGameRewardedFlag",value:function(){try{var e=this._getDeveloperDomains(),t=e.developerDomain,n=e.gameApiDomain;if(t){fetch("https://".concat(n,"/game/v2/hasrewarded/").concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var r=JSON.stringify({type:"GD_SDK_REWARDED_SET",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(r,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(r,"*")}catch(e){}}}catch(e){}}},{key:"_getGdModeIfExist",value:function(){var e=this,t=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return S.default(this,e),t.get(n)}.bind(this)});return!t.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:t.gd_mode}},{key:"_executeMidrollPlus",value:function(){var e,t=this;if(!(this.adInstance&&this.adInstance.checkIfTestAdsExist())){if(DT({rateType:"midroll+",gameData:this._gameData})&&null!==(e=this._gameData.midroll_plus)&&void 0!==e&&e.enabled&&!this.isMidrollPlusExecuted){var n;this.isMidrollPlusExecuted=!0;var r=this._gameData.midroll_plus.type||"midroll";if(null!==(n=this._gameData.midroll_plus)&&void 0!==n&&n.interval)var i=setInterval(function(){var e,n,s=this;(S.default(this,t),this.adFlowRunning)||(this.showAd(a.AdType.Interstitial,{position:"midroll",giftType:r,isMidrollPlus:!0}).catch(function(e){S.default(this,s)}.bind(this)),this._mplus_count++,"infinite"!==(null===(e=this._gameData.midroll_plus)||void 0===e?void 0:e.interval)&&this._mplus_count===(null===(n=this._gameData.midroll_plus)||void 0===n?void 0:n.interval)&&clearInterval(i))}.bind(this),6e4*this._gameData.midroll_plus.timer);else setTimeout(function(){var e=this;S.default(this,t),this.showAd(a.AdType.Interstitial,{position:"midroll",giftType:r,isMidrollPlus:!0}).catch(function(t){S.default(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}}}]),e}();function DI(){return(DI=D.default(T.default.mark((function e(){var t,n=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Nw();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled on proxy level"),e.abrupt("return");case 6:t=["https://pm.azerioncircle.com/p/locus/"],console.log("locus loading"),a.getScript(t[0],"locus",{alternates:t}).catch(function(e){S.default(this,n),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}var SI,RI=new m.EventEmitter,TI=function(e){var t=this;!function(){DI.apply(this,arguments)}();var n,r=function(e){var n=this;return S.default(this,t),new Promise(function(t,r){var a=this;S.default(this,n);var i=function(e){S.default(this,a),"SDK_GAME_START"===e.name&&(RI.off("sdk-event",i),t())}.bind(this);RI.on("sdk-event",i),m("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return S.default(this,t),n||(n=new EI(e)),n}.bind(this),i=function(){var e;return S.default(this,t),(null===(e=window.gdsdk.store)||void 0===e?void 0:e.isVisible)&&window.gdsdk.store.isVisible()}.bind(this),s=function(e){if(S.default(this,t),!i())return r(e);_o("[GD-IS-IGS] store-visible so ad was skipped",{loc:window.location.href})}.bind(this),o=function(e){return S.default(this,t),"gdsdk://preloaded"}.bind(this),d=function(e){return S.default(this,t),a().showDisplayAd(e)}.bind(this),u=function(){return S.default(this,t),m("cancelAd")}.bind(this),c=function(){return S.default(this,t),m("openConsole")}.bind(this),l=function(){return S.default(this,t),m("showBanner")}.bind(this),h=function(){return S.default(this,t),m("session")}.bind(this),f=function(e){return S.default(this,t),m("sendGenericEvent",{options:e})}.bind(this),p=function(){S.default(this,t),console.log("_sendSDKReady")}.bind(this),m=function(e,n){var r=this;return S.default(this,t),n||(n={}),new Promise(function(t,a){S.default(this,r);try{var i={type:"gd-sdk",method:e,options:n};window.parent.postMessage(i,"*"),t()}catch(e){console.log("gd:adp:m:s:error",e),t()}}.bind(this))}.bind(this),v=function(){S.default(this,t);window.addEventListener("message",(function(e){var t=e.data;e.origin,e.source;var n=t.type,r=t.event;"gd-sdk-on-event"===n&&r&&A(r)}),!1)}.bind(this),g=function(){S.default(this,t),v(),m("init")}.bind(this),A=function(n){S.default(this,t);try{RI.emit("sdk-event",n),e.onEvent&&(_o("[developer-event]".concat(n.isStoreEvent?"[store]":""),{name:n.name,data:n.data,source:"proxy"}),e.onEvent(n)),"SDK_GAME_PAUSE"===n.name?e.pauseGame&&e.pauseGame():"SDK_GAME_START"===n.name&&e.resumeGame&&e.resumeGame()}catch(e){console.log("DEVELOPER ERROR on forwarder-sdk")}}.bind(this);return{showBanner:l,showAd:s,preloadAd:o,showDisplayAd:d,cancelAd:u,openConsole:c,getSession:h,onEvent:A,init:g,_sendSDKReady:p,sendGenericEvent:f}},II=function(){var e=D.default(T.default.mark((function e(t){var n,r=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=TI(t)).init(),e.next=4,Kw({whichFrame:"game-frame",options:{onEvent:n.onEvent.bind(n)}});case 4:return lk({onEvent:function(e){S.default(this,r);var t=e.name,a=e.data;(n.onEvent({name:t,message:"In Game Store: ".concat(t),status:"success",data:a,isStoreEvent:!0}),"STORE_UI_VISIBILITY_CHANGED"===t)&&(a.visible?n.onEvent({name:"SDK_GAME_PAUSE",message:"SDK_GAME_PAUSE",status:"success"}):n.onEvent({name:"SDK_GAME_START",message:"SDK_GAME_START",status:"success"}))}.bind(this)}),e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),CI=function(){var e=this,t=function(){S.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),n=function(){S.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),r=function(){S.default(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this),a=function(){S.default(this,e);var r="html5.gamedistribution.com"!==P.default(window.location.href).host;return t()&&!(n()||r)?"loader-frame":"game-frame"}.bind(this);return{isMasterGameURL:t,isTokenGameURL:n,isExtHostedGameURL:r,whichFrame:a}},OI="gd-sdk-frame-handshake-request",PI="gd-sdk-frame-handshake-response",LI=function(e){var t=this;return new Promise(function(e,n){var r=this;S.default(this,t);var a={type:OI},i=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin,a=t.source,s=n.type;if(s===OI){var o={type:PI};a.postMessage(o,r)}else s===PI&&(i=!0,e({origin:r,source:a}))})),setTimeout(function(){S.default(this,r),i||e()}.bind(this),200),window.parent!==window?window.parent.postMessage(a,"*"):e()}.bind(this))},BI=function(){var e=D.default(T.default.mark((function e(){var t,n,r,a,i,s,o;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Gw();case 2:return t=e.sent,e.next=6,LI();case 6:if(n=e.sent,tI.SDKExistsOnUpperFrame=!!n,t){e.next=10;break}return e.abrupt("return",!1);case 10:return r=CI(),a=r.isMasterGameURL,r.isTokenGameURL,i=a(),e.next=14,qw();case 14:return s=e.sent,o=!1,o=s?!i&&!!n:!i,e.abrupt("return",o);case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),UI={},MI=function(e){try{if(e.skipForward)return void yo("gd-adflow fw-skip-forward",e);if(yo("gd-adflow fw-forwarding",e),UI.source){var t={type:"gd-sdk-on-event",event:e};UI.source.postMessage(t,UI.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},FI=function(){MI({name:"SDK_READY",status:"success",message:"Everything is ready."}),MI({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),MI({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},jI=function(e){window.addEventListener("message",(function(t){var n=t.data,r=t.origin,a=t.source,i=n.type,s=n.method,o=n.options;if("gd-sdk-self"!==i){if("gd-sdk"===i){if(!UI.source&&"init"===s)return function(e){var t=e.source,n=e.origin;UI={source:t,origin:n}}({source:a,origin:r}),void FI();var d=e[s];d&&D.default(T.default.mark((function t(){var n,r=this;return T.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,function(){S.default(this,r),"showAd"===s&&ko.firstAdapterModeAdsense&&"rewarded"!==o.adType&&(console.log("promo-test, set first adapter to adssense 3"),o.params=o.params?o.params:{},o.params.adapter="adsense")}.bind(this),!(n=d.apply(e,Object.values(o)))||!n.then){t.next=6;break}return t.next=6,n;case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log("gd:adp:m:r onFrameMessage error",t.t0);case 11:case"end":return t.stop()}}),t,this,[[0,8]])})))()}}else{var u={type:"gd-sdk",method:s,options:o};window.postMessage(u,location.origin)}}),!1)},GI=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){MI(e),t.apply(this,arguments)}}(e);var t=new EI(e);return jI(t),t},NI=function(){function e(){C.default(this,e),this.moduleName="GDAeria",this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/gd-sdk-aeria/1.0.1/dist/default/iife/index.js",dependencies:[]},Xg(this.moduleName,this.moduleConfig)}var t,n;return I.default(e,[{key:"load",value:(n=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,$g(this.moduleName);case 3:this.module=e.sent,yo("aeria module load success",this.module),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.log("aeria module load error",e.t0),this.module=null;case 11:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return n.apply(this,arguments)})},{key:"runYMenu",value:(t=D.default(T.default.mark((function e(t){var n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.gameId,this.module){e.next=4;break}return e.next=4,this.load();case 4:(new this.module.Aeria).renderYMenu({gameId:n});case 6:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}(),qI=function(){var e=D.default(T.default.mark((function e(){var t,n,r,i,s,o,d,u,c,l,h,f,p,m,v,g;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=function(){var e,t=(e=new I_).get("partner.domain.value")||e.get("top.domain.value");return{isAeriaDomain:"minigame.aeriagames.jp"===t||"minigame-stg.aeriagames.jp"===t,isAeriaStagingDomain:"minigame-stg.aeriagames.jp"===t}}(),n=t.isAeriaDomain,r=t.isAeriaStagingDomain,!n){e.next=21;break}return o=function(){var e=(new I_).get("partner.url.value");return new P.default(e,!0)},d=function(){var e="ae-soft-323";try{var t=o(),n=t.pathname,r=n.split("/"),a=r[r.length-1];_o("aeria-ylogin:loc",t,n,a),e=a}catch(e){wo("Error on getting aeria game id",e)}return e}(),u={action:"score",data:{gameId:d,score:100},env:r?"staging":"production",system:"Softgames"},c=function(){var e=window.parent||window,t=u;e.postMessage(t,"*")},l=new a.EventBus,e.next=13,Pw();case 13:h=e.sent,f=null==h||null===(i=h.aeria)||void 0===i?void 0:i.yMenuExcluded,p=null==h||null===(s=h.aeria)||void 0===s?void 0:s.yLoginExcluded,l.subscribe("AD_FLOW_COMPLETE",(function(e){"midroll"===e.adType&&(p||c())})),m=function(){var e=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(new NI).runYMenu({gameId:d});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),v=CI(),g=v.whichFrame,"game-frame"===g()&&(f||m());case 21:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),HI=function(e){try{var t=Z_(e);e.gameId||t.send("nogameid",{message:"".concat(mb.parentURL)})}catch(e){}},VI=function(){var e=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,qI();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log("error on creating some bridge module");case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return e.apply(this,arguments)}}(),QI={create:function(){var e=D.default(T.default.mark((function e(t){var n,r;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,HI(t),Ow(t),e.next=5,BI();case 5:return n=e.sent,e.next=8,VI();case 8:if(window.isForwarderFrame=n,!n){e.next=15;break}return e.next=12,II(t);case 12:e.t0=e.sent,e.next=16;break;case 15:e.t0=GI(t);case 16:return r=e.t0,Vw(),e.abrupt("return",r);case 21:return e.prev=21,e.t1=e.catch(0),console.log("gd:adp: sdk adaptor create failed, fallback to default adapter",e.t1),e.abrupt("return",GI(t));case 25:case"end":return e.stop()}}),e,null,[[0,21]])})));return function(t){return e.apply(this,arguments)}}()};function zI(){return(zI=D.default(T.default.mark((function e(t,n){var r;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ww();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,KI(t);case 9:e.t0=e.sent;case 10:return r=e.t0,e.abrupt("return",n(r));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var WI=!1;function KI(e){var t=this;return new Promise(function(n,r){var a=this;if(S.default(this,t),SI)return n(SI);if(WI)var i=setInterval(function(){S.default(this,a),SI&&(WI=!1,clearInterval(i),n(SI))}.bind(this),100);else WI=!0,QI.create(e).then(function(e){S.default(this,a),SI=e,e._sendSDKReady(),WI=!1,n(SI)}.bind(this))}.bind(this))}function YI(e){return KI(e),{invoke:function(t){return function(e,t){return zI.apply(this,arguments)}(e,t)}}}var JI,XI,ZI=$i,$I=Mr,eC=Ha.f,tC=$r,nC=os,rC=dA,aC=me,iC=cA,sC=$I("".endsWith),oC=$I("".slice),dC=Math.min,uC=iC("endsWith"),cC=!uC&&!!function(){var e=eC(String.prototype,"endsWith");return e&&!e.writable}();function lC(e,t){var n=this;return new Promise(function(r,i){var s,o=this;S.default(this,n);var d=function(e){var t="https://pm.azerioncircle.com/pkg/@bygd/gd-sdk-wrp/dist/default/iife/index.js";return e&&(t="https://pm.azerioncircle.com/@bygd/gd-sdk-wrp/".concat(e,"/dist/default/iife/index.js")),[t]}(null==t||null===(s=t.game)||void 0===s?void 0:s.version);hC({text:"sdk-wrapper-script-load"}),a.getScript(d[0],"gd-sdk-wrp",{alternates:d}).catch(function(e){S.default(this,o),hC({text:"sdk-wrapper load error",error:e.message}),this._sendSDKError(e),i(e)}.bind(this)).then(D.default(T.default.mark((function n(){var a,s;return T.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,hC({text:"sdk-wrapper load success"}),a=window.GDSDKWRP.GDSDKWRP,s=new a,hC({text:"sdk-wrapper before gdSdkWrp.init"}),n.next=7,s.init(e,t);case 7:XI=n.sent,hC({text:"sdk-wrapper after gdSdkWrp.init"}),r(XI),n.next=16;break;case 12:n.prev=12,n.t0=n.catch(0),hC({text:"sdk-wrapper load error 2",error:n.t0.message}),i(n.t0);case 16:case"end":return n.stop()}}),n,null,[[0,12]])}))))}.bind(this))}function hC(e){try{var t={tp:"gd.wrp",args:e};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(u.Base64.encode(JSON.stringify(t))))),console.log(N.default(Object.values(e)))}catch(e){}}function fC(e){if(e){var t=e.name,n=e.message,r=e.status;try{hC({text:"samsung-wrp send-game-event",evt:e,hasOptions:!!JI}),JI&&JI.onEvent({name:t,message:n,status:r})}catch(t){hC({text:"samsung-wrp DEVELOPER-ERROR",evt:e,err:t})}}}function pC(e){try{return"samsungapps.com"===e||e.endsWith(".samsungapps.com")}catch(e){return!1}}function mC(e){return vC.apply(this,arguments)}function vC(){return(vC=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u,c;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return JI=t,Ow(t),e.next=4,Pw();case 4:if(i=e.sent,!XI){e.next=7;break}return e.abrupt("return",XI);case 7:if(s=null==i||null===(n=i.sdk_wrp)||void 0===n?void 0:n.enabled,o=null==i||null===(r=i.sdk_wrp)||void 0===r?void 0:r.version,d=null==i?void 0:i.gameId,u=null==i?void 0:i.title,AC("isWrapEnabled ".concat(s)),s){e.next=14;break}return e.abrupt("return");case 14:return c=null==i||null===(a=i.sdk_wrp)||void 0===a?void 0:a.wrapper,e.next=17,lC(c,{onEvent:fC,game:{gameId:d,title:u,version:o}});case 17:return XI=e.sent,e.abrupt("return",XI);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function gC(){return gC=D.default(T.default.mark((function e(t){var n,r,a;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t._get_developer_sets,AC("beforeGetDeveloperSettings"),r=n(),AC("afterGetDeveloperSettings"),e.prev=4,e.next=7,mC(r);case 7:a=e.sent,AC("after get SDK wrapper: ".concat(!!a)),a&&(AC("setting SDK Wrapper as gd-sdk"),window.sdkWrapper=a,window.gdsdk=a,window.gdApi=window.gdsdk),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Error on SDK wrapper init",e.t0),AC("Error on SDK wrapper init: ".concat(e.t0.message));case 16:case"end":return e.stop()}}),e,null,[[4,12]])}))),gC.apply(this,arguments)}function AC(e){window.sdkLog.push(e)}function bC(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":R.default(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===R.default(window.gdApi.q[0][0])&&window.gdApi.q[0][0]&&((e=window.gdApi.q[0][0]).hasOwnProperty("advertisementSettings")||(e.advertisementSettings={autoplay:!0}))}catch(e){console.log("_get_developer_sets failed",e)}return e}ZI({target:"String",proto:!0,forced:!cC&&!uC},{endsWith:function(e){var t=nC(aC(this));rC(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,a=void 0===n?r:dC(tC(n),r),i=nC(e);return sC?sC(t,i,a):oC(t,a-i.length,a)===i}}),window.sdkLog=[],function(){var e=function(){var e,t=P.default(window.location.href,!0),n=t.host,r=t.query,a=n,i=null==r?void 0:r.gd_sdk_referrer_url;if(i){var s;i=i.startsWith("https://")||i.startsWith("http://")?i:"https://".concat(i),null!==(s=e=P.default(i,!0))&&void 0!==s&&s.host&&(a=e.host)}return a}(),t=new I_,n=t.get("top.domain.value"),r=t.get("partner.domain.value");return pC(e)||pC(n)||pC(r)}()?AC("skipped normal SDK init!"):(!function(){iR();var e=YI(bC());function t(){var t=this;this.AdType=a.AdType,this.preloadAd=function(){var t=D.default(T.default.mark((function t(n){var r,a=this;return T.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.invoke(function(e){return S.default(this,a),e.preloadAd(n)}.bind(this));case 2:return r=t.sent,_o("[developer-event] preloadAd check",r),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),this.showAd=function(){var t=D.default(T.default.mark((function t(n,r){var i,s=this;return T.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.invoke(function(e){var t=this;if(S.default(this,s),n===a.AdType.Display)return e.showDisplayAd(r);var i={};return function(){S.default(this,t),ko.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 2"),i.adapter="adsense")}.bind(this),e.showAd(n,i)}.bind(this));case 2:return i=t.sent,_o("[developer-event] after showAd",i),t.abrupt("return",i);case 5:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),this.cancelAd=function(){var t=this;return e.invoke(function(e){return S.default(this,t),e.cancelAd()}.bind(this))},this.openConsole=function(){var t=this;return e.invoke(function(e){return S.default(this,t),e.openConsole()}.bind(this))},this.getSession=function(){var t=this;return e.invoke(function(e){return S.default(this,t),e.session()}.bind(this))},this.sendEvent=function(t){var n=this;return e.invoke(function(e){return S.default(this,n),e.sendGenericEvent(t)}.bind(this))},this.leaderboard={show:function(){S.default(this,t),tA.showLeaderboard()}.bind(this),addScore:function(e){S.default(this,t),tA.addScore(e)}.bind(this)}}t.prototype=new function(){this.showBanner=function(){var t=this;return e.invoke(function(e){return S.default(this,t),e.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new t,window.gdApi=window.gdsdk}(),AC("afterSDKInit")),function(e){gC.apply(this,arguments)}({_get_developer_sets:bC});
1
+ "use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/newArrowCheck"),n=require("@babel/runtime/helpers/typeof"),r=require("@babel/runtime/regenerator"),a=require("@bygd/gd-sdk-era/dist/default"),i=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/classCallCheck"),o=require("@babel/runtime/helpers/defineProperty"),d=require("url-parse"),u=require("js-base64"),c=require("validator"),l=require("is-valid-domain"),h=require("get-value"),f=require("set-value"),p=require("lodash.clonedeep"),m=require("events"),v=require("@fnet/inter-service-js"),g=require("ua-parser-js"),A=require("@babel/runtime/helpers/toConsumableArray"),b=require("can-autoplay"),y=require("is-plain-object"),_=require("querystringify"),w=require("lodash.merge"),k=require("uuid"),x=require("@flownet/lib-connect-to-tcf");function E(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var D=E(e),S=E(t),R=E(n),T=E(r),I=E(i),C=E(s),O=E(o),P=E(d),L=E(c),B=E(l),U=E(h),M=E(f),F=E(p),j=E(v),G=E(g),N=E(A),q=E(b),H=E(_),V=E(w),Q=E(x),z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},W=function(e){return e&&e.Math==Math&&e},K=W("object"==typeof globalThis&&globalThis)||W("object"==typeof window&&window)||W("object"==typeof self&&self)||W("object"==typeof z&&z)||function(){return this}()||Function("return this")(),Y={exports:{}},J=K,X=Object.defineProperty,Z=function(e,t){try{X(J,e,{value:t,configurable:!0,writable:!0})}catch(n){J[e]=t}return t},$=Z,ee="__core-js_shared__",te=K[ee]||$(ee,{}),ne=te;(Y.exports=function(e,t){return ne[e]||(ne[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE",source:"https://github.com/zloirock/core-js"});var re,ae,ie=function(e){try{return!!e()}catch(e){return!0}},se=!ie((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),oe=se,de=Function.prototype,ue=de.call,ce=oe&&de.bind.bind(ue,ue),le=oe?ce:function(e){return function(){return ue.apply(e,arguments)}},he=function(e){return null==e},fe=he,pe=TypeError,me=function(e){if(fe(e))throw pe("Can't call method on "+e);return e},ve=me,ge=Object,Ae=function(e){return ge(ve(e))},be=Ae,ye=le({}.hasOwnProperty),_e=Object.hasOwn||function(e,t){return ye(be(e),t)},we=le,ke=0,xe=Math.random(),Ee=we(1..toString),De=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Ee(++ke+xe,36)},Se="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Re=K,Te=Se,Ie=Re.process,Ce=Re.Deno,Oe=Ie&&Ie.versions||Ce&&Ce.version,Pe=Oe&&Oe.v8;Pe&&(ae=(re=Pe.split("."))[0]>0&&re[0]<4?1:+(re[0]+re[1])),!ae&&Te&&(!(re=Te.match(/Edge\/(\d+)/))||re[1]>=74)&&(re=Te.match(/Chrome\/(\d+)/))&&(ae=+re[1]);var Le=ae,Be=Le,Ue=ie,Me=!!Object.getOwnPropertySymbols&&!Ue((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Be&&Be<41})),Fe=Me&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,je=K,Ge=Y.exports,Ne=_e,qe=De,He=Me,Ve=Fe,Qe=je.Symbol,ze=Ge("wks"),We=Ve?Qe.for||Qe:Qe&&Qe.withoutSetter||qe,Ke=function(e){return Ne(ze,e)||(ze[e]=He&&Ne(Qe,e)?Qe[e]:We("Symbol."+e)),ze[e]},Ye={};Ye[Ke("toStringTag")]="z";var Je="[object z]"===String(Ye),Xe="object"==typeof document&&document.all,Ze={all:Xe,IS_HTMLDDA:void 0===Xe&&void 0!==Xe},$e=Ze.all,et=Ze.IS_HTMLDDA?function(e){return"function"==typeof e||e===$e}:function(e){return"function"==typeof e},tt={},nt=!ie((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),rt=et,at=Ze.all,it=Ze.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:rt(e)||e===at}:function(e){return"object"==typeof e?null!==e:rt(e)},st=it,ot=K.document,dt=st(ot)&&st(ot.createElement),ut=function(e){return dt?ot.createElement(e):{}},ct=ut,lt=!nt&&!ie((function(){return 7!=Object.defineProperty(ct("div"),"a",{get:function(){return 7}}).a})),ht=nt&&ie((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ft=it,pt=String,mt=TypeError,vt=function(e){if(ft(e))return e;throw mt(pt(e)+" is not an object")},gt=se,At=Function.prototype.call,bt=gt?At.bind(At):function(){return At.apply(At,arguments)},yt=K,_t=et,wt=function(e,t){return arguments.length<2?(n=yt[e],_t(n)?n:void 0):yt[e]&&yt[e][t];var n},kt=le({}.isPrototypeOf),xt=wt,Et=et,Dt=kt,St=Object,Rt=Fe?function(e){return"symbol"==typeof e}:function(e){var t=xt("Symbol");return Et(t)&&Dt(t.prototype,St(e))},Tt=String,It=function(e){try{return Tt(e)}catch(e){return"Object"}},Ct=et,Ot=It,Pt=TypeError,Lt=function(e){if(Ct(e))return e;throw Pt(Ot(e)+" is not a function")},Bt=Lt,Ut=he,Mt=function(e,t){var n=e[t];return Ut(n)?void 0:Bt(n)},Ft=bt,jt=et,Gt=it,Nt=TypeError,qt=bt,Ht=it,Vt=Rt,Qt=Mt,zt=function(e,t){var n,r;if("string"===t&&jt(n=e.toString)&&!Gt(r=Ft(n,e)))return r;if(jt(n=e.valueOf)&&!Gt(r=Ft(n,e)))return r;if("string"!==t&&jt(n=e.toString)&&!Gt(r=Ft(n,e)))return r;throw Nt("Can't convert object to primitive value")},Wt=TypeError,Kt=Ke("toPrimitive"),Yt=function(e,t){if(!Ht(e)||Vt(e))return e;var n,r=Qt(e,Kt);if(r){if(void 0===t&&(t="default"),n=qt(r,e,t),!Ht(n)||Vt(n))return n;throw Wt("Can't convert object to primitive value")}return void 0===t&&(t="number"),zt(e,t)},Jt=Rt,Xt=function(e){var t=Yt(e,"string");return Jt(t)?t:t+""},Zt=nt,$t=lt,en=ht,tn=vt,nn=Xt,rn=TypeError,an=Object.defineProperty,sn=Object.getOwnPropertyDescriptor,on="enumerable",dn="configurable",un="writable";tt.f=Zt?en?function(e,t,n){if(tn(e),t=nn(t),tn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&un in n&&!n[un]){var r=sn(e,t);r&&r[un]&&(e[t]=n.value,n={configurable:dn in n?n[dn]:r[dn],enumerable:on in n?n[on]:r[on],writable:!1})}return an(e,t,n)}:an:function(e,t,n){if(tn(e),t=nn(t),tn(n),$t)try{return an(e,t,n)}catch(e){}if("get"in n||"set"in n)throw rn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var cn={exports:{}},ln=nt,hn=_e,fn=Function.prototype,pn=ln&&Object.getOwnPropertyDescriptor,mn=hn(fn,"name"),vn={EXISTS:mn,PROPER:mn&&"something"===function(){}.name,CONFIGURABLE:mn&&(!ln||ln&&pn(fn,"name").configurable)},gn=et,An=te,bn=le(Function.toString);gn(An.inspectSource)||(An.inspectSource=function(e){return bn(e)});var yn,_n,wn,kn=An.inspectSource,xn=et,En=K.WeakMap,Dn=xn(En)&&/native code/.test(String(En)),Sn=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Rn=tt,Tn=Sn,In=nt?function(e,t,n){return Rn.f(e,t,Tn(1,n))}:function(e,t,n){return e[t]=n,e},Cn=Y.exports,On=De,Pn=Cn("keys"),Ln=function(e){return Pn[e]||(Pn[e]=On(e))},Bn={},Un=Dn,Mn=K,Fn=it,jn=In,Gn=_e,Nn=te,qn=Ln,Hn=Bn,Vn="Object already initialized",Qn=Mn.TypeError,zn=Mn.WeakMap;if(Un||Nn.state){var Wn=Nn.state||(Nn.state=new zn);Wn.get=Wn.get,Wn.has=Wn.has,Wn.set=Wn.set,yn=function(e,t){if(Wn.has(e))throw Qn(Vn);return t.facade=e,Wn.set(e,t),t},_n=function(e){return Wn.get(e)||{}},wn=function(e){return Wn.has(e)}}else{var Kn=qn("state");Hn[Kn]=!0,yn=function(e,t){if(Gn(e,Kn))throw Qn(Vn);return t.facade=e,jn(e,Kn,t),t},_n=function(e){return Gn(e,Kn)?e[Kn]:{}},wn=function(e){return Gn(e,Kn)}}var Yn={set:yn,get:_n,has:wn,enforce:function(e){return wn(e)?_n(e):yn(e,{})},getterFor:function(e){return function(t){var n;if(!Fn(t)||(n=_n(t)).type!==e)throw Qn("Incompatible receiver, "+e+" required");return n}}},Jn=le,Xn=ie,Zn=et,$n=_e,er=nt,tr=vn.CONFIGURABLE,nr=kn,rr=Yn.enforce,ar=Yn.get,ir=String,sr=Object.defineProperty,or=Jn("".slice),dr=Jn("".replace),ur=Jn([].join),cr=er&&!Xn((function(){return 8!==sr((function(){}),"length",{value:8}).length})),lr=String(String).split("String"),hr=cn.exports=function(e,t,n){"Symbol("===or(ir(t),0,7)&&(t="["+dr(ir(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!$n(e,"name")||tr&&e.name!==t)&&(er?sr(e,"name",{value:t,configurable:!0}):e.name=t),cr&&n&&$n(n,"arity")&&e.length!==n.arity&&sr(e,"length",{value:n.arity});try{n&&$n(n,"constructor")&&n.constructor?er&&sr(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=rr(e);return $n(r,"source")||(r.source=ur(lr,"string"==typeof t?t:"")),e};Function.prototype.toString=hr((function(){return Zn(this)&&ar(this).source||nr(this)}),"toString");var fr=et,pr=tt,mr=cn.exports,vr=Z,gr=function(e,t,n,r){r||(r={});var a=r.enumerable,i=void 0!==r.name?r.name:t;if(fr(n)&&mr(n,i,r),r.global)a?e[t]=n:vr(t,n);else{try{r.unsafe?e[t]&&(a=!0):delete e[t]}catch(e){}a?e[t]=n:pr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},Ar=le,br=Ar({}.toString),yr=Ar("".slice),_r=function(e){return yr(br(e),8,-1)},wr=Je,kr=et,xr=_r,Er=Ke("toStringTag"),Dr=Object,Sr="Arguments"==xr(function(){return arguments}()),Rr=wr?xr:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Dr(e),Er))?n:Sr?xr(t):"Object"==(r=xr(t))&&kr(t.callee)?"Arguments":r},Tr=Rr,Ir=Je?{}.toString:function(){return"[object "+Tr(this)+"]"};Je||gr(Object.prototype,"toString",Ir,{unsafe:!0});var Cr={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Or=ut("span").classList,Pr=Or&&Or.constructor&&Or.constructor.prototype,Lr=Pr===Object.prototype?void 0:Pr,Br=_r,Ur=le,Mr=function(e){if("Function"===Br(e))return Ur(e)},Fr=Lt,jr=se,Gr=Mr(Mr.bind),Nr=function(e,t){return Fr(e),void 0===t?e:jr?Gr(e,t):function(){return e.apply(t,arguments)}},qr=ie,Hr=_r,Vr=Object,Qr=le("".split),zr=qr((function(){return!Vr("z").propertyIsEnumerable(0)}))?function(e){return"String"==Hr(e)?Qr(e,""):Vr(e)}:Vr,Wr=Math.ceil,Kr=Math.floor,Yr=Math.trunc||function(e){var t=+e;return(t>0?Kr:Wr)(t)},Jr=function(e){var t=+e;return t!=t||0===t?0:Yr(t)},Xr=Jr,Zr=Math.min,$r=function(e){return e>0?Zr(Xr(e),9007199254740991):0},ea=$r,ta=function(e){return ea(e.length)},na=_r,ra=Array.isArray||function(e){return"Array"==na(e)},aa=le,ia=ie,sa=et,oa=Rr,da=kn,ua=function(){},ca=[],la=wt("Reflect","construct"),ha=/^\s*(?:class|function)\b/,fa=aa(ha.exec),pa=!ha.exec(ua),ma=function(e){if(!sa(e))return!1;try{return la(ua,ca,e),!0}catch(e){return!1}},va=function(e){if(!sa(e))return!1;switch(oa(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return pa||!!fa(ha,da(e))}catch(e){return!0}};va.sham=!0;var ga=!la||ia((function(){var e;return ma(ma.call)||!ma(Object)||!ma((function(){e=!0}))||e}))?va:ma,Aa=ra,ba=ga,ya=it,_a=Ke("species"),wa=Array,ka=function(e){var t;return Aa(e)&&(t=e.constructor,(ba(t)&&(t===wa||Aa(t.prototype))||ya(t)&&null===(t=t[_a]))&&(t=void 0)),void 0===t?wa:t},xa=function(e,t){return new(ka(e))(0===t?0:t)},Ea=Nr,Da=zr,Sa=Ae,Ra=ta,Ta=xa,Ia=le([].push),Ca=function(e){var t=1==e,n=2==e,r=3==e,a=4==e,i=6==e,s=7==e,o=5==e||i;return function(d,u,c,l){for(var h,f,p=Sa(d),m=Da(p),v=Ea(u,c),g=Ra(m),A=0,b=l||Ta,y=t?b(d,g):n||s?b(d,0):void 0;g>A;A++)if((o||A in m)&&(f=v(h=m[A],A,p),e))if(t)y[A]=f;else if(f)switch(e){case 3:return!0;case 5:return h;case 6:return A;case 2:Ia(y,h)}else switch(e){case 4:return!1;case 7:Ia(y,h)}return i?-1:r||a?a:y}},Oa={forEach:Ca(0),map:Ca(1),filter:Ca(2),some:Ca(3),every:Ca(4),find:Ca(5),findIndex:Ca(6),filterReject:Ca(7)},Pa=ie,La=function(e,t){var n=[][e];return!!n&&Pa((function(){n.call(null,t||function(){return 1},1)}))},Ba=Oa.forEach,Ua=K,Ma=Cr,Fa=Lr,ja=La("forEach")?[].forEach:function(e){return Ba(this,e,arguments.length>1?arguments[1]:void 0)},Ga=In,Na=function(e){if(e&&e.forEach!==ja)try{Ga(e,"forEach",ja)}catch(t){e.forEach=ja}};for(var qa in Ma)Ma[qa]&&Na(Ua[qa]&&Ua[qa].prototype);Na(Fa);var Ha={},Va={},Qa={}.propertyIsEnumerable,za=Object.getOwnPropertyDescriptor,Wa=za&&!Qa.call({1:2},1);Va.f=Wa?function(e){var t=za(this,e);return!!t&&t.enumerable}:Qa;var Ka=zr,Ya=me,Ja=function(e){return Ka(Ya(e))},Xa=nt,Za=bt,$a=Va,ei=Sn,ti=Ja,ni=Xt,ri=_e,ai=lt,ii=Object.getOwnPropertyDescriptor;Ha.f=Xa?ii:function(e,t){if(e=ti(e),t=ni(t),ai)try{return ii(e,t)}catch(e){}if(ri(e,t))return ei(!Za($a.f,e,t),e[t])};var si={},oi=Jr,di=Math.max,ui=Math.min,ci=function(e,t){var n=oi(e);return n<0?di(n+t,0):ui(n,t)},li=Ja,hi=ci,fi=ta,pi=function(e){return function(t,n,r){var a,i=li(t),s=fi(i),o=hi(r,s);if(e&&n!=n){for(;s>o;)if((a=i[o++])!=a)return!0}else for(;s>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},mi={includes:pi(!0),indexOf:pi(!1)},vi=_e,gi=Ja,Ai=mi.indexOf,bi=Bn,yi=le([].push),_i=function(e,t){var n,r=gi(e),a=0,i=[];for(n in r)!vi(bi,n)&&vi(r,n)&&yi(i,n);for(;t.length>a;)vi(r,n=t[a++])&&(~Ai(i,n)||yi(i,n));return i},wi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ki=_i,xi=wi.concat("length","prototype");si.f=Object.getOwnPropertyNames||function(e){return ki(e,xi)};var Ei={};Ei.f=Object.getOwnPropertySymbols;var Di=wt,Si=si,Ri=Ei,Ti=vt,Ii=le([].concat),Ci=Di("Reflect","ownKeys")||function(e){var t=Si.f(Ti(e)),n=Ri.f;return n?Ii(t,n(e)):t},Oi=_e,Pi=Ci,Li=Ha,Bi=tt,Ui=function(e,t,n){for(var r=Pi(t),a=Bi.f,i=Li.f,s=0;s<r.length;s++){var o=r[s];Oi(e,o)||n&&Oi(n,o)||a(e,o,i(t,o))}},Mi=ie,Fi=et,ji=/#|\.prototype\./,Gi=function(e,t){var n=qi[Ni(e)];return n==Vi||n!=Hi&&(Fi(t)?Mi(t):!!t)},Ni=Gi.normalize=function(e){return String(e).replace(ji,".").toLowerCase()},qi=Gi.data={},Hi=Gi.NATIVE="N",Vi=Gi.POLYFILL="P",Qi=Gi,zi=K,Wi=Ha.f,Ki=In,Yi=gr,Ji=Z,Xi=Ui,Zi=Qi,$i=function(e,t){var n,r,a,i,s,o=e.target,d=e.global,u=e.stat;if(n=d?zi:u?zi[o]||Ji(o,{}):(zi[o]||{}).prototype)for(r in t){if(i=t[r],a=e.dontCallGetSet?(s=Wi(n,r))&&s.value:n[r],!Zi(d?r:o+(u?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;Xi(i,a)}(e.sham||a&&a.sham)&&Ki(i,"sham",!0),Yi(n,r,i,e)}},es=_i,ts=wi,ns=Object.keys||function(e){return es(e,ts)},rs=Ae,as=ns;$i({target:"Object",stat:!0,forced:ie((function(){as(1)}))},{keys:function(e){return as(rs(e))}});var is=Rr,ss=String,os=function(e){if("Symbol"===is(e))throw TypeError("Cannot convert a Symbol value to a string");return ss(e)},ds=vt,us=function(){var e=ds(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},cs=ie,ls=K.RegExp,hs=cs((function(){var e=ls("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),fs=hs||cs((function(){return!ls("a","y").sticky})),ps={BROKEN_CARET:hs||cs((function(){var e=ls("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:fs,UNSUPPORTED_Y:hs},ms={},vs=nt,gs=ht,As=tt,bs=vt,ys=Ja,_s=ns;ms.f=vs&&!gs?Object.defineProperties:function(e,t){bs(e);for(var n,r=ys(t),a=_s(t),i=a.length,s=0;i>s;)As.f(e,n=a[s++],r[n]);return e};var ws,ks=wt("document","documentElement"),xs=vt,Es=ms,Ds=wi,Ss=Bn,Rs=ks,Ts=ut,Is="prototype",Cs="script",Os=Ln("IE_PROTO"),Ps=function(){},Ls=function(e){return"<"+Cs+">"+e+"</"+Cs+">"},Bs=function(e){e.write(Ls("")),e.close();var t=e.parentWindow.Object;return e=null,t},Us=function(){try{ws=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Us="undefined"!=typeof document?document.domain&&ws?Bs(ws):(t=Ts("iframe"),n="java"+Cs+":",t.style.display="none",Rs.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Ls("document.F=Object")),e.close(),e.F):Bs(ws);for(var r=Ds.length;r--;)delete Us[Is][Ds[r]];return Us()};Ss[Os]=!0;var Ms=Object.create||function(e,t){var n;return null!==e?(Ps[Is]=xs(e),n=new Ps,Ps[Is]=null,n[Os]=e):n=Us(),void 0===t?n:Es.f(n,t)},Fs=ie,js=K.RegExp,Gs=Fs((function(){var e=js(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Ns=ie,Hs=K.RegExp,Vs=Ns((function(){var e=Hs("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Qs=bt,zs=le,Ws=os,Ks=us,Ys=ps,Js=Y.exports,Xs=Ms,Zs=Yn.get,$s=Gs,eo=Vs,to=Js("native-string-replace",String.prototype.replace),no=RegExp.prototype.exec,ro=no,ao=zs("".charAt),so=zs("".indexOf),oo=zs("".replace),uo=zs("".slice),co=function(){var e=/a/,t=/b*/g;return Qs(no,e,"a"),Qs(no,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),lo=Ys.BROKEN_CARET,ho=void 0!==/()??/.exec("")[1];(co||ho||lo||$s||eo)&&(ro=function(e){var t,n,r,a,i,s,o,d=this,u=Zs(d),c=Ws(e),l=u.raw;if(l)return l.lastIndex=d.lastIndex,t=Qs(ro,l,c),d.lastIndex=l.lastIndex,t;var h=u.groups,f=lo&&d.sticky,p=Qs(Ks,d),m=d.source,v=0,g=c;if(f&&(p=oo(p,"y",""),-1===so(p,"g")&&(p+="g"),g=uo(c,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==ao(c,d.lastIndex-1))&&(m="(?: "+m+")",g=" "+g,v++),n=new RegExp("^(?:"+m+")",p)),ho&&(n=new RegExp("^"+m+"$(?!\\s)",p)),co&&(r=d.lastIndex),a=Qs(no,f?n:d,g),f?a?(a.input=uo(a.input,v),a[0]=uo(a[0],v),a.index=d.lastIndex,d.lastIndex+=a[0].length):d.lastIndex=0:co&&a&&(d.lastIndex=d.global?a.index+a[0].length:r),ho&&a&&a.length>1&&Qs(to,a[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(a[i]=void 0)})),a&&h)for(a.groups=s=Xs(null),i=0;i<h.length;i++)s[(o=h[i])[0]]=a[o[1]];return a});var fo=ro;$i({target:"RegExp",proto:!0,forced:/./.exec!==fo},{exec:fo});var po=Array.isArray,mo=Object.prototype.toString,vo=po||function(e){return!!e&&"[object Array]"==mo.call(e)},go={name:"@bygd/gd-sdk-pes",version:"1.43.36",files:["dist/*"],scripts:{build:"NODE_ENV=production rollup --config",watch:"rollup --config --watch --sourcemap inline --environment DEVELOPMENT","deploy-base":"npm install && npm run build && npm publish --access public",deploy:"npm run deploy-base && gdtool pm-upload"},repository:{type:"git",url:"git@gitlab.azerdev.com:gamedistribution/gd-sdk-pes.git"},author:"",license:"ISC",devDependencies:{"@babel/core":"^7.14.6","@babel/plugin-transform-runtime":"^7.14.5","@babel/preset-env":"^7.14.7","@rollup/plugin-babel":"^5.2.3","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-replace":"^3.0.0",postcss:"^8.3.5",rollup:"^2.52.8","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-browsersync":"^1.3.3","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-polyfills":"^0.2.1","rollup-plugin-peer-deps-external":"^2.2.4","rollup-plugin-postcss":"^4.0.0","rollup-plugin-terser":"^7.0.2"},dependencies:{"@babel/runtime":"^7.14.6","@bygd/gd-sdk-era":"^0.3.6","@flownet/lib-connect-to-tcf":"^0.2.10","@fnet/inter-service-js":"^0.9.4",axios:"^0.26.1","can-autoplay":"^3.0.2",events:"^3.3.0","get-value":"^3.0.1","is-plain-object":"^5.0.0","is-valid-domain":"^0.1.2","js-base64":"^3.6.1","leaderboard-lib":"0.1.11","lodash.clonedeep":"^4.5.0","lodash.merge":"^4.6.2",querystringify:"^2.2.0","set-value":"^4.1.0","url-parse":"^1.4.7",uuid:"^8.3.2",validator:"^13.6.0","ua-parser-js":"^0.7.21"}},Ao=function(e){var t=bo("object"===R.default(e)?e:a.parseJSON(e));return t&&t.version?go.version>=t.version?t:void 0:t},bo=function(e){var t=this;if(!vo(e)||0===e.length)return e;if(1===e.length)return e[0];var n=0;e.forEach(function(e){S.default(this,t),e.weight=e.weight||1,n+=e.weight}.bind(this));var r=Math.floor(Math.random()*Math.floor(n));n=0;for(var a=0;a<e.length;a++){var i=e[a];if(r<(n+=i.weight))return i}};var yo=function(){},_o=function(){var e;(e=console).log.apply(e,arguments)},wo=function(){var e;(e=console).log.apply(e,arguments)};JSON.stringify({adapters:{default:["ima","adsense","ima","adsense"],preroll:["ima","adsense","ima","adsense"],midroll:["ima","adsense","ima","adsense"],rewarded:["ima","adsense","ima","adsense"]}}),JSON.stringify({adapters:{default:["ima","adsense","ima","adsense"],preroll:["ima","adsense","ima"],midroll:["ima","adsense","ima"],rewarded:["ima","adsense","ima","adsense"]}});var ko={},xo={},Eo=Xt,Do=tt,So=Sn,Ro=function(e,t,n){var r=Eo(t);r in e?Do.f(e,r,So(0,n)):e[r]=n},To=ci,Io=ta,Co=Ro,Oo=Array,Po=Math.max,Lo=function(e,t,n){for(var r=Io(e),a=To(t,r),i=To(void 0===n?r:n,r),s=Oo(Po(i-a,0)),o=0;a<i;a++,o++)Co(s,o,e[a]);return s.length=o,s},Bo=_r,Uo=Ja,Mo=si.f,Fo=Lo,jo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];xo.f=function(e){return jo&&"Window"==Bo(e)?function(e){try{return Mo(e)}catch(e){return Fo(jo)}}(e):Mo(Uo(e))};var Go=cn.exports,No=tt,qo=function(e,t,n){return n.get&&Go(n.get,t,{getter:!0}),n.set&&Go(n.set,t,{setter:!0}),No.f(e,t,n)},Ho={},Vo=Ke;Ho.f=Vo;var Qo=K,zo=_e,Wo=Ho,Ko=tt.f,Yo=function(e){var t=Qo.Symbol||(Qo.Symbol={});zo(t,e)||Ko(t,e,{value:Wo.f(e)})},Jo=bt,Xo=wt,Zo=Ke,$o=gr,ed=tt.f,td=_e,nd=Ke("toStringTag"),rd=function(e,t,n){e&&!n&&(e=e.prototype),e&&!td(e,nd)&&ed(e,nd,{configurable:!0,value:t})},ad=$i,id=K,sd=bt,od=le,dd=nt,ud=Me,cd=ie,ld=_e,hd=kt,fd=vt,pd=Ja,md=Xt,vd=os,gd=Sn,Ad=Ms,bd=ns,yd=si,_d=xo,wd=Ei,kd=Ha,xd=tt,Ed=ms,Dd=Va,Sd=gr,Rd=qo,Td=Y.exports,Id=Bn,Cd=De,Od=Ke,Pd=Ho,Ld=Yo,Bd=function(){var e=Xo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=Zo("toPrimitive");t&&!t[r]&&$o(t,r,(function(e){return Jo(n,this)}),{arity:1})},Ud=rd,Md=Yn,Fd=Oa.forEach,jd=Ln("hidden"),Gd="Symbol",Nd="prototype",qd=Md.set,Hd=Md.getterFor(Gd),Vd=Object[Nd],Qd=id.Symbol,zd=Qd&&Qd[Nd],Wd=id.TypeError,Kd=id.QObject,Yd=kd.f,Jd=xd.f,Xd=_d.f,Zd=Dd.f,$d=od([].push),eu=Td("symbols"),tu=Td("op-symbols"),nu=Td("wks"),ru=!Kd||!Kd[Nd]||!Kd[Nd].findChild,au=dd&&cd((function(){return 7!=Ad(Jd({},"a",{get:function(){return Jd(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Yd(Vd,t);r&&delete Vd[t],Jd(e,t,n),r&&e!==Vd&&Jd(Vd,t,r)}:Jd,iu=function(e,t){var n=eu[e]=Ad(zd);return qd(n,{type:Gd,tag:e,description:t}),dd||(n.description=t),n},su=function(e,t,n){e===Vd&&su(tu,t,n),fd(e);var r=md(t);return fd(n),ld(eu,r)?(n.enumerable?(ld(e,jd)&&e[jd][r]&&(e[jd][r]=!1),n=Ad(n,{enumerable:gd(0,!1)})):(ld(e,jd)||Jd(e,jd,gd(1,{})),e[jd][r]=!0),au(e,r,n)):Jd(e,r,n)},ou=function(e,t){fd(e);var n=pd(t),r=bd(n).concat(lu(n));return Fd(r,(function(t){dd&&!sd(du,n,t)||su(e,t,n[t])})),e},du=function(e){var t=md(e),n=sd(Zd,this,t);return!(this===Vd&&ld(eu,t)&&!ld(tu,t))&&(!(n||!ld(this,t)||!ld(eu,t)||ld(this,jd)&&this[jd][t])||n)},uu=function(e,t){var n=pd(e),r=md(t);if(n!==Vd||!ld(eu,r)||ld(tu,r)){var a=Yd(n,r);return!a||!ld(eu,r)||ld(n,jd)&&n[jd][r]||(a.enumerable=!0),a}},cu=function(e){var t=Xd(pd(e)),n=[];return Fd(t,(function(e){ld(eu,e)||ld(Id,e)||$d(n,e)})),n},lu=function(e){var t=e===Vd,n=Xd(t?tu:pd(e)),r=[];return Fd(n,(function(e){!ld(eu,e)||t&&!ld(Vd,e)||$d(r,eu[e])})),r};ud||(Sd(zd=(Qd=function(){if(hd(zd,this))throw Wd("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?vd(arguments[0]):void 0,t=Cd(e),n=function(e){this===Vd&&sd(n,tu,e),ld(this,jd)&&ld(this[jd],t)&&(this[jd][t]=!1),au(this,t,gd(1,e))};return dd&&ru&&au(Vd,t,{configurable:!0,set:n}),iu(t,e)})[Nd],"toString",(function(){return Hd(this).tag})),Sd(Qd,"withoutSetter",(function(e){return iu(Cd(e),e)})),Dd.f=du,xd.f=su,Ed.f=ou,kd.f=uu,yd.f=_d.f=cu,wd.f=lu,Pd.f=function(e){return iu(Od(e),e)},dd&&(Rd(zd,"description",{configurable:!0,get:function(){return Hd(this).description}}),Sd(Vd,"propertyIsEnumerable",du,{unsafe:!0}))),ad({global:!0,constructor:!0,wrap:!0,forced:!ud,sham:!ud},{Symbol:Qd}),Fd(bd(nu),(function(e){Ld(e)})),ad({target:Gd,stat:!0,forced:!ud},{useSetter:function(){ru=!0},useSimple:function(){ru=!1}}),ad({target:"Object",stat:!0,forced:!ud,sham:!dd},{create:function(e,t){return void 0===t?Ad(e):ou(Ad(e),t)},defineProperty:su,defineProperties:ou,getOwnPropertyDescriptor:uu}),ad({target:"Object",stat:!0,forced:!ud},{getOwnPropertyNames:cu}),Bd(),Ud(Qd,Gd),Id[jd]=!0;var hu=Me&&!!Symbol.for&&!!Symbol.keyFor,fu=$i,pu=wt,mu=_e,vu=os,gu=Y.exports,Au=hu,bu=gu("string-to-symbol-registry"),yu=gu("symbol-to-string-registry");fu({target:"Symbol",stat:!0,forced:!Au},{for:function(e){var t=vu(e);if(mu(bu,t))return bu[t];var n=pu("Symbol")(t);return bu[t]=n,yu[n]=t,n}});var _u=$i,wu=_e,ku=Rt,xu=It,Eu=hu,Du=(0,Y.exports)("symbol-to-string-registry");_u({target:"Symbol",stat:!0,forced:!Eu},{keyFor:function(e){if(!ku(e))throw TypeError(xu(e)+" is not a symbol");if(wu(Du,e))return Du[e]}});var Su=se,Ru=Function.prototype,Tu=Ru.apply,Iu=Ru.call,Cu="object"==typeof Reflect&&Reflect.apply||(Su?Iu.bind(Tu):function(){return Iu.apply(Tu,arguments)}),Ou=le([].slice),Pu=ra,Lu=et,Bu=_r,Uu=os,Mu=le([].push),Fu=$i,ju=wt,Gu=Cu,Nu=bt,qu=le,Hu=ie,Vu=et,Qu=Rt,zu=Ou,Wu=function(e){if(Lu(e))return e;if(Pu(e)){for(var t=e.length,n=[],r=0;r<t;r++){var a=e[r];"string"==typeof a?Mu(n,a):"number"!=typeof a&&"Number"!=Bu(a)&&"String"!=Bu(a)||Mu(n,Uu(a))}var i=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if(Pu(this))return t;for(var r=0;r<i;r++)if(n[r]===e)return t}}},Ku=Me,Yu=String,Ju=ju("JSON","stringify"),Xu=qu(/./.exec),Zu=qu("".charAt),$u=qu("".charCodeAt),ec=qu("".replace),tc=qu(1..toString),nc=/[\uD800-\uDFFF]/g,rc=/^[\uD800-\uDBFF]$/,ac=/^[\uDC00-\uDFFF]$/,ic=!Ku||Hu((function(){var e=ju("Symbol")();return"[null]"!=Ju([e])||"{}"!=Ju({a:e})||"{}"!=Ju(Object(e))})),sc=Hu((function(){return'"\\udf06\\ud834"'!==Ju("\udf06\ud834")||'"\\udead"'!==Ju("\udead")})),oc=function(e,t){var n=zu(arguments),r=Wu(t);if(Vu(r)||void 0!==e&&!Qu(e))return n[1]=function(e,t){if(Vu(r)&&(t=Nu(r,this,Yu(e),t)),!Qu(t))return t},Gu(Ju,null,n)},dc=function(e,t,n){var r=Zu(n,t-1),a=Zu(n,t+1);return Xu(rc,e)&&!Xu(ac,a)||Xu(ac,e)&&!Xu(rc,r)?"\\u"+tc($u(e,0),16):e};Ju&&Fu({target:"JSON",stat:!0,arity:3,forced:ic||sc},{stringify:function(e,t,n){var r=zu(arguments),a=Gu(ic?oc:Ju,null,r);return sc&&"string"==typeof a?ec(a,nc,dc):a}});var uc=Ei,cc=Ae;$i({target:"Object",stat:!0,forced:!Me||ie((function(){uc.f(1)}))},{getOwnPropertySymbols:function(e){var t=uc.f;return t?t(cc(e)):[]}});var lc=ie,hc=Le,fc=Ke("species"),pc=function(e){return hc>=51||!lc((function(){var t=[];return(t.constructor={})[fc]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},mc=Oa.filter;$i({target:"Array",proto:!0,forced:!pc("filter")},{filter:function(e){return mc(this,e,arguments.length>1?arguments[1]:void 0)}});var vc=$i,gc=ie,Ac=Ja,bc=Ha.f,yc=nt;vc({target:"Object",stat:!0,forced:!yc||gc((function(){bc(1)})),sham:!yc},{getOwnPropertyDescriptor:function(e,t){return bc(Ac(e),t)}});var _c=Ci,wc=Ja,kc=Ha,xc=Ro;$i({target:"Object",stat:!0,sham:!nt},{getOwnPropertyDescriptors:function(e){for(var t,n,r=wc(e),a=kc.f,i=_c(r),s={},o=0;i.length>o;)void 0!==(n=a(r,t=i[o++]))&&xc(s,t,n);return s}});var Ec=$i,Dc=ra,Sc=ga,Rc=it,Tc=ci,Ic=ta,Cc=Ja,Oc=Ro,Pc=Ke,Lc=Ou,Bc=pc("slice"),Uc=Pc("species"),Mc=Array,Fc=Math.max;Ec({target:"Array",proto:!0,forced:!Bc},{slice:function(e,t){var n,r,a,i=Cc(this),s=Ic(i),o=Tc(e,s),d=Tc(void 0===t?s:t,s);if(Dc(i)&&(n=i.constructor,(Sc(n)&&(n===Mc||Dc(n.prototype))||Rc(n)&&null===(n=n[Uc]))&&(n=void 0),n===Mc||void 0===n))return Lc(i,o,d);for(r=new(void 0===n?Mc:n)(Fc(d-o,0)),a=0;o<d;o++,a++)o in i&&Oc(r,a,i[o]);return r.length=a,r}});var jc=bt,Gc=vt,Nc=Mt,qc=function(e,t,n){var r,a;Gc(e);try{if(!(r=Nc(e,"return"))){if("throw"===t)throw n;return n}r=jc(r,e)}catch(e){a=!0,r=e}if("throw"===t)throw n;if(a)throw r;return Gc(r),n},Hc=vt,Vc=qc,Qc={},zc=Qc,Wc=Ke("iterator"),Kc=Array.prototype,Yc=function(e){return void 0!==e&&(zc.Array===e||Kc[Wc]===e)},Jc=Rr,Xc=Mt,Zc=he,$c=Qc,el=Ke("iterator"),tl=function(e){if(!Zc(e))return Xc(e,el)||Xc(e,"@@iterator")||$c[Jc(e)]},nl=bt,rl=Lt,al=vt,il=It,sl=tl,ol=TypeError,dl=function(e,t){var n=arguments.length<2?sl(e):t;if(rl(n))return al(nl(n,e));throw ol(il(e)+" is not iterable")},ul=Nr,cl=bt,ll=Ae,hl=function(e,t,n,r){try{return r?t(Hc(n)[0],n[1]):t(n)}catch(t){Vc(e,"throw",t)}},fl=Yc,pl=ga,ml=ta,vl=Ro,gl=dl,Al=tl,bl=Array,yl=function(e){var t=ll(e),n=pl(this),r=arguments.length,a=r>1?arguments[1]:void 0,i=void 0!==a;i&&(a=ul(a,r>2?arguments[2]:void 0));var s,o,d,u,c,l,h=Al(t),f=0;if(!h||this===bl&&fl(h))for(s=ml(t),o=n?new this(s):bl(s);s>f;f++)l=i?a(t[f],f):t[f],vl(o,f,l);else for(c=(u=gl(t,h)).next,o=n?new this:[];!(d=cl(c,u)).done;f++)l=i?hl(u,a,[d.value,f],!0):d.value,vl(o,f,l);return o.length=f,o},_l=Ke("iterator"),wl=!1;try{var kl=0,xl={next:function(){return{done:!!kl++}},return:function(){wl=!0}};xl[_l]=function(){return this},Array.from(xl,(function(){throw 2}))}catch(e){}var El=function(e,t){if(!t&&!wl)return!1;var n=!1;try{var r={};r[_l]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Dl=yl;$i({target:"Array",stat:!0,forced:!El((function(e){Array.from(e)}))},{from:Dl});var Sl,Rl,Tl,Il=le,Cl=Jr,Ol=os,Pl=me,Ll=Il("".charAt),Bl=Il("".charCodeAt),Ul=Il("".slice),Ml=function(e){return function(t,n){var r,a,i=Ol(Pl(t)),s=Cl(n),o=i.length;return s<0||s>=o?e?"":void 0:(r=Bl(i,s))<55296||r>56319||s+1===o||(a=Bl(i,s+1))<56320||a>57343?e?Ll(i,s):r:e?Ul(i,s,s+2):a-56320+(r-55296<<10)+65536}},Fl={codeAt:Ml(!1),charAt:Ml(!0)},jl=!ie((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Gl=_e,Nl=et,ql=Ae,Hl=jl,Vl=Ln("IE_PROTO"),Ql=Object,zl=Ql.prototype,Wl=Hl?Ql.getPrototypeOf:function(e){var t=ql(e);if(Gl(t,Vl))return t[Vl];var n=t.constructor;return Nl(n)&&t instanceof n?n.prototype:t instanceof Ql?zl:null},Kl=ie,Yl=et,Jl=it,Xl=Wl,Zl=gr,$l=Ke("iterator"),eh=!1;[].keys&&("next"in(Tl=[].keys())?(Rl=Xl(Xl(Tl)))!==Object.prototype&&(Sl=Rl):eh=!0);var th=!Jl(Sl)||Kl((function(){var e={};return Sl[$l].call(e)!==e}));th&&(Sl={}),Yl(Sl[$l])||Zl(Sl,$l,(function(){return this}));var nh={IteratorPrototype:Sl,BUGGY_SAFARI_ITERATORS:eh},rh=nh.IteratorPrototype,ah=Ms,ih=Sn,sh=rd,oh=Qc,dh=function(){return this},uh=function(e,t,n,r){var a=t+" Iterator";return e.prototype=ah(rh,{next:ih(+!r,n)}),sh(e,a,!1),oh[a]=dh,e},ch=le,lh=Lt,hh=et,fh=String,ph=TypeError,mh=function(e,t,n){try{return ch(lh(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},vh=vt,gh=function(e){if("object"==typeof e||hh(e))return e;throw ph("Can't set "+fh(e)+" as a prototype")},Ah=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=mh(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return vh(n),gh(r),t?e(n,r):n.__proto__=r,n}}():void 0),bh=$i,yh=bt,_h=et,wh=uh,kh=Wl,xh=Ah,Eh=rd,Dh=In,Sh=gr,Rh=Qc,Th=vn.PROPER,Ih=vn.CONFIGURABLE,Ch=nh.IteratorPrototype,Oh=nh.BUGGY_SAFARI_ITERATORS,Ph=Ke("iterator"),Lh="keys",Bh="values",Uh="entries",Mh=function(){return this},Fh=function(e,t,n,r,a,i,s){wh(n,t,r);var o,d,u,c=function(e){if(e===a&&m)return m;if(!Oh&&e in f)return f[e];switch(e){case Lh:case Bh:case Uh:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,f=e.prototype,p=f[Ph]||f["@@iterator"]||a&&f[a],m=!Oh&&p||c(a),v="Array"==t&&f.entries||p;if(v&&(o=kh(v.call(new e)))!==Object.prototype&&o.next&&(kh(o)!==Ch&&(xh?xh(o,Ch):_h(o[Ph])||Sh(o,Ph,Mh)),Eh(o,l,!0)),Th&&a==Bh&&p&&p.name!==Bh&&(Ih?Dh(f,"name",Bh):(h=!0,m=function(){return yh(p,this)})),a)if(d={values:c(Bh),keys:i?m:c(Lh),entries:c(Uh)},s)for(u in d)(Oh||h||!(u in f))&&Sh(f,u,d[u]);else bh({target:t,proto:!0,forced:Oh||h},d);return f[Ph]!==m&&Sh(f,Ph,m,{name:a}),Rh[t]=m,d},jh=function(e,t){return{value:e,done:t}},Gh=Fl.charAt,Nh=os,qh=Yn,Hh=Fh,Vh=jh,Qh="String Iterator",zh=qh.set,Wh=qh.getterFor(Qh);Hh(String,"String",(function(e){zh(this,{type:Qh,string:Nh(e),index:0})}),(function(){var e,t=Wh(this),n=t.string,r=t.index;return r>=n.length?Vh(void 0,!0):(e=Gh(n,r),t.index+=e.length,Vh(e,!1))}));var Kh=$i,Yh=nt,Jh=le,Xh=_e,Zh=et,$h=kt,ef=os,tf=qo,nf=Ui,rf=K.Symbol,af=rf&&rf.prototype;if(Yh&&Zh(rf)&&(!("description"in af)||void 0!==rf().description)){var sf={},of=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:ef(arguments[0]),t=$h(af,this)?new rf(e):void 0===e?rf():rf(e);return""===e&&(sf[t]=!0),t};nf(of,rf),of.prototype=af,af.constructor=of;var df="Symbol(test)"==String(rf("test")),uf=Jh(af.valueOf),cf=Jh(af.toString),lf=/^Symbol\((.*)\)[^)]+$/,hf=Jh("".replace),ff=Jh("".slice);tf(af,"description",{configurable:!0,get:function(){var e=uf(this);if(Xh(sf,e))return"";var t=cf(e),n=df?ff(t,7,-1):hf(t,lf,"$1");return""===n?void 0:n}}),Kh({global:!0,constructor:!0,forced:!0},{Symbol:of})}Yo("iterator");var pf=Ke,mf=Ms,vf=tt.f,gf=pf("unscopables"),Af=Array.prototype;null==Af[gf]&&vf(Af,gf,{configurable:!0,value:mf(null)});var bf=function(e){Af[gf][e]=!0},yf=Ja,_f=bf,wf=Qc,kf=Yn,xf=tt.f,Ef=Fh,Df=jh,Sf=nt,Rf="Array Iterator",Tf=kf.set,If=kf.getterFor(Rf),Cf=Ef(Array,"Array",(function(e,t){Tf(this,{type:Rf,target:yf(e),index:0,kind:t})}),(function(){var e=If(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,Df(void 0,!0)):Df("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),Of=wf.Arguments=wf.Array;if(_f("keys"),_f("values"),_f("entries"),Sf&&"values"!==Of.name)try{xf(Of,"name",{value:"values"})}catch(e){}var Pf=K,Lf=Cr,Bf=Lr,Uf=Cf,Mf=In,Ff=Ke,jf=Ff("iterator"),Gf=Ff("toStringTag"),Nf=Uf.values,qf=function(e,t){if(e){if(e[jf]!==Nf)try{Mf(e,jf,Nf)}catch(t){e[jf]=Nf}if(e[Gf]||Mf(e,Gf,t),Lf[t])for(var n in Uf)if(e[n]!==Uf[n])try{Mf(e,n,Uf[n])}catch(t){e[n]=Uf[n]}}};for(var Hf in Lf)qf(Pf[Hf]&&Pf[Hf].prototype,Hf);qf(Bf,"DOMTokenList");var Vf,Qf,zf,Wf,Kf="undefined"!=typeof process&&"process"==_r(process),Yf=wt,Jf=qo,Xf=nt,Zf=Ke("species"),$f=function(e){var t=Yf(e);Xf&&t&&!t[Zf]&&Jf(t,Zf,{configurable:!0,get:function(){return this}})},ep=kt,tp=TypeError,np=function(e,t){if(ep(t,e))return e;throw tp("Incorrect invocation")},rp=ga,ap=It,ip=TypeError,sp=vt,op=function(e){if(rp(e))return e;throw ip(ap(e)+" is not a constructor")},dp=he,up=Ke("species"),cp=function(e,t){var n,r=sp(e).constructor;return void 0===r||dp(n=sp(r)[up])?t:op(n)},lp=TypeError,hp=function(e,t){if(e<t)throw lp("Not enough arguments");return e},fp=/(?:ipad|iphone|ipod).*applewebkit/i.test(Se),pp=K,mp=Cu,vp=Nr,gp=et,Ap=_e,bp=ie,yp=ks,_p=Ou,wp=ut,kp=hp,xp=fp,Ep=Kf,Dp=pp.setImmediate,Sp=pp.clearImmediate,Rp=pp.process,Tp=pp.Dispatch,Ip=pp.Function,Cp=pp.MessageChannel,Op=pp.String,Pp=0,Lp={},Bp="onreadystatechange";bp((function(){Vf=pp.location}));var Up=function(e){if(Ap(Lp,e)){var t=Lp[e];delete Lp[e],t()}},Mp=function(e){return function(){Up(e)}},Fp=function(e){Up(e.data)},jp=function(e){pp.postMessage(Op(e),Vf.protocol+"//"+Vf.host)};Dp&&Sp||(Dp=function(e){kp(arguments.length,1);var t=gp(e)?e:Ip(e),n=_p(arguments,1);return Lp[++Pp]=function(){mp(t,void 0,n)},Qf(Pp),Pp},Sp=function(e){delete Lp[e]},Ep?Qf=function(e){Rp.nextTick(Mp(e))}:Tp&&Tp.now?Qf=function(e){Tp.now(Mp(e))}:Cp&&!xp?(Wf=(zf=new Cp).port2,zf.port1.onmessage=Fp,Qf=vp(Wf.postMessage,Wf)):pp.addEventListener&&gp(pp.postMessage)&&!pp.importScripts&&Vf&&"file:"!==Vf.protocol&&!bp(jp)?(Qf=jp,pp.addEventListener("message",Fp,!1)):Qf=Bp in wp("script")?function(e){yp.appendChild(wp("script"))[Bp]=function(){yp.removeChild(this),Up(e)}}:function(e){setTimeout(Mp(e),0)});var Gp={set:Dp,clear:Sp},Np=function(){this.head=null,this.tail=null};Np.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var qp,Hp,Vp,Qp,zp,Wp=Np,Kp=/ipad|iphone|ipod/i.test(Se)&&"undefined"!=typeof Pebble,Yp=/web0s(?!.*chrome)/i.test(Se),Jp=K,Xp=Nr,Zp=Ha.f,$p=Gp.set,em=Wp,tm=fp,nm=Kp,rm=Yp,am=Kf,im=Jp.MutationObserver||Jp.WebKitMutationObserver,sm=Jp.document,om=Jp.process,dm=Jp.Promise,um=Zp(Jp,"queueMicrotask"),cm=um&&um.value;if(!cm){var lm=new em,hm=function(){var e,t;for(am&&(e=om.domain)&&e.exit();t=lm.get();)try{t()}catch(e){throw lm.head&&qp(),e}e&&e.enter()};tm||am||rm||!im||!sm?!nm&&dm&&dm.resolve?((Qp=dm.resolve(void 0)).constructor=dm,zp=Xp(Qp.then,Qp),qp=function(){zp(hm)}):am?qp=function(){om.nextTick(hm)}:($p=Xp($p,Jp),qp=function(){$p(hm)}):(Hp=!0,Vp=sm.createTextNode(""),new im(hm).observe(Vp,{characterData:!0}),qp=function(){Vp.data=Hp=!Hp}),cm=function(e){lm.head||qp(),lm.add(e)}}var fm=cm,pm=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},mm=K.Promise,vm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,gm=!vm&&!Kf&&"object"==typeof window&&"object"==typeof document,Am=K,bm=mm,ym=et,_m=Qi,wm=kn,km=Ke,xm=gm,Em=vm,Dm=Le;bm&&bm.prototype;var Sm=km("species"),Rm=!1,Tm=ym(Am.PromiseRejectionEvent),Im=_m("Promise",(function(){var e=wm(bm),t=e!==String(bm);if(!t&&66===Dm)return!0;if(!Dm||Dm<51||!/native code/.test(e)){var n=new bm((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Sm]=r,!(Rm=n.then((function(){}))instanceof r))return!0}return!t&&(xm||Em)&&!Tm})),Cm={CONSTRUCTOR:Im,REJECTION_EVENT:Tm,SUBCLASSING:Rm},Om={},Pm=Lt,Lm=TypeError,Bm=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Lm("Bad Promise constructor");t=e,n=r})),this.resolve=Pm(t),this.reject=Pm(n)};Om.f=function(e){return new Bm(e)};var Um,Mm,Fm,jm=$i,Gm=Kf,Nm=K,qm=bt,Hm=gr,Vm=Ah,Qm=rd,zm=$f,Wm=Lt,Km=et,Ym=it,Jm=np,Xm=cp,Zm=Gp.set,$m=fm,ev=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},tv=pm,nv=Wp,rv=Yn,av=mm,iv=Om,sv="Promise",ov=Cm.CONSTRUCTOR,dv=Cm.REJECTION_EVENT,uv=Cm.SUBCLASSING,cv=rv.getterFor(sv),lv=rv.set,hv=av&&av.prototype,fv=av,pv=hv,mv=Nm.TypeError,vv=Nm.document,gv=Nm.process,Av=iv.f,bv=Av,yv=!!(vv&&vv.createEvent&&Nm.dispatchEvent),_v="unhandledrejection",wv=function(e){var t;return!(!Ym(e)||!Km(t=e.then))&&t},kv=function(e,t){var n,r,a,i=t.value,s=1==t.state,o=s?e.ok:e.fail,d=e.resolve,u=e.reject,c=e.domain;try{o?(s||(2===t.rejection&&Rv(t),t.rejection=1),!0===o?n=i:(c&&c.enter(),n=o(i),c&&(c.exit(),a=!0)),n===e.promise?u(mv("Promise-chain cycle")):(r=wv(n))?qm(r,n,d,u):d(n)):u(i)}catch(e){c&&!a&&c.exit(),u(e)}},xv=function(e,t){e.notified||(e.notified=!0,$m((function(){for(var n,r=e.reactions;n=r.get();)kv(n,e);e.notified=!1,t&&!e.rejection&&Dv(e)})))},Ev=function(e,t,n){var r,a;yv?((r=vv.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Nm.dispatchEvent(r)):r={promise:t,reason:n},!dv&&(a=Nm["on"+e])?a(r):e===_v&&ev("Unhandled promise rejection",n)},Dv=function(e){qm(Zm,Nm,(function(){var t,n=e.facade,r=e.value;if(Sv(e)&&(t=tv((function(){Gm?gv.emit("unhandledRejection",r,n):Ev(_v,n,r)})),e.rejection=Gm||Sv(e)?2:1,t.error))throw t.value}))},Sv=function(e){return 1!==e.rejection&&!e.parent},Rv=function(e){qm(Zm,Nm,(function(){var t=e.facade;Gm?gv.emit("rejectionHandled",t):Ev("rejectionhandled",t,e.value)}))},Tv=function(e,t,n){return function(r){e(t,r,n)}},Iv=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,xv(e,!0))},Cv=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw mv("Promise can't be resolved itself");var r=wv(t);r?$m((function(){var n={done:!1};try{qm(r,t,Tv(Cv,n,e),Tv(Iv,n,e))}catch(t){Iv(n,t,e)}})):(e.value=t,e.state=1,xv(e,!1))}catch(t){Iv({done:!1},t,e)}}};if(ov&&(pv=(fv=function(e){Jm(this,pv),Wm(e),qm(Um,this);var t=cv(this);try{e(Tv(Cv,t),Tv(Iv,t))}catch(e){Iv(t,e)}}).prototype,(Um=function(e){lv(this,{type:sv,done:!1,notified:!1,parent:!1,reactions:new nv,rejection:!1,state:0,value:void 0})}).prototype=Hm(pv,"then",(function(e,t){var n=cv(this),r=Av(Xm(this,fv));return n.parent=!0,r.ok=!Km(e)||e,r.fail=Km(t)&&t,r.domain=Gm?gv.domain:void 0,0==n.state?n.reactions.add(r):$m((function(){kv(r,n)})),r.promise})),Mm=function(){var e=new Um,t=cv(e);this.promise=e,this.resolve=Tv(Cv,t),this.reject=Tv(Iv,t)},iv.f=Av=function(e){return e===fv||undefined===e?new Mm(e):bv(e)},Km(av)&&hv!==Object.prototype)){Fm=hv.then,uv||Hm(hv,"then",(function(e,t){var n=this;return new fv((function(e,t){qm(Fm,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete hv.constructor}catch(e){}Vm&&Vm(hv,pv)}jm({global:!0,constructor:!0,wrap:!0,forced:ov},{Promise:fv}),Qm(fv,sv,!1),zm(sv);var Ov=Nr,Pv=bt,Lv=vt,Bv=It,Uv=Yc,Mv=ta,Fv=kt,jv=dl,Gv=tl,Nv=qc,qv=TypeError,Hv=function(e,t){this.stopped=e,this.result=t},Vv=Hv.prototype,Qv=function(e,t,n){var r,a,i,s,o,d,u,c=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),f=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),m=Ov(t,c),v=function(e){return r&&Nv(r,"normal",e),new Hv(!0,e)},g=function(e){return l?(Lv(e),p?m(e[0],e[1],v):m(e[0],e[1])):p?m(e,v):m(e)};if(h)r=e.iterator;else if(f)r=e;else{if(!(a=Gv(e)))throw qv(Bv(e)+" is not iterable");if(Uv(a)){for(i=0,s=Mv(e);s>i;i++)if((o=g(e[i]))&&Fv(Vv,o))return o;return new Hv(!1)}r=jv(e,a)}for(d=h?e.next:r.next;!(u=Pv(d,r)).done;){try{o=g(u.value)}catch(e){Nv(r,"throw",e)}if("object"==typeof o&&o&&Fv(Vv,o))return o}return new Hv(!1)},zv=mm,Wv=Cm.CONSTRUCTOR||!El((function(e){zv.all(e).then(void 0,(function(){}))})),Kv=bt,Yv=Lt,Jv=Om,Xv=pm,Zv=Qv;$i({target:"Promise",stat:!0,forced:Wv},{all:function(e){var t=this,n=Jv.f(t),r=n.resolve,a=n.reject,i=Xv((function(){var n=Yv(t.resolve),i=[],s=0,o=1;Zv(e,(function(e){var d=s++,u=!1;o++,Kv(n,t,e).then((function(e){u||(u=!0,i[d]=e,--o||r(i))}),a)})),--o||r(i)}));return i.error&&a(i.value),n.promise}});var $v=$i,eg=Cm.CONSTRUCTOR,tg=mm,ng=wt,rg=et,ag=gr,ig=tg&&tg.prototype;if($v({target:"Promise",proto:!0,forced:eg,real:!0},{catch:function(e){return this.then(void 0,e)}}),rg(tg)){var sg=ng("Promise").prototype.catch;ig.catch!==sg&&ag(ig,"catch",sg,{unsafe:!0})}var og=bt,dg=Lt,ug=Om,cg=pm,lg=Qv;$i({target:"Promise",stat:!0,forced:Wv},{race:function(e){var t=this,n=ug.f(t),r=n.reject,a=cg((function(){var a=dg(t.resolve);lg(e,(function(e){og(a,t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}});var hg=bt,fg=Om;$i({target:"Promise",stat:!0,forced:Cm.CONSTRUCTOR},{reject:function(e){var t=fg.f(this);return hg(t.reject,void 0,e),t.promise}});var pg=vt,mg=it,vg=Om,gg=function(e,t){if(pg(e),mg(t)&&t.constructor===e)return t;var n=vg.f(e);return(0,n.resolve)(t),n.promise},Ag=$i,bg=Cm.CONSTRUCTOR,yg=gg;wt("Promise"),Ag({target:"Promise",stat:!0,forced:bg},{resolve:function(e){return yg(this,e)}});var _g=TypeError,wg=$i,kg=ie,xg=ra,Eg=it,Dg=Ae,Sg=ta,Rg=function(e){if(e>9007199254740991)throw _g("Maximum allowed index exceeded");return e},Tg=Ro,Ig=xa,Cg=pc,Og=Le,Pg=Ke("isConcatSpreadable"),Lg=Og>=51||!kg((function(){var e=[];return e[Pg]=!1,e.concat()[0]!==e})),Bg=function(e){if(!Eg(e))return!1;var t=e[Pg];return void 0!==t?!!t:xg(e)};wg({target:"Array",proto:!0,arity:1,forced:!Lg||!Cg("concat")},{concat:function(e){var t,n,r,a,i,s=Dg(this),o=Ig(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(Bg(i=-1===t?s:arguments[t]))for(a=Sg(i),Rg(d+a),n=0;n<a;n++,d++)n in i&&Tg(o,d,i[n]);else Rg(d+1),Tg(o,d++,i);return o.length=d,o}});var Ug=nt,Mg=vn.EXISTS,Fg=le,jg=qo,Gg=Function.prototype,Ng=Fg(Gg.toString),qg=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Hg=Fg(qg.exec);function Vg(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Qg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qg(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function Qg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zg(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Ug&&!Mg&&jg(Gg,"name",{configurable:!0,get:function(){try{return Hg(qg,Ng(this))[1]}catch(e){return""}}});var Kg,Yg={react:{src:"https://pm.azerioncircle.com/react/16.14.0/umd/react.production.min.js",name:"React"},"react-dom":{src:"https://pm.azerioncircle.com/react-dom/16.14.0/umd/react-dom.production.min.js",name:"ReactDOM"},redux:{src:"https://pm.azerioncircle.com/redux/4.0.5/dist/redux.min.js",name:"Redux"},"react-redux":{src:"https://pm.azerioncircle.com/react-redux/7.2.1/dist/react-redux.min.js",name:"ReactRedux"},"material-ui-core":{src:"https://pm.azerioncircle.com/@material-ui/core/4.11.3/umd/material-ui.production.min.js",name:"MaterialUI"}},Jg={},Xg=function(e,t){Jg[e]=Wg(Wg({},t),{},{isLoading:!1})},Zg=function(e){var t=this,n=e.id,r=e.src;return new Promise(function(e,a){if(S.default(this,t),document.getElementById(n))e();else{var i=document.createElement("script");i.onload=function(){e()},i.id=n,i.setAttribute("crossorigin",!0),i.src=r,document.head.appendChild(i)}}.bind(this))},$g=function(){var e=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=window[t])){e.next=3;break}return e.abrupt("return",n);case 3:if(!(r=Jg[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:r.isLoading=!0,a=Vg(r.dependencies),e.prev=8,a.s();case 10:if((i=a.n()).done){e.next=26;break}if(s=i.value,e.prev=12,o=Yg[s].name,!window[o]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,Zg({id:s,src:Yg[s].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),d=s.id,u=s.src,console.log("Could not load external script ".concat(d," ").concat(u),e.t0);case 24:e.next=10;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(8),a.e(e.t1);case 31:return e.prev=31,a.f(),e.finish(31);case 34:return e.prev=34,e.next=37,Zg({id:t,src:r.source});case 37:n=window[t],e.next=43;break;case 40:e.prev=40,e.t2=e.catch(34),console.log("Could not load module ".concat(t," ").concat(r.source,"."),e.t2);case 43:return r.isLoading=!1,e.abrupt("return",n);case 45:case"end":return e.stop()}}),e,null,[[8,28,31,34],[12,20],[34,40]])})));return function(t){return e.apply(this,arguments)}}(),eA=I.default((function e(){var t=this;C.default(this,e),O.default(this,"load",D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$g("Leaderboard");case 2:t.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),O.default(this,"showLeaderboard",function(){var e=D.default(T.default.mark((function e(n){var r;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=window.GD_OPTIONS.gameId,t.leaderboard){e.next=4;break}return e.next=4,t.load();case 4:t.leaderboard.showLeaderBoard(r,n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),O.default(this,"addScore",function(){var e=D.default(T.default.mark((function e(n){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.leaderboard){e.next=3;break}return e.next=3,t.load();case 3:t.leaderboard.addScore(n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),this.moduleName="Leaderboard",this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/gd-sdk-leaderboard/0.1.43/dist/default/iife/index.js",dependencies:["react","react-dom","redux","react-redux","material-ui-core"]},Xg(this.moduleName,this.moduleConfig)})),tA=new eA,nA=it,rA=_r,aA=Ke("match"),iA=function(e){var t;return nA(e)&&(void 0!==(t=e[aA])?!!t:"RegExp"==rA(e))},sA=iA,oA=TypeError,dA=function(e){if(sA(e))throw oA("The method doesn't accept regular expressions");return e},uA=Ke("match"),cA=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[uA]=!1,"/./"[e](t)}catch(e){}}return!1},lA=$i,hA=Mr,fA=Ha.f,pA=$r,mA=os,vA=dA,gA=me,AA=cA,bA=hA("".startsWith),yA=hA("".slice),_A=Math.min,wA=AA("startsWith");lA({target:"String",proto:!0,forced:!!(wA||(Kg=fA(String.prototype,"startsWith"),!Kg||Kg.writable))&&!wA},{startsWith:function(e){var t=mA(gA(this));vA(e);var n=pA(_A(arguments.length>1?arguments[1]:void 0,t.length)),r=mA(e);return bA?bA(t,r,n):yA(t,n,n+r.length)===r}});var kA=bt,xA=_e,EA=kt,DA=us,SA=RegExp.prototype,RA=function(e){var t=e.flags;return void 0!==t||"flags"in SA||xA(e,"flags")||!EA(SA,e)?t:kA(DA,e)},TA=vn.PROPER,IA=gr,CA=vt,OA=os,PA=ie,LA=RA,BA="toString",UA=RegExp.prototype[BA],MA=PA((function(){return"/a/b"!=UA.call({source:"a",flags:"b"})})),FA=TA&&UA.name!=BA;(MA||FA)&&IA(RegExp.prototype,BA,(function(){var e=CA(this);return"/"+OA(e.source)+"/"+OA(LA(e))}),{unsafe:!0});var jA=Mr,GA=gr,NA=fo,qA=ie,HA=Ke,VA=In,QA=HA("species"),zA=RegExp.prototype,WA=function(e,t,n,r){var a=HA(e),i=!qA((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=i&&!qA((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[QA]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!i||!s||n){var o=jA(/./[a]),d=t(a,""[e],(function(e,t,n,r,a){var s=jA(e),d=t.exec;return d===NA||d===zA.exec?i&&!a?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));GA(String.prototype,e,d[0]),GA(zA,a,d[1])}r&&VA(zA[a],"sham",!0)},KA=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},YA=bt,JA=vt,XA=et,ZA=_r,$A=fo,eb=TypeError,tb=function(e,t){var n=e.exec;if(XA(n)){var r=YA(n,e,t);return null!==r&&JA(r),r}if("RegExp"===ZA(e))return YA($A,e,t);throw eb("RegExp#exec called on incompatible receiver")},nb=bt,rb=vt,ab=he,ib=me,sb=KA,ob=os,db=Mt,ub=tb;function cb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cb(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}WA("search",(function(e,t,n){return[function(t){var n=ib(this),r=ab(t)?void 0:db(t,e);return r?nb(r,t,n):new RegExp(t)[e](ob(n))},function(e){var r=rb(this),a=ob(e),i=n(t,r,a);if(i.done)return i.value;var s=r.lastIndex;sb(s,0)||(r.lastIndex=0);var o=ub(r,a);return sb(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var hb,fb,pb=function(){function e(){C.default(this,e)}return I.default(e,[{key:"getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),d=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",p);var m=(e||n)&&r.loaderEnabled,v=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:d,noLoadedEvent:u,noBlockerEvent:c,noPreroll:m,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:l,noLotamePageView:h,noGamedockSDK:f,noMinijuegosSDK:p,version:r.version,pauseGameOnStartup:v,depth:a.getIframeDepth(),domainMatched:s===o,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_isTokenGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isLoaderGameURL",value:function(){return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)&&location.href.startsWith("https://html5.gamedistribution.com")}},{key:"_getTokenGameURLConfig",value:function(){try{var e,t=/http[s]?:\/\/html5\.gamedistribution\.com\/[A-Za-z0-9]{8}\/[A-Fa-f0-9]{32}\/.*/i;if(t.test(location.href)){var n=new P.default(location.href,!0);if(!n.query.gd_zone_config)return;e=n.query.gd_zone_config}else if(t.test(document.referrer)){var r=new P.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new P.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(u.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(u.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new P.default(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(qs.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new P.default(e,!0);return n.query=lb(lb({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return u.Base64.encode(JSON.stringify(e))}}]),e}(),mb=function(){try{return(new pb).getBridgeContext()}catch(e){return{}}}(),vb={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(hb=!1,(fb=a.getQueryParams("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===fb.xanthophyll&&(hb=!0),hb)},gb=Fl.charAt,Ab=le,bb=Ae,yb=Math.floor,_b=Ab("".charAt),wb=Ab("".replace),kb=Ab("".slice),xb=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Eb=/\$([$&'`]|\d{1,2})/g,Db=Cu,Sb=bt,Rb=le,Tb=WA,Ib=ie,Cb=vt,Ob=et,Pb=he,Lb=Jr,Bb=$r,Ub=os,Mb=me,Fb=function(e,t,n){return t+(n?gb(e,t).length:1)},jb=Mt,Gb=function(e,t,n,r,a,i){var s=n+e.length,o=r.length,d=Eb;return void 0!==a&&(a=bb(a),d=xb),wb(i,d,(function(i,d){var u;switch(_b(d,0)){case"$":return"$";case"&":return e;case"`":return kb(t,0,n);case"'":return kb(t,s);case"<":u=a[kb(d,1,-1)];break;default:var c=+d;if(0===c)return i;if(c>o){var l=yb(c/10);return 0===l?i:l<=o?void 0===r[l-1]?_b(d,1):r[l-1]+_b(d,1):i}u=r[c-1]}return void 0===u?"":u}))},Nb=tb,qb=Ke("replace"),Hb=Math.max,Vb=Math.min,Qb=Rb([].concat),zb=Rb([].push),Wb=Rb("".indexOf),Kb=Rb("".slice),Yb="$0"==="a".replace(/./,"$0"),Jb=!!/./[qb]&&""===/./[qb]("a","$0");Tb("replace",(function(e,t,n){var r=Jb?"$":"$0";return[function(e,n){var r=Mb(this),a=Pb(e)?void 0:jb(e,qb);return a?Sb(a,e,r,n):Sb(t,Ub(r),e,n)},function(e,a){var i=Cb(this),s=Ub(e);if("string"==typeof a&&-1===Wb(a,r)&&-1===Wb(a,"$<")){var o=n(t,i,s,a);if(o.done)return o.value}var d=Ob(a);d||(a=Ub(a));var u=i.global;if(u){var c=i.unicode;i.lastIndex=0}for(var l=[];;){var h=Nb(i,s);if(null===h)break;if(zb(l,h),!u)break;""===Ub(h[0])&&(i.lastIndex=Fb(s,Bb(i.lastIndex),c))}for(var f,p="",m=0,v=0;v<l.length;v++){for(var g=Ub((h=l[v])[0]),A=Hb(Vb(Lb(h.index),s.length),0),b=[],y=1;y<h.length;y++)zb(b,void 0===(f=h[y])?f:String(f));var _=h.groups;if(d){var w=Qb([g],b,A,s);void 0!==_&&zb(w,_);var k=Ub(Db(a,void 0,w))}else k=Gb(g,s,A,b,_,a);A>=m&&(p+=Kb(s,m,A)+k,m=A+g.length)}return p+Kb(s,m)}]}),!!Ib((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Yb||Jb);var Xb=ie,Zb=nt,$b=Ke("iterator"),ey=!Xb((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.size&&!Zb||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[$b]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),ty=gr,ny=Lo,ry=Math.floor,ay=function(e,t){var n=e.length,r=ry(n/2);return n<8?iy(e,t):sy(e,ay(ny(e,0,r),t),ay(ny(e,r),t),t)},iy=function(e,t){for(var n,r,a=e.length,i=1;i<a;){for(r=i,n=e[i];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},sy=function(e,t,n,r){for(var a=t.length,i=n.length,s=0,o=0;s<a||o<i;)e[s+o]=s<a&&o<i?r(t[s],n[o])<=0?t[s++]:n[o++]:s<a?t[s++]:n[o++];return e},oy=$i,dy=K,uy=bt,cy=le,ly=nt,hy=ey,fy=gr,py=qo,my=function(e,t,n){for(var r in t)ty(e,r,t[r],n);return e},vy=rd,gy=uh,Ay=Yn,by=np,yy=et,_y=_e,wy=Nr,ky=Rr,xy=vt,Ey=it,Dy=os,Sy=Ms,Ry=Sn,Ty=dl,Iy=tl,Cy=hp,Oy=ay,Py=Ke("iterator"),Ly="URLSearchParams",By=Ly+"Iterator",Uy=Ay.set,My=Ay.getterFor(Ly),Fy=Ay.getterFor(By),jy=Object.getOwnPropertyDescriptor,Gy=function(e){if(!ly)return dy[e];var t=jy(dy,e);return t&&t.value},Ny=Gy("fetch"),qy=Gy("Request"),Hy=Gy("Headers"),Vy=qy&&qy.prototype,Qy=Hy&&Hy.prototype,zy=dy.RegExp,Wy=dy.TypeError,Ky=dy.decodeURIComponent,Yy=dy.encodeURIComponent,Jy=cy("".charAt),Xy=cy([].join),Zy=cy([].push),$y=cy("".replace),e_=cy([].shift),t_=cy([].splice),n_=cy("".split),r_=cy("".slice),a_=/\+/g,i_=Array(4),s_=function(e){return i_[e-1]||(i_[e-1]=zy("((?:%[\\da-f]{2}){"+e+"})","gi"))},o_=function(e){try{return Ky(e)}catch(t){return e}},d_=function(e){var t=$y(e,a_," "),n=4;try{return Ky(t)}catch(e){for(;n;)t=$y(t,s_(n--),o_);return t}},u_=/[!'()~]|%20/g,c_={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},l_=function(e){return c_[e]},h_=function(e){return $y(Yy(e),u_,l_)},f_=gy((function(e,t){Uy(this,{type:By,iterator:Ty(My(e).entries),kind:t})}),"Iterator",(function(){var e=Fy(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),p_=function(e){this.entries=[],this.url=null,void 0!==e&&(Ey(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Jy(e,0)?r_(e,1):e:Dy(e)))};p_.prototype={type:Ly,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,a,i,s,o,d=Iy(e);if(d)for(n=(t=Ty(e,d)).next;!(r=uy(n,t)).done;){if(i=(a=Ty(xy(r.value))).next,(s=uy(i,a)).done||(o=uy(i,a)).done||!uy(i,a).done)throw Wy("Expected sequence with length 2");Zy(this.entries,{key:Dy(s.value),value:Dy(o.value)})}else for(var u in e)_y(e,u)&&Zy(this.entries,{key:u,value:Dy(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=n_(e,"&"),a=0;a<r.length;)(t=r[a++]).length&&(n=n_(t,"="),Zy(this.entries,{key:d_(e_(n)),value:d_(Xy(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Zy(n,h_(e.key)+"="+h_(e.value));return Xy(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var m_=function(){by(this,v_);var e=Uy(this,new p_(arguments.length>0?arguments[0]:void 0));ly||(this.length=e.entries.length)},v_=m_.prototype;if(my(v_,{append:function(e,t){Cy(arguments.length,2);var n=My(this);Zy(n.entries,{key:Dy(e),value:Dy(t)}),ly||this.length++,n.updateURL()},delete:function(e){Cy(arguments.length,1);for(var t=My(this),n=t.entries,r=Dy(e),a=0;a<n.length;)n[a].key===r?t_(n,a,1):a++;ly||(this.length=n.length),t.updateURL()},get:function(e){Cy(arguments.length,1);for(var t=My(this).entries,n=Dy(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){Cy(arguments.length,1);for(var t=My(this).entries,n=Dy(e),r=[],a=0;a<t.length;a++)t[a].key===n&&Zy(r,t[a].value);return r},has:function(e){Cy(arguments.length,1);for(var t=My(this).entries,n=Dy(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){Cy(arguments.length,1);for(var n,r=My(this),a=r.entries,i=!1,s=Dy(e),o=Dy(t),d=0;d<a.length;d++)(n=a[d]).key===s&&(i?t_(a,d--,1):(i=!0,n.value=o));i||Zy(a,{key:s,value:o}),ly||(this.length=a.length),r.updateURL()},sort:function(){var e=My(this);Oy(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=My(this).entries,r=wy(e,arguments.length>1?arguments[1]:void 0),a=0;a<n.length;)r((t=n[a++]).value,t.key,this)},keys:function(){return new f_(this,"keys")},values:function(){return new f_(this,"values")},entries:function(){return new f_(this,"entries")}},{enumerable:!0}),fy(v_,Py,v_.entries,{name:"entries"}),fy(v_,"toString",(function(){return My(this).serialize()}),{enumerable:!0}),ly&&py(v_,"size",{get:function(){return My(this).entries.length},configurable:!0,enumerable:!0}),vy(m_,Ly),oy({global:!0,constructor:!0,forced:!hy},{URLSearchParams:m_}),!hy&&yy(Hy)){var g_=cy(Qy.has),A_=cy(Qy.set),b_=function(e){if(Ey(e)){var t,n=e.body;if(ky(n)===Ly)return t=e.headers?new Hy(e.headers):new Hy,g_(t,"content-type")||A_(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Sy(e,{body:Ry(0,Dy(n)),headers:Ry(0,t)})}return e};if(yy(Ny)&&oy({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Ny(e,arguments.length>1?b_(arguments[1]):{})}}),yy(qy)){var y_=function(e){return by(this,Vy),new qy(e,arguments.length>1?b_(arguments[1]):{})};Vy.constructor=y_,y_.prototype=Vy,oy({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:y_})}}var __={URLSearchParams:m_,getState:My},w_=mi.includes,k_=bf;$i({target:"Array",proto:!0,forced:ie((function(){return!Array(1).includes()}))},{includes:function(e){return w_(this,e,arguments.length>1?arguments[1]:void 0)}}),k_("includes");var x_=$i,E_=dA,D_=me,S_=os,R_=cA,T_=le("".indexOf);function I_(e){var t=this,n={},r=(null==e?void 0:e._ancestor_origins)||window.location.ancestorOrigins,a=(null==e?void 0:e.self_url)||window.location.href,i=(null==e?void 0:e.self_origin)||window.location.origin,s=(null==e?void 0:e.referrer_url)||document.referrer;function o(e){return U.default(n,e)}function d(e,t){return M.default(n,e,t)}function u(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new P.default(e,t)}catch(e){console.log(e)}}function c(){for(var t=(null==e?void 0:e.urls)||[a,s],n=0;n<t.length;n++){var r,i=u(t[n]);if(i){var o=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(o&&(o=(o=decodeURIComponent(o)).startsWith("https://")||o.startsWith("http://")?o:"https://".concat(o),L.default.isURL(o)))return o}}}return function(){var e;S.default(this,t),function(){var e=0,t=window;try{for(;t!=t.parent;)e++,t=t.parent}catch(e){d("depth.error",e.message)}d("depth.value",e)}(),function(){var e=r,t=n.depth.value,a=i;if(d("top.domain.from","fallback"),e&&e.length>0)a=e[e.length-1],d("top.domain.from","origins");else if(0===t)a=i,d("top.domain.from","self-top");else if(1===t){var o=u(s);o&&(a=o.origin,d("top.domain.from","referrer"))}d("top.domain.value",a.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=c();if(e)if(B.default(e))d("partner.domain.value",e),d("partner.domain.from","partner-domain");else{var t=u(e,!1);if(t)d("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),d("partner.domain.from","partner-url");else d("partner.domain.value",n.top.domain.value),d("partner.domain.from","partner-fallback")}else d("partner.domain.value",n.top.domain.value),d("partner.domain.from","fallback")}(),e=c(),0===n.depth.value?(d("partner.url.value",a),d("partner.url.from","self-top")):e?B.default(e)?(d("partner.url.value",a),d("partner.url.from","partner-domain")):(d("partner.url.value",e),d("partner.url.from","partner-url")):(d("partner.url.value",s),d("partner.url.from","fallback"))}.bind(this)(),{get:o,print:function(e){console.log(o(e))}}}x_({target:"String",proto:!0,forced:!R_("includes")},{includes:function(e){return!!~T_(S_(D_(this)),S_(E_(e)),arguments.length>1?arguments[1]:void 0)}});var C_="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==C_&&C_,O_={searchParams:"URLSearchParams"in C_,iterable:"Symbol"in C_&&"iterator"in Symbol,blob:"FileReader"in C_&&"Blob"in C_&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in C_,arrayBuffer:"ArrayBuffer"in C_};if(O_.arrayBuffer)var P_=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],L_=ArrayBuffer.isView||function(e){return e&&P_.indexOf(Object.prototype.toString.call(e))>-1};function B_(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function U_(e){return"string"!=typeof e&&(e=String(e)),e}function M_(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return O_.iterable&&(t[Symbol.iterator]=function(){return t}),t}function F_(e){this.map={},e instanceof F_?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function j_(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function G_(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function N_(e){var t=new FileReader,n=G_(t);return t.readAsArrayBuffer(e),n}function q_(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function H_(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:O_.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:O_.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:O_.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():O_.arrayBuffer&&O_.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=q_(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):O_.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||L_(e))?this._bodyArrayBuffer=q_(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):O_.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},O_.blob&&(this.blob=function(){var e=j_(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=j_(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(N_)}),this.text=function(){var e=j_(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=G_(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},O_.formData&&(this.formData=function(){return this.text().then(z_)}),this.json=function(){return this.text().then(JSON.parse)},this}F_.prototype.append=function(e,t){e=B_(e),t=U_(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},F_.prototype.delete=function(e){delete this.map[B_(e)]},F_.prototype.get=function(e){return e=B_(e),this.has(e)?this.map[e]:null},F_.prototype.has=function(e){return this.map.hasOwnProperty(B_(e))},F_.prototype.set=function(e,t){this.map[B_(e)]=U_(t)},F_.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},F_.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),M_(e)},F_.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),M_(e)},F_.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),M_(e)},O_.iterable&&(F_.prototype[Symbol.iterator]=F_.prototype.entries);var V_=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Q_(e,t){if(!(this instanceof Q_))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n=(t=t||{}).body;if(e instanceof Q_){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new F_(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new F_(t.headers)),this.method=function(e){var t=e.toUpperCase();return V_.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function z_(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),a=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(a))}})),t}function W_(e,t){if(!(this instanceof W_))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new F_(t.headers),this.url=t.url||"",this._initBody(e)}Q_.prototype.clone=function(){return new Q_(this,{body:this._bodyInit})},H_.call(Q_.prototype),H_.call(W_.prototype),W_.prototype.clone=function(){return new W_(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new F_(this.headers),url:this.url})},W_.error=function(){var e=new W_(null,{status:0,statusText:""});return e.type="error",e};var K_=[301,302,303,307,308];W_.redirect=function(e,t){if(-1===K_.indexOf(t))throw new RangeError("Invalid status code");return new W_(null,{status:t,headers:{location:e}})};var Y_,J_=C_.DOMException;try{new J_}catch(e){J_=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},J_.prototype=Object.create(Error.prototype),J_.prototype.constructor=J_}function X_(e,t){return new Promise((function(n,r){var a=new Q_(e,t);if(a.signal&&a.signal.aborted)return r(new J_("Aborted","AbortError"));var i=new XMLHttpRequest;function s(){i.abort()}i.onload=function(){var e,t,r={status:i.status,statusText:i.statusText,headers:(e=i.getAllResponseHeaders()||"",t=new F_,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var a=n.join(":").trim();t.append(r,a)}})),t)};r.url="responseURL"in i?i.responseURL:r.headers.get("X-Request-URL");var a="response"in i?i.response:i.responseText;setTimeout((function(){n(new W_(a,r))}),0)},i.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},i.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},i.onabort=function(){setTimeout((function(){r(new J_("Aborted","AbortError"))}),0)},i.open(a.method,function(e){try{return""===e&&C_.location.href?C_.location.href:e}catch(t){return e}}(a.url),!0),"include"===a.credentials?i.withCredentials=!0:"omit"===a.credentials&&(i.withCredentials=!1),"responseType"in i&&(O_.blob?i.responseType="blob":O_.arrayBuffer&&a.headers.get("Content-Type")&&-1!==a.headers.get("Content-Type").indexOf("application/octet-stream")&&(i.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof F_?a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,U_(t.headers[e]))})),a.signal&&(a.signal.addEventListener("abort",s),i.onreadystatechange=function(){4===i.readyState&&a.signal.removeEventListener("abort",s)}),i.send(void 0===a._bodyInit?null:a._bodyInit)}))}X_.polyfill=!0,C_.fetch||(C_.fetch=X_,C_.Headers=F_,C_.Request=Q_,C_.Response=W_);var Z_=function(e){var t=this;if(!Y_){var n={gameId:e.gameId,hours:(new Date).getHours(),topDomain:mb.topDomain,domain:mb.parentDomain,referrer:mb.parentURL,depth:a.getIframeDepth(),version:go.version,byloader:mb.isTokenGameURL,isTokenGameURL:mb.isTokenGameURL,isMasterGameURL:mb.isMasterGameURL,isExtHostedGameURL:mb.isExtHostedGameURL,byloaderVersion:mb.version,tracking:vb.userDeclinedTracking,whitelabel:vb.whitelabelPartner,platform:a.getMobilePlatform()};Y_=new a.MessageRouter(n)}return Y_||{send:function(){S.default(this,t)}.bind(this)}},$_={getGameData:function(e){var t=this;try{var n=e.replace("game.api.gamedistribution.com","game-api.gamedistribution.com");fetch(n).then(function(e){S.default(this,t)}.bind(this)).catch(function(e){S.default(this,t)}.bind(this))}catch(e){}},getGameLoaderIndex:function(e){var t=this;try{var n="https://html5-prod-aws.gamedistribution.com/".concat(e,"/");fetch(n).then(function(e){S.default(this,t)}.bind(this)).catch(function(e){S.default(this,t)}.bind(this))}catch(e){}}},ew={getGameData:function(e){var t=this;try{var n=e.replace("game.api.gamedistribution.com","game-api-acc-real-hwp.gamedistribution.com");fetch(n).then(function(e){S.default(this,t)}.bind(this)).catch(function(e){S.default(this,t)}.bind(this))}catch(e){}}},tw={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},nw={gameAPI:"game.api.gamedistribution.com"},rw={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},aw=function(){var e=this,t=tw.acc.some(function(t){var n;return S.default(this,e),t===(null===(n=window.location.host)||void 0===n?void 0:n.toLowerCase())}.bind(this));return{env:t?"acc":"prod",config:t?rw:nw}},iw=function(e){var t=this,n=e.url;return new Promise(function(e,r){S.default(this,t);var a=new XMLHttpRequest;a.open("GET",n,!0),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var t=JSON.parse(a.responseText);e(t)}else r(Error("Error occured on request: ".concat(a.status,", ").concat(a.statusText)))},a.onerror=function(e){r(e)},a.send()}.bind(this))},sw=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"GD",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ObjectStore";C.default(this,e),this.dbName=t,this.storeName=n,this.db=null,this.init()}var t,n,r,a;return I.default(e,[{key:"init",value:function(){var e=this;return new Promise(function(t,n){var r=this;S.default(this,e);var a=indexedDB.open(this.dbName,1);a.onerror=function(e){S.default(this,r),console.error("Database error:",e.target.error),n(e.target.error)}.bind(this),a.onsuccess=function(e){S.default(this,r),this.db=e.target.result,t(this.db)}.bind(this),a.onupgradeneeded=function(e){S.default(this,r);var t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName,{keyPath:"key"})}.bind(this)}.bind(this))}},{key:"getItem",value:(a=D.default(T.default.mark((function e(t){var n=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var a=this;S.default(this,n);var i=this.db.transaction([this.storeName],"readonly").objectStore(this.storeName).get(t);i.onerror=function(e){S.default(this,a),console.error("Get item error:",e.target.error),r(e.target.error)}.bind(this),i.onsuccess=function(t){S.default(this,a),i.result?e(i.result.value):e(null)}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"setItem",value:(r=D.default(T.default.mark((function e(t,n){var r=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,a){var i=this;S.default(this,r);var s=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).put({key:t,value:n});s.onerror=function(e){S.default(this,i),console.error("Set item error:",e.target.error),a(e.target.error)}.bind(this),s.onsuccess=function(t){S.default(this,i),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"removeItem",value:(n=D.default(T.default.mark((function e(t){var n=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var a=this;S.default(this,n);var i=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).delete(t);i.onerror=function(e){S.default(this,a),console.error("Remove item error:",e.target.error),r(e.target.error)}.bind(this),i.onsuccess=function(t){S.default(this,a),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"clear",value:(t=D.default(T.default.mark((function e(){var t=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,n){var r=this;S.default(this,t);var a=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).clear();a.onerror=function(e){S.default(this,r),console.error("Clear store error:",e.target.error),n(e.target.error)}.bind(this),a.onsuccess=function(t){S.default(this,r),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),ow=function(){function e(t){var n=t.mode;C.default(this,e),this.setItem=function(){var e=D.default(T.default.mark((function e(t,n){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),this.getItem=function(){var e=D.default(T.default.mark((function e(t){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),"indexed-db"===n?(this.indexedStore=new sw,this.setItem=this.indexedStore.setItem.bind(this.indexedStore),this.getItem=this.indexedStore.getItem.bind(this.indexedStore)):"local-storage"===n&&(this.setItem=function(){var e=D.default(T.default.mark((function e(t,n){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",a.Ls.set(t,n));case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),this.getItem=function(){var e=D.default(T.default.mark((function e(t){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",a.Ls.getString(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}var t,n;return I.default(e,[{key:"set",value:(n=D.default(T.default.mark((function e(t,n){var r;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=JSON.stringify(n),e.next=3,this.setItem(t,r);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"get",value:(t=D.default(T.default.mark((function e(t){var n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getItem(t);case 2:return n=e.sent,e.abrupt("return",n?JSON.parse(n):null);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}();function dw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dw(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var cw="_gd_vs";function lw(e){return hw.apply(this,arguments)}function hw(){return(hw=D.default(T.default.mark((function e(t){var n,r,i;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.gameId,i=[],!window.indexedDB){e.next=13;break}return e.prev=3,e.next=6,bw({gameId:n});case 6:r=e.sent,e.next=13;break;case 9:e.prev=9,e.t0=e.catch(3),wo("visit-get error, indexedDb",e.t0.message),i.push(e.t0.message);case 13:if(r||!a.Ls.available){e.next=24;break}return e.prev=14,e.next=17,_w({gameId:n});case 17:r=e.sent,e.next=24;break;case 20:e.prev=20,e.t1=e.catch(14),wo("visit-get error, Ls",e.t1.message),i.push(e.t1.message);case 24:return e.abrupt("return",uw(uw({},r),{},{errors:i}));case 25:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])})))).apply(this,arguments)}function fw(e){return pw.apply(this,arguments)}function pw(){return pw=D.default(T.default.mark((function e(t){var n,r,i,s;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.gameId,r=t.serverDate,s=[],!window.indexedDB){e.next=13;break}return e.prev=3,e.next=6,gw({gameId:n,serverDate:r});case 6:i=e.sent,e.next=13;break;case 9:e.prev=9,e.t0=e.catch(3),wo("visit-update error, indexedDb",e.t0.message),s.push(e.t0.message);case 13:if(i||!a.Ls.available){e.next=24;break}return e.prev=14,e.next=17,mw({gameId:n,serverDate:r});case 17:i=e.sent,e.next=24;break;case 20:e.prev=20,e.t1=e.catch(14),wo("visit-update error, Ls",e.t1.message),s.push(e.t1.message);case 24:return e.abrupt("return",uw(uw({},i),{},{errors:s}));case 25:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])}))),pw.apply(this,arguments)}function mw(e){return vw.apply(this,arguments)}function vw(){return vw=D.default(T.default.mark((function e(t){var n,r,a,i,s,o;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,r=t.serverDate,i=new ow({mode:a="local-storage"}),e.next=5,i.get(cw);case 5:return(s=e.sent)||(s={gids:{}}),s.gids[n]||(s.gids[n]={fv:r,vc:0}),(o=s.gids[n]).vc++,o.lv=r,e.next=13,i.set(cw,s);case 13:return e.abrupt("return",{visit:o,mode:a});case 14:case"end":return e.stop()}}),e)}))),vw.apply(this,arguments)}function gw(e){return Aw.apply(this,arguments)}function Aw(){return Aw=D.default(T.default.mark((function e(t){var n,r,a,i,s;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,r=t.serverDate,i=new ow({mode:a="indexed-db"}),e.next=5,i.get(n);case 5:return(s=e.sent)||(s={fv:r,vc:0}),s.vc++,s.lv=r,e.next=11,i.set(n,s);case 11:return e.abrupt("return",{visit:s,mode:a});case 12:case"end":return e.stop()}}),e)}))),Aw.apply(this,arguments)}function bw(e){return yw.apply(this,arguments)}function yw(){return yw=D.default(T.default.mark((function e(t){var n,r,a;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,"indexed-db",r=new ow({mode:"indexed-db"}),e.next=5,r.get(n);case 5:return(a=e.sent)||(a={fv:null,vc:0}),e.abrupt("return",a);case 8:case"end":return e.stop()}}),e)}))),yw.apply(this,arguments)}function _w(e){return ww.apply(this,arguments)}function ww(){return ww=D.default(T.default.mark((function e(t){var n,r,a,i;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,"local-storage",r=new ow({mode:"local-storage"}),e.next=5,r.get(cw);case 5:return(a=e.sent)||(a={gids:{}}),a.gids[n]||(a.gids[n]={fv:null,vc:0}),i=a.gids[n],e.abrupt("return",i);case 10:case"end":return e.stop()}}),e)}))),ww.apply(this,arguments)}function kw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kw(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ew,Dw,Sw,Rw,Tw=new m.EventEmitter,Iw=[],Cw=function(e){Iw.push(e)},Ow=function(e){Ew=Z_(Sw=e)},Pw=function(){var e=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Dw){e.next=7;break}return e.next=3,jw(Sw);case 3:Dw=e.sent,Tw.emit("game-data-ready",Dw),Lw(),Bw();case 7:return e.abrupt("return",Dw);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Lw=function(){var e,t;if(null!==(e=Dw)&&void 0!==e&&null!==(t=e.aws_tst)&&void 0!==t&&t.enabled){var n,r,a,i,s;if(Mw(),null!==(n=Dw)&&void 0!==n&&null!==(r=n.aws_tst)&&void 0!==r&&null!==(a=r.ep)&&void 0!==a&&a.api&&null!==(i=Dw)&&void 0!==i&&i.url)$_.getGameData(null===(s=Dw)||void 0===s?void 0:s.url);setInterval(D.default(T.default.mark((function e(){var t;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,jw(Sw);case 3:Dw=e.sent,yo("gd-aws-test, new game data received",null===(t=Dw)||void 0===t?void 0:t.aws_tst),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])}))),3e5)}},Bw=function(){var e,t;if(null!==(e=Dw)&&void 0!==e&&null!==(t=e.hwei)&&void 0!==t&&t.enabled){var n,r,a;if(Mw(),null!==(n=Dw)&&void 0!==n&&null!==(r=n.hwei)&&void 0!==r&&r.gameApi.enabled)ew.getGameData(null===(a=Dw)||void 0===a?void 0:a.url);setInterval(D.default(T.default.mark((function e(){var t;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,jw(Sw);case 3:Dw=e.sent,yo("gd-aws-test, new game data received",null===(t=Dw)||void 0===t?void 0:t.aws_tst),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])}))),3e5)}},Uw=!1,Mw=function(){if(!Uw){Uw=!0;var e=window.fetch;window.fetch=D.default(T.default.mark((function t(){var n,r,a,i,s,o,d,u,c,l,h,f,p,m,v,g,A,b,y,_,w,k,x,E,D,R,I,C,O,P,L,B,U,M=this,F=arguments;return T.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(v=F.length,g=new Array(v),A=0;A<v;A++)g[A]=F[A];b=g[0],y=g[1],_=null===(n=Dw)||void 0===n||null===(r=n.aws_tst)||void 0===r||null===(a=r.ep)||void 0===a?void 0:a.atm,w=null===(i=Dw)||void 0===i||null===(s=i.aws_tst)||void 0===s||null===(o=s.ep)||void 0===o?void 0:o.msgrt,k=(null===(d=Dw)||void 0===d||null===(u=d.hwei)||void 0===u?void 0:u.enabled)&&(null===(c=Dw)||void 0===c||null===(l=c.hwei)||void 0===l?void 0:l.atom.enabled),x=(null===(h=Dw)||void 0===h||null===(f=h.hwei)||void 0===f?void 0:f.enabled)&&(null===(p=Dw)||void 0===p||null===(m=p.hwei)||void 0===m?void 0:m.msgrt.enabled),E=function(t,n){var r=this;S.default(this,M);var a=b.replace(t,n);e(a,y).then(function(){S.default(this,r)}.bind(this))}.bind(this);try{_&&b.indexOf("tag.atom")>0&&E("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),w&&b.indexOf("msgrt.gamedistribution.com")>0&&(yo("gd-aws-test hook",null===(D=Dw)||void 0===D?void 0:D.aws_tst,null===(R=Dw)||void 0===R||null===(I=R.aws_tst)||void 0===I||null===(C=I.ep)||void 0===C?void 0:C.msgrt),E("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"),null!==(O=Dw)&&void 0!==O&&null!==(P=O.hwei)&&void 0!==P&&null!==(L=P.msgrt)&&void 0!==L&&L.enabled&&null!==(B=Dw)&&void 0!==B&&B.url&&E("msgrt.gamedistribution.com","msgrt-hwp.gamedistribution.com")),k&&b.indexOf("tag.atom")>0&&E("tag.atom.gamedistribution.com","atom-tag-acc-real-hwp.gamedistribution.com"),x&&b.indexOf("msgrt.gamedistribution.com")>0&&E("msgrt.gamedistribution.com","msgrt-hwp.gamedistribution.com")}catch(e){}return t.next=11,e(b,y);case 11:return U=t.sent,t.abrupt("return",U);case 13:case"end":return t.stop()}}),t,this)})))}},Fw=["gamedistribution.com","html5.gamedistribution.com"],jw=function(e){var t=this;Ew.send("gdfw.loading",{message:"loading"}),Iw=[],Cw("1"),Cw("2"),new I_,Cw("3");var n=function(){var e=this,t=new I_,n=t.get("top.domain.value"),r=t.get("partner.domain.value"),i=Fw.some(function(t){return S.default(this,e),t===(null==r?void 0:r.toLowerCase())}.bind(this)),s=a.getParentDomain();return(i||s!==r)&&n||r}();Cw("4");var r=function(){return S.default(this,t),{gameId:e.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{},gs_trc:{enabled:!0}}}.bind(this);Cw("5");var i=function(){S.default(this,t);var r=o(),a=r?"&mode=".concat(r):"",i=aw().config,d="https://".concat(i.gameAPI),u=s();return"".concat(d,"/game/v4/get/").concat(e.gameId.replace(/-/g,""),"/?domain=").concat(n).concat(a,"&v=").concat(go.version,"&engn=").concat(u.os,"&localTime=").concat((new Date).getHours())}.bind(this),s=function(){S.default(this,t);var e=navigator.userAgent,n="unknown";return/Windows/i.test(e)?n="Windows":/Mac OS X/i.test(e)&&!/Mobile/i.test(e)?n="macOS":/iPhone|iPad|iPod/i.test(e)?n="iOS":/Android/i.test(e)?n="Android":/Linux/i.test(e)&&(n="Linux"),/Mobi|Tablet/i.test(e),{os:n}}.bind(this);Cw("6");var o=function(){var e=this;S.default(this,t);var n=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return S.default(this,e),t.get(n)}.bind(this)});return!n.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:n.gd_mode}.bind(this);Cw("7");var d=function(e){var t=this,n=(null==e?void 0:e.vmap_by_tags)||{},r=n.enabled,a=n.tags;if(r){var i,s,o=a||["co-op","multiplayer","IAPs"];if(e.tags.some(function(e){var n=this;return S.default(this,t),o.some(function(t){return S.default(this,n),t===e.title}.bind(this))}.bind(this)))((null===(i=e.adsc)||void 0===i||null===(s=i.t)||void 0===s?void 0:s.rspdur)||0)<1&&(e.mAds=xw(xw({},e.mAds||{}),{vmap:{enabled:!0}}),e.pAds=xw(xw({},e.pAds||{}),{vmap:{enabled:!0}}),e.rAds=xw(xw({},e.rAds||{}),{vmap:{enabled:!0}}),e.vmapByTagsApplied=!0)}},u=function(){var e=D.default(T.default.mark((function e(t){var n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lw({gameId:t.gameId});case 2:return n=e.sent,t.visit=n,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),c=function(){var e=D.default(T.default.mark((function e(t){var n,r,a,i,s,o;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(r=t.visit)&&0===(null===(n=r.errors)||void 0===n?void 0:n.length)&&0===r.vc&&((null==t||null===(a=t.pAds)||void 0===a||null===(i=a.vmap)||void 0===i?void 0:i.enabled)&&(null==t||null===(s=t.pAds)||void 0===s||null===(o=s.vmap)||void 0===o?void 0:o.adtr))&&(t.pAds.vmap.enabled=!1);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return new Promise(function(e){var n=this;S.default(this,t),Cw("7.1");var s=r();try{Cw("7.2");var o=i();Cw("7.3"),fetch(o).then(function(){var e=D.default(T.default.mark((function e(t){var n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Cw("7.4"),e.prev=1,e.next=4,t.json();case 4:n=e.sent,e.next=13;break;case 7:return e.prev=7,e.t0=e.catch(1),yo("gameData fetch error, fallback to other ajax api",e.t0),e.next=12,iw({url:o});case 12:n=e.sent;case 13:return e.abrupt("return",n);case 14:case"end":return e.stop()}}),e,null,[[1,7]])})));return function(t){return e.apply(this,arguments)}}()).then(function(){var t=D.default(T.default.mark((function t(n){var r,i,l,h,f,p,m,v=this;return T.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Cw("7.5"),!n.success){t.next=23;break}return h=n.result.game,Cw("7.6"),f={company:h.company,gameId:h.gameMd5,slug:h.slug,pname:h.pname,dname:h.dname,status:h.status,activeStatus:h.activeStatus,description:h.description,disableAds:h.enableAds,preroll:h.preRoll,midroll:6e4*h.timeAds,rewardedAds:h.rewardedAds,title:h.title,publishedAt:h.publishedAt,tags:h.tags,category:h.category,assets:h.assets,disp_2nd_prer:h.disp_2nd_prer,ctry_vst:h.ctry_vst,ctry:h.ctry,crtv:h.crtv,dmain:h.dmain,dmn:h.dmn,aws_tst:h.aws_tst,meta:h.meta,adsc:h.adsc,igs:h.igs,adspn:Ao(h.adspn)||{},__t4r:Ao(h.__t4r)||{},block_exts:Ao(h.push_cuda),bloc_gard:Ao(h.bloc_gard),cookie:Ao(h.cookie),gdpr:Ao(h.gdpr),diagnostic:Ao(h.diagnostic),cmp:Ao(h.cmp),gft:Ao(h.gft)||{},sdk:Ao(h.sdk)||{},sdkfw:Ao(h.sdkfw)||{},loader:Ao(h.loader)||{},splash:Ao(h.splash)||{},promo:Ao(h.promo)||{},dAds:Ao(h.dads)||{},pAds:Ao(h.pads)||{},mAds:Ao(h.mads)||{},rAds:Ao(h.rads)||{},lp:Ao(h.lp)||{},extsc:Ao(h.extsc)||{},evnts:Ao(h.evnts)||{},dp:Ao(h.dp)||{},adflw:Ao(h.adflw)||{},afgszf:Ao(h.afgszf)||{},fllc:Ao(h.fllc)||{},lotm:Ao(h.lotm)||{},t4rc:Ao(h.t4rc)||{},midroll_plus:Ao(h.midroll_plus)||{},gmky:Ao(h.gmky)||{},urlBlockExc:Ao(h.url_blck_exc)||{},sdk_wrp:Ao(h.sdk_wrp)||{},dbglg:Ao(h.dbglg)||{},extHosting:Ao(h.ext_hosting)||{},directTokenUse:Ao(h.dtu)||{},aeria:Ao(h.aeria)||{},advlm:Ao(h.advlm)||{},ad_blcks:Ao(h.ad_blcks)||{},rmblck:Ao(h.rmblck)||{},gs_trc:Ao(h.gs_trc)||{},rwskp:Ao(h.rwskp)||{},isv_fw:Ao(h.isv_fw)||{},ext_vst:Ao(h.ext_vst)||{},fix_score:Ao(h.fix_score)||{},compensation:Ao(h.comps)||{},adTimer:Ao(h.adtr)||{},cust_vast:Ao(h.cust_vast)||{},console_logs:Ao(h.c_logs)||{},disable_ads_by_cmp:Ao(h.dads_by_cmp)||{},ad_skip:Ao(h.adskp)||{},__t4rac:Ao(h.__t4rac)||{},vmap_by_tags:Ao(h.vmap_by_tags)||{},hwei:Ao(h.hwei)||{},_apOps:Ao(h._apOps)||{}},Cw("7.7"),p=a.extendDefaults(F.default(s),f),Cw("7.8"),d(p),t.next=11,u(p);case 11:return t.next=13,c(p);case 13:p.afg_disabled=!1===(null===(r=p.sdk)||void 0===r||null===(i=r.afg)||void 0===i?void 0:i.enabled),p.url=o,function(){S.default(this,v),void 0!==ko.afgEnabled&&(p.afg_disabled=!ko.afgEnabled),void 0!==ko.promoEnabled&&(p.promo=p.promo||{},p.promo=xw(xw({},p.promo),{},{rainbow:{enabled:ko.promoEnabled}}))}.bind(this),Cw("7.9"),null!==(l=p.pAds)&&void 0!==l&&l.enabled&&(p.preroll=!0),Cw("7.10"),Ew.send("gdfw.success",{message:"success"}),e(p),t.next=27;break;case 23:s.failed=!0,m=Iw[Iw.length-1],Ew.send("gdfw.err",{message:"".concat(m,": json error")}),e(s);case 27:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()).catch(function(t){S.default(this,n);var r=Iw[Iw.length-1];Ew.send("gdfw.err",{message:"".concat(r,": ").concat(t.message?t.message:t)}),s.failed=!0,e(s)}.bind(this))}catch(t){var l=Iw[Iw.length-1];Ew.send("gdfw.err",{message:"".concat(l,": global ").concat(t.message?t.message:t)}),s.failed=!0,e(s)}}.bind(this))},Gw=function(){var e=D.default(T.default.mark((function e(){var t,n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pw();case 2:return n=e.sent,e.abrupt("return",!(null==n||null===(t=n.sdkfw)||void 0===t||!t.enabled));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Nw=function(){var e=D.default(T.default.mark((function e(){var t,n,r;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pw();case 2:return n=e.sent,r=null==n||null===(t=n.diagnostic)||void 0===t||!t.close_ga,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),qw=function(){var e=D.default(T.default.mark((function e(){var t,n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pw();case 2:return n=e.sent,e.next=5,Gw();case 5:if(e.t0=e.sent,!e.t0){e.next=8;break}e.t0=!(null==n||null===(t=n.sdkfw)||void 0===t||!t.handshake);case 8:return e.abrupt("return",e.t0);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Hw=function(){var e=D.default(T.default.mark((function e(){var t,n,r,a,i,s,o,d;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pw();case 2:return o=e.sent,d=!(null==o||null===(t=o.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:d,path:d?null==o||null===(n=o.extsc)||void 0===n?void 0:n.path:"",name:d?null==o||null===(r=o.extsc)||void 0===r?void 0:r.name:"",ref:d?null==o||null===(a=o.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:d?null==o||null===(i=o.extsc)||void 0===i?void 0:i.loadedFlag:void 0,loadedFlagCheck:!!d&&!(null==o||null===(s=o.extsc)||void 0===s||!s.loadedFlagCheck)});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Vw=function(){var e=D.default(T.default.mark((function e(){var t,n,r,i,s,o=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Hw();case 2:if((t=e.sent).enabled){e.next=5;break}return e.abrupt("return");case 5:return n=t.path,r=t.name,i=t.ref,e.prev=6,s={},e.next=10,a.getScript(n,r,{error_prefix:"Blocked:",exists:function(){return S.default(this,o),!!i&&!!window[i]}.bind(this),attrs:s});case 10:e.next=16;break;case 12:e.prev=12,e.t0=e.catch(6),console.log("extsc: error on external partner script load",r,e.t0),a.dankLog("DEVELOPER_ERROR",e.t0,"warning");case 16:case"end":return e.stop()}}),e,this,[[6,12]])})));return function(){return e.apply(this,arguments)}}(),Qw=!1,zw=!1,Ww=function(){return new Promise(function(){var e=D.default(T.default.mark((function e(t,n){var r,a,i,s,o,d=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Qw){e.next=4;break}return e.abrupt("return",t(zw));case 4:Qw=!0;case 5:return e.next=7,Hw();case 7:if((r=e.sent).enabled){e.next=10;break}return e.abrupt("return",t(!1));case 10:if(a=r.loadedFlag,!(i=r.loadedFlagCheck)||a){e.next=13;break}return e.abrupt("return",t(!1));case 13:if(i){e.next=16;break}return zw=!0,e.abrupt("return",t(!0));case 16:s=!0,setTimeout(function(){S.default(this,d),s&&(s=!1,Qw=!0,t(!1))}.bind(this),5e3),o=setInterval(function(){S.default(this,d),s&&i&&window[a]?(s=!1,Qw=!0,zw=!0,clearInterval(o),t(!0)):s||clearInterval(o)}.bind(this),100);case 19:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}())};function Kw(e){return Yw.apply(this,arguments)}function Yw(){return Yw=D.default(T.default.mark((function e(t){var n,r,a,i;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.whichFrame,r=t.options,e.prev=1,a="gd-".concat(n),i=!1,!("loader-frame"===n)){e.next=12;break}return e.next=9,Jw({id:a,verbose:i,options:r});case 9:Rw=e.sent,e.next=15;break;case 12:return e.next=14,Zw({id:a,verbose:i,options:r});case 14:Rw=e.sent;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(1),yo("[GD-IS] GD interservice create error",e.t0);case 20:case"end":return e.stop()}}),e,null,[[1,17]])}))),Yw.apply(this,arguments)}function Jw(e){return Xw.apply(this,arguments)}function Xw(){return Xw=D.default(T.default.mark((function e(t){var n,r,a,i,s=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.id,r=t.verbose,a=t.options,e.next=4,j.default({id:n,verbose:r,router:!0});case 4:return(i=e.sent).on("connected",function(e){S.default(this,s),"gd-game-frame"===e.service&&i.registerProxy({alias:"isStoreVisible",method:"isStoreVisible",service:"gd-game-frame"})}.bind(this)),i.register({method:"whoami",handler:function(){return S.default(this,s),"[GD-IS] I am ".concat(n)}.bind(this)}),i.register({method:"isLoader",handler:function(){return S.default(this,s),!0}.bind(this)}),i.register({method:"hasRouter",handler:function(){return S.default(this,s),!1}.bind(this)}),i.register({method:"showAd",handler:function(){var e=D.default(T.default.mark((function e(t){var n,r,i;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.showAd?a.showAd:function(){var e=D.default(T.default.mark((function e(t){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!0);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),r=t.adType,i=t.params,e.next=4,n(r,i);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),i.register({method:"getLoaderInfo",handler:function(){return S.default(this,s),{url:window.location.href}}.bind(this)}),i.register({method:"registerOnEvents",handler:function(){var e=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.registerProxy({alias:"onEvent",method:"onEvent",service:"gd-game-frame"}),e.abrupt("return","[GD-IS] gd-game-frame registered for onEvents");case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.next=14,i.whoami();case 14:return e.sent,e.abrupt("return",i);case 17:case"end":return e.stop()}}),e,this)}))),Xw.apply(this,arguments)}function Zw(e){return $w.apply(this,arguments)}function $w(){return $w=D.default(T.default.mark((function e(t){var n,r,a,i,s,o=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.id,r=t.verbose,a=t.options,e.next=4,j.default({id:n,verbose:r,router:!1});case 4:return i=e.sent,"gd-loader-frame",e.next=8,i.findRouter({where:{id:"gd-loader-frame"}}).catch(function(e){S.default(this,o)}.bind(this));case 8:if(s=e.sent,e.t0=!!s,!e.t0){e.next=15;break}return e.next=14,i.connect(s).catch(function(e){S.default(this,o),yo("[GD-IS] Failed to connect to router",(null==e?void 0:e.message)||e)}.bind(this));case 14:e.t0=e.sent;case 15:return e.t0,i.register({method:"whoami",handler:function(){return S.default(this,o),"[GD-IS] I am ".concat(n)}.bind(this)}),i.register({method:"onEvent",handler:function(e){var t=this;S.default(this,o);var n=e.event;(a.onEvent||function(e){S.default(this,t)}.bind(this))(n)}.bind(this)}),i.register({method:"isLoader",handler:function(){return S.default(this,o),!1}.bind(this)}),i.register({method:"hasRouter",handler:function(){return S.default(this,o),!!s}.bind(this)}),i.register({method:"isStoreVisible",handler:function(){var e;return S.default(this,o),(null===(e=window.gdsdk.store)||void 0===e?void 0:e.isVisible)&&window.gdsdk.store.isVisible()}.bind(this)}),s&&(i.registerProxy({alias:"whoIsLoader",method:"whoami"}),i.registerProxy({alias:"registerOnEvents",method:"registerOnEvents"}),i.registerProxy({alias:"showAd",method:"showAd"}),i.registerProxy({alias:"getLoaderInfo",method:"getLoaderInfo"})),e.next=25,i.whoami();case 25:if(e.sent,!s){e.next=36;break}return e.next=30,i.whoIsLoader();case 30:return e.sent,e.next=33,i.registerOnEvents();case 33:e.sent;case 36:return e.abrupt("return",i);case 37:case"end":return e.stop()}}),e,this)}))),$w.apply(this,arguments)}var ek=!1;function tk(){var e=this;return new Promise(function(t,n){var r=this;if(S.default(this,e),Rw||ek)t(Rw);else{var a=setInterval(function(){S.default(this,r),Rw&&(ek=!0,clearInterval(a),t(Rw))}.bind(this),100);setTimeout(function(){S.default(this,r),clearInterval(a),Rw||(ek=!0,t(Rw))}.bind(this),5e3)}}.bind(this))}var nk,rk=function(){var e=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Rw){e.next=2;break}return e.abrupt("return",!1);case 2:if(e.t0=Rw.isStoreVisible,!e.t0){e.next=7;break}return e.next=6,Rw.isStoreVisible();case 6:e.t0=e.sent;case 7:return e.abrupt("return",e.t0);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ak=function(){var e=D.default(T.default.mark((function e(){var t,n,r,a;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(nk){e.next=8;break}return t=(new I_).get(),n=(new G.default).getResult(),e.next=5,Pw();case 5:r=e.sent,i=void 0,s=void 0,i=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,a={w:i-=i%64,h:s-=s%64},nk={gameData:r,loc:t,ua:n,layout:a};case 8:return e.abrupt("return",nk);case 9:case"end":return e.stop()}var i,s}),e)})));return function(){return e.apply(this,arguments)}}(),ik=function(){var e=this,t=P.default(window.location.href,!0),n=t.host,r=t.query,a=function(t){return S.default(this,e),"revision.gamedistribution.com"===t||"uncached-html5.gamedistribution.com"===t}.bind(this),i=a(n);null!=r&&r.gd_sdk_referrer_url&&(i=a(P.default(r.gd_sdk_referrer_url).host));return i},sk=function(){var e=D.default(T.default.mark((function e(){var t;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!window.isForwarderFrame,!!window.isForwarderFrame){e.next=17;break}if(!ik()){e.next=8;break}return e.abrupt("return",!0);case 8:return e.next=10,tk();case 10:if(t=e.sent,!((null==t?void 0:t.isLoader())||!1)){e.next=15;break}return e.abrupt("return",!1);case 15:e.next=18;break;case 17:case 18:return e.abrupt("return",!0);case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ok=function(){var e=D.default(T.default.mark((function e(){var t;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pw();case 2:if(t=e.sent,null==t?void 0:t.igs){e.next=6;break}return e.abrupt("return",!1);case 6:return _o("[GD-IGS] store config available"),e.next=9,sk();case 9:if(e.sent){e.next=12;break}return e.abrupt("return",!1);case 12:return e.abrupt("return",!0);case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();function dk(e,t){var n=this,r=!1,a=null;if(e){var i=e,s=P.default(i,!0),o=s.query;if(Object.keys(o).some(function(e){return S.default(this,n),e.toLowerCase()===t}.bind(this)))r=!0,a=o[t.toLowerCase()];else if(i=null==o?void 0:o.gd_sdk_referrer_url){var d=(s=P.default(i,!0)).query;Object.keys(d).some(function(e){return S.default(this,n),e.toLowerCase()===t}.bind(this))&&(r=!0,a=d[t.toLowerCase()])}}return{exists:r,value:a}}var uk=function(){var e=D.default(T.default.mark((function e(){var t,n,r,a,i,s,o;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=!1,e.next=3,tk();case 3:if(n=e.sent,e.t1=n,!e.t1){e.next=9;break}return e.next=8,n.getLoaderInfo();case 8:e.t1=e.sent;case 9:if(e.t0=e.t1,e.t0){e.next=12;break}e.t0={};case 12:return r=e.t0,a=r.url,i=dk(a,"sandbox"),s=i.exists,o=i.value,s&&(t=!0===o||"true"===o||1===o),e.abrupt("return",t);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ck=function(){var e=D.default(T.default.mark((function e(){var t,n,r,a,i;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,tk();case 2:if(t=e.sent,e.t1=t,!e.t1){e.next=8;break}return e.next=7,t.getLoaderInfo();case 7:e.t1=e.sent;case 8:if(e.t0=e.t1,e.t0){e.next=11;break}e.t0={};case 11:return n=e.t0,r=n.url,a=dk(r,"igs"),i=a.exists,a.value,e.abrupt("return",i);case 15:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),lk=function(){var e=D.default(T.default.mark((function e(t){var n,r,i,s,o,d,u,c,l,h,f,p,m=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.onEvent,e.next=3,Pw();case 3:return i=e.sent,s=null==i?void 0:i.igs,e.next=7,ok();case 7:if(e.sent){e.next=10;break}return e.abrupt("return");case 10:return _o("[GD-IGS] store will initalize for frame",{loc:window.location.href}),"https://pm.azerioncircle.com/p/gd-sdk-igs-proxy",e.next=14,a.getScript("https://pm.azerioncircle.com/p/gd-sdk-igs-proxy","gd-sdk-igs-proxy",{});case 14:if(!(o=null===(n=window.GD_SDK_IGS_PROXY)||void 0===n?void 0:n.create)){e.next=40;break}return _o("[GD-IGS] store proxy created"),u="https://html5.gamedistribution.com/igs/index.html",e.next=20,ck();case 20:return c=e.sent,e.next=23,uk();case 23:return l=e.sent,_o("[GD-IS-IGS] sandbox",l),e.next=27,ak();case 27:return h=e.sent,e.next=30,o({igs:s,storeFrameUrl:u,showStoreOpener:c,sandbox:l,ctx:h});case 30:if(f=e.sent){e.next=33;break}return e.abrupt("return");case 33:p=!1,(null===(d=f.events)||void 0===d?void 0:d.onAny)&&f.events.onAny(function(e){var t;(S.default(this,m),"STORE_UI_VISIBILITY_CHANGED"===(null==e?void 0:e.name))&&(p=(null===(t=e.data)||void 0===t?void 0:t.visible)||!1);r&&r(e)}.bind(this)),f.isVisible=function(){return p},window.gdsdk.store=f,window.gdsdk.executeStoreAction=f.executeStoreAction.bind(f),r({name:"STORE_READY",data:{}}),_o("[GD-IGS] store ready");case 40:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),hk=$i,fk=mm,pk=ie,mk=wt,vk=et,gk=cp,Ak=gg,bk=gr,yk=fk&&fk.prototype;if(hk({target:"Promise",proto:!0,real:!0,forced:!!fk&&pk((function(){yk.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=gk(this,mk("Promise")),n=vk(e);return this.then(n?function(n){return Ak(t,e()).then((function(){return n}))}:e,n?function(n){return Ak(t,e()).then((function(){throw n}))}:e)}}),vk(fk)){var _k=mk("Promise").prototype.finally;yk.finally!==_k&&bk(yk,"finally",_k,{unsafe:!0})}var wk="\t\n\v\f\r                 \u2028\u2029\ufeff",kk=me,xk=os,Ek=wk,Dk=le("".replace),Sk=RegExp("^["+Ek+"]+"),Rk=RegExp("(^|[^"+Ek+"])["+Ek+"]+$"),Tk=function(e){return function(t){var n=xk(kk(t));return 1&e&&(n=Dk(n,Sk,"")),2&e&&(n=Dk(n,Rk,"$1")),n}},Ik={start:Tk(1),end:Tk(2),trim:Tk(3)},Ck=vn.PROPER,Ok=ie,Pk=wk,Lk=Ik.trim;$i({target:"String",proto:!0,forced:function(e){return Ok((function(){return!!Pk[e]()||"​…᠎"!=="​…᠎"[e]()||Ck&&Pk[e].name!==e}))}("trim")},{trim:function(){return Lk(this)}});var Bk=$i,Uk=Oa.find,Mk=bf,Fk="find",jk=!0;Fk in[]&&Array(1)[Fk]((function(){jk=!1})),Bk({target:"Array",proto:!0,forced:jk},{find:function(e){return Uk(this,e,arguments.length>1?arguments[1]:void 0)}}),Mk(Fk);var Gk=et,Nk=it,qk=Ah,Hk=tt.f,Vk=nt,Qk=K,zk=le,Wk=Qi,Kk=function(e,t,n){var r,a;return qk&&Gk(r=t.constructor)&&r!==n&&Nk(a=r.prototype)&&a!==n.prototype&&qk(e,a),e},Yk=In,Jk=si.f,Xk=kt,Zk=iA,$k=os,ex=RA,tx=ps,nx=function(e,t,n){n in e||Hk(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},rx=gr,ax=ie,ix=_e,sx=Yn.enforce,ox=$f,dx=Gs,ux=Vs,cx=Ke("match"),lx=Qk.RegExp,hx=lx.prototype,fx=Qk.SyntaxError,px=zk(hx.exec),mx=zk("".charAt),vx=zk("".replace),gx=zk("".indexOf),Ax=zk("".slice),bx=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,yx=/a/g,_x=/a/g,wx=new lx(yx)!==yx,kx=tx.MISSED_STICKY,xx=tx.UNSUPPORTED_Y,Ex=Vk&&(!wx||kx||dx||ux||ax((function(){return _x[cx]=!1,lx(yx)!=yx||lx(_x)==_x||"/a/i"!=lx(yx,"i")})));if(Wk("RegExp",Ex)){for(var Dx=function(e,t){var n,r,a,i,s,o,d=Xk(hx,this),u=Zk(e),c=void 0===t,l=[],h=e;if(!d&&u&&c&&e.constructor===Dx)return e;if((u||Xk(hx,e))&&(e=e.source,c&&(t=ex(h))),e=void 0===e?"":$k(e),t=void 0===t?"":$k(t),h=e,dx&&"dotAll"in yx&&(r=!!t&&gx(t,"s")>-1)&&(t=vx(t,/s/g,"")),n=t,kx&&"sticky"in yx&&(a=!!t&&gx(t,"y")>-1)&&xx&&(t=vx(t,/y/g,"")),ux&&(i=function(e){for(var t,n=e.length,r=0,a="",i=[],s={},o=!1,d=!1,u=0,c="";r<=n;r++){if("\\"===(t=mx(e,r)))t+=mx(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:px(bx,Ax(e,r+1))&&(r+=2,d=!0),a+=t,u++;continue;case">"===t&&d:if(""===c||ix(s,c))throw new fx("Invalid capture group name");s[c]=!0,i[i.length]=[c,u],d=!1,c="";continue}d?c+=t:a+=t}return[a,i]}(e),e=i[0],l=i[1]),s=Kk(lx(e,t),d?this:hx,Dx),(r||a||l.length)&&(o=sx(s),r&&(o.dotAll=!0,o.raw=Dx(function(e){for(var t,n=e.length,r=0,a="",i=!1;r<=n;r++)"\\"!==(t=mx(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),a+=t):a+="[\\s\\S]":a+=t+mx(e,++r);return a}(e),n)),a&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{Yk(s,"source",""===h?"(?:)":h)}catch(e){}return s},Sx=Jk(lx),Rx=0;Sx.length>Rx;)nx(Dx,lx,Sx[Rx++]);hx.constructor=Dx,Dx.prototype=hx,rx(Qk,"RegExp",Dx,{constructor:!0})}ox("RegExp");var Tx=nt,Ix=le,Cx=ns,Ox=Ja,Px=Ix(Va.f),Lx=Ix([].push),Bx=function(e){return function(t){for(var n,r=Ox(t),a=Cx(r),i=a.length,s=0,o=[];i>s;)n=a[s++],Tx&&!Px(r,n)||Lx(o,e?[n,r[n]]:r[n]);return o}},Ux={entries:Bx(!0),values:Bx(!1)}.values;$i({target:"Object",stat:!0},{values:function(e){return Ux(e)}});var Mx=$i,Fx=zr,jx=Ja,Gx=La,Nx=le([].join);Mx({target:"Array",proto:!0,forced:Fx!=Object||!Gx("join",",")},{join:function(e){return Nx(jx(this),void 0===e?",":e)}});var qx=Oa.map;$i({target:"Array",proto:!0,forced:!pc("map")},{map:function(e){return qx(this,e,arguments.length>1?arguments[1]:void 0)}});var Hx=nt,Vx=le,Qx=bt,zx=ie,Wx=ns,Kx=Ei,Yx=Va,Jx=Ae,Xx=zr,Zx=Object.assign,$x=Object.defineProperty,eE=Vx([].concat),tE=!Zx||zx((function(){if(Hx&&1!==Zx({b:1},Zx($x({},"a",{enumerable:!0,get:function(){$x(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=Zx({},e)[n]||Wx(Zx({},t)).join("")!=r}))?function(e,t){for(var n=Jx(e),r=arguments.length,a=1,i=Kx.f,s=Yx.f;r>a;)for(var o,d=Xx(arguments[a++]),u=i?eE(Wx(d),i(d)):Wx(d),c=u.length,l=0;c>l;)o=u[l++],Hx&&!Qx(s,d,o)||(n[o]=d[o]);return n}:Zx,nE=tE;$i({target:"Object",stat:!0,arity:2,forced:Object.assign!==nE},{assign:nE});var rE,aE=le,iE=2147483647,sE=/[^\0-\u007E]/,oE=/[.\u3002\uFF0E\uFF61]/g,dE="Overflow: input needs wider integers to process",uE=RangeError,cE=aE(oE.exec),lE=Math.floor,hE=String.fromCharCode,fE=aE("".charCodeAt),pE=aE([].join),mE=aE([].push),vE=aE("".replace),gE=aE("".split),AE=aE("".toLowerCase),bE=function(e){return e+22+75*(e<26)},yE=function(e,t,n){var r=0;for(e=n?lE(e/700):e>>1,e+=lE(e/t);e>455;)e=lE(e/35),r+=36;return lE(r+36*e/(e+38))},_E=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var a=fE(e,n++);if(a>=55296&&a<=56319&&n<r){var i=fE(e,n++);56320==(64512&i)?mE(t,((1023&a)<<10)+(1023&i)+65536):(mE(t,a),n--)}else mE(t,a)}return t}(e);var n,r,a=e.length,i=128,s=0,o=72;for(n=0;n<e.length;n++)(r=e[n])<128&&mE(t,hE(r));var d=t.length,u=d;for(d&&mE(t,"-");u<a;){var c=iE;for(n=0;n<e.length;n++)(r=e[n])>=i&&r<c&&(c=r);var l=u+1;if(c-i>lE((iE-s)/l))throw uE(dE);for(s+=(c-i)*l,i=c,n=0;n<e.length;n++){if((r=e[n])<i&&++s>iE)throw uE(dE);if(r==i){for(var h=s,f=36;;){var p=f<=o?1:f>=o+26?26:f-o;if(h<p)break;var m=h-p,v=36-p;mE(t,hE(bE(p+m%v))),h=lE(m/v),f+=36}mE(t,hE(bE(h))),o=yE(s,l,u==d),s=0,u++}}s++,i++}return pE(t,"")},wE=$i,kE=nt,xE=ey,EE=K,DE=Nr,SE=le,RE=gr,TE=qo,IE=np,CE=_e,OE=tE,PE=yl,LE=Lo,BE=Fl.codeAt,UE=function(e){var t,n,r=[],a=gE(vE(AE(e),oE,"."),".");for(t=0;t<a.length;t++)n=a[t],mE(r,cE(sE,n)?"xn--"+_E(n):n);return pE(r,".")},ME=os,FE=rd,jE=hp,GE=__,NE=Yn,qE=NE.set,HE=NE.getterFor("URL"),VE=GE.URLSearchParams,QE=GE.getState,zE=EE.URL,WE=EE.TypeError,KE=EE.parseInt,YE=Math.floor,JE=Math.pow,XE=SE("".charAt),ZE=SE(/./.exec),$E=SE([].join),eD=SE(1..toString),tD=SE([].pop),nD=SE([].push),rD=SE("".replace),aD=SE([].shift),iD=SE("".split),sD=SE("".slice),oD=SE("".toLowerCase),dD=SE([].unshift),uD="Invalid scheme",cD="Invalid host",lD="Invalid port",hD=/[a-z]/i,fD=/[\d+-.a-z]/i,pD=/\d/,mD=/^0x/i,vD=/^[0-7]+$/,gD=/^\d+$/,AD=/^[\da-f]+$/i,bD=/[\0\t\n\r #%/:<>?@[\\\]^|]/,yD=/[\0\t\n\r #/:<>?@[\\\]^|]/,_D=/^[\u0000-\u0020]+/,wD=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,kD=/[\t\n\r]/g,xD=function(e){var t,n,r,a;if("number"==typeof e){for(t=[],n=0;n<4;n++)dD(t,e%256),e=YE(e/256);return $E(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,a=0,i=0;i<8;i++)0!==e[i]?(a>n&&(t=r,n=a),r=null,a=0):(null===r&&(r=i),++a);return a>n&&(t=r,n=a),t}(e),n=0;n<8;n++)a&&0===e[n]||(a&&(a=!1),r===n?(t+=n?":":"::",a=!0):(t+=eD(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},ED={},DD=OE({},ED,{" ":1,'"':1,"<":1,">":1,"`":1}),SD=OE({},DD,{"#":1,"?":1,"{":1,"}":1}),RD=OE({},SD,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),TD=function(e,t){var n=BE(e,0);return n>32&&n<127&&!CE(t,e)?e:encodeURIComponent(e)},ID={ftp:21,file:null,http:80,https:443,ws:80,wss:443},CD=function(e,t){var n;return 2==e.length&&ZE(hD,XE(e,0))&&(":"==(n=XE(e,1))||!t&&"|"==n)},OD=function(e){var t;return e.length>1&&CD(sD(e,0,2))&&(2==e.length||"/"===(t=XE(e,2))||"\\"===t||"?"===t||"#"===t)},PD=function(e){return"."===e||"%2e"===oD(e)},LD={},BD={},UD={},MD={},FD={},jD={},GD={},ND={},qD={},HD={},VD={},QD={},zD={},WD={},KD={},YD={},JD={},XD={},ZD={},$D={},eS={},tS=function(e,t,n){var r,a,i,s=ME(e);if(t){if(a=this.parse(s))throw WE(a);this.searchParams=null}else{if(void 0!==n&&(r=new tS(n,!0)),a=this.parse(s,null,r))throw WE(a);(i=QE(new VE)).bindURL(this),this.searchParams=i}};tS.prototype={type:"URL",parse:function(e,t,n){var r,a,i,s,o,d=this,u=t||LD,c=0,l="",h=!1,f=!1,p=!1;for(e=ME(e),t||(d.scheme="",d.username="",d.password="",d.host=null,d.port=null,d.path=[],d.query=null,d.fragment=null,d.cannotBeABaseURL=!1,e=rD(e,_D,""),e=rD(e,wD,"$1")),e=rD(e,kD,""),r=PE(e);c<=r.length;){switch(a=r[c],u){case LD:if(!a||!ZE(hD,a)){if(t)return uD;u=UD;continue}l+=oD(a),u=BD;break;case BD:if(a&&(ZE(fD,a)||"+"==a||"-"==a||"."==a))l+=oD(a);else{if(":"!=a){if(t)return uD;l="",u=UD,c=0;continue}if(t&&(d.isSpecial()!=CE(ID,l)||"file"==l&&(d.includesCredentials()||null!==d.port)||"file"==d.scheme&&!d.host))return;if(d.scheme=l,t)return void(d.isSpecial()&&ID[d.scheme]==d.port&&(d.port=null));l="","file"==d.scheme?u=WD:d.isSpecial()&&n&&n.scheme==d.scheme?u=MD:d.isSpecial()?u=ND:"/"==r[c+1]?(u=FD,c++):(d.cannotBeABaseURL=!0,nD(d.path,""),u=ZD)}break;case UD:if(!n||n.cannotBeABaseURL&&"#"!=a)return uD;if(n.cannotBeABaseURL&&"#"==a){d.scheme=n.scheme,d.path=LE(n.path),d.query=n.query,d.fragment="",d.cannotBeABaseURL=!0,u=eS;break}u="file"==n.scheme?WD:jD;continue;case MD:if("/"!=a||"/"!=r[c+1]){u=jD;continue}u=qD,c++;break;case FD:if("/"==a){u=HD;break}u=XD;continue;case jD:if(d.scheme=n.scheme,a==rE)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=LE(n.path),d.query=n.query;else if("/"==a||"\\"==a&&d.isSpecial())u=GD;else if("?"==a)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=LE(n.path),d.query="",u=$D;else{if("#"!=a){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=LE(n.path),d.path.length--,u=XD;continue}d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=LE(n.path),d.query=n.query,d.fragment="",u=eS}break;case GD:if(!d.isSpecial()||"/"!=a&&"\\"!=a){if("/"!=a){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,u=XD;continue}u=HD}else u=qD;break;case ND:if(u=qD,"/"!=a||"/"!=XE(l,c+1))continue;c++;break;case qD:if("/"!=a&&"\\"!=a){u=HD;continue}break;case HD:if("@"==a){h&&(l="%40"+l),h=!0,i=PE(l);for(var m=0;m<i.length;m++){var v=i[m];if(":"!=v||p){var g=TD(v,RD);p?d.password+=g:d.username+=g}else p=!0}l=""}else if(a==rE||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()){if(h&&""==l)return"Invalid authority";c-=PE(l).length+1,l="",u=VD}else l+=a;break;case VD:case QD:if(t&&"file"==d.scheme){u=YD;continue}if(":"!=a||f){if(a==rE||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()){if(d.isSpecial()&&""==l)return cD;if(t&&""==l&&(d.includesCredentials()||null!==d.port))return;if(s=d.parseHost(l))return s;if(l="",u=JD,t)return;continue}"["==a?f=!0:"]"==a&&(f=!1),l+=a}else{if(""==l)return cD;if(s=d.parseHost(l))return s;if(l="",u=zD,t==QD)return}break;case zD:if(!ZE(pD,a)){if(a==rE||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()||t){if(""!=l){var A=KE(l,10);if(A>65535)return lD;d.port=d.isSpecial()&&A===ID[d.scheme]?null:A,l=""}if(t)return;u=JD;continue}return lD}l+=a;break;case WD:if(d.scheme="file","/"==a||"\\"==a)u=KD;else{if(!n||"file"!=n.scheme){u=XD;continue}if(a==rE)d.host=n.host,d.path=LE(n.path),d.query=n.query;else if("?"==a)d.host=n.host,d.path=LE(n.path),d.query="",u=$D;else{if("#"!=a){OD($E(LE(r,c),""))||(d.host=n.host,d.path=LE(n.path),d.shortenPath()),u=XD;continue}d.host=n.host,d.path=LE(n.path),d.query=n.query,d.fragment="",u=eS}}break;case KD:if("/"==a||"\\"==a){u=YD;break}n&&"file"==n.scheme&&!OD($E(LE(r,c),""))&&(CD(n.path[0],!0)?nD(d.path,n.path[0]):d.host=n.host),u=XD;continue;case YD:if(a==rE||"/"==a||"\\"==a||"?"==a||"#"==a){if(!t&&CD(l))u=XD;else if(""==l){if(d.host="",t)return;u=JD}else{if(s=d.parseHost(l))return s;if("localhost"==d.host&&(d.host=""),t)return;l="",u=JD}continue}l+=a;break;case JD:if(d.isSpecial()){if(u=XD,"/"!=a&&"\\"!=a)continue}else if(t||"?"!=a)if(t||"#"!=a){if(a!=rE&&(u=XD,"/"!=a))continue}else d.fragment="",u=eS;else d.query="",u=$D;break;case XD:if(a==rE||"/"==a||"\\"==a&&d.isSpecial()||!t&&("?"==a||"#"==a)){if(".."===(o=oD(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(d.shortenPath(),"/"==a||"\\"==a&&d.isSpecial()||nD(d.path,"")):PD(l)?"/"==a||"\\"==a&&d.isSpecial()||nD(d.path,""):("file"==d.scheme&&!d.path.length&&CD(l)&&(d.host&&(d.host=""),l=XE(l,0)+":"),nD(d.path,l)),l="","file"==d.scheme&&(a==rE||"?"==a||"#"==a))for(;d.path.length>1&&""===d.path[0];)aD(d.path);"?"==a?(d.query="",u=$D):"#"==a&&(d.fragment="",u=eS)}else l+=TD(a,SD);break;case ZD:"?"==a?(d.query="",u=$D):"#"==a?(d.fragment="",u=eS):a!=rE&&(d.path[0]+=TD(a,ED));break;case $D:t||"#"!=a?a!=rE&&("'"==a&&d.isSpecial()?d.query+="%27":d.query+="#"==a?"%23":TD(a,ED)):(d.fragment="",u=eS);break;case eS:a!=rE&&(d.fragment+=TD(a,DD))}c++}},parseHost:function(e){var t,n,r;if("["==XE(e,0)){if("]"!=XE(e,e.length-1))return cD;if(t=function(e){var t,n,r,a,i,s,o,d=[0,0,0,0,0,0,0,0],u=0,c=null,l=0,h=function(){return XE(e,l)};if(":"==h()){if(":"!=XE(e,1))return;l+=2,c=++u}for(;h();){if(8==u)return;if(":"!=h()){for(t=n=0;n<4&&ZE(AD,h());)t=16*t+KE(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,u>6)return;for(r=0;h();){if(a=null,r>0){if(!("."==h()&&r<4))return;l++}if(!ZE(pD,h()))return;for(;ZE(pD,h());){if(i=KE(h(),10),null===a)a=i;else{if(0==a)return;a=10*a+i}if(a>255)return;l++}d[u]=256*d[u]+a,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;d[u++]=t}else{if(null!==c)return;l++,c=++u}}if(null!==c)for(s=u-c,u=7;0!=u&&s>0;)o=d[u],d[u--]=d[c+s-1],d[c+--s]=o;else if(8!=u)return;return d}(sD(e,1,-1)),!t)return cD;this.host=t}else if(this.isSpecial()){if(e=UE(e),ZE(bD,e))return cD;if(t=function(e){var t,n,r,a,i,s,o,d=iD(e,".");if(d.length&&""==d[d.length-1]&&d.length--,(t=d.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(a=d[r]))return e;if(i=10,a.length>1&&"0"==XE(a,0)&&(i=ZE(mD,a)?16:8,a=sD(a,8==i?1:2)),""===a)s=0;else{if(!ZE(10==i?gD:8==i?vD:AD,a))return e;s=KE(a,i)}nD(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=JE(256,5-t))return null}else if(s>255)return null;for(o=tD(n),r=0;r<n.length;r++)o+=n[r]*JE(256,3-r);return o}(e),null===t)return cD;this.host=t}else{if(ZE(yD,e))return cD;for(t="",n=PE(e),r=0;r<n.length;r++)t+=TD(n[r],ED);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return CE(ID,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&CD(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,a=e.host,i=e.port,s=e.path,o=e.query,d=e.fragment,u=t+":";return null!==a?(u+="//",e.includesCredentials()&&(u+=n+(r?":"+r:"")+"@"),u+=xD(a),null!==i&&(u+=":"+i)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?s[0]:s.length?"/"+$E(s,"/"):"",null!==o&&(u+="?"+o),null!==d&&(u+="#"+d),u},setHref:function(e){var t=this.parse(e);if(t)throw WE(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new nS(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+xD(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(ME(e)+":",LD)},getUsername:function(){return this.username},setUsername:function(e){var t=PE(ME(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=TD(t[n],RD)}},getPassword:function(){return this.password},setPassword:function(e){var t=PE(ME(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=TD(t[n],RD)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?xD(e):xD(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,VD)},getHostname:function(){var e=this.host;return null===e?"":xD(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,QD)},getPort:function(){var e=this.port;return null===e?"":ME(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=ME(e))?this.port=null:this.parse(e,zD))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+$E(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,JD))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=ME(e))?this.query=null:("?"==XE(e,0)&&(e=sD(e,1)),this.query="",this.parse(e,$D)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=ME(e))?("#"==XE(e,0)&&(e=sD(e,1)),this.fragment="",this.parse(e,eS)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var nS=function(e){var t=IE(this,rS),n=jE(arguments.length,1)>1?arguments[1]:void 0,r=qE(t,new tS(e,!1,n));kE||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},rS=nS.prototype,aS=function(e,t){return{get:function(){return HE(this)[e]()},set:t&&function(e){return HE(this)[t](e)},configurable:!0,enumerable:!0}};if(kE&&(TE(rS,"href",aS("serialize","setHref")),TE(rS,"origin",aS("getOrigin")),TE(rS,"protocol",aS("getProtocol","setProtocol")),TE(rS,"username",aS("getUsername","setUsername")),TE(rS,"password",aS("getPassword","setPassword")),TE(rS,"host",aS("getHost","setHost")),TE(rS,"hostname",aS("getHostname","setHostname")),TE(rS,"port",aS("getPort","setPort")),TE(rS,"pathname",aS("getPathname","setPathname")),TE(rS,"search",aS("getSearch","setSearch")),TE(rS,"searchParams",aS("getSearchParams")),TE(rS,"hash",aS("getHash","setHash"))),RE(rS,"toJSON",(function(){return HE(this).serialize()}),{enumerable:!0}),RE(rS,"toString",(function(){return HE(this).serialize()}),{enumerable:!0}),zE){var iS=zE.createObjectURL,sS=zE.revokeObjectURL;iS&&RE(nS,"createObjectURL",DE(iS,zE)),sS&&RE(nS,"revokeObjectURL",DE(sS,zE))}FE(nS,"URL"),wE({global:!0,constructor:!0,forced:!xE,sham:!kE},{URL:nS});var oS=function(){function e(t){C.default(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return I.default(e,[{key:"_getFakeCustomParams",value:function(){var e={_vid:["bla_bla1","bla_bla2","bla_bla3"],_1ld:["1ld_1","1ld_2","1ld_3","1ld_4"],_1lp:["1lp_1","1lp_2"]},t={};for(var n in e){var r=e[n];t[n]=r[Math.floor(Math.random()*r.length)]}return t}},{key:"checkCustomParams",value:function(){var e=this;try{var t={},n=this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled,r=new P.default(location.href,!0);for(var a in r.query)t[a]=r.query[a];return Object.keys(t).filter(function(t){var n=this;return S.default(this,e),this.customParamKeys.some(function(e){return S.default(this,n),e===t}.bind(this))}.bind(this)).length>0||n?(console.log("custom-params",t,n),t):void console.log("custom-params, none")}catch(e){console.log("_checkCustomParams.Error",e)}}}]),e}(),dS=function(){function e(t,n){C.default(this,e),this.adContainer=t,this.onResume=n}return I.default(e,[{key:"show",value:function(){this.adResumeButton.style.display="block",this.adResumeButtonOverlay.style.display="block"}},{key:"hide",value:function(){this.adResumeButton.style.display="none",this.adResumeButtonOverlay.style.display="none"}},{key:"add",value:function(){var e=this;try{var t=document.createElement("div");this.adResumeButton=t,t.id="gd__resume__button",t.setAttribute("title","Resume"),this.addStyles(),t.classList.add("gd__resume__button"),t.addEventListener("click",function(){S.default(this,e),this.onResume()}.bind(this)),this.adContainer.appendChild(t);var n=document.createElement("div");this.adResumeButtonOverlay=n,n.id="gd__resume__button__overlay",n.classList.add("gd__resume__button__overlay"),this.adContainer.appendChild(n)}catch(e){console.log("Resume button add error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__resume__button__style",e,'\n .gd__resume__button{\n background-image: url("https://img.gamedistribution.com/play-black.svg");\n background-color:white; \n width: 120px;\n height: 120px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(50% - 60px);\n left: calc(50% - 60px);\n margin: 0;\n border-radius: 50%;\n border: 2px solid white;\n animation: play-button 1s ease-in-out infinite alternate;\n -webkit-animation: play-button 1s ease-in-out infinite alternate;\n }\n \n .gd__resume__button__overlay {\n position: fixed;\n display: none;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0,0,0,0.5);\n z-index: 1999;\n cursor: pointer;\n }\n @keyframes play-button {\n 0% {\n transform: scale(1.0);\n -webkit-transform: scale(1.0);\n }\n 100% {\n transform: scale(1.1);\n -webkit-transform: scale(1.1);\n }\n }\n .gd__resume__button:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n ')}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),uS=function(){function e(t,n){C.default(this,e),this.adContainer=t,this.onResume=n}return I.default(e,[{key:"show",value:function(){this.rewardLabel.style.display="block"}},{key:"hide",value:function(){this.rewardLabel.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div");this.rewardLabel=e;var t=document.createElement("span");t.innerText="To receive the reward, please do not skip the ad",this.addStyles(),e.classList.add("gd__reward__label"),t.classList.add("gd__reward__span"),this.rewardLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__reward__label__style",e,"\n .gd__reward__label{\n background-color:black; \n width: 160px;\n // height: 35px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: 40px;\n left: 10px;\n margin: 0;\n border-radius: 5px;\n border: .5px solid gray;\n text-align: center;\n }\n .gd__reward__label:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n .gd__reward__span{\n color: white;\n font-size: 12px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),cS=function(){function e(t,n,r){C.default(this,e),this.adContainer=t,this.onResume=n,this.OnSkip=r}return I.default(e,[{key:"show",value:function(){this.skipAd.style.display="block"}},{key:"hide",value:function(){this.skipAd.style.display="none"}},{key:"add",value:function(){var e=this;try{var t=document.createElement("div");this.skipAd=t;var n=document.createElement("span");n.innerText="Skip Ad >>",this.addStyles(),t.classList.add("gd__skip__ad"),n.classList.add("gd__skip__span"),this.skipAd.appendChild(n),this.adContainer.appendChild(t),this.skipAd.addEventListener("click",function(){S.default(this,e),this.OnSkip()}.bind(this))}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__skip__ad__style",e,"\n .gd__skip__ad{\n background-color:black; \n width: 260px;\n // height: 35px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: 40px;\n right: 0px;\n margin: 0;\n border-radius: 5px;\n border: .5px solid gray;\n text-align: center;\n padding: 10px;\n }\n .gd__skip__ad:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n .gd__skip__span{\n color: white;\n font-size: 22px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),lS=function(){function e(t){C.default(this,e),this.adContainer=t}return I.default(e,[{key:"show",value:function(){this.audioLabel.style.display="block"}},{key:"hide",value:function(){this.audioLabel.style.display="none"}},{key:"mute",value:function(){document.getElementById("game").contentWindow.postMessage("mute","*")}},{key:"unmute",value:function(){document.getElementById("game").contentWindow.postMessage("unmute","*")}},{key:"add",value:function(){try{var e=document.createElement("div");this.audioLabel=e;var t=document.createElement("span");t.innerText="Audio Ad is Playing";var n=document.createElement("span");n.innerHTML="&#9432;",this.addStyles(),e.classList.add("gd__audio__label"),t.classList.add("gd__audio__span"),n.classList.add("gd__audio__span"),this.audioLabel.appendChild(n),this.audioLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__audio__label__style",e,"\n .gd__audio__label{\n background-color: #ffca00; \n width: 200px;\n position: relative;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: 0px;\n margin: 0 auto;\n border-radius: 0px;\n border: 0px;\n text-align: center;\n height: 30px;\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n padding: 5px;\n }\n .gd__audio__span{\n color: black;\n font-size: 14px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),hS=function(){function e(t){C.default(this,e),this.adContainer=t,this.counterLabel=null,this.countdownInterval=null}return I.default(e,[{key:"show",value:function(){this.counterLabel&&(this.counterLabel.style.display="block",this.startCountdown(this.counterSpan,5))}},{key:"hide",value:function(){this.counterLabel&&(this.counterLabel.style.display="none"),this.countdownInterval&&(clearInterval(this.countdownInterval),this.countdownInterval=null)}},{key:"add",value:function(){try{var e=document.createElement("div");this.counterLabel=e;var t=document.createElement("span");this.counterSpan=t,t.innerText="Ad showing in 5...",t.classList.add("gd__counter__span"),this.addStyles(),e.classList.add("gd__counter__label"),e.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"startCountdown",value:function(e,t){var n=this,r=t;e.innerText="Ad showing in ".concat(r,"..."),this.countdownInterval=setInterval(function(){S.default(this,n),(r-=1)>0?e.innerText="Ad showing in ".concat(r,"..."):(clearInterval(this.countdownInterval),e.innerText="Ad is now showing!",this.hide())}.bind(this),1e3)}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__counter__label__style",e,"\n .gd__counter__label {\n position: absolute;\n background-color: rgba(0, 0, 0, 0.5);\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: 0px;\n margin: 0 auto;\n width: 200px;\n height: 40px;\n border-radius: 0px;\n text-align: center;\n padding: 8px;\n top: 87%;\n right: -1px;\n border: 1px solid white;\n }\n .gd__counter__span {\n font-size: 15px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),fS=function(){function e(t,n){C.default(this,e),this.adContainer=n,this.infoLabel=null,this.info=t}return I.default(e,[{key:"show",value:function(){this.infoLabel&&(this.infoLabel.style.display="block")}},{key:"hide",value:function(){this.infoLabel&&(this.infoLabel.style.display="none")}},{key:"add",value:function(){try{var e=document.createElement("div");this.infoLabel=e;var t=document.createElement("span");this.counterSpan=t,t.innerText="".concat(this.info),t.classList.add("gd__ad_info__span"),this.addStyles(),e.classList.add("gd__ad_info__label"),e.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__ad_info__label__style",e,"\n .gd__ad_info__label {\n position: absolute;\n background-color: rgba(0, 0, 0, 0.5);\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: 8px;\n left: 8px;\n margin: 0 auto;\n width: 200px;\n border-radius: 0px;\n text-align: center;\n padding: 8px;\n border: 1px solid white;\n }\n .gd__ad_info__span {\n font-size: 15px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),pS=function(){function e(t){C.default(this,e),this.adContainer=t}return I.default(e,[{key:"show",value:function(){this.t4rButton.style.display="block"}},{key:"hide",value:function(){this.t4rButton.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div"),t=document.createElement("p");this.addStyles(),t.innerText="x",e.appendChild(t),e.id="gd__exit__button",e.setAttribute("title","Exit"),e.classList.add("gd__exit__button"),this.t4rButton=e,document.body.appendChild(e)}catch(e){console.log("Exit button add error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__exit__button__style",e,"\n .gd__exit__button{\n background-color: transparent; \n width: 50px;\n height: 50px;\n position: absolute;\n pointer-events:none; \n z-index: 2000;\n top: 17px;\n right: 17px;\n margin: 0;\n border-radius: 50px;\n border: 1px solid white;\n text-align: center; \n font-size: 16px;\n line-height: normal;\n font-family: 'Arial';\n font-weight: bolder;\n }\n .gd__exit__button:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),mS=!ie((function(){return Object.isExtensible(Object.preventExtensions({}))})),vS={exports:{}},gS=ie((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),AS=ie,bS=it,yS=_r,_S=gS,wS=Object.isExtensible,kS=AS((function(){wS(1)}))||_S?function(e){return!!bS(e)&&((!_S||"ArrayBuffer"!=yS(e))&&(!wS||wS(e)))}:wS,xS=$i,ES=le,DS=Bn,SS=it,RS=_e,TS=tt.f,IS=si,CS=xo,OS=kS,PS=mS,LS=!1,BS=De("meta"),US=0,MS=function(e){TS(e,BS,{value:{objectID:"O"+US++,weakData:{}}})},FS=vS.exports={enable:function(){FS.enable=function(){},LS=!0;var e=IS.f,t=ES([].splice),n={};n[BS]=1,e(n).length&&(IS.f=function(n){for(var r=e(n),a=0,i=r.length;a<i;a++)if(r[a]===BS){t(r,a,1);break}return r},xS({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:CS.f}))},fastKey:function(e,t){if(!SS(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!RS(e,BS)){if(!OS(e))return"F";if(!t)return"E";MS(e)}return e[BS].objectID},getWeakData:function(e,t){if(!RS(e,BS)){if(!OS(e))return!0;if(!t)return!1;MS(e)}return e[BS].weakData},onFreeze:function(e){return PS&&LS&&OS(e)&&!RS(e,BS)&&MS(e),e}};DS[BS]=!0;var jS=$i,GS=mS,NS=ie,qS=it,HS=vS.exports.onFreeze,VS=Object.freeze;jS({target:"Object",stat:!0,forced:NS((function(){VS(1)})),sham:!GS},{freeze:function(e){return VS&&qS(e)?VS(HS(e)):e}});var QS=function(){function e(){C.default(this,e),this.container=null,this.ensureContainer()}return I.default(e,[{key:"ensureContainer",value:function(){this.container||(this.container=document.createElement("div"),this.container.classList.add("gd__toaster__container"),this.type=Object.freeze({ERROR:"error",SUCCESS:"success",SKIP:"skip"}),document.body.appendChild(this.container),this.addStyles())}},{key:"show",value:function(e,t){var n=this;if(this.isRunningOnRevision()&&this.isToastEnabled()){var r=document.createElement("div");r.classList.add("gd__toaster"),t===this.type.ERROR?r.style.background="rgb(244, 67, 54)":t===this.type.SKIP&&(r.style.background="rgb(255, 165, 0)");var a=document.createElement("img");a.src="https://gamedistribution.com/assets/logos/logo-mark.svg",a.classList.add("gd__toaster__icon");var i=document.createElement("div");i.classList.add("gd__toaster__msg"),i.innerText=e,r.appendChild(a),r.appendChild(i),this.container.appendChild(r),requestAnimationFrame(function(){S.default(this,n),r.style.opacity="1",r.style.transform="translateY(0)"}.bind(this)),setTimeout(function(){var e=this;S.default(this,n),r.style.opacity="0",r.style.transform="translateY(20px)",setTimeout(function(){return S.default(this,e),r.remove()}.bind(this),300)}.bind(this),4e3)}}},{key:"addStyles",value:function(){if(!document.getElementById("gd__toaster__style")){var e=document.createElement("style");e.id="gd__toaster__style",e.appendChild(document.createTextNode("\n .gd__toaster__container {\n position: fixed;\n bottom: 20px;\n right: 20px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n z-index: 3000;\n }\n\n .gd__toaster {\n background: rgb(76, 175, 80);\n border-radius: 8px;\n padding: 12px 16px;\n color: white;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n display: flex;\n align-items: center;\n gap: 10px;\n box-shadow: 0px 0px 10px rgba(0,0,0,0.5);\n min-width: 250px;\n max-width: 300px;\n opacity: 0;\n transform: translateY(20px);\n transition: opacity 0.25s ease, transform 0.25s ease;\n }\n\n .gd__toaster__icon {\n width: 22px;\n height: 22px;\n }\n\n .gd__toaster__msg {\n font-size: 14px;\n line-height: 1.3;\n }\n ")),document.body.appendChild(e)}}},{key:"isRunningOnRevision",value:function(){try{return"revision.gamedistribution.com"===document.location.host}catch(e){return!1}}},{key:"isToastEnabled",value:function(){try{return"true"===new URLSearchParams(window.location.search).get("enableToast")}catch(e){return!1}}}]),e}(),zS=function(e){if(!e)return!1;var t=WS.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},WS=Object.prototype.toString;function KS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function YS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KS(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function JS(e){return null!=e&&e.error_url?"<vmap:VASTAdData>".concat(function(e){return e.promo_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),"</vmap:VASTAdData>"):'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>")}var XS,ZS="13998",$S="_cc".concat(ZS),eR=["https://tags.crwdcntrl.net/c/".concat(ZS,"/cc.js?ns=").concat($S)],tR=function(){return!!XS&&"function"==typeof XS.bcpf&&"function"==typeof XS.add},nR=function(e,t){try{if(!tR())return;XS.add(e,t),yo("lotame add success ".concat(e," ").concat(t))}catch(e){yo("lotame add error",err)}},rR=function(e,t){try{if(!tR())return;XS.bcpw(e,t),yo("lotame send success ".concat(e," ").concat(t))}catch(e){}},aR=function(e){var t=this;try{nR("act","play"),nR("med","game"),"complete"===document.readyState?XS.bcpf():XS.bcp(),e.tags.forEach(function(e){S.default(this,t),rR("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),rR("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},iR=function(){window.addEventListener("load",(function(){Tw.once("game-data-ready",function(){var e=D.default(T.default.mark((function e(t){var n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,e.t0=null!=mb&&mb.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,Gw();case 6:e.t0=e.sent;case 7:if(!e.t0){e.next=10;break}return e.abrupt("return");case 10:if(null!==(n=t.lotm)&&void 0!==n&&n.enabled){e.next=13;break}return e.abrupt("return");case 13:return e.next=16,a.getScript(eR[0],"LOTCC_".concat(ZS),{alternates:eR});case 16:"object"===R.default(window[$S])&&(XS=window[$S]),tR()&&aR(t),e.next=23;break;case 20:e.prev=20,e.t1=e.catch(1),yo("lotame init error",e.t1);case 23:case"end":return e.stop()}}),e,null,[[1,20]])})));return function(t){return e.apply(this,arguments)}}())}))},sR=function(){rR("genp","ad video"),rR("act","ad impression")},oR=function(){rR("act","ad skipped")},dR=function(){rR("act","ad click")},uR=function(){rR("act","ad complete")},cR=function(){var e=(new I_).get("partner.url.value"),t=new P.default(e,!0),n={isRevisionTest:!1,useTestAds:!1,disableMidrolltimer:!1};if("revision.gamedistribution.com"===t.host){var r=t.query.test,a="1"===r||"2"===r,i="1"===r;n={useTestAds:a,disableMidrolltimer:i,isRevisionTest:i||a}}return n},lR=function(){function e(){C.default(this,e),this.adContainer=window.document.body}return I.default(e,[{key:"show",value:function(e){this.adSpinner.style.display="block",this.adSpinnerOverlay.style.display="block",e?(this.adSpinner.style.display="block",this.adSpinnerFail.style.display="none",this.adSpinnerButton.style.display="none"):(this.adSpinner.style.display="none",this.adSpinnerFail.style.display="block",this.adSpinnerButton.style.display="block")}},{key:"hide",value:function(){this.adSpinner.style.display="none",this.adSpinnerOverlay.style.display="none"}},{key:"add",value:function(){var e=this;try{this.addStyles();var t=document.createElement("div");t.id="gd__spinner",t.setAttribute("title","Spinner"),t.classList.add("gd__spinner"),this.adSpinner=t;var n=document.createElement("div");n.id="gd__spinner__fail",n.setAttribute("title","Spinner"),n.classList.add("gd__spinner__fail"),n.innerHTML="No Ads Available!",this.adSpinnerFail=n;var r=document.createElement("div");r.id="gd__spinner__button",r.setAttribute("title","Spinner"),r.classList.add("gd__spinner__button"),r.onclick=function(){S.default(this,e),this.hide()}.bind(this);var a=document.createElement("p");a.innerText="OK!",r.appendChild(a),this.adSpinnerButton=r;var i=document.createElement("div");i.id="gd__spinner__logo",i.setAttribute("title","Spinner"),i.classList.add("gd__spinner__logo"),this.adSpinnerLogo=i;var s=document.createElement("div");s.id="gd__spinner__container",s.classList.add("gd__spinner__container"),s.appendChild(this.adSpinner),s.appendChild(this.adSpinnerFail),s.appendChild(this.adSpinnerButton),s.appendChild(this.adSpinnerLogo),this.adSpinnerContainer=s;var o=document.createElement("div");o.id="gd__spinner__overlay",o.classList.add("gd__spinner__overlay"),o.appendChild(this.adSpinnerContainer),this.adSpinnerOverlay=o,this.adContainer.appendChild(this.adSpinnerOverlay)}catch(e){console.log("Spinner error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__spinner__style",e,'\n .gd__spinner__button{ \n text-align: center; \n width: 150px;\n height: 50px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(80% - 25px);\n left: calc(50% - 75px);\n margin: 0;\n font-size: large;\n font-family: monospace;\n background-color: #ff8c1c;\n border-radius: 50px;\n color: white;\n }\n\n .gd__spinner__fail{\n text-align: center; \n width: 300px;\n height: 50px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(65% - 25px);\n left: calc(50% - 150px);\n margin: 0;\n font-size: large;\n font-family: monospace;\n color: #ff8c1c;\n }\n\n .gd__spinner__logo{\n background: url("https://static.gamedistribution.com/android-chrome-192x192.png") no-repeat;\n background-size: cover; \n width: 100px;\n height: 100px;\n position: absolute;\n display: block;\n z-index: 2000;\n cursor: pointer;\n top: calc(30% - 50px);\n left: calc(50% - 50px);\n margin: 0;\n border-radius: 50%;\n }\n\n .gd__spinner__container{ \n background-color: black; \n width: 300px;\n height: 300px;\n position: absolute;\n z-index: 2000;\n cursor: pointer;\n top: calc(50% - 150px);\n left: calc(50% - 150px);\n margin: 0;\n border-radius: 20px;\n border: 2px solid #06b8a2;\n }\n\n\n .gd__spinner{\n background: url("https://static.gamedistribution.com/assets/loader.gif") no-repeat;\n background-size: cover; \n width: 50px;\n height: 50px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(80% - 25px);\n left: calc(50% - 25px);\n margin: 0;\n border-radius: 50%;\n }\n \n .gd__spinner__overlay {\n position: fixed;\n display: none;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0,0,0,0.5);\n z-index: 1999;\n cursor: pointer;\n }\n ')}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}();function hR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hR(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pR(e){var t=e.gameData,n=e.msgrt,r=e.topDomain,a=e.parentDomain,i=e.parentURL;return{send_atom_event:function(e,s){if(function(e){var n=this,r=t.dbglg;return(null==r?void 0:r.enabled)&&r.topics&&r.topics.some(function(t){return S.default(this,n),t===e}.bind(this))}(e)){var o={gid:t.slug,md5:t.gameId,pid:0,pnm:t.pname,ctry:t.ctry,lcl:"en",hle:1,ads:1,args:s,href:window.location.href},d=(new I_).get();return o=fR(fR({},o),d),function(e,t){try{var s=n._layout,o=n._ua,d={tp:e,ct:0,vrs:go.version,url:i,rfr:document.referrer,tdmn:r||a,dpth:0,args:t,ua:{brnm:o.browser.name,brvs:o.browser.version,osnm:o.os.name,osvs:o.os.version,dvmd:o.device.model,w:s.w,h:s.h}};return fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(u.Base64.encode(JSON.stringify(d)))))}catch(e){}}(e,o=s?fR(fR({},o),s):o)}}}}function mR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mR(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var gR=new m.EventEmitter,AR=null,bR=function(){function e(t,n,r){var i=this;if(C.default(this,e),AR)return AR;AR=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=n?a.extendDefaults(s,n):s,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new a.EventBus,this.safetyTimer=null,this.containerTransitionSpeed=0,this.adCounter={},this.adPrerollCount=0,this.adMidrollCount=0,this.adRewardedCount=0,this.preloadedAdType=null,this.requestRunning=!1,this.parentDomain=r.parentDomain,this.topDomain=r.topDomain,this.parentURL=r.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=a.getIMASampleTags(),this.atom_display,this.adType_="",this.rewardGuarantied=!1,this.imaEventList=[],this.clickCount={midroll:0,preroll:0,rewarded:0},this.userAllowedPersonalizedAds=document.location.search.indexOf("gdpr-targeting=0")>=0||document.cookie.indexOf("ogdpr_advertisement=0")>=0?"0":"1",this.parentDomain.includes("girlsgogames")&&(this.userAllowedPersonalizedAds=!1),this.thirdPartyContainer=""!==t?document.getElementById(t):null,this.options.width="number"==typeof this.options.width?this.options.width:"100%"===this.options.width?640:this.options.width.replace(/[^0-9]/g,""),this.options.height="number"==typeof this.options.height?this.options.height:"100%"===this.options.height?360:this.options.height.replace(/[^0-9]/g,"");var o=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,d=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:o,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:d,this.category="",this.tags=[],this.eventCategory="AD",this.adToaster=new QS(window.document.body),this.adToaster.show("GD SDK Loaded Successfully 👍"),this.eventBus.subscribe("LOADED",function(){S.default(this,i),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){S.default(this,i),this._clearSafetyTimer("STARTED")}.bind(this),"ima"),this.eventBus.subscribe("AD_SUCCESS",function(){S.default(this,i),this.adToaster.show("".concat(this.adType_.toUpperCase()," shown successfully!"))}.bind(this)),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){S.default(this,i),this.adToaster.show("Preparing to show ".concat(this.adType_.toUpperCase()," ad. ==> pause everything!!"))}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){S.default(this,i),this.adToaster.show("Advertisement is done. ==> resume everything!!")}.bind(this)),this.eventBus.subscribe("AD_ERROR",function(){S.default(this,i),this.adToaster.show("Failed to show ".concat(this.adType_," Ad"),"error")}.bind(this)),this.eventBus.subscribe("SDK_REWARDED_WATCH_COMPLETE",function(){S.default(this,i),this.adToaster.show("Grant reward to the user!")}.bind(this))}var t,n,r,i,s,o,d,c,l,h,f,p,m,v,g,A,b,_,w,k,x,E,R,L,B,U,M;return I.default(e,[{key:"start",value:(M=D.default(T.default.mark((function e(){var t,n,r,a=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.adSystemInitialize(D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a._init_afg_script({});case 2:case"end":return e.stop()}}),e)}))));case 3:return t=e.sent,this.afgInitSuccess=t.success,e.next=7,this.adSystemInitialize(D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a._init_hl_script();case 2:return e.next=4,a._init_ima_script();case 4:a._createPlayer(),a._setUpIMA();case 6:case"end":return e.stop()}}),e)}))));case 7:if(n=e.sent,this.imaInitSuccess=n.success,r=[],this.afgInitSuccess||r.push(t.error),this.imaInitSuccess||r.push(n.error),!(r.length>0)){e.next=14;break}throw r[0];case 14:window.eventTest=function(e){S.default(this,a),this._broadcast(e,{message:"",status:"success"})}.bind(this),e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(0),wo("gd-adflow error on ads.start",e.t0),new Error(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,17]])}))),function(){return M.apply(this,arguments)})},{key:"adSystemInitialize",value:(U=D.default(T.default.mark((function e(t){var n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={success:!1},e.prev=1,e.next=4,t();case 4:n.success=!0,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),n.error=e.t0;case 10:return e.abrupt("return",n);case 12:case"end":return e.stop()}}),e,null,[[1,7]])}))),function(e){return U.apply(this,arguments)})},{key:"_getDefaultSpilAdapterConfig",value:function(){return{vast:null,url:"https://pubads.g.doubleclick.net/gampad/ads",query:{correlator:"{{CACHEBUSTER}}",description_url:"{{PAGE_URL}}",env:"vp",gdfp_req:1,impl:"s",iu:"/59392726/gd_instream",npa:0,output:"vast",sz:"640x480|400x300",tfcd:0,unviewed_position_start:1}}}},{key:"_getSpilUrl",value:(B=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h,f;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.adType,r=t.options,e.prev=1,s=null===(a=this.gameData.adflw)||void 0===a||null===(i=a.adapterConfig)||void 0===i?void 0:i.spil,o=this.nextAdPosition(n),e.next=6,this._create_dp_context(o,r);case 6:return d=e.sent,s?(yo("spil-adaptor: in _getSpilUrl, adType, adPosition, gamedata",n,o,this.gameData),u=s[o]||s.default||this._getDefaultSpilAdapterConfig()):u=this._getDefaultSpilAdapterConfig(),c=100*d.floor_price,yo("spil-adaptor: fp",d.floor_price),l=this._createCustomAdVastUrl(u,{tnl_keys:{floor_price:c}}),h=l.url,f={url:h,dp:d,hl:{bidFloorApplied:!0}},e.abrupt("return",f);case 17:e.prev=17,e.t0=e.catch(1),console.log("spil-adaptor: Error on getting spil",e.t0);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return B.apply(this,arguments)})},{key:"checkIfTestAdsExist",value:function(){return a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&a.Ls.getBoolean("gd_tag")||cR().useTestAds}},{key:"_getAdVast",value:function(e,t){var n=this;return new Promise(function(){var r=D.default(T.default.mark((function r(i){var s,o,d,u,c,l,h,f,p=this;return T.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&a.Ls.getBoolean("gd_tag")||cR().useTestAds)){r.next=6;break}return s=n.IMASampleTags[e].filter(function(e){return S.default(this,p),e.indexOf("redirecterror")<0}.bind(this)),o=Math.floor(Math.random()*s.length),d=s[o],i({url:d,tnl_keys:{tnl_ad_pos:null==t?void 0:t.adTypeFound}}),r.abrupt("return");case 6:if("spil"!==t.adapter){r.next=8;break}return r.abrupt("return",i(n._getSpilUrl({adType:e,options:t})));case 8:if(void 0!==window.idhb.requestAds){r.next=10;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 10:return r.prev=10,u=n.nextAdPosition(e),null!=t&&t.adTypeFound&&(u=null==t?void 0:t.adTypeFound),n._broadcast("AD_REQUEST",{message:u}),c=n.options,"preroll"===u&&y.isPlainObject(c.preroll)?c=c.preroll:"midroll"===u&&y.isPlainObject(c.midroll)?c=c.midroll:"rewarded"===u&&y.isPlainObject(c.rewarded)&&(c=c.rewarded),l="","audio"===t.adapter||"audio"===t.giftType?(n.isAudioAd=!0,l="midrollaudio"):(n.isAudioAd=!1,l="rewarded"===u?"rewardedVideo":"gdbanner"===u?"gd__banner":"midroll"===u?"midroll":"video1"),r.next=20,window.idhb.isLoaded();case 20:return r.next=22,n._create_dp_context(u,t);case 22:h=r.sent,_o("gd-adflow, before idhb",u,l),f=window.idhb.getAdserverTargetingForAdSlot(l),window.idhb.setAdserverTargeting(vR(vR({},f),{},{adaptor_order:t.adapterIndex})),yo("hl-order 2",window.idhb.getAdserverTargetingForAdSlot(l)),window.idhb.requestAds({slots:O.default({},l,{bidFloor:(null==h?void 0:h.floor_price)||void 0}),callback:function(e,t){var r=this;S.default(this,p),"Missing configuration"===(null==e?void 0:e.error)&&n._broadcast("HL_CONFIG_ERROR",{status:"warning"}),!h||null!=t&&t.bidFloorApplied||fetch(h.skip_url).catch(function(e){S.default(this,r)}.bind(this));var a={src:"hl",tnl_keys:vR(vR({},window.idhb.getAdserverTargetingForAdSlot(l)),{},{tnl_ad_pos:u,tnl_asset_id:n.gameData.gameId}),url:e,dp:h,hl:t};n._extend_hl_url(a),i(a)}.bind(this)}),r.next=34;break;case 31:throw r.prev=31,r.t0=r.catch(10),new Error(r.t0);case 34:case"end":return r.stop()}}),r,this,[[10,31]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===a.AdType.Rewarded)return this.adRewardedCount++,"rewarded";if(e===a.AdType.Interstitial){var t=!1===this.gameData.preroll||1===this.adPrerollCount;return t?this.adMidrollCount++:this.adPrerollCount++,t||this.adMidrollCount>0?"midroll":"preroll"}return"midroll"}},{key:"getAdPosition",value:function(e){return e===a.AdType.Rewarded?"rewarded":e===a.AdType.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"getCurrentAdPosition",value:function(e){return e===a.AdType.Interstitial?1===this.adPrerollCount&&0===this.adMidrollCount?"preroll":"midroll":e===a.AdType.Rewarded?"rewarded":void 0}},{key:"_requestPromo",value:function(e,t){var n=new google.ima.AdsRequest;return n.adsResponse=function(e){return'<VAST version="3.0"> \n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA['.concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,"]]></VASTAdTagURI> \n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),n.linearAdSlotWidth=this.options.width,n.linearAdSlotHeight=this.options.height,n.nonLinearAdSlotWidth=this.options.width,n.nonLinearAdSlotHeight=this.options.height,n.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(n.vastLoadTimeout=this.options.vast_load_timeout),n.setAdWillAutoPlay(t.autoplayAllowed),n.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(n),n}},{key:"_requestAd",value:function(e,t){var n=this;return t=t||{},new Promise(function(r){var a=this;if(S.default(this,n),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var i,s,o=null==e||null===(i=e.tnl_keys)||void 0===i?void 0:i.tnl_ad_pos;this.adSuccess=!1,this.contentPaused=!1;var d=new google.ima.AdsRequest,u=this._transformVast(e,t),c=vR(vR({},t),{},{adTag:u,tnl_ad_pos:o});this.adCounter[o]=this.adCounter[o]||0,this.adCounter[o]++;var l=e.dp,h=e.hl;this.current_dp=l,l&&!u.bidder&&(l.adtag_url=u.url);var f=this._isVMAP(o);this.adContext.isVMAP=f,function(){S.default(this,a),t.shouldFail&&(l?(l.adtag_url="dp_original_broken",l.fallback_url="dp_fallback_broken"):u.url="original_broken",yo("gd-adflow, _requestAd, dp.adtag_url",null==l?void 0:l.adtag_url),yo("gd-adflow, _requestAd, dp.fallback_url",null==l?void 0:l.fallback_url),yo("gd-adflow, _requestAd, adTag.url",u.url))}.bind(this);var p=this._getExternalVast(null===(s=t)||void 0===s?void 0:s.adType);if(p)d.adTagUrl=p;else if(f){_o("gd-adflow, _isVMAP");var m=function(e){for(var t=[],n="",r=Date.now(),a={ppos:1,lip:!0,vad_type:"linear"},i=0;i<e.length;i++){var s=new P.default(e[i].adtag.url,!0);s.query=YS(YS({},s.query),{},{ad_rule:0,vpos:e[i].position,pod:1,correlator:0===i?r:++r,output:"xml_vast3"}),i<e.length-1&&(s.query=YS(YS({},s.query),a)),t.push(s.toString())}for(var o=Date.now(),d=1;d<=t.length;d++){var u,c,l,h;n+='<vmap:AdBreak timeOffset="start" breakType="linear" breakId="break-'.concat(d,'">\n <vmap:AdSource id="').concat(o++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(JS({id:o++,adtag_url:t[d-1],error_url:null===(u=e[d-1].dp)||void 0===u?void 0:u.error_url,impression_url:null===(c=e[d-1].dp)||void 0===c?void 0:c.impression_url,fallback_url:null===(l=e[d-1].dp)||void 0===l?void 0:l.fallback_url,fallback_imp_url:null===(h=e[d-1].dp)||void 0===h?void 0:h.fallback_imp_url}),"</vmap:AdSource>\n </vmap:AdBreak>")}return'<?xml version="1.0" encoding="UTF-8"?>\n <vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">\n '.concat(n,"\n </vmap:VMAP>").trim()}(this._get_vmap_context({dp:l,adtag:u,position:"preroll"===c.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(o)}));d.adsResponse=m}else if(l&&h.bidFloorApplied){yo("gd-adflow, vast wrapper"),l.adtag_url||(l.adtag_url=u.url);var v=function(e){return e.promo_url?e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="2" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(l);d.adsResponse=v}else if(l&&l.fallback_url){yo("gd-adflow, vast wrapper 2");var g=function(e){return'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim()}(l);d.adsResponse=g}else yo("gd-adflow, without dp"),d.adTagUrl=u.url;d.linearAdSlotWidth=this.options.width,d.linearAdSlotHeight=this.options.height,d.nonLinearAdSlotWidth=this.options.width,d.nonLinearAdSlotHeight=this.options.height,d.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(d.vastLoadTimeout=this.options.vast_load_timeout),d.setAdWillAutoPlay(t.autoplayAllowed);var A=t.opusSuccess||t.autoplayRequiresMute;d.setAdWillPlayMuted(A),this.adsLoader.requestAds(d,c);try{this._broadcast("AD_SDK_REQUEST",{message:c})}catch(e){}r(d)}catch(e){throw new Error(e)}}.bind(this))}},{key:"_getExternalVast",value:function(e){var t;try{var n,r,a,i,s,o,d=this.getCurrentAdPosition(e),u=null===(n=this.gameData)||void 0===n?void 0:n.cust_vast,c=(null==u?void 0:u[d])||(null==u?void 0:u.default);if(!c)return yo("[ext-vast] no custom vast config"),null;yo("[ext-vast] has custom vast config",u);var l=null==c||null===(r=c.maps)||void 0===r||null===(a=r.position)||void 0===a?void 0:a[d],h=function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),!1===t&&window.orientation>-1&&(t=!0),t}();yo("[ext-vast] is-mobile",h);var f=h?"mobile":"desktop",p=null==c||null===(i=c.maps)||void 0===i||null===(s=i.env)||void 0===s?void 0:s[f],m=this._createCustomAdVastUrl(c,{tnl_keys:{slug:null===(o=this.gameData)||void 0===o?void 0:o.slug,mapped_position:l,mapped_env:p}});t=null==m?void 0:m.url,yo("[ext-vast] check result",t)}catch(e){wo("[ext-vast] check err",e)}return t}},{key:"cancel",value:function(e){var t,n;if(!1!==this.requestRunning){this.requestRunning=!1,this._resetAdsLoader(),this._hide("cancel"),this.activeAdContainer&&(this.activeAdContainer.style.opacity=1),this.adsManager&&this.adsManager.setVolume(null!==(t=this.adContext)&&void 0!==t&&t.muteRequested?0:1),this.t4rButton&&this.t4rButton.hide();var r=(null==e||null===(n=e.message)||void 0===n?void 0:n.indexOf("NO_VAST_URL"))>=0,a="AD_SDK_CANCELED";this._broadcast(a,{name:a,message:"Advertisement has been canceled.",status:"warning",noVast:r,analytics:{category:this.eventCategory,action:a,label:this.gameData.gameId}})}}},{key:"_checkAutoPlay",value:(L=D.default(T.default.mark((function e(){var t=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r,a=this;S.default(this,t);var i=navigator.userAgent.toLowerCase();i.indexOf("safari")>-1&&i.indexOf("chrome");var s=(null===(r=this.gameData)||void 0===r?void 0:r._apOps)||!0;q.default.video({inline:!0,muted:!1}).then(function(t){S.default(this,a);var n=t.result;t.error,e(!0===n?{autoplayAllowed:s,autoplayRequiresMute:!1}:{autoplayAllowed:s,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return L.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(R=D.default(T.default.mark((function e(){var t;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._checkAutoPlay(!1);case 2:return t=e.sent,this._autoplay=t,this.video_ad_player.autoplay=t.autoplayAllowed,this.video_ad_player.volume=t.autoplayRequiresMute?0:1,this.video_ad_player.muted=!!t.autoplayRequiresMute,t.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0),e.abrupt("return",t);case 9:case"end":return e.stop()}}),e,this)}))),function(){return R.apply(this,arguments)})},{key:"startAd",value:(E=D.default(T.default.mark((function e(t){var n,r,i,s=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.adType,i=t.params,this.adType_=r,this.isAudioAd=!1,this.adContext=vR(vR({},i),{},{adType:r}),null!==(n=this.gameData.adspn)&&void 0!==n&&n.enabled&&(this.adFlowProcessSpinner||(this.adFlowProcessSpinner=new lR,this.adFlowProcessSpinner.add()),this.adFlowProcessSpinner.show(!0)),"promo"!==(null==i?void 0:i.adapter)){e.next=7;break}return e.abrupt("return",this._startPromo(i,r));case 7:if("adsense"!==(null==i?void 0:i.adapter)){e.next=31;break}if(r!==a.AdType.Interstitial){e.next=24;break}if("preroll"!==(null==i?void 0:i.position)){e.next=13;break}return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 13:if("start"!==(null==i?void 0:i.position)){e.next=17;break}return e.abrupt("return",this._startAdsensePlacementStart(t));case 17:if("next"!==(null==i?void 0:i.position)){e.next=21;break}return e.abrupt("return",this._startAdsensePlacementNext(t));case 21:return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 22:e.next=29;break;case 24:if(r!==a.AdType.Rewarded){e.next=28;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(t));case 28:throw new Error("Unsupported ad type");case 29:e.next=44;break;case 31:if(!["ima","spil","audio"].some(function(e){return S.default(this,s),e===(null==i?void 0:i.adapter)}.bind(this))){e.next=42;break}if(r!==a.AdType.Interstitial){e.next=37;break}return e.abrupt("return",this._startInterstitialAd(i));case 37:if(r!==a.AdType.Rewarded){e.next=41;break}return e.abrupt("return",this._startRewardedAd(i));case 41:throw new Error("Unsupported ad type");case 42:["opus"].some(function(e){return S.default(this,s),e===(null==i?void 0:i.adapter)}.bind(this))&&this._startOpusAd(i);case 44:case"end":return e.stop()}}),e,this)}))),function(e){return E.apply(this,arguments)})},{key:"_startOpusAd",value:(x=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h,f,p,m,v,g=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r="rewarded"===t.adTypeFound?"reward":t.adTypeFound,this._send_atom_event("opus-ad.start"),!this.requestRunning){e.next=8;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),this._broadcast("AD_ERROR",{message:"Ad is already running",status:"error",reason:"request-running"}),this._send_atom_event("opus-ad.already-running"),e.abrupt("return");case 8:if(a=null===(n=window.gdlocus)||void 0===n?void 0:n.adBreak){e.next=13;break}return this._send_atom_event("opus-ad.not-initialized"),this._broadcast("AD_ERROR",{message:"Locus adBreak not found",status:"error",reason:"opus-not-found"}),e.abrupt("return");case 13:this._send_atom_event("opus-ad.ready"),i=void function(){return S.default(this,g),!0}.bind(this),this.requestRunning=!0,s=this.gameData,o=s.gameId,d=s.slug,u=s.title,c={assetId:o,slug:d,title:u,debug:i},l=function(e){S.default(this,g),this.opusEventReceived=!0,this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),h=function(e){S.default(this,g),this.opusEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),f=function(){S.default(this,g),this.opusEventReceived=!0}.bind(this),p=function(){S.default(this,g),this.opusEventReceived=!0,this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),m=function(e){S.default(this,g),this.opusEventReceived=!0,this.resetForNext();var t="".concat(r);this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):this._broadcast("AD_ERROR",{message:e.errorMessage,errorType:e.errorType,status:e.breakStatus,reason:"opus-error"})}.bind(this),console.log("opus-ad meta",c),v={type:r,meta:c,beforeAd:l,afterAd:h,adBreakDone:m},"reward"===r&&(v=vR(vR({},v),{},{adDismissed:f,adViewed:p})),this.opusEventReceived=!1,this._startTimeoutForOpus(),a&&a(v);case 30:case"end":return e.stop()}}),e,this)}))),function(e){return x.apply(this,arguments)})},{key:"preloadAd",value:(k=D.default(T.default.mark((function e(t){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==a.AdType.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==a.AdType.Rewarded){e.next=8;break}return e.abrupt("return","gdsdk://preloaded");case 8:throw new Error("Unsupported ad type");case 9:case"end":return e.stop()}}),e)}))),function(e){return k.apply(this,arguments)})},{key:"addAdComponents",value:function(){var e=this,t=function(){S.default(this,e),this.adsManager.resume()}.bind(this),n=function(){S.default(this,e),this.rewardGuarantied||(this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!1),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this._hideSkipButton(),this.cancel()}.bind(this);try{this.adResume=new dS(this.adContainer,t),this.adResume.add(),this.rewardedLabel=new uS(this.adContainer,t),this.rewardedLabel.add(),this.skipAdButton=new cS(this.adContainer,t,n),this.skipAdButton.add(),this.audioAdLabel=new lS(window.document.body),this.audioAdLabel.add(),this.audioAdLabel.hide(),this.adCounterLabel=new hS(window.document.body),this.adCounterLabel.add(),this.adCounterLabel.hide(),this.adInfoLabel=new fS("Watching multiple ads now will reduce adbreaks later",window.document.body),this.adInfoLabel.add(),this.adInfoLabel.hide()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(w=D.default(T.default.mark((function e(t){var n=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=D.default(T.default.mark((function e(r,i){var s,o,d,u,c,l,h,f,p,m=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{yo("display_test load",t),(o=t?t.containerId:null)||i("Container id is not specified"),d=document.getElementById(o),document.getElementById(o)||i("No container is found with this id - ".concat(o)),void 0===window.idhb.requestAds&&i("Prebid.js wrapper script hit an error or didn't exist!"),u=t.slotId?t.slotId:"gd__banner@".concat(o),document.getElementById(u)||(c="\n .gd__banner{\n z-index: ".concat(a.Layers.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n }"),document.getElementById("gd__banner__style")||((l=document.createElement("style")).type="text/css",l.id="gd__banner__style",l.styleSheet?l.styleSheet.cssText=c:l.appendChild(document.createTextNode(c)),d.appendChild(l)),(h=document.createElement("div")).id=u,h.classList.add("gd__banner"),d.appendChild(h)),n.atom_display=null,null!==(s=n.atom_display)&&void 0!==s&&s.params&&window.idhb.setAdserverTargeting(null===(f=n.atom_display)||void 0===f?void 0:f.params),(p={})[u]={maxSize:[d.offsetWidth,d.offsetHeight]},yo("display_test slots",p),window.idhb.requestAds({slots:p,callback:function(e){S.default(this,m),yo("display_test callback",JSON.stringify(e,null,2))}.bind(this)}),r()}catch(e){console.log("display_test error",e),i(e.message||e)}case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return w.apply(this,arguments)})},{key:"_startInterstitialAd",value:(_=D.default(T.default.mark((function e(t){var n,r,a,i,s,o=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:if(!void function(){if(S.default(this,o),ko.fictionalIMAError)return this._broadcast("AD_ERROR",{message:"fictional IMA error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return r=e.sent,e.next=13,this._loadInterstitialAd(vR(vR({},r),t));case 13:if(a=e.sent,i=a.success,a.args,i){e.next=18;break}return e.abrupt("return");case 18:null!==(n=this.adContext)&&void 0!==n&&n.muteRequested?this.adsManager.setVolume(0):(r.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(s=this.gameData.advlm)||void 0===s?void 0:s.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=28;break;case 23:throw e.prev=23,e.t0=e.catch(0),yo("VAST_URL_2 error",e.t0),this._onError(e.t0),e.t0;case 28:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return _.apply(this,arguments)})},{key:"_startPromo",value:(b=D.default(T.default.mark((function e(t,n){var r,a,i,s,o;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:return this.requestRunning=!0,this.adSuccess=!1,e.next=8,this._initDisplayContainerWithAutoPlay();case 8:return a=e.sent,e.next=11,this._loadPromo(vR(vR({},a),t),n);case 11:if(i=e.sent,s=i.success,i.args,s){e.next=16;break}return e.abrupt("return");case 16:null!==(r=this.adContext)&&void 0!==r&&r.muteRequested?this.adsManager.setVolume(0):(a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(o=this.gameData.advlm)||void 0===o?void 0:o.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),this.msgrt.send("promo.adsense",{message:"".concat(t.position," success")}),e.next=27;break;case 22:throw e.prev=22,e.t0=e.catch(0),this.msgrt.send("promo.adsense.err",{message:"".concat(t.position," failure,").concat(e.t0.message?e.t0.message:e.t0,", [").concat(this.parentURL,"]")}),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,22]])}))),function(e,t){return b.apply(this,arguments)})},{key:"_loadPromo",value:(A=D.default(T.default.mark((function e(t,n){var r,i;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._resetAdsLoader(),e.prev=1,r=this.nextAdPosition(n),i=this._create_promo_context(r),this._requestPromo(i,vR({adType:a.AdType.Interstitial},t)),e.next=7,this._waitOnAdLoad();case 7:return e.abrupt("return",e.sent);case 10:throw e.prev=10,e.t0=e.catch(1),new Error(e.t0);case 13:case"end":return e.stop()}}),e,this,[[1,10]])}))),function(e,t){return A.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(g=D.default(T.default.mark((function e(t){var n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(a.AdType.Interstitial,t);case 6:e.t0=e.sent;case 7:if(n=e.t0,delete this.preloadedInterstitialAdVast,n.url){e.next=12;break}throw new Error("NO_VAST_URL");case 12:return e.next=14,this._requestAd(n,vR({adType:a.AdType.Interstitial},t));case 14:return e.sent,e.next=17,this._waitOnAdLoad();case 17:return e.abrupt("return",e.sent);case 20:throw e.prev=20,e.t1=e.catch(1),console.log("VAST_URL error",e.t1),new Error(e.t1);case 24:case"end":return e.stop()}}),e,this,[[1,20]])}))),function(e){return g.apply(this,arguments)})},{key:"_waitOnAdLoad",value:function(){var e=this;return new Promise(function(t,n){var r=this;S.default(this,e);var a="videoad.preloadad";this.eventBus.unsubscribeScope(a);var i=function(e){var n=this;S.default(this,r),setTimeout(function(){S.default(this,n),this.eventBus.unsubscribeScope(a),t({success:!0,args:e})}.bind(this),1)}.bind(this),s=function(e){var n=this;S.default(this,r),setTimeout(function(){S.default(this,n),this.eventBus.unsubscribeScope(a),t({success:!1,args:e})}.bind(this),1)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",i,a),this.eventBus.subscribe("AD_SDK_CANCELED",s,a),this.eventBus.subscribe("AD_ERROR",s,a)}.bind(this))}},{key:"_startRewardedAd",value:(v=D.default(T.default.mark((function e(t){var n,r,a,i,s,o=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:if(!void function(){if(S.default(this,o),ko.fictionalIMAError)return this._broadcast("AD_ERROR",{message:"fictional IMA error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return r=e.sent,e.next=13,this._loadRewardedAd(vR(vR({},r),t));case 13:if(a=e.sent,i=a.success,a.args,i){e.next=18;break}return e.abrupt("return");case 18:null!==(n=this.adContext)&&void 0!==n&&n.muteRequested?this.adsManager.setVolume(0):(r.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(s=this.gameData.advlm)||void 0===s?void 0:s.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=27;break;case 23:throw e.prev=23,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return v.apply(this,arguments)})},{key:"_loadRewardedAd",value:(m=D.default(T.default.mark((function e(t){var n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(a.AdType.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,vR({adType:a.AdType.Rewarded},t));case 11:return e.sent,e.next=14,this._waitOnAdLoad();case 14:return e.abrupt("return",e.sent);case 17:throw e.prev=17,e.t1=e.catch(1),new Error(e.t1);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return m.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(p=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(a.AdType.Interstitial);case 5:e.t0=e.sent;case 6:return this.preloadedInterstitialAdVast=e.t0,e.abrupt("return",this.preloadedInterstitialAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return p.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(f=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(a.AdType.Rewarded);case 5:e.t0=e.sent;case 6:return this.preloadedRewardedAdVast=e.t0,e.abrupt("return",this.preloadedRewardedAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return f.apply(this,arguments)})},{key:"_onError",value:function(e){this.cancel(e),this._clearSafetyTimer("ERROR")}},{key:"_hide",value:function(e){this.video_ad_player&&(this.video_ad_player.src=""),this.activeAdContainer&&(this.activeAdContainer.style.visibility="hidden")}},{key:"_show",value:function(e){var t=this;if(this.activeAdContainer){this.isAudioAd||(this.activeAdContainer.style.visibility="visible");var n=null==e?void 0:e.mode;e.t4r=this.gameData.__t4r,e.t4rac=this.gameData.__t4rac;var r=this._adrequest_user_context.t4RResult?this._adrequest_user_context.t4RResult:this._isT4R(e);this._adrequest_user_context.t4RResult=r;var a=r.success,i=r.reason,s=this._getT4ROptions(e);if("loaded"===n){var o,d,u=(null===(o=this._adrequest_user_context)||void 0===o||null===(d=o.adTag)||void 0===d?void 0:d.bidder)||"adx";this._broadcast("AD_BIDDER",{bidder:u}),a||this._broadcast("AD_T4R_NONE",{reason:i}),this.activeAdContainer.style.opacity=a?.001:1,a&&null!=e&&e.contentType.startsWith("video/")&&(this.t4rButton=new pS(this.adContainer),this.t4rButton.add(),this._broadcast("AD_T4R_VIDEO")),a&&this.adsManager.setVolume(0),a&&this._broadcast("AD_T4R"),a&&setTimeout(function(){var e;S.default(this,t),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(null!==(e=this.adContext)&&void 0!==e&&e.muteRequested?0:1),this.t4rButton&&this.t4rButton.hide()}.bind(this),((null==s?void 0:s.min)||1234)+Math.random()*((null==s?void 0:s.max)||3210))}else if("click"===n||"first_quartile"===n){var c;if(a&&"click"===n){var l,h=null===(l=this._adrequest_user_context)||void 0===l?void 0:l.tnl_ad_pos;this.clickCount[h]++,this._broadcast("AD_T4R_CLICK")}a||"click"!==n||this._broadcast("AD_CLICK"),this.t4rButton&&this.t4rButton.hide(),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(null!==(c=this.adContext)&&void 0!==c&&c.muteRequested?0:1)}}}},{key:"_createPlayer",value:function(){var e=this,t=document.body||document.getElementsByTagName("body")[0];this.adContainer=document.createElement("div"),this.adContainer.id="".concat(this.prefix,"advertisement"),this.adContainer.style.position=this.thirdPartyContainer?"absolute":"fixed",this.adContainer.style.zIndex=a.Layers.AdsContainer.zIndex,this.adContainer.style.top="0",this.adContainer.style.left="0",this.adContainer.style.width="100%",this.adContainer.style.height="100%",this.thirdPartyContainer&&(this.thirdPartyContainer.style.transform=null);var n=document.createElement("video");n.setAttribute("playsinline",!0),n.setAttribute("webkit-playsinline",!0),n.id="".concat(this.prefix,"advertisement_video"),n.style.position="absolute",n.style.backgroundColor="#000000",n.style.top="0",n.style.left="0",n.style.width=this.options.width+"px",n.style.height=this.options.height+"px",this.video_ad_player=n,this.adContainer.appendChild(n);var r=document.createElement("div");r.id="".concat(this.prefix,"advertisement_slot"),r.style.position="absolute",r.style.top="0",r.style.left="0",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",this.adContainerInner=r,this.activeAdContainer=this.adContainer,window.activeAdContainer=this.activeAdContainer,this.thirdPartyContainer?(this.adContainer.appendChild(r),this.thirdPartyContainer.appendChild(this.adContainer),this.activeAdContainer=this.thirdPartyContainer):(this.adContainer.appendChild(r),t.appendChild(this.adContainer)),this.addAdComponents(),this.activeAdContainer.style.visibility="hidden";var i=function(){S.default(this,e);var t=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:t,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:a,r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",n.style.width=this.options.width+"px",n.style.height=this.options.height+"px"}.bind(this);window.addEventListener("resize",i),window.document.addEventListener("DOMContentLoaded",i)}},{key:"_setUpIMA",value:function(){this.adDisplayContainer=new google.ima.AdDisplayContainer(this.adContainerInner,this.video_ad_player),this.adsLoader=new google.ima.AdsLoader(this.adDisplayContainer),this.adsLoader.getSettings().setDisableCustomPlaybackForIOS10Plus(!0),this.adsLoader.getSettings().setLocale(this.options.locale),this.adsLoader.getSettings().setVpaidMode(this._getVPAIDMode()),this.adsLoader.getSettings().setAutoPlayAdBreaks(!0);var e=this.adsLoader.getSettings().getNumRedirects();this.adsLoader.getSettings().setNumRedirects(2*e),this.adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this._onAdsManagerLoaded,!1,this),this.adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdError,!1,this)}},{key:"_onAdsManagerLoaded",value:function(e){var t=this,n=new google.ima.AdsRenderingSettings;n.autoAlign=!1,n.enablePreloading=!1,n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.useStyledNonLinearAds=!0,n.uiElements=[google.ima.UiElements.AD_ATTRIBUTION,google.ima.UiElements.COUNTDOWN],this.adsManager=e.getAdsManager(this.video_ad_player,n),this.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdError.bind(this),!1,this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_METADATA,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CLICK,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.DURATION_CHANGE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.FIRST_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.IMPRESSION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.INTERACTION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LINEAR_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOADED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOG,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.MIDPOINT,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.RESUMED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.THIRD_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.USER_CLOSE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_MUTED,this._onAdEvent.bind(this),this),window.addEventListener("resize",function(){S.default(this,t),this.adsManager&&this.adsManager.resize(this.options.width,this.options.height,google.ima.ViewMode.NORMAL)}.bind(this)),this.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0);var r=new Date,a=r.getHours(),i=r.getDate(),s=r.getMonth(),o=r.getFullYear(),d="AD_SDK_MANAGER_READY";this._broadcast(d,{name:d,message:"AD SDK is ready",status:"success",analytics:{category:d,action:this.parentDomain,label:"h".concat(a," d").concat(i," m").concat(s," y").concat(o)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var t,n,r,i,s=this,o=new Date,d=o.getHours(),u=o.getDate(),c=o.getMonth(),l=o.getFullYear(),h=a.getKeyByValue(google.ima.AdEvent.Type,e.type),f=!1,p=(null==e||null===(t=e.getAd())||void 0===t?void 0:t.getContentType())||"",m=!p.startsWith("image")&&!p.startsWith("text"),v=null==e||null===(n=e.ad)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.title,g=null==e||null===(i=e.getAd())||void 0===i?void 0:i.data.skippable;this._sendIMAEventsToHB(e);var A=document.getElementById("game"),b="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:b="Fired when an ad rule or a VMAP ad break would have played if autoPlayAdBreaks is false.";break;case google.ima.AdEvent.Type.AD_METADATA:b="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.contentPaused&&(f=!0),this.isAudioAd&&(this.audioAdLabel.hide(),this.isAudioAd=!1),this.rewardGuarantied=!1,b="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:b="Fired when the ad is clicked.";var y=e.getAd().getContentType();this._show({mode:"click",contentType:y}),dR();break;case google.ima.AdEvent.Type.COMPLETE:yo("gd-adflow ON COMPLETE!",e.getAd()),f=this._is_completed(e.getAd()),b="Fired when the ad completes playing.",this.adType_!==a.AdType.Rewarded||this.rewardGuarantied||(this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!0);break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.gameData.fllc.enabled&&(A.style.display="none"),this.contentPaused=!0,b="Fired when content should be paused. This usually happens right before an ad is about to cover the content.";break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.gameData.fllc.enabled&&(A.style.display="block"),b="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",this.contentPaused?f=!0:(this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"got resume without pause, possibly with VMAP",status:"error",skipForward:!0})),this._hideAddResume(),this._hideRewardedLabel(),this._hideSkipButton(),this.t4rButton&&this.t4rButton.hide(),this._clearTimeoutForSkipAddButton();break;case google.ima.AdEvent.Type.DURATION_CHANGE:b="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:b="Fired when the ad playhead crosses first quartile.";var _=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:_});break;case google.ima.AdEvent.Type.IMPRESSION:var w,k,x,E,D,R;if(b="Fired when the impression URL has been pinged.",e.getAd(),console.log("gdsdk: eventname IMPRESSION",this.isAudioAd),this._hideAdSpinner(),this.isAudioAd&&this.audioAdLabel.show(),"preroll"===this.adContext.adTypeFound)(null===(w=this.gameData)||void 0===w||null===(k=w.pAds)||void 0===k||null===(x=k.vmap)||void 0===x?void 0:x.enabled)&&(null===(E=this.gameData)||void 0===E||null===(D=E.pAds)||void 0===D||null===(R=D.vmap)||void 0===R?void 0:R.adtr)&&this.adInfoLabel.show();break;case google.ima.AdEvent.Type.INTERACTION:b="Fired when an ad triggers the interaction callback. Ad interactions contain an interaction ID string in the ad data.";break;case google.ima.AdEvent.Type.LINEAR_CHANGED:b="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var T=e.getAd().getContentType();b=T,this._show({mode:"loaded",contentType:T});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(b=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:b="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:m&&"VPAID"!==v&&this.adResume.show(),b="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:b="Fired when the ad is resumed.",m&&(this.adResume.hide(),this.rewardedLabel.hide());break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:b="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:var I;f=!(null!==(I=this.adContext)&&void 0!==I&&I.isVMAP)&&this._is_completed(e.getAd()),this.adToaster.show("⚠️ Ad was skipped ⚠️","skip"),b="Fired when the ad is skipped by the user.",oR(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:var C;if(this.skipAdButton&&this.skipAdButton.hide(),this.rewardGuarantied=!1,this.adType_===a.AdType.Rewarded)!g&&null!==(C=this.gameData.rwskp)&&void 0!==C&&C.enabled&&(this._skipAdButtonTimeout=setTimeout(function(){S.default(this,s),this.skipAdButton.show(),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!0}.bind(this),3e4)),this.rewardedLabel.show();this._hideAddResume(),b="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:b="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:f=this._is_completed(e.getAd()),b="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:b="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:b="Fired when the ad volume has been muted."}if(""!==h&&""!==b){var O=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,P=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED,L=O||P;"VPAID"===v&&this.imaEventList.push(h),L||this.isAudioAd||this._broadcast(h,{name:h,message:b,status:"success",analytics:{category:h,action:this.parentDomain,label:"h".concat(d," d").concat(u," m").concat(c," y").concat(l)}})}if(f&&!this.adSuccess){this.adSuccess=!0;var B=e.getAd();"VPAID"===v&&this._setAtomEvent();var U="Rainbow"===(null==B?void 0:B.getAdSystem())&&(null==B?void 0:B.getWrapperAdIds().some(function(e){return S.default(this,s),"promo"===e}.bind(this)));yo("gd-adflow isPromoSuccess",U,null==B?void 0:B.getAdSystem(),null==B?void 0:B.getWrapperAdIds()),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:U}),this.resetForNext(e)}}},{key:"_setAtomEvent",value:function(){this.dumper||(this.dumper=new pR({msgrt:this.msgrt,gameData:this.gameData,parentDomain:this.parentDomain,parentURL:this.parentURL,topDomain:this.parentURL}),this.dumper);var e={eventList:this.imaEventList};this.dumper.send_atom_event("vpaid",e),this.imaEventList=[]}},{key:"_clearTimeoutForSkipAddButton",value:function(){this._skipAdButtonTimeout&&(clearTimeout(this._skipAdButtonTimeout),this._skipAdButtonTimeout=null)}},{key:"_run_atom_tag_aws_test",value:function(e){var t=this;try{var n,r,a,i,s;if(!((null===(n=this.gameData)||void 0===n||null===(r=n.aws_tst)||void 0===r?void 0:r.enabled)&&(null===(a=this.gameData)||void 0===a||null===(i=a.aws_tst)||void 0===i||null===(s=i.ep)||void 0===s?void 0:s.atm)))return;var o=e.type,d=e.url;if("none"===o||!d)return;d=d.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(d).then(function(){S.default(this,t)}.bind(this))}catch(e){}}},{key:"_findAtomTagUrl",value:function(e,t){var n=this,r={type:"none"};try{var a=this.current_dp,i=a.id,s=a.error_url,o=a.impression_url,d=a.fallback_imp_url,u=a.promo_imp_green_url;if(!e&&!t)return r={type:"imp_err",url:s};var c=e.getWrapperAdIds().some(function(e){return S.default(this,n),e==="".concat(i)}.bind(this)),l=e.getWrapperAdIds().some(function(e){return S.default(this,n),"fallback"===e}.bind(this)),h=e.getWrapperAdIds().some(function(e){return S.default(this,n),"promo"===e}.bind(this));c&&t?r={type:"normal_imp",url:o}:c&&!t?r={type:"normal_err",url:s}:h&&t?r={type:"promo_imp",url:u}:l&&t&&(r={type:"fallbacj_imp",url:d})}catch(e){}return r}},{key:"_onAdError",value:function(e){this.requestRunning=!1,this._resetAdsLoader(),this._clearSafetyTimer("ERROR"),this._hide("_onAdError"),this._sendIMAEventsToHB(e);try{var t="AD_ERROR",n=e.getError(),r=n.getErrorCode().toString()||n.getVastErrorCode().toString(),a=this._getInnerErrorCode(n);gR.emit("AD_ERROR",r),this._broadcast(t,{message:r,details:a,status:"warning",analytics:{category:t,action:a,label:r}}),this._hideAddResume(),this._clearTimeoutForSkipAddButton()}catch(e){}}},{key:"_hideAddResume",value:function(){try{this.adResume&&this.adResume.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_hideAdSpinner",value:function(){try{var e;null!==(e=this.gameData.adspn)&&void 0!==e&&e.enabled&&this.adFlowProcessSpinner&&this.adFlowProcessSpinner.hide()}catch(e){console.log("Error on hide adSpinner",e)}}},{key:"_hideRewardedLabel",value:function(){try{this.adType_===a.AdType.Rewarded&&this.rewardedLabel&&this.rewardedLabel.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_hideSkipButton",value:function(){try{this.adType_===a.AdType.Rewarded&&this.skipAdButton&&this.skipAdButton.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_sendIMAEventsToHB",value:function(e){if(window.idhb&&"function"==typeof window.idhb.onImaEvent)try{window.idhb.onImaEvent({event:e})}catch(e){}}},{key:"_resetAdsLoader",value:function(){this.adsManager&&(this.adsManager.destroy(),this.adsManager=null,this._adrequest_user_context=null),this.adsLoader&&this.adsLoader.contentComplete()}},{key:"_startSafetyTimer",value:function(e,t){var n=this;this.safetyTimer&&clearTimeout(this.safetyTimer),this.safetyTimer=window.setTimeout(function(){S.default(this,n),this.cancel(),this._clearSafetyTimer(t)}.bind(this),e)}},{key:"_clearSafetyTimer",value:function(e){void 0!==this.safetyTimer&&null!==this.safetyTimer&&(clearTimeout(this.safetyTimer),this.safetyTimer=void 0)}},{key:"_getVPAIDMode",value:function(){return google.ima.ImaSdkSettings.VpaidMode.ENABLED}},{key:"_getPrebidScripts",value:function(){var e=["https://hb.improvedigital.com/pbw/headerlift.min.js","http://hb.improvedigital.com/pbw/headerlift.min.js"];return this.options.hb_script?[this.options.hb_script].concat(e):e}},{key:"_getInnerErrorCode",value:function(e){if(zS(e.getInnerError)){var t=e.getInnerError();if(t)return zS(t.getErrorCode)&&zS(t.getVastErrorCode)?t.getErrorCode().toString()||t.getVastErrorCode().toString():t.message}}},{key:"resetForNext",value:function(){this.requestRunning=!1,this._hide("resetForNext")}},{key:"_createCustomAdVastUrl",value:function(e,t){var n=this;if(e){var r=this.macros.transform(e,{get:function(e){if(S.default(this,n),t&&t.tnl_keys)return t.tnl_keys[e.toLowerCase()]}.bind(this)});for(var a in r.query||{}){var i=r.query[a];y.isPlainObject(i)&&(r.query[a]=H.default.stringify(i))}var s=new P.default(r.url,!0);return V.default(s.query,r.query||{}),vR({url:s.toString()},t)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new P.default(e.url,!0),a=this._transformQuery(e,t,r);a&&(n.url=r.toString());var i=a?r:new P.default(e.url,!0);if(i.query.cust_params){var s=H.default.parse(i.query.cust_params);n.bidder=s.hb_bidder,n.cust_params=s}n.url_parsed=i}catch(e){n.hasError=!0,n.message=e.message,n.bidder="error",console.log(e.message)}return n}},{key:"_transformQuery",value:function(e,t,n){var r=this;if(e&&t&&e.tnl_keys){var a=this.options.vast_query;if(t.retry_on_success&&this.options.retry_on_success&&y.isPlainObject(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:t.retry_on_failure&&this.options.retry_on_failure&&y.isPlainObject(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=F.default(a),y.isPlainObject(a)){var i=n.query;if(a.$$remove){for(var s in i){new RegExp(a.$$remove,"i").test(s)&&delete i[s]}delete a.$$remove}var o=H.default.parse(i.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var d in o){new RegExp(a.cust_params.$$remove,"i").test(d)&&delete o[d]}delete a.cust_params.$$remove}var u=this.macros.transform(a,{get:function(t){return S.default(this,r),e.tnl_keys[t.toLowerCase()]}.bind(this)});return i.cust_params=o,V.default(i,u),i.cust_params=H.default.stringify(i.cust_params),!0}}}},{key:"_isExcludedBidderForT4R",value:function(){var e=this;try{var t,n,r,a,i=(null===(t=this._adrequest_user_context)||void 0===t||null===(n=t.adTag)||void 0===n?void 0:n.bidder)||"adx";this.msgrt.send("bidder",{message:i}),yo("ex_bidder ad request context",this._adrequest_user_context,'bidder:"'.concat(i,'"'));var s=(null===(r=this.gameData.t4rc)||void 0===r?void 0:r.bidder_exc)||[],o=(null===(a=this.gameData.t4rc)||void 0===a?void 0:a.bidder_inc)||[],d=!1;return o.length>0?d=!o.some(function(t){return S.default(this,e),t===i}.bind(this)):s.length>0&&(d=s.some(function(t){return S.default(this,e),t===i}.bind(this))),yo("ex_bidder_result",i,d),d}catch(e){console.log("ex_bidder ERR",e)}}},{key:"_isExcludedBidderForT4RWithBidderExcRate",value:function(){var e,t,n=this._isExcludedBidderForT4R(),r=null===(e=this.gameData)||void 0===e||null===(t=e.t4rc)||void 0===t?void 0:t.bidder_exc_rate,a=null!=r&&r.enabled?(null==r?void 0:r.rate)||.8:0,i=Math.random();return n||i<a}},{key:"_isT4R",value:function(e){var t=null==e?void 0:e.contentType,n={isImage:null==t?void 0:t.startsWith("image/"),isText:"text"===t,isVideo:null==t?void 0:t.startsWith("video/")},r=Object.values(this._getT4RValidators(e)||{}),a={success:!0};try{for(var i=0,s=r;i<s.length;i++){var o=(0,s[i])(n);if(!o.success){a=o;break}}}catch(e){a={success:!1,reason:"internal-error"}}return a}},{key:"_getT4RValidators",value:function(e){var t=this,n=function(n){return S.default(this,t),e.t4rac.enabled?{success:!0,name:"ddate"}:{success:!1,reason:"ddate",name:"ddate"}}.bind(this),r=function(e){if(S.default(this,t),this.gameData.publishedAt){var n=new Date(this.gameData.publishedAt);return((new Date).getTime()-n.getTime())/864e5<=10?{success:!1,reason:"pdate-1",name:"pdate"}:{success:!0,name:"pdate"}}return{success:!1,reason:"pdate-2",name:"pdate"}}.bind(this),a=function(n){var r,a,i,s;S.default(this,t);var o=this.gameData.meta,d=e.t4r.meta;return(null==o||null===(r=o.ast)||void 0===r?void 0:r.c)>=(null==d||null===(a=d.ast)||void 0===a?void 0:a.c)&&(null==o||null===(i=o.sit)||void 0===i?void 0:i.c)>=(null==d||null===(s=d.sit)||void 0===s?void 0:s.c)?{success:!1,reason:"meta",name:"meta"}:{success:!0,name:"meta"}}.bind(this),i=function(e){S.default(this,t);var n=this._isExcludedBidderForT4RWithBidderExcRate();return this.msgrt.send("bidder.ex",{message:n?"true":"false"}),{success:!n,reason:n?"bidder":null,name:"bidder"}}.bind(this),s=function(n){var r,a;S.default(this,t);var i=null===(r=this._adrequest_user_context)||void 0===r?void 0:r.tnl_ad_pos,s=i&&this.clickCount[i]>=(null===(a=e.t4r[i])||void 0===a?void 0:a.count);return{success:!s,reason:s?"click-count":null,name:"click-count"}}.bind(this),o=function(n){var r,a;S.default(this,t);var i=null===(r=this._adrequest_user_context)||void 0===r?void 0:r.tnl_ad_pos,s=i&&(null===(a=e.t4r[i])||void 0===a?void 0:a.enabled);return{success:s,reason:s?null:"rule-check",name:"rule-check"}}.bind(this),d=function(n){var r,a;if(S.default(this,t),!n.isVideo)return{success:!0,name:"viper-check"};var i=null===(r=this._adrequest_user_context)||void 0===r?void 0:r.tnl_ad_pos,s=(null===(a=e.t4r[i])||void 0===a?void 0:a.viper)||0;if(s>0){var o,d=Math.random()<s,u=i&&d&&(null===(o=e.t4r[i])||void 0===o?void 0:o.enabled);return{success:u,reason:u?null:"viper-check",name:"viper-check"}}return{success:!1,reason:"rule-check-viper",name:"viper-check"}}.bind(this),u=function(e){S.default(this,t);var n=e.isImage,r=e.isText,a=e.isVideo,i=n||r||a;return{success:i,reason:i?null:"media-format",name:"media-format"}}.bind(this);return{checkRule:o,checkMediaFormat:u,checkPublishDate:r,checkMeta:a,checkClickCount:s,checkViper:d,checkExcludedBidder:i,checkT4rActivation:n}}},{key:"_isVMAP",value:function(e){var t,n,r,a,i,s,o,d,u,c,l,h,f,p,m;if(!e)return!1;var v="preroll"===e&&(!0===(null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap)||!0===(null===(r=this.gameData)||void 0===r||null===(a=r.pAds)||void 0===a||null===(i=a.vmap)||void 0===i?void 0:i.enabled))||"midroll"===e&&(!0===(null===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o?void 0:o.vmap)||!0===(null===(d=this.gameData)||void 0===d||null===(u=d.mAds)||void 0===u||null===(c=u.vmap)||void 0===c?void 0:c.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(f=this.gameData)||void 0===f||null===(p=f.rAds)||void 0===p||null===(m=p.vmap)||void 0===m?void 0:m.enabled));if(!v)return!1;var g=this._get_vmap_config(e),A=this.adCounter[e];return void 0!==(null==g?void 0:g.start)?A>=(null==g?void 0:g.start):v}},{key:"_getT4ROptions",value:function(e){var t,n=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;switch(n){case"preroll":case"midroll":case"rewarded":return e.t4r[n]}}},{key:"_is_completed",value:function(e){var t=e.getContentType(),n=e.getAdPodInfo();return!(!t.startsWith("image/")&&"text"!==t&&1!==n.getTotalAds())}},{key:"_get_vmap_context",value:function(e){for(var t=e.adtag,n=e.position,r=e.config,a=e.dp,i=r.count||2,s=[],o=1;o<=i;o++){var d={};d.adtag=this._createCustomAdVastUrl(r["vast_"+o])||t,d.position=n,d.dp=r["vast_"+o]?void 0:a,s.push(d)}return s}},{key:"_get_vmap_config",value:function(e){var t,n,r,a,i,s,o,d;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap;case"midroll":return null===(r=this.gameData)||void 0===r||null===(a=r.mAds)||void 0===a?void 0:a.vmap;case"rewarded":return null===(i=this.gameData)||void 0===i||null===(s=i.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(d=o.pAds)||void 0===d?void 0:d.vmap}}},{key:"_isDP",value:function(e){var t,n,r;return!!e&&!0===(null===(t=this.gameData)||void 0===t||null===(n=t.dp)||void 0===n||null===(r=n[e])||void 0===r?void 0:r.enabled)}},{key:"_create_dp_display_context",value:function(){var e=this;return new Promise(function(t){var n=this;S.default(this,e);try{var r={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new oS(this.gameData).checkCustomParams();a&&(r.cp=a);var i=encodeURIComponent(u.Base64.encode(JSON.stringify(r)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(i)).then(function(e){return S.default(this,n),e.json()}.bind(this)).then(function(e){if(S.default(this,n),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),t();var r=e.p/100;this.msgrt.send("dp.fp",{message:r}),t({params:{fp:r},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(i),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(i)})}.bind(this)).catch(function(e){S.default(this,n),this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),t()}.bind(this))}catch(e){this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),t()}}.bind(this))}},{key:"_create_promo_context",value:function(e){var t,n=this,r={id:this.topDomain||this.parentDomain,au:e||"unknown",ty:"video",aid:this.gameData.gameId,pgu:this.parentURL},a=Object.keys(r).map(function(e){return S.default(this,n),"".concat(e,"=").concat(encodeURIComponent(r[e]))}.bind(this)).join("&");encodeURIComponent(u.Base64.encode(JSON.stringify(r)));var i=null===(t=this.gameData.promo)||void 0===t?void 0:t.rainbow,s=null==i?void 0:i.enabled,o="https://tag.atom.gamedistribution.com/v1/rainbow/?".concat(a),d=s?o:void 0;return function(){S.default(this,n),ko.promoError&&(console.log("promo-test fictional promo error"),d=void 0)}.bind(this),{promo_url:d,promo_imp_blue_url:s?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:s?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0}}},{key:"_create_dp_context",value:function(e,t){var n=this;return new Promise(function(){var r=D.default(T.default.mark((function r(a){var i,s,o,d,c,l=this;return T.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,n._isDP(e)){r.next=5;break}return n.msgrt.send("dp.na",{message:"rule"}),r.abrupt("return",a());case 5:s={id:n.topDomain||n.parentDomain,au:e||"unknown",ty:"video",aid:n.gameData.gameId,pgu:n.parentURL},(o=new oS(n.gameData).checkCustomParams())&&(s.cp=o),d=encodeURIComponent(u.Base64.encode(JSON.stringify(s))),yo("gd-adflow isLastAdapter",null==t?void 0:t.adapterIndex,null==t?void 0:t.isLastAdapter),c=null===(i=n.gameData.promo)||void 0===i?void 0:i.rainbow,yo("gd-adflow promo_enabled",!1,null==c?void 0:c.enabled,null==t?void 0:t.isLastAdapter),fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(d)).then(function(e){return S.default(this,l),e.json()}.bind(this)).then(function(e){if(S.default(this,l),!e||!e.p)return n.msgrt.send("dp.na",{message:"atom"}),a();var t=e.p/100;n.msgrt.send("dp.fp",{message:t}),a({id:Date.now(),floor_price:t,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(d,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(d),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(d),promo_url:void 0,promo_imp_blue_url:void 0,promo_imp_green_url:void 0})}.bind(this)).catch(function(e){S.default(this,l),n.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),a()}.bind(this)),r.next=20;break;case 16:r.prev=16,r.t0=r.catch(0),n.msgrt.send("dp.err",{message:(null===r.t0||void 0===r.t0?void 0:r.t0.message)||r.t0}),a();case 20:case"end":return r.stop()}}),r,this,[[0,16]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"_extend_dp_with_adsense",value:function(e,t){if(e&&t)try{var n,r=new P.default(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var a=H.default.parse(r.query.cust_params);if(!a.tnl_asset_id)return;a.adsense=1,r.query.cust_params=H.default.stringify(a,!1),e.fallback_url=r.toString(),e.fallback_imp_url="https://tag.atom.gamedistribution.com/v1/rainbow/green"}catch(e){}}},{key:"_extend_hl_url",value:function(e){e.dp;var t=e.hl;e.src;var n=e.tnl_keys,r=!0!==(null==t?void 0:t.bidFloorApplied)?0:1;0===r&&null!=n&&n.hasOwnProperty("fp")?r=2:1!==r||null!=n&&n.hasOwnProperty("fp")||(r=3),n.bfa=r;try{var a,i=new P.default(e.url,!0);if(null===(a=i.query)||void 0===a||!a.cust_params)return;var s=H.default.parse(i.query.cust_params);s.bfa=r,s.adsense=0,i.query.cust_params=H.default.stringify(s,!1),e.url=i.toString(),t.vastUrl=e.url}catch(e){}finally{this.msgrt.send("bfa",{message:r})}}},{key:"_init_hl_script",value:(h=D.default(T.default.mark((function e(t){var n,r,i,s,o,d,u,c,l,h,f,p,m=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=this._getPrebidScripts(),o=s[0],d=function(){return S.default(this,m),!1}.bind(this),window.idhb=window.idhb||{iabCmpExists:d},window.idhb.options=window.idhb.options||{},Object.assign(window.idhb.options,{assetId:this.gameData.gameId,configUrl:this.topDomain||this.parentDomain,parentUrl:this.parentURL,pageType:"gd"}),"undefined"===window.idhb.options.configUrl&&(window.idhb.options.configUrl=null),window.idhb.que=window.idhb.que||[],(u=new URL(o)).searchParams.append("referer",window.idhb.options.configUrl),o=u.href,e.next=13,a.getScript(o,"gdsdk_prebid",{alternates:s,error_prefix:"Blocked:",exists:function(){return S.default(this,m),window.idhb.requestAds}.bind(this)});case 13:return e.next=15,this.checkOpphbPath();case 15:c=a.getQueryString("ch",window.location.href),l=a.getQueryString("ch_date",window.location.href),h={tnl_content_category:this.category.toLowerCase()},c&&(h.channel=c),l&&(h.ch_date=l),(f=a.getQueryString("hl_label",this.parentURL)||a.getQueryString("hl_label",window.location.href))&&(h.label=f),window.idhb.setAdserverTargeting(h),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),null!=(p=window.idhb.getConfig())&&null!==(n=p.hbw)&&void 0!==n&&null!==(r=n.slots)&&void 0!==r&&null!==(i=r.gd__banner)&&void 0!==i&&i.sizes&&(p.hbw.slots.gd__banner.sizes=[[120,600],[160,600],[250,250],[300,50],[300,100],[300,250],[300,600],[320,50],[320,480],[336,280],[728,90]],window.idhb.setConfig(p)),window.idhb.addEventListener("slotRenderEnded",function(e){var t=this;S.default(this,m);try{var n,r,a=e.slotId.split("@");a=1===a.length?a[0]:a[1],e.isEmpty?(null!==(n=this.atom_display)&&void 0!==n&&n.error_url&&(fetch(this.atom_display.error_url).catch(function(e){S.default(this,t)}.bind(this)),delete this.atom_display),yo("display_test DISPLAYAD_ERR",e),this._broadcast("DISPLAYAD_ERROR",{message:a,status:"warning"})):(null!==(r=this.atom_display)&&void 0!==r&&r.impression_url&&(fetch(this.atom_display.impression_url).catch(function(e){S.default(this,t)}.bind(this)),delete this.atom_display),yo("display_test DISPLAYAD_IMPRESSION"),this._broadcast("DISPLAYAD_IMPRESSION",{message:a,status:"success"}))}catch(e){}}.bind(this));case 27:case"end":return e.stop()}}),e,this)}))),function(e){return h.apply(this,arguments)})},{key:"checkOpphbPath",value:(l=D.default(T.default.mark((function e(){var t,n,r,a,i,s;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=this.topDomain||this.parentDomain||"",a=(null===(t=this.gameData)||void 0===t?void 0:t.gameId)||"",i=(null===(n=this.options)||void 0===n?void 0:n.width)||640,e.next=6,fetch("https://pub.headerlift.com/opphb?page_url=".concat(r,"&page_type=gd&page_width=").concat(i,"&aid=").concat(a));case 6:s=e.sent,_o("opphb load success",s),e.next=13;break;case 10:throw e.prev=10,e.t0=e.catch(0),new Error("Blocked: https://pub.headerlift.com/opphb");case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return l.apply(this,arguments)})},{key:"_init_ima_script",value:(c=D.default(T.default.mark((function e(t){var n,r,i=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=["https://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","https://imasdk.googleapis.com/js/sdkloader/ima3.js","http://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","http://imasdk.googleapis.com/js/sdkloader/ima3.js"],r=this.options.debug?n[0]:n[1],e.next=4,a.getScript(r,"gdsdk_ima",{alternates:n,error_prefix:"Blocked:",exists:function(){return S.default(this,i),window.google&&window.google.ima}.bind(this)});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"_init_afg_script",value:(d=D.default(T.default.mark((function e(t){var n,r,i,s,o,d,u=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.gameData.afg_disabled){e.next=3;break}return e.abrupt("return");case 3:return(d={}).crossorigin="anonymous",d["data-ad-client"]=(null==t||null===(n=t.adsense_client)||void 0===n?void 0:n.length)>0?t.adsense_client:"ca-pub-2316275586951220",d["data-ad-frequency-hint"]="30s",d.allow="autoplay",(null==t||null===(r=t.adsense_channel)||void 0===r?void 0:r.length)>0&&(d["data-ad-channel"]=t.adsense_channel),(null==t||null===(i=t.adsense_host)||void 0===i?void 0:i.length)>0&&(d["data-ad-host"]=t.adsense_host),!0===(null==t?void 0:t.adsense_adbreak_test)&&(d["data-adbreak-test"]="on"),null!==(s=this.gameData.sdk.afg)&&void 0!==s&&s.enabled&&null!==(o=this.gameData.sdk.afg)&&void 0!==o&&o.use_own&&(d["data-ad-client"]=this.gameData.sdk.afg.adsense_client,d["data-ad-slot"]=this.gameData.sdk.afg.adsense_ad_slot,d["data-ad-format"]="auto"),e.next=16,a.getScript("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return S.default(this,u),!!window.adsbygoogle}.bind(this),attrs:d});case 16:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 18:case"end":return e.stop()}}),e,this)}))),function(e){return d.apply(this,arguments)})},{key:"fixOutOfBounds",value:function(){try{if(!(this.gameData.afgszf&&this.gameData.afgszf.enabled))return;for(var e=this.gameData.afgszf,t=e.height,n=e.scrolls,r=t||"120vh",a=n||!0,i=document.getElementsByClassName("adsbygoogle"),s=0;s<i.length;s++){var o,d=i[s],u=d&&(null===(o=d.children[0])||void 0===o?void 0:o.children[0]);u&&"IFRAME"===u.tagName&&u.style.height!==r&&(yo("out-of-bounds fix apply"),u.style.height=r,a&&(u.parentElement.style.overflow="auto"))}}catch(e){yo("out-of-bounds error: ".concat(e.message))}}},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(o=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u,c=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(S.default(this,c),ko.fictionalAdSenseError||t.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense rewarded error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.rw.requested"),n=!1,r=function(){S.default(this,c),n=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){S.default(this,c),n=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),i=function(){S.default(this,c),n=!0,this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),s=function(){S.default(this,c),n=!0,this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),o=function(e){S.default(this,c),n=!0,e()}.bind(this),d=function(e){S.default(this,c),n=!0,this.resetForNext();var t="rewarded";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error",skipForward:!0}),"dismissed"!==e.breakStatus&&this._send_atom_event("sg.dbg.rw",e))}.bind(this),u=function(e){window.adsbygoogle.push(e)},setTimeout(function(){S.default(this,c),n||(_o("gd-adflow adsense.reward timeout happened!"),this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"timeout",status:"error",skipForward:!0}),this._send_atom_event("sg.dbg.rw",{breakStatus:"timeout"}))}.bind(this),1e3),u({type:"reward",name:"reward-in-game",beforeAd:r,afterAd:a,adDismissed:i,adViewed:s,beforeReward:o,adBreakDone:d}),e.next=26;break;case 22:throw e.prev=22,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 26:case"end":return e.stop()}}),e,this,[[1,22]])}))),function(e){return o.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(s=D.default(T.default.mark((function e(t){var n,r,a=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(S.default(this,a),ko.fictionalAdSenseError||t.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense preroll error",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),this.adPlacementEventReceived=!1,n=function(){S.default(this,a),this.adPlacementEventReceived=!0}.bind(this),r=function(e){S.default(this,a),this.adPlacementEventReceived=!0,this.resetForNext();var t="preroll";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"}),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"preroll"}),i={type:"preroll",beforeAd:n,adBreakDone:r},window.adsbygoogle.push(i),e.next=22;break;case 18:throw e.prev=18,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 22:case"end":return e.stop()}var i}),e,this,[[1,18]])}))),function(e){return s.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(i=D.default(T.default.mark((function e(t){var n,r,a,i=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(S.default(this,i),ko.fictionalAdSenseError||t.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense preroll error 2",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),n=function(){S.default(this,i),this.adPlacementEventReceived=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){S.default(this,i),this.adPlacementEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),this.adPlacementEventReceived=!1,a=function(e){S.default(this,i),this.adPlacementEventReceived=!0,this.resetForNext();var t="preroll";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"preroll"}),s={type:"start",name:"start-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(s),e.next=23;break;case 19:throw e.prev=19,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 23:case"end":return e.stop()}var s}),e,this,[[1,19]])}))),function(e){return i.apply(this,arguments)})},{key:"_startTimeoutForAdBreak",value:function(e){var t,n,r,a,i,s,o=this;if(null===(t=this.gameData)||void 0===t||null===(n=t.ad_blcks)||void 0===n||null===(r=n.adsenseTimeout)||void 0===r?void 0:r.enabled){null==e||e.adType,null===(a=this.gameData)||void 0===a||null===(i=a.ad_blcks)||void 0===i||null===(s=i.adsenseTimeout)||void 0===s||s.timeout;var d=setTimeout(function(){S.default(this,o),this.adPlacementEventReceived||(this._broadcast("AD_ERROR",{message:"timeout-_startTimeoutForAdBreak",status:"error"}),this.adPlacementEventReceived=!1,this.requestRunning=!1),clearTimeout(d)}.bind(this),5e3)}}},{key:"_startTimeoutForOpus",value:function(){var e=this,t=setTimeout(function(){S.default(this,e),this.opusEventReceived||(this._broadcast("AD_ERROR",{message:"opus-sdk-timeout",status:"error",reason:"forced-sdk-timeout"}),this.opusEventReceived=!1,this.requestRunning=!1),clearTimeout(t)}.bind(this),8e3)}},{key:"_startAdsensePlacementNext",value:(r=D.default(T.default.mark((function e(t){var n,r,a,i=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(S.default(this,i),ko.fictionalAdSenseError||t.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense midroll error",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.mr.requested"),n=function(){S.default(this,i),this.adPlacementEventReceived=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){S.default(this,i),this.adPlacementEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),this.adPlacementEventReceived=!1,a=function(e){S.default(this,i),this.adPlacementEventReceived=!0,this.resetForNext();var t="midroll";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.mr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.mr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"midroll"}),s={type:"next",name:"next-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(s),e.next=23;break;case 19:throw e.prev=19,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 23:case"end":return e.stop()}var s}),e,this,[[1,19]])}))),function(e){return r.apply(this,arguments)})},{key:"_send",value:function(e,t){try{var n=this.msgrt,r=n._layout,a=n._ua,i={tp:e,ct:0,vrs:this.PackageJSON.version,url:this.parentURL,rfr:document.referrer,tdmn:this.topDomain||this.parentDomain,dpth:0,args:t,ua:{brnm:a.browser.name,brvs:a.browser.version,osnm:a.os.name,osvs:a.os.version,dvmd:a.device.model,w:r.w,h:r.h}};return fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(u.Base64.encode(JSON.stringify(i)))))}catch(e){}}},{key:"_send_atom_event",value:function(e,t){var n={gid:this.gameData.slug,md5:this.gameData.gameId,pid:0,pnm:this.gameData.pname,ctry:this.gameData.ctry,lcl:"en",hle:1,ads:1,args:t,href:window.location.href},r=(new I_).get();return n=vR(vR({},n),r),n=t?vR(vR({},n),t):n,this._send(e,n)}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;var t="preroll";return this.adCounter[t]=this.adCounter[t]||0,0===this.adCounter[t]}},{key:"attachAfgPosition",value:function(e){var t=e.params.position;switch(t){case"preroll":case"start":case"pause":case"next":case"browse":case"reward":return}var n=e.adType;if(n===a.AdType.Rewarded)t="reward";else if(n===a.AdType.Interstitial){var r,i;if(this._isAfgPositionStart(e))t=null===(r=this.gameData.pAds)||void 0===r||!r.enabled||null!==(i=this.gameData.loader)&&void 0!==i&&i.enabled?"start":"next";else this._isAfgPositionNext(e)&&(t="next")}t||(t="preroll"),e.params.position=t}},{key:"_broadcast",value:function(e,t){var n=this,r=!1;["AD_ERROR"].some(function(t){return S.default(this,n),t===e}.bind(this))&&(r=!this.adContext.isLastAdapter||this.adContext.extraPromoRunOnFail);var a=this.getCurrentAdPosition(this.adContext.adType);this.eventBus.broadcast(e,vR(vR({},t),{},{skipForward:r,adPosition:a}))}},{key:"_findAdPosition",value:function(){var e;return this.getCurrentAdPosition(null===(e=this.adContext)||void 0===e?void 0:e.adType)}},{key:"mute",value:(n=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.adContext&&(this.adContext.muteRequested=!0),this.adsManager&&this.adsManager.setVolume(0);case 2:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"terminate",value:(t=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.cancel();case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),yR=I.default((function e(t){var n=this;C.default(this,e),O.default(this,"load",D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$g(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),O.default(this,"promo",D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.module){e.next=3;break}return e.next=3,n.load();case 3:return e.abrupt("return",n.module[n.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var r=t.package||"gd-sdk-stone-dynamic",a=t.package_version||"1.1.1",i=t.template||"puzzle",s=t.dependencies||[];this.moduleName="GDPromoByOrbit",this.moduleDefault=i.charAt(0).toUpperCase()+i.slice(1),this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},Xg(this.moduleName,this.moduleConfig)})),_R=I.default((function e(t){var n=this;C.default(this,e),O.default(this,"load",D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$g(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),O.default(this,"splash",D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.module){e.next=3;break}return e.next=3,n.load();case 3:return e.abrupt("return",n.module[n.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var r=t.package||"gd-sdk-air-dynamic",a=t.package_version||"1.2.0",i=t.template||"pluto",s=t.dependencies||[];this.moduleName=t.module_name||"GDSplashDynamic",this.moduleDefault=t.module_instance||i.charAt(0).toUpperCase()+i.slice(1),this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},Xg(this.moduleName,this.moduleConfig)})),wR=function(e,t){console.log(e,t)},kR={},xR={},ER=null;function DR(){for(var e,t=window,n=null,r=null;!e;){try{if("function"==typeof t.__tcfapi||"function"==typeof t.__cmp){"function"==typeof t.__tcfapi?(r=2,n=t.__tcfapi):(r=1,n=t.__cmp),e=t;break}}catch(e){}try{if(t.frames.__tcfapiLocator){r=2,e=t;break}}catch(e){}try{if(t.frames.__cmpLocator){r=1,e=t;break}}catch(e){}if(t===window.top)break;t=t.parent}return kR.version=r,kR.frame=e,kR.function=n,kR.version}function SR(e){var t=this;return ER||(ER=new Promise(function(n){function r(t,r){if(wR("Received a response from CMP",t),r){var a,i;if(!1!==t.gdprApplies)return"tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus?(("boolean"!=typeof(i=(a=t)&&"boolean"==typeof a.gdprApplies?a.gdprApplies:e.defaultGdprScope)||!0===i&&"string"!=typeof a.tcString)&&n({result:"cmpUnexpectedResponse",cmp:kR,consentData:a}),void n({result:"ok",consentData:t})):void 0;n({result:"ok",consentData:t})}else n({result:"cmpCallFailed"})}S.default(this,t),DR(),kR.frame?2===kR.version?(wR("TCF v2 CMP found. Fetching the consent."),kR.function?(wR("CMP API is directly accessible, calling it now..."),kR.function("addEventListener",kR.version,r)):(wR("CMP API is outside the current iframe, calling it now..."),function(e,t,n){var r=this,a="__tcfapi";function i(e){var t="".concat(a,"Return"),n="string"==typeof e.data&&e.data.indexOf(t)>=0?JSON.parse(e.data):e.data;if(n[t]&&n[t].callId){var r=n[t];void 0!==xR[r.callId]&&xR[r.callId](r.returnValue,r.success)}}window[a]=function(e,n,i,s){S.default(this,r);var o=Math.random()+"",d="".concat(a,"Call"),u=O.default({},d,{command:e,parameter:s,callId:o,version:n});xR[o]=i,t.postMessage(u,"*")}.bind(this),window.addEventListener("message",i,!1),window[a](e,kR.version,n)}("addEventListener",kR.frame,r))):n({result:"cmpVersionNotV2",cmp:kR}):n({result:"cmpNotFound"})}.bind(this)),ER)}var RR=new(function(){function e(){C.default(this,e),this.productName="Game Distribution"}var t;return I.default(e,[{key:"checkIfExcluded",value:function(e){try{var t,n;return!(null===(t=e.diagnostic)||void 0===t||null===(n=t.gameDock)||void 0===n||!n.excluded)}catch(e){return console.log("Error on checkIfExclude check",e),!1}}},{key:"track",value:(t=D.default(T.default.mark((function e(t,n){var r,a,i,s,o,d,u;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.checkIfExcluded(n)){e.next=3;break}return e.abrupt("return");case 3:if(i=null==t||null===(r=t.visitor)||void 0===r||null===(a=r.visitorData)||void 0===a?void 0:a.visitorId){e.next=6;break}return e.abrupt("return");case 6:return s=encodeURIComponent(this.productName),o=encodeURIComponent(i),e.prev=8,d="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),e.next=12,fetch(d,{method:"POST"});case 12:e.sent,e.next=28;break;case 15:return e.prev=15,e.t0=e.catch(8),console.log("GAME_DOCK. fail v4",e.t0),e.prev=18,u="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),e.next=22,fetch(u,{method:"POST"});case 22:e.sent,e.next=28;break;case 25:e.prev=25,e.t1=e.catch(18),console.log("GAME_DOCK. fail v6",e.t1);case 28:case"end":return e.stop()}}),e,this,[[8,15],[18,25]])}))),function(e,n){return t.apply(this,arguments)})}]),e}());function TR(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return IR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IR(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function IR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var CR=function(e){var t=this,n=e.src,r=e.attributes,a=e.target,i=e.isAsync;return new Promise(function(e,s){var o=this;S.default(this,t);try{var d=document.createElement("script");if(d.async=null==i||i,d.type="text/javascript",d.onload=function(){S.default(this,o),e()}.bind(this),d.onerror=function(){S.default(this,o);var e="Error on script load, Error: ".concat(n);console.log(e),s(e)}.bind(this),d.src=n,r){var u,c=TR(r);try{for(c.s();!(u=c.n()).done;){var l=u.value,h=l.key,f=l.value;d.setAttribute(h,f)}}catch(e){c.e(e)}finally{c.f()}}a||(a=document.head),a.appendChild(d)}catch(e){var p="Error on script load catch, Error: ".concat(n);console.log(p,e),s(p)}}.bind(this))},OR="ffd4774b-99ae-4464-8f40-3afa12b4692e",PR=function(){var e=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,CR({src:"https://cdn.cookielaw.org/consent/tcf.stub.js",attributes:[{key:"id",value:"gd-cookie-pro-tcf-stub"},{key:"charset",value:"UTF-8"}],isAsync:!1});case 3:return e.next=5,CR({src:"https://cdn.cookielaw.org/consent/".concat(OR,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,CR({src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",attributes:[{key:"id",value:"gd-cookie-pro-stub"},{key:"charset",value:"UTF-8"},{key:"data-domain-script",value:OR}],isAsync:!1});case 7:n=void 0,r=void 0,a=void 0,n=(t={inlineScript:"function OptanonWrapper() { }"}).inlineScript,r=t.target,(a=document.createElement("script")).text=n,r||(r=document.head),r.appendChild(a),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("GD: CMP error on load",e.t0);case 13:case"end":return e.stop()}var t,n,r,a}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),LR=new m.EventEmitter,BR={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},UR=!1,MR="CONTENT_PAUSE_REQUESTED",FR="CONTENT_RESUME_REQUESTED",jR="SDK_GAME_START",GR=function(e){if("gd-sdk-on-event"===(null==e?void 0:e.type)){var t,n,r,a;if(!("midroll"===(null==e||null===(t=e.event)||void 0===t?void 0:t.adPosition)))return;var i=(null===(n=e.event)||void 0===n?void 0:n.name)===FR||(null===(r=e.event)||void 0===r?void 0:r.name)===jR;if((null===(a=e.event)||void 0===a?void 0:a.name)===MR&&(UR=!0),i&&UR){UR=!1;window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*")}}};function NR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}window.addEventListener("message",(function(e){var t=this,n=e.data,r=e.origin,a=n.type;if(Object.keys(BR).some(function(e){return S.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)){var i=!n.type||!n.type.startsWith("gd-sdk")&&!("parent-data-response"===n.type)||"sg-game-event"===n.type;GR(n);var s=function(){S.default(this,t);try{var n,r;return null==e||null===(n=e.source)||void 0===n||null===(r=n.location)||void 0===r?void 0:r.href}catch(e){}}.bind(this);if(window.parent&&i){if("https://html5.gamedistribution.com"===r){var o=s();if(!o)return;var d=o&&["9555f04e1900482aaaef710cd2f8c440"].some(function(e){return S.default(this,t),o.indexOf(e)>0}.bind(this)),u=["sg-game-event"].some(function(e){return S.default(this,t),e===(null==n?void 0:n.type)}.bind(this));if(!d&&!u)return}var c=n.eventName,l=n.data;window.mpHelper&&("levelStart"!==c&&"levelFinish"!==c||window.mpHelper.sendStat("level",l.level),"levelFinish"===c&&window.mpHelper.sendStat("score",l.score)),window.parent.postMessage(n,"*")}if(a){var h=BR[r][a];h&&LR.emit(h,n)}}}),!1),function(){for(var e=new a.EventBus,t=0,n=[MR,FR,jR];t<n.length;t++){var r=n[t];e.subscribe(r,(function(e){GR({type:"gd-sdk-on-event",event:e})}))}}();var qR="__msgr",HR=k.v4(),VR=function(e){try{var t=zR(e,e.event),n=YR(window);n&&n!==window.top&&n.postMessage(t,"https://html5.gamedistribution.com")}catch(e){console.error("Error sending event message:",e)}},QR=function(e,t){var n=document.createElement("iframe");return n.src=e,n.style.display="none",n.name=t,n},zR=function(e,t){var n;return{gameId:e.gameId||e.game.gameId,target:(null===(n=e.evnts)||void 0===n?void 0:n.domain)||e.game.evnts.domain,type:"gd-system",token:HR,event_name:t,timestamp:Date.now()}},WR=function(e){var t=this;setInterval(function(){S.default(this,t);var n=zR(e,"Heartbeat");JR(n)}.bind(this),1e3*e.evnts.heartbeatDuration)},KR=function(e){try{var t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NR(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!t.event_name)return;t.token=HR,JR(t)}catch(e){console.error("GD Messager Error:",e.message)}},YR=function e(t){try{var n,r,a=null==t?void 0:t.parent;return"game"===(null==a||null===(n=a.document)||void 0===n||null===(r=n.activeElement)||void 0===r?void 0:r.id)?a:e(a)}catch(e){return t}},JR=function(e){try{window[qR]&&window[qR].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},XR=function(){function e(t){C.default(this,e),this.adContainer=document.getElementById("gdsdk__advertisement"),this.adContainerInner=document.getElementById("gdsdk__advertisement_slot"),this._adRequest=t.adRequest,this._gameData=t._gameData,this._msgrt=t._msgrt,this._adInstance=t._adInstance,this._eventBus=t._eventBus,this.blockedAdsMap=t._blockedAdsMap,this._parentURL=t._parentURL,this._parentDomain=t._parentDomain,this._onResumeGame=t._onResumeGame.bind(t),this._onPauseGame=t._onPauseGame.bind(t),this._onRewardedWatchComplete=t._onRewardedWatchComplete.bind(t),this._onAdError=t._onAdError.bind(t),this._promoShowSuccess=!1}var t,n,r;return I.default(e,[{key:"run",value:function(e){var t=e.duration,n=this;return new Promise(function(){var e=D.default(T.default.mark((function e(r,a){var i,s=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.add();case 3:i=n.show(),setTimeout(function(){S.default(this,s);try{n.hide(),r({success:i})}catch(e){a(e)}}.bind(this),1e3*t),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),a(e.t0);case 10:case"end":return e.stop()}}),e,this,[[0,7]])})));return function(t,n){return e.apply(this,arguments)}}())}},{key:"show",value:function(){return this.promo_data.game?(this.adContainer.style.visibility="visible",this.promo.style.display="block",this._onPauseGame("Pause the game for the promo","success"),this._promoShowSuccess=!0):this._onAdError("Promo not found"),this._promoShowSuccess}},{key:"hide",value:function(){var e;(this.promo.remove(),this.adContainer.style.visibility="hidden",this._promoShowSuccess)&&("reward"===(null===(e=this._adRequest.params)||void 0===e?void 0:e.position)&&this._onRewardedWatchComplete());this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success")}},{key:"add",value:(r=D.default(T.default.mark((function e(){var t,n,r,a=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.fetch_promo();case 3:this.promo_data=e.sent,t=document.createElement("div"),this.promo=t,n=this.promo_data,this.promo.addEventListener("click",function(){var e=D.default(T.default.mark((function e(t){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),console.log(n),a.track_click(n.click_tracking),window.open(n.click_through,"_blank");case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(r=document.createElement("iframe")).src=this.promo_data.renderer_url,r.setAttribute("frameborder",0),this.addStyles(),this.promo.classList.add("gd__promo"),r.classList.add("gd__promo__iframe"),this.promo.appendChild(r),this.adContainer.appendChild(this.promo),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),console.log(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(){return r.apply(this,arguments)})},{key:"addStyles",value:function(){var e="\n .gd__promo{\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: transparent;\n z-index: 1;\n cursor: pointer;\n }\n .gd__promo__iframe{\n position: relative;\n z-index: -1;\n width:".concat(this.adContainerInner.style.width,";\n height:").concat(this.adContainerInner.style.height,";\n }\n "),t=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__promo__style",t,e)}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}},{key:"fetch_promo",value:(n=D.default(T.default.mark((function e(){var t,n=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://tag.atom.gamedistribution.com/v1/rainbow/pick?id=".concat(this._parentDomain,"&aid=").concat(this._gameData.gameId)).then(function(e){return S.default(this,n),e.json()}.bind(this));case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"track_click",value:(t=D.default(T.default.mark((function e(t){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),e}();function ZR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZR(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var eT,tT,nT=function(){var e=D.default(T.default.mark((function e(){var t;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.3.1/socket.io.js",t=["https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.3.1/socket.io.js"],e.next=4,a.getScript(t[0],"soecket.io.js",{alternates:t});case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),rT=[],aT=0,iT=!1,sT=function(){var e=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u,c=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.args,r=t.onError,e.prev=1,!window.isForwarderFrame){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,tk();case 7:if(!(a=e.sent)){e.next=18;break}return e.next=11,a.isLoader();case 11:if(!(i=e.sent)&&(i||a.hasRouter())){e.next=16;break}a.register({method:"sendSocketEvent",handler:function(e){S.default(this,c),uT(e.topic,e.args)}.bind(this)}),e.next=18;break;case 16:return a.registerProxy({alias:"sendSocketEvent",method:"sendSocketEvent"}),e.abrupt("return");case 18:if(s=new P.default(window.location.href),!((o=!["html5.gamedistribution.com","revision.gamedistribution.com"].some(function(e){return S.default(this,c),e.toLowerCase()===s.host.toLowerCase()}.bind(this)))&&a&&a.hasRouter())){e.next=24;break}return e.abrupt("return");case 24:return o&&a&&a.hasRouter(),e.next=27,nT();case 27:eT=k.v4(),d={json:JSON.stringify(n)},u=["wss://ws.gamedistribution.com"],n.isHwp&&u.push("wss://ws-acc-hwp.gamedistribution.com"),rT=u.map(function(e){var t=this;S.default(this,c);var r=io(e,{query:d,upgrade:!1,transports:["websocket"],reconnectionDelay:6e4,autoConnect:!1});return r.on("connect",function(){S.default(this,t)}.bind(this)),r.on("after-connect",function(){var e=D.default(T.default.mark((function e(t){var a,i,s,o,d,u,c;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return tT=tT||(null==t?void 0:t.serverDate),a=n.gameId,i=n.failed,e.next=4,fw({gameId:a,serverDate:tT});case 4:s=e.sent,o=s.visit,d=s.mode,u=s.errors,n.visit=$R($R({},o),{},{stm:d,errors:u}),i&&(n.gameId=a?"failed:wrong":"failed:empty"),c={json:JSON.stringify(n)},r.emit("client-info",{clientId:eT,counter:aT++,serverDate:tT,query:c}),iT=!0;case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),r.on("disconnect",function(){S.default(this,t)}.bind(this)),r.connect(),r}.bind(this)),e.next=37;break;case 34:e.prev=34,e.t0=e.catch(1),r&&r(e.t0);case 37:case"end":return e.stop()}}),e,this,[[1,34]])})));return function(t){return e.apply(this,arguments)}}(),oT=!1,dT=[];function uT(e,t){return cT.apply(this,arguments)}function cT(){return cT=D.default(T.default.mark((function e(t,n){var r,a,i,s=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,tk();case 2:if(!(r=e.sent)){e.next=11;break}return e.next=6,r.isLoader();case 6:if(e.sent||!r.hasRouter()){e.next=11;break}return e.next=10,r.sendSocketEvent({topic:t,args:n});case 10:return e.abrupt("return");case 11:if("play"!==t){e.next=15;break}if(!oT){e.next=14;break}return e.abrupt("return");case 14:oT=!0;case 15:a=function(e,t){var n=this;S.default(this,s);try{var r={json:JSON.stringify(t||{})};rT.forEach(function(t){S.default(this,n),t.emit("socket-event",{topic:e,clientId:eT,counter:aT,serverDate:tT,query:r})}.bind(this))}catch(e){wo("game-session: Error on sending socket-event",e.message)}}.bind(this),i=function(){S.default(this,s),a(t,n)}.bind(this),dT.push(i);case 19:case"end":return e.stop()}}),e,this)}))),cT.apply(this,arguments)}function lT(e){var t=this,n={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},r=Object.keys(n).find(function(r){var a=this;return S.default(this,t),n[r].some(function(t){return S.default(this,a),t===e.params.position}.bind(this))}.bind(this));return r||"midroll"}function hT(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return fT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fT(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function fT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}setInterval((function(){if(0!==dT.length&&rT.length>0&&iT){for(var e=function(){var e=this,r=n[t];r(),dT=dT.filter(function(t){return S.default(this,e),t!==r}.bind(this))},t=0,n=N.default(dT);t<n.length;t++)e();yo("game-session: commands length",dT.length)}}),100);var mT=3,vT=1,gT=5,AT={lastImpressionDate:null,lastInterstitialImpressionDate:null,firstInterstitialImpressionDate:null,imps:0};var bT=new function(){var e={};return{count:function(t){e[t]=e[t]||0,e[t]++},get:function(t){return e[t]=e[t]||0,e[t]},getAll:function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pT(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e)}}};function yT(){return _T.apply(this,arguments)}function _T(){return(_T=D.default(T.default.mark((function e(){var t,n,r,a,i,s,o,d,u,c,l;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},e.next=3,Pw();case 3:if(r=e.sent,a=r.compensation||{enabled:!1},i=null==r||null===(t=r.adTimer)||void 0===t?void 0:t.enabled,n.ruleEnabled=(null==a?void 0:a.enabled)&&i,!(void 0===(null==a?void 0:a.exctg)||(null==a?void 0:a.exctg))){e.next=29;break}s=["co-op","multiplayer","IAPs"],o=(null==r?void 0:r.tags)||[],d=!1,u=hT(o),e.prev=13,l=T.default.mark((function e(){var t,n=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=c.value,s.some(function(e){return S.default(this,n),e===t.title}.bind(this))&&(d=!0);case 2:case"end":return e.stop()}}),e,this)})),u.s();case 16:if((c=u.n()).done){e.next=20;break}return e.delegateYield(l(),"t0",18);case 18:e.next=16;break;case 20:e.next=25;break;case 22:e.prev=22,e.t1=e.catch(13),u.e(e.t1);case 25:return e.prev=25,u.f(),e.finish(25);case 28:n.disabledByTag=d;case 29:return n.isLowScoreGame=wT(r),n.enabled=n.ruleEnabled&&!n.disabledByTag&&n.isLowScoreGame,r.hasActiveCompensations=n.enabled,e.abrupt("return",n);case 33:case"end":return e.stop()}}),e,null,[[13,22,25,28]])})))).apply(this,arguments)}function wT(e){var t=!1,n=e.compensation||{enabled:!1},r=null==e?void 0:e.adsc;if(1===(null==r?void 0:r.s)&&null!=r&&r.t){var a=null==r?void 0:r.t,i=(null==n?void 0:n.esc)||vT,s=(null==n?void 0:n.ascl)||gT,o=a||{},d=o.adsc,u=o.reqsc,c=o.pdur,l=o.rspdur;o.aspdur,t=(l||u/(c/mT))<=i&&d<s}return t}var kT=!1;function xT(){return ET.apply(this,arguments)}function ET(){return(ET=D.default(T.default.mark((function e(){var t;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!kT){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,yT();case 4:(t=e.sent).enabled,t.override,t.giftEnabled,t.midrollPlusEnabled,kT=!0;case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function DT(e){var t=e.rateType,n=e.gameData,r=!1;if(n.hasActiveCompensations){var a=n.compensation,i="gift"===t?null==a?void 0:a.gftr:null==a?void 0:a.mpr;i=void 0===i?1:i,r=Math.random()<=i}else r=!0;return r}function ST(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return RT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return RT(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function RT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var TT=!1,IT=3,CT=5,OT=1,PT=60,LT=10;function BT(){return UT.apply(this,arguments)}function UT(){return(UT=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return AT.imps++,AT.lastImpressionDate=new Date,AT.lastInterstitialImpressionDate=new Date,AT.firstInterstitialImpressionDate||(AT.firstInterstitialImpressionDate=AT.lastInterstitialImpressionDate),e.abrupt("return",!0);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function MT(e){return FT.apply(this,arguments)}function FT(){return FT=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h,f,p,m,v,g,A,b,y,_,w,k,x,E,R,I,C,O,P,L,B,U,M,F,j,G,N,q,H,V,Q,z,W,K,Y,J,X,Z,$,ee,te,ne,re,ae,ie,se,oe,de,ue,ce,le,he,fe,pe,me,ve,ge=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(w=t.gameData,k=t.executeCompensation,x=function(){var e=D.default(T.default.mark((function e(t){var n,r,a;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=(null==t?void 0:t.whenAvailable)||!1,!k){e.next=8;break}return e.next=5,k({whenAvailable:n});case 5:e.t0=e.sent,e.next=11;break;case 8:return e.next=10,BT();case 10:e.t0=e.sent;case 11:return r=e.t0,a=r.args,e.abrupt("return",null==a?void 0:a.success);case 16:return e.prev=16,e.t1=e.catch(0),e.next=20,BT();case 20:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t){return e.apply(this,arguments)}}(),E=!TT,!TT){e.next=5;break}return e.abrupt("return");case 5:if(TT=!0,R=w.adsc){e.next=10;break}return e.abrupt("return");case 10:if(I=R.s,C=R.t,1===I){e.next=13;break}return e.abrupt("return");case 13:if(O=w.compensation||{enabled:!1},P=null==O?void 0:O.enabled,L=null==w||null===(n=w.adTimer)||void 0===n?void 0:n.enabled,B=null==w||null===(r=w.adTimer)||void 0===r?void 0:r.tl,(U=(null==w||null===(a=w.pAds)||void 0===a||null===(i=a.vmap)||void 0===i?void 0:i.enabled)&&(null==w||null===(s=w.pAds)||void 0===s||null===(o=s.vmap)||void 0===o||null===(d=o.adtr)||void 0===d?void 0:d.disabled)||!1)&&yo("[compensation] disabled by preroll vmap",{pAds:null==w?void 0:w.pAds}),P&&L&&!U){e.next=23;break}return e.abrupt("return");case 23:if(!((M=null!=w&&null!==(u=w.pAds)&&void 0!==u&&null!==(c=u.vmap)&&void 0!==c&&c.enabled&&null!=w&&null!==(l=w.pAds)&&void 0!==l&&null!==(h=l.vmap)&&void 0!==h&&null!==(f=h.adtr)&&void 0!==f&&f.delay?null==w||null===(p=w.pAds)||void 0===p||null===(m=p.vmap)||void 0===m||null===(v=m.adtr)||void 0===v?void 0:v.delay:0)>0)){e.next=30;break}return e.next=29,new Promise(function(e){var t=this;S.default(this,ge),setTimeout(function(){S.default(this,t),e()}.bind(this),1e3*M)}.bind(this));case 29:case 30:if(!(void 0===(null==O?void 0:O.exctg)||(null==O?void 0:O.exctg))){e.next=54;break}F=["co-op","multiplayer","IAPs"],j=(null==w?void 0:w.tags)||[],G=!1,N=ST(j),e.prev=36,H=T.default.mark((function e(){var t,n=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=q.value,F.some(function(e){return S.default(this,n),e===t.title}.bind(this))&&(G=!0);case 2:case"end":return e.stop()}}),e,this)})),N.s();case 39:if((q=N.n()).done){e.next=43;break}return e.delegateYield(H(),"t0",41);case 41:e.next=39;break;case 43:e.next=48;break;case 45:e.prev=45,e.t1=e.catch(36),N.e(e.t1);case 48:return e.prev=48,N.f(),e.finish(48);case 51:if(!G){e.next=54;break}return e.abrupt("return");case 54:if(V=(null==w||null===(g=w.adTimer)||void 0===g?void 0:g.resetOnRewarded)||!1,Q=(null==w||null===(A=w.adTimer)||void 0===A?void 0:A.delayAfterRewarded)||0,z=(null==O?void 0:O.esc)||OT,W=void 0===(null==O?void 0:O.depgft)||(null==O?void 0:O.depgft),K=null!=O&&O.depgftr?null==O?void 0:O.depgftr:1,Y=(null==O?void 0:O.onst)||!1,J=(null==O?void 0:O.sl)||3,X=B||(null==O?void 0:O.tl)||180,Z=(null==w||null===(b=w.gft)||void 0===b?void 0:b.midroll.enabled)||!1,$=(null==w||null===(y=w.midroll_plus)||void 0===y?void 0:y.enabled)||!1,(!Z||!$)&&(X/=K),ee=void 0===(null==O?void 0:O.tc)||(null==O?void 0:O.tc),te=(null==O?void 0:O.ascl)||CT,!W){e.next=76;break}if(ae=(null==w||null===(ne=w.gft)||void 0===ne?void 0:ne.midroll.enabled)||!1,ie=(null==w||null===(re=w.midroll_plus)||void 0===re?void 0:re.enabled)||!1,ae&&ie){e.next=76;break}return e.abrupt("return");case 76:if(oe=(se=C||{}).adsc,de=se.reqsc,ue=se.pdur,ce=se.rspdur,se.aspdur,(ce||de/(ue/IT))<=z&&oe<te){e.next=83;break}return e.abrupt("return");case 83:if(le=Math.ceil(ue/IT),!Y||!E){e.next=90;break}return e.next=90,x({whenAvailable:!0});case 90:return he=0,fe=1,pe=function(){S.default(this,ge),he=0,fe=1}.bind(this),null===(_=w.sdkfw)||void 0===_||_.enabled,e.next=96,tk();case 96:if(me=e.sent,e.t2=me,!e.t2){e.next=102;break}return e.next=101,me.isLoader();case 101:e.t2=e.sent;case 102:e.t2,ve=setInterval(D.default(T.default.mark((function e(){var t,n,r,a,i,s,o=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(ee&&AT.imps>=le)){e.next=4;break}return clearInterval(ve),e.abrupt("return");case 4:if(t=new Date,n=V?AT.lastImpressionDate:AT.lastInterstitialImpressionDate,r=n?jT(n,t):X+1,!((a=X-r)>0)){e.next=21;break}if(!(a<=PT-LT)){e.next=18;break}return e.next=16,new Promise(function(e){var t=this;S.default(this,o),setTimeout(function(){S.default(this,t),e()}.bind(this),1e3*a)}.bind(this));case 16:e.next=21;break;case 18:return pe(),e.abrupt("return");case 21:if(++he%fe==0){e.next=25;break}return e.abrupt("return");case 25:if(V){e.next=35;break}if(i=AT.lastImpressionDate?jT(AT.lastImpressionDate,new Date):X+1,!((s=Q-i)>0)){e.next=32;break}return e.next=32,new Promise(function(e){var t=this;S.default(this,o),setTimeout(function(){S.default(this,t),e()}.bind(this),1e3*s)}.bind(this));case 32:e.next=36;break;case 35:case 36:return e.next=38,x({});case 38:e.sent?pe():(he=0,fe=fe+1>J?J:fe+1);case 40:case"end":return e.stop()}}),e,this)}))),1e3*PT);case 105:case"end":return e.stop()}}),e,this,[[36,45,48,51]])}))),FT.apply(this,arguments)}function jT(e,t){var n=e.getTime();return(t.getTime()-n)/1e3}function GT(e){return NT.apply(this,arguments)}function NT(){return(NT=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.gameId,a=t.adTypeFound,i=t.ad_skip_rule,s=bT.get(a),(o=null==i?void 0:i[a])&&o.enabled){e.next=7;break}return e.abrupt("return",!1);case 7:if((d=(null==o?void 0:o.skip_sessions)||0)&&0!==d){e.next=11;break}return e.abrupt("return",!1);case 11:if((u=(null==o?void 0:o.skips)||0)&&0!==u){e.next=15;break}return e.abrupt("return",!1);case 15:return e.next=17,lw({gameId:r});case 17:if((c=e.sent)&&!((null===(n=c.errors)||void 0===n?void 0:n.length)>0)){e.next=21;break}return e.abrupt("return",!1);case 21:return c.fv,c.lv,l=c.vc,h=l<=d&&("preroll"===a||s<=u),e.abrupt("return",h);case 25:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function HT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qT(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function VT(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return QT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QT(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function QT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var zT,WT=function(){function e(t){var n=this;C.default(this,e),this._gameData=t._gameData,this._msgrt=t.msgrt,this._adInstance=t.adInstance,this._eventBus=t.eventBus,this.blockedAdsMap=t.blockedAdsMap,this._parentURL=t._parentURL,this._parentDomain=t._parentDomain,this._onResumeGame=t.onResumeGame.bind(t),this._onPauseGame=t.onPauseGame.bind(t),this._onRewardedWatchComplete=t.onRewardedWatchComplete.bind(t),this._onAdError=t.onAdError.bind(t),this._setAdRequestTimer=t._setAdRequestTimer.bind(t),this._giveGift=t._giveGift.bind(t),this._executeMidrollPlus=t._executeMidrollPlus.bind(t),this.executeCompensation=t.executeCompensation.bind(t),this._runAutoResume=t._runAutoResume.bind(t),this.send_atom_event=t.send_atom_event.bind(t),this.get_session_id=t.get_session_id.bind(t),this.get_ad_system_init_result=t.get_ad_system_init_result.bind(t),this.eventBus=new a.EventBus,this.isOpusReady=function(){return S.default(this,n),t.isOpusReady}.bind(this),this._adCounterLabel=t.adInstance.adCounterLabel,this._adInfoLabel=t.adInstance.adInfoLabel,this._muteRequested=!1,this._terminateRequested=!1,this._adSession=null,this._registerForEvents(),document.addEventListener("visibilitychange",function(){S.default(this,n),"visible"===document.visibilityState?this._sendTabChange("tab-visible"):this._sendTabChange("tab-invisible")}.bind(this))}var t,n,r;return I.default(e,[{key:"_registerForEvents",value:function(){var e=this;this.eventBus.subscribe("HL_CONFIG_ERROR",function(t){S.default(this,e),this.hasHLConfigError=!0}.bind(this))}},{key:"getTimeDiff",value:function(e,t){var n=e.getTime();return(t.getTime()-n)/1e3}},{key:"skipMidrollOnLongVMAP",value:(r=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h,f,p,m,v,g,A,b,y,_;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("midroll"===t){e.next=2;break}return e.abrupt("return",!1);case 2:if((null===(n=this._gameData)||void 0===n||null===(r=n.pAds)||void 0===r?void 0:r.vmap.enabled)&&(null===(a=this._gameData)||void 0===a||null===(i=a.pAds)||void 0===i||null===(s=i.vmap)||void 0===s?void 0:s.adtr)){e.next=5;break}return e.abrupt("return",!1);case 5:if(null!==(o=this._gameData)&&void 0!==o&&null!==(d=o.visit)&&void 0!==d&&d.vc&&0!==(null===(u=this._gameData)||void 0===u||null===(c=u.visit)||void 0===c?void 0:c.vc)){e.next=7;break}return e.abrupt("return",!1);case 7:if(b=(null===(l=this._gameData)||void 0===l||null===(h=l.pAds)||void 0===h||null===(f=h.vmap)||void 0===f||null===(p=f.adtr)||void 0===p?void 0:p.skipDuration)||(null===(m=this._gameData)||void 0===m||null===(v=m.pAds)||void 0===v||null===(g=v.vmap)||void 0===g||null===(A=g.adtr)||void 0===A?void 0:A.delay)||360,AT.firstInterstitialImpressionDate){e.next=10;break}return e.abrupt("return",!1);case 10:return y=this.getTimeDiff(AT.firstInterstitialImpressionDate,new Date),(_=y<b)&&_o("gd-adflow skipped by long vmap",{elapsed:y}),e.abrupt("return",_);case 15:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"runAdFlow",value:(n=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h,f,p,m,v,g,A,b,y,_,w,k,x,E,D,R,I,C,P,L,B,U,M,F,j,G,N,q,H,V,Q,z,W,K,Y,J,X,Z,$,ee,te,ne,re,ae,ie,se,oe,de,ue,ce,le,he,fe,pe,me,ve,ge,Ae,be=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._adInstance.adCounter,null===(n=t.params)||void 0===n||!n.isCompensation||!this._gameData.compensation.clbl){e.next=7;break}return this._adCounterLabel.show(),l=function(e){var t=this;return S.default(this,be),new Promise(function(n){return S.default(this,t),setTimeout(n,e)}.bind(this))}.bind(this),e.next=7,l(1e3*this._gameData.compensation.ctl);case 7:return e.next=9,tk();case 9:return!(h=e.sent)||h.isLoader(),this.adRequest=t,f=lT(t),t.params.adTypeFound=f,yo("gd-adflow, adTypeFound",f,t.params.position),bT.count(f),yo("gd-adflow, counters",{counters:bT.getAll()}),p=this._gameData,m=p.gameId,v=p.ad_skip,e.next=21,GT({gameId:m,ad_skip_rule:v,adTypeFound:f});case 21:if(!e.sent){e.next=28;break}return this._adInstance.adCounter[f]=this._adInstance.adCounter[f]||0,this._adInstance.adCounter[f]++,this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),MT({gameData:this._gameData,executeCompensation:this.executeCompensation}),e.abrupt("return");case 28:return e.next=30,this.skipMidrollOnLongVMAP(f);case 30:if(!e.sent){e.next=34;break}return this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),e.abrupt("return");case 34:(g=this._getAdFlow(f)).find(function(e){return S.default(this,be),"opus"===e}.bind(this))&&!this.isOpusReady()&&(g=g.filter(function(e){return S.default(this,be),"opus"!==e}.bind(this)),this._msgrt.send("opus.sdk",{message:"Not ready"})),A=this._gameData,b=A.afg_disabled,y=null===(r=t.params)||void 0===r?void 0:r.isGift,_=null===(a=t.params)||void 0===a?void 0:a.isMidrollPlus,w=null===(i=t.params)||void 0===i?void 0:i.isCompensation,null===(s=t.params)||void 0===s||s.position,k=null===(o=A.promo)||void 0===o?void 0:o.rainbow,x=(null==k?void 0:k.enabled)&&(null===(d=k.position)||void 0===d?void 0:d[f]),E=null==k?void 0:k.gift,D=x&&null!=k&&k.duration?null==k?void 0:k.duration:5,R=b?g.filter(function(e){return S.default(this,be),"adsense"!==e}.bind(this)):g,I=this.get_ad_system_init_result(),C=I.afg,P=I.ima,L=null==A||null===(u=A.ad_blcks)||void 0===u||null===(c=u.removeOtherAdaptors)||void 0===c?void 0:c.enabled,this.anyAdBlocking=!C||!P,this.bothAdBlocking=!C&&!P,this.adsBlocked=L&&this.anyAdBlocking||this.bothAdBlocking,this.adsBlocked?(_o("gd-adflow adsBlocked so changing the flow"),R=[]):(C||(R=R.filter(function(e){return S.default(this,be),"adsense"!==e}.bind(this))),P||(R=R.filter(function(e){return S.default(this,be),"ima"!==e}.bind(this)))),B=!1,U=!1,M=[],F=0,j=!1,N=!1,q={reqs:0,imps:0},H={},V=!1,Q=!1,z=VT(R),e.prev=68,z.s();case 70:if((W=z.n()).done){e.next=124;break}if(K=W.value,!this._terminateRequested){e.next=74;break}return e.abrupt("break",124);case 74:if(t.params.adapter=K,Y=F===R.length-1,J=y&&E||!y,X=Y&&x&&J,t.params=HT(HT({},t.params),{},{adapterIndex:F,isLastAdapter:Y,shouldFail:!1,extraPromoRunOnFail:X,muteRequested:this._muteRequested}),!this._muteRequested||"adsense"!==K){e.next=81;break}return e.abrupt("continue",122);case 81:return function(){S.default(this,be),ko.firstSuccessOrder&&!isNaN(ko.firstSuccessOrder)&&(t.params.shouldFail=F<ko.firstSuccessOrder)}.bind(this),_o("gd-adflow, before adInvoke",F,K,t.params.shouldFail),e.next=85,this.adInvoke(t);case 85:if(Z=e.sent,$=Z.success,ee=Z.args,te=Z.isSkipped,ne=Z.noVast,re=Z.t4r,ae=Z.adContext,ie=Z.isCanceled,(se=(null==ae?void 0:ae.isVMAP)||!1)&&q.reqs++,se&&($||ie)&&q.imps++,oe=null==ee?void 0:ee.reason,de=null==ee?void 0:ee.message,ue=null==ee?void 0:ee.errorType,H[K]=H[K]||{req:0,imp:0,fail:0},H[K].req++,$?H[K].imp++:(H[K].fail++,H[K].failReason=oe,H[K].failMessage=de,H[K].failType=ue),!$){e.next=111;break}return _o("gd-adflow, adapter-result-success",F,K,ee),B=!0,N=se,U=!(null==ee||!ee.isPromoSuccess),G=re,e.abrupt("break",124);case 111:if(_o("gd-adflow, adapter-result-failure",F,K,ee.message),"opus"===K&&"[FC] No ad available"===(null==ee?void 0:ee.message)&&(t.params.opusSuccess=!0,V=!0),ie&&!Q&&(Q=!0),F++,M.push(ee.message),!te){e.next=118;break}return e.abrupt("break",124);case 118:if(!ne){e.next=121;break}return this._runAutoResume(),e.abrupt("break",124);case 121:j=X;case 122:e.next=70;break;case 124:e.next=129;break;case 126:e.prev=126,e.t0=e.catch(68),z.e(e.t0);case 129:return e.prev=129,z.f(),e.finish(129);case 132:if(this._adInfoLabel&&this._adInfoLabel.hide(),!j){e.next=139;break}return e.next=136,new XR(this).run({duration:D});case 136:e.sent.success&&(U=!0);case 139:return function(){var e;S.default(this,be),ko.disableGift&&null!==(e=A.gft)&&void 0!==e&&e[f].enabled&&(A.gft[f].enabled=!1)}.bind(this),ce=M.join(" /n"),B||V?(AT.imps++,AT.lastImpressionDate=new Date,"rewarded"!==f&&(AT.lastInterstitialImpressionDate=new Date,AT.firstInterstitialImpressionDate||(AT.firstInterstitialImpressionDate=AT.lastInterstitialImpressionDate)),this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(f),"midroll"===f&&this._executeMidrollPlus()):(this._onResumeGame(ce,"warning"),this._giveGift(f),"midroll"===f&&this._executeMidrollPlus()),MT({gameData:A,executeCompensation:this.executeCompensation}),le="-1",he="none",B?(le="index_".concat(F),he=R[F]):U?(le="promo",he="promo"):V&&(le="opus",he="opus"),fe=this.get_session_id(),this.anyAdBlocking&&"-1"===le?(pe="rewarded"===f?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[pe]=this.blockedAdsMap[pe]?this.blockedAdsMap[pe]+1:1,yo("gd-adflow, blocked-ad",JSON.stringify(this.blockedAdsMap)),this._msgrt.send("adflow.blocked.pos",{message:"".concat(pe)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!C,imaBlocked:!P,isGift:y,isMidrollPlus:_,adType:pe,sessionId:fe,successAdapter:"none",adFlowIndex:le,adapterResults:H,ctry:A.ctry})):(me={},O.default(me,"adflow.all.index",{message:"".concat(le)}),O.default(me,"adflow.all.success_adapter",{message:"".concat(he)}),O.default(me,"adflow.".concat(f,".index"),{message:"".concat(le)}),O.default(me,"adflow.".concat(f,".success_adapter"),{message:"".concat(he)}),ve=me,Object.keys(ve).forEach(function(e){S.default(this,be);var t=ve[e];this._msgrt.send(e,t)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:le,successAdapter:he,adBlocker:!1,afgBlocked:!C,imaBlocked:!P,isGift:y,isMidrollPlus:_,isCompensation:w,adType:f,sessionId:fe,t4r:G,adapterResults:H,ctry:A.ctry})),ge={adType:f,imp:"-1"!==le&&"promo"!==le||V,promo:"promo"===le,opus:V,blocked:this.anyAdBlocking&&"-1"===le,hasHLConfigError:this.hasHLConfigError,isGift:y,isMidrollPlus:_,isCompensation:w,isVMAP:!V&&N,isAppliedVMAP:!V&&N&&(null==A?void 0:A.vmapByTagsApplied),VMAPs:q},this._adSession=ge,uT("ad-session",{adSession:ge}),V&&Q&&uT("ad-session",{adSession:HT(HT({},ge),{},{opus:!1,cancel:!0,isVMAP:N,isAppliedVMAP:N&&(null==A?void 0:A.vmapByTagsApplied)})}),Ae={adType:f},this.eventBus.broadcast("AD_FLOW_COMPLETE",Ae),e.abrupt("return",HT(HT({},Ae),{},{args:{success:B,isGift:y,isMidrollPlus:_}}));case 159:case"end":return e.stop()}}),e,this,[[68,126,129,132]])}))),function(e){return n.apply(this,arguments)})},{key:"adInvoke",value:(t=D.default(T.default.mark((function e(t){var n=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=D.default(T.default.mark((function e(r,a){var i,s,o,d,u=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i="main.showad.".concat(t.params.adapter,".").concat(t.params.adapterIndex),yo("adInvoke.start",{scopeName:i,adRequest:JSON.stringify(t)}),s={},o=function(e){S.default(this,u);var a=n._adInstance.adContext;yo("adInvoke.failure",{args:e,adRequest:JSON.stringify(t),adContext:a}),n._eventBus.unsubscribeScope(i);var s="dismissed"===(null==e?void 0:e.message),o="AD_SDK_CANCELED"===(null==e?void 0:e.name);r({success:!1,args:e,isSkipped:s,isCanceled:o,noVast:e.noVast,adContext:a})}.bind(this),d=function(e){S.default(this,u);var a=n._adInstance.adContext;yo("adInvoke.success",{args:e,adRequest:JSON.stringify(t),adContext:a}),n._eventBus.unsubscribeScope(i),r({success:!0,args:e,t4r:s,adContext:a})}.bind(this),n._eventBus.subscribe("AD_ERROR",o,i),n._eventBus.subscribe("AD_SDK_CANCELED",o,i),n._eventBus.subscribe("AD_SUCCESS",d,i),n._eventBus.subscribe("AD_T4R",function(){S.default(this,u),s.loaded=!0}.bind(this),i),n._eventBus.subscribe("AD_T4R_CLICK",function(){S.default(this,u),s.t4rClick=!0}.bind(this),i),n._eventBus.subscribe("AD_T4R_VIDEO",function(){S.default(this,u),s.t4rVideo=!0}.bind(this),i),n._eventBus.subscribe("AD_CLICK",function(){S.default(this,u),s.click=!0}.bind(this),i),n._eventBus.subscribe("AD_BIDDER",function(e){S.default(this,u),s.bidder=null==e?void 0:e.bidder}.bind(this),i),n._eventBus.subscribe("AD_T4R_NONE",function(e){S.default(this,u),s.fail_reason=null==e?void 0:e.reason}.bind(this),i),e.prev=14,e.next=17,n._adInstance.startAd(t);case 17:e.next=23;break;case 19:e.prev=19,e.t0=e.catch(14),wo("gd-adflow startAd error",e.t0),r({success:!1,err:e.t0});case 23:case"end":return e.stop()}}),e,this,[[14,19]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"_getAdFlow",value:function(e){var t,n,r,a,i,s,o,d,u=this,c=void function(){if(S.default(this,u),ko.customAdFlow)return JSON.parse(ko.customAdFlow)}.bind(this),l=this._gameData.adflw;c&&(l=c);var h=null!==(t=l)&&void 0!==t&&null!==(n=t.adapters)&&void 0!==n&&n.default?null===(r=l)||void 0===r||null===(a=r.adapters)||void 0===a?void 0:a.default:["ima","adsense"];return h=null!==(i=l)&&void 0!==i&&null!==(s=i.adapters)&&void 0!==s&&s[e]?null===(o=l)||void 0===o||null===(d=o.adapters)||void 0===d?void 0:d[e]:h}},{key:"_sendTabChange",value:function(e){var t=this;if("tab-invisible"===e&&this._adSession){var n=this._adSession;n.tabState=e,this.eventBus.subscribe("STARTED",function(){S.default(this,t),"hidden"===document.visibilityState&&(n.tabState=n.tabState+"-STARTED",uT("ad-session-tab",{adSession:n}))}.bind(this)),this.eventBus.subscribe("IMPRESSION",function(){S.default(this,t),"hidden"===document.visibilityState&&(n.tabState=n.tabState+"-IMPRESSION",uT("ad-session-tab",{adSession:n}))}.bind(this))}}},{key:"mute",value:function(){var e=this;this._muteRequested=!0,this._adInstance.mute().catch(function(t){S.default(this,e)}.bind(this))}},{key:"terminate",value:function(){var e=this;this._terminateRequested=!0,this._adInstance.terminate().catch(function(t){S.default(this,e)}.bind(this)),this._setAdRequestTimer()}}]),e}(),KT=new m.EventEmitter,YT=["https://games.softgames.com","https://sg.gamedistribution.com","https://minigame-stg.aeriagames.jp","https://minigame.aeriagames.jp","https://html5.gamedistribution.com","http://localhost:3005","https://yjgames.gamedistribution.com","https://portal-staging-sgweb.gamedistribution.com/"];window.addEventListener("message",(function(e){var t=this,n=e.data,r=e.origin,a=e.source;if(YT.some(function(e){return S.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)){var i=n.system;n.action;var s="aeriaExternalHostsConnector"===i;if("Softgames"===i)zT=a,(window.parent||window).postMessage(n,"*"),KT.emit("aeria-event",n);else if(s){zT&&zT.postMessage(n,"*");var o=window.parent||window;o&&o.postMessage(n,"*")}}}),!1);var JT="https://html5.gamedistribution.com",XT="parent-data-request",ZT="parent-data-response",$T=function(){function e(){C.default(this,e)}var t;return I.default(e,[{key:"init",value:function(e){var t=this;this._registerForDataRequests(e),this._askForParentFrameData().then(function(n){if(S.default(this,t),n){var r=n.adRequestTimer;e.adRequestTimer=r,yo("gd-frame-data-bridge, adRequestTimer on init ",e.adRequestTimer)}}.bind(this))}},{key:"_registerForDataRequests",value:function(e){var t=this;window.addEventListener("message",function(n){S.default(this,t);var r=n.data,a=n.origin,i=n.source,s=r.type;if(r.value,a===JT&&s===XT){var o={adRequestTimer:e.adRequestTimer};i.postMessage({type:ZT,value:o})}}.bind(this))}},{key:"_askForParentFrameData",value:(t=D.default(T.default.mark((function e(){var t=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;S.default(this,t);var a=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin;t.source;var i=n.type,s=n.value;r===JT&&i===ZT&&(e(s),a=!0)})),setTimeout(function(){S.default(this,r),a||e()}.bind(this),1e3);var i={type:XT};window.parent.postMessage(i,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),eI=new $T,tI={SDKExistsOnUpperFrame:!1};function nI(){return rI.apply(this,arguments)}function rI(){return(rI=D.default(T.default.mark((function e(){var t,n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=["https://pm.azerioncircle.com/p/gd-blck-rmv/"],e.next=4,a.getScript(t[0],"blckrmv",{alternates:t});case 4:return n=window.GD_BLCK_RMV||{},console.log("new blocker",n),e.abrupt("return",n.AdBlockerPage);case 9:e.prev=9,e.t0=e.catch(0),console.log("new blcoker error => ",e.t0.message);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}function aI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aI(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var sI=function(){_o("gtag: GA not initialized",arguments)};function oI(e){return dI.apply(this,arguments)}function dI(){return dI=D.default(T.default.mark((function e(t){var n,r,i,s,o,d,u,c,l,h,f,p,m=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.onError,r=t.args,s="gdSDKDataLayer",o="https://www.googletagmanager.com/gtag/js?id=".concat(i="G-PLRTBHGSEL","&l=").concat(s),d=[o],e.prev=5,e.next=8,a.getScript(d[0],"gdsdk_google_analytics",{alternates:d,error_prefix:"Blocked:",exists:function(){return S.default(this,m),window[s]}.bind(this)});case 8:return window[s]=window[s]||[],sI=function(){window[s].push(arguments)},sI("js",new Date),e.next=14,Q.default();case 14:return u=e.sent,c=u.lookupIabConsent,l=u.getGoogleAdType,e.next=19,c();case 19:h=e.sent,f=l(h.consentData),p=iI(iI({},p=r||{}),{},{cookie_flags:"SameSite=None;Secure",cmp:h.result,gdpr:"ok"===h.result?"object"===R.default(h.consentData)?!0===h.consentData.gdprApplies:"N/A":h.result,google_ads:null==f?void 0:f.type}),sI("config",i,p),e.next=31;break;case 27:e.prev=27,e.t0=e.catch(5),wo("gtag: load GA error",e.t0),n&&n(e.t0);case 31:case"end":return e.stop()}}),e,this,[[5,27]])}))),dI.apply(this,arguments)}new P.default("https://securepubads.g.doubleclick.net/gampad/ads?env=vp&gdfp_req=1&output=xml_vast4&unviewed_position_start=1&correlator=3792570314314042&sz=640x480&url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&iu=%2F1015413%2FTNL_NS-18101700058%2FTNL_T-17110972893&description_url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&max_ad_duration=300000&cust_params=hb_uuid%3Dcefbef16-53a9-4f49-9d3b-13e47e1066ad%26hb_cache_id%3Dundefined%26tnl_paid%3D866%26tnl_pid%3DP-17110700559%26tnl_system%3D1%26tid%3DTNL_T-17110972893%26tnl_ad_type%3Dvideo_image%26tnl_asset_id%3Daeac8455b2024f25abfa943ec96aa749%26tnl_ad_pos%3Dpreroll%26nsid%3DTNL_NS-18101700058%26tnl_pt%3D22%26hb_cache_host%3Dprebid.adnxs.com%26hb_format%3Dvideo%26hb_size%3D0x0%26hb_pb%3D1.15%26hb_adid%3D259407b5792767%26hb_bidder%3Dimprovedigital%26hb_cache_host_improv%3Dprebid.adnxs.com%26hb_uuid_improvedigit%3Dcefbef16-53a9-4f49-9d3b-13e47e1066ad%26hb_format_improvedig%3Dvideo%26hb_size_improvedigit%3D0x0%26hb_pb_improvedigital%3D1.15%26hb_adid_improvedigit%3D259407b5792767%26hb_bidder_improvedig%3Dimprovedigital%26tnl_wog%3D0%26gdGameId%3Daeac8455b2024f25abfa943ec96aa749%26tnl_content_category%3Dpuzzle%26adaptor_order%3D0%26pbct%3D2%26tnl_test%3Da%26fp%3D0.9%26fpt%3D99%26bfa%3D1%26adsense%3D0&gdpr=1&gdpr_consent=CP6lKcgP6lKcgAcABBENApEsAP_gAEPgAAYgg1NV_H__bX9j8Xr1aft0eY1H99j7rsQxBhfJk-4FyDvW_JwXn2EyNA26pqYKmRIEuzZBIQFkHIDURUigSogVrSDMYkGMgTNIJ6BkgFMRY2dYCFxvmQlDMQIY5vp9d3d52D-9_dv83dziz8FHvzU5PmckcICdA58tDfl9bRCb-5IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHs87_XU-9_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQaoJIACgAHgAkABcADUAHAAUwAtgBmAD4AH4AYAAygBmgDkAHcAP8Ag4BHQCRAElAKiAXMAvQBfQDPgHUAPaAfYBEwCVQExAJnAUgApoBUgCuQFswLcAt0Bf4DBIGRgZIAywBmYDRgGrgNvAboA3wBywDtgHcgPFgfaB90EqASpAlhBLMEtIJbglxBLoEuwJfQTABMECYYExQJjgTJgmYCZwE0gJqATYgm2CbkE3gTfCCgEGoA8EADAFyAMEAtIQCAAAEAA0ADgAPAAyACwAI4AUAArgBbAEWAJcAX0A1ADVAHOAPIAfIBAwCDgEcAJ2AT-AoYCigF2AM4AbwA9AB8gENgIvAR6AkUBJYCVgEywJsAm0BS4CnwFhQLEAsUBdQC7gF5AMCgYeBiADFoGQgZGAyYBlwDPwGhANGAaYA1MBroDaAG3AN0AcEA6gB2ADuoHkgeUA96B8gHyhIG4ACAAFwAUABUADgAHgAQAAwgBkAGoAPAAiABMACqAG8APQAhIBDAESAI4ASwAmgBhgDLAGyAO-AewB8QD7AP0AgEBFwEYAI0AUEAqABVwC5gGKANoAbgA4gCRAE7AKHAUeApEBbAC5AF3gLzAYMAw0BkgDJwGcwNYA1kBuoDkwHLgPHDAUAAAgAGAAcABQAEUAJwAsABhADwAPYAhACIAEcAJgAVAArwBbAFyAOYA8ACGAESAIsAS4ApABWgDOAGpANkA4ABxgDnAHkAPwAgABGACTAE6AKKAUuArwCvgF2AL8AZwA2wBvADjgHNAOoAdkA9QB-wEJAIbARUAi8BHUCRAJFASXAloCXgE2AJ2AUJApECkgFigLRAXIAugBdwC9AGBAMPAYyAx6BkYGSAMnAZyAzwBoQDTAGtANdAboA6gB3AD3hAE8AAIABgAHAAUABFACcALAAYQA8AD2AIQAiABHACYAFcALcAcwB3AEMAIkARYAlwBSACtAGcANSAbIBwADjAHOAPIAfIA_ACAAEYAJNAToBOwCigFLgK8Ar4BdgC_AGcANQAbYA3gBxwDmgHZAPUAfIA_YCEgENgIvAR3AkQCRQElwJaAl4BNgCdgFCAKSgWIBYoC0QFyALoAXcAvQBgQDDwGMgMeAZIAycBnIDQgGmANaAa6A3QB1ADuAHvCgEYAIoAVABYAEIAJgAXAA8ACOAFIANQAcABHACiwFeAV8AuwBnADeAHNAOyAfsBHoCRQEvAJsAWKAtEBbAC7gF6AMPAZyAzwBoQDWoGuga8A94YAgABFACoALAAhABMAEcAKQAagA4ACOAFFgK8Ar4BdgDOAG8AOaAdkA_YCPQEvAJsAWiAtgBdwC9AGHgM5AZ4A0IBrQDXQHvAPiHAXoADAARAA4ADwALgAZABYADmAHwAfgBHACaAFAAKYAVwAtgBfADQAIQARYAjgBLgCkAFkAL4AYUAzQDOAGoAOcAdwA8gB8wEAAQOAg4CEAERAI4ATgAncBPgE_AKKAUsAqABWQC7AF6AM4AbwA44B0gD0AHyAQ2AiIBFQCPQEigJLASsAmIBMsCbAJtAUgApMBS4CqgFiALUAWzAugC6gF3AL6AYFAxADEwGLAMhAZNAy4DLwGfgNCAaNA0wDTQGpwNdA2ABtADbgHHgOWAc-A7AB3EDyQPKAekA94B8QD5QH2gPxHQRQAFwAUABUADgAIAAXQAwADUAHgARAAmABVgC4ALoAYgAzABvAD1AIYAiQBLACaAFGAMMAZQA0QBsgDvAHtAPsA_QB_wEWARgAoIBVwCxAFzALyAYoA2gBuADiAHUAReAkQBMgCdgFDgKPAU0AsUBbAC4AFyALtAXeAvMBgwDDQGPAMkAZOAyoBlgDOQGiANVAawA3UBxYDkwHLgPHAfWQAXAAIAAyACwAJoAXwA0ACkAFlALkAvgBnADUAHOARwAnABPoChgKKAUsArIBYgC0gF2AN4Ac0A7IB6AEewJsAm0BSYCxAFtALuAXkAwIBiUDPAM_AaEA1MBroDYAG3AOfAdGA7CB5IHlAPeAfEQgPAALAAoAC4AGIATAAqgBcADEAG8APQAjgB3gD_AJSAUEAq4BcwDFAG0AOoApoBYoC0QFwALkAZOAzkBogDVQHjkgF4ABgAHAAXAAyACwAHIARwAmgBUAC-AGQANoAeABCACkAFkAM6AagBqgDuAIAARyApoCoAFZALSAXYA3gB8gEVAI6AR6AkUBKwCWoE2ATaApMBVICxAF3AMWAZZAzwDPwGhANdAbAA7AB5QD3iUB0ABAACwAKAAcgBgAGIAPAAiABMACqAFwAMUAhgCJAEcAKMAbIA7wB-AFXAMUAdQBF4CRAFHgLFAWwAvMBk4DOQGsFIFwAC4AKAAqABwAEEAMAA1AB4AEQAJgAUgAqgBiADNAIYAiQBRgDKAGiANkAd8A_AD9AIsARgAoIBVwC5gF5AMUAbQA3ACLwEiAJ2AUOAsUBbAC4AFyALtAXmAw0BkgDJwGcwNYA1kBuoDkwHjlAIgAFwAMgAsAByAEcAJoAVAAvgBkADaAHgAQgAiwBHACZAFIALIAXwAwgBnQDUANUAc4A7oB8gH2AQAAjgBIgCdgFDAKXAVkBWwCxQF1AXYA14BvADtgHoAP-AjoBHoCRQElgJigTYBNoCkAFPgLEAXQAu4BeQC-gGBAMWAZMAy6BngGfgNCAaJA1IDU4GugbAA4IB0wDsAHcAPKAe8A-IB8oA.f_wACHwAAAAA&plcmt=1&vpmute=1&vpa=auto&sdkv=h.3.633.0&osd=2&frm=2&vis=1&sdr=1&hl=en&afvsz=200x200%2C250x250%2C300x250%2C336x280%2C450x50%2C468x60%2C480x70&is_amp=1&uach=WyJtYWNPUyIsIjE0LjQuMSIsImFybSIsIiIsIjEyMy4wLjYzMTIuMTIyIixudWxsLDAsbnVsbCwiNjQiLFtbIkdvb2dsZSBDaHJvbWUiLCIxMjMuMC42MzEyLjEyMiJdLFsiTm90OkEtQnJhbmQiLCI4LjAuMC4wIl0sWyJDaHJvbWl1bSIsIjEyMy4wLjYzMTIuMTIyIl1dLDBd&u_so=p&ctv=0&sdki=445&ptt=20&adk=2541783110&sdk_apis=2%2C7%2C8&omid_p=Google1%2Fh.3.633.0&sid=E657451B-8F2F-4921-A55A-21D1A6F3C39E&nel=1&eid=44777649%2C44781409%2C44785452%2C95321947%2C95322027%2C95323893%2C95324128%2C95324210%2C95326337&ref=https%3A%2F%2Fwww.gry.pl%2F&top=https%3A%2F%2Fwww.gry.pl%2F&loc=https%3A%2F%2Fhtml5.gamedistribution.com%2Faeac8455b2024f25abfa943ec96aa749%2F%3Ftimestamp%3D1713336375%26countryCode%3Dpl%26siteid%3D88%26channelid%3D1%26siteLocale%3Dpl%26locale%3Dpl%26gd_sdk_referrer_url%3Dhttps%253A%252F%252Fwww.gry.pl%252Fgra%252Fkings-and-queens-match&dlt=1713336379046&idt=2621&dt=1713336390920&scor=3473667703821297&ged=ve4_td12_tt10_pd12_la2000_er0.0.156.300_vi0.0.600.510_vp100_eb24427",!0),new P.default("https://securepubads.g.doubleclick.net/gampad/ads?env=vp&gdfp_req=1&output=xml_vast4&unviewed_position_start=1&correlator=2275053868608838&sz=640x480&url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&iu=%2F1015413%2FTNL_NS-18101700058%2FTNL_T-17110972893&description_url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&max_ad_duration=300000&vpa=auto&vpmute=0&plcmt=1&cust_params=tnl_paid%3D866%26tnl_pid%3DP-17110700559%26tnl_system%3D1%26tid%3DTNL_T-17110972893%26tnl_ad_type%3Dvideo_image%26tnl_asset_id%3Daeac8455b2024f25abfa943ec96aa749%26tnl_ad_pos%3Dpreroll%26nsid%3DTNL_NS-18101700058%26tnl_pt%3D22%26gd_opus%3D1%26fp%3D0.9%26gd_np%3D1%26bfa%3D1%26fpt%3D99%26tnl_wog%3D0&sdkv=h.3.633.0&osd=2&frm=0&vis=1&sdr=1&hl=en&afvsz=200x200%2C250x250%2C300x250%2C336x280%2C450x50%2C468x60%2C480x70&is_amp=0&uach=WyJtYWNPUyIsIjE0LjQuMSIsImFybSIsIiIsIjEyMy4wLjYzMTIuMTIyIixudWxsLDAsbnVsbCwiNjQiLFtbIkdvb2dsZSBDaHJvbWUiLCIxMjMuMC42MzEyLjEyMiJdLFsiTm90OkEtQnJhbmQiLCI4LjAuMC4wIl0sWyJDaHJvbWl1bSIsIjEyMy4wLjYzMTIuMTIyIl1dLDBd&u_so=p&ctv=0&gdpr=1&gdpr_consent=CP6lKcgP6lKcgAcABBENApEsAP_gAEPgAAYgg1NV_H__bX9j8Xr1aft0eY1H99j7rsQxBhfJk-4FyDvW_JwXn2EyNA26pqYKmRIEuzZBIQFkHIDURUigSogVrSDMYkGMgTNIJ6BkgFMRY2dYCFxvmQlDMQIY5vp9d3d52D-9_dv83dziz8FHvzU5PmckcICdA58tDfl9bRCb-5IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHs87_XU-9_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQaoJIACgAHgAkABcADUAHAAUwAtgBmAD4AH4AYAAygBmgDkAHcAP8Ag4BHQCRAElAKiAXMAvQBfQDPgHUAPaAfYBEwCVQExAJnAUgApoBUgCuQFswLcAt0Bf4DBIGRgZIAywBmYDRgGrgNvAboA3wBywDtgHcgPFgfaB90EqASpAlhBLMEtIJbglxBLoEuwJfQTABMECYYExQJjgTJgmYCZwE0gJqATYgm2CbkE3gTfCCgEGoA8EADAFyAMEAtIQCAAAEAA0ADgAPAAyACwAI4AUAArgBbAEWAJcAX0A1ADVAHOAPIAfIBAwCDgEcAJ2AT-AoYCigF2AM4AbwA9AB8gENgIvAR6AkUBJYCVgEywJsAm0BS4CnwFhQLEAsUBdQC7gF5AMCgYeBiADFoGQgZGAyYBlwDPwGhANGAaYA1MBroDaAG3AN0AcEA6gB2ADuoHkgeUA96B8gHyhIG4ACAAFwAUABUADgAHgAQAAwgBkAGoAPAAiABMACqAG8APQAhIBDAESAI4ASwAmgBhgDLAGyAO-AewB8QD7AP0AgEBFwEYAI0AUEAqABVwC5gGKANoAbgA4gCRAE7AKHAUeApEBbAC5AF3gLzAYMAw0BkgDJwGcwNYA1kBuoDkwHLgPHDAUAAAgAGAAcABQAEUAJwAsABhADwAPYAhACIAEcAJgAVAArwBbAFyAOYA8ACGAESAIsAS4ApABWgDOAGpANkA4ABxgDnAHkAPwAgABGACTAE6AKKAUuArwCvgF2AL8AZwA2wBvADjgHNAOoAdkA9QB-wEJAIbARUAi8BHUCRAJFASXAloCXgE2AJ2AUJApECkgFigLRAXIAugBdwC9AGBAMPAYyAx6BkYGSAMnAZyAzwBoQDTAGtANdAboA6gB3AD3hAE8AAIABgAHAAUABFACcALAAYQA8AD2AIQAiABHACYAFcALcAcwB3AEMAIkARYAlwBSACtAGcANSAbIBwADjAHOAPIAfIA_ACAAEYAJNAToBOwCigFLgK8Ar4BdgC_AGcANQAbYA3gBxwDmgHZAPUAfIA_YCEgENgIvAR3AkQCRQElwJaAl4BNgCdgFCAKSgWIBYoC0QFyALoAXcAvQBgQDDwGMgMeAZIAycBnIDQgGmANaAa6A3QB1ADuAHvCgEYAIoAVABYAEIAJgAXAA8ACOAFIANQAcABHACiwFeAV8AuwBnADeAHNAOyAfsBHoCRQEvAJsAWKAtEBbAC7gF6AMPAZyAzwBoQDWoGuga8A94YAgABFACoALAAhABMAEcAKQAagA4ACOAFFgK8Ar4BdgDOAG8AOaAdkA_YCPQEvAJsAWiAtgBdwC9AGHgM5AZ4A0IBrQDXQHvAPiHAXoADAARAA4ADwALgAZABYADmAHwAfgBHACaAFAAKYAVwAtgBfADQAIQARYAjgBLgCkAFkAL4AYUAzQDOAGoAOcAdwA8gB8wEAAQOAg4CEAERAI4ATgAncBPgE_AKKAUsAqABWQC7AF6AM4AbwA44B0gD0AHyAQ2AiIBFQCPQEigJLASsAmIBMsCbAJtAUgApMBS4CqgFiALUAWzAugC6gF3AL6AYFAxADEwGLAMhAZNAy4DLwGfgNCAaNA0wDTQGpwNdA2ABtADbgHHgOWAc-A7AB3EDyQPKAekA94B8QD5QH2gPxHQRQAFwAUABUADgAIAAXQAwADUAHgARAAmABVgC4ALoAYgAzABvAD1AIYAiQBLACaAFGAMMAZQA0QBsgDvAHtAPsA_QB_wEWARgAoIBVwCxAFzALyAYoA2gBuADiAHUAReAkQBMgCdgFDgKPAU0AsUBbAC4AFyALtAXeAvMBgwDDQGPAMkAZOAyoBlgDOQGiANVAawA3UBxYDkwHLgPHAfWQAXAAIAAyACwAJoAXwA0ACkAFlALkAvgBnADUAHOARwAnABPoChgKKAUsArIBYgC0gF2AN4Ac0A7IB6AEewJsAm0BSYCxAFtALuAXkAwIBiUDPAM_AaEA1MBroDYAG3AOfAdGA7CB5IHlAPeAfEQgPAALAAoAC4AGIATAAqgBcADEAG8APQAjgB3gD_AJSAUEAq4BcwDFAG0AOoApoBYoC0QFwALkAZOAzkBogDVQHjkgF4ABgAHAAXAAyACwAHIARwAmgBUAC-AGQANoAeABCACkAFkAM6AagBqgDuAIAARyApoCoAFZALSAXYA3gB8gEVAI6AR6AkUBKwCWoE2ATaApMBVICxAF3AMWAZZAzwDPwGhANdAbAA7AB5QD3iUB0ABAACwAKAAcgBgAGIAPAAiABMACqAFwAMUAhgCJAEcAKMAbIA7wB-AFXAMUAdQBF4CRAFHgLFAWwAvMBk4DOQGsFIFwAC4AKAAqABwAEEAMAA1AB4AEQAJgAUgAqgBiADNAIYAiQBRgDKAGiANkAd8A_AD9AIsARgAoIBVwC5gF5AMUAbQA3ACLwEiAJ2AUOAsUBbAC4AFyALtAXmAw0BkgDJwGcwNYA1kBuoDkwHjlAIgAFwAMgAsAByAEcAJoAVAAvgBkADaAHgAQgAiwBHACZAFIALIAXwAwgBnQDUANUAc4A7oB8gH2AQAAjgBIgCdgFDAKXAVkBWwCxQF1AXYA14BvADtgHoAP-AjoBHoCRQElgJigTYBNoCkAFPgLEAXQAu4BeQC-gGBAMWAZMAy6BngGfgNCAaJA1IDU4GugbAA4IB0wDsAHcAPKAe8A-IB8oA.f_wACHwAAAAA&sdki=445&ptt=20&adk=1748861338&sdk_apis=2%2C7%2C8&omid_p=Google1%2Fh.3.633.0&media_url=blob%3Ahttps%253a%2F%2Fwww.gry.pl%2Ffa4fae4b-f435-43b4-9cee-af65696fe59e&sid=D3F4C4E1-4002-4BEE-A1F2-2638CD3B9197&a3p=EloKDWNyd2RjbnRybC5uZXQSQGE0MmZkMWJkNGI5MjgyOTY5NzUxNDUyYzVlNmUxNmQ1MzkzODYxY2E5Y2U2MGUzNjk3Y2ZlNTExMTQxYjFhZjgYucX8se4xSAASxgEKCHJ0YmhvdXNlEqwBWVNmZ3hFVno0OXBMOFI2c3ltSWtSdUFNdFg4d2Y0clBkdVMwTlVuLzZpUnhJZWh0cnRjVUtLSjFraHJDQWZERmp1N1pDNHJEc1lxMkduKzJFTFMxRmgzWlEzTUxaK0owbXZoTDR4UFlNc2JUbmlGNkczTWRaZjZQK3hEVVkwTU1FUlpkZzlKMjArcjlQNUtQOFBmWVhMaEkwRitGMUNhYUNwQS9aRVNNMVNnPRjBxfyx7jFIAFICCGoSGQoKdWlkYXBpLmNvbRjDz9ay7jFIAFICCGQSPgoFb3BlbngSLGV5SnBJam9pZEZoNU5XbDNSakZUT0ZjNVoxTlZRbFl5YWtRemR6MDlJbjA9GJ3I_LHuMUgA&nel=1&eid=44776494%2C44777649%2C44781409%2C95321947%2C95322027%2C95323893%2C95324128%2C95324210%2C95326337&top=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&loc=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&dt=1713336184147&cookie=ID%3Da17ef48e823e6627%3AT%3D1709727355%3ART%3D1713335981%3AS%3DALNI_MY20KDMmAY5MP3sMYIZndoHFyvxhg&gpic=UID%3D00000d6b0028013d%3AT%3D1709727355%3ART%3D1713335981%3AS%3DALNI_MZ7af9EvfEMcTpwOjK9LSfd-RfFCQ&scor=3968881391553945&ged=ve4_td21_tt0_pd21_la21000_er271.162.427.462_vi0.0.873.1064_vp100_eb24171",!0);var uI,cI=function(e){var t=this,n=e.handler,r=e.timeout,a=e.interval,i=n||function(){return S.default(this,t),!0}.bind(this),s=r||1e3,o=a||10;return new Promise(function(e,r){var a=this;if(S.default(this,t),n())e(!0);else{var d=!1,u=setInterval(function(){S.default(this,a);try{i()&&(clearInterval(u),d=!0,e(!0))}catch(t){clearInterval(u),e(!1)}}.bind(this),o);setTimeout(function(){S.default(this,a),clearInterval(u),d||e(!1)}.bind(this),s)}}.bind(this))},lI=function(){var e=D.default(T.default.mark((function e(t){var n,r,a,i,s=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.topic,r=t.args,e.next=3,Pw();case 3:if(a=e.sent,i=a.console_logs,i&&i.allowed.some(function(e){return S.default(this,s),e===n}.bind(this))){e.next=8;break}return e.abrupt("return");case 8:console.log({topic:n,args:r});case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}();function hI(){return fI.apply(this,arguments)}function fI(){return fI=D.default(T.default.mark((function e(){var t,n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!uI){e.next=2;break}return e.abrupt("return",uI);case 2:return e.next=4,Q.default();case 4:return t=e.sent,n=t.lookupIabConsent,t.getGoogleAdType,e.next=9,n();case 9:return uI=e.sent,e.next=12,lI({topic:"cmp-decoded",args:{key:"[consent-check] cmp-decoded",cmp:uI}});case 12:return e.abrupt("return",uI);case 13:case"end":return e.stop()}}),e)}))),fI.apply(this,arguments)}function pI(){return mI.apply(this,arguments)}function mI(){return mI=D.default(T.default.mark((function e(){var t,n,r,a,i,s,o,d,u,c,l,h,f,p=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,hI();case 2:if(a=e.sent,(i=(null==a?void 0:a.consentData)||{}).gdprApplies){e.next=7;break}return _o("[consent-check] gdprApplies=false"),e.abrupt("return",!1);case 7:return s=(null===(t=i.purpose)||void 0===t?void 0:t.consents)||{},o=(null===(n=i.vendor)||void 0===n?void 0:n.consents)||{},d=(null===(r=i.publisher)||void 0===r?void 0:r.consents)||{},u=function(e){return S.default(this,p),0===Object.keys(e).length}.bind(this),c=u(s),l=u(o),h=u(d),_o("[consent-check]",{fullyRejected:f=c&&l&&h,emptyPurpose:c,emptyVendor:l,emptyPublisher:h}),e.abrupt("return",f);case 17:case"end":return e.stop()}}),e,this)}))),mI.apply(this,arguments)}function vI(){return gI.apply(this,arguments)}function gI(){return gI=D.default(T.default.mark((function e(){var t,n,r,a,i;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,hI();case 2:if(a=e.sent,(i=(null==a?void 0:a.consentData)||{}).gdprApplies){e.next=6;break}return e.abrupt("return",!1);case 6:return null===(t=i.purpose)||void 0===t||t.consents,null===(n=i.vendor)||void 0===n||n.consents,null===(r=i.publisher)||void 0===r||r.consents,e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)}))),gI.apply(this,arguments)}function AI(){return bI.apply(this,arguments)}function bI(){return(bI=D.default(T.default.mark((function e(){var t,n,r,a;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Pw();case 3:if(t=e.sent,null!=(n=t.disable_ads_by_cmp)&&n.enabled){e.next=8;break}return _o("[consent-check] returned by no rule",n),e.abrupt("return",!1);case 8:if(r="all-rejected"===(null==n?void 0:n.mode),e.t0=r,!e.t0){e.next=14;break}return e.next=13,pI();case 13:e.t0=e.sent;case 14:if(!e.t0){e.next=17;break}return _o("[consent-check] fully rejected"),e.abrupt("return",!0);case 17:if(a="some-rejected"===(null==n?void 0:n.mode),e.t1=a,!e.t1){e.next=23;break}return e.next=22,vI();case 22:e.t1=e.sent;case 23:if(!e.t1){e.next=26;break}return _o("[consent-check] partially rejected"),e.abrupt("return",!0);case 26:e.next=31;break;case 28:e.prev=28,e.t2=e.catch(0),wo("[consent-check] error on checkIfAdsDisabledByConsent",e.t2.message);case 31:return e.abrupt("return",!1);case 32:case"end":return e.stop()}}),e,null,[[0,28]])})))).apply(this,arguments)}function yI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yI(Object(n),!0).forEach((function(t){O.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var wI=k.v4(),kI=null,xI=null,EI=function(){function e(t){var n,r,a,i,s=this;if(C.default(this,e),O.default(this,"_whichFrameV2",function(){var e=this;S.default(this,s);var t=P.default(window.location.href,!0),n=t.host,r=t.query,a="html5.gamedistribution.com"!==n,i=function(t){return S.default(this,e),"revision.gamedistribution.com"===t||"uncached-html5.gamedistribution.com"===t}.bind(this),o=i(n);null!=r&&r.gd_sdk_referrer_url&&(o=i(P.default(r.gd_sdk_referrer_url).host));return this._isMasterGameURL()&&!(this._isTokenGameURL()||a)||o?"loader-frame":"game-frame"}.bind(this)),kI)return kI;kI=this,this.isOpusReady=!1,this.isMidrollPlusExecuted=!1,this.blockedAdsMap={},this.blockingDetectedKey="d8d9b9b63e704668a29559970c1818be",this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,t),this._version=t.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new I_,this._location.print();var o=this._location.get(),d=(null==o||null===(n=o.top)||void 0===n||null===(r=n.domain)||void 0===r?void 0:r.value)||(null==o||null===(a=o.partner.domain)||void 0===a?void 0:a.value),u=null==o||null===(i=o.partner.url)||void 0===i?void 0:i.value;this._parentURL=0===this._bridge.depth?encodeURIComponent(this._bridge.parentURL):this._bridge.parentURL,this._parentURL=this._parentURL||u,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._topDomain=this._topDomain||d,yo("locs found:",this._topDomain,this._parentURL),this._isFullScreen=!1,this._giftCount={preroll:0,midroll:0,rewarded:0},this._mplus_count=0,Kw({whichFrame:this._whichFrameV2(),options:{showAd:this.showAd.bind(this),onEvent:this._onEvent.bind(this)}}),this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){S.default(this,s),this._sdk_ready=!0}.bind(this)).catch(function(e){S.default(this,s),this._sdk_ready=!1}.bind(this)).finally(function(){var e,t,n,r,a=this;if((S.default(this,s),null===(e=this._gameData)||void 0===e||null===(t=e.directTokenUse)||void 0===t?void 0:t.enabled)&&this._blockDirectTokenURLEmbedding().blocked)return;this.dumper=new pR({msgrt:this.msgrt,gameData:this._gameData,parentDomain:this._parentDomain,parentURL:this._parentURL,topDomain:this._parentURL}),this.dumper,this._initGameSessionTracking(),this._sendLoadedEvent(2),!0===(null===(n=this._gameData.lp)||void 0===n?void 0:n.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(r=this._gameData.evnts)&&void 0!==r&&r.enabled&&this._isLoaderGameURL()&&(!function(e){var t=this;if(!window[qR]){var n=QR("https://static.gamedistribution.com/message/index.html",qR);if(document.body.appendChild(n),window!==window.top){var r=[zR(e,"TokenGenerated"),zR(e,"PageLoaded")];n.onload=function(){var e=this;return S.default(this,t),r.forEach(function(t){return S.default(this,e),JR(t)}.bind(this))}.bind(this),WR(e)}window.addEventListener("message",function(e){return S.default(this,t),KR(e)}.bind(this),!1)}}(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){S.default(this,a),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),eI.init(this),this._send_gametag_data("sdk_init"),this.fixScore(),this._stableAdFlowForTest(),lk({onEvent:function(e){S.default(this,a);var t=e.name,n=e.data;(this._onEvent({name:t,message:"In Game Store : ".concat(t),status:"success",data:n,isStoreEvent:!0}),"STORE_UI_VISIBILITY_CHANGED"===t)&&(n.visible?this.onPauseGame("In game store opened","success"):this.onResumeGame("In game store closed","success"))}.bind(this)})}.bind(this)),this._registerSGBridge(),yo("which-frame",this._whichFrame()),this._loadLocus()}var t,n,r,i,s,o,d,c,l,h,f,p,m,v,g,A,b,y,_,w,k,x;return I.default(e,[{key:"_stableAdFlowForTest",value:function(){try{(a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&a.Ls.getBoolean("gd_tag")||cR().useTestAds)&&(this._gameData.adflw.adapters={default:["ima"],preroll:["ima"],midroll:["ima"],rewarded:["ima"]},console.log(this._gameData))}catch(e){console.log(e.message)}}},{key:"_getVisitorId",value:(x=D.default(T.default.mark((function e(){var t,n,r,a,i,s=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,cI({handler:function(){return S.default(this,s),!!xI}.bind(this),timeout:1e3,interval:10});case 2:return a=e.sent,i=a?null===(t=xI)||void 0===t||null===(n=t.visitor)||void 0===n||null===(r=n.visitorData)||void 0===r?void 0:r.visitorId:"noVisitorId",e.abrupt("return",i);case 5:case"end":return e.stop()}}),e,this)}))),function(){return x.apply(this,arguments)})},{key:"_initGameSessionTracking",value:(k=D.default(T.default.mark((function e(){var t,n,r,a,i,s,o,d,u,c,l,h,f,p,m,v,g,A,b,y,_,w,k,x,E,D,R,I,C,O,P,L=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(t=this._gameData)||void 0===t||null===(n=t.gs_trc)||void 0===n?void 0:n.enabled){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this._getVisitorId();case 5:l=e.sent,h=this._gameData,f=h.category,p=h.dname,m=h.pname,v=h.gameId,g=h.slug,A=h.title,b=h.ctry,y=h.failed,_=this._topDomain||this._parentDomain,w=new I_,k=w.get(),x=this.msgrt._ua,E=document.referrer,D=this.msgrt._layout,R=go.version,I=(null===(r=this._gameData)||void 0===r||null===(a=r.hwei)||void 0===a?void 0:a.enabled)&&(null===(i=this._gameData)||void 0===i||null===(s=i.hwei)||void 0===s?void 0:s.gs.enabled),C=(null===(o=this._gameData)||void 0===o||null===(d=o.gft)||void 0===d?void 0:d.midroll.enabled)||!1,O=(null===(u=this._gameData)||void 0===u||null===(c=u.midroll_plus)||void 0===c?void 0:c.enabled)||!1,P={args:{rfr:E,category:f,dname:p,pname:m,gameId:v,slug:g,title:A,ctry:b,domain:_,loc:k,ua:x,layout:D,version:R,visitorId:l,hasGft:C,hasMp:O,failed:y,isHwp:I},onError:function(e){S.default(this,L),this._sendSDKError(e)}.bind(this)},sT(P);case 21:case"end":return e.stop()}}),e,this)}))),function(){return k.apply(this,arguments)})},{key:"_initUnityHandler",value:function(){var e=this;window.addEventListener("DOMNodeInserted",function(){if(S.default(this,e),this._gameData.block_exts&&this._removeExternalsInHtml({enabled:!1}),document.getElementsByClassName("webgl-content")[0]){var t=document.getElementsByClassName("webgl-content")[0].getElementsByClassName("footer")[0];t&&t.setAttribute("style","display:none")}}.bind(this))}},{key:"_send_gametag_data",value:(w=D.default(T.default.mark((function e(t){var n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._getGdModeIfExist()&&(n=a.getMobilePlatform()||"web",this.adInstance._send("tg.created",{gmid:this.options.gameId,dvc:n,qint:t}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return w.apply(this,arguments)})},{key:"_loadCMP",value:(_=D.default(T.default.mark((function e(){var t,n,r,a,i,s;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=12;break}if(r=new I_,0!==(null==(a=r.get("depth"))?void 0:a.value)||null===(t=this._gameData)||void 0===t||null===(n=t.cmp)||void 0===n||!n.enabled){e.next=12;break}if(null===(i=this._gameData)||void 0===i||null===(s=i.cmp)||void 0===s||!s.checkDepthOnly){e.next=9;break}return e.next=7,PR();case 7:e.next=12;break;case 9:if("html5.gamedistribution.com"!==this._topDomain){e.next=12;break}return e.next=12,PR();case 12:case"end":return e.stop()}}),e,this)}))),function(){return _.apply(this,arguments)})},{key:"testConsent",value:function(){try{DR();D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,SR({});case 2:e.sent;case 3:case"end":return e.stop()}}),e)})))()}catch(e){console.log("find CMP error",e)}}},{key:"_sendLoaderDataEvent",value:function(){try{this.options.onLoaderEvent&&this.options.onLoaderEvent({name:"LOADER_DATA",message:{game:this._gameData,bridge:this._bridge},status:this._sdk_ready?"success":"error"})}catch(e){}}},{key:"_registerSGBridge",value:function(){var e=this;LR.on("splash-hidden",function(t){S.default(this,e),this._hideCMPButton()}.bind(this))}},{key:"_hideCMPButton",value:function(){var e=document.getElementById("ot-sdk-btn-floating");e&&(e.style.display="none")}},{key:"_sendLoadedEvent",value:function(e){if(this._isLoaded||(this._isLoaded={}),!this._isLoaded[e]){this._isLoaded[e]=!0;var t="loader-frame"===this._whichFrame()&&(this._isHostHTML5Domain()||this._isExternalHoster());P.default(location.href,!0);if(this._whichFrame(),this._isMasterGameURL(),this._isExtHostedGameURL(),this._isTokenGameURL(),this._isHostHTML5Domain(),this._isExternalHoster(),location.href,document.referrer,t)try{yo("which-frame, sending tunnel event",this._whichFrame()),this._sendTunnlEvent(e),this.msgrt.send("loaded",{message:this._hasBlocker?"Has Blocker":"No Blocker"})}catch(e){}}}},{key:"_sendGamedockGamePlay",value:function(){var e=this._isTokenGameURL();if(!(this._gameData.loader.enabled&&e||this._gameDockGamePlaySent))try{this._sendGamedockEvent("gameplay"),this._gameDockGamePlaySent=!0}catch(e){}}},{key:"_safeInit",value:function(){this._checkUserDeclinedTracking(),this._checkWhitelabelPartner();var e=this._gameData.diagnostic;void 0!==e&&void 0!==e.close_ga&&!1!==e.close_ga||this._loadGoogleAnalytics(),void 0!==e&&void 0!==e.close_gamedock&&!1!==e.close_gamedock||!this._bridge.isCoreSDKMode&&!this._bridge.noGamedockSDK&&this._loadGamedockTracker(),void 0!==e&&void 0!==e.close_minijuegos&&!1!==e.close_minijuegos||(console.log("noMinijuegosSDK",!this._bridge.isCoreSDKMode,!this._bridge.noMinijuegosSDK,document.location.search.indexOf("mp_game_id")>=0),!this._bridge.isCoreSDKMode&&!this._bridge.noMinijuegosSDK&&document.location.search.indexOf("mp_game_id")>=0&&this._loadMiniJuegosGratisTracker())}},{key:"_initializeSDKWithGameData",value:(y=D.default(T.default.mark((function e(t,n){var r,a,i,s,o,d,u=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._getGameData();case 3:return this._gameData=e.sent,e.next=6,this._loadCMP();case 6:return this._bridge.isCoreSDKMode=(null===(r=this._gameData.disableAds)||void 0===r?void 0:r.default)||!1,this._safeInit(),this._checkGameId(),this._checkGameDeleted(),this._checkBlocking(),this._changeMidrollInDebugMode(),s=void 0===this._gameData.diagnostic||void 0===(null===(a=this._gameData.diagnostic)||void 0===a?void 0:a.close_ads)||!1===(null===(i=this._gameData.diagnostic)||void 0===i?void 0:i.close_ads),e.next=15,AI();case 15:return o=e.sent,_o("[ad-system-init] allowed",{adSystemInitAllowed:d=s&&!o,notDisabledByModuleClose:s,disabledByConsent:o}),d&&(this.videoAdReady=this._initializeVideoAd().then(function(){S.default(this,u),(this._isMasterGameURL()||this._isExtHostedGameURL())&&(this.msgrt.send("adblocker.flw",{message:"ok"}),this.msgrt.send("adblocker.adapters",{message:"none"})),this._checkAdBlockerRemoval()}.bind(this)).catch(function(e){S.default(this,u);var t="".concat(e).startsWith("Error: Blocked:");_o("gd-adflow adsBlocked",t,e);var n=this.get_ad_system_init_result(),r=n.ima,a=n.afg;if(this.adsBlocked=!r&&!a,this._isMasterGameURL()||this._isExtHostedGameURL()){this.msgrt.send("adblocker.flw",{message:"".concat(this.adsBlocked?"blocked":"ok")});var i=r||a?r?a?"none":"adsense":"ima":"all";this.msgrt.send("adblocker.adapters",{message:"".concat(i)})}this._sendSDKError(e),this._checkAdBlocker(),console.error(e.message||e)}.bind(this))),e.next=21,xT();case 21:t(this._gameData),e.next=29;break;case 24:e.prev=24,e.t0=e.catch(0),this._sendSDKError(e.t0),this.onResumeGame(e.t0.message,"warning"),n(e.t0);case 29:case"end":return e.stop()}}),e,this,[[0,24]])}))),function(e,t){return y.apply(this,arguments)})},{key:"_getDefaultOptions",value:function(){return{debug:!1,testing:!1,gameId:"4f3d7d38d24b740c95da2b03dc3a2333",prefix:"gdsdk__",onEvent:function(e){},onLoaderEvent:function(e){},flashSettings:{adContainerId:"",splashContainerId:""},advertisementSettings:{},resumeGame:function(){},pauseGame:function(){},onInit:function(e){},onError:function(e){},loader:{}}}},{key:"_checkAdBlockerRemoval",value:function(){a.Ls.getBoolean(this.blockingDetectedKey)&&(a.Ls.set(this.blockingDetectedKey,!1),this.send_atom_event("ad-blocker-removed"))}},{key:"_checkAdBlocker",value:(b=D.default(T.default.mark((function e(){var t,n,r,i,s;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t=this.get_ad_system_init_result(),n=t.ima,r=t.afg,n&&r){e.next=12;break}if(a.Ls.set(this.blockingDetectedKey,!0),null===(i=this._gameData.rmblck)||void 0===i||!i.enabled){e.next=12;break}if(this.adBlockerPage){e.next=12;break}return e.next=9,nI();case 9:s=e.sent,this.adBlockerPage=new s(this._gameData),this.adBlockerPage.add();case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),console.log(e.t0.message);case 17:case"end":return e.stop()}}),e,this,[[0,14]])}))),function(){return b.apply(this,arguments)})},{key:"_extendDefaultOptions",value:function(e,t){var n=F.default(e);this.options=t?a.extendDefaults(n,t):n,this.options.gameId=this.options.gameId.trim()}},{key:"_setConsoleBanner",value:function(){if(!this._bridge.noConsoleBanner){var e=go.version,t=console.log("%c %c %c GameDistribution.com HTML5 SDK | Version: "+e+" %c %c %c","background: #9854d8","background: #6c2ca7","color: #fff; background: #450f78;","background: #6c2ca7","background: #9854d8","background: #ffffff");console.log.apply(console,t)}}},{key:"_shouldSendTunnlEvent",value:function(e){return this.tunnlEventCounts||(this.tunnlEventCounts={}),this.tunnlEventCounts[e]||(this.tunnlEventCounts[e]=0),this.tunnlEventCounts[e]++,1===this.tunnlEventCounts[e]}},{key:"_sendTunnlEvent",value:function(e){var t=this;D.default(T.default.mark((function n(){var r,a,i,s,o,d=this;return T.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,tk();case 2:if(!(r=n.sent)){n.next=9;break}return n.next=6,r.isLoader();case 6:n.t0=n.sent,n.next=10;break;case 9:n.t0=!0;case 10:if(a=n.t0,i=r.hasRouter(),a||!i){n.next=15;break}return n.abrupt("return");case 15:if(t._shouldSendTunnlEvent(e)){n.next=17;break}return n.abrupt("return");case 17:void 0!==t._topDomain&&"undefined"!==t._topDomain||(t._topDomain=void 0),s=t._topDomain||t._parentDomain,o={page_url:s,game_id:t.options.gameId,eventtype:e,ts:Date.now()},fetch("https://hlana.gamedistribution.com/event?".concat(H.default.stringify(o))).catch(function(n){S.default(this,d),t._sendHLAnalyicsLog({query:_I(_I({},o),{},{error:null==n?void 0:n.message}),eventType:-e})}.bind(this)),t._sendHLAnalyicsLog({query:o,eventType:e}),t.adInstance._send_atom_event("hl.config",o),t._send_gametag_data("sdk_gameplay");case 24:case"end":return n.stop()}}),n,this)})))()}},{key:"_sendHLAnalyicsLog",value:function(e){var t,n=e.query,r=e.eventType;if(1===r?t="hl.gameplay":2===r?t="hl.gameload":3===r?t="hl.adblock":-1===r?t="hl.gameplay.error":-2===r?t="hl.gameload.error":-3===r&&(t="hl.adblock.error"),t)try{this.dumper.send_atom_event(t,n)}catch(e){console.log("Error on sending dump!",e)}}},{key:"_sendAdRequestContext",value:function(e){this.msgrt.send("adctx",{message:e.adTag.bidder})}},{key:"_checkWhitelabelPartner",value:function(){this._whitelabelPartner=!1;var e=a.getQueryParams("xanthophyll");e.hasOwnProperty("xanthophyll")&&"true"===e.xanthophyll&&(this._whitelabelPartner=!0,a.dankLog("White label publisher","".concat(this._whitelabelPartner),"success"))}},{key:"_checkRevisionOrigin",value:function(){var e=this;return[document.location.origin].concat(N.default(document.location.ancestorOrigins)).find(function(t){return S.default(this,e),"revision.gamedistribution.com"===P.default(t,!0).hostname}.bind(this))}},{key:"_checkConsole",value:function(){try{if(!a.Ls.available)return;if("developer.gamedistribution.com"===this._parentDomain||"developer.gamedistribution.com"===this._topDomain||"developer-acc.gamedistribution.com"===this._parentDomain||"developer-acc.gamedistribution.com"===this._topDomain)this._checkRevisionOrigin()&&(a.Ls.set("gd_debug_ex",!0),a.Ls.set("gd_disable_midroll_timer",!0),a.Ls.set("gd_tag",!0));else"localhost:3000"===this._parentDomain&&(a.Ls.set("gd_debug_ex",!0),a.Ls.set("gd_disable_midroll_timer",!0));a.Ls.getBoolean("gd_debug_ex")&&(this.openConsole(),this.msgrt.send("dev.console",{message:this._parentDomain}))}catch(e){}}},{key:"_checkUserDeclinedTracking",value:function(){this._userDeclinedTracking=this._bridge.isCoreSDKMode||document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0}},{key:"_initializeMessageRouter",value:function(){this.msgrt=new a.MessageRouter({gameId:this.options.gameId,hours:(new Date).getHours(),topDomain:this._topDomain,domain:this._parentDomain,referrer:this._parentURL,depth:a.getIframeDepth(),version:go.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:a.getMobilePlatform(),byloader:this._bridge.isTokenGameURL,isTokenGameURL:this._bridge.isTokenGameURL,isMasterGameURL:this._bridge.isMasterGameURL,isExtHostedGameURL:this._bridge.isExtHostedGameURL,byloaderVersion:this._bridge.version})}},{key:"_loadGamedockTracker",value:function(){var e=this;try{var t=[this._gameData.gmky.url];a.getScript(t[0],"GamedockSDK",{alternates:t}).then(function(){var t,n,r,a;(S.default(this,e),xI=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(t=this._gameData.diagnostic)&&void 0!==t&&null!==(n=t.gameDock)&&void 0!==n&&n.adViewEvent)&&(null!==(r=this._gameData.diagnostic)&&void 0!==r&&null!==(a=r.gameDock)&&void 0!==a&&a.heartbeatEnable&&xI.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig));RR.track(xI,this._gameData)}.bind(this)).catch(function(t){S.default(this,e),this._sendSDKError(t)}.bind(this))}catch(e){}}},{key:"_initGamedockTracker",value:function(e){if(!this._bridge.isCoreSDKMode)return e.initialize("gd",this._parentDomain)}},{key:"_sendGamedockEvent",value:function(e){var t,n;null===(t=xI)||void 0===t||null===(n=t.tracking)||void 0===n||n.trackEvent(e,{pageId:this.options.gameId,pageType:"game"})}},{key:"_loadMiniJuegosGratisTracker",value:function(){var e=this;window.mpConfig={game:this.options.gameId,partner:"game-distribution"};var t=["https://ext.minijuegosgratis.com/external-host/main.js"];console.log("noMinijuegosSDK loading"),a.getScript(t[0],"MinijuegosSDK",{alternates:t}).catch(function(t){S.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_loadLocus",value:function(){var e=D.default(T.default.mark((function e(){var t,n=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Nw();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled"),e.abrupt("return");case 6:t=["https://pm.azerioncircle.com/p/locus/"],window.gdlocus=window.gdlocus||{cmd:[]},window.gdlocus.cmd.push(function(){S.default(this,n),this.isOpusReady=!0,window.gdlocus.iservice.register({method:"muteAdFlow",handler:this._muteFlowSound.bind(this)}),window.gdlocus.iservice.register({method:"terminateAdFlow",handler:this._terminateFlow.bind(this)})}.bind(this)),a.getScript(t[0],"locus",{alternates:t}).catch(function(e){S.default(this,n),this._sendSDKError(e)}.bind(this)).then(function(){S.default(this,n)}.bind(this));case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_muteFlowSound",value:(A=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._adFlow){e.next=2;break}return e.abrupt("return");case 2:this._adFlow.mute();case 3:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"_terminateFlow",value:(g=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._adFlow){e.next=2;break}return e.abrupt("return");case 2:this._adFlow.terminate();case 3:case"end":return e.stop()}}),e,this)}))),function(){return g.apply(this,arguments)})},{key:"_loadGoogleAnalytics",value:function(){var e=this;if(!this._bridge.isCoreSDKMode){var t=this._gameData,n=t.gameId,r=t.slug,a=t.title,i=new I_,s={provider:"gd-sdk",page_depth:i.get("depth.value"),partner_domain_from:i.get("partner.domain.from"),top_domain_from:i.get("top.domain.from"),top_domain:this._topDomain,parent_domain:this._parentDomain,parent_url:this._parentURL,game_id:n,game_slug:r,game_title:a};oI({onError:function(t){S.default(this,e),this._sendSDKError(t)}.bind(this),args:s})}}},{key:"_getCleanUrl",value:function(e){var t=e;try{var n=new P.default(e,!0);t="".concat(n.protocol,"//").concat(n.hostname,"/").concat(n.pathname)}catch(e){}return t}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new a.EventBus,a.SDKEvents.forEach(function(t){var n=this;return S.default(this,e),this.eventBus.subscribe(t,function(e){return S.default(this,n),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),a.IMAEvents.forEach(function(t){var n=this;return S.default(this,e),this.eventBus.subscribe(t,function(e){return S.default(this,n),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){S.default(this,e);var t=this._getDeveloperDomains(),n=t.developerDomain,r=t.gameApiDomain;if(n){fetch("https://".concat(r,"/game/v2/hasapi/").concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var a=JSON.stringify({type:"GD_SDK_IMPLEMENTED",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(a,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(a,"*")}catch(e){}}uR()}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return S.default(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(t){var n,r;S.default(this,e),this.msgrt.send("ad.impression"),sR(),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&RR.track(xI,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(t){S.default(this,e),this.msgrt.send("ad.error",{message:t.message,details:t.details})}.bind(this),"ima"),this.eventBus.subscribe("AD_SDK_REQUEST",function(t){S.default(this,e),this._sendAdRequestContext(t.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(t){if(S.default(this,e),t.message.startsWith("Blocked:")){var n=t.message.replace("Blocked:","").trim(),r=this._getCleanUrl(n),a="Blocked: ".concat(r);if(!this._bridge.noBlockerEvent&&(this.msgrt.send("error",{message:a}),!this._hasBlocker)){this._hasBlocker=!0;this.msgrt.send("adblck.src",{message:a});var i=this.get_ad_system_init_result(),s=i.ima,o=i.afg;(!s||!o)&&this._sendTunnlEvent(3)}}else this.msgrt.send("error",{message:t.message})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_EMPTY",function(t){S.default(this,e),this.msgrt.send("tunnl.keys.empty",{message:t.message,details:t.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_FALLBACK",function(t){S.default(this,e),this.msgrt.send("tunnl.keys.fallback",{message:t.message,details:t.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_T4R",function(t){return S.default(this,e),this.msgrt.send("adt4r")}.bind(this),"sdk")}},{key:"_checkGameId",value:function(){this.options.gameId===this._defaults.gameId&&this._sendSDKError("Please check if your GAME ID is correct. Otherwise, no revenue will be reported.")}},{key:"_getDefaultGameData",value:function(){return{gameId:this.options.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}},{key:"_getGameDataUrl",value:function(){var e=void 0!==this._topDomain&&"undefined"!==this._topDomain?this._topDomain:this._parentDomain,t=aw().config;return"https://".concat(t.gameAPI,"/game/v4/get/").concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(go.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(v=D.default(T.default.mark((function e(){var t,n,r;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=!0,n=this._gameData,r=this._topDomain.indexOf("gamedistribution.com")>=0,t=(t=void 0===this._gameData.dmain||this._gameData.dmain)||r,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&this._redirectToBlocking(!1,!t);case 7:case"end":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)})},{key:"_blockDirectTokenURLEmbedding",value:function(){var e,t,n=this._checkTokenGameUrl(),r=new I_,a="html5.gamedistribution.com"!==P.default(document.referrer).host,i=n&&!tI.SDKExistsOnUpperFrame&&r.get("depth.value")>0&&a;if(i&&(null===(e=this._gameData)||void 0===e||null===(t=e.directTokenUse)||void 0===t?void 0:t.enabled)){var s,o,d=null===(s=this._gameData)||void 0===s||null===(o=s.directTokenUse)||void 0===o?void 0:o.behavior;"to-loader"===d?this._redirectToLoaderFrame():"to-blocked-page"===d&&this._redirectToBlocking(!0)}return{blocked:i}}},{key:"_redirectToBlocking",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.msgrt.send("blocked");var r=this._gameData;setTimeout(D.default(T.default.mark((function a(){return T.default.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!e){a.next=9;break}return a.prev=1,a.next=4,t.adInstance._send_atom_event("token-blocked");case 4:a.next=9;break;case 6:a.prev=6,a.t0=a.catch(1),console.log("Could not send dump.token-blocked",a.t0);case 9:window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(H.default.stringify({domain:t._parentDomain,id:r.gameId,img:t._get_game_thumbnail_url(),title:r.title,unregistered:n,utm_source:t._parentDomain,utm_medium:(null==r?void 0:r.slug)||(null==r?void 0:r.title)||(null==r?void 0:r.gameId)||"unknown",utm_campaign:"block-and-redirect"}));case 10:case"end":return a.stop()}}),a,null,[[1,6]])}))),100)}},{key:"_redirectToLoaderFrame",value:function(){var e=this,t=this._gameData;setTimeout(D.default(T.default.mark((function n(){var r,a,i,s;return T.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.adInstance._send_atom_event("loader-redirect");case 3:n.next=8;break;case 5:n.prev=5,n.t0=n.catch(0),console.log("Could not send dump.loader-redirect",n.t0);case 8:r=P.default(location.href,!0),a=_I(_I({},r.query),{},{rd:"1"}),i=H.default.stringify(a),s="https://html5.gamedistribution.com/".concat(t.gameId,"/?").concat(i),window.location.href=s;case 13:case"end":return n.stop()}}),n,null,[[0,5]])}))),100)}},{key:"_checkGameDeleted",value:function(){var e=this;6!==this._gameData.status&&4!==this._gameData.activeStatus||(console.log("%c %c %c This game was deleted, please remove it in your website... ","background: #F2181A","background: #F23818","color: #fff; background: #F23818;","background: #F55E60","background: #F55E60","background: #c4161e; color: #fff;"),setTimeout(function(){S.default(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;cR().disableMidrolltimer?e.midroll=0:a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&(a.Ls.getBoolean("gd_disable_midroll_timer")?e.midroll=0:e.midroll=this._getDefaultGameData().midroll)}},{key:"_checkSplashAndPromoScreens",value:function(){var e,t,n,r;!1===(null===(e=this._gameData.loader)||void 0===e?void 0:e.mobile)&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var a,i=this._gameData,s=i.gdpr&&!0===i.gdpr.consent,o=i.loader,d=null===(t=i.promo)||void 0===t?void 0:t[null===(n=i.promo)||void 0===n||null===(r=n.template)||void 0===r?void 0:r.preroll];(i.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=d&&d.enabled?this._createPromoBeforeSplash(i,s):o.enabled&&!0!==(null===(a=o.splash)||void 0===a?void 0:a.skip)?this._createSplash(i,s):this.onResumeGame("Skipped splash.","success"):o.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||s?null!=d&&d.enabled?this._createPromoBeforeSplash(i,s):!1!==o.enabled&&this._createSplash(i,s):null!=d&&d.enabled&&this._createPromo(i,s))}},{key:"_initializeVideoAd",value:(m=D.default(T.default.mark((function e(){var t;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._bridge.isCoreSDKMode){e.next=2;break}return e.abrupt("return");case 2:return(t=this._gameData).sdk.enabled&&(this.options.advertisementSettings=a.extendDefaults(this.options.advertisementSettings,t.sdk)),this.macros=new a.Macros({game:t,bridge:this._bridge}),this.adInstance=new bR(this.options.flashSettings.adContainerId,this.options.advertisementSettings,{parentURL:this._parentURL,parentDomain:this._parentDomain,topDomain:this._topDomain}),this.adInstance.gameId=t.gameId,this.adInstance.category=t.category,this.adInstance.tags=t.tags,this.adInstance.noPreroll=this._bridge.noPreroll,this.adInstance.macros=this.macros,this.adInstance.gameData=t,this.adInstance.msgrt=this.msgrt,this.adInstance.PackageJSON=go,this.adInstance._send_atom_event("gd.location"),e.next=17,this.adInstance.start();case 17:case"end":return e.stop()}}),e,this)}))),function(){return m.apply(this,arguments)})},{key:"_sendSDKReady",value:function(){var e="Everything is ready.";this.eventBus.broadcast("SDK_READY",{message:e,status:"success"});try{this.options.onInit(e)}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_sendSDKError",value:function(e){e=e.message?e:{message:e};this.eventBus.broadcast("SDK_ERROR",{message:e.message,status:"error"});try{this.options.onError(e)}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"IscForwardOnEvent",value:(p=D.default(T.default.mark((function e(t){var n,r,a,i,s;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=!1,e.prev=1,e.next=4,tk();case 4:if(!(r=e.sent)){e.next=14;break}return e.next=8,r.isLoader();case 8:if(s=e.sent,!((null===(a=this._gameData)||void 0===a||null===(i=a.isv_fw)||void 0===i?void 0:i.enabled)&&s&&r.onEvent)){e.next=14;break}return n=!0,r.onEvent({event:t}),e.abrupt("return",n);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),yo("[GD-IS] error on onEvent forward",e.t0);case 19:return e.abrupt("return",n);case 20:case"end":return e.stop()}}),e,this,[[1,16]])}))),function(e){return p.apply(this,arguments)})},{key:"_onEvent",value:(f=D.default(T.default.mark((function e(t){var n,r;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.IscForwardOnEvent(t);case 2:if(!e.sent){e.next=5;break}return e.abrupt("return");case 5:if(yo("[GD-IS] onEvent executing",{event:null==t?void 0:t.name,e:t,location:window.location.href}),a.dankLog(t.name,t.message,t.status),!t.skipForward){e.next=9;break}return e.abrupt("return");case 9:_o("[developer-event]".concat(t.isStoreEvent?"[store]":""),{name:t.name,data:t.data||{},source:"core"}),null!==(n=this._gameData)&&void 0!==n&&null!==(r=n.evnts)&&void 0!==r&&r.enabled&&VR({event:t.name,game:this._gameData});try{this.options.onEvent({name:t.name,message:t.message,status:t.status,data:t.data||{},isStoreEvent:t.isStoreEvent||!1,skipForward:t.skipForward,adPosition:t.adPosition})}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}case 12:case"end":return e.stop()}}),e,this)}))),function(e){return f.apply(this,arguments)})},{key:"_getGameData",value:(h=D.default(T.default.mark((function e(){var t;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pw();case 2:return t=e.sent,this.msgrt.setGameData(t),a.setDankLog(t.diagnostic),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"_createSplash",value:(l=D.default(T.default.mark((function e(t,n){var r,i,s,o,d=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getSplashTemplate(t);case 2:return r=e.sent,i=new r(_I(_I({},this.options),{},{isConsentDomain:n,version:go.version}),t,this._parentDomain),e.next=6,Hw();case 6:s=e.sent,o=s.enabled,i.on("playClick",function(){var e,r,s,u=this;if(S.default(this,d),((null===(e=window.gdlocus)||void 0===e?void 0:e.firstUserAction)||D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log("gd-adflow locus-first-user-action is not defined");case 1:case"end":return e.stop()}}),e)}))))({game_id:t.gameId}).catch(function(e){S.default(this,u),console.log("gd-adflow locus-first-user-action error",e)}.bind(this)),n){var c=new Date;c.setDate(c.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(c.toUTCString(),"; path=/")}if(this._hideCMPButton(),uT("play"),o)window.gdsdk.showAd(a.AdType.Interstitial,{position:"preroll"}).catch(function(e){S.default(this,u),i.hide()}.bind(this));else{var l={position:"preroll"};(function(){S.default(this,u),ko.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 1"),l.adapter="adsense")}).bind(this),this.showAd(a.AdType.Interstitial,l).catch(function(e){S.default(this,u)}.bind(this))}null!==(r=this._gameData)&&void 0!==r&&null!==(s=r.evnts)&&void 0!==s&&s.enabled&&(VR({event:"FirstInteraction",game:this._gameData}),this._send_gametag_data("first_interaction"))}.bind(this)),this.onPauseGame("Pause the game and wait for a user gesture","success"),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){S.default(this,d),i.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){S.default(this,d),i.hide()}.bind(this));case 12:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(c=D.default(T.default.mark((function e(t,n){var r,a,i,s,o=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(t);case 3:i=e.sent,(s=new i(_I(_I({},this.options),{},{isConsentDomain:n,version:go.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){S.default(this,o),s.hide(),this._createSplash(t,n)}.bind(this)),s.on("promoButtonClicked",function(){S.default(this,o),s.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0),this._createSplash(t,n);case 13:case"end":return e.stop()}}),e,this,[[0,9]])}))),function(e,t){return c.apply(this,arguments)})},{key:"_createPromo",value:(d=D.default(T.default.mark((function e(t,n){var r,a,i,s,o=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(t);case 3:i=e.sent,(s=new i(_I(_I({},this.options),{},{isConsentDomain:n,version:go.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){S.default(this,o),s.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),s.on("promoButtonClicked",function(){S.default(this,o),s.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),this.onPauseGame("Pause the game for the promo","success"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),this.onResumeGame("Resumed after the promo","warning");case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(e,t){return d.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(a.AdType.Interstitial).catch(function(){S.default(this,e)}.bind(this))}},{key:"IscForwardShowAd",value:(o=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l=arguments;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=l.length>1&&void 0!==l[1]?l[1]:{},i={forwarded:r=!1,result:a},e.prev=3,null===(s=this._gameData)||void 0===s||null===(o=s.isv_fw)||void 0===o?void 0:o.enabled){e.next=7;break}return e.abrupt("return",i);case 7:return e.next=10,tk();case 10:if(d=e.sent){e.next=13;break}return e.abrupt("return",i);case 13:return e.next=16,d.isLoader();case 16:if(u=e.sent,c=d.hasRouter(),u||!c){e.next=26;break}return _o("[GD-IS] forwarding ad call",{location:window.location.href}),r=!0,e.next=25,d.showAd({adType:t,params:n});case 25:a=e.sent;case 26:e.next=32;break;case 29:e.prev=29,e.t0=e.catch(3),yo("[GD-IS] error on showAd forward",e.t0);case 32:return e.abrupt("return",{forwarded:r,result:a});case 33:case"end":return e.stop()}}),e,this,[[3,29]])}))),function(e){return o.apply(this,arguments)})},{key:"showAd",value:(s=D.default(T.default.mark((function e(t){var n,r=this,a=arguments;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},e.abrupt("return",new Promise(function(){var e=D.default(T.default.mark((function e(a,i){var s,o,d,u,c,l,h,f,p;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=null===(s=r._gameData)||void 0===s?void 0:s.igs,!e.t0){e.next=6;break}return e.next=5,rk();case 5:e.t0=e.sent;case 6:if(!e.t0){e.next=10;break}return _o("[GD-IS-IGS] store-visible so ad was skipped",{loc:window.location.href}),e.abrupt("return");case 10:return e.next=12,r.IscForwardShowAd(t,n);case 12:if(d=e.sent,u=d.forwarded,c=d.result,!u){e.next=18;break}return a(c),e.abrupt("return");case 18:return uT("play"),l={adType:t||"interstitial",params:n,adTimestamp:r.adRequestTimer},e.next=24,r.sdkReady;case 24:return h=e.sent,e.next=27,r.videoAdReady;case 27:if(null!==(o=r._gameData.lp)&&void 0!==o&&o.load||r._sendLoadedEvent(1),r._sendGamedockGamePlay(),r._rejectAdIfGameBlocked({gameData:h,adRequest:l}),r._rejectAdIfUnsupportedType({adRequest:l}),"rewarded"===t&&r._setGameRewardedFlag(),null!=n&&n.isGift||null!=n&&n.isCompensation||r._rejectAdIfAdRateHits({gameData:h,adRequest:l}),n&&(n.isGift||n.isMidrollPlus||n.isCompensation)||!r.adBlockerPage||(r._setAdRequestTimer(),r.adBlockerPage.show()),r.adInstance.attachAfgPosition(l),!r._autoResumeIfAdsAreDisabled(lT(l))){e.next=39;break}return e.abrupt("return",a());case 39:if(r._rejectAdIfAdDisabled({gameData:h,adRequest:l}),!r.adFlowRunning){e.next=42;break}return e.abrupt("return",a());case 42:return r.adFlowRunning=!0,f=new WT(r),r._adFlow=f,e.next=47,f.runAdFlow(l);case 47:p=e.sent,r.adFlowRunning=!1,r._adFlow=null,a(p),r._post_message({topic:"adrequest.instream"}),e.next=61;break;case 54:e.prev=54,e.t1=e.catch(0),r.adFlowRunning=!1,r._adFlow=null,r.onAdError(e.t1.message),r.onResumeGame(e.t1.message,"warning"),i(e.t1.message);case 61:case"end":return e.stop()}}),e,null,[[0,54]])})));return function(t,n){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e)}))),function(e){return s.apply(this,arguments)})},{key:"_autoResumeIfAdsAreDisabled",value:function(e){var t,n=!1,r=null===(t=this._gameData.diagnostic)||void 0===t?void 0:t.close_ads,a=this._gameData.disableAds[e],i=r||a;return yo("gd-adflow autoresume result: adModuleDisabled,adDisabled",r,a,e,this._gameData.diagnostic,this._gameData.disableAds),i&&(this._runAutoResume(),n=!0),n}},{key:"_runAutoResume",value:function(){var e=this,t="CONTENT_PAUSE_REQUESTED",n="CONTENT_RESUME_REQUESTED";this.eventBus.broadcast(t,{name:t,message:"Auto pause when ads are disabled"}),setTimeout(function(){S.default(this,e),this.eventBus.broadcast(n,{name:n,message:"Auto resume when ads are disabled"}),this.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success")}.bind(this),3e3)}},{key:"_giveGift",value:function(e){var t,n,r,a,i,s,o,d,u,c,l,h,f,p,m;switch(e){case"preroll":null!==(t=this._gameData)&&void 0!==t&&null!==(n=t.gft)&&void 0!==n&&n[e].enabled&&(null===(r=this._gameData)||void 0===r||null===(a=r.gft)||void 0===a||null===(i=a[e].durations[this._giftCount[e]])||void 0===i?void 0:i.after)===this.adInstance.adPrerollCount&&this.decideToGiveAGift(e);break;case"midroll":null!==(s=this._gameData)&&void 0!==s&&null!==(o=s.gft)&&void 0!==o&&o[e].enabled&&(null===(d=this._gameData)||void 0===d||null===(u=d.gft)||void 0===u||null===(c=u[e].durations[this._giftCount[e]])||void 0===c?void 0:c.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift(e);break;case"rewarded":null!==(l=this._gameData)&&void 0!==l&&null!==(h=l.gft)&&void 0!==h&&h[e].enabled&&(null===(f=this._gameData)||void 0===f||null===(p=f.gft)||void 0===p||null===(m=p[e].durations[this._giftCount[e]])||void 0===m?void 0:m.after)===this.adInstance.adRewardedCount&&this.decideToGiveAGift(e)}}},{key:"_setAdRequestTimer",value:function(){this.adRequestTimer=Date.now()}},{key:"clearSession",value:function(){this.adInstance.clearSession()}},{key:"_attachAfgFallback",value:function(e){var t=e.gameData,n=e.adRequest;if(!t.afg_disabled&&!n.params.hasOwnProperty("fallback_adsense"))switch(n.params.position){case"preroll":case"start":case"next":n.params.fallback_adsense=!0}}},{key:"_rejectAdIfGameBlocked",value:function(e){var t=e.gameData;if(t.bloc_gard&&!0===t.bloc_gard.enabled)throw new Error("Game or domain is blocked.")}},{key:"_rejectAdIfAdDisabled",value:function(e){var t=e.gameData,n=lT(e.adRequest);if(t.disableAds[n]||this._whitelabelPartner)throw new Error("Advertisements are disabled.")}},{key:"_rejectAdIfUnsupportedType",value:function(e){var t=e.adRequest;if(t.adType){if(t.adType!==a.AdType.Interstitial&&t.adType!==a.AdType.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=a.AdType.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===a.AdType.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i,s,o,d=e.gameData,u=e.adRequest,c=null;u.adType===a.AdType.Interstitial&&null!==(t=d.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=d.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(c=6e4*(null===(s=d.diagnostic)||void 0===s||null===(o=s.useMidrollIndex)||void 0===o?void 0:o.indexes[this.adInstance.adMidrollCount])):c=d.midroll;if(u.adType===a.AdType.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<c)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(i=D.default(T.default.mark((function e(t){var n=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=D.default(T.default.mark((function e(r,i){var s,o;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.sdkReady;case 3:return s=e.sent,e.next=6,n.videoAdReady;case 6:if(!s.bloc_gard||!0!==s.bloc_gard.enabled){e.next=8;break}throw new Error("Game or domain is blocked.");case 8:if(!s.disableAds[t]&&!n._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled for this ad type => ".concat(t,"..."));case 10:if(t){e.next=14;break}t=a.AdType.Rewarded,e.next=16;break;case 14:if(t===a.AdType.Interstitial||t===a.AdType.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+t);case 16:if(!n.adInstance){e.next=22;break}return e.next=19,n.adInstance.preloadAd(t);case 19:e.t0=e.sent,e.next=23;break;case 22:e.t0="gdsdk://preloaded";case 23:o=e.t0,r(o),e.next=30;break;case 27:e.prev=27,e.t1=e.catch(0),i(e.t1);case 30:case"end":return e.stop()}}),e,null,[[0,27]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"cancelAd",value:(r=D.default(T.default.mark((function e(){var t=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=D.default(T.default.mark((function e(n,r){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{t.adInstance.cancel(),t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),r()}catch(e){t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),n(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)})},{key:"showDisplayAd",value:function(e){var t=this;return new Promise(function(){var n=D.default(T.default.mark((function n(r,a){var i;return T.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t.sdkReady;case 3:return i=n.sent,n.next=6,t.videoAdReady;case 6:if(!i.dAds.enabled){n.next=13;break}return n.next=9,t.adInstance.loadDisplayAd(e);case 9:t._post_message({topic:"adrequest.display"}),r(),n.next=14;break;case 13:a("Display-Ads are disabled.");case 14:n.next=19;break;case 16:n.prev=16,n.t0=n.catch(0),a(n.t0.message||n.t0);case 19:case"end":return n.stop()}}),n,null,[[0,16]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"onResumeGame",value:function(e,t){var n,r;try{this._allowExternals({enabled:!1}),this.options.resumeGame()}catch(e){console.log("gd-adflow error onResumeGame",e),a.dankLog("DEVELOPER_ERROR",e.message,"warning")}var i="SDK_GAME_START";this.eventBus.broadcast(i,{name:i,message:e,status:t,analytics:{category:"SDK",action:i,label:this.options.gameId+""},adPosition:null===(n=this.adInstance)||void 0===n?void 0:n._findAdPosition()}),this.adInstance&&this.adInstance._hideAddResume(),this.adInstance&&this.adInstance._hideAdSpinner(),this.adInstance&&this.adInstance._clearTimeoutForSkipAddButton(),null===(r=this._gameData.evnts)||void 0===r||!r.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(VR({event:"GameStarted",game:this._gameData}),this._send_gametag_data("game_started"))}},{key:"onPauseGame",value:function(e,t){var n;this._allowExternals({enabled:!0});try{this.options.pauseGame()}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_PAUSE";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(VR({event:"GamePaused",game:this._gameData}),this._send_gametag_data("game_paused"))}},{key:"onRewardedWatchComplete",value:function(){this.eventBus.broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"})}},{key:"onAdError",value:function(e){this.eventBus.broadcast("AD_ERROR",{message:e,status:"error"})}},{key:"openConsole",value:function(){try{new a.ImplementationTest(this).start(),a.Ls.set("gd_debug_ex",!0)}catch(e){console.log(e)}}},{key:"_initBlockingExternals",value:function(){var e=this._gameData;(e.failed||e.block_exts&&e.block_exts.enabled)&&(this.window_open=window.open,this._allowExternals({enabled:!1}),this._removeExternalsInHtml({enabled:!1}))}},{key:"_checkFullscreen",value:function(){var e=this;try{var t=this._gameData;t.sdk.fullscreen&&"auto"===t.sdk.fullscreen&&document.addEventListener("click",function(){if(S.default(this,e),!this._isFullScreen){var t=document.body,n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullscreen;if(n)n.call(t);else if(void 0!==window.ActiveXObject){var r=new ActiveXObject("WScript.Shell");null!==r&&r.SendKeys("{F11}")}this._isFullScreen=!0}}.bind(this))}catch(e){console.log("Fullscreen error handled...",e)}}},{key:"_allowExternals",value:function(e){var t=this;void 0!==this.window_open&&(!1===e.enabled?window.open=function(e){S.default(this,t),this.msgrt.send("external",{message:"C> ".concat(e)}),(e.startsWith("https://play.google.com")||e.startsWith("https://itunes.apple.com"))&&this.window_open.call(null,e)}.bind(this):window.open=this.window_open)}},{key:"_shouldAllowExternalUrl",value:function(e){var t,n=this,r=new P.default(e),a=r.host;return r.href,((null===(t=this._gameData.urlBlockExc)||void 0===t?void 0:t.hosts)||[]).some(function(e){return S.default(this,n),e===a}.bind(this))}},{key:"_removeExternalsInHtml",value:function(e){var t=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var n=this;S.default(this,t);var r=!!(e.innerText.toLowerCase().includes("start")||e.innerText.toLowerCase().includes("play")||e.innerText.toLowerCase().includes("continue")),a=e.getAttribute("href");if(!this._shouldAllowExternalUrl(a)){var i=e.getAttribute("href");e.removeAttribute("href"),r||(e.onclick=function(e){return S.default(this,n),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(i)}),!1}.bind(this))}}.bind(this))}},{key:"_getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),d=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,v=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:d,noLoadedEvent:u,noBlockerEvent:c,noPreroll:m,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:l,noLotamePageView:h,noGamedockSDK:f,noMinijuegosSDK:p,version:r.version,pauseGameOnStartup:v,depth:a.getIframeDepth(),domainMatched:s===o,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isHostHTML5Domain",value:function(){var e=new P.default(location.href);return"html5.gamedistribution.com"===(null==e?void 0:e.host.toLowerCase())}},{key:"_isExternalHoster",value:function(){var e,t;return null===(e=this._gameData)||void 0===e||null===(t=e.extHosting)||void 0===t?void 0:t.enabled}},{key:"_whichFrame",value:function(){return(this._isMasterGameURL()||this._isExtHostedGameURL())&&!this._isTokenGameURL()?"loader-frame":"game-frame"}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_checkTokenGameUrl",value:function(){var e=P.default(location.href),t=e.origin,n=e.pathname,r="".concat(t).concat(n);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(r)}},{key:"_isTokenGameURL",value:function(){var e,t=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i,n="1"===(null===(e=P.default(location.href,!0).query)||void 0===e?void 0:e.rd);return t.test(location.href)||!n&&t.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isLoaderGameURL",value:function(){return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)&&location.href.startsWith("https://html5.gamedistribution.com")}},{key:"_getTokenGameURLConfig",value:function(){try{var e,t=/http[s]?:\/\/html5\.gamedistribution\.com\/[A-Za-z0-9]{8}\/[A-Fa-f0-9]{32}\/.*/i;if(t.test(location.href)){var n=new P.default(location.href,!0);if(!n.query.gd_zone_config)return;e=n.query.gd_zone_config}else if(t.test(document.referrer)){var r=new P.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new P.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(u.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new _R(t).splash()}},{key:"_createPrerollPromoTemplate",value:(n=D.default(T.default.mark((function e(t){var n,r,a,i,s;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null===(n=t.promo)||void 0===n?void 0:n[null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll],s=new yR(i),e.abrupt("return",s.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(u.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new P.default(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(H.default.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new P.default(e,!0);return n.query=_I(_I({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return u.Base64.encode(JSON.stringify(e))}},{key:"session",value:function(){var e=this;return new Promise(function(){var t=D.default(T.default.mark((function t(n,r){var a;return T.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.sdkReady;case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:a=e._gameData,n({ads:{display:{enabled:a.dAds.enabled},rewarded:{enabled:a.rewardedAds}},location:{parentDomain:e._bridge.parentDomain,topDomain:e._bridge.topDomain,parentURL:e._bridge.parentURL,depth:e._bridge.depth,loadedByGameZone:e._bridge.isTokenGameURL}});case 9:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e,n){return t.apply(this,arguments)}}())}},{key:"sendGenericEvent",value:function(e){console.log("Received generic event",e,this._isMasterGameURL());try{var t,n;if("track-milestone"==e.eventName)xI.tracking.trackEvent("milestoneAchieved",{pageId:this.options.gameId,pageType:"game",isAuthorized:null===(t=e.data)||void 0===t?void 0:t.isAuthorized,milestoneDescription:null===(n=e.data)||void 0===n?void 0:n.milestoneDescription});else if("game_event"==e.eventName)return this._gameEventPostMessage(e)}catch(e){console.log(e.message)}}},{key:"_gameEventPostMessage",value:function(e){if(void 0!==e.data.level&&this._numberValidator(e.data.level))if(void 0!==e.data.score&&this._numberValidator(e.data.score)){var t={type:e.eventName,data:e.data};window.location!==window.top.location&&window.top.postMessage(t,"*")}else console.log("Level data type should be number!");else console.log("Level data type should be number!")}},{key:"_numberValidator",value:function(e){return"number"==typeof e&&/^\d*$/.test(e)}},{key:"_getisMobile",value:function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),!1===t&&window.orientation>-1&&(t=!0),t}},{key:"_get_game_thumbnail_url",value:function(){var e=this,t=this._gameData,n=t.assets.find(function(t){return S.default(this,e),t.hasOwnProperty("name")&&512===t.width&&512===t.height}.bind(this));return n||(n=t.assets.length>0?t.assets[0]:{name:"logo.svg"}),"https://img.gamedistribution.com/".concat(n.name)}},{key:"_post_message",value:function(e){var t,n=e.topic,r=e.data,a=null!==(t=location.ancestorOrigins)&&void 0!==t&&t.length?location.ancestorOrigins[location.ancestorOrigins.length-1]:"*";try{var i=window.top||window.parent;i&&i.postMessage({source:"gdsdk",topic:n,data:r},a)}catch(e){console.error((null==e?void 0:e.message)||e)}}},{key:"fixScore",value:function(){var e,t,n,r,i=this;if(null===(e=this._gameData)||void 0===e||null===(t=e.fix_score)||void 0===t?void 0:t.enabled){var s=(null===(n=this._gameData)||void 0===n||null===(r=n.fix_score)||void 0===r?void 0:r.wait)||10;setTimeout(function(){var e=this;S.default(this,i),this.showAd(a.AdType.Interstitial,{position:"midroll"}).catch(function(t){S.default(this,e)}.bind(this))}.bind(this),1e3*s)}}},{key:"executeCompensation",value:(t=D.default(T.default.mark((function e(t){var n,r,i,s,o,d,u=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.whenAvailable)||!1,r=!this.adInstance.requestRunning&&!this.adFlowRunning,i=function(){var e=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.showAd(a.AdType.Interstitial,{position:"midroll",isCompensation:!0});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),!r){e.next=10;break}return e.next=7,i();case 7:return s=e.sent,e.abrupt("return",s);case 10:if(!n){e.next=17;break}return o=!1,e.next=15,new Promise(function(e,t){var n=this;S.default(this,u);var r=!1,a=setInterval(D.default(T.default.mark((function t(){var s;return T.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.adInstance.requestRunning||n.adFlowRunning){t.next=19;break}return clearInterval(a),t.prev=4,t.next=7,i();case 7:s=t.sent,r=!0,e(s),o=!0,t.next=19;break;case 14:t.prev=14,t.t0=t.catch(4),yo("[compensation] execution error after became available",t.t0),e({err:t.t0,success:!1}),o=!0;case 19:case"end":return t.stop()}}),t,null,[[4,14]])}))),1e3);setTimeout(function(){S.default(this,n),r||o||e({success:!1})}.bind(this),6e4)}.bind(this));case 15:return d=e.sent,e.abrupt("return",d);case 17:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"decideToGiveAGift",value:function(e){var t=this;try{var n,r=null===(n=this._gameData)||void 0===n?void 0:n.gft[e],i="gift";if(!DT({rateType:i,gameData:this._gameData}))return void yo("[compensation] rate check did not pass for ".concat(i));yo("[compensation] rate check passed for ".concat(i));var s=setInterval(D.default(T.default.mark((function n(){var r=this;return T.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:t.adInstance.requestRunning||t.adFlowRunning?console.log("Advertisement already running..."):(yo("gd-adflow WILL GIVE GIFT!!!"),t.showAd(a.AdType.Interstitial,{position:e,isGift:!0}).catch(function(e){S.default(this,r)}.bind(this)),clearInterval(s),t._giftCount[e]++);case 1:case"end":return n.stop()}}),n,this)}))),1e3*r.durations[this._giftCount[e]].wait)}catch(e){console.log("Advertisement Error...")}}},{key:"send_atom_event",value:function(e,t){this.adInstance._send_atom_event(e,t)}},{key:"get_session_id",value:function(){return wI}},{key:"get_ad_system_init_result",value:function(){return{afg:this.adInstance.afgInitSuccess,ima:this.adInstance.imaInitSuccess}}},{key:"_getDeveloperDomains",value:function(){var e,t;return"developer.gamedistribution.com"===this._topDomain||"developer-acc.gamedistribution.com"===this._topDomain?e=this._topDomain:!0===new RegExp("^localhost").test(this._parentDomain)&&(e="localhost"),e&&(t={"developer-acc.gamedistribution.com":"game-api-acc-real-aws.gamedistribution.com","developer.gamedistribution.com":"game.api.gamedistribution.com",localhost:"game-api-acc-real-aws.gamedistribution.com"}[e]),{developerDomain:e,gameApiDomain:t}}},{key:"_setGameRewardedFlag",value:function(){try{var e=this._getDeveloperDomains(),t=e.developerDomain,n=e.gameApiDomain;if(t){fetch("https://".concat(n,"/game/v2/hasrewarded/").concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var r=JSON.stringify({type:"GD_SDK_REWARDED_SET",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(r,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(r,"*")}catch(e){}}}catch(e){}}},{key:"_getGdModeIfExist",value:function(){var e=this,t=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return S.default(this,e),t.get(n)}.bind(this)});return!t.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:t.gd_mode}},{key:"_executeMidrollPlus",value:function(){var e,t=this;if(!(this.adInstance&&this.adInstance.checkIfTestAdsExist())){if(DT({rateType:"midroll+",gameData:this._gameData})&&null!==(e=this._gameData.midroll_plus)&&void 0!==e&&e.enabled&&!this.isMidrollPlusExecuted){var n;this.isMidrollPlusExecuted=!0;var r=this._gameData.midroll_plus.type||"midroll";if(null!==(n=this._gameData.midroll_plus)&&void 0!==n&&n.interval)var i=setInterval(function(){var e,n,s=this;(S.default(this,t),this.adFlowRunning)||(this.showAd(a.AdType.Interstitial,{position:"midroll",giftType:r,isMidrollPlus:!0}).catch(function(e){S.default(this,s)}.bind(this)),this._mplus_count++,"infinite"!==(null===(e=this._gameData.midroll_plus)||void 0===e?void 0:e.interval)&&this._mplus_count===(null===(n=this._gameData.midroll_plus)||void 0===n?void 0:n.interval)&&clearInterval(i))}.bind(this),6e4*this._gameData.midroll_plus.timer);else setTimeout(function(){var e=this;S.default(this,t),this.showAd(a.AdType.Interstitial,{position:"midroll",giftType:r,isMidrollPlus:!0}).catch(function(t){S.default(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}}}]),e}();function DI(){return(DI=D.default(T.default.mark((function e(){var t,n=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Nw();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled on proxy level"),e.abrupt("return");case 6:t=["https://pm.azerioncircle.com/p/locus/"],console.log("locus loading"),a.getScript(t[0],"locus",{alternates:t}).catch(function(e){S.default(this,n),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}var SI,RI=new m.EventEmitter,TI=function(e){var t=this;!function(){DI.apply(this,arguments)}();var n,r=function(e){var n=this;return S.default(this,t),new Promise(function(t,r){var a=this;S.default(this,n);var i=function(e){S.default(this,a),"SDK_GAME_START"===e.name&&(RI.off("sdk-event",i),t())}.bind(this);RI.on("sdk-event",i),m("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return S.default(this,t),n||(n=new EI(e)),n}.bind(this),i=function(){var e;return S.default(this,t),(null===(e=window.gdsdk.store)||void 0===e?void 0:e.isVisible)&&window.gdsdk.store.isVisible()}.bind(this),s=function(e){if(S.default(this,t),!i())return r(e);_o("[GD-IS-IGS] store-visible so ad was skipped",{loc:window.location.href})}.bind(this),o=function(e){return S.default(this,t),"gdsdk://preloaded"}.bind(this),d=function(e){return S.default(this,t),a().showDisplayAd(e)}.bind(this),u=function(){return S.default(this,t),m("cancelAd")}.bind(this),c=function(){return S.default(this,t),m("openConsole")}.bind(this),l=function(){return S.default(this,t),m("showBanner")}.bind(this),h=function(){return S.default(this,t),m("session")}.bind(this),f=function(e){return S.default(this,t),m("sendGenericEvent",{options:e})}.bind(this),p=function(){S.default(this,t),console.log("_sendSDKReady")}.bind(this),m=function(e,n){var r=this;return S.default(this,t),n||(n={}),new Promise(function(t,a){S.default(this,r);try{var i={type:"gd-sdk",method:e,options:n};window.parent.postMessage(i,"*"),t()}catch(e){console.log("gd:adp:m:s:error",e),t()}}.bind(this))}.bind(this),v=function(){S.default(this,t);window.addEventListener("message",(function(e){var t=e.data;e.origin,e.source;var n=t.type,r=t.event;"gd-sdk-on-event"===n&&r&&A(r)}),!1)}.bind(this),g=function(){S.default(this,t),v(),m("init")}.bind(this),A=function(n){S.default(this,t);try{RI.emit("sdk-event",n),e.onEvent&&(_o("[developer-event]".concat(n.isStoreEvent?"[store]":""),{name:n.name,data:n.data,source:"proxy"}),e.onEvent(n)),"SDK_GAME_PAUSE"===n.name?e.pauseGame&&e.pauseGame():"SDK_GAME_START"===n.name&&e.resumeGame&&e.resumeGame()}catch(e){console.log("DEVELOPER ERROR on forwarder-sdk")}}.bind(this);return{showBanner:l,showAd:s,preloadAd:o,showDisplayAd:d,cancelAd:u,openConsole:c,getSession:h,onEvent:A,init:g,_sendSDKReady:p,sendGenericEvent:f}},II=function(){var e=D.default(T.default.mark((function e(t){var n,r=this;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=TI(t)).init(),e.next=4,Kw({whichFrame:"game-frame",options:{onEvent:n.onEvent.bind(n)}});case 4:return lk({onEvent:function(e){S.default(this,r);var t=e.name,a=e.data;(n.onEvent({name:t,message:"In Game Store: ".concat(t),status:"success",data:a,isStoreEvent:!0}),"STORE_UI_VISIBILITY_CHANGED"===t)&&(a.visible?n.onEvent({name:"SDK_GAME_PAUSE",message:"SDK_GAME_PAUSE",status:"success"}):n.onEvent({name:"SDK_GAME_START",message:"SDK_GAME_START",status:"success"}))}.bind(this)}),e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),CI=function(){var e=this,t=function(){S.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),n=function(){S.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),r=function(){S.default(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this),a=function(){S.default(this,e);var r="html5.gamedistribution.com"!==P.default(window.location.href).host;return t()&&!(n()||r)?"loader-frame":"game-frame"}.bind(this);return{isMasterGameURL:t,isTokenGameURL:n,isExtHostedGameURL:r,whichFrame:a}},OI="gd-sdk-frame-handshake-request",PI="gd-sdk-frame-handshake-response",LI=function(e){var t=this;return new Promise(function(e,n){var r=this;S.default(this,t);var a={type:OI},i=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin,a=t.source,s=n.type;if(s===OI){var o={type:PI};a.postMessage(o,r)}else s===PI&&(i=!0,e({origin:r,source:a}))})),setTimeout(function(){S.default(this,r),i||e()}.bind(this),200),window.parent!==window?window.parent.postMessage(a,"*"):e()}.bind(this))},BI=function(){var e=D.default(T.default.mark((function e(){var t,n,r,a,i,s,o;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Gw();case 2:return t=e.sent,e.next=6,LI();case 6:if(n=e.sent,tI.SDKExistsOnUpperFrame=!!n,t){e.next=10;break}return e.abrupt("return",!1);case 10:return r=CI(),a=r.isMasterGameURL,r.isTokenGameURL,i=a(),e.next=14,qw();case 14:return s=e.sent,o=!1,o=s?!i&&!!n:!i,e.abrupt("return",o);case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),UI={},MI=function(e){try{if(e.skipForward)return void yo("gd-adflow fw-skip-forward",e);if(yo("gd-adflow fw-forwarding",e),UI.source){var t={type:"gd-sdk-on-event",event:e};UI.source.postMessage(t,UI.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},FI=function(){MI({name:"SDK_READY",status:"success",message:"Everything is ready."}),MI({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),MI({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},jI=function(e){window.addEventListener("message",(function(t){var n=t.data,r=t.origin,a=t.source,i=n.type,s=n.method,o=n.options;if("gd-sdk-self"!==i){if("gd-sdk"===i){if(!UI.source&&"init"===s)return function(e){var t=e.source,n=e.origin;UI={source:t,origin:n}}({source:a,origin:r}),void FI();var d=e[s];d&&D.default(T.default.mark((function t(){var n,r=this;return T.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,function(){S.default(this,r),"showAd"===s&&ko.firstAdapterModeAdsense&&"rewarded"!==o.adType&&(console.log("promo-test, set first adapter to adssense 3"),o.params=o.params?o.params:{},o.params.adapter="adsense")}.bind(this),!(n=d.apply(e,Object.values(o)))||!n.then){t.next=6;break}return t.next=6,n;case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log("gd:adp:m:r onFrameMessage error",t.t0);case 11:case"end":return t.stop()}}),t,this,[[0,8]])})))()}}else{var u={type:"gd-sdk",method:s,options:o};window.postMessage(u,location.origin)}}),!1)},GI=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){MI(e),t.apply(this,arguments)}}(e);var t=new EI(e);return jI(t),t},NI=function(){function e(){C.default(this,e),this.moduleName="GDAeria",this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/gd-sdk-aeria/1.0.1/dist/default/iife/index.js",dependencies:[]},Xg(this.moduleName,this.moduleConfig)}var t,n;return I.default(e,[{key:"load",value:(n=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,$g(this.moduleName);case 3:this.module=e.sent,yo("aeria module load success",this.module),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.log("aeria module load error",e.t0),this.module=null;case 11:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return n.apply(this,arguments)})},{key:"runYMenu",value:(t=D.default(T.default.mark((function e(t){var n;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.gameId,this.module){e.next=4;break}return e.next=4,this.load();case 4:(new this.module.Aeria).renderYMenu({gameId:n});case 6:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}(),qI=function(){var e=D.default(T.default.mark((function e(){var t,n,r,i,s,o,d,u,c,l,h,f,p,m,v,g;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=function(){var e,t=(e=new I_).get("partner.domain.value")||e.get("top.domain.value");return{isAeriaDomain:"minigame.aeriagames.jp"===t||"minigame-stg.aeriagames.jp"===t,isAeriaStagingDomain:"minigame-stg.aeriagames.jp"===t}}(),n=t.isAeriaDomain,r=t.isAeriaStagingDomain,!n){e.next=21;break}return o=function(){var e=(new I_).get("partner.url.value");return new P.default(e,!0)},d=function(){var e="ae-soft-323";try{var t=o(),n=t.pathname,r=n.split("/"),a=r[r.length-1];_o("aeria-ylogin:loc",t,n,a),e=a}catch(e){wo("Error on getting aeria game id",e)}return e}(),u={action:"score",data:{gameId:d,score:100},env:r?"staging":"production",system:"Softgames"},c=function(){var e=window.parent||window,t=u;e.postMessage(t,"*")},l=new a.EventBus,e.next=13,Pw();case 13:h=e.sent,f=null==h||null===(i=h.aeria)||void 0===i?void 0:i.yMenuExcluded,p=null==h||null===(s=h.aeria)||void 0===s?void 0:s.yLoginExcluded,l.subscribe("AD_FLOW_COMPLETE",(function(e){"midroll"===e.adType&&(p||c())})),m=function(){var e=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(new NI).runYMenu({gameId:d});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),v=CI(),g=v.whichFrame,"game-frame"===g()&&(f||m());case 21:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),HI=function(e){try{var t=Z_(e);e.gameId||t.send("nogameid",{message:"".concat(mb.parentURL)})}catch(e){}},VI=function(){var e=D.default(T.default.mark((function e(){return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,qI();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log("error on creating some bridge module");case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return e.apply(this,arguments)}}(),QI={create:function(){var e=D.default(T.default.mark((function e(t){var n,r;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,HI(t),Ow(t),e.next=5,BI();case 5:return n=e.sent,e.next=8,VI();case 8:if(window.isForwarderFrame=n,!n){e.next=15;break}return e.next=12,II(t);case 12:e.t0=e.sent,e.next=16;break;case 15:e.t0=GI(t);case 16:return r=e.t0,Vw(),e.abrupt("return",r);case 21:return e.prev=21,e.t1=e.catch(0),console.log("gd:adp: sdk adaptor create failed, fallback to default adapter",e.t1),e.abrupt("return",GI(t));case 25:case"end":return e.stop()}}),e,null,[[0,21]])})));return function(t){return e.apply(this,arguments)}}()};function zI(){return(zI=D.default(T.default.mark((function e(t,n){var r;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ww();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,KI(t);case 9:e.t0=e.sent;case 10:return r=e.t0,e.abrupt("return",n(r));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var WI=!1;function KI(e){var t=this;return new Promise(function(n,r){var a=this;if(S.default(this,t),SI)return n(SI);if(WI)var i=setInterval(function(){S.default(this,a),SI&&(WI=!1,clearInterval(i),n(SI))}.bind(this),100);else WI=!0,QI.create(e).then(function(e){S.default(this,a),SI=e,e._sendSDKReady(),WI=!1,n(SI)}.bind(this))}.bind(this))}function YI(e){return KI(e),{invoke:function(t){return function(e,t){return zI.apply(this,arguments)}(e,t)}}}var JI,XI,ZI=$i,$I=Mr,eC=Ha.f,tC=$r,nC=os,rC=dA,aC=me,iC=cA,sC=$I("".endsWith),oC=$I("".slice),dC=Math.min,uC=iC("endsWith"),cC=!uC&&!!function(){var e=eC(String.prototype,"endsWith");return e&&!e.writable}();function lC(e,t){var n=this;return new Promise(function(r,i){var s,o=this;S.default(this,n);var d=function(e){var t="https://pm.azerioncircle.com/pkg/@bygd/gd-sdk-wrp/dist/default/iife/index.js";return e&&(t="https://pm.azerioncircle.com/@bygd/gd-sdk-wrp/".concat(e,"/dist/default/iife/index.js")),[t]}(null==t||null===(s=t.game)||void 0===s?void 0:s.version);hC({text:"sdk-wrapper-script-load"}),a.getScript(d[0],"gd-sdk-wrp",{alternates:d}).catch(function(e){S.default(this,o),hC({text:"sdk-wrapper load error",error:e.message}),this._sendSDKError(e),i(e)}.bind(this)).then(D.default(T.default.mark((function n(){var a,s;return T.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,hC({text:"sdk-wrapper load success"}),a=window.GDSDKWRP.GDSDKWRP,s=new a,hC({text:"sdk-wrapper before gdSdkWrp.init"}),n.next=7,s.init(e,t);case 7:XI=n.sent,hC({text:"sdk-wrapper after gdSdkWrp.init"}),r(XI),n.next=16;break;case 12:n.prev=12,n.t0=n.catch(0),hC({text:"sdk-wrapper load error 2",error:n.t0.message}),i(n.t0);case 16:case"end":return n.stop()}}),n,null,[[0,12]])}))))}.bind(this))}function hC(e){try{var t={tp:"gd.wrp",args:e};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(u.Base64.encode(JSON.stringify(t))))),console.log(N.default(Object.values(e)))}catch(e){}}function fC(e){if(e){var t=e.name,n=e.message,r=e.status;try{hC({text:"samsung-wrp send-game-event",evt:e,hasOptions:!!JI}),JI&&JI.onEvent({name:t,message:n,status:r})}catch(t){hC({text:"samsung-wrp DEVELOPER-ERROR",evt:e,err:t})}}}function pC(e){try{return"samsungapps.com"===e||e.endsWith(".samsungapps.com")}catch(e){return!1}}function mC(e){return vC.apply(this,arguments)}function vC(){return(vC=D.default(T.default.mark((function e(t){var n,r,a,i,s,o,d,u,c;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return JI=t,Ow(t),e.next=4,Pw();case 4:if(i=e.sent,!XI){e.next=7;break}return e.abrupt("return",XI);case 7:if(s=null==i||null===(n=i.sdk_wrp)||void 0===n?void 0:n.enabled,o=null==i||null===(r=i.sdk_wrp)||void 0===r?void 0:r.version,d=null==i?void 0:i.gameId,u=null==i?void 0:i.title,AC("isWrapEnabled ".concat(s)),s){e.next=14;break}return e.abrupt("return");case 14:return c=null==i||null===(a=i.sdk_wrp)||void 0===a?void 0:a.wrapper,e.next=17,lC(c,{onEvent:fC,game:{gameId:d,title:u,version:o}});case 17:return XI=e.sent,e.abrupt("return",XI);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function gC(){return gC=D.default(T.default.mark((function e(t){var n,r,a;return T.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t._get_developer_sets,AC("beforeGetDeveloperSettings"),r=n(),AC("afterGetDeveloperSettings"),e.prev=4,e.next=7,mC(r);case 7:a=e.sent,AC("after get SDK wrapper: ".concat(!!a)),a&&(AC("setting SDK Wrapper as gd-sdk"),window.sdkWrapper=a,window.gdsdk=a,window.gdApi=window.gdsdk),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Error on SDK wrapper init",e.t0),AC("Error on SDK wrapper init: ".concat(e.t0.message));case 16:case"end":return e.stop()}}),e,null,[[4,12]])}))),gC.apply(this,arguments)}function AC(e){window.sdkLog.push(e)}function bC(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":R.default(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===R.default(window.gdApi.q[0][0])&&window.gdApi.q[0][0]&&((e=window.gdApi.q[0][0]).hasOwnProperty("advertisementSettings")||(e.advertisementSettings={autoplay:!0}))}catch(e){console.log("_get_developer_sets failed",e)}return e}ZI({target:"String",proto:!0,forced:!cC&&!uC},{endsWith:function(e){var t=nC(aC(this));rC(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,a=void 0===n?r:dC(tC(n),r),i=nC(e);return sC?sC(t,i,a):oC(t,a-i.length,a)===i}}),window.sdkLog=[],function(){var e=function(){var e,t=P.default(window.location.href,!0),n=t.host,r=t.query,a=n,i=null==r?void 0:r.gd_sdk_referrer_url;if(i){var s;i=i.startsWith("https://")||i.startsWith("http://")?i:"https://".concat(i),null!==(s=e=P.default(i,!0))&&void 0!==s&&s.host&&(a=e.host)}return a}(),t=new I_,n=t.get("top.domain.value"),r=t.get("partner.domain.value");return pC(e)||pC(n)||pC(r)}()?AC("skipped normal SDK init!"):(!function(){iR();var e=YI(bC());function t(){var t=this;this.AdType=a.AdType,this.preloadAd=function(){var t=D.default(T.default.mark((function t(n){var r,a=this;return T.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.invoke(function(e){return S.default(this,a),e.preloadAd(n)}.bind(this));case 2:return r=t.sent,_o("[developer-event] preloadAd check",r),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),this.showAd=function(){var t=D.default(T.default.mark((function t(n,r){var i,s=this;return T.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.invoke(function(e){var t=this;if(S.default(this,s),n===a.AdType.Display)return e.showDisplayAd(r);var i={};return function(){S.default(this,t),ko.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 2"),i.adapter="adsense")}.bind(this),e.showAd(n,i)}.bind(this));case 2:return i=t.sent,_o("[developer-event] after showAd",i),t.abrupt("return",i);case 5:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),this.cancelAd=function(){var t=this;return e.invoke(function(e){return S.default(this,t),e.cancelAd()}.bind(this))},this.openConsole=function(){var t=this;return e.invoke(function(e){return S.default(this,t),e.openConsole()}.bind(this))},this.getSession=function(){var t=this;return e.invoke(function(e){return S.default(this,t),e.session()}.bind(this))},this.sendEvent=function(t){var n=this;return e.invoke(function(e){return S.default(this,n),e.sendGenericEvent(t)}.bind(this))},this.leaderboard={show:function(){S.default(this,t),tA.showLeaderboard()}.bind(this),addScore:function(e){S.default(this,t),tA.addScore(e)}.bind(this)}}t.prototype=new function(){this.showBanner=function(){var t=this;return e.invoke(function(e){return S.default(this,t),e.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new t,window.gdApi=window.gdsdk}(),AC("afterSDKInit")),function(e){gC.apply(this,arguments)}({_get_developer_sets:bC});