@bygd/gd-sdk-pes 1.43.5 → 1.43.6

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"),u=require("url-parse"),d=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"),g=require("@fnet/inter-service-js"),v=require("@babel/runtime/helpers/toConsumableArray"),A=require("can-autoplay"),b=require("is-plain-object"),y=require("querystringify"),_=require("lodash.merge"),w=require("uuid"),k=require("@flownet/lib-connect-to-tcf");function x(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var E=x(e),D=x(t),S=x(n),R=x(r),T=x(i),I=x(s),C=x(o),O=x(u),P=x(c),L=x(l),B=x(h),U=x(f),M=x(p),F=x(g),j=x(v),G=x(A),N=x(y),q=x(_),H=x(k),V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Q=function(e){return e&&e.Math==Math&&e},z=Q("object"==typeof globalThis&&globalThis)||Q("object"==typeof window&&window)||Q("object"==typeof self&&self)||Q("object"==typeof V&&V)||function(){return this}()||Function("return this")(),K={exports:{}},W=z,Y=Object.defineProperty,J=function(e,t){try{Y(W,e,{value:t,configurable:!0,writable:!0})}catch(n){W[e]=t}return t},X=J,Z="__core-js_shared__",$=z[Z]||X(Z,{}),ee=$;(K.exports=function(e,t){return ee[e]||(ee[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 te,ne,re=function(e){try{return!!e()}catch(e){return!0}},ae=!re((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),ie=ae,se=Function.prototype,oe=se.call,ue=ie&&se.bind.bind(oe,oe),de=ie?ue:function(e){return function(){return oe.apply(e,arguments)}},ce=function(e){return null==e},le=ce,he=TypeError,fe=function(e){if(le(e))throw he("Can't call method on "+e);return e},pe=fe,me=Object,ge=function(e){return me(pe(e))},ve=ge,Ae=de({}.hasOwnProperty),be=Object.hasOwn||function(e,t){return Ae(ve(e),t)},ye=de,_e=0,we=Math.random(),ke=ye(1..toString),xe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ke(++_e+we,36)},Ee="undefined"!=typeof navigator&&String(navigator.userAgent)||"",De=z,Se=Ee,Re=De.process,Te=De.Deno,Ie=Re&&Re.versions||Te&&Te.version,Ce=Ie&&Ie.v8;Ce&&(ne=(te=Ce.split("."))[0]>0&&te[0]<4?1:+(te[0]+te[1])),!ne&&Se&&(!(te=Se.match(/Edge\/(\d+)/))||te[1]>=74)&&(te=Se.match(/Chrome\/(\d+)/))&&(ne=+te[1]);var Oe=ne,Pe=Oe,Le=re,Be=!!Object.getOwnPropertySymbols&&!Le((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Pe&&Pe<41})),Ue=Be&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Me=z,Fe=K.exports,je=be,Ge=xe,Ne=Be,qe=Ue,He=Me.Symbol,Ve=Fe("wks"),Qe=qe?He.for||He:He&&He.withoutSetter||Ge,ze=function(e){return je(Ve,e)||(Ve[e]=Ne&&je(He,e)?He[e]:Qe("Symbol."+e)),Ve[e]},Ke={};Ke[ze("toStringTag")]="z";var We="[object z]"===String(Ke),Ye="object"==typeof document&&document.all,Je={all:Ye,IS_HTMLDDA:void 0===Ye&&void 0!==Ye},Xe=Je.all,Ze=Je.IS_HTMLDDA?function(e){return"function"==typeof e||e===Xe}:function(e){return"function"==typeof e},$e={},et=!re((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),tt=Ze,nt=Je.all,rt=Je.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:tt(e)||e===nt}:function(e){return"object"==typeof e?null!==e:tt(e)},at=rt,it=z.document,st=at(it)&&at(it.createElement),ot=function(e){return st?it.createElement(e):{}},ut=ot,dt=!et&&!re((function(){return 7!=Object.defineProperty(ut("div"),"a",{get:function(){return 7}}).a})),ct=et&&re((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),lt=rt,ht=String,ft=TypeError,pt=function(e){if(lt(e))return e;throw ft(ht(e)+" is not an object")},mt=ae,gt=Function.prototype.call,vt=mt?gt.bind(gt):function(){return gt.apply(gt,arguments)},At=z,bt=Ze,yt=function(e,t){return arguments.length<2?(n=At[e],bt(n)?n:void 0):At[e]&&At[e][t];var n},_t=de({}.isPrototypeOf),wt=yt,kt=Ze,xt=_t,Et=Object,Dt=Ue?function(e){return"symbol"==typeof e}:function(e){var t=wt("Symbol");return kt(t)&&xt(t.prototype,Et(e))},St=String,Rt=function(e){try{return St(e)}catch(e){return"Object"}},Tt=Ze,It=Rt,Ct=TypeError,Ot=function(e){if(Tt(e))return e;throw Ct(It(e)+" is not a function")},Pt=Ot,Lt=ce,Bt=function(e,t){var n=e[t];return Lt(n)?void 0:Pt(n)},Ut=vt,Mt=Ze,Ft=rt,jt=TypeError,Gt=vt,Nt=rt,qt=Dt,Ht=Bt,Vt=function(e,t){var n,r;if("string"===t&&Mt(n=e.toString)&&!Ft(r=Ut(n,e)))return r;if(Mt(n=e.valueOf)&&!Ft(r=Ut(n,e)))return r;if("string"!==t&&Mt(n=e.toString)&&!Ft(r=Ut(n,e)))return r;throw jt("Can't convert object to primitive value")},Qt=TypeError,zt=ze("toPrimitive"),Kt=function(e,t){if(!Nt(e)||qt(e))return e;var n,r=Ht(e,zt);if(r){if(void 0===t&&(t="default"),n=Gt(r,e,t),!Nt(n)||qt(n))return n;throw Qt("Can't convert object to primitive value")}return void 0===t&&(t="number"),Vt(e,t)},Wt=Dt,Yt=function(e){var t=Kt(e,"string");return Wt(t)?t:t+""},Jt=et,Xt=dt,Zt=ct,$t=pt,en=Yt,tn=TypeError,nn=Object.defineProperty,rn=Object.getOwnPropertyDescriptor,an="enumerable",sn="configurable",on="writable";$e.f=Jt?Zt?function(e,t,n){if($t(e),t=en(t),$t(n),"function"==typeof e&&"prototype"===t&&"value"in n&&on in n&&!n[on]){var r=rn(e,t);r&&r[on]&&(e[t]=n.value,n={configurable:sn in n?n[sn]:r[sn],enumerable:an in n?n[an]:r[an],writable:!1})}return nn(e,t,n)}:nn:function(e,t,n){if($t(e),t=en(t),$t(n),Xt)try{return nn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw tn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var un={exports:{}},dn=et,cn=be,ln=Function.prototype,hn=dn&&Object.getOwnPropertyDescriptor,fn=cn(ln,"name"),pn={EXISTS:fn,PROPER:fn&&"something"===function(){}.name,CONFIGURABLE:fn&&(!dn||dn&&hn(ln,"name").configurable)},mn=Ze,gn=$,vn=de(Function.toString);mn(gn.inspectSource)||(gn.inspectSource=function(e){return vn(e)});var An,bn,yn,_n=gn.inspectSource,wn=Ze,kn=z.WeakMap,xn=wn(kn)&&/native code/.test(String(kn)),En=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Dn=$e,Sn=En,Rn=et?function(e,t,n){return Dn.f(e,t,Sn(1,n))}:function(e,t,n){return e[t]=n,e},Tn=K.exports,In=xe,Cn=Tn("keys"),On=function(e){return Cn[e]||(Cn[e]=In(e))},Pn={},Ln=xn,Bn=z,Un=rt,Mn=Rn,Fn=be,jn=$,Gn=On,Nn=Pn,qn="Object already initialized",Hn=Bn.TypeError,Vn=Bn.WeakMap;if(Ln||jn.state){var Qn=jn.state||(jn.state=new Vn);Qn.get=Qn.get,Qn.has=Qn.has,Qn.set=Qn.set,An=function(e,t){if(Qn.has(e))throw Hn(qn);return t.facade=e,Qn.set(e,t),t},bn=function(e){return Qn.get(e)||{}},yn=function(e){return Qn.has(e)}}else{var zn=Gn("state");Nn[zn]=!0,An=function(e,t){if(Fn(e,zn))throw Hn(qn);return t.facade=e,Mn(e,zn,t),t},bn=function(e){return Fn(e,zn)?e[zn]:{}},yn=function(e){return Fn(e,zn)}}var Kn={set:An,get:bn,has:yn,enforce:function(e){return yn(e)?bn(e):An(e,{})},getterFor:function(e){return function(t){var n;if(!Un(t)||(n=bn(t)).type!==e)throw Hn("Incompatible receiver, "+e+" required");return n}}},Wn=de,Yn=re,Jn=Ze,Xn=be,Zn=et,$n=pn.CONFIGURABLE,er=_n,tr=Kn.enforce,nr=Kn.get,rr=String,ar=Object.defineProperty,ir=Wn("".slice),sr=Wn("".replace),or=Wn([].join),ur=Zn&&!Yn((function(){return 8!==ar((function(){}),"length",{value:8}).length})),dr=String(String).split("String"),cr=un.exports=function(e,t,n){"Symbol("===ir(rr(t),0,7)&&(t="["+sr(rr(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Xn(e,"name")||$n&&e.name!==t)&&(Zn?ar(e,"name",{value:t,configurable:!0}):e.name=t),ur&&n&&Xn(n,"arity")&&e.length!==n.arity&&ar(e,"length",{value:n.arity});try{n&&Xn(n,"constructor")&&n.constructor?Zn&&ar(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=tr(e);return Xn(r,"source")||(r.source=or(dr,"string"==typeof t?t:"")),e};Function.prototype.toString=cr((function(){return Jn(this)&&nr(this).source||er(this)}),"toString");var lr=Ze,hr=$e,fr=un.exports,pr=J,mr=function(e,t,n,r){r||(r={});var a=r.enumerable,i=void 0!==r.name?r.name:t;if(lr(n)&&fr(n,i,r),r.global)a?e[t]=n:pr(t,n);else{try{r.unsafe?e[t]&&(a=!0):delete e[t]}catch(e){}a?e[t]=n:hr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},gr=de,vr=gr({}.toString),Ar=gr("".slice),br=function(e){return Ar(vr(e),8,-1)},yr=We,_r=Ze,wr=br,kr=ze("toStringTag"),xr=Object,Er="Arguments"==wr(function(){return arguments}()),Dr=yr?wr: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=xr(e),kr))?n:Er?wr(t):"Object"==(r=wr(t))&&_r(t.callee)?"Arguments":r},Sr=Dr,Rr=We?{}.toString:function(){return"[object "+Sr(this)+"]"};We||mr(Object.prototype,"toString",Rr,{unsafe:!0});var Tr={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},Ir=ot("span").classList,Cr=Ir&&Ir.constructor&&Ir.constructor.prototype,Or=Cr===Object.prototype?void 0:Cr,Pr=br,Lr=de,Br=function(e){if("Function"===Pr(e))return Lr(e)},Ur=Ot,Mr=ae,Fr=Br(Br.bind),jr=function(e,t){return Ur(e),void 0===t?e:Mr?Fr(e,t):function(){return e.apply(t,arguments)}},Gr=re,Nr=br,qr=Object,Hr=de("".split),Vr=Gr((function(){return!qr("z").propertyIsEnumerable(0)}))?function(e){return"String"==Nr(e)?Hr(e,""):qr(e)}:qr,Qr=Math.ceil,zr=Math.floor,Kr=Math.trunc||function(e){var t=+e;return(t>0?zr:Qr)(t)},Wr=function(e){var t=+e;return t!=t||0===t?0:Kr(t)},Yr=Wr,Jr=Math.min,Xr=function(e){return e>0?Jr(Yr(e),9007199254740991):0},Zr=Xr,$r=function(e){return Zr(e.length)},ea=br,ta=Array.isArray||function(e){return"Array"==ea(e)},na=de,ra=re,aa=Ze,ia=Dr,sa=_n,oa=function(){},ua=[],da=yt("Reflect","construct"),ca=/^\s*(?:class|function)\b/,la=na(ca.exec),ha=!ca.exec(oa),fa=function(e){if(!aa(e))return!1;try{return da(oa,ua,e),!0}catch(e){return!1}},pa=function(e){if(!aa(e))return!1;switch(ia(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return ha||!!la(ca,sa(e))}catch(e){return!0}};pa.sham=!0;var ma=!da||ra((function(){var e;return fa(fa.call)||!fa(Object)||!fa((function(){e=!0}))||e}))?pa:fa,ga=ta,va=ma,Aa=rt,ba=ze("species"),ya=Array,_a=function(e){var t;return ga(e)&&(t=e.constructor,(va(t)&&(t===ya||ga(t.prototype))||Aa(t)&&null===(t=t[ba]))&&(t=void 0)),void 0===t?ya:t},wa=function(e,t){return new(_a(e))(0===t?0:t)},ka=jr,xa=Vr,Ea=ge,Da=$r,Sa=wa,Ra=de([].push),Ta=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(u,d,c,l){for(var h,f,p=Ea(u),m=xa(p),g=ka(d,c),v=Da(m),A=0,b=l||Sa,y=t?b(u,v):n||s?b(u,0):void 0;v>A;A++)if((o||A in m)&&(f=g(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:Ra(y,h)}else switch(e){case 4:return!1;case 7:Ra(y,h)}return i?-1:r||a?a:y}},Ia={forEach:Ta(0),map:Ta(1),filter:Ta(2),some:Ta(3),every:Ta(4),find:Ta(5),findIndex:Ta(6),filterReject:Ta(7)},Ca=re,Oa=function(e,t){var n=[][e];return!!n&&Ca((function(){n.call(null,t||function(){return 1},1)}))},Pa=Ia.forEach,La=z,Ba=Tr,Ua=Or,Ma=Oa("forEach")?[].forEach:function(e){return Pa(this,e,arguments.length>1?arguments[1]:void 0)},Fa=Rn,ja=function(e){if(e&&e.forEach!==Ma)try{Fa(e,"forEach",Ma)}catch(t){e.forEach=Ma}};for(var Ga in Ba)Ba[Ga]&&ja(La[Ga]&&La[Ga].prototype);ja(Ua);var Na={},qa={},Ha={}.propertyIsEnumerable,Va=Object.getOwnPropertyDescriptor,Qa=Va&&!Ha.call({1:2},1);qa.f=Qa?function(e){var t=Va(this,e);return!!t&&t.enumerable}:Ha;var za=Vr,Ka=fe,Wa=function(e){return za(Ka(e))},Ya=et,Ja=vt,Xa=qa,Za=En,$a=Wa,ei=Yt,ti=be,ni=dt,ri=Object.getOwnPropertyDescriptor;Na.f=Ya?ri:function(e,t){if(e=$a(e),t=ei(t),ni)try{return ri(e,t)}catch(e){}if(ti(e,t))return Za(!Ja(Xa.f,e,t),e[t])};var ai={},ii=Wr,si=Math.max,oi=Math.min,ui=function(e,t){var n=ii(e);return n<0?si(n+t,0):oi(n,t)},di=Wa,ci=ui,li=$r,hi=function(e){return function(t,n,r){var a,i=di(t),s=li(i),o=ci(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}},fi={includes:hi(!0),indexOf:hi(!1)},pi=be,mi=Wa,gi=fi.indexOf,vi=Pn,Ai=de([].push),bi=function(e,t){var n,r=mi(e),a=0,i=[];for(n in r)!pi(vi,n)&&pi(r,n)&&Ai(i,n);for(;t.length>a;)pi(r,n=t[a++])&&(~gi(i,n)||Ai(i,n));return i},yi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],_i=bi,wi=yi.concat("length","prototype");ai.f=Object.getOwnPropertyNames||function(e){return _i(e,wi)};var ki={};ki.f=Object.getOwnPropertySymbols;var xi=yt,Ei=ai,Di=ki,Si=pt,Ri=de([].concat),Ti=xi("Reflect","ownKeys")||function(e){var t=Ei.f(Si(e)),n=Di.f;return n?Ri(t,n(e)):t},Ii=be,Ci=Ti,Oi=Na,Pi=$e,Li=function(e,t,n){for(var r=Ci(t),a=Pi.f,i=Oi.f,s=0;s<r.length;s++){var o=r[s];Ii(e,o)||n&&Ii(n,o)||a(e,o,i(t,o))}},Bi=re,Ui=Ze,Mi=/#|\.prototype\./,Fi=function(e,t){var n=Gi[ji(e)];return n==qi||n!=Ni&&(Ui(t)?Bi(t):!!t)},ji=Fi.normalize=function(e){return String(e).replace(Mi,".").toLowerCase()},Gi=Fi.data={},Ni=Fi.NATIVE="N",qi=Fi.POLYFILL="P",Hi=Fi,Vi=z,Qi=Na.f,zi=Rn,Ki=mr,Wi=J,Yi=Li,Ji=Hi,Xi=function(e,t){var n,r,a,i,s,o=e.target,u=e.global,d=e.stat;if(n=u?Vi:d?Vi[o]||Wi(o,{}):(Vi[o]||{}).prototype)for(r in t){if(i=t[r],a=e.dontCallGetSet?(s=Qi(n,r))&&s.value:n[r],!Ji(u?r:o+(d?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;Yi(i,a)}(e.sham||a&&a.sham)&&zi(i,"sham",!0),Ki(n,r,i,e)}},Zi=bi,$i=yi,es=Object.keys||function(e){return Zi(e,$i)},ts=ge,ns=es;Xi({target:"Object",stat:!0,forced:re((function(){ns(1)}))},{keys:function(e){return ns(ts(e))}});var rs=Dr,as=String,is=function(e){if("Symbol"===rs(e))throw TypeError("Cannot convert a Symbol value to a string");return as(e)},ss=pt,os=function(){var e=ss(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},us=re,ds=z.RegExp,cs=us((function(){var e=ds("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),ls=cs||us((function(){return!ds("a","y").sticky})),hs={BROKEN_CARET:cs||us((function(){var e=ds("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:ls,UNSUPPORTED_Y:cs},fs={},ps=et,ms=ct,gs=$e,vs=pt,As=Wa,bs=es;fs.f=ps&&!ms?Object.defineProperties:function(e,t){vs(e);for(var n,r=As(t),a=bs(t),i=a.length,s=0;i>s;)gs.f(e,n=a[s++],r[n]);return e};var ys,_s=yt("document","documentElement"),ws=pt,ks=fs,xs=yi,Es=Pn,Ds=_s,Ss=ot,Rs="prototype",Ts="script",Is=On("IE_PROTO"),Cs=function(){},Os=function(e){return"<"+Ts+">"+e+"</"+Ts+">"},Ps=function(e){e.write(Os("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ls=function(){try{ys=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Ls="undefined"!=typeof document?document.domain&&ys?Ps(ys):(t=Ss("iframe"),n="java"+Ts+":",t.style.display="none",Ds.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Os("document.F=Object")),e.close(),e.F):Ps(ys);for(var r=xs.length;r--;)delete Ls[Rs][xs[r]];return Ls()};Es[Is]=!0;var Bs=Object.create||function(e,t){var n;return null!==e?(Cs[Rs]=ws(e),n=new Cs,Cs[Rs]=null,n[Is]=e):n=Ls(),void 0===t?n:ks.f(n,t)},Us=re,Ms=z.RegExp,Fs=Us((function(){var e=Ms(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),js=re,Gs=z.RegExp,Ns=js((function(){var e=Gs("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Hs=vt,Vs=de,Qs=is,zs=os,Ks=hs,Ws=K.exports,Ys=Bs,Js=Kn.get,Xs=Fs,Zs=Ns,$s=Ws("native-string-replace",String.prototype.replace),eo=RegExp.prototype.exec,to=eo,no=Vs("".charAt),ro=Vs("".indexOf),ao=Vs("".replace),so=Vs("".slice),oo=function(){var e=/a/,t=/b*/g;return Hs(eo,e,"a"),Hs(eo,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),uo=Ks.BROKEN_CARET,co=void 0!==/()??/.exec("")[1];(oo||co||uo||Xs||Zs)&&(to=function(e){var t,n,r,a,i,s,o,u=this,d=Js(u),c=Qs(e),l=d.raw;if(l)return l.lastIndex=u.lastIndex,t=Hs(to,l,c),u.lastIndex=l.lastIndex,t;var h=d.groups,f=uo&&u.sticky,p=Hs(zs,u),m=u.source,g=0,v=c;if(f&&(p=ao(p,"y",""),-1===ro(p,"g")&&(p+="g"),v=so(c,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==no(c,u.lastIndex-1))&&(m="(?: "+m+")",v=" "+v,g++),n=new RegExp("^(?:"+m+")",p)),co&&(n=new RegExp("^"+m+"$(?!\\s)",p)),oo&&(r=u.lastIndex),a=Hs(eo,f?n:u,v),f?a?(a.input=so(a.input,g),a[0]=so(a[0],g),a.index=u.lastIndex,u.lastIndex+=a[0].length):u.lastIndex=0:oo&&a&&(u.lastIndex=u.global?a.index+a[0].length:r),co&&a&&a.length>1&&Hs($s,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=Ys(null),i=0;i<h.length;i++)s[(o=h[i])[0]]=a[o[1]];return a});var lo=to;Xi({target:"RegExp",proto:!0,forced:/./.exec!==lo},{exec:lo});var ho=Array.isArray,fo=Object.prototype.toString,po=ho||function(e){return!!e&&"[object Array]"==fo.call(e)},mo={name:"@bygd/gd-sdk-pes",version:"1.43.5",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"}},go=function(e){var t=vo("object"===S.default(e)?e:a.parseJSON(e));return t&&t.version?mo.version>=t.version?t:void 0:t},vo=function(e){var t=this;if(!po(e)||0===e.length)return e;if(1===e.length)return e[0];var n=0;e.forEach(function(e){D.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 Ao=function(){},bo=function(){var e;(e=console).log.apply(e,arguments)},yo=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 _o={},wo={},ko=Yt,xo=$e,Eo=En,Do=function(e,t,n){var r=ko(t);r in e?xo.f(e,r,Eo(0,n)):e[r]=n},So=ui,Ro=$r,To=Do,Io=Array,Co=Math.max,Oo=function(e,t,n){for(var r=Ro(e),a=So(t,r),i=So(void 0===n?r:n,r),s=Io(Co(i-a,0)),o=0;a<i;a++,o++)To(s,o,e[a]);return s.length=o,s},Po=br,Lo=Wa,Bo=ai.f,Uo=Oo,Mo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];wo.f=function(e){return Mo&&"Window"==Po(e)?function(e){try{return Bo(e)}catch(e){return Uo(Mo)}}(e):Bo(Lo(e))};var Fo=un.exports,jo=$e,Go=function(e,t,n){return n.get&&Fo(n.get,t,{getter:!0}),n.set&&Fo(n.set,t,{setter:!0}),jo.f(e,t,n)},No={},qo=ze;No.f=qo;var Ho=z,Vo=be,Qo=No,zo=$e.f,Ko=function(e){var t=Ho.Symbol||(Ho.Symbol={});Vo(t,e)||zo(t,e,{value:Qo.f(e)})},Wo=vt,Yo=yt,Jo=ze,Xo=mr,Zo=$e.f,$o=be,eu=ze("toStringTag"),tu=function(e,t,n){e&&!n&&(e=e.prototype),e&&!$o(e,eu)&&Zo(e,eu,{configurable:!0,value:t})},nu=Xi,ru=z,au=vt,iu=de,su=et,ou=Be,uu=re,du=be,cu=_t,lu=pt,hu=Wa,fu=Yt,pu=is,mu=En,gu=Bs,vu=es,Au=ai,bu=wo,yu=ki,_u=Na,wu=$e,ku=fs,xu=qa,Eu=mr,Du=Go,Su=K.exports,Ru=Pn,Tu=xe,Iu=ze,Cu=No,Ou=Ko,Pu=function(){var e=Yo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=Jo("toPrimitive");t&&!t[r]&&Xo(t,r,(function(e){return Wo(n,this)}),{arity:1})},Lu=tu,Bu=Kn,Uu=Ia.forEach,Mu=On("hidden"),Fu="Symbol",ju="prototype",Gu=Bu.set,Nu=Bu.getterFor(Fu),qu=Object[ju],Hu=ru.Symbol,Vu=Hu&&Hu[ju],Qu=ru.TypeError,zu=ru.QObject,Ku=_u.f,Wu=wu.f,Yu=bu.f,Ju=xu.f,Xu=iu([].push),Zu=Su("symbols"),$u=Su("op-symbols"),ed=Su("wks"),td=!zu||!zu[ju]||!zu[ju].findChild,nd=su&&uu((function(){return 7!=gu(Wu({},"a",{get:function(){return Wu(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Ku(qu,t);r&&delete qu[t],Wu(e,t,n),r&&e!==qu&&Wu(qu,t,r)}:Wu,rd=function(e,t){var n=Zu[e]=gu(Vu);return Gu(n,{type:Fu,tag:e,description:t}),su||(n.description=t),n},ad=function(e,t,n){e===qu&&ad($u,t,n),lu(e);var r=fu(t);return lu(n),du(Zu,r)?(n.enumerable?(du(e,Mu)&&e[Mu][r]&&(e[Mu][r]=!1),n=gu(n,{enumerable:mu(0,!1)})):(du(e,Mu)||Wu(e,Mu,mu(1,{})),e[Mu][r]=!0),nd(e,r,n)):Wu(e,r,n)},id=function(e,t){lu(e);var n=hu(t),r=vu(n).concat(dd(n));return Uu(r,(function(t){su&&!au(sd,n,t)||ad(e,t,n[t])})),e},sd=function(e){var t=fu(e),n=au(Ju,this,t);return!(this===qu&&du(Zu,t)&&!du($u,t))&&(!(n||!du(this,t)||!du(Zu,t)||du(this,Mu)&&this[Mu][t])||n)},od=function(e,t){var n=hu(e),r=fu(t);if(n!==qu||!du(Zu,r)||du($u,r)){var a=Ku(n,r);return!a||!du(Zu,r)||du(n,Mu)&&n[Mu][r]||(a.enumerable=!0),a}},ud=function(e){var t=Yu(hu(e)),n=[];return Uu(t,(function(e){du(Zu,e)||du(Ru,e)||Xu(n,e)})),n},dd=function(e){var t=e===qu,n=Yu(t?$u:hu(e)),r=[];return Uu(n,(function(e){!du(Zu,e)||t&&!du(qu,e)||Xu(r,Zu[e])})),r};ou||(Eu(Vu=(Hu=function(){if(cu(Vu,this))throw Qu("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?pu(arguments[0]):void 0,t=Tu(e),n=function(e){this===qu&&au(n,$u,e),du(this,Mu)&&du(this[Mu],t)&&(this[Mu][t]=!1),nd(this,t,mu(1,e))};return su&&td&&nd(qu,t,{configurable:!0,set:n}),rd(t,e)})[ju],"toString",(function(){return Nu(this).tag})),Eu(Hu,"withoutSetter",(function(e){return rd(Tu(e),e)})),xu.f=sd,wu.f=ad,ku.f=id,_u.f=od,Au.f=bu.f=ud,yu.f=dd,Cu.f=function(e){return rd(Iu(e),e)},su&&(Du(Vu,"description",{configurable:!0,get:function(){return Nu(this).description}}),Eu(qu,"propertyIsEnumerable",sd,{unsafe:!0}))),nu({global:!0,constructor:!0,wrap:!0,forced:!ou,sham:!ou},{Symbol:Hu}),Uu(vu(ed),(function(e){Ou(e)})),nu({target:Fu,stat:!0,forced:!ou},{useSetter:function(){td=!0},useSimple:function(){td=!1}}),nu({target:"Object",stat:!0,forced:!ou,sham:!su},{create:function(e,t){return void 0===t?gu(e):id(gu(e),t)},defineProperty:ad,defineProperties:id,getOwnPropertyDescriptor:od}),nu({target:"Object",stat:!0,forced:!ou},{getOwnPropertyNames:ud}),Pu(),Lu(Hu,Fu),Ru[Mu]=!0;var cd=Be&&!!Symbol.for&&!!Symbol.keyFor,ld=Xi,hd=yt,fd=be,pd=is,md=K.exports,gd=cd,vd=md("string-to-symbol-registry"),Ad=md("symbol-to-string-registry");ld({target:"Symbol",stat:!0,forced:!gd},{for:function(e){var t=pd(e);if(fd(vd,t))return vd[t];var n=hd("Symbol")(t);return vd[t]=n,Ad[n]=t,n}});var bd=Xi,yd=be,_d=Dt,wd=Rt,kd=cd,xd=(0,K.exports)("symbol-to-string-registry");bd({target:"Symbol",stat:!0,forced:!kd},{keyFor:function(e){if(!_d(e))throw TypeError(wd(e)+" is not a symbol");if(yd(xd,e))return xd[e]}});var Ed=ae,Dd=Function.prototype,Sd=Dd.apply,Rd=Dd.call,Td="object"==typeof Reflect&&Reflect.apply||(Ed?Rd.bind(Sd):function(){return Rd.apply(Sd,arguments)}),Id=de([].slice),Cd=ta,Od=Ze,Pd=br,Ld=is,Bd=de([].push),Ud=Xi,Md=yt,Fd=Td,jd=vt,Gd=de,Nd=re,qd=Ze,Hd=Dt,Vd=Id,Qd=function(e){if(Od(e))return e;if(Cd(e)){for(var t=e.length,n=[],r=0;r<t;r++){var a=e[r];"string"==typeof a?Bd(n,a):"number"!=typeof a&&"Number"!=Pd(a)&&"String"!=Pd(a)||Bd(n,Ld(a))}var i=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if(Cd(this))return t;for(var r=0;r<i;r++)if(n[r]===e)return t}}},zd=Be,Kd=String,Wd=Md("JSON","stringify"),Yd=Gd(/./.exec),Jd=Gd("".charAt),Xd=Gd("".charCodeAt),Zd=Gd("".replace),$d=Gd(1..toString),ec=/[\uD800-\uDFFF]/g,tc=/^[\uD800-\uDBFF]$/,nc=/^[\uDC00-\uDFFF]$/,rc=!zd||Nd((function(){var e=Md("Symbol")();return"[null]"!=Wd([e])||"{}"!=Wd({a:e})||"{}"!=Wd(Object(e))})),ac=Nd((function(){return'"\\udf06\\ud834"'!==Wd("\udf06\ud834")||'"\\udead"'!==Wd("\udead")})),ic=function(e,t){var n=Vd(arguments),r=Qd(t);if(qd(r)||void 0!==e&&!Hd(e))return n[1]=function(e,t){if(qd(r)&&(t=jd(r,this,Kd(e),t)),!Hd(t))return t},Fd(Wd,null,n)},sc=function(e,t,n){var r=Jd(n,t-1),a=Jd(n,t+1);return Yd(tc,e)&&!Yd(nc,a)||Yd(nc,e)&&!Yd(tc,r)?"\\u"+$d(Xd(e,0),16):e};Wd&&Ud({target:"JSON",stat:!0,arity:3,forced:rc||ac},{stringify:function(e,t,n){var r=Vd(arguments),a=Fd(rc?ic:Wd,null,r);return ac&&"string"==typeof a?Zd(a,ec,sc):a}});var oc=ki,uc=ge;Xi({target:"Object",stat:!0,forced:!Be||re((function(){oc.f(1)}))},{getOwnPropertySymbols:function(e){var t=oc.f;return t?t(uc(e)):[]}});var dc=re,cc=Oe,lc=ze("species"),hc=function(e){return cc>=51||!dc((function(){var t=[];return(t.constructor={})[lc]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},fc=Ia.filter;Xi({target:"Array",proto:!0,forced:!hc("filter")},{filter:function(e){return fc(this,e,arguments.length>1?arguments[1]:void 0)}});var pc=Xi,mc=re,gc=Wa,vc=Na.f,Ac=et;pc({target:"Object",stat:!0,forced:!Ac||mc((function(){vc(1)})),sham:!Ac},{getOwnPropertyDescriptor:function(e,t){return vc(gc(e),t)}});var bc=Ti,yc=Wa,_c=Na,wc=Do;Xi({target:"Object",stat:!0,sham:!et},{getOwnPropertyDescriptors:function(e){for(var t,n,r=yc(e),a=_c.f,i=bc(r),s={},o=0;i.length>o;)void 0!==(n=a(r,t=i[o++]))&&wc(s,t,n);return s}});var kc=Xi,xc=ta,Ec=ma,Dc=rt,Sc=ui,Rc=$r,Tc=Wa,Ic=Do,Cc=ze,Oc=Id,Pc=hc("slice"),Lc=Cc("species"),Bc=Array,Uc=Math.max;kc({target:"Array",proto:!0,forced:!Pc},{slice:function(e,t){var n,r,a,i=Tc(this),s=Rc(i),o=Sc(e,s),u=Sc(void 0===t?s:t,s);if(xc(i)&&(n=i.constructor,(Ec(n)&&(n===Bc||xc(n.prototype))||Dc(n)&&null===(n=n[Lc]))&&(n=void 0),n===Bc||void 0===n))return Oc(i,o,u);for(r=new(void 0===n?Bc:n)(Uc(u-o,0)),a=0;o<u;o++,a++)o in i&&Ic(r,a,i[o]);return r.length=a,r}});var Mc=vt,Fc=pt,jc=Bt,Gc=function(e,t,n){var r,a;Fc(e);try{if(!(r=jc(e,"return"))){if("throw"===t)throw n;return n}r=Mc(r,e)}catch(e){a=!0,r=e}if("throw"===t)throw n;if(a)throw r;return Fc(r),n},Nc=pt,qc=Gc,Hc={},Vc=Hc,Qc=ze("iterator"),zc=Array.prototype,Kc=function(e){return void 0!==e&&(Vc.Array===e||zc[Qc]===e)},Wc=Dr,Yc=Bt,Jc=ce,Xc=Hc,Zc=ze("iterator"),$c=function(e){if(!Jc(e))return Yc(e,Zc)||Yc(e,"@@iterator")||Xc[Wc(e)]},el=vt,tl=Ot,nl=pt,rl=Rt,al=$c,il=TypeError,sl=function(e,t){var n=arguments.length<2?al(e):t;if(tl(n))return nl(el(n,e));throw il(rl(e)+" is not iterable")},ol=jr,ul=vt,dl=ge,cl=function(e,t,n,r){try{return r?t(Nc(n)[0],n[1]):t(n)}catch(t){qc(e,"throw",t)}},ll=Kc,hl=ma,fl=$r,pl=Do,ml=sl,gl=$c,vl=Array,Al=function(e){var t=dl(e),n=hl(this),r=arguments.length,a=r>1?arguments[1]:void 0,i=void 0!==a;i&&(a=ol(a,r>2?arguments[2]:void 0));var s,o,u,d,c,l,h=gl(t),f=0;if(!h||this===vl&&ll(h))for(s=fl(t),o=n?new this(s):vl(s);s>f;f++)l=i?a(t[f],f):t[f],pl(o,f,l);else for(c=(d=ml(t,h)).next,o=n?new this:[];!(u=ul(c,d)).done;f++)l=i?cl(d,a,[u.value,f],!0):u.value,pl(o,f,l);return o.length=f,o},bl=ze("iterator"),yl=!1;try{var _l=0,wl={next:function(){return{done:!!_l++}},return:function(){yl=!0}};wl[bl]=function(){return this},Array.from(wl,(function(){throw 2}))}catch(e){}var kl=function(e,t){if(!t&&!yl)return!1;var n=!1;try{var r={};r[bl]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},xl=Al;Xi({target:"Array",stat:!0,forced:!kl((function(e){Array.from(e)}))},{from:xl});var El,Dl,Sl,Rl=de,Tl=Wr,Il=is,Cl=fe,Ol=Rl("".charAt),Pl=Rl("".charCodeAt),Ll=Rl("".slice),Bl=function(e){return function(t,n){var r,a,i=Il(Cl(t)),s=Tl(n),o=i.length;return s<0||s>=o?e?"":void 0:(r=Pl(i,s))<55296||r>56319||s+1===o||(a=Pl(i,s+1))<56320||a>57343?e?Ol(i,s):r:e?Ll(i,s,s+2):a-56320+(r-55296<<10)+65536}},Ul={codeAt:Bl(!1),charAt:Bl(!0)},Ml=!re((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Fl=be,jl=Ze,Gl=ge,Nl=Ml,ql=On("IE_PROTO"),Hl=Object,Vl=Hl.prototype,Ql=Nl?Hl.getPrototypeOf:function(e){var t=Gl(e);if(Fl(t,ql))return t[ql];var n=t.constructor;return jl(n)&&t instanceof n?n.prototype:t instanceof Hl?Vl:null},zl=re,Kl=Ze,Wl=rt,Yl=Ql,Jl=mr,Xl=ze("iterator"),Zl=!1;[].keys&&("next"in(Sl=[].keys())?(Dl=Yl(Yl(Sl)))!==Object.prototype&&(El=Dl):Zl=!0);var $l=!Wl(El)||zl((function(){var e={};return El[Xl].call(e)!==e}));$l&&(El={}),Kl(El[Xl])||Jl(El,Xl,(function(){return this}));var eh={IteratorPrototype:El,BUGGY_SAFARI_ITERATORS:Zl},th=eh.IteratorPrototype,nh=Bs,rh=En,ah=tu,ih=Hc,sh=function(){return this},oh=function(e,t,n,r){var a=t+" Iterator";return e.prototype=nh(th,{next:rh(+!r,n)}),ah(e,a,!1),ih[a]=sh,e},uh=de,dh=Ot,ch=Ze,lh=String,hh=TypeError,fh=function(e,t,n){try{return uh(dh(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},ph=pt,mh=function(e){if("object"==typeof e||ch(e))return e;throw hh("Can't set "+lh(e)+" as a prototype")},gh=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=fh(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return ph(n),mh(r),t?e(n,r):n.__proto__=r,n}}():void 0),vh=Xi,Ah=vt,bh=Ze,yh=oh,_h=Ql,wh=gh,kh=tu,xh=Rn,Eh=mr,Dh=Hc,Sh=pn.PROPER,Rh=pn.CONFIGURABLE,Th=eh.IteratorPrototype,Ih=eh.BUGGY_SAFARI_ITERATORS,Ch=ze("iterator"),Oh="keys",Ph="values",Lh="entries",Bh=function(){return this},Uh=function(e,t,n,r,a,i,s){yh(n,t,r);var o,u,d,c=function(e){if(e===a&&m)return m;if(!Ih&&e in f)return f[e];switch(e){case Oh:case Ph:case Lh:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,f=e.prototype,p=f[Ch]||f["@@iterator"]||a&&f[a],m=!Ih&&p||c(a),g="Array"==t&&f.entries||p;if(g&&(o=_h(g.call(new e)))!==Object.prototype&&o.next&&(_h(o)!==Th&&(wh?wh(o,Th):bh(o[Ch])||Eh(o,Ch,Bh)),kh(o,l,!0)),Sh&&a==Ph&&p&&p.name!==Ph&&(Rh?xh(f,"name",Ph):(h=!0,m=function(){return Ah(p,this)})),a)if(u={values:c(Ph),keys:i?m:c(Oh),entries:c(Lh)},s)for(d in u)(Ih||h||!(d in f))&&Eh(f,d,u[d]);else vh({target:t,proto:!0,forced:Ih||h},u);return f[Ch]!==m&&Eh(f,Ch,m,{name:a}),Dh[t]=m,u},Mh=function(e,t){return{value:e,done:t}},Fh=Ul.charAt,jh=is,Gh=Kn,Nh=Uh,qh=Mh,Hh="String Iterator",Vh=Gh.set,Qh=Gh.getterFor(Hh);Nh(String,"String",(function(e){Vh(this,{type:Hh,string:jh(e),index:0})}),(function(){var e,t=Qh(this),n=t.string,r=t.index;return r>=n.length?qh(void 0,!0):(e=Fh(n,r),t.index+=e.length,qh(e,!1))}));var zh=Xi,Kh=et,Wh=de,Yh=be,Jh=Ze,Xh=_t,Zh=is,$h=Go,ef=Li,tf=z.Symbol,nf=tf&&tf.prototype;if(Kh&&Jh(tf)&&(!("description"in nf)||void 0!==tf().description)){var rf={},af=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Zh(arguments[0]),t=Xh(nf,this)?new tf(e):void 0===e?tf():tf(e);return""===e&&(rf[t]=!0),t};ef(af,tf),af.prototype=nf,nf.constructor=af;var sf="Symbol(test)"==String(tf("test")),of=Wh(nf.valueOf),uf=Wh(nf.toString),df=/^Symbol\((.*)\)[^)]+$/,cf=Wh("".replace),lf=Wh("".slice);$h(nf,"description",{configurable:!0,get:function(){var e=of(this);if(Yh(rf,e))return"";var t=uf(e),n=sf?lf(t,7,-1):cf(t,df,"$1");return""===n?void 0:n}}),zh({global:!0,constructor:!0,forced:!0},{Symbol:af})}Ko("iterator");var hf=ze,ff=Bs,pf=$e.f,mf=hf("unscopables"),gf=Array.prototype;null==gf[mf]&&pf(gf,mf,{configurable:!0,value:ff(null)});var vf=function(e){gf[mf][e]=!0},Af=Wa,bf=vf,yf=Hc,_f=Kn,wf=$e.f,kf=Uh,xf=Mh,Ef=et,Df="Array Iterator",Sf=_f.set,Rf=_f.getterFor(Df),Tf=kf(Array,"Array",(function(e,t){Sf(this,{type:Df,target:Af(e),index:0,kind:t})}),(function(){var e=Rf(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,xf(void 0,!0)):xf("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),If=yf.Arguments=yf.Array;if(bf("keys"),bf("values"),bf("entries"),Ef&&"values"!==If.name)try{wf(If,"name",{value:"values"})}catch(e){}var Cf=z,Of=Tr,Pf=Or,Lf=Tf,Bf=Rn,Uf=ze,Mf=Uf("iterator"),Ff=Uf("toStringTag"),jf=Lf.values,Gf=function(e,t){if(e){if(e[Mf]!==jf)try{Bf(e,Mf,jf)}catch(t){e[Mf]=jf}if(e[Ff]||Bf(e,Ff,t),Of[t])for(var n in Lf)if(e[n]!==Lf[n])try{Bf(e,n,Lf[n])}catch(t){e[n]=Lf[n]}}};for(var Nf in Of)Gf(Cf[Nf]&&Cf[Nf].prototype,Nf);Gf(Pf,"DOMTokenList");var qf,Hf,Vf,Qf,zf="undefined"!=typeof process&&"process"==br(process),Kf=yt,Wf=Go,Yf=et,Jf=ze("species"),Xf=function(e){var t=Kf(e);Yf&&t&&!t[Jf]&&Wf(t,Jf,{configurable:!0,get:function(){return this}})},Zf=_t,$f=TypeError,ep=function(e,t){if(Zf(t,e))return e;throw $f("Incorrect invocation")},tp=ma,np=Rt,rp=TypeError,ap=pt,ip=function(e){if(tp(e))return e;throw rp(np(e)+" is not a constructor")},sp=ce,op=ze("species"),up=function(e,t){var n,r=ap(e).constructor;return void 0===r||sp(n=ap(r)[op])?t:ip(n)},dp=TypeError,cp=function(e,t){if(e<t)throw dp("Not enough arguments");return e},lp=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ee),hp=z,fp=Td,pp=jr,mp=Ze,gp=be,vp=re,Ap=_s,bp=Id,yp=ot,_p=cp,wp=lp,kp=zf,xp=hp.setImmediate,Ep=hp.clearImmediate,Dp=hp.process,Sp=hp.Dispatch,Rp=hp.Function,Tp=hp.MessageChannel,Ip=hp.String,Cp=0,Op={},Pp="onreadystatechange";vp((function(){qf=hp.location}));var Lp=function(e){if(gp(Op,e)){var t=Op[e];delete Op[e],t()}},Bp=function(e){return function(){Lp(e)}},Up=function(e){Lp(e.data)},Mp=function(e){hp.postMessage(Ip(e),qf.protocol+"//"+qf.host)};xp&&Ep||(xp=function(e){_p(arguments.length,1);var t=mp(e)?e:Rp(e),n=bp(arguments,1);return Op[++Cp]=function(){fp(t,void 0,n)},Hf(Cp),Cp},Ep=function(e){delete Op[e]},kp?Hf=function(e){Dp.nextTick(Bp(e))}:Sp&&Sp.now?Hf=function(e){Sp.now(Bp(e))}:Tp&&!wp?(Qf=(Vf=new Tp).port2,Vf.port1.onmessage=Up,Hf=pp(Qf.postMessage,Qf)):hp.addEventListener&&mp(hp.postMessage)&&!hp.importScripts&&qf&&"file:"!==qf.protocol&&!vp(Mp)?(Hf=Mp,hp.addEventListener("message",Up,!1)):Hf=Pp in yp("script")?function(e){Ap.appendChild(yp("script"))[Pp]=function(){Ap.removeChild(this),Lp(e)}}:function(e){setTimeout(Bp(e),0)});var Fp={set:xp,clear:Ep},jp=function(){this.head=null,this.tail=null};jp.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 Gp,Np,qp,Hp,Vp,Qp=jp,zp=/ipad|iphone|ipod/i.test(Ee)&&"undefined"!=typeof Pebble,Kp=/web0s(?!.*chrome)/i.test(Ee),Wp=z,Yp=jr,Jp=Na.f,Xp=Fp.set,Zp=Qp,$p=lp,em=zp,tm=Kp,nm=zf,rm=Wp.MutationObserver||Wp.WebKitMutationObserver,am=Wp.document,im=Wp.process,sm=Wp.Promise,om=Jp(Wp,"queueMicrotask"),um=om&&om.value;if(!um){var dm=new Zp,cm=function(){var e,t;for(nm&&(e=im.domain)&&e.exit();t=dm.get();)try{t()}catch(e){throw dm.head&&Gp(),e}e&&e.enter()};$p||nm||tm||!rm||!am?!em&&sm&&sm.resolve?((Hp=sm.resolve(void 0)).constructor=sm,Vp=Yp(Hp.then,Hp),Gp=function(){Vp(cm)}):nm?Gp=function(){im.nextTick(cm)}:(Xp=Yp(Xp,Wp),Gp=function(){Xp(cm)}):(Np=!0,qp=am.createTextNode(""),new rm(cm).observe(qp,{characterData:!0}),Gp=function(){qp.data=Np=!Np}),um=function(e){dm.head||Gp(),dm.add(e)}}var lm=um,hm=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},fm=z.Promise,pm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,mm=!pm&&!zf&&"object"==typeof window&&"object"==typeof document,gm=z,vm=fm,Am=Ze,bm=Hi,ym=_n,_m=ze,wm=mm,km=pm,xm=Oe;vm&&vm.prototype;var Em=_m("species"),Dm=!1,Sm=Am(gm.PromiseRejectionEvent),Rm=bm("Promise",(function(){var e=ym(vm),t=e!==String(vm);if(!t&&66===xm)return!0;if(!xm||xm<51||!/native code/.test(e)){var n=new vm((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Em]=r,!(Dm=n.then((function(){}))instanceof r))return!0}return!t&&(wm||km)&&!Sm})),Tm={CONSTRUCTOR:Rm,REJECTION_EVENT:Sm,SUBCLASSING:Dm},Im={},Cm=Ot,Om=TypeError,Pm=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Om("Bad Promise constructor");t=e,n=r})),this.resolve=Cm(t),this.reject=Cm(n)};Im.f=function(e){return new Pm(e)};var Lm,Bm,Um,Mm=Xi,Fm=zf,jm=z,Gm=vt,Nm=mr,qm=gh,Hm=tu,Vm=Xf,Qm=Ot,zm=Ze,Km=rt,Wm=ep,Ym=up,Jm=Fp.set,Xm=lm,Zm=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},$m=hm,eg=Qp,tg=Kn,ng=fm,rg=Im,ag="Promise",ig=Tm.CONSTRUCTOR,sg=Tm.REJECTION_EVENT,og=Tm.SUBCLASSING,ug=tg.getterFor(ag),dg=tg.set,cg=ng&&ng.prototype,lg=ng,hg=cg,fg=jm.TypeError,pg=jm.document,mg=jm.process,gg=rg.f,vg=gg,Ag=!!(pg&&pg.createEvent&&jm.dispatchEvent),bg="unhandledrejection",yg=function(e){var t;return!(!Km(e)||!zm(t=e.then))&&t},_g=function(e,t){var n,r,a,i=t.value,s=1==t.state,o=s?e.ok:e.fail,u=e.resolve,d=e.reject,c=e.domain;try{o?(s||(2===t.rejection&&Dg(t),t.rejection=1),!0===o?n=i:(c&&c.enter(),n=o(i),c&&(c.exit(),a=!0)),n===e.promise?d(fg("Promise-chain cycle")):(r=yg(n))?Gm(r,n,u,d):u(n)):d(i)}catch(e){c&&!a&&c.exit(),d(e)}},wg=function(e,t){e.notified||(e.notified=!0,Xm((function(){for(var n,r=e.reactions;n=r.get();)_g(n,e);e.notified=!1,t&&!e.rejection&&xg(e)})))},kg=function(e,t,n){var r,a;Ag?((r=pg.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),jm.dispatchEvent(r)):r={promise:t,reason:n},!sg&&(a=jm["on"+e])?a(r):e===bg&&Zm("Unhandled promise rejection",n)},xg=function(e){Gm(Jm,jm,(function(){var t,n=e.facade,r=e.value;if(Eg(e)&&(t=$m((function(){Fm?mg.emit("unhandledRejection",r,n):kg(bg,n,r)})),e.rejection=Fm||Eg(e)?2:1,t.error))throw t.value}))},Eg=function(e){return 1!==e.rejection&&!e.parent},Dg=function(e){Gm(Jm,jm,(function(){var t=e.facade;Fm?mg.emit("rejectionHandled",t):kg("rejectionhandled",t,e.value)}))},Sg=function(e,t,n){return function(r){e(t,r,n)}},Rg=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,wg(e,!0))},Tg=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw fg("Promise can't be resolved itself");var r=yg(t);r?Xm((function(){var n={done:!1};try{Gm(r,t,Sg(Tg,n,e),Sg(Rg,n,e))}catch(t){Rg(n,t,e)}})):(e.value=t,e.state=1,wg(e,!1))}catch(t){Rg({done:!1},t,e)}}};if(ig&&(hg=(lg=function(e){Wm(this,hg),Qm(e),Gm(Lm,this);var t=ug(this);try{e(Sg(Tg,t),Sg(Rg,t))}catch(e){Rg(t,e)}}).prototype,(Lm=function(e){dg(this,{type:ag,done:!1,notified:!1,parent:!1,reactions:new eg,rejection:!1,state:0,value:void 0})}).prototype=Nm(hg,"then",(function(e,t){var n=ug(this),r=gg(Ym(this,lg));return n.parent=!0,r.ok=!zm(e)||e,r.fail=zm(t)&&t,r.domain=Fm?mg.domain:void 0,0==n.state?n.reactions.add(r):Xm((function(){_g(r,n)})),r.promise})),Bm=function(){var e=new Lm,t=ug(e);this.promise=e,this.resolve=Sg(Tg,t),this.reject=Sg(Rg,t)},rg.f=gg=function(e){return e===lg||undefined===e?new Bm(e):vg(e)},zm(ng)&&cg!==Object.prototype)){Um=cg.then,og||Nm(cg,"then",(function(e,t){var n=this;return new lg((function(e,t){Gm(Um,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete cg.constructor}catch(e){}qm&&qm(cg,hg)}Mm({global:!0,constructor:!0,wrap:!0,forced:ig},{Promise:lg}),Hm(lg,ag,!1),Vm(ag);var Ig=jr,Cg=vt,Og=pt,Pg=Rt,Lg=Kc,Bg=$r,Ug=_t,Mg=sl,Fg=$c,jg=Gc,Gg=TypeError,Ng=function(e,t){this.stopped=e,this.result=t},qg=Ng.prototype,Hg=function(e,t,n){var r,a,i,s,o,u,d,c=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),f=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),m=Ig(t,c),g=function(e){return r&&jg(r,"normal",e),new Ng(!0,e)},v=function(e){return l?(Og(e),p?m(e[0],e[1],g):m(e[0],e[1])):p?m(e,g):m(e)};if(h)r=e.iterator;else if(f)r=e;else{if(!(a=Fg(e)))throw Gg(Pg(e)+" is not iterable");if(Lg(a)){for(i=0,s=Bg(e);s>i;i++)if((o=v(e[i]))&&Ug(qg,o))return o;return new Ng(!1)}r=Mg(e,a)}for(u=h?e.next:r.next;!(d=Cg(u,r)).done;){try{o=v(d.value)}catch(e){jg(r,"throw",e)}if("object"==typeof o&&o&&Ug(qg,o))return o}return new Ng(!1)},Vg=fm,Qg=Tm.CONSTRUCTOR||!kl((function(e){Vg.all(e).then(void 0,(function(){}))})),zg=vt,Kg=Ot,Wg=Im,Yg=hm,Jg=Hg;Xi({target:"Promise",stat:!0,forced:Qg},{all:function(e){var t=this,n=Wg.f(t),r=n.resolve,a=n.reject,i=Yg((function(){var n=Kg(t.resolve),i=[],s=0,o=1;Jg(e,(function(e){var u=s++,d=!1;o++,zg(n,t,e).then((function(e){d||(d=!0,i[u]=e,--o||r(i))}),a)})),--o||r(i)}));return i.error&&a(i.value),n.promise}});var Xg=Xi,Zg=Tm.CONSTRUCTOR,$g=fm,ev=yt,tv=Ze,nv=mr,rv=$g&&$g.prototype;if(Xg({target:"Promise",proto:!0,forced:Zg,real:!0},{catch:function(e){return this.then(void 0,e)}}),tv($g)){var av=ev("Promise").prototype.catch;rv.catch!==av&&nv(rv,"catch",av,{unsafe:!0})}var iv=vt,sv=Ot,ov=Im,uv=hm,dv=Hg;Xi({target:"Promise",stat:!0,forced:Qg},{race:function(e){var t=this,n=ov.f(t),r=n.reject,a=uv((function(){var a=sv(t.resolve);dv(e,(function(e){iv(a,t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}});var cv=vt,lv=Im;Xi({target:"Promise",stat:!0,forced:Tm.CONSTRUCTOR},{reject:function(e){var t=lv.f(this);return cv(t.reject,void 0,e),t.promise}});var hv=pt,fv=rt,pv=Im,mv=function(e,t){if(hv(e),fv(t)&&t.constructor===e)return t;var n=pv.f(e);return(0,n.resolve)(t),n.promise},gv=Xi,vv=Tm.CONSTRUCTOR,Av=mv;yt("Promise"),gv({target:"Promise",stat:!0,forced:vv},{resolve:function(e){return Av(this,e)}});var bv=TypeError,yv=Xi,_v=re,wv=ta,kv=rt,xv=ge,Ev=$r,Dv=function(e){if(e>9007199254740991)throw bv("Maximum allowed index exceeded");return e},Sv=Do,Rv=wa,Tv=hc,Iv=Oe,Cv=ze("isConcatSpreadable"),Ov=Iv>=51||!_v((function(){var e=[];return e[Cv]=!1,e.concat()[0]!==e})),Pv=function(e){if(!kv(e))return!1;var t=e[Cv];return void 0!==t?!!t:wv(e)};yv({target:"Array",proto:!0,arity:1,forced:!Ov||!Tv("concat")},{concat:function(e){var t,n,r,a,i,s=xv(this),o=Rv(s,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(Pv(i=-1===t?s:arguments[t]))for(a=Ev(i),Dv(u+a),n=0;n<a;n++,u++)n in i&&Sv(o,u,i[n]);else Dv(u+1),Sv(o,u++,i);return o.length=u,o}});var Lv=et,Bv=pn.EXISTS,Uv=de,Mv=Go,Fv=Function.prototype,jv=Uv(Fv.toString),Gv=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Nv=Uv(Gv.exec);function qv(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 Hv(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 Hv(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 Hv(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 Vv(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 Qv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vv(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Lv&&!Bv&&Mv(Fv,"name",{configurable:!0,get:function(){try{return Nv(Gv,jv(this))[1]}catch(e){return""}}});var zv,Kv={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"}},Wv={},Yv=function(e,t){Wv[e]=Qv(Qv({},t),{},{isLoading:!1})},Jv=function(e){var t=this,n=e.id,r=e.src;return new Promise(function(e,a){if(D.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))},Xv=function(){var e=E.default(R.default.mark((function e(t){var n,r,a,i,s,o,u,d;return R.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=Wv[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:r.isLoading=!0,a=qv(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=Kv[s].name,!window[o]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,Jv({id:s,src:Kv[s].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),u=s.id,d=s.src,console.log("Could not load external script ".concat(u," ").concat(d),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,Jv({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)}}(),Zv=T.default((function e(){var t=this;I.default(this,e),C.default(this,"load",E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Xv("Leaderboard");case 2:t.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),C.default(this,"showLeaderboard",function(){var e=E.default(R.default.mark((function e(n){var r;return R.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)}}()),C.default(this,"addScore",function(){var e=E.default(R.default.mark((function e(n){return R.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"]},Yv(this.moduleName,this.moduleConfig)})),$v=new Zv,eA=rt,tA=br,nA=ze("match"),rA=function(e){var t;return eA(e)&&(void 0!==(t=e[nA])?!!t:"RegExp"==tA(e))},aA=rA,iA=TypeError,sA=function(e){if(aA(e))throw iA("The method doesn't accept regular expressions");return e},oA=ze("match"),uA=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[oA]=!1,"/./"[e](t)}catch(e){}}return!1},dA=Xi,cA=Br,lA=Na.f,hA=Xr,fA=is,pA=sA,mA=fe,gA=uA,vA=cA("".startsWith),AA=cA("".slice),bA=Math.min,yA=gA("startsWith");dA({target:"String",proto:!0,forced:!!(yA||(zv=lA(String.prototype,"startsWith"),!zv||zv.writable))&&!yA},{startsWith:function(e){var t=fA(mA(this));pA(e);var n=hA(bA(arguments.length>1?arguments[1]:void 0,t.length)),r=fA(e);return vA?vA(t,r,n):AA(t,n,n+r.length)===r}});var _A=vt,wA=be,kA=_t,xA=os,EA=RegExp.prototype,DA=function(e){var t=e.flags;return void 0!==t||"flags"in EA||wA(e,"flags")||!kA(EA,e)?t:_A(xA,e)},SA=pn.PROPER,RA=mr,TA=pt,IA=is,CA=re,OA=DA,PA="toString",LA=RegExp.prototype[PA],BA=CA((function(){return"/a/b"!=LA.call({source:"a",flags:"b"})})),UA=SA&&LA.name!=PA;(BA||UA)&&RA(RegExp.prototype,PA,(function(){var e=TA(this);return"/"+IA(e.source)+"/"+IA(OA(e))}),{unsafe:!0});var MA=Br,FA=mr,jA=lo,GA=re,NA=ze,qA=Rn,HA=NA("species"),VA=RegExp.prototype,QA=function(e,t,n,r){var a=NA(e),i=!GA((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=i&&!GA((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[HA]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!i||!s||n){var o=MA(/./[a]),u=t(a,""[e],(function(e,t,n,r,a){var s=MA(e),u=t.exec;return u===jA||u===VA.exec?i&&!a?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));FA(String.prototype,e,u[0]),FA(VA,a,u[1])}r&&qA(VA[a],"sham",!0)},zA=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},KA=vt,WA=pt,YA=Ze,JA=br,XA=lo,ZA=TypeError,$A=function(e,t){var n=e.exec;if(YA(n)){var r=KA(n,e,t);return null!==r&&WA(r),r}if("RegExp"===JA(e))return KA(XA,e,t);throw ZA("RegExp#exec called on incompatible receiver")},eb=vt,tb=pt,nb=ce,rb=fe,ab=zA,ib=is,sb=Bt,ob=$A;function ub(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 db(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ub(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ub(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}QA("search",(function(e,t,n){return[function(t){var n=rb(this),r=nb(t)?void 0:sb(t,e);return r?eb(r,t,n):new RegExp(t)[e](ib(n))},function(e){var r=tb(this),a=ib(e),i=n(t,r,a);if(i.done)return i.value;var s=r.lastIndex;ab(s,0)||(r.lastIndex=0);var o=ob(r,a);return ab(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var cb,lb,hb=function(){function e(){I.default(this,e)}return T.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()),u=(e||n)&&r.loaderEnabled,d=(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,g=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:u,noLoadedEvent:d,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:g,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 O.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 O.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new O.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(d.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(d.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new O.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 O.default(e,!0);return n.query=db(db({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return d.Base64.encode(JSON.stringify(e))}}]),e}(),fb=function(){try{return(new hb).getBridgeContext()}catch(e){return{}}}(),pb={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(cb=!1,(lb=a.getQueryParams("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===lb.xanthophyll&&(cb=!0),cb)},mb=Ul.charAt,gb=de,vb=ge,Ab=Math.floor,bb=gb("".charAt),yb=gb("".replace),_b=gb("".slice),wb=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,kb=/\$([$&'`]|\d{1,2})/g,xb=Td,Eb=vt,Db=de,Sb=QA,Rb=re,Tb=pt,Ib=Ze,Cb=ce,Ob=Wr,Pb=Xr,Lb=is,Bb=fe,Ub=function(e,t,n){return t+(n?mb(e,t).length:1)},Mb=Bt,Fb=function(e,t,n,r,a,i){var s=n+e.length,o=r.length,u=kb;return void 0!==a&&(a=vb(a),u=wb),yb(i,u,(function(i,u){var d;switch(bb(u,0)){case"$":return"$";case"&":return e;case"`":return _b(t,0,n);case"'":return _b(t,s);case"<":d=a[_b(u,1,-1)];break;default:var c=+u;if(0===c)return i;if(c>o){var l=Ab(c/10);return 0===l?i:l<=o?void 0===r[l-1]?bb(u,1):r[l-1]+bb(u,1):i}d=r[c-1]}return void 0===d?"":d}))},jb=$A,Gb=ze("replace"),Nb=Math.max,qb=Math.min,Hb=Db([].concat),Vb=Db([].push),Qb=Db("".indexOf),zb=Db("".slice),Kb="$0"==="a".replace(/./,"$0"),Wb=!!/./[Gb]&&""===/./[Gb]("a","$0");Sb("replace",(function(e,t,n){var r=Wb?"$":"$0";return[function(e,n){var r=Bb(this),a=Cb(e)?void 0:Mb(e,Gb);return a?Eb(a,e,r,n):Eb(t,Lb(r),e,n)},function(e,a){var i=Tb(this),s=Lb(e);if("string"==typeof a&&-1===Qb(a,r)&&-1===Qb(a,"$<")){var o=n(t,i,s,a);if(o.done)return o.value}var u=Ib(a);u||(a=Lb(a));var d=i.global;if(d){var c=i.unicode;i.lastIndex=0}for(var l=[];;){var h=jb(i,s);if(null===h)break;if(Vb(l,h),!d)break;""===Lb(h[0])&&(i.lastIndex=Ub(s,Pb(i.lastIndex),c))}for(var f,p="",m=0,g=0;g<l.length;g++){for(var v=Lb((h=l[g])[0]),A=Nb(qb(Ob(h.index),s.length),0),b=[],y=1;y<h.length;y++)Vb(b,void 0===(f=h[y])?f:String(f));var _=h.groups;if(u){var w=Hb([v],b,A,s);void 0!==_&&Vb(w,_);var k=Lb(xb(a,void 0,w))}else k=Fb(v,s,A,b,_,a);A>=m&&(p+=zb(s,m,A)+k,m=A+v.length)}return p+zb(s,m)}]}),!!Rb((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Kb||Wb);var Yb=re,Jb=et,Xb=ze("iterator"),Zb=!Yb((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&&!Jb||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Xb]||"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})),$b=mr,ey=Oo,ty=Math.floor,ny=function(e,t){var n=e.length,r=ty(n/2);return n<8?ry(e,t):ay(e,ny(ey(e,0,r),t),ny(ey(e,r),t),t)},ry=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},ay=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},iy=Xi,sy=z,oy=vt,uy=de,dy=et,cy=Zb,ly=mr,hy=Go,fy=function(e,t,n){for(var r in t)$b(e,r,t[r],n);return e},py=tu,my=oh,gy=Kn,vy=ep,Ay=Ze,by=be,yy=jr,_y=Dr,wy=pt,ky=rt,xy=is,Ey=Bs,Dy=En,Sy=sl,Ry=$c,Ty=cp,Iy=ny,Cy=ze("iterator"),Oy="URLSearchParams",Py=Oy+"Iterator",Ly=gy.set,By=gy.getterFor(Oy),Uy=gy.getterFor(Py),My=Object.getOwnPropertyDescriptor,Fy=function(e){if(!dy)return sy[e];var t=My(sy,e);return t&&t.value},jy=Fy("fetch"),Gy=Fy("Request"),Ny=Fy("Headers"),qy=Gy&&Gy.prototype,Hy=Ny&&Ny.prototype,Vy=sy.RegExp,Qy=sy.TypeError,zy=sy.decodeURIComponent,Ky=sy.encodeURIComponent,Wy=uy("".charAt),Yy=uy([].join),Jy=uy([].push),Xy=uy("".replace),Zy=uy([].shift),$y=uy([].splice),e_=uy("".split),t_=uy("".slice),n_=/\+/g,r_=Array(4),a_=function(e){return r_[e-1]||(r_[e-1]=Vy("((?:%[\\da-f]{2}){"+e+"})","gi"))},i_=function(e){try{return zy(e)}catch(t){return e}},s_=function(e){var t=Xy(e,n_," "),n=4;try{return zy(t)}catch(e){for(;n;)t=Xy(t,a_(n--),i_);return t}},o_=/[!'()~]|%20/g,u_={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},d_=function(e){return u_[e]},c_=function(e){return Xy(Ky(e),o_,d_)},l_=my((function(e,t){Ly(this,{type:Py,iterator:Sy(By(e).entries),kind:t})}),"Iterator",(function(){var e=Uy(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),h_=function(e){this.entries=[],this.url=null,void 0!==e&&(ky(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Wy(e,0)?t_(e,1):e:xy(e)))};h_.prototype={type:Oy,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,a,i,s,o,u=Ry(e);if(u)for(n=(t=Sy(e,u)).next;!(r=oy(n,t)).done;){if(i=(a=Sy(wy(r.value))).next,(s=oy(i,a)).done||(o=oy(i,a)).done||!oy(i,a).done)throw Qy("Expected sequence with length 2");Jy(this.entries,{key:xy(s.value),value:xy(o.value)})}else for(var d in e)by(e,d)&&Jy(this.entries,{key:d,value:xy(e[d])})},parseQuery:function(e){if(e)for(var t,n,r=e_(e,"&"),a=0;a<r.length;)(t=r[a++]).length&&(n=e_(t,"="),Jy(this.entries,{key:s_(Zy(n)),value:s_(Yy(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Jy(n,c_(e.key)+"="+c_(e.value));return Yy(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var f_=function(){vy(this,p_);var e=Ly(this,new h_(arguments.length>0?arguments[0]:void 0));dy||(this.length=e.entries.length)},p_=f_.prototype;if(fy(p_,{append:function(e,t){Ty(arguments.length,2);var n=By(this);Jy(n.entries,{key:xy(e),value:xy(t)}),dy||this.length++,n.updateURL()},delete:function(e){Ty(arguments.length,1);for(var t=By(this),n=t.entries,r=xy(e),a=0;a<n.length;)n[a].key===r?$y(n,a,1):a++;dy||(this.length=n.length),t.updateURL()},get:function(e){Ty(arguments.length,1);for(var t=By(this).entries,n=xy(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){Ty(arguments.length,1);for(var t=By(this).entries,n=xy(e),r=[],a=0;a<t.length;a++)t[a].key===n&&Jy(r,t[a].value);return r},has:function(e){Ty(arguments.length,1);for(var t=By(this).entries,n=xy(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){Ty(arguments.length,1);for(var n,r=By(this),a=r.entries,i=!1,s=xy(e),o=xy(t),u=0;u<a.length;u++)(n=a[u]).key===s&&(i?$y(a,u--,1):(i=!0,n.value=o));i||Jy(a,{key:s,value:o}),dy||(this.length=a.length),r.updateURL()},sort:function(){var e=By(this);Iy(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=By(this).entries,r=yy(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 l_(this,"keys")},values:function(){return new l_(this,"values")},entries:function(){return new l_(this,"entries")}},{enumerable:!0}),ly(p_,Cy,p_.entries,{name:"entries"}),ly(p_,"toString",(function(){return By(this).serialize()}),{enumerable:!0}),dy&&hy(p_,"size",{get:function(){return By(this).entries.length},configurable:!0,enumerable:!0}),py(f_,Oy),iy({global:!0,constructor:!0,forced:!cy},{URLSearchParams:f_}),!cy&&Ay(Ny)){var m_=uy(Hy.has),g_=uy(Hy.set),v_=function(e){if(ky(e)){var t,n=e.body;if(_y(n)===Oy)return t=e.headers?new Ny(e.headers):new Ny,m_(t,"content-type")||g_(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Ey(e,{body:Dy(0,xy(n)),headers:Dy(0,t)})}return e};if(Ay(jy)&&iy({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return jy(e,arguments.length>1?v_(arguments[1]):{})}}),Ay(Gy)){var A_=function(e){return vy(this,qy),new Gy(e,arguments.length>1?v_(arguments[1]):{})};qy.constructor=A_,A_.prototype=qy,iy({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:A_})}}var b_={URLSearchParams:f_,getState:By},y_=fi.includes,__=vf;Xi({target:"Array",proto:!0,forced:re((function(){return!Array(1).includes()}))},{includes:function(e){return y_(this,e,arguments.length>1?arguments[1]:void 0)}}),__("includes");var w_=Xi,k_=sA,x_=fe,E_=is,D_=uA,S_=de("".indexOf);function R_(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 B.default(n,e)}function u(e,t){return U.default(n,e,t)}function d(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new O.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=d(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),P.default.isURL(o)))return o}}}return function(){var e;D.default(this,t),function(){var e=0,t=window;try{for(;t!=t.parent;)e++,t=t.parent}catch(e){u("depth.error",e.message)}u("depth.value",e)}(),function(){var e=r,t=n.depth.value,a=i;if(u("top.domain.from","fallback"),e&&e.length>0)a=e[e.length-1],u("top.domain.from","origins");else if(0===t)a=i,u("top.domain.from","self-top");else if(1===t){var o=d(s);o&&(a=o.origin,u("top.domain.from","referrer"))}u("top.domain.value",a.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=c();if(e)if(L.default(e))u("partner.domain.value",e),u("partner.domain.from","partner-domain");else{var t=d(e,!1);if(t)u("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),u("partner.domain.from","partner-url");else u("partner.domain.value",n.top.domain.value),u("partner.domain.from","partner-fallback")}else u("partner.domain.value",n.top.domain.value),u("partner.domain.from","fallback")}(),e=c(),0===n.depth.value?(u("partner.url.value",a),u("partner.url.from","self-top")):e?L.default(e)?(u("partner.url.value",a),u("partner.url.from","partner-domain")):(u("partner.url.value",e),u("partner.url.from","partner-url")):(u("partner.url.value",s),u("partner.url.from","fallback"))}.bind(this)(),{get:o,print:function(e){console.log(o(e))}}}w_({target:"String",proto:!0,forced:!D_("includes")},{includes:function(e){return!!~S_(E_(x_(this)),E_(k_(e)),arguments.length>1?arguments[1]:void 0)}});var T_="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==T_&&T_,I_={searchParams:"URLSearchParams"in T_,iterable:"Symbol"in T_&&"iterator"in Symbol,blob:"FileReader"in T_&&"Blob"in T_&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in T_,arrayBuffer:"ArrayBuffer"in T_};if(I_.arrayBuffer)var C_=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],O_=ArrayBuffer.isView||function(e){return e&&C_.indexOf(Object.prototype.toString.call(e))>-1};function P_(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 L_(e){return"string"!=typeof e&&(e=String(e)),e}function B_(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return I_.iterable&&(t[Symbol.iterator]=function(){return t}),t}function U_(e){this.map={},e instanceof U_?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 M_(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function F_(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function j_(e){var t=new FileReader,n=F_(t);return t.readAsArrayBuffer(e),n}function G_(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function N_(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:I_.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:I_.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:I_.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():I_.arrayBuffer&&I_.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=G_(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):I_.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||O_(e))?this._bodyArrayBuffer=G_(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):I_.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},I_.blob&&(this.blob=function(){var e=M_(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=M_(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(j_)}),this.text=function(){var e=M_(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=F_(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)},I_.formData&&(this.formData=function(){return this.text().then(V_)}),this.json=function(){return this.text().then(JSON.parse)},this}U_.prototype.append=function(e,t){e=P_(e),t=L_(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},U_.prototype.delete=function(e){delete this.map[P_(e)]},U_.prototype.get=function(e){return e=P_(e),this.has(e)?this.map[e]:null},U_.prototype.has=function(e){return this.map.hasOwnProperty(P_(e))},U_.prototype.set=function(e,t){this.map[P_(e)]=L_(t)},U_.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},U_.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),B_(e)},U_.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),B_(e)},U_.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),B_(e)},I_.iterable&&(U_.prototype[Symbol.iterator]=U_.prototype.entries);var q_=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function H_(e,t){if(!(this instanceof H_))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 H_){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new U_(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 U_(t.headers)),this.method=function(e){var t=e.toUpperCase();return q_.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 V_(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 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.');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 U_(t.headers),this.url=t.url||"",this._initBody(e)}H_.prototype.clone=function(){return new H_(this,{body:this._bodyInit})},N_.call(H_.prototype),N_.call(Q_.prototype),Q_.prototype.clone=function(){return new Q_(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new U_(this.headers),url:this.url})},Q_.error=function(){var e=new Q_(null,{status:0,statusText:""});return e.type="error",e};var z_=[301,302,303,307,308];Q_.redirect=function(e,t){if(-1===z_.indexOf(t))throw new RangeError("Invalid status code");return new Q_(null,{status:t,headers:{location:e}})};var K_,W_=T_.DOMException;try{new W_}catch(e){W_=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},W_.prototype=Object.create(Error.prototype),W_.prototype.constructor=W_}function Y_(e,t){return new Promise((function(n,r){var a=new H_(e,t);if(a.signal&&a.signal.aborted)return r(new W_("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 U_,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 Q_(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 W_("Aborted","AbortError"))}),0)},i.open(a.method,function(e){try{return""===e&&T_.location.href?T_.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&&(I_.blob?i.responseType="blob":I_.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 U_?a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,L_(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)}))}Y_.polyfill=!0,T_.fetch||(T_.fetch=Y_,T_.Headers=U_,T_.Request=H_,T_.Response=Q_);var J_=function(e){var t=this;if(!K_){var n={gameId:e.gameId,hours:(new Date).getHours(),topDomain:fb.topDomain,domain:fb.parentDomain,referrer:fb.parentURL,depth:a.getIframeDepth(),version:mo.version,byloader:fb.isTokenGameURL,isTokenGameURL:fb.isTokenGameURL,isMasterGameURL:fb.isMasterGameURL,isExtHostedGameURL:fb.isExtHostedGameURL,byloaderVersion:fb.version,tracking:pb.userDeclinedTracking,whitelabel:pb.whitelabelPartner,platform:a.getMobilePlatform()};K_=new a.MessageRouter(n)}return K_||{send:function(){D.default(this,t)}.bind(this)}},X_={getGameData:function(e){var t=this;try{var n=e.replace("game.api.gamedistribution.com","game-api.gamedistribution.com");fetch(n).then(function(e){D.default(this,t)}.bind(this)).catch(function(e){D.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){D.default(this,t)}.bind(this)).catch(function(e){D.default(this,t)}.bind(this))}catch(e){}}},Z_={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},$_={gameAPI:"game.api.gamedistribution.com"},ew={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},tw=function(){var e=this,t=Z_.acc.some(function(t){var n;return D.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?ew:$_}},nw=function(e){var t=this,n=e.url;return new Promise(function(e,r){D.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))};function rw(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 aw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rw(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var iw,sw,ow,uw,dw=new m.EventEmitter,cw=[],lw=function(e){cw.push(e)},hw=function(e){iw=J_(ow=e)},fw=function(){var e=E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(sw){e.next=6;break}return e.next=3,gw(ow);case 3:sw=e.sent,dw.emit("game-data-ready",sw),pw();case 6:return e.abrupt("return",sw);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),pw=function(){var e,t;if(null!==(e=sw)&&void 0!==e&&null!==(t=e.aws_tst)&&void 0!==t&&t.enabled){var n,r,a,i,s;if(mw(),null!==(n=sw)&&void 0!==n&&null!==(r=n.aws_tst)&&void 0!==r&&null!==(a=r.ep)&&void 0!==a&&a.api&&null!==(i=sw)&&void 0!==i&&i.url)X_.getGameData(null===(s=sw)||void 0===s?void 0:s.url);setInterval(E.default(R.default.mark((function e(){var t;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,gw(ow);case 3:sw=e.sent,Ao("gd-aws-test, new game data received",null===(t=sw)||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)}},mw=function(){var e=window.fetch;window.fetch=E.default(R.default.mark((function t(){var n,r,a,i,s,o,u,d,c,l,h,f,p,m,g,v,A,b,y,_=this,w=arguments;return R.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(u=w.length,d=new Array(u),c=0;c<u;c++)d[c]=w[c];l=d[0],h=d[1],f=null===(n=sw)||void 0===n||null===(r=n.aws_tst)||void 0===r||null===(a=r.ep)||void 0===a?void 0:a.atm,p=null===(i=sw)||void 0===i||null===(s=i.aws_tst)||void 0===s||null===(o=s.ep)||void 0===o?void 0:o.msgrt,m=function(t,n){var r=this;D.default(this,_);var a=l.replace(t,n);e(a,h).then(function(){D.default(this,r)}.bind(this))}.bind(this);try{f&&l.indexOf("tag.atom")>0&&m("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),p&&l.indexOf("msgrt.gamedistribution.com")>0&&(Ao("gd-aws-test hook",null===(g=sw)||void 0===g?void 0:g.aws_tst,null===(v=sw)||void 0===v||null===(A=v.aws_tst)||void 0===A||null===(b=A.ep)||void 0===b?void 0:b.msgrt),m("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"))}catch(e){}return t.next=9,e(l,h);case 9:return y=t.sent,t.abrupt("return",y);case 11:case"end":return t.stop()}}),t,this)})))},gw=function(e){var t=this;iw.send("gdfw.loading",{message:"loading"}),cw=[],lw("1"),lw("2");var n=new R_;lw("3");var r=n.get("partner.domain.value");lw("4");var i=function(){return D.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);lw("5");var s=function(){D.default(this,t);var n=o(),a=n?"&mode=".concat(n):"",i=tw().config,s="https://".concat(i.gameAPI);return"".concat(s,"/game/v4/get/").concat(e.gameId.replace(/-/g,""),"/?domain=").concat(r).concat(a,"&v=").concat(mo.version,"&localTime=").concat((new Date).getHours())}.bind(this);lw("6");var o=function(){var e=this;D.default(this,t);var n=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return D.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);lw("7");return new Promise(function(e){var n=this;D.default(this,t),lw("7.1");var r=i();try{lw("7.2");var o=s();lw("7.3"),fetch(o).then(function(){var e=E.default(R.default.mark((function e(t){var n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return lw("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),Ao("gameData fetch error, fallback to other ajax api",e.t0),e.next=12,nw({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(t){var i=this;if(D.default(this,n),lw("7.5"),t.success){var s,u,d,c=t.result.game;lw("7.6");var l={company:c.company,gameId:c.gameMd5,slug:c.slug,pname:c.pname,dname:c.dname,status:c.status,activeStatus:c.activeStatus,description:c.description,disableAds:c.enableAds,preroll:c.preRoll,midroll:6e4*c.timeAds,rewardedAds:c.rewardedAds,title:c.title,publishedAt:c.publishedAt,tags:c.tags,category:c.category,assets:c.assets,disp_2nd_prer:c.disp_2nd_prer,ctry_vst:c.ctry_vst,ctry:c.ctry,crtv:c.crtv,dmain:c.dmain,dmn:c.dmn,aws_tst:c.aws_tst,meta:c.meta,adsc:c.adsc,igs:c.igs,adspn:go(c.adspn)||{},__t4r:go(c.__t4r)||{},block_exts:go(c.push_cuda),bloc_gard:go(c.bloc_gard),cookie:go(c.cookie),gdpr:go(c.gdpr),diagnostic:go(c.diagnostic),cmp:go(c.cmp),gft:go(c.gft)||{},sdk:go(c.sdk)||{},sdkfw:go(c.sdkfw)||{},loader:go(c.loader)||{},splash:go(c.splash)||{},promo:go(c.promo)||{},dAds:go(c.dads)||{},pAds:go(c.pads)||{},mAds:go(c.mads)||{},rAds:go(c.rads)||{},lp:go(c.lp)||{},extsc:go(c.extsc)||{},evnts:go(c.evnts)||{},dp:go(c.dp)||{},adflw:go(c.adflw)||{},afgszf:go(c.afgszf)||{},fllc:go(c.fllc)||{},lotm:go(c.lotm)||{},t4rc:go(c.t4rc)||{},midroll_plus:go(c.midroll_plus)||{},gmky:go(c.gmky)||{},urlBlockExc:go(c.url_blck_exc)||{},sdk_wrp:go(c.sdk_wrp)||{},dbglg:go(c.dbglg)||{},extHosting:go(c.ext_hosting)||{},directTokenUse:go(c.dtu)||{},aeria:go(c.aeria)||{},advlm:go(c.advlm)||{},ad_blcks:go(c.ad_blcks)||{},rmblck:go(c.rmblck)||{},gs_trc:go(c.gs_trc)||{},rwskp:go(c.rwskp)||{},isv_fw:go(c.isv_fw)||{},ext_vst:go(c.ext_vst)||{},fix_score:go(c.fix_score)||{},compensation:go(c.comps)||{},adTimer:go(c.adtr)||{},cust_vast:go(c.cust_vast)||{},console_logs:go(c.c_logs)||{},disable_ads_by_cmp:go(c.dads_by_cmp)||{},ad_skip:go(c.adskp)||{},__t4rac:go(c.__t4rac)||{},vmap_by_tags:go(c.vmap_by_tags)||{}};lw("7.7");var h=a.extendDefaults(M.default(r),l);lw("7.8"),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"];e.tags.some(function(e){var n=this;return D.default(this,t),o.some(function(t){return D.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=aw(aw({},e.mAds||{}),{vmap:{enabled:!0}}),e.pAds=aw(aw({},e.pAds||{}),{vmap:{enabled:!0}}),e.rAds=aw(aw({},e.rAds||{}),{vmap:{enabled:!0}}),e.vmapByTagsApplied=!0)}}(h),h.afg_disabled=!1===(null===(s=h.sdk)||void 0===s||null===(u=s.afg)||void 0===u?void 0:u.enabled),h.url=o,function(){D.default(this,i),void 0!==_o.afgEnabled&&(h.afg_disabled=!_o.afgEnabled),void 0!==_o.promoEnabled&&(h.promo=h.promo||{},h.promo=aw(aw({},h.promo),{},{rainbow:{enabled:_o.promoEnabled}}))}.bind(this),lw("7.9"),null!==(d=h.pAds)&&void 0!==d&&d.enabled&&(h.preroll=!0),lw("7.10"),iw.send("gdfw.success",{message:"success"}),e(h)}else{r.failed=!0;var f=cw[cw.length-1];iw.send("gdfw.err",{message:"".concat(f,": json error")}),e(r)}}.bind(this)).catch(function(t){D.default(this,n);var a=cw[cw.length-1];iw.send("gdfw.err",{message:"".concat(a,": ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}.bind(this))}catch(t){var u=cw[cw.length-1];iw.send("gdfw.err",{message:"".concat(u,": global ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}}.bind(this))},vw=function(){var e=E.default(R.default.mark((function e(){var t,n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();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)}}(),Aw=function(){var e=E.default(R.default.mark((function e(){var t,n,r;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();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)}}(),bw=function(){var e=E.default(R.default.mark((function e(){var t,n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();case 2:return n=e.sent,e.next=5,vw();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)}}(),yw=function(){var e=E.default(R.default.mark((function e(){var t,n,r,a,i,s,o,u;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();case 2:return o=e.sent,u=!(null==o||null===(t=o.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:u,path:u?null==o||null===(n=o.extsc)||void 0===n?void 0:n.path:"",name:u?null==o||null===(r=o.extsc)||void 0===r?void 0:r.name:"",ref:u?null==o||null===(a=o.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:u?null==o||null===(i=o.extsc)||void 0===i?void 0:i.loadedFlag:void 0,loadedFlagCheck:!!u&&!(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)}}(),_w=function(){var e=E.default(R.default.mark((function e(){var t,n,r,i,s,o=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,yw();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 D.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)}}(),ww=!1,kw=!1,xw=function(){return new Promise(function(){var e=E.default(R.default.mark((function e(t,n){var r,a,i,s,o,u=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!ww){e.next=4;break}return e.abrupt("return",t(kw));case 4:ww=!0;case 5:return e.next=7,yw();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 kw=!0,e.abrupt("return",t(!0));case 16:s=!0,setTimeout(function(){D.default(this,u),s&&(s=!1,ww=!0,t(!1))}.bind(this),5e3),o=setInterval(function(){D.default(this,u),s&&i&&window[a]?(s=!1,ww=!0,kw=!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 Ew(e){return Dw.apply(this,arguments)}function Dw(){return Dw=E.default(R.default.mark((function e(t){var n,r,a,i;return R.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,Sw({id:a,verbose:i,options:r});case 9:uw=e.sent,e.next=15;break;case 12:return e.next=14,Tw({id:a,verbose:i,options:r});case 14:uw=e.sent;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(1),Ao("[GD-IS] GD interservice create error",e.t0);case 20:case"end":return e.stop()}}),e,null,[[1,17]])}))),Dw.apply(this,arguments)}function Sw(e){return Rw.apply(this,arguments)}function Rw(){return Rw=E.default(R.default.mark((function e(t){var n,r,a,i,s=this;return R.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,F.default({id:n,verbose:r,router:!0});case 4:return(i=e.sent).on("connected",function(e){D.default(this,s)}.bind(this)),i.register({method:"whoami",handler:function(){return D.default(this,s),"[GD-IS] I am ".concat(n)}.bind(this)}),i.register({method:"isLoader",handler:function(){return D.default(this,s),!0}.bind(this)}),i.register({method:"hasRouter",handler:function(){return D.default(this,s),!1}.bind(this)}),i.register({method:"showAd",handler:function(){var e=E.default(R.default.mark((function e(t){var n,r,i;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.showAd?a.showAd:function(){var e=E.default(R.default.mark((function e(t){return R.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 D.default(this,s),{url:window.location.href}}.bind(this)}),i.register({method:"registerOnEvents",handler:function(){var e=E.default(R.default.mark((function e(){return R.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)}))),Rw.apply(this,arguments)}function Tw(e){return Iw.apply(this,arguments)}function Iw(){return Iw=E.default(R.default.mark((function e(t){var n,r,a,i,s,o=this;return R.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,F.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){D.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){D.default(this,o),Ao("[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 D.default(this,o),"[GD-IS] I am ".concat(n)}.bind(this)}),i.register({method:"onEvent",handler:function(e){var t=this;D.default(this,o);var n=e.event;(a.onEvent||function(e){D.default(this,t)}.bind(this))(n)}.bind(this)}),i.register({method:"isLoader",handler:function(){return D.default(this,o),!1}.bind(this)}),i.register({method:"hasRouter",handler:function(){return D.default(this,o),!!s}.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=24,i.whoami();case 24:if(e.sent,!s){e.next=35;break}return e.next=29,i.whoIsLoader();case 29:return e.sent,e.next=32,i.registerOnEvents();case 32:e.sent;case 35:return e.abrupt("return",i);case 36:case"end":return e.stop()}}),e,this)}))),Iw.apply(this,arguments)}var Cw=!1;function Ow(){var e=this;return new Promise(function(t,n){var r=this;if(D.default(this,e),uw||Cw)t(uw);else{var a=setInterval(function(){D.default(this,r),uw&&(Cw=!0,clearInterval(a),t(uw))}.bind(this),100);setTimeout(function(){D.default(this,r),clearInterval(a),uw||(Cw=!0,t(uw))}.bind(this),5e3)}}.bind(this))}var Pw=function(){var e=this,t=O.default(window.location.href,!0),n=t.host,r=t.query,a=function(t){return D.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(O.default(r.gd_sdk_referrer_url).host));return i},Lw=function(){var e=E.default(R.default.mark((function e(){var t;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!window.isForwarderFrame,!!window.isForwarderFrame){e.next=17;break}if(!Pw()){e.next=8;break}return e.abrupt("return",!0);case 8:return e.next=10,Ow();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)}}(),Bw=function(){var e=E.default(R.default.mark((function e(){var t;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();case 2:if(t=e.sent,null==t?void 0:t.igs){e.next=6;break}return e.abrupt("return",!1);case 6:return bo("[GD-IGS] store config available"),e.next=9,Lw();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 Uw(e,t){var n=this,r=!1,a=null;if(e){var i=e,s=O.default(i,!0),o=s.query;if(Object.keys(o).some(function(e){return D.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 u=(s=O.default(i,!0)).query;Object.keys(u).some(function(e){return D.default(this,n),e.toLowerCase()===t}.bind(this))&&(r=!0,a=o[t.toLowerCase()])}}return{exists:r,value:a}}var Mw=function(){var e=E.default(R.default.mark((function e(){var t,n,r,a,i,s,o;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=!1,e.next=3,Ow();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=Uw(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)}}(),Fw=function(){var e=E.default(R.default.mark((function e(){var t,n,r,a,i;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ow();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=Uw(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)}}(),jw=function(){var e=E.default(R.default.mark((function e(t){var n,r,i,s,o,u,d,c,l,h,f=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.onEvent,e.next=3,fw();case 3:return i=e.sent,s=null==i?void 0:i.igs,e.next=7,Bw();case 7:if(e.sent){e.next=10;break}return e.abrupt("return");case 10:return bo("[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=31;break}return d="https://html5.gamedistribution.com/igs/index.html",e.next=19,Fw();case 19:return c=e.sent,e.next=22,Mw();case 22:return l=e.sent,bo("[GD-IS-IGS] sandbox",l),e.next=26,o({igs:s,storeFrameUrl:d,showStoreOpener:c,sandbox:l});case 26:(null==(h=e.sent)||null===(u=h.events)||void 0===u?void 0:u.onAny)&&h.events.onAny(function(e){D.default(this,f),r&&r(e)}.bind(this)),bo("[GD-IGS] store ready"),window.gdsdk.store=h,window.gdsdk.executeStoreAction=h.executeStoreAction.bind(h);case 31:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),Gw=Xi,Nw=fm,qw=re,Hw=yt,Vw=Ze,Qw=up,zw=mv,Kw=mr,Ww=Nw&&Nw.prototype;if(Gw({target:"Promise",proto:!0,real:!0,forced:!!Nw&&qw((function(){Ww.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Qw(this,Hw("Promise")),n=Vw(e);return this.then(n?function(n){return zw(t,e()).then((function(){return n}))}:e,n?function(n){return zw(t,e()).then((function(){throw n}))}:e)}}),Vw(Nw)){var Yw=Hw("Promise").prototype.finally;Ww.finally!==Yw&&Kw(Ww,"finally",Yw,{unsafe:!0})}var Jw="\t\n\v\f\r                 \u2028\u2029\ufeff",Xw=fe,Zw=is,$w=Jw,ek=de("".replace),tk=RegExp("^["+$w+"]+"),nk=RegExp("(^|[^"+$w+"])["+$w+"]+$"),rk=function(e){return function(t){var n=Zw(Xw(t));return 1&e&&(n=ek(n,tk,"")),2&e&&(n=ek(n,nk,"$1")),n}},ak={start:rk(1),end:rk(2),trim:rk(3)},ik=pn.PROPER,sk=re,ok=Jw,uk=ak.trim;Xi({target:"String",proto:!0,forced:function(e){return sk((function(){return!!ok[e]()||"​…᠎"!=="​…᠎"[e]()||ik&&ok[e].name!==e}))}("trim")},{trim:function(){return uk(this)}});var dk=Xi,ck=Ia.find,lk=vf,hk="find",fk=!0;hk in[]&&Array(1)[hk]((function(){fk=!1})),dk({target:"Array",proto:!0,forced:fk},{find:function(e){return ck(this,e,arguments.length>1?arguments[1]:void 0)}}),lk(hk);var pk=Ze,mk=rt,gk=gh,vk=$e.f,Ak=et,bk=z,yk=de,_k=Hi,wk=function(e,t,n){var r,a;return gk&&pk(r=t.constructor)&&r!==n&&mk(a=r.prototype)&&a!==n.prototype&&gk(e,a),e},kk=Rn,xk=ai.f,Ek=_t,Dk=rA,Sk=is,Rk=DA,Tk=hs,Ik=function(e,t,n){n in e||vk(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},Ck=mr,Ok=re,Pk=be,Lk=Kn.enforce,Bk=Xf,Uk=Fs,Mk=Ns,Fk=ze("match"),jk=bk.RegExp,Gk=jk.prototype,Nk=bk.SyntaxError,qk=yk(Gk.exec),Hk=yk("".charAt),Vk=yk("".replace),Qk=yk("".indexOf),zk=yk("".slice),Kk=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Wk=/a/g,Yk=/a/g,Jk=new jk(Wk)!==Wk,Xk=Tk.MISSED_STICKY,Zk=Tk.UNSUPPORTED_Y,$k=Ak&&(!Jk||Xk||Uk||Mk||Ok((function(){return Yk[Fk]=!1,jk(Wk)!=Wk||jk(Yk)==Yk||"/a/i"!=jk(Wk,"i")})));if(_k("RegExp",$k)){for(var ex=function(e,t){var n,r,a,i,s,o,u=Ek(Gk,this),d=Dk(e),c=void 0===t,l=[],h=e;if(!u&&d&&c&&e.constructor===ex)return e;if((d||Ek(Gk,e))&&(e=e.source,c&&(t=Rk(h))),e=void 0===e?"":Sk(e),t=void 0===t?"":Sk(t),h=e,Uk&&"dotAll"in Wk&&(r=!!t&&Qk(t,"s")>-1)&&(t=Vk(t,/s/g,"")),n=t,Xk&&"sticky"in Wk&&(a=!!t&&Qk(t,"y")>-1)&&Zk&&(t=Vk(t,/y/g,"")),Mk&&(i=function(e){for(var t,n=e.length,r=0,a="",i=[],s={},o=!1,u=!1,d=0,c="";r<=n;r++){if("\\"===(t=Hk(e,r)))t+=Hk(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:qk(Kk,zk(e,r+1))&&(r+=2,u=!0),a+=t,d++;continue;case">"===t&&u:if(""===c||Pk(s,c))throw new Nk("Invalid capture group name");s[c]=!0,i[i.length]=[c,d],u=!1,c="";continue}u?c+=t:a+=t}return[a,i]}(e),e=i[0],l=i[1]),s=wk(jk(e,t),u?this:Gk,ex),(r||a||l.length)&&(o=Lk(s),r&&(o.dotAll=!0,o.raw=ex(function(e){for(var t,n=e.length,r=0,a="",i=!1;r<=n;r++)"\\"!==(t=Hk(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),a+=t):a+="[\\s\\S]":a+=t+Hk(e,++r);return a}(e),n)),a&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{kk(s,"source",""===h?"(?:)":h)}catch(e){}return s},tx=xk(jk),nx=0;tx.length>nx;)Ik(ex,jk,tx[nx++]);Gk.constructor=ex,ex.prototype=Gk,Ck(bk,"RegExp",ex,{constructor:!0})}Bk("RegExp");var rx=et,ax=de,ix=es,sx=Wa,ox=ax(qa.f),ux=ax([].push),dx=function(e){return function(t){for(var n,r=sx(t),a=ix(r),i=a.length,s=0,o=[];i>s;)n=a[s++],rx&&!ox(r,n)||ux(o,e?[n,r[n]]:r[n]);return o}},cx={entries:dx(!0),values:dx(!1)}.values;Xi({target:"Object",stat:!0},{values:function(e){return cx(e)}});var lx=Xi,hx=Vr,fx=Wa,px=Oa,mx=de([].join);lx({target:"Array",proto:!0,forced:hx!=Object||!px("join",",")},{join:function(e){return mx(fx(this),void 0===e?",":e)}});var gx=Ia.map;Xi({target:"Array",proto:!0,forced:!hc("map")},{map:function(e){return gx(this,e,arguments.length>1?arguments[1]:void 0)}});var vx=et,Ax=de,bx=vt,yx=re,_x=es,wx=ki,kx=qa,xx=ge,Ex=Vr,Dx=Object.assign,Sx=Object.defineProperty,Rx=Ax([].concat),Tx=!Dx||yx((function(){if(vx&&1!==Dx({b:1},Dx(Sx({},"a",{enumerable:!0,get:function(){Sx(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!=Dx({},e)[n]||_x(Dx({},t)).join("")!=r}))?function(e,t){for(var n=xx(e),r=arguments.length,a=1,i=wx.f,s=kx.f;r>a;)for(var o,u=Ex(arguments[a++]),d=i?Rx(_x(u),i(u)):_x(u),c=d.length,l=0;c>l;)o=d[l++],vx&&!bx(s,u,o)||(n[o]=u[o]);return n}:Dx,Ix=Tx;Xi({target:"Object",stat:!0,arity:2,forced:Object.assign!==Ix},{assign:Ix});var Cx,Ox=de,Px=2147483647,Lx=/[^\0-\u007E]/,Bx=/[.\u3002\uFF0E\uFF61]/g,Ux="Overflow: input needs wider integers to process",Mx=RangeError,Fx=Ox(Bx.exec),jx=Math.floor,Gx=String.fromCharCode,Nx=Ox("".charCodeAt),qx=Ox([].join),Hx=Ox([].push),Vx=Ox("".replace),Qx=Ox("".split),zx=Ox("".toLowerCase),Kx=function(e){return e+22+75*(e<26)},Wx=function(e,t,n){var r=0;for(e=n?jx(e/700):e>>1,e+=jx(e/t);e>455;)e=jx(e/35),r+=36;return jx(r+36*e/(e+38))},Yx=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var a=Nx(e,n++);if(a>=55296&&a<=56319&&n<r){var i=Nx(e,n++);56320==(64512&i)?Hx(t,((1023&a)<<10)+(1023&i)+65536):(Hx(t,a),n--)}else Hx(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&&Hx(t,Gx(r));var u=t.length,d=u;for(u&&Hx(t,"-");d<a;){var c=Px;for(n=0;n<e.length;n++)(r=e[n])>=i&&r<c&&(c=r);var l=d+1;if(c-i>jx((Px-s)/l))throw Mx(Ux);for(s+=(c-i)*l,i=c,n=0;n<e.length;n++){if((r=e[n])<i&&++s>Px)throw Mx(Ux);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,g=36-p;Hx(t,Gx(Kx(p+m%g))),h=jx(m/g),f+=36}Hx(t,Gx(Kx(h))),o=Wx(s,l,d==u),s=0,d++}}s++,i++}return qx(t,"")},Jx=Xi,Xx=et,Zx=Zb,$x=z,eE=jr,tE=de,nE=mr,rE=Go,aE=ep,iE=be,sE=Tx,oE=Al,uE=Oo,dE=Ul.codeAt,cE=function(e){var t,n,r=[],a=Qx(Vx(zx(e),Bx,"."),".");for(t=0;t<a.length;t++)n=a[t],Hx(r,Fx(Lx,n)?"xn--"+Yx(n):n);return qx(r,".")},lE=is,hE=tu,fE=cp,pE=b_,mE=Kn,gE=mE.set,vE=mE.getterFor("URL"),AE=pE.URLSearchParams,bE=pE.getState,yE=$x.URL,_E=$x.TypeError,wE=$x.parseInt,kE=Math.floor,xE=Math.pow,EE=tE("".charAt),DE=tE(/./.exec),SE=tE([].join),RE=tE(1..toString),TE=tE([].pop),IE=tE([].push),CE=tE("".replace),OE=tE([].shift),PE=tE("".split),LE=tE("".slice),BE=tE("".toLowerCase),UE=tE([].unshift),ME="Invalid scheme",FE="Invalid host",jE="Invalid port",GE=/[a-z]/i,NE=/[\d+-.a-z]/i,qE=/\d/,HE=/^0x/i,VE=/^[0-7]+$/,QE=/^\d+$/,zE=/^[\da-f]+$/i,KE=/[\0\t\n\r #%/:<>?@[\\\]^|]/,WE=/[\0\t\n\r #/:<>?@[\\\]^|]/,YE=/^[\u0000-\u0020]+/,JE=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,XE=/[\t\n\r]/g,ZE=function(e){var t,n,r,a;if("number"==typeof e){for(t=[],n=0;n<4;n++)UE(t,e%256),e=kE(e/256);return SE(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+=RE(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},$E={},eD=sE({},$E,{" ":1,'"':1,"<":1,">":1,"`":1}),tD=sE({},eD,{"#":1,"?":1,"{":1,"}":1}),nD=sE({},tD,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),rD=function(e,t){var n=dE(e,0);return n>32&&n<127&&!iE(t,e)?e:encodeURIComponent(e)},aD={ftp:21,file:null,http:80,https:443,ws:80,wss:443},iD=function(e,t){var n;return 2==e.length&&DE(GE,EE(e,0))&&(":"==(n=EE(e,1))||!t&&"|"==n)},sD=function(e){var t;return e.length>1&&iD(LE(e,0,2))&&(2==e.length||"/"===(t=EE(e,2))||"\\"===t||"?"===t||"#"===t)},oD=function(e){return"."===e||"%2e"===BE(e)},uD={},dD={},cD={},lD={},hD={},fD={},pD={},mD={},gD={},vD={},AD={},bD={},yD={},_D={},wD={},kD={},xD={},ED={},DD={},SD={},RD={},TD=function(e,t,n){var r,a,i,s=lE(e);if(t){if(a=this.parse(s))throw _E(a);this.searchParams=null}else{if(void 0!==n&&(r=new TD(n,!0)),a=this.parse(s,null,r))throw _E(a);(i=bE(new AE)).bindURL(this),this.searchParams=i}};TD.prototype={type:"URL",parse:function(e,t,n){var r,a,i,s,o,u=this,d=t||uD,c=0,l="",h=!1,f=!1,p=!1;for(e=lE(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=CE(e,YE,""),e=CE(e,JE,"$1")),e=CE(e,XE,""),r=oE(e);c<=r.length;){switch(a=r[c],d){case uD:if(!a||!DE(GE,a)){if(t)return ME;d=cD;continue}l+=BE(a),d=dD;break;case dD:if(a&&(DE(NE,a)||"+"==a||"-"==a||"."==a))l+=BE(a);else{if(":"!=a){if(t)return ME;l="",d=cD,c=0;continue}if(t&&(u.isSpecial()!=iE(aD,l)||"file"==l&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=l,t)return void(u.isSpecial()&&aD[u.scheme]==u.port&&(u.port=null));l="","file"==u.scheme?d=_D:u.isSpecial()&&n&&n.scheme==u.scheme?d=lD:u.isSpecial()?d=mD:"/"==r[c+1]?(d=hD,c++):(u.cannotBeABaseURL=!0,IE(u.path,""),d=DD)}break;case cD:if(!n||n.cannotBeABaseURL&&"#"!=a)return ME;if(n.cannotBeABaseURL&&"#"==a){u.scheme=n.scheme,u.path=uE(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,d=RD;break}d="file"==n.scheme?_D:fD;continue;case lD:if("/"!=a||"/"!=r[c+1]){d=fD;continue}d=gD,c++;break;case hD:if("/"==a){d=vD;break}d=ED;continue;case fD:if(u.scheme=n.scheme,a==Cx)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=uE(n.path),u.query=n.query;else if("/"==a||"\\"==a&&u.isSpecial())d=pD;else if("?"==a)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=uE(n.path),u.query="",d=SD;else{if("#"!=a){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=uE(n.path),u.path.length--,d=ED;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=uE(n.path),u.query=n.query,u.fragment="",d=RD}break;case pD:if(!u.isSpecial()||"/"!=a&&"\\"!=a){if("/"!=a){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,d=ED;continue}d=vD}else d=gD;break;case mD:if(d=gD,"/"!=a||"/"!=EE(l,c+1))continue;c++;break;case gD:if("/"!=a&&"\\"!=a){d=vD;continue}break;case vD:if("@"==a){h&&(l="%40"+l),h=!0,i=oE(l);for(var m=0;m<i.length;m++){var g=i[m];if(":"!=g||p){var v=rD(g,nD);p?u.password+=v:u.username+=v}else p=!0}l=""}else if(a==Cx||"/"==a||"?"==a||"#"==a||"\\"==a&&u.isSpecial()){if(h&&""==l)return"Invalid authority";c-=oE(l).length+1,l="",d=AD}else l+=a;break;case AD:case bD:if(t&&"file"==u.scheme){d=kD;continue}if(":"!=a||f){if(a==Cx||"/"==a||"?"==a||"#"==a||"\\"==a&&u.isSpecial()){if(u.isSpecial()&&""==l)return FE;if(t&&""==l&&(u.includesCredentials()||null!==u.port))return;if(s=u.parseHost(l))return s;if(l="",d=xD,t)return;continue}"["==a?f=!0:"]"==a&&(f=!1),l+=a}else{if(""==l)return FE;if(s=u.parseHost(l))return s;if(l="",d=yD,t==bD)return}break;case yD:if(!DE(qE,a)){if(a==Cx||"/"==a||"?"==a||"#"==a||"\\"==a&&u.isSpecial()||t){if(""!=l){var A=wE(l,10);if(A>65535)return jE;u.port=u.isSpecial()&&A===aD[u.scheme]?null:A,l=""}if(t)return;d=xD;continue}return jE}l+=a;break;case _D:if(u.scheme="file","/"==a||"\\"==a)d=wD;else{if(!n||"file"!=n.scheme){d=ED;continue}if(a==Cx)u.host=n.host,u.path=uE(n.path),u.query=n.query;else if("?"==a)u.host=n.host,u.path=uE(n.path),u.query="",d=SD;else{if("#"!=a){sD(SE(uE(r,c),""))||(u.host=n.host,u.path=uE(n.path),u.shortenPath()),d=ED;continue}u.host=n.host,u.path=uE(n.path),u.query=n.query,u.fragment="",d=RD}}break;case wD:if("/"==a||"\\"==a){d=kD;break}n&&"file"==n.scheme&&!sD(SE(uE(r,c),""))&&(iD(n.path[0],!0)?IE(u.path,n.path[0]):u.host=n.host),d=ED;continue;case kD:if(a==Cx||"/"==a||"\\"==a||"?"==a||"#"==a){if(!t&&iD(l))d=ED;else if(""==l){if(u.host="",t)return;d=xD}else{if(s=u.parseHost(l))return s;if("localhost"==u.host&&(u.host=""),t)return;l="",d=xD}continue}l+=a;break;case xD:if(u.isSpecial()){if(d=ED,"/"!=a&&"\\"!=a)continue}else if(t||"?"!=a)if(t||"#"!=a){if(a!=Cx&&(d=ED,"/"!=a))continue}else u.fragment="",d=RD;else u.query="",d=SD;break;case ED:if(a==Cx||"/"==a||"\\"==a&&u.isSpecial()||!t&&("?"==a||"#"==a)){if(".."===(o=BE(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(u.shortenPath(),"/"==a||"\\"==a&&u.isSpecial()||IE(u.path,"")):oD(l)?"/"==a||"\\"==a&&u.isSpecial()||IE(u.path,""):("file"==u.scheme&&!u.path.length&&iD(l)&&(u.host&&(u.host=""),l=EE(l,0)+":"),IE(u.path,l)),l="","file"==u.scheme&&(a==Cx||"?"==a||"#"==a))for(;u.path.length>1&&""===u.path[0];)OE(u.path);"?"==a?(u.query="",d=SD):"#"==a&&(u.fragment="",d=RD)}else l+=rD(a,tD);break;case DD:"?"==a?(u.query="",d=SD):"#"==a?(u.fragment="",d=RD):a!=Cx&&(u.path[0]+=rD(a,$E));break;case SD:t||"#"!=a?a!=Cx&&("'"==a&&u.isSpecial()?u.query+="%27":u.query+="#"==a?"%23":rD(a,$E)):(u.fragment="",d=RD);break;case RD:a!=Cx&&(u.fragment+=rD(a,eD))}c++}},parseHost:function(e){var t,n,r;if("["==EE(e,0)){if("]"!=EE(e,e.length-1))return FE;if(t=function(e){var t,n,r,a,i,s,o,u=[0,0,0,0,0,0,0,0],d=0,c=null,l=0,h=function(){return EE(e,l)};if(":"==h()){if(":"!=EE(e,1))return;l+=2,c=++d}for(;h();){if(8==d)return;if(":"!=h()){for(t=n=0;n<4&&DE(zE,h());)t=16*t+wE(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,d>6)return;for(r=0;h();){if(a=null,r>0){if(!("."==h()&&r<4))return;l++}if(!DE(qE,h()))return;for(;DE(qE,h());){if(i=wE(h(),10),null===a)a=i;else{if(0==a)return;a=10*a+i}if(a>255)return;l++}u[d]=256*u[d]+a,2!=++r&&4!=r||d++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;u[d++]=t}else{if(null!==c)return;l++,c=++d}}if(null!==c)for(s=d-c,d=7;0!=d&&s>0;)o=u[d],u[d--]=u[c+s-1],u[c+--s]=o;else if(8!=d)return;return u}(LE(e,1,-1)),!t)return FE;this.host=t}else if(this.isSpecial()){if(e=cE(e),DE(KE,e))return FE;if(t=function(e){var t,n,r,a,i,s,o,u=PE(e,".");if(u.length&&""==u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(a=u[r]))return e;if(i=10,a.length>1&&"0"==EE(a,0)&&(i=DE(HE,a)?16:8,a=LE(a,8==i?1:2)),""===a)s=0;else{if(!DE(10==i?QE:8==i?VE:zE,a))return e;s=wE(a,i)}IE(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=xE(256,5-t))return null}else if(s>255)return null;for(o=TE(n),r=0;r<n.length;r++)o+=n[r]*xE(256,3-r);return o}(e),null===t)return FE;this.host=t}else{if(DE(WE,e))return FE;for(t="",n=oE(e),r=0;r<n.length;r++)t+=rD(n[r],$E);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return iE(aD,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&iD(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,u=e.fragment,d=t+":";return null!==a?(d+="//",e.includesCredentials()&&(d+=n+(r?":"+r:"")+"@"),d+=ZE(a),null!==i&&(d+=":"+i)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?s[0]:s.length?"/"+SE(s,"/"):"",null!==o&&(d+="?"+o),null!==u&&(d+="#"+u),d},setHref:function(e){var t=this.parse(e);if(t)throw _E(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new ID(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+ZE(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(lE(e)+":",uD)},getUsername:function(){return this.username},setUsername:function(e){var t=oE(lE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=rD(t[n],nD)}},getPassword:function(){return this.password},setPassword:function(e){var t=oE(lE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=rD(t[n],nD)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?ZE(e):ZE(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,AD)},getHostname:function(){var e=this.host;return null===e?"":ZE(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,bD)},getPort:function(){var e=this.port;return null===e?"":lE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=lE(e))?this.port=null:this.parse(e,yD))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+SE(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,xD))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=lE(e))?this.query=null:("?"==EE(e,0)&&(e=LE(e,1)),this.query="",this.parse(e,SD)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=lE(e))?("#"==EE(e,0)&&(e=LE(e,1)),this.fragment="",this.parse(e,RD)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var ID=function(e){var t=aE(this,CD),n=fE(arguments.length,1)>1?arguments[1]:void 0,r=gE(t,new TD(e,!1,n));Xx||(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())},CD=ID.prototype,OD=function(e,t){return{get:function(){return vE(this)[e]()},set:t&&function(e){return vE(this)[t](e)},configurable:!0,enumerable:!0}};if(Xx&&(rE(CD,"href",OD("serialize","setHref")),rE(CD,"origin",OD("getOrigin")),rE(CD,"protocol",OD("getProtocol","setProtocol")),rE(CD,"username",OD("getUsername","setUsername")),rE(CD,"password",OD("getPassword","setPassword")),rE(CD,"host",OD("getHost","setHost")),rE(CD,"hostname",OD("getHostname","setHostname")),rE(CD,"port",OD("getPort","setPort")),rE(CD,"pathname",OD("getPathname","setPathname")),rE(CD,"search",OD("getSearch","setSearch")),rE(CD,"searchParams",OD("getSearchParams")),rE(CD,"hash",OD("getHash","setHash"))),nE(CD,"toJSON",(function(){return vE(this).serialize()}),{enumerable:!0}),nE(CD,"toString",(function(){return vE(this).serialize()}),{enumerable:!0}),yE){var PD=yE.createObjectURL,LD=yE.revokeObjectURL;PD&&nE(ID,"createObjectURL",eE(PD,yE)),LD&&nE(ID,"revokeObjectURL",eE(LD,yE))}hE(ID,"URL"),Jx({global:!0,constructor:!0,forced:!Zx,sham:!Xx},{URL:ID});var BD=function(){function e(t){I.default(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return T.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 O.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 D.default(this,e),this.customParamKeys.some(function(e){return D.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}(),UD=function(){function e(t,n){I.default(this,e),this.adContainer=t,this.onResume=n}return T.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(){D.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}(),MD=function(){function e(t,n){I.default(this,e),this.adContainer=t,this.onResume=n}return T.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}(),FD=function(){function e(t,n,r){I.default(this,e),this.adContainer=t,this.onResume=n,this.OnSkip=r}return T.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(){D.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}(),jD=function(){function e(t){I.default(this,e),this.adContainer=t}return T.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}(),GD=function(){function e(t){I.default(this,e),this.adContainer=t,this.counterLabel=null,this.countdownInterval=null}return T.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(){D.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}(),ND=function(){function e(t){I.default(this,e),this.adContainer=t}return T.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}(),qD=function(e){if(!e)return!1;var t=HD.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)},HD=Object.prototype.toString;function VD(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 QD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VD(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function zD(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 KD,WD="13998",YD="_cc".concat(WD),JD=["https://tags.crwdcntrl.net/c/".concat(WD,"/cc.js?ns=").concat(YD)],XD=function(){return!!KD&&"function"==typeof KD.bcpf&&"function"==typeof KD.add},ZD=function(e,t){try{if(!XD())return;KD.add(e,t),Ao("lotame add success ".concat(e," ").concat(t))}catch(e){Ao("lotame add error",err)}},$D=function(e,t){try{if(!XD())return;KD.bcpw(e,t),Ao("lotame send success ".concat(e," ").concat(t))}catch(e){}},eS=function(e){var t=this;try{ZD("act","play"),ZD("med","game"),"complete"===document.readyState?KD.bcpf():KD.bcp(),e.tags.forEach(function(e){D.default(this,t),$D("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),$D("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},tS=function(){window.addEventListener("load",(function(){dw.once("game-data-ready",function(){var e=E.default(R.default.mark((function e(t){var n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,e.t0=null!=fb&&fb.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,vw();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(JD[0],"LOTCC_".concat(WD),{alternates:JD});case 16:"object"===S.default(window[YD])&&(KD=window[YD]),XD()&&eS(t),e.next=23;break;case 20:e.prev=20,e.t1=e.catch(1),Ao("lotame init error",e.t1);case 23:case"end":return e.stop()}}),e,null,[[1,20]])})));return function(t){return e.apply(this,arguments)}}())}))},nS=function(){$D("genp","ad video"),$D("act","ad impression")},rS=function(){$D("act","ad skipped")},aS=function(){$D("act","ad click")},iS=function(){$D("act","ad complete")},sS=function(){var e=(new R_).get("partner.url.value"),t=new O.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},oS=function(){function e(){I.default(this,e),this.adContainer=window.document.body}return T.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(){D.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 uS(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 dS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uS(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cS(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 D.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},u=(new R_).get();return o=dS(dS({},o),u),function(e,t){try{var s=n._layout,o=n._ua,u={tp:e,ct:0,vrs:mo.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(d.Base64.encode(JSON.stringify(u)))))}catch(e){}}(e,o=s?dS(dS({},o),s):o)}}}}function lS(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 hS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lS(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var fS=new m.EventEmitter,pS=null,mS=function(){function e(t,n,r){var i=this;if(I.default(this,e),pS)return pS;pS=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,u=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:u,this.category="",this.tags=[],this.eventCategory="AD",this.eventBus.subscribe("LOADED",function(){D.default(this,i),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){D.default(this,i),this._clearSafetyTimer("STARTED")}.bind(this),"ima")}var t,n,r,i,s,o,u,c,l,h,f,p,m,g,v,A,y,_,w,k,x,S,P,L,B,U,F;return T.default(e,[{key:"start",value:(F=E.default(R.default.mark((function e(){var t,n,r,a=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.adSystemInitialize(E.default(R.default.mark((function e(){return R.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(E.default(R.default.mark((function e(){return R.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){D.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),yo("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 F.apply(this,arguments)})},{key:"adSystemInitialize",value:(U=E.default(R.default.mark((function e(t){var n;return R.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=E.default(R.default.mark((function e(t){var n,r,a,i,s,o,u,d,c,l,h,f;return R.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 u=e.sent,s?(Ao("spil-adaptor: in _getSpilUrl, adType, adPosition, gamedata",n,o,this.gameData),d=s[o]||s.default||this._getDefaultSpilAdapterConfig()):d=this._getDefaultSpilAdapterConfig(),c=100*u.floor_price,Ao("spil-adaptor: fp",u.floor_price),l=this._createCustomAdVastUrl(d,{tnl_keys:{floor_price:c}}),h=l.url,f={url:h,dp:u,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")||sS().useTestAds}},{key:"_getAdVast",value:function(e,t){var n=this;return new Promise(function(){var r=E.default(R.default.mark((function r(i){var s,o,u,d,c,l,h,f,p=this;return R.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")||sS().useTestAds)){r.next=6;break}return s=n.IMASampleTags[e].filter(function(e){return D.default(this,p),e.indexOf("redirecterror")<0}.bind(this)),o=Math.floor(Math.random()*s.length),u=s[o],i({url:u,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,d=n.nextAdPosition(e),null!=t&&t.adTypeFound&&(d=null==t?void 0:t.adTypeFound),n._broadcast("AD_REQUEST",{message:d}),c=n.options,"preroll"===d&&b.isPlainObject(c.preroll)?c=c.preroll:"midroll"===d&&b.isPlainObject(c.midroll)?c=c.midroll:"rewarded"===d&&b.isPlainObject(c.rewarded)&&(c=c.rewarded),l="","audio"===t.adapter||"audio"===t.giftType?(n.isAudioAd=!0,l="midrollaudio"):(n.isAudioAd=!1,l="rewarded"===d?"rewardedVideo":"gdbanner"===d?"gd__banner":"midroll"===d?"midroll":"video1"),r.next=20,window.idhb.isLoaded();case 20:return r.next=22,n._create_dp_context(d,t);case 22:h=r.sent,bo("gd-adflow, before idhb",d,l),f=window.idhb.getAdserverTargetingForAdSlot(l),window.idhb.setAdserverTargeting(hS(hS({},f),{},{adaptor_order:t.adapterIndex})),Ao("hl-order 2",window.idhb.getAdserverTargetingForAdSlot(l)),window.idhb.requestAds({slots:C.default({},l,{bidFloor:(null==h?void 0:h.floor_price)||void 0}),callback:function(e,t){var r=this;D.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){D.default(this,r)}.bind(this));var a={src:"hl",tnl_keys:hS(hS({},window.idhb.getAdserverTargetingForAdSlot(l)),{},{tnl_ad_pos:d,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(D.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 u=new google.ima.AdsRequest,d=this._transformVast(e,t),c=hS(hS({},t),{},{adTag:d,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&&!d.bidder&&(l.adtag_url=d.url);var f=this._isVMAP(o);this.adContext.isVMAP=f,function(){D.default(this,a),t.shouldFail&&(l?(l.adtag_url="dp_original_broken",l.fallback_url="dp_fallback_broken"):d.url="original_broken",Ao("gd-adflow, _requestAd, dp.adtag_url",null==l?void 0:l.adtag_url),Ao("gd-adflow, _requestAd, dp.fallback_url",null==l?void 0:l.fallback_url),Ao("gd-adflow, _requestAd, adTag.url",d.url))}.bind(this);var p=this._getExternalVast(null===(s=t)||void 0===s?void 0:s.adType);if(p)u.adTagUrl=p;else if(f){Ao("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 O.default(e[i].adtag.url,!0);s.query=QD(QD({},s.query),{},{ad_rule:0,vpos:e[i].positon,pod:1,correlator:0===i?r:++r,output:"xml_vast3"}),i<e.length-1&&(s.query=QD(QD({},s.query),a)),t.push(s.toString())}for(var o=Date.now(),u=1;u<=t.length;u++){var d,c,l,h;n+='<vmap:AdBreak timeOffset="start" breakType="linear" breakId="break-'.concat(u,'">\n <vmap:AdSource id="').concat(o++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(zD({id:o++,adtag_url:t[u-1],error_url:null===(d=e[u-1].dp)||void 0===d?void 0:d.error_url,impression_url:null===(c=e[u-1].dp)||void 0===c?void 0:c.impression_url,fallback_url:null===(l=e[u-1].dp)||void 0===l?void 0:l.fallback_url,fallback_imp_url:null===(h=e[u-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:d,position:"preroll"===c.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(o)}));u.adsResponse=m}else if(l&&h.bidFloorApplied){Ao("gd-adflow, vast wrapper"),l.adtag_url||(l.adtag_url=d.url);var g=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);u.adsResponse=g}else if(l&&l.fallback_url){Ao("gd-adflow, vast wrapper 2");var v=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);u.adsResponse=v}else Ao("gd-adflow, without dp"),u.adTagUrl=d.url;u.linearAdSlotWidth=this.options.width,u.linearAdSlotHeight=this.options.height,u.nonLinearAdSlotWidth=this.options.width,u.nonLinearAdSlotHeight=this.options.height,u.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(u.vastLoadTimeout=this.options.vast_load_timeout),u.setAdWillAutoPlay(t.autoplayAllowed),u.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(u,c);try{this._broadcast("AD_SDK_REQUEST",{message:c})}catch(e){}r(u)}catch(e){throw new Error(e)}}.bind(this))}},{key:"_getExternalVast",value:function(e){var t;try{var n,r,a,i,s,o,u=this.getCurrentAdPosition(e),d=null===(n=this.gameData)||void 0===n?void 0:n.cust_vast,c=(null==d?void 0:d[u])||(null==d?void 0:d.default);if(!c)return Ao("[ext-vast] no custom vast config"),null;Ao("[ext-vast] has custom vast config",d);var l=null==c||null===(r=c.maps)||void 0===r||null===(a=r.position)||void 0===a?void 0:a[u],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}();Ao("[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,Ao("[ext-vast] check result",t)}catch(e){yo("[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=E.default(R.default.mark((function e(){var t=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;D.default(this,t);var a=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome"),G.default.video({inline:!0,muted:!1}).then(function(t){D.default(this,r);var n=t.result;t.error,e(!0===n?{autoplayAllowed:!0,autoplayRequiresMute:!1}:{autoplayAllowed:!0,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return L.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(P=E.default(R.default.mark((function e(){var t;return R.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 P.apply(this,arguments)})},{key:"startAd",value:(S=E.default(R.default.mark((function e(t){var n,r,i,s=this;return R.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=hS(hS({},i),{},{adType:r}),null!==(n=this.gameData.adspn)&&void 0!==n&&n.enabled&&(this.adFlowProcessSpinner||(this.adFlowProcessSpinner=new oS,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 D.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 D.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 S.apply(this,arguments)})},{key:"_startOpusAd",value:(x=E.default(R.default.mark((function e(t){var n,r,a,i,s,o,u,d,c,l,h,f,p,m,g,v=this;return R.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 D.default(this,v),!0}.bind(this),this.requestRunning=!0,s=this.gameData,o=s.gameId,u=s.slug,d=s.title,c={assetId:o,slug:u,title:d,debug:i},l=function(e){D.default(this,v),this.opusEventReceived=!0,this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),h=function(e){D.default(this,v),this.opusEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),f=function(){D.default(this,v),this.opusEventReceived=!0}.bind(this),p=function(){D.default(this,v),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){D.default(this,v),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),g={type:r,meta:c,beforeAd:l,afterAd:h,adBreakDone:m},"reward"===r&&(g=hS(hS({},g),{},{adDismissed:f,adViewed:p})),this.opusEventReceived=!1,this._startTimeoutForOpus(),a&&a(g);case 30:case"end":return e.stop()}}),e,this)}))),function(e){return x.apply(this,arguments)})},{key:"preloadAd",value:(k=E.default(R.default.mark((function e(t){return R.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(){D.default(this,e),this.adsManager.resume()}.bind(this),n=function(){D.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 UD(this.adContainer,t),this.adResume.add(),this.rewardedLabel=new MD(this.adContainer,t),this.rewardedLabel.add(),this.skipAdButton=new FD(this.adContainer,t,n),this.skipAdButton.add(),this.audioAdLabel=new jD(window.document.body),this.audioAdLabel.add(),this.audioAdLabel.hide(),this.adCounterLabel=new GD(window.document.body),this.adCounterLabel.add(),this.adCounterLabel.hide()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(w=E.default(R.default.mark((function e(t){var n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=E.default(R.default.mark((function e(r,i){var s,o,u,d,c,l,h,f,p,m=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{Ao("display_test load",t),(o=t?t.containerId:null)||i("Container id is not specified"),u=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!"),d=t.slotId?t.slotId:"gd__banner@".concat(o),document.getElementById(d)||(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)),u.appendChild(l)),(h=document.createElement("div")).id=d,h.classList.add("gd__banner"),u.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={})[d]={maxSize:[u.offsetWidth,u.offsetHeight]},Ao("display_test slots",p),window.idhb.requestAds({slots:p,callback:function(e){D.default(this,m),Ao("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:(_=E.default(R.default.mark((function e(t){var n,r,a,i,s,o=this;return R.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(D.default(this,o),_o.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(hS(hS({},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),Ao("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:(y=E.default(R.default.mark((function e(t,n){var r,a,i,s,o;return R.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(hS(hS({},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 y.apply(this,arguments)})},{key:"_loadPromo",value:(A=E.default(R.default.mark((function e(t,n){var r,i;return R.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,hS({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:(v=E.default(R.default.mark((function e(t){var n;return R.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,hS({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 v.apply(this,arguments)})},{key:"_waitOnAdLoad",value:function(){var e=this;return new Promise(function(t,n){var r=this;D.default(this,e);var a="videoad.preloadad";this.eventBus.unsubscribeScope(a);var i=function(e){var n=this;D.default(this,r),setTimeout(function(){D.default(this,n),this.eventBus.unsubscribeScope(a),t({success:!0,args:e})}.bind(this),1)}.bind(this),s=function(e){var n=this;D.default(this,r),setTimeout(function(){D.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:(g=E.default(R.default.mark((function e(t){var n,r,a,i,s,o=this;return R.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(D.default(this,o),_o.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(hS(hS({},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 g.apply(this,arguments)})},{key:"_loadRewardedAd",value:(m=E.default(R.default.mark((function e(t){var n;return R.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,hS({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=E.default(R.default.mark((function e(){return R.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=E.default(R.default.mark((function e(){return R.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,u,d=(null===(o=this._adrequest_user_context)||void 0===o||null===(u=o.adTag)||void 0===u?void 0:u.bidder)||"adx";this._broadcast("AD_BIDDER",{bidder:d}),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 ND(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;D.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(){D.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(){D.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(),u="AD_SDK_MANAGER_READY";this._broadcast(u,{name:u,message:"AD SDK is ready",status:"success",analytics:{category:u,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,u=o.getHours(),d=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"),g=null==e||null===(n=e.ad)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.title,v=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}),aS();break;case google.ima.AdEvent.Type.COMPLETE:Ao("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: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();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 w=e.getAd().getContentType();b=w,this._show({mode:"loaded",contentType:w});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"!==g&&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:f=this._is_completed(e.getAd()),b="Fired when the ad is skipped by the user.",rS(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:var k;if(this.skipAdButton&&this.skipAdButton.hide(),this.rewardGuarantied=!1,this.adType_===a.AdType.Rewarded)!v&&null!==(k=this.gameData.rwskp)&&void 0!==k&&k.enabled&&(this._skipAdButtonTimeout=setTimeout(function(){D.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 x=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,E=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED,S=x||E;"VPAID"===g&&this.imaEventList.push(h),S||this.isAudioAd||this._broadcast(h,{name:h,message:b,status:"success",analytics:{category:h,action:this.parentDomain,label:"h".concat(u," d").concat(d," m").concat(c," y").concat(l)}})}if(f&&!this.adSuccess){this.adSuccess=!0;var R=e.getAd();"VPAID"===g&&this._setAtomEvent();var T="Rainbow"===(null==R?void 0:R.getAdSystem())&&(null==R?void 0:R.getWrapperAdIds().some(function(e){return D.default(this,s),"promo"===e}.bind(this)));Ao("gd-adflow isPromoSuccess",T,null==R?void 0:R.getAdSystem(),null==R?void 0:R.getWrapperAdIds()),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:T}),this.resetForNext(e)}}},{key:"_setAtomEvent",value:function(){this.dumper||(this.dumper=new cS({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,u=e.url;if("none"===o||!u)return;u=u.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(u).then(function(){D.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,u=a.fallback_imp_url,d=a.promo_imp_green_url;if(!e&&!t)return r={type:"imp_err",url:s};var c=e.getWrapperAdIds().some(function(e){return D.default(this,n),e==="".concat(i)}.bind(this)),l=e.getWrapperAdIds().some(function(e){return D.default(this,n),"fallback"===e}.bind(this)),h=e.getWrapperAdIds().some(function(e){return D.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:d}:l&&t&&(r={type:"fallbacj_imp",url:u})}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);fS.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(){D.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(qD(e.getInnerError)){var t=e.getInnerError();if(t)return qD(t.getErrorCode)&&qD(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(D.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];b.isPlainObject(i)&&(r.query[a]=N.default.stringify(i))}var s=new O.default(r.url,!0);return q.default(s.query,r.query||{}),hS({url:s.toString()},t)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new O.default(e.url,!0),a=this._transformQuery(e,t,r);a&&(n.url=r.toString());var i=a?r:new O.default(e.url,!0);if(i.query.cust_params){var s=N.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&&b.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&&b.isPlainObject(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=M.default(a),b.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=N.default.parse(i.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var u in o){new RegExp(a.cust_params.$$remove,"i").test(u)&&delete o[u]}delete a.cust_params.$$remove}var d=this.macros.transform(a,{get:function(t){return D.default(this,r),e.tnl_keys[t.toLowerCase()]}.bind(this)});return i.cust_params=o,q.default(i,d),i.cust_params=N.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}),Ao("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)||[],u=!1;return o.length>0?u=!o.some(function(t){return D.default(this,e),t===i}.bind(this)):s.length>0&&(u=s.some(function(t){return D.default(this,e),t===i}.bind(this))),Ao("ex_bidder_result",i,u),u}catch(e){console.log("ex_bidder ERR",e)}}},{key:"_isExcludedBidderForT4RWithBidderExcRate",value:function(){var e,t,n,r,a=this._isExcludedBidderForT4R(),i=null===(e=this.gameData)||void 0===e||null===(t=e.t4rc)||void 0===t?void 0:t.bidder_exc_rate,s=null!=i&&i.enabled?(null==i?void 0:i.rate)||.8:0,o=(null===(n=this._adrequest_user_context)||void 0===n||null===(r=n.adTag)||void 0===r?void 0:r.bidder)||"adx",u=Math.random();return a||"adx"!==o&&u<s}},{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 D.default(this,t),e.t4rac.enabled?{success:!0,name:"ddate"}:{success:!1,reason:"ddate",name:"ddate"}}.bind(this),r=function(e){if(D.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;D.default(this,t);var o=this.gameData.meta,u=e.t4r.meta;return(null==o||null===(r=o.ast)||void 0===r?void 0:r.c)>=(null==u||null===(a=u.ast)||void 0===a?void 0:a.c)&&(null==o||null===(i=o.sit)||void 0===i?void 0:i.c)>=(null==u||null===(s=u.sit)||void 0===s?void 0:s.c)?{success:!1,reason:"meta",name:"meta"}:{success:!0,name:"meta"}}.bind(this),i=function(e){D.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;D.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;D.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),u=function(n){var r,a;if(D.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,u=Math.random()<s,d=i&&u&&(null===(o=e.t4r[i])||void 0===o?void 0:o.enabled);return{success:d,reason:d?null:"viper-check",name:"viper-check"}}return{success:!1,reason:"rule-check-viper",name:"viper-check"}}.bind(this),d=function(e){D.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:d,checkPublishDate:r,checkMeta:a,checkClickCount:s,checkViper:u,checkExcludedBidder:i,checkT4rActivation:n}}},{key:"_isVMAP",value:function(e){var t,n,r,a,i,s,o,u,d,c,l,h,f,p,m;if(!e)return!1;var g="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===(u=this.gameData)||void 0===u||null===(d=u.mAds)||void 0===d||null===(c=d.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(!g)return!1;var v=this._get_vmap_config(e),A=this.adCounter[e];return void 0!==(null==v?void 0:v.start)?A>=(null==v?void 0:v.start):g}},{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 u={};u.adtag=this._createCustomAdVastUrl(r["vast_"+o])||t,u.position=n,u.dp=r["vast_"+o]?void 0:a,s.push(u)}return s}},{key:"_get_vmap_config",value:function(e){var t,n,r,a,i,s,o,u;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===(u=o.pAds)||void 0===u?void 0:u.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;D.default(this,e);try{var r={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new BD(this.gameData).checkCustomParams();a&&(r.cp=a);var i=encodeURIComponent(d.Base64.encode(JSON.stringify(r)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(i)).then(function(e){return D.default(this,n),e.json()}.bind(this)).then(function(e){if(D.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){D.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 D.default(this,n),"".concat(e,"=").concat(encodeURIComponent(r[e]))}.bind(this)).join("&");encodeURIComponent(d.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),u=s?o:void 0;return function(){D.default(this,n),_o.promoError&&(console.log("promo-test fictional promo error"),u=void 0)}.bind(this),{promo_url:u,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=E.default(R.default.mark((function r(a){var i,s,o,u,c,l=this;return R.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 BD(n.gameData).checkCustomParams())&&(s.cp=o),u=encodeURIComponent(d.Base64.encode(JSON.stringify(s))),Ao("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,Ao("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(u)).then(function(e){return D.default(this,l),e.json()}.bind(this)).then(function(e){if(D.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(u,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(u),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(u),promo_url:void 0,promo_imp_blue_url:void 0,promo_imp_green_url:void 0})}.bind(this)).catch(function(e){D.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 O.default(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var a=N.default.parse(r.query.cust_params);if(!a.tnl_asset_id)return;a.adsense=1,r.query.cust_params=N.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 O.default(e.url,!0);if(null===(a=i.query)||void 0===a||!a.cust_params)return;var s=N.default.parse(i.query.cust_params);s.bfa=r,s.adsense=0,i.query.cust_params=N.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=E.default(R.default.mark((function e(t){var n,r,i,s,o,u,d,c,l,h,f,p,m=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=this._getPrebidScripts(),o=s[0],u=function(){return D.default(this,m),!1}.bind(this),window.idhb=window.idhb||{iabCmpExists:u},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||[],(d=new URL(o)).searchParams.append("referer",window.idhb.options.configUrl),o=d.href,e.next=13,a.getScript(o,"gdsdk_prebid",{alternates:s,error_prefix:"Blocked:",exists:function(){return D.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;D.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){D.default(this,t)}.bind(this)),delete this.atom_display),Ao("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){D.default(this,t)}.bind(this)),delete this.atom_display),Ao("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=E.default(R.default.mark((function e(){var t,n,r,a,i,s;return R.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,bo("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=E.default(R.default.mark((function e(t){var n,r,i=this;return R.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 D.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:(u=E.default(R.default.mark((function e(t){var n,r,i,s,o,u,d=this;return R.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(u={}).crossorigin="anonymous",u["data-ad-client"]=(null==t||null===(n=t.adsense_client)||void 0===n?void 0:n.length)>0?t.adsense_client:"ca-pub-2316275586951220",u["data-ad-frequency-hint"]="30s",u.allow="autoplay",(null==t||null===(r=t.adsense_channel)||void 0===r?void 0:r.length)>0&&(u["data-ad-channel"]=t.adsense_channel),(null==t||null===(i=t.adsense_host)||void 0===i?void 0:i.length)>0&&(u["data-ad-host"]=t.adsense_host),!0===(null==t?void 0:t.adsense_adbreak_test)&&(u["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&&(u["data-ad-client"]=this.gameData.sdk.afg.adsense_client,u["data-ad-slot"]=this.gameData.sdk.afg.adsense_ad_slot,u["data-ad-format"]="auto"),e.next=16,a.getScript("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return D.default(this,d),!!window.adsbygoogle}.bind(this),attrs:u});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 u.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,u=i[s],d=u&&(null===(o=u.children[0])||void 0===o?void 0:o.children[0]);d&&"IFRAME"===d.tagName&&d.style.height!==r&&(Ao("out-of-bounds fix apply"),d.style.height=r,a&&(d.parentElement.style.overflow="auto"))}}catch(e){Ao("out-of-bounds error: ".concat(e.message))}}},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(o=E.default(R.default.mark((function e(t){var n,r,a,i,s,o,u,d,c=this;return R.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(D.default(this,c),_o.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(){D.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(){D.default(this,c),n=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),i=function(){D.default(this,c),n=!0,this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),s=function(){D.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){D.default(this,c),n=!0,e()}.bind(this),u=function(e){D.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),d=function(e){window.adsbygoogle.push(e)},setTimeout(function(){D.default(this,c),n||(bo("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),d({type:"reward",name:"reward-in-game",beforeAd:r,afterAd:a,adDismissed:i,adViewed:s,beforeReward:o,adBreakDone:u}),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=E.default(R.default.mark((function e(t){var n,r,a=this;return R.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(D.default(this,a),_o.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(){D.default(this,a),this.adPlacementEventReceived=!0}.bind(this),r=function(e){D.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=E.default(R.default.mark((function e(t){var n,r,a,i=this;return R.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(D.default(this,i),_o.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(){D.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(){D.default(this,i),this.adPlacementEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),this.adPlacementEventReceived=!1,a=function(e){D.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 u=setTimeout(function(){D.default(this,o),this.adPlacementEventReceived||(this._broadcast("AD_ERROR",{message:"timeout-_startTimeoutForAdBreak",status:"error"}),this.adPlacementEventReceived=!1,this.requestRunning=!1),clearTimeout(u)}.bind(this),5e3)}}},{key:"_startTimeoutForOpus",value:function(){var e=this,t=setTimeout(function(){D.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=E.default(R.default.mark((function e(t){var n,r,a,i=this;return R.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(D.default(this,i),_o.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(){D.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(){D.default(this,i),this.adPlacementEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),this.adPlacementEventReceived=!1,a=function(e){D.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(d.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 R_).get();return n=hS(hS({},n),r),n=t?hS(hS({},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 D.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,hS(hS({},t),{},{skipForward:r,adPosition:a}))}},{key:"mute",value:(n=E.default(R.default.mark((function e(){return R.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=E.default(R.default.mark((function e(){return R.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}(),gS=T.default((function e(t){var n=this;I.default(this,e),C.default(this,"load",E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Xv(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),C.default(this,"promo",E.default(R.default.mark((function e(){return R.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},Yv(this.moduleName,this.moduleConfig)})),vS=T.default((function e(t){var n=this;I.default(this,e),C.default(this,"load",E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Xv(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),C.default(this,"splash",E.default(R.default.mark((function e(){return R.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="GDSplashDynamic",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},Yv(this.moduleName,this.moduleConfig)})),AS=function(e,t){console.log(e,t)},bS={},yS={},_S=null;function wS(){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 bS.version=r,bS.frame=e,bS.function=n,bS.version}function kS(e){var t=this;return _S||(_S=new Promise(function(n){function r(t,r){if(AS("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:bS,consentData:a}),void n({result:"ok",consentData:t})):void 0;n({result:"ok",consentData:t})}else n({result:"cmpCallFailed"})}D.default(this,t),wS(),bS.frame?2===bS.version?(AS("TCF v2 CMP found. Fetching the consent."),bS.function?(AS("CMP API is directly accessible, calling it now..."),bS.function("addEventListener",bS.version,r)):(AS("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!==yS[r.callId]&&yS[r.callId](r.returnValue,r.success)}}window[a]=function(e,n,i,s){D.default(this,r);var o=Math.random()+"",u="".concat(a,"Call"),d=C.default({},u,{command:e,parameter:s,callId:o,version:n});yS[o]=i,t.postMessage(d,"*")}.bind(this),window.addEventListener("message",i,!1),window[a](e,bS.version,n)}("addEventListener",bS.frame,r))):n({result:"cmpVersionNotV2",cmp:bS}):n({result:"cmpNotFound"})}.bind(this)),_S)}var xS=new(function(){function e(){I.default(this,e),this.productName="Game Distribution"}var t;return T.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=E.default(R.default.mark((function e(t,n){var r,a,i,s,o,u,d;return R.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,u="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),e.next=12,fetch(u,{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,d="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),e.next=22,fetch(d,{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 ES(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 DS(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 DS(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 DS(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 SS=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;D.default(this,t);try{var u=document.createElement("script");if(u.async=null==i||i,u.type="text/javascript",u.onload=function(){D.default(this,o),e()}.bind(this),u.onerror=function(){D.default(this,o);var e="Error on script load, Error: ".concat(n);console.log(e),s(e)}.bind(this),u.src=n,r){var d,c=ES(r);try{for(c.s();!(d=c.n()).done;){var l=d.value,h=l.key,f=l.value;u.setAttribute(h,f)}}catch(e){c.e(e)}finally{c.f()}}a||(a=document.head),a.appendChild(u)}catch(e){var p="Error on script load catch, Error: ".concat(n);console.log(p,e),s(p)}}.bind(this))},RS="ffd4774b-99ae-4464-8f40-3afa12b4692e",TS=function(){var e=E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,SS({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,SS({src:"https://cdn.cookielaw.org/consent/".concat(RS,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,SS({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:RS}],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)}}(),IS=new m.EventEmitter,CS={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},OS=!1;function PS(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(CS).some(function(e){return D.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;!function(e){if("gd-sdk-on-event"===(null==e?void 0:e.type)){var t,n,r;if("midroll"!==(null==e||null===(t=e.event)||void 0===t?void 0:t.adPosition))return;var a="CONTENT_RESUME_REQUESTED"===(null===(n=e.event)||void 0===n?void 0:n.name);"CONTENT_PAUSE_REQUESTED"===(null===(r=e.event)||void 0===r?void 0:r.name)&&(OS=!0),a&&OS&&(OS=!1,window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*"))}}(n);var s=function(){D.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 u=o&&["9555f04e1900482aaaef710cd2f8c440"].some(function(e){return D.default(this,t),o.indexOf(e)>0}.bind(this)),d=["sg-game-event"].some(function(e){return D.default(this,t),e===(null==n?void 0:n.type)}.bind(this));if(!u&&!d)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=CS[r][a];h&&IS.emit(h,n)}}}),!1);var LS="__msgr",BS=w.v4(),US=function(e){try{var t=FS(e,e.event),n=NS(window);n&&n!==window.top&&n.postMessage(t,"https://html5.gamedistribution.com")}catch(e){console.error("Error sending event message:",e)}},MS=function(e,t){var n=document.createElement("iframe");return n.src=e,n.style.display="none",n.name=t,n},FS=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:BS,event_name:t,timestamp:Date.now()}},jS=function(e){var t=this;setInterval(function(){D.default(this,t);var n=FS(e,"Heartbeat");qS(n)}.bind(this),1e3*e.evnts.heartbeatDuration)},GS=function(e){try{var t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PS(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!t.event_name)return;t.token=BS,qS(t)}catch(e){console.error("GD Messager Error:",e.message)}},NS=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}},qS=function(e){try{window[LS]&&window[LS].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},HS=function(){function e(t){I.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 T.default(e,[{key:"run",value:function(e){var t=e.duration,n=this;return new Promise(function(){var e=E.default(R.default.mark((function e(r,a){var i,s=this;return R.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(){D.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=E.default(R.default.mark((function e(){var t,n,r,a=this;return R.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=E.default(R.default.mark((function e(t){return R.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=E.default(R.default.mark((function e(){var t,n=this;return R.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 D.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=E.default(R.default.mark((function e(t){return R.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}(),VS=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";I.default(this,e),this.dbName=t,this.storeName=n,this.db=null,this.init()}var t,n,r,a;return T.default(e,[{key:"init",value:function(){var e=this;return new Promise(function(t,n){var r=this;D.default(this,e);var a=indexedDB.open(this.dbName,1);a.onerror=function(e){D.default(this,r),console.error("Database error:",e.target.error),n(e.target.error)}.bind(this),a.onsuccess=function(e){D.default(this,r),this.db=e.target.result,t(this.db)}.bind(this),a.onupgradeneeded=function(e){D.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=E.default(R.default.mark((function e(t){var n=this;return R.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;D.default(this,n);var i=this.db.transaction([this.storeName],"readonly").objectStore(this.storeName).get(t);i.onerror=function(e){D.default(this,a),console.error("Get item error:",e.target.error),r(e.target.error)}.bind(this),i.onsuccess=function(t){D.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=E.default(R.default.mark((function e(t,n){var r=this;return R.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;D.default(this,r);var s=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).put({key:t,value:n});s.onerror=function(e){D.default(this,i),console.error("Set item error:",e.target.error),a(e.target.error)}.bind(this),s.onsuccess=function(t){D.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=E.default(R.default.mark((function e(t){var n=this;return R.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;D.default(this,n);var i=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).delete(t);i.onerror=function(e){D.default(this,a),console.error("Remove item error:",e.target.error),r(e.target.error)}.bind(this),i.onsuccess=function(t){D.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=E.default(R.default.mark((function e(){var t=this;return R.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;D.default(this,t);var a=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).clear();a.onerror=function(e){D.default(this,r),console.error("Clear store error:",e.target.error),n(e.target.error)}.bind(this),a.onsuccess=function(t){D.default(this,r),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),QS=function(){function e(t){var n=t.mode;I.default(this,e),this.setItem=function(){var e=E.default(R.default.mark((function e(t,n){return R.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=E.default(R.default.mark((function e(t){return R.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 VS,this.setItem=this.indexedStore.setItem.bind(this.indexedStore),this.getItem=this.indexedStore.getItem.bind(this.indexedStore)):"local-storage"===n&&(this.setItem=function(){var e=E.default(R.default.mark((function e(t,n){return R.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=E.default(R.default.mark((function e(t){return R.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 T.default(e,[{key:"set",value:(n=E.default(R.default.mark((function e(t,n){var r;return R.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=E.default(R.default.mark((function e(t){var n;return R.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 zS(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 KS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zS(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var WS="_gd_vs";function YS(e){return JS.apply(this,arguments)}function JS(){return(JS=E.default(R.default.mark((function e(t){var n,r,i;return R.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,rR({gameId:n});case 6:r=e.sent,e.next=13;break;case 9:e.prev=9,e.t0=e.catch(3),yo("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,iR({gameId:n});case 17:r=e.sent,e.next=24;break;case 20:e.prev=20,e.t1=e.catch(14),yo("visit-get error, Ls",e.t1.message),i.push(e.t1.message);case 24:return e.abrupt("return",KS(KS({},r),{},{errors:i}));case 25:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])})))).apply(this,arguments)}function XS(e){return ZS.apply(this,arguments)}function ZS(){return ZS=E.default(R.default.mark((function e(t){var n,r,i,s;return R.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,tR({gameId:n,serverDate:r});case 6:i=e.sent,e.next=13;break;case 9:e.prev=9,e.t0=e.catch(3),yo("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,$S({gameId:n,serverDate:r});case 17:i=e.sent,e.next=24;break;case 20:e.prev=20,e.t1=e.catch(14),yo("visit-update error, Ls",e.t1.message),s.push(e.t1.message);case 24:return e.abrupt("return",KS(KS({},i),{},{errors:s}));case 25:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])}))),ZS.apply(this,arguments)}function $S(e){return eR.apply(this,arguments)}function eR(){return eR=E.default(R.default.mark((function e(t){var n,r,a,i,s,o;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,r=t.serverDate,i=new QS({mode:a="local-storage"}),e.next=5,i.get(WS);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(WS,s);case 13:return e.abrupt("return",{visit:o,mode:a});case 14:case"end":return e.stop()}}),e)}))),eR.apply(this,arguments)}function tR(e){return nR.apply(this,arguments)}function nR(){return nR=E.default(R.default.mark((function e(t){var n,r,a,i,s;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,r=t.serverDate,i=new QS({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)}))),nR.apply(this,arguments)}function rR(e){return aR.apply(this,arguments)}function aR(){return aR=E.default(R.default.mark((function e(t){var n,r,a;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,"indexed-db",r=new QS({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)}))),aR.apply(this,arguments)}function iR(e){return sR.apply(this,arguments)}function sR(){return sR=E.default(R.default.mark((function e(t){var n,r,a,i;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,"local-storage",r=new QS({mode:"local-storage"}),e.next=5,r.get(WS);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)}))),sR.apply(this,arguments)}function oR(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 uR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oR(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var dR,cR,lR,hR=function(){var e=E.default(R.default.mark((function e(){var t;return R.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)}}(),fR=0,pR=!1,mR=function(){var e=E.default(R.default.mark((function e(t){var n,r,a,i,s,o,u,d=this;return R.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,Ow();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){D.default(this,d),AR(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 O.default(window.location.href),!((o=!["html5.gamedistribution.com","revision.gamedistribution.com"].some(function(e){return D.default(this,d),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,hR();case 27:cR=w.v4(),u={json:JSON.stringify(n)},"wss://ws.gamedistribution.com",(dR=io("wss://ws.gamedistribution.com",{query:u,upgrade:!1,transports:["websocket"],reconnectionDelay:6e4,autoConnect:!1})).on("connect",function(){D.default(this,d)}.bind(this)),dR.on("after-connect",function(){var e=E.default(R.default.mark((function e(t){var r,a,i,s,o,u,d;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return lR=lR||(null==t?void 0:t.serverDate),r=n.gameId,a=n.failed,e.next=4,XS({gameId:r,serverDate:lR});case 4:i=e.sent,s=i.visit,o=i.mode,u=i.errors,n.visit=uR(uR({},s),{},{stm:o,errors:u}),a&&(n.gameId=r?"failed:wrong":"failed:empty"),d={json:JSON.stringify(n)},dR.emit("client-info",{clientId:cR,counter:fR++,serverDate:lR,query:d}),pR=!0;case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),dR.on("disconnect",function(e){D.default(this,d),pR=!1}.bind(this)),dR.connect(),e.next=40;break;case 37:e.prev=37,e.t0=e.catch(1),r&&r(e.t0);case 40:case"end":return e.stop()}}),e,this,[[1,37]])})));return function(t){return e.apply(this,arguments)}}(),gR=!1,vR=[];function AR(e,t){return bR.apply(this,arguments)}function bR(){return bR=E.default(R.default.mark((function e(t,n){var r,a,i,s=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ow();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(!gR){e.next=14;break}return e.abrupt("return");case 14:gR=!0;case 15:a=function(e,t){D.default(this,s);try{var n={json:JSON.stringify(t||{})};dR.emit("socket-event",{topic:e,clientId:cR,counter:fR,serverDate:lR,query:n})}catch(e){yo("game-session: Error on sending socket-event",e.message)}}.bind(this),i=function(){D.default(this,s),a(t,n)}.bind(this),vR.push(i);case 19:case"end":return e.stop()}}),e,this)}))),bR.apply(this,arguments)}function yR(e){var t=this,n={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},r=Object.keys(n).find(function(r){var a=this;return D.default(this,t),n[r].some(function(t){return D.default(this,a),t===e.params.position}.bind(this))}.bind(this));return r||"midroll"}function _R(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 wR(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 wR(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 wR(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 kR(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!==vR.length&&dR&&pR){for(var e=function(){var e=this,r=n[t];r(),vR=vR.filter(function(t){return D.default(this,e),t!==r}.bind(this))},t=0,n=j.default(vR);t<n.length;t++)e();Ao("game-session: commands length",vR.length)}}),100);var xR=3,ER=1,DR=5,SR={lastImpressionDate:null,lastInterstitialImpressionDate:null,imps:0};var RR=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?kR(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e)}}};function TR(){return IR.apply(this,arguments)}function IR(){return(IR=E.default(R.default.mark((function e(){var t,n,r,a,i,s,o,u,d,c,l;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},e.next=3,fw();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)||[],u=!1,d=_R(o),e.prev=13,l=R.default.mark((function e(){var t,n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=c.value,s.some(function(e){return D.default(this,n),e===t.title}.bind(this))&&(u=!0);case 2:case"end":return e.stop()}}),e,this)})),d.s();case 16:if((c=d.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),d.e(e.t1);case 25:return e.prev=25,d.f(),e.finish(25);case 28:n.disabledByTag=u;case 29:return n.isLowScoreGame=CR(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 CR(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)||ER,s=(null==n?void 0:n.ascl)||DR,o=a||{},u=o.adsc,d=o.reqsc,c=o.pdur,l=o.rspdur;o.aspdur,t=(l||d/(c/xR))<=i&&u<s}return t}var OR=!1;function PR(){return LR.apply(this,arguments)}function LR(){return(LR=E.default(R.default.mark((function e(){var t;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!OR){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,TR();case 4:(t=e.sent).enabled,t.override,t.giftEnabled,t.midrollPlusEnabled,OR=!0;case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function BR(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 UR(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 MR(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 MR(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 MR(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 FR=!1,jR=3,GR=5,NR=1,qR=60,HR=10;function VR(){return QR.apply(this,arguments)}function QR(){return(QR=E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return SR.imps++,SR.lastImpressionDate=new Date,SR.lastInterstitialImpressionDate=new Date,e.abrupt("return",!0);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zR(e){return KR.apply(this,arguments)}function KR(){return KR=E.default(R.default.mark((function e(t){var n,r,a,i,s,o,u,d,c,l,h,f,p,m,g,v,A,b,y,_,w,k,x,S,T,I,C,O,P,L,B,U,M,F,j,G,N,q,H,V,Q,z,K,W,Y,J,X,Z=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.gameData,u=t.executeCompensation,d=function(){var e=E.default(R.default.mark((function e(t){var n,r,a;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=(null==t?void 0:t.whenAvailable)||!1,!u){e.next=8;break}return e.next=5,u({whenAvailable:n});case 5:e.t0=e.sent,e.next=11;break;case 8:return e.next=10,VR();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,VR();case 20:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t){return e.apply(this,arguments)}}(),c=!FR,!FR){e.next=5;break}return e.abrupt("return");case 5:if(FR=!0,l=o.adsc){e.next=10;break}return e.abrupt("return");case 10:if(h=l.s,f=l.t,1===h){e.next=13;break}return e.abrupt("return");case 13:if(p=o.compensation||{enabled:!1},m=null==p?void 0:p.enabled,g=null==o||null===(n=o.adTimer)||void 0===n?void 0:n.enabled,v=null==o||null===(r=o.adTimer)||void 0===r?void 0:r.tl,m&&g){e.next=21;break}return e.abrupt("return");case 21:if(!(void 0===(null==p?void 0:p.exctg)||(null==p?void 0:p.exctg))){e.next=46;break}A=["co-op","multiplayer","IAPs"],b=(null==o?void 0:o.tags)||[],y=!1,_=UR(b),e.prev=28,k=R.default.mark((function e(){var t,n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=w.value,A.some(function(e){return D.default(this,n),e===t.title}.bind(this))&&(y=!0);case 2:case"end":return e.stop()}}),e,this)})),_.s();case 31:if((w=_.n()).done){e.next=35;break}return e.delegateYield(k(),"t0",33);case 33:e.next=31;break;case 35:e.next=40;break;case 37:e.prev=37,e.t1=e.catch(28),_.e(e.t1);case 40:return e.prev=40,_.f(),e.finish(40);case 43:if(!y){e.next=46;break}return e.abrupt("return");case 46:if(x=(null==p?void 0:p.esc)||NR,S=void 0===(null==p?void 0:p.depgft)||(null==p?void 0:p.depgft),T=null!=p&&p.depgftr?null==p?void 0:p.depgftr:1,I=(null==p?void 0:p.onst)||!1,C=(null==p?void 0:p.sl)||3,O=v||(null==p?void 0:p.tl)||180,P=(null==o||null===(a=o.gft)||void 0===a?void 0:a.midroll.enabled)||!1,L=(null==o||null===(i=o.midroll_plus)||void 0===i?void 0:i.enabled)||!1,(!P||!L)&&(O/=T),B=void 0===(null==p?void 0:p.tc)||(null==p?void 0:p.tc),U=(null==p?void 0:p.ascl)||GR,!S){e.next=66;break}if(j=(null==o||null===(M=o.gft)||void 0===M?void 0:M.midroll.enabled)||!1,G=(null==o||null===(F=o.midroll_plus)||void 0===F?void 0:F.enabled)||!1,j&&G){e.next=66;break}return e.abrupt("return");case 66:if(q=(N=f||{}).adsc,H=N.reqsc,V=N.pdur,Q=N.rspdur,N.aspdur,(Q||H/(V/jR))<=x&&q<U){e.next=73;break}return e.abrupt("return");case 73:if(z=Math.ceil(V/jR),!I||!c){e.next=80;break}return e.next=80,d({whenAvailable:!0});case 80:return K=0,W=1,Y=function(){D.default(this,Z),K=0,W=1}.bind(this),null===(s=o.sdkfw)||void 0===s||s.enabled,e.next=86,Ow();case 86:if(J=e.sent,e.t2=J,!e.t2){e.next=92;break}return e.next=91,J.isLoader();case 91:e.t2=e.sent;case 92:e.t2,X=setInterval(E.default(R.default.mark((function e(){var t,n,r,a=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(B&&SR.imps>=z)){e.next=4;break}return clearInterval(X),e.abrupt("return");case 4:if(t=new Date,n=SR.lastInterstitialImpressionDate?(i=SR.lastInterstitialImpressionDate,s=t,o=void 0,u=void 0,void 0,void 0,o=i.getTime(),u=s.getTime(),(u-o)/1e3):O+1,!((r=O-n)>0)){e.next=20;break}if(!(r<=qR-HR)){e.next=17;break}return e.next=15,new Promise(function(e){var t=this;D.default(this,a),setTimeout(function(){D.default(this,t),e()}.bind(this),1e3*r)}.bind(this));case 15:e.next=20;break;case 17:return Y(),e.abrupt("return");case 20:if(++K%W==0){e.next=24;break}return e.abrupt("return");case 24:return e.next=26,d({});case 26:e.sent?Y():(K=0,W=W+1>C?C:W+1);case 28:case"end":return e.stop()}var i,s,o,u}),e,this)}))),1e3*qR);case 95:case"end":return e.stop()}}),e,this,[[28,37,40,43]])}))),KR.apply(this,arguments)}function WR(e){return YR.apply(this,arguments)}function YR(){return(YR=E.default(R.default.mark((function e(t){var n,r,a,i,s,o,u,d,c,l,h;return R.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=RR.get(a),(o=null==i?void 0:i[a])&&o.enabled){e.next=7;break}return e.abrupt("return",!1);case 7:if((u=(null==o?void 0:o.skip_sessions)||0)&&0!==u){e.next=11;break}return e.abrupt("return",!1);case 11:if((d=(null==o?void 0:o.skips)||0)&&0!==d){e.next=15;break}return e.abrupt("return",!1);case 15:return e.next=17,YS({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<=u&&("preroll"===a||s<=d),e.abrupt("return",h);case 25:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function JR(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 XR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JR(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ZR(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 $R(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 $R(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 $R(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 eT,tT=function(){function e(t){var n=this;I.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 D.default(this,n),t.isOpusReady}.bind(this),this._adCounterLabel=t.adInstance.adCounterLabel,this._muteRequested=!1,this._terminateRequested=!1,this._adSession=null,this._registerForEvents(),document.addEventListener("visibilitychange",function(){D.default(this,n),"visible"===document.visibilityState?this._sendTabChange("tab-visible"):this._sendTabChange("tab-invisible")}.bind(this))}var t,n;return T.default(e,[{key:"_registerForEvents",value:function(){var e=this;this.eventBus.subscribe("HL_CONFIG_ERROR",function(t){D.default(this,e),this.hasHLConfigError=!0}.bind(this))}},{key:"runAdFlow",value:(n=E.default(R.default.mark((function e(t){var n,r,a,i,s,o,u,d,c,l,h,f,p,m,g,v,A,b,y,_,w,k,x,E,S,T,I,O,P,L,B,U,M,F,j,G,N,q,H,V,Q,z,K,W,Y,J,X,Z,$,ee,te,ne,re,ae,ie,se,oe,ue,de,ce,le,he,fe,pe,me,ge,ve,Ae=this;return R.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 D.default(this,Ae),new Promise(function(n){return D.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,Ow();case 9:return!(h=e.sent)||h.isLoader(),this.adRequest=t,f=yR(t),t.params.adTypeFound=f,Ao("gd-adflow, adTypeFound",f,t.params.position),RR.count(f),Ao("gd-adflow, counters",{counters:RR.getAll()}),p=this._gameData,m=p.gameId,g=p.ad_skip,e.next=21,WR({gameId:m,ad_skip_rule:g,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"),zR({gameData:this._gameData,executeCompensation:this.executeCompensation}),e.abrupt("return");case 28:(v=this._getAdFlow(f)).find(function(e){return D.default(this,Ae),"opus"===e}.bind(this))&&!this.isOpusReady()&&(v=v.filter(function(e){return D.default(this,Ae),"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===(u=k.position)||void 0===u?void 0:u[f]),E=null==k?void 0:k.gift,S=x&&null!=k&&k.duration?null==k?void 0:k.duration:5,T=b?v.filter(function(e){return D.default(this,Ae),"adsense"!==e}.bind(this)):v,I=this.get_ad_system_init_result(),O=I.afg,P=I.ima,L=null==A||null===(d=A.ad_blcks)||void 0===d||null===(c=d.removeOtherAdaptors)||void 0===c?void 0:c.enabled,this.anyAdBlocking=!O||!P,this.bothAdBlocking=!O&&!P,this.adsBlocked=L&&this.anyAdBlocking||this.bothAdBlocking,this.adsBlocked?(bo("gd-adflow adsBlocked so changing the flow"),T=[]):(O||(T=T.filter(function(e){return D.default(this,Ae),"adsense"!==e}.bind(this))),P||(T=T.filter(function(e){return D.default(this,Ae),"ima"!==e}.bind(this)))),B=!1,U=!1,M=[],F=0,j=!1,N=!1,q={},H=!1,V=!1,Q=ZR(T),e.prev=61,Q.s();case 63:if((z=Q.n()).done){e.next=115;break}if(K=z.value,!this._terminateRequested){e.next=67;break}return e.abrupt("break",115);case 67:if(t.params.adapter=K,W=F===T.length-1,Y=y&&E||!y,J=W&&x&&Y,t.params=XR(XR({},t.params),{},{adapterIndex:F,isLastAdapter:W,shouldFail:!1,extraPromoRunOnFail:J,muteRequested:this._muteRequested}),!this._muteRequested||"adsense"!==K){e.next=74;break}return e.abrupt("continue",113);case 74:return function(){D.default(this,Ae),_o.firstSuccessOrder&&!isNaN(_o.firstSuccessOrder)&&(t.params.shouldFail=F<_o.firstSuccessOrder)}.bind(this),bo("gd-adflow, before adInvoke",F,K,t.params.shouldFail),e.next=78,this.adInvoke(t);case 78:if(X=e.sent,Z=X.success,$=X.args,ee=X.isSkipped,te=X.noVast,ne=X.t4r,re=X.adContext,ae=X.isCanceled,ie=(null==re?void 0:re.isVMAP)||!1,se=null==$?void 0:$.reason,oe=null==$?void 0:$.message,ue=null==$?void 0:$.errorType,q[K]=q[K]||{req:0,imp:0,fail:0},q[K].req++,Z?q[K].imp++:(q[K].fail++,q[K].failReason=se,q[K].failMessage=oe,q[K].failType=ue),!Z){e.next=102;break}return bo("gd-adflow, adapter-result-success",F,K,$),B=!0,N=ie,U=!(null==$||!$.isPromoSuccess),G=ne,e.abrupt("break",115);case 102:if(bo("gd-adflow, adapter-result-failure",F,K,$.message),"opus"===K&&"[FC] No ad available"===(null==$?void 0:$.message)&&(H=!0),ae&&!V&&(V=!0),F++,M.push($.message),!ee){e.next=109;break}return e.abrupt("break",115);case 109:if(!te){e.next=112;break}return this._runAutoResume(),e.abrupt("break",115);case 112:j=J;case 113:e.next=63;break;case 115:e.next=120;break;case 117:e.prev=117,e.t0=e.catch(61),Q.e(e.t0);case 120:return e.prev=120,Q.f(),e.finish(120);case 123:if(!j){e.next=129;break}return e.next=126,new HS(this).run({duration:S});case 126:e.sent.success&&(U=!0);case 129:return function(){var e;D.default(this,Ae),_o.disableGift&&null!==(e=A.gft)&&void 0!==e&&e[f].enabled&&(A.gft[f].enabled=!1)}.bind(this),de=M.join(" /n"),B||H?(SR.imps++,SR.lastImpressionDate=new Date,"rewarded"!==f&&(SR.lastInterstitialImpressionDate=new Date),this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(f),"midroll"===f&&this._executeMidrollPlus()):(this._onResumeGame(de,"warning"),this._giveGift(f),"midroll"===f&&this._executeMidrollPlus()),zR({gameData:A,executeCompensation:this.executeCompensation}),ce="-1",le="none",B?(ce="index_".concat(F),le=T[F]):U?(ce="promo",le="promo"):H&&(ce="opus",le="opus"),he=this.get_session_id(),this.anyAdBlocking&&"-1"===ce?(fe="rewarded"===f?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[fe]=this.blockedAdsMap[fe]?this.blockedAdsMap[fe]+1:1,Ao("gd-adflow, blocked-ad",JSON.stringify(this.blockedAdsMap)),this._msgrt.send("adflow.blocked.pos",{message:"".concat(fe)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!O,imaBlocked:!P,isGift:y,isMidrollPlus:_,adType:fe,sessionId:he,successAdapter:"none",adFlowIndex:ce,adapterResults:q,ctry:A.ctry})):(pe={},C.default(pe,"adflow.all.index",{message:"".concat(ce)}),C.default(pe,"adflow.all.success_adapter",{message:"".concat(le)}),C.default(pe,"adflow.".concat(f,".index"),{message:"".concat(ce)}),C.default(pe,"adflow.".concat(f,".success_adapter"),{message:"".concat(le)}),me=pe,Object.keys(me).forEach(function(e){D.default(this,Ae);var t=me[e];this._msgrt.send(e,t)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:ce,successAdapter:le,adBlocker:!1,afgBlocked:!O,imaBlocked:!P,isGift:y,isMidrollPlus:_,isCompensation:w,adType:f,sessionId:he,t4r:G,adapterResults:q,ctry:A.ctry})),ge={adType:f,imp:"-1"!==ce&&"promo"!==ce||H,promo:"promo"===ce,opus:H,blocked:this.anyAdBlocking&&"-1"===ce,hasHLConfigError:this.hasHLConfigError,isGift:y,isMidrollPlus:_,isCompensation:w,isVMAP:!H&&N,isAppliedVMAP:!H&&N&&(null==A?void 0:A.vmapByTagsApplied)},this._adSession=ge,AR("ad-session",{adSession:ge}),H&&V&&AR("ad-session",{adSession:XR(XR({},ge),{},{opus:!1,isVMAP:N,isAppliedVMAP:N&&(null==A?void 0:A.vmapByTagsApplied)})}),ve={adType:f},this.eventBus.broadcast("AD_FLOW_COMPLETE",ve),e.abrupt("return",XR(XR({},ve),{},{args:{success:B,isGift:y,isMidrollPlus:_}}));case 149:case"end":return e.stop()}}),e,this,[[61,117,120,123]])}))),function(e){return n.apply(this,arguments)})},{key:"adInvoke",value:(t=E.default(R.default.mark((function e(t){var n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=E.default(R.default.mark((function e(r,a){var i,s,o,u,d=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i="main.showad.".concat(t.params.adapter,".").concat(t.params.adapterIndex),Ao("adInvoke.start",{scopeName:i,adRequest:JSON.stringify(t)}),s={},o=function(e){D.default(this,d);var a=n._adInstance.adContext;Ao("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),u=function(e){D.default(this,d);var a=n._adInstance.adContext;Ao("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",u,i),n._eventBus.subscribe("AD_T4R",function(){D.default(this,d),s.loaded=!0}.bind(this),i),n._eventBus.subscribe("AD_T4R_CLICK",function(){D.default(this,d),s.t4rClick=!0}.bind(this),i),n._eventBus.subscribe("AD_T4R_VIDEO",function(){D.default(this,d),s.t4rVideo=!0}.bind(this),i),n._eventBus.subscribe("AD_CLICK",function(){D.default(this,d),s.click=!0}.bind(this),i),n._eventBus.subscribe("AD_BIDDER",function(e){D.default(this,d),s.bidder=null==e?void 0:e.bidder}.bind(this),i),n._eventBus.subscribe("AD_T4R_NONE",function(e){D.default(this,d),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),yo("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,u,d=this,c=void function(){if(D.default(this,d),_o.customAdFlow)return JSON.parse(_o.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===(u=o.adapters)||void 0===u?void 0:u[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(){D.default(this,t),"hidden"===document.visibilityState&&(n.tabState=n.tabState+"-STARTED",AR("ad-session-tab",{adSession:n}))}.bind(this)),this.eventBus.subscribe("IMPRESSION",function(){D.default(this,t),"hidden"===document.visibilityState&&(n.tabState=n.tabState+"-IMPRESSION",AR("ad-session-tab",{adSession:n}))}.bind(this))}}},{key:"mute",value:function(){var e=this;this._muteRequested=!0,this._adInstance.mute().catch(function(t){D.default(this,e)}.bind(this))}},{key:"terminate",value:function(){var e=this;this._terminateRequested=!0,this._adInstance.terminate().catch(function(t){D.default(this,e)}.bind(this)),this._setAdRequestTimer()}}]),e}(),nT=new m.EventEmitter,rT=["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(rT.some(function(e){return D.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)){var i=n.system;n.action;var s="aeriaExternalHostsConnector"===i;if("Softgames"===i)eT=a,(window.parent||window).postMessage(n,"*"),nT.emit("aeria-event",n);else if(s){eT&&eT.postMessage(n,"*");var o=window.parent||window;o&&o.postMessage(n,"*")}}}),!1);var aT="https://html5.gamedistribution.com",iT="parent-data-request",sT="parent-data-response",oT=function(){function e(){I.default(this,e)}var t;return T.default(e,[{key:"init",value:function(e){var t=this;this._registerForDataRequests(e),this._askForParentFrameData().then(function(n){if(D.default(this,t),n){var r=n.adRequestTimer;e.adRequestTimer=r,Ao("gd-frame-data-bridge, adRequestTimer on init ",e.adRequestTimer)}}.bind(this))}},{key:"_registerForDataRequests",value:function(e){var t=this;window.addEventListener("message",function(n){D.default(this,t);var r=n.data,a=n.origin,i=n.source,s=r.type;if(r.value,a===aT&&s===iT){var o={adRequestTimer:e.adRequestTimer};i.postMessage({type:sT,value:o})}}.bind(this))}},{key:"_askForParentFrameData",value:(t=E.default(R.default.mark((function e(){var t=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;D.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===aT&&i===sT&&(e(s),a=!0)})),setTimeout(function(){D.default(this,r),a||e()}.bind(this),1e3);var i={type:iT};window.parent.postMessage(i,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),uT=new oT,dT={SDKExistsOnUpperFrame:!1};function cT(){return lT.apply(this,arguments)}function lT(){return(lT=E.default(R.default.mark((function e(){var t,n;return R.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 hT(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 fT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hT(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pT=function(){bo("gtag: GA not initialized",arguments)};function mT(e){return gT.apply(this,arguments)}function gT(){return gT=E.default(R.default.mark((function e(t){var n,r,i,s,o,u,d,c,l,h,f,p,m=this;return R.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),u=[o],e.prev=5,e.next=8,a.getScript(u[0],"gdsdk_google_analytics",{alternates:u,error_prefix:"Blocked:",exists:function(){return D.default(this,m),window[s]}.bind(this)});case 8:return window[s]=window[s]||[],pT=function(){window[s].push(arguments)},pT("js",new Date),e.next=14,H.default();case 14:return d=e.sent,c=d.lookupIabConsent,l=d.getGoogleAdType,e.next=19,c();case 19:h=e.sent,f=l(h.consentData),p=fT(fT({},p=r||{}),{},{cookie_flags:"SameSite=None;Secure",cmp:h.result,gdpr:"ok"===h.result?"object"===S.default(h.consentData)?!0===h.consentData.gdprApplies:"N/A":h.result,google_ads:null==f?void 0:f.type}),pT("config",i,p),e.next=31;break;case 27:e.prev=27,e.t0=e.catch(5),yo("gtag: load GA error",e.t0),n&&n(e.t0);case 31:case"end":return e.stop()}}),e,this,[[5,27]])}))),gT.apply(this,arguments)}new O.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 O.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 vT,AT=function(e){var t=this,n=e.handler,r=e.timeout,a=e.interval,i=n||function(){return D.default(this,t),!0}.bind(this),s=r||1e3,o=a||10;return new Promise(function(e,r){var a=this;if(D.default(this,t),n())e(!0);else{var u=!1,d=setInterval(function(){D.default(this,a);try{i()&&(clearInterval(d),u=!0,e(!0))}catch(t){clearInterval(d),e(!1)}}.bind(this),o);setTimeout(function(){D.default(this,a),clearInterval(d),u||e(!1)}.bind(this),s)}}.bind(this))},bT=function(){var e=E.default(R.default.mark((function e(t){var n,r,a,i,s=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.topic,r=t.args,e.next=3,fw();case 3:if(a=e.sent,i=a.console_logs,i&&i.allowed.some(function(e){return D.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 yT(){return _T.apply(this,arguments)}function _T(){return _T=E.default(R.default.mark((function e(){var t,n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!vT){e.next=2;break}return e.abrupt("return",vT);case 2:return e.next=4,H.default();case 4:return t=e.sent,n=t.lookupIabConsent,t.getGoogleAdType,e.next=9,n();case 9:return vT=e.sent,e.next=12,bT({topic:"cmp-decoded",args:{key:"[consent-check] cmp-decoded",cmp:vT}});case 12:return e.abrupt("return",vT);case 13:case"end":return e.stop()}}),e)}))),_T.apply(this,arguments)}function wT(){return kT.apply(this,arguments)}function kT(){return kT=E.default(R.default.mark((function e(){var t,n,r,a,i,s,o,u,d,c,l,h,f,p=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,yT();case 2:if(a=e.sent,(i=(null==a?void 0:a.consentData)||{}).gdprApplies){e.next=7;break}return bo("[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)||{},u=(null===(r=i.publisher)||void 0===r?void 0:r.consents)||{},d=function(e){return D.default(this,p),0===Object.keys(e).length}.bind(this),c=d(s),l=d(o),h=d(u),bo("[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)}))),kT.apply(this,arguments)}function xT(){return ET.apply(this,arguments)}function ET(){return ET=E.default(R.default.mark((function e(){var t,n,r,a,i;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,yT();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)}))),ET.apply(this,arguments)}function DT(){return ST.apply(this,arguments)}function ST(){return(ST=E.default(R.default.mark((function e(){var t,n,r,a;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fw();case 3:if(t=e.sent,null!=(n=t.disable_ads_by_cmp)&&n.enabled){e.next=8;break}return bo("[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,wT();case 13:e.t0=e.sent;case 14:if(!e.t0){e.next=17;break}return bo("[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,xT();case 22:e.t1=e.sent;case 23:if(!e.t1){e.next=26;break}return bo("[consent-check] partially rejected"),e.abrupt("return",!0);case 26:e.next=31;break;case 28:e.prev=28,e.t2=e.catch(0),yo("[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 RT(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 TT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RT(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var IT=w.v4(),CT=null,OT=null,PT=function(){function e(t){var n,r,a,i,s=this;if(I.default(this,e),C.default(this,"_whichFrameV2",function(){var e=this;D.default(this,s);var t=O.default(window.location.href,!0),n=t.host,r=t.query,a="html5.gamedistribution.com"!==n,i=function(t){return D.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(O.default(r.gd_sdk_referrer_url).host));return this._isMasterGameURL()&&!(this._isTokenGameURL()||a)||o?"loader-frame":"game-frame"}.bind(this)),CT)return CT;CT=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 R_,this._location.print();var o=this._location.get(),u=(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),d=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||d,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._topDomain=this._topDomain||u,Ao("locs found:",this._topDomain,this._parentURL),this._isFullScreen=!1,this._giftCount={preroll:0,midroll:0,rewarded:0},this._mplus_count=0,Ew({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){D.default(this,s),this._sdk_ready=!0}.bind(this)).catch(function(e){D.default(this,s),this._sdk_ready=!1}.bind(this)).finally(function(){var e,t,n,r,a=this;if((D.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 cS({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[LS]){var n=MS("https://static.gamedistribution.com/message/index.html",LS);if(document.body.appendChild(n),window!==window.top){var r=[FS(e,"TokenGenerated"),FS(e,"PageLoaded")];n.onload=function(){var e=this;return D.default(this,t),r.forEach(function(t){return D.default(this,e),qS(t)}.bind(this))}.bind(this),jS(e)}window.addEventListener("message",function(e){return D.default(this,t),GS(e)}.bind(this),!1)}}(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){D.default(this,a),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),uT.init(this),this._send_gametag_data("sdk_init"),this.fixScore(),this._stableAdFlowForTest(),jw({onEvent:function(e){D.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-change"===t)&&(n.visible?this.onPauseGame("In game store opened","success"):this.onResumeGame("In game store closed","success"))}.bind(this)})}.bind(this)),this._registerSGBridge(),Ao("which-frame",this._whichFrame()),this._loadLocus()}var t,n,r,i,s,o,u,c,l,h,f,p,m,g,v,A,b,y,_,w,k,x;return T.default(e,[{key:"_stableAdFlowForTest",value:function(){try{(a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&a.Ls.getBoolean("gd_tag")||sS().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=E.default(R.default.mark((function e(){var t,n,r,a,i,s=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,AT({handler:function(){return D.default(this,s),!!OT}.bind(this),timeout:1e3,interval:10});case 2:return a=e.sent,i=a?null===(t=OT)||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=E.default(R.default.mark((function e(){var t,n,r,a,i,s,o,u,d,c,l,h,f,p,m,g,v,A,b,y,_,w,k,x,E,S,T=this;return R.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:o=e.sent,u=this._gameData,d=u.category,c=u.dname,l=u.pname,h=u.gameId,f=u.slug,p=u.title,m=u.ctry,g=u.failed,v=this._topDomain||this._parentDomain,A=new R_,b=A.get(),y=this.msgrt._ua,_=document.referrer,w=this.msgrt._layout,k=mo.version,x=(null===(r=this._gameData)||void 0===r||null===(a=r.gft)||void 0===a?void 0:a.midroll.enabled)||!1,E=(null===(i=this._gameData)||void 0===i||null===(s=i.midroll_plus)||void 0===s?void 0:s.enabled)||!1,S={args:{rfr:_,category:d,dname:c,pname:l,gameId:h,slug:f,title:p,ctry:m,domain:v,loc:b,ua:y,layout:w,version:k,visitorId:o,hasGft:x,hasMp:E,failed:g},onError:function(e){D.default(this,T),this._sendSDKError(e)}.bind(this)},mR(S);case 20: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(D.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=E.default(R.default.mark((function e(t){var n;return R.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:(_=E.default(R.default.mark((function e(){var t,n,r,a,i,s;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=12;break}if(r=new R_,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,TS();case 7:e.next=12;break;case 9:if("html5.gamedistribution.com"!==this._topDomain){e.next=12;break}return e.next=12,TS();case 12:case"end":return e.stop()}}),e,this)}))),function(){return _.apply(this,arguments)})},{key:"testConsent",value:function(){try{wS();E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,kS({});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;IS.on("splash-hidden",function(t){D.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());O.default(location.href,!0);if(this._whichFrame(),this._isMasterGameURL(),this._isExtHostedGameURL(),this._isTokenGameURL(),this._isHostHTML5Domain(),this._isExternalHoster(),location.href,document.referrer,t)try{Ao("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=E.default(R.default.mark((function e(t,n){var r,a,i,s,o,u,d=this;return R.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,DT();case 15:return o=e.sent,bo("[ad-system-init] allowed",{adSystemInitAllowed:u=s&&!o,notDisabledByModuleClose:s,disabledByConsent:o}),u&&(this.videoAdReady=this._initializeVideoAd().then(function(){D.default(this,d),(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){D.default(this,d);var t="".concat(e).startsWith("Error: Blocked:");bo("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,PR();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=E.default(R.default.mark((function e(){var t,n,r,i,s;return R.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,cT();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=M.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=mo.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;if(this._shouldSendTunnlEvent(e)){void 0!==this._topDomain&&"undefined"!==this._topDomain||(this._topDomain=void 0);var n={page_url:this._topDomain||this._parentDomain,game_id:this.options.gameId,eventtype:e,ts:Date.now()};fetch("https://hlana.gamedistribution.com/event?".concat(N.default.stringify(n))).catch(function(r){D.default(this,t),this._sendHLAnalyicsLog({query:TT(TT({},n),{},{error:null==r?void 0:r.message}),eventType:-e})}.bind(this)),this._sendHLAnalyicsLog({query:n,eventType:e}),this.adInstance._send_atom_event("hl.config",n),this._send_gametag_data("sdk_gameplay")}}},{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(j.default(document.location.ancestorOrigins)).find(function(t){return D.default(this,e),"revision.gamedistribution.com"===O.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:mo.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;D.default(this,e),OT=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(t=this._gameData.diagnostic)&&void 0!==t&&null!==(n=t.gameDock)&&void 0!==n&&n.adViewEvent&&OT.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),xS.track(OT,this._gameData)}.bind(this)).catch(function(t){D.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=OT)||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){D.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_loadLocus",value:function(){var e=E.default(R.default.mark((function e(){var t,n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Aw();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(){D.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){D.default(this,n),this._sendSDKError(e)}.bind(this)).then(function(){D.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=E.default(R.default.mark((function e(){return R.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:(v=E.default(R.default.mark((function e(){return R.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 v.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 R_,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};mT({onError:function(t){D.default(this,e),this._sendSDKError(t)}.bind(this),args:s})}}},{key:"_getCleanUrl",value:function(e){var t=e;try{var n=new O.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 D.default(this,e),this.eventBus.subscribe(t,function(e){return D.default(this,n),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),a.IMAEvents.forEach(function(t){var n=this;return D.default(this,e),this.eventBus.subscribe(t,function(e){return D.default(this,n),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){D.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){}}iS()}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return D.default(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(t){var n,r;D.default(this,e),this.msgrt.send("ad.impression"),nS(),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&xS.track(OT,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(t){D.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){D.default(this,e),this._sendAdRequestContext(t.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(t){if(D.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){D.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){D.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 D.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=tw().config;return"https://".concat(t.gameAPI,"/game/v4/get/").concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(mo.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(g=E.default(R.default.mark((function e(){var t,n,r;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=!0,n=this._gameData,r=this._parentDomain.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 g.apply(this,arguments)})},{key:"_blockDirectTokenURLEmbedding",value:function(){var e,t,n=this._checkTokenGameUrl(),r=new R_,a="html5.gamedistribution.com"!==O.default(document.referrer).host,i=n&&!dT.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,u=null===(s=this._gameData)||void 0===s||null===(o=s.directTokenUse)||void 0===o?void 0:o.behavior;"to-loader"===u?this._redirectToLoaderFrame():"to-blocked-page"===u&&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(E.default(R.default.mark((function a(){return R.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(N.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(E.default(R.default.mark((function n(){var r,a,i,s;return R.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=O.default(location.href,!0),a=TT(TT({},r.query),{},{rd:"1"}),i=N.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(){D.default(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;sS().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,u=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!=u&&u.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!=u&&u.enabled?this._createPromoBeforeSplash(i,s):!1!==o.enabled&&this._createSplash(i,s):null!=u&&u.enabled&&this._createPromo(i,s))}},{key:"_initializeVideoAd",value:(m=E.default(R.default.mark((function e(){var t;return R.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 mS(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=mo,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=E.default(R.default.mark((function e(t){var n,r,a,i,s;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=!1,e.prev=1,e.next=4,Ow();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),Ao("[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=E.default(R.default.mark((function e(t){var n,r;return R.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(Ao("[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:bo("[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&&US({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=E.default(R.default.mark((function e(){var t;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();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=E.default(R.default.mark((function e(t,n){var r,i,s,o,u=this;return R.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(TT(TT({},this.options),{},{isConsentDomain:n,version:mo.version}),t,this._parentDomain),e.next=6,yw();case 6:s=e.sent,o=s.enabled,i.on("playClick",function(){var e,r,s,d=this;if(D.default(this,u),((null===(e=window.gdlocus)||void 0===e?void 0:e.firstUserAction)||E.default(R.default.mark((function e(){return R.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){D.default(this,d),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(),AR("play"),o)window.gdsdk.showAd(a.AdType.Interstitial,{position:"preroll"}).catch(function(e){D.default(this,d),i.hide()}.bind(this));else{var l={position:"preroll"};(function(){D.default(this,d),_o.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){D.default(this,d)}.bind(this))}null!==(r=this._gameData)&&void 0!==r&&null!==(s=r.evnts)&&void 0!==s&&s.enabled&&(US({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(){D.default(this,u),i.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){D.default(this,u),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=E.default(R.default.mark((function e(t,n){var r,a,i,s,o=this;return R.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(TT(TT({},this.options),{},{isConsentDomain:n,version:mo.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){D.default(this,o),s.hide(),this._createSplash(t,n)}.bind(this)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0),this._createSplash(t,n);case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(e,t){return c.apply(this,arguments)})},{key:"_createPromo",value:(u=E.default(R.default.mark((function e(t,n){var r,a,i,s,o=this;return R.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(TT(TT({},this.options),{},{isConsentDomain:n,version:mo.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){D.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=12;break;case 9:e.prev=9,e.t0=e.catch(0),this.onResumeGame("Resumed after the promo","warning");case 12:case"end":return e.stop()}}),e,this,[[0,9]])}))),function(e,t){return u.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(a.AdType.Interstitial).catch(function(){D.default(this,e)}.bind(this))}},{key:"IscForwardShowAd",value:(o=E.default(R.default.mark((function e(t){var n,r,a,i,s,o,u,d,c,l=arguments;return R.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,Ow();case 10:if(u=e.sent){e.next=13;break}return e.abrupt("return",i);case 13:return e.next=16,u.isLoader();case 16:if(d=e.sent,c=u.hasRouter(),d||!c){e.next=26;break}return bo("[GD-IS] forwarding ad call",{location:window.location.href}),r=!0,e.next=25,u.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),Ao("[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=E.default(R.default.mark((function e(t){var n,r=this,a=arguments;return R.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=E.default(R.default.mark((function e(a,i){var s,o,u,d,c,l,h,f;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.IscForwardShowAd(t,n);case 3:if(o=e.sent,u=o.forwarded,d=o.result,!u){e.next=9;break}return a(d),e.abrupt("return");case 9:return AR("play"),c={adType:t||"interstitial",params:n,adTimestamp:r.adRequestTimer},e.next=15,r.sdkReady;case 15:return l=e.sent,e.next=18,r.videoAdReady;case 18:if(null!==(s=r._gameData.lp)&&void 0!==s&&s.load||r._sendLoadedEvent(1),r._sendGamedockGamePlay(),r._rejectAdIfGameBlocked({gameData:l,adRequest:c}),r._rejectAdIfUnsupportedType({adRequest:c}),"rewarded"===t&&r._setGameRewardedFlag(),null!=n&&n.isGift||null!=n&&n.isCompensation||r._rejectAdIfAdRateHits({gameData:l,adRequest:c}),n&&(n.isGift||n.isMidrollPlus||n.isCompensation)||!r.adBlockerPage||(r._setAdRequestTimer(),r.adBlockerPage.show()),r.adInstance.attachAfgPosition(c),!r._autoResumeIfAdsAreDisabled(yR(c))){e.next=30;break}return e.abrupt("return",a());case 30:if(r._rejectAdIfAdDisabled({gameData:l,adRequest:c}),!r.adFlowRunning){e.next=33;break}return e.abrupt("return",a());case 33:return r.adFlowRunning=!0,h=new tT(r),r._adFlow=h,e.next=38,h.runAdFlow(c);case 38:f=e.sent,r.adFlowRunning=!1,r._adFlow=null,a(f),r._post_message({topic:"adrequest.instream"}),e.next=52;break;case 45:e.prev=45,e.t0=e.catch(0),r.adFlowRunning=!1,r._adFlow=null,r.onAdError(e.t0.message),r.onResumeGame(e.t0.message,"warning"),i(e.t0.message);case 52:case"end":return e.stop()}}),e,null,[[0,45]])})));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 Ao("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(){D.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,u,d,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===(u=this._gameData)||void 0===u||null===(d=u.gft)||void 0===d||null===(c=d[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=yR(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,u=e.gameData,d=e.adRequest,c=null;d.adType===a.AdType.Interstitial&&null!==(t=u.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=u.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(c=6e4*(null===(s=u.diagnostic)||void 0===s||null===(o=s.useMidrollIndex)||void 0===o?void 0:o.indexes[this.adInstance.adMidrollCount])):c=u.midroll;if(d.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=E.default(R.default.mark((function e(t){var n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=E.default(R.default.mark((function e(r,i){var s,o;return R.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=E.default(R.default.mark((function e(){var t=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=E.default(R.default.mark((function e(n,r){return R.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=E.default(R.default.mark((function n(r,a){var i;return R.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;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 r="SDK_GAME_START";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),this.adInstance&&this.adInstance._hideAddResume(),this.adInstance&&this.adInstance._hideAdSpinner(),this.adInstance&&this.adInstance._clearTimeoutForSkipAddButton(),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(US({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()||(US({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(D.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){D.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 O.default(e),a=r.host;return r.href,((null===(t=this._gameData.urlBlockExc)||void 0===t?void 0:t.hosts)||[]).some(function(e){return D.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;D.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 D.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()),u=(e||n)&&r.loaderEnabled,d=(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,g=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:u,noLoadedEvent:d,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:g,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 O.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=O.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=O.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 O.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 O.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new O.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(d.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new vS(t).splash()}},{key:"_createPrerollPromoTemplate",value:(n=E.default(R.default.mark((function e(t){var n,r,a,i,s;return R.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 gS(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(d.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new O.default(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(N.default.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new O.default(e,!0);return n.query=TT(TT({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return d.Base64.encode(JSON.stringify(e))}},{key:"session",value:function(){var e=this;return new Promise(function(){var t=E.default(R.default.mark((function t(n,r){var a;return R.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)OT.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 D.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;D.default(this,i),this.showAd(a.AdType.Interstitial,{position:"midroll"}).catch(function(t){D.default(this,e)}.bind(this))}.bind(this),1e3*s)}}},{key:"executeCompensation",value:(t=E.default(R.default.mark((function e(t){var n,r,i,s,o,u,d=this;return R.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=E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.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;D.default(this,d);var r=!1,a=setInterval(E.default(R.default.mark((function t(){var s;return R.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),Ao("[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(){D.default(this,n),r||o||e({success:!1})}.bind(this),6e4)}.bind(this));case 15:return u=e.sent,e.abrupt("return",u);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(!BR({rateType:i,gameData:this._gameData}))return void Ao("[compensation] rate check did not pass for ".concat(i));Ao("[compensation] rate check passed for ".concat(i));var s=setInterval(E.default(R.default.mark((function n(){var r=this;return R.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:t.adInstance.requestRunning||t.adFlowRunning?console.log("Advertisement already running..."):(Ao("gd-adflow WILL GIVE GIFT!!!"),t.showAd(a.AdType.Interstitial,{position:e,isGift:!0}).catch(function(e){D.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 IT}},{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 D.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(BR({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;(D.default(this,t),this.adFlowRunning)||(this.showAd(a.AdType.Interstitial,{position:"midroll",giftType:r,isMidrollPlus:!0}).catch(function(e){D.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;D.default(this,t),this.showAd(a.AdType.Interstitial,{position:"midroll",giftType:r,isMidrollPlus:!0}).catch(function(t){D.default(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}}}]),e}();function LT(){return(LT=E.default(R.default.mark((function e(){var t,n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Aw();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){D.default(this,n),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}var BT,UT=new m.EventEmitter,MT=function(e){var t=this;!function(){LT.apply(this,arguments)}();var n,r=function(e){var n=this;return D.default(this,t),new Promise(function(t,r){var a=this;D.default(this,n);var i=function(e){D.default(this,a),"SDK_GAME_START"===e.name&&(UT.off("sdk-event",i),t())}.bind(this);UT.on("sdk-event",i),p("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return D.default(this,t),n||(n=new PT(e)),n}.bind(this),i=function(e){return D.default(this,t),r(e)}.bind(this),s=function(e){return D.default(this,t),"gdsdk://preloaded"}.bind(this),o=function(e){return D.default(this,t),a().showDisplayAd(e)}.bind(this),u=function(){return D.default(this,t),p("cancelAd")}.bind(this),d=function(){return D.default(this,t),p("openConsole")}.bind(this),c=function(){return D.default(this,t),p("showBanner")}.bind(this),l=function(){return D.default(this,t),p("session")}.bind(this),h=function(e){return D.default(this,t),p("sendGenericEvent",{options:e})}.bind(this),f=function(){D.default(this,t),console.log("_sendSDKReady")}.bind(this),p=function(e,n){var r=this;return D.default(this,t),n||(n={}),new Promise(function(t,a){D.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),m=function(){D.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&&v(r)}),!1)}.bind(this),g=function(){D.default(this,t),m(),p("init")}.bind(this),v=function(n){D.default(this,t);try{UT.emit("sdk-event",n),e.onEvent&&(bo("[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:c,showAd:i,preloadAd:s,showDisplayAd:o,cancelAd:u,openConsole:d,getSession:l,onEvent:v,init:g,_sendSDKReady:f,sendGenericEvent:h}},FT=function(){var e=E.default(R.default.mark((function e(t){var n,r=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=MT(t)).init(),e.next=4,Ew({whichFrame:"game-frame",options:{onEvent:n.onEvent.bind(n)}});case 4:return jw({onEvent:function(e){D.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-change"===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)}}(),jT=function(){var e=this,t=function(){D.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),n=function(){D.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),r=function(){D.default(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this),a=function(){D.default(this,e);var r="html5.gamedistribution.com"!==O.default(window.location.href).host;return t()&&!(n()||r)?"loader-frame":"game-frame"}.bind(this);return{isMasterGameURL:t,isTokenGameURL:n,isExtHostedGameURL:r,whichFrame:a}},GT="gd-sdk-frame-handshake-request",NT="gd-sdk-frame-handshake-response",qT=function(e){var t=this;return new Promise(function(e,n){var r=this;D.default(this,t);var a={type:GT},i=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin,a=t.source,s=n.type;if(s===GT){var o={type:NT};a.postMessage(o,r)}else s===NT&&(i=!0,e({origin:r,source:a}))})),setTimeout(function(){D.default(this,r),i||e()}.bind(this),200),window.parent!==window?window.parent.postMessage(a,"*"):e()}.bind(this))},HT=function(){var e=E.default(R.default.mark((function e(){var t,n,r,a,i,s,o;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vw();case 2:return t=e.sent,e.next=6,qT();case 6:if(n=e.sent,dT.SDKExistsOnUpperFrame=!!n,t){e.next=10;break}return e.abrupt("return",!1);case 10:return r=jT(),a=r.isMasterGameURL,r.isTokenGameURL,i=a(),e.next=14,bw();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)}}(),VT={},QT=function(e){try{if(e.skipForward)return void Ao("gd-adflow fw-skip-forward",e);if(Ao("gd-adflow fw-forwarding",e),VT.source){var t={type:"gd-sdk-on-event",event:e};VT.source.postMessage(t,VT.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},zT=function(){QT({name:"SDK_READY",status:"success",message:"Everything is ready."}),QT({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),QT({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},KT=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(!VT.source&&"init"===s)return function(e){var t=e.source,n=e.origin;VT={source:t,origin:n}}({source:a,origin:r}),void zT();var u=e[s];u&&E.default(R.default.mark((function t(){var n,r=this;return R.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,function(){D.default(this,r),"showAd"===s&&_o.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=u.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 d={type:"gd-sdk",method:s,options:o};window.postMessage(d,location.origin)}}),!1)},WT=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){QT(e),t.apply(this,arguments)}}(e);var t=new PT(e);return KT(t),t},YT=function(){function e(){I.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:[]},Yv(this.moduleName,this.moduleConfig)}var t,n;return T.default(e,[{key:"load",value:(n=E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Xv(this.moduleName);case 3:this.module=e.sent,Ao("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=E.default(R.default.mark((function e(t){var n;return R.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}(),JT=function(){var e=E.default(R.default.mark((function e(){var t,n,r,i,s,o,u,d,c,l,h,f,p,m,g,v;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=function(){var e,t=(e=new R_).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 R_).get("partner.url.value");return new O.default(e,!0)},u=function(){var e="ae-soft-323";try{var t=o(),n=t.pathname,r=n.split("/"),a=r[r.length-1];bo("aeria-ylogin:loc",t,n,a),e=a}catch(e){yo("Error on getting aeria game id",e)}return e}(),d={action:"score",data:{gameId:u,score:100},env:r?"staging":"production",system:"Softgames"},c=function(){var e=window.parent||window,t=d;e.postMessage(t,"*")},l=new a.EventBus,e.next=13,fw();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=E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(new YT).runYMenu({gameId:u});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),g=jT(),v=g.whichFrame,"game-frame"===v()&&(f||m());case 21:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),XT=function(e){try{var t=J_(e);e.gameId||t.send("nogameid",{message:"".concat(fb.parentURL)})}catch(e){}},ZT=function(){var e=E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,JT();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)}}(),$T={create:function(){var e=E.default(R.default.mark((function e(t){var n,r;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,XT(t),hw(t),e.next=5,HT();case 5:return n=e.sent,e.next=8,ZT();case 8:if(window.isForwarderFrame=n,!n){e.next=15;break}return e.next=12,FT(t);case 12:e.t0=e.sent,e.next=16;break;case 15:e.t0=WT(t);case 16:return r=e.t0,_w(),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",WT(t));case 25:case"end":return e.stop()}}),e,null,[[0,21]])})));return function(t){return e.apply(this,arguments)}}()};function eI(){return(eI=E.default(R.default.mark((function e(t,n){var r;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,xw();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,aI(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 tI,nI,rI=!1;function aI(e){var t=this;return new Promise(function(n,r){var a=this;if(D.default(this,t),BT)return n(BT);if(rI)var i=setInterval(function(){D.default(this,a),BT&&(rI=!1,clearInterval(i),n(BT))}.bind(this),100);else rI=!0,$T.create(e).then(function(e){D.default(this,a),BT=e,e._sendSDKReady(),rI=!1,n(BT)}.bind(this))}.bind(this))}function iI(e){return aI(e),{invoke:function(t){return function(e,t){return eI.apply(this,arguments)}(e,t)}}}function sI(e,t){var n=this;return new Promise(function(r,i){var s,o=this;D.default(this,n);var u=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);oI({text:"sdk-wrapper-script-load"}),a.getScript(u[0],"gd-sdk-wrp",{alternates:u}).catch(function(e){D.default(this,o),oI({text:"sdk-wrapper load error",error:e.message}),this._sendSDKError(e),i(e)}.bind(this)).then(E.default(R.default.mark((function n(){var a,s;return R.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,oI({text:"sdk-wrapper load success"}),a=window.GDSDKWRP.GDSDKWRP,s=new a,oI({text:"sdk-wrapper before gdSdkWrp.init"}),n.next=7,s.init(e,t);case 7:nI=n.sent,oI({text:"sdk-wrapper after gdSdkWrp.init"}),r(nI),n.next=16;break;case 12:n.prev=12,n.t0=n.catch(0),oI({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 oI(e){try{var t={tp:"gd.wrp",args:e};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(d.Base64.encode(JSON.stringify(t))))),console.log(j.default(Object.values(e)))}catch(e){}}function uI(e){if(e){var t=e.name,n=e.message,r=e.status;try{oI({text:"samsung-wrp send-game-event",evt:e,hasOptions:!!tI}),tI&&tI.onEvent({name:t,message:n,status:r})}catch(t){oI({text:"samsung-wrp DEVELOPER-ERROR",evt:e,err:t})}}}function dI(e){return cI.apply(this,arguments)}function cI(){return(cI=E.default(R.default.mark((function e(t){var n,r,a,i,s,o,u,d,c;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return tI=t,hw(t),e.next=4,fw();case 4:if(i=e.sent,!nI){e.next=7;break}return e.abrupt("return",nI);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,u=null==i?void 0:i.gameId,d=null==i?void 0:i.title,hI("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,sI(c,{onEvent:uI,game:{gameId:u,title:d,version:o}});case 17:return nI=e.sent,e.abrupt("return",nI);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function lI(){return lI=E.default(R.default.mark((function e(t){var n,r,a;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t._get_developer_sets,hI("beforeGetDeveloperSettings"),r=n(),hI("afterGetDeveloperSettings"),e.prev=4,e.next=7,dI(r);case 7:a=e.sent,hI("after get SDK wrapper: ".concat(!!a)),a&&(hI("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),hI("Error on SDK wrapper init: ".concat(e.t0.message));case 16:case"end":return e.stop()}}),e,null,[[4,12]])}))),lI.apply(this,arguments)}function hI(e){window.sdkLog.push(e)}function fI(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":S.default(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===S.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}window.sdkLog=[],"img.samsungapps.com"===function(){var e,t,n=O.default(window.location.href,!0),r=n.host,a=n.query,i=r,s=null==a?void 0:a.gd_sdk_referrer_url;return s&&(s=s.startsWith("https://")||s.startsWith("http://")?s:"https://".concat(s),null!==(t=e=O.default(s,!0))&&void 0!==t&&t.host&&(i=e.host)),i}()?hI("skipped normal SDK init!"):(!function(){tS();var e=iI(fI());function t(){var t=this;this.AdType=a.AdType,this.preloadAd=function(){var t=E.default(R.default.mark((function t(n){var r,a=this;return R.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.invoke(function(e){return D.default(this,a),e.preloadAd(n)}.bind(this));case 2:return r=t.sent,bo("[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=E.default(R.default.mark((function t(n,r){var i,s=this;return R.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.invoke(function(e){var t=this;if(D.default(this,s),n===a.AdType.Display)return e.showDisplayAd(r);var i={};return function(){D.default(this,t),_o.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,bo("[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 D.default(this,t),e.cancelAd()}.bind(this))},this.openConsole=function(){var t=this;return e.invoke(function(e){return D.default(this,t),e.openConsole()}.bind(this))},this.getSession=function(){var t=this;return e.invoke(function(e){return D.default(this,t),e.session()}.bind(this))},this.sendEvent=function(t){var n=this;return e.invoke(function(e){return D.default(this,n),e.sendGenericEvent(t)}.bind(this))},this.leaderboard={show:function(){D.default(this,t),$v.showLeaderboard()}.bind(this),addScore:function(e){D.default(this,t),$v.addScore(e)}.bind(this)}}t.prototype=new function(){this.showBanner=function(){var t=this;return e.invoke(function(e){return D.default(this,t),e.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new t,window.gdApi=window.gdsdk}(),hI("afterSDKInit")),function(e){lI.apply(this,arguments)}({_get_developer_sets:fI});
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"),u=require("url-parse"),d=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"),g=require("@fnet/inter-service-js"),v=require("@babel/runtime/helpers/toConsumableArray"),A=require("can-autoplay"),b=require("is-plain-object"),y=require("querystringify"),_=require("lodash.merge"),w=require("uuid"),k=require("@flownet/lib-connect-to-tcf");function x(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var E=x(e),D=x(t),S=x(n),R=x(r),T=x(i),I=x(s),C=x(o),O=x(u),P=x(c),L=x(l),B=x(h),U=x(f),M=x(p),F=x(g),j=x(v),G=x(A),N=x(y),q=x(_),H=x(k),V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Q=function(e){return e&&e.Math==Math&&e},z=Q("object"==typeof globalThis&&globalThis)||Q("object"==typeof window&&window)||Q("object"==typeof self&&self)||Q("object"==typeof V&&V)||function(){return this}()||Function("return this")(),K={exports:{}},W=z,Y=Object.defineProperty,J=function(e,t){try{Y(W,e,{value:t,configurable:!0,writable:!0})}catch(n){W[e]=t}return t},X=J,Z="__core-js_shared__",$=z[Z]||X(Z,{}),ee=$;(K.exports=function(e,t){return ee[e]||(ee[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 te,ne,re=function(e){try{return!!e()}catch(e){return!0}},ae=!re((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),ie=ae,se=Function.prototype,oe=se.call,ue=ie&&se.bind.bind(oe,oe),de=ie?ue:function(e){return function(){return oe.apply(e,arguments)}},ce=function(e){return null==e},le=ce,he=TypeError,fe=function(e){if(le(e))throw he("Can't call method on "+e);return e},pe=fe,me=Object,ge=function(e){return me(pe(e))},ve=ge,Ae=de({}.hasOwnProperty),be=Object.hasOwn||function(e,t){return Ae(ve(e),t)},ye=de,_e=0,we=Math.random(),ke=ye(1..toString),xe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ke(++_e+we,36)},Ee="undefined"!=typeof navigator&&String(navigator.userAgent)||"",De=z,Se=Ee,Re=De.process,Te=De.Deno,Ie=Re&&Re.versions||Te&&Te.version,Ce=Ie&&Ie.v8;Ce&&(ne=(te=Ce.split("."))[0]>0&&te[0]<4?1:+(te[0]+te[1])),!ne&&Se&&(!(te=Se.match(/Edge\/(\d+)/))||te[1]>=74)&&(te=Se.match(/Chrome\/(\d+)/))&&(ne=+te[1]);var Oe=ne,Pe=Oe,Le=re,Be=!!Object.getOwnPropertySymbols&&!Le((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Pe&&Pe<41})),Ue=Be&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Me=z,Fe=K.exports,je=be,Ge=xe,Ne=Be,qe=Ue,He=Me.Symbol,Ve=Fe("wks"),Qe=qe?He.for||He:He&&He.withoutSetter||Ge,ze=function(e){return je(Ve,e)||(Ve[e]=Ne&&je(He,e)?He[e]:Qe("Symbol."+e)),Ve[e]},Ke={};Ke[ze("toStringTag")]="z";var We="[object z]"===String(Ke),Ye="object"==typeof document&&document.all,Je={all:Ye,IS_HTMLDDA:void 0===Ye&&void 0!==Ye},Xe=Je.all,Ze=Je.IS_HTMLDDA?function(e){return"function"==typeof e||e===Xe}:function(e){return"function"==typeof e},$e={},et=!re((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),tt=Ze,nt=Je.all,rt=Je.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:tt(e)||e===nt}:function(e){return"object"==typeof e?null!==e:tt(e)},at=rt,it=z.document,st=at(it)&&at(it.createElement),ot=function(e){return st?it.createElement(e):{}},ut=ot,dt=!et&&!re((function(){return 7!=Object.defineProperty(ut("div"),"a",{get:function(){return 7}}).a})),ct=et&&re((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),lt=rt,ht=String,ft=TypeError,pt=function(e){if(lt(e))return e;throw ft(ht(e)+" is not an object")},mt=ae,gt=Function.prototype.call,vt=mt?gt.bind(gt):function(){return gt.apply(gt,arguments)},At=z,bt=Ze,yt=function(e,t){return arguments.length<2?(n=At[e],bt(n)?n:void 0):At[e]&&At[e][t];var n},_t=de({}.isPrototypeOf),wt=yt,kt=Ze,xt=_t,Et=Object,Dt=Ue?function(e){return"symbol"==typeof e}:function(e){var t=wt("Symbol");return kt(t)&&xt(t.prototype,Et(e))},St=String,Rt=function(e){try{return St(e)}catch(e){return"Object"}},Tt=Ze,It=Rt,Ct=TypeError,Ot=function(e){if(Tt(e))return e;throw Ct(It(e)+" is not a function")},Pt=Ot,Lt=ce,Bt=function(e,t){var n=e[t];return Lt(n)?void 0:Pt(n)},Ut=vt,Mt=Ze,Ft=rt,jt=TypeError,Gt=vt,Nt=rt,qt=Dt,Ht=Bt,Vt=function(e,t){var n,r;if("string"===t&&Mt(n=e.toString)&&!Ft(r=Ut(n,e)))return r;if(Mt(n=e.valueOf)&&!Ft(r=Ut(n,e)))return r;if("string"!==t&&Mt(n=e.toString)&&!Ft(r=Ut(n,e)))return r;throw jt("Can't convert object to primitive value")},Qt=TypeError,zt=ze("toPrimitive"),Kt=function(e,t){if(!Nt(e)||qt(e))return e;var n,r=Ht(e,zt);if(r){if(void 0===t&&(t="default"),n=Gt(r,e,t),!Nt(n)||qt(n))return n;throw Qt("Can't convert object to primitive value")}return void 0===t&&(t="number"),Vt(e,t)},Wt=Dt,Yt=function(e){var t=Kt(e,"string");return Wt(t)?t:t+""},Jt=et,Xt=dt,Zt=ct,$t=pt,en=Yt,tn=TypeError,nn=Object.defineProperty,rn=Object.getOwnPropertyDescriptor,an="enumerable",sn="configurable",on="writable";$e.f=Jt?Zt?function(e,t,n){if($t(e),t=en(t),$t(n),"function"==typeof e&&"prototype"===t&&"value"in n&&on in n&&!n[on]){var r=rn(e,t);r&&r[on]&&(e[t]=n.value,n={configurable:sn in n?n[sn]:r[sn],enumerable:an in n?n[an]:r[an],writable:!1})}return nn(e,t,n)}:nn:function(e,t,n){if($t(e),t=en(t),$t(n),Xt)try{return nn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw tn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var un={exports:{}},dn=et,cn=be,ln=Function.prototype,hn=dn&&Object.getOwnPropertyDescriptor,fn=cn(ln,"name"),pn={EXISTS:fn,PROPER:fn&&"something"===function(){}.name,CONFIGURABLE:fn&&(!dn||dn&&hn(ln,"name").configurable)},mn=Ze,gn=$,vn=de(Function.toString);mn(gn.inspectSource)||(gn.inspectSource=function(e){return vn(e)});var An,bn,yn,_n=gn.inspectSource,wn=Ze,kn=z.WeakMap,xn=wn(kn)&&/native code/.test(String(kn)),En=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Dn=$e,Sn=En,Rn=et?function(e,t,n){return Dn.f(e,t,Sn(1,n))}:function(e,t,n){return e[t]=n,e},Tn=K.exports,In=xe,Cn=Tn("keys"),On=function(e){return Cn[e]||(Cn[e]=In(e))},Pn={},Ln=xn,Bn=z,Un=rt,Mn=Rn,Fn=be,jn=$,Gn=On,Nn=Pn,qn="Object already initialized",Hn=Bn.TypeError,Vn=Bn.WeakMap;if(Ln||jn.state){var Qn=jn.state||(jn.state=new Vn);Qn.get=Qn.get,Qn.has=Qn.has,Qn.set=Qn.set,An=function(e,t){if(Qn.has(e))throw Hn(qn);return t.facade=e,Qn.set(e,t),t},bn=function(e){return Qn.get(e)||{}},yn=function(e){return Qn.has(e)}}else{var zn=Gn("state");Nn[zn]=!0,An=function(e,t){if(Fn(e,zn))throw Hn(qn);return t.facade=e,Mn(e,zn,t),t},bn=function(e){return Fn(e,zn)?e[zn]:{}},yn=function(e){return Fn(e,zn)}}var Kn={set:An,get:bn,has:yn,enforce:function(e){return yn(e)?bn(e):An(e,{})},getterFor:function(e){return function(t){var n;if(!Un(t)||(n=bn(t)).type!==e)throw Hn("Incompatible receiver, "+e+" required");return n}}},Wn=de,Yn=re,Jn=Ze,Xn=be,Zn=et,$n=pn.CONFIGURABLE,er=_n,tr=Kn.enforce,nr=Kn.get,rr=String,ar=Object.defineProperty,ir=Wn("".slice),sr=Wn("".replace),or=Wn([].join),ur=Zn&&!Yn((function(){return 8!==ar((function(){}),"length",{value:8}).length})),dr=String(String).split("String"),cr=un.exports=function(e,t,n){"Symbol("===ir(rr(t),0,7)&&(t="["+sr(rr(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Xn(e,"name")||$n&&e.name!==t)&&(Zn?ar(e,"name",{value:t,configurable:!0}):e.name=t),ur&&n&&Xn(n,"arity")&&e.length!==n.arity&&ar(e,"length",{value:n.arity});try{n&&Xn(n,"constructor")&&n.constructor?Zn&&ar(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=tr(e);return Xn(r,"source")||(r.source=or(dr,"string"==typeof t?t:"")),e};Function.prototype.toString=cr((function(){return Jn(this)&&nr(this).source||er(this)}),"toString");var lr=Ze,hr=$e,fr=un.exports,pr=J,mr=function(e,t,n,r){r||(r={});var a=r.enumerable,i=void 0!==r.name?r.name:t;if(lr(n)&&fr(n,i,r),r.global)a?e[t]=n:pr(t,n);else{try{r.unsafe?e[t]&&(a=!0):delete e[t]}catch(e){}a?e[t]=n:hr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},gr=de,vr=gr({}.toString),Ar=gr("".slice),br=function(e){return Ar(vr(e),8,-1)},yr=We,_r=Ze,wr=br,kr=ze("toStringTag"),xr=Object,Er="Arguments"==wr(function(){return arguments}()),Dr=yr?wr: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=xr(e),kr))?n:Er?wr(t):"Object"==(r=wr(t))&&_r(t.callee)?"Arguments":r},Sr=Dr,Rr=We?{}.toString:function(){return"[object "+Sr(this)+"]"};We||mr(Object.prototype,"toString",Rr,{unsafe:!0});var Tr={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},Ir=ot("span").classList,Cr=Ir&&Ir.constructor&&Ir.constructor.prototype,Or=Cr===Object.prototype?void 0:Cr,Pr=br,Lr=de,Br=function(e){if("Function"===Pr(e))return Lr(e)},Ur=Ot,Mr=ae,Fr=Br(Br.bind),jr=function(e,t){return Ur(e),void 0===t?e:Mr?Fr(e,t):function(){return e.apply(t,arguments)}},Gr=re,Nr=br,qr=Object,Hr=de("".split),Vr=Gr((function(){return!qr("z").propertyIsEnumerable(0)}))?function(e){return"String"==Nr(e)?Hr(e,""):qr(e)}:qr,Qr=Math.ceil,zr=Math.floor,Kr=Math.trunc||function(e){var t=+e;return(t>0?zr:Qr)(t)},Wr=function(e){var t=+e;return t!=t||0===t?0:Kr(t)},Yr=Wr,Jr=Math.min,Xr=function(e){return e>0?Jr(Yr(e),9007199254740991):0},Zr=Xr,$r=function(e){return Zr(e.length)},ea=br,ta=Array.isArray||function(e){return"Array"==ea(e)},na=de,ra=re,aa=Ze,ia=Dr,sa=_n,oa=function(){},ua=[],da=yt("Reflect","construct"),ca=/^\s*(?:class|function)\b/,la=na(ca.exec),ha=!ca.exec(oa),fa=function(e){if(!aa(e))return!1;try{return da(oa,ua,e),!0}catch(e){return!1}},pa=function(e){if(!aa(e))return!1;switch(ia(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return ha||!!la(ca,sa(e))}catch(e){return!0}};pa.sham=!0;var ma=!da||ra((function(){var e;return fa(fa.call)||!fa(Object)||!fa((function(){e=!0}))||e}))?pa:fa,ga=ta,va=ma,Aa=rt,ba=ze("species"),ya=Array,_a=function(e){var t;return ga(e)&&(t=e.constructor,(va(t)&&(t===ya||ga(t.prototype))||Aa(t)&&null===(t=t[ba]))&&(t=void 0)),void 0===t?ya:t},wa=function(e,t){return new(_a(e))(0===t?0:t)},ka=jr,xa=Vr,Ea=ge,Da=$r,Sa=wa,Ra=de([].push),Ta=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(u,d,c,l){for(var h,f,p=Ea(u),m=xa(p),g=ka(d,c),v=Da(m),A=0,b=l||Sa,y=t?b(u,v):n||s?b(u,0):void 0;v>A;A++)if((o||A in m)&&(f=g(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:Ra(y,h)}else switch(e){case 4:return!1;case 7:Ra(y,h)}return i?-1:r||a?a:y}},Ia={forEach:Ta(0),map:Ta(1),filter:Ta(2),some:Ta(3),every:Ta(4),find:Ta(5),findIndex:Ta(6),filterReject:Ta(7)},Ca=re,Oa=function(e,t){var n=[][e];return!!n&&Ca((function(){n.call(null,t||function(){return 1},1)}))},Pa=Ia.forEach,La=z,Ba=Tr,Ua=Or,Ma=Oa("forEach")?[].forEach:function(e){return Pa(this,e,arguments.length>1?arguments[1]:void 0)},Fa=Rn,ja=function(e){if(e&&e.forEach!==Ma)try{Fa(e,"forEach",Ma)}catch(t){e.forEach=Ma}};for(var Ga in Ba)Ba[Ga]&&ja(La[Ga]&&La[Ga].prototype);ja(Ua);var Na={},qa={},Ha={}.propertyIsEnumerable,Va=Object.getOwnPropertyDescriptor,Qa=Va&&!Ha.call({1:2},1);qa.f=Qa?function(e){var t=Va(this,e);return!!t&&t.enumerable}:Ha;var za=Vr,Ka=fe,Wa=function(e){return za(Ka(e))},Ya=et,Ja=vt,Xa=qa,Za=En,$a=Wa,ei=Yt,ti=be,ni=dt,ri=Object.getOwnPropertyDescriptor;Na.f=Ya?ri:function(e,t){if(e=$a(e),t=ei(t),ni)try{return ri(e,t)}catch(e){}if(ti(e,t))return Za(!Ja(Xa.f,e,t),e[t])};var ai={},ii=Wr,si=Math.max,oi=Math.min,ui=function(e,t){var n=ii(e);return n<0?si(n+t,0):oi(n,t)},di=Wa,ci=ui,li=$r,hi=function(e){return function(t,n,r){var a,i=di(t),s=li(i),o=ci(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}},fi={includes:hi(!0),indexOf:hi(!1)},pi=be,mi=Wa,gi=fi.indexOf,vi=Pn,Ai=de([].push),bi=function(e,t){var n,r=mi(e),a=0,i=[];for(n in r)!pi(vi,n)&&pi(r,n)&&Ai(i,n);for(;t.length>a;)pi(r,n=t[a++])&&(~gi(i,n)||Ai(i,n));return i},yi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],_i=bi,wi=yi.concat("length","prototype");ai.f=Object.getOwnPropertyNames||function(e){return _i(e,wi)};var ki={};ki.f=Object.getOwnPropertySymbols;var xi=yt,Ei=ai,Di=ki,Si=pt,Ri=de([].concat),Ti=xi("Reflect","ownKeys")||function(e){var t=Ei.f(Si(e)),n=Di.f;return n?Ri(t,n(e)):t},Ii=be,Ci=Ti,Oi=Na,Pi=$e,Li=function(e,t,n){for(var r=Ci(t),a=Pi.f,i=Oi.f,s=0;s<r.length;s++){var o=r[s];Ii(e,o)||n&&Ii(n,o)||a(e,o,i(t,o))}},Bi=re,Ui=Ze,Mi=/#|\.prototype\./,Fi=function(e,t){var n=Gi[ji(e)];return n==qi||n!=Ni&&(Ui(t)?Bi(t):!!t)},ji=Fi.normalize=function(e){return String(e).replace(Mi,".").toLowerCase()},Gi=Fi.data={},Ni=Fi.NATIVE="N",qi=Fi.POLYFILL="P",Hi=Fi,Vi=z,Qi=Na.f,zi=Rn,Ki=mr,Wi=J,Yi=Li,Ji=Hi,Xi=function(e,t){var n,r,a,i,s,o=e.target,u=e.global,d=e.stat;if(n=u?Vi:d?Vi[o]||Wi(o,{}):(Vi[o]||{}).prototype)for(r in t){if(i=t[r],a=e.dontCallGetSet?(s=Qi(n,r))&&s.value:n[r],!Ji(u?r:o+(d?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;Yi(i,a)}(e.sham||a&&a.sham)&&zi(i,"sham",!0),Ki(n,r,i,e)}},Zi=bi,$i=yi,es=Object.keys||function(e){return Zi(e,$i)},ts=ge,ns=es;Xi({target:"Object",stat:!0,forced:re((function(){ns(1)}))},{keys:function(e){return ns(ts(e))}});var rs=Dr,as=String,is=function(e){if("Symbol"===rs(e))throw TypeError("Cannot convert a Symbol value to a string");return as(e)},ss=pt,os=function(){var e=ss(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},us=re,ds=z.RegExp,cs=us((function(){var e=ds("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),ls=cs||us((function(){return!ds("a","y").sticky})),hs={BROKEN_CARET:cs||us((function(){var e=ds("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:ls,UNSUPPORTED_Y:cs},fs={},ps=et,ms=ct,gs=$e,vs=pt,As=Wa,bs=es;fs.f=ps&&!ms?Object.defineProperties:function(e,t){vs(e);for(var n,r=As(t),a=bs(t),i=a.length,s=0;i>s;)gs.f(e,n=a[s++],r[n]);return e};var ys,_s=yt("document","documentElement"),ws=pt,ks=fs,xs=yi,Es=Pn,Ds=_s,Ss=ot,Rs="prototype",Ts="script",Is=On("IE_PROTO"),Cs=function(){},Os=function(e){return"<"+Ts+">"+e+"</"+Ts+">"},Ps=function(e){e.write(Os("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ls=function(){try{ys=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Ls="undefined"!=typeof document?document.domain&&ys?Ps(ys):(t=Ss("iframe"),n="java"+Ts+":",t.style.display="none",Ds.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Os("document.F=Object")),e.close(),e.F):Ps(ys);for(var r=xs.length;r--;)delete Ls[Rs][xs[r]];return Ls()};Es[Is]=!0;var Bs=Object.create||function(e,t){var n;return null!==e?(Cs[Rs]=ws(e),n=new Cs,Cs[Rs]=null,n[Is]=e):n=Ls(),void 0===t?n:ks.f(n,t)},Us=re,Ms=z.RegExp,Fs=Us((function(){var e=Ms(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),js=re,Gs=z.RegExp,Ns=js((function(){var e=Gs("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Hs=vt,Vs=de,Qs=is,zs=os,Ks=hs,Ws=K.exports,Ys=Bs,Js=Kn.get,Xs=Fs,Zs=Ns,$s=Ws("native-string-replace",String.prototype.replace),eo=RegExp.prototype.exec,to=eo,no=Vs("".charAt),ro=Vs("".indexOf),ao=Vs("".replace),so=Vs("".slice),oo=function(){var e=/a/,t=/b*/g;return Hs(eo,e,"a"),Hs(eo,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),uo=Ks.BROKEN_CARET,co=void 0!==/()??/.exec("")[1];(oo||co||uo||Xs||Zs)&&(to=function(e){var t,n,r,a,i,s,o,u=this,d=Js(u),c=Qs(e),l=d.raw;if(l)return l.lastIndex=u.lastIndex,t=Hs(to,l,c),u.lastIndex=l.lastIndex,t;var h=d.groups,f=uo&&u.sticky,p=Hs(zs,u),m=u.source,g=0,v=c;if(f&&(p=ao(p,"y",""),-1===ro(p,"g")&&(p+="g"),v=so(c,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==no(c,u.lastIndex-1))&&(m="(?: "+m+")",v=" "+v,g++),n=new RegExp("^(?:"+m+")",p)),co&&(n=new RegExp("^"+m+"$(?!\\s)",p)),oo&&(r=u.lastIndex),a=Hs(eo,f?n:u,v),f?a?(a.input=so(a.input,g),a[0]=so(a[0],g),a.index=u.lastIndex,u.lastIndex+=a[0].length):u.lastIndex=0:oo&&a&&(u.lastIndex=u.global?a.index+a[0].length:r),co&&a&&a.length>1&&Hs($s,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=Ys(null),i=0;i<h.length;i++)s[(o=h[i])[0]]=a[o[1]];return a});var lo=to;Xi({target:"RegExp",proto:!0,forced:/./.exec!==lo},{exec:lo});var ho=Array.isArray,fo=Object.prototype.toString,po=ho||function(e){return!!e&&"[object Array]"==fo.call(e)},mo={name:"@bygd/gd-sdk-pes",version:"1.43.6",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"}},go=function(e){var t=vo("object"===S.default(e)?e:a.parseJSON(e));return t&&t.version?mo.version>=t.version?t:void 0:t},vo=function(e){var t=this;if(!po(e)||0===e.length)return e;if(1===e.length)return e[0];var n=0;e.forEach(function(e){D.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 Ao=function(){},bo=function(){var e;(e=console).log.apply(e,arguments)},yo=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 _o={},wo={},ko=Yt,xo=$e,Eo=En,Do=function(e,t,n){var r=ko(t);r in e?xo.f(e,r,Eo(0,n)):e[r]=n},So=ui,Ro=$r,To=Do,Io=Array,Co=Math.max,Oo=function(e,t,n){for(var r=Ro(e),a=So(t,r),i=So(void 0===n?r:n,r),s=Io(Co(i-a,0)),o=0;a<i;a++,o++)To(s,o,e[a]);return s.length=o,s},Po=br,Lo=Wa,Bo=ai.f,Uo=Oo,Mo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];wo.f=function(e){return Mo&&"Window"==Po(e)?function(e){try{return Bo(e)}catch(e){return Uo(Mo)}}(e):Bo(Lo(e))};var Fo=un.exports,jo=$e,Go=function(e,t,n){return n.get&&Fo(n.get,t,{getter:!0}),n.set&&Fo(n.set,t,{setter:!0}),jo.f(e,t,n)},No={},qo=ze;No.f=qo;var Ho=z,Vo=be,Qo=No,zo=$e.f,Ko=function(e){var t=Ho.Symbol||(Ho.Symbol={});Vo(t,e)||zo(t,e,{value:Qo.f(e)})},Wo=vt,Yo=yt,Jo=ze,Xo=mr,Zo=$e.f,$o=be,eu=ze("toStringTag"),tu=function(e,t,n){e&&!n&&(e=e.prototype),e&&!$o(e,eu)&&Zo(e,eu,{configurable:!0,value:t})},nu=Xi,ru=z,au=vt,iu=de,su=et,ou=Be,uu=re,du=be,cu=_t,lu=pt,hu=Wa,fu=Yt,pu=is,mu=En,gu=Bs,vu=es,Au=ai,bu=wo,yu=ki,_u=Na,wu=$e,ku=fs,xu=qa,Eu=mr,Du=Go,Su=K.exports,Ru=Pn,Tu=xe,Iu=ze,Cu=No,Ou=Ko,Pu=function(){var e=Yo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=Jo("toPrimitive");t&&!t[r]&&Xo(t,r,(function(e){return Wo(n,this)}),{arity:1})},Lu=tu,Bu=Kn,Uu=Ia.forEach,Mu=On("hidden"),Fu="Symbol",ju="prototype",Gu=Bu.set,Nu=Bu.getterFor(Fu),qu=Object[ju],Hu=ru.Symbol,Vu=Hu&&Hu[ju],Qu=ru.TypeError,zu=ru.QObject,Ku=_u.f,Wu=wu.f,Yu=bu.f,Ju=xu.f,Xu=iu([].push),Zu=Su("symbols"),$u=Su("op-symbols"),ed=Su("wks"),td=!zu||!zu[ju]||!zu[ju].findChild,nd=su&&uu((function(){return 7!=gu(Wu({},"a",{get:function(){return Wu(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Ku(qu,t);r&&delete qu[t],Wu(e,t,n),r&&e!==qu&&Wu(qu,t,r)}:Wu,rd=function(e,t){var n=Zu[e]=gu(Vu);return Gu(n,{type:Fu,tag:e,description:t}),su||(n.description=t),n},ad=function(e,t,n){e===qu&&ad($u,t,n),lu(e);var r=fu(t);return lu(n),du(Zu,r)?(n.enumerable?(du(e,Mu)&&e[Mu][r]&&(e[Mu][r]=!1),n=gu(n,{enumerable:mu(0,!1)})):(du(e,Mu)||Wu(e,Mu,mu(1,{})),e[Mu][r]=!0),nd(e,r,n)):Wu(e,r,n)},id=function(e,t){lu(e);var n=hu(t),r=vu(n).concat(dd(n));return Uu(r,(function(t){su&&!au(sd,n,t)||ad(e,t,n[t])})),e},sd=function(e){var t=fu(e),n=au(Ju,this,t);return!(this===qu&&du(Zu,t)&&!du($u,t))&&(!(n||!du(this,t)||!du(Zu,t)||du(this,Mu)&&this[Mu][t])||n)},od=function(e,t){var n=hu(e),r=fu(t);if(n!==qu||!du(Zu,r)||du($u,r)){var a=Ku(n,r);return!a||!du(Zu,r)||du(n,Mu)&&n[Mu][r]||(a.enumerable=!0),a}},ud=function(e){var t=Yu(hu(e)),n=[];return Uu(t,(function(e){du(Zu,e)||du(Ru,e)||Xu(n,e)})),n},dd=function(e){var t=e===qu,n=Yu(t?$u:hu(e)),r=[];return Uu(n,(function(e){!du(Zu,e)||t&&!du(qu,e)||Xu(r,Zu[e])})),r};ou||(Eu(Vu=(Hu=function(){if(cu(Vu,this))throw Qu("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?pu(arguments[0]):void 0,t=Tu(e),n=function(e){this===qu&&au(n,$u,e),du(this,Mu)&&du(this[Mu],t)&&(this[Mu][t]=!1),nd(this,t,mu(1,e))};return su&&td&&nd(qu,t,{configurable:!0,set:n}),rd(t,e)})[ju],"toString",(function(){return Nu(this).tag})),Eu(Hu,"withoutSetter",(function(e){return rd(Tu(e),e)})),xu.f=sd,wu.f=ad,ku.f=id,_u.f=od,Au.f=bu.f=ud,yu.f=dd,Cu.f=function(e){return rd(Iu(e),e)},su&&(Du(Vu,"description",{configurable:!0,get:function(){return Nu(this).description}}),Eu(qu,"propertyIsEnumerable",sd,{unsafe:!0}))),nu({global:!0,constructor:!0,wrap:!0,forced:!ou,sham:!ou},{Symbol:Hu}),Uu(vu(ed),(function(e){Ou(e)})),nu({target:Fu,stat:!0,forced:!ou},{useSetter:function(){td=!0},useSimple:function(){td=!1}}),nu({target:"Object",stat:!0,forced:!ou,sham:!su},{create:function(e,t){return void 0===t?gu(e):id(gu(e),t)},defineProperty:ad,defineProperties:id,getOwnPropertyDescriptor:od}),nu({target:"Object",stat:!0,forced:!ou},{getOwnPropertyNames:ud}),Pu(),Lu(Hu,Fu),Ru[Mu]=!0;var cd=Be&&!!Symbol.for&&!!Symbol.keyFor,ld=Xi,hd=yt,fd=be,pd=is,md=K.exports,gd=cd,vd=md("string-to-symbol-registry"),Ad=md("symbol-to-string-registry");ld({target:"Symbol",stat:!0,forced:!gd},{for:function(e){var t=pd(e);if(fd(vd,t))return vd[t];var n=hd("Symbol")(t);return vd[t]=n,Ad[n]=t,n}});var bd=Xi,yd=be,_d=Dt,wd=Rt,kd=cd,xd=(0,K.exports)("symbol-to-string-registry");bd({target:"Symbol",stat:!0,forced:!kd},{keyFor:function(e){if(!_d(e))throw TypeError(wd(e)+" is not a symbol");if(yd(xd,e))return xd[e]}});var Ed=ae,Dd=Function.prototype,Sd=Dd.apply,Rd=Dd.call,Td="object"==typeof Reflect&&Reflect.apply||(Ed?Rd.bind(Sd):function(){return Rd.apply(Sd,arguments)}),Id=de([].slice),Cd=ta,Od=Ze,Pd=br,Ld=is,Bd=de([].push),Ud=Xi,Md=yt,Fd=Td,jd=vt,Gd=de,Nd=re,qd=Ze,Hd=Dt,Vd=Id,Qd=function(e){if(Od(e))return e;if(Cd(e)){for(var t=e.length,n=[],r=0;r<t;r++){var a=e[r];"string"==typeof a?Bd(n,a):"number"!=typeof a&&"Number"!=Pd(a)&&"String"!=Pd(a)||Bd(n,Ld(a))}var i=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if(Cd(this))return t;for(var r=0;r<i;r++)if(n[r]===e)return t}}},zd=Be,Kd=String,Wd=Md("JSON","stringify"),Yd=Gd(/./.exec),Jd=Gd("".charAt),Xd=Gd("".charCodeAt),Zd=Gd("".replace),$d=Gd(1..toString),ec=/[\uD800-\uDFFF]/g,tc=/^[\uD800-\uDBFF]$/,nc=/^[\uDC00-\uDFFF]$/,rc=!zd||Nd((function(){var e=Md("Symbol")();return"[null]"!=Wd([e])||"{}"!=Wd({a:e})||"{}"!=Wd(Object(e))})),ac=Nd((function(){return'"\\udf06\\ud834"'!==Wd("\udf06\ud834")||'"\\udead"'!==Wd("\udead")})),ic=function(e,t){var n=Vd(arguments),r=Qd(t);if(qd(r)||void 0!==e&&!Hd(e))return n[1]=function(e,t){if(qd(r)&&(t=jd(r,this,Kd(e),t)),!Hd(t))return t},Fd(Wd,null,n)},sc=function(e,t,n){var r=Jd(n,t-1),a=Jd(n,t+1);return Yd(tc,e)&&!Yd(nc,a)||Yd(nc,e)&&!Yd(tc,r)?"\\u"+$d(Xd(e,0),16):e};Wd&&Ud({target:"JSON",stat:!0,arity:3,forced:rc||ac},{stringify:function(e,t,n){var r=Vd(arguments),a=Fd(rc?ic:Wd,null,r);return ac&&"string"==typeof a?Zd(a,ec,sc):a}});var oc=ki,uc=ge;Xi({target:"Object",stat:!0,forced:!Be||re((function(){oc.f(1)}))},{getOwnPropertySymbols:function(e){var t=oc.f;return t?t(uc(e)):[]}});var dc=re,cc=Oe,lc=ze("species"),hc=function(e){return cc>=51||!dc((function(){var t=[];return(t.constructor={})[lc]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},fc=Ia.filter;Xi({target:"Array",proto:!0,forced:!hc("filter")},{filter:function(e){return fc(this,e,arguments.length>1?arguments[1]:void 0)}});var pc=Xi,mc=re,gc=Wa,vc=Na.f,Ac=et;pc({target:"Object",stat:!0,forced:!Ac||mc((function(){vc(1)})),sham:!Ac},{getOwnPropertyDescriptor:function(e,t){return vc(gc(e),t)}});var bc=Ti,yc=Wa,_c=Na,wc=Do;Xi({target:"Object",stat:!0,sham:!et},{getOwnPropertyDescriptors:function(e){for(var t,n,r=yc(e),a=_c.f,i=bc(r),s={},o=0;i.length>o;)void 0!==(n=a(r,t=i[o++]))&&wc(s,t,n);return s}});var kc=Xi,xc=ta,Ec=ma,Dc=rt,Sc=ui,Rc=$r,Tc=Wa,Ic=Do,Cc=ze,Oc=Id,Pc=hc("slice"),Lc=Cc("species"),Bc=Array,Uc=Math.max;kc({target:"Array",proto:!0,forced:!Pc},{slice:function(e,t){var n,r,a,i=Tc(this),s=Rc(i),o=Sc(e,s),u=Sc(void 0===t?s:t,s);if(xc(i)&&(n=i.constructor,(Ec(n)&&(n===Bc||xc(n.prototype))||Dc(n)&&null===(n=n[Lc]))&&(n=void 0),n===Bc||void 0===n))return Oc(i,o,u);for(r=new(void 0===n?Bc:n)(Uc(u-o,0)),a=0;o<u;o++,a++)o in i&&Ic(r,a,i[o]);return r.length=a,r}});var Mc=vt,Fc=pt,jc=Bt,Gc=function(e,t,n){var r,a;Fc(e);try{if(!(r=jc(e,"return"))){if("throw"===t)throw n;return n}r=Mc(r,e)}catch(e){a=!0,r=e}if("throw"===t)throw n;if(a)throw r;return Fc(r),n},Nc=pt,qc=Gc,Hc={},Vc=Hc,Qc=ze("iterator"),zc=Array.prototype,Kc=function(e){return void 0!==e&&(Vc.Array===e||zc[Qc]===e)},Wc=Dr,Yc=Bt,Jc=ce,Xc=Hc,Zc=ze("iterator"),$c=function(e){if(!Jc(e))return Yc(e,Zc)||Yc(e,"@@iterator")||Xc[Wc(e)]},el=vt,tl=Ot,nl=pt,rl=Rt,al=$c,il=TypeError,sl=function(e,t){var n=arguments.length<2?al(e):t;if(tl(n))return nl(el(n,e));throw il(rl(e)+" is not iterable")},ol=jr,ul=vt,dl=ge,cl=function(e,t,n,r){try{return r?t(Nc(n)[0],n[1]):t(n)}catch(t){qc(e,"throw",t)}},ll=Kc,hl=ma,fl=$r,pl=Do,ml=sl,gl=$c,vl=Array,Al=function(e){var t=dl(e),n=hl(this),r=arguments.length,a=r>1?arguments[1]:void 0,i=void 0!==a;i&&(a=ol(a,r>2?arguments[2]:void 0));var s,o,u,d,c,l,h=gl(t),f=0;if(!h||this===vl&&ll(h))for(s=fl(t),o=n?new this(s):vl(s);s>f;f++)l=i?a(t[f],f):t[f],pl(o,f,l);else for(c=(d=ml(t,h)).next,o=n?new this:[];!(u=ul(c,d)).done;f++)l=i?cl(d,a,[u.value,f],!0):u.value,pl(o,f,l);return o.length=f,o},bl=ze("iterator"),yl=!1;try{var _l=0,wl={next:function(){return{done:!!_l++}},return:function(){yl=!0}};wl[bl]=function(){return this},Array.from(wl,(function(){throw 2}))}catch(e){}var kl=function(e,t){if(!t&&!yl)return!1;var n=!1;try{var r={};r[bl]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},xl=Al;Xi({target:"Array",stat:!0,forced:!kl((function(e){Array.from(e)}))},{from:xl});var El,Dl,Sl,Rl=de,Tl=Wr,Il=is,Cl=fe,Ol=Rl("".charAt),Pl=Rl("".charCodeAt),Ll=Rl("".slice),Bl=function(e){return function(t,n){var r,a,i=Il(Cl(t)),s=Tl(n),o=i.length;return s<0||s>=o?e?"":void 0:(r=Pl(i,s))<55296||r>56319||s+1===o||(a=Pl(i,s+1))<56320||a>57343?e?Ol(i,s):r:e?Ll(i,s,s+2):a-56320+(r-55296<<10)+65536}},Ul={codeAt:Bl(!1),charAt:Bl(!0)},Ml=!re((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Fl=be,jl=Ze,Gl=ge,Nl=Ml,ql=On("IE_PROTO"),Hl=Object,Vl=Hl.prototype,Ql=Nl?Hl.getPrototypeOf:function(e){var t=Gl(e);if(Fl(t,ql))return t[ql];var n=t.constructor;return jl(n)&&t instanceof n?n.prototype:t instanceof Hl?Vl:null},zl=re,Kl=Ze,Wl=rt,Yl=Ql,Jl=mr,Xl=ze("iterator"),Zl=!1;[].keys&&("next"in(Sl=[].keys())?(Dl=Yl(Yl(Sl)))!==Object.prototype&&(El=Dl):Zl=!0);var $l=!Wl(El)||zl((function(){var e={};return El[Xl].call(e)!==e}));$l&&(El={}),Kl(El[Xl])||Jl(El,Xl,(function(){return this}));var eh={IteratorPrototype:El,BUGGY_SAFARI_ITERATORS:Zl},th=eh.IteratorPrototype,nh=Bs,rh=En,ah=tu,ih=Hc,sh=function(){return this},oh=function(e,t,n,r){var a=t+" Iterator";return e.prototype=nh(th,{next:rh(+!r,n)}),ah(e,a,!1),ih[a]=sh,e},uh=de,dh=Ot,ch=Ze,lh=String,hh=TypeError,fh=function(e,t,n){try{return uh(dh(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},ph=pt,mh=function(e){if("object"==typeof e||ch(e))return e;throw hh("Can't set "+lh(e)+" as a prototype")},gh=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=fh(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return ph(n),mh(r),t?e(n,r):n.__proto__=r,n}}():void 0),vh=Xi,Ah=vt,bh=Ze,yh=oh,_h=Ql,wh=gh,kh=tu,xh=Rn,Eh=mr,Dh=Hc,Sh=pn.PROPER,Rh=pn.CONFIGURABLE,Th=eh.IteratorPrototype,Ih=eh.BUGGY_SAFARI_ITERATORS,Ch=ze("iterator"),Oh="keys",Ph="values",Lh="entries",Bh=function(){return this},Uh=function(e,t,n,r,a,i,s){yh(n,t,r);var o,u,d,c=function(e){if(e===a&&m)return m;if(!Ih&&e in f)return f[e];switch(e){case Oh:case Ph:case Lh:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,f=e.prototype,p=f[Ch]||f["@@iterator"]||a&&f[a],m=!Ih&&p||c(a),g="Array"==t&&f.entries||p;if(g&&(o=_h(g.call(new e)))!==Object.prototype&&o.next&&(_h(o)!==Th&&(wh?wh(o,Th):bh(o[Ch])||Eh(o,Ch,Bh)),kh(o,l,!0)),Sh&&a==Ph&&p&&p.name!==Ph&&(Rh?xh(f,"name",Ph):(h=!0,m=function(){return Ah(p,this)})),a)if(u={values:c(Ph),keys:i?m:c(Oh),entries:c(Lh)},s)for(d in u)(Ih||h||!(d in f))&&Eh(f,d,u[d]);else vh({target:t,proto:!0,forced:Ih||h},u);return f[Ch]!==m&&Eh(f,Ch,m,{name:a}),Dh[t]=m,u},Mh=function(e,t){return{value:e,done:t}},Fh=Ul.charAt,jh=is,Gh=Kn,Nh=Uh,qh=Mh,Hh="String Iterator",Vh=Gh.set,Qh=Gh.getterFor(Hh);Nh(String,"String",(function(e){Vh(this,{type:Hh,string:jh(e),index:0})}),(function(){var e,t=Qh(this),n=t.string,r=t.index;return r>=n.length?qh(void 0,!0):(e=Fh(n,r),t.index+=e.length,qh(e,!1))}));var zh=Xi,Kh=et,Wh=de,Yh=be,Jh=Ze,Xh=_t,Zh=is,$h=Go,ef=Li,tf=z.Symbol,nf=tf&&tf.prototype;if(Kh&&Jh(tf)&&(!("description"in nf)||void 0!==tf().description)){var rf={},af=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Zh(arguments[0]),t=Xh(nf,this)?new tf(e):void 0===e?tf():tf(e);return""===e&&(rf[t]=!0),t};ef(af,tf),af.prototype=nf,nf.constructor=af;var sf="Symbol(test)"==String(tf("test")),of=Wh(nf.valueOf),uf=Wh(nf.toString),df=/^Symbol\((.*)\)[^)]+$/,cf=Wh("".replace),lf=Wh("".slice);$h(nf,"description",{configurable:!0,get:function(){var e=of(this);if(Yh(rf,e))return"";var t=uf(e),n=sf?lf(t,7,-1):cf(t,df,"$1");return""===n?void 0:n}}),zh({global:!0,constructor:!0,forced:!0},{Symbol:af})}Ko("iterator");var hf=ze,ff=Bs,pf=$e.f,mf=hf("unscopables"),gf=Array.prototype;null==gf[mf]&&pf(gf,mf,{configurable:!0,value:ff(null)});var vf=function(e){gf[mf][e]=!0},Af=Wa,bf=vf,yf=Hc,_f=Kn,wf=$e.f,kf=Uh,xf=Mh,Ef=et,Df="Array Iterator",Sf=_f.set,Rf=_f.getterFor(Df),Tf=kf(Array,"Array",(function(e,t){Sf(this,{type:Df,target:Af(e),index:0,kind:t})}),(function(){var e=Rf(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,xf(void 0,!0)):xf("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),If=yf.Arguments=yf.Array;if(bf("keys"),bf("values"),bf("entries"),Ef&&"values"!==If.name)try{wf(If,"name",{value:"values"})}catch(e){}var Cf=z,Of=Tr,Pf=Or,Lf=Tf,Bf=Rn,Uf=ze,Mf=Uf("iterator"),Ff=Uf("toStringTag"),jf=Lf.values,Gf=function(e,t){if(e){if(e[Mf]!==jf)try{Bf(e,Mf,jf)}catch(t){e[Mf]=jf}if(e[Ff]||Bf(e,Ff,t),Of[t])for(var n in Lf)if(e[n]!==Lf[n])try{Bf(e,n,Lf[n])}catch(t){e[n]=Lf[n]}}};for(var Nf in Of)Gf(Cf[Nf]&&Cf[Nf].prototype,Nf);Gf(Pf,"DOMTokenList");var qf,Hf,Vf,Qf,zf="undefined"!=typeof process&&"process"==br(process),Kf=yt,Wf=Go,Yf=et,Jf=ze("species"),Xf=function(e){var t=Kf(e);Yf&&t&&!t[Jf]&&Wf(t,Jf,{configurable:!0,get:function(){return this}})},Zf=_t,$f=TypeError,ep=function(e,t){if(Zf(t,e))return e;throw $f("Incorrect invocation")},tp=ma,np=Rt,rp=TypeError,ap=pt,ip=function(e){if(tp(e))return e;throw rp(np(e)+" is not a constructor")},sp=ce,op=ze("species"),up=function(e,t){var n,r=ap(e).constructor;return void 0===r||sp(n=ap(r)[op])?t:ip(n)},dp=TypeError,cp=function(e,t){if(e<t)throw dp("Not enough arguments");return e},lp=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ee),hp=z,fp=Td,pp=jr,mp=Ze,gp=be,vp=re,Ap=_s,bp=Id,yp=ot,_p=cp,wp=lp,kp=zf,xp=hp.setImmediate,Ep=hp.clearImmediate,Dp=hp.process,Sp=hp.Dispatch,Rp=hp.Function,Tp=hp.MessageChannel,Ip=hp.String,Cp=0,Op={},Pp="onreadystatechange";vp((function(){qf=hp.location}));var Lp=function(e){if(gp(Op,e)){var t=Op[e];delete Op[e],t()}},Bp=function(e){return function(){Lp(e)}},Up=function(e){Lp(e.data)},Mp=function(e){hp.postMessage(Ip(e),qf.protocol+"//"+qf.host)};xp&&Ep||(xp=function(e){_p(arguments.length,1);var t=mp(e)?e:Rp(e),n=bp(arguments,1);return Op[++Cp]=function(){fp(t,void 0,n)},Hf(Cp),Cp},Ep=function(e){delete Op[e]},kp?Hf=function(e){Dp.nextTick(Bp(e))}:Sp&&Sp.now?Hf=function(e){Sp.now(Bp(e))}:Tp&&!wp?(Qf=(Vf=new Tp).port2,Vf.port1.onmessage=Up,Hf=pp(Qf.postMessage,Qf)):hp.addEventListener&&mp(hp.postMessage)&&!hp.importScripts&&qf&&"file:"!==qf.protocol&&!vp(Mp)?(Hf=Mp,hp.addEventListener("message",Up,!1)):Hf=Pp in yp("script")?function(e){Ap.appendChild(yp("script"))[Pp]=function(){Ap.removeChild(this),Lp(e)}}:function(e){setTimeout(Bp(e),0)});var Fp={set:xp,clear:Ep},jp=function(){this.head=null,this.tail=null};jp.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 Gp,Np,qp,Hp,Vp,Qp=jp,zp=/ipad|iphone|ipod/i.test(Ee)&&"undefined"!=typeof Pebble,Kp=/web0s(?!.*chrome)/i.test(Ee),Wp=z,Yp=jr,Jp=Na.f,Xp=Fp.set,Zp=Qp,$p=lp,em=zp,tm=Kp,nm=zf,rm=Wp.MutationObserver||Wp.WebKitMutationObserver,am=Wp.document,im=Wp.process,sm=Wp.Promise,om=Jp(Wp,"queueMicrotask"),um=om&&om.value;if(!um){var dm=new Zp,cm=function(){var e,t;for(nm&&(e=im.domain)&&e.exit();t=dm.get();)try{t()}catch(e){throw dm.head&&Gp(),e}e&&e.enter()};$p||nm||tm||!rm||!am?!em&&sm&&sm.resolve?((Hp=sm.resolve(void 0)).constructor=sm,Vp=Yp(Hp.then,Hp),Gp=function(){Vp(cm)}):nm?Gp=function(){im.nextTick(cm)}:(Xp=Yp(Xp,Wp),Gp=function(){Xp(cm)}):(Np=!0,qp=am.createTextNode(""),new rm(cm).observe(qp,{characterData:!0}),Gp=function(){qp.data=Np=!Np}),um=function(e){dm.head||Gp(),dm.add(e)}}var lm=um,hm=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},fm=z.Promise,pm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,mm=!pm&&!zf&&"object"==typeof window&&"object"==typeof document,gm=z,vm=fm,Am=Ze,bm=Hi,ym=_n,_m=ze,wm=mm,km=pm,xm=Oe;vm&&vm.prototype;var Em=_m("species"),Dm=!1,Sm=Am(gm.PromiseRejectionEvent),Rm=bm("Promise",(function(){var e=ym(vm),t=e!==String(vm);if(!t&&66===xm)return!0;if(!xm||xm<51||!/native code/.test(e)){var n=new vm((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Em]=r,!(Dm=n.then((function(){}))instanceof r))return!0}return!t&&(wm||km)&&!Sm})),Tm={CONSTRUCTOR:Rm,REJECTION_EVENT:Sm,SUBCLASSING:Dm},Im={},Cm=Ot,Om=TypeError,Pm=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Om("Bad Promise constructor");t=e,n=r})),this.resolve=Cm(t),this.reject=Cm(n)};Im.f=function(e){return new Pm(e)};var Lm,Bm,Um,Mm=Xi,Fm=zf,jm=z,Gm=vt,Nm=mr,qm=gh,Hm=tu,Vm=Xf,Qm=Ot,zm=Ze,Km=rt,Wm=ep,Ym=up,Jm=Fp.set,Xm=lm,Zm=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},$m=hm,eg=Qp,tg=Kn,ng=fm,rg=Im,ag="Promise",ig=Tm.CONSTRUCTOR,sg=Tm.REJECTION_EVENT,og=Tm.SUBCLASSING,ug=tg.getterFor(ag),dg=tg.set,cg=ng&&ng.prototype,lg=ng,hg=cg,fg=jm.TypeError,pg=jm.document,mg=jm.process,gg=rg.f,vg=gg,Ag=!!(pg&&pg.createEvent&&jm.dispatchEvent),bg="unhandledrejection",yg=function(e){var t;return!(!Km(e)||!zm(t=e.then))&&t},_g=function(e,t){var n,r,a,i=t.value,s=1==t.state,o=s?e.ok:e.fail,u=e.resolve,d=e.reject,c=e.domain;try{o?(s||(2===t.rejection&&Dg(t),t.rejection=1),!0===o?n=i:(c&&c.enter(),n=o(i),c&&(c.exit(),a=!0)),n===e.promise?d(fg("Promise-chain cycle")):(r=yg(n))?Gm(r,n,u,d):u(n)):d(i)}catch(e){c&&!a&&c.exit(),d(e)}},wg=function(e,t){e.notified||(e.notified=!0,Xm((function(){for(var n,r=e.reactions;n=r.get();)_g(n,e);e.notified=!1,t&&!e.rejection&&xg(e)})))},kg=function(e,t,n){var r,a;Ag?((r=pg.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),jm.dispatchEvent(r)):r={promise:t,reason:n},!sg&&(a=jm["on"+e])?a(r):e===bg&&Zm("Unhandled promise rejection",n)},xg=function(e){Gm(Jm,jm,(function(){var t,n=e.facade,r=e.value;if(Eg(e)&&(t=$m((function(){Fm?mg.emit("unhandledRejection",r,n):kg(bg,n,r)})),e.rejection=Fm||Eg(e)?2:1,t.error))throw t.value}))},Eg=function(e){return 1!==e.rejection&&!e.parent},Dg=function(e){Gm(Jm,jm,(function(){var t=e.facade;Fm?mg.emit("rejectionHandled",t):kg("rejectionhandled",t,e.value)}))},Sg=function(e,t,n){return function(r){e(t,r,n)}},Rg=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,wg(e,!0))},Tg=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw fg("Promise can't be resolved itself");var r=yg(t);r?Xm((function(){var n={done:!1};try{Gm(r,t,Sg(Tg,n,e),Sg(Rg,n,e))}catch(t){Rg(n,t,e)}})):(e.value=t,e.state=1,wg(e,!1))}catch(t){Rg({done:!1},t,e)}}};if(ig&&(hg=(lg=function(e){Wm(this,hg),Qm(e),Gm(Lm,this);var t=ug(this);try{e(Sg(Tg,t),Sg(Rg,t))}catch(e){Rg(t,e)}}).prototype,(Lm=function(e){dg(this,{type:ag,done:!1,notified:!1,parent:!1,reactions:new eg,rejection:!1,state:0,value:void 0})}).prototype=Nm(hg,"then",(function(e,t){var n=ug(this),r=gg(Ym(this,lg));return n.parent=!0,r.ok=!zm(e)||e,r.fail=zm(t)&&t,r.domain=Fm?mg.domain:void 0,0==n.state?n.reactions.add(r):Xm((function(){_g(r,n)})),r.promise})),Bm=function(){var e=new Lm,t=ug(e);this.promise=e,this.resolve=Sg(Tg,t),this.reject=Sg(Rg,t)},rg.f=gg=function(e){return e===lg||undefined===e?new Bm(e):vg(e)},zm(ng)&&cg!==Object.prototype)){Um=cg.then,og||Nm(cg,"then",(function(e,t){var n=this;return new lg((function(e,t){Gm(Um,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete cg.constructor}catch(e){}qm&&qm(cg,hg)}Mm({global:!0,constructor:!0,wrap:!0,forced:ig},{Promise:lg}),Hm(lg,ag,!1),Vm(ag);var Ig=jr,Cg=vt,Og=pt,Pg=Rt,Lg=Kc,Bg=$r,Ug=_t,Mg=sl,Fg=$c,jg=Gc,Gg=TypeError,Ng=function(e,t){this.stopped=e,this.result=t},qg=Ng.prototype,Hg=function(e,t,n){var r,a,i,s,o,u,d,c=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),f=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),m=Ig(t,c),g=function(e){return r&&jg(r,"normal",e),new Ng(!0,e)},v=function(e){return l?(Og(e),p?m(e[0],e[1],g):m(e[0],e[1])):p?m(e,g):m(e)};if(h)r=e.iterator;else if(f)r=e;else{if(!(a=Fg(e)))throw Gg(Pg(e)+" is not iterable");if(Lg(a)){for(i=0,s=Bg(e);s>i;i++)if((o=v(e[i]))&&Ug(qg,o))return o;return new Ng(!1)}r=Mg(e,a)}for(u=h?e.next:r.next;!(d=Cg(u,r)).done;){try{o=v(d.value)}catch(e){jg(r,"throw",e)}if("object"==typeof o&&o&&Ug(qg,o))return o}return new Ng(!1)},Vg=fm,Qg=Tm.CONSTRUCTOR||!kl((function(e){Vg.all(e).then(void 0,(function(){}))})),zg=vt,Kg=Ot,Wg=Im,Yg=hm,Jg=Hg;Xi({target:"Promise",stat:!0,forced:Qg},{all:function(e){var t=this,n=Wg.f(t),r=n.resolve,a=n.reject,i=Yg((function(){var n=Kg(t.resolve),i=[],s=0,o=1;Jg(e,(function(e){var u=s++,d=!1;o++,zg(n,t,e).then((function(e){d||(d=!0,i[u]=e,--o||r(i))}),a)})),--o||r(i)}));return i.error&&a(i.value),n.promise}});var Xg=Xi,Zg=Tm.CONSTRUCTOR,$g=fm,ev=yt,tv=Ze,nv=mr,rv=$g&&$g.prototype;if(Xg({target:"Promise",proto:!0,forced:Zg,real:!0},{catch:function(e){return this.then(void 0,e)}}),tv($g)){var av=ev("Promise").prototype.catch;rv.catch!==av&&nv(rv,"catch",av,{unsafe:!0})}var iv=vt,sv=Ot,ov=Im,uv=hm,dv=Hg;Xi({target:"Promise",stat:!0,forced:Qg},{race:function(e){var t=this,n=ov.f(t),r=n.reject,a=uv((function(){var a=sv(t.resolve);dv(e,(function(e){iv(a,t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}});var cv=vt,lv=Im;Xi({target:"Promise",stat:!0,forced:Tm.CONSTRUCTOR},{reject:function(e){var t=lv.f(this);return cv(t.reject,void 0,e),t.promise}});var hv=pt,fv=rt,pv=Im,mv=function(e,t){if(hv(e),fv(t)&&t.constructor===e)return t;var n=pv.f(e);return(0,n.resolve)(t),n.promise},gv=Xi,vv=Tm.CONSTRUCTOR,Av=mv;yt("Promise"),gv({target:"Promise",stat:!0,forced:vv},{resolve:function(e){return Av(this,e)}});var bv=TypeError,yv=Xi,_v=re,wv=ta,kv=rt,xv=ge,Ev=$r,Dv=function(e){if(e>9007199254740991)throw bv("Maximum allowed index exceeded");return e},Sv=Do,Rv=wa,Tv=hc,Iv=Oe,Cv=ze("isConcatSpreadable"),Ov=Iv>=51||!_v((function(){var e=[];return e[Cv]=!1,e.concat()[0]!==e})),Pv=function(e){if(!kv(e))return!1;var t=e[Cv];return void 0!==t?!!t:wv(e)};yv({target:"Array",proto:!0,arity:1,forced:!Ov||!Tv("concat")},{concat:function(e){var t,n,r,a,i,s=xv(this),o=Rv(s,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(Pv(i=-1===t?s:arguments[t]))for(a=Ev(i),Dv(u+a),n=0;n<a;n++,u++)n in i&&Sv(o,u,i[n]);else Dv(u+1),Sv(o,u++,i);return o.length=u,o}});var Lv=et,Bv=pn.EXISTS,Uv=de,Mv=Go,Fv=Function.prototype,jv=Uv(Fv.toString),Gv=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Nv=Uv(Gv.exec);function qv(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 Hv(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 Hv(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 Hv(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 Vv(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 Qv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vv(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Lv&&!Bv&&Mv(Fv,"name",{configurable:!0,get:function(){try{return Nv(Gv,jv(this))[1]}catch(e){return""}}});var zv,Kv={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"}},Wv={},Yv=function(e,t){Wv[e]=Qv(Qv({},t),{},{isLoading:!1})},Jv=function(e){var t=this,n=e.id,r=e.src;return new Promise(function(e,a){if(D.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))},Xv=function(){var e=E.default(R.default.mark((function e(t){var n,r,a,i,s,o,u,d;return R.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=Wv[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:r.isLoading=!0,a=qv(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=Kv[s].name,!window[o]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,Jv({id:s,src:Kv[s].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),u=s.id,d=s.src,console.log("Could not load external script ".concat(u," ").concat(d),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,Jv({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)}}(),Zv=T.default((function e(){var t=this;I.default(this,e),C.default(this,"load",E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Xv("Leaderboard");case 2:t.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),C.default(this,"showLeaderboard",function(){var e=E.default(R.default.mark((function e(n){var r;return R.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)}}()),C.default(this,"addScore",function(){var e=E.default(R.default.mark((function e(n){return R.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"]},Yv(this.moduleName,this.moduleConfig)})),$v=new Zv,eA=rt,tA=br,nA=ze("match"),rA=function(e){var t;return eA(e)&&(void 0!==(t=e[nA])?!!t:"RegExp"==tA(e))},aA=rA,iA=TypeError,sA=function(e){if(aA(e))throw iA("The method doesn't accept regular expressions");return e},oA=ze("match"),uA=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[oA]=!1,"/./"[e](t)}catch(e){}}return!1},dA=Xi,cA=Br,lA=Na.f,hA=Xr,fA=is,pA=sA,mA=fe,gA=uA,vA=cA("".startsWith),AA=cA("".slice),bA=Math.min,yA=gA("startsWith");dA({target:"String",proto:!0,forced:!!(yA||(zv=lA(String.prototype,"startsWith"),!zv||zv.writable))&&!yA},{startsWith:function(e){var t=fA(mA(this));pA(e);var n=hA(bA(arguments.length>1?arguments[1]:void 0,t.length)),r=fA(e);return vA?vA(t,r,n):AA(t,n,n+r.length)===r}});var _A=vt,wA=be,kA=_t,xA=os,EA=RegExp.prototype,DA=function(e){var t=e.flags;return void 0!==t||"flags"in EA||wA(e,"flags")||!kA(EA,e)?t:_A(xA,e)},SA=pn.PROPER,RA=mr,TA=pt,IA=is,CA=re,OA=DA,PA="toString",LA=RegExp.prototype[PA],BA=CA((function(){return"/a/b"!=LA.call({source:"a",flags:"b"})})),UA=SA&&LA.name!=PA;(BA||UA)&&RA(RegExp.prototype,PA,(function(){var e=TA(this);return"/"+IA(e.source)+"/"+IA(OA(e))}),{unsafe:!0});var MA=Br,FA=mr,jA=lo,GA=re,NA=ze,qA=Rn,HA=NA("species"),VA=RegExp.prototype,QA=function(e,t,n,r){var a=NA(e),i=!GA((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=i&&!GA((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[HA]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!i||!s||n){var o=MA(/./[a]),u=t(a,""[e],(function(e,t,n,r,a){var s=MA(e),u=t.exec;return u===jA||u===VA.exec?i&&!a?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));FA(String.prototype,e,u[0]),FA(VA,a,u[1])}r&&qA(VA[a],"sham",!0)},zA=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},KA=vt,WA=pt,YA=Ze,JA=br,XA=lo,ZA=TypeError,$A=function(e,t){var n=e.exec;if(YA(n)){var r=KA(n,e,t);return null!==r&&WA(r),r}if("RegExp"===JA(e))return KA(XA,e,t);throw ZA("RegExp#exec called on incompatible receiver")},eb=vt,tb=pt,nb=ce,rb=fe,ab=zA,ib=is,sb=Bt,ob=$A;function ub(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 db(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ub(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ub(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}QA("search",(function(e,t,n){return[function(t){var n=rb(this),r=nb(t)?void 0:sb(t,e);return r?eb(r,t,n):new RegExp(t)[e](ib(n))},function(e){var r=tb(this),a=ib(e),i=n(t,r,a);if(i.done)return i.value;var s=r.lastIndex;ab(s,0)||(r.lastIndex=0);var o=ob(r,a);return ab(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var cb,lb,hb=function(){function e(){I.default(this,e)}return T.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()),u=(e||n)&&r.loaderEnabled,d=(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,g=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:u,noLoadedEvent:d,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:g,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 O.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 O.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new O.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(d.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(d.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new O.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 O.default(e,!0);return n.query=db(db({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return d.Base64.encode(JSON.stringify(e))}}]),e}(),fb=function(){try{return(new hb).getBridgeContext()}catch(e){return{}}}(),pb={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(cb=!1,(lb=a.getQueryParams("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===lb.xanthophyll&&(cb=!0),cb)},mb=Ul.charAt,gb=de,vb=ge,Ab=Math.floor,bb=gb("".charAt),yb=gb("".replace),_b=gb("".slice),wb=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,kb=/\$([$&'`]|\d{1,2})/g,xb=Td,Eb=vt,Db=de,Sb=QA,Rb=re,Tb=pt,Ib=Ze,Cb=ce,Ob=Wr,Pb=Xr,Lb=is,Bb=fe,Ub=function(e,t,n){return t+(n?mb(e,t).length:1)},Mb=Bt,Fb=function(e,t,n,r,a,i){var s=n+e.length,o=r.length,u=kb;return void 0!==a&&(a=vb(a),u=wb),yb(i,u,(function(i,u){var d;switch(bb(u,0)){case"$":return"$";case"&":return e;case"`":return _b(t,0,n);case"'":return _b(t,s);case"<":d=a[_b(u,1,-1)];break;default:var c=+u;if(0===c)return i;if(c>o){var l=Ab(c/10);return 0===l?i:l<=o?void 0===r[l-1]?bb(u,1):r[l-1]+bb(u,1):i}d=r[c-1]}return void 0===d?"":d}))},jb=$A,Gb=ze("replace"),Nb=Math.max,qb=Math.min,Hb=Db([].concat),Vb=Db([].push),Qb=Db("".indexOf),zb=Db("".slice),Kb="$0"==="a".replace(/./,"$0"),Wb=!!/./[Gb]&&""===/./[Gb]("a","$0");Sb("replace",(function(e,t,n){var r=Wb?"$":"$0";return[function(e,n){var r=Bb(this),a=Cb(e)?void 0:Mb(e,Gb);return a?Eb(a,e,r,n):Eb(t,Lb(r),e,n)},function(e,a){var i=Tb(this),s=Lb(e);if("string"==typeof a&&-1===Qb(a,r)&&-1===Qb(a,"$<")){var o=n(t,i,s,a);if(o.done)return o.value}var u=Ib(a);u||(a=Lb(a));var d=i.global;if(d){var c=i.unicode;i.lastIndex=0}for(var l=[];;){var h=jb(i,s);if(null===h)break;if(Vb(l,h),!d)break;""===Lb(h[0])&&(i.lastIndex=Ub(s,Pb(i.lastIndex),c))}for(var f,p="",m=0,g=0;g<l.length;g++){for(var v=Lb((h=l[g])[0]),A=Nb(qb(Ob(h.index),s.length),0),b=[],y=1;y<h.length;y++)Vb(b,void 0===(f=h[y])?f:String(f));var _=h.groups;if(u){var w=Hb([v],b,A,s);void 0!==_&&Vb(w,_);var k=Lb(xb(a,void 0,w))}else k=Fb(v,s,A,b,_,a);A>=m&&(p+=zb(s,m,A)+k,m=A+v.length)}return p+zb(s,m)}]}),!!Rb((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Kb||Wb);var Yb=re,Jb=et,Xb=ze("iterator"),Zb=!Yb((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&&!Jb||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Xb]||"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})),$b=mr,ey=Oo,ty=Math.floor,ny=function(e,t){var n=e.length,r=ty(n/2);return n<8?ry(e,t):ay(e,ny(ey(e,0,r),t),ny(ey(e,r),t),t)},ry=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},ay=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},iy=Xi,sy=z,oy=vt,uy=de,dy=et,cy=Zb,ly=mr,hy=Go,fy=function(e,t,n){for(var r in t)$b(e,r,t[r],n);return e},py=tu,my=oh,gy=Kn,vy=ep,Ay=Ze,by=be,yy=jr,_y=Dr,wy=pt,ky=rt,xy=is,Ey=Bs,Dy=En,Sy=sl,Ry=$c,Ty=cp,Iy=ny,Cy=ze("iterator"),Oy="URLSearchParams",Py=Oy+"Iterator",Ly=gy.set,By=gy.getterFor(Oy),Uy=gy.getterFor(Py),My=Object.getOwnPropertyDescriptor,Fy=function(e){if(!dy)return sy[e];var t=My(sy,e);return t&&t.value},jy=Fy("fetch"),Gy=Fy("Request"),Ny=Fy("Headers"),qy=Gy&&Gy.prototype,Hy=Ny&&Ny.prototype,Vy=sy.RegExp,Qy=sy.TypeError,zy=sy.decodeURIComponent,Ky=sy.encodeURIComponent,Wy=uy("".charAt),Yy=uy([].join),Jy=uy([].push),Xy=uy("".replace),Zy=uy([].shift),$y=uy([].splice),e_=uy("".split),t_=uy("".slice),n_=/\+/g,r_=Array(4),a_=function(e){return r_[e-1]||(r_[e-1]=Vy("((?:%[\\da-f]{2}){"+e+"})","gi"))},i_=function(e){try{return zy(e)}catch(t){return e}},s_=function(e){var t=Xy(e,n_," "),n=4;try{return zy(t)}catch(e){for(;n;)t=Xy(t,a_(n--),i_);return t}},o_=/[!'()~]|%20/g,u_={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},d_=function(e){return u_[e]},c_=function(e){return Xy(Ky(e),o_,d_)},l_=my((function(e,t){Ly(this,{type:Py,iterator:Sy(By(e).entries),kind:t})}),"Iterator",(function(){var e=Uy(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),h_=function(e){this.entries=[],this.url=null,void 0!==e&&(ky(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Wy(e,0)?t_(e,1):e:xy(e)))};h_.prototype={type:Oy,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,a,i,s,o,u=Ry(e);if(u)for(n=(t=Sy(e,u)).next;!(r=oy(n,t)).done;){if(i=(a=Sy(wy(r.value))).next,(s=oy(i,a)).done||(o=oy(i,a)).done||!oy(i,a).done)throw Qy("Expected sequence with length 2");Jy(this.entries,{key:xy(s.value),value:xy(o.value)})}else for(var d in e)by(e,d)&&Jy(this.entries,{key:d,value:xy(e[d])})},parseQuery:function(e){if(e)for(var t,n,r=e_(e,"&"),a=0;a<r.length;)(t=r[a++]).length&&(n=e_(t,"="),Jy(this.entries,{key:s_(Zy(n)),value:s_(Yy(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Jy(n,c_(e.key)+"="+c_(e.value));return Yy(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var f_=function(){vy(this,p_);var e=Ly(this,new h_(arguments.length>0?arguments[0]:void 0));dy||(this.length=e.entries.length)},p_=f_.prototype;if(fy(p_,{append:function(e,t){Ty(arguments.length,2);var n=By(this);Jy(n.entries,{key:xy(e),value:xy(t)}),dy||this.length++,n.updateURL()},delete:function(e){Ty(arguments.length,1);for(var t=By(this),n=t.entries,r=xy(e),a=0;a<n.length;)n[a].key===r?$y(n,a,1):a++;dy||(this.length=n.length),t.updateURL()},get:function(e){Ty(arguments.length,1);for(var t=By(this).entries,n=xy(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){Ty(arguments.length,1);for(var t=By(this).entries,n=xy(e),r=[],a=0;a<t.length;a++)t[a].key===n&&Jy(r,t[a].value);return r},has:function(e){Ty(arguments.length,1);for(var t=By(this).entries,n=xy(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){Ty(arguments.length,1);for(var n,r=By(this),a=r.entries,i=!1,s=xy(e),o=xy(t),u=0;u<a.length;u++)(n=a[u]).key===s&&(i?$y(a,u--,1):(i=!0,n.value=o));i||Jy(a,{key:s,value:o}),dy||(this.length=a.length),r.updateURL()},sort:function(){var e=By(this);Iy(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=By(this).entries,r=yy(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 l_(this,"keys")},values:function(){return new l_(this,"values")},entries:function(){return new l_(this,"entries")}},{enumerable:!0}),ly(p_,Cy,p_.entries,{name:"entries"}),ly(p_,"toString",(function(){return By(this).serialize()}),{enumerable:!0}),dy&&hy(p_,"size",{get:function(){return By(this).entries.length},configurable:!0,enumerable:!0}),py(f_,Oy),iy({global:!0,constructor:!0,forced:!cy},{URLSearchParams:f_}),!cy&&Ay(Ny)){var m_=uy(Hy.has),g_=uy(Hy.set),v_=function(e){if(ky(e)){var t,n=e.body;if(_y(n)===Oy)return t=e.headers?new Ny(e.headers):new Ny,m_(t,"content-type")||g_(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Ey(e,{body:Dy(0,xy(n)),headers:Dy(0,t)})}return e};if(Ay(jy)&&iy({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return jy(e,arguments.length>1?v_(arguments[1]):{})}}),Ay(Gy)){var A_=function(e){return vy(this,qy),new Gy(e,arguments.length>1?v_(arguments[1]):{})};qy.constructor=A_,A_.prototype=qy,iy({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:A_})}}var b_={URLSearchParams:f_,getState:By},y_=fi.includes,__=vf;Xi({target:"Array",proto:!0,forced:re((function(){return!Array(1).includes()}))},{includes:function(e){return y_(this,e,arguments.length>1?arguments[1]:void 0)}}),__("includes");var w_=Xi,k_=sA,x_=fe,E_=is,D_=uA,S_=de("".indexOf);function R_(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 B.default(n,e)}function u(e,t){return U.default(n,e,t)}function d(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new O.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=d(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),P.default.isURL(o)))return o}}}return function(){var e;D.default(this,t),function(){var e=0,t=window;try{for(;t!=t.parent;)e++,t=t.parent}catch(e){u("depth.error",e.message)}u("depth.value",e)}(),function(){var e=r,t=n.depth.value,a=i;if(u("top.domain.from","fallback"),e&&e.length>0)a=e[e.length-1],u("top.domain.from","origins");else if(0===t)a=i,u("top.domain.from","self-top");else if(1===t){var o=d(s);o&&(a=o.origin,u("top.domain.from","referrer"))}u("top.domain.value",a.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=c();if(e)if(L.default(e))u("partner.domain.value",e),u("partner.domain.from","partner-domain");else{var t=d(e,!1);if(t)u("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),u("partner.domain.from","partner-url");else u("partner.domain.value",n.top.domain.value),u("partner.domain.from","partner-fallback")}else u("partner.domain.value",n.top.domain.value),u("partner.domain.from","fallback")}(),e=c(),0===n.depth.value?(u("partner.url.value",a),u("partner.url.from","self-top")):e?L.default(e)?(u("partner.url.value",a),u("partner.url.from","partner-domain")):(u("partner.url.value",e),u("partner.url.from","partner-url")):(u("partner.url.value",s),u("partner.url.from","fallback"))}.bind(this)(),{get:o,print:function(e){console.log(o(e))}}}w_({target:"String",proto:!0,forced:!D_("includes")},{includes:function(e){return!!~S_(E_(x_(this)),E_(k_(e)),arguments.length>1?arguments[1]:void 0)}});var T_="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==T_&&T_,I_={searchParams:"URLSearchParams"in T_,iterable:"Symbol"in T_&&"iterator"in Symbol,blob:"FileReader"in T_&&"Blob"in T_&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in T_,arrayBuffer:"ArrayBuffer"in T_};if(I_.arrayBuffer)var C_=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],O_=ArrayBuffer.isView||function(e){return e&&C_.indexOf(Object.prototype.toString.call(e))>-1};function P_(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 L_(e){return"string"!=typeof e&&(e=String(e)),e}function B_(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return I_.iterable&&(t[Symbol.iterator]=function(){return t}),t}function U_(e){this.map={},e instanceof U_?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 M_(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function F_(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function j_(e){var t=new FileReader,n=F_(t);return t.readAsArrayBuffer(e),n}function G_(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function N_(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:I_.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:I_.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:I_.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():I_.arrayBuffer&&I_.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=G_(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):I_.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||O_(e))?this._bodyArrayBuffer=G_(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):I_.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},I_.blob&&(this.blob=function(){var e=M_(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=M_(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(j_)}),this.text=function(){var e=M_(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=F_(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)},I_.formData&&(this.formData=function(){return this.text().then(V_)}),this.json=function(){return this.text().then(JSON.parse)},this}U_.prototype.append=function(e,t){e=P_(e),t=L_(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},U_.prototype.delete=function(e){delete this.map[P_(e)]},U_.prototype.get=function(e){return e=P_(e),this.has(e)?this.map[e]:null},U_.prototype.has=function(e){return this.map.hasOwnProperty(P_(e))},U_.prototype.set=function(e,t){this.map[P_(e)]=L_(t)},U_.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},U_.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),B_(e)},U_.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),B_(e)},U_.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),B_(e)},I_.iterable&&(U_.prototype[Symbol.iterator]=U_.prototype.entries);var q_=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function H_(e,t){if(!(this instanceof H_))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 H_){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new U_(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 U_(t.headers)),this.method=function(e){var t=e.toUpperCase();return q_.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 V_(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 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.');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 U_(t.headers),this.url=t.url||"",this._initBody(e)}H_.prototype.clone=function(){return new H_(this,{body:this._bodyInit})},N_.call(H_.prototype),N_.call(Q_.prototype),Q_.prototype.clone=function(){return new Q_(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new U_(this.headers),url:this.url})},Q_.error=function(){var e=new Q_(null,{status:0,statusText:""});return e.type="error",e};var z_=[301,302,303,307,308];Q_.redirect=function(e,t){if(-1===z_.indexOf(t))throw new RangeError("Invalid status code");return new Q_(null,{status:t,headers:{location:e}})};var K_,W_=T_.DOMException;try{new W_}catch(e){W_=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},W_.prototype=Object.create(Error.prototype),W_.prototype.constructor=W_}function Y_(e,t){return new Promise((function(n,r){var a=new H_(e,t);if(a.signal&&a.signal.aborted)return r(new W_("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 U_,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 Q_(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 W_("Aborted","AbortError"))}),0)},i.open(a.method,function(e){try{return""===e&&T_.location.href?T_.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&&(I_.blob?i.responseType="blob":I_.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 U_?a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,L_(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)}))}Y_.polyfill=!0,T_.fetch||(T_.fetch=Y_,T_.Headers=U_,T_.Request=H_,T_.Response=Q_);var J_=function(e){var t=this;if(!K_){var n={gameId:e.gameId,hours:(new Date).getHours(),topDomain:fb.topDomain,domain:fb.parentDomain,referrer:fb.parentURL,depth:a.getIframeDepth(),version:mo.version,byloader:fb.isTokenGameURL,isTokenGameURL:fb.isTokenGameURL,isMasterGameURL:fb.isMasterGameURL,isExtHostedGameURL:fb.isExtHostedGameURL,byloaderVersion:fb.version,tracking:pb.userDeclinedTracking,whitelabel:pb.whitelabelPartner,platform:a.getMobilePlatform()};K_=new a.MessageRouter(n)}return K_||{send:function(){D.default(this,t)}.bind(this)}},X_={getGameData:function(e){var t=this;try{var n=e.replace("game.api.gamedistribution.com","game-api.gamedistribution.com");fetch(n).then(function(e){D.default(this,t)}.bind(this)).catch(function(e){D.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){D.default(this,t)}.bind(this)).catch(function(e){D.default(this,t)}.bind(this))}catch(e){}}},Z_={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},$_={gameAPI:"game.api.gamedistribution.com"},ew={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},tw=function(){var e=this,t=Z_.acc.some(function(t){var n;return D.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?ew:$_}},nw=function(e){var t=this,n=e.url;return new Promise(function(e,r){D.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))};function rw(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 aw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rw(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var iw,sw,ow,uw,dw=new m.EventEmitter,cw=[],lw=function(e){cw.push(e)},hw=function(e){iw=J_(ow=e)},fw=function(){var e=E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(sw){e.next=6;break}return e.next=3,gw(ow);case 3:sw=e.sent,dw.emit("game-data-ready",sw),pw();case 6:return e.abrupt("return",sw);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),pw=function(){var e,t;if(null!==(e=sw)&&void 0!==e&&null!==(t=e.aws_tst)&&void 0!==t&&t.enabled){var n,r,a,i,s;if(mw(),null!==(n=sw)&&void 0!==n&&null!==(r=n.aws_tst)&&void 0!==r&&null!==(a=r.ep)&&void 0!==a&&a.api&&null!==(i=sw)&&void 0!==i&&i.url)X_.getGameData(null===(s=sw)||void 0===s?void 0:s.url);setInterval(E.default(R.default.mark((function e(){var t;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,gw(ow);case 3:sw=e.sent,Ao("gd-aws-test, new game data received",null===(t=sw)||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)}},mw=function(){var e=window.fetch;window.fetch=E.default(R.default.mark((function t(){var n,r,a,i,s,o,u,d,c,l,h,f,p,m,g,v,A,b,y,_=this,w=arguments;return R.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(u=w.length,d=new Array(u),c=0;c<u;c++)d[c]=w[c];l=d[0],h=d[1],f=null===(n=sw)||void 0===n||null===(r=n.aws_tst)||void 0===r||null===(a=r.ep)||void 0===a?void 0:a.atm,p=null===(i=sw)||void 0===i||null===(s=i.aws_tst)||void 0===s||null===(o=s.ep)||void 0===o?void 0:o.msgrt,m=function(t,n){var r=this;D.default(this,_);var a=l.replace(t,n);e(a,h).then(function(){D.default(this,r)}.bind(this))}.bind(this);try{f&&l.indexOf("tag.atom")>0&&m("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),p&&l.indexOf("msgrt.gamedistribution.com")>0&&(Ao("gd-aws-test hook",null===(g=sw)||void 0===g?void 0:g.aws_tst,null===(v=sw)||void 0===v||null===(A=v.aws_tst)||void 0===A||null===(b=A.ep)||void 0===b?void 0:b.msgrt),m("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"))}catch(e){}return t.next=9,e(l,h);case 9:return y=t.sent,t.abrupt("return",y);case 11:case"end":return t.stop()}}),t,this)})))},gw=function(e){var t=this;iw.send("gdfw.loading",{message:"loading"}),cw=[],lw("1"),lw("2");var n=new R_;lw("3");var r=n.get("partner.domain.value");lw("4");var i=function(){return D.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);lw("5");var s=function(){D.default(this,t);var n=o(),a=n?"&mode=".concat(n):"",i=tw().config,s="https://".concat(i.gameAPI);return"".concat(s,"/game/v4/get/").concat(e.gameId.replace(/-/g,""),"/?domain=").concat(r).concat(a,"&v=").concat(mo.version,"&localTime=").concat((new Date).getHours())}.bind(this);lw("6");var o=function(){var e=this;D.default(this,t);var n=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return D.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);lw("7");return new Promise(function(e){var n=this;D.default(this,t),lw("7.1");var r=i();try{lw("7.2");var o=s();lw("7.3"),fetch(o).then(function(){var e=E.default(R.default.mark((function e(t){var n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return lw("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),Ao("gameData fetch error, fallback to other ajax api",e.t0),e.next=12,nw({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(t){var i=this;if(D.default(this,n),lw("7.5"),t.success){var s,u,d,c=t.result.game;lw("7.6");var l={company:c.company,gameId:c.gameMd5,slug:c.slug,pname:c.pname,dname:c.dname,status:c.status,activeStatus:c.activeStatus,description:c.description,disableAds:c.enableAds,preroll:c.preRoll,midroll:6e4*c.timeAds,rewardedAds:c.rewardedAds,title:c.title,publishedAt:c.publishedAt,tags:c.tags,category:c.category,assets:c.assets,disp_2nd_prer:c.disp_2nd_prer,ctry_vst:c.ctry_vst,ctry:c.ctry,crtv:c.crtv,dmain:c.dmain,dmn:c.dmn,aws_tst:c.aws_tst,meta:c.meta,adsc:c.adsc,igs:c.igs,adspn:go(c.adspn)||{},__t4r:go(c.__t4r)||{},block_exts:go(c.push_cuda),bloc_gard:go(c.bloc_gard),cookie:go(c.cookie),gdpr:go(c.gdpr),diagnostic:go(c.diagnostic),cmp:go(c.cmp),gft:go(c.gft)||{},sdk:go(c.sdk)||{},sdkfw:go(c.sdkfw)||{},loader:go(c.loader)||{},splash:go(c.splash)||{},promo:go(c.promo)||{},dAds:go(c.dads)||{},pAds:go(c.pads)||{},mAds:go(c.mads)||{},rAds:go(c.rads)||{},lp:go(c.lp)||{},extsc:go(c.extsc)||{},evnts:go(c.evnts)||{},dp:go(c.dp)||{},adflw:go(c.adflw)||{},afgszf:go(c.afgszf)||{},fllc:go(c.fllc)||{},lotm:go(c.lotm)||{},t4rc:go(c.t4rc)||{},midroll_plus:go(c.midroll_plus)||{},gmky:go(c.gmky)||{},urlBlockExc:go(c.url_blck_exc)||{},sdk_wrp:go(c.sdk_wrp)||{},dbglg:go(c.dbglg)||{},extHosting:go(c.ext_hosting)||{},directTokenUse:go(c.dtu)||{},aeria:go(c.aeria)||{},advlm:go(c.advlm)||{},ad_blcks:go(c.ad_blcks)||{},rmblck:go(c.rmblck)||{},gs_trc:go(c.gs_trc)||{},rwskp:go(c.rwskp)||{},isv_fw:go(c.isv_fw)||{},ext_vst:go(c.ext_vst)||{},fix_score:go(c.fix_score)||{},compensation:go(c.comps)||{},adTimer:go(c.adtr)||{},cust_vast:go(c.cust_vast)||{},console_logs:go(c.c_logs)||{},disable_ads_by_cmp:go(c.dads_by_cmp)||{},ad_skip:go(c.adskp)||{},__t4rac:go(c.__t4rac)||{},vmap_by_tags:go(c.vmap_by_tags)||{}};lw("7.7");var h=a.extendDefaults(M.default(r),l);lw("7.8"),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"];e.tags.some(function(e){var n=this;return D.default(this,t),o.some(function(t){return D.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=aw(aw({},e.mAds||{}),{vmap:{enabled:!0}}),e.pAds=aw(aw({},e.pAds||{}),{vmap:{enabled:!0}}),e.rAds=aw(aw({},e.rAds||{}),{vmap:{enabled:!0}}),e.vmapByTagsApplied=!0)}}(h),h.afg_disabled=!1===(null===(s=h.sdk)||void 0===s||null===(u=s.afg)||void 0===u?void 0:u.enabled),h.url=o,function(){D.default(this,i),void 0!==_o.afgEnabled&&(h.afg_disabled=!_o.afgEnabled),void 0!==_o.promoEnabled&&(h.promo=h.promo||{},h.promo=aw(aw({},h.promo),{},{rainbow:{enabled:_o.promoEnabled}}))}.bind(this),lw("7.9"),null!==(d=h.pAds)&&void 0!==d&&d.enabled&&(h.preroll=!0),lw("7.10"),iw.send("gdfw.success",{message:"success"}),e(h)}else{r.failed=!0;var f=cw[cw.length-1];iw.send("gdfw.err",{message:"".concat(f,": json error")}),e(r)}}.bind(this)).catch(function(t){D.default(this,n);var a=cw[cw.length-1];iw.send("gdfw.err",{message:"".concat(a,": ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}.bind(this))}catch(t){var u=cw[cw.length-1];iw.send("gdfw.err",{message:"".concat(u,": global ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}}.bind(this))},vw=function(){var e=E.default(R.default.mark((function e(){var t,n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();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)}}(),Aw=function(){var e=E.default(R.default.mark((function e(){var t,n,r;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();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)}}(),bw=function(){var e=E.default(R.default.mark((function e(){var t,n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();case 2:return n=e.sent,e.next=5,vw();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)}}(),yw=function(){var e=E.default(R.default.mark((function e(){var t,n,r,a,i,s,o,u;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();case 2:return o=e.sent,u=!(null==o||null===(t=o.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:u,path:u?null==o||null===(n=o.extsc)||void 0===n?void 0:n.path:"",name:u?null==o||null===(r=o.extsc)||void 0===r?void 0:r.name:"",ref:u?null==o||null===(a=o.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:u?null==o||null===(i=o.extsc)||void 0===i?void 0:i.loadedFlag:void 0,loadedFlagCheck:!!u&&!(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)}}(),_w=function(){var e=E.default(R.default.mark((function e(){var t,n,r,i,s,o=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,yw();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 D.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)}}(),ww=!1,kw=!1,xw=function(){return new Promise(function(){var e=E.default(R.default.mark((function e(t,n){var r,a,i,s,o,u=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!ww){e.next=4;break}return e.abrupt("return",t(kw));case 4:ww=!0;case 5:return e.next=7,yw();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 kw=!0,e.abrupt("return",t(!0));case 16:s=!0,setTimeout(function(){D.default(this,u),s&&(s=!1,ww=!0,t(!1))}.bind(this),5e3),o=setInterval(function(){D.default(this,u),s&&i&&window[a]?(s=!1,ww=!0,kw=!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 Ew(e){return Dw.apply(this,arguments)}function Dw(){return Dw=E.default(R.default.mark((function e(t){var n,r,a,i;return R.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,Sw({id:a,verbose:i,options:r});case 9:uw=e.sent,e.next=15;break;case 12:return e.next=14,Tw({id:a,verbose:i,options:r});case 14:uw=e.sent;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(1),Ao("[GD-IS] GD interservice create error",e.t0);case 20:case"end":return e.stop()}}),e,null,[[1,17]])}))),Dw.apply(this,arguments)}function Sw(e){return Rw.apply(this,arguments)}function Rw(){return Rw=E.default(R.default.mark((function e(t){var n,r,a,i,s=this;return R.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,F.default({id:n,verbose:r,router:!0});case 4:return(i=e.sent).on("connected",function(e){D.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 D.default(this,s),"[GD-IS] I am ".concat(n)}.bind(this)}),i.register({method:"isLoader",handler:function(){return D.default(this,s),!0}.bind(this)}),i.register({method:"hasRouter",handler:function(){return D.default(this,s),!1}.bind(this)}),i.register({method:"showAd",handler:function(){var e=E.default(R.default.mark((function e(t){var n,r,i;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.showAd?a.showAd:function(){var e=E.default(R.default.mark((function e(t){return R.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 D.default(this,s),{url:window.location.href}}.bind(this)}),i.register({method:"registerOnEvents",handler:function(){var e=E.default(R.default.mark((function e(){return R.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)}))),Rw.apply(this,arguments)}function Tw(e){return Iw.apply(this,arguments)}function Iw(){return Iw=E.default(R.default.mark((function e(t){var n,r,a,i,s,o=this;return R.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,F.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){D.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){D.default(this,o),Ao("[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 D.default(this,o),"[GD-IS] I am ".concat(n)}.bind(this)}),i.register({method:"onEvent",handler:function(e){var t=this;D.default(this,o);var n=e.event;(a.onEvent||function(e){D.default(this,t)}.bind(this))(n)}.bind(this)}),i.register({method:"isLoader",handler:function(){return D.default(this,o),!1}.bind(this)}),i.register({method:"hasRouter",handler:function(){return D.default(this,o),!!s}.bind(this)}),i.register({method:"isStoreVisible",handler:function(){var e;return D.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)}))),Iw.apply(this,arguments)}var Cw=!1;function Ow(){var e=this;return new Promise(function(t,n){var r=this;if(D.default(this,e),uw||Cw)t(uw);else{var a=setInterval(function(){D.default(this,r),uw&&(Cw=!0,clearInterval(a),t(uw))}.bind(this),100);setTimeout(function(){D.default(this,r),clearInterval(a),uw||(Cw=!0,t(uw))}.bind(this),5e3)}}.bind(this))}var Pw=function(){var e=E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(uw){e.next=2;break}return e.abrupt("return",!1);case 2:if(e.t0=uw.isStoreVisible,!e.t0){e.next=7;break}return e.next=6,uw.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)}}(),Lw=function(){var e=this,t=O.default(window.location.href,!0),n=t.host,r=t.query,a=function(t){return D.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(O.default(r.gd_sdk_referrer_url).host));return i},Bw=function(){var e=E.default(R.default.mark((function e(){var t;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!window.isForwarderFrame,!!window.isForwarderFrame){e.next=17;break}if(!Lw()){e.next=8;break}return e.abrupt("return",!0);case 8:return e.next=10,Ow();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)}}(),Uw=function(){var e=E.default(R.default.mark((function e(){var t;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();case 2:if(t=e.sent,null==t?void 0:t.igs){e.next=6;break}return e.abrupt("return",!1);case 6:return bo("[GD-IGS] store config available"),e.next=9,Bw();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 Mw(e,t){var n=this,r=!1,a=null;if(e){var i=e,s=O.default(i,!0),o=s.query;if(Object.keys(o).some(function(e){return D.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 u=(s=O.default(i,!0)).query;Object.keys(u).some(function(e){return D.default(this,n),e.toLowerCase()===t}.bind(this))&&(r=!0,a=o[t.toLowerCase()])}}return{exists:r,value:a}}var Fw=function(){var e=E.default(R.default.mark((function e(){var t,n,r,a,i,s,o;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=!1,e.next=3,Ow();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=Mw(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)}}(),jw=function(){var e=E.default(R.default.mark((function e(){var t,n,r,a,i;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ow();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=Mw(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)}}(),Gw=function(){var e=E.default(R.default.mark((function e(t){var n,r,i,s,o,u,d,c,l,h,f,p=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.onEvent,e.next=3,fw();case 3:return i=e.sent,s=null==i?void 0:i.igs,e.next=7,Uw();case 7:if(e.sent){e.next=10;break}return e.abrupt("return");case 10:return bo("[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=35;break}return d="https://html5.gamedistribution.com/igs/index.html",e.next=19,jw();case 19:return c=e.sent,e.next=22,Fw();case 22:return l=e.sent,bo("[GD-IS-IGS] sandbox",l),e.next=26,o({igs:s,storeFrameUrl:d,showStoreOpener:c,sandbox:l});case 26:if(h=e.sent){e.next=29;break}return e.abrupt("return");case 29:f=!1,(null===(u=h.events)||void 0===u?void 0:u.onAny)&&h.events.onAny(function(e){var t;(D.default(this,p),"store-ui-visibility-change"===(null==e?void 0:e.name))&&(f=(null===(t=e.data)||void 0===t?void 0:t.visible)||!1);r&&r(e)}.bind(this)),h.isVisible=function(){return f},window.gdsdk.store=h,window.gdsdk.executeStoreAction=h.executeStoreAction.bind(h),bo("[GD-IGS] store ready");case 35:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),Nw=Xi,qw=fm,Hw=re,Vw=yt,Qw=Ze,zw=up,Kw=mv,Ww=mr,Yw=qw&&qw.prototype;if(Nw({target:"Promise",proto:!0,real:!0,forced:!!qw&&Hw((function(){Yw.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=zw(this,Vw("Promise")),n=Qw(e);return this.then(n?function(n){return Kw(t,e()).then((function(){return n}))}:e,n?function(n){return Kw(t,e()).then((function(){throw n}))}:e)}}),Qw(qw)){var Jw=Vw("Promise").prototype.finally;Yw.finally!==Jw&&Ww(Yw,"finally",Jw,{unsafe:!0})}var Xw="\t\n\v\f\r                 \u2028\u2029\ufeff",Zw=fe,$w=is,ek=Xw,tk=de("".replace),nk=RegExp("^["+ek+"]+"),rk=RegExp("(^|[^"+ek+"])["+ek+"]+$"),ak=function(e){return function(t){var n=$w(Zw(t));return 1&e&&(n=tk(n,nk,"")),2&e&&(n=tk(n,rk,"$1")),n}},ik={start:ak(1),end:ak(2),trim:ak(3)},sk=pn.PROPER,ok=re,uk=Xw,dk=ik.trim;Xi({target:"String",proto:!0,forced:function(e){return ok((function(){return!!uk[e]()||"​…᠎"!=="​…᠎"[e]()||sk&&uk[e].name!==e}))}("trim")},{trim:function(){return dk(this)}});var ck=Xi,lk=Ia.find,hk=vf,fk="find",pk=!0;fk in[]&&Array(1)[fk]((function(){pk=!1})),ck({target:"Array",proto:!0,forced:pk},{find:function(e){return lk(this,e,arguments.length>1?arguments[1]:void 0)}}),hk(fk);var mk=Ze,gk=rt,vk=gh,Ak=$e.f,bk=et,yk=z,_k=de,wk=Hi,kk=function(e,t,n){var r,a;return vk&&mk(r=t.constructor)&&r!==n&&gk(a=r.prototype)&&a!==n.prototype&&vk(e,a),e},xk=Rn,Ek=ai.f,Dk=_t,Sk=rA,Rk=is,Tk=DA,Ik=hs,Ck=function(e,t,n){n in e||Ak(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},Ok=mr,Pk=re,Lk=be,Bk=Kn.enforce,Uk=Xf,Mk=Fs,Fk=Ns,jk=ze("match"),Gk=yk.RegExp,Nk=Gk.prototype,qk=yk.SyntaxError,Hk=_k(Nk.exec),Vk=_k("".charAt),Qk=_k("".replace),zk=_k("".indexOf),Kk=_k("".slice),Wk=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Yk=/a/g,Jk=/a/g,Xk=new Gk(Yk)!==Yk,Zk=Ik.MISSED_STICKY,$k=Ik.UNSUPPORTED_Y,ex=bk&&(!Xk||Zk||Mk||Fk||Pk((function(){return Jk[jk]=!1,Gk(Yk)!=Yk||Gk(Jk)==Jk||"/a/i"!=Gk(Yk,"i")})));if(wk("RegExp",ex)){for(var tx=function(e,t){var n,r,a,i,s,o,u=Dk(Nk,this),d=Sk(e),c=void 0===t,l=[],h=e;if(!u&&d&&c&&e.constructor===tx)return e;if((d||Dk(Nk,e))&&(e=e.source,c&&(t=Tk(h))),e=void 0===e?"":Rk(e),t=void 0===t?"":Rk(t),h=e,Mk&&"dotAll"in Yk&&(r=!!t&&zk(t,"s")>-1)&&(t=Qk(t,/s/g,"")),n=t,Zk&&"sticky"in Yk&&(a=!!t&&zk(t,"y")>-1)&&$k&&(t=Qk(t,/y/g,"")),Fk&&(i=function(e){for(var t,n=e.length,r=0,a="",i=[],s={},o=!1,u=!1,d=0,c="";r<=n;r++){if("\\"===(t=Vk(e,r)))t+=Vk(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:Hk(Wk,Kk(e,r+1))&&(r+=2,u=!0),a+=t,d++;continue;case">"===t&&u:if(""===c||Lk(s,c))throw new qk("Invalid capture group name");s[c]=!0,i[i.length]=[c,d],u=!1,c="";continue}u?c+=t:a+=t}return[a,i]}(e),e=i[0],l=i[1]),s=kk(Gk(e,t),u?this:Nk,tx),(r||a||l.length)&&(o=Bk(s),r&&(o.dotAll=!0,o.raw=tx(function(e){for(var t,n=e.length,r=0,a="",i=!1;r<=n;r++)"\\"!==(t=Vk(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),a+=t):a+="[\\s\\S]":a+=t+Vk(e,++r);return a}(e),n)),a&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{xk(s,"source",""===h?"(?:)":h)}catch(e){}return s},nx=Ek(Gk),rx=0;nx.length>rx;)Ck(tx,Gk,nx[rx++]);Nk.constructor=tx,tx.prototype=Nk,Ok(yk,"RegExp",tx,{constructor:!0})}Uk("RegExp");var ax=et,ix=de,sx=es,ox=Wa,ux=ix(qa.f),dx=ix([].push),cx=function(e){return function(t){for(var n,r=ox(t),a=sx(r),i=a.length,s=0,o=[];i>s;)n=a[s++],ax&&!ux(r,n)||dx(o,e?[n,r[n]]:r[n]);return o}},lx={entries:cx(!0),values:cx(!1)}.values;Xi({target:"Object",stat:!0},{values:function(e){return lx(e)}});var hx=Xi,fx=Vr,px=Wa,mx=Oa,gx=de([].join);hx({target:"Array",proto:!0,forced:fx!=Object||!mx("join",",")},{join:function(e){return gx(px(this),void 0===e?",":e)}});var vx=Ia.map;Xi({target:"Array",proto:!0,forced:!hc("map")},{map:function(e){return vx(this,e,arguments.length>1?arguments[1]:void 0)}});var Ax=et,bx=de,yx=vt,_x=re,wx=es,kx=ki,xx=qa,Ex=ge,Dx=Vr,Sx=Object.assign,Rx=Object.defineProperty,Tx=bx([].concat),Ix=!Sx||_x((function(){if(Ax&&1!==Sx({b:1},Sx(Rx({},"a",{enumerable:!0,get:function(){Rx(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!=Sx({},e)[n]||wx(Sx({},t)).join("")!=r}))?function(e,t){for(var n=Ex(e),r=arguments.length,a=1,i=kx.f,s=xx.f;r>a;)for(var o,u=Dx(arguments[a++]),d=i?Tx(wx(u),i(u)):wx(u),c=d.length,l=0;c>l;)o=d[l++],Ax&&!yx(s,u,o)||(n[o]=u[o]);return n}:Sx,Cx=Ix;Xi({target:"Object",stat:!0,arity:2,forced:Object.assign!==Cx},{assign:Cx});var Ox,Px=de,Lx=2147483647,Bx=/[^\0-\u007E]/,Ux=/[.\u3002\uFF0E\uFF61]/g,Mx="Overflow: input needs wider integers to process",Fx=RangeError,jx=Px(Ux.exec),Gx=Math.floor,Nx=String.fromCharCode,qx=Px("".charCodeAt),Hx=Px([].join),Vx=Px([].push),Qx=Px("".replace),zx=Px("".split),Kx=Px("".toLowerCase),Wx=function(e){return e+22+75*(e<26)},Yx=function(e,t,n){var r=0;for(e=n?Gx(e/700):e>>1,e+=Gx(e/t);e>455;)e=Gx(e/35),r+=36;return Gx(r+36*e/(e+38))},Jx=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var a=qx(e,n++);if(a>=55296&&a<=56319&&n<r){var i=qx(e,n++);56320==(64512&i)?Vx(t,((1023&a)<<10)+(1023&i)+65536):(Vx(t,a),n--)}else Vx(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&&Vx(t,Nx(r));var u=t.length,d=u;for(u&&Vx(t,"-");d<a;){var c=Lx;for(n=0;n<e.length;n++)(r=e[n])>=i&&r<c&&(c=r);var l=d+1;if(c-i>Gx((Lx-s)/l))throw Fx(Mx);for(s+=(c-i)*l,i=c,n=0;n<e.length;n++){if((r=e[n])<i&&++s>Lx)throw Fx(Mx);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,g=36-p;Vx(t,Nx(Wx(p+m%g))),h=Gx(m/g),f+=36}Vx(t,Nx(Wx(h))),o=Yx(s,l,d==u),s=0,d++}}s++,i++}return Hx(t,"")},Xx=Xi,Zx=et,$x=Zb,eE=z,tE=jr,nE=de,rE=mr,aE=Go,iE=ep,sE=be,oE=Ix,uE=Al,dE=Oo,cE=Ul.codeAt,lE=function(e){var t,n,r=[],a=zx(Qx(Kx(e),Ux,"."),".");for(t=0;t<a.length;t++)n=a[t],Vx(r,jx(Bx,n)?"xn--"+Jx(n):n);return Hx(r,".")},hE=is,fE=tu,pE=cp,mE=b_,gE=Kn,vE=gE.set,AE=gE.getterFor("URL"),bE=mE.URLSearchParams,yE=mE.getState,_E=eE.URL,wE=eE.TypeError,kE=eE.parseInt,xE=Math.floor,EE=Math.pow,DE=nE("".charAt),SE=nE(/./.exec),RE=nE([].join),TE=nE(1..toString),IE=nE([].pop),CE=nE([].push),OE=nE("".replace),PE=nE([].shift),LE=nE("".split),BE=nE("".slice),UE=nE("".toLowerCase),ME=nE([].unshift),FE="Invalid scheme",jE="Invalid host",GE="Invalid port",NE=/[a-z]/i,qE=/[\d+-.a-z]/i,HE=/\d/,VE=/^0x/i,QE=/^[0-7]+$/,zE=/^\d+$/,KE=/^[\da-f]+$/i,WE=/[\0\t\n\r #%/:<>?@[\\\]^|]/,YE=/[\0\t\n\r #/:<>?@[\\\]^|]/,JE=/^[\u0000-\u0020]+/,XE=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ZE=/[\t\n\r]/g,$E=function(e){var t,n,r,a;if("number"==typeof e){for(t=[],n=0;n<4;n++)ME(t,e%256),e=xE(e/256);return RE(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+=TE(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},eD={},tD=oE({},eD,{" ":1,'"':1,"<":1,">":1,"`":1}),nD=oE({},tD,{"#":1,"?":1,"{":1,"}":1}),rD=oE({},nD,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),aD=function(e,t){var n=cE(e,0);return n>32&&n<127&&!sE(t,e)?e:encodeURIComponent(e)},iD={ftp:21,file:null,http:80,https:443,ws:80,wss:443},sD=function(e,t){var n;return 2==e.length&&SE(NE,DE(e,0))&&(":"==(n=DE(e,1))||!t&&"|"==n)},oD=function(e){var t;return e.length>1&&sD(BE(e,0,2))&&(2==e.length||"/"===(t=DE(e,2))||"\\"===t||"?"===t||"#"===t)},uD=function(e){return"."===e||"%2e"===UE(e)},dD={},cD={},lD={},hD={},fD={},pD={},mD={},gD={},vD={},AD={},bD={},yD={},_D={},wD={},kD={},xD={},ED={},DD={},SD={},RD={},TD={},ID=function(e,t,n){var r,a,i,s=hE(e);if(t){if(a=this.parse(s))throw wE(a);this.searchParams=null}else{if(void 0!==n&&(r=new ID(n,!0)),a=this.parse(s,null,r))throw wE(a);(i=yE(new bE)).bindURL(this),this.searchParams=i}};ID.prototype={type:"URL",parse:function(e,t,n){var r,a,i,s,o,u=this,d=t||dD,c=0,l="",h=!1,f=!1,p=!1;for(e=hE(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=OE(e,JE,""),e=OE(e,XE,"$1")),e=OE(e,ZE,""),r=uE(e);c<=r.length;){switch(a=r[c],d){case dD:if(!a||!SE(NE,a)){if(t)return FE;d=lD;continue}l+=UE(a),d=cD;break;case cD:if(a&&(SE(qE,a)||"+"==a||"-"==a||"."==a))l+=UE(a);else{if(":"!=a){if(t)return FE;l="",d=lD,c=0;continue}if(t&&(u.isSpecial()!=sE(iD,l)||"file"==l&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=l,t)return void(u.isSpecial()&&iD[u.scheme]==u.port&&(u.port=null));l="","file"==u.scheme?d=wD:u.isSpecial()&&n&&n.scheme==u.scheme?d=hD:u.isSpecial()?d=gD:"/"==r[c+1]?(d=fD,c++):(u.cannotBeABaseURL=!0,CE(u.path,""),d=SD)}break;case lD:if(!n||n.cannotBeABaseURL&&"#"!=a)return FE;if(n.cannotBeABaseURL&&"#"==a){u.scheme=n.scheme,u.path=dE(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,d=TD;break}d="file"==n.scheme?wD:pD;continue;case hD:if("/"!=a||"/"!=r[c+1]){d=pD;continue}d=vD,c++;break;case fD:if("/"==a){d=AD;break}d=DD;continue;case pD:if(u.scheme=n.scheme,a==Ox)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=dE(n.path),u.query=n.query;else if("/"==a||"\\"==a&&u.isSpecial())d=mD;else if("?"==a)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=dE(n.path),u.query="",d=RD;else{if("#"!=a){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=dE(n.path),u.path.length--,d=DD;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=dE(n.path),u.query=n.query,u.fragment="",d=TD}break;case mD:if(!u.isSpecial()||"/"!=a&&"\\"!=a){if("/"!=a){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,d=DD;continue}d=AD}else d=vD;break;case gD:if(d=vD,"/"!=a||"/"!=DE(l,c+1))continue;c++;break;case vD:if("/"!=a&&"\\"!=a){d=AD;continue}break;case AD:if("@"==a){h&&(l="%40"+l),h=!0,i=uE(l);for(var m=0;m<i.length;m++){var g=i[m];if(":"!=g||p){var v=aD(g,rD);p?u.password+=v:u.username+=v}else p=!0}l=""}else if(a==Ox||"/"==a||"?"==a||"#"==a||"\\"==a&&u.isSpecial()){if(h&&""==l)return"Invalid authority";c-=uE(l).length+1,l="",d=bD}else l+=a;break;case bD:case yD:if(t&&"file"==u.scheme){d=xD;continue}if(":"!=a||f){if(a==Ox||"/"==a||"?"==a||"#"==a||"\\"==a&&u.isSpecial()){if(u.isSpecial()&&""==l)return jE;if(t&&""==l&&(u.includesCredentials()||null!==u.port))return;if(s=u.parseHost(l))return s;if(l="",d=ED,t)return;continue}"["==a?f=!0:"]"==a&&(f=!1),l+=a}else{if(""==l)return jE;if(s=u.parseHost(l))return s;if(l="",d=_D,t==yD)return}break;case _D:if(!SE(HE,a)){if(a==Ox||"/"==a||"?"==a||"#"==a||"\\"==a&&u.isSpecial()||t){if(""!=l){var A=kE(l,10);if(A>65535)return GE;u.port=u.isSpecial()&&A===iD[u.scheme]?null:A,l=""}if(t)return;d=ED;continue}return GE}l+=a;break;case wD:if(u.scheme="file","/"==a||"\\"==a)d=kD;else{if(!n||"file"!=n.scheme){d=DD;continue}if(a==Ox)u.host=n.host,u.path=dE(n.path),u.query=n.query;else if("?"==a)u.host=n.host,u.path=dE(n.path),u.query="",d=RD;else{if("#"!=a){oD(RE(dE(r,c),""))||(u.host=n.host,u.path=dE(n.path),u.shortenPath()),d=DD;continue}u.host=n.host,u.path=dE(n.path),u.query=n.query,u.fragment="",d=TD}}break;case kD:if("/"==a||"\\"==a){d=xD;break}n&&"file"==n.scheme&&!oD(RE(dE(r,c),""))&&(sD(n.path[0],!0)?CE(u.path,n.path[0]):u.host=n.host),d=DD;continue;case xD:if(a==Ox||"/"==a||"\\"==a||"?"==a||"#"==a){if(!t&&sD(l))d=DD;else if(""==l){if(u.host="",t)return;d=ED}else{if(s=u.parseHost(l))return s;if("localhost"==u.host&&(u.host=""),t)return;l="",d=ED}continue}l+=a;break;case ED:if(u.isSpecial()){if(d=DD,"/"!=a&&"\\"!=a)continue}else if(t||"?"!=a)if(t||"#"!=a){if(a!=Ox&&(d=DD,"/"!=a))continue}else u.fragment="",d=TD;else u.query="",d=RD;break;case DD:if(a==Ox||"/"==a||"\\"==a&&u.isSpecial()||!t&&("?"==a||"#"==a)){if(".."===(o=UE(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(u.shortenPath(),"/"==a||"\\"==a&&u.isSpecial()||CE(u.path,"")):uD(l)?"/"==a||"\\"==a&&u.isSpecial()||CE(u.path,""):("file"==u.scheme&&!u.path.length&&sD(l)&&(u.host&&(u.host=""),l=DE(l,0)+":"),CE(u.path,l)),l="","file"==u.scheme&&(a==Ox||"?"==a||"#"==a))for(;u.path.length>1&&""===u.path[0];)PE(u.path);"?"==a?(u.query="",d=RD):"#"==a&&(u.fragment="",d=TD)}else l+=aD(a,nD);break;case SD:"?"==a?(u.query="",d=RD):"#"==a?(u.fragment="",d=TD):a!=Ox&&(u.path[0]+=aD(a,eD));break;case RD:t||"#"!=a?a!=Ox&&("'"==a&&u.isSpecial()?u.query+="%27":u.query+="#"==a?"%23":aD(a,eD)):(u.fragment="",d=TD);break;case TD:a!=Ox&&(u.fragment+=aD(a,tD))}c++}},parseHost:function(e){var t,n,r;if("["==DE(e,0)){if("]"!=DE(e,e.length-1))return jE;if(t=function(e){var t,n,r,a,i,s,o,u=[0,0,0,0,0,0,0,0],d=0,c=null,l=0,h=function(){return DE(e,l)};if(":"==h()){if(":"!=DE(e,1))return;l+=2,c=++d}for(;h();){if(8==d)return;if(":"!=h()){for(t=n=0;n<4&&SE(KE,h());)t=16*t+kE(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,d>6)return;for(r=0;h();){if(a=null,r>0){if(!("."==h()&&r<4))return;l++}if(!SE(HE,h()))return;for(;SE(HE,h());){if(i=kE(h(),10),null===a)a=i;else{if(0==a)return;a=10*a+i}if(a>255)return;l++}u[d]=256*u[d]+a,2!=++r&&4!=r||d++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;u[d++]=t}else{if(null!==c)return;l++,c=++d}}if(null!==c)for(s=d-c,d=7;0!=d&&s>0;)o=u[d],u[d--]=u[c+s-1],u[c+--s]=o;else if(8!=d)return;return u}(BE(e,1,-1)),!t)return jE;this.host=t}else if(this.isSpecial()){if(e=lE(e),SE(WE,e))return jE;if(t=function(e){var t,n,r,a,i,s,o,u=LE(e,".");if(u.length&&""==u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(a=u[r]))return e;if(i=10,a.length>1&&"0"==DE(a,0)&&(i=SE(VE,a)?16:8,a=BE(a,8==i?1:2)),""===a)s=0;else{if(!SE(10==i?zE:8==i?QE:KE,a))return e;s=kE(a,i)}CE(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=EE(256,5-t))return null}else if(s>255)return null;for(o=IE(n),r=0;r<n.length;r++)o+=n[r]*EE(256,3-r);return o}(e),null===t)return jE;this.host=t}else{if(SE(YE,e))return jE;for(t="",n=uE(e),r=0;r<n.length;r++)t+=aD(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 sE(iD,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&sD(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,u=e.fragment,d=t+":";return null!==a?(d+="//",e.includesCredentials()&&(d+=n+(r?":"+r:"")+"@"),d+=$E(a),null!==i&&(d+=":"+i)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?s[0]:s.length?"/"+RE(s,"/"):"",null!==o&&(d+="?"+o),null!==u&&(d+="#"+u),d},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 CD(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+$E(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(hE(e)+":",dD)},getUsername:function(){return this.username},setUsername:function(e){var t=uE(hE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=aD(t[n],rD)}},getPassword:function(){return this.password},setPassword:function(e){var t=uE(hE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=aD(t[n],rD)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?$E(e):$E(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,bD)},getHostname:function(){var e=this.host;return null===e?"":$E(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,yD)},getPort:function(){var e=this.port;return null===e?"":hE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=hE(e))?this.port=null:this.parse(e,_D))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+RE(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,ED))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=hE(e))?this.query=null:("?"==DE(e,0)&&(e=BE(e,1)),this.query="",this.parse(e,RD)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=hE(e))?("#"==DE(e,0)&&(e=BE(e,1)),this.fragment="",this.parse(e,TD)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var CD=function(e){var t=iE(this,OD),n=pE(arguments.length,1)>1?arguments[1]:void 0,r=vE(t,new ID(e,!1,n));Zx||(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())},OD=CD.prototype,PD=function(e,t){return{get:function(){return AE(this)[e]()},set:t&&function(e){return AE(this)[t](e)},configurable:!0,enumerable:!0}};if(Zx&&(aE(OD,"href",PD("serialize","setHref")),aE(OD,"origin",PD("getOrigin")),aE(OD,"protocol",PD("getProtocol","setProtocol")),aE(OD,"username",PD("getUsername","setUsername")),aE(OD,"password",PD("getPassword","setPassword")),aE(OD,"host",PD("getHost","setHost")),aE(OD,"hostname",PD("getHostname","setHostname")),aE(OD,"port",PD("getPort","setPort")),aE(OD,"pathname",PD("getPathname","setPathname")),aE(OD,"search",PD("getSearch","setSearch")),aE(OD,"searchParams",PD("getSearchParams")),aE(OD,"hash",PD("getHash","setHash"))),rE(OD,"toJSON",(function(){return AE(this).serialize()}),{enumerable:!0}),rE(OD,"toString",(function(){return AE(this).serialize()}),{enumerable:!0}),_E){var LD=_E.createObjectURL,BD=_E.revokeObjectURL;LD&&rE(CD,"createObjectURL",tE(LD,_E)),BD&&rE(CD,"revokeObjectURL",tE(BD,_E))}fE(CD,"URL"),Xx({global:!0,constructor:!0,forced:!$x,sham:!Zx},{URL:CD});var UD=function(){function e(t){I.default(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return T.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 O.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 D.default(this,e),this.customParamKeys.some(function(e){return D.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}(),MD=function(){function e(t,n){I.default(this,e),this.adContainer=t,this.onResume=n}return T.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(){D.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}(),FD=function(){function e(t,n){I.default(this,e),this.adContainer=t,this.onResume=n}return T.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}(),jD=function(){function e(t,n,r){I.default(this,e),this.adContainer=t,this.onResume=n,this.OnSkip=r}return T.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(){D.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}(),GD=function(){function e(t){I.default(this,e),this.adContainer=t}return T.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}(),ND=function(){function e(t){I.default(this,e),this.adContainer=t,this.counterLabel=null,this.countdownInterval=null}return T.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(){D.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}(),qD=function(){function e(t){I.default(this,e),this.adContainer=t}return T.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}(),HD=function(e){if(!e)return!1;var t=VD.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)},VD=Object.prototype.toString;function QD(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 zD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QD(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function KD(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 WD,YD="13998",JD="_cc".concat(YD),XD=["https://tags.crwdcntrl.net/c/".concat(YD,"/cc.js?ns=").concat(JD)],ZD=function(){return!!WD&&"function"==typeof WD.bcpf&&"function"==typeof WD.add},$D=function(e,t){try{if(!ZD())return;WD.add(e,t),Ao("lotame add success ".concat(e," ").concat(t))}catch(e){Ao("lotame add error",err)}},eS=function(e,t){try{if(!ZD())return;WD.bcpw(e,t),Ao("lotame send success ".concat(e," ").concat(t))}catch(e){}},tS=function(e){var t=this;try{$D("act","play"),$D("med","game"),"complete"===document.readyState?WD.bcpf():WD.bcp(),e.tags.forEach(function(e){D.default(this,t),eS("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),eS("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},nS=function(){window.addEventListener("load",(function(){dw.once("game-data-ready",function(){var e=E.default(R.default.mark((function e(t){var n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,e.t0=null!=fb&&fb.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,vw();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(XD[0],"LOTCC_".concat(YD),{alternates:XD});case 16:"object"===S.default(window[JD])&&(WD=window[JD]),ZD()&&tS(t),e.next=23;break;case 20:e.prev=20,e.t1=e.catch(1),Ao("lotame init error",e.t1);case 23:case"end":return e.stop()}}),e,null,[[1,20]])})));return function(t){return e.apply(this,arguments)}}())}))},rS=function(){eS("genp","ad video"),eS("act","ad impression")},aS=function(){eS("act","ad skipped")},iS=function(){eS("act","ad click")},sS=function(){eS("act","ad complete")},oS=function(){var e=(new R_).get("partner.url.value"),t=new O.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},uS=function(){function e(){I.default(this,e),this.adContainer=window.document.body}return T.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(){D.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 dS(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 cS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dS(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function lS(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 D.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},u=(new R_).get();return o=cS(cS({},o),u),function(e,t){try{var s=n._layout,o=n._ua,u={tp:e,ct:0,vrs:mo.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(d.Base64.encode(JSON.stringify(u)))))}catch(e){}}(e,o=s?cS(cS({},o),s):o)}}}}function hS(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 fS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hS(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pS=new m.EventEmitter,mS=null,gS=function(){function e(t,n,r){var i=this;if(I.default(this,e),mS)return mS;mS=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,u=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:u,this.category="",this.tags=[],this.eventCategory="AD",this.eventBus.subscribe("LOADED",function(){D.default(this,i),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){D.default(this,i),this._clearSafetyTimer("STARTED")}.bind(this),"ima")}var t,n,r,i,s,o,u,c,l,h,f,p,m,g,v,A,y,_,w,k,x,S,P,L,B,U,F;return T.default(e,[{key:"start",value:(F=E.default(R.default.mark((function e(){var t,n,r,a=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.adSystemInitialize(E.default(R.default.mark((function e(){return R.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(E.default(R.default.mark((function e(){return R.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){D.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),yo("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 F.apply(this,arguments)})},{key:"adSystemInitialize",value:(U=E.default(R.default.mark((function e(t){var n;return R.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=E.default(R.default.mark((function e(t){var n,r,a,i,s,o,u,d,c,l,h,f;return R.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 u=e.sent,s?(Ao("spil-adaptor: in _getSpilUrl, adType, adPosition, gamedata",n,o,this.gameData),d=s[o]||s.default||this._getDefaultSpilAdapterConfig()):d=this._getDefaultSpilAdapterConfig(),c=100*u.floor_price,Ao("spil-adaptor: fp",u.floor_price),l=this._createCustomAdVastUrl(d,{tnl_keys:{floor_price:c}}),h=l.url,f={url:h,dp:u,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")||oS().useTestAds}},{key:"_getAdVast",value:function(e,t){var n=this;return new Promise(function(){var r=E.default(R.default.mark((function r(i){var s,o,u,d,c,l,h,f,p=this;return R.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")||oS().useTestAds)){r.next=6;break}return s=n.IMASampleTags[e].filter(function(e){return D.default(this,p),e.indexOf("redirecterror")<0}.bind(this)),o=Math.floor(Math.random()*s.length),u=s[o],i({url:u,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,d=n.nextAdPosition(e),null!=t&&t.adTypeFound&&(d=null==t?void 0:t.adTypeFound),n._broadcast("AD_REQUEST",{message:d}),c=n.options,"preroll"===d&&b.isPlainObject(c.preroll)?c=c.preroll:"midroll"===d&&b.isPlainObject(c.midroll)?c=c.midroll:"rewarded"===d&&b.isPlainObject(c.rewarded)&&(c=c.rewarded),l="","audio"===t.adapter||"audio"===t.giftType?(n.isAudioAd=!0,l="midrollaudio"):(n.isAudioAd=!1,l="rewarded"===d?"rewardedVideo":"gdbanner"===d?"gd__banner":"midroll"===d?"midroll":"video1"),r.next=20,window.idhb.isLoaded();case 20:return r.next=22,n._create_dp_context(d,t);case 22:h=r.sent,bo("gd-adflow, before idhb",d,l),f=window.idhb.getAdserverTargetingForAdSlot(l),window.idhb.setAdserverTargeting(fS(fS({},f),{},{adaptor_order:t.adapterIndex})),Ao("hl-order 2",window.idhb.getAdserverTargetingForAdSlot(l)),window.idhb.requestAds({slots:C.default({},l,{bidFloor:(null==h?void 0:h.floor_price)||void 0}),callback:function(e,t){var r=this;D.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){D.default(this,r)}.bind(this));var a={src:"hl",tnl_keys:fS(fS({},window.idhb.getAdserverTargetingForAdSlot(l)),{},{tnl_ad_pos:d,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(D.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 u=new google.ima.AdsRequest,d=this._transformVast(e,t),c=fS(fS({},t),{},{adTag:d,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&&!d.bidder&&(l.adtag_url=d.url);var f=this._isVMAP(o);this.adContext.isVMAP=f,function(){D.default(this,a),t.shouldFail&&(l?(l.adtag_url="dp_original_broken",l.fallback_url="dp_fallback_broken"):d.url="original_broken",Ao("gd-adflow, _requestAd, dp.adtag_url",null==l?void 0:l.adtag_url),Ao("gd-adflow, _requestAd, dp.fallback_url",null==l?void 0:l.fallback_url),Ao("gd-adflow, _requestAd, adTag.url",d.url))}.bind(this);var p=this._getExternalVast(null===(s=t)||void 0===s?void 0:s.adType);if(p)u.adTagUrl=p;else if(f){Ao("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 O.default(e[i].adtag.url,!0);s.query=zD(zD({},s.query),{},{ad_rule:0,vpos:e[i].positon,pod:1,correlator:0===i?r:++r,output:"xml_vast3"}),i<e.length-1&&(s.query=zD(zD({},s.query),a)),t.push(s.toString())}for(var o=Date.now(),u=1;u<=t.length;u++){var d,c,l,h;n+='<vmap:AdBreak timeOffset="start" breakType="linear" breakId="break-'.concat(u,'">\n <vmap:AdSource id="').concat(o++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(KD({id:o++,adtag_url:t[u-1],error_url:null===(d=e[u-1].dp)||void 0===d?void 0:d.error_url,impression_url:null===(c=e[u-1].dp)||void 0===c?void 0:c.impression_url,fallback_url:null===(l=e[u-1].dp)||void 0===l?void 0:l.fallback_url,fallback_imp_url:null===(h=e[u-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:d,position:"preroll"===c.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(o)}));u.adsResponse=m}else if(l&&h.bidFloorApplied){Ao("gd-adflow, vast wrapper"),l.adtag_url||(l.adtag_url=d.url);var g=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);u.adsResponse=g}else if(l&&l.fallback_url){Ao("gd-adflow, vast wrapper 2");var v=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);u.adsResponse=v}else Ao("gd-adflow, without dp"),u.adTagUrl=d.url;u.linearAdSlotWidth=this.options.width,u.linearAdSlotHeight=this.options.height,u.nonLinearAdSlotWidth=this.options.width,u.nonLinearAdSlotHeight=this.options.height,u.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(u.vastLoadTimeout=this.options.vast_load_timeout),u.setAdWillAutoPlay(t.autoplayAllowed),u.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(u,c);try{this._broadcast("AD_SDK_REQUEST",{message:c})}catch(e){}r(u)}catch(e){throw new Error(e)}}.bind(this))}},{key:"_getExternalVast",value:function(e){var t;try{var n,r,a,i,s,o,u=this.getCurrentAdPosition(e),d=null===(n=this.gameData)||void 0===n?void 0:n.cust_vast,c=(null==d?void 0:d[u])||(null==d?void 0:d.default);if(!c)return Ao("[ext-vast] no custom vast config"),null;Ao("[ext-vast] has custom vast config",d);var l=null==c||null===(r=c.maps)||void 0===r||null===(a=r.position)||void 0===a?void 0:a[u],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}();Ao("[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,Ao("[ext-vast] check result",t)}catch(e){yo("[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=E.default(R.default.mark((function e(){var t=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;D.default(this,t);var a=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome"),G.default.video({inline:!0,muted:!1}).then(function(t){D.default(this,r);var n=t.result;t.error,e(!0===n?{autoplayAllowed:!0,autoplayRequiresMute:!1}:{autoplayAllowed:!0,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return L.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(P=E.default(R.default.mark((function e(){var t;return R.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 P.apply(this,arguments)})},{key:"startAd",value:(S=E.default(R.default.mark((function e(t){var n,r,i,s=this;return R.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=fS(fS({},i),{},{adType:r}),null!==(n=this.gameData.adspn)&&void 0!==n&&n.enabled&&(this.adFlowProcessSpinner||(this.adFlowProcessSpinner=new uS,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 D.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 D.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 S.apply(this,arguments)})},{key:"_startOpusAd",value:(x=E.default(R.default.mark((function e(t){var n,r,a,i,s,o,u,d,c,l,h,f,p,m,g,v=this;return R.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 D.default(this,v),!0}.bind(this),this.requestRunning=!0,s=this.gameData,o=s.gameId,u=s.slug,d=s.title,c={assetId:o,slug:u,title:d,debug:i},l=function(e){D.default(this,v),this.opusEventReceived=!0,this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),h=function(e){D.default(this,v),this.opusEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),f=function(){D.default(this,v),this.opusEventReceived=!0}.bind(this),p=function(){D.default(this,v),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){D.default(this,v),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),g={type:r,meta:c,beforeAd:l,afterAd:h,adBreakDone:m},"reward"===r&&(g=fS(fS({},g),{},{adDismissed:f,adViewed:p})),this.opusEventReceived=!1,this._startTimeoutForOpus(),a&&a(g);case 30:case"end":return e.stop()}}),e,this)}))),function(e){return x.apply(this,arguments)})},{key:"preloadAd",value:(k=E.default(R.default.mark((function e(t){return R.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(){D.default(this,e),this.adsManager.resume()}.bind(this),n=function(){D.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 MD(this.adContainer,t),this.adResume.add(),this.rewardedLabel=new FD(this.adContainer,t),this.rewardedLabel.add(),this.skipAdButton=new jD(this.adContainer,t,n),this.skipAdButton.add(),this.audioAdLabel=new GD(window.document.body),this.audioAdLabel.add(),this.audioAdLabel.hide(),this.adCounterLabel=new ND(window.document.body),this.adCounterLabel.add(),this.adCounterLabel.hide()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(w=E.default(R.default.mark((function e(t){var n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=E.default(R.default.mark((function e(r,i){var s,o,u,d,c,l,h,f,p,m=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{Ao("display_test load",t),(o=t?t.containerId:null)||i("Container id is not specified"),u=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!"),d=t.slotId?t.slotId:"gd__banner@".concat(o),document.getElementById(d)||(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)),u.appendChild(l)),(h=document.createElement("div")).id=d,h.classList.add("gd__banner"),u.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={})[d]={maxSize:[u.offsetWidth,u.offsetHeight]},Ao("display_test slots",p),window.idhb.requestAds({slots:p,callback:function(e){D.default(this,m),Ao("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:(_=E.default(R.default.mark((function e(t){var n,r,a,i,s,o=this;return R.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(D.default(this,o),_o.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(fS(fS({},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),Ao("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:(y=E.default(R.default.mark((function e(t,n){var r,a,i,s,o;return R.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(fS(fS({},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 y.apply(this,arguments)})},{key:"_loadPromo",value:(A=E.default(R.default.mark((function e(t,n){var r,i;return R.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,fS({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:(v=E.default(R.default.mark((function e(t){var n;return R.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,fS({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 v.apply(this,arguments)})},{key:"_waitOnAdLoad",value:function(){var e=this;return new Promise(function(t,n){var r=this;D.default(this,e);var a="videoad.preloadad";this.eventBus.unsubscribeScope(a);var i=function(e){var n=this;D.default(this,r),setTimeout(function(){D.default(this,n),this.eventBus.unsubscribeScope(a),t({success:!0,args:e})}.bind(this),1)}.bind(this),s=function(e){var n=this;D.default(this,r),setTimeout(function(){D.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:(g=E.default(R.default.mark((function e(t){var n,r,a,i,s,o=this;return R.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(D.default(this,o),_o.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(fS(fS({},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 g.apply(this,arguments)})},{key:"_loadRewardedAd",value:(m=E.default(R.default.mark((function e(t){var n;return R.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,fS({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=E.default(R.default.mark((function e(){return R.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=E.default(R.default.mark((function e(){return R.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,u,d=(null===(o=this._adrequest_user_context)||void 0===o||null===(u=o.adTag)||void 0===u?void 0:u.bidder)||"adx";this._broadcast("AD_BIDDER",{bidder:d}),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 qD(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;D.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(){D.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(){D.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(),u="AD_SDK_MANAGER_READY";this._broadcast(u,{name:u,message:"AD SDK is ready",status:"success",analytics:{category:u,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,u=o.getHours(),d=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"),g=null==e||null===(n=e.ad)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.title,v=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}),iS();break;case google.ima.AdEvent.Type.COMPLETE:Ao("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: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();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 w=e.getAd().getContentType();b=w,this._show({mode:"loaded",contentType:w});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"!==g&&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:f=this._is_completed(e.getAd()),b="Fired when the ad is skipped by the user.",aS(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:var k;if(this.skipAdButton&&this.skipAdButton.hide(),this.rewardGuarantied=!1,this.adType_===a.AdType.Rewarded)!v&&null!==(k=this.gameData.rwskp)&&void 0!==k&&k.enabled&&(this._skipAdButtonTimeout=setTimeout(function(){D.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 x=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,E=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED,S=x||E;"VPAID"===g&&this.imaEventList.push(h),S||this.isAudioAd||this._broadcast(h,{name:h,message:b,status:"success",analytics:{category:h,action:this.parentDomain,label:"h".concat(u," d").concat(d," m").concat(c," y").concat(l)}})}if(f&&!this.adSuccess){this.adSuccess=!0;var R=e.getAd();"VPAID"===g&&this._setAtomEvent();var T="Rainbow"===(null==R?void 0:R.getAdSystem())&&(null==R?void 0:R.getWrapperAdIds().some(function(e){return D.default(this,s),"promo"===e}.bind(this)));Ao("gd-adflow isPromoSuccess",T,null==R?void 0:R.getAdSystem(),null==R?void 0:R.getWrapperAdIds()),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:T}),this.resetForNext(e)}}},{key:"_setAtomEvent",value:function(){this.dumper||(this.dumper=new lS({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,u=e.url;if("none"===o||!u)return;u=u.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(u).then(function(){D.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,u=a.fallback_imp_url,d=a.promo_imp_green_url;if(!e&&!t)return r={type:"imp_err",url:s};var c=e.getWrapperAdIds().some(function(e){return D.default(this,n),e==="".concat(i)}.bind(this)),l=e.getWrapperAdIds().some(function(e){return D.default(this,n),"fallback"===e}.bind(this)),h=e.getWrapperAdIds().some(function(e){return D.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:d}:l&&t&&(r={type:"fallbacj_imp",url:u})}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);pS.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(){D.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(HD(e.getInnerError)){var t=e.getInnerError();if(t)return HD(t.getErrorCode)&&HD(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(D.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];b.isPlainObject(i)&&(r.query[a]=N.default.stringify(i))}var s=new O.default(r.url,!0);return q.default(s.query,r.query||{}),fS({url:s.toString()},t)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new O.default(e.url,!0),a=this._transformQuery(e,t,r);a&&(n.url=r.toString());var i=a?r:new O.default(e.url,!0);if(i.query.cust_params){var s=N.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&&b.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&&b.isPlainObject(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=M.default(a),b.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=N.default.parse(i.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var u in o){new RegExp(a.cust_params.$$remove,"i").test(u)&&delete o[u]}delete a.cust_params.$$remove}var d=this.macros.transform(a,{get:function(t){return D.default(this,r),e.tnl_keys[t.toLowerCase()]}.bind(this)});return i.cust_params=o,q.default(i,d),i.cust_params=N.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}),Ao("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)||[],u=!1;return o.length>0?u=!o.some(function(t){return D.default(this,e),t===i}.bind(this)):s.length>0&&(u=s.some(function(t){return D.default(this,e),t===i}.bind(this))),Ao("ex_bidder_result",i,u),u}catch(e){console.log("ex_bidder ERR",e)}}},{key:"_isExcludedBidderForT4RWithBidderExcRate",value:function(){var e,t,n,r,a=this._isExcludedBidderForT4R(),i=null===(e=this.gameData)||void 0===e||null===(t=e.t4rc)||void 0===t?void 0:t.bidder_exc_rate,s=null!=i&&i.enabled?(null==i?void 0:i.rate)||.8:0,o=(null===(n=this._adrequest_user_context)||void 0===n||null===(r=n.adTag)||void 0===r?void 0:r.bidder)||"adx",u=Math.random();return a||"adx"!==o&&u<s}},{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 D.default(this,t),e.t4rac.enabled?{success:!0,name:"ddate"}:{success:!1,reason:"ddate",name:"ddate"}}.bind(this),r=function(e){if(D.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;D.default(this,t);var o=this.gameData.meta,u=e.t4r.meta;return(null==o||null===(r=o.ast)||void 0===r?void 0:r.c)>=(null==u||null===(a=u.ast)||void 0===a?void 0:a.c)&&(null==o||null===(i=o.sit)||void 0===i?void 0:i.c)>=(null==u||null===(s=u.sit)||void 0===s?void 0:s.c)?{success:!1,reason:"meta",name:"meta"}:{success:!0,name:"meta"}}.bind(this),i=function(e){D.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;D.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;D.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),u=function(n){var r,a;if(D.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,u=Math.random()<s,d=i&&u&&(null===(o=e.t4r[i])||void 0===o?void 0:o.enabled);return{success:d,reason:d?null:"viper-check",name:"viper-check"}}return{success:!1,reason:"rule-check-viper",name:"viper-check"}}.bind(this),d=function(e){D.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:d,checkPublishDate:r,checkMeta:a,checkClickCount:s,checkViper:u,checkExcludedBidder:i,checkT4rActivation:n}}},{key:"_isVMAP",value:function(e){var t,n,r,a,i,s,o,u,d,c,l,h,f,p,m;if(!e)return!1;var g="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===(u=this.gameData)||void 0===u||null===(d=u.mAds)||void 0===d||null===(c=d.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(!g)return!1;var v=this._get_vmap_config(e),A=this.adCounter[e];return void 0!==(null==v?void 0:v.start)?A>=(null==v?void 0:v.start):g}},{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 u={};u.adtag=this._createCustomAdVastUrl(r["vast_"+o])||t,u.position=n,u.dp=r["vast_"+o]?void 0:a,s.push(u)}return s}},{key:"_get_vmap_config",value:function(e){var t,n,r,a,i,s,o,u;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===(u=o.pAds)||void 0===u?void 0:u.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;D.default(this,e);try{var r={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new UD(this.gameData).checkCustomParams();a&&(r.cp=a);var i=encodeURIComponent(d.Base64.encode(JSON.stringify(r)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(i)).then(function(e){return D.default(this,n),e.json()}.bind(this)).then(function(e){if(D.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){D.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 D.default(this,n),"".concat(e,"=").concat(encodeURIComponent(r[e]))}.bind(this)).join("&");encodeURIComponent(d.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),u=s?o:void 0;return function(){D.default(this,n),_o.promoError&&(console.log("promo-test fictional promo error"),u=void 0)}.bind(this),{promo_url:u,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=E.default(R.default.mark((function r(a){var i,s,o,u,c,l=this;return R.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 UD(n.gameData).checkCustomParams())&&(s.cp=o),u=encodeURIComponent(d.Base64.encode(JSON.stringify(s))),Ao("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,Ao("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(u)).then(function(e){return D.default(this,l),e.json()}.bind(this)).then(function(e){if(D.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(u,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(u),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(u),promo_url:void 0,promo_imp_blue_url:void 0,promo_imp_green_url:void 0})}.bind(this)).catch(function(e){D.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 O.default(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var a=N.default.parse(r.query.cust_params);if(!a.tnl_asset_id)return;a.adsense=1,r.query.cust_params=N.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 O.default(e.url,!0);if(null===(a=i.query)||void 0===a||!a.cust_params)return;var s=N.default.parse(i.query.cust_params);s.bfa=r,s.adsense=0,i.query.cust_params=N.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=E.default(R.default.mark((function e(t){var n,r,i,s,o,u,d,c,l,h,f,p,m=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=this._getPrebidScripts(),o=s[0],u=function(){return D.default(this,m),!1}.bind(this),window.idhb=window.idhb||{iabCmpExists:u},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||[],(d=new URL(o)).searchParams.append("referer",window.idhb.options.configUrl),o=d.href,e.next=13,a.getScript(o,"gdsdk_prebid",{alternates:s,error_prefix:"Blocked:",exists:function(){return D.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;D.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){D.default(this,t)}.bind(this)),delete this.atom_display),Ao("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){D.default(this,t)}.bind(this)),delete this.atom_display),Ao("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=E.default(R.default.mark((function e(){var t,n,r,a,i,s;return R.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,bo("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=E.default(R.default.mark((function e(t){var n,r,i=this;return R.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 D.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:(u=E.default(R.default.mark((function e(t){var n,r,i,s,o,u,d=this;return R.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(u={}).crossorigin="anonymous",u["data-ad-client"]=(null==t||null===(n=t.adsense_client)||void 0===n?void 0:n.length)>0?t.adsense_client:"ca-pub-2316275586951220",u["data-ad-frequency-hint"]="30s",u.allow="autoplay",(null==t||null===(r=t.adsense_channel)||void 0===r?void 0:r.length)>0&&(u["data-ad-channel"]=t.adsense_channel),(null==t||null===(i=t.adsense_host)||void 0===i?void 0:i.length)>0&&(u["data-ad-host"]=t.adsense_host),!0===(null==t?void 0:t.adsense_adbreak_test)&&(u["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&&(u["data-ad-client"]=this.gameData.sdk.afg.adsense_client,u["data-ad-slot"]=this.gameData.sdk.afg.adsense_ad_slot,u["data-ad-format"]="auto"),e.next=16,a.getScript("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return D.default(this,d),!!window.adsbygoogle}.bind(this),attrs:u});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 u.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,u=i[s],d=u&&(null===(o=u.children[0])||void 0===o?void 0:o.children[0]);d&&"IFRAME"===d.tagName&&d.style.height!==r&&(Ao("out-of-bounds fix apply"),d.style.height=r,a&&(d.parentElement.style.overflow="auto"))}}catch(e){Ao("out-of-bounds error: ".concat(e.message))}}},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(o=E.default(R.default.mark((function e(t){var n,r,a,i,s,o,u,d,c=this;return R.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(D.default(this,c),_o.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(){D.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(){D.default(this,c),n=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),i=function(){D.default(this,c),n=!0,this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),s=function(){D.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){D.default(this,c),n=!0,e()}.bind(this),u=function(e){D.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),d=function(e){window.adsbygoogle.push(e)},setTimeout(function(){D.default(this,c),n||(bo("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),d({type:"reward",name:"reward-in-game",beforeAd:r,afterAd:a,adDismissed:i,adViewed:s,beforeReward:o,adBreakDone:u}),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=E.default(R.default.mark((function e(t){var n,r,a=this;return R.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(D.default(this,a),_o.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(){D.default(this,a),this.adPlacementEventReceived=!0}.bind(this),r=function(e){D.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=E.default(R.default.mark((function e(t){var n,r,a,i=this;return R.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(D.default(this,i),_o.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(){D.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(){D.default(this,i),this.adPlacementEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),this.adPlacementEventReceived=!1,a=function(e){D.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 u=setTimeout(function(){D.default(this,o),this.adPlacementEventReceived||(this._broadcast("AD_ERROR",{message:"timeout-_startTimeoutForAdBreak",status:"error"}),this.adPlacementEventReceived=!1,this.requestRunning=!1),clearTimeout(u)}.bind(this),5e3)}}},{key:"_startTimeoutForOpus",value:function(){var e=this,t=setTimeout(function(){D.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=E.default(R.default.mark((function e(t){var n,r,a,i=this;return R.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(D.default(this,i),_o.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(){D.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(){D.default(this,i),this.adPlacementEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),this.adPlacementEventReceived=!1,a=function(e){D.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(d.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 R_).get();return n=fS(fS({},n),r),n=t?fS(fS({},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 D.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,fS(fS({},t),{},{skipForward:r,adPosition:a}))}},{key:"mute",value:(n=E.default(R.default.mark((function e(){return R.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=E.default(R.default.mark((function e(){return R.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}(),vS=T.default((function e(t){var n=this;I.default(this,e),C.default(this,"load",E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Xv(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),C.default(this,"promo",E.default(R.default.mark((function e(){return R.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},Yv(this.moduleName,this.moduleConfig)})),AS=T.default((function e(t){var n=this;I.default(this,e),C.default(this,"load",E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Xv(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),C.default(this,"splash",E.default(R.default.mark((function e(){return R.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="GDSplashDynamic",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},Yv(this.moduleName,this.moduleConfig)})),bS=function(e,t){console.log(e,t)},yS={},_S={},wS=null;function kS(){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 yS.version=r,yS.frame=e,yS.function=n,yS.version}function xS(e){var t=this;return wS||(wS=new Promise(function(n){function r(t,r){if(bS("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:yS,consentData:a}),void n({result:"ok",consentData:t})):void 0;n({result:"ok",consentData:t})}else n({result:"cmpCallFailed"})}D.default(this,t),kS(),yS.frame?2===yS.version?(bS("TCF v2 CMP found. Fetching the consent."),yS.function?(bS("CMP API is directly accessible, calling it now..."),yS.function("addEventListener",yS.version,r)):(bS("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!==_S[r.callId]&&_S[r.callId](r.returnValue,r.success)}}window[a]=function(e,n,i,s){D.default(this,r);var o=Math.random()+"",u="".concat(a,"Call"),d=C.default({},u,{command:e,parameter:s,callId:o,version:n});_S[o]=i,t.postMessage(d,"*")}.bind(this),window.addEventListener("message",i,!1),window[a](e,yS.version,n)}("addEventListener",yS.frame,r))):n({result:"cmpVersionNotV2",cmp:yS}):n({result:"cmpNotFound"})}.bind(this)),wS)}var ES=new(function(){function e(){I.default(this,e),this.productName="Game Distribution"}var t;return T.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=E.default(R.default.mark((function e(t,n){var r,a,i,s,o,u,d;return R.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,u="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),e.next=12,fetch(u,{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,d="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),e.next=22,fetch(d,{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 DS(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 SS(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 SS(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 SS(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 RS=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;D.default(this,t);try{var u=document.createElement("script");if(u.async=null==i||i,u.type="text/javascript",u.onload=function(){D.default(this,o),e()}.bind(this),u.onerror=function(){D.default(this,o);var e="Error on script load, Error: ".concat(n);console.log(e),s(e)}.bind(this),u.src=n,r){var d,c=DS(r);try{for(c.s();!(d=c.n()).done;){var l=d.value,h=l.key,f=l.value;u.setAttribute(h,f)}}catch(e){c.e(e)}finally{c.f()}}a||(a=document.head),a.appendChild(u)}catch(e){var p="Error on script load catch, Error: ".concat(n);console.log(p,e),s(p)}}.bind(this))},TS="ffd4774b-99ae-4464-8f40-3afa12b4692e",IS=function(){var e=E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,RS({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,RS({src:"https://cdn.cookielaw.org/consent/".concat(TS,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,RS({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:TS}],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)}}(),CS=new m.EventEmitter,OS={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},PS=!1;function LS(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(OS).some(function(e){return D.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;!function(e){if("gd-sdk-on-event"===(null==e?void 0:e.type)){var t,n,r;if("midroll"!==(null==e||null===(t=e.event)||void 0===t?void 0:t.adPosition))return;var a="CONTENT_RESUME_REQUESTED"===(null===(n=e.event)||void 0===n?void 0:n.name);"CONTENT_PAUSE_REQUESTED"===(null===(r=e.event)||void 0===r?void 0:r.name)&&(PS=!0),a&&PS&&(PS=!1,window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*"))}}(n);var s=function(){D.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 u=o&&["9555f04e1900482aaaef710cd2f8c440"].some(function(e){return D.default(this,t),o.indexOf(e)>0}.bind(this)),d=["sg-game-event"].some(function(e){return D.default(this,t),e===(null==n?void 0:n.type)}.bind(this));if(!u&&!d)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=OS[r][a];h&&CS.emit(h,n)}}}),!1);var BS="__msgr",US=w.v4(),MS=function(e){try{var t=jS(e,e.event),n=qS(window);n&&n!==window.top&&n.postMessage(t,"https://html5.gamedistribution.com")}catch(e){console.error("Error sending event message:",e)}},FS=function(e,t){var n=document.createElement("iframe");return n.src=e,n.style.display="none",n.name=t,n},jS=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:US,event_name:t,timestamp:Date.now()}},GS=function(e){var t=this;setInterval(function(){D.default(this,t);var n=jS(e,"Heartbeat");HS(n)}.bind(this),1e3*e.evnts.heartbeatDuration)},NS=function(e){try{var t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LS(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!t.event_name)return;t.token=US,HS(t)}catch(e){console.error("GD Messager Error:",e.message)}},qS=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}},HS=function(e){try{window[BS]&&window[BS].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},VS=function(){function e(t){I.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 T.default(e,[{key:"run",value:function(e){var t=e.duration,n=this;return new Promise(function(){var e=E.default(R.default.mark((function e(r,a){var i,s=this;return R.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(){D.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=E.default(R.default.mark((function e(){var t,n,r,a=this;return R.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=E.default(R.default.mark((function e(t){return R.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=E.default(R.default.mark((function e(){var t,n=this;return R.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 D.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=E.default(R.default.mark((function e(t){return R.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}(),QS=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";I.default(this,e),this.dbName=t,this.storeName=n,this.db=null,this.init()}var t,n,r,a;return T.default(e,[{key:"init",value:function(){var e=this;return new Promise(function(t,n){var r=this;D.default(this,e);var a=indexedDB.open(this.dbName,1);a.onerror=function(e){D.default(this,r),console.error("Database error:",e.target.error),n(e.target.error)}.bind(this),a.onsuccess=function(e){D.default(this,r),this.db=e.target.result,t(this.db)}.bind(this),a.onupgradeneeded=function(e){D.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=E.default(R.default.mark((function e(t){var n=this;return R.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;D.default(this,n);var i=this.db.transaction([this.storeName],"readonly").objectStore(this.storeName).get(t);i.onerror=function(e){D.default(this,a),console.error("Get item error:",e.target.error),r(e.target.error)}.bind(this),i.onsuccess=function(t){D.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=E.default(R.default.mark((function e(t,n){var r=this;return R.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;D.default(this,r);var s=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).put({key:t,value:n});s.onerror=function(e){D.default(this,i),console.error("Set item error:",e.target.error),a(e.target.error)}.bind(this),s.onsuccess=function(t){D.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=E.default(R.default.mark((function e(t){var n=this;return R.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;D.default(this,n);var i=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).delete(t);i.onerror=function(e){D.default(this,a),console.error("Remove item error:",e.target.error),r(e.target.error)}.bind(this),i.onsuccess=function(t){D.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=E.default(R.default.mark((function e(){var t=this;return R.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;D.default(this,t);var a=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).clear();a.onerror=function(e){D.default(this,r),console.error("Clear store error:",e.target.error),n(e.target.error)}.bind(this),a.onsuccess=function(t){D.default(this,r),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),zS=function(){function e(t){var n=t.mode;I.default(this,e),this.setItem=function(){var e=E.default(R.default.mark((function e(t,n){return R.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=E.default(R.default.mark((function e(t){return R.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 QS,this.setItem=this.indexedStore.setItem.bind(this.indexedStore),this.getItem=this.indexedStore.getItem.bind(this.indexedStore)):"local-storage"===n&&(this.setItem=function(){var e=E.default(R.default.mark((function e(t,n){return R.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=E.default(R.default.mark((function e(t){return R.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 T.default(e,[{key:"set",value:(n=E.default(R.default.mark((function e(t,n){var r;return R.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=E.default(R.default.mark((function e(t){var n;return R.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 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 WS(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){C.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}var YS="_gd_vs";function JS(e){return XS.apply(this,arguments)}function XS(){return(XS=E.default(R.default.mark((function e(t){var n,r,i;return R.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,aR({gameId:n});case 6:r=e.sent,e.next=13;break;case 9:e.prev=9,e.t0=e.catch(3),yo("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,sR({gameId:n});case 17:r=e.sent,e.next=24;break;case 20:e.prev=20,e.t1=e.catch(14),yo("visit-get error, Ls",e.t1.message),i.push(e.t1.message);case 24:return e.abrupt("return",WS(WS({},r),{},{errors:i}));case 25:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])})))).apply(this,arguments)}function ZS(e){return $S.apply(this,arguments)}function $S(){return $S=E.default(R.default.mark((function e(t){var n,r,i,s;return R.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,nR({gameId:n,serverDate:r});case 6:i=e.sent,e.next=13;break;case 9:e.prev=9,e.t0=e.catch(3),yo("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,eR({gameId:n,serverDate:r});case 17:i=e.sent,e.next=24;break;case 20:e.prev=20,e.t1=e.catch(14),yo("visit-update error, Ls",e.t1.message),s.push(e.t1.message);case 24:return e.abrupt("return",WS(WS({},i),{},{errors:s}));case 25:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])}))),$S.apply(this,arguments)}function eR(e){return tR.apply(this,arguments)}function tR(){return tR=E.default(R.default.mark((function e(t){var n,r,a,i,s,o;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,r=t.serverDate,i=new zS({mode:a="local-storage"}),e.next=5,i.get(YS);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(YS,s);case 13:return e.abrupt("return",{visit:o,mode:a});case 14:case"end":return e.stop()}}),e)}))),tR.apply(this,arguments)}function nR(e){return rR.apply(this,arguments)}function rR(){return rR=E.default(R.default.mark((function e(t){var n,r,a,i,s;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,r=t.serverDate,i=new zS({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)}))),rR.apply(this,arguments)}function aR(e){return iR.apply(this,arguments)}function iR(){return iR=E.default(R.default.mark((function e(t){var n,r,a;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,"indexed-db",r=new zS({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)}))),iR.apply(this,arguments)}function sR(e){return oR.apply(this,arguments)}function oR(){return oR=E.default(R.default.mark((function e(t){var n,r,a,i;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,"local-storage",r=new zS({mode:"local-storage"}),e.next=5,r.get(YS);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)}))),oR.apply(this,arguments)}function uR(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 dR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uR(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var cR,lR,hR,fR=function(){var e=E.default(R.default.mark((function e(){var t;return R.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)}}(),pR=0,mR=!1,gR=function(){var e=E.default(R.default.mark((function e(t){var n,r,a,i,s,o,u,d=this;return R.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,Ow();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){D.default(this,d),bR(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 O.default(window.location.href),!((o=!["html5.gamedistribution.com","revision.gamedistribution.com"].some(function(e){return D.default(this,d),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,fR();case 27:lR=w.v4(),u={json:JSON.stringify(n)},"wss://ws.gamedistribution.com",(cR=io("wss://ws.gamedistribution.com",{query:u,upgrade:!1,transports:["websocket"],reconnectionDelay:6e4,autoConnect:!1})).on("connect",function(){D.default(this,d)}.bind(this)),cR.on("after-connect",function(){var e=E.default(R.default.mark((function e(t){var r,a,i,s,o,u,d;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return hR=hR||(null==t?void 0:t.serverDate),r=n.gameId,a=n.failed,e.next=4,ZS({gameId:r,serverDate:hR});case 4:i=e.sent,s=i.visit,o=i.mode,u=i.errors,n.visit=dR(dR({},s),{},{stm:o,errors:u}),a&&(n.gameId=r?"failed:wrong":"failed:empty"),d={json:JSON.stringify(n)},cR.emit("client-info",{clientId:lR,counter:pR++,serverDate:hR,query:d}),mR=!0;case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),cR.on("disconnect",function(e){D.default(this,d),mR=!1}.bind(this)),cR.connect(),e.next=40;break;case 37:e.prev=37,e.t0=e.catch(1),r&&r(e.t0);case 40:case"end":return e.stop()}}),e,this,[[1,37]])})));return function(t){return e.apply(this,arguments)}}(),vR=!1,AR=[];function bR(e,t){return yR.apply(this,arguments)}function yR(){return yR=E.default(R.default.mark((function e(t,n){var r,a,i,s=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ow();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(!vR){e.next=14;break}return e.abrupt("return");case 14:vR=!0;case 15:a=function(e,t){D.default(this,s);try{var n={json:JSON.stringify(t||{})};cR.emit("socket-event",{topic:e,clientId:lR,counter:pR,serverDate:hR,query:n})}catch(e){yo("game-session: Error on sending socket-event",e.message)}}.bind(this),i=function(){D.default(this,s),a(t,n)}.bind(this),AR.push(i);case 19:case"end":return e.stop()}}),e,this)}))),yR.apply(this,arguments)}function _R(e){var t=this,n={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},r=Object.keys(n).find(function(r){var a=this;return D.default(this,t),n[r].some(function(t){return D.default(this,a),t===e.params.position}.bind(this))}.bind(this));return r||"midroll"}function wR(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 kR(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 kR(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 kR(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 xR(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!==AR.length&&cR&&mR){for(var e=function(){var e=this,r=n[t];r(),AR=AR.filter(function(t){return D.default(this,e),t!==r}.bind(this))},t=0,n=j.default(AR);t<n.length;t++)e();Ao("game-session: commands length",AR.length)}}),100);var ER=3,DR=1,SR=5,RR={lastImpressionDate:null,lastInterstitialImpressionDate:null,imps:0};var TR=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?xR(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e)}}};function IR(){return CR.apply(this,arguments)}function CR(){return(CR=E.default(R.default.mark((function e(){var t,n,r,a,i,s,o,u,d,c,l;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},e.next=3,fw();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)||[],u=!1,d=wR(o),e.prev=13,l=R.default.mark((function e(){var t,n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=c.value,s.some(function(e){return D.default(this,n),e===t.title}.bind(this))&&(u=!0);case 2:case"end":return e.stop()}}),e,this)})),d.s();case 16:if((c=d.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),d.e(e.t1);case 25:return e.prev=25,d.f(),e.finish(25);case 28:n.disabledByTag=u;case 29:return n.isLowScoreGame=OR(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 OR(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)||DR,s=(null==n?void 0:n.ascl)||SR,o=a||{},u=o.adsc,d=o.reqsc,c=o.pdur,l=o.rspdur;o.aspdur,t=(l||d/(c/ER))<=i&&u<s}return t}var PR=!1;function LR(){return BR.apply(this,arguments)}function BR(){return(BR=E.default(R.default.mark((function e(){var t;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!PR){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,IR();case 4:(t=e.sent).enabled,t.override,t.giftEnabled,t.midrollPlusEnabled,PR=!0;case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function UR(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 MR(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 FR(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 FR(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 FR(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 jR=!1,GR=3,NR=5,qR=1,HR=60,VR=10;function QR(){return zR.apply(this,arguments)}function zR(){return(zR=E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return RR.imps++,RR.lastImpressionDate=new Date,RR.lastInterstitialImpressionDate=new Date,e.abrupt("return",!0);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function KR(e){return WR.apply(this,arguments)}function WR(){return WR=E.default(R.default.mark((function e(t){var n,r,a,i,s,o,u,d,c,l,h,f,p,m,g,v,A,b,y,_,w,k,x,S,T,I,C,O,P,L,B,U,M,F,j,G,N,q,H,V,Q,z,K,W,Y,J,X,Z=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.gameData,u=t.executeCompensation,d=function(){var e=E.default(R.default.mark((function e(t){var n,r,a;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=(null==t?void 0:t.whenAvailable)||!1,!u){e.next=8;break}return e.next=5,u({whenAvailable:n});case 5:e.t0=e.sent,e.next=11;break;case 8:return e.next=10,QR();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,QR();case 20:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t){return e.apply(this,arguments)}}(),c=!jR,!jR){e.next=5;break}return e.abrupt("return");case 5:if(jR=!0,l=o.adsc){e.next=10;break}return e.abrupt("return");case 10:if(h=l.s,f=l.t,1===h){e.next=13;break}return e.abrupt("return");case 13:if(p=o.compensation||{enabled:!1},m=null==p?void 0:p.enabled,g=null==o||null===(n=o.adTimer)||void 0===n?void 0:n.enabled,v=null==o||null===(r=o.adTimer)||void 0===r?void 0:r.tl,m&&g){e.next=21;break}return e.abrupt("return");case 21:if(!(void 0===(null==p?void 0:p.exctg)||(null==p?void 0:p.exctg))){e.next=46;break}A=["co-op","multiplayer","IAPs"],b=(null==o?void 0:o.tags)||[],y=!1,_=MR(b),e.prev=28,k=R.default.mark((function e(){var t,n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=w.value,A.some(function(e){return D.default(this,n),e===t.title}.bind(this))&&(y=!0);case 2:case"end":return e.stop()}}),e,this)})),_.s();case 31:if((w=_.n()).done){e.next=35;break}return e.delegateYield(k(),"t0",33);case 33:e.next=31;break;case 35:e.next=40;break;case 37:e.prev=37,e.t1=e.catch(28),_.e(e.t1);case 40:return e.prev=40,_.f(),e.finish(40);case 43:if(!y){e.next=46;break}return e.abrupt("return");case 46:if(x=(null==p?void 0:p.esc)||qR,S=void 0===(null==p?void 0:p.depgft)||(null==p?void 0:p.depgft),T=null!=p&&p.depgftr?null==p?void 0:p.depgftr:1,I=(null==p?void 0:p.onst)||!1,C=(null==p?void 0:p.sl)||3,O=v||(null==p?void 0:p.tl)||180,P=(null==o||null===(a=o.gft)||void 0===a?void 0:a.midroll.enabled)||!1,L=(null==o||null===(i=o.midroll_plus)||void 0===i?void 0:i.enabled)||!1,(!P||!L)&&(O/=T),B=void 0===(null==p?void 0:p.tc)||(null==p?void 0:p.tc),U=(null==p?void 0:p.ascl)||NR,!S){e.next=66;break}if(j=(null==o||null===(M=o.gft)||void 0===M?void 0:M.midroll.enabled)||!1,G=(null==o||null===(F=o.midroll_plus)||void 0===F?void 0:F.enabled)||!1,j&&G){e.next=66;break}return e.abrupt("return");case 66:if(q=(N=f||{}).adsc,H=N.reqsc,V=N.pdur,Q=N.rspdur,N.aspdur,(Q||H/(V/GR))<=x&&q<U){e.next=73;break}return e.abrupt("return");case 73:if(z=Math.ceil(V/GR),!I||!c){e.next=80;break}return e.next=80,d({whenAvailable:!0});case 80:return K=0,W=1,Y=function(){D.default(this,Z),K=0,W=1}.bind(this),null===(s=o.sdkfw)||void 0===s||s.enabled,e.next=86,Ow();case 86:if(J=e.sent,e.t2=J,!e.t2){e.next=92;break}return e.next=91,J.isLoader();case 91:e.t2=e.sent;case 92:e.t2,X=setInterval(E.default(R.default.mark((function e(){var t,n,r,a=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(B&&RR.imps>=z)){e.next=4;break}return clearInterval(X),e.abrupt("return");case 4:if(t=new Date,n=RR.lastInterstitialImpressionDate?(i=RR.lastInterstitialImpressionDate,s=t,o=void 0,u=void 0,void 0,void 0,o=i.getTime(),u=s.getTime(),(u-o)/1e3):O+1,!((r=O-n)>0)){e.next=20;break}if(!(r<=HR-VR)){e.next=17;break}return e.next=15,new Promise(function(e){var t=this;D.default(this,a),setTimeout(function(){D.default(this,t),e()}.bind(this),1e3*r)}.bind(this));case 15:e.next=20;break;case 17:return Y(),e.abrupt("return");case 20:if(++K%W==0){e.next=24;break}return e.abrupt("return");case 24:return e.next=26,d({});case 26:e.sent?Y():(K=0,W=W+1>C?C:W+1);case 28:case"end":return e.stop()}var i,s,o,u}),e,this)}))),1e3*HR);case 95:case"end":return e.stop()}}),e,this,[[28,37,40,43]])}))),WR.apply(this,arguments)}function YR(e){return JR.apply(this,arguments)}function JR(){return(JR=E.default(R.default.mark((function e(t){var n,r,a,i,s,o,u,d,c,l,h;return R.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=TR.get(a),(o=null==i?void 0:i[a])&&o.enabled){e.next=7;break}return e.abrupt("return",!1);case 7:if((u=(null==o?void 0:o.skip_sessions)||0)&&0!==u){e.next=11;break}return e.abrupt("return",!1);case 11:if((d=(null==o?void 0:o.skips)||0)&&0!==d){e.next=15;break}return e.abrupt("return",!1);case 15:return e.next=17,JS({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<=u&&("preroll"===a||s<=d),e.abrupt("return",h);case 25:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function XR(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 ZR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XR(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $R(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 eT(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 eT(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 eT(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,nT=function(){function e(t){var n=this;I.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 D.default(this,n),t.isOpusReady}.bind(this),this._adCounterLabel=t.adInstance.adCounterLabel,this._muteRequested=!1,this._terminateRequested=!1,this._adSession=null,this._registerForEvents(),document.addEventListener("visibilitychange",function(){D.default(this,n),"visible"===document.visibilityState?this._sendTabChange("tab-visible"):this._sendTabChange("tab-invisible")}.bind(this))}var t,n;return T.default(e,[{key:"_registerForEvents",value:function(){var e=this;this.eventBus.subscribe("HL_CONFIG_ERROR",function(t){D.default(this,e),this.hasHLConfigError=!0}.bind(this))}},{key:"runAdFlow",value:(n=E.default(R.default.mark((function e(t){var n,r,a,i,s,o,u,d,c,l,h,f,p,m,g,v,A,b,y,_,w,k,x,E,S,T,I,O,P,L,B,U,M,F,j,G,N,q,H,V,Q,z,K,W,Y,J,X,Z,$,ee,te,ne,re,ae,ie,se,oe,ue,de,ce,le,he,fe,pe,me,ge,ve,Ae=this;return R.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 D.default(this,Ae),new Promise(function(n){return D.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,Ow();case 9:return!(h=e.sent)||h.isLoader(),this.adRequest=t,f=_R(t),t.params.adTypeFound=f,Ao("gd-adflow, adTypeFound",f,t.params.position),TR.count(f),Ao("gd-adflow, counters",{counters:TR.getAll()}),p=this._gameData,m=p.gameId,g=p.ad_skip,e.next=21,YR({gameId:m,ad_skip_rule:g,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"),KR({gameData:this._gameData,executeCompensation:this.executeCompensation}),e.abrupt("return");case 28:(v=this._getAdFlow(f)).find(function(e){return D.default(this,Ae),"opus"===e}.bind(this))&&!this.isOpusReady()&&(v=v.filter(function(e){return D.default(this,Ae),"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===(u=k.position)||void 0===u?void 0:u[f]),E=null==k?void 0:k.gift,S=x&&null!=k&&k.duration?null==k?void 0:k.duration:5,T=b?v.filter(function(e){return D.default(this,Ae),"adsense"!==e}.bind(this)):v,I=this.get_ad_system_init_result(),O=I.afg,P=I.ima,L=null==A||null===(d=A.ad_blcks)||void 0===d||null===(c=d.removeOtherAdaptors)||void 0===c?void 0:c.enabled,this.anyAdBlocking=!O||!P,this.bothAdBlocking=!O&&!P,this.adsBlocked=L&&this.anyAdBlocking||this.bothAdBlocking,this.adsBlocked?(bo("gd-adflow adsBlocked so changing the flow"),T=[]):(O||(T=T.filter(function(e){return D.default(this,Ae),"adsense"!==e}.bind(this))),P||(T=T.filter(function(e){return D.default(this,Ae),"ima"!==e}.bind(this)))),B=!1,U=!1,M=[],F=0,j=!1,N=!1,q={},H=!1,V=!1,Q=$R(T),e.prev=61,Q.s();case 63:if((z=Q.n()).done){e.next=115;break}if(K=z.value,!this._terminateRequested){e.next=67;break}return e.abrupt("break",115);case 67:if(t.params.adapter=K,W=F===T.length-1,Y=y&&E||!y,J=W&&x&&Y,t.params=ZR(ZR({},t.params),{},{adapterIndex:F,isLastAdapter:W,shouldFail:!1,extraPromoRunOnFail:J,muteRequested:this._muteRequested}),!this._muteRequested||"adsense"!==K){e.next=74;break}return e.abrupt("continue",113);case 74:return function(){D.default(this,Ae),_o.firstSuccessOrder&&!isNaN(_o.firstSuccessOrder)&&(t.params.shouldFail=F<_o.firstSuccessOrder)}.bind(this),bo("gd-adflow, before adInvoke",F,K,t.params.shouldFail),e.next=78,this.adInvoke(t);case 78:if(X=e.sent,Z=X.success,$=X.args,ee=X.isSkipped,te=X.noVast,ne=X.t4r,re=X.adContext,ae=X.isCanceled,ie=(null==re?void 0:re.isVMAP)||!1,se=null==$?void 0:$.reason,oe=null==$?void 0:$.message,ue=null==$?void 0:$.errorType,q[K]=q[K]||{req:0,imp:0,fail:0},q[K].req++,Z?q[K].imp++:(q[K].fail++,q[K].failReason=se,q[K].failMessage=oe,q[K].failType=ue),!Z){e.next=102;break}return bo("gd-adflow, adapter-result-success",F,K,$),B=!0,N=ie,U=!(null==$||!$.isPromoSuccess),G=ne,e.abrupt("break",115);case 102:if(bo("gd-adflow, adapter-result-failure",F,K,$.message),"opus"===K&&"[FC] No ad available"===(null==$?void 0:$.message)&&(H=!0),ae&&!V&&(V=!0),F++,M.push($.message),!ee){e.next=109;break}return e.abrupt("break",115);case 109:if(!te){e.next=112;break}return this._runAutoResume(),e.abrupt("break",115);case 112:j=J;case 113:e.next=63;break;case 115:e.next=120;break;case 117:e.prev=117,e.t0=e.catch(61),Q.e(e.t0);case 120:return e.prev=120,Q.f(),e.finish(120);case 123:if(!j){e.next=129;break}return e.next=126,new VS(this).run({duration:S});case 126:e.sent.success&&(U=!0);case 129:return function(){var e;D.default(this,Ae),_o.disableGift&&null!==(e=A.gft)&&void 0!==e&&e[f].enabled&&(A.gft[f].enabled=!1)}.bind(this),de=M.join(" /n"),B||H?(RR.imps++,RR.lastImpressionDate=new Date,"rewarded"!==f&&(RR.lastInterstitialImpressionDate=new Date),this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(f),"midroll"===f&&this._executeMidrollPlus()):(this._onResumeGame(de,"warning"),this._giveGift(f),"midroll"===f&&this._executeMidrollPlus()),KR({gameData:A,executeCompensation:this.executeCompensation}),ce="-1",le="none",B?(ce="index_".concat(F),le=T[F]):U?(ce="promo",le="promo"):H&&(ce="opus",le="opus"),he=this.get_session_id(),this.anyAdBlocking&&"-1"===ce?(fe="rewarded"===f?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[fe]=this.blockedAdsMap[fe]?this.blockedAdsMap[fe]+1:1,Ao("gd-adflow, blocked-ad",JSON.stringify(this.blockedAdsMap)),this._msgrt.send("adflow.blocked.pos",{message:"".concat(fe)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!O,imaBlocked:!P,isGift:y,isMidrollPlus:_,adType:fe,sessionId:he,successAdapter:"none",adFlowIndex:ce,adapterResults:q,ctry:A.ctry})):(pe={},C.default(pe,"adflow.all.index",{message:"".concat(ce)}),C.default(pe,"adflow.all.success_adapter",{message:"".concat(le)}),C.default(pe,"adflow.".concat(f,".index"),{message:"".concat(ce)}),C.default(pe,"adflow.".concat(f,".success_adapter"),{message:"".concat(le)}),me=pe,Object.keys(me).forEach(function(e){D.default(this,Ae);var t=me[e];this._msgrt.send(e,t)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:ce,successAdapter:le,adBlocker:!1,afgBlocked:!O,imaBlocked:!P,isGift:y,isMidrollPlus:_,isCompensation:w,adType:f,sessionId:he,t4r:G,adapterResults:q,ctry:A.ctry})),ge={adType:f,imp:"-1"!==ce&&"promo"!==ce||H,promo:"promo"===ce,opus:H,blocked:this.anyAdBlocking&&"-1"===ce,hasHLConfigError:this.hasHLConfigError,isGift:y,isMidrollPlus:_,isCompensation:w,isVMAP:!H&&N,isAppliedVMAP:!H&&N&&(null==A?void 0:A.vmapByTagsApplied)},this._adSession=ge,bR("ad-session",{adSession:ge}),H&&V&&bR("ad-session",{adSession:ZR(ZR({},ge),{},{opus:!1,isVMAP:N,isAppliedVMAP:N&&(null==A?void 0:A.vmapByTagsApplied)})}),ve={adType:f},this.eventBus.broadcast("AD_FLOW_COMPLETE",ve),e.abrupt("return",ZR(ZR({},ve),{},{args:{success:B,isGift:y,isMidrollPlus:_}}));case 149:case"end":return e.stop()}}),e,this,[[61,117,120,123]])}))),function(e){return n.apply(this,arguments)})},{key:"adInvoke",value:(t=E.default(R.default.mark((function e(t){var n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=E.default(R.default.mark((function e(r,a){var i,s,o,u,d=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i="main.showad.".concat(t.params.adapter,".").concat(t.params.adapterIndex),Ao("adInvoke.start",{scopeName:i,adRequest:JSON.stringify(t)}),s={},o=function(e){D.default(this,d);var a=n._adInstance.adContext;Ao("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),u=function(e){D.default(this,d);var a=n._adInstance.adContext;Ao("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",u,i),n._eventBus.subscribe("AD_T4R",function(){D.default(this,d),s.loaded=!0}.bind(this),i),n._eventBus.subscribe("AD_T4R_CLICK",function(){D.default(this,d),s.t4rClick=!0}.bind(this),i),n._eventBus.subscribe("AD_T4R_VIDEO",function(){D.default(this,d),s.t4rVideo=!0}.bind(this),i),n._eventBus.subscribe("AD_CLICK",function(){D.default(this,d),s.click=!0}.bind(this),i),n._eventBus.subscribe("AD_BIDDER",function(e){D.default(this,d),s.bidder=null==e?void 0:e.bidder}.bind(this),i),n._eventBus.subscribe("AD_T4R_NONE",function(e){D.default(this,d),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),yo("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,u,d=this,c=void function(){if(D.default(this,d),_o.customAdFlow)return JSON.parse(_o.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===(u=o.adapters)||void 0===u?void 0:u[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(){D.default(this,t),"hidden"===document.visibilityState&&(n.tabState=n.tabState+"-STARTED",bR("ad-session-tab",{adSession:n}))}.bind(this)),this.eventBus.subscribe("IMPRESSION",function(){D.default(this,t),"hidden"===document.visibilityState&&(n.tabState=n.tabState+"-IMPRESSION",bR("ad-session-tab",{adSession:n}))}.bind(this))}}},{key:"mute",value:function(){var e=this;this._muteRequested=!0,this._adInstance.mute().catch(function(t){D.default(this,e)}.bind(this))}},{key:"terminate",value:function(){var e=this;this._terminateRequested=!0,this._adInstance.terminate().catch(function(t){D.default(this,e)}.bind(this)),this._setAdRequestTimer()}}]),e}(),rT=new m.EventEmitter,aT=["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(aT.some(function(e){return D.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)){var i=n.system;n.action;var s="aeriaExternalHostsConnector"===i;if("Softgames"===i)tT=a,(window.parent||window).postMessage(n,"*"),rT.emit("aeria-event",n);else if(s){tT&&tT.postMessage(n,"*");var o=window.parent||window;o&&o.postMessage(n,"*")}}}),!1);var iT="https://html5.gamedistribution.com",sT="parent-data-request",oT="parent-data-response",uT=function(){function e(){I.default(this,e)}var t;return T.default(e,[{key:"init",value:function(e){var t=this;this._registerForDataRequests(e),this._askForParentFrameData().then(function(n){if(D.default(this,t),n){var r=n.adRequestTimer;e.adRequestTimer=r,Ao("gd-frame-data-bridge, adRequestTimer on init ",e.adRequestTimer)}}.bind(this))}},{key:"_registerForDataRequests",value:function(e){var t=this;window.addEventListener("message",function(n){D.default(this,t);var r=n.data,a=n.origin,i=n.source,s=r.type;if(r.value,a===iT&&s===sT){var o={adRequestTimer:e.adRequestTimer};i.postMessage({type:oT,value:o})}}.bind(this))}},{key:"_askForParentFrameData",value:(t=E.default(R.default.mark((function e(){var t=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;D.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===iT&&i===oT&&(e(s),a=!0)})),setTimeout(function(){D.default(this,r),a||e()}.bind(this),1e3);var i={type:sT};window.parent.postMessage(i,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),dT=new uT,cT={SDKExistsOnUpperFrame:!1};function lT(){return hT.apply(this,arguments)}function hT(){return(hT=E.default(R.default.mark((function e(){var t,n;return R.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 fT(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 pT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fT(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var mT=function(){bo("gtag: GA not initialized",arguments)};function gT(e){return vT.apply(this,arguments)}function vT(){return vT=E.default(R.default.mark((function e(t){var n,r,i,s,o,u,d,c,l,h,f,p,m=this;return R.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),u=[o],e.prev=5,e.next=8,a.getScript(u[0],"gdsdk_google_analytics",{alternates:u,error_prefix:"Blocked:",exists:function(){return D.default(this,m),window[s]}.bind(this)});case 8:return window[s]=window[s]||[],mT=function(){window[s].push(arguments)},mT("js",new Date),e.next=14,H.default();case 14:return d=e.sent,c=d.lookupIabConsent,l=d.getGoogleAdType,e.next=19,c();case 19:h=e.sent,f=l(h.consentData),p=pT(pT({},p=r||{}),{},{cookie_flags:"SameSite=None;Secure",cmp:h.result,gdpr:"ok"===h.result?"object"===S.default(h.consentData)?!0===h.consentData.gdprApplies:"N/A":h.result,google_ads:null==f?void 0:f.type}),mT("config",i,p),e.next=31;break;case 27:e.prev=27,e.t0=e.catch(5),yo("gtag: load GA error",e.t0),n&&n(e.t0);case 31:case"end":return e.stop()}}),e,this,[[5,27]])}))),vT.apply(this,arguments)}new O.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 O.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 AT,bT=function(e){var t=this,n=e.handler,r=e.timeout,a=e.interval,i=n||function(){return D.default(this,t),!0}.bind(this),s=r||1e3,o=a||10;return new Promise(function(e,r){var a=this;if(D.default(this,t),n())e(!0);else{var u=!1,d=setInterval(function(){D.default(this,a);try{i()&&(clearInterval(d),u=!0,e(!0))}catch(t){clearInterval(d),e(!1)}}.bind(this),o);setTimeout(function(){D.default(this,a),clearInterval(d),u||e(!1)}.bind(this),s)}}.bind(this))},yT=function(){var e=E.default(R.default.mark((function e(t){var n,r,a,i,s=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.topic,r=t.args,e.next=3,fw();case 3:if(a=e.sent,i=a.console_logs,i&&i.allowed.some(function(e){return D.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 _T(){return wT.apply(this,arguments)}function wT(){return wT=E.default(R.default.mark((function e(){var t,n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!AT){e.next=2;break}return e.abrupt("return",AT);case 2:return e.next=4,H.default();case 4:return t=e.sent,n=t.lookupIabConsent,t.getGoogleAdType,e.next=9,n();case 9:return AT=e.sent,e.next=12,yT({topic:"cmp-decoded",args:{key:"[consent-check] cmp-decoded",cmp:AT}});case 12:return e.abrupt("return",AT);case 13:case"end":return e.stop()}}),e)}))),wT.apply(this,arguments)}function kT(){return xT.apply(this,arguments)}function xT(){return xT=E.default(R.default.mark((function e(){var t,n,r,a,i,s,o,u,d,c,l,h,f,p=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_T();case 2:if(a=e.sent,(i=(null==a?void 0:a.consentData)||{}).gdprApplies){e.next=7;break}return bo("[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)||{},u=(null===(r=i.publisher)||void 0===r?void 0:r.consents)||{},d=function(e){return D.default(this,p),0===Object.keys(e).length}.bind(this),c=d(s),l=d(o),h=d(u),bo("[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)}))),xT.apply(this,arguments)}function ET(){return DT.apply(this,arguments)}function DT(){return DT=E.default(R.default.mark((function e(){var t,n,r,a,i;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_T();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)}))),DT.apply(this,arguments)}function ST(){return RT.apply(this,arguments)}function RT(){return(RT=E.default(R.default.mark((function e(){var t,n,r,a;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fw();case 3:if(t=e.sent,null!=(n=t.disable_ads_by_cmp)&&n.enabled){e.next=8;break}return bo("[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,kT();case 13:e.t0=e.sent;case 14:if(!e.t0){e.next=17;break}return bo("[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,ET();case 22:e.t1=e.sent;case 23:if(!e.t1){e.next=26;break}return bo("[consent-check] partially rejected"),e.abrupt("return",!0);case 26:e.next=31;break;case 28:e.prev=28,e.t2=e.catch(0),yo("[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 TT(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 IT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TT(Object(n),!0).forEach((function(t){C.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var CT=w.v4(),OT=null,PT=null,LT=function(){function e(t){var n,r,a,i,s=this;if(I.default(this,e),C.default(this,"_whichFrameV2",function(){var e=this;D.default(this,s);var t=O.default(window.location.href,!0),n=t.host,r=t.query,a="html5.gamedistribution.com"!==n,i=function(t){return D.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(O.default(r.gd_sdk_referrer_url).host));return this._isMasterGameURL()&&!(this._isTokenGameURL()||a)||o?"loader-frame":"game-frame"}.bind(this)),OT)return OT;OT=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 R_,this._location.print();var o=this._location.get(),u=(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),d=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||d,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._topDomain=this._topDomain||u,Ao("locs found:",this._topDomain,this._parentURL),this._isFullScreen=!1,this._giftCount={preroll:0,midroll:0,rewarded:0},this._mplus_count=0,Ew({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){D.default(this,s),this._sdk_ready=!0}.bind(this)).catch(function(e){D.default(this,s),this._sdk_ready=!1}.bind(this)).finally(function(){var e,t,n,r,a=this;if((D.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 lS({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[BS]){var n=FS("https://static.gamedistribution.com/message/index.html",BS);if(document.body.appendChild(n),window!==window.top){var r=[jS(e,"TokenGenerated"),jS(e,"PageLoaded")];n.onload=function(){var e=this;return D.default(this,t),r.forEach(function(t){return D.default(this,e),HS(t)}.bind(this))}.bind(this),GS(e)}window.addEventListener("message",function(e){return D.default(this,t),NS(e)}.bind(this),!1)}}(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){D.default(this,a),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),dT.init(this),this._send_gametag_data("sdk_init"),this.fixScore(),this._stableAdFlowForTest(),Gw({onEvent:function(e){D.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-change"===t)&&(n.visible?this.onPauseGame("In game store opened","success"):this.onResumeGame("In game store closed","success"))}.bind(this)})}.bind(this)),this._registerSGBridge(),Ao("which-frame",this._whichFrame()),this._loadLocus()}var t,n,r,i,s,o,u,c,l,h,f,p,m,g,v,A,b,y,_,w,k,x;return T.default(e,[{key:"_stableAdFlowForTest",value:function(){try{(a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&a.Ls.getBoolean("gd_tag")||oS().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=E.default(R.default.mark((function e(){var t,n,r,a,i,s=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,bT({handler:function(){return D.default(this,s),!!PT}.bind(this),timeout:1e3,interval:10});case 2:return a=e.sent,i=a?null===(t=PT)||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=E.default(R.default.mark((function e(){var t,n,r,a,i,s,o,u,d,c,l,h,f,p,m,g,v,A,b,y,_,w,k,x,E,S,T=this;return R.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:o=e.sent,u=this._gameData,d=u.category,c=u.dname,l=u.pname,h=u.gameId,f=u.slug,p=u.title,m=u.ctry,g=u.failed,v=this._topDomain||this._parentDomain,A=new R_,b=A.get(),y=this.msgrt._ua,_=document.referrer,w=this.msgrt._layout,k=mo.version,x=(null===(r=this._gameData)||void 0===r||null===(a=r.gft)||void 0===a?void 0:a.midroll.enabled)||!1,E=(null===(i=this._gameData)||void 0===i||null===(s=i.midroll_plus)||void 0===s?void 0:s.enabled)||!1,S={args:{rfr:_,category:d,dname:c,pname:l,gameId:h,slug:f,title:p,ctry:m,domain:v,loc:b,ua:y,layout:w,version:k,visitorId:o,hasGft:x,hasMp:E,failed:g},onError:function(e){D.default(this,T),this._sendSDKError(e)}.bind(this)},gR(S);case 20: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(D.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=E.default(R.default.mark((function e(t){var n;return R.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:(_=E.default(R.default.mark((function e(){var t,n,r,a,i,s;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=12;break}if(r=new R_,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,IS();case 7:e.next=12;break;case 9:if("html5.gamedistribution.com"!==this._topDomain){e.next=12;break}return e.next=12,IS();case 12:case"end":return e.stop()}}),e,this)}))),function(){return _.apply(this,arguments)})},{key:"testConsent",value:function(){try{kS();E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,xS({});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;CS.on("splash-hidden",function(t){D.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());O.default(location.href,!0);if(this._whichFrame(),this._isMasterGameURL(),this._isExtHostedGameURL(),this._isTokenGameURL(),this._isHostHTML5Domain(),this._isExternalHoster(),location.href,document.referrer,t)try{Ao("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=E.default(R.default.mark((function e(t,n){var r,a,i,s,o,u,d=this;return R.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,ST();case 15:return o=e.sent,bo("[ad-system-init] allowed",{adSystemInitAllowed:u=s&&!o,notDisabledByModuleClose:s,disabledByConsent:o}),u&&(this.videoAdReady=this._initializeVideoAd().then(function(){D.default(this,d),(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){D.default(this,d);var t="".concat(e).startsWith("Error: Blocked:");bo("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,LR();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=E.default(R.default.mark((function e(){var t,n,r,i,s;return R.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,lT();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=M.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=mo.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;if(this._shouldSendTunnlEvent(e)){void 0!==this._topDomain&&"undefined"!==this._topDomain||(this._topDomain=void 0);var n={page_url:this._topDomain||this._parentDomain,game_id:this.options.gameId,eventtype:e,ts:Date.now()};fetch("https://hlana.gamedistribution.com/event?".concat(N.default.stringify(n))).catch(function(r){D.default(this,t),this._sendHLAnalyicsLog({query:IT(IT({},n),{},{error:null==r?void 0:r.message}),eventType:-e})}.bind(this)),this._sendHLAnalyicsLog({query:n,eventType:e}),this.adInstance._send_atom_event("hl.config",n),this._send_gametag_data("sdk_gameplay")}}},{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(j.default(document.location.ancestorOrigins)).find(function(t){return D.default(this,e),"revision.gamedistribution.com"===O.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:mo.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;D.default(this,e),PT=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(t=this._gameData.diagnostic)&&void 0!==t&&null!==(n=t.gameDock)&&void 0!==n&&n.adViewEvent&&PT.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),ES.track(PT,this._gameData)}.bind(this)).catch(function(t){D.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=PT)||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){D.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_loadLocus",value:function(){var e=E.default(R.default.mark((function e(){var t,n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Aw();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(){D.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){D.default(this,n),this._sendSDKError(e)}.bind(this)).then(function(){D.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=E.default(R.default.mark((function e(){return R.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:(v=E.default(R.default.mark((function e(){return R.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 v.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 R_,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};gT({onError:function(t){D.default(this,e),this._sendSDKError(t)}.bind(this),args:s})}}},{key:"_getCleanUrl",value:function(e){var t=e;try{var n=new O.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 D.default(this,e),this.eventBus.subscribe(t,function(e){return D.default(this,n),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),a.IMAEvents.forEach(function(t){var n=this;return D.default(this,e),this.eventBus.subscribe(t,function(e){return D.default(this,n),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){D.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){}}sS()}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return D.default(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(t){var n,r;D.default(this,e),this.msgrt.send("ad.impression"),rS(),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&ES.track(PT,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(t){D.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){D.default(this,e),this._sendAdRequestContext(t.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(t){if(D.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){D.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){D.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 D.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=tw().config;return"https://".concat(t.gameAPI,"/game/v4/get/").concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(mo.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(g=E.default(R.default.mark((function e(){var t,n,r;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=!0,n=this._gameData,r=this._parentDomain.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 g.apply(this,arguments)})},{key:"_blockDirectTokenURLEmbedding",value:function(){var e,t,n=this._checkTokenGameUrl(),r=new R_,a="html5.gamedistribution.com"!==O.default(document.referrer).host,i=n&&!cT.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,u=null===(s=this._gameData)||void 0===s||null===(o=s.directTokenUse)||void 0===o?void 0:o.behavior;"to-loader"===u?this._redirectToLoaderFrame():"to-blocked-page"===u&&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(E.default(R.default.mark((function a(){return R.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(N.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(E.default(R.default.mark((function n(){var r,a,i,s;return R.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=O.default(location.href,!0),a=IT(IT({},r.query),{},{rd:"1"}),i=N.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(){D.default(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;oS().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,u=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!=u&&u.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!=u&&u.enabled?this._createPromoBeforeSplash(i,s):!1!==o.enabled&&this._createSplash(i,s):null!=u&&u.enabled&&this._createPromo(i,s))}},{key:"_initializeVideoAd",value:(m=E.default(R.default.mark((function e(){var t;return R.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 gS(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=mo,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=E.default(R.default.mark((function e(t){var n,r,a,i,s;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=!1,e.prev=1,e.next=4,Ow();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),Ao("[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=E.default(R.default.mark((function e(t){var n,r;return R.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(Ao("[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:bo("[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&&MS({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=E.default(R.default.mark((function e(){var t;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();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=E.default(R.default.mark((function e(t,n){var r,i,s,o,u=this;return R.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(IT(IT({},this.options),{},{isConsentDomain:n,version:mo.version}),t,this._parentDomain),e.next=6,yw();case 6:s=e.sent,o=s.enabled,i.on("playClick",function(){var e,r,s,d=this;if(D.default(this,u),((null===(e=window.gdlocus)||void 0===e?void 0:e.firstUserAction)||E.default(R.default.mark((function e(){return R.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){D.default(this,d),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(),bR("play"),o)window.gdsdk.showAd(a.AdType.Interstitial,{position:"preroll"}).catch(function(e){D.default(this,d),i.hide()}.bind(this));else{var l={position:"preroll"};(function(){D.default(this,d),_o.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){D.default(this,d)}.bind(this))}null!==(r=this._gameData)&&void 0!==r&&null!==(s=r.evnts)&&void 0!==s&&s.enabled&&(MS({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(){D.default(this,u),i.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){D.default(this,u),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=E.default(R.default.mark((function e(t,n){var r,a,i,s,o=this;return R.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(IT(IT({},this.options),{},{isConsentDomain:n,version:mo.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){D.default(this,o),s.hide(),this._createSplash(t,n)}.bind(this)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0),this._createSplash(t,n);case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(e,t){return c.apply(this,arguments)})},{key:"_createPromo",value:(u=E.default(R.default.mark((function e(t,n){var r,a,i,s,o=this;return R.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(IT(IT({},this.options),{},{isConsentDomain:n,version:mo.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){D.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=12;break;case 9:e.prev=9,e.t0=e.catch(0),this.onResumeGame("Resumed after the promo","warning");case 12:case"end":return e.stop()}}),e,this,[[0,9]])}))),function(e,t){return u.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(a.AdType.Interstitial).catch(function(){D.default(this,e)}.bind(this))}},{key:"IscForwardShowAd",value:(o=E.default(R.default.mark((function e(t){var n,r,a,i,s,o,u,d,c,l=arguments;return R.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,Ow();case 10:if(u=e.sent){e.next=13;break}return e.abrupt("return",i);case 13:return e.next=16,u.isLoader();case 16:if(d=e.sent,c=u.hasRouter(),d||!c){e.next=26;break}return bo("[GD-IS] forwarding ad call",{location:window.location.href}),r=!0,e.next=25,u.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),Ao("[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=E.default(R.default.mark((function e(t){var n,r=this,a=arguments;return R.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=E.default(R.default.mark((function e(a,i){var s,o,u,d,c,l,h,f,p;return R.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,Pw();case 5:e.t0=e.sent;case 6:if(!e.t0){e.next=10;break}return bo("[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(u=e.sent,d=u.forwarded,c=u.result,!d){e.next=18;break}return a(c),e.abrupt("return");case 18:return bR("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(_R(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 nT(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 Ao("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(){D.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,u,d,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===(u=this._gameData)||void 0===u||null===(d=u.gft)||void 0===d||null===(c=d[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=_R(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,u=e.gameData,d=e.adRequest,c=null;d.adType===a.AdType.Interstitial&&null!==(t=u.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=u.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(c=6e4*(null===(s=u.diagnostic)||void 0===s||null===(o=s.useMidrollIndex)||void 0===o?void 0:o.indexes[this.adInstance.adMidrollCount])):c=u.midroll;if(d.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=E.default(R.default.mark((function e(t){var n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=E.default(R.default.mark((function e(r,i){var s,o;return R.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=E.default(R.default.mark((function e(){var t=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=E.default(R.default.mark((function e(n,r){return R.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=E.default(R.default.mark((function n(r,a){var i;return R.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;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 r="SDK_GAME_START";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),this.adInstance&&this.adInstance._hideAddResume(),this.adInstance&&this.adInstance._hideAdSpinner(),this.adInstance&&this.adInstance._clearTimeoutForSkipAddButton(),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(MS({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()||(MS({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(D.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){D.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 O.default(e),a=r.host;return r.href,((null===(t=this._gameData.urlBlockExc)||void 0===t?void 0:t.hosts)||[]).some(function(e){return D.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;D.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 D.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()),u=(e||n)&&r.loaderEnabled,d=(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,g=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:u,noLoadedEvent:d,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:g,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 O.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=O.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=O.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 O.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 O.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new O.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(d.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new AS(t).splash()}},{key:"_createPrerollPromoTemplate",value:(n=E.default(R.default.mark((function e(t){var n,r,a,i,s;return R.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 vS(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(d.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new O.default(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(N.default.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new O.default(e,!0);return n.query=IT(IT({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return d.Base64.encode(JSON.stringify(e))}},{key:"session",value:function(){var e=this;return new Promise(function(){var t=E.default(R.default.mark((function t(n,r){var a;return R.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)PT.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 D.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;D.default(this,i),this.showAd(a.AdType.Interstitial,{position:"midroll"}).catch(function(t){D.default(this,e)}.bind(this))}.bind(this),1e3*s)}}},{key:"executeCompensation",value:(t=E.default(R.default.mark((function e(t){var n,r,i,s,o,u,d=this;return R.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=E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.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;D.default(this,d);var r=!1,a=setInterval(E.default(R.default.mark((function t(){var s;return R.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),Ao("[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(){D.default(this,n),r||o||e({success:!1})}.bind(this),6e4)}.bind(this));case 15:return u=e.sent,e.abrupt("return",u);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(!UR({rateType:i,gameData:this._gameData}))return void Ao("[compensation] rate check did not pass for ".concat(i));Ao("[compensation] rate check passed for ".concat(i));var s=setInterval(E.default(R.default.mark((function n(){var r=this;return R.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:t.adInstance.requestRunning||t.adFlowRunning?console.log("Advertisement already running..."):(Ao("gd-adflow WILL GIVE GIFT!!!"),t.showAd(a.AdType.Interstitial,{position:e,isGift:!0}).catch(function(e){D.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 CT}},{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 D.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(UR({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;(D.default(this,t),this.adFlowRunning)||(this.showAd(a.AdType.Interstitial,{position:"midroll",giftType:r,isMidrollPlus:!0}).catch(function(e){D.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;D.default(this,t),this.showAd(a.AdType.Interstitial,{position:"midroll",giftType:r,isMidrollPlus:!0}).catch(function(t){D.default(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}}}]),e}();function BT(){return(BT=E.default(R.default.mark((function e(){var t,n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Aw();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){D.default(this,n),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}var UT,MT=new m.EventEmitter,FT=function(e){var t=this;!function(){BT.apply(this,arguments)}();var n,r=function(e){var n=this;return D.default(this,t),new Promise(function(t,r){var a=this;D.default(this,n);var i=function(e){D.default(this,a),"SDK_GAME_START"===e.name&&(MT.off("sdk-event",i),t())}.bind(this);MT.on("sdk-event",i),m("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return D.default(this,t),n||(n=new LT(e)),n}.bind(this),i=function(){var e;return D.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(D.default(this,t),!i())return r(e);bo("[GD-IS-IGS] store-visible so ad was skipped",{loc:window.location.href})}.bind(this),o=function(e){return D.default(this,t),"gdsdk://preloaded"}.bind(this),u=function(e){return D.default(this,t),a().showDisplayAd(e)}.bind(this),d=function(){return D.default(this,t),m("cancelAd")}.bind(this),c=function(){return D.default(this,t),m("openConsole")}.bind(this),l=function(){return D.default(this,t),m("showBanner")}.bind(this),h=function(){return D.default(this,t),m("session")}.bind(this),f=function(e){return D.default(this,t),m("sendGenericEvent",{options:e})}.bind(this),p=function(){D.default(this,t),console.log("_sendSDKReady")}.bind(this),m=function(e,n){var r=this;return D.default(this,t),n||(n={}),new Promise(function(t,a){D.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),g=function(){D.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),v=function(){D.default(this,t),g(),m("init")}.bind(this),A=function(n){D.default(this,t);try{MT.emit("sdk-event",n),e.onEvent&&(bo("[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:u,cancelAd:d,openConsole:c,getSession:h,onEvent:A,init:v,_sendSDKReady:p,sendGenericEvent:f}},jT=function(){var e=E.default(R.default.mark((function e(t){var n,r=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=FT(t)).init(),e.next=4,Ew({whichFrame:"game-frame",options:{onEvent:n.onEvent.bind(n)}});case 4:return Gw({onEvent:function(e){D.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-change"===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)}}(),GT=function(){var e=this,t=function(){D.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),n=function(){D.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),r=function(){D.default(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this),a=function(){D.default(this,e);var r="html5.gamedistribution.com"!==O.default(window.location.href).host;return t()&&!(n()||r)?"loader-frame":"game-frame"}.bind(this);return{isMasterGameURL:t,isTokenGameURL:n,isExtHostedGameURL:r,whichFrame:a}},NT="gd-sdk-frame-handshake-request",qT="gd-sdk-frame-handshake-response",HT=function(e){var t=this;return new Promise(function(e,n){var r=this;D.default(this,t);var a={type:NT},i=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin,a=t.source,s=n.type;if(s===NT){var o={type:qT};a.postMessage(o,r)}else s===qT&&(i=!0,e({origin:r,source:a}))})),setTimeout(function(){D.default(this,r),i||e()}.bind(this),200),window.parent!==window?window.parent.postMessage(a,"*"):e()}.bind(this))},VT=function(){var e=E.default(R.default.mark((function e(){var t,n,r,a,i,s,o;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vw();case 2:return t=e.sent,e.next=6,HT();case 6:if(n=e.sent,cT.SDKExistsOnUpperFrame=!!n,t){e.next=10;break}return e.abrupt("return",!1);case 10:return r=GT(),a=r.isMasterGameURL,r.isTokenGameURL,i=a(),e.next=14,bw();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)}}(),QT={},zT=function(e){try{if(e.skipForward)return void Ao("gd-adflow fw-skip-forward",e);if(Ao("gd-adflow fw-forwarding",e),QT.source){var t={type:"gd-sdk-on-event",event:e};QT.source.postMessage(t,QT.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},KT=function(){zT({name:"SDK_READY",status:"success",message:"Everything is ready."}),zT({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),zT({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},WT=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(!QT.source&&"init"===s)return function(e){var t=e.source,n=e.origin;QT={source:t,origin:n}}({source:a,origin:r}),void KT();var u=e[s];u&&E.default(R.default.mark((function t(){var n,r=this;return R.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,function(){D.default(this,r),"showAd"===s&&_o.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=u.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 d={type:"gd-sdk",method:s,options:o};window.postMessage(d,location.origin)}}),!1)},YT=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){zT(e),t.apply(this,arguments)}}(e);var t=new LT(e);return WT(t),t},JT=function(){function e(){I.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:[]},Yv(this.moduleName,this.moduleConfig)}var t,n;return T.default(e,[{key:"load",value:(n=E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Xv(this.moduleName);case 3:this.module=e.sent,Ao("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=E.default(R.default.mark((function e(t){var n;return R.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}(),XT=function(){var e=E.default(R.default.mark((function e(){var t,n,r,i,s,o,u,d,c,l,h,f,p,m,g,v;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=function(){var e,t=(e=new R_).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 R_).get("partner.url.value");return new O.default(e,!0)},u=function(){var e="ae-soft-323";try{var t=o(),n=t.pathname,r=n.split("/"),a=r[r.length-1];bo("aeria-ylogin:loc",t,n,a),e=a}catch(e){yo("Error on getting aeria game id",e)}return e}(),d={action:"score",data:{gameId:u,score:100},env:r?"staging":"production",system:"Softgames"},c=function(){var e=window.parent||window,t=d;e.postMessage(t,"*")},l=new a.EventBus,e.next=13,fw();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=E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(new JT).runYMenu({gameId:u});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),g=GT(),v=g.whichFrame,"game-frame"===v()&&(f||m());case 21:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ZT=function(e){try{var t=J_(e);e.gameId||t.send("nogameid",{message:"".concat(fb.parentURL)})}catch(e){}},$T=function(){var e=E.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,XT();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)}}(),eI={create:function(){var e=E.default(R.default.mark((function e(t){var n,r;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,ZT(t),hw(t),e.next=5,VT();case 5:return n=e.sent,e.next=8,$T();case 8:if(window.isForwarderFrame=n,!n){e.next=15;break}return e.next=12,jT(t);case 12:e.t0=e.sent,e.next=16;break;case 15:e.t0=YT(t);case 16:return r=e.t0,_w(),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",YT(t));case 25:case"end":return e.stop()}}),e,null,[[0,21]])})));return function(t){return e.apply(this,arguments)}}()};function tI(){return(tI=E.default(R.default.mark((function e(t,n){var r;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,xw();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,iI(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 nI,rI,aI=!1;function iI(e){var t=this;return new Promise(function(n,r){var a=this;if(D.default(this,t),UT)return n(UT);if(aI)var i=setInterval(function(){D.default(this,a),UT&&(aI=!1,clearInterval(i),n(UT))}.bind(this),100);else aI=!0,eI.create(e).then(function(e){D.default(this,a),UT=e,e._sendSDKReady(),aI=!1,n(UT)}.bind(this))}.bind(this))}function sI(e){return iI(e),{invoke:function(t){return function(e,t){return tI.apply(this,arguments)}(e,t)}}}function oI(e,t){var n=this;return new Promise(function(r,i){var s,o=this;D.default(this,n);var u=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);uI({text:"sdk-wrapper-script-load"}),a.getScript(u[0],"gd-sdk-wrp",{alternates:u}).catch(function(e){D.default(this,o),uI({text:"sdk-wrapper load error",error:e.message}),this._sendSDKError(e),i(e)}.bind(this)).then(E.default(R.default.mark((function n(){var a,s;return R.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,uI({text:"sdk-wrapper load success"}),a=window.GDSDKWRP.GDSDKWRP,s=new a,uI({text:"sdk-wrapper before gdSdkWrp.init"}),n.next=7,s.init(e,t);case 7:rI=n.sent,uI({text:"sdk-wrapper after gdSdkWrp.init"}),r(rI),n.next=16;break;case 12:n.prev=12,n.t0=n.catch(0),uI({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 uI(e){try{var t={tp:"gd.wrp",args:e};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(d.Base64.encode(JSON.stringify(t))))),console.log(j.default(Object.values(e)))}catch(e){}}function dI(e){if(e){var t=e.name,n=e.message,r=e.status;try{uI({text:"samsung-wrp send-game-event",evt:e,hasOptions:!!nI}),nI&&nI.onEvent({name:t,message:n,status:r})}catch(t){uI({text:"samsung-wrp DEVELOPER-ERROR",evt:e,err:t})}}}function cI(e){return lI.apply(this,arguments)}function lI(){return(lI=E.default(R.default.mark((function e(t){var n,r,a,i,s,o,u,d,c;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return nI=t,hw(t),e.next=4,fw();case 4:if(i=e.sent,!rI){e.next=7;break}return e.abrupt("return",rI);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,u=null==i?void 0:i.gameId,d=null==i?void 0:i.title,fI("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,oI(c,{onEvent:dI,game:{gameId:u,title:d,version:o}});case 17:return rI=e.sent,e.abrupt("return",rI);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function hI(){return hI=E.default(R.default.mark((function e(t){var n,r,a;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t._get_developer_sets,fI("beforeGetDeveloperSettings"),r=n(),fI("afterGetDeveloperSettings"),e.prev=4,e.next=7,cI(r);case 7:a=e.sent,fI("after get SDK wrapper: ".concat(!!a)),a&&(fI("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),fI("Error on SDK wrapper init: ".concat(e.t0.message));case 16:case"end":return e.stop()}}),e,null,[[4,12]])}))),hI.apply(this,arguments)}function fI(e){window.sdkLog.push(e)}function pI(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":S.default(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===S.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}window.sdkLog=[],"img.samsungapps.com"===function(){var e,t,n=O.default(window.location.href,!0),r=n.host,a=n.query,i=r,s=null==a?void 0:a.gd_sdk_referrer_url;return s&&(s=s.startsWith("https://")||s.startsWith("http://")?s:"https://".concat(s),null!==(t=e=O.default(s,!0))&&void 0!==t&&t.host&&(i=e.host)),i}()?fI("skipped normal SDK init!"):(!function(){nS();var e=sI(pI());function t(){var t=this;this.AdType=a.AdType,this.preloadAd=function(){var t=E.default(R.default.mark((function t(n){var r,a=this;return R.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.invoke(function(e){return D.default(this,a),e.preloadAd(n)}.bind(this));case 2:return r=t.sent,bo("[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=E.default(R.default.mark((function t(n,r){var i,s=this;return R.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.invoke(function(e){var t=this;if(D.default(this,s),n===a.AdType.Display)return e.showDisplayAd(r);var i={};return function(){D.default(this,t),_o.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,bo("[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 D.default(this,t),e.cancelAd()}.bind(this))},this.openConsole=function(){var t=this;return e.invoke(function(e){return D.default(this,t),e.openConsole()}.bind(this))},this.getSession=function(){var t=this;return e.invoke(function(e){return D.default(this,t),e.session()}.bind(this))},this.sendEvent=function(t){var n=this;return e.invoke(function(e){return D.default(this,n),e.sendGenericEvent(t)}.bind(this))},this.leaderboard={show:function(){D.default(this,t),$v.showLeaderboard()}.bind(this),addScore:function(e){D.default(this,t),$v.addScore(e)}.bind(this)}}t.prototype=new function(){this.showBanner=function(){var t=this;return e.invoke(function(e){return D.default(this,t),e.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new t,window.gdApi=window.gdsdk}(),fI("afterSDKInit")),function(e){hI.apply(this,arguments)}({_get_developer_sets:pI});